mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-05-21 23:24:44 +02:00
- Notifications tab in Config sidebar with Bell icon - Channels section: add/edit/delete channels (mesh broadcast, DM, email, webhook) - Test button sends test alert to channel - Rules section: create rules with category checkboxes fetched from API - Quiet hours configurable with start/end times - Dedup window to prevent alert spam - Full helper text and info buttons on every field - Category list fetched from /api/notifications/categories, not hardcoded - Added notifications and environmental to VALID_SECTIONS in config_routes.py Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
410 lines
1.6 MiB
410 lines
1.6 MiB
function JW(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(t,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var eU=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dC(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var mz={exports:{}},g0={},yz={exports:{}},ot={};/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Cv=Symbol.for("react.element"),tU=Symbol.for("react.portal"),rU=Symbol.for("react.fragment"),nU=Symbol.for("react.strict_mode"),iU=Symbol.for("react.profiler"),aU=Symbol.for("react.provider"),oU=Symbol.for("react.context"),sU=Symbol.for("react.forward_ref"),lU=Symbol.for("react.suspense"),uU=Symbol.for("react.memo"),cU=Symbol.for("react.lazy"),lP=Symbol.iterator;function hU(t){return t===null||typeof t!="object"?null:(t=lP&&t[lP]||t["@@iterator"],typeof t=="function"?t:null)}var _z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xz=Object.assign,Sz={};function ch(t,e,r){this.props=t,this.context=e,this.refs=Sz,this.updater=r||_z}ch.prototype.isReactComponent={};ch.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};ch.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function bz(){}bz.prototype=ch.prototype;function vC(t,e,r){this.props=t,this.context=e,this.refs=Sz,this.updater=r||_z}var pC=vC.prototype=new bz;pC.constructor=vC;xz(pC,ch.prototype);pC.isPureReactComponent=!0;var uP=Array.isArray,wz=Object.prototype.hasOwnProperty,gC={current:null},Tz={key:!0,ref:!0,__self:!0,__source:!0};function Cz(t,e,r){var n,i={},a=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(a=""+e.key),e)wz.call(e,n)&&!Tz.hasOwnProperty(n)&&(i[n]=e[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(t&&t.defaultProps)for(n in s=t.defaultProps,s)i[n]===void 0&&(i[n]=s[n]);return{$$typeof:Cv,type:t,key:a,ref:o,props:i,_owner:gC.current}}function fU(t,e){return{$$typeof:Cv,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function mC(t){return typeof t=="object"&&t!==null&&t.$$typeof===Cv}function dU(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var cP=/\/+/g;function ex(t,e){return typeof t=="object"&&t!==null&&t.key!=null?dU(""+t.key):e.toString(36)}function Jg(t,e,r,n,i){var a=typeof t;(a==="undefined"||a==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Cv:case tU:o=!0}}if(o)return o=t,i=i(o),t=n===""?"."+ex(o,0):n,uP(i)?(r="",t!=null&&(r=t.replace(cP,"$&/")+"/"),Jg(i,e,r,"",function(u){return u})):i!=null&&(mC(i)&&(i=fU(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(cP,"$&/")+"/")+t)),e.push(i)),1;if(o=0,n=n===""?".":n+":",uP(t))for(var s=0;s<t.length;s++){a=t[s];var l=n+ex(a,s);o+=Jg(a,e,r,l,i)}else if(l=hU(t),typeof l=="function")for(t=l.call(t),s=0;!(a=t.next()).done;)a=a.value,l=n+ex(a,s++),o+=Jg(a,e,r,l,i);else if(a==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function xp(t,e,r){if(t==null)return t;var n=[],i=0;return Jg(t,n,"","",function(a){return e.call(r,a,i++)}),n}function vU(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var un={current:null},em={transition:null},pU={ReactCurrentDispatcher:un,ReactCurrentBatchConfig:em,ReactCurrentOwner:gC};function Mz(){throw Error("act(...) is not supported in production builds of React.")}ot.Children={map:xp,forEach:function(t,e,r){xp(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return xp(t,function(){e++}),e},toArray:function(t){return xp(t,function(e){return e})||[]},only:function(t){if(!mC(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};ot.Component=ch;ot.Fragment=rU;ot.Profiler=iU;ot.PureComponent=vC;ot.StrictMode=nU;ot.Suspense=lU;ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pU;ot.act=Mz;ot.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=xz({},t.props),i=t.key,a=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(a=e.ref,o=gC.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var s=t.type.defaultProps;for(l in e)wz.call(e,l)&&!Tz.hasOwnProperty(l)&&(n[l]=e[l]===void 0&&s!==void 0?s[l]:e[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];n.children=s}return{$$typeof:Cv,type:t.type,key:i,ref:a,props:n,_owner:o}};ot.createContext=function(t){return t={$$typeof:oU,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:aU,_context:t},t.Consumer=t};ot.createElement=Cz;ot.createFactory=function(t){var e=Cz.bind(null,t);return e.type=t,e};ot.createRef=function(){return{current:null}};ot.forwardRef=function(t){return{$$typeof:sU,render:t}};ot.isValidElement=mC;ot.lazy=function(t){return{$$typeof:cU,_payload:{_status:-1,_result:t},_init:vU}};ot.memo=function(t,e){return{$$typeof:uU,type:t,compare:e===void 0?null:e}};ot.startTransition=function(t){var e=em.transition;em.transition={};try{t()}finally{em.transition=e}};ot.unstable_act=Mz;ot.useCallback=function(t,e){return un.current.useCallback(t,e)};ot.useContext=function(t){return un.current.useContext(t)};ot.useDebugValue=function(){};ot.useDeferredValue=function(t){return un.current.useDeferredValue(t)};ot.useEffect=function(t,e){return un.current.useEffect(t,e)};ot.useId=function(){return un.current.useId()};ot.useImperativeHandle=function(t,e,r){return un.current.useImperativeHandle(t,e,r)};ot.useInsertionEffect=function(t,e){return un.current.useInsertionEffect(t,e)};ot.useLayoutEffect=function(t,e){return un.current.useLayoutEffect(t,e)};ot.useMemo=function(t,e){return un.current.useMemo(t,e)};ot.useReducer=function(t,e,r){return un.current.useReducer(t,e,r)};ot.useRef=function(t){return un.current.useRef(t)};ot.useState=function(t){return un.current.useState(t)};ot.useSyncExternalStore=function(t,e,r){return un.current.useSyncExternalStore(t,e,r)};ot.useTransition=function(){return un.current.useTransition()};ot.version="18.3.1";yz.exports=ot;var $=yz.exports;const Bc=dC($),gU=JW({__proto__:null,default:Bc},[$]);/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var mU=$,yU=Symbol.for("react.element"),_U=Symbol.for("react.fragment"),xU=Object.prototype.hasOwnProperty,SU=mU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bU={key:!0,ref:!0,__self:!0,__source:!0};function Az(t,e,r){var n,i={},a=null,o=null;r!==void 0&&(a=""+r),e.key!==void 0&&(a=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)xU.call(e,n)&&!bU.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:yU,type:t,key:a,ref:o,props:i,_owner:SU.current}}g0.Fragment=_U;g0.jsx=Az;g0.jsxs=Az;mz.exports=g0;var b=mz.exports,rb={},Lz={exports:{}},zn={},Pz={exports:{}},kz={};/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/(function(t){function e(j,W){var H=j.length;j.push(W);e:for(;0<H;){var X=H-1>>>1,K=j[X];if(0<i(K,W))j[X]=W,j[H]=K,H=X;else break e}}function r(j){return j.length===0?null:j[0]}function n(j){if(j.length===0)return null;var W=j[0],H=j.pop();if(H!==W){j[0]=H;e:for(var X=0,K=j.length,ne=K>>>1;X<ne;){var ie=2*(X+1)-1,ue=j[ie],ve=ie+1,Ge=j[ve];if(0>i(ue,H))ve<K&&0>i(Ge,ue)?(j[X]=Ge,j[ve]=H,X=ve):(j[X]=ue,j[ie]=H,X=ie);else if(ve<K&&0>i(Ge,H))j[X]=Ge,j[ve]=H,X=ve;else break e}}return W}function i(j,W){var H=j.sortIndex-W.sortIndex;return H!==0?H:j.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,h=null,f=3,d=!1,p=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(j){for(var W=r(u);W!==null;){if(W.callback===null)n(u);else if(W.startTime<=j)n(u),W.sortIndex=W.expirationTime,e(l,W);else break;W=r(u)}}function T(j){if(g=!1,S(j),!p)if(r(l)!==null)p=!0,F(C);else{var W=r(u);W!==null&&U(T,W.startTime-j)}}function C(j,W){p=!1,g&&(g=!1,y(k),k=-1),d=!0;var H=f;try{for(S(W),h=r(l);h!==null&&(!(h.expirationTime>W)||j&&!I());){var X=h.callback;if(typeof X=="function"){h.callback=null,f=h.priorityLevel;var K=X(h.expirationTime<=W);W=t.unstable_now(),typeof K=="function"?h.callback=K:h===r(l)&&n(l),S(W)}else n(l);h=r(l)}if(h!==null)var ne=!0;else{var ie=r(u);ie!==null&&U(T,ie.startTime-W),ne=!1}return ne}finally{h=null,f=H,d=!1}}var M=!1,A=null,k=-1,E=5,D=-1;function I(){return!(t.unstable_now()-D<E)}function z(){if(A!==null){var j=t.unstable_now();D=j;var W=!0;try{W=A(!0,j)}finally{W?O():(M=!1,A=null)}}else M=!1}var O;if(typeof _=="function")O=function(){_(z)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,G=V.port2;V.port1.onmessage=z,O=function(){G.postMessage(null)}}else O=function(){m(z,0)};function F(j){A=j,M||(M=!0,O())}function U(j,W){k=m(function(){j(t.unstable_now())},W)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(j){j.callback=null},t.unstable_continueExecution=function(){p||d||(p=!0,F(C))},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(j){switch(f){case 1:case 2:case 3:var W=3;break;default:W=f}var H=f;f=W;try{return j()}finally{f=H}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(j,W){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var H=f;f=j;try{return W()}finally{f=H}},t.unstable_scheduleCallback=function(j,W,H){var X=t.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?X+H:X):H=X,j){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=H+K,j={id:c++,callback:W,priorityLevel:j,startTime:H,expirationTime:K,sortIndex:-1},H>X?(j.sortIndex=H,e(u,j),r(l)===null&&j===r(u)&&(g?(y(k),k=-1):g=!0,U(T,H-X))):(j.sortIndex=K,e(l,j),p||d||(p=!0,F(C))),j},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(j){var W=f;return function(){var H=f;f=W;try{return j.apply(this,arguments)}finally{f=H}}}})(kz);Pz.exports=kz;var wU=Pz.exports;/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var TU=$,On=wU;function ce(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Dz=new Set,Cd={};function iu(t,e){jc(t,e),jc(t+"Capture",e)}function jc(t,e){for(Cd[t]=e,t=0;t<e.length;t++)Dz.add(e[t])}var ao=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nb=Object.prototype.hasOwnProperty,CU=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,hP={},fP={};function MU(t){return nb.call(fP,t)?!0:nb.call(hP,t)?!1:CU.test(t)?fP[t]=!0:(hP[t]=!0,!1)}function AU(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function LU(t,e,r,n){if(e===null||typeof e>"u"||AU(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function cn(t,e,r,n,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var Er={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Er[t]=new cn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Er[e]=new cn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Er[t]=new cn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Er[t]=new cn(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Er[t]=new cn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Er[t]=new cn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Er[t]=new cn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Er[t]=new cn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Er[t]=new cn(t,5,!1,t.toLowerCase(),null,!1,!1)});var yC=/[\-:]([a-z])/g;function _C(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(yC,_C);Er[e]=new cn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(yC,_C);Er[e]=new cn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(yC,_C);Er[e]=new cn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Er[t]=new cn(t,1,!1,t.toLowerCase(),null,!1,!1)});Er.xlinkHref=new cn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Er[t]=new cn(t,1,!1,t.toLowerCase(),null,!0,!0)});function xC(t,e,r,n){var i=Er.hasOwnProperty(e)?Er[e]:null;(i!==null?i.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(LU(e,r,i,n)&&(r=null),n||i===null?MU(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):i.mustUseProperty?t[i.propertyName]=r===null?i.type===3?!1:"":r:(e=i.attributeName,n=i.attributeNamespace,r===null?t.removeAttribute(e):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var yo=TU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Sp=Symbol.for("react.element"),sc=Symbol.for("react.portal"),lc=Symbol.for("react.fragment"),SC=Symbol.for("react.strict_mode"),ib=Symbol.for("react.profiler"),Iz=Symbol.for("react.provider"),Ez=Symbol.for("react.context"),bC=Symbol.for("react.forward_ref"),ab=Symbol.for("react.suspense"),ob=Symbol.for("react.suspense_list"),wC=Symbol.for("react.memo"),Ro=Symbol.for("react.lazy"),Nz=Symbol.for("react.offscreen"),dP=Symbol.iterator;function Yh(t){return t===null||typeof t!="object"?null:(t=dP&&t[dP]||t["@@iterator"],typeof t=="function"?t:null)}var zt=Object.assign,tx;function Rf(t){if(tx===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);tx=e&&e[1]||""}return`
|
||
`+tx+t}var rx=!1;function nx(t,e){if(!t||rx)return"";rx=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var n=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){n=u}t.call(e.prototype)}else{try{throw Error()}catch(u){n=u}t()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
||
`),a=n.stack.split(`
|
||
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var l=`
|
||
`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=s);break}}}finally{rx=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Rf(t):""}function PU(t){switch(t.tag){case 5:return Rf(t.type);case 16:return Rf("Lazy");case 13:return Rf("Suspense");case 19:return Rf("SuspenseList");case 0:case 2:case 15:return t=nx(t.type,!1),t;case 11:return t=nx(t.type.render,!1),t;case 1:return t=nx(t.type,!0),t;default:return""}}function sb(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case lc:return"Fragment";case sc:return"Portal";case ib:return"Profiler";case SC:return"StrictMode";case ab:return"Suspense";case ob:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Ez:return(t.displayName||"Context")+".Consumer";case Iz:return(t._context.displayName||"Context")+".Provider";case bC:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case wC:return e=t.displayName||null,e!==null?e:sb(t.type)||"Memo";case Ro:e=t._payload,t=t._init;try{return sb(t(e))}catch{}}return null}function kU(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return sb(e);case 8:return e===SC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ps(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Rz(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function DU(t){var e=Rz(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function bp(t){t._valueTracker||(t._valueTracker=DU(t))}function Oz(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=Rz(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Im(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function lb(t,e){var r=e.checked;return zt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function vP(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=ps(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function zz(t,e){e=e.checked,e!=null&&xC(t,"checked",e,!1)}function ub(t,e){zz(t,e);var r=ps(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?cb(t,e.type,r):e.hasOwnProperty("defaultValue")&&cb(t,e.type,ps(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function pP(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function cb(t,e,r){(e!=="number"||Im(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Of=Array.isArray;function Mc(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e["$"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty("$"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=""+ps(r),e=null,i=0;i<t.length;i++){if(t[i].value===r){t[i].selected=!0,n&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function hb(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(ce(91));return zt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function gP(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(ce(92));if(Of(r)){if(1<r.length)throw Error(ce(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:ps(r)}}function Bz(t,e){var r=ps(e.value),n=ps(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function mP(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function jz(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fb(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?jz(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var wp,Vz=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(wp=wp||document.createElement("div"),wp.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=wp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Md(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Qf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},IU=["Webkit","ms","Moz","O"];Object.keys(Qf).forEach(function(t){IU.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Qf[e]=Qf[t]})});function Fz(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Qf.hasOwnProperty(t)&&Qf[t]?(""+e).trim():e+"px"}function Gz(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=Fz(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var EU=zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function db(t,e){if(e){if(EU[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ce(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ce(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ce(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ce(62))}}function vb(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pb=null;function TC(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var gb=null,Ac=null,Lc=null;function yP(t){if(t=Lv(t)){if(typeof gb!="function")throw Error(ce(280));var e=t.stateNode;e&&(e=S0(e),gb(t.stateNode,t.type,e))}}function Hz(t){Ac?Lc?Lc.push(t):Lc=[t]:Ac=t}function Wz(){if(Ac){var t=Ac,e=Lc;if(Lc=Ac=null,yP(t),e)for(t=0;t<e.length;t++)yP(e[t])}}function Uz(t,e){return t(e)}function Zz(){}var ix=!1;function $z(t,e,r){if(ix)return t(e,r);ix=!0;try{return Uz(t,e,r)}finally{ix=!1,(Ac!==null||Lc!==null)&&(Zz(),Wz())}}function Ad(t,e){var r=t.stateNode;if(r===null)return null;var n=S0(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(ce(231,e,typeof r));return r}var mb=!1;if(ao)try{var Xh={};Object.defineProperty(Xh,"passive",{get:function(){mb=!0}}),window.addEventListener("test",Xh,Xh),window.removeEventListener("test",Xh,Xh)}catch{mb=!1}function NU(t,e,r,n,i,a,o,s,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(r,u)}catch(c){this.onError(c)}}var Jf=!1,Em=null,Nm=!1,yb=null,RU={onError:function(t){Jf=!0,Em=t}};function OU(t,e,r,n,i,a,o,s,l){Jf=!1,Em=null,NU.apply(RU,arguments)}function zU(t,e,r,n,i,a,o,s,l){if(OU.apply(this,arguments),Jf){if(Jf){var u=Em;Jf=!1,Em=null}else throw Error(ce(198));Nm||(Nm=!0,yb=u)}}function au(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function Yz(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function _P(t){if(au(t)!==t)throw Error(ce(188))}function BU(t){var e=t.alternate;if(!e){if(e=au(t),e===null)throw Error(ce(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return _P(i),t;if(a===n)return _P(i),e;a=a.sibling}throw Error(ce(188))}if(r.return!==n.return)r=i,n=a;else{for(var o=!1,s=i.child;s;){if(s===r){o=!0,r=i,n=a;break}if(s===n){o=!0,n=i,r=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===r){o=!0,r=a,n=i;break}if(s===n){o=!0,n=a,r=i;break}s=s.sibling}if(!o)throw Error(ce(189))}}if(r.alternate!==n)throw Error(ce(190))}if(r.tag!==3)throw Error(ce(188));return r.stateNode.current===r?t:e}function Xz(t){return t=BU(t),t!==null?qz(t):null}function qz(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=qz(t);if(e!==null)return e;t=t.sibling}return null}var Kz=On.unstable_scheduleCallback,xP=On.unstable_cancelCallback,jU=On.unstable_shouldYield,VU=On.unstable_requestPaint,Yt=On.unstable_now,FU=On.unstable_getCurrentPriorityLevel,CC=On.unstable_ImmediatePriority,Qz=On.unstable_UserBlockingPriority,Rm=On.unstable_NormalPriority,GU=On.unstable_LowPriority,Jz=On.unstable_IdlePriority,m0=null,ga=null;function HU(t){if(ga&&typeof ga.onCommitFiberRoot=="function")try{ga.onCommitFiberRoot(m0,t,void 0,(t.current.flags&128)===128)}catch{}}var ki=Math.clz32?Math.clz32:ZU,WU=Math.log,UU=Math.LN2;function ZU(t){return t>>>=0,t===0?32:31-(WU(t)/UU|0)|0}var Tp=64,Cp=4194304;function zf(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Om(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,a=t.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=zf(s):(a&=o,a!==0&&(n=zf(a)))}else o=r&~i,o!==0?n=zf(o):a!==0&&(n=zf(a));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,a=e&-e,i>=a||i===16&&(a&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-ki(e),i=1<<r,n|=t[r],e&=~i;return n}function $U(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function YU(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,i=t.expirationTimes,a=t.pendingLanes;0<a;){var o=31-ki(a),s=1<<o,l=i[o];l===-1?(!(s&r)||s&n)&&(i[o]=$U(s,e)):l<=e&&(t.expiredLanes|=s),a&=~s}}function _b(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function eB(){var t=Tp;return Tp<<=1,!(Tp&4194240)&&(Tp=64),t}function ax(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function Mv(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ki(e),t[e]=r}function XU(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var i=31-ki(r),a=1<<i;e[i]=0,n[i]=-1,t[i]=-1,r&=~a}}function MC(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-ki(r),i=1<<n;i&e|t[n]&e&&(t[n]|=e),r&=~i}}var xt=0;function tB(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var rB,AC,nB,iB,aB,xb=!1,Mp=[],Ko=null,Qo=null,Jo=null,Ld=new Map,Pd=new Map,jo=[],qU="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function SP(t,e){switch(t){case"focusin":case"focusout":Ko=null;break;case"dragenter":case"dragleave":Qo=null;break;case"mouseover":case"mouseout":Jo=null;break;case"pointerover":case"pointerout":Ld.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pd.delete(e.pointerId)}}function qh(t,e,r,n,i,a){return t===null||t.nativeEvent!==a?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]},e!==null&&(e=Lv(e),e!==null&&AC(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function KU(t,e,r,n,i){switch(e){case"focusin":return Ko=qh(Ko,t,e,r,n,i),!0;case"dragenter":return Qo=qh(Qo,t,e,r,n,i),!0;case"mouseover":return Jo=qh(Jo,t,e,r,n,i),!0;case"pointerover":var a=i.pointerId;return Ld.set(a,qh(Ld.get(a)||null,t,e,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,Pd.set(a,qh(Pd.get(a)||null,t,e,r,n,i)),!0}return!1}function oB(t){var e=bl(t.target);if(e!==null){var r=au(e);if(r!==null){if(e=r.tag,e===13){if(e=Yz(r),e!==null){t.blockedOn=e,aB(t.priority,function(){nB(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function tm(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=Sb(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);pb=n,r.target.dispatchEvent(n),pb=null}else return e=Lv(r),e!==null&&AC(e),t.blockedOn=r,!1;e.shift()}return!0}function bP(t,e,r){tm(t)&&r.delete(e)}function QU(){xb=!1,Ko!==null&&tm(Ko)&&(Ko=null),Qo!==null&&tm(Qo)&&(Qo=null),Jo!==null&&tm(Jo)&&(Jo=null),Ld.forEach(bP),Pd.forEach(bP)}function Kh(t,e){t.blockedOn===e&&(t.blockedOn=null,xb||(xb=!0,On.unstable_scheduleCallback(On.unstable_NormalPriority,QU)))}function kd(t){function e(i){return Kh(i,t)}if(0<Mp.length){Kh(Mp[0],t);for(var r=1;r<Mp.length;r++){var n=Mp[r];n.blockedOn===t&&(n.blockedOn=null)}}for(Ko!==null&&Kh(Ko,t),Qo!==null&&Kh(Qo,t),Jo!==null&&Kh(Jo,t),Ld.forEach(e),Pd.forEach(e),r=0;r<jo.length;r++)n=jo[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<jo.length&&(r=jo[0],r.blockedOn===null);)oB(r),r.blockedOn===null&&jo.shift()}var Pc=yo.ReactCurrentBatchConfig,zm=!0;function JU(t,e,r,n){var i=xt,a=Pc.transition;Pc.transition=null;try{xt=1,LC(t,e,r,n)}finally{xt=i,Pc.transition=a}}function e7(t,e,r,n){var i=xt,a=Pc.transition;Pc.transition=null;try{xt=4,LC(t,e,r,n)}finally{xt=i,Pc.transition=a}}function LC(t,e,r,n){if(zm){var i=Sb(t,e,r,n);if(i===null)px(t,e,n,Bm,r),SP(t,n);else if(KU(i,t,e,r,n))n.stopPropagation();else if(SP(t,n),e&4&&-1<qU.indexOf(t)){for(;i!==null;){var a=Lv(i);if(a!==null&&rB(a),a=Sb(t,e,r,n),a===null&&px(t,e,n,Bm,r),a===i)break;i=a}i!==null&&n.stopPropagation()}else px(t,e,n,null,r)}}var Bm=null;function Sb(t,e,r,n){if(Bm=null,t=TC(n),t=bl(t),t!==null)if(e=au(t),e===null)t=null;else if(r=e.tag,r===13){if(t=Yz(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Bm=t,null}function sB(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(FU()){case CC:return 1;case Qz:return 4;case Rm:case GU:return 16;case Jz:return 536870912;default:return 16}default:return 16}}var Fo=null,PC=null,rm=null;function lB(){if(rm)return rm;var t,e=PC,r=e.length,n,i="value"in Fo?Fo.value:Fo.textContent,a=i.length;for(t=0;t<r&&e[t]===i[t];t++);var o=r-t;for(n=1;n<=o&&e[r-n]===i[a-n];n++);return rm=i.slice(t,1<n?1-n:void 0)}function nm(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Ap(){return!0}function wP(){return!1}function Bn(t){function e(r,n,i,a,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var s in t)t.hasOwnProperty(s)&&(r=t[s],this[s]=r?r(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Ap:wP,this.isPropagationStopped=wP,this}return zt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ap)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ap)},persist:function(){},isPersistent:Ap}),e}var hh={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kC=Bn(hh),Av=zt({},hh,{view:0,detail:0}),t7=Bn(Av),ox,sx,Qh,y0=zt({},Av,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:DC,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Qh&&(Qh&&t.type==="mousemove"?(ox=t.screenX-Qh.screenX,sx=t.screenY-Qh.screenY):sx=ox=0,Qh=t),ox)},movementY:function(t){return"movementY"in t?t.movementY:sx}}),TP=Bn(y0),r7=zt({},y0,{dataTransfer:0}),n7=Bn(r7),i7=zt({},Av,{relatedTarget:0}),lx=Bn(i7),a7=zt({},hh,{animationName:0,elapsedTime:0,pseudoElement:0}),o7=Bn(a7),s7=zt({},hh,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),l7=Bn(s7),u7=zt({},hh,{data:0}),CP=Bn(u7),c7={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},h7={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},f7={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function d7(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=f7[t])?!!e[t]:!1}function DC(){return d7}var v7=zt({},Av,{key:function(t){if(t.key){var e=c7[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=nm(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?h7[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:DC,charCode:function(t){return t.type==="keypress"?nm(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?nm(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),p7=Bn(v7),g7=zt({},y0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),MP=Bn(g7),m7=zt({},Av,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:DC}),y7=Bn(m7),_7=zt({},hh,{propertyName:0,elapsedTime:0,pseudoElement:0}),x7=Bn(_7),S7=zt({},y0,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),b7=Bn(S7),w7=[9,13,27,32],IC=ao&&"CompositionEvent"in window,ed=null;ao&&"documentMode"in document&&(ed=document.documentMode);var T7=ao&&"TextEvent"in window&&!ed,uB=ao&&(!IC||ed&&8<ed&&11>=ed),AP=" ",LP=!1;function cB(t,e){switch(t){case"keyup":return w7.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hB(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var uc=!1;function C7(t,e){switch(t){case"compositionend":return hB(e);case"keypress":return e.which!==32?null:(LP=!0,AP);case"textInput":return t=e.data,t===AP&&LP?null:t;default:return null}}function M7(t,e){if(uc)return t==="compositionend"||!IC&&cB(t,e)?(t=lB(),rm=PC=Fo=null,uc=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return uB&&e.locale!=="ko"?null:e.data;default:return null}}var A7={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function PP(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!A7[t.type]:e==="textarea"}function fB(t,e,r,n){Hz(n),e=jm(e,"onChange"),0<e.length&&(r=new kC("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var td=null,Dd=null;function L7(t){wB(t,0)}function _0(t){var e=fc(t);if(Oz(e))return t}function P7(t,e){if(t==="change")return e}var dB=!1;if(ao){var ux;if(ao){var cx="oninput"in document;if(!cx){var kP=document.createElement("div");kP.setAttribute("oninput","return;"),cx=typeof kP.oninput=="function"}ux=cx}else ux=!1;dB=ux&&(!document.documentMode||9<document.documentMode)}function DP(){td&&(td.detachEvent("onpropertychange",vB),Dd=td=null)}function vB(t){if(t.propertyName==="value"&&_0(Dd)){var e=[];fB(e,Dd,t,TC(t)),$z(L7,e)}}function k7(t,e,r){t==="focusin"?(DP(),td=e,Dd=r,td.attachEvent("onpropertychange",vB)):t==="focusout"&&DP()}function D7(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return _0(Dd)}function I7(t,e){if(t==="click")return _0(e)}function E7(t,e){if(t==="input"||t==="change")return _0(e)}function N7(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Oi=typeof Object.is=="function"?Object.is:N7;function Id(t,e){if(Oi(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!nb.call(e,i)||!Oi(t[i],e[i]))return!1}return!0}function IP(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function EP(t,e){var r=IP(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=IP(r)}}function pB(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?pB(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function gB(){for(var t=window,e=Im();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Im(t.document)}return e}function EC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function R7(t){var e=gB(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&pB(r.ownerDocument.documentElement,r)){if(n!==null&&EC(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!t.extend&&a>n&&(i=n,n=a,a=i),i=EP(r,a);var o=EP(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),a>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var O7=ao&&"documentMode"in document&&11>=document.documentMode,cc=null,bb=null,rd=null,wb=!1;function NP(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;wb||cc==null||cc!==Im(n)||(n=cc,"selectionStart"in n&&EC(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),rd&&Id(rd,n)||(rd=n,n=jm(bb,"onSelect"),0<n.length&&(e=new kC("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=cc)))}function Lp(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var hc={animationend:Lp("Animation","AnimationEnd"),animationiteration:Lp("Animation","AnimationIteration"),animationstart:Lp("Animation","AnimationStart"),transitionend:Lp("Transition","TransitionEnd")},hx={},mB={};ao&&(mB=document.createElement("div").style,"AnimationEvent"in window||(delete hc.animationend.animation,delete hc.animationiteration.animation,delete hc.animationstart.animation),"TransitionEvent"in window||delete hc.transitionend.transition);function x0(t){if(hx[t])return hx[t];if(!hc[t])return t;var e=hc[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in mB)return hx[t]=e[r];return t}var yB=x0("animationend"),_B=x0("animationiteration"),xB=x0("animationstart"),SB=x0("transitionend"),bB=new Map,RP="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ts(t,e){bB.set(t,e),iu(e,[t])}for(var fx=0;fx<RP.length;fx++){var dx=RP[fx],z7=dx.toLowerCase(),B7=dx[0].toUpperCase()+dx.slice(1);Ts(z7,"on"+B7)}Ts(yB,"onAnimationEnd");Ts(_B,"onAnimationIteration");Ts(xB,"onAnimationStart");Ts("dblclick","onDoubleClick");Ts("focusin","onFocus");Ts("focusout","onBlur");Ts(SB,"onTransitionEnd");jc("onMouseEnter",["mouseout","mouseover"]);jc("onMouseLeave",["mouseout","mouseover"]);jc("onPointerEnter",["pointerout","pointerover"]);jc("onPointerLeave",["pointerout","pointerover"]);iu("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));iu("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));iu("onBeforeInput",["compositionend","keypress","textInput","paste"]);iu("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));iu("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));iu("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),j7=new Set("cancel close invalid load scroll toggle".split(" ").concat(Bf));function OP(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,zU(n,e,void 0,t),t.currentTarget=null}function wB(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;e:{var a=void 0;if(e)for(var o=n.length-1;0<=o;o--){var s=n[o],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break e;OP(i,s,u),a=l}else for(o=0;o<n.length;o++){if(s=n[o],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break e;OP(i,s,u),a=l}}}if(Nm)throw t=yb,Nm=!1,yb=null,t}function At(t,e){var r=e[Lb];r===void 0&&(r=e[Lb]=new Set);var n=t+"__bubble";r.has(n)||(TB(e,t,2,!1),r.add(n))}function vx(t,e,r){var n=0;e&&(n|=4),TB(r,t,n,e)}var Pp="_reactListening"+Math.random().toString(36).slice(2);function Ed(t){if(!t[Pp]){t[Pp]=!0,Dz.forEach(function(r){r!=="selectionchange"&&(j7.has(r)||vx(r,!1,t),vx(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Pp]||(e[Pp]=!0,vx("selectionchange",!1,e))}}function TB(t,e,r,n){switch(sB(e)){case 1:var i=JU;break;case 4:i=e7;break;default:i=LC}r=i.bind(null,e,r,t),i=void 0,!mb||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),n?i!==void 0?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):i!==void 0?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function px(t,e,r,n,i){var a=n;if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var s=n.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;s!==null;){if(o=bl(s),o===null)return;if(l=o.tag,l===5||l===6){n=a=o;continue e}s=s.parentNode}}n=n.return}$z(function(){var u=a,c=TC(r),h=[];e:{var f=bB.get(t);if(f!==void 0){var d=kC,p=t;switch(t){case"keypress":if(nm(r)===0)break e;case"keydown":case"keyup":d=p7;break;case"focusin":p="focus",d=lx;break;case"focusout":p="blur",d=lx;break;case"beforeblur":case"afterblur":d=lx;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=TP;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=n7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=y7;break;case yB:case _B:case xB:d=o7;break;case SB:d=x7;break;case"scroll":d=t7;break;case"wheel":d=b7;break;case"copy":case"cut":case"paste":d=l7;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=MP}var g=(e&4)!==0,m=!g&&t==="scroll",y=g?f!==null?f+"Capture":null:f;g=[];for(var _=u,S;_!==null;){S=_;var T=S.stateNode;if(S.tag===5&&T!==null&&(S=T,y!==null&&(T=Ad(_,y),T!=null&&g.push(Nd(_,T,S)))),m)break;_=_.return}0<g.length&&(f=new d(f,p,null,r,c),h.push({event:f,listeners:g}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",d=t==="mouseout"||t==="pointerout",f&&r!==pb&&(p=r.relatedTarget||r.fromElement)&&(bl(p)||p[oo]))break e;if((d||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,d?(p=r.relatedTarget||r.toElement,d=u,p=p?bl(p):null,p!==null&&(m=au(p),p!==m||p.tag!==5&&p.tag!==6)&&(p=null)):(d=null,p=u),d!==p)){if(g=TP,T="onMouseLeave",y="onMouseEnter",_="mouse",(t==="pointerout"||t==="pointerover")&&(g=MP,T="onPointerLeave",y="onPointerEnter",_="pointer"),m=d==null?f:fc(d),S=p==null?f:fc(p),f=new g(T,_+"leave",d,r,c),f.target=m,f.relatedTarget=S,T=null,bl(c)===u&&(g=new g(y,_+"enter",p,r,c),g.target=S,g.relatedTarget=m,T=g),m=T,d&&p)t:{for(g=d,y=p,_=0,S=g;S;S=Lu(S))_++;for(S=0,T=y;T;T=Lu(T))S++;for(;0<_-S;)g=Lu(g),_--;for(;0<S-_;)y=Lu(y),S--;for(;_--;){if(g===y||y!==null&&g===y.alternate)break t;g=Lu(g),y=Lu(y)}g=null}else g=null;d!==null&&zP(h,f,d,g,!1),p!==null&&m!==null&&zP(h,m,p,g,!0)}}e:{if(f=u?fc(u):window,d=f.nodeName&&f.nodeName.toLowerCase(),d==="select"||d==="input"&&f.type==="file")var C=P7;else if(PP(f))if(dB)C=E7;else{C=D7;var M=k7}else(d=f.nodeName)&&d.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=I7);if(C&&(C=C(t,u))){fB(h,C,r,c);break e}M&&M(t,f,u),t==="focusout"&&(M=f._wrapperState)&&M.controlled&&f.type==="number"&&cb(f,"number",f.value)}switch(M=u?fc(u):window,t){case"focusin":(PP(M)||M.contentEditable==="true")&&(cc=M,bb=u,rd=null);break;case"focusout":rd=bb=cc=null;break;case"mousedown":wb=!0;break;case"contextmenu":case"mouseup":case"dragend":wb=!1,NP(h,r,c);break;case"selectionchange":if(O7)break;case"keydown":case"keyup":NP(h,r,c)}var A;if(IC)e:{switch(t){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else uc?cB(t,r)&&(k="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(k="onCompositionStart");k&&(uB&&r.locale!=="ko"&&(uc||k!=="onCompositionStart"?k==="onCompositionEnd"&&uc&&(A=lB()):(Fo=c,PC="value"in Fo?Fo.value:Fo.textContent,uc=!0)),M=jm(u,k),0<M.length&&(k=new CP(k,t,null,r,c),h.push({event:k,listeners:M}),A?k.data=A:(A=hB(r),A!==null&&(k.data=A)))),(A=T7?C7(t,r):M7(t,r))&&(u=jm(u,"onBeforeInput"),0<u.length&&(c=new CP("onBeforeInput","beforeinput",null,r,c),h.push({event:c,listeners:u}),c.data=A))}wB(h,e)})}function Nd(t,e,r){return{instance:t,listener:e,currentTarget:r}}function jm(t,e){for(var r=e+"Capture",n=[];t!==null;){var i=t,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=Ad(t,r),a!=null&&n.unshift(Nd(t,a,i)),a=Ad(t,e),a!=null&&n.push(Nd(t,a,i))),t=t.return}return n}function Lu(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function zP(t,e,r,n,i){for(var a=e._reactName,o=[];r!==null&&r!==n;){var s=r,l=s.alternate,u=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&u!==null&&(s=u,i?(l=Ad(r,a),l!=null&&o.unshift(Nd(r,l,s))):i||(l=Ad(r,a),l!=null&&o.push(Nd(r,l,s)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}var V7=/\r\n?/g,F7=/\u0000|\uFFFD/g;function BP(t){return(typeof t=="string"?t:""+t).replace(V7,`
|
||
`).replace(F7,"")}function kp(t,e,r){if(e=BP(e),BP(t)!==e&&r)throw Error(ce(425))}function Vm(){}var Tb=null,Cb=null;function Mb(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Ab=typeof setTimeout=="function"?setTimeout:void 0,G7=typeof clearTimeout=="function"?clearTimeout:void 0,jP=typeof Promise=="function"?Promise:void 0,H7=typeof queueMicrotask=="function"?queueMicrotask:typeof jP<"u"?function(t){return jP.resolve(null).then(t).catch(W7)}:Ab;function W7(t){setTimeout(function(){throw t})}function gx(t,e){var r=e,n=0;do{var i=r.nextSibling;if(t.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){t.removeChild(i),kd(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);kd(e)}function es(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function VP(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var fh=Math.random().toString(36).slice(2),oa="__reactFiber$"+fh,Rd="__reactProps$"+fh,oo="__reactContainer$"+fh,Lb="__reactEvents$"+fh,U7="__reactListeners$"+fh,Z7="__reactHandles$"+fh;function bl(t){var e=t[oa];if(e)return e;for(var r=t.parentNode;r;){if(e=r[oo]||r[oa]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=VP(t);t!==null;){if(r=t[oa])return r;t=VP(t)}return e}t=r,r=t.parentNode}return null}function Lv(t){return t=t[oa]||t[oo],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function fc(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(ce(33))}function S0(t){return t[Rd]||null}var Pb=[],dc=-1;function Cs(t){return{current:t}}function Lt(t){0>dc||(t.current=Pb[dc],Pb[dc]=null,dc--)}function Mt(t,e){dc++,Pb[dc]=t.current,t.current=e}var gs={},Xr=Cs(gs),yn=Cs(!1),Gl=gs;function Vc(t,e){var r=t.type.contextTypes;if(!r)return gs;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=e[a];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function _n(t){return t=t.childContextTypes,t!=null}function Fm(){Lt(yn),Lt(Xr)}function FP(t,e,r){if(Xr.current!==gs)throw Error(ce(168));Mt(Xr,e),Mt(yn,r)}function CB(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(ce(108,kU(t)||"Unknown",i));return zt({},r,n)}function Gm(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||gs,Gl=Xr.current,Mt(Xr,t),Mt(yn,yn.current),!0}function GP(t,e,r){var n=t.stateNode;if(!n)throw Error(ce(169));r?(t=CB(t,e,Gl),n.__reactInternalMemoizedMergedChildContext=t,Lt(yn),Lt(Xr),Mt(Xr,t)):Lt(yn),Mt(yn,r)}var Ha=null,b0=!1,mx=!1;function MB(t){Ha===null?Ha=[t]:Ha.push(t)}function $7(t){b0=!0,MB(t)}function Ms(){if(!mx&&Ha!==null){mx=!0;var t=0,e=xt;try{var r=Ha;for(xt=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}Ha=null,b0=!1}catch(i){throw Ha!==null&&(Ha=Ha.slice(t+1)),Kz(CC,Ms),i}finally{xt=e,mx=!1}}return null}var vc=[],pc=0,Hm=null,Wm=0,Qn=[],Jn=0,Hl=null,Ua=1,Za="";function cl(t,e){vc[pc++]=Wm,vc[pc++]=Hm,Hm=t,Wm=e}function AB(t,e,r){Qn[Jn++]=Ua,Qn[Jn++]=Za,Qn[Jn++]=Hl,Hl=t;var n=Ua;t=Za;var i=32-ki(n)-1;n&=~(1<<i),r+=1;var a=32-ki(e)+i;if(30<a){var o=i-i%5;a=(n&(1<<o)-1).toString(32),n>>=o,i-=o,Ua=1<<32-ki(e)+i|r<<i|n,Za=a+t}else Ua=1<<a|r<<i|n,Za=t}function NC(t){t.return!==null&&(cl(t,1),AB(t,1,0))}function RC(t){for(;t===Hm;)Hm=vc[--pc],vc[pc]=null,Wm=vc[--pc],vc[pc]=null;for(;t===Hl;)Hl=Qn[--Jn],Qn[Jn]=null,Za=Qn[--Jn],Qn[Jn]=null,Ua=Qn[--Jn],Qn[Jn]=null}var Nn=null,Pn=null,Pt=!1,Ai=null;function LB(t,e){var r=ni(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function HP(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Nn=t,Pn=es(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Nn=t,Pn=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=Hl!==null?{id:Ua,overflow:Za}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=ni(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,Nn=t,Pn=null,!0):!1;default:return!1}}function kb(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Db(t){if(Pt){var e=Pn;if(e){var r=e;if(!HP(t,e)){if(kb(t))throw Error(ce(418));e=es(r.nextSibling);var n=Nn;e&&HP(t,e)?LB(n,r):(t.flags=t.flags&-4097|2,Pt=!1,Nn=t)}}else{if(kb(t))throw Error(ce(418));t.flags=t.flags&-4097|2,Pt=!1,Nn=t}}}function WP(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Nn=t}function Dp(t){if(t!==Nn)return!1;if(!Pt)return WP(t),Pt=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Mb(t.type,t.memoizedProps)),e&&(e=Pn)){if(kb(t))throw PB(),Error(ce(418));for(;e;)LB(t,e),e=es(e.nextSibling)}if(WP(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(ce(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Pn=es(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Pn=null}}else Pn=Nn?es(t.stateNode.nextSibling):null;return!0}function PB(){for(var t=Pn;t;)t=es(t.nextSibling)}function Fc(){Pn=Nn=null,Pt=!1}function OC(t){Ai===null?Ai=[t]:Ai.push(t)}var Y7=yo.ReactCurrentBatchConfig;function Jh(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(ce(309));var n=r.stateNode}if(!n)throw Error(ce(147,t));var i=n,a=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===a?e.ref:(e=function(o){var s=i.refs;o===null?delete s[a]:s[a]=o},e._stringRef=a,e)}if(typeof t!="string")throw Error(ce(284));if(!r._owner)throw Error(ce(290,t))}return t}function Ip(t,e){throw t=Object.prototype.toString.call(e),Error(ce(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function UP(t){var e=t._init;return e(t._payload)}function kB(t){function e(y,_){if(t){var S=y.deletions;S===null?(y.deletions=[_],y.flags|=16):S.push(_)}}function r(y,_){if(!t)return null;for(;_!==null;)e(y,_),_=_.sibling;return null}function n(y,_){for(y=new Map;_!==null;)_.key!==null?y.set(_.key,_):y.set(_.index,_),_=_.sibling;return y}function i(y,_){return y=is(y,_),y.index=0,y.sibling=null,y}function a(y,_,S){return y.index=S,t?(S=y.alternate,S!==null?(S=S.index,S<_?(y.flags|=2,_):S):(y.flags|=2,_)):(y.flags|=1048576,_)}function o(y){return t&&y.alternate===null&&(y.flags|=2),y}function s(y,_,S,T){return _===null||_.tag!==6?(_=Cx(S,y.mode,T),_.return=y,_):(_=i(_,S),_.return=y,_)}function l(y,_,S,T){var C=S.type;return C===lc?c(y,_,S.props.children,T,S.key):_!==null&&(_.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ro&&UP(C)===_.type)?(T=i(_,S.props),T.ref=Jh(y,_,S),T.return=y,T):(T=cm(S.type,S.key,S.props,null,y.mode,T),T.ref=Jh(y,_,S),T.return=y,T)}function u(y,_,S,T){return _===null||_.tag!==4||_.stateNode.containerInfo!==S.containerInfo||_.stateNode.implementation!==S.implementation?(_=Mx(S,y.mode,T),_.return=y,_):(_=i(_,S.children||[]),_.return=y,_)}function c(y,_,S,T,C){return _===null||_.tag!==7?(_=El(S,y.mode,T,C),_.return=y,_):(_=i(_,S),_.return=y,_)}function h(y,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return _=Cx(""+_,y.mode,S),_.return=y,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Sp:return S=cm(_.type,_.key,_.props,null,y.mode,S),S.ref=Jh(y,null,_),S.return=y,S;case sc:return _=Mx(_,y.mode,S),_.return=y,_;case Ro:var T=_._init;return h(y,T(_._payload),S)}if(Of(_)||Yh(_))return _=El(_,y.mode,S,null),_.return=y,_;Ip(y,_)}return null}function f(y,_,S,T){var C=_!==null?_.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return C!==null?null:s(y,_,""+S,T);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Sp:return S.key===C?l(y,_,S,T):null;case sc:return S.key===C?u(y,_,S,T):null;case Ro:return C=S._init,f(y,_,C(S._payload),T)}if(Of(S)||Yh(S))return C!==null?null:c(y,_,S,T,null);Ip(y,S)}return null}function d(y,_,S,T,C){if(typeof T=="string"&&T!==""||typeof T=="number")return y=y.get(S)||null,s(_,y,""+T,C);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Sp:return y=y.get(T.key===null?S:T.key)||null,l(_,y,T,C);case sc:return y=y.get(T.key===null?S:T.key)||null,u(_,y,T,C);case Ro:var M=T._init;return d(y,_,S,M(T._payload),C)}if(Of(T)||Yh(T))return y=y.get(S)||null,c(_,y,T,C,null);Ip(_,T)}return null}function p(y,_,S,T){for(var C=null,M=null,A=_,k=_=0,E=null;A!==null&&k<S.length;k++){A.index>k?(E=A,A=null):E=A.sibling;var D=f(y,A,S[k],T);if(D===null){A===null&&(A=E);break}t&&A&&D.alternate===null&&e(y,A),_=a(D,_,k),M===null?C=D:M.sibling=D,M=D,A=E}if(k===S.length)return r(y,A),Pt&&cl(y,k),C;if(A===null){for(;k<S.length;k++)A=h(y,S[k],T),A!==null&&(_=a(A,_,k),M===null?C=A:M.sibling=A,M=A);return Pt&&cl(y,k),C}for(A=n(y,A);k<S.length;k++)E=d(A,y,k,S[k],T),E!==null&&(t&&E.alternate!==null&&A.delete(E.key===null?k:E.key),_=a(E,_,k),M===null?C=E:M.sibling=E,M=E);return t&&A.forEach(function(I){return e(y,I)}),Pt&&cl(y,k),C}function g(y,_,S,T){var C=Yh(S);if(typeof C!="function")throw Error(ce(150));if(S=C.call(S),S==null)throw Error(ce(151));for(var M=C=null,A=_,k=_=0,E=null,D=S.next();A!==null&&!D.done;k++,D=S.next()){A.index>k?(E=A,A=null):E=A.sibling;var I=f(y,A,D.value,T);if(I===null){A===null&&(A=E);break}t&&A&&I.alternate===null&&e(y,A),_=a(I,_,k),M===null?C=I:M.sibling=I,M=I,A=E}if(D.done)return r(y,A),Pt&&cl(y,k),C;if(A===null){for(;!D.done;k++,D=S.next())D=h(y,D.value,T),D!==null&&(_=a(D,_,k),M===null?C=D:M.sibling=D,M=D);return Pt&&cl(y,k),C}for(A=n(y,A);!D.done;k++,D=S.next())D=d(A,y,k,D.value,T),D!==null&&(t&&D.alternate!==null&&A.delete(D.key===null?k:D.key),_=a(D,_,k),M===null?C=D:M.sibling=D,M=D);return t&&A.forEach(function(z){return e(y,z)}),Pt&&cl(y,k),C}function m(y,_,S,T){if(typeof S=="object"&&S!==null&&S.type===lc&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Sp:e:{for(var C=S.key,M=_;M!==null;){if(M.key===C){if(C=S.type,C===lc){if(M.tag===7){r(y,M.sibling),_=i(M,S.props.children),_.return=y,y=_;break e}}else if(M.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ro&&UP(C)===M.type){r(y,M.sibling),_=i(M,S.props),_.ref=Jh(y,M,S),_.return=y,y=_;break e}r(y,M);break}else e(y,M);M=M.sibling}S.type===lc?(_=El(S.props.children,y.mode,T,S.key),_.return=y,y=_):(T=cm(S.type,S.key,S.props,null,y.mode,T),T.ref=Jh(y,_,S),T.return=y,y=T)}return o(y);case sc:e:{for(M=S.key;_!==null;){if(_.key===M)if(_.tag===4&&_.stateNode.containerInfo===S.containerInfo&&_.stateNode.implementation===S.implementation){r(y,_.sibling),_=i(_,S.children||[]),_.return=y,y=_;break e}else{r(y,_);break}else e(y,_);_=_.sibling}_=Mx(S,y.mode,T),_.return=y,y=_}return o(y);case Ro:return M=S._init,m(y,_,M(S._payload),T)}if(Of(S))return p(y,_,S,T);if(Yh(S))return g(y,_,S,T);Ip(y,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,_!==null&&_.tag===6?(r(y,_.sibling),_=i(_,S),_.return=y,y=_):(r(y,_),_=Cx(S,y.mode,T),_.return=y,y=_),o(y)):r(y,_)}return m}var Gc=kB(!0),DB=kB(!1),Um=Cs(null),Zm=null,gc=null,zC=null;function BC(){zC=gc=Zm=null}function jC(t){var e=Um.current;Lt(Um),t._currentValue=e}function Ib(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function kc(t,e){Zm=t,zC=gc=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(mn=!0),t.firstContext=null)}function li(t){var e=t._currentValue;if(zC!==t)if(t={context:t,memoizedValue:e,next:null},gc===null){if(Zm===null)throw Error(ce(308));gc=t,Zm.dependencies={lanes:0,firstContext:t}}else gc=gc.next=t;return e}var wl=null;function VC(t){wl===null?wl=[t]:wl.push(t)}function IB(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,VC(e)):(r.next=i.next,i.next=r),e.interleaved=r,so(t,n)}function so(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var Oo=!1;function FC(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function EB(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Qa(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ts(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ft&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,so(t,r)}return i=n.interleaved,i===null?(e.next=e,VC(n)):(e.next=i.next,i.next=e),n.interleaved=e,so(t,r)}function im(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,MC(t,r)}}function ZP(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=e:a=a.next=e}else i=a=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function $m(t,e,r,n){var i=t.updateQueue;Oo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var h=i.baseState;o=0,c=u=l=null,s=a;do{var f=s.lane,d=s.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:d,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=t,g=s;switch(f=e,d=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){h=p.call(d,h,f);break e}h=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,f=typeof p=="function"?p.call(d,h,f):p,f==null)break e;h=zt({},h,f);break e;case 2:Oo=!0}}s.callback!==null&&s.lane!==0&&(t.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else d={eventTime:d,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=d,l=h):c=c.next=d,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=h),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else a===null&&(i.shared.lanes=0);Ul|=o,t.lanes=o,t.memoizedState=h}}function $P(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(ce(191,i));i.call(n)}}}var Pv={},ma=Cs(Pv),Od=Cs(Pv),zd=Cs(Pv);function Tl(t){if(t===Pv)throw Error(ce(174));return t}function GC(t,e){switch(Mt(zd,e),Mt(Od,t),Mt(ma,Pv),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:fb(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=fb(e,t)}Lt(ma),Mt(ma,e)}function Hc(){Lt(ma),Lt(Od),Lt(zd)}function NB(t){Tl(zd.current);var e=Tl(ma.current),r=fb(e,t.type);e!==r&&(Mt(Od,t),Mt(ma,r))}function HC(t){Od.current===t&&(Lt(ma),Lt(Od))}var Et=Cs(0);function Ym(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var yx=[];function WC(){for(var t=0;t<yx.length;t++)yx[t]._workInProgressVersionPrimary=null;yx.length=0}var am=yo.ReactCurrentDispatcher,_x=yo.ReactCurrentBatchConfig,Wl=0,Nt=null,lr=null,xr=null,Xm=!1,nd=!1,Bd=0,X7=0;function jr(){throw Error(ce(321))}function UC(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!Oi(t[r],e[r]))return!1;return!0}function ZC(t,e,r,n,i,a){if(Wl=a,Nt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,am.current=t===null||t.memoizedState===null?J7:e9,t=r(n,i),nd){a=0;do{if(nd=!1,Bd=0,25<=a)throw Error(ce(301));a+=1,xr=lr=null,e.updateQueue=null,am.current=t9,t=r(n,i)}while(nd)}if(am.current=qm,e=lr!==null&&lr.next!==null,Wl=0,xr=lr=Nt=null,Xm=!1,e)throw Error(ce(300));return t}function $C(){var t=Bd!==0;return Bd=0,t}function ia(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xr===null?Nt.memoizedState=xr=t:xr=xr.next=t,xr}function ui(){if(lr===null){var t=Nt.alternate;t=t!==null?t.memoizedState:null}else t=lr.next;var e=xr===null?Nt.memoizedState:xr.next;if(e!==null)xr=e,lr=t;else{if(t===null)throw Error(ce(310));lr=t,t={memoizedState:lr.memoizedState,baseState:lr.baseState,baseQueue:lr.baseQueue,queue:lr.queue,next:null},xr===null?Nt.memoizedState=xr=t:xr=xr.next=t}return xr}function jd(t,e){return typeof e=="function"?e(t):e}function xx(t){var e=ui(),r=e.queue;if(r===null)throw Error(ce(311));r.lastRenderedReducer=t;var n=lr,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,r.pending=null}if(i!==null){a=i.next,n=n.baseState;var s=o=null,l=null,u=a;do{var c=u.lane;if((Wl&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:t(n,u.action);else{var h={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=h,o=n):l=l.next=h,Nt.lanes|=c,Ul|=c}u=u.next}while(u!==null&&u!==a);l===null?o=n:l.next=s,Oi(n,e.memoizedState)||(mn=!0),e.memoizedState=n,e.baseState=o,e.baseQueue=l,r.lastRenderedState=n}if(t=r.interleaved,t!==null){i=t;do a=i.lane,Nt.lanes|=a,Ul|=a,i=i.next;while(i!==t)}else i===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function Sx(t){var e=ui(),r=e.queue;if(r===null)throw Error(ce(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,a=e.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do a=t(a,o.action),o=o.next;while(o!==i);Oi(a,e.memoizedState)||(mn=!0),e.memoizedState=a,e.baseQueue===null&&(e.baseState=a),r.lastRenderedState=a}return[a,n]}function RB(){}function OB(t,e){var r=Nt,n=ui(),i=e(),a=!Oi(n.memoizedState,i);if(a&&(n.memoizedState=i,mn=!0),n=n.queue,YC(jB.bind(null,r,n,t),[t]),n.getSnapshot!==e||a||xr!==null&&xr.memoizedState.tag&1){if(r.flags|=2048,Vd(9,BB.bind(null,r,n,i,e),void 0,null),wr===null)throw Error(ce(349));Wl&30||zB(r,e,i)}return i}function zB(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=Nt.updateQueue,e===null?(e={lastEffect:null,stores:null},Nt.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function BB(t,e,r,n){e.value=r,e.getSnapshot=n,VB(e)&&FB(t)}function jB(t,e,r){return r(function(){VB(e)&&FB(t)})}function VB(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Oi(t,r)}catch{return!0}}function FB(t){var e=so(t,1);e!==null&&Di(e,t,1,-1)}function YP(t){var e=ia();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:jd,lastRenderedState:t},e.queue=t,t=t.dispatch=Q7.bind(null,Nt,t),[e.memoizedState,t]}function Vd(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=Nt.updateQueue,e===null?(e={lastEffect:null,stores:null},Nt.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function GB(){return ui().memoizedState}function om(t,e,r,n){var i=ia();Nt.flags|=t,i.memoizedState=Vd(1|e,r,void 0,n===void 0?null:n)}function w0(t,e,r,n){var i=ui();n=n===void 0?null:n;var a=void 0;if(lr!==null){var o=lr.memoizedState;if(a=o.destroy,n!==null&&UC(n,o.deps)){i.memoizedState=Vd(e,r,a,n);return}}Nt.flags|=t,i.memoizedState=Vd(1|e,r,a,n)}function XP(t,e){return om(8390656,8,t,e)}function YC(t,e){return w0(2048,8,t,e)}function HB(t,e){return w0(4,2,t,e)}function WB(t,e){return w0(4,4,t,e)}function UB(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function ZB(t,e,r){return r=r!=null?r.concat([t]):null,w0(4,4,UB.bind(null,e,t),r)}function XC(){}function $B(t,e){var r=ui();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&UC(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function YB(t,e){var r=ui();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&UC(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function XB(t,e,r){return Wl&21?(Oi(r,e)||(r=eB(),Nt.lanes|=r,Ul|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,mn=!0),t.memoizedState=r)}function q7(t,e){var r=xt;xt=r!==0&&4>r?r:4,t(!0);var n=_x.transition;_x.transition={};try{t(!1),e()}finally{xt=r,_x.transition=n}}function qB(){return ui().memoizedState}function K7(t,e,r){var n=ns(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},KB(t))QB(e,r);else if(r=IB(t,e,r,n),r!==null){var i=an();Di(r,t,n,i),JB(r,e,n)}}function Q7(t,e,r){var n=ns(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(KB(t))QB(e,i);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var o=e.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,Oi(s,o)){var l=e.interleaved;l===null?(i.next=i,VC(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=IB(t,e,i,n),r!==null&&(i=an(),Di(r,t,n,i),JB(r,e,n))}}function KB(t){var e=t.alternate;return t===Nt||e!==null&&e===Nt}function QB(t,e){nd=Xm=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function JB(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,MC(t,r)}}var qm={readContext:li,useCallback:jr,useContext:jr,useEffect:jr,useImperativeHandle:jr,useInsertionEffect:jr,useLayoutEffect:jr,useMemo:jr,useReducer:jr,useRef:jr,useState:jr,useDebugValue:jr,useDeferredValue:jr,useTransition:jr,useMutableSource:jr,useSyncExternalStore:jr,useId:jr,unstable_isNewReconciler:!1},J7={readContext:li,useCallback:function(t,e){return ia().memoizedState=[t,e===void 0?null:e],t},useContext:li,useEffect:XP,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,om(4194308,4,UB.bind(null,e,t),r)},useLayoutEffect:function(t,e){return om(4194308,4,t,e)},useInsertionEffect:function(t,e){return om(4,2,t,e)},useMemo:function(t,e){var r=ia();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ia();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=K7.bind(null,Nt,t),[n.memoizedState,t]},useRef:function(t){var e=ia();return t={current:t},e.memoizedState=t},useState:YP,useDebugValue:XC,useDeferredValue:function(t){return ia().memoizedState=t},useTransition:function(){var t=YP(!1),e=t[0];return t=q7.bind(null,t[1]),ia().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Nt,i=ia();if(Pt){if(r===void 0)throw Error(ce(407));r=r()}else{if(r=e(),wr===null)throw Error(ce(349));Wl&30||zB(n,e,r)}i.memoizedState=r;var a={value:r,getSnapshot:e};return i.queue=a,XP(jB.bind(null,n,a,t),[t]),n.flags|=2048,Vd(9,BB.bind(null,n,a,r,e),void 0,null),r},useId:function(){var t=ia(),e=wr.identifierPrefix;if(Pt){var r=Za,n=Ua;r=(n&~(1<<32-ki(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Bd++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=X7++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},e9={readContext:li,useCallback:$B,useContext:li,useEffect:YC,useImperativeHandle:ZB,useInsertionEffect:HB,useLayoutEffect:WB,useMemo:YB,useReducer:xx,useRef:GB,useState:function(){return xx(jd)},useDebugValue:XC,useDeferredValue:function(t){var e=ui();return XB(e,lr.memoizedState,t)},useTransition:function(){var t=xx(jd)[0],e=ui().memoizedState;return[t,e]},useMutableSource:RB,useSyncExternalStore:OB,useId:qB,unstable_isNewReconciler:!1},t9={readContext:li,useCallback:$B,useContext:li,useEffect:YC,useImperativeHandle:ZB,useInsertionEffect:HB,useLayoutEffect:WB,useMemo:YB,useReducer:Sx,useRef:GB,useState:function(){return Sx(jd)},useDebugValue:XC,useDeferredValue:function(t){var e=ui();return lr===null?e.memoizedState=t:XB(e,lr.memoizedState,t)},useTransition:function(){var t=Sx(jd)[0],e=ui().memoizedState;return[t,e]},useMutableSource:RB,useSyncExternalStore:OB,useId:qB,unstable_isNewReconciler:!1};function Ti(t,e){if(t&&t.defaultProps){e=zt({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function Eb(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:zt({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var T0={isMounted:function(t){return(t=t._reactInternals)?au(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=an(),i=ns(t),a=Qa(n,i);a.payload=e,r!=null&&(a.callback=r),e=ts(t,a,i),e!==null&&(Di(e,t,i,n),im(e,t,i))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=an(),i=ns(t),a=Qa(n,i);a.tag=1,a.payload=e,r!=null&&(a.callback=r),e=ts(t,a,i),e!==null&&(Di(e,t,i,n),im(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=an(),n=ns(t),i=Qa(r,n);i.tag=2,e!=null&&(i.callback=e),e=ts(t,i,n),e!==null&&(Di(e,t,n,r),im(e,t,n))}};function qP(t,e,r,n,i,a,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,a,o):e.prototype&&e.prototype.isPureReactComponent?!Id(r,n)||!Id(i,a):!0}function e3(t,e,r){var n=!1,i=gs,a=e.contextType;return typeof a=="object"&&a!==null?a=li(a):(i=_n(e)?Gl:Xr.current,n=e.contextTypes,a=(n=n!=null)?Vc(t,i):gs),e=new e(r,a),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=T0,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=a),e}function KP(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&T0.enqueueReplaceState(e,e.state,null)}function Nb(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs={},FC(t);var a=e.contextType;typeof a=="object"&&a!==null?i.context=li(a):(a=_n(e)?Gl:Xr.current,i.context=Vc(t,a)),i.state=t.memoizedState,a=e.getDerivedStateFromProps,typeof a=="function"&&(Eb(t,e,a,r),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&T0.enqueueReplaceState(i,i.state,null),$m(t,r,i,n),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function Wc(t,e){try{var r="",n=e;do r+=PU(n),n=n.return;while(n);var i=r}catch(a){i=`
|
||
Error generating stack: `+a.message+`
|
||
`+a.stack}return{value:t,source:e,stack:i,digest:null}}function bx(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Rb(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var r9=typeof WeakMap=="function"?WeakMap:Map;function t3(t,e,r){r=Qa(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Qm||(Qm=!0,Ub=n),Rb(t,e)},r}function r3(t,e,r){r=Qa(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){Rb(t,e)}}var a=t.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Rb(t,e),typeof n!="function"&&(rs===null?rs=new Set([this]):rs.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function QP(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new r9;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=g9.bind(null,t,e,r),e.then(t,t))}function JP(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function ek(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Qa(-1,1),e.tag=2,ts(r,e,1))),r.lanes|=1),t)}var n9=yo.ReactCurrentOwner,mn=!1;function en(t,e,r,n){e.child=t===null?DB(e,null,r,n):Gc(e,t.child,r,n)}function tk(t,e,r,n,i){r=r.render;var a=e.ref;return kc(e,i),n=ZC(t,e,r,n,a,i),r=$C(),t!==null&&!mn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,lo(t,e,i)):(Pt&&r&&NC(e),e.flags|=1,en(t,e,n,i),e.child)}function rk(t,e,r,n,i){if(t===null){var a=r.type;return typeof a=="function"&&!n2(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=a,n3(t,e,a,n,i)):(t=cm(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(a=t.child,!(t.lanes&i)){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:Id,r(o,n)&&t.ref===e.ref)return lo(t,e,i)}return e.flags|=1,t=is(a,n),t.ref=e.ref,t.return=e,e.child=t}function n3(t,e,r,n,i){if(t!==null){var a=t.memoizedProps;if(Id(a,n)&&t.ref===e.ref)if(mn=!1,e.pendingProps=n=a,(t.lanes&i)!==0)t.flags&131072&&(mn=!0);else return e.lanes=t.lanes,lo(t,e,i)}return Ob(t,e,r,n,i)}function i3(t,e,r){var n=e.pendingProps,i=n.children,a=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Mt(yc,Tn),Tn|=r;else{if(!(r&1073741824))return t=a!==null?a.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Mt(yc,Tn),Tn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Mt(yc,Tn),Tn|=n}else a!==null?(n=a.baseLanes|r,e.memoizedState=null):n=r,Mt(yc,Tn),Tn|=n;return en(t,e,i,r),e.child}function a3(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function Ob(t,e,r,n,i){var a=_n(r)?Gl:Xr.current;return a=Vc(e,a),kc(e,i),r=ZC(t,e,r,n,a,i),n=$C(),t!==null&&!mn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,lo(t,e,i)):(Pt&&n&&NC(e),e.flags|=1,en(t,e,r,i),e.child)}function nk(t,e,r,n,i){if(_n(r)){var a=!0;Gm(e)}else a=!1;if(kc(e,i),e.stateNode===null)sm(t,e),e3(e,r,n),Nb(e,r,n,i),n=!0;else if(t===null){var o=e.stateNode,s=e.memoizedProps;o.props=s;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=li(u):(u=_n(r)?Gl:Xr.current,u=Vc(e,u));var c=r.getDerivedStateFromProps,h=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||l!==u)&&KP(e,o,n,u),Oo=!1;var f=e.memoizedState;o.state=f,$m(e,n,o,i),l=e.memoizedState,s!==n||f!==l||yn.current||Oo?(typeof c=="function"&&(Eb(e,r,c,n),l=e.memoizedState),(s=Oo||qP(e,r,s,n,f,l,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=u,n=s):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,EB(t,e),s=e.memoizedProps,u=e.type===e.elementType?s:Ti(e.type,s),o.props=u,h=e.pendingProps,f=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=li(l):(l=_n(r)?Gl:Xr.current,l=Vc(e,l));var d=r.getDerivedStateFromProps;(c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==h||f!==l)&&KP(e,o,n,l),Oo=!1,f=e.memoizedState,o.state=f,$m(e,n,o,i);var p=e.memoizedState;s!==h||f!==p||yn.current||Oo?(typeof d=="function"&&(Eb(e,r,d,n),p=e.memoizedState),(u=Oo||qP(e,r,u,n,f,p,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,p,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=p),o.props=n,o.state=p,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||s===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),n=!1)}return zb(t,e,r,n,a,i)}function zb(t,e,r,n,i,a){a3(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return i&&GP(e,r,!1),lo(t,e,a);n=e.stateNode,n9.current=e;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=Gc(e,t.child,null,a),e.child=Gc(e,null,s,a)):en(t,e,s,a),e.memoizedState=n.state,i&&GP(e,r,!0),e.child}function o3(t){var e=t.stateNode;e.pendingContext?FP(t,e.pendingContext,e.pendingContext!==e.context):e.context&&FP(t,e.context,!1),GC(t,e.containerInfo)}function ik(t,e,r,n,i){return Fc(),OC(i),e.flags|=256,en(t,e,r,n),e.child}var Bb={dehydrated:null,treeContext:null,retryLane:0};function jb(t){return{baseLanes:t,cachePool:null,transitions:null}}function s3(t,e,r){var n=e.pendingProps,i=Et.current,a=!1,o=(e.flags&128)!==0,s;if((s=o)||(s=t!==null&&t.memoizedState===null?!1:(i&2)!==0),s?(a=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Mt(Et,i&1),t===null)return Db(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,a?(n=e.mode,a=e.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=A0(o,n,0,null),t=El(t,n,r,null),a.return=e,t.return=e,a.sibling=t,e.child=a,e.child.memoizedState=jb(r),e.memoizedState=Bb,t):qC(e,o));if(i=t.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return i9(t,e,o,n,s,i,r);if(a){a=n.fallback,o=e.mode,i=t.child,s=i.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=is(i,l),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=is(s,a):(a=El(a,o,r,null),a.flags|=2),a.return=e,n.return=e,n.sibling=a,e.child=n,n=a,a=e.child,o=t.child.memoizedState,o=o===null?jb(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=t.childLanes&~r,e.memoizedState=Bb,n}return a=t.child,t=a.sibling,n=is(a,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function qC(t,e){return e=A0({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Ep(t,e,r,n){return n!==null&&OC(n),Gc(e,t.child,null,r),t=qC(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function i9(t,e,r,n,i,a,o){if(r)return e.flags&256?(e.flags&=-257,n=bx(Error(ce(422))),Ep(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(a=n.fallback,i=e.mode,n=A0({mode:"visible",children:n.children},i,0,null),a=El(a,i,o,null),a.flags|=2,n.return=e,a.return=e,n.sibling=a,e.child=n,e.mode&1&&Gc(e,t.child,null,o),e.child.memoizedState=jb(o),e.memoizedState=Bb,a);if(!(e.mode&1))return Ep(t,e,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,a=Error(ce(419)),n=bx(a,n,void 0),Ep(t,e,o,n)}if(s=(o&t.childLanes)!==0,mn||s){if(n=wr,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,so(t,i),Di(n,t,i,-1))}return r2(),n=bx(Error(ce(421))),Ep(t,e,o,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=m9.bind(null,t),i._reactRetry=e,null):(t=a.treeContext,Pn=es(i.nextSibling),Nn=e,Pt=!0,Ai=null,t!==null&&(Qn[Jn++]=Ua,Qn[Jn++]=Za,Qn[Jn++]=Hl,Ua=t.id,Za=t.overflow,Hl=e),e=qC(e,n.children),e.flags|=4096,e)}function ak(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Ib(t.return,e,r)}function Tx(t,e,r,n,i){var a=t.memoizedState;a===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function l3(t,e,r){var n=e.pendingProps,i=n.revealOrder,a=n.tail;if(en(t,e,n.children,r),n=Et.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&ak(t,r,e);else if(t.tag===19)ak(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(Mt(Et,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&Ym(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),Tx(e,!1,i,r,a);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Ym(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}Tx(e,!0,r,null,a);break;case"together":Tx(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function sm(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function lo(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Ul|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ce(153));if(e.child!==null){for(t=e.child,r=is(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=is(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function a9(t,e,r){switch(e.tag){case 3:o3(e),Fc();break;case 5:NB(e);break;case 1:_n(e.type)&&Gm(e);break;case 4:GC(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;Mt(Um,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Mt(Et,Et.current&1),e.flags|=128,null):r&e.child.childLanes?s3(t,e,r):(Mt(Et,Et.current&1),t=lo(t,e,r),t!==null?t.sibling:null);Mt(Et,Et.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return l3(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Mt(Et,Et.current),n)break;return null;case 22:case 23:return e.lanes=0,i3(t,e,r)}return lo(t,e,r)}var u3,Vb,c3,h3;u3=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Vb=function(){};c3=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,Tl(ma.current);var a=null;switch(r){case"input":i=lb(t,i),n=lb(t,n),a=[];break;case"select":i=zt({},i,{value:void 0}),n=zt({},n,{value:void 0}),a=[];break;case"textarea":i=hb(t,i),n=hb(t,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Vm)}db(r,n);var o;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(o in s)s.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Cd.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var l=n[u];if(s=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(a||(a=[]),a.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Cd.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&At("scroll",t),a||s===l||(a=[])):(a=a||[]).push(u,l))}r&&(a=a||[]).push("style",r);var u=a;(e.updateQueue=u)&&(e.flags|=4)}};h3=function(t,e,r,n){r!==n&&(e.flags|=4)};function ef(t,e){if(!Pt)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function Vr(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function o9(t,e,r){var n=e.pendingProps;switch(RC(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vr(e),null;case 1:return _n(e.type)&&Fm(),Vr(e),null;case 3:return n=e.stateNode,Hc(),Lt(yn),Lt(Xr),WC(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Dp(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ai!==null&&(Yb(Ai),Ai=null))),Vb(t,e),Vr(e),null;case 5:HC(e);var i=Tl(zd.current);if(r=e.type,t!==null&&e.stateNode!=null)c3(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(ce(166));return Vr(e),null}if(t=Tl(ma.current),Dp(e)){n=e.stateNode,r=e.type;var a=e.memoizedProps;switch(n[oa]=e,n[Rd]=a,t=(e.mode&1)!==0,r){case"dialog":At("cancel",n),At("close",n);break;case"iframe":case"object":case"embed":At("load",n);break;case"video":case"audio":for(i=0;i<Bf.length;i++)At(Bf[i],n);break;case"source":At("error",n);break;case"img":case"image":case"link":At("error",n),At("load",n);break;case"details":At("toggle",n);break;case"input":vP(n,a),At("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},At("invalid",n);break;case"textarea":gP(n,a),At("invalid",n)}db(r,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var s=a[o];o==="children"?typeof s=="string"?n.textContent!==s&&(a.suppressHydrationWarning!==!0&&kp(n.textContent,s,t),i=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&kp(n.textContent,s,t),i=["children",""+s]):Cd.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&At("scroll",n)}switch(r){case"input":bp(n),pP(n,a,!0);break;case"textarea":bp(n),mP(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=Vm)}n=i,e.updateQueue=n,n!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=jz(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[oa]=e,t[Rd]=n,u3(t,e,!1,!1),e.stateNode=t;e:{switch(o=vb(r,n),r){case"dialog":At("cancel",t),At("close",t),i=n;break;case"iframe":case"object":case"embed":At("load",t),i=n;break;case"video":case"audio":for(i=0;i<Bf.length;i++)At(Bf[i],t);i=n;break;case"source":At("error",t),i=n;break;case"img":case"image":case"link":At("error",t),At("load",t),i=n;break;case"details":At("toggle",t),i=n;break;case"input":vP(t,n),i=lb(t,n),At("invalid",t);break;case"option":i=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=zt({},n,{value:void 0}),At("invalid",t);break;case"textarea":gP(t,n),i=hb(t,n),At("invalid",t);break;default:i=n}db(r,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?Gz(t,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Vz(t,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Md(t,l):typeof l=="number"&&Md(t,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Cd.hasOwnProperty(a)?l!=null&&a==="onScroll"&&At("scroll",t):l!=null&&xC(t,a,l,o))}switch(r){case"input":bp(t),pP(t,n,!1);break;case"textarea":bp(t),mP(t);break;case"option":n.value!=null&&t.setAttribute("value",""+ps(n.value));break;case"select":t.multiple=!!n.multiple,a=n.value,a!=null?Mc(t,!!n.multiple,a,!1):n.defaultValue!=null&&Mc(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=Vm)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Vr(e),null;case 6:if(t&&e.stateNode!=null)h3(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(ce(166));if(r=Tl(zd.current),Tl(ma.current),Dp(e)){if(n=e.stateNode,r=e.memoizedProps,n[oa]=e,(a=n.nodeValue!==r)&&(t=Nn,t!==null))switch(t.tag){case 3:kp(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&kp(n.nodeValue,r,(t.mode&1)!==0)}a&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[oa]=e,e.stateNode=n}return Vr(e),null;case 13:if(Lt(Et),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Pt&&Pn!==null&&e.mode&1&&!(e.flags&128))PB(),Fc(),e.flags|=98560,a=!1;else if(a=Dp(e),n!==null&&n.dehydrated!==null){if(t===null){if(!a)throw Error(ce(318));if(a=e.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(ce(317));a[oa]=e}else Fc(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Vr(e),a=!1}else Ai!==null&&(Yb(Ai),Ai=null),a=!0;if(!a)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||Et.current&1?cr===0&&(cr=3):r2())),e.updateQueue!==null&&(e.flags|=4),Vr(e),null);case 4:return Hc(),Vb(t,e),t===null&&Ed(e.stateNode.containerInfo),Vr(e),null;case 10:return jC(e.type._context),Vr(e),null;case 17:return _n(e.type)&&Fm(),Vr(e),null;case 19:if(Lt(Et),a=e.memoizedState,a===null)return Vr(e),null;if(n=(e.flags&128)!==0,o=a.rendering,o===null)if(n)ef(a,!1);else{if(cr!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Ym(t),o!==null){for(e.flags|=128,ef(a,!1),n=o.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)a=r,t=n,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=t,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,t=o.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return Mt(Et,Et.current&1|2),e.child}t=t.sibling}a.tail!==null&&Yt()>Uc&&(e.flags|=128,n=!0,ef(a,!1),e.lanes=4194304)}else{if(!n)if(t=Ym(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),ef(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Pt)return Vr(e),null}else 2*Yt()-a.renderingStartTime>Uc&&r!==1073741824&&(e.flags|=128,n=!0,ef(a,!1),e.lanes=4194304);a.isBackwards?(o.sibling=e.child,e.child=o):(r=a.last,r!==null?r.sibling=o:e.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Yt(),e.sibling=null,r=Et.current,Mt(Et,n?r&1|2:r&1),e):(Vr(e),null);case 22:case 23:return t2(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Tn&1073741824&&(Vr(e),e.subtreeFlags&6&&(e.flags|=8192)):Vr(e),null;case 24:return null;case 25:return null}throw Error(ce(156,e.tag))}function s9(t,e){switch(RC(e),e.tag){case 1:return _n(e.type)&&Fm(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Hc(),Lt(yn),Lt(Xr),WC(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return HC(e),null;case 13:if(Lt(Et),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ce(340));Fc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Lt(Et),null;case 4:return Hc(),null;case 10:return jC(e.type._context),null;case 22:case 23:return t2(),null;case 24:return null;default:return null}}var Np=!1,Ur=!1,l9=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function mc(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Vt(t,e,n)}else r.current=null}function Fb(t,e,r){try{r()}catch(n){Vt(t,e,n)}}var ok=!1;function u9(t,e){if(Tb=zm,t=gB(),EC(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,h=t,f=null;t:for(;;){for(var d;h!==r||i!==0&&h.nodeType!==3||(s=o+i),h!==a||n!==0&&h.nodeType!==3||(l=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(d=h.firstChild)!==null;)f=h,h=d;for(;;){if(h===t)break t;if(f===r&&++u===i&&(s=o),f===a&&++c===n&&(l=o),(d=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=d}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Cb={focusedElem:t,selectionRange:r},zm=!1,Pe=e;Pe!==null;)if(e=Pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Pe=t;else for(;Pe!==null;){e=Pe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,y=e.stateNode,_=y.getSnapshotBeforeUpdate(e.elementType===e.type?g:Ti(e.type,g),m);y.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(T){Vt(e,e.return,T)}if(t=e.sibling,t!==null){t.return=e.return,Pe=t;break}Pe=e.return}return p=ok,ok=!1,p}function id(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,a!==void 0&&Fb(e,r,a)}i=i.next}while(i!==n)}}function C0(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Gb(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function f3(t){var e=t.alternate;e!==null&&(t.alternate=null,f3(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[oa],delete e[Rd],delete e[Lb],delete e[U7],delete e[Z7])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function d3(t){return t.tag===5||t.tag===3||t.tag===4}function sk(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||d3(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Hb(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Vm));else if(n!==4&&(t=t.child,t!==null))for(Hb(t,e,r),t=t.sibling;t!==null;)Hb(t,e,r),t=t.sibling}function Wb(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Wb(t,e,r),t=t.sibling;t!==null;)Wb(t,e,r),t=t.sibling}var Ar=null,Mi=!1;function To(t,e,r){for(r=r.child;r!==null;)v3(t,e,r),r=r.sibling}function v3(t,e,r){if(ga&&typeof ga.onCommitFiberUnmount=="function")try{ga.onCommitFiberUnmount(m0,r)}catch{}switch(r.tag){case 5:Ur||mc(r,e);case 6:var n=Ar,i=Mi;Ar=null,To(t,e,r),Ar=n,Mi=i,Ar!==null&&(Mi?(t=Ar,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Ar.removeChild(r.stateNode));break;case 18:Ar!==null&&(Mi?(t=Ar,r=r.stateNode,t.nodeType===8?gx(t.parentNode,r):t.nodeType===1&&gx(t,r),kd(t)):gx(Ar,r.stateNode));break;case 4:n=Ar,i=Mi,Ar=r.stateNode.containerInfo,Mi=!0,To(t,e,r),Ar=n,Mi=i;break;case 0:case 11:case 14:case 15:if(!Ur&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Fb(r,e,o),i=i.next}while(i!==n)}To(t,e,r);break;case 1:if(!Ur&&(mc(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Vt(r,e,s)}To(t,e,r);break;case 21:To(t,e,r);break;case 22:r.mode&1?(Ur=(n=Ur)||r.memoizedState!==null,To(t,e,r),Ur=n):To(t,e,r);break;default:To(t,e,r)}}function lk(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new l9),e.forEach(function(n){var i=y9.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function _i(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var a=t,o=e,s=o;e:for(;s!==null;){switch(s.tag){case 5:Ar=s.stateNode,Mi=!1;break e;case 3:Ar=s.stateNode.containerInfo,Mi=!0;break e;case 4:Ar=s.stateNode.containerInfo,Mi=!0;break e}s=s.return}if(Ar===null)throw Error(ce(160));v3(a,o,i),Ar=null,Mi=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Vt(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)p3(e,t),e=e.sibling}function p3(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(_i(e,t),Yi(t),n&4){try{id(3,t,t.return),C0(3,t)}catch(g){Vt(t,t.return,g)}try{id(5,t,t.return)}catch(g){Vt(t,t.return,g)}}break;case 1:_i(e,t),Yi(t),n&512&&r!==null&&mc(r,r.return);break;case 5:if(_i(e,t),Yi(t),n&512&&r!==null&&mc(r,r.return),t.flags&32){var i=t.stateNode;try{Md(i,"")}catch(g){Vt(t,t.return,g)}}if(n&4&&(i=t.stateNode,i!=null)){var a=t.memoizedProps,o=r!==null?r.memoizedProps:a,s=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&zz(i,a),vb(s,o);var u=vb(s,a);for(o=0;o<l.length;o+=2){var c=l[o],h=l[o+1];c==="style"?Gz(i,h):c==="dangerouslySetInnerHTML"?Vz(i,h):c==="children"?Md(i,h):xC(i,c,h,u)}switch(s){case"input":ub(i,a);break;case"textarea":Bz(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var d=a.value;d!=null?Mc(i,!!a.multiple,d,!1):f!==!!a.multiple&&(a.defaultValue!=null?Mc(i,!!a.multiple,a.defaultValue,!0):Mc(i,!!a.multiple,a.multiple?[]:"",!1))}i[Rd]=a}catch(g){Vt(t,t.return,g)}}break;case 6:if(_i(e,t),Yi(t),n&4){if(t.stateNode===null)throw Error(ce(162));i=t.stateNode,a=t.memoizedProps;try{i.nodeValue=a}catch(g){Vt(t,t.return,g)}}break;case 3:if(_i(e,t),Yi(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{kd(e.containerInfo)}catch(g){Vt(t,t.return,g)}break;case 4:_i(e,t),Yi(t);break;case 13:_i(e,t),Yi(t),i=t.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(JC=Yt())),n&4&&lk(t);break;case 22:if(c=r!==null&&r.memoizedState!==null,t.mode&1?(Ur=(u=Ur)||c,_i(e,t),Ur=u):_i(e,t),Yi(t),n&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(Pe=t,c=t.child;c!==null;){for(h=Pe=c;Pe!==null;){switch(f=Pe,d=f.child,f.tag){case 0:case 11:case 14:case 15:id(4,f,f.return);break;case 1:mc(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){n=f,r=f.return;try{e=n,p.props=e.memoizedProps,p.state=e.memoizedState,p.componentWillUnmount()}catch(g){Vt(n,r,g)}}break;case 5:mc(f,f.return);break;case 22:if(f.memoizedState!==null){ck(h);continue}}d!==null?(d.return=f,Pe=d):ck(h)}c=c.sibling}e:for(c=null,h=t;;){if(h.tag===5){if(c===null){c=h;try{i=h.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=h.stateNode,l=h.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=Fz("display",o))}catch(g){Vt(t,t.return,g)}}}else if(h.tag===6){if(c===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(g){Vt(t,t.return,g)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===t)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;c===h&&(c=null),h=h.return}c===h&&(c=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:_i(e,t),Yi(t),n&4&&lk(t);break;case 21:break;default:_i(e,t),Yi(t)}}function Yi(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(d3(r)){var n=r;break e}r=r.return}throw Error(ce(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Md(i,""),n.flags&=-33);var a=sk(t);Wb(t,a,i);break;case 3:case 4:var o=n.stateNode.containerInfo,s=sk(t);Hb(t,s,o);break;default:throw Error(ce(161))}}catch(l){Vt(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function c9(t,e,r){Pe=t,g3(t)}function g3(t,e,r){for(var n=(t.mode&1)!==0;Pe!==null;){var i=Pe,a=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||Np;if(!o){var s=i.alternate,l=s!==null&&s.memoizedState!==null||Ur;s=Np;var u=Ur;if(Np=o,(Ur=l)&&!u)for(Pe=i;Pe!==null;)o=Pe,l=o.child,o.tag===22&&o.memoizedState!==null?hk(i):l!==null?(l.return=o,Pe=l):hk(i);for(;a!==null;)Pe=a,g3(a),a=a.sibling;Pe=i,Np=s,Ur=u}uk(t)}else i.subtreeFlags&8772&&a!==null?(a.return=i,Pe=a):uk(t)}}function uk(t){for(;Pe!==null;){var e=Pe;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ur||C0(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!Ur)if(r===null)n.componentDidMount();else{var i=e.elementType===e.type?r.memoizedProps:Ti(e.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=e.updateQueue;a!==null&&$P(e,a,n);break;case 3:var o=e.updateQueue;if(o!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}$P(e,o,r)}break;case 5:var s=e.stateNode;if(r===null&&e.flags&4){r=s;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var h=c.dehydrated;h!==null&&kd(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ce(163))}Ur||e.flags&512&&Gb(e)}catch(f){Vt(e,e.return,f)}}if(e===t){Pe=null;break}if(r=e.sibling,r!==null){r.return=e.return,Pe=r;break}Pe=e.return}}function ck(t){for(;Pe!==null;){var e=Pe;if(e===t){Pe=null;break}var r=e.sibling;if(r!==null){r.return=e.return,Pe=r;break}Pe=e.return}}function hk(t){for(;Pe!==null;){var e=Pe;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{C0(4,e)}catch(l){Vt(e,r,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var i=e.return;try{n.componentDidMount()}catch(l){Vt(e,i,l)}}var a=e.return;try{Gb(e)}catch(l){Vt(e,a,l)}break;case 5:var o=e.return;try{Gb(e)}catch(l){Vt(e,o,l)}}}catch(l){Vt(e,e.return,l)}if(e===t){Pe=null;break}var s=e.sibling;if(s!==null){s.return=e.return,Pe=s;break}Pe=e.return}}var h9=Math.ceil,Km=yo.ReactCurrentDispatcher,KC=yo.ReactCurrentOwner,ai=yo.ReactCurrentBatchConfig,ft=0,wr=null,tr=null,Dr=0,Tn=0,yc=Cs(0),cr=0,Fd=null,Ul=0,M0=0,QC=0,ad=null,dn=null,JC=0,Uc=1/0,Va=null,Qm=!1,Ub=null,rs=null,Rp=!1,Go=null,Jm=0,od=0,Zb=null,lm=-1,um=0;function an(){return ft&6?Yt():lm!==-1?lm:lm=Yt()}function ns(t){return t.mode&1?ft&2&&Dr!==0?Dr&-Dr:Y7.transition!==null?(um===0&&(um=eB()),um):(t=xt,t!==0||(t=window.event,t=t===void 0?16:sB(t.type)),t):1}function Di(t,e,r,n){if(50<od)throw od=0,Zb=null,Error(ce(185));Mv(t,r,n),(!(ft&2)||t!==wr)&&(t===wr&&(!(ft&2)&&(M0|=r),cr===4&&Vo(t,Dr)),xn(t,n),r===1&&ft===0&&!(e.mode&1)&&(Uc=Yt()+500,b0&&Ms()))}function xn(t,e){var r=t.callbackNode;YU(t,e);var n=Om(t,t===wr?Dr:0);if(n===0)r!==null&&xP(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&xP(r),e===1)t.tag===0?$7(fk.bind(null,t)):MB(fk.bind(null,t)),H7(function(){!(ft&6)&&Ms()}),r=null;else{switch(tB(n)){case 1:r=CC;break;case 4:r=Qz;break;case 16:r=Rm;break;case 536870912:r=Jz;break;default:r=Rm}r=T3(r,m3.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function m3(t,e){if(lm=-1,um=0,ft&6)throw Error(ce(327));var r=t.callbackNode;if(Dc()&&t.callbackNode!==r)return null;var n=Om(t,t===wr?Dr:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=ey(t,n);else{e=n;var i=ft;ft|=2;var a=_3();(wr!==t||Dr!==e)&&(Va=null,Uc=Yt()+500,Il(t,e));do try{v9();break}catch(s){y3(t,s)}while(!0);BC(),Km.current=a,ft=i,tr!==null?e=0:(wr=null,Dr=0,e=cr)}if(e!==0){if(e===2&&(i=_b(t),i!==0&&(n=i,e=$b(t,i))),e===1)throw r=Fd,Il(t,0),Vo(t,n),xn(t,Yt()),r;if(e===6)Vo(t,n);else{if(i=t.current.alternate,!(n&30)&&!f9(i)&&(e=ey(t,n),e===2&&(a=_b(t),a!==0&&(n=a,e=$b(t,a))),e===1))throw r=Fd,Il(t,0),Vo(t,n),xn(t,Yt()),r;switch(t.finishedWork=i,t.finishedLanes=n,e){case 0:case 1:throw Error(ce(345));case 2:hl(t,dn,Va);break;case 3:if(Vo(t,n),(n&130023424)===n&&(e=JC+500-Yt(),10<e)){if(Om(t,0)!==0)break;if(i=t.suspendedLanes,(i&n)!==n){an(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Ab(hl.bind(null,t,dn,Va),e);break}hl(t,dn,Va);break;case 4:if(Vo(t,n),(n&4194240)===n)break;for(e=t.eventTimes,i=-1;0<n;){var o=31-ki(n);a=1<<o,o=e[o],o>i&&(i=o),n&=~a}if(n=i,n=Yt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*h9(n/1960))-n,10<n){t.timeoutHandle=Ab(hl.bind(null,t,dn,Va),n);break}hl(t,dn,Va);break;case 5:hl(t,dn,Va);break;default:throw Error(ce(329))}}}return xn(t,Yt()),t.callbackNode===r?m3.bind(null,t):null}function $b(t,e){var r=ad;return t.current.memoizedState.isDehydrated&&(Il(t,e).flags|=256),t=ey(t,e),t!==2&&(e=dn,dn=r,e!==null&&Yb(e)),t}function Yb(t){dn===null?dn=t:dn.push.apply(dn,t)}function f9(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],a=i.getSnapshot;i=i.value;try{if(!Oi(a(),i))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Vo(t,e){for(e&=~QC,e&=~M0,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-ki(e),n=1<<r;t[r]=-1,e&=~n}}function fk(t){if(ft&6)throw Error(ce(327));Dc();var e=Om(t,0);if(!(e&1))return xn(t,Yt()),null;var r=ey(t,e);if(t.tag!==0&&r===2){var n=_b(t);n!==0&&(e=n,r=$b(t,n))}if(r===1)throw r=Fd,Il(t,0),Vo(t,e),xn(t,Yt()),r;if(r===6)throw Error(ce(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,hl(t,dn,Va),xn(t,Yt()),null}function e2(t,e){var r=ft;ft|=1;try{return t(e)}finally{ft=r,ft===0&&(Uc=Yt()+500,b0&&Ms())}}function Zl(t){Go!==null&&Go.tag===0&&!(ft&6)&&Dc();var e=ft;ft|=1;var r=ai.transition,n=xt;try{if(ai.transition=null,xt=1,t)return t()}finally{xt=n,ai.transition=r,ft=e,!(ft&6)&&Ms()}}function t2(){Tn=yc.current,Lt(yc)}function Il(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,G7(r)),tr!==null)for(r=tr.return;r!==null;){var n=r;switch(RC(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Fm();break;case 3:Hc(),Lt(yn),Lt(Xr),WC();break;case 5:HC(n);break;case 4:Hc();break;case 13:Lt(Et);break;case 19:Lt(Et);break;case 10:jC(n.type._context);break;case 22:case 23:t2()}r=r.return}if(wr=t,tr=t=is(t.current,null),Dr=Tn=e,cr=0,Fd=null,QC=M0=Ul=0,dn=ad=null,wl!==null){for(e=0;e<wl.length;e++)if(r=wl[e],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,a=r.pending;if(a!==null){var o=a.next;a.next=i,n.next=o}r.pending=n}wl=null}return t}function y3(t,e){do{var r=tr;try{if(BC(),am.current=qm,Xm){for(var n=Nt.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Xm=!1}if(Wl=0,xr=lr=Nt=null,nd=!1,Bd=0,KC.current=null,r===null||r.return===null){cr=1,Fd=e,tr=null;break}e:{var a=t,o=r.return,s=r,l=e;if(e=Dr,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=s,h=c.tag;if(!(c.mode&1)&&(h===0||h===11||h===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var d=JP(o);if(d!==null){d.flags&=-257,ek(d,o,s,a,e),d.mode&1&&QP(a,u,e),e=d,l=u;var p=e.updateQueue;if(p===null){var g=new Set;g.add(l),e.updateQueue=g}else p.add(l);break e}else{if(!(e&1)){QP(a,u,e),r2();break e}l=Error(ce(426))}}else if(Pt&&s.mode&1){var m=JP(o);if(m!==null){!(m.flags&65536)&&(m.flags|=256),ek(m,o,s,a,e),OC(Wc(l,s));break e}}a=l=Wc(l,s),cr!==4&&(cr=2),ad===null?ad=[a]:ad.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,e&=-e,a.lanes|=e;var y=t3(a,l,e);ZP(a,y);break e;case 1:s=l;var _=a.type,S=a.stateNode;if(!(a.flags&128)&&(typeof _.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(rs===null||!rs.has(S)))){a.flags|=65536,e&=-e,a.lanes|=e;var T=r3(a,s,e);ZP(a,T);break e}}a=a.return}while(a!==null)}S3(r)}catch(C){e=C,tr===r&&r!==null&&(tr=r=r.return);continue}break}while(!0)}function _3(){var t=Km.current;return Km.current=qm,t===null?qm:t}function r2(){(cr===0||cr===3||cr===2)&&(cr=4),wr===null||!(Ul&268435455)&&!(M0&268435455)||Vo(wr,Dr)}function ey(t,e){var r=ft;ft|=2;var n=_3();(wr!==t||Dr!==e)&&(Va=null,Il(t,e));do try{d9();break}catch(i){y3(t,i)}while(!0);if(BC(),ft=r,Km.current=n,tr!==null)throw Error(ce(261));return wr=null,Dr=0,cr}function d9(){for(;tr!==null;)x3(tr)}function v9(){for(;tr!==null&&!jU();)x3(tr)}function x3(t){var e=w3(t.alternate,t,Tn);t.memoizedProps=t.pendingProps,e===null?S3(t):tr=e,KC.current=null}function S3(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=s9(r,e),r!==null){r.flags&=32767,tr=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{cr=6,tr=null;return}}else if(r=o9(r,e,Tn),r!==null){tr=r;return}if(e=e.sibling,e!==null){tr=e;return}tr=e=t}while(e!==null);cr===0&&(cr=5)}function hl(t,e,r){var n=xt,i=ai.transition;try{ai.transition=null,xt=1,p9(t,e,r,n)}finally{ai.transition=i,xt=n}return null}function p9(t,e,r,n){do Dc();while(Go!==null);if(ft&6)throw Error(ce(327));r=t.finishedWork;var i=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(ce(177));t.callbackNode=null,t.callbackPriority=0;var a=r.lanes|r.childLanes;if(XU(t,a),t===wr&&(tr=wr=null,Dr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Rp||(Rp=!0,T3(Rm,function(){return Dc(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=ai.transition,ai.transition=null;var o=xt;xt=1;var s=ft;ft|=4,KC.current=null,u9(t,r),p3(r,t),R7(Cb),zm=!!Tb,Cb=Tb=null,t.current=r,c9(r),VU(),ft=s,xt=o,ai.transition=a}else t.current=r;if(Rp&&(Rp=!1,Go=t,Jm=i),a=t.pendingLanes,a===0&&(rs=null),HU(r.stateNode),xn(t,Yt()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)i=e[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(Qm)throw Qm=!1,t=Ub,Ub=null,t;return Jm&1&&t.tag!==0&&Dc(),a=t.pendingLanes,a&1?t===Zb?od++:(od=0,Zb=t):od=0,Ms(),null}function Dc(){if(Go!==null){var t=tB(Jm),e=ai.transition,r=xt;try{if(ai.transition=null,xt=16>t?16:t,Go===null)var n=!1;else{if(t=Go,Go=null,Jm=0,ft&6)throw Error(ce(331));var i=ft;for(ft|=4,Pe=t.current;Pe!==null;){var a=Pe,o=a.child;if(Pe.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(Pe=u;Pe!==null;){var c=Pe;switch(c.tag){case 0:case 11:case 15:id(8,c,a)}var h=c.child;if(h!==null)h.return=c,Pe=h;else for(;Pe!==null;){c=Pe;var f=c.sibling,d=c.return;if(f3(c),c===u){Pe=null;break}if(f!==null){f.return=d,Pe=f;break}Pe=d}}}var p=a.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var m=g.sibling;g.sibling=null,g=m}while(g!==null)}}Pe=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,Pe=o;else e:for(;Pe!==null;){if(a=Pe,a.flags&2048)switch(a.tag){case 0:case 11:case 15:id(9,a,a.return)}var y=a.sibling;if(y!==null){y.return=a.return,Pe=y;break e}Pe=a.return}}var _=t.current;for(Pe=_;Pe!==null;){o=Pe;var S=o.child;if(o.subtreeFlags&2064&&S!==null)S.return=o,Pe=S;else e:for(o=_;Pe!==null;){if(s=Pe,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:C0(9,s)}}catch(C){Vt(s,s.return,C)}if(s===o){Pe=null;break e}var T=s.sibling;if(T!==null){T.return=s.return,Pe=T;break e}Pe=s.return}}if(ft=i,Ms(),ga&&typeof ga.onPostCommitFiberRoot=="function")try{ga.onPostCommitFiberRoot(m0,t)}catch{}n=!0}return n}finally{xt=r,ai.transition=e}}return!1}function dk(t,e,r){e=Wc(r,e),e=t3(t,e,1),t=ts(t,e,1),e=an(),t!==null&&(Mv(t,1,e),xn(t,e))}function Vt(t,e,r){if(t.tag===3)dk(t,t,r);else for(;e!==null;){if(e.tag===3){dk(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(rs===null||!rs.has(n))){t=Wc(r,t),t=r3(e,t,1),e=ts(e,t,1),t=an(),e!==null&&(Mv(e,1,t),xn(e,t));break}}e=e.return}}function g9(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=an(),t.pingedLanes|=t.suspendedLanes&r,wr===t&&(Dr&r)===r&&(cr===4||cr===3&&(Dr&130023424)===Dr&&500>Yt()-JC?Il(t,0):QC|=r),xn(t,e)}function b3(t,e){e===0&&(t.mode&1?(e=Cp,Cp<<=1,!(Cp&130023424)&&(Cp=4194304)):e=1);var r=an();t=so(t,e),t!==null&&(Mv(t,e,r),xn(t,r))}function m9(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),b3(t,r)}function y9(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ce(314))}n!==null&&n.delete(e),b3(t,r)}var w3;w3=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||yn.current)mn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return mn=!1,a9(t,e,r);mn=!!(t.flags&131072)}else mn=!1,Pt&&e.flags&1048576&&AB(e,Wm,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;sm(t,e),t=e.pendingProps;var i=Vc(e,Xr.current);kc(e,r),i=ZC(null,e,n,t,i,r);var a=$C();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,_n(n)?(a=!0,Gm(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,FC(e),i.updater=T0,e.stateNode=i,i._reactInternals=e,Nb(e,n,t,r),e=zb(null,e,n,!0,a,r)):(e.tag=0,Pt&&a&&NC(e),en(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(sm(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=x9(n),t=Ti(n,t),i){case 0:e=Ob(null,e,n,t,r);break e;case 1:e=nk(null,e,n,t,r);break e;case 11:e=tk(null,e,n,t,r);break e;case 14:e=rk(null,e,n,Ti(n.type,t),r);break e}throw Error(ce(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),Ob(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),nk(t,e,n,i,r);case 3:e:{if(o3(e),t===null)throw Error(ce(387));n=e.pendingProps,a=e.memoizedState,i=a.element,EB(t,e),$m(e,n,null,r);var o=e.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){i=Wc(Error(ce(423)),e),e=ik(t,e,n,r,i);break e}else if(n!==i){i=Wc(Error(ce(424)),e),e=ik(t,e,n,r,i);break e}else for(Pn=es(e.stateNode.containerInfo.firstChild),Nn=e,Pt=!0,Ai=null,r=DB(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Fc(),n===i){e=lo(t,e,r);break e}en(t,e,n,r)}e=e.child}return e;case 5:return NB(e),t===null&&Db(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,Mb(n,i)?o=null:a!==null&&Mb(n,a)&&(e.flags|=32),a3(t,e),en(t,e,o,r),e.child;case 6:return t===null&&Db(e),null;case 13:return s3(t,e,r);case 4:return GC(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Gc(e,null,n,r):en(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),tk(t,e,n,i,r);case 7:return en(t,e,e.pendingProps,r),e.child;case 8:return en(t,e,e.pendingProps.children,r),e.child;case 12:return en(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,a=e.memoizedProps,o=i.value,Mt(Um,n._currentValue),n._currentValue=o,a!==null)if(Oi(a.value,o)){if(a.children===i.children&&!yn.current){e=lo(t,e,r);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=Qa(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Ib(a.return,r,e),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===e.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(ce(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Ib(o,r,e),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}en(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,kc(e,r),i=li(i),n=n(i),e.flags|=1,en(t,e,n,r),e.child;case 14:return n=e.type,i=Ti(n,e.pendingProps),i=Ti(n.type,i),rk(t,e,n,i,r);case 15:return n3(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),sm(t,e),e.tag=1,_n(n)?(t=!0,Gm(e)):t=!1,kc(e,r),e3(e,n,i),Nb(e,n,i,r),zb(null,e,n,!0,t,r);case 19:return l3(t,e,r);case 22:return i3(t,e,r)}throw Error(ce(156,e.tag))};function T3(t,e){return Kz(t,e)}function _9(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ni(t,e,r,n){return new _9(t,e,r,n)}function n2(t){return t=t.prototype,!(!t||!t.isReactComponent)}function x9(t){if(typeof t=="function")return n2(t)?1:0;if(t!=null){if(t=t.$$typeof,t===bC)return 11;if(t===wC)return 14}return 2}function is(t,e){var r=t.alternate;return r===null?(r=ni(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function cm(t,e,r,n,i,a){var o=2;if(n=t,typeof t=="function")n2(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case lc:return El(r.children,i,a,e);case SC:o=8,i|=8;break;case ib:return t=ni(12,r,e,i|2),t.elementType=ib,t.lanes=a,t;case ab:return t=ni(13,r,e,i),t.elementType=ab,t.lanes=a,t;case ob:return t=ni(19,r,e,i),t.elementType=ob,t.lanes=a,t;case Nz:return A0(r,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Iz:o=10;break e;case Ez:o=9;break e;case bC:o=11;break e;case wC:o=14;break e;case Ro:o=16,n=null;break e}throw Error(ce(130,t==null?t:typeof t,""))}return e=ni(o,r,e,i),e.elementType=t,e.type=n,e.lanes=a,e}function El(t,e,r,n){return t=ni(7,t,n,e),t.lanes=r,t}function A0(t,e,r,n){return t=ni(22,t,n,e),t.elementType=Nz,t.lanes=r,t.stateNode={isHidden:!1},t}function Cx(t,e,r){return t=ni(6,t,null,e),t.lanes=r,t}function Mx(t,e,r){return e=ni(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function S9(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ax(0),this.expirationTimes=ax(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ax(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function i2(t,e,r,n,i,a,o,s,l){return t=new S9(t,e,r,s,l),e===1?(e=1,a===!0&&(e|=8)):e=0,a=ni(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},FC(a),t}function b9(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:sc,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function C3(t){if(!t)return gs;t=t._reactInternals;e:{if(au(t)!==t||t.tag!==1)throw Error(ce(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(_n(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(ce(171))}if(t.tag===1){var r=t.type;if(_n(r))return CB(t,r,e)}return e}function M3(t,e,r,n,i,a,o,s,l){return t=i2(r,n,!0,t,i,a,o,s,l),t.context=C3(null),r=t.current,n=an(),i=ns(r),a=Qa(n,i),a.callback=e??null,ts(r,a,i),t.current.lanes=i,Mv(t,i,n),xn(t,n),t}function L0(t,e,r,n){var i=e.current,a=an(),o=ns(i);return r=C3(r),e.context===null?e.context=r:e.pendingContext=r,e=Qa(a,o),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=ts(i,e,o),t!==null&&(Di(t,i,o,a),im(t,i,o)),o}function ty(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function vk(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function a2(t,e){vk(t,e),(t=t.alternate)&&vk(t,e)}function w9(){return null}var A3=typeof reportError=="function"?reportError:function(t){console.error(t)};function o2(t){this._internalRoot=t}P0.prototype.render=o2.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(ce(409));L0(t,e,null,null)};P0.prototype.unmount=o2.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Zl(function(){L0(null,t,null,null)}),e[oo]=null}};function P0(t){this._internalRoot=t}P0.prototype.unstable_scheduleHydration=function(t){if(t){var e=iB();t={blockedOn:null,target:t,priority:e};for(var r=0;r<jo.length&&e!==0&&e<jo[r].priority;r++);jo.splice(r,0,t),r===0&&oB(t)}};function s2(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function k0(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function pk(){}function T9(t,e,r,n,i){if(i){if(typeof n=="function"){var a=n;n=function(){var u=ty(o);a.call(u)}}var o=M3(e,n,t,0,null,!1,!1,"",pk);return t._reactRootContainer=o,t[oo]=o.current,Ed(t.nodeType===8?t.parentNode:t),Zl(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof n=="function"){var s=n;n=function(){var u=ty(l);s.call(u)}}var l=i2(t,0,!1,null,null,!1,!1,"",pk);return t._reactRootContainer=l,t[oo]=l.current,Ed(t.nodeType===8?t.parentNode:t),Zl(function(){L0(e,l,r,n)}),l}function D0(t,e,r,n,i){var a=r._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var s=i;i=function(){var l=ty(o);s.call(l)}}L0(e,o,t,i)}else o=T9(r,e,t,i,n);return ty(o)}rB=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=zf(e.pendingLanes);r!==0&&(MC(e,r|1),xn(e,Yt()),!(ft&6)&&(Uc=Yt()+500,Ms()))}break;case 13:Zl(function(){var n=so(t,1);if(n!==null){var i=an();Di(n,t,1,i)}}),a2(t,1)}};AC=function(t){if(t.tag===13){var e=so(t,134217728);if(e!==null){var r=an();Di(e,t,134217728,r)}a2(t,134217728)}};nB=function(t){if(t.tag===13){var e=ns(t),r=so(t,e);if(r!==null){var n=an();Di(r,t,e,n)}a2(t,e)}};iB=function(){return xt};aB=function(t,e){var r=xt;try{return xt=t,e()}finally{xt=r}};gb=function(t,e,r){switch(e){case"input":if(ub(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=S0(n);if(!i)throw Error(ce(90));Oz(n),ub(n,i)}}}break;case"textarea":Bz(t,r);break;case"select":e=r.value,e!=null&&Mc(t,!!r.multiple,e,!1)}};Uz=e2;Zz=Zl;var C9={usingClientEntryPoint:!1,Events:[Lv,fc,S0,Hz,Wz,e2]},tf={findFiberByHostInstance:bl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},M9={bundleType:tf.bundleType,version:tf.version,rendererPackageName:tf.rendererPackageName,rendererConfig:tf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:yo.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Xz(t),t===null?null:t.stateNode},findFiberByHostInstance:tf.findFiberByHostInstance||w9,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Op=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Op.isDisabled&&Op.supportsFiber)try{m0=Op.inject(M9),ga=Op}catch{}}zn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C9;zn.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!s2(e))throw Error(ce(200));return b9(t,e,null,r)};zn.createRoot=function(t,e){if(!s2(t))throw Error(ce(299));var r=!1,n="",i=A3;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=i2(t,1,!1,null,null,r,!1,n,i),t[oo]=e.current,Ed(t.nodeType===8?t.parentNode:t),new o2(e)};zn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(ce(188)):(t=Object.keys(t).join(","),Error(ce(268,t)));return t=Xz(e),t=t===null?null:t.stateNode,t};zn.flushSync=function(t){return Zl(t)};zn.hydrate=function(t,e,r){if(!k0(e))throw Error(ce(200));return D0(null,t,e,!0,r)};zn.hydrateRoot=function(t,e,r){if(!s2(t))throw Error(ce(405));var n=r!=null&&r.hydratedSources||null,i=!1,a="",o=A3;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),e=M3(e,null,t,1,r??null,i,!1,a,o),t[oo]=e.current,Ed(t),n)for(t=0;t<n.length;t++)r=n[t],i=r._getVersion,i=i(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,i]:e.mutableSourceEagerHydrationData.push(r,i);return new P0(e)};zn.render=function(t,e,r){if(!k0(e))throw Error(ce(200));return D0(null,t,e,!1,r)};zn.unmountComponentAtNode=function(t){if(!k0(t))throw Error(ce(40));return t._reactRootContainer?(Zl(function(){D0(null,null,t,!1,function(){t._reactRootContainer=null,t[oo]=null})}),!0):!1};zn.unstable_batchedUpdates=e2;zn.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!k0(r))throw Error(ce(200));if(t==null||t._reactInternals===void 0)throw Error(ce(38));return D0(t,e,r,!1,n)};zn.version="18.3.1-next-f1338f8080-20240426";function L3(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(L3)}catch(t){console.error(t)}}L3(),Lz.exports=zn;var P3=Lz.exports,gk=P3;rb.createRoot=gk.createRoot,rb.hydrateRoot=gk.hydrateRoot;/**
|
||
* @remix-run/router v1.23.2
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function Gd(){return Gd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Gd.apply(this,arguments)}var Ho;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Ho||(Ho={}));const mk="popstate";function A9(t){t===void 0&&(t={});function e(n,i){let{pathname:a,search:o,hash:s}=n.location;return Xb("",{pathname:a,search:o,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:ry(i)}return P9(e,r,null,t)}function nr(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function l2(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function L9(){return Math.random().toString(36).substr(2,8)}function yk(t,e){return{usr:t.state,key:t.key,idx:e}}function Xb(t,e,r,n){return r===void 0&&(r=null),Gd({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?dh(e):e,{state:r,key:e&&e.key||n||L9()})}function ry(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function dh(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function P9(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Ho.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Gd({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function h(){s=Ho.Pop;let m=c(),y=m==null?null:m-u;u=m,l&&l({action:s,location:g.location,delta:y})}function f(m,y){s=Ho.Push;let _=Xb(g.location,m,y);u=c()+1;let S=yk(_,u),T=g.createHref(_);try{o.pushState(S,"",T)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(T)}a&&l&&l({action:s,location:g.location,delta:1})}function d(m,y){s=Ho.Replace;let _=Xb(g.location,m,y);u=c();let S=yk(_,u),T=g.createHref(_);o.replaceState(S,"",T),a&&l&&l({action:s,location:g.location,delta:0})}function p(m){let y=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof m=="string"?m:ry(m);return _=_.replace(/ $/,"%20"),nr(y,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,y)}let g={get action(){return s},get location(){return t(i,o)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(mk,h),l=m,()=>{i.removeEventListener(mk,h),l=null}},createHref(m){return e(i,m)},createURL:p,encodeLocation(m){let y=p(m);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:d,go(m){return o.go(m)}};return g}var _k;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(_k||(_k={}));function k9(t,e,r){return r===void 0&&(r="/"),D9(t,e,r)}function D9(t,e,r,n){let i=typeof e=="string"?dh(e):e,a=u2(i.pathname||"/",r);if(a==null)return null;let o=k3(t);I9(o);let s=null;for(let l=0;s==null&&l<o.length;++l){let u=W9(a);s=F9(o[l],u)}return s}function k3(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(a,o,s)=>{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(nr(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=as([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(nr(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),k3(a.children,e,c,u)),!(a.path==null&&!a.index)&&e.push({path:u,score:j9(u,a.index),routesMeta:c})};return t.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of D3(a.path))i(a,o,l)}),e}function D3(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=D3(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>t.startsWith("/")&&l===""?"/":l)}function I9(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:V9(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const E9=/^:[\w-]+$/,N9=3,R9=2,O9=1,z9=10,B9=-2,xk=t=>t==="*";function j9(t,e){let r=t.split("/"),n=r.length;return r.some(xk)&&(n+=B9),e&&(n+=R9),r.filter(i=>!xk(i)).reduce((i,a)=>i+(E9.test(a)?N9:a===""?O9:z9),n)}function V9(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function F9(t,e,r){let{routesMeta:n}=t,i={},a="/",o=[];for(let s=0;s<n.length;++s){let l=n[s],u=s===n.length-1,c=a==="/"?e:e.slice(a.length)||"/",h=G9({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!h)return null;Object.assign(i,h.params),o.push({params:i,pathname:as([a,h.pathname]),pathnameBase:X9(as([a,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(a=as([a,h.pathnameBase]))}return o}function G9(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=H9(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((u,c,h)=>{let{paramName:f,isOptional:d}=c;if(f==="*"){let g=s[h]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const p=s[h];return d&&!p?u[f]=void 0:u[f]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:t}}function H9(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),l2(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function W9(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return l2(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function u2(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}const U9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Z9=t=>U9.test(t);function $9(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?dh(t):t,a;if(r)if(Z9(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),l2(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=Sk(r.substring(1),"/"):a=Sk(r,e)}else a=e;return{pathname:a,search:q9(n),hash:K9(i)}}function Sk(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Ax(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Y9(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function I3(t,e){let r=Y9(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function E3(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=dh(t):(i=Gd({},t),nr(!i.pathname||!i.pathname.includes("?"),Ax("?","pathname","search",i)),nr(!i.pathname||!i.pathname.includes("#"),Ax("#","pathname","hash",i)),nr(!i.search||!i.search.includes("#"),Ax("#","search","hash",i)));let a=t===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let h=e.length-1;if(!n&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;i.pathname=f.join("/")}s=h>=0?e[h]:"/"}let l=$9(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const as=t=>t.join("/").replace(/\/\/+/g,"/"),X9=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),q9=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,K9=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Q9(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const N3=["post","put","patch","delete"];new Set(N3);const J9=["get",...N3];new Set(J9);/**
|
||
* React Router v6.30.3
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function Hd(){return Hd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Hd.apply(this,arguments)}const c2=$.createContext(null),eZ=$.createContext(null),ou=$.createContext(null),I0=$.createContext(null),su=$.createContext({outlet:null,matches:[],isDataRoute:!1}),R3=$.createContext(null);function tZ(t,e){let{relative:r}=e===void 0?{}:e;kv()||nr(!1);let{basename:n,navigator:i}=$.useContext(ou),{hash:a,pathname:o,search:s}=B3(t,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:as([n,o])),i.createHref({pathname:l,search:s,hash:a})}function kv(){return $.useContext(I0)!=null}function Dv(){return kv()||nr(!1),$.useContext(I0).location}function O3(t){$.useContext(ou).static||$.useLayoutEffect(t)}function z3(){let{isDataRoute:t}=$.useContext(su);return t?vZ():rZ()}function rZ(){kv()||nr(!1);let t=$.useContext(c2),{basename:e,future:r,navigator:n}=$.useContext(ou),{matches:i}=$.useContext(su),{pathname:a}=Dv(),o=JSON.stringify(I3(i,r.v7_relativeSplatPath)),s=$.useRef(!1);return O3(()=>{s.current=!0}),$.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let h=E3(u,JSON.parse(o),a,c.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:as([e,h.pathname])),(c.replace?n.replace:n.push)(h,c.state,c)},[e,n,o,a,t])}function B3(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=$.useContext(ou),{matches:i}=$.useContext(su),{pathname:a}=Dv(),o=JSON.stringify(I3(i,n.v7_relativeSplatPath));return $.useMemo(()=>E3(t,JSON.parse(o),a,r==="path"),[t,o,a,r])}function nZ(t,e){return iZ(t,e)}function iZ(t,e,r,n){kv()||nr(!1);let{navigator:i}=$.useContext(ou),{matches:a}=$.useContext(su),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Dv(),c;if(e){var h;let m=typeof e=="string"?dh(e):e;l==="/"||(h=m.pathname)!=null&&h.startsWith(l)||nr(!1),c=m}else c=u;let f=c.pathname||"/",d=f;if(l!=="/"){let m=l.replace(/^\//,"").split("/");d="/"+f.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=k9(t,{pathname:d}),g=uZ(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:as([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:as([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),a,r,n);return e&&g?$.createElement(I0.Provider,{value:{location:Hd({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Ho.Pop}},g):g}function aZ(){let t=dZ(),e=Q9(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return $.createElement($.Fragment,null,$.createElement("h2",null,"Unexpected Application Error!"),$.createElement("h3",{style:{fontStyle:"italic"}},e),r?$.createElement("pre",{style:i},r):null,null)}const oZ=$.createElement(aZ,null);class sZ extends $.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?$.createElement(su.Provider,{value:this.props.routeContext},$.createElement(R3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lZ(t){let{routeContext:e,match:r,children:n}=t,i=$.useContext(c2);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),$.createElement(su.Provider,{value:e},n)}function uZ(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var a;if(!r)return null;if(r.errors)t=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(h=>h.route.id&&(s==null?void 0:s[h.route.id])!==void 0);c>=0||nr(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c<o.length;c++){let h=o[c];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=c),h.route.id){let{loaderData:f,errors:d}=r,p=h.route.loader&&f[h.route.id]===void 0&&(!d||d[h.route.id]===void 0);if(h.route.lazy||p){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,h,f)=>{let d,p=!1,g=null,m=null;r&&(d=s&&h.route.id?s[h.route.id]:void 0,g=h.route.errorElement||oZ,l&&(u<0&&f===0?(pZ("route-fallback"),p=!0,m=null):u===f&&(p=!0,m=h.route.hydrateFallbackElement||null)));let y=e.concat(o.slice(0,f+1)),_=()=>{let S;return d?S=g:p?S=m:h.route.Component?S=$.createElement(h.route.Component,null):h.route.element?S=h.route.element:S=c,$.createElement(lZ,{match:h,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:S})};return r&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?$.createElement(sZ,{location:r.location,revalidation:r.revalidation,component:g,error:d,children:_(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):_()},null)}var j3=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(j3||{}),V3=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(V3||{});function cZ(t){let e=$.useContext(c2);return e||nr(!1),e}function hZ(t){let e=$.useContext(eZ);return e||nr(!1),e}function fZ(t){let e=$.useContext(su);return e||nr(!1),e}function F3(t){let e=fZ(),r=e.matches[e.matches.length-1];return r.route.id||nr(!1),r.route.id}function dZ(){var t;let e=$.useContext(R3),r=hZ(),n=F3();return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function vZ(){let{router:t}=cZ(j3.UseNavigateStable),e=F3(V3.UseNavigateStable),r=$.useRef(!1);return O3(()=>{r.current=!0}),$.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Hd({fromRouteId:e},a)))},[t,e])}const bk={};function pZ(t,e,r){bk[t]||(bk[t]=!0)}function gZ(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function rc(t){nr(!1)}function mZ(t){let{basename:e="/",children:r=null,location:n,navigationType:i=Ho.Pop,navigator:a,static:o=!1,future:s}=t;kv()&&nr(!1);let l=e.replace(/^\/*/,"/"),u=$.useMemo(()=>({basename:l,navigator:a,static:o,future:Hd({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=dh(n));let{pathname:c="/",search:h="",hash:f="",state:d=null,key:p="default"}=n,g=$.useMemo(()=>{let m=u2(c,l);return m==null?null:{location:{pathname:m,search:h,hash:f,state:d,key:p},navigationType:i}},[l,c,h,f,d,p,i]);return g==null?null:$.createElement(ou.Provider,{value:u},$.createElement(I0.Provider,{children:r,value:g}))}function yZ(t){let{children:e,location:r}=t;return nZ(qb(e),r)}new Promise(()=>{});function qb(t,e){e===void 0&&(e=[]);let r=[];return $.Children.forEach(t,(n,i)=>{if(!$.isValidElement(n))return;let a=[...e,i];if(n.type===$.Fragment){r.push.apply(r,qb(n.props.children,a));return}n.type!==rc&&nr(!1),!n.props.index||!n.props.children||nr(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=qb(n.props.children,a)),r.push(o)}),r}/**
|
||
* React Router DOM v6.30.3
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function Kb(){return Kb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Kb.apply(this,arguments)}function _Z(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function xZ(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function SZ(t,e){return t.button===0&&(!e||e==="_self")&&!xZ(t)}const bZ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],wZ="6";try{window.__reactRouterVersion=wZ}catch{}const TZ="startTransition",wk=gU[TZ];function CZ(t){let{basename:e,children:r,future:n,window:i}=t,a=$.useRef();a.current==null&&(a.current=A9({window:i,v5Compat:!0}));let o=a.current,[s,l]=$.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=$.useCallback(h=>{u&&wk?wk(()=>l(h)):l(h)},[l,u]);return $.useLayoutEffect(()=>o.listen(c),[o,c]),$.useEffect(()=>gZ(n),[n]),$.createElement(mZ,{basename:e,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const MZ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",AZ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,LZ=$.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:h}=e,f=_Z(e,bZ),{basename:d}=$.useContext(ou),p,g=!1;if(typeof u=="string"&&AZ.test(u)&&(p=u,MZ))try{let S=new URL(window.location.href),T=u.startsWith("//")?new URL(S.protocol+u):new URL(u),C=u2(T.pathname,d);T.origin===S.origin&&C!=null?u=C+T.search+T.hash:g=!0}catch{}let m=tZ(u,{relative:i}),y=PZ(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:h});function _(S){n&&n(S),S.defaultPrevented||y(S)}return $.createElement("a",Kb({},f,{href:p||m,onClick:g||a?n:_,ref:r,target:l}))});var Tk;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Tk||(Tk={}));var Ck;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Ck||(Ck={}));function PZ(t,e){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=e===void 0?{}:e,l=z3(),u=Dv(),c=B3(t,{relative:o});return $.useCallback(h=>{if(SZ(h,r)){h.preventDefault();let f=n!==void 0?n:ry(u)===ry(c);l(t,{replace:f,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,t,a,o,s])}/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const kZ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),G3=(...t)=>t.filter((e,r,n)=>!!e&&n.indexOf(e)===r).join(" ");/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var DZ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const IZ=$.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>$.createElement("svg",{ref:l,...DZ,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:G3("lucide",i),...s},[...o.map(([u,c])=>$.createElement(u,c)),...Array.isArray(a)?a:[a]]));/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const je=(t,e)=>{const r=$.forwardRef(({className:n,...i},a)=>$.createElement(IZ,{ref:a,iconNode:e,className:G3(`lucide-${kZ(t)}`,n),...i}));return r.displayName=`${t}`,r};/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const h2=je("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Lx=je("Battery",[["rect",{width:"16",height:"10",x:"2",y:"7",rx:"2",ry:"2",key:"1w10f2"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Wd=je("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const EZ=je("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const NZ=je("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const RZ=je("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const OZ=je("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const H3=je("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Iv=je("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const zZ=je("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ev=je("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const BZ=je("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const E0=je("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const sd=je("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ny=je("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ud=je("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const W3=je("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const jZ=je("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const VZ=je("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Zd=je("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const FZ=je("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const U3=je("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const f2=je("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const GZ=je("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const iy=je("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const HZ=je("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Z3=je("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const $3=je("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const WZ=je("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const UZ=je("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ZZ=je("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const $Z=je("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ay=je("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Zc=je("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const YZ=je("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const XZ=je("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const qZ=je("Satellite",[["path",{d:"M13 7 9 3 5 7l4 4",key:"vyckw6"}],["path",{d:"m17 11 4 4-4 4-4-4",key:"rchckc"}],["path",{d:"m8 12 4 4 6-6-4-4Z",key:"1sshf7"}],["path",{d:"m16 8 3-3",key:"x428zp"}],["path",{d:"M9 21a6 6 0 0 0-6-6",key:"1iajcf"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const KZ=je("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const QZ=je("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const JZ=je("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Y3=je("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Mk=je("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const e$=je("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const t$=je("Thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const N0=je("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ms=je("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const r$=je("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const n$=je("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const X3=je("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ak=je("Wind",[["path",{d:"M17.7 7.7a2.5 2.5 0 1 1 1.8 4.3H2",key:"1k4u03"}],["path",{d:"M9.6 4.6A2 2 0 1 1 11 8H2",key:"b7d0fd"}],["path",{d:"M12.6 19.4A2 2 0 1 0 14 16H2",key:"1p5cb3"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const d2=je("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const v2=je("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);async function or(t){const e=await fetch(t);if(!e.ok)throw new Error(`API error: ${e.status} ${e.statusText}`);return e.json()}async function Lk(){return or("/api/status")}async function i$(){return or("/api/health")}async function a$(){return or("/api/nodes")}async function o$(){return or("/api/edges")}async function s$(){return or("/api/sources")}async function q3(){return or("/api/alerts/active")}async function Pk(t=50,e=0,r,n){const i=new URLSearchParams;return i.set("limit",t.toString()),i.set("offset",e.toString()),r&&r!=="all"&&i.set("type",r),n&&n!=="all"&&i.set("severity",n),or(`/api/alerts/history?${i.toString()}`)}async function l$(){return or("/api/subscriptions")}async function K3(){return or("/api/env/status")}async function u$(){return or("/api/env/active")}async function c$(){return or("/api/env/propagation")}async function h$(){return or("/api/env/swpc")}async function f$(){return or("/api/env/ducting")}async function d$(){return or("/api/env/fires")}async function v$(){return or("/api/env/avalanche")}async function p$(){return or("/api/env/streams")}async function g$(){return or("/api/env/traffic")}async function m$(){return or("/api/env/roads")}async function y$(){return or("/api/env/hotspots")}async function _$(){return or("/api/regions")}function p2(){const[t,e]=$.useState(!1),[r,n]=$.useState(null),[i,a]=$.useState(null),o=$.useRef(null),s=$.useRef(null),l=$.useRef(1e3),u=$.useCallback(()=>{var f;if(((f=o.current)==null?void 0:f.readyState)===WebSocket.OPEN)return;const h=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/live`;try{const d=new WebSocket(h);o.current=d,d.onopen=()=>{e(!0),l.current=1e3},d.onmessage=g=>{try{const m=JSON.parse(g.data);switch(m.type){case"health_update":n(m.data);break;case"alert_fired":a(m.data);break}}catch(m){console.error("Failed to parse WebSocket message:",m)}},d.onclose=()=>{e(!1),o.current=null;const g=Math.min(l.current,3e4);s.current=window.setTimeout(()=>{l.current=Math.min(g*2,3e4),u()},g)},d.onerror=()=>{d.close()};const p=setInterval(()=>{d.readyState===WebSocket.OPEN&&d.send("ping")},3e4);d.addEventListener("close",()=>{clearInterval(p)})}catch(d){console.error("Failed to create WebSocket:",d)}},[]);return $.useEffect(()=>(u(),()=>{s.current&&clearTimeout(s.current),o.current&&o.current.close()}),[u]),{connected:t,lastHealth:r,lastAlert:i}}const Q3=$.createContext(null);function x$(){const t=$.useContext(Q3);if(!t)throw new Error("useToast must be used within a ToastProvider");return t}function S$(t){switch(t==null?void 0:t.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:E0,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:ms,iconColor:"text-amber-500"};default:return{bg:"bg-blue-500/10",border:"border-blue-500",icon:iy,iconColor:"text-blue-500"}}}function b$({toast:t,onDismiss:e,onNavigate:r}){const n=S$(t.alert.severity),i=n.icon;return $.useEffect(()=>{const a=setTimeout(e,8e3);return()=>clearTimeout(a)},[e]),b.jsx("div",{className:`${n.bg} border ${n.border} rounded-lg shadow-lg overflow-hidden animate-slide-in cursor-pointer`,onClick:r,role:"alert",children:b.jsxs("div",{className:"flex items-start gap-3 p-4",children:[b.jsx("div",{className:`w-1 self-stretch -ml-4 -my-4 ${n.border.replace("border","bg")}`}),b.jsx(i,{size:18,className:n.iconColor}),b.jsxs("div",{className:"flex-1 min-w-0 pr-2",children:[b.jsx("div",{className:"text-sm font-medium text-slate-200 mb-0.5",children:t.alert.type.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}),b.jsx("div",{className:"text-sm text-slate-300 line-clamp-2",children:t.alert.message})]}),b.jsx("button",{onClick:a=>{a.stopPropagation(),e()},className:"text-slate-400 hover:text-slate-200 transition-colors",children:b.jsx(d2,{size:16})})]})})}function w$({children:t}){const[e,r]=$.useState([]),n=z3(),i=$.useCallback(s=>{const l=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;r(u=>[...u,{id:l,alert:s}])},[]),a=$.useCallback(s=>{r(l=>l.filter(u=>u.id!==s))},[]),o=$.useCallback(()=>{n("/alerts")},[n]);return b.jsxs(Q3.Provider,{value:{addToast:i},children:[t,b.jsx("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2 max-w-sm w-full pointer-events-none",children:e.map(s=>b.jsx("div",{className:"pointer-events-auto",children:b.jsx(b$,{toast:s,onDismiss:()=>a(s.id),onNavigate:o})},s.id))})]})}const J3=[{path:"/",label:"Dashboard",icon:Z3},{path:"/mesh",label:"Mesh",icon:Zc},{path:"/environment",label:"Environment",icon:Ud},{path:"/config",label:"Config",icon:Y3},{path:"/alerts",label:"Alerts",icon:Wd}];function T$(t){const e=Math.floor(t/86400),r=Math.floor(t%86400/3600),n=Math.floor(t%3600/60);return e>0?`${e}d ${r}h`:r>0?`${r}h ${n}m`:`${n}m`}function C$(t){const e=J3.find(r=>r.path===t);return(e==null?void 0:e.label)||"Dashboard"}function M$({children:t}){var f;const e=Dv(),{connected:r,lastAlert:n}=p2(),{addToast:i}=x$(),[a,o]=$.useState(null),[s,l]=$.useState(null);$.useEffect(()=>{if(n){const d=`${n.type}-${n.message}-${n.timestamp}`;d!==s&&(l(d),i(n))}},[n,s,i]);const[u,c]=$.useState(new Date);$.useEffect(()=>{Lk().then(o).catch(console.error);const d=setInterval(()=>{Lk().then(o).catch(console.error)},3e4);return()=>clearInterval(d)},[]),$.useEffect(()=>{const d=setInterval(()=>c(new Date),1e3);return()=>clearInterval(d)},[]);const h=u.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return b.jsxs("div",{className:"flex h-screen overflow-hidden bg-bg text-slate-200",children:[b.jsxs("aside",{className:"w-[220px] flex-shrink-0 bg-bg-card border-r border-border flex flex-col overflow-y-auto",children:[b.jsx("div",{className:"p-5 border-b border-border",children:b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center text-white font-bold text-xl",children:"M"}),b.jsxs("div",{children:[b.jsx("div",{className:"font-semibold text-lg",children:"MeshAI"}),b.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["v",(a==null?void 0:a.version)||"..."]})]})]})}),b.jsx("nav",{className:"flex-1 py-4",children:J3.map(d=>{const p=e.pathname===d.path,g=d.icon;return b.jsxs(LZ,{to:d.path,className:`flex items-center gap-3 px-5 py-3 text-sm transition-colors relative ${p?"text-blue-400 bg-blue-500/10":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[p&&b.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500"}),b.jsx(g,{size:18}),d.label]},d.path)})}),b.jsxs("div",{className:"p-5 border-t border-border",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b.jsx("div",{className:`w-2 h-2 rounded-full ${a!=null&&a.connected?"bg-green-500":"bg-red-500"}`}),b.jsx("span",{className:"text-xs text-slate-400",children:a!=null&&a.connected?"Connected":"Disconnected"})]}),b.jsxs("div",{className:"text-xs text-slate-500 font-mono truncate",children:[(f=a==null?void 0:a.connection_type)==null?void 0:f.toUpperCase(),": ",a==null?void 0:a.connection_target]}),b.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Uptime: ",a?T$(a.uptime_seconds):"..."]})]})]}),b.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b.jsxs("header",{className:"h-14 flex-shrink-0 border-b border-border bg-bg-card flex items-center justify-between px-6",children:[b.jsx("h1",{className:"text-lg font-semibold",children:C$(e.pathname)}),b.jsxs("div",{className:"flex items-center gap-6",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:`w-2 h-2 rounded-full ${r?"bg-green-500 animate-pulse-slow":"bg-slate-500"}`}),b.jsx("span",{className:"text-xs text-slate-400",children:r?"Live":"Offline"})]}),b.jsxs("div",{className:"text-sm font-mono text-slate-400",children:[h," MT"]})]})]}),b.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:t})]})]})}function A$({health:t}){const e=t.score,r=t.tier,i=(s=>s>=80?"#22c55e":s>=60?"#f59e0b":"#ef4444")(e),a=2*Math.PI*45,o=e/100*a;return b.jsx("div",{className:"flex flex-col items-center",children:b.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 100 100",children:[b.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#1e2a3a",strokeWidth:"8"}),b.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:i,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:a-o,transform:"rotate(-90 50 50)",className:"transition-all duration-500"}),b.jsx("text",{x:"50",y:"46",textAnchor:"middle",className:"fill-slate-100 font-mono text-2xl font-bold",style:{fontSize:"24px"},children:e.toFixed(1)}),b.jsx("text",{x:"50",y:"62",textAnchor:"middle",className:"fill-slate-400 text-xs",style:{fontSize:"10px"},children:r})]})})}function zp({label:t,value:e}){const r=n=>n>=80?"bg-green-500":n>=60?"bg-amber-500":"bg-red-500";return b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"w-24 text-xs text-slate-400 truncate",children:t}),b.jsx("div",{className:"flex-1 h-2 bg-border rounded-full overflow-hidden",children:b.jsx("div",{className:`h-full ${r(e)} transition-all duration-300`,style:{width:`${e}%`}})}),b.jsx("div",{className:"w-12 text-right text-xs font-mono text-slate-300",children:e.toFixed(1)})]})}function L$({alert:t}){const r=(i=>{switch(i.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:E0,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:ms,iconColor:"text-amber-500"};default:return{bg:"bg-green-500/10",border:"border-green-500",icon:iy,iconColor:"text-green-500"}}})(t.severity),n=r.icon;return b.jsxs("div",{className:`p-3 rounded-lg ${r.bg} border-l-2 ${r.border} flex items-start gap-3`,children:[b.jsx(n,{size:16,className:r.iconColor}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("div",{className:"text-sm text-slate-200",children:t.message}),b.jsx("div",{className:"text-xs text-slate-500 mt-1",children:t.timestamp||"Just now"})]})]})}function P$({source:t}){const e=()=>t.is_loaded?t.last_error?"bg-amber-500":"bg-green-500":"bg-red-500";return b.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-bg-hover",children:[b.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("div",{className:"text-sm text-slate-200 truncate",children:t.name}),b.jsxs("div",{className:"text-xs text-slate-500",children:[t.node_count," nodes * ",t.type]})]})]})}function Bp({icon:t,label:e,value:r,subvalue:n}){return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4",children:[b.jsxs("div",{className:"flex items-center gap-2 text-slate-400 mb-2",children:[b.jsx(t,{size:14}),b.jsx("span",{className:"text-xs",children:e})]}),b.jsx("div",{className:"font-mono text-xl text-slate-100",children:r}),n&&b.jsx("div",{className:"text-xs text-slate-500 mt-1",children:n})]})}function k$({propagation:t}){var o,s,l;if(!t)return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"RF Propagation"}),b.jsx("div",{className:"text-slate-500",children:b.jsx("p",{children:"Loading propagation data..."})})]});const e=t.hf,r=t.uhf_ducting,n=u=>{if(!u)return"text-slate-400";switch(u){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},i=e&&(e.sfi||e.kp_current!==void 0),a=r&&r.condition;return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(v2,{size:14}),"RF Propagation"]}),b.jsxs("div",{className:"mb-4",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar/Geomagnetic"}),i?b.jsxs("div",{className:"space-y-1",children:[b.jsxs("div",{className:"text-sm font-mono text-slate-200",children:["SFI ",((o=e.sfi)==null?void 0:o.toFixed(0))||"?"," / Kp ",((s=e.kp_current)==null?void 0:s.toFixed(1))||"?"]}),b.jsxs("div",{className:"text-xs text-slate-400",children:["R",e.r_scale??0," / S",e.s_scale??0," / G",e.g_scale??0]}),e.r_scale!==void 0&&e.r_scale>0&&b.jsxs("div",{className:"text-xs text-amber-500",children:["R",e.r_scale," Radio Blackout"]})]}):b.jsx("div",{className:"text-sm text-slate-500",children:"No data"})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Tropospheric"}),a?b.jsxs("div",{className:"space-y-1",children:[b.jsx("div",{className:`text-sm font-medium ${n(r.condition)}`,children:r.condition==="normal"?"Normal":(l=r.condition)==null?void 0:l.replace("_"," ").replace(/\b\w/g,u=>u.toUpperCase())}),b.jsxs("div",{className:"text-xs text-slate-400 font-mono",children:["dM/dz: ",r.min_gradient??"?"," M-units/km"]}),r.duct_thickness_m&&b.jsxs("div",{className:"text-xs text-slate-400",children:["Duct: ~",r.duct_thickness_m,"m thick"]})]}):b.jsx("div",{className:"text-sm text-slate-500",children:"No ducting data"})]})]})}function D$(){var g,m,y,_,S;const[t,e]=$.useState(null),[r,n]=$.useState([]),[i,a]=$.useState([]),[o,s]=$.useState(null),[l,u]=$.useState(null),[c,h]=$.useState(!0),[f,d]=$.useState(null),{lastHealth:p}=p2();return $.useEffect(()=>{Promise.all([i$(),s$(),q3(),K3(),c$().catch(()=>null)]).then(([T,C,M,A,k])=>{e(T),n(C),a(M),s(A),u(k),h(!1),document.title="Dashboard — MeshAI"}).catch(T=>{d(T.message),h(!1),document.title="Dashboard — MeshAI"})},[]),$.useEffect(()=>{p&&e(p)},[p]),c?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsx("div",{className:"text-slate-400",children:"Loading..."})}):f?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsxs("div",{className:"text-red-400",children:["Error: ",f]})}):b.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Mesh Health"}),t&&b.jsxs(b.Fragment,{children:[b.jsx(A$,{health:t}),b.jsxs("div",{className:"mt-6 space-y-3",children:[b.jsx(zp,{label:"Infrastructure",value:((g=t.pillars)==null?void 0:g.infrastructure)??0}),b.jsx(zp,{label:"Utilization",value:((m=t.pillars)==null?void 0:m.utilization)??0}),b.jsx(zp,{label:"Behavior",value:((y=t.pillars)==null?void 0:y.behavior)??0}),b.jsx(zp,{label:"Power",value:((_=t.pillars)==null?void 0:_.power)??0})]})]})]}),b.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Active Alerts"}),i.length>0?b.jsx("div",{className:"space-y-3",children:i.map((T,C)=>b.jsx(L$,{alert:T},C))}):b.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[b.jsx(sd,{size:16,className:"text-green-500"}),b.jsx("span",{children:"No active alerts"})]})]}),b.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[b.jsx(Bp,{icon:Zc,label:"Nodes Online",value:(t==null?void 0:t.total_nodes)||0,subvalue:`${(t==null?void 0:t.unlocated_count)||0} unlocated`}),b.jsx(Bp,{icon:W3,label:"Infrastructure",value:`${(t==null?void 0:t.infra_online)||0}/${(t==null?void 0:t.infra_total)||0}`,subvalue:(t==null?void 0:t.infra_online)===(t==null?void 0:t.infra_total)?"All online":"Some offline"}),b.jsx(Bp,{icon:h2,label:"Utilization",value:`${((S=t==null?void 0:t.util_percent)==null?void 0:S.toFixed(1))||0}%`,subvalue:`${(t==null?void 0:t.flagged_nodes)||0} flagged`}),b.jsx(Bp,{icon:$3,label:"Regions",value:(t==null?void 0:t.total_regions)||0,subvalue:`${(t==null?void 0:t.battery_warnings)||0} battery warnings`})]})]}),b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:["Mesh Sources (",r.length,")"]}),r.length>0?b.jsx("div",{className:"space-y-2",children:r.map((T,C)=>b.jsx(P$,{source:T},C))}):b.jsx("div",{className:"text-slate-500 py-4",children:"No sources configured"})]}),b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Environmental Feeds"}),o!=null&&o.enabled?b.jsxs("div",{className:"text-slate-400",children:[o.feeds.length," feeds active"]}):b.jsxs("div",{className:"text-slate-500",children:[b.jsx("p",{children:"Environmental feeds not enabled."}),b.jsx("p",{className:"text-xs mt-2",children:"Enable in config.yaml"})]})]}),b.jsx(k$,{propagation:l})]})}/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */var Qb=function(t,e){return Qb=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])},Qb(t,e)};function Y(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Qb(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var ld=function(){return ld=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},ld.apply(this,arguments)};function I$(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function kk(t,e,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{u(n.next(c))}catch(h){o(h)}}function l(c){try{u(n.throw(c))}catch(h){o(h)}}function u(c){c.done?a(c.value):i(c.value).then(s,l)}u((n=n.apply(t,[])).next())})}function Dk(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(c){u=[6,c],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var E$=function(){function t(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return t}(),N$=function(){function t(){this.browser=new E$,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 t}(),Ze=new N$;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Ze.wxa=!0,Ze.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Ze.worker=!0:!Ze.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Ze.node=!0,Ze.svgSupported=!0):R$(navigator.userAgent,Ze);function R$(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);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),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}}var g2=12,e4="sans-serif",uo=g2+"px "+e4,O$=20,z$=100,B$="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function j$(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r<t.length;r++){var n=String.fromCharCode(r+32),i=(t.charCodeAt(r)-O$)/z$;e[n]=i}return e}var V$=j$(B$),bn={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var t,e;return function(r,n){if(!t){var i=bn.createCanvas();t=i&&i.getContext("2d")}if(t)return e!==n&&(e=t.font=n||uo),t.measureText(r);r=r||"",n=n||uo;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||g2,s=0;if(n.indexOf("mono")>=0)s=o*r.length;else for(var l=0;l<r.length;l++){var u=V$[r[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(t,e,r){var n=new Image;return n.onload=e,n.onerror=r,n.src=t,n}};function t4(t){for(var e in bn)t[e]&&(bn[e]=t[e])}var r4=ci(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),n4=ci(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),vh=Object.prototype.toString,R0=Array.prototype,F$=R0.forEach,G$=R0.filter,m2=R0.slice,H$=R0.map,Ik=(function(){}).constructor,jp=Ik?Ik.prototype:null,y2="__proto__",W$=2311;function _2(){return W$++}function O0(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];typeof console<"u"&&console.error.apply(console,t)}function ye(t){if(t==null||typeof t!="object")return t;var e=t,r=vh.call(t);if(r==="[object Array]"){if(!Ic(t)){e=[];for(var n=0,i=t.length;n<i;n++)e[n]=ye(t[n])}}else if(n4[r]){if(!Ic(t)){var a=t.constructor;if(a.from)e=a.from(t);else{e=new a(t.length);for(var n=0,i=t.length;n<i;n++)e[n]=t[n]}}}else if(!r4[r]&&!Ic(t)&&!$l(t)){e={};for(var o in t)t.hasOwnProperty(o)&&o!==y2&&(e[o]=ye(t[o]))}return e}function Ne(t,e,r){if(!be(e)||!be(t))return r?ye(e):t;for(var n in e)if(e.hasOwnProperty(n)&&n!==y2){var i=t[n],a=e[n];be(a)&&be(i)&&!ee(a)&&!ee(i)&&!$l(a)&&!$l(i)&&!Jb(a)&&!Jb(i)&&!Ic(a)&&!Ic(i)?Ne(i,a,r):(r||!(n in t))&&(t[n]=ye(e[n]))}return t}function z0(t,e){for(var r=t[0],n=1,i=t.length;n<i;n++)r=Ne(r,t[n],e);return r}function J(t,e){if(Object.assign)Object.assign(t,e);else for(var r in e)e.hasOwnProperty(r)&&r!==y2&&(t[r]=e[r]);return t}function Se(t,e,r){for(var n=$e(e),i=0,a=n.length;i<a;i++){var o=n[i];(r?e[o]!=null:t[o]==null)&&(t[o]=e[o])}return t}var U$=bn.createCanvas;function Ee(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r}return-1}function x2(t,e){var r=t.prototype;function n(){}n.prototype=e.prototype,t.prototype=new n;for(var i in r)r.hasOwnProperty(i)&&(t.prototype[i]=r[i]);t.prototype.constructor=t,t.superClass=e}function Bt(t,e,r){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&(r?e[a]!=null:t[a]==null)&&(t[a]=e[a])}else Se(t,e,r)}function Nr(t){return!t||typeof t=="string"?!1:typeof t.length=="number"}function R(t,e,r){if(t&&e)if(t.forEach&&t.forEach===F$)t.forEach(e,r);else if(t.length===+t.length)for(var n=0,i=t.length;n<i;n++)e.call(r,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(r,t[a],a,t)}function re(t,e,r){if(!t)return[];if(!e)return B0(t);if(t.map&&t.map===H$)return t.map(e,r);for(var n=[],i=0,a=t.length;i<a;i++)n.push(e.call(r,t[i],i,t));return n}function ci(t,e,r,n){if(t&&e){for(var i=0,a=t.length;i<a;i++)r=e.call(n,r,t[i],i,t);return r}}function tt(t,e,r){if(!t)return[];if(!e)return B0(t);if(t.filter&&t.filter===G$)return t.filter(e,r);for(var n=[],i=0,a=t.length;i<a;i++)e.call(r,t[i],i,t)&&n.push(t[i]);return n}function As(t,e,r){if(t&&e){for(var n=0,i=t.length;n<i;n++)if(e.call(r,t[n],n,t))return t[n]}}function $e(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}function Z$(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return function(){return t.apply(e,r.concat(m2.call(arguments)))}}var le=jp&&me(jp.bind)?jp.call.bind(jp.bind):Z$;function Ie(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return function(){return t.apply(this,e.concat(m2.call(arguments)))}}function ee(t){return Array.isArray?Array.isArray(t):vh.call(t)==="[object Array]"}function me(t){return typeof t=="function"}function se(t){return typeof t=="string"}function oy(t){return vh.call(t)==="[object String]"}function qe(t){return typeof t=="number"}function be(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function Jb(t){return!!r4[vh.call(t)]}function sn(t){return!!n4[vh.call(t)]}function $l(t){return typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.ownerDocument=="object"}function Nv(t){return t.colorStops!=null}function i4(t){return t.image!=null}function a4(t){return vh.call(t)==="[object RegExp]"}function Ir(t){return t!==t}function br(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0,n=t.length;r<n;r++)if(t[r]!=null)return t[r]}function pe(t,e){return t??e}function Sn(t,e,r){return t??e??r}function B0(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return m2.apply(t,e)}function Rv(t){if(typeof t=="number")return[t,t,t,t];var e=t.length;return e===2?[t[0],t[1],t[0],t[1]]:e===3?[t[0],t[1],t[2],t[1]]:t}function Rr(t,e){if(!t)throw new Error(e)}function kn(t){return t==null?null:typeof t.trim=="function"?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var o4="__ec_primitive__";function $d(t){t[o4]=!0}function Ic(t){return t[o4]}var $$=function(){function t(){this.data={}}return t.prototype.delete=function(e){var r=this.has(e);return r&&delete this.data[e],r},t.prototype.has=function(e){return this.data.hasOwnProperty(e)},t.prototype.get=function(e){return this.data[e]},t.prototype.set=function(e,r){return this.data[e]=r,this},t.prototype.keys=function(){return $e(this.data)},t.prototype.forEach=function(e){var r=this.data;for(var n in r)r.hasOwnProperty(n)&&e(r[n],n)},t}(),s4=typeof Map=="function";function Y$(){return s4?new Map:new $$}var l4=function(){function t(e){var r=ee(e);this.data=Y$();var n=this;e instanceof t?e.each(i):e&&R(e,i);function i(a,o){r?n.set(a,o):n.set(o,a)}}return t.prototype.hasKey=function(e){return this.data.has(e)},t.prototype.get=function(e){return this.data.get(e)},t.prototype.set=function(e,r){return this.data.set(e,r),r},t.prototype.each=function(e,r){this.data.forEach(function(n,i){e.call(r,n,i)})},t.prototype.keys=function(){var e=this.data.keys();return s4?Array.from(e):e},t.prototype.removeKey=function(e){this.data.delete(e)},t}();function de(t){return new l4(t)}function $c(t,e){for(var r=new t.constructor(t.length+e.length),n=0;n<t.length;n++)r[n]=t[n];for(var i=t.length,n=0;n<e.length;n++)r[n+i]=e[n];return r}function Ov(t,e){var r;if(Object.create)r=Object.create(t);else{var n=function(){};n.prototype=t,r=new n}return e&&J(r,e),r}function S2(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function he(t,e){return t.hasOwnProperty(e)}function Rt(){}var ud=180/Math.PI,X$=Number.EPSILON||Math.pow(2,-52);const q$=Object.freeze(Object.defineProperty({__proto__:null,EPSILON:X$,HashMap:l4,RADIAN_TO_DEGREE:ud,assert:Rr,bind:le,clone:ye,concatArray:$c,createCanvas:U$,createHashMap:de,createObject:Ov,curry:Ie,defaults:Se,disableUserSelect:S2,each:R,eqNaN:Ir,extend:J,filter:tt,find:As,guid:_2,hasOwn:he,indexOf:Ee,inherits:x2,isArray:ee,isArrayLike:Nr,isBuiltInObject:Jb,isDom:$l,isFunction:me,isGradientObject:Nv,isImagePatternObject:i4,isNumber:qe,isObject:be,isPrimitive:Ic,isRegExp:a4,isString:se,isStringSafe:oy,isTypedArray:sn,keys:$e,logError:O0,map:re,merge:Ne,mergeAll:z0,mixin:Bt,noop:Rt,normalizeCssArray:Rv,reduce:ci,retrieve:br,retrieve2:pe,retrieve3:Sn,setAsPrimitive:$d,slice:B0,trim:kn},Symbol.toStringTag,{value:"Module"}));function Ls(t,e){return t==null&&(t=0),e==null&&(e=0),[t,e]}function Hr(t,e){return t[0]=e[0],t[1]=e[1],t}function ya(t){return[t[0],t[1]]}function j0(t,e,r){return t[0]=e,t[1]=r,t}function ew(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function sy(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t}function Wo(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function Yd(t){return Math.sqrt(b2(t))}var K$=Yd;function b2(t){return t[0]*t[0]+t[1]*t[1]}var Q$=b2;function J$(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t}function eY(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t}function tY(t,e){return t[0]*e[0]+t[1]*e[1]}function cd(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function lu(t,e){var r=Yd(e);return r===0?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function ly(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var $a=ly;function u4(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var os=u4;function rY(t,e){return t[0]=-e[0],t[1]=-e[1],t}function hd(t,e,r,n){return t[0]=e[0]+n*(r[0]-e[0]),t[1]=e[1]+n*(r[1]-e[1]),t}function Ot(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t}function Ya(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function Xa(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}const nY=Object.freeze(Object.defineProperty({__proto__:null,add:ew,applyTransform:Ot,clone:ya,copy:Hr,create:Ls,dist:$a,distSquare:os,distance:ly,distanceSquare:u4,div:eY,dot:tY,len:Yd,lenSquare:b2,length:K$,lengthSquare:Q$,lerp:hd,max:Xa,min:Ya,mul:J$,negate:rY,normalize:lu,scale:cd,scaleAndAdd:sy,set:j0,sub:Wo},Symbol.toStringTag,{value:"Module"}));var Pu=function(){function t(e,r){this.target=e,this.topTarget=r&&r.topTarget}return t}(),iY=function(){function t(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(e){for(var r=e.target;r&&!r.draggable;)r=r.parent||r.__hostTarget;r&&(this._draggingTarget=r,r.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Pu(r,e),"dragstart",e.event))},t.prototype._drag=function(e){var r=this._draggingTarget;if(r){var n=e.offsetX,i=e.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,r.drift(a,o,e),this.handler.dispatchToElement(new Pu(r,e),"drag",e.event);var s=this.handler.findHover(n,i,r).target,l=this._dropTarget;this._dropTarget=s,r!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Pu(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new Pu(s,e),"dragenter",e.event))}},t.prototype._dragEnd=function(e){var r=this._draggingTarget;r&&(r.dragging=!1),this.handler.dispatchToElement(new Pu(r,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Pu(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},t}(),vi=function(){function t(e){e&&(this._$eventProcessor=e)}return t.prototype.on=function(e,r,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof r=="function"&&(i=n,n=r,r=null),!n||!e)return this;var o=this._$eventProcessor;r!=null&&o&&o.normalizeQuery&&(r=o.normalizeQuery(r)),a[e]||(a[e]=[]);for(var s=0;s<a[e].length;s++)if(a[e][s].h===n)return this;var l={h:n,query:r,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},u=a[e].length-1,c=a[e][u];return c&&c.callAtLast?a[e].splice(u,0,l):a[e].push(l),this},t.prototype.isSilent=function(e){var r=this._$handlers;return!r||!r[e]||!r[e].length},t.prototype.off=function(e,r){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(r){if(n[e]){for(var i=[],a=0,o=n[e].length;a<o;a++)n[e][a].h!==r&&i.push(n[e][a]);n[e]=i}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},t.prototype.trigger=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=r.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,r[0]);break;case 2:u.h.call(u.ctx,r[0],r[1]);break;default:u.h.apply(u.ctx,r);break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},t.prototype.triggerWithContext=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=r.length,s=r[o-1],l=i.length,u=0;u<l;u++){var c=i[u];if(!(a&&a.filter&&c.query!=null&&!a.filter(e,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,r[0]);break;case 2:c.h.call(s,r[0],r[1]);break;default:c.h.apply(s,r.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},t}(),aY=Math.log(2);function tw(t,e,r,n,i,a){var o=n+"-"+i,s=t.length;if(a.hasOwnProperty(o))return a[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~i)/aY);return t[r][l]}for(var u=n|1<<r,c=r+1;n&1<<c;)c++;for(var h=0,f=0,d=0;f<s;f++){var p=1<<f;p&i||(h+=(d%2?-1:1)*t[r][f]*tw(t,e-1,c,u,i|p,a),d++)}return a[o]=h,h}function Ek(t,e){var r=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},i=tw(r,8,0,0,0,n);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*tw(r,7,o===0?1:0,1<<o,1<<s,n)/i*e[o];return function(l,u,c){var h=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/h,l[1]=(u*a[3]+c*a[4]+a[5])/h}}}var uy="___zrEVENTSAVED",Px=[];function oY(t,e,r,n,i){return rw(Px,e,n,i,!0)&&rw(t,r,Px[0],Px[1])}function sY(t,e){t&&r(t),e&&r(e);function r(n){var i=n[uy];i&&(i.clearMarkers&&i.clearMarkers(),delete n[uy])}}function rw(t,e,r,n,i){if(e.getBoundingClientRect&&Ze.domSupported&&!c4(e)){var a=e[uy]||(e[uy]={}),o=lY(e,a),s=uY(o,a,i);if(s)return s(t,r,n),!0}return!1}function lY(t,e){var r=e.markers;if(r)return r;r=e.markers=[];for(var n=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>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;"),t.appendChild(o),r.push(o)}return e.clearMarkers=function(){R(r,function(c){c.parentNode&&c.parentNode.removeChild(c)})},r}function uY(t,e,r){for(var n=r?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),h=2*u,f=c.left,d=c.top;o.push(f,d),l=l&&a&&f===a[h]&&d===a[h+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=r?Ek(s,o):Ek(o,s))}function c4(t){return t.nodeName.toUpperCase()==="CANVAS"}var cY=/([&<>"'])/g,hY={"&":"&","<":"<",">":">",'"':""","'":"'"};function Zr(t){return t==null?"":(t+"").replace(cY,function(e,r){return hY[r]})}var fY=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,kx=[],dY=Ze.browser.firefox&&+Ze.browser.version.split(".")[0]<39;function nw(t,e,r,n){return r=r||{},n?Nk(t,e,r):dY&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):Nk(t,e,r),r}function Nk(t,e,r){if(Ze.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(c4(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(rw(kx,t,n,i)){r.zrX=kx[0],r.zrY=kx[1];return}}r.zrX=r.zrY=0}function w2(t){return t||window.event}function Yn(t,e,r){if(e=w2(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&nw(t,o,e,r)}else{nw(t,e,e,r);var a=vY(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&fY.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function vY(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,n=t.deltaY;if(r==null||n==null)return e;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function iw(t,e,r,n){t.addEventListener(e,r,n)}function pY(t,e,r,n){t.removeEventListener(e,r,n)}var co=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function Rk(t){return t.which===2||t.which===3}var gY=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,n){return this._doTrack(e,r,n),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:r,event:e},o=0,s=i.length;o<s;o++){var l=i[o],u=nw(n,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},t.prototype._recognize=function(e){for(var r in Dx)if(Dx.hasOwnProperty(r)){var n=Dx[r](this._track,e);if(n)return n}},t}();function Ok(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function mY(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var Dx={pinch:function(t,e){var r=t.length;if(r){var n=(t[r-1]||{}).points,i=(t[r-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=Ok(n)/Ok(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=mY(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function fr(){return[1,0,0,1,0,0]}function zv(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Bv(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Ii(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function zi(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function _o(t,e,r,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(r),h=Math.cos(r);return t[0]=i*h+s*c,t[1]=-i*c+s*h,t[2]=a*h+l*c,t[3]=-a*c+h*l,t[4]=h*(o-n[0])+c*(u-n[1])+n[0],t[5]=h*(u-n[1])-c*(o-n[0])+n[1],t}function V0(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function hi(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=r*l,t[4]=(n*s-o*i)*l,t[5]=(a*i-r*s)*l,t):null}function h4(t){var e=fr();return Bv(e,t),e}const yY=Object.freeze(Object.defineProperty({__proto__:null,clone:h4,copy:Bv,create:fr,identity:zv,invert:hi,mul:Ii,rotate:_o,scale:V0,translate:zi},Symbol.toStringTag,{value:"Module"}));var Te=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t}(),Cl=Math.min,_c=Math.max,aw=Math.abs,zk=["x","y"],_Y=["width","height"],Bs=new Te,js=new Te,Vs=new Te,Fs=new Te,Mn=f4(),jf=Mn.minTv,ow=Mn.maxTv,fd=[0,0],Ce=function(){function t(e,r,n,i){t.set(this,e,r,n,i)}return t.set=function(e,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),e.x=r,e.y=n,e.width=i,e.height=a,e},t.prototype.union=function(e){var r=Cl(e.x,this.x),n=Cl(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=_c(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=_c(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,n=e.width/r.width,i=e.height/r.height,a=fr();return zi(a,a,[-r.x,-r.y]),V0(a,a,[n,i]),zi(a,a,[e.x,e.y]),a},t.prototype.intersect=function(e,r,n){return t.intersect(this,e,r,n)},t.intersect=function(e,r,n,i){n&&Te.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!e||!r)return!1;e instanceof t||(e=t.set(xY,e.x,e.y,e.width,e.height)),r instanceof t||(r=t.set(SY,r.x,r.y,r.width,r.height));var s=!!n;Mn.reset(i,s);var l=Mn.touchThreshold,u=e.x+l,c=e.x+e.width-l,h=e.y+l,f=e.y+e.height-l,d=r.x+l,p=r.x+r.width-l,g=r.y+l,m=r.y+r.height-l;if(u>c||h>f||d>p||g>m)return!1;var y=!(c<d||p<u||f<g||m<h);return(s||a)&&(fd[0]=1/0,fd[1]=0,Bk(u,c,d,p,0,s,a,o),Bk(h,f,g,m,1,s,a,o),s&&Te.copy(n,y?Mn.useDir?Mn.dirMinTv:jf:ow)),y},t.contain=function(e,r,n){return r>=e.x&&r<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},t.prototype.contain=function(e,r){return t.contain(this,e,r)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){return e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height,e},t.applyTransform=function(e,r,n){if(!n){e!==r&&t.copy(e,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];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Bs.x=Vs.x=r.x,Bs.y=Fs.y=r.y,js.x=Fs.x=r.x+r.width,js.y=Vs.y=r.y+r.height,Bs.transform(n),Fs.transform(n),js.transform(n),Vs.transform(n),e.x=Cl(Bs.x,js.x,Vs.x,Fs.x),e.y=Cl(Bs.y,js.y,Vs.y,Fs.y);var l=_c(Bs.x,js.x,Vs.x,Fs.x),u=_c(Bs.y,js.y,Vs.y,Fs.y);e.width=l-e.x,e.height=u-e.y},t}(),xY=new Ce(0,0,0,0),SY=new Ce(0,0,0,0);function Bk(t,e,r,n,i,a,o,s){var l=aw(e-r),u=aw(n-t),c=Cl(l,u),h=zk[i],f=zk[1-i],d=_Y[i];e<r||n<t?l<u?(a&&(ow[h]=-l),s&&(o[h]=e,o[d]=0)):(a&&(ow[h]=u),s&&(o[h]=t,o[d]=0)):(o&&(o[h]=_c(t,r),o[d]=Cl(e,n)-o[h]),a&&(c<fd[0]||Mn.useDir)&&(fd[0]=Cl(c,fd[0]),(l<u||!Mn.bidirectional)&&(jf[h]=l,jf[f]=0,Mn.useDir&&Mn.calcDirMTV()),(l>=u||!Mn.bidirectional)&&(jf[h]=-u,jf[f]=0,Mn.useDir&&Mn.calcDirMTV())))}function f4(){var t=0,e=new Te,r=new Te,n={minTv:new Te,maxTv:new Te,useDir:!1,dirMinTv:new Te,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=_c(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),t=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(t),u=Math.cos(t),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*u/c,r.y=s*l/c,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||e.dot(r)>0)&&r.len()<o.len()&&o.copy(r)}};function i(a){return aw(a)<1e-10}return n}var d4="silent";function bY(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:wY}}function wY(){co(this.event)}var TY=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.handler=null,r}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(vi),rf=function(){function t(e,r){this.x=e,this.y=r}return t}(),CY=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ix=new Ce(0,0,0,0),v4=function(t){Y(e,t);function e(r,n,i,a,o){var s=t.call(this)||this;return s._hovered=new rf(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new TY,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new iY(s),s}return e.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(R(CY,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},e.prototype.mousemove=function(r){var n=r.zrX,i=r.zrY,a=p4(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 rf(n,i):this.findHover(n,i),u=l.target,c=this.proxy;c.setCursor&&c.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)},e.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})},e.prototype.resize=function(){this._hovered=new rf(0,0)},e.prototype.dispatch=function(r,n){var i=this[r];i&&i.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},e.prototype.dispatchToElement=function(r,n,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=bY(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)}))}},e.prototype.findHover=function(r,n,i){var a=this.storage.getDisplayList(),o=new rf(r,n);if(jk(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new Ce(r-u,n-u,l,l),h=a.length-1;h>=0;h--){var f=a[h];f!==i&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)&&(Ix.copy(f.getBoundingRect()),f.transform&&Ix.applyTransform(f.transform),Ix.intersect(c)&&s.push(f))}if(s.length)for(var d=4,p=Math.PI/12,g=Math.PI*2,m=0;m<u;m+=d)for(var y=0;y<g;y+=p){var _=r+m*Math.cos(y),S=n+m*Math.sin(y);if(jk(s,o,_,S,i),o.target)return o}}return o},e.prototype.processGesture=function(r,n){this._gestureMgr||(this._gestureMgr=new gY);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(r,this.findHover(r.zrX,r.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;r.gestureEvent=o;var s=new rf;s.target=a.target,this.dispatchToElement(s,o,a.event)}},e}(vi);R(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){v4.prototype[t]=function(e){var r=e.zrX,n=e.zrY,i=p4(this,r,n),a,o;if((t!=="mouseup"||!i)&&(a=this.findHover(r,n),o=a.target),t==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(t==="mouseup")this._upEl=o;else if(t==="click"){if(this._downEl!==this._upEl||!this._downPoint||$a(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,t,e)}});function MY(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n=t,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?d4:!0}return!1}function jk(t,e,r,n,i){for(var a=t.length-1;a>=0;a--){var o=t[a],s=void 0;if(o!==i&&!o.ignore&&(s=MY(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==d4)){e.target=o;break}}}function p4(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var g4=32,nf=7;function AY(t){for(var e=0;t>=g4;)e|=t&1,t>>=1;return t+e}function Vk(t,e,r,n){var i=e+1;if(i===r)return 1;if(n(t[i++],t[e])<0){for(;i<r&&n(t[i],t[i-1])<0;)i++;LY(t,e,i)}else for(;i<r&&n(t[i],t[i-1])>=0;)i++;return i-e}function LY(t,e,r){for(r--;e<r;){var n=t[e];t[e++]=t[r],t[r--]=n}}function Fk(t,e,r,n,i){for(n===e&&n++;n<r;n++){for(var a=t[n],o=e,s=n,l;o<s;)l=o+s>>>1,i(a,t[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=a}}function Ex(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])>0){for(s=n-i;l<s&&a(t,e[r+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(t,e[r+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var c=o+(l-o>>>1);a(t,e[r+c])>0?o=c+1:l=c}return l}function Nx(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])<0){for(s=i+1;l<s&&a(t,e[r+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l<s&&a(t,e[r+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var c=o+(l-o>>>1);a(t,e[r+c])<0?l=c:o=c+1}return l}function PY(t,e){var r=nf,n,i,a=0,o=[];n=[],i=[];function s(d,p){n[a]=d,i[a]=p,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]<i[d+1]&&d--;else if(i[d]>i[d+1])break;c(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]<i[d+1]&&d--,c(d)}}function c(d){var p=n[d],g=i[d],m=n[d+1],y=i[d+1];i[d]=g+y,d===a-3&&(n[d+1]=n[d+2],i[d+1]=i[d+2]),a--;var _=Nx(t[m],t,p,g,0,e);p+=_,g-=_,g!==0&&(y=Ex(t[p+g-1],t,m,y,y-1,e),y!==0&&(g<=y?h(p,g,m,y):f(p,g,m,y)))}function h(d,p,g,m){var y=0;for(y=0;y<p;y++)o[y]=t[d+y];var _=0,S=g,T=d;if(t[T++]=t[S++],--m===0){for(y=0;y<p;y++)t[T+y]=o[_+y];return}if(p===1){for(y=0;y<m;y++)t[T+y]=t[S+y];t[T+m]=o[_];return}for(var C=r,M,A,k;;){M=0,A=0,k=!1;do if(e(t[S],o[_])<0){if(t[T++]=t[S++],A++,M=0,--m===0){k=!0;break}}else if(t[T++]=o[_++],M++,A=0,--p===1){k=!0;break}while((M|A)<C);if(k)break;do{if(M=Nx(t[S],o,_,p,0,e),M!==0){for(y=0;y<M;y++)t[T+y]=o[_+y];if(T+=M,_+=M,p-=M,p<=1){k=!0;break}}if(t[T++]=t[S++],--m===0){k=!0;break}if(A=Ex(o[_],t,S,m,0,e),A!==0){for(y=0;y<A;y++)t[T+y]=t[S+y];if(T+=A,S+=A,m-=A,m===0){k=!0;break}}if(t[T++]=o[_++],--p===1){k=!0;break}C--}while(M>=nf||A>=nf);if(k)break;C<0&&(C=0),C+=2}if(r=C,r<1&&(r=1),p===1){for(y=0;y<m;y++)t[T+y]=t[S+y];t[T+m]=o[_]}else{if(p===0)throw new Error;for(y=0;y<p;y++)t[T+y]=o[_+y]}}function f(d,p,g,m){var y=0;for(y=0;y<m;y++)o[y]=t[g+y];var _=d+p-1,S=m-1,T=g+m-1,C=0,M=0;if(t[T--]=t[_--],--p===0){for(C=T-(m-1),y=0;y<m;y++)t[C+y]=o[y];return}if(m===1){for(T-=p,_-=p,M=T+1,C=_+1,y=p-1;y>=0;y--)t[M+y]=t[C+y];t[T]=o[S];return}for(var A=r;;){var k=0,E=0,D=!1;do if(e(o[S],t[_])<0){if(t[T--]=t[_--],k++,E=0,--p===0){D=!0;break}}else if(t[T--]=o[S--],E++,k=0,--m===1){D=!0;break}while((k|E)<A);if(D)break;do{if(k=p-Nx(o[S],t,d,p,p-1,e),k!==0){for(T-=k,_-=k,p-=k,M=T+1,C=_+1,y=k-1;y>=0;y--)t[M+y]=t[C+y];if(p===0){D=!0;break}}if(t[T--]=o[S--],--m===1){D=!0;break}if(E=m-Ex(t[_],o,0,m,m-1,e),E!==0){for(T-=E,S-=E,m-=E,M=T+1,C=S+1,y=0;y<E;y++)t[M+y]=o[C+y];if(m<=1){D=!0;break}}if(t[T--]=t[_--],--p===0){D=!0;break}A--}while(k>=nf||E>=nf);if(D)break;A<0&&(A=0),A+=2}if(r=A,r<1&&(r=1),m===1){for(T-=p,_-=p,M=T+1,C=_+1,y=p-1;y>=0;y--)t[M+y]=t[C+y];t[T]=o[S]}else{if(m===0)throw new Error;for(C=T-(m-1),y=0;y<m;y++)t[C+y]=o[y]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function hm(t,e,r,n){r||(r=0),n||(n=t.length);var i=n-r;if(!(i<2)){var a=0;if(i<g4){a=Vk(t,r,n,e),Fk(t,r,n,r+a,e);return}var o=PY(t,e),s=AY(i);do{if(a=Vk(t,r,n,e),a<s){var l=i;l>s&&(l=s),Fk(t,r,r+l,r+a,e),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var An=1,Vf=2,nc=4,Gk=!1;function Rx(){Gk||(Gk=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Hk(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var kY=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Hk}return t.prototype.traverse=function(e,r){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,r)},t.prototype.getDisplayList=function(e,r){r=r||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(r),n},t.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var r=this._roots,n=this._displayList,i=0,a=r.length;i<a;i++)this._updateAndAddDisplayable(r[i],null,e);n.length=this._displayListLen,hm(n,Hk)},t.prototype._updateAndAddDisplayable=function(e,r,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var i=e.getClipPath(),a=r&&r.length,o=0,s=e.__clipPaths;if(!e.ignoreClip&&(a||i)){if(s||(s=e.__clipPaths=[]),a)for(var l=0;l<r.length;l++)s[o++]=r[l];for(var u=i,c=e;u;)u.parent=c,u.updateTransform(),s[o++]=u,c=u,u=u.getClipPath()}if(s&&(s.length=o),e.childrenRef){for(var h=e.childrenRef(),f=0;f<h.length;f++){var d=h[f];e.__dirty&&(d.__dirty|=An),this._updateAndAddDisplayable(d,s,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(Rx(),p.z=0),isNaN(p.z2)&&(Rx(),p.z2=0),isNaN(p.zlevel)&&(Rx(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var g=e.getDecalElement&&e.getDecalElement();g&&this._updateAndAddDisplayable(g,s,n);var m=e.getTextGuideLine();m&&this._updateAndAddDisplayable(m,s,n);var y=e.getTextContent();y&&this._updateAndAddDisplayable(y,s,n)}},t.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},t.prototype.delRoot=function(e){if(e instanceof Array){for(var r=0,n=e.length;r<n;r++)this.delRoot(e[r]);return}var i=Ee(this._roots,e);i>=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),cy;cy=Ze.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var dd={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-dd.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?dd.bounceIn(t*2)*.5:dd.bounceOut(t*2-1)*.5+.5}},Vp=Math.pow,ss=Math.sqrt,hy=1e-8,m4=1e-4,Wk=ss(3),Fp=1/3,sa=Ls(),ei=Ls(),Ec=Ls();function Uo(t){return t>-hy&&t<hy}function y4(t){return t>hy||t<-hy}function ur(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function Uk(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function fy(t,e,r,n,i,a){var o=n+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,c=s*s-3*o*l,h=s*l-9*o*u,f=l*l-3*s*u,d=0;if(Uo(c)&&Uo(h))if(Uo(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[d++]=p)}else{var g=h*h-4*c*f;if(Uo(g)){var m=h/c,p=-s/o+m,y=-m/2;p>=0&&p<=1&&(a[d++]=p),y>=0&&y<=1&&(a[d++]=y)}else if(g>0){var _=ss(g),S=c*s+1.5*o*(-h+_),T=c*s+1.5*o*(-h-_);S<0?S=-Vp(-S,Fp):S=Vp(S,Fp),T<0?T=-Vp(-T,Fp):T=Vp(T,Fp);var p=(-s-(S+T))/(3*o);p>=0&&p<=1&&(a[d++]=p)}else{var C=(2*c*s-3*o*h)/(2*ss(c*c*c)),M=Math.acos(C)/3,A=ss(c),k=Math.cos(M),p=(-s-2*A*k)/(3*o),y=(-s+A*(k+Wk*Math.sin(M)))/(3*o),E=(-s+A*(k-Wk*Math.sin(M)))/(3*o);p>=0&&p<=1&&(a[d++]=p),y>=0&&y<=1&&(a[d++]=y),E>=0&&E<=1&&(a[d++]=E)}}return d}function _4(t,e,r,n,i){var a=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,s=3*e-3*t,l=0;if(Uo(o)){if(y4(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Uo(c))i[0]=-a/(2*o);else if(c>0){var h=ss(c),u=(-a+h)/(2*o),f=(-a-h)/(2*o);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function ys(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,h=(c-u)*i+u;a[0]=t,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=c,a[6]=l,a[7]=n}function x4(t,e,r,n,i,a,o,s,l,u,c){var h,f=.005,d=1/0,p,g,m,y;sa[0]=l,sa[1]=u;for(var _=0;_<1;_+=.05)ei[0]=ur(t,r,i,o,_),ei[1]=ur(e,n,a,s,_),m=os(sa,ei),m<d&&(h=_,d=m);d=1/0;for(var S=0;S<32&&!(f<m4);S++)p=h-f,g=h+f,ei[0]=ur(t,r,i,o,p),ei[1]=ur(e,n,a,s,p),m=os(ei,sa),p>=0&&m<d?(h=p,d=m):(Ec[0]=ur(t,r,i,o,g),Ec[1]=ur(e,n,a,s,g),y=os(Ec,sa),g<=1&&y<d?(h=g,d=y):f*=.5);return c&&(c[0]=ur(t,r,i,o,h),c[1]=ur(e,n,a,s,h)),ss(d)}function DY(t,e,r,n,i,a,o,s,l){for(var u=t,c=e,h=0,f=1/l,d=1;d<=l;d++){var p=d*f,g=ur(t,r,i,o,p),m=ur(e,n,a,s,p),y=g-u,_=m-c;h+=Math.sqrt(y*y+_*_),u=g,c=m}return h}function Sr(t,e,r,n){var i=1-n;return i*(i*t+2*n*e)+n*n*r}function sw(t,e,r,n){return 2*((1-n)*(e-t)+n*(r-e))}function IY(t,e,r,n,i){var a=t-2*e+r,o=2*(e-t),s=t-n,l=0;if(Uo(a)){if(y4(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Uo(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var h=ss(c),u=(-o+h)/(2*a),f=(-o-h)/(2*a);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function S4(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function Xd(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function b4(t,e,r,n,i,a,o,s,l){var u,c=.005,h=1/0;sa[0]=o,sa[1]=s;for(var f=0;f<1;f+=.05){ei[0]=Sr(t,r,i,f),ei[1]=Sr(e,n,a,f);var d=os(sa,ei);d<h&&(u=f,h=d)}h=1/0;for(var p=0;p<32&&!(c<m4);p++){var g=u-c,m=u+c;ei[0]=Sr(t,r,i,g),ei[1]=Sr(e,n,a,g);var d=os(ei,sa);if(g>=0&&d<h)u=g,h=d;else{Ec[0]=Sr(t,r,i,m),Ec[1]=Sr(e,n,a,m);var y=os(Ec,sa);m<=1&&y<h?(u=m,h=y):c*=.5}}return l&&(l[0]=Sr(t,r,i,u),l[1]=Sr(e,n,a,u)),ss(h)}function EY(t,e,r,n,i,a,o){for(var s=t,l=e,u=0,c=1/o,h=1;h<=o;h++){var f=h*c,d=Sr(t,r,i,f),p=Sr(e,n,a,f),g=d-s,m=p-l;u+=Math.sqrt(g*g+m*m),s=d,l=p}return u}var NY=/cubic-bezier\(([0-9,\.e ]+)\)/;function T2(t){var e=t&&NY.exec(t);if(e){var r=e[1].split(","),n=+kn(r[0]),i=+kn(r[1]),a=+kn(r[2]),o=+kn(r[3]);if(isNaN(n+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:fy(0,n,a,1,l,s)&&ur(0,i,o,1,s[0])}}}var RY=function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Rt,this.ondestroy=e.ondestroy||Rt,this.onrestart=e.onrestart||Rt,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=e-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=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=me(e)?e:dd[e]||T2(e)},t}(),w4=function(){function t(e){this.value=e}return t}(),OY=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new w4(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Yc=function(){function t(e){this._list=new OY,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==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 w4(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Zk={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 Ei(t){return t=Math.round(t),t<0?0:t>255?255:t}function zY(t){return t=Math.round(t),t<0?0:t>360?360:t}function qd(t){return t<0?0:t>1?1:t}function fm(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Ei(parseFloat(e)/100*255):Ei(parseInt(e,10))}function Ja(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?qd(parseFloat(e)/100):qd(parseFloat(e))}function Ox(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function Zo(t,e,r){return t+(e-t)*r}function $n(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function lw(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var T4=new Yc(20),Gp=null;function ku(t,e){Gp&&lw(Gp,e),Gp=T4.put(t,Gp||e.slice())}function $r(t,e){if(t){e=e||[];var r=T4.get(t);if(r)return lw(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in Zk)return lw(e,Zk[n]),ku(t,e),e;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)){$n(e,0,0,0,1);return}return $n(e,(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),ku(t,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){$n(e,0,0,0,1);return}return $n(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),ku(t,e),e}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(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?$n(e,+u[0],+u[1],+u[2],1):$n(e,0,0,0,1);c=Ja(u.pop());case"rgb":if(u.length>=3)return $n(e,fm(u[0]),fm(u[1]),fm(u[2]),u.length===3?c:Ja(u[3])),ku(t,e),e;$n(e,0,0,0,1);return;case"hsla":if(u.length!==4){$n(e,0,0,0,1);return}return u[3]=Ja(u[3]),uw(u,e),ku(t,e),e;case"hsl":if(u.length!==3){$n(e,0,0,0,1);return}return uw(u,e),ku(t,e),e;default:return}}$n(e,0,0,0,1)}}function uw(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=Ja(t[1]),i=Ja(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],$n(e,Ei(Ox(o,a,r+1/3)*255),Ei(Ox(o,a,r)*255),Ei(Ox(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function BY(t){if(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,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 c=((a-e)/6+o/2)/o,h=((a-r)/6+o/2)/o,f=((a-n)/6+o/2)/o;e===a?l=f-h:r===a?l=1/3+c-f:n===a&&(l=2/3+h-c),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return t[3]!=null&&d.push(t[3]),d}}function dy(t,e){var r=$r(t);if(r){for(var n=0;n<3;n++)e<0?r[n]=r[n]*(1-e)|0:r[n]=(255-r[n])*e+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return oi(r,r.length===4?"rgba":"rgb")}}function jY(t){var e=$r(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function vd(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=e[i],s=e[a],l=n-i;return r[0]=Ei(Zo(o[0],s[0],l)),r[1]=Ei(Zo(o[1],s[1],l)),r[2]=Ei(Zo(o[2],s[2],l)),r[3]=qd(Zo(o[3],s[3],l)),r}}var VY=vd;function C2(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=$r(e[i]),s=$r(e[a]),l=n-i,u=oi([Ei(Zo(o[0],s[0],l)),Ei(Zo(o[1],s[1],l)),Ei(Zo(o[2],s[2],l)),qd(Zo(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}var FY=C2;function eo(t,e,r,n){var i=$r(t);if(t)return i=BY(i),e!=null&&(i[0]=zY(me(e)?e(i[0]):e)),r!=null&&(i[1]=Ja(me(r)?r(i[1]):r)),n!=null&&(i[2]=Ja(me(n)?n(i[2]):n)),oi(uw(i),"rgba")}function Kd(t,e){var r=$r(t);if(r&&e!=null)return r[3]=qd(e),oi(r,"rgba")}function oi(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function Qd(t,e){var r=$r(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}function GY(){return oi([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var $k=new Yc(100);function vy(t){if(se(t)){var e=$k.get(t);return e||(e=dy(t,-.1),$k.put(t,e)),e}else if(Nv(t)){var r=J({},t);return r.colorStops=re(t.colorStops,function(n){return{offset:n.offset,color:dy(n.color,-.1)}}),r}return t}const HY=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:vd,fastMapToColor:VY,lerp:C2,lift:dy,liftColor:vy,lum:Qd,mapToColor:FY,modifyAlpha:Kd,modifyHSL:eo,parse:$r,parseCssFloat:Ja,parseCssInt:fm,random:GY,stringify:oi,toHex:jY},Symbol.toStringTag,{value:"Module"}));var py=Math.round;function Jd(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=$r(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e??1}}var Yk=1e-4;function $o(t){return t<Yk&&t>-Yk}function Hp(t){return py(t*1e3)/1e3}function cw(t){return py(t*1e4)/1e4}function WY(t){return"matrix("+Hp(t[0])+","+Hp(t[1])+","+Hp(t[2])+","+Hp(t[3])+","+cw(t[4])+","+cw(t[5])+")"}var UY={left:"start",right:"end",center:"middle",middle:"middle"};function ZY(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function $Y(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function YY(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function C4(t){return t&&!!t.image}function XY(t){return t&&!!t.svgElement}function M2(t){return C4(t)||XY(t)}function M4(t){return t.type==="linear"}function A4(t){return t.type==="radial"}function L4(t){return t&&(t.type==="linear"||t.type==="radial")}function F0(t){return"url(#"+t+")"}function P4(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function k4(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*ud,i=pe(t.scaleX,1),a=pe(t.scaleY,1),o=t.skewX||0,s=t.skewY||0,l=[];return(e||r)&&l.push("translate("+e+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+py(o*ud)+"deg, "+py(s*ud)+"deg)"),l.join(" ")}var qY=function(){return Ze.hasGlobalWindow&&me(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}}(),hw=Array.prototype.slice;function Fa(t,e,r){return(e-t)*r+t}function zx(t,e,r,n){for(var i=e.length,a=0;a<i;a++)t[a]=Fa(e[a],r[a],n);return t}function KY(t,e,r,n){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){t[o]||(t[o]=[]);for(var s=0;s<a;s++)t[o][s]=Fa(e[o][s],r[o][s],n)}return t}function Wp(t,e,r,n){for(var i=e.length,a=0;a<i;a++)t[a]=e[a]+r[a]*n;return t}function Xk(t,e,r,n){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){t[o]||(t[o]=[]);for(var s=0;s<a;s++)t[o][s]=e[o][s]+r[o][s]*n}return t}function QY(t,e){for(var r=t.length,n=e.length,i=r>n?e:t,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(r,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function JY(t,e,r){var n=t,i=e;if(!(!n.push||!i.push)){var a=n.length,o=i.length;if(a!==o){var s=a>o;if(s)n.length=o;else for(var l=a;l<o;l++)n.push(r===1?i[l]:hw.call(i[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(r===1)isNaN(n[l])&&(n[l]=i[l]);else for(var c=0;c<u;c++)isNaN(n[l][c])&&(n[l][c]=i[l][c])}}function pd(t){if(Nr(t)){var e=t.length;if(Nr(t[0])){for(var r=[],n=0;n<e;n++)r.push(hw.call(t[n]));return r}return hw.call(t)}return t}function dm(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=t[3]==null?1:t[3],"rgba("+t.join(",")+")"}function eX(t){return Nr(t&&t[0])?2:1}var Up=0,vm=1,D4=2,Ff=3,fw=4,dw=5,qk=6;function Kk(t){return t===fw||t===dw}function Zp(t){return t===vm||t===D4}var af=[0,0,0,0],tX=function(){function t(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=qk,l=r;if(Nr(r)){var u=eX(r);s=u,(u===1&&!qe(r[0])||u===2&&!qe(r[0][0]))&&(o=!0)}else if(qe(r)&&!Ir(r))s=Up;else if(se(r))if(!isNaN(+r))s=Up;else{var c=$r(r);c&&(l=c,s=Ff)}else if(Nv(r)){var h=J({},l);h.colorStops=re(r.colorStops,function(d){return{offset:d.offset,color:$r(d.color)}}),M4(r)?s=fw:A4(r)&&(s=dw),l=h}a===0?this.valType=s:(s!==this.valType||s===qk)&&(o=!0),this.discrete=this.discrete||o;var f={time:e,value:l,rawValue:r,percent:0};return n&&(f.easing=n,f.easingFunc=me(n)?n:dd[n]||T2(n)),i.push(f),f},t.prototype.prepare=function(e,r){var n=this.keyframes;this._needsSort&&n.sort(function(g,m){return g.time-m.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Zp(i),u=Kk(i),c=0;c<a;c++){var h=n[c],f=h.value,d=o.value;h.percent=h.time/e,s||(l&&c!==a-1?JY(f,d,i):u&&QY(f.colorStops,d.colorStops))}if(!s&&i!==dw&&r&&this.needsAnimate()&&r.needsAnimate()&&i===r.valType&&!r._finished){this._additiveTrack=r;for(var p=n[0].value,c=0;c<a;c++)i===Up?n[c].additiveValue=n[c].value-p:i===Ff?n[c].additiveValue=Wp([],n[c].value,p,-1):Zp(i)&&(n[c].additiveValue=i===vm?Wp([],n[c].value,p,-1):Xk([],n[c].value,p,-1))}},t.prototype.step=function(e,r){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,i=n?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===Ff,c,h=this._lastFr,f=Math.min,d,p;if(s===1)d=p=o[0];else{if(r<0)c=0;else if(r<this._lastFrP){var g=f(h+1,s-1);for(c=g;c>=0&&!(o[c].percent<=r);c--);c=f(c,s-2)}else{for(c=h;c<s&&!(o[c].percent>r);c++);c=f(c-1,s-2)}p=o[c+1],d=o[c]}if(d&&p){this._lastFr=c,this._lastFrP=r;var m=p.percent-d.percent,y=m===0?1:f((r-d.percent)/m,1);p.easingFunc&&(y=p.easingFunc(y));var _=n?this._additiveValue:u?af:e[l];if((Zp(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)e[l]=y<1?d.rawValue:p.rawValue;else if(Zp(a))a===vm?zx(_,d[i],p[i],y):KY(_,d[i],p[i],y);else if(Kk(a)){var S=d[i],T=p[i],C=a===fw;e[l]={type:C?"linear":"radial",x:Fa(S.x,T.x,y),y:Fa(S.y,T.y,y),colorStops:re(S.colorStops,function(A,k){var E=T.colorStops[k];return{offset:Fa(A.offset,E.offset,y),color:dm(zx([],A.color,E.color,y))}}),global:T.global},C?(e[l].x2=Fa(S.x2,T.x2,y),e[l].y2=Fa(S.y2,T.y2,y)):e[l].r=Fa(S.r,T.r,y)}else if(u)zx(_,d[i],p[i],y),n||(e[l]=dm(_));else{var M=Fa(d[i],p[i],y);n?this._additiveValue=M:e[l]=M}n&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,n=this.propName,i=this._additiveValue;r===Up?e[n]=e[n]+i:r===Ff?($r(e[n],af),Wp(af,af,i,1),e[n]=dm(af)):r===vm?Wp(e[n],e[n],i,1):r===D4&&Xk(e[n],e[n],i,1)},t}(),A2=function(){function t(e,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&i){O0("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,n){return this.whenWithKeys(e,r,$e(r),n)},t.prototype.whenWithKeys=function(e,r,n,i){for(var a=this._tracks,o=0;o<n.length;o++){var s=n[o],l=a[s];if(!l){l=a[s]=new tX(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var h=c.keyframes,f=h[h.length-1];u=f&&f.value,c.valType===Ff&&u&&(u=dm(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,pd(u),i),this._trackKeys.push(s)}l.addKeyframe(e,pd(r[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,n=0;n<r;n++)e[n].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,r=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,r)for(var n=0;n<r.length;n++)r[n].call(this)},t.prototype._setTracksFinished=function(){for(var e=this._tracks,r=this._trackKeys,n=0;n<r.length;n++)e[r[n]].setFinished()},t.prototype._getAdditiveTrack=function(e){var r,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var a=n[i].getTrack(e);a&&(r=a)}return r},t.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var h=u[c-1];h&&(r._target[s.propName]=h.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var f=new RY({life:i,loop:this._loop,delay:this._delay||0,onframe:function(d){r._started=2;var p=r._additiveAnimators;if(p){for(var g=!1,m=0;m<p.length;m++)if(p[m]._clip){g=!0;break}g||(r._additiveAnimators=null)}for(var m=0;m<n.length;m++)n[m].step(r._target,d);var y=r._onframeCbs;if(y)for(var m=0;m<y.length;m++)y[m](r._target,d)},ondestroy:function(){r._doneCallback()}});this._clip=f,this.animation&&this.animation.addClip(f),e&&f.setEasing(e)}else this._doneCallback();return this}},t.prototype.stop=function(e){if(this._clip){var r=this._clip;e&&r.onframe(1),this._abortedCallback()}},t.prototype.delay=function(e){return this._delay=e,this},t.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},t.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},t.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(e){return this._tracks[e]},t.prototype.getTracks=function(){var e=this;return re(this._trackKeys,function(r){return e._tracks[r]})},t.prototype.stopTracks=function(e,r){if(!e.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,a=0;a<e.length;a++){var o=n[e[a]];o&&!o.isFinished()&&(r?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<i.length;a++)if(!n[i[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},t.prototype.saveTo=function(e,r,n){if(e){r=r||this._trackKeys;for(var i=0;i<r.length;i++){var a=r[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(e[a]=pd(l.rawValue))}}}},t.prototype.__changeFinalValue=function(e,r){r=r||$e(e);for(var n=0;n<r.length;n++){var i=r[n],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},t}();function xc(){return new Date().getTime()}var rX=function(t){Y(e,t);function e(r){var n=t.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 e.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},e.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},e.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}},e.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},e.prototype.update=function(r){for(var n=xc()-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())},e.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(cy(n),!r._paused&&r.update())}cy(n)},e.prototype.start=function(){this._running||(this._time=xc(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=xc(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=xc()-this._pauseStart,this._paused=!1)},e.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},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,n){n=n||{},this.start();var i=new A2(r,n.loop);return this.addAnimator(i),i},e}(vi),nX=300,Bx=Ze.domSupported,jx=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=re(t,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:t,touch:e,pointer:n}}(),Qk={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Jk=!1;function vw(t){var e=t.pointerType;return e==="pen"||e==="touch"}function iX(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Vx(t){t&&(t.zrByTouch=!0)}function aX(t,e){return Yn(t.dom,new oX(t,e),!0)}function I4(t,e){for(var r=e,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return n}var oX=function(){function t(e,r){this.stopPropagation=Rt,this.stopImmediatePropagation=Rt,this.preventDefault=Rt,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),bi={mousedown:function(t){t=Yn(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Yn(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Yn(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=Yn(this.dom,t);var e=t.toElement||t.relatedTarget;I4(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Jk=!0,t=Yn(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Jk||(t=Yn(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=Yn(this.dom,t),Vx(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),bi.mousemove.call(this,t),bi.mousedown.call(this,t)},touchmove:function(t){t=Yn(this.dom,t),Vx(t),this.handler.processGesture(t,"change"),bi.mousemove.call(this,t)},touchend:function(t){t=Yn(this.dom,t),Vx(t),this.handler.processGesture(t,"end"),bi.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<nX&&bi.click.call(this,t)},pointerdown:function(t){bi.mousedown.call(this,t)},pointermove:function(t){vw(t)||bi.mousemove.call(this,t)},pointerup:function(t){bi.mouseup.call(this,t)},pointerout:function(t){vw(t)||bi.mouseout.call(this,t)}};R(["click","dblclick","contextmenu"],function(t){bi[t]=function(e){e=Yn(this.dom,e),this.trigger(t,e)}});var pw={pointermove:function(t){vw(t)||pw.mousemove.call(this,t)},pointerup:function(t){pw.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function sX(t,e){var r=e.domHandlers;Ze.pointerEventsSupported?R(jx.pointer,function(n){pm(e,n,function(i){r[n].call(t,i)})}):(Ze.touchEventsSupported&&R(jx.touch,function(n){pm(e,n,function(i){r[n].call(t,i),iX(e)})}),R(jx.mouse,function(n){pm(e,n,function(i){i=w2(i),e.touching||r[n].call(t,i)})}))}function lX(t,e){Ze.pointerEventsSupported?R(Qk.pointer,r):Ze.touchEventsSupported||R(Qk.mouse,r);function r(n){function i(a){a=w2(a),I4(t,a.target)||(a=aX(t,a),e.domHandlers[n].call(t,a))}pm(e,n,i,{capture:!0})}}function pm(t,e,r,n){t.mounted[e]=r,t.listenerOpts[e]=n,iw(t.domTarget,e,r,n)}function Fx(t){var e=t.mounted;for(var r in e)e.hasOwnProperty(r)&&pY(t.domTarget,r,e[r],t.listenerOpts[r]);t.mounted={}}var eD=function(){function t(e,r){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=r}return t}(),uX=function(t){Y(e,t);function e(r,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=r,i.painterRoot=n,i._localHandlerScope=new eD(r,bi),Bx&&(i._globalHandlerScope=new eD(document,pw)),sX(i,i._localHandlerScope),i}return e.prototype.dispose=function(){Fx(this._localHandlerScope),Bx&&Fx(this._globalHandlerScope)},e.prototype.setCursor=function(r){this.dom.style&&(this.dom.style.cursor=r||"default")},e.prototype.__togglePointerCapture=function(r){if(this.__mayPointerCapture=null,Bx&&+this.__pointerCapturing^+r){this.__pointerCapturing=r;var n=this._globalHandlerScope;r?lX(this,n):Fx(n)}},e}(vi),E4=1;Ze.hasGlobalWindow&&(E4=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var gy=E4,gw=.4,mw="#333",yw="#ccc",cX="#eee",tD=zv,rD=5e-5;function Gs(t){return t>rD||t<-rD}var Hs=[],Du=[],Gx=fr(),Hx=Math.abs,qa=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return Gs(this.rotation)||Gs(this.x)||Gs(this.y)||Gs(this.scaleX-1)||Gs(this.scaleY-1)||Gs(this.skewX)||Gs(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(tD(n),this.invTransform=null);return}n=n||fr(),r?this.getLocalTransform(n):tD(n),e&&(r?Ii(n,e,n):Bv(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Hs);var n=Hs[0]<0?-1:1,i=Hs[1]<0?-1:1,a=((Hs[0]-n)*r+n)/Hs[0]||0,o=((Hs[1]-i)*r+i)/Hs[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||fr(),hi(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||fr(),Ii(Du,e.invTransform,r),r=Du);var n=this.originX,i=this.originY;(n||i)&&(Gx[4]=n,Gx[5]=i,Ii(Du,r,Gx),Du[4]-=n,Du[5]-=i,r=Du),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var n=[e,r],i=this.invTransform;return i&&Ot(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,r){var n=[e,r],i=this.transform;return i&&Ot(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&Hx(e[0]-1)>1e-10&&Hx(e[3]-1)>1e-10?Math.sqrt(Hx(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){my(this,e)},t.getLocalTransform=function(e,r){r=r||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,h=e.y,f=e.skewX?Math.tan(e.skewX):0,d=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var p=n+s,g=i+l;r[4]=-p*a-f*g*o,r[5]=-g*o-d*p*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=d*a,r[2]=f*o,u&&_o(r,r,u),r[4]+=n+c,r[5]+=i+h,r},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),ba=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function my(t,e){for(var r=0;r<ba.length;r++){var n=ba[r];t[n]=e[n]}}function _a(t){$p||($p=new Yc(100)),t=t||uo;var e=$p.get(t);return e||(e={font:t,strWidthCache:new Yc(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:bn.measureText("国",t).width,asciiCharWidth:bn.measureText("a",t).width},$p.put(t,e)),e}var $p;function hX(t){if(!(Wx>=nD)){t=t||uo;for(var e=[],r=+new Date,n=0;n<=127;n++)e[n]=bn.measureText(String.fromCharCode(n),t).width;var i=+new Date-r;return i>16?Wx=nD:i>2&&Wx++,e}}var Wx=0,nD=5;function N4(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=hX(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function xa(t,e){var r=t.strWidthCache,n=r.get(e);return n==null&&(n=bn.measureText(e,t.font).width,r.put(e,n)),n}function iD(t,e,r,n){var i=xa(_a(e),t),a=jv(e),o=Xc(0,i,r),s=Nl(0,a,n),l=new Ce(o,s,i,a);return l}function G0(t,e,r,n){var i=((t||"")+"").split(`
|
||
`),a=i.length;if(a===1)return iD(i[0],e,r,n);for(var o=new Ce(0,0,0,0),s=0;s<i.length;s++){var l=iD(i[s],e,r,n);s===0?o.copy(l):o.union(l)}return o}function Xc(t,e,r,n){return r==="right"?n?t+=e:t-=e:r==="center"&&(n?t+=e/2:t-=e/2),t}function Nl(t,e,r,n){return r==="middle"?n?t+=e/2:t-=e/2:r==="bottom"&&(n?t+=e:t-=e),t}function jv(t){return _a(t).stWideCharWidth}function Bi(t,e){return typeof t=="string"?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function yy(t,e,r){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,c="left",h="top";if(n instanceof Array)l+=Bi(n[0],r.width),u+=Bi(n[1],r.height),c=null,h=null;else switch(n){case"left":l-=i,u+=s,c="right",h="middle";break;case"right":l+=i+o,u+=s,h="middle";break;case"top":l+=o/2,u-=i,c="center",h="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=o-i,u+=s,c="right",h="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,h="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",h="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=c,t.verticalAlign=h,t}var Ux="__zr_normal__",Zx=ba.concat(["ignore"]),fX=ci(ba,function(t,e){return t[e]=!0,t},{ignore:!1}),Iu={},dX=new Ce(0,0,0,0),Yp=[],H0=function(){function t(e){this.id=_2(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){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;a.copyTransform(r);var c=n.position!=null,h=n.autoOverflowArea,f=void 0;if((h||c)&&(f=dX,n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Iu,n,f):yy(Iu,n,f),a.x=Iu.x,a.y=Iu.y,o=Iu.align,s=Iu.verticalAlign;var d=n.origin;if(d&&n.rotation!=null){var p=void 0,g=void 0;d==="center"?(p=f.width*.5,g=f.height*.5):(p=Bi(d[0],f.width),g=Bi(d[1],f.height)),u=!0,a.originX=-a.x+p+(i?0:f.x),a.originY=-a.y+g+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var m=n.offset;m&&(a.x+=m[0],a.y+=m[1],u||(a.originX=-m[0],a.originY=-m[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(h){var _=y.overflowRect=y.overflowRect||new Ce(0,0,0,0);a.getLocalTransform(Yp),hi(Yp,Yp),Ce.copy(_,f),_.applyTransform(Yp)}else y.overflowRect=null;var S=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,T=void 0,C=void 0,M=void 0;S&&this.canBeInsideText()?(T=n.insideFill,C=n.insideStroke,(T==null||T==="auto")&&(T=this.getInsideTextFill()),(C==null||C==="auto")&&(C=this.getInsideTextStroke(T),M=!0)):(T=n.outsideFill,C=n.outsideStroke,(T==null||T==="auto")&&(T=this.getOutsideFill()),(C==null||C==="auto")&&(C=this.getOutsideStroke(T),M=!0)),T=T||"#000",(T!==y.fill||C!==y.stroke||M!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=T,y.stroke=C,y.autoStroke=M,y.align=o,y.verticalAlign=s,r.setDefaultTextStyle(y)),r.__dirty|=An,l&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?yw:mw},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&$r(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,oi(n,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},J(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(be(e))for(var n=e,i=$e(n),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,e[o])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var r=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==Ux)){var o=i.targetName,s=o?r[o]:r;i.saveTo(s)}}},t.prototype._innerSaveToNormal=function(e){var r=this._normalState;r||(r=this._normalState={}),e.textConfig&&!r.textConfig&&(r.textConfig=this.textConfig),this._savePrimaryToNormal(e,r,Zx)},t.prototype._savePrimaryToNormal=function(e,r,n){for(var i=0;i<n.length;i++){var a=n[i];e[a]!=null&&!(a in r)&&(r[a]=this[a])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(Ux,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===Ux,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(Ee(s,e)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){O0("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,f=this._textGuide;return h&&h.useState(e,r,n,c),f&&f.useState(e,r,n,c),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~An),u}}},t.prototype.useStates=function(e,r,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(e[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=e[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,e)),c||(c=this.states[u]),c&&i.push(c)}var h=i[o-1],f=!!(h&&h.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(i),p=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(e.join(","),d,this._normalState,!1,!r&&!this.__inHover&&p&&p.duration>0,p);var g=this._textContent,m=this._textGuide;g&&g.useStates(e,r,f),m&&m.useStates(e,r,f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~An)}},t.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var r=e.__hostTarget;e=r?e.ignoreHostSilent?null:r:e.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var r=this.animators[e];r.targetName&&r.changeTarget(this[r.targetName])}},t.prototype.removeState=function(e){var r=Ee(this.currentStates,e);if(r>=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},t.prototype.replaceState=function(e,r,n){var i=this.currentStates.slice(),a=Ee(i,e),o=Ee(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},n,i=0;i<e.length;i++){var a=e[i];J(r,a),a.textConfig&&(n=n||{},J(n,a.textConfig))}return n&&(r.textConfig=n),r},t.prototype._applyStateObj=function(e,r,n,i,a,o){var s=!(r&&i);r&&r.textConfig?(this.textConfig=J({},i?this.textConfig:n.textConfig),J(this.textConfig,r.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,c=0;c<Zx.length;c++){var h=Zx[c],f=a&&fX[h];r&&r[h]!=null?f?(u=!0,l[h]=r[h]):this[h]=r[h]:s&&n[h]!=null&&(f?(u=!0,l[h]=n[h]):this[h]=n[h])}if(!a)for(var c=0;c<this.animators.length;c++){var d=this.animators[c],p=d.targetName;d.getLoop()||d.__changeFinalValue(p?(r||n)[p]:r||n)}u&&this._transitionState(e,l,o)},t.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var r=this.__zr;r&&e.addSelfToZr(r),e.__zr=r,e.__hostTarget=this}},t.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},t.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(e){var r=this._textContent;r!==e&&(r&&r!==e&&this.removeTextContent(),e.innerTransformable=new qa,this._attachComponent(e),this._textContent=e,this.markRedraw())},t.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),J(this.textConfig,e),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=An;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var r=this._textContent,n=this._textGuide;r&&(r.__inHover=e),n&&(n.__inHover=e)},t.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var r=this.animators;if(r)for(var n=0;n<r.length;n++)e.animation.addAnimator(r[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var r=this.animators;if(r)for(var n=0;n<r.length;n++)e.animation.removeAnimator(r[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},t.prototype.animate=function(e,r,n){var i=e?this[e]:this,a=new A2(i,r,n);return e&&(a.targetName=e),this.addAnimator(a,e),a},t.prototype.addAnimator=function(e,r){var n=this.__zr,i=this;e.during(function(){i.updateDuringAnimation(r)}).done(function(){var a=i.animators,o=Ee(a,e);o>=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var n=this.animators,i=n.length,a=[],o=0;o<i;o++){var s=n[o];!e||e===s.scope?s.stop(r):a.push(s)}return this.animators=a,this},t.prototype.animateTo=function(e,r,n){$x(this,e,r,n)},t.prototype.animateFrom=function(e,r,n){$x(this,e,r,n,!0)},t.prototype._transitionState=function(e,r,n,i){for(var a=$x(this,r,n,i),o=0;o<a.length;o++)a[o].__fromStateTransition=e},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=function(){var e=t.prototype;e.type="element",e.name="",e.ignore=e.silent=e.ignoreHostSilent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=An;function r(n,i,a,o){Object.defineProperty(e,n,{get:function(){if(!this[i]){var l=this[i]=[];s(this,l)}return this[i]},set:function(l){this[a]=l[0],this[o]=l[1],this[i]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[a]},set:function(c){l[a]=c}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(c){l[o]=c}})}}Object.defineProperty&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),t}();Bt(H0,vi);Bt(H0,qa);function $x(t,e,r,n,i){r=r||{};var a=[];R4(t,"",t,e,r,n,a,i);var o=a.length,s=!1,l=r.done,u=r.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},h=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&r.during&&a[0].during(function(p,g){r.during(g)});for(var f=0;f<a.length;f++){var d=a[f];c&&d.done(c),h&&d.aborted(h),r.force&&d.duration(r.duration),d.start(r.easing)}return a}function Yx(t,e,r){for(var n=0;n<r;n++)t[n]=e[n]}function vX(t){return Nr(t[0])}function pX(t,e,r){if(Nr(e[r]))if(Nr(t[r])||(t[r]=[]),sn(e[r])){var n=e[r].length;t[r].length!==n&&(t[r]=new e[r].constructor(n),Yx(t[r],e[r],n))}else{var i=e[r],a=t[r],o=i.length;if(vX(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?Yx(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else Yx(a,i,o);a.length=i.length}else t[r]=e[r]}function gX(t,e){return t===e||Nr(t)&&Nr(e)&&mX(t,e)}function mX(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function R4(t,e,r,n,i,a,o,s){for(var l=$e(n),u=i.duration,c=i.delay,h=i.additive,f=i.setToFinal,d=!be(a),p=t.animators,g=[],m=0;m<l.length;m++){var y=l[m],_=n[y];if(_!=null&&r[y]!=null&&(d||a[y]))if(be(_)&&!Nr(_)&&!Nv(_)){if(e){s||(r[y]=_,t.updateDuringAnimation(e));continue}R4(t,y,r[y],_,i,a&&a[y],o,s)}else g.push(y);else s||(r[y]=_,t.updateDuringAnimation(e),g.push(y))}var S=g.length;if(!h&&S)for(var T=0;T<p.length;T++){var C=p[T];if(C.targetName===e){var M=C.stopTracks(g);if(M){var A=Ee(p,C);p.splice(A,1)}}}if(i.force||(g=tt(g,function(I){return!gX(n[I],r[I])}),S=g.length),S>0||i.force&&!o.length){var k=void 0,E=void 0,D=void 0;if(s){E={},f&&(k={});for(var T=0;T<S;T++){var y=g[T];E[y]=r[y],f?k[y]=n[y]:r[y]=n[y]}}else if(f){D={};for(var T=0;T<S;T++){var y=g[T];D[y]=pd(r[y]),pX(r,n,y)}}var C=new A2(r,!1,!1,h?tt(p,function(z){return z.targetName===e}):null);C.targetName=e,i.scope&&(C.scope=i.scope),f&&k&&C.whenWithKeys(0,k,g),D&&C.whenWithKeys(0,D,g),C.whenWithKeys(u??500,s?E:n,g).delay(c||0),t.addAnimator(C,e),o.push(C)}}var _e=function(t){Y(e,t);function e(r){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(r){return this._children[r]},e.prototype.childOfName=function(r){for(var n=this._children,i=0;i<n.length;i++)if(n[i].name===r)return n[i]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(r){return r&&r!==this&&r.parent!==this&&(this._children.push(r),this._doAdd(r)),this},e.prototype.addBefore=function(r,n){if(r&&r!==this&&r.parent!==this&&n&&n.parent===this){var i=this._children,a=i.indexOf(n);a>=0&&(i.splice(a,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,n){var i=Ee(this._children,r);return i>=0&&this.replaceAt(n,i),this},e.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},e.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()},e.prototype.remove=function(r){var n=this.__zr,i=this._children,a=Ee(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i<r.length;i++){var a=r[i];n&&a.removeSelfFromZr(n),a.parent=null}return r.length=0,this},e.prototype.eachChild=function(r,n){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];r.call(n,o,a)}return this},e.prototype.traverse=function(r,n){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=r.call(n,a);a.isGroup&&!o&&a.traverse(r,n)}return this},e.prototype.addSelfToZr=function(r){t.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.addSelfToZr(r)}},e.prototype.removeSelfFromZr=function(r){t.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.removeSelfFromZr(r)}},e.prototype.getBoundingRect=function(r){for(var n=new Ce(0,0,0,0),i=r||this._children,a=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(Ce.applyTransform(n,u,c),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},e}(H0);_e.prototype.type="group";/*!
|
||
* ZRender, a high performance 2d drawing library.
|
||
*
|
||
* Copyright (c) 2013, Baidu Inc.
|
||
* All rights reserved.
|
||
*
|
||
* LICENSE
|
||
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
||
*/var gm={},Ml={};function yX(t){delete Ml[t]}function _X(t){if(!t)return!1;if(typeof t=="string")return Qd(t,1)<gw;if(t.colorStops){for(var e=t.colorStops,r=0,n=e.length,i=0;i<n;i++)r+=Qd(e[i].color,1);return r/=n,r<gw}return!1}var xX=function(){function t(e,r,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=r,this.id=e;var a=new kY,o=n.renderer||"canvas";gm[o]||(o=$e(gm)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new gm[o](r,a,n,e),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!Ze.node&&!Ze.worker&&!l?new uX(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,h=c==null||c==="auto"?Ze.touchEventsSupported:!!c,f=44,d;h&&(d=pe(n.pointerSize,f)),this.handler=new v4(a,s,u,s.root,d),this.animation=new rX({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return t.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},t.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(e,r){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,r),this.refresh())},t.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=_X(e))},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(e){this._darkMode=e},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},t.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},t.prototype.flush=function(){this._disposed||this._flush(!1)},t.prototype._flush=function(e){var r,n=xc();this._needsRefresh&&(r=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(r=!0,this.refreshHoverImmediately());var i=xc();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},t.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){if(!this._disposed)return this.handler.findHover(e,r)},t.prototype.on=function(e,r,n){return this._disposed||this.handler.on(e,r,n),this},t.prototype.off=function(e,r){this._disposed||this.handler.off(e,r)},t.prototype.trigger=function(e,r){this._disposed||this.handler.trigger(e,r)},t.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),r=0;r<e.length;r++)e[r]instanceof _e&&e[r].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},t.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,yX(this.id))},t}();function _w(t,e){var r=new xX(_2(),t,e);return Ml[r.id]=r,r}function SX(t){t.dispose()}function bX(){for(var t in Ml)Ml.hasOwnProperty(t)&&Ml[t].dispose();Ml={}}function wX(t){return Ml[t]}function O4(t,e){gm[t]=e}var xw;function z4(t){if(typeof xw=="function")return xw(t)}function B4(t){xw=t}var TX="6.0.0";const CX=Object.freeze(Object.defineProperty({__proto__:null,dispose:SX,disposeAll:bX,getElementSSRData:z4,getInstance:wX,init:_w,registerPainter:O4,registerSSRDataGetter:B4,version:TX},Symbol.toStringTag,{value:"Module"}));var aD=1e-4,j4=20;function MX(t){return t.replace(/^\s+|\s+$/g,"")}var Rn=Math.min,Gt=Math.max,ca=Math.abs;function it(t,e,r,n){var i=e[0],a=e[1],o=r[0],s=r[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(t<=i)return o;if(t>=a)return s}else{if(t>=i)return o;if(t<=a)return s}else{if(t===i)return o;if(t===a)return s}return(t-i)/l*u+o}var oe=AX;function AX(t,e,r){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return _y(t,e,r)}function _y(t,e,r){return se(t)?MX(t).match(/%$/)?parseFloat(t)/100*e+(r||0):parseFloat(t):t==null?NaN:+t}function Ht(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),j4),t=(+t).toFixed(e),r?t:+t}function Dn(t){return t.sort(function(e,r){return e-r}),t}function Li(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return V4(t)}function V4(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),n=r>0?+e.slice(r+1):0,i=r>0?r:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function L2(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(ca(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function LX(t,e,r){if(!t[e])return 0;var n=F4(t,r);return n[e]||0}function F4(t,e){var r=ci(t,function(d,p){return d+(isNaN(p)?0:p)},0);if(r===0)return[];for(var n=Math.pow(10,e),i=re(t,function(d){return(isNaN(d)?0:d)/r*n*100}),a=n*100,o=re(i,function(d){return Math.floor(d)}),s=ci(o,function(d,p){return d+p},0),l=re(i,function(d,p){return d-o[p]});s<a;){for(var u=Number.NEGATIVE_INFINITY,c=null,h=0,f=l.length;h<f;++h)l[h]>u&&(u=l[h],c=h);++o[c],l[c]=0,++s}return re(o,function(d){return d/n})}function PX(t,e){var r=Math.max(Li(t),Li(e)),n=t+e;return r>j4?n:Ht(n,r)}var Sw=9007199254740991;function P2(t){var e=Math.PI*2;return(t%e+e)%e}function qc(t){return t>-aD&&t<aD}var kX=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function La(t){if(t instanceof Date)return t;if(se(t)){var e=kX.exec(t);if(!e)return new Date(NaN);if(e[8]){var r=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(r-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,r,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(t==null)return new Date(NaN);return new Date(Math.round(t))}function G4(t){return Math.pow(10,W0(t))}function W0(t){if(t===0)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function k2(t,e){var r=W0(t),n=Math.pow(10,r),i=t/n,a;return e?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,t=a*n,r>=-20?+t.toFixed(r<0?-r:0):t}function mm(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i}function bw(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,n=0;n<t.length;){for(var i=t[n].interval,a=t[n].close,o=0;o<2;o++)i[o]<=e&&(i[o]=e,a[o]=o?1:1-r),e=i[o],r=a[o];i[0]===i[1]&&a[0]*a[1]!==1?t.splice(n,1):n++}return t;function s(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&s(l,u,1))}}function wa(t){var e=parseFloat(t);return e==t&&(e!==0||!se(t)||t.indexOf("x")<=0)?e:NaN}function D2(t){return!isNaN(wa(t))}function H4(){return Math.round(Math.random()*9)}function W4(t,e){return e===0?t:W4(e,t%e)}function oD(t,e){return t==null?e:e==null?t:t*e/W4(t,e)}var DX="[ECharts] ",IX=typeof console<"u"&&console.warn&&console.log;function EX(t,e,r){IX&&console[t](DX+e)}function U4(t,e){EX("error",t)}function at(t){throw new Error(t)}function sD(t,e,r){return(e-t)*r+t}var Z4="series\0",$4="\0_ec_\0";function gt(t){return t instanceof Array?t:t==null?[]:[t]}function Yl(t,e,r){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,i=r.length;n<i;n++){var a=r[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}var lD=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function ph(t){return be(t)&&!ee(t)&&!(t instanceof Date)?t.value:t}function NX(t){return be(t)&&!(t instanceof Array)}function Y4(t,e,r){var n=r==="normalMerge",i=r==="replaceMerge",a=r==="replaceAll";t=t||[],e=(e||[]).slice();var o=de();R(e,function(l,u){if(!be(l)){e[u]=null;return}});var s=RX(t,o,r);return(n||i)&&OX(s,t,o,e),n&&zX(s,e),n||i?BX(s,e,i):a&&jX(s,e),VX(s),s}function RX(t,e,r){var n=[];if(r==="replaceAll")return n;for(var i=0;i<t.length;i++){var a=t[i];a&&a.id!=null&&e.set(a.id,i),n.push({existing:r==="replaceMerge"||ev(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function OX(t,e,r,n){R(n,function(i,a){if(!(!i||i.id==null)){var o=gd(i.id),s=r.get(o);if(s!=null){var l=t[s];Rr(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=e[s],n[a]=null}}})}function zX(t,e){R(e,function(r,n){if(!(!r||r.name==null))for(var i=0;i<t.length;i++){var a=t[i].existing;if(!t[i].newOption&&a&&(a.id==null||r.id==null)&&!ev(r)&&!ev(a)&&X4("name",a,r)){t[i].newOption=r,e[n]=null;return}}})}function BX(t,e,r){R(e,function(n){if(n){for(var i,a=0;(i=t[a])&&(i.newOption||ev(i.existing)||i.existing&&n.id!=null&&!X4("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=r):t.push({newOption:n,brandNew:r,existing:null,keyInfo:null}),a++}})}function jX(t,e){R(e,function(r){t.push({newOption:r,brandNew:!0,existing:null,keyInfo:null})})}function VX(t){var e=de();R(t,function(r){var n=r.existing;n&&e.set(n.id,r)}),R(t,function(r){var n=r.newOption;Rr(!n||n.id==null||!e.get(n.id)||e.get(n.id)===r,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&e.set(n.id,r),!r.keyInfo&&(r.keyInfo={})}),R(t,function(r,n){var i=r.existing,a=r.newOption,o=r.keyInfo;if(be(a)){if(o.name=a.name!=null?gd(a.name):i?i.name:Z4+n,i)o.id=gd(i.id);else if(a.id!=null)o.id=gd(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,r)}})}function X4(t,e,r){var n=rr(e[t],null),i=rr(r[t],null);return n!=null&&i!=null&&n===i}function gd(t){return rr(t,"")}function rr(t,e){return t==null?e:se(t)?t:qe(t)||oy(t)?t+"":e}function I2(t){var e=t.name;return!!(e&&e.indexOf(Z4))}function ev(t){return t&&t.id!=null&&gd(t.id).indexOf($4)===0}function FX(t){return $4+t}function GX(t,e,r){R(t,function(n){var i=n.newOption;be(i)&&(n.keyInfo.mainType=e,n.keyInfo.subType=HX(e,i,n.existing,r))})}function HX(t,e,r,n){var i=e.type?e.type:r?r.subType:n.determineSubType(t,e);return i}function WX(t,e){var r={},n={};return i(t||[],r),i(e||[],n,r),[a(r),a(n)];function i(o,s,l){for(var u=0,c=o.length;u<c;u++){var h=rr(o[u].seriesId,null);if(h==null)return;for(var f=gt(o[u].dataIndex),d=l&&l[h],p=0,g=f.length;p<g;p++){var m=f[p];d&&d[m]?d[m]=null:(s[h]||(s[h]={}))[m]=1}}}function a(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var c=a(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function Xl(t,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return ee(e.dataIndex)?re(e.dataIndex,function(r){return t.indexOfRawIndex(r)}):t.indexOfRawIndex(e.dataIndex);if(e.name!=null)return ee(e.name)?re(e.name,function(r){return t.indexOfName(r)}):t.indexOfName(e.name)}function Fe(){var t="__ec_inner_"+UX++;return function(e){return e[t]||(e[t]={})}}var UX=H4();function Nc(t,e,r){var n=E2(e,r),i=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,s=o,l=r?r.defaultMainType:null;return!i&&l&&a.set(l,{}),a.each(function(u,c){var h=gh(t,c,u,{useDefault:l===c,enableAll:r&&r.enableAll!=null?r.enableAll:!0,enableNone:r&&r.enableNone!=null?r.enableNone:!0});s[c+"Models"]=h.models,s[c+"Model"]=h.models[0]}),s}function E2(t,e){var r;if(se(t)){var n={};n[t+"Index"]=0,r=n}else r=t;var i=de(),a={},o=!1;return R(r,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],h=(u[2]||"").toLowerCase();if(!(!c||!h||e&&e.includeMainTypes&&Ee(e.includeMainTypes,c)<0)){o=o||!!c;var f=i.get(c)||i.set(c,{});f[h]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var kt={useDefault:!0,enableAll:!1,enableNone:!1},ZX={useDefault:!1,enableAll:!0,enableNone:!0};function gh(t,e,r,n){n=n||kt;var i=r.index,a=r.id,o=r.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=t.getComponent(e))?[l]:[],s}if(i==="none"||i===!1){if(n.enableNone)return s.models=[],s;i=-1}return i==="all"&&(n.enableAll?i=a=o=null:i=-1),s.models=t.queryComponents({mainType:e,index:i,id:a,name:o}),s}function q4(t,e,r){t.setAttribute?t.setAttribute(e,r):t[e]=r}function $X(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function YX(t){return t==="auto"?Ze.domSupported?"html":"richText":t||"html"}function ww(t,e){var r=de(),n=[];return R(t,function(i){var a=e(i);(r.get(a)||(n.push(a),r.set(a,[]))).push(i)}),{keys:n,buckets:r}}function K4(t,e,r,n,i){var a=e==null||e==="auto";if(n==null)return n;if(qe(n)){var o=sD(r||0,n,i);return Ht(o,a?Math.max(Li(r||0),Li(n)):e)}else{if(se(n))return i<1?r:n;for(var s=[],l=r,u=n,c=Math.max(l?l.length:0,u.length),h=0;h<c;++h){var f=t.getDimensionInfo(h);if(f&&f.type==="ordinal")s[h]=(i<1&&l?l:u)[h];else{var d=l&&l[h]?l[h]:0,p=u[h],o=sD(d,p,i);s[h]=Ht(o,a?Math.max(Li(d),Li(p)):e)}}return s}}var ls=function(){function t(){}return t.prototype.reset=function(e,r,n,i){return this._list=e,this._step=i=i||1,this._idx=r,this._end=n??(i>0?e.length:0),this.item=null,this.key=NaN,this},t.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},t}();function Xx(t){t.option=t.parentModel=t.ecModel=null}var XX=".",Ws="___EC__COMPONENT__CONTAINER___",Q4="___EC__EXTENDED_CLASS___";function ha(t){var e={main:"",sub:""};if(t){var r=t.split(XX);e.main=r[0]||"",e.sub=r[1]||""}return e}function qX(t){Rr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function KX(t){return!!(t&&t[Q4])}function N2(t,e){t.$constructor=t,t.extend=function(r){var n=this,i;return QX(n)?i=function(a){Y(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(r.$constructor||n).apply(this,arguments)},x2(i,this)),J(i.prototype,r),i[Q4]=!0,i.extend=this.extend,i.superCall=tq,i.superApply=rq,i.superClass=n,i}}function QX(t){return me(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function J4(t,e){t.extend=e.extend}var JX=Math.round(Math.random()*10);function eq(t){var e=["__\0is_clz",JX++].join("_");t.prototype[e]=!0,t.isInstance=function(r){return!!(r&&r[e])}}function tq(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return this.superClass.prototype[e].apply(t,r)}function rq(t,e,r){return this.superClass.prototype[e].apply(t,r)}function U0(t){var e={};t.registerClass=function(n){var i=n.type||n.prototype.type;if(i){qX(i),n.prototype.type=i;var a=ha(i);if(!a.sub)e[a.main]=n;else if(a.sub!==Ws){var o=r(a);o[a.sub]=n}}return n},t.getClass=function(n,i,a){var o=e[n];if(o&&o[Ws]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+n+"."+(i||"")+" is used but not imported.":n+".type should be specified.");return o},t.getClassesByMainType=function(n){var i=ha(n),a=[],o=e[i.main];return o&&o[Ws]?R(o,function(s,l){l!==Ws&&a.push(s)}):a.push(o),a},t.hasClass=function(n){var i=ha(n);return!!e[i.main]},t.getAllClassMainTypes=function(){var n=[];return R(e,function(i,a){n.push(a)}),n},t.hasSubTypes=function(n){var i=ha(n),a=e[i.main];return a&&a[Ws]};function r(n){var i=e[n.main];return(!i||!i[Ws])&&(i=e[n.main]={},i[Ws]=!0),i}}function ql(t,e){for(var r=0;r<t.length;r++)t[r][1]||(t[r][1]=t[r][0]);return e=e||!1,function(n,i,a){for(var o={},s=0;s<t.length;s++){var l=t[s][1];if(!(i&&Ee(i,l)>=0||a&&Ee(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var nq=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],iq=ql(nq),aq=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return iq(this,e,r)},t}(),Tw=new Yc(50);function oq(t){if(typeof t=="string"){var e=Tw.get(t);return e&&e.image}else return t}function R2(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=Tw.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!Z0(e)&&a.pending.push(o)):(e=bn.loadImage(t,uD,uD),e.__zrImageSrc=t,Tw.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function uD(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var r=t.pending[e],n=r.cb;n&&n(this,r.cbPayload),r.hostEl.dirty()}t.pending.length=0}function Z0(t){return t&&t.width&&t.height}var qx=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function sq(t,e,r,n,i){var a={};return ej(a,t,e,r,n,i),a.text}function ej(t,e,r,n,i,a){if(!r){t.text="",t.isTruncated=!1;return}var o=(e+"").split(`
|
||
`);a=tj(r,n,i,a);for(var s=!1,l={},u=0,c=o.length;u<c;u++)rj(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;t.text=o.join(`
|
||
`),t.isTruncated=s}function tj(t,e,r,n){n=n||{};var i=J({},n);r=pe(r,"..."),i.maxIterations=pe(n.maxIterations,2);var a=i.minChar=pe(n.minChar,0),o=i.fontMeasureInfo=_a(e),s=o.asciiCharWidth;i.placeholder=pe(n.placeholder,"");for(var l=t=Math.max(0,t-1),u=0;u<a&&l>=s;u++)l-=s;var c=xa(o,r);return c>l&&(r="",c=0),l=t-c,i.ellipsis=r,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=t,i}function rj(t,e,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){t.textLine="",t.isTruncated=!1;return}var o=xa(a,e);if(o<=n){t.textLine=e,t.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){e+=r.ellipsis;break}var l=s===0?lq(e,i,a):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=xa(a,e)}e===""&&(e=r.placeholder),t.textLine=e,t.isTruncated=!0}function lq(t,e,r){for(var n=0,i=0,a=t.length;i<a&&n<e;i++)n+=N4(r,t.charCodeAt(i));return i}function uq(t,e,r,n){var i=O2(t),a=e.overflow,o=e.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=e.font,c=a==="truncate",h=jv(u),f=pe(e.lineHeight,h),d=e.lineOverflow==="truncate",p=!1,g=e.width;g==null&&r!=null&&(g=r-s);var m=e.height;m==null&&n!=null&&(m=n-l);var y;g!=null&&(a==="break"||a==="breakAll")?y=i?nj(i,e.font,g,a==="breakAll",0).lines:[]:y=i?i.split(`
|
||
`):[];var _=y.length*f;if(m==null&&(m=_),_>m&&d){var S=Math.floor(m/f);p=p||y.length>S,y=y.slice(0,S),_=y.length*f}if(i&&c&&g!=null)for(var T=tj(g,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),C={},M=0;M<y.length;M++)rj(C,y[M],T),y[M]=C.textLine,p=p||C.isTruncated;for(var A=m,k=0,E=_a(u),M=0;M<y.length;M++)k=Math.max(xa(E,y[M]),k);g==null&&(g=k);var D=g;return A+=l,D+=s,{lines:y,height:m,outerWidth:D,outerHeight:A,lineHeight:f,calculatedLineHeight:h,contentWidth:k,contentHeight:_,width:g,isTruncated:p}}var cq=function(){function t(){}return t}(),cD=function(){function t(e){this.tokens=[],e&&(this.tokens=e)}return t}(),hq=function(){function t(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return t}();function fq(t,e,r,n,i){var a=new hq,o=O2(t);if(!o)return a;var s=e.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,c=e.width;c==null&&r!=null&&(c=r-l);var h=e.height;h==null&&n!=null&&(h=n-u);for(var f=e.overflow,d=(f==="break"||f==="breakAll")&&c!=null?{width:c,accumWidth:0,breakAll:f==="breakAll"}:null,p=qx.lastIndex=0,g;(g=qx.exec(o))!=null;){var m=g.index;m>p&&Kx(a,o.substring(p,m),e,d),Kx(a,g[2],e,d,g[1]),p=qx.lastIndex}p<o.length&&Kx(a,o.substring(p,o.length),e,d);var y=[],_=0,S=0,T=f==="truncate",C=e.lineOverflow==="truncate",M={};function A(ve,Ge,xe){ve.width=Ge,ve.lineHeight=xe,_+=xe,S=Math.max(S,Ge)}e:for(var k=0;k<a.lines.length;k++){for(var E=a.lines[k],D=0,I=0,z=0;z<E.tokens.length;z++){var O=E.tokens[z],V=O.styleName&&e.rich[O.styleName]||{},G=O.textPadding=V.padding,F=G?G[1]+G[3]:0,U=O.font=V.font||e.font;O.contentHeight=jv(U);var j=pe(V.height,O.contentHeight);if(O.innerHeight=j,G&&(j+=G[0]+G[2]),O.height=j,O.lineHeight=Sn(V.lineHeight,e.lineHeight,j),O.align=V&&V.align||i,O.verticalAlign=V&&V.verticalAlign||"middle",C&&h!=null&&_+O.lineHeight>h){var W=a.lines.length;z>0?(E.tokens=E.tokens.slice(0,z),A(E,I,D),a.lines=a.lines.slice(0,k+1)):a.lines=a.lines.slice(0,k),a.isTruncated=a.isTruncated||a.lines.length<W;break e}var H=V.width,X=H==null||H==="auto";if(typeof H=="string"&&H.charAt(H.length-1)==="%")O.percentWidth=H,y.push(O),O.contentWidth=xa(_a(U),O.text);else{if(X){var K=V.backgroundColor,ne=K&&K.image;ne&&(ne=oq(ne),Z0(ne)&&(O.width=Math.max(O.width,ne.width*j/ne.height)))}var ie=T&&c!=null?c-I:null;ie!=null&&ie<O.width?!X||ie<F?(O.text="",O.width=O.contentWidth=0):(ej(M,O.text,ie-F,U,e.ellipsis,{minChar:e.truncateMinChar}),O.text=M.text,a.isTruncated=a.isTruncated||M.isTruncated,O.width=O.contentWidth=xa(_a(U),O.text)):O.contentWidth=xa(_a(U),O.text)}O.width+=F,I+=O.width,V&&(D=Math.max(D,O.lineHeight))}A(E,I,D)}a.outerWidth=a.width=pe(c,S),a.outerHeight=a.height=pe(h,_),a.contentHeight=_,a.contentWidth=S,a.outerWidth+=l,a.outerHeight+=u;for(var k=0;k<y.length;k++){var O=y[k],ue=O.percentWidth;O.width=parseInt(ue,10)/100*a.width}return a}function Kx(t,e,r,n,i){var a=e==="",o=i&&r.rich[i]||{},s=t.lines,l=o.font||r.font,u=!1,c,h;if(n){var f=o.padding,d=f?f[1]+f[3]:0;if(o.width!=null&&o.width!=="auto"){var p=Bi(o.width,n.width)+d;s.length>0&&p+n.accumWidth>n.width&&(c=e.split(`
|
||
`),u=!0),n.accumWidth=p}else{var g=nj(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+d,h=g.linesWidths,c=g.lines}}c||(c=e.split(`
|
||
`));for(var m=_a(l),y=0;y<c.length;y++){var _=c[y],S=new cq;if(S.styleName=i,S.text=_,S.isLineHolder=!_&&!a,typeof o.width=="number"?S.width=o.width:S.width=h?h[y]:xa(m,_),!y&&!u){var T=(s[s.length-1]||(s[0]=new cD)).tokens,C=T.length;C===1&&T[0].isLineHolder?T[0]=S:(_||!C||a)&&T.push(S)}else s.push(new cD([S]))}}function dq(t){var e=t.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var vq=ci(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function pq(t){return dq(t)?!!vq[t]:!0}function nj(t,e,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,h=_a(e),f=0;f<t.length;f++){var d=t.charAt(f);if(d===`
|
||
`){l&&(s+=l,c+=u),a.push(s),o.push(c),s="",l="",u=0,c=0;continue}var p=N4(h,d.charCodeAt(0)),g=n?!1:!pq(d);if(a.length?c+p>r:i+c+p>r){c?(s||l)&&(g?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=d,u+=p,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=d,c=p)):g?(a.push(l),o.push(u),l=d,u=p):(a.push(d),o.push(p));continue}c+=p,g?(l+=d,u+=p):(l&&(s+=l,l="",u=0),s+=d)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function hD(t,e,r,n,i,a){if(t.baseX=r,t.baseY=n,t.outerWidth=t.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;Ce.set(fD,Xc(r,o,i),Nl(n,s,a),o,s),Ce.intersect(e,fD,null,dD);var l=dD.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=Xc(l.x,l.width,i,!0),t.baseY=Nl(l.y,l.height,a,!0)}}var fD=new Ce(0,0,0,0),dD={outIntersectRect:{},clamp:!0};function O2(t){return t!=null?t+="":t=""}function gq(t){var e=O2(t.text),r=t.font,n=xa(_a(r),e),i=jv(r);return Cw(t,n,i,null)}function Cw(t,e,r,n){var i=new Ce(Xc(t.x||0,e,t.textAlign),Nl(t.y||0,r,t.textBaseline),e,r),a=n??(ij(t)?t.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function ij(t){var e=t.stroke;return e!=null&&e!=="none"&&t.lineWidth>0}var Mw="__zr_style_"+Math.round(Math.random()*10),Rl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},$0={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Rl[Mw]=!0;var vD=["z","z2","invisible"],mq=["invisible"],fi=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=$e(r),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(r[a]):t.prototype.attrKV.call(this,a,r[a])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(r,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&yq(this,r,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(r,n){return this.rectContain(r,n)},e.prototype.traverse=function(r,n){r.call(n,this)},e.prototype.rectContain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},e.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new Ce(0,0,0,0)),n?Ce.applyTransform(r,i,n):r.copy(i),(o||s||l)&&(r.width+=o*2+Math.abs(s),r.height+=o*2+Math.abs(l),r.x=Math.min(r.x,r.x+s-o),r.y=Math.min(r.y,r.y+l-o));var u=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-u),r.y=Math.floor(r.y-u),r.width=Math.ceil(r.width+1+u*2),r.height=Math.ceil(r.height+1+u*2))}return r},e.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new Ce(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(r){return this.animate("style",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(r,n){r!=="style"?t.prototype.attrKV.call(this,r,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(r,n){return typeof r=="string"?this.style[r]=n:J(this.style,r),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=Vf,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&Vf)},e.prototype.styleUpdated=function(){this.__dirty&=~Vf},e.prototype.createStyle=function(r){return Ov(Rl,r)},e.prototype.useStyle=function(r){r[Mw]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},e.prototype.isStyleObject=function(r){return r[Mw]},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(r,n,vD)},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.style?o?a?u=n.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(u,n.style)):l&&(u=i.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var h=$e(c),f=0;f<h.length;f++){var d=h[f];d in u&&(u[d]=u[d],this.style[d]=c[d])}for(var p=$e(u),f=0;f<p.length;f++){var d=p[f];this.style[d]=this.style[d]}this._transitionState(r,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var g=this.__inHover?mq:vD,f=0;f<g.length;f++){var d=g[f];n&&n[d]!=null?this[d]=n[d]:l&&i[d]!=null&&(this[d]=i[d])}},e.prototype._mergeStates=function(r){for(var n=t.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},e.prototype._mergeStyle=function(r,n){return J(r,n),r},e.prototype.getAnimationStyleProps=function(){return $0},e.initDefaultProps=function(){var r=e.prototype;r.type="displayable",r.invisible=!1,r.z=0,r.z2=0,r.zlevel=0,r.culling=!1,r.cursor="pointer",r.rectHover=!1,r.incremental=!1,r._rect=null,r.dirtyRectTolerance=0,r.__dirty=An|Vf}(),e}(H0),Qx=new Ce(0,0,0,0),Jx=new Ce(0,0,0,0);function yq(t,e,r){return Qx.copy(t.getBoundingRect()),t.transform&&Qx.applyTransform(t.transform),Jx.width=e,Jx.height=r,!Qx.intersect(Jx)}var vn=Math.min,pn=Math.max,e1=Math.sin,t1=Math.cos,Us=Math.PI*2,Xp=Ls(),qp=Ls(),Kp=Ls();function Y0(t,e,r){if(t.length!==0){for(var n=t[0],i=n[0],a=n[0],o=n[1],s=n[1],l=1;l<t.length;l++)n=t[l],i=vn(i,n[0]),a=pn(a,n[0]),o=vn(o,n[1]),s=pn(s,n[1]);e[0]=i,e[1]=o,r[0]=a,r[1]=s}}function pD(t,e,r,n,i,a){i[0]=vn(t,r),i[1]=vn(e,n),a[0]=pn(t,r),a[1]=pn(e,n)}var gD=[],mD=[];function _q(t,e,r,n,i,a,o,s,l,u){var c=_4,h=ur,f=c(t,r,i,o,gD);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;d<f;d++){var p=h(t,r,i,o,gD[d]);l[0]=vn(p,l[0]),u[0]=pn(p,u[0])}f=c(e,n,a,s,mD);for(var d=0;d<f;d++){var g=h(e,n,a,s,mD[d]);l[1]=vn(g,l[1]),u[1]=pn(g,u[1])}l[0]=vn(t,l[0]),u[0]=pn(t,u[0]),l[0]=vn(o,l[0]),u[0]=pn(o,u[0]),l[1]=vn(e,l[1]),u[1]=pn(e,u[1]),l[1]=vn(s,l[1]),u[1]=pn(s,u[1])}function xq(t,e,r,n,i,a,o,s){var l=S4,u=Sr,c=pn(vn(l(t,r,i),1),0),h=pn(vn(l(e,n,a),1),0),f=u(t,r,i,c),d=u(e,n,a,h);o[0]=vn(t,i,f),o[1]=vn(e,a,d),s[0]=pn(t,i,f),s[1]=pn(e,a,d)}function Sq(t,e,r,n,i,a,o,s,l){var u=Ya,c=Xa,h=Math.abs(i-a);if(h%Us<1e-4&&h>1e-4){s[0]=t-r,s[1]=e-n,l[0]=t+r,l[1]=e+n;return}if(Xp[0]=t1(i)*r+t,Xp[1]=e1(i)*n+e,qp[0]=t1(a)*r+t,qp[1]=e1(a)*n+e,u(s,Xp,qp),c(l,Xp,qp),i=i%Us,i<0&&(i=i+Us),a=a%Us,a<0&&(a=a+Us),i>a&&!o?a+=Us:i<a&&o&&(i+=Us),o){var f=a;a=i,i=f}for(var d=0;d<a;d+=Math.PI/2)d>i&&(Kp[0]=t1(d)*r+t,Kp[1]=e1(d)*n+e,u(s,Kp,s),c(l,Kp,l))}var yt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Zs=[],$s=[],Xi=[],Co=[],qi=[],Ki=[],r1=Math.min,n1=Math.max,Ys=Math.cos,Xs=Math.sin,Ra=Math.abs,Aw=Math.PI,Eo=Aw*2,i1=typeof Float32Array<"u",of=[];function a1(t){var e=Math.round(t/Aw*1e8)/1e8;return e%2*Aw}function X0(t,e){var r=a1(t[0]);r<0&&(r+=Eo);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=Eo?i=r+Eo:e&&r-i>=Eo?i=r-Eo:!e&&r>i?i=r+(Eo-a1(r-i)):e&&r<i&&(i=r-(Eo-a1(i-r))),t[0]=r,t[1]=i}var Ta=function(){function t(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(e,r,n){n=n||0,n>0&&(this._ux=Ra(n/gy/e)||0,this._uy=Ra(n/gy/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(yt.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=Ra(e-this._xi),i=Ra(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(yt.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(yt.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(yt.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),of[0]=i,of[1]=a,X0(of,o),i=of[0],a=of[1];var s=a-i;return this.addData(yt.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=Ys(a)*n+e,this._yi=Xs(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(yt.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(yt.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){if(this._saveData){var r=e.length;!(this.data&&this.data.length===r)&&i1&&(this.data=new Float32Array(r));for(var n=0;n<r;n++)this.data[n]=e[n];this._len=r}},t.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var r=e.length,n=0,i=this._len,a=0;a<r;a++)n+=e[a].len();var o=this.data;if(i1&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(i+n),i>0&&o))for(var s=0;s<i;s++)this.data[s]=o[s];for(var a=0;a<r;a++)for(var l=e[a].data,s=0;s<l.length;s++)this.data[i++]=l[s];this._len=i}},t.prototype.addData=function(e,r,n,i,a,o,s,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var h=0;h<arguments.length;h++)c[this._len++]=arguments[h]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r<this._len;r++)e[r]=this.data[r];this.data=e}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,i1&&this._len>11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){Xi[0]=Xi[1]=qi[0]=qi[1]=Number.MAX_VALUE,Co[0]=Co[1]=Ki[0]=Ki[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(r=e[o],n=e[o+1],i=r,a=n),s){case yt.M:r=i=e[o++],n=a=e[o++],qi[0]=i,qi[1]=a,Ki[0]=i,Ki[1]=a;break;case yt.L:pD(r,n,e[o],e[o+1],qi,Ki),r=e[o++],n=e[o++];break;case yt.C:_q(r,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],qi,Ki),r=e[o++],n=e[o++];break;case yt.Q:xq(r,n,e[o++],e[o++],e[o],e[o+1],qi,Ki),r=e[o++],n=e[o++];break;case yt.A:var u=e[o++],c=e[o++],h=e[o++],f=e[o++],d=e[o++],p=e[o++]+d;o+=1;var g=!e[o++];l&&(i=Ys(d)*h+u,a=Xs(d)*f+c),Sq(u,c,h,f,d,p,g,qi,Ki),r=Ys(p)*h+u,n=Xs(p)*f+c;break;case yt.R:i=r=e[o++],a=n=e[o++];var m=e[o++],y=e[o++];pD(i,a,i+m,a+y,qi,Ki);break;case yt.Z:r=i,n=a;break}Ya(Xi,Xi,qi),Xa(Co,Co,Ki)}return o===0&&(Xi[0]=Xi[1]=Co[0]=Co[1]=0),new Ce(Xi[0],Xi[1],Co[0]-Xi[0],Co[1]-Xi[1])},t.prototype._calculateLength=function(){var e=this.data,r=this._len,n=this._ux,i=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,h=0,f=0;f<r;){var d=e[f++],p=f===1;p&&(a=e[f],o=e[f+1],s=a,l=o);var g=-1;switch(d){case yt.M:a=s=e[f++],o=l=e[f++];break;case yt.L:{var m=e[f++],y=e[f++],_=m-a,S=y-o;(Ra(_)>n||Ra(S)>i||f===r-1)&&(g=Math.sqrt(_*_+S*S),a=m,o=y);break}case yt.C:{var T=e[f++],C=e[f++],m=e[f++],y=e[f++],M=e[f++],A=e[f++];g=DY(a,o,T,C,m,y,M,A,10),a=M,o=A;break}case yt.Q:{var T=e[f++],C=e[f++],m=e[f++],y=e[f++];g=EY(a,o,T,C,m,y,10),a=m,o=y;break}case yt.A:var k=e[f++],E=e[f++],D=e[f++],I=e[f++],z=e[f++],O=e[f++],V=O+z;f+=1,p&&(s=Ys(z)*D+k,l=Xs(z)*I+E),g=n1(D,I)*r1(Eo,Math.abs(O)),a=Ys(V)*D+k,o=Xs(V)*I+E;break;case yt.R:{s=a=e[f++],l=o=e[f++];var G=e[f++],F=e[f++];g=G*2+F*2;break}case yt.Z:{var _=s-a,S=l-o;g=Math.sqrt(_*_+S*S),a=s,o=l;break}}g>=0&&(u[h++]=g,c+=g)}return this._pathLen=c,c},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,h,f,d=r<1,p,g,m=0,y=0,_,S=0,T,C;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,_=r*g,!_)))e:for(var M=0;M<o;){var A=n[M++],k=M===1;switch(k&&(u=n[M],c=n[M+1],s=u,l=c),A!==yt.L&&S>0&&(e.lineTo(T,C),S=0),A){case yt.M:s=u=n[M++],l=c=n[M++],e.moveTo(u,c);break;case yt.L:{h=n[M++],f=n[M++];var E=Ra(h-u),D=Ra(f-c);if(E>i||D>a){if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;e.lineTo(u*(1-z)+h*z,c*(1-z)+f*z);break e}m+=I}e.lineTo(h,f),u=h,c=f,S=0}else{var O=E*E+D*D;O>S&&(T=h,C=f,S=O)}break}case yt.C:{var V=n[M++],G=n[M++],F=n[M++],U=n[M++],j=n[M++],W=n[M++];if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;ys(u,V,F,j,z,Zs),ys(c,G,U,W,z,$s),e.bezierCurveTo(Zs[1],$s[1],Zs[2],$s[2],Zs[3],$s[3]);break e}m+=I}e.bezierCurveTo(V,G,F,U,j,W),u=j,c=W;break}case yt.Q:{var V=n[M++],G=n[M++],F=n[M++],U=n[M++];if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;Xd(u,V,F,z,Zs),Xd(c,G,U,z,$s),e.quadraticCurveTo(Zs[1],$s[1],Zs[2],$s[2]);break e}m+=I}e.quadraticCurveTo(V,G,F,U),u=F,c=U;break}case yt.A:var H=n[M++],X=n[M++],K=n[M++],ne=n[M++],ie=n[M++],ue=n[M++],ve=n[M++],Ge=!n[M++],xe=K>ne?K:ne,ge=Ra(K-ne)>.001,ke=ie+ue,fe=!1;if(d){var I=p[y++];m+I>_&&(ke=ie+ue*(_-m)/I,fe=!0),m+=I}if(ge&&e.ellipse?e.ellipse(H,X,K,ne,ve,ie,ke,Ge):e.arc(H,X,xe,ie,ke,Ge),fe)break e;k&&(s=Ys(ie)*K+H,l=Xs(ie)*ne+X),u=Ys(ke)*K+H,c=Xs(ke)*ne+X;break;case yt.R:s=u=n[M],l=c=n[M+1],h=n[M++],f=n[M++];var Me=n[M++],st=n[M++];if(d){var I=p[y++];if(m+I>_){var Ye=_-m;e.moveTo(h,f),e.lineTo(h+r1(Ye,Me),f),Ye-=Me,Ye>0&&e.lineTo(h+Me,f+r1(Ye,st)),Ye-=st,Ye>0&&e.lineTo(h+n1(Me-Ye,0),f+st),Ye-=Me,Ye>0&&e.lineTo(h,f+n1(st-Ye,0));break e}m+=I}e.rect(h,f,Me,st);break;case yt.Z:if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;e.lineTo(u*(1-z)+s*z,c*(1-z)+l*z);break e}m+=I}e.closePath(),u=s,c=l}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=yt,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function zo(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>n+s||o<e-s&&o<n-s||a>t+s&&a>r+s||a<t-s&&a<r-s)return!1;if(t!==r)l=(e-n)/(t-r),u=(t*n-r*e)/(t-r);else return Math.abs(a-t)<=s/2;var c=l*a-o+u,h=c*c/(l*l+1);return h<=s/2*s/2}function bq(t,e,r,n,i,a,o,s,l,u,c){if(l===0)return!1;var h=l;if(c>e+h&&c>n+h&&c>a+h&&c>s+h||c<e-h&&c<n-h&&c<a-h&&c<s-h||u>t+h&&u>r+h&&u>i+h&&u>o+h||u<t-h&&u<r-h&&u<i-h&&u<o-h)return!1;var f=x4(t,e,r,n,i,a,o,s,u,c,null);return f<=h/2}function aj(t,e,r,n,i,a,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>n+u&&l>a+u||l<e-u&&l<n-u&&l<a-u||s>t+u&&s>r+u&&s>i+u||s<t-u&&s<r-u&&s<i-u)return!1;var c=b4(t,e,r,n,i,a,s,l,null);return c<=u/2}var yD=Math.PI*2;function In(t){return t%=yD,t<0&&(t+=yD),t}var sf=Math.PI*2;function wq(t,e,r,n,i,a,o,s,l){if(o===0)return!1;var u=o;s-=t,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>r||c+u<r)return!1;if(Math.abs(n-i)%sf<1e-4)return!0;if(a){var h=n;n=In(i),i=In(h)}else n=In(n),i=In(i);n>i&&(i+=sf);var f=Math.atan2(l,s);return f<0&&(f+=sf),f>=n&&f<=i||f+sf>=n&&f+sf<=i}function Ga(t,e,r,n,i,a){if(a>e&&a>n||a<e&&a<n||n===e)return 0;var o=(a-e)/(n-e),s=n<e?1:-1;(o===1||o===0)&&(s=n<e?.5:-.5);var l=o*(r-t)+t;return l===i?1/0:l>i?s:0}var Mo=Ta.CMD,qs=Math.PI*2,Tq=1e-4;function Cq(t,e){return Math.abs(t-e)<Tq}var tn=[-1,-1,-1],qn=[-1,-1];function Mq(){var t=qn[0];qn[0]=qn[1],qn[1]=t}function Aq(t,e,r,n,i,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||u<e&&u<n&&u<a&&u<s)return 0;var c=fy(e,n,a,s,u,tn);if(c===0)return 0;for(var h=0,f=-1,d=void 0,p=void 0,g=0;g<c;g++){var m=tn[g],y=m===0||m===1?.5:1,_=ur(t,r,i,o,m);_<l||(f<0&&(f=_4(e,n,a,s,qn),qn[1]<qn[0]&&f>1&&Mq(),d=ur(e,n,a,s,qn[0]),f>1&&(p=ur(e,n,a,s,qn[1]))),f===2?m<qn[0]?h+=d<e?y:-y:m<qn[1]?h+=p<d?y:-y:h+=s<p?y:-y:m<qn[0]?h+=d<e?y:-y:h+=s<d?y:-y)}return h}function Lq(t,e,r,n,i,a,o,s){if(s>e&&s>n&&s>a||s<e&&s<n&&s<a)return 0;var l=IY(e,n,a,s,tn);if(l===0)return 0;var u=S4(e,n,a);if(u>=0&&u<=1){for(var c=0,h=Sr(e,n,a,u),f=0;f<l;f++){var d=tn[f]===0||tn[f]===1?.5:1,p=Sr(t,r,i,tn[f]);p<o||(tn[f]<u?c+=h<e?d:-d:c+=a<h?d:-d)}return c}else{var d=tn[0]===0||tn[0]===1?.5:1,p=Sr(t,r,i,tn[0]);return p<o?0:a<e?d:-d}}function Pq(t,e,r,n,i,a,o,s){if(s-=e,s>r||s<-r)return 0;var l=Math.sqrt(r*r-s*s);tn[0]=-l,tn[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=qs-1e-4){n=0,i=qs;var c=a?1:-1;return o>=tn[0]+t&&o<=tn[1]+t?c:0}if(n>i){var h=n;n=i,i=h}n<0&&(n+=qs,i+=qs);for(var f=0,d=0;d<2;d++){var p=tn[d];if(p+t>o){var g=Math.atan2(s,p),c=a?1:-1;g<0&&(g=qs+g),(g>=n&&g<=i||g+qs>=n&&g+qs<=i)&&(g>Math.PI/2&&g<Math.PI*1.5&&(c=-c),f+=c)}}return f}function oj(t,e,r,n,i){for(var a=t.data,o=t.len(),s=0,l=0,u=0,c=0,h=0,f,d,p=0;p<o;){var g=a[p++],m=p===1;switch(g===Mo.M&&p>1&&(r||(s+=Ga(l,u,c,h,n,i))),m&&(l=a[p],u=a[p+1],c=l,h=u),g){case Mo.M:c=a[p++],h=a[p++],l=c,u=h;break;case Mo.L:if(r){if(zo(l,u,a[p],a[p+1],e,n,i))return!0}else s+=Ga(l,u,a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Mo.C:if(r){if(bq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=Aq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Mo.Q:if(r){if(aj(l,u,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=Lq(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Mo.A:var y=a[p++],_=a[p++],S=a[p++],T=a[p++],C=a[p++],M=a[p++];p+=1;var A=!!(1-a[p++]);f=Math.cos(C)*S+y,d=Math.sin(C)*T+_,m?(c=f,h=d):s+=Ga(l,u,f,d,n,i);var k=(n-y)*T/S+y;if(r){if(wq(y,_,T,C,C+M,A,e,k,i))return!0}else s+=Pq(y,_,T,C,C+M,A,k,i);l=Math.cos(C+M)*S+y,u=Math.sin(C+M)*T+_;break;case Mo.R:c=l=a[p++],h=u=a[p++];var E=a[p++],D=a[p++];if(f=c+E,d=h+D,r){if(zo(c,h,f,h,e,n,i)||zo(f,h,f,d,e,n,i)||zo(f,d,c,d,e,n,i)||zo(c,d,c,h,e,n,i))return!0}else s+=Ga(f,h,f,d,n,i),s+=Ga(c,d,c,h,n,i);break;case Mo.Z:if(r){if(zo(l,u,c,h,e,n,i))return!0}else s+=Ga(l,u,c,h,n,i);l=c,u=h;break}}return!r&&!Cq(u,h)&&(s+=Ga(l,u,c,h,n,i)||0),s!==0}function kq(t,e,r){return oj(t,0,!1,e,r)}function Dq(t,e,r,n){return oj(t,e,!0,r,n)}var xy=Se({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Rl),Iq={style:Se({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},$0.style)},o1=ba.concat(["invisible","culling","z","z2","zlevel","parent"]),Ue=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.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<o1.length;++s)i[o1[s]]=this[o1[s]];i.__dirty|=An}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(r){var n=$e(r);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<n.length;a++){var o=n[a],s=r[o];o==="style"?this.style?J(this.style,s):this.useStyle(s):o==="shape"?J(this.shape,s):t.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var r=this.style.fill;if(r!=="none"){if(se(r)){var n=Qd(r,0);return n>.5?mw:n>.2?cX:yw}else if(r)return yw}return mw},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(se(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Qd(r,0)<gw;if(a===o)return n}},e.prototype.buildPath=function(r,n,i){},e.prototype.pathUpdated=function(){this.__dirty&=~nc},e.prototype.getUpdatedPathProxy=function(r){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,r),this.path},e.prototype.createPathProxy=function(){this.path=new Ta(!1)},e.prototype.hasStroke=function(){var r=this.style,n=r.stroke;return!(n==null||n==="none"||!(r.lineWidth>0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.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&nc)&&(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 c=this.strokeContainThreshold;u=Math.max(u,c??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},e.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)),Dq(s,l/u,r,n)))return!0}if(this.hasFill())return kq(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=nc,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:J(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&nc)},e.prototype.createStyle=function(r){return Ov(xy,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=J({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.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=J({},i.shape),J(u,n.shape)):(u=J({},a?this.shape:i.shape),J(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=J({},this.shape);for(var c={},h=$e(u),f=0;f<h.length;f++){var d=h[f];typeof u[d]=="object"?this.shape[d]=u[d]:c[d]=u[d]}this._transitionState(r,{shape:c},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(r){for(var n=t.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},e.prototype.getAnimationStyleProps=function(){return Iq},e.prototype.isZeroArea=function(){return!1},e.extend=function(r){var n=function(a){Y(o,a);function o(s){var l=a.call(this,s)||this;return r.init&&r.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return ye(r.style)},o.prototype.getDefaultShape=function(){return ye(r.shape)},o}(e);for(var i in r)typeof r[i]=="function"&&(n.prototype[i]=r[i]);return n},e.initDefaultProps=function(){var r=e.prototype;r.type="path",r.strokeContainThreshold=5,r.segmentIgnoreThreshold=0,r.subPixelOptimize=!1,r.autoBatch=!1,r.__dirty=An|Vf|nc}(),e}(fi),Eq=Se({strokeFirst:!0,font:uo,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},xy),Kc=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.hasStroke=function(){return ij(this.style)},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(r){return Ov(Eq,r)},e.prototype.setBoundingRect=function(r){this._rect=r},e.prototype.getBoundingRect=function(){return this._rect||(this._rect=gq(this.style)),this._rect},e.initDefaultProps=function(){var r=e.prototype;r.dirtyRectTolerance=10}(),e}(fi);Kc.prototype.type="tspan";var Nq=Se({x:0,y:0},Rl),Rq={style:Se({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},$0.style)};function Oq(t){return!!(t&&typeof t!="string"&&t.width&&t.height)}var pr=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createStyle=function(r){return Ov(Nq,r)},e.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=Oq(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},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return Rq},e.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new Ce(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},e}(fi);pr.prototype.type="image";function zq(t,e){var r=e.x,n=e.y,i=e.width,a=e.height,o=e.r,s,l,u,c;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var h;s+l>i&&(h=s+l,s*=i/h,l*=i/h),u+c>i&&(h=u+c,u*=i/h,c*=i/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+c>a&&(h=s+c,s*=a/h,c*=a/h),t.moveTo(r+s,n),t.lineTo(r+i-l,n),l!==0&&t.arc(r+i-l,n+l,l,-Math.PI/2,0),t.lineTo(r+i,n+a-u),u!==0&&t.arc(r+i-u,n+a-u,u,0,Math.PI/2),t.lineTo(r+c,n+a),c!==0&&t.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var Sc=Math.round;function q0(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(Sc(n*2)===Sc(i*2)&&(t.x1=t.x2=En(n,s,!0)),Sc(a*2)===Sc(o*2)&&(t.y1=t.y2=En(a,s,!0))),t}}function sj(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=En(n,s,!0),t.y=En(i,s,!0),t.width=Math.max(En(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(En(i+o,s,!1)-t.y,o===0?0:1)),t}}function En(t,e,r){if(!e)return t;var n=Sc(t*2);return(n+Sc(e))%2===0?n/2:(n+(r?1:-1))/2}var Bq=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),jq={},Be=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Bq},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=sj(jq,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?zq(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Ue);Be.prototype.type="rect";var _D={fill:"#000"},xD=2,Qi={},Vq={style:Se({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},$0.style)},Xe=function(t){Y(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=_D,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r<this._children.length;r++){var n=this._children[r];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},e.prototype.updateTransform=function(){var r=this.innerTransformable;r?(r.updateTransform(),r.transform&&(this.transform=r.transform)):t.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(r){var n=this.innerTransformable;return n?n.getLocalTransform(r):t.prototype.getLocalTransform.call(this,r)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,Hq(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(r){t.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=r},e.prototype.removeSelfFromZr=function(r){t.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var r=new Ce(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(r.copy(l),r.applyTransform(u),a=a||r.clone(),a.union(r)):(a=a||l.clone(),a.union(l))}this._rect=a||r}return this._rect},e.prototype.setDefaultTextStyle=function(r){this._defaultStyle=r||_D},e.prototype.setTextContent=function(r){},e.prototype._mergeStyle=function(r,n){if(!n)return r;var i=n.rich,a=r.rich||i&&{};return J(r,n),i&&a?(this._mergeRich(a,i),r.rich=a):a&&(r.rich=a),r},e.prototype._mergeRich=function(r,n){for(var i=$e(n),a=0;a<i.length;a++){var o=i[a];r[o]=r[o]||{},J(r[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return Vq},e.prototype._getOrCreateChild=function(r){var n=this._children[this._childCursor];return(!n||!(n instanceof r))&&(n=new r),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var r=this.style,n=r.font||uo,i=r.padding,a=this._defaultStyle,o=r.x||0,s=r.y||0,l=r.align||a.align||"left",u=r.verticalAlign||a.verticalAlign||"top";hD(Qi,a.overflowRect,o,s,l,u),o=Qi.baseX,s=Qi.baseY;var c=AD(r),h=uq(c,r,Qi.outerWidth,Qi.outerHeight),f=s1(r),d=!!r.backgroundColor,p=h.outerHeight,g=h.outerWidth,m=h.lines,y=h.lineHeight;this.isTruncated=!!h.isTruncated;var _=o,S=Nl(s,h.contentHeight,u);if(f||i){var T=Xc(o,g,l),C=Nl(s,p,u);f&&this._renderBackground(r,r,T,C,g,p)}S+=y/2,i&&(_=MD(o,l,i),u==="top"?S+=i[0]:u==="bottom"&&(S-=i[2]));for(var M=0,A=!1,k=!1,E=CD("fill"in r?r.fill:(k=!0,a.fill)),D=TD("stroke"in r?r.stroke:!d&&(!a.autoStroke||k)?(M=xD,A=!0,a.stroke):null),I=r.textShadowBlur>0,z=0;z<m.length;z++){var O=this._getOrCreateChild(Kc),V=O.createStyle();O.useStyle(V),V.text=m[z],V.x=_,V.y=S,V.textAlign=l,V.textBaseline="middle",V.opacity=r.opacity,V.strokeFirst=!0,I&&(V.shadowBlur=r.textShadowBlur||0,V.shadowColor=r.textShadowColor||"transparent",V.shadowOffsetX=r.textShadowOffsetX||0,V.shadowOffsetY=r.textShadowOffsetY||0),V.stroke=D,V.fill=E,D&&(V.lineWidth=r.lineWidth||M,V.lineDash=r.lineDash,V.lineDashOffset=r.lineDashOffset||0),V.font=n,bD(V,r),S+=y,O.setBoundingRect(Cw(V,h.contentWidth,h.calculatedLineHeight,A?0:null))}},e.prototype._updateRichTexts=function(){var r=this.style,n=this._defaultStyle,i=r.align||n.align,a=r.verticalAlign||n.verticalAlign,o=r.x||0,s=r.y||0;hD(Qi,n.overflowRect,o,s,i,a),o=Qi.baseX,s=Qi.baseY;var l=AD(r),u=fq(l,r,Qi.outerWidth,Qi.outerHeight,i),c=u.width,h=u.outerWidth,f=u.outerHeight,d=r.padding;this.isTruncated=!!u.isTruncated;var p=Xc(o,h,i),g=Nl(s,f,a),m=p,y=g;d&&(m+=d[3],y+=d[0]);var _=m+c;s1(r)&&this._renderBackground(r,r,p,g,h,f);for(var S=!!r.backgroundColor,T=0;T<u.lines.length;T++){for(var C=u.lines[T],M=C.tokens,A=M.length,k=C.lineHeight,E=C.width,D=0,I=m,z=_,O=A-1,V=void 0;D<A&&(V=M[D],!V.align||V.align==="left");)this._placeToken(V,r,k,y,I,"left",S),E-=V.width,I+=V.width,D++;for(;O>=0&&(V=M[O],V.align==="right");)this._placeToken(V,r,k,y,z,"right",S),E-=V.width,z-=V.width,O--;for(I+=(c-(I-m)-(_-z)-E)/2;D<=O;)V=M[D],this._placeToken(V,r,k,y,I+V.width/2,"center",S),I+=V.width,D++;y+=k}},e.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,h=a+i/2;c==="top"?h=a+r.height/2:c==="bottom"&&(h=a+i-r.height/2);var f=!r.isLineHolder&&s1(u);f&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,h-r.height/2,r.width,r.height);var d=!!u.backgroundColor,p=r.textPadding;p&&(o=MD(o,s,p),h-=r.height/2-p[0]-r.innerHeight/2);var g=this._getOrCreateChild(Kc),m=g.createStyle();g.useStyle(m);var y=this._defaultStyle,_=!1,S=0,T=!1,C=CD("fill"in u?u.fill:"fill"in n?n.fill:(_=!0,y.fill)),M=TD("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!y.autoStroke||_)?(S=xD,T=!0,y.stroke):null),A=u.textShadowBlur>0||n.textShadowBlur>0;m.text=r.text,m.x=o,m.y=h,A&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=r.font||uo,m.opacity=Sn(u.opacity,n.opacity,1),bD(m,u),M&&(m.lineWidth=Sn(u.lineWidth,n.lineWidth,S),m.lineDash=pe(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=M),C&&(m.fill=C),g.setBoundingRect(Cw(m,r.contentWidth,r.contentHeight,T?0:null))},e.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,h=l&&l.image,f=l&&!h,d=r.borderRadius,p=this,g,m;if(f||r.lineHeight||u&&c){g=this._getOrCreateChild(Be),g.useStyle(g.createStyle()),g.style.fill=null;var y=g.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=d,g.dirtyShape()}if(f){var _=g.style;_.fill=l||null,_.fillOpacity=pe(r.fillOpacity,1)}else if(h){m=this._getOrCreateChild(pr),m.onload=function(){p.dirtyStyle()};var S=m.style;S.image=l.image,S.x=i,S.y=a,S.width=o,S.height=s}if(u&&c){var _=g.style;_.lineWidth=u,_.stroke=c,_.strokeOpacity=pe(r.strokeOpacity,1),_.lineDash=r.borderDash,_.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var T=(g||m).style;T.shadowBlur=r.shadowBlur||0,T.shadowColor=r.shadowColor||"transparent",T.shadowOffsetX=r.shadowOffsetX||0,T.shadowOffsetY=r.shadowOffsetY||0,T.opacity=Sn(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return uj(r)&&(n=[r.fontStyle,r.fontWeight,lj(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&kn(n)||r.textFont||r.font},e}(fi),Fq={left:!0,right:1,center:1},Gq={top:1,bottom:1,middle:1},SD=["fontStyle","fontWeight","fontSize","fontFamily"];function lj(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?g2+"px":t+"px"}function bD(t,e){for(var r=0;r<SD.length;r++){var n=SD[r],i=e[n];i!=null&&(t[n]=i)}}function uj(t){return t.fontSize!=null||t.fontFamily||t.fontWeight}function Hq(t){return wD(t),R(t.rich,wD),t}function wD(t){if(t){t.font=Xe.makeFont(t);var e=t.align;e==="middle"&&(e="center"),t.align=e==null||Fq[e]?e:"left";var r=t.verticalAlign;r==="center"&&(r="middle"),t.verticalAlign=r==null||Gq[r]?r:"top";var n=t.padding;n&&(t.padding=Rv(t.padding))}}function TD(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function CD(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function MD(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function AD(t){var e=t.text;return e!=null&&(e+=""),e}function s1(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var Le=Fe(),Lw=function(t,e,r,n){if(n){var i=Le(n);i.dataIndex=r,i.dataType=e,i.seriesIndex=t,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=Le(a);o.seriesIndex=t,o.dataIndex=r,o.dataType=e,o.ssrType="chart"})}},LD=1,PD={},cj=Fe(),z2=Fe(),B2=0,Vv=1,K0=2,ln=["emphasis","blur","select"],tv=["normal","emphasis","blur","select"],mh=10,Wq=9,Ol="highlight",ym="downplay",Sy="select",Pw="unselect",by="toggleSelect",j2="selectchanged";function Eu(t){return t!=null&&t!=="none"}function Q0(t,e,r){t.onHoverStateChange&&(t.hoverState||0)!==r&&t.onHoverStateChange(e),t.hoverState=r}function hj(t){Q0(t,"emphasis",K0)}function fj(t){t.hoverState===K0&&Q0(t,"normal",B2)}function V2(t){Q0(t,"blur",Vv)}function dj(t){t.hoverState===Vv&&Q0(t,"normal",B2)}function Uq(t){t.selected=!0}function Zq(t){t.selected=!1}function kD(t,e,r){e(t,r)}function xo(t,e,r){kD(t,e,r),t.isGroup&&t.traverse(function(n){kD(n,e,r)})}function wy(t,e){switch(e){case"emphasis":t.hoverState=K0;break;case"normal":t.hoverState=B2;break;case"blur":t.hoverState=Vv;break;case"select":t.selected=!0}}function $q(t,e,r,n){for(var i=t.style,a={},o=0;o<e.length;o++){var s=e[o],l=i[s];a[s]=l??(n&&n[s])}for(var o=0;o<t.animators.length;o++){var u=t.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(r)<0&&u.targetName==="style"&&u.saveTo(a,e)}return a}function Yq(t,e,r,n){var i=r&&Ee(r,"select")>=0,a=!1;if(t instanceof Ue){var o=cj(t),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Eu(s)||Eu(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=J({},n),u=J({},u),u.fill=s):!Eu(u.fill)&&Eu(s)?(a=!0,n=J({},n),u=J({},u),u.fill=vy(s)):!Eu(u.stroke)&&Eu(l)&&(a||(n=J({},n),u=J({},u)),u.stroke=vy(l)),n.style=u}}if(n&&n.z2==null){a||(n=J({},n));var c=t.z2EmphasisLift;n.z2=t.z2+(c??mh)}return n}function Xq(t,e,r){if(r&&r.z2==null){r=J({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??Wq)}return r}function qq(t,e,r){var n=Ee(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:$q(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=J({},r),o=J({opacity:n?i:a.opacity*.1},o),r.style=o),r}function l1(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return Yq(this,t,e,r);if(t==="blur")return qq(this,t,r);if(t==="select")return Xq(this,t,r)}return r}function Kl(t){t.stateProxy=l1;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=l1),r&&(r.stateProxy=l1)}function DD(t,e){!mj(t,e)&&!t.__highByOuter&&xo(t,hj)}function ID(t,e){!mj(t,e)&&!t.__highByOuter&&xo(t,fj)}function ho(t,e){t.__highByOuter|=1<<(e||0),xo(t,hj)}function fo(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&xo(t,fj)}function vj(t){xo(t,V2)}function F2(t){xo(t,dj)}function pj(t){xo(t,Uq)}function gj(t){xo(t,Zq)}function mj(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function yj(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=z2(a),s=i==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){dj(u)}),s&&r.push(a)),o.isBlured=!1}),R(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function kw(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var h=0;h<c.length;h++){var f=u.getItemGraphicEl(c[h]);f&&F2(f)}}if(t!=null&&!(!e||e==="none")){var o=i.getSeriesByIndex(t),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var c=o===u,h=u.coordinateSystem;h&&h.master&&(h=h.master);var f=h&&s?h===s:c;if(!(r==="series"&&!c||r==="coordinateSystem"&&!f||e==="series"&&c)){var d=n.getViewOfSeriesModel(u);if(d.group.traverse(function(m){m.__highByOuter&&c&&e==="self"||V2(m)}),Nr(e))a(u.getData(),e);else if(be(e))for(var p=$e(e),g=0;g<p.length;g++)a(u.getData(p[g]),e[p[g]]);l.push(u),z2(u).isBlured=!0}}),i.eachComponent(function(u,c){if(u!=="series"){var h=n.getViewOfComponentModel(c);h&&h.toggleBlurSeries&&h.toggleBlurSeries(l,!0,i)}})}}function Dw(t,e,r){if(!(t==null||e==null)){var n=r.getModel().getComponent(t,e);if(n){z2(n).isBlured=!0;var i=r.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){V2(a)})}}}function Kq(t,e,r){var n=t.seriesIndex,i=t.getData(e.dataType);if(i){var a=Xl(i,e);a=(ee(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=Le(o);kw(n,u.focus,u.blurScope,r)}else{var c=t.get(["emphasis","focus"]),h=t.get(["emphasis","blurScope"]);c!=null&&kw(n,c,h,r)}}}function G2(t,e,r,n){var i={focusSelf:!1,dispatchers:null};if(t==null||t==="series"||e==null||r==null)return i;var a=n.getModel().getComponent(t,e);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(r),l,u=0;u<s.length;u++)if(Le(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function Qq(t,e,r){var n=Le(t),i=G2(n.componentMainType,n.componentIndex,n.componentHighDownName,r),a=i.dispatchers,o=i.focusSelf;a?(o&&Dw(n.componentMainType,n.componentIndex,r),R(a,function(s){return DD(s,e)})):(kw(n.seriesIndex,n.focus,n.blurScope,r),n.focus==="self"&&Dw(n.componentMainType,n.componentIndex,r),DD(t,e))}function Jq(t,e,r){yj(r);var n=Le(t),i=G2(n.componentMainType,n.componentIndex,n.componentHighDownName,r).dispatchers;i?R(i,function(a){return ID(a,e)}):ID(t,e)}function eK(t,e,r){if(Ew(e)){var n=e.dataType,i=t.getData(n),a=Xl(i,e);ee(a)||(a=[a]),t[e.type===by?"toggleSelect":e.type===Sy?"select":"unselect"](a,n)}}function ED(t){var e=t.getAllData();R(e,function(r){var n=r.data,i=r.type;n.eachItemGraphicEl(function(a,o){t.isSelected(o,i)?pj(a):gj(a)})})}function tK(t){var e=[];return t.eachSeries(function(r){var n=r.getAllData();R(n,function(i){i.data;var a=i.type,o=r.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function us(t,e,r){Al(t,!0),xo(t,Kl),Iw(t,e,r)}function rK(t){Al(t,!1)}function wt(t,e,r,n){n?rK(t):us(t,e,r)}function Iw(t,e,r){var n=Le(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var ND=["emphasis","blur","select"],nK={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ir(t,e,r,n){r=r||"itemStyle";for(var i=0;i<ND.length;i++){var a=ND[i],o=e.getModel([a,r]),s=t.ensureState(a);s.style=n?n(o):o[nK[r]]()}}function Al(t,e){var r=e===!1,n=t;t.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=t.highDownSilentOnTouch),(!r||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!r)}function rv(t){return!!(t&&t.__highDownDispatcher)}function iK(t,e,r){var n=Le(t);n.componentMainType=e.mainType,n.componentIndex=e.componentIndex,n.componentHighDownName=r}function aK(t){var e=PD[t];return e==null&&LD<=32&&(e=PD[t]=LD++),e}function Ew(t){var e=t.type;return e===Sy||e===Pw||e===by}function RD(t){var e=t.type;return e===Ol||e===ym}function oK(t){var e=cj(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var r=t.states.select||{};e.selectFill=r.style&&r.style.fill||null,e.selectStroke=r.style&&r.style.stroke||null}var Nu=Ta.CMD,sK=[[],[],[]],OD=Math.sqrt,lK=Math.atan2;function _j(t,e){if(e){var r=t.data,n=t.len(),i,a,o,s,l,u,c=Nu.M,h=Nu.C,f=Nu.L,d=Nu.R,p=Nu.A,g=Nu.Q;for(o=0,s=0;o<n;){switch(i=r[o++],s=o,a=0,i){case c:a=1;break;case f:a=1;break;case h:a=3;break;case g:a=2;break;case p:var m=e[4],y=e[5],_=OD(e[0]*e[0]+e[1]*e[1]),S=OD(e[2]*e[2]+e[3]*e[3]),T=lK(-e[1]/S,e[0]/_);r[o]*=_,r[o++]+=m,r[o]*=S,r[o++]+=y,r[o++]*=_,r[o++]*=S,r[o++]+=T,r[o++]+=T,o+=2,s=o;break;case d:u[0]=r[o++],u[1]=r[o++],Ot(u,u,e),r[s++]=u[0],r[s++]=u[1],u[0]+=r[o++],u[1]+=r[o++],Ot(u,u,e),r[s++]=u[0],r[s++]=u[1]}for(l=0;l<a;l++){var C=sK[l];C[0]=r[o++],C[1]=r[o++],Ot(C,C,e),r[s++]=C[0],r[s++]=C[1]}}t.increaseVersion()}}var u1=Math.sqrt,Qp=Math.sin,Jp=Math.cos,lf=Math.PI;function zD(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Nw(t,e){return(t[0]*e[0]+t[1]*e[1])/(zD(t)*zD(e))}function BD(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Nw(t,e))}function jD(t,e,r,n,i,a,o,s,l,u,c){var h=l*(lf/180),f=Jp(h)*(t-r)/2+Qp(h)*(e-n)/2,d=-1*Qp(h)*(t-r)/2+Jp(h)*(e-n)/2,p=f*f/(o*o)+d*d/(s*s);p>1&&(o*=u1(p),s*=u1(p));var g=(i===a?-1:1)*u1((o*o*(s*s)-o*o*(d*d)-s*s*(f*f))/(o*o*(d*d)+s*s*(f*f)))||0,m=g*o*d/s,y=g*-s*f/o,_=(t+r)/2+Jp(h)*m-Qp(h)*y,S=(e+n)/2+Qp(h)*m+Jp(h)*y,T=BD([1,0],[(f-m)/o,(d-y)/s]),C=[(f-m)/o,(d-y)/s],M=[(-1*f-m)/o,(-1*d-y)/s],A=BD(C,M);if(Nw(C,M)<=-1&&(A=lf),Nw(C,M)>=1&&(A=0),A<0){var k=Math.round(A/lf*1e6)/1e6;A=lf*2+k%2*lf}c.addData(u,_,S,o,s,T,A,h,a)}var uK=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,cK=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function hK(t){var e=new Ta;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=Ta.CMD,l=t.match(uK);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],h=c.charAt(0),f=void 0,d=c.match(cK)||[],p=d.length,g=0;g<p;g++)d[g]=parseFloat(d[g]);for(var m=0;m<p;){var y=void 0,_=void 0,S=void 0,T=void 0,C=void 0,M=void 0,A=void 0,k=r,E=n,D=void 0,I=void 0;switch(h){case"l":r+=d[m++],n+=d[m++],f=s.L,e.addData(f,r,n);break;case"L":r=d[m++],n=d[m++],f=s.L,e.addData(f,r,n);break;case"m":r+=d[m++],n+=d[m++],f=s.M,e.addData(f,r,n),i=r,a=n,h="l";break;case"M":r=d[m++],n=d[m++],f=s.M,e.addData(f,r,n),i=r,a=n,h="L";break;case"h":r+=d[m++],f=s.L,e.addData(f,r,n);break;case"H":r=d[m++],f=s.L,e.addData(f,r,n);break;case"v":n+=d[m++],f=s.L,e.addData(f,r,n);break;case"V":n=d[m++],f=s.L,e.addData(f,r,n);break;case"C":f=s.C,e.addData(f,d[m++],d[m++],d[m++],d[m++],d[m++],d[m++]),r=d[m-2],n=d[m-1];break;case"c":f=s.C,e.addData(f,d[m++]+r,d[m++]+n,d[m++]+r,d[m++]+n,d[m++]+r,d[m++]+n),r+=d[m-2],n+=d[m-1];break;case"S":y=r,_=n,D=e.len(),I=e.data,o===s.C&&(y+=r-I[D-4],_+=n-I[D-3]),f=s.C,k=d[m++],E=d[m++],r=d[m++],n=d[m++],e.addData(f,y,_,k,E,r,n);break;case"s":y=r,_=n,D=e.len(),I=e.data,o===s.C&&(y+=r-I[D-4],_+=n-I[D-3]),f=s.C,k=r+d[m++],E=n+d[m++],r+=d[m++],n+=d[m++],e.addData(f,y,_,k,E,r,n);break;case"Q":k=d[m++],E=d[m++],r=d[m++],n=d[m++],f=s.Q,e.addData(f,k,E,r,n);break;case"q":k=d[m++]+r,E=d[m++]+n,r+=d[m++],n+=d[m++],f=s.Q,e.addData(f,k,E,r,n);break;case"T":y=r,_=n,D=e.len(),I=e.data,o===s.Q&&(y+=r-I[D-4],_+=n-I[D-3]),r=d[m++],n=d[m++],f=s.Q,e.addData(f,y,_,r,n);break;case"t":y=r,_=n,D=e.len(),I=e.data,o===s.Q&&(y+=r-I[D-4],_+=n-I[D-3]),r+=d[m++],n+=d[m++],f=s.Q,e.addData(f,y,_,r,n);break;case"A":S=d[m++],T=d[m++],C=d[m++],M=d[m++],A=d[m++],k=r,E=n,r=d[m++],n=d[m++],f=s.A,jD(k,E,r,n,M,A,S,T,C,f,e);break;case"a":S=d[m++],T=d[m++],C=d[m++],M=d[m++],A=d[m++],k=r,E=n,r+=d[m++],n+=d[m++],f=s.A,jD(k,E,r,n,M,A,S,T,C,f,e);break}}(h==="z"||h==="Z")&&(f=s.Z,e.addData(f),r=i,n=a),o=f}return e.toStatic(),e}var xj=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.applyTransform=function(r){},e}(Ue);function Sj(t){return t.setData!=null}function bj(t,e){var r=hK(t),n=J({},e);return n.buildPath=function(i){var a=Sj(i);if(a&&i.canSave()){i.appendPath(r);var o=i.getContext();o&&i.rebuildPath(o,1)}else{var o=a?i.getContext():i;o&&r.rebuildPath(o,1)}},n.applyTransform=function(i){_j(r,i),this.dirtyShape()},n}function wj(t,e){return new xj(bj(t,e))}function fK(t,e){var r=bj(t,e),n=function(i){Y(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=r.applyTransform,s.buildPath=r.buildPath,s}return a}(xj);return n}function dK(t,e){for(var r=[],n=t.length,i=0;i<n;i++){var a=t[i];r.push(a.getUpdatedPathProxy(!0))}var o=new Ue(e);return o.createPathProxy(),o.buildPath=function(s){if(Sj(s)){s.appendPath(r);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function H2(t,e){e=e||{};var r=new Ue;return t.shape&&r.setShape(t.shape),r.setStyle(t.style),e.bakeTransform?_j(r.path,t.getComputedTransform()):e.toLocal?r.setLocalTransform(t.getComputedTransform()):r.copyTransform(t),r.buildPath=t.buildPath,r.applyTransform=r.applyTransform,r.z=t.z,r.z2=t.z2,r.zlevel=t.zlevel,r}var vK=function(){function t(){this.cx=0,this.cy=0,this.r=0}return t}(),Pa=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new vK},e.prototype.buildPath=function(r,n){r.moveTo(n.cx+n.r,n.cy),r.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e}(Ue);Pa.prototype.type="circle";var pK=function(){function t(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return t}(),Fv=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new pK},e.prototype.buildPath=function(r,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*i,c=l*i;r.moveTo(a-s,o),r.bezierCurveTo(a-s,o-c,a-u,o-l,a,o-l),r.bezierCurveTo(a+u,o-l,a+s,o-c,a+s,o),r.bezierCurveTo(a+s,o+c,a+u,o+l,a,o+l),r.bezierCurveTo(a-u,o+l,a-s,o+c,a-s,o),r.closePath()},e}(Ue);Fv.prototype.type="ellipse";var Tj=Math.PI,c1=Tj*2,Ks=Math.sin,Ru=Math.cos,gK=Math.acos,Fr=Math.atan2,VD=Math.abs,md=Math.sqrt,Gf=Math.max,Ji=Math.min,Si=1e-4;function mK(t,e,r,n,i,a,o,s){var l=r-t,u=n-e,c=o-i,h=s-a,f=h*l-c*u;if(!(f*f<Si))return f=(c*(e-a)-h*(t-i))/f,[t+f*l,e+f*u]}function eg(t,e,r,n,i,a,o){var s=t-r,l=e-n,u=(o?a:-a)/md(s*s+l*l),c=u*l,h=-u*s,f=t+c,d=e+h,p=r+c,g=n+h,m=(f+p)/2,y=(d+g)/2,_=p-f,S=g-d,T=_*_+S*S,C=i-a,M=f*g-p*d,A=(S<0?-1:1)*md(Gf(0,C*C*T-M*M)),k=(M*S-_*A)/T,E=(-M*_-S*A)/T,D=(M*S+_*A)/T,I=(-M*_+S*A)/T,z=k-m,O=E-y,V=D-m,G=I-y;return z*z+O*O>V*V+G*G&&(k=D,E=I),{cx:k,cy:E,x0:-c,y0:-h,x1:k*(i/C-1),y1:E*(i/C-1)}}function yK(t){var e;if(ee(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function _K(t,e){var r,n=Gf(e.r,0),i=Gf(e.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=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,h=e.cy,f=!!e.clockwise,d=VD(u-l),p=d>c1&&d%c1;if(p>Si&&(d=p),!(n>Si))t.moveTo(c,h);else if(d>c1-Si)t.moveTo(c+n*Ru(l),h+n*Ks(l)),t.arc(c,h,n,l,u,!f),i>Si&&(t.moveTo(c+i*Ru(u),h+i*Ks(u)),t.arc(c,h,i,u,l,f));else{var g=void 0,m=void 0,y=void 0,_=void 0,S=void 0,T=void 0,C=void 0,M=void 0,A=void 0,k=void 0,E=void 0,D=void 0,I=void 0,z=void 0,O=void 0,V=void 0,G=n*Ru(l),F=n*Ks(l),U=i*Ru(u),j=i*Ks(u),W=d>Si;if(W){var H=e.cornerRadius;H&&(r=yK(H),g=r[0],m=r[1],y=r[2],_=r[3]);var X=VD(n-i)/2;if(S=Ji(X,y),T=Ji(X,_),C=Ji(X,g),M=Ji(X,m),E=A=Gf(S,T),D=k=Gf(C,M),(A>Si||k>Si)&&(I=n*Ru(u),z=n*Ks(u),O=i*Ru(l),V=i*Ks(l),d<Tj)){var K=mK(G,F,O,V,I,z,U,j);if(K){var ne=G-K[0],ie=F-K[1],ue=I-K[0],ve=z-K[1],Ge=1/Ks(gK((ne*ue+ie*ve)/(md(ne*ne+ie*ie)*md(ue*ue+ve*ve)))/2),xe=md(K[0]*K[0]+K[1]*K[1]);E=Ji(A,(n-xe)/(Ge+1)),D=Ji(k,(i-xe)/(Ge-1))}}}if(!W)t.moveTo(c+G,h+F);else if(E>Si){var ge=Ji(y,E),ke=Ji(_,E),fe=eg(O,V,G,F,n,ge,f),Me=eg(I,z,U,j,n,ke,f);t.moveTo(c+fe.cx+fe.x0,h+fe.cy+fe.y0),E<A&&ge===ke?t.arc(c+fe.cx,h+fe.cy,E,Fr(fe.y0,fe.x0),Fr(Me.y0,Me.x0),!f):(ge>0&&t.arc(c+fe.cx,h+fe.cy,ge,Fr(fe.y0,fe.x0),Fr(fe.y1,fe.x1),!f),t.arc(c,h,n,Fr(fe.cy+fe.y1,fe.cx+fe.x1),Fr(Me.cy+Me.y1,Me.cx+Me.x1),!f),ke>0&&t.arc(c+Me.cx,h+Me.cy,ke,Fr(Me.y1,Me.x1),Fr(Me.y0,Me.x0),!f))}else t.moveTo(c+G,h+F),t.arc(c,h,n,l,u,!f);if(!(i>Si)||!W)t.lineTo(c+U,h+j);else if(D>Si){var ge=Ji(g,D),ke=Ji(m,D),fe=eg(U,j,I,z,i,-ke,f),Me=eg(G,F,O,V,i,-ge,f);t.lineTo(c+fe.cx+fe.x0,h+fe.cy+fe.y0),D<k&&ge===ke?t.arc(c+fe.cx,h+fe.cy,D,Fr(fe.y0,fe.x0),Fr(Me.y0,Me.x0),!f):(ke>0&&t.arc(c+fe.cx,h+fe.cy,ke,Fr(fe.y0,fe.x0),Fr(fe.y1,fe.x1),!f),t.arc(c,h,i,Fr(fe.cy+fe.y1,fe.cx+fe.x1),Fr(Me.cy+Me.y1,Me.cx+Me.x1),f),ge>0&&t.arc(c+Me.cx,h+Me.cy,ge,Fr(Me.y1,Me.x1),Fr(Me.y0,Me.x0),!f))}else t.lineTo(c+U,h+j),t.arc(c,h,i,u,l,f)}t.closePath()}}}var xK=function(){function t(){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 t}(),Or=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new xK},e.prototype.buildPath=function(r,n){_K(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Ue);Or.prototype.type="sector";var SK=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),yh=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new SK},e.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)},e}(Ue);yh.prototype.type="ring";function bK(t,e,r,n){var i=[],a=[],o=[],s=[],l,u,c,h;if(n){c=[1/0,1/0],h=[-1/0,-1/0];for(var f=0,d=t.length;f<d;f++)Ya(c,c,t[f]),Xa(h,h,t[f]);Ya(c,c,n[0]),Xa(h,h,n[1])}for(var f=0,d=t.length;f<d;f++){var p=t[f];if(r)l=t[f?f-1:d-1],u=t[(f+1)%d];else if(f===0||f===d-1){i.push(ya(t[f]));continue}else l=t[f-1],u=t[f+1];Wo(a,u,l),cd(a,a,e);var g=ly(p,l),m=ly(p,u),y=g+m;y!==0&&(g/=y,m/=y),cd(o,a,-g),cd(s,a,m);var _=ew([],p,o),S=ew([],p,s);n&&(Xa(_,_,c),Ya(_,_,h),Xa(S,S,c),Ya(S,S,h)),i.push(_),i.push(S)}return r&&i.push(i.shift()),i}function Cj(t,e,r){var n=e.smooth,i=e.points;if(i&&i.length>=2){if(n){var a=bK(i,n,r,e.smoothConstraint);t.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],c=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;s<h;s++)t.lineTo(i[s][0],i[s][1])}r&&t.closePath()}}var wK=function(){function t(){this.points=null,this.smooth=0,this.smoothConstraint=null}return t}(),zr=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new wK},e.prototype.buildPath=function(r,n){Cj(r,n,!0)},e}(Ue);zr.prototype.type="polygon";var TK=function(){function t(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return t}(),Tr=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new TK},e.prototype.buildPath=function(r,n){Cj(r,n,!1)},e}(Ue);Tr.prototype.type="polyline";var CK={},MK=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t}(),Wt=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new MK},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=q0(CK,n,this.style);i=l.x1,a=l.y1,o=l.x2,s=l.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(r.moveTo(i,a),u<1&&(o=i*(1-u)+o*u,s=a*(1-u)+s*u),r.lineTo(o,s))},e.prototype.pointAt=function(r){var n=this.shape;return[n.x1*(1-r)+n.x2*r,n.y1*(1-r)+n.y2*r]},e}(Ue);Wt.prototype.type="line";var fn=[],AK=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return t}();function FD(t,e,r){var n=t.cpx2,i=t.cpy2;return n!=null||i!=null?[(r?Uk:ur)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?Uk:ur)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?sw:Sr)(t.x1,t.cpx1,t.x2,e),(r?sw:Sr)(t.y1,t.cpy1,t.y2,e)]}var _h=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new AK},e.prototype.buildPath=function(r,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,c=n.cpx2,h=n.cpy2,f=n.percent;f!==0&&(r.moveTo(i,a),c==null||h==null?(f<1&&(Xd(i,l,o,f,fn),l=fn[1],o=fn[2],Xd(a,u,s,f,fn),u=fn[1],s=fn[2]),r.quadraticCurveTo(l,u,o,s)):(f<1&&(ys(i,l,c,o,f,fn),l=fn[1],c=fn[2],o=fn[3],ys(a,u,h,s,f,fn),u=fn[1],h=fn[2],s=fn[3]),r.bezierCurveTo(l,u,c,h,o,s)))},e.prototype.pointAt=function(r){return FD(this.shape,r,!1)},e.prototype.tangentAt=function(r){var n=FD(this.shape,r,!0);return lu(n,n)},e}(Ue);_h.prototype.type="bezier-curve";var LK=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),Gv=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new LK},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,c=Math.cos(s),h=Math.sin(s);r.moveTo(c*o+i,h*o+a),r.arc(i,a,o,s,l,!u)},e}(Ue);Gv.prototype.type="arc";var Hv=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="compound",r}return e.prototype._updatePathDirty=function(){for(var r=this.shape.paths,n=this.shapeChanged(),i=0;i<r.length;i++)n=n||r[i].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var r=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<r.length;i++)r[i].path||r[i].createPathProxy(),r[i].path.setScale(n[0],n[1],r[i].segmentIgnoreThreshold)},e.prototype.buildPath=function(r,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(r,i[a].shape,!0)},e.prototype.afterBrush=function(){for(var r=this.shape.paths||[],n=0;n<r.length;n++)r[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Ue.prototype.getBoundingRect.call(this)},e}(Ue),Mj=function(){function t(e){this.colorStops=e||[]}return t.prototype.addColorStop=function(e,r){this.colorStops.push({offset:e,color:r})},t}(),uu=function(t){Y(e,t);function e(r,n,i,a,o,s){var l=t.call(this,o)||this;return l.x=r??0,l.y=n??0,l.x2=i??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return e}(Mj),W2=function(t){Y(e,t);function e(r,n,i,a,o){var s=t.call(this,a)||this;return s.x=r??.5,s.y=n??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return e}(Mj),h1=Math.min,PK=Math.max,tg=Math.abs,Qs=[0,0],Js=[0,0],_r=f4(),rg=_r.minTv,ng=_r.maxTv,Aj=function(){function t(e,r){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Te;for(var n=0;n<2;n++)this._axes[n]=new Te;e&&this.fromBoundingRect(e,r)}return t.prototype.fromBoundingRect=function(e,r){var n=this._corners,i=this._axes,a=e.x,o=e.y,s=a+e.width,l=o+e.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,l),n[3].set(a,l),r)for(var u=0;u<4;u++)n[u].transform(r);Te.sub(i[0],n[1],n[0]),Te.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(n[0])},t.prototype.intersect=function(e,r,n){var i=!0,a=!r;return r&&Te.set(r,0,0),_r.reset(n,!a),!this._intersectCheckOneSide(this,e,a,1)&&(i=!1,a)||!this._intersectCheckOneSide(e,this,a,-1)&&(i=!1,a)||!a&&!_r.negativeSize&&Te.copy(r,i?_r.useDir?_r.dirMinTv:rg:ng),i},t.prototype._intersectCheckOneSide=function(e,r,n,i){for(var a=!0,o=0;o<2;o++){var s=e._axes[o];if(e._getProjMinMaxOnAxis(o,e._corners,Qs),e._getProjMinMaxOnAxis(o,r._corners,Js),_r.negativeSize||Qs[1]<Js[0]||Qs[0]>Js[1]){if(a=!1,_r.negativeSize||n)return a;var l=tg(Js[0]-Qs[1]),u=tg(Qs[0]-Js[1]);h1(l,u)>ng.len()&&(l<u?Te.scale(ng,s,-l*i):Te.scale(ng,s,u*i))}else if(!n){var l=tg(Js[0]-Qs[1]),u=tg(Qs[0]-Js[1]);(_r.useDir||h1(l,u)<rg.len())&&((l<u||!_r.bidirectional)&&(Te.scale(rg,s,l*i),_r.useDir&&_r.calcDirMTV()),(l>=u||!_r.bidirectional)&&(Te.scale(rg,s,-u*i),_r.useDir&&_r.calcDirMTV()))}}return a},t.prototype._getProjMinMaxOnAxis=function(e,r,n){for(var i=this._axes[e],a=this._origin,o=r[0].dot(i)+a[e],s=o,l=o,u=1;u<r.length;u++){var c=r[u].dot(i)+a[e];s=h1(c,s),l=PK(c,l)}n[0]=s+_r.touchThreshold,n[1]=l-_r.touchThreshold,_r.negativeSize=n[1]<n[0]},t}(),kK=[],Lj=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.notClear=!0,r.incremental=!0,r._displayables=[],r._temporaryDisplayables=[],r._cursor=0,r}return e.prototype.traverse=function(r,n){r.call(n,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(r,n){n?this._temporaryDisplayables.push(r):this._displayables.push(r),this.markRedraw()},e.prototype.addDisplayables=function(r,n){n=n||!1;for(var i=0;i<r.length;i++)this.addDisplayable(r[i],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(r){for(var n=this._cursor;n<this._displayables.length;n++)r&&r(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)r&&r(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var r=this._cursor;r<this._displayables.length;r++){var n=this._displayables[r];n.parent=this,n.update(),n.parent=null}for(var r=0;r<this._temporaryDisplayables.length;r++){var n=this._temporaryDisplayables[r];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var r=new Ce(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(kK)),r.union(a)}this._rect=r}return this._rect},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(r,n))return!0}return!1},e}(fi),Pj=Fe();function xh(t,e,r,n,i){var a;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();a=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=t==="update";if(s){var u=void 0,c=void 0,h=void 0;n?(u=pe(n.duration,200),c=pe(n.easing,"cubicOut"),h=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),h=e.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(c=a.easing),a.delay!=null&&(h=a.delay)),me(h)&&(h=h(r,i)),me(u)&&(u=u(r));var f={duration:u||0,delay:h,easing:c};return f}else return null}function U2(t,e,r,n,i,a,o){var s=!1,l;me(i)?(o=a,a=i,i=null):be(i)&&(a=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=t==="leave";u||e.stopAnimation("leave");var c=xh(t,n,i,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,i):null);if(c&&c.duration>0){var h=c.duration,f=c.delay,d=c.easing,p={duration:h,delay:f||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,p):e.animateTo(r,p)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Qe(t,e,r,n,i,a){U2("update",t,e,r,n,i,a)}function St(t,e,r,n,i,a){U2("enter",t,e,r,n,i,a)}function Rc(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++){var r=t.animators[e];if(r.scope==="leave")return!0}return!1}function _s(t,e,r,n,i,a){Rc(t)||U2("leave",t,e,r,n,i,a)}function GD(t,e,r,n){t.removeTextContent(),t.removeTextGuideLine(),_s(t,{style:{opacity:0}},e,r,n)}function to(t,e,r){function n(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(i){i.isGroup||GD(i,e,r,n)}):GD(t,e,r,n)}function di(t){Pj(t).oldStyle=t.style}function DK(t){return Pj(t).oldStyle}var Rw={},De=["x","y"],qt=["width","height"];function kj(t){return Ue.extend(t)}var IK=fK;function Dj(t,e){return IK(t,e)}function pi(t,e){Rw[t]=e}function nv(t){if(Rw.hasOwnProperty(t))return Rw[t]}function Qc(t,e,r,n){var i=wj(t,e);return r&&(n==="center"&&(r=Ij(r,i.getBoundingRect())),$2(i,r)),i}function Z2(t,e,r){var n=new pr({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(i){if(r==="center"){var a={width:i.width,height:i.height};n.setStyle(Ij(e,a))}}});return n}function Ij(t,e){var r=e.width/e.height,n=t.height*r,i;n<=t.width?i=t.height:(n=t.width,i=n/r);var a=t.x+t.width/2,o=t.y+t.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var Ln=dK;function $2(t,e){if(t.applyTransform){var r=t.getBoundingRect(),n=r.calculateTransform(e);t.applyTransform(n)}}function Jc(t,e){return q0(t,t,{lineWidth:e}),t}function EK(t,e){return sj(t,t,e),t}var _m=En;function cs(t,e){for(var r=zv([]);t&&t!==e;)Ii(r,t.getLocalTransform(),r),t=t.parent;return r}function Ni(t,e,r){return e&&!Nr(e)&&(e=qa.getLocalTransform(e)),r&&(e=hi([],e)),Ot([],t,e)}function J0(t,e,r){var n=e[4]===0||e[5]===0||e[0]===0?1:ca(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:ca(2*e[4]/e[2]),a=[t==="left"?-n:t==="right"?n:0,t==="top"?-i:t==="bottom"?i:0];return a=Ni(a,e,r),ca(a[0])>ca(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function HD(t){return!t.isGroup}function NK(t){return t.shape!=null}function Wv(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){HD(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return NK(o)&&(s.shape=ye(o.shape)),s}var a=n(t);e.traverse(function(o){if(HD(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Qe(o,l,r,Le(o).dataIndex)}}})}function Y2(t,e){return re(t,function(r){var n=r[0];n=Gt(n,e.x),n=Rn(n,e.x+e.width);var i=r[1];return i=Gt(i,e.y),i=Rn(i,e.y+e.height),[n,i]})}function Ej(t,e){var r=Gt(t.x,e.x),n=Rn(t.x+t.width,e.x+e.width),i=Gt(t.y,e.y),a=Rn(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function Sh(t,e,r){var n=J({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),Se(i,r),new pr(n)):Qc(t.replace("path://",""),n,r,"center")}function Hf(t,e,r,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Nj(t,e,r,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function Nj(t,e,r,n,i,a,o,s){var l=r-t,u=n-e,c=o-i,h=s-a,f=f1(c,h,l,u);if(RK(f))return!1;var d=t-i,p=e-a,g=f1(d,p,l,u)/f;if(g<0||g>1)return!1;var m=f1(d,p,c,h)/f;return!(m<0||m>1)}function f1(t,e,r,n){return t*n-r*e}function RK(t){return t<=1e-6&&t>=-1e-6}function Ql(t,e,r,n,i){return e==null||(qe(e)?Ct[0]=Ct[1]=Ct[2]=Ct[3]=e:(Ct[0]=e[0],Ct[1]=e[1],Ct[2]=e[2],Ct[3]=e[3]),n&&(Ct[0]=Gt(0,Ct[0]),Ct[1]=Gt(0,Ct[1]),Ct[2]=Gt(0,Ct[2]),Ct[3]=Gt(0,Ct[3])),r&&(Ct[0]=-Ct[0],Ct[1]=-Ct[1],Ct[2]=-Ct[2],Ct[3]=-Ct[3]),WD(t,Ct,"x","width",3,1,i&&i[0]||0),WD(t,Ct,"y","height",0,2,i&&i[1]||0)),t}var Ct=[0,0,0,0];function WD(t,e,r,n,i,a,o){var s=e[a]+e[i],l=t[n];t[n]+=s,o=Gt(0,Rn(o,l)),t[n]<o?(t[n]=o,t[r]+=e[i]>=0?-e[i]:e[a]>=0?l+e[a]:ca(s)>1e-8?(l-o)*e[i]/s:0):t[r]-=e[i]}function So(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=se(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=t.formatterParamsExtra;l&&R($e(l),function(c){he(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Le(t.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:Se({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function Ow(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function Ps(t,e){if(t)if(ee(t))for(var r=0;r<t.length;r++)Ow(t[r],e);else Ow(t,e)}function X2(t){return!t||ca(t[1])<ig&&ca(t[2])<ig||ca(t[0])<ig&&ca(t[3])<ig}var ig=1e-5;function iv(t,e){return t?Ce.copy(t,e):e.clone()}function q2(t,e){return e?Bv(t||fr(),e):void 0}function Jl(t){return{z:t.get("z")||0,zlevel:t.get("zlevel")||0}}function Rj(t){var e=-1/0,r=1/0;Ow(t,function(a){n(a),n(a.getTextContent()),n(a.getTextGuideLine())});function n(a){if(!(!a||a.isGroup)){var o=a.currentStates;if(o.length)for(var s=0;s<o.length;s++)i(a.states[o[s]]);i(a)}}function i(a){if(a){var o=a.z2;o>e&&(e=o),o<r&&(r=o)}}return r>e&&(r=e=0),{min:r,max:e}}function e_(t,e,r){Oj(t,e,r,-1/0)}function Oj(t,e,r,n){if(t.ignoreModelZ)return n;var i=t.getTextContent(),a=t.getTextGuideLine(),o=t.isGroup;if(o)for(var s=t.childrenRef(),l=0;l<s.length;l++)n=Gt(Oj(s[l],e,r,n),n);else t.z=e,t.zlevel=r,n=Gt(t.z2||0,n);if(i&&(i.z=e,i.zlevel=r,isFinite(n)&&(i.z2=n+2)),a){var u=t.textGuideLineConfig;a.z=e,a.zlevel=r,isFinite(n)&&(a.z2=n+(u&&u.showAbove?1:-1))}return n}pi("circle",Pa);pi("ellipse",Fv);pi("sector",Or);pi("ring",yh);pi("polygon",zr);pi("polyline",Tr);pi("rect",Be);pi("line",Wt);pi("bezierCurve",_h);pi("arc",Gv);const cu=Object.freeze(Object.defineProperty({__proto__:null,Arc:Gv,BezierCurve:_h,BoundingRect:Ce,Circle:Pa,CompoundPath:Hv,Ellipse:Fv,Group:_e,Image:pr,IncrementalDisplayable:Lj,Line:Wt,LinearGradient:uu,OrientedBoundingRect:Aj,Path:Ue,Point:Te,Polygon:zr,Polyline:Tr,RadialGradient:W2,Rect:Be,Ring:yh,Sector:Or,Text:Xe,WH:qt,XY:De,applyTransform:Ni,calcZ2Range:Rj,clipPointsByRect:Y2,clipRectByRect:Ej,createIcon:Sh,ensureCopyRect:iv,ensureCopyTransform:q2,expandOrShrinkRect:Ql,extendPath:Dj,extendShape:kj,getShapeClass:nv,getTransform:cs,groupTransition:Wv,initProps:St,isBoundingRectAxisAligned:X2,isElementRemoved:Rc,lineLineIntersect:Nj,linePolygonIntersect:Hf,makeImage:Z2,makePath:Qc,mergePath:Ln,registerShape:pi,removeElement:_s,removeElementWithFadeOut:to,resizePath:$2,retrieveZInfo:Jl,setTooltipConfig:So,subPixelOptimize:_m,subPixelOptimizeLine:Jc,subPixelOptimizeRect:EK,transformDirection:J0,traverseElements:Ps,traverseUpdateZ:e_,updateProps:Qe},Symbol.toStringTag,{value:"Module"}));var t_={};function zj(t,e){for(var r=0;r<ln.length;r++){var n=ln[r],i=e[n],a=t.ensureState(n);a.style=a.style||{},a.style.text=i}var o=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(o,!0)}function zw(t,e,r){var n=t.labelFetcher,i=t.labelDataIndex,a=t.labelDimIndex,o=e.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),r!=null?{interpolatedValue:r}:null)),s==null&&(s=me(t.defaultText)?t.defaultText(i,t,r):t.defaultText);for(var l={normal:s},u=0;u<ln.length;u++){var c=ln[u],h=e[c];l[c]=pe(n?n.getFormattedLabel(i,c,null,a,h&&h.get("formatter")):null,s)}return l}function vr(t,e,r,n){r=r||t_;for(var i=t instanceof Xe,a=!1,o=0;o<tv.length;o++){var s=e[tv[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=i?t:t.getTextContent();if(a){i||(l||(l=new Xe,t.setTextContent(l)),t.stateProxy&&(l.stateProxy=t.stateProxy));var u=zw(r,e),c=e.normal,h=!!c.getShallow("show"),f=pt(c,n&&n.normal,r,!1,!i);f.text=u.normal,i||t.setTextConfig(Ty(c,r,!1));for(var o=0;o<ln.length;o++){var d=ln[o],s=e[d];if(s){var p=l.ensureState(d),g=!!pe(s.getShallow("show"),h);if(g!==h&&(p.ignore=!g),p.style=pt(s,n&&n[d],r,!0,!i),p.style.text=u[d],!i){var m=t.ensureState(d);m.textConfig=Ty(s,r,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(f.x=l.style.x),l.style.y!=null&&(f.y=l.style.y),l.ignore=!h,l.useStyle(f),l.dirty(),r.enableTextSetter&&(bh(l).setLabelText=function(y){var _=zw(r,e,y);zj(l,_)})}else l&&(l.ignore=!0);t.dirty()}function ar(t,e){e=e||"label";for(var r={normal:t.getModel(e)},n=0;n<ln.length;n++){var i=ln[n];r[i]=t.getModel([i,e])}return r}function pt(t,e,r,n,i){var a={};return OK(a,t,r,n,i),e&&J(a,e),a}function Ty(t,e,r){e=e||{};var n={},i,a=t.getShallow("rotate"),o=pe(t.getShallow("distance"),r?null:5),s=t.getShallow("offset");return i=t.getShallow("position")||(r?null:"inside"),i==="outside"&&(i=e.defaultOutsidePosition||"top"),i!=null&&(n.position=i),s!=null&&(n.offset=s),a!=null&&(a*=Math.PI/180,n.rotation=a),o!=null&&(n.distance=o),n.outsideFill=t.get("color")==="inherit"?e.inheritColor||null:"auto",e.autoOverflowArea!=null&&(n.autoOverflowArea=e.autoOverflowArea),e.layoutRect!=null&&(n.layoutRect=e.layoutRect),n}function OK(t,e,r,n,i){r=r||t_;var a=e.ecModel,o=a&&a.option.textStyle,s=zK(e),l;if(s){l={};var u="richInheritPlainLabel",c=pe(e.get(u),a?a.get(u):void 0);for(var h in s)if(s.hasOwnProperty(h)){var f=e.getModel(["rich",h]);YD(l[h]={},f,o,e,c,r,n,i,!1,!0)}}l&&(t.rich=l);var d=e.get("overflow");d&&(t.overflow=d);var p=e.get("lineOverflow");p&&(t.lineOverflow=p);var g=t,m=e.get("minMargin");if(m!=null)m=qe(m)?m/2:0,g.margin=[m,m,m,m],g.__marginType=bc.minMargin;else{var y=e.get("textMargin");y!=null&&(g.margin=Rv(y),g.__marginType=bc.textMargin)}YD(t,e,o,null,null,r,n,i,!0,!1)}function zK(t){for(var e;t&&t!==t.ecModel;){var r=(t.option||t_).rich;if(r){e=e||{};for(var n=$e(r),i=0;i<n.length;i++){var a=n[i];e[a]=1}}t=t.parentModel}return e}var UD=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],ZD=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],$D=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function YD(t,e,r,n,i,a,o,s,l,u){r=!o&&r||t_;var c=a&&a.inheritColor,h=e.getShallow("color"),f=e.getShallow("textBorderColor"),d=pe(e.getShallow("opacity"),r.opacity);(h==="inherit"||h==="auto")&&(c?h=c:h=null),(f==="inherit"||f==="auto")&&(c?f=c:f=null),s||(h=h||r.color,f=f||r.textBorderColor),h!=null&&(t.fill=h),f!=null&&(t.stroke=f);var p=pe(e.getShallow("textBorderWidth"),r.textBorderWidth);p!=null&&(t.lineWidth=p);var g=pe(e.getShallow("textBorderType"),r.textBorderType);g!=null&&(t.lineDash=g);var m=pe(e.getShallow("textBorderDashOffset"),r.textBorderDashOffset);m!=null&&(t.lineDashOffset=m),!o&&d==null&&!u&&(d=a&&a.defaultOpacity),d!=null&&(t.opacity=d),!o&&!s&&t.fill==null&&a.inheritColor&&(t.fill=a.inheritColor);for(var y=0;y<UD.length;y++){var _=UD[y],S=i!==!1&&n?Sn(e.getShallow(_),n.getShallow(_),r[_]):pe(e.getShallow(_),r[_]);S!=null&&(t[_]=S)}for(var y=0;y<ZD.length;y++){var _=ZD[y],S=e.getShallow(_);S!=null&&(t[_]=S)}if(t.verticalAlign==null){var T=e.getShallow("baseline");T!=null&&(t.verticalAlign=T)}if(!l||!a.disableBox){for(var y=0;y<$D.length;y++){var _=$D[y],S=e.getShallow(_);S!=null&&(t[_]=S)}var C=e.getShallow("borderType");C!=null&&(t.borderDash=C),(t.backgroundColor==="auto"||t.backgroundColor==="inherit")&&c&&(t.backgroundColor=c),(t.borderColor==="auto"||t.borderColor==="inherit")&&c&&(t.borderColor=c)}}function K2(t,e){var r=e&&e.getModel("textStyle");return kn([t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}var bh=Fe();function Bj(t,e,r,n){if(t){var i=bh(t);i.prevValue=i.value,i.value=r;var a=e.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=e)}}function jj(t,e,r,n,i){var a=bh(t);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=pe(a.interpolatedValue,a.prevValue),l=a.value;function u(c){var h=K4(r,a.precision,s,l,c);a.interpolatedValue=c===1?null:h;var f=zw({labelDataIndex:e,labelFetcher:i,defaultText:o?o(h):h+""},a.statesModels,h);zj(t,f)}t.percent=0,(a.prevValue==null?St:Qe)(t,{percent:1},n,e,null,u)}var bc={minMargin:1,textMargin:2},BK=["textStyle","color"],d1=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],v1=new Xe,jK=function(){function t(){}return t.prototype.getTextColor=function(e){var r=this.ecModel;return this.getShallow("color")||(!e&&r?r.get(BK):null)},t.prototype.getFont=function(){return K2({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(e){for(var r={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<d1.length;n++)r[d1[n]]=this.getShallow(d1[n]);return v1.useStyle(r),v1.update(),v1.getBoundingRect()},t}(),Vj=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],VK=ql(Vj),FK=function(){function t(){}return t.prototype.getLineStyle=function(e){return VK(this,e)},t}(),Fj=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],GK=ql(Fj),HK=function(){function t(){}return t.prototype.getItemStyle=function(e,r){return GK(this,e,r)},t}(),We=function(){function t(e,r,n){this.parentModel=r,this.ecModel=n,this.option=e}return t.prototype.init=function(e,r,n){},t.prototype.mergeOption=function(e,r){Ne(this.option,e,!0)},t.prototype.get=function(e,r){return e==null?this.option:this._doGet(this.parsePath(e),!r&&this.parentModel)},t.prototype.getShallow=function(e,r){var n=this.option,i=n==null?n:n[e];if(i==null&&!r){var a=this.parentModel;a&&(i=a.getShallow(e))}return i},t.prototype.getModel=function(e,r){var n=e!=null,i=n?this.parsePath(e):null,a=n?this._doGet(i):this.option;return r=r||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new t(a,r,this.ecModel)},t.prototype.isEmpty=function(){return this.option==null},t.prototype.restoreData=function(){},t.prototype.clone=function(){var e=this.constructor;return new e(ye(this.option))},t.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},t.prototype.resolveParentPath=function(e){return e},t.prototype.isAnimationEnabled=function(){if(!Ze.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(e,r){var n=this.option;if(!e)return n;for(var i=0;i<e.length&&!(e[i]&&(n=n&&typeof n=="object"?n[e[i]]:null,n==null));i++);return n==null&&r&&(n=r._doGet(this.resolveParentPath(e),r.parentModel)),n},t}();N2(We);eq(We);Bt(We,FK);Bt(We,HK);Bt(We,aq);Bt(We,jK);var WK=Math.round(Math.random()*10);function wh(t){return[t||"",WK++].join("_")}function UK(t){var e={};t.registerSubTypeDefaulter=function(r,n){var i=ha(r);e[i.main]=n},t.determineSubType=function(r,n){var i=n.type;if(!i){var a=ha(r).main;t.hasSubTypes(r)&&e[a]&&(i=e[a](n))}return i}}function ZK(t,e){t.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=r(o),c=u.graph,h=u.noEntryList,f={};for(R(a,function(_){f[_]=!0});h.length;){var d=h.pop(),p=c[d],g=!!f[d];g&&(s.call(l,d,p.originalDeps.slice()),delete f[d]),R(p.successor,g?y:m)}R(f,function(){var _="";throw new Error(_)});function m(_){c[_].entryCount--,c[_].entryCount===0&&h.push(_)}function y(_){f[_]=!0,m(_)}};function r(a){var o={},s=[];return R(a,function(l){var u=n(o,l),c=u.originalDeps=e(l),h=i(c,a);u.entryCount=h.length,u.entryCount===0&&s.push(l),R(h,function(f){Ee(u.predecessor,f)<0&&u.predecessor.push(f);var d=n(o,f);Ee(d.successor,f)<0&&d.successor.push(l)})}),{graph:o,noEntryList:s}}function n(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var s=[];return R(a,function(l){Ee(o,l)>=0&&s.push(l)}),s}}function ks(t,e){return Ne(Ne({},t,!0),e,!0)}const $K={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},YK={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Cy="ZH",Q2="EN",Oc=Q2,xm={},J2={},Gj=Ze.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Oc).toUpperCase();return t.indexOf(Cy)>-1?Cy:Oc}():Oc;function eM(t,e){t=t.toUpperCase(),J2[t]=new We(e),xm[t]=e}function XK(t){if(se(t)){var e=xm[t.toUpperCase()]||{};return t===Cy||t===Q2?ye(e):Ne(ye(e),ye(xm[Oc]),!1)}else return Ne(ye(t),ye(xm[Oc]),!1)}function Bw(t){return J2[t]}function qK(){return J2[Oc]}eM(Q2,$K);eM(Cy,YK);var jw=null;function KK(t){jw||(jw=t)}function Xt(){return jw}var tM=1e3,rM=tM*60,yd=rM*60,ri=yd*24,XD=ri*365,QK={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Sm={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},JK="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",ag="{yyyy}-{MM}-{dd}",qD={year:"{yyyy}",month:"{yyyy}-{MM}",day:ag,hour:ag+" "+Sm.hour,minute:ag+" "+Sm.minute,second:ag+" "+Sm.second,millisecond:JK},Cn=["year","month","day","hour","minute","second","millisecond"],eQ=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function tQ(t){return!se(t)&&!me(t)?rQ(t):t}function rQ(t){t=t||{};var e={},r=!0;return R(Cn,function(n){r&&(r=t[n]==null)}),R(Cn,function(n,i){var a=t[n];e[n]={};for(var o=null,s=i;s>=0;s--){var l=Cn[s],u=be(a)&&!ee(a)?a[l]:a,c=void 0;ee(u)?(c=u.slice(),o=c[0]||""):se(u)?(o=u,c=[o]):(o==null?o=Sm[n]:QK[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function rn(t,e){return t+="","0000".substr(0,e-t.length)+t}function _d(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function nQ(t){return t===_d(t)}function iQ(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Uv(t,e,r,n){var i=La(t),a=i[Hj(r)](),o=i[nM(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[iM(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[aM(r)](),h=(c-1)%12+1,f=i[oM(r)](),d=i[sM(r)](),p=i[lM(r)](),g=c>=12?"pm":"am",m=g.toUpperCase(),y=n instanceof We?n:Bw(n||Gj)||qK(),_=y.getModel("time"),S=_.get("month"),T=_.get("monthAbbr"),C=_.get("dayOfWeek"),M=_.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,rn(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,S[o-1]).replace(/{MMM}/g,T[o-1]).replace(/{MM}/g,rn(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,rn(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,C[u]).replace(/{ee}/g,M[u]).replace(/{e}/g,u+"").replace(/{HH}/g,rn(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,rn(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,rn(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,rn(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,rn(p,3)).replace(/{S}/g,p+"")}function aQ(t,e,r,n,i){var a=null;if(se(r))a=r;else if(me(r)){var o={time:t.time,level:t.time.level},s=Xt();s&&s.makeAxisLabelFormatterParamBreak(o,t.break),a=r(t.value,e,o)}else{var l=t.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=wc(t.value,i);a=r[c][c][0]}}return Uv(new Date(t.value),a,i,n)}function wc(t,e){var r=La(t),n=r[nM(e)]()+1,i=r[iM(e)](),a=r[aM(e)](),o=r[oM(e)](),s=r[sM(e)](),l=r[lM(e)](),u=l===0,c=u&&s===0,h=c&&o===0,f=h&&a===0,d=f&&i===1,p=d&&n===1;return p?"year":d?"month":f?"day":h?"hour":c?"minute":u?"second":"millisecond"}function My(t,e,r){switch(e){case"year":t[Wj(r)](0);case"month":t[Uj(r)](1);case"day":t[Zj(r)](0);case"hour":t[$j(r)](0);case"minute":t[Yj(r)](0);case"second":t[Xj(r)](0)}return t}function Hj(t){return t?"getUTCFullYear":"getFullYear"}function nM(t){return t?"getUTCMonth":"getMonth"}function iM(t){return t?"getUTCDate":"getDate"}function aM(t){return t?"getUTCHours":"getHours"}function oM(t){return t?"getUTCMinutes":"getMinutes"}function sM(t){return t?"getUTCSeconds":"getSeconds"}function lM(t){return t?"getUTCMilliseconds":"getMilliseconds"}function oQ(t){return t?"setUTCFullYear":"setFullYear"}function Wj(t){return t?"setUTCMonth":"setMonth"}function Uj(t){return t?"setUTCDate":"setDate"}function Zj(t){return t?"setUTCHours":"setHours"}function $j(t){return t?"setUTCMinutes":"setMinutes"}function Yj(t){return t?"setUTCSeconds":"setSeconds"}function Xj(t){return t?"setUTCMilliseconds":"setMilliseconds"}function sQ(t,e,r,n,i,a,o,s){var l=new Xe({style:{text:t,font:e,align:r,verticalAlign:n,padding:i,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function uM(t){if(!D2(t))return se(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function cM(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Th=Rv;function Vw(t,e,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&kn(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=t instanceof Date;if(o||s){var l=o?La(t):t;if(isNaN(+l)){if(s)return"-"}else return Uv(l,n,r)}if(e==="ordinal")return oy(t)?i(t):qe(t)&&a(t)?t+"":"-";var u=wa(t);return a(u)?uM(u):oy(t)?i(t):typeof t=="boolean"?t+"":"-"}var KD=["a","b","c","d","e","f","g"],p1=function(t,e){return"{"+t+(e??"")+"}"};function hM(t,e,r){ee(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a<i.length;a++){var o=KD[a];t=t.replace(p1(o),p1(o,0))}for(var s=0;s<n;s++)for(var l=0;l<i.length;l++){var u=e[s][i[l]];t=t.replace(p1(KD[l],s),r?Zr(u):u)}return t}function lQ(t,e,r){return R(e,function(n,i){t=t.replace("{"+i+"}",n)}),t}function qj(t,e){var r=se(t)?{color:t,extraCssText:e}:t||{},n=r.color,i=r.type;e=r.extraCssText;var a=r.renderMode||"html";if(!n)return"";if(a==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Zr(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Zr(n)+";"+(e||"")+'"></span>';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 uQ(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t=`MM-dd
|
||
yyyy`);var n=La(e),i=r?"getUTC":"get",a=n[i+"FullYear"](),o=n[i+"Month"]()+1,s=n[i+"Date"](),l=n[i+"Hours"](),u=n[i+"Minutes"](),c=n[i+"Seconds"](),h=n[i+"Milliseconds"]();return t=t.replace("MM",rn(o,2)).replace("M",o).replace("yyyy",a).replace("yy",rn(a%100+"",2)).replace("dd",rn(s,2)).replace("d",s).replace("hh",rn(l,2)).replace("h",l).replace("mm",rn(u,2)).replace("m",u).replace("ss",rn(c,2)).replace("s",c).replace("SSS",rn(h,3)),t}function cQ(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}function eu(t,e){return e=e||"transparent",se(t)?t:be(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Ay(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var bm={},g1={},Ch=function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(e,r){this._nonSeriesBoxMasterList=n(bm),this._normalMasterList=n(g1);function n(i,a){var o=[];return R(i,function(s,l){var u=s.create(e,r);o=o.concat(u||[])}),o}},t.prototype.update=function(e,r){R(this._normalMasterList,function(n){n.update&&n.update(e,r)})},t.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},t.register=function(e,r){if(e==="matrix"||e==="calendar"){bm[e]=r;return}g1[e]=r},t.get=function(e){return g1[e]||bm[e]},t}();function hQ(t){return!!bm[t]}var Fw={coord:1,coord2:2};function fQ(t){Kj.set(t.fullType,{getCoord2:void 0}).getCoord2=t.getCoord2}var Kj=de();function dQ(t){var e=t.getShallow("coord",!0),r=Fw.coord;if(e==null){var n=Kj.get(t.type);n&&n.getCoord2&&(r=Fw.coord2,e=n.getCoord2(t))}return{coord:e,from:r}}var la={none:0,dataCoordSys:1,boxCoordSys:2};function Qj(t,e){var r=t.getShallow("coordinateSystem"),n=t.getShallow("coordinateSystemUsage",!0),i=la.none;if(r){var a=t.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=la.dataCoordSys,a||(i=la.none)):n==="box"&&(i=la.boxCoordSys,!a&&!hQ(r)&&(i=la.none))}return{coordSysType:r,kind:i}}function Zv(t){var e=t.targetModel,r=t.coordSysType,n=t.coordSysProvider,i=t.isDefaultDataCoordSys;t.allowNotFound;var a=Qj(e),o=a.kind,s=a.coordSysType;if(i&&o!==la.dataCoordSys&&(o=la.dataCoordSys,s=r),o===la.none||s!==r)return!1;var l=n(r,e);return l?(o===la.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var Jj=function(t,e){var r=e.getReferringComponents(t,kt).models[0];return r&&r.coordinateSystem},wm=R,eV=["left","right","top","bottom","width","height"],Ll=[["width","left","right"],["height","top","bottom"]];function fM(t,e,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),h=e.childAt(u+1),f=h&&h.getBoundingRect(),d,p;if(t==="horizontal"){var g=c.width+(f?-f.x+c.x:0);d=a+g,d>n||l.newline?(a=0,d=g,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(f?-f.y+c.y:0);p=o+m,p>i||l.newline?(a+=s+r,o=0,p=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),t==="horizontal"?a=d+r:o=p+r)})}var zl=fM;Ie(fM,"vertical");Ie(fM,"horizontal");function tV(t,e){return{left:t.getShallow("left",e),top:t.getShallow("top",e),right:t.getShallow("right",e),bottom:t.getShallow("bottom",e),width:t.getShallow("width",e),height:t.getShallow("height",e)}}function vQ(t,e){var r=sr(t,e,{enableLayoutOnlyByCenter:!0}),n=t.getBoxLayoutParams(),i,a;if(r.type===Wf.point)a=r.refPoint,i=bt(n,{width:e.getWidth(),height:e.getHeight()});else{var o=t.get("center"),s=ee(o)?o:[o,o];i=bt(n,r.refContainer),a=r.boxCoordFrom===Fw.coord2?r.refPoint:[oe(s[0],i.width)+i.x,oe(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function rV(t,e){var r=vQ(t,e),n=r.viewRect,i=r.center,a=t.get("radius");ee(a)||(a=[0,a]);var o=oe(n.width,e.getWidth()),s=oe(n.height,e.getHeight()),l=Math.min(o,s),u=oe(a[0],l/2),c=oe(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:n}}function bt(t,e,r){r=Th(r||0);var n=e.width,i=e.height,a=oe(t.left,n),o=oe(t.top,i),s=oe(t.right,n),l=oe(t.bottom,i),u=oe(t.width,n),c=oe(t.height,i),h=r[2]+r[0],f=r[1]+r[3],d=t.aspect;switch(isNaN(u)&&(u=n-s-f-a),isNaN(c)&&(c=i-l-h-o),d!=null&&(isNaN(u)&&isNaN(c)&&(d>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(a)&&(a=n-s-u-f),isNaN(o)&&(o=i-l-c-h),t.left||t.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-f;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-h;break}a=a||0,o=o||0,isNaN(u)&&(u=n-f-a-(s||0)),isNaN(c)&&(c=i-h-o-(l||0));var p=new Ce((e.x||0)+a+r[3],(e.y||0)+o+r[0],u,c);return p.margin=r,p}function nV(t,e,r){var n=t.getShallow("preserveAspect",!0);if(!n)return e;var i=e.width/e.height;if(Math.abs(Math.atan(r)-Math.atan(i))<1e-9)return e;var a=t.getShallow("preserveAspectAlign",!0),o=t.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=n==="cover";return i>r&&!l||i<r&&l?(s.width=e.height*r,a==="left"?s.left=0:a==="right"?s.right=0:s.left="center"):(s.height=e.width/r,o==="top"?s.top=0:o==="bottom"?s.bottom=0:s.top="middle"),bt(s,e)}var Wf={rect:1,point:2};function sr(t,e,r){var n,i,a,o=t.boxCoordinateSystem,s;if(o){var l=dQ(t),u=l.coord,c=l.from;if(o.dataToLayout){a=Wf.rect,s=c;var h=o.dataToLayout(u);n=h.contentRect||h.rect}else r&&r.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=Wf.point,s=c,i=o.dataToPoint(u))}return a==null&&(a=Wf.rect),a===Wf.rect&&(n||(n={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),i=[n.x+n.width/2,n.y+n.height/2]),{type:a,refContainer:n,refPoint:i,boxCoordFrom:s}}function r_(t,e,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||t,a.x=t.x,a.y=t.y,!o&&!s)return!1;var u;if(l==="raw")u=t.type==="group"?new Ce(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var c=t.getLocalTransform();u=u.clone(),u.applyTransform(c)}var h=bt(Se({width:u.width,height:u.height},e),r,n),f=o?h.x-u.x:0,d=s?h.y-u.y:0;return l==="raw"?(a.x=f,a.y=d):(a.x+=f,a.y+=d),a===t&&t.markRedraw(),!0}function pQ(t,e){return t[Ll[e][0]]!=null||t[Ll[e][1]]!=null&&t[Ll[e][2]]!=null}function av(t){var e=t.layoutMode||t.constructor.layoutMode;return be(e)?e:e?{type:e}:null}function Ca(t,e,r){var n=r&&r.ignoreSize;!ee(n)&&(n=[n,n]);var i=o(Ll[0],0),a=o(Ll[1],1);l(Ll[0],t,i),l(Ll[1],t,a);function o(u,c){var h={},f=0,d={},p=0,g=2;if(wm(u,function(_){d[_]=t[_]}),wm(u,function(_){he(e,_)&&(h[_]=d[_]=e[_]),s(h,_)&&f++,s(d,_)&&p++}),n[c])return s(e,u[1])?d[u[2]]=null:s(e,u[2])&&(d[u[1]]=null),d;if(p===g||!f)return d;if(f>=g)return h;for(var m=0;m<u.length;m++){var y=u[m];if(!he(h,y)&&he(t,y)){h[y]=t[y];break}}return h}function s(u,c){return u[c]!=null&&u[c]!=="auto"}function l(u,c,h){wm(u,function(f){c[f]=h[f]})}}function hu(t){return iV({},t)}function iV(t,e){return e&&t&&wm(eV,function(r){he(e,r)&&(t[r]=e[r])}),t}var gQ=Fe(),Ve=function(t){Y(e,t);function e(r,n,i){var a=t.call(this,r,n,i)||this;return a.uid=wh("ec_cpt_model"),a}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=av(this),a=i?hu(r):{},o=n.getTheme();Ne(r,o.get(this.mainType)),Ne(r,this.getDefaultOption()),i&&Ca(r,a,i)},e.prototype.mergeOption=function(r,n){Ne(this.option,r,!0);var i=av(this);i&&Ca(this.option,r,i)},e.prototype.optionUpdated=function(r,n){},e.prototype.getDefaultOption=function(){var r=this.constructor;if(!KX(r))return r.defaultOption;var n=gQ(this);if(!n.defaultOption){for(var i=[],a=r;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},l=i.length-1;l>=0;l--)s=Ne(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return gh(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){return tV(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(We);J4(Ve,We);U0(Ve);UK(Ve);ZK(Ve,mQ);function mQ(t){var e=[];return R(Ve.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=re(e,function(r){return ha(r).main}),t!=="dataset"&&Ee(e,"dataset")<=0&&e.unshift("dataset"),e}var q={color:{},darkColor:{},size:{}},jt=q.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};J(jt,{primary:jt.neutral80,secondary:jt.neutral70,tertiary:jt.neutral60,quaternary:jt.neutral50,disabled:jt.neutral20,border:jt.neutral30,borderTint:jt.neutral20,borderShade:jt.neutral40,background:jt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:jt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:jt.neutral70,axisLineTint:jt.neutral40,axisTick:jt.neutral70,axisTickMinor:jt.neutral60,axisLabel:jt.neutral70,axisSplitLine:jt.neutral15,axisMinorSplitLine:jt.neutral05});for(var el in jt)if(jt.hasOwnProperty(el)){var QD=jt[el];el==="theme"?q.darkColor.theme=jt.theme.slice():el==="highlight"?q.darkColor.highlight="rgba(255,231,130,0.4)":el.indexOf("accent")===0?q.darkColor[el]=eo(QD,null,function(t){return t*.5},function(t){return Math.min(1,1.3-t)}):q.darkColor[el]=eo(QD,null,function(t){return t*.9},function(t){return 1-Math.pow(t,1.5)})}q.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var aV="";typeof navigator<"u"&&(aV=navigator.platform||"");var Ou="rgba(0, 0, 0, 0.2)",oV=q.color.theme[0],yQ=eo(oV,null,null,.9);const _Q={darkMode:"auto",colorBy:"series",color:q.color.theme,gradientColor:[yQ,oV],aria:{decal:{decals:[{color:Ou,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Ou,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Ou,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Ou,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Ou,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Ou,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:aV.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 sV=de(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),jn="original",Cr="arrayRows",Vn="objectRows",Vi="keyedColumns",hs="typedArray",lV="unknown",Ri="column",fu="row",Lr={Must:1,Might:2,Not:3},uV=Fe();function xQ(t){uV(t).datasetMap=de()}function cV(t,e,r){var n={},i=vM(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=uV(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,h;t=t.slice(),R(t,function(g,m){var y=be(g)?g:t[m]={name:g};y.type==="ordinal"&&c==null&&(c=m,h=p(y)),n[y.name]=[]});var f=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});R(t,function(g,m){var y=g.name,_=p(g);if(c==null){var S=f.valueWayDim;d(n[y],S,_),d(o,S,_),f.valueWayDim+=_}else if(c===m)d(n[y],0,_),d(a,0,_);else{var S=f.categoryWayDim;d(n[y],S,_),d(o,S,_),f.categoryWayDim+=_}});function d(g,m,y){for(var _=0;_<y;_++)g.push(m+_)}function p(g){var m=g.dimsDef;return m?m.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function dM(t,e,r){var n={},i=vM(t);if(!i)return n;var a=e.sourceFormat,o=e.dimensionsDefine,s;(a===Vn||a===Vi)&&R(o,function(c,h){(be(c)?c.name:c)==="name"&&(s=h)});var l=function(){for(var c={},h={},f=[],d=0,p=Math.min(5,r);d<p;d++){var g=fV(e.data,a,e.seriesLayoutBy,o,e.startIndex,d);f.push(g);var m=g===Lr.Not;if(m&&c.v==null&&d!==s&&(c.v=d),(c.n==null||c.n===c.v||!m&&f[c.n]===Lr.Not)&&(c.n=d),y(c)&&f[c.n]!==Lr.Not)return c;m||(g===Lr.Might&&h.v==null&&d!==s&&(h.v=d),(h.n==null||h.n===h.v)&&(h.n=d))}function y(_){return _.v!=null&&_.n!=null}return y(c)?c:y(h)?h:null}();if(l){n.value=[l.v];var u=s??l.n;n.itemName=[u],n.seriesName=[u]}return n}function vM(t){var e=t.get("data",!0);if(!e)return gh(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},kt).models[0]}function SQ(t){return!t.get("transform",!0)&&!t.get("fromTransformResult",!0)?[]:gh(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},kt).models}function hV(t,e){return fV(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function fV(t,e,r,n,i,a){var o,s=5;if(sn(t))return Lr.Not;var l,u;if(n){var c=n[a];be(c)?(l=c.name,u=c.type):se(c)&&(l=c)}if(u!=null)return u==="ordinal"?Lr.Must:Lr.Not;if(e===Cr){var h=t;if(r===fu){for(var f=h[a],d=0;d<(f||[]).length&&d<s;d++)if((o=T(f[i+d]))!=null)return o}else for(var d=0;d<h.length&&d<s;d++){var p=h[i+d];if(p&&(o=T(p[a]))!=null)return o}}else if(e===Vn){var g=t;if(!l)return Lr.Not;for(var d=0;d<g.length&&d<s;d++){var m=g[d];if(m&&(o=T(m[l]))!=null)return o}}else if(e===Vi){var y=t;if(!l)return Lr.Not;var f=y[l];if(!f||sn(f))return Lr.Not;for(var d=0;d<f.length&&d<s;d++)if((o=T(f[d]))!=null)return o}else if(e===jn)for(var _=t,d=0;d<_.length&&d<s;d++){var m=_[d],S=ph(m);if(!ee(S))return Lr.Not;if((o=T(S[a]))!=null)return o}function T(C){var M=se(C);if(C!=null&&Number.isFinite(Number(C))&&C!=="")return M?Lr.Might:Lr.Not;if(M&&C!=="-")return Lr.Must}return Lr.Not}var Gw=de();function bQ(t,e){Rr(Gw.get(t)==null&&e),Gw.set(t,e)}function wQ(t,e,r){var n=Gw.get(e);if(!n)return r;var i=n(t);return i?r.concat(i):r}var JD=Fe(),TQ=Fe(),pM=function(){function t(){}return t.prototype.getColorFromPalette=function(e,r,n){var i=gt(this.get("color",!0)),a=this.get("colorLayer",!0);return dV(this,JD,i,a,e,r,n)},t.prototype.clearColorPalette=function(){MQ(this,JD)},t}();function Hw(t,e,r,n){var i=gt(t.get(["aria","decal","decals"]));return dV(t,TQ,i,null,e,r,n)}function CQ(t,e){for(var r=t.length,n=0;n<r;n++)if(t[n].length>e)return t[n];return t[r-1]}function dV(t,e,r,n,i,a,o){a=a||t;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:CQ(n,o);if(c=c||r,!(!c||!c.length)){var h=c[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%c.length,h}}function MQ(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var og,uf,eI,tI="\0_ec_inner",AQ=1,gM=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new We(a),this._locale=new We(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){var a=iI(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,iI(n))},e.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"?eI(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&&R(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=de(),u=n&&n.replaceMergeMainTypeMap;xQ(this),R(r,function(h,f){h!=null&&(Ve.hasClass(f)?f&&(s.push(f),l.set(f,!0)):i[f]=i[f]==null?ye(h):Ne(i[f],h,!0))}),u&&u.each(function(h,f){Ve.hasClass(f)&&!l.get(f)&&(s.push(f),l.set(f,!0))}),Ve.topologicalTravel(s,Ve.getAllClassMainTypes(),c,this);function c(h){var f=wQ(this,h,gt(r[h])),d=a.get(h),p=d?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",g=Y4(d,f,p);GX(g,h,Ve),i[h]=null,a.set(h,null),o.set(h,0);var m=[],y=[],_=0,S;R(g,function(T,C){var M=T.existing,A=T.newOption;if(!A)M&&(M.mergeOption({},this),M.optionUpdated({},!1));else{var k=h==="series",E=Ve.getClass(h,T.keyInfo.subType,!k);if(!E)return;if(h==="tooltip"){if(S)return;S=!0}if(M&&M.constructor===E)M.name=T.keyInfo.name,M.mergeOption(A,this),M.optionUpdated(A,!1);else{var D=J({componentIndex:C},T.keyInfo);M=new E(A,this,this,D),J(M,D),T.brandNew&&(M.__requireNewView=!0),M.init(A,this,this),M.optionUpdated(null,!0)}}M?(m.push(M.option),y.push(M),_++):(m.push(void 0),y.push(void 0))},this),i[h]=m,a.set(h,y),o.set(h,_),h==="series"&&og(this)}this._seriesIndices||og(this)},e.prototype.getOption=function(){var r=ye(this.option);return R(r,function(n,i){if(Ve.hasClass(i)){for(var a=gt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!ev(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[tI],r},e.prototype.setTheme=function(r){this._theme=new We(r),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.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<i.length;o++)if(i[o])return i[o]}}},e.prototype.queryComponents=function(r){var n=r.mainType;if(!n)return[];var i=r.index,a=r.id,o=r.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return i!=null?(l=[],R(gt(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=rI("id",a,s):o!=null?l=rI("name",o,s):l=tt(s,function(u){return!!u}),nI(l,r)},e.prototype.findComponents=function(r){var n=r.query,i=r.mainType,a=s(n),o=a?this.queryComponents(a):tt(this._componentsMap.get(i),function(u){return!!u});return l(nI(o,r));function s(u){var c=i+"Index",h=i+"Id",f=i+"Name";return u&&(u[c]!=null||u[h]!=null||u[f]!=null)?{mainType:i,index:u[c],id:u[h],name:u[f]}:null}function l(u){return r.filter?tt(u,r.filter):u}},e.prototype.eachComponent=function(r,n,i){var a=this._componentsMap;if(me(r)){var o=n,s=r;a.each(function(h,f){for(var d=0;h&&d<h.length;d++){var p=h[d];p&&s.call(o,f,p,p.componentIndex)}})}else for(var l=se(r)?a.get(r):be(r)?this.findComponents(r):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(i,c,c.componentIndex)}},e.prototype.getSeriesByName=function(r){var n=rr(r,null);return tt(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},e.prototype.getSeriesByIndex=function(r){return this._componentsMap.get("series")[r]},e.prototype.getSeriesByType=function(r){return tt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===r})},e.prototype.getSeries=function(){return tt(this._componentsMap.get("series"),function(r){return!!r})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(r,n){uf(this),R(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];r.call(n,a,i)},this)},e.prototype.eachRawSeries=function(r,n){R(this._componentsMap.get("series"),function(i){i&&r.call(n,i,i.componentIndex)})},e.prototype.eachSeriesByType=function(r,n,i){uf(this),R(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===r&&n.call(i,o,a)},this)},e.prototype.eachRawSeriesByType=function(r,n,i){return R(this.getSeriesByType(r),n,i)},e.prototype.isSeriesFiltered=function(r){return uf(this),this._seriesIndicesMap.get(r.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(r,n){uf(this);var i=[];R(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];r.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=de(i)},e.prototype.restoreData=function(r){og(this);var n=this._componentsMap,i=[];n.each(function(a,o){Ve.hasClass(o)&&i.push(o)}),Ve.topologicalTravel(i,Ve.getAllClassMainTypes(),function(a){R(n.get(a),function(o){o&&(a!=="series"||!LQ(o,r))&&o.restoreData()})})},e.internalField=function(){og=function(r){var n=r._seriesIndices=[];R(r._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),r._seriesIndicesMap=de(n)},uf=function(r){},eI=function(r,n){r.option={},r.option[tI]=AQ,r._componentsMap=de({series:[]}),r._componentsCount=de();var i=n.aria;be(i)&&i.enabled==null&&(i.enabled=!0),PQ(n,r._theme.option),Ne(n,_Q,!1),r._mergeOption(n,null)}}(),e}(We);function LQ(t,e){if(e){var r=e.seriesIndex,n=e.seriesId,i=e.seriesName;return r!=null&&t.componentIndex!==r||n!=null&&t.id!==n||i!=null&&t.name!==i}}function PQ(t,e){var r=t.color&&!t.colorLayer;R(e,function(n,i){i==="colorLayer"&&r||i==="color"&&t.color||Ve.hasClass(i)||(typeof n=="object"?t[i]=t[i]?Ne(t[i],n,!1):ye(n):t[i]==null&&(t[i]=n))})}function rI(t,e,r){if(ee(e)){var n=de();return R(e,function(a){if(a!=null){var o=rr(a,null);o!=null&&n.set(a,!0)}}),tt(r,function(a){return a&&n.get(a[t])})}else{var i=rr(e,null);return tt(r,function(a){return a&&i!=null&&a[t]===i})}}function nI(t,e){return e.hasOwnProperty("subType")?tt(t,function(r){return r&&r.subType===e.subType}):t}function iI(t){var e=de();return t&&R(gt(t.replaceMerge),function(r){e.set(r,!0)}),{replaceMergeMainTypeMap:e}}Bt(gM,pM);var kQ=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],vV=function(){function t(e){R(kQ,function(r){this[r]=le(e[r],e)},this)}return t}(),DQ=/^(min|max)?(.+)$/,IQ=function(){function t(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return t.prototype.setOption=function(e,r,n){e&&(R(gt(e.series),function(o){o&&o.data&&sn(o.data)&&$d(o.data)}),R(gt(e.dataset),function(o){o&&o.source&&sn(o.source)&&$d(o.source)})),e=ye(e);var i=this._optionBackup,a=EQ(e,r,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},t.prototype.mountOption=function(e){var r=this._optionBackup;return this._timelineOptions=r.timelineOptions,this._mediaList=r.mediaList,this._mediaDefault=r.mediaDefault,this._currentMediaIndices=[],ye(e?r.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(e){var r,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(r=ye(n[i.getCurrentIndex()]))}return r},t.prototype.getMediaOption=function(e){var r=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var l=0,u=i.length;l<u;l++)NQ(i[l].query,r,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!OQ(o,this._currentMediaIndices)&&(s=re(o,function(c){return ye(c===-1?a.option:i[c].option)})),this._currentMediaIndices=o,s},t}();function EQ(t,e,r){var n=[],i,a,o=t.baseOption,s=t.timeline,l=t.options,u=t.media,c=!!t.media,h=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((h||c)&&(t.options=t.media=null),a=t),c&&ee(u)&&R(u,function(d){d&&d.option&&(d.query?n.push(d):i||(i=d))}),f(a),R(l,function(d){return f(d)}),R(n,function(d){return f(d.option)});function f(d){R(e,function(p){p(d,r)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function NQ(t,e,r){var n={width:e,height:r,aspectratio:e/r},i=!0;return R(t,function(a,o){var s=o.match(DQ);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();RQ(n[u],a,l)||(i=!1)}}),i}function RQ(t,e,r){return r==="min"?t>=e:r==="max"?t<=e:t===e}function OQ(t,e){return t.join(",")===e.join(",")}var xi=R,ov=be,aI=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function m1(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=aI.length;r<n;r++){var i=aI[r],a=e.normal,o=e.emphasis;a&&a[i]&&(t[i]=t[i]||{},t[i].normal?Ne(t[i].normal,a[i]):t[i].normal=a[i],a[i]=null),o&&o[i]&&(t[i]=t[i]||{},t[i].emphasis?Ne(t[i].emphasis,o[i]):t[i].emphasis=o[i],o[i]=null)}}function Wr(t,e,r){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,i=t[e].emphasis;n&&(r?(t[e].normal=t[e].emphasis=null,Se(t[e],n)):t[e]=n),i&&(t.emphasis=t.emphasis||{},t.emphasis[e]=i,i.focus&&(t.emphasis.focus=i.focus),i.blurScope&&(t.emphasis.blurScope=i.blurScope))}}function Uf(t){Wr(t,"itemStyle"),Wr(t,"lineStyle"),Wr(t,"areaStyle"),Wr(t,"label"),Wr(t,"labelLine"),Wr(t,"upperLabel"),Wr(t,"edgeLabel")}function $t(t,e){var r=ov(t)&&t[e],n=ov(r)&&r.textStyle;if(n)for(var i=0,a=lD.length;i<a;i++){var o=lD[i];n.hasOwnProperty(o)&&(r[o]=n[o])}}function Xn(t){t&&(Uf(t),$t(t,"label"),t.emphasis&&$t(t.emphasis,"label"))}function zQ(t){if(ov(t)){m1(t),Uf(t),$t(t,"label"),$t(t,"upperLabel"),$t(t,"edgeLabel"),t.emphasis&&($t(t.emphasis,"label"),$t(t.emphasis,"upperLabel"),$t(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(m1(e),Xn(e));var r=t.markLine;r&&(m1(r),Xn(r));var n=t.markArea;n&&Xn(n);var i=t.data;if(t.type==="graph"){i=i||t.nodes;var a=t.links||t.edges;if(a&&!sn(a))for(var o=0;o<a.length;o++)Xn(a[o]);R(t.categories,function(u){Uf(u)})}if(i&&!sn(i))for(var o=0;o<i.length;o++)Xn(i[o]);if(e=t.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)Xn(s[o]);if(r=t.markLine,r&&r.data)for(var l=r.data,o=0;o<l.length;o++)ee(l[o])?(Xn(l[o][0]),Xn(l[o][1])):Xn(l[o]);t.type==="gauge"?($t(t,"axisLabel"),$t(t,"title"),$t(t,"detail")):t.type==="treemap"?(Wr(t.breadcrumb,"itemStyle"),R(t.levels,function(u){Uf(u)})):t.type==="tree"&&Uf(t.leaves)}}function Oa(t){return ee(t)?t:t?[t]:[]}function oI(t){return(ee(t)?t[0]:t)||{}}function BQ(t,e){xi(Oa(t.series),function(n){ov(n)&&zQ(n)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),xi(r,function(n){xi(Oa(t[n]),function(i){i&&($t(i,"axisLabel"),$t(i.axisPointer,"label"))})}),xi(Oa(t.parallel),function(n){var i=n&&n.parallelAxisDefault;$t(i,"axisLabel"),$t(i&&i.axisPointer,"label")}),xi(Oa(t.calendar),function(n){Wr(n,"itemStyle"),$t(n,"dayLabel"),$t(n,"monthLabel"),$t(n,"yearLabel")}),xi(Oa(t.radar),function(n){$t(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap)}),xi(Oa(t.geo),function(n){ov(n)&&(Xn(n),xi(Oa(n.regions),function(i){Xn(i)}))}),xi(Oa(t.timeline),function(n){Xn(n),Wr(n,"label"),Wr(n,"itemStyle"),Wr(n,"controlStyle",!0);var i=n.data;ee(i)&&R(i,function(a){be(a)&&(Wr(a,"label"),Wr(a,"itemStyle"))})}),xi(Oa(t.toolbox),function(n){Wr(n,"iconStyle"),xi(n.feature,function(i){Wr(i,"iconStyle")})}),$t(oI(t.axisPointer),"label"),$t(oI(t.tooltip).axisPointer,"label")}function jQ(t,e){for(var r=e.split(","),n=t,i=0;i<r.length&&(n=n&&n[r[i]],n!=null);i++);return n}function VQ(t,e,r,n){for(var i=e.split(","),a=t,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];a[i[s]]==null&&(a[i[s]]=r)}function sI(t){t&&R(FQ,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var FQ=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],GQ=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],y1=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function cf(t){var e=t&&t.itemStyle;if(e)for(var r=0;r<y1.length;r++){var n=y1[r][1],i=y1[r][0];e[n]!=null&&(e[i]=e[n])}}function lI(t){t&&t.alignTo==="edge"&&t.margin!=null&&t.edgeDistance==null&&(t.edgeDistance=t.margin)}function uI(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function HQ(t){t&&t.focusNodeAdjacency!=null&&(t.emphasis=t.emphasis||{},t.emphasis.focus==null&&(t.emphasis.focus="adjacency"))}function pV(t,e){if(t)for(var r=0;r<t.length;r++)e(t[r]),t[r]&&pV(t[r].children,e)}function gV(t,e){BQ(t,e),t.series=gt(t.series),R(t.series,function(r){if(be(r)){var n=r.type;if(n==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow);else if(n==="pie"||n==="gauge"){r.clockWise!=null&&(r.clockwise=r.clockWise),lI(r.label);var i=r.data;if(i&&!sn(i))for(var a=0;a<i.length;a++)lI(i[a]);r.hoverOffset!=null&&(r.emphasis=r.emphasis||{},(r.emphasis.scaleSize=null)&&(r.emphasis.scaleSize=r.hoverOffset))}else if(n==="gauge"){var o=jQ(r,"pointer.color");o!=null&&VQ(r,"itemStyle.color",o)}else if(n==="bar"){cf(r),cf(r.backgroundStyle),cf(r.emphasis);var i=r.data;if(i&&!sn(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(cf(i[a]),cf(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=r.highlightPolicy;s&&(r.emphasis=r.emphasis||{},r.emphasis.focus||(r.emphasis.focus=s)),uI(r),pV(r.data,uI)}else n==="graph"||n==="sankey"?HQ(r):n==="map"&&(r.mapType&&!r.map&&(r.map=r.mapType),r.mapLocation&&Se(r,r.mapLocation));r.hoverAnimation!=null&&(r.emphasis=r.emphasis||{},r.emphasis&&r.emphasis.scale==null&&(r.emphasis.scale=r.hoverAnimation)),sI(r)}}),t.dataRange&&(t.visualMap=t.dataRange),R(GQ,function(r){var n=t[r];n&&(ee(n)||(n=[n]),R(n,function(i){sI(i)}))})}function WQ(t){var e=de();t.eachSeries(function(r){var n=r.get("stack");if(n){var i=e.get(n)||e.set(n,[]),a=r.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.push(o)}}),e.each(function(r){if(r.length!==0){var n=r[0].seriesModel,i=n.get("stackOrder")||"seriesAsc";i==="seriesDesc"&&r.reverse(),R(r,function(a,o){a.data.setCalculationInfo("stackedOnSeries",o>0?r[o-1].seriesModel:null)}),UQ(r)}})}function UQ(t){R(t,function(e,r){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,h){var f=o.get(e.stackedDimension,h);if(isNaN(f))return i;var d,p;s?p=o.getRawIndex(h):d=o.get(e.stackedByDimension,h);for(var g=NaN,m=r-1;m>=0;m--){var y=t[m];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,d)),p>=0){var _=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&f>=0&&_>0||l==="samesign"&&f<=0&&_<0){f=PX(f,_),g=_;break}}}return n[0]=f,n[1]=g,n})})}var n_=function(){function t(e){this.data=e.data||(e.sourceFormat===Vi?{}:[]),this.sourceFormat=e.sourceFormat||lV,this.seriesLayoutBy=e.seriesLayoutBy||Ri,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;n<r.length;n++){var i=r[n];i.type==null&&hV(this,n)===Lr.Must&&(i.type="ordinal")}}return t}();function mM(t){return t instanceof n_}function Ww(t,e,r){r=r||mV(t);var n=e.seriesLayoutBy,i=$Q(t,r,n,e.sourceHeader,e.dimensions),a=new n_({data:t,sourceFormat:r,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:ye(e)});return a}function yM(t){return new n_({data:t,sourceFormat:sn(t)?hs:jn})}function ZQ(t){return new n_({data:t.data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:ye(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})}function mV(t){var e=lV;if(sn(t))e=hs;else if(ee(t)){t.length===0&&(e=Cr);for(var r=0,n=t.length;r<n;r++){var i=t[r];if(i!=null){if(ee(i)||sn(i)){e=Cr;break}else if(be(i)){e=Vn;break}}}}else if(be(t)){for(var a in t)if(he(t,a)&&Nr(t[a])){e=Vi;break}}return e}function $Q(t,e,r,n,i){var a,o;if(!t)return{dimensionsDefine:cI(i),startIndex:o,dimensionsDetectedCount:a};if(e===Cr){var s=t;n==="auto"||n==null?hI(function(u){u!=null&&u!=="-"&&(se(u)?o==null&&(o=1):o=0)},r,s,10):o=qe(n)?n:n?1:0,!i&&o===1&&(i=[],hI(function(u,c){i[c]=u!=null?u+"":""},r,s,1/0)),a=i?i.length:r===fu?s.length:s[0]?s[0].length:null}else if(e===Vn)i||(i=YQ(t));else if(e===Vi)i||(i=[],R(t,function(u,c){i.push(c)}));else if(e===jn){var l=ph(t[0]);a=ee(l)&&l.length||1}return{startIndex:o,dimensionsDefine:cI(i),dimensionsDetectedCount:a}}function YQ(t){for(var e=0,r;e<t.length&&!(r=t[e++]););if(r)return $e(r)}function cI(t){if(t){var e=de();return re(t,function(r,n){r=be(r)?r:{name:r};var i={name:r.name,displayName:r.displayName,type:r.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=e.get(i.name);return a?i.name+="-"+a.count++:e.set(i.name,{count:1}),i})}}function hI(t,e,r,n){if(e===fu)for(var i=0;i<r.length&&i<n;i++)t(r[i]?r[i][0]:null,i);else for(var a=r[0]||[],i=0;i<a.length&&i<n;i++)t(a[i],i)}function yV(t){var e=t.sourceFormat;return e===Vn||e===Vi}var tl,rl,nl,il,fI,dI,_V=function(){function t(e,r){var n=mM(e)?e:yM(e);this._source=n;var i=this._data=n.data,a=n.sourceFormat;n.seriesLayoutBy,a===hs&&(this._offset=0,this._dimSize=r,this._data=i),dI(this,i,n)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(e,r){},t.prototype.appendData=function(e){},t.prototype.clean=function(){},t.protoInitialize=function(){var e=t.prototype;e.pure=!1,e.persistent=!0}(),t.internalField=function(){var e;dI=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,h=l.startIndex,f=l.dimensionsDefine,d=fI[_M(u,c)];if(J(o,d),u===hs)o.getItem=r,o.count=i,o.fillStorage=n;else{var p=xV(u,c);o.getItem=le(p,null,s,h,f);var g=SV(u,c);o.count=le(g,null,s,h,f)}};var r=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,h=0;h<u;h++)s[h]=l[c+h];return s},n=function(o,s,l,u){for(var c=this._data,h=this._dimSize,f=0;f<h;f++){for(var d=u[f],p=d[0]==null?1/0:d[0],g=d[1]==null?-1/0:d[1],m=s-o,y=l[f],_=0;_<m;_++){var S=c[_*h+f];y[o+_]=S,S<p&&(p=S),S>g&&(g=S)}d[0]=p,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};fI=(e={},e[Cr+"_"+Ri]={pure:!0,appendData:a},e[Cr+"_"+fu]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Vn]={pure:!0,appendData:a},e[Vi]={pure:!0,appendData:function(o){var s=this._data;R(o,function(l,u){for(var c=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)c.push(l[h])})}},e[jn]={appendData:a},e[hs]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),t}(),sg=function(t){ee(t)||U4("series.data or dataset.source must be an array.")};tl={},tl[Cr+"_"+Ri]=sg,tl[Cr+"_"+fu]=sg,tl[Vn]=sg,tl[Vi]=function(t,e){for(var r=0;r<e.length;r++){var n=e[r].name;n==null&&U4("dimension name must not be null/undefined.")}},tl[jn]=sg;var vI=function(t,e,r,n){return t[n]},XQ=(rl={},rl[Cr+"_"+Ri]=function(t,e,r,n){return t[n+e]},rl[Cr+"_"+fu]=function(t,e,r,n,i){n+=e;for(var a=i||[],o=t,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[n]:null}return a},rl[Vn]=vI,rl[Vi]=function(t,e,r,n,i){for(var a=i||[],o=0;o<r.length;o++){var s=r[o].name,l=s!=null?t[s]:null;a[o]=l?l[n]:null}return a},rl[jn]=vI,rl);function xV(t,e){var r=XQ[_M(t,e)];return r}var pI=function(t,e,r){return t.length},qQ=(nl={},nl[Cr+"_"+Ri]=function(t,e,r){return Math.max(0,t.length-e)},nl[Cr+"_"+fu]=function(t,e,r){var n=t[0];return n?Math.max(0,n.length-e):0},nl[Vn]=pI,nl[Vi]=function(t,e,r){var n=r[0].name,i=n!=null?t[n]:null;return i?i.length:0},nl[jn]=pI,nl);function SV(t,e){var r=qQ[_M(t,e)];return r}var _1=function(t,e,r){return t[e]},KQ=(il={},il[Cr]=_1,il[Vn]=function(t,e,r){return t[r]},il[Vi]=_1,il[jn]=function(t,e,r){var n=ph(t);return n instanceof Array?n[e]:n},il[hs]=_1,il);function bV(t){var e=KQ[t];return e}function _M(t,e){return t===Cr?t+"_"+e:t}function eh(t,e,r){if(t){var n=t.getRawDataItem(e);if(n!=null){var i=t.getStore(),a=i.getSource().sourceFormat;if(r!=null){var o=t.getDimensionIndex(r),s=i.getDimensionProperty(o);return bV(a)(n,o,s)}else{var l=n;return a===jn&&(l=ph(n)),l}}}}var QQ=/\{@(.+?)\}/g,i_=function(){function t(){}return t.prototype.getDataParams=function(e,r){var n=this.getData(r),i=this.getRawValue(e,r),a=n.getRawIndex(e),o=n.getName(e),s=n.getRawDataItem(e),l=n.getItemVisual(e,"style"),u=l&&l[n.getItemVisual(e,"drawType")||"fill"],c=l&&l.stroke,h=this.mainType,f=h==="series",d=n.userOutput&&n.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:o,dataIndex:a,data:s,dataType:r,value:i,color:u,borderColor:c,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(e,r,n,i,a,o){r=r||"normal";var s=this.getData(n),l=this.getDataParams(e,n);if(o&&(l.value=o.interpolatedValue),i!=null&&ee(l.value)&&(l.value=l.value[i]),!a){var u=s.getItemModel(e);a=u.get(r==="normal"?["label","formatter"]:[r,"label","formatter"])}if(me(a))return l.status=r,l.dimensionIndex=i,a(l);if(se(a)){var c=hM(a,l);return c.replace(QQ,function(h,f){var d=f.length,p=f;p.charAt(0)==="["&&p.charAt(d-1)==="]"&&(p=+p.slice(1,d-1));var g=eh(s,e,p);if(o&&ee(o.interpolatedValue)){var m=s.getDimensionIndex(p);m>=0&&(g=o.interpolatedValue[m])}return g!=null?g+"":""})}},t.prototype.getRawValue=function(e,r){return eh(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function gI(t){var e,r;return be(t)?t.type&&(r=t):e=t,{text:e,frag:r}}function xd(t){return new JQ(t)}var JQ=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.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=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(_){return!(_>=1)&&(_=1),_}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=l,this._modDataCount=u;var f=e&&e.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!n&&(h||d<p)){var g=this._progress;if(ee(g))for(var m=0;m<g.length;m++)this._doProgress(g[m],d,p,l,u);else this._doProgress(g,d,p,l,u)}this._dueIndex=p;var y=this._settedOutputEnd!=null?this._settedOutputEnd:p;this._outputDueEnd=y}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(e,r,n,i,a){mI.reset(r,n,i,a),this._callingProgress=e,this._callingProgress({start:r,end:n,count:n-r,next:mI.next},this.context)},t.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var r,n;!e&&this._reset&&(r=this._reset(this.context),r&&r.progress&&(n=r.forceFirstProgress,r=r.progress),ee(r)&&!r.length&&(r=null)),this._progress=r,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},t}(),mI=function(){var t,e,r,n,i,a={reset:function(l,u,c,h){e=l,t=u,r=c,n=h,i=Math.ceil(n/r),a.next=r>1&&n>0?s:o}};return a;function o(){return e<t?e++:null}function s(){var l=e%i*r+Math.ceil(e/i),u=e>=t?null:l<n?l:e;return e++,u}}();function fs(t,e){var r=e&&e.type;return r==="ordinal"?t:(r==="time"&&!qe(t)&&t!=null&&t!=="-"&&(t=+La(t)),t==null||t===""?NaN:Number(t))}var eJ=de({number:function(t){return parseFloat(t)},time:function(t){return+La(t)},trim:function(t){return se(t)?kn(t):t}});function wV(t){return eJ.get(t)}var TV={lt:function(t,e){return t<e},lte:function(t,e){return t<=e},gt:function(t,e){return t>e},gte:function(t,e){return t>=e}},tJ=function(){function t(e,r){if(!qe(r)){var n="";at(n)}this._opFn=TV[e],this._rvalFloat=wa(r)}return t.prototype.evaluate=function(e){return qe(e)?this._opFn(e,this._rvalFloat):this._opFn(wa(e),this._rvalFloat)},t}(),CV=function(){function t(e,r){var n=e==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var n=qe(e)?e:wa(e),i=qe(r)?r:wa(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=se(e),l=se(r);s&&(n=l?e:0),l&&(i=s?r:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},t}(),rJ=function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=wa(r)}return t.prototype.evaluate=function(e){var r=e===this._rval;if(!r){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=wa(e)===this._rvalFloat)}return this._isEQ?r:!r},t}();function nJ(t,e){return t==="eq"||t==="ne"?new rJ(t==="eq",e):he(TV,t)?new tJ(t,e):null}var iJ=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return fs(e,r)},t}();function aJ(t,e){var r=new iJ,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==Ri&&at(o);var s=[],l={},u=t.dimensionsDefine;if(u)R(u,function(g,m){var y=g.name,_={index:m,name:y,displayName:g.displayName};if(s.push(_),y!=null){var S="";he(l,y)&&at(S),l[y]=_}});else for(var c=0;c<t.dimensionsDetectedCount;c++)s.push({index:c});var h=xV(i,Ri);e.__isBuiltIn&&(r.getRawDataItem=function(g){return h(n,a,s,g)},r.getRawData=le(oJ,null,t)),r.cloneRawData=le(sJ,null,t);var f=SV(i,Ri);r.count=le(f,null,n,a,s);var d=bV(i);r.retrieveValue=function(g,m){var y=h(n,a,s,g);return p(y,m)};var p=r.retrieveValueFromItem=function(g,m){if(g!=null){var y=s[m];if(y)return d(g,m,y.name)}};return r.getDimensionInfo=le(lJ,null,s,l),r.cloneAllDimensionInfo=le(uJ,null,s),r}function oJ(t){var e=t.sourceFormat;if(!xM(e)){var r="";at(r)}return t.data}function sJ(t){var e=t.sourceFormat,r=t.data;if(!xM(e)){var n="";at(n)}if(e===Cr){for(var i=[],a=0,o=r.length;a<o;a++)i.push(r[a].slice());return i}else if(e===Vn){for(var i=[],a=0,o=r.length;a<o;a++)i.push(J({},r[a]));return i}}function lJ(t,e,r){if(r!=null){if(qe(r)||!isNaN(r)&&!he(e,r))return t[r];if(he(e,r))return e[r]}}function uJ(t){return ye(t)}var MV=de();function cJ(t){t=ye(t);var e=t.type,r="";e||at(r);var n=e.split(":");n.length!==2&&at(r);var i=!1;n[0]==="echarts"&&(e=n[1],i=!0),t.__isBuiltIn=i,MV.set(e,t)}function hJ(t,e,r){var n=gt(t),i=n.length,a="";i||at(a);for(var o=0,s=i;o<s;o++){var l=n[o];e=fJ(l,e),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function fJ(t,e,r,n){var i="";e.length||at(i),be(t)||at(i);var a=t.type,o=MV.get(a);o||at(i);var s=re(e,function(u){return aJ(u,o)}),l=gt(o.transform({upstream:s[0],upstreamList:s,config:ye(t.config)}));return re(l,function(u,c){var h="";be(u)||at(h),u.data||at(h);var f=mV(u.data);xM(f)||at(h);var d,p=e[0];if(p&&c===0&&!u.dimensions){var g=p.startIndex;g&&(u.data=p.data.slice(0,g).concat(u.data)),d={seriesLayoutBy:Ri,sourceHeader:g,dimensions:p.metaRawOption.dimensions}}else d={seriesLayoutBy:Ri,sourceHeader:0,dimensions:u.dimensions};return Ww(u.data,d,null)})}function xM(t){return t===Cr||t===Vn}var a_="undefined",dJ=typeof Uint32Array===a_?Array:Uint32Array,vJ=typeof Uint16Array===a_?Array:Uint16Array,AV=typeof Int32Array===a_?Array:Int32Array,yI=typeof Float64Array===a_?Array:Float64Array,LV={float:yI,int:AV,ordinal:Array,number:Array,time:yI},x1;function zu(t){return t>65535?dJ:vJ}function Bu(){return[1/0,-1/0]}function pJ(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function _I(t,e,r,n,i){var a=LV[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];t[e]=l}}else t[e]=new a(n)}var Uw=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=de()}return t.prototype.initData=function(e,r,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),a=this.defaultDimValueGetter=x1[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[],yV(i),this._dimensions=re(r,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,e.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(e,r){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(e);if(a!=null){if(i[a].type===r)return a}else a=i.length;return i[a]={type:r},n.set(e,a),this._chunks[a]=new LV[r||"float"](this._rawCount),this._rawExtent[a]=Bu(),a},t.prototype.collectOrdinalMeta=function(e,r){var n=this._chunks[e],i=this._dimensions[e],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[e]=Bu());for(var l=a[e],u=o;u<s;u++){var c=n[u]=r.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}i.ordinalMeta=r,i.ordinalOffset=s,i.type="ordinal"},t.prototype.getOrdinalMeta=function(e){var r=this._dimensions[e],n=r.ordinalMeta;return n},t.prototype.getDimensionProperty=function(e){var r=this._dimensions[e];return r&&r.property},t.prototype.appendData=function(e){var r=this._provider,n=this.count();r.appendData(e);var i=r.count();return r.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},t.prototype.appendValues=function(e,r){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,r||0),u=0;u<a;u++){var c=i[u];_I(n,u,c.type,l,!0)}for(var h=[],f=s;f<l;f++)for(var d=f-s,p=0;p<a;p++){var c=i[p],g=x1.arrayRows.call(this,e[d]||h,c.property,d,p);n[p][f]=g;var m=o[p];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=re(o,function(_){return _.property}),c=0;c<s;c++){var h=o[c];l[c]||(l[c]=Bu()),_I(a,c,h.type,r,n)}if(i.fillStorage)i.fillStorage(e,r,a,l);else for(var f=[],d=e;d<r;d++){f=i.getItem(d,f);for(var p=0;p<s;p++){var g=a[p],m=this._dimValueGetter(f,u[p],d,p);g[d]=m;var y=l[p];m<y[0]&&(y[0]=m),m>y[1]&&(y[1]=m)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(r)]:NaN},t.prototype.getValues=function(e,r){var n=[],i=[];if(r==null){r=e,e=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=e;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],r));return n},t.prototype.getByRawIndex=function(e,r){if(!(r>=0&&r<this._rawCount))return NaN;var n=this._chunks[e];return n?n[r]:NaN},t.prototype.getSum=function(e){var r=this._chunks[e],n=0;if(r)for(var i=0,a=this.count();i<a;i++){var o=this.get(e,i);isNaN(o)||(n+=o)}return n},t.prototype.getMedian=function(e){var r=[];this.each([e],function(a){isNaN(a)||r.push(a)});var n=r.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},t.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&n<this._count&&n===e)return e;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(r[o]<e)i=o+1;else if(r[o]>e)a=o-1;else return o}return-1},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a<i;a++)e[a]=r[a]}else e=new n(r.buffer,0,i)}else{var n=zu(this._rawCount);e=new n(this.count());for(var a=0;a<e.length;a++)e[a]=a}return e},t.prototype.filter=function(e,r){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=zu(n._rawCount),o=new a(i),s=[],l=e.length,u=0,c=e[0],h=n._chunks,f=0;f<i;f++){var d=void 0,p=n.getRawIndex(f);if(l===0)d=r(f);else if(l===1){var g=h[c][p];d=r(g,f)}else{for(var m=0;m<l;m++)s[m]=h[e[m]][p];s[m]=f,d=r.apply(null,s)}d&&(o[u++]=p)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},t.prototype.selectRange=function(e){var r=this.clone(),n=r._count;if(!n)return this;var i=$e(e),a=i.length;if(!a)return this;var o=r.count(),s=zu(r._rawCount),l=new s(o),u=0,c=i[0],h=e[c][0],f=e[c][1],d=r._chunks,p=!1;if(!r._indices){var g=0;if(a===1){for(var m=d[i[0]],y=0;y<n;y++){var _=m[y];(_>=h&&_<=f||isNaN(_))&&(l[u++]=g),g++}p=!0}else if(a===2){for(var m=d[i[0]],S=d[i[1]],T=e[i[1]][0],C=e[i[1]][1],y=0;y<n;y++){var _=m[y],M=S[y];(_>=h&&_<=f||isNaN(_))&&(M>=T&&M<=C||isNaN(M))&&(l[u++]=g),g++}p=!0}}if(!p)if(a===1)for(var y=0;y<o;y++){var A=r.getRawIndex(y),_=d[i[0]][A];(_>=h&&_<=f||isNaN(_))&&(l[u++]=A)}else for(var y=0;y<o;y++){for(var k=!0,A=r.getRawIndex(y),E=0;E<a;E++){var D=i[E],_=d[D][A];(_<e[D][0]||_>e[D][1])&&(k=!1)}k&&(l[u++]=r.getRawIndex(y))}return u<o&&(r._indices=l),r._count=u,r._extent=[],r._updateGetRawIdx(),r},t.prototype.map=function(e,r){var n=this.clone(e);return this._updateDims(n,e,r),n},t.prototype.modify=function(e,r){this._updateDims(this,e,r)},t.prototype._updateDims=function(e,r,n){for(var i=e._chunks,a=[],o=r.length,s=e.count(),l=[],u=e._rawExtent,c=0;c<r.length;c++)u[r[c]]=Bu();for(var h=0;h<s;h++){for(var f=e.getRawIndex(h),d=0;d<o;d++)l[d]=i[r[d]][f];l[o]=h;var p=n&&n.apply(null,l);if(p!=null){typeof p!="object"&&(a[0]=p,p=a);for(var c=0;c<p.length;c++){var g=r[c],m=p[c],y=u[g],_=i[g];_&&(_[f]=m),m<y[0]&&(y[0]=m),m>y[1]&&(y[1]=m)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,h,f,d=new(zu(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var p=1;p<o-1;p+=l){for(var g=Math.min(p+l,o-1),m=Math.min(p+l*2,o),y=(m+g)/2,_=0,S=g;S<m;S++){var T=this.getRawIndex(S),C=a[T];isNaN(C)||(_+=C)}_/=m-g;var M=p,A=Math.min(p+l,o),k=p-1,E=a[u];c=-1,f=M;for(var D=-1,I=0,S=M;S<A;S++){var T=this.getRawIndex(S),C=a[T];if(isNaN(C)){I++,D<0&&(D=T);continue}h=Math.abs((k-y)*(C-E)-(k-S)*(_-E)),h>c&&(c=h,f=T)}I>0&&I<A-M&&(d[s++]=Math.min(D,f),f=Math.max(D,f)),d[s++]=f,u=f}return d[s++]=this.getRawIndex(o-1),n._count=s,n._indices=d,n.getRawIndex=this._getRawIdx,n},t.prototype.minmaxDownSample=function(e,r){for(var n=this.clone([e],!0),i=n._chunks,a=Math.floor(1/r),o=i[e],s=this.count(),l=new(zu(this._rawCount))(Math.ceil(s/a)*2),u=0,c=0;c<s;c+=a){var h=c,f=o[this.getRawIndex(h)],d=c,p=o[this.getRawIndex(d)],g=a;c+a>s&&(g=s-c);for(var m=0;m<g;m++){var y=this.getRawIndex(c+m),_=o[y];_<f&&(f=_,h=c+m),_>p&&(p=_,d=c+m)}var S=this.getRawIndex(h),T=this.getRawIndex(d);h<d?(l[u++]=S,l[u++]=T):(l[u++]=T,l[u++]=S)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},t.prototype.downSample=function(e,r,n,i){for(var a=this.clone([e],!0),o=a._chunks,s=[],l=Math.floor(1/r),u=o[e],c=this.count(),h=a._rawExtent[e]=Bu(),f=new(zu(this._rawCount))(Math.ceil(c/l)),d=0,p=0;p<c;p+=l){l>c-p&&(l=c-p,s.length=l);for(var g=0;g<l;g++){var m=this.getRawIndex(p+g);s[g]=u[m]}var y=n(s),_=this.getRawIndex(Math.min(p+i(s,y)||0,c-1));u[_]=y,y<h[0]&&(h[0]=y),y>h[1]&&(h[1]=y),f[d++]=_}return a._count=d,a._indices=f,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:r(a);break;case 1:r(i[e[0]][s],a);break;case 2:r(i[e[0]][s],i[e[1]][s],a);break;default:for(var l=0,u=[];l<n;l++)u[l]=i[e[l]][s];u[l]=a,r.apply(null,u)}}},t.prototype.getDataExtent=function(e){var r=this._chunks[e],n=Bu();if(!r)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<i;u++){var c=this.getRawIndex(u),h=r[c];h<s&&(s=h),h>l&&(l=h)}return o=[s,l],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][r]);return n},t.prototype.clone=function(e,r){var n=new t,i=this._chunks,a=e&&ci(e,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?pJ(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),r||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},t.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=ye(this._extent),e._rawExtent=ye(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,r=void 0;if(e===Array){var n=this._indices.length;r=new e(n);for(var i=0;i<n;i++)r[i]=this._indices[i]}else r=new e(this._indices);return r}return null},t.prototype._getRawIdxIdentity=function(e){return e},t.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return fs(r[a],this._dimensions[a])}x1={arrayRows:e,objectRows:function(r,n,i,a){return fs(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return fs(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),PV=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(lg(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=sn(s)?hs:jn,a=[];var h=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},d=pe(h.seriesLayoutBy,f.seriesLayoutBy)||null,p=pe(h.sourceHeader,f.sourceHeader),g=pe(h.dimensions,f.dimensions),m=d!==f.seriesLayoutBy||!!p!=!!f.sourceHeader||g;i=m?[Ww(s,{seriesLayoutBy:d,sourceHeader:p,dimensions:g},l)]:[]}else{var y=e;if(n){var _=this._applyTransform(r);i=_.sourceList,a=_.upstreamSignList}else{var S=y.get("source",!0);i=[Ww(S,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&SI(a)}var o,s=[],l=[];return R(e,function(u){u.prepareSource();var c=u.getSource(i||0),h="";i!=null&&!c&&SI(h),s.push(c),l.push(u._getVersionSign())}),n?o=hJ(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[ZQ(s[0])]),{sourceList:o,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r<e.length;r++){var n=e[r];if(n._isDirty()||this._upstreamSignList[r]!==n._getVersionSign())return!0}},t.prototype.getSource=function(e){e=e||0;var r=this._sourceList[e];if(!r){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return r},t.prototype.getSharedDataStore=function(e){var r=e.makeStoreSchema();return this._innerGetDataStore(r.dimensions,e.source,r.hash)},t.prototype._innerGetDataStore=function(e,r,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];lg(this._sourceHost)&&l?s=l._innerGetDataStore(e,r,n):(s=new Uw,s.initData(new _V(r,e.length),e)),o[n]=s}return s},t.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(lg(e)){var r=vM(e);return r?[r.getSourceManager()]:[]}else return re(SQ(e),function(n){return n.getSourceManager()})},t.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,r,n,i;if(lg(e))r=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),i=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=e;r=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:r,sourceHeader:n,dimensions:i}},t}();function xI(t){var e=t.option.transform;e&&$d(t.option.transform)}function lg(t){return t.mainType==="series"}function SI(t){throw new Error(t)}var gJ="line-height:1";function kV(t){var e=t.lineHeight;return e==null?gJ:"line-height:"+Zr(e+"")+"px"}function DV(t,e){var r=t.color||q.color.tertiary,n=t.fontSize||12,i=t.fontWeight||"400",a=t.color||q.color.secondary,o=t.fontSize||14,s=t.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+Zr(n+"")+"px;color:"+Zr(r)+";font-weight:"+Zr(i+""),valueStyle:"font-size:"+Zr(o+"")+"px;color:"+Zr(a)+";font-weight:"+Zr(s+"")}:{nameStyle:{fontSize:n,fill:r,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var mJ=[0,10,20,30],yJ=["",`
|
||
`,`
|
||
|
||
`,`
|
||
|
||
|
||
`];function Kt(t,e){return e.type=t,e}function Zw(t){return t.type==="section"}function IV(t){return Zw(t)?_J:xJ}function EV(t){if(Zw(t)){var e=0,r=t.blocks.length,n=r>1||r>0&&!t.noHeader;return R(t.blocks,function(i){var a=EV(i);a>=e&&(e=a+ +(n&&(!a||Zw(i)&&!i.noHeader)))}),e}return 0}function _J(t,e,r,n){var i=e.noHeader,a=SJ(EV(e)),o=[],s=e.blocks||[];Rr(!s||ee(s)),s=s||[];var l=t.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(he(u,l)){var c=new CV(u[l],null);s.sort(function(g,m){return c.evaluate(g.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}R(s,function(g,m){var y=e.valueFormatter,_=IV(g)(y?J(J({},t),{valueFormatter:y}):t,g,m>0?a.html:0,n);_!=null&&o.push(_)});var h=t.renderMode==="richText"?o.join(a.richText):$w(n,o.join(""),i?r:a.html);if(i)return h;var f=Vw(e.header,"ordinal",t.useUTC),d=DV(n,t.renderMode).nameStyle,p=kV(n);return t.renderMode==="richText"?NV(t,f,d)+a.richText+h:$w(n,'<div style="'+d+";"+p+';">'+Zr(f)+"</div>"+h,r)}function xJ(t,e,r,n){var i=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,c=e.valueFormatter||t.valueFormatter||function(T){return T=ee(T)?T:[T],re(T,function(C,M){return Vw(C,ee(d)?d[M]:d,u)})};if(!(a&&o)){var h=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||q.color.secondary,i),f=a?"":Vw(l,"ordinal",u),d=e.valueType,p=o?[]:c(e.value,e.dataIndex),g=!s||!a,m=!s&&a,y=DV(n,i),_=y.nameStyle,S=y.valueStyle;return i==="richText"?(s?"":h)+(a?"":NV(t,f,_))+(o?"":TJ(t,p,g,m,S)):$w(n,(s?"":h)+(a?"":bJ(f,!s,_))+(o?"":wJ(p,g,m,S)),r)}}function bI(t,e,r,n,i,a){if(t){var o=IV(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function SJ(t){return{html:mJ[t],richText:yJ[t]}}function $w(t,e,r){var n='<div style="clear:both"></div>',i="margin: "+r+"px 0 0",a=kV(t);return'<div style="'+i+";"+a+';">'+e+n+"</div>"}function bJ(t,e,r){var n=e?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+Zr(t)+"</span>"}function wJ(t,e,r,n){var i=r?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return t=ee(t)?t:[t],'<span style="'+a+";"+n+'">'+re(t,function(o){return Zr(o)}).join(" ")+"</span>"}function NV(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function TJ(t,e,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(ee(e)?e.join(" "):e,a)}function RV(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return eu(n)}function OV(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var S1=function(){function t(){this.richTextStyles={},this._nextStyleNameId=H4()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var i=n==="richText"?this._generateStyleName():null,a=qj({color:r,type:e,renderMode:n,markerId:i});return se(a)?a:(this.richTextStyles[i]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};ee(r)?R(r,function(a){return J(n,a)}):J(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},t}();function zV(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),l=ee(s),u=RV(e,r),c,h,f,d;if(o>1||l&&!o){var p=CJ(s,e,r,a,u);c=p.inlineValues,h=p.inlineValueTypes,f=p.blocks,d=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=c=eh(i,r,a[0]),h=g.type}else d=c=l?s[0]:s;var m=I2(e),y=m&&e.name||"",_=i.getName(r),S=n?y:_;return Kt("section",{header:y,noHeader:n||!m,sortParam:d,blocks:[Kt("nameValue",{markerType:"item",markerColor:u,name:S,noName:!kn(S),value:c,valueType:h,dataIndex:r})].concat(f||[])})}function CJ(t,e,r,n,i){var a=e.getData(),o=ci(t,function(h,f,d){var p=a.getDimensionInfo(d);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?R(n,function(h){c(eh(a,r,h),h)}):R(t,c);function c(h,f){var d=a.getDimensionInfo(f);!d||d.otherDims.tooltip===!1||(o?u.push(Kt("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:h,valueType:d.type})):(s.push(h),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Ao=Fe();function ug(t,e){return t.getName(e)||t.getId(e)}var Tm="__universalTransitionEnabled",dt=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=xd({count:AJ,reset:LJ}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Ao(this).sourceManager=new PV(this);a.prepareSource();var o=this.getInitialData(r,i);TI(o,this),this.dataTask.context.data=o,Ao(this).dataBeforeProcessed=o,wI(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=av(this),a=i?hu(r):{},o=this.subType;Ve.hasClass(o)&&(o+="Series"),Ne(r,n.getTheme().get(this.subType)),Ne(r,this.getDefaultOption()),Yl(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Ca(r,a,i)},e.prototype.mergeOption=function(r,n){r=Ne(this.option,r,!0),this.fillDataTextStyle(r.data);var i=av(this);i&&Ca(this.option,r,i);var a=Ao(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);TI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Ao(this).dataBeforeProcessed=o,wI(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!sn(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&Yl(r[i],"label",n)},e.prototype.getInitialData=function(r,n){},e.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},e.prototype.getData=function(r){var n=Yw(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return Ao(this).data},e.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},e.prototype.setData=function(r){var n=Yw(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}Ao(this).data=r},e.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return de(r)},e.prototype.getSourceManager=function(){return Ao(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Ao(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},e.prototype.indicesOfNearest=function(r,n,i,a){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(r);if(!s||!l)return[];var u=l.dataToCoord(i);a==null&&(a=1/0);var c=[],h=1/0,f=-1,d=0;return o.each(n,function(p,g){var m=l.dataToCoord(p),y=u-m,_=Math.abs(y);_<=a&&((_<h||_===h&&y>=0&&f<0)&&(h=_,f=y,d=0),y===f&&(c[d++]=g))}),c.length=d,c},e.prototype.formatTooltip=function(r,n,i){return zV({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Ze.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=pM.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.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<r.length;s++){var l=r[s],u=ug(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(r,n){for(var i=[],a=0;a<r.length;a++)i[0]=r[a],this.isSelected(r[a],n)?this.unselect(i,n):this.select(i,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=$e(r),i=[],a=0;a<n.length;a++){var o=r[n[a]];o>=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[ug(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Tm])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.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"){be(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var h=n[c],f=ug(r,h);u[f]=!0,this._selectedDataIndicesMap[f]=r.getRawIndex(h)}}else if(s==="single"||s===!0){var d=n[l-1],f=ug(r,d);o.selectedMap=(i={},i[f]=!0,i),this._selectedDataIndicesMap=(a={},a[f]=r.getRawIndex(d),a)}}},e.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(i){var a=r.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Ve.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Ve);Bt(dt,i_);Bt(dt,pM);J4(dt,Ve);function wI(t){var e=t.name;I2(t)||(t.name=MJ(t)||e)}function MJ(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return R(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function AJ(t){return t.model.getRawData().count()}function LJ(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),PJ}function PJ(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function TI(t,e){R($c(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Ie(kJ,e))})}function kJ(t,e){var r=Yw(t);return r&&r.setOutputEnd((e||this).count()),e}function Yw(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var mt=function(){function t(){this.group=new _e,this.uid=wh("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();N2(mt);U0(mt);function Mh(){var t=Fe();return function(e){var r=t(e),n=e.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 BV=Fe(),DJ=Mh(),lt=function(){function t(){this.group=new _e,this.uid=wh("viewChart"),this.renderTask=xd({plan:IJ,reset:EJ}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&MI(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&MI(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){Ps(this.group,e)},t.markUpdateMethod=function(e,r){BV(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function CI(t,e,r){t&&rv(t)&&(e==="emphasis"?ho:fo)(t,r)}function MI(t,e,r){var n=Xl(t,e),i=e&&e.highlightKey!=null?aK(e.highlightKey):null;n!=null?R(gt(n),function(a){CI(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){CI(a,r,i)})}N2(lt);U0(lt);function IJ(t){return DJ(t.model)}function EJ(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&BV(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),NJ[l]}var NJ={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Ly="\0__throttleOriginMethod",AI="\0__throttleRate",LI="\0__throttleType";function o_(t,e,r){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function h(){a=new Date().getTime(),o=null,t.apply(l,u||[])}var f=function(){for(var d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];n=new Date().getTime(),l=this,u=d;var g=c||e,m=c||r;c=null,s=n-(m?i:a)-g,clearTimeout(o),m?o=setTimeout(h,g):s>=0?h():o=setTimeout(h,-s),i=n};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(d){c=d},f}function Ah(t,e,r,n){var i=t[e];if(i){var a=i[Ly]||i,o=i[LI],s=i[AI];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=o_(a,r,n==="debounce"),i[Ly]=a,i[LI]=n,i[AI]=r}return i}}function sv(t,e){var r=t[e];r&&r[Ly]&&(r.clear&&r.clear(),t[e]=r[Ly])}var PI=Fe(),kI={itemStyle:ql(Fj,!0),lineStyle:ql(Vj,!0)},RJ={lineStyle:"stroke",itemStyle:"fill"};function jV(t,e){var r=t.visualStyleMapper||kI[e];return r||(console.warn("Unknown style type '"+e+"'."),kI.itemStyle)}function VV(t,e){var r=t.visualDrawType||RJ[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var OJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=jV(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=VV(t,n),u=o[l],c=me(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||h){var f=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=f,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||me(o.fill)?f:o.fill,o.stroke=o.stroke==="auto"||me(o.stroke)?f:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var g=t.getDataParams(p),m=J({},o);m[l]=c(g),d.setItemVisual(p,"style",m)}}}},hf=new We,zJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=jV(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){hf.option=l[n];var u=i(hf),c=o.ensureUniqueItemVisual(s,"style");J(c,u),hf.option.decal&&(o.setItemVisual(s,"decal",hf.option.decal),hf.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},BJ={performRawSeries:!0,overallReset:function(t){var e=de();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),PI(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=PI(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=VV(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],h=a.getItemVisual(c,"colorFromPalette");if(h){var f=a.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",p=n.count();f[l]=r.getColorFromPalette(d,o,p)}})}})}},cg=Math.PI;function jJ(t,e){e=e||{},Se(e,{text:"loading",textColor:q.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new _e,n=new Be({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Xe({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Be({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new Gv({shape:{startAngle:-cg/2,endAngle:-cg/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:cg*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:cg*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var FV=function(){function t(e,r,n,i){this._stageTaskMap=de(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__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}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=de();e.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)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;R(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";Rr(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;R(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),h=c.seriesTaskMap,f=c.overallTask;if(f){var d,p=f.agentStubMap;p.each(function(m){s(i,m)&&(m.dirty(),d=!0)}),d&&f.dirty(),o.updatePayload(f,n);var g=o.getPerformArgs(f,i.block);p.each(function(m){m.perform(g)}),f.perform(g)&&(a=!0)}else h&&h.each(function(m,y){s(i,m)&&m.dirty();var _=o.getPerformArgs(m,i.block);_.skip=!l.performRawSeries&&r.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(_)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=de(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(h){var f=h.uid,d=s.set(f,o&&o.get(f)||xd({plan:WJ,reset:UJ,count:$J}));d.context={model:h,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(h,d)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||xd({reset:VJ});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=de(),u=e.seriesType,c=e.getTargetSeries,h=!0,f=!1,d="";Rr(!e.createOnAllSeries,d),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(h=!1,R(n.getSeries(),p));function p(g){var m=g.uid,y=l.set(m,s&&s.get(m)||(f=!0,xd({reset:FJ,onDirty:HJ})));y.context={model:g,overallProgress:h},y.agent=o,y.__block=h,a._pipe(g,y)}f&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.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},t.wrapStageHandler=function(e,r){return me(e)&&(e={overallReset:e,seriesType:YJ(e)}),e.uid=wh("stageHandler"),r&&(e.visualType=r),e},t}();function VJ(t){t.overallReset(t.ecModel,t.api,t.payload)}function FJ(t){return t.overallProgress&&GJ}function GJ(){this.agent.dirty(),this.getDownstream().dirty()}function HJ(){this.agent&&this.agent.dirty()}function WJ(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function UJ(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=gt(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?re(e,function(r,n){return GV(n)}):ZJ}var ZJ=GV(0);function GV(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a<e.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(e,n)}}function $J(t){return t.data.count()}function YJ(t){Py=null;try{t(lv,HV)}catch{}return Py}var lv={},HV={},Py;WV(lv,gM);WV(HV,vV);lv.eachSeriesByType=lv.eachRawSeriesByType=function(t){Py=t};lv.eachComponent=function(t){t.mainType==="series"&&t.subType&&(Py=t.subType)};function WV(t,e){for(var r in e.prototype)t[r]=Rt}var we=q.darkColor,XJ=we.background,ff=function(){return{axisLine:{lineStyle:{color:we.axisLine}},splitLine:{lineStyle:{color:we.axisSplitLine}},splitArea:{areaStyle:{color:[we.backgroundTint,we.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:we.axisMinorSplitLine}},axisLabel:{color:we.axisLabel},axisName:{}}},DI={label:{color:we.secondary},itemStyle:{borderColor:we.borderTint},dividerLineStyle:{color:we.border}},UV={darkMode:!0,color:we.theme,backgroundColor:XJ,axisPointer:{lineStyle:{color:we.border},crossStyle:{color:we.borderShade},label:{color:we.tertiary}},legend:{textStyle:{color:we.secondary},pageTextStyle:{color:we.tertiary}},textStyle:{color:we.secondary},title:{textStyle:{color:we.primary},subtextStyle:{color:we.quaternary}},toolbox:{iconStyle:{borderColor:we.accent50}},tooltip:{backgroundColor:we.neutral20,defaultBorderColor:we.border,textStyle:{color:we.tertiary}},dataZoom:{borderColor:we.accent10,textStyle:{color:we.tertiary},brushStyle:{color:we.backgroundTint},handleStyle:{color:we.neutral00,borderColor:we.accent20},moveHandleStyle:{color:we.accent40},emphasis:{handleStyle:{borderColor:we.accent50}},dataBackground:{lineStyle:{color:we.accent30},areaStyle:{color:we.accent20}},selectedDataBackground:{lineStyle:{color:we.accent50},areaStyle:{color:we.accent30}}},visualMap:{textStyle:{color:we.secondary},handleStyle:{borderColor:we.neutral30}},timeline:{lineStyle:{color:we.accent10},label:{color:we.tertiary},controlStyle:{color:we.accent30,borderColor:we.accent30}},calendar:{itemStyle:{color:we.neutral00,borderColor:we.neutral20},dayLabel:{color:we.tertiary},monthLabel:{color:we.secondary},yearLabel:{color:we.secondary}},matrix:{x:DI,y:DI,backgroundColor:{borderColor:we.axisLine},body:{itemStyle:{borderColor:we.borderTint}}},timeAxis:ff(),logAxis:ff(),valueAxis:ff(),categoryAxis:ff(),line:{symbol:"circle"},graph:{color:we.theme},gauge:{title:{color:we.secondary},axisLine:{lineStyle:{color:[[1,we.neutral05]]}},axisLabel:{color:we.axisLabel},detail:{color:we.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:we.background}},radar:function(){var t=ff();return t.axisName={color:we.axisLabel},t.axisLine.lineStyle.color=we.neutral20,t}(),treemap:{breadcrumb:{itemStyle:{color:we.neutral20,textStyle:{color:we.secondary}},emphasis:{itemStyle:{color:we.neutral30}}}},sunburst:{itemStyle:{borderColor:we.background}},map:{itemStyle:{borderColor:we.border,areaColor:we.neutral10},label:{color:we.tertiary},emphasis:{label:{color:we.primary},itemStyle:{areaColor:we.highlight}},select:{label:{color:we.primary},itemStyle:{areaColor:we.highlight}}},geo:{itemStyle:{borderColor:we.border,areaColor:we.neutral10},emphasis:{label:{color:we.primary},itemStyle:{areaColor:we.highlight}},select:{label:{color:we.primary},itemStyle:{color:we.highlight}}}};UV.categoryAxis.splitLine.show=!1;var qJ=function(){function t(){}return t.prototype.normalizeQuery=function(e){var r={},n={},i={};if(se(e)){var a=ha(e);r.mainType=a.main||null,r.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};R(e,function(l,u){for(var c=!1,h=0;h<o.length;h++){var f=o[h],d=u.lastIndexOf(f);if(d>0&&d===u.length-f.length){var p=u.slice(0,d);p!=="data"&&(r.mainType=p,r[f.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,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 c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function c(h,f,d,p){return h[d]==null||f[p||d]===h[d]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Xw=["symbol","symbolSize","symbolRotate","symbolOffset"],II=Xw.concat(["symbolKeepAspect"]),KJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<Xw.length;o++){var s=Xw[o],l=t.get(s);me(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||t.defaultSymbol,r.setVisual(J({legendIcon:t.legendIcon||n.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},n)),e.isSeriesFiltered(t))return;var u=$e(i);function c(h,f){for(var d=t.getRawValue(f),p=t.getDataParams(f),g=0;g<u.length;g++){var m=u[g];h.setItemVisual(f,m,i[m](d,p))}}return{dataEach:a?c:null}}},QJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.hasSymbolVisual||e.isSeriesFiltered(t))return;var r=t.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<II.length;s++){var l=II[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:r.hasItemOption?n:null}}};function SM(t,e,r){switch(r){case"color":var n=t.getItemVisual(e,"style");return n[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,r)}}function $v(t,e){switch(e){case"color":var r=t.getVisual("style");return r[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function ZV(t,e,r,n){switch(r){case"color":var i=t.ensureUniqueItemVisual(e,"style");i[t.getVisual("drawType")]=n,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,r,n);break}}function $V(t,e){function r(n,i){var a=[];return n.eachComponent({mainType:"series",subType:t,query:i},function(o){a.push(o.seriesIndex)}),a}R([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],function(n){e(n[0],function(i,a,o){i=J({},i),o.dispatchAction(J(i,{type:n[1],seriesIndex:r(a,i)}))})})}function ju(t,e,r,n,i){var a=t+e;r.isSilent(a)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var h=o.getData(),f=Xl(h,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:ee(f)?h.getName(f[0]):h.getName(f),selected:se(l)?l:J({},l)})}})}function JJ(t,e,r){t.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(ju("map","selectchanged",e,i,n),ju("pie","selectchanged",e,i,n)):n.fromAction==="select"?(ju("map","selected",e,i,n),ju("pie","selected",e,i,n)):n.fromAction==="unselect"&&(ju("map","unselected",e,i,n),ju("pie","unselected",e,i,n))})}function Pl(t,e,r){for(var n;t&&!(e(t)&&(n=t,r));)t=t.__hostTarget||t.parent;return n}var eee=Math.round(Math.random()*9),tee=typeof Object.defineProperty=="function",ree=function(){function t(){this._id="__ec_inner_"+eee++}return t.prototype.get=function(e){return this._guard(e)[this._id]},t.prototype.set=function(e,r){var n=this._guard(e);return tee?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},t.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},t.prototype.has=function(e){return!!this._guard(e)[this._id]},t.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},t}(),nee=Ue.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n+a),t.lineTo(r-i,n+a),t.closePath()}}),iee=Ue.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n),t.lineTo(r,n+a),t.lineTo(r-i,n),t.closePath()}}),aee=Ue.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x,n=e.y,i=e.width/5*3,a=Math.max(i,e.height),o=i/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,h=Math.sin(u),f=Math.cos(u),d=o*.6,p=o*.7;t.moveTo(r-c,l+s),t.arc(r,l,o,Math.PI-u,Math.PI*2+u),t.bezierCurveTo(r+c-h*d,l+s+f*d,r,n-p,r,n),t.bezierCurveTo(r,n-p,r-c+h*d,l+s+f*d,r-c,l+s),t.closePath()}}),oee=Ue.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.height,n=e.width,i=e.x,a=e.y,o=n/3*2;t.moveTo(i,a),t.lineTo(i+o,a+r),t.lineTo(i,a+r/4*3),t.lineTo(i-o,a+r),t.lineTo(i,a),t.closePath()}}),see={line:Wt,rect:Be,roundRect:Be,square:Be,circle:Pa,diamond:iee,pin:aee,arrow:oee,triangle:nee},lee={line:function(t,e,r,n,i){i.x1=t,i.y1=e+n/2,i.x2=t+r,i.y2=e+n/2},rect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n},roundRect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n,i.r=Math.min(r,n)/4},square:function(t,e,r,n,i){var a=Math.min(r,n);i.x=t,i.y=e,i.width=a,i.height=a},circle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.r=Math.min(r,n)/2},diamond:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n},pin:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},arrow:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},triangle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n}},ky={};R(see,function(t,e){ky[e]=new t});var uee=Ue.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,r){var n=yy(t,e,r),i=this.shape;return i&&i.symbolType==="pin"&&e.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(t,e,r){var n=e.symbolType;if(n!=="none"){var i=ky[n];i||(n="rect",i=ky[n]),lee[n](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,r)}}});function cee(t,e){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=t,r.fill=e||q.color.neutral00,r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=t:r.fill=t,this.markRedraw()}}function Ut(t,e,r,n,i,a,o){var s=t.indexOf("empty")===0;s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return t.indexOf("image://")===0?l=Z2(t.slice(8),new Ce(e,r,n,i),o?"center":"cover"):t.indexOf("path://")===0?l=Qc(t.slice(7),{},new Ce(e,r,n,i),o?"center":"cover"):l=new uee({shape:{symbolType:t,x:e,y:r,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=cee,a&&l.setColor(a),l}function Lh(t){return ee(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function du(t,e){if(t!=null)return ee(t)||(t=[t,t]),[oe(t[0],e[0])||0,oe(pe(t[1],t[0]),e[1])||0]}function kl(t){return isFinite(t)}function hee(t,e,r){var n=e.x==null?0:e.x,i=e.x2==null?1:e.x2,a=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=kl(n)?n:0,i=kl(i)?i:1,a=kl(a)?a:0,o=kl(o)?o:0;var s=t.createLinearGradient(n,a,i,o);return s}function fee(t,e,r){var n=r.width,i=r.height,a=Math.min(n,i),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(o=o*n+r.x,s=s*i+r.y,l=l*a),o=kl(o)?o:.5,s=kl(s)?s:.5,l=l>=0&&kl(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function qw(t,e,r){for(var n=e.type==="radial"?fee(t,e,r):hee(t,e,r),i=e.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function dee(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!0;return!1}function hg(t){return parseInt(t,10)}function Tc(t,e,r){var n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var s=document.defaultView.getComputedStyle(t);return(t[i]||hg(s[n])||hg(t.style[n]))-(hg(s[a])||0)-(hg(s[o])||0)|0}function vee(t,e){return!t||t==="solid"||!(e>0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:qe(t)?[t]:ee(t)?t:null}function bM(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&vee(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=re(r,function(a){return a/i}),n/=i)}return[r,n]}var pee=new Ta(!0);function Dy(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function EI(t){return typeof t=="string"&&t!=="none"}function Iy(t){var e=t.fill;return e!=null&&e!=="none"}function NI(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function RI(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function Kw(t,e,r){var n=R2(e.image,e.__image,r);if(Z0(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*ud),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function gee(t,e,r,n){var i,a=Dy(r),o=Iy(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||pee,h=e.__dirty;if(!n){var f=r.fill,d=r.stroke,p=o&&!!f.colorStops,g=a&&!!d.colorStops,m=o&&!!f.image,y=a&&!!d.image,_=void 0,S=void 0,T=void 0,C=void 0,M=void 0;(p||g)&&(M=e.getBoundingRect()),p&&(_=h?qw(t,f,M):e.__canvasFillGradient,e.__canvasFillGradient=_),g&&(S=h?qw(t,d,M):e.__canvasStrokeGradient,e.__canvasStrokeGradient=S),m&&(T=h||!e.__canvasFillPattern?Kw(t,f,e):e.__canvasFillPattern,e.__canvasFillPattern=T),y&&(C=h||!e.__canvasStrokePattern?Kw(t,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=C),p?t.fillStyle=_:m&&(T?t.fillStyle=T:o=!1),g?t.strokeStyle=S:y&&(C?t.strokeStyle=C:a=!1)}var A=e.getGlobalScale();c.setScale(A[0],A[1],e.segmentIgnoreThreshold);var k,E;t.setLineDash&&r.lineDash&&(i=bM(e),k=i[0],E=i[1]);var D=!0;(u||h&nc)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),D=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),D&&c.rebuildPath(t,l?s:1),k&&(t.setLineDash(k),t.lineDashOffset=E),n||(r.strokeFirst?(a&&RI(t,r),o&&NI(t,r)):(o&&NI(t,r),a&&RI(t,r))),k&&t.setLineDash([])}function mee(t,e,r){var n=e.__image=R2(r.image,e.__image,e,e.onload);if(!(!n||!Z0(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.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,c=r.sy||0;t.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,h=o-u,f=s-c;t.drawImage(n,u,c,h,f,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function yee(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||uo,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=bM(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(Dy(r)&&t.strokeText(i,r.x,r.y),Iy(r)&&t.fillText(i,r.x,r.y)):(Iy(r)&&t.fillText(i,r.x,r.y),Dy(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var OI=["shadowBlur","shadowOffsetX","shadowOffsetY"],zI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function YV(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){gn(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?Rl.opacity:o}(n||e.blend!==r.blend)&&(a||(gn(t,i),a=!0),t.globalCompositeOperation=e.blend||Rl.blend);for(var s=0;s<OI.length;s++){var l=OI[s];(n||e[l]!==r[l])&&(a||(gn(t,i),a=!0),t[l]=t.dpr*(e[l]||0))}return(n||e.shadowColor!==r.shadowColor)&&(a||(gn(t,i),a=!0),t.shadowColor=e.shadowColor||Rl.shadowColor),a}function BI(t,e,r,n,i){var a=uv(e,i.inHover),o=n?null:r&&uv(r,i.inHover)||{};if(a===o)return!1;var s=YV(t,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(gn(t,i),s=!0),EI(a.fill)&&(t.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(gn(t,i),s=!0),EI(a.stroke)&&(t.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(gn(t,i),s=!0),t.globalAlpha=a.opacity==null?1:a.opacity),e.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==u&&(s||(gn(t,i),s=!0),t.lineWidth=u)}for(var c=0;c<zI.length;c++){var h=zI[c],f=h[0];(n||a[f]!==o[f])&&(s||(gn(t,i),s=!0),t[f]=a[f]||h[1])}return s}function _ee(t,e,r,n,i){return YV(t,uv(e,i.inHover),r&&uv(r,i.inHover),n,i)}function XV(t,e){var r=e.transform,n=t.dpr||1;r?t.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):t.setTransform(n,0,0,n,0,0)}function xee(t,e,r){for(var n=!1,i=0;i<t.length;i++){var a=t[i];n=n||a.isZeroArea(),XV(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}r.allClipped=n}function See(t,e){return t&&e?t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||t[4]!==e[4]||t[5]!==e[5]:!(!t&&!e)}var jI=1,VI=2,FI=3,GI=4;function bee(t){var e=Iy(t),r=Dy(t);return!(t.lineDash||!(+e^+r)||e&&typeof t.fill!="string"||r&&typeof t.stroke!="string"||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}function gn(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function uv(t,e){return e&&t.__hoverStyle||t.style}function wM(t,e){Dl(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Dl(t,e,r,n){var i=e.transform;if(!e.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){e.__dirty&=~An,e.__isRendered=!1;return}var a=e.__clipPaths,o=r.prevElClipPaths,s=!1,l=!1;if((!o||dee(a,o))&&(o&&o.length&&(gn(t,r),t.restore(),l=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(gn(t,r),t.save(),xee(a,t,r),s=!0),r.prevElClipPaths=a),r.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=r.prevEl;u||(l=s=!0);var c=e instanceof Ue&&e.autoBatch&&bee(e.style);s||See(i,u.transform)?(gn(t,r),XV(t,e)):c||gn(t,r);var h=uv(e,r.inHover);e instanceof Ue?(r.lastDrawType!==jI&&(l=!0,r.lastDrawType=jI),BI(t,e,u,l,r),(!c||!r.batchFill&&!r.batchStroke)&&t.beginPath(),gee(t,e,h,c),c&&(r.batchFill=h.fill||"",r.batchStroke=h.stroke||"")):e instanceof Kc?(r.lastDrawType!==FI&&(l=!0,r.lastDrawType=FI),BI(t,e,u,l,r),yee(t,e,h)):e instanceof pr?(r.lastDrawType!==VI&&(l=!0,r.lastDrawType=VI),_ee(t,e,u,l,r),mee(t,e,h)):e.getTemporalDisplayables&&(r.lastDrawType!==GI&&(l=!0,r.lastDrawType=GI),wee(t,e,r)),c&&n&&gn(t,r),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),r.prevEl=e,e.__dirty=0,e.__isRendered=!0}function wee(t,e,r){var n=e.getDisplayables(),i=e.getTemporalDisplayables();t.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Dl(t,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=i.length;u<c;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Dl(t,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}var b1=new ree,HI=new Yc(100),WI=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function th(t,e){if(t==="none")return null;var r=e.getDevicePixelRatio(),n=e.getZr(),i=n.painter.type==="svg";t.dirty&&b1.delete(t);var a=b1.get(t);if(a)return a;var o=Se(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/r,b1.set(t,s),t.dirty=!1,s;function l(u){for(var c=[r],h=!0,f=0;f<WI.length;++f){var d=o[WI[f]];if(d!=null&&!ee(d)&&!se(d)&&!qe(d)&&typeof d!="boolean"){h=!1;break}c.push(d)}var p;if(h){p=c.join(",")+(i?"-svg":"");var g=HI.get(p);g&&(i?u.svgElement=g:u.image=g)}var m=KV(o.dashArrayX),y=Tee(o.dashArrayY),_=qV(o.symbol),S=Cee(m),T=QV(y),C=!i&&bn.createCanvas(),M=i&&{tag:"g",attrs:{},key:"dcl",children:[]},A=E(),k;C&&(C.width=A.width*r,C.height=A.height*r,k=C.getContext("2d")),D(),h&&HI.put(p,C||M),u.image=C,u.svgElement=M,u.svgWidth=A.width,u.svgHeight=A.height;function E(){for(var I=1,z=0,O=S.length;z<O;++z)I=oD(I,S[z]);for(var V=1,z=0,O=_.length;z<O;++z)V=oD(V,_[z].length);I*=V;var G=T*S.length*_.length;return{width:Math.max(1,Math.min(I,o.maxTileWidth)),height:Math.max(1,Math.min(G,o.maxTileHeight))}}function D(){k&&(k.clearRect(0,0,C.width,C.height),o.backgroundColor&&(k.fillStyle=o.backgroundColor,k.fillRect(0,0,C.width,C.height)));for(var I=0,z=0;z<y.length;++z)I+=y[z];if(I<=0)return;for(var O=-T,V=0,G=0,F=0;O<A.height;){if(V%2===0){for(var U=G/2%_.length,j=0,W=0,H=0;j<A.width*2;){for(var X=0,z=0;z<m[F].length;++z)X+=m[F][z];if(X<=0)break;if(W%2===0){var K=(1-o.symbolSize)*.5,ne=j+m[F][W]*K,ie=O+y[V]*K,ue=m[F][W]*o.symbolSize,ve=y[V]*o.symbolSize,Ge=H/2%_[U].length;xe(ne,ie,ue,ve,_[U][Ge])}j+=m[F][W],++H,++W,W===m[F].length&&(W=0)}++F,F===m.length&&(F=0)}O+=y[V],++G,++V,V===y.length&&(V=0)}function xe(ge,ke,fe,Me,st){var Ye=i?1:r,rt=Ut(st,ge*Ye,ke*Ye,fe*Ye,Me*Ye,o.color,o.symbolKeepAspect);if(i){var ut=n.painter.renderOneToVNode(rt);ut&&M.children.push(ut)}else wM(k,rt)}}}}function qV(t){if(!t||t.length===0)return[["rect"]];if(se(t))return[[t]];for(var e=!0,r=0;r<t.length;++r)if(!se(t[r])){e=!1;break}if(e)return qV([t]);for(var n=[],r=0;r<t.length;++r)se(t[r])?n.push([t[r]]):n.push(t[r]);return n}function KV(t){if(!t||t.length===0)return[[0,0]];if(qe(t)){var e=Math.ceil(t);return[[e,e]]}for(var r=!0,n=0;n<t.length;++n)if(!qe(t[n])){r=!1;break}if(r)return KV([t]);for(var i=[],n=0;n<t.length;++n)if(qe(t[n])){var e=Math.ceil(t[n]);i.push([e,e])}else{var e=re(t[n],function(s){return Math.ceil(s)});e.length%2===1?i.push(e.concat(e)):i.push(e)}return i}function Tee(t){if(!t||typeof t=="object"&&t.length===0)return[0,0];if(qe(t)){var e=Math.ceil(t);return[e,e]}var r=re(t,function(n){return Math.ceil(n)});return t.length%2?r.concat(r):r}function Cee(t){return re(t,function(e){return QV(e)})}function QV(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return t.length%2===1?e*2:e}function Mee(t,e){t.eachRawSeries(function(r){if(!t.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=th(s,e)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=th(i,e)}}})}var wi=new vi,JV={};function Aee(t,e){JV[t]=e}function eF(t){return JV[t]}var tF={};function rF(t,e){tF[t]=e}function Lee(t){return tF[t]}var Pee="6.0.0",kee={zrender:"6.0.0"},Dee=1,Iee=800,Eee=900,Nee=1e3,Ree=2e3,Oee=5e3,nF=1e3,zee=1100,TM=2e3,iF=3e3,Bee=4e3,s_=4500,jee=4600,Vee=5e3,Fee=6e3,aF=7e3,oF={PROCESSOR:{FILTER:Nee,SERIES_FILTER:Iee,STATISTIC:Oee},VISUAL:{LAYOUT:nF,PROGRESSIVE_LAYOUT:zee,GLOBAL:TM,CHART:iF,POST_CHART_LAYOUT:jee,COMPONENT:Bee,BRUSH:Vee,CHART_ITEM:s_,ARIA:Fee,DECAL:aF}},er="__flagInMainProcess",fg="__mainProcessVersion",yr="__pendingUpdate",w1="__needsUpdateStatus",UI=/^[a-zA-Z0-9_]+$/,T1="__connectUpdateStatus",ZI=0,Gee=1,Hee=2;function sF(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.isDisposed()){this.id;return}return uF(this,t,e)}}function lF(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return uF(this,t,e)}}function uF(t,e,r){return r[0]=r[0]&&r[0].toLowerCase(),vi.prototype[e].apply(t,r)}var cF=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(vi),hF=cF.prototype;hF.on=lF("on");hF.off=lF("off");var al,C1,dg,za,vg,M1,A1,Vu,Fu,$I,YI,L1,XI,pg,qI,fF,Wn,KI,Gu,Ey=function(t){Y(e,t);function e(r,n,i){var a=t.call(this,new qJ)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},a._dom=r;var o="canvas",s="auto",l=!1;a[fg]=1,i.ssr&&B4(function(f){var d=Le(f),p=d.dataIndex;if(p!=null){var g=de();return g.set("series_index",d.seriesIndex),g.set("data_index",p),d.ssrType&&g.set("ssr_type",d.ssrType),g}});var u=a._zr=_w(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:pe(i.useDirtyRect,l),useCoarsePointer:pe(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=o_(le(u.flush,u),17),a._updateTheme(n),a._locale=XK(i.locale||Gj),a._coordSysMgr=new Ch;var c=a._api=qI(a);function h(f,d){return f.__prio-d.__prio}return hm(Ry,h),hm(eT,h),a._scheduler=new FV(a,c,eT,Ry),a._messageCenter=new cF,a._initEvents(),a.resize=le(a.resize,a),u.animation.on("frame",a._onframe,a),$I(u,a),YI(u,a),$d(a),a}return e.prototype._onframe=function(){if(!this._disposed){KI(this);var r=this._scheduler;if(this[yr]){var n=this[yr].silent;this[er]=!0,Gu(this);try{al(this),za.update.call(this,null,this[yr].updateParams)}catch(l){throw this[er]=!1,this[yr]=null,l}this._zr.flush(),this[er]=!1,this[yr]=null,Vu.call(this,n),Fu.call(this,n)}else if(r.unfinished){var i=Dee,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),M1(this,a),r.performVisualTasks(a),pg(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(!this[er]){if(this._disposed){this.id;return}var a,o,s;if(be(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[er]=!0,Gu(this),!this._model||n){var l=new IQ(this._api),u=this._theme,c=this._model=new gM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},tT);var h={seriesTransition:s,optionChanged:!0};if(i)this[yr]={silent:a,updateParams:h},this[er]=!1,this.getZr().wakeUp();else{try{al(this),za.update.call(this,null,h)}catch(f){throw this[yr]=null,this[er]=!1,f}this._ssr||this._zr.flush(),this[yr]=null,this[er]=!1,Vu.call(this,a),Fu.call(this,a)}}},e.prototype.setTheme=function(r,n){if(!this[er]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[yr]&&(a==null&&(a=this[yr].silent),o=this[yr].updateParams,this[yr]=null),this[er]=!0,Gu(this);try{this._updateTheme(r),i.setTheme(this._theme),al(this),za.update.call(this,{type:"setTheme"},o)}catch(s){throw this[er]=!1,s}this[er]=!1,Vu.call(this,a),Fu.call(this,a)}}},e.prototype._updateTheme=function(r){se(r)&&(r=dF[r]),r&&(r=ye(r),r&&gV(r,!0),this._theme=r)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ze.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},e.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()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return R(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},e.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;R(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return R(a,function(l){l.group.ignore=!1}),s},e.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(Oy[i]){var l=s,u=s,c=-s,h=-s,f=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();R(Bl,function(S,T){if(S.group===i){var C=n?S.getZr().painter.getSvgDom().innerHTML:S.renderToCanvas(ye(r)),M=S.getDom().getBoundingClientRect();l=a(M.left,l),u=a(M.top,u),c=o(M.right,c),h=o(M.bottom,h),f.push({dom:C,left:M.left,top:M.top})}}),l*=d,u*=d,c*=d,h*=d;var p=c-l,g=h-u,m=bn.createCanvas(),y=_w(m,{renderer:n?"svg":"canvas"});if(y.resize({width:p,height:g}),n){var _="";return R(f,function(S){var T=S.left-l,C=S.top-u;_+='<g transform="translate('+T+","+C+')">'+S.dom+"</g>"}),y.painter.getSvgRoot().innerHTML=_,r.connectedBackgroundColor&&y.painter.setBackgroundColor(r.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return r.connectedBackgroundColor&&y.add(new Be({shape:{x:0,y:0,width:p,height:g},style:{fill:r.connectedBackgroundColor}})),R(f,function(S){var T=new pr({style:{x:S.left*d-l,y:S.top*d-u,image:S.dom}});y.add(T)}),y.refreshImmediately(),m.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n,i){return vg(this,"convertToPixel",r,n,i)},e.prototype.convertToLayout=function(r,n,i){return vg(this,"convertToLayout",r,n,i)},e.prototype.convertFromPixel=function(r,n,i){return vg(this,"convertFromPixel",r,n,i)},e.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Nc(i,r);return R(o,function(s,l){l.indexOf("Models")>=0&&R(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(a=a||h.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=Nc(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?SM(s,l,n):$v(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;R(Wee,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&Pl(l,function(g){var m=Le(g);if(m&&m.dataIndex!=null){var y=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=y&&y.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=J({},m.eventData),!0},!0),u){var h=u.componentType,f=u.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",f=u.seriesIndex);var d=h&&f!=null&&s.getComponent(h,f),p=d&&r[d.mainType==="series"?"_chartsMap":"_componentsMap"][d.__viewId];u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:d,view:p},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;R(Jw,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),JJ(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&q4(this.getDom(),MM,"");var n=this,i=n._api,a=n._model;R(n._componentsViews,function(o){o.dispose(a,i)}),R(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 Bl[n.id]},e.prototype.resize=function(r){if(!this[er]){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[yr]&&(a==null&&(a=this[yr].silent),i=!0,this[yr]=null),this[er]=!0,Gu(this);try{i&&al(this),za.update.call(this,{type:"resize",animation:J({duration:0},r&&r.animation)})}catch(o){throw this[er]=!1,o}this[er]=!1,Vu.call(this,a),Fu.call(this,a)}}},e.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(be(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!rT[r]){var i=rT[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=J({},r);return n.type=Qw[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(be(n)||(n={silent:!!n}),!!Ny[r.type]&&this._model){if(this[er]){this._pendingActions.push(r);return}var i=n.silent;A1.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Ze.browser.weChat&&this._throttledZrFlush(),Vu.call(this,i),Fu.call(this,i)}},e.prototype.updateLabelLayout=function(){wi.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.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()},e.internalField=function(){al=function(h){var f=h._scheduler;f.restorePipelines(h._model),f.prepareStageTasks(),C1(h,!0),C1(h,!1),f.plan()},C1=function(h,f){for(var d=h._model,p=h._scheduler,g=f?h._componentsViews:h._chartsViews,m=f?h._componentsMap:h._chartsMap,y=h._zr,_=h._api,S=0;S<g.length;S++)g[S].__alive=!1;f?d.eachComponent(function(M,A){M!=="series"&&T(A)}):d.eachSeries(T);function T(M){var A=M.__requireNewView;M.__requireNewView=!1;var k="_ec_"+M.id+"_"+M.type,E=!A&&m[k];if(!E){var D=ha(M.type),I=f?mt.getClass(D.main,D.sub):lt.getClass(D.sub);E=new I,E.init(d,_),m[k]=E,g.push(E),y.add(E.group)}M.__viewId=E.__id=k,E.__alive=!0,E.__model=M,E.group.__ecComponentInfo={mainType:M.mainType,index:M.componentIndex},!f&&p.prepareView(E,M,d,_)}for(var S=0;S<g.length;){var C=g[S];C.__alive?S++:(!f&&C.renderTask.dispose(),y.remove(C.group),C.dispose(d,_),g.splice(S,1),m[C.__id]===C&&delete m[C.__id],C.__id=C.group.__ecComponentInfo=null)}},dg=function(h,f,d,p,g){var m=h._model;if(m.setUpdatePayload(d),!p){R([].concat(h._componentsViews).concat(h._chartsViews),C);return}var y={};y[p+"Id"]=d[p+"Id"],y[p+"Index"]=d[p+"Index"],y[p+"Name"]=d[p+"Name"];var _={mainType:p,query:y};g&&(_.subType=g);var S=d.excludeSeriesId,T;S!=null&&(T=de(),R(gt(S),function(M){var A=rr(M,null);A!=null&&T.set(A,!0)})),m&&m.eachComponent(_,function(M){var A=T&&T.get(M.id)!=null;if(!A)if(RD(d))if(M instanceof dt)d.type===Ol&&!d.notBlur&&!M.get(["emphasis","disabled"])&&Kq(M,d,h._api);else{var k=G2(M.mainType,M.componentIndex,d.name,h._api),E=k.focusSelf,D=k.dispatchers;d.type===Ol&&E&&!d.notBlur&&Dw(M.mainType,M.componentIndex,h._api),D&&R(D,function(I){d.type===Ol?ho(I):fo(I)})}else Ew(d)&&M instanceof dt&&(eK(M,d,h._api),ED(M),Wn(h))},h),m&&m.eachComponent(_,function(M){var A=T&&T.get(M.id)!=null;A||C(h[p==="series"?"_chartsMap":"_componentsMap"][M.__viewId])},h);function C(M){M&&M.__alive&&M[f]&&M[f](M.__model,m,h._api,d)}},za={prepareAndUpdate:function(h){al(this),za.update.call(this,h,h&&{optionChanged:h.newOption!=null})},update:function(h,f){var d=this._model,p=this._api,g=this._zr,m=this._coordSysMgr,y=this._scheduler;if(d){d.setUpdatePayload(h),y.restoreData(d,h),y.performSeriesTasks(d),m.create(d,p),y.performDataProcessorTasks(d,h),M1(this,d),m.update(d,p),n(d),y.performVisualTasks(d,h);var _=d.get("backgroundColor")||"transparent";g.setBackgroundColor(_);var S=d.get("darkMode");S!=null&&S!=="auto"&&g.setDarkMode(S),L1(this,d,p,h,f),wi.trigger("afterupdate",d,p)}},updateTransform:function(h){var f=this,d=this._model,p=this._api;if(d){d.setUpdatePayload(h);var g=[];d.eachComponent(function(y,_){if(y!=="series"){var S=f.getViewOfComponentModel(_);if(S&&S.__alive)if(S.updateTransform){var T=S.updateTransform(_,d,p,h);T&&T.update&&g.push(S)}else g.push(S)}});var m=de();d.eachSeries(function(y){var _=f._chartsMap[y.__viewId];if(_.updateTransform){var S=_.updateTransform(y,d,p,h);S&&S.update&&m.set(y.uid,1)}else m.set(y.uid,1)}),n(d),this._scheduler.performVisualTasks(d,h,{setDirty:!0,dirtyMap:m}),pg(this,d,p,h,{},m),wi.trigger("afterupdate",d,p)}},updateView:function(h){var f=this._model;f&&(f.setUpdatePayload(h),lt.markUpdateMethod(h,"updateView"),n(f),this._scheduler.performVisualTasks(f,h,{setDirty:!0}),L1(this,f,this._api,h,{}),wi.trigger("afterupdate",f,this._api))},updateVisual:function(h){var f=this,d=this._model;d&&(d.setUpdatePayload(h),d.eachSeries(function(p){p.getData().clearAllVisual()}),lt.markUpdateMethod(h,"updateVisual"),n(d),this._scheduler.performVisualTasks(d,h,{visualType:"visual",setDirty:!0}),d.eachComponent(function(p,g){if(p!=="series"){var m=f.getViewOfComponentModel(g);m&&m.__alive&&m.updateVisual(g,d,f._api,h)}}),d.eachSeries(function(p){var g=f._chartsMap[p.__viewId];g.updateVisual(p,d,f._api,h)}),wi.trigger("afterupdate",d,this._api))},updateLayout:function(h){za.update.call(this,h)}};function r(h,f,d,p,g){if(h._disposed){h.id;return}for(var m=h._model,y=h._coordSysMgr.getCoordinateSystems(),_,S=Nc(m,d),T=0;T<y.length;T++){var C=y[T];if(C[f]&&(_=C[f](m,S,p,g))!=null)return _}}vg=r,M1=function(h,f){var d=h._chartsMap,p=h._scheduler;f.eachSeries(function(g){p.updateStreamModes(g,d[g.__viewId])})},A1=function(h,f){var d=this,p=this.getModel(),g=h.type,m=h.escapeConnect,y=Ny[g],_=(y.update||"update").split(":"),S=_.pop(),T=_[0]!=null&&ha(_[0]);this[er]=!0,Gu(this);var C=[h],M=!1;h.batch&&(M=!0,C=re(h.batch,function(F){return F=Se(J({},F),h),F.batch=null,F}));var A=[],k,E=[],D=y.nonRefinedEventType,I=Ew(h),z=RD(h);if(z&&yj(this._api),R(C,function(F){var U=y.action(F,p,d._api);if(y.refineEvent?E.push(U):k=U,k=k||J({},F),k.type=D,A.push(k),z){var j=E2(h),W=j.queryOptionMap,H=j.mainTypeSpecified,X=H?W.keys()[0]:"series";dg(d,S,F,X),Wn(d)}else I?(dg(d,S,F,"series"),Wn(d)):T&&dg(d,S,F,T.main,T.sub)}),S!=="none"&&!z&&!I&&!T)try{this[yr]?(al(this),za.update.call(this,h),this[yr]=null):za[S].call(this,h)}catch(F){throw this[er]=!1,F}if(M?k={type:D,escapeConnect:m,batch:A}:k=A[0],this[er]=!1,!f){var O=void 0;if(y.refineEvent){var V=y.refineEvent(E,h,p,this._api).eventContent;Rr(be(V)),O=Se({type:y.refinedEventType},V),O.fromAction=h.type,O.fromActionPayload=h,O.escapeConnect=!0}var G=this._messageCenter;G.trigger(k.type,k),O&&G.trigger(O.type,O)}},Vu=function(h){for(var f=this._pendingActions;f.length;){var d=f.shift();A1.call(this,d,h)}},Fu=function(h){!h&&this.trigger("updated")},$I=function(h,f){h.on("rendered",function(d){f.trigger("rendered",d),h.animation.isFinished()&&!f[yr]&&!f._scheduler.unfinished&&!f._pendingActions.length&&f.trigger("finished")})},YI=function(h,f){h.on("mouseover",function(d){var p=d.target,g=Pl(p,rv);g&&(Qq(g,d,f._api),Wn(f))}).on("mouseout",function(d){var p=d.target,g=Pl(p,rv);g&&(Jq(g,d,f._api),Wn(f))}).on("click",function(d){var p=d.target,g=Pl(p,function(_){return Le(_).dataIndex!=null},!0);if(g){var m=g.selected?"unselect":"select",y=Le(g);f._api.dispatchAction({type:m,dataType:y.dataType,dataIndexInside:y.dataIndex,seriesIndex:y.seriesIndex,isFromClick:!0})}})};function n(h){h.clearColorPalette(),h.eachSeries(function(f){f.clearColorPalette()})}function i(h){var f=[],d=[],p=!1;if(h.eachComponent(function(_,S){var T=S.get("zlevel")||0,C=S.get("z")||0,M=S.getZLevelKey();p=p||!!M,(_==="series"?d:f).push({zlevel:T,z:C,idx:S.componentIndex,type:_,key:M})}),p){var g=f.concat(d),m,y;hm(g,function(_,S){return _.zlevel===S.zlevel?_.z-S.z:_.zlevel-S.zlevel}),R(g,function(_){var S=h.getComponent(_.type,_.idx),T=_.zlevel,C=_.key;m!=null&&(T=Math.max(m,T)),C?(T===m&&C!==y&&T++,y=C):y&&(T===m&&T++,y=""),m=T,S.setZLevel(T)})}}L1=function(h,f,d,p,g){i(f),XI(h,f,d,p,g),R(h._chartsViews,function(m){m.__alive=!1}),pg(h,f,d,p,g),R(h._chartsViews,function(m){m.__alive||m.remove(f,d)})},XI=function(h,f,d,p,g,m){R(m||h._componentsViews,function(y){var _=y.__model;u(_,y),y.render(_,f,d,p),l(_,y),c(_,y)})},pg=function(h,f,d,p,g,m){var y=h._scheduler;g=J(g||{},{updatedSeries:f.getSeries()}),wi.trigger("series:beforeupdate",f,d,g);var _=!1;f.eachSeries(function(S){var T=h._chartsMap[S.__viewId];T.__alive=!0;var C=T.renderTask;y.updatePayload(C,p),u(S,T),m&&m.get(S.uid)&&C.dirty(),C.perform(y.getPerformArgs(C))&&(_=!0),T.group.silent=!!S.get("silent"),s(S,T),ED(S)}),y.unfinished=_||y.unfinished,wi.trigger("series:layoutlabels",f,d,g),wi.trigger("series:transition",f,d,g),f.eachSeries(function(S){var T=h._chartsMap[S.__viewId];l(S,T),c(S,T)}),o(h,f),wi.trigger("series:afterupdate",f,d,g)},Wn=function(h){h[w1]=!0,h.getZr().wakeUp()},Gu=function(h){h[fg]=(h[fg]+1)%1e3},KI=function(h){h[w1]&&(h.getZr().storage.traverse(function(f){Rc(f)||a(f)}),h[w1]=!1)};function a(h){for(var f=[],d=h.currentStates,p=0;p<d.length;p++){var g=d[p];g==="emphasis"||g==="blur"||g==="select"||f.push(g)}h.selected&&h.states.select&&f.push("select"),h.hoverState===K0&&h.states.emphasis?f.push("emphasis"):h.hoverState===Vv&&h.states.blur&&f.push("blur"),h.useStates(f)}function o(h,f){var d=h._zr,p=d.storage,g=0;p.traverse(function(m){m.isGroup||g++}),g>f.get("hoverLayerThreshold")&&!Ze.node&&!Ze.worker&&f.eachSeries(function(m){if(!m.preventUsingHoverLayer){var y=h._chartsMap[m.__viewId];y.__alive&&y.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function s(h,f){var d=h.get("blendMode")||null;f.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function l(h,f){if(!h.preventAutoZ){var d=Jl(h);f.eachRendered(function(p){return e_(p,d.z,d.zlevel),!0})}}function u(h,f){f.eachRendered(function(d){if(!Rc(d)){var p=d.getTextContent(),g=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function c(h,f){var d=h.getModel("stateAnimation"),p=h.isAnimationEnabled(),g=d.get("duration"),m=g>0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;f.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Rc(y))return;if(y instanceof Ue&&oK(y),y.__dirty){var _=y.prevStates;_&&y.useStates(_)}if(p){y.stateTransition=m;var S=y.getTextContent(),T=y.getTextGuideLine();S&&(S.stateTransition=m),T&&(T.stateTransition=m)}y.__dirty&&a(y)}})}qI=function(h){return new(function(f){Y(d,f);function d(){return f!==null&&f.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return h._model.getComponent(g.mainType,g.index);p=p.parent}},d.prototype.enterEmphasis=function(p,g){ho(p,g),Wn(h)},d.prototype.leaveEmphasis=function(p,g){fo(p,g),Wn(h)},d.prototype.enterBlur=function(p){vj(p),Wn(h)},d.prototype.leaveBlur=function(p){F2(p),Wn(h)},d.prototype.enterSelect=function(p){pj(p),Wn(h)},d.prototype.leaveSelect=function(p){gj(p),Wn(h)},d.prototype.getModel=function(){return h.getModel()},d.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},d.prototype.getMainProcessVersion=function(){return h[fg]},d}(vV))(h)},fF=function(h){function f(d,p){for(var g=0;g<d.length;g++){var m=d[g];m[T1]=p}}R(Qw,function(d,p){h._messageCenter.on(p,function(g){if(Oy[h.group]&&h[T1]!==ZI){if(g&&g.escapeConnect)return;var m=h.makeActionFromEvent(g),y=[];R(Bl,function(_){_!==h&&_.group===h.group&&y.push(_)}),f(y,ZI),R(y,function(_){_[T1]!==Gee&&_.dispatchAction(m)}),f(y,Hee)}})})}}(),e}(vi),CM=Ey.prototype;CM.on=sF("on");CM.off=sF("off");CM.one=function(t,e,r){var n=this;function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];e&&e.apply&&e.apply(this,a),n.off(t,i)}this.on.call(this,t,i,r)};var Wee=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var Ny={},Qw={},Jw={},eT=[],tT=[],Ry=[],dF={},rT={},Bl={},Oy={},Uee=+new Date-0,Zee=+new Date-0,MM="_echarts_instance_";function $ee(t,e,r){var n=!(r&&r.ssr);if(n){var i=AM(t);if(i)return i}var a=new Ey(t,e,r);return a.id="ec_"+Uee++,Bl[a.id]=a,n&&q4(t,MM,a.id),fF(a),wi.trigger("afterinit",a),a}function Yee(t){if(ee(t)){var e=t;t=null,R(e,function(r){r.group!=null&&(t=r.group)}),t=t||"g_"+Zee++,R(e,function(r){r.group=t})}return Oy[t]=!0,t}function vF(t){Oy[t]=!1}var Xee=vF;function qee(t){se(t)?t=Bl[t]:t instanceof Ey||(t=AM(t)),t instanceof Ey&&!t.isDisposed()&&t.dispose()}function AM(t){return Bl[$X(t,MM)]}function Kee(t){return Bl[t]}function LM(t,e){dF[t]=e}function PM(t){Ee(tT,t)<0&&tT.push(t)}function kM(t,e){DM(eT,t,e,Ree)}function pF(t){l_("afterinit",t)}function gF(t){l_("afterupdate",t)}function l_(t,e){wi.on(t,e)}function Fi(t,e,r){var n,i,a,o,s;me(e)&&(r=e,e=""),be(t)?(n=t.type,i=t.event,o=t.update,s=t.publishNonRefinedEvent,r||(r=t.action),a=t.refineEvent):(n=t,i=e);function l(c){return c.toLowerCase()}i=l(i||n);var u=a?l(n):i;Ny[n]||(Rr(UI.test(n)&&UI.test(i)),a&&Rr(i!==n),Ny[n]={actionType:n,refinedEventType:i,nonRefinedEventType:u,update:o,action:r,refineEvent:a},Jw[i]=1,a&&s&&(Jw[u]=1),Qw[u]=n)}function mF(t,e){Ch.register(t,e)}function Qee(t){var e=Ch.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function Jee(t,e){rF(t,e)}function yF(t,e){DM(Ry,t,e,nF,"layout")}function Ds(t,e){DM(Ry,t,e,iF,"visual")}var QI=[];function DM(t,e,r,n,i){if((me(e)||be(e))&&(r=e,e=n),!(Ee(QI,r)>=0)){QI.push(r);var a=FV.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function IM(t,e){rT[t]=e}function ete(t){t4({createCanvas:t})}function _F(t,e,r){var n=eF("registerMap");n&&n(t,e,r)}function tte(t){var e=eF("getMap");return e&&e(t)}var xF=cJ;Ds(TM,OJ);Ds(s_,zJ);Ds(s_,BJ);Ds(TM,KJ);Ds(s_,QJ);Ds(aF,Mee);PM(gV);kM(Eee,WQ);IM("default",jJ);Fi({type:Ol,event:Ol,update:Ol},Rt);Fi({type:ym,event:ym,update:ym},Rt);Fi({type:Sy,event:j2,update:Sy,action:Rt,refineEvent:EM,publishNonRefinedEvent:!0});Fi({type:Pw,event:j2,update:Pw,action:Rt,refineEvent:EM,publishNonRefinedEvent:!0});Fi({type:by,event:j2,update:by,action:Rt,refineEvent:EM,publishNonRefinedEvent:!0});function EM(t,e,r,n){return{eventContent:{selected:tK(r),isFromClick:e.isFromClick||!1}}}LM("default",{});LM("dark",UV);var rte={},JI=[],nte={registerPreprocessor:PM,registerProcessor:kM,registerPostInit:pF,registerPostUpdate:gF,registerUpdateLifecycle:l_,registerAction:Fi,registerCoordinateSystem:mF,registerLayout:yF,registerVisual:Ds,registerTransform:xF,registerLoading:IM,registerMap:_F,registerImpl:Aee,PRIORITY:oF,ComponentModel:Ve,ComponentView:mt,SeriesModel:dt,ChartView:lt,registerComponentModel:function(t){Ve.registerClass(t)},registerComponentView:function(t){mt.registerClass(t)},registerSeriesModel:function(t){dt.registerClass(t)},registerChartView:function(t){lt.registerClass(t)},registerCustomSeries:function(t,e){rF(t,e)},registerSubTypeDefaulter:function(t,e){Ve.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){O4(t,e)}};function ze(t){if(ee(t)){R(t,function(e){ze(e)});return}Ee(JI,t)>=0||(JI.push(t),me(t)&&(t={install:t}),t.install(nte))}function df(t){return t==null?0:t.length||1}function eE(t){return t}var vo=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||eE,this._newKeyGetter=i||eE,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=i[o],l=n[s],u=df(l);if(u>1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],c=i[l],h=df(u),f=df(c);if(h>1&&f===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(h===1&&f>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(h===1&&f===1)this._update&&this._update(c,u),i[l]=null;else if(h>1&&f>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(h>1)for(var d=0;d<h;d++)this._remove&&this._remove(u[d]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},t.prototype._performRestAdd=function(e,r){for(var n=0;n<e.length;n++){var i=e[n],a=r[i],o=df(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);r[i]=null}},t.prototype._initIndexMap=function(e,r,n,i){for(var a=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[i](e[o],o);if(a||(n[o]=s),!!r){var l=r[s],u=df(l);u===0?(r[s]=o,a&&n.push(s)):u===1?r[s]=[l,o]:l.push(o)}}},t}(),ite=function(){function t(e,r){this._encode=e,this._schema=r}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function ate(t,e){var r={},n=r.encode={},i=de(),a=[],o=[],s={};R(t.dimensions,function(f){var d=t.getDimensionInfo(f),p=d.coordDim;if(p){var g=d.coordDimIndex;P1(n,p)[g]=f,d.isExtraCoord||(i.set(p,1),ote(d.type)&&(a[0]=f),P1(s,p)[g]=t.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(f)}sV.each(function(m,y){var _=P1(n,y),S=d.otherDims[y];S!=null&&S!==!1&&(_[S]=d.name)})});var l=[],u={};i.each(function(f,d){var p=n[d];u[d]=p[0],l=l.concat(p)}),r.dataDimsOnCoord=l,r.dataDimIndicesOnCoord=re(l,function(f){return t.getDimensionInfo(f).storeDimIndex}),r.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(a=c.slice());var h=n.tooltip;return h&&h.length?o=h.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new ite(s,e),r}function P1(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function zy(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function ote(t){return!(t==="ordinal"||t==="time")}var Cm=function(){function t(e){this.otherDims={},e!=null&&J(this,e)}return t}(),ste=Fe(),lte={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},SF=function(){function t(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=TF(this.source)))},t.prototype.getSourceDimensionIndex=function(e){return pe(this._dimNameMap.get(e),-1)},t.prototype.getSourceDimension=function(e){var r=this.source.dimensionsDefine;if(r)return r[e]},t.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,r=yV(this.source),n=!CF(e),i="",a=[],o=0,s=0;o<e;o++){var l=void 0,u=void 0,c=void 0,h=this.dimensions[s];if(h&&h.storeDimIndex===o)l=r?h.name:null,u=h.type,c=h.ordinalMeta,s++;else{var f=this.getSourceDimension(o);f&&(l=r?f.name:null,u=f.type)}a.push({property:l,type:u,ordinalMeta:c}),r&&l!=null&&(!h||!h.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=lte[u]||"f",c&&(i+=c.uid),i+="$"}var d=this.source,p=[d.seriesLayoutBy,d.startIndex,i].join("$$");return{dimensions:a,hash:p}},t.prototype.makeOutputDimensionNames=function(){for(var e=[],r=0,n=0;r<this._fullDimCount;r++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===r)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(r);o&&(i=o.name)}e.push(i)}return e},t.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function bF(t){return t instanceof SF}function wF(t){for(var e=de(),r=0;r<(t||[]).length;r++){var n=t[r],i=be(n)?n.name:n;i!=null&&e.get(i)==null&&e.set(i,r)}return e}function TF(t){var e=ste(t);return e.dimNameMap||(e.dimNameMap=wF(t.dimensionsDefine))}function CF(t){return t>30}var vf=be,Lo=re,ute=typeof Int32Array>"u"?Array:Int32Array,cte="e\0\0",tE=-1,hte=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],fte=["_approximateExtent"],rE,gg,pf,gf,k1,mf,D1,Yr=function(){function t(e,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","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;bF(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var h=n[c],f=se(h)?new Cm({name:h}):h instanceof Cm?h:new Cm(h),d=f.name;f.type=f.type||"float",f.coordDim||(f.coordDim=d,f.coordDimIndex=0);var p=f.otherDims=f.otherDims||{};o.push(d),a[d]=f,u[d]!=null&&(l=!0),f.createInvertedIndices&&(s[d]=[]);var g=c;qe(f.storeDimIndex)&&(g=f.storeDimIndex),p.itemName===0&&(this._nameDimIdx=g),p.itemId===0&&(this._idDimIdx=g),i&&(f.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var m=this._dimIdxToName=de();R(o,function(y){m.set(a[y].storeDimIndex,y)})}}return t.prototype.getDimension=function(e){var r=this._recognizeDimIndex(e);if(r==null)return e;if(r=e,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var i=this._schema.getSourceDimension(r);if(i)return i.name},t.prototype.getDimensionIndex=function(e){var r=this._recognizeDimIndex(e);if(r!=null)return r;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},t.prototype._recognizeDimIndex=function(e){if(qe(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},t.prototype._getStoreDimIndex=function(e){var r=this.getDimensionIndex(e);return r},t.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},t.prototype._initGetDimensionInfo=function(e){var r=this._dimInfos;this._getDimInfo=e?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(e,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return i?i[r]:null},t.prototype.mapDimensionsAll=function(e){var r=this._dimSummary,n=r.encode[e];return(n||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(e,r,n){var i=this,a;if(e instanceof Uw&&(a=e),!a){var o=this.dimensions,s=mM(e)||Nr(e)?new _V(e,o.length):e;a=new Uw;var l=Lo(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=ate(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(e){var r=this._store.appendData(e);this._doInit(r[0],r[1])},t.prototype.appendValues=function(e,r){var n=this._store.appendValues(e,r&&r.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=r[l],o&&D1(this,s)}},t.prototype._updateOrdinalMeta=function(){for(var e=this._store,r=this.dimensions,n=0;n<r.length;n++){var i=this._dimInfos[r[n]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==hs&&!e.fillStorage},t.prototype._doInit=function(e,r){if(!(e>=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===jn;if(l&&!i.pure)for(var u=[],c=e;c<r;c++){var h=i.getItem(c,u);if(!this.hasItemOption&&NX(h)&&(this.hasItemOption=!0),h){var f=h.name;a[c]==null&&f!=null&&(a[c]=rr(f,null));var d=h.id;o[c]==null&&d!=null&&(o[c]=rr(d,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<r;c++)D1(this,c);rE(this)}},t.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.setApproximateExtent=function(e,r){r=this.getDimension(r),this._approximateExtent[r]=e.slice()},t.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},t.prototype.setCalculationInfo=function(e,r){vf(e)?J(this._calculationInfo,e):this._calculationInfo[e]=r},t.prototype.getName=function(e){var r=this.getRawIndex(e),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=pf(this,this._nameDimIdx,r)),n==null&&(n=""),n},t.prototype._getCategory=function(e,r){var n=this._store.get(e,r),i=this._store.getOrdinalMeta(e);return i?i.categories[n]:n},t.prototype.getId=function(e){return gg(this,this.getRawIndex(e))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.get(i.storeDimIndex,r)},t.prototype.getByRawIndex=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.getByRawIndex(i.storeDimIndex,r)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},t.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},t.prototype.getValues=function(e,r){var n=this,i=this._store;return ee(e)?i.getValues(Lo(e,function(a){return n._getStoreDimIndex(a)}),r):i.getValues(e)},t.prototype.hasValue=function(e){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,i=r.length;n<i;n++)if(isNaN(this._store.get(r[n],e)))return!1;return!0},t.prototype.indexOfName=function(e){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===e)return r;return-1},t.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},t.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},t.prototype.rawIndexOf=function(e,r){var n=e&&this._invertedIndicesMap[e],i=n&&n[r];return i==null||isNaN(i)?tE:i},t.prototype.each=function(e,r,n){me(e)&&(n=r,r=e,e=[]);var i=n||this,a=Lo(gf(e),this._getStoreDimIndex,this);this._store.each(a,i?le(r,i):r)},t.prototype.filterSelf=function(e,r,n){me(e)&&(n=r,r=e,e=[]);var i=n||this,a=Lo(gf(e),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?le(r,i):r),this},t.prototype.selectRange=function(e){var r=this,n={},i=$e(e);return R(i,function(a){var o=r._getStoreDimIndex(a);n[o]=e[a]}),this._store=this._store.selectRange(n),this},t.prototype.mapArray=function(e,r,n){me(e)&&(n=r,r=e,e=[]),n=n||this;var i=[];return this.each(e,function(){i.push(r&&r.apply(this,arguments))},n),i},t.prototype.map=function(e,r,n,i){var a=n||i||this,o=Lo(gf(e),this._getStoreDimIndex,this),s=mf(this);return s._store=this._store.map(o,a?le(r,a):r),s},t.prototype.modify=function(e,r,n,i){var a=n||i||this,o=Lo(gf(e),this._getStoreDimIndex,this);this._store.modify(o,a?le(r,a):r)},t.prototype.downSample=function(e,r,n,i){var a=mf(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),r,n,i),a},t.prototype.minmaxDownSample=function(e,r){var n=mf(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),r),n},t.prototype.lttbDownSample=function(e,r){var n=mf(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),r),n},t.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},t.prototype.getItemModel=function(e){var r=this.hostModel,n=this.getRawDataItem(e);return new We(n,r,r&&r.ecModel)},t.prototype.diff=function(e){var r=this;return new vo(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return gg(e,n)},function(n){return gg(r,n)})},t.prototype.getVisual=function(e){var r=this._visual;return r&&r[e]},t.prototype.setVisual=function(e,r){this._visual=this._visual||{},vf(e)?J(this._visual,e):this._visual[e]=r},t.prototype.getItemVisual=function(e,r){var n=this._itemVisuals[e],i=n&&n[r];return i??this.getVisual(r)},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),ee(a)?a=a.slice():vf(a)&&(a=J({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,vf(r)?J(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){vf(e)?J(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?J(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;Lw(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){R(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:Lo(this.dimensions,this._getDimInfo,this),this.hostModel)),k1(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(B0(arguments)))})},t.internalField=function(){rE=function(e){var r=e._invertedIndicesMap;R(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new ute(o.categories.length);for(var l=0;l<n.length;l++)n[l]=tE;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},pf=function(e,r,n){return rr(e._getCategory(r,n),null)},gg=function(e,r){var n=e._idList[r];return n==null&&e._idDimIdx!=null&&(n=pf(e,e._idDimIdx,r)),n==null&&(n=cte+r),n},gf=function(e){return ee(e)||(e=e!=null?[e]:[]),e},mf=function(e){var r=new t(e._schema?e._schema:Lo(e.dimensions,e._getDimInfo,e),e.hostModel);return k1(r,e),r},k1=function(e,r){R(hte.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(e[n]=r[n])}),e.__wrappedMethods=r.__wrappedMethods,R(fte,function(n){e[n]=ye(r[n])}),e._calculationInfo=J({},r._calculationInfo)},D1=function(e,r){var n=e._nameList,i=e._idList,a=e._nameDimIdx,o=e._idDimIdx,s=n[r],l=i[r];if(s==null&&a!=null&&(n[r]=s=pf(e,a,r)),l==null&&o!=null&&(i[r]=l=pf(e,o,r)),l==null&&s!=null){var u=e._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),i[r]=l}}}(),t}();function dte(t,e){return Ph(t,e).dimensions}function Ph(t,e){mM(t)||(t=yM(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=de(),a=[],o=pte(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&CF(o),l=n===t.dimensionsDefine,u=l?TF(t):wF(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var h=de(c),f=new AV(o),d=0;d<f.length;d++)f[d]=-1;function p(E){var D=f[E];if(D<0){var I=n[E],z=be(I)?I:{name:I},O=new Cm,V=z.name;V!=null&&u.get(V)!=null&&(O.name=O.displayName=V),z.type!=null&&(O.type=z.type),z.displayName!=null&&(O.displayName=z.displayName);var G=a.length;return f[E]=G,O.storeDimIndex=E,a.push(O),O}return a[D]}if(!s)for(var d=0;d<o;d++)p(d);h.each(function(E,D){var I=gt(E).slice();if(I.length===1&&!se(I[0])&&I[0]<0){h.set(D,!1);return}var z=h.set(D,[]);R(I,function(O,V){var G=se(O)?u.get(O):O;G!=null&&G<o&&(z[V]=G,m(p(G),D,V))})});var g=0;R(r,function(E){var D,I,z,O;if(se(E))D=E,O={};else{O=E,D=O.name;var V=O.ordinalMeta;O.ordinalMeta=null,O=J({},O),O.ordinalMeta=V,I=O.dimsDef,z=O.otherDims,O.name=O.coordDim=O.coordDimIndex=O.dimsDef=O.otherDims=null}var G=h.get(D);if(G!==!1){if(G=gt(G),!G.length)for(var F=0;F<(I&&I.length||1);F++){for(;g<o&&p(g).coordDim!=null;)g++;g<o&&G.push(g++)}R(G,function(U,j){var W=p(U);if(l&&O.type!=null&&(W.type=O.type),m(Se(W,O),D,j),W.name==null&&I){var H=I[j];!be(H)&&(H={name:H}),W.name=W.displayName=H.name,W.defaultTooltip=H.defaultTooltip}z&&Se(W.otherDims,z)})}});function m(E,D,I){sV.get(D)!=null?E.otherDims[D]=I:(E.coordDim=D,E.coordDimIndex=I,i.set(D,!0))}var y=e.generateCoord,_=e.generateCoordCount,S=_!=null;_=y?_||1:0;var T=y||"value";function C(E){E.name==null&&(E.name=E.coordDim)}if(s)R(a,function(E){C(E)}),a.sort(function(E,D){return E.storeDimIndex-D.storeDimIndex});else for(var M=0;M<o;M++){var A=p(M),k=A.coordDim;k==null&&(A.coordDim=gte(T,i,S),A.coordDimIndex=0,(!y||_<=0)&&(A.isExtraCoord=!0),_--),C(A),A.type==null&&(hV(t,M)===Lr.Must||A.isExtraCoord&&(A.otherDims.itemName!=null||A.otherDims.seriesName!=null))&&(A.type="ordinal")}return vte(a),new SF({source:t,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function vte(t){for(var e=de(),r=0;r<t.length;r++){var n=t[r],i=n.name,a=e.get(i)||0;a>0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function pte(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return R(e,function(a){var o;be(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function gte(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var mte=function(){function t(e){this.coordSysDims=[],this.axisMap=de(),this.categoryAxisMap=de(),this.coordSysName=e}return t}();function yte(t){var e=t.get("coordinateSystem"),r=new mte(e),n=_te[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var _te={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",kt).models[0],a=t.getReferringComponents("yAxis",kt).models[0];e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Hu(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),Hu(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",kt).models[0];e.coordSysDims=["single"],r.set("single",i),Hu(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",kt).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Hu(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Hu(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),Hu(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(t,e,r,n){var i=t.getReferringComponents("matrix",kt).models[0];e.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function Hu(t){return t.get("type")==="category"}function MF(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;xte(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,c,h,f;if(R(a,function(_,S){se(_)&&(a[S]=_={name:_}),l&&!_.isExtraCoord&&(!n&&!u&&_.ordinalMeta&&(u=_),!c&&_.type!=="ordinal"&&_.type!=="time"&&(!i||i===_.coordDim)&&(c=_))}),c&&!n&&!u&&(n=!0),c){h="__\0ecstackresult_"+t.id,f="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,p=c.type,g=0;R(a,function(_){_.coordDim===d&&g++});var m={name:h,coordDim:d,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(f,p),y.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(m),o.appendCalculationDimension(y)):(a.push(m),a.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:f,stackResultDimension:h}}function xte(t){return!bF(t.schema)}function po(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function NM(t,e){return po(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Ste(t,e){var r=t.get("coordinateSystem"),n=Ch.get(r),i;return e&&e.coordSysDims&&(i=re(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=zy(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function bte(t,e,r){var n,i;return r&&R(t,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function ka(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;t?(a=!0,i=yM(t)):(i=n.getSource(),a=i.sourceFormat===jn);var o=yte(e),s=Ste(e,o),l=r.useEncodeDefaulter,u=me(l)?l:l?Ie(cV,s,e):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=Ph(i,c),f=bte(h.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(h),p=MF(e,{schema:h,store:d}),g=new Yr(h,e);g.setCalculationInfo(p);var m=f!=null&&wte(i)?function(y,_,S,T){return T===f?S:this.defaultDimValueGetter(y,_,S,T)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,m),g}function wte(t){if(t.sourceFormat===jn){var e=Tte(t.data||[]);return!ee(ph(e))}}function Tte(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}function nT(t){return t.type==="interval"||t.type==="log"}function Cte(t,e,r,n,i){var a={},o=a.interval=k2(e/r,!0);n!=null&&o<n&&(o=a.interval=n),i!=null&&o>i&&(o=a.interval=i);var s=a.intervalPrecision=cv(o),l=a.niceTickExtent=[Ht(Math.ceil(t[0]/o)*o,s),Ht(Math.floor(t[1]/o)*o,s)];return Mte(l,t),a}function I1(t){var e=Math.pow(10,W0(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ht(r*e)}function cv(t){return Li(t)+2}function nE(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function Mte(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),nE(t,0,e),nE(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function RM(t,e){return t>=e[0]&&t<=e[1]}var Ate=function(){function t(){this.normalize=iE,this.scale=aE}return t.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=le(e.normalize,e),this.scale=le(e.scale,e)):(this.normalize=iE,this.scale=aE)},t}();function iE(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function aE(t,e){return t*(e[1]-e[0])+e[0]}function iT(t,e,r){var n=Math.log(t);return[Math.log(r?e[0]:Math.max(0,e[0]))/n,Math.log(r?e[1]:Math.max(0,e[1]))/n]}var Is=function(){function t(e){this._calculator=new Ate,this._setting=e||{},this._extent=[1/0,-1/0];var r=Xt();r&&(this._brkCtx=r.createScaleBreakContext(),this._brkCtx.update(this._extent))}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype._innerUnionExtent=function(e){var r=this._extent;this._innerSetExtent(e[0]<r[0]?e[0]:r[0],e[1]>r[1]?e[1]:r[1])},t.prototype.unionExtentFromData=function(e,r){this._innerUnionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){this._innerSetExtent(e,r)},t.prototype._innerSetExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},t.prototype.setBreaksFromOption=function(e){var r=Xt();r&&this._innerSetBreak(r.parseAxisBreakOption(e,le(this.parse,this)))},t.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},t.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},t.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();U0(Is);var Lte=0,hv=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Lte,this._onCollect=e.onCollect}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&re(n,Pte);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!se(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,this._onCollect&&this._onCollect(e,r),r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r),this._onCollect&&this._onCollect(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=de(this.categories))},t}();function Pte(t){return be(t)&&t.value!=null?t.value:t+""}var rh=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new hv({})),ee(i)&&(i=new hv({categories:re(i,function(a){return be(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:se(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return RM(r,this._extent)&&r>=0&&r<this._ordinalMeta.categories.length},e.prototype.normalize=function(r){return r=this._getTickNumber(r),this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return r=Math.round(this._calculator.scale(r,this._extent)),this.getRawOrdinalNumber(r)},e.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},e.prototype.getMinorTicks=function(r){},e.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<l;++o){var u=n[o];i[o]=u,a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;i.push(c),a[c]=o}},e.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Is);Is.registerClass(rh);var Po=Ht,go=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},e.prototype.contain=function(r){return RM(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=cv(r)},e.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=Xt(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]<a[0]&&(r.expandToNicedExtent?l.push({value:Po(a[0]-n,o)}):l.push({value:i[0]}));for(var c=function(p,g){return Math.round((g-p)/n)},h=a[0];h<=a[1];){if(l.push({value:h}),h=Po(h+n,o),this._brkCtx){var f=this._brkCtx.calcNiceTickMultiple(h,c);f>=0&&(h=Po(h+f*n,o))}if(l.length>0&&h===l[l.length-1].value)break;if(l.length>u)return[]}var d=l.length?l[l.length-1].value:a[1];return i[1]>d&&(r.expandToNicedExtent?l.push({value:Po(d+n,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(r.pruneByBreak,l,this._brkCtx.breaks,function(p){return p.value},this._interval,this._extent),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;o<n.length;o++){var s=n[o],l=n[o-1];if(!(l.break||s.break)){for(var u=0,c=[],h=s.value-l.value,f=h/r,d=cv(f);u<r-1;){var p=Po(l.value+(u+1)*f,d);p>a[0]&&p<a[1]&&c.push(p),u++}var g=Xt();g&&g.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(m){return m},this._interval,a),i.push(c)}}return i},e.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=Li(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=Po(r.value,i,!0);return uM(a)},e.prototype.calcNiceTicks=function(r,n,i){r=r||5;var a=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,a.reverse(),this._innerSetExtent(a[0],a[1]),a=this._extent.slice());var s=Cte(a,o,r,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(r){var n=this._extent.slice();if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);r.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this._innerSetExtent(n[0],n[1]),n=this._extent.slice(),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval,s=this._intervalPrecision;r.fixMin||(n[0]=Po(Math.floor(n[0]/o)*o,s)),r.fixMax||(n[1]=Po(Math.ceil(n[1]/o)*o,s)),this._innerSetExtent(n[0],n[1])},e.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},e.type="interval",e}(Is);Is.registerClass(go);var AF=typeof Float32Array<"u",kte=AF?Float32Array:Array;function fa(t){return ee(t)?AF?new Float32Array(t):t:new kte(t)}var aT="__ec_stack_";function LF(t){return t.get("stack")||aT+t.seriesIndex}function OM(t){return t.dim+t.index}function Dte(t){var e=[],r=t.axis,n="axis0";if(r.type==="category"){for(var i=r.getBandWidth(),a=0;a<t.count;a++)e.push(Se({bandWidth:i,axisKey:n,stackId:aT+a},t));for(var o=DF(e),s=[],a=0;a<t.count;a++){var l=o[n][aT+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function PF(t,e){var r=[];return e.eachSeriesByType(t,function(n){NF(n)&&r.push(n)}),r}function Ite(t){var e={};R(t,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var h=l.getData(),f=c.dim+"_"+c.index,d=h.getDimensionIndex(h.mapDimension(c.dim)),p=h.getStore(),g=0,m=p.count();g<m;++g){var y=p.get(d,g);e[f]?e[f].push(y):e[f]=[y]}});var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(i){i.sort(function(l,u){return l-u});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function kF(t){var e=Ite(t),r=[];return R(t,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=e[l],c=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),f=Math.abs(h[1]-h[0]);s=u?c/f*u:c}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=oe(n.get("barWidth"),s),g=oe(n.get("barMaxWidth"),s),m=oe(n.get("barMinWidth")||(RF(n)?.5:1),s),y=n.get("barGap"),_=n.get("barCategoryGap"),S=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:m,barGap:y,barCategoryGap:_,defaultBarGap:S,axisKey:OM(a),stackId:LF(n)})}),DF(r)}function DF(t){var e={};R(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var h=n.barMaxWidth;h&&(l[u].maxWidth=h);var f=n.barMinWidth;f&&(l[u].minWidth=f);var d=n.barGap;d!=null&&(s.gap=d);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return R(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=$e(a).length;s=Math.max(35-l*4,15)+"%"}var u=oe(s,o),c=oe(n.gap,1),h=n.remainedWidth,f=n.autoWidthCount,d=(h-u)/(f+(f-1)*c);d=Math.max(d,0),R(a,function(y){var _=y.maxWidth,S=y.minWidth;if(y.width){var T=y.width;_&&(T=Math.min(T,_)),S&&(T=Math.max(T,S)),y.width=T,h-=T+c*T,f--}else{var T=d;_&&_<T&&(T=Math.min(_,h)),S&&S>T&&(T=S),T!==d&&(y.width=T,h-=T+c*T,f--)}}),d=(h-u)/(f+(f-1)*c),d=Math.max(d,0);var p=0,g;R(a,function(y,_){y.width||(y.width=d),g=y,p+=y.width*(1+c)}),g&&(p-=g.width*c);var m=-p/2;R(a,function(y,_){r[i][_]=r[i][_]||{bandWidth:o,offset:m,width:y.width},m+=y.width*(1+c)})}),r}function Ete(t,e,r){if(t&&e){var n=t[OM(e)];return n}}function IF(t,e){var r=PF(t,e),n=kF(r);R(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=LF(i),u=n[OM(s)][l],c=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:h})})}function EF(t){return{seriesType:t,plan:Mh(),reset:function(e){if(NF(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=e.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),h=po(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),f=a.isHorizontal(),d=Nte(i,a),p=RF(e),g=e.get("barMinHeight")||0,m=c&&r.getDimensionIndex(c),y=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(S,T){for(var C=S.count,M=p&&fa(C*3),A=p&&l&&fa(C*3),k=p&&fa(C),E=n.master.getRect(),D=f?E.width:E.height,I,z=T.getStore(),O=0;(I=S.next())!=null;){var V=z.get(h?m:o,I),G=z.get(s,I),F=d,U=void 0;h&&(U=+V-z.get(o,I));var j=void 0,W=void 0,H=void 0,X=void 0;if(f){var K=n.dataToPoint([V,G]);if(h){var ne=n.dataToPoint([U,G]);F=ne[0]}j=F,W=K[1]+_,H=K[0]-F,X=y,Math.abs(H)<g&&(H=(H<0?-1:1)*g)}else{var K=n.dataToPoint([G,V]);if(h){var ne=n.dataToPoint([G,U]);F=ne[1]}j=K[0]+_,W=F,H=y,X=K[1]-F,Math.abs(X)<g&&(X=(X<=0?-1:1)*g)}p?(M[O]=j,M[O+1]=W,M[O+2]=f?H:X,A&&(A[O]=f?E.x:j,A[O+1]=f?W:E.y,A[O+2]=D),k[I]=I):T.setItemLayout(I,{x:j,y:W,width:H,height:X}),O+=3}p&&T.setLayout({largePoints:M,largeDataIndices:k,largeBackgroundPoints:A,valueAxisHorizontal:f})}}}}}}function NF(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function RF(t){return t.pipelineContext&&t.pipelineContext.large}function Nte(t,e){var r=e.model.get("startValue");return r||(r=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?r>0?r:1:r))}var Rte=function(t,e,r,n){for(;r<n;){var i=r+n>>>1;t[i][1]<e?r=i+1:n=i}return r},zM=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="time",n}return e.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return Uv(r.value,qD[iQ(_d(this._minLevelUnit))]||qD.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return aQ(r,n,i,o,a)},e.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=Xt(),o=[];if(!n)return o;var s=this.getSetting("useUTC");if(a&&r.breakTicks==="only_break")return Xt().addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o;var l=wc(i[1],s);o.push({value:i[0],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}});var u=Gte(this._minLevelUnit,this._approxInterval,s,i,this._getExtentSpanWithBreaks(),this._brkCtx);o=o.concat(u);var c=wc(i[1],s);o.push({value:i[1],time:{level:0,upperTimeUnit:c,lowerTimeUnit:c}});var h=this.getSetting("useUTC"),f=Cn.length-1,d=0;return R(o,function(p){f=Math.min(f,Ee(Cn,p.time.upperTimeUnit)),d=Math.max(d,p.time.level)}),a&&Xt().pruneTicksByBreak(r.pruneByBreak,o,this._brkCtx.breaks,function(p){return p.value},this._approxInterval,this._extent),a&&r.breakTicks!=="none"&&Xt().addBreaksToTicks(o,this._brkCtx.breaks,this._extent,function(p){for(var g=Math.max(Ee(Cn,wc(p.vmin,h)),Ee(Cn,wc(p.vmax,h))),m=0,y=0;y<Cn.length;y++)if(!OF(Cn[y],p.vmin,p.vmax,h)){m=y;break}var _=Math.min(m,f),S=Math.max(_,g);return{level:d,lowerTimeUnit:Cn[S],upperTimeUnit:Cn[_]}}),o},e.prototype.calcNiceExtent=function(r){var n=this.getExtent();if(n[0]===n[1]&&(n[0]-=ri,n[1]+=ri),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-ri}this._innerSetExtent(n[0],n[1]),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},e.prototype.calcNiceTicks=function(r,n,i){r=r||10;var a=this._getExtentSpanWithBreaks();this._approxInterval=a/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var o=mg.length,s=Math.min(Rte(mg,this._approxInterval,0,o),o-1);this._interval=mg[s][1],this._intervalPrecision=cv(this._interval),this._minLevelUnit=mg[Math.max(s-1,0)][0]},e.prototype.parse=function(r){return qe(r)?r:+La(r)},e.prototype.contain=function(r){return RM(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.type="time",e}(go),mg=[["second",tM],["minute",rM],["hour",yd],["quarter-day",yd*6],["half-day",yd*12],["day",ri*1.2],["half-week",ri*3.5],["week",ri*7],["month",ri*31],["quarter",ri*95],["half-year",XD/2],["year",XD]];function OF(t,e,r,n){return My(new Date(e),t,n).getTime()===My(new Date(r),t,n).getTime()}function Ote(t,e){return t/=ri,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function zte(t){var e=30*ri;return t/=e,t>6?6:t>3?3:t>2?2:1}function Bte(t){return t/=yd,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function oE(t,e){return t/=e?rM:tM,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function jte(t){return k2(t,!0)}function Vte(t,e,r){var n=Math.max(0,Ee(Cn,e)-1);return My(new Date(t),Cn[n],r).getTime()}function Fte(t,e){var r=new Date(0);r[t](1);var n=r.getTime();r[t](1+e);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function Gte(t,e,r,n,i,a){var o=1e4,s=eQ,l=0;function u(O,V,G,F,U,j,W){for(var H=Fte(U,O),X=V,K=new Date(X);X<G&&X<=n[1]&&(W.push({value:X}),!(l++>o));)if(K[U](K[F]()+O),X=K.getTime(),a){var ne=a.calcNiceTickMultiple(X,H);ne>0&&(K[U](K[F]()+ne*O),X=K.getTime())}W.push({value:X,notAdd:!0})}function c(O,V,G){var F=[],U=!V.length;if(!OF(_d(O),n[0],n[1],r)){U&&(V=[{value:Vte(n[0],O,r)},{value:n[1]}]);for(var j=0;j<V.length-1;j++){var W=V[j].value,H=V[j+1].value;if(W!==H){var X=void 0,K=void 0,ne=void 0,ie=!1;switch(O){case"year":X=Math.max(1,Math.round(e/ri/365)),K=Hj(r),ne=oQ(r);break;case"half-year":case"quarter":case"month":X=zte(e),K=nM(r),ne=Wj(r);break;case"week":case"half-week":case"day":X=Ote(e),K=iM(r),ne=Uj(r),ie=!0;break;case"half-day":case"quarter-day":case"hour":X=Bte(e),K=aM(r),ne=Zj(r);break;case"minute":X=oE(e,!0),K=oM(r),ne=$j(r);break;case"second":X=oE(e,!1),K=sM(r),ne=Yj(r);break;case"millisecond":X=jte(e),K=lM(r),ne=Xj(r);break}H>=n[0]&&W<=n[1]&&u(X,W,H,K,ne,ie,F),O==="year"&&G.length>1&&j===0&&G.unshift({value:G[0].value-X})}}for(var j=0;j<F.length;j++)G.push(F[j])}}for(var h=[],f=[],d=0,p=0,g=0;g<s.length;++g){var m=_d(s[g]);if(nQ(s[g])){c(s[g],h[h.length-1]||[],f);var y=s[g+1]?_d(s[g+1]):null;if(m!==y){if(f.length){p=d,f.sort(function(O,V){return O.value-V.value});for(var _=[],S=0;S<f.length;++S){var T=f[S].value;(S===0||f[S-1].value!==T)&&(_.push(f[S]),T>=n[0]&&T<=n[1]&&d++)}var C=i/e;if(d>C*1.5&&p>C/1.5||(h.push(_),d>C||t===s[g]))break}f=[]}}}for(var M=tt(re(h,function(O){return tt(O,function(V){return V.value>=n[0]&&V.value<=n[1]&&!V.notAdd})}),function(O){return O.length>0}),A=[],k=M.length-1,g=0;g<M.length;++g)for(var E=M[g],D=0;D<E.length;++D){var I=wc(E[D].value,r);A.push({value:E[D].value,time:{level:k-g,upperTimeUnit:I,lowerTimeUnit:I}})}A.sort(function(O,V){return O.value-V.value});for(var z=[],g=0;g<A.length;++g)(g===0||A[g].value!==A[g-1].value)&&z.push(A[g]);return z}Is.registerClass(zM);var oT=Ht,Hte=Math.floor,Wte=Math.ceil,yg=Math.pow,_g=Math.log,zF=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new go,r}return e.prototype.getTicks=function(r){r=r||{};var n=this._extent.slice(),i=this._originalScale.getExtent(),a=t.prototype.getTicks.call(this,r),o=this.base,s=this._originalScale._innerGetBreaks(),l=Xt();return re(a,function(u){var c=u.value,h=null,f=yg(o,c);c===n[0]&&this._fixMin?h=i[0]:c===n[1]&&this._fixMax&&(h=i[1]);var d;if(l){var p=l.getTicksLogTransformBreak(u,o,s,xg);d=p.vBreak,h==null&&(h=p.brkRoundingCriterion)}return h!=null&&(f=xg(f,h)),{value:f,break:d}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(r,n){this._originalScale.setExtent(r,n);var i=iT(this.base,[r,n]);t.prototype.setExtent.call(this,i[0],i[1])},e.prototype.getExtent=function(){var r=this.base,n=t.prototype.getExtent.call(this);n[0]=yg(r,n[0]),n[1]=yg(r,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=xg(n[0],i[0])),this._fixMax&&(n[1]=xg(n[1],i[1])),n},e.prototype.unionExtentFromData=function(r,n){this._originalScale.unionExtentFromData(r,n);var i=iT(this.base,r.getApproximateExtent(n),!0);this._innerUnionExtent(i)},e.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent.slice(),i=this._getExtentSpanWithBreaks();if(!(!isFinite(i)||i<=0)){var a=G4(i),o=r/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[oT(Wte(n[0]/a)*a),oT(Hte(n[1]/a)*a)];this._interval=a,this._intervalPrecision=cv(a),this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){t.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.contain=function(r){return r=_g(r)/_g(this.base),t.prototype.contain.call(this,r)},e.prototype.normalize=function(r){return r=_g(r)/_g(this.base),t.prototype.normalize.call(this,r)},e.prototype.scale=function(r){return r=t.prototype.scale.call(this,r),yg(this.base,r)},e.prototype.setBreaksFromOption=function(r){var n=Xt();if(n){var i=n.logarithmicParseBreaksFromOption(r,this.base,le(this.parse,this)),a=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(a),this._innerSetBreak(o)}},e.type="log",e}(go);function xg(t,e){return oT(t,Li(e))}Is.registerClass(zF);var Ute=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var a=r.get("min",!0);a==null&&(a=r.get("startValue",!0));var o=this._modelMinRaw=a;me(o)?this._modelMinNum=Sg(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=Sg(e,o));var s=this._modelMaxRaw=r.get("max",!0);if(me(s)?this._modelMaxNum=Sg(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=Sg(e,s)),i)this._axisDataLen=r.getCategories().length;else{var l=r.get("boundaryGap"),u=ee(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Bi(u[0],1),Bi(u[1],1)]}},t.prototype.calculate=function(){var e=this._isOrdinal,r=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=e?null:n-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=e?i?0:NaN:r-a[0]*o),l==null&&(l=e?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var h=Ir(s)||Ir(l)||e&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var f=this._determinedMin,d=this._determinedMax;return f!=null&&(s=f,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:h}},t.prototype.modifyDataMinMax=function(e,r){this[$te[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=Zte[e];this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),Zte={min:"_determinedMin",max:"_determinedMax"},$te={min:"_dataMin",max:"_dataMax"};function BF(t,e,r){var n=t.rawExtentInfo;return n||(n=new Ute(t,e,r),t.rawExtentInfo=n,n)}function Sg(t,e){return e==null?null:Ir(e)?NaN:t.parse(e)}function jF(t,e){var r=t.type,n=BF(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=PF("bar",o),l=!1;if(R(s,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=kF(s),c=Yte(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function Yte(t,e,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=Ete(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;R(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;R(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,h=1-(s+l)/a,f=c/h-c;return e+=f*(l/u),t-=f*(s/u),{min:t,max:e}}function tu(t,e){var r=e,n=jF(t,r),i=n.extent,a=r.get("splitNumber");t instanceof zF&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setBreaksFromOption(FF(r)),t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function Yv(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new rh({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new zM({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Is.getClass(e)||go)}}function Xte(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function kh(t){var e=t.getLabelModel().get("formatter");if(t.type==="time"){var r=tQ(e);return function(i,a){return t.scale.getFormattedLabel(i,a,r)}}else{if(se(e))return function(i){var a=t.scale.getLabel(i),o=e.replace("{value}",a??"");return o};if(me(e)){if(t.type==="category")return function(i,a){return e(By(t,i),i.value-t.scale.getExtent()[0],null)};var n=Xt();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),e(By(t,i),a,o)}}else return function(i){return t.scale.getLabel(i)}}}function By(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function BM(t){var e=t.get("interval");return e??"auto"}function VF(t){return t.type==="category"&&BM(t.getLabelModel())===0}function jy(t,e){var r={};return R(t.mapDimensionsAll(e),function(n){r[NM(t,n)]=!0}),$e(r)}function qte(t,e,r){e&&R(jy(e,r),function(n){var i=e.getApproximateExtent(n);i[0]<t[0]&&(t[0]=i[0]),i[1]>t[1]&&(t[1]=i[1])})}function nh(t){return t==="middle"||t==="center"}function fv(t){return t.getShallow("show")}function FF(t){var e=t.get("breaks",!0);if(e!=null)return!Xt()||!Kte(t.axis)?void 0:e}function Kte(t){return(t.dim==="x"||t.dim==="y"||t.dim==="z"||t.dim==="single")&&t.type!=="category"}var Dh=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}();function Qte(t){return ka(null,t)}var Jte={isDimensionStacked:po,enableDataStack:MF,getStackedDimension:NM};function ere(t,e){var r=e;e instanceof We||(r=new We(e));var n=Yv(r);return n.setExtent(t[0],t[1]),tu(n,r),n}function tre(t){Bt(t,Dh)}function rre(t,e){return e=e||{},pt(t,null,null,e.state!=="normal")}const nre=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:dte,createList:Qte,createScale:ere,createSymbol:Ut,createTextStyle:rre,dataStack:Jte,enableHoverEmphasis:us,getECData:Le,getLayoutRect:bt,mixinAxisModelCommonMethods:tre},Symbol.toStringTag,{value:"Module"}));var ire=1e-8;function sE(t,e){return Math.abs(t-e)<ire}function yl(t,e,r){var n=0,i=t[0];if(!i)return!1;for(var a=1;a<t.length;a++){var o=t[a];n+=Ga(i[0],i[1],o[0],o[1],e,r),i=o}var s=t[0];return(!sE(i[0],s[0])||!sE(i[1],s[1]))&&(n+=Ga(i[0],i[1],s[0],s[1],e,r)),n!==0}var are=[];function E1(t,e){for(var r=0;r<t.length;r++)Ot(t[r],t[r],e)}function lE(t,e,r,n){for(var i=0;i<t.length;i++){var a=t[i];n&&(a=n.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(Ya(e,e,a),Xa(r,r,a))}}function ore(t){for(var e=0,r=0,n=0,i=t.length,a=t[i-1][0],o=t[i-1][1],s=0;s<i;s++){var l=t[s][0],u=t[s][1],c=a*u-l*o;e+=c,r+=(a+l)*c,n+=(o+u)*c,a=l,o=u}return e?[r/e/3,n/e/3,e]:[t[0][0]||0,t[0][1]||0]}var GF=function(){function t(e){this.name=e}return t.prototype.setCenter=function(e){this._center=e},t.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},t}(),uE=function(){function t(e,r){this.type="polygon",this.exterior=e,this.interiors=r}return t}(),cE=function(){function t(e){this.type="linestring",this.points=e}return t}(),HF=function(t){Y(e,t);function e(r,n,i){var a=t.call(this,r)||this;return a.type="geoJSON",a.geometries=n,a._center=i&&[i[0],i[1]],a}return e.prototype.calcCenter=function(){for(var r=this.geometries,n,i=0,a=0;a<r.length;a++){var o=r[a],s=o.exterior,l=s&&s.length;l>i&&(n=o,i=l)}if(n)return ore(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.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 R(o,function(s){s.type==="polygon"?lE(s.exterior,i,a,r):R(s.points,function(l){lE(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 Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},e.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;e:for(var a=0,o=i.length;a<o;a++){var s=i[a];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(yl(l,r[0],r[1])){for(var c=0;c<(u?u.length:0);c++)if(yl(u[c],r[0],r[1]))continue e;return!0}}}return!1},e.prototype.transformTo=function(r,n,i,a){var o=this.getBoundingRect(),s=o.width/o.height;i?a||(a=i/s):i=s*a;for(var l=new Ce(r,n,i,a),u=o.calculateTransform(l),c=this.geometries,h=0;h<c.length;h++){var f=c[h];f.type==="polygon"?(E1(f.exterior,u),R(f.interiors,function(d){E1(d,u)})):R(f.points,function(d){E1(d,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(r){r==null&&(r=this.name);var n=new e(r,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},e}(GF),sre=function(t){Y(e,t);function e(r,n){var i=t.call(this,r)||this;return i.type="geoSVG",i._elOnlyForCalculate=n,i}return e.prototype.calcCenter=function(){for(var r=this._elOnlyForCalculate,n=r.getBoundingRect(),i=[n.x+n.width/2,n.y+n.height/2],a=zv(are),o=r;o&&!o.isGeoSVGGraphicRoot;)Ii(a,o.getLocalTransform(),a),o=o.parent;return hi(a,a),Ot(i,i,a),i},e}(GF);function lre(t){if(!t.UTF8Encoding)return t;var e=t,r=e.UTF8Scale;r==null&&(r=1024);var n=e.features;return R(n,function(i){var a=i.geometry,o=a.encodeOffsets,s=a.coordinates;if(o)switch(a.type){case"LineString":a.coordinates=WF(s,o,r);break;case"Polygon":N1(s,o,r);break;case"MultiLineString":N1(s,o,r);break;case"MultiPolygon":R(s,function(l,u){return N1(l,o[u],r)})}}),e.UTF8Encoding=!1,e}function N1(t,e,r){for(var n=0;n<t.length;n++)t[n]=WF(t[n],e[n],r)}function WF(t,e,r){for(var n=[],i=e[0],a=e[1],o=0;o<t.length;o+=2){var s=t.charCodeAt(o)-64,l=t.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function sT(t,e){return t=lre(t),re(tt(t.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 uE(o[0],o.slice(1)));break;case"MultiPolygon":R(i.coordinates,function(l){l[0]&&a.push(new uE(l[0],l.slice(1)))});break;case"LineString":a.push(new cE([i.coordinates]));break;case"MultiLineString":a.push(new cE(i.coordinates))}var s=new HF(n[e||"name"],a,n.cp);return s.properties=n,s})}const ure=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:Sw,asc:Dn,getPercentWithPrecision:LX,getPixelPrecision:L2,getPrecision:Li,getPrecisionSafe:V4,isNumeric:D2,isRadianAroundZero:qc,linearMap:it,nice:k2,numericToNumber:wa,parseDate:La,parsePercent:oe,quantile:mm,quantity:G4,quantityExponent:W0,reformIntervals:bw,remRadian:P2,round:Ht},Symbol.toStringTag,{value:"Module"})),cre=Object.freeze(Object.defineProperty({__proto__:null,format:Uv,parse:La,roundTime:My},Symbol.toStringTag,{value:"Module"})),hre=Object.freeze(Object.defineProperty({__proto__:null,Arc:Gv,BezierCurve:_h,BoundingRect:Ce,Circle:Pa,CompoundPath:Hv,Ellipse:Fv,Group:_e,Image:pr,IncrementalDisplayable:Lj,Line:Wt,LinearGradient:uu,Polygon:zr,Polyline:Tr,RadialGradient:W2,Rect:Be,Ring:yh,Sector:Or,Text:Xe,clipPointsByRect:Y2,clipRectByRect:Ej,createIcon:Sh,extendPath:Dj,extendShape:kj,getShapeClass:nv,getTransform:cs,initProps:St,makeImage:Z2,makePath:Qc,mergePath:Ln,registerShape:pi,resizePath:$2,updateProps:Qe},Symbol.toStringTag,{value:"Module"})),fre=Object.freeze(Object.defineProperty({__proto__:null,addCommas:uM,capitalFirst:cQ,encodeHTML:Zr,formatTime:uQ,formatTpl:hM,getTextRect:sQ,getTooltipMarker:qj,normalizeCssArray:Th,toCamelCase:cM,truncateText:sq},Symbol.toStringTag,{value:"Module"})),dre=Object.freeze(Object.defineProperty({__proto__:null,bind:le,clone:ye,curry:Ie,defaults:Se,each:R,extend:J,filter:tt,indexOf:Ee,inherits:x2,isArray:ee,isFunction:me,isObject:be,isString:se,map:re,merge:Ne,reduce:ci},Symbol.toStringTag,{value:"Module"}));var vre=Fe(),Sd=Fe(),ji={estimate:1,determine:2};function Vy(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function UF(t,e){var r=re(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function pre(t,e){var r=t.getLabelModel().get("customValues");if(r){var n=kh(t),i=t.scale.getExtent(),a=UF(t,r),o=tt(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:re(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:t.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return t.type==="category"?mre(t,e):_re(t)}function gre(t,e,r){var n=t.getTickModel().get("customValues");if(n){var i=t.scale.getExtent(),a=UF(t,n);return{ticks:tt(a,function(o){return o>=i[0]&&o<=i[1]})}}return t.type==="category"?yre(t,e):{ticks:re(t.scale.getTicks(r),function(o){return o.value})}}function mre(t,e){var r=t.getLabelModel(),n=ZF(t,r,e);return!r.get("show")||t.scale.isBlank()?{labels:[]}:n}function ZF(t,e,r){var n=Sre(t),i=BM(e),a=r.kind===ji.estimate;if(!a){var o=YF(n,i);if(o)return o}var s,l;me(i)?s=KF(t,i):(l=i==="auto"?bre(t,r):i,s=qF(t,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return lT(n,i,u),!0}):lT(n,i,u),u}function yre(t,e){var r=xre(t),n=BM(e),i=YF(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),me(n))a=KF(t,n,!0);else if(n==="auto"){var s=ZF(t,t.getLabelModel(),Vy(ji.determine));o=s.labelCategoryInterval,a=re(s.labels,function(l){return l.tickValue})}else o=n,a=qF(t,o,!0);return lT(r,n,{ticks:a,tickCategoryInterval:o})}function _re(t){var e=t.scale.getTicks(),r=kh(t);return{labels:re(e,function(n,i){return{formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var xre=$F("axisTick"),Sre=$F("axisLabel");function $F(t){return function(r){return Sd(r)[t]||(Sd(r)[t]={list:[]})}}function YF(t,e){for(var r=0;r<t.list.length;r++)if(t.list[r].key===e)return t.list[r].value}function lT(t,e,r){return t.list.push({key:e,value:r}),r}function bre(t,e){if(e.kind===ji.estimate){var r=t.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return Sd(t).autoInterval=r,!0}),r}var n=Sd(t).autoInterval;return n??(Sd(t).autoInterval=t.calculateCategoryInterval(e))}function wre(t,e){var r=e.kind,n=Cre(t),i=kh(t),a=(n.axisRotate-n.labelRotate)/180*Math.PI,o=t.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,c=40;l>c&&(u=Math.max(1,Math.floor(l/c)));for(var h=s[0],f=t.dataToCoord(h+1)-t.dataToCoord(h),d=Math.abs(f*Math.cos(a)),p=Math.abs(f*Math.sin(a)),g=0,m=0;h<=s[1];h+=u){var y=0,_=0,S=G0(i({value:h}),n.font,"center","top");y=S.width*1.3,_=S.height*1.3,g=Math.max(g,y,7),m=Math.max(m,_,7)}var T=g/d,C=m/p;isNaN(T)&&(T=1/0),isNaN(C)&&(C=1/0);var M=Math.max(0,Math.floor(Math.min(T,C)));if(r===ji.estimate)return e.out.noPxChangeTryDetermine.push(le(Tre,null,t,M,l)),M;var A=XF(t,M,l);return A??M}function Tre(t,e,r){return XF(t,e,r)==null}function XF(t,e,r){var n=vre(t.model),i=t.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-e)<=1&&Math.abs(o-r)<=1&&a>e&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=e,n.axisExtent0=i[0],n.axisExtent1=i[1]}function Cre(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function qF(t,e,r){var n=kh(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=VF(t),f=o.get("showMinLabel")||h,d=o.get("showMaxLabel")||h;f&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);d&&p-l!==a[1]&&g(a[1]);function g(m){var y={value:m};s.push(r?m:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:m,time:void 0,break:void 0})}return s}function KF(t,e,r){var n=t.scale,i=kh(t),a=[];return R(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var hE=[0,1],gi=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return L2(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),fE(n,i.count())),it(e,hE,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),fE(n,i.count()));var a=it(e,n,hE,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=gre(this,r,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),i=n.ticks,a=re(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return Mre(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=re(n,function(a){return re(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(e){return e=e||Vy(ji.determine),pre(this,e).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(e){return e=e||Vy(ji.determine),wre(this,e)},t}();function fE(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function Mre(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],e[0].onBand=!0,o=e[1]={coord:a[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;R(e,function(d){d.coord-=u/2,d.onBand=!0});var c=t.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var h=a[0]>a[1];f(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&f(a[0],e[0].coord)&&e.unshift({coord:a[0],onBand:!0}),f(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&f(o.coord,a[1])&&e.push({coord:a[1],onBand:!0});function f(d,p){return d=Ht(d),p=Ht(p),h?d>p:d<p}}function Are(t){var e=Ve.extend(t);return Ve.registerClass(e),e}function Lre(t){var e=mt.extend(t);return mt.registerClass(e),e}function Pre(t){var e=dt.extend(t);return dt.registerClass(e),e}function kre(t){var e=lt.extend(t);return lt.registerClass(e),e}var yf=Math.PI*2,ol=Ta.CMD,Dre=["top","right","bottom","left"];function Ire(t,e,r,n,i){var a=r.width,o=r.height;switch(t){case"top":n.set(r.x+a/2,r.y-e),i.set(0,-1);break;case"bottom":n.set(r.x+a/2,r.y+o+e),i.set(0,1);break;case"left":n.set(r.x-e,r.y+o/2),i.set(-1,0);break;case"right":n.set(r.x+a+e,r.y+o/2),i.set(1,0);break}}function Ere(t,e,r,n,i,a,o,s,l){o-=t,s-=e;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*r+t,h=s*r+e;if(Math.abs(n-i)%yf<1e-4)return l[0]=c,l[1]=h,u-r;if(a){var f=n;n=In(i),i=In(f)}else n=In(n),i=In(i);n>i&&(i+=yf);var d=Math.atan2(s,o);if(d<0&&(d+=yf),d>=n&&d<=i||d+yf>=n&&d+yf<=i)return l[0]=c,l[1]=h,u-r;var p=r*Math.cos(n)+t,g=r*Math.sin(n)+e,m=r*Math.cos(i)+t,y=r*Math.sin(i)+e,_=(p-o)*(p-o)+(g-s)*(g-s),S=(m-o)*(m-o)+(y-s)*(y-s);return _<S?(l[0]=p,l[1]=g,Math.sqrt(_)):(l[0]=m,l[1]=y,Math.sqrt(S))}function Fy(t,e,r,n,i,a,o,s){var l=i-t,u=a-e,c=r-t,h=n-e,f=Math.sqrt(c*c+h*h);c/=f,h/=f;var d=l*c+u*h,p=d/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var g=o[0]=t+p*c,m=o[1]=e+p*h;return Math.sqrt((g-i)*(g-i)+(m-a)*(m-a))}function QF(t,e,r,n,i,a,o){r<0&&(t=t+r,r=-r),n<0&&(e=e+n,n=-n);var s=t+r,l=e+n,u=o[0]=Math.min(Math.max(i,t),s),c=o[1]=Math.min(Math.max(a,e),l);return Math.sqrt((u-i)*(u-i)+(c-a)*(c-a))}var Ci=[];function Nre(t,e,r){var n=QF(e.x,e.y,e.width,e.height,t.x,t.y,Ci);return r.set(Ci[0],Ci[1]),n}function Rre(t,e,r){for(var n=0,i=0,a=0,o=0,s,l,u=1/0,c=e.data,h=t.x,f=t.y,d=0;d<c.length;){var p=c[d++];d===1&&(n=c[d],i=c[d+1],a=n,o=i);var g=u;switch(p){case ol.M:a=c[d++],o=c[d++],n=a,i=o;break;case ol.L:g=Fy(n,i,c[d],c[d+1],h,f,Ci,!0),n=c[d++],i=c[d++];break;case ol.C:g=x4(n,i,c[d++],c[d++],c[d++],c[d++],c[d],c[d+1],h,f,Ci),n=c[d++],i=c[d++];break;case ol.Q:g=b4(n,i,c[d++],c[d++],c[d],c[d+1],h,f,Ci),n=c[d++],i=c[d++];break;case ol.A:var m=c[d++],y=c[d++],_=c[d++],S=c[d++],T=c[d++],C=c[d++];d+=1;var M=!!(1-c[d++]);s=Math.cos(T)*_+m,l=Math.sin(T)*S+y,d<=1&&(a=s,o=l);var A=(h-m)*S/_+m;g=Ere(m,y,S,T,T+C,M,A,f,Ci),n=Math.cos(T+C)*_+m,i=Math.sin(T+C)*S+y;break;case ol.R:a=n=c[d++],o=i=c[d++];var k=c[d++],E=c[d++];g=QF(a,o,k,E,h,f,Ci);break;case ol.Z:g=Fy(n,i,a,o,h,f,Ci,!0),n=a,i=o;break}g<u&&(u=g,r.set(Ci[0],Ci[1]))}return u}var Pi=new Te,_t=new Te,Ft=new Te,da=new Te,ua=new Te;function dE(t,e){if(t){var r=t.getTextGuideLine(),n=t.getTextContent();if(n&&r){var i=t.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||Dre,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=i.anchor,c=t.getComputedTransform(),h=c&&hi([],c),f=e.get("length2")||0;u&&Ft.copy(u);for(var d=0;d<o.length;d++){var p=o[d];Ire(p,0,s,Pi,da),Te.scaleAndAdd(_t,Pi,da,f),_t.transform(h);var g=t.getBoundingRect(),m=u?u.distance(_t):t instanceof Ue?Rre(_t,t.path,Ft):Nre(_t,g,Ft);m<l&&(l=m,_t.transform(c),Ft.transform(c),Ft.toArray(a[0]),_t.toArray(a[1]),Pi.toArray(a[2]))}JF(a,e.get("minTurnAngle")),r.setShape({points:a})}}}var Gy=[],nn=new Te;function JF(t,e){if(e<=180&&e>0){e=e/180*Math.PI,Pi.fromArray(t[0]),_t.fromArray(t[1]),Ft.fromArray(t[2]),Te.sub(da,Pi,_t),Te.sub(ua,Ft,_t);var r=da.len(),n=ua.len();if(!(r<.001||n<.001)){da.scale(1/r),ua.scale(1/n);var i=da.dot(ua),a=Math.cos(e);if(a<i){var o=Fy(_t.x,_t.y,Ft.x,Ft.y,Pi.x,Pi.y,Gy,!1);nn.fromArray(Gy),nn.scaleAndAdd(ua,o/Math.tan(Math.PI-e));var s=Ft.x!==_t.x?(nn.x-_t.x)/(Ft.x-_t.x):(nn.y-_t.y)/(Ft.y-_t.y);if(isNaN(s))return;s<0?Te.copy(nn,_t):s>1&&Te.copy(nn,Ft),nn.toArray(t[1])}}}}function Ore(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,Pi.fromArray(t[0]),_t.fromArray(t[1]),Ft.fromArray(t[2]),Te.sub(da,_t,Pi),Te.sub(ua,Ft,_t);var n=da.len(),i=ua.len();if(!(n<.001||i<.001)){da.scale(1/n),ua.scale(1/i);var a=da.dot(e),o=Math.cos(r);if(a<o){var s=Fy(_t.x,_t.y,Ft.x,Ft.y,Pi.x,Pi.y,Gy,!1);nn.fromArray(Gy);var l=Math.PI/2,u=Math.acos(ua.dot(e)),c=l+u-r;if(c>=l)Te.copy(nn,Ft);else{nn.scaleAndAdd(ua,s/Math.tan(Math.PI/2-c));var h=Ft.x!==_t.x?(nn.x-_t.x)/(Ft.x-_t.x):(nn.y-_t.y)/(Ft.y-_t.y);if(isNaN(h))return;h<0?Te.copy(nn,_t):h>1&&Te.copy(nn,Ft)}nn.toArray(t[1])}}}}function R1(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;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?t.useStyle(s):a.style=s}function zre(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=$a(n[0],n[1]),a=$a(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=hd([],n[1],n[0],o/i),l=hd([],n[1],n[2],o/a),u=hd([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)t.lineTo(n[c][0],n[c][1])}function jM(t,e,r){var n=t.getTextGuideLine(),i=t.getTextContent();if(!i){n&&t.removeTextGuideLine();return}for(var a=e.normal,o=a.get("show"),s=i.ignore,l=0;l<tv.length;l++){var u=tv[l],c=e[u],h=u==="normal";if(c){var f=c.get("show"),d=h?s:pe(i.states[u]&&i.states[u].ignore,s);if(d||!pe(f,o)){var p=h?n:n&&n.states[u];p&&(p.ignore=!0),n&&R1(n,!0,u,c);continue}n||(n=new Tr,t.setTextGuideLine(n),!h&&(s||!o)&&R1(n,!0,"normal",e.normal),t.stateProxy&&(n.stateProxy=t.stateProxy)),R1(n,!1,u,c)}}if(n){Se(n.style,r),n.style.fill=null;var g=a.get("showAbove"),m=t.textGuideLineConfig=t.textGuideLineConfig||{};m.showAbove=g||!1,n.buildPath=zre}}function VM(t,e){e=e||"labelLine";for(var r={normal:t.getModel(e)},n=0;n<ln.length;n++){var i=ln[n];r[i]=t.getModel([i,e])}return r}var vE=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],Bre=1,Hy=2,eG=Bre|Hy;function Wy(t,e,r){r=r||eG,e?t.dirty|=r:t.dirty&=~r}function tG(t,e){return e=e||eG,t.dirty==null||!!(t.dirty&e)}function Ma(t){if(t)return tG(t)&&rG(t,t.label,t),t}function rG(t,e,r){var n=e.getComputedTransform();t.transform=q2(t.transform,n);var i=t.localRect=iv(t.localRect,e.getBoundingRect()),a=e.style,o=a.margin,s=r&&r.marginForce,l=r&&r.minMarginForce,u=r&&r.marginDefault,c=a.__marginType;c==null&&u&&(o=u,c=bc.textMargin);for(var h=0;h<4;h++)O1[h]=c===bc.minMargin&&l&&l[h]!=null?l[h]:s&&s[h]!=null?s[h]:o?o[h]:0;c===bc.textMargin&&Ql(i,O1,!1,!1);var f=t.rect=iv(t.rect,i);return n&&f.applyTransform(n),c===bc.minMargin&&Ql(f,O1,!1,!1),t.axisAligned=X2(n),(t.label=t.label||{}).ignore=e.ignore,Wy(t,!1),Wy(t,!0,Hy),t}var O1=[0,0,0,0];function jre(t,e,r){return t.transform=q2(t.transform,r),t.localRect=iv(t.localRect,e),t.rect=iv(t.rect,e),r&&t.rect.applyTransform(r),t.axisAligned=X2(r),t.obb=void 0,(t.label=t.label||{}).ignore=!1,t}function uT(t,e){if(t){t.label.x+=e.x,t.label.y+=e.y,t.label.markRedraw();var r=t.transform;r&&(r[4]+=e.x,r[5]+=e.y);var n=t.rect;n&&(n.x+=e.x,n.y+=e.y);var i=t.obb;i&&i.fromBoundingRect(t.localRect,r)}}function cT(t,e){for(var r=0;r<vE.length;r++){var n=vE[r];t[n]==null&&(t[n]=e[n])}return Ma(t)}function pE(t){var e=t.obb;return(!e||tG(t,Hy))&&(t.obb=e=e||new Aj,e.fromBoundingRect(t.localRect,t.transform),Wy(t,!1,Hy)),e}function hT(t,e,r,n,i){var a=t.length,o=De[e],s=qt[e];if(a<2)return!1;t.sort(function(A,k){return A.rect[o]-k.rect[o]});for(var l=0,u,c=!1,h=0;h<a;h++){var f=t[h],d=f.rect;u=d[o]-l,u<0&&(d[o]-=u,f.label[o]-=u,c=!0),l=d[o]+d[s]}var p=t[0],g=t[a-1],m,y;_(),m<0&&C(-m,.8),y<0&&C(y,.8),_(),S(m,y,1),S(y,m,-1),_(),m<0&&M(-m),y<0&&M(y);function _(){m=p.rect[o]-r,y=n-g.rect[o]-g.rect[s]}function S(A,k,E){if(A<0){var D=Math.min(k,-A);if(D>0){T(D*E,0,a);var I=D+A;I<0&&C(-I*E,1)}else C(-A*E,1)}}function T(A,k,E){A!==0&&(c=!0);for(var D=k;D<E;D++){var I=t[D],z=I.rect;z[o]+=A,I.label[o]+=A}}function C(A,k){for(var E=[],D=0,I=1;I<a;I++){var z=t[I-1].rect,O=Math.max(t[I].rect[o]-z[o]-z[s],0);E.push(O),D+=O}if(D){var V=Math.min(Math.abs(A)/D,k);if(A>0)for(var I=0;I<a-1;I++){var G=E[I]*V;T(G,0,I+1)}else for(var I=a-1;I>0;I--){var G=E[I-1]*V;T(-G,I,a)}}}function M(A){var k=A<0?-1:1;A=Math.abs(A);for(var E=Math.ceil(A/(a-1)),D=0;D<a-1;D++)if(k>0?T(E,0,D+1):T(-E,a-D-1,a),A-=E,A<=0)return}return c}function Vre(t){for(var e=0;e<t.length;e++){var r=t[e],n=r.defaultAttr,i=r.labelLine;r.label.attr("ignore",n.ignore),i&&i.attr("ignore",n.labelGuideIgnore)}}function nG(t){var e=[];t.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function r(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var n=0;n<t.length;n++){var i=Ma(t[n]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,l=0;l<e.length;l++)if(u_(i,e[l],null,{touchThreshold:.05})){s=!0;break}s?(r(a),o&&r(o)):e.push(i)}}}function u_(t,e,r,n){return!t||!e||t.label&&t.label.ignore||e.label&&e.label.ignore||!t.rect.intersect(e.rect,r,n)?!1:t.axisAligned&&e.axisAligned?!0:pE(t).intersect(pE(e),r,n)}function Fre(t){if(t){for(var e=[],r=0;r<t.length;r++)e.push(t[r].slice());return e}}function Gre(t,e){var r=t.label,n=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:r.style.align,verticalAlign:r.style.verticalAlign,labelLinePoints:Fre(n&&n.shape.points)}}var gE=["align","verticalAlign","width","height","fontSize"],Jr=new qa,z1=Fe(),Hre=Fe();function bg(t,e,r){for(var n=0;n<r.length;n++){var i=r[n];e[i]!=null&&(t[i]=e[i])}}var wg=["x","y","rotation"],Wre=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(e,r,n,i,a){var o=i.style,s=i.__hostTarget,l=s.textConfig||{},u=i.getComputedTransform(),c=i.getBoundingRect().plain();Ce.applyTransform(c,c,u),u?Jr.setLocalTransform(u):(Jr.x=Jr.y=Jr.rotation=Jr.originX=Jr.originY=0,Jr.scaleX=Jr.scaleY=1),Jr.rotation=In(Jr.rotation);var h=i.__hostTarget,f;if(h){f=h.getBoundingRect().plain();var d=h.getComputedTransform();Ce.applyTransform(f,f,d)}var p=f&&h.getTextGuideLine();this._labelList.push({label:i,labelLine:p,seriesModel:n,dataIndex:e,dataType:r,layoutOptionOrCb:a,layoutOption:null,rect:c,hostRect:f,priority:f?f.width*f.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:p&&p.ignore,x:Jr.x,y:Jr.y,scaleX:Jr.scaleX,scaleY:Jr.scaleY,rotation:Jr.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:l.position,attachedRot:l.rotation}})},t.prototype.addLabelsOfSeries=function(e){var r=this;this._chartViewList.push(e);var n=e.__model,i=n.get("labelLayout");(me(i)||$e(i).length)&&e.group.traverse(function(a){if(a.ignore)return!0;var o=a.getTextContent(),s=Le(a);o&&!o.disableLabelLayout&&r._addLabel(s.dataIndex,s.dataType,n,o,i)})},t.prototype.updateLayoutConfig=function(e){var r=e.getWidth(),n=e.getHeight();function i(S,T){return function(){dE(S,T)}}for(var a=0;a<this._labelList.length;a++){var o=this._labelList[a],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;me(o.layoutOptionOrCb)?c=o.layoutOptionOrCb(Gre(o,l)):c=o.layoutOptionOrCb,c=c||{},o.layoutOption=c;var h=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*h:u.attachedRot,offset:[c.dx||0,c.dy||0]});var f=!1;if(c.x!=null?(s.x=oe(c.x,r),s.setStyle("x",0),f=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=oe(c.y,n),s.setStyle("y",0),f=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var d=l.getTextGuideLine();d&&(d.setShape({points:c.labelLinePoints}),f=!1)}var p=z1(s);p.needsUpdateLabelLine=f,s.rotation=c.rotate!=null?c.rotate*h:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var g=0;g<gE.length;g++){var m=gE[g];s.setStyle(m,c[m]!=null?c[m]:u.style[m])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var y=o.seriesModel;if(o.dataIndex!=null){var _=o.seriesModel.getData(o.dataType);y=_.getItemModel(o.dataIndex)}s.on("drag",i(l,y.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},t.prototype.layout=function(e){var r=e.getWidth(),n=e.getHeight(),i=[];R(this._labelList,function(l){l.defaultAttr.ignore||i.push(cT({},l))});var a=tt(i,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=tt(i,function(l){return l.layoutOption.moveOverlap==="shiftY"});hT(a,0,0,r),hT(o,1,0,n);var s=tt(i,function(l){return l.layoutOption.hideOverlap});Vre(s),nG(s)},t.prototype.processLabelsOverall=function(){var e=this;R(this._chartViewList,function(r){var n=r.__model,i=r.ignoreLabelLineUpdate,a=n.isAnimationEnabled();r.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,l=o.getTextContent();!s&&l&&(s=z1(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),a&&e._animateLabels(o,n)})})},t.prototype._updateLabelLine=function(e,r){var n=e.getTextContent(),i=Le(e),a=i.dataIndex;if(n&&a!=null){var o=r.getData(i.dataType),s=o.getItemModel(a),l={},u=o.getItemVisual(a,"style");if(u){var c=o.getVisual("drawType");l.stroke=u[c]}var h=s.getModel("labelLine");jM(e,VM(s),l),dE(e,h)}},t.prototype._animateLabels=function(e,r){var n=e.getTextContent(),i=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!Rc(e))){var a=z1(n),o=a.oldLayout,s=Le(e),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},c=r.getData(s.dataType);if(o){n.attr(o);var f=e.prevStates;f&&(Ee(f,"select")>=0&&n.attr(a.oldLayoutSelect),Ee(f,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Qe(n,u,r,l)}else if(n.attr(u),!bh(n).valueAnimation){var h=pe(n.style.opacity,1);n.style.opacity=0,St(n,{style:{opacity:h}},r,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};bg(d,u,wg),bg(d,n.states.select,wg)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};bg(p,u,wg),bg(p,n.states.emphasis,wg)}jj(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=Hre(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Qe(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,St(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},t}(),B1=Fe();function Ure(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=B1(r).labelManager;i||(i=B1(r).labelManager=new Wre),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=B1(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var j1=Math.sin,V1=Math.cos,iG=Math.PI,sl=Math.PI*2,Zre=180/iG,aG=function(){function t(){}return t.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},t.prototype.moveTo=function(e,r){this._add("M",e,r)},t.prototype.lineTo=function(e,r){this._add("L",e,r)},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){this._add("C",e,r,n,i,a,o)},t.prototype.quadraticCurveTo=function(e,r,n,i){this._add("Q",e,r,n,i)},t.prototype.arc=function(e,r,n,i,a,o){this.ellipse(e,r,n,n,0,i,a,o)},t.prototype.ellipse=function(e,r,n,i,a,o,s,l){var u=s-o,c=!l,h=Math.abs(u),f=$o(h-sl)||(c?u>=sl:-u>=sl),d=u>0?u%sl:u%sl+sl,p=!1;f?p=!0:$o(h)?p=!1:p=d>=iG==!!c;var g=e+n*V1(o),m=r+i*j1(o);this._start&&this._add("M",g,m);var y=Math.round(a*Zre);if(f){var _=1/this._p,S=(c?1:-1)*(sl-_);this._add("A",n,i,y,1,+c,e+n*V1(o+S),r+i*j1(o+S)),_>.01&&this._add("A",n,i,y,0,+c,g,m)}else{var T=e+n*V1(s),C=r+i*j1(s);this._add("A",n,i,y,+p,+c,T,C)}},t.prototype.rect=function(e,r,n,i){this._add("M",e,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(e,r,n,i,a,o,s,l,u){for(var c=[],h=this._p,f=1;f<arguments.length;f++){var d=arguments[f];if(isNaN(d)){this._invalid=!0;return}c.push(Math.round(d*h)/h)}this._d.push(e+c.join(" ")),this._start=e==="Z"},t.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},t.prototype.getStr=function(){return this._str},t}(),FM="none",$re=Math.round;function Yre(t){var e=t.fill;return e!=null&&e!==FM}function Xre(t){var e=t.stroke;return e!=null&&e!==FM}var fT=["lineCap","miterLimit","lineJoin"],qre=re(fT,function(t){return"stroke-"+t.toLowerCase()});function Kre(t,e,r,n){var i=e.opacity==null?1:e.opacity;if(r instanceof pr){t("opacity",i);return}if(Yre(e)){var a=Jd(e.fill);t("fill",a.color);var o=e.fillOpacity!=null?e.fillOpacity*a.opacity*i:a.opacity*i;o<1&&t("fill-opacity",o)}else t("fill",FM);if(Xre(e)){var s=Jd(e.stroke);t("stroke",s.color);var l=e.strokeNoScale?r.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*i:s.opacity*i,h=e.strokeFirst;if(u!==1&&t("stroke-width",u),h&&t("paint-order",h?"stroke":"fill"),c<1&&t("stroke-opacity",c),e.lineDash){var f=bM(r),d=f[0],p=f[1];d&&(p=$re(p||0),t("stroke-dasharray",d.join(",")),(p||n)&&t("stroke-dashoffset",p))}for(var g=0;g<fT.length;g++){var m=fT[g];if(e[m]!==xy[m]){var y=e[m]||xy[m];y&&t(qre[g],y)}}}}var oG="http://www.w3.org/2000/svg",sG="http://www.w3.org/1999/xlink",Qre="http://www.w3.org/2000/xmlns/",Jre="http://www.w3.org/XML/1998/namespace",mE="ecmeta_";function lG(t){return document.createElementNS(oG,t)}function hr(t,e,r,n,i){return{tag:t,attrs:r||{},children:n,text:i,key:e}}function ene(t,e){var r=[];if(e)for(var n in e){var i=e[n],a=n;i!==!1&&(i!==!0&&i!=null&&(a+='="'+i+'"'),r.push(a))}return"<"+t+" "+r.join(" ")+">"}function tne(t){return"</"+t+">"}function GM(t,e){e=e||{};var r=e.newline?`
|
||
`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return ene(o,s)+(o!=="style"?Zr(l):l||"")+(a?""+r+re(a,function(u){return n(u)}).join(r)+r:"")+tne(o)}return n(t)}function rne(t,e,r){r=r||{};var n=r.newline?`
|
||
`:"",i=" {"+n,a=n+"}",o=re($e(t),function(l){return l+i+re($e(t[l]),function(u){return u+":"+t[l][u]+";"}).join(n)+a}).join(n),s=re($e(e),function(l){return"@keyframes "+l+i+re($e(e[l]),function(u){return u+i+re($e(e[l][u]),function(c){var h=e[l][u][c];return c==="d"&&(h='path("'+h+'")'),c+":"+h+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function dT(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function yE(t,e,r,n){return hr("svg","root",{width:t,height:e,xmlns:oG,"xmlns:xlink":sG,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var nne=0;function uG(){return nne++}var _E={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"},fl="transform-origin";function ine(t,e,r){var n=J({},t.shape);J(n,e),t.buildPath(r,n);var i=new aG;return i.reset(P4(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function ane(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[fl]=r+"px "+n+"px")}var one={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function cG(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function sne(t,e,r){var n=t.shape.paths,i={},a,o;if(R(n,function(l){var u=dT(r.zrId);u.animation=!0,c_(l,{},u,!0);var c=u.cssAnims,h=u.cssNodes,f=$e(c),d=f.length;if(d){o=f[d-1];var p=c[o];for(var g in p){var m=p[g];i[g]=i[g]||{d:""},i[g].d+=m.d||""}for(var y in h){var _=h[y].animation;_.indexOf(o)>=0&&(a=_)}}}),!!a){e.d=!1;var s=cG(i,r);return a.replace(o,s)}}function xE(t){return se(t)?_E[t]?"cubic-bezier("+_E[t]+")":T2(t)?t:"":""}function c_(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof Hv){var s=sne(t,e,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var c=i[u],h=[c.getMaxTime()/1e3+"s"],f=xE(c.getClip().easing),d=c.getDelay();f?h.push(f):h.push("linear"),d&&h.push(d/1e3+"s"),c.getLoop()&&h.push("infinite");var p=h.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(c)}function g(_){var S=_[1],T=S.length,C={},M={},A={},k="animation-timing-function";function E(xe,ge,ke){for(var fe=xe.getTracks(),Me=xe.getMaxTime(),st=0;st<fe.length;st++){var Ye=fe[st];if(Ye.needsAnimate()){var rt=Ye.keyframes,ut=Ye.propName;if(ke&&(ut=ke(ut)),ut)for(var Dt=0;Dt<rt.length;Dt++){var gr=rt[Dt],Br=Math.round(gr.time/Me*100)+"%",Gi=xE(gr.easing),Hi=gr.rawValue;(se(Hi)||qe(Hi))&&(ge[Br]=ge[Br]||{},ge[Br][ut]=gr.rawValue,Gi&&(ge[Br][k]=Gi))}}}}for(var D=0;D<T;D++){var I=S[D],z=I.targetName;z?z==="shape"&&E(I,M):!n&&E(I,C)}for(var O in C){var V={};my(V,t),J(V,C[O]);var G=k4(V),F=C[O][k];A[O]=G?{transform:G}:{},ane(A[O],V),F&&(A[O][k]=F)}var U,j=!0;for(var O in M){A[O]=A[O]||{};var W=!U,F=M[O][k];W&&(U=new Ta);var H=U.len();U.reset(),A[O].d=ine(t,M[O],U);var X=U.len();if(!W&&H!==X){j=!1;break}F&&(A[O][k]=F)}if(!j)for(var O in A)delete A[O].d;if(!n)for(var D=0;D<T;D++){var I=S[D],z=I.targetName;z==="style"&&E(I,A,function(fe){return one[fe]})}for(var K=$e(A),ne=!0,ie,D=1;D<K.length;D++){var ue=K[D-1],ve=K[D];if(A[ue][fl]!==A[ve][fl]){ne=!1;break}ie=A[ue][fl]}if(ne&&ie){for(var O in A)A[O][fl]&&delete A[O][fl];e[fl]=ie}if(tt(K,function(xe){return $e(A[xe]).length>0}).length){var Ge=cG(A,r);return Ge+" "+_[0]+" both"}}for(var m in l){var s=g(l[m]);s&&o.push(s)}if(o.length){var y=r.zrId+"-cls-"+uG();r.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function lne(t,e,r){if(!t.ignore)if(t.isSilent()){var n={"pointer-events":"none"};SE(n,e,r)}else{var i=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},a=i.fill;if(!a){var o=t.style&&t.style.fill,s=t.states.select&&t.states.select.style&&t.states.select.style.fill,l=t.currentStates.indexOf("select")>=0&&s||o;l&&(a=vy(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&t.transform?t.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),SE(n,e,r)}}function SE(t,e,r,n){var i=JSON.stringify(t),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+uG(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=t),e.class=e.class?e.class+" "+a:a}var dv=Math.round;function hG(t){return t&&se(t.src)}function fG(t){return t&&me(t.toDataURL)}function HM(t,e,r,n){Kre(function(i,a){var o=i==="fill"||i==="stroke";o&&L4(a)?vG(e,t,i,n):o&&M2(a)?pG(r,t,i,n):t[i]=a,o&&n.ssr&&a==="none"&&(t["pointer-events"]="visible")},e,r,!1),pne(r,t,n)}function WM(t,e){var r=z4(e);r&&(r.each(function(n,i){n!=null&&(t[(mE+i).toLowerCase()]=n+"")}),e.isSilent()&&(t[mE+"silent"]="true"))}function bE(t){return $o(t[0]-1)&&$o(t[1])&&$o(t[2])&&$o(t[3]-1)}function une(t){return $o(t[4])&&$o(t[5])}function UM(t,e,r){if(e&&!(une(e)&&bE(e))){var n=1e4;t.transform=bE(e)?"translate("+dv(e[4]*n)/n+" "+dv(e[5]*n)/n+")":WY(e)}}function wE(t,e,r){for(var n=t.points,i=[],a=0;a<n.length;a++)i.push(dv(n[a][0]*r)/r),i.push(dv(n[a][1]*r)/r);e.points=i.join(" ")}function TE(t){return!t.smooth}function cne(t){var e=re(t,function(r){return typeof r=="string"?[r,r]:r});return function(r,n,i){for(var a=0;a<e.length;a++){var o=e[a],s=r[o[0]];s!=null&&(n[o[1]]=dv(s*i)/i)}}}var hne={circle:[cne(["cx","cy","r"])],polyline:[wE,TE],polygon:[wE,TE]};function fne(t){for(var e=t.animators,r=0;r<e.length;r++)if(e[r].targetName==="shape")return!0;return!1}function dG(t,e){var r=t.style,n=t.shape,i=hne[t.type],a={},o=e.animation,s="path",l=t.style.strokePercent,u=e.compress&&P4(t)||4;if(i&&!e.willUpdate&&!(i[1]&&!i[1](n))&&!(o&&fne(t))&&!(l<1)){s=t.type;var c=Math.pow(10,u);i[0](n,a,c)}else{var h=!t.path||t.shapeChanged();t.path||t.createPathProxy();var f=t.path;h&&(f.beginPath(),t.buildPath(f,t.shape),t.pathUpdated());var d=f.getVersion(),p=t,g=p.__svgPathBuilder;(p.__svgPathVersion!==d||!g||l!==p.__svgPathStrokePercent)&&(g||(g=p.__svgPathBuilder=new aG),g.reset(u),f.rebuildPath(g,l),g.generateStr(),p.__svgPathVersion=d,p.__svgPathStrokePercent=l),a.d=g.getStr()}return UM(a,t.transform),HM(a,r,t,e),WM(a,t),e.animation&&c_(t,a,e),e.emphasis&&lne(t,a,e),hr(s,t.id+"",a)}function dne(t,e){var r=t.style,n=r.image;if(n&&!se(n)&&(hG(n)?n=n.src:fG(n)&&(n=n.toDataURL())),!!n){var i=r.x||0,a=r.y||0,o=r.width,s=r.height,l={href:n,width:o,height:s};return i&&(l.x=i),a&&(l.y=a),UM(l,t.transform),HM(l,r,t,e),WM(l,t),e.animation&&c_(t,l,e),hr("image",t.id+"",l)}}function vne(t,e){var r=t.style,n=r.text;if(n!=null&&(n+=""),!(!n||isNaN(r.x)||isNaN(r.y))){var i=r.font||uo,a=r.x||0,o=ZY(r.y||0,jv(i),r.textBaseline),s=UY[r.textAlign]||r.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(uj(r)){var u="",c=r.fontStyle,h=lj(r.fontSize);if(!parseFloat(h))return;var f=r.fontFamily||e4,d=r.fontWeight;u+="font-size:"+h+";font-family:"+f+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),d&&d!=="normal"&&(u+="font-weight:"+d+";"),l.style=u}else l.style="font: "+i;return n.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),o&&(l.y=o),UM(l,t.transform),HM(l,r,t,e),WM(l,t),e.animation&&c_(t,l,e),hr("text",t.id+"",l,void 0,n)}}function CE(t,e){if(t instanceof Ue)return dG(t,e);if(t instanceof pr)return dne(t,e);if(t instanceof Kc)return vne(t,e)}function pne(t,e,r){var n=t.style;if($Y(n)){var i=YY(t),a=r.shadowCache,o=a[i];if(!o){var s=t.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,h=n.shadowOffsetY||0,f=n.shadowBlur,d=Jd(n.shadowColor),p=d.opacity,g=d.color,m=f/2/l,y=f/2/u,_=m+" "+y;o=r.zrId+"-s"+r.shadowIdx++,r.defs[o]=hr("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[hr("feDropShadow","",{dx:c/l,dy:h/u,stdDeviation:_,"flood-color":g,"flood-opacity":p})]),a[i]=o}e.filter=F0(o)}}function vG(t,e,r,n){var i=t[r],a,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(M4(i))a="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(A4(i))a="radialGradient",o.cx=pe(i.x,.5),o.cy=pe(i.y,.5),o.r=pe(i.r,.5);else return;for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var h=cw(s[u].offset)*100+"%",f=s[u].color,d=Jd(f),p=d.color,g=d.opacity,m={offset:h};m["stop-color"]=p,g<1&&(m["stop-opacity"]=g),l.push(hr("stop",u+"",m))}var y=hr(a,"",o,l),_=GM(y),S=n.gradientCache,T=S[_];T||(T=n.zrId+"-g"+n.gradientIdx++,S[_]=T,o.id=T,n.defs[T]=hr(a,T,o,l)),e[r]=F0(T)}function pG(t,e,r,n){var i=t.style[r],a=t.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",h;if(C4(i)){var f=i.imageWidth,d=i.imageHeight,p=void 0,g=i.image;if(se(g)?p=g:hG(g)?p=g.src:fG(g)&&(p=g.toDataURL()),typeof Image>"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";Rr(f,m),Rr(d,m)}else if(f==null||d==null){var y=function(D,I){if(D){var z=D.elm,O=f||I.width,V=d||I.height;D.tag==="pattern"&&(u?(V=1,O/=a.width):c&&(O=1,V/=a.height)),D.attrs.width=O,D.attrs.height=V,z&&(z.setAttribute("width",O),z.setAttribute("height",V))}},_=R2(p,null,t,function(D){l||y(M,D),y(h,D)});_&&_.width&&_.height&&(f=f||_.width,d=d||_.height)}h=hr("image","img",{href:p,width:f,height:d}),o.width=f,o.height=d}else i.svgElement&&(h=ye(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(h){var S,T;l?S=T=1:u?(T=1,S=o.width/a.width):c?(S=1,T=o.height/a.height):o.patternUnits="userSpaceOnUse",S!=null&&!isNaN(S)&&(o.width=S),T!=null&&!isNaN(T)&&(o.height=T);var C=k4(i);C&&(o.patternTransform=C);var M=hr("pattern","",o,[h]),A=GM(M),k=n.patternCache,E=k[A];E||(E=n.zrId+"-p"+n.patternIdx++,k[A]=E,o.id=E,M=n.defs[E]=hr("pattern",E,o,[h])),e[r]=F0(E)}}function gne(t,e,r){var n=r.clipPathCache,i=r.defs,a=n[t.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[t.id]=a,i[a]=hr("clipPath",a,o,[dG(t,r)])}e["clip-path"]=F0(a)}function ME(t){return document.createTextNode(t)}function _l(t,e,r){t.insertBefore(e,r)}function AE(t,e){t.removeChild(e)}function LE(t,e){t.appendChild(e)}function gG(t){return t.parentNode}function mG(t){return t.nextSibling}function F1(t,e){t.textContent=e}var PE=58,mne=120,yne=hr("","");function vT(t){return t===void 0}function aa(t){return t!==void 0}function _ne(t,e,r){for(var n={},i=e;i<=r;++i){var a=t[i].key;a!==void 0&&(n[a]=i)}return n}function Zf(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function vv(t){var e,r=t.children,n=t.tag;if(aa(n)){var i=t.elm=lG(n);if(ZM(yne,t),ee(r))for(e=0;e<r.length;++e){var a=r[e];a!=null&&LE(i,vv(a))}else aa(t.text)&&!be(t.text)&&LE(i,ME(t.text))}else t.elm=ME(t.text);return t.elm}function yG(t,e,r,n,i){for(;n<=i;++n){var a=r[n];a!=null&&_l(t,vv(a),e)}}function Uy(t,e,r,n){for(;r<=n;++r){var i=e[r];if(i!=null)if(aa(i.tag)){var a=gG(i.elm);AE(a,i.elm)}else AE(t,i.elm)}}function ZM(t,e){var r,n=e.elm,i=t&&t.attrs||{},a=e.attrs||{};if(i!==a){for(r in a){var o=a[r],s=i[r];s!==o&&(o===!0?n.setAttribute(r,""):o===!1?n.removeAttribute(r):r==="style"?n.style.cssText=o:r.charCodeAt(0)!==mne?n.setAttribute(r,o):r==="xmlns:xlink"||r==="xmlns"?n.setAttributeNS(Qre,r,o):r.charCodeAt(3)===PE?n.setAttributeNS(Jre,r,o):r.charCodeAt(5)===PE?n.setAttributeNS(sG,r,o):n.setAttribute(r,o))}for(r in i)r in a||n.removeAttribute(r)}}function xne(t,e,r){for(var n=0,i=0,a=e.length-1,o=e[0],s=e[a],l=r.length-1,u=r[0],c=r[l],h,f,d,p;n<=a&&i<=l;)o==null?o=e[++n]:s==null?s=e[--a]:u==null?u=r[++i]:c==null?c=r[--l]:Zf(o,u)?(ic(o,u),o=e[++n],u=r[++i]):Zf(s,c)?(ic(s,c),s=e[--a],c=r[--l]):Zf(o,c)?(ic(o,c),_l(t,o.elm,mG(s.elm)),o=e[++n],c=r[--l]):Zf(s,u)?(ic(s,u),_l(t,s.elm,o.elm),s=e[--a],u=r[++i]):(vT(h)&&(h=_ne(e,n,a)),f=h[u.key],vT(f)?_l(t,vv(u),o.elm):(d=e[f],d.tag!==u.tag?_l(t,vv(u),o.elm):(ic(d,u),e[f]=void 0,_l(t,d.elm,o.elm))),u=r[++i]);(n<=a||i<=l)&&(n>a?(p=r[l+1]==null?null:r[l+1].elm,yG(t,p,r,i,l)):Uy(t,e,n,a))}function ic(t,e){var r=e.elm=t.elm,n=t.children,i=e.children;t!==e&&(ZM(t,e),vT(e.text)?aa(n)&&aa(i)?n!==i&&xne(r,n,i):aa(i)?(aa(t.text)&&F1(r,""),yG(r,null,i,0,i.length-1)):aa(n)?Uy(r,n,0,n.length-1):aa(t.text)&&F1(r,""):t.text!==e.text&&(aa(n)&&Uy(r,n,0,n.length-1),F1(r,e.text)))}function Sne(t,e){if(Zf(t,e))ic(t,e);else{var r=t.elm,n=gG(r);vv(e),n!==null&&(_l(n,e.elm,mG(r)),Uy(n,[t],0,0))}return e}var bne=0,wne=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=kE(),this.configLayer=kE(),this.storage=r,this._opts=n=J({},n),this.root=e,this._id="zr"+bne++,this._oldVNode=yE(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=lG("svg");ZM(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",Sne(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return CE(e,dT(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=dT(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=Tne(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=hr("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=re($e(a.defs),function(f){return a.defs[f]});if(u.length&&o.push(hr("defs","defs",{},u)),e.animation){var c=rne(a.cssNodes,a.cssAnims,{newline:!0});if(c){var h=hr("style","stl",{},[],c);o.push(h)}}return yE(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},GM(this.renderToVNode({animation:pe(e.cssAnimation,!0),emphasis:pe(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:pe(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,n){for(var i=e.length,a=[],o=0,s,l,u=0,c=0;c<i;c++){var h=e[c];if(!h.invisible){var f=h.__clipPaths,d=f&&f.length||0,p=l&&l.length||0,g=void 0;for(g=Math.max(d-1,p-1);g>=0&&!(f&&l&&f[g]===l[g]);g--);for(var m=p-1;m>g;m--)o--,s=a[o-1];for(var y=g+1;y<d;y++){var _={};gne(f[y],_,r);var S=hr("g","clip-g-"+u++,_,[]);(s?s.children:n).push(S),a[o++]=S,s=S}l=f;var T=CE(h,r);T&&(s?s.children:n).push(T)}}},t.prototype.resize=function(e,r){var n=this._opts,i=this.root,a=this._viewport;if(e!=null&&(n.width=e),r!=null&&(n.height=r),i&&a&&(a.style.display="none",e=Tc(i,0,n),r=Tc(i,1,n),a.style.display=""),this._width!==e||this._height!==r){if(this._width=e,this._height=r,a){var o=a.style;o.width=e+"px",o.height=r+"px"}if(M2(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",r));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",r))}}},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},t.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},t.prototype.toDataURL=function(e){var r=this.renderToString(),n="data:image/svg+xml;";return e?(r=qY(r),r&&n+"base64,"+r):n+"charset=UTF-8,"+encodeURIComponent(r)},t}();function kE(t){return function(){}}function Tne(t,e,r,n){var i;if(r&&r!=="none")if(i=hr("rect","bg",{width:t,height:e,x:"0",y:"0"}),L4(r))vG({fill:r},i.attrs,"fill",n);else if(M2(r))pG({style:{fill:r},dirty:Rt,getBoundingRect:function(){return{width:t,height:e}}},i.attrs,"fill",n);else{var a=Jd(r),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}function Cne(t){t.registerPainter("svg",wne)}function DE(t,e,r){var n=bn.createCanvas(),i=e.getWidth(),a=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=i*r,n.height=a*r,n}var G1=function(t){Y(e,t);function e(r,n,i){var a=t.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||gy,typeof r=="string"?o=DE(r,n,i):be(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(S2(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=DE("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},e.prototype.createRepaintRects=function(r,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new Ce(0,0,0,0);function c(_){if(!(!_.isFinite()||_.isZero()))if(o.length===0){var S=new Ce(0,0,0,0);S.copy(_),o.push(S)}else{for(var T=!1,C=1/0,M=0,A=0;A<o.length;++A){var k=o[A];if(k.intersect(_)){var E=new Ce(0,0,0,0);E.copy(k),E.union(_),o[A]=E,T=!0;break}else if(l){u.copy(_),u.union(k);var D=_.width*_.height,I=k.width*k.height,z=u.width*u.height,O=z-D-I;O<C&&(C=O,M=A)}}if(l&&(o[M].union(_),T=!0),!T){var S=new Ce(0,0,0,0);S.copy(_),o.push(S)}l||(l=o.length>=s)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var f=r[h];if(f){var d=f.shouldBePainted(i,a,!0,!0),p=f.__isRendered&&(f.__dirty&An||!d)?f.getPrevPaintRect():null;p&&c(p);var g=d&&(f.__dirty&An||!f.__isRendered)?f.getPaintRect():null;g&&c(g)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var f=n[h],d=f&&f.shouldBePainted(i,a,!0,!0);if(f&&(!d||!f.__zr)&&f.__isRendered){var p=f.getPrevPaintRect();p&&c(p)}}var m;do{m=!1;for(var h=0;h<o.length;){if(o[h].isZero()){o.splice(h,1);continue}for(var y=h+1;y<o.length;)o[h].intersect(o[y])?(m=!0,o[h].union(o[y]),o.splice(y,1)):y++;h++}}while(m);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(r,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=r+"px",o.height=n+"px"),a.width=r*i,a.height=n*i,s&&(s.width=r*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},e.prototype.clear=function(r,n,i){var a=this.dom,o=this.ctx,s=a.width,l=a.height;n=n||this.clearColor;var u=this.motionBlur&&!r,c=this.lastFrameAlpha,h=this.dpr,f=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/h,l/h));var d=this.domBack;function p(g,m,y,_){if(o.clearRect(g,m,y,_),n&&n!=="transparent"){var S=void 0;if(Nv(n)){var T=n.global||n.__width===y&&n.__height===_;S=T&&n.__canvasGradient||qw(o,n,{x:0,y:0,width:y,height:_}),n.__canvasGradient=S,n.__width=y,n.__height=_}else i4(n)&&(n.scaleX=n.scaleX||h,n.scaleY=n.scaleY||h,S=Kw(o,n,{dirty:function(){f.setUnpainted(),f.painter.refresh()}}));o.save(),o.fillStyle=S||n,o.fillRect(g,m,y,_),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(d,g,m,y,_),o.restore())}!i||u?p(0,0,s,l):i.length&&R(i,function(g){p(g.x*h,g.y*h,g.width*h,g.height*h)})},e}(vi),IE=1e5,ll=314159,Tg=.01,Mne=.001;function Ane(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}function Lne(t,e){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var Pne=function(){function t(e,r,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=J({},n||{}),this.dpr=n.devicePixelRatio||gy,this._singleCanvas=a,this.root=e;var o=e.style;o&&(S2(e),e.innerHTML=""),this.storage=r;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var c=e,h=c.width,f=c.height;n.width!=null&&(h=n.width),n.height!=null&&(f=n.height),this.dpr=n.devicePixelRatio||1,c.width=h*this.dpr,c.height=f*this.dpr,this._width=h,this._height=f;var d=new G1(c,this,this.dpr);d.__builtin__=!0,d.initContext(),l[ll]=d,d.zlevel=ll,s.push(ll),this._domRoot=e}else{this._width=Tc(e,0,n),this._height=Tc(e,1,n);var u=this._domRoot=Lne(this._width,this._height);e.appendChild(u)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.refresh=function(e){var r=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,n,e,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=a===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(e){var r=e.length,n=this._hoverlayer;if(n&&n.clear(),!!r){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<r;o++){var s=e[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(IE)),a||(a=n.ctx,a.save()),Dl(a,s,i,o===r-1))}a&&a.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(IE)},t.prototype.paintOne=function(e,r){wM(e,r)},t.prototype._paintList=function(e,r,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(e);var a=this._doPaintList(e,r,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;cy(function(){l._paintList(e,r,n,i)})}}},t.prototype._compositeManually=function(){var e=this.getLayer(ll).ctx,r=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,r,n),this.eachBuiltinLayer(function(i){i.virtual&&e.drawImage(i.dom,0,0,r,n)})},t.prototype._doPaintList=function(e,r,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&a.push(u)}for(var c=!0,h=!1,f=function(g){var m=a[g],y=m.ctx,_=o&&m.createRepaintRects(e,r,d._width,d._height),S=n?m.__startIndex:m.__drawIndex,T=!n&&m.incremental&&Date.now,C=T&&Date.now(),M=m.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(m.__startIndex===m.__endIndex)m.clear(!1,M,_);else if(S===m.__startIndex){var A=e[S];(!A.incremental||!A.notClear||n)&&m.clear(!1,M,_)}S===-1&&(console.error("For some unknown reason. drawIndex is -1"),S=m.__startIndex);var k,E=function(O){var V={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(k=S;k<m.__endIndex;k++){var G=e[k];if(G.__inHover&&(h=!0),i._doPaintEl(G,m,o,O,V,k===m.__endIndex-1),T){var F=Date.now()-C;if(F>15)break}}V.prevElClipPaths&&y.restore()};if(_)if(_.length===0)k=m.__endIndex;else for(var D=d.dpr,I=0;I<_.length;++I){var z=_[I];y.save(),y.beginPath(),y.rect(z.x*D,z.y*D,z.width*D,z.height*D),y.clip(),E(z),y.restore()}else y.save(),E(),y.restore();m.__drawIndex=k,m.__drawIndex<m.__endIndex&&(c=!1)},d=this,p=0;p<a.length;p++)f(p);return Ze.wxa&&R(this._layers,function(g){g&&g.ctx&&g.ctx.draw&&g.ctx.draw()}),{finished:c,needsRefreshHover:h}},t.prototype._doPaintEl=function(e,r,n,i,a,o){var s=r.ctx;if(n){var l=e.getPaintRect();(!i||l&&l.intersect(i))&&(Dl(s,e,a,o),e.setPrevPaintRect(l))}else Dl(s,e,a,o)},t.prototype.getLayer=function(e,r){this._singleCanvas&&!this._needsManuallyCompositing&&(e=ll);var n=this._layers[e];return n||(n=new G1("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Ne(n,this._layerConfig[e],!0):this._layerConfig[e-Tg]&&Ne(n,this._layerConfig[e-Tg],!0),r&&(n.virtual=r),this.insertLayer(e,n),n.initContext()),n},t.prototype.insertLayer=function(e,r){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,l=-1;if(!n[e]&&Ane(r)){if(a>0&&e>i[0]){for(l=0;l<a-1&&!(i[l]<e&&i[l+1]>e);l++);s=n[i[l]]}if(i.splice(l+1,0,e),n[e]=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||(r.painter=this)}},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];e.call(r,this._layers[a],a)}},t.prototype.eachBuiltinLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&e.call(r,o,a)}},t.prototype.eachOtherLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||e.call(r,o,a)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(h,f){h.__dirty=h.__used=!1});function r(h){a&&(a.__endIndex!==h&&(a.__dirty=!0),a.__endIndex=h)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var i=e[n];if(i.zlevel!==e[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<e.length;l++){var i=e[l],u=i.zlevel,c=void 0;s!==u&&(s=u,o=0),i.incremental?(c=this.getLayer(u+Mne,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?Tg:0),this._needsManuallyCompositing),c.__builtin__||O0("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&An&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(h,f){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,R(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?Ne(n[e],r,!0):n[e]=r;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===e||a===e+Tg){var o=this._layers[a];Ne(o,n[e],!0)}}}},t.prototype.delLayer=function(e){var r=this._layers,n=this._zlevelList,i=r[e];i&&(i.dom.parentNode.removeChild(i.dom),delete r[e],n.splice(Ee(n,e),1))},t.prototype.resize=function(e,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(e!=null&&(i.width=e),r!=null&&(i.height=r),e=Tc(a,0,i),r=Tc(a,1,i),n.style.display="",this._width!==e||r!==this._height){n.style.width=e+"px",n.style.height=r+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,r);this.refresh(!0)}this._width=e,this._height=r}else{if(e==null||r==null)return;this._width=e,this._height=r,this.getLayer(ll).resize(e,r)}return this},t.prototype.clearLayer=function(e){var r=this._layers[e];r&&r.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[ll].dom;var r=new G1("image",this,e.pixelRatio||this.dpr);r.initContext(),r.clear(!1,e.backgroundColor||this._backgroundColor);var n=r.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var i=r.dom.width,a=r.dom.height;this.eachLayer(function(h){h.__builtin__?n.drawImage(h.dom,0,0,i,a):h.renderToCanvas&&(n.save(),h.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];Dl(n,c,o,l===u-1)}return r.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}();function kne(t){t.registerPainter("canvas",Pne)}var Dne=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r){return ka(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(r){var n=new _e,i=Ut("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=r.itemHeight*.8,u=Ut(s,(r.itemWidth-l)/2,(r.itemHeight-l)/2,l,l,r.itemStyle.fill);n.add(u),u.setStyle(r.itemStyle);var c=r.iconRotate==="inherit"?o:r.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=q.color.neutral00,u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(dt);function ih(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=eh(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(eh(t,e,r[o]));return a.join(" ")}}function _G(t,e){var r=t.mapDimensionsAll("defaultedLabel");if(!ee(e))return e+"";for(var n=[],i=0;i<r.length;i++){var a=t.getDimensionIndex(r[i]);a>=0&&n.push(e[a])}return n.join(" ")}var Xv=function(t){Y(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=Ut(r,-1,-1,2,2,null,s);l.attr({z2:pe(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=Ine,this._symbolType=r,this.add(l)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){ho(this.childAt(0))},e.prototype.downplay=function(){fo(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=e.getSymbolSize(r,n),u=e.getSymbolZ2(r,n),c=o!==this._symbolType,h=a&&a.disableAnimation;if(c){var f=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,f)}else{var d=this.childAt(0);d.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};h?d.attr(p):Qe(d,p,s,n),di(d)}if(this._updateCommon(r,n,l,i,a),c){var d=this.childAt(0);if(!h){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,St(d,p,s,n)}}h&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,h,f,d,p,g,m,y;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,h=a.selectItemStyle,f=a.focus,d=a.blurScope,g=a.labelStatesModels,m=a.hoverScale,y=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var _=a&&a.itemModel?a.itemModel:r.getItemModel(n),S=_.getModel("emphasis");u=S.getModel("itemStyle").getItemStyle(),h=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),f=S.get("focus"),d=S.get("blurScope"),p=S.get("disabled"),g=ar(_),m=S.getShallow("scale"),y=_.getShallow("cursor")}var T=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(T||0)*Math.PI/180||0);var C=du(r.getItemVisual(n,"symbolOffset"),i);C&&(s.x=C[0],s.y=C[1]),y&&s.attr("cursor",y);var M=r.getItemVisual(n,"style"),A=M.fill;if(s instanceof pr){var k=s.style;s.useStyle(J({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},M))}else s.__isEmptyBrush?s.useStyle(J({},M)):s.useStyle(M),s.style.decal=null,s.setColor(A,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var E=r.getItemVisual(n,"liftZ"),D=this._z2;E!=null?D==null&&(this._z2=s.z2,s.z2+=E):D!=null&&(s.z2=D,this._z2=null);var I=o&&o.useNameLabel;vr(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:z,inheritColor:A,defaultOpacity:M.opacity});function z(G){return I?r.getName(G):ih(r,G)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var O=s.ensureState("emphasis");O.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=c;var V=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;O.scaleX=this._sizeX*V,O.scaleY=this._sizeY*V,this.setSymbolScale(1),wt(this,f,d,p)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=Le(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&_s(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();_s(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return Lh(r.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},e}(_e);function Ine(t,e){this.parent.drift(t,e)}function H1(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function EE(t){return t!=null&&!be(t)&&(t={isIgnore:t}),t||{}}function NE(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:ar(e),cursorStyle:e.get("cursor")}}var qv=function(){function t(e){this.group=new _e,this._SymbolCtor=e||Xv}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=EE(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=NE(e),u={disableAnimation:s},c=r.getSymbolPoint||function(h){return e.getItemLayout(h)};a||n.removeAll(),e.diff(a).add(function(h){var f=c(h);if(H1(e,f,h,r)){var d=new o(e,h,l,u);d.setPosition(f),e.setItemGraphicEl(h,d),n.add(d)}}).update(function(h,f){var d=a.getItemGraphicEl(f),p=c(h);if(!H1(e,p,h,r)){n.remove(d);return}var g=e.getItemVisual(h,"symbol")||"circle",m=d&&d.getSymbolType&&d.getSymbolType();if(!d||m&&m!==g)n.remove(d),d=new o(e,h,l,u),d.setPosition(p);else{d.updateData(e,h,l,u);var y={x:p[0],y:p[1]};s?d.attr(y):Qe(d,y,i)}n.add(d),e.setItemGraphicEl(h,d)}).remove(function(h){var f=a.getItemGraphicEl(h);f&&f.fadeOut(function(){n.remove(f)},i)}).execute(),this._getSymbolPoint=c,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=NE(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=EE(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var o=r.getItemLayout(a);if(H1(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},t.prototype.eachRendered=function(e){Ps(this._progressiveEls||this.group,e)},t.prototype.remove=function(e){var r=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},t}();function xG(t,e,r){var n=t.getBaseAxis(),i=t.getOtherAxis(n),a=Ene(i,r),o=n.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,h=re(t.dimensions,function(p){return e.mapDimension(p)}),f=!1,d=e.getCalculationInfo("stackResultDimension");return po(e,h[0])&&(f=!0,h[0]=d),po(e,h[1])&&(f=!0,h[1]=d),{dataDimsForPoint:h,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Ene(t,e){var r=0,n=t.scale.getExtent();return e==="start"?r=n[0]:e==="end"?r=n[1]:qe(e)&&!isNaN(e)?r=e:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function SG(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function Nne(t,e){var r=[];return e.diff(t).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 Rne(t,e,r,n,i,a,o,s){for(var l=Nne(t,e),u=[],c=[],h=[],f=[],d=[],p=[],g=[],m=xG(i,e,o),y=t.getLayout("points")||[],_=e.getLayout("points")||[],S=0;S<l.length;S++){var T=l[S],C=!0,M=void 0,A=void 0;switch(T.cmd){case"=":M=T.idx*2,A=T.idx1*2;var k=y[M],E=y[M+1],D=_[A],I=_[A+1];(isNaN(k)||isNaN(E))&&(k=D,E=I),u.push(k,E),c.push(D,I),h.push(r[M],r[M+1]),f.push(n[A],n[A+1]),g.push(e.getRawIndex(T.idx1));break;case"+":var z=T.idx,O=m.dataDimsForPoint,V=i.dataToPoint([e.get(O[0],z),e.get(O[1],z)]);A=z*2,u.push(V[0],V[1]),c.push(_[A],_[A+1]);var G=SG(m,i,e,z);h.push(G[0],G[1]),f.push(n[A],n[A+1]),g.push(e.getRawIndex(z));break;case"-":C=!1}C&&(d.push(T),p.push(p.length))}p.sort(function(ue,ve){return g[ue]-g[ve]});for(var F=u.length,U=fa(F),j=fa(F),W=fa(F),H=fa(F),X=[],S=0;S<p.length;S++){var K=p[S],ne=S*2,ie=K*2;U[ne]=u[ie],U[ne+1]=u[ie+1],j[ne]=c[ie],j[ne+1]=c[ie+1],W[ne]=h[ie],W[ne+1]=h[ie+1],H[ne]=f[ie],H[ne+1]=f[ie+1],X[S]=d[K]}return{current:U,next:j,stackedOnCurrent:W,stackedOnNext:H,status:X}}var ko=Math.min,Do=Math.max;function jl(t,e){return isNaN(t)||isNaN(e)}function pT(t,e,r,n,i,a,o,s,l){for(var u,c,h,f,d,p,g=r,m=0;m<n;m++){var y=e[g*2],_=e[g*2+1];if(g>=i||g<0)break;if(jl(y,_)){if(l){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](y,_),h=y,f=_;else{var S=y-u,T=_-c;if(S*S+T*T<.5){g+=a;continue}if(o>0){for(var C=g+a,M=e[C*2],A=e[C*2+1];M===y&&A===_&&m<n;)m++,C+=a,g+=a,M=e[C*2],A=e[C*2+1],y=e[g*2],_=e[g*2+1],S=y-u,T=_-c;var k=m+1;if(l)for(;jl(M,A)&&k<n;)k++,C+=a,M=e[C*2],A=e[C*2+1];var E=.5,D=0,I=0,z=void 0,O=void 0;if(k>=n||jl(M,A))d=y,p=_;else{D=M-u,I=A-c;var V=y-u,G=M-y,F=_-c,U=A-_,j=void 0,W=void 0;if(s==="x"){j=Math.abs(V),W=Math.abs(G);var H=D>0?1:-1;d=y-H*j*o,p=_,z=y+H*W*o,O=_}else if(s==="y"){j=Math.abs(F),W=Math.abs(U);var X=I>0?1:-1;d=y,p=_-X*j*o,z=y,O=_+X*W*o}else j=Math.sqrt(V*V+F*F),W=Math.sqrt(G*G+U*U),E=W/(W+j),d=y-D*o*(1-E),p=_-I*o*(1-E),z=y+D*o*E,O=_+I*o*E,z=ko(z,Do(M,y)),O=ko(O,Do(A,_)),z=Do(z,ko(M,y)),O=Do(O,ko(A,_)),D=z-y,I=O-_,d=y-D*j/W,p=_-I*j/W,d=ko(d,Do(u,y)),p=ko(p,Do(c,_)),d=Do(d,ko(u,y)),p=Do(p,ko(c,_)),D=y-d,I=_-p,z=y+D*W/j,O=_+I*W/j}t.bezierCurveTo(h,f,d,p,y,_),h=z,f=O}else t.lineTo(y,_)}u=y,c=_,g+=a}return m}var bG=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),One=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new bG},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&jl(i[o*2-2],i[o*2-1]);o--);for(;a<o&&jl(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=pT(r,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=Ta.CMD,s,l,u=n==="x",c=[],h=0;h<a.length;){var f=a[h++],d=void 0,p=void 0,g=void 0,m=void 0,y=void 0,_=void 0,S=void 0;switch(f){case o.M:s=a[h++],l=a[h++];break;case o.L:if(d=a[h++],p=a[h++],S=u?(r-s)/(d-s):(r-l)/(p-l),S<=1&&S>=0){var T=u?(p-l)*S+l:(d-s)*S+s;return u?[r,T]:[T,r]}s=d,l=p;break;case o.C:d=a[h++],p=a[h++],g=a[h++],m=a[h++],y=a[h++],_=a[h++];var C=u?fy(s,d,g,y,r,c):fy(l,p,m,_,r,c);if(C>0)for(var M=0;M<C;M++){var A=c[M];if(A<=1&&A>=0){var T=u?ur(l,p,m,_,A):ur(s,d,g,y,A);return u?[r,T]:[T,r]}}s=y,l=_;break}}},e}(Ue),zne=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(bG),wG=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new zne},e.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&&jl(i[s*2-2],i[s*2-1]);s--);for(;o<s&&jl(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=pT(r,i,o,s,s,1,n.smooth,l,n.connectNulls);pT(r,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,r.closePath()}},e}(Ue);function TG(t,e,r,n,i){var a=t.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=r.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var h=new Be({shape:{x:o,y:s,width:l,height:u}});if(e){var f=t.getBaseAxis(),d=f.isHorizontal(),p=f.inverse;d?(p&&(h.shape.x+=l),h.shape.width=0):(p||(h.shape.y+=u),h.shape.height=0);var g=me(i)?function(m){i(m,h)}:null;St(h,{shape:{width:l,height:u,x:o,y:s}},r,null,n,g)}return h}function CG(t,e,r){var n=t.getArea(),i=Ht(n.r0,1),a=Ht(n.r,1),o=new Or({shape:{cx:Ht(t.cx,1),cy:Ht(t.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=t.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,St(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function Kv(t,e,r,n,i){if(t){if(t.type==="polar")return CG(t,e,r);if(t.type==="cartesian2d")return TG(t,e,r,n,i)}else return null;return null}function xs(t,e){return t.type===e}function RE(t,e){if(t.length===e.length){for(var r=0;r<t.length;r++)if(t[r]!==e[r])return;return!0}}function OE(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[e,r],[n,i]]}function zE(t,e){var r=OE(t),n=r[0],i=r[1],a=OE(e),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function BE(t){return qe(t)?t:t?.5:0}function Bne(t,e,r){if(!r.valueDim)return[];for(var n=e.count(),i=fa(n*2),a=0;a<n;a++){var o=SG(r,t,e,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Io(t,e,r,n,i){var a=r.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],h=[],f=[];if(i){for(l=0;l<t.length;l+=2){var d=e||t;!isNaN(d[l])&&!isNaN(d[l+1])&&f.push(t[l],t[l+1])}t=f}for(l=0;l<t.length-2;l+=2)switch(h[0]=t[l+2],h[1]=t[l+3],c[0]=t[l],c[1]=t[l+1],s.push(c[0],c[1]),n){case"end":u[o]=h[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var p=(c[o]+h[o])/2,g=[];u[o]=g[o]=p,u[1-o]=c[1-o],g[1-o]=h[1-o],s.push(u[0],u[1]),s.push(g[0],g[1]);break;default:u[o]=c[o],u[1-o]=h[1-o],s.push(u[0],u[1])}return s.push(t[l++],t[l++]),s}function jne(t,e){var r=[],n=t.length,i,a;function o(c,h,f){var d=c.coord,p=(f-d)/(h.coord-d),g=C2(p,[c.color,h.color]);return{coord:f,color:g}}for(var s=0;s<n;s++){var l=t[s],u=l.coord;if(u<0)i=l;else if(u>e){a?r.push(o(a,l,e)):i&&r.push(o(i,l,0),o(i,l,e));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function Vne(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=re(a.stops,function(S){return{coord:l.toGlobalCoord(l.dataToCoord(S.value)),color:S.color}}),c=u.length,h=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var f=jne(u,i==="x"?r.getWidth():r.getHeight()),d=f.length;if(!d&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var p=10,g=f[0].coord-p,m=f[d-1].coord+p,y=m-g;if(y<.001)return"transparent";R(f,function(S){S.offset=(S.coord-g)/y}),f.push({offset:d?f[d-1].offset:.5,color:h[1]||"transparent"}),f.unshift({offset:d?f[0].offset:.5,color:h[0]||"transparent"});var _=new uu(0,0,0,0,f,!0);return _[i]=g,_[i+"2"]=m,_}}}function Fne(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&Gne(a,e))){var o=e.mapDimension(a.dim),s={};return R(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function Gne(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Xv.getSymbolSize(e,o)[t.isHorizontal()?1:0]*1.5>n)return!1;return!0}function Hne(t,e){return isNaN(t)||isNaN(e)}function Wne(t){for(var e=t.length/2;e>0&&Hne(t[e*2-2],t[e*2-1]);e--);return e-1}function jE(t,e){return[t[e*2],t[e*2+1]]}function Une(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=t[u*2+i],!(isNaN(o)||isNaN(t[u*2+1-i]))){if(u===0){a=o;continue}if(a<=e&&o>=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function MG(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<ln.length;e++)if(t.get([ln[e],"endLabel","show"]))return!0;return!1}function W1(t,e,r,n){if(xs(e,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=MG(n)?function(d,p){t._endLabelOnDuring(d,p,o,s,a,i,e)}:null,u=e.getBaseAxis().isHorizontal(),c=TG(e,r,n,function(){var d=t._endLabel;d&&r&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var h=c.shape,f=Math.max(h.width,h.height);u?(h.y-=f,h.height+=f*2):(h.x-=f,h.width+=f*2)}return l&&l(1,c),c}else return CG(e,r,n)}function Zne(t,e){var r=e.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:t.get("align")||a,verticalAlign:t.get("verticalAlign")||o}}}var $ne=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(){var r=new _e,n=new qv;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r,this._changePolyState=le(this._changePolyState,this)},e.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=r.getModel("lineStyle"),u=r.getModel("areaStyle"),c=s.getLayout("points")||[],h=a.type==="polar",f=this._coordSys,d=this._symbolDraw,p=this._polyline,g=this._polygon,m=this._lineGroup,y=!n.ssr&&r.get("animation"),_=!u.isEmpty(),S=u.get("origin"),T=xG(a,s,S),C=_&&Bne(a,s,T),M=r.get("showSymbol"),A=r.get("connectNulls"),k=M&&!h&&Fne(r,s,a),E=this._data;E&&E.eachItemGraphicEl(function(ue,ve){ue.__temp&&(o.remove(ue),E.setItemGraphicEl(ve,null))}),M||d.remove(),o.add(m);var D=h?!1:r.get("step"),I;a&&a.getArea&&r.get("clip",!0)&&(I=a.getArea(),I.width!=null?(I.x-=.1,I.y-=.1,I.width+=.2,I.height+=.2):I.r0&&(I.r0-=.5,I.r+=.5)),this._clipShapeForSymbol=I;var z=Vne(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(p&&f.type===a.type&&D===this._step))M&&d.updateData(s,{isIgnore:k,clipShape:I,disableAnimation:!0,getSymbolPoint:function(ue){return[c[ue*2],c[ue*2+1]]}}),y&&this._initSymbolLabelAnimation(s,a,I),D&&(C&&(C=Io(C,c,a,D,A)),c=Io(c,null,a,D,A)),p=this._newPolyline(c),_?g=this._newPolygon(c,C):g&&(m.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(r,a,eu(z)),m.setClipPath(W1(this,a,!0,r));else{_&&!g?g=this._newPolygon(c,C):g&&!_&&(m.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(r,a,eu(z));var O=m.getClipPath();if(O){var V=W1(this,a,!1,r);St(O,{shape:V.shape},r)}else m.setClipPath(W1(this,a,!0,r));M&&d.updateData(s,{isIgnore:k,clipShape:I,disableAnimation:!0,getSymbolPoint:function(ue){return[c[ue*2],c[ue*2+1]]}}),(!RE(this._stackedOnPoints,C)||!RE(this._points,c))&&(y?this._doUpdateAnimation(s,C,a,i,D,S,A):(D&&(C&&(C=Io(C,c,a,D,A)),c=Io(c,null,a,D,A)),p.setShape({points:c}),g&&g.setShape({points:c,stackedOnPoints:C})))}var G=r.getModel("emphasis"),F=G.get("focus"),U=G.get("blurScope"),j=G.get("disabled");if(p.useStyle(Se(l.getLineStyle(),{fill:"none",stroke:z,lineJoin:"bevel"})),ir(p,r,"lineStyle"),p.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var W=p.getState("emphasis").style;W.lineWidth=+p.style.lineWidth+1}Le(p).seriesIndex=r.seriesIndex,wt(p,F,U,j);var H=BE(r.get("smooth")),X=r.get("smoothMonotone");if(p.setShape({smooth:H,smoothMonotone:X,connectNulls:A}),g){var K=s.getCalculationInfo("stackedOnSeries"),ne=0;g.useStyle(Se(u.getAreaStyle(),{fill:z,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),K&&(ne=BE(K.get("smooth"))),g.setShape({smooth:H,stackedOnSmooth:ne,smoothMonotone:X,connectNulls:A}),ir(g,r,"areaStyle"),Le(g).seriesIndex=r.seriesIndex,wt(g,F,U,j)}var ie=this._changePolyState;s.eachItemGraphicEl(function(ue){ue&&(ue.onHoverStateChange=ie)}),this._polyline.onHoverStateChange=ie,this._data=s,this._coordSys=a,this._stackedOnPoints=C,this._points=c,this._step=D,this._valueOrigin=S,r.get("triggerLineEvent")&&(this.packEventData(r,p),g&&this.packEventData(r,g))},e.prototype.packEventData=function(r,n){Le(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Xl(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 c=l[s*2],h=l[s*2+1];if(isNaN(c)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,h))return;var f=r.get("zlevel")||0,d=r.get("z")||0;u=new Xv(o,s),u.x=c,u.y=h,u.setZ(f,d);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=f,p.z=d,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else lt.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Xl(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 lt.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;wy(this._polyline,r),n&&wy(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new One({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new wG({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.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,c=u.get("animationDuration");me(c)&&(c=c(null));var h=u.get("animationDelay")||0,f=me(h)?h(null):h;r.eachItemGraphicEl(function(d,p){var g=d;if(g){var m=[d.x,d.y],y=void 0,_=void 0,S=void 0;if(i)if(o){var T=i,C=n.pointToCoord(m);a?(y=T.startAngle,_=T.endAngle,S=-C[1]/180*Math.PI):(y=T.r0,_=T.r,S=C[0])}else{var M=i;a?(y=M.x,_=M.x+M.width,S=d.x):(y=M.y+M.height,_=M.y,S=d.y)}var A=_===y?0:(S-y)/(_-y);l&&(A=1-A);var k=me(h)?h(p):c*A+f,E=g.getSymbolPath(),D=E.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:k}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:k}),E.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(MG(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 Xe({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=Wne(l);c>=0&&(vr(s,ar(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(h,f,d){return d!=null?_G(o,d):ih(o,h)},enableTextSetter:!0},Zne(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=i.getLayout("points"),f=i.hostModel,d=f.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,m=l.getBaseAxis(),y=m.isHorizontal(),_=m.inverse,S=n.shape,T=_?y?S.x:S.y+S.height:y?S.x+S.width:S.y,C=(y?g:0)*(_?-1:1),M=(y?0:-g)*(_?-1:1),A=y?"x":"y",k=Une(h,T,A),E=k.range,D=E[1]-E[0],I=void 0;if(D>=1){if(D>1&&!d){var z=jE(h,E[0]);u.attr({x:z[0]+C,y:z[1]+M}),o&&(I=f.getRawValue(E[0]))}else{var z=c.getPointOn(T,A);z&&u.attr({x:z[0]+C,y:z[1]+M});var O=f.getRawValue(E[0]),V=f.getRawValue(E[1]);o&&(I=K4(i,p,O,V,k.t))}a.lastFrameIndex=E[0]}else{var G=r===1||a.lastFrameIndex>0?E[0]:0,z=jE(h,G);o&&(I=f.getRawValue(G)),u.attr({x:z[0]+C,y:z[1]+M})}if(o){var F=bh(u);typeof F.setLabelText=="function"&&F.setLabelText(I)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,h=r.hostModel,f=Rne(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=f.current,p=f.stackedOnCurrent,g=f.next,m=f.stackedOnNext;if(o&&(p=Io(f.stackedOnCurrent,f.current,i,o,l),d=Io(f.current,null,i,o,l),m=Io(f.stackedOnNext,f.next,i,o,l),g=Io(f.next,null,i,o,l)),zE(d,g)>3e3||c&&zE(p,m)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:m}));return}u.shape.__points=f.current,u.shape.points=d;var y={shape:{points:g}};f.current!==d&&(y.shape.__points=f.next),u.stopAnimation(),Qe(u,y,h),c&&(c.setShape({points:d,stackedOnPoints:p}),c.stopAnimation(),Qe(c,{shape:{stackedOnPoints:m}},h),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],S=f.status,T=0;T<S.length;T++){var C=S[T].cmd;if(C==="="){var M=r.getItemGraphicEl(S[T].idx1);M&&_.push({el:M,ptIdx:T})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var A=u.shape.__points,k=0;k<_.length;k++){var E=_[k].el,D=_[k].ptIdx*2;E.x=A[D],E.y=A[D+1],E.markRedraw()}})},e.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(lt);function Qv(t,e){return{seriesType:t,plan:Mh(),reset:function(r){var n=r.getData(),i=r.coordinateSystem,a=r.pipelineContext,o=e||a.large;if(i){var s=re(i.dimensions,function(d){return n.mapDimension(d)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");po(n,s[0])&&(s[0]=u),po(n,s[1])&&(s[1]=u);var c=n.getStore(),h=n.getDimensionIndex(s[0]),f=n.getDimensionIndex(s[1]);return l&&{progress:function(d,p){for(var g=d.end-d.start,m=o&&fa(g*l),y=[],_=[],S=d.start,T=0;S<d.end;S++){var C=void 0;if(l===1){var M=c.get(h,S);C=i.dataToPoint(M,null,_)}else y[0]=c.get(h,S),y[1]=c.get(f,S),C=i.dataToPoint(y,null,_);o?(m[T++]=C[0],m[T++]=C[1]):p.setItemLayout(S,C.slice())}o&&p.setLayout("points",m)}}}}}}var Yne={average:function(t){for(var e=0,r=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],r++);return r===0?NaN:e/r},sum:function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r]||0;return e},max:function(t){for(var e=-1/0,r=0;r<t.length;r++)t[r]>e&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r<t.length;r++)t[r]<e&&(e=t[r]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},Xne=function(t){return Math.round(t.length/2)};function AG(t){return{seriesType:t,reset:function(e,r,n){var i=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),h=n.getDevicePixelRatio(),f=Math.abs(c[1]-c[0])*(h||1),d=Math.round(s/f);if(isFinite(d)&&d>1){a==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d)):a==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/d));var p=void 0;se(a)?p=Yne[a]:me(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/d,p,Xne))}}}}}function qne(t){t.registerChartView($ne),t.registerSeriesModel(Dne),t.registerLayout(Qv("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,AG("line"))}var pv=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return ka(null,this,{useEncodeDefaulter:!0})},e.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)R(a.getAxes(),function(f,d){if(f.type==="category"&&n!=null){var p=f.getTicksCoords(),g=f.getTickModel().get("alignWithLabel"),m=o[d],y=n[d]==="x1"||n[d]==="y1";if(y&&!g&&(m+=1),p.length<2)return;if(p.length===2){s[d]=f.toGlobalCoord(f.getExtent()[y?1:0]);return}for(var _=void 0,S=void 0,T=1,C=0;C<p.length;C++){var M=p[C].coord,A=C===p.length-1?p[C-1].tickValue+T:p[C].tickValue;if(A===m){S=M;break}else if(A<m)_=M;else if(_!=null&&A>m){S=(M+_)/2;break}C===1&&(T=A-p[0].tickValue)}S==null&&(_?_&&(S=p[p.length-1].coord):S=p[0].coord),s[d]=f.toGlobalCoord(S)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e}(dt);dt.registerClass(pv);var Kne=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return ka(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=ks(pv.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:q.color.primary,borderWidth:2}},realtimeSort:!1}),e}(pv),Qne=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),Zy=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new Qne},e.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,c=n.startAngle,h=n.endAngle,f=n.clockwise,d=Math.PI*2,p=f?h-c<d:c-h<d;p||(c=h-(f?d:-d));var g=Math.cos(c),m=Math.sin(c),y=Math.cos(h),_=Math.sin(h);p?(r.moveTo(g*o+i,m*o+a),r.arc(g*u+i,m*u+a,l,-Math.PI+c,c,!f)):r.moveTo(g*s+i,m*s+a),r.arc(i,a,s,c,h,!f),r.arc(y*u+i,_*u+a,l,h-Math.PI*2,h-Math.PI,!f),o!==0&&r.arc(i,a,o,h,c,f)},e}(Ue);function Jne(t,e){e=e||{};var r=e.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return yy(n,i,a);var s=t(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,h=u.cy,f=u.r,d=u.r0,p=(f+d)/2,g=u.startAngle,m=u.endAngle,y=(g+m)/2,_=r?Math.abs(f-d)/2:0,S=Math.cos,T=Math.sin,C=c+f*S(g),M=h+f*T(g),A="left",k="top";switch(s){case"startArc":C=c+(d-l)*S(y),M=h+(d-l)*T(y),A="center",k="top";break;case"insideStartArc":C=c+(d+l)*S(y),M=h+(d+l)*T(y),A="center",k="bottom";break;case"startAngle":C=c+p*S(g)+Cg(g,l+_,!1),M=h+p*T(g)+Mg(g,l+_,!1),A="right",k="middle";break;case"insideStartAngle":C=c+p*S(g)+Cg(g,-l+_,!1),M=h+p*T(g)+Mg(g,-l+_,!1),A="left",k="middle";break;case"middle":C=c+p*S(y),M=h+p*T(y),A="center",k="middle";break;case"endArc":C=c+(f+l)*S(y),M=h+(f+l)*T(y),A="center",k="bottom";break;case"insideEndArc":C=c+(f-l)*S(y),M=h+(f-l)*T(y),A="center",k="top";break;case"endAngle":C=c+p*S(m)+Cg(m,l+_,!0),M=h+p*T(m)+Mg(m,l+_,!0),A="left",k="middle";break;case"insideEndAngle":C=c+p*S(m)+Cg(m,-l+_,!0),M=h+p*T(m)+Mg(m,-l+_,!0),A="right",k="middle";break;default:return yy(n,i,a)}return n=n||{},n.x=C,n.y=M,n.align=A,n.verticalAlign=k,n}}function eie(t,e,r,n){if(qe(n)){t.setTextConfig({rotation:n});return}else if(ee(e)){t.setTextConfig({rotation:0});return}var i=t.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=r(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:t.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),t.setTextConfig({rotation:c})}function Cg(t,e,r){return e*Math.sin(t)*(r?-1:1)}function Mg(t,e,r){return e*Math.cos(t)*(r?1:-1)}function va(t,e,r){var n=t.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;ee(n)||(n=[n,n,n,n]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:re(n,function(a){return Bi(a,i)})}}var U1=Math.max,Z1=Math.min;function tie(t,e){var r=t.getArea&&t.getArea();if(xs(t,"cartesian2d")){var n=t.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=e.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var rie=function(t){Y(e,t);function e(){var r=t.call(this)||this;return r.type=e.type,r._isFirstFrame=!0,r}return e.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a))},e.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},e.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},e.prototype.eachRendered=function(r){Ps(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r,n,i,a){var o=this.group,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.getBaseAxis(),h;u.type==="cartesian2d"?h=c.isHorizontal():u.type==="polar"&&(h=c.dim==="angle");var f=r.isAnimationEnabled()?r:null,d=nie(r,u);d&&this._enableRealtimeSort(d,s,i);var p=r.get("clip",!0)||d,g=tie(u,s);o.removeClipPath();var m=r.get("roundCap",!0),y=r.get("showBackground",!0),_=r.getModel("backgroundStyle"),S=_.get("borderRadius")||0,T=[],C=this._backgroundEls,M=a&&a.isInitSort,A=a&&a.type==="changeAxisOrder";function k(I){var z=Ag[u.type](s,I);if(!z)return null;var O=cie(u,h,z);return O.useStyle(_.getItemStyle()),u.type==="cartesian2d"?O.setShape("r",S):O.setShape("cornerRadius",S),T[I]=O,O}s.diff(l).add(function(I){var z=s.getItemModel(I),O=Ag[u.type](s,I,z);if(O&&(y&&k(I),!(!s.hasValue(I)||!WE[u.type](O)))){var V=!1;p&&(V=VE[u.type](g,O));var G=FE[u.type](r,s,I,O,h,f,c.model,!1,m);d&&(G.forceLabelAnimation=!0),UE(G,s,I,z,O,r,h,u.type==="polar"),M?G.attr({shape:O}):d?GE(d,f,G,O,I,h,!1,!1):St(G,{shape:O},r,I),s.setItemGraphicEl(I,G),o.add(G),G.ignore=V}}).update(function(I,z){var O=s.getItemModel(I),V=Ag[u.type](s,I,O);if(V){if(y){var G=void 0;C.length===0?G=k(z):(G=C[z],G.useStyle(_.getItemStyle()),u.type==="cartesian2d"?G.setShape("r",S):G.setShape("cornerRadius",S),T[I]=G);var F=Ag[u.type](s,I),U=PG(h,F,u);Qe(G,{shape:U},f,I)}var j=l.getItemGraphicEl(z);if(!s.hasValue(I)||!WE[u.type](V)){o.remove(j);return}var W=!1;p&&(W=VE[u.type](g,V),W&&o.remove(j));var H=j&&(j.type==="sector"&&m||j.type==="sausage"&&!m);if(H&&(j&&to(j,r,z),j=null),j?di(j):j=FE[u.type](r,s,I,V,h,f,c.model,!0,m),d&&(j.forceLabelAnimation=!0),A){var X=j.getTextContent();if(X){var K=bh(X);K.prevValue!=null&&(K.prevValue=K.value)}}else UE(j,s,I,O,V,r,h,u.type==="polar");M?j.attr({shape:V}):d?GE(d,f,j,V,I,h,!0,A):Qe(j,{shape:V},r,I,null),s.setItemGraphicEl(I,j),j.ignore=W,o.add(j)}}).remove(function(I){var z=l.getItemGraphicEl(I);z&&to(z,r,I)}).execute();var E=this._backgroundGroup||(this._backgroundGroup=new _e);E.removeAll();for(var D=0;D<T.length;++D)E.add(T[D]);o.add(E),this._backgroundEls=T,this._data=s},e.prototype._renderLarge=function(r,n,i){this._clear(),$E(r,this.group),this._updateLargeClip(r)},e.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),$E(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&Kv(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},e.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var l=i(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:re(a,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=r.rawIndexOf(o,a.getRawOrdinalNumber(l)),h=c<0?Number.MIN_VALUE:n(r.indexOfRawIndex(c));if(h>s)return!0;s=h}return!1},e.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},e.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}))}},e.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})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.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){to(a,r,Le(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(lt),VE={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=U1(e.x,t.x),s=Z1(e.x+e.width,i),l=U1(e.y,t.y),u=Z1(e.y+e.height,a),c=s<o,h=u<l;return e.x=c&&o>i?s:o,e.y=h&&l>a?u:l,e.width=c?0:s-o,e.height=h?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||h},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=Z1(e.r,t.r),a=U1(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},FE={cartesian2d:function(t,e,r,n,i,a,o,s,l){var u=new Be({shape:J({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,h=i?"height":"width";c[h]=0}return u},polar:function(t,e,r,n,i,a,o,s,l){var u=!i&&l?Zy:Or,c=new u({shape:n,z2:1});c.name="item";var h=LG(i);if(c.calculateTextPosition=Jne(h,{isRoundCap:u===Zy}),a){var f=c.shape,d=i?"r":"endAngle",p={};f[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?Qe:St)(c,{shape:p},a)}return c}};function nie(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function GE(t,e,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?Qe:St)(r,{shape:l},e,i,null);var c=e?t.baseAxis.model:null;(o?Qe:St)(r,{shape:u},c,i)}function HE(t,e){for(var r=0;r<e.length;r++)if(!isFinite(t[e[r]]))return!0;return!1}var iie=["x","y","width","height"],aie=["cx","cy","r","startAngle","endAngle"],WE={cartesian2d:function(t){return!HE(t,iie)},polar:function(t){return!HE(t,aie)}},Ag={cartesian2d:function(t,e,r){var n=t.getItemLayout(e);if(!n)return null;var i=r?sie(r,n):0,a=n.width>0?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(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function oie(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function LG(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function UE(t,e,r,n,i,a,o,s){var l=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=t.shape,h=va(n.getModel("itemStyle"),c,!0);J(c,h),t.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var f=n.getShallow("cursor");f&&t.attr("cursor",f);var d=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",p=ar(n);vr(t,p,{labelFetcher:a,labelDataIndex:r,defaultText:ih(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var g=t.getTextContent();if(s&&g){var m=n.get(["label","position"]);t.textConfig.inside=m==="middle"?!0:null,eie(t,m==="outside"?d:m,LG(o),n.get(["label","rotate"]))}Bj(g,p,a.getRawValue(r),function(_){return _G(e,_)});var y=n.getModel(["emphasis"]);wt(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),ir(t,n),oie(i)&&(t.style.fill="none",t.style.stroke="none",R(t.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function sie(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var lie=function(){function t(){}return t}(),ZE=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new lie},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[a]=u,l[o]=i[c+2],s[a]=i[c+a],s[o]=i[c+o],r.rect(s[0],s[1],l[0],l[1])},e}(Ue);function $E(t,e,r,n){var i=t.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=t.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new ZE({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),r&&r.push(c)}var h=new ZE({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=s,e.add(h),h.useStyle(i.getVisual("style")),h.style.stroke=null,Le(h).seriesIndex=t.seriesIndex,t.get("silent")||(h.on("mousedown",YE),h.on("mousemove",YE)),r&&r.push(h)}var YE=o_(function(t){var e=this,r=uie(e,t.offsetX,t.offsetY);Le(e).dataIndex=r>=0?r:null},30,!1);function uie(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,h=a.length/3;c<h;c++){var f=c*3;if(l[n]=u,l[i]=a[f+2],s[n]=a[f+n],s[i]=a[f+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),e>=s[0]&&e<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function PG(t,e,r){if(xs(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function cie(t,e,r){var n=t.type==="polar"?Or:Be;return new n({shape:PG(e,r,t),silent:!0,z2:0})}function hie(t){t.registerChartView(rie),t.registerSeriesModel(Kne),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(IF,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,EF("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,AG("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var XE=Math.PI*2,Lg=Math.PI/180;function fie(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=rV(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,h=o.viewRect,f=-n.get("startAngle")*Lg,d=n.get("endAngle"),p=n.get("padAngle")*Lg;d=d==="auto"?f-XE:-d*Lg;var g=n.get("minAngle")*Lg,m=g+p,y=0;i.each(a,function(U){!isNaN(U)&&y++});var _=i.getSum(a),S=Math.PI/(_||y)*2,T=n.get("clockwise"),C=n.get("roseType"),M=n.get("stillShowZeroSum"),A=i.getDataExtent(a);A[0]=0;var k=T?1:-1,E=[f,d],D=k*p/2;X0(E,!T),f=E[0],d=E[1];var I=kG(n);I.startAngle=f,I.endAngle=d,I.clockwise=T,I.cx=s,I.cy=l,I.r=u,I.r0=c;var z=Math.abs(d-f),O=z,V=0,G=f;if(i.setLayout({viewRect:h,r:u}),i.each(a,function(U,j){var W;if(isNaN(U)){i.setItemLayout(j,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:T,cx:s,cy:l,r0:c,r:C?NaN:u});return}C!=="area"?W=_===0&&M?S:U*S:W=z/y,W<m?(W=m,O-=m):V+=U;var H=G+k*W,X=0,K=0;p>W?(X=G+k*W/2,K=X):(X=G+D,K=H-D),i.setItemLayout(j,{angle:W,startAngle:X,endAngle:K,clockwise:T,cx:s,cy:l,r0:c,r:C?it(U,A,[c,u]):u}),G=H}),O<XE&&y)if(O<=.001){var F=z/y;i.each(a,function(U,j){if(!isNaN(U)){var W=i.getItemLayout(j);W.angle=F;var H=0,X=0;F<p?(H=f+k*(j+1/2)*F,X=H):(H=f+k*j*F+D,X=f+k*(j+1)*F-D),W.startAngle=H,W.endAngle=X}})}else S=O/V,G=f,i.each(a,function(U,j){if(!isNaN(U)){var W=i.getItemLayout(j),H=W.angle===m?m:U*S,X=0,K=0;H<p?(X=G+k*H/2,K=X):(X=G+D,K=G+k*H-D),W.startAngle=X,W.endAngle=K,G+=k*H}})})}var kG=Fe();function Ih(t){return{seriesType:t,reset:function(e,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=e.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var die=Math.PI/180;function qE(t,e,r,n,i,a,o,s,l,u){if(t.length<2)return;function c(g){for(var m=g.rB,y=m*m,_=0;_<g.list.length;_++){var S=g.list[_],T=Math.abs(S.label.y-r),C=n+S.len,M=C*C,A=Math.sqrt(Math.abs((1-T*T/y)*M)),k=e+(A+S.len2)*i,E=k-S.label.x,D=S.targetTextWidth-E*i;DG(S,D,!0),S.label.x=k}}function h(g){for(var m={list:[],maxY:0},y={list:[],maxY:0},_=0;_<g.length;_++)if(g[_].labelAlignTo==="none"){var S=g[_],T=S.label.y>r?y:m,C=Math.abs(S.label.y-r);if(C>=T.maxY){var M=S.label.x-e-S.len2*i,A=n+S.len,k=Math.abs(M)<A?Math.sqrt(C*C/(1-M*M/A/A)):A;T.rB=k,T.maxY=C}T.list.push(S)}c(m),c(y)}for(var f=t.length,d=0;d<f;d++)if(t[d].position==="outer"&&t[d].labelAlignTo==="labelLine"){var p=t[d].label.x-u;t[d].linePoints[1][0]+=p,t[d].label.x=u}hT(t,1,l,l+o)&&h(t)}function vie(t,e,r,n,i,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,f=0;f<t.length;f++){var d=t[f].label;$1(t[f])||(d.x<e?(c=Math.min(c,d.x),l.push(t[f])):(h=Math.max(h,d.x),u.push(t[f])))}for(var f=0;f<t.length;f++){var p=t[f];if(!$1(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var d=p.label,g=p.linePoints,m=void 0;p.labelAlignTo==="edge"?d.x<e?m=g[2][0]-p.labelDistance-o-p.edgeDistance:m=o+i-p.edgeDistance-g[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?d.x<e?m=c-o-p.bleedMargin:m=o+i-h-p.bleedMargin:d.x<e?m=d.x-o-p.bleedMargin:m=o+i-d.x-p.bleedMargin,p.targetTextWidth=m,DG(p,m,!1)}}qE(u,e,r,n,1,i,a,o,s,h),qE(l,e,r,n,-1,i,a,o,s,c);for(var f=0;f<t.length;f++){var p=t[f];if(!$1(p)&&p.linePoints){var d=p.label,g=p.linePoints,y=p.labelAlignTo==="edge",_=d.style.padding,S=_?_[1]+_[3]:0,T=d.style.backgroundColor?0:S,C=p.rect.width+T,M=g[1][0]-g[2][0];y?d.x<e?g[2][0]=o+p.edgeDistance+C+p.labelDistance:g[2][0]=o+i-p.edgeDistance-C-p.labelDistance:(d.x<e?g[2][0]=d.x+p.labelDistance:g[2][0]=d.x-p.labelDistance,g[1][0]=g[2][0]+M),g[1][1]=g[2][1]=d.y}}}function DG(t,e,r){if(t.labelStyleWidth==null){var n=t.label,i=n.style,a=t.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=a.width+(o?0:l);if(e<c||r){if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-l);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var f=e-l,d=e<c?f:r?f>t.unconstrainedWidth?null:f:null;n.setStyle("width",d)}IG(a,n)}}}function IG(t,e){KE.rect=t,rG(KE,e,pie)}var pie={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},KE={};function $1(t){return t.position==="center"}function gie(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*die,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,h=s.y,f=s.height;function d(M){M.ignore=!0}function p(M){if(!M.ignore)return!0;for(var A in M.states)if(M.states[A].ignore===!1)return!0;return!1}e.each(function(M){var A=e.getItemGraphicEl(M),k=A.shape,E=A.getTextContent(),D=A.getTextGuideLine(),I=e.getItemModel(M),z=I.getModel("label"),O=z.get("position")||I.get(["emphasis","label","position"]),V=z.get("distanceToLabelLine"),G=z.get("alignTo"),F=oe(z.get("edgeDistance"),u),U=z.get("bleedMargin");U==null&&(U=Math.min(u,f)>200?10:2);var j=I.getModel("labelLine"),W=j.get("length");W=oe(W,u);var H=j.get("length2");if(H=oe(H,u),Math.abs(k.endAngle-k.startAngle)<o){R(E.states,d),E.ignore=!0,D&&(R(D.states,d),D.ignore=!0);return}if(p(E)){var X=(k.startAngle+k.endAngle)/2,K=Math.cos(X),ne=Math.sin(X),ie,ue,ve,Ge;n=k.cx,i=k.cy;var xe=O==="inside"||O==="inner";if(O==="center")ie=k.cx,ue=k.cy,Ge="center";else{var ge=(xe?(k.r+k.r0)/2*K:k.r*K)+n,ke=(xe?(k.r+k.r0)/2*ne:k.r*ne)+i;if(ie=ge+K*3,ue=ke+ne*3,!xe){var fe=ge+K*(W+l-k.r),Me=ke+ne*(W+l-k.r),st=fe+(K<0?-1:1)*H,Ye=Me;G==="edge"?ie=K<0?c+F:c+u-F:ie=st+(K<0?-V:V),ue=Ye,ve=[[ge,ke],[fe,Me],[st,Ye]]}Ge=xe?"center":G==="edge"?K>0?"right":"left":K>0?"left":"right"}var rt=Math.PI,ut=0,Dt=z.get("rotate");if(qe(Dt))ut=Dt*(rt/180);else if(O==="center")ut=0;else if(Dt==="radial"||Dt===!0){var gr=K<0?-X+rt:-X;ut=gr}else if(Dt==="tangential"&&O!=="outside"&&O!=="outer"){var Br=Math.atan2(K,ne);Br<0&&(Br=rt*2+Br);var Gi=ne>0;Gi&&(Br=rt+Br),ut=Br-rt}if(a=!!ut,E.x=ie,E.y=ue,E.rotation=ut,E.setStyle({verticalAlign:"middle"}),xe){E.setStyle({align:Ge});var yu=E.states.select;yu&&(yu.x+=E.x,yu.y+=E.y)}else{var Hi=new Ce(0,0,0,0);IG(Hi,E),r.push({label:E,labelLine:D,position:O,len:W,len2:H,minTurnAngle:j.get("minTurnAngle"),maxSurfaceAngle:j.get("maxSurfaceAngle"),surfaceNormal:new Te(K,ne),linePoints:ve,textAlign:Ge,labelDistance:V,labelAlignTo:G,edgeDistance:F,bleedMargin:U,rect:Hi,unconstrainedWidth:Hi.width,labelStyleWidth:E.style.width})}A.setTextConfig({inside:xe})}}),!a&&t.get("avoidLabelOverlap")&&vie(r,n,i,l,u,f,c,h);for(var g=0;g<r.length;g++){var m=r[g],y=m.label,_=m.labelLine,S=isNaN(y.x)||isNaN(y.y);if(y){y.setStyle({align:m.textAlign}),S&&(R(y.states,d),y.ignore=!0);var T=y.states.select;T&&(T.x+=y.x,T.y+=y.y)}if(_){var C=m.linePoints;S||!C?(R(_.states,d),_.ignore=!0):(JF(C,m.minTurnAngle),Ore(C,m.surfaceNormal,m.maxSurfaceAngle),_.setShape({points:C}),y.__hostTarget.textGuideLineConfig={anchor:new Te(C[0][0],C[0][1])})}}}var mie=function(t){Y(e,t);function e(r,n,i){var a=t.call(this)||this;a.z2=2;var o=new Xe;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,l=r.getItemModel(n),u=l.getModel("emphasis"),c=r.getItemLayout(n),h=J(va(l.getModel("itemStyle"),c,!0),c);if(isNaN(h.startAngle)){o.setShape(h);return}if(a){o.setShape(h);var f=s.getShallow("animationType");s.ecModel.ssr?(St(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=h.cx,o.originY=h.cy):f==="scale"?(o.shape.r=c.r0,St(o,{shape:{r:c.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),St(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,Qe(o,{shape:{endAngle:c.endAngle}},s,n))}else di(o),Qe(o,{shape:h},s,n);o.useStyle(r.getItemVisual(n,"style")),ir(o,l);var d=(c.startAngle+c.endAngle)/2,p=s.get("selectedOffset"),g=Math.cos(d)*p,m=Math.sin(d)*p,y=l.getShallow("cursor");y&&o.attr("cursor",y),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=J({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},va(u.getModel("itemStyle"),c)),J(o.ensureState("select"),{x:g,y:m,shape:va(l.getModel(["select","itemStyle"]),c)}),J(o.ensureState("blur"),{shape:va(l.getModel(["blur","itemStyle"]),c)});var _=o.getTextGuideLine(),S=o.getTextContent();_&&J(_.ensureState("select"),{x:g,y:m}),J(S.ensureState("select"),{x:g,y:m}),wt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),l=n.getItemVisual(i,"style"),u=l&&l.fill,c=l&&l.opacity;vr(a,ar(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:c,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var h=a.getTextContent();a.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var f=o.get(["label","position"]);if(f!=="outside"&&f!=="outer")a.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Tr,this.setTextGuideLine(d)),jM(this,VM(o),{stroke:u,opacity:Sn(s.get(["lineStyle","opacity"]),c,1)})}},e}(Or),yie=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i,a){var o=r.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),h=1;isNaN(c&&c.startAngle)&&h<o.count();++h)c=o.getItemLayout(h);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var f=kG(r),d=new Or({shape:ye(f)});d.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,l.add(d)}o.diff(s).add(function(p){var g=new mie(o,p,u);o.setItemGraphicEl(p,g),l.add(g)}).update(function(p,g){var m=s.getItemGraphicEl(g);m.updateData(o,p,u),m.off("click"),l.add(m),o.setItemGraphicEl(p,m)}).remove(function(p){var g=s.getItemGraphicEl(p);to(g,r,p)}).execute(),gie(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.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}},e.type="pie",e}(lt);function Eh(t,e,r){e=ee(e)&&{coordDimensions:e}||J({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=Ph(n,e).dimensions,a=new Yr(i,t);return a.initData(n,r),a}var Nh=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),_ie=Fe(),EG=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Nh(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Eh(this,{coordDimensions:["value"],encodeDefaulter:Ie(dM,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=_ie(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=F4(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){Yl(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},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(dt);fQ({fullType:EG.type,getCoord2:function(t){return t.getShallow("center")}});function xie(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(qe(o)&&!isNaN(o)&&o<0)})}}}function Sie(t){t.registerChartView(yie),t.registerSeriesModel(EG),$V("pie",t.registerAction),t.registerLayout(Ie(fie,"pie")),t.registerProcessor(Ih("pie")),t.registerProcessor(xie("pie"))}var bie=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,n){return ka(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:q.color.primary}},universalTransition:{divideShape:"clone"}},e}(dt),NG=4,wie=function(){function t(){}return t}(),Tie=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new wie},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.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]<NG,c=this.softClipShape,h;if(u){this._ctx=l;return}for(this._ctx=null,h=this._off;h<i.length;){var f=i[h++],d=i[h++];isNaN(f)||isNaN(d)||c&&!c.contain(f,d)||(s.x=f-a[0]/2,s.y=d-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(r,s,!0))}this.incremental&&(this._off=h,this.notClear=!0)},e.prototype.afterBrush=function(){var r=this.shape,n=r.points,i=r.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(r,n){for(var i=this.shape,a=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var c=u*2,h=a[c]-s/2,f=a[c+1]-l/2;if(r>=h&&n>=f&&r<=h+s&&n<=f+l)return u}return-1},e.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},e.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,c=-1/0,h=-1/0,f=0;f<i.length;){var d=i[f++],p=i[f++];l=Math.min(d,l),c=Math.max(d,c),u=Math.min(p,u),h=Math.max(p,h)}r=this._rect=new Ce(l-o/2,u-s/2,c-l+o,h-u+s)}return r},e}(Ue),Cie=function(){function t(){this.group=new _e}return t.prototype.updateData=function(e,r){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,r)},t.prototype.updateLayout=function(e){var r=e.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;r=new Float32Array(r.buffer,a,i)}n.setShape("points",r),n.reset()})},t.prototype.incrementalPrepareUpdate=function(e){this._clear()},t.prototype.incrementalUpdate=function(e,r,n){var i=this._newAdded[0],a=r.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),i.endIndex=e.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,r,n)}},t.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},t.prototype._create=function(){var e=new Tie({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},t.prototype._setCommon=function(e,r,n){var i=r.hostModel;n=n||{};var a=r.getVisual("symbolSize");e.setShape("size",a instanceof Array?a:[a,a]),e.softClipShape=n.clipShape||null,e.symbolProxy=Ut(r.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<NG;e.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=r.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=Le(e);u.seriesIndex=i.seriesIndex,e.on("mousemove",function(c){u.dataIndex=null;var h=e.hoverDataIdx;h>=0&&(u.dataIndex=h+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),Mie=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.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},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},e.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=Qv("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},e.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.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 Cie:new qv,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(lt),RG={left:0,right:0,top:0,bottom:0},$y=["25%","25%"],Aie=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(r,n){var i=hu(r.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&Ca(r.outerBounds,i)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Ca(this.option.outerBounds,r.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:RG,outerBoundsContain:"all",outerBoundsClampWidth:$y[0],outerBoundsClampHeight:$y[1],backgroundColor:q.color.transparent,borderWidth:1,borderColor:q.color.neutral30},e}(Ve),gT=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",kt).models[0]},e.type="cartesian2dAxis",e}(Ve);Bt(gT,Dh);var OG={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:q.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:q.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[q.color.backgroundTint,q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:q.color.neutral00,borderColor:q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},Lie=Ne({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},OG),$M=Ne({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:q.color.axisMinorSplitLine,width:1}}},OG),Pie=Ne({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},$M),kie=Se({logBase:10},$M);const zG={category:Lie,value:$M,time:Pie,log:kie};var Die={value:1,category:1,time:1,log:1},mT=null;function Iie(t){mT||(mT=t)}function Jv(){return mT}function ah(t,e,r,n){R(Die,function(i,a){var o=Ne(Ne({},zG[a],!0),n,!0),s=function(l){Y(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,h){var f=av(this),d=f?hu(c):{},p=h.getTheme();Ne(c,p.get(a+"Axis")),Ne(c,this.getDefaultOption()),c.type=QE(c),f&&Ca(c,d,f)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=hv.createByAxisModel(this))},u.prototype.getCategories=function(c){var h=this.option;if(h.type==="category")return c?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var h=Jv();return h?h.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",QE)}function QE(t){return t.type||(t.data?"category":"value")}var Eie=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return re(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),tt(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),yT=["x","y"];function JE(t){return(t.type==="interval"||t.type==="time")&&!t.hasBreaks()}var Nie=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=yT,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!JE(r)||!JE(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 c=(s[0]-o[0])/l,h=(s[1]-o[1])/u,f=o[0]-i[0]*c,d=o[1]-a[0]*h,p=this._transform=[c,0,0,h,f,d];this._invTransform=hi([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.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]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.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 Ot(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},e.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},e.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return Ot(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},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Ce(a,o,s,l)},e}(Eie),BG=function(t){Y(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.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},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(gi),h_="expandAxisBreak",jG="collapseAxisBreak",VG="toggleAxisBreak",YM="axisbreakchanged",Rie={type:h_,event:YM,update:"update",refineEvent:XM},Oie={type:jG,event:YM,update:"update",refineEvent:XM},zie={type:VG,event:YM,update:"update",refineEvent:XM};function XM(t,e,r,n){var i=[];return R(t,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function Bie(t){t.registerAction(Rie,e),t.registerAction(Oie,e),t.registerAction(zie,e);function e(r,n){var i=[],a=Nc(n,r);function o(s,l){R(a[s],function(u){var c=u.updateAxisBreaks(r);R(c.breaks,function(h){var f;i.push(Se((f={},f[l]=u.componentIndex,f),h))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var Yo=Math.PI,jie=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],Vie=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],oh=Fe(),FG=Fe(),GG=function(){function t(e){this.recordMap={},this.resolveAxisNameOverlap=e}return t.prototype.ensureRecord=function(e){var r=e.axis.dim,n=e.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},t}();function Fie(t,e,r,n){var i=r.axis,a=e.ensureRecord(r),o=[],s,l=qM(t.axisName)&&nh(t.nameLocation);R(n,function(p){var g=Ma(p);if(!(!g||g.label.ignore)){o.push(g);var m=a.transGroup;l&&(m.transform?hi(_f,m.transform):zv(_f),g.transform&&Ii(_f,_f,g.transform),Ce.copy(Pg,g.localRect),Pg.applyTransform(_f),s?s.union(Pg):Ce.copy(s=new Ce(0,0,0,0),Pg))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(p,g){return Math.abs(p.label[u]-c)-Math.abs(g.label[u]-c)}),l&&s){var h=i.getExtent(),f=Math.min(h[0],h[1]),d=Math.max(h[0],h[1])-f;s.union(new Ce(f,0,d,1))}a.stOccupiedRect=s,a.labelInfoList=o}var _f=fr(),Pg=new Ce(0,0,0,0),HG=function(t,e,r,n,i,a){if(nh(t.nameLocation)){var o=a.stOccupiedRect;o&&WG(jre({},o,a.transGroup.transform),n,i)}else UG(a.labelInfoList,a.dirVec,n,i)};function WG(t,e,r){var n=new Te;u_(t,e,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&uT(e,n)}function UG(t,e,r,n){for(var i=Te.dot(n,e)>=0,a=0,o=t.length;a<o;a++){var s=t[i?a:o-1-a];s.label.ignore||WG(s,r,n)}}var on=function(){function t(e,r,n,i){this.group=new _e,this._axisModel=e,this._api=r,this._local={},this._shared=i||new GG(HG),this._resetCfgDetermined(n)}return t.prototype.updateCfg=function(e){var r=this._cfg.raw;r.position=e.position,r.labelOffset=e.labelOffset,this._resetCfgDetermined(r)},t.prototype.__getRawCfg=function(){return this._cfg.raw},t.prototype._resetCfgDetermined=function(e){var r=this._axisModel,n=r.getDefaultOption?r.getDefaultOption():{},i=pe(e.axisName,r.get("name")),a=r.get("nameMoveOverlap");(a==null||a==="auto")&&(a=pe(e.defaultNameMoveOverlap,!0));var o={raw:e,position:e.position,rotation:e.rotation,nameDirection:pe(e.nameDirection,1),tickDirection:pe(e.tickDirection,1),labelDirection:pe(e.labelDirection,1),labelOffset:pe(e.labelOffset,0),silent:pe(e.silent,!0),axisName:i,nameLocation:Sn(r.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:qM(i)&&a,optionHideOverlap:r.get(["axisLabel","hideOverlap"]),showMinorTicks:r.get(["minorTick","show"])};this._cfg=o;var s=new _e({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(r);l.transGroup=this._transformGroup,l.dirVec=new Te(Math.cos(-o.rotation),Math.sin(-o.rotation))},t.prototype.build=function(e,r){var n=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),R(Gie,function(i){e[i]&&Hie[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,r||{})}),this},t.innerTextLayout=function(e,r,n){var i=P2(r-e),a,o;return qc(i)?(o=n>0?"top":"bottom",a="center"):qc(i-Yo)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<Yo?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),Gie=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],Hie={axisLine:function(t,e,r,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,t.raw.axisLineAutoShow!=null&&(s=!!t.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=a.transform,c=[l[0],0],h=[l[1],0],f=c[0]>h[0];u&&(Ot(c,c,u),Ot(h,h,u));var d=J({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:d};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())Jv().buildAxisBreakLine(n,i,a,p);else{var g=new Wt(J({shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]}},p));Jc(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);se(m)&&(m=[m,m]),(se(y)||qe(y))&&(y=[y,y]);var _=du(n.get(["axisLine","symbolOffset"])||0,y),S=y[0],T=y[1];R([{rotate:t.rotation+Math.PI/2,offset:_[0],r:0},{rotate:t.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((c[0]-h[0])*(c[0]-h[0])+(c[1]-h[1])*(c[1]-h[1]))}],function(C,M){if(m[M]!=="none"&&m[M]!=null){var A=Ut(m[M],-S/2,-T/2,S,T,d.stroke,!0),k=C.r+C.offset,E=f?h:c;A.attr({rotation:C.rotate,x:E[0]+k*Math.cos(t.rotation),y:E[1]-k*Math.sin(t.rotation),silent:!0,z2:11}),i.add(A)}})}}},axisTickLabelEstimate:function(t,e,r,n,i,a,o,s){var l=tN(e,i,s);l&&eN(t,e,r,n,i,a,o,ji.estimate)},axisTickLabelDetermine:function(t,e,r,n,i,a,o,s){var l=tN(e,i,s);l&&eN(t,e,r,n,i,a,o,ji.determine);var u=$ie(t,i,a,n);Zie(t,e.labelLayoutList,u),Yie(t,i,a,n,t.tickDirection)},axisName:function(t,e,r,n,i,a,o,s){var l=r.ensureRecord(n);e.nameEl&&(i.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=t.axisName;if(qM(u)){var c=t.nameLocation,h=t.nameDirection,f=n.getModel("nameTextStyle"),d=n.get("nameGap")||0,p=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new Te(0,0),y=new Te(0,0);c==="start"?(m.x=p[0]-g*d,y.x=-g):c==="end"?(m.x=p[1]+g*d,y.x=g):(m.x=(p[0]+p[1])/2,m.y=t.labelOffset+h*d,y.y=h);var _=fr();y.transform(_o(_,_,t.rotation));var S=n.get("nameRotate");S!=null&&(S=S*Yo/180);var T,C;nh(c)?T=on.innerTextLayout(t.rotation,S??t.rotation,h):(T=Wie(t.rotation,c,S||0,p),C=t.raw.axisNameAvailableWidth,C!=null&&(C=Math.abs(C/Math.sin(T.rotation)),!isFinite(C)&&(C=null)));var M=f.getFont(),A=n.get("nameTruncate",!0)||{},k=A.ellipsis,E=br(t.raw.nameTruncateMaxWidth,A.maxWidth,C),D=s.nameMarginLevel||0,I=new Xe({x:m.x,y:m.y,rotation:T.rotation,silent:on.isLabelSilent(n),style:pt(f,{text:u,font:M,overflow:"truncate",width:E,ellipsis:k,fill:f.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:f.get("align")||T.textAlign,verticalAlign:f.get("verticalAlign")||T.textVerticalAlign}),z2:1});if(So({el:I,componentModel:n,itemName:u}),I.__fullText=u,I.anid="name",n.get("triggerEvent")){var z=on.makeAxisEventDataBase(n);z.targetType="axisName",z.name=u,Le(I).eventData=z}a.add(I),I.updateTransform(),e.nameEl=I;var O=l.nameLayout=Ma({label:I,priority:I.z2,defaultAttr:{ignore:I.ignore},marginDefault:nh(c)?jie[D]:Vie[D]});if(l.nameLocation=c,i.add(I),I.decomposeTransform(),t.shouldNameMoveOverlap&&O){var V=r.ensureRecord(n);r.resolveAxisNameOverlap(t,r,n,O,y,V)}}}};function eN(t,e,r,n,i,a,o,s){$G(e)||Xie(t,e,i,s,n,o);var l=e.labelLayoutList;qie(t,n,l,a),Jie(n,t.rotation,l);var u=t.optionHideOverlap;Uie(n,l,u),u&&nG(tt(l,function(c){return c&&!c.label.ignore})),Fie(t,r,n,l)}function Wie(t,e,r,n){var i=P2(r-t),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return qc(i-Yo/2)?(o=l?"bottom":"top",a="center"):qc(i-Yo*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<Yo*1.5&&i>Yo/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function Uie(t,e,r){if(VF(t.axis))return;function n(s,l,u){var c=Ma(e[l]),h=Ma(e[u]);if(!(!c||!h)){if(s===!1||c.suggestIgnore){$f(c.label);return}if(h.suggestIgnore){$f(h.label);return}var f=.1;if(!r){var d=[0,0,0,0];c=cT({marginForce:d},c),h=cT({marginForce:d},h)}u_(c,h,null,{touchThreshold:f})&&$f(s?h.label:c.label)}}var i=t.get(["axisLabel","showMinLabel"]),a=t.get(["axisLabel","showMaxLabel"]),o=e.length;n(i,0,1),n(a,o-1,o-2)}function Zie(t,e,r){t.showMinorTicks||R(e,function(n){if(n&&n.label.ignore)for(var i=0;i<r.length;i++){var a=r[i],o=FG(a),s=oh(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){$f(a);return}}})}function $f(t){t&&(t.ignore=!0)}function ZG(t,e,r,n,i){for(var a=[],o=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=r,e&&(Ot(o,o,e),Ot(s,s,e));var c=new Wt({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Jc(c.shape,c.style.lineWidth),c.anid=i+"_"+t[l].tickValue,a.push(c);var h=FG(c);h.onBand=!!t[l].onBand,h.tickValue=t[l].tickValue}return a}function $ie(t,e,r,n){var i=n.axis,a=n.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,t.raw.axisTickAutoShow!=null&&(o=!!t.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=t.tickDirection*a.get("length"),u=i.getTicksCoords(),c=ZG(u,r.transform,l,Se(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<c.length;h++)e.add(c[h]);return c}function Yie(t,e,r,n,i){var a=n.axis,o=n.getModel("minorTick");if(!(!t.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=i*o.get("length"),c=Se(l.getLineStyle(),Se(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),h=0;h<s.length;h++)for(var f=ZG(s[h],r.transform,u,c,"minorticks_"+h),d=0;d<f.length;d++)e.add(f[d])}}function tN(t,e,r){if($G(t)){var n=t.axisLabelsCreationContext,i=n.out.noPxChangeTryDetermine;if(r.noPxChange){for(var a=!0,o=0;o<i.length;o++)a=a&&i[o]();if(a)return!1}i.length&&(e.remove(t.labelGroup),_T(t,null,null,null))}return!0}function Xie(t,e,r,n,i,a){var o=i.axis,s=br(t.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new _e;r.add(l);var u=Vy(n);if(!s||o.scale.isBlank()){_T(e,[],l,u);return}var c=i.getModel("axisLabel"),h=o.getViewLabels(u),f=(br(t.raw.labelRotate,c.get("rotate"))||0)*Yo/180,d=on.innerTextLayout(t.rotation,f,t.labelDirection),p=i.getCategories&&i.getCategories(!0),g=[],m=i.get("triggerEvent"),y=1/0,_=-1/0;R(h,function(T,C){var M,A=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(T.tickValue):T.tickValue,k=T.formattedLabel,E=T.rawLabel,D=c;if(p&&p[A]){var I=p[A];be(I)&&I.textStyle&&(D=new We(I.textStyle,c,i.ecModel))}var z=D.getTextColor()||i.get(["axisLine","lineStyle","color"]),O=D.getShallow("align",!0)||d.textAlign,V=pe(D.getShallow("alignMinLabel",!0),O),G=pe(D.getShallow("alignMaxLabel",!0),O),F=D.getShallow("verticalAlign",!0)||D.getShallow("baseline",!0)||d.textVerticalAlign,U=pe(D.getShallow("verticalAlignMinLabel",!0),F),j=pe(D.getShallow("verticalAlignMaxLabel",!0),F),W=10+(((M=T.time)===null||M===void 0?void 0:M.level)||0);y=Math.min(y,W),_=Math.max(_,W);var H=new Xe({x:0,y:0,rotation:0,silent:on.isLabelSilent(i),z2:W,style:pt(D,{text:k,align:C===0?V:C===h.length-1?G:O,verticalAlign:C===0?U:C===h.length-1?j:F,fill:me(z)?z(o.type==="category"?E:o.type==="value"?A+"":A,C):z})});H.anid="label_"+A;var X=oh(H);if(X.break=T.break,X.tickValue=A,X.layoutRotation=d.rotation,So({el:H,componentModel:i,itemName:k,formatterParamsExtra:{isTruncated:function(){return H.isTruncated},value:E,tickIndex:C}}),m){var K=on.makeAxisEventDataBase(i);K.targetType="axisLabel",K.value=E,K.tickIndex=C,T.break&&(K.break={start:T.break.parsedBreak.vmin,end:T.break.parsedBreak.vmax}),o.type==="category"&&(K.dataIndex=A),Le(H).eventData=K,T.break&&Qie(i,a,H,T.break)}g.push(H),l.add(H)});var S=re(g,function(T){return{label:T,priority:oh(T).break?T.z2+(_-y+1):T.z2,defaultAttr:{ignore:T.ignore}}});_T(e,S,l,u)}function $G(t){return!!t.labelLayoutList}function _T(t,e,r,n){t.labelLayoutList=e,t.labelGroup=r,t.axisLabelsCreationContext=n}function qie(t,e,r,n){var i=e.get(["axisLabel","margin"]);R(r,function(a,o){var s=Ma(a);if(s){var l=s.label,u=oh(l);s.suggestIgnore=l.ignore,l.ignore=!1,my(Ba,Kie),Ba.x=e.axis.dataToCoord(u.tickValue),Ba.y=t.labelOffset+t.labelDirection*i,Ba.rotation=u.layoutRotation,n.add(Ba),Ba.updateTransform(),n.remove(Ba),Ba.decomposeTransform(),my(l,Ba),l.markRedraw(),Wy(s,!0),Ma(s)}})}var Ba=new Be,Kie=new Be;function qM(t){return!!t}function Qie(t,e,r,n){r.on("click",function(i){var a={type:h_,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};a[t.axis.dim+"AxisIndex"]=t.componentIndex,e.dispatchAction(a)})}function Jie(t,e,r){var n=Xt();if(n){var i=n.retrieveAxisBreakPairs(r,function(o){return o&&oh(o.label).break},!0),a=t.get(["breakLabelLayout","moveOverlap"],!0);(a===!0||a==="auto")&&R(i,function(o){Jv().adjustBreakLabelPair(t.axis.inverse,e,[Ma(r[o[0]]),Ma(r[o[1]])])})}}function Yy(t,e,r){r=r||{};var n=e.axis,i={},a=n.getAxesOnZeroOf()[0],o=n.position,s=a?"onZero":o,l=n.dim,u=[t.x,t.x+t.width,t.y,t.y+t.height],c={left:0,right:1,top:0,bottom:1,onZero:2},h=e.get("offset")||0,f=l==="x"?[u[2]-h,u[3]+h]:[u[0]-h,u[1]+h];if(a){var d=a.toGlobalCoord(a.dataToCoord(0));f[c.onZero]=Math.max(Math.min(d,f[1]),f[0])}i.position=[l==="y"?f[c[s]]:u[0],l==="x"?f[c[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var p={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=p[o],i.labelOffset=a?f[c[o]]-f[c.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),br(r.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var g=e.get(["axisLabel","rotate"]);return i.labelRotate=s==="top"?-g:g,i.z2=1,i}function eae(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function rN(t){var e={xAxisModel:null,yAxisModel:null};return R(e,function(r,n){var i=n.replace(/Model$/,""),a=t.getReferringComponents(i,kt).models[0];e[n]=a}),e}function tae(t,e,r,n,i,a){for(var o=Yy(t,r),s=!1,l=!1,u=0;u<e.length;u++)nT(e[u].getOtherAxis(r.axis).scale)&&(s=l=!0,r.axis.type==="category"&&r.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new on(r,n,o,i)}function rae(t,e,r){var n=Yy(e,r);t.updateCfg(n)}function YG(t,e,r){var n=go.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,{expandToNicedExtent:!0}),o=i.length-1,s=n.getInterval.call(r),l=jF(t,e),u=l.extent,c=l.fixMin,h=l.fixMax;t.type==="log"&&(u=iT(t.base,u,!0)),t.setBreaksFromOption(FF(e)),t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:h});var f=n.getExtent.call(t);c&&(u[0]=f[0]),h&&(u[1]=f[1]);var d=n.getInterval.call(t),p=u[0],g=u[1];if(c&&h)d=(g-p)/o;else if(c)for(g=u[0]+d*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)d=I1(d),g=u[0]+d*o;else if(h)for(p=u[1]-d*o;p>u[0]&&isFinite(p)&&isFinite(u[0]);)d=I1(d),p=u[1]-d*o;else{var m=t.getTicks().length-1;m>o&&(d=I1(d));var y=d*o;g=Math.ceil(u[1]/d)*d,p=Ht(g-y),p<0&&u[0]>=0?(p=0,g=Ht(y)):g>0&&u[1]<=0&&(g=0,p=-Ht(y))}var _=(i[0].value-a[0].value)/s,S=(i[o].value-a[o].value)/s;n.setExtent.call(t,p+d*_,g+d*S),n.setInterval.call(t,d),(_||S)&&n.setNiceExtent.call(t,p+d,g-d)}var nN=[[3,1],[0,2]],nae=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=yT,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=$e(o),u=l.length;if(u){for(var c=[],h=u-1;h>=0;h--){var f=+l[h],d=o[f],p=d.model,g=d.scale;nT(g)&&p.get("alignTicks")&&p.get("interval")==null?c.push(d):(tu(g,p),nT(g)&&(s=d))}c.length&&(s||(s=c.pop(),tu(s.scale,s.model)),R(c,function(m){YG(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};R(n.x,function(o){iN(n,"y",o,a)}),R(n.y,function(o){iN(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=sr(e,r),a=this._rect=bt(e.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(xT(o,a),!n){var u=oae(a,s,o,l,r),c=void 0;if(l)ST?(ST(this._axesList,a),xT(o,a)):c=sN(a.clone(),"axisLabel",null,a,o,u,i);else{var h=sae(e,a,i),f=h.outerBoundsRect,d=h.parsedOuterBoundsContain,p=h.outerBoundsClamp;f&&(c=sN(f,d,p,a,o,u,i))}XG(a,o,ji.determine,null,c,i)}R(this._coordsList,function(g){g.calcAffineTransform()})},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}be(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===r)return a[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},t.prototype.convertFromPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},t.prototype._findConvertTarget=function(e){var r=e.seriesModel,n=e.xAxisModel||r&&r.getReferringComponents("xAxis",kt).models[0],i=e.yAxisModel||r&&r.getReferringComponents("yAxis",kt).models[0],a=e.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,Ee(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},t.prototype.containPoint=function(e){var r=this._coordsList[0];if(r)return r.containPoint(e)},t.prototype._initCartesian=function(e,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(r.eachComponent("xAxis",u("x"),this),r.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,R(s.x,function(c,h){R(s.y,function(f,d){var p="x"+h+"y"+d,g=new Nie(p);g.master=i,g.model=e,i._coordsMap[p]=g,i._coordsList.push(g),g.addAxis(c),g.addAxis(f)})});function u(c){return function(h,f){if(Y1(h,e)){var d=h.get("position");c==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var p=new BG(c,Yv(h),[0,0],h.get("type"),d),g=p.type==="category";p.onBand=g&&h.get("boundaryGap"),p.inverse=h.get("inverse"),h.axis=p,p.model=h,p.grid=a,p.index=f,a._axesList.push(p),s[c][f]=p,l[c]++}}}},t.prototype._updateScale=function(e,r){R(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),e.eachSeries(function(i){if(eae(i)){var a=rN(i),o=a.xAxisModel,s=a.yAxisModel;if(!Y1(o,r)||!Y1(s,r))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),h=l.getAxis("y");n(u,c),n(u,h)}},this);function n(i,a){R(jy(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},t.prototype.getTooltipAxes=function(e){var r=[],n=[];return R(this.getCartesians(),function(i){var a=e!=null&&e!=="auto"?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(a);Ee(r,a)<0&&r.push(a),Ee(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},t.create=function(e,r){var n=[];return e.eachComponent("grid",function(i,a){var o=new t(i,e,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o)}),e.eachSeries(function(i){Zv({targetModel:i,coordSysType:"cartesian2d",coordSysProvider:a});function a(){var o=rN(i),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel(),c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),n},t.dimensions=yT,t}();function Y1(t,e){return t.getCoordSysModel()===e}function iN(t,e,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=t[e],a,o=r.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)aN(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&aN(i[u])&&!n[c(i[u])]){a=i[u];break}a&&(n[c(a)]=!0);function c(h){return h.dim+"_"+h.index}}function aN(t){return t&&t.type!=="category"&&t.type!=="time"&&Xte(t)}function iae(t,e){var r=t.getExtent(),n=r[0]+r[1];t.toGlobalCoord=t.dim==="x"?function(i){return i+e}:function(i){return n-i+e},t.toLocalCoord=t.dim==="x"?function(i){return i-e}:function(i){return n-i+e}}function xT(t,e){R(t.x,function(r){return oN(r,e.x,e.width)}),R(t.y,function(r){return oN(r,e.y,e.height)})}function oN(t,e,r){var n=[0,r],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),iae(t,e)}var ST;function aae(t){ST=t}function sN(t,e,r,n,i,a,o){XG(n,i,ji.estimate,e,!1,o);var s=[0,0,0,0];u(0),u(1),c(n,0,NaN),c(n,1,NaN);var l=As(s,function(f){return f>0})==null;return Ql(n,s,!0,!0,r),xT(i,n),l;function u(f){R(i[De[f]],function(d){if(fv(d.model)){var p=a.ensureRecord(d.model),g=p.labelInfoList;if(g)for(var m=0;m<g.length;m++){var y=g[m],_=d.scale.normalize(oh(y.label).tickValue);_=f===1?1-_:_,c(y.rect,f,_),c(y.rect,1-f,NaN)}var S=p.nameLayout;if(S){var _=nh(p.nameLocation)?.5:NaN;c(S.rect,f,_),c(S.rect,1-f,NaN)}}})}function c(f,d,p){var g=t[De[d]]-f[De[d]],m=f[qt[d]]+f[De[d]]-(t[qt[d]]+t[De[d]]);g=h(g,1-p),m=h(m,p);var y=nN[d][0],_=nN[d][1];s[y]=Gt(s[y],g),s[_]=Gt(s[_],m)}function h(f,d){return f>0&&!Ir(d)&&d>1e-4&&(f/=d),f}}function oae(t,e,r,n,i){var a=new GG(lae);return R(r,function(o){return R(o,function(s){if(fv(s.model)){var l=!n;s.axisBuilder=tae(t,e,s.model,i,a,l)}})}),a}function XG(t,e,r,n,i,a){var o=r===ji.determine;R(e,function(u){return R(u,function(c){fv(c.model)&&(rae(c.axisBuilder,t,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[De[1-u]]=t[qt[u]]<=a.refContainer[qt[u]]*.5?0:1-u===1?2:1}R(e,function(u,c){return R(u,function(h){fv(h.model)&&((n==="all"||o)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&h.axisBuilder.build({axisLine:!0}))})})}function sae(t,e,r){var n,i=t.get("outerBoundsMode",!0);i==="same"?n=e.clone():(i==null||i==="auto")&&(n=bt(t.get("outerBounds",!0)||RG,r.refContainer));var a=t.get("outerBoundsContain",!0),o;a==null||a==="auto"||Ee(["all","axisLabel"],a)<0?o="all":o=a;var s=[_y(pe(t.get("outerBoundsClampWidth",!0),$y[0]),e.width),_y(pe(t.get("outerBoundsClampHeight",!0),$y[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var lae=function(t,e,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";HG(t,e,r,n,i,a),nh(t.nameLocation)||R(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&UG(s.labelInfoList,s.dirVec,n,i)})};function uae(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return cae(r,t,e),r.seriesInvolved&&fae(r,t),r}function cae(t,e,r){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];R(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=gv(s.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=s;var c=s.model,h=c.getModel("tooltip",n);if(R(s.getAxes(),Ie(g,!1,null)),s.getTooltipAxes&&n&&h.get("show")){var f=h.get("trigger")==="axis",d=h.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(h.get(["axisPointer","axis"]));(f||d)&&R(p.baseAxes,Ie(g,d?"cross":!0,f)),d&&R(p.otherAxes,Ie(g,"cross",!1))}function g(m,y,_){var S=_.model.getModel("axisPointer",i),T=S.get("show");if(!(!T||T==="auto"&&!m&&!bT(S))){y==null&&(y=S.get("triggerTooltip")),S=m?hae(_,h,i,e,m,y):S;var C=S.get("snap"),M=S.get("triggerEmphasis"),A=gv(_.model),k=y||C||_.type==="category",E=t.axesInfo[A]={key:A,axis:_,coordSys:s,axisPointerModel:S,triggerTooltip:y,triggerEmphasis:M,involveSeries:k,snap:C,useHandle:bT(S),seriesModels:[],linkGroup:null};u[A]=E,t.seriesInvolved=t.seriesInvolved||k;var D=dae(a,_);if(D!=null){var I=o[D]||(o[D]={axesInfo:{}});I.axesInfo[A]=E,I.mapper=a[D].mapper,E.linkGroup=I}}}})}function hae(t,e,r,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};R(s,function(f){l[f]=ye(o.get(f))}),l.snap=t.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var h=l.lineStyle=o.get("crossStyle");h&&Se(u,h.textStyle)}}return t.model.getModel("axisPointer",new We(l,r,n))}function fae(t,e){e.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||R(t.coordSysAxesInfo[gv(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function dae(t,e){for(var r=e.model,n=e.dim,i=0;i<t.length;i++){var a=t[i]||{};if(X1(a[n+"AxisId"],r.id)||X1(a[n+"AxisIndex"],r.componentIndex)||X1(a[n+"AxisName"],r.name))return i}}function X1(t,e){return t==="all"||ee(t)&&Ee(t,e)>=0||t===e}function vae(t){var e=KM(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=bT(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]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function KM(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[gv(t)]}function pae(t){var e=KM(t);return e&&e.axisPointerModel}function bT(t){return!!t.get(["handle","show"])}function gv(t){return t.type+"||"+t.id}var lN={},vu=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i,a){this.axisPointerClass&&vae(r),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},e.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},e.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},e.prototype.dispose=function(r,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=e.getAxisPointerClass(this.axisPointerClass);if(a){var o=pae(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},e.registerAxisPointerClass=function(r,n){lN[r]=n},e.getAxisPointerClass=function(r){return r&&lN[r]},e.type="axis",e}(mt),wT=Fe();function qG(t,e,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,h=wT(t).splitAreaColors,f=de(),d=0;if(h)for(var p=0;p<u.length;p++){var g=h.get(u[p].tickValue);if(g!=null){d=(g+(c-1)*p)%c;break}}var m=i.toGlobalCoord(u[0].coord),y=o.getAreaStyle();s=ee(s)?s:[s];for(var p=1;p<u.length;p++){var _=i.toGlobalCoord(u[p].coord),S=void 0,T=void 0,C=void 0,M=void 0;i.isHorizontal()?(S=m,T=l.y,C=_-S,M=l.height,m=S+C):(S=l.x,T=m,C=l.width,M=_-T,m=T+M);var A=u[p-1].tickValue;A!=null&&f.set(A,d),e.add(new Be({anid:A!=null?"area_"+A:null,shape:{x:S,y:T,width:C,height:M},style:Se({fill:s[d]},y),autoBatch:!0,silent:!0})),d=(d+1)%c}wT(t).splitAreaColors=f}}}function KG(t){wT(t).splitAreaColors=null}var gae=["splitArea","splitLine","minorSplitLine","breakArea"],QG=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="CartesianAxisPointer",r}return e.prototype.render=function(r,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new _e,this.group.add(this._axisGroup),!!fv(r)){this._axisGroup.add(r.axis.axisBuilder.group),R(gae,function(l){r.get([l,"show"])&&mae[l](this,this._axisGroup,r,r.getCoordSysModel(),i)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||Wv(o,this._axisGroup,r),t.prototype.render.call(this,r,n,i,a)}},e.prototype.remove=function(){KG(this)},e.type="cartesianAxis",e}(vu),mae={splitLine:function(t,e,r,n,i){var a=r.axis;if(!a.scale.isBlank()){var o=r.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=ee(l)?l:[l];for(var h=n.coordinateSystem.getRect(),f=a.isHorizontal(),d=0,p=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),g=[],m=[],y=s.getLineStyle(),_=0;_<p.length;_++){var S=a.toGlobalCoord(p[_].coord);if(!(_===0&&!u||_===p.length-1&&!c)){var T=p[_].tickValue;f?(g[0]=S,g[1]=h.y,m[0]=S,m[1]=h.y+h.height):(g[0]=h.x,g[1]=S,m[0]=h.x+h.width,m[1]=S);var C=d++%l.length,M=new Wt({anid:T!=null?"line_"+T:null,autoBatch:!0,shape:{x1:g[0],y1:g[1],x2:m[0],y2:m[1]},style:Se({stroke:l[C]},y),silent:!0});Jc(M.shape,y.lineWidth),e.add(M)}}}},minorSplitLine:function(t,e,r,n,i){var a=r.axis,o=r.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=a.isHorizontal(),c=a.getMinorTicksCoords();if(c.length)for(var h=[],f=[],d=s.getLineStyle(),p=0;p<c.length;p++)for(var g=0;g<c[p].length;g++){var m=a.toGlobalCoord(c[p][g].coord);u?(h[0]=m,h[1]=l.y,f[0]=m,f[1]=l.y+l.height):(h[0]=l.x,h[1]=m,f[0]=l.x+l.width,f[1]=m);var y=new Wt({anid:"minor_line_"+c[p][g].tickValue,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:f[0],y2:f[1]},style:d,silent:!0});Jc(y.shape,d.lineWidth),e.add(y)}},splitArea:function(t,e,r,n,i){qG(t,e,r,n)},breakArea:function(t,e,r,n,i){var a=Jv(),o=r.axis.scale;a&&o.type!=="ordinal"&&a.rectCoordBuildBreakAxis(e,t,r,n.coordinateSystem.getRect(),i)}},JG=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="xAxis",e}(QG),yae=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=JG.type,r}return e.type="yAxis",e}(QG),_ae=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="grid",r}return e.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new Be({shape:r.coordinateSystem.getRect(),style:Se({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(mt),uN={offset:0};function e6(t){t.registerComponentView(_ae),t.registerComponentModel(Aie),t.registerCoordinateSystem("cartesian2d",nae),ah(t,"x",gT,uN),ah(t,"y",gT,uN),t.registerComponentView(JG),t.registerComponentView(yae),t.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function xae(t,e){var r=t.coordinateSystem,n=r&&r.type,i=r&&r.getBaseAxis&&r.getBaseAxis(),a=i&&i.scale&&i.scale.type,o=n==="cartesian2d"&&a==="ordinal"||n==="single",s=e.model.get("jitter")>0;return o&&s}var Sae=Fe();function cN(t,e,r,n){if(t instanceof BG){var i=t.scale.type;if(i!=="category"&&i!=="ordinal")return r}var a=t.model,o=a.get("jitter"),s=a.get("jitterOverlap"),l=a.get("jitterMargin")||0,u=t.scale.type==="ordinal"?t.getBandWidth():null;return o>0?s?t6(r,o,u,n):bae(t,e,r,n,o,l):r}function t6(t,e,r,n){if(r===null)return t+(Math.random()-.5)*e;var i=r-n*2,a=Math.min(Math.max(0,e),i);return t+(Math.random()-.5)*a}function bae(t,e,r,n,i,a){var o=Sae(t);o.items||(o.items=[]);var s=o.items,l=hN(s,e,r,n,i,a,1),u=hN(s,e,r,n,i,a,-1),c=Math.abs(l-r)<Math.abs(u-r)?l:u,h=t.scale.type==="ordinal"?t.getBandWidth():null,f=Math.abs(c-r);return f>i/2||h&&f>h/2-n?t6(r,i,h,n):(s.push({fixedCoord:e,floatCoord:c,r:n}),c)}function hN(t,e,r,n,i,a,o){for(var s=r,l=0;l<t.length;l++){var u=t[l],c=e-u.fixedCoord,h=s-u.floatCoord,f=c*c+h*h,d=n+u.r+a;if(f<d*d){var p=u.floatCoord+Math.sqrt(d*d-c*c)*o;if(Math.abs(p-r)>i/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p<s){s=p,l=-1;continue}}}return s}function wae(t){t.eachSeriesByType("scatter",function(e){var r=e.coordinateSystem;if(r&&(r.type==="cartesian2d"||r.type==="single")){var n=r.getBaseAxis?r.getBaseAxis():null,i=n&&xae(e,n);if(i){var a=e.getData();a.each(function(o){var s=n.dim,l=n.orient,u=l==="horizontal"&&n.type!=="category"||l==="vertical"&&n.type==="category",c=a.getItemLayout(o),h=a.getItemVisual(o,"symbolSize"),f=h instanceof Array?(h[1]+h[0])/2:h;if(s==="y"||s==="single"&&u){var d=cN(n,c[0],c[1],f/2);a.setItemLayout(o,[c[0],d])}else if(s==="x"||s==="single"&&!u){var d=cN(n,c[1],c[0],f/2);a.setItemLayout(o,[d,c[1]])}})}}})}function Tae(t){ze(e6),t.registerSeriesModel(bie),t.registerChartView(Mie),t.registerLayout(Qv("scatter"))}function Cae(t){t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,wae)}function Mae(t){t.eachSeriesByType("radar",function(e){var r=e.getData(),n=[],i=e.coordinateSystem;if(i){var a=i.getIndicatorAxes();R(a,function(o,s){r.each(r.mapDimension(a[s].dim),function(l,u){n[u]=n[u]||[];var c=i.dataToPoint(l,s);n[u][s]=fN(c)?c:dN(i)})}),r.each(function(o){var s=As(n[o],function(l){return fN(l)})||dN(i);n[o].push(s.slice()),r.setItemLayout(o,n[o])})}})}function fN(t){return!isNaN(t[0])&&!isNaN(t[1])}function dN(t){return[t.cx,t.cy]}function Aae(t){var e=t.polar;if(e){ee(e)||(e=[e]);var r=[];R(e,function(n,i){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),t.radar=t.radar||[],ee(t.radar)||(t.radar=[t.radar]),t.radar.push(n)):r.push(n)}),t.polar=r}R(t.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var Lae=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=this._data;function u(f,d){var p=f.getItemVisual(d,"symbol")||"circle";if(p!=="none"){var g=Lh(f.getItemVisual(d,"symbolSize")),m=Ut(p,-1,-1,2,2),y=f.getItemVisual(d,"symbolRotate")||0;return m.attr({style:{strokeNoScale:!0},z2:100,scaleX:g[0]/2,scaleY:g[1]/2,rotation:y*Math.PI/180||0}),m}}function c(f,d,p,g,m,y){p.removeAll();for(var _=0;_<d.length-1;_++){var S=u(g,m);S&&(S.__dimIdx=_,f[_]?(S.setPosition(f[_]),cu[y?"initProps":"updateProps"](S,{x:d[_][0],y:d[_][1]},r,m)):S.setPosition(d[_]),p.add(S))}}function h(f){return re(f,function(d){return[a.cx,a.cy]})}s.diff(l).add(function(f){var d=s.getItemLayout(f);if(d){var p=new zr,g=new Tr,m={shape:{points:d}};p.shape.points=h(d),g.shape.points=h(d),St(p,m,r,f),St(g,m,r,f);var y=new _e,_=new _e;y.add(g),y.add(p),y.add(_),c(g.shape.points,d,_,s,f,!0),s.setItemGraphicEl(f,y)}}).update(function(f,d){var p=l.getItemGraphicEl(d),g=p.childAt(0),m=p.childAt(1),y=p.childAt(2),_={shape:{points:s.getItemLayout(f)}};_.shape.points&&(c(g.shape.points,_.shape.points,y,s,f,!1),di(m),di(g),Qe(g,_,r),Qe(m,_,r),s.setItemGraphicEl(f,p))}).remove(function(f){o.remove(l.getItemGraphicEl(f))}).execute(),s.eachItemGraphicEl(function(f,d){var p=s.getItemModel(d),g=f.childAt(0),m=f.childAt(1),y=f.childAt(2),_=s.getItemVisual(d,"style"),S=_.fill;o.add(f),g.useStyle(Se(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:S})),ir(g,p,"lineStyle"),ir(m,p,"areaStyle");var T=p.getModel("areaStyle"),C=T.isEmpty()&&T.parentModel.isEmpty();m.ignore=C,R(["emphasis","select","blur"],function(A){var k=p.getModel([A,"areaStyle"]),E=k.isEmpty()&&k.parentModel.isEmpty();m.ensureState(A).ignore=E&&C;var D=p.getModel([A,"lineStyle"]).getLineStyle();g.ensureState(A).style=D;var I=k.getAreaStyle();m.ensureState(A).style=I;var z=p.getModel([A,"itemStyle"]).getItemStyle();y.eachChild(function(O){O.ensureState(A).style=ye(z)})}),m.useStyle(Se(p.getModel("areaStyle").getAreaStyle(),{fill:S,opacity:.7,decal:_.decal}));var M=p.getModel("emphasis");y.eachChild(function(A){if(A instanceof pr){var k=A.style;A.useStyle(J({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},_))}else A.useStyle(_),A.setColor(S),A.style.strokeNoScale=!0;var E=s.getStore().get(s.getDimensionIndex(A.__dimIdx),d);(E==null||isNaN(E))&&(E=""),vr(A,ar(p),{labelFetcher:s.hostModel,labelDataIndex:d,labelDimIndex:A.__dimIdx,defaultText:E,inheritColor:S,defaultOpacity:_.opacity})}),wt(f,M.get("focus"),M.get("blurScope"),M.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(lt),Pae=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Nh(le(this.getData,this),le(this.getRawData,this))},e.prototype.getInitialData=function(r,n){return Eh(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(r),u=l===""?this.name:l,c=RV(this,r);return Kt("section",{header:u,sortBlocks:!0,blocks:re(s,function(h){var f=a.get(a.mapDimension(h.dim),r);return Kt("nameValue",{markerType:"subItem",markerColor:c,name:h.name,value:f,sortParam:f})})})},e.prototype.getTooltipPosition=function(r){if(r!=null){for(var n=this.getData(),i=this.coordinateSystem,a=n.getValues(re(i.dimensions,function(u){return n.mapDimension(u)}),r),o=0,s=a.length;o<s;o++)if(!isNaN(a[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(a[o]),o)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(dt),xf=zG.value;function kg(t,e){return Se({show:e},t)}var kae=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){var r=this.get("boundaryGap"),n=this.get("splitNumber"),i=this.get("scale"),a=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),f=this.get("triggerEvent"),d=re(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var g=l;p.color!=null&&(g=Se({color:p.color},l));var m=Ne(ye(p),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:g,triggerEvent:f},!1);if(se(c)){var y=m.name;m.name=c.replace("{value}",y??"")}else me(c)&&(m.name=c(m.name,m));var _=new We(m,null,this.ecModel);return Bt(_,Dh.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_},this);this._indicatorModels=d},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:q.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Ne({lineStyle:{color:q.color.neutral20}},xf.axisLine),axisLabel:kg(xf.axisLabel,!1),axisTick:kg(xf.axisTick,!1),splitLine:kg(xf.splitLine,!0),splitArea:kg(xf.splitArea,!0),indicator:[]},e}(Ve),Dae=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},e.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=re(a,function(s){var l=s.model.get("showName")?s.name:"",u=new on(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});R(o,function(s){s.build(),this.group.add(s.group)},this)},e.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"),c=o.get("show"),h=s.get("show"),f=l.get("color"),d=u.get("color"),p=ee(f)?f:[f],g=ee(d)?d:[d],m=[],y=[];function _(G,F,U){var j=U%F.length;return G[j]=G[j]||[],j}if(a==="circle")for(var S=i[0].getTicksCoords(),T=n.cx,C=n.cy,M=0;M<S.length;M++){if(c){var A=_(m,p,M);m[A].push(new Pa({shape:{cx:T,cy:C,r:S[M].coord}}))}if(h&&M<S.length-1){var A=_(y,g,M);y[A].push(new yh({shape:{cx:T,cy:C,r0:S[M].coord,r:S[M+1].coord}}))}}else for(var k,E=re(i,function(G,F){var U=G.getTicksCoords();return k=k==null?U.length-1:Math.min(U.length-1,k),re(U,function(j){return n.coordToPoint(j.coord,F)})}),D=[],M=0;M<=k;M++){for(var I=[],z=0;z<i.length;z++)I.push(E[z][M]);if(I[0]&&I.push(I[0].slice()),c){var A=_(m,p,M);m[A].push(new Tr({shape:{points:I}}))}if(h&&D){var A=_(y,g,M-1);y[A].push(new zr({shape:{points:I.concat(D)}}))}D=I.slice().reverse()}var O=l.getLineStyle(),V=u.getAreaStyle();R(y,function(G,F){this.group.add(Ln(G,{style:Se({stroke:"none",fill:g[F%g.length]},V),silent:!0}))},this),R(m,function(G,F){this.group.add(Ln(G,{style:Se({fill:"none",stroke:p[F%p.length]},O),silent:!0}))},this)},e.type="radar",e}(mt),Iae=function(t){Y(e,t);function e(r,n,i){var a=t.call(this,r,n,i)||this;return a.type="value",a.angle=0,a.name="",a}return e}(gi),Eae=function(){function t(e,r,n){this.dimensions=[],this._model=e,this._indicatorAxes=re(e.getIndicatorModels(),function(i,a){var o="indicator_"+a,s=new Iae(o,new go);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(e,n)}return t.prototype.getIndicatorAxes=function(){return this._indicatorAxes},t.prototype.dataToPoint=function(e,r){var n=this._indicatorAxes[r];return this.coordToPoint(n.dataToCoord(e),r)},t.prototype.coordToPoint=function(e,r){var n=this._indicatorAxes[r],i=n.angle,a=this.cx+e*Math.cos(i),o=this.cy-e*Math.sin(i);return[a,o]},t.prototype.pointToData=function(e){var r=e[0]-this.cx,n=e[1]-this.cy,i=Math.sqrt(r*r+n*n);r/=i,n/=i;for(var a=Math.atan2(-n,r),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],h=Math.abs(a-c.angle);h<o&&(s=c,l=u,o=h)}return[l,+(s&&s.coordToData(i))]},t.prototype.resize=function(e,r){var n=sr(e,r).refContainer,i=e.get("center"),a=Math.min(n.width,n.height)/2;this.cx=oe(i[0],n.width)+n.x,this.cy=oe(i[1],n.height)+n.y,this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");(se(o)||qe(o))&&(o=[0,o]),this.r0=oe(o[0],a),this.r=oe(o[1],a),R(this._indicatorAxes,function(s,l){s.setExtent(this.r0,this.r);var u=this.startAngle+l*Math.PI*2/this._indicatorAxes.length;u=Math.atan2(Math.sin(u),Math.cos(u)),s.angle=u},this)},t.prototype.update=function(e,r){var n=this._indicatorAxes,i=this._model;R(n,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==i)){var u=s.getData();R(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=i.get("splitNumber"),o=new go;o.setExtent(0,a),o.setInterval(1),R(n,function(s,l){YG(s.scale,s.model,o)})},t.prototype.convertToPixel=function(e,r,n){return console.warn("Not implemented."),null},t.prototype.convertFromPixel=function(e,r,n){return console.warn("Not implemented."),null},t.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},t.create=function(e,r){var n=[];return e.eachComponent("radar",function(i){var a=new t(i,e,r);n.push(a),i.coordinateSystem=a}),e.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=n[i.get("radarIndex")||0])}),n},t.dimensions=[],t}();function Nae(t){t.registerCoordinateSystem("radar",Eae),t.registerComponentModel(kae),t.registerComponentView(Dae),t.registerVisual({seriesType:"radar",reset:function(e){var r=e.getData();r.each(function(n){r.setItemVisual(n,"legendIcon","roundRect")}),r.setVisual("legendIcon","roundRect")}})}function Rae(t){ze(Nae),t.registerChartView(Lae),t.registerSeriesModel(Pae),t.registerLayout(Mae),t.registerProcessor(Ih("radar")),t.registerPreprocessor(Aae)}var QM=Fe();function Oae(t,e,r){QM(t)[e]=r}function zae(t,e,r){var n=QM(t),i=n[e];i===r&&(n[e]=null)}function vN(t,e){return!!QM(t)[e]}Fi({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Rt);var Bae={axisPointer:1,tooltip:1,brush:1};function r6(t,e,r){var n=e.getComponentByElement(t.topTarget);if(!n||n===r||Bae.hasOwnProperty(n.mainType))return!1;var i=n.coordinateSystem;if(!i||i.model===r)return!1;var a=Jl(n),o=Jl(r);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var pu=function(t){Y(e,t);function e(r){var n=t.call(this)||this;n._zr=r;var i=le(n._mousedownHandler,n),a=le(n._mousemoveHandler,n),o=le(n._mouseupHandler,n),s=le(n._mousewheelHandler,n),l=le(n._pinchHandler,n);return n.enable=function(u,c){var h=c.zInfo,f=Jl(h.component),d=f.z,p=f.zlevel,g={component:h.component,z:d,zlevel:p,z2:pe(h.z2,-1/0)},m=J({},c.triggerInfo);this._opt=Se(J({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:g,triggerInfo:m}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this._enabled=!0,this.disable(),(u===!0||u==="move"||u==="pan")&&(bf(r,"mousedown",i,g),bf(r,"mousemove",a,g),bf(r,"mouseup",o,g)),(u===!0||u==="scale"||u==="zoom")&&(bf(r,"mousewheel",s,g),bf(r,"pinch",l,g)))},n.disable=function(){this._enabled=!1,wf(r,"mousedown",i),wf(r,"mousemove",a),wf(r,"mouseup",o),wf(r,"mousewheel",s),wf(r,"pinch",l)},n}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype._checkPointer=function(r,n,i){var a=this._opt,o=a.zInfoParsed;if(r6(r,a.api,o.component))return!1;var s=a.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(r,n,i)),u&&s.isInClip&&!s.isInClip(r,n,i)&&(u=!1),u},e.prototype._decideCursorStyle=function(r,n,i,a){var o=r.target;if(!o&&this._checkPointer(r,n,i))return"grab";if(a)return o&&o.cursor||"default"},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(r){if(!(Rk(r)||Sf(r))){for(var n=r.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var i=r.offsetX,a=r.offsetY;this._checkPointer(r,i,a)&&(this._x=i,this._y=a,this._dragging=!0)}},e.prototype._mousemoveHandler=function(r){var n=this._zr;if(!(r.gestureEvent==="pinch"||vN(n,"globalPan")||Sf(r))){var i=r.offsetX,a=r.offsetY;if(!this._dragging||!Mm("moveOnMouseMove",r,this._opt)){var o=this._decideCursorStyle(r,i,a,!1);o&&n.setCursorStyle(o);return}n.setCursorStyle("grabbing");var s=this._x,l=this._y,u=i-s,c=a-l;this._x=i,this._y=a,this._opt.preventDefaultMouseMove&&co(r.event),r.__ecRoamConsumed=!0,pN(this,"pan","moveOnMouseMove",r,{dx:u,dy:c,oldX:s,oldY:l,newX:i,newY:a,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(r){if(!Sf(r)){var n=this._zr;if(!Rk(r)){this._dragging=!1;var i=this._decideCursorStyle(r,r.offsetX,r.offsetY,!0);i&&n.setCursorStyle(i)}}},e.prototype._mousewheelHandler=function(r){if(!Sf(r)){var n=Mm("zoomOnMouseWheel",r,this._opt),i=Mm("moveOnMouseWheel",r,this._opt),a=r.wheelDelta,o=Math.abs(a),s=r.offsetX,l=r.offsetY;if(!(a===0||!n&&!i)){if(n){var u=o>3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(a),f=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(r){if(!(vN(this._zr,"globalPan")||Sf(r))){var n=r.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(r,n,i,a,o){r._checkPointer(a,o.originX,o.originY)&&(co(a.event),a.__ecRoamConsumed=!0,pN(r,n,i,a,o))},e}(vi);function Sf(t){return t.__ecRoamConsumed}var jae=Fe();function f_(t){var e=jae(t);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function bf(t,e,r,n){for(var i=f_(t),a=i.roam,o=a[e]=a[e]||[],s=0;s<o.length;s++){var l=o[s].zInfoParsed;if((l.zlevel-n.zlevel||l.z-n.z||l.z2-n.z2)<=0)break}o.splice(s,0,{listener:r,zInfoParsed:n}),Vae(t,e)}function wf(t,e,r){for(var n=f_(t),i=n.roam[e]||[],a=0;a<i.length;a++)if(i[a].listener===r){i.splice(a,1),i.length||Fae(t,e);return}}function Vae(t,e){var r=f_(t);r.uniform[e]||t.on(e,r.uniform[e]=function(n){var i=r.roam[e];if(i)for(var a=0;a<i.length;a++)i[a].listener(n)})}function Fae(t,e){var r=f_(t),n=r.uniform;n[e]&&(t.off(e,n[e]),n[e]=null)}function pN(t,e,r,n,i){i.isAvailableBehavior=le(Mm,null,r,n),t.trigger(e,i)}function Mm(t,e,r){var n=r[t];return!t||n&&(!se(n)||e.event[n+"Key"])}function JM(t,e,r){var n=t.target;n.x+=e,n.y+=r,n.dirty()}function eA(t,e,r,n){var i=t.target,a=t.zoomLimit,o=t.zoom=t.zoom||1;o*=e,o=tA(o,a);var s=o/t.zoom;t.zoom=o,i6(i,r,n,s),i.dirty()}function n6(t,e,r,n,i,a){var o=new Ce(0,0,0,0);n.enable(t.get("roam"),{api:e,zInfo:{component:t},triggerInfo:{roamTrigger:t.get("roamTrigger"),isInSelf:function(u,c,h){return o.copy(r.getBoundingRect()),o.applyTransform(r.getComputedTransform()),o.contain(c,h)},isInClip:function(u,c,h){return!a||a.contain(c,h)}}}),i.zoomLimit=t.get("scaleLimit");var s=t.coordinateSystem;i.zoom=s?s.getZoom():1;var l=t.subType+"Roam";n.off("pan").off("zoom").on("pan",function(u){JM(i,u.dx,u.dy),e.dispatchAction({seriesId:t.id,type:l,dx:u.dx,dy:u.dy})}).on("zoom",function(u){eA(i,u.scale,u.originX,u.originY),e.dispatchAction({seriesId:t.id,type:l,zoom:u.scale,originX:u.originX,originY:u.originY}),e.updateLabelLayout()})}function gN(t,e){return t.pointToProjected?t.pointToProjected(e):t.pointToData(e)}function d_(t,e,r){var n=t.getZoom(),i=t.getCenter(),a=e.zoom,o=t.projectedToPoint?t.projectedToPoint(i):t.dataToPoint(i);return e.dx!=null&&e.dy!=null&&(o[0]-=e.dx,o[1]-=e.dy,t.setCenter(gN(t,o))),a!=null&&(a=tA(n*a,r)/n,i6(t,e.originX,e.originY,a),t.updateTransform(),t.setCenter(gN(t,o)),t.setZoom(a*n)),{center:t.getCenter(),zoom:t.getZoom()}}function i6(t,e,r,n){t.x-=(e-t.x)*(n-1),t.y-=(r-t.y)*(n-1),t.scaleX*=n,t.scaleY*=n}function tA(t,e){if(e){var r=e.min||0,n=e.max||1/0;t=Math.max(Math.min(n,t),r)}return t}function a6(t){if(se(t)){var e=new DOMParser;t=e.parseFromString(t,"text/xml")}var r=t;for(r.nodeType===9&&(r=r.firstChild);r.nodeName.toLowerCase()!=="svg"||r.nodeType!==1;)r=r.nextSibling;return r}var q1,Xy={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"},mN=$e(Xy),qy={"alignment-baseline":"textBaseline","stop-color":"stopColor"},yN=$e(qy),Gae=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(e,r){r=r||{};var n=a6(e);this._defsUsePending=[];var i=new _e;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),wn(n,i,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,i,a,null,!1,!1),u=u.nextSibling;Uae(this._defs,this._defsUsePending),this._defsUsePending=[];var c,h;if(o){var f=v_(o);f.length>=4&&(c={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(c&&s!=null&&l!=null&&(h=s6(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var d=i;i=new _e,i.add(d),d.scaleX=d.scaleY=h.scale,d.x=h.x,d.y=h.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Be({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:h,named:a}},t.prototype._parseNode=function(e,r,n,i,a,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var c=q1[s];if(c&&he(q1,s)){l=c.call(this,e,r);var h=e.getAttribute("name");if(h){var f={name:h,namedFrom:null,svgNodeTagLower:s,el:l};n.push(f),s==="g"&&(u=f)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var d=_N[s];if(d&&he(_N,s)){var p=d.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=p)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,a,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},t.prototype._parseText=function(e,r){var n=new Kc({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Un(r,n),wn(e,n,this._defsUsePending,!1,!1),Hae(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},t.internalField=function(){q1={g:function(e,r){var n=new _e;return Un(r,n),wn(e,n,this._defsUsePending,!1,!1),n},rect:function(e,r){var n=new Be;return Un(r,n),wn(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,r){var n=new Pa;return Un(r,n),wn(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,r){var n=new Wt;return Un(r,n),wn(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,r){var n=new Fv;return Un(r,n),wn(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,r){var n=e.getAttribute("points"),i;n&&(i=bN(n));var a=new zr({shape:{points:i||[]},silent:!0});return Un(r,a),wn(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,r){var n=e.getAttribute("points"),i;n&&(i=bN(n));var a=new Tr({shape:{points:i||[]},silent:!0});return Un(r,a),wn(e,a,this._defsUsePending,!1,!1),a},image:function(e,r){var n=new pr;return Un(r,n),wn(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,r){var n=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new _e;return Un(r,s),wn(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,r){var n=e.getAttribute("x"),i=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new _e;return Un(r,s),wn(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,r){var n=e.getAttribute("d")||"",i=wj(n);return Un(r,i),wn(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),t}(),_N={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),r=parseInt(t.getAttribute("y1")||"0",10),n=parseInt(t.getAttribute("x2")||"10",10),i=parseInt(t.getAttribute("y2")||"0",10),a=new uu(e,r,n,i);return xN(t,a),SN(t,a),a},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),r=parseInt(t.getAttribute("cy")||"0",10),n=parseInt(t.getAttribute("r")||"0",10),i=new W2(e,r,n);return xN(t,i),SN(t,i),i}};function xN(t,e){var r=t.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(e.global=!0)}function SN(t,e){for(var r=t.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={};o6(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000",s=a.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=$r(o),u=l&&l[3];u&&(l[3]*=Ja(s),o=oi(l,"rgba"))}e.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Un(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Se(e.__inheritedStyle,t.__inheritedStyle))}function bN(t){for(var e=v_(t),r=[],n=0;n<e.length;n+=2){var i=parseFloat(e[n]),a=parseFloat(e[n+1]);r.push([i,a])}return r}function wn(t,e,r,n,i){var a=e,o=a.__inheritedStyle=a.__inheritedStyle||{},s={};t.nodeType===1&&(Yae(t,e),o6(t,o,s),n||Xae(t,o,s)),a.style=a.style||{},o.fill!=null&&(a.style.fill=wN(a,"fill",o.fill,r)),o.stroke!=null&&(a.style.stroke=wN(a,"stroke",o.stroke,r)),R(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(a.style[l]=parseFloat(o[l]))}),R(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(a.style[l]=o[l])}),i&&(a.__selfStyle=s),o.lineDash&&(a.style.lineDash=re(v_(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(a.invisible=!0),o.display==="none"&&(a.ignore=!0)}function Hae(t,e){var r=e.__selfStyle;if(r){var n=r.textBaseline,i=n;!n||n==="auto"||n==="baseline"?i="alphabetic":n==="before-edge"||n==="text-before-edge"?i="top":n==="after-edge"||n==="text-after-edge"?i="bottom":(n==="central"||n==="mathematical")&&(i="middle"),t.style.textBaseline=i}var a=e.__inheritedStyle;if(a){var o=a.textAlign,s=o;o&&(o==="middle"&&(s="center"),t.style.textAlign=s)}}var Wae=/^url\(\s*#(.*?)\)/;function wN(t,e,r,n){var i=r&&r.match(Wae);if(i){var a=kn(i[1]);n.push([t,e,a]);return}return r==="none"&&(r=null),r}function Uae(t,e){for(var r=0;r<e.length;r++){var n=e[r];n[0].style[n[1]]=t[n[2]]}}var Zae=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function v_(t){return t.match(Zae)||[]}var $ae=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,K1=Math.PI/180;function Yae(t,e){var r=t.getAttribute("transform");if(r){r=r.replace(/,/g," ");var n=[],i=null;r.replace($ae,function(h,f,d){return n.push(f,d),""});for(var a=n.length-1;a>0;a-=2){var o=n[a],s=n[a-1],l=v_(o);switch(i=i||fr(),s){case"translate":zi(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":V0(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":_o(i,i,-parseFloat(l[0])*K1,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*K1);Ii(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*K1);Ii(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var TN=/([^\s:;]+)\s*:\s*([^:;]+)/g;function o6(t,e,r){var n=t.getAttribute("style");if(n){TN.lastIndex=0;for(var i;(i=TN.exec(n))!=null;){var a=i[1],o=he(Xy,a)?Xy[a]:null;o&&(e[o]=i[2]);var s=he(qy,a)?qy[a]:null;s&&(r[s]=i[2])}}}function Xae(t,e,r){for(var n=0;n<mN.length;n++){var i=mN[n],a=t.getAttribute(i);a!=null&&(e[Xy[i]]=a)}for(var n=0;n<yN.length;n++){var i=yN[n],a=t.getAttribute(i);a!=null&&(r[qy[i]]=a)}}function s6(t,e){var r=e.width/t.width,n=e.height/t.height,i=Math.min(r,n);return{scale:i,x:-(t.x+t.width/2)*i+(e.x+e.width/2),y:-(t.y+t.height/2)*i+(e.y+e.height/2)}}function qae(t,e){var r=new Gae;return r.parse(t,e)}var Kae=de(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Qae=function(){function t(e,r){this.type="geoSVG",this._usedGraphicMap=de(),this._freedGraphics=[],this._mapName=e,this._parsedXML=a6(r)}return t.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var r=eoe(e.named),n=r.regions,i=r.regionsMap;this._regions=n,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},t.prototype._buildGraphic=function(e){var r,n;try{r=e&&qae(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=r.root,Rr(n!=null)}catch(m){throw new Error(`Invalid svg format
|
||
`+m.message)}var i=new _e;i.add(n),i.isGeoSVGGraphicRoot=!0;var a=r.width,o=r.height,s=r.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,h=void 0,f=void 0;if(a!=null?(u=0,h=a):s&&(u=s.x,h=s.width),o!=null?(c=0,f=o):s&&(c=s.y,f=s.height),u==null||c==null){var d=n.getBoundingRect();u==null&&(u=d.x,h=d.width),c==null&&(c=d.y,f=d.height)}l=this._boundingRect=new Ce(u,c,h,f)}if(s){var p=s6(s,l);n.scaleX=n.scaleY=p.scale,n.x=p.x,n.y=p.y}i.setClipPath(new Be({shape:l.plain()}));var g=[];return R(r.named,function(m){Kae.get(m.svgNodeTagLower)!=null&&(g.push(m),Jae(m.el))}),{root:i,boundingRect:l,named:g}},t.prototype.useGraphic=function(e){var r=this._usedGraphicMap,n=r.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),r.set(e,n),n)},t.prototype.freeGraphic=function(e){var r=this._usedGraphicMap,n=r.get(e);n&&(r.removeKey(e),this._freedGraphics.push(n))},t}();function Jae(t){t.silent=!1,t.isGroup&&t.traverse(function(e){e.silent=!1})}function eoe(t){var e=[],r=de();return R(t,function(n){if(n.namedFrom==null){var i=new sre(n.name,n.el);e.push(i),r.set(n.name,i)}}),{regions:e,regionsMap:r}}var TT=[126,25],CN="南海诸岛",dl=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var ul=0;ul<dl.length;ul++)for(var Wu=0;Wu<dl[ul].length;Wu++)dl[ul][Wu][0]/=10.5,dl[ul][Wu][1]/=-10.5/.75,dl[ul][Wu][0]+=TT[0],dl[ul][Wu][1]+=TT[1];function toe(t,e){if(t==="china"){for(var r=0;r<e.length;r++)if(e[r].name===CN)return;e.push(new HF(CN,re(dl,function(n){return{type:"polygon",exterior:n}}),TT))}}var roe={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function noe(t,e){if(t==="china"){var r=roe[e.name];if(r){var n=e.getCenter();n[0]+=r[0]/10.5,n[1]+=-r[1]/(10.5/.75),e.setCenter(n)}}}var ioe=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function aoe(t,e){t==="china"&&e.name==="台湾"&&e.geometries.push({type:"polygon",exterior:ioe[0]})}var ooe="name",soe=function(){function t(e,r,n){this.type="geoJSON",this._parsedMap=de(),this._mapName=e,this._specialAreas=n,this._geoJSON=uoe(r)}return t.prototype.load=function(e,r){r=r||ooe;var n=this._parsedMap.get(r);if(!n){var i=this._parseToRegions(r);n=this._parsedMap.set(r,{regions:i,boundingRect:loe(i)})}var a=de(),o=[];return R(n.regions,function(s){var l=s.name;e&&he(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),a.set(l,s)}),{regions:o,boundingRect:n.boundingRect||new Ce(0,0,0,0),regionsMap:a}},t.prototype._parseToRegions=function(e){var r=this._mapName,n=this._geoJSON,i;try{i=n?sT(n,e):[]}catch(a){throw new Error(`Invalid geoJson format
|
||
`+a.message)}return toe(r,i),R(i,function(a){var o=a.name;noe(r,a),aoe(r,a);var s=this._specialAreas&&this._specialAreas[o];s&&a.transformTo(s.left,s.top,s.width,s.height)},this),i},t.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},t}();function loe(t){for(var e,r=0;r<t.length;r++){var n=t[r].getBoundingRect();e=e||n.clone(),e.union(n)}return e}function uoe(t){return se(t)?typeof JSON<"u"&&JSON.parse?JSON.parse(t):new Function("return ("+t+");")():t}var Tf=de();const mo={registerMap:function(t,e,r){if(e.svg){var n=new Qae(t,e.svg);Tf.set(t,n)}else{var i=e.geoJson||e.geoJSON;i&&!e.features?r=e.specialAreas:i=e;var n=new soe(t,i,r);Tf.set(t,n)}},getGeoResource:function(t){return Tf.get(t)},getMapForUser:function(t){var e=Tf.get(t);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(t,e,r){var n=Tf.get(t);if(n)return n.load(e,r)}};var rA=["rect","circle","line","ellipse","polygon","polyline","path"],coe=de(rA),hoe=de(rA.concat(["g"])),foe=de(rA.concat(["g"])),l6=Fe();function Dg(t){var e=t.getItemStyle(),r=t.get("areaColor");return r!=null&&(e.fill=r),e}function MN(t){var e=t.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var u6=function(){function t(e){var r=this.group=new _e,n=this._transformGroup=new _e;r.add(n),this.uid=wh("ec_map_draw"),this._controller=new pu(e.getZr()),this._controllerHost={target:n},n.add(this._regionsGroup=new _e),n.add(this._svgGroup=new _e)}return t.prototype.draw=function(e,r,n,i,a){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&r.eachComponent({mainType:"series",subType:"map"},function(S){!s&&S.getHostGeoModel()===e&&(s=S.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this._transformGroup,h=l.getTransformInfo(),f=h.raw,d=h.roam,p=!u.childAt(0)||a,g=e.getShallow("clip",!0),m;g?(m=l.getViewRect().clone(),this.group.setClipPath(new Be({shape:m.clone()}))):this.group.removeClipPath(),p?(c.x=d.x,c.y=d.y,c.scaleX=d.scaleX,c.scaleY=d.scaleY,c.dirty()):Qe(c,d,e);var y=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,_={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(_):l.resourceType==="geoSVG"&&this._buildSVG(_),this._updateController(e,m,r,n),this._updateMapSelectHandler(e,u,n,i)},t.prototype._buildGeoJSON=function(e){var r=this._regionsGroupByName=de(),n=de(),i=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(d,p){return p&&(d=p(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function h(d){for(var p=[],g=!u&&l&&l.project,m=0;m<d.length;++m){var y=c(d[m],g);y&&p.push(y)}return p}function f(d){return{shape:{points:h(d)}}}i.removeAll(),R(e.geo.regions,function(d){var p=d.name,g=r.get(p),m=n.get(p)||{},y=m.dataIdx,_=m.regionModel;if(!g){g=r.set(p,new _e),i.add(g),y=s?s.indexOfName(p):null,_=e.isGeo?o.getRegionModel(p):s?s.getItemModel(y):null;var S=_.get("silent",!0);S!=null&&(g.silent=S),n.set(p,{dataIdx:y,regionModel:_})}var T=[],C=[];R(d.geometries,function(k){if(k.type==="polygon"){var E=[k.exterior].concat(k.interiors||[]);u&&(E=IN(E,u)),R(E,function(I){T.push(new zr(f(I)))})}else{var D=k.points;u&&(D=IN(D,u,!0)),R(D,function(I){C.push(new Tr(f(I)))})}});var M=c(d.getCenter(),l&&l.project);function A(k,E){if(k.length){var D=new Hv({culling:!0,segmentIgnoreThreshold:1,shape:{paths:k}});g.add(D),AN(e,D,y,_),LN(e,D,p,_,o,y,M),E&&(MN(D),R(D.states,MN))}}A(T),A(C,!0)}),r.each(function(d,p){var g=n.get(p),m=g.dataIdx,y=g.regionModel;PN(e,d,p,y,o,m),kN(e,d,p,y,o),DN(e,d,p,y,o)},this)},t.prototype._buildSVG=function(e){var r=e.geo.map,n=e.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(r)&&(this._freeSVG(),this._useSVG(r));var i=this._svgDispatcherMap=de(),a=!1;R(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,c=o.svgNodeTagLower,h=o.el,f=u?u.indexOfName(s):null,d=l.getRegionModel(s);coe.get(c)!=null&&h instanceof fi&&AN(e,h,f,d),h instanceof fi&&(h.culling=!0);var p=d.get("silent",!0);if(p!=null&&(h.silent=p),h.z2EmphasisLift=0,!o.namedFrom&&(foe.get(c)!=null&&LN(e,h,s,d,l,f,null),PN(e,h,s,d,l,f),kN(e,h,s,d,l),hoe.get(c)!=null)){var g=DN(e,h,s,d,l);g==="self"&&(a=!0);var m=i.get(s)||i.set(s,[]);m.push(h)}},this),this._enableBlurEntireSVG(a,e)},t.prototype._enableBlurEntireSVG=function(e,r){if(e&&r.isGeo){var n=r.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),i=n.opacity;this._svgGraphicRecord.root.traverse(function(a){if(!a.isGroup){Kl(a);var o=a.ensureState("blur").style||{};o.opacity==null&&i!=null&&(o.opacity=i),a.ensureState("emphasis")}})}},t.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},t.prototype.findHighDownDispatchers=function(e,r){if(e==null)return[];var n=r.coordinateSystem;if(n.resourceType==="geoJSON"){var i=this._regionsGroupByName;if(i){var a=i.get(e);return a?[a]:[]}}else if(n.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},t.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},t.prototype._useSVG=function(e){var r=mo.getGeoResource(e);if(r&&r.type==="geoSVG"){var n=r.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},t.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var r=mo.getGeoResource(e);r&&r.type==="geoSVG"&&r.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},t.prototype._updateController=function(e,r,n,i){var a=e.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=e.get("scaleLimit"),s.zoom=a.getZoom(),o.enable(e.get("roam")||!1,{api:i,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(c,h,f){return a.containPoint([h,f])},isInClip:function(c,h,f){return!r||r.contain(h,f)}}});var l=e.mainType;function u(){var c={type:"geoRoam",componentType:l};return c[l+"Id"]=e.id,c}o.off("pan").on("pan",function(c){this._mouseDownFlag=!1,JM(s,c.dx,c.dy),i.dispatchAction(J(u(),{dx:c.dx,dy:c.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(c){this._mouseDownFlag=!1,eA(s,c.scale,c.originX,c.originY),i.dispatchAction(J(u(),{totalZoom:s.zoom,zoom:c.scale,originX:c.originX,originY:c.originY,animation:{duration:0}}))},this)},t.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var r=e.getTextContent();r&&(r.ignore=l6(r).ignore)})},t.prototype._updateMapSelectHandler=function(e,r,n,i){var a=this;r.off("mousedown"),r.off("click"),e.get("selectedMode")&&(r.on("mousedown",function(){a._mouseDownFlag=!0}),r.on("click",function(o){a._mouseDownFlag&&(a._mouseDownFlag=!1)}))},t}();function AN(t,e,r,n){var i=n.getModel("itemStyle"),a=n.getModel(["emphasis","itemStyle"]),o=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=Dg(i),u=Dg(a),c=Dg(s),h=Dg(o),f=t.data;if(f){var d=f.getItemVisual(r,"style"),p=f.getItemVisual(r,"decal");t.isVisualEncodedByVisualMap&&d.fill&&(l.fill=d.fill),p&&(l.decal=th(p,t.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=h,Kl(e)}function LN(t,e,r,n,i,a,o){var s=t.data,l=t.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),a)),c=s&&s.getItemLayout(a);if(l||u||c&&c.showLabel){var h=l?r:a,f=void 0;(!s||a>=0)&&(f=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;vr(e,ar(n),{labelFetcher:f,labelDataIndex:h,defaultText:r},d);var p=e.getTextContent();if(p&&(l6(p).ignore=p.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function PN(t,e,r,n,i,a){t.data?t.data.setItemGraphicEl(a,e):Le(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function kN(t,e,r,n,i){t.data||So({el:e,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function DN(t,e,r,n,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return wt(e,o,a.get("blurScope"),a.get("disabled")),t.isGeo&&iK(e,i,r),o}function IN(t,e,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=e({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(),R(t,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!r&&s.polygonEnd(),n}var doe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var o=this.group;if(o.removeAll(),!r.getHostGeoModel()){if(this._mapDraw&&a&&a.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===r.id){var s=this._mapDraw;s&&o.add(s.group)}else if(r.needsDrawMap){var s=this._mapDraw||new u6(i);o.add(s.group),s.draw(r,n,i,this,a),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;r.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(r,n,i)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(r,n,i){var a=r.originalData,o=this.group;a.each(a.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=a.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,h=u.offset,f=new Pa({style:{fill:r.getData().getVisual("style").fill},shape:{cx:c[0]+h*9,cy:c[1],r:3},silent:!0,z2:8+(h?0:mh+1)});if(!h){var d=r.mainSeries.getData(),p=a.getName(l),g=d.indexOfName(p),m=a.getItemModel(l),y=m.getModel("label"),_=d.getItemGraphicEl(g);vr(f,ar(m),{labelFetcher:{getFormattedLabel:function(S,T){return r.getFormattedLabel(g,T)}},defaultText:p}),f.disableLabelAnimation=!0,y.get("position")||f.setTextConfig({position:"bottom"}),_.onHoverStateChange=function(S){wy(f,S)}}o.add(f)}}})},e.type="map",e}(lt),voe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.needsDrawMap=!1,r.seriesGroup=[],r.getTooltipPosition=function(n){if(n!=null){var i=this.getData().getName(n),a=this.coordinateSystem,o=a.getRegion(i);return o&&a.dataToPoint(o.getCenter())}},r}return e.prototype.getInitialData=function(r){for(var n=Eh(this,{coordDimensions:["value"],encodeDefaulter:Ie(dM,this)}),i=de(),a=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);i.set(l,o)}var u=mo.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return R(u.regions,function(c){var h=c.name,f=i.get(h),d=c.properties&&c.properties.echartsStyle,p;f==null?(p={name:h},a.push(p)):p=n.getRawDataItem(f),d&&Ne(p,d)}),n.appendData(a),n},e.prototype.getHostGeoModel=function(){if(Qj(this).kind!==la.boxCoordSys)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(r){var n=this.getData();return n.get(n.mapDimension("value"),r)},e.prototype.getRegionModel=function(r){var n=this.getData();return n.getItemModel(n.indexOfName(r))},e.prototype.formatTooltip=function(r,n,i){for(var a=this.getData(),o=this.getRawValue(r),s=a.getName(r),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var h=l[c].originalData.indexOfName(s),f=a.mapDimension("value");isNaN(l[c].originalData.get(f,h))||u.push(l[c].name)}return Kt("section",{header:u.join(", "),noHeader:!u.length,blocks:[Kt("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.getLegendIcon=function(r){var n=r.icon||"roundRect",i=Ut(n,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill);return i.setStyle(r.itemStyle),i.style.stroke="none",n.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill=q.color.neutral00,i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:q.color.tertiary},itemStyle:{borderWidth:.5,borderColor:q.color.border,areaColor:q.color.background},emphasis:{label:{show:!0,color:q.color.primary},itemStyle:{areaColor:q.color.highlight}},select:{label:{show:!0,color:q.color.primary},itemStyle:{color:q.color.highlight}},nameProperty:"name"},e}(dt);function poe(t,e){var r={};return R(t,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)})}),t[0].map(t[0].mapDimension("value"),function(n,i){for(var a="ec-"+t[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,c=0;c<u;c++)s=Math.min(s,r[a][c]),l=Math.max(l,r[a][c]),o+=r[a][c];var h;return e==="min"?h=s:e==="max"?h=l:e==="average"?h=o/u:h=o,u===0?NaN:h})}function goe(t){var e={};t.eachSeriesByType("map",function(r){var n=r.getHostGeoModel(),i=n?"o"+n.id:"i"+r.getMapType();(e[i]=e[i]||[]).push(r)}),R(e,function(r,n){for(var i=poe(re(r,function(o){return o.getData()}),r[0].get("mapValueCalculation")),a=0;a<r.length;a++)r[a].originalData=r[a].getData();for(var a=0;a<r.length;a++)r[a].seriesGroup=r,r[a].needsDrawMap=a===0&&!r[a].getHostGeoModel(),r[a].setData(i.cloneShallow()),r[a].mainSeries=r[0]})}function moe(t){var e={};t.eachSeriesByType("map",function(r){var n=r.getMapType();if(!(r.getHostGeoModel()||e[n])){var i={};R(r.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&t.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var h=l.getName(c),f=s.getRegion(h);if(!(!f||isNaN(u))){var d=i[h]||0,p=s.dataToPoint(f.getCenter());i[h]=d+1,l.setItemLayout(c,{point:p,offset:d})}})});var a=r.getData();a.each(function(o){var s=a.getName(o),l=a.getItemLayout(o)||{};l.showLabel=!i[s],a.setItemLayout(o,l)}),e[n]=!0}})}var EN=Ot,gu=function(t){Y(e,t);function e(r,n){var i=t.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new qa,i._rawTransformable=new qa,i.name=r,i._opt=n,i}return e.prototype.setBoundingRect=function(r,n,i,a){return this._rect=new Ce(r,n,i,a),this._updateCenterAndZoom(),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(r,n,i,a){this._transformTo(r,n,i,a),this._viewRect=new Ce(r,n,i,a)},e.prototype._transformTo=function(r,n,i,a){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new Ce(r,n,i,a));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(r){var n=this._opt;n&&n.api&&n.ecModel&&n.ecModel.getShallow("legacyViewCoordSysCenterBase")&&r&&(r=[oe(r[0],n.api.getWidth()),oe(r[1],n.api.getWidth())]),this._centerOption=ye(r),this._updateCenterAndZoom()},e.prototype.setZoom=function(r){this._zoom=tA(r||1,this.zoomLimit),this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var r=this.getBoundingRect(),n=r.x+r.width/2,i=r.y+r.height/2;return[n,i]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var r=this._centerOption,n=this._rect;r&&n&&(this._center=[oe(r[0],n.width,n.x),oe(r[1],n.height,n.y)]);var i=this._rawTransformable.getLocalTransform(),a=this._roamTransformable,o=this.getDefaultCenter(),s=this.getCenter(),l=this.getZoom();s=Ot([],s,i),o=Ot([],o,i),a.originX=s[0],a.originY=s[1],a.x=o[0]-s[0],a.y=o[1]-s[1],a.scaleX=a.scaleY=l,this._updateTransform()},e.prototype._updateTransform=function(){var r=this._roamTransformable,n=this._rawTransformable;n.parent=r,r.updateTransform(),n.updateTransform(),Bv(this.transform||(this.transform=[]),n.transform||fr()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],hi(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var r=this._rawTransformable,n=this._roamTransformable,i=new qa;return i.transform=n.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var r=this.getBoundingRect().clone();return r.applyTransform(this.transform),r},e.prototype.dataToPoint=function(r,n,i){var a=n?this._rawTransform:this.transform;return i=i||[],a?EN(i,r,a):Hr(i,r)},e.prototype.pointToData=function(r,n,i){i=i||[];var a=this.invTransform;return a?EN(i,r,a):(i[0]=r[0],i[1]=r[1],i)},e.prototype.convertToPixel=function(r,n,i){var a=NN(n);return a===this?a.dataToPoint(i):null},e.prototype.convertFromPixel=function(r,n,i){var a=NN(n);return a===this?a.pointToData(i):null},e.prototype.containPoint=function(r){return this.getViewRectAfterRoam().contain(r[0],r[1])},e.dimensions=["x","y"],e}(qa);function NN(t){var e=t.seriesModel;return e?e.coordinateSystem:null}var yoe={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},c6=["lng","lat"],CT=function(t){Y(e,t);function e(r,n,i){var a=t.call(this,r,{api:i.api,ecModel:i.ecModel})||this;a.dimensions=c6,a.type="geo",a._nameCoordMap=de(),a.map=n;var o=i.projection,s=mo.load(n,i.nameMap,i.nameProperty),l=mo.getGeoResource(n);a.resourceType=l?l.type:null;var u=a.regions=s.regions,c=yoe[l.type];a._regionsMap=s.regionsMap,a.regions=s.regions,a.projection=o;var h;if(o)for(var f=0;f<u.length;f++){var d=u[f].getBoundingRect(o);h=h||d.clone(),h.union(d)}else h=s.boundingRect;return a.setBoundingRect(h.x,h.y,h.width,h.height),a.aspectScale=o?1:pe(i.aspectScale,c.aspectScale),a._invertLongitute=o?!1:c.invertLongitute,a}return e.prototype._transformTo=function(r,n,i,a){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new Ce(r,n,i,a));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(r){return this._regionsMap.get(r)},e.prototype.getRegionByCoord=function(r){for(var n=this.regions,i=0;i<n.length;i++){var a=n[i];if(a.type==="geoJSON"&&a.contain(r))return n[i]}},e.prototype.addGeoCoord=function(r,n){this._nameCoordMap.set(r,n)},e.prototype.getGeoCoord=function(r){var n=this._regionsMap.get(r);return this._nameCoordMap.get(r)||n&&n.getCenter()},e.prototype.dataToPoint=function(r,n,i){if(se(r)&&(r=this.getGeoCoord(r)),r){var a=this.projection;return a&&(r=a.project(r)),r&&this.projectedToPoint(r,n,i)}},e.prototype.pointToData=function(r,n,i){var a=this.projection;return a&&(r=a.unproject(r)),r&&this.pointToProjected(r,i)},e.prototype.pointToProjected=function(r,n){return t.prototype.pointToData.call(this,r,0,n)},e.prototype.projectedToPoint=function(r,n,i){return t.prototype.dataToPoint.call(this,r,n,i)},e.prototype.convertToPixel=function(r,n,i){var a=RN(n);return a===this?a.dataToPoint(i):null},e.prototype.convertFromPixel=function(r,n,i){var a=RN(n);return a===this?a.pointToData(i):null},e}(gu);Bt(CT,gu);function RN(t){var e=t.geoModel,r=t.seriesModel;return e?e.coordinateSystem:r?r.coordinateSystem||(r.getReferringComponents("geo",kt).models[0]||{}).coordinateSystem:null}function ON(t,e){var r=t.get("boundingCoords");if(r!=null){var n=r[0],i=r[1];if(isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])){var a=this.projection;if(a){var o=n[0],s=n[1],l=i[0],u=i[1];n=[1/0,1/0],i=[-1/0,-1/0];var c=function(C,M,A,k){for(var E=A-C,D=k-M,I=0;I<=100;I++){var z=I/100,O=a.project([C+E*z,M+D*z]);Ya(n,n,O),Xa(i,i,O)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(n[0],n[1],i[0]-n[0],i[1]-n[1])}}var h=this.getBoundingRect(),f=t.get("layoutCenter"),d=t.get("layoutSize"),p=sr(t,e).refContainer,g=h.width/h.height*this.aspectScale,m=!1,y,_;f&&d&&(y=[oe(f[0],p.width)+p.x,oe(f[1],p.height)+p.y],_=oe(d,Math.min(p.width,p.height)),!isNaN(y[0])&&!isNaN(y[1])&&!isNaN(_)&&(m=!0));var S;if(m)S={},g>1?(S.width=_,S.height=_/g):(S.height=_,S.width=_*g),S.y=y[1]-S.height/2,S.x=y[0]-S.width/2;else{var T=t.getBoxLayoutParams();T.aspect=g,S=bt(T,p),S=nV(t,S,g)}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function _oe(t,e){R(e.get("geoCoord"),function(r,n){t.addGeoCoord(n,r)})}var xoe=function(){function t(){this.dimensions=c6}return t.prototype.create=function(e,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new CT(l+s,l,J({nameMap:o.get("nameMap"),api:r,ecModel:e},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=ON,u.resize(o,r)}),e.eachSeries(function(o){Zv({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",kt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),R(a,function(o,s){var l=re(o,function(c){return c.get("nameMap")}),u=new CT(s,s,J({nameMap:z0(l),api:r,ecModel:e},i(o[0])));u.zoomLimit=br.apply(null,re(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=ON,u.resize(o[0],r),R(o,function(c){c.coordinateSystem=u,_oe(u,c)})}),n},t.prototype.getFilledRegions=function(e,r,n,i){for(var a=(e||[]).slice(),o=de(),s=0;s<a.length;s++)o.set(a[s].name,a[s]);var l=mo.load(r,n,i);return R(l.regions,function(u){var c=u.name,h=o.get(c),f=u.properties&&u.properties.echartsStyle;h||(h={name:c},a.push(h)),f&&Ne(h,f)}),a},t}(),h6=new xoe,Soe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i);var a=mo.getGeoResource(r.map);if(a&&a.type==="geoJSON"){var o=r.itemStyle=r.itemStyle||{};"color"in o||(o.color=r.defaultItemStyleColor||q.color.backgroundTint)}Yl(r,"label",["show"])},e.prototype.optionUpdated=function(){var r=this,n=this.option;n.regions=h6.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var i={};this._optionModelMap=ci(n.regions||[],function(a,o){var s=o.name;return s&&(a.set(s,new We(o,r,r.ecModel)),o.selected&&(i[s]=!0)),a},de()),n.selectedMap||(n.selectedMap=i)},e.prototype.getRegionModel=function(r){return this._optionModelMap.get(r)||new We(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(r,n){var i=this.getRegionModel(r),a=n==="normal"?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:r};if(me(a))return o.status=n,a(o);if(se(a))return a.replace("{a}",r??"")},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.select=function(r){var n=this.option,i=n.selectedMode;if(i){i!=="multiple"&&(n.selectedMap=null);var a=n.selectedMap||(n.selectedMap={});a[r]=!0}},e.prototype.unSelect=function(r){var n=this.option.selectedMap;n&&(n[r]=!1)},e.prototype.toggleSelected=function(r){this[this.isSelected(r)?"unSelect":"select"](r)},e.prototype.isSelected=function(r){var n=this.option.selectedMap;return!!(n&&n[r])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:q.color.tertiary},itemStyle:{borderWidth:.5,borderColor:q.color.border},emphasis:{label:{show:!0,color:q.color.primary},itemStyle:{color:q.color.highlight}},select:{label:{show:!0,color:q.color.primary},itemStyle:{color:q.color.highlight}},regions:[]},e}(Ve),boe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.focusBlurEnabled=!0,r}return e.prototype.init=function(r,n){this._api=n},e.prototype.render=function(r,n,i,a){if(this._model=r,!r.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new u6(i));var o=this._mapDraw;o.draw(r,n,i,this,a),o.group.on("click",this._handleRegionClick,this),o.group.silent=r.get("silent"),this.group.add(o.group),this.updateSelectStatus(r,n,i)},e.prototype._handleRegionClick=function(r){var n;Pl(r.target,function(i){return(n=Le(i).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},e.prototype.updateSelectStatus=function(r,n,i){var a=this;this._mapDraw.group.traverse(function(o){var s=Le(o).eventData;if(s)return a._model.isSelected(s.name)?i.enterSelect(o):i.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(r){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(r,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(mt);function woe(t,e,r){mo.registerMap(t,e,r)}function f6(t){t.registerCoordinateSystem("geo",h6),t.registerComponentModel(Soe),t.registerComponentView(boe),t.registerImpl("registerMap",woe),t.registerImpl("getMap",function(r){return mo.getMapForUser(r)});function e(r,n){n.update="geo:updateSelectStatus",t.registerAction(n,function(i,a){var o={},s=[];return a.eachComponent({mainType:"geo",query:i},function(l){l[r](i.name);var u=l.coordinateSystem;R(u.regions,function(h){o[h.name]=l.isSelected(h.name)||!1});var c=[];R(o,function(h,f){o[f]&&c.push(f)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:i.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),t.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(r,n,i){var a=r.componentType;a||(r.geoId!=null?a="geo":r.seriesId!=null&&(a="series")),a||(a="series"),n.eachComponent({mainType:a,query:r},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=d_(s,r,o.get("scaleLimit"));o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),a==="series"&&R(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function Toe(t){ze(f6),t.registerChartView(doe),t.registerSeriesModel(voe),t.registerLayout(moe),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,goe),$V("map",t.registerAction)}function Coe(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var r=[e],n,i;n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var a=i.length,o=a-1;o>=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function Moe(t,e){var r=t.isExpand?t.children:[],n=t.parentNode.children,i=t.hierNode.i?n[t.hierNode.i-1]:null;if(r.length){Loe(t);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=Poe(t,i,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Aoe(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function zN(t){return arguments.length?t:Ioe}function Yf(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function Loe(t){for(var e=t.children,r=e.length,n=0,i=0;--r>=0;){var a=e[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function Poe(t,e,r,n){if(e){for(var i=t,a=t,o=a.parentNode.children[0],s=e,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,h=s.hierNode.modifier;s=Q1(s),a=J1(a),s&&a;){i=Q1(i),o=J1(o),i.hierNode.ancestor=t;var f=s.hierNode.prelim+h-a.hierNode.prelim-u+n(s,a);f>0&&(Doe(koe(s,t,r),t,f),u+=f,l+=f),h+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!Q1(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),a&&!J1(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=t)}return r}function Q1(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function J1(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function koe(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function Doe(t,e,r){var n=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=n}function Ioe(t,e){return t.parentNode===e.parentNode?1:2}var Eoe=function(){function t(){this.parentPoint=[],this.childPoints=[]}return t}(),Noe=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Eoe},e.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,c=u==="TB"||u==="BT"?0:1,h=1-c,f=oe(n.forkPosition,1),d=[];d[c]=o[c],d[h]=o[h]+(l[h]-o[h])*f,r.moveTo(o[0],o[1]),r.lineTo(d[0],d[1]),r.moveTo(s[0],s[1]),d[c]=s[c],r.lineTo(d[0],d[1]),d[c]=l[c],r.lineTo(d[0],d[1]),r.lineTo(l[0],l[1]);for(var p=1;p<a-1;p++){var g=i[p];r.moveTo(g[0],g[1]),d[c]=g[c],r.lineTo(d[0],d[1])}},e}(Ue),Roe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._mainGroup=new _e,r}return e.prototype.init=function(r,n){this._controller=new pu(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(r,n,i){var a=r.getData(),o=r.layoutInfo,s=this._mainGroup,l=r.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(r,i),this._updateController(r,null,n,i);var u=this._data;a.diff(u).add(function(c){BN(a,c)&&jN(a,c,null,s,r)}).update(function(c,h){var f=u.getItemGraphicEl(h);if(!BN(a,c)){f&&FN(u,h,f,s,r);return}jN(a,c,f,s,r)}).remove(function(c){var h=u.getItemGraphicEl(c);h&&FN(u,c,h,s,r)}).execute(),this._nodeScaleRatio=r.get("nodeScaleRatio"),this._updateNodeAndLinkScale(r),r.get("expandAndCollapse")===!0&&a.eachItemGraphicEl(function(c,h){c.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:r.id,dataIndex:h})})}),this._data=a},e.prototype._updateViewCoordSys=function(r,n){var i=r.getData(),a=[];i.each(function(h){var f=i.getItemLayout(h);f&&!isNaN(f.x)&&!isNaN(f.y)&&a.push([+f.x,+f.y])});var o=[],s=[];Y0(a,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var c=r.coordinateSystem=new gu(null,{api:n,ecModel:r.ecModel});c.zoomLimit=r.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(r.get("center")),c.setZoom(r.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},e.prototype._updateController=function(r,n,i,a){var o=this;n6(r,a,this.group,this._controller,this._controllerHost,n),this._controller.on("zoom",function(s){o._updateNodeAndLinkScale(r)})},e.prototype._updateNodeAndLinkScale=function(r){var n=r.getData(),i=this._getNodeGlobalScale(r);n.eachItemGraphicEl(function(a,o){a.setSymbolScale(i)})},e.prototype._getNodeGlobalScale=function(r){var n=r.coordinateSystem;if(n.type!=="view")return 1;var i=this._nodeScaleRatio,a=n.scaleX||1,o=n.getZoom(),s=(o-1)*i+1;return s/a},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(lt);function BN(t,e){var r=t.getItemLayout(e);return r&&!isNaN(r.x)&&!isNaN(r.y)}function jN(t,e,r,n,i){var a=!r,o=t.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:q.color.neutral00,c=t.tree.root,h=o.parentNode===c?o:o.parentNode||o,f=t.getItemGraphicEl(h.dataIndex),d=h.getLayout(),p=f?{x:f.__oldX,y:f.__oldY,rawX:f.__radialOldRawX,rawY:f.__radialOldRawY}:d,g=o.getLayout();a?(r=new Xv(t,e,null,{symbolInnerColor:u,useNameLabel:!0}),r.x=p.x,r.y=p.y):r.updateData(t,e,null,{symbolInnerColor:u,useNameLabel:!0}),r.__radialOldRawX=r.__radialRawX,r.__radialOldRawY=r.__radialRawY,r.__radialRawX=g.rawX,r.__radialRawY=g.rawY,n.add(r),t.setItemGraphicEl(e,r),r.__oldX=r.x,r.__oldY=r.y,Qe(r,{x:g.x,y:g.y},i);var m=r.getSymbolPath();if(i.get("layout")==="radial"){var y=c.children[0],_=y.getLayout(),S=y.children.length,T=void 0,C=void 0;if(g.x===_.x&&o.isExpand===!0&&y.children.length){var M={x:(y.children[0].getLayout().x+y.children[S-1].getLayout().x)/2,y:(y.children[0].getLayout().y+y.children[S-1].getLayout().y)/2};T=Math.atan2(M.y-_.y,M.x-_.x),T<0&&(T=Math.PI*2+T),C=M.x<_.x,C&&(T=T-Math.PI)}else T=Math.atan2(g.y-_.y,g.x-_.x),T<0&&(T=Math.PI*2+T),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(C=g.x<_.x,C&&(T=T-Math.PI)):(C=g.x>_.x,C||(T=T-Math.PI));var A=C?"left":"right",k=s.getModel("label"),E=k.get("rotate"),D=E*(Math.PI/180),I=m.getTextContent();I&&(m.setTextConfig({position:k.get("position")||A,rotation:E==null?-T:D,origin:"center"}),I.setStyle("verticalAlign","middle"))}var z=s.get(["emphasis","focus"]),O=z==="relative"?$c(o.getAncestorsIndices(),o.getDescendantIndices()):z==="ancestor"?o.getAncestorsIndices():z==="descendant"?o.getDescendantIndices():null;O&&(Le(r).focus=O),Ooe(i,o,c,r,p,d,g,n),r.__edge&&(r.onHoverStateChange=function(V){if(V!=="blur"){var G=o.parentNode&&t.getItemGraphicEl(o.parentNode.dataIndex);G&&G.hoverState===Vv||wy(r.__edge,V)}})}function Ooe(t,e,r,n,i,a,o,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),h=t.getOrient(),f=t.get(["lineStyle","curveness"]),d=t.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(g||(g=n.__edge=new _h({shape:MT(c,h,f,i,i)})),Qe(g,{shape:MT(c,h,f,a,o)},t));else if(u==="polyline"&&c==="orthogonal"&&e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,y=[],_=0;_<m.length;_++){var S=m[_].getLayout();y.push([S.x,S.y])}g||(g=n.__edge=new Noe({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:h,forkPosition:d}})),Qe(g,{shape:{parentPoint:[o.x,o.y],childPoints:y}},t)}g&&!(u==="polyline"&&!e.isExpand)&&(g.useStyle(Se({strokeNoScale:!0,fill:null},p)),ir(g,l,"lineStyle"),Kl(g),s.add(g))}function VN(t,e,r,n,i){var a=e.tree.root,o=d6(a,t),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(t.dataIndex);if(u){var c=e.getItemGraphicEl(s.dataIndex),h=c.__edge,f=u.__edge||(s.isExpand===!1||s.children.length===1?h:void 0),d=n.get("edgeShape"),p=n.get("layout"),g=n.get("orient"),m=n.get(["lineStyle","curveness"]);f&&(d==="curve"?_s(f,{shape:MT(p,g,m,l,l),style:{opacity:0}},n,{cb:function(){r.remove(f)},removeOpt:i}):d==="polyline"&&n.get("layout")==="orthogonal"&&_s(f,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){r.remove(f)},removeOpt:i}))}}function d6(t,e){for(var r=e.parentNode===t?e:e.parentNode||e,n;n=r.getLayout(),n==null;)r=r.parentNode===t?r:r.parentNode||r;return{source:r,sourceLayout:n}}function FN(t,e,r,n,i){var a=t.tree.getNodeByDataIndex(e),o=t.tree.root,s=d6(o,a).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};_s(r,{x:s.x+1,y:s.y+1},i,{cb:function(){n.remove(r),t.setItemGraphicEl(e,null)},removeOpt:l}),r.fadeOut(null,t.hostModel,{fadeLabel:!0,animation:l}),a.children.forEach(function(u){VN(u,t,n,i,l)}),VN(a,t,n,i,l)}function MT(t,e,r,n,i){var a,o,s,l,u,c,h,f;if(t==="radial"){u=n.rawX,h=n.rawY,c=i.rawX,f=i.rawY;var d=Yf(u,h),p=Yf(u,h+(f-h)*r),g=Yf(c,f+(h-f)*r),m=Yf(c,f);return{x1:d.x||0,y1:d.y||0,x2:m.x||0,y2:m.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:g.x||0,cpy2:g.y||0}}else u=n.x,h=n.y,c=i.x,f=i.y,(e==="LR"||e==="RL")&&(a=u+(c-u)*r,o=h,s=c+(u-c)*r,l=f),(e==="TB"||e==="BT")&&(a=u,o=h+(f-h)*r,s=c,l=f+(h-f)*r);return{x1:u,y1:h,x2:c,y2:f,cpx1:a,cpy1:o,cpx2:s,cpy2:l}}var si=Fe();function v6(t){var e=t.mainData,r=t.datas;r||(r={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,p6(e,r,t),R(r,function(n){R(e.TRANSFERABLE_METHODS,function(i){n.wrapMethod(i,Ie(zoe,t))})}),e.wrapMethod("cloneShallow",Ie(joe,t)),R(e.CHANGABLE_METHODS,function(n){e.wrapMethod(n,Ie(Boe,t))}),Rr(r[e.dataType]===e)}function zoe(t,e){if(Goe(this)){var r=J({},si(this).datas);r[this.dataType]=e,p6(e,r,t)}else nA(e,this.dataType,si(this).mainData,t);return e}function Boe(t,e){return t.struct&&t.struct.update(),e}function joe(t,e){return R(si(e).datas,function(r,n){r!==e&&nA(r.cloneShallow(),n,e,t)}),e}function Voe(t){var e=si(this).mainData;return t==null||e==null?e:si(e).datas[t]}function Foe(){var t=si(this).mainData;return t==null?[{data:t}]:re($e(si(t).datas),function(e){return{type:e,data:si(t).datas[e]}})}function Goe(t){return si(t).mainData===t}function p6(t,e,r){si(t).datas={},R(e,function(n,i){nA(n,i,t,r)})}function nA(t,e,r,n){si(r).datas[e]=t,si(t).mainData=r,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=Voe,t.getLinkedDataAll=Foe}var Hoe=function(){function t(e,r){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=r}return t.prototype.isRemoved=function(){return this.dataIndex<0},t.prototype.eachNode=function(e,r,n){me(e)&&(n=r,r=e,e=null),e=e||{},se(e)&&(e={order:e});var i=e.order||"preorder",a=this[e.attr||"children"],o;i==="preorder"&&(o=r.call(n,this));for(var s=0;!o&&s<a.length;s++)a[s].eachNode(e,r,n);i==="postorder"&&r.call(n,this)},t.prototype.updateDepthAndHeight=function(e){var r=0;this.depth=e;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(e+1),i.height>r&&(r=i.height)}this.height=r+1},t.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var r=0,n=this.children,i=n.length;r<i;r++){var a=n[r].getNodeById(e);if(a)return a}},t.prototype.contains=function(e){if(e===this)return!0;for(var r=0,n=this.children,i=n.length;r<i;r++){var a=n[r].contains(e);if(a)return a}},t.prototype.getAncestors=function(e){for(var r=[],n=e?this:this.parentNode;n;)r.push(n),n=n.parentNode;return r.reverse(),r},t.prototype.getAncestorsIndices=function(){for(var e=[],r=this;r;)e.push(r.dataIndex),r=r.parentNode;return e.reverse(),e},t.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(r){e.push(r.dataIndex)}),e},t.prototype.getValue=function(e){var r=this.hostTree.data;return r.getStore().get(r.getDimensionIndex(e||"value"),this.dataIndex)},t.prototype.setLayout=function(e,r){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,r)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(e,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,r)},t.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,r=0;r<e.length;++r)if(e[r]===this)return r;return-1}return-1},t.prototype.isAncestorOf=function(e){for(var r=e.parentNode;r;){if(r===this)return!0;r=r.parentNode}return!1},t.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},t}(),iA=function(){function t(e){this.type="tree",this._nodes=[],this.hostModel=e}return t.prototype.eachNode=function(e,r,n){this.root.eachNode(e,r,n)},t.prototype.getNodeByDataIndex=function(e){var r=this.data.getRawIndex(e);return this._nodes[r]},t.prototype.getNodeById=function(e){return this.root.getNodeById(e)},t.prototype.update=function(){for(var e=this.data,r=this._nodes,n=0,i=r.length;n<i;n++)r[n].dataIndex=-1;for(var n=0,i=e.count();n<i;n++)r[e.getRawIndex(n)].dataIndex=n},t.prototype.clearLayouts=function(){this.data.clearItemLayouts()},t.createTree=function(e,r,n){var i=new t(r),a=[],o=1;s(e);function s(c,h){var f=c.value;o=Math.max(o,ee(f)?f.length:1),a.push(c);var d=new Hoe(rr(c.name,""),i);h?Woe(d,h):i.root=d,i._nodes.push(d);var p=c.children;if(p)for(var g=0;g<p.length;g++)s(p[g],d)}i.root.updateDepthAndHeight(0);var l=Ph(a,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Yr(l,r);return u.initData(a),n&&n(u),v6({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},t}();function Woe(t,e){var r=e.children;t.parentNode!==e&&(r.push(t),t.parentNode=e)}function mv(t,e,r){if(t&&Ee(e,t.type)>=0){var n=r.getData().tree.root,i=t.targetNode;if(se(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=t.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function g6(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function aA(t,e){var r=g6(t);return Ee(r,e)>=0}function p_(t,e){for(var r=[];t;){var n=t.dataIndex;r.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return r.reverse(),r}var Uoe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new We(i,this,this.ecModel),o=iA.createTree(n,this,s);function s(h){h.wrapMethod("getItemModel",function(f,d){var p=o.getNodeByDataIndex(d);return p&&p.children.length&&p.isExpand||(f.parentModel=a),f})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var f=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=f&&f.collapsed!=null?!f.collapsed:h.depth<=c}),o.data},e.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.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 Kt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=p_(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:q.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(dt);function Zoe(t,e,r){for(var n=[t],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;a=i.pop();)e(a,r)}function Cf(t,e){for(var r=[t],n;n=r.pop();)if(e(n),n.isExpand){var i=n.children;if(i.length)for(var a=i.length-1;a>=0;a--)r.push(i[a])}}function $oe(t,e){t.eachSeriesByType("tree",function(r){Yoe(r,e)})}function Yoe(t,e){var r=sr(t,e).refContainer,n=bt(t.getBoxLayoutParams(),r);t.layoutInfo=n;var i=t.get("layout"),a=0,o=0,s=null;i==="radial"?(a=2*Math.PI,o=Math.min(n.height,n.width)/2,s=zN(function(T,C){return(T.parentNode===C.parentNode?1:2)/T.depth})):(a=n.width,o=n.height,s=zN());var l=t.getData().tree.root,u=l.children[0];if(u){Coe(l),Zoe(u,Moe,s),l.hierNode.modifier=-u.hierNode.prelim,Cf(u,Aoe);var c=u,h=u,f=u;Cf(u,function(T){var C=T.getLayout().x;C<c.getLayout().x&&(c=T),C>h.getLayout().x&&(h=T),T.depth>f.depth&&(f=T)});var d=c===h?1:s(c,h)/2,p=d-c.getLayout().x,g=0,m=0,y=0,_=0;if(i==="radial")g=a/(h.getLayout().x+d+p),m=o/(f.depth-1||1),Cf(u,function(T){y=(T.getLayout().x+p)*g,_=(T.depth-1)*m;var C=Yf(y,_);T.setLayout({x:C.x,y:C.y,rawX:y,rawY:_},!0)});else{var S=t.getOrient();S==="RL"||S==="LR"?(m=o/(h.getLayout().x+d+p),g=a/(f.depth-1||1),Cf(u,function(T){_=(T.getLayout().x+p)*m,y=S==="LR"?(T.depth-1)*g:a-(T.depth-1)*g,T.setLayout({x:y,y:_},!0)})):(S==="TB"||S==="BT")&&(g=a/(h.getLayout().x+d+p),m=o/(f.depth-1||1),Cf(u,function(T){y=(T.getLayout().x+p)*g,_=S==="TB"?(T.depth-1)*m:o-(T.depth-1)*m,T.setLayout({x:y,y:_},!0)}))}}}function Xoe(t){t.eachSeriesByType("tree",function(e){var r=e.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");J(s,o)})})}function qoe(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=e.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var a=i.coordinateSystem,o=d_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function Koe(t){t.registerChartView(Roe),t.registerSeriesModel(Uoe),t.registerLayout($oe),t.registerVisual(Xoe),qoe(t)}var GN=["treemapZoomToNode","treemapRender","treemapMove"];function Qoe(t){for(var e=0;e<GN.length;e++)t.registerAction({type:GN[e],update:"updateView"},Rt);t.registerAction({type:"treemapRootToNode",update:"updateView"},function(r,n){n.eachComponent({mainType:"series",subType:"treemap",query:r},i);function i(a,o){var s=["treemapZoomToNode","treemapRootToNode"],l=mv(r,s,a);if(l){var u=a.getViewRoot();u&&(r.direction=aA(u,l.node)?"rollUp":"drillDown"),a.resetViewRoot(l.node)}}})}function m6(t){var e=t.getData(),r=e.tree,n={};r.eachNode(function(i){for(var a=i;a&&a.depth>1;)a=a.parentNode;var o=Hw(t.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var Joe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventUsingHoverLayer=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};y6(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new We({itemStyle:o},this,n);a=r.levels=ese(a,n);var l=re(a||[],function(h){return new We(h,s,n)},this),u=iA.createTree(i,this,c);function c(h){h.wrapMethod("getItemModel",function(f,d){var p=u.getNodeByDataIndex(d),g=p?l[p.depth]:null;return f.parentModel=g||s,f})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Kt("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=p_(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},J(this.layoutInfo,r)},e.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=de(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.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)},e.prototype.enableAriaDecal=function(){m6(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:q.size.l,top:q.size.xxxl,right:q.size.l,bottom:q.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:q.size.m,emptyItemWidth:25,itemStyle:{color:q.color.backgroundShade,textStyle:{color:q.color.secondary}},emphasis:{itemStyle:{color:q.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:q.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:q.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(dt);function y6(t){var e=0;R(t.children,function(n){y6(n);var i=n.value;ee(i)&&(i=i[0]),e+=i});var r=t.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),ee(t.value)?t.value[0]=r:t.value=r}function ese(t,e){var r=gt(e.get("color")),n=gt(e.get(["aria","decal","decals"]));if(r){t=t||[];var i,a;R(t,function(s){var l=new We(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=t[0]||(t[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),t}}var tse=8,HN=8,eS=5,rse=function(){function t(e){this.group=new _e,e.add(this.group)}return t.prototype.render=function(e,r,n,i){var a=e.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"),c=l.getModel(["itemStyle","textStyle"]),h=sr(e,r).refContainer,f={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},d={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=bt(f,h);this._prepare(n,d,u),this._renderContent(e,d,p,s,l,u,c,i),r_(o,f,h)}},t.prototype._prepare=function(e,r,n){for(var i=e;i;i=i.parentNode){var a=rr(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+tse*2,r.emptyItemWidth);r.totalWidth+=s+HN,r.renderList.push({node:i,text:a,width:s})}},t.prototype._renderContent=function(e,r,n,i,a,o,s,l){for(var u=0,c=r.emptyItemWidth,h=e.get(["breadcrumb","height"]),f=r.totalWidth,d=r.renderList,p=a.getModel("itemStyle").getItemStyle(),g=d.length-1;g>=0;g--){var m=d[g],y=m.node,_=m.width,S=m.text;f>n.width&&(f-=_-c,_=c,S=null);var T=new zr({shape:{points:nse(u,0,_,h,g===d.length-1,g===0)},style:Se(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Xe({style:pt(o,{text:S})}),textConfig:{position:"inside"},z2:mh*1e4,onclick:Ie(l,y)});T.disableLabelAnimation=!0,T.getTextContent().ensureState("emphasis").style=pt(s,{text:S}),T.ensureState("emphasis").style=p,wt(T,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(T),ise(T,e,y),u+=_+HN}},t.prototype.remove=function(){this.group.removeAll()},t}();function nse(t,e,r,n,i,a){var o=[[i?t:t-eS,e],[t+r,e],[t+r,e+n],[i?t:t-eS,e+n]];return!a&&o.splice(2,0,[t+r+eS,e+n/2]),!i&&o.push([t,e+n/2]),o}function ise(t,e,r){Le(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&p_(r,e)}}var ase=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(e,r,n,i,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:r,duration:n,delay:i,easing:a}),!0)},t.prototype.finished=function(e){return this._finishedCallback=e,this},t.prototype.start=function(){for(var e=this,r=this._storage.length,n=function(){r--,r<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,a=this._storage.length;i<a;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},t}();function ose(){return new ase}var AT=_e,WN=Be,UN=3,ZN="label",$N="upperLabel",sse=mh*10,lse=mh*2,use=mh*3,vl=ql([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),YN=function(t){var e=vl(t);return e.stroke=e.fill=e.lineWidth=null,e},Ky=Fe(),cse=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._state="ready",r._storage=Mf(),r}return e.prototype.render=function(r,n,i,a){var o=n.findComponents({mainType:"series",subType:"treemap",query:a});if(!(Ee(o,r)<0)){this.seriesModel=r,this.api=i,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=mv(a,s,r),u=a&&a.type,c=r.layoutInfo,h=!this._oldTree,f=this._storage,d=u==="treemapRootToNode"&&l&&f?{rootNodeGroup:f.nodeGroup[l.node.getRawIndex()],direction:a.direction}:null,p=this._giveContainerGroup(c),g=r.get("animation"),m=this._doRender(p,r,d);g&&!h&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,m,r,d):m.renderFinally(),this._resetController(i),this._renderBreadcrumb(r,i,l)}},e.prototype._giveContainerGroup=function(r){var n=this._containerGroup;return n||(n=this._containerGroup=new AT,this._initEvents(n),this.group.add(n)),n.x=r.x,n.y=r.y,n},e.prototype._doRender=function(r,n,i){var a=n.getData().tree,o=this._oldTree,s=Mf(),l=Mf(),u=this._storage,c=[];function h(_,S,T,C){return hse(n,l,u,i,s,c,_,S,T,C)}g(a.root?[a.root]:[],o&&o.root?[o.root]:[],r,a===o||!o,0);var f=m(u);if(this._oldTree=a,this._storage=l,this._controllerHost){var d=this.seriesModel.layoutInfo,p=a.root.getLayout();p.width===d.width&&p.height===d.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:f,renderFinally:y};function g(_,S,T,C,M){C?(S=_,R(_,function(E,D){!E.isRemoved()&&k(D,D)})):new vo(S,_,A,A).add(k).update(k).remove(Ie(k,null)).execute();function A(E){return E.getId()}function k(E,D){var I=E!=null?_[E]:null,z=D!=null?S[D]:null,O=h(I,z,T,M);O&&g(I&&I.viewChildren||[],z&&z.viewChildren||[],O,C,M+1)}}function m(_){var S=Mf();return _&&R(_,function(T,C){var M=S[C];R(T,function(A){A&&(M.push(A),Ky(A).willDelete=!0)})}),S}function y(){R(f,function(_){R(_,function(S){S.parent&&S.parent.remove(S)})}),R(c,function(_){_.invisible=!0,_.dirty()})}},e.prototype._doAnimation=function(r,n,i,a){var o=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(me(o)?0:o)||0,u=(me(s)?null:s)||"cubicOut",c=ose();R(n.willDeleteEls,function(h,f){R(h,function(d,p){if(!d.invisible){var g=d.parent,m,y=Ky(g);if(a&&a.direction==="drillDown")m=g===a.rootNodeGroup?{shape:{x:0,y:0,width:y.nodeWidth,height:y.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var _=0,S=0;y.willDelete||(_=y.nodeWidth/2,S=y.nodeHeight/2),m=f==="nodeGroup"?{x:_,y:S,style:{opacity:0}}:{shape:{x:_,y:S,width:0,height:0},style:{opacity:0}}}m&&c.add(d,m,l,0,u)}})}),R(this._storage,function(h,f){R(h,function(d,p){var g=n.lastsForAnimation[f][p],m={};g&&(d instanceof _e?g.oldX!=null&&(m.x=d.x,m.y=d.y,d.x=g.oldX,d.y=g.oldY):(g.oldShape&&(m.shape=J({},d.shape),d.setShape(g.oldShape)),g.fadein?(d.setStyle("opacity",0),m.style={opacity:1}):d.style.opacity!==1&&(m.style={opacity:1})),c.add(d,m,l,0,u))})},this),this._state="animating",c.finished(le(function(){this._state="ready",n.renderFinally()},this)).start()},e.prototype._resetController=function(r){var n=this,i=this._controller,a=this._controllerHost;a||(this._controllerHost={target:this.group},a=this._controllerHost);var o=this.seriesModel;i||(i=this._controller=new pu(r.getZr()),i.on("pan",le(this._onPan,this)),i.on("zoom",le(this._onZoom,this))),i.enable(o.get("roam"),{api:r,zInfo:{component:o},triggerInfo:{roamTrigger:o.get("roamTrigger"),isInSelf:function(s,l,u){var c=n._containerGroup;return c?c.getBoundingRect().contain(l-c.x,u-c.y):!1}}}),a.zoomLimit=o.get("scaleLimit"),a.zoom=o.get("zoom")},e.prototype._clearController=function(){var r=this._controller;this._controllerHost=null,r&&(r.dispose(),r=null)},e.prototype._onPan=function(r){if(this._state!=="animating"&&(Math.abs(r.dx)>UN||Math.abs(r.dy)>UN)){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}})}},e.prototype._onZoom=function(r){var n=r.originX,i=r.originY,a=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Ce(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var h=c.zoom=c.zoom||1;if(h*=a,u){var f=u.min||0,d=u.max||1/0;h=Math.max(Math.min(d,h),f)}var p=h/c.zoom;c.zoom=h;var g=this.seriesModel.layoutInfo;n-=g.x,i-=g.y;var m=fr();zi(m,m,[-n,-i]),V0(m,m,[p,p]),zi(m,m,[n,i]),l.applyTransform(m),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(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),c=l.get("target",!0)||"blank";u&&Ay(u,c)}}}}},this)},e.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 rse(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(aA(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Mf(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.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},e.type="treemap",e}(lt);function Mf(){return{nodeGroup:[],background:[],content:[]}}function hse(t,e,r,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),h=t.getData(),f=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,p=c.height,g=c.borderWidth,m=c.invisible,y=o.getRawIndex(),_=s&&s.getRawIndex(),S=o.viewChildren,T=c.upperHeight,C=S&&S.length,M=f.getModel("itemStyle"),A=f.getModel(["emphasis","itemStyle"]),k=f.getModel(["blur","itemStyle"]),E=f.getModel(["select","itemStyle"]),D=M.get("borderRadius")||0,I=ue("nodeGroup",AT);if(!I)return;if(l.add(I),I.x=c.x||0,I.y=c.y||0,I.markRedraw(),Ky(I).nodeWidth=d,Ky(I).nodeHeight=p,c.isAboveViewRoot)return I;var z=ue("background",WN,u,lse);z&&H(I,z,C&&c.upperLabelHeight);var O=f.getModel("emphasis"),V=O.get("focus"),G=O.get("blurScope"),F=O.get("disabled"),U=V==="ancestor"?o.getAncestorsIndices():V==="descendant"?o.getDescendantIndices():V;if(C)rv(I)&&Al(I,!1),z&&(Al(z,!F),h.setItemGraphicEl(o.dataIndex,z),Iw(z,U,G));else{var j=ue("content",WN,u,use);j&&X(I,j),z.disableMorphing=!0,z&&rv(z)&&Al(z,!1),Al(I,!F),h.setItemGraphicEl(o.dataIndex,I);var W=f.getShallow("cursor");W&&j.attr("cursor",W),Iw(I,U,G)}return I;function H(xe,ge,ke){var fe=Le(ge);if(fe.dataIndex=o.dataIndex,fe.seriesIndex=t.seriesIndex,ge.setShape({x:0,y:0,width:d,height:p,r:D}),m)K(ge);else{ge.invisible=!1;var Me=o.getVisual("style"),st=Me.stroke,Ye=YN(M);Ye.fill=st;var rt=vl(A);rt.fill=A.get("borderColor");var ut=vl(k);ut.fill=k.get("borderColor");var Dt=vl(E);if(Dt.fill=E.get("borderColor"),ke){var gr=d-2*g;ne(ge,st,Me.opacity,{x:g,y:0,width:gr,height:T})}else ge.removeTextContent();ge.setStyle(Ye),ge.ensureState("emphasis").style=rt,ge.ensureState("blur").style=ut,ge.ensureState("select").style=Dt,Kl(ge)}xe.add(ge)}function X(xe,ge){var ke=Le(ge);ke.dataIndex=o.dataIndex,ke.seriesIndex=t.seriesIndex;var fe=Math.max(d-2*g,0),Me=Math.max(p-2*g,0);if(ge.culling=!0,ge.setShape({x:g,y:g,width:fe,height:Me,r:D}),m)K(ge);else{ge.invisible=!1;var st=o.getVisual("style"),Ye=st.fill,rt=YN(M);rt.fill=Ye,rt.decal=st.decal;var ut=vl(A),Dt=vl(k),gr=vl(E);ne(ge,Ye,st.opacity,null),ge.setStyle(rt),ge.ensureState("emphasis").style=ut,ge.ensureState("blur").style=Dt,ge.ensureState("select").style=gr,Kl(ge)}xe.add(ge)}function K(xe){!xe.invisible&&a.push(xe)}function ne(xe,ge,ke,fe){var Me=f.getModel(fe?$N:ZN),st=rr(f.get("name"),null),Ye=Me.getShallow("show");vr(xe,ar(f,fe?$N:ZN),{defaultText:Ye?st:null,inheritColor:ge,defaultOpacity:ke,labelFetcher:t,labelDataIndex:o.dataIndex});var rt=xe.getTextContent();if(rt){var ut=rt.style,Dt=Rv(ut.padding||0);fe&&(xe.setTextConfig({layoutRect:fe}),rt.disableLabelLayout=!0),rt.beforeUpdate=function(){var Br=Math.max((fe?fe.width:xe.shape.width)-Dt[1]-Dt[3],0),Gi=Math.max((fe?fe.height:xe.shape.height)-Dt[0]-Dt[2],0);(ut.width!==Br||ut.height!==Gi)&&rt.setStyle({width:Br,height:Gi})},ut.truncateMinChar=2,ut.lineOverflow="truncate",ie(ut,fe,c);var gr=rt.getState("emphasis");ie(gr?gr.style:null,fe,c)}}function ie(xe,ge,ke){var fe=xe?xe.text:null;if(!ge&&ke.isLeafRoot&&fe!=null){var Me=t.get("drillDownIcon",!0);xe.text=Me?Me+" "+fe:fe}}function ue(xe,ge,ke,fe){var Me=_!=null&&r[xe][_],st=i[xe];return Me?(r[xe][_]=null,ve(st,Me)):m||(Me=new ge,Me instanceof fi&&(Me.z2=fse(ke,fe)),Ge(st,Me)),e[xe][y]=Me}function ve(xe,ge){var ke=xe[y]={};ge instanceof AT?(ke.oldX=ge.x,ke.oldY=ge.y):ke.oldShape=J({},ge.shape)}function Ge(xe,ge){var ke=xe[y]={},fe=o.parentNode,Me=ge instanceof _e;if(fe&&(!n||n.direction==="drillDown")){var st=0,Ye=0,rt=i.background[fe.getRawIndex()];!n&&rt&&rt.oldShape&&(st=rt.oldShape.width,Ye=rt.oldShape.height),Me?(ke.oldX=0,ke.oldY=Ye):ke.oldShape={x:st,y:Ye,width:0,height:0}}ke.fadein=!Me}}function fse(t,e){return t*sse+e}var yv=R,dse=be,Qy=-1,dr=function(){function t(e){var r=e.mappingMethod,n=e.type,i=this.option=ye(e);this.type=n,this.mappingMethod=r,this._normalizeData=gse[r];var a=t.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(tS(i),vse(i)):r==="category"?i.categories?pse(i):tS(i,!0):(Rr(r!=="linear"||i.dataExtent),tS(i))}return t.prototype.mapValueToVisual=function(e){var r=this._normalizeData(e);return this._normalizedToVisual(r,e)},t.prototype.getNormalizer=function(){return le(this._normalizeData,this)},t.listVisualTypes=function(){return $e(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(e,r,n){be(e)?R(e,r,n):r.call(n,e)},t.mapVisual=function(e,r,n){var i,a=ee(e)?[]:be(e)?{}:(i=!0,null);return t.eachVisual(e,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},t.retrieveVisuals=function(e){var r={},n;return e&&yv(t.visualHandlers,function(i,a){e.hasOwnProperty(a)&&(r[a]=e[a],n=!0)}),n?r:null},t.prepareVisualTypes=function(e){if(ee(e))e=e.slice();else if(dse(e)){var r=[];yv(e,function(n,i){r.push(i)}),e=r}else return[];return e.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},t.dependsOn=function(e,r){return r==="color"?!!(e&&e.indexOf(r)===0):e===r},t.findPieceIndex=function(e,r,n){for(var i,a=1/0,o=0,s=r.length;o<s;o++){var l=r[o].value;if(l!=null){if(l===e||se(l)&&l===e+"")return o;n&&f(l,o)}}for(var o=0,s=r.length;o<s;o++){var u=r[o],c=u.interval,h=u.close;if(c){if(c[0]===-1/0){if(Eg(h[1],e,c[1]))return o}else if(c[1]===1/0){if(Eg(h[0],c[0],e))return o}else if(Eg(h[0],c[0],e)&&Eg(h[1],e,c[1]))return o;n&&f(c[0],o),n&&f(c[1],o)}}if(n)return e===1/0?r.length-1:e===-1/0?0:i;function f(d,p){var g=Math.abs(d-e);g<a&&(a=g,i=p)}},t.visualHandlers={color:{applyVisual:Af("color"),getColorMapper:function(){var e=this.option;return le(e.mappingMethod==="category"?function(r,n){return!n&&(r=this._normalizeData(r)),Xf.call(this,r)}:function(r,n,i){var a=!!i;return!n&&(r=this._normalizeData(r)),i=vd(r,e.parsedVisual,i),a?i:oi(i,"rgba")},this)},_normalizedToVisual:{linear:function(e){return oi(vd(e,this.option.parsedVisual),"rgba")},category:Xf,piecewise:function(e,r){var n=PT.call(this,r);return n==null&&(n=oi(vd(e,this.option.parsedVisual),"rgba")),n},fixed:pl}},colorHue:Ig(function(e,r){return eo(e,r)}),colorSaturation:Ig(function(e,r){return eo(e,null,r)}),colorLightness:Ig(function(e,r){return eo(e,null,null,r)}),colorAlpha:Ig(function(e,r){return Kd(e,r)}),decal:{applyVisual:Af("decal"),_normalizedToVisual:{linear:null,category:Xf,piecewise:null,fixed:null}},opacity:{applyVisual:Af("opacity"),_normalizedToVisual:LT([0,1])},liftZ:{applyVisual:Af("liftZ"),_normalizedToVisual:{linear:pl,category:pl,piecewise:pl,fixed:pl}},symbol:{applyVisual:function(e,r,n){var i=this.mapValueToVisual(e);n("symbol",i)},_normalizedToVisual:{linear:XN,category:Xf,piecewise:function(e,r){var n=PT.call(this,r);return n==null&&(n=XN.call(this,e)),n},fixed:pl}},symbolSize:{applyVisual:Af("symbolSize"),_normalizedToVisual:LT([0,1])}},t}();function vse(t){var e=t.pieceList;t.hasSpecialVisual=!1,R(e,function(r,n){r.originIndex=n,r.visual!=null&&(t.hasSpecialVisual=!0)})}function pse(t){var e=t.categories,r=t.categoryMap={},n=t.visual;if(yv(e,function(o,s){r[o]=s}),!ee(n)){var i=[];be(n)?yv(n,function(o,s){var l=r[s];i[l??Qy]=o}):i[Qy]=n,n=_6(t,i)}for(var a=e.length-1;a>=0;a--)n[a]==null&&(delete r[e[a]],e.pop())}function tS(t,e){var r=t.visual,n=[];be(r)?yv(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!e&&n.length===1&&!i.hasOwnProperty(t.type)&&(n[1]=n[0]),_6(t,n)}function Ig(t){return{applyVisual:function(e,r,n){var i=this.mapValueToVisual(e);n("color",t(r("color"),i))},_normalizedToVisual:LT([0,1])}}function XN(t){var e=this.option.visual;return e[Math.round(it(t,[0,1],[0,e.length-1],!0))]||{}}function Af(t){return function(e,r,n){n(t,this.mapValueToVisual(e))}}function Xf(t){var e=this.option.visual;return e[this.option.loop&&t!==Qy?t%e.length:t]}function pl(){return this.option.visual[0]}function LT(t){return{linear:function(e){return it(e,t,this.option.visual,!0)},category:Xf,piecewise:function(e,r){var n=PT.call(this,r);return n==null&&(n=it(e,t,this.option.visual,!0)),n},fixed:pl}}function PT(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var n=dr.findPieceIndex(t,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function _6(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=re(e,function(r){var n=$r(r);return n||[0,0,0,1]})),e}var gse={linear:function(t){return it(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=dr.findPieceIndex(t,e,!0);if(r!=null)return it(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??Qy},fixed:Rt};function Eg(t,e,r){return t?e<=r:e<r}var mse="itemStyle",x6=Fe();const yse={seriesType:"treemap",reset:function(t){var e=t.getData().tree,r=e.root;r.isRemoved()||S6(r,{},t.getViewRoot().getAncestors(),t)}};function S6(t,e,r,n){var i=t.getModel(),a=t.getLayout(),o=t.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(mse),l=_se(s,e,n),u=o.ensureUniqueItemVisual(t.dataIndex,"style"),c=s.get("borderColor"),h=s.get("borderColorSaturation"),f;h!=null&&(f=qN(l),c=xse(h,f)),u.stroke=c;var d=t.viewChildren;if(!d||!d.length)f=qN(l),u.fill=f;else{var p=Sse(t,i,a,s,l,d);R(d,function(g,m){if(g.depth>=r.length||g===r[g.depth]){var y=bse(i,l,g,m,p,n);S6(g,y,r,n)}})}}}function _se(t,e,r){var n=J({},e),i=r.designatedVisualItemStyle;return R(["color","colorAlpha","colorSaturation"],function(a){i[a]=e[a];var o=t.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function qN(t){var e=rS(t,"color");if(e){var r=rS(t,"colorAlpha"),n=rS(t,"colorSaturation");return n&&(e=eo(e,null,null,n)),r&&(e=Kd(e,r)),e}}function xse(t,e){return e!=null?eo(e,null,null,t):null}function rS(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function Sse(t,e,r,n,i,a){if(!(!a||!a.length)){var o=nS(e,"color")||i.color!=null&&i.color!=="none"&&(nS(e,"colorAlpha")||nS(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=e.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(c==="index"||c==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var f=new dr(h);return x6(f).drColorMappingBy=c,f}}}function nS(t,e){var r=t.get(e);return ee(r)&&r.length?{name:e,range:r}:null}function bse(t,e,r,n,i,a){var o=J({},e);if(i){var s=i.type,l=s==="color"&&x6(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var _v=Math.max,Jy=Math.min,KN=br,oA=R,b6=["itemStyle","borderWidth"],wse=["itemStyle","gapWidth"],Tse=["upperLabel","show"],Cse=["upperLabel","height"];const Mse={seriesType:"treemap",reset:function(t,e,r,n){var i=t.option,a=sr(t,r).refContainer,o=bt(t.getBoxLayoutParams(),a),s=i.size||[],l=oe(KN(o.width,s[0]),a.width),u=oe(KN(o.height,s[1]),a.height),c=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],f=mv(n,h,t),d=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,p=t.getViewRoot(),g=g6(p);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?Ise(t,f,p,l,u):d?[d.width,d.height]:[l,u],y=i.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:i.squareRatio,sort:y,leafDepth:i.leafDepth};p.hostTree.clearLayouts();var S={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(S),w6(p,_,!1,0),S=p.getLayout(),oA(g,function(C,M){var A=(g[M+1]||p).getValue();C.setLayout(J({dataExtent:[A,A],borderWidth:0,upperHeight:0},S))})}var T=t.getData().tree.root;T.setLayout(Ese(o,d,f),!0),t.setLayoutInfo(o),T6(T,new Ce(-o.x,-o.y,r.getWidth(),r.getHeight()),g,p,0)}};function w6(t,e,r,n){var i,a;if(!t.isRemoved()){var o=t.getLayout();i=o.width,a=o.height;var s=t.getModel(),l=s.get(b6),u=s.get(wse)/2,c=C6(s),h=Math.max(l,c),f=l-u,d=h-u;t.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0),i=_v(i-2*f,0),a=_v(a-f-d,0);var p=i*a,g=Ase(t,s,p,e,r,n);if(g.length){var m={x:f,y:d,width:i,height:a},y=Jy(i,a),_=1/0,S=[];S.area=0;for(var T=0,C=g.length;T<C;){var M=g[T];S.push(M),S.area+=M.getLayout().area;var A=Dse(S,y,e.squareRatio);A<=_?(T++,_=A):(S.area-=S.pop().getLayout().area,QN(S,y,m,u,!1),y=Jy(m.width,m.height),S.length=S.area=0,_=1/0)}if(S.length&&QN(S,y,m,u,!0),!r){var k=s.get("childrenVisibleMin");k!=null&&p<k&&(r=!0)}for(var T=0,C=g.length;T<C;T++)w6(g[T],e,r,n+1)}}}function Ase(t,e,r,n,i,a){var o=t.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=a;if(i&&!l)return t.viewChildren=[];o=tt(o,function(d){return!d.isRemoved()}),Pse(o,s);var u=kse(e,o,s);if(u.sum===0)return t.viewChildren=[];if(u.sum=Lse(e,r,u.sum,s,o),u.sum===0)return t.viewChildren=[];for(var c=0,h=o.length;c<h;c++){var f=o[c].getValue()/u.sum*r;o[c].setLayout({area:f})}return l&&(o.length&&t.setLayout({isLeafRoot:!0},!0),o.length=0),t.viewChildren=o,t.setLayout({dataExtent:u.dataExtent},!0),o}function Lse(t,e,r,n,i){if(!n)return r;for(var a=t.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*e<a&&(s=l,r-=u)}return n==="asc"?i.splice(0,o-s):i.splice(s,o-s),r}function Pse(t,e){return e&&t.sort(function(r,n){var i=e==="asc"?r.getValue()-n.getValue():n.getValue()-r.getValue();return i===0?e==="asc"?r.dataIndex-n.dataIndex:n.dataIndex-r.dataIndex:i}),t}function kse(t,e,r){for(var n=0,i=0,a=e.length;i<a;i++)n+=e[i].getValue();var o=t.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&r?(s=[e[e.length-1].getValue(),e[0].getValue()],r==="asc"&&s.reverse()):(s=[1/0,-1/0],oA(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Dse(t,e,r){for(var n=0,i=1/0,a=0,o=void 0,s=t.length;a<s;a++)o=t[a].getLayout().area,o&&(o<i&&(i=o),o>n&&(n=o));var l=t.area*t.area,u=e*e*r;return l?_v(u*n/l,l/(u*i)):1/0}function QN(t,e,r,n,i){var a=e===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],c=e?t.area/e:0;(i||c>r[l[o]])&&(c=r[l[o]]);for(var h=0,f=t.length;h<f;h++){var d=t[h],p={},g=c?d.getLayout().area/c:0,m=p[l[o]]=_v(c-2*n,0),y=r[s[a]]+r[l[a]]-u,_=h===f-1||y<g?y:g,S=p[l[a]]=_v(_-2*n,0);p[s[o]]=r[s[o]]+Jy(n,m/2),p[s[a]]=u+Jy(n,S/2),u+=_,d.setLayout(p,!0)}r[s[o]]+=c,r[l[o]]-=c}function Ise(t,e,r,n,i){var a=(e||{}).node,o=[n,i];if(!a||a===r)return o;for(var s,l=n*i,u=l*t.option.zoomToNodeRatio;s=a.parentNode;){for(var c=0,h=s.children,f=0,d=h.length;f<d;f++)c+=h[f].getValue();var p=a.getValue();if(p===0)return o;u*=c/p;var g=s.getModel(),m=g.get(b6),y=Math.max(m,C6(g));u+=4*m*m+(3*m+y)*Math.pow(u,.5),u>Sw&&(u=Sw),a=s}u<l&&(u=l);var _=Math.pow(u/l,.5);return[n*_,i*_]}function Ese(t,e,r){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!r)return n;var i=r.node,a=i.getLayout();if(!a)return n;for(var o=[a.width/2,a.height/2],s=i;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:t.width/2-o[0],y:t.height/2-o[1]}}function T6(t,e,r,n,i){var a=t.getLayout(),o=r[i],s=o&&o===t;if(!(o&&!s||i===r.length&&t!==n)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(a),isAboveViewRoot:s},!0);var l=new Ce(e.x-a.x,e.y-a.y,e.width,e.height);oA(t.viewChildren||[],function(u){T6(u,l,r,n,i+1)})}}function C6(t){return t.get(Tse)?t.get(Cse):0}function Nse(t){t.registerSeriesModel(Joe),t.registerChartView(cse),t.registerVisual(yse),t.registerLayout(Mse),Qoe(t)}function Rse(t){var e=t.findComponents({mainType:"legend"});!e||!e.length||t.eachSeriesByType("graph",function(r){var n=r.getCategoriesData(),i=r.getGraph(),a=i.data,o=n.mapArray(n.getName);a.filterSelf(function(s){var l=a.getItemModel(s),u=l.getShallow("category");if(u!=null){qe(u)&&(u=o[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function Ose(t){var e={};t.eachSeriesByType("graph",function(r){var n=r.getCategoriesData(),i=r.getData(),a={};n.each(function(o){var s=n.getName(o);a["ec-"+s]=o;var l=n.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=r.getColorFromPalette(s,e)),n.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],h=0;h<c.length;h++){var f=l.getShallow(c[h],!0);f!=null&&n.setItemVisual(o,c[h],f)}}),n.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){se(l)&&(l=a["ec-"+l]);var u=n.getItemVisual(l,"style"),c=i.ensureUniqueItemVisual(o,"style");J(c,u);for(var h=["symbol","symbolSize","symbolKeepAspect"],f=0;f<h.length;f++)i.setItemVisual(o,h[f],n.getItemVisual(l,h[f]))}})})}function Ng(t){return t instanceof Array||(t=[t,t]),t}function zse(t){t.eachSeriesByType("graph",function(e){var r=e.getGraph(),n=e.getEdgeData(),i=Ng(e.get("edgeSymbol")),a=Ng(e.get("edgeSymbolSize"));n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",a&&a[0]),n.setVisual("toSymbolSize",a&&a[1]),n.setVisual("style",e.getModel("lineStyle").getLineStyle()),n.each(function(o){var s=n.getItemModel(o),l=r.getEdgeByIndex(o),u=Ng(s.getShallow("symbol",!0)),c=Ng(s.getShallow("symbolSize",!0)),h=s.getModel("lineStyle").getLineStyle(),f=n.ensureUniqueItemVisual(o,"style");switch(J(f,h),f.stroke){case"source":{var d=l.node1.getVisual("style");f.stroke=d&&d.fill;break}case"target":{var d=l.node2.getVisual("style");f.stroke=d&&d.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var kT="-->",g_=function(t){return t.get("autoCurveness")||null},M6=function(t,e){var r=g_(t),n=20,i=[];if(qe(r))n=r;else if(ee(r)){t.__curvenessList=r;return}e>n&&(n=e);var a=n%2?n+2:n+3;i=[];for(var o=0;o<a;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));t.__curvenessList=i},xv=function(t,e,r){var n=[t.id,t.dataIndex].join("."),i=[e.id,e.dataIndex].join(".");return[r.uid,n,i].join(kT)},A6=function(t){var e=t.split(kT);return[e[0],e[2],e[1]].join(kT)},Bse=function(t,e){var r=xv(t.node1,t.node2,e);return e.__edgeMap[r]},jse=function(t,e){var r=DT(xv(t.node1,t.node2,e),e),n=DT(xv(t.node2,t.node1,e),e);return r+n},DT=function(t,e){var r=e.__edgeMap;return r[t]?r[t].length:0};function Vse(t){g_(t)&&(t.__curvenessList=[],t.__edgeMap={},M6(t))}function Fse(t,e,r,n){if(g_(r)){var i=xv(t,e,r),a=r.__edgeMap,o=a[A6(i)];a[i]&&!o?a[i].isForward=!0:o&&a[i]&&(o.isForward=!0,a[i].isForward=!1),a[i]=a[i]||[],a[i].push(n)}}function sA(t,e,r,n){var i=g_(e),a=ee(i);if(!i)return null;var o=Bse(t,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===r){s=l;break}var u=jse(t,e);M6(e,u),t.lineStyle=t.lineStyle||{};var c=xv(t.node1,t.node2,e),h=e.__curvenessList,f=a||u%2?0:1;if(o.isForward)return h[f+s];var d=A6(c),p=DT(d,e),g=h[s+p+f];return n?a?i&&i[0]===0?(p+f)%2?g:-g:((p%2?0:1)+f)%2?g:-g:(p+f)%2?g:-g:h[s+p+f]}function L6(t){var e=t.coordinateSystem;if(!(e&&e.type!=="view")){var r=t.getGraph();r.eachNode(function(n){var i=n.getModel();n.setLayout([+i.get("x"),+i.get("y")])}),lA(r,t)}}function lA(t,e){t.eachEdge(function(r,n){var i=Sn(r.getModel().get(["lineStyle","curveness"]),-sA(r,e,n,!0),0),a=ya(r.node1.getLayout()),o=ya(r.node2.getLayout()),s=[a,o];+i&&s.push([(a[0]+o[0])/2-(a[1]-o[1])*i,(a[1]+o[1])/2-(o[0]-a[0])*i]),r.setLayout(s)})}function Gse(t,e){t.eachSeriesByType("graph",function(r){var n=r.get("layout"),i=r.coordinateSystem;if(i&&i.type!=="view"){var a=r.getData(),o=[];R(i.dimensions,function(f){o=o.concat(a.mapDimensionsAll(f))});for(var s=0;s<a.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var h=a.get(o[c],s);isNaN(h)||(u=!0),l.push(h)}u?a.setItemLayout(s,i.dataToPoint(l)):a.setItemLayout(s,[NaN,NaN])}lA(a.graph,r)}else(!n||n==="none")&&L6(r)})}function qf(t){var e=t.coordinateSystem;if(e.type!=="view")return 1;var r=t.option.nodeScaleRatio,n=e.scaleX,i=e.getZoom(),a=(i-1)*r+1;return a/n}function Kf(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var JN=Math.PI,iS=[];function uA(t,e,r,n){var i=t.coordinateSystem;if(!(i&&i.type!=="view")){var a=i.getBoundingRect(),o=t.getData(),s=o.graph,l=a.width/2+a.x,u=a.height/2+a.y,c=Math.min(a.width,a.height)/2,h=o.count();if(o.setLayout({cx:l,cy:u}),!!h){if(r){var f=i.pointToData(n),d=f[0],p=f[1],g=[d-l,p-u];lu(g,g),cd(g,g,c),r.setLayout([l+g[0],u+g[1]],!0);var m=t.get(["circular","rotateLabel"]);P6(r,m,l,u)}Hse[e](t,s,o,c,l,u,h),s.eachEdge(function(y,_){var S=Sn(y.getModel().get(["lineStyle","curveness"]),sA(y,t,_),0),T=ya(y.node1.getLayout()),C=ya(y.node2.getLayout()),M,A=(T[0]+C[0])/2,k=(T[1]+C[1])/2;+S&&(S*=3,M=[l*S+A*(1-S),u*S+k*(1-S)]),y.setLayout([T,C,M])})}}}var Hse={value:function(t,e,r,n,i,a,o){var s=0,l=r.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(c){var h=c.getValue("value"),f=u*(l?h:1)/2;s+=f,c.setLayout([n*Math.cos(s)+i,n*Math.sin(s)+a]),s+=f})},symbolSize:function(t,e,r,n,i,a,o){var s=0;iS.length=o;var l=qf(t);e.eachNode(function(h){var f=Kf(h);isNaN(f)&&(f=2),f<0&&(f=0),f*=l;var d=Math.asin(f/2/n);isNaN(d)&&(d=JN/2),iS[h.dataIndex]=d,s+=d*2});var u=(2*JN-s)/o/2,c=0;e.eachNode(function(h){var f=u+iS[h.dataIndex];c+=f,(!h.getLayout()||!h.getLayout().fixed)&&h.setLayout([n*Math.cos(c)+i,n*Math.sin(c)+a]),c+=f})}};function P6(t,e,r,n){var i=t.getGraphicEl();if(i){var a=t.getModel(),o=a.get(["label","rotate"])||0,s=i.getSymbolPath();if(e){var l=t.getLayout(),u=Math.atan2(l[1]-n,l[0]-r);u<0&&(u=Math.PI*2+u);var c=l[0]<r;c&&(u=u-Math.PI);var h=c?"left":"right";s.setTextConfig({rotation:-u,position:h,origin:"center"});var f=s.ensureState("emphasis");J(f.textConfig||(f.textConfig={}),{position:h})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function Wse(t){t.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&uA(e,"symbolSize")})}var Uu=sy;function Use(t,e,r){for(var n=t,i=e,a=r.rect,o=a.width,s=a.height,l=[a.x+o/2,a.y+s/2],u=r.gravity==null?.1:r.gravity,c=0;c<n.length;c++){var h=n[c];h.p||(h.p=Ls(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),h.pp=ya(h.p),h.edges=null}var f=r.friction==null?.6:r.friction,d=f,p,g;return{warmUp:function(){d=f*.8},setFixed:function(m){n[m].fixed=!0},setUnfixed:function(m){n[m].fixed=!1},beforeStep:function(m){p=m},afterStep:function(m){g=m},step:function(m){p&&p(n,i);for(var y=[],_=n.length,S=0;S<i.length;S++){var T=i[S];if(!T.ignoreForceLayout){var C=T.n1,M=T.n2;Wo(y,M.p,C.p);var A=Yd(y)-T.d,k=M.w/(C.w+M.w);isNaN(k)&&(k=0),lu(y,y),!C.fixed&&Uu(C.p,C.p,y,k*A*d),!M.fixed&&Uu(M.p,M.p,y,-(1-k)*A*d)}}for(var S=0;S<_;S++){var E=n[S];E.fixed||(Wo(y,l,E.p),Uu(E.p,E.p,y,u*d))}for(var S=0;S<_;S++)for(var C=n[S],D=S+1;D<_;D++){var M=n[D];Wo(y,M.p,C.p);var A=Yd(y);A===0&&(j0(y,Math.random()-.5,Math.random()-.5),A=1);var I=(C.rep+M.rep)/A/A;!C.fixed&&Uu(C.pp,C.pp,y,I),!M.fixed&&Uu(M.pp,M.pp,y,-I)}for(var z=[],S=0;S<_;S++){var E=n[S];E.fixed||(Wo(z,E.p,E.pp),Uu(E.p,E.p,z,d),Hr(E.pp,E.p))}d=d*.992;var O=d<.01;g&&g(n,i,O),m&&m(O)}}}function Zse(t){t.eachSeriesByType("graph",function(e){var r=e.coordinateSystem;if(!(r&&r.type!=="view"))if(e.get("layout")==="force"){var n=e.preservedPoints||{},i=e.getGraph(),a=i.data,o=i.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?a.each(function(S){var T=a.getId(S);a.setItemLayout(S,n[T]||[NaN,NaN])}):!l||l==="none"?L6(e):l==="circular"&&uA(e,"value");var u=a.getDataExtent("value"),c=o.getDataExtent("value"),h=s.get("repulsion"),f=s.get("edgeLength"),d=ee(h)?h:[h,h],p=ee(f)?f:[f,f];p=[p[1],p[0]];var g=a.mapArray("value",function(S,T){var C=a.getItemLayout(T),M=it(S,u,d);return isNaN(M)&&(M=(d[0]+d[1])/2),{w:M,rep:M,fixed:a.getItemModel(T).get("fixed"),p:!C||isNaN(C[0])||isNaN(C[1])?null:C}}),m=o.mapArray("value",function(S,T){var C=i.getEdgeByIndex(T),M=it(S,c,p);isNaN(M)&&(M=(p[0]+p[1])/2);var A=C.getModel(),k=Sn(C.getModel().get(["lineStyle","curveness"]),-sA(C,e,T,!0),0);return{n1:g[C.node1.dataIndex],n2:g[C.node2.dataIndex],d:M,curveness:k,ignoreForceLayout:A.get("ignoreForceLayout")}}),y=r.getBoundingRect(),_=Use(g,m,{rect:y,gravity:s.get("gravity"),friction:s.get("friction")});_.beforeStep(function(S,T){for(var C=0,M=S.length;C<M;C++)S[C].fixed&&Hr(S[C].p,i.getNodeByIndex(C).getLayout())}),_.afterStep(function(S,T,C){for(var M=0,A=S.length;M<A;M++)S[M].fixed||i.getNodeByIndex(M).setLayout(S[M].p),n[a.getId(M)]=S[M].p;for(var M=0,A=T.length;M<A;M++){var k=T[M],E=i.getEdgeByIndex(M),D=k.n1.p,I=k.n2.p,z=E.getLayout();z=z?z.slice():[],z[0]=z[0]||[],z[1]=z[1]||[],Hr(z[0],D),Hr(z[1],I),+k.curveness&&(z[2]=[(D[0]+I[0])/2-(D[1]-I[1])*k.curveness,(D[1]+I[1])/2-(I[0]-D[0])*k.curveness]),E.setLayout(z)}}),e.forceLayout=_,e.preservedPoints=n,_.step()}else e.forceLayout=null})}function $se(t,e,r){var n=sr(t,e),i=J(t.getBoxLayoutParams(),{aspect:r}),a=bt(i,n.refContainer);return nV(t,a,r)}function Yse(t,e){var r=[];return t.eachSeriesByType("graph",function(n){Zv({targetModel:n,coordSysType:"view",coordSysProvider:i,isDefaultDataCoordSys:!0});function i(){var a=n.getData(),o=a.mapArray(function(p){var g=a.getItemModel(p);return[+g.get("x"),+g.get("y")]}),s=[],l=[];Y0(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),c=$se(n,e,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var h=l[0]-s[0],f=l[1]-s[1],d=new gu(null,{api:e,ecModel:t});return d.zoomLimit=n.get("scaleLimit"),d.setBoundingRect(s[0],s[1],h,f),d.setViewRect(c.x,c.y,c.width,c.height),d.setCenter(n.get("center")),d.setZoom(n.get("zoom")),r.push(d),d}}),r}var eR=Wt.prototype,aS=_h.prototype,k6=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t}();(function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(k6);function oS(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var D6=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-line",n}return e.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new k6},e.prototype.buildPath=function(r,n){oS(n)?eR.buildPath.call(this,r,n):aS.buildPath.call(this,r,n)},e.prototype.pointAt=function(r){return oS(this.shape)?eR.pointAt.call(this,r):aS.pointAt.call(this,r)},e.prototype.tangentAt=function(r){var n=this.shape,i=oS(n)?[n.x2-n.x1,n.y2-n.y1]:aS.tangentAt.call(this,r);return lu(i,i)},e}(Ue),sS=["fromSymbol","toSymbol"];function tR(t){return"_"+t+"Type"}function rR(t,e,r){var n=e.getItemVisual(r,t);if(!n||n==="none")return n;var i=e.getItemVisual(r,t+"Size"),a=e.getItemVisual(r,t+"Rotate"),o=e.getItemVisual(r,t+"Offset"),s=e.getItemVisual(r,t+"KeepAspect"),l=Lh(i),u=du(o||0,l);return n+l+u+(a||"")+(s||"")}function nR(t,e,r){var n=e.getItemVisual(r,t);if(!(!n||n==="none")){var i=e.getItemVisual(r,t+"Size"),a=e.getItemVisual(r,t+"Rotate"),o=e.getItemVisual(r,t+"Offset"),s=e.getItemVisual(r,t+"KeepAspect"),l=Lh(i),u=du(o||0,l),c=Ut(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,c.name=t,c}}function Xse(t){var e=new D6({name:"line",subPixelOptimize:!0});return IT(e.shape,t),e}function IT(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var r=e[2];r?(t.cpx1=r[0],t.cpy1=r[1]):(t.cpx1=NaN,t.cpy1=NaN)}var cA=function(t){Y(e,t);function e(r,n,i){var a=t.call(this)||this;return a._createLine(r,n,i),a}return e.prototype._createLine=function(r,n,i){var a=r.hostModel,o=r.getItemLayout(n),s=r.getItemVisual(n,"z2"),l=Xse(o);l.shape.percent=0,St(l,{z2:pe(s,0),shape:{percent:1}},a,n),this.add(l),R(sS,function(u){var c=nR(u,r,n);this.add(c),this[tR(u)]=rR(u,r,n)},this),this._updateCommonStl(r,n,i)},e.prototype.updateData=function(r,n,i){var a=r.hostModel,o=this.childOfName("line"),s=r.getItemLayout(n),l={shape:{}};IT(l.shape,s),Qe(o,l,a,n),R(sS,function(u){var c=rR(u,r,n),h=tR(u);if(this[h]!==c){this.remove(this.childOfName(u));var f=nR(u,r,n);this.add(f)}this[h]=c},this),this._updateCommonStl(r,n,i)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(r,n,i){var a=r.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,c=i&&i.labelStatesModels,h=i&&i.emphasisDisabled,f=i&&i.focus,d=i&&i.blurScope;if(!i||r.hasItemOption){var p=r.getItemModel(n),g=p.getModel("emphasis");s=g.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),h=g.get("disabled"),f=g.get("focus"),d=g.get("blurScope"),c=ar(p)}var m=r.getItemVisual(n,"style"),y=m.stroke;o.useStyle(m),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,R(sS,function(M){var A=this.childOfName(M);if(A){A.setColor(y),A.style.opacity=m.opacity;for(var k=0;k<ln.length;k++){var E=ln[k],D=o.getState(E);if(D){var I=D.style||{},z=A.ensureState(E),O=z.style||(z.style={});I.stroke!=null&&(O[A.__isEmptyBrush?"stroke":"fill"]=I.stroke),I.opacity!=null&&(O.opacity=I.opacity)}}A.markRedraw()}},this);var _=a.getRawValue(n);vr(this,c,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(M,A){return a.getFormattedLabel(M,A,r.dataType)}},inheritColor:y||q.color.neutral99,defaultOpacity:m.opacity,defaultText:(_==null?r.getName(n):isFinite(_)?Ht(_):_)+""});var S=this.getTextContent();if(S){var T=c.normal;S.__align=S.style.align,S.__verticalAlign=S.style.verticalAlign,S.__position=T.get("position")||"middle";var C=T.get("distance");ee(C)||(C=[C,C]),S.__labelDistance=C}this.setTextConfig({position:null,local:!0,inside:!1}),wt(this,f,d,h)},e.prototype.highlight=function(){ho(this)},e.prototype.downplay=function(){fo(this)},e.prototype.updateLayout=function(r,n){this.setLinePoints(r.getItemLayout(n))},e.prototype.setLinePoints=function(r){var n=this.childOfName("line");IT(n.shape,r),n.dirty()},e.prototype.beforeUpdate=function(){var r=this,n=r.childOfName("fromSymbol"),i=r.childOfName("toSymbol"),a=r.getTextContent();if(!n&&!i&&(!a||a.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=r.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),h=l.pointAt(u),f=Wo([],h,c);lu(f,f);function d(D,I){var z=D.__specifiedRotation;if(z==null){var O=l.tangentAt(I);D.attr("rotation",(I===1?-1:1)*Math.PI/2-Math.atan2(O[1],O[0]))}else D.attr("rotation",z)}if(n&&(n.setPosition(c),d(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&(i.setPosition(h),d(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var p=void 0,g=void 0,m=a.__labelDistance,y=m[0]*o,_=m[1]*o,S=u/2,T=l.tangentAt(S),C=[T[1],-T[0]],M=l.pointAt(S);C[1]>0&&(C[0]=-C[0],C[1]=-C[1]);var A=T[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var k=-Math.atan2(T[1],T[0]);h[0]<c[0]&&(k=Math.PI+k),a.rotation=k}var E=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":E=-_,g="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":E=_,g="top";break;default:E=0,g="middle"}switch(a.__position){case"end":a.x=f[0]*y+h[0],a.y=f[1]*_+h[1],p=f[0]>.8?"left":f[0]<-.8?"right":"center",g=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":a.x=-f[0]*y+c[0],a.y=-f[1]*_+c[1],p=f[0]>.8?"right":f[0]<-.8?"left":"center",g=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*A+c[0],a.y=c[1]+E,p=T[0]<0?"right":"left",a.originX=-y*A,a.originY=-E;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=M[0],a.y=M[1]+E,p="center",a.originY=-E;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*A+h[0],a.y=h[1]+E,p=T[0]>=0?"right":"left",a.originX=y*A,a.originY=-E;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||p})}},e}(_e),hA=function(){function t(e){this.group=new _e,this._LineCtor=e||cA}return t.prototype.updateData=function(e){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=e,a||i.removeAll();var o=iR(e);e.diff(a).add(function(s){r._doAdd(e,s,o)}).update(function(s,l){r._doUpdate(a,e,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},t.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(r,n){r.updateLayout(e,n)},this)},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=iR(e),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r){this._progressiveEls=[];function n(s){!s.isGroup&&!qse(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var a=r.getItemLayout(i);if(lS(a)){var o=new this._LineCtor(r,i,this._seriesScope);o.traverse(n),this.group.add(o),r.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},t.prototype.remove=function(){this.group.removeAll()},t.prototype.eachRendered=function(e){Ps(this._progressiveEls||this.group,e)},t.prototype._doAdd=function(e,r,n){var i=e.getItemLayout(r);if(lS(i)){var a=new this._LineCtor(e,r,n);e.setItemGraphicEl(r,a),this.group.add(a)}},t.prototype._doUpdate=function(e,r,n,i,a){var o=e.getItemGraphicEl(n);if(!lS(r.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(r,i,a):o=new this._LineCtor(r,i,a),r.setItemGraphicEl(i,o),this.group.add(o)},t}();function qse(t){return t.animators&&t.animators.length>0}function iR(t){var e=t.hostModel,r=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:ar(e)}}function aR(t){return isNaN(t[0])||isNaN(t[1])}function lS(t){return t&&!aR(t[0])&&!aR(t[1])}var uS=[],cS=[],hS=[],Zu=Sr,fS=os,oR=Math.abs;function sR(t,e,r){for(var n=t[0],i=t[1],a=t[2],o=1/0,s,l=r*r,u=.1,c=.1;c<=.9;c+=.1){uS[0]=Zu(n[0],i[0],a[0],c),uS[1]=Zu(n[1],i[1],a[1],c);var h=oR(fS(uS,e)-l);h<o&&(o=h,s=c)}for(var f=0;f<32;f++){var d=s+u;cS[0]=Zu(n[0],i[0],a[0],s),cS[1]=Zu(n[1],i[1],a[1],s),hS[0]=Zu(n[0],i[0],a[0],d),hS[1]=Zu(n[1],i[1],a[1],d);var h=fS(cS,e)-l;if(oR(h)<.01)break;var p=fS(hS,e)-l;u/=2,h<0?p>=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function dS(t,e){var r=[],n=Xd,i=[[],[],[]],a=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[ya(u[0]),ya(u[1])],u[2]&&u.__original.push(ya(u[2])));var f=u.__original;if(u[2]!=null){if(Hr(i[0],f[0]),Hr(i[1],f[2]),Hr(i[2],f[1]),c&&c!=="none"){var d=Kf(s.node1),p=sR(i,f[0],d*e);n(i[0][0],i[1][0],i[2][0],p,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],p,r),i[0][1]=r[3],i[1][1]=r[4]}if(h&&h!=="none"){var d=Kf(s.node2),p=sR(i,f[1],d*e);n(i[0][0],i[1][0],i[2][0],p,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],p,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],f[0]),Hr(a[1],f[1]),Wo(o,a[1],a[0]),lu(o,o),c&&c!=="none"){var d=Kf(s.node1);sy(a[0],a[0],o,d*e)}if(h&&h!=="none"){var d=Kf(s.node2);sy(a[1],a[1],o,-d*e)}Hr(u[0],a[0]),Hr(u[1],a[1])}})}var I6=Fe();function Kse(t){if(t)return I6(t).bridge}function lR(t,e){t&&(I6(t).bridge=e)}function uR(t){return t.type==="view"}var Qse=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){var i=new qv,a=new hA,o=this.group,s=new _e;this._controller=new pu(n.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(a.group),o.add(s),this._symbolDraw=i,this._lineDraw=a,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=!1;this._model=r,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if(uR(o)){var h={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(h):Qe(this._mainGroup,h,r)}dS(r.getGraph(),qf(r));var f=r.getData();u.updateData(f);var d=r.getEdgeData();c.updateData(d),this._updateNodeAndLinkScale(),this._updateController(null,r,i),clearTimeout(this._layoutTimeout);var p=r.forceLayout,g=r.get(["force","layoutAnimation"]);p&&(s=!0,this._startForceLayoutIteration(p,i,g));var m=r.get("layout");f.graph.eachNode(function(T){var C=T.dataIndex,M=T.getGraphicEl(),A=T.getModel();if(M){M.off("drag").off("dragend");var k=A.get("draggable");k&&M.on("drag",function(D){switch(m){case"force":p.warmUp(),!a._layouting&&a._startForceLayoutIteration(p,i,g),p.setFixed(C),f.setItemLayout(C,[M.x,M.y]);break;case"circular":f.setItemLayout(C,[M.x,M.y]),T.setLayout({fixed:!0},!0),uA(r,"symbolSize",T,[D.offsetX,D.offsetY]),a.updateLayout(r);break;case"none":default:f.setItemLayout(C,[M.x,M.y]),lA(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){p&&p.setUnfixed(C)}),M.setDraggable(k,!!A.get("cursor"));var E=A.get(["emphasis","focus"]);E==="adjacency"&&(Le(M).focus=T.getAdjacentDataIndices())}}),f.graph.eachEdge(function(T){var C=T.getGraphicEl(),M=T.getModel().get(["emphasis","focus"]);C&&M==="adjacency"&&(Le(C).focus={edge:[T.dataIndex],node:[T.node1.dataIndex,T.node2.dataIndex]})});var y=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),_=f.getLayout("cx"),S=f.getLayout("cy");f.graph.eachNode(function(T){P6(T,y,_,S)}),this._firstRender=!1,s||this._renderThumbnail(r,i,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(r,n,i){var a=this,o=!1;(function s(){r.step(function(l){a.updateLayout(a._model),(l||!o)&&(o=!0,a._renderThumbnail(a._model,n,a._symbolDraw,a._lineDraw)),(a._layouting=!l)&&(i?a._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(r,n,i){var a=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!uR(s)){a.disable();return}a.enable(n.get("roam"),{api:i,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!r||r.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),a.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(r,n,i){this._active&&(JM(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(r,n,i){this._active&&(eA(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),dS(r.getGraph(),qf(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=qf(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(r){this._active&&(dS(r.getGraph(),qf(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var r=this._model,n=r.coordinateSystem;if(n.type==="view"){var i=Kse(r);if(i)return{bridge:i,coordSys:n}}},e.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(r.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(r,n,i,a){var o=this._getThumbnailInfo();if(o){var s=new _e,l=i.group.children(),u=a.group.children(),c=new _e,h=new _e;s.add(h),s.add(c);for(var f=0;f<l.length;f++){var d=l[f],p=d.children()[0],g=d.x,m=d.y,y=ye(p.shape),_=J(y,{width:p.scaleX,height:p.scaleY,x:g-p.scaleX/2,y:m-p.scaleY/2}),S=ye(p.style),T=new p.constructor({shape:_,style:S,z2:151});h.add(T)}for(var f=0;f<u.length;f++){var d=u[f],C=d.children()[0],S=ye(C.style),_=ye(C.shape),M=new D6({style:S,shape:_,z2:151});c.add(M)}o.bridge.renderContent({api:n,roamType:r.get("roam"),viewportRect:null,group:s,targetTrans:o.coordSys.transform})}},e.type="graph",e}(lt);function $u(t){return"_EC_"+t}var Jse=function(){function t(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(e,r){e=e==null?""+r:""+e;var n=this._nodesMap;if(!n[$u(e)]){var i=new gl(e,r);return i.hostGraph=this,this.nodes.push(i),n[$u(e)]=i,i}},t.prototype.getNodeByIndex=function(e){var r=this.data.getRawIndex(e);return this.nodes[r]},t.prototype.getNodeById=function(e){return this._nodesMap[$u(e)]},t.prototype.addEdge=function(e,r,n){var i=this._nodesMap,a=this._edgesMap;if(qe(e)&&(e=this.nodes[e]),qe(r)&&(r=this.nodes[r]),e instanceof gl||(e=i[$u(e)]),r instanceof gl||(r=i[$u(r)]),!(!e||!r)){var o=e.id+"-"+r.id,s=new E6(e,r,n);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),r.inEdges.push(s)),e.edges.push(s),e!==r&&r.edges.push(s),this.edges.push(s),a[o]=s,s}},t.prototype.getEdgeByIndex=function(e){var r=this.edgeData.getRawIndex(e);return this.edges[r]},t.prototype.getEdge=function(e,r){e instanceof gl&&(e=e.id),r instanceof gl&&(r=r.id);var n=this._edgesMap;return this._directed?n[e+"-"+r]:n[e+"-"+r]||n[r+"-"+e]},t.prototype.eachNode=function(e,r){for(var n=this.nodes,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&e.call(r,n[a],a)},t.prototype.eachEdge=function(e,r){for(var n=this.edges,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(r,n[a],a)},t.prototype.breadthFirstTraverse=function(e,r,n,i){if(r instanceof gl||(r=this._nodesMap[$u(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(i,r,null))for(var s=[r];s.length;)for(var l=s.shift(),u=l[a],o=0;o<u.length;o++){var c=u[o],h=c.node1===l?c.node2:c.node1;if(!h.__visited){if(e.call(i,h,l))return;s.push(h),h.__visited=!0}}}},t.prototype.update=function(){for(var e=this.data,r=this.edgeData,n=this.nodes,i=this.edges,a=0,o=n.length;a<o;a++)n[a].dataIndex=-1;for(var a=0,o=e.count();a<o;a++)n[e.getRawIndex(a)].dataIndex=a;r.filterSelf(function(s){var l=i[r.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a<o;a++)i[a].dataIndex=-1;for(var a=0,o=r.count();a<o;a++)i[r.getRawIndex(a)].dataIndex=a},t.prototype.clone=function(){for(var e=new t(this._directed),r=this.nodes,n=this.edges,i=0;i<r.length;i++)e.addNode(r[i].id,r[i].dataIndex);for(var i=0;i<n.length;i++){var a=n[i];e.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return e},t}(),gl=function(){function t(e,r){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??"",this.dataIndex=r??-1}return t.prototype.degree=function(){return this.edges.length},t.prototype.inDegree=function(){return this.inEdges.length},t.prototype.outDegree=function(){return this.outEdges.length},t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.data.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},r=0;r<this.edges.length;r++){var n=this.edges[r];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},t.prototype.getTrajectoryDataIndices=function(){for(var e=de(),r=de(),n=0,i=this.edges.length;n<i;n++){var a=this.edges[n];if(!(a.dataIndex<0)){e.set(a.dataIndex,!0);for(var o=[a.node1],s=[a.node2],l=0;l<o.length;){var u=o[l];l++,r.set(u.dataIndex,!0);for(var c=u.inEdges,h=0,f=c.length,d=void 0,p=void 0;h<f;h++)d=c[h],p=d.dataIndex,p>=0&&!e.hasKey(p)&&(e.set(p,!0),o.push(d.node1))}for(l=0;l<s.length;){var g=s[l];l++,r.set(g.dataIndex,!0);for(var m=g.outEdges,h=0,y=m.length,_=void 0,S=void 0;h<y;h++)_=m[h],S=_.dataIndex,S>=0&&!e.hasKey(S)&&(e.set(S,!0),s.push(_.node2))}}}return{edge:e.keys(),node:r.keys()}},t}(),E6=function(){function t(e,r,n){this.dataIndex=-1,this.node1=e,this.node2=r,this.dataIndex=n??-1}return t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},t.prototype.getTrajectoryDataIndices=function(){var e=de(),r=de();e.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a<n.length;){var o=n[a];a++,r.set(o.dataIndex,!0);for(var s=o.inEdges,l=0,u=s.length,c=void 0,h=void 0;l<u;l++)c=o.inEdges[l],h=c.dataIndex,h>=0&&!e.hasKey(h)&&(e.set(h,!0),n.push(c.node1))}for(a=0;a<i.length;){var f=i[a];a++,r.set(f.dataIndex,!0);for(var d=f.outEdges,l=0,u=d.length,p=void 0,g=void 0;l<u;l++)p=f.outEdges[l],g=p.dataIndex,g>=0&&!e.hasKey(g)&&(e.set(g,!0),i.push(p.node2))}return{edge:e.keys(),node:r.keys()}},t}();function N6(t,e){return{getValue:function(r){var n=this[t][e];return n.getStore().get(n.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,n){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[t][e].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}Bt(gl,N6("hostGraph","data"));Bt(E6,N6("hostGraph","edgeData"));function fA(t,e,r,n,i){for(var a=new Jse(n),o=0;o<t.length;o++)a.addNode(br(t[o].id,t[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var c=e[o],h=c.source,f=c.target;a.addEdge(h,f,u)&&(l.push(c),s.push(br(rr(c.id,null),h+" > "+f)),u++)}var d=r.get("coordinateSystem"),p;if(d==="cartesian2d"||d==="polar"||d==="matrix")p=ka(t,r);else{var g=Ch.get(d),m=g?g.dimensions||[]:[];Ee(m,"value")<0&&m.concat(["value"]);var y=Ph(t,{coordDimensions:m,encodeDefine:r.getEncode()}).dimensions;p=new Yr(y,r),p.initData(t)}var _=new Yr(["value"],r);return _.initData(l,s),i&&i(p,_),v6({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var ele=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new Nh(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(r){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Yl(r,"edgeLabel",["show"])},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){Vse(this);var s=fA(a,i,this,!0,l);return R(s.edges,function(u){Fse(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var g=o._categoriesModels,m=p.getShallow("category"),y=g[m];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var h=We.prototype.getModel;function f(p,g){var m=h.call(this,p,g);return m.resolveParentPath=d,m}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=d,p.getModel=f,p});function d(p){if(p&&(p[0]==="label"||p[1]==="label")){var g=p.slice();return p[0]==="label"?g[0]="edgeLabel":p[1]==="label"&&(g[1]="edgeLabel"),g}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(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),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var h=zV({series:this,dataIndex:r,multipleSeries:n});return h},e.prototype._updateCategoriesData=function(){var r=re(this.option.categories||[],function(i){return i.value!=null?i:J({value:0},i)}),n=new Yr(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:q.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:q.color.primary}}},e}(dt);function tle(t){t.registerChartView(Qse),t.registerSeriesModel(ele),t.registerProcessor(Rse),t.registerVisual(Ose),t.registerVisual(zse),t.registerLayout(Gse),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,Wse),t.registerLayout(Zse),t.registerCoordinateSystem("graphView",{dimensions:gu.dimensions,create:Yse}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Rt),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Rt),t.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",query:e},function(i){var a=n.getViewOfSeriesModel(i);a&&(e.dx!=null&&e.dy!=null&&a.updateViewOnPan(i,n,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&a.updateViewOnZoom(i,n,e));var o=i.coordinateSystem,s=d_(o,e,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var cR=function(t){Y(e,t);function e(r,n,i){var a=t.call(this)||this;Le(a).dataType="node",a.z2=2;var o=new Xe;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.graph.getNodeByIndex(n),l=r.hostModel,u=s.getModel(),c=u.getModel("emphasis"),h=r.getItemLayout(n),f=J(va(u.getModel("itemStyle"),h,!0),h),d=this;if(isNaN(f.startAngle)){d.setShape(f);return}a?d.setShape(f):Qe(d,{shape:f},l,n);var p=J(va(u.getModel("itemStyle"),h,!0),h);o.setShape(p),o.useStyle(r.getItemVisual(n,"style")),ir(o,u),this._updateLabel(l,u,s),r.setItemGraphicEl(n,d),ir(d,u,"itemStyle");var g=c.get("focus");wt(this,g==="adjacency"?s.getAdjacentDataIndices():g,c.get("blurScope"),c.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");a.ignore=!c.get("show");var h=ar(n),f=i.getVisual("style");vr(a,h,{labelFetcher:{getFormattedLabel:function(_,S,T,C,M,A){return r.getFormattedLabel(_,S,"node",C,Sn(M,h.normal&&h.normal.get("formatter"),n.get("name")),A)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:f.fill,defaultOpacity:f.opacity,defaultOutsidePosition:"startArc"});var d=c.get("position")||"outside",p=c.get("distance")||0,g;d==="outside"?g=o.r+p:g=(o.r+o.r0)/2,this.textConfig={inside:d!=="outside"};var m=d!=="outside"?c.get("align")||"center":l>0?"left":"right",y=d!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";a.attr({x:l*g+o.cx,y:u*g+o.cy,rotation:0,style:{align:m,verticalAlign:y}})},e}(Or),rle=function(t){Y(e,t);function e(r,n,i,a){var o=t.call(this)||this;return Le(o).dataType="edge",o.updateData(r,n,i,a,!0),o}return e.prototype.buildPath=function(r,n){r.moveTo(n.s1[0],n.s1[1]);var i=.7,a=n.clockwise;r.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!a),r.bezierCurveTo((n.cx-n.s2[0])*i+n.s2[0],(n.cy-n.s2[1])*i+n.s2[1],(n.cx-n.t1[0])*i+n.t1[0],(n.cy-n.t1[1])*i+n.t1[1],n.t1[0],n.t1[1]),r.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!a),r.bezierCurveTo((n.cx-n.t2[0])*i+n.t2[0],(n.cy-n.t2[1])*i+n.t2[1],(n.cx-n.s1[0])*i+n.s1[0],(n.cy-n.s1[1])*i+n.s1[1],n.s1[0],n.s1[1]),r.closePath()},e.prototype.updateData=function(r,n,i,a,o){var s=r.hostModel,l=n.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),h=n.getItemModel(l.dataIndex),f=h.getModel("lineStyle"),d=h.getModel("emphasis"),p=d.get("focus"),g=J(va(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(g.sStartAngle)||isNaN(g.tStartAngle)){m.setShape(g);return}o?(m.setShape(g),hR(m,l,r,f)):(di(m),hR(m,l,r,f),Qe(m,{shape:g},s,i)),wt(this,p==="adjacency"?l.getAdjacentDataIndices():p,d.get("blurScope"),d.get("disabled")),ir(m,h,"lineStyle"),n.setItemGraphicEl(l.dataIndex,m)},e}(Ue);function hR(t,e,r,n){var i=e.node1,a=e.node2,o=t.style;t.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"gradient":var l=r.getItemVisual(i.dataIndex,"style").fill,u=r.getItemVisual(a.dataIndex,"style").fill;if(se(l)&&se(u)){var c=t.shape,h=(c.s1[0]+c.s2[0])/2,f=(c.s1[1]+c.s2[1])/2,d=(c.t1[0]+c.t2[0])/2,p=(c.t1[1]+c.t2[1])/2;o.fill=new uu(h,f,d,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var nle=Math.PI/180,ile=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){},e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group,l=-r.get("startAngle")*nle;if(a.diff(o).add(function(c){var h=a.getItemLayout(c);if(h){var f=new cR(a,c,l);Le(f).dataIndex=c,s.add(f)}}).update(function(c,h){var f=o.getItemGraphicEl(h),d=a.getItemLayout(c);if(!d){f&&to(f,r,h);return}f?f.updateData(a,c,l):f=new cR(a,c,l),s.add(f)}).remove(function(c){var h=o.getItemGraphicEl(c);h&&to(h,r,c)}).execute(),!o){var u=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=oe(u[0],i.getWidth()),this.group.originY=oe(u[1],i.getHeight()),St(this.group,{scaleX:1,scaleY:1},r)}this._data=a,this.renderEdges(r,l)},e.prototype.renderEdges=function(r,n){var i=r.getData(),a=r.getEdgeData(),o=this._edgeData,s=this.group;a.diff(o).add(function(l){var u=new rle(i,a,l,n);Le(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,a,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&to(u,r,l)}).execute(),this._edgeData=a},e.prototype.dispose=function(){},e.type="chord",e}(lt),ale=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new Nh(le(this.getData,this),le(this.getRawData,this))},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links)},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[];if(a&&i){var o=fA(a,i,this,!0,s);return o.data}function s(l,u){var c=We.prototype.getModel;function h(d,p){var g=c.call(this,d,p);return g.resolveParentPath=f,g}u.wrapMethod("getItemModel",function(d){return d.resolveParentPath=f,d.getModel=h,d});function f(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){var a=this.getDataParams(r,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(r),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:a.value,noValue:a.value==null})}return Kt("nameValue",{name:a.name,value:a.value,noValue:a.value==null})},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(n==="node"){var a=this.getData(),o=this.getGraph().getNodeByIndex(r);if(i.name==null&&(i.name=a.getName(r)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e}(dt),vS=Math.PI/180;function ole(t,e){t.eachSeriesByType("chord",function(r){sle(r,e)})}function sle(t,e){var r=t.getData(),n=r.graph,i=t.getEdgeData(),a=i.count();if(a){var o=rV(t,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,h=Math.max((t.get("padAngle")||0)*vS,0),f=Math.max((t.get("minAngle")||0)*vS,0),d=-t.get("startAngle")*vS,p=d+Math.PI*2,g=t.get("clockwise"),m=g?1:-1,y=[d,p];X0(y,!g);var _=y[0],S=y[1],T=S-_,C=r.getSum("value")===0&&i.getSum("value")===0,M=[],A=0;n.eachEdge(function(j){var W=C?1:j.getValue("value");C&&(W>0||f)&&(A+=2);var H=j.node1.dataIndex,X=j.node2.dataIndex;M[H]=(M[H]||0)+W,M[X]=(M[X]||0)+W});var k=0;if(n.eachNode(function(j){var W=j.getValue("value");isNaN(W)||(M[j.dataIndex]=Math.max(W,M[j.dataIndex]||0)),!C&&(M[j.dataIndex]>0||f)&&A++,k+=M[j.dataIndex]||0}),!(A===0||k===0)){h*A>=Math.abs(T)&&(h=Math.max(0,(Math.abs(T)-f*A)/A)),(h+f)*A>=Math.abs(T)&&(f=(Math.abs(T)-h*A)/A);var E=(T-h*A*m)/k,D=0,I=0,z=0;n.eachNode(function(j){var W=M[j.dataIndex]||0,H=E*(k?W:1)*m;Math.abs(H)<f?D+=f-Math.abs(H):(I+=Math.abs(H)-f,z+=Math.abs(H)),j.setLayout({angle:H,value:W})});var O=!1;if(D>I){var V=D/I;n.eachNode(function(j){var W=j.getLayout().angle;Math.abs(W)>=f?j.setLayout({angle:W*V,ratio:V},!0):j.setLayout({angle:f,ratio:f===0?1:W/f},!0)})}else n.eachNode(function(j){if(!O){var W=j.getLayout().angle,H=Math.min(W/z,1),X=H*D;W-X<f&&(O=!0)}});var G=D;n.eachNode(function(j){if(!(G<=0)){var W=j.getLayout().angle;if(W>f&&f>0){var H=O?1:Math.min(W/z,1),X=W-f,K=Math.min(X,Math.min(G,D*H));G-=K,j.setLayout({angle:W-K,ratio:(W-K)/W},!0)}else f>0&&j.setLayout({angle:f,ratio:W===0?1:f/W},!0)}});var F=_,U=[];n.eachNode(function(j){var W=Math.max(j.getLayout().angle,f);j.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:F,endAngle:F+W*m,clockwise:g},!0),U[j.dataIndex]=F,F+=(W+h)*m}),n.eachEdge(function(j){var W=C?1:j.getValue("value"),H=E*(k?W:1)*m,X=j.node1.dataIndex,K=U[X]||0,ne=Math.abs((j.node1.getLayout().ratio||1)*H),ie=K+ne*m,ue=[s+c*Math.cos(K),l+c*Math.sin(K)],ve=[s+c*Math.cos(ie),l+c*Math.sin(ie)],Ge=j.node2.dataIndex,xe=U[Ge]||0,ge=Math.abs((j.node2.getLayout().ratio||1)*H),ke=xe+ge*m,fe=[s+c*Math.cos(xe),l+c*Math.sin(xe)],Me=[s+c*Math.cos(ke),l+c*Math.sin(ke)];j.setLayout({s1:ue,s2:ve,sStartAngle:K,sEndAngle:ie,t1:fe,t2:Me,tStartAngle:xe,tEndAngle:ke,cx:s,cy:l,r:c,value:W,clockwise:g}),U[X]=ie,U[Ge]=ke})}}}function lle(t){t.registerChartView(ile),t.registerSeriesModel(ale),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,ole),t.registerProcessor(Ih("chord"))}var ule=function(){function t(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return t}(),cle=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new ule},e.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),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,c),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,c)},e}(Ue);function hle(t,e){var r=t.get("center"),n=e.getWidth(),i=e.getHeight(),a=Math.min(n,i),o=oe(r[0],e.getWidth()),s=oe(r[1],e.getHeight()),l=oe(t.get("radius"),a/2);return{cx:o,cy:s,r:l}}function Rg(t,e){var r=t==null?"":t+"";return e&&(se(e)?r=e.replace("{value}",r):me(e)&&(r=e(t))),r}var fle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=hle(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,c=-r.get("endAngle")/180*Math.PI,h=r.getModel("axisLine"),f=h.get("roundCap"),d=f?Zy:Or,p=h.get("show"),g=h.getModel("lineStyle"),m=g.get("width"),y=[u,c];X0(y,!l),u=y[0],c=y[1];for(var _=c-u,S=u,T=[],C=0;p&&C<a.length;C++){var M=Math.min(Math.max(a[C][0],0),1);c=u+_*M;var A=new d({shape:{startAngle:S,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-m,r:o.r},silent:!0});A.setStyle({fill:a[C][1]}),A.setStyle(g.getLineStyle(["color","width"])),T.push(A),S=c}T.reverse(),R(T,function(E){return s.add(E)});var k=function(E){if(E<=0)return a[0][1];var D;for(D=0;D<a.length;D++)if(a[D][0]>=E&&(D===0?0:a[D-1][0])<E)return a[D][1];return a[D-1][1]};this._renderTicks(r,n,i,k,o,u,c,l,m),this._renderTitleAndDetail(r,n,i,k,o),this._renderAnchor(r,o),this._renderPointer(r,n,i,k,o,u,c,l,m)},e.prototype._renderTicks=function(r,n,i,a,o,s,l,u,c){for(var h=this.group,f=o.cx,d=o.cy,p=o.r,g=+r.get("min"),m=+r.get("max"),y=r.getModel("splitLine"),_=r.getModel("axisTick"),S=r.getModel("axisLabel"),T=r.get("splitNumber"),C=_.get("splitNumber"),M=oe(y.get("length"),p),A=oe(_.get("length"),p),k=s,E=(l-s)/T,D=E/C,I=y.getModel("lineStyle").getLineStyle(),z=_.getModel("lineStyle").getLineStyle(),O=y.get("distance"),V,G,F=0;F<=T;F++){if(V=Math.cos(k),G=Math.sin(k),y.get("show")){var U=O?O+c:c,j=new Wt({shape:{x1:V*(p-U)+f,y1:G*(p-U)+d,x2:V*(p-M-U)+f,y2:G*(p-M-U)+d},style:I,silent:!0});I.stroke==="auto"&&j.setStyle({stroke:a(F/T)}),h.add(j)}if(S.get("show")){var U=S.get("distance")+O,W=Rg(Ht(F/T*(m-g)+g),S.get("formatter")),H=a(F/T),X=V*(p-M-U)+f,K=G*(p-M-U)+d,ne=S.get("rotate"),ie=0;ne==="radial"?(ie=-k+2*Math.PI,ie>Math.PI/2&&(ie+=Math.PI)):ne==="tangential"?ie=-k-Math.PI/2:qe(ne)&&(ie=ne*Math.PI/180),ie===0?h.add(new Xe({style:pt(S,{text:W,x:X,y:K,verticalAlign:G<-.8?"top":G>.8?"bottom":"middle",align:V<-.4?"left":V>.4?"right":"center"},{inheritColor:H}),silent:!0})):h.add(new Xe({style:pt(S,{text:W,x:X,y:K,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:X,originY:K,rotation:ie}))}if(_.get("show")&&F!==T){var U=_.get("distance");U=U?U+c:c;for(var ue=0;ue<=C;ue++){V=Math.cos(k),G=Math.sin(k);var ve=new Wt({shape:{x1:V*(p-U)+f,y1:G*(p-U)+d,x2:V*(p-A-U)+f,y2:G*(p-A-U)+d},silent:!0,style:z});z.stroke==="auto"&&ve.setStyle({stroke:a((F+ue/C)/T)}),h.add(ve),k+=D}k-=D}else k+=E}},e.prototype._renderPointer=function(r,n,i,a,o,s,l,u,c){var h=this.group,f=this._data,d=this._progressEls,p=[],g=r.get(["pointer","show"]),m=r.getModel("progress"),y=m.get("show"),_=r.getData(),S=_.mapDimension("value"),T=+r.get("min"),C=+r.get("max"),M=[T,C],A=[s,l];function k(D,I){var z=_.getItemModel(D),O=z.getModel("pointer"),V=oe(O.get("width"),o.r),G=oe(O.get("length"),o.r),F=r.get(["pointer","icon"]),U=O.get("offsetCenter"),j=oe(U[0],o.r),W=oe(U[1],o.r),H=O.get("keepAspect"),X;return F?X=Ut(F,j-V/2,W-G,V,G,null,H):X=new cle({shape:{angle:-Math.PI/2,width:V,r:G,x:j,y:W}}),X.rotation=-(I+Math.PI/2),X.x=o.cx,X.y=o.cy,X}function E(D,I){var z=m.get("roundCap"),O=z?Zy:Or,V=m.get("overlap"),G=V?m.get("width"):c/_.count(),F=V?o.r-G:o.r-(D+1)*G,U=V?o.r:o.r-D*G,j=new O({shape:{startAngle:s,endAngle:I,cx:o.cx,cy:o.cy,clockwise:u,r0:F,r:U}});return V&&(j.z2=it(_.get(S,D),[T,C],[100,0],!0)),j}(y||g)&&(_.diff(f).add(function(D){var I=_.get(S,D);if(g){var z=k(D,s);St(z,{rotation:-((isNaN(+I)?A[0]:it(I,M,A,!0))+Math.PI/2)},r),h.add(z),_.setItemGraphicEl(D,z)}if(y){var O=E(D,s),V=m.get("clip");St(O,{shape:{endAngle:it(I,M,A,V)}},r),h.add(O),Lw(r.seriesIndex,_.dataType,D,O),p[D]=O}}).update(function(D,I){var z=_.get(S,D);if(g){var O=f.getItemGraphicEl(I),V=O?O.rotation:s,G=k(D,V);G.rotation=V,Qe(G,{rotation:-((isNaN(+z)?A[0]:it(z,M,A,!0))+Math.PI/2)},r),h.add(G),_.setItemGraphicEl(D,G)}if(y){var F=d[I],U=F?F.shape.endAngle:s,j=E(D,U),W=m.get("clip");Qe(j,{shape:{endAngle:it(z,M,A,W)}},r),h.add(j),Lw(r.seriesIndex,_.dataType,D,j),p[D]=j}}).execute(),_.each(function(D){var I=_.getItemModel(D),z=I.getModel("emphasis"),O=z.get("focus"),V=z.get("blurScope"),G=z.get("disabled");if(g){var F=_.getItemGraphicEl(D),U=_.getItemVisual(D,"style"),j=U.fill;if(F instanceof pr){var W=F.style;F.useStyle(J({image:W.image,x:W.x,y:W.y,width:W.width,height:W.height},U))}else F.useStyle(U),F.type!=="pointer"&&F.setColor(j);F.setStyle(I.getModel(["pointer","itemStyle"]).getItemStyle()),F.style.fill==="auto"&&F.setStyle("fill",a(it(_.get(S,D),M,[0,1],!0))),F.z2EmphasisLift=0,ir(F,I),wt(F,O,V,G)}if(y){var H=p[D];H.useStyle(_.getItemVisual(D,"style")),H.setStyle(I.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,ir(H,I),wt(H,O,V,G)}}),this._progressEls=p)},e.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"),c=Ut(s,n.cx-o/2+oe(l[0],n.r),n.cy-o/2+oe(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),c=+r.get("min"),h=+r.get("max"),f=new _e,d=[],p=[],g=r.isAnimationEnabled(),m=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){d[y]=new Xe({silent:!0}),p[y]=new Xe({silent:!0})}).update(function(y,_){d[y]=s._titleEls[_],p[y]=s._detailEls[_]}).execute(),l.each(function(y){var _=l.getItemModel(y),S=l.get(u,y),T=new _e,C=a(it(S,[c,h],[0,1],!0)),M=_.getModel("title");if(M.get("show")){var A=M.get("offsetCenter"),k=o.cx+oe(A[0],o.r),E=o.cy+oe(A[1],o.r),D=d[y];D.attr({z2:m?0:2,style:pt(M,{x:k,y:E,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:C})}),T.add(D)}var I=_.getModel("detail");if(I.get("show")){var z=I.get("offsetCenter"),O=o.cx+oe(z[0],o.r),V=o.cy+oe(z[1],o.r),G=oe(I.get("width"),o.r),F=oe(I.get("height"),o.r),U=r.get(["progress","show"])?l.getItemVisual(y,"style").fill:C,D=p[y],j=I.get("formatter");D.attr({z2:m?0:2,style:pt(I,{x:O,y:V,text:Rg(S,j),width:isNaN(G)?null:G,height:isNaN(F)?null:F,align:"center",verticalAlign:"middle"},{inheritColor:U})}),Bj(D,{normal:I},S,function(H){return Rg(H,j)}),g&&jj(D,y,l,r,{getFormattedLabel:function(H,X,K,ne,ie,ue){return Rg(ue?ue.interpolatedValue:S,j)}}),T.add(D)}f.add(T)}),this.group.add(f),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(lt),dle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="itemStyle",r}return e.prototype.getInitialData=function(r,n){return Eh(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,q.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:q.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:q.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:q.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:q.color.neutral00,borderWidth:0,borderColor:q.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:q.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:q.color.transparent,borderWidth:0,borderColor:q.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:q.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(dt);function vle(t){t.registerChartView(fle),t.registerSeriesModel(dle)}var ple=["itemStyle","opacity"],gle=function(t){Y(e,t);function e(r,n){var i=t.call(this)||this,a=i,o=new Tr,s=new Xe;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return e.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(ple);c=c??1,i||di(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,St(a,{style:{opacity:c}},o,n)):Qe(a,{style:{opacity:c},shape:{points:l.points}},o,n),ir(a,s),this._updateLabel(r,n),wt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.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),c=u.label,h=r.getItemVisual(n,"style"),f=h.fill;vr(o,ar(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:h.opacity,defaultText:r.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var d=l.getModel("label"),p=d.get("color"),g=p==="inherit"?f:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:g,outsideFill:g});var m=c.linePoints;a.setShape({points:m}),i.textGuideLineConfig={anchor:m?new Te(m[0][0],m[0][1]):null},Qe(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),jM(i,VM(l),{stroke:f})},e}(zr),mle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreLabelLineUpdate=!0,r}return e.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 gle(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);to(u,r,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(lt),yle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Nh(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.getInitialData=function(r,n){return Eh(this,{coordDimensions:["value"],encodeDefaulter:Ie(dM,this)})},e.prototype._defaultLabelLine=function(r){Yl(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},e.prototype.getDataParams=function(r){var n=this.getData(),i=t.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},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:q.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:q.color.primary}}},e}(dt);function _le(t,e){for(var r=t.mapDimension("value"),n=t.mapArray(r,function(l){return l}),i=[],a=e==="ascending",o=0,s=t.count();o<s;o++)i[o]=o;return me(e)?i.sort(e):e!=="none"&&i.sort(function(l,u){return a?n[l]-n[u]:n[u]-n[l]}),i}function xle(t){var e=t.hostModel,r=e.get("orient");t.each(function(n){var i=t.getItemModel(n),a=i.getModel("label"),o=a.get("position"),s=i.getModel("labelLine"),l=t.getItemLayout(n),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",h,f,d,p;if(c)o==="insideLeft"?(f=(u[0][0]+u[3][0])/2+5,d=(u[0][1]+u[3][1])/2,h="left"):o==="insideRight"?(f=(u[1][0]+u[2][0])/2-5,d=(u[1][1]+u[2][1])/2,h="right"):(f=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,d=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,h="center"),p=[[f,d],[f,d]];else{var g=void 0,m=void 0,y=void 0,_=void 0,S=s.get("length");o==="left"?(g=(u[3][0]+u[0][0])/2,m=(u[3][1]+u[0][1])/2,y=g-S,f=y-5,h="right"):o==="right"?(g=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,y=g+S,f=y+5,h="left"):o==="top"?(g=(u[3][0]+u[0][0])/2,m=(u[3][1]+u[0][1])/2,_=m-S,d=_-5,h="center"):o==="bottom"?(g=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,_=m+S,d=_+5,h="center"):o==="rightTop"?(g=r==="horizontal"?u[3][0]:u[1][0],m=r==="horizontal"?u[3][1]:u[1][1],r==="horizontal"?(_=m-S,d=_-5,h="center"):(y=g+S,f=y+5,h="top")):o==="rightBottom"?(g=u[2][0],m=u[2][1],r==="horizontal"?(_=m+S,d=_+5,h="center"):(y=g+S,f=y+5,h="bottom")):o==="leftTop"?(g=u[0][0],m=r==="horizontal"?u[0][1]:u[1][1],r==="horizontal"?(_=m-S,d=_-5,h="center"):(y=g-S,f=y-5,h="right")):o==="leftBottom"?(g=r==="horizontal"?u[1][0]:u[3][0],m=r==="horizontal"?u[1][1]:u[2][1],r==="horizontal"?(_=m+S,d=_+5,h="center"):(y=g-S,f=y-5,h="right")):(g=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,r==="horizontal"?(_=m+S,d=_+5,h="center"):(y=g+S,f=y+5,h="left")),r==="horizontal"?(y=g,f=y):(_=m,d=_),p=[[g,m],[y,_]]}l.label={linePoints:p,x:f,y:d,verticalAlign:"middle",textAlign:h,inside:c}})}function Sle(t,e){t.eachSeriesByType("funnel",function(r){var n=r.getData(),i=n.mapDimension("value"),a=r.get("sort"),o=sr(r,e),s=bt(r.getBoxLayoutParams(),o.refContainer),l=r.get("orient"),u=s.width,c=s.height,h=_le(n,a),f=s.x,d=s.y,p=l==="horizontal"?[oe(r.get("minSize"),c),oe(r.get("maxSize"),c)]:[oe(r.get("minSize"),u),oe(r.get("maxSize"),u)],g=n.getDataExtent(i),m=r.get("min"),y=r.get("max");m==null&&(m=Math.min(g[0],0)),y==null&&(y=g[1]);var _=r.get("funnelAlign"),S=r.get("gap"),T=l==="horizontal"?u:c,C=(T-S*(n.count()-1))/n.count(),M=function(G,F){if(l==="horizontal"){var U=n.get(i,G)||0,j=it(U,[m,y],p,!0),W=void 0;switch(_){case"top":W=d;break;case"center":W=d+(c-j)/2;break;case"bottom":W=d+(c-j);break}return[[F,W],[F,W+j]]}var H=n.get(i,G)||0,X=it(H,[m,y],p,!0),K;switch(_){case"left":K=f;break;case"center":K=f+(u-X)/2;break;case"right":K=f+u-X;break}return[[K,F],[K+X,F]]};a==="ascending"&&(C=-C,S=-S,l==="horizontal"?f+=u:d+=c,h=h.reverse());for(var A=0;A<h.length;A++){var k=h[A],E=h[A+1],D=n.getItemModel(k);if(l==="horizontal"){var I=D.get(["itemStyle","width"]);I==null?I=C:(I=oe(I,u),a==="ascending"&&(I=-I));var z=M(k,f),O=M(E,f+I);f+=I+S,n.setItemLayout(k,{points:z.concat(O.slice().reverse())})}else{var V=D.get(["itemStyle","height"]);V==null?V=C:(V=oe(V,c),a==="ascending"&&(V=-V));var z=M(k,d),O=M(E,d+V);d+=V+S,n.setItemLayout(k,{points:z.concat(O.slice().reverse())})}}xle(n)})}function ble(t){t.registerChartView(mle),t.registerSeriesModel(yle),t.registerLayout(Sle),t.registerProcessor(Ih("funnel"))}var wle=.3,Tle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._dataGroup=new _e,r._initialized=!1,r}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(r,n,i,a){this._progressiveEls=null;var o=this._dataGroup,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.dimensions,h=dR(r);s.diff(l).add(f).update(d).remove(p).execute();function f(m){var y=fR(s,o,m,c,u);pS(y,s,m,h)}function d(m,y){var _=l.getItemGraphicEl(y),S=R6(s,m,c,u);s.setItemGraphicEl(m,_),Qe(_,{shape:{points:S}},r,m),di(_),pS(_,s,m,h)}function p(m){var y=l.getItemGraphicEl(m);o.remove(y)}if(!this._initialized){this._initialized=!0;var g=Cle(u,r,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(g)}this._data=s},e.prototype.incrementalPrepareRender=function(r,n,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(r,n,i){for(var a=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=dR(n),u=this._progressiveEls=[],c=r.start;c<r.end;c++){var h=fR(a,this._dataGroup,c,s,o);h.incremental=!0,pS(h,a,c,l),u.push(h)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(lt);function Cle(t,e,r){var n=t.model,i=t.getRect(),a=new Be({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=n.get("layout")==="horizontal"?"width":"height";return a.setShape(o,0),St(a,{shape:{width:i.width,height:i.height}},e,r),a}function R6(t,e,r,n){for(var i=[],a=0;a<r.length;a++){var o=r[a],s=t.get(t.mapDimension(o),e);Mle(s,n.getAxis(o).type)||i.push(n.dataToPoint(s,o))}return i}function fR(t,e,r,n,i){var a=R6(t,r,n,i),o=new Tr({shape:{points:a},z2:10});return e.add(o),t.setItemGraphicEl(r,o),o}function dR(t){var e=t.get("smooth",!0);return e===!0&&(e=wle),e=wa(e),Ir(e)&&(e=0),{smooth:e}}function pS(t,e,r,n){t.useStyle(e.getItemVisual(r,"style")),t.style.fill=null,t.setShape("smooth",n.smooth);var i=e.getItemModel(r),a=i.getModel("emphasis");ir(t,i,"lineStyle"),wt(t,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function Mle(t,e){return e==="category"?t==null:t==null||isNaN(t)}var Ale=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return e.prototype.getInitialData=function(r,n){return ka(null,this,{useEncodeDefaulter:le(Lle,null,this)})},e.prototype.getRawIndicesByActiveState=function(r){var n=this.coordinateSystem,i=this.getData(),a=[];return n.eachActiveState(i,function(o,s){r===o&&a.push(i.getRawIndex(s))}),a},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(dt);function Lle(t){var e=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(e){var r={};return R(e.dimensions,function(n){var i=Ple(n);r[n]=i}),r}}function Ple(t){return+t.replace("dim","")}var kle=["lineStyle","opacity"],Dle={seriesType:"parallel",reset:function(t,e){var r=t.coordinateSystem,n={normal:t.get(["lineStyle","opacity"]),active:t.get("activeOpacity"),inactive:t.get("inactiveOpacity")};return{progress:function(i,a){r.eachActiveState(a,function(o,s){var l=n[o];if(o==="normal"&&a.hasItemOption){var u=a.getItemModel(s).get(kle,!0);u!=null&&(l=u)}var c=a.ensureUniqueItemVisual(s,"style");c.opacity=l},i.start,i.end)}}}};function Ile(t){Ele(t),Nle(t)}function Ele(t){if(!t.parallel){var e=!1;R(t.series,function(r){r&&r.type==="parallel"&&(e=!0)}),e&&(t.parallel=[{}])}}function Nle(t){var e=gt(t.parallelAxis);R(e,function(r){if(be(r)){var n=r.parallelIndex||0,i=gt(t.parallel)[n];i&&i.parallelAxisDefault&&Ne(r,i.parallelAxisDefault,!1)}})}var Rle=5,Ole=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this._model=r,this._api=i,this._handlers||(this._handlers={},R(zle,function(a,o){i.getZr().on(o,this._handlers[o]=le(a,this))},this)),Ah(this,"_throttledDispatchExpand",r.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(r,n){sv(this,"_throttledDispatchExpand"),R(this._handlers,function(i,a){n.getZr().off(a,i)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(r){this._dispatchExpand(r)},e.prototype._dispatchExpand=function(r){r&&this._api.dispatchAction(J({type:"parallelAxisExpand"},r))},e.type="parallel",e}(mt),zle={mousedown:function(t){gS(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(gS(this,"click")&&e){var r=[t.offsetX,t.offsetY],n=Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2);if(n>Rle)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!gS(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function gS(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}var Ble=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(r){var n=this.option;r&&Ne(n,r,!0),this._initDimensions()},e.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(r){R(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},e.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=tt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);R(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Ve),jle=function(t){Y(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(gi);function Ss(t,e,r,n,i,a){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=Yu(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Yu(s,[0,o]),i=a=Yu(s,[i,a]),n=0}e[0]=Yu(e[0],r),e[1]=Yu(e[1],r);var l=mS(e,n);e[n]+=t;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Yu(e[n],c);var h;return h=mS(e,n),i!=null&&(h.sign!==l.sign||h.span<i)&&(e[1-n]=e[n]+l.sign*i),h=mS(e,n),a!=null&&h.span>a&&(e[1-n]=e[n]+h.sign*a),e}function mS(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function Yu(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var yS=R,O6=Math.min,z6=Math.max,vR=Math.floor,Vle=Math.ceil,pR=Ht,Fle=Math.PI,Gle=function(){function t(e,r,n){this.type="parallel",this._axesMap=de(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,r,n)}return t.prototype._init=function(e,r,n){var i=e.dimensions,a=e.parallelAxisIndex;yS(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new jle(o,Yv(u),[0,0],u.get("type"),l)),h=c.type==="category";c.onBand=h&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},t.prototype.update=function(e,r){this._updateAxesFromSeries(this._model,e)},t.prototype.containPoint=function(e){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=e[1-a],s=e[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(e,r){r.eachSeries(function(n){if(e.contains(n,r)){var i=n.getData();yS(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),tu(o.scale,o.model)},this)}},this)},t.prototype.resize=function(e,r){var n=sr(e,r).refContainer;this._rect=bt(e.getBoxLayoutParams(),n),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var e=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,c=Og(e.get("axisExpandWidth"),l),h=Og(e.get("axisExpandCount")||0,[0,u]),f=e.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,d=e.get("axisExpandWindow"),p;if(d)p=Og(d[1]-d[0],l),d[1]=d[0]+p;else{p=Og(c*(h-1),l);var g=e.get("axisExpandCenter")||vR(u/2);d=[c*g-p/2],d[1]=d[0]+p}var m=(s-p)/(u-h);m<3&&(m=0);var y=[vR(pR(d[0]/c,1))+1,Vle(pR(d[1]/c,1))-1],_=m/c*d[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:f,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:d,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:_}},t.prototype._layoutAxes=function(){var e=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])}),yS(n,function(o,s){var l=(i.axisExpandable?Wle:Hle)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:Fle/2,vertical:0},h=[u[a].x+e.x,u[a].y+e.y],f=c[a],d=fr();_o(d,d,f),zi(d,d,h),this._axesLayout[o]={position:h,rotation:f,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(e){return this._axesMap.get(e)},t.prototype.dataToPoint=function(e,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(e),r)},t.prototype.eachActiveState=function(e,r,n,i){n==null&&(n=0),i==null&&(i=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];R(o,function(m){s.push(e.mapDimension(m)),l.push(a.get(m).model)});for(var u=this.hasAxisBrushed(),c=n;c<i;c++){var h=void 0;if(!u)h="normal";else{h="active";for(var f=e.getValues(s,c),d=0,p=o.length;d<p;d++){var g=l[d].getActiveState(f[d]);if(g==="inactive"){h="inactive";break}}}r(h,c)}},t.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,r=this._axesMap,n=!1,i=0,a=e.length;i<a;i++)r.get(e[i]).model.getActiveState()!=="normal"&&(n=!0);return n},t.prototype.axisCoordToPoint=function(e,r){var n=this._axesLayout[r];return Ni([e,0],n.transform)},t.prototype.getAxisLayout=function(e){return ye(this._axesLayout[e])},t.prototype.getSlidedAxisExpandWindow=function(e){var r=this._makeLayoutInfo(),n=r.pixelDimIndex,i=r.axisExpandWindow.slice(),a=i[1]-i[0],o=[0,r.axisExpandWidth*(r.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:i};var s=e[n]-r.layoutBase-r.axisExpandWindow0Pos,l,u="slide",c=r.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),f=h[0]!=null;if(c)f&&c&&s<a*h[0]?(u="jump",l=s-a*h[2]):f&&c&&s>a*(1-h[0])?(u="jump",l=s-a*(1-h[2])):(l=s-a*h[1])>=0&&(l=s-a*(1-h[1]))<=0&&(l=0),l*=r.axisExpandWidth/c,l?Ss(l,i,o,"all"):u="none";else{var d=i[1]-i[0],p=o[1]*s/d;i=[z6(0,p-d/2)],i[1]=O6(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},t}();function Og(t,e){return O6(z6(t,e[0]),e[1])}function Hle(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function Wle(t,e){var r=e.layoutLength,n=e.axisExpandWidth,i=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,c;return t<o[0]?(s=t*a,c=a):t<=o[1]?(s=e.axisExpandWindow0Pos+t*n-e.axisExpandWindow[0],l=n,u=!0):(s=r-(i-1-t)*a,c=a),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}function Ule(t,e){var r=[];return t.eachComponent("parallel",function(n,i){var a=new Gle(n,t,e);a.name="parallel_"+i,a.resize(n,e),n.coordinateSystem=a,a.model=n,r.push(a)}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var i=n.getReferringComponents("parallel",kt).models[0];n.coordinateSystem=i.coordinateSystem}}),r}var Zle={create:Ule},ET=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.activeIntervals=[],r}return e.prototype.getAreaSelectStyle=function(){return ql([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(r){var n=this.activeIntervals=ye(r);if(n)for(var i=n.length-1;i>=0;i--)Dn(n[i])},e.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;a<o;a++)if(n[a][0]<=r&&r<=n[a][1])return"active";return"inactive"},e}(Ve);Bt(ET,Dh);var ru=!0,Sv=Math.min,sh=Math.max,$le=Math.pow,Yle=1e4,Xle=6,qle=6,gR="globalPan",Kle={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Qle={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},mR={brushStyle:{lineWidth:2,stroke:q.color.backgroundTint,fill:q.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},Jle=0,dA=function(t){Y(e,t);function e(r){var n=t.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=r,n.group=new _e,n._uid="brushController_"+Jle++,R(oue,function(i,a){this._handlers[a]=le(i,this)},n),n}return e.prototype.enableBrush=function(r){return this._brushType&&this._doDisableBrush(),r.brushType&&this._doEnableBrush(r),this},e.prototype._doEnableBrush=function(r){var n=this._zr;this._enableGlobalPan||Oae(n,gR,this._uid),R(this._handlers,function(i,a){n.on(a,i)}),this._brushType=r.brushType,this._brushOption=Ne(ye(mR),r,!0)},e.prototype._doDisableBrush=function(){var r=this._zr;zae(r,gR,this._uid),R(this._handlers,function(n,i){r.off(i,n)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(r){if(r&&r.length){var n=this._panels={};R(r,function(i){n[i.panelId]=ye(i)})}else this._panels=null;return this},e.prototype.mount=function(r){r=r||{},this._enableGlobalPan=r.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:r.x||0,y:r.y||0,rotation:r.rotation||0,scaleX:r.scaleX||1,scaleY:r.scaleY||1}),this._transform=n.getLocalTransform(),this},e.prototype.updateCovers=function(r){r=re(r,function(f){return Ne(ye(mR),f,!0)});var n="\0-brush-index-",i=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new vo(i,r,u,l).add(c).update(c).remove(h).execute(),this;function l(f,d){return(f.id!=null?f.id:n+d)+"-"+f.brushType}function u(f,d){return l(f.__brushOption,d)}function c(f,d){var p=r[f];if(d!=null&&i[d]===s)a[f]=i[d];else{var g=a[f]=d!=null?(i[d].__brushOption=p,i[d]):j6(o,B6(o,p));vA(o,g)}}function h(f){i[f]!==s&&o.group.remove(i[f])}},e.prototype.unmount=function(){return this.enableBrush(!1),NT(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(vi);function B6(t,e){var r=m_[e.brushType].createCover(t,e);return r.__brushOption=e,F6(r,e),t.group.add(r),r}function j6(t,e){var r=pA(e);return r.endCreating&&(r.endCreating(t,e),F6(e,e.__brushOption)),e}function V6(t,e){var r=e.__brushOption;pA(e).updateCoverShape(t,e,r.range,r)}function F6(t,e){var r=e.z;r==null&&(r=Yle),t.traverse(function(n){n.z=r,n.z2=r})}function vA(t,e){pA(e).updateCommon(t,e),V6(t,e)}function pA(t){return m_[t.__brushOption.brushType]}function gA(t,e,r){var n=t._panels;if(!n)return ru;var i,a=t._transform;return R(n,function(o){o.isTargetByCursor(e,r,a)&&(i=o)}),i}function G6(t,e){var r=t._panels;if(!r)return ru;var n=e.__brushOption.panelId;return n!=null?r[n]:ru}function NT(t){var e=t._covers,r=e.length;return R(e,function(n){t.group.remove(n)},t),e.length=0,!!r}function nu(t,e){var r=re(t._covers,function(n){var i=n.__brushOption,a=ye(i.range);return{brushType:i.brushType,panelId:i.panelId,range:a}});t.trigger("brush",{areas:r,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function eue(t){var e=t._track;if(!e.length)return!1;var r=e[e.length-1],n=e[0],i=r[0]-n[0],a=r[1]-n[1],o=$le(i*i+a*a,.5);return o>Xle}function H6(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function W6(t,e,r,n){var i=new _e;return i.add(new Be({name:"main",style:mA(r),silent:!0,draggable:!0,cursor:"move",drift:Ie(yR,t,e,i,["n","s","w","e"]),ondragend:Ie(nu,e,{isEnd:!0})})),R(n,function(a){i.add(new Be({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ie(yR,t,e,i,a),ondragend:Ie(nu,e,{isEnd:!0})}))}),i}function U6(t,e,r,n){var i=n.brushStyle.lineWidth||0,a=sh(i,qle),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,c=r[0][1],h=r[1][1],f=c-a+i/2,d=h-a+i/2,p=c-o,g=h-s,m=p+i,y=g+i;ja(t,e,"main",o,s,p,g),n.transformable&&(ja(t,e,"w",l,u,a,y),ja(t,e,"e",f,u,a,y),ja(t,e,"n",l,u,m,a),ja(t,e,"s",l,d,m,a),ja(t,e,"nw",l,u,a,a),ja(t,e,"ne",f,u,a,a),ja(t,e,"sw",l,d,a,a),ja(t,e,"se",f,d,a,a))}function RT(t,e){var r=e.__brushOption,n=r.transformable,i=e.childAt(0);i.useStyle(mA(r)),i.attr({silent:!n,cursor:n?"move":"default"}),R([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?OT(t,a[0]):rue(t,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?Qle[s]+"-resize":null})})}function ja(t,e,r,n,i,a,o){var s=e.childOfName(r);s&&s.setShape(iue(yA(t,e,[[n,i],[n+a,i+o]])))}function mA(t){return Se({strokeNoScale:!0},t.brushStyle)}function Z6(t,e,r,n){var i=[Sv(t,r),Sv(e,n)],a=[sh(t,r),sh(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function tue(t){return cs(t.group)}function OT(t,e){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=J0(r[e],tue(t));return n[i]}function rue(t,e){var r=[OT(t,e[0]),OT(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function yR(t,e,r,n,i,a){var o=r.__brushOption,s=t.toRectRange(o.range),l=$6(e,i,a);R(n,function(u){var c=Kle[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=t.fromRectRange(Z6(s[0][0],s[1][0],s[0][1],s[1][1])),vA(e,r),nu(e,{isEnd:!1})}function nue(t,e,r,n){var i=e.__brushOption.range,a=$6(t,r,n);R(i,function(o){o[0]+=a[0],o[1]+=a[1]}),vA(t,e),nu(t,{isEnd:!1})}function $6(t,e,r){var n=t.group,i=n.transformCoordToLocal(e,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function yA(t,e,r){var n=G6(t,e);return n&&n!==ru?n.clipPath(r,t._transform):ye(r)}function iue(t){var e=Sv(t[0][0],t[1][0]),r=Sv(t[0][1],t[1][1]),n=sh(t[0][0],t[1][0]),i=sh(t[0][1],t[1][1]);return{x:e,y:r,width:n-e,height:i-r}}function aue(t,e,r){if(!(!t._brushType||sue(t,e.offsetX,e.offsetY))){var n=t._zr,i=t._covers,a=gA(t,e,r);if(!t._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(a&&(a===ru||s.panelId===a.panelId)&&m_[s.brushType].contain(i[o],r[0],r[1]))return}a&&n.setCursorStyle("crosshair")}}function zT(t){var e=t.event;e.preventDefault&&e.preventDefault()}function BT(t,e,r){return t.childOfName("main").contain(e,r)}function Y6(t,e,r,n){var i=t._creatingCover,a=t._creatingPanel,o=t._brushOption,s;if(t._track.push(r.slice()),eue(t)||i){if(a&&!i){o.brushMode==="single"&&NT(t);var l=ye(o);l.brushType=_R(l.brushType,a),l.panelId=a===ru?null:a.panelId,i=t._creatingCover=B6(t,l),t._covers.push(i)}if(i){var u=m_[_R(t._brushType,a)],c=i.__brushOption;c.range=u.getCreatingRange(yA(t,i,t._track)),n&&(j6(t,i),u.updateCommon(t,i)),V6(t,i),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&gA(t,e,r)&&NT(t)&&(s={isEnd:n,removeOnClick:!0});return s}function _R(t,e){return t==="auto"?e.defaultBrushType:t}var oue={mousedown:function(t){if(this._dragging)xR(this,t);else if(!t.target||!t.target.draggable){zT(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var r=this._creatingPanel=gA(this,t,e);r&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,r=t.offsetY,n=this.group.transformCoordToLocal(e,r);if(aue(this,t,n),this._dragging){zT(t);var i=Y6(this,t,n,!1);i&&nu(this,i)}},mouseup:function(t){xR(this,t)}};function xR(t,e){if(t._dragging){zT(e);var r=e.offsetX,n=e.offsetY,i=t.group.transformCoordToLocal(r,n),a=Y6(t,e,i,!0);t._dragging=!1,t._track=[],t._creatingCover=null,a&&nu(t,a)}}function sue(t,e,r){var n=t._zr;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var m_={lineX:SR(0),lineY:SR(1),rect:{createCover:function(t,e){function r(n){return n}return W6({toRectRange:r,fromRectRange:r},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=H6(t);return Z6(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,n){U6(t,e,r,n)},updateCommon:RT,contain:BT},polygon:{createCover:function(t,e){var r=new _e;return r.add(new Tr({name:"main",style:mA(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new zr({name:"main",draggable:!0,drift:Ie(nue,t,e),ondragend:Ie(nu,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,n){e.childAt(0).setShape({points:yA(t,e,r)})},updateCommon:RT,contain:BT}};function SR(t){return{createCover:function(e,r){return W6({toRectRange:function(n){var i=[n,[0,100]];return t&&i.reverse(),i},fromRectRange:function(n){return n[t]}},e,r,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var r=H6(e),n=Sv(r[0][t],r[1][t]),i=sh(r[0][t],r[1][t]);return[n,i]},updateCoverShape:function(e,r,n,i){var a,o=G6(e,r);if(o!==ru&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(t);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,a];t&&l.reverse(),U6(e,r,l,i)},updateCommon:RT,contain:BT}}function X6(t){return t=_A(t),function(e){return Y2(e,t)}}function q6(t,e){return t=_A(t),function(r){var n=e??r,i=n?t.width:t.height,a=n?t.x:t.y;return[a,a+(i||0)]}}function K6(t,e,r){var n=_A(t);return function(i,a){return n.contain(a[0],a[1])&&!r6(i,e,r)}}function _A(t){return Ce.create(t)}var lue=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){t.prototype.init.apply(this,arguments),(this._brushController=new dA(n.getZr())).on("brush",le(this._onBrush,this))},e.prototype.render=function(r,n,i,a){if(!uue(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new _e,this.group.add(this._axisGroup),!!r.get("show")){var s=hue(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,h=r.axis.dim,f=l.getAxisLayout(h),d=J({strokeContainThreshold:c},f),p=new on(r,i,d);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(d,u,r,s,c,i),Wv(o,this._axisGroup,r)}}},e.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),h=Ce.create({x:l[0],y:-o/2,width:u,height:o});h.x-=c,h.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:X6(h),isTargetByCursor:K6(h,s,a),getLinearBrushOtherExtent:q6(h,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(cue(i))},e.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=re(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})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(mt);function uue(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function cue(t){var e=t.axis;return re(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function hue(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var fue={type:"axisAreaSelect",event:"axisAreaSelected"};function due(t){t.registerAction(fue,function(e,r){r.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),t.registerAction("parallelAxisExpand",function(e,r){r.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var vue={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Q6(t){t.registerComponentView(Ole),t.registerComponentModel(Ble),t.registerCoordinateSystem("parallel",Zle),t.registerPreprocessor(Ile),t.registerComponentModel(ET),t.registerComponentView(lue),ah(t,"parallel",ET,vue),due(t)}function pue(t){ze(Q6),t.registerChartView(Tle),t.registerSeriesModel(Ale),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,Dle)}var gue=function(){function t(){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 t}(),mue=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new gue},e.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()},e.prototype.highlight=function(){ho(this)},e.prototype.downplay=function(){fo(this)},e}(Ue),yue=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._mainGroup=new _e,r._focusAdjacencyDisabled=!1,r}return e.prototype.init=function(r,n){this._controller=new pu(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this._mainGroup,l=r.layoutInfo,u=l.width,c=l.height,h=r.getData(),f=r.getData("edge"),d=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,i),n6(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var g=new mue,m=Le(g);m.dataIndex=p.dataIndex,m.seriesIndex=r.seriesIndex,m.dataType="edge";var y=p.getModel(),_=y.getModel("lineStyle"),S=_.get("curveness"),T=p.node1.getLayout(),C=p.node1.getModel(),M=C.get("localX"),A=C.get("localY"),k=p.node2.getLayout(),E=p.node2.getModel(),D=E.get("localX"),I=E.get("localY"),z=p.getLayout(),O,V,G,F,U,j,W,H;g.shape.extent=Math.max(1,z.dy),g.shape.orient=d,d==="vertical"?(O=(M!=null?M*u:T.x)+z.sy,V=(A!=null?A*c:T.y)+T.dy,G=(D!=null?D*u:k.x)+z.ty,F=I!=null?I*c:k.y,U=O,j=V*(1-S)+F*S,W=G,H=V*S+F*(1-S)):(O=(M!=null?M*u:T.x)+T.dx,V=(A!=null?A*c:T.y)+z.sy,G=D!=null?D*u:k.x,F=(I!=null?I*c:k.y)+z.ty,U=O*(1-S)+G*S,j=V,W=O*S+G*(1-S),H=F),g.setShape({x1:O,y1:V,x2:G,y2:F,cpx1:U,cpy1:j,cpx2:W,cpy2:H}),g.useStyle(_.getItemStyle()),bR(g.style,d,p);var X=""+y.get("value"),K=ar(y,"edgeLabel");vr(g,K,{labelFetcher:{getFormattedLabel:function(ue,ve,Ge,xe,ge,ke){return r.getFormattedLabel(ue,ve,"edge",xe,Sn(ge,K.normal&&K.normal.get("formatter"),X),ke)}},labelDataIndex:p.dataIndex,defaultText:X}),g.setTextConfig({position:"inside"});var ne=y.getModel("emphasis");ir(g,y,"lineStyle",function(ue){var ve=ue.getItemStyle();return bR(ve,d,p),ve}),s.add(g),f.setItemGraphicEl(p.dataIndex,g);var ie=ne.get("focus");wt(g,ie==="adjacency"?p.getAdjacentDataIndices():ie==="trajectory"?p.getTrajectoryDataIndices():ie,ne.get("blurScope"),ne.get("disabled"))}),o.eachNode(function(p){var g=p.getLayout(),m=p.getModel(),y=m.get("localX"),_=m.get("localY"),S=m.getModel("emphasis"),T=m.get(["itemStyle","borderRadius"])||0,C=new Be({shape:{x:y!=null?y*u:g.x,y:_!=null?_*c:g.y,width:g.dx,height:g.dy,r:T},style:m.getModel("itemStyle").getItemStyle(),z2:10});vr(C,ar(m),{labelFetcher:{getFormattedLabel:function(A,k){return r.getFormattedLabel(A,k,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),C.disableLabelAnimation=!0,C.setStyle("fill",p.getVisual("color")),C.setStyle("decal",p.getVisual("style").decal),ir(C,m),s.add(C),h.setItemGraphicEl(p.dataIndex,C),Le(C).dataType="node";var M=S.get("focus");wt(C,M==="adjacency"?p.getAdjacentDataIndices():M==="trajectory"?p.getTrajectoryDataIndices():M,S.get("blurScope"),S.get("disabled"))}),h.eachItemGraphicEl(function(p,g){var m=h.getItemModel(g);m.get("draggable")&&(p.drift=function(y,_){a._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=_,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:h.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(_ue(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(r,n){var i=r.layoutInfo,a=i.width,o=i.height,s=r.coordinateSystem=new gu(null,{api:n,ecModel:r.ecModel});s.zoomLimit=r.get("scaleLimit"),s.setBoundingRect(0,0,a,o),s.setCenter(r.get("center")),s.setZoom(r.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e}(lt);function bR(t,e,r){switch(t.fill){case"source":t.fill=r.node1.getVisual("color"),t.decal=r.node1.getVisual("style").decal;break;case"target":t.fill=r.node2.getVisual("color"),t.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");se(n)&&se(i)&&(t.fill=new uu(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function _ue(t,e,r){var n=new Be({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return St(n,{shape:{width:t.width+20}},e,r),n}var xue=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.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<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new We(o[l],this,n));var u=fA(a,i,this,!0,c);return u.data;function c(h,f){h.wrapMethod("getItemModel",function(d,p){var g=d.parentModel,m=g.getData().getItemLayout(p);if(m){var y=m.depth,_=g.levelModels[y];_&&(d.parentModel=_)}return d}),f.wrapMethod("getItemModel",function(d,p){var g=d.parentModel,m=g.getGraph().getEdgeByIndex(p),y=m.node1.getLayout();if(y){var _=y.depth,S=g.levelModels[_];S&&(d.parentModel=S)}return d})}},e.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Kt("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(r),h=c.getLayout().value,f=this.getDataParams(r,i).data.name;return Kt("nameValue",{name:f!=null?f+"":null,value:h,noValue:a(h)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(r,n){var i=t.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},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:q.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:q.color.primary}},animationEasing:"linear",animationDuration:1e3},e}(dt);function Sue(t,e){t.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=sr(r,e).refContainer,o=bt(r.getBoxLayoutParams(),a);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,h=u.edges;wue(c);var f=tt(c,function(m){return m.getLayout().value===0}),d=f.length!==0?0:r.get("layoutIterations"),p=r.get("orient"),g=r.get("nodeAlign");bue(c,h,n,i,s,l,d,p,g)})}function bue(t,e,r,n,i,a,o,s,l){Tue(t,e,r,i,a,s,l),Lue(t,e,a,i,n,o,s),zue(t,s)}function wue(t){R(t,function(e){var r=ds(e.outEdges,e0),n=ds(e.inEdges,e0),i=e.getValue()||0,a=Math.max(r,n,i);e.setLayout({value:a},!0)})}function Tue(t,e,r,n,i,a,o){for(var s=[],l=[],u=[],c=[],h=0,f=0;f<e.length;f++)s[f]=1;for(var f=0;f<t.length;f++)l[f]=t[f].inEdges.length,l[f]===0&&u.push(t[f]);for(var d=-1;u.length;){for(var p=0;p<u.length;p++){var g=u[p],m=g.hostGraph.data.getRawDataItem(g.dataIndex),y=m.depth!=null&&m.depth>=0;y&&m.depth>d&&(d=m.depth),g.setLayout({depth:y?m.depth:h},!0),a==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var _=0;_<g.outEdges.length;_++){var S=g.outEdges[_],T=e.indexOf(S);s[T]=0;var C=S.node2,M=t.indexOf(C);--l[M]===0&&c.indexOf(C)<0&&c.push(C)}}++h,u=c,c=[]}for(var f=0;f<s.length;f++)if(s[f]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var A=d>h-1?d:h-1;o&&o!=="left"&&Cue(t,o,a,A);var k=a==="vertical"?(i-r)/A:(n-r)/A;Aue(t,k,a)}function J6(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function Cue(t,e,r,n){if(e==="right"){for(var i=[],a=t,o=0;a.length;){for(var s=0;s<a.length;s++){var l=a[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];i.indexOf(c.node1)<0&&i.push(c.node1)}}a=i,i=[],++o}R(t,function(h){J6(h)||h.setLayout({depth:Math.max(0,n-h.getLayout().skNodeHeight)},!0)})}else e==="justify"&&Mue(t,n)}function Mue(t,e){R(t,function(r){!J6(r)&&!r.outEdges.length&&r.setLayout({depth:e},!0)})}function Aue(t,e,r){R(t,function(n){var i=n.getLayout().depth*e;r==="vertical"?n.setLayout({y:i},!0):n.setLayout({x:i},!0)})}function Lue(t,e,r,n,i,a,o){var s=Pue(t,o);kue(s,e,r,n,i,o),_S(s,i,r,n,o);for(var l=1;a>0;a--)l*=.99,Due(s,l,o),_S(s,i,r,n,o),Oue(s,l,o),_S(s,i,r,n,o)}function Pue(t,e){var r=[],n=e==="vertical"?"y":"x",i=ww(t,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),R(i.keys,function(a){r.push(i.buckets.get(a))}),r}function kue(t,e,r,n,i,a){var o=1/0;R(t,function(s){var l=s.length,u=0;R(s,function(h){u+=h.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;c<o&&(o=c)}),R(t,function(s){R(s,function(l,u){var c=l.getLayout().value*o;a==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),R(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function _S(t,e,r,n,i){var a=i==="vertical"?"x":"y";R(t,function(o){o.sort(function(g,m){return g.getLayout()[a]-m.getLayout()[a]});for(var s,l,u,c=0,h=o.length,f=i==="vertical"?"dx":"dy",d=0;d<h;d++)l=o[d],u=c-l.getLayout()[a],u>0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[f]+e;var p=i==="vertical"?n:r;if(u=c-e-p,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=h-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[f]+e-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function Due(t,e,r){R(t.slice().reverse(),function(n){R(n,function(i){if(i.outEdges.length){var a=ds(i.outEdges,Iue,r)/ds(i.outEdges,e0);if(isNaN(a)){var o=i.outEdges.length;a=o?ds(i.outEdges,Eue,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-bs(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-bs(i,r))*e;i.setLayout({y:l},!0)}}})})}function Iue(t,e){return bs(t.node2,e)*t.getValue()}function Eue(t,e){return bs(t.node2,e)}function Nue(t,e){return bs(t.node1,e)*t.getValue()}function Rue(t,e){return bs(t.node1,e)}function bs(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function e0(t){return t.getValue()}function ds(t,e,r){for(var n=0,i=t.length,a=-1;++a<i;){var o=+e(t[a],r);isNaN(o)||(n+=o)}return n}function Oue(t,e,r){R(t,function(n){R(n,function(i){if(i.inEdges.length){var a=ds(i.inEdges,Nue,r)/ds(i.inEdges,e0);if(isNaN(a)){var o=i.inEdges.length;a=o?ds(i.inEdges,Rue,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-bs(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-bs(i,r))*e;i.setLayout({y:l},!0)}}})})}function zue(t,e){var r=e==="vertical"?"x":"y";R(t,function(n){n.outEdges.sort(function(i,a){return i.node2.getLayout()[r]-a.node2.getLayout()[r]}),n.inEdges.sort(function(i,a){return i.node1.getLayout()[r]-a.node1.getLayout()[r]})}),R(t,function(n){var i=0,a=0;R(n.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),R(n.inEdges,function(o){o.setLayout({ty:a},!0),a+=o.getLayout().dy})})}function Bue(t){t.eachSeriesByType("sankey",function(e){var r=e.getGraph(),n=r.nodes,i=r.edges;if(n.length){var a=1/0,o=-1/0;R(n,function(s){var l=s.getLayout().value;l<a&&(a=l),l>o&&(o=l)}),R(n,function(s){var l=new dr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&R(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function jue(t){t.registerChartView(yue),t.registerSeriesModel(xue),t.registerLayout(Sue),t.registerVisual(Bue),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),t.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){var a=i.coordinateSystem,o=d_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var eH=function(){function t(){}return t.prototype._hasEncodeRule=function(e){var r=this.getEncode();return r&&r.get(e)!=null},t.prototype.getInitialData=function(e,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"?(e.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,h=this._baseAxisDim=u[c],f=u[1-c],d=[i,a],p=d[c].get("type"),g=d[1-c].get("type"),m=e.data;if(m&&l){var y=[];R(m,function(T,C){var M;ee(T)?(M=T.slice(),T.unshift(C)):ee(T.value)?(M=J({},T),M.value=M.value.slice(),T.value.unshift(C)):M=T,y.push(M)}),e.data=y}var _=this.defaultValueDimensions,S=[{name:h,type:zy(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:zy(g),dimsDef:_.slice()}];return Eh(this,{coordDimensions:S,dimensionsCount:_.length+1,encodeDefaulter:Ie(cV,S,this)})},t.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},t}(),tH=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.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 e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:q.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:q.color.shadow}},animationDuration:800},e}(dt);Bt(tH,eH,!0);var Vue=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.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 c=a.getItemLayout(u),h=wR(c,a,u,l,!0);a.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,c){var h=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(h);return}var f=a.getItemLayout(u);h?(di(h),rH(f,h,a,u)):h=wR(f,a,u,l),o.add(h),a.setItemGraphicEl(u,h)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},e.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},e.type="boxplot",e}(lt),Fue=function(){function t(){}return t}(),Gue=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new Fue},e.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();a<i.length;a++)r.moveTo(i[a][0],i[a][1]),a++,r.lineTo(i[a][0],i[a][1])},e}(Ue);function wR(t,e,r,n,i){var a=t.ends,o=new Gue({shape:{points:i?Hue(a,n,t):a}});return rH(t,o,e,r,i),o}function rH(t,e,r,n,i){var a=r.hostModel,o=cu[i?"initProps":"updateProps"];o(e,{shape:{points:t.ends}},a,n),e.useStyle(r.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=r.getItemModel(n),l=s.getModel("emphasis");ir(e,s),wt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function Hue(t,e,r){return re(t,function(n){return n=n.slice(),n[e]=r.initBaseline,n})}var bd=R;function Wue(t){var e=Uue(t);bd(e,function(r){var n=r.seriesModels;n.length&&(Zue(r),bd(n,function(i,a){$ue(i,r.boxOffsetList[a],r.boxWidthList[a])}))})}function Uue(t){var e=[],r=[];return t.eachSeriesByType("boxplot",function(n){var i=n.getBaseAxis(),a=Ee(r,i);a<0&&(a=r.length,r[a]=i,e[a]={axis:i,seriesModels:[]}),e[a].seriesModels.push(n)}),e}function Zue(t){var e=t.axis,r=t.seriesModels,n=r.length,i=t.boxWidthList=[],a=t.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;bd(r,function(p){l=Math.max(l,p.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}bd(r,function(p){var g=p.get("boxWidth");ee(g)||(g=[g,g]),o.push([oe(g[0],s)||0,oe(g[1],s)||0])});var c=s*.8-2,h=c/n*.3,f=(c-h*(n-1))/n,d=f/2-c/2;bd(r,function(p,g){a.push(d),d+=h+f,i.push(Math.min(Math.max(f,o[g][0]),o[g][1]))})}function $ue(t,e,r){var n=t.coordinateSystem,i=t.getData(),a=r/2,o=t.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),c=i.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var h=0;h<i.count();h++){var f=i.get(u,h),d=S(f,c[2],h),p=S(f,c[0],h),g=S(f,c[1],h),m=S(f,c[3],h),y=S(f,c[4],h),_=[];T(_,g,!1),T(_,m,!0),_.push(p,g,y,m),C(_,p),C(_,y),C(_,d),i.setItemLayout(h,{initBaseline:d[s],ends:_})}function S(M,A,k){var E=i.get(A,k),D=[];D[o]=M,D[s]=E;var I;return isNaN(M)||isNaN(E)?I=[NaN,NaN]:(I=n.dataToPoint(D),I[o]+=e),I}function T(M,A,k){var E=A.slice(),D=A.slice();E[o]+=a,D[o]-=a,k?M.push(E,D):M.push(D,E)}function C(M,A){var k=A.slice(),E=A.slice();k[o]-=a,E[o]+=a,M.push(k,E)}}function Yue(t,e){e=e||{};for(var r=[],n=[],i=e.boundIQR,a=i==="none"||i===0,o=0;o<t.length;o++){var s=Dn(t[o].slice()),l=mm(s,.25),u=mm(s,.5),c=mm(s,.75),h=s[0],f=s[s.length-1],d=(i??1.5)*(c-l),p=a?h:Math.max(h,l-d),g=a?f:Math.min(f,c+d),m=e.itemNameFormatter,y=me(m)?m({value:o}):se(m)?m.replace("{value}",o+""):o+"";r.push([y,p,l,u,c,g]);for(var _=0;_<s.length;_++){var S=s[_];if(S<p||S>g){var T=[y,S];n.push(T)}}}return{boxData:r,outliers:n}}var Xue={type:"echarts:boxplot",transform:function(e){var r=e.upstream;if(r.sourceFormat!==Cr){var n="";at(n)}var i=Yue(r.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function que(t){t.registerSeriesModel(tH),t.registerChartView(Vue),t.registerLayout(Wue),t.registerTransform(Xue)}var Kue=["itemStyle","borderColor"],Que=["itemStyle","borderColor0"],Jue=["itemStyle","borderColorDoji"],ece=["itemStyle","color"],tce=["itemStyle","color0"];function xA(t,e){return e.get(t>0?ece:tce)}function SA(t,e){return e.get(t===0?Jue:t>0?Kue:Que)}var rce={seriesType:"candlestick",plan:Mh(),performRawSeries:!0,reset:function(t,e){if(!e.isSeriesFiltered(t)){var r=t.pipelineContext.large;return!r&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=xA(s,o),l.stroke=SA(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");J(u,l)}}}}}},nce=["color","borderColor"],ice=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},e.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},e.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},e.prototype.eachRendered=function(r){Ps(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.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(c){if(n.hasValue(c)){var h=n.getItemLayout(c);if(s&&TR(u,h))return;var f=xS(h,c,!0);St(f,{shape:{points:h.ends}},r,c),SS(f,n,c,o),a.add(f),n.setItemGraphicEl(c,f)}}).update(function(c,h){var f=i.getItemGraphicEl(h);if(!n.hasValue(c)){a.remove(f);return}var d=n.getItemLayout(c);if(s&&TR(u,d)){a.remove(f);return}f?(Qe(f,{shape:{points:d.ends}},r,c),di(f)):f=xS(d),SS(f,n,c,o),a.add(f),n.setItemGraphicEl(c,f)}).remove(function(c){var h=i.getItemGraphicEl(c);h&&a.remove(h)}).execute(),this._data=n},e.prototype._renderLarge=function(r){this._clear(),CR(r,this.group);var n=r.get("clip",!0)?Kv(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.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=xS(s);SS(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(r,n){CR(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(r){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(lt),ace=function(){function t(){}return t}(),oce=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new ace},e.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]))},e}(Ue);function xS(t,e,r){var n=t.ends;return new oce({shape:{points:r?sce(n,t):n},z2:100})}function TR(t,e){for(var r=!0,n=0;n<e.ends.length;n++)if(t.contain(e.ends[n][0],e.ends[n][1])){r=!1;break}return r}function SS(t,e,r,n){var i=e.getItemModel(r);t.useStyle(e.getItemVisual(r,"style")),t.style.strokeNoScale=!0,t.__simpleBox=n,ir(t,i);var a=e.getItemLayout(r).sign;R(t.states,function(s,l){var u=i.getModel(l),c=xA(a,u),h=SA(a,u)||c,f=s.style||(s.style={});c&&(f.fill=c),h&&(f.stroke=h)});var o=i.getModel("emphasis");wt(t,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function sce(t,e){return re(t,function(r){return r=r.slice(),r[1]=e.initBaseline,r})}var lce=function(){function t(){}return t}(),bS=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new lce},e.prototype.buildPath=function(r,n){for(var i=n.points,a=0;a<i.length;)if(this.__sign===i[a++]){var o=i[a++];r.moveTo(o,i[a++]),r.lineTo(o,i[a++])}else a+=3},e}(Ue);function CR(t,e,r,n){var i=t.getData(),a=i.getLayout("largePoints"),o=new bS({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new bS({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new bS({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});e.add(l),wS(1,o,t),wS(-1,s,t),wS(0,l,t),n&&(o.incremental=!0,s.incremental=!0),r&&r.push(o,s)}function wS(t,e,r,n){var i=SA(t,r)||xA(t,r),a=r.getModel("itemStyle").getItemStyle(nce);e.useStyle(a),e.style.fill=null,e.style.stroke=i}var nH=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],r}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(r,n,i){var a=n.getItemLayout(r);return a&&i.rect(a.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(dt);Bt(nH,eH,!0);function uce(t){!t||!ee(t.series)||R(t.series,function(e){be(e)&&e.type==="k"&&(e.type="candlestick")})}var cce={seriesType:"candlestick",plan:Mh(),reset:function(t){var e=t.coordinateSystem,r=t.getData(),n=hce(t,r),i=0,a=1,o=["x","y"],s=r.getDimensionIndex(r.mapDimension(o[i])),l=re(r.mapDimensionsAll(o[a]),r.getDimensionIndex,r),u=l[0],c=l[1],h=l[2],f=l[3];if(r.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:t.pipelineContext.large?p:d};function d(g,m){for(var y,_=m.getStore();(y=g.next())!=null;){var S=_.get(s,y),T=_.get(u,y),C=_.get(c,y),M=_.get(h,y),A=_.get(f,y),k=Math.min(T,C),E=Math.max(T,C),D=U(k,S),I=U(E,S),z=U(M,S),O=U(A,S),V=[];j(V,I,0),j(V,D,1),V.push(H(O),H(I),H(z),H(D));var G=m.getItemModel(y),F=!!G.get(["itemStyle","borderColorDoji"]);m.setItemLayout(y,{sign:MR(_,y,T,C,c,F),initBaseline:T>C?I[a]:D[a],ends:V,brushRect:W(M,A,S)})}function U(X,K){var ne=[];return ne[i]=K,ne[a]=X,isNaN(K)||isNaN(X)?[NaN,NaN]:e.dataToPoint(ne)}function j(X,K,ne){var ie=K.slice(),ue=K.slice();ie[i]=_m(ie[i]+n/2,1,!1),ue[i]=_m(ue[i]-n/2,1,!0),ne?X.push(ie,ue):X.push(ue,ie)}function W(X,K,ne){var ie=U(X,ne),ue=U(K,ne);return ie[i]-=n/2,ue[i]-=n/2,{x:ie[0],y:ie[1],width:n,height:ue[1]-ie[1]}}function H(X){return X[i]=_m(X[i],1),X}}function p(g,m){for(var y=fa(g.count*4),_=0,S,T=[],C=[],M,A=m.getStore(),k=!!t.get(["itemStyle","borderColorDoji"]);(M=g.next())!=null;){var E=A.get(s,M),D=A.get(u,M),I=A.get(c,M),z=A.get(h,M),O=A.get(f,M);if(isNaN(E)||isNaN(z)||isNaN(O)){y[_++]=NaN,_+=3;continue}y[_++]=MR(A,M,D,I,c,k),T[i]=E,T[a]=z,S=e.dataToPoint(T,null,C),y[_++]=S?S[0]:NaN,y[_++]=S?S[1]:NaN,T[a]=O,S=e.dataToPoint(T,null,C),y[_++]=S?S[1]:NaN}m.setLayout("largePoints",y)}}};function MR(t,e,r,n,i,a){var o;return r>n?o=-1:r<n?o=1:o=a?0:e>0?t.get(i,e-1)<=n?1:-1:1,o}function hce(t,e){var r=t.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/e.count()),a=oe(pe(t.get("barMaxWidth"),i),i),o=oe(pe(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?oe(s,i):Math.max(Math.min(i/2,a),o)}function fce(t){t.registerChartView(ice),t.registerSeriesModel(nH),t.registerPreprocessor(uce),t.registerVisual(rce),t.registerLayout(cce)}function AR(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}var dce=function(t){Y(e,t);function e(r,n){var i=t.call(this)||this,a=new Xv(r,n),o=new _e;return i.add(a),i.add(o),i.updateData(r,n),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s<a;s++){var l=Ut(n,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/a*r.period+r.effectOffset;l.animate("",!0).when(r.period,{scaleX:r.rippleScale/2,scaleY:r.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(r.period,{opacity:0}).delay(u).start(),o.add(l)}AR(o,r)},e.prototype.updateEffectAnimation=function(r){for(var n=this._effectCfg,i=this.childAt(1),a=["symbolType","period","rippleScale","rippleNumber"],o=0;o<a.length;o++){var s=a[o];if(n[s]!==r[s]){this.stopEffectAnimation(),this.startEffectAnimation(r);return}}AR(i,r)},e.prototype.highlight=function(){ho(this)},e.prototype.downplay=function(){fo(this)},e.prototype.getSymbolType=function(){var r=this.childAt(0);return r&&r.getSymbolType()},e.prototype.updateData=function(r,n){var i=this,a=r.hostModel;this.childAt(0).updateData(r,n);var o=this.childAt(1),s=r.getItemModel(n),l=r.getItemVisual(n,"symbol"),u=Lh(r.getItemVisual(n,"symbolSize")),c=r.getItemVisual(n,"style"),h=c&&c.fill,f=s.getModel("emphasis");o.setScale(u),o.traverse(function(m){m.setStyle("fill",h)});var d=du(r.getItemVisual(n,"symbolOffset"),u);d&&(o.x=d[0],o.y=d[1]);var p=r.getItemVisual(n,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var g={};g.showEffectOn=a.get("showEffectOn"),g.rippleScale=s.get(["rippleEffect","scale"]),g.brushType=s.get(["rippleEffect","brushType"]),g.period=s.get(["rippleEffect","period"])*1e3,g.effectOffset=n/r.count(),g.z=a.getShallow("z")||0,g.zlevel=a.getShallow("zlevel")||0,g.symbolType=l,g.color=h,g.rippleEffectColor=s.get(["rippleEffect","color"]),g.rippleNumber=s.get(["rippleEffect","number"]),g.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(g):this.startEffectAnimation(g),this._effectCfg=g):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(m){m==="emphasis"?g.showEffectOn!=="render"&&i.startEffectAnimation(g):m==="normal"&&g.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=g,wt(this,f.get("focus"),f.get("blurScope"),f.get("disabled"))},e.prototype.fadeOut=function(r){r&&r()},e}(_e),vce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this._symbolDraw=new qv(dce)},e.prototype.render=function(r,n,i){var a=r.getData(),o=this._symbolDraw;o.updateData(a,{clipShape:this._getClipShape(r)}),this.group.add(o.group)},e.prototype._getClipShape=function(r){var n=r.coordinateSystem,i=n&&n.getArea&&n.getArea();return r.get("clip",!0)?i:null},e.prototype.updateTransform=function(r,n,i){var a=r.getData();this.group.dirty();var o=Qv("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(r){var n=r.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=h4(n.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(lt),pce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,n){return ka(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(dt);function gce(t){t.registerChartView(vce),t.registerSeriesModel(pce),t.registerLayout(Qv("effectScatter"))}var iH=function(t){Y(e,t);function e(r,n,i){var a=t.call(this)||this;return a.add(a.createLine(r,n,i)),a._updateEffectSymbol(r,n),a}return e.prototype.createLine=function(r,n,i){return new cA(r,n,i)},e.prototype._updateEffectSymbol=function(r,n){var i=r.getItemModel(n),a=i.getModel("effect"),o=a.get("symbolSize"),s=a.get("symbol");ee(o)||(o=[o,o]);var l=r.getItemVisual(n,"style"),u=a.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=Ut(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(a.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(r,a,n))},e.prototype._updateEffectAnimation=function(r,n,i){var a=this.childAt(1);if(a){var o=r.getItemLayout(i),s=n.get("period")*1e3,l=n.get("loop"),u=n.get("roundTrip"),c=n.get("constantSpeed"),h=br(n.get("delay"),function(d){return d/r.count()*s/3});if(a.ignore=!0,this._updateAnimationPoints(a,o),c>0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var f=void 0;me(h)?f=h(i):f=h,a.__t>0&&(f=-s*a.__t),this._animateSymbol(a,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.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()}},e.prototype._getLineLength=function(r){return $a(r.__p1,r.__cp1)+$a(r.__cp1,r.__p2)},e.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]},e.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},e.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=Sr,c=sw;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var h=r.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),f=r.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(f,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT<r.__t?(r.scaleY=$a(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):r.__lastT===1?r.scaleY=2*$a(n,s):r.scaleY=this._symbolScale[1]),r.__lastT=r.__t,r.ignore=!1,r.x=s[0],r.y=s[1]},e.prototype.updateLayout=function(r,n){this.childAt(0).updateLayout(r,n);var i=r.getItemModel(n).getModel("effect");this._updateEffectAnimation(r,i,n)},e}(_e),aH=function(t){Y(e,t);function e(r,n,i){var a=t.call(this)||this;return a._createPolyline(r,n,i),a}return e.prototype._createPolyline=function(r,n,i){var a=r.getItemLayout(n),o=new Tr({shape:{points:a}});this.add(o),this._updateCommonStl(r,n,i)},e.prototype.updateData=function(r,n,i){var a=r.hostModel,o=this.childAt(0),s={shape:{points:r.getItemLayout(n)}};Qe(o,s,a,n),this._updateCommonStl(r,n,i)},e.prototype._updateCommonStl=function(r,n,i){var a=this.childAt(0),o=r.getItemModel(n),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,c=i&&i.emphasisDisabled;if(!i||r.hasItemOption){var h=o.getModel("emphasis");s=h.getModel("lineStyle").getLineStyle(),c=h.get("disabled"),l=h.get("focus"),u=h.get("blurScope")}a.useStyle(r.getItemVisual(n,"style")),a.style.fill=null,a.style.strokeNoScale=!0;var f=a.ensureState("emphasis");f.style=s,wt(this,l,u,c)},e.prototype.updateLayout=function(r,n){var i=this.childAt(0);i.setShape("points",r.getItemLayout(n))},e}(_e),mce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._lastFrame=0,r._lastFramePercent=0,r}return e.prototype.createLine=function(r,n,i){return new aH(r,n,i)},e.prototype._updateAnimationPoints=function(r,n){this._points=n;for(var i=[0],a=0,o=1;o<n.length;o++){var s=n[o-1],l=n[o];a+=$a(s,l),i.push(a)}if(a===0){this._length=0;return}for(var o=0;o<i.length;o++)i[o]/=a;this._offsets=i,this._length=a},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(r){var n=r.__t<1?r.__t:2-r.__t,i=this._points,a=this._offsets,o=i.length;if(a){var s=this._lastFrame,l;if(n<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(a[l]>n);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),h=i[l],f=i[l+1];r.x=h[0]*(1-c)+c*f[0],r.y=h[1]*(1-c)+c*f[1];var d=r.__t<1?f[0]-h[0]:h[0]-f[0],p=r.__t<1?f[1]-h[1]:h[1]-f[1];r.rotation=-Math.atan2(p,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},e}(iH),yce=function(){function t(){this.polyline=!1,this.curveness=0,this.segs=[]}return t}(),_ce=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new yce},e.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o<i.length;){var s=i[o++];if(s>0){r.moveTo(i[o++],i[o++]);for(var l=1;l<s;l++)r.lineTo(i[o++],i[o++])}}else for(o=this._off;o<i.length;){var u=i[o++],c=i[o++],h=i[o++],f=i[o++];if(r.moveTo(u,c),a>0){var d=(u+h)/2-(c-f)*a,p=(c+f)/2-(h-u)*a;r.quadraticCurveTo(d,p,h,f)}else r.lineTo(h,f)}this.incremental&&(this._off=o,this.notClear=!0)},e.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;u<a.length;){var c=a[u++];if(c>0)for(var h=a[u++],f=a[u++],d=1;d<c;d++){var p=a[u++],g=a[u++];if(zo(h,f,p,g,s,r,n))return l}l++}else for(var l=0,u=0;u<a.length;){var h=a[u++],f=a[u++],p=a[u++],g=a[u++];if(o>0){var m=(h+p)/2-(f-g)*o,y=(f+g)/2-(p-h)*o;if(aj(h,f,m,y,p,g,s,r,n))return l}else if(zo(h,f,p,g,s,r,n))return l;l++}return-1},e.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},e.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;u<i.length;){var c=i[u++],h=i[u++];a=Math.min(c,a),s=Math.max(c,s),o=Math.min(h,o),l=Math.max(h,l)}r=this._rect=new Ce(a,o,s,l)}return r},e}(Ue),xce=function(){function t(){this.group=new _e}return t.prototype.updateData=function(e){this._clear();var r=this._create();r.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(r,e)},t.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},t.prototype.incrementalUpdate=function(e,r){var n=this._newAdded[0],i=r.getLayout("linesPoints"),a=n&&n.shape.segs;if(a&&a.length<2e4){var o=a.length,s=new Float32Array(o+i.length);s.set(a),s.set(i,o),n.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),this._setCommon(l,r),l.__startIndex=e.start}},t.prototype.remove=function(){this._clear()},t.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},t.prototype._create=function(){var e=new _ce({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},t.prototype._setCommon=function(e,r,n){var i=r.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var a=r.getVisual("style");a&&a.stroke&&e.setStyle("stroke",a.stroke),e.setStyle("fill",null);var o=Le(e);o.seriesIndex=i.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),oH={seriesType:"lines",plan:Mh(),reset:function(t){var e=t.coordinateSystem;if(e){var r=t.get("polyline"),n=t.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,c=i.start;c<i.end;c++)u+=t.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var h=0,f=[],c=i.start;c<i.end;c++){var d=t.getLineCoords(c,o);r&&(s[h++]=d);for(var p=0;p<d;p++)f=e.dataToPoint(o[p],!1,f),s[h++]=f[0],s[h++]=f[1]}a.setLayout("linesPoints",s)}else for(var c=i.start;c<i.end;c++){var g=a.getItemModel(c),d=t.getLineCoords(c,o),m=[];if(r)for(var y=0;y<d;y++)m.push(e.dataToPoint(o[y]));else{m[0]=e.dataToPoint(o[0]),m[1]=e.dataToPoint(o[1]);var _=g.get(["lineStyle","curveness"]);+_&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*_,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*_])}a.setItemLayout(c,m)}}}}}},Sce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r),s=r.get("zlevel"),l=r.get(["effect","trailLength"]),u=i.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(r)&&l>0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var h=r.get("clip",!0)&&Kv(r.coordinateSystem,!1,r);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},e.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},e.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=oH.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},e.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 xce:new hA(o?a?mce:aH:a?iH:cA),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(r){return!!r.get(["effect","show"])},e.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(r,n){this.remove(r,n)},e.type="lines",e}(lt),bce=typeof Uint32Array>"u"?Array:Uint32Array,wce=typeof Float64Array>"u"?Array:Float64Array;function LR(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=re(e,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),z0([i,r[0],r[1]])}))}var Tce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return e.prototype.init=function(r){r.data=r.data||[],LR(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(r){if(LR(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))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=$c(this._flatCoords,n.flatCoords),this._flatCoordsOffset=$c(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},e.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},e.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o<a;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[i+o*2],n[o][1]=this._flatCoords[i+o*2+1];return a}else{for(var s=this._getCoordsFromItemModel(r),o=0;o<s.length;o++)n[o]=n[o]||[],n[o][0]=s[o][0],n[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(r){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),qe(r[0])){for(var i=r.length,a=new bce(i),o=new wce(i),s=0,l=0,u=0,c=0;c<i;){u++;var h=r[c++];a[l++]=s+n,a[l++]=h;for(var f=0;f<h;f++){var d=r[c++],p=r[c++];o[s++]=d,o[s++]=p}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:r.length}},e.prototype.getInitialData=function(r,n){var i=new Yr(["value"],this);return i.hasItemOption=!1,i.initData(r.data,[],function(a,o,s,l){if(a instanceof Array)return NaN;i.hasItemOption=!0;var u=a.value;if(u!=null)return u instanceof Array?u[l]:u}),i},e.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"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},e.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+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(dt);function zg(t){return t instanceof Array||(t=[t,t]),t}var Cce={seriesType:"lines",reset:function(t){var e=zg(t.get("symbol")),r=zg(t.get("symbolSize")),n=t.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=zg(s.getShallow("symbol",!0)),u=zg(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}}};function Mce(t){t.registerChartView(Sce),t.registerSeriesModel(Tce),t.registerLayout(oH),t.registerVisual(Cce)}var Ace=256,Lce=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=bn.createCanvas();this.canvas=e}return t.prototype.update=function(e,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,h=this.canvas,f=h.getContext("2d"),d=e.length;h.width=r,h.height=n;for(var p=0;p<d;++p){var g=e[p],m=g[0],y=g[1],_=g[2],S=i(_);f.globalAlpha=S,f.drawImage(s,m-c,y-c)}if(!h.width||!h.height)return h;for(var T=f.getImageData(0,0,h.width,h.height),C=T.data,M=0,A=C.length,k=this.minOpacity,E=this.maxOpacity,D=E-k;M<A;){var S=C[M+3]/256,I=Math.floor(S*(Ace-1))*4;if(S>0){var z=o(S)?l:u;S>0&&(S=S*D+k),C[M++]=z[I],C[M++]=z[I+1],C[M++]=z[I+2],C[M++]=z[I+3]*S*256}else M+=4}return f.putImageData(T,0,0),h},t.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=bn.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor=q.color.neutral99,i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},t.prototype._getGradient=function(e,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++)e[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},t}();function Pce(t,e,r){var n=t[1]-t[0];e=re(e,function(o){return{interval:[(o.interval[0]-t[0])/n,(o.interval[1]-t[0])/n]}});var i=e.length,a=0;return function(o){var s;for(s=a;s<i;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}if(s===i)for(s=a-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s<i&&r[s]}}function kce(t,e){var r=t[1]-t[0];return e=[(e[0]-t[0])/r,(e[1]-t[0])/r],function(n){return n>=e[0]&&n<=e[1]}}function PR(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Dce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.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"||o.type==="matrix"?this._renderOnGridLike(r,i,0,r.getData().count()):PR(o)&&this._renderOnGeo(o,r,a,i)},e.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},e.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(PR(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},e.prototype.eachRendered=function(r){Ps(this._progressiveEls||this.group,r)},e.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=xs(s,"cartesian2d"),u=xs(s,"matrix"),c,h,f,d;if(l){var p=s.getAxis("x"),g=s.getAxis("y");c=p.getBandWidth()+.5,h=g.getBandWidth()+.5,f=p.scale.getExtent(),d=g.scale.getExtent()}for(var m=this.group,y=r.getData(),_=r.getModel(["emphasis","itemStyle"]).getItemStyle(),S=r.getModel(["blur","itemStyle"]).getItemStyle(),T=r.getModel(["select","itemStyle"]).getItemStyle(),C=r.get(["itemStyle","borderRadius"]),M=ar(r),A=r.getModel("emphasis"),k=A.get("focus"),E=A.get("blurScope"),D=A.get("disabled"),I=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],z=i;z<a;z++){var O=void 0,V=y.getItemVisual(z,"style");if(l){var G=y.get(I[0],z),F=y.get(I[1],z);if(isNaN(y.get(I[2],z))||isNaN(G)||isNaN(F)||G<f[0]||G>f[1]||F<d[0]||F>d[1])continue;var U=s.dataToPoint([G,F]);O=new Be({shape:{x:U[0]-c/2,y:U[1]-h/2,width:c,height:h},style:V})}else if(u){var j=s.dataToLayout([y.get(I[0],z),y.get(I[1],z)]).rect;if(Ir(j.x))continue;O=new Be({z2:1,shape:j,style:V})}else{if(isNaN(y.get(I[1],z)))continue;var W=s.dataToLayout([y.get(I[0],z)]),j=W.contentRect||W.rect;if(Ir(j.x)||Ir(j.y))continue;O=new Be({z2:1,shape:j,style:V})}if(y.hasItemOption){var H=y.getItemModel(z),X=H.getModel("emphasis");_=X.getModel("itemStyle").getItemStyle(),S=H.getModel(["blur","itemStyle"]).getItemStyle(),T=H.getModel(["select","itemStyle"]).getItemStyle(),C=H.get(["itemStyle","borderRadius"]),k=X.get("focus"),E=X.get("blurScope"),D=X.get("disabled"),M=ar(H)}O.shape.r=C;var K=r.getRawValue(z),ne="-";K&&K[2]!=null&&(ne=K[2]+""),vr(O,M,{labelFetcher:r,labelDataIndex:z,defaultOpacity:V.opacity,defaultText:ne}),O.ensureState("emphasis").style=_,O.ensureState("blur").style=S,O.ensureState("select").style=T,wt(O,k,E,D),O.incremental=o,o&&(O.states.emphasis.hoverLayer=!0),m.add(O),y.setItemGraphicEl(z,O),this._progressiveEls&&this._progressiveEls.push(O)}},e.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 Lce;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=r.getViewRect().clone(),h=r.getRoamTransform();c.applyTransform(h);var f=Math.max(c.x,0),d=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),g=Math.min(c.height+c.y,a.getHeight()),m=p-f,y=g-d,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],S=l.mapArray(_,function(A,k,E){var D=r.dataToPoint([A,k]);return D[0]-=f,D[1]-=d,D.push(E),D}),T=i.getExtent(),C=i.type==="visualMap.continuous"?kce(T,i.option.range):Pce(T,i.getPieceList(),i.option.selected);u.update(S,m,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},C);var M=new pr({style:{width:m,height:y,x:f,y:d,image:u.canvas},silent:!0});this.group.add(M)},e.type="heatmap",e}(lt),Ice=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return ka(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var r=Ch.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:q.color.primary}}},e}(dt);function Ece(t){t.registerChartView(Dce),t.registerSeriesModel(Ice)}var Nce=["itemStyle","borderWidth"],kR=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],TS=new Pa,Rce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),h=l.master.getRect(),f={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:c,valueDim:kR[+c],categoryDim:kR[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var g=IR(o,p),m=DR(o,p,g,f),y=ER(o,f,m);o.setItemGraphicEl(p,y),a.add(y),RR(y,f,m)}}).update(function(p,g){var m=s.getItemGraphicEl(g);if(!o.hasValue(p)){a.remove(m);return}var y=IR(o,p),_=DR(o,p,y,f),S=fH(o,_);m&&S!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(p,null),m=null),m?Gce(m,f,_):m=ER(o,f,_,!0),o.setItemGraphicEl(p,m),m.__pictorialSymbolMeta=_,a.add(m),RR(m,f,_)}).remove(function(p){var g=s.getItemGraphicEl(p);g&&NR(s,p,g.__pictorialSymbolMeta.animationModel,g)}).execute();var d=r.get("clip",!0)?Kv(r.coordinateSystem,!1,r):null;return d?a.setClipPath(d):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){NR(a,Le(o).dataIndex,r,o)}):i.removeAll()},e.type="pictorialBar",e}(lt);function DR(t,e,r,n){var i=t.getItemLayout(e),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=r.get("symbolPatternSize")||2,h=r.isAnimationEnabled(),f={dataIndex:e,layout:i,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:h?r:null,hoverScale:h&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};Oce(r,a,i,n,f),zce(t,e,i,a,o,f.boundingLength,f.pxSign,c,n,f),Bce(r,f.symbolScale,u,n,f);var d=f.symbolSize,p=du(r.get("symbolOffset"),d);return jce(r,d,i,a,o,p,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,n,f),f}function Oce(t,e,r,n,i){var a=n.valueDim,o=t.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),c;if(ee(o)){var h=[CS(s,o[0])-l,CS(s,o[1])-l];h[1]<h[0]&&h.reverse(),c=h[u]}else o!=null?c=CS(s,o)-l:e?c=n.coordSysExtent[a.index][u]-l:c=r[a.wh];i.boundingLength=c,e&&(i.repeatCutLength=r[a.wh]);var f=a.xy==="x",d=s.inverse;i.pxSign=f&&!d||!f&&d?c>=0?1:-1:c>0?1:-1}function CS(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function zce(t,e,r,n,i,a,o,s,l,u){var c=l.valueDim,h=l.categoryDim,f=Math.abs(r[h.wh]),d=t.getItemVisual(e,"symbolSize"),p;ee(d)?p=d.slice():d==null?p=["100%","100%"]:p=[d,d],p[h.index]=oe(p[h.index],f),p[c.index]=oe(p[c.index],n?f:Math.abs(a)),u.symbolSize=p;var g=u.symbolScale=[p[0]/s,p[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*o}function Bce(t,e,r,n,i){var a=t.get(Nce)||0;a&&(TS.attr({scaleX:e[0],scaleY:e[1],rotation:r}),TS.updateTransform(),a/=TS.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function jce(t,e,r,n,i,a,o,s,l,u,c,h){var f=c.categoryDim,d=c.valueDim,p=h.pxSign,g=Math.max(e[d.index]+s,0),m=g;if(n){var y=Math.abs(l),_=br(t.get("symbolMargin"),"15%")+"",S=!1;_.lastIndexOf("!")===_.length-1&&(S=!0,_=_.slice(0,_.length-1));var T=oe(_,e[d.index]),C=Math.max(g+T*2,0),M=S?0:T*2,A=D2(n),k=A?n:OR((y+M)/C),E=y-k*g;T=E/2/(S?k:Math.max(k-1,1)),C=g+T*2,M=S?0:T*2,!A&&n!=="fixed"&&(k=u?OR((Math.abs(u)+M)/C):0),m=k*C-M,h.repeatTimes=k,h.symbolMargin=T}var D=p*(m/2),I=h.pathPosition=[];I[f.index]=r[f.wh]/2,I[d.index]=o==="start"?D:o==="end"?l-D:l/2,a&&(I[0]+=a[0],I[1]+=a[1]);var z=h.bundlePosition=[];z[f.index]=r[f.xy],z[d.index]=r[d.xy];var O=h.barRectShape=J({},r);O[d.wh]=p*Math.max(Math.abs(r[d.wh]),Math.abs(I[d.index]+D)),O[f.wh]=r[f.wh];var V=h.clipShape={};V[f.xy]=-r[f.xy],V[f.wh]=c.ecSize[f.wh],V[d.xy]=0,V[d.wh]=r[d.wh]}function sH(t){var e=t.symbolPatternSize,r=Ut(t.symbolType,-e/2,-e/2,e,e);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function lH(t,e,r,n){var i=t.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,c=0,h=a[e.valueDim.index]+o+r.symbolMargin*2;for(bA(t,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c<u?zc(g,null,p(c),r,n):zc(g,null,{scaleX:0,scaleY:0},r,n,function(){i.remove(g)}),c++});c<u;c++){var f=sH(r);f.__pictorialAnimationIndex=c,f.__pictorialRepeatTimes=u,i.add(f);var d=p(c);zc(f,{x:d.x,y:d.y,scaleX:0,scaleY:0},{scaleX:d.scaleX,scaleY:d.scaleY,rotation:d.rotation},r,n)}function p(g){var m=s.slice(),y=r.pxSign,_=g;return(r.symbolRepeatDirection==="start"?y>0:y<0)&&(_=u-1-g),m[l.index]=h*(_-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function uH(t,e,r,n){var i=t.__pictorialBundle,a=t.__pictorialMainPath;a?zc(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=t.__pictorialMainPath=sH(r),i.add(a),zc(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 cH(t,e,r){var n=J({},e.barRectShape),i=t.__pictorialBarRect;i?zc(i,null,{shape:n},e,r):(i=t.__pictorialBarRect=new Be({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,t.add(i))}function hH(t,e,r,n){if(r.symbolClip){var i=t.__pictorialClipPath,a=J({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)Qe(i,{shape:a},s,l);else{a[o.wh]=0,i=new Be({shape:a}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],cu[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function IR(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=Vce,r.isAnimationEnabled=Fce,r}function Vce(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Fce(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function ER(t,e,r,n){var i=new _e,a=new _e;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?lH(i,e,r):uH(i,e,r),cH(i,r,n),hH(i,e,r,n),i.__pictorialShapeStr=fH(t,r),i.__pictorialSymbolMeta=r,i}function Gce(t,e,r){var n=r.animationModel,i=r.dataIndex,a=t.__pictorialBundle;Qe(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?lH(t,e,r,!0):uH(t,e,r,!0),cH(t,r,!0),hH(t,e,r,!0)}function NR(t,e,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];bA(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),R(a,function(o){_s(o,{scaleX:0,scaleY:0},r,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function fH(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function bA(t,e,r){R(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(r,n)})}function zc(t,e,r,n,i,a){e&&t.attr(e),n.symbolClip&&!i?r&&t.attr(r):r&&cu[i?"updateProps":"initProps"](t,r,n.animationModel,n.dataIndex,a)}function RR(t,e,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"),c=a.get("focus"),h=a.get("blurScope"),f=a.get("scale");bA(t,function(g){if(g instanceof pr){var m=g.style;g.useStyle(J({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},r.style))}else g.useStyle(r.style);var y=g.ensureState("emphasis");y.style=o,f&&(y.scaleX=g.scaleX*1.1,y.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=r.z2});var d=e.valueDim.posDesc[+(r.boundingLength>0)],p=t.__pictorialBarRect;p.ignoreClip=!0,vr(p,ar(i),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:ih(e.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:d}),wt(t,c,h,a.get("disabled"))}function OR(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var Hce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return e.prototype.getInitialData=function(r){return r.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=ks(pv.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:q.color.primary}}}),e}(pv);function Wce(t){t.registerChartView(Rce),t.registerSeriesModel(Hce),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(IF,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,EF("pictorialBar"))}var Uce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._layers=[],r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,h=u.boundaryGap;s.x=0,s.y=c.y+h[0];function f(m){return m.name}var d=new vo(this._layersSeries||[],l,f,f),p=[];d.add(le(g,this,"add")).update(le(g,this,"update")).remove(le(g,this,"remove")).execute();function g(m,y,_){var S=o._layers;if(m==="remove"){s.remove(S[y]);return}for(var T=[],C=[],M,A=l[y].indices,k=0;k<A.length;k++){var E=a.getItemLayout(A[k]),D=E.x,I=E.y0,z=E.y;T.push(D,I),C.push(D,I+z),M=a.getItemVisual(A[k],"style")}var O,V=a.getItemLayout(A[0]),G=r.getModel("label"),F=G.get("margin"),U=r.getModel("emphasis");if(m==="add"){var j=p[y]=new _e;O=new wG({shape:{points:T,stackedOnPoints:C,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),j.add(O),s.add(j),r.isAnimationEnabled()&&O.setClipPath(Zce(O.getBoundingRect(),r,function(){O.removeClipPath()}))}else{var j=S[_];O=j.childAt(0),s.add(j),p[y]=j,Qe(O,{shape:{points:T,stackedOnPoints:C}},r),di(O)}vr(O,ar(r),{labelDataIndex:A[k-1],defaultText:a.getName(A[k-1]),inheritColor:M.fill},{normal:{verticalAlign:"middle"}}),O.setTextConfig({position:null,local:!0});var W=O.getTextContent();W&&(W.x=V.x-F,W.y=V.y0+V.y/2),O.useStyle(M),a.setItemGraphicEl(y,O),ir(O,r),wt(O,U.get("focus"),U.get("blurScope"),U.get("disabled"))}this._layersSeries=l,this._layers=p},e.type="themeRiver",e}(lt);function Zce(t,e,r){var n=new Be({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return St(n,{shape:{x:t.x-50,width:t.width+100,height:t.height+20}},e,r),n}var MS=2,$ce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Nh(le(this.getData,this),le(this.getRawData,this))},e.prototype.fixData=function(r){var n=r.length,i={},a=ww(r,function(f){return i.hasOwnProperty(f[0]+"")||(i[f[0]+""]=-1),f[2]}),o=[];a.buckets.each(function(f,d){o.push({name:d,dataList:f})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var h=o[l].dataList[c][0]+"";i[h]=l}for(var h in i)i.hasOwnProperty(h)&&i[h]!==l&&(i[h]=l,r[n]=[h,0,u],n++)}return r},e.prototype.getInitialData=function(r,n){for(var i=this.getReferringComponents("singleAxis",kt).models[0],a=i.get("type"),o=tt(r.data,function(p){return p[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=de(),c=0,h=0;h<s.length;++h)l.push(s[h][MS]),u.get(s[h][MS])||(u.set(s[h][MS],c),c++);var f=Ph(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:zy(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,d=new Yr(f,this);return d.initData(s),d},e.prototype.getLayerSeries=function(){for(var r=this.getData(),n=r.count(),i=[],a=0;a<n;++a)i[a]=a;var o=r.mapDimension("single"),s=ww(i,function(u){return r.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(h,f){return r.get(o,h)-r.get(o,f)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(r,n,i){ee(r)||(r=r?[r]:[]);for(var a=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var h=Number.MAX_VALUE,f=-1,d=o[c].indices.length,p=0;p<d;++p){var g=a.get(r[0],o[c].indices[p]),m=Math.abs(g-n);m<=h&&(u=g,h=m,f=o[c].indices[p])}s.push(f)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=a.getName(r),s=a.get(a.mapDimension("value"),r);return Kt("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(dt);function Yce(t,e){t.eachSeriesByType("themeRiver",function(r){var n=r.getData(),i=r.coordinateSystem,a={},o=i.getRect();a.rect=o;var s=r.get("boundaryGap"),l=i.getAxis();if(a.boundaryGap=s,l.orient==="horizontal"){s[0]=oe(s[0],o.height),s[1]=oe(s[1],o.height);var u=o.height-s[0]-s[1];zR(n,r,u)}else{s[0]=oe(s[0],o.width),s[1]=oe(s[1],o.width);var c=o.width-s[0]-s[1];zR(n,r,c)}n.setLayout("layoutInfo",a)})}function zR(t,e,r){if(t.count())for(var n=e.coordinateSystem,i=e.getLayerSeries(),a=t.mapDimension("single"),o=t.mapDimension("value"),s=re(i,function(m){return re(m.indices,function(y){var _=n.dataToPoint(t.get(a,y));return _[1]=t.get(o,y),_})}),l=Xce(s),u=l.y0,c=r/l.max,h=i.length,f=i[0].indices.length,d,p=0;p<f;++p){d=u[p]*c,t.setItemLayout(i[0].indices[p],{layerIndex:0,x:s[0][p][0],y0:d,y:s[0][p][1]*c});for(var g=1;g<h;++g)d+=s[g-1][p][1]*c,t.setItemLayout(i[g].indices[p],{layerIndex:g,x:s[g][p][0],y0:d,y:s[g][p][1]*c})}}function Xce(t){for(var e=t.length,r=t[0].length,n=[],i=[],a=0,o=0;o<r;++o){for(var s=0,l=0;l<e;++l)s+=t[l][o][1];s>a&&(a=s),n.push(s)}for(var u=0;u<r;++u)i[u]=(a-n[u])/2;a=0;for(var c=0;c<r;++c){var h=n[c]+i[c];h>a&&(a=h)}return{y0:i,max:a}}function qce(t){t.registerChartView(Uce),t.registerSeriesModel($ce),t.registerLayout(Yce),t.registerProcessor(Ih("themeRiver"))}var Kce=2,Qce=4,BR=function(t){Y(e,t);function e(r,n,i,a){var o=t.call(this)||this;o.z2=Kce,o.textConfig={inside:!0},Le(o).seriesIndex=n.seriesIndex;var s=new Xe({z2:Qce,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return e.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;Le(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),h=J({},c);h.label=null;var f=n.getVisual("style");f.lineJoin="bevel";var d=n.getVisual("decal");d&&(f.decal=th(d,o));var p=va(l.getModel("itemStyle"),h,!0);J(h,p),R(ln,function(_){var S=s.ensureState(_),T=l.getModel([_,"itemStyle"]);S.style=T.getItemStyle();var C=va(T,h);C&&(S.shape=C)}),r?(s.setShape(h),s.shape.r=c.r0,St(s,{shape:{r:c.r}},i,n.dataIndex)):(Qe(s,{shape:h},i),di(s)),s.useStyle(f),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var m=u.get("focus"),y=m==="relative"?$c(n.getAncestorsIndices(),n.getDescendantIndices()):m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;wt(this,y,u.get("blurScope"),u.get("disabled"))},e.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),c=Math.sin(l),h=this,f=h.getTextContent(),d=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(p!=null&&Math.abs(s)<p);f.ignore=!g,R(tv,function(y){var _=y==="normal"?i.getModel("label"):i.getModel([y,"label"]),S=y==="normal",T=S?f:f.ensureState(y),C=r.getFormattedLabel(d,y);S&&(C=C||n.node.name),T.style=pt(_,{},null,y!=="normal",!0),C&&(T.style.text=C);var M=_.get("show");M!=null&&!S&&(T.ignore=!M);var A=m(_,"position"),k=S?h:h.states[y],E=k.style.fill;k.textConfig={outsideFill:_.get("color")==="inherit"?E:null,inside:A!=="outside"};var D,I=m(_,"distance")||0,z=m(_,"align"),O=m(_,"rotate"),V=Math.PI*.5,G=Math.PI*1.5,F=In(O==="tangential"?Math.PI/2-l:l),U=F>V&&!qc(F-V)&&F<G;A==="outside"?(D=o.r+I,z=U?"right":"left"):!z||z==="center"?(s===2*Math.PI&&o.r0===0?D=0:D=(o.r+o.r0)/2,z="center"):z==="left"?(D=o.r0+I,z=U?"right":"left"):z==="right"&&(D=o.r-I,z=U?"left":"right"),T.style.align=z,T.style.verticalAlign=m(_,"verticalAlign")||"middle",T.x=D*u+o.cx,T.y=D*c+o.cy;var j=0;O==="radial"?j=In(-l)+(U?Math.PI:0):O==="tangential"?j=In(Math.PI/2-l)+(U?Math.PI:0):qe(O)&&(j=O*Math.PI/180),T.rotation=In(j)});function m(y,_){var S=y.get(_);return S??a.get(_)}f.dirtyStyle()},e}(Or),jT="sunburstRootToNode",jR="sunburstHighlight",Jce="sunburstUnhighlight";function ehe(t){t.registerAction({type:jT,update:"updateView"},function(e,r){r.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i,a){var o=mv(e,[jT],i);if(o){var s=i.getViewRoot();s&&(e.direction=aA(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),t.registerAction({type:jR,update:"none"},function(e,r,n){e=J({},e),r.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(a){var o=mv(e,[jR],a);o&&(e.dataIndex=o.node.dataIndex)}n.dispatchAction(J(e,{type:"highlight"}))}),t.registerAction({type:Jce,update:"updateView"},function(e,r,n){e=J({},e),n.dispatchAction(J(e,{type:"downplay"}))})}var the=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.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(),c=this.group,h=r.get("renderLabelForZeroData"),f=[];u.eachNode(function(_){f.push(_)});var d=this._oldChildren||[];p(f,d),y(l,u),this._initEvents(),this._oldChildren=f;function p(_,S){if(_.length===0&&S.length===0)return;new vo(S,_,T,T).add(C).update(C).remove(Ie(C,null)).execute();function T(M){return M.getId()}function C(M,A){var k=M==null?null:_[M],E=A==null?null:S[A];g(k,E)}}function g(_,S){if(!h&&_&&!_.getValue()&&(_=null),_!==l&&S!==l){if(S&&S.piece)_?(S.piece.updateData(!1,_,r,n,i),s.setItemGraphicEl(_.dataIndex,S.piece)):m(S);else if(_){var T=new BR(_,r,n,i);c.add(T),s.setItemGraphicEl(_.dataIndex,T)}}}function m(_){_&&_.piece&&(c.remove(_.piece),_.piece=null)}function y(_,S){S.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,r,n,i):(o.virtualPiece=new BR(_,r,n,i),c.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(T){o._rootToNode(S.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.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 c=l.get("target",!0)||"_blank";Ay(u,c)}}i=!0}})})},e.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:jT,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},e.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}},e.type="sunburst",e}(lt),rhe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};dH(i);var a=this._levelModels=re(r.levels||[],function(l){return new We(l,this,n)},this),o=iA.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var h=o.getNodeByDataIndex(c),f=a[h.depth];return f&&(u.parentModel=f),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=p_(i,this),n},e.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.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)},e.prototype.enableAriaDecal=function(){m6(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(dt);function dH(t){var e=0;R(t.children,function(n){dH(n);var i=n.value;ee(i)&&(i=i[0]),e+=i});var r=t.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),ee(t.value)?t.value[0]=r:t.value=r}var VR=Math.PI/180;function nhe(t,e,r){e.eachSeriesByType(t,function(n){var i=n.get("center"),a=n.get("radius");ee(a)||(a=[0,a]),ee(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=oe(i[0],o),c=oe(i[1],s),h=oe(a[0],l/2),f=oe(a[1],l/2),d=-n.get("startAngle")*VR,p=n.get("minAngle")*VR,g=n.getData().tree.root,m=n.getViewRoot(),y=m.depth,_=n.get("sort");_!=null&&vH(m,_);var S=0;R(m.children,function(F){!isNaN(F.getValue())&&S++});var T=m.getValue(),C=Math.PI/(T||S)*2,M=m.depth>0,A=m.height-(M?-1:1),k=(f-h)/(A||1),E=n.get("clockwise"),D=n.get("stillShowZeroSum"),I=E?1:-1,z=function(F,U){if(F){var j=U;if(F!==g){var W=F.getValue(),H=T===0&&D?C:W*C;H<p&&(H=p),j=U+I*H;var X=F.depth-y-(M?-1:1),K=h+k*X,ne=h+k*(X+1),ie=n.getLevelModel(F);if(ie){var ue=ie.get("r0",!0),ve=ie.get("r",!0),Ge=ie.get("radius",!0);Ge!=null&&(ue=Ge[0],ve=Ge[1]),ue!=null&&(K=oe(ue,l/2)),ve!=null&&(ne=oe(ve,l/2))}F.setLayout({angle:H,startAngle:U,endAngle:j,clockwise:E,cx:u,cy:c,r0:K,r:ne})}if(F.children&&F.children.length){var xe=0;R(F.children,function(ge){xe+=z(ge,U+xe)})}return j-U}};if(M){var O=h,V=h+k,G=Math.PI*2;g.setLayout({angle:G,startAngle:d,endAngle:d+G,clockwise:E,cx:u,cy:c,r0:O,r:V})}z(m,d)})}function vH(t,e){var r=t.children||[];t.children=ihe(r,e),r.length&&R(t.children,function(n){vH(n,e)})}function ihe(t,e){if(me(e)){var r=re(t,function(i,a){var o=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return o}},index:a}});return r.sort(function(i,a){return e(i.params,a.params)}),re(r,function(i){return t[i.index]})}else{var n=e==="asc";return t.sort(function(i,a){var o=(i.getValue()-a.getValue())*(n?1:-1);return o===0?(i.dataIndex-a.dataIndex)*(n?-1:1):o})}}function ahe(t){var e={};function r(n,i,a){if(n.depth===0)return q.color.neutral50;for(var o=n;o&&o.depth>1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&se(s)&&(s=dy(s,(n.depth-1)/(a-1)*.5)),s}t.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");J(u,l)})})}function ohe(t){t.registerChartView(the),t.registerSeriesModel(rhe),t.registerLayout(Ie(nhe,"sunburst")),t.registerProcessor(Ie(Ih,"sunburst")),t.registerVisual(ahe),ehe(t)}var FR={color:"fill",borderColor:"stroke"},she={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},ro=Fe(),lhe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(r,n){return ka(null,this)},e.prototype.getDataParams=function(r,n,i){var a=t.prototype.getDataParams.call(this,r,n);return i&&(a.info=ro(i).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(dt);function uhe(t,e){return e=e||[0,0],re(["x","y"],function(r,n){var i=this.getAxis(r),a=e[n],o=t[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function che(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:le(uhe,t)}}}function hhe(t,e){return e=e||[0,0],re([0,1],function(r){var n=e[r],i=t[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=e[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function fhe(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(r){return t.dataToPoint(r)},size:le(hhe,t)}}}function dhe(t,e){var r=this.getAxis(),n=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function vhe(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:le(dhe,t)}}}function phe(t,e){return e=e||[0,0],re(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=e[n],s=t[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 ghe(t){var e=t.getRadiusAxis(),r=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=e.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=t.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:le(phe,t)}}}function mhe(t){var e=t.getRect(),r=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return t.dataToPoint(n,i)},layout:function(n,i){return t.dataToLayout(n,i)}}}}function yhe(t){var e=t.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r,n){return t.dataToPoint(r,n)},layout:function(r,n){return t.dataToLayout(r,n)}}}}function pH(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||he(t,"text")))}function gH(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},he(n,"text")&&(o.text=n.text),he(n,"rich")&&(o.rich=n.rich),he(n,"textFill")&&(o.fill=n.textFill),he(n,"textStroke")&&(o.stroke=n.textStroke),he(n,"fontFamily")&&(o.fontFamily=n.fontFamily),he(n,"fontSize")&&(o.fontSize=n.fontSize),he(n,"fontStyle")&&(o.fontStyle=n.fontStyle),he(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=he(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),he(n,"textPosition")&&(i.position=n.textPosition),he(n,"textOffset")&&(i.offset=n.textOffset),he(n,"textRotation")&&(i.rotation=n.textRotation),he(n,"textDistance")&&(i.distance=n.textDistance)}return GR(o,t),R(o.rich,function(l){GR(l,l)}),{textConfig:i,textContent:a}}function GR(t,e){e&&(e.font=e.textFont||e.font,he(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),he(e,"textAlign")&&(t.align=e.textAlign),he(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),he(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),he(e,"textWidth")&&(t.width=e.textWidth),he(e,"textHeight")&&(t.height=e.textHeight),he(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),he(e,"textPadding")&&(t.padding=e.textPadding),he(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),he(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),he(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),he(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),he(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),he(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),he(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function HR(t,e,r){var n=t;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=t.fill||q.color.neutral99;WR(n,e);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||q.color.neutral00,!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=t.fill||r.outsideFill||q.color.neutral00),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=e.text,n.rich=e.rich,R(e.rich,function(s){WR(s,s)}),n}function WR(t,e){e&&(he(e,"fill")&&(t.textFill=e.fill),he(e,"stroke")&&(t.textStroke=e.fill),he(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),he(e,"font")&&(t.font=e.font),he(e,"fontStyle")&&(t.fontStyle=e.fontStyle),he(e,"fontWeight")&&(t.fontWeight=e.fontWeight),he(e,"fontSize")&&(t.fontSize=e.fontSize),he(e,"fontFamily")&&(t.fontFamily=e.fontFamily),he(e,"align")&&(t.textAlign=e.align),he(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),he(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),he(e,"width")&&(t.textWidth=e.width),he(e,"height")&&(t.textHeight=e.height),he(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),he(e,"padding")&&(t.textPadding=e.padding),he(e,"borderColor")&&(t.textBorderColor=e.borderColor),he(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),he(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),he(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),he(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),he(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),he(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),he(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),he(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),he(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),he(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var mH={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},UR=$e(mH);ci(ba,function(t,e){return t[e]=1,t},{});ba.join(", ");var t0=["","style","shape","extra"],lh=Fe();function wA(t,e,r,n,i){var a=t+"Animation",o=xh(t,n,i)||{},s=lh(e).userDuring;return o.duration>0&&(o.during=s?le(whe,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),J(o,r[a]),o}function Am(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=lh(t),u=e.style;l.userDuring=e.during;var c={},h={};if(Che(t,e,h),t.type==="compound")for(var f=t.shape.paths,d=e.shape.paths,p=0;p<d.length;p++){var g=d[p];AS("shape",g,f[p])}else AS("shape",e,h),AS("extra",e,h);if(!a&&s&&(The(t,e,c),ZR("shape",t,e,c),ZR("extra",t,e,c),Mhe(t,e,u,c)),h.style=u,_he(t,h,o),She(t,e),s)if(a){var m={};R(t0,function(_){var S=_?e[_]:e;S&&S.enterFrom&&(_&&(m[_]=m[_]||{}),J(_?m[_]:m,S.enterFrom))});var y=wA("enter",t,e,r,i);y.duration>0&&t.animateFrom(m,y)}else xhe(t,e,i||0,r,c);yH(t,e),u?t.dirty():t.markRedraw()}function yH(t,e){for(var r=lh(t).leaveToProps,n=0;n<t0.length;n++){var i=t0[n],a=i?e[i]:e;a&&a.leaveTo&&(r||(r=lh(t).leaveToProps={}),i&&(r[i]=r[i]||{}),J(i?r[i]:r,a.leaveTo))}}function y_(t,e,r,n){if(t){var i=t.parent,a=lh(t).leaveToProps;if(a){var o=wA("update",t,e,r,0);o.done=function(){i&&i.remove(t)},t.animateTo(a,o)}else i&&i.remove(t)}}function Vl(t){return t==="all"}function _he(t,e,r){var n=e.style;if(!t.isGroup&&n){if(r){t.useStyle({});for(var i=t.animators,a=0;a<i.length;a++){var o=i[a];o.targetName==="style"&&o.changeTarget(t.style)}}t.setStyle(n)}e&&(e.style=null,e&&t.attr(e),e.style=n)}function xhe(t,e,r,n,i){if(i){var a=wA("update",t,e,n,r);a.duration>0&&t.animateFrom(i,a)}}function She(t,e){he(e,"silent")&&(t.silent=e.silent),he(e,"ignore")&&(t.ignore=e.ignore),t instanceof fi&&he(e,"invisible")&&(t.invisible=e.invisible),t instanceof Ue&&he(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var ra={},bhe={setTransform:function(t,e){return ra.el[t]=e,this},getTransform:function(t){return ra.el[t]},setShape:function(t,e){var r=ra.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){var e=ra.el.shape;if(e)return e[t]},setStyle:function(t,e){var r=ra.el,n=r.style;return n&&(n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){var e=ra.el.style;if(e)return e[t]},setExtra:function(t,e){var r=ra.el.extra||(ra.el.extra={});return r[t]=e,this},getExtra:function(t){var e=ra.el.extra;if(e)return e[t]}};function whe(){var t=this,e=t.el;if(e){var r=lh(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}ra.el=e,n(bhe)}}function ZR(t,e,r,n){var i=r[t];if(i){var a=e[t],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[t]={}),Vl(l))J(o,a);else for(var u=gt(l),c=0;c<u.length;c++){var h=u[c],f=a[h];o[h]=f}else if(Vl(s)||Ee(s,t)>=0){!o&&(o=n[t]={});for(var d=$e(a),c=0;c<d.length;c++){var h=d[c],f=a[h];Ahe(i[h],f)&&(o[h]=f)}}}}}function AS(t,e,r){var n=e[t];if(n)for(var i=r[t]={},a=$e(n),o=0;o<a.length;o++){var s=a[o];i[s]=pd(n[s])}}function The(t,e,r){for(var n=e.transition,i=Vl(n)?ba:gt(n||[]),a=0;a<i.length;a++){var o=i[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=t[o];r[o]=s}}}function Che(t,e,r){for(var n=0;n<UR.length;n++){var i=UR[n],a=mH[i],o=e[i];o&&(r[a[0]]=o[0],r[a[1]]=o[1])}for(var n=0;n<ba.length;n++){var s=ba[n];e[s]!=null&&(r[s]=e[s])}}function Mhe(t,e,r,n){if(r){var i=t.style,a;if(i){var o=r.transition,s=e.transition;if(o&&!Vl(o)){var l=gt(o);!a&&(a=n.style={});for(var u=0;u<l.length;u++){var c=l[u],h=i[c];a[c]=h}}else if(t.getAnimationStyleProps&&(Vl(s)||Vl(o)||Ee(s,"style")>=0)){var f=t.getAnimationStyleProps(),d=f?f.style:null;if(d){!a&&(a=n.style={});for(var p=$e(r),u=0;u<p.length;u++){var c=p[u];if(d[c]){var h=i[c];a[c]=h}}}}}}}function Ahe(t,e){return Nr(t)?t!==e:t!=null&&isFinite(t)}var _H=Fe(),Lhe=["percent","easing","shape","style","extra"];function xH(t){t.stopAnimation("keyframe"),t.attr(_H(t))}function r0(t,e,r){if(!(!r.isAnimationEnabled()||!e)){if(ee(e)){R(e,function(s){r0(t,s,r)});return}var n=e.keyframes,i=e.duration;if(r&&i==null){var a=xh("enter",r,0);i=a&&a.duration}if(!(!n||!i)){var o=_H(t);R(t0,function(s){if(!(s&&!t[s])){var l;n.sort(function(u,c){return u.percent-c.percent}),R(n,function(u){var c=t.animators,h=s?u[s]:u;if(h){var f=$e(h);if(s||(f=tt(f,function(g){return Ee(Lhe,g)<0})),!!f.length){l||(l=t.animate(s,e.loop,!0),l.scope="keyframe");for(var d=0;d<c.length;d++)c[d]!==l&&c[d].targetName===l.targetName&&c[d].stopTracks(f);s&&(o[s]=o[s]||{});var p=s?o[s]:o;R(f,function(g){p[g]=((s?t[s]:t)||{})[g]}),l.whenWithKeys(i*u.percent,h,f,u.easing)}}}),l&&l.delay(e.delay||0).duration(i).start(e.easing)}})}}}var no="emphasis",Xo="normal",TA="blur",CA="select",ws=[Xo,no,TA,CA],LS={normal:["itemStyle"],emphasis:[no,"itemStyle"],blur:[TA,"itemStyle"],select:[CA,"itemStyle"]},PS={normal:["label"],emphasis:[no,"label"],blur:[TA,"label"],select:[CA,"label"]},Phe=["x","y"],khe="e\0\0",Zn={normal:{},emphasis:{},blur:{},select:{}},Dhe={cartesian2d:che,geo:fhe,single:vhe,polar:ghe,calendar:mhe,matrix:yhe};function VT(t){return t instanceof Ue}function FT(t){return t instanceof fi}function Ihe(t,e){e.copyTransform(t),FT(e)&&FT(t)&&(e.setStyle(t.style),e.z=t.z,e.z2=t.z2,e.zlevel=t.zlevel,e.invisible=t.invisible,e.ignore=t.ignore,VT(e)&&VT(t)&&e.setShape(t.shape))}var Ehe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i,a){this._progressiveEls=null;var o=this._data,s=r.getData(),l=this.group,u=$R(r,s,n,i);o||l.removeAll(),s.diff(o).add(function(h){kS(i,null,h,u(h,a),r,l,s)}).remove(function(h){var f=o.getItemGraphicEl(h);f&&y_(f,ro(f).option,r)}).update(function(h,f){var d=o.getItemGraphicEl(f);kS(i,d,h,u(h,a),r,l,s)}).execute();var c=r.get("clip",!0)?Kv(r.coordinateSystem,!1,r):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(r,n,i,a,o){var s=n.getData(),l=$R(n,s,i,a),u=this._progressiveEls=[];function c(d){d.isGroup||(d.incremental=!0,d.ensureState("emphasis").hoverLayer=!0)}for(var h=r.start;h<r.end;h++){var f=kS(null,null,h,l(h,o),n,this.group,s);f&&(f.traverse(c),u.push(f))}},e.prototype.eachRendered=function(r){Ps(this._progressiveEls||this.group,r)},e.prototype.filterForExposedEvent=function(r,n,i,a){var o=n.element;if(o==null||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},e.type="custom",e}(lt);function MA(t){var e=t.type,r;if(e==="path"){var n=t.shape,i=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=wH(n);r=Qc(a,null,i,n.layout||"center"),ro(r).customPathData=a}else if(e==="image")r=new pr({}),ro(r).customImagePath=t.style.image;else if(e==="text")r=new Xe({});else if(e==="group")r=new _e;else if(e==="compoundPath"){var n=t.shape;if(!n||!n.paths){var o="";at(o)}var s=re(n.paths,function(c){if(c.type==="path")return Qc(c.shape.pathData,c,null);var h=nv(c.type);if(!h){var f="";at(f)}return new h});r=new Hv({shape:{paths:s}})}else{var l=nv(e);if(!l){var o="";at(o)}r=new l}return ro(r).customGraphicType=e,r.name=t.name,r.z2EmphasisLift=1,r.z2SelectLift=1,r}function AA(t,e,r,n,i,a,o){xH(e);var s=i&&i.normal.cfg;s&&e.setTextConfig(s),n&&n.transition==null&&(n.transition=Phe);var l=n&&n.style;if(l){if(e.type==="text"){var u=l;he(u,"textFill")&&(u.fill=u.textFill),he(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,h=VT(e)?l.decal:null;t&&h&&(h.dirty=!0,c=th(h,t)),l.__decalPattern=c}if(FT(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}Am(e,n,a,{dataIndex:r,isInit:o,clearStyle:!0}),r0(e,n.keyframeAnimation,a)}function SH(t,e,r,n,i){var a=e.isGroup?null:e,o=i&&i[t].cfg;if(a){var s=a.ensureState(t);if(n===!1){var l=a.getState(t);l&&(l.style=null)}else s.style=n||null;o&&(s.textConfig=o),Kl(a)}}function Nhe(t,e,r){if(!t.isGroup){var n=t,i=r.currentZ,a=r.currentZLevel;n.z=i,n.zlevel=a;var o=e.z2;o!=null&&(n.z2=o||0);for(var s=0;s<ws.length;s++)Rhe(n,e,ws[s])}}function Rhe(t,e,r){var n=r===Xo,i=n?e:n0(e,r),a=i?i.z2:null,o;a!=null&&(o=n?t:t.ensureState(r),o.z2=a||0)}function $R(t,e,r,n){var i=t.get("renderItem");if(typeof i=="string"){var a=Lee(i);a&&(i=a)}var o=t.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):Dhe[o.type](o));for(var l=Se({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:C,style:A,ordinalRawValue:M,styleEmphasis:k,visual:I,barLayout:z,currentSeriesIndices:O,font:V},s.api||{}),u={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:s.coordSys,dataInsideLength:e.count(),encode:Ohe(t.getData()),itemPayload:t.get("itemPayload")||{}},c,h,f={},d={},p={},g={},m=0;m<ws.length;m++){var y=ws[m];p[y]=t.getModel(LS[y]),g[y]=t.getModel(PS[y])}function _(G){return G===c?h||(h=e.getItemModel(G)):e.getItemModel(G)}function S(G,F){return e.hasItemOption?G===c?f[F]||(f[F]=_(G).getModel(LS[F])):_(G).getModel(LS[F]):p[F]}function T(G,F){return e.hasItemOption?G===c?d[F]||(d[F]=_(G).getModel(PS[F])):_(G).getModel(PS[F]):g[F]}return function(G,F){return c=G,h=null,f={},d={},i&&i(Se({dataIndexInside:G,dataIndex:e.getRawIndex(G),actionType:F?F.type:null},u),l)};function C(G,F){return F==null&&(F=c),e.getStore().get(e.getDimensionIndex(G||0),F)}function M(G,F){F==null&&(F=c),G=G||0;var U=e.getDimensionInfo(G);if(!U){var j=e.getDimensionIndex(G);return j>=0?e.getStore().get(j,F):void 0}var W=e.get(U.name,F),H=U&&U.ordinalMeta;return H?H.categories[W]:W}function A(G,F){F==null&&(F=c);var U=e.getItemVisual(F,"style"),j=U&&U.fill,W=U&&U.opacity,H=S(F,Xo).getItemStyle();j!=null&&(H.fill=j),W!=null&&(H.opacity=W);var X={inheritColor:se(j)?j:q.color.neutral99},K=T(F,Xo),ne=pt(K,null,X,!1,!0);ne.text=K.getShallow("show")?pe(t.getFormattedLabel(F,Xo),ih(e,F)):null;var ie=Ty(K,X,!1);return D(G,H),H=HR(H,ne,ie),G&&E(H,G),H.legacy=!0,H}function k(G,F){F==null&&(F=c);var U=S(F,no).getItemStyle(),j=T(F,no),W=pt(j,null,null,!0,!0);W.text=j.getShallow("show")?Sn(t.getFormattedLabel(F,no),t.getFormattedLabel(F,Xo),ih(e,F)):null;var H=Ty(j,null,!0);return D(G,U),U=HR(U,W,H),G&&E(U,G),U.legacy=!0,U}function E(G,F){for(var U in F)he(F,U)&&(G[U]=F[U])}function D(G,F){G&&(G.textFill&&(F.textFill=G.textFill),G.textPosition&&(F.textPosition=G.textPosition))}function I(G,F){if(F==null&&(F=c),he(FR,G)){var U=e.getItemVisual(F,"style");return U?U[FR[G]]:null}if(he(she,G))return e.getItemVisual(F,G)}function z(G){if(o.type==="cartesian2d"){var F=o.getBaseAxis();return Dte(Se({axis:F},G))}}function O(){return r.getCurrentSeriesIndices()}function V(G){return K2(G,r)}}function Ohe(t){var e={};return R(t.dimensions,function(r){var n=t.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=e[i]=e[i]||[];a[n.coordDimIndex]=t.getDimensionIndex(r)}}),e}function kS(t,e,r,n,i,a,o){if(!n){a.remove(e);return}var s=LA(t,e,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&wt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function LA(t,e,r,n,i,a){var o=-1,s=e;e&&bH(e,n,i)&&(o=Ee(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=MA(n),s&&Ihe(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Zn.normal.cfg=Zn.normal.conOpt=Zn.emphasis.cfg=Zn.emphasis.conOpt=Zn.blur.cfg=Zn.blur.conOpt=Zn.select.cfg=Zn.select.conOpt=null,Zn.isLegacy=!1,Bhe(u,r,n,i,l,Zn),zhe(u,r,n,i,l),AA(t,u,r,n,Zn,i,l),he(n,"info")&&(ro(u).info=n.info);for(var c=0;c<ws.length;c++){var h=ws[c];if(h!==Xo){var f=n0(n,h),d=PA(n,f,h);SH(h,u,f,d,Zn)}}return Nhe(u,n,i),n.type==="group"&&jhe(t,u,r,n,i),o>=0?a.replaceAt(u,o):a.add(u),u}function bH(t,e,r){var n=ro(t),i=e.type,a=e.shape,o=e.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&Hhe(a)&&wH(a)!==n.customPathData||i==="image"&&he(o,"image")&&o.image!==n.customImagePath}function zhe(t,e,r,n,i){var a=r.clipPath;if(a===!1)t&&t.getClipPath()&&t.removeClipPath();else if(a){var o=t.getClipPath();o&&bH(o,a,n)&&(o=null),o||(o=MA(a),t.setClipPath(o)),AA(null,o,e,a,null,n,i)}}function Bhe(t,e,r,n,i,a){if(!(t.isGroup||t.type==="compoundPath")){YR(r,null,a),YR(r,no,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 c=t.getTextContent();if(o===!1)c&&t.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=MA(o),t.setTextContent(c)),AA(null,c,e,o,null,n,i);for(var h=o&&o.style,f=0;f<ws.length;f++){var d=ws[f];if(d!==Xo){var p=a[d].conOpt;SH(d,c,p,PA(o,p,d),null)}}h?c.dirty():c.markRedraw()}}}}function YR(t,e,r){var n=e?n0(t,e):t,i=e?PA(t,n,no):t.style,a=t.type,o=n?n.textConfig:null,s=t.textContent,l=s?e?n0(s,e):s:null;if(i&&(r.isLegacy||pH(i,a,!!o,!!l))){r.isLegacy=!0;var u=gH(i,a,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var h=e?r[e]:r.normal;h.cfg=o,h.conOpt=l}function n0(t,e){return e?t?t[e]:null:t}function PA(t,e,r){var n=e&&e.style;return n==null&&r===no&&t&&(n=t.styleEmphasis),n}function jhe(t,e,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){Fhe({api:t,oldChildren:e.children()||[],newChildren:a||[],dataIndex:r,seriesModel:i,group:e});return}u&&e.removeAll();for(var c=0;c<o;c++){var h=a[c],f=e.childAt(c);h?(h.ignore==null&&(h.ignore=!1),LA(t,f,r,h,i,e)):f.ignore=!0}for(var d=e.childCount()-1;d>=c;d--){var p=e.childAt(d);Vhe(e,p,i)}}}function Vhe(t,e,r){e&&y_(e,ro(t).option,r)}function Fhe(t){new vo(t.oldChildren,t.newChildren,XR,XR,t).add(qR).update(qR).remove(Ghe).execute()}function XR(t,e){var r=t&&t.name;return r??khe+e}function qR(t,e){var r=this.context,n=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;LA(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function Ghe(t){var e=this.context,r=e.oldChildren[t];r&&y_(r,ro(r).option,e.seriesModel)}function wH(t){return t&&(t.pathData||t.d)}function Hhe(t){return t&&(he(t,"pathData")||he(t,"d"))}function Whe(t){t.registerChartView(Ehe),t.registerSeriesModel(lhe)}var xl=Fe(),KR=ye,DS=le,kA=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,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,e,r,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new _e,this.createPointerEl(s,u,e,r),this.createLabelEl(s,u,e,r),n.getZr().add(s);else{var f=Ie(QR,r,h);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,r)}eO(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),i=e.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=KM(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,i,a){},t.prototype.createPointerEl=function(e,r,n,i){var a=r.pointer;if(a){var o=xl(e).pointerEl=new cu[a.type](KR(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=xl(e).labelEl=new Xe(KR(r.label));e.add(a),JR(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=xl(e).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,i){var a=xl(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),JR(a,i))},t.prototype._renderHandle=function(e){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=Sh(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){co(u.event)},onmousedown:DS(this._onHandleDragMove,this,0,0),drift:DS(this._onHandleDragMove,this),ondragend:DS(this._onHandleDragEnd,this)}),n.add(i)),eO(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ee(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Ah(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){QR(this._axisPointerModel,!r&&this._moveAnimation,this._handle,IS(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(IS(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(IS(i)),xl(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){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}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.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),sv(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function QR(t,e,r,n){TH(xl(r).lastProp,n)||(xl(r).lastProp=n,e?Qe(r,n,t):(r.stopAnimation(),r.attr(n)))}function TH(t,e){if(be(t)&&be(e)){var r=!0;return R(e,function(n,i){r=r&&TH(t[i],n)}),!!r}else return t===e}function JR(t,e){t[e.get(["label","show"])?"show":"hide"]()}function IS(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function eO(t,e,r){var n=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function DA(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function CH(t,e,r,n,i){var a=r.get("value"),o=MH(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Th(s.get("padding")||0),u=s.getFont(),c=G0(o,u),h=i.position,f=c.width+l[1]+l[3],d=c.height+l[0]+l[2],p=i.align;p==="right"&&(h[0]-=f),p==="center"&&(h[0]-=f/2);var g=i.verticalAlign;g==="bottom"&&(h[1]-=d),g==="middle"&&(h[1]-=d/2),Uhe(h,f,d,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:pt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function Uhe(t,e,r,n){var i=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function MH(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:i.precision}),o=i.formatter;if(o){var s={value:By(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};R(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,h=u&&u.getDataParams(c);h&&s.seriesData.push(h)}),se(o)?a=o.replace("{value}",a):me(o)&&(a=o(s))}return a}function IA(t,e,r){var n=fr();return _o(n,n,r.rotation),zi(n,n,r.position),Ni([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function AH(t,e,r,n,i,a){var o=on.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),CH(e,n,i,a,{position:IA(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function EA(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function LH(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function tO(t,e,r,n,i,a){return{cx:t,cy:e,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var Zhe=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=rO(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var f=DA(a),d=$he[u](s,h,c);d.style=f,r.graphicKey=d.type,r.pointer=d}var p=Yy(l.getRect(),i);AH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=Yy(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=IA(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=rO(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,h=[r.x,r.y];h[c]+=n[c],h[c]=Math.min(l[1],h[c]),h[c]=Math.max(l[0],h[c]);var f=(u[1]+u[0])/2,d=[f,f];d[c]=h[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:r.rotation,cursorPoint:d,tooltipOption:p[c]}},e}(kA);function rO(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var $he={line:function(t,e,r){var n=EA([e,r[0]],[e,r[1]],nO(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:LH([e-n/2,r[0]],[n,i],nO(t))}}};function nO(t){return t.dim==="x"?0:1}var Yhe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:q.color.border,width:1,type:"dashed"},shadowStyle:{color:q.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:q.color.neutral00,padding:[5,7,5,7],backgroundColor:q.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:q.color.accent40,throttle:40}},e}(Ve),Ka=Fe(),Xhe=R;function PH(t,e,r){if(!Ze.node){var n=e.getZr();Ka(n).records||(Ka(n).records={}),qhe(n,e);var i=Ka(n).records[t]||(Ka(n).records[t]={});i.handler=r}}function qhe(t,e){if(Ka(t).initialized)return;Ka(t).initialized=!0,r("click",Ie(iO,"click")),r("mousemove",Ie(iO,"mousemove")),r("globalout",Qhe);function r(n,i){t.on(n,function(a){var o=Jhe(e);Xhe(Ka(t).records,function(s){s&&i(s,a,o.dispatchAction)}),Khe(o.pendings,e)})}}function Khe(t,e){var r=t.showTip.length,n=t.hideTip.length,i;r?i=t.showTip[r-1]:n&&(i=t.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function Qhe(t,e,r){t.handler("leave",null,r)}function iO(t,e,r,n){e.handler(t,r,n)}function Jhe(t){var e={showTip:[],hideTip:[]},r=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function GT(t,e){if(!Ze.node){var r=e.getZr(),n=(Ka(r).records||{})[t];n&&(Ka(r).records[t]=null)}}var efe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";PH("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(r,n){GT("axisPointer",n)},e.prototype.dispose=function(r,n){GT("axisPointer",n)},e.type="axisPointer",e}(mt);function kH(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Xl(a,t);if(o==null||o<0||ee(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),h=c.dim,f=u.dim,d=h==="x"||h==="radius"?1:0,p=a.mapDimension(f),g=[];g[d]=a.get(p,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(g)||[]}else r=l.dataToPoint(a.getValues(re(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var aO=Fe();function tfe(t,e,r){var n=t.currTrigger,i=[t.x,t.y],a=t,o=t.dispatchAction||le(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Lm(i)&&(i=kH({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Lm(i),u=a.axesInfo,c=s.axesInfo,h=n==="leave"||Lm(i),f={},d={},p={list:[],map:{}},g={showPointer:Ie(nfe,d),showTooltip:Ie(ife,p)};R(s.coordSysMap,function(y,_){var S=l||y.containPoint(i);R(s.coordSysAxesInfo[_],function(T,C){var M=T.axis,A=lfe(u,T);if(!h&&S&&(!u||A)){var k=A&&A.value;k==null&&!l&&(k=M.pointToData(i)),k!=null&&oO(T,k,g,!1,f)}})});var m={};return R(c,function(y,_){var S=y.linkGroup;S&&!d[_]&&R(S.axesInfo,function(T,C){var M=d[C];if(T!==y&&M){var A=M.value;S.mapper&&(A=y.axis.scale.parse(S.mapper(A,sO(T),sO(y)))),m[y.key]=A}})}),R(m,function(y,_){oO(c[_],y,g,!0,f)}),afe(d,c,f),ofe(p,i,t,o),sfe(c,o,r),f}}function oO(t,e,r,n,i){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=rfe(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&J(i,s[0]),!n&&t.snap&&a.containData(l)&&l!=null&&(e=l),r.showPointer(t,e,s),r.showTooltip(t,o,l)}}function rfe(t,e){var r=e.axis,n=r.dim,i=t,a=[],o=Number.MAX_VALUE,s=-1;return R(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),h,f;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,t,r);f=d.dataIndices,h=d.nestestValue}else{if(f=l.indicesOfNearest(n,c[0],t,r.type==="category"?.5:null),!f.length)return;h=l.getData().get(c[0],f[0])}if(!(h==null||!isFinite(h))){var p=t-h,g=Math.abs(p);g<=o&&((g<o||p>=0&&s<0)&&(o=g,s=p,i=h,a.length=0),R(f,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:i}}function nfe(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function ife(t,e,r,n){var i=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=gv(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.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 afe(t,e,r){var n=r.axesInfo=[];R(e,function(i,a){var o=i.axisPointerModel.option,s=t[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 ofe(t,e,r,n){if(Lm(e)||!t.list.length){n({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function sfe(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=aO(n)[i]||{},o=aO(n)[i]={};R(t,function(u,c){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&R(h.seriesDataIndices,function(f){var d=f.seriesIndex+" | "+f.dataIndex;o[d]=f})});var s=[],l=[];R(a,function(u,c){!o[c]&&l.push(u)}),R(o,function(u,c){!a[c]&&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 lfe(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function sO(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function Lm(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function ep(t){vu.registerAxisPointerClass("CartesianAxisPointer",Zhe),t.registerComponentModel(Yhe),t.registerComponentView(efe),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!ee(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=uae(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},tfe)}function ufe(t){ze(e6),ze(ep)}var cfe=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.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),c=u.getExtent(),h=s.dataToCoord(n),f=a.get("type");if(f&&f!=="none"){var d=DA(a),p=ffe[f](s,l,h,c);p.style=d,r.graphicKey=p.type,r.pointer=p}var g=a.get(["label","margin"]),m=hfe(n,i,a,l,g);CH(r,i,a,o,m)},e}(kA);function hfe(t,e,r,n,i){var a=e.axis,o=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,h;if(a.dim==="radius"){var f=fr();_o(f,f,s),zi(f,f,[n.cx,n.cy]),u=Ni([o,-i],f);var d=e.getModel("axisLabel").get("rotate")||0,p=on.innerTextLayout(s,d*Math.PI/180,-1);c=p.textAlign,h=p.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var m=n.cx,y=n.cy;c=Math.abs(u[0]-m)/g<.3?"center":u[0]>m?"left":"right",h=Math.abs(u[1]-y)/g<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:h}}var ffe={line:function(t,e,r,n){return t.dim==="angle"?{type:"Line",shape:EA(e.coordToPoint([n[0],r]),e.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,n){var i=Math.max(1,t.getBandWidth()),a=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:tO(e.cx,e.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:tO(e.cx,e.cy,r-i/2,r+i/2,0,Math.PI*2)}}},dfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Ve),NA=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",kt).models[0]},e.type="polarAxis",e}(Ve);Bt(NA,Dh);var vfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="angleAxis",e}(NA),pfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="radiusAxis",e}(NA),RA=function(t){Y(e,t);function e(r,n){return t.call(this,"radius",r,n)||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e}(gi);RA.prototype.dataToRadius=gi.prototype.dataToCoord;RA.prototype.radiusToData=gi.prototype.coordToData;var gfe=Fe(),OA=function(t){Y(e,t);function e(r,n){return t.call(this,"angle",r,n||[0,360])||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e.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),c=G0(s==null?"":s+"",n.getFont(),"center","top"),h=Math.max(c.height,7),f=h/u;isNaN(f)&&(f=1/0);var d=Math.max(0,Math.floor(f)),p=gfe(r.model),g=p.lastAutoInterval,m=p.lastTickCount;return g!=null&&m!=null&&Math.abs(g-d)<=1&&Math.abs(m-o)<=1&&g>d?d=g:(p.lastTickCount=o,p.lastAutoInterval=d),d},e}(gi);OA.prototype.dataToAngle=gi.prototype.dataToCoord;OA.prototype.angleToData=gi.prototype.coordToData;var DH=["radius","angle"],mfe=function(){function t(e){this.dimensions=DH,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new RA,this._angleAxis=new OA,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(e){var r=this.pointToCoord(e);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},t.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},t.prototype.getAxis=function(e){var r="_"+e+"Axis";return this[r]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(e){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&r.push(n),i.scale.type===e&&r.push(i),r},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(e){var r=this._angleAxis;return e===r?this._radiusAxis:r},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(e){var r=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},t.prototype.dataToPoint=function(e,r,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],r),this._angleAxis.dataToAngle(e[1],r)],n)},t.prototype.pointToData=function(e,r,n){n=n||[];var i=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(i[0],r),n[1]=this._angleAxis.angleToData(i[1],r),n},t.prototype.pointToCoord=function(e){var r=e[0]-this.cx,n=e[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,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},t.prototype.coordToPoint=function(e,r){r=r||[];var n=e[0],i=e[1]/180*Math.PI;return r[0]=Math.cos(i)*n+this.cx,r[1]=-Math.sin(i)*n+this.cy,r},t.prototype.getArea=function(){var e=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=e.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,h=u*u+c*c,f=this.r,d=this.r0;return f!==d&&h-o<=f*f&&h+o>=d*d},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},t.prototype.convertToPixel=function(e,r,n){var i=lO(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=lO(r);return i===this?this.pointToData(n):null},t}();function lO(t){var e=t.seriesModel,r=t.polarModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function yfe(t,e,r){var n=e.get("center"),i=sr(e,r).refContainer;t.cx=oe(n[0],i.width)+i.x,t.cy=oe(n[1],i.height)+i.y;var a=t.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:ee(s)||(s=[0,s]);var l=[oe(s[0],o),oe(s[1],o)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}function _fe(t,e){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();R(jy(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),R(jy(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),tu(n.scale,n.model),tu(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 xfe(t){return t.mainType==="angleAxis"}function uO(t,e){var r;if(t.type=e.get("type"),t.scale=Yv(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),xfe(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle"),i=(r=e.get("endAngle"))!==null&&r!==void 0?r:n+(t.inverse?-360:360);t.setExtent(n,i)}e.axis=t,t.model=e}var Sfe={dimensions:DH,create:function(t,e){var r=[];return t.eachComponent("polar",function(n,i){var a=new mfe(i+"");a.update=_fe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");uO(o,l),uO(s,u),yfe(a,n,e),r.push(a),n.coordinateSystem=a,a.model=n}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",kt).models[0];n.coordinateSystem=i.coordinateSystem}}),r}},bfe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Bg(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],r]),i=t.coordToPoint([e[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function jg(t){var e=t.getRadiusAxis();return e.inverse?0:1}function cO(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}var wfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="PolarAxisPointer",r}return e.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({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=re(i.getViewLabels(),function(c){c=ye(c);var h=i.scale,f=h.type==="ordinal"?h.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(f),c});cO(u),cO(s),R(bfe,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&Tfe[c](this.group,r,a,s,l,o,u)},this)}},e.type="angleAxis",e}(vu),Tfe={axisLine:function(t,e,r,n,i,a){var o=e.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=jg(r),h=c?0:1,f,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[h]===0?f=new cu[d]({shape:{cx:r.cx,cy:r.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):f=new yh({shape:{cx:r.cx,cy:r.cy,r:a[c],r0:a[h]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,t.add(f)},axisTick:function(t,e,r,n,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[jg(r)],u=re(n,function(c){return new Wt({shape:Bg(r,[l,l+s],c.coord)})});t.add(Ln(u,{style:Se(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,r,n,i,a){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[jg(r)],c=[],h=0;h<i.length;h++)for(var f=0;f<i[h].length;f++)c.push(new Wt({shape:Bg(r,[u,u+l],i[h][f].coord)}));t.add(Ln(c,{style:Se(s.getModel("lineStyle").getLineStyle(),Se(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(t,e,r,n,i,a,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");R(o,function(h,f){var d=l,p=h.tickValue,g=a[jg(r)],m=r.coordToPoint([g+u,h.coord]),y=r.cx,_=r.cy,S=Math.abs(m[0]-y)/g<.3?"center":m[0]>y?"left":"right",T=Math.abs(m[1]-_)/g<.3?"middle":m[1]>_?"top":"bottom";if(s&&s[p]){var C=s[p];be(C)&&C.textStyle&&(d=new We(C.textStyle,l,l.ecModel))}var M=new Xe({silent:on.isLabelSilent(e),style:pt(d,{x:m[0],y:m[1],fill:d.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:S,verticalAlign:T})});if(t.add(M),So({el:M,componentModel:e,itemName:h.formattedLabel,formatterParamsExtra:{isTruncated:function(){return M.isTruncated},value:h.rawLabel,tickIndex:f}}),c){var A=on.makeAxisEventDataBase(e);A.targetType="axisLabel",A.value=h.rawLabel,Le(M).eventData=A}},this)},splitLine:function(t,e,r,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=0;h<n.length;h++){var f=u++%l.length;c[f]=c[f]||[],c[f].push(new Wt({shape:Bg(r,a,n[h].coord)}))}for(var h=0;h<c.length;h++)t.add(Ln(c[h],{style:Se({stroke:l[h%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(t,e,r,n,i,a){if(i.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<i.length;u++)for(var c=0;c<i[u].length;c++)l.push(new Wt({shape:Bg(r,a,i[u][c].coord)}));t.add(Ln(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(t,e,r,n,i,a){if(n.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=Math.PI/180,f=-n[0].coord*h,d=Math.min(a[0],a[1]),p=Math.max(a[0],a[1]),g=e.get("clockwise"),m=1,y=n.length;m<=y;m++){var _=m===y?n[0].coord:n[m].coord,S=u++%l.length;c[S]=c[S]||[],c[S].push(new Or({shape:{cx:r.cx,cy:r.cy,r0:d,r:p,startAngle:f,endAngle:-_*h,clockwise:g},silent:!0})),f=-_*h}for(var m=0;m<c.length;m++)t.add(Ln(c[m],{style:Se({fill:l[m%l.length]},s.getAreaStyle()),silent:!0}))}}},Cfe=["splitLine","splitArea","minorSplitLine"],Mfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="PolarAxisPointer",r}return e.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this._axisGroup,o=this._axisGroup=new _e;this.group.add(o);var s=r.axis,l=s.polar,u=l.getAngleAxis(),c=s.getTicksCoords(),h=s.getMinorTicksCoords(),f=u.getExtent()[0],d=s.getExtent(),p=Lfe(l,r,f),g=new on(r,i,p);g.build(),o.add(g.group),Wv(a,o,r),R(Cfe,function(m){r.get([m,"show"])&&!s.scale.isBlank()&&Afe[m](this.group,r,l,f,d,c,h)},this)}},e.type="radiusAxis",e}(vu),Afe={splitLine:function(t,e,r,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=r.getAngleAxis(),h=Math.PI/180,f=c.getExtent(),d=Math.abs(f[1]-f[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var p=[],g=0;g<a.length;g++){var m=u++%l.length;p[m]=p[m]||[],p[m].push(new cu[d]({shape:{cx:r.cx,cy:r.cy,r:Math.max(a[g].coord,0),startAngle:-f[0]*h,endAngle:-f[1]*h,clockwise:c.inverse}}))}for(var g=0;g<p.length;g++)t.add(Ln(p[g],{style:Se({stroke:l[g%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(t,e,r,n,i,a,o){if(o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var h=0;h<o[c].length;h++)u.push(new Pa({shape:{cx:r.cx,cy:r.cy,r:o[c][h].coord}}));t.add(Ln(u,{style:Se({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(t,e,r,n,i,a){if(a.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=a[0].coord,f=1;f<a.length;f++){var d=u++%l.length;c[d]=c[d]||[],c[d].push(new Or({shape:{cx:r.cx,cy:r.cy,r0:h,r:a[f].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),h=a[f].coord}for(var f=0;f<c.length;f++)t.add(Ln(c[f],{style:Se({fill:l[f%l.length]},s.getAreaStyle()),silent:!0}))}}};function Lfe(t,e,r){return{position:[t.cx,t.cy],rotation:r/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function IH(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function EH(t,e){return e.dim+t.model.componentIndex}function Pfe(t,e,r){var n={},i=kfe(tt(e.getSeriesByType(t),function(a){return!e.isSeriesFiltered(a)&&a.coordinateSystem&&a.coordinateSystem.type==="polar"}));e.eachSeriesByType(t,function(a){if(a.coordinateSystem.type==="polar"){var o=a.getData(),s=a.coordinateSystem,l=s.getBaseAxis(),u=EH(s,l),c=IH(a),h=i[u][c],f=h.offset,d=h.width,p=s.getOtherAxis(l),g=a.coordinateSystem.cx,m=a.coordinateSystem.cy,y=a.get("barMinHeight")||0,_=a.get("barMinAngle")||0;n[c]=n[c]||[];for(var S=o.mapDimension(p.dim),T=o.mapDimension(l.dim),C=po(o,S),M=l.dim!=="radius"||!a.get("roundCap",!0),A=p.model,k=A.get("startValue"),E=p.dataToCoord(k||0),D=0,I=o.count();D<I;D++){var z=o.get(S,D),O=o.get(T,D),V=z>=0?"p":"n",G=E;C&&(n[c][O]||(n[c][O]={p:E,n:E}),G=n[c][O][V]);var F=void 0,U=void 0,j=void 0,W=void 0;if(p.dim==="radius"){var H=p.dataToCoord(z)-E,X=l.dataToCoord(O);Math.abs(H)<y&&(H=(H<0?-1:1)*y),F=G,U=G+H,j=X-f,W=j-d,C&&(n[c][O][V]=U)}else{var K=p.dataToCoord(z,M)-E,ne=l.dataToCoord(O);Math.abs(K)<_&&(K=(K<0?-1:1)*_),F=ne+f,U=F+d,j=G,W=G+K,C&&(n[c][O][V]=W)}o.setItemLayout(D,{cx:g,cy:m,r0:F,r:U,startAngle:-j*Math.PI/180,endAngle:-W*Math.PI/180,clockwise:j>=W})}}})}function kfe(t){var e={};R(t,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=EH(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),h=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=h.stacks;e[l]=h;var d=IH(n);f[d]||h.autoWidthCount++,f[d]=f[d]||{width:0,maxWidth:0};var p=oe(n.get("barWidth"),c),g=oe(n.get("barMaxWidth"),c),m=n.get("barGap"),y=n.get("barCategoryGap");p&&!f[d].width&&(p=Math.min(h.remainedWidth,p),f[d].width=p,h.remainedWidth-=p),g&&(f[d].maxWidth=g),m!=null&&(h.gap=m),y!=null&&(h.categoryGap=y)});var r={};return R(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=oe(n.categoryGap,o),l=oe(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),R(a,function(g,m){var y=g.maxWidth;y&&y<h&&(y=Math.min(y,u),g.width&&(y=Math.min(y,g.width)),u-=y,g.width=y,c--)}),h=(u-s)/(c+(c-1)*l),h=Math.max(h,0);var f=0,d;R(a,function(g,m){g.width||(g.width=h),d=g,f+=g.width*(1+l)}),d&&(f-=d.width*l);var p=-f/2;R(a,function(g,m){r[i][m]=r[i][m]||{offset:p,width:g.width},p+=g.width*(1+l)})}),r}var Dfe={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},Ife={splitNumber:5},Efe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="polar",e}(mt);function Nfe(t){ze(ep),vu.registerAxisPointerClass("PolarAxisPointer",cfe),t.registerCoordinateSystem("polar",Sfe),t.registerComponentModel(dfe),t.registerComponentView(Efe),ah(t,"angle",vfe,Dfe),ah(t,"radius",pfe,Ife),t.registerComponentView(wfe),t.registerComponentView(Mfe),t.registerLayout(Ie(Pfe,"bar"))}function HT(t,e){e=e||{};var r=t.coordinateSystem,n=t.axis,i={},a=n.position,o=n.orient,s=r.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[a]:l[0],o==="horizontal"?u.horizontal[a]:l[3]];var c={horizontal:0,vertical:1};i.rotation=Math.PI/2*c[o];var h={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=h[a],t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),br(e.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var f=t.get(["axisLabel","rotate"]);return i.labelRotate=a==="top"?-f:f,i.z2=1,i}var Rfe=["splitArea","splitLine","breakArea"],Ofe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="SingleAxisPointer",r}return e.prototype.render=function(r,n,i,a){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new _e;var l=HT(r),u=new on(r,i,l);u.build(),o.add(this._axisGroup),o.add(u.group),R(Rfe,function(c){r.get([c,"show"])&&zfe[c](this,this.group,this._axisGroup,r,i)},this),Wv(s,this._axisGroup,r),t.prototype.render.call(this,r,n,i,a)},e.prototype.remove=function(){KG(this)},e.type="singleAxis",e}(vu),zfe={splitLine:function(t,e,r,n,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color");l=l instanceof Array?l:[l];for(var u=s.get("width"),c=n.coordinateSystem.getRect(),h=a.isHorizontal(),f=[],d=0,p=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),g=[],m=[],y=0;y<p.length;++y){var _=a.toGlobalCoord(p[y].coord);h?(g[0]=_,g[1]=c.y,m[0]=_,m[1]=c.y+c.height):(g[0]=c.x,g[1]=_,m[0]=c.x+c.width,m[1]=_);var S=new Wt({shape:{x1:g[0],y1:g[1],x2:m[0],y2:m[1]},silent:!0});Jc(S.shape,u);var T=d++%l.length;f[T]=f[T]||[],f[T].push(S)}for(var C=s.getLineStyle(["color"]),y=0;y<f.length;++y)e.add(Ln(f[y],{style:Se({stroke:l[y%l.length]},C),silent:!0}))}},splitArea:function(t,e,r,n,i){qG(t,r,n,n)},breakArea:function(t,e,r,n,i){var a=Jv(),o=n.axis.scale;a&&o.type!=="ordinal"&&a.rectCoordBuildBreakAxis(e,t,n,n.coordinateSystem.getRect(),i)}},Pm=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}},jitter:0,jitterOverlap:!0,jitterMargin:2},e}(Ve);Bt(Pm,Dh.prototype);var Bfe=function(t){Y(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.pointToData=function(r,n){return this.coordinateSystem.pointToData(r)[0]},e}(gi),NH=["single"],jfe=function(){function t(e,r,n){this.type="single",this.dimension="single",this.dimensions=NH,this.axisPointerEnabled=!0,this.model=e,this._init(e,r,n)}return t.prototype._init=function(e,r,n){var i=this.dimension,a=new Bfe(i,Yv(e),[0,0],e.get("type"),e.get("position")),o=a.type==="category";a.onBand=o&&e.get("boundaryGap"),a.inverse=e.get("inverse"),a.orient=e.get("orient"),e.axis=a,a.model=e,a.coordinateSystem=this,this._axis=a},t.prototype.update=function(e,r){e.eachSeries(function(n){if(n.coordinateSystem===this){var i=n.getData();R(i.mapDimensionsAll(this.dimension),function(a){this._axis.scale.unionExtentFromData(i,a)},this),tu(this._axis.scale,this._axis.model)}},this)},t.prototype.resize=function(e,r){var n=sr(e,r).refContainer;this._rect=bt(e.getBoxLayoutParams(),n),this._adjustAxis()},t.prototype.getRect=function(){return this._rect},t.prototype._adjustAxis=function(){var e=this._rect,r=this._axis,n=r.isHorizontal(),i=n?[0,e.width]:[0,e.height],a=r.inverse?1:0;r.setExtent(i[a],i[1-a]),this._updateAxisTransform(r,n?e.x:e.y)},t.prototype._updateAxisTransform=function(e,r){var n=e.getExtent(),i=n[0]+n[1],a=e.isHorizontal();e.toGlobalCoord=a?function(o){return o+r}:function(o){return i-o+r},e.toLocalCoord=a?function(o){return o-r}:function(o){return i-o+r}},t.prototype.getAxis=function(){return this._axis},t.prototype.getBaseAxis=function(){return this._axis},t.prototype.getAxes=function(){return[this._axis]},t.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},t.prototype.containPoint=function(e){var r=this.getRect(),n=this.getAxis(),i=n.orient;return i==="horizontal"?n.contain(n.toLocalCoord(e[0]))&&e[1]>=r.y&&e[1]<=r.y+r.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=r.y&&e[0]<=r.y+r.height},t.prototype.pointToData=function(e,r,n){n=n||[];var i=this.getAxis();return n[0]=i.coordToData(i.toLocalCoord(e[i.orient==="horizontal"?0:1])),n},t.prototype.dataToPoint=function(e,r,n){var i=this.getAxis(),a=this.getRect();n=n||[];var o=i.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[o]=i.toGlobalCoord(i.dataToCoord(+e)),n[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,n},t.prototype.convertToPixel=function(e,r,n){var i=hO(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=hO(r);return i===this?this.pointToData(n):null},t}();function hO(t){var e=t.seriesModel,r=t.singleAxisModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function Vfe(t,e){var r=[];return t.eachComponent("singleAxis",function(n,i){var a=new jfe(n,t,e);a.name="single_"+i,a.resize(n,e),n.coordinateSystem=a,r.push(a)}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",kt).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var Ffe={create:Vfe,dimensions:NH},fO=["x","y"],Gfe=["width","height"],Hfe=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=ES(l,1-i0(s)),c=l.dataToPoint(n)[0],h=a.get("type");if(h&&h!=="none"){var f=DA(a),d=Wfe[h](s,c,u);d.style=f,r.graphicKey=d.type,r.pointer=d}var p=HT(i);AH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=HT(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=IA(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=i0(o),u=ES(s,l),c=[r.x,r.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var h=ES(s,1-l),f=(h[1]+h[0])/2,d=[f,f];return d[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},e}(kA),Wfe={line:function(t,e,r){var n=EA([e,r[0]],[e,r[1]],i0(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=t.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:LH([e-n/2,r[0]],[n,i],i0(t))}}};function i0(t){return t.isHorizontal()?0:1}function ES(t,e){var r=t.getRect();return[r[fO[e]],r[fO[e]]+r[Gfe[e]]]}var Ufe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="single",e}(mt);function Zfe(t){ze(ep),vu.registerAxisPointerClass("SingleAxisPointer",Hfe),t.registerComponentView(Ufe),t.registerComponentView(Ofe),t.registerComponentModel(Pm),ah(t,"single",Pm,Pm.defaultOption),t.registerCoordinateSystem("single",Ffe)}var $fe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n,i){var a=hu(r);t.prototype.init.apply(this,arguments),dO(r,a)},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),dO(this.option,r)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:q.color.axisLine,width:1,type:"solid"}},itemStyle:{color:q.color.neutral00,borderWidth:1,borderColor:q.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:q.size.s,color:q.color.secondary},monthLabel:{show:!0,position:"start",margin:q.size.s,align:"center",formatter:null,color:q.color.secondary},yearLabel:{show:!0,position:null,margin:q.size.xl,formatter:null,color:q.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Ve);function dO(t,e){var r=t.cellSize,n;ee(r)?n=r:n=t.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=re([0,1],function(a){return pQ(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});Ca(t,e,{type:"box",ignoreSize:i})}var Yfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.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)},e.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 c=a.dataToCalendarLayout([u],!1).tl,h=new Be({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(h)}},e.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=n.start,f=0;h.time<=n.end.time;f++){p(h.formatedDate),f===0&&(h=s.getDateInfo(n.start.y+"-"+n.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=s.getDateInfo(d)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToCalendarLayout([g],!1).tl);var m=o._getLinePointsOfOneWeek(r,g,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},e.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},e.prototype._drawSplitline=function(r,n,i){var a=new Tr({z2:20,shape:{points:r},style:n});i.add(a)},e.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),c=a.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(r,n){return se(r)&&r?lQ(r,n):me(r)?r(n):n.nameMap},e.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 c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.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]],c=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,f=i==="horizontal"?0:1,d={top:[c,u[f][1]],bottom:[c,u[1-f][1]],left:[u[1-f][0],h],right:[u[f][0],h]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var g=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:p},y=this._formatterLabel(g,m),_=new Xe({z2:30,style:pt(o,{text:y}),silent:o.get("silent")});_.attr(this._yearTextPositionControl(_,d[l],i,l,s)),a.add(_)}},e.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],c=r[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.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"),c=o.get("align"),h=[this._tlpoints,this._blpoints];(!s||se(s))&&(s&&(n=Bw(s)||n),s=n.get(["time","monthAbbr"])||[]);var f=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",g=o.get("silent"),m=0;m<h[f].length-1;m++){var y=h[f][m].slice(),_=this._firstDayOfMonth[m];if(p){var S=this._firstDayPoints[m];y[d]=(S[d]+h[0][m+1][d])/2}var T=o.get("formatter"),C=s[+_.m-1],M={yyyy:_.y,yy:(_.y+"").slice(2),MM:_.m,M:+_.m,nameMap:C},A=this._formatterLabel(T,M),k=new Xe({z2:30,style:J(pt(o,{text:A}),this._monthTextPositionControl(y,p,i,u,l)),silent:g});a.add(k)}}},e.prototype._weekTextPositionControl=function(r,n,i,a,o){var s="center",l="middle",u=r[0],c=r[1],h=i==="start";return n==="horizontal"?(u=u+a+(h?1:-1)*o[0]/2,s=h?"right":"left"):(c=c+a+(h?1:-1)*o[1]/2,l=h?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(r,n,i,a,o){var s=r.getModel("dayLabel");if(s.get("show")){var l=r.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),h=s.get("margin"),f=l.getFirstDayOfWeek();if(!c||se(c)){c&&(n=Bw(c)||n);var d=n.get(["time","dayOfWeekShort"]);c=d||re(n.get(["time","dayOfWeekAbbr"]),function(M){return M[0]})}var p=l.getNextNDay(i.end.time,7-i.lweek).time,g=[l.getCellWidth(),l.getCellHeight()];h=oe(h,Math.min(g[1],g[0])),u==="start"&&(p=l.getNextNDay(i.start.time,-(7+i.fweek)).time,h=-h);for(var m=s.get("silent"),y=0;y<7;y++){var _=l.getNextNDay(p,y),S=l.dataToCalendarLayout([_.time],!1).center,T=y;T=Math.abs((y+f)%7);var C=new Xe({z2:30,style:J(pt(s,{text:c[T]}),this._weekTextPositionControl(S,a,u,h,g)),silent:m});o.add(C)}}},e.type="calendar",e}(mt),NS=864e5,Xfe=function(){function t(e,r,n){this.type="calendar",this.dimensions=t.dimensions,this.getDimensionsInfo=t.getDimensionsInfo,this._model=e,this._update(r,n)}return t.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},t.prototype.getRangeInfo=function(){return this._rangeInfo},t.prototype.getModel=function(){return this._model},t.prototype.getRect=function(){return this._rect},t.prototype.getCellWidth=function(){return this._sw},t.prototype.getCellHeight=function(){return this._sh},t.prototype.getOrient=function(){return this._orient},t.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},t.prototype.getDateInfo=function(e){e=La(e);var r=e.getFullYear(),n=e.getMonth()+1,i=n<10?"0"+n:""+n,a=e.getDate(),o=a<10?"0"+a:""+a,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:r+"",m:i,d:o,day:s,time:e.getTime(),formatedDate:r+"-"+i+"-"+o,date:e}},t.prototype.getNextNDay=function(e,r){return r=r||0,r===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+r),this.getDateInfo(e))},t.prototype._update=function(e,r){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],a=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[n,7]:[7,n];R([0,1],function(h){c(a,h)&&(o[i[h]]=a[h]*s[h])});var l={width:r.getWidth(),height:r.getHeight()},u=this._rect=bt(o,l);R([0,1],function(h){c(a,h)||(a[h]=u[i[h]]/s[h])});function c(h,f){return h[f]!=null&&h[f]!=="auto"}this._sw=a[0],this._sh=a[1]},t.prototype.dataToPoint=function(e,r,n){n=n||[],ee(e)&&(e=e[0]),r==null&&(r=!0);var i=this.getDateInfo(e),a=this._rangeInfo,o=i.formatedDate;if(r&&!(i.time>=a.start.time&&i.time<a.end.time+NS))return n[0]=n[1]=NaN,n;var s=i.day,l=this._getRangeInfo([a.start.time,o]).nthWeek;return this._orient==="vertical"?(n[0]=this._rect.x+s*this._sw+this._sw/2,n[1]=this._rect.y+l*this._sh+this._sh/2):(n[0]=this._rect.x+l*this._sw+this._sw/2,n[1]=this._rect.y+s*this._sh+this._sh/2),n},t.prototype.pointToData=function(e){var r=this.pointToDate(e);return r&&r.time},t.prototype.dataToLayout=function(e,r,n){n=n||{};var i=n.rect=n.rect||{},a=n.contentRect=n.contentRect||{},o=this.dataToPoint(e,r);return i.x=o[0]-this._sw/2,i.y=o[1]-this._sh/2,i.width=this._sw,i.height=this._sh,Ce.copy(a,i),Ql(a,this._lineWidth/2,!0,!0),n},t.prototype.dataToCalendarLayout=function(e,r){var n=this.dataToPoint(e,r);return{center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},t.prototype.pointToDate=function(e){var r=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(n,r-1,i):this._getDateByWeeksAndDay(r,n-1,i)},t.prototype.convertToPixel=function(e,r,n){var i=RS(r);return i===this?i.dataToPoint(n):null},t.prototype.convertToLayout=function(e,r,n){var i=RS(r);return i===this?i.dataToLayout(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=RS(r);return i===this?i.pointToData(n):null},t.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},t.prototype._initRangeOption=function(){var e=this._model.get("range"),r;if(ee(e)&&e.length===1&&(e=e[0]),ee(e))r=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(r=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var i=this.getDateInfo(n),a=i.date;a.setMonth(a.getMonth()+1);var o=this.getNextNDay(a,-1);r=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(r=[n,n])}if(!r)return e;var s=this._getRangeInfo(r);return s.start.time>s.end.time&&r.reverse(),r},t.prototype._getRangeInfo=function(e){var r=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/NS)-Math.floor(r[0].time/NS)+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 c=Math.floor((i+r[0].day+6)/7),h=n?-c+1:c-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:c,nthWeek:h,fweek:r[0].day,lweek:r[1].day}},t.prototype._getDateByWeeksAndDay=function(e,r,n){var i=this._getRangeInfo(n);if(e>i.weeks||e===0&&r<i.fweek||e===i.weeks&&r>i.lweek)return null;var a=(e-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},t.create=function(e,r){var n=[];return e.eachComponent("calendar",function(i){var a=new t(i,e,r);n.push(a),i.coordinateSystem=a}),e.eachComponent(function(i,a){Zv({targetModel:a,coordSysType:"calendar",coordSysProvider:Jj})}),n},t.dimensions=["time","value"],t}();function RS(t){var e=t.calendarModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}function qfe(t){t.registerComponentModel($fe),t.registerComponentView(Yfe),t.registerCoordinateSystem("calendar",Xfe)}var Wa={level:1,leaf:2,nonLeaf:3},io={none:0,all:1,body:2,corner:3};function WT(t,e,r){var n=e[De[r]].getCell(t);return!n&&qe(t)&&t<0&&(n=e[De[1-r]].getUnitLayoutInfo(r,Math.round(t))),n}function RH(t){var e=t||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function OH(t,e,r,n,i){vO(t[0],e,i,r,n,0),vO(t[1],e,i,r,n,1)}function vO(t,e,r,n,i,a){t[0]=1/0,t[1]=-1/0;var o=n[a],s=ee(o)?o:[o],l=s.length,u=!!r;if(l>=1?(pO(t,e,s,u,i,a,0),l>1&&pO(t,e,s,u,i,a,l-1)):t[0]=t[1]=NaN,u){var c=-i[De[1-a]].getLocatorCount(a),h=i[De[a]].getLocatorCount(a)-1;r===io.body?c=Gt(0,c):r===io.corner&&(h=Rn(-1,h)),h<c&&(c=h=NaN),Ir(t[0])&&(t[0]=c),Ir(t[1])&&(t[1]=h),t[0]=Gt(Rn(t[0],h),c),t[1]=Gt(Rn(t[1],h),c)}}function pO(t,e,r,n,i,a,o){var s=WT(r[o],i,a);if(!s){t[0]=t[1]=NaN;return}var l=s.id[De[a]],u=l,c=ede(s);c&&(u+=c.span[De[a]]-1),t[0]=Rn(t[0],l,u),t[1]=Gt(t[1],l,u)}function Vg(t,e){return Ir(t[e][0])||Ir(t[e][1])}function gO(t,e,r,n){e=e||Kfe;for(var i=0;i<n;i++)e[i]=!1;for(;;){for(var a=!1,i=0;i<n;i++){var o=r[i];!e[i]&&o.cellMergeOwner&&Qfe(t,o.locatorRange)&&(e[i]=!0,a=!0)}if(!a)break}}var Kfe=[];function Qfe(t,e){return!mO(t[0],e[0])||!mO(t[1],e[1])?!1:(t[0][0]=Rn(t[0][0],e[0][0]),t[0][1]=Gt(t[0][1],e[0][1]),t[1][0]=Rn(t[1][0],e[1][0]),t[1][1]=Gt(t[1][1],e[1][1]),!0)}function mO(t,e){return t[1]>=e[0]&&t[0]<=e[1]}function yO(t,e){t.id.set(e[0][0],e[1][0]),t.span.set(e[0][1]-t.id.x+1,e[1][1]-t.id.y+1)}function Jfe(t,e){t[0][0]=e[0][0],t[0][1]=e[0][1],t[1][0]=e[1][0],t[1][1]=e[1][1]}function _O(t,e,r,n){var i=WT(e[n][0],r,n),a=WT(e[n][1],r,n);t[De[n]]=t[qt[n]]=NaN,i&&a&&(t[De[n]]=i.xy,t[qt[n]]=a.xy+a.wh-i.xy)}function Lf(t,e,r,n){return t[De[e]]=r,t[De[1-e]]=n,t}function ede(t){return t&&(t.type===Wa.leaf||t.type===Wa.nonLeaf)?t:null}function a0(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var xO=function(){function t(e,r){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=r,this._uniqueValueGen=tde(e);var n=r.get("data",!0);n!=null&&!ee(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return t.prototype._initByDimModelData=function(e){var r=this,n=r._cells,i=r._levels,a=[],o=0;r._leavesCount=s(e,0,0),l();return;function s(u,c,h){var f=0;return u&&R(u,function(d,p){var g;se(d)?g={value:d}:be(d)?(g=d,d.value!=null&&!se(d.value)&&(g={value:null})):g={value:null};var m={type:Wa.nonLeaf,ordinal:NaN,level:h,firstLeafLocator:c,id:new Te,span:Lf(new Te,r.dimIdx,1,1),option:g,xy:NaN,wh:NaN,dim:r,rect:a0()};o++,(a[c]||(a[c]=[])).push(m),i[h]||(i[h]={type:Wa.level,xy:NaN,wh:NaN,option:null,id:new Te,dim:r});var y=s(g.children,c,h+1),_=Math.max(1,y);m.span[De[r.dimIdx]]=_,f+=_,c+=_}),f}function l(){for(var u=[];n.length<o;)for(var c=0;c<a.length;c++){var h=a[c].pop();if(h){h.ordinal=u.length;var f=h.option.value;u.push(f),n.push(h),r._uniqueValueGen.calcDupBase(f)}}r._uniqueValueGen.ensureValueUnique(u,n);var d=r._ordinalMeta=new hv({categories:u,needCollect:!1,deduplication:!1});r._scale=new rh({ordinalMeta:d});for(var p=0;p<r._leavesCount;p++){var g=r._cells[p];g.type=Wa.leaf,g.span[De[1-r.dimIdx]]=r._levels.length-g.level}r._initCellsId(),r._initLevelIdOptions()}},t.prototype._initBySeriesData=function(){var e=this;e._leavesCount=0,e._levels=[{type:Wa.level,xy:NaN,wh:NaN,option:null,id:new Te,dim:e}],e._initLevelIdOptions();var r=e._ordinalMeta=new hv({needCollect:!0,deduplication:!0,onCollect:function(n,i){var a=e._cells[i]={type:Wa.leaf,ordinal:i,level:0,firstLeafLocator:i,id:new Te,span:Lf(new Te,e.dimIdx,1,1),option:{value:n+""},xy:NaN,wh:NaN,dim:e,rect:a0()};e._leavesCount++,e._setCellId(a)}});e._scale=new rh({ordinalMeta:r})},t.prototype._setCellId=function(e){var r=this._levels.length,n=this.dimIdx;Lf(e.id,n,e.firstLeafLocator,e.level-r)},t.prototype._initCellsId=function(){var e=this._levels.length,r=this.dimIdx;R(this._cells,function(n){Lf(n.id,r,n.firstLeafLocator,n.level-e)})},t.prototype._initLevelIdOptions=function(){var e=this._levels.length,r=this.dimIdx,n=this._model.get("levels",!0);n=ee(n)?n:[],R(this._levels,function(i,a){Lf(i.id,r,0,a-e),i.option=n[a]})},t.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},t.prototype.resetLayoutIterator=function(e,r,n,i){if(e=e||new ls,r===this.dimIdx){var a=this._leavesCount,o=n!=null?Math.max(0,n):0;i=i!=null?Math.min(i,a):a,e.reset(this._cells,o,o+i)}else{var a=this._levels.length,o=n!=null?Math.max(0,n+a):0;i=i!=null?Math.min(i,a):a,e.reset(this._levels,o,o+i)}return e},t.prototype.resetCellIterator=function(e){return(e||new ls).reset(this._cells,0)},t.prototype.resetLevelIterator=function(e){return(e||new ls).reset(this._levels,0)},t.prototype.getLayout=function(e,r,n){var i=this.getUnitLayoutInfo(r,n);e[De[r]]=i?i.xy:NaN,e[qt[r]]=i?i.wh:NaN},t.prototype.getUnitLayoutInfo=function(e,r){return e===this.dimIdx?r<this._leavesCount?this._cells[r]:void 0:this._levels[r+this._levels.length]},t.prototype.getCell=function(e){var r=this._scale.parse(e);return Ir(r)?void 0:this._cells[r]},t.prototype.getLocatorCount=function(e){return e===this.dimIdx?this._leavesCount:this._levels.length},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t}();function tde(t){var e=t.toUpperCase(),r=new RegExp("^"+e+"([0-9]+)$"),n=0;function i(s){var l;s!=null&&(l=s.match(r))&&(n=Gt(n,+l[1]+1))}function a(){return""+e+n++}function o(s,l){for(var u=de(),c=0;c<s.length;c++){var h=s[c];(h==null||u.get(h)!=null)&&(s[c]=h=a(),l[c].option=Se({value:h},l[c].option)),u.set(h,!0)}}return{calcDupBase:i,ensureValueUnique:o}}var SO=function(){function t(e,r,n){this._model=r,this._dims=n,this._kind=e,this._cellMergeOwnerList=[]}return t.prototype._ensureCellMap=function(){var e=this,r=e._cellMap;return r||(r=e._cellMap=de(),n()),r;function n(){var a=[],o=e._model.getShallow("data");o&&!ee(o)&&(o=null),R(o,function(p,g){if(!(!be(p)||!ee(p.coord))){var m=RH([]),y=null;if(OH(m,y,p.coord,e._dims,p.coordClamp?io[e._kind]:io.none),!(Vg(m,0)||Vg(m,1))){var _=p&&p.mergeCells,S={id:new Te,span:new Te,locatorRange:m,option:p,cellMergeOwner:_};yO(S,m),a.push(S)}}});for(var s=[],l=0;l<a.length;l++){var u=a[l];if(u.cellMergeOwner){var c=u.locatorRange;gO(c,s,a,l);for(var h=0;h<l;h++)s[h]&&(a[h].cellMergeOwner=!1);if(c[0][0]!==u.id.x||c[1][0]!==u.id.y){u.cellMergeOwner=!1;var f=J({},u.option);f.coord=null;var d={id:new Te,span:new Te,locatorRange:c,option:f,cellMergeOwner:!0};yO(d,c),a.push(d)}}}R(a,function(p){var g=i(p.id.x,p.id.y);if(p.cellMergeOwner&&(g.cellMergeOwner=!0,g.span=p.span,g.locatorRange=p.locatorRange,g.spanRect=a0(),e._cellMergeOwnerList.push(g)),!(!p.cellMergeOwner&&!p.option))for(var m=0;m<p.span.y;m++)for(var y=0;y<p.span.x;y++){var _=i(p.id.x+y,p.id.y+m);_.option=p.option,p.cellMergeOwner&&(_.inSpanOf=g)}})}function i(a,o){var s=bO(a,o),l=r.get(s);return l||(l=r.set(s,{id:new Te(a,o),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),l}},t.prototype.getCell=function(e){return this._ensureCellMap().get(bO(e[0],e[1]))},t.prototype.travelExistingCells=function(e){this._ensureCellMap().each(e)},t.prototype.expandRangeByCellMerge=function(e){if(!Vg(e,0)&&!Vg(e,1)&&e[0][0]===e[0][1]&&e[1][0]===e[1][1]){OS[0]=e[0][0],OS[1]=e[1][0];var r=this.getCell(OS),n=r&&r.inSpanOf;if(n){Jfe(e,n.locatorRange);return}}var i=this._cellMergeOwnerList;gO(e,null,i,i.length)},t}(),OS=[];function bO(t,e){return t+"|"+e}var zA={show:!0,color:q.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function BA(t){return{color:"none",borderWidth:1,borderColor:t?"none":q.color.borderTint}}var wO={show:!0,label:zA,itemStyle:BA(!1),silent:void 0,dividerLineStyle:{width:1,color:q.color.border}},rde={label:zA,itemStyle:BA(!1),silent:void 0},nde={label:zA,itemStyle:BA(!0),silent:void 0},ide={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:wO,y:wO,body:rde,corner:nde,backgroundStyle:{color:"none",borderColor:q.color.axisLine,borderWidth:1}},ade=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){var r=this._dimModels={x:new TO(this.get("x",!0)||{}),y:new TO(this.get("y",!0)||{})};r.x.option.type=r.y.option.type="category";var n=r.x.dim=new xO("x",r.x),i=r.y.dim=new xO("y",r.y),a={x:n,y:i};this._body=new SO("body",new We(this.getShallow("body")),a),this._corner=new SO("corner",new We(this.getShallow("corner")),a)},e.prototype.getDimensionModel=function(r){return this._dimModels[r]},e.prototype.getBody=function(){return this._body},e.prototype.getCorner=function(){return this._corner},e.type="matrix",e.layoutMode="box",e.defaultOption=ide,e}(Ve),TO=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},e}(We),Fg=Math.round,ode=0,sde=99,lde={normal:25,special:100},ude={normal:50,special:125},cde=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n){this.group.removeAll();var i=this.group,a=r.coordinateSystem,o=a.getRect(),s=r.getDimensionModel("x"),l=r.getDimensionModel("y"),u=s.dim,c=l.dim;hde(i,r,n),fde(i,r,u,c,n);var h=r.getShallow("borderZ2",!0),f=pe(h,sde),d=f-1,p=r.getModel("backgroundStyle").getItemStyle(["borderWidth"]);p.lineWidth=0;var g=r.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);g.fill="none";var m=UT(o.clone(),p,ode),y=UT(o.clone(),g,f);m.silent=!0,y.silent=!0,i.add(m),i.add(y);var _=u.getUnitLayoutInfo(0,0),S=c.getUnitLayoutInfo(1,0);_&&S&&(u.shouldShow()&&i.add(CO({x1:o.x,y1:S.xy,x2:o.x+o.width,y2:S.xy},s.getModel("dividerLineStyle").getLineStyle(),d)),c.shouldShow()&&i.add(CO({x1:_.xy,y1:o.y,x2:_.xy,y2:o.y+o.height},l.getModel("dividerLineStyle").getLineStyle(),d)))},e.type="matrix",e}(mt);function hde(t,e,r){n(0),n(1);function n(i){var a=e.getDimensionModel(De[i]),o=a.dim;if(o.shouldShow())for(var s=a.getModel("itemStyle"),l=a.getModel("label"),u=e.getShallow("tooltip",!0),c=[],h=o.resetCellIterator();h.next();){var f=h.item,d={};Ce.copy(d,f.rect),j0(c,f.id.x,f.id.y),zH(c,e,t,r,f.option,s,l,a,d,f.option.value,ude,u)}}}function fde(t,e,r,n,i){a("body",e.getBody(),r,n),r.shouldShow()&&n.shouldShow()&&a("corner",e.getCorner(),n,r);function a(o,s,l,u){var c=new We(e.getShallow(o,!0)),h=c.getModel("itemStyle"),f=c.getModel("label"),d=new ls,p=new ls,g=[],m=e.getShallow("tooltip",!0);for(u.resetLayoutIterator(p,1);p.next();)for(l.resetLayoutIterator(d,0);d.next();){var y=d.item,_=p.item;j0(g,y.id.x,_.id.y);var S=s.getCell(g);if(!(S&&S.inSpanOf&&S.inSpanOf!==S)){var T={};S&&S.span?Ce.copy(T,S.spanRect):(y.dim.getLayout(T,0,g[0]),_.dim.getLayout(T,1,g[1]));var C=S?S.option:null;zH(g,e,t,i,C,h,f,c,T,C?C.value:null,lde,m)}}}}function zH(t,e,r,n,i,a,o,s,l,u,c,h){var f;Gg.option=i?i.itemStyle:null,Gg.parentModel=a,Xu.option=i,Xu.parentModel=s;var d=pe(Xu.getShallow("z2"),i&&i.itemStyle?c.special:c.normal),p=h&&h.show,g=UT(l,Gg.getItemStyle(),d);r.add(g);var m=Xu.get("cursor");m!=null&&g.attr("cursor",m);var y;if(u!=null){var _=u+"";if(qu.option=i?i.label:null,qu.parentModel=o,qu.ecModel=n,vr(g,{normal:qu},{defaultText:_,autoOverflowArea:!0,layoutRect:ye(g.shape)}),y=g.getTextContent(),y){y.z2=d+1;var S=y.style;if(S&&S.overflow&&S.overflow!=="none"&&S.lineOverflow){var T={};Ce.copy(T,l),Ql(T,(((f=g.style)===null||f===void 0?void 0:f.lineWidth)||0)/2,!0,!0),g.updateInnerText(),y.getLocalTransform(Hg),hi(Hg,Hg),Ce.applyTransform(T,T,Hg),y.setClipPath(new Be({shape:T}))}}So({el:g,componentModel:e,itemName:_,itemTooltipOption:h,formatterParamsExtra:{xyLocator:t.slice()}})}if(y){var C=qu.get("silent");C==null&&(C=!p),y.silent=C,y.ignoreHostSilent=!0}var M=Xu.get("silent");M==null&&(M=!g.style||g.style.fill==="none"||!g.style.fill),g.silent=M,Xx(Xu),Xx(Gg),Xx(qu)}var Xu=new We,Gg=new We,qu=new We,Hg=[];function UT(t,e,r){var n=e.lineWidth;if(n){var i=t.x+t.width,a=t.y+t.height;t.x=En(t.x,n,!0),t.y=En(t.y,n,!0),t.width=En(i,n,!0)-t.x,t.height=En(a,n,!0)-t.y}return new Be({shape:t,style:e,z2:r})}function CO(t,e,r){var n=e.lineWidth;return n&&(Fg(t.x1*2)===Fg(t.x2*2)&&(t.x1=t.x2=En(t.x1,n,!0)),Fg(t.y1*2)===Fg(t.y2*2)&&(t.y1=t.y2=En(t.y1,n,!0))),new Wt({shape:t,style:e,silent:!0,z2:r})}var dde=function(){function t(e,r,n){this.dimensions=t.dimensions,this.type="matrix",this._model=e;var i=this._dimModels={x:e.getDimensionModel("x"),y:e.getDimensionModel("y")};this._dims={x:i.x.dim,y:i.y.dim},this._resize(e,n)}return t.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},t.create=function(e,r){var n=[];return e.eachComponent("matrix",function(i){var a=new t(i,e,r);n.push(a),i.coordinateSystem=a}),e.eachComponent(function(i,a){Zv({targetModel:a,coordSysType:"matrix",coordSysProvider:Jj})}),n},t.prototype.getRect=function(){return this._rect},t.prototype._resize=function(e,r){var n=this._dims,i=this._dimModels,a=this._rect=bt(e.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()});MO(i,n,a,0),MO(i,n,a,1),AO(0,n),AO(1,n),LO(this._model.getBody(),n),LO(this._model.getCorner(),n)},t.prototype.dataToPoint=function(e,r,n){return n=n||[],this.dataToLayout(e,r,Pf),n[0]=Pf.rect.x+Pf.rect.width/2,n[1]=Pf.rect.y+Pf.rect.height/2,n},t.prototype.dataToLayout=function(e,r,n){var i=this._dims;n=n||{};var a=n.rect=n.rect||{};a.x=a.y=a.width=a.height=NaN;var o=n.matrixXYLocatorRange=RH(n.matrixXYLocatorRange);return ee(e)&&(OH(o,null,e,i,pe(r&&r.clamp,io.none)),(!r||!r.ignoreMergeCells)&&((!r||r.clamp!==io.corner)&&this._model.getBody().expandRangeByCellMerge(o),(!r||r.clamp!==io.body)&&this._model.getCorner().expandRangeByCellMerge(o)),_O(a,o,i,0),_O(a,o,i,1)),n},t.prototype.pointToData=function(e,r,n){var i=this._dims;return PO(ea,0,i,e,r&&r.clamp),PO(ea,1,i,e,r&&r.clamp),n=n||[],n[0]=n[1]=NaN,ea.y===Pr.inCorner&&ea.x===Pr.inBody?kO(ea,n,0,i):ea.x===Pr.inCorner&&ea.y===Pr.inBody?kO(ea,n,1,i):(DO(ea,n,0,i),DO(ea,n,1,i)),n},t.prototype.convertToPixel=function(e,r,n,i){var a=BS(r);return a===this?a.dataToPoint(n,i):void 0},t.prototype.convertToLayout=function(e,r,n,i){var a=BS(r);return a===this?a.dataToLayout(n,i):void 0},t.prototype.convertFromPixel=function(e,r,n,i){var a=BS(r);return a===this?a.pointToData(n,i):void 0},t.prototype.containPoint=function(e){return this._rect.contain(e[0],e[1])},t.dimensions=["x","y","value"],t}(),Pf={rect:a0()},Wg=new ls,zS=new ls;function MO(t,e,r,n){for(var i=1-n,a=e[De[n]],o=e[De[i]],s=o.shouldShow(),l=a.resetCellIterator();l.next();)l.item.wh=l.item.xy=NaN;for(var u=o.resetLayoutIterator(null,n);u.next();)u.item.wh=u.item.xy=NaN;for(var c=r[qt[n]],h=a.getLocatorCount(n)+o.getLocatorCount(n),f=new We,d=o.resetLevelIterator();d.next();)f.option=d.item.option,f.parentModel=t[De[i]],m(d.item,s?f.get("levelSize"):0);for(var p=new We,g=a.resetCellIterator();g.next();)g.item.type===Wa.leaf&&(p.option=g.item.option,p.parentModel=void 0,m(g.item,p.get("size")));function m(A,k){var E=vde(k,n,r);Ir(E)||(A.wh=ZT(E,c),c=ZT(c-A.wh),h--)}var y=h?c/h:0,_=!h&&c>=1,S=r[De[n]],T=a.getLocatorCount(n)-1,C=new ls;for(o.resetLayoutIterator(C,n);C.next();)M(C.item);for(a.resetLayoutIterator(C,n);C.next();)M(C.item);function M(A){Ir(A.wh)&&(A.wh=y),A.xy=S,A.id[De[n]]===T&&!_&&(A.wh=r[De[n]]+r[qt[n]]-A.xy),S+=A.wh}}function AO(t,e){for(var r=e[De[t]].resetCellIterator();r.next();){var n=r.item;o0(n.rect,t,n.id,n.span,e),o0(n.rect,1-t,n.id,n.span,e),n.type===Wa.nonLeaf&&(n.xy=n.rect[De[t]],n.wh=n.rect[qt[t]])}}function LO(t,e){t.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;o0(i,0,a,n,e),o0(i,1,a,n,e)}})}function o0(t,e,r,n,i){t[qt[e]]=0;var a=r[De[e]],o=a<0?i[De[1-e]]:i[De[e]],s=o.getUnitLayoutInfo(e,r[De[e]]);if(t[De[e]]=s.xy,t[qt[e]]=s.wh,n[De[e]]>1){var l=o.getUnitLayoutInfo(e,r[De[e]]+n[De[e]]-1);t[qt[e]]=l.xy+l.wh-s.xy}}function vde(t,e,r){var n=_y(t,r[qt[e]]);return ZT(n,r[qt[e]])}function ZT(t,e){return Math.max(Math.min(t,pe(e,1/0)),0)}function BS(t){var e=t.matrixModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}var Pr={inBody:1,inCorner:2,outside:3},ea={x:null,y:null,point:[]};function PO(t,e,r,n,i){var a=r[De[e]],o=r[De[1-e]],s=a.getUnitLayoutInfo(e,a.getLocatorCount(e)-1),l=a.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),c=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,h=t.point[e]=n[e];if(!l&&!c){t[De[e]]=Pr.outside;return}if(i===io.body){l?(t[De[e]]=Pr.inBody,h=Rn(s.xy+s.wh,Gt(l.xy,h)),t.point[e]=h):t[De[e]]=Pr.outside;return}else if(i===io.corner){c?(t[De[e]]=Pr.inCorner,h=Rn(c.xy+c.wh,Gt(u.xy,h)),t.point[e]=h):t[De[e]]=Pr.outside;return}var f=l?l.xy:c?c.xy+c.wh:NaN,d=u?u.xy:f,p=s?s.xy+s.wh:f;if(h<d){if(!i){t[De[e]]=Pr.outside;return}h=d}else if(h>p){if(!i){t[De[e]]=Pr.outside;return}h=p}t.point[e]=h,t[De[e]]=f<=h&&h<=p?Pr.inBody:d<=h&&h<=f?Pr.inCorner:Pr.outside}function kO(t,e,r,n){var i=1-r;if(t[De[r]]!==Pr.outside)for(n[De[r]].resetCellIterator(zS);zS.next();){var a=zS.item;if(IO(t.point[r],a.rect,r)&&IO(t.point[i],a.rect,i)){e[r]=a.ordinal,e[i]=a.id[De[i]];return}}}function DO(t,e,r,n){if(t[De[r]]!==Pr.outside){var i=t[De[r]]===Pr.inCorner?n[De[1-r]]:n[De[r]];for(i.resetLayoutIterator(Wg,r);Wg.next();)if(pde(t.point[r],Wg.item)){e[r]=Wg.item.id[De[r]];return}}}function pde(t,e){return e.xy<=t&&t<=e.xy+e.wh}function IO(t,e,r){return e[De[r]]<=t&&t<=e[De[r]]+e[qt[r]]}function gde(t){t.registerComponentModel(ade),t.registerComponentView(cde),t.registerCoordinateSystem("matrix",dde)}function mde(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function EO(t,e){var r;return R(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function yde(t,e,r){var n=J({},r),i=t[e],a=r.$action||"merge";a==="merge"?i?(Ne(i,n,!0),Ca(i,n,{ignoreSize:!0}),iV(r,i),Ug(r,i),Ug(r,i,"shape"),Ug(r,i,"style"),Ug(r,i,"extra"),r.clipPath=i.clipPath):t[e]=n:a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var BH=["transition","enterFrom","leaveTo"],_de=BH.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Ug(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?BH:_de,i=0;i<n.length;i++){var a=n[i];t[a]==null&&e[a]!=null&&(t[a]=e[a])}}function xde(t,e){if(t&&(t.hv=e.hv=[EO(e,["left","right"]),EO(e,["top","bottom"])],t.type==="group")){var r=t,n=e;r.width==null&&(r.width=n.width=0),r.height==null&&(r.height=n.height=0)}}var Sde=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.mergeOption=function(r,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,r,n),this.option.elements=i},e.prototype.optionUpdated=function(r,n){var i=this.option,a=(n?i:r).elements,o=i.elements=n?[]:i.elements,s=[];this._flatten(a,s,null);var l=Y4(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];R(l,function(c,h){var f=c.newOption;f&&(u.push(f),mde(c,f),yde(o,h,f),xde(o[h],f))},this),i.elements=tt(o,function(c){return c&&delete c.$action,c!=null})},e.prototype._flatten=function(r,n,i){R(r,function(a){if(a){i&&(a.parentOption=i),n.push(a);var o=a.children;o&&o.length&&this._flatten(o,n,a),delete a.children}},this)},e.prototype.useElOptionsToUpdate=function(){var r=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,r},e.type="graphic",e.defaultOption={elements:[]},e}(Ve),NO={path:null,compoundPath:null,group:_e,image:pr,text:Xe},Kn=Fe(),bde=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this._elMap=de()},e.prototype.render=function(r,n,i){r!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=r,this._updateElements(r),this._relocate(r,i)},e.prototype._updateElements=function(r){var n=r.useElOptionsToUpdate();if(n){var i=this._elMap,a=this.group,o=r.get("z"),s=r.get("zlevel");R(n,function(l){var u=rr(l.id,null),c=u!=null?i.get(u):null,h=rr(l.parentId,null),f=h!=null?i.get(h):a,d=l.type,p=l.style;d==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var g=l.textContent,m=l.textConfig;if(p&&pH(p,d,!!m,!!g)){var y=gH(p,d,!0);!m&&y.textConfig&&(m=l.textConfig=y.textConfig),!g&&y.textContent&&(g=y.textContent)}var _=wde(l),S=l.$action||"merge",T=S==="merge",C=S==="replace";if(T){var M=!c,A=c;M?A=RO(u,f,l.type,i):(A&&(Kn(A).isNew=!1),xH(A)),A&&(Am(A,_,r,{isInit:M}),OO(A,l,o,s))}else if(C){km(c,l,i,r);var k=RO(u,f,l.type,i);k&&(Am(k,_,r,{isInit:!0}),OO(k,l,o,s))}else S==="remove"&&(yH(c,l),km(c,l,i,r));var E=i.get(u);if(E&&g)if(T){var D=E.getTextContent();D?D.attr(g):E.setTextContent(new Xe(g))}else C&&E.setTextContent(new Xe(g));if(E){var I=l.clipPath;if(I){var z=I.type,O=void 0,M=!1;if(T){var V=E.getClipPath();M=!V||Kn(V).type!==z,O=M?$T(z):V}else C&&(M=!0,O=$T(z));E.setClipPath(O),Am(O,I,r,{isInit:M}),r0(O,I.keyframeAnimation,r)}var G=Kn(E);E.setTextConfig(m),G.option=l,Tde(E,r,l),So({el:E,componentModel:r,itemName:E.name,itemTooltipOption:l.tooltip}),r0(E,l.keyframeAnimation,r)}})}},e.prototype._relocate=function(r,n){for(var i=r.option.elements,a=this.group,o=this._elMap,s=n.getWidth(),l=n.getHeight(),u=["x","y"],c=0;c<i.length;c++){var h=i[c],f=rr(h.id,null),d=f!=null?o.get(f):null;if(!(!d||!d.isGroup)){var p=d.parent,g=p===a,m=Kn(d),y=Kn(p);m.width=oe(m.option.width,g?s:y.width)||0,m.height=oe(m.option.height,g?l:y.height)||0}}for(var c=i.length-1;c>=0;c--){var h=i[c],f=rr(h.id,null),d=f!=null?o.get(f):null;if(d){var p=d.parent,y=Kn(p),_=p===a?{width:s,height:l}:{width:y.width,height:y.height},S={},T=r_(d,h,_,null,{hv:h.hv,boundingMode:h.bounding},S);if(!Kn(d).isNew&&T){for(var C=h.transition,M={},A=0;A<u.length;A++){var k=u[A],E=S[k];C&&(Vl(C)||Ee(C,k)>=0)?M[k]=E:d[k]=E}Qe(d,M,r,0)}else d.attr(S)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){km(i,Kn(i).option,n,r._lastGraphicModel)}),this._elMap=de()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(mt);function $T(t){var e=he(NO,t)?NO[t]:nv(t),r=new e({});return Kn(r).type=t,r}function RO(t,e,r,n){var i=$T(r);return e.add(i),n.set(t,i),Kn(i).id=t,Kn(i).isNew=!0,i}function km(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){km(a,e,r,n)}),y_(t,e,n),r.removeKey(Kn(t).id))}function OO(t,e,r,n){t.isGroup||R([["cursor",fi.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];he(e,a)?t[a]=pe(e[a],i[1]):t[a]==null&&(t[a]=i[1])}),R($e(e),function(i){if(i.indexOf("on")===0){var a=e[i];t[i]=me(a)?a:null}}),he(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function wde(t){return t=J({},t),R(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(eV),function(e){delete t[e]}),t}function Tde(t,e,r){var n=Le(t).eventData;!t.silent&&!t.ignore&&!n&&(n=Le(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=r.info)}function Cde(t){t.registerComponentModel(Sde),t.registerComponentView(bde),t.registerPreprocessor(function(e){var r=e.graphic;ee(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}var zO=["x","y","radius","angle","single"],Mde=["cartesian2d","polar","singleAxis"];function Ade(t){var e=t.get("coordinateSystem");return Ee(Mde,e)>=0}function qo(t){return t+"Axis"}function Lde(t,e){var r=de(),n=[],i=de();t.eachComponent({mainType:"dataZoom",query:e},function(c){i.get(c.uid)||s(c)});var a;do a=!1,t.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var h=!1;return c.eachTargetAxis(function(f,d){var p=r.get(f);p&&p[d]&&(h=!0)}),h}function u(c){c.eachTargetAxis(function(h,f){(r.get(h)||r.set(h,[]))[f]=!0})}return n}function jH(t){var e=t.ecModel,r={infoList:[],infoMap:de()};return t.eachTargetAxis(function(n,i){var a=e.getComponent(qo(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 jS=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},t}(),bv=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return e.prototype.init=function(r,n,i){var a=BO(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},e.prototype.mergeOption=function(r){var n=BO(r);Ne(this.option,r,!0),Ne(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=de(),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)},e.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return R(zO,function(i){var a=this.getReferringComponents(qo(i),ZX);if(a.specified){n=!0;var o=new jS;R(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},e.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(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var h=u[0];if(h){var f=new jS;if(f.add(h.componentIndex),r.set(c,f),a=!1,c==="x"||c==="y"){var d=h.getReferringComponents("grid",kt).models[0];d&&R(u,function(p){h.componentIndex!==p.componentIndex&&d===p.getReferringComponents("grid",kt).models[0]&&f.add(p.componentIndex)})}}}a&&R(zO,function(u){if(a){var c=i.findComponents({mainType:qo(u),filter:function(f){return f.get("type",!0)==="category"}});if(c[0]){var h=new jS;h.add(c[0].componentIndex),r.set(u,h),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},e.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}},e.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");R([["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")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(qo(n),i))},this),r},e.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){R(i.indexList,function(o){r.call(n,a,o)})})},e.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(qo(r),n)},e.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;R([["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)},e.prototype.setCalculatedRange=function(r){var n=this.option;R(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},e.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},e.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()},e.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;a<i.length;a++)for(var o=i[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}return n},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e}(Ve);function BO(t){var e={};return R(["start","end","startValue","endValue","throttle"],function(r){t.hasOwnProperty(r)&&(e[r]=t[r])}),e}var Pde=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.select",e}(bv),jA=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i,a){this.dataZoomModel=r,this.ecModel=n,this.api=i},e.type="dataZoom",e}(mt),kde=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.select",e}(jA),ac=R,jO=Dn,Dde=function(){function t(e,r,n,i){this._dimName=e,this._axisIndex=r,this.ecModel=i,this._dataZoomModel=n}return t.prototype.hostedBy=function(e){return this._dataZoomModel===e},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(r){if(Ade(r)){var n=qo(this._dimName),i=r.getReferringComponents(n,kt).models[0];i&&this._axisIndex===i.componentIndex&&e.push(r)}},this),e},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return ye(this._minMaxSpan)},t.prototype.calculateDataWindow=function(e){var r=this._dataExtent,n=this.getAxisModel(),i=n.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;ac(["start","end"],function(f,d){var p=e[f],g=e[f+"Value"];a[d]==="percent"?(p==null&&(p=o[d]),g=i.parse(it(p,o,r))):(u=!0,g=g==null?r[d]:i.parse(g),p=it(g,r,o)),l[d]=g==null||isNaN(g)?r[d]:g,s[d]=p==null||isNaN(p)?o[d]:p}),jO(l),jO(s);var c=this._minMaxSpan;u?h(l,s,r,o,!1):h(s,l,o,r,!0);function h(f,d,p,g,m){var y=m?"Span":"ValueSpan";Ss(0,f,p,"all",c["min"+y],c["max"+y]);for(var _=0;_<2;_++)d[_]=it(f[_],p,g,!0),m&&(d[_]=i.parse(d[_]))}return{valueWindow:l,percentWindow:s}},t.prototype.reset=function(e){if(e===this._dataZoomModel){var r=this.getTargetSeriesModels();this._dataExtent=Ide(this,this._dimName,r),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(e,r){if(e!==this._dataZoomModel)return;var n=this._dimName,i=this.getTargetSeriesModels(),a=e.get("filterMode"),o=this._valueWindow;if(a==="none")return;ac(i,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(c.length){if(a==="weakFilter"){var h=u.getStore(),f=re(c,function(d){return u.getDimensionIndex(d)},u);u.filterSelf(function(d){for(var p,g,m,y=0;y<c.length;y++){var _=h.get(f[y],d),S=!isNaN(_),T=_<o[0],C=_>o[1];if(S&&!T&&!C)return!0;S&&(m=!0),T&&(p=!0),C&&(g=!0)}return m&&p&&g})}else ac(c,function(d){if(a==="empty")l.setData(u=u.map(d,function(g){return s(g)?g:NaN}));else{var p={};p[d]=o,u.selectRange(p)}});ac(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},t.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;ac(["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=it(n[0]+o,n,[0,100],!0):a!=null&&(o=it(a,[0,100],n,!0)-n[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var e=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=L2(n,[0,500]);i=Math.min(i,20);var a=e.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()}},t}();function Ide(t,e,r){var n=[1/0,-1/0];ac(r,function(o){qte(n,o.getData(),e)});var i=t.getAxisModel(),a=BF(i.axis.scale,i,n).calculate();return[a.min,a.max]}var Ede={getTargetSeries:function(t){function e(i){t.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=t.getComponent(qo(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Dde(i,a,s,t),r.push(o.__dzAxisProxy))});var n=de();return R(r,function(i){R(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(t,e){t.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,e)})}),t.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]})}})}};function Nde(t){t.registerAction("dataZoom",function(e,r){var n=Lde(r,e);R(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var VO=!1;function VA(t){VO||(VO=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,Ede),Nde(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Rde(t){t.registerComponentModel(Pde),t.registerComponentView(kde),VA(t)}var ti=function(){function t(){}return t}(),VH={};function oc(t,e){VH[t]=e}function FH(t){return VH[t]}var Ode=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;R(this.option.feature,function(n,i){var a=FH(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),Ne(n,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:q.color.border,borderRadius:0,borderWidth:0,padding:q.size.m,itemSize:15,itemGap:q.size.s,showTitle:!0,iconStyle:{borderColor:q.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:q.color.accent50}},tooltip:{show:!1,position:"bottom"}},e}(Ve);function GH(t,e){var r=Th(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var i=new Be({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var zde=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.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")||{},c=this._features||(this._features={}),h=[];R(u,function(_,S){h.push(S)}),new vo(this._featureNames||[],h).add(f).update(f).remove(Ie(f,null)).execute(),this._featureNames=h;function f(_,S){var T=h[_],C=h[S],M=u[T],A=new We(M,r,r.ecModel),k;if(a&&a.newTitle!=null&&a.featureName===T&&(M.title=a.newTitle),T&&!C){if(Bde(T))k={onclick:A.option.onclick,featureName:T};else{var E=FH(T);if(!E)return;k=new E}c[T]=k}else if(k=c[C],!k)return;k.uid=wh("toolbox-feature"),k.model=A,k.ecModel=n,k.api=i;var D=k instanceof ti;if(!T&&C){D&&k.dispose&&k.dispose(n,i);return}if(!A.get("show")||D&&k.unusable){D&&k.remove&&k.remove(n,i);return}d(A,k,T),A.setIconStatus=function(I,z){var O=this.option,V=this.iconPaths;O.iconStatus=O.iconStatus||{},O.iconStatus[I]=z,V[I]&&(z==="emphasis"?ho:fo)(V[I])},k instanceof ti&&k.render&&k.render(A,n,i,a)}function d(_,S,T){var C=_.getModel("iconStyle"),M=_.getModel(["emphasis","iconStyle"]),A=S instanceof ti&&S.getIcons?S.getIcons():_.get("icon"),k=_.get("title")||{},E,D;se(A)?(E={},E[T]=A):E=A,se(k)?(D={},D[T]=k):D=k;var I=_.iconPaths={};R(E,function(z,O){var V=Sh(z,{},{x:-s/2,y:-s/2,width:s,height:s});V.setStyle(C.getItemStyle());var G=V.ensureState("emphasis");G.style=M.getItemStyle();var F=new Xe({style:{text:D[O],align:M.get("textAlign"),borderRadius:M.get("textBorderRadius"),padding:M.get("textPadding"),fill:null,font:K2({fontStyle:M.get("textFontStyle"),fontFamily:M.get("textFontFamily"),fontSize:M.get("textFontSize"),fontWeight:M.get("textFontWeight")},n)},ignore:!0});V.setTextContent(F),So({el:V,componentModel:r,itemName:O,formatterParamsExtra:{title:D[O]}}),V.__title=D[O],V.on("mouseover",function(){var U=M.getItemStyle(),j=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";F.setStyle({fill:M.get("textFill")||U.fill||U.stroke||q.color.neutral99,backgroundColor:M.get("textBackgroundColor")}),V.setTextConfig({position:M.get("textPosition")||j}),F.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){_.get(["iconStatus",O])!=="emphasis"&&i.leaveEmphasis(this),F.hide()}),(_.get(["iconStatus",O])==="emphasis"?ho:fo)(V),o.add(V),V.on("click",le(S.onclick,S,n,i,O)),I[O]=V})}var p=sr(r,i).refContainer,g=r.getBoxLayoutParams(),m=r.get("padding"),y=bt(g,p,m);zl(r.get("orient"),o,r.get("itemGap"),y.width,y.height),r_(o,g,p,m),o.add(GH(o.getBoundingRect(),r)),l||o.eachChild(function(_){var S=_.__title,T=_.ensureState("emphasis"),C=T.textConfig||(T.textConfig={}),M=_.getTextContent(),A=M&&M.ensureState("emphasis");if(A&&!me(A)&&S){var k=A.style||(A.style={}),E=G0(S,Xe.makeFont(k)),D=_.x+o.x,I=_.y+o.y+s,z=!1;I+E.height>i.getHeight()&&(C.position="top",z=!0);var O=z?-5-E.height:s+10;D+E.width/2>i.getWidth()?(C.position=["100%",O],k.align="right"):D-E.width/2<0&&(C.position=[0,O],k.align="left")}})},e.prototype.updateView=function(r,n,i,a){R(this._features,function(o){o instanceof ti&&o.updateView&&o.updateView(o.model,n,i,a)})},e.prototype.remove=function(r,n){R(this._features,function(i){i instanceof ti&&i.remove&&i.remove(r,n)}),this.group.removeAll()},e.prototype.dispose=function(r,n){R(this._features,function(i){i instanceof ti&&i.dispose&&i.dispose(r,n)})},e.type="toolbox",e}(mt);function Bde(t){return t.indexOf("my")===0}var jde=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.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")||q.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Ze.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var f=l.split(","),d=f[0].indexOf("base64")>-1,p=o?decodeURIComponent(f[1]):f[1];d&&(p=window.atob(p));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=p.length,y=new Uint8Array(m);m--;)y[m]=p.charCodeAt(m);var _=new Blob([y]);window.navigator.msSaveOrOpenBlob(_,g)}else{var S=document.createElement("iframe");document.body.appendChild(S);var T=S.contentWindow,C=T.document;C.open("image/svg+xml","replace"),C.write(p),C.close(),T.focus(),C.execCommand("SaveAs",!0,g),document.body.removeChild(S)}}else{var M=i.get("lang"),A='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(M&&M[0]||"")+'" /></body>',k=window.open();k.document.write(A),k.document.title=a}},e.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:q.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(ti),FO="__ec_magicType_stack__",Vde=[["line","bar"],["stack"]],Fde=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return R(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},e.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},e.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(GO[i]){var s={series:[]},l=function(h){var f=h.subType,d=h.id,p=GO[i](f,d,h,a);p&&(Se(p,h.option),s.series.push(p));var g=h.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=g.getAxesByScale("ordinal")[0];if(m){var y=m.dim,_=y+"Axis",S=h.getReferringComponents(_,kt).models[0],T=S.componentIndex;s[_]=s[_]||[];for(var C=0;C<=T;C++)s[_][T]=s[_][T]||{};s[_][T].boundaryGap=i==="bar"}}};R(Vde,function(h){Ee(h,i)>=0&&R(h,function(f){a.setIconStatus(f,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=Ne({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(ti),GO={line:function(t,e,r,n){if(t==="bar")return Ne({id:e,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(t,e,r,n){if(t==="line")return Ne({id:e,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(t,e,r,n){var i=r.get("stack")===FO;if(t==="line"||t==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Ne({id:e,stack:i?"":FO},n.get(["option","stack"])||{},!0)}};Fi({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var __=new Array(60).join("-"),uh=" ";function Gde(t){var e={},r=[],n=[];return t.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;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:e,other:r,meta:n}}function Hde(t){var e=[];return R(t,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(re(r.series,function(d){return d.name})),l=[i.model.getCategories()];R(r.series,function(d){var p=d.getRawData();l.push(d.getRawData().mapArray(p.mapDimension(o),function(g){return g}))});for(var u=[s.join(uh)],c=0;c<l[0].length;c++){for(var h=[],f=0;f<l.length;f++)h.push(l[f][c]);u.push(h.join(uh))}e.push(u.join(`
|
||
`))}),e.join(`
|
||
|
||
`+__+`
|
||
|
||
`)}function Wde(t){return re(t,function(e){var r=e.getRawData(),n=[e.name],i=[];return r.each(r.dimensions,function(){for(var a=arguments.length,o=arguments[a-1],s=r.getName(o),l=0;l<a-1;l++)i[l]=arguments[l];n.push((s?s+uh:"")+i.join(uh))}),n.join(`
|
||
`)}).join(`
|
||
|
||
`+__+`
|
||
|
||
`)}function Ude(t){var e=Gde(t);return{value:tt([Hde(e.seriesGroupByCategoryAxis),Wde(e.other)],function(r){return!!r.replace(/[\n\t\s]/g,"")}).join(`
|
||
|
||
`+__+`
|
||
|
||
`),meta:e.meta}}function s0(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Zde(t){var e=t.slice(0,t.indexOf(`
|
||
`));if(e.indexOf(uh)>=0)return!0}var YT=new RegExp("["+uh+"]+","g");function $de(t){for(var e=t.split(/\n+/g),r=s0(e.shift()).split(YT),n=[],i=re(r,function(l){return{name:l,data:[]}}),a=0;a<e.length;a++){var o=s0(e[a]).split(YT);n.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[a]=o[s])}return{series:i,categories:n}}function Yde(t){for(var e=t.split(/\n+/g),r=s0(e.shift()),n=[],i=0;i<e.length;i++){var a=s0(e[i]);if(a){var o=a.split(YT),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),n[i]={name:s,value:[]},l=n[i].value):l=n[i]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?n[i].value=l[0]:n[i]=l[0])}}return{name:r,data:n}}function Xde(t,e){var r=t.split(new RegExp(`
|
||
*`+__+`
|
||
*`,"g")),n={series:[]};return R(r,function(i,a){if(Zde(i)){var o=$de(i),s=e[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=Yde(i);n.series.push(o)}}),n}var qde=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.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")||q.color.neutral00;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"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var h=a.get("optionToContent"),f=a.get("contentToOption"),d=Ude(r);if(me(h)){var p=h(n.getOption());se(p)?u.innerHTML=p:$l(p)&&u.appendChild(p)}else{c.readOnly=a.get("readOnly");var g=c.style;g.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",g.color=a.get("textColor"),g.borderColor=a.get("textareaBorderColor"),g.backgroundColor=a.get("textareaColor"),c.value=d.value,u.appendChild(c)}var m=d.meta,y=document.createElement("div");y.style.cssText="position:absolute;bottom:5px;left:0;right:0";var _="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",S=document.createElement("div"),T=document.createElement("div");_+=";background-color:"+a.get("buttonColor"),_+=";color:"+a.get("buttonTextColor");var C=this;function M(){i.removeChild(o),C._dom=null}iw(S,"click",M),iw(T,"click",function(){if(f==null&&h!=null||f!=null&&h==null){M();return}var A;try{me(f)?A=f(u,n.getOption()):A=Xde(c.value,m)}catch(k){throw M(),new Error("Data view format error "+k)}A&&n.dispatchAction({type:"changeDataView",newOption:A}),M()}),S.innerHTML=l[1],T.innerHTML=l[2],T.style.cssText=S.style.cssText=_,!a.get("readOnly")&&y.appendChild(T),y.appendChild(S),o.appendChild(s),o.appendChild(u),o.appendChild(y),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},e.prototype.remove=function(r,n){this._dom&&n.getDom().removeChild(this._dom)},e.prototype.dispose=function(r,n){this.remove(r,n)},e.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:q.color.background,textColor:q.color.primary,textareaColor:q.color.background,textareaBorderColor:q.color.border,buttonColor:q.color.accent50,buttonTextColor:q.color.neutral00};return n},e}(ti);function Kde(t,e){return re(t,function(r,n){var i=e&&e[n];if(be(i)&&!ee(i)){var a=be(r)&&!ee(r);a||(r={value:r});var o=i.name!=null&&r.name==null;return r=Se(r,i),o&&delete r.name,r}else return r})}Fi({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var r=[];R(t.newOption.series,function(n){var i=e.getSeriesByName(n.name)[0];if(!i)r.push(J({type:"scatter"},n));else{var a=i.get("data");r.push({name:n.name,data:Kde(n.data,a)})}}),e.mergeOption(Se({series:r},t.newOption))});var HH=R,WH=Fe();function Qde(t,e){var r=FA(t);HH(e,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=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(e)}function Jde(t){var e=FA(t),r=e[e.length-1];e.length>1&&e.pop();var n={};return HH(r,function(i,a){for(var o=e.length-1;o>=0;o--)if(i=e[o][a],i){n[a]=i;break}}),n}function eve(t){WH(t).snapshots=null}function tve(t){return FA(t).length}function FA(t){var e=WH(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var rve=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){eve(r),n.dispatchAction({type:"restore",from:this.uid})},e.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},e}(ti);Fi({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var nve=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],GA=function(){function t(e,r,n){var i=this;this._targetInfoList=[];var a=HO(r,e);R(ive,function(o,s){(!n||!n.include||Ee(n.include,s)>=0)&&o(a,i._targetInfoList)})}return t.prototype.setOutputRanges=function(e,r){return this.matchOutputRanges(e,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=VS[n.brushType](0,a,i);n.__rangeOffset={offset:$O[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},t.prototype.matchOutputRanges=function(e,r,n){R(e,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&R(a.coordSyses,function(o){var s=VS[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},t.prototype.setInputRanges=function(e,r){R(e,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=VS[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?$O[n.brushType](a.values,o.offset,ave(a.xyMinMax,o.xyMinMax)):a.values}},this)},t.prototype.makePanelOpts=function(e,r){return re(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:X6(i),isTargetByCursor:K6(i,e,n.coordSysModel),getLinearBrushOtherExtent:q6(i)}})},t.prototype.controlSeries=function(e,r,n){var i=this.findTargetInfo(e,n);return i===!0||i&&Ee(i.coordSyses,r.coordinateSystem)>=0},t.prototype.findTargetInfo=function(e,r){for(var n=this._targetInfoList,i=HO(r,e),a=0;a<n.length;a++){var o=n[a],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<WO.length;l++)if(WO[l](i,o))return o}return!0},t}();function XT(t){return t[0]>t[1]&&t.reverse(),t}function HO(t,e){return Nc(t,e,{includeMainTypes:nve})}var ive={grid:function(t,e){var r=t.xAxisModels,n=t.yAxisModels,i=t.gridModels,a=de(),o={},s={};!r&&!n&&!i||(R(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),R(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),R(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];R(u.getCartesians(),function(h,f){(Ee(r,h.getAxis("x").model)>=0||Ee(n,h.getAxis("y").model)>=0)&&c.push(h)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:UO.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){R(t.geoModels,function(r){var n=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:UO.geo})})}},WO=[function(t,e){var r=t.xAxisModel,n=t.yAxisModel,i=t.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],UO={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(cs(t)),e}},VS={lineX:Ie(ZO,0),lineY:Ie(ZO,1),rect:function(t,e,r,n){var i=t?e.pointToData([r[0][0],r[1][0]],n):e.dataToPoint([r[0][0],r[1][0]],n),a=t?e.pointToData([r[0][1],r[1][1]],n):e.dataToPoint([r[0][1],r[1][1]],n),o=[XT([i[0],a[0]]),XT([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=re(r,function(o){var s=t?e.pointToData(o,n):e.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 ZO(t,e,r,n){var i=r.getAxis(["x","y"][t]),a=XT(re([0,1],function(s){return e?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[t]=a,o[1-t]=[NaN,NaN],{values:a,xyMinMax:o}}var $O={lineX:Ie(YO,0),lineY:Ie(YO,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return re(t,function(n,i){return[n[0]-r[0]*e[i][0],n[1]-r[1]*e[i][1]]})}};function YO(t,e,r,n){return[e[0]-n[t]*r[0],e[1]-n[t]*r[1]]}function ave(t,e){var r=XO(t),n=XO(e),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function XO(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var qT=R,ove=FX("toolbox-dataZoom_"),sve=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new dA(i.getZr()),this._brushController.on("brush",le(this._onBrush,this)).mount()),cve(r,n,this,a,i),uve(r,n)},e.prototype.onclick=function(r,n,i){lve[i].call(this)},e.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},e.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 GA(HA(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,h){if(h.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",h,c[0]),s("y",h,c[1])):s({lineX:"x",lineY:"y"}[f],h,c)}}),Qde(a,i),this._dispatchZoomAction(i);function s(u,c,h){var f=c.getAxis(u),d=f.model,p=l(u,d,a),g=p.findRepresentativeAxisProxy(d).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(h=Ss(0,h.slice(),f.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,c,h){var f;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var p=d.getAxisModel(u,c.componentIndex);p&&(f=d)}),f}},e.prototype._dispatchZoomAction=function(r){var n=[];qT(r,function(i,a){n.push(ye(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.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:q.color.backgroundTint}};return n},e}(ti),lve={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Jde(this.ecModel))}};function HA(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function uve(t,e){t.setIconStatus("back",tve(e)>1?"emphasis":"normal")}function cve(t,e,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var o=new GA(HA(t),e,{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:t.getModel("brushStyle").getItemStyle()}:!1)}bQ("dataZoom",function(t){var e=t.getComponent("toolbox",0),r=["feature","dataZoom"];if(!e||e.get(r)==null)return;var n=e.getModel(r),i=[],a=HA(n),o=Nc(t,a);qT(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),qT(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var h=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:ove+u+h};f[c]=h,i.push(f)}return i});function hve(t){t.registerComponentModel(Ode),t.registerComponentView(zde),oc("saveAsImage",jde),oc("magicType",Fde),oc("dataView",qde),oc("dataZoom",sve),oc("restore",rve),ze(Rde)}var fve=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:q.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:q.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:q.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:q.color.tertiary,fontSize:14}},e}(Ve);function UH(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function ZH(t){if(Ze.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r<n;r++)if(t[r]in e)return t[r]}}var $H=ZH(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),dve=ZH(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function YH(t,e){if(!t)return e;e=cM(e,!0);var r=t.indexOf(e);return t=r===-1?e:"-"+t.slice(0,r)+"-"+e,t.toLowerCase()}function vve(t,e){var r=t.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t);return r?r[e]:null}var pve=YH(dve,"transition"),WA=YH($H,"transform"),gve="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Ze.transform3dSupported?"will-change:transform;":"");function mve(t){return t=t==="left"?"right":t==="right"?"left":t==="top"?"bottom":"top",t}function yve(t,e,r){if(!se(r)||r==="inside")return"";var n=t.get("backgroundColor"),i=t.get("borderWidth");e=eu(e);var a=mve(r),o=Math.max(Math.round(i)*1.5,6),s="",l=WA+":",u;Ee(["left","right"],a)>-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 c=u*Math.PI/180,h=o+i,f=h*Math.abs(Math.cos(c))+h*Math.abs(Math.sin(c)),d=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-h)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'<div style="'+g.join("")+'"></div>'}function _ve(t,e,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+t/2+"s "+n,a="opacity"+i+",visibility"+i),e||(i=" "+t+"s "+n,a+=(a.length?",":"")+(Ze.transformSupported?""+WA+i:",left"+i+",top"+i)),pve+":"+a}function qO(t,e,r){var n=t.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Ze.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Ze.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+WA+":"+o+";":[["top",0],["left",0],[$H,o]]}function xve(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont());var i=pe(t.get("lineHeight"),Math.round(r*3/2));r&&e.push("line-height:"+i+"px");var a=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),R(["decoration","align"],function(u){var c=t.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function Sve(t,e,r,n){var i=[],a=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),h=t.getModel("textStyle"),f=OV(t,"html"),d=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+d),e&&a>0&&i.push(_ve(a,r,n)),o&&i.push("background-color:"+o),R(["width","color","radius"],function(p){var g="border-"+p,m=cM(g),y=t.get(m);y!=null&&i.push(g+":"+y+(p==="color"?"":"px"))}),i.push(xve(h)),f!=null&&i.push("padding:"+Th(f).join("px ")+"px"),i.join(";")+";"}function KO(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&oY(t,o,r,n,i)}else{t[0]=n,t[1]=i;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var bve=function(){function t(e,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ze.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=r.appendTo,o=a&&(se(a)?document.querySelector(a):$l(a)?a:me(a)&&a(e.getDom()));KO(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();Yn(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var r=this._api.getDom(),n=vve(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=gve+Sve(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+qO(a[0],a[1],!0)+("border-color:"+eu(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(se(a)&&n.get("trigger")==="item"&&!UH(n)&&(s=yve(n,i,a)),se(e))o.innerHTML=e+s;else if(e){o.innerHTML="",ee(e)||(e=[e]);for(var l=0;l<e.length;l++)$l(e[l])&&e[l].parentNode!==o&&o.appendChild(e[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},t.prototype.moveTo=function(e,r){if(this.el){var n=this._styleCoord;if(KO(n,this._zr,this._container,e,r),n[0]!=null&&n[1]!=null){var i=this.el.style,a=qO(n[0],n[1]);R(a,function(o){i[o[0]]=o[1]})}}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){var e=this,r=this.el.style;this._enableDisplayTransition?(r.visibility="hidden",r.opacity="0"):r.display="none",Ze.transform3dSupported&&(r.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(le(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;sY(e&&e.painter&&e.painter.getViewportRoot(),this._container);var r=this.el;if(r){r.onmouseenter=r.onmousemove=r.onmouseleave=null;var n=r.parentNode;n&&n.removeChild(r)}this.el=this._container=null},t}(),wve=function(){function t(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),JO(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return t.prototype.update=function(e){var r=e.get("alwaysShowContent");r&&this._moveIfResized(),this._alwaysShowContent=r},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(e,r,n,i,a){var o=this;be(e)&&at(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new Xe({style:{rich:r.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:OV(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),R(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),R(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el,r=this.el.getBoundingRect(),n=QO(e.style);return[r.width+n.left+n.right,r.height+n.top+n.bottom]},t.prototype.moveTo=function(e,r){var n=this.el;if(n){var i=this._styleCoord;JO(i,this._zr,e,r),e=i[0],r=i[1];var a=n.style,o=No(a.borderWidth||0),s=QO(a);n.x=e+o+s.left,n.y=r+o+s.top,n.markRedraw()}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(le(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();function No(t){return Math.max(0,t)}function QO(t){var e=No(t.shadowBlur||0),r=No(t.shadowOffsetX||0),n=No(t.shadowOffsetY||0);return{left:No(e-r),right:No(e+r),top:No(e-n),bottom:No(e+n)}}function JO(t,e,r,n){t[0]=r,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var Tve=new Be({shape:{x:-1,y:-1,width:2,height:2}}),Cve=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){if(!(Ze.node||!n.getDom())){var i=r.getComponent("tooltip"),a=this._renderMode=YX(i.get("renderMode"));this._tooltipContent=a==="richText"?new wve(n):new bve(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},e.prototype.render=function(r,n,i){if(!(Ze.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=r,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(r),a.setEnterable(r.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&r.get("transitionDuration")?Ah(this,"_updatePosition",50,"fixRate"):sv(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var r=this._tooltipModel,n=r.get("triggerOn");PH("itemTooltip",this._api,le(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.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})})}},e.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Ze.node||!i.getDom())){var o=e5(a,i);this._ticket="";var s=a.dataByCoordSys,l=Pve(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 c=Tve;c.x=a.x,c.y=a.y,c.update(),Le(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},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 h=kH(a,n),f=h.point[0],d=h.point[1];f!=null&&d!=null&&this._tryShow({offsetX:f,offsetY:d,target:h.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))}},e.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(e5(a,i))},e.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 c=u.getData(),h=kf([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.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){var s=Le(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Pl(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(Le(c).dataIndex!=null?l=c:Le(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(r,l,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=le(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=kf([n.tooltipOption],a),l=this._renderMode,u=[],c=Kt("section",{blocks:[],noHeader:!0}),h=[],f=new S1;R(r,function(_){R(_.dataByAxis,function(S){var T=i.getComponent(S.axisDim+"Axis",S.axisIndex),C=S.value;if(!(!T||C==null)){var M=MH(C,T.axis,i,S.seriesDataIndices,S.valueLabelOpt),A=Kt("section",{header:M,noHeader:!kn(M),sortBlocks:!0,blocks:[]});c.blocks.push(A),R(S.seriesDataIndices,function(k){var E=i.getSeriesByIndex(k.seriesIndex),D=k.dataIndexInside,I=E.getDataParams(D);if(!(I.dataIndex<0)){I.axisDim=S.axisDim,I.axisIndex=S.axisIndex,I.axisType=S.axisType,I.axisId=S.axisId,I.axisValue=By(T.axis,{value:C}),I.axisValueLabel=M,I.marker=f.makeTooltipMarker("item",eu(I.color),l);var z=gI(E.formatTooltip(D,!0,null)),O=z.frag;if(O){var V=kf([E],a).get("valueFormatter");A.blocks.push(V?J({valueFormatter:V},O):O)}z.text&&h.push(z.text),u.push(I)}})}})}),c.blocks.reverse(),h.reverse();var d=n.position,p=s.get("order"),g=bI(c,f,l,p,i.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var m=l==="richText"?`
|
||
|
||
`:"<br/>",y=h.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],d,null,f)})},e.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=Le(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,h=o.dataType,f=u.getData(h),d=this._renderMode,p=r.positionDefault,g=kf([f.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),m=g.get("trigger");if(!(m!=null&&m!=="item")){var y=u.getDataParams(c,h),_=new S1;y.marker=_.makeTooltipMarker("item",eu(y.color),d);var S=gI(u.formatTooltip(c,!1,h)),T=g.get("order"),C=g.get("valueFormatter"),M=S.frag,A=M?bI(C?J({valueFormatter:C},M):M,_,d,T,a.get("useUTC"),g.get("textStyle")):S.text,k="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,A,y,k,r.offsetX,r.offsetY,r.position,r.target,_)}),i({type:"showTip",dataIndexInside:c,dataIndex:f.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=Le(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(se(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=ye(l),l.content=Zr(l.content));var h=[l],f=this._ecModel.getComponent(o.componentMainType,o.componentIndex);f&&h.push(f),h.push({formatter:l.content});var d=r.positionDefault,p=kf(h,this._tooltipModel,d?{position:d}:null),g=p.get("content"),m=Math.random()+"",y=new S1;this._showOrMove(p,function(){var _=ye(p.get("formatterParams")||{});this._showTooltipContent(p,g,_,m,r.offsetX,r.offsetY,r.position,n,y)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var h=this._tooltipContent;h.setEnterable(r.get("enterable"));var f=r.get("formatter");l=l||r.get("position");var d=n,p=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),g=p.color;if(f)if(se(f)){var m=r.ecModel.get("useUTC"),y=ee(i)?i[0]:i,_=y&&y.axisType&&y.axisType.indexOf("time")>=0;d=f,_&&(d=Uv(y.axisValue,d,m)),d=hM(d,i,!0)}else if(me(f)){var S=le(function(T,C){T===this._ticket&&(h.setContent(C,c,r,g,l),this._updatePosition(r,l,o,s,h,i,u))},this);this._ticket=a,d=f(i,a,S)}else d=f;h.setContent(d,c,r,g,l),h.show(r,g),this._updatePosition(r,l,o,s,h,i,u)}},e.prototype._getNearestPoint=function(r,n,i,a,o){if(i==="axis"||ee(n))return{color:a||o};if(!ee(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var h=o.getSize(),f=r.get("align"),d=r.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),me(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:h.slice()})),ee(n))i=oe(n[0],u),a=oe(n[1],c);else if(be(n)){var g=n;g.width=h[0],g.height=h[1];var m=bt(g,{width:u,height:c});i=m.x,a=m.y,f=null,d=null}else if(se(n)&&l){var y=Lve(n,p,h,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=Mve(i,a,o,u,c,f?null:20,d?null:20);i=y[0],a=y[1]}if(f&&(i-=t5(f)?h[0]/2:f==="right"?h[0]:0),d&&(a-=t5(d)?h[1]/2:d==="bottom"?h[1]:0),UH(r)){var y=Ave(i,a,o,u,c);i=y[0],a=y[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&R(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},h=c.dataByAxis||[];o=o&&u.length===h.length,o&&R(u,function(f,d){var p=h[d]||{},g=f.seriesDataIndices||[],m=p.seriesDataIndices||[];o=o&&f.value===p.value&&f.axisType===p.axisType&&f.axisId===p.axisId&&g.length===m.length,o&&R(g,function(y,_){var S=m[_];o=o&&y.seriesIndex===S.seriesIndex&&y.dataIndex===S.dataIndex}),a&&R(f.seriesDataIndices,function(y){var _=y.seriesIndex,S=n[_],T=a[_];S&&T&&T.data!==S.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,n){Ze.node||!n.getDom()||(sv(this,"_updatePosition"),this._tooltipContent.dispose(),GT("itemTooltip",n))},e.type="tooltip",e}(mt);function kf(t,e,r){var n=e.ecModel,i;r?(i=new We(r,n,n),i=new We(e.option,i,n)):i=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof We&&(o=o.get("tooltip",!0)),se(o)&&(o={formatter:o}),o&&(i=new We(o,i,n)))}return i}function e5(t,e){return t.dispatchAction||le(e.dispatchAction,e)}function Mve(t,e,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(t+l+a+2>n?t-=l+a:t+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[t,e]}function Ave(t,e,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return t=Math.min(t+o,n)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Lve(t,e,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+o;break;case"left":s=e.x-i-o,l=e.y+c/2-a/2;break;case"right":s=e.x+u+o,l=e.y+c/2-a/2}return[s,l]}function t5(t){return t==="center"||t==="middle"}function Pve(t,e,r){var n=E2(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=gh(e,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 c=Le(u).tooltipConfig;if(c&&c.name===t.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function kve(t){ze(ep),t.registerComponentModel(fve),t.registerComponentView(Cve),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Rt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Rt)}var Dve=["rect","polygon","keep","clear"];function Ive(t,e){var r=gt(t?t.brush:[]);if(r.length){var n=[];R(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=t&&t.toolbox;ee(i)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),Eve(s),e&&!s.length&&s.push.apply(s,Dve)}}function Eve(t){var e={};R(t,function(r){e[r]=1}),t.length=0,R(e,function(r,n){t.push(n)})}var r5=R;function n5(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function KT(t,e,r){var n={};return r5(e,function(a){var o=n[a]=i();r5(t[a],function(s,l){if(dr.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new dr(u),l==="opacity"&&(u=ye(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new dr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function XH(t,e,r){var n;R(r,function(i){e.hasOwnProperty(i)&&n5(e[i])&&(n=!0)}),n&&R(r,function(i){e.hasOwnProperty(i)&&n5(e[i])?t[i]=ye(e[i]):delete t[i]})}function Nve(t,e,r,n,i,a){var o={};R(t,function(h){var f=dr.prepareVisualTypes(e[h]);o[h]=f});var s;function l(h){return SM(r,s,h)}function u(h,f){ZV(r,s,h,f)}r.each(c);function c(h,f){s=h;var d=r.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var p=n.call(i,h),g=e[p],m=o[p],y=0,_=m.length;y<_;y++){var S=m[y];g[S]&&g[S].applyVisual(h,l,u)}}}function Rve(t,e,r,n){var i={};return R(t,function(a){var o=dr.prepareVisualTypes(e[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(C){return SM(s,h,C)}function c(C,M){ZV(s,h,C,M)}for(var h,f=s.getStore();(h=o.next())!=null;){var d=s.getRawDataItem(h);if(!(d&&d.visualMap===!1))for(var p=n!=null?f.get(l,h):h,g=r(p),m=e[g],y=i[g],_=0,S=y.length;_<S;_++){var T=y[_];m[T]&&m[T].applyVisual(p,u,c)}}}}}function Ove(t){var e=t.brushType,r={point:function(n){return i5[e].point(n,r,t)},rect:function(n){return i5[e].rect(n,r,t)}};return r}var i5={lineX:a5(0),lineY:a5(1),rect:{point:function(t,e,r){return t&&r.boundingRect.contain(t[0],t[1])},rect:function(t,e,r){return t&&r.boundingRect.intersect(t)}},polygon:{point:function(t,e,r){return t&&r.boundingRect.contain(t[0],t[1])&&yl(r.range,t[0],t[1])},rect:function(t,e,r){var n=r.range;if(!t||n.length<=1)return!1;var i=t.x,a=t.y,o=t.width,s=t.height,l=n[0];if(yl(n,i,a)||yl(n,i+o,a)||yl(n,i,a+s)||yl(n,i+o,a+s)||Ce.create(t).contain(l[0],l[1])||Hf(i,a,i+o,a,n)||Hf(i,a,i,a+s,n)||Hf(i+o,a,i+o,a+s,n)||Hf(i,a+s,i+o,a+s,n))return!0}}};function a5(t){var e=["x","y"],r=["width","height"];return{point:function(n,i,a){if(n){var o=a.range,s=n[t];return Df(s,o)}},rect:function(n,i,a){if(n){var o=a.range,s=[n[e[t]],n[e[t]]+n[r[t]]];return s[1]<s[0]&&s.reverse(),Df(s[0],o)||Df(s[1],o)||Df(o[0],s)||Df(o[1],s)}}}}function Df(t,e){return e[0]<=t&&t<=e[1]}var o5=["inBrush","outOfBrush"],FS="__ecBrushSelect",QT="__ecInBrushSelectEvent";function qH(t){t.eachComponent({mainType:"brush"},function(e){var r=e.brushTargetManager=new GA(e.option,t);r.setInputRanges(e.areas,t)})}function zve(t,e,r){var n=[],i,a;t.eachComponent({mainType:"brush"},function(o){r&&r.type==="takeGlobalCursor"&&o.setBrushOption(r.key==="brush"?r.brushOption:{brushType:!1})}),qH(t),t.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:ye(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,h=[],f=[],d=[],p=!1;s||(i=u.throttleType,a=u.throttleDelay);var g=re(o.areas,function(C){var M=Fve[C.brushType],A=Se({boundingRect:M?M(C):void 0},C);return A.selectors=Ove(A),A}),m=KT(o.option,o5,function(C){C.mappingMethod="fixed"});ee(c)&&R(c,function(C){h[C]=1});function y(C){return c==="all"||!!h[C]}function _(C){return!!C.length}t.eachSeries(function(C,M){var A=d[M]=[];C.subType==="parallel"?S(C,M):T(C,M,A)});function S(C,M){var A=C.coordinateSystem;p=p||A.hasAxisBrushed(),y(M)&&A.eachActiveState(C.getData(),function(k,E){k==="active"&&(f[E]=1)})}function T(C,M,A){if(!(!C.brushSelector||Vve(o,M))&&(R(g,function(E){o.brushTargetManager.controlSeries(E,C,t)&&A.push(E),p=p||_(A)}),y(M)&&_(A))){var k=C.getData();k.each(function(E){s5(C,A,k,E)&&(f[E]=1)})}}t.eachSeries(function(C,M){var A={seriesId:C.id,seriesIndex:M,seriesName:C.name,dataIndex:[]};l.selected.push(A);var k=d[M],E=C.getData(),D=y(M)?function(I){return f[I]?(A.dataIndex.push(E.getRawIndex(I)),"inBrush"):"outOfBrush"}:function(I){return s5(C,k,E,I)?(A.dataIndex.push(E.getRawIndex(I)),"inBrush"):"outOfBrush"};(y(M)?p:_(k))&&Nve(o5,m,E,D)})}),Bve(e,i,a,n,r)}function Bve(t,e,r,n,i){if(i){var a=t.getZr();if(!a[QT]){a[FS]||(a[FS]=jve);var o=Ah(a,FS,r,e);o(t,n)}}}function jve(t,e){if(!t.isDisposed()){var r=t.getZr();r[QT]=!0,t.dispatchAction({type:"brushSelect",batch:e}),r[QT]=!1}}function s5(t,e,r,n){for(var i=0,a=e.length;i<a;i++){var o=e[i];if(t.brushSelector(n,r,o.selectors,o))return!0}}function Vve(t,e){var r=t.option.seriesIndex;return r!=null&&r!=="all"&&(ee(r)?Ee(r,e)<0:e!==r)}var Fve={rect:function(t){return l5(t.range)},polygon:function(t){for(var e,r=t.range,n=0,i=r.length;n<i;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=r[n];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&l5(e)}};function l5(t){return new Ce(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var Gve=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new dA(n.getZr())).on("brush",le(this._onBrush,this)).mount()},e.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},e.prototype.updateTransform=function(r,n,i,a){qH(n),this._updateController(r,n,i,a)},e.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},e.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},e.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())},e.prototype.dispose=function(){this._brushController.dispose()},e.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:ye(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:ye(i),$from:n})},e.type="brush",e}(mt),Hve=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.areas=[],r.brushOption={},r}return e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&XH(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(r){r&&(this.areas=re(r,function(n){return u5(this.option,n)},this))},e.prototype.setBrushOption=function(r){this.brushOption=u5(this.option,r),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:q.color.backgroundTint,borderColor:q.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:q.color.disabled},e}(Ve);function u5(t,e){return Ne({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new We(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var Wve=["rect","polygon","lineX","lineY","keep","clear"],Uve=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.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,R(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(r,n,i){this.render(r,n,i)},e.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return R(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},e.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}})},e.getDefaultOption=function(r){var n={show:!0,type:Wve.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},e}(ti);function Zve(t){t.registerComponentView(Gve),t.registerComponentModel(Hve),t.registerPreprocessor(Ive),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,zve),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,r){r.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Rt),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Rt),oc("brush",Uve)}var $ve=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:q.size.m,backgroundColor:q.color.transparent,borderColor:q.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:q.color.primary},subtextStyle:{fontSize:12,color:q.color.quaternary}},e}(Ve),Yve=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.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=pe(r.get("textBaseline"),r.get("textVerticalAlign")),c=new Xe({style:pt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=c.getBoundingRect(),f=r.get("subtext"),d=new Xe({style:pt(s,{text:f,fill:s.getTextColor(),y:h.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=r.get("link"),g=r.get("sublink"),m=r.get("triggerEvent",!0);c.silent=!p&&!m,d.silent=!g&&!m,p&&c.on("click",function(){Ay(p,"_"+r.get("target"))}),g&&d.on("click",function(){Ay(g,"_"+r.get("subtarget"))}),Le(c).eventData=Le(d).eventData=m?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),f&&a.add(d);var y=a.getBoundingRect(),_=r.getBoxLayoutParams();_.width=y.width,_.height=y.height;var S=sr(r,i),T=bt(_,S.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?T.x+=T.width:l==="center"&&(T.x+=T.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?T.y+=T.height:u==="middle"&&(T.y+=T.height/2),u=u||"top"),a.x=T.x,a.y=T.y,a.markRedraw();var C={align:l,verticalAlign:u};c.setStyle(C),d.setStyle(C),y=a.getBoundingRect();var M=T.margin,A=r.getItemStyle(["color","opacity"]);A.fill=r.get("backgroundColor");var k=new Be({shape:{x:y.x-M[3],y:y.y-M[0],width:y.width+M[1]+M[3],height:y.height+M[0]+M[2],r:r.get("borderRadius")},style:A,subPixelOptimize:!0,silent:!0});a.add(k)}},e.type="title",e}(mt);function Xve(t){t.registerComponentModel($ve),t.registerComponentView(Yve)}var c5=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode="box",r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.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},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(r){this.option.autoPlay=!!r},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],R(n,function(u,c){var h=rr(ph(u),""),f;be(u)?(f=ye(u),f.value=c):f=c,o.push(f),a.push(h)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Yr([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:q.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:q.color.secondary},data:[]},e}(Ve),KH=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline.slider",e.defaultOption=ks(c5.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:q.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:q.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:q.color.tertiary},itemStyle:{color:q.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:q.color.accent50,borderColor:q.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:q.color.accent50,borderColor:q.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:q.color.accent60},itemStyle:{color:q.color.accent60,borderColor:q.color.accent60},controlStyle:{color:q.color.accent70,borderColor:q.color.accent70}},progress:{lineStyle:{color:q.color.accent30},itemStyle:{color:q.color.accent40}},data:[]}),e}(c5);Bt(KH,i_.prototype);var qve=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline",e}(mt),Kve=function(t){Y(e,t);function e(r,n,i,a){var o=t.call(this,r,n,i)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(gi),GS=Math.PI,h5=Fe(),Qve=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.api=n},e.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 c=l.scale.getLabel({value:u});return Kt("nameValue",{noName:!0,value:c})},R(["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()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=epe(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":se(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:GS/2},h=a==="vertical"?o.height:o.width,f=r.getModel("controlStyle"),d=f.get("show",!0),p=d?f.get("itemSize"):0,g=d?f.get("itemGap"):0,m=p+g,y=r.get(["label","rotate"])||0;y=y*GS/180;var _,S,T,C=f.get("position",!0),M=d&&f.get("showPlayBtn",!0),A=d&&f.get("showPrevBtn",!0),k=d&&f.get("showNextBtn",!0),E=0,D=h;C==="left"||C==="bottom"?(M&&(_=[0,0],E+=m),A&&(S=[E,0],E+=m),k&&(T=[D-p,0],D-=m)):(M&&(_=[D-p,0],D-=m),A&&(S=[0,0],E+=m),k&&(T=[D-p,0],D-=m));var I=[E,D];return r.get("inverse")&&I.reverse(),{viewRect:o,mainLength:h,orient:a,rotation:c[a],labelRotation:y,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:_,prevBtnPosition:S,nextBtnPosition:T,axisExtent:I,controlSize:p,controlGap:g}},e.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=fr(),l=o.x,u=o.y+o.height;zi(s,s,[-l,-u]),_o(s,s,-GS/2),zi(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),h=_(i.getBoundingRect()),f=_(a.getBoundingRect()),d=[i.x,i.y],p=[a.x,a.y];p[0]=d[0]=c[0][0];var g=r.labelPosOpt;if(g==null||se(g)){var m=g==="+"?0:1;S(d,h,c,1,m),S(p,f,c,1,1-m)}else{var m=g>=0?0:1;S(d,h,c,1,m),p[1]=d[1]+g}i.setPosition(d),a.setPosition(p),i.rotation=a.rotation=r.rotation,y(i),y(a);function y(T){T.originX=c[0][0]-T.x,T.originY=c[1][0]-T.y}function _(T){return[[T.x,T.x+T.width],[T.y,T.y+T.height]]}function S(T,C,M,A,k){T[A]+=M[A][k]-C[A][k]}},e.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=Jve(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 Kve("value",o,r.axisExtent,a);return l.model=n,l},e.prototype._createGroup=function(r){var n=this[r]=new _e;return this.group.add(n),n},e.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new Wt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:J({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Wt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Se({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],R(l,function(u){var c=i.dataToCoord(u.value),h=s.getItemModel(u.value),f=h.getModel("itemStyle"),d=h.getModel(["emphasis","itemStyle"]),p=h.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:le(o._changeTimeline,o,u.value)},m=f5(h,f,n,g);m.ensureState("emphasis").style=d.getItemStyle(),m.ensureState("progress").style=p.getItemStyle(),us(m);var y=Le(m);h.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(m)})},e.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=[],R(u,function(c){var h=c.tickValue,f=l.getItemModel(h),d=f.getModel("label"),p=f.getModel(["emphasis","label"]),g=f.getModel(["progress","label"]),m=i.dataToCoord(c.tickValue),y=new Xe({x:m,y:0,rotation:r.labelRotation-r.rotation,onclick:le(o._changeTimeline,o,h),silent:!1,style:pt(d,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});y.ensureState("emphasis").style=pt(p),y.ensureState("progress").style=pt(g),n.add(y),us(y),h5(y).dataIndex=h,o._tickLabels.push(y)})}},e.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(),c=a.getPlayState(),h=a.get("inverse",!0);f(r.nextBtnPosition,"next",le(this._changeTimeline,this,h?"-":"+")),f(r.prevBtnPosition,"prev",le(this._changeTimeline,this,h?"+":"-")),f(r.playPosition,c?"stop":"play",le(this._handlePlayClick,this,!c),!0);function f(d,p,g,m){if(d){var y=Bi(pe(a.get(["controlStyle",p+"BtnSize"]),o),o),_=[0,-y/2,y,y],S=tpe(a,p+"Icon",_,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:g});S.ensureState("emphasis").style=u,n.add(S),us(S)}}},e.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(h){h.draggable=!0,h.drift=le(u._handlePointerDrag,u),h.ondragend=le(u._handlePointerDragend,u),d5(h,u._progressLine,s,i,a,!0)},onUpdate:function(h){d5(h,u._progressLine,s,i,a)}};this._currentPointer=f5(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},e.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},e.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=Dn(a.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=i,s.dirty());var l=this._findNearestTick(i),u=this.model;(n||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var r=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var n=r.model;r._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(r){var n=this._mainGroup.getLocalTransform();return Ni(r,n,!0)},e.prototype._findNearestTick=function(r){var n=this.model.getData(),i=1/0,a,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-r);c<i&&(i=c,a=l)}),a},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(r){var n=this.model.getCurrentIndex();r==="+"?r=n+1:r==="-"&&(r=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:r,from:this.uid})},e.prototype._updateTicksStatus=function(){var r=this.model.getCurrentIndex(),n=this._tickSymbols,i=this._tickLabels;if(n)for(var a=0;a<n.length;a++)n&&n[a]&&n[a].toggleState("progress",a<r);if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",h5(i[a]).dataIndex<=r)},e.type="timeline.slider",e}(qve);function Jve(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new rh({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new zM({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new go}}function epe(t,e){return bt(t.getBoxLayoutParams(),sr(t,e).refContainer,t.get("padding"))}function tpe(t,e,r,n){var i=n.style,a=Sh(t.get(["controlStyle",e]),n||{},new Ce(r[0],r[1],r[2],r[3]));return i&&a.setStyle(i),a}function f5(t,e,r,n,i,a){var o=e.get("color");if(i)i.setColor(o),r.add(i),a&&a.onUpdate(i);else{var s=t.get("symbol");i=Ut(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),r.add(i),a&&a.onCreate(i)}var l=e.getItemStyle(["color"]);i.setStyle(l),n=Ne({rectHover:!0,z2:100},n,!0);var u=Lh(t.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=du(t.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var h=t.get("symbolRotate");return n.rotation=(h||0)*Math.PI/180||0,i.attr(n),i.updateTransform(),i}function d5(t,e,r,n,i,a){if(!t.dragging){var o=i.getModel("checkpointStyle"),s=n.dataToCoord(i.getData().get("value",r));if(a||!o.get("animation",!0))t.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};t.stopAnimation(null,!0),t.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}function rpe(t){t.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,r,n){var i=r.getComponent("timeline");return i&&e.currentIndex!=null&&(i.setCurrentIndex(e.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),r.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),Se({currentIndex:i.option.currentIndex},e)}),t.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,r){var n=r.getComponent("timeline");n&&e.playState!=null&&n.setPlayState(e.playState)})}function npe(t){var e=t&&t.timeline;ee(e)||(e=e?[e]:[]),R(e,function(r){r&&ipe(r)})}function ipe(t){var e=t.type,r={number:"value",time:"time"};if(r[e]&&(t.axisType=r[e],delete t.type),v5(t),Sl(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});Sl(n,"position")||(n.position=t.controlPosition),n.position==="none"&&!Sl(n,"show")&&(n.show=!1,delete n.position),delete t.controlPosition}R(t.data||[],function(i){be(i)&&!ee(i)&&(!Sl(i,"value")&&Sl(i,"name")&&(i.value=i.name),v5(i))})}function v5(t){var e=t.itemStyle||(t.itemStyle={}),r=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},i=n.normal||(n.normal={}),a={normal:1,emphasis:1};R(n,function(o,s){!a[s]&&!Sl(i,s)&&(i[s]=o)}),r.label&&!Sl(n,"emphasis")&&(n.emphasis=r.label,delete r.label)}function Sl(t,e){return t.hasOwnProperty(e)}function ape(t){t.registerComponentModel(KH),t.registerComponentView(Qve),t.registerSubTypeDefaulter("timeline",function(){return"slider"}),rpe(t),t.registerPreprocessor(npe)}function UA(t,e){if(!t)return!1;for(var r=ee(t)?t:[t],n=0;n<r.length;n++)if(r[n]&&r[n][e])return!0;return!1}function Zg(t){Yl(t,"label",["show"])}var $g=Fe(),Aa=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.createdBySelf=!1,r.preventAutoZ=!0,r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._mergeOption(r,i,!1,!0)},e.prototype.isAnimationEnabled=function(){if(Ze.node)return!1;var r=this.__hostSeries;return this.getShallow("animation")&&r&&r.isAnimationEnabled()},e.prototype.mergeOption=function(r,n){this._mergeOption(r,n,!1,!1)},e.prototype._mergeOption=function(r,n,i,a){var o=this.mainType;i||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=$g(s)[o];if(!l||!l.data){$g(s)[o]=null;return}u?u._mergeOption(l,n,!0):(a&&Zg(l),R(l.data,function(c){c instanceof Array?(Zg(c[0]),Zg(c[1])):Zg(c)}),u=this.createMarkerModelFromSeries(l,this,n),J(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),$g(s)[o]=u},this)},e.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Kt("section",{header:this.name,blocks:[Kt("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(r){this._data=r},e.prototype.getDataParams=function(r,n){var i=i_.prototype.getDataParams.call(this,r,n),a=this.__hostSeries;return a&&(i.seriesId=a.id,i.seriesName=a.name,i.seriesType=a.subType),i},e.getMarkerModelFromSeries=function(r,n){return $g(r)[n]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(Ve);Bt(Aa,i_.prototype);var ope=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(Aa);function JT(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function spe(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function Yg(t,e,r,n,i,a,o){var s=[],l=po(e,i),u=l?e.getCalculationInfo("stackResultDimension"):i,c=l0(e,u,t),h=e.hostModel,f=h.indicesOfNearest(r,u,c)[0];s[a]=e.get(n,f),s[o]=e.get(u,f);var d=e.get(i,f),p=Li(e.get(i,f));return p=Math.min(p,20),p>=0&&(s[o]=+s[o].toFixed(p)),[s,d]}var Xg={min:Ie(Yg,"min"),max:Ie(Yg,"max"),average:Ie(Yg,"average"),median:Ie(Yg,"median")};function wv(t,e){if(e){var r=t.getData(),n=t.coordinateSystem,i=n&&n.dimensions;if(!spe(e)&&!ee(e.coord)&&ee(i)){var a=QH(e,r,n,t);if(e=ye(e),e.type&&Xg[e.type]&&a.baseAxis&&a.valueAxis){var o=Ee(i,a.baseAxis.dim),s=Ee(i,a.valueAxis.dim),l=Xg[e.type](r,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!ee(i)){e.coord=[];var u=t.getBaseAxis();if(u&&e.type&&Xg[e.type]){var c=n.getOtherAxis(u);c&&(e.value=l0(r,r.mapDimension(c.dim),e.type))}}else for(var h=e.coord,f=0;f<2;f++)Xg[h[f]]&&(h[f]=l0(r,r.mapDimension(i[f]),h[f]));return e}}function QH(t,e,r,n){var i={};return t.valueIndex!=null||t.valueDim!=null?(i.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=r.getAxis(lpe(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function lpe(t,e){var r=t.getData().getDimensionInfo(e);return r&&r.coordDim}function Tv(t,e){return t&&t.containData&&e.coord&&!JT(e)?t.containData(e.coord):!0}function upe(t,e,r){return t&&t.containZone&&e.coord&&r.coord&&!JT(e)&&!JT(r)?t.containZone(e.coord,r.coord):!0}function JH(t,e){return t?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return fs(o,e[a])}:function(r,n,i,a){return fs(r.value,e[a])}}function l0(t,e,r){if(r==="average"){var n=0,i=0;return t.each(e,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?t.getMedian(e):t.getDataExtent(e)[r==="max"?1:0]}var HS=Fe(),ZA=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this.markerGroupMap=de()},e.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){HS(s).keep=!1}),n.eachSeries(function(s){var l=Aa.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!HS(s).keep&&a.group.remove(s.group)}),cpe(n,o,this.type)},e.prototype.markKeep=function(r){HS(r).keep=!0},e.prototype.toggleBlurSeries=function(r,n){var i=this;R(r,function(a){var o=Aa.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?vj(l):F2(l))})}})},e.type="marker",e}(mt);function cpe(t,e,r){t.eachSeries(function(n){var i=Aa.getMarkerModelFromSeries(n,r),a=e.get(n.id);if(i&&a&&a.group){var o=Jl(i),s=o.z,l=o.zlevel;e_(a.group,s,l)}})}function p5(t,e,r){var n=e.coordinateSystem,i=r.getWidth(),a=r.getHeight(),o=n&&n.getArea&&n.getArea();t.each(function(s){var l=t.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:i,h=u?o?o.height:0:a,f=u&&o?o.x:0,d=u&&o?o.y:0,p,g=oe(l.get("x"),c)+f,m=oe(l.get("y"),h)+d;if(!isNaN(g)&&!isNaN(m))p=[g,m];else if(e.getMarkerPosition)p=e.getMarkerPosition(t.getValues(t.dimensions,s));else if(n){var y=t.get(n.dimensions[0],s),_=t.get(n.dimensions[1],s);p=n.dataToPoint([y,_])}isNaN(g)||(p[0]=g),isNaN(m)||(p[1]=m),t.setItemLayout(s,p)})}var hpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Aa.getMarkerModelFromSeries(a,"markPoint");o&&(p5(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new qv),h=fpe(o,r,n);n.setData(h),p5(n.getData(),r,a),h.each(function(f){var d=h.getItemModel(f),p=d.getShallow("symbol"),g=d.getShallow("symbolSize"),m=d.getShallow("symbolRotate"),y=d.getShallow("symbolOffset"),_=d.getShallow("symbolKeepAspect");if(me(p)||me(g)||me(m)||me(y)){var S=n.getRawValue(f),T=n.getDataParams(f);me(p)&&(p=p(S,T)),me(g)&&(g=g(S,T)),me(m)&&(m=m(S,T)),me(y)&&(y=y(S,T))}var C=d.getModel("itemStyle").getItemStyle(),M=d.get("z2"),A=$v(l,"color");C.fill||(C.fill=A),h.setItemVisual(f,{z2:pe(M,0),symbol:p,symbolSize:g,symbolRotate:m,symbolOffset:y,symbolKeepAspect:_,style:C})}),c.updateData(h),this.group.add(c.group),h.eachItemGraphicEl(function(f){f.traverse(function(d){Le(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markPoint",e}(ZA);function fpe(t,e,r){var n;t?n=re(t&&t.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return J(J({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Yr(n,r),a=re(r.get("data"),Ie(wv,e));t&&(a=tt(a,Ie(Tv,t)));var o=JH(!!t,n);return i.initData(a,null,o),i}function dpe(t){t.registerComponentModel(ope),t.registerComponentView(hpe),t.registerPreprocessor(function(e){UA(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var vpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Aa),qg=Fe(),ppe=function(t,e,r,n){var i=t.getData(),a;if(ee(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=e.getAxis(n.yAxis!=null?"y":"x"),l=br(n.yAxis,n.xAxis);else{var u=QH(n,i,e,t);s=u.valueAxis;var c=NM(i,u.valueDataDim);l=l0(i,c,o)}var h=s.dim==="x"?0:1,f=1-h,d=ye(n),p={coord:[]};d.type=null,d.coord=[],d.coord[f]=-1/0,p.coord[f]=1/0;var g=r.get("precision");g>=0&&qe(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[h]=p.coord[h]=l,a=[d,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var m=[wv(t,a[0]),wv(t,a[1]),J({},a[2])];return m[2].type=m[2].type||null,Ne(m[2],m[0]),Ne(m[2],m[1]),m};function u0(t){return!isNaN(t)&&!isFinite(t)}function g5(t,e,r,n){var i=1-t,a=n.dimensions[t];return u0(e[i])&&u0(r[i])&&e[t]===r[t]&&n.getAxis(a).containData(e[t])}function gpe(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,n=e[1].coord;if(r&&n&&(g5(1,r,n,t)||g5(0,r,n,t)))return!0}return Tv(t,e[0])&&Tv(t,e[1])}function WS(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=oe(o.get("x"),i.getWidth()),u=oe(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,h=t.get(c[0],e),f=t.get(c[1],e);s=a.dataToPoint([h,f])}if(xs(a,"cartesian2d")){var d=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;u0(t.get(c[0],e))?s[0]=d.toGlobalCoord(d.getExtent()[r?0:1]):u0(t.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}var mpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Aa.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=qg(o).from,u=qg(o).to;l.each(function(c){WS(l,c,!0,a,i),WS(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new hA);this.group.add(c.group);var h=ype(o,r,n),f=h.from,d=h.to,p=h.line;qg(n).from=f,qg(n).to=d,n.setData(p);var g=n.get("symbol"),m=n.get("symbolSize"),y=n.get("symbolRotate"),_=n.get("symbolOffset");ee(g)||(g=[g,g]),ee(m)||(m=[m,m]),ee(y)||(y=[y,y]),ee(_)||(_=[_,_]),h.from.each(function(T){S(f,T,!0),S(d,T,!1)}),p.each(function(T){var C=p.getItemModel(T),M=C.getModel("lineStyle").getLineStyle();p.setItemLayout(T,[f.getItemLayout(T),d.getItemLayout(T)]);var A=C.get("z2");M.stroke==null&&(M.stroke=f.getItemVisual(T,"style").fill),p.setItemVisual(T,{z2:pe(A,0),fromSymbolKeepAspect:f.getItemVisual(T,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(T,"symbolOffset"),fromSymbolRotate:f.getItemVisual(T,"symbolRotate"),fromSymbolSize:f.getItemVisual(T,"symbolSize"),fromSymbol:f.getItemVisual(T,"symbol"),toSymbolKeepAspect:d.getItemVisual(T,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(T,"symbolOffset"),toSymbolRotate:d.getItemVisual(T,"symbolRotate"),toSymbolSize:d.getItemVisual(T,"symbolSize"),toSymbol:d.getItemVisual(T,"symbol"),style:M})}),c.updateData(p),h.line.eachItemGraphicEl(function(T){Le(T).dataModel=n,T.traverse(function(C){Le(C).dataModel=n})});function S(T,C,M){var A=T.getItemModel(C);WS(T,C,M,r,a);var k=A.getModel("itemStyle").getItemStyle();k.fill==null&&(k.fill=$v(l,"color")),T.setItemVisual(C,{symbolKeepAspect:A.get("symbolKeepAspect"),symbolOffset:pe(A.get("symbolOffset",!0),_[M?0:1]),symbolRotate:pe(A.get("symbolRotate",!0),y[M?0:1]),symbolSize:pe(A.get("symbolSize"),m[M?0:1]),symbol:pe(A.get("symbol",!0),g[M?0:1]),style:k})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markLine",e}(ZA);function ype(t,e,r){var n;t?n=re(t&&t.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return J(J({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Yr(n,r),a=new Yr(n,r),o=new Yr([],r),s=re(r.get("data"),Ie(ppe,e,t,r));t&&(s=tt(s,Ie(gpe,t)));var l=JH(!!t,n);return i.initData(re(s,function(u){return u[0]}),null,l),a.initData(re(s,function(u){return u[1]}),null,l),o.initData(re(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function _pe(t){t.registerComponentModel(vpe),t.registerComponentView(mpe),t.registerPreprocessor(function(e){UA(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var xpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Aa),Kg=Fe(),Spe=function(t,e,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=wv(t,i),s=wv(t,a),l=o.coord,u=s.coord;l[0]=br(l[0],-1/0),l[1]=br(l[1],-1/0),u[0]=br(u[0],1/0),u[1]=br(u[1],1/0);var c=z0([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function c0(t){return!isNaN(t)&&!isFinite(t)}function m5(t,e,r,n){var i=1-t;return c0(e[i])&&c0(r[i])}function bpe(t,e){var r=e.coord[0],n=e.coord[1],i={coord:r,x:e.x0,y:e.y0},a={coord:n,x:e.x1,y:e.y1};return xs(t,"cartesian2d")?r&&n&&(m5(1,r,n)||m5(0,r,n))?!0:upe(t,i,a):Tv(t,i)||Tv(t,a)}function y5(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=oe(o.get(r[0]),i.getWidth()),u=oe(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=t.getValues(["x0","y0"],e),h=t.getValues(["x1","y1"],e),f=a.clampData(c),d=a.clampData(h),p=[];r[0]==="x0"?p[0]=f[0]>d[0]?h[0]:c[0]:p[0]=f[0]>d[0]?c[0]:h[0],r[1]==="y0"?p[1]=f[1]>d[1]?h[1]:c[1]:p[1]=f[1]>d[1]?c[1]:h[1],s=n.getMarkerPosition(p,r,!0)}else{var g=t.get(r[0],e),m=t.get(r[1],e),y=[g,m];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(xs(a,"cartesian2d")){var _=a.getAxis("x"),S=a.getAxis("y"),g=t.get(r[0],e),m=t.get(r[1],e);c0(g)?s[0]=_.toGlobalCoord(_.getExtent()[r[0]==="x0"?0:1]):c0(m)&&(s[1]=S.toGlobalCoord(S.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var _5=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],wpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Aa.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=re(_5,function(h){return y5(s,l,h,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new _e});this.group.add(c.group),this.markKeep(c);var h=Tpe(o,r,n);n.setData(h),h.each(function(f){var d=re(_5,function(D){return y5(h,f,D,r,a)}),p=o.getAxis("x").scale,g=o.getAxis("y").scale,m=p.getExtent(),y=g.getExtent(),_=[p.parse(h.get("x0",f)),p.parse(h.get("x1",f))],S=[g.parse(h.get("y0",f)),g.parse(h.get("y1",f))];Dn(_),Dn(S);var T=!(m[0]>_[1]||m[1]<_[0]||y[0]>S[1]||y[1]<S[0]),C=!T;h.setItemLayout(f,{points:d,allClipped:C});var M=h.getItemModel(f),A=M.getModel("itemStyle").getItemStyle(),k=M.get("z2"),E=$v(l,"color");A.fill||(A.fill=E,se(A.fill)&&(A.fill=Kd(A.fill,.4))),A.stroke||(A.stroke=E),h.setItemVisual(f,"style",A),h.setItemVisual(f,"z2",pe(k,0))}),h.diff(Kg(c).data).add(function(f){var d=h.getItemLayout(f),p=h.getItemVisual(f,"z2");if(!d.allClipped){var g=new zr({z2:pe(p,0),shape:{points:d.points}});h.setItemGraphicEl(f,g),c.group.add(g)}}).update(function(f,d){var p=Kg(c).data.getItemGraphicEl(d),g=h.getItemLayout(f),m=h.getItemVisual(f,"z2");g.allClipped?p&&c.group.remove(p):(p?Qe(p,{z2:pe(m,0),shape:{points:g.points}},n,f):p=new zr({shape:{points:g.points}}),h.setItemGraphicEl(f,p),c.group.add(p))}).remove(function(f){var d=Kg(c).data.getItemGraphicEl(f);c.group.remove(d)}).execute(),h.eachItemGraphicEl(function(f,d){var p=h.getItemModel(d),g=h.getItemVisual(d,"style");f.useStyle(h.getItemVisual(d,"style")),vr(f,ar(p),{labelFetcher:n,labelDataIndex:d,defaultText:h.getName(d)||"",inheritColor:se(g.fill)?Kd(g.fill,1):q.color.neutral99}),ir(f,p),wt(f,null,null,p.get(["emphasis","disabled"])),Le(f).dataModel=n}),Kg(c).data=h,c.group.silent=n.get("silent")||r.get("silent")},e.type="markArea",e}(ZA);function Tpe(t,e,r){var n,i,a=["x0","y0","x1","y1"];if(t){var o=re(t&&t.dimensions,function(u){var c=e.getData(),h=c.getDimensionInfo(c.mapDimension(u))||{};return J(J({},h),{name:u,ordinalMeta:null})});i=re(a,function(u,c){return{name:u,type:o[c%2].type}}),n=new Yr(i,r)}else i=[{name:"value",type:"float"}],n=new Yr(i,r);var s=re(r.get("data"),Ie(Spe,e,t,r));t&&(s=tt(s,Ie(bpe,t)));var l=t?function(u,c,h,f){var d=u.coord[Math.floor(f/2)][f%2];return fs(d,i[f])}:function(u,c,h,f){return fs(u.value,i[f])};return n.initData(s,null,l),n.hasItemOption=!0,n}function Cpe(t){t.registerComponentModel(xpe),t.registerComponentView(wpe),t.registerPreprocessor(function(e){UA(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var Mpe=function(t,e){if(e==="all")return{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}},eC=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},e.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),ee(n)&&R(n,function(a,o){se(a)&&(a={type:a}),n[o]=Ne(a,Mpe(i,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},e.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var h=l.legendVisualProvider,f=h.getAllNames();r.isSeriesFiltered(l)||(i=i.concat(f)),f.length?n=n.concat(f):c=!0}else c=!0;c&&I2(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=de(),s=re(a,function(l){return(se(l)||qe(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new We(l,this,this.ecModel))},this);this._data=tt(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;R(a,function(o){n[o.get("name")]=!1})}n[r]=!0},e.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},e.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},e.prototype.allSelect=function(){var r=this._data,n=this.option.selected;R(r,function(i){n[i.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;R(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},e.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&Ee(this._availableNames,r)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:q.size.m,align:"auto",backgroundColor:q.color.transparent,borderColor:q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:q.color.disabled,inactiveBorderColor:q.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:q.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:q.color.tertiary,borderWidth:1,borderColor:q.color.border},emphasis:{selectorLabel:{show:!0,color:q.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(Ve),Ku=Ie,tC=R,Qg=_e,e8=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new Qg),this.group.add(this._selectorGroup=new Qg),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.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 c=sr(r,i).refContainer,h=r.getBoxLayoutParams(),f=r.get("padding"),d=bt(h,c,f),p=this.layoutInner(r,o,d,a,l,u),g=bt(Se({width:p.width,height:p.height},h),c,f);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=GH(p,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=de(),h=n.get("selectedMode"),f=n.get("triggerEvent"),d=[];i.eachRawSeries(function(p){!p.get("legendHoverLink")&&d.push(p.id)}),tC(n.getData(),function(p,g){var m=this,y=p.get("name");if(!this.newlineDisabled&&(y===""||y===`
|
||
`)){var _=new Qg;_.newline=!0,u.add(_);return}var S=i.getSeriesByName(y)[0];if(!c.get(y))if(S){var T=S.getData(),C=T.getVisual("legendLineStyle")||{},M=T.getVisual("legendIcon"),A=T.getVisual("style"),k=this._createItem(S,y,g,p,n,r,C,A,M,h,a);k.on("click",Ku(x5,y,null,a,d)).on("mouseover",Ku(rC,S.name,null,a,d)).on("mouseout",Ku(nC,S.name,null,a,d)),i.ssr&&k.eachChild(function(E){var D=Le(E);D.seriesIndex=S.seriesIndex,D.dataIndex=g,D.ssrType="legend"}),f&&k.eachChild(function(E){m.packEventData(E,n,S,g,y)}),c.set(y,!0)}else i.eachRawSeries(function(E){var D=this;if(!c.get(y)&&E.legendVisualProvider){var I=E.legendVisualProvider;if(!I.containName(y))return;var z=I.indexOfName(y),O=I.getItemVisual(z,"style"),V=I.getItemVisual(z,"legendIcon"),G=$r(O.fill);G&&G[3]===0&&(G[3]=.2,O=J(J({},O),{fill:oi(G,"rgba")}));var F=this._createItem(E,y,g,p,n,r,{},O,V,h,a);F.on("click",Ku(x5,null,y,a,d)).on("mouseover",Ku(rC,null,y,a,d)).on("mouseout",Ku(nC,null,y,a,d)),i.ssr&&F.eachChild(function(U){var j=Le(U);j.seriesIndex=E.seriesIndex,j.dataIndex=g,j.ssrType="legend"}),f&&F.eachChild(function(U){D.packEventData(U,n,E,g,y)}),c.set(y,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};Le(r).eventData=s},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();tC(r,function(u){var c=u.type,h=new Xe({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(h);var f=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);vr(h,{normal:f,emphasis:d},{defaultText:u.title}),us(h)})},e.prototype._createItem=function(r,n,i,a,o,s,l,u,c,h,f){var d=r.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),m=o.isSelected(n),y=a.get("symbolRotate"),_=a.get("symbolKeepAspect"),S=a.get("icon");c=S||c||"roundRect";var T=Ape(c,a,l,u,d,m,f),C=new Qg,M=a.getModel("textStyle");if(me(r.getLegendIcon)&&(!S||S==="inherit"))C.add(r.getLegendIcon({itemWidth:p,itemHeight:g,icon:c,iconRotate:y,itemStyle:T.itemStyle,lineStyle:T.lineStyle,symbolKeepAspect:_}));else{var A=S==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;C.add(Lpe({itemWidth:p,itemHeight:g,icon:c,iconRotate:A,itemStyle:T.itemStyle,symbolKeepAspect:_}))}var k=s==="left"?p+5:-5,E=s,D=o.get("formatter"),I=n;se(D)&&D?I=D.replace("{name}",n??""):me(D)&&(I=D(n));var z=m?M.getTextColor():a.get("inactiveColor");C.add(new Xe({style:pt(M,{text:I,x:k,y:g/2,fill:z,align:E,verticalAlign:"middle"},{inheritColor:z})}));var O=new Be({shape:C.getBoundingRect(),style:{fill:"transparent"}}),V=a.getModel("tooltip");return V.get("show")&&So({el:O,componentModel:o,itemName:n,itemTooltipOption:V.option}),C.add(O),C.eachChild(function(G){G.silent=!0}),O.silent=!h,this.getContentGroup().add(C),us(C),C.__legendDataIndex=i,C},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();zl(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),h=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){zl("horizontal",u,r.get("selectorItemGap",!0));var f=u.getBoundingRect(),d=[-f.x,-f.y],p=r.get("selectorButtonGap",!0),g=r.getOrient().index,m=g===0?"width":"height",y=g===0?"height":"width",_=g===0?"y":"x";s==="end"?d[g]+=c[m]+p:h[g]+=f[m]+p,d[1-g]+=c[y]/2-f[y]/2,u.x=d[0],u.y=d[1],l.x=h[0],l.y=h[1];var S={x:0,y:0};return S[m]=c[m]+p+f[m],S[y]=Math.max(c[y],f[y]),S[_]=Math.min(0,f[_]+d[1-g]),S}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(mt);function Ape(t,e,r,n,i,a,o){function s(m,y){m.lineWidth==="auto"&&(m.lineWidth=y.lineWidth>0?2:0),tC(m,function(_,S){m[S]==="inherit"&&(m[S]=y[S])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=t.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?n.decal:th(h,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var f=e.getModel("lineStyle"),d=f.getLineStyle();if(s(d,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=f.get("inactiveColor"),d.lineWidth=f.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function Lpe(t){var e=t.icon||"roundRect",r=Ut(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=q.color.neutral00,r.style.lineWidth=2),r}function x5(t,e,r,n){nC(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),rC(t,e,r,n)}function t8(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;n<i&&!(r=e[n].states.emphasis);)n++;return r&&r.hoverLayer}function rC(t,e,r,n){t8(r)||r.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function nC(t,e,r,n){t8(r)||r.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function Ppe(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(r){for(var n=0;n<e.length;n++)if(!e[n].isSelected(r.name))return!1;return!0})}function If(t,e,r){var n=t==="allSelect"||t==="inverseSelect",i={},a=[];r.eachComponent({mainType:"legend",query:e},function(s){n?s[t]():s[t](e.name),S5(s,i),a.push(s.componentIndex)});var o={};return r.eachComponent("legend",function(s){R(i,function(l,u){s[l?"select":"unSelect"](u)}),S5(s,o)}),n?{selected:o,legendIndex:a}:{name:e.name,selected:o}}function S5(t,e){var r=e||{};return R(t.getData(),function(n){var i=n.get("name");if(!(i===`
|
||
`||i==="")){var a=t.isSelected(i);he(r,i)?r[i]=r[i]&&a:r[i]=a}}),r}function kpe(t){t.registerAction("legendToggleSelect","legendselectchanged",Ie(If,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",Ie(If,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",Ie(If,"inverseSelect")),t.registerAction("legendSelect","legendselected",Ie(If,"select")),t.registerAction("legendUnSelect","legendunselected",Ie(If,"unSelect"))}function r8(t){t.registerComponentModel(eC),t.registerComponentView(e8),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,Ppe),t.registerSubTypeDefaulter("legend",function(){return"plain"}),kpe(t)}var Dpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},e.prototype.init=function(r,n,i){var a=hu(r);t.prototype.init.call(this,r,n,i),b5(this,r,a)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),b5(this,this.option,r)},e.type="legend.scroll",e.defaultOption=ks(eC.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:q.color.accent50,pageIconInactiveColor:q.color.accent10,pageIconSize:15,pageTextStyle:{color:q.color.tertiary},animationDurationUpdate:800}),e}(eC);function b5(t,e,r){var n=t.getOrient(),i=[1,1];i[n.index]=0,Ca(e,r,{type:"box",ignoreSize:!!i})}var w5=_e,US=["width","height"],ZS=["x","y"],Ipe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!0,r._currentIndex=0,r}return e.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new w5),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new w5)},e.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this;t.prototype.renderInner.call(this,r,n,i,a,o,s,l);var c=this._controllerGroup,h=n.get("pageIconSize",!0),f=ee(h)?h:[h,h];p("pagePrev",0);var d=n.getModel("pageTextStyle");c.add(new Xe({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(g,m){var y=g+"DataIndex",_=Sh(n.get("pageIcons",!0)[n.getOrient().name][m],{onclick:le(u._pageGo,u,y,n,a)},{x:-f[0]/2,y:-f[1]/2,width:f[0],height:f[1]});_.name=g,c.add(_)}},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,c=US[u],h=ZS[u],f=US[1-u],d=ZS[1-u];o&&zl("horizontal",l,r.get("selectorItemGap",!0));var p=r.get("selectorButtonGap",!0),g=l.getBoundingRect(),m=[-g.x,-g.y],y=ye(i);o&&(y[c]=i[c]-g[c]-p);var _=this._layoutContentAndController(r,a,y,u,c,f,d,h);if(o){if(s==="end")m[u]+=_[c]+p;else{var S=g[c]+p;m[u]-=S,_[h]-=S}_[c]+=g[c]+p,m[1-u]+=_[d]+_[f]/2-g[f]/2,_[f]=Math.max(_[f],g[f]),_[d]=Math.min(_[d],g[d]+m[1-u]),l.x=m[0],l.y=m[1],l.markRedraw()}return _},e.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,u){var c=this.getContentGroup(),h=this._containerGroup,f=this._controllerGroup;zl(r.get("orient"),c,r.get("itemGap"),a?i.width:null,a?null:i.height),zl("horizontal",f,r.get("pageButtonItemGap",!0));var d=c.getBoundingRect(),p=f.getBoundingRect(),g=this._showController=d[o]>i[o],m=[-d.x,-d.y];n||(m[a]=c[u]);var y=[0,0],_=[-p.x,-p.y],S=pe(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var T=r.get("pageButtonPosition",!0);T==="end"?_[a]+=i[o]-p[o]:y[a]+=p[o]+S}_[1-a]+=d[s]/2-p[s]/2,c.setPosition(m),h.setPosition(y),f.setPosition(_);var C={x:0,y:0};if(C[o]=g?i[o]:d[o],C[s]=Math.max(d[s],p[s]),C[l]=Math.min(0,p[l]+_[1-a]),h.__rectSize=i[o],g){var M={x:0,y:0};M[o]=Math.max(i[o]-p[o]-S,0),M[s]=C[s],h.setClipPath(new Be({shape:M})),h.__rectSize=M[o]}else f.eachChild(function(k){k.attr({invisible:!0,silent:!0})});var A=this._getPageInfo(r);return A.pageIndex!=null&&Qe(c,{x:A.contentPosition[0],y:A.contentPosition[1]},g?r:null),this._updatePageInfoView(r,A),C},e.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;R(["pagePrev","pageNext"],function(c){var h=c+"DataIndex",f=n[h]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",f?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=f?"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",se(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=US[o],l=ZS[o],u=this._findTargetItemIndex(n),c=i.children(),h=c[u],f=c.length,d=f?1:0,p={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var g=T(h);p.contentPosition[o]=-g.s;for(var m=u+1,y=g,_=g,S=null;m<=f;++m)S=T(c[m]),(!S&&_.e>y.s+a||S&&!C(S,y.s))&&(_.i>y.i?y=_:y=S,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),_=S;for(var m=u-1,y=g,_=g,S=null;m>=-1;--m)S=T(c[m]),(!S||!C(_,S.s))&&y.i<_.i&&(_=y,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=y.i),++p.pageCount,++p.pageIndex),y=S;return p;function T(M){if(M){var A=M.getBoundingRect(),k=A[l]+M[l];return{s:k,e:k+A[s],i:M.__legendDataIndex}}}function C(M,A){return M.e>=A&&M.s<=A+a}},e.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},e.type="legend.scroll",e}(e8);function Epe(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function Npe(t){ze(r8),t.registerComponentModel(Dpe),t.registerComponentView(Ipe),Epe(t)}function Rpe(t){ze(r8),ze(Npe)}var Ope=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.inside",e.defaultOption=ks(bv.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(bv),$A=Fe();function zpe(t,e,r){$A(t).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=r)})}function Bpe(t,e){for(var r=$A(t).coordSysRecordMap,n=r.keys(),i=0;i<n.length;i++){var a=n[i],o=r.get(a),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||n8(r,o))}}}function n8(t,e){if(e){t.removeKey(e.model.uid);var r=e.controller;r&&r.dispose()}}function jpe(t,e){var r={model:e,containsPoint:Ie(Fpe,e),dispatchAction:Ie(Vpe,t),dataZoomInfoMap:null,controller:null},n=r.controller=new pu(t.getZr());return R(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var o=[];r.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,r.model.mainType,r.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&r.dispatchAction(o)})}),r}function Vpe(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Fpe(t,e,r,n){return t.coordinateSystem.containPoint([r,n])}function Gpe(t,e,r){var n,i="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return t.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;a[i+u]>a[i+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:r,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function Hpe(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(e,r){var n=$A(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=de());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=jH(a);R(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,jpe(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=de());c.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){n8(i,a);return}var c=Gpe(l,a,r);o.enable(c.controlType,c.opt),Ah(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Wpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return e.prototype.render=function(r,n,i){if(t.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),zpe(i,r,{pan:le($S.pan,this),zoom:le($S.zoom,this),scrollMove:le($S.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Bpe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(jA),$S={zoom:function(t,e,r,n){var i=this.range,a=i.slice(),o=t.axisModels[0];if(o){var s=YS[e](null,[n.originX,n.originY],o,r,t),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 c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Ss(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:T5(function(t,e,r,n,i,a){var o=YS[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:T5(function(t,e,r,n,i,a){var o=YS[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*a.scrollDelta})};function T5(t){return function(e,r,n,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=t(o,s,e,r,n,i);if(Ss(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var YS={grid:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return t=t||[0,0],a.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return t=t||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function i8(t){VA(t),t.registerComponentModel(Ope),t.registerComponentView(Wpe),Hpe(t)}var Upe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=ks(bv.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:q.color.accent10,borderRadius:0,backgroundColor:q.color.transparent,dataBackground:{lineStyle:{color:q.color.accent30,width:.5},areaStyle:{color:q.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:q.color.accent40,width:.5},areaStyle:{color:q.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:q.color.neutral00,borderColor:q.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:q.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:q.color.tertiary},brushSelect:!0,brushStyle:{color:q.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:q.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e}(bv),Ef=Be,Zpe=1,XS=30,$pe=7,Nf="horizontal",C5="vertical",Ype=5,Xpe=["line","bar","candlestick","scatter"],qpe={easing:"cubicOut",duration:100,delay:0},Kpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._displayables={},r}return e.prototype.init=function(r,n){this.api=n,this._onBrush=le(this._onBrush,this),this._onBrushEnd=le(this._onBrushEnd,this)},e.prototype.render=function(r,n,i,a){if(t.prototype.render.apply(this,arguments),Ah(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()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){sv(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},e.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 _e;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?$pe:0,o=sr(r,n).refContainer,s=this._findCoordRect(),l=r.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Nf?{right:o.width-s.x-s.width,top:o.height-XS-l-a,width:s.width,height:XS}:{right:l,top:s.y,width:XS,height:s.height},c=hu(r.option);R(["right","top","width","height"],function(f){c[f]==="ph"&&(c[f]=u[f])});var h=bt(c,o);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===C5&&this._size.reverse()},e.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===Nf&&!o?{scaleY:l?1:-1,scaleX:1}:i===Nf&&o?{scaleY:l?1:-1,scaleX:-1}:i===C5&&!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()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new Ef({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Ef({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:le(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)},e.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,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var h=o.getDataExtent(r.thisDim),f=o.getDataExtent(l),d=(f[1]-f[0])*.3;f=[f[0]-d,f[1]+d];var p=[0,n[1]],g=[0,n[0]],m=[[n[0],0],[0,0]],y=[],_=g[1]/Math.max(1,o.count()-1),S=n[0]/(h[1]-h[0]),T=r.thisAxis.type==="time",C=-_,M=Math.round(o.count()/n[0]),A;o.each([r.thisDim,l],function(z,O,V){if(M>0&&V%M){T||(C+=_);return}C=T?(+z-h[0])*S:C+_;var G=O==null||isNaN(O)||O==="",F=G?0:it(O,f,p,!0);G&&!A&&V?(m.push([m[m.length-1][0],0]),y.push([y[y.length-1][0],0])):!G&&A&&(m.push([C,0]),y.push([C,0])),G||(m.push([C,F]),y.push([C,F])),A=G}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var k=this.dataZoomModel;function E(z){var O=k.getModel(z?"selectedDataBackground":"dataBackground"),V=new _e,G=new zr({shape:{points:u},segmentIgnoreThreshold:1,style:O.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),F=new Tr({shape:{points:c},segmentIgnoreThreshold:1,style:O.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return V.add(G),V.add(F),V}for(var D=0;D<3;D++){var I=E(D===1);this._displayables.sliderGroup.add(I),this._displayables.dataShadowSegs.push(I)}},e.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();R(l,function(u){if(!i&&!(n!==!0&&Ee(Xpe,u.get("type"))<0)){var c=a.getComponent(qo(o),s).axis,h=Qpe(o),f,d=u.coordinateSystem;h!=null&&d.getOtherAxis&&(f=d.getOtherAxis(c).inverse),h=u.getData().mapDimension(h);var p=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:p,otherDim:h,otherAxisInverse:f}}},this)},this),i}},e.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,c=l.get("borderRadius")||0,h=l.get("brushSelect"),f=n.filler=new Ef({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(f),o.add(new Ef({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Zpe,fill:q.color.transparent}})),R([0,1],function(S){var T=l.get("handleIcon");!ky[T]&&T.indexOf("path://")<0&&T.indexOf("image://")<0&&(T="path://"+T);var C=Ut(T,-1,0,2,2,null,!0);C.attr({cursor:Jpe(this._orient),draggable:!0,drift:le(this._onDragMove,this,S),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1),z2:5});var M=C.getBoundingRect(),A=l.get("handleSize");this._handleHeight=oe(A,this._size[1]),this._handleWidth=M.width/M.height*this._handleHeight,C.setStyle(l.getModel("handleStyle").getItemStyle()),C.style.strokeNoScale=!0,C.rectHover=!0,C.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),us(C);var k=l.get("handleColor");k!=null&&(C.style.fill=k),o.add(i[S]=C);var E=l.getModel("textStyle"),D=l.get("handleLabel")||{},I=D.show||!1;r.add(a[S]=new Xe({silent:!0,invisible:!I,style:pt(E,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:E.getTextColor(),font:E.getFont()}),z2:10}))},this);var d=f;if(h){var p=oe(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new Be({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),m=p*.8,y=n.moveHandleIcon=Ut(l.get("moveHandleIcon"),-m/2,-m/2,m,m,q.color.neutral00,!0);y.silent=!0,y.y=s[1]+p/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var _=Math.min(s[1]/2,Math.max(p,10));d=n.moveZone=new Be({invisible:!0,shape:{y:s[1]-_,height:p+_}}),d.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(y),o.add(d)}d.attr({draggable:!0,cursor:"default",drift:le(this._onDragMove,this,"all"),ondragstart:le(this._showDataInfo,this,!0),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[it(r[0],[0,100],n,!0),it(r[1],[0,100],n,!0)]},e.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Ss(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?it(s.minSpan,l,o,!0):null,s.maxSpan!=null?it(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Dn([it(a[0],o,l,!0),it(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=Dn(i.slice()),o=this._size;R([0,1],function(d){var p=n.handles[d],g=this._handleHeight;p.attr({scaleX:g/2,scaleY:g/2,x:i[d]+(d?-1:1),y:o[1]/2-g/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]],c=0;c<l.length;c++){var h=l[c],f=h.getClipPath();f||(f=new Be,h.setClipPath(f)),f.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(r)},e.prototype._updateDataInfo=function(r){var n=this.dataZoomModel,i=this._displayables,a=i.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,h=r?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(h[0],u),this._formatLabel(h[1],u)]}}var f=Dn(this._handleEnds.slice());d.call(this,0),d.call(this,1);function d(p){var g=cs(i.handles[p].parent,this.group),m=J0(p===0?"right":"left",g),y=this._handleWidth/2+Ype,_=Ni([f[p]+(p===0?-y:y),this._size[1]/2],g);a[p].setStyle({x:_[0],y:_[1],verticalAlign:o===Nf?"middle":m,align:o===Nf?m:"center",text:s[p]})}},e.prototype._formatLabel=function(r,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=r==null||isNaN(r)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(r)}):r.toFixed(Math.min(o,20));return me(a)?a(r,s):se(a)?a.replace("{value}",s):s},e.prototype._showDataInfo=function(r){var n=this.dataZoomModel.get("handleLabel")||{},i=n.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,s=r||this._dragging?o:i,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},e.prototype._onDragMove=function(r,n,i,a){this._dragging=!0,co(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Ni([n,i],o,!0),l=this._updateInterval(r,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var r=this.dataZoomModel.get("realtime");!r&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(r){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(r.offsetX,r.offsetY);if(!(i[0]<0||i[0]>n[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)}},e.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Te(n,i),this._brushing=!0,this._brushStartTime=+new Date},e.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],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();Ss(0,l,o,0,u.minSpan!=null?it(u.minSpan,s,o,!0):null,u.maxSpan!=null?it(u.maxSpan,s,o,!0):null),this._range=Dn([it(l[0],o,s,!0),it(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(r){this._brushing&&(co(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},e.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Ef({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),c=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:h[1]})},e.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?qpe:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var r,n=jH(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},e.type="dataZoom.slider",e}(jA);function Qpe(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function Jpe(t){return t==="vertical"?"ns-resize":"ew-resize"}function a8(t){t.registerComponentModel(Upe),t.registerComponentView(Kpe),VA(t)}function ege(t){ze(i8),ze(a8)}var o8={get:function(t,e,r){var n=ye((tge[t]||{})[e]);return r&&ee(n)?n[n.length-1]:n}},tge={color:{active:["#006edd","#e0ffff"],inactive:[q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},M5=dr.mapVisual,rge=dr.eachVisual,nge=ee,A5=R,ige=Dn,age=it,h0=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.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 e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&XH(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(r){var n=this.stateList;r=le(r,this),this.controllerVisuals=KT(this.option.controller,n,r),this.targetVisuals=KT(this.option.target,n,r)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesId,n=this.option.seriesIndex;n==null&&r==null&&(n="all");var i=gh(this.ecModel,"series",{index:n,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return re(i,function(a){return a.componentIndex})},e.prototype.eachTargetSeries=function(r,n){R(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},e.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},e.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],ee(r)&&(r=r.slice(),u=!0);var c=n?r:u?[h(r[0]),h(r[1])]:h(r);if(se(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(me(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function h(f){return f===s[0]?"min":f===s[1]?"max":(+f).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var r=this.option,n=ige([r.min,r.max]);this._dataExtent=n},e.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}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.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={});Ne(a,i),Ne(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(h){nge(n.color)&&!h.inRange&&(h.inRange={color:n.color.slice().reverse()}),h.inRange=h.inRange||{color:r.get("gradientColor")}}function u(h,f,d){var p=h[f],g=h[d];p&&!g&&(g=h[d]={},A5(p,function(m,y){if(dr.isValidType(y)){var _=o8.get(y,"inactive",s);_!=null&&(g[y]=_,y==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(h){var f=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,d=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),g=this.getItemSymbol(),m=g||"roundRect";A5(this.stateList,function(y){var _=this.itemSize,S=h[y];S||(S=h[y]={color:s?p:[p]}),S.symbol==null&&(S.symbol=f&&ye(f)||(s?m:[m])),S.symbolSize==null&&(S.symbolSize=d&&ye(d)||(s?_[0]:[_[0],_[0]])),S.symbol=M5(S.symbol,function(M){return M==="none"?m:M});var T=S.symbolSize;if(T!=null){var C=-1/0;rge(T,function(M){M>C&&(C=M)}),S.symbolSize=M5(T,function(M){return age(M,[0,C],[0,_[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(r){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(r){return null},e.prototype.getVisualMeta=function(r){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:q.color.transparent,borderColor:q.color.borderTint,contentColor:q.color.theme[0],inactiveColor:q.color.disabled,borderWidth:0,padding:q.size.m,textGap:10,precision:0,textStyle:{color:q.color.secondary}},e}(Ve),L5=[20,140],oge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=L5[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=L5[1])},e.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):ee(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},e.prototype.getSelected=function(){var r=this.getExtent(),n=Dn((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]<r[0]&&(n[0]=r[0]),n[1]<r[0]&&(n[1]=r[0]),n},e.prototype.getValueState=function(r){var n=this.option.range,i=this.getExtent(),a=pe(this.option.unboundedRange,!0);return(a&&n[0]<=i[0]||n[0]<=r)&&(a&&n[1]>=i[1]||r<=n[1])?"inRange":"outOfRange"},e.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},e.prototype.getVisualMeta=function(r){var n=P5(this,"outOfRange",this.getExtent()),i=P5(this,"inRange",this.option.range.slice()),a=[];function o(d,p){a.push({value:d,color:r(d,p)})}for(var s=0,l=0,u=i.length,c=n.length;l<c&&(!i.length||n[l]<=i[0]);l++)n[l]<i[s]&&o(n[l],"outOfRange");for(var h=1;s<u;s++,h=0)h&&a.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var h=1;l<c;l++)(!i.length||i[i.length-1]<n[l])&&(h&&(a.length&&o(a[a.length-1].value,"outOfRange"),h=0),o(n[l],"outOfRange"));var f=a.length;return{stops:a,outerColors:[f?a[0].color:"transparent",f?a[f-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=ks(h0.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:q.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:q.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:q.color.shadow}}),e}(h0);function P5(t,e,r){if(r[0]===r[1])return r.slice();for(var n=200,i=(r[1]-r[0])/n,a=r[0],o=[],s=0;s<=n&&a<r[1];s++)o.push(a),a+=i;return o.push(r[1]),o}var s8=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.autoPositionValues={left:1,right:1,top:1,bottom:1},r}return e.prototype.init=function(r,n){this.ecModel=r,this.api=n},e.prototype.render=function(r,n,i,a){if(this.visualMapModel=r,r.get("show")===!1){this.group.removeAll();return}this.doRender(r,n,i,a)},e.prototype.renderBackground=function(r){var n=this.visualMapModel,i=Th(n.get("padding")||0),a=r.getBoundingRect();r.add(new Be({z2:-1,silent:!0,shape:{x:a.x-i[3],y:a.y-i[0],width:a.width+i[3]+i[1],height:a.height+i[0]+i[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},e.prototype.getControllerVisual=function(r,n,i){i=i||{};var a=i.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(d){return s[d]}function c(d,p){s[d]=p}var h=o.controllerVisuals[a||o.getValueState(r)],f=dr.prepareVisualTypes(h);return R(f,function(d){var p=h[d];i.convertOpacityToAlpha&&d==="opacity"&&(d="colorAlpha",p=h.__alphaForOpacity),dr.dependsOn(d,n)&&p&&p.applyVisual(r,u,c)}),s[n]},e.prototype.positionGroup=function(r){var n=this.visualMapModel,i=this.api,a=sr(n,i).refContainer;r_(r,n.getBoxLayoutParams(),a)},e.prototype.doRender=function(r,n,i,a){},e.type="visualMap",e}(mt),k5=[["left","right","width"],["top","bottom","height"]];function l8(t,e,r){var n=t.option,i=n.align;if(i!=null&&i!=="auto")return i;for(var a={width:e.getWidth(),height:e.getHeight()},o=n.orient==="horizontal"?1:0,s=k5[o],l=[0,null,10],u={},c=0;c<3;c++)u[k5[1-o][c]]=l[c],u[s[c]]=c===2?r[0]:n[s[c]];var h=[["x","width",3],["y","height",0]][o],f=bt(u,a,n.padding);return s[(f.margin[h[2]]||0)+f[h[0]]+f[h[1]]*.5<a[h[1]]*.5?0:1]}function Dm(t,e){return R(t||[],function(r){r.dataIndex!=null&&(r.dataIndexInside=r.dataIndex,r.dataIndex=null),r.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var na=it,sge=R,D5=Math.min,qS=Math.max,lge=12,uge=6,cge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._shapes={},r._dataInterval=[],r._handleEnds=[],r._hoverLinkDataIndices=[],r}return e.prototype.init=function(r,n){t.prototype.init.call(this,r,n),this._hoverLinkFromSeriesMouseOver=le(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=le(this._hideIndicator,this)},e.prototype.doRender=function(r,n,i,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var r=this.visualMapModel,n=this.group;this._orient=r.get("orient"),this._useHandle=r.get("calculable"),this._resetInterval(),this._renderBar(n);var i=r.get("text");this._renderEndsText(n,i,0),this._renderEndsText(n,i,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},e.prototype._renderEndsText=function(r,n,i){if(n){var a=n[1-i];a=a!=null?a+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),h=this._applyTransform(i===0?"bottom":"top",u),f=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new Xe({style:pt(d,{x:c[0],y:c[1],verticalAlign:d.get("verticalAlign")||(f==="horizontal"?"middle":h),align:d.get("align")||(f==="horizontal"?h:"center"),text:a})}))}},e.prototype._renderBar=function(r){var n=this.visualMapModel,i=this._shapes,a=n.itemSize,o=this._orient,s=this._useHandle,l=l8(n,this.api,a),u=i.mainGroup=this._createBarGroup(l),c=new _e;u.add(c),c.add(i.outOfRange=I5()),c.add(i.inRange=I5(null,s?N5(this._orient):null,le(this._dragHandle,this,"all",!1),le(this._dragHandle,this,"all",!0))),c.setClipPath(new Be({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var h=n.textStyleModel.getTextRect("国"),f=qS(h.width,h.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(n,u,0,a,f,o),this._createHandle(n,u,1,a,f,o)),this._createIndicator(n,u,a,f,o),r.add(u)},e.prototype._createHandle=function(r,n,i,a,o,s){var l=le(this._dragHandle,this,i,!1),u=le(this._dragHandle,this,i,!0),c=Bi(r.get("handleSize"),a[0]),h=Ut(r.get("handleIcon"),-c/2,-c/2,c,c,null,!0),f=N5(this._orient);h.attr({cursor:f,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){co(y.event)}}),h.x=a[0]/2,h.useStyle(r.getModel("handleStyle").getItemStyle()),h.setStyle({strokeNoScale:!0,strokeFirst:!0}),h.style.lineWidth*=2,h.ensureState("emphasis").style=r.getModel(["emphasis","handleStyle"]).getItemStyle(),Al(h,!0),n.add(h);var d=this.visualMapModel.textStyleModel,p=new Xe({cursor:f,draggable:!0,drift:l,onmousemove:function(y){co(y.event)},ondragend:u,style:pt(d,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var g=[c,0],m=this._shapes;m.handleThumbs[i]=h,m.handleLabelPoints[i]=g,m.handleLabels[i]=p},e.prototype._createIndicator=function(r,n,i,a,o){var s=Bi(r.get("indicatorSize"),i[0]),l=Ut(r.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=r.getModel("indicatorStyle").getItemStyle();if(l instanceof pr){var c=l.style;l.useStyle(J({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var h=this.visualMapModel.textStyleModel,f=new Xe({silent:!0,invisible:!0,style:pt(h,{x:0,y:0,text:""})});this.group.add(f);var d=[(o==="horizontal"?a/2:uge)+i[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=f,p.indicatorLabelPoint=d,this._firstShowIndicator=!0},e.prototype._dragHandle=function(r,n,i,a){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([i,a],this._shapes.mainGroup,!0);this._updateInterval(r,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():E5(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[r],!1)}},e.prototype._resetInterval=function(){var r=this.visualMapModel,n=this._dataInterval=r.getSelected(),i=r.getExtent(),a=[0,r.itemSize[1]];this._handleEnds=[na(n[0],i,a,!0),na(n[1],i,a,!0)]},e.prototype._updateInterval=function(r,n){n=n||0;var i=this.visualMapModel,a=this._handleEnds,o=[0,i.itemSize[1]];Ss(n,a,o,r,0);var s=i.getExtent();this._dataInterval=[na(a[0],o,s,!0),na(a[1],o,s,!0)]},e.prototype._updateView=function(r){var n=this.visualMapModel,i=n.getExtent(),a=this._shapes,o=[0,n.itemSize[1]],s=r?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(r,n,i,a){var o={forceState:a,convertOpacityToAlpha:!0},s=this._makeColorGradient(r,o),l=[this.getControllerVisual(r[0],"symbolSize",o),this.getControllerVisual(r[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new uu(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(r,n){var i=100,a=[],o=(r[1]-r[0])/i;a.push({color:this.getControllerVisual(r[0],"color",n),offset:0});for(var s=1;s<i;s++){var l=r[0]+o*s;if(l>r[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},e.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]]]},e.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new _e(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})},e.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(),c=this._applyTransform("left",i.mainGroup);sge([0,1],function(h){var f=o[h];f.setStyle("fill",n.handlesColor[h]),f.y=r[h];var d=na(r[h],[0,l[1]],u,!0),p=this.getControllerVisual(d,"symbolSize");f.scaleX=f.scaleY=p/l[0],f.x=l[0]-p/2;var g=Ni(i.handleLabelPoints[h],cs(f,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;g[1]+=m}s[h].setStyle({x:g[0],y:g[1],text:a.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,h=c.indicator;if(h){h.attr("invisible",!1);var f={convertOpacityToAlpha:!0},d=this.getControllerVisual(r,"color",f),p=this.getControllerVisual(r,"symbolSize"),g=na(r,s,u,!0),m=l[0]-p/2,y={x:h.x,y:h.y};h.y=g,h.x=m;var _=Ni(c.indicatorLabelPoint,cs(h,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var T=this._applyTransform("left",c.mainGroup),C=this._orient,M=C==="horizontal";S.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:M?T:"middle",align:M?"center":T});var A={x:m,y:g,style:{fill:d}},k={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var E={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(A,E),S.animateTo(k,E)}else h.attr(A),S.attr(k);this._firstShowIndicator=!1;var D=this._shapes.handleLabels;if(D)for(var I=0;I<D.length;I++)this.api.enterBlur(D[I])}},e.prototype._enableHoverLinkToSeries=function(){var r=this;this._shapes.mainGroup.on("mousemove",function(n){if(r._hovering=!0,!r._dragging){var i=r.visualMapModel.itemSize,a=r._applyTransform([n.offsetX,n.offsetY],r._shapes.mainGroup,!0,!0);a[1]=D5(qS(0,a[1]),i[1]),r._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[0])}}).on("mouseout",function(){r._hovering=!1,!r._dragging&&r._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var r=this.api.getZr();this.visualMapModel.option.hoverLink?(r.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),r.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(r,n){var i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var o=[0,a[1]],s=i.getExtent();r=D5(qS(o[0],r),o[1]);var l=hge(i,s,o),u=[r-l,r+l],c=na(r,o,s,!0),h=[na(u[0],o,s,!0),na(u[1],o,s,!0)];u[0]<o[0]&&(h[0]=-1/0),u[1]>o[1]&&(h[1]=1/0),n&&(h[0]===-1/0?this._showIndicator(c,h[1],"< ",l):h[1]===1/0?this._showIndicator(c,h[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var f=this._hoverLinkDataIndices,d=[];(n||E5(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var p=WX(f,d);this._dispatchHighDown("downplay",Dm(p[0],i)),this._dispatchHighDown("highlight",Dm(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(Pl(r.target,function(l){var u=Le(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)}}},e.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<n.length;i++)this.api.leaveBlur(n[i])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var r=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Dm(r,this.visualMapModel)),r.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var r=this.api.getZr();r.off("mouseover",this._hoverLinkFromSeriesMouseOver),r.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(r,n,i,a){var o=cs(n,a?null:this.group);return ee(r)?Ni(r,o,i):J0(r,o,i)},e.prototype._dispatchHighDown=function(r,n){n&&n.length&&this.api.dispatchAction({type:r,batch:n})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(s8);function I5(t,e,r,n){return new zr({shape:{points:t},draggable:!!r,cursor:e,drift:r,onmousemove:function(i){co(i.event)},ondragend:n})}function hge(t,e,r){var n=lge/2,i=t.get("hoverLinkDataSize");return i&&(n=na(i,e,r,!0)/2),n}function E5(t){var e=t.get("hoverLinkOnHandle");return!!(e??t.get("realtime"))}function N5(t){return t==="vertical"?"ns-resize":"ew-resize"}var fge={type:"selectDataRange",event:"dataRangeSelected",update:"update"},dge=function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(r){r.setSelected(t.selected)})},vge=[{createOnAllSeries:!0,reset:function(t,e){var r=[];return e.eachComponent("visualMap",function(n){var i=t.pipelineContext;!n.isTargetSeries(t)||i&&i.large||r.push(Rve(n.stateList,n.targetVisuals,le(n.getValueState,n),n.getDataDimensionIndex(t.getData())))}),r}},{createOnAllSeries:!0,reset:function(t,e){var r=t.getData(),n=[];e.eachComponent("visualMap",function(i){if(i.isTargetSeries(t)){var a=i.getVisualMeta(le(pge,null,t,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(r);o>=0&&(a.dimension=o,n.push(a))}}),t.getData().setVisual("visualMeta",n)}}];function pge(t,e,r,n){for(var i=e.targetVisuals[n],a=dr.prepareVisualTypes(i),o={color:$v(t.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],c=i[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(r,h,f)}return o.color;function h(d){return o[d]}function f(d,p){o[d]=p}}var R5=R;function gge(t){var e=t&&t.visualMap;ee(e)||(e=e?[e]:[]),R5(e,function(r){if(r){Qu(r,"splitList")&&!Qu(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var n=r.pieces;n&&ee(n)&&R5(n,function(i){be(i)&&(Qu(i,"start")&&!Qu(i,"min")&&(i.min=i.start),Qu(i,"end")&&!Qu(i,"max")&&(i.max=i.end))})}})}function Qu(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var O5=!1;function u8(t){O5||(O5=!0,t.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),t.registerAction(fge,dge),R(vge,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(gge))}function c8(t){t.registerComponentModel(oge),t.registerComponentView(cge),u8(t)}var mge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._pieceList=[],r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],yge[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=ye(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=re(this._pieceList,function(l){return l=ye(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var r=this.option,n={},i=dr.listVisualTypes(),a=this.isCategory();R(r.pieces,function(s){R(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),R(n,function(s,l){var u=!1;R(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&R(this.stateList,function(c){(r[c]||(r[c]={}))[l]=o8.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,R(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;R(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(r){this.option.selected=ye(r)},e.prototype.getValueState=function(r){var n=dr.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.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 c=dr.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},e.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},e.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,h){var f=a.getRepresentValue({interval:c});h||(h=a.getValueState(f));var d=r(f,h);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}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 R(s,function(c){var h=c.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:n,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=ks(h0.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(h0),yge={splitNumber:function(t){var e=this.option,r=Math.min(e.precision,20),n=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;e.precision=r,a=+a.toFixed(r),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<i;s+=a,o++){var l=o===i-1?n[1]:s+a;t.push({interval:[s,l],close:[1,1]})}e.maxOpen&&t.push({interval:[n[1],1/0],close:[0,0]}),bw(t),R(t,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(t){var e=this.option;R(e.categories,function(r){t.push({text:this.formatValueText(r,!0),value:r})},this),z5(e,t)},pieces:function(t){var e=this.option;R(e.pieces,function(r,n){be(r)||(r={value:r});var i={text:"",index:n};if(r.label!=null&&(i.text=r.label),r.hasOwnProperty("value")){var a=i.value=r.value;i.interval=[a,a],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],h=0;h<2;h++){for(var f=[["gte","gt","min"],["lte","lt","max"]][h],d=0;d<3&&o[h]==null;d++)o[h]=r[f[d]],s[h]=l[d],c[h]=d===2;o[h]==null&&(o[h]=u[h])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=dr.retrieveVisuals(r),t.push(i)},this),z5(e,t),bw(t),R(t,function(r){var n=r.close,i=[["<","≤"][n[1]],[">","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function z5(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var _ge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,c=br(n.get("showLabel",!0),!u),h=!n.get("selectedMode");u&&this._renderEndsText(r,u[0],s,c,o),R(l.viewPieceList,function(f){var d=f.piece,p=new _e;p.onclick=le(this._onItemClick,this,d),this._enableHoverLink(p,f.indexInModelPieceList);var g=n.getRepresentValue(d);if(this._createItemSymbol(p,g,[0,0,s[0],s[1]],h),c){var m=this.visualMapModel.getValueState(g),y=a.get("align")||o;p.add(new Xe({style:pt(a,{x:y==="right"?-i:s[0]+i,y:s[1]/2,text:d.text,verticalAlign:a.get("verticalAlign")||"middle",align:y,opacity:pe(a.get("opacity"),m==="outOfRange"?.5:1)}),silent:h}))}r.add(p)},this),u&&this._renderEndsText(r,u[1],s,c,o),zl(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},e.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:Dm(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return l8(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new _e,l=this.visualMapModel.textStyleModel;s.add(new Xe({style:pt(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)}},e.prototype._getViewData=function(){var r=this.visualMapModel,n=re(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}},e.prototype._createItemSymbol=function(r,n,i,a){var o=Ut(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));o.silent=a,r.add(o)},e.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=ye(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,R(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(s8);function h8(t){t.registerComponentModel(mge),t.registerComponentView(_ge),u8(t)}function xge(t){ze(c8),ze(h8)}var Sge=function(){function t(e){this._thumbnailModel=e}return t.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},t.prototype.renderContent=function(e){var r=e.api.getViewOfComponentModel(this._thumbnailModel);r&&(e.group.silent=!0,r.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:Rj(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},t.prototype.updateWindow=function(e,r){var n=r.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},t}(),bge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.optionUpdated=function(r,n){this._updateBridge()},e.prototype._updateBridge=function(){var r=this._birdge=this._birdge||new Sge(this);if(this._target=null,this.ecModel.eachSeries(function(i){lR(i,null)}),this.shouldShow()){var n=this.getTarget();lR(n.baseMapProvider,r)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var r=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return r?r.subType!=="graph"&&(r=null):r=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:r},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:q.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:q.color.neutral30,borderColor:q.color.neutral40,opacity:.3},z:10},e}(Ve),wge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this._api=i,this._model=r,this._coordSys||(this._coordSys=new gu),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var a=this.group;a.removeAll();var o=r.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||q.color.neutral00);var l=sr(r,i).refContainer,u=bt(tV(r,!0),l),c=s.lineWidth||0,h=this._contentRect=Ql(u.clone(),c/2,!0,!0),f=new _e;a.add(f),f.setClipPath(new Be({shape:h.plain()}));var d=this._targetGroup=new _e;f.add(d);var p=u.plain();p.r=o.getShallow("borderRadius",!0),a.add(this._bgRect=new Be({style:s,shape:p,silent:!1,cursor:"grab"}));var g=r.getModel("windowStyle"),m=g.getShallow("borderRadius",!0);f.add(this._windowRect=new Be({shape:{x:0,y:0,width:0,height:0,r:m},style:g.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),j5(r,this)},e.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),j5(this._model,this))},e.prototype._dealRenderContent=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=this._targetGroup,i=this._coordSys,a=this._contentRect;if(n.removeAll(),!!r){var o=r.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=r.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=bt({left:"center",top:"center",aspect:s.width/s.height},a);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),this._windowRect.z2=r.z2Range.max+10,this._resetRoamController(r.roamType)}}},e.prototype.updateWindow=function(r){var n=this._bridgeRendered;n&&n.renderVersion===r.renderVersion&&(n.targetTrans=r.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=hi([],r.targetTrans),i=Ii([],this._coordSys.transform,n);this._transThisToTarget=hi([],i);var a=r.viewportRect;a?a=a.clone():a=new Ce(0,0,this._api.getWidth(),this._api.getHeight()),a.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(Se({r:s},a))}},e.prototype._resetRoamController=function(r){var n=this,i=this._api,a=this._roamController;if(a||(a=this._roamController=new pu(i.getZr())),!r||!this._isEnabled()){a.disable();return}a.enable(r,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),a.off("pan").off("zoom").on("pan",le(this._onPan,this)).on("zoom",le(this._onZoom,this))},e.prototype._onPan=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.oldX,r.oldY],n),a=Ot([],[r.oldX-r.dx,r.oldY-r.dy],n);this._api.dispatchAction(B5(this._model.getTarget().baseMapProvider,{dx:a[0]-i[0],dy:a[1]-i[1]}))}},e.prototype._onZoom=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.originX,r.originY],n);this._api.dispatchAction(B5(this._model.getTarget().baseMapProvider,{zoom:1/r.scale,originX:i[0],originY:i[1]}))}},e.prototype._isEnabled=function(){var r=this._model;if(!r||!r.shouldShow())return!1;var n=r.getTarget().baseMapProvider;return!!n},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e}(mt);function B5(t,e){var r=t.mainType==="series"?t.subType+"Roam":t.mainType+"Roam",n={type:r};return n[t.mainType+"Id"]=t.id,J(n,e),n}function j5(t,e){var r=Jl(t);e_(e.group,r.z,r.zlevel)}function Tge(t){t.registerComponentModel(bge),t.registerComponentView(wge)}var Cge={label:{enabled:!0},decal:{show:!1}},V5=Fe(),Mge={};function Age(t,e){var r=t.getModel("aria");if(!r.get("enabled"))return;var n=ye(Cge);Ne(n.label,t.getLocaleModel().get("aria"),!1),Ne(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var h=de();t.eachSeries(function(f){if(!f.isColorBySeries()){var d=h.get(f.type);d||(d={},h.set(f.type,d)),V5(f).scope=d}}),t.eachRawSeries(function(f){if(t.isSeriesFiltered(f))return;if(me(f.enableAriaDecal)){f.enableAriaDecal();return}var d=f.getData();if(f.isColorBySeries()){var _=Hw(f.ecModel,f.name,Mge,t.getSeriesCount()),S=d.getVisual("decal");d.setVisual("decal",T(S,_))}else{var p=f.getRawData(),g={},m=V5(f).scope;d.each(function(C){var M=d.getRawIndex(C);g[M]=C});var y=p.count();p.each(function(C){var M=g[C],A=p.getName(C)||C+"",k=Hw(f.ecModel,A,m,y),E=d.getItemVisual(M,"decal");d.setItemVisual(M,"decal",T(E,k))})}function T(C,M){var A=C?J(J({},M),C):M;return A.dirty=!0,A}})}}function a(){var u=e.getZr().dom;if(u){var c=t.getLocaleModel().get("aria"),h=r.getModel("label");if(h.option=Se(h.option,c),!!h.get("enabled")){if(u.setAttribute("role","img"),h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var f=t.getSeriesCount(),d=h.get(["data","maxCount"])||10,p=h.get(["series","maxCount"])||10,g=Math.min(f,p),m;if(!(f<1)){var y=s();if(y){var _=h.get(["general","withTitle"]);m=o(_,{title:y})}else m=h.get(["general","withoutTitle"]);var S=[],T=f>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);m+=o(T,{seriesCount:f}),t.eachSeries(function(k,E){if(E<g){var D=void 0,I=k.get("name"),z=I?"withName":"withoutName";D=f>1?h.get(["series","multiple",z]):h.get(["series","single",z]),D=o(D,{seriesId:k.seriesIndex,seriesName:k.get("name"),seriesType:l(k.subType)});var O=k.getData();if(O.count()>d){var V=h.get(["data","partialData"]);D+=o(V,{displayCnt:d})}else D+=h.get(["data","allData"]);for(var G=h.get(["data","separator","middle"]),F=h.get(["data","separator","end"]),U=h.get(["data","excludeDimensionId"]),j=[],W=0;W<O.count();W++)if(W<d){var H=O.getName(W),X=U?tt(O.getValues(W),function(ne,ie){return Ee(U,ie)===-1}):O.getValues(W),K=h.get(["data",H?"withName":"withoutName"]);j.push(o(K,{name:H,value:X.join(G)}))}D+=j.join(G)+F,S.push(D)}});var C=h.getModel(["series","multiple","separator"]),M=C.get("middle"),A=C.get("end");m+=S.join(M)+A,u.setAttribute("aria-label",m)}}}}function o(u,c){if(!se(u))return u;var h=u;return R(c,function(f,d){h=h.replace(new RegExp("\\{\\s*"+d+"\\s*\\}","g"),f)}),h}function s(){var u=t.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=t.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function Lge(t){if(!(!t||!t.aria)){var e=t.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},R(["description","general","series","data"],function(r){e[r]!=null&&(e.label[r]=e[r])})}}function Pge(t){t.registerPreprocessor(Lge),t.registerVisual(t.PRIORITY.VISUAL.ARIA,Age)}var F5={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},kge=function(){function t(e){var r=this._condVal=se(e)?new RegExp(e):a4(e)?e:null;if(r==null){var n="";at(n)}}return t.prototype.evaluate=function(e){var r=typeof e;return se(r)?this._condVal.test(e):qe(r)?this._condVal.test(e+""):!1},t}(),Dge=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),Ige=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r<e.length;r++)if(!e[r].evaluate())return!1;return!0},t}(),Ege=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r<e.length;r++)if(e[r].evaluate())return!0;return!1},t}(),Nge=function(){function t(){}return t.prototype.evaluate=function(){return!this.child.evaluate()},t}(),Rge=function(){function t(){}return t.prototype.evaluate=function(){for(var e=!!this.valueParser,r=this.getValue,n=r(this.valueGetterParam),i=e?this.valueParser(n):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(e?i:n))return!1;return!0},t}();function YA(t,e){if(t===!0||t===!1){var r=new Dge;return r.value=t,r}var n="";return f8(t)||at(n),t.and?G5("and",t,e):t.or?G5("or",t,e):t.not?Oge(t,e):zge(t,e)}function G5(t,e,r){var n=e[t],i="";ee(n)||at(i),n.length||at(i);var a=t==="and"?new Ige:new Ege;return a.children=re(n,function(o){return YA(o,r)}),a.children.length||at(i),a}function Oge(t,e){var r=t.not,n="";f8(r)||at(n);var i=new Nge;return i.child=YA(r,e),i.child||at(n),i}function zge(t,e){for(var r="",n=e.prepareGetValue(t),i=[],a=$e(t),o=t.parser,s=o?wV(o):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=he(F5,u)?F5[u]:u,h=t[u],f=s?s(h):h,d=nJ(c,f)||c==="reg"&&new kge(f);d||at(r),i.push(d)}}i.length||at(r);var p=new Rge;return p.valueGetterParam=n,p.valueParser=s,p.getValue=e.getValue,p.subCondList=i,p}function f8(t){return be(t)&&!Nr(t)}var Bge=function(){function t(e,r){this._cond=YA(e,r)}return t.prototype.evaluate=function(){return this._cond.evaluate()},t}();function jge(t,e){return new Bge(t,e)}var Vge={type:"echarts:filter",transform:function(t){for(var e=t.upstream,r,n=jge(t.config,{valueGetterAttrMap:de({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;he(s,"dimension")||at(l);var c=e.getDimensionInfo(u);return c||at(l),{dimIdx:c.index}},getValue:function(s){return e.retrieveValueFromItem(r,s.dimIdx)}}),i=[],a=0,o=e.count();a<o;a++)r=e.getRawDataItem(a),n.evaluate()&&i.push(r);return{data:i}}},Fge={type:"echarts:sort",transform:function(t){var e=t.upstream,r=t.config,n="",i=gt(r);i.length||at(n);var a=[];R(i,function(c){var h=c.dimension,f=c.order,d=c.parser,p=c.incomparable;if(h==null&&at(n),f!=="asc"&&f!=="desc"&&at(n),p&&p!=="min"&&p!=="max"){var g="";at(g)}if(f!=="asc"&&f!=="desc"){var m="";at(m)}var y=e.getDimensionInfo(h);y||at(n);var _=d?wV(d):null;d&&!_&&at(n),a.push({dimIdx:y.index,parser:_,comparator:new CV(f,p)})});var o=e.sourceFormat;o!==Cr&&o!==Vn&&at(n);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,h){for(var f=0;f<a.length;f++){var d=a[f],p=e.retrieveValueFromItem(c,d.dimIdx),g=e.retrieveValueFromItem(h,d.dimIdx);d.parser&&(p=d.parser(p),g=d.parser(g));var m=d.comparator.evaluate(p,g);if(m!==0)return m}return 0}),{data:s}}};function Gge(t){t.registerTransform(Vge),t.registerTransform(Fge)}var Hge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.prototype.init=function(r,n,i){t.prototype.init.call(this,r,n,i),this._sourceManager=new PV(this),xI(this)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),xI(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Ri},e}(Ve),Wge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.type="dataset",e}(mt);function Uge(t){t.registerComponentModel(Hge),t.registerComponentView(Wge)}var ta=Ta.CMD;function Cc(t,e){return Math.abs(t-e)<1e-5}function iC(t){var e=t.data,r=t.len(),n=[],i,a=0,o=0,s=0,l=0;function u(O,V){i&&i.length>2&&n.push(i),i=[O,V]}function c(O,V,G,F){Cc(O,G)&&Cc(V,F)||i.push(O,V,G,F,G,F)}function h(O,V,G,F,U,j){var W=Math.abs(V-O),H=Math.tan(W/4)*4/3,X=V<O?-1:1,K=Math.cos(O),ne=Math.sin(O),ie=Math.cos(V),ue=Math.sin(V),ve=K*U+G,Ge=ne*j+F,xe=ie*U+G,ge=ue*j+F,ke=U*H*X,fe=j*H*X;i.push(ve-ke*ne,Ge+fe*K,xe+ke*ue,ge-fe*ie,xe,ge)}for(var f,d,p,g,m=0;m<r;){var y=e[m++],_=m===1;switch(_&&(a=e[m],o=e[m+1],s=a,l=o,(y===ta.L||y===ta.C||y===ta.Q)&&(i=[s,l])),y){case ta.M:a=s=e[m++],o=l=e[m++],u(s,l);break;case ta.L:f=e[m++],d=e[m++],c(a,o,f,d),a=f,o=d;break;case ta.C:i.push(e[m++],e[m++],e[m++],e[m++],a=e[m++],o=e[m++]);break;case ta.Q:f=e[m++],d=e[m++],p=e[m++],g=e[m++],i.push(a+2/3*(f-a),o+2/3*(d-o),p+2/3*(f-p),g+2/3*(d-g),p,g),a=p,o=g;break;case ta.A:var S=e[m++],T=e[m++],C=e[m++],M=e[m++],A=e[m++],k=e[m++]+A;m+=1;var E=!e[m++];f=Math.cos(A)*C+S,d=Math.sin(A)*M+T,_?(s=f,l=d,u(s,l)):c(a,o,f,d),a=Math.cos(k)*C+S,o=Math.sin(k)*M+T;for(var D=(E?-1:1)*Math.PI/2,I=A;E?I>k:I<k;I+=D){var z=E?Math.max(I+D,k):Math.min(I+D,k);h(I,z,S,T,C,M)}break;case ta.R:s=a=e[m++],l=o=e[m++],f=s+e[m++],d=l+e[m++],u(f,l),c(f,l,f,d),c(f,d,s,d),c(s,d,s,l),c(s,l,f,l);break;case ta.Z:i&&c(a,o,s,l),a=s,o=l;break}}return i&&i.length>2&&n.push(i),n}function aC(t,e,r,n,i,a,o,s,l,u){if(Cc(t,r)&&Cc(e,n)&&Cc(i,o)&&Cc(a,s)){l.push(o,s);return}var c=2/u,h=c*c,f=o-t,d=s-e,p=Math.sqrt(f*f+d*d);f/=p,d/=p;var g=r-t,m=n-e,y=i-o,_=a-s,S=g*g+m*m,T=y*y+_*_;if(S<h&&T<h){l.push(o,s);return}var C=f*g+d*m,M=-f*y-d*_,A=S-C*C,k=T-M*M;if(A<h&&C>=0&&k<h&&M>=0){l.push(o,s);return}var E=[],D=[];ys(t,r,i,o,.5,E),ys(e,n,a,s,.5,D),aC(E[0],D[0],E[1],D[1],E[2],D[2],E[3],D[3],l,u),aC(E[4],D[4],E[5],D[5],E[6],D[6],E[7],D[7],l,u)}function Zge(t,e){var r=iC(t),n=[];e=e||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var c=a[u++],h=a[u++],f=a[u++],d=a[u++],p=a[u++],g=a[u++];aC(s,l,c,h,f,d,p,g,o,e),s=p,l=g}n.push(o)}return n}function d8(t,e,r){var n=t[e],i=t[1-e],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,h=r-c;if(h>0)for(var u=0;u<h;u++)l[u%o]+=1;return l}function H5(t,e,r){for(var n=t.r0,i=t.r,a=t.startAngle,o=t.endAngle,s=Math.abs(o-a),l=s*i,u=i-n,c=l>Math.abs(u),h=d8([l,u],c?0:1,e),f=(c?s:u)/h.length,d=0;d<h.length;d++)for(var p=(c?u:s)/h[d],g=0;g<h[d];g++){var m={};c?(m.startAngle=a+f*d,m.endAngle=a+f*(d+1),m.r0=n+p*g,m.r=n+p*(g+1)):(m.startAngle=a+p*g,m.endAngle=a+p*(g+1),m.r0=n+f*d,m.r=n+f*(d+1)),m.clockwise=t.clockwise,m.cx=t.cx,m.cy=t.cy,r.push(m)}}function $ge(t,e,r){for(var n=t.width,i=t.height,a=n>i,o=d8([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",h=t[s]/o.length,f=0;f<o.length;f++)for(var d=t[l]/o[f],p=0;p<o[f];p++){var g={};g[u]=f*h,g[c]=p*d,g[s]=h,g[l]=d,g.x+=t.x,g.y+=t.y,r.push(g)}}function W5(t,e,r,n){return t*n-r*e}function Yge(t,e,r,n,i,a,o,s){var l=r-t,u=n-e,c=o-i,h=s-a,f=W5(c,h,l,u);if(Math.abs(f)<1e-6)return null;var d=t-i,p=e-a,g=W5(d,p,c,h)/f;return g<0||g>1?null:new Te(g*l+t,g*u+e)}function Xge(t,e,r){var n=new Te;Te.sub(n,r,e),n.normalize();var i=new Te;Te.sub(i,t,e);var a=i.dot(n);return a}function Ju(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function qge(t,e,r){for(var n=t.length,i=[],a=0;a<n;a++){var o=t[a],s=t[(a+1)%n],l=Yge(o[0],o[1],s[0],s[1],e.x,e.y,r.x,r.y);l&&i.push({projPt:Xge(l,e,r),pt:l,idx:a})}if(i.length<2)return[{points:t},{points:t}];i.sort(function(m,y){return m.projPt-y.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var h=u;u=c,c=h}for(var f=[u.pt.x,u.pt.y],d=[c.pt.x,c.pt.y],p=[f],g=[d],a=u.idx+1;a<=c.idx;a++)Ju(p,t[a].slice());Ju(p,d),Ju(p,f);for(var a=c.idx+1;a<=u.idx+n;a++)Ju(g,t[a%n].slice());return Ju(g,f),Ju(g,d),[{points:p},{points:g}]}function U5(t){var e=t.points,r=[],n=[];Y0(e,r,n);var i=new Ce(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,l=i.y,u=new Te,c=new Te;return a>o?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),qge(e,u,c)}function f0(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);f0(t,a[0],i,n),f0(t,a[1],r-i,n)}return n}function Kge(t,e){for(var r=[],n=0;n<e;n++)r.push(H2(t));return r}function Qge(t,e){e.setStyle(t.style),e.z=t.z,e.z2=t.z2,e.zlevel=t.zlevel}function Jge(t){for(var e=[],r=0;r<t.length;)e.push([t[r++],t[r++]]);return e}function eme(t,e){var r=[],n=t.shape,i;switch(t.type){case"rect":$ge(n,e,r),i=Be;break;case"sector":H5(n,e,r),i=Or;break;case"circle":H5({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,r),i=Or;break;default:var a=t.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=re(Zge(t.getUpdatedPathProxy(),o),function(y){return Jge(y)}),l=s.length;if(l===0)f0(U5,{points:s[0]},e,r);else if(l===e)for(var u=0;u<l;u++)r.push({points:s[u]});else{var c=0,h=re(s,function(y){var _=[],S=[];Y0(y,_,S);var T=(S[1]-_[1])*(S[0]-_[0]);return c+=T,{poly:y,area:T}});h.sort(function(y,_){return _.area-y.area});for(var f=e,u=0;u<l;u++){var d=h[u];if(f<=0)break;var p=u===l-1?f:Math.ceil(d.area/c*e);p<0||(f0(U5,{points:d.poly},p,r),f-=p)}}i=zr;break}if(!i)return Kge(t,e);for(var g=[],u=0;u<r.length;u++){var m=new i;m.setShape(r[u]),Qge(t,m),g.push(m)}return g}function tme(t,e){var r=t.length,n=e.length;if(r===n)return[t,e];for(var i=[],a=[],o=r<n?t:e,s=Math.min(r,n),l=Math.abs(n-r)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,h=[o[0],o[1]],f=l,d=2;d<s;){var p=o[d-2],g=o[d-1],m=o[d++],y=o[d++],_=o[d++],S=o[d++],T=o[d++],C=o[d++];if(f<=0){h.push(m,y,_,S,T,C);continue}for(var M=Math.min(f,c-1)+1,A=1;A<=M;A++){var k=A/M;ys(p,m,_,T,k,i),ys(g,y,S,C,k,a),p=i[3],g=a[3],h.push(i[1],a[1],i[2],a[2],p,g),m=i[5],y=a[5],_=i[6],S=a[6]}f-=M-1}return o===t?[h,e]:[t,h]}function Z5(t,e){for(var r=t.length,n=t[r-2],i=t[r-1],a=[],o=0;o<e.length;)a[o++]=n,a[o++]=i;return a}function rme(t,e){for(var r,n,i,a=[],o=[],s=0;s<Math.max(t.length,e.length);s++){var l=t[s],u=e[s],c=void 0,h=void 0;l?u?(r=tme(l,u),c=r[0],h=r[1],n=c,i=h):(h=Z5(i||l,l),c=l):(c=Z5(n||u,u),h=u),a.push(c),o.push(h)}return[a,o]}function $5(t){for(var e=0,r=0,n=0,i=t.length,a=0,o=i-2;a<i;o=a,a+=2){var s=t[o],l=t[o+1],u=t[a],c=t[a+1],h=s*c-u*l;e+=h,r+=(s+u)*h,n+=(l+c)*h}return e===0?[t[0]||0,t[1]||0]:[r/e/3,n/e/3,e]}function nme(t,e,r,n){for(var i=(t.length-2)/6,a=1/0,o=0,s=t.length,l=s-2,u=0;u<i;u++){for(var c=u*6,h=0,f=0;f<s;f+=2){var d=f===0?c:(c+f-2)%l+2,p=t[d]-r[0],g=t[d+1]-r[1],m=e[f]-n[0],y=e[f+1]-n[1],_=m-p,S=y-g;h+=_*_+S*S}h<a&&(a=h,o=u)}return o}function ime(t){for(var e=[],r=t.length,n=0;n<r;n+=2)e[n]=t[r-n-2],e[n+1]=t[r-n-1];return e}function ame(t,e,r,n){for(var i=[],a,o=0;o<t.length;o++){var s=t[o],l=e[o],u=$5(s),c=$5(l);a==null&&(a=u[2]<0!=c[2]<0);var h=[],f=[],d=0,p=1/0,g=[],m=s.length;a&&(s=ime(s));for(var y=nme(s,l,u,c)*6,_=m-2,S=0;S<_;S+=2){var T=(y+S)%_+2;h[S+2]=s[T]-u[0],h[S+3]=s[T+1]-u[1]}h[0]=s[y]-u[0],h[1]=s[y+1]-u[1];for(var C=n/r,M=-n/2;M<=n/2;M+=C){for(var A=Math.sin(M),k=Math.cos(M),E=0,S=0;S<s.length;S+=2){var D=h[S],I=h[S+1],z=l[S]-c[0],O=l[S+1]-c[1],V=z*k-O*A,G=z*A+O*k;g[S]=V,g[S+1]=G;var F=V-D,U=G-I;E+=F*F+U*U}if(E<p){p=E,d=M;for(var j=0;j<g.length;j++)f[j]=g[j]}}i.push({from:h,to:f,fromCp:u,toCp:c,rotation:-d})}return i}function d0(t){return t.__isCombineMorphing}var v8="__mOriginal_";function v0(t,e,r){var n=v8+e,i=t[n]||t[e];t[n]||(t[n]=t[e]);var a=r.replace,o=r.after,s=r.before;t[e]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function wd(t,e){var r=v8+e;t[r]&&(t[e]=t[r],t[r]=null)}function Y5(t,e){for(var r=0;r<t.length;r++)for(var n=t[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=e[0]*a+e[2]*o+e[4],n[i++]=e[1]*a+e[3]*o+e[5]}}function p8(t,e){var r=t.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),i=rme(iC(r),iC(n)),a=i[0],o=i[1],s=t.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&Y5(a,s),l&&Y5(o,l),v0(e,"updateTransform",{replace:u}),e.transform=null;var c=ame(a,o,10,Math.PI),h=[];v0(e,"buildPath",{replace:function(f){for(var d=e.__morphT,p=1-d,g=[],m=0;m<c.length;m++){var y=c[m],_=y.from,S=y.to,T=y.rotation*d,C=y.fromCp,M=y.toCp,A=Math.sin(T),k=Math.cos(T);hd(g,C,M,d);for(var E=0;E<_.length;E+=2){var D=_[E],I=_[E+1],z=S[E],O=S[E+1],V=D*p+z*d,G=I*p+O*d;h[E]=V*k-G*A+g[0],h[E+1]=V*A+G*k+g[1]}var F=h[0],U=h[1];f.moveTo(F,U);for(var E=2;E<_.length;){var z=h[E++],O=h[E++],j=h[E++],W=h[E++],H=h[E++],X=h[E++];F===z&&U===O&&j===H&&W===X?f.lineTo(H,X):f.bezierCurveTo(z,O,j,W,H,X),F=H,U=X}}}})}function XA(t,e,r){if(!t||!e)return e;var n=r.done,i=r.during;p8(t,e),e.__morphT=0;function a(){wd(e,"buildPath"),wd(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},Se({during:function(o){e.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),e}function ome(t,e,r,n,i,a){var o=16;t=i===r?0:Math.round(32767*(t-r)/(i-r)),e=a===n?0:Math.round(32767*(e-n)/(a-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,h=0;(t&u)>0&&(c=1),(e&u)>0&&(h=1),s+=u*u*(3*c^h),h===0&&(c===1&&(t=u-1-t,e=u-1-e),l=t,t=e,e=l)}return s}function p0(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=re(t,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),r=Math.min(h,r),n=Math.max(c,n),i=Math.max(h,i),[c,h]}),o=re(a,function(s,l){return{cp:s,z:ome(s[0],s[1],e,r,n,i),path:t[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function g8(t){return eme(t.path,t.count)}function oC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function sme(t,e,r){var n=[];function i(C){for(var M=0;M<C.length;M++){var A=C[M];d0(A)?i(A.childrenRef()):A instanceof Ue&&n.push(A)}}i(t);var a=n.length;if(!a)return oC();var o=r.dividePath||g8,s=o({path:e,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),oC();n=p0(n),s=p0(s);for(var l=r.done,u=r.during,c=r.individualDelay,h=new qa,f=0;f<a;f++){var d=n[f],p=s[f];p.parent=e,p.copyTransform(h),c||p8(d,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function g(C){for(var M=0;M<s.length;M++)s[M].addSelfToZr(C)}v0(e,"addSelfToZr",{after:function(C){g(C)}}),v0(e,"removeSelfFromZr",{after:function(C){for(var M=0;M<s.length;M++)s[M].removeSelfFromZr(C)}});function m(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,wd(e,"addSelfToZr"),wd(e,"removeSelfFromZr")}var y=s.length;if(c)for(var _=y,S=function(){_--,_===0&&(m(),l&&l())},f=0;f<y;f++){var T=c?Se({delay:(r.delay||0)+c(f,y,n[f],s[f]),done:S},r):r;XA(n[f],s[f],T)}else e.__morphT=0,e.animateTo({__morphT:1},Se({during:function(C){for(var M=0;M<y;M++){var A=s[M];A.__morphT=e.__morphT,A.dirtyShape()}u&&u(C)},done:function(){m();for(var C=0;C<t.length;C++)wd(t[C],"updateTransform");l&&l()}},r));return e.__zr&&g(e.__zr),{fromIndividuals:n,toIndividuals:s,count:y}}function lme(t,e,r){var n=e.length,i=[],a=r.dividePath||g8;function o(d){for(var p=0;p<d.length;p++){var g=d[p];d0(g)?o(g.childrenRef()):g instanceof Ue&&i.push(g)}}if(d0(t)){o(t.childrenRef());var s=i.length;if(s<n)for(var l=0,u=s;u<n;u++)i.push(H2(i[l++%s]));i.length=n}else{i=a({path:t,count:n});for(var c=t.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),oC()}i=p0(i),e=p0(e);for(var h=r.individualDelay,u=0;u<n;u++){var f=h?Se({delay:(r.delay||0)+h(u,n,i[u],e[u])},r):r;XA(i[u],e[u],f)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}function X5(t){return ee(t[0])}function q5(t,e){for(var r=[],n=t.length,i=0;i<n;i++)r.push({one:t[i],many:[]});for(var i=0;i<e.length;i++){var a=e[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(e[i][o])}for(var s=0,i=n-1;i>=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 ume={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n<t.count;n++){var i=H2(t.path);i.setStyle("opacity",r),e.push(i)}return e},split:null};function KS(t,e,r,n,i,a){if(!t.length||!e.length)return;var o=xh("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;X5(t)&&(u=t,c=e),X5(e)&&(u=e,c=t);function h(y,_,S,T,C){var M=y.many,A=y.one;if(M.length===1&&!C){var k=_?M[0]:A,E=_?A:M[0];if(d0(k))h({many:[k],one:E},!0,S,T,!0);else{var D=s?Se({delay:s(S,T)},l):l;XA(k,E,D),a(k,E,k,E,D)}}else for(var I=Se({dividePath:ume[r],individualDelay:s&&function(U,j,W,H){return s(U+S,T)}},l),z=_?sme(M,A,I):lme(A,M,I),O=z.fromIndividuals,V=z.toIndividuals,G=O.length,F=0;F<G;F++){var D=s?Se({delay:s(F,G)},l):l;a(O[F],V[F],_?M[F]:y.one,_?y.one:M[F],D)}}for(var f=u?u===t:t.length>e.length,d=u?q5(c,u):q5(f?e:t,[f?t:e]),p=0,g=0;g<d.length;g++)p+=d[g].many.length;for(var m=0,g=0;g<d.length;g++)h(d[g],f,m,p),m+=d[g].many.length}function ml(t){if(!t)return[];if(ee(t)){for(var e=[],r=0;r<t.length;r++)e.push(ml(t[r]));return e}var n=[];return t.traverse(function(i){i instanceof Ue&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var m8=1e4,cme=0,K5=1,Q5=2,hme=Fe();function fme(t,e){for(var r=t.dimensions,n=0;n<r.length;n++){var i=t.getDimensionInfo(r[n]);if(i&&i.otherDims[e]===0)return r[n]}}function dme(t,e,r){var n=t.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=t.get(n.name,e);return i&&i.categories[a]||a+""}}function J5(t,e,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=fme(t,i);if(a){var o=dme(t,e,a);return o}var s=t.getRawDataItem(e),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return r||t.getId(e)}function ez(t){var e=[];return R(t,function(r){var n=r.data,i=r.dataGroupId;if(!(n.count()>m8))for(var a=n.getIndices(),o=0;o<a.length;o++)e.push({data:n,groupId:J5(n,o,i,!1),childGroupId:J5(n,o,i,!0),divide:r.divide,dataIndex:o})}),e}function QS(t,e,r){t.traverse(function(n){n instanceof Ue&&St(n,{style:{opacity:0}},e,{dataIndex:r,isFrom:!0})})}function JS(t){if(t.parent){var e=t.getComputedTransform();t.setLocalTransform(e),t.parent.remove(t)}}function ec(t){t.stopAnimation(),t.isGroup&&t.traverse(function(e){e.stopAnimation()})}function vme(t,e,r){var n=xh("update",r,e);n&&t.traverse(function(i){if(i instanceof fi){var a=DK(i);a&&i.animateFrom({style:a},n)}})}function pme(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++){var i=t[n],a=e[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function y8(t,e,r){var n=ez(t),i=ez(e);function a(S,T,C,M,A){(C||S)&&T.animateFrom({style:C&&C!==S?J(J({},C.style),S.style):S.style},A)}var o=!1,s=cme,l=de(),u=de();n.forEach(function(S){S.groupId&&l.set(S.groupId,!0),S.childGroupId&&u.set(S.childGroupId,!0)});for(var c=0;c<i.length;c++){var h=i[c].groupId;if(u.get(h)){s=K5;break}var f=i[c].childGroupId;if(f&&l.get(f)){s=Q5;break}}function d(S,T){return function(C){var M=C.data,A=C.dataIndex;return T?M.getId(A):S?s===K5?C.childGroupId:C.groupId:s===Q5?C.childGroupId:C.groupId}}var p=pme(n,i),g={};if(!p)for(var c=0;c<i.length;c++){var m=i[c],y=m.data.getItemGraphicEl(m.dataIndex);y&&(g[y.id]=!0)}function _(S,T){var C=n[T],M=i[S],A=M.data.hostModel,k=C.data.getItemGraphicEl(C.dataIndex),E=M.data.getItemGraphicEl(M.dataIndex);if(k===E){E&&vme(E,M.dataIndex,A);return}k&&g[k.id]||E&&(ec(E),k?(ec(k),JS(k),o=!0,KS(ml(k),ml(E),M.divide,A,S,a)):QS(E,A,S))}new vo(n,i,d(!0,p),d(!1,p),null,"multiple").update(_).updateManyToOne(function(S,T){var C=i[S],M=C.data,A=M.hostModel,k=M.getItemGraphicEl(C.dataIndex),E=tt(re(T,function(D){return n[D].data.getItemGraphicEl(n[D].dataIndex)}),function(D){return D&&D!==k&&!g[D.id]});k&&(ec(k),E.length?(R(E,function(D){ec(D),JS(D)}),o=!0,KS(ml(E),ml(k),C.divide,A,S,a)):QS(k,A,C.dataIndex))}).updateOneToMany(function(S,T){var C=n[T],M=C.data.getItemGraphicEl(C.dataIndex);if(!(M&&g[M.id])){var A=tt(re(S,function(E){return i[E].data.getItemGraphicEl(i[E].dataIndex)}),function(E){return E&&E!==M}),k=i[S[0]].data.hostModel;A.length&&(R(A,function(E){return ec(E)}),M?(ec(M),JS(M),o=!0,KS(ml(M),ml(A),C.divide,k,S[0],a)):R(A,function(E){return QS(E,k,S[0])}))}}).updateManyToMany(function(S,T){new vo(T,S,function(C){return n[C].data.getId(n[C].dataIndex)},function(C){return i[C].data.getId(i[C].dataIndex)}).update(function(C,M){_(S[C],T[M])}).execute()}).execute(),o&&R(e,function(S){var T=S.data,C=T.hostModel,M=C&&r.getViewOfSeriesModel(C),A=xh("update",C,0);M&&C.isAnimationEnabled()&&A&&A.duration>0&&M.group.traverse(function(k){k instanceof Ue&&!k.animators.length&&k.animateFrom({style:{opacity:0}},A)})})}function tz(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function rz(t){return ee(t)?t.sort().join(","):t}function Bo(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function gme(t,e){var r=de(),n=de(),i=de();return R(t.oldSeries,function(a,o){var s=t.oldDataGroupIds[o],l=t.oldData[o],u=tz(a),c=rz(u);n.set(c,{dataGroupId:s,data:l}),ee(u)&&R(u,function(h){i.set(h,{key:c,dataGroupId:s,data:l})})}),R(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=tz(a),u=rz(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Bo(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Bo(s),data:s}]});else if(ee(l)){var h=[];R(l,function(p){var g=n.get(p);g.data&&h.push({dataGroupId:g.dataGroupId,divide:Bo(g.data),data:g.data})}),h.length&&r.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:Bo(s)}]})}else{var f=i.get(l);if(f){var d=r.get(f.key);d||(d={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:Bo(f.data)}],newSeries:[]},r.set(f.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:Bo(s)})}}}}),r}function nz(t,e){for(var r=0;r<t.length;r++){var n=e.seriesIndex!=null&&e.seriesIndex===t[r].seriesIndex||e.seriesId!=null&&e.seriesId===t[r].id;if(n)return r}}function mme(t,e,r,n){var i=[],a=[];R(gt(t.from),function(o){var s=nz(e.oldSeries,o);s>=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Bo(e.oldData[s]),groupIdDim:o.dimension})}),R(gt(t.to),function(o){var s=nz(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Bo(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&y8(i,a,n)}function yme(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){R(gt(n.seriesTransition),function(i){R(gt(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][Tm]=!0)})})}),t.registerUpdateLifecycle("series:transition",function(e,r,n){var i=hme(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)R(gt(a),function(d){mme(d,i,n,r)});else{var o=gme(i,n);R(o.keys(),function(d){var p=o.get(d);y8(p.oldSeries,p.newSeries,r)})}R(n.updatedSeries,function(d){d[Tm]&&(d[Tm]=!1)})}for(var s=e.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],c=i.oldData=[],h=0;h<s.length;h++){var f=s[h].getData();f.count()<m8&&(l.push(s[h]),u.push(s[h].get("dataGroupId")),c.push(f))}})}var _me=function(){function t(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return t.prototype.setBreaks=function(e){this.breaks=e.breaks},t.prototype.update=function(e){Sme(this,e);var r=this._elapsedExtent;r[0]=this.elapse(e[0]),r[1]=this.elapse(e[1])},t.prototype.hasBreaks=function(){return!!this.breaks.length},t.prototype.calcNiceTickMultiple=function(e,r){for(var n=0;n<this.breaks.length;n++){var i=this.breaks[n];if(i.vmin<e&&e<i.vmax){var a=r(e,i.vmax);return a}}return 0},t.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},t.prototype.normalize=function(e){var r=this._elapsedExtent[1]-this._elapsedExtent[0];return r===0?.5:(this.elapse(e)-this._elapsedExtent[0])/r},t.prototype.scale=function(e){return this.unelapse(e*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},t.prototype.elapse=function(e){for(var r=iz,n=az,i=!0,a=0;a<this.breaks.length;a++){var o=this.breaks[a];if(e<=o.vmax){e>o.vmin?r+=o.vmin-n+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=e-n,n=o.vmax,i=!1;break}r+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(r+=e-n),r},t.prototype.unelapse=function(e){for(var r=iz,n=az,i=!0,a=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],l=r+s.vmin-n,u=l+s.gapReal;if(e<=u){e>l?a=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):a=n+e-r,n=s.vmax,i=!1;break}r=u,n=s.vmax}return i&&(a=n+e-r),a},t}();function xme(){return new _me}var iz=0,az=0;function Sme(t,e){var r=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};R(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=qA(s,e);if(u){var c=u.vmin!==s.vmin,h=u.vmax!==s.vmax,f=u.vmax-u.vmin;if(!(c&&h))if(c||h){var d=c?"S":"E";a[d][l.type].has=!0,a[d][l.type].span=f,a[d][l.type].inExtFrac=f/(s.vmax-s.vmin),a[d][l.type].val=l.val}else n[l.type].span+=f,n[l.type].val+=l.val}});var o=r*(0+(e[1]-e[0])+(n.tpAbs.val-n.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));R(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function bme(t,e,r,n,i,a){t!=="no"&&R(r,function(o){var s=qA(o,a);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],c=n(u),h=i*3/4;c>s.vmin-h&&c<s.vmax+h&&(t!=="preserve_extent_bound"||c!==a[0]&&c!==a[1])&&e.splice(l,1)}})}function wme(t,e,r,n){R(e,function(i){var a=qA(i,r);a&&(t.push({value:a.vmin,break:{type:"vmin",parsedBreak:a},time:n?n(a):void 0}),t.push({value:a.vmax,break:{type:"vmax",parsedBreak:a},time:n?n(a):void 0}))}),e.length&&t.sort(function(i,a){return i.value-a.value})}function qA(t,e){var r=Math.max(t.vmin,e[0]),n=Math.min(t.vmax,e[1]);return r<n||r===n&&r>e[0]&&r<e[1]?{vmin:r,vmax:n,breakOption:t.breakOption,gapParsed:t.gapParsed,gapReal:t.gapReal}:null}function sC(t,e,r){var n=[];if(!t)return{breaks:n};function i(o,s){return o>=0&&o<1-1e-5}R(t,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:ye(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(se(o.gap)){var u=kn(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var h=e(o.gap);(!isFinite(h)||h<0)&&(h=0),s.gapParsed.type="tpAbs",s.gapParsed.val=h}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&R(["vmin","vmax"],function(d){s[d]<0&&(s[d]=0)}),s.vmin>s.vmax){var f=s.vmax;s.vmax=s.vmin,s.vmin=f}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var a=-1/0;return R(n,function(o,s){a>o.vmin&&(n[s]=null),a=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function KA(t,e){return lC(e)===lC(t)}function lC(t){return t.start+"_\0_"+t.end}function Tme(t,e,r){var n=[];R(t,function(a,o){var s=e(a);s&&s.type==="vmin"&&n.push([o])}),R(t,function(a,o){var s=e(a);if(s&&s.type==="vmax"){var l=As(n,function(u){return KA(e(t[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return R(n,function(a){a.length===2&&i.push(r?a:[t[a[0]],t[a[1]]])}),i}function Cme(t,e,r,n){var i,a;if(t.break){var o=t.break.parsedBreak,s=As(r,function(h){return KA(h.breakOption,t.break.parsedBreak.breakOption)}),l=n(Math.pow(e,o.vmin),s.vmin),u=n(Math.pow(e,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?Ht(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:t.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},a=s[t.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function Mme(t,e,r){var n={noNegative:!0},i=sC(t,r,n),a=sC(t,r,n),o=Math.log(e);return a.breaks=re(a.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var Ame={vmin:"start",vmax:"end"};function Lme(t,e){return e&&(t=t||{},t.break={type:Ame[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),t}function Pme(){KK({createScaleBreakContext:xme,pruneTicksByBreak:bme,addBreaksToTicks:wme,parseAxisBreakOption:sC,identifyAxisBreak:KA,serializeAxisBreakIdentifier:lC,retrieveAxisBreakPairs:Tme,getTicksLogTransformBreak:Cme,logarithmicParseBreaksFromOption:Mme,makeAxisLabelFormatterParamBreak:Lme})}var oz=Fe();function kme(t,e){var r=As(t,function(n){return Xt().identifyAxisBreak(n.parsedBreak.breakOption,e.breakOption)});return r||t.push(r={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),r}function Dme(t){R(t,function(e){return e.shouldRemove=!0})}function Ime(t){for(var e=t.length-1;e>=0;e--)t[e].shouldRemove&&t.splice(e,1)}function Eme(t,e,r,n,i){var a=r.axis;if(a.scale.isBlank()||!Xt())return;var o=Xt().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(E){return E.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var h=s.get("expandOnClick"),f=s.get("zigzagZ"),d=s.getModel("itemStyle"),p=d.getItemStyle(),g=p.stroke,m=p.lineWidth,y=p.lineDash,_=p.fill,S=new _e({ignoreModelZ:!0}),T=a.isHorizontal(),C=oz(e).visualList||(oz(e).visualList=[]);Dme(C);for(var M=function(E){var D=o[E][0].break.parsedBreak,I=[];I[0]=a.toGlobalCoord(a.dataToCoord(D.vmin,!0)),I[1]=a.toGlobalCoord(a.dataToCoord(D.vmax,!0)),I[1]<I[0]&&I.reverse();var z=kme(C,D);z.shouldRemove=!1;var O=new _e;k(z.zigzagRandomList,O,I[0],I[1],T,D),h&&O.on("click",function(){var V={type:h_,breaks:[{start:D.breakOption.start,end:D.breakOption.end}]};V[a.dim+"AxisIndex"]=r.componentIndex,i.dispatchAction(V)}),O.silent=!h,S.add(O)},A=0;A<o.length;A++)M(A);t.add(S),Ime(C);function k(E,D,I,z,O,V){var G={stroke:g,lineWidth:m,lineDash:y,fill:"none"},F=O?0:1,U=1-F,j=n[De[U]]+n[qt[U]];function W(st){var Ye=[],rt=[];Ye[F]=rt[F]=st,Ye[U]=n[De[U]],rt[U]=j;var ut={x1:Ye[0],y1:Ye[1],x2:rt[0],y2:rt[1]};return q0(ut,ut,{lineWidth:1}),Ye[0]=ut.x1,Ye[1]=ut.y1,Ye[F]}I=W(I),z=W(z);for(var H=[],X=[],K=!0,ne=n[De[U]],ie=0;;ie++){var ue=ne===n[De[U]],ve=ne>=j;ve&&(ne=j);var Ge=[],xe=[];Ge[F]=I,xe[F]=z,!ue&&!ve&&(Ge[F]+=K?-l:l,xe[F]-=K?l:-l),Ge[U]=ne,xe[U]=ne,H.push(Ge),X.push(xe);var ge=void 0;if(ie<E.length?ge=E[ie]:(ge=Math.random(),E.push(ge)),ne+=ge*(c-u)+u,K=!K,ve)break}var ke=Xt().serializeAxisBreakIdentifier(V.breakOption);if(D.add(new Tr({anid:"break_a_"+ke,shape:{points:H},style:G,z:f})),V.gapReal!==0){D.add(new Tr({anid:"break_b_"+ke,shape:{points:X},style:G,z:f}));var fe=X.slice();fe.reverse();var Me=H.concat(fe);D.add(new zr({anid:"break_c_"+ke,shape:{points:Me},style:{fill:_,opacity:p.opacity},z:f}))}}}function Nme(t,e,r,n){var i=t.axis,a=r.transform;Rr(n.style);var o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());var s=Xt().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(m){return m.break},!1),l=re(s,function(m){var y=m[0].break.parsedBreak,_=[i.dataToCoord(y.vmin,!0),i.dataToCoord(y.vmax,!0)];return _[0]>_[1]&&_.reverse(),{coordPair:_,brkId:Xt().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(m,y){return m.coordPair[0]-y.coordPair[0]});for(var u=o[0],c=null,h=0;h<l.length;h++){var f=l[h],d=Math.max(f.coordPair[0],o[0]),p=Math.min(f.coordPair[1],o[1]);u<=d&&g(u,d,c,f),u=p,c=f}u<=o[1]&&g(u,o[1],c,null);function g(m,y,_,S){function T(I,z){a&&(Ot(I,I,a),Ot(z,z,a))}function C(I,z){var O={x1:I[0],y1:I[1],x2:z[0],y2:z[1]};q0(O,O,n.style),I[0]=O.x1,I[1]=O.y1,z[0]=O.x2,z[1]=O.y2}var M=[m,0],A=[y,0],k=[m,5],E=[y,5];T(M,k),C(M,k),T(A,E),C(A,E),C(M,A);var D=new Wt(J({shape:{x1:M[0],y1:M[1],x2:A[0],y2:A[1]}},n));e.add(D),D.anid="breakLine_"+(_?_.brkId:"\0")+"_\0_"+(S?S.brkId:"\0")}}function Rme(t,e,r){if(As(r,function(_){return!_}))return;var n=new Te;if(!u_(r[0],r[1],n,{direction:-(t?e+Math.PI:e),touchThreshold:0,bidirectional:!1}))return;var i=fr();_o(i,i,-e);var a=re(r,function(_){return _.transform?Ii(fr(),i,_.transform):i});function o(_){var S=r[0].localRect,T=new Te(S[qt[_]]*a[0][0],S[qt[_]]*a[0][1]);return Math.abs(T.y)<1e-5}var s=.5;if(o(0)||o(1)){var l=re(r,function(_,S){var T=_.localRect.clone();return T.applyTransform(a[S]),T}),u=new Te;u.copy(r[0].label).add(r[1].label).scale(.5),u.transform(i);var c=n.clone().transform(i),h=l[0].x+l[1].x+(c.x>=0?l[0].width:l[1].width),f=(h+c.x)/2-u.x,d=Math.min(f,f-c.x),p=Math.max(f,f-c.x),g=p<0?p:d>0?d:0;s=(f-g)/c.x}var m=new Te,y=new Te;Te.scale(m,n,-s),Te.scale(y,n,1-s),uT(r[0],m),uT(r[1],y)}function Ome(t,e){var r={breaks:[]};return R(e.breaks,function(n){if(n){var i=As(t.get("breaks",!0),function(s){return Xt().identifyAxisBreak(s,n)});if(i){var a=e.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===h_?!0:a===jG?!1:a===VG?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),r}function zme(){Iie({adjustBreakLabelPair:Rme,buildAxisBreakLine:Nme,rectCoordBuildBreakAxis:Eme,updateModelAxisBreak:Ome})}function Bme(t){Bie(t),Pme(),zme()}function jme(){aae(Vme)}function Vme(t,e){R(t,function(r){if(!r.model.get(["axisLabel","inside"])){var n=Fme(r);if(n){var i=r.isHorizontal()?"height":"width",a=r.model.get(["axisLabel","margin"]);e[i]-=n[i]+a,r.position==="top"?e.y+=n.height+a:r.position==="left"&&(e.x+=n.width+a)}}})}function Fme(t){var e=t.model,r=t.scale;if(!e.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof rh?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=kh(t),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var h=n?n[c]:{value:a[0]+c},f=s(h,c),d=o.getTextRect(f),p=g(d,o.get("rotate")||0);l?l.union(p):l=p}return l;function g(m,y){var _=y*Math.PI/180,S=m.width,T=m.height,C=S*Math.abs(Math.cos(_))+Math.abs(T*Math.sin(_)),M=S*Math.abs(Math.sin(_))+Math.abs(T*Math.cos(_)),A=new Ce(m.x,m.y,C,M);return A}}ze([kne]);ze([Cne]);ze([qne,hie,Sie,Tae,Rae,Toe,Koe,Nse,tle,lle,vle,ble,pue,jue,que,fce,gce,Mce,Ece,Wce,qce,ohe,Whe]);ze(ufe);ze(Nfe);ze(f6);ze(Zfe);ze(Q6);ze(qfe);ze(gde);ze(Cde);ze(hve);ze(kve);ze(ep);ze(Zve);ze(Xve);ze(ape);ze(dpe);ze(_pe);ze(Cpe);ze(Rpe);ze(ege);ze(i8);ze(a8);ze(xge);ze(c8);ze(h8);ze(Tge);ze(Pge);ze(Gge);ze(Uge);ze(yme);ze(Ure);ze(Bme);ze(jme);ze(Cae);const Gme=Object.freeze(Object.defineProperty({__proto__:null,Axis:gi,ChartView:lt,ComponentModel:Ve,ComponentView:mt,List:Yr,Model:We,PRIORITY:oF,SeriesModel:dt,color:HY,connect:Yee,dataTool:rte,dependencies:kee,disConnect:Xee,disconnect:vF,dispose:qee,env:Ze,extendChartView:kre,extendComponentModel:Are,extendComponentView:Lre,extendSeriesModel:Pre,format:fre,getCoordinateSystemDimensions:Qee,getInstanceByDom:AM,getInstanceById:Kee,getMap:tte,graphic:hre,helper:nre,init:$ee,innerDrawElementOnCanvas:wM,matrix:yY,number:ure,parseGeoJSON:sT,parseGeoJson:sT,registerAction:Fi,registerCoordinateSystem:mF,registerCustomSeries:Jee,registerLayout:yF,registerLoading:IM,registerLocale:eM,registerMap:_F,registerPostInit:pF,registerPostUpdate:gF,registerPreprocessor:PM,registerProcessor:kM,registerTheme:LM,registerTransform:xF,registerUpdateLifecycle:l_,registerVisual:Ds,setCanvasCreator:ete,setPlatformAPI:t4,throttle:o_,time:cre,use:ze,util:dre,vector:nY,version:Pee,zrUtil:q$,zrender:CX},Symbol.toStringTag,{value:"Module"}));var Fl={},vs={},_8={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=1;t.default=function(){return"".concat(e++)}})(_8);var x_={},S_={},QA={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var a=this,o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];clearTimeout(i),i=setTimeout(function(){r.apply(a,s)},n)}}})(QA);var Sa={};Object.defineProperty(Sa,"__esModule",{value:!0});Sa.SizeSensorId=Sa.SensorTabIndex=Sa.SensorClassName=void 0;Sa.SizeSensorId="size-sensor-id";Sa.SensorClassName="size-sensor-object";Sa.SensorTabIndex="-1";Object.defineProperty(S_,"__esModule",{value:!0});S_.createSensor=void 0;var Hme=Wme(QA),eb=Sa;function Wme(t){return t&&t.__esModule?t:{default:t}}S_.createSensor=function(e,r){var n=void 0,i=[],a=function(){getComputedStyle(e).position==="static"&&(e.style.position="relative");var h=document.createElement("object");return h.onload=function(){h.contentDocument.defaultView.addEventListener("resize",o),o()},h.style.display="block",h.style.position="absolute",h.style.top="0",h.style.left="0",h.style.height="100%",h.style.width="100%",h.style.overflow="hidden",h.style.pointerEvents="none",h.style.zIndex="-1",h.style.opacity="0",h.setAttribute("class",eb.SensorClassName),h.setAttribute("tabindex",eb.SensorTabIndex),h.type="text/html",e.appendChild(h),h.data="about:blank",h},o=(0,Hme.default)(function(){i.forEach(function(c){c(e)})}),s=function(h){n||(n=a()),i.indexOf(h)===-1&&i.push(h)},l=function(){n&&n.parentNode&&(n.contentDocument&&n.contentDocument.defaultView.removeEventListener("resize",o),n.parentNode.removeChild(n),e.removeAttribute(eb.SizeSensorId),n=void 0,i=[],r&&r())},u=function(h){var f=i.indexOf(h);f!==-1&&i.splice(f,1),i.length===0&&n&&l()};return{element:e,bind:s,destroy:l,unbind:u}};var b_={};Object.defineProperty(b_,"__esModule",{value:!0});b_.createSensor=void 0;var Ume=Sa,Zme=$me(QA);function $me(t){return t&&t.__esModule?t:{default:t}}b_.createSensor=function(e,r){var n=void 0,i=[],a=(0,Zme.default)(function(){i.forEach(function(c){c(e)})}),o=function(){var h=new ResizeObserver(a);return h.observe(e),a(),h},s=function(h){n||(n=o()),i.indexOf(h)===-1&&i.push(h)},l=function(){n&&n.disconnect(),i=[],n=void 0,e.removeAttribute(Ume.SizeSensorId),r&&r()},u=function(h){var f=i.indexOf(h);f!==-1&&i.splice(f,1),i.length===0&&n&&l()};return{element:e,bind:s,destroy:l,unbind:u}};Object.defineProperty(x_,"__esModule",{value:!0});x_.createSensor=void 0;var Yme=S_,Xme=b_;x_.createSensor=typeof ResizeObserver<"u"?Xme.createSensor:Yme.createSensor;Object.defineProperty(vs,"__esModule",{value:!0});vs.removeSensor=vs.getSensor=vs.Sensors=void 0;var qme=Qme(_8),Kme=x_,uC=Sa;function Qme(t){return t&&t.__esModule?t:{default:t}}var Td=vs.Sensors={};function x8(t){t&&Td[t]&&delete Td[t]}vs.getSensor=function(e){var r=e.getAttribute(uC.SizeSensorId);if(r&&Td[r])return Td[r];var n=(0,qme.default)();e.setAttribute(uC.SizeSensorId,n);var i=(0,Kme.createSensor)(e,function(){return x8(n)});return Td[n]=i,i};vs.removeSensor=function(e){var r=e.element.getAttribute(uC.SizeSensorId);e.destroy(),x8(r)};var JA,eL;Object.defineProperty(Fl,"__esModule",{value:!0});Fl.ver=eL=Fl.clear=JA=Fl.bind=void 0;var cC=vs;JA=Fl.bind=function(e,r){var n=(0,cC.getSensor)(e);return n.bind(r),function(){n.unbind(r)}};eL=Fl.clear=function(e){var r=(0,cC.getSensor)(e);(0,cC.removeSensor)(r)};Fl.ver="1.0.3";function sz(t,e){var r={};return e.forEach(function(n){r[n]=t[n]}),r}function tb(t){return typeof t=="function"}function Jme(t){return typeof t=="string"}var eye=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var o=a[i];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r};const tc=dC(eye);var tye=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.echarts=r.echarts,n.ele=null,n.isInitialResize=!0,n.eventHandlerRefs={},n}return e.prototype.componentDidMount=function(){this.renderNewEcharts()},e.prototype.componentDidUpdate=function(r){var n=this.props.shouldSetOption;if(!(tb(n)&&!n(r,this.props))){if(!tc(r.theme,this.props.theme)||!tc(r.opts,this.props.opts)){this.dispose(),this.renderNewEcharts();return}var i=this.getEchartsInstance();tc(r.onEvents,this.props.onEvents)||(this.unbindEvents(i),this.bindEvents(i,this.props.onEvents));var a=["option","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption"];tc(sz(this.props,a),sz(r,a))||this.updateEChartsOption(),(!tc(r.style,this.props.style)||!tc(r.className,this.props.className))&&this.resize()}},e.prototype.componentWillUnmount=function(){this.dispose()},e.prototype.initEchartsInstance=function(){return kk(this,void 0,void 0,function(){var r=this;return Dk(this,function(n){return[2,new Promise(function(i){r.echarts.init(r.ele,r.props.theme,r.props.opts);var a=r.getEchartsInstance();a.on("finished",function(){var o=r.ele.clientWidth,s=r.ele.clientHeight;r.echarts.dispose(r.ele);var l=ld({width:o,height:s},r.props.opts);i(r.echarts.init(r.ele,r.props.theme,l))})})]})})},e.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)},e.prototype.dispose=function(){if(this.ele){try{eL(this.ele)}catch(r){console.warn(r)}this.echarts.dispose(this.ele)}},e.prototype.renderNewEcharts=function(){return kk(this,void 0,void 0,function(){var r,n,i,a,o,s,l=this;return Dk(this,function(u){switch(u.label){case 0:return r=this.props,n=r.onEvents,i=r.onChartReady,a=r.autoResize,o=a===void 0?!0:a,[4,this.initEchartsInstance()];case 1:return u.sent(),s=this.updateEChartsOption(),this.bindEvents(s,n||{}),tb(i)&&i(s),this.ele&&o&&JA(this.ele,function(){l.resize()}),[2]}})})},e.prototype.bindEvents=function(r,n){var i=this,a=function(s,l){if(Jme(s)&&tb(l)){var u=function(c){l(c,r)};r.on(s,u),i.eventHandlerRefs[s]=u}};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&a(o,n[o])},e.prototype.unbindEvents=function(r){for(var n=0,i=Object.entries(this.eventHandlerRefs);n<i.length;n++){var a=i[n],o=a[0],s=a[1];r.off(o,s)}this.eventHandlerRefs={}},e.prototype.updateEChartsOption=function(){var r=this.props,n=r.option,i=r.notMerge,a=i===void 0?!1:i,o=r.replaceMerge,s=o===void 0?null:o,l=r.lazyUpdate,u=l===void 0?!1:l,c=r.showLoading,h=r.loadingOption,f=h===void 0?null:h,d=this.getEchartsInstance();return d.setOption(n,{notMerge:a,replaceMerge:s,lazyUpdate:u}),c?d.showLoading(f):d.hideLoading(),d},e.prototype.resize=function(){var r=this.getEchartsInstance();if(!this.isInitialResize)try{r.resize({width:"auto",height:"auto"})}catch(n){console.warn(n)}this.isInitialResize=!1},e.prototype.render=function(){var r=this,n=this.props,i=n.style,a=n.className,o=a===void 0?"":a;n.echarts,n.option,n.theme,n.notMerge,n.replaceMerge,n.lazyUpdate,n.showLoading,n.loadingOption,n.opts,n.onChartReady,n.onEvents,n.shouldSetOption,n.autoResize;var s=I$(n,["style","className","echarts","option","theme","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption","opts","onChartReady","onEvents","shouldSetOption","autoResize"]),l=ld({height:300},i);return Bc.createElement("div",ld({ref:function(u){r.ele=u},style:l,className:"echarts-for-react ".concat(o)},s))},e}($.PureComponent),rye=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.echarts=Gme,n}return e}(tye);const lz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],uz=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function nye(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function iye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function aye(t){return t==="ROUTER"||t==="ROUTER_LATE"?30:t==="REPEATER"||t==="TRACKER"?25:t==="CLIENT_MUTE"?7:t==="CLIENT_BASE"?12:15}function oye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=$.useRef(null),[a,o]=$.useState("connected"),s=$.useMemo(()=>{const m=new Set;return e.forEach(y=>{m.add(y.from_node),m.add(y.to_node)}),m},[e]),l=$.useMemo(()=>{let m=t;return a==="connected"?m=m.filter(y=>s.has(y.node_num)):a==="infra"&&(m=m.filter(y=>uz.includes(y.role))),m},[t,a,s]),u=$.useMemo(()=>new Map(l.map(m=>[m.node_num,m])),[l]),c=$.useMemo(()=>e.filter(m=>u.has(m.from_node)&&u.has(m.to_node)),[e,u]),h=$.useMemo(()=>{const m=new Set;return r!==null&&c.forEach(y=>{y.from_node===r&&m.add(y.to_node),y.to_node===r&&m.add(y.from_node)}),m},[r,c]),f=$.useMemo(()=>{const m=l.map(_=>{const S=iye(_.latitude),T=lz[S%lz.length],C=uz.includes(_.role),M=_.node_num===r,A=h.has(_.node_num),k=r===null||M||A;return{id:String(_.node_num),name:_.short_name,value:_.node_num,symbolSize:aye(_.role),itemStyle:{color:C?T:"#111827",borderColor:T,borderWidth:C?0:2,opacity:k?1:.15},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace",color:k?"#94a3b8":"#94a3b820"},nodeNum:_.node_num,longName:_.long_name,role:_.role}}),y=c.map(_=>{const S=r===null||_.from_node===r||_.to_node===r;return{source:String(_.from_node),target:String(_.to_node),value:_.snr,lineStyle:{color:nye(_.snr),width:S&&r!==null?2:1,opacity:r===null?.4:S?.6:.04}}});return{nodes:m,links:y}},[l,c,r,h]),d=$.useMemo(()=>({backgroundColor:"#111827",tooltip:{trigger:"item",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontFamily:"JetBrains Mono, monospace",fontSize:11},formatter:m=>{if(m.data&&m.data.longName){const y=m.data;return`<strong>${y.name}</strong><br/>${y.longName}<br/>Role: ${y.role}`}return""}},series:[{type:"graph",layout:"force",roam:!0,draggable:!0,animation:!1,data:f.nodes,links:f.links,force:{repulsion:200,edgeLength:[80,120],gravity:.1},emphasis:{focus:"adjacency",blurScope:"coordinateSystem",scale:1.1,lineStyle:{width:2}},blur:{itemStyle:{opacity:.15},lineStyle:{opacity:.04}},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace"},edgeLabel:{show:!1},edgeSymbol:["none","none"]}]}),[f]),p=$.useCallback(m=>{if(m.data&&"nodeNum"in m.data){const y=m.data.nodeNum;n(r===y?null:y??null)}},[r,n]),g=$.useMemo(()=>({click:p}),[p]);return $.useEffect(()=>{var y;const m=(y=i.current)==null?void 0:y.getEchartsInstance();m&&m.setOption(d,{notMerge:!1,lazyUpdate:!0})},[d]),b.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[b.jsx(rye,{ref:i,option:d,style:{height:"540px",width:"100%"},onEvents:g,opts:{renderer:"canvas"}}),b.jsxs("div",{className:"absolute top-4 left-4 flex items-center gap-2 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2",children:[b.jsx(f2,{size:14,className:"text-slate-500"}),b.jsx("div",{className:"flex gap-1",children:[{key:"connected",label:"Connected"},{key:"infra",label:"Infra"},{key:"all",label:"All"}].map(({key:m,label:y})=>b.jsx("button",{onClick:()=>o(m),className:`px-2 py-1 text-xs rounded transition-colors ${a===m?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:y},m))}),b.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[l.length," nodes • ",c.length," edges"]})]}),b.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[b.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Edge Quality (SNR)"}),b.jsx("div",{className:"space-y-1",children:[{label:"Excellent (>12)",color:"#22c55e"},{label:"Good (8-12)",color:"#4ade80"},{label:"Fair (5-8)",color:"#f59e0b"},{label:"Marginal (3-5)",color:"#f97316"},{label:"Poor (<3)",color:"#ef4444"}].map(m=>b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"w-4 h-0.5",style:{backgroundColor:m.color}}),b.jsx("span",{className:"text-xs text-slate-500",children:m.label})]},m.label))})]}),b.jsxs("div",{className:"absolute bottom-4 right-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[b.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Node Type"}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),b.jsx("span",{className:"text-xs text-slate-500",children:"Infrastructure"})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"w-3 h-3 rounded-full bg-gray-900 border-2 border-blue-500"}),b.jsx("span",{className:"text-xs text-slate-500",children:"Client"})]})]})]})]})}function S8(t,e){const r=$.useRef(e);$.useEffect(function(){e!==r.current&&t.attributionControl!=null&&(r.current!=null&&t.attributionControl.removeAttribution(r.current),e!=null&&t.attributionControl.addAttribution(e)),r.current=e},[t,e])}function sye(t,e,r){e.center!==r.center&&t.setLatLng(e.center),e.radius!=null&&e.radius!==r.radius&&t.setRadius(e.radius)}const lye=1;function uye(t){return Object.freeze({__version:lye,map:t})}function b8(t,e){return Object.freeze({...t,...e})}const w8=$.createContext(null),T8=w8.Provider;function w_(){const t=$.useContext(w8);if(t==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return t}function cye(t){function e(r,n){const{instance:i,context:a}=t(r).current;return $.useImperativeHandle(n,()=>i),r.children==null?null:Bc.createElement(T8,{value:a},r.children)}return $.forwardRef(e)}function hye(t){function e(r,n){const[i,a]=$.useState(!1),{instance:o}=t(r,a).current;$.useImperativeHandle(n,()=>o),$.useEffect(function(){i&&o.update()},[o,i,r.children]);const s=o._contentNode;return s?P3.createPortal(r.children,s):null}return $.forwardRef(e)}function fye(t){function e(r,n){const{instance:i}=t(r).current;return $.useImperativeHandle(n,()=>i),null}return $.forwardRef(e)}function tL(t,e){const r=$.useRef();$.useEffect(function(){return e!=null&&t.instance.on(e),r.current=e,function(){r.current!=null&&t.instance.off(r.current),r.current=null}},[t,e])}function T_(t,e){const r=t.pane??e.pane;return r?{...t,pane:r}:t}function dye(t,e){return function(n,i){const a=w_(),o=t(T_(n,a),a);return S8(a.map,n.attribution),tL(o.current,n.eventHandlers),e(o.current,a,n,i),o}}var hC={exports:{}};/* @preserve
|
||
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
||
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
||
*/(function(t,e){(function(r,n){n(e)})(eU,function(r){var n="1.9.4";function i(v){var x,w,P,N;for(w=1,P=arguments.length;w<P;w++){N=arguments[w];for(x in N)v[x]=N[x]}return v}var a=Object.create||function(){function v(){}return function(x){return v.prototype=x,new v}}();function o(v,x){var w=Array.prototype.slice;if(v.bind)return v.bind.apply(v,w.call(arguments,1));var P=w.call(arguments,2);return function(){return v.apply(x,P.length?P.concat(w.call(arguments)):arguments)}}var s=0;function l(v){return"_leaflet_id"in v||(v._leaflet_id=++s),v._leaflet_id}function u(v,x,w){var P,N,B,Z;return Z=function(){P=!1,N&&(B.apply(w,N),N=!1)},B=function(){P?N=arguments:(v.apply(w,arguments),setTimeout(Z,x),P=!0)},B}function c(v,x,w){var P=x[1],N=x[0],B=P-N;return v===P&&w?v:((v-N)%B+B)%B+N}function h(){return!1}function f(v,x){if(x===!1)return v;var w=Math.pow(10,x===void 0?6:x);return Math.round(v*w)/w}function d(v){return v.trim?v.trim():v.replace(/^\s+|\s+$/g,"")}function p(v){return d(v).split(/\s+/)}function g(v,x){Object.prototype.hasOwnProperty.call(v,"options")||(v.options=v.options?a(v.options):{});for(var w in x)v.options[w]=x[w];return v.options}function m(v,x,w){var P=[];for(var N in v)P.push(encodeURIComponent(w?N.toUpperCase():N)+"="+encodeURIComponent(v[N]));return(!x||x.indexOf("?")===-1?"?":"&")+P.join("&")}var y=/\{ *([\w_ -]+) *\}/g;function _(v,x){return v.replace(y,function(w,P){var N=x[P];if(N===void 0)throw new Error("No value provided for variable "+w);return typeof N=="function"&&(N=N(x)),N})}var S=Array.isArray||function(v){return Object.prototype.toString.call(v)==="[object Array]"};function T(v,x){for(var w=0;w<v.length;w++)if(v[w]===x)return w;return-1}var C="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function M(v){return window["webkit"+v]||window["moz"+v]||window["ms"+v]}var A=0;function k(v){var x=+new Date,w=Math.max(0,16-(x-A));return A=x+w,window.setTimeout(v,w)}var E=window.requestAnimationFrame||M("RequestAnimationFrame")||k,D=window.cancelAnimationFrame||M("CancelAnimationFrame")||M("CancelRequestAnimationFrame")||function(v){window.clearTimeout(v)};function I(v,x,w){if(w&&E===k)v.call(x);else return E.call(window,o(v,x))}function z(v){v&&D.call(window,v)}var O={__proto__:null,extend:i,create:a,bind:o,get lastId(){return s},stamp:l,throttle:u,wrapNum:c,falseFn:h,formatNum:f,trim:d,splitWords:p,setOptions:g,getParamString:m,template:_,isArray:S,indexOf:T,emptyImageUrl:C,requestFn:E,cancelFn:D,requestAnimFrame:I,cancelAnimFrame:z};function V(){}V.extend=function(v){var x=function(){g(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},w=x.__super__=this.prototype,P=a(w);P.constructor=x,x.prototype=P;for(var N in this)Object.prototype.hasOwnProperty.call(this,N)&&N!=="prototype"&&N!=="__super__"&&(x[N]=this[N]);return v.statics&&i(x,v.statics),v.includes&&(G(v.includes),i.apply(null,[P].concat(v.includes))),i(P,v),delete P.statics,delete P.includes,P.options&&(P.options=w.options?a(w.options):{},i(P.options,v.options)),P._initHooks=[],P.callInitHooks=function(){if(!this._initHooksCalled){w.callInitHooks&&w.callInitHooks.call(this),this._initHooksCalled=!0;for(var B=0,Z=P._initHooks.length;B<Z;B++)P._initHooks[B].call(this)}},x},V.include=function(v){var x=this.prototype.options;return i(this.prototype,v),v.options&&(this.prototype.options=x,this.mergeOptions(v.options)),this},V.mergeOptions=function(v){return i(this.prototype.options,v),this},V.addInitHook=function(v){var x=Array.prototype.slice.call(arguments,1),w=typeof v=="function"?v:function(){this[v].apply(this,x)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(w),this};function G(v){if(!(typeof L>"u"||!L||!L.Mixin)){v=S(v)?v:[v];for(var x=0;x<v.length;x++)v[x]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var F={on:function(v,x,w){if(typeof v=="object")for(var P in v)this._on(P,v[P],x);else{v=p(v);for(var N=0,B=v.length;N<B;N++)this._on(v[N],x,w)}return this},off:function(v,x,w){if(!arguments.length)delete this._events;else if(typeof v=="object")for(var P in v)this._off(P,v[P],x);else{v=p(v);for(var N=arguments.length===1,B=0,Z=v.length;B<Z;B++)N?this._off(v[B]):this._off(v[B],x,w)}return this},_on:function(v,x,w,P){if(typeof x!="function"){console.warn("wrong listener type: "+typeof x);return}if(this._listens(v,x,w)===!1){w===this&&(w=void 0);var N={fn:x,ctx:w};P&&(N.once=!0),this._events=this._events||{},this._events[v]=this._events[v]||[],this._events[v].push(N)}},_off:function(v,x,w){var P,N,B;if(this._events&&(P=this._events[v],!!P)){if(arguments.length===1){if(this._firingCount)for(N=0,B=P.length;N<B;N++)P[N].fn=h;delete this._events[v];return}if(typeof x!="function"){console.warn("wrong listener type: "+typeof x);return}var Z=this._listens(v,x,w);if(Z!==!1){var Q=P[Z];this._firingCount&&(Q.fn=h,this._events[v]=P=P.slice()),P.splice(Z,1)}}},fire:function(v,x,w){if(!this.listens(v,w))return this;var P=i({},x,{type:v,target:this,sourceTarget:x&&x.sourceTarget||this});if(this._events){var N=this._events[v];if(N){this._firingCount=this._firingCount+1||1;for(var B=0,Z=N.length;B<Z;B++){var Q=N[B],te=Q.fn;Q.once&&this.off(v,te,Q.ctx),te.call(Q.ctx||this,P)}this._firingCount--}}return w&&this._propagateEvent(P),this},listens:function(v,x,w,P){typeof v!="string"&&console.warn('"string" type argument expected');var N=x;typeof x!="function"&&(P=!!x,N=void 0,w=void 0);var B=this._events&&this._events[v];if(B&&B.length&&this._listens(v,N,w)!==!1)return!0;if(P){for(var Z in this._eventParents)if(this._eventParents[Z].listens(v,x,w,P))return!0}return!1},_listens:function(v,x,w){if(!this._events)return!1;var P=this._events[v]||[];if(!x)return!!P.length;w===this&&(w=void 0);for(var N=0,B=P.length;N<B;N++)if(P[N].fn===x&&P[N].ctx===w)return N;return!1},once:function(v,x,w){if(typeof v=="object")for(var P in v)this._on(P,v[P],x,!0);else{v=p(v);for(var N=0,B=v.length;N<B;N++)this._on(v[N],x,w,!0)}return this},addEventParent:function(v){return this._eventParents=this._eventParents||{},this._eventParents[l(v)]=v,this},removeEventParent:function(v){return this._eventParents&&delete this._eventParents[l(v)],this},_propagateEvent:function(v){for(var x in this._eventParents)this._eventParents[x].fire(v.type,i({layer:v.target,propagatedFrom:v.target},v),!0)}};F.addEventListener=F.on,F.removeEventListener=F.clearAllEventListeners=F.off,F.addOneTimeEventListener=F.once,F.fireEvent=F.fire,F.hasEventListeners=F.listens;var U=V.extend(F);function j(v,x,w){this.x=w?Math.round(v):v,this.y=w?Math.round(x):x}var W=Math.trunc||function(v){return v>0?Math.floor(v):Math.ceil(v)};j.prototype={clone:function(){return new j(this.x,this.y)},add:function(v){return this.clone()._add(H(v))},_add:function(v){return this.x+=v.x,this.y+=v.y,this},subtract:function(v){return this.clone()._subtract(H(v))},_subtract:function(v){return this.x-=v.x,this.y-=v.y,this},divideBy:function(v){return this.clone()._divideBy(v)},_divideBy:function(v){return this.x/=v,this.y/=v,this},multiplyBy:function(v){return this.clone()._multiplyBy(v)},_multiplyBy:function(v){return this.x*=v,this.y*=v,this},scaleBy:function(v){return new j(this.x*v.x,this.y*v.y)},unscaleBy:function(v){return new j(this.x/v.x,this.y/v.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=W(this.x),this.y=W(this.y),this},distanceTo:function(v){v=H(v);var x=v.x-this.x,w=v.y-this.y;return Math.sqrt(x*x+w*w)},equals:function(v){return v=H(v),v.x===this.x&&v.y===this.y},contains:function(v){return v=H(v),Math.abs(v.x)<=Math.abs(this.x)&&Math.abs(v.y)<=Math.abs(this.y)},toString:function(){return"Point("+f(this.x)+", "+f(this.y)+")"}};function H(v,x,w){return v instanceof j?v:S(v)?new j(v[0],v[1]):v==null?v:typeof v=="object"&&"x"in v&&"y"in v?new j(v.x,v.y):new j(v,x,w)}function X(v,x){if(v)for(var w=x?[v,x]:v,P=0,N=w.length;P<N;P++)this.extend(w[P])}X.prototype={extend:function(v){var x,w;if(!v)return this;if(v instanceof j||typeof v[0]=="number"||"x"in v)x=w=H(v);else if(v=K(v),x=v.min,w=v.max,!x||!w)return this;return!this.min&&!this.max?(this.min=x.clone(),this.max=w.clone()):(this.min.x=Math.min(x.x,this.min.x),this.max.x=Math.max(w.x,this.max.x),this.min.y=Math.min(x.y,this.min.y),this.max.y=Math.max(w.y,this.max.y)),this},getCenter:function(v){return H((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,v)},getBottomLeft:function(){return H(this.min.x,this.max.y)},getTopRight:function(){return H(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(v){var x,w;return typeof v[0]=="number"||v instanceof j?v=H(v):v=K(v),v instanceof X?(x=v.min,w=v.max):x=w=v,x.x>=this.min.x&&w.x<=this.max.x&&x.y>=this.min.y&&w.y<=this.max.y},intersects:function(v){v=K(v);var x=this.min,w=this.max,P=v.min,N=v.max,B=N.x>=x.x&&P.x<=w.x,Z=N.y>=x.y&&P.y<=w.y;return B&&Z},overlaps:function(v){v=K(v);var x=this.min,w=this.max,P=v.min,N=v.max,B=N.x>x.x&&P.x<w.x,Z=N.y>x.y&&P.y<w.y;return B&&Z},isValid:function(){return!!(this.min&&this.max)},pad:function(v){var x=this.min,w=this.max,P=Math.abs(x.x-w.x)*v,N=Math.abs(x.y-w.y)*v;return K(H(x.x-P,x.y-N),H(w.x+P,w.y+N))},equals:function(v){return v?(v=K(v),this.min.equals(v.getTopLeft())&&this.max.equals(v.getBottomRight())):!1}};function K(v,x){return!v||v instanceof X?v:new X(v,x)}function ne(v,x){if(v)for(var w=x?[v,x]:v,P=0,N=w.length;P<N;P++)this.extend(w[P])}ne.prototype={extend:function(v){var x=this._southWest,w=this._northEast,P,N;if(v instanceof ue)P=v,N=v;else if(v instanceof ne){if(P=v._southWest,N=v._northEast,!P||!N)return this}else return v?this.extend(ve(v)||ie(v)):this;return!x&&!w?(this._southWest=new ue(P.lat,P.lng),this._northEast=new ue(N.lat,N.lng)):(x.lat=Math.min(P.lat,x.lat),x.lng=Math.min(P.lng,x.lng),w.lat=Math.max(N.lat,w.lat),w.lng=Math.max(N.lng,w.lng)),this},pad:function(v){var x=this._southWest,w=this._northEast,P=Math.abs(x.lat-w.lat)*v,N=Math.abs(x.lng-w.lng)*v;return new ne(new ue(x.lat-P,x.lng-N),new ue(w.lat+P,w.lng+N))},getCenter:function(){return new ue((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new ue(this.getNorth(),this.getWest())},getSouthEast:function(){return new ue(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(v){typeof v[0]=="number"||v instanceof ue||"lat"in v?v=ve(v):v=ie(v);var x=this._southWest,w=this._northEast,P,N;return v instanceof ne?(P=v.getSouthWest(),N=v.getNorthEast()):P=N=v,P.lat>=x.lat&&N.lat<=w.lat&&P.lng>=x.lng&&N.lng<=w.lng},intersects:function(v){v=ie(v);var x=this._southWest,w=this._northEast,P=v.getSouthWest(),N=v.getNorthEast(),B=N.lat>=x.lat&&P.lat<=w.lat,Z=N.lng>=x.lng&&P.lng<=w.lng;return B&&Z},overlaps:function(v){v=ie(v);var x=this._southWest,w=this._northEast,P=v.getSouthWest(),N=v.getNorthEast(),B=N.lat>x.lat&&P.lat<w.lat,Z=N.lng>x.lng&&P.lng<w.lng;return B&&Z},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(v,x){return v?(v=ie(v),this._southWest.equals(v.getSouthWest(),x)&&this._northEast.equals(v.getNorthEast(),x)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function ie(v,x){return v instanceof ne?v:new ne(v,x)}function ue(v,x,w){if(isNaN(v)||isNaN(x))throw new Error("Invalid LatLng object: ("+v+", "+x+")");this.lat=+v,this.lng=+x,w!==void 0&&(this.alt=+w)}ue.prototype={equals:function(v,x){if(!v)return!1;v=ve(v);var w=Math.max(Math.abs(this.lat-v.lat),Math.abs(this.lng-v.lng));return w<=(x===void 0?1e-9:x)},toString:function(v){return"LatLng("+f(this.lat,v)+", "+f(this.lng,v)+")"},distanceTo:function(v){return xe.distance(this,ve(v))},wrap:function(){return xe.wrapLatLng(this)},toBounds:function(v){var x=180*v/40075017,w=x/Math.cos(Math.PI/180*this.lat);return ie([this.lat-x,this.lng-w],[this.lat+x,this.lng+w])},clone:function(){return new ue(this.lat,this.lng,this.alt)}};function ve(v,x,w){return v instanceof ue?v:S(v)&&typeof v[0]!="object"?v.length===3?new ue(v[0],v[1],v[2]):v.length===2?new ue(v[0],v[1]):null:v==null?v:typeof v=="object"&&"lat"in v?new ue(v.lat,"lng"in v?v.lng:v.lon,v.alt):x===void 0?null:new ue(v,x,w)}var Ge={latLngToPoint:function(v,x){var w=this.projection.project(v),P=this.scale(x);return this.transformation._transform(w,P)},pointToLatLng:function(v,x){var w=this.scale(x),P=this.transformation.untransform(v,w);return this.projection.unproject(P)},project:function(v){return this.projection.project(v)},unproject:function(v){return this.projection.unproject(v)},scale:function(v){return 256*Math.pow(2,v)},zoom:function(v){return Math.log(v/256)/Math.LN2},getProjectedBounds:function(v){if(this.infinite)return null;var x=this.projection.bounds,w=this.scale(v),P=this.transformation.transform(x.min,w),N=this.transformation.transform(x.max,w);return new X(P,N)},infinite:!1,wrapLatLng:function(v){var x=this.wrapLng?c(v.lng,this.wrapLng,!0):v.lng,w=this.wrapLat?c(v.lat,this.wrapLat,!0):v.lat,P=v.alt;return new ue(w,x,P)},wrapLatLngBounds:function(v){var x=v.getCenter(),w=this.wrapLatLng(x),P=x.lat-w.lat,N=x.lng-w.lng;if(P===0&&N===0)return v;var B=v.getSouthWest(),Z=v.getNorthEast(),Q=new ue(B.lat-P,B.lng-N),te=new ue(Z.lat-P,Z.lng-N);return new ne(Q,te)}},xe=i({},Ge,{wrapLng:[-180,180],R:6371e3,distance:function(v,x){var w=Math.PI/180,P=v.lat*w,N=x.lat*w,B=Math.sin((x.lat-v.lat)*w/2),Z=Math.sin((x.lng-v.lng)*w/2),Q=B*B+Math.cos(P)*Math.cos(N)*Z*Z,te=2*Math.atan2(Math.sqrt(Q),Math.sqrt(1-Q));return this.R*te}}),ge=6378137,ke={R:ge,MAX_LATITUDE:85.0511287798,project:function(v){var x=Math.PI/180,w=this.MAX_LATITUDE,P=Math.max(Math.min(w,v.lat),-w),N=Math.sin(P*x);return new j(this.R*v.lng*x,this.R*Math.log((1+N)/(1-N))/2)},unproject:function(v){var x=180/Math.PI;return new ue((2*Math.atan(Math.exp(v.y/this.R))-Math.PI/2)*x,v.x*x/this.R)},bounds:function(){var v=ge*Math.PI;return new X([-v,-v],[v,v])}()};function fe(v,x,w,P){if(S(v)){this._a=v[0],this._b=v[1],this._c=v[2],this._d=v[3];return}this._a=v,this._b=x,this._c=w,this._d=P}fe.prototype={transform:function(v,x){return this._transform(v.clone(),x)},_transform:function(v,x){return x=x||1,v.x=x*(this._a*v.x+this._b),v.y=x*(this._c*v.y+this._d),v},untransform:function(v,x){return x=x||1,new j((v.x/x-this._b)/this._a,(v.y/x-this._d)/this._c)}};function Me(v,x,w,P){return new fe(v,x,w,P)}var st=i({},xe,{code:"EPSG:3857",projection:ke,transformation:function(){var v=.5/(Math.PI*ke.R);return Me(v,.5,-v,.5)}()}),Ye=i({},st,{code:"EPSG:900913"});function rt(v){return document.createElementNS("http://www.w3.org/2000/svg",v)}function ut(v,x){var w="",P,N,B,Z,Q,te;for(P=0,B=v.length;P<B;P++){for(Q=v[P],N=0,Z=Q.length;N<Z;N++)te=Q[N],w+=(N?"L":"M")+te.x+" "+te.y;w+=x?Re.svg?"z":"x":""}return w||"M0 0"}var Dt=document.documentElement.style,gr="ActiveXObject"in window,Br=gr&&!document.addEventListener,Gi="msLaunchUri"in navigator&&!("documentMode"in document),Hi=Wi("webkit"),yu=Wi("android"),nL=Wi("android 2")||Wi("android 3"),D8=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),I8=yu&&Wi("Google")&&D8<537&&!("AudioNode"in window),C_=!!window.opera,iL=!Gi&&Wi("chrome"),aL=Wi("gecko")&&!Hi&&!C_&&!gr,E8=!iL&&Wi("safari"),oL=Wi("phantom"),sL="OTransition"in Dt,N8=navigator.platform.indexOf("Win")===0,lL=gr&&"transition"in Dt,M_="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!nL,uL="MozPerspective"in Dt,R8=!window.L_DISABLE_3D&&(lL||M_||uL)&&!sL&&!oL,Rh=typeof orientation<"u"||Wi("mobile"),O8=Rh&&Hi,z8=Rh&&M_,cL=!window.PointerEvent&&window.MSPointerEvent,hL=!!(window.PointerEvent||cL),fL="ontouchstart"in window||!!window.TouchEvent,B8=!window.L_NO_TOUCH&&(fL||hL),j8=Rh&&C_,V8=Rh&&aL,F8=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,G8=function(){var v=!1;try{var x=Object.defineProperty({},"passive",{get:function(){v=!0}});window.addEventListener("testPassiveEventSupport",h,x),window.removeEventListener("testPassiveEventSupport",h,x)}catch{}return v}(),H8=function(){return!!document.createElement("canvas").getContext}(),A_=!!(document.createElementNS&&rt("svg").createSVGRect),W8=!!A_&&function(){var v=document.createElement("div");return v.innerHTML="<svg/>",(v.firstChild&&v.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),U8=!A_&&function(){try{var v=document.createElement("div");v.innerHTML='<v:shape adj="1"/>';var x=v.firstChild;return x.style.behavior="url(#default#VML)",x&&typeof x.adj=="object"}catch{return!1}}(),Z8=navigator.platform.indexOf("Mac")===0,$8=navigator.platform.indexOf("Linux")===0;function Wi(v){return navigator.userAgent.toLowerCase().indexOf(v)>=0}var Re={ie:gr,ielt9:Br,edge:Gi,webkit:Hi,android:yu,android23:nL,androidStock:I8,opera:C_,chrome:iL,gecko:aL,safari:E8,phantom:oL,opera12:sL,win:N8,ie3d:lL,webkit3d:M_,gecko3d:uL,any3d:R8,mobile:Rh,mobileWebkit:O8,mobileWebkit3d:z8,msPointer:cL,pointer:hL,touch:B8,touchNative:fL,mobileOpera:j8,mobileGecko:V8,retina:F8,passiveEvents:G8,canvas:H8,svg:A_,vml:U8,inlineSvg:W8,mac:Z8,linux:$8},dL=Re.msPointer?"MSPointerDown":"pointerdown",vL=Re.msPointer?"MSPointerMove":"pointermove",pL=Re.msPointer?"MSPointerUp":"pointerup",gL=Re.msPointer?"MSPointerCancel":"pointercancel",L_={touchstart:dL,touchmove:vL,touchend:pL,touchcancel:gL},mL={touchstart:J8,touchmove:rp,touchend:rp,touchcancel:rp},_u={},yL=!1;function Y8(v,x,w){return x==="touchstart"&&Q8(),mL[x]?(w=mL[x].bind(this,w),v.addEventListener(L_[x],w,!1),w):(console.warn("wrong event specified:",x),h)}function X8(v,x,w){if(!L_[x]){console.warn("wrong event specified:",x);return}v.removeEventListener(L_[x],w,!1)}function q8(v){_u[v.pointerId]=v}function K8(v){_u[v.pointerId]&&(_u[v.pointerId]=v)}function _L(v){delete _u[v.pointerId]}function Q8(){yL||(document.addEventListener(dL,q8,!0),document.addEventListener(vL,K8,!0),document.addEventListener(pL,_L,!0),document.addEventListener(gL,_L,!0),yL=!0)}function rp(v,x){if(x.pointerType!==(x.MSPOINTER_TYPE_MOUSE||"mouse")){x.touches=[];for(var w in _u)x.touches.push(_u[w]);x.changedTouches=[x],v(x)}}function J8(v,x){x.MSPOINTER_TYPE_TOUCH&&x.pointerType===x.MSPOINTER_TYPE_TOUCH&&Mr(x),rp(v,x)}function eW(v){var x={},w,P;for(P in v)w=v[P],x[P]=w&&w.bind?w.bind(v):w;return v=x,x.type="dblclick",x.detail=2,x.isTrusted=!1,x._simulated=!0,x}var tW=200;function rW(v,x){v.addEventListener("dblclick",x);var w=0,P;function N(B){if(B.detail!==1){P=B.detail;return}if(!(B.pointerType==="mouse"||B.sourceCapabilities&&!B.sourceCapabilities.firesTouchEvents)){var Z=TL(B);if(!(Z.some(function(te){return te instanceof HTMLLabelElement&&te.attributes.for})&&!Z.some(function(te){return te instanceof HTMLInputElement||te instanceof HTMLSelectElement}))){var Q=Date.now();Q-w<=tW?(P++,P===2&&x(eW(B))):P=1,w=Q}}}return v.addEventListener("click",N),{dblclick:x,simDblclick:N}}function nW(v,x){v.removeEventListener("dblclick",x.dblclick),v.removeEventListener("click",x.simDblclick)}var P_=ap(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Oh=ap(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),xL=Oh==="webkitTransition"||Oh==="OTransition"?Oh+"End":"transitionend";function SL(v){return typeof v=="string"?document.getElementById(v):v}function zh(v,x){var w=v.style[x]||v.currentStyle&&v.currentStyle[x];if((!w||w==="auto")&&document.defaultView){var P=document.defaultView.getComputedStyle(v,null);w=P?P[x]:null}return w==="auto"?null:w}function vt(v,x,w){var P=document.createElement(v);return P.className=x||"",w&&w.appendChild(P),P}function It(v){var x=v.parentNode;x&&x.removeChild(v)}function np(v){for(;v.firstChild;)v.removeChild(v.firstChild)}function xu(v){var x=v.parentNode;x&&x.lastChild!==v&&x.appendChild(v)}function Su(v){var x=v.parentNode;x&&x.firstChild!==v&&x.insertBefore(v,x.firstChild)}function k_(v,x){if(v.classList!==void 0)return v.classList.contains(x);var w=ip(v);return w.length>0&&new RegExp("(^|\\s)"+x+"(\\s|$)").test(w)}function et(v,x){if(v.classList!==void 0)for(var w=p(x),P=0,N=w.length;P<N;P++)v.classList.add(w[P]);else if(!k_(v,x)){var B=ip(v);D_(v,(B?B+" ":"")+x)}}function Zt(v,x){v.classList!==void 0?v.classList.remove(x):D_(v,d((" "+ip(v)+" ").replace(" "+x+" "," ")))}function D_(v,x){v.className.baseVal===void 0?v.className=x:v.className.baseVal=x}function ip(v){return v.correspondingElement&&(v=v.correspondingElement),v.className.baseVal===void 0?v.className:v.className.baseVal}function Fn(v,x){"opacity"in v.style?v.style.opacity=x:"filter"in v.style&&iW(v,x)}function iW(v,x){var w=!1,P="DXImageTransform.Microsoft.Alpha";try{w=v.filters.item(P)}catch{if(x===1)return}x=Math.round(x*100),w?(w.Enabled=x!==100,w.Opacity=x):v.style.filter+=" progid:"+P+"(opacity="+x+")"}function ap(v){for(var x=document.documentElement.style,w=0;w<v.length;w++)if(v[w]in x)return v[w];return!1}function Es(v,x,w){var P=x||new j(0,0);v.style[P_]=(Re.ie3d?"translate("+P.x+"px,"+P.y+"px)":"translate3d("+P.x+"px,"+P.y+"px,0)")+(w?" scale("+w+")":"")}function Qt(v,x){v._leaflet_pos=x,Re.any3d?Es(v,x):(v.style.left=x.x+"px",v.style.top=x.y+"px")}function Ns(v){return v._leaflet_pos||new j(0,0)}var Bh,jh,I_;if("onselectstart"in document)Bh=function(){Ke(window,"selectstart",Mr)},jh=function(){Tt(window,"selectstart",Mr)};else{var Vh=ap(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Bh=function(){if(Vh){var v=document.documentElement.style;I_=v[Vh],v[Vh]="none"}},jh=function(){Vh&&(document.documentElement.style[Vh]=I_,I_=void 0)}}function E_(){Ke(window,"dragstart",Mr)}function N_(){Tt(window,"dragstart",Mr)}var op,R_;function O_(v){for(;v.tabIndex===-1;)v=v.parentNode;v.style&&(sp(),op=v,R_=v.style.outlineStyle,v.style.outlineStyle="none",Ke(window,"keydown",sp))}function sp(){op&&(op.style.outlineStyle=R_,op=void 0,R_=void 0,Tt(window,"keydown",sp))}function bL(v){do v=v.parentNode;while((!v.offsetWidth||!v.offsetHeight)&&v!==document.body);return v}function z_(v){var x=v.getBoundingClientRect();return{x:x.width/v.offsetWidth||1,y:x.height/v.offsetHeight||1,boundingClientRect:x}}var aW={__proto__:null,TRANSFORM:P_,TRANSITION:Oh,TRANSITION_END:xL,get:SL,getStyle:zh,create:vt,remove:It,empty:np,toFront:xu,toBack:Su,hasClass:k_,addClass:et,removeClass:Zt,setClass:D_,getClass:ip,setOpacity:Fn,testProp:ap,setTransform:Es,setPosition:Qt,getPosition:Ns,get disableTextSelection(){return Bh},get enableTextSelection(){return jh},disableImageDrag:E_,enableImageDrag:N_,preventOutline:O_,restoreOutline:sp,getSizedParentNode:bL,getScale:z_};function Ke(v,x,w,P){if(x&&typeof x=="object")for(var N in x)j_(v,N,x[N],w);else{x=p(x);for(var B=0,Z=x.length;B<Z;B++)j_(v,x[B],w,P)}return this}var Ui="_leaflet_events";function Tt(v,x,w,P){if(arguments.length===1)wL(v),delete v[Ui];else if(x&&typeof x=="object")for(var N in x)V_(v,N,x[N],w);else if(x=p(x),arguments.length===2)wL(v,function(Q){return T(x,Q)!==-1});else for(var B=0,Z=x.length;B<Z;B++)V_(v,x[B],w,P);return this}function wL(v,x){for(var w in v[Ui]){var P=w.split(/\d/)[0];(!x||x(P))&&V_(v,P,null,null,w)}}var B_={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function j_(v,x,w,P){var N=x+l(w)+(P?"_"+l(P):"");if(v[Ui]&&v[Ui][N])return this;var B=function(Q){return w.call(P||v,Q||window.event)},Z=B;!Re.touchNative&&Re.pointer&&x.indexOf("touch")===0?B=Y8(v,x,B):Re.touch&&x==="dblclick"?B=rW(v,B):"addEventListener"in v?x==="touchstart"||x==="touchmove"||x==="wheel"||x==="mousewheel"?v.addEventListener(B_[x]||x,B,Re.passiveEvents?{passive:!1}:!1):x==="mouseenter"||x==="mouseleave"?(B=function(Q){Q=Q||window.event,G_(v,Q)&&Z(Q)},v.addEventListener(B_[x],B,!1)):v.addEventListener(x,Z,!1):v.attachEvent("on"+x,B),v[Ui]=v[Ui]||{},v[Ui][N]=B}function V_(v,x,w,P,N){N=N||x+l(w)+(P?"_"+l(P):"");var B=v[Ui]&&v[Ui][N];if(!B)return this;!Re.touchNative&&Re.pointer&&x.indexOf("touch")===0?X8(v,x,B):Re.touch&&x==="dblclick"?nW(v,B):"removeEventListener"in v?v.removeEventListener(B_[x]||x,B,!1):v.detachEvent("on"+x,B),v[Ui][N]=null}function Rs(v){return v.stopPropagation?v.stopPropagation():v.originalEvent?v.originalEvent._stopped=!0:v.cancelBubble=!0,this}function F_(v){return j_(v,"wheel",Rs),this}function Fh(v){return Ke(v,"mousedown touchstart dblclick contextmenu",Rs),v._leaflet_disable_click=!0,this}function Mr(v){return v.preventDefault?v.preventDefault():v.returnValue=!1,this}function Os(v){return Mr(v),Rs(v),this}function TL(v){if(v.composedPath)return v.composedPath();for(var x=[],w=v.target;w;)x.push(w),w=w.parentNode;return x}function CL(v,x){if(!x)return new j(v.clientX,v.clientY);var w=z_(x),P=w.boundingClientRect;return new j((v.clientX-P.left)/w.x-x.clientLeft,(v.clientY-P.top)/w.y-x.clientTop)}var oW=Re.linux&&Re.chrome?window.devicePixelRatio:Re.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ML(v){return Re.edge?v.wheelDeltaY/2:v.deltaY&&v.deltaMode===0?-v.deltaY/oW:v.deltaY&&v.deltaMode===1?-v.deltaY*20:v.deltaY&&v.deltaMode===2?-v.deltaY*60:v.deltaX||v.deltaZ?0:v.wheelDelta?(v.wheelDeltaY||v.wheelDelta)/2:v.detail&&Math.abs(v.detail)<32765?-v.detail*20:v.detail?v.detail/-32765*60:0}function G_(v,x){var w=x.relatedTarget;if(!w)return!0;try{for(;w&&w!==v;)w=w.parentNode}catch{return!1}return w!==v}var sW={__proto__:null,on:Ke,off:Tt,stopPropagation:Rs,disableScrollPropagation:F_,disableClickPropagation:Fh,preventDefault:Mr,stop:Os,getPropagationPath:TL,getMousePosition:CL,getWheelDelta:ML,isExternalTarget:G_,addListener:Ke,removeListener:Tt},AL=U.extend({run:function(v,x,w,P){this.stop(),this._el=v,this._inProgress=!0,this._duration=w||.25,this._easeOutPower=1/Math.max(P||.5,.2),this._startPos=Ns(v),this._offset=x.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=I(this._animate,this),this._step()},_step:function(v){var x=+new Date-this._startTime,w=this._duration*1e3;x<w?this._runFrame(this._easeOut(x/w),v):(this._runFrame(1),this._complete())},_runFrame:function(v,x){var w=this._startPos.add(this._offset.multiplyBy(v));x&&w._round(),Qt(this._el,w),this.fire("step")},_complete:function(){z(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(v){return 1-Math.pow(1-v,this._easeOutPower)}}),ct=U.extend({options:{crs:st,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(v,x){x=g(this,x),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(v),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),x.maxBounds&&this.setMaxBounds(x.maxBounds),x.zoom!==void 0&&(this._zoom=this._limitZoom(x.zoom)),x.center&&x.zoom!==void 0&&this.setView(ve(x.center),x.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Oh&&Re.any3d&&!Re.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ke(this._proxy,xL,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(v,x,w){if(x=x===void 0?this._zoom:this._limitZoom(x),v=this._limitCenter(ve(v),x,this.options.maxBounds),w=w||{},this._stop(),this._loaded&&!w.reset&&w!==!0){w.animate!==void 0&&(w.zoom=i({animate:w.animate},w.zoom),w.pan=i({animate:w.animate,duration:w.duration},w.pan));var P=this._zoom!==x?this._tryAnimatedZoom&&this._tryAnimatedZoom(v,x,w.zoom):this._tryAnimatedPan(v,w.pan);if(P)return clearTimeout(this._sizeTimer),this}return this._resetView(v,x,w.pan&&w.pan.noMoveStart),this},setZoom:function(v,x){return this._loaded?this.setView(this.getCenter(),v,{zoom:x}):(this._zoom=v,this)},zoomIn:function(v,x){return v=v||(Re.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+v,x)},zoomOut:function(v,x){return v=v||(Re.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-v,x)},setZoomAround:function(v,x,w){var P=this.getZoomScale(x),N=this.getSize().divideBy(2),B=v instanceof j?v:this.latLngToContainerPoint(v),Z=B.subtract(N).multiplyBy(1-1/P),Q=this.containerPointToLatLng(N.add(Z));return this.setView(Q,x,{zoom:w})},_getBoundsCenterZoom:function(v,x){x=x||{},v=v.getBounds?v.getBounds():ie(v);var w=H(x.paddingTopLeft||x.padding||[0,0]),P=H(x.paddingBottomRight||x.padding||[0,0]),N=this.getBoundsZoom(v,!1,w.add(P));if(N=typeof x.maxZoom=="number"?Math.min(x.maxZoom,N):N,N===1/0)return{center:v.getCenter(),zoom:N};var B=P.subtract(w).divideBy(2),Z=this.project(v.getSouthWest(),N),Q=this.project(v.getNorthEast(),N),te=this.unproject(Z.add(Q).divideBy(2).add(B),N);return{center:te,zoom:N}},fitBounds:function(v,x){if(v=ie(v),!v.isValid())throw new Error("Bounds are not valid.");var w=this._getBoundsCenterZoom(v,x);return this.setView(w.center,w.zoom,x)},fitWorld:function(v){return this.fitBounds([[-90,-180],[90,180]],v)},panTo:function(v,x){return this.setView(v,this._zoom,{pan:x})},panBy:function(v,x){if(v=H(v).round(),x=x||{},!v.x&&!v.y)return this.fire("moveend");if(x.animate!==!0&&!this.getSize().contains(v))return this._resetView(this.unproject(this.project(this.getCenter()).add(v)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new AL,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),x.noMoveStart||this.fire("movestart"),x.animate!==!1){et(this._mapPane,"leaflet-pan-anim");var w=this._getMapPanePos().subtract(v).round();this._panAnim.run(this._mapPane,w,x.duration||.25,x.easeLinearity)}else this._rawPanBy(v),this.fire("move").fire("moveend");return this},flyTo:function(v,x,w){if(w=w||{},w.animate===!1||!Re.any3d)return this.setView(v,x,w);this._stop();var P=this.project(this.getCenter()),N=this.project(v),B=this.getSize(),Z=this._zoom;v=ve(v),x=x===void 0?Z:x;var Q=Math.max(B.x,B.y),te=Q*this.getZoomScale(Z,x),ae=N.distanceTo(P)||1,Ae=1.42,He=Ae*Ae;function nt(Jt){var _p=Jt?-1:1,XW=Jt?te:Q,qW=te*te-Q*Q+_p*He*He*ae*ae,KW=2*XW*He*ae,J_=qW/KW,sP=Math.sqrt(J_*J_+1)-J_,QW=sP<1e-9?-18:Math.log(sP);return QW}function Qr(Jt){return(Math.exp(Jt)-Math.exp(-Jt))/2}function mr(Jt){return(Math.exp(Jt)+Math.exp(-Jt))/2}function Hn(Jt){return Qr(Jt)/mr(Jt)}var hn=nt(0);function Au(Jt){return Q*(mr(hn)/mr(hn+Ae*Jt))}function UW(Jt){return Q*(mr(hn)*Hn(hn+Ae*Jt)-Qr(hn))/He}function ZW(Jt){return 1-Math.pow(1-Jt,1.5)}var $W=Date.now(),aP=(nt(1)-hn)/Ae,YW=w.duration?1e3*w.duration:1e3*aP*.8;function oP(){var Jt=(Date.now()-$W)/YW,_p=ZW(Jt)*aP;Jt<=1?(this._flyToFrame=I(oP,this),this._move(this.unproject(P.add(N.subtract(P).multiplyBy(UW(_p)/ae)),Z),this.getScaleZoom(Q/Au(_p),Z),{flyTo:!0})):this._move(v,x)._moveEnd(!0)}return this._moveStart(!0,w.noMoveStart),oP.call(this),this},flyToBounds:function(v,x){var w=this._getBoundsCenterZoom(v,x);return this.flyTo(w.center,w.zoom,x)},setMaxBounds:function(v){return v=ie(v),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),v.isValid()?(this.options.maxBounds=v,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(v){var x=this.options.minZoom;return this.options.minZoom=v,this._loaded&&x!==v&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(v):this},setMaxZoom:function(v){var x=this.options.maxZoom;return this.options.maxZoom=v,this._loaded&&x!==v&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(v):this},panInsideBounds:function(v,x){this._enforcingBounds=!0;var w=this.getCenter(),P=this._limitCenter(w,this._zoom,ie(v));return w.equals(P)||this.panTo(P,x),this._enforcingBounds=!1,this},panInside:function(v,x){x=x||{};var w=H(x.paddingTopLeft||x.padding||[0,0]),P=H(x.paddingBottomRight||x.padding||[0,0]),N=this.project(this.getCenter()),B=this.project(v),Z=this.getPixelBounds(),Q=K([Z.min.add(w),Z.max.subtract(P)]),te=Q.getSize();if(!Q.contains(B)){this._enforcingBounds=!0;var ae=B.subtract(Q.getCenter()),Ae=Q.extend(B).getSize().subtract(te);N.x+=ae.x<0?-Ae.x:Ae.x,N.y+=ae.y<0?-Ae.y:Ae.y,this.panTo(this.unproject(N),x),this._enforcingBounds=!1}return this},invalidateSize:function(v){if(!this._loaded)return this;v=i({animate:!1,pan:!0},v===!0?{animate:!0}:v);var x=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var w=this.getSize(),P=x.divideBy(2).round(),N=w.divideBy(2).round(),B=P.subtract(N);return!B.x&&!B.y?this:(v.animate&&v.pan?this.panBy(B):(v.pan&&this._rawPanBy(B),this.fire("move"),v.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:x,newSize:w}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(v){if(v=this._locateOptions=i({timeout:1e4,watch:!1},v),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var x=o(this._handleGeolocationResponse,this),w=o(this._handleGeolocationError,this);return v.watch?this._locationWatchId=navigator.geolocation.watchPosition(x,w,v):navigator.geolocation.getCurrentPosition(x,w,v),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(v){if(this._container._leaflet_id){var x=v.code,w=v.message||(x===1?"permission denied":x===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:x,message:"Geolocation error: "+w+"."})}},_handleGeolocationResponse:function(v){if(this._container._leaflet_id){var x=v.coords.latitude,w=v.coords.longitude,P=new ue(x,w),N=P.toBounds(v.coords.accuracy*2),B=this._locateOptions;if(B.setView){var Z=this.getBoundsZoom(N);this.setView(P,B.maxZoom?Math.min(Z,B.maxZoom):Z)}var Q={latlng:P,bounds:N,timestamp:v.timestamp};for(var te in v.coords)typeof v.coords[te]=="number"&&(Q[te]=v.coords[te]);this.fire("locationfound",Q)}},addHandler:function(v,x){if(!x)return this;var w=this[v]=new x(this);return this._handlers.push(w),this.options[v]&&w.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),It(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var v;for(v in this._layers)this._layers[v].remove();for(v in this._panes)It(this._panes[v]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(v,x){var w="leaflet-pane"+(v?" leaflet-"+v.replace("Pane","")+"-pane":""),P=vt("div",w,x||this._mapPane);return v&&(this._panes[v]=P),P},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var v=this.getPixelBounds(),x=this.unproject(v.getBottomLeft()),w=this.unproject(v.getTopRight());return new ne(x,w)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(v,x,w){v=ie(v),w=H(w||[0,0]);var P=this.getZoom()||0,N=this.getMinZoom(),B=this.getMaxZoom(),Z=v.getNorthWest(),Q=v.getSouthEast(),te=this.getSize().subtract(w),ae=K(this.project(Q,P),this.project(Z,P)).getSize(),Ae=Re.any3d?this.options.zoomSnap:1,He=te.x/ae.x,nt=te.y/ae.y,Qr=x?Math.max(He,nt):Math.min(He,nt);return P=this.getScaleZoom(Qr,P),Ae&&(P=Math.round(P/(Ae/100))*(Ae/100),P=x?Math.ceil(P/Ae)*Ae:Math.floor(P/Ae)*Ae),Math.max(N,Math.min(B,P))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new j(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(v,x){var w=this._getTopLeftPoint(v,x);return new X(w,w.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(v){return this.options.crs.getProjectedBounds(v===void 0?this.getZoom():v)},getPane:function(v){return typeof v=="string"?this._panes[v]:v},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(v,x){var w=this.options.crs;return x=x===void 0?this._zoom:x,w.scale(v)/w.scale(x)},getScaleZoom:function(v,x){var w=this.options.crs;x=x===void 0?this._zoom:x;var P=w.zoom(v*w.scale(x));return isNaN(P)?1/0:P},project:function(v,x){return x=x===void 0?this._zoom:x,this.options.crs.latLngToPoint(ve(v),x)},unproject:function(v,x){return x=x===void 0?this._zoom:x,this.options.crs.pointToLatLng(H(v),x)},layerPointToLatLng:function(v){var x=H(v).add(this.getPixelOrigin());return this.unproject(x)},latLngToLayerPoint:function(v){var x=this.project(ve(v))._round();return x._subtract(this.getPixelOrigin())},wrapLatLng:function(v){return this.options.crs.wrapLatLng(ve(v))},wrapLatLngBounds:function(v){return this.options.crs.wrapLatLngBounds(ie(v))},distance:function(v,x){return this.options.crs.distance(ve(v),ve(x))},containerPointToLayerPoint:function(v){return H(v).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(v){return H(v).add(this._getMapPanePos())},containerPointToLatLng:function(v){var x=this.containerPointToLayerPoint(H(v));return this.layerPointToLatLng(x)},latLngToContainerPoint:function(v){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ve(v)))},mouseEventToContainerPoint:function(v){return CL(v,this._container)},mouseEventToLayerPoint:function(v){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(v))},mouseEventToLatLng:function(v){return this.layerPointToLatLng(this.mouseEventToLayerPoint(v))},_initContainer:function(v){var x=this._container=SL(v);if(x){if(x._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ke(x,"scroll",this._onScroll,this),this._containerId=l(x)},_initLayout:function(){var v=this._container;this._fadeAnimated=this.options.fadeAnimation&&Re.any3d,et(v,"leaflet-container"+(Re.touch?" leaflet-touch":"")+(Re.retina?" leaflet-retina":"")+(Re.ielt9?" leaflet-oldie":"")+(Re.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var x=zh(v,"position");x!=="absolute"&&x!=="relative"&&x!=="fixed"&&x!=="sticky"&&(v.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var v=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Qt(this._mapPane,new j(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(et(v.markerPane,"leaflet-zoom-hide"),et(v.shadowPane,"leaflet-zoom-hide"))},_resetView:function(v,x,w){Qt(this._mapPane,new j(0,0));var P=!this._loaded;this._loaded=!0,x=this._limitZoom(x),this.fire("viewprereset");var N=this._zoom!==x;this._moveStart(N,w)._move(v,x)._moveEnd(N),this.fire("viewreset"),P&&this.fire("load")},_moveStart:function(v,x){return v&&this.fire("zoomstart"),x||this.fire("movestart"),this},_move:function(v,x,w,P){x===void 0&&(x=this._zoom);var N=this._zoom!==x;return this._zoom=x,this._lastCenter=v,this._pixelOrigin=this._getNewPixelOrigin(v),P?w&&w.pinch&&this.fire("zoom",w):((N||w&&w.pinch)&&this.fire("zoom",w),this.fire("move",w)),this},_moveEnd:function(v){return v&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(v){Qt(this._mapPane,this._getMapPanePos().subtract(v))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(v){this._targets={},this._targets[l(this._container)]=this;var x=v?Tt:Ke;x(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&x(window,"resize",this._onResize,this),Re.any3d&&this.options.transform3DLimit&&(v?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=I(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var v=this._getMapPanePos();Math.max(Math.abs(v.x),Math.abs(v.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(v,x){for(var w=[],P,N=x==="mouseout"||x==="mouseover",B=v.target||v.srcElement,Z=!1;B;){if(P=this._targets[l(B)],P&&(x==="click"||x==="preclick")&&this._draggableMoved(P)){Z=!0;break}if(P&&P.listens(x,!0)&&(N&&!G_(B,v)||(w.push(P),N))||B===this._container)break;B=B.parentNode}return!w.length&&!Z&&!N&&this.listens(x,!0)&&(w=[this]),w},_isClickDisabled:function(v){for(;v&&v!==this._container;){if(v._leaflet_disable_click)return!0;v=v.parentNode}},_handleDOMEvent:function(v){var x=v.target||v.srcElement;if(!(!this._loaded||x._leaflet_disable_events||v.type==="click"&&this._isClickDisabled(x))){var w=v.type;w==="mousedown"&&O_(x),this._fireDOMEvent(v,w)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(v,x,w){if(v.type==="click"){var P=i({},v);P.type="preclick",this._fireDOMEvent(P,P.type,w)}var N=this._findEventTargets(v,x);if(w){for(var B=[],Z=0;Z<w.length;Z++)w[Z].listens(x,!0)&&B.push(w[Z]);N=B.concat(N)}if(N.length){x==="contextmenu"&&Mr(v);var Q=N[0],te={originalEvent:v};if(v.type!=="keypress"&&v.type!=="keydown"&&v.type!=="keyup"){var ae=Q.getLatLng&&(!Q._radius||Q._radius<=10);te.containerPoint=ae?this.latLngToContainerPoint(Q.getLatLng()):this.mouseEventToContainerPoint(v),te.layerPoint=this.containerPointToLayerPoint(te.containerPoint),te.latlng=ae?Q.getLatLng():this.layerPointToLatLng(te.layerPoint)}for(Z=0;Z<N.length;Z++)if(N[Z].fire(x,te,!0),te.originalEvent._stopped||N[Z].options.bubblingMouseEvents===!1&&T(this._mouseEvents,x)!==-1)return}},_draggableMoved:function(v){return v=v.dragging&&v.dragging.enabled()?v:this,v.dragging&&v.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var v=0,x=this._handlers.length;v<x;v++)this._handlers[v].disable()},whenReady:function(v,x){return this._loaded?v.call(x||this,{target:this}):this.on("load",v,x),this},_getMapPanePos:function(){return Ns(this._mapPane)||new j(0,0)},_moved:function(){var v=this._getMapPanePos();return v&&!v.equals([0,0])},_getTopLeftPoint:function(v,x){var w=v&&x!==void 0?this._getNewPixelOrigin(v,x):this.getPixelOrigin();return w.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(v,x){var w=this.getSize()._divideBy(2);return this.project(v,x)._subtract(w)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(v,x,w){var P=this._getNewPixelOrigin(w,x);return this.project(v,x)._subtract(P)},_latLngBoundsToNewLayerBounds:function(v,x,w){var P=this._getNewPixelOrigin(w,x);return K([this.project(v.getSouthWest(),x)._subtract(P),this.project(v.getNorthWest(),x)._subtract(P),this.project(v.getSouthEast(),x)._subtract(P),this.project(v.getNorthEast(),x)._subtract(P)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(v){return this.latLngToLayerPoint(v).subtract(this._getCenterLayerPoint())},_limitCenter:function(v,x,w){if(!w)return v;var P=this.project(v,x),N=this.getSize().divideBy(2),B=new X(P.subtract(N),P.add(N)),Z=this._getBoundsOffset(B,w,x);return Math.abs(Z.x)<=1&&Math.abs(Z.y)<=1?v:this.unproject(P.add(Z),x)},_limitOffset:function(v,x){if(!x)return v;var w=this.getPixelBounds(),P=new X(w.min.add(v),w.max.add(v));return v.add(this._getBoundsOffset(P,x))},_getBoundsOffset:function(v,x,w){var P=K(this.project(x.getNorthEast(),w),this.project(x.getSouthWest(),w)),N=P.min.subtract(v.min),B=P.max.subtract(v.max),Z=this._rebound(N.x,-B.x),Q=this._rebound(N.y,-B.y);return new j(Z,Q)},_rebound:function(v,x){return v+x>0?Math.round(v-x)/2:Math.max(0,Math.ceil(v))-Math.max(0,Math.floor(x))},_limitZoom:function(v){var x=this.getMinZoom(),w=this.getMaxZoom(),P=Re.any3d?this.options.zoomSnap:1;return P&&(v=Math.round(v/P)*P),Math.max(x,Math.min(w,v))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Zt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(v,x){var w=this._getCenterOffset(v)._trunc();return(x&&x.animate)!==!0&&!this.getSize().contains(w)?!1:(this.panBy(w,x),!0)},_createAnimProxy:function(){var v=this._proxy=vt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(v),this.on("zoomanim",function(x){var w=P_,P=this._proxy.style[w];Es(this._proxy,this.project(x.center,x.zoom),this.getZoomScale(x.zoom,1)),P===this._proxy.style[w]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){It(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var v=this.getCenter(),x=this.getZoom();Es(this._proxy,this.project(v,x),this.getZoomScale(x,1))},_catchTransitionEnd:function(v){this._animatingZoom&&v.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(v,x,w){if(this._animatingZoom)return!0;if(w=w||{},!this._zoomAnimated||w.animate===!1||this._nothingToAnimate()||Math.abs(x-this._zoom)>this.options.zoomAnimationThreshold)return!1;var P=this.getZoomScale(x),N=this._getCenterOffset(v)._divideBy(1-1/P);return w.animate!==!0&&!this.getSize().contains(N)?!1:(I(function(){this._moveStart(!0,w.noMoveStart||!1)._animateZoom(v,x,!0)},this),!0)},_animateZoom:function(v,x,w,P){this._mapPane&&(w&&(this._animatingZoom=!0,this._animateToCenter=v,this._animateToZoom=x,et(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:v,zoom:x,noUpdate:P}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Zt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function lW(v,x){return new ct(v,x)}var mi=V.extend({options:{position:"topright"},initialize:function(v){g(this,v)},getPosition:function(){return this.options.position},setPosition:function(v){var x=this._map;return x&&x.removeControl(this),this.options.position=v,x&&x.addControl(this),this},getContainer:function(){return this._container},addTo:function(v){this.remove(),this._map=v;var x=this._container=this.onAdd(v),w=this.getPosition(),P=v._controlCorners[w];return et(x,"leaflet-control"),w.indexOf("bottom")!==-1?P.insertBefore(x,P.firstChild):P.appendChild(x),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(It(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(v){this._map&&v&&v.screenX>0&&v.screenY>0&&this._map.getContainer().focus()}}),Gh=function(v){return new mi(v)};ct.include({addControl:function(v){return v.addTo(this),this},removeControl:function(v){return v.remove(),this},_initControlPos:function(){var v=this._controlCorners={},x="leaflet-",w=this._controlContainer=vt("div",x+"control-container",this._container);function P(N,B){var Z=x+N+" "+x+B;v[N+B]=vt("div",Z,w)}P("top","left"),P("top","right"),P("bottom","left"),P("bottom","right")},_clearControlPos:function(){for(var v in this._controlCorners)It(this._controlCorners[v]);It(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var LL=mi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(v,x,w,P){return w<P?-1:P<w?1:0}},initialize:function(v,x,w){g(this,w),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var P in v)this._addLayer(v[P],P);for(P in x)this._addLayer(x[P],P,!0)},onAdd:function(v){this._initLayout(),this._update(),this._map=v,v.on("zoomend",this._checkDisabledLayers,this);for(var x=0;x<this._layers.length;x++)this._layers[x].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(v){return mi.prototype.addTo.call(this,v),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var v=0;v<this._layers.length;v++)this._layers[v].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(v,x){return this._addLayer(v,x),this._map?this._update():this},addOverlay:function(v,x){return this._addLayer(v,x,!0),this._map?this._update():this},removeLayer:function(v){v.off("add remove",this._onLayerChange,this);var x=this._getLayer(l(v));return x&&this._layers.splice(this._layers.indexOf(x),1),this._map?this._update():this},expand:function(){et(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var v=this._map.getSize().y-(this._container.offsetTop+50);return v<this._section.clientHeight?(et(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=v+"px"):Zt(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Zt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var v="leaflet-control-layers",x=this._container=vt("div",v),w=this.options.collapsed;x.setAttribute("aria-haspopup",!0),Fh(x),F_(x);var P=this._section=vt("section",v+"-list");w&&(this._map.on("click",this.collapse,this),Ke(x,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var N=this._layersLink=vt("a",v+"-toggle",x);N.href="#",N.title="Layers",N.setAttribute("role","button"),Ke(N,{keydown:function(B){B.keyCode===13&&this._expandSafely()},click:function(B){Mr(B),this._expandSafely()}},this),w||this.expand(),this._baseLayersList=vt("div",v+"-base",P),this._separator=vt("div",v+"-separator",P),this._overlaysList=vt("div",v+"-overlays",P),x.appendChild(P)},_getLayer:function(v){for(var x=0;x<this._layers.length;x++)if(this._layers[x]&&l(this._layers[x].layer)===v)return this._layers[x]},_addLayer:function(v,x,w){this._map&&v.on("add remove",this._onLayerChange,this),this._layers.push({layer:v,name:x,overlay:w}),this.options.sortLayers&&this._layers.sort(o(function(P,N){return this.options.sortFunction(P.layer,N.layer,P.name,N.name)},this)),this.options.autoZIndex&&v.setZIndex&&(this._lastZIndex++,v.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;np(this._baseLayersList),np(this._overlaysList),this._layerControlInputs=[];var v,x,w,P,N=0;for(w=0;w<this._layers.length;w++)P=this._layers[w],this._addItem(P),x=x||P.overlay,v=v||!P.overlay,N+=P.overlay?0:1;return this.options.hideSingleBase&&(v=v&&N>1,this._baseLayersList.style.display=v?"":"none"),this._separator.style.display=x&&v?"":"none",this},_onLayerChange:function(v){this._handlingClick||this._update();var x=this._getLayer(l(v.target)),w=x.overlay?v.type==="add"?"overlayadd":"overlayremove":v.type==="add"?"baselayerchange":null;w&&this._map.fire(w,x)},_createRadioElement:function(v,x){var w='<input type="radio" class="leaflet-control-layers-selector" name="'+v+'"'+(x?' checked="checked"':"")+"/>",P=document.createElement("div");return P.innerHTML=w,P.firstChild},_addItem:function(v){var x=document.createElement("label"),w=this._map.hasLayer(v.layer),P;v.overlay?(P=document.createElement("input"),P.type="checkbox",P.className="leaflet-control-layers-selector",P.defaultChecked=w):P=this._createRadioElement("leaflet-base-layers_"+l(this),w),this._layerControlInputs.push(P),P.layerId=l(v.layer),Ke(P,"click",this._onInputClick,this);var N=document.createElement("span");N.innerHTML=" "+v.name;var B=document.createElement("span");x.appendChild(B),B.appendChild(P),B.appendChild(N);var Z=v.overlay?this._overlaysList:this._baseLayersList;return Z.appendChild(x),this._checkDisabledLayers(),x},_onInputClick:function(){if(!this._preventClick){var v=this._layerControlInputs,x,w,P=[],N=[];this._handlingClick=!0;for(var B=v.length-1;B>=0;B--)x=v[B],w=this._getLayer(x.layerId).layer,x.checked?P.push(w):x.checked||N.push(w);for(B=0;B<N.length;B++)this._map.hasLayer(N[B])&&this._map.removeLayer(N[B]);for(B=0;B<P.length;B++)this._map.hasLayer(P[B])||this._map.addLayer(P[B]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var v=this._layerControlInputs,x,w,P=this._map.getZoom(),N=v.length-1;N>=0;N--)x=v[N],w=this._getLayer(x.layerId).layer,x.disabled=w.options.minZoom!==void 0&&P<w.options.minZoom||w.options.maxZoom!==void 0&&P>w.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var v=this._section;this._preventClick=!0,Ke(v,"click",Mr),this.expand();var x=this;setTimeout(function(){Tt(v,"click",Mr),x._preventClick=!1})}}),uW=function(v,x,w){return new LL(v,x,w)},H_=mi.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(v){var x="leaflet-control-zoom",w=vt("div",x+" leaflet-bar"),P=this.options;return this._zoomInButton=this._createButton(P.zoomInText,P.zoomInTitle,x+"-in",w,this._zoomIn),this._zoomOutButton=this._createButton(P.zoomOutText,P.zoomOutTitle,x+"-out",w,this._zoomOut),this._updateDisabled(),v.on("zoomend zoomlevelschange",this._updateDisabled,this),w},onRemove:function(v){v.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(v){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(v.shiftKey?3:1))},_zoomOut:function(v){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(v.shiftKey?3:1))},_createButton:function(v,x,w,P,N){var B=vt("a",w,P);return B.innerHTML=v,B.href="#",B.title=x,B.setAttribute("role","button"),B.setAttribute("aria-label",x),Fh(B),Ke(B,"click",Os),Ke(B,"click",N,this),Ke(B,"click",this._refocusOnMap,this),B},_updateDisabled:function(){var v=this._map,x="leaflet-disabled";Zt(this._zoomInButton,x),Zt(this._zoomOutButton,x),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||v._zoom===v.getMinZoom())&&(et(this._zoomOutButton,x),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||v._zoom===v.getMaxZoom())&&(et(this._zoomInButton,x),this._zoomInButton.setAttribute("aria-disabled","true"))}});ct.mergeOptions({zoomControl:!0}),ct.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new H_,this.addControl(this.zoomControl))});var cW=function(v){return new H_(v)},PL=mi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(v){var x="leaflet-control-scale",w=vt("div",x),P=this.options;return this._addScales(P,x+"-line",w),v.on(P.updateWhenIdle?"moveend":"move",this._update,this),v.whenReady(this._update,this),w},onRemove:function(v){v.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(v,x,w){v.metric&&(this._mScale=vt("div",x,w)),v.imperial&&(this._iScale=vt("div",x,w))},_update:function(){var v=this._map,x=v.getSize().y/2,w=v.distance(v.containerPointToLatLng([0,x]),v.containerPointToLatLng([this.options.maxWidth,x]));this._updateScales(w)},_updateScales:function(v){this.options.metric&&v&&this._updateMetric(v),this.options.imperial&&v&&this._updateImperial(v)},_updateMetric:function(v){var x=this._getRoundNum(v),w=x<1e3?x+" m":x/1e3+" km";this._updateScale(this._mScale,w,x/v)},_updateImperial:function(v){var x=v*3.2808399,w,P,N;x>5280?(w=x/5280,P=this._getRoundNum(w),this._updateScale(this._iScale,P+" mi",P/w)):(N=this._getRoundNum(x),this._updateScale(this._iScale,N+" ft",N/x))},_updateScale:function(v,x,w){v.style.width=Math.round(this.options.maxWidth*w)+"px",v.innerHTML=x},_getRoundNum:function(v){var x=Math.pow(10,(Math.floor(v)+"").length-1),w=v/x;return w=w>=10?10:w>=5?5:w>=3?3:w>=2?2:1,x*w}}),hW=function(v){return new PL(v)},fW='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',W_=mi.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Re.inlineSvg?fW+" ":"")+"Leaflet</a>"},initialize:function(v){g(this,v),this._attributions={}},onAdd:function(v){v.attributionControl=this,this._container=vt("div","leaflet-control-attribution"),Fh(this._container);for(var x in v._layers)v._layers[x].getAttribution&&this.addAttribution(v._layers[x].getAttribution());return this._update(),v.on("layeradd",this._addAttribution,this),this._container},onRemove:function(v){v.off("layeradd",this._addAttribution,this)},_addAttribution:function(v){v.layer.getAttribution&&(this.addAttribution(v.layer.getAttribution()),v.layer.once("remove",function(){this.removeAttribution(v.layer.getAttribution())},this))},setPrefix:function(v){return this.options.prefix=v,this._update(),this},addAttribution:function(v){return v?(this._attributions[v]||(this._attributions[v]=0),this._attributions[v]++,this._update(),this):this},removeAttribution:function(v){return v?(this._attributions[v]&&(this._attributions[v]--,this._update()),this):this},_update:function(){if(this._map){var v=[];for(var x in this._attributions)this._attributions[x]&&v.push(x);var w=[];this.options.prefix&&w.push(this.options.prefix),v.length&&w.push(v.join(", ")),this._container.innerHTML=w.join(' <span aria-hidden="true">|</span> ')}}});ct.mergeOptions({attributionControl:!0}),ct.addInitHook(function(){this.options.attributionControl&&new W_().addTo(this)});var dW=function(v){return new W_(v)};mi.Layers=LL,mi.Zoom=H_,mi.Scale=PL,mi.Attribution=W_,Gh.layers=uW,Gh.zoom=cW,Gh.scale=hW,Gh.attribution=dW;var Zi=V.extend({initialize:function(v){this._map=v},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Zi.addTo=function(v,x){return v.addHandler(x,this),this};var vW={Events:F},kL=Re.touch?"touchstart mousedown":"mousedown",bo=U.extend({options:{clickTolerance:3},initialize:function(v,x,w,P){g(this,P),this._element=v,this._dragStartTarget=x||v,this._preventOutline=w},enable:function(){this._enabled||(Ke(this._dragStartTarget,kL,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bo._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,kL,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(v){if(this._enabled&&(this._moved=!1,!k_(this._element,"leaflet-zoom-anim"))){if(v.touches&&v.touches.length!==1){bo._dragging===this&&this.finishDrag();return}if(!(bo._dragging||v.shiftKey||v.which!==1&&v.button!==1&&!v.touches)&&(bo._dragging=this,this._preventOutline&&O_(this._element),E_(),Bh(),!this._moving)){this.fire("down");var x=v.touches?v.touches[0]:v,w=bL(this._element);this._startPoint=new j(x.clientX,x.clientY),this._startPos=Ns(this._element),this._parentScale=z_(w);var P=v.type==="mousedown";Ke(document,P?"mousemove":"touchmove",this._onMove,this),Ke(document,P?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(v){if(this._enabled){if(v.touches&&v.touches.length>1){this._moved=!0;return}var x=v.touches&&v.touches.length===1?v.touches[0]:v,w=new j(x.clientX,x.clientY)._subtract(this._startPoint);!w.x&&!w.y||Math.abs(w.x)+Math.abs(w.y)<this.options.clickTolerance||(w.x/=this._parentScale.x,w.y/=this._parentScale.y,Mr(v),this._moved||(this.fire("dragstart"),this._moved=!0,et(document.body,"leaflet-dragging"),this._lastTarget=v.target||v.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),et(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(w),this._moving=!0,this._lastEvent=v,this._updatePosition())}},_updatePosition:function(){var v={originalEvent:this._lastEvent};this.fire("predrag",v),Qt(this._element,this._newPos),this.fire("drag",v)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(v){Zt(document.body,"leaflet-dragging"),this._lastTarget&&(Zt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Tt(document,"mousemove touchmove",this._onMove,this),Tt(document,"mouseup touchend touchcancel",this._onUp,this),N_(),jh();var x=this._moved&&this._moving;this._moving=!1,bo._dragging=!1,x&&this.fire("dragend",{noInertia:v,distance:this._newPos.distanceTo(this._startPos)})}});function DL(v,x,w){var P,N=[1,4,2,8],B,Z,Q,te,ae,Ae,He,nt;for(B=0,Ae=v.length;B<Ae;B++)v[B]._code=zs(v[B],x);for(Q=0;Q<4;Q++){for(He=N[Q],P=[],B=0,Ae=v.length,Z=Ae-1;B<Ae;Z=B++)te=v[B],ae=v[Z],te._code&He?ae._code&He||(nt=lp(ae,te,He,x,w),nt._code=zs(nt,x),P.push(nt)):(ae._code&He&&(nt=lp(ae,te,He,x,w),nt._code=zs(nt,x),P.push(nt)),P.push(te));v=P}return v}function IL(v,x){var w,P,N,B,Z,Q,te,ae,Ae;if(!v||v.length===0)throw new Error("latlngs not passed");Gn(v)||(console.warn("latlngs are not flat! Only the first ring will be used"),v=v[0]);var He=ve([0,0]),nt=ie(v),Qr=nt.getNorthWest().distanceTo(nt.getSouthWest())*nt.getNorthEast().distanceTo(nt.getNorthWest());Qr<1700&&(He=U_(v));var mr=v.length,Hn=[];for(w=0;w<mr;w++){var hn=ve(v[w]);Hn.push(x.project(ve([hn.lat-He.lat,hn.lng-He.lng])))}for(Q=te=ae=0,w=0,P=mr-1;w<mr;P=w++)N=Hn[w],B=Hn[P],Z=N.y*B.x-B.y*N.x,te+=(N.x+B.x)*Z,ae+=(N.y+B.y)*Z,Q+=Z*3;Q===0?Ae=Hn[0]:Ae=[te/Q,ae/Q];var Au=x.unproject(H(Ae));return ve([Au.lat+He.lat,Au.lng+He.lng])}function U_(v){for(var x=0,w=0,P=0,N=0;N<v.length;N++){var B=ve(v[N]);x+=B.lat,w+=B.lng,P++}return ve([x/P,w/P])}var pW={__proto__:null,clipPolygon:DL,polygonCenter:IL,centroid:U_};function EL(v,x){if(!x||!v.length)return v.slice();var w=x*x;return v=yW(v,w),v=mW(v,w),v}function NL(v,x,w){return Math.sqrt(Hh(v,x,w,!0))}function gW(v,x,w){return Hh(v,x,w)}function mW(v,x){var w=v.length,P=typeof Uint8Array<"u"?Uint8Array:Array,N=new P(w);N[0]=N[w-1]=1,Z_(v,N,x,0,w-1);var B,Z=[];for(B=0;B<w;B++)N[B]&&Z.push(v[B]);return Z}function Z_(v,x,w,P,N){var B=0,Z,Q,te;for(Q=P+1;Q<=N-1;Q++)te=Hh(v[Q],v[P],v[N],!0),te>B&&(Z=Q,B=te);B>w&&(x[Z]=1,Z_(v,x,w,P,Z),Z_(v,x,w,Z,N))}function yW(v,x){for(var w=[v[0]],P=1,N=0,B=v.length;P<B;P++)_W(v[P],v[N])>x&&(w.push(v[P]),N=P);return N<B-1&&w.push(v[B-1]),w}var RL;function OL(v,x,w,P,N){var B=P?RL:zs(v,w),Z=zs(x,w),Q,te,ae;for(RL=Z;;){if(!(B|Z))return[v,x];if(B&Z)return!1;Q=B||Z,te=lp(v,x,Q,w,N),ae=zs(te,w),Q===B?(v=te,B=ae):(x=te,Z=ae)}}function lp(v,x,w,P,N){var B=x.x-v.x,Z=x.y-v.y,Q=P.min,te=P.max,ae,Ae;return w&8?(ae=v.x+B*(te.y-v.y)/Z,Ae=te.y):w&4?(ae=v.x+B*(Q.y-v.y)/Z,Ae=Q.y):w&2?(ae=te.x,Ae=v.y+Z*(te.x-v.x)/B):w&1&&(ae=Q.x,Ae=v.y+Z*(Q.x-v.x)/B),new j(ae,Ae,N)}function zs(v,x){var w=0;return v.x<x.min.x?w|=1:v.x>x.max.x&&(w|=2),v.y<x.min.y?w|=4:v.y>x.max.y&&(w|=8),w}function _W(v,x){var w=x.x-v.x,P=x.y-v.y;return w*w+P*P}function Hh(v,x,w,P){var N=x.x,B=x.y,Z=w.x-N,Q=w.y-B,te=Z*Z+Q*Q,ae;return te>0&&(ae=((v.x-N)*Z+(v.y-B)*Q)/te,ae>1?(N=w.x,B=w.y):ae>0&&(N+=Z*ae,B+=Q*ae)),Z=v.x-N,Q=v.y-B,P?Z*Z+Q*Q:new j(N,B)}function Gn(v){return!S(v[0])||typeof v[0][0]!="object"&&typeof v[0][0]<"u"}function zL(v){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Gn(v)}function BL(v,x){var w,P,N,B,Z,Q,te,ae;if(!v||v.length===0)throw new Error("latlngs not passed");Gn(v)||(console.warn("latlngs are not flat! Only the first ring will be used"),v=v[0]);var Ae=ve([0,0]),He=ie(v),nt=He.getNorthWest().distanceTo(He.getSouthWest())*He.getNorthEast().distanceTo(He.getNorthWest());nt<1700&&(Ae=U_(v));var Qr=v.length,mr=[];for(w=0;w<Qr;w++){var Hn=ve(v[w]);mr.push(x.project(ve([Hn.lat-Ae.lat,Hn.lng-Ae.lng])))}for(w=0,P=0;w<Qr-1;w++)P+=mr[w].distanceTo(mr[w+1])/2;if(P===0)ae=mr[0];else for(w=0,B=0;w<Qr-1;w++)if(Z=mr[w],Q=mr[w+1],N=Z.distanceTo(Q),B+=N,B>P){te=(B-P)/N,ae=[Q.x-te*(Q.x-Z.x),Q.y-te*(Q.y-Z.y)];break}var hn=x.unproject(H(ae));return ve([hn.lat+Ae.lat,hn.lng+Ae.lng])}var xW={__proto__:null,simplify:EL,pointToSegmentDistance:NL,closestPointOnSegment:gW,clipSegment:OL,_getEdgeIntersection:lp,_getBitCode:zs,_sqClosestPointOnSegment:Hh,isFlat:Gn,_flat:zL,polylineCenter:BL},$_={project:function(v){return new j(v.lng,v.lat)},unproject:function(v){return new ue(v.y,v.x)},bounds:new X([-180,-90],[180,90])},Y_={R:6378137,R_MINOR:6356752314245179e-9,bounds:new X([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(v){var x=Math.PI/180,w=this.R,P=v.lat*x,N=this.R_MINOR/w,B=Math.sqrt(1-N*N),Z=B*Math.sin(P),Q=Math.tan(Math.PI/4-P/2)/Math.pow((1-Z)/(1+Z),B/2);return P=-w*Math.log(Math.max(Q,1e-10)),new j(v.lng*x*w,P)},unproject:function(v){for(var x=180/Math.PI,w=this.R,P=this.R_MINOR/w,N=Math.sqrt(1-P*P),B=Math.exp(-v.y/w),Z=Math.PI/2-2*Math.atan(B),Q=0,te=.1,ae;Q<15&&Math.abs(te)>1e-7;Q++)ae=N*Math.sin(Z),ae=Math.pow((1-ae)/(1+ae),N/2),te=Math.PI/2-2*Math.atan(B*ae)-Z,Z+=te;return new ue(Z*x,v.x*x/w)}},SW={__proto__:null,LonLat:$_,Mercator:Y_,SphericalMercator:ke},bW=i({},xe,{code:"EPSG:3395",projection:Y_,transformation:function(){var v=.5/(Math.PI*Y_.R);return Me(v,.5,-v,.5)}()}),jL=i({},xe,{code:"EPSG:4326",projection:$_,transformation:Me(1/180,1,-1/180,.5)}),wW=i({},Ge,{projection:$_,transformation:Me(1,0,-1,0),scale:function(v){return Math.pow(2,v)},zoom:function(v){return Math.log(v)/Math.LN2},distance:function(v,x){var w=x.lng-v.lng,P=x.lat-v.lat;return Math.sqrt(w*w+P*P)},infinite:!0});Ge.Earth=xe,Ge.EPSG3395=bW,Ge.EPSG3857=st,Ge.EPSG900913=Ye,Ge.EPSG4326=jL,Ge.Simple=wW;var yi=U.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(v){return v.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(v){return v&&v.removeLayer(this),this},getPane:function(v){return this._map.getPane(v?this.options[v]||v:this.options.pane)},addInteractiveTarget:function(v){return this._map._targets[l(v)]=this,this},removeInteractiveTarget:function(v){return delete this._map._targets[l(v)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(v){var x=v.target;if(x.hasLayer(this)){if(this._map=x,this._zoomAnimated=x._zoomAnimated,this.getEvents){var w=this.getEvents();x.on(w,this),this.once("remove",function(){x.off(w,this)},this)}this.onAdd(x),this.fire("add"),x.fire("layeradd",{layer:this})}}});ct.include({addLayer:function(v){if(!v._layerAdd)throw new Error("The provided object is not a Layer.");var x=l(v);return this._layers[x]?this:(this._layers[x]=v,v._mapToAdd=this,v.beforeAdd&&v.beforeAdd(this),this.whenReady(v._layerAdd,v),this)},removeLayer:function(v){var x=l(v);return this._layers[x]?(this._loaded&&v.onRemove(this),delete this._layers[x],this._loaded&&(this.fire("layerremove",{layer:v}),v.fire("remove")),v._map=v._mapToAdd=null,this):this},hasLayer:function(v){return l(v)in this._layers},eachLayer:function(v,x){for(var w in this._layers)v.call(x,this._layers[w]);return this},_addLayers:function(v){v=v?S(v)?v:[v]:[];for(var x=0,w=v.length;x<w;x++)this.addLayer(v[x])},_addZoomLimit:function(v){(!isNaN(v.options.maxZoom)||!isNaN(v.options.minZoom))&&(this._zoomBoundLayers[l(v)]=v,this._updateZoomLevels())},_removeZoomLimit:function(v){var x=l(v);this._zoomBoundLayers[x]&&(delete this._zoomBoundLayers[x],this._updateZoomLevels())},_updateZoomLevels:function(){var v=1/0,x=-1/0,w=this._getZoomSpan();for(var P in this._zoomBoundLayers){var N=this._zoomBoundLayers[P].options;v=N.minZoom===void 0?v:Math.min(v,N.minZoom),x=N.maxZoom===void 0?x:Math.max(x,N.maxZoom)}this._layersMaxZoom=x===-1/0?void 0:x,this._layersMinZoom=v===1/0?void 0:v,w!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var bu=yi.extend({initialize:function(v,x){g(this,x),this._layers={};var w,P;if(v)for(w=0,P=v.length;w<P;w++)this.addLayer(v[w])},addLayer:function(v){var x=this.getLayerId(v);return this._layers[x]=v,this._map&&this._map.addLayer(v),this},removeLayer:function(v){var x=v in this._layers?v:this.getLayerId(v);return this._map&&this._layers[x]&&this._map.removeLayer(this._layers[x]),delete this._layers[x],this},hasLayer:function(v){var x=typeof v=="number"?v:this.getLayerId(v);return x in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(v){var x=Array.prototype.slice.call(arguments,1),w,P;for(w in this._layers)P=this._layers[w],P[v]&&P[v].apply(P,x);return this},onAdd:function(v){this.eachLayer(v.addLayer,v)},onRemove:function(v){this.eachLayer(v.removeLayer,v)},eachLayer:function(v,x){for(var w in this._layers)v.call(x,this._layers[w]);return this},getLayer:function(v){return this._layers[v]},getLayers:function(){var v=[];return this.eachLayer(v.push,v),v},setZIndex:function(v){return this.invoke("setZIndex",v)},getLayerId:function(v){return l(v)}}),TW=function(v,x){return new bu(v,x)},Da=bu.extend({addLayer:function(v){return this.hasLayer(v)?this:(v.addEventParent(this),bu.prototype.addLayer.call(this,v),this.fire("layeradd",{layer:v}))},removeLayer:function(v){return this.hasLayer(v)?(v in this._layers&&(v=this._layers[v]),v.removeEventParent(this),bu.prototype.removeLayer.call(this,v),this.fire("layerremove",{layer:v})):this},setStyle:function(v){return this.invoke("setStyle",v)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var v=new ne;for(var x in this._layers){var w=this._layers[x];v.extend(w.getBounds?w.getBounds():w.getLatLng())}return v}}),CW=function(v,x){return new Da(v,x)},wu=V.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(v){g(this,v)},createIcon:function(v){return this._createIcon("icon",v)},createShadow:function(v){return this._createIcon("shadow",v)},_createIcon:function(v,x){var w=this._getIconUrl(v);if(!w){if(v==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var P=this._createImg(w,x&&x.tagName==="IMG"?x:null);return this._setIconStyles(P,v),(this.options.crossOrigin||this.options.crossOrigin==="")&&(P.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),P},_setIconStyles:function(v,x){var w=this.options,P=w[x+"Size"];typeof P=="number"&&(P=[P,P]);var N=H(P),B=H(x==="shadow"&&w.shadowAnchor||w.iconAnchor||N&&N.divideBy(2,!0));v.className="leaflet-marker-"+x+" "+(w.className||""),B&&(v.style.marginLeft=-B.x+"px",v.style.marginTop=-B.y+"px"),N&&(v.style.width=N.x+"px",v.style.height=N.y+"px")},_createImg:function(v,x){return x=x||document.createElement("img"),x.src=v,x},_getIconUrl:function(v){return Re.retina&&this.options[v+"RetinaUrl"]||this.options[v+"Url"]}});function MW(v){return new wu(v)}var Wh=wu.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(v){return typeof Wh.imagePath!="string"&&(Wh.imagePath=this._detectIconPath()),(this.options.imagePath||Wh.imagePath)+wu.prototype._getIconUrl.call(this,v)},_stripUrl:function(v){var x=function(w,P,N){var B=P.exec(w);return B&&B[N]};return v=x(v,/^url\((['"])?(.+)\1\)$/,2),v&&x(v,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var v=vt("div","leaflet-default-icon-path",document.body),x=zh(v,"background-image")||zh(v,"backgroundImage");if(document.body.removeChild(v),x=this._stripUrl(x),x)return x;var w=document.querySelector('link[href$="leaflet.css"]');return w?w.href.substring(0,w.href.length-11-1):""}}),VL=Zi.extend({initialize:function(v){this._marker=v},addHooks:function(){var v=this._marker._icon;this._draggable||(this._draggable=new bo(v,v,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),et(v,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Zt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(v){var x=this._marker,w=x._map,P=this._marker.options.autoPanSpeed,N=this._marker.options.autoPanPadding,B=Ns(x._icon),Z=w.getPixelBounds(),Q=w.getPixelOrigin(),te=K(Z.min._subtract(Q).add(N),Z.max._subtract(Q).subtract(N));if(!te.contains(B)){var ae=H((Math.max(te.max.x,B.x)-te.max.x)/(Z.max.x-te.max.x)-(Math.min(te.min.x,B.x)-te.min.x)/(Z.min.x-te.min.x),(Math.max(te.max.y,B.y)-te.max.y)/(Z.max.y-te.max.y)-(Math.min(te.min.y,B.y)-te.min.y)/(Z.min.y-te.min.y)).multiplyBy(P);w.panBy(ae,{animate:!1}),this._draggable._newPos._add(ae),this._draggable._startPos._add(ae),Qt(x._icon,this._draggable._newPos),this._onDrag(v),this._panRequest=I(this._adjustPan.bind(this,v))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(v){this._marker.options.autoPan&&(z(this._panRequest),this._panRequest=I(this._adjustPan.bind(this,v)))},_onDrag:function(v){var x=this._marker,w=x._shadow,P=Ns(x._icon),N=x._map.layerPointToLatLng(P);w&&Qt(w,P),x._latlng=N,v.latlng=N,v.oldLatLng=this._oldLatLng,x.fire("move",v).fire("drag",v)},_onDragEnd:function(v){z(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",v)}}),up=yi.extend({options:{icon:new Wh,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(v,x){g(this,x),this._latlng=ve(v)},onAdd:function(v){this._zoomAnimated=this._zoomAnimated&&v.options.markerZoomAnimation,this._zoomAnimated&&v.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(v){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&v.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(v){var x=this._latlng;return this._latlng=ve(v),this.update(),this.fire("move",{oldLatLng:x,latlng:this._latlng})},setZIndexOffset:function(v){return this.options.zIndexOffset=v,this.update()},getIcon:function(){return this.options.icon},setIcon:function(v){return this.options.icon=v,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var v=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(v)}return this},_initIcon:function(){var v=this.options,x="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),w=v.icon.createIcon(this._icon),P=!1;w!==this._icon&&(this._icon&&this._removeIcon(),P=!0,v.title&&(w.title=v.title),w.tagName==="IMG"&&(w.alt=v.alt||"")),et(w,x),v.keyboard&&(w.tabIndex="0",w.setAttribute("role","button")),this._icon=w,v.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ke(w,"focus",this._panOnFocus,this);var N=v.icon.createShadow(this._shadow),B=!1;N!==this._shadow&&(this._removeShadow(),B=!0),N&&(et(N,x),N.alt=""),this._shadow=N,v.opacity<1&&this._updateOpacity(),P&&this.getPane().appendChild(this._icon),this._initInteraction(),N&&B&&this.getPane(v.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Tt(this._icon,"focus",this._panOnFocus,this),It(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&It(this._shadow),this._shadow=null},_setPos:function(v){this._icon&&Qt(this._icon,v),this._shadow&&Qt(this._shadow,v),this._zIndex=v.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(v){this._icon&&(this._icon.style.zIndex=this._zIndex+v)},_animateZoom:function(v){var x=this._map._latLngToNewLayerPoint(this._latlng,v.zoom,v.center).round();this._setPos(x)},_initInteraction:function(){if(this.options.interactive&&(et(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),VL)){var v=this.options.draggable;this.dragging&&(v=this.dragging.enabled(),this.dragging.disable()),this.dragging=new VL(this),v&&this.dragging.enable()}},setOpacity:function(v){return this.options.opacity=v,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var v=this.options.opacity;this._icon&&Fn(this._icon,v),this._shadow&&Fn(this._shadow,v)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var v=this._map;if(v){var x=this.options.icon.options,w=x.iconSize?H(x.iconSize):H(0,0),P=x.iconAnchor?H(x.iconAnchor):H(0,0);v.panInside(this._latlng,{paddingTopLeft:P,paddingBottomRight:w.subtract(P)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function AW(v,x){return new up(v,x)}var wo=yi.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(v){this._renderer=v.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(v){return g(this,v),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&v&&Object.prototype.hasOwnProperty.call(v,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),cp=wo.extend({options:{fill:!0,radius:10},initialize:function(v,x){g(this,x),this._latlng=ve(v),this._radius=this.options.radius},setLatLng:function(v){var x=this._latlng;return this._latlng=ve(v),this.redraw(),this.fire("move",{oldLatLng:x,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(v){return this.options.radius=this._radius=v,this.redraw()},getRadius:function(){return this._radius},setStyle:function(v){var x=v&&v.radius||this._radius;return wo.prototype.setStyle.call(this,v),this.setRadius(x),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var v=this._radius,x=this._radiusY||v,w=this._clickTolerance(),P=[v+w,x+w];this._pxBounds=new X(this._point.subtract(P),this._point.add(P))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(v){return v.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function LW(v,x){return new cp(v,x)}var X_=cp.extend({initialize:function(v,x,w){if(typeof x=="number"&&(x=i({},w,{radius:x})),g(this,x),this._latlng=ve(v),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(v){return this._mRadius=v,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var v=[this._radius,this._radiusY||this._radius];return new ne(this._map.layerPointToLatLng(this._point.subtract(v)),this._map.layerPointToLatLng(this._point.add(v)))},setStyle:wo.prototype.setStyle,_project:function(){var v=this._latlng.lng,x=this._latlng.lat,w=this._map,P=w.options.crs;if(P.distance===xe.distance){var N=Math.PI/180,B=this._mRadius/xe.R/N,Z=w.project([x+B,v]),Q=w.project([x-B,v]),te=Z.add(Q).divideBy(2),ae=w.unproject(te).lat,Ae=Math.acos((Math.cos(B*N)-Math.sin(x*N)*Math.sin(ae*N))/(Math.cos(x*N)*Math.cos(ae*N)))/N;(isNaN(Ae)||Ae===0)&&(Ae=B/Math.cos(Math.PI/180*x)),this._point=te.subtract(w.getPixelOrigin()),this._radius=isNaN(Ae)?0:te.x-w.project([ae,v-Ae]).x,this._radiusY=te.y-Z.y}else{var He=P.unproject(P.project(this._latlng).subtract([this._mRadius,0]));this._point=w.latLngToLayerPoint(this._latlng),this._radius=this._point.x-w.latLngToLayerPoint(He).x}this._updateBounds()}});function PW(v,x,w){return new X_(v,x,w)}var Ia=wo.extend({options:{smoothFactor:1,noClip:!1},initialize:function(v,x){g(this,x),this._setLatLngs(v)},getLatLngs:function(){return this._latlngs},setLatLngs:function(v){return this._setLatLngs(v),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(v){for(var x=1/0,w=null,P=Hh,N,B,Z=0,Q=this._parts.length;Z<Q;Z++)for(var te=this._parts[Z],ae=1,Ae=te.length;ae<Ae;ae++){N=te[ae-1],B=te[ae];var He=P(v,N,B,!0);He<x&&(x=He,w=P(v,N,B))}return w&&(w.distance=Math.sqrt(x)),w},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return BL(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(v,x){return x=x||this._defaultShape(),v=ve(v),x.push(v),this._bounds.extend(v),this.redraw()},_setLatLngs:function(v){this._bounds=new ne,this._latlngs=this._convertLatLngs(v)},_defaultShape:function(){return Gn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(v){for(var x=[],w=Gn(v),P=0,N=v.length;P<N;P++)w?(x[P]=ve(v[P]),this._bounds.extend(x[P])):x[P]=this._convertLatLngs(v[P]);return x},_project:function(){var v=new X;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,v),this._bounds.isValid()&&v.isValid()&&(this._rawPxBounds=v,this._updateBounds())},_updateBounds:function(){var v=this._clickTolerance(),x=new j(v,v);this._rawPxBounds&&(this._pxBounds=new X([this._rawPxBounds.min.subtract(x),this._rawPxBounds.max.add(x)]))},_projectLatlngs:function(v,x,w){var P=v[0]instanceof ue,N=v.length,B,Z;if(P){for(Z=[],B=0;B<N;B++)Z[B]=this._map.latLngToLayerPoint(v[B]),w.extend(Z[B]);x.push(Z)}else for(B=0;B<N;B++)this._projectLatlngs(v[B],x,w)},_clipPoints:function(){var v=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(v))){if(this.options.noClip){this._parts=this._rings;return}var x=this._parts,w,P,N,B,Z,Q,te;for(w=0,N=0,B=this._rings.length;w<B;w++)for(te=this._rings[w],P=0,Z=te.length;P<Z-1;P++)Q=OL(te[P],te[P+1],v,P,!0),Q&&(x[N]=x[N]||[],x[N].push(Q[0]),(Q[1]!==te[P+1]||P===Z-2)&&(x[N].push(Q[1]),N++))}},_simplifyPoints:function(){for(var v=this._parts,x=this.options.smoothFactor,w=0,P=v.length;w<P;w++)v[w]=EL(v[w],x)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(v,x){var w,P,N,B,Z,Q,te=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(v))return!1;for(w=0,B=this._parts.length;w<B;w++)for(Q=this._parts[w],P=0,Z=Q.length,N=Z-1;P<Z;N=P++)if(!(!x&&P===0)&&NL(v,Q[N],Q[P])<=te)return!0;return!1}});function kW(v,x){return new Ia(v,x)}Ia._flat=zL;var Tu=Ia.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return IL(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(v){var x=Ia.prototype._convertLatLngs.call(this,v),w=x.length;return w>=2&&x[0]instanceof ue&&x[0].equals(x[w-1])&&x.pop(),x},_setLatLngs:function(v){Ia.prototype._setLatLngs.call(this,v),Gn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Gn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var v=this._renderer._bounds,x=this.options.weight,w=new j(x,x);if(v=new X(v.min.subtract(w),v.max.add(w)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(v))){if(this.options.noClip){this._parts=this._rings;return}for(var P=0,N=this._rings.length,B;P<N;P++)B=DL(this._rings[P],v,!0),B.length&&this._parts.push(B)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(v){var x=!1,w,P,N,B,Z,Q,te,ae;if(!this._pxBounds||!this._pxBounds.contains(v))return!1;for(B=0,te=this._parts.length;B<te;B++)for(w=this._parts[B],Z=0,ae=w.length,Q=ae-1;Z<ae;Q=Z++)P=w[Z],N=w[Q],P.y>v.y!=N.y>v.y&&v.x<(N.x-P.x)*(v.y-P.y)/(N.y-P.y)+P.x&&(x=!x);return x||Ia.prototype._containsPoint.call(this,v,!0)}});function DW(v,x){return new Tu(v,x)}var Ea=Da.extend({initialize:function(v,x){g(this,x),this._layers={},v&&this.addData(v)},addData:function(v){var x=S(v)?v:v.features,w,P,N;if(x){for(w=0,P=x.length;w<P;w++)N=x[w],(N.geometries||N.geometry||N.features||N.coordinates)&&this.addData(N);return this}var B=this.options;if(B.filter&&!B.filter(v))return this;var Z=hp(v,B);return Z?(Z.feature=vp(v),Z.defaultOptions=Z.options,this.resetStyle(Z),B.onEachFeature&&B.onEachFeature(v,Z),this.addLayer(Z)):this},resetStyle:function(v){return v===void 0?this.eachLayer(this.resetStyle,this):(v.options=i({},v.defaultOptions),this._setLayerStyle(v,this.options.style),this)},setStyle:function(v){return this.eachLayer(function(x){this._setLayerStyle(x,v)},this)},_setLayerStyle:function(v,x){v.setStyle&&(typeof x=="function"&&(x=x(v.feature)),v.setStyle(x))}});function hp(v,x){var w=v.type==="Feature"?v.geometry:v,P=w?w.coordinates:null,N=[],B=x&&x.pointToLayer,Z=x&&x.coordsToLatLng||q_,Q,te,ae,Ae;if(!P&&!w)return null;switch(w.type){case"Point":return Q=Z(P),FL(B,v,Q,x);case"MultiPoint":for(ae=0,Ae=P.length;ae<Ae;ae++)Q=Z(P[ae]),N.push(FL(B,v,Q,x));return new Da(N);case"LineString":case"MultiLineString":return te=fp(P,w.type==="LineString"?0:1,Z),new Ia(te,x);case"Polygon":case"MultiPolygon":return te=fp(P,w.type==="Polygon"?1:2,Z),new Tu(te,x);case"GeometryCollection":for(ae=0,Ae=w.geometries.length;ae<Ae;ae++){var He=hp({geometry:w.geometries[ae],type:"Feature",properties:v.properties},x);He&&N.push(He)}return new Da(N);case"FeatureCollection":for(ae=0,Ae=w.features.length;ae<Ae;ae++){var nt=hp(w.features[ae],x);nt&&N.push(nt)}return new Da(N);default:throw new Error("Invalid GeoJSON object.")}}function FL(v,x,w,P){return v?v(x,w):new up(w,P&&P.markersInheritOptions&&P)}function q_(v){return new ue(v[1],v[0],v[2])}function fp(v,x,w){for(var P=[],N=0,B=v.length,Z;N<B;N++)Z=x?fp(v[N],x-1,w):(w||q_)(v[N]),P.push(Z);return P}function K_(v,x){return v=ve(v),v.alt!==void 0?[f(v.lng,x),f(v.lat,x),f(v.alt,x)]:[f(v.lng,x),f(v.lat,x)]}function dp(v,x,w,P){for(var N=[],B=0,Z=v.length;B<Z;B++)N.push(x?dp(v[B],Gn(v[B])?0:x-1,w,P):K_(v[B],P));return!x&&w&&N.length>0&&N.push(N[0].slice()),N}function Cu(v,x){return v.feature?i({},v.feature,{geometry:x}):vp(x)}function vp(v){return v.type==="Feature"||v.type==="FeatureCollection"?v:{type:"Feature",properties:{},geometry:v}}var Q_={toGeoJSON:function(v){return Cu(this,{type:"Point",coordinates:K_(this.getLatLng(),v)})}};up.include(Q_),X_.include(Q_),cp.include(Q_),Ia.include({toGeoJSON:function(v){var x=!Gn(this._latlngs),w=dp(this._latlngs,x?1:0,!1,v);return Cu(this,{type:(x?"Multi":"")+"LineString",coordinates:w})}}),Tu.include({toGeoJSON:function(v){var x=!Gn(this._latlngs),w=x&&!Gn(this._latlngs[0]),P=dp(this._latlngs,w?2:x?1:0,!0,v);return x||(P=[P]),Cu(this,{type:(w?"Multi":"")+"Polygon",coordinates:P})}}),bu.include({toMultiPoint:function(v){var x=[];return this.eachLayer(function(w){x.push(w.toGeoJSON(v).geometry.coordinates)}),Cu(this,{type:"MultiPoint",coordinates:x})},toGeoJSON:function(v){var x=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(x==="MultiPoint")return this.toMultiPoint(v);var w=x==="GeometryCollection",P=[];return this.eachLayer(function(N){if(N.toGeoJSON){var B=N.toGeoJSON(v);if(w)P.push(B.geometry);else{var Z=vp(B);Z.type==="FeatureCollection"?P.push.apply(P,Z.features):P.push(Z)}}}),w?Cu(this,{geometries:P,type:"GeometryCollection"}):{type:"FeatureCollection",features:P}}});function GL(v,x){return new Ea(v,x)}var IW=GL,pp=yi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(v,x,w){this._url=v,this._bounds=ie(x),g(this,w)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(et(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){It(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(v){return this.options.opacity=v,this._image&&this._updateOpacity(),this},setStyle:function(v){return v.opacity&&this.setOpacity(v.opacity),this},bringToFront:function(){return this._map&&xu(this._image),this},bringToBack:function(){return this._map&&Su(this._image),this},setUrl:function(v){return this._url=v,this._image&&(this._image.src=v),this},setBounds:function(v){return this._bounds=ie(v),this._map&&this._reset(),this},getEvents:function(){var v={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(v.zoomanim=this._animateZoom),v},setZIndex:function(v){return this.options.zIndex=v,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var v=this._url.tagName==="IMG",x=this._image=v?this._url:vt("img");if(et(x,"leaflet-image-layer"),this._zoomAnimated&&et(x,"leaflet-zoom-animated"),this.options.className&&et(x,this.options.className),x.onselectstart=h,x.onmousemove=h,x.onload=o(this.fire,this,"load"),x.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(x.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),v){this._url=x.src;return}x.src=this._url,x.alt=this.options.alt},_animateZoom:function(v){var x=this._map.getZoomScale(v.zoom),w=this._map._latLngBoundsToNewLayerBounds(this._bounds,v.zoom,v.center).min;Es(this._image,w,x)},_reset:function(){var v=this._image,x=new X(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),w=x.getSize();Qt(v,x.min),v.style.width=w.x+"px",v.style.height=w.y+"px"},_updateOpacity:function(){Fn(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var v=this.options.errorOverlayUrl;v&&this._url!==v&&(this._url=v,this._image.src=v)},getCenter:function(){return this._bounds.getCenter()}}),EW=function(v,x,w){return new pp(v,x,w)},HL=pp.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var v=this._url.tagName==="VIDEO",x=this._image=v?this._url:vt("video");if(et(x,"leaflet-image-layer"),this._zoomAnimated&&et(x,"leaflet-zoom-animated"),this.options.className&&et(x,this.options.className),x.onselectstart=h,x.onmousemove=h,x.onloadeddata=o(this.fire,this,"load"),v){for(var w=x.getElementsByTagName("source"),P=[],N=0;N<w.length;N++)P.push(w[N].src);this._url=w.length>0?P:[x.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(x.style,"objectFit")&&(x.style.objectFit="fill"),x.autoplay=!!this.options.autoplay,x.loop=!!this.options.loop,x.muted=!!this.options.muted,x.playsInline=!!this.options.playsInline;for(var B=0;B<this._url.length;B++){var Z=vt("source");Z.src=this._url[B],x.appendChild(Z)}}});function NW(v,x,w){return new HL(v,x,w)}var WL=pp.extend({_initImage:function(){var v=this._image=this._url;et(v,"leaflet-image-layer"),this._zoomAnimated&&et(v,"leaflet-zoom-animated"),this.options.className&&et(v,this.options.className),v.onselectstart=h,v.onmousemove=h}});function RW(v,x,w){return new WL(v,x,w)}var $i=yi.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(v,x){v&&(v instanceof ue||S(v))?(this._latlng=ve(v),g(this,x)):(g(this,v),this._source=x),this.options.content&&(this._content=this.options.content)},openOn:function(v){return v=arguments.length?v:this._source._map,v.hasLayer(this)||v.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(v){return this._map?this.close():(arguments.length?this._source=v:v=this._source,this._prepareOpen(),this.openOn(v._map)),this},onAdd:function(v){this._zoomAnimated=v._zoomAnimated,this._container||this._initLayout(),v._fadeAnimated&&Fn(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),v._fadeAnimated&&Fn(this._container,1),this.bringToFront(),this.options.interactive&&(et(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(v){v._fadeAnimated?(Fn(this._container,0),this._removeTimeout=setTimeout(o(It,void 0,this._container),200)):It(this._container),this.options.interactive&&(Zt(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(v){return this._latlng=ve(v),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(v){return this._content=v,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var v={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(v.zoomanim=this._animateZoom),v},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&xu(this._container),this},bringToBack:function(){return this._map&&Su(this._container),this},_prepareOpen:function(v){var x=this._source;if(!x._map)return!1;if(x instanceof Da){x=null;var w=this._source._layers;for(var P in w)if(w[P]._map){x=w[P];break}if(!x)return!1;this._source=x}if(!v)if(x.getCenter)v=x.getCenter();else if(x.getLatLng)v=x.getLatLng();else if(x.getBounds)v=x.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(v),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var v=this._contentNode,x=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof x=="string")v.innerHTML=x;else{for(;v.hasChildNodes();)v.removeChild(v.firstChild);v.appendChild(x)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var v=this._map.latLngToLayerPoint(this._latlng),x=H(this.options.offset),w=this._getAnchor();this._zoomAnimated?Qt(this._container,v.add(w)):x=x.add(v).add(w);var P=this._containerBottom=-x.y,N=this._containerLeft=-Math.round(this._containerWidth/2)+x.x;this._container.style.bottom=P+"px",this._container.style.left=N+"px"}},_getAnchor:function(){return[0,0]}});ct.include({_initOverlay:function(v,x,w,P){var N=x;return N instanceof v||(N=new v(P).setContent(x)),w&&N.setLatLng(w),N}}),yi.include({_initOverlay:function(v,x,w,P){var N=w;return N instanceof v?(g(N,P),N._source=this):(N=x&&!P?x:new v(P,this),N.setContent(w)),N}});var gp=$i.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(v){return v=arguments.length?v:this._source._map,!v.hasLayer(this)&&v._popup&&v._popup.options.autoClose&&v.removeLayer(v._popup),v._popup=this,$i.prototype.openOn.call(this,v)},onAdd:function(v){$i.prototype.onAdd.call(this,v),v.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof wo||this._source.on("preclick",Rs))},onRemove:function(v){$i.prototype.onRemove.call(this,v),v.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof wo||this._source.off("preclick",Rs))},getEvents:function(){var v=$i.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(v.preclick=this.close),this.options.keepInView&&(v.moveend=this._adjustPan),v},_initLayout:function(){var v="leaflet-popup",x=this._container=vt("div",v+" "+(this.options.className||"")+" leaflet-zoom-animated"),w=this._wrapper=vt("div",v+"-content-wrapper",x);if(this._contentNode=vt("div",v+"-content",w),Fh(x),F_(this._contentNode),Ke(x,"contextmenu",Rs),this._tipContainer=vt("div",v+"-tip-container",x),this._tip=vt("div",v+"-tip",this._tipContainer),this.options.closeButton){var P=this._closeButton=vt("a",v+"-close-button",x);P.setAttribute("role","button"),P.setAttribute("aria-label","Close popup"),P.href="#close",P.innerHTML='<span aria-hidden="true">×</span>',Ke(P,"click",function(N){Mr(N),this.close()},this)}},_updateLayout:function(){var v=this._contentNode,x=v.style;x.width="",x.whiteSpace="nowrap";var w=v.offsetWidth;w=Math.min(w,this.options.maxWidth),w=Math.max(w,this.options.minWidth),x.width=w+1+"px",x.whiteSpace="",x.height="";var P=v.offsetHeight,N=this.options.maxHeight,B="leaflet-popup-scrolled";N&&P>N?(x.height=N+"px",et(v,B)):Zt(v,B),this._containerWidth=this._container.offsetWidth},_animateZoom:function(v){var x=this._map._latLngToNewLayerPoint(this._latlng,v.zoom,v.center),w=this._getAnchor();Qt(this._container,x.add(w))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var v=this._map,x=parseInt(zh(this._container,"marginBottom"),10)||0,w=this._container.offsetHeight+x,P=this._containerWidth,N=new j(this._containerLeft,-w-this._containerBottom);N._add(Ns(this._container));var B=v.layerPointToContainerPoint(N),Z=H(this.options.autoPanPadding),Q=H(this.options.autoPanPaddingTopLeft||Z),te=H(this.options.autoPanPaddingBottomRight||Z),ae=v.getSize(),Ae=0,He=0;B.x+P+te.x>ae.x&&(Ae=B.x+P-ae.x+te.x),B.x-Ae-Q.x<0&&(Ae=B.x-Q.x),B.y+w+te.y>ae.y&&(He=B.y+w-ae.y+te.y),B.y-He-Q.y<0&&(He=B.y-Q.y),(Ae||He)&&(this.options.keepInView&&(this._autopanning=!0),v.fire("autopanstart").panBy([Ae,He]))}},_getAnchor:function(){return H(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),OW=function(v,x){return new gp(v,x)};ct.mergeOptions({closePopupOnClick:!0}),ct.include({openPopup:function(v,x,w){return this._initOverlay(gp,v,x,w).openOn(this),this},closePopup:function(v){return v=arguments.length?v:this._popup,v&&v.close(),this}}),yi.include({bindPopup:function(v,x){return this._popup=this._initOverlay(gp,this._popup,v,x),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(v){return this._popup&&(this instanceof Da||(this._popup._source=this),this._popup._prepareOpen(v||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(v){return this._popup&&this._popup.setContent(v),this},getPopup:function(){return this._popup},_openPopup:function(v){if(!(!this._popup||!this._map)){Os(v);var x=v.layer||v.target;if(this._popup._source===x&&!(x instanceof wo)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(v.latlng);return}this._popup._source=x,this.openPopup(v.latlng)}},_movePopup:function(v){this._popup.setLatLng(v.latlng)},_onKeyPress:function(v){v.originalEvent.keyCode===13&&this._openPopup(v)}});var mp=$i.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(v){$i.prototype.onAdd.call(this,v),this.setOpacity(this.options.opacity),v.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(v){$i.prototype.onRemove.call(this,v),v.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var v=$i.prototype.getEvents.call(this);return this.options.permanent||(v.preclick=this.close),v},_initLayout:function(){var v="leaflet-tooltip",x=v+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=vt("div",x),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(v){var x,w,P=this._map,N=this._container,B=P.latLngToContainerPoint(P.getCenter()),Z=P.layerPointToContainerPoint(v),Q=this.options.direction,te=N.offsetWidth,ae=N.offsetHeight,Ae=H(this.options.offset),He=this._getAnchor();Q==="top"?(x=te/2,w=ae):Q==="bottom"?(x=te/2,w=0):Q==="center"?(x=te/2,w=ae/2):Q==="right"?(x=0,w=ae/2):Q==="left"?(x=te,w=ae/2):Z.x<B.x?(Q="right",x=0,w=ae/2):(Q="left",x=te+(Ae.x+He.x)*2,w=ae/2),v=v.subtract(H(x,w,!0)).add(Ae).add(He),Zt(N,"leaflet-tooltip-right"),Zt(N,"leaflet-tooltip-left"),Zt(N,"leaflet-tooltip-top"),Zt(N,"leaflet-tooltip-bottom"),et(N,"leaflet-tooltip-"+Q),Qt(N,v)},_updatePosition:function(){var v=this._map.latLngToLayerPoint(this._latlng);this._setPosition(v)},setOpacity:function(v){this.options.opacity=v,this._container&&Fn(this._container,v)},_animateZoom:function(v){var x=this._map._latLngToNewLayerPoint(this._latlng,v.zoom,v.center);this._setPosition(x)},_getAnchor:function(){return H(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),zW=function(v,x){return new mp(v,x)};ct.include({openTooltip:function(v,x,w){return this._initOverlay(mp,v,x,w).openOn(this),this},closeTooltip:function(v){return v.close(),this}}),yi.include({bindTooltip:function(v,x){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(mp,this._tooltip,v,x),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(v){if(!(!v&&this._tooltipHandlersAdded)){var x=v?"off":"on",w={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?w.add=this._openTooltip:(w.mouseover=this._openTooltip,w.mouseout=this.closeTooltip,w.click=this._openTooltip,this._map?this._addFocusListeners():w.add=this._addFocusListeners),this._tooltip.options.sticky&&(w.mousemove=this._moveTooltip),this[x](w),this._tooltipHandlersAdded=!v}},openTooltip:function(v){return this._tooltip&&(this instanceof Da||(this._tooltip._source=this),this._tooltip._prepareOpen(v)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(v){return this._tooltip&&this._tooltip.setContent(v),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(v){var x=typeof v.getElement=="function"&&v.getElement();x&&(Ke(x,"focus",function(){this._tooltip._source=v,this.openTooltip()},this),Ke(x,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(v){var x=typeof v.getElement=="function"&&v.getElement();x&&x.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(v){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var x=this;this._map.once("moveend",function(){x._openOnceFlag=!1,x._openTooltip(v)});return}this._tooltip._source=v.layer||v.target,this.openTooltip(this._tooltip.options.sticky?v.latlng:void 0)}},_moveTooltip:function(v){var x=v.latlng,w,P;this._tooltip.options.sticky&&v.originalEvent&&(w=this._map.mouseEventToContainerPoint(v.originalEvent),P=this._map.containerPointToLayerPoint(w),x=this._map.layerPointToLatLng(P)),this._tooltip.setLatLng(x)}});var UL=wu.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(v){var x=v&&v.tagName==="DIV"?v:document.createElement("div"),w=this.options;if(w.html instanceof Element?(np(x),x.appendChild(w.html)):x.innerHTML=w.html!==!1?w.html:"",w.bgPos){var P=H(w.bgPos);x.style.backgroundPosition=-P.x+"px "+-P.y+"px"}return this._setIconStyles(x,"icon"),x},createShadow:function(){return null}});function BW(v){return new UL(v)}wu.Default=Wh;var Uh=yi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Re.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(v){g(this,v)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(v){v._addZoomLimit(this)},onRemove:function(v){this._removeAllTiles(),It(this._container),v._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(xu(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Su(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(v){return this.options.opacity=v,this._updateOpacity(),this},setZIndex:function(v){return this.options.zIndex=v,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var v=this._clampZoom(this._map.getZoom());v!==this._tileZoom&&(this._tileZoom=v,this._updateLevels()),this._update()}return this},getEvents:function(){var v={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=u(this._onMoveEnd,this.options.updateInterval,this)),v.move=this._onMove),this._zoomAnimated&&(v.zoomanim=this._animateZoom),v},createTile:function(){return document.createElement("div")},getTileSize:function(){var v=this.options.tileSize;return v instanceof j?v:new j(v,v)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(v){for(var x=this.getPane().children,w=-v(-1/0,1/0),P=0,N=x.length,B;P<N;P++)B=x[P].style.zIndex,x[P]!==this._container&&B&&(w=v(w,+B));isFinite(w)&&(this.options.zIndex=w+v(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Re.ielt9){Fn(this._container,this.options.opacity);var v=+new Date,x=!1,w=!1;for(var P in this._tiles){var N=this._tiles[P];if(!(!N.current||!N.loaded)){var B=Math.min(1,(v-N.loaded)/200);Fn(N.el,B),B<1?x=!0:(N.active?w=!0:this._onOpaqueTile(N),N.active=!0)}}w&&!this._noPrune&&this._pruneTiles(),x&&(z(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=vt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var v=this._tileZoom,x=this.options.maxZoom;if(v!==void 0){for(var w in this._levels)w=Number(w),this._levels[w].el.children.length||w===v?(this._levels[w].el.style.zIndex=x-Math.abs(v-w),this._onUpdateLevel(w)):(It(this._levels[w].el),this._removeTilesAtZoom(w),this._onRemoveLevel(w),delete this._levels[w]);var P=this._levels[v],N=this._map;return P||(P=this._levels[v]={},P.el=vt("div","leaflet-tile-container leaflet-zoom-animated",this._container),P.el.style.zIndex=x,P.origin=N.project(N.unproject(N.getPixelOrigin()),v).round(),P.zoom=v,this._setZoomTransform(P,N.getCenter(),N.getZoom()),h(P.el.offsetWidth),this._onCreateLevel(P)),this._level=P,P}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var v,x,w=this._map.getZoom();if(w>this.options.maxZoom||w<this.options.minZoom){this._removeAllTiles();return}for(v in this._tiles)x=this._tiles[v],x.retain=x.current;for(v in this._tiles)if(x=this._tiles[v],x.current&&!x.active){var P=x.coords;this._retainParent(P.x,P.y,P.z,P.z-5)||this._retainChildren(P.x,P.y,P.z,P.z+2)}for(v in this._tiles)this._tiles[v].retain||this._removeTile(v)}},_removeTilesAtZoom:function(v){for(var x in this._tiles)this._tiles[x].coords.z===v&&this._removeTile(x)},_removeAllTiles:function(){for(var v in this._tiles)this._removeTile(v)},_invalidateAll:function(){for(var v in this._levels)It(this._levels[v].el),this._onRemoveLevel(Number(v)),delete this._levels[v];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(v,x,w,P){var N=Math.floor(v/2),B=Math.floor(x/2),Z=w-1,Q=new j(+N,+B);Q.z=+Z;var te=this._tileCoordsToKey(Q),ae=this._tiles[te];return ae&&ae.active?(ae.retain=!0,!0):(ae&&ae.loaded&&(ae.retain=!0),Z>P?this._retainParent(N,B,Z,P):!1)},_retainChildren:function(v,x,w,P){for(var N=2*v;N<2*v+2;N++)for(var B=2*x;B<2*x+2;B++){var Z=new j(N,B);Z.z=w+1;var Q=this._tileCoordsToKey(Z),te=this._tiles[Q];if(te&&te.active){te.retain=!0;continue}else te&&te.loaded&&(te.retain=!0);w+1<P&&this._retainChildren(N,B,w+1,P)}},_resetView:function(v){var x=v&&(v.pinch||v.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),x,x)},_animateZoom:function(v){this._setView(v.center,v.zoom,!0,v.noUpdate)},_clampZoom:function(v){var x=this.options;return x.minNativeZoom!==void 0&&v<x.minNativeZoom?x.minNativeZoom:x.maxNativeZoom!==void 0&&x.maxNativeZoom<v?x.maxNativeZoom:v},_setView:function(v,x,w,P){var N=Math.round(x);this.options.maxZoom!==void 0&&N>this.options.maxZoom||this.options.minZoom!==void 0&&N<this.options.minZoom?N=void 0:N=this._clampZoom(N);var B=this.options.updateWhenZooming&&N!==this._tileZoom;(!P||B)&&(this._tileZoom=N,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),N!==void 0&&this._update(v),w||this._pruneTiles(),this._noPrune=!!w),this._setZoomTransforms(v,x)},_setZoomTransforms:function(v,x){for(var w in this._levels)this._setZoomTransform(this._levels[w],v,x)},_setZoomTransform:function(v,x,w){var P=this._map.getZoomScale(w,v.zoom),N=v.origin.multiplyBy(P).subtract(this._map._getNewPixelOrigin(x,w)).round();Re.any3d?Es(v.el,N,P):Qt(v.el,N)},_resetGrid:function(){var v=this._map,x=v.options.crs,w=this._tileSize=this.getTileSize(),P=this._tileZoom,N=this._map.getPixelWorldBounds(this._tileZoom);N&&(this._globalTileRange=this._pxBoundsToTileRange(N)),this._wrapX=x.wrapLng&&!this.options.noWrap&&[Math.floor(v.project([0,x.wrapLng[0]],P).x/w.x),Math.ceil(v.project([0,x.wrapLng[1]],P).x/w.y)],this._wrapY=x.wrapLat&&!this.options.noWrap&&[Math.floor(v.project([x.wrapLat[0],0],P).y/w.x),Math.ceil(v.project([x.wrapLat[1],0],P).y/w.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(v){var x=this._map,w=x._animatingZoom?Math.max(x._animateToZoom,x.getZoom()):x.getZoom(),P=x.getZoomScale(w,this._tileZoom),N=x.project(v,this._tileZoom).floor(),B=x.getSize().divideBy(P*2);return new X(N.subtract(B),N.add(B))},_update:function(v){var x=this._map;if(x){var w=this._clampZoom(x.getZoom());if(v===void 0&&(v=x.getCenter()),this._tileZoom!==void 0){var P=this._getTiledPixelBounds(v),N=this._pxBoundsToTileRange(P),B=N.getCenter(),Z=[],Q=this.options.keepBuffer,te=new X(N.getBottomLeft().subtract([Q,-Q]),N.getTopRight().add([Q,-Q]));if(!(isFinite(N.min.x)&&isFinite(N.min.y)&&isFinite(N.max.x)&&isFinite(N.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var ae in this._tiles){var Ae=this._tiles[ae].coords;(Ae.z!==this._tileZoom||!te.contains(new j(Ae.x,Ae.y)))&&(this._tiles[ae].current=!1)}if(Math.abs(w-this._tileZoom)>1){this._setView(v,w);return}for(var He=N.min.y;He<=N.max.y;He++)for(var nt=N.min.x;nt<=N.max.x;nt++){var Qr=new j(nt,He);if(Qr.z=this._tileZoom,!!this._isValidTile(Qr)){var mr=this._tiles[this._tileCoordsToKey(Qr)];mr?mr.current=!0:Z.push(Qr)}}if(Z.sort(function(hn,Au){return hn.distanceTo(B)-Au.distanceTo(B)}),Z.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Hn=document.createDocumentFragment();for(nt=0;nt<Z.length;nt++)this._addTile(Z[nt],Hn);this._level.el.appendChild(Hn)}}}},_isValidTile:function(v){var x=this._map.options.crs;if(!x.infinite){var w=this._globalTileRange;if(!x.wrapLng&&(v.x<w.min.x||v.x>w.max.x)||!x.wrapLat&&(v.y<w.min.y||v.y>w.max.y))return!1}if(!this.options.bounds)return!0;var P=this._tileCoordsToBounds(v);return ie(this.options.bounds).overlaps(P)},_keyToBounds:function(v){return this._tileCoordsToBounds(this._keyToTileCoords(v))},_tileCoordsToNwSe:function(v){var x=this._map,w=this.getTileSize(),P=v.scaleBy(w),N=P.add(w),B=x.unproject(P,v.z),Z=x.unproject(N,v.z);return[B,Z]},_tileCoordsToBounds:function(v){var x=this._tileCoordsToNwSe(v),w=new ne(x[0],x[1]);return this.options.noWrap||(w=this._map.wrapLatLngBounds(w)),w},_tileCoordsToKey:function(v){return v.x+":"+v.y+":"+v.z},_keyToTileCoords:function(v){var x=v.split(":"),w=new j(+x[0],+x[1]);return w.z=+x[2],w},_removeTile:function(v){var x=this._tiles[v];x&&(It(x.el),delete this._tiles[v],this.fire("tileunload",{tile:x.el,coords:this._keyToTileCoords(v)}))},_initTile:function(v){et(v,"leaflet-tile");var x=this.getTileSize();v.style.width=x.x+"px",v.style.height=x.y+"px",v.onselectstart=h,v.onmousemove=h,Re.ielt9&&this.options.opacity<1&&Fn(v,this.options.opacity)},_addTile:function(v,x){var w=this._getTilePos(v),P=this._tileCoordsToKey(v),N=this.createTile(this._wrapCoords(v),o(this._tileReady,this,v));this._initTile(N),this.createTile.length<2&&I(o(this._tileReady,this,v,null,N)),Qt(N,w),this._tiles[P]={el:N,coords:v,current:!0},x.appendChild(N),this.fire("tileloadstart",{tile:N,coords:v})},_tileReady:function(v,x,w){x&&this.fire("tileerror",{error:x,tile:w,coords:v});var P=this._tileCoordsToKey(v);w=this._tiles[P],w&&(w.loaded=+new Date,this._map._fadeAnimated?(Fn(w.el,0),z(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this)):(w.active=!0,this._pruneTiles()),x||(et(w.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:w.el,coords:v})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Re.ielt9||!this._map._fadeAnimated?I(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(v){return v.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(v){var x=new j(this._wrapX?c(v.x,this._wrapX):v.x,this._wrapY?c(v.y,this._wrapY):v.y);return x.z=v.z,x},_pxBoundsToTileRange:function(v){var x=this.getTileSize();return new X(v.min.unscaleBy(x).floor(),v.max.unscaleBy(x).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var v in this._tiles)if(!this._tiles[v].loaded)return!1;return!0}});function jW(v){return new Uh(v)}var Mu=Uh.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(v,x){this._url=v,x=g(this,x),x.detectRetina&&Re.retina&&x.maxZoom>0?(x.tileSize=Math.floor(x.tileSize/2),x.zoomReverse?(x.zoomOffset--,x.minZoom=Math.min(x.maxZoom,x.minZoom+1)):(x.zoomOffset++,x.maxZoom=Math.max(x.minZoom,x.maxZoom-1)),x.minZoom=Math.max(0,x.minZoom)):x.zoomReverse?x.minZoom=Math.min(x.maxZoom,x.minZoom):x.maxZoom=Math.max(x.minZoom,x.maxZoom),typeof x.subdomains=="string"&&(x.subdomains=x.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(v,x){return this._url===v&&x===void 0&&(x=!0),this._url=v,x||this.redraw(),this},createTile:function(v,x){var w=document.createElement("img");return Ke(w,"load",o(this._tileOnLoad,this,x,w)),Ke(w,"error",o(this._tileOnError,this,x,w)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(w.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(w.referrerPolicy=this.options.referrerPolicy),w.alt="",w.src=this.getTileUrl(v),w},getTileUrl:function(v){var x={r:Re.retina?"@2x":"",s:this._getSubdomain(v),x:v.x,y:v.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var w=this._globalTileRange.max.y-v.y;this.options.tms&&(x.y=w),x["-y"]=w}return _(this._url,i(x,this.options))},_tileOnLoad:function(v,x){Re.ielt9?setTimeout(o(v,this,null,x),0):v(null,x)},_tileOnError:function(v,x,w){var P=this.options.errorTileUrl;P&&x.getAttribute("src")!==P&&(x.src=P),v(w,x)},_onTileRemove:function(v){v.tile.onload=null},_getZoomForUrl:function(){var v=this._tileZoom,x=this.options.maxZoom,w=this.options.zoomReverse,P=this.options.zoomOffset;return w&&(v=x-v),v+P},_getSubdomain:function(v){var x=Math.abs(v.x+v.y)%this.options.subdomains.length;return this.options.subdomains[x]},_abortLoading:function(){var v,x;for(v in this._tiles)if(this._tiles[v].coords.z!==this._tileZoom&&(x=this._tiles[v].el,x.onload=h,x.onerror=h,!x.complete)){x.src=C;var w=this._tiles[v].coords;It(x),delete this._tiles[v],this.fire("tileabort",{tile:x,coords:w})}},_removeTile:function(v){var x=this._tiles[v];if(x)return x.el.setAttribute("src",C),Uh.prototype._removeTile.call(this,v)},_tileReady:function(v,x,w){if(!(!this._map||w&&w.getAttribute("src")===C))return Uh.prototype._tileReady.call(this,v,x,w)}});function ZL(v,x){return new Mu(v,x)}var $L=Mu.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(v,x){this._url=v;var w=i({},this.defaultWmsParams);for(var P in x)P in this.options||(w[P]=x[P]);x=g(this,x);var N=x.detectRetina&&Re.retina?2:1,B=this.getTileSize();w.width=B.x*N,w.height=B.y*N,this.wmsParams=w},onAdd:function(v){this._crs=this.options.crs||v.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var x=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[x]=this._crs.code,Mu.prototype.onAdd.call(this,v)},getTileUrl:function(v){var x=this._tileCoordsToNwSe(v),w=this._crs,P=K(w.project(x[0]),w.project(x[1])),N=P.min,B=P.max,Z=(this._wmsVersion>=1.3&&this._crs===jL?[N.y,N.x,B.y,B.x]:[N.x,N.y,B.x,B.y]).join(","),Q=Mu.prototype.getTileUrl.call(this,v);return Q+m(this.wmsParams,Q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Z},setParams:function(v,x){return i(this.wmsParams,v),x||this.redraw(),this}});function VW(v,x){return new $L(v,x)}Mu.WMS=$L,ZL.wms=VW;var Na=yi.extend({options:{padding:.1},initialize:function(v){g(this,v),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),et(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var v={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(v.zoomanim=this._onAnimZoom),v},_onAnimZoom:function(v){this._updateTransform(v.center,v.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(v,x){var w=this._map.getZoomScale(x,this._zoom),P=this._map.getSize().multiplyBy(.5+this.options.padding),N=this._map.project(this._center,x),B=P.multiplyBy(-w).add(N).subtract(this._map._getNewPixelOrigin(v,x));Re.any3d?Es(this._container,B,w):Qt(this._container,B)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var v in this._layers)this._layers[v]._reset()},_onZoomEnd:function(){for(var v in this._layers)this._layers[v]._project()},_updatePaths:function(){for(var v in this._layers)this._layers[v]._update()},_update:function(){var v=this.options.padding,x=this._map.getSize(),w=this._map.containerPointToLayerPoint(x.multiplyBy(-v)).round();this._bounds=new X(w,w.add(x.multiplyBy(1+v*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),YL=Na.extend({options:{tolerance:0},getEvents:function(){var v=Na.prototype.getEvents.call(this);return v.viewprereset=this._onViewPreReset,v},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Na.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var v=this._container=document.createElement("canvas");Ke(v,"mousemove",this._onMouseMove,this),Ke(v,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ke(v,"mouseout",this._handleMouseOut,this),v._leaflet_disable_events=!0,this._ctx=v.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,It(this._container),Tt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var v;this._redrawBounds=null;for(var x in this._layers)v=this._layers[x],v._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Na.prototype._update.call(this);var v=this._bounds,x=this._container,w=v.getSize(),P=Re.retina?2:1;Qt(x,v.min),x.width=P*w.x,x.height=P*w.y,x.style.width=w.x+"px",x.style.height=w.y+"px",Re.retina&&this._ctx.scale(2,2),this._ctx.translate(-v.min.x,-v.min.y),this.fire("update")}},_reset:function(){Na.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(v){this._updateDashArray(v),this._layers[l(v)]=v;var x=v._order={layer:v,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=x),this._drawLast=x,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(v){this._requestRedraw(v)},_removePath:function(v){var x=v._order,w=x.next,P=x.prev;w?w.prev=P:this._drawLast=P,P?P.next=w:this._drawFirst=w,delete v._order,delete this._layers[l(v)],this._requestRedraw(v)},_updatePath:function(v){this._extendRedrawBounds(v),v._project(),v._update(),this._requestRedraw(v)},_updateStyle:function(v){this._updateDashArray(v),this._requestRedraw(v)},_updateDashArray:function(v){if(typeof v.options.dashArray=="string"){var x=v.options.dashArray.split(/[, ]+/),w=[],P,N;for(N=0;N<x.length;N++){if(P=Number(x[N]),isNaN(P))return;w.push(P)}v.options._dashArray=w}else v.options._dashArray=v.options.dashArray},_requestRedraw:function(v){this._map&&(this._extendRedrawBounds(v),this._redrawRequest=this._redrawRequest||I(this._redraw,this))},_extendRedrawBounds:function(v){if(v._pxBounds){var x=(v.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new X,this._redrawBounds.extend(v._pxBounds.min.subtract([x,x])),this._redrawBounds.extend(v._pxBounds.max.add([x,x]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var v=this._redrawBounds;if(v){var x=v.getSize();this._ctx.clearRect(v.min.x,v.min.y,x.x,x.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var v,x=this._redrawBounds;if(this._ctx.save(),x){var w=x.getSize();this._ctx.beginPath(),this._ctx.rect(x.min.x,x.min.y,w.x,w.y),this._ctx.clip()}this._drawing=!0;for(var P=this._drawFirst;P;P=P.next)v=P.layer,(!x||v._pxBounds&&v._pxBounds.intersects(x))&&v._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(v,x){if(this._drawing){var w,P,N,B,Z=v._parts,Q=Z.length,te=this._ctx;if(Q){for(te.beginPath(),w=0;w<Q;w++){for(P=0,N=Z[w].length;P<N;P++)B=Z[w][P],te[P?"lineTo":"moveTo"](B.x,B.y);x&&te.closePath()}this._fillStroke(te,v)}}},_updateCircle:function(v){if(!(!this._drawing||v._empty())){var x=v._point,w=this._ctx,P=Math.max(Math.round(v._radius),1),N=(Math.max(Math.round(v._radiusY),1)||P)/P;N!==1&&(w.save(),w.scale(1,N)),w.beginPath(),w.arc(x.x,x.y/N,P,0,Math.PI*2,!1),N!==1&&w.restore(),this._fillStroke(w,v)}},_fillStroke:function(v,x){var w=x.options;w.fill&&(v.globalAlpha=w.fillOpacity,v.fillStyle=w.fillColor||w.color,v.fill(w.fillRule||"evenodd")),w.stroke&&w.weight!==0&&(v.setLineDash&&v.setLineDash(x.options&&x.options._dashArray||[]),v.globalAlpha=w.opacity,v.lineWidth=w.weight,v.strokeStyle=w.color,v.lineCap=w.lineCap,v.lineJoin=w.lineJoin,v.stroke())},_onClick:function(v){for(var x=this._map.mouseEventToLayerPoint(v),w,P,N=this._drawFirst;N;N=N.next)w=N.layer,w.options.interactive&&w._containsPoint(x)&&(!(v.type==="click"||v.type==="preclick")||!this._map._draggableMoved(w))&&(P=w);this._fireEvent(P?[P]:!1,v)},_onMouseMove:function(v){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var x=this._map.mouseEventToLayerPoint(v);this._handleMouseHover(v,x)}},_handleMouseOut:function(v){var x=this._hoveredLayer;x&&(Zt(this._container,"leaflet-interactive"),this._fireEvent([x],v,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(v,x){if(!this._mouseHoverThrottled){for(var w,P,N=this._drawFirst;N;N=N.next)w=N.layer,w.options.interactive&&w._containsPoint(x)&&(P=w);P!==this._hoveredLayer&&(this._handleMouseOut(v),P&&(et(this._container,"leaflet-interactive"),this._fireEvent([P],v,"mouseover"),this._hoveredLayer=P)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,v),this._mouseHoverThrottled=!0,setTimeout(o(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(v,x,w){this._map._fireDOMEvent(x,w||x.type,v)},_bringToFront:function(v){var x=v._order;if(x){var w=x.next,P=x.prev;if(w)w.prev=P;else return;P?P.next=w:w&&(this._drawFirst=w),x.prev=this._drawLast,this._drawLast.next=x,x.next=null,this._drawLast=x,this._requestRedraw(v)}},_bringToBack:function(v){var x=v._order;if(x){var w=x.next,P=x.prev;if(P)P.next=w;else return;w?w.prev=P:P&&(this._drawLast=P),x.prev=null,x.next=this._drawFirst,this._drawFirst.prev=x,this._drawFirst=x,this._requestRedraw(v)}}});function XL(v){return Re.canvas?new YL(v):null}var Zh=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(v){return document.createElement("<lvml:"+v+' class="lvml">')}}catch{}return function(v){return document.createElement("<"+v+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),FW={_initContainer:function(){this._container=vt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Na.prototype._update.call(this),this.fire("update"))},_initPath:function(v){var x=v._container=Zh("shape");et(x,"leaflet-vml-shape "+(this.options.className||"")),x.coordsize="1 1",v._path=Zh("path"),x.appendChild(v._path),this._updateStyle(v),this._layers[l(v)]=v},_addPath:function(v){var x=v._container;this._container.appendChild(x),v.options.interactive&&v.addInteractiveTarget(x)},_removePath:function(v){var x=v._container;It(x),v.removeInteractiveTarget(x),delete this._layers[l(v)]},_updateStyle:function(v){var x=v._stroke,w=v._fill,P=v.options,N=v._container;N.stroked=!!P.stroke,N.filled=!!P.fill,P.stroke?(x||(x=v._stroke=Zh("stroke")),N.appendChild(x),x.weight=P.weight+"px",x.color=P.color,x.opacity=P.opacity,P.dashArray?x.dashStyle=S(P.dashArray)?P.dashArray.join(" "):P.dashArray.replace(/( *, *)/g," "):x.dashStyle="",x.endcap=P.lineCap.replace("butt","flat"),x.joinstyle=P.lineJoin):x&&(N.removeChild(x),v._stroke=null),P.fill?(w||(w=v._fill=Zh("fill")),N.appendChild(w),w.color=P.fillColor||P.color,w.opacity=P.fillOpacity):w&&(N.removeChild(w),v._fill=null)},_updateCircle:function(v){var x=v._point.round(),w=Math.round(v._radius),P=Math.round(v._radiusY||w);this._setPath(v,v._empty()?"M0 0":"AL "+x.x+","+x.y+" "+w+","+P+" 0,"+65535*360)},_setPath:function(v,x){v._path.v=x},_bringToFront:function(v){xu(v._container)},_bringToBack:function(v){Su(v._container)}},yp=Re.vml?Zh:rt,$h=Na.extend({_initContainer:function(){this._container=yp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=yp("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){It(this._container),Tt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Na.prototype._update.call(this);var v=this._bounds,x=v.getSize(),w=this._container;(!this._svgSize||!this._svgSize.equals(x))&&(this._svgSize=x,w.setAttribute("width",x.x),w.setAttribute("height",x.y)),Qt(w,v.min),w.setAttribute("viewBox",[v.min.x,v.min.y,x.x,x.y].join(" ")),this.fire("update")}},_initPath:function(v){var x=v._path=yp("path");v.options.className&&et(x,v.options.className),v.options.interactive&&et(x,"leaflet-interactive"),this._updateStyle(v),this._layers[l(v)]=v},_addPath:function(v){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(v._path),v.addInteractiveTarget(v._path)},_removePath:function(v){It(v._path),v.removeInteractiveTarget(v._path),delete this._layers[l(v)]},_updatePath:function(v){v._project(),v._update()},_updateStyle:function(v){var x=v._path,w=v.options;x&&(w.stroke?(x.setAttribute("stroke",w.color),x.setAttribute("stroke-opacity",w.opacity),x.setAttribute("stroke-width",w.weight),x.setAttribute("stroke-linecap",w.lineCap),x.setAttribute("stroke-linejoin",w.lineJoin),w.dashArray?x.setAttribute("stroke-dasharray",w.dashArray):x.removeAttribute("stroke-dasharray"),w.dashOffset?x.setAttribute("stroke-dashoffset",w.dashOffset):x.removeAttribute("stroke-dashoffset")):x.setAttribute("stroke","none"),w.fill?(x.setAttribute("fill",w.fillColor||w.color),x.setAttribute("fill-opacity",w.fillOpacity),x.setAttribute("fill-rule",w.fillRule||"evenodd")):x.setAttribute("fill","none"))},_updatePoly:function(v,x){this._setPath(v,ut(v._parts,x))},_updateCircle:function(v){var x=v._point,w=Math.max(Math.round(v._radius),1),P=Math.max(Math.round(v._radiusY),1)||w,N="a"+w+","+P+" 0 1,0 ",B=v._empty()?"M0 0":"M"+(x.x-w)+","+x.y+N+w*2+",0 "+N+-w*2+",0 ";this._setPath(v,B)},_setPath:function(v,x){v._path.setAttribute("d",x)},_bringToFront:function(v){xu(v._path)},_bringToBack:function(v){Su(v._path)}});Re.vml&&$h.include(FW);function qL(v){return Re.svg||Re.vml?new $h(v):null}ct.include({getRenderer:function(v){var x=v.options.renderer||this._getPaneRenderer(v.options.pane)||this.options.renderer||this._renderer;return x||(x=this._renderer=this._createRenderer()),this.hasLayer(x)||this.addLayer(x),x},_getPaneRenderer:function(v){if(v==="overlayPane"||v===void 0)return!1;var x=this._paneRenderers[v];return x===void 0&&(x=this._createRenderer({pane:v}),this._paneRenderers[v]=x),x},_createRenderer:function(v){return this.options.preferCanvas&&XL(v)||qL(v)}});var KL=Tu.extend({initialize:function(v,x){Tu.prototype.initialize.call(this,this._boundsToLatLngs(v),x)},setBounds:function(v){return this.setLatLngs(this._boundsToLatLngs(v))},_boundsToLatLngs:function(v){return v=ie(v),[v.getSouthWest(),v.getNorthWest(),v.getNorthEast(),v.getSouthEast()]}});function GW(v,x){return new KL(v,x)}$h.create=yp,$h.pointsToPath=ut,Ea.geometryToLayer=hp,Ea.coordsToLatLng=q_,Ea.coordsToLatLngs=fp,Ea.latLngToCoords=K_,Ea.latLngsToCoords=dp,Ea.getFeature=Cu,Ea.asFeature=vp,ct.mergeOptions({boxZoom:!0});var QL=Zi.extend({initialize:function(v){this._map=v,this._container=v._container,this._pane=v._panes.overlayPane,this._resetStateTimeout=0,v.on("unload",this._destroy,this)},addHooks:function(){Ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Tt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){It(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(v){if(!v.shiftKey||v.which!==1&&v.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Bh(),E_(),this._startPoint=this._map.mouseEventToContainerPoint(v),Ke(document,{contextmenu:Os,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(v){this._moved||(this._moved=!0,this._box=vt("div","leaflet-zoom-box",this._container),et(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(v);var x=new X(this._point,this._startPoint),w=x.getSize();Qt(this._box,x.min),this._box.style.width=w.x+"px",this._box.style.height=w.y+"px"},_finish:function(){this._moved&&(It(this._box),Zt(this._container,"leaflet-crosshair")),jh(),N_(),Tt(document,{contextmenu:Os,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(v){if(!(v.which!==1&&v.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var x=new ne(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(x).fire("boxzoomend",{boxZoomBounds:x})}},_onKeyDown:function(v){v.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ct.addInitHook("addHandler","boxZoom",QL),ct.mergeOptions({doubleClickZoom:!0});var JL=Zi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(v){var x=this._map,w=x.getZoom(),P=x.options.zoomDelta,N=v.originalEvent.shiftKey?w-P:w+P;x.options.doubleClickZoom==="center"?x.setZoom(N):x.setZoomAround(v.containerPoint,N)}});ct.addInitHook("addHandler","doubleClickZoom",JL),ct.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var eP=Zi.extend({addHooks:function(){if(!this._draggable){var v=this._map;this._draggable=new bo(v._mapPane,v._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),v.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),v.on("zoomend",this._onZoomEnd,this),v.whenReady(this._onZoomEnd,this))}et(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Zt(this._map._container,"leaflet-grab"),Zt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var v=this._map;if(v._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var x=ie(this._map.options.maxBounds);this._offsetLimit=K(this._map.latLngToContainerPoint(x.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(x.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;v.fire("movestart").fire("dragstart"),v.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(v){if(this._map.options.inertia){var x=this._lastTime=+new Date,w=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(w),this._times.push(x),this._prunePositions(x)}this._map.fire("move",v).fire("drag",v)},_prunePositions:function(v){for(;this._positions.length>1&&v-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var v=this._map.getSize().divideBy(2),x=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=x.subtract(v).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(v,x){return v-(v-x)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var v=this._draggable._newPos.subtract(this._draggable._startPos),x=this._offsetLimit;v.x<x.min.x&&(v.x=this._viscousLimit(v.x,x.min.x)),v.y<x.min.y&&(v.y=this._viscousLimit(v.y,x.min.y)),v.x>x.max.x&&(v.x=this._viscousLimit(v.x,x.max.x)),v.y>x.max.y&&(v.y=this._viscousLimit(v.y,x.max.y)),this._draggable._newPos=this._draggable._startPos.add(v)}},_onPreDragWrap:function(){var v=this._worldWidth,x=Math.round(v/2),w=this._initialWorldOffset,P=this._draggable._newPos.x,N=(P-x+w)%v+x-w,B=(P+x+w)%v-x-w,Z=Math.abs(N+w)<Math.abs(B+w)?N:B;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=Z},_onDragEnd:function(v){var x=this._map,w=x.options,P=!w.inertia||v.noInertia||this._times.length<2;if(x.fire("dragend",v),P)x.fire("moveend");else{this._prunePositions(+new Date);var N=this._lastPos.subtract(this._positions[0]),B=(this._lastTime-this._times[0])/1e3,Z=w.easeLinearity,Q=N.multiplyBy(Z/B),te=Q.distanceTo([0,0]),ae=Math.min(w.inertiaMaxSpeed,te),Ae=Q.multiplyBy(ae/te),He=ae/(w.inertiaDeceleration*Z),nt=Ae.multiplyBy(-He/2).round();!nt.x&&!nt.y?x.fire("moveend"):(nt=x._limitOffset(nt,x.options.maxBounds),I(function(){x.panBy(nt,{duration:He,easeLinearity:Z,noMoveStart:!0,animate:!0})}))}}});ct.addInitHook("addHandler","dragging",eP),ct.mergeOptions({keyboard:!0,keyboardPanDelta:80});var tP=Zi.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(v){this._map=v,this._setPanDelta(v.options.keyboardPanDelta),this._setZoomDelta(v.options.zoomDelta)},addHooks:function(){var v=this._map._container;v.tabIndex<=0&&(v.tabIndex="0"),Ke(v,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Tt(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var v=document.body,x=document.documentElement,w=v.scrollTop||x.scrollTop,P=v.scrollLeft||x.scrollLeft;this._map._container.focus(),window.scrollTo(P,w)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(v){var x=this._panKeys={},w=this.keyCodes,P,N;for(P=0,N=w.left.length;P<N;P++)x[w.left[P]]=[-1*v,0];for(P=0,N=w.right.length;P<N;P++)x[w.right[P]]=[v,0];for(P=0,N=w.down.length;P<N;P++)x[w.down[P]]=[0,v];for(P=0,N=w.up.length;P<N;P++)x[w.up[P]]=[0,-1*v]},_setZoomDelta:function(v){var x=this._zoomKeys={},w=this.keyCodes,P,N;for(P=0,N=w.zoomIn.length;P<N;P++)x[w.zoomIn[P]]=v;for(P=0,N=w.zoomOut.length;P<N;P++)x[w.zoomOut[P]]=-v},_addHooks:function(){Ke(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Tt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(v){if(!(v.altKey||v.ctrlKey||v.metaKey)){var x=v.keyCode,w=this._map,P;if(x in this._panKeys){if(!w._panAnim||!w._panAnim._inProgress)if(P=this._panKeys[x],v.shiftKey&&(P=H(P).multiplyBy(3)),w.options.maxBounds&&(P=w._limitOffset(H(P),w.options.maxBounds)),w.options.worldCopyJump){var N=w.wrapLatLng(w.unproject(w.project(w.getCenter()).add(P)));w.panTo(N)}else w.panBy(P)}else if(x in this._zoomKeys)w.setZoom(w.getZoom()+(v.shiftKey?3:1)*this._zoomKeys[x]);else if(x===27&&w._popup&&w._popup.options.closeOnEscapeKey)w.closePopup();else return;Os(v)}}});ct.addInitHook("addHandler","keyboard",tP),ct.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var rP=Zi.extend({addHooks:function(){Ke(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Tt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(v){var x=ML(v),w=this._map.options.wheelDebounceTime;this._delta+=x,this._lastMousePos=this._map.mouseEventToContainerPoint(v),this._startTime||(this._startTime=+new Date);var P=Math.max(w-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),P),Os(v)},_performZoom:function(){var v=this._map,x=v.getZoom(),w=this._map.options.zoomSnap||0;v._stop();var P=this._delta/(this._map.options.wheelPxPerZoomLevel*4),N=4*Math.log(2/(1+Math.exp(-Math.abs(P))))/Math.LN2,B=w?Math.ceil(N/w)*w:N,Z=v._limitZoom(x+(this._delta>0?B:-B))-x;this._delta=0,this._startTime=null,Z&&(v.options.scrollWheelZoom==="center"?v.setZoom(x+Z):v.setZoomAround(this._lastMousePos,x+Z))}});ct.addInitHook("addHandler","scrollWheelZoom",rP);var HW=600;ct.mergeOptions({tapHold:Re.touchNative&&Re.safari&&Re.mobile,tapTolerance:15});var nP=Zi.extend({addHooks:function(){Ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Tt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(v){if(clearTimeout(this._holdTimeout),v.touches.length===1){var x=v.touches[0];this._startPos=this._newPos=new j(x.clientX,x.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(Ke(document,"touchend",Mr),Ke(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",x))},this),HW),Ke(document,"touchend touchcancel contextmenu",this._cancel,this),Ke(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function v(){Tt(document,"touchend",Mr),Tt(document,"touchend touchcancel",v)},_cancel:function(){clearTimeout(this._holdTimeout),Tt(document,"touchend touchcancel contextmenu",this._cancel,this),Tt(document,"touchmove",this._onMove,this)},_onMove:function(v){var x=v.touches[0];this._newPos=new j(x.clientX,x.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(v,x){var w=new MouseEvent(v,{bubbles:!0,cancelable:!0,view:window,screenX:x.screenX,screenY:x.screenY,clientX:x.clientX,clientY:x.clientY});w._simulated=!0,x.target.dispatchEvent(w)}});ct.addInitHook("addHandler","tapHold",nP),ct.mergeOptions({touchZoom:Re.touch,bounceAtZoomLimits:!0});var iP=Zi.extend({addHooks:function(){et(this._map._container,"leaflet-touch-zoom"),Ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Zt(this._map._container,"leaflet-touch-zoom"),Tt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(v){var x=this._map;if(!(!v.touches||v.touches.length!==2||x._animatingZoom||this._zooming)){var w=x.mouseEventToContainerPoint(v.touches[0]),P=x.mouseEventToContainerPoint(v.touches[1]);this._centerPoint=x.getSize()._divideBy(2),this._startLatLng=x.containerPointToLatLng(this._centerPoint),x.options.touchZoom!=="center"&&(this._pinchStartLatLng=x.containerPointToLatLng(w.add(P)._divideBy(2))),this._startDist=w.distanceTo(P),this._startZoom=x.getZoom(),this._moved=!1,this._zooming=!0,x._stop(),Ke(document,"touchmove",this._onTouchMove,this),Ke(document,"touchend touchcancel",this._onTouchEnd,this),Mr(v)}},_onTouchMove:function(v){if(!(!v.touches||v.touches.length!==2||!this._zooming)){var x=this._map,w=x.mouseEventToContainerPoint(v.touches[0]),P=x.mouseEventToContainerPoint(v.touches[1]),N=w.distanceTo(P)/this._startDist;if(this._zoom=x.getScaleZoom(N,this._startZoom),!x.options.bounceAtZoomLimits&&(this._zoom<x.getMinZoom()&&N<1||this._zoom>x.getMaxZoom()&&N>1)&&(this._zoom=x._limitZoom(this._zoom)),x.options.touchZoom==="center"){if(this._center=this._startLatLng,N===1)return}else{var B=w._add(P)._divideBy(2)._subtract(this._centerPoint);if(N===1&&B.x===0&&B.y===0)return;this._center=x.unproject(x.project(this._pinchStartLatLng,this._zoom).subtract(B),this._zoom)}this._moved||(x._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var Z=o(x._move,x,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=I(Z,this,!0),Mr(v)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,z(this._animRequest),Tt(document,"touchmove",this._onTouchMove,this),Tt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ct.addInitHook("addHandler","touchZoom",iP),ct.BoxZoom=QL,ct.DoubleClickZoom=JL,ct.Drag=eP,ct.Keyboard=tP,ct.ScrollWheelZoom=rP,ct.TapHold=nP,ct.TouchZoom=iP,r.Bounds=X,r.Browser=Re,r.CRS=Ge,r.Canvas=YL,r.Circle=X_,r.CircleMarker=cp,r.Class=V,r.Control=mi,r.DivIcon=UL,r.DivOverlay=$i,r.DomEvent=sW,r.DomUtil=aW,r.Draggable=bo,r.Evented=U,r.FeatureGroup=Da,r.GeoJSON=Ea,r.GridLayer=Uh,r.Handler=Zi,r.Icon=wu,r.ImageOverlay=pp,r.LatLng=ue,r.LatLngBounds=ne,r.Layer=yi,r.LayerGroup=bu,r.LineUtil=xW,r.Map=ct,r.Marker=up,r.Mixin=vW,r.Path=wo,r.Point=j,r.PolyUtil=pW,r.Polygon=Tu,r.Polyline=Ia,r.Popup=gp,r.PosAnimation=AL,r.Projection=SW,r.Rectangle=KL,r.Renderer=Na,r.SVG=$h,r.SVGOverlay=WL,r.TileLayer=Mu,r.Tooltip=mp,r.Transformation=fe,r.Util=O,r.VideoOverlay=HL,r.bind=o,r.bounds=K,r.canvas=XL,r.circle=PW,r.circleMarker=LW,r.control=Gh,r.divIcon=BW,r.extend=i,r.featureGroup=CW,r.geoJSON=GL,r.geoJson=IW,r.gridLayer=jW,r.icon=MW,r.imageOverlay=EW,r.latLng=ve,r.latLngBounds=ie,r.layerGroup=TW,r.map=lW,r.marker=AW,r.point=H,r.polygon=DW,r.polyline=kW,r.popup=OW,r.rectangle=GW,r.setOptions=g,r.stamp=l,r.svg=qL,r.svgOverlay=RW,r.tileLayer=ZL,r.tooltip=zW,r.transformation=Me,r.version=n,r.videoOverlay=NW;var WW=window.L;r.noConflict=function(){return window.L=WW,this},window.L=r})})(hC,hC.exports);var mu=hC.exports;const C8=dC(mu);function tp(t,e,r){return Object.freeze({instance:t,context:e,container:r})}function rL(t,e){return e==null?function(n,i){const a=$.useRef();return a.current||(a.current=t(n,i)),a}:function(n,i){const a=$.useRef();a.current||(a.current=t(n,i));const o=$.useRef(n),{instance:s}=a.current;return $.useEffect(function(){o.current!==n&&(e(s,n,o.current),o.current=n)},[s,n,i]),a}}function M8(t,e){$.useEffect(function(){return(e.layerContainer??e.map).addLayer(t.instance),function(){var a;(a=e.layerContainer)==null||a.removeLayer(t.instance),e.map.removeLayer(t.instance)}},[e,t])}function vye(t){return function(r){const n=w_(),i=t(T_(r,n),n);return S8(n.map,r.attribution),tL(i.current,r.eventHandlers),M8(i.current,n),i}}function pye(t,e){const r=$.useRef();$.useEffect(function(){if(e.pathOptions!==r.current){const i=e.pathOptions??{};t.instance.setStyle(i),r.current=i}},[t,e])}function gye(t){return function(r){const n=w_(),i=t(T_(r,n),n);return tL(i.current,r.eventHandlers),M8(i.current,n),pye(i.current,r),i}}function A8(t,e){const r=rL(t),n=dye(r,e);return hye(n)}function L8(t,e){const r=rL(t,e),n=gye(r);return cye(n)}function mye(t,e){const r=rL(t,e),n=vye(r);return fye(n)}function yye(t,e,r){const{opacity:n,zIndex:i}=e;n!=null&&n!==r.opacity&&t.setOpacity(n),i!=null&&i!==r.zIndex&&t.setZIndex(i)}function _ye(){return w_().map}const xye=L8(function({center:e,children:r,...n},i){const a=new mu.CircleMarker(e,n);return tp(a,b8(i,{overlayContainer:a}))},sye);function fC(){return fC=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},fC.apply(this,arguments)}function Sye({bounds:t,boundsOptions:e,center:r,children:n,className:i,id:a,placeholder:o,style:s,whenReady:l,zoom:u,...c},h){const[f]=$.useState({className:i,id:a,style:s}),[d,p]=$.useState(null);$.useImperativeHandle(h,()=>(d==null?void 0:d.map)??null,[d]);const g=$.useCallback(y=>{if(y!==null&&d===null){const _=new mu.Map(y,c);r!=null&&u!=null?_.setView(r,u):t!=null&&_.fitBounds(t,e),l!=null&&_.whenReady(l),p(uye(_))}},[]);$.useEffect(()=>()=>{d==null||d.map.remove()},[d]);const m=d?Bc.createElement(T8,{value:d},n):o??null;return Bc.createElement("div",fC({},f,{ref:g}),m)}const bye=$.forwardRef(Sye),wye=L8(function({positions:e,...r},n){const i=new mu.Polyline(e,r);return tp(i,b8(n,{overlayContainer:i}))},function(e,r,n){r.positions!==n.positions&&e.setLatLngs(r.positions)}),Tye=A8(function(e,r){const n=new mu.Popup(e,r.overlayContainer);return tp(n,r)},function(e,r,{position:n},i){$.useEffect(function(){const{instance:o}=e;function s(u){u.popup===o&&(o.update(),i(!0))}function l(u){u.popup===o&&i(!1)}return r.map.on({popupopen:s,popupclose:l}),r.overlayContainer==null?(n!=null&&o.setLatLng(n),o.openOn(r.map)):r.overlayContainer.bindPopup(o),function(){var c;r.map.off({popupopen:s,popupclose:l}),(c=r.overlayContainer)==null||c.unbindPopup(),r.map.removeLayer(o)}},[e,r,i,n])}),Cye=mye(function({url:e,...r},n){const i=new mu.TileLayer(e,T_(r,n));return tp(i,n)},function(e,r,n){yye(e,r,n);const{url:i}=r;i!=null&&i!==n.url&&e.setUrl(i)}),Mye=A8(function(e,r){const n=new mu.Tooltip(e,r.overlayContainer);return tp(n,r)},function(e,r,{position:n},i){$.useEffect(function(){const o=r.overlayContainer;if(o==null)return;const{instance:s}=e,l=c=>{c.tooltip===s&&(n!=null&&s.setLatLng(n),s.update(),i(!0))},u=c=>{c.tooltip===s&&i(!1)};return o.on({tooltipopen:l,tooltipclose:u}),o.bindTooltip(s),function(){o.off({tooltipopen:l,tooltipclose:u}),o._map!=null&&o.unbindTooltip()}},[e,r,i,n])}),Aye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",Lye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Pye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";delete C8.Icon.Default.prototype._getIconUrl;C8.Icon.Default.mergeOptions({iconUrl:Aye,iconRetinaUrl:Lye,shadowUrl:Pye});const cz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],kye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Dye(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function Iye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function Eye(t){if(!t)return"Unknown";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Nye({bounds:t}){const e=_ye();return $.useEffect(()=>{t&&e.fitBounds(t,{padding:[50,50]})},[e,t]),null}function Rye({node:t}){const e=t.latitude!==null&&t.longitude!==null,r=t.battery_level!==null?t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`:"Unknown";return b.jsxs("div",{className:"min-w-[200px]",children:[b.jsx("div",{className:"font-semibold text-slate-800",children:t.short_name}),b.jsx("div",{className:"text-xs text-slate-600 mb-2",children:t.long_name}),b.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[b.jsx("div",{className:"text-slate-500",children:"Role"}),b.jsx("div",{className:"text-slate-700 font-medium",children:t.role}),b.jsx("div",{className:"text-slate-500",children:"Hardware"}),b.jsx("div",{className:"text-slate-700",children:t.hardware||"Unknown"}),b.jsx("div",{className:"text-slate-500",children:"Battery"}),b.jsx("div",{className:"text-slate-700",children:r}),b.jsx("div",{className:"text-slate-500",children:"Last Heard"}),b.jsx("div",{className:"text-slate-700",children:Eye(t.last_heard)})]}),e&&b.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-200 flex gap-2",children:[b.jsxs("a",{href:`https://www.google.com/maps?q=${t.latitude},${t.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[b.jsx(Zd,{size:10}),"Google Maps"]}),b.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[b.jsx(Zd,{size:10}),"OSM"]})]})]})}function Oye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=$.useMemo(()=>t.filter(h=>h.latitude!==null&&h.longitude!==null),[t]),a=t.length-i.length,o=$.useMemo(()=>new Map(i.map(h=>[h.node_num,h])),[i]),s=$.useMemo(()=>e.filter(h=>o.has(h.from_node)&&o.has(h.to_node)),[e,o]),l=$.useMemo(()=>{if(i.length===0)return null;const h=i.map(d=>d.latitude),f=i.map(d=>d.longitude);return[[Math.min(...h),Math.min(...f)],[Math.max(...h),Math.max(...f)]]},[i]),u=[43.6,-114.4],c=$.useMemo(()=>{const h=new Set;return r!==null&&e.forEach(f=>{f.from_node===r&&h.add(f.to_node),f.to_node===r&&h.add(f.from_node)}),h},[r,e]);return b.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[b.jsxs(bye,{center:u,zoom:7,style:{width:"100%",height:"540px"},className:"z-0",children:[b.jsx(Cye,{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>, © <a href="https://carto.com/attributions">CARTO</a>'}),b.jsx(Nye,{bounds:l}),s.map((h,f)=>{const d=o.get(h.from_node),p=o.get(h.to_node),g=r===null||h.from_node===r||h.to_node===r;return b.jsx(wye,{positions:[[d.latitude,d.longitude],[p.latitude,p.longitude]],color:Dye(h.snr),weight:g&&r!==null?2.5:1.5,opacity:r===null?.3:g?.6:.08},f)}),i.map(h=>{const f=h.node_num===r,d=c.has(h.node_num),p=r===null||f||d,g=kye.includes(h.role),m=Iye(h.latitude),y=cz[m%cz.length];return b.jsxs(xye,{center:[h.latitude,h.longitude],radius:g?8:5,fillColor:g?y:"#111827",fillOpacity:p?.9:.2,stroke:!0,color:f?"#ffffff":y,weight:f?3:g?0:2,opacity:p?1:.3,eventHandlers:{click:()=>n(f?null:h.node_num)},children:[b.jsx(Mye,{direction:"top",offset:[0,-8],children:b.jsx("span",{className:"font-mono text-xs",children:h.short_name})}),b.jsx(Tye,{children:b.jsx(Rye,{node:h})})]},h.node_num)})]}),b.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2 text-xs text-slate-400 flex items-center gap-2",children:[b.jsx($3,{size:12}),b.jsxs("span",{children:["Showing ",i.length," of ",t.length," nodes",a>0&&b.jsxs("span",{className:"text-slate-500",children:[" (",a," without coordinates)"]})]})]})]})}const hz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],zye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function fz(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function Bye(t){return t>12?"excellent":t>8?"good":t>5?"fair":t>3?"marginal":"poor"}function jye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function Vye(t){return["Northern ID","Central ID","SW Idaho","SC Idaho"][t]||"Unknown"}function Fye(t){if(!t)return"Unknown";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Gye(t){if(!t)return"bg-slate-500";const e=new Date(t),n=(new Date().getTime()-e.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function Hye({node:t,edges:e,nodes:r,onSelectNode:n}){const i=$.useMemo(()=>{if(!t)return[];const h=new Map(r.map(d=>[d.node_num,d])),f=[];return e.forEach(d=>{if(d.from_node===t.node_num){const p=h.get(d.to_node);p&&f.push({node:p,snr:d.snr,quality:d.quality})}else if(d.to_node===t.node_num){const p=h.get(d.from_node);p&&f.push({node:p,snr:d.snr,quality:d.quality})}}),f.sort((d,p)=>p.snr-d.snr)},[t,e,r]);if(!t)return b.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border p-4 flex flex-col items-center justify-center h-[540px]",children:[b.jsx("div",{className:"w-12 h-12 rounded-full bg-bg-hover border border-border flex items-center justify-center mb-3",children:b.jsx(Zc,{size:24,className:"text-slate-500"})}),b.jsx("p",{className:"text-sm text-slate-500 text-center",children:"Click a node to inspect"})]});const a=zye.includes(t.role),o=jye(t.latitude),s=hz[o%hz.length],l=t.latitude!==null&&t.longitude!==null,u=t.battery_level!==null?t.battery_level>100||t.voltage&&t.voltage>4.1?"USB":`${t.battery_level.toFixed(0)}%`:"—",c=t.battery_level!==null&&(t.battery_level>100||t.voltage&&t.voltage>4.1);return b.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border flex flex-col h-[540px] overflow-hidden",children:[b.jsxs("div",{className:"p-4 border-b border-border",children:[b.jsx("div",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-mono mb-2",style:{backgroundColor:`${s}20`,color:s},children:t.node_id_hex}),b.jsx("div",{className:"font-mono text-lg text-slate-100",children:t.short_name}),b.jsx("div",{className:"text-xs text-slate-500 truncate",children:t.long_name})]}),b.jsxs("div",{className:"p-4 border-b border-border grid grid-cols-2 gap-3",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Role"}),b.jsx("div",{className:`text-sm font-medium ${a?"text-cyan-400":"text-slate-300"}`,children:t.role})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Region"}),b.jsx("div",{className:"text-sm text-slate-300",children:Vye(o)})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Battery"}),b.jsxs("div",{className:"text-sm text-slate-300 flex items-center gap-1",children:[c&&b.jsx(v2,{size:12,className:"text-amber-400"}),u]})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Status"}),b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx("div",{className:`w-2 h-2 rounded-full ${Gye(t.last_heard)}`}),b.jsx("span",{className:"text-sm text-slate-300",children:Fye(t.last_heard)})]})]}),b.jsxs("div",{className:"col-span-2",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Hardware"}),b.jsx("div",{className:"text-sm text-slate-300 font-mono truncate",children:t.hardware||"Unknown"})]})]}),l&&b.jsxs("div",{className:"px-4 py-3 border-b border-border flex gap-3",children:[b.jsxs("a",{href:`https://www.google.com/maps?q=${t.latitude},${t.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[b.jsx(Zd,{size:10}),"Google Maps"]}),b.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[b.jsx(Zd,{size:10}),"OSM"]})]}),b.jsxs("div",{className:"flex-1 overflow-y-auto",children:[b.jsxs("div",{className:"px-4 py-2 text-xs text-slate-500 font-medium sticky top-0 bg-bg-card border-b border-border",children:["Neighbors (",i.length,")"]}),i.length>0?b.jsx("div",{className:"divide-y divide-border",children:i.map(h=>b.jsxs("button",{onClick:()=>n(h.node.node_num),className:"w-full px-4 py-2 text-left hover:bg-bg-hover transition-colors flex items-center gap-2",style:{borderLeftWidth:3,borderLeftColor:fz(h.snr)},children:[b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("div",{className:"text-sm text-slate-200 font-mono truncate",children:h.node.short_name}),b.jsx("div",{className:"text-xs text-slate-500 truncate",children:h.node.long_name})]}),b.jsxs("div",{className:"text-right flex-shrink-0",children:[b.jsxs("div",{className:"text-xs font-mono",style:{color:fz(h.snr)},children:[h.snr.toFixed(1)," dB"]}),b.jsx("div",{className:"text-xs text-slate-500",children:Bye(h.snr)})]})]},h.node.node_num))}):b.jsx("div",{className:"px-4 py-6 text-center text-sm text-slate-500",children:"No known neighbors"})]})]})}const dz=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Wye(t){if(!t)return"bg-slate-500";const e=new Date(t),n=(new Date().getTime()-e.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function Uye(t){if(!t)return"—";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Zye(t){return t.battery_level===null?"—":t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`}function vz(t){return t===null?"—":t>46?"Northern":t>44.5?"Central":t>43?"SW Idaho":"SC Idaho"}function $ye({nodes:t,selectedNodeId:e,onSelectNode:r}){const[n,i]=$.useState(""),[a,o]=$.useState("short_name"),[s,l]=$.useState("asc"),[u,c]=$.useState("all"),h=$.useMemo(()=>{let p=[...t];if(u==="infra"?p=p.filter(g=>dz.includes(g.role)):u==="online"&&(p=p.filter(g=>{if(!g.last_heard)return!1;const m=new Date(g.last_heard);return(new Date().getTime()-m.getTime())/36e5<1})),n){const g=n.toLowerCase();p=p.filter(m=>m.short_name.toLowerCase().includes(g)||m.long_name.toLowerCase().includes(g)||m.role.toLowerCase().includes(g)||vz(m.latitude).toLowerCase().includes(g))}return p.sort((g,m)=>{let y="",_="";switch(a){case"short_name":y=g.short_name.toLowerCase(),_=m.short_name.toLowerCase();break;case"role":y=g.role,_=m.role;break;case"battery_level":y=g.battery_level??-1,_=m.battery_level??-1;break;case"last_heard":y=g.last_heard?new Date(g.last_heard).getTime():0,_=m.last_heard?new Date(m.last_heard).getTime():0;break;case"hardware":y=g.hardware.toLowerCase(),_=m.hardware.toLowerCase();break}return y<_?s==="asc"?-1:1:y>_?s==="asc"?1:-1:0}),p},[t,n,a,s,u]),f=p=>{a===p?l(s==="asc"?"desc":"asc"):(o(p),l("asc"))},d=({field:p})=>a!==p?null:s==="asc"?b.jsx(BZ,{size:14,className:"inline ml-1"}):b.jsx(Iv,{size:14,className:"inline ml-1"});return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg overflow-hidden",children:[b.jsxs("div",{className:"p-3 border-b border-border flex items-center gap-3",children:[b.jsxs("div",{className:"relative flex-1 max-w-xs",children:[b.jsx(QZ,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),b.jsx("input",{type:"text",placeholder:"Search nodes...",value:n,onChange:p=>i(p.target.value),className:"w-full pl-9 pr-3 py-1.5 bg-bg-hover border border-border rounded text-sm text-slate-200 placeholder-slate-500 focus:outline-none focus:border-accent"})]}),b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx(f2,{size:14,className:"text-slate-500 mr-1"}),["all","infra","online"].map(p=>b.jsx("button",{onClick:()=>c(p),className:`px-2 py-1 text-xs rounded transition-colors ${u===p?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:p==="all"?"All":p==="infra"?"Infra":"Online"},p))]}),b.jsxs("div",{className:"text-xs text-slate-500 ml-auto",children:[h.length," of ",t.length," nodes"]})]}),b.jsxs("div",{className:"overflow-x-auto",children:[b.jsxs("table",{className:"w-full text-sm",children:[b.jsx("thead",{children:b.jsxs("tr",{className:"bg-bg-hover text-slate-400 text-xs",children:[b.jsx("th",{className:"w-8 px-3 py-2"}),b.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("short_name"),children:["Name ",b.jsx(d,{field:"short_name"})]}),b.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("role"),children:["Role ",b.jsx(d,{field:"role"})]}),b.jsx("th",{className:"px-3 py-2 text-left",children:"Region"}),b.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("battery_level"),children:["Battery ",b.jsx(d,{field:"battery_level"})]}),b.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("last_heard"),children:["Last Heard ",b.jsx(d,{field:"last_heard"})]}),b.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("hardware"),children:["Hardware ",b.jsx(d,{field:"hardware"})]})]})}),b.jsx("tbody",{className:"divide-y divide-border",children:h.slice(0,100).map(p=>{const g=dz.includes(p.role),m=p.node_num===e;return b.jsxs("tr",{onClick:()=>r(p.node_num),className:`cursor-pointer transition-colors ${m?"bg-accent/10":"hover:bg-bg-hover"}`,children:[b.jsx("td",{className:"px-3 py-2",children:b.jsx("div",{className:`w-2 h-2 rounded-full ${Wye(p.last_heard)}`})}),b.jsxs("td",{className:"px-3 py-2",children:[b.jsx("div",{className:"font-mono text-slate-200",children:p.short_name}),b.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[200px]",children:p.long_name})]}),b.jsx("td",{className:"px-3 py-2",children:b.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-xs font-medium ${g?"bg-cyan-500/20 text-cyan-400":"bg-slate-500/20 text-slate-400"}`,children:p.role})}),b.jsx("td",{className:"px-3 py-2 text-slate-400",children:vz(p.latitude)}),b.jsx("td",{className:"px-3 py-2 font-mono text-slate-300",children:Zye(p)}),b.jsx("td",{className:"px-3 py-2 text-slate-400",children:Uye(p.last_heard)}),b.jsx("td",{className:"px-3 py-2 font-mono text-xs text-slate-400 truncate max-w-[150px]",children:p.hardware||"—"})]},p.node_num)})})]}),h.length>100&&b.jsxs("div",{className:"px-3 py-2 text-xs text-slate-500 text-center border-t border-border",children:["Showing first 100 of ",h.length," nodes"]}),h.length===0&&b.jsx("div",{className:"px-3 py-8 text-sm text-slate-500 text-center",children:"No nodes match your filters"})]})]})}function Yye(){const[t,e]=$.useState([]),[r,n]=$.useState([]),[i,a]=$.useState([]),[o,s]=$.useState(null),[l,u]=$.useState("topo"),[c,h]=$.useState(!0),[f,d]=$.useState(null);$.useEffect(()=>{document.title="Mesh — MeshAI",Promise.all([a$(),o$(),_$()]).then(([m,y,_])=>{e(m),n(y),a(_),h(!1)}).catch(m=>{d(m.message),h(!1)})},[]);const p=$.useMemo(()=>t.find(m=>m.node_num===o)||null,[t,o]),g=$.useCallback(m=>{s(m)},[]);return c?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsx("div",{className:"text-slate-400",children:"Loading mesh data..."})}):f?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsxs("div",{className:"text-red-400",children:["Error: ",f]})}):b.jsxs("div",{className:"space-y-6",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"text-sm text-slate-400",children:[t.length," nodes • ",r.length," edges"]}),b.jsxs("div",{className:"flex items-center bg-bg-card border border-border rounded-lg p-1",children:[b.jsxs("button",{onClick:()=>u("topo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="topo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[b.jsx($Z,{size:14}),"Topology"]}),b.jsxs("button",{onClick:()=>u("geo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="geo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[b.jsx(WZ,{size:14}),"Geographic"]})]})]}),b.jsxs("div",{className:"flex gap-0",children:[b.jsx("div",{className:"flex-1 min-w-0",children:l==="topo"?b.jsx(oye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g}):b.jsx(Oye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g})}),b.jsx(Hye,{node:p,edges:r,nodes:t,onSelectNode:g})]}),b.jsx($ye,{nodes:t,selectedNodeId:o,onSelectNode:g})]})}function Xye({feed:t}){const e=()=>t.is_loaded?t.consecutive_errors>0?"bg-amber-500":"bg-green-500":"bg-red-500",r=()=>t.is_loaded?t.consecutive_errors>0?`${t.consecutive_errors} errors`:"Healthy":"Not loaded",n=i=>i?new Date(i*1e3).toLocaleTimeString():"Never";return b.jsxs("div",{className:"bg-bg-hover rounded-lg p-4",children:[b.jsxs("div",{className:"flex items-center justify-between mb-2",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),b.jsx("span",{className:"text-sm font-medium text-slate-200 uppercase",children:t.source})]}),b.jsx("span",{className:"text-xs text-slate-400",children:r()})]}),b.jsxs("div",{className:"text-xs text-slate-500 space-y-1",children:[b.jsxs("div",{children:["Events: ",t.event_count]}),b.jsxs("div",{children:["Last fetch: ",n(t.last_fetch)]}),t.last_error&&b.jsx("div",{className:"text-amber-500 truncate",children:t.last_error})]})]})}function qye({event:t}){const r=(a=>{switch(a.toLowerCase()){case"extreme":case"severe":return{bg:"bg-red-500/10",border:"border-red-500",icon:E0,iconColor:"text-red-500"};case"moderate":case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:ms,iconColor:"text-amber-500"};case"minor":return{bg:"bg-yellow-500/10",border:"border-yellow-500",icon:iy,iconColor:"text-yellow-500"};default:return{bg:"bg-slate-500/10",border:"border-slate-500",icon:iy,iconColor:"text-slate-400"}}})(t.severity),n=r.icon,i=a=>a?new Date(a*1e3).toLocaleString():null;return b.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-2 ${r.border}`,children:b.jsxs("div",{className:"flex items-start gap-3",children:[b.jsx(n,{size:18,className:r.iconColor}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[b.jsx("span",{className:"text-sm font-medium text-slate-200",children:t.event_type}),b.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${r.bg} ${r.iconColor}`,children:t.severity})]}),b.jsx("div",{className:"text-sm text-slate-300 mb-2",children:t.headline}),t.description&&b.jsx("div",{className:"text-xs text-slate-400 mb-2 line-clamp-2",children:t.description}),b.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[b.jsx("span",{className:"uppercase",children:t.source}),t.expires&&b.jsxs("span",{children:["Expires: ",i(t.expires)]})]})]})]})})}function Kye({swpc:t}){var n,i;if(!t||!t.enabled)return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(Mk,{size:14}),"Solar/Geomagnetic Indices"]}),b.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const e=a=>a===void 0?"text-slate-400":a<=2?"text-green-500":a<=4?"text-amber-500":a<=6?"text-orange-500":"text-red-500",r=a=>a===void 0||a===0?"text-green-500":a<=2?"text-amber-500":a<=3?"text-orange-500":"text-red-500";return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(Mk,{size:14}),"Solar/Geomagnetic Indices"]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[b.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar Flux Index"}),b.jsx("div",{className:"text-2xl font-mono text-slate-100",children:((n=t.sfi)==null?void 0:n.toFixed(0))??"—"}),b.jsx("div",{className:"text-xs text-slate-500",children:"SFI (10.7 cm)"})]}),b.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Planetary K-Index"}),b.jsx("div",{className:`text-2xl font-mono ${e(t.kp_current)}`,children:((i=t.kp_current)==null?void 0:i.toFixed(1))??"—"}),b.jsx("div",{className:"text-xs text-slate-500",children:"Kp"})]})]}),b.jsxs("div",{className:"bg-bg-hover rounded-lg p-3 mb-4",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-2",children:"NOAA Space Weather Scales"}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx("span",{className:"text-xs text-slate-400",children:"R:"}),b.jsx("span",{className:`text-sm font-mono ${r(t.r_scale)}`,children:t.r_scale??0})]}),b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx("span",{className:"text-xs text-slate-400",children:"S:"}),b.jsx("span",{className:`text-sm font-mono ${r(t.s_scale)}`,children:t.s_scale??0})]}),b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx("span",{className:"text-xs text-slate-400",children:"G:"}),b.jsx("span",{className:`text-sm font-mono ${r(t.g_scale)}`,children:t.g_scale??0})]})]}),b.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Radio Blackout / Solar Radiation / Geomagnetic Storm"})]}),t.active_warnings&&t.active_warnings.length>0&&b.jsxs("div",{className:"space-y-2",children:[b.jsx("div",{className:"text-xs text-slate-500",children:"Active Warnings"}),t.active_warnings.slice(0,3).map((a,o)=>b.jsx("div",{className:"text-xs text-amber-400 bg-amber-500/10 rounded p-2",children:a},o))]})]})}function Qye({ducting:t}){if(!t||!t.enabled)return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(Ak,{size:14}),"Tropospheric Ducting"]}),b.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const e=n=>{switch(n){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},r=n=>n?n.replace("_"," ").replace(/\b\w/g,i=>i.toUpperCase()):"Unknown";return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(Ak,{size:14}),"Tropospheric Ducting"]}),b.jsxs("div",{className:"bg-bg-hover rounded-lg p-4 mb-4",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Condition"}),b.jsx("div",{className:`text-xl font-medium ${e(t.condition)}`,children:r(t.condition)})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[b.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Min Gradient"}),b.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.min_gradient??"—"}),b.jsx("div",{className:"text-xs text-slate-500",children:"M-units/km"})]}),t.duct_thickness_m&&b.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Thickness"}),b.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_thickness_m}),b.jsx("div",{className:"text-xs text-slate-500",children:"meters"})]}),t.duct_base_m&&b.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Base"}),b.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_base_m}),b.jsx("div",{className:"text-xs text-slate-500",children:"meters AGL"})]})]}),b.jsxs("div",{className:"text-xs text-slate-500 bg-bg-hover rounded p-2",children:[b.jsx("div",{children:"dM/dz reference:"}),b.jsxs("div",{className:"mt-1 space-y-0.5",children:[b.jsx("div",{children:">79: Normal propagation"}),b.jsx("div",{children:"0–79: Super-refraction"}),b.jsx("div",{children:"<0: Ducting (trapping layer)"})]})]}),t.last_update&&b.jsxs("div",{className:"text-xs text-slate-500 mt-3",children:["Last update: ",t.last_update]})]})}function Jye(){var D;const[t,e]=$.useState(null),[r,n]=$.useState([]),[i,a]=$.useState(null),[o,s]=$.useState(null),[l,u]=$.useState([]),[c,h]=$.useState(null),[f,d]=$.useState([]),[p,g]=$.useState([]),[m,y]=$.useState([]),[_,S]=$.useState([]),[T,C]=$.useState(0),[M,A]=$.useState(!0),[k,E]=$.useState(null);return $.useEffect(()=>{document.title="Environment — MeshAI",Promise.all([K3().catch(()=>null),u$().catch(()=>[]),h$().catch(()=>null),f$().catch(()=>null),d$().catch(()=>[]),v$().catch(()=>null),p$().catch(()=>[]),g$().catch(()=>[]),m$().catch(()=>[]),y$().catch(()=>({hotspots:[],new_ignitions:0}))]).then(([I,z,O,V,G,F,U,j,W,H])=>{e(I),n(z),a(O),s(V),u(G),h(F),d(U||[]),g(j||[]),y(W||[]),S((H==null?void 0:H.hotspots)||[]),C((H==null?void 0:H.new_ignitions)||0),A(!1)}).catch(I=>{E(I.message),A(!1)})},[]),M?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsx("div",{className:"text-slate-400",children:"Loading environmental data..."})}):k?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsxs("div",{className:"text-red-400",children:["Error: ",k]})}):t!=null&&t.enabled?b.jsxs("div",{className:"space-y-6",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("h1",{className:"text-xl font-semibold text-slate-200",children:"Environment"}),b.jsxs("div",{className:"text-xs text-slate-500",children:[r.length," active event",r.length!==1?"s":""]})]}),b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(h2,{size:14}),"Feed Status"]}),b.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:t.feeds.map(I=>b.jsx(Xye,{feed:I},I.source))})]}),b.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[b.jsx(Kye,{swpc:i}),b.jsx(Qye,{ducting:o})]}),b.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(GZ,{size:14}),"Active Wildfires (",l.length,")"]}),l.length>0?b.jsx("div",{className:"space-y-3",children:l.map(I=>b.jsxs("div",{className:`p-3 rounded-lg ${I.severity==="warning"?"bg-red-500/10 border-l-2 border-red-500":I.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-slate-500/10 border-l-2 border-slate-500"}`,children:[b.jsxs("div",{className:"flex items-center justify-between mb-1",children:[b.jsx("span",{className:"text-sm font-medium text-slate-200",children:I.name}),b.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${I.severity==="warning"?"bg-red-500/20 text-red-400":I.severity==="watch"?"bg-amber-500/20 text-amber-400":"bg-slate-500/20 text-slate-400"}`,children:I.severity})]}),b.jsxs("div",{className:"text-xs text-slate-400 space-y-1",children:[b.jsxs("div",{children:[I.acres.toLocaleString()," acres, ",I.pct_contained,"% contained"]}),I.distance_km&&I.nearest_anchor&&b.jsxs("div",{children:[Math.round(I.distance_km)," km from ",I.nearest_anchor]})]})]},I.event_id))}):b.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[b.jsx(sd,{size:16,className:"text-green-500"}),b.jsx("span",{children:"No active wildfires in the area"})]})]}),b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(ZZ,{size:14}),"Avalanche Advisories"]}),c!=null&&c.off_season?b.jsx("div",{className:"text-slate-500 py-4",children:b.jsx("p",{children:"Off season - check back in December"})}):c&&c.advisories.length>0?b.jsxs("div",{className:"space-y-3",children:[c.advisories.map(I=>b.jsxs("div",{className:`p-3 rounded-lg ${I.danger_level>=4?"bg-red-500/10 border-l-2 border-red-500":I.danger_level>=3?"bg-amber-500/10 border-l-2 border-amber-500":I.danger_level>=2?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[b.jsxs("div",{className:"flex items-center justify-between mb-1",children:[b.jsx("span",{className:"text-sm font-medium text-slate-200",children:I.zone_name}),b.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${I.danger_level>=4?"bg-red-500/20 text-red-400":I.danger_level>=3?"bg-amber-500/20 text-amber-400":I.danger_level>=2?"bg-yellow-500/20 text-yellow-400":"bg-green-500/20 text-green-400"}`,children:I.danger_name})]}),b.jsx("div",{className:"text-xs text-slate-400",children:I.center}),I.travel_advice&&b.jsx("div",{className:"text-xs text-slate-500 mt-2 line-clamp-2",children:I.travel_advice})]},I.event_id)),((D=c.advisories[0])==null?void 0:D.center_link)&&b.jsx("a",{href:c.advisories[0].center_link,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-400 hover:underline",children:"View full forecast"})]}):b.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[b.jsx(sd,{size:16,className:"text-green-500"}),b.jsx("span",{children:"No avalanche advisories"})]})]})]}),f.length>0&&b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(VZ,{size:14}),"Stream Gauges (",f.length,")"]}),b.jsx("div",{className:"space-y-2",children:f.map(I=>{var z,O,V,G,F;return b.jsxs("div",{className:`p-3 rounded-lg ${I.severity==="warning"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-blue-500/10 border-l-2 border-blue-500"}`,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"text-sm text-slate-200",children:((z=I.properties)==null?void 0:z.site_name)||"Unknown Site"}),b.jsxs("span",{className:"text-sm font-mono text-slate-300",children:[(V=(O=I.properties)==null?void 0:O.value)==null?void 0:V.toLocaleString()," ",(G=I.properties)==null?void 0:G.unit]})]}),b.jsx("div",{className:"text-xs text-slate-500 mt-1",children:(F=I.properties)==null?void 0:F.parameter})]},I.event_id)})})]}),(p.length>0||m.length>0)&&b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(OZ,{size:14}),"Road Conditions"]}),p.length>0&&b.jsxs("div",{className:"mb-4",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Traffic Flow"}),b.jsx("div",{className:"space-y-2",children:p.map(I=>{var z,O,V,G,F,U,j,W,H;return b.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.roadClosure?"bg-red-500/10 border-l-2 border-red-500":((O=I.properties)==null?void 0:O.speedRatio)<.5?"bg-amber-500/10 border-l-2 border-amber-500":((V=I.properties)==null?void 0:V.speedRatio)<.8?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"text-sm text-slate-200",children:((G=I.properties)==null?void 0:G.corridor)||"Unknown"}),b.jsx("span",{className:"text-sm font-mono text-slate-300",children:(F=I.properties)!=null&&F.roadClosure?"CLOSED":`${Math.round(((U=I.properties)==null?void 0:U.currentSpeed)||0)}mph`})]}),!((j=I.properties)!=null&&j.roadClosure)&&b.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[Math.round((((W=I.properties)==null?void 0:W.speedRatio)||1)*100),"% of free flow (",Math.round(((H=I.properties)==null?void 0:H.freeFlowSpeed)||0),"mph)"]})]},I.event_id)})})]}),m.length>0&&b.jsxs("div",{children:[b.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Road Events"}),b.jsx("div",{className:"space-y-2",children:m.map(I=>{var z,O;return b.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.is_closure?"bg-red-500/10 border-l-2 border-red-500":"bg-amber-500/10 border-l-2 border-amber-500"}`,children:[b.jsxs("div",{className:"flex items-center gap-2",children:[((O=I.properties)==null?void 0:O.is_closure)&&b.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"CLOSURE"}),b.jsx("span",{className:"text-sm text-slate-200 line-clamp-1",children:I.headline})]}),b.jsx("div",{className:"text-xs text-slate-500 mt-1 uppercase",children:I.event_type})]},I.event_id)})})]})]}),_.length>0&&b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(qZ,{size:14}),"Satellite Hotspots (",_.length,")",T>0&&b.jsxs("span",{className:"ml-2 px-2 py-0.5 text-xs rounded-full bg-red-500/20 text-red-400 animate-pulse",children:[T," NEW"]})]}),b.jsx("div",{className:"space-y-2",children:_.map(I=>{var z,O,V,G,F,U;return b.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.new_ignition?"bg-red-500/10 border-l-2 border-red-500":I.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-orange-500/10 border-l-2 border-orange-500"}`,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[((O=I.properties)==null?void 0:O.new_ignition)&&b.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"NEW"}),b.jsx("span",{className:"text-sm text-slate-200",children:I.headline})]}),((V=I.properties)==null?void 0:V.frp)&&b.jsxs("span",{className:"text-sm font-mono text-orange-400",children:[Math.round(I.properties.frp)," MW"]})]}),b.jsxs("div",{className:"text-xs text-slate-500 mt-1 flex items-center gap-3",children:[b.jsxs("span",{children:["Conf: ",((G=I.properties)==null?void 0:G.confidence)||"N/A"]}),((F=I.properties)==null?void 0:F.acq_time)&&b.jsxs("span",{children:["@",I.properties.acq_time,"Z"]}),((U=I.properties)==null?void 0:U.near_fire)&&b.jsxs("span",{children:["Near: ",I.properties.near_fire]})]})]},I.event_id)})})]}),b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(ms,{size:14}),"Active Events (",r.length,")"]}),r.length>0?b.jsx("div",{className:"space-y-3",children:r.map(I=>b.jsx(qye,{event:I},I.event_id))}):b.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[b.jsx(sd,{size:16,className:"text-green-500"}),b.jsx("span",{children:"No active environmental events"})]})]})]}):b.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center",children:[b.jsx("div",{className:"w-16 h-16 rounded-full bg-bg-card border border-border flex items-center justify-center mb-6",children:b.jsx(Ud,{size:32,className:"text-slate-500"})}),b.jsx("h2",{className:"text-xl font-semibold text-slate-300 mb-2",children:"Environmental Feeds Disabled"}),b.jsx("p",{className:"text-slate-500 max-w-md",children:"Enable environmental feeds in config.yaml to see weather alerts, space weather indices, and tropospheric ducting data."})]})}const pz=[{key:"bot",label:"Bot",icon:NZ},{key:"connection",label:"Connection",icon:X3},{key:"response",label:"Response",icon:UZ},{key:"history",label:"History",icon:jZ},{key:"memory",label:"Memory",icon:RZ},{key:"context",label:"Context",icon:U3},{key:"commands",label:"Commands",icon:e$},{key:"llm",label:"LLM",icon:W3},{key:"weather",label:"Weather",icon:Ud},{key:"meshmonitor",label:"MeshMonitor",icon:Zc},{key:"knowledge",label:"Knowledge",icon:EZ},{key:"mesh_sources",label:"Mesh Sources",icon:HZ},{key:"mesh_intelligence",label:"Intelligence",icon:h2},{key:"environmental",label:"Environmental",icon:t$},{key:"notifications",label:"Notifications",icon:Wd},{key:"dashboard",label:"Dashboard",icon:Z3}],qr={bot:"Identity and behavior settings for the bot on the mesh network.",connection:"How MeshAI connects to your Meshtastic radio.",response:"Controls how quickly and how much the bot responds on the mesh.",history:"Conversation history storage and cleanup.",memory:"Short-term conversation memory management. Controls how the bot maintains context within a conversation.",context:"Passive channel monitoring. The bot listens to mesh channels and uses recent messages as context when responding.",commands:"Mesh commands available via the configured prefix. Toggle individual commands on or off.",llm:"AI model configuration. MeshAI uses an LLM to understand questions and generate responses.",weather:"Weather data for the !weather command. This is separate from NWS environmental alerts.",meshmonitor:"AIDA MeshMonitor integration. An additional data source for mesh network monitoring.",knowledge:"Knowledge base for answering questions from stored documents. Connects to Qdrant vector database or local SQLite.",mesh_sources:"Data sources for mesh network information. MeshAI can pull data from multiple sources simultaneously and merge them into a unified view.",mesh_intelligence:"Advanced mesh analysis: health scoring, region management, and automated alerting. The intelligence engine monitors your mesh and detects problems automatically.",environmental:"Live environmental data feeds for situational awareness. Each feed polls a public or authenticated API for real-time conditions affecting your area.",notifications:"Alert delivery system. Configure where alerts get sent (mesh, email, webhooks) and which conditions trigger them.",dashboard:"Web dashboard settings. You're looking at it right now."},e0e=[{name:"help",description:"Show available commands and usage"},{name:"health",description:"Mesh network health overview with status dots"},{name:"status",description:"Quick mesh status summary"},{name:"region",description:"List regions or get detailed region breakdown"},{name:"neighbors",description:"Show top infrastructure neighbors with signal quality"},{name:"ping",description:"Test bot responsiveness"},{name:"clear",description:"Clear your conversation history"},{name:"reset",description:"Reset conversation context"},{name:"sub",description:"Subscribe to scheduled reports or alerts"},{name:"unsub",description:"Remove a subscription"},{name:"mysubs",description:"List your active subscriptions"},{name:"alerts",description:"Active NWS weather alerts for mesh area"},{name:"solar",description:"Space weather and HF propagation conditions"},{name:"hf",description:"HF radio propagation (alias for !solar)"},{name:"fire",description:"Active wildfires near the mesh"},{name:"avy",description:"Avalanche advisories for configured zones"},{name:"hotspots",description:"NASA FIRMS satellite fire detections"},{name:"streams",description:"USGS stream gauge readings"},{name:"roads",description:"Road conditions and closures"},{name:"traffic",description:"Traffic flow on monitored corridors"}],t0e=[{value:"US-AL",label:"Alabama"},{value:"US-AK",label:"Alaska"},{value:"US-AZ",label:"Arizona"},{value:"US-AR",label:"Arkansas"},{value:"US-CA",label:"California"},{value:"US-CO",label:"Colorado"},{value:"US-CT",label:"Connecticut"},{value:"US-DE",label:"Delaware"},{value:"US-FL",label:"Florida"},{value:"US-GA",label:"Georgia"},{value:"US-HI",label:"Hawaii"},{value:"US-ID",label:"Idaho"},{value:"US-IL",label:"Illinois"},{value:"US-IN",label:"Indiana"},{value:"US-IA",label:"Iowa"},{value:"US-KS",label:"Kansas"},{value:"US-KY",label:"Kentucky"},{value:"US-LA",label:"Louisiana"},{value:"US-ME",label:"Maine"},{value:"US-MD",label:"Maryland"},{value:"US-MA",label:"Massachusetts"},{value:"US-MI",label:"Michigan"},{value:"US-MN",label:"Minnesota"},{value:"US-MS",label:"Mississippi"},{value:"US-MO",label:"Missouri"},{value:"US-MT",label:"Montana"},{value:"US-NE",label:"Nebraska"},{value:"US-NV",label:"Nevada"},{value:"US-NH",label:"New Hampshire"},{value:"US-NJ",label:"New Jersey"},{value:"US-NM",label:"New Mexico"},{value:"US-NY",label:"New York"},{value:"US-NC",label:"North Carolina"},{value:"US-ND",label:"North Dakota"},{value:"US-OH",label:"Ohio"},{value:"US-OK",label:"Oklahoma"},{value:"US-OR",label:"Oregon"},{value:"US-PA",label:"Pennsylvania"},{value:"US-RI",label:"Rhode Island"},{value:"US-SC",label:"South Carolina"},{value:"US-SD",label:"South Dakota"},{value:"US-TN",label:"Tennessee"},{value:"US-TX",label:"Texas"},{value:"US-UT",label:"Utah"},{value:"US-VT",label:"Vermont"},{value:"US-VA",label:"Virginia"},{value:"US-WA",label:"Washington"},{value:"US-WV",label:"West Virginia"},{value:"US-WI",label:"Wisconsin"},{value:"US-WY",label:"Wyoming"}];function kr({info:t,link:e,linkText:r="Learn more"}){const[n,i]=$.useState(!1);return b.jsxs("div",{className:"relative inline-block",children:[b.jsx("button",{type:"button",onClick:a=>{a.stopPropagation(),i(!n)},className:"ml-1.5 w-4 h-4 rounded-full bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-slate-200 inline-flex items-center justify-center text-xs transition-colors",title:"More info",children:"?"}),n&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),b.jsxs("div",{className:"absolute left-0 top-6 z-50 w-72 p-3 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl text-xs text-slate-300 leading-relaxed",children:[t,e&&b.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"mt-2 flex items-center gap-1 text-accent hover:underline",onClick:a=>a.stopPropagation(),children:[r," ",b.jsx(Zd,{size:10})]})]})]})]})}function Kr({text:t}){return b.jsx("p",{className:"text-sm text-slate-500 mb-6 pb-4 border-b border-[#1e2a3a]",children:t})}function Je({label:t,value:e,onChange:r,type:n="text",placeholder:i="",helper:a="",info:o="",infoLink:s=""}){const[l,u]=$.useState(!1),c=n==="password";return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,o&&b.jsx(kr,{info:o,link:s})]}),b.jsxs("div",{className:"relative",children:[b.jsx("input",{type:c&&!l?"password":"text",value:e,onChange:h=>r(h.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),c&&b.jsx("button",{type:"button",onClick:()=>u(!l),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:l?b.jsx(FZ,{size:16}):b.jsx(U3,{size:16})})]}),a&&b.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function Oe({label:t,value:e,onChange:r,min:n,max:i,step:a=1,helper:o="",info:s="",infoLink:l=""}){return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,s&&b.jsx(kr,{info:s,link:l})]}),b.jsx("input",{type:"number",value:e,onChange:u=>r(Number(u.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&b.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function ht({label:t,checked:e,onChange:r,helper:n="",info:i="",infoLink:a=""}){return b.jsxs("div",{className:"flex items-center justify-between py-2",children:[b.jsxs("div",{children:[b.jsxs("span",{className:"flex items-center text-sm text-slate-300",children:[t,i&&b.jsx(kr,{info:i,link:a})]}),n&&b.jsx("p",{className:"text-xs text-slate-600",children:n})]}),b.jsx("button",{type:"button",onClick:()=>r(!e),className:`relative w-11 h-6 rounded-full transition-colors ${e?"bg-accent":"bg-[#1e2a3a]"}`,children:b.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${e?"translate-x-5":""}`})})]})}function ii({label:t,value:e,onChange:r,options:n,helper:i="",info:a="",infoLink:o=""}){return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,a&&b.jsx(kr,{info:a,link:o})]}),b.jsx("select",{value:e,onChange:s=>r(s.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:n.map(s=>b.jsx("option",{value:s.value,children:s.label},s.value))}),i&&b.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function r0e({label:t,value:e,onChange:r,rows:n=4,helper:i="",info:a="",infoLink:o=""}){return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,a&&b.jsx(kr,{info:a,link:o})]}),b.jsx("textarea",{value:e,onChange:s=>r(s.target.value),rows:n,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent resize-y"}),i&&b.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function pa({label:t,value:e,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=$.useState(e.join(", "));$.useEffect(()=>{s(e.join(", "))},[e]);const l=()=>{const u=o.split(",").map(c=>c.trim()).filter(Boolean);r(u)};return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,i&&b.jsx(kr,{info:i,link:a})]}),b.jsx("input",{type:"text",value:o,onChange:u=>s(u.target.value),onBlur:l,placeholder:"item1, item2, item3",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&b.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function P8({label:t,value:e,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=$.useState(e.join(", "));$.useEffect(()=>{s(e.join(", "))},[e]);const l=()=>{const u=o.split(",").map(c=>parseInt(c.trim(),10)).filter(c=>!isNaN(c));r(u)};return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,i&&b.jsx(kr,{info:i,link:a})]}),b.jsx("input",{type:"text",value:o,onChange:u=>s(u.target.value),onBlur:l,placeholder:"0, 1, 2",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&b.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function Gr({label:t,description:e,checked:r,onChange:n,threshold:i,onThresholdChange:a,thresholdLabel:o,thresholdMin:s,thresholdMax:l,thresholdStep:u=1,thresholdSuffix:c=""}){return b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-3 space-y-2",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex-1",children:[b.jsx("span",{className:"text-sm text-slate-300",children:t}),b.jsx("p",{className:"text-xs text-slate-600",children:e})]}),b.jsx("button",{type:"button",onClick:()=>n(!r),className:`relative w-11 h-6 rounded-full transition-colors flex-shrink-0 ml-3 ${r?"bg-accent":"bg-[#1e2a3a]"}`,children:b.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${r?"translate-x-5":""}`})})]}),r&&i!==void 0&&a&&b.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-[#1e2a3a]",children:[b.jsxs("span",{className:"text-xs text-slate-500",children:[o||"Threshold",":"]}),b.jsx("input",{type:"number",value:i,onChange:h=>a(Number(h.target.value)),min:s,max:l,step:u,className:"w-20 px-2 py-1 bg-[#0a0e17] border border-[#1e2a3a] rounded text-xs text-slate-200 font-mono"}),c&&b.jsx("span",{className:"text-xs text-slate-500",children:c})]})]})}function n0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.bot}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Je,{label:"Bot Name",value:t.name,onChange:r=>e({...t,name:r}),helper:"Name the bot responds to on the mesh",info:"When someone sends a message containing this name, the bot will respond. Also used as the sender name in broadcasts. Changing this requires a restart."}),b.jsx(Je,{label:"Owner",value:t.owner,onChange:r=>e({...t,owner:r}),helper:"Your callsign or identifier",info:"Identifies the bot operator. Shown in !help responses and used for admin-level commands."})]}),b.jsx(ht,{label:"Respond to DMs",checked:t.respond_to_dms,onChange:r=>e({...t,respond_to_dms:r}),helper:"Reply when someone sends a direct message",info:"When enabled, the bot responds to direct messages from any node. When disabled, the bot only responds to channel messages that mention its name."}),b.jsx(ht,{label:"Filter BBS Protocols",checked:t.filter_bbs_protocols,onChange:r=>e({...t,filter_bbs_protocols:r}),helper:"Ignore BBS bulletin board traffic",info:"Filters out automated BBS protocol messages (advBBS, MAIL*, BOARD*) so the bot doesn't try to respond to machine-to-machine traffic."})]})}function i0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.connection}),b.jsx(ii,{label:"Connection Type",value:t.type,onChange:r=>e({...t,type:r}),options:[{value:"serial",label:"Serial (USB)"},{value:"tcp",label:"TCP (Network)"}],helper:"Serial for USB-connected radios, TCP for network or meshtasticd",info:"Serial: direct USB connection to a Meshtastic radio. TCP: connect over the network to a radio's IP or to meshtasticd running on another machine."}),t.type==="serial"?b.jsx(Je,{label:"Serial Port",value:t.serial_port,onChange:r=>e({...t,serial_port:r}),placeholder:"/dev/ttyUSB0",helper:"Device path for your USB radio",info:"Usually /dev/ttyUSB0 on Linux or /dev/ttyACM0. Check with 'ls /dev/tty*' after plugging in your radio."}):b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Je,{label:"TCP Host",value:t.tcp_host,onChange:r=>e({...t,tcp_host:r}),placeholder:"192.168.1.100",helper:"IP address or hostname of the radio/meshtasticd"}),b.jsx(Oe,{label:"TCP Port",value:t.tcp_port,onChange:r=>e({...t,tcp_port:r}),min:1,max:65535,helper:"Default 4403 for meshtasticd"})]})]})}function a0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.response}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Oe,{label:"Delay Min (sec)",value:t.delay_min,onChange:r=>e({...t,delay_min:r}),min:0,step:.1,helper:"Minimum wait before responding",info:"Adds a random delay between min and max before the bot sends a response. Prevents the bot from appearing to respond instantly, which can feel unnatural on a radio network."}),b.jsx(Oe,{label:"Delay Max (sec)",value:t.delay_max,onChange:r=>e({...t,delay_max:r}),min:0,step:.1,helper:"Maximum wait before responding",info:"Also prevents collisions with other traffic by staggering transmissions."})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Oe,{label:"Max Length",value:t.max_length,onChange:r=>e({...t,max_length:r}),min:50,max:500,helper:"Maximum characters per response message",info:"Meshtastic packets have limited size. This caps how long each message chunk can be. The bot will split longer responses into multiple messages up to Max Messages."}),b.jsx(Oe,{label:"Max Messages",value:t.max_messages,onChange:r=>e({...t,max_messages:r}),min:1,max:10,helper:"Maximum chunks per response",info:"If a response is longer than Max Length, the bot splits it into this many chunks at most. Higher values = more complete answers but more airtime used."})]})]})}function o0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.history}),b.jsx(Je,{label:"Database Path",value:t.database,onChange:r=>e({...t,database:r}),helper:"SQLite file for storing conversation history",info:"Path to the SQLite database file. Created automatically if it doesn't exist. Stores all conversation history for context."}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Oe,{label:"Max Messages Per User",value:t.max_messages_per_user,onChange:r=>e({...t,max_messages_per_user:r}),min:0,helper:"History limit per user (0 = unlimited)",info:"Limits how many messages are stored per user. Older messages are pruned when the limit is reached. Set to 0 for no limit."}),b.jsx(Oe,{label:"Conversation Timeout (sec)",value:t.conversation_timeout,onChange:r=>e({...t,conversation_timeout:r}),min:0,helper:"Seconds before context resets",info:"If a user doesn't message for this long, their next message starts a new conversation context. The bot won't remember the previous topic."})]}),b.jsx(ht,{label:"Auto Cleanup",checked:t.auto_cleanup,onChange:r=>e({...t,auto_cleanup:r}),helper:"Automatically prune old conversations"}),t.auto_cleanup&&b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Oe,{label:"Cleanup Interval (hours)",value:t.cleanup_interval_hours,onChange:r=>e({...t,cleanup_interval_hours:r}),min:1,helper:"Hours between cleanup runs"}),b.jsx(Oe,{label:"Max Age (days)",value:t.max_age_days,onChange:r=>e({...t,max_age_days:r}),min:1,helper:"Delete conversations older than this"})]})]})}function s0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.memory}),b.jsx(ht,{label:"Enable Memory",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Keep conversation context between messages"}),t.enabled&&b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Oe,{label:"Window Size",value:t.window_size,onChange:r=>e({...t,window_size:r}),min:1,helper:"Recent message pairs kept in full",info:"The bot keeps this many recent exchanges (user message + bot response pairs) as full text in context. Older messages are summarized to save token space."}),b.jsx(Oe,{label:"Summarize Threshold",value:t.summarize_threshold,onChange:r=>e({...t,summarize_threshold:r}),min:1,helper:"Messages before older context is summarized",info:"When the conversation exceeds this many messages, older ones outside the window are compressed into a summary by the LLM."})]})]})}function l0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.context}),b.jsx(ht,{label:"Enable Passive Context",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Listen to channel traffic for context",info:"When enabled, the bot monitors mesh channels and includes recent messages in its context. This lets the bot reference things other people said on the channel."}),t.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(P8,{label:"Observe Channels",value:t.observe_channels,onChange:r=>e({...t,observe_channels:r}),helper:"Channel indexes to monitor (empty = all)",info:"Meshtastic channel numbers to listen on. Channel 0 is the default primary channel. Leave empty to monitor all channels."}),b.jsx(pa,{label:"Ignore Nodes",value:t.ignore_nodes,onChange:r=>e({...t,ignore_nodes:r}),helper:"Node IDs to exclude from context",info:"Messages from these nodes won't be included in passive context. Useful for filtering out noisy automated nodes."}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Oe,{label:"Max Age (sec)",value:t.max_age,onChange:r=>e({...t,max_age:r}),min:0,helper:"Ignore messages older than this"}),b.jsx(Oe,{label:"Max Context Items",value:t.max_context_items,onChange:r=>e({...t,max_context_items:r}),min:1,helper:"Maximum recent messages to include"})]})]})]})}function u0e({data:t,onChange:e}){const r=new Set(t.disabled_commands.map(i=>i.toLowerCase())),n=i=>{const a=i.toLowerCase();r.has(a)?e({...t,disabled_commands:t.disabled_commands.filter(o=>o.toLowerCase()!==a)}):e({...t,disabled_commands:[...t.disabled_commands,i]})};return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.commands}),b.jsx(ht,{label:"Enable Commands",checked:t.enabled,onChange:i=>e({...t,enabled:i}),helper:"Allow !commands on the mesh"}),t.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(Je,{label:"Command Prefix",value:t.prefix,onChange:i=>e({...t,prefix:i}),helper:"Character that triggers commands (e.g. ! for !help)",info:"Users type this character followed by the command name. Only single characters recommended."}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Available Commands",b.jsx(kr,{info:"Toggle commands on or off. Disabled commands won't respond when users invoke them."})]}),b.jsx("div",{className:"grid gap-1",children:e0e.map(i=>{const a=!r.has(i.name.toLowerCase());return b.jsxs("div",{className:"flex items-center justify-between p-2 bg-[#0a0e17] border border-[#1e2a3a] rounded hover:border-[#2a3a4a] transition-colors",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsxs("code",{className:"text-accent text-sm",children:["!",i.name]}),b.jsx("span",{className:"text-xs text-slate-500",children:i.description})]}),b.jsx("button",{type:"button",onClick:()=>n(i.name),className:`relative w-9 h-5 rounded-full transition-colors ${a?"bg-accent":"bg-[#1e2a3a]"}`,children:b.jsx("span",{className:`absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white transition-transform ${a?"translate-x-4":""}`})})]},i.name)})})]})]})]})}function c0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.llm}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(ii,{label:"Backend",value:t.backend,onChange:r=>e({...t,backend:r}),options:[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"google",label:"Google (Gemini)"}],helper:"LLM provider to use",info:"OpenAI: GPT models (gpt-4o, gpt-4o-mini). Anthropic: Claude models (claude-sonnet-4-20250514). Google: Gemini models. Can also point to compatible APIs like Ollama, LM Studio, or Open WebUI by changing the Base URL."}),b.jsx(Je,{label:"Model",value:t.model,onChange:r=>e({...t,model:r}),placeholder:"gpt-4o-mini",helper:"Specific model name",info:"The specific model to use. Common choices: gpt-4o-mini (fast, cheap), gpt-4o (better, costs more), claude-sonnet-4-20250514 (Anthropic equivalent). For local models via Ollama, use the model name you pulled (e.g. llama3.1)."})]}),b.jsx(Je,{label:"API Key",value:t.api_key,onChange:r=>e({...t,api_key:r}),type:"password",helper:"Supports ${ENV_VAR} syntax",info:"Your API key from the provider. You can also use ${ENV_VAR} syntax to read from an environment variable instead of storing the key in the config file."}),b.jsx(Je,{label:"Base URL",value:t.base_url,onChange:r=>e({...t,base_url:r}),placeholder:"https://api.openai.com/v1",helper:"API endpoint (change for local LLMs)",info:"Default API endpoint for the selected backend. Change this to point to a local LLM server (Ollama at http://localhost:11434/v1, Open WebUI, LM Studio, etc.) or a proxy."}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Oe,{label:"Timeout (sec)",value:t.timeout,onChange:r=>e({...t,timeout:r}),min:5,max:120,helper:"Maximum seconds to wait for response"}),b.jsx(Oe,{label:"Max Response Tokens",value:t.max_response_tokens,onChange:r=>e({...t,max_response_tokens:r}),min:100,helper:"Token limit for LLM responses"})]}),b.jsx(ht,{label:"Use System Prompt",checked:t.use_system_prompt,onChange:r=>e({...t,use_system_prompt:r}),helper:"Enable custom system instructions"}),t.use_system_prompt&&b.jsx(r0e,{label:"System Prompt",value:t.system_prompt,onChange:r=>e({...t,system_prompt:r}),rows:6,helper:"Instructions that shape the bot's personality",info:"Instructions that shape the bot's personality and behavior. The bot always follows these instructions. MeshAI adds mesh health data and environmental context automatically — you don't need to include those here."}),b.jsx(ht,{label:"Web Search",checked:t.web_search,onChange:r=>e({...t,web_search:r}),helper:"Enable web search tool (Open WebUI feature)"}),b.jsx(ht,{label:"Google Grounding",checked:t.google_grounding,onChange:r=>e({...t,google_grounding:r}),helper:"Ground responses in web search (Gemini only)"})]})}function h0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.weather}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(ii,{label:"Primary Provider",value:t.primary,onChange:r=>e({...t,primary:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"}],helper:"Main weather data source"}),b.jsx(ii,{label:"Fallback Provider",value:t.fallback,onChange:r=>e({...t,fallback:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"},{value:"none",label:"None"}],helper:"Backup if primary fails"})]}),b.jsx(Je,{label:"Default Location",value:t.default_location,onChange:r=>e({...t,default_location:r}),placeholder:"Your city, state",helper:"Location when none specified"})]})}function f0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.meshmonitor}),b.jsx(ht,{label:"Enable MeshMonitor",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Connect to AIDA MeshMonitor instance",info:"MeshMonitor by Yeraze provides node data, battery info, telemetry, and auto-responder patterns. MeshAI uses this as a data source and avoids duplicate responses."}),t.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(Je,{label:"URL",value:t.url,onChange:r=>e({...t,url:r}),placeholder:"http://192.168.1.100:8080",helper:"MeshMonitor API endpoint",info:"Full URL to your MeshMonitor instance. Usually runs on port 8080."}),b.jsx(ht,{label:"Inject Into Prompt",checked:t.inject_into_prompt,onChange:r=>e({...t,inject_into_prompt:r}),helper:"Tell LLM about MeshMonitor commands",info:"Adds MeshMonitor's auto-responder patterns to the LLM context so it knows what commands MeshMonitor handles."}),b.jsx(Oe,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:r=>e({...t,refresh_interval:r}),min:10,helper:"How often to fetch patterns"}),b.jsx(ht,{label:"Polite Mode",checked:t.polite_mode,onChange:r=>e({...t,polite_mode:r}),helper:"Reduce polling frequency",info:"Reduces polling frequency for shared instances to be a good neighbor."})]})]})}function d0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.knowledge}),b.jsx(ht,{label:"Enable Knowledge Base",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Answer questions from stored documents",info:"Uses RAG (Retrieval-Augmented Generation) to answer questions from a knowledge base. Supports Qdrant vector database or local SQLite with FTS5."}),t.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(ii,{label:"Backend",value:t.backend,onChange:r=>e({...t,backend:r}),options:[{value:"auto",label:"Auto (Qdrant -> SQLite)"},{value:"qdrant",label:"Qdrant"},{value:"sqlite",label:"SQLite"}],helper:"Knowledge storage backend",info:"Auto tries Qdrant first, falls back to SQLite. Qdrant provides hybrid search with dense+sparse embeddings. SQLite uses FTS5 keyword search."}),(t.backend==="qdrant"||t.backend==="auto")&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Je,{label:"Qdrant Host",value:t.qdrant_host,onChange:r=>e({...t,qdrant_host:r}),helper:"Qdrant server hostname",info:"IP or hostname of your Qdrant vector database server."}),b.jsx(Oe,{label:"Qdrant Port",value:t.qdrant_port,onChange:r=>e({...t,qdrant_port:r}),helper:"Default 6333"})]}),b.jsx(Je,{label:"Collection",value:t.qdrant_collection,onChange:r=>e({...t,qdrant_collection:r}),helper:"Qdrant collection name"}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Je,{label:"TEI Host",value:t.tei_host,onChange:r=>e({...t,tei_host:r}),helper:"Text Embeddings Inference host",info:"TEI service for generating dense embeddings. Uses BAAI/bge-m3 model."}),b.jsx(Oe,{label:"TEI Port",value:t.tei_port,onChange:r=>e({...t,tei_port:r}),helper:"Default 8090"})]}),b.jsx(ht,{label:"Use Sparse Embeddings",checked:t.use_sparse,onChange:r=>e({...t,use_sparse:r}),helper:"Enable hybrid search with sparse vectors",info:"Combines dense embeddings with sparse (keyword-based) embeddings using Reciprocal Rank Fusion for better search results."})]}),b.jsx(Je,{label:"SQLite DB Path",value:t.db_path,onChange:r=>e({...t,db_path:r}),helper:"Local knowledge database file"}),b.jsx(Oe,{label:"Top K Results",value:t.top_k,onChange:r=>e({...t,top_k:r}),min:1,max:20,helper:"Number of documents to retrieve"})]})]})}function v0e({source:t,onChange:e,onDelete:r}){const[n,i]=$.useState(!1),a={meshview:"Web-based mesh monitoring tool. Enter the full URL of a MeshView instance. No API key typically required.",meshmonitor:"AIDA MeshMonitor API. Provides node data and network statistics. Requires API token.",mqtt:"Subscribe directly to a Meshtastic MQTT broker for real-time packet data. This is push-based (instant) vs the polling approach of MeshView/MeshMonitor."};return b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>i(!n),children:[b.jsxs("div",{className:"flex items-center gap-3",children:[n?b.jsx(Iv,{size:16}):b.jsx(Ev,{size:16}),b.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`}),b.jsx("span",{className:"font-mono text-sm text-slate-200",children:t.name||"Unnamed Source"}),b.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:t.type})]}),b.jsx("button",{onClick:o=>{o.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:b.jsx(N0,{size:14})})]}),n&&b.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Je,{label:"Name",value:t.name,onChange:o=>e({...t,name:o}),helper:"Friendly name for this source"}),b.jsx(ii,{label:"Type",value:t.type,onChange:o=>e({...t,type:o}),options:[{value:"meshview",label:"MeshView"},{value:"meshmonitor",label:"MeshMonitor"},{value:"mqtt",label:"MQTT Broker"}],info:a[t.type]||""})]}),t.type!=="mqtt"&&b.jsx(Je,{label:"URL",value:t.url,onChange:o=>e({...t,url:o}),helper:"Full URL including protocol"}),t.type==="meshmonitor"&&b.jsx(Je,{label:"API Token",value:t.api_token,onChange:o=>e({...t,api_token:o}),type:"password",helper:"Bearer token for authentication"}),t.type==="mqtt"&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Je,{label:"Host",value:t.host||"",onChange:o=>e({...t,host:o}),helper:"MQTT broker hostname"}),b.jsx(Oe,{label:"Port",value:t.port||1883,onChange:o=>e({...t,port:o}),min:1,max:65535,helper:"1883 plain, 8883 TLS"})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Je,{label:"Username",value:t.username||"",onChange:o=>e({...t,username:o})}),b.jsx(Je,{label:"Password",value:t.password||"",onChange:o=>e({...t,password:o}),type:"password"})]}),b.jsx(Je,{label:"Topic Root",value:t.topic_root||"msh/US",onChange:o=>e({...t,topic_root:o}),helper:"Base topic to subscribe to"}),b.jsx(ht,{label:"Use TLS",checked:t.use_tls||!1,onChange:o=>e({...t,use_tls:o}),helper:"Encrypt MQTT connection"})]}),b.jsx(Oe,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:o=>e({...t,refresh_interval:o}),min:10,helper:"Polling frequency"}),b.jsx(ht,{label:"Enabled",checked:t.enabled,onChange:o=>e({...t,enabled:o})}),b.jsx(ht,{label:"Polite Mode",checked:t.polite_mode,onChange:o=>e({...t,polite_mode:o}),helper:"Reduce polling for shared instances"})]})]})}function p0e({data:t,onChange:e}){const r=()=>{e([...t,{name:"New Source",type:"meshview",url:"",api_token:"",refresh_interval:30,polite_mode:!1,enabled:!0,host:"",port:1883,username:"",password:"",topic_root:"msh/US",use_tls:!1}])};return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.mesh_sources}),t.map((n,i)=>b.jsx(v0e,{source:n,onChange:a=>{const o=[...t];o[i]=a,e(o)},onDelete:()=>{confirm(`Delete source "${n.name}"?`)&&e(t.filter((a,o)=>o!==i))}},i)),b.jsxs("button",{onClick:r,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[b.jsx(ay,{size:16})," Add Source"]})]})}function g0e({data:t,onChange:e}){const[r,n]=$.useState(null);return b.jsxs("div",{className:"space-y-6",children:[b.jsx(Kr,{text:qr.mesh_intelligence}),b.jsx(ht,{label:"Enable Mesh Intelligence",checked:t.enabled,onChange:i=>e({...t,enabled:i}),helper:"Activate health scoring and alerting"}),t.enabled&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Oe,{label:"Locality Radius (miles)",value:t.locality_radius_miles,onChange:i=>e({...t,locality_radius_miles:i}),min:1,step:.5,helper:"Region assignment radius",info:"Nodes within this distance of a region anchor point are assigned to that region."}),b.jsx(Oe,{label:"Offline Threshold (hours)",value:t.offline_threshold_hours,onChange:i=>e({...t,offline_threshold_hours:i}),min:1,helper:"Time until node marked offline",info:"A node is considered offline after not being heard for this many hours."})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Oe,{label:"Packet Threshold",value:t.packet_threshold,onChange:i=>e({...t,packet_threshold:i}),min:0,helper:"Min packets per 24h to flag",info:"Minimum packets per 24 hours. Nodes below this are flagged as low activity."}),b.jsx(Oe,{label:"Battery Warning %",value:t.battery_warning_percent,onChange:i=>e({...t,battery_warning_percent:i}),min:1,max:100,helper:"Global battery warning level"})]}),b.jsx(pa,{label:"Critical Nodes",value:t.critical_nodes,onChange:i=>e({...t,critical_nodes:i}),helper:"Short names of critical infrastructure",info:"Nodes that get priority alerting when they go offline. Use the node's short name (e.g., MHR, HPR)."}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Oe,{label:"Alert Channel",value:t.alert_channel,onChange:i=>e({...t,alert_channel:i}),min:-1,helper:"-1 = disabled",info:"Meshtastic channel number for broadcast alerts. Set to -1 to disable channel broadcasting."}),b.jsx(Oe,{label:"Alert Cooldown (min)",value:t.alert_cooldown_minutes,onChange:i=>e({...t,alert_cooldown_minutes:i}),min:1,helper:"Min time between repeat alerts",info:"Minimum minutes between repeated alerts for the same condition. Uses scaling cooldown (12h, 24h, 48h)."})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Regions",b.jsx(kr,{info:"Regions group mesh nodes by geographic area. Each region has an anchor point (lat/lon) and nodes within the region radius are automatically assigned. Regions enable localized reports, alerts, and health scoring."})]}),t.regions.map((i,a)=>b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>n(r===a?null:a),children:[b.jsxs("div",{className:"flex items-center gap-3",children:[r===a?b.jsx(Iv,{size:16}):b.jsx(Ev,{size:16}),b.jsx("span",{className:"font-medium text-slate-200",children:i.name||"Unnamed Region"}),b.jsx("span",{className:"text-xs text-slate-500",children:i.local_name})]}),b.jsx("button",{onClick:o=>{if(o.stopPropagation(),confirm(`Delete region "${i.name||"Unnamed Region"}"?`)){const s=t.regions.filter((l,u)=>u!==a);e({...t,regions:s})}},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:b.jsx(N0,{size:14})})]}),r===a&&b.jsxs("div",{className:"p-4 space-y-3 border-t border-[#1e2a3a]",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Je,{label:"Name",value:i.name,onChange:o=>{const s=[...t.regions];s[a]={...i,name:o},e({...t,regions:s})}}),b.jsx(Je,{label:"Local Name",value:i.local_name,onChange:o=>{const s=[...t.regions];s[a]={...i,local_name:o},e({...t,regions:s})}})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Oe,{label:"Latitude",value:i.lat,onChange:o=>{const s=[...t.regions];s[a]={...i,lat:o},e({...t,regions:s})},step:1e-4}),b.jsx(Oe,{label:"Longitude",value:i.lon,onChange:o=>{const s=[...t.regions];s[a]={...i,lon:o},e({...t,regions:s})},step:1e-4})]}),b.jsx(Je,{label:"Description",value:i.description,onChange:o=>{const s=[...t.regions];s[a]={...i,description:o},e({...t,regions:s})}}),b.jsx(pa,{label:"Aliases",value:i.aliases,onChange:o=>{const s=[...t.regions];s[a]={...i,aliases:o},e({...t,regions:s})}}),b.jsx(pa,{label:"Cities",value:i.cities,onChange:o=>{const s=[...t.regions];s[a]={...i,cities:o},e({...t,regions:s})}})]})]},a)),b.jsxs("button",{onClick:()=>{const i={name:"",local_name:"",lat:0,lon:0,description:"",aliases:[],cities:[]};e({...t,regions:[...t.regions,i]}),n(t.regions.length)},className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[b.jsx(ay,{size:16})," Add Region"]})]}),b.jsxs("div",{className:"space-y-3",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Rules",b.jsx(kr,{info:"Configure which conditions trigger alerts. Each rule can have an optional threshold value."})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Infrastructure"}),b.jsx(Gr,{label:"Infra Offline",description:"Alert when an infrastructure node (router/repeater) goes offline",checked:t.alert_rules.infra_offline,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_offline:i}})}),b.jsx(Gr,{label:"Infra Recovery",description:"Alert when an offline infrastructure node comes back online",checked:t.alert_rules.infra_recovery,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_recovery:i}})}),b.jsx(Gr,{label:"New Router",description:"Alert when a new router/repeater appears on the mesh",checked:t.alert_rules.new_router,onChange:i=>e({...t,alert_rules:{...t.alert_rules,new_router:i}})}),b.jsx(Gr,{label:"Feeder Offline",description:"Alert when a data source (MeshView/MeshMonitor) stops responding",checked:t.alert_rules.feeder_offline,onChange:i=>e({...t,alert_rules:{...t.alert_rules,feeder_offline:i}})}),b.jsx(Gr,{label:"Single Gateway",description:"Alert when an infrastructure node has only one connection path",checked:t.alert_rules.infra_single_gateway,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_single_gateway:i}})}),b.jsx(Gr,{label:"Region Blackout",description:"Alert when all infrastructure in a region goes offline",checked:t.alert_rules.region_total_blackout,onChange:i=>e({...t,alert_rules:{...t.alert_rules,region_total_blackout:i}})})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Power"}),b.jsx(Gr,{label:"Battery Warning",description:"Alert when infra node battery drops below warning threshold",checked:t.alert_rules.battery_warning,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_warning:i}}),threshold:t.alert_rules.battery_warning_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_warning_threshold:i}}),thresholdLabel:"Below",thresholdMin:10,thresholdMax:90,thresholdSuffix:"%"}),b.jsx(Gr,{label:"Battery Critical",description:"Alert at critical battery level",checked:t.alert_rules.battery_critical,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_critical:i}}),threshold:t.alert_rules.battery_critical_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_critical_threshold:i}}),thresholdLabel:"Below",thresholdMin:5,thresholdMax:50,thresholdSuffix:"%"}),b.jsx(Gr,{label:"Battery Emergency",description:"Alert at emergency battery level",checked:t.alert_rules.battery_emergency,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_emergency:i}}),threshold:t.alert_rules.battery_emergency_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_emergency_threshold:i}}),thresholdLabel:"Below",thresholdMin:1,thresholdMax:25,thresholdSuffix:"%"}),b.jsx(Gr,{label:"Battery Trend Declining",description:"Alert when battery shows a declining trend over 7 days",checked:t.alert_rules.battery_trend_declining,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_trend_declining:i}})}),b.jsx(Gr,{label:"Power Source Change",description:"Alert when a node switches between battery and USB power",checked:t.alert_rules.power_source_change,onChange:i=>e({...t,alert_rules:{...t.alert_rules,power_source_change:i}})}),b.jsx(Gr,{label:"Solar Not Charging",description:"Alert when a solar-powered node isn't charging during daylight",checked:t.alert_rules.solar_not_charging,onChange:i=>e({...t,alert_rules:{...t.alert_rules,solar_not_charging:i}})})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Utilization"}),b.jsx(Gr,{label:"High Utilization",description:"Alert when channel utilization stays high for extended periods",checked:t.alert_rules.sustained_high_util,onChange:i=>e({...t,alert_rules:{...t.alert_rules,sustained_high_util:i}}),threshold:t.alert_rules.high_util_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,high_util_threshold:i}}),thresholdLabel:"Above",thresholdMin:5,thresholdMax:50,thresholdSuffix:`% for ${t.alert_rules.high_util_hours}h`}),b.jsx(Gr,{label:"Packet Flood",description:"Alert when a single node sends excessive packets",checked:t.alert_rules.packet_flood,onChange:i=>e({...t,alert_rules:{...t.alert_rules,packet_flood:i}}),threshold:t.alert_rules.packet_flood_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,packet_flood_threshold:i}}),thresholdLabel:"Over",thresholdMin:100,thresholdMax:2e3,thresholdSuffix:"pkts/24h"})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Health Scores"}),b.jsx(Gr,{label:"Mesh Score Alert",description:"Alert when overall mesh health score drops below threshold",checked:t.alert_rules.mesh_score_alert,onChange:i=>e({...t,alert_rules:{...t.alert_rules,mesh_score_alert:i}}),threshold:t.alert_rules.mesh_score_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,mesh_score_threshold:i}}),thresholdLabel:"Below",thresholdMin:30,thresholdMax:90,thresholdSuffix:"/100"}),b.jsx(Gr,{label:"Region Score Alert",description:"Alert when a region's health score drops below threshold",checked:t.alert_rules.region_score_alert,onChange:i=>e({...t,alert_rules:{...t.alert_rules,region_score_alert:i}}),threshold:t.alert_rules.region_score_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,region_score_threshold:i}}),thresholdLabel:"Below",thresholdMin:30,thresholdMax:90,thresholdSuffix:"/100"})]})]})]})]})}function m0e({data:t,onChange:e}){var r,n,i,a,o,s,l,u,c,h,f,d,p,g,m,y;return b.jsxs("div",{className:"space-y-6",children:[b.jsx(Kr,{text:qr.environmental}),b.jsx(ht,{label:"Enable Environmental Feeds",checked:t.enabled,onChange:_=>e({...t,enabled:_}),helper:"Activate live data polling"}),t.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(pa,{label:"NWS Zones",value:t.nws_zones,onChange:_=>e({...t,nws_zones:_}),helper:"Zone IDs like IDZ016, IDZ030",info:"NWS forecast zones covering your mesh area. Find yours at https://www.weather.gov/pimar/PubZone",infoLink:"https://www.weather.gov/pimar/PubZone"}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NWS Weather Alerts"}),b.jsx(ht,{label:"",checked:t.nws.enabled,onChange:_=>e({...t,nws:{...t.nws,enabled:_}})})]}),t.nws.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(Je,{label:"User Agent",value:t.nws.user_agent,onChange:_=>e({...t,nws:{...t.nws,user_agent:_}}),placeholder:"(MeshAI, your@email.com)",helper:"Required format: (app_name, contact_email)",info:"Required by NWS. You make it up - just use the format (app_name, your_email). No signup needed."}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Oe,{label:"Tick Seconds",value:t.nws.tick_seconds,onChange:_=>e({...t,nws:{...t.nws,tick_seconds:_}}),min:30,helper:"Polling interval"}),b.jsx(ii,{label:"Min Severity",value:t.nws.severity_min,onChange:_=>e({...t,nws:{...t.nws,severity_min:_}}),options:[{value:"minor",label:"Minor"},{value:"moderate",label:"Moderate"},{value:"severe",label:"Severe"},{value:"extreme",label:"Extreme"}],helper:"Filter out lower severity alerts",info:"Minimum severity level to display. 'Moderate' filters out minor advisories. 'Severe' shows only serious warnings."})]})]})]}),b.jsx("div",{className:"border border-[#1e2a3a] rounded-lg p-4",children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NOAA Space Weather (SWPC)"}),b.jsx("p",{className:"text-xs text-slate-600",children:"Solar indices, geomagnetic storms, HF propagation"})]}),b.jsx(ht,{label:"",checked:t.swpc.enabled,onChange:_=>e({...t,swpc:{...t.swpc,enabled:_}})})]})}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Tropospheric Ducting"}),b.jsx("p",{className:"text-xs text-slate-600",children:"VHF/UHF extended range conditions"})]}),b.jsx(ht,{label:"",checked:t.ducting.enabled,onChange:_=>e({...t,ducting:{...t.ducting,enabled:_}})})]}),t.ducting.enabled&&b.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[b.jsx(Oe,{label:"Tick Seconds",value:t.ducting.tick_seconds,onChange:_=>e({...t,ducting:{...t.ducting,tick_seconds:_}}),min:60}),b.jsx(Oe,{label:"Latitude",value:t.ducting.latitude,onChange:_=>e({...t,ducting:{...t.ducting,latitude:_}}),step:.01,info:"Center point of your mesh coverage area. The ducting adapter checks atmospheric conditions at this location."}),b.jsx(Oe,{label:"Longitude",value:t.ducting.longitude,onChange:_=>e({...t,ducting:{...t.ducting,longitude:_}}),step:.01})]})]}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NIFC Fire Perimeters"}),b.jsx("p",{className:"text-xs text-slate-600",children:"Active wildfires from National Interagency Fire Center"})]}),b.jsx(ht,{label:"",checked:t.fires.enabled,onChange:_=>e({...t,fires:{...t.fires,enabled:_}})})]}),t.fires.enabled&&b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Oe,{label:"Tick Seconds",value:t.fires.tick_seconds,onChange:_=>e({...t,fires:{...t.fires,tick_seconds:_}}),min:60}),b.jsx(ii,{label:"State",value:t.fires.state,onChange:_=>e({...t,fires:{...t.fires,state:_}}),options:t0e,helper:"Filter fires by state",info:"Two-letter state code for NIFC wildfire filtering."})]})]}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Avalanche Advisories"}),b.jsx("p",{className:"text-xs text-slate-600",children:"Backcountry avalanche danger ratings"})]}),b.jsx(ht,{label:"",checked:t.avalanche.enabled,onChange:_=>e({...t,avalanche:{...t.avalanche,enabled:_}})})]}),t.avalanche.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(Oe,{label:"Tick Seconds",value:t.avalanche.tick_seconds,onChange:_=>e({...t,avalanche:{...t.avalanche,tick_seconds:_}}),min:60}),b.jsx(pa,{label:"Center IDs",value:t.avalanche.center_ids,onChange:_=>e({...t,avalanche:{...t.avalanche,center_ids:_}}),helper:"e.g., SNFAC, IPAC, FAC",info:"Find your local center at https://avalanche.org/avalanche-centers/",infoLink:"https://avalanche.org/avalanche-centers/"}),b.jsx(P8,{label:"Season Months",value:t.avalanche.season_months,onChange:_=>e({...t,avalanche:{...t.avalanche,season_months:_}}),helper:"e.g., 12, 1, 2, 3, 4",info:"Months when avalanche forecasts are active. Default Dec-Apr. Adjust for your region's season."})]})]}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"USGS Stream Gauges"}),b.jsx("p",{className:"text-xs text-slate-600",children:"River and stream water levels"})]}),b.jsx(ht,{label:"",checked:((r=t.usgs)==null?void 0:r.enabled)||!1,onChange:_=>{var S,T;return e({...t,usgs:{...t.usgs,enabled:_,tick_seconds:((S=t.usgs)==null?void 0:S.tick_seconds)||900,sites:((T=t.usgs)==null?void 0:T.sites)||[]}})}})]}),((n=t.usgs)==null?void 0:n.enabled)&&b.jsxs(b.Fragment,{children:[b.jsx(Oe,{label:"Tick Seconds",value:t.usgs.tick_seconds,onChange:_=>e({...t,usgs:{...t.usgs,tick_seconds:_}}),min:900,helper:"Minimum 15 min (900s)"}),b.jsx(pa,{label:"Site IDs",value:t.usgs.sites,onChange:_=>e({...t,usgs:{...t.usgs,sites:_}}),helper:"USGS gauge site numbers",info:"Find site IDs at waterdata.usgs.gov/nwis",infoLink:"https://waterdata.usgs.gov/nwis"})]})]}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"TomTom Traffic"}),b.jsx("p",{className:"text-xs text-slate-600",children:"Traffic flow on monitored corridors"})]}),b.jsx(ht,{label:"",checked:((i=t.traffic)==null?void 0:i.enabled)||!1,onChange:_=>{var S,T,C;return e({...t,traffic:{...t.traffic,enabled:_,tick_seconds:((S=t.traffic)==null?void 0:S.tick_seconds)||300,api_key:((T=t.traffic)==null?void 0:T.api_key)||"",corridors:((C=t.traffic)==null?void 0:C.corridors)||[]}})}})]}),((a=t.traffic)==null?void 0:a.enabled)&&b.jsxs(b.Fragment,{children:[b.jsx(Je,{label:"API Key",value:t.traffic.api_key,onChange:_=>e({...t,traffic:{...t.traffic,api_key:_}}),type:"password",helper:"Get key at developer.tomtom.com",infoLink:"https://developer.tomtom.com"}),b.jsx(Oe,{label:"Tick Seconds",value:t.traffic.tick_seconds,onChange:_=>e({...t,traffic:{...t.traffic,tick_seconds:_}}),min:60}),b.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Corridors (each with name, lat, lon):"}),(t.traffic.corridors||[]).map((_,S)=>b.jsxs("div",{className:"grid grid-cols-4 gap-2 items-end",children:[b.jsx(Je,{label:"Name",value:_.name,onChange:T=>{const C=[...t.traffic.corridors];C[S]={..._,name:T},e({...t,traffic:{...t.traffic,corridors:C}})}}),b.jsx(Oe,{label:"Lat",value:_.lat,onChange:T=>{const C=[...t.traffic.corridors];C[S]={..._,lat:T},e({...t,traffic:{...t.traffic,corridors:C}})},step:.01}),b.jsx(Oe,{label:"Lon",value:_.lon,onChange:T=>{const C=[...t.traffic.corridors];C[S]={..._,lon:T},e({...t,traffic:{...t.traffic,corridors:C}})},step:.01}),b.jsx("button",{onClick:()=>e({...t,traffic:{...t.traffic,corridors:t.traffic.corridors.filter((T,C)=>C!==S)}}),className:"px-2 py-2 text-xs text-red-400 hover:text-red-300 border border-red-400/30 rounded",children:"Remove"})]},S)),b.jsx("button",{onClick:()=>e({...t,traffic:{...t.traffic,corridors:[...t.traffic.corridors||[],{name:"",lat:0,lon:0}]}}),className:"text-xs text-accent hover:underline",children:"+ Add Corridor"})]})]}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"511 Road Conditions"}),b.jsx("p",{className:"text-xs text-slate-600",children:"State DOT road events and closures"})]}),b.jsx(ht,{label:"",checked:((o=t.roads511)==null?void 0:o.enabled)||!1,onChange:_=>{var S,T,C,M,A;return e({...t,roads511:{...t.roads511,enabled:_,tick_seconds:((S=t.roads511)==null?void 0:S.tick_seconds)||300,api_key:((T=t.roads511)==null?void 0:T.api_key)||"",base_url:((C=t.roads511)==null?void 0:C.base_url)||"",endpoints:((M=t.roads511)==null?void 0:M.endpoints)||["/get/event"],bbox:((A=t.roads511)==null?void 0:A.bbox)||[]}})}})]}),((s=t.roads511)==null?void 0:s.enabled)&&b.jsxs(b.Fragment,{children:[b.jsx(Je,{label:"Base URL",value:t.roads511.base_url,onChange:_=>e({...t,roads511:{...t.roads511,base_url:_}}),placeholder:"https://511.yourstate.gov/api/v2",helper:"State 511 API endpoint"}),b.jsx(Je,{label:"API Key",value:t.roads511.api_key,onChange:_=>e({...t,roads511:{...t.roads511,api_key:_}}),type:"password",helper:"Leave empty if not required"}),b.jsx(Oe,{label:"Tick Seconds",value:t.roads511.tick_seconds,onChange:_=>e({...t,roads511:{...t.roads511,tick_seconds:_}}),min:60}),b.jsx(pa,{label:"Endpoints",value:t.roads511.endpoints,onChange:_=>e({...t,roads511:{...t.roads511,endpoints:_}}),helper:"e.g., /get/event, /get/mountainpasses"}),b.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[b.jsx(Oe,{label:"West",value:((l=t.roads511.bbox)==null?void 0:l[0])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[0]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01}),b.jsx(Oe,{label:"South",value:((u=t.roads511.bbox)==null?void 0:u[1])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[1]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01}),b.jsx(Oe,{label:"East",value:((c=t.roads511.bbox)==null?void 0:c[2])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[2]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01}),b.jsx(Oe,{label:"North",value:((h=t.roads511.bbox)==null?void 0:h[3])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[3]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01})]}),b.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box filter (leave all 0 to disable)"})]})]}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NASA FIRMS Satellite Fire Detection"}),b.jsx("p",{className:"text-xs text-slate-600",children:"Near real-time thermal anomalies from satellites"})]}),b.jsx(ht,{label:"",checked:((f=t.firms)==null?void 0:f.enabled)||!1,onChange:_=>{var S,T,C,M,A,k,E;return e({...t,firms:{...t.firms,enabled:_,tick_seconds:((S=t.firms)==null?void 0:S.tick_seconds)||1800,map_key:((T=t.firms)==null?void 0:T.map_key)||"",source:((C=t.firms)==null?void 0:C.source)||"VIIRS_SNPP_NRT",bbox:((M=t.firms)==null?void 0:M.bbox)||[],day_range:((A=t.firms)==null?void 0:A.day_range)||1,confidence_min:((k=t.firms)==null?void 0:k.confidence_min)||"nominal",proximity_km:((E=t.firms)==null?void 0:E.proximity_km)||10}})}})]}),((d=t.firms)==null?void 0:d.enabled)&&b.jsxs(b.Fragment,{children:[b.jsx(Je,{label:"MAP Key",value:t.firms.map_key,onChange:_=>e({...t,firms:{...t.firms,map_key:_}}),type:"password",helper:"Get key at firms.modaps.eosdis.nasa.gov/api/area/",infoLink:"https://firms.modaps.eosdis.nasa.gov/api/area/"}),b.jsx(Oe,{label:"Tick Seconds",value:t.firms.tick_seconds,onChange:_=>e({...t,firms:{...t.firms,tick_seconds:_}}),min:300,helper:"Minimum 5 min (300s)"}),b.jsx(ii,{label:"Satellite Source",value:t.firms.source,onChange:_=>e({...t,firms:{...t.firms,source:_}}),options:[{value:"VIIRS_SNPP_NRT",label:"VIIRS SNPP (Near Real-Time)"},{value:"VIIRS_NOAA20_NRT",label:"VIIRS NOAA-20 (Near Real-Time)"},{value:"MODIS_NRT",label:"MODIS (Near Real-Time)"}]}),b.jsx(Oe,{label:"Day Range",value:t.firms.day_range,onChange:_=>e({...t,firms:{...t.firms,day_range:_}}),min:1,max:10,helper:"1-10 days of data"}),b.jsx(ii,{label:"Minimum Confidence",value:t.firms.confidence_min,onChange:_=>e({...t,firms:{...t.firms,confidence_min:_}}),options:[{value:"low",label:"Low"},{value:"nominal",label:"Nominal"},{value:"high",label:"High"}]}),b.jsx(Oe,{label:"Proximity (km)",value:t.firms.proximity_km,onChange:_=>e({...t,firms:{...t.firms,proximity_km:_}}),step:.5,helper:"Distance to match known fires"}),b.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[b.jsx(Oe,{label:"West",value:((p=t.firms.bbox)==null?void 0:p[0])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[0]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01}),b.jsx(Oe,{label:"South",value:((g=t.firms.bbox)==null?void 0:g[1])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[1]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01}),b.jsx(Oe,{label:"East",value:((m=t.firms.bbox)==null?void 0:m[2])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[2]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01}),b.jsx(Oe,{label:"North",value:((y=t.firms.bbox)==null?void 0:y[3])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[3]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01})]}),b.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box for monitoring area (required)"})]})]})]})]})}function y0e({channel:t,onChange:e,onDelete:r,onTest:n}){var h;const[i,a]=$.useState(!1),[o,s]=$.useState(!1),l=[{value:"mesh_broadcast",label:"Mesh Broadcast"},{value:"mesh_dm",label:"Mesh DM"},{value:"email",label:"Email"},{value:"webhook",label:"Webhook"}],u={mesh_broadcast:"Broadcast alerts to a mesh channel. All nodes on that channel receive the alert.",mesh_dm:"Send alerts as direct messages to specific nodes.",email:"Send alert emails via SMTP. Works with Gmail, Outlook, and any SMTP server.",webhook:"POST alert JSON to any URL. Works with Discord webhooks, ntfy.sh, Pushover, Slack, Home Assistant, or any service that accepts HTTP POST."},c=async()=>{s(!0),await n(),s(!1)};return b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>a(!i),children:[b.jsxs("div",{className:"flex items-center gap-3",children:[i?b.jsx(Iv,{size:16}):b.jsx(Ev,{size:16}),b.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`}),b.jsx("span",{className:"font-medium text-slate-200",children:t.id||"New Channel"}),b.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:((h=l.find(f=>f.value===t.type))==null?void 0:h.label)||t.type})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{onClick:f=>{f.stopPropagation(),c()},disabled:o,className:"p-1.5 text-blue-400 hover:text-blue-300 hover:bg-blue-500/10 rounded disabled:opacity-50",title:"Send test alert",children:b.jsx(JZ,{size:14})}),b.jsx("button",{onClick:f=>{f.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:b.jsx(N0,{size:14})})]})]}),i&&b.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Je,{label:"Channel ID",value:t.id,onChange:f=>e({...t,id:f}),helper:"Unique identifier for this channel",info:"Used to reference this channel in notification rules. Use lowercase with hyphens (e.g., 'mesh-main', 'email-admin')."}),b.jsx(ii,{label:"Type",value:t.type,onChange:f=>e({...t,type:f}),options:l,info:u[t.type]||"Select a channel type"})]}),b.jsx(ht,{label:"Enabled",checked:t.enabled,onChange:f=>e({...t,enabled:f}),helper:"Disable to temporarily stop alerts on this channel"}),t.type==="mesh_broadcast"&&b.jsx(Oe,{label:"Channel Index",value:t.channel_index,onChange:f=>e({...t,channel_index:f}),min:0,max:7,helper:"Mesh channel number (0-7)",info:"The mesh channel to broadcast alerts on. Channel 0 is typically the default channel."}),t.type==="mesh_dm"&&b.jsx(pa,{label:"Node IDs",value:t.node_ids,onChange:f=>e({...t,node_ids:f}),helper:"Node IDs to receive DM alerts",info:"Node IDs that receive direct message alerts. Enter the full node ID (e.g., '!a1b2c3d4') for each recipient."}),t.type==="email"&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Je,{label:"SMTP Host",value:t.smtp_host,onChange:f=>e({...t,smtp_host:f}),placeholder:"smtp.gmail.com",helper:"SMTP server hostname",info:"The SMTP server for sending emails. Gmail: smtp.gmail.com, Outlook: smtp.office365.com"}),b.jsx(Oe,{label:"SMTP Port",value:t.smtp_port,onChange:f=>e({...t,smtp_port:f}),min:1,max:65535,helper:"587 (TLS) or 465 (SSL)",info:"SMTP port. Use 587 for TLS (recommended) or 465 for SSL."})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Je,{label:"SMTP User",value:t.smtp_user,onChange:f=>e({...t,smtp_user:f}),placeholder:"you@gmail.com",helper:"Login username"}),b.jsx(Je,{label:"SMTP Password",value:t.smtp_password,onChange:f=>e({...t,smtp_password:f}),type:"password",helper:"App password recommended",info:"SMTP server for sending alert emails. Gmail users: use an App Password, not your regular password. Generate one at myaccount.google.com/apppasswords"})]}),b.jsx(ht,{label:"Use TLS",checked:t.smtp_tls,onChange:f=>e({...t,smtp_tls:f}),helper:"Encrypt SMTP connection",info:"Enable TLS encryption for the SMTP connection. Required for most modern email servers."}),b.jsx(Je,{label:"From Address",value:t.from_address,onChange:f=>e({...t,from_address:f}),placeholder:"alerts@yourdomain.com",helper:"Sender email address",info:"The email address that appears as the sender. Some servers require this to match your login."}),b.jsx(pa,{label:"Recipients",value:t.recipients,onChange:f=>e({...t,recipients:f}),helper:"Email addresses to receive alerts",info:"List of email addresses that will receive alerts from this channel."})]}),t.type==="webhook"&&b.jsxs(b.Fragment,{children:[b.jsx(Je,{label:"Webhook URL",value:t.url,onChange:f=>e({...t,url:f}),placeholder:"https://discord.com/api/webhooks/...",helper:"POST endpoint for alerts",info:"POST alert JSON to any URL. Works with Discord webhooks, ntfy.sh, Pushover, Slack, Home Assistant, or any service that accepts HTTP POST."}),b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Headers (optional)",b.jsx(kr,{info:"Additional HTTP headers to send with the webhook request. Useful for authentication tokens or custom headers required by the receiving service."})]}),b.jsx("div",{className:"text-xs text-slate-600",children:"Custom headers can be configured in the YAML config file"})]})]})]})]})}function _0e({rule:t,categories:e,channels:r,onChange:n,onDelete:i}){var c,h,f,d;const[a,o]=$.useState(!1),s=[{value:"info",label:"Info"},{value:"advisory",label:"Advisory"},{value:"watch",label:"Watch"},{value:"warning",label:"Warning"},{value:"critical",label:"Critical"},{value:"emergency",label:"Emergency"}],l=p=>{const g=t.categories||[];g.includes(p)?n({...t,categories:g.filter(m=>m!==p)}):n({...t,categories:[...g,p]})},u=p=>{const g=t.channel_ids||[];g.includes(p)?n({...t,channel_ids:g.filter(m=>m!==p)}):n({...t,channel_ids:[...g,p]})};return b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>o(!a),children:[b.jsxs("div",{className:"flex items-center gap-3",children:[a?b.jsx(Iv,{size:16}):b.jsx(Ev,{size:16}),b.jsx("span",{className:"font-medium text-slate-200",children:t.name||"New Rule"}),b.jsxs("span",{className:"text-xs text-slate-500",children:[((c=t.categories)==null?void 0:c.length)||0," categories → ",((h=t.channel_ids)==null?void 0:h.length)||0," channels"]})]}),b.jsx("button",{onClick:p=>{p.stopPropagation(),i()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:b.jsx(N0,{size:14})})]}),a&&b.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[b.jsx(Je,{label:"Rule Name",value:t.name,onChange:p=>n({...t,name:p}),helper:"Human-readable name for this rule",info:"A descriptive name to identify this rule. Example: 'Emergency Alerts', 'Fire Notifications', 'Infrastructure Warnings'"}),b.jsx(ii,{label:"Minimum Severity",value:t.min_severity,onChange:p=>n({...t,min_severity:p}),options:s,helper:"Only alerts at or above this severity",info:"Only alerts at this severity or above will trigger this rule. 'warning' is recommended for most channels. Use 'info' to receive all alerts."}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Categories",b.jsx(kr,{info:"Which alert types this rule applies to. Select none to match all categories. Alerts matching any selected category (AND meeting severity threshold) will trigger this rule."})]}),b.jsx("div",{className:"text-xs text-slate-500 mb-2",children:((f=t.categories)==null?void 0:f.length)===0?"All categories (none selected)":`${(d=t.categories)==null?void 0:d.length} selected`}),b.jsx("div",{className:"max-h-48 overflow-y-auto border border-[#1e2a3a] rounded-lg p-2 space-y-1",children:e.map(p=>{var g;return b.jsxs("label",{className:"flex items-start gap-2 p-2 rounded hover:bg-[#0a0e17] cursor-pointer",children:[b.jsx("input",{type:"checkbox",checked:((g=t.categories)==null?void 0:g.includes(p.id))||!1,onChange:()=>l(p.id),className:"mt-0.5 rounded border-slate-600 bg-[#0a0e17] text-accent focus:ring-accent"}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("div",{className:"text-sm text-slate-200",children:p.name}),b.jsx("div",{className:"text-xs text-slate-500",children:p.description})]})]},p.id)})})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Delivery Channels",b.jsx(kr,{info:"Which channels receive alerts matching this rule. Select at least one channel."})]}),r.length===0?b.jsx("div",{className:"text-xs text-slate-500 p-2 border border-[#1e2a3a] rounded-lg",children:"No channels configured. Add channels above first."}):b.jsx("div",{className:"border border-[#1e2a3a] rounded-lg p-2 space-y-1",children:r.map(p=>{var g;return b.jsxs("label",{className:"flex items-center gap-2 p-2 rounded hover:bg-[#0a0e17] cursor-pointer",children:[b.jsx("input",{type:"checkbox",checked:((g=t.channel_ids)==null?void 0:g.includes(p.id))||!1,onChange:()=>u(p.id),className:"rounded border-slate-600 bg-[#0a0e17] text-accent focus:ring-accent"}),b.jsx("span",{className:"text-sm text-slate-200",children:p.id}),b.jsxs("span",{className:"text-xs text-slate-500",children:["(",p.type,")"]})]},p.id)})})]}),b.jsx(ht,{label:"Override Quiet Hours",checked:t.override_quiet,onChange:p=>n({...t,override_quiet:p}),helper:"Send alerts even during quiet hours",info:"When enabled, this rule sends alerts even during quiet hours. Use for critical conditions like fires or infrastructure failures."})]})]})}function x0e({data:t,onChange:e}){const[r,n]=$.useState([]),[i,a]=$.useState(null);$.useEffect(()=>{fetch("/api/notifications/categories").then(u=>u.json()).then(n).catch(()=>n([]))},[]);const o=()=>{const u={id:"",type:"mesh_broadcast",enabled:!0,channel_index:0,node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],url:"",headers:{}};e({...t,channels:[...t.channels||[],u]})},s=()=>{const u={name:"",categories:[],min_severity:"warning",channel_ids:[],override_quiet:!1};e({...t,rules:[...t.rules||[],u]})},l=async u=>{try{const h=await(await fetch(`/api/notifications/channels/${u}/test`,{method:"POST"})).json();a(h),setTimeout(()=>a(null),5e3)}catch{a({success:!1,message:"Test failed"}),setTimeout(()=>a(null),5e3)}};return b.jsxs("div",{className:"space-y-6",children:[b.jsx(Kr,{text:qr.notifications}),b.jsx(ht,{label:"Enable Notifications",checked:t.enabled,onChange:u=>e({...t,enabled:u}),helper:"Master switch for all notification delivery",info:"When disabled, no alerts will be delivered through any channel. The alert engine still runs and records alerts to history."}),i&&b.jsxs("div",{className:`p-3 rounded-lg text-sm ${i.success?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"}`,children:[i.success?b.jsx(H3,{size:14,className:"inline mr-2"}):b.jsx(d2,{size:14,className:"inline mr-2"}),i.message]}),t.enabled&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"space-y-3",children:[b.jsx("div",{className:"flex items-center justify-between",children:b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Channels",b.jsx(kr,{info:"Where alerts get delivered. Add channels for each destination you want to receive alerts."})]})}),b.jsx("p",{className:"text-sm text-slate-500 -mt-1",children:"Where alerts get delivered. Add channels for each destination you want to receive alerts."}),(t.channels||[]).map((u,c)=>b.jsx(y0e,{channel:u,onChange:h=>{const f=[...t.channels||[]];f[c]=h,e({...t,channels:f})},onDelete:()=>{confirm(`Delete channel "${u.id||"New Channel"}"?`)&&e({...t,channels:(t.channels||[]).filter((h,f)=>f!==c)})},onTest:()=>l(u.id)},c)),b.jsxs("button",{onClick:o,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[b.jsx(ay,{size:16})," Add Channel"]})]}),b.jsxs("div",{className:"space-y-3",children:[b.jsx("div",{className:"flex items-center justify-between",children:b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Rules",b.jsx(kr,{info:"Rules connect alert categories to delivery channels. When a condition matches a rule, the alert is sent to all channels in that rule."})]})}),b.jsx("p",{className:"text-sm text-slate-500 -mt-1",children:"Rules connect alert categories to delivery channels. When a condition matches a rule, the alert is sent to all channels in that rule."}),(t.rules||[]).map((u,c)=>b.jsx(_0e,{rule:u,categories:r,channels:t.channels||[],onChange:h=>{const f=[...t.rules||[]];f[c]=h,e({...t,rules:f})},onDelete:()=>{confirm(`Delete rule "${u.name||"New Rule"}"?`)&&e({...t,rules:(t.rules||[]).filter((h,f)=>f!==c)})}},c)),b.jsxs("button",{onClick:s,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[b.jsx(ay,{size:16})," Add Rule"]})]}),b.jsxs("div",{className:"space-y-3",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Quiet Hours",b.jsx(kr,{info:"Suppress non-emergency alerts during sleeping hours. Emergency and critical alerts always get through. Rules with 'Override Quiet Hours' enabled will also deliver during this time."})]}),b.jsx("p",{className:"text-sm text-slate-500 -mt-1",children:"Suppress non-emergency alerts during sleeping hours. Emergency and critical alerts always get through."}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Je,{label:"Start Time",value:t.quiet_hours_start||"22:00",onChange:u=>e({...t,quiet_hours_start:u}),placeholder:"22:00",helper:"When quiet hours begin",info:"Time in 24-hour format (HH:MM) when quiet hours start. Alerts below emergency severity will be held until quiet hours end."}),b.jsx(Je,{label:"End Time",value:t.quiet_hours_end||"06:00",onChange:u=>e({...t,quiet_hours_end:u}),placeholder:"06:00",helper:"When quiet hours end",info:"Time in 24-hour format (HH:MM) when quiet hours end. Held alerts will be delivered at this time."})]})]}),b.jsxs("div",{className:"space-y-3",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Deduplication",b.jsx(kr,{info:"Prevents alert spam. If the same condition fires multiple times within this window, only the first one is delivered."})]}),b.jsx(Oe,{label:"Dedup Window (seconds)",value:t.dedup_seconds||600,onChange:u=>e({...t,dedup_seconds:u}),min:0,max:86400,helper:"Don't re-send the same alert within this window",info:"Prevents alert spam. If the same condition fires multiple times within this window, only the first one is delivered. Default is 600 seconds (10 minutes)."})]})]})]})}function S0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.dashboard}),b.jsx(ht,{label:"Enable Dashboard",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Run the web dashboard"}),t.enabled&&b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Je,{label:"Host",value:t.host,onChange:r=>e({...t,host:r}),placeholder:"0.0.0.0",helper:"Network bind address",info:"0.0.0.0 = accessible from any device on the network. 127.0.0.1 = only accessible from this machine."}),b.jsx(Oe,{label:"Port",value:t.port,onChange:r=>e({...t,port:r}),min:1,max:65535,helper:"Dashboard URL port",info:"Port number for the web dashboard URL. You access the dashboard at http://your-ip:port"})]})]})}function b0e(){var E;const[t,e]=$.useState(null),[r,n]=$.useState(null),[i,a]=$.useState("bot"),[o,s]=$.useState(!0),[l,u]=$.useState(!1),[c,h]=$.useState(null),[f,d]=$.useState(null),[p,g]=$.useState(!1),[m,y]=$.useState(!1),_=$.useCallback(async()=>{try{const D=await fetch("/api/config");if(!D.ok)throw new Error("Failed to fetch config");const I=await D.json();e(I),n(JSON.parse(JSON.stringify(I))),y(!1),h(null)}catch(D){h(D instanceof Error?D.message:"Unknown error")}finally{s(!1)}},[]);$.useEffect(()=>{document.title="Config — MeshAI",_()},[_]),$.useEffect(()=>{t&&r&&y(JSON.stringify(t)!==JSON.stringify(r))},[t,r]);const S=async()=>{if(t){u(!0),h(null),d(null);try{const D=t[i],I=await fetch(`/api/config/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)}),z=await I.json();if(!I.ok)throw new Error(z.detail||"Save failed");d(`${i} saved successfully`),n(JSON.parse(JSON.stringify(t))),y(!1),z.restart_required&&g(!0),setTimeout(()=>d(null),3e3)}catch(D){h(D instanceof Error?D.message:"Save failed")}finally{u(!1)}}},T=()=>{r&&(e(JSON.parse(JSON.stringify(r))),y(!1))},C=async()=>{try{await fetch("/api/restart",{method:"POST"}),g(!1),d("Restart initiated")}catch{h("Restart failed")}},M=(D,I)=>{t&&e({...t,[D]:I})};if(o)return b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsx("div",{className:"text-slate-400",children:"Loading configuration..."})});if(!t)return b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsx("div",{className:"text-red-400",children:"Failed to load configuration"})});const A=()=>{switch(i){case"bot":return b.jsx(n0e,{data:t.bot,onChange:D=>M("bot",D)});case"connection":return b.jsx(i0e,{data:t.connection,onChange:D=>M("connection",D)});case"response":return b.jsx(a0e,{data:t.response,onChange:D=>M("response",D)});case"history":return b.jsx(o0e,{data:t.history,onChange:D=>M("history",D)});case"memory":return b.jsx(s0e,{data:t.memory,onChange:D=>M("memory",D)});case"context":return b.jsx(l0e,{data:t.context,onChange:D=>M("context",D)});case"commands":return b.jsx(u0e,{data:t.commands,onChange:D=>M("commands",D)});case"llm":return b.jsx(c0e,{data:t.llm,onChange:D=>M("llm",D)});case"weather":return b.jsx(h0e,{data:t.weather,onChange:D=>M("weather",D)});case"meshmonitor":return b.jsx(f0e,{data:t.meshmonitor,onChange:D=>M("meshmonitor",D)});case"knowledge":return b.jsx(d0e,{data:t.knowledge,onChange:D=>M("knowledge",D)});case"mesh_sources":return b.jsx(p0e,{data:t.mesh_sources,onChange:D=>M("mesh_sources",D)});case"mesh_intelligence":return b.jsx(g0e,{data:t.mesh_intelligence,onChange:D=>M("mesh_intelligence",D)});case"environmental":return b.jsx(m0e,{data:t.environmental,onChange:D=>M("environmental",D)});case"notifications":return b.jsx(x0e,{data:t.notifications,onChange:D=>M("notifications",D)});case"dashboard":return b.jsx(S0e,{data:t.dashboard,onChange:D=>M("dashboard",D)});default:return null}},k=((E=pz.find(D=>D.key===i))==null?void 0:E.label)||i;return b.jsxs("div",{className:"flex gap-6 h-[calc(100vh-8rem)]",children:[b.jsx("div",{className:"w-48 flex-shrink-0 space-y-1",children:pz.map(({key:D,label:I,icon:z})=>b.jsxs("button",{onClick:()=>a(D),className:`w-full flex items-center gap-2 px-3 py-2 rounded text-sm transition-colors ${i===D?"bg-accent text-white":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[b.jsx(z,{size:16}),b.jsx("span",{children:I}),m&&i===D&&b.jsx("span",{className:"ml-auto w-2 h-2 bg-amber-500 rounded-full"})]},D))}),b.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[b.jsxs("div",{className:"flex items-center justify-between mb-6",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx(Y3,{size:20,className:"text-slate-500"}),b.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:k})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[m&&b.jsxs("button",{onClick:T,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-slate-400 hover:text-slate-200 bg-bg-hover rounded transition-colors",children:[b.jsx(XZ,{size:14}),"Discard"]}),b.jsxs("button",{onClick:S,disabled:l||!m,className:"flex items-center gap-1.5 px-4 py-1.5 text-sm bg-accent text-white rounded hover:bg-accent/80 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[l?b.jsx(YZ,{size:14,className:"animate-spin"}):b.jsx(KZ,{size:14}),"Save"]})]})]}),p&&b.jsxs("div",{className:"flex items-center justify-between p-3 mb-4 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:[b.jsxs("div",{className:"flex items-center gap-2 text-amber-400",children:[b.jsx(ms,{size:16}),b.jsx("span",{className:"text-sm",children:"Restart required for changes to take effect"})]}),b.jsx("button",{onClick:C,className:"px-3 py-1 text-sm bg-amber-500 text-white rounded hover:bg-amber-600 transition-colors",children:"Restart Now"})]}),c&&b.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-red-500/10 border border-red-500/30 rounded-lg text-red-400",children:[b.jsx(d2,{size:16}),b.jsx("span",{className:"text-sm",children:c})]}),f&&b.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-green-500/10 border border-green-500/30 rounded-lg text-green-400",children:[b.jsx(H3,{size:16}),b.jsx("span",{className:"text-sm",children:f})]}),b.jsx("div",{className:"flex-1 overflow-y-auto pr-2",children:b.jsx("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:A()})})]})]})}const gz={infra_offline:n$,infra_recovery:X3,battery_warning:Lx,battery_critical:Lx,battery_emergency:Lx,hf_blackout:v2,uhf_ducting:Zc,weather_warning:Ud,weather_watch:Ud,new_router:Zc,packet_flood:ms,sustained_high_util:ms,region_blackout:E0,default:Wd};function w0e(t){return gz[t]||gz.default}function k8(t){switch(t==null?void 0:t.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",badge:"bg-red-500/20 text-red-400",iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",badge:"bg-amber-500/20 text-amber-400",iconColor:"text-amber-500"};case"watch":return{bg:"bg-yellow-500/10",border:"border-yellow-500",badge:"bg-yellow-500/20 text-yellow-400",iconColor:"text-yellow-500"};case"advisory":case"info":default:return{bg:"bg-blue-500/10",border:"border-blue-500",badge:"bg-blue-500/20 text-blue-400",iconColor:"text-blue-500"}}}function T0e(t){const e=typeof t=="number"?new Date(t*1e3):new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/1e3),a=Math.floor(i/60),o=Math.floor(a/60),s=Math.floor(o/24);return i<60?"Just now":a<60?`${a}m ago`:o<24?`${o}h ago`:`${s}d ago`}function C0e(t){return(typeof t=="number"?new Date(t*1e3):new Date(t)).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}function M0e(t){return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m`:t<86400?`${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`:`${Math.floor(t/86400)}d`}function A0e({alert:t,onAcknowledge:e}){var i;const r=k8(t.severity),n=w0e(t.type);return b.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-4 ${r.border}`,children:b.jsxs("div",{className:"flex items-start gap-3",children:[b.jsx(n,{size:20,className:r.iconColor}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[b.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${r.badge}`,children:(i=t.severity)==null?void 0:i.toUpperCase()}),b.jsx("span",{className:"text-xs text-slate-500",children:t.type})]}),b.jsx("div",{className:"text-sm text-slate-200",children:t.message}),b.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs text-slate-500",children:[b.jsxs("span",{className:"flex items-center gap-1",children:[b.jsx(ny,{size:12}),t.timestamp?T0e(t.timestamp):"Just now"]}),t.scope_value&&b.jsxs("span",{children:[t.scope_type,": ",t.scope_value]})]})]}),b.jsx("button",{onClick:()=>e(t),className:"px-3 py-1 text-xs text-slate-400 hover:text-slate-200 border border-border rounded hover:bg-bg-hover transition-colors",children:"Acknowledge"})]})})}function L0e({history:t,typeFilter:e,severityFilter:r,onTypeFilterChange:n,onSeverityFilterChange:i,page:a,totalPages:o,onPageChange:s}){const l=["all","infra_offline","infra_recovery","battery_warning","battery_critical","hf_blackout","uhf_ducting","weather_warning","new_router","packet_flood"],u=["all","critical","warning","watch","info"];return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg",children:[b.jsxs("div",{className:"p-4 border-b border-border flex items-center gap-4",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(f2,{size:14,className:"text-slate-400"}),b.jsx("span",{className:"text-sm text-slate-400",children:"Filter:"})]}),b.jsx("select",{value:e,onChange:c=>n(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:l.map(c=>b.jsx("option",{value:c,children:c==="all"?"All Types":c.replace(/_/g," ")},c))}),b.jsx("select",{value:r,onChange:c=>i(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:u.map(c=>b.jsx("option",{value:c,children:c==="all"?"All Severities":c.charAt(0).toUpperCase()+c.slice(1)},c))})]}),b.jsx("div",{className:"overflow-x-auto",children:b.jsxs("table",{className:"w-full",children:[b.jsx("thead",{children:b.jsxs("tr",{className:"border-b border-border",children:[b.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Time"}),b.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Type"}),b.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Severity"}),b.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Message"}),b.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Duration"})]})}),b.jsx("tbody",{children:t.length>0?t.map((c,h)=>{const f=k8(c.severity);return b.jsxs("tr",{className:"border-b border-border hover:bg-bg-hover",children:[b.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono whitespace-nowrap",children:C0e(c.timestamp)}),b.jsx("td",{className:"p-4 text-sm text-slate-300",children:c.type.replace(/_/g," ")}),b.jsx("td",{className:"p-4",children:b.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${f.badge}`,children:c.severity})}),b.jsx("td",{className:"p-4 text-sm text-slate-200 max-w-md truncate",children:c.message}),b.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono",children:c.duration?M0e(c.duration):"-"})]},c.id||h)}):b.jsx("tr",{children:b.jsx("td",{colSpan:5,className:"p-8 text-center text-slate-500",children:"No alert history available"})})})]})}),o>1&&b.jsxs("div",{className:"p-4 border-t border-border flex items-center justify-between",children:[b.jsxs("span",{className:"text-sm text-slate-400",children:["Page ",a," of ",o]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{onClick:()=>s(a-1),disabled:a<=1,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:b.jsx(zZ,{size:16})}),b.jsx("button",{onClick:()=>s(a+1),disabled:a>=o,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:b.jsx(Ev,{size:16})})]})]})]})}function P0e({subscription:t}){const e=()=>{if(t.sub_type==="alerts")return"Real-time";const i=t.schedule_time||"0000",a=parseInt(i.slice(0,2)),o=i.slice(2),s=a>=12?"PM":"AM";let u=`${a%12||12}:${o} ${s}`;return t.sub_type==="weekly"&&t.schedule_day&&(u+=` ${t.schedule_day.charAt(0).toUpperCase()}${t.schedule_day.slice(1)}`),u},n=(()=>{switch(t.sub_type){case"alerts":return Wd;case"daily":return ny;case"weekly":return ny;default:return Wd}})();return b.jsx("div",{className:"p-4 rounded-lg bg-bg-hover border border-border",children:b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center",children:b.jsx(n,{size:18,className:"text-blue-400"})}),b.jsxs("div",{className:"flex-1",children:[b.jsxs("div",{className:"text-sm text-slate-200 font-medium",children:[t.sub_type.charAt(0).toUpperCase()+t.sub_type.slice(1),t.scope_type!=="mesh"&&t.scope_value&&b.jsxs("span",{className:"text-slate-400 font-normal ml-2",children:["(",t.scope_type,": ",t.scope_value,")"]})]}),b.jsxs("div",{className:"text-xs text-slate-500 mt-0.5",children:[e()," • Node ",t.user_id]})]}),b.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`})]})})}function k0e(){const[t,e]=$.useState([]),[r,n]=$.useState([]),[i,a]=$.useState([]),[o,s]=$.useState(!0),[l,u]=$.useState(null),[c,h]=$.useState("all"),[f,d]=$.useState("all"),[p,g]=$.useState(1),[m,y]=$.useState(1),_=20,[S,T]=$.useState(new Set),{lastAlert:C}=p2();$.useEffect(()=>{document.title="Alerts — MeshAI"},[]),$.useEffect(()=>{Promise.all([q3().catch(()=>[]),Pk(_,0).catch(()=>({items:[],total:0})),l$().catch(()=>[])]).then(([k,E,D])=>{e(k),Array.isArray(E)?(n(E),y(1)):(n(E.items||[]),y(Math.ceil((E.total||0)/_))),a(D),s(!1)}).catch(k=>{u(k.message),s(!1)})},[]),$.useEffect(()=>{C&&e(k=>k.some(D=>D.type===C.type&&D.message===C.message)?k:[C,...k])},[C]),$.useEffect(()=>{const k=(p-1)*_;Pk(_,k,c,f).then(E=>{Array.isArray(E)?(n(E),y(1)):(n(E.items||[]),y(Math.ceil((E.total||0)/_)))}).catch(()=>{})},[p,c,f]);const M=$.useCallback(k=>{const E=`${k.type}-${k.message}-${k.timestamp}`;T(D=>new Set([...D,E]))},[]),A=t.filter(k=>{const E=`${k.type}-${k.message}-${k.timestamp}`;return!S.has(E)});return o?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsx("div",{className:"text-slate-400",children:"Loading alerts..."})}):l?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsxs("div",{className:"text-red-400",children:["Error: ",l]})}):b.jsxs("div",{className:"space-y-6",children:[b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(ms,{size:14}),"Active Alerts (",A.length,")"]}),A.length>0?b.jsx("div",{className:"space-y-3",children:A.map((k,E)=>b.jsx(A0e,{alert:k,onAcknowledge:M},`${k.type}-${k.timestamp}-${E}`))}):b.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-8",children:[b.jsx(sd,{size:20,className:"text-green-500"}),b.jsx("span",{children:"No active alerts — all systems nominal"})]})]}),b.jsxs("div",{children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(ny,{size:14}),"Alert History"]}),b.jsx(L0e,{history:r,typeFilter:c,severityFilter:f,onTypeFilterChange:k=>{h(k),g(1)},onSeverityFilterChange:k=>{d(k),g(1)},page:p,totalPages:m,onPageChange:g})]}),b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(r$,{size:14}),"Mesh Subscriptions (",i.length,")"]}),i.length>0?b.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:i.map(k=>b.jsx(P0e,{subscription:k},k.id))}):b.jsxs("div",{className:"text-slate-500 py-4",children:[b.jsx("p",{children:"No active subscriptions."}),b.jsxs("p",{className:"text-xs mt-2",children:["Manage subscriptions via ",b.jsx("code",{className:"text-blue-400",children:"!subscribe"})," on mesh"]})]})]})]})}function D0e(){return b.jsx(w$,{children:b.jsx(M$,{children:b.jsxs(yZ,{children:[b.jsx(rc,{path:"/",element:b.jsx(D$,{})}),b.jsx(rc,{path:"/mesh",element:b.jsx(Yye,{})}),b.jsx(rc,{path:"/environment",element:b.jsx(Jye,{})}),b.jsx(rc,{path:"/config",element:b.jsx(b0e,{})}),b.jsx(rc,{path:"/alerts",element:b.jsx(k0e,{})})]})})})}rb.createRoot(document.getElementById("root")).render(b.jsx(Bc.StrictMode,{children:b.jsx(CZ,{children:b.jsx(D0e,{})})}));
|