shopport 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,299 +0,0 @@
1
- var $k=r=>{throw TypeError(r)};var NS=(r,e,t)=>e.has(r)||$k("Cannot "+t);var J=(r,e,t)=>(NS(r,e,"read from private field"),t?t.call(r):e.get(r)),$e=(r,e,t)=>e.has(r)?$k("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),Oe=(r,e,t,n)=>(NS(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),xt=(r,e,t)=>(NS(r,e,"access private method"),t);var fy=(r,e,t,n)=>({set _(a){Oe(r,e,a,t)},get _(){return J(r,e,n)}});function vX(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in r)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(r,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=t(a);fetch(a.href,i)}})();function KA(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var LS={exports:{}},cv={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Kk;function pX(){if(Kk)return cv;Kk=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,a,i){var o=null;if(i!==void 0&&(o=""+i),a.key!==void 0&&(o=""+a.key),"key"in a){i={};for(var s in a)s!=="key"&&(i[s]=a[s])}else i=a;return a=i.ref,{$$typeof:r,type:n,key:o,ref:a!==void 0?a:null,props:i}}return cv.Fragment=e,cv.jsx=t,cv.jsxs=t,cv}var Qk;function gX(){return Qk||(Qk=1,LS.exports=pX()),LS.exports}var S=gX(),Ag=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Fu,Ws,fh,V4,mX=(V4=class extends Ag{constructor(){super();$e(this,Fu);$e(this,Ws);$e(this,fh);Oe(this,fh,e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){J(this,Ws)||this.setEventListener(J(this,fh))}onUnsubscribe(){var e;this.hasListeners()||((e=J(this,Ws))==null||e.call(this),Oe(this,Ws,void 0))}setEventListener(e){var t;Oe(this,fh,e),(t=J(this,Ws))==null||t.call(this),Oe(this,Ws,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){J(this,Fu)!==e&&(Oe(this,Fu,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof J(this,Fu)=="boolean"?J(this,Fu):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Fu=new WeakMap,Ws=new WeakMap,fh=new WeakMap,V4),QA=new mX,yX={setTimeout:(r,e)=>setTimeout(r,e),clearTimeout:r=>clearTimeout(r),setInterval:(r,e)=>setInterval(r,e),clearInterval:r=>clearInterval(r)},Xs,$A,G4,xX=(G4=class{constructor(){$e(this,Xs,yX);$e(this,$A,!1)}setTimeoutProvider(r){Oe(this,Xs,r)}setTimeout(r,e){return J(this,Xs).setTimeout(r,e)}clearTimeout(r){J(this,Xs).clearTimeout(r)}setInterval(r,e){return J(this,Xs).setInterval(r,e)}clearInterval(r){J(this,Xs).clearInterval(r)}},Xs=new WeakMap,$A=new WeakMap,G4),Ou=new xX;function bX(r){setTimeout(r,0)}var _X=typeof window>"u"||"Deno"in globalThis;function En(){}function SX(r,e){return typeof r=="function"?r(e):r}function y2(r){return typeof r=="number"&&r>=0&&r!==1/0}function $4(r,e){return Math.max(r+(e||0)-Date.now(),0)}function sl(r,e){return typeof r=="function"?r(e):r}function Ma(r,e){return typeof r=="function"?r(e):r}function Jk(r,e){const{type:t="all",exact:n,fetchStatus:a,predicate:i,queryKey:o,stale:s}=r;if(o){if(n){if(e.queryHash!==JA(o,e.options))return!1}else if(!Pp(e.queryKey,o))return!1}if(t!=="all"){const l=e.isActive();if(t==="active"&&!l||t==="inactive"&&l)return!1}return!(typeof s=="boolean"&&e.isStale()!==s||a&&a!==e.state.fetchStatus||i&&!i(e))}function eI(r,e){const{exact:t,status:n,predicate:a,mutationKey:i}=r;if(i){if(!e.options.mutationKey)return!1;if(t){if(Op(e.options.mutationKey)!==Op(i))return!1}else if(!Pp(e.options.mutationKey,i))return!1}return!(n&&e.state.status!==n||a&&!a(e))}function JA(r,e){return((e==null?void 0:e.queryKeyHashFn)||Op)(r)}function Op(r){return JSON.stringify(r,(e,t)=>b2(t)?Object.keys(t).sort().reduce((n,a)=>(n[a]=t[a],n),{}):t)}function Pp(r,e){return r===e?!0:typeof r!=typeof e?!1:r&&e&&typeof r=="object"&&typeof e=="object"?Object.keys(e).every(t=>Pp(r[t],e[t])):!1}var wX=Object.prototype.hasOwnProperty;function K4(r,e,t=0){if(r===e)return r;if(t>500)return e;const n=tI(r)&&tI(e);if(!n&&!(b2(r)&&b2(e)))return e;const i=(n?r:Object.keys(r)).length,o=n?e:Object.keys(e),s=o.length,l=n?new Array(s):{};let u=0;for(let c=0;c<s;c++){const f=n?c:o[c],d=r[f],v=e[f];if(d===v){l[f]=d,(n?c<i:wX.call(r,f))&&u++;continue}if(d===null||v===null||typeof d!="object"||typeof v!="object"){l[f]=v;continue}const g=K4(d,v,t+1);l[f]=g,g===d&&u++}return i===s&&u===i?r:l}function x2(r,e){if(!e||Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(r[t]!==e[t])return!1;return!0}function tI(r){return Array.isArray(r)&&r.length===Object.keys(r).length}function b2(r){if(!rI(r))return!1;const e=r.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!rI(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(r)!==Object.prototype)}function rI(r){return Object.prototype.toString.call(r)==="[object Object]"}function TX(r){return new Promise(e=>{Ou.setTimeout(e,r)})}function _2(r,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(r,e):t.structuralSharing!==!1?K4(r,e):e}function CX(r,e,t=0){const n=[...r,e];return t&&n.length>t?n.slice(1):n}function AX(r,e,t=0){const n=[e,...r];return t&&n.length>t?n.slice(0,-1):n}var eM=Symbol();function Q4(r,e){return!r.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!r.queryFn||r.queryFn===eM?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}function J4(r,e){return typeof r=="function"?r(...e):!!r}function MX(r,e,t){let n=!1,a;return Object.defineProperty(r,"signal",{enumerable:!0,get:()=>(a??(a=e()),n||(n=!0,a.aborted?t():a.addEventListener("abort",t,{once:!0})),a)}),r}var zp=(()=>{let r=()=>_X;return{isServer(){return r()},setIsServer(e){r=e}}})();function S2(){let r,e;const t=new Promise((a,i)=>{r=a,e=i});t.status="pending",t.catch(()=>{});function n(a){Object.assign(t,a),delete t.resolve,delete t.reject}return t.resolve=a=>{n({status:"fulfilled",value:a}),r(a)},t.reject=a=>{n({status:"rejected",reason:a}),e(a)},t}var DX=bX;function NX(){let r=[],e=0,t=s=>{s()},n=s=>{s()},a=DX;const i=s=>{e?r.push(s):a(()=>{t(s)})},o=()=>{const s=r;r=[],s.length&&a(()=>{n(()=>{s.forEach(l=>{t(l)})})})};return{batch:s=>{let l;e++;try{l=s()}finally{e--,e||o()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{t=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{a=s}}}var Kr=NX(),hh,qs,dh,H4,LX=(H4=class extends Ag{constructor(){super();$e(this,hh,!0);$e(this,qs);$e(this,dh);Oe(this,dh,e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){J(this,qs)||this.setEventListener(J(this,dh))}onUnsubscribe(){var e;this.hasListeners()||((e=J(this,qs))==null||e.call(this),Oe(this,qs,void 0))}setEventListener(e){var t;Oe(this,dh,e),(t=J(this,qs))==null||t.call(this),Oe(this,qs,e(this.setOnline.bind(this)))}setOnline(e){J(this,hh)!==e&&(Oe(this,hh,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return J(this,hh)}},hh=new WeakMap,qs=new WeakMap,dh=new WeakMap,H4),ix=new LX;function RX(r){return Math.min(1e3*2**r,3e4)}function eV(r){return(r??"online")==="online"?ix.isOnline():!0}var w2=class extends Error{constructor(r){super("CancelledError"),this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent}};function tV(r){let e=!1,t=0,n;const a=S2(),i=()=>a.status!=="pending",o=x=>{var y;if(!i()){const b=new w2(x);d(b),(y=r.onCancel)==null||y.call(r,b)}},s=()=>{e=!0},l=()=>{e=!1},u=()=>QA.isFocused()&&(r.networkMode==="always"||ix.isOnline())&&r.canRun(),c=()=>eV(r.networkMode)&&r.canRun(),f=x=>{i()||(n==null||n(),a.resolve(x))},d=x=>{i()||(n==null||n(),a.reject(x))},v=()=>new Promise(x=>{var y;n=b=>{(i()||u())&&x(b)},(y=r.onPause)==null||y.call(r)}).then(()=>{var x;n=void 0,i()||(x=r.onContinue)==null||x.call(r)}),g=()=>{if(i())return;let x;const y=t===0?r.initialPromise:void 0;try{x=y??r.fn()}catch(b){x=Promise.reject(b)}Promise.resolve(x).then(f).catch(b=>{var M;if(i())return;const w=r.retry??(zp.isServer()?0:3),T=r.retryDelay??RX,C=typeof T=="function"?T(t,b):T,D=w===!0||typeof w=="number"&&t<w||typeof w=="function"&&w(t,b);if(e||!D){d(b);return}t++,(M=r.onFail)==null||M.call(r,t,b),TX(C).then(()=>u()?void 0:v()).then(()=>{e?d(b):g()})})};return{promise:a,status:()=>a.status,cancel:o,continue:()=>(n==null||n(),a),cancelRetry:s,continueRetry:l,canStart:c,start:()=>(c()?g():v().then(g),a)}}var Uu,F4,rV=(F4=class{constructor(){$e(this,Uu)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),y2(this.gcTime)&&Oe(this,Uu,Ou.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(zp.isServer()?1/0:300*1e3))}clearGcTimeout(){J(this,Uu)!==void 0&&(Ou.clearTimeout(J(this,Uu)),Oe(this,Uu,void 0))}},Uu=new WeakMap,F4),Yu,vh,Ta,Wu,Vr,_g,Xu,$n,nV,Mo,U4,EX=(U4=class extends rV{constructor(e){super();$e(this,$n);$e(this,Yu);$e(this,vh);$e(this,Ta);$e(this,Wu);$e(this,Vr);$e(this,_g);$e(this,Xu);Oe(this,Xu,!1),Oe(this,_g,e.defaultOptions),this.setOptions(e.options),this.observers=[],Oe(this,Wu,e.client),Oe(this,Ta,J(this,Wu).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Oe(this,Yu,aI(this.options)),this.state=e.state??J(this,Yu),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=J(this,Vr))==null?void 0:e.promise}setOptions(e){if(this.options={...J(this,_g),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=aI(this.options);t.data!==void 0&&(this.setState(nI(t.data,t.dataUpdatedAt)),Oe(this,Yu,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&J(this,Ta).remove(this)}setData(e,t){const n=_2(this.state.data,e,this.options);return xt(this,$n,Mo).call(this,{data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(e,t){xt(this,$n,Mo).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var n,a;const t=(n=J(this,Vr))==null?void 0:n.promise;return(a=J(this,Vr))==null||a.cancel(e),t?t.then(En).catch(En):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return J(this,Yu)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Ma(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===eM||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>sl(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!$4(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=J(this,Vr))==null||t.continue()}onOnline(){var t;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=J(this,Vr))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),J(this,Ta).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(J(this,Vr)&&(J(this,Xu)||xt(this,$n,nV).call(this)?J(this,Vr).cancel({revert:!0}):J(this,Vr).cancelRetry()),this.scheduleGc()),J(this,Ta).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||xt(this,$n,Mo).call(this,{type:"invalidate"})}async fetch(e,t){var l,u,c,f,d,v,g,x,y,b,w,T;if(this.state.fetchStatus!=="idle"&&((l=J(this,Vr))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(J(this,Vr))return J(this,Vr).continueRetry(),J(this,Vr).promise}if(e&&this.setOptions(e),!this.options.queryFn){const C=this.observers.find(D=>D.options.queryFn);C&&this.setOptions(C.options)}const n=new AbortController,a=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(Oe(this,Xu,!0),n.signal)})},i=()=>{const C=Q4(this.options,t),M=(()=>{const N={client:J(this,Wu),queryKey:this.queryKey,meta:this.meta};return a(N),N})();return Oe(this,Xu,!1),this.options.persister?this.options.persister(C,M,this):C(M)},s=(()=>{const C={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:J(this,Wu),state:this.state,fetchFn:i};return a(C),C})();(u=this.options.behavior)==null||u.onFetch(s,this),Oe(this,vh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&xt(this,$n,Mo).call(this,{type:"fetch",meta:(f=s.fetchOptions)==null?void 0:f.meta}),Oe(this,Vr,tV({initialPromise:t==null?void 0:t.initialPromise,fn:s.fetchFn,onCancel:C=>{C instanceof w2&&C.revert&&this.setState({...J(this,vh),fetchStatus:"idle"}),n.abort()},onFail:(C,D)=>{xt(this,$n,Mo).call(this,{type:"failed",failureCount:C,error:D})},onPause:()=>{xt(this,$n,Mo).call(this,{type:"pause"})},onContinue:()=>{xt(this,$n,Mo).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const C=await J(this,Vr).start();if(C===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(C),(v=(d=J(this,Ta).config).onSuccess)==null||v.call(d,C,this),(x=(g=J(this,Ta).config).onSettled)==null||x.call(g,C,this.state.error,this),C}catch(C){if(C instanceof w2){if(C.silent)return J(this,Vr).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw xt(this,$n,Mo).call(this,{type:"error",error:C}),(b=(y=J(this,Ta).config).onError)==null||b.call(y,C,this),(T=(w=J(this,Ta).config).onSettled)==null||T.call(w,this.state.data,C,this),C}finally{this.scheduleGc()}}},Yu=new WeakMap,vh=new WeakMap,Ta=new WeakMap,Wu=new WeakMap,Vr=new WeakMap,_g=new WeakMap,Xu=new WeakMap,$n=new WeakSet,nV=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Mo=function(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...aV(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...nI(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Oe(this,vh,e.manual?a:void 0),a;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Kr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),J(this,Ta).notify({query:this,type:"updated",action:e})})},U4);function aV(r,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:eV(e.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function nI(r,e){return{data:r,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function aI(r){const e=typeof r.initialData=="function"?r.initialData():r.initialData,t=e!==void 0,n=t?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Rn,bt,Sg,mn,qu,ph,Ro,Zs,wg,gh,mh,Zu,$u,$s,yh,kt,np,T2,C2,A2,M2,D2,N2,L2,iV,Y4,kX=(Y4=class extends Ag{constructor(e,t){super();$e(this,kt);$e(this,Rn);$e(this,bt);$e(this,Sg);$e(this,mn);$e(this,qu);$e(this,ph);$e(this,Ro);$e(this,Zs);$e(this,wg);$e(this,gh);$e(this,mh);$e(this,Zu);$e(this,$u);$e(this,$s);$e(this,yh,new Set);this.options=t,Oe(this,Rn,e),Oe(this,Zs,null),Oe(this,Ro,S2()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(J(this,bt).addObserver(this),iI(J(this,bt),this.options)?xt(this,kt,np).call(this):this.updateResult(),xt(this,kt,M2).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return R2(J(this,bt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return R2(J(this,bt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,xt(this,kt,D2).call(this),xt(this,kt,N2).call(this),J(this,bt).removeObserver(this)}setOptions(e){const t=this.options,n=J(this,bt);if(this.options=J(this,Rn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ma(this.options.enabled,J(this,bt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");xt(this,kt,L2).call(this),J(this,bt).setOptions(this.options),t._defaulted&&!x2(this.options,t)&&J(this,Rn).getQueryCache().notify({type:"observerOptionsUpdated",query:J(this,bt),observer:this});const a=this.hasListeners();a&&oI(J(this,bt),n,this.options,t)&&xt(this,kt,np).call(this),this.updateResult(),a&&(J(this,bt)!==n||Ma(this.options.enabled,J(this,bt))!==Ma(t.enabled,J(this,bt))||sl(this.options.staleTime,J(this,bt))!==sl(t.staleTime,J(this,bt)))&&xt(this,kt,T2).call(this);const i=xt(this,kt,C2).call(this);a&&(J(this,bt)!==n||Ma(this.options.enabled,J(this,bt))!==Ma(t.enabled,J(this,bt))||i!==J(this,$s))&&xt(this,kt,A2).call(this,i)}getOptimisticResult(e){const t=J(this,Rn).getQueryCache().build(J(this,Rn),e),n=this.createResult(t,e);return OX(this,n)&&(Oe(this,mn,n),Oe(this,ph,this.options),Oe(this,qu,J(this,bt).state)),n}getCurrentResult(){return J(this,mn)}trackResult(e,t){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),t==null||t(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&J(this,Ro).status==="pending"&&J(this,Ro).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){J(this,yh).add(e)}getCurrentQuery(){return J(this,bt)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=J(this,Rn).defaultQueryOptions(e),n=J(this,Rn).getQueryCache().build(J(this,Rn),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return xt(this,kt,np).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),J(this,mn)))}createResult(e,t){var E;const n=J(this,bt),a=this.options,i=J(this,mn),o=J(this,qu),s=J(this,ph),u=e!==n?e.state:J(this,Sg),{state:c}=e;let f={...c},d=!1,v;if(t._optimisticResults){const k=this.hasListeners(),I=!k&&iI(e,t),z=k&&oI(e,n,t,a);(I||z)&&(f={...f,...aV(c.data,e.options)}),t._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:x,status:y}=f;v=f.data;let b=!1;if(t.placeholderData!==void 0&&v===void 0&&y==="pending"){let k;i!=null&&i.isPlaceholderData&&t.placeholderData===(s==null?void 0:s.placeholderData)?(k=i.data,b=!0):k=typeof t.placeholderData=="function"?t.placeholderData((E=J(this,mh))==null?void 0:E.state.data,J(this,mh)):t.placeholderData,k!==void 0&&(y="success",v=_2(i==null?void 0:i.data,k,t),d=!0)}if(t.select&&v!==void 0&&!b)if(i&&v===(o==null?void 0:o.data)&&t.select===J(this,wg))v=J(this,gh);else try{Oe(this,wg,t.select),v=t.select(v),v=_2(i==null?void 0:i.data,v,t),Oe(this,gh,v),Oe(this,Zs,null)}catch(k){Oe(this,Zs,k)}J(this,Zs)&&(g=J(this,Zs),v=J(this,gh),x=Date.now(),y="error");const w=f.fetchStatus==="fetching",T=y==="pending",C=y==="error",D=T&&w,M=v!==void 0,R={status:y,fetchStatus:f.fetchStatus,isPending:T,isSuccess:y==="success",isError:C,isInitialLoading:D,isLoading:D,data:v,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:x,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!T,isLoadingError:C&&!M,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:C&&M,isStale:tM(e,t),refetch:this.refetch,promise:J(this,Ro),isEnabled:Ma(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const k=R.data!==void 0,I=R.status==="error"&&!k,z=U=>{I?U.reject(R.error):k&&U.resolve(R.data)},P=()=>{const U=Oe(this,Ro,R.promise=S2());z(U)},G=J(this,Ro);switch(G.status){case"pending":e.queryHash===n.queryHash&&z(G);break;case"fulfilled":(I||R.data!==G.value)&&P();break;case"rejected":(!I||R.error!==G.reason)&&P();break}}return R}updateResult(){const e=J(this,mn),t=this.createResult(J(this,bt),this.options);if(Oe(this,qu,J(this,bt).state),Oe(this,ph,this.options),J(this,qu).data!==void 0&&Oe(this,mh,J(this,bt)),x2(t,e))return;Oe(this,mn,t);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!J(this,yh).size)return!0;const o=new Set(i??J(this,yh));return this.options.throwOnError&&o.add("error"),Object.keys(J(this,mn)).some(s=>{const l=s;return J(this,mn)[l]!==e[l]&&o.has(l)})};xt(this,kt,iV).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&xt(this,kt,M2).call(this)}},Rn=new WeakMap,bt=new WeakMap,Sg=new WeakMap,mn=new WeakMap,qu=new WeakMap,ph=new WeakMap,Ro=new WeakMap,Zs=new WeakMap,wg=new WeakMap,gh=new WeakMap,mh=new WeakMap,Zu=new WeakMap,$u=new WeakMap,$s=new WeakMap,yh=new WeakMap,kt=new WeakSet,np=function(e){xt(this,kt,L2).call(this);let t=J(this,bt).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(En)),t},T2=function(){xt(this,kt,D2).call(this);const e=sl(this.options.staleTime,J(this,bt));if(zp.isServer()||J(this,mn).isStale||!y2(e))return;const n=$4(J(this,mn).dataUpdatedAt,e)+1;Oe(this,Zu,Ou.setTimeout(()=>{J(this,mn).isStale||this.updateResult()},n))},C2=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(J(this,bt)):this.options.refetchInterval)??!1},A2=function(e){xt(this,kt,N2).call(this),Oe(this,$s,e),!(zp.isServer()||Ma(this.options.enabled,J(this,bt))===!1||!y2(J(this,$s))||J(this,$s)===0)&&Oe(this,$u,Ou.setInterval(()=>{(this.options.refetchIntervalInBackground||QA.isFocused())&&xt(this,kt,np).call(this)},J(this,$s)))},M2=function(){xt(this,kt,T2).call(this),xt(this,kt,A2).call(this,xt(this,kt,C2).call(this))},D2=function(){J(this,Zu)!==void 0&&(Ou.clearTimeout(J(this,Zu)),Oe(this,Zu,void 0))},N2=function(){J(this,$u)!==void 0&&(Ou.clearInterval(J(this,$u)),Oe(this,$u,void 0))},L2=function(){const e=J(this,Rn).getQueryCache().build(J(this,Rn),this.options);if(e===J(this,bt))return;const t=J(this,bt);Oe(this,bt,e),Oe(this,Sg,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},iV=function(e){Kr.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(J(this,mn))}),J(this,Rn).getQueryCache().notify({query:J(this,bt),type:"observerResultsUpdated"})})},Y4);function IX(r,e){return Ma(e.enabled,r)!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&e.retryOnMount===!1)}function iI(r,e){return IX(r,e)||r.state.data!==void 0&&R2(r,e,e.refetchOnMount)}function R2(r,e,t){if(Ma(e.enabled,r)!==!1&&sl(e.staleTime,r)!=="static"){const n=typeof t=="function"?t(r):t;return n==="always"||n!==!1&&tM(r,e)}return!1}function oI(r,e,t,n){return(r!==e||Ma(n.enabled,r)===!1)&&(!t.suspense||r.state.status!=="error")&&tM(r,t)}function tM(r,e){return Ma(e.enabled,r)!==!1&&r.isStaleByTime(sl(e.staleTime,r))}function OX(r,e){return!x2(r.getCurrentResult(),e)}function sI(r){return{onFetch:(e,t)=>{var c,f,d,v,g;const n=e.options,a=(d=(f=(c=e.fetchOptions)==null?void 0:c.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,i=((v=e.state.data)==null?void 0:v.pages)||[],o=((g=e.state.data)==null?void 0:g.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let x=!1;const y=T=>{MX(T,()=>e.signal,()=>x=!0)},b=Q4(e.options,e.fetchOptions),w=async(T,C,D)=>{if(x)return Promise.reject();if(C==null&&T.pages.length)return Promise.resolve(T);const N=(()=>{const I={client:e.client,queryKey:e.queryKey,pageParam:C,direction:D?"backward":"forward",meta:e.options.meta};return y(I),I})(),R=await b(N),{maxPages:E}=e.options,k=D?AX:CX;return{pages:k(T.pages,R,E),pageParams:k(T.pageParams,C,E)}};if(a&&i.length){const T=a==="backward",C=T?PX:lI,D={pages:i,pageParams:o},M=C(n,D);s=await w(D,M,T)}else{const T=r??i.length;do{const C=l===0?o[0]??n.initialPageParam:lI(n,s);if(l>0&&C==null)break;s=await w(s,C),l++}while(l<T)}return s};e.options.persister?e.fetchFn=()=>{var x,y;return(y=(x=e.options).persister)==null?void 0:y.call(x,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=u}}}function lI(r,{pages:e,pageParams:t}){const n=e.length-1;return e.length>0?r.getNextPageParam(e[n],e,t[n],t):void 0}function PX(r,{pages:e,pageParams:t}){var n;return e.length>0?(n=r.getPreviousPageParam)==null?void 0:n.call(r,e[0],e,t[0],t):void 0}var Tg,Ci,un,Ku,Ai,Gs,W4,zX=(W4=class extends rV{constructor(e){super();$e(this,Ai);$e(this,Tg);$e(this,Ci);$e(this,un);$e(this,Ku);Oe(this,Tg,e.client),this.mutationId=e.mutationId,Oe(this,un,e.mutationCache),Oe(this,Ci,[]),this.state=e.state||jX(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){J(this,Ci).includes(e)||(J(this,Ci).push(e),this.clearGcTimeout(),J(this,un).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Oe(this,Ci,J(this,Ci).filter(t=>t!==e)),this.scheduleGc(),J(this,un).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){J(this,Ci).length||(this.state.status==="pending"?this.scheduleGc():J(this,un).remove(this))}continue(){var e;return((e=J(this,Ku))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,s,l,u,c,f,d,v,g,x,y,b,w,T,C,D,M,N;const t=()=>{xt(this,Ai,Gs).call(this,{type:"continue"})},n={client:J(this,Tg),meta:this.options.meta,mutationKey:this.options.mutationKey};Oe(this,Ku,tV({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(R,E)=>{xt(this,Ai,Gs).call(this,{type:"failed",failureCount:R,error:E})},onPause:()=>{xt(this,Ai,Gs).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>J(this,un).canRun(this)}));const a=this.state.status==="pending",i=!J(this,Ku).canStart();try{if(a)t();else{xt(this,Ai,Gs).call(this,{type:"pending",variables:e,isPaused:i}),J(this,un).config.onMutate&&await J(this,un).config.onMutate(e,this,n);const E=await((s=(o=this.options).onMutate)==null?void 0:s.call(o,e,n));E!==this.state.context&&xt(this,Ai,Gs).call(this,{type:"pending",context:E,variables:e,isPaused:i})}const R=await J(this,Ku).start();return await((u=(l=J(this,un).config).onSuccess)==null?void 0:u.call(l,R,e,this.state.context,this,n)),await((f=(c=this.options).onSuccess)==null?void 0:f.call(c,R,e,this.state.context,n)),await((v=(d=J(this,un).config).onSettled)==null?void 0:v.call(d,R,null,this.state.variables,this.state.context,this,n)),await((x=(g=this.options).onSettled)==null?void 0:x.call(g,R,null,e,this.state.context,n)),xt(this,Ai,Gs).call(this,{type:"success",data:R}),R}catch(R){try{await((b=(y=J(this,un).config).onError)==null?void 0:b.call(y,R,e,this.state.context,this,n))}catch(E){Promise.reject(E)}try{await((T=(w=this.options).onError)==null?void 0:T.call(w,R,e,this.state.context,n))}catch(E){Promise.reject(E)}try{await((D=(C=J(this,un).config).onSettled)==null?void 0:D.call(C,void 0,R,this.state.variables,this.state.context,this,n))}catch(E){Promise.reject(E)}try{await((N=(M=this.options).onSettled)==null?void 0:N.call(M,void 0,R,e,this.state.context,n))}catch(E){Promise.reject(E)}throw xt(this,Ai,Gs).call(this,{type:"error",error:R}),R}finally{J(this,un).runNext(this)}}},Tg=new WeakMap,Ci=new WeakMap,un=new WeakMap,Ku=new WeakMap,Ai=new WeakSet,Gs=function(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Kr.batch(()=>{J(this,Ci).forEach(n=>{n.onMutationUpdate(e)}),J(this,un).notify({mutation:this,type:"updated",action:e})})},W4);function jX(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Eo,Za,Cg,X4,BX=(X4=class extends Ag{constructor(e={}){super();$e(this,Eo);$e(this,Za);$e(this,Cg);this.config=e,Oe(this,Eo,new Set),Oe(this,Za,new Map),Oe(this,Cg,0)}build(e,t,n){const a=new zX({client:e,mutationCache:this,mutationId:++fy(this,Cg)._,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){J(this,Eo).add(e);const t=hy(e);if(typeof t=="string"){const n=J(this,Za).get(t);n?n.push(e):J(this,Za).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(J(this,Eo).delete(e)){const t=hy(e);if(typeof t=="string"){const n=J(this,Za).get(t);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&J(this,Za).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=hy(e);if(typeof t=="string"){const n=J(this,Za).get(t),a=n==null?void 0:n.find(i=>i.state.status==="pending");return!a||a===e}else return!0}runNext(e){var n;const t=hy(e);if(typeof t=="string"){const a=(n=J(this,Za).get(t))==null?void 0:n.find(i=>i!==e&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Kr.batch(()=>{J(this,Eo).forEach(e=>{this.notify({type:"removed",mutation:e})}),J(this,Eo).clear(),J(this,Za).clear()})}getAll(){return Array.from(J(this,Eo))}find(e){const t={exact:!0,...e};return this.getAll().find(n=>eI(t,n))}findAll(e={}){return this.getAll().filter(t=>eI(e,t))}notify(e){Kr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Kr.batch(()=>Promise.all(e.map(t=>t.continue().catch(En))))}},Eo=new WeakMap,Za=new WeakMap,Cg=new WeakMap,X4);function hy(r){var e;return(e=r.options.scope)==null?void 0:e.id}var Mi,q4,VX=(q4=class extends Ag{constructor(e={}){super();$e(this,Mi);this.config=e,Oe(this,Mi,new Map)}build(e,t,n){const a=t.queryKey,i=t.queryHash??JA(a,t);let o=this.get(i);return o||(o=new EX({client:e,queryKey:a,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(o)),o}add(e){J(this,Mi).has(e.queryHash)||(J(this,Mi).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=J(this,Mi).get(e.queryHash);t&&(e.destroy(),t===e&&J(this,Mi).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Kr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return J(this,Mi).get(e)}getAll(){return[...J(this,Mi).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Jk(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Jk(e,n)):t}notify(e){Kr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Kr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Kr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Mi=new WeakMap,q4),nr,Ks,Qs,xh,bh,Js,_h,Sh,Z4,GX=(Z4=class{constructor(r={}){$e(this,nr);$e(this,Ks);$e(this,Qs);$e(this,xh);$e(this,bh);$e(this,Js);$e(this,_h);$e(this,Sh);Oe(this,nr,r.queryCache||new VX),Oe(this,Ks,r.mutationCache||new BX),Oe(this,Qs,r.defaultOptions||{}),Oe(this,xh,new Map),Oe(this,bh,new Map),Oe(this,Js,0)}mount(){fy(this,Js)._++,J(this,Js)===1&&(Oe(this,_h,QA.subscribe(async r=>{r&&(await this.resumePausedMutations(),J(this,nr).onFocus())})),Oe(this,Sh,ix.subscribe(async r=>{r&&(await this.resumePausedMutations(),J(this,nr).onOnline())})))}unmount(){var r,e;fy(this,Js)._--,J(this,Js)===0&&((r=J(this,_h))==null||r.call(this),Oe(this,_h,void 0),(e=J(this,Sh))==null||e.call(this),Oe(this,Sh,void 0))}isFetching(r){return J(this,nr).findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return J(this,Ks).findAll({...r,status:"pending"}).length}getQueryData(r){var t;const e=this.defaultQueryOptions({queryKey:r});return(t=J(this,nr).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(r){const e=this.defaultQueryOptions(r),t=J(this,nr).build(this,e),n=t.state.data;return n===void 0?this.fetchQuery(r):(r.revalidateIfStale&&t.isStaleByTime(sl(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(r){return J(this,nr).findAll(r).map(({queryKey:e,state:t})=>{const n=t.data;return[e,n]})}setQueryData(r,e,t){const n=this.defaultQueryOptions({queryKey:r}),a=J(this,nr).get(n.queryHash),i=a==null?void 0:a.state.data,o=SX(e,i);if(o!==void 0)return J(this,nr).build(this,n).setData(o,{...t,manual:!0})}setQueriesData(r,e,t){return Kr.batch(()=>J(this,nr).findAll(r).map(({queryKey:n})=>[n,this.setQueryData(n,e,t)]))}getQueryState(r){var t;const e=this.defaultQueryOptions({queryKey:r});return(t=J(this,nr).get(e.queryHash))==null?void 0:t.state}removeQueries(r){const e=J(this,nr);Kr.batch(()=>{e.findAll(r).forEach(t=>{e.remove(t)})})}resetQueries(r,e){const t=J(this,nr);return Kr.batch(()=>(t.findAll(r).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...r},e)))}cancelQueries(r,e={}){const t={revert:!0,...e},n=Kr.batch(()=>J(this,nr).findAll(r).map(a=>a.cancel(t)));return Promise.all(n).then(En).catch(En)}invalidateQueries(r,e={}){return Kr.batch(()=>(J(this,nr).findAll(r).forEach(t=>{t.invalidate()}),(r==null?void 0:r.refetchType)==="none"?Promise.resolve():this.refetchQueries({...r,type:(r==null?void 0:r.refetchType)??(r==null?void 0:r.type)??"active"},e)))}refetchQueries(r,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},n=Kr.batch(()=>J(this,nr).findAll(r).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,t);return t.throwOnError||(i=i.catch(En)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(En)}fetchQuery(r){const e=this.defaultQueryOptions(r);e.retry===void 0&&(e.retry=!1);const t=J(this,nr).build(this,e);return t.isStaleByTime(sl(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(En).catch(En)}fetchInfiniteQuery(r){return r.behavior=sI(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(En).catch(En)}ensureInfiniteQueryData(r){return r.behavior=sI(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return ix.isOnline()?J(this,Ks).resumePausedMutations():Promise.resolve()}getQueryCache(){return J(this,nr)}getMutationCache(){return J(this,Ks)}getDefaultOptions(){return J(this,Qs)}setDefaultOptions(r){Oe(this,Qs,r)}setQueryDefaults(r,e){J(this,xh).set(Op(r),{queryKey:r,defaultOptions:e})}getQueryDefaults(r){const e=[...J(this,xh).values()],t={};return e.forEach(n=>{Pp(r,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(r,e){J(this,bh).set(Op(r),{mutationKey:r,defaultOptions:e})}getMutationDefaults(r){const e=[...J(this,bh).values()],t={};return e.forEach(n=>{Pp(r,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(r){if(r._defaulted)return r;const e={...J(this,Qs).queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return e.queryHash||(e.queryHash=JA(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===eM&&(e.enabled=!1),e}defaultMutationOptions(r){return r!=null&&r._defaulted?r:{...J(this,Qs).mutations,...(r==null?void 0:r.mutationKey)&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){J(this,nr).clear(),J(this,Ks).clear()}},nr=new WeakMap,Ks=new WeakMap,Qs=new WeakMap,xh=new WeakMap,bh=new WeakMap,Js=new WeakMap,_h=new WeakMap,Sh=new WeakMap,Z4),RS={exports:{}},ut={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var uI;function HX(){if(uI)return ut;uI=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),f=Symbol.iterator;function d(V){return V===null||typeof V!="object"?null:(V=f&&V[f]||V["@@iterator"],typeof V=="function"?V:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,x={};function y(V,W,$){this.props=V,this.context=W,this.refs=x,this.updater=$||v}y.prototype.isReactComponent={},y.prototype.setState=function(V,W){if(typeof V!="object"&&typeof V!="function"&&V!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,V,W,"setState")},y.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function b(){}b.prototype=y.prototype;function w(V,W,$){this.props=V,this.context=W,this.refs=x,this.updater=$||v}var T=w.prototype=new b;T.constructor=w,g(T,y.prototype),T.isPureReactComponent=!0;var C=Array.isArray,D={H:null,A:null,T:null,S:null,V:null},M=Object.prototype.hasOwnProperty;function N(V,W,$,te,ue,ge){return $=ge.ref,{$$typeof:r,type:V,key:W,ref:$!==void 0?$:null,props:ge}}function R(V,W){return N(V.type,W,void 0,void 0,void 0,V.props)}function E(V){return typeof V=="object"&&V!==null&&V.$$typeof===r}function k(V){var W={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function($){return W[$]})}var I=/\/+/g;function z(V,W){return typeof V=="object"&&V!==null&&V.key!=null?k(""+V.key):W.toString(36)}function P(){}function G(V){switch(V.status){case"fulfilled":return V.value;case"rejected":throw V.reason;default:switch(typeof V.status=="string"?V.then(P,P):(V.status="pending",V.then(function(W){V.status==="pending"&&(V.status="fulfilled",V.value=W)},function(W){V.status==="pending"&&(V.status="rejected",V.reason=W)})),V.status){case"fulfilled":return V.value;case"rejected":throw V.reason}}throw V}function U(V,W,$,te,ue){var ge=typeof V;(ge==="undefined"||ge==="boolean")&&(V=null);var Se=!1;if(V===null)Se=!0;else switch(ge){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(V.$$typeof){case r:case e:Se=!0;break;case c:return Se=V._init,U(Se(V._payload),W,$,te,ue)}}if(Se)return ue=ue(V),Se=te===""?"."+z(V,0):te,C(ue)?($="",Se!=null&&($=Se.replace(I,"$&/")+"/"),U(ue,W,$,"",function(we){return we})):ue!=null&&(E(ue)&&(ue=R(ue,$+(ue.key==null||V&&V.key===ue.key?"":(""+ue.key).replace(I,"$&/")+"/")+Se)),W.push(ue)),1;Se=0;var Xe=te===""?".":te+":";if(C(V))for(var be=0;be<V.length;be++)te=V[be],ge=Xe+z(te,be),Se+=U(te,W,$,ge,ue);else if(be=d(V),typeof be=="function")for(V=be.call(V),be=0;!(te=V.next()).done;)te=te.value,ge=Xe+z(te,be++),Se+=U(te,W,$,ge,ue);else if(ge==="object"){if(typeof V.then=="function")return U(G(V),W,$,te,ue);throw W=String(V),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return Se}function B(V,W,$){if(V==null)return V;var te=[],ue=0;return U(V,te,"","",function(ge){return W.call($,ge,ue++)}),te}function F(V){if(V._status===-1){var W=V._result;W=W(),W.then(function($){(V._status===0||V._status===-1)&&(V._status=1,V._result=$)},function($){(V._status===0||V._status===-1)&&(V._status=2,V._result=$)}),V._status===-1&&(V._status=0,V._result=W)}if(V._status===1)return V._result.default;throw V._result}var H=typeof reportError=="function"?reportError:function(V){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof V=="object"&&V!==null&&typeof V.message=="string"?String(V.message):String(V),error:V});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",V);return}console.error(V)};function X(){}return ut.Children={map:B,forEach:function(V,W,$){B(V,function(){W.apply(this,arguments)},$)},count:function(V){var W=0;return B(V,function(){W++}),W},toArray:function(V){return B(V,function(W){return W})||[]},only:function(V){if(!E(V))throw Error("React.Children.only expected to receive a single React element child.");return V}},ut.Component=y,ut.Fragment=t,ut.Profiler=a,ut.PureComponent=w,ut.StrictMode=n,ut.Suspense=l,ut.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,ut.__COMPILER_RUNTIME={__proto__:null,c:function(V){return D.H.useMemoCache(V)}},ut.cache=function(V){return function(){return V.apply(null,arguments)}},ut.cloneElement=function(V,W,$){if(V==null)throw Error("The argument must be a React element, but you passed "+V+".");var te=g({},V.props),ue=V.key,ge=void 0;if(W!=null)for(Se in W.ref!==void 0&&(ge=void 0),W.key!==void 0&&(ue=""+W.key),W)!M.call(W,Se)||Se==="key"||Se==="__self"||Se==="__source"||Se==="ref"&&W.ref===void 0||(te[Se]=W[Se]);var Se=arguments.length-2;if(Se===1)te.children=$;else if(1<Se){for(var Xe=Array(Se),be=0;be<Se;be++)Xe[be]=arguments[be+2];te.children=Xe}return N(V.type,ue,void 0,void 0,ge,te)},ut.createContext=function(V){return V={$$typeof:o,_currentValue:V,_currentValue2:V,_threadCount:0,Provider:null,Consumer:null},V.Provider=V,V.Consumer={$$typeof:i,_context:V},V},ut.createElement=function(V,W,$){var te,ue={},ge=null;if(W!=null)for(te in W.key!==void 0&&(ge=""+W.key),W)M.call(W,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(ue[te]=W[te]);var Se=arguments.length-2;if(Se===1)ue.children=$;else if(1<Se){for(var Xe=Array(Se),be=0;be<Se;be++)Xe[be]=arguments[be+2];ue.children=Xe}if(V&&V.defaultProps)for(te in Se=V.defaultProps,Se)ue[te]===void 0&&(ue[te]=Se[te]);return N(V,ge,void 0,void 0,null,ue)},ut.createRef=function(){return{current:null}},ut.forwardRef=function(V){return{$$typeof:s,render:V}},ut.isValidElement=E,ut.lazy=function(V){return{$$typeof:c,_payload:{_status:-1,_result:V},_init:F}},ut.memo=function(V,W){return{$$typeof:u,type:V,compare:W===void 0?null:W}},ut.startTransition=function(V){var W=D.T,$={};D.T=$;try{var te=V(),ue=D.S;ue!==null&&ue($,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(X,H)}catch(ge){H(ge)}finally{D.T=W}},ut.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},ut.use=function(V){return D.H.use(V)},ut.useActionState=function(V,W,$){return D.H.useActionState(V,W,$)},ut.useCallback=function(V,W){return D.H.useCallback(V,W)},ut.useContext=function(V){return D.H.useContext(V)},ut.useDebugValue=function(){},ut.useDeferredValue=function(V,W){return D.H.useDeferredValue(V,W)},ut.useEffect=function(V,W,$){var te=D.H;if(typeof $=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return te.useEffect(V,W)},ut.useId=function(){return D.H.useId()},ut.useImperativeHandle=function(V,W,$){return D.H.useImperativeHandle(V,W,$)},ut.useInsertionEffect=function(V,W){return D.H.useInsertionEffect(V,W)},ut.useLayoutEffect=function(V,W){return D.H.useLayoutEffect(V,W)},ut.useMemo=function(V,W){return D.H.useMemo(V,W)},ut.useOptimistic=function(V,W){return D.H.useOptimistic(V,W)},ut.useReducer=function(V,W,$){return D.H.useReducer(V,W,$)},ut.useRef=function(V){return D.H.useRef(V)},ut.useState=function(V){return D.H.useState(V)},ut.useSyncExternalStore=function(V,W,$){return D.H.useSyncExternalStore(V,W,$)},ut.useTransition=function(){return D.H.useTransition()},ut.version="19.1.0",ut}var cI;function rM(){return cI||(cI=1,RS.exports=HX()),RS.exports}var q=rM();const oV=KA(q),sV=vX({__proto__:null,default:oV},[q]);var lV=q.createContext(void 0),uV=r=>{const e=q.useContext(lV);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},FX=({client:r,children:e})=>(q.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),S.jsx(lV.Provider,{value:r,children:e})),cV=q.createContext(!1),UX=()=>q.useContext(cV);cV.Provider;function YX(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var WX=q.createContext(YX()),XX=()=>q.useContext(WX),qX=(r,e,t)=>{const n=t!=null&&t.state.error&&typeof r.throwOnError=="function"?J4(r.throwOnError,[t.state.error,t]):r.throwOnError;(r.suspense||r.experimental_prefetchInRender||n)&&(e.isReset()||(r.retryOnMount=!1))},ZX=r=>{q.useEffect(()=>{r.clearReset()},[r])},$X=({result:r,errorResetBoundary:e,throwOnError:t,query:n,suspense:a})=>r.isError&&!e.isReset()&&!r.isFetching&&n&&(a&&r.data===void 0||J4(t,[r.error,n])),KX=r=>{if(r.suspense){const t=a=>a==="static"?a:Math.max(a??1e3,1e3),n=r.staleTime;r.staleTime=typeof n=="function"?(...a)=>t(n(...a)):t(n),typeof r.gcTime=="number"&&(r.gcTime=Math.max(r.gcTime,1e3))}},QX=(r,e)=>r.isLoading&&r.isFetching&&!e,JX=(r,e)=>(r==null?void 0:r.suspense)&&e.isPending,fI=(r,e,t)=>e.fetchOptimistic(r).catch(()=>{t.clearReset()});function eq(r,e,t){var d,v,g,x;const n=UX(),a=XX(),i=uV(),o=i.defaultQueryOptions(r);(v=(d=i.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||v.call(d,o);const s=i.getQueryCache().get(o.queryHash);o._optimisticResults=n?"isRestoring":"optimistic",KX(o),qX(o,a,s),ZX(a);const l=!i.getQueryCache().get(o.queryHash),[u]=q.useState(()=>new e(i,o)),c=u.getOptimisticResult(o),f=!n&&r.subscribed!==!1;if(q.useSyncExternalStore(q.useCallback(y=>{const b=f?u.subscribe(Kr.batchCalls(y)):En;return u.updateResult(),b},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),q.useEffect(()=>{u.setOptions(o)},[o,u]),JX(o,c))throw fI(o,u,a);if($X({result:c,errorResetBoundary:a,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw c.error;if((x=(g=i.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||x.call(g,o,c),o.experimental_prefetchInRender&&!zp.isServer()&&QX(c,n)){const y=l?fI(o,u,a):s==null?void 0:s.promise;y==null||y.catch(En).finally(()=>{u.updateResult()})}return o.notifyOnChangeProps?c:u.trackResult(c)}function Rr(r,e){return eq(r,kX)}var ES={exports:{}},fv={},kS={exports:{}},IS={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var hI;function tq(){return hI||(hI=1,(function(r){function e(B,F){var H=B.length;B.push(F);e:for(;0<H;){var X=H-1>>>1,V=B[X];if(0<a(V,F))B[X]=F,B[H]=V,H=X;else break e}}function t(B){return B.length===0?null:B[0]}function n(B){if(B.length===0)return null;var F=B[0],H=B.pop();if(H!==F){B[0]=H;e:for(var X=0,V=B.length,W=V>>>1;X<W;){var $=2*(X+1)-1,te=B[$],ue=$+1,ge=B[ue];if(0>a(te,H))ue<V&&0>a(ge,te)?(B[X]=ge,B[ue]=H,X=ue):(B[X]=te,B[$]=H,X=$);else if(ue<V&&0>a(ge,H))B[X]=ge,B[ue]=H,X=ue;else break e}}return F}function a(B,F){var H=B.sortIndex-F.sortIndex;return H!==0?H:B.id-F.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;r.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();r.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,d=3,v=!1,g=!1,x=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function C(B){for(var F=t(u);F!==null;){if(F.callback===null)n(u);else if(F.startTime<=B)n(u),F.sortIndex=F.expirationTime,e(l,F);else break;F=t(u)}}function D(B){if(x=!1,C(B),!g)if(t(l)!==null)g=!0,M||(M=!0,z());else{var F=t(u);F!==null&&U(D,F.startTime-B)}}var M=!1,N=-1,R=5,E=-1;function k(){return y?!0:!(r.unstable_now()-E<R)}function I(){if(y=!1,M){var B=r.unstable_now();E=B;var F=!0;try{e:{g=!1,x&&(x=!1,w(N),N=-1),v=!0;var H=d;try{t:{for(C(B),f=t(l);f!==null&&!(f.expirationTime>B&&k());){var X=f.callback;if(typeof X=="function"){f.callback=null,d=f.priorityLevel;var V=X(f.expirationTime<=B);if(B=r.unstable_now(),typeof V=="function"){f.callback=V,C(B),F=!0;break t}f===t(l)&&n(l),C(B)}else n(l);f=t(l)}if(f!==null)F=!0;else{var W=t(u);W!==null&&U(D,W.startTime-B),F=!1}}break e}finally{f=null,d=H,v=!1}F=void 0}}finally{F?z():M=!1}}}var z;if(typeof T=="function")z=function(){T(I)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,G=P.port2;P.port1.onmessage=I,z=function(){G.postMessage(null)}}else z=function(){b(I,0)};function U(B,F){N=b(function(){B(r.unstable_now())},F)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(B){B.callback=null},r.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<B?Math.floor(1e3/B):5},r.unstable_getCurrentPriorityLevel=function(){return d},r.unstable_next=function(B){switch(d){case 1:case 2:case 3:var F=3;break;default:F=d}var H=d;d=F;try{return B()}finally{d=H}},r.unstable_requestPaint=function(){y=!0},r.unstable_runWithPriority=function(B,F){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var H=d;d=B;try{return F()}finally{d=H}},r.unstable_scheduleCallback=function(B,F,H){var X=r.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?X+H:X):H=X,B){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=H+V,B={id:c++,callback:F,priorityLevel:B,startTime:H,expirationTime:V,sortIndex:-1},H>X?(B.sortIndex=H,e(u,B),t(l)===null&&B===t(u)&&(x?(w(N),N=-1):x=!0,U(D,H-X))):(B.sortIndex=V,e(l,B),g||v||(g=!0,M||(M=!0,z()))),B},r.unstable_shouldYield=k,r.unstable_wrapCallback=function(B){var F=d;return function(){var H=d;d=F;try{return B.apply(this,arguments)}finally{d=H}}}})(IS)),IS}var dI;function rq(){return dI||(dI=1,kS.exports=tq()),kS.exports}var OS={exports:{}},sn={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var vI;function nq(){if(vI)return sn;vI=1;var r=rM();function e(l){var u="https://react.dev/errors/"+l;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)u+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var n={d:{f:t,r:function(){throw Error(e(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(l,u,c){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:f==null?null:""+f,children:l,containerInfo:u,implementation:c}}var o=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(l,u){if(l==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return sn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,sn.createPortal=function(l,u){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(e(299));return i(l,u,null,c)},sn.flushSync=function(l){var u=o.T,c=n.p;try{if(o.T=null,n.p=2,l)return l()}finally{o.T=u,n.p=c,n.d.f()}},sn.preconnect=function(l,u){typeof l=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,n.d.C(l,u))},sn.prefetchDNS=function(l){typeof l=="string"&&n.d.D(l)},sn.preinit=function(l,u){if(typeof l=="string"&&u&&typeof u.as=="string"){var c=u.as,f=s(c,u.crossOrigin),d=typeof u.integrity=="string"?u.integrity:void 0,v=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;c==="style"?n.d.S(l,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:f,integrity:d,fetchPriority:v}):c==="script"&&n.d.X(l,{crossOrigin:f,integrity:d,fetchPriority:v,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},sn.preinitModule=function(l,u){if(typeof l=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var c=s(u.as,u.crossOrigin);n.d.M(l,{crossOrigin:c,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&n.d.M(l)},sn.preload=function(l,u){if(typeof l=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var c=u.as,f=s(c,u.crossOrigin);n.d.L(l,c,{crossOrigin:f,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},sn.preloadModule=function(l,u){if(typeof l=="string")if(u){var c=s(u.as,u.crossOrigin);n.d.m(l,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:c,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else n.d.m(l)},sn.requestFormReset=function(l){n.d.r(l)},sn.unstable_batchedUpdates=function(l,u){return l(u)},sn.useFormState=function(l,u,c){return o.H.useFormState(l,u,c)},sn.useFormStatus=function(){return o.H.useHostTransitionStatus()},sn.version="19.1.0",sn}var pI;function fV(){if(pI)return OS.exports;pI=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),OS.exports=nq(),OS.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var gI;function aq(){if(gI)return fv;gI=1;var r=rq(),e=rM(),t=fV();function n(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)p+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(h){return!(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)}function i(h){var p=h,m=h;if(h.alternate)for(;p.return;)p=p.return;else{h=p;do p=h,(p.flags&4098)!==0&&(m=p.return),h=p.return;while(h)}return p.tag===3?m:null}function o(h){if(h.tag===13){var p=h.memoizedState;if(p===null&&(h=h.alternate,h!==null&&(p=h.memoizedState)),p!==null)return p.dehydrated}return null}function s(h){if(i(h)!==h)throw Error(n(188))}function l(h){var p=h.alternate;if(!p){if(p=i(h),p===null)throw Error(n(188));return p!==h?null:h}for(var m=h,_=p;;){var A=m.return;if(A===null)break;var L=A.alternate;if(L===null){if(_=A.return,_!==null){m=_;continue}break}if(A.child===L.child){for(L=A.child;L;){if(L===m)return s(A),h;if(L===_)return s(A),p;L=L.sibling}throw Error(n(188))}if(m.return!==_.return)m=A,_=L;else{for(var j=!1,Y=A.child;Y;){if(Y===m){j=!0,m=A,_=L;break}if(Y===_){j=!0,_=A,m=L;break}Y=Y.sibling}if(!j){for(Y=L.child;Y;){if(Y===m){j=!0,m=L,_=A;break}if(Y===_){j=!0,_=L,m=A;break}Y=Y.sibling}if(!j)throw Error(n(189))}}if(m.alternate!==_)throw Error(n(190))}if(m.tag!==3)throw Error(n(188));return m.stateNode.current===m?h:p}function u(h){var p=h.tag;if(p===5||p===26||p===27||p===6)return h;for(h=h.child;h!==null;){if(p=u(h),p!==null)return p;h=h.sibling}return null}var c=Object.assign,f=Symbol.for("react.element"),d=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),w=Symbol.for("react.consumer"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),k=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function z(h){return h===null||typeof h!="object"?null:(h=I&&h[I]||h["@@iterator"],typeof h=="function"?h:null)}var P=Symbol.for("react.client.reference");function G(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===P?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case g:return"Fragment";case y:return"Profiler";case x:return"StrictMode";case D:return"Suspense";case M:return"SuspenseList";case E:return"Activity"}if(typeof h=="object")switch(h.$$typeof){case v:return"Portal";case T:return(h.displayName||"Context")+".Provider";case w:return(h._context.displayName||"Context")+".Consumer";case C:var p=h.render;return h=h.displayName,h||(h=p.displayName||p.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case N:return p=h.displayName||null,p!==null?p:G(h.type)||"Memo";case R:p=h._payload,h=h._init;try{return G(h(p))}catch{}}return null}var U=Array.isArray,B=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},X=[],V=-1;function W(h){return{current:h}}function $(h){0>V||(h.current=X[V],X[V]=null,V--)}function te(h,p){V++,X[V]=h.current,h.current=p}var ue=W(null),ge=W(null),Se=W(null),Xe=W(null);function be(h,p){switch(te(Se,p),te(ge,h),te(ue,null),p.nodeType){case 9:case 11:h=(h=p.documentElement)&&(h=h.namespaceURI)?Tk(h):0;break;default:if(h=p.tagName,p=p.namespaceURI)p=Tk(p),h=Ck(p,h);else switch(h){case"svg":h=1;break;case"math":h=2;break;default:h=0}}$(ue),te(ue,h)}function we(){$(ue),$(ge),$(Se)}function ze(h){h.memoizedState!==null&&te(Xe,h);var p=ue.current,m=Ck(p,h.type);p!==m&&(te(ge,h),te(ue,m))}function oe(h){ge.current===h&&($(ue),$(ge)),Xe.current===h&&($(Xe),iv._currentValue=H)}var pe=Object.prototype.hasOwnProperty,je=r.unstable_scheduleCallback,Ne=r.unstable_cancelCallback,at=r.unstable_shouldYield,ft=r.unstable_requestPaint,Ct=r.unstable_now,Yr=r.unstable_getCurrentPriorityLevel,er=r.unstable_ImmediatePriority,ui=r.unstable_UserBlockingPriority,Va=r.unstable_NormalPriority,hd=r.unstable_LowPriority,oL=r.unstable_IdlePriority,$9=r.log,K9=r.unstable_setDisableYieldValue,dd=null,Bn=null;function os(h){if(typeof $9=="function"&&K9(h),Bn&&typeof Bn.setStrictMode=="function")try{Bn.setStrictMode(dd,h)}catch{}}var Vn=Math.clz32?Math.clz32:eY,Q9=Math.log,J9=Math.LN2;function eY(h){return h>>>=0,h===0?32:31-(Q9(h)/J9|0)|0}var Qg=256,Jg=4194304;function kl(h){var p=h&42;if(p!==0)return p;switch(h&-h){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:return 64;case 128:return 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 h&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return h&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return h}}function em(h,p,m){var _=h.pendingLanes;if(_===0)return 0;var A=0,L=h.suspendedLanes,j=h.pingedLanes;h=h.warmLanes;var Y=_&134217727;return Y!==0?(_=Y&~L,_!==0?A=kl(_):(j&=Y,j!==0?A=kl(j):m||(m=Y&~h,m!==0&&(A=kl(m))))):(Y=_&~L,Y!==0?A=kl(Y):j!==0?A=kl(j):m||(m=_&~h,m!==0&&(A=kl(m)))),A===0?0:p!==0&&p!==A&&(p&L)===0&&(L=A&-A,m=p&-p,L>=m||L===32&&(m&4194048)!==0)?p:A}function vd(h,p){return(h.pendingLanes&~(h.suspendedLanes&~h.pingedLanes)&p)===0}function tY(h,p){switch(h){case 1:case 2:case 4:case 8:case 64:return p+250;case 16:case 32: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 p+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function sL(){var h=Qg;return Qg<<=1,(Qg&4194048)===0&&(Qg=256),h}function lL(){var h=Jg;return Jg<<=1,(Jg&62914560)===0&&(Jg=4194304),h}function yb(h){for(var p=[],m=0;31>m;m++)p.push(h);return p}function pd(h,p){h.pendingLanes|=p,p!==268435456&&(h.suspendedLanes=0,h.pingedLanes=0,h.warmLanes=0)}function rY(h,p,m,_,A,L){var j=h.pendingLanes;h.pendingLanes=m,h.suspendedLanes=0,h.pingedLanes=0,h.warmLanes=0,h.expiredLanes&=m,h.entangledLanes&=m,h.errorRecoveryDisabledLanes&=m,h.shellSuspendCounter=0;var Y=h.entanglements,Z=h.expirationTimes,ae=h.hiddenUpdates;for(m=j&~m;0<m;){var he=31-Vn(m),ve=1<<he;Y[he]=0,Z[he]=-1;var se=ae[he];if(se!==null)for(ae[he]=null,he=0;he<se.length;he++){var le=se[he];le!==null&&(le.lane&=-536870913)}m&=~ve}_!==0&&uL(h,_,0),L!==0&&A===0&&h.tag!==0&&(h.suspendedLanes|=L&~(j&~p))}function uL(h,p,m){h.pendingLanes|=p,h.suspendedLanes&=~p;var _=31-Vn(p);h.entangledLanes|=p,h.entanglements[_]=h.entanglements[_]|1073741824|m&4194090}function cL(h,p){var m=h.entangledLanes|=p;for(h=h.entanglements;m;){var _=31-Vn(m),A=1<<_;A&p|h[_]&p&&(h[_]|=p),m&=~A}}function xb(h){switch(h){case 2:h=1;break;case 8:h=4;break;case 32:h=16;break;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:h=128;break;case 268435456:h=134217728;break;default:h=0}return h}function bb(h){return h&=-h,2<h?8<h?(h&134217727)!==0?32:268435456:8:2}function fL(){var h=F.p;return h!==0?h:(h=window.event,h===void 0?32:Uk(h.type))}function nY(h,p){var m=F.p;try{return F.p=h,p()}finally{F.p=m}}var ss=Math.random().toString(36).slice(2),an="__reactFiber$"+ss,Cn="__reactProps$"+ss,Dc="__reactContainer$"+ss,_b="__reactEvents$"+ss,aY="__reactListeners$"+ss,iY="__reactHandles$"+ss,hL="__reactResources$"+ss,gd="__reactMarker$"+ss;function Sb(h){delete h[an],delete h[Cn],delete h[_b],delete h[aY],delete h[iY]}function Nc(h){var p=h[an];if(p)return p;for(var m=h.parentNode;m;){if(p=m[Dc]||m[an]){if(m=p.alternate,p.child!==null||m!==null&&m.child!==null)for(h=Nk(h);h!==null;){if(m=h[an])return m;h=Nk(h)}return p}h=m,m=h.parentNode}return null}function Lc(h){if(h=h[an]||h[Dc]){var p=h.tag;if(p===5||p===6||p===13||p===26||p===27||p===3)return h}return null}function md(h){var p=h.tag;if(p===5||p===26||p===27||p===6)return h.stateNode;throw Error(n(33))}function Rc(h){var p=h[hL];return p||(p=h[hL]={hoistableStyles:new Map,hoistableScripts:new Map}),p}function Ir(h){h[gd]=!0}var dL=new Set,vL={};function Il(h,p){Ec(h,p),Ec(h+"Capture",p)}function Ec(h,p){for(vL[h]=p,h=0;h<p.length;h++)dL.add(p[h])}var oY=RegExp("^[: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]*$"),pL={},gL={};function sY(h){return pe.call(gL,h)?!0:pe.call(pL,h)?!1:oY.test(h)?gL[h]=!0:(pL[h]=!0,!1)}function tm(h,p,m){if(sY(p))if(m===null)h.removeAttribute(p);else{switch(typeof m){case"undefined":case"function":case"symbol":h.removeAttribute(p);return;case"boolean":var _=p.toLowerCase().slice(0,5);if(_!=="data-"&&_!=="aria-"){h.removeAttribute(p);return}}h.setAttribute(p,""+m)}}function rm(h,p,m){if(m===null)h.removeAttribute(p);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":h.removeAttribute(p);return}h.setAttribute(p,""+m)}}function ro(h,p,m,_){if(_===null)h.removeAttribute(m);else{switch(typeof _){case"undefined":case"function":case"symbol":case"boolean":h.removeAttribute(m);return}h.setAttributeNS(p,m,""+_)}}var wb,mL;function kc(h){if(wb===void 0)try{throw Error()}catch(m){var p=m.stack.trim().match(/\n( *(at )?)/);wb=p&&p[1]||"",mL=-1<m.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<m.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+wb+h+mL}var Tb=!1;function Cb(h,p){if(!h||Tb)return"";Tb=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var _={DetermineComponentFrameRoot:function(){try{if(p){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(le){var se=le}Reflect.construct(h,[],ve)}else{try{ve.call()}catch(le){se=le}h.call(ve.prototype)}}else{try{throw Error()}catch(le){se=le}(ve=h())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(le){if(le&&se&&typeof le.stack=="string")return[le.stack,se.stack]}return[null,null]}};_.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var A=Object.getOwnPropertyDescriptor(_.DetermineComponentFrameRoot,"name");A&&A.configurable&&Object.defineProperty(_.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var L=_.DetermineComponentFrameRoot(),j=L[0],Y=L[1];if(j&&Y){var Z=j.split(`
44
- `),ae=Y.split(`
45
- `);for(A=_=0;_<Z.length&&!Z[_].includes("DetermineComponentFrameRoot");)_++;for(;A<ae.length&&!ae[A].includes("DetermineComponentFrameRoot");)A++;if(_===Z.length||A===ae.length)for(_=Z.length-1,A=ae.length-1;1<=_&&0<=A&&Z[_]!==ae[A];)A--;for(;1<=_&&0<=A;_--,A--)if(Z[_]!==ae[A]){if(_!==1||A!==1)do if(_--,A--,0>A||Z[_]!==ae[A]){var he=`
46
- `+Z[_].replace(" at new "," at ");return h.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",h.displayName)),he}while(1<=_&&0<=A);break}}}finally{Tb=!1,Error.prepareStackTrace=m}return(m=h?h.displayName||h.name:"")?kc(m):""}function lY(h){switch(h.tag){case 26:case 27:case 5:return kc(h.type);case 16:return kc("Lazy");case 13:return kc("Suspense");case 19:return kc("SuspenseList");case 0:case 15:return Cb(h.type,!1);case 11:return Cb(h.type.render,!1);case 1:return Cb(h.type,!0);case 31:return kc("Activity");default:return""}}function yL(h){try{var p="";do p+=lY(h),h=h.return;while(h);return p}catch(m){return`
47
- Error generating stack: `+m.message+`
48
- `+m.stack}}function ua(h){switch(typeof h){case"bigint":case"boolean":case"number":case"string":case"undefined":return h;case"object":return h;default:return""}}function xL(h){var p=h.type;return(h=h.nodeName)&&h.toLowerCase()==="input"&&(p==="checkbox"||p==="radio")}function uY(h){var p=xL(h)?"checked":"value",m=Object.getOwnPropertyDescriptor(h.constructor.prototype,p),_=""+h[p];if(!h.hasOwnProperty(p)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var A=m.get,L=m.set;return Object.defineProperty(h,p,{configurable:!0,get:function(){return A.call(this)},set:function(j){_=""+j,L.call(this,j)}}),Object.defineProperty(h,p,{enumerable:m.enumerable}),{getValue:function(){return _},setValue:function(j){_=""+j},stopTracking:function(){h._valueTracker=null,delete h[p]}}}}function nm(h){h._valueTracker||(h._valueTracker=uY(h))}function bL(h){if(!h)return!1;var p=h._valueTracker;if(!p)return!0;var m=p.getValue(),_="";return h&&(_=xL(h)?h.checked?"true":"false":h.value),h=_,h!==m?(p.setValue(h),!0):!1}function am(h){if(h=h||(typeof document<"u"?document:void 0),typeof h>"u")return null;try{return h.activeElement||h.body}catch{return h.body}}var cY=/[\n"\\]/g;function ca(h){return h.replace(cY,function(p){return"\\"+p.charCodeAt(0).toString(16)+" "})}function Ab(h,p,m,_,A,L,j,Y){h.name="",j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?h.type=j:h.removeAttribute("type"),p!=null?j==="number"?(p===0&&h.value===""||h.value!=p)&&(h.value=""+ua(p)):h.value!==""+ua(p)&&(h.value=""+ua(p)):j!=="submit"&&j!=="reset"||h.removeAttribute("value"),p!=null?Mb(h,j,ua(p)):m!=null?Mb(h,j,ua(m)):_!=null&&h.removeAttribute("value"),A==null&&L!=null&&(h.defaultChecked=!!L),A!=null&&(h.checked=A&&typeof A!="function"&&typeof A!="symbol"),Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?h.name=""+ua(Y):h.removeAttribute("name")}function _L(h,p,m,_,A,L,j,Y){if(L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(h.type=L),p!=null||m!=null){if(!(L!=="submit"&&L!=="reset"||p!=null))return;m=m!=null?""+ua(m):"",p=p!=null?""+ua(p):m,Y||p===h.value||(h.value=p),h.defaultValue=p}_=_??A,_=typeof _!="function"&&typeof _!="symbol"&&!!_,h.checked=Y?h.checked:!!_,h.defaultChecked=!!_,j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(h.name=j)}function Mb(h,p,m){p==="number"&&am(h.ownerDocument)===h||h.defaultValue===""+m||(h.defaultValue=""+m)}function Ic(h,p,m,_){if(h=h.options,p){p={};for(var A=0;A<m.length;A++)p["$"+m[A]]=!0;for(m=0;m<h.length;m++)A=p.hasOwnProperty("$"+h[m].value),h[m].selected!==A&&(h[m].selected=A),A&&_&&(h[m].defaultSelected=!0)}else{for(m=""+ua(m),p=null,A=0;A<h.length;A++){if(h[A].value===m){h[A].selected=!0,_&&(h[A].defaultSelected=!0);return}p!==null||h[A].disabled||(p=h[A])}p!==null&&(p.selected=!0)}}function SL(h,p,m){if(p!=null&&(p=""+ua(p),p!==h.value&&(h.value=p),m==null)){h.defaultValue!==p&&(h.defaultValue=p);return}h.defaultValue=m!=null?""+ua(m):""}function wL(h,p,m,_){if(p==null){if(_!=null){if(m!=null)throw Error(n(92));if(U(_)){if(1<_.length)throw Error(n(93));_=_[0]}m=_}m==null&&(m=""),p=m}m=ua(p),h.defaultValue=m,_=h.textContent,_===m&&_!==""&&_!==null&&(h.value=_)}function Oc(h,p){if(p){var m=h.firstChild;if(m&&m===h.lastChild&&m.nodeType===3){m.nodeValue=p;return}}h.textContent=p}var fY=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function TL(h,p,m){var _=p.indexOf("--")===0;m==null||typeof m=="boolean"||m===""?_?h.setProperty(p,""):p==="float"?h.cssFloat="":h[p]="":_?h.setProperty(p,m):typeof m!="number"||m===0||fY.has(p)?p==="float"?h.cssFloat=m:h[p]=(""+m).trim():h[p]=m+"px"}function CL(h,p,m){if(p!=null&&typeof p!="object")throw Error(n(62));if(h=h.style,m!=null){for(var _ in m)!m.hasOwnProperty(_)||p!=null&&p.hasOwnProperty(_)||(_.indexOf("--")===0?h.setProperty(_,""):_==="float"?h.cssFloat="":h[_]="");for(var A in p)_=p[A],p.hasOwnProperty(A)&&m[A]!==_&&TL(h,A,_)}else for(var L in p)p.hasOwnProperty(L)&&TL(h,L,p[L])}function Db(h){if(h.indexOf("-")===-1)return!1;switch(h){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 hY=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),dY=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function im(h){return dY.test(""+h)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":h}var Nb=null;function Lb(h){return h=h.target||h.srcElement||window,h.correspondingUseElement&&(h=h.correspondingUseElement),h.nodeType===3?h.parentNode:h}var Pc=null,zc=null;function AL(h){var p=Lc(h);if(p&&(h=p.stateNode)){var m=h[Cn]||null;e:switch(h=p.stateNode,p.type){case"input":if(Ab(h,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name),p=m.name,m.type==="radio"&&p!=null){for(m=h;m.parentNode;)m=m.parentNode;for(m=m.querySelectorAll('input[name="'+ca(""+p)+'"][type="radio"]'),p=0;p<m.length;p++){var _=m[p];if(_!==h&&_.form===h.form){var A=_[Cn]||null;if(!A)throw Error(n(90));Ab(_,A.value,A.defaultValue,A.defaultValue,A.checked,A.defaultChecked,A.type,A.name)}}for(p=0;p<m.length;p++)_=m[p],_.form===h.form&&bL(_)}break e;case"textarea":SL(h,m.value,m.defaultValue);break e;case"select":p=m.value,p!=null&&Ic(h,!!m.multiple,p,!1)}}}var Rb=!1;function ML(h,p,m){if(Rb)return h(p,m);Rb=!0;try{var _=h(p);return _}finally{if(Rb=!1,(Pc!==null||zc!==null)&&(Um(),Pc&&(p=Pc,h=zc,zc=Pc=null,AL(p),h)))for(p=0;p<h.length;p++)AL(h[p])}}function yd(h,p){var m=h.stateNode;if(m===null)return null;var _=m[Cn]||null;if(_===null)return null;m=_[p];e:switch(p){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(_=!_.disabled)||(h=h.type,_=!(h==="button"||h==="input"||h==="select"||h==="textarea")),h=!_;break e;default:h=!1}if(h)return null;if(m&&typeof m!="function")throw Error(n(231,p,typeof m));return m}var no=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eb=!1;if(no)try{var xd={};Object.defineProperty(xd,"passive",{get:function(){Eb=!0}}),window.addEventListener("test",xd,xd),window.removeEventListener("test",xd,xd)}catch{Eb=!1}var ls=null,kb=null,om=null;function DL(){if(om)return om;var h,p=kb,m=p.length,_,A="value"in ls?ls.value:ls.textContent,L=A.length;for(h=0;h<m&&p[h]===A[h];h++);var j=m-h;for(_=1;_<=j&&p[m-_]===A[L-_];_++);return om=A.slice(h,1<_?1-_:void 0)}function sm(h){var p=h.keyCode;return"charCode"in h?(h=h.charCode,h===0&&p===13&&(h=13)):h=p,h===10&&(h=13),32<=h||h===13?h:0}function lm(){return!0}function NL(){return!1}function An(h){function p(m,_,A,L,j){this._reactName=m,this._targetInst=A,this.type=_,this.nativeEvent=L,this.target=j,this.currentTarget=null;for(var Y in h)h.hasOwnProperty(Y)&&(m=h[Y],this[Y]=m?m(L):L[Y]);return this.isDefaultPrevented=(L.defaultPrevented!=null?L.defaultPrevented:L.returnValue===!1)?lm:NL,this.isPropagationStopped=NL,this}return c(p.prototype,{preventDefault:function(){this.defaultPrevented=!0;var m=this.nativeEvent;m&&(m.preventDefault?m.preventDefault():typeof m.returnValue!="unknown"&&(m.returnValue=!1),this.isDefaultPrevented=lm)},stopPropagation:function(){var m=this.nativeEvent;m&&(m.stopPropagation?m.stopPropagation():typeof m.cancelBubble!="unknown"&&(m.cancelBubble=!0),this.isPropagationStopped=lm)},persist:function(){},isPersistent:lm}),p}var Ol={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(h){return h.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},um=An(Ol),bd=c({},Ol,{view:0,detail:0}),vY=An(bd),Ib,Ob,_d,cm=c({},bd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zb,button:0,buttons:0,relatedTarget:function(h){return h.relatedTarget===void 0?h.fromElement===h.srcElement?h.toElement:h.fromElement:h.relatedTarget},movementX:function(h){return"movementX"in h?h.movementX:(h!==_d&&(_d&&h.type==="mousemove"?(Ib=h.screenX-_d.screenX,Ob=h.screenY-_d.screenY):Ob=Ib=0,_d=h),Ib)},movementY:function(h){return"movementY"in h?h.movementY:Ob}}),LL=An(cm),pY=c({},cm,{dataTransfer:0}),gY=An(pY),mY=c({},bd,{relatedTarget:0}),Pb=An(mY),yY=c({},Ol,{animationName:0,elapsedTime:0,pseudoElement:0}),xY=An(yY),bY=c({},Ol,{clipboardData:function(h){return"clipboardData"in h?h.clipboardData:window.clipboardData}}),_Y=An(bY),SY=c({},Ol,{data:0}),RL=An(SY),wY={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TY={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"},CY={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function AY(h){var p=this.nativeEvent;return p.getModifierState?p.getModifierState(h):(h=CY[h])?!!p[h]:!1}function zb(){return AY}var MY=c({},bd,{key:function(h){if(h.key){var p=wY[h.key]||h.key;if(p!=="Unidentified")return p}return h.type==="keypress"?(h=sm(h),h===13?"Enter":String.fromCharCode(h)):h.type==="keydown"||h.type==="keyup"?TY[h.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zb,charCode:function(h){return h.type==="keypress"?sm(h):0},keyCode:function(h){return h.type==="keydown"||h.type==="keyup"?h.keyCode:0},which:function(h){return h.type==="keypress"?sm(h):h.type==="keydown"||h.type==="keyup"?h.keyCode:0}}),DY=An(MY),NY=c({},cm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),EL=An(NY),LY=c({},bd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zb}),RY=An(LY),EY=c({},Ol,{propertyName:0,elapsedTime:0,pseudoElement:0}),kY=An(EY),IY=c({},cm,{deltaX:function(h){return"deltaX"in h?h.deltaX:"wheelDeltaX"in h?-h.wheelDeltaX:0},deltaY:function(h){return"deltaY"in h?h.deltaY:"wheelDeltaY"in h?-h.wheelDeltaY:"wheelDelta"in h?-h.wheelDelta:0},deltaZ:0,deltaMode:0}),OY=An(IY),PY=c({},Ol,{newState:0,oldState:0}),zY=An(PY),jY=[9,13,27,32],jb=no&&"CompositionEvent"in window,Sd=null;no&&"documentMode"in document&&(Sd=document.documentMode);var BY=no&&"TextEvent"in window&&!Sd,kL=no&&(!jb||Sd&&8<Sd&&11>=Sd),IL=" ",OL=!1;function PL(h,p){switch(h){case"keyup":return jY.indexOf(p.keyCode)!==-1;case"keydown":return p.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zL(h){return h=h.detail,typeof h=="object"&&"data"in h?h.data:null}var jc=!1;function VY(h,p){switch(h){case"compositionend":return zL(p);case"keypress":return p.which!==32?null:(OL=!0,IL);case"textInput":return h=p.data,h===IL&&OL?null:h;default:return null}}function GY(h,p){if(jc)return h==="compositionend"||!jb&&PL(h,p)?(h=DL(),om=kb=ls=null,jc=!1,h):null;switch(h){case"paste":return null;case"keypress":if(!(p.ctrlKey||p.altKey||p.metaKey)||p.ctrlKey&&p.altKey){if(p.char&&1<p.char.length)return p.char;if(p.which)return String.fromCharCode(p.which)}return null;case"compositionend":return kL&&p.locale!=="ko"?null:p.data;default:return null}}var HY={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 jL(h){var p=h&&h.nodeName&&h.nodeName.toLowerCase();return p==="input"?!!HY[h.type]:p==="textarea"}function BL(h,p,m,_){Pc?zc?zc.push(_):zc=[_]:Pc=_,p=$m(p,"onChange"),0<p.length&&(m=new um("onChange","change",null,m,_),h.push({event:m,listeners:p}))}var wd=null,Td=null;function FY(h){xk(h,0)}function fm(h){var p=md(h);if(bL(p))return h}function VL(h,p){if(h==="change")return p}var GL=!1;if(no){var Bb;if(no){var Vb="oninput"in document;if(!Vb){var HL=document.createElement("div");HL.setAttribute("oninput","return;"),Vb=typeof HL.oninput=="function"}Bb=Vb}else Bb=!1;GL=Bb&&(!document.documentMode||9<document.documentMode)}function FL(){wd&&(wd.detachEvent("onpropertychange",UL),Td=wd=null)}function UL(h){if(h.propertyName==="value"&&fm(Td)){var p=[];BL(p,Td,h,Lb(h)),ML(FY,p)}}function UY(h,p,m){h==="focusin"?(FL(),wd=p,Td=m,wd.attachEvent("onpropertychange",UL)):h==="focusout"&&FL()}function YY(h){if(h==="selectionchange"||h==="keyup"||h==="keydown")return fm(Td)}function WY(h,p){if(h==="click")return fm(p)}function XY(h,p){if(h==="input"||h==="change")return fm(p)}function qY(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var Gn=typeof Object.is=="function"?Object.is:qY;function Cd(h,p){if(Gn(h,p))return!0;if(typeof h!="object"||h===null||typeof p!="object"||p===null)return!1;var m=Object.keys(h),_=Object.keys(p);if(m.length!==_.length)return!1;for(_=0;_<m.length;_++){var A=m[_];if(!pe.call(p,A)||!Gn(h[A],p[A]))return!1}return!0}function YL(h){for(;h&&h.firstChild;)h=h.firstChild;return h}function WL(h,p){var m=YL(h);h=0;for(var _;m;){if(m.nodeType===3){if(_=h+m.textContent.length,h<=p&&_>=p)return{node:m,offset:p-h};h=_}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=YL(m)}}function XL(h,p){return h&&p?h===p?!0:h&&h.nodeType===3?!1:p&&p.nodeType===3?XL(h,p.parentNode):"contains"in h?h.contains(p):h.compareDocumentPosition?!!(h.compareDocumentPosition(p)&16):!1:!1}function qL(h){h=h!=null&&h.ownerDocument!=null&&h.ownerDocument.defaultView!=null?h.ownerDocument.defaultView:window;for(var p=am(h.document);p instanceof h.HTMLIFrameElement;){try{var m=typeof p.contentWindow.location.href=="string"}catch{m=!1}if(m)h=p.contentWindow;else break;p=am(h.document)}return p}function Gb(h){var p=h&&h.nodeName&&h.nodeName.toLowerCase();return p&&(p==="input"&&(h.type==="text"||h.type==="search"||h.type==="tel"||h.type==="url"||h.type==="password")||p==="textarea"||h.contentEditable==="true")}var ZY=no&&"documentMode"in document&&11>=document.documentMode,Bc=null,Hb=null,Ad=null,Fb=!1;function ZL(h,p,m){var _=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;Fb||Bc==null||Bc!==am(_)||(_=Bc,"selectionStart"in _&&Gb(_)?_={start:_.selectionStart,end:_.selectionEnd}:(_=(_.ownerDocument&&_.ownerDocument.defaultView||window).getSelection(),_={anchorNode:_.anchorNode,anchorOffset:_.anchorOffset,focusNode:_.focusNode,focusOffset:_.focusOffset}),Ad&&Cd(Ad,_)||(Ad=_,_=$m(Hb,"onSelect"),0<_.length&&(p=new um("onSelect","select",null,p,m),h.push({event:p,listeners:_}),p.target=Bc)))}function Pl(h,p){var m={};return m[h.toLowerCase()]=p.toLowerCase(),m["Webkit"+h]="webkit"+p,m["Moz"+h]="moz"+p,m}var Vc={animationend:Pl("Animation","AnimationEnd"),animationiteration:Pl("Animation","AnimationIteration"),animationstart:Pl("Animation","AnimationStart"),transitionrun:Pl("Transition","TransitionRun"),transitionstart:Pl("Transition","TransitionStart"),transitioncancel:Pl("Transition","TransitionCancel"),transitionend:Pl("Transition","TransitionEnd")},Ub={},$L={};no&&($L=document.createElement("div").style,"AnimationEvent"in window||(delete Vc.animationend.animation,delete Vc.animationiteration.animation,delete Vc.animationstart.animation),"TransitionEvent"in window||delete Vc.transitionend.transition);function zl(h){if(Ub[h])return Ub[h];if(!Vc[h])return h;var p=Vc[h],m;for(m in p)if(p.hasOwnProperty(m)&&m in $L)return Ub[h]=p[m];return h}var KL=zl("animationend"),QL=zl("animationiteration"),JL=zl("animationstart"),$Y=zl("transitionrun"),KY=zl("transitionstart"),QY=zl("transitioncancel"),eR=zl("transitionend"),tR=new Map,Yb="abort auxClick beforeToggle 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(" ");Yb.push("scrollEnd");function Ga(h,p){tR.set(h,p),Il(p,[h])}var rR=new WeakMap;function fa(h,p){if(typeof h=="object"&&h!==null){var m=rR.get(h);return m!==void 0?m:(p={value:h,source:p,stack:yL(p)},rR.set(h,p),p)}return{value:h,source:p,stack:yL(p)}}var ha=[],Gc=0,Wb=0;function hm(){for(var h=Gc,p=Wb=Gc=0;p<h;){var m=ha[p];ha[p++]=null;var _=ha[p];ha[p++]=null;var A=ha[p];ha[p++]=null;var L=ha[p];if(ha[p++]=null,_!==null&&A!==null){var j=_.pending;j===null?A.next=A:(A.next=j.next,j.next=A),_.pending=A}L!==0&&nR(m,A,L)}}function dm(h,p,m,_){ha[Gc++]=h,ha[Gc++]=p,ha[Gc++]=m,ha[Gc++]=_,Wb|=_,h.lanes|=_,h=h.alternate,h!==null&&(h.lanes|=_)}function Xb(h,p,m,_){return dm(h,p,m,_),vm(h)}function Hc(h,p){return dm(h,null,null,p),vm(h)}function nR(h,p,m){h.lanes|=m;var _=h.alternate;_!==null&&(_.lanes|=m);for(var A=!1,L=h.return;L!==null;)L.childLanes|=m,_=L.alternate,_!==null&&(_.childLanes|=m),L.tag===22&&(h=L.stateNode,h===null||h._visibility&1||(A=!0)),h=L,L=L.return;return h.tag===3?(L=h.stateNode,A&&p!==null&&(A=31-Vn(m),h=L.hiddenUpdates,_=h[A],_===null?h[A]=[p]:_.push(p),p.lane=m|536870912),L):null}function vm(h){if(50<Kd)throw Kd=0,J_=null,Error(n(185));for(var p=h.return;p!==null;)h=p,p=h.return;return h.tag===3?h.stateNode:null}var Fc={};function JY(h,p,m,_){this.tag=h,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Hn(h,p,m,_){return new JY(h,p,m,_)}function qb(h){return h=h.prototype,!(!h||!h.isReactComponent)}function ao(h,p){var m=h.alternate;return m===null?(m=Hn(h.tag,p,h.key,h.mode),m.elementType=h.elementType,m.type=h.type,m.stateNode=h.stateNode,m.alternate=h,h.alternate=m):(m.pendingProps=p,m.type=h.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=h.flags&65011712,m.childLanes=h.childLanes,m.lanes=h.lanes,m.child=h.child,m.memoizedProps=h.memoizedProps,m.memoizedState=h.memoizedState,m.updateQueue=h.updateQueue,p=h.dependencies,m.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},m.sibling=h.sibling,m.index=h.index,m.ref=h.ref,m.refCleanup=h.refCleanup,m}function aR(h,p){h.flags&=65011714;var m=h.alternate;return m===null?(h.childLanes=0,h.lanes=p,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=m.childLanes,h.lanes=m.lanes,h.child=m.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=m.memoizedProps,h.memoizedState=m.memoizedState,h.updateQueue=m.updateQueue,h.type=m.type,p=m.dependencies,h.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext}),h}function pm(h,p,m,_,A,L){var j=0;if(_=h,typeof h=="function")qb(h)&&(j=1);else if(typeof h=="string")j=tX(h,m,ue.current)?26:h==="html"||h==="head"||h==="body"?27:5;else e:switch(h){case E:return h=Hn(31,m,p,A),h.elementType=E,h.lanes=L,h;case g:return jl(m.children,A,L,p);case x:j=8,A|=24;break;case y:return h=Hn(12,m,p,A|2),h.elementType=y,h.lanes=L,h;case D:return h=Hn(13,m,p,A),h.elementType=D,h.lanes=L,h;case M:return h=Hn(19,m,p,A),h.elementType=M,h.lanes=L,h;default:if(typeof h=="object"&&h!==null)switch(h.$$typeof){case b:case T:j=10;break e;case w:j=9;break e;case C:j=11;break e;case N:j=14;break e;case R:j=16,_=null;break e}j=29,m=Error(n(130,h===null?"null":typeof h,"")),_=null}return p=Hn(j,m,p,A),p.elementType=h,p.type=_,p.lanes=L,p}function jl(h,p,m,_){return h=Hn(7,h,_,p),h.lanes=m,h}function Zb(h,p,m){return h=Hn(6,h,null,p),h.lanes=m,h}function $b(h,p,m){return p=Hn(4,h.children!==null?h.children:[],h.key,p),p.lanes=m,p.stateNode={containerInfo:h.containerInfo,pendingChildren:null,implementation:h.implementation},p}var Uc=[],Yc=0,gm=null,mm=0,da=[],va=0,Bl=null,io=1,oo="";function Vl(h,p){Uc[Yc++]=mm,Uc[Yc++]=gm,gm=h,mm=p}function iR(h,p,m){da[va++]=io,da[va++]=oo,da[va++]=Bl,Bl=h;var _=io;h=oo;var A=32-Vn(_)-1;_&=~(1<<A),m+=1;var L=32-Vn(p)+A;if(30<L){var j=A-A%5;L=(_&(1<<j)-1).toString(32),_>>=j,A-=j,io=1<<32-Vn(p)+A|m<<A|_,oo=L+h}else io=1<<L|m<<A|_,oo=h}function Kb(h){h.return!==null&&(Vl(h,1),iR(h,1,0))}function Qb(h){for(;h===gm;)gm=Uc[--Yc],Uc[Yc]=null,mm=Uc[--Yc],Uc[Yc]=null;for(;h===Bl;)Bl=da[--va],da[va]=null,oo=da[--va],da[va]=null,io=da[--va],da[va]=null}var pn=null,tr=null,Dt=!1,Gl=null,ci=!1,Jb=Error(n(519));function Hl(h){var p=Error(n(418,""));throw Nd(fa(p,h)),Jb}function oR(h){var p=h.stateNode,m=h.type,_=h.memoizedProps;switch(p[an]=h,p[Cn]=_,m){case"dialog":yt("cancel",p),yt("close",p);break;case"iframe":case"object":case"embed":yt("load",p);break;case"video":case"audio":for(m=0;m<Jd.length;m++)yt(Jd[m],p);break;case"source":yt("error",p);break;case"img":case"image":case"link":yt("error",p),yt("load",p);break;case"details":yt("toggle",p);break;case"input":yt("invalid",p),_L(p,_.value,_.defaultValue,_.checked,_.defaultChecked,_.type,_.name,!0),nm(p);break;case"select":yt("invalid",p);break;case"textarea":yt("invalid",p),wL(p,_.value,_.defaultValue,_.children),nm(p)}m=_.children,typeof m!="string"&&typeof m!="number"&&typeof m!="bigint"||p.textContent===""+m||_.suppressHydrationWarning===!0||wk(p.textContent,m)?(_.popover!=null&&(yt("beforetoggle",p),yt("toggle",p)),_.onScroll!=null&&yt("scroll",p),_.onScrollEnd!=null&&yt("scrollend",p),_.onClick!=null&&(p.onclick=Km),p=!0):p=!1,p||Hl(h)}function sR(h){for(pn=h.return;pn;)switch(pn.tag){case 5:case 13:ci=!1;return;case 27:case 3:ci=!0;return;default:pn=pn.return}}function Md(h){if(h!==pn)return!1;if(!Dt)return sR(h),Dt=!0,!1;var p=h.tag,m;if((m=p!==3&&p!==27)&&((m=p===5)&&(m=h.type,m=!(m!=="form"&&m!=="button")||pS(h.type,h.memoizedProps)),m=!m),m&&tr&&Hl(h),sR(h),p===13){if(h=h.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(n(317));e:{for(h=h.nextSibling,p=0;h;){if(h.nodeType===8)if(m=h.data,m==="/$"){if(p===0){tr=Fa(h.nextSibling);break e}p--}else m!=="$"&&m!=="$!"&&m!=="$?"||p++;h=h.nextSibling}tr=null}}else p===27?(p=tr,Ts(h.type)?(h=xS,xS=null,tr=h):tr=p):tr=pn?Fa(h.stateNode.nextSibling):null;return!0}function Dd(){tr=pn=null,Dt=!1}function lR(){var h=Gl;return h!==null&&(Nn===null?Nn=h:Nn.push.apply(Nn,h),Gl=null),h}function Nd(h){Gl===null?Gl=[h]:Gl.push(h)}var e_=W(null),Fl=null,so=null;function us(h,p,m){te(e_,p._currentValue),p._currentValue=m}function lo(h){h._currentValue=e_.current,$(e_)}function t_(h,p,m){for(;h!==null;){var _=h.alternate;if((h.childLanes&p)!==p?(h.childLanes|=p,_!==null&&(_.childLanes|=p)):_!==null&&(_.childLanes&p)!==p&&(_.childLanes|=p),h===m)break;h=h.return}}function r_(h,p,m,_){var A=h.child;for(A!==null&&(A.return=h);A!==null;){var L=A.dependencies;if(L!==null){var j=A.child;L=L.firstContext;e:for(;L!==null;){var Y=L;L=A;for(var Z=0;Z<p.length;Z++)if(Y.context===p[Z]){L.lanes|=m,Y=L.alternate,Y!==null&&(Y.lanes|=m),t_(L.return,m,h),_||(j=null);break e}L=Y.next}}else if(A.tag===18){if(j=A.return,j===null)throw Error(n(341));j.lanes|=m,L=j.alternate,L!==null&&(L.lanes|=m),t_(j,m,h),j=null}else j=A.child;if(j!==null)j.return=A;else for(j=A;j!==null;){if(j===h){j=null;break}if(A=j.sibling,A!==null){A.return=j.return,j=A;break}j=j.return}A=j}}function Ld(h,p,m,_){h=null;for(var A=p,L=!1;A!==null;){if(!L){if((A.flags&524288)!==0)L=!0;else if((A.flags&262144)!==0)break}if(A.tag===10){var j=A.alternate;if(j===null)throw Error(n(387));if(j=j.memoizedProps,j!==null){var Y=A.type;Gn(A.pendingProps.value,j.value)||(h!==null?h.push(Y):h=[Y])}}else if(A===Xe.current){if(j=A.alternate,j===null)throw Error(n(387));j.memoizedState.memoizedState!==A.memoizedState.memoizedState&&(h!==null?h.push(iv):h=[iv])}A=A.return}h!==null&&r_(p,h,m,_),p.flags|=262144}function ym(h){for(h=h.firstContext;h!==null;){if(!Gn(h.context._currentValue,h.memoizedValue))return!0;h=h.next}return!1}function Ul(h){Fl=h,so=null,h=h.dependencies,h!==null&&(h.firstContext=null)}function on(h){return uR(Fl,h)}function xm(h,p){return Fl===null&&Ul(h),uR(h,p)}function uR(h,p){var m=p._currentValue;if(p={context:p,memoizedValue:m,next:null},so===null){if(h===null)throw Error(n(308));so=p,h.dependencies={lanes:0,firstContext:p},h.flags|=524288}else so=so.next=p;return m}var eW=typeof AbortController<"u"?AbortController:function(){var h=[],p=this.signal={aborted:!1,addEventListener:function(m,_){h.push(_)}};this.abort=function(){p.aborted=!0,h.forEach(function(m){return m()})}},tW=r.unstable_scheduleCallback,rW=r.unstable_NormalPriority,Tr={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function n_(){return{controller:new eW,data:new Map,refCount:0}}function Rd(h){h.refCount--,h.refCount===0&&tW(rW,function(){h.controller.abort()})}var Ed=null,a_=0,Wc=0,Xc=null;function nW(h,p){if(Ed===null){var m=Ed=[];a_=0,Wc=oS(),Xc={status:"pending",value:void 0,then:function(_){m.push(_)}}}return a_++,p.then(cR,cR),p}function cR(){if(--a_===0&&Ed!==null){Xc!==null&&(Xc.status="fulfilled");var h=Ed;Ed=null,Wc=0,Xc=null;for(var p=0;p<h.length;p++)(0,h[p])()}}function aW(h,p){var m=[],_={status:"pending",value:null,reason:null,then:function(A){m.push(A)}};return h.then(function(){_.status="fulfilled",_.value=p;for(var A=0;A<m.length;A++)(0,m[A])(p)},function(A){for(_.status="rejected",_.reason=A,A=0;A<m.length;A++)(0,m[A])(void 0)}),_}var fR=B.S;B.S=function(h,p){typeof p=="object"&&p!==null&&typeof p.then=="function"&&nW(h,p),fR!==null&&fR(h,p)};var Yl=W(null);function i_(){var h=Yl.current;return h!==null?h:Yt.pooledCache}function bm(h,p){p===null?te(Yl,Yl.current):te(Yl,p.pool)}function hR(){var h=i_();return h===null?null:{parent:Tr._currentValue,pool:h}}var kd=Error(n(460)),dR=Error(n(474)),_m=Error(n(542)),o_={then:function(){}};function vR(h){return h=h.status,h==="fulfilled"||h==="rejected"}function Sm(){}function pR(h,p,m){switch(m=h[m],m===void 0?h.push(p):m!==p&&(p.then(Sm,Sm),p=m),p.status){case"fulfilled":return p.value;case"rejected":throw h=p.reason,mR(h),h;default:if(typeof p.status=="string")p.then(Sm,Sm);else{if(h=Yt,h!==null&&100<h.shellSuspendCounter)throw Error(n(482));h=p,h.status="pending",h.then(function(_){if(p.status==="pending"){var A=p;A.status="fulfilled",A.value=_}},function(_){if(p.status==="pending"){var A=p;A.status="rejected",A.reason=_}})}switch(p.status){case"fulfilled":return p.value;case"rejected":throw h=p.reason,mR(h),h}throw Id=p,kd}}var Id=null;function gR(){if(Id===null)throw Error(n(459));var h=Id;return Id=null,h}function mR(h){if(h===kd||h===_m)throw Error(n(483))}var cs=!1;function s_(h){h.updateQueue={baseState:h.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function l_(h,p){h=h.updateQueue,p.updateQueue===h&&(p.updateQueue={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,callbacks:null})}function fs(h){return{lane:h,tag:0,payload:null,callback:null,next:null}}function hs(h,p,m){var _=h.updateQueue;if(_===null)return null;if(_=_.shared,(It&2)!==0){var A=_.pending;return A===null?p.next=p:(p.next=A.next,A.next=p),_.pending=p,p=vm(h),nR(h,null,m),p}return dm(h,_,p,m),vm(h)}function Od(h,p,m){if(p=p.updateQueue,p!==null&&(p=p.shared,(m&4194048)!==0)){var _=p.lanes;_&=h.pendingLanes,m|=_,p.lanes=m,cL(h,m)}}function u_(h,p){var m=h.updateQueue,_=h.alternate;if(_!==null&&(_=_.updateQueue,m===_)){var A=null,L=null;if(m=m.firstBaseUpdate,m!==null){do{var j={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};L===null?A=L=j:L=L.next=j,m=m.next}while(m!==null);L===null?A=L=p:L=L.next=p}else A=L=p;m={baseState:_.baseState,firstBaseUpdate:A,lastBaseUpdate:L,shared:_.shared,callbacks:_.callbacks},h.updateQueue=m;return}h=m.lastBaseUpdate,h===null?m.firstBaseUpdate=p:h.next=p,m.lastBaseUpdate=p}var c_=!1;function Pd(){if(c_){var h=Xc;if(h!==null)throw h}}function zd(h,p,m,_){c_=!1;var A=h.updateQueue;cs=!1;var L=A.firstBaseUpdate,j=A.lastBaseUpdate,Y=A.shared.pending;if(Y!==null){A.shared.pending=null;var Z=Y,ae=Z.next;Z.next=null,j===null?L=ae:j.next=ae,j=Z;var he=h.alternate;he!==null&&(he=he.updateQueue,Y=he.lastBaseUpdate,Y!==j&&(Y===null?he.firstBaseUpdate=ae:Y.next=ae,he.lastBaseUpdate=Z))}if(L!==null){var ve=A.baseState;j=0,he=ae=Z=null,Y=L;do{var se=Y.lane&-536870913,le=se!==Y.lane;if(le?(St&se)===se:(_&se)===se){se!==0&&se===Wc&&(c_=!0),he!==null&&(he=he.next={lane:0,tag:Y.tag,payload:Y.payload,callback:null,next:null});e:{var rt=h,Ze=Y;se=p;var Gt=m;switch(Ze.tag){case 1:if(rt=Ze.payload,typeof rt=="function"){ve=rt.call(Gt,ve,se);break e}ve=rt;break e;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=Ze.payload,se=typeof rt=="function"?rt.call(Gt,ve,se):rt,se==null)break e;ve=c({},ve,se);break e;case 2:cs=!0}}se=Y.callback,se!==null&&(h.flags|=64,le&&(h.flags|=8192),le=A.callbacks,le===null?A.callbacks=[se]:le.push(se))}else le={lane:se,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null},he===null?(ae=he=le,Z=ve):he=he.next=le,j|=se;if(Y=Y.next,Y===null){if(Y=A.shared.pending,Y===null)break;le=Y,Y=le.next,le.next=null,A.lastBaseUpdate=le,A.shared.pending=null}}while(!0);he===null&&(Z=ve),A.baseState=Z,A.firstBaseUpdate=ae,A.lastBaseUpdate=he,L===null&&(A.shared.lanes=0),bs|=j,h.lanes=j,h.memoizedState=ve}}function yR(h,p){if(typeof h!="function")throw Error(n(191,h));h.call(p)}function xR(h,p){var m=h.callbacks;if(m!==null)for(h.callbacks=null,h=0;h<m.length;h++)yR(m[h],p)}var qc=W(null),wm=W(0);function bR(h,p){h=go,te(wm,h),te(qc,p),go=h|p.baseLanes}function f_(){te(wm,go),te(qc,qc.current)}function h_(){go=wm.current,$(qc),$(wm)}var ds=0,ht=null,Bt=null,gr=null,Tm=!1,Zc=!1,Wl=!1,Cm=0,jd=0,$c=null,iW=0;function cr(){throw Error(n(321))}function d_(h,p){if(p===null)return!1;for(var m=0;m<p.length&&m<h.length;m++)if(!Gn(h[m],p[m]))return!1;return!0}function v_(h,p,m,_,A,L){return ds=L,ht=p,p.memoizedState=null,p.updateQueue=null,p.lanes=0,B.H=h===null||h.memoizedState===null?nE:aE,Wl=!1,L=m(_,A),Wl=!1,Zc&&(L=SR(p,m,_,A)),_R(h),L}function _R(h){B.H=Rm;var p=Bt!==null&&Bt.next!==null;if(ds=0,gr=Bt=ht=null,Tm=!1,jd=0,$c=null,p)throw Error(n(300));h===null||Or||(h=h.dependencies,h!==null&&ym(h)&&(Or=!0))}function SR(h,p,m,_){ht=h;var A=0;do{if(Zc&&($c=null),jd=0,Zc=!1,25<=A)throw Error(n(301));if(A+=1,gr=Bt=null,h.updateQueue!=null){var L=h.updateQueue;L.lastEffect=null,L.events=null,L.stores=null,L.memoCache!=null&&(L.memoCache.index=0)}B.H=hW,L=p(m,_)}while(Zc);return L}function oW(){var h=B.H,p=h.useState()[0];return p=typeof p.then=="function"?Bd(p):p,h=h.useState()[0],(Bt!==null?Bt.memoizedState:null)!==h&&(ht.flags|=1024),p}function p_(){var h=Cm!==0;return Cm=0,h}function g_(h,p,m){p.updateQueue=h.updateQueue,p.flags&=-2053,h.lanes&=~m}function m_(h){if(Tm){for(h=h.memoizedState;h!==null;){var p=h.queue;p!==null&&(p.pending=null),h=h.next}Tm=!1}ds=0,gr=Bt=ht=null,Zc=!1,jd=Cm=0,$c=null}function Mn(){var h={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gr===null?ht.memoizedState=gr=h:gr=gr.next=h,gr}function mr(){if(Bt===null){var h=ht.alternate;h=h!==null?h.memoizedState:null}else h=Bt.next;var p=gr===null?ht.memoizedState:gr.next;if(p!==null)gr=p,Bt=h;else{if(h===null)throw ht.alternate===null?Error(n(467)):Error(n(310));Bt=h,h={memoizedState:Bt.memoizedState,baseState:Bt.baseState,baseQueue:Bt.baseQueue,queue:Bt.queue,next:null},gr===null?ht.memoizedState=gr=h:gr=gr.next=h}return gr}function y_(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bd(h){var p=jd;return jd+=1,$c===null&&($c=[]),h=pR($c,h,p),p=ht,(gr===null?p.memoizedState:gr.next)===null&&(p=p.alternate,B.H=p===null||p.memoizedState===null?nE:aE),h}function Am(h){if(h!==null&&typeof h=="object"){if(typeof h.then=="function")return Bd(h);if(h.$$typeof===T)return on(h)}throw Error(n(438,String(h)))}function x_(h){var p=null,m=ht.updateQueue;if(m!==null&&(p=m.memoCache),p==null){var _=ht.alternate;_!==null&&(_=_.updateQueue,_!==null&&(_=_.memoCache,_!=null&&(p={data:_.data.map(function(A){return A.slice()}),index:0})))}if(p==null&&(p={data:[],index:0}),m===null&&(m=y_(),ht.updateQueue=m),m.memoCache=p,m=p.data[p.index],m===void 0)for(m=p.data[p.index]=Array(h),_=0;_<h;_++)m[_]=k;return p.index++,m}function uo(h,p){return typeof p=="function"?p(h):p}function Mm(h){var p=mr();return b_(p,Bt,h)}function b_(h,p,m){var _=h.queue;if(_===null)throw Error(n(311));_.lastRenderedReducer=m;var A=h.baseQueue,L=_.pending;if(L!==null){if(A!==null){var j=A.next;A.next=L.next,L.next=j}p.baseQueue=A=L,_.pending=null}if(L=h.baseState,A===null)h.memoizedState=L;else{p=A.next;var Y=j=null,Z=null,ae=p,he=!1;do{var ve=ae.lane&-536870913;if(ve!==ae.lane?(St&ve)===ve:(ds&ve)===ve){var se=ae.revertLane;if(se===0)Z!==null&&(Z=Z.next={lane:0,revertLane:0,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),ve===Wc&&(he=!0);else if((ds&se)===se){ae=ae.next,se===Wc&&(he=!0);continue}else ve={lane:0,revertLane:ae.revertLane,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},Z===null?(Y=Z=ve,j=L):Z=Z.next=ve,ht.lanes|=se,bs|=se;ve=ae.action,Wl&&m(L,ve),L=ae.hasEagerState?ae.eagerState:m(L,ve)}else se={lane:ve,revertLane:ae.revertLane,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},Z===null?(Y=Z=se,j=L):Z=Z.next=se,ht.lanes|=ve,bs|=ve;ae=ae.next}while(ae!==null&&ae!==p);if(Z===null?j=L:Z.next=Y,!Gn(L,h.memoizedState)&&(Or=!0,he&&(m=Xc,m!==null)))throw m;h.memoizedState=L,h.baseState=j,h.baseQueue=Z,_.lastRenderedState=L}return A===null&&(_.lanes=0),[h.memoizedState,_.dispatch]}function __(h){var p=mr(),m=p.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=h;var _=m.dispatch,A=m.pending,L=p.memoizedState;if(A!==null){m.pending=null;var j=A=A.next;do L=h(L,j.action),j=j.next;while(j!==A);Gn(L,p.memoizedState)||(Or=!0),p.memoizedState=L,p.baseQueue===null&&(p.baseState=L),m.lastRenderedState=L}return[L,_]}function wR(h,p,m){var _=ht,A=mr(),L=Dt;if(L){if(m===void 0)throw Error(n(407));m=m()}else m=p();var j=!Gn((Bt||A).memoizedState,m);j&&(A.memoizedState=m,Or=!0),A=A.queue;var Y=AR.bind(null,_,A,h);if(Vd(2048,8,Y,[h]),A.getSnapshot!==p||j||gr!==null&&gr.memoizedState.tag&1){if(_.flags|=2048,Kc(9,Dm(),CR.bind(null,_,A,m,p),null),Yt===null)throw Error(n(349));L||(ds&124)!==0||TR(_,p,m)}return m}function TR(h,p,m){h.flags|=16384,h={getSnapshot:p,value:m},p=ht.updateQueue,p===null?(p=y_(),ht.updateQueue=p,p.stores=[h]):(m=p.stores,m===null?p.stores=[h]:m.push(h))}function CR(h,p,m,_){p.value=m,p.getSnapshot=_,MR(p)&&DR(h)}function AR(h,p,m){return m(function(){MR(p)&&DR(h)})}function MR(h){var p=h.getSnapshot;h=h.value;try{var m=p();return!Gn(h,m)}catch{return!0}}function DR(h){var p=Hc(h,2);p!==null&&Xn(p,h,2)}function S_(h){var p=Mn();if(typeof h=="function"){var m=h;if(h=m(),Wl){os(!0);try{m()}finally{os(!1)}}}return p.memoizedState=p.baseState=h,p.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uo,lastRenderedState:h},p}function NR(h,p,m,_){return h.baseState=m,b_(h,Bt,typeof _=="function"?_:uo)}function sW(h,p,m,_,A){if(Lm(h))throw Error(n(485));if(h=p.action,h!==null){var L={payload:A,action:h,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(j){L.listeners.push(j)}};B.T!==null?m(!0):L.isTransition=!1,_(L),m=p.pending,m===null?(L.next=p.pending=L,LR(p,L)):(L.next=m.next,p.pending=m.next=L)}}function LR(h,p){var m=p.action,_=p.payload,A=h.state;if(p.isTransition){var L=B.T,j={};B.T=j;try{var Y=m(A,_),Z=B.S;Z!==null&&Z(j,Y),RR(h,p,Y)}catch(ae){w_(h,p,ae)}finally{B.T=L}}else try{L=m(A,_),RR(h,p,L)}catch(ae){w_(h,p,ae)}}function RR(h,p,m){m!==null&&typeof m=="object"&&typeof m.then=="function"?m.then(function(_){ER(h,p,_)},function(_){return w_(h,p,_)}):ER(h,p,m)}function ER(h,p,m){p.status="fulfilled",p.value=m,kR(p),h.state=m,p=h.pending,p!==null&&(m=p.next,m===p?h.pending=null:(m=m.next,p.next=m,LR(h,m)))}function w_(h,p,m){var _=h.pending;if(h.pending=null,_!==null){_=_.next;do p.status="rejected",p.reason=m,kR(p),p=p.next;while(p!==_)}h.action=null}function kR(h){h=h.listeners;for(var p=0;p<h.length;p++)(0,h[p])()}function IR(h,p){return p}function OR(h,p){if(Dt){var m=Yt.formState;if(m!==null){e:{var _=ht;if(Dt){if(tr){t:{for(var A=tr,L=ci;A.nodeType!==8;){if(!L){A=null;break t}if(A=Fa(A.nextSibling),A===null){A=null;break t}}L=A.data,A=L==="F!"||L==="F"?A:null}if(A){tr=Fa(A.nextSibling),_=A.data==="F!";break e}}Hl(_)}_=!1}_&&(p=m[0])}}return m=Mn(),m.memoizedState=m.baseState=p,_={pending:null,lanes:0,dispatch:null,lastRenderedReducer:IR,lastRenderedState:p},m.queue=_,m=eE.bind(null,ht,_),_.dispatch=m,_=S_(!1),L=D_.bind(null,ht,!1,_.queue),_=Mn(),A={state:p,dispatch:null,action:h,pending:null},_.queue=A,m=sW.bind(null,ht,A,L,m),A.dispatch=m,_.memoizedState=h,[p,m,!1]}function PR(h){var p=mr();return zR(p,Bt,h)}function zR(h,p,m){if(p=b_(h,p,IR)[0],h=Mm(uo)[0],typeof p=="object"&&p!==null&&typeof p.then=="function")try{var _=Bd(p)}catch(j){throw j===kd?_m:j}else _=p;p=mr();var A=p.queue,L=A.dispatch;return m!==p.memoizedState&&(ht.flags|=2048,Kc(9,Dm(),lW.bind(null,A,m),null)),[_,L,h]}function lW(h,p){h.action=p}function jR(h){var p=mr(),m=Bt;if(m!==null)return zR(p,m,h);mr(),p=p.memoizedState,m=mr();var _=m.queue.dispatch;return m.memoizedState=h,[p,_,!1]}function Kc(h,p,m,_){return h={tag:h,create:m,deps:_,inst:p,next:null},p=ht.updateQueue,p===null&&(p=y_(),ht.updateQueue=p),m=p.lastEffect,m===null?p.lastEffect=h.next=h:(_=m.next,m.next=h,h.next=_,p.lastEffect=h),h}function Dm(){return{destroy:void 0,resource:void 0}}function BR(){return mr().memoizedState}function Nm(h,p,m,_){var A=Mn();_=_===void 0?null:_,ht.flags|=h,A.memoizedState=Kc(1|p,Dm(),m,_)}function Vd(h,p,m,_){var A=mr();_=_===void 0?null:_;var L=A.memoizedState.inst;Bt!==null&&_!==null&&d_(_,Bt.memoizedState.deps)?A.memoizedState=Kc(p,L,m,_):(ht.flags|=h,A.memoizedState=Kc(1|p,L,m,_))}function VR(h,p){Nm(8390656,8,h,p)}function GR(h,p){Vd(2048,8,h,p)}function HR(h,p){return Vd(4,2,h,p)}function FR(h,p){return Vd(4,4,h,p)}function UR(h,p){if(typeof p=="function"){h=h();var m=p(h);return function(){typeof m=="function"?m():p(null)}}if(p!=null)return h=h(),p.current=h,function(){p.current=null}}function YR(h,p,m){m=m!=null?m.concat([h]):null,Vd(4,4,UR.bind(null,p,h),m)}function T_(){}function WR(h,p){var m=mr();p=p===void 0?null:p;var _=m.memoizedState;return p!==null&&d_(p,_[1])?_[0]:(m.memoizedState=[h,p],h)}function XR(h,p){var m=mr();p=p===void 0?null:p;var _=m.memoizedState;if(p!==null&&d_(p,_[1]))return _[0];if(_=h(),Wl){os(!0);try{h()}finally{os(!1)}}return m.memoizedState=[_,p],_}function C_(h,p,m){return m===void 0||(ds&1073741824)!==0?h.memoizedState=p:(h.memoizedState=m,h=$E(),ht.lanes|=h,bs|=h,m)}function qR(h,p,m,_){return Gn(m,p)?m:qc.current!==null?(h=C_(h,m,_),Gn(h,p)||(Or=!0),h):(ds&42)===0?(Or=!0,h.memoizedState=m):(h=$E(),ht.lanes|=h,bs|=h,p)}function ZR(h,p,m,_,A){var L=F.p;F.p=L!==0&&8>L?L:8;var j=B.T,Y={};B.T=Y,D_(h,!1,p,m);try{var Z=A(),ae=B.S;if(ae!==null&&ae(Y,Z),Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var he=aW(Z,_);Gd(h,p,he,Wn(h))}else Gd(h,p,_,Wn(h))}catch(ve){Gd(h,p,{then:function(){},status:"rejected",reason:ve},Wn())}finally{F.p=L,B.T=j}}function uW(){}function A_(h,p,m,_){if(h.tag!==5)throw Error(n(476));var A=$R(h).queue;ZR(h,A,p,H,m===null?uW:function(){return KR(h),m(_)})}function $R(h){var p=h.memoizedState;if(p!==null)return p;p={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:uo,lastRenderedState:H},next:null};var m={};return p.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:uo,lastRenderedState:m},next:null},h.memoizedState=p,h=h.alternate,h!==null&&(h.memoizedState=p),p}function KR(h){var p=$R(h).next.queue;Gd(h,p,{},Wn())}function M_(){return on(iv)}function QR(){return mr().memoizedState}function JR(){return mr().memoizedState}function cW(h){for(var p=h.return;p!==null;){switch(p.tag){case 24:case 3:var m=Wn();h=fs(m);var _=hs(p,h,m);_!==null&&(Xn(_,p,m),Od(_,p,m)),p={cache:n_()},h.payload=p;return}p=p.return}}function fW(h,p,m){var _=Wn();m={lane:_,revertLane:0,action:m,hasEagerState:!1,eagerState:null,next:null},Lm(h)?tE(p,m):(m=Xb(h,p,m,_),m!==null&&(Xn(m,h,_),rE(m,p,_)))}function eE(h,p,m){var _=Wn();Gd(h,p,m,_)}function Gd(h,p,m,_){var A={lane:_,revertLane:0,action:m,hasEagerState:!1,eagerState:null,next:null};if(Lm(h))tE(p,A);else{var L=h.alternate;if(h.lanes===0&&(L===null||L.lanes===0)&&(L=p.lastRenderedReducer,L!==null))try{var j=p.lastRenderedState,Y=L(j,m);if(A.hasEagerState=!0,A.eagerState=Y,Gn(Y,j))return dm(h,p,A,0),Yt===null&&hm(),!1}catch{}finally{}if(m=Xb(h,p,A,_),m!==null)return Xn(m,h,_),rE(m,p,_),!0}return!1}function D_(h,p,m,_){if(_={lane:2,revertLane:oS(),action:_,hasEagerState:!1,eagerState:null,next:null},Lm(h)){if(p)throw Error(n(479))}else p=Xb(h,m,_,2),p!==null&&Xn(p,h,2)}function Lm(h){var p=h.alternate;return h===ht||p!==null&&p===ht}function tE(h,p){Zc=Tm=!0;var m=h.pending;m===null?p.next=p:(p.next=m.next,m.next=p),h.pending=p}function rE(h,p,m){if((m&4194048)!==0){var _=p.lanes;_&=h.pendingLanes,m|=_,p.lanes=m,cL(h,m)}}var Rm={readContext:on,use:Am,useCallback:cr,useContext:cr,useEffect:cr,useImperativeHandle:cr,useLayoutEffect:cr,useInsertionEffect:cr,useMemo:cr,useReducer:cr,useRef:cr,useState:cr,useDebugValue:cr,useDeferredValue:cr,useTransition:cr,useSyncExternalStore:cr,useId:cr,useHostTransitionStatus:cr,useFormState:cr,useActionState:cr,useOptimistic:cr,useMemoCache:cr,useCacheRefresh:cr},nE={readContext:on,use:Am,useCallback:function(h,p){return Mn().memoizedState=[h,p===void 0?null:p],h},useContext:on,useEffect:VR,useImperativeHandle:function(h,p,m){m=m!=null?m.concat([h]):null,Nm(4194308,4,UR.bind(null,p,h),m)},useLayoutEffect:function(h,p){return Nm(4194308,4,h,p)},useInsertionEffect:function(h,p){Nm(4,2,h,p)},useMemo:function(h,p){var m=Mn();p=p===void 0?null:p;var _=h();if(Wl){os(!0);try{h()}finally{os(!1)}}return m.memoizedState=[_,p],_},useReducer:function(h,p,m){var _=Mn();if(m!==void 0){var A=m(p);if(Wl){os(!0);try{m(p)}finally{os(!1)}}}else A=p;return _.memoizedState=_.baseState=A,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:A},_.queue=h,h=h.dispatch=fW.bind(null,ht,h),[_.memoizedState,h]},useRef:function(h){var p=Mn();return h={current:h},p.memoizedState=h},useState:function(h){h=S_(h);var p=h.queue,m=eE.bind(null,ht,p);return p.dispatch=m,[h.memoizedState,m]},useDebugValue:T_,useDeferredValue:function(h,p){var m=Mn();return C_(m,h,p)},useTransition:function(){var h=S_(!1);return h=ZR.bind(null,ht,h.queue,!0,!1),Mn().memoizedState=h,[!1,h]},useSyncExternalStore:function(h,p,m){var _=ht,A=Mn();if(Dt){if(m===void 0)throw Error(n(407));m=m()}else{if(m=p(),Yt===null)throw Error(n(349));(St&124)!==0||TR(_,p,m)}A.memoizedState=m;var L={value:m,getSnapshot:p};return A.queue=L,VR(AR.bind(null,_,L,h),[h]),_.flags|=2048,Kc(9,Dm(),CR.bind(null,_,L,m,p),null),m},useId:function(){var h=Mn(),p=Yt.identifierPrefix;if(Dt){var m=oo,_=io;m=(_&~(1<<32-Vn(_)-1)).toString(32)+m,p="«"+p+"R"+m,m=Cm++,0<m&&(p+="H"+m.toString(32)),p+="»"}else m=iW++,p="«"+p+"r"+m.toString(32)+"»";return h.memoizedState=p},useHostTransitionStatus:M_,useFormState:OR,useActionState:OR,useOptimistic:function(h){var p=Mn();p.memoizedState=p.baseState=h;var m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return p.queue=m,p=D_.bind(null,ht,!0,m),m.dispatch=p,[h,p]},useMemoCache:x_,useCacheRefresh:function(){return Mn().memoizedState=cW.bind(null,ht)}},aE={readContext:on,use:Am,useCallback:WR,useContext:on,useEffect:GR,useImperativeHandle:YR,useInsertionEffect:HR,useLayoutEffect:FR,useMemo:XR,useReducer:Mm,useRef:BR,useState:function(){return Mm(uo)},useDebugValue:T_,useDeferredValue:function(h,p){var m=mr();return qR(m,Bt.memoizedState,h,p)},useTransition:function(){var h=Mm(uo)[0],p=mr().memoizedState;return[typeof h=="boolean"?h:Bd(h),p]},useSyncExternalStore:wR,useId:QR,useHostTransitionStatus:M_,useFormState:PR,useActionState:PR,useOptimistic:function(h,p){var m=mr();return NR(m,Bt,h,p)},useMemoCache:x_,useCacheRefresh:JR},hW={readContext:on,use:Am,useCallback:WR,useContext:on,useEffect:GR,useImperativeHandle:YR,useInsertionEffect:HR,useLayoutEffect:FR,useMemo:XR,useReducer:__,useRef:BR,useState:function(){return __(uo)},useDebugValue:T_,useDeferredValue:function(h,p){var m=mr();return Bt===null?C_(m,h,p):qR(m,Bt.memoizedState,h,p)},useTransition:function(){var h=__(uo)[0],p=mr().memoizedState;return[typeof h=="boolean"?h:Bd(h),p]},useSyncExternalStore:wR,useId:QR,useHostTransitionStatus:M_,useFormState:jR,useActionState:jR,useOptimistic:function(h,p){var m=mr();return Bt!==null?NR(m,Bt,h,p):(m.baseState=h,[h,m.queue.dispatch])},useMemoCache:x_,useCacheRefresh:JR},Qc=null,Hd=0;function Em(h){var p=Hd;return Hd+=1,Qc===null&&(Qc=[]),pR(Qc,h,p)}function Fd(h,p){p=p.props.ref,h.ref=p!==void 0?p:null}function km(h,p){throw p.$$typeof===f?Error(n(525)):(h=Object.prototype.toString.call(p),Error(n(31,h==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":h)))}function iE(h){var p=h._init;return p(h._payload)}function oE(h){function p(re,Q){if(h){var ne=re.deletions;ne===null?(re.deletions=[Q],re.flags|=16):ne.push(Q)}}function m(re,Q){if(!h)return null;for(;Q!==null;)p(re,Q),Q=Q.sibling;return null}function _(re){for(var Q=new Map;re!==null;)re.key!==null?Q.set(re.key,re):Q.set(re.index,re),re=re.sibling;return Q}function A(re,Q){return re=ao(re,Q),re.index=0,re.sibling=null,re}function L(re,Q,ne){return re.index=ne,h?(ne=re.alternate,ne!==null?(ne=ne.index,ne<Q?(re.flags|=67108866,Q):ne):(re.flags|=67108866,Q)):(re.flags|=1048576,Q)}function j(re){return h&&re.alternate===null&&(re.flags|=67108866),re}function Y(re,Q,ne,de){return Q===null||Q.tag!==6?(Q=Zb(ne,re.mode,de),Q.return=re,Q):(Q=A(Q,ne),Q.return=re,Q)}function Z(re,Q,ne,de){var Be=ne.type;return Be===g?he(re,Q,ne.props.children,de,ne.key):Q!==null&&(Q.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===R&&iE(Be)===Q.type)?(Q=A(Q,ne.props),Fd(Q,ne),Q.return=re,Q):(Q=pm(ne.type,ne.key,ne.props,null,re.mode,de),Fd(Q,ne),Q.return=re,Q)}function ae(re,Q,ne,de){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==ne.containerInfo||Q.stateNode.implementation!==ne.implementation?(Q=$b(ne,re.mode,de),Q.return=re,Q):(Q=A(Q,ne.children||[]),Q.return=re,Q)}function he(re,Q,ne,de,Be){return Q===null||Q.tag!==7?(Q=jl(ne,re.mode,de,Be),Q.return=re,Q):(Q=A(Q,ne),Q.return=re,Q)}function ve(re,Q,ne){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Zb(""+Q,re.mode,ne),Q.return=re,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case d:return ne=pm(Q.type,Q.key,Q.props,null,re.mode,ne),Fd(ne,Q),ne.return=re,ne;case v:return Q=$b(Q,re.mode,ne),Q.return=re,Q;case R:var de=Q._init;return Q=de(Q._payload),ve(re,Q,ne)}if(U(Q)||z(Q))return Q=jl(Q,re.mode,ne,null),Q.return=re,Q;if(typeof Q.then=="function")return ve(re,Em(Q),ne);if(Q.$$typeof===T)return ve(re,xm(re,Q),ne);km(re,Q)}return null}function se(re,Q,ne,de){var Be=Q!==null?Q.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return Be!==null?null:Y(re,Q,""+ne,de);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case d:return ne.key===Be?Z(re,Q,ne,de):null;case v:return ne.key===Be?ae(re,Q,ne,de):null;case R:return Be=ne._init,ne=Be(ne._payload),se(re,Q,ne,de)}if(U(ne)||z(ne))return Be!==null?null:he(re,Q,ne,de,null);if(typeof ne.then=="function")return se(re,Q,Em(ne),de);if(ne.$$typeof===T)return se(re,Q,xm(re,ne),de);km(re,ne)}return null}function le(re,Q,ne,de,Be){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return re=re.get(ne)||null,Y(Q,re,""+de,Be);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case d:return re=re.get(de.key===null?ne:de.key)||null,Z(Q,re,de,Be);case v:return re=re.get(de.key===null?ne:de.key)||null,ae(Q,re,de,Be);case R:var vt=de._init;return de=vt(de._payload),le(re,Q,ne,de,Be)}if(U(de)||z(de))return re=re.get(ne)||null,he(Q,re,de,Be,null);if(typeof de.then=="function")return le(re,Q,ne,Em(de),Be);if(de.$$typeof===T)return le(re,Q,ne,xm(Q,de),Be);km(Q,de)}return null}function rt(re,Q,ne,de){for(var Be=null,vt=null,Ue=Q,Ke=Q=0,zr=null;Ue!==null&&Ke<ne.length;Ke++){Ue.index>Ke?(zr=Ue,Ue=null):zr=Ue.sibling;var At=se(re,Ue,ne[Ke],de);if(At===null){Ue===null&&(Ue=zr);break}h&&Ue&&At.alternate===null&&p(re,Ue),Q=L(At,Q,Ke),vt===null?Be=At:vt.sibling=At,vt=At,Ue=zr}if(Ke===ne.length)return m(re,Ue),Dt&&Vl(re,Ke),Be;if(Ue===null){for(;Ke<ne.length;Ke++)Ue=ve(re,ne[Ke],de),Ue!==null&&(Q=L(Ue,Q,Ke),vt===null?Be=Ue:vt.sibling=Ue,vt=Ue);return Dt&&Vl(re,Ke),Be}for(Ue=_(Ue);Ke<ne.length;Ke++)zr=le(Ue,re,Ke,ne[Ke],de),zr!==null&&(h&&zr.alternate!==null&&Ue.delete(zr.key===null?Ke:zr.key),Q=L(zr,Q,Ke),vt===null?Be=zr:vt.sibling=zr,vt=zr);return h&&Ue.forEach(function(Ns){return p(re,Ns)}),Dt&&Vl(re,Ke),Be}function Ze(re,Q,ne,de){if(ne==null)throw Error(n(151));for(var Be=null,vt=null,Ue=Q,Ke=Q=0,zr=null,At=ne.next();Ue!==null&&!At.done;Ke++,At=ne.next()){Ue.index>Ke?(zr=Ue,Ue=null):zr=Ue.sibling;var Ns=se(re,Ue,At.value,de);if(Ns===null){Ue===null&&(Ue=zr);break}h&&Ue&&Ns.alternate===null&&p(re,Ue),Q=L(Ns,Q,Ke),vt===null?Be=Ns:vt.sibling=Ns,vt=Ns,Ue=zr}if(At.done)return m(re,Ue),Dt&&Vl(re,Ke),Be;if(Ue===null){for(;!At.done;Ke++,At=ne.next())At=ve(re,At.value,de),At!==null&&(Q=L(At,Q,Ke),vt===null?Be=At:vt.sibling=At,vt=At);return Dt&&Vl(re,Ke),Be}for(Ue=_(Ue);!At.done;Ke++,At=ne.next())At=le(Ue,re,Ke,At.value,de),At!==null&&(h&&At.alternate!==null&&Ue.delete(At.key===null?Ke:At.key),Q=L(At,Q,Ke),vt===null?Be=At:vt.sibling=At,vt=At);return h&&Ue.forEach(function(dX){return p(re,dX)}),Dt&&Vl(re,Ke),Be}function Gt(re,Q,ne,de){if(typeof ne=="object"&&ne!==null&&ne.type===g&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case d:e:{for(var Be=ne.key;Q!==null;){if(Q.key===Be){if(Be=ne.type,Be===g){if(Q.tag===7){m(re,Q.sibling),de=A(Q,ne.props.children),de.return=re,re=de;break e}}else if(Q.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===R&&iE(Be)===Q.type){m(re,Q.sibling),de=A(Q,ne.props),Fd(de,ne),de.return=re,re=de;break e}m(re,Q);break}else p(re,Q);Q=Q.sibling}ne.type===g?(de=jl(ne.props.children,re.mode,de,ne.key),de.return=re,re=de):(de=pm(ne.type,ne.key,ne.props,null,re.mode,de),Fd(de,ne),de.return=re,re=de)}return j(re);case v:e:{for(Be=ne.key;Q!==null;){if(Q.key===Be)if(Q.tag===4&&Q.stateNode.containerInfo===ne.containerInfo&&Q.stateNode.implementation===ne.implementation){m(re,Q.sibling),de=A(Q,ne.children||[]),de.return=re,re=de;break e}else{m(re,Q);break}else p(re,Q);Q=Q.sibling}de=$b(ne,re.mode,de),de.return=re,re=de}return j(re);case R:return Be=ne._init,ne=Be(ne._payload),Gt(re,Q,ne,de)}if(U(ne))return rt(re,Q,ne,de);if(z(ne)){if(Be=z(ne),typeof Be!="function")throw Error(n(150));return ne=Be.call(ne),Ze(re,Q,ne,de)}if(typeof ne.then=="function")return Gt(re,Q,Em(ne),de);if(ne.$$typeof===T)return Gt(re,Q,xm(re,ne),de);km(re,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint"?(ne=""+ne,Q!==null&&Q.tag===6?(m(re,Q.sibling),de=A(Q,ne),de.return=re,re=de):(m(re,Q),de=Zb(ne,re.mode,de),de.return=re,re=de),j(re)):m(re,Q)}return function(re,Q,ne,de){try{Hd=0;var Be=Gt(re,Q,ne,de);return Qc=null,Be}catch(Ue){if(Ue===kd||Ue===_m)throw Ue;var vt=Hn(29,Ue,null,re.mode);return vt.lanes=de,vt.return=re,vt}finally{}}}var Jc=oE(!0),sE=oE(!1),pa=W(null),fi=null;function vs(h){var p=h.alternate;te(Cr,Cr.current&1),te(pa,h),fi===null&&(p===null||qc.current!==null||p.memoizedState!==null)&&(fi=h)}function lE(h){if(h.tag===22){if(te(Cr,Cr.current),te(pa,h),fi===null){var p=h.alternate;p!==null&&p.memoizedState!==null&&(fi=h)}}else ps()}function ps(){te(Cr,Cr.current),te(pa,pa.current)}function co(h){$(pa),fi===h&&(fi=null),$(Cr)}var Cr=W(0);function Im(h){for(var p=h;p!==null;){if(p.tag===13){var m=p.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||m.data==="$?"||yS(m)))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if((p.flags&128)!==0)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===h)break;for(;p.sibling===null;){if(p.return===null||p.return===h)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}function N_(h,p,m,_){p=h.memoizedState,m=m(_,p),m=m==null?p:c({},p,m),h.memoizedState=m,h.lanes===0&&(h.updateQueue.baseState=m)}var L_={enqueueSetState:function(h,p,m){h=h._reactInternals;var _=Wn(),A=fs(_);A.payload=p,m!=null&&(A.callback=m),p=hs(h,A,_),p!==null&&(Xn(p,h,_),Od(p,h,_))},enqueueReplaceState:function(h,p,m){h=h._reactInternals;var _=Wn(),A=fs(_);A.tag=1,A.payload=p,m!=null&&(A.callback=m),p=hs(h,A,_),p!==null&&(Xn(p,h,_),Od(p,h,_))},enqueueForceUpdate:function(h,p){h=h._reactInternals;var m=Wn(),_=fs(m);_.tag=2,p!=null&&(_.callback=p),p=hs(h,_,m),p!==null&&(Xn(p,h,m),Od(p,h,m))}};function uE(h,p,m,_,A,L,j){return h=h.stateNode,typeof h.shouldComponentUpdate=="function"?h.shouldComponentUpdate(_,L,j):p.prototype&&p.prototype.isPureReactComponent?!Cd(m,_)||!Cd(A,L):!0}function cE(h,p,m,_){h=p.state,typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps(m,_),typeof p.UNSAFE_componentWillReceiveProps=="function"&&p.UNSAFE_componentWillReceiveProps(m,_),p.state!==h&&L_.enqueueReplaceState(p,p.state,null)}function Xl(h,p){var m=p;if("ref"in p){m={};for(var _ in p)_!=="ref"&&(m[_]=p[_])}if(h=h.defaultProps){m===p&&(m=c({},m));for(var A in h)m[A]===void 0&&(m[A]=h[A])}return m}var Om=typeof reportError=="function"?reportError:function(h){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var p=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h),error:h});if(!window.dispatchEvent(p))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",h);return}console.error(h)};function fE(h){Om(h)}function hE(h){console.error(h)}function dE(h){Om(h)}function Pm(h,p){try{var m=h.onUncaughtError;m(p.value,{componentStack:p.stack})}catch(_){setTimeout(function(){throw _})}}function vE(h,p,m){try{var _=h.onCaughtError;_(m.value,{componentStack:m.stack,errorBoundary:p.tag===1?p.stateNode:null})}catch(A){setTimeout(function(){throw A})}}function R_(h,p,m){return m=fs(m),m.tag=3,m.payload={element:null},m.callback=function(){Pm(h,p)},m}function pE(h){return h=fs(h),h.tag=3,h}function gE(h,p,m,_){var A=m.type.getDerivedStateFromError;if(typeof A=="function"){var L=_.value;h.payload=function(){return A(L)},h.callback=function(){vE(p,m,_)}}var j=m.stateNode;j!==null&&typeof j.componentDidCatch=="function"&&(h.callback=function(){vE(p,m,_),typeof A!="function"&&(_s===null?_s=new Set([this]):_s.add(this));var Y=_.stack;this.componentDidCatch(_.value,{componentStack:Y!==null?Y:""})})}function dW(h,p,m,_,A){if(m.flags|=32768,_!==null&&typeof _=="object"&&typeof _.then=="function"){if(p=m.alternate,p!==null&&Ld(p,m,A,!0),m=pa.current,m!==null){switch(m.tag){case 13:return fi===null?tS():m.alternate===null&&rr===0&&(rr=3),m.flags&=-257,m.flags|=65536,m.lanes=A,_===o_?m.flags|=16384:(p=m.updateQueue,p===null?m.updateQueue=new Set([_]):p.add(_),nS(h,_,A)),!1;case 22:return m.flags|=65536,_===o_?m.flags|=16384:(p=m.updateQueue,p===null?(p={transitions:null,markerInstances:null,retryQueue:new Set([_])},m.updateQueue=p):(m=p.retryQueue,m===null?p.retryQueue=new Set([_]):m.add(_)),nS(h,_,A)),!1}throw Error(n(435,m.tag))}return nS(h,_,A),tS(),!1}if(Dt)return p=pa.current,p!==null?((p.flags&65536)===0&&(p.flags|=256),p.flags|=65536,p.lanes=A,_!==Jb&&(h=Error(n(422),{cause:_}),Nd(fa(h,m)))):(_!==Jb&&(p=Error(n(423),{cause:_}),Nd(fa(p,m))),h=h.current.alternate,h.flags|=65536,A&=-A,h.lanes|=A,_=fa(_,m),A=R_(h.stateNode,_,A),u_(h,A),rr!==4&&(rr=2)),!1;var L=Error(n(520),{cause:_});if(L=fa(L,m),$d===null?$d=[L]:$d.push(L),rr!==4&&(rr=2),p===null)return!0;_=fa(_,m),m=p;do{switch(m.tag){case 3:return m.flags|=65536,h=A&-A,m.lanes|=h,h=R_(m.stateNode,_,h),u_(m,h),!1;case 1:if(p=m.type,L=m.stateNode,(m.flags&128)===0&&(typeof p.getDerivedStateFromError=="function"||L!==null&&typeof L.componentDidCatch=="function"&&(_s===null||!_s.has(L))))return m.flags|=65536,A&=-A,m.lanes|=A,A=pE(A),gE(A,h,m,_),u_(m,A),!1}m=m.return}while(m!==null);return!1}var mE=Error(n(461)),Or=!1;function Wr(h,p,m,_){p.child=h===null?sE(p,null,m,_):Jc(p,h.child,m,_)}function yE(h,p,m,_,A){m=m.render;var L=p.ref;if("ref"in _){var j={};for(var Y in _)Y!=="ref"&&(j[Y]=_[Y])}else j=_;return Ul(p),_=v_(h,p,m,j,L,A),Y=p_(),h!==null&&!Or?(g_(h,p,A),fo(h,p,A)):(Dt&&Y&&Kb(p),p.flags|=1,Wr(h,p,_,A),p.child)}function xE(h,p,m,_,A){if(h===null){var L=m.type;return typeof L=="function"&&!qb(L)&&L.defaultProps===void 0&&m.compare===null?(p.tag=15,p.type=L,bE(h,p,L,_,A)):(h=pm(m.type,null,_,p,p.mode,A),h.ref=p.ref,h.return=p,p.child=h)}if(L=h.child,!B_(h,A)){var j=L.memoizedProps;if(m=m.compare,m=m!==null?m:Cd,m(j,_)&&h.ref===p.ref)return fo(h,p,A)}return p.flags|=1,h=ao(L,_),h.ref=p.ref,h.return=p,p.child=h}function bE(h,p,m,_,A){if(h!==null){var L=h.memoizedProps;if(Cd(L,_)&&h.ref===p.ref)if(Or=!1,p.pendingProps=_=L,B_(h,A))(h.flags&131072)!==0&&(Or=!0);else return p.lanes=h.lanes,fo(h,p,A)}return E_(h,p,m,_,A)}function _E(h,p,m){var _=p.pendingProps,A=_.children,L=h!==null?h.memoizedState:null;if(_.mode==="hidden"){if((p.flags&128)!==0){if(_=L!==null?L.baseLanes|m:m,h!==null){for(A=p.child=h.child,L=0;A!==null;)L=L|A.lanes|A.childLanes,A=A.sibling;p.childLanes=L&~_}else p.childLanes=0,p.child=null;return SE(h,p,_,m)}if((m&536870912)!==0)p.memoizedState={baseLanes:0,cachePool:null},h!==null&&bm(p,L!==null?L.cachePool:null),L!==null?bR(p,L):f_(),lE(p);else return p.lanes=p.childLanes=536870912,SE(h,p,L!==null?L.baseLanes|m:m,m)}else L!==null?(bm(p,L.cachePool),bR(p,L),ps(),p.memoizedState=null):(h!==null&&bm(p,null),f_(),ps());return Wr(h,p,A,m),p.child}function SE(h,p,m,_){var A=i_();return A=A===null?null:{parent:Tr._currentValue,pool:A},p.memoizedState={baseLanes:m,cachePool:A},h!==null&&bm(p,null),f_(),lE(p),h!==null&&Ld(h,p,_,!0),null}function zm(h,p){var m=p.ref;if(m===null)h!==null&&h.ref!==null&&(p.flags|=4194816);else{if(typeof m!="function"&&typeof m!="object")throw Error(n(284));(h===null||h.ref!==m)&&(p.flags|=4194816)}}function E_(h,p,m,_,A){return Ul(p),m=v_(h,p,m,_,void 0,A),_=p_(),h!==null&&!Or?(g_(h,p,A),fo(h,p,A)):(Dt&&_&&Kb(p),p.flags|=1,Wr(h,p,m,A),p.child)}function wE(h,p,m,_,A,L){return Ul(p),p.updateQueue=null,m=SR(p,_,m,A),_R(h),_=p_(),h!==null&&!Or?(g_(h,p,L),fo(h,p,L)):(Dt&&_&&Kb(p),p.flags|=1,Wr(h,p,m,L),p.child)}function TE(h,p,m,_,A){if(Ul(p),p.stateNode===null){var L=Fc,j=m.contextType;typeof j=="object"&&j!==null&&(L=on(j)),L=new m(_,L),p.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,L.updater=L_,p.stateNode=L,L._reactInternals=p,L=p.stateNode,L.props=_,L.state=p.memoizedState,L.refs={},s_(p),j=m.contextType,L.context=typeof j=="object"&&j!==null?on(j):Fc,L.state=p.memoizedState,j=m.getDerivedStateFromProps,typeof j=="function"&&(N_(p,m,j,_),L.state=p.memoizedState),typeof m.getDerivedStateFromProps=="function"||typeof L.getSnapshotBeforeUpdate=="function"||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.componentWillMount!="function"||(j=L.state,typeof L.componentWillMount=="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount=="function"&&L.UNSAFE_componentWillMount(),j!==L.state&&L_.enqueueReplaceState(L,L.state,null),zd(p,_,L,A),Pd(),L.state=p.memoizedState),typeof L.componentDidMount=="function"&&(p.flags|=4194308),_=!0}else if(h===null){L=p.stateNode;var Y=p.memoizedProps,Z=Xl(m,Y);L.props=Z;var ae=L.context,he=m.contextType;j=Fc,typeof he=="object"&&he!==null&&(j=on(he));var ve=m.getDerivedStateFromProps;he=typeof ve=="function"||typeof L.getSnapshotBeforeUpdate=="function",Y=p.pendingProps!==Y,he||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(Y||ae!==j)&&cE(p,L,_,j),cs=!1;var se=p.memoizedState;L.state=se,zd(p,_,L,A),Pd(),ae=p.memoizedState,Y||se!==ae||cs?(typeof ve=="function"&&(N_(p,m,ve,_),ae=p.memoizedState),(Z=cs||uE(p,m,Z,_,se,ae,j))?(he||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.componentWillMount!="function"||(typeof L.componentWillMount=="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount=="function"&&L.UNSAFE_componentWillMount()),typeof L.componentDidMount=="function"&&(p.flags|=4194308)):(typeof L.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=_,p.memoizedState=ae),L.props=_,L.state=ae,L.context=j,_=Z):(typeof L.componentDidMount=="function"&&(p.flags|=4194308),_=!1)}else{L=p.stateNode,l_(h,p),j=p.memoizedProps,he=Xl(m,j),L.props=he,ve=p.pendingProps,se=L.context,ae=m.contextType,Z=Fc,typeof ae=="object"&&ae!==null&&(Z=on(ae)),Y=m.getDerivedStateFromProps,(ae=typeof Y=="function"||typeof L.getSnapshotBeforeUpdate=="function")||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(j!==ve||se!==Z)&&cE(p,L,_,Z),cs=!1,se=p.memoizedState,L.state=se,zd(p,_,L,A),Pd();var le=p.memoizedState;j!==ve||se!==le||cs||h!==null&&h.dependencies!==null&&ym(h.dependencies)?(typeof Y=="function"&&(N_(p,m,Y,_),le=p.memoizedState),(he=cs||uE(p,m,he,_,se,le,Z)||h!==null&&h.dependencies!==null&&ym(h.dependencies))?(ae||typeof L.UNSAFE_componentWillUpdate!="function"&&typeof L.componentWillUpdate!="function"||(typeof L.componentWillUpdate=="function"&&L.componentWillUpdate(_,le,Z),typeof L.UNSAFE_componentWillUpdate=="function"&&L.UNSAFE_componentWillUpdate(_,le,Z)),typeof L.componentDidUpdate=="function"&&(p.flags|=4),typeof L.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof L.componentDidUpdate!="function"||j===h.memoizedProps&&se===h.memoizedState||(p.flags|=4),typeof L.getSnapshotBeforeUpdate!="function"||j===h.memoizedProps&&se===h.memoizedState||(p.flags|=1024),p.memoizedProps=_,p.memoizedState=le),L.props=_,L.state=le,L.context=Z,_=he):(typeof L.componentDidUpdate!="function"||j===h.memoizedProps&&se===h.memoizedState||(p.flags|=4),typeof L.getSnapshotBeforeUpdate!="function"||j===h.memoizedProps&&se===h.memoizedState||(p.flags|=1024),_=!1)}return L=_,zm(h,p),_=(p.flags&128)!==0,L||_?(L=p.stateNode,m=_&&typeof m.getDerivedStateFromError!="function"?null:L.render(),p.flags|=1,h!==null&&_?(p.child=Jc(p,h.child,null,A),p.child=Jc(p,null,m,A)):Wr(h,p,m,A),p.memoizedState=L.state,h=p.child):h=fo(h,p,A),h}function CE(h,p,m,_){return Dd(),p.flags|=256,Wr(h,p,m,_),p.child}var k_={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function I_(h){return{baseLanes:h,cachePool:hR()}}function O_(h,p,m){return h=h!==null?h.childLanes&~m:0,p&&(h|=ga),h}function AE(h,p,m){var _=p.pendingProps,A=!1,L=(p.flags&128)!==0,j;if((j=L)||(j=h!==null&&h.memoizedState===null?!1:(Cr.current&2)!==0),j&&(A=!0,p.flags&=-129),j=(p.flags&32)!==0,p.flags&=-33,h===null){if(Dt){if(A?vs(p):ps(),Dt){var Y=tr,Z;if(Z=Y){e:{for(Z=Y,Y=ci;Z.nodeType!==8;){if(!Y){Y=null;break e}if(Z=Fa(Z.nextSibling),Z===null){Y=null;break e}}Y=Z}Y!==null?(p.memoizedState={dehydrated:Y,treeContext:Bl!==null?{id:io,overflow:oo}:null,retryLane:536870912,hydrationErrors:null},Z=Hn(18,null,null,0),Z.stateNode=Y,Z.return=p,p.child=Z,pn=p,tr=null,Z=!0):Z=!1}Z||Hl(p)}if(Y=p.memoizedState,Y!==null&&(Y=Y.dehydrated,Y!==null))return yS(Y)?p.lanes=32:p.lanes=536870912,null;co(p)}return Y=_.children,_=_.fallback,A?(ps(),A=p.mode,Y=jm({mode:"hidden",children:Y},A),_=jl(_,A,m,null),Y.return=p,_.return=p,Y.sibling=_,p.child=Y,A=p.child,A.memoizedState=I_(m),A.childLanes=O_(h,j,m),p.memoizedState=k_,_):(vs(p),P_(p,Y))}if(Z=h.memoizedState,Z!==null&&(Y=Z.dehydrated,Y!==null)){if(L)p.flags&256?(vs(p),p.flags&=-257,p=z_(h,p,m)):p.memoizedState!==null?(ps(),p.child=h.child,p.flags|=128,p=null):(ps(),A=_.fallback,Y=p.mode,_=jm({mode:"visible",children:_.children},Y),A=jl(A,Y,m,null),A.flags|=2,_.return=p,A.return=p,_.sibling=A,p.child=_,Jc(p,h.child,null,m),_=p.child,_.memoizedState=I_(m),_.childLanes=O_(h,j,m),p.memoizedState=k_,p=A);else if(vs(p),yS(Y)){if(j=Y.nextSibling&&Y.nextSibling.dataset,j)var ae=j.dgst;j=ae,_=Error(n(419)),_.stack="",_.digest=j,Nd({value:_,source:null,stack:null}),p=z_(h,p,m)}else if(Or||Ld(h,p,m,!1),j=(m&h.childLanes)!==0,Or||j){if(j=Yt,j!==null&&(_=m&-m,_=(_&42)!==0?1:xb(_),_=(_&(j.suspendedLanes|m))!==0?0:_,_!==0&&_!==Z.retryLane))throw Z.retryLane=_,Hc(h,_),Xn(j,h,_),mE;Y.data==="$?"||tS(),p=z_(h,p,m)}else Y.data==="$?"?(p.flags|=192,p.child=h.child,p=null):(h=Z.treeContext,tr=Fa(Y.nextSibling),pn=p,Dt=!0,Gl=null,ci=!1,h!==null&&(da[va++]=io,da[va++]=oo,da[va++]=Bl,io=h.id,oo=h.overflow,Bl=p),p=P_(p,_.children),p.flags|=4096);return p}return A?(ps(),A=_.fallback,Y=p.mode,Z=h.child,ae=Z.sibling,_=ao(Z,{mode:"hidden",children:_.children}),_.subtreeFlags=Z.subtreeFlags&65011712,ae!==null?A=ao(ae,A):(A=jl(A,Y,m,null),A.flags|=2),A.return=p,_.return=p,_.sibling=A,p.child=_,_=A,A=p.child,Y=h.child.memoizedState,Y===null?Y=I_(m):(Z=Y.cachePool,Z!==null?(ae=Tr._currentValue,Z=Z.parent!==ae?{parent:ae,pool:ae}:Z):Z=hR(),Y={baseLanes:Y.baseLanes|m,cachePool:Z}),A.memoizedState=Y,A.childLanes=O_(h,j,m),p.memoizedState=k_,_):(vs(p),m=h.child,h=m.sibling,m=ao(m,{mode:"visible",children:_.children}),m.return=p,m.sibling=null,h!==null&&(j=p.deletions,j===null?(p.deletions=[h],p.flags|=16):j.push(h)),p.child=m,p.memoizedState=null,m)}function P_(h,p){return p=jm({mode:"visible",children:p},h.mode),p.return=h,h.child=p}function jm(h,p){return h=Hn(22,h,null,p),h.lanes=0,h.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},h}function z_(h,p,m){return Jc(p,h.child,null,m),h=P_(p,p.pendingProps.children),h.flags|=2,p.memoizedState=null,h}function ME(h,p,m){h.lanes|=p;var _=h.alternate;_!==null&&(_.lanes|=p),t_(h.return,p,m)}function j_(h,p,m,_,A){var L=h.memoizedState;L===null?h.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:_,tail:m,tailMode:A}:(L.isBackwards=p,L.rendering=null,L.renderingStartTime=0,L.last=_,L.tail=m,L.tailMode=A)}function DE(h,p,m){var _=p.pendingProps,A=_.revealOrder,L=_.tail;if(Wr(h,p,_.children,m),_=Cr.current,(_&2)!==0)_=_&1|2,p.flags|=128;else{if(h!==null&&(h.flags&128)!==0)e:for(h=p.child;h!==null;){if(h.tag===13)h.memoizedState!==null&&ME(h,m,p);else if(h.tag===19)ME(h,m,p);else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===p)break e;for(;h.sibling===null;){if(h.return===null||h.return===p)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}_&=1}switch(te(Cr,_),A){case"forwards":for(m=p.child,A=null;m!==null;)h=m.alternate,h!==null&&Im(h)===null&&(A=m),m=m.sibling;m=A,m===null?(A=p.child,p.child=null):(A=m.sibling,m.sibling=null),j_(p,!1,A,m,L);break;case"backwards":for(m=null,A=p.child,p.child=null;A!==null;){if(h=A.alternate,h!==null&&Im(h)===null){p.child=A;break}h=A.sibling,A.sibling=m,m=A,A=h}j_(p,!0,m,null,L);break;case"together":j_(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function fo(h,p,m){if(h!==null&&(p.dependencies=h.dependencies),bs|=p.lanes,(m&p.childLanes)===0)if(h!==null){if(Ld(h,p,m,!1),(m&p.childLanes)===0)return null}else return null;if(h!==null&&p.child!==h.child)throw Error(n(153));if(p.child!==null){for(h=p.child,m=ao(h,h.pendingProps),p.child=m,m.return=p;h.sibling!==null;)h=h.sibling,m=m.sibling=ao(h,h.pendingProps),m.return=p;m.sibling=null}return p.child}function B_(h,p){return(h.lanes&p)!==0?!0:(h=h.dependencies,!!(h!==null&&ym(h)))}function vW(h,p,m){switch(p.tag){case 3:be(p,p.stateNode.containerInfo),us(p,Tr,h.memoizedState.cache),Dd();break;case 27:case 5:ze(p);break;case 4:be(p,p.stateNode.containerInfo);break;case 10:us(p,p.type,p.memoizedProps.value);break;case 13:var _=p.memoizedState;if(_!==null)return _.dehydrated!==null?(vs(p),p.flags|=128,null):(m&p.child.childLanes)!==0?AE(h,p,m):(vs(p),h=fo(h,p,m),h!==null?h.sibling:null);vs(p);break;case 19:var A=(h.flags&128)!==0;if(_=(m&p.childLanes)!==0,_||(Ld(h,p,m,!1),_=(m&p.childLanes)!==0),A){if(_)return DE(h,p,m);p.flags|=128}if(A=p.memoizedState,A!==null&&(A.rendering=null,A.tail=null,A.lastEffect=null),te(Cr,Cr.current),_)break;return null;case 22:case 23:return p.lanes=0,_E(h,p,m);case 24:us(p,Tr,h.memoizedState.cache)}return fo(h,p,m)}function NE(h,p,m){if(h!==null)if(h.memoizedProps!==p.pendingProps)Or=!0;else{if(!B_(h,m)&&(p.flags&128)===0)return Or=!1,vW(h,p,m);Or=(h.flags&131072)!==0}else Or=!1,Dt&&(p.flags&1048576)!==0&&iR(p,mm,p.index);switch(p.lanes=0,p.tag){case 16:e:{h=p.pendingProps;var _=p.elementType,A=_._init;if(_=A(_._payload),p.type=_,typeof _=="function")qb(_)?(h=Xl(_,h),p.tag=1,p=TE(null,p,_,h,m)):(p.tag=0,p=E_(null,p,_,h,m));else{if(_!=null){if(A=_.$$typeof,A===C){p.tag=11,p=yE(null,p,_,h,m);break e}else if(A===N){p.tag=14,p=xE(null,p,_,h,m);break e}}throw p=G(_)||_,Error(n(306,p,""))}}return p;case 0:return E_(h,p,p.type,p.pendingProps,m);case 1:return _=p.type,A=Xl(_,p.pendingProps),TE(h,p,_,A,m);case 3:e:{if(be(p,p.stateNode.containerInfo),h===null)throw Error(n(387));_=p.pendingProps;var L=p.memoizedState;A=L.element,l_(h,p),zd(p,_,null,m);var j=p.memoizedState;if(_=j.cache,us(p,Tr,_),_!==L.cache&&r_(p,[Tr],m,!0),Pd(),_=j.element,L.isDehydrated)if(L={element:_,isDehydrated:!1,cache:j.cache},p.updateQueue.baseState=L,p.memoizedState=L,p.flags&256){p=CE(h,p,_,m);break e}else if(_!==A){A=fa(Error(n(424)),p),Nd(A),p=CE(h,p,_,m);break e}else{switch(h=p.stateNode.containerInfo,h.nodeType){case 9:h=h.body;break;default:h=h.nodeName==="HTML"?h.ownerDocument.body:h}for(tr=Fa(h.firstChild),pn=p,Dt=!0,Gl=null,ci=!0,m=sE(p,null,_,m),p.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling}else{if(Dd(),_===A){p=fo(h,p,m);break e}Wr(h,p,_,m)}p=p.child}return p;case 26:return zm(h,p),h===null?(m=kk(p.type,null,p.pendingProps,null))?p.memoizedState=m:Dt||(m=p.type,h=p.pendingProps,_=Qm(Se.current).createElement(m),_[an]=p,_[Cn]=h,qr(_,m,h),Ir(_),p.stateNode=_):p.memoizedState=kk(p.type,h.memoizedProps,p.pendingProps,h.memoizedState),null;case 27:return ze(p),h===null&&Dt&&(_=p.stateNode=Lk(p.type,p.pendingProps,Se.current),pn=p,ci=!0,A=tr,Ts(p.type)?(xS=A,tr=Fa(_.firstChild)):tr=A),Wr(h,p,p.pendingProps.children,m),zm(h,p),h===null&&(p.flags|=4194304),p.child;case 5:return h===null&&Dt&&((A=_=tr)&&(_=HW(_,p.type,p.pendingProps,ci),_!==null?(p.stateNode=_,pn=p,tr=Fa(_.firstChild),ci=!1,A=!0):A=!1),A||Hl(p)),ze(p),A=p.type,L=p.pendingProps,j=h!==null?h.memoizedProps:null,_=L.children,pS(A,L)?_=null:j!==null&&pS(A,j)&&(p.flags|=32),p.memoizedState!==null&&(A=v_(h,p,oW,null,null,m),iv._currentValue=A),zm(h,p),Wr(h,p,_,m),p.child;case 6:return h===null&&Dt&&((h=m=tr)&&(m=FW(m,p.pendingProps,ci),m!==null?(p.stateNode=m,pn=p,tr=null,h=!0):h=!1),h||Hl(p)),null;case 13:return AE(h,p,m);case 4:return be(p,p.stateNode.containerInfo),_=p.pendingProps,h===null?p.child=Jc(p,null,_,m):Wr(h,p,_,m),p.child;case 11:return yE(h,p,p.type,p.pendingProps,m);case 7:return Wr(h,p,p.pendingProps,m),p.child;case 8:return Wr(h,p,p.pendingProps.children,m),p.child;case 12:return Wr(h,p,p.pendingProps.children,m),p.child;case 10:return _=p.pendingProps,us(p,p.type,_.value),Wr(h,p,_.children,m),p.child;case 9:return A=p.type._context,_=p.pendingProps.children,Ul(p),A=on(A),_=_(A),p.flags|=1,Wr(h,p,_,m),p.child;case 14:return xE(h,p,p.type,p.pendingProps,m);case 15:return bE(h,p,p.type,p.pendingProps,m);case 19:return DE(h,p,m);case 31:return _=p.pendingProps,m=p.mode,_={mode:_.mode,children:_.children},h===null?(m=jm(_,m),m.ref=p.ref,p.child=m,m.return=p,p=m):(m=ao(h.child,_),m.ref=p.ref,p.child=m,m.return=p,p=m),p;case 22:return _E(h,p,m);case 24:return Ul(p),_=on(Tr),h===null?(A=i_(),A===null&&(A=Yt,L=n_(),A.pooledCache=L,L.refCount++,L!==null&&(A.pooledCacheLanes|=m),A=L),p.memoizedState={parent:_,cache:A},s_(p),us(p,Tr,A)):((h.lanes&m)!==0&&(l_(h,p),zd(p,null,null,m),Pd()),A=h.memoizedState,L=p.memoizedState,A.parent!==_?(A={parent:_,cache:_},p.memoizedState=A,p.lanes===0&&(p.memoizedState=p.updateQueue.baseState=A),us(p,Tr,_)):(_=L.cache,us(p,Tr,_),_!==A.cache&&r_(p,[Tr],m,!0))),Wr(h,p,p.pendingProps.children,m),p.child;case 29:throw p.pendingProps}throw Error(n(156,p.tag))}function ho(h){h.flags|=4}function LE(h,p){if(p.type!=="stylesheet"||(p.state.loading&4)!==0)h.flags&=-16777217;else if(h.flags|=16777216,!jk(p)){if(p=pa.current,p!==null&&((St&4194048)===St?fi!==null:(St&62914560)!==St&&(St&536870912)===0||p!==fi))throw Id=o_,dR;h.flags|=8192}}function Bm(h,p){p!==null&&(h.flags|=4),h.flags&16384&&(p=h.tag!==22?lL():536870912,h.lanes|=p,nf|=p)}function Ud(h,p){if(!Dt)switch(h.tailMode){case"hidden":p=h.tail;for(var m=null;p!==null;)p.alternate!==null&&(m=p),p=p.sibling;m===null?h.tail=null:m.sibling=null;break;case"collapsed":m=h.tail;for(var _=null;m!==null;)m.alternate!==null&&(_=m),m=m.sibling;_===null?p||h.tail===null?h.tail=null:h.tail.sibling=null:_.sibling=null}}function $t(h){var p=h.alternate!==null&&h.alternate.child===h.child,m=0,_=0;if(p)for(var A=h.child;A!==null;)m|=A.lanes|A.childLanes,_|=A.subtreeFlags&65011712,_|=A.flags&65011712,A.return=h,A=A.sibling;else for(A=h.child;A!==null;)m|=A.lanes|A.childLanes,_|=A.subtreeFlags,_|=A.flags,A.return=h,A=A.sibling;return h.subtreeFlags|=_,h.childLanes=m,p}function pW(h,p,m){var _=p.pendingProps;switch(Qb(p),p.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $t(p),null;case 1:return $t(p),null;case 3:return m=p.stateNode,_=null,h!==null&&(_=h.memoizedState.cache),p.memoizedState.cache!==_&&(p.flags|=2048),lo(Tr),we(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(h===null||h.child===null)&&(Md(p)?ho(p):h===null||h.memoizedState.isDehydrated&&(p.flags&256)===0||(p.flags|=1024,lR())),$t(p),null;case 26:return m=p.memoizedState,h===null?(ho(p),m!==null?($t(p),LE(p,m)):($t(p),p.flags&=-16777217)):m?m!==h.memoizedState?(ho(p),$t(p),LE(p,m)):($t(p),p.flags&=-16777217):(h.memoizedProps!==_&&ho(p),$t(p),p.flags&=-16777217),null;case 27:oe(p),m=Se.current;var A=p.type;if(h!==null&&p.stateNode!=null)h.memoizedProps!==_&&ho(p);else{if(!_){if(p.stateNode===null)throw Error(n(166));return $t(p),null}h=ue.current,Md(p)?oR(p):(h=Lk(A,_,m),p.stateNode=h,ho(p))}return $t(p),null;case 5:if(oe(p),m=p.type,h!==null&&p.stateNode!=null)h.memoizedProps!==_&&ho(p);else{if(!_){if(p.stateNode===null)throw Error(n(166));return $t(p),null}if(h=ue.current,Md(p))oR(p);else{switch(A=Qm(Se.current),h){case 1:h=A.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:h=A.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":h=A.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":h=A.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":h=A.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof _.is=="string"?A.createElement("select",{is:_.is}):A.createElement("select"),_.multiple?h.multiple=!0:_.size&&(h.size=_.size);break;default:h=typeof _.is=="string"?A.createElement(m,{is:_.is}):A.createElement(m)}}h[an]=p,h[Cn]=_;e:for(A=p.child;A!==null;){if(A.tag===5||A.tag===6)h.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===p)break e;for(;A.sibling===null;){if(A.return===null||A.return===p)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}p.stateNode=h;e:switch(qr(h,m,_),m){case"button":case"input":case"select":case"textarea":h=!!_.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&ho(p)}}return $t(p),p.flags&=-16777217,null;case 6:if(h&&p.stateNode!=null)h.memoizedProps!==_&&ho(p);else{if(typeof _!="string"&&p.stateNode===null)throw Error(n(166));if(h=Se.current,Md(p)){if(h=p.stateNode,m=p.memoizedProps,_=null,A=pn,A!==null)switch(A.tag){case 27:case 5:_=A.memoizedProps}h[an]=p,h=!!(h.nodeValue===m||_!==null&&_.suppressHydrationWarning===!0||wk(h.nodeValue,m)),h||Hl(p)}else h=Qm(h).createTextNode(_),h[an]=p,p.stateNode=h}return $t(p),null;case 13:if(_=p.memoizedState,h===null||h.memoizedState!==null&&h.memoizedState.dehydrated!==null){if(A=Md(p),_!==null&&_.dehydrated!==null){if(h===null){if(!A)throw Error(n(318));if(A=p.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(n(317));A[an]=p}else Dd(),(p.flags&128)===0&&(p.memoizedState=null),p.flags|=4;$t(p),A=!1}else A=lR(),h!==null&&h.memoizedState!==null&&(h.memoizedState.hydrationErrors=A),A=!0;if(!A)return p.flags&256?(co(p),p):(co(p),null)}if(co(p),(p.flags&128)!==0)return p.lanes=m,p;if(m=_!==null,h=h!==null&&h.memoizedState!==null,m){_=p.child,A=null,_.alternate!==null&&_.alternate.memoizedState!==null&&_.alternate.memoizedState.cachePool!==null&&(A=_.alternate.memoizedState.cachePool.pool);var L=null;_.memoizedState!==null&&_.memoizedState.cachePool!==null&&(L=_.memoizedState.cachePool.pool),L!==A&&(_.flags|=2048)}return m!==h&&m&&(p.child.flags|=8192),Bm(p,p.updateQueue),$t(p),null;case 4:return we(),h===null&&cS(p.stateNode.containerInfo),$t(p),null;case 10:return lo(p.type),$t(p),null;case 19:if($(Cr),A=p.memoizedState,A===null)return $t(p),null;if(_=(p.flags&128)!==0,L=A.rendering,L===null)if(_)Ud(A,!1);else{if(rr!==0||h!==null&&(h.flags&128)!==0)for(h=p.child;h!==null;){if(L=Im(h),L!==null){for(p.flags|=128,Ud(A,!1),h=L.updateQueue,p.updateQueue=h,Bm(p,h),p.subtreeFlags=0,h=m,m=p.child;m!==null;)aR(m,h),m=m.sibling;return te(Cr,Cr.current&1|2),p.child}h=h.sibling}A.tail!==null&&Ct()>Hm&&(p.flags|=128,_=!0,Ud(A,!1),p.lanes=4194304)}else{if(!_)if(h=Im(L),h!==null){if(p.flags|=128,_=!0,h=h.updateQueue,p.updateQueue=h,Bm(p,h),Ud(A,!0),A.tail===null&&A.tailMode==="hidden"&&!L.alternate&&!Dt)return $t(p),null}else 2*Ct()-A.renderingStartTime>Hm&&m!==536870912&&(p.flags|=128,_=!0,Ud(A,!1),p.lanes=4194304);A.isBackwards?(L.sibling=p.child,p.child=L):(h=A.last,h!==null?h.sibling=L:p.child=L,A.last=L)}return A.tail!==null?(p=A.tail,A.rendering=p,A.tail=p.sibling,A.renderingStartTime=Ct(),p.sibling=null,h=Cr.current,te(Cr,_?h&1|2:h&1),p):($t(p),null);case 22:case 23:return co(p),h_(),_=p.memoizedState!==null,h!==null?h.memoizedState!==null!==_&&(p.flags|=8192):_&&(p.flags|=8192),_?(m&536870912)!==0&&(p.flags&128)===0&&($t(p),p.subtreeFlags&6&&(p.flags|=8192)):$t(p),m=p.updateQueue,m!==null&&Bm(p,m.retryQueue),m=null,h!==null&&h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(m=h.memoizedState.cachePool.pool),_=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(_=p.memoizedState.cachePool.pool),_!==m&&(p.flags|=2048),h!==null&&$(Yl),null;case 24:return m=null,h!==null&&(m=h.memoizedState.cache),p.memoizedState.cache!==m&&(p.flags|=2048),lo(Tr),$t(p),null;case 25:return null;case 30:return null}throw Error(n(156,p.tag))}function gW(h,p){switch(Qb(p),p.tag){case 1:return h=p.flags,h&65536?(p.flags=h&-65537|128,p):null;case 3:return lo(Tr),we(),h=p.flags,(h&65536)!==0&&(h&128)===0?(p.flags=h&-65537|128,p):null;case 26:case 27:case 5:return oe(p),null;case 13:if(co(p),h=p.memoizedState,h!==null&&h.dehydrated!==null){if(p.alternate===null)throw Error(n(340));Dd()}return h=p.flags,h&65536?(p.flags=h&-65537|128,p):null;case 19:return $(Cr),null;case 4:return we(),null;case 10:return lo(p.type),null;case 22:case 23:return co(p),h_(),h!==null&&$(Yl),h=p.flags,h&65536?(p.flags=h&-65537|128,p):null;case 24:return lo(Tr),null;case 25:return null;default:return null}}function RE(h,p){switch(Qb(p),p.tag){case 3:lo(Tr),we();break;case 26:case 27:case 5:oe(p);break;case 4:we();break;case 13:co(p);break;case 19:$(Cr);break;case 10:lo(p.type);break;case 22:case 23:co(p),h_(),h!==null&&$(Yl);break;case 24:lo(Tr)}}function Yd(h,p){try{var m=p.updateQueue,_=m!==null?m.lastEffect:null;if(_!==null){var A=_.next;m=A;do{if((m.tag&h)===h){_=void 0;var L=m.create,j=m.inst;_=L(),j.destroy=_}m=m.next}while(m!==A)}}catch(Y){Ft(p,p.return,Y)}}function gs(h,p,m){try{var _=p.updateQueue,A=_!==null?_.lastEffect:null;if(A!==null){var L=A.next;_=L;do{if((_.tag&h)===h){var j=_.inst,Y=j.destroy;if(Y!==void 0){j.destroy=void 0,A=p;var Z=m,ae=Y;try{ae()}catch(he){Ft(A,Z,he)}}}_=_.next}while(_!==L)}}catch(he){Ft(p,p.return,he)}}function EE(h){var p=h.updateQueue;if(p!==null){var m=h.stateNode;try{xR(p,m)}catch(_){Ft(h,h.return,_)}}}function kE(h,p,m){m.props=Xl(h.type,h.memoizedProps),m.state=h.memoizedState;try{m.componentWillUnmount()}catch(_){Ft(h,p,_)}}function Wd(h,p){try{var m=h.ref;if(m!==null){switch(h.tag){case 26:case 27:case 5:var _=h.stateNode;break;case 30:_=h.stateNode;break;default:_=h.stateNode}typeof m=="function"?h.refCleanup=m(_):m.current=_}}catch(A){Ft(h,p,A)}}function hi(h,p){var m=h.ref,_=h.refCleanup;if(m!==null)if(typeof _=="function")try{_()}catch(A){Ft(h,p,A)}finally{h.refCleanup=null,h=h.alternate,h!=null&&(h.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(A){Ft(h,p,A)}else m.current=null}function IE(h){var p=h.type,m=h.memoizedProps,_=h.stateNode;try{e:switch(p){case"button":case"input":case"select":case"textarea":m.autoFocus&&_.focus();break e;case"img":m.src?_.src=m.src:m.srcSet&&(_.srcset=m.srcSet)}}catch(A){Ft(h,h.return,A)}}function V_(h,p,m){try{var _=h.stateNode;zW(_,h.type,m,p),_[Cn]=p}catch(A){Ft(h,h.return,A)}}function OE(h){return h.tag===5||h.tag===3||h.tag===26||h.tag===27&&Ts(h.type)||h.tag===4}function G_(h){e:for(;;){for(;h.sibling===null;){if(h.return===null||OE(h.return))return null;h=h.return}for(h.sibling.return=h.return,h=h.sibling;h.tag!==5&&h.tag!==6&&h.tag!==18;){if(h.tag===27&&Ts(h.type)||h.flags&2||h.child===null||h.tag===4)continue e;h.child.return=h,h=h.child}if(!(h.flags&2))return h.stateNode}}function H_(h,p,m){var _=h.tag;if(_===5||_===6)h=h.stateNode,p?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(h,p):(p=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,p.appendChild(h),m=m._reactRootContainer,m!=null||p.onclick!==null||(p.onclick=Km));else if(_!==4&&(_===27&&Ts(h.type)&&(m=h.stateNode,p=null),h=h.child,h!==null))for(H_(h,p,m),h=h.sibling;h!==null;)H_(h,p,m),h=h.sibling}function Vm(h,p,m){var _=h.tag;if(_===5||_===6)h=h.stateNode,p?m.insertBefore(h,p):m.appendChild(h);else if(_!==4&&(_===27&&Ts(h.type)&&(m=h.stateNode),h=h.child,h!==null))for(Vm(h,p,m),h=h.sibling;h!==null;)Vm(h,p,m),h=h.sibling}function PE(h){var p=h.stateNode,m=h.memoizedProps;try{for(var _=h.type,A=p.attributes;A.length;)p.removeAttributeNode(A[0]);qr(p,_,m),p[an]=h,p[Cn]=m}catch(L){Ft(h,h.return,L)}}var vo=!1,fr=!1,F_=!1,zE=typeof WeakSet=="function"?WeakSet:Set,Pr=null;function mW(h,p){if(h=h.containerInfo,dS=ay,h=qL(h),Gb(h)){if("selectionStart"in h)var m={start:h.selectionStart,end:h.selectionEnd};else e:{m=(m=h.ownerDocument)&&m.defaultView||window;var _=m.getSelection&&m.getSelection();if(_&&_.rangeCount!==0){m=_.anchorNode;var A=_.anchorOffset,L=_.focusNode;_=_.focusOffset;try{m.nodeType,L.nodeType}catch{m=null;break e}var j=0,Y=-1,Z=-1,ae=0,he=0,ve=h,se=null;t:for(;;){for(var le;ve!==m||A!==0&&ve.nodeType!==3||(Y=j+A),ve!==L||_!==0&&ve.nodeType!==3||(Z=j+_),ve.nodeType===3&&(j+=ve.nodeValue.length),(le=ve.firstChild)!==null;)se=ve,ve=le;for(;;){if(ve===h)break t;if(se===m&&++ae===A&&(Y=j),se===L&&++he===_&&(Z=j),(le=ve.nextSibling)!==null)break;ve=se,se=ve.parentNode}ve=le}m=Y===-1||Z===-1?null:{start:Y,end:Z}}else m=null}m=m||{start:0,end:0}}else m=null;for(vS={focusedElem:h,selectionRange:m},ay=!1,Pr=p;Pr!==null;)if(p=Pr,h=p.child,(p.subtreeFlags&1024)!==0&&h!==null)h.return=p,Pr=h;else for(;Pr!==null;){switch(p=Pr,L=p.alternate,h=p.flags,p.tag){case 0:break;case 11:case 15:break;case 1:if((h&1024)!==0&&L!==null){h=void 0,m=p,A=L.memoizedProps,L=L.memoizedState,_=m.stateNode;try{var rt=Xl(m.type,A,m.elementType===m.type);h=_.getSnapshotBeforeUpdate(rt,L),_.__reactInternalSnapshotBeforeUpdate=h}catch(Ze){Ft(m,m.return,Ze)}}break;case 3:if((h&1024)!==0){if(h=p.stateNode.containerInfo,m=h.nodeType,m===9)mS(h);else if(m===1)switch(h.nodeName){case"HEAD":case"HTML":case"BODY":mS(h);break;default:h.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((h&1024)!==0)throw Error(n(163))}if(h=p.sibling,h!==null){h.return=p.return,Pr=h;break}Pr=p.return}}function jE(h,p,m){var _=m.flags;switch(m.tag){case 0:case 11:case 15:ms(h,m),_&4&&Yd(5,m);break;case 1:if(ms(h,m),_&4)if(h=m.stateNode,p===null)try{h.componentDidMount()}catch(j){Ft(m,m.return,j)}else{var A=Xl(m.type,p.memoizedProps);p=p.memoizedState;try{h.componentDidUpdate(A,p,h.__reactInternalSnapshotBeforeUpdate)}catch(j){Ft(m,m.return,j)}}_&64&&EE(m),_&512&&Wd(m,m.return);break;case 3:if(ms(h,m),_&64&&(h=m.updateQueue,h!==null)){if(p=null,m.child!==null)switch(m.child.tag){case 27:case 5:p=m.child.stateNode;break;case 1:p=m.child.stateNode}try{xR(h,p)}catch(j){Ft(m,m.return,j)}}break;case 27:p===null&&_&4&&PE(m);case 26:case 5:ms(h,m),p===null&&_&4&&IE(m),_&512&&Wd(m,m.return);break;case 12:ms(h,m);break;case 13:ms(h,m),_&4&&GE(h,m),_&64&&(h=m.memoizedState,h!==null&&(h=h.dehydrated,h!==null&&(m=AW.bind(null,m),UW(h,m))));break;case 22:if(_=m.memoizedState!==null||vo,!_){p=p!==null&&p.memoizedState!==null||fr,A=vo;var L=fr;vo=_,(fr=p)&&!L?ys(h,m,(m.subtreeFlags&8772)!==0):ms(h,m),vo=A,fr=L}break;case 30:break;default:ms(h,m)}}function BE(h){var p=h.alternate;p!==null&&(h.alternate=null,BE(p)),h.child=null,h.deletions=null,h.sibling=null,h.tag===5&&(p=h.stateNode,p!==null&&Sb(p)),h.stateNode=null,h.return=null,h.dependencies=null,h.memoizedProps=null,h.memoizedState=null,h.pendingProps=null,h.stateNode=null,h.updateQueue=null}var qt=null,Dn=!1;function po(h,p,m){for(m=m.child;m!==null;)VE(h,p,m),m=m.sibling}function VE(h,p,m){if(Bn&&typeof Bn.onCommitFiberUnmount=="function")try{Bn.onCommitFiberUnmount(dd,m)}catch{}switch(m.tag){case 26:fr||hi(m,p),po(h,p,m),m.memoizedState?m.memoizedState.count--:m.stateNode&&(m=m.stateNode,m.parentNode.removeChild(m));break;case 27:fr||hi(m,p);var _=qt,A=Dn;Ts(m.type)&&(qt=m.stateNode,Dn=!1),po(h,p,m),tv(m.stateNode),qt=_,Dn=A;break;case 5:fr||hi(m,p);case 6:if(_=qt,A=Dn,qt=null,po(h,p,m),qt=_,Dn=A,qt!==null)if(Dn)try{(qt.nodeType===9?qt.body:qt.nodeName==="HTML"?qt.ownerDocument.body:qt).removeChild(m.stateNode)}catch(L){Ft(m,p,L)}else try{qt.removeChild(m.stateNode)}catch(L){Ft(m,p,L)}break;case 18:qt!==null&&(Dn?(h=qt,Dk(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,m.stateNode),uv(h)):Dk(qt,m.stateNode));break;case 4:_=qt,A=Dn,qt=m.stateNode.containerInfo,Dn=!0,po(h,p,m),qt=_,Dn=A;break;case 0:case 11:case 14:case 15:fr||gs(2,m,p),fr||gs(4,m,p),po(h,p,m);break;case 1:fr||(hi(m,p),_=m.stateNode,typeof _.componentWillUnmount=="function"&&kE(m,p,_)),po(h,p,m);break;case 21:po(h,p,m);break;case 22:fr=(_=fr)||m.memoizedState!==null,po(h,p,m),fr=_;break;default:po(h,p,m)}}function GE(h,p){if(p.memoizedState===null&&(h=p.alternate,h!==null&&(h=h.memoizedState,h!==null&&(h=h.dehydrated,h!==null))))try{uv(h)}catch(m){Ft(p,p.return,m)}}function yW(h){switch(h.tag){case 13:case 19:var p=h.stateNode;return p===null&&(p=h.stateNode=new zE),p;case 22:return h=h.stateNode,p=h._retryCache,p===null&&(p=h._retryCache=new zE),p;default:throw Error(n(435,h.tag))}}function U_(h,p){var m=yW(h);p.forEach(function(_){var A=MW.bind(null,h,_);m.has(_)||(m.add(_),_.then(A,A))})}function Fn(h,p){var m=p.deletions;if(m!==null)for(var _=0;_<m.length;_++){var A=m[_],L=h,j=p,Y=j;e:for(;Y!==null;){switch(Y.tag){case 27:if(Ts(Y.type)){qt=Y.stateNode,Dn=!1;break e}break;case 5:qt=Y.stateNode,Dn=!1;break e;case 3:case 4:qt=Y.stateNode.containerInfo,Dn=!0;break e}Y=Y.return}if(qt===null)throw Error(n(160));VE(L,j,A),qt=null,Dn=!1,L=A.alternate,L!==null&&(L.return=null),A.return=null}if(p.subtreeFlags&13878)for(p=p.child;p!==null;)HE(p,h),p=p.sibling}var Ha=null;function HE(h,p){var m=h.alternate,_=h.flags;switch(h.tag){case 0:case 11:case 14:case 15:Fn(p,h),Un(h),_&4&&(gs(3,h,h.return),Yd(3,h),gs(5,h,h.return));break;case 1:Fn(p,h),Un(h),_&512&&(fr||m===null||hi(m,m.return)),_&64&&vo&&(h=h.updateQueue,h!==null&&(_=h.callbacks,_!==null&&(m=h.shared.hiddenCallbacks,h.shared.hiddenCallbacks=m===null?_:m.concat(_))));break;case 26:var A=Ha;if(Fn(p,h),Un(h),_&512&&(fr||m===null||hi(m,m.return)),_&4){var L=m!==null?m.memoizedState:null;if(_=h.memoizedState,m===null)if(_===null)if(h.stateNode===null){e:{_=h.type,m=h.memoizedProps,A=A.ownerDocument||A;t:switch(_){case"title":L=A.getElementsByTagName("title")[0],(!L||L[gd]||L[an]||L.namespaceURI==="http://www.w3.org/2000/svg"||L.hasAttribute("itemprop"))&&(L=A.createElement(_),A.head.insertBefore(L,A.querySelector("head > title"))),qr(L,_,m),L[an]=h,Ir(L),_=L;break e;case"link":var j=Pk("link","href",A).get(_+(m.href||""));if(j){for(var Y=0;Y<j.length;Y++)if(L=j[Y],L.getAttribute("href")===(m.href==null||m.href===""?null:m.href)&&L.getAttribute("rel")===(m.rel==null?null:m.rel)&&L.getAttribute("title")===(m.title==null?null:m.title)&&L.getAttribute("crossorigin")===(m.crossOrigin==null?null:m.crossOrigin)){j.splice(Y,1);break t}}L=A.createElement(_),qr(L,_,m),A.head.appendChild(L);break;case"meta":if(j=Pk("meta","content",A).get(_+(m.content||""))){for(Y=0;Y<j.length;Y++)if(L=j[Y],L.getAttribute("content")===(m.content==null?null:""+m.content)&&L.getAttribute("name")===(m.name==null?null:m.name)&&L.getAttribute("property")===(m.property==null?null:m.property)&&L.getAttribute("http-equiv")===(m.httpEquiv==null?null:m.httpEquiv)&&L.getAttribute("charset")===(m.charSet==null?null:m.charSet)){j.splice(Y,1);break t}}L=A.createElement(_),qr(L,_,m),A.head.appendChild(L);break;default:throw Error(n(468,_))}L[an]=h,Ir(L),_=L}h.stateNode=_}else zk(A,h.type,h.stateNode);else h.stateNode=Ok(A,_,h.memoizedProps);else L!==_?(L===null?m.stateNode!==null&&(m=m.stateNode,m.parentNode.removeChild(m)):L.count--,_===null?zk(A,h.type,h.stateNode):Ok(A,_,h.memoizedProps)):_===null&&h.stateNode!==null&&V_(h,h.memoizedProps,m.memoizedProps)}break;case 27:Fn(p,h),Un(h),_&512&&(fr||m===null||hi(m,m.return)),m!==null&&_&4&&V_(h,h.memoizedProps,m.memoizedProps);break;case 5:if(Fn(p,h),Un(h),_&512&&(fr||m===null||hi(m,m.return)),h.flags&32){A=h.stateNode;try{Oc(A,"")}catch(le){Ft(h,h.return,le)}}_&4&&h.stateNode!=null&&(A=h.memoizedProps,V_(h,A,m!==null?m.memoizedProps:A)),_&1024&&(F_=!0);break;case 6:if(Fn(p,h),Un(h),_&4){if(h.stateNode===null)throw Error(n(162));_=h.memoizedProps,m=h.stateNode;try{m.nodeValue=_}catch(le){Ft(h,h.return,le)}}break;case 3:if(ty=null,A=Ha,Ha=Jm(p.containerInfo),Fn(p,h),Ha=A,Un(h),_&4&&m!==null&&m.memoizedState.isDehydrated)try{uv(p.containerInfo)}catch(le){Ft(h,h.return,le)}F_&&(F_=!1,FE(h));break;case 4:_=Ha,Ha=Jm(h.stateNode.containerInfo),Fn(p,h),Un(h),Ha=_;break;case 12:Fn(p,h),Un(h);break;case 13:Fn(p,h),Un(h),h.child.flags&8192&&h.memoizedState!==null!=(m!==null&&m.memoizedState!==null)&&($_=Ct()),_&4&&(_=h.updateQueue,_!==null&&(h.updateQueue=null,U_(h,_)));break;case 22:A=h.memoizedState!==null;var Z=m!==null&&m.memoizedState!==null,ae=vo,he=fr;if(vo=ae||A,fr=he||Z,Fn(p,h),fr=he,vo=ae,Un(h),_&8192)e:for(p=h.stateNode,p._visibility=A?p._visibility&-2:p._visibility|1,A&&(m===null||Z||vo||fr||ql(h)),m=null,p=h;;){if(p.tag===5||p.tag===26){if(m===null){Z=m=p;try{if(L=Z.stateNode,A)j=L.style,typeof j.setProperty=="function"?j.setProperty("display","none","important"):j.display="none";else{Y=Z.stateNode;var ve=Z.memoizedProps.style,se=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;Y.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(le){Ft(Z,Z.return,le)}}}else if(p.tag===6){if(m===null){Z=p;try{Z.stateNode.nodeValue=A?"":Z.memoizedProps}catch(le){Ft(Z,Z.return,le)}}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===h)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===h)break e;for(;p.sibling===null;){if(p.return===null||p.return===h)break e;m===p&&(m=null),p=p.return}m===p&&(m=null),p.sibling.return=p.return,p=p.sibling}_&4&&(_=h.updateQueue,_!==null&&(m=_.retryQueue,m!==null&&(_.retryQueue=null,U_(h,m))));break;case 19:Fn(p,h),Un(h),_&4&&(_=h.updateQueue,_!==null&&(h.updateQueue=null,U_(h,_)));break;case 30:break;case 21:break;default:Fn(p,h),Un(h)}}function Un(h){var p=h.flags;if(p&2){try{for(var m,_=h.return;_!==null;){if(OE(_)){m=_;break}_=_.return}if(m==null)throw Error(n(160));switch(m.tag){case 27:var A=m.stateNode,L=G_(h);Vm(h,L,A);break;case 5:var j=m.stateNode;m.flags&32&&(Oc(j,""),m.flags&=-33);var Y=G_(h);Vm(h,Y,j);break;case 3:case 4:var Z=m.stateNode.containerInfo,ae=G_(h);H_(h,ae,Z);break;default:throw Error(n(161))}}catch(he){Ft(h,h.return,he)}h.flags&=-3}p&4096&&(h.flags&=-4097)}function FE(h){if(h.subtreeFlags&1024)for(h=h.child;h!==null;){var p=h;FE(p),p.tag===5&&p.flags&1024&&p.stateNode.reset(),h=h.sibling}}function ms(h,p){if(p.subtreeFlags&8772)for(p=p.child;p!==null;)jE(h,p.alternate,p),p=p.sibling}function ql(h){for(h=h.child;h!==null;){var p=h;switch(p.tag){case 0:case 11:case 14:case 15:gs(4,p,p.return),ql(p);break;case 1:hi(p,p.return);var m=p.stateNode;typeof m.componentWillUnmount=="function"&&kE(p,p.return,m),ql(p);break;case 27:tv(p.stateNode);case 26:case 5:hi(p,p.return),ql(p);break;case 22:p.memoizedState===null&&ql(p);break;case 30:ql(p);break;default:ql(p)}h=h.sibling}}function ys(h,p,m){for(m=m&&(p.subtreeFlags&8772)!==0,p=p.child;p!==null;){var _=p.alternate,A=h,L=p,j=L.flags;switch(L.tag){case 0:case 11:case 15:ys(A,L,m),Yd(4,L);break;case 1:if(ys(A,L,m),_=L,A=_.stateNode,typeof A.componentDidMount=="function")try{A.componentDidMount()}catch(ae){Ft(_,_.return,ae)}if(_=L,A=_.updateQueue,A!==null){var Y=_.stateNode;try{var Z=A.shared.hiddenCallbacks;if(Z!==null)for(A.shared.hiddenCallbacks=null,A=0;A<Z.length;A++)yR(Z[A],Y)}catch(ae){Ft(_,_.return,ae)}}m&&j&64&&EE(L),Wd(L,L.return);break;case 27:PE(L);case 26:case 5:ys(A,L,m),m&&_===null&&j&4&&IE(L),Wd(L,L.return);break;case 12:ys(A,L,m);break;case 13:ys(A,L,m),m&&j&4&&GE(A,L);break;case 22:L.memoizedState===null&&ys(A,L,m),Wd(L,L.return);break;case 30:break;default:ys(A,L,m)}p=p.sibling}}function Y_(h,p){var m=null;h!==null&&h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(m=h.memoizedState.cachePool.pool),h=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(h=p.memoizedState.cachePool.pool),h!==m&&(h!=null&&h.refCount++,m!=null&&Rd(m))}function W_(h,p){h=null,p.alternate!==null&&(h=p.alternate.memoizedState.cache),p=p.memoizedState.cache,p!==h&&(p.refCount++,h!=null&&Rd(h))}function di(h,p,m,_){if(p.subtreeFlags&10256)for(p=p.child;p!==null;)UE(h,p,m,_),p=p.sibling}function UE(h,p,m,_){var A=p.flags;switch(p.tag){case 0:case 11:case 15:di(h,p,m,_),A&2048&&Yd(9,p);break;case 1:di(h,p,m,_);break;case 3:di(h,p,m,_),A&2048&&(h=null,p.alternate!==null&&(h=p.alternate.memoizedState.cache),p=p.memoizedState.cache,p!==h&&(p.refCount++,h!=null&&Rd(h)));break;case 12:if(A&2048){di(h,p,m,_),h=p.stateNode;try{var L=p.memoizedProps,j=L.id,Y=L.onPostCommit;typeof Y=="function"&&Y(j,p.alternate===null?"mount":"update",h.passiveEffectDuration,-0)}catch(Z){Ft(p,p.return,Z)}}else di(h,p,m,_);break;case 13:di(h,p,m,_);break;case 23:break;case 22:L=p.stateNode,j=p.alternate,p.memoizedState!==null?L._visibility&2?di(h,p,m,_):Xd(h,p):L._visibility&2?di(h,p,m,_):(L._visibility|=2,ef(h,p,m,_,(p.subtreeFlags&10256)!==0)),A&2048&&Y_(j,p);break;case 24:di(h,p,m,_),A&2048&&W_(p.alternate,p);break;default:di(h,p,m,_)}}function ef(h,p,m,_,A){for(A=A&&(p.subtreeFlags&10256)!==0,p=p.child;p!==null;){var L=h,j=p,Y=m,Z=_,ae=j.flags;switch(j.tag){case 0:case 11:case 15:ef(L,j,Y,Z,A),Yd(8,j);break;case 23:break;case 22:var he=j.stateNode;j.memoizedState!==null?he._visibility&2?ef(L,j,Y,Z,A):Xd(L,j):(he._visibility|=2,ef(L,j,Y,Z,A)),A&&ae&2048&&Y_(j.alternate,j);break;case 24:ef(L,j,Y,Z,A),A&&ae&2048&&W_(j.alternate,j);break;default:ef(L,j,Y,Z,A)}p=p.sibling}}function Xd(h,p){if(p.subtreeFlags&10256)for(p=p.child;p!==null;){var m=h,_=p,A=_.flags;switch(_.tag){case 22:Xd(m,_),A&2048&&Y_(_.alternate,_);break;case 24:Xd(m,_),A&2048&&W_(_.alternate,_);break;default:Xd(m,_)}p=p.sibling}}var qd=8192;function tf(h){if(h.subtreeFlags&qd)for(h=h.child;h!==null;)YE(h),h=h.sibling}function YE(h){switch(h.tag){case 26:tf(h),h.flags&qd&&h.memoizedState!==null&&nX(Ha,h.memoizedState,h.memoizedProps);break;case 5:tf(h);break;case 3:case 4:var p=Ha;Ha=Jm(h.stateNode.containerInfo),tf(h),Ha=p;break;case 22:h.memoizedState===null&&(p=h.alternate,p!==null&&p.memoizedState!==null?(p=qd,qd=16777216,tf(h),qd=p):tf(h));break;default:tf(h)}}function WE(h){var p=h.alternate;if(p!==null&&(h=p.child,h!==null)){p.child=null;do p=h.sibling,h.sibling=null,h=p;while(h!==null)}}function Zd(h){var p=h.deletions;if((h.flags&16)!==0){if(p!==null)for(var m=0;m<p.length;m++){var _=p[m];Pr=_,qE(_,h)}WE(h)}if(h.subtreeFlags&10256)for(h=h.child;h!==null;)XE(h),h=h.sibling}function XE(h){switch(h.tag){case 0:case 11:case 15:Zd(h),h.flags&2048&&gs(9,h,h.return);break;case 3:Zd(h);break;case 12:Zd(h);break;case 22:var p=h.stateNode;h.memoizedState!==null&&p._visibility&2&&(h.return===null||h.return.tag!==13)?(p._visibility&=-3,Gm(h)):Zd(h);break;default:Zd(h)}}function Gm(h){var p=h.deletions;if((h.flags&16)!==0){if(p!==null)for(var m=0;m<p.length;m++){var _=p[m];Pr=_,qE(_,h)}WE(h)}for(h=h.child;h!==null;){switch(p=h,p.tag){case 0:case 11:case 15:gs(8,p,p.return),Gm(p);break;case 22:m=p.stateNode,m._visibility&2&&(m._visibility&=-3,Gm(p));break;default:Gm(p)}h=h.sibling}}function qE(h,p){for(;Pr!==null;){var m=Pr;switch(m.tag){case 0:case 11:case 15:gs(8,m,p);break;case 23:case 22:if(m.memoizedState!==null&&m.memoizedState.cachePool!==null){var _=m.memoizedState.cachePool.pool;_!=null&&_.refCount++}break;case 24:Rd(m.memoizedState.cache)}if(_=m.child,_!==null)_.return=m,Pr=_;else e:for(m=h;Pr!==null;){_=Pr;var A=_.sibling,L=_.return;if(BE(_),_===m){Pr=null;break e}if(A!==null){A.return=L,Pr=A;break e}Pr=L}}}var xW={getCacheForType:function(h){var p=on(Tr),m=p.data.get(h);return m===void 0&&(m=h(),p.data.set(h,m)),m}},bW=typeof WeakMap=="function"?WeakMap:Map,It=0,Yt=null,mt=null,St=0,Ot=0,Yn=null,xs=!1,rf=!1,X_=!1,go=0,rr=0,bs=0,Zl=0,q_=0,ga=0,nf=0,$d=null,Nn=null,Z_=!1,$_=0,Hm=1/0,Fm=null,_s=null,Xr=0,Ss=null,af=null,of=0,K_=0,Q_=null,ZE=null,Kd=0,J_=null;function Wn(){if((It&2)!==0&&St!==0)return St&-St;if(B.T!==null){var h=Wc;return h!==0?h:oS()}return fL()}function $E(){ga===0&&(ga=(St&536870912)===0||Dt?sL():536870912);var h=pa.current;return h!==null&&(h.flags|=32),ga}function Xn(h,p,m){(h===Yt&&(Ot===2||Ot===9)||h.cancelPendingCommit!==null)&&(sf(h,0),ws(h,St,ga,!1)),pd(h,m),((It&2)===0||h!==Yt)&&(h===Yt&&((It&2)===0&&(Zl|=m),rr===4&&ws(h,St,ga,!1)),vi(h))}function KE(h,p,m){if((It&6)!==0)throw Error(n(327));var _=!m&&(p&124)===0&&(p&h.expiredLanes)===0||vd(h,p),A=_?wW(h,p):rS(h,p,!0),L=_;do{if(A===0){rf&&!_&&ws(h,p,0,!1);break}else{if(m=h.current.alternate,L&&!_W(m)){A=rS(h,p,!1),L=!1;continue}if(A===2){if(L=p,h.errorRecoveryDisabledLanes&L)var j=0;else j=h.pendingLanes&-536870913,j=j!==0?j:j&536870912?536870912:0;if(j!==0){p=j;e:{var Y=h;A=$d;var Z=Y.current.memoizedState.isDehydrated;if(Z&&(sf(Y,j).flags|=256),j=rS(Y,j,!1),j!==2){if(X_&&!Z){Y.errorRecoveryDisabledLanes|=L,Zl|=L,A=4;break e}L=Nn,Nn=A,L!==null&&(Nn===null?Nn=L:Nn.push.apply(Nn,L))}A=j}if(L=!1,A!==2)continue}}if(A===1){sf(h,0),ws(h,p,0,!0);break}e:{switch(_=h,L=A,L){case 0:case 1:throw Error(n(345));case 4:if((p&4194048)!==p)break;case 6:ws(_,p,ga,!xs);break e;case 2:Nn=null;break;case 3:case 5:break;default:throw Error(n(329))}if((p&62914560)===p&&(A=$_+300-Ct(),10<A)){if(ws(_,p,ga,!xs),em(_,0,!0)!==0)break e;_.timeoutHandle=Ak(QE.bind(null,_,m,Nn,Fm,Z_,p,ga,Zl,nf,xs,L,2,-0,0),A);break e}QE(_,m,Nn,Fm,Z_,p,ga,Zl,nf,xs,L,0,-0,0)}}break}while(!0);vi(h)}function QE(h,p,m,_,A,L,j,Y,Z,ae,he,ve,se,le){if(h.timeoutHandle=-1,ve=p.subtreeFlags,(ve&8192||(ve&16785408)===16785408)&&(av={stylesheets:null,count:0,unsuspend:rX},YE(p),ve=aX(),ve!==null)){h.cancelPendingCommit=ve(ik.bind(null,h,p,L,m,_,A,j,Y,Z,he,1,se,le)),ws(h,L,j,!ae);return}ik(h,p,L,m,_,A,j,Y,Z)}function _W(h){for(var p=h;;){var m=p.tag;if((m===0||m===11||m===15)&&p.flags&16384&&(m=p.updateQueue,m!==null&&(m=m.stores,m!==null)))for(var _=0;_<m.length;_++){var A=m[_],L=A.getSnapshot;A=A.value;try{if(!Gn(L(),A))return!1}catch{return!1}}if(m=p.child,p.subtreeFlags&16384&&m!==null)m.return=p,p=m;else{if(p===h)break;for(;p.sibling===null;){if(p.return===null||p.return===h)return!0;p=p.return}p.sibling.return=p.return,p=p.sibling}}return!0}function ws(h,p,m,_){p&=~q_,p&=~Zl,h.suspendedLanes|=p,h.pingedLanes&=~p,_&&(h.warmLanes|=p),_=h.expirationTimes;for(var A=p;0<A;){var L=31-Vn(A),j=1<<L;_[L]=-1,A&=~j}m!==0&&uL(h,m,p)}function Um(){return(It&6)===0?(Qd(0),!1):!0}function eS(){if(mt!==null){if(Ot===0)var h=mt.return;else h=mt,so=Fl=null,m_(h),Qc=null,Hd=0,h=mt;for(;h!==null;)RE(h.alternate,h),h=h.return;mt=null}}function sf(h,p){var m=h.timeoutHandle;m!==-1&&(h.timeoutHandle=-1,BW(m)),m=h.cancelPendingCommit,m!==null&&(h.cancelPendingCommit=null,m()),eS(),Yt=h,mt=m=ao(h.current,null),St=p,Ot=0,Yn=null,xs=!1,rf=vd(h,p),X_=!1,nf=ga=q_=Zl=bs=rr=0,Nn=$d=null,Z_=!1,(p&8)!==0&&(p|=p&32);var _=h.entangledLanes;if(_!==0)for(h=h.entanglements,_&=p;0<_;){var A=31-Vn(_),L=1<<A;p|=h[A],_&=~L}return go=p,hm(),m}function JE(h,p){ht=null,B.H=Rm,p===kd||p===_m?(p=gR(),Ot=3):p===dR?(p=gR(),Ot=4):Ot=p===mE?8:p!==null&&typeof p=="object"&&typeof p.then=="function"?6:1,Yn=p,mt===null&&(rr=1,Pm(h,fa(p,h.current)))}function ek(){var h=B.H;return B.H=Rm,h===null?Rm:h}function tk(){var h=B.A;return B.A=xW,h}function tS(){rr=4,xs||(St&4194048)!==St&&pa.current!==null||(rf=!0),(bs&134217727)===0&&(Zl&134217727)===0||Yt===null||ws(Yt,St,ga,!1)}function rS(h,p,m){var _=It;It|=2;var A=ek(),L=tk();(Yt!==h||St!==p)&&(Fm=null,sf(h,p)),p=!1;var j=rr;e:do try{if(Ot!==0&&mt!==null){var Y=mt,Z=Yn;switch(Ot){case 8:eS(),j=6;break e;case 3:case 2:case 9:case 6:pa.current===null&&(p=!0);var ae=Ot;if(Ot=0,Yn=null,lf(h,Y,Z,ae),m&&rf){j=0;break e}break;default:ae=Ot,Ot=0,Yn=null,lf(h,Y,Z,ae)}}SW(),j=rr;break}catch(he){JE(h,he)}while(!0);return p&&h.shellSuspendCounter++,so=Fl=null,It=_,B.H=A,B.A=L,mt===null&&(Yt=null,St=0,hm()),j}function SW(){for(;mt!==null;)rk(mt)}function wW(h,p){var m=It;It|=2;var _=ek(),A=tk();Yt!==h||St!==p?(Fm=null,Hm=Ct()+500,sf(h,p)):rf=vd(h,p);e:do try{if(Ot!==0&&mt!==null){p=mt;var L=Yn;t:switch(Ot){case 1:Ot=0,Yn=null,lf(h,p,L,1);break;case 2:case 9:if(vR(L)){Ot=0,Yn=null,nk(p);break}p=function(){Ot!==2&&Ot!==9||Yt!==h||(Ot=7),vi(h)},L.then(p,p);break e;case 3:Ot=7;break e;case 4:Ot=5;break e;case 7:vR(L)?(Ot=0,Yn=null,nk(p)):(Ot=0,Yn=null,lf(h,p,L,7));break;case 5:var j=null;switch(mt.tag){case 26:j=mt.memoizedState;case 5:case 27:var Y=mt;if(!j||jk(j)){Ot=0,Yn=null;var Z=Y.sibling;if(Z!==null)mt=Z;else{var ae=Y.return;ae!==null?(mt=ae,Ym(ae)):mt=null}break t}}Ot=0,Yn=null,lf(h,p,L,5);break;case 6:Ot=0,Yn=null,lf(h,p,L,6);break;case 8:eS(),rr=6;break e;default:throw Error(n(462))}}TW();break}catch(he){JE(h,he)}while(!0);return so=Fl=null,B.H=_,B.A=A,It=m,mt!==null?0:(Yt=null,St=0,hm(),rr)}function TW(){for(;mt!==null&&!at();)rk(mt)}function rk(h){var p=NE(h.alternate,h,go);h.memoizedProps=h.pendingProps,p===null?Ym(h):mt=p}function nk(h){var p=h,m=p.alternate;switch(p.tag){case 15:case 0:p=wE(m,p,p.pendingProps,p.type,void 0,St);break;case 11:p=wE(m,p,p.pendingProps,p.type.render,p.ref,St);break;case 5:m_(p);default:RE(m,p),p=mt=aR(p,go),p=NE(m,p,go)}h.memoizedProps=h.pendingProps,p===null?Ym(h):mt=p}function lf(h,p,m,_){so=Fl=null,m_(p),Qc=null,Hd=0;var A=p.return;try{if(dW(h,A,p,m,St)){rr=1,Pm(h,fa(m,h.current)),mt=null;return}}catch(L){if(A!==null)throw mt=A,L;rr=1,Pm(h,fa(m,h.current)),mt=null;return}p.flags&32768?(Dt||_===1?h=!0:rf||(St&536870912)!==0?h=!1:(xs=h=!0,(_===2||_===9||_===3||_===6)&&(_=pa.current,_!==null&&_.tag===13&&(_.flags|=16384))),ak(p,h)):Ym(p)}function Ym(h){var p=h;do{if((p.flags&32768)!==0){ak(p,xs);return}h=p.return;var m=pW(p.alternate,p,go);if(m!==null){mt=m;return}if(p=p.sibling,p!==null){mt=p;return}mt=p=h}while(p!==null);rr===0&&(rr=5)}function ak(h,p){do{var m=gW(h.alternate,h);if(m!==null){m.flags&=32767,mt=m;return}if(m=h.return,m!==null&&(m.flags|=32768,m.subtreeFlags=0,m.deletions=null),!p&&(h=h.sibling,h!==null)){mt=h;return}mt=h=m}while(h!==null);rr=6,mt=null}function ik(h,p,m,_,A,L,j,Y,Z){h.cancelPendingCommit=null;do Wm();while(Xr!==0);if((It&6)!==0)throw Error(n(327));if(p!==null){if(p===h.current)throw Error(n(177));if(L=p.lanes|p.childLanes,L|=Wb,rY(h,m,L,j,Y,Z),h===Yt&&(mt=Yt=null,St=0),af=p,Ss=h,of=m,K_=L,Q_=A,ZE=_,(p.subtreeFlags&10256)!==0||(p.flags&10256)!==0?(h.callbackNode=null,h.callbackPriority=0,DW(Va,function(){return ck(),null})):(h.callbackNode=null,h.callbackPriority=0),_=(p.flags&13878)!==0,(p.subtreeFlags&13878)!==0||_){_=B.T,B.T=null,A=F.p,F.p=2,j=It,It|=4;try{mW(h,p,m)}finally{It=j,F.p=A,B.T=_}}Xr=1,ok(),sk(),lk()}}function ok(){if(Xr===1){Xr=0;var h=Ss,p=af,m=(p.flags&13878)!==0;if((p.subtreeFlags&13878)!==0||m){m=B.T,B.T=null;var _=F.p;F.p=2;var A=It;It|=4;try{HE(p,h);var L=vS,j=qL(h.containerInfo),Y=L.focusedElem,Z=L.selectionRange;if(j!==Y&&Y&&Y.ownerDocument&&XL(Y.ownerDocument.documentElement,Y)){if(Z!==null&&Gb(Y)){var ae=Z.start,he=Z.end;if(he===void 0&&(he=ae),"selectionStart"in Y)Y.selectionStart=ae,Y.selectionEnd=Math.min(he,Y.value.length);else{var ve=Y.ownerDocument||document,se=ve&&ve.defaultView||window;if(se.getSelection){var le=se.getSelection(),rt=Y.textContent.length,Ze=Math.min(Z.start,rt),Gt=Z.end===void 0?Ze:Math.min(Z.end,rt);!le.extend&&Ze>Gt&&(j=Gt,Gt=Ze,Ze=j);var re=WL(Y,Ze),Q=WL(Y,Gt);if(re&&Q&&(le.rangeCount!==1||le.anchorNode!==re.node||le.anchorOffset!==re.offset||le.focusNode!==Q.node||le.focusOffset!==Q.offset)){var ne=ve.createRange();ne.setStart(re.node,re.offset),le.removeAllRanges(),Ze>Gt?(le.addRange(ne),le.extend(Q.node,Q.offset)):(ne.setEnd(Q.node,Q.offset),le.addRange(ne))}}}}for(ve=[],le=Y;le=le.parentNode;)le.nodeType===1&&ve.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof Y.focus=="function"&&Y.focus(),Y=0;Y<ve.length;Y++){var de=ve[Y];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}ay=!!dS,vS=dS=null}finally{It=A,F.p=_,B.T=m}}h.current=p,Xr=2}}function sk(){if(Xr===2){Xr=0;var h=Ss,p=af,m=(p.flags&8772)!==0;if((p.subtreeFlags&8772)!==0||m){m=B.T,B.T=null;var _=F.p;F.p=2;var A=It;It|=4;try{jE(h,p.alternate,p)}finally{It=A,F.p=_,B.T=m}}Xr=3}}function lk(){if(Xr===4||Xr===3){Xr=0,ft();var h=Ss,p=af,m=of,_=ZE;(p.subtreeFlags&10256)!==0||(p.flags&10256)!==0?Xr=5:(Xr=0,af=Ss=null,uk(h,h.pendingLanes));var A=h.pendingLanes;if(A===0&&(_s=null),bb(m),p=p.stateNode,Bn&&typeof Bn.onCommitFiberRoot=="function")try{Bn.onCommitFiberRoot(dd,p,void 0,(p.current.flags&128)===128)}catch{}if(_!==null){p=B.T,A=F.p,F.p=2,B.T=null;try{for(var L=h.onRecoverableError,j=0;j<_.length;j++){var Y=_[j];L(Y.value,{componentStack:Y.stack})}}finally{B.T=p,F.p=A}}(of&3)!==0&&Wm(),vi(h),A=h.pendingLanes,(m&4194090)!==0&&(A&42)!==0?h===J_?Kd++:(Kd=0,J_=h):Kd=0,Qd(0)}}function uk(h,p){(h.pooledCacheLanes&=p)===0&&(p=h.pooledCache,p!=null&&(h.pooledCache=null,Rd(p)))}function Wm(h){return ok(),sk(),lk(),ck()}function ck(){if(Xr!==5)return!1;var h=Ss,p=K_;K_=0;var m=bb(of),_=B.T,A=F.p;try{F.p=32>m?32:m,B.T=null,m=Q_,Q_=null;var L=Ss,j=of;if(Xr=0,af=Ss=null,of=0,(It&6)!==0)throw Error(n(331));var Y=It;if(It|=4,XE(L.current),UE(L,L.current,j,m),It=Y,Qd(0,!1),Bn&&typeof Bn.onPostCommitFiberRoot=="function")try{Bn.onPostCommitFiberRoot(dd,L)}catch{}return!0}finally{F.p=A,B.T=_,uk(h,p)}}function fk(h,p,m){p=fa(m,p),p=R_(h.stateNode,p,2),h=hs(h,p,2),h!==null&&(pd(h,2),vi(h))}function Ft(h,p,m){if(h.tag===3)fk(h,h,m);else for(;p!==null;){if(p.tag===3){fk(p,h,m);break}else if(p.tag===1){var _=p.stateNode;if(typeof p.type.getDerivedStateFromError=="function"||typeof _.componentDidCatch=="function"&&(_s===null||!_s.has(_))){h=fa(m,h),m=pE(2),_=hs(p,m,2),_!==null&&(gE(m,_,p,h),pd(_,2),vi(_));break}}p=p.return}}function nS(h,p,m){var _=h.pingCache;if(_===null){_=h.pingCache=new bW;var A=new Set;_.set(p,A)}else A=_.get(p),A===void 0&&(A=new Set,_.set(p,A));A.has(m)||(X_=!0,A.add(m),h=CW.bind(null,h,p,m),p.then(h,h))}function CW(h,p,m){var _=h.pingCache;_!==null&&_.delete(p),h.pingedLanes|=h.suspendedLanes&m,h.warmLanes&=~m,Yt===h&&(St&m)===m&&(rr===4||rr===3&&(St&62914560)===St&&300>Ct()-$_?(It&2)===0&&sf(h,0):q_|=m,nf===St&&(nf=0)),vi(h)}function hk(h,p){p===0&&(p=lL()),h=Hc(h,p),h!==null&&(pd(h,p),vi(h))}function AW(h){var p=h.memoizedState,m=0;p!==null&&(m=p.retryLane),hk(h,m)}function MW(h,p){var m=0;switch(h.tag){case 13:var _=h.stateNode,A=h.memoizedState;A!==null&&(m=A.retryLane);break;case 19:_=h.stateNode;break;case 22:_=h.stateNode._retryCache;break;default:throw Error(n(314))}_!==null&&_.delete(p),hk(h,m)}function DW(h,p){return je(h,p)}var Xm=null,uf=null,aS=!1,qm=!1,iS=!1,$l=0;function vi(h){h!==uf&&h.next===null&&(uf===null?Xm=uf=h:uf=uf.next=h),qm=!0,aS||(aS=!0,LW())}function Qd(h,p){if(!iS&&qm){iS=!0;do for(var m=!1,_=Xm;_!==null;){if(h!==0){var A=_.pendingLanes;if(A===0)var L=0;else{var j=_.suspendedLanes,Y=_.pingedLanes;L=(1<<31-Vn(42|h)+1)-1,L&=A&~(j&~Y),L=L&201326741?L&201326741|1:L?L|2:0}L!==0&&(m=!0,gk(_,L))}else L=St,L=em(_,_===Yt?L:0,_.cancelPendingCommit!==null||_.timeoutHandle!==-1),(L&3)===0||vd(_,L)||(m=!0,gk(_,L));_=_.next}while(m);iS=!1}}function NW(){dk()}function dk(){qm=aS=!1;var h=0;$l!==0&&(jW()&&(h=$l),$l=0);for(var p=Ct(),m=null,_=Xm;_!==null;){var A=_.next,L=vk(_,p);L===0?(_.next=null,m===null?Xm=A:m.next=A,A===null&&(uf=m)):(m=_,(h!==0||(L&3)!==0)&&(qm=!0)),_=A}Qd(h)}function vk(h,p){for(var m=h.suspendedLanes,_=h.pingedLanes,A=h.expirationTimes,L=h.pendingLanes&-62914561;0<L;){var j=31-Vn(L),Y=1<<j,Z=A[j];Z===-1?((Y&m)===0||(Y&_)!==0)&&(A[j]=tY(Y,p)):Z<=p&&(h.expiredLanes|=Y),L&=~Y}if(p=Yt,m=St,m=em(h,h===p?m:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),_=h.callbackNode,m===0||h===p&&(Ot===2||Ot===9)||h.cancelPendingCommit!==null)return _!==null&&_!==null&&Ne(_),h.callbackNode=null,h.callbackPriority=0;if((m&3)===0||vd(h,m)){if(p=m&-m,p===h.callbackPriority)return p;switch(_!==null&&Ne(_),bb(m)){case 2:case 8:m=ui;break;case 32:m=Va;break;case 268435456:m=oL;break;default:m=Va}return _=pk.bind(null,h),m=je(m,_),h.callbackPriority=p,h.callbackNode=m,p}return _!==null&&_!==null&&Ne(_),h.callbackPriority=2,h.callbackNode=null,2}function pk(h,p){if(Xr!==0&&Xr!==5)return h.callbackNode=null,h.callbackPriority=0,null;var m=h.callbackNode;if(Wm()&&h.callbackNode!==m)return null;var _=St;return _=em(h,h===Yt?_:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),_===0?null:(KE(h,_,p),vk(h,Ct()),h.callbackNode!=null&&h.callbackNode===m?pk.bind(null,h):null)}function gk(h,p){if(Wm())return null;KE(h,p,!0)}function LW(){VW(function(){(It&6)!==0?je(er,NW):dk()})}function oS(){return $l===0&&($l=sL()),$l}function mk(h){return h==null||typeof h=="symbol"||typeof h=="boolean"?null:typeof h=="function"?h:im(""+h)}function yk(h,p){var m=p.ownerDocument.createElement("input");return m.name=p.name,m.value=p.value,h.id&&m.setAttribute("form",h.id),p.parentNode.insertBefore(m,p),h=new FormData(h),m.parentNode.removeChild(m),h}function RW(h,p,m,_,A){if(p==="submit"&&m&&m.stateNode===A){var L=mk((A[Cn]||null).action),j=_.submitter;j&&(p=(p=j[Cn]||null)?mk(p.formAction):j.getAttribute("formAction"),p!==null&&(L=p,j=null));var Y=new um("action","action",null,_,A);h.push({event:Y,listeners:[{instance:null,listener:function(){if(_.defaultPrevented){if($l!==0){var Z=j?yk(A,j):new FormData(A);A_(m,{pending:!0,data:Z,method:A.method,action:L},null,Z)}}else typeof L=="function"&&(Y.preventDefault(),Z=j?yk(A,j):new FormData(A),A_(m,{pending:!0,data:Z,method:A.method,action:L},L,Z))},currentTarget:A}]})}}for(var sS=0;sS<Yb.length;sS++){var lS=Yb[sS],EW=lS.toLowerCase(),kW=lS[0].toUpperCase()+lS.slice(1);Ga(EW,"on"+kW)}Ga(KL,"onAnimationEnd"),Ga(QL,"onAnimationIteration"),Ga(JL,"onAnimationStart"),Ga("dblclick","onDoubleClick"),Ga("focusin","onFocus"),Ga("focusout","onBlur"),Ga($Y,"onTransitionRun"),Ga(KY,"onTransitionStart"),Ga(QY,"onTransitionCancel"),Ga(eR,"onTransitionEnd"),Ec("onMouseEnter",["mouseout","mouseover"]),Ec("onMouseLeave",["mouseout","mouseover"]),Ec("onPointerEnter",["pointerout","pointerover"]),Ec("onPointerLeave",["pointerout","pointerover"]),Il("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Il("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Il("onBeforeInput",["compositionend","keypress","textInput","paste"]),Il("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Il("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Il("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jd="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(" "),IW=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Jd));function xk(h,p){p=(p&4)!==0;for(var m=0;m<h.length;m++){var _=h[m],A=_.event;_=_.listeners;e:{var L=void 0;if(p)for(var j=_.length-1;0<=j;j--){var Y=_[j],Z=Y.instance,ae=Y.currentTarget;if(Y=Y.listener,Z!==L&&A.isPropagationStopped())break e;L=Y,A.currentTarget=ae;try{L(A)}catch(he){Om(he)}A.currentTarget=null,L=Z}else for(j=0;j<_.length;j++){if(Y=_[j],Z=Y.instance,ae=Y.currentTarget,Y=Y.listener,Z!==L&&A.isPropagationStopped())break e;L=Y,A.currentTarget=ae;try{L(A)}catch(he){Om(he)}A.currentTarget=null,L=Z}}}}function yt(h,p){var m=p[_b];m===void 0&&(m=p[_b]=new Set);var _=h+"__bubble";m.has(_)||(bk(p,h,2,!1),m.add(_))}function uS(h,p,m){var _=0;p&&(_|=4),bk(m,h,_,p)}var Zm="_reactListening"+Math.random().toString(36).slice(2);function cS(h){if(!h[Zm]){h[Zm]=!0,dL.forEach(function(m){m!=="selectionchange"&&(IW.has(m)||uS(m,!1,h),uS(m,!0,h))});var p=h.nodeType===9?h:h.ownerDocument;p===null||p[Zm]||(p[Zm]=!0,uS("selectionchange",!1,p))}}function bk(h,p,m,_){switch(Uk(p)){case 2:var A=sX;break;case 8:A=lX;break;default:A=TS}m=A.bind(null,p,m,h),A=void 0,!Eb||p!=="touchstart"&&p!=="touchmove"&&p!=="wheel"||(A=!0),_?A!==void 0?h.addEventListener(p,m,{capture:!0,passive:A}):h.addEventListener(p,m,!0):A!==void 0?h.addEventListener(p,m,{passive:A}):h.addEventListener(p,m,!1)}function fS(h,p,m,_,A){var L=_;if((p&1)===0&&(p&2)===0&&_!==null)e:for(;;){if(_===null)return;var j=_.tag;if(j===3||j===4){var Y=_.stateNode.containerInfo;if(Y===A)break;if(j===4)for(j=_.return;j!==null;){var Z=j.tag;if((Z===3||Z===4)&&j.stateNode.containerInfo===A)return;j=j.return}for(;Y!==null;){if(j=Nc(Y),j===null)return;if(Z=j.tag,Z===5||Z===6||Z===26||Z===27){_=L=j;continue e}Y=Y.parentNode}}_=_.return}ML(function(){var ae=L,he=Lb(m),ve=[];e:{var se=tR.get(h);if(se!==void 0){var le=um,rt=h;switch(h){case"keypress":if(sm(m)===0)break e;case"keydown":case"keyup":le=DY;break;case"focusin":rt="focus",le=Pb;break;case"focusout":rt="blur",le=Pb;break;case"beforeblur":case"afterblur":le=Pb;break;case"click":if(m.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":le=LL;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=gY;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=RY;break;case KL:case QL:case JL:le=xY;break;case eR:le=kY;break;case"scroll":case"scrollend":le=vY;break;case"wheel":le=OY;break;case"copy":case"cut":case"paste":le=_Y;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=EL;break;case"toggle":case"beforetoggle":le=zY}var Ze=(p&4)!==0,Gt=!Ze&&(h==="scroll"||h==="scrollend"),re=Ze?se!==null?se+"Capture":null:se;Ze=[];for(var Q=ae,ne;Q!==null;){var de=Q;if(ne=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||ne===null||re===null||(de=yd(Q,re),de!=null&&Ze.push(ev(Q,de,ne))),Gt)break;Q=Q.return}0<Ze.length&&(se=new le(se,rt,null,m,he),ve.push({event:se,listeners:Ze}))}}if((p&7)===0){e:{if(se=h==="mouseover"||h==="pointerover",le=h==="mouseout"||h==="pointerout",se&&m!==Nb&&(rt=m.relatedTarget||m.fromElement)&&(Nc(rt)||rt[Dc]))break e;if((le||se)&&(se=he.window===he?he:(se=he.ownerDocument)?se.defaultView||se.parentWindow:window,le?(rt=m.relatedTarget||m.toElement,le=ae,rt=rt?Nc(rt):null,rt!==null&&(Gt=i(rt),Ze=rt.tag,rt!==Gt||Ze!==5&&Ze!==27&&Ze!==6)&&(rt=null)):(le=null,rt=ae),le!==rt)){if(Ze=LL,de="onMouseLeave",re="onMouseEnter",Q="mouse",(h==="pointerout"||h==="pointerover")&&(Ze=EL,de="onPointerLeave",re="onPointerEnter",Q="pointer"),Gt=le==null?se:md(le),ne=rt==null?se:md(rt),se=new Ze(de,Q+"leave",le,m,he),se.target=Gt,se.relatedTarget=ne,de=null,Nc(he)===ae&&(Ze=new Ze(re,Q+"enter",rt,m,he),Ze.target=ne,Ze.relatedTarget=Gt,de=Ze),Gt=de,le&&rt)t:{for(Ze=le,re=rt,Q=0,ne=Ze;ne;ne=cf(ne))Q++;for(ne=0,de=re;de;de=cf(de))ne++;for(;0<Q-ne;)Ze=cf(Ze),Q--;for(;0<ne-Q;)re=cf(re),ne--;for(;Q--;){if(Ze===re||re!==null&&Ze===re.alternate)break t;Ze=cf(Ze),re=cf(re)}Ze=null}else Ze=null;le!==null&&_k(ve,se,le,Ze,!1),rt!==null&&Gt!==null&&_k(ve,Gt,rt,Ze,!0)}}e:{if(se=ae?md(ae):window,le=se.nodeName&&se.nodeName.toLowerCase(),le==="select"||le==="input"&&se.type==="file")var Be=VL;else if(jL(se))if(GL)Be=XY;else{Be=YY;var vt=UY}else le=se.nodeName,!le||le.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?ae&&Db(ae.elementType)&&(Be=VL):Be=WY;if(Be&&(Be=Be(h,ae))){BL(ve,Be,m,he);break e}vt&&vt(h,se,ae),h==="focusout"&&ae&&se.type==="number"&&ae.memoizedProps.value!=null&&Mb(se,"number",se.value)}switch(vt=ae?md(ae):window,h){case"focusin":(jL(vt)||vt.contentEditable==="true")&&(Bc=vt,Hb=ae,Ad=null);break;case"focusout":Ad=Hb=Bc=null;break;case"mousedown":Fb=!0;break;case"contextmenu":case"mouseup":case"dragend":Fb=!1,ZL(ve,m,he);break;case"selectionchange":if(ZY)break;case"keydown":case"keyup":ZL(ve,m,he)}var Ue;if(jb)e:{switch(h){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else jc?PL(h,m)&&(Ke="onCompositionEnd"):h==="keydown"&&m.keyCode===229&&(Ke="onCompositionStart");Ke&&(kL&&m.locale!=="ko"&&(jc||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&jc&&(Ue=DL()):(ls=he,kb="value"in ls?ls.value:ls.textContent,jc=!0)),vt=$m(ae,Ke),0<vt.length&&(Ke=new RL(Ke,h,null,m,he),ve.push({event:Ke,listeners:vt}),Ue?Ke.data=Ue:(Ue=zL(m),Ue!==null&&(Ke.data=Ue)))),(Ue=BY?VY(h,m):GY(h,m))&&(Ke=$m(ae,"onBeforeInput"),0<Ke.length&&(vt=new RL("onBeforeInput","beforeinput",null,m,he),ve.push({event:vt,listeners:Ke}),vt.data=Ue)),RW(ve,h,ae,m,he)}xk(ve,p)})}function ev(h,p,m){return{instance:h,listener:p,currentTarget:m}}function $m(h,p){for(var m=p+"Capture",_=[];h!==null;){var A=h,L=A.stateNode;if(A=A.tag,A!==5&&A!==26&&A!==27||L===null||(A=yd(h,m),A!=null&&_.unshift(ev(h,A,L)),A=yd(h,p),A!=null&&_.push(ev(h,A,L))),h.tag===3)return _;h=h.return}return[]}function cf(h){if(h===null)return null;do h=h.return;while(h&&h.tag!==5&&h.tag!==27);return h||null}function _k(h,p,m,_,A){for(var L=p._reactName,j=[];m!==null&&m!==_;){var Y=m,Z=Y.alternate,ae=Y.stateNode;if(Y=Y.tag,Z!==null&&Z===_)break;Y!==5&&Y!==26&&Y!==27||ae===null||(Z=ae,A?(ae=yd(m,L),ae!=null&&j.unshift(ev(m,ae,Z))):A||(ae=yd(m,L),ae!=null&&j.push(ev(m,ae,Z)))),m=m.return}j.length!==0&&h.push({event:p,listeners:j})}var OW=/\r\n?/g,PW=/\u0000|\uFFFD/g;function Sk(h){return(typeof h=="string"?h:""+h).replace(OW,`
49
- `).replace(PW,"")}function wk(h,p){return p=Sk(p),Sk(h)===p}function Km(){}function Vt(h,p,m,_,A,L){switch(m){case"children":typeof _=="string"?p==="body"||p==="textarea"&&_===""||Oc(h,_):(typeof _=="number"||typeof _=="bigint")&&p!=="body"&&Oc(h,""+_);break;case"className":rm(h,"class",_);break;case"tabIndex":rm(h,"tabindex",_);break;case"dir":case"role":case"viewBox":case"width":case"height":rm(h,m,_);break;case"style":CL(h,_,L);break;case"data":if(p!=="object"){rm(h,"data",_);break}case"src":case"href":if(_===""&&(p!=="a"||m!=="href")){h.removeAttribute(m);break}if(_==null||typeof _=="function"||typeof _=="symbol"||typeof _=="boolean"){h.removeAttribute(m);break}_=im(""+_),h.setAttribute(m,_);break;case"action":case"formAction":if(typeof _=="function"){h.setAttribute(m,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof L=="function"&&(m==="formAction"?(p!=="input"&&Vt(h,p,"name",A.name,A,null),Vt(h,p,"formEncType",A.formEncType,A,null),Vt(h,p,"formMethod",A.formMethod,A,null),Vt(h,p,"formTarget",A.formTarget,A,null)):(Vt(h,p,"encType",A.encType,A,null),Vt(h,p,"method",A.method,A,null),Vt(h,p,"target",A.target,A,null)));if(_==null||typeof _=="symbol"||typeof _=="boolean"){h.removeAttribute(m);break}_=im(""+_),h.setAttribute(m,_);break;case"onClick":_!=null&&(h.onclick=Km);break;case"onScroll":_!=null&&yt("scroll",h);break;case"onScrollEnd":_!=null&&yt("scrollend",h);break;case"dangerouslySetInnerHTML":if(_!=null){if(typeof _!="object"||!("__html"in _))throw Error(n(61));if(m=_.__html,m!=null){if(A.children!=null)throw Error(n(60));h.innerHTML=m}}break;case"multiple":h.multiple=_&&typeof _!="function"&&typeof _!="symbol";break;case"muted":h.muted=_&&typeof _!="function"&&typeof _!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(_==null||typeof _=="function"||typeof _=="boolean"||typeof _=="symbol"){h.removeAttribute("xlink:href");break}m=im(""+_),h.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",m);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":_!=null&&typeof _!="function"&&typeof _!="symbol"?h.setAttribute(m,""+_):h.removeAttribute(m);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":_&&typeof _!="function"&&typeof _!="symbol"?h.setAttribute(m,""):h.removeAttribute(m);break;case"capture":case"download":_===!0?h.setAttribute(m,""):_!==!1&&_!=null&&typeof _!="function"&&typeof _!="symbol"?h.setAttribute(m,_):h.removeAttribute(m);break;case"cols":case"rows":case"size":case"span":_!=null&&typeof _!="function"&&typeof _!="symbol"&&!isNaN(_)&&1<=_?h.setAttribute(m,_):h.removeAttribute(m);break;case"rowSpan":case"start":_==null||typeof _=="function"||typeof _=="symbol"||isNaN(_)?h.removeAttribute(m):h.setAttribute(m,_);break;case"popover":yt("beforetoggle",h),yt("toggle",h),tm(h,"popover",_);break;case"xlinkActuate":ro(h,"http://www.w3.org/1999/xlink","xlink:actuate",_);break;case"xlinkArcrole":ro(h,"http://www.w3.org/1999/xlink","xlink:arcrole",_);break;case"xlinkRole":ro(h,"http://www.w3.org/1999/xlink","xlink:role",_);break;case"xlinkShow":ro(h,"http://www.w3.org/1999/xlink","xlink:show",_);break;case"xlinkTitle":ro(h,"http://www.w3.org/1999/xlink","xlink:title",_);break;case"xlinkType":ro(h,"http://www.w3.org/1999/xlink","xlink:type",_);break;case"xmlBase":ro(h,"http://www.w3.org/XML/1998/namespace","xml:base",_);break;case"xmlLang":ro(h,"http://www.w3.org/XML/1998/namespace","xml:lang",_);break;case"xmlSpace":ro(h,"http://www.w3.org/XML/1998/namespace","xml:space",_);break;case"is":tm(h,"is",_);break;case"innerText":case"textContent":break;default:(!(2<m.length)||m[0]!=="o"&&m[0]!=="O"||m[1]!=="n"&&m[1]!=="N")&&(m=hY.get(m)||m,tm(h,m,_))}}function hS(h,p,m,_,A,L){switch(m){case"style":CL(h,_,L);break;case"dangerouslySetInnerHTML":if(_!=null){if(typeof _!="object"||!("__html"in _))throw Error(n(61));if(m=_.__html,m!=null){if(A.children!=null)throw Error(n(60));h.innerHTML=m}}break;case"children":typeof _=="string"?Oc(h,_):(typeof _=="number"||typeof _=="bigint")&&Oc(h,""+_);break;case"onScroll":_!=null&&yt("scroll",h);break;case"onScrollEnd":_!=null&&yt("scrollend",h);break;case"onClick":_!=null&&(h.onclick=Km);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vL.hasOwnProperty(m))e:{if(m[0]==="o"&&m[1]==="n"&&(A=m.endsWith("Capture"),p=m.slice(2,A?m.length-7:void 0),L=h[Cn]||null,L=L!=null?L[m]:null,typeof L=="function"&&h.removeEventListener(p,L,A),typeof _=="function")){typeof L!="function"&&L!==null&&(m in h?h[m]=null:h.hasAttribute(m)&&h.removeAttribute(m)),h.addEventListener(p,_,A);break e}m in h?h[m]=_:_===!0?h.setAttribute(m,""):tm(h,m,_)}}}function qr(h,p,m){switch(p){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":yt("error",h),yt("load",h);var _=!1,A=!1,L;for(L in m)if(m.hasOwnProperty(L)){var j=m[L];if(j!=null)switch(L){case"src":_=!0;break;case"srcSet":A=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,p));default:Vt(h,p,L,j,m,null)}}A&&Vt(h,p,"srcSet",m.srcSet,m,null),_&&Vt(h,p,"src",m.src,m,null);return;case"input":yt("invalid",h);var Y=L=j=A=null,Z=null,ae=null;for(_ in m)if(m.hasOwnProperty(_)){var he=m[_];if(he!=null)switch(_){case"name":A=he;break;case"type":j=he;break;case"checked":Z=he;break;case"defaultChecked":ae=he;break;case"value":L=he;break;case"defaultValue":Y=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(n(137,p));break;default:Vt(h,p,_,he,m,null)}}_L(h,L,Y,Z,ae,j,A,!1),nm(h);return;case"select":yt("invalid",h),_=j=L=null;for(A in m)if(m.hasOwnProperty(A)&&(Y=m[A],Y!=null))switch(A){case"value":L=Y;break;case"defaultValue":j=Y;break;case"multiple":_=Y;default:Vt(h,p,A,Y,m,null)}p=L,m=j,h.multiple=!!_,p!=null?Ic(h,!!_,p,!1):m!=null&&Ic(h,!!_,m,!0);return;case"textarea":yt("invalid",h),L=A=_=null;for(j in m)if(m.hasOwnProperty(j)&&(Y=m[j],Y!=null))switch(j){case"value":_=Y;break;case"defaultValue":A=Y;break;case"children":L=Y;break;case"dangerouslySetInnerHTML":if(Y!=null)throw Error(n(91));break;default:Vt(h,p,j,Y,m,null)}wL(h,_,A,L),nm(h);return;case"option":for(Z in m)if(m.hasOwnProperty(Z)&&(_=m[Z],_!=null))switch(Z){case"selected":h.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:Vt(h,p,Z,_,m,null)}return;case"dialog":yt("beforetoggle",h),yt("toggle",h),yt("cancel",h),yt("close",h);break;case"iframe":case"object":yt("load",h);break;case"video":case"audio":for(_=0;_<Jd.length;_++)yt(Jd[_],h);break;case"image":yt("error",h),yt("load",h);break;case"details":yt("toggle",h);break;case"embed":case"source":case"link":yt("error",h),yt("load",h);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in m)if(m.hasOwnProperty(ae)&&(_=m[ae],_!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,p));default:Vt(h,p,ae,_,m,null)}return;default:if(Db(p)){for(he in m)m.hasOwnProperty(he)&&(_=m[he],_!==void 0&&hS(h,p,he,_,m,void 0));return}}for(Y in m)m.hasOwnProperty(Y)&&(_=m[Y],_!=null&&Vt(h,p,Y,_,m,null))}function zW(h,p,m,_){switch(p){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var A=null,L=null,j=null,Y=null,Z=null,ae=null,he=null;for(le in m){var ve=m[le];if(m.hasOwnProperty(le)&&ve!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":Z=ve;default:_.hasOwnProperty(le)||Vt(h,p,le,null,_,ve)}}for(var se in _){var le=_[se];if(ve=m[se],_.hasOwnProperty(se)&&(le!=null||ve!=null))switch(se){case"type":L=le;break;case"name":A=le;break;case"checked":ae=le;break;case"defaultChecked":he=le;break;case"value":j=le;break;case"defaultValue":Y=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(n(137,p));break;default:le!==ve&&Vt(h,p,se,le,_,ve)}}Ab(h,j,Y,Z,ae,he,L,A);return;case"select":le=j=Y=se=null;for(L in m)if(Z=m[L],m.hasOwnProperty(L)&&Z!=null)switch(L){case"value":break;case"multiple":le=Z;default:_.hasOwnProperty(L)||Vt(h,p,L,null,_,Z)}for(A in _)if(L=_[A],Z=m[A],_.hasOwnProperty(A)&&(L!=null||Z!=null))switch(A){case"value":se=L;break;case"defaultValue":Y=L;break;case"multiple":j=L;default:L!==Z&&Vt(h,p,A,L,_,Z)}p=Y,m=j,_=le,se!=null?Ic(h,!!m,se,!1):!!_!=!!m&&(p!=null?Ic(h,!!m,p,!0):Ic(h,!!m,m?[]:"",!1));return;case"textarea":le=se=null;for(Y in m)if(A=m[Y],m.hasOwnProperty(Y)&&A!=null&&!_.hasOwnProperty(Y))switch(Y){case"value":break;case"children":break;default:Vt(h,p,Y,null,_,A)}for(j in _)if(A=_[j],L=m[j],_.hasOwnProperty(j)&&(A!=null||L!=null))switch(j){case"value":se=A;break;case"defaultValue":le=A;break;case"children":break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(n(91));break;default:A!==L&&Vt(h,p,j,A,_,L)}SL(h,se,le);return;case"option":for(var rt in m)if(se=m[rt],m.hasOwnProperty(rt)&&se!=null&&!_.hasOwnProperty(rt))switch(rt){case"selected":h.selected=!1;break;default:Vt(h,p,rt,null,_,se)}for(Z in _)if(se=_[Z],le=m[Z],_.hasOwnProperty(Z)&&se!==le&&(se!=null||le!=null))switch(Z){case"selected":h.selected=se&&typeof se!="function"&&typeof se!="symbol";break;default:Vt(h,p,Z,se,_,le)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ze in m)se=m[Ze],m.hasOwnProperty(Ze)&&se!=null&&!_.hasOwnProperty(Ze)&&Vt(h,p,Ze,null,_,se);for(ae in _)if(se=_[ae],le=m[ae],_.hasOwnProperty(ae)&&se!==le&&(se!=null||le!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(n(137,p));break;default:Vt(h,p,ae,se,_,le)}return;default:if(Db(p)){for(var Gt in m)se=m[Gt],m.hasOwnProperty(Gt)&&se!==void 0&&!_.hasOwnProperty(Gt)&&hS(h,p,Gt,void 0,_,se);for(he in _)se=_[he],le=m[he],!_.hasOwnProperty(he)||se===le||se===void 0&&le===void 0||hS(h,p,he,se,_,le);return}}for(var re in m)se=m[re],m.hasOwnProperty(re)&&se!=null&&!_.hasOwnProperty(re)&&Vt(h,p,re,null,_,se);for(ve in _)se=_[ve],le=m[ve],!_.hasOwnProperty(ve)||se===le||se==null&&le==null||Vt(h,p,ve,se,_,le)}var dS=null,vS=null;function Qm(h){return h.nodeType===9?h:h.ownerDocument}function Tk(h){switch(h){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ck(h,p){if(h===0)switch(p){case"svg":return 1;case"math":return 2;default:return 0}return h===1&&p==="foreignObject"?0:h}function pS(h,p){return h==="textarea"||h==="noscript"||typeof p.children=="string"||typeof p.children=="number"||typeof p.children=="bigint"||typeof p.dangerouslySetInnerHTML=="object"&&p.dangerouslySetInnerHTML!==null&&p.dangerouslySetInnerHTML.__html!=null}var gS=null;function jW(){var h=window.event;return h&&h.type==="popstate"?h===gS?!1:(gS=h,!0):(gS=null,!1)}var Ak=typeof setTimeout=="function"?setTimeout:void 0,BW=typeof clearTimeout=="function"?clearTimeout:void 0,Mk=typeof Promise=="function"?Promise:void 0,VW=typeof queueMicrotask=="function"?queueMicrotask:typeof Mk<"u"?function(h){return Mk.resolve(null).then(h).catch(GW)}:Ak;function GW(h){setTimeout(function(){throw h})}function Ts(h){return h==="head"}function Dk(h,p){var m=p,_=0,A=0;do{var L=m.nextSibling;if(h.removeChild(m),L&&L.nodeType===8)if(m=L.data,m==="/$"){if(0<_&&8>_){m=_;var j=h.ownerDocument;if(m&1&&tv(j.documentElement),m&2&&tv(j.body),m&4)for(m=j.head,tv(m),j=m.firstChild;j;){var Y=j.nextSibling,Z=j.nodeName;j[gd]||Z==="SCRIPT"||Z==="STYLE"||Z==="LINK"&&j.rel.toLowerCase()==="stylesheet"||m.removeChild(j),j=Y}}if(A===0){h.removeChild(L),uv(p);return}A--}else m==="$"||m==="$?"||m==="$!"?A++:_=m.charCodeAt(0)-48;else _=0;m=L}while(m);uv(p)}function mS(h){var p=h.firstChild;for(p&&p.nodeType===10&&(p=p.nextSibling);p;){var m=p;switch(p=p.nextSibling,m.nodeName){case"HTML":case"HEAD":case"BODY":mS(m),Sb(m);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(m.rel.toLowerCase()==="stylesheet")continue}h.removeChild(m)}}function HW(h,p,m,_){for(;h.nodeType===1;){var A=m;if(h.nodeName.toLowerCase()!==p.toLowerCase()){if(!_&&(h.nodeName!=="INPUT"||h.type!=="hidden"))break}else if(_){if(!h[gd])switch(p){case"meta":if(!h.hasAttribute("itemprop"))break;return h;case"link":if(L=h.getAttribute("rel"),L==="stylesheet"&&h.hasAttribute("data-precedence"))break;if(L!==A.rel||h.getAttribute("href")!==(A.href==null||A.href===""?null:A.href)||h.getAttribute("crossorigin")!==(A.crossOrigin==null?null:A.crossOrigin)||h.getAttribute("title")!==(A.title==null?null:A.title))break;return h;case"style":if(h.hasAttribute("data-precedence"))break;return h;case"script":if(L=h.getAttribute("src"),(L!==(A.src==null?null:A.src)||h.getAttribute("type")!==(A.type==null?null:A.type)||h.getAttribute("crossorigin")!==(A.crossOrigin==null?null:A.crossOrigin))&&L&&h.hasAttribute("async")&&!h.hasAttribute("itemprop"))break;return h;default:return h}}else if(p==="input"&&h.type==="hidden"){var L=A.name==null?null:""+A.name;if(A.type==="hidden"&&h.getAttribute("name")===L)return h}else return h;if(h=Fa(h.nextSibling),h===null)break}return null}function FW(h,p,m){if(p==="")return null;for(;h.nodeType!==3;)if((h.nodeType!==1||h.nodeName!=="INPUT"||h.type!=="hidden")&&!m||(h=Fa(h.nextSibling),h===null))return null;return h}function yS(h){return h.data==="$!"||h.data==="$?"&&h.ownerDocument.readyState==="complete"}function UW(h,p){var m=h.ownerDocument;if(h.data!=="$?"||m.readyState==="complete")p();else{var _=function(){p(),m.removeEventListener("DOMContentLoaded",_)};m.addEventListener("DOMContentLoaded",_),h._reactRetry=_}}function Fa(h){for(;h!=null;h=h.nextSibling){var p=h.nodeType;if(p===1||p===3)break;if(p===8){if(p=h.data,p==="$"||p==="$!"||p==="$?"||p==="F!"||p==="F")break;if(p==="/$")return null}}return h}var xS=null;function Nk(h){h=h.previousSibling;for(var p=0;h;){if(h.nodeType===8){var m=h.data;if(m==="$"||m==="$!"||m==="$?"){if(p===0)return h;p--}else m==="/$"&&p++}h=h.previousSibling}return null}function Lk(h,p,m){switch(p=Qm(m),h){case"html":if(h=p.documentElement,!h)throw Error(n(452));return h;case"head":if(h=p.head,!h)throw Error(n(453));return h;case"body":if(h=p.body,!h)throw Error(n(454));return h;default:throw Error(n(451))}}function tv(h){for(var p=h.attributes;p.length;)h.removeAttributeNode(p[0]);Sb(h)}var ma=new Map,Rk=new Set;function Jm(h){return typeof h.getRootNode=="function"?h.getRootNode():h.nodeType===9?h:h.ownerDocument}var mo=F.d;F.d={f:YW,r:WW,D:XW,C:qW,L:ZW,m:$W,X:QW,S:KW,M:JW};function YW(){var h=mo.f(),p=Um();return h||p}function WW(h){var p=Lc(h);p!==null&&p.tag===5&&p.type==="form"?KR(p):mo.r(h)}var ff=typeof document>"u"?null:document;function Ek(h,p,m){var _=ff;if(_&&typeof p=="string"&&p){var A=ca(p);A='link[rel="'+h+'"][href="'+A+'"]',typeof m=="string"&&(A+='[crossorigin="'+m+'"]'),Rk.has(A)||(Rk.add(A),h={rel:h,crossOrigin:m,href:p},_.querySelector(A)===null&&(p=_.createElement("link"),qr(p,"link",h),Ir(p),_.head.appendChild(p)))}}function XW(h){mo.D(h),Ek("dns-prefetch",h,null)}function qW(h,p){mo.C(h,p),Ek("preconnect",h,p)}function ZW(h,p,m){mo.L(h,p,m);var _=ff;if(_&&h&&p){var A='link[rel="preload"][as="'+ca(p)+'"]';p==="image"&&m&&m.imageSrcSet?(A+='[imagesrcset="'+ca(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(A+='[imagesizes="'+ca(m.imageSizes)+'"]')):A+='[href="'+ca(h)+'"]';var L=A;switch(p){case"style":L=hf(h);break;case"script":L=df(h)}ma.has(L)||(h=c({rel:"preload",href:p==="image"&&m&&m.imageSrcSet?void 0:h,as:p},m),ma.set(L,h),_.querySelector(A)!==null||p==="style"&&_.querySelector(rv(L))||p==="script"&&_.querySelector(nv(L))||(p=_.createElement("link"),qr(p,"link",h),Ir(p),_.head.appendChild(p)))}}function $W(h,p){mo.m(h,p);var m=ff;if(m&&h){var _=p&&typeof p.as=="string"?p.as:"script",A='link[rel="modulepreload"][as="'+ca(_)+'"][href="'+ca(h)+'"]',L=A;switch(_){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":L=df(h)}if(!ma.has(L)&&(h=c({rel:"modulepreload",href:h},p),ma.set(L,h),m.querySelector(A)===null)){switch(_){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(nv(L)))return}_=m.createElement("link"),qr(_,"link",h),Ir(_),m.head.appendChild(_)}}}function KW(h,p,m){mo.S(h,p,m);var _=ff;if(_&&h){var A=Rc(_).hoistableStyles,L=hf(h);p=p||"default";var j=A.get(L);if(!j){var Y={loading:0,preload:null};if(j=_.querySelector(rv(L)))Y.loading=5;else{h=c({rel:"stylesheet",href:h,"data-precedence":p},m),(m=ma.get(L))&&bS(h,m);var Z=j=_.createElement("link");Ir(Z),qr(Z,"link",h),Z._p=new Promise(function(ae,he){Z.onload=ae,Z.onerror=he}),Z.addEventListener("load",function(){Y.loading|=1}),Z.addEventListener("error",function(){Y.loading|=2}),Y.loading|=4,ey(j,p,_)}j={type:"stylesheet",instance:j,count:1,state:Y},A.set(L,j)}}}function QW(h,p){mo.X(h,p);var m=ff;if(m&&h){var _=Rc(m).hoistableScripts,A=df(h),L=_.get(A);L||(L=m.querySelector(nv(A)),L||(h=c({src:h,async:!0},p),(p=ma.get(A))&&_S(h,p),L=m.createElement("script"),Ir(L),qr(L,"link",h),m.head.appendChild(L)),L={type:"script",instance:L,count:1,state:null},_.set(A,L))}}function JW(h,p){mo.M(h,p);var m=ff;if(m&&h){var _=Rc(m).hoistableScripts,A=df(h),L=_.get(A);L||(L=m.querySelector(nv(A)),L||(h=c({src:h,async:!0,type:"module"},p),(p=ma.get(A))&&_S(h,p),L=m.createElement("script"),Ir(L),qr(L,"link",h),m.head.appendChild(L)),L={type:"script",instance:L,count:1,state:null},_.set(A,L))}}function kk(h,p,m,_){var A=(A=Se.current)?Jm(A):null;if(!A)throw Error(n(446));switch(h){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(p=hf(m.href),m=Rc(A).hoistableStyles,_=m.get(p),_||(_={type:"style",instance:null,count:0,state:null},m.set(p,_)),_):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){h=hf(m.href);var L=Rc(A).hoistableStyles,j=L.get(h);if(j||(A=A.ownerDocument||A,j={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},L.set(h,j),(L=A.querySelector(rv(h)))&&!L._p&&(j.instance=L,j.state.loading=5),ma.has(h)||(m={rel:"preload",as:"style",href:m.href,crossOrigin:m.crossOrigin,integrity:m.integrity,media:m.media,hrefLang:m.hrefLang,referrerPolicy:m.referrerPolicy},ma.set(h,m),L||eX(A,h,m,j.state))),p&&_===null)throw Error(n(528,""));return j}if(p&&_!==null)throw Error(n(529,""));return null;case"script":return p=m.async,m=m.src,typeof m=="string"&&p&&typeof p!="function"&&typeof p!="symbol"?(p=df(m),m=Rc(A).hoistableScripts,_=m.get(p),_||(_={type:"script",instance:null,count:0,state:null},m.set(p,_)),_):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,h))}}function hf(h){return'href="'+ca(h)+'"'}function rv(h){return'link[rel="stylesheet"]['+h+"]"}function Ik(h){return c({},h,{"data-precedence":h.precedence,precedence:null})}function eX(h,p,m,_){h.querySelector('link[rel="preload"][as="style"]['+p+"]")?_.loading=1:(p=h.createElement("link"),_.preload=p,p.addEventListener("load",function(){return _.loading|=1}),p.addEventListener("error",function(){return _.loading|=2}),qr(p,"link",m),Ir(p),h.head.appendChild(p))}function df(h){return'[src="'+ca(h)+'"]'}function nv(h){return"script[async]"+h}function Ok(h,p,m){if(p.count++,p.instance===null)switch(p.type){case"style":var _=h.querySelector('style[data-href~="'+ca(m.href)+'"]');if(_)return p.instance=_,Ir(_),_;var A=c({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return _=(h.ownerDocument||h).createElement("style"),Ir(_),qr(_,"style",A),ey(_,m.precedence,h),p.instance=_;case"stylesheet":A=hf(m.href);var L=h.querySelector(rv(A));if(L)return p.state.loading|=4,p.instance=L,Ir(L),L;_=Ik(m),(A=ma.get(A))&&bS(_,A),L=(h.ownerDocument||h).createElement("link"),Ir(L);var j=L;return j._p=new Promise(function(Y,Z){j.onload=Y,j.onerror=Z}),qr(L,"link",_),p.state.loading|=4,ey(L,m.precedence,h),p.instance=L;case"script":return L=df(m.src),(A=h.querySelector(nv(L)))?(p.instance=A,Ir(A),A):(_=m,(A=ma.get(L))&&(_=c({},m),_S(_,A)),h=h.ownerDocument||h,A=h.createElement("script"),Ir(A),qr(A,"link",_),h.head.appendChild(A),p.instance=A);case"void":return null;default:throw Error(n(443,p.type))}else p.type==="stylesheet"&&(p.state.loading&4)===0&&(_=p.instance,p.state.loading|=4,ey(_,m.precedence,h));return p.instance}function ey(h,p,m){for(var _=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),A=_.length?_[_.length-1]:null,L=A,j=0;j<_.length;j++){var Y=_[j];if(Y.dataset.precedence===p)L=Y;else if(L!==A)break}L?L.parentNode.insertBefore(h,L.nextSibling):(p=m.nodeType===9?m.head:m,p.insertBefore(h,p.firstChild))}function bS(h,p){h.crossOrigin==null&&(h.crossOrigin=p.crossOrigin),h.referrerPolicy==null&&(h.referrerPolicy=p.referrerPolicy),h.title==null&&(h.title=p.title)}function _S(h,p){h.crossOrigin==null&&(h.crossOrigin=p.crossOrigin),h.referrerPolicy==null&&(h.referrerPolicy=p.referrerPolicy),h.integrity==null&&(h.integrity=p.integrity)}var ty=null;function Pk(h,p,m){if(ty===null){var _=new Map,A=ty=new Map;A.set(m,_)}else A=ty,_=A.get(m),_||(_=new Map,A.set(m,_));if(_.has(h))return _;for(_.set(h,null),m=m.getElementsByTagName(h),A=0;A<m.length;A++){var L=m[A];if(!(L[gd]||L[an]||h==="link"&&L.getAttribute("rel")==="stylesheet")&&L.namespaceURI!=="http://www.w3.org/2000/svg"){var j=L.getAttribute(p)||"";j=h+j;var Y=_.get(j);Y?Y.push(L):_.set(j,[L])}}return _}function zk(h,p,m){h=h.ownerDocument||h,h.head.insertBefore(m,p==="title"?h.querySelector("head > title"):null)}function tX(h,p,m){if(m===1||p.itemProp!=null)return!1;switch(h){case"meta":case"title":return!0;case"style":if(typeof p.precedence!="string"||typeof p.href!="string"||p.href==="")break;return!0;case"link":if(typeof p.rel!="string"||typeof p.href!="string"||p.href===""||p.onLoad||p.onError)break;switch(p.rel){case"stylesheet":return h=p.disabled,typeof p.precedence=="string"&&h==null;default:return!0}case"script":if(p.async&&typeof p.async!="function"&&typeof p.async!="symbol"&&!p.onLoad&&!p.onError&&p.src&&typeof p.src=="string")return!0}return!1}function jk(h){return!(h.type==="stylesheet"&&(h.state.loading&3)===0)}var av=null;function rX(){}function nX(h,p,m){if(av===null)throw Error(n(475));var _=av;if(p.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var A=hf(m.href),L=h.querySelector(rv(A));if(L){h=L._p,h!==null&&typeof h=="object"&&typeof h.then=="function"&&(_.count++,_=ry.bind(_),h.then(_,_)),p.state.loading|=4,p.instance=L,Ir(L);return}L=h.ownerDocument||h,m=Ik(m),(A=ma.get(A))&&bS(m,A),L=L.createElement("link"),Ir(L);var j=L;j._p=new Promise(function(Y,Z){j.onload=Y,j.onerror=Z}),qr(L,"link",m),p.instance=L}_.stylesheets===null&&(_.stylesheets=new Map),_.stylesheets.set(p,h),(h=p.state.preload)&&(p.state.loading&3)===0&&(_.count++,p=ry.bind(_),h.addEventListener("load",p),h.addEventListener("error",p))}}function aX(){if(av===null)throw Error(n(475));var h=av;return h.stylesheets&&h.count===0&&SS(h,h.stylesheets),0<h.count?function(p){var m=setTimeout(function(){if(h.stylesheets&&SS(h,h.stylesheets),h.unsuspend){var _=h.unsuspend;h.unsuspend=null,_()}},6e4);return h.unsuspend=p,function(){h.unsuspend=null,clearTimeout(m)}}:null}function ry(){if(this.count--,this.count===0){if(this.stylesheets)SS(this,this.stylesheets);else if(this.unsuspend){var h=this.unsuspend;this.unsuspend=null,h()}}}var ny=null;function SS(h,p){h.stylesheets=null,h.unsuspend!==null&&(h.count++,ny=new Map,p.forEach(iX,h),ny=null,ry.call(h))}function iX(h,p){if(!(p.state.loading&4)){var m=ny.get(h);if(m)var _=m.get(null);else{m=new Map,ny.set(h,m);for(var A=h.querySelectorAll("link[data-precedence],style[data-precedence]"),L=0;L<A.length;L++){var j=A[L];(j.nodeName==="LINK"||j.getAttribute("media")!=="not all")&&(m.set(j.dataset.precedence,j),_=j)}_&&m.set(null,_)}A=p.instance,j=A.getAttribute("data-precedence"),L=m.get(j)||_,L===_&&m.set(null,A),m.set(j,A),this.count++,_=ry.bind(this),A.addEventListener("load",_),A.addEventListener("error",_),L?L.parentNode.insertBefore(A,L.nextSibling):(h=h.nodeType===9?h.head:h,h.insertBefore(A,h.firstChild)),p.state.loading|=4}}var iv={$$typeof:T,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function oX(h,p,m,_,A,L,j,Y){this.tag=1,this.containerInfo=h,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=yb(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yb(0),this.hiddenUpdates=yb(null),this.identifierPrefix=_,this.onUncaughtError=A,this.onCaughtError=L,this.onRecoverableError=j,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function Bk(h,p,m,_,A,L,j,Y,Z,ae,he,ve){return h=new oX(h,p,m,j,Y,Z,ae,ve),p=1,L===!0&&(p|=24),L=Hn(3,null,null,p),h.current=L,L.stateNode=h,p=n_(),p.refCount++,h.pooledCache=p,p.refCount++,L.memoizedState={element:_,isDehydrated:m,cache:p},s_(L),h}function Vk(h){return h?(h=Fc,h):Fc}function Gk(h,p,m,_,A,L){A=Vk(A),_.context===null?_.context=A:_.pendingContext=A,_=fs(p),_.payload={element:m},L=L===void 0?null:L,L!==null&&(_.callback=L),m=hs(h,_,p),m!==null&&(Xn(m,h,p),Od(m,h,p))}function Hk(h,p){if(h=h.memoizedState,h!==null&&h.dehydrated!==null){var m=h.retryLane;h.retryLane=m!==0&&m<p?m:p}}function wS(h,p){Hk(h,p),(h=h.alternate)&&Hk(h,p)}function Fk(h){if(h.tag===13){var p=Hc(h,67108864);p!==null&&Xn(p,h,67108864),wS(h,67108864)}}var ay=!0;function sX(h,p,m,_){var A=B.T;B.T=null;var L=F.p;try{F.p=2,TS(h,p,m,_)}finally{F.p=L,B.T=A}}function lX(h,p,m,_){var A=B.T;B.T=null;var L=F.p;try{F.p=8,TS(h,p,m,_)}finally{F.p=L,B.T=A}}function TS(h,p,m,_){if(ay){var A=CS(_);if(A===null)fS(h,p,_,iy,m),Yk(h,_);else if(cX(A,h,p,m,_))_.stopPropagation();else if(Yk(h,_),p&4&&-1<uX.indexOf(h)){for(;A!==null;){var L=Lc(A);if(L!==null)switch(L.tag){case 3:if(L=L.stateNode,L.current.memoizedState.isDehydrated){var j=kl(L.pendingLanes);if(j!==0){var Y=L;for(Y.pendingLanes|=2,Y.entangledLanes|=2;j;){var Z=1<<31-Vn(j);Y.entanglements[1]|=Z,j&=~Z}vi(L),(It&6)===0&&(Hm=Ct()+500,Qd(0))}}break;case 13:Y=Hc(L,2),Y!==null&&Xn(Y,L,2),Um(),wS(L,2)}if(L=CS(_),L===null&&fS(h,p,_,iy,m),L===A)break;A=L}A!==null&&_.stopPropagation()}else fS(h,p,_,null,m)}}function CS(h){return h=Lb(h),AS(h)}var iy=null;function AS(h){if(iy=null,h=Nc(h),h!==null){var p=i(h);if(p===null)h=null;else{var m=p.tag;if(m===13){if(h=o(p),h!==null)return h;h=null}else if(m===3){if(p.stateNode.current.memoizedState.isDehydrated)return p.tag===3?p.stateNode.containerInfo:null;h=null}else p!==h&&(h=null)}}return iy=h,null}function Uk(h){switch(h){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Yr()){case er:return 2;case ui:return 8;case Va:case hd:return 32;case oL:return 268435456;default:return 32}default:return 32}}var MS=!1,Cs=null,As=null,Ms=null,ov=new Map,sv=new Map,Ds=[],uX="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".split(" ");function Yk(h,p){switch(h){case"focusin":case"focusout":Cs=null;break;case"dragenter":case"dragleave":As=null;break;case"mouseover":case"mouseout":Ms=null;break;case"pointerover":case"pointerout":ov.delete(p.pointerId);break;case"gotpointercapture":case"lostpointercapture":sv.delete(p.pointerId)}}function lv(h,p,m,_,A,L){return h===null||h.nativeEvent!==L?(h={blockedOn:p,domEventName:m,eventSystemFlags:_,nativeEvent:L,targetContainers:[A]},p!==null&&(p=Lc(p),p!==null&&Fk(p)),h):(h.eventSystemFlags|=_,p=h.targetContainers,A!==null&&p.indexOf(A)===-1&&p.push(A),h)}function cX(h,p,m,_,A){switch(p){case"focusin":return Cs=lv(Cs,h,p,m,_,A),!0;case"dragenter":return As=lv(As,h,p,m,_,A),!0;case"mouseover":return Ms=lv(Ms,h,p,m,_,A),!0;case"pointerover":var L=A.pointerId;return ov.set(L,lv(ov.get(L)||null,h,p,m,_,A)),!0;case"gotpointercapture":return L=A.pointerId,sv.set(L,lv(sv.get(L)||null,h,p,m,_,A)),!0}return!1}function Wk(h){var p=Nc(h.target);if(p!==null){var m=i(p);if(m!==null){if(p=m.tag,p===13){if(p=o(m),p!==null){h.blockedOn=p,nY(h.priority,function(){if(m.tag===13){var _=Wn();_=xb(_);var A=Hc(m,_);A!==null&&Xn(A,m,_),wS(m,_)}});return}}else if(p===3&&m.stateNode.current.memoizedState.isDehydrated){h.blockedOn=m.tag===3?m.stateNode.containerInfo:null;return}}}h.blockedOn=null}function oy(h){if(h.blockedOn!==null)return!1;for(var p=h.targetContainers;0<p.length;){var m=CS(h.nativeEvent);if(m===null){m=h.nativeEvent;var _=new m.constructor(m.type,m);Nb=_,m.target.dispatchEvent(_),Nb=null}else return p=Lc(m),p!==null&&Fk(p),h.blockedOn=m,!1;p.shift()}return!0}function Xk(h,p,m){oy(h)&&m.delete(p)}function fX(){MS=!1,Cs!==null&&oy(Cs)&&(Cs=null),As!==null&&oy(As)&&(As=null),Ms!==null&&oy(Ms)&&(Ms=null),ov.forEach(Xk),sv.forEach(Xk)}function sy(h,p){h.blockedOn===p&&(h.blockedOn=null,MS||(MS=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,fX)))}var ly=null;function qk(h){ly!==h&&(ly=h,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){ly===h&&(ly=null);for(var p=0;p<h.length;p+=3){var m=h[p],_=h[p+1],A=h[p+2];if(typeof _!="function"){if(AS(_||m)===null)continue;break}var L=Lc(m);L!==null&&(h.splice(p,3),p-=3,A_(L,{pending:!0,data:A,method:m.method,action:_},_,A))}}))}function uv(h){function p(Z){return sy(Z,h)}Cs!==null&&sy(Cs,h),As!==null&&sy(As,h),Ms!==null&&sy(Ms,h),ov.forEach(p),sv.forEach(p);for(var m=0;m<Ds.length;m++){var _=Ds[m];_.blockedOn===h&&(_.blockedOn=null)}for(;0<Ds.length&&(m=Ds[0],m.blockedOn===null);)Wk(m),m.blockedOn===null&&Ds.shift();if(m=(h.ownerDocument||h).$$reactFormReplay,m!=null)for(_=0;_<m.length;_+=3){var A=m[_],L=m[_+1],j=A[Cn]||null;if(typeof L=="function")j||qk(m);else if(j){var Y=null;if(L&&L.hasAttribute("formAction")){if(A=L,j=L[Cn]||null)Y=j.formAction;else if(AS(A)!==null)continue}else Y=j.action;typeof Y=="function"?m[_+1]=Y:(m.splice(_,3),_-=3),qk(m)}}}function DS(h){this._internalRoot=h}uy.prototype.render=DS.prototype.render=function(h){var p=this._internalRoot;if(p===null)throw Error(n(409));var m=p.current,_=Wn();Gk(m,_,h,p,null,null)},uy.prototype.unmount=DS.prototype.unmount=function(){var h=this._internalRoot;if(h!==null){this._internalRoot=null;var p=h.containerInfo;Gk(h.current,2,null,h,null,null),Um(),p[Dc]=null}};function uy(h){this._internalRoot=h}uy.prototype.unstable_scheduleHydration=function(h){if(h){var p=fL();h={blockedOn:null,target:h,priority:p};for(var m=0;m<Ds.length&&p!==0&&p<Ds[m].priority;m++);Ds.splice(m,0,h),m===0&&Wk(h)}};var Zk=e.version;if(Zk!=="19.1.0")throw Error(n(527,Zk,"19.1.0"));F.findDOMNode=function(h){var p=h._reactInternals;if(p===void 0)throw typeof h.render=="function"?Error(n(188)):(h=Object.keys(h).join(","),Error(n(268,h)));return h=l(p),h=h!==null?u(h):null,h=h===null?null:h.stateNode,h};var hX={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cy=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cy.isDisabled&&cy.supportsFiber)try{dd=cy.inject(hX),Bn=cy}catch{}}return fv.createRoot=function(h,p){if(!a(h))throw Error(n(299));var m=!1,_="",A=fE,L=hE,j=dE,Y=null;return p!=null&&(p.unstable_strictMode===!0&&(m=!0),p.identifierPrefix!==void 0&&(_=p.identifierPrefix),p.onUncaughtError!==void 0&&(A=p.onUncaughtError),p.onCaughtError!==void 0&&(L=p.onCaughtError),p.onRecoverableError!==void 0&&(j=p.onRecoverableError),p.unstable_transitionCallbacks!==void 0&&(Y=p.unstable_transitionCallbacks)),p=Bk(h,1,!1,null,null,m,_,A,L,j,Y,null),h[Dc]=p.current,cS(h),new DS(p)},fv.hydrateRoot=function(h,p,m){if(!a(h))throw Error(n(299));var _=!1,A="",L=fE,j=hE,Y=dE,Z=null,ae=null;return m!=null&&(m.unstable_strictMode===!0&&(_=!0),m.identifierPrefix!==void 0&&(A=m.identifierPrefix),m.onUncaughtError!==void 0&&(L=m.onUncaughtError),m.onCaughtError!==void 0&&(j=m.onCaughtError),m.onRecoverableError!==void 0&&(Y=m.onRecoverableError),m.unstable_transitionCallbacks!==void 0&&(Z=m.unstable_transitionCallbacks),m.formState!==void 0&&(ae=m.formState)),p=Bk(h,1,!0,p,m??null,_,A,L,j,Y,Z,ae),p.context=Vk(null),m=p.current,_=Wn(),_=xb(_),A=fs(_),A.callback=null,hs(m,A,_),m=_,p.current.lanes=m,pd(p,m),vi(p),h[Dc]=p.current,cS(h),new uy(p)},fv.version="19.1.0",fv}var mI;function iq(){if(mI)return ES.exports;mI=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),ES.exports=aq(),ES.exports}var oq=iq();function hV(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(t=hV(r[e]))&&(n&&(n+=" "),n+=t)}else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}function sq(){for(var r,e,t=0,n="",a=arguments.length;t<a;t++)(r=arguments[t])&&(e=hV(r))&&(n&&(n+=" "),n+=e);return n}const nM="-",lq=r=>{const e=cq(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=r;return{getClassGroupId:o=>{const s=o.split(nM);return s[0]===""&&s.length!==1&&s.shift(),dV(s,e)||uq(o)},getConflictingClassGroupIds:(o,s)=>{const l=t[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},dV=(r,e)=>{var o;if(r.length===0)return e.classGroupId;const t=r[0],n=e.nextPart.get(t),a=n?dV(r.slice(1),n):void 0;if(a)return a;if(e.validators.length===0)return;const i=r.join(nM);return(o=e.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},yI=/^\[(.+)\]$/,uq=r=>{if(yI.test(r)){const e=yI.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},cq=r=>{const{theme:e,prefix:t}=r,n={nextPart:new Map,validators:[]};return hq(Object.entries(r.classGroups),t).forEach(([i,o])=>{E2(o,n,i,e)}),n},E2=(r,e,t,n)=>{r.forEach(a=>{if(typeof a=="string"){const i=a===""?e:xI(e,a);i.classGroupId=t;return}if(typeof a=="function"){if(fq(a)){E2(a(n),e,t,n);return}e.validators.push({validator:a,classGroupId:t});return}Object.entries(a).forEach(([i,o])=>{E2(o,xI(e,i),t,n)})})},xI=(r,e)=>{let t=r;return e.split(nM).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t},fq=r=>r.isThemeGetter,hq=(r,e)=>e?r.map(([t,n])=>{const a=n.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,s])=>[e+o,s])):i);return[t,a]}):r,dq=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,n=new Map;const a=(i,o)=>{t.set(i,o),e++,e>r&&(e=0,n=t,t=new Map)};return{get(i){let o=t.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){t.has(i)?t.set(i,o):a(i,o)}}},vV="!",vq=r=>{const{separator:e,experimentalParseClassName:t}=r,n=e.length===1,a=e[0],i=e.length,o=s=>{const l=[];let u=0,c=0,f;for(let y=0;y<s.length;y++){let b=s[y];if(u===0){if(b===a&&(n||s.slice(y,y+i)===e)){l.push(s.slice(c,y)),c=y+i;continue}if(b==="/"){f=y;continue}}b==="["?u++:b==="]"&&u--}const d=l.length===0?s:s.substring(c),v=d.startsWith(vV),g=v?d.substring(1):d,x=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:x}};return t?s=>t({className:s,parseClassName:o}):o},pq=r=>{if(r.length<=1)return r;const e=[];let t=[];return r.forEach(n=>{n[0]==="["?(e.push(...t.sort(),n),t=[]):t.push(n)}),e.push(...t.sort()),e},gq=r=>({cache:dq(r.cacheSize),parseClassName:vq(r),...lq(r)}),mq=/\s+/,yq=(r,e)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:a}=e,i=[],o=r.trim().split(mq);let s="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:v}=t(u);let g=!!v,x=n(g?d.substring(0,v):d);if(!x){if(!g){s=u+(s.length>0?" "+s:s);continue}if(x=n(d),!x){s=u+(s.length>0?" "+s:s);continue}g=!1}const y=pq(c).join(":"),b=f?y+vV:y,w=b+x;if(i.includes(w))continue;i.push(w);const T=a(x,g);for(let C=0;C<T.length;++C){const D=T[C];i.push(b+D)}s=u+(s.length>0?" "+s:s)}return s};function xq(){let r=0,e,t,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=pV(e))&&(n&&(n+=" "),n+=t);return n}const pV=r=>{if(typeof r=="string")return r;let e,t="";for(let n=0;n<r.length;n++)r[n]&&(e=pV(r[n]))&&(t&&(t+=" "),t+=e);return t};function bq(r,...e){let t,n,a,i=o;function o(l){const u=e.reduce((c,f)=>f(c),r());return t=gq(u),n=t.cache.get,a=t.cache.set,i=s,s(l)}function s(l){const u=n(l);if(u)return u;const c=yq(l,t);return a(l,c),c}return function(){return i(xq.apply(null,arguments))}}const Xt=r=>{const e=t=>t[r]||[];return e.isThemeGetter=!0,e},gV=/^\[(?:([a-z-]+):)?(.+)\]$/i,_q=/^\d+\/\d+$/,Sq=new Set(["px","full","screen"]),wq=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Tq=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Cq=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Aq=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Mq=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yo=r=>th(r)||Sq.has(r)||_q.test(r),Ls=r=>Hh(r,"length",Oq),th=r=>!!r&&!Number.isNaN(Number(r)),PS=r=>Hh(r,"number",th),hv=r=>!!r&&Number.isInteger(Number(r)),Dq=r=>r.endsWith("%")&&th(r.slice(0,-1)),ct=r=>gV.test(r),Rs=r=>wq.test(r),Nq=new Set(["length","size","percentage"]),Lq=r=>Hh(r,Nq,mV),Rq=r=>Hh(r,"position",mV),Eq=new Set(["image","url"]),kq=r=>Hh(r,Eq,zq),Iq=r=>Hh(r,"",Pq),dv=()=>!0,Hh=(r,e,t)=>{const n=gV.exec(r);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):t(n[2]):!1},Oq=r=>Tq.test(r)&&!Cq.test(r),mV=()=>!1,Pq=r=>Aq.test(r),zq=r=>Mq.test(r),jq=()=>{const r=Xt("colors"),e=Xt("spacing"),t=Xt("blur"),n=Xt("brightness"),a=Xt("borderColor"),i=Xt("borderRadius"),o=Xt("borderSpacing"),s=Xt("borderWidth"),l=Xt("contrast"),u=Xt("grayscale"),c=Xt("hueRotate"),f=Xt("invert"),d=Xt("gap"),v=Xt("gradientColorStops"),g=Xt("gradientColorStopPositions"),x=Xt("inset"),y=Xt("margin"),b=Xt("opacity"),w=Xt("padding"),T=Xt("saturate"),C=Xt("scale"),D=Xt("sepia"),M=Xt("skew"),N=Xt("space"),R=Xt("translate"),E=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",ct,e],z=()=>[ct,e],P=()=>["",yo,Ls],G=()=>["auto",th,ct],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],X=()=>["","0",ct],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[th,ct];return{cacheSize:500,separator:":",theme:{colors:[dv],spacing:[yo,Ls],blur:["none","",Rs,ct],brightness:W(),borderColor:[r],borderRadius:["none","","full",Rs,ct],borderSpacing:z(),borderWidth:P(),contrast:W(),grayscale:X(),hueRotate:W(),invert:X(),gap:z(),gradientColorStops:[r],gradientColorStopPositions:[Dq,Ls],inset:I(),margin:I(),opacity:W(),padding:z(),saturate:W(),scale:W(),sepia:X(),skew:W(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",ct]}],container:["container"],columns:[{columns:[Rs]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),ct]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",hv,ct]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ct]}],grow:[{grow:X()}],shrink:[{shrink:X()}],order:[{order:["first","last","none",hv,ct]}],"grid-cols":[{"grid-cols":[dv]}],"col-start-end":[{col:["auto",{span:["full",hv,ct]},ct]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[dv]}],"row-start-end":[{row:["auto",{span:[hv,ct]},ct]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ct]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ct]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ct,e]}],"min-w":[{"min-w":[ct,e,"min","max","fit"]}],"max-w":[{"max-w":[ct,e,"none","full","min","max","fit","prose",{screen:[Rs]},Rs]}],h:[{h:[ct,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ct,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ct,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ct,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Rs,Ls]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",PS]}],"font-family":[{font:[dv]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ct]}],"line-clamp":[{"line-clamp":["none",th,PS]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yo,ct]}],"list-image":[{"list-image":["none",ct]}],"list-style-type":[{list:["none","disc","decimal",ct]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yo,Ls]}],"underline-offset":[{"underline-offset":["auto",yo,ct]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ct]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ct]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),Rq]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Lq]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},kq]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:B()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[yo,ct]}],"outline-w":[{outline:[yo,Ls]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[yo,Ls]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",Rs,Iq]}],"shadow-color":[{shadow:[dv]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Rs,ct]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[T]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ct]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",ct]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",ct]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[hv,ct]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ct]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ct]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ct]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[yo,Ls,PS]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Bq=bq(jq);function Ge(...r){return Bq(sq(r))}function Lo(r,e,{checkForDefaultPrevented:t=!0}={}){return function(a){if(r==null||r(a),t===!1||!a.defaultPrevented)return e==null?void 0:e(a)}}function bI(r,e){if(typeof r=="function")return r(e);r!=null&&(r.current=e)}function yV(...r){return e=>{let t=!1;const n=r.map(a=>{const i=bI(a,e);return!t&&typeof i=="function"&&(t=!0),i});if(t)return()=>{for(let a=0;a<n.length;a++){const i=n[a];typeof i=="function"?i():bI(r[a],null)}}}}function yc(...r){return q.useCallback(yV(...r),r)}function xV(r,e=[]){let t=[];function n(i,o){const s=q.createContext(o),l=t.length;t=[...t,o];const u=f=>{var b;const{scope:d,children:v,...g}=f,x=((b=d==null?void 0:d[r])==null?void 0:b[l])||s,y=q.useMemo(()=>g,Object.values(g));return S.jsx(x.Provider,{value:y,children:v})};u.displayName=i+"Provider";function c(f,d){var x;const v=((x=d==null?void 0:d[r])==null?void 0:x[l])||s,g=q.useContext(v);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,c]}const a=()=>{const i=t.map(o=>q.createContext(o));return function(s){const l=(s==null?void 0:s[r])||i;return q.useMemo(()=>({[`__scope${r}`]:{...s,[r]:l}}),[s,l])}};return a.scopeName=r,[n,Vq(a,...e)]}function Vq(...r){const e=r[0];if(r.length===1)return e;const t=()=>{const n=r.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=n.reduce((s,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...s,...f}},{});return q.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}var aM=fV();const Gq=KA(aM);function Hq(r){const e=Fq(r),t=q.forwardRef((n,a)=>{const{children:i,...o}=n,s=q.Children.toArray(i),l=s.find(Yq);if(l){const u=l.props.children,c=s.map(f=>f===l?q.Children.count(u)>1?q.Children.only(null):q.isValidElement(u)?u.props.children:null:f);return S.jsx(e,{...o,ref:a,children:q.isValidElement(u)?q.cloneElement(u,void 0,c):null})}return S.jsx(e,{...o,ref:a,children:i})});return t.displayName=`${r}.Slot`,t}function Fq(r){const e=q.forwardRef((t,n)=>{const{children:a,...i}=t;if(q.isValidElement(a)){const o=Xq(a),s=Wq(i,a.props);return a.type!==q.Fragment&&(s.ref=n?yV(n,o):o),q.cloneElement(a,s)}return q.Children.count(a)>1?q.Children.only(null):null});return e.displayName=`${r}.SlotClone`,e}var bV=Symbol("radix.slottable");function Uq(r){const e=({children:t})=>S.jsx(S.Fragment,{children:t});return e.displayName=`${r}.Slottable`,e.__radixId=bV,e}function Yq(r){return q.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===bV}function Wq(r,e){const t={...e};for(const n in e){const a=r[n],i=e[n];/^on[A-Z]/.test(n)?a&&i?t[n]=(...s)=>{const l=i(...s);return a(...s),l}:a&&(t[n]=a):n==="style"?t[n]={...a,...i}:n==="className"&&(t[n]=[a,i].filter(Boolean).join(" "))}return{...r,...t}}function Xq(r){var n,a;let e=(n=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:n.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?r.ref:(e=(a=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:a.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?r.props.ref:r.props.ref||r.ref)}var qq=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Al=qq.reduce((r,e)=>{const t=Hq(`Primitive.${e}`),n=q.forwardRef((a,i)=>{const{asChild:o,...s}=a,l=o?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(l,{...s,ref:i})});return n.displayName=`Primitive.${e}`,{...r,[e]:n}},{});function Zq(r,e){r&&aM.flushSync(()=>r.dispatchEvent(e))}function T1(r){const e=q.useRef(r);return q.useEffect(()=>{e.current=r}),q.useMemo(()=>(...t)=>{var n;return(n=e.current)==null?void 0:n.call(e,...t)},[])}function $q(r,e=globalThis==null?void 0:globalThis.document){const t=T1(r);q.useEffect(()=>{const n=a=>{a.key==="Escape"&&t(a)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[t,e])}var Kq="DismissableLayer",k2="dismissableLayer.update",Qq="dismissableLayer.pointerDownOutside",Jq="dismissableLayer.focusOutside",_I,_V=q.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),SV=q.forwardRef((r,e)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:s,...l}=r,u=q.useContext(_V),[c,f]=q.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=q.useState({}),g=yc(e,N=>f(N)),x=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=x.indexOf(y),w=c?x.indexOf(c):-1,T=u.layersWithOutsidePointerEventsDisabled.size>0,C=w>=b,D=rZ(N=>{const R=N.target,E=[...u.branches].some(k=>k.contains(R));!C||E||(a==null||a(N),o==null||o(N),N.defaultPrevented||s==null||s())},d),M=nZ(N=>{const R=N.target;[...u.branches].some(k=>k.contains(R))||(i==null||i(N),o==null||o(N),N.defaultPrevented||s==null||s())},d);return $q(N=>{w===u.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},d),q.useEffect(()=>{if(c)return t&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(_I=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),SI(),()=>{t&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=_I)}},[c,d,t,u]),q.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),SI())},[c,u]),q.useEffect(()=>{const N=()=>v({});return document.addEventListener(k2,N),()=>document.removeEventListener(k2,N)},[]),S.jsx(Al.div,{...l,ref:g,style:{pointerEvents:T?C?"auto":"none":void 0,...r.style},onFocusCapture:Lo(r.onFocusCapture,M.onFocusCapture),onBlurCapture:Lo(r.onBlurCapture,M.onBlurCapture),onPointerDownCapture:Lo(r.onPointerDownCapture,D.onPointerDownCapture)})});SV.displayName=Kq;var eZ="DismissableLayerBranch",tZ=q.forwardRef((r,e)=>{const t=q.useContext(_V),n=q.useRef(null),a=yc(e,n);return q.useEffect(()=>{const i=n.current;if(i)return t.branches.add(i),()=>{t.branches.delete(i)}},[t.branches]),S.jsx(Al.div,{...r,ref:a})});tZ.displayName=eZ;function rZ(r,e=globalThis==null?void 0:globalThis.document){const t=T1(r),n=q.useRef(!1),a=q.useRef(()=>{});return q.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let l=function(){wV(Qq,t,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(e.removeEventListener("click",a.current),a.current=l,e.addEventListener("click",a.current,{once:!0})):l()}else e.removeEventListener("click",a.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",a.current)}},[e,t]),{onPointerDownCapture:()=>n.current=!0}}function nZ(r,e=globalThis==null?void 0:globalThis.document){const t=T1(r),n=q.useRef(!1);return q.useEffect(()=>{const a=i=>{i.target&&!n.current&&wV(Jq,t,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",a),()=>e.removeEventListener("focusin",a)},[e,t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function SI(){const r=new CustomEvent(k2);document.dispatchEvent(r)}function wV(r,e,t,{discrete:n}){const a=t.originalEvent.target,i=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:t});e&&a.addEventListener(r,e,{once:!0}),n?Zq(a,i):a.dispatchEvent(i)}var ml=globalThis!=null&&globalThis.document?q.useLayoutEffect:()=>{},aZ=sV[" useId ".trim().toString()]||(()=>{}),iZ=0;function oZ(r){const[e,t]=q.useState(aZ());return ml(()=>{t(n=>n??String(iZ++))},[r]),e?`radix-${e}`:""}const sZ=["top","right","bottom","left"],yl=Math.min,Qn=Math.max,ox=Math.round,dy=Math.floor,Vi=r=>({x:r,y:r}),lZ={left:"right",right:"left",bottom:"top",top:"bottom"};function I2(r,e,t){return Qn(r,yl(e,t))}function Wo(r,e){return typeof r=="function"?r(e):r}function Xo(r){return r.split("-")[0]}function Fh(r){return r.split("-")[1]}function iM(r){return r==="x"?"y":"x"}function oM(r){return r==="y"?"height":"width"}function Ii(r){const e=r[0];return e==="t"||e==="b"?"y":"x"}function sM(r){return iM(Ii(r))}function uZ(r,e,t){t===void 0&&(t=!1);const n=Fh(r),a=sM(r),i=oM(a);let o=a==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=sx(o)),[o,sx(o)]}function cZ(r){const e=sx(r);return[O2(r),e,O2(e)]}function O2(r){return r.includes("start")?r.replace("start","end"):r.replace("end","start")}const wI=["left","right"],TI=["right","left"],fZ=["top","bottom"],hZ=["bottom","top"];function dZ(r,e,t){switch(r){case"top":case"bottom":return t?e?TI:wI:e?wI:TI;case"left":case"right":return e?fZ:hZ;default:return[]}}function vZ(r,e,t,n){const a=Fh(r);let i=dZ(Xo(r),t==="start",n);return a&&(i=i.map(o=>o+"-"+a),e&&(i=i.concat(i.map(O2)))),i}function sx(r){const e=Xo(r);return lZ[e]+r.slice(e.length)}function pZ(r){return{top:0,right:0,bottom:0,left:0,...r}}function TV(r){return typeof r!="number"?pZ(r):{top:r,right:r,bottom:r,left:r}}function lx(r){const{x:e,y:t,width:n,height:a}=r;return{width:n,height:a,top:t,left:e,right:e+n,bottom:t+a,x:e,y:t}}function CI(r,e,t){let{reference:n,floating:a}=r;const i=Ii(e),o=sM(e),s=oM(o),l=Xo(e),u=i==="y",c=n.x+n.width/2-a.width/2,f=n.y+n.height/2-a.height/2,d=n[s]/2-a[s]/2;let v;switch(l){case"top":v={x:c,y:n.y-a.height};break;case"bottom":v={x:c,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:f};break;case"left":v={x:n.x-a.width,y:f};break;default:v={x:n.x,y:n.y}}switch(Fh(e)){case"start":v[o]-=d*(t&&u?-1:1);break;case"end":v[o]+=d*(t&&u?-1:1);break}return v}async function gZ(r,e){var t;e===void 0&&(e={});const{x:n,y:a,platform:i,rects:o,elements:s,strategy:l}=r,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:v=0}=Wo(e,r),g=TV(v),y=s[d?f==="floating"?"reference":"floating":f],b=lx(await i.getClippingRect({element:(t=await(i.isElement==null?void 0:i.isElement(y)))==null||t?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),w=f==="floating"?{x:n,y:a,width:o.floating.width,height:o.floating.height}:o.reference,T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),C=await(i.isElement==null?void 0:i.isElement(T))?await(i.getScale==null?void 0:i.getScale(T))||{x:1,y:1}:{x:1,y:1},D=lx(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:T,strategy:l}):w);return{top:(b.top-D.top+g.top)/C.y,bottom:(D.bottom-b.bottom+g.bottom)/C.y,left:(b.left-D.left+g.left)/C.x,right:(D.right-b.right+g.right)/C.x}}const mZ=50,yZ=async(r,e,t)=>{const{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:o}=t,s=o.detectOverflow?o:{...o,detectOverflow:gZ},l=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:r,floating:e,strategy:a}),{x:c,y:f}=CI(u,n,l),d=n,v=0;const g={};for(let x=0;x<i.length;x++){const y=i[x];if(!y)continue;const{name:b,fn:w}=y,{x:T,y:C,data:D,reset:M}=await w({x:c,y:f,initialPlacement:n,placement:d,strategy:a,middlewareData:g,rects:u,platform:s,elements:{reference:r,floating:e}});c=T??c,f=C??f,g[b]={...g[b],...D},M&&v<mZ&&(v++,typeof M=="object"&&(M.placement&&(d=M.placement),M.rects&&(u=M.rects===!0?await o.getElementRects({reference:r,floating:e,strategy:a}):M.rects),{x:c,y:f}=CI(u,d,l)),x=-1)}return{x:c,y:f,placement:d,strategy:a,middlewareData:g}},xZ=r=>({name:"arrow",options:r,async fn(e){const{x:t,y:n,placement:a,rects:i,platform:o,elements:s,middlewareData:l}=e,{element:u,padding:c=0}=Wo(r,e)||{};if(u==null)return{};const f=TV(c),d={x:t,y:n},v=sM(a),g=oM(v),x=await o.getDimensions(u),y=v==="y",b=y?"top":"left",w=y?"bottom":"right",T=y?"clientHeight":"clientWidth",C=i.reference[g]+i.reference[v]-d[v]-i.floating[g],D=d[v]-i.reference[v],M=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let N=M?M[T]:0;(!N||!await(o.isElement==null?void 0:o.isElement(M)))&&(N=s.floating[T]||i.floating[g]);const R=C/2-D/2,E=N/2-x[g]/2-1,k=yl(f[b],E),I=yl(f[w],E),z=k,P=N-x[g]-I,G=N/2-x[g]/2+R,U=I2(z,G,P),B=!l.arrow&&Fh(a)!=null&&G!==U&&i.reference[g]/2-(G<z?k:I)-x[g]/2<0,F=B?G<z?G-z:G-P:0;return{[v]:d[v]+F,data:{[v]:U,centerOffset:G-U-F,...B&&{alignmentOffset:F}},reset:B}}}),bZ=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(e){var t,n;const{placement:a,middlewareData:i,rects:o,initialPlacement:s,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:x=!0,...y}=Wo(r,e);if((t=i.arrow)!=null&&t.alignmentOffset)return{};const b=Xo(a),w=Ii(s),T=Xo(s)===s,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),D=d||(T||!x?[sx(s)]:cZ(s)),M=g!=="none";!d&&M&&D.push(...vZ(s,x,g,C));const N=[s,...D],R=await l.detectOverflow(e,y),E=[];let k=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&E.push(R[b]),f){const G=uZ(a,o,C);E.push(R[G[0]],R[G[1]])}if(k=[...k,{placement:a,overflows:E}],!E.every(G=>G<=0)){var I,z;const G=(((I=i.flip)==null?void 0:I.index)||0)+1,U=N[G];if(U&&(!(f==="alignment"?w!==Ii(U):!1)||k.every(H=>Ii(H.placement)===w?H.overflows[0]>0:!0)))return{data:{index:G,overflows:k},reset:{placement:U}};let B=(z=k.filter(F=>F.overflows[0]<=0).sort((F,H)=>F.overflows[1]-H.overflows[1])[0])==null?void 0:z.placement;if(!B)switch(v){case"bestFit":{var P;const F=(P=k.filter(H=>{if(M){const X=Ii(H.placement);return X===w||X==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(X=>X>0).reduce((X,V)=>X+V,0)]).sort((H,X)=>H[1]-X[1])[0])==null?void 0:P[0];F&&(B=F);break}case"initialPlacement":B=s;break}if(a!==B)return{reset:{placement:B}}}return{}}}};function AI(r,e){return{top:r.top-e.height,right:r.right-e.width,bottom:r.bottom-e.height,left:r.left-e.width}}function MI(r){return sZ.some(e=>r[e]>=0)}const _Z=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(e){const{rects:t,platform:n}=e,{strategy:a="referenceHidden",...i}=Wo(r,e);switch(a){case"referenceHidden":{const o=await n.detectOverflow(e,{...i,elementContext:"reference"}),s=AI(o,t.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:MI(s)}}}case"escaped":{const o=await n.detectOverflow(e,{...i,altBoundary:!0}),s=AI(o,t.floating);return{data:{escapedOffsets:s,escaped:MI(s)}}}default:return{}}}}},CV=new Set(["left","top"]);async function SZ(r,e){const{placement:t,platform:n,elements:a}=r,i=await(n.isRTL==null?void 0:n.isRTL(a.floating)),o=Xo(t),s=Fh(t),l=Ii(t)==="y",u=CV.has(o)?-1:1,c=i&&l?-1:1,f=Wo(e,r);let{mainAxis:d,crossAxis:v,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof g=="number"&&(v=s==="end"?g*-1:g),l?{x:v*c,y:d*u}:{x:d*u,y:v*c}}const wZ=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var t,n;const{x:a,y:i,placement:o,middlewareData:s}=e,l=await SZ(e,r);return o===((t=s.offset)==null?void 0:t.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:a+l.x,y:i+l.y,data:{...l,placement:o}}}}},TZ=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:t,y:n,placement:a,platform:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:w,y:T}=b;return{x:w,y:T}}},...u}=Wo(r,e),c={x:t,y:n},f=await i.detectOverflow(e,u),d=Ii(Xo(a)),v=iM(d);let g=c[v],x=c[d];if(o){const b=v==="y"?"top":"left",w=v==="y"?"bottom":"right",T=g+f[b],C=g-f[w];g=I2(T,g,C)}if(s){const b=d==="y"?"top":"left",w=d==="y"?"bottom":"right",T=x+f[b],C=x-f[w];x=I2(T,x,C)}const y=l.fn({...e,[v]:g,[d]:x});return{...y,data:{x:y.x-t,y:y.y-n,enabled:{[v]:o,[d]:s}}}}}},CZ=function(r){return r===void 0&&(r={}),{options:r,fn(e){const{x:t,y:n,placement:a,rects:i,middlewareData:o}=e,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=Wo(r,e),c={x:t,y:n},f=Ii(a),d=iM(f);let v=c[d],g=c[f];const x=Wo(s,e),y=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(l){const T=d==="y"?"height":"width",C=i.reference[d]-i.floating[T]+y.mainAxis,D=i.reference[d]+i.reference[T]-y.mainAxis;v<C?v=C:v>D&&(v=D)}if(u){var b,w;const T=d==="y"?"width":"height",C=CV.has(Xo(a)),D=i.reference[f]-i.floating[T]+(C&&((b=o.offset)==null?void 0:b[f])||0)+(C?0:y.crossAxis),M=i.reference[f]+i.reference[T]+(C?0:((w=o.offset)==null?void 0:w[f])||0)-(C?y.crossAxis:0);g<D?g=D:g>M&&(g=M)}return{[d]:v,[f]:g}}}},AZ=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(e){var t,n;const{placement:a,rects:i,platform:o,elements:s}=e,{apply:l=()=>{},...u}=Wo(r,e),c=await o.detectOverflow(e,u),f=Xo(a),d=Fh(a),v=Ii(a)==="y",{width:g,height:x}=i.floating;let y,b;f==="top"||f==="bottom"?(y=f,b=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(b=f,y=d==="end"?"top":"bottom");const w=x-c.top-c.bottom,T=g-c.left-c.right,C=yl(x-c[y],w),D=yl(g-c[b],T),M=!e.middlewareData.shift;let N=C,R=D;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(R=T),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(N=w),M&&!d){const k=Qn(c.left,0),I=Qn(c.right,0),z=Qn(c.top,0),P=Qn(c.bottom,0);v?R=g-2*(k!==0||I!==0?k+I:Qn(c.left,c.right)):N=x-2*(z!==0||P!==0?z+P:Qn(c.top,c.bottom))}await l({...e,availableWidth:R,availableHeight:N});const E=await o.getDimensions(s.floating);return g!==E.width||x!==E.height?{reset:{rects:!0}}:{}}}};function C1(){return typeof window<"u"}function Uh(r){return AV(r)?(r.nodeName||"").toLowerCase():"#document"}function ia(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function Qi(r){var e;return(e=(AV(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function AV(r){return C1()?r instanceof Node||r instanceof ia(r).Node:!1}function ri(r){return C1()?r instanceof Element||r instanceof ia(r).Element:!1}function rs(r){return C1()?r instanceof HTMLElement||r instanceof ia(r).HTMLElement:!1}function DI(r){return!C1()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof ia(r).ShadowRoot}function Mg(r){const{overflow:e,overflowX:t,overflowY:n,display:a}=ni(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&a!=="inline"&&a!=="contents"}function MZ(r){return/^(table|td|th)$/.test(Uh(r))}function A1(r){try{if(r.matches(":popover-open"))return!0}catch{}try{return r.matches(":modal")}catch{return!1}}const DZ=/transform|translate|scale|rotate|perspective|filter/,NZ=/paint|layout|strict|content/,Kl=r=>!!r&&r!=="none";let zS;function lM(r){const e=ri(r)?ni(r):r;return Kl(e.transform)||Kl(e.translate)||Kl(e.scale)||Kl(e.rotate)||Kl(e.perspective)||!uM()&&(Kl(e.backdropFilter)||Kl(e.filter))||DZ.test(e.willChange||"")||NZ.test(e.contain||"")}function LZ(r){let e=xl(r);for(;rs(e)&&!wh(e);){if(lM(e))return e;if(A1(e))return null;e=xl(e)}return null}function uM(){return zS==null&&(zS=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),zS}function wh(r){return/^(html|body|#document)$/.test(Uh(r))}function ni(r){return ia(r).getComputedStyle(r)}function M1(r){return ri(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function xl(r){if(Uh(r)==="html")return r;const e=r.assignedSlot||r.parentNode||DI(r)&&r.host||Qi(r);return DI(e)?e.host:e}function MV(r){const e=xl(r);return wh(e)?r.ownerDocument?r.ownerDocument.body:r.body:rs(e)&&Mg(e)?e:MV(e)}function jp(r,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);const a=MV(r),i=a===((n=r.ownerDocument)==null?void 0:n.body),o=ia(a);if(i){const s=P2(o);return e.concat(o,o.visualViewport||[],Mg(a)?a:[],s&&t?jp(s):[])}else return e.concat(a,jp(a,[],t))}function P2(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function DV(r){const e=ni(r);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const a=rs(r),i=a?r.offsetWidth:t,o=a?r.offsetHeight:n,s=ox(t)!==i||ox(n)!==o;return s&&(t=i,n=o),{width:t,height:n,$:s}}function cM(r){return ri(r)?r:r.contextElement}function rh(r){const e=cM(r);if(!rs(e))return Vi(1);const t=e.getBoundingClientRect(),{width:n,height:a,$:i}=DV(e);let o=(i?ox(t.width):t.width)/n,s=(i?ox(t.height):t.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const RZ=Vi(0);function NV(r){const e=ia(r);return!uM()||!e.visualViewport?RZ:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function EZ(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==ia(r)?!1:e}function ic(r,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const a=r.getBoundingClientRect(),i=cM(r);let o=Vi(1);e&&(n?ri(n)&&(o=rh(n)):o=rh(r));const s=EZ(i,t,n)?NV(i):Vi(0);let l=(a.left+s.x)/o.x,u=(a.top+s.y)/o.y,c=a.width/o.x,f=a.height/o.y;if(i){const d=ia(i),v=n&&ri(n)?ia(n):n;let g=d,x=P2(g);for(;x&&n&&v!==g;){const y=rh(x),b=x.getBoundingClientRect(),w=ni(x),T=b.left+(x.clientLeft+parseFloat(w.paddingLeft))*y.x,C=b.top+(x.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,f*=y.y,l+=T,u+=C,g=ia(x),x=P2(g)}}return lx({width:c,height:f,x:l,y:u})}function D1(r,e){const t=M1(r).scrollLeft;return e?e.left+t:ic(Qi(r)).left+t}function LV(r,e){const t=r.getBoundingClientRect(),n=t.left+e.scrollLeft-D1(r,t),a=t.top+e.scrollTop;return{x:n,y:a}}function kZ(r){let{elements:e,rect:t,offsetParent:n,strategy:a}=r;const i=a==="fixed",o=Qi(n),s=e?A1(e.floating):!1;if(n===o||s&&i)return t;let l={scrollLeft:0,scrollTop:0},u=Vi(1);const c=Vi(0),f=rs(n);if((f||!f&&!i)&&((Uh(n)!=="body"||Mg(o))&&(l=M1(n)),f)){const v=ic(n);u=rh(n),c.x=v.x+n.clientLeft,c.y=v.y+n.clientTop}const d=o&&!f&&!i?LV(o,l):Vi(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-l.scrollLeft*u.x+c.x+d.x,y:t.y*u.y-l.scrollTop*u.y+c.y+d.y}}function IZ(r){return Array.from(r.getClientRects())}function OZ(r){const e=Qi(r),t=M1(r),n=r.ownerDocument.body,a=Qn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Qn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-t.scrollLeft+D1(r);const s=-t.scrollTop;return ni(n).direction==="rtl"&&(o+=Qn(e.clientWidth,n.clientWidth)-a),{width:a,height:i,x:o,y:s}}const NI=25;function PZ(r,e){const t=ia(r),n=Qi(r),a=t.visualViewport;let i=n.clientWidth,o=n.clientHeight,s=0,l=0;if(a){i=a.width,o=a.height;const c=uM();(!c||c&&e==="fixed")&&(s=a.offsetLeft,l=a.offsetTop)}const u=D1(n);if(u<=0){const c=n.ownerDocument,f=c.body,d=getComputedStyle(f),v=c.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,g=Math.abs(n.clientWidth-f.clientWidth-v);g<=NI&&(i-=g)}else u<=NI&&(i+=u);return{width:i,height:o,x:s,y:l}}function zZ(r,e){const t=ic(r,!0,e==="fixed"),n=t.top+r.clientTop,a=t.left+r.clientLeft,i=rs(r)?rh(r):Vi(1),o=r.clientWidth*i.x,s=r.clientHeight*i.y,l=a*i.x,u=n*i.y;return{width:o,height:s,x:l,y:u}}function LI(r,e,t){let n;if(e==="viewport")n=PZ(r,t);else if(e==="document")n=OZ(Qi(r));else if(ri(e))n=zZ(e,t);else{const a=NV(r);n={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return lx(n)}function RV(r,e){const t=xl(r);return t===e||!ri(t)||wh(t)?!1:ni(t).position==="fixed"||RV(t,e)}function jZ(r,e){const t=e.get(r);if(t)return t;let n=jp(r,[],!1).filter(s=>ri(s)&&Uh(s)!=="body"),a=null;const i=ni(r).position==="fixed";let o=i?xl(r):r;for(;ri(o)&&!wh(o);){const s=ni(o),l=lM(o);!l&&s.position==="fixed"&&(a=null),(i?!l&&!a:!l&&s.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Mg(o)&&!l&&RV(r,o))?n=n.filter(c=>c!==o):a=s,o=xl(o)}return e.set(r,n),n}function BZ(r){let{element:e,boundary:t,rootBoundary:n,strategy:a}=r;const o=[...t==="clippingAncestors"?A1(e)?[]:jZ(e,this._c):[].concat(t),n],s=LI(e,o[0],a);let l=s.top,u=s.right,c=s.bottom,f=s.left;for(let d=1;d<o.length;d++){const v=LI(e,o[d],a);l=Qn(v.top,l),u=yl(v.right,u),c=yl(v.bottom,c),f=Qn(v.left,f)}return{width:u-f,height:c-l,x:f,y:l}}function VZ(r){const{width:e,height:t}=DV(r);return{width:e,height:t}}function GZ(r,e,t){const n=rs(e),a=Qi(e),i=t==="fixed",o=ic(r,!0,i,e);let s={scrollLeft:0,scrollTop:0};const l=Vi(0);function u(){l.x=D1(a)}if(n||!n&&!i)if((Uh(e)!=="body"||Mg(a))&&(s=M1(e)),n){const v=ic(e,!0,i,e);l.x=v.x+e.clientLeft,l.y=v.y+e.clientTop}else a&&u();i&&!n&&a&&u();const c=a&&!n&&!i?LV(a,s):Vi(0),f=o.left+s.scrollLeft-l.x-c.x,d=o.top+s.scrollTop-l.y-c.y;return{x:f,y:d,width:o.width,height:o.height}}function jS(r){return ni(r).position==="static"}function RI(r,e){if(!rs(r)||ni(r).position==="fixed")return null;if(e)return e(r);let t=r.offsetParent;return Qi(r)===t&&(t=t.ownerDocument.body),t}function EV(r,e){const t=ia(r);if(A1(r))return t;if(!rs(r)){let a=xl(r);for(;a&&!wh(a);){if(ri(a)&&!jS(a))return a;a=xl(a)}return t}let n=RI(r,e);for(;n&&MZ(n)&&jS(n);)n=RI(n,e);return n&&wh(n)&&jS(n)&&!lM(n)?t:n||LZ(r)||t}const HZ=async function(r){const e=this.getOffsetParent||EV,t=this.getDimensions,n=await t(r.floating);return{reference:GZ(r.reference,await e(r.floating),r.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function FZ(r){return ni(r).direction==="rtl"}const UZ={convertOffsetParentRelativeRectToViewportRelativeRect:kZ,getDocumentElement:Qi,getClippingRect:BZ,getOffsetParent:EV,getElementRects:HZ,getClientRects:IZ,getDimensions:VZ,getScale:rh,isElement:ri,isRTL:FZ};function kV(r,e){return r.x===e.x&&r.y===e.y&&r.width===e.width&&r.height===e.height}function YZ(r,e){let t=null,n;const a=Qi(r);function i(){var s;clearTimeout(n),(s=t)==null||s.disconnect(),t=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const u=r.getBoundingClientRect(),{left:c,top:f,width:d,height:v}=u;if(s||e(),!d||!v)return;const g=dy(f),x=dy(a.clientWidth-(c+d)),y=dy(a.clientHeight-(f+v)),b=dy(c),T={rootMargin:-g+"px "+-x+"px "+-y+"px "+-b+"px",threshold:Qn(0,yl(1,l))||1};let C=!0;function D(M){const N=M[0].intersectionRatio;if(N!==l){if(!C)return o();N?o(!1,N):n=setTimeout(()=>{o(!1,1e-7)},1e3)}N===1&&!kV(u,r.getBoundingClientRect())&&o(),C=!1}try{t=new IntersectionObserver(D,{...T,root:a.ownerDocument})}catch{t=new IntersectionObserver(D,T)}t.observe(r)}return o(!0),i}function WZ(r,e,t,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=cM(r),c=a||i?[...u?jp(u):[],...e?jp(e):[]]:[];c.forEach(b=>{a&&b.addEventListener("scroll",t,{passive:!0}),i&&b.addEventListener("resize",t)});const f=u&&s?YZ(u,t):null;let d=-1,v=null;o&&(v=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&v&&e&&(v.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var T;(T=v)==null||T.observe(e)})),t()}),u&&!l&&v.observe(u),e&&v.observe(e));let g,x=l?ic(r):null;l&&y();function y(){const b=ic(r);x&&!kV(x,b)&&t(),x=b,g=requestAnimationFrame(y)}return t(),()=>{var b;c.forEach(w=>{a&&w.removeEventListener("scroll",t),i&&w.removeEventListener("resize",t)}),f==null||f(),(b=v)==null||b.disconnect(),v=null,l&&cancelAnimationFrame(g)}}const XZ=wZ,qZ=TZ,ZZ=bZ,$Z=AZ,KZ=_Z,EI=xZ,QZ=CZ,JZ=(r,e,t)=>{const n=new Map,a={platform:UZ,...t},i={...a.platform,_c:n};return yZ(r,e,{...a,platform:i})};var e$=typeof document<"u",t$=function(){},O0=e$?q.useLayoutEffect:t$;function ux(r,e){if(r===e)return!0;if(typeof r!=typeof e)return!1;if(typeof r=="function"&&r.toString()===e.toString())return!0;let t,n,a;if(r&&e&&typeof r=="object"){if(Array.isArray(r)){if(t=r.length,t!==e.length)return!1;for(n=t;n--!==0;)if(!ux(r[n],e[n]))return!1;return!0}if(a=Object.keys(r),t=a.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(e,a[n]))return!1;for(n=t;n--!==0;){const i=a[n];if(!(i==="_owner"&&r.$$typeof)&&!ux(r[i],e[i]))return!1}return!0}return r!==r&&e!==e}function IV(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function kI(r,e){const t=IV(r);return Math.round(e*t)/t}function BS(r){const e=q.useRef(r);return O0(()=>{e.current=r}),e}function r$(r){r===void 0&&(r={});const{placement:e="bottom",strategy:t="absolute",middleware:n=[],platform:a,elements:{reference:i,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=r,[c,f]=q.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[d,v]=q.useState(n);ux(d,n)||v(n);const[g,x]=q.useState(null),[y,b]=q.useState(null),w=q.useCallback(H=>{H!==M.current&&(M.current=H,x(H))},[]),T=q.useCallback(H=>{H!==N.current&&(N.current=H,b(H))},[]),C=i||g,D=o||y,M=q.useRef(null),N=q.useRef(null),R=q.useRef(c),E=l!=null,k=BS(l),I=BS(a),z=BS(u),P=q.useCallback(()=>{if(!M.current||!N.current)return;const H={placement:e,strategy:t,middleware:d};I.current&&(H.platform=I.current),JZ(M.current,N.current,H).then(X=>{const V={...X,isPositioned:z.current!==!1};G.current&&!ux(R.current,V)&&(R.current=V,aM.flushSync(()=>{f(V)}))})},[d,e,t,I,z]);O0(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(H=>({...H,isPositioned:!1})))},[u]);const G=q.useRef(!1);O0(()=>(G.current=!0,()=>{G.current=!1}),[]),O0(()=>{if(C&&(M.current=C),D&&(N.current=D),C&&D){if(k.current)return k.current(C,D,P);P()}},[C,D,P,k,E]);const U=q.useMemo(()=>({reference:M,floating:N,setReference:w,setFloating:T}),[w,T]),B=q.useMemo(()=>({reference:C,floating:D}),[C,D]),F=q.useMemo(()=>{const H={position:t,left:0,top:0};if(!B.floating)return H;const X=kI(B.floating,c.x),V=kI(B.floating,c.y);return s?{...H,transform:"translate("+X+"px, "+V+"px)",...IV(B.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:X,top:V}},[t,s,B.floating,c.x,c.y]);return q.useMemo(()=>({...c,update:P,refs:U,elements:B,floatingStyles:F}),[c,P,U,B,F])}const n$=r=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:r,fn(t){const{element:n,padding:a}=typeof r=="function"?r(t):r;return n&&e(n)?n.current!=null?EI({element:n.current,padding:a}).fn(t):{}:n?EI({element:n,padding:a}).fn(t):{}}}},a$=(r,e)=>{const t=XZ(r);return{name:t.name,fn:t.fn,options:[r,e]}},i$=(r,e)=>{const t=qZ(r);return{name:t.name,fn:t.fn,options:[r,e]}},o$=(r,e)=>({fn:QZ(r).fn,options:[r,e]}),s$=(r,e)=>{const t=ZZ(r);return{name:t.name,fn:t.fn,options:[r,e]}},l$=(r,e)=>{const t=$Z(r);return{name:t.name,fn:t.fn,options:[r,e]}},u$=(r,e)=>{const t=KZ(r);return{name:t.name,fn:t.fn,options:[r,e]}},c$=(r,e)=>{const t=n$(r);return{name:t.name,fn:t.fn,options:[r,e]}};var f$="Arrow",OV=q.forwardRef((r,e)=>{const{children:t,width:n=10,height:a=5,...i}=r;return S.jsx(Al.svg,{...i,ref:e,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:r.asChild?t:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});OV.displayName=f$;var h$=OV;function d$(r){const[e,t]=q.useState(void 0);return ml(()=>{if(r){t({width:r.offsetWidth,height:r.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let o,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,s=u.blockSize}else o=r.offsetWidth,s=r.offsetHeight;t({width:o,height:s})});return n.observe(r,{box:"border-box"}),()=>n.unobserve(r)}else t(void 0)},[r]),e}var fM="Popper",[PV,zV]=xV(fM),[v$,jV]=PV(fM),BV=r=>{const{__scopePopper:e,children:t}=r,[n,a]=q.useState(null);return S.jsx(v$,{scope:e,anchor:n,onAnchorChange:a,children:t})};BV.displayName=fM;var VV="PopperAnchor",GV=q.forwardRef((r,e)=>{const{__scopePopper:t,virtualRef:n,...a}=r,i=jV(VV,t),o=q.useRef(null),s=yc(e,o),l=q.useRef(null);return q.useEffect(()=>{const u=l.current;l.current=(n==null?void 0:n.current)||o.current,u!==l.current&&i.onAnchorChange(l.current)}),n?null:S.jsx(Al.div,{...a,ref:s})});GV.displayName=VV;var hM="PopperContent",[p$,g$]=PV(hM),HV=q.forwardRef((r,e)=>{var Xe,be,we,ze,oe,pe;const{__scopePopper:t,side:n="bottom",sideOffset:a=0,align:i="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:v="optimized",onPlaced:g,...x}=r,y=jV(hM,t),[b,w]=q.useState(null),T=yc(e,je=>w(je)),[C,D]=q.useState(null),M=d$(C),N=(M==null?void 0:M.width)??0,R=(M==null?void 0:M.height)??0,E=n+(i!=="center"?"-"+i:""),k=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},I=Array.isArray(u)?u:[u],z=I.length>0,P={padding:k,boundary:I.filter(y$),altBoundary:z},{refs:G,floatingStyles:U,placement:B,isPositioned:F,middlewareData:H}=r$({strategy:"fixed",placement:E,whileElementsMounted:(...je)=>WZ(...je,{animationFrame:v==="always"}),elements:{reference:y.anchor},middleware:[a$({mainAxis:a+R,alignmentAxis:o}),l&&i$({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?o$():void 0,...P}),l&&s$({...P}),l$({...P,apply:({elements:je,rects:Ne,availableWidth:at,availableHeight:ft})=>{const{width:Ct,height:Yr}=Ne.reference,er=je.floating.style;er.setProperty("--radix-popper-available-width",`${at}px`),er.setProperty("--radix-popper-available-height",`${ft}px`),er.setProperty("--radix-popper-anchor-width",`${Ct}px`),er.setProperty("--radix-popper-anchor-height",`${Yr}px`)}}),C&&c$({element:C,padding:s}),x$({arrowWidth:N,arrowHeight:R}),d&&u$({strategy:"referenceHidden",...P})]}),[X,V]=YV(B),W=T1(g);ml(()=>{F&&(W==null||W())},[F,W]);const $=(Xe=H.arrow)==null?void 0:Xe.x,te=(be=H.arrow)==null?void 0:be.y,ue=((we=H.arrow)==null?void 0:we.centerOffset)!==0,[ge,Se]=q.useState();return ml(()=>{b&&Se(window.getComputedStyle(b).zIndex)},[b]),S.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:F?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(ze=H.transformOrigin)==null?void 0:ze.x,(oe=H.transformOrigin)==null?void 0:oe.y].join(" "),...((pe=H.hide)==null?void 0:pe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:r.dir,children:S.jsx(p$,{scope:t,placedSide:X,onArrowChange:D,arrowX:$,arrowY:te,shouldHideArrow:ue,children:S.jsx(Al.div,{"data-side":X,"data-align":V,...x,ref:T,style:{...x.style,animation:F?void 0:"none"}})})})});HV.displayName=hM;var FV="PopperArrow",m$={top:"bottom",right:"left",bottom:"top",left:"right"},UV=q.forwardRef(function(e,t){const{__scopePopper:n,...a}=e,i=g$(FV,n),o=m$[i.placedSide];return S.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:S.jsx(h$,{...a,ref:t,style:{...a.style,display:"block"}})})});UV.displayName=FV;function y$(r){return r!==null}var x$=r=>({name:"transformOrigin",options:r,fn(e){var y,b,w;const{placement:t,rects:n,middlewareData:a}=e,o=((y=a.arrow)==null?void 0:y.centerOffset)!==0,s=o?0:r.arrowWidth,l=o?0:r.arrowHeight,[u,c]=YV(t),f={start:"0%",center:"50%",end:"100%"}[c],d=(((b=a.arrow)==null?void 0:b.x)??0)+s/2,v=(((w=a.arrow)==null?void 0:w.y)??0)+l/2;let g="",x="";return u==="bottom"?(g=o?f:`${d}px`,x=`${-l}px`):u==="top"?(g=o?f:`${d}px`,x=`${n.floating.height+l}px`):u==="right"?(g=`${-l}px`,x=o?f:`${v}px`):u==="left"&&(g=`${n.floating.width+l}px`,x=o?f:`${v}px`),{data:{x:g,y:x}}}});function YV(r){const[e,t="center"]=r.split("-");return[e,t]}var b$=BV,_$=GV,S$=HV,w$=UV,T$="Portal",WV=q.forwardRef((r,e)=>{var s;const{container:t,...n}=r,[a,i]=q.useState(!1);ml(()=>i(!0),[]);const o=t||a&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?Gq.createPortal(S.jsx(Al.div,{...n,ref:e}),o):null});WV.displayName=T$;function C$(r,e){return q.useReducer((t,n)=>e[t][n]??t,r)}var dM=r=>{const{present:e,children:t}=r,n=A$(e),a=typeof t=="function"?t({present:n.isPresent}):q.Children.only(t),i=yc(n.ref,M$(a));return typeof t=="function"||n.isPresent?q.cloneElement(a,{ref:i}):null};dM.displayName="Presence";function A$(r){const[e,t]=q.useState(),n=q.useRef(null),a=q.useRef(r),i=q.useRef("none"),o=r?"mounted":"unmounted",[s,l]=C$(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return q.useEffect(()=>{const u=vy(n.current);i.current=s==="mounted"?u:"none"},[s]),ml(()=>{const u=n.current,c=a.current;if(c!==r){const d=i.current,v=vy(u);r?l("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&d!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=r}},[r,l]),ml(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,f=v=>{const x=vy(n.current).includes(CSS.escape(v.animationName));if(v.target===e&&x&&(l("ANIMATION_END"),!a.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},d=v=>{v.target===e&&(i.current=vy(n.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:q.useCallback(u=>{n.current=u?getComputedStyle(u):null,t(u)},[])}}function vy(r){return(r==null?void 0:r.animationName)||"none"}function M$(r){var n,a;let e=(n=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:n.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?r.ref:(e=(a=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:a.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?r.props.ref:r.props.ref||r.ref)}var D$=sV[" useInsertionEffect ".trim().toString()]||ml;function N$({prop:r,defaultProp:e,onChange:t=()=>{},caller:n}){const[a,i,o]=L$({defaultProp:e,onChange:t}),s=r!==void 0,l=s?r:a;{const c=q.useRef(r!==void 0);q.useEffect(()=>{const f=c.current;f!==s&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,n])}const u=q.useCallback(c=>{var f;if(s){const d=R$(c)?c(r):c;d!==r&&((f=o.current)==null||f.call(o,d))}else i(c)},[s,r,i,o]);return[l,u]}function L$({defaultProp:r,onChange:e}){const[t,n]=q.useState(r),a=q.useRef(t),i=q.useRef(e);return D$(()=>{i.current=e},[e]),q.useEffect(()=>{var o;a.current!==t&&((o=i.current)==null||o.call(i,t),a.current=t)},[t,a]),[t,n,i]}function R$(r){return typeof r=="function"}var E$=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),k$="VisuallyHidden",XV=q.forwardRef((r,e)=>S.jsx(Al.span,{...r,ref:e,style:{...E$,...r.style}}));XV.displayName=k$;var I$=XV,[N1]=xV("Tooltip",[zV]),L1=zV(),qV="TooltipProvider",O$=700,z2="tooltip.open",[P$,vM]=N1(qV),ZV=r=>{const{__scopeTooltip:e,delayDuration:t=O$,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:i}=r,o=q.useRef(!0),s=q.useRef(!1),l=q.useRef(0);return q.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),S.jsx(P$,{scope:e,isOpenDelayedRef:o,delayDuration:t,onOpen:q.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:q.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:q.useCallback(u=>{s.current=u},[]),disableHoverableContent:a,children:i})};ZV.displayName=qV;var Bp="Tooltip",[z$,Dg]=N1(Bp),$V=r=>{const{__scopeTooltip:e,children:t,open:n,defaultOpen:a,onOpenChange:i,disableHoverableContent:o,delayDuration:s}=r,l=vM(Bp,r.__scopeTooltip),u=L1(e),[c,f]=q.useState(null),d=oZ(),v=q.useRef(0),g=o??l.disableHoverableContent,x=s??l.delayDuration,y=q.useRef(!1),[b,w]=N$({prop:n,defaultProp:a??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(z2))):l.onClose(),i==null||i(N)},caller:Bp}),T=q.useMemo(()=>b?y.current?"delayed-open":"instant-open":"closed",[b]),C=q.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y.current=!1,w(!0)},[w]),D=q.useCallback(()=>{window.clearTimeout(v.current),v.current=0,w(!1)},[w]),M=q.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{y.current=!0,w(!0),v.current=0},x)},[x,w]);return q.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),S.jsx(b$,{...u,children:S.jsx(z$,{scope:e,contentId:d,open:b,stateAttribute:T,trigger:c,onTriggerChange:f,onTriggerEnter:q.useCallback(()=>{l.isOpenDelayedRef.current?M():C()},[l.isOpenDelayedRef,M,C]),onTriggerLeave:q.useCallback(()=>{g?D():(window.clearTimeout(v.current),v.current=0)},[D,g]),onOpen:C,onClose:D,disableHoverableContent:g,children:t})})};$V.displayName=Bp;var j2="TooltipTrigger",KV=q.forwardRef((r,e)=>{const{__scopeTooltip:t,...n}=r,a=Dg(j2,t),i=vM(j2,t),o=L1(t),s=q.useRef(null),l=yc(e,s,a.onTriggerChange),u=q.useRef(!1),c=q.useRef(!1),f=q.useCallback(()=>u.current=!1,[]);return q.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),S.jsx(_$,{asChild:!0,...o,children:S.jsx(Al.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:l,onPointerMove:Lo(r.onPointerMove,d=>{d.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),c.current=!0)}),onPointerLeave:Lo(r.onPointerLeave,()=>{a.onTriggerLeave(),c.current=!1}),onPointerDown:Lo(r.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Lo(r.onFocus,()=>{u.current||a.onOpen()}),onBlur:Lo(r.onBlur,a.onClose),onClick:Lo(r.onClick,a.onClose)})})});KV.displayName=j2;var pM="TooltipPortal",[j$,B$]=N1(pM,{forceMount:void 0}),QV=r=>{const{__scopeTooltip:e,forceMount:t,children:n,container:a}=r,i=Dg(pM,e);return S.jsx(j$,{scope:e,forceMount:t,children:S.jsx(dM,{present:t||i.open,children:S.jsx(WV,{asChild:!0,container:a,children:n})})})};QV.displayName=pM;var Th="TooltipContent",JV=q.forwardRef((r,e)=>{const t=B$(Th,r.__scopeTooltip),{forceMount:n=t.forceMount,side:a="top",...i}=r,o=Dg(Th,r.__scopeTooltip);return S.jsx(dM,{present:n||o.open,children:o.disableHoverableContent?S.jsx(eG,{side:a,...i,ref:e}):S.jsx(V$,{side:a,...i,ref:e})})}),V$=q.forwardRef((r,e)=>{const t=Dg(Th,r.__scopeTooltip),n=vM(Th,r.__scopeTooltip),a=q.useRef(null),i=yc(e,a),[o,s]=q.useState(null),{trigger:l,onClose:u}=t,c=a.current,{onPointerInTransitChange:f}=n,d=q.useCallback(()=>{s(null),f(!1)},[f]),v=q.useCallback((g,x)=>{const y=g.currentTarget,b={x:g.clientX,y:g.clientY},w=Y$(b,y.getBoundingClientRect()),T=W$(b,w),C=X$(x.getBoundingClientRect()),D=Z$([...T,...C]);s(D),f(!0)},[f]);return q.useEffect(()=>()=>d(),[d]),q.useEffect(()=>{if(l&&c){const g=y=>v(y,c),x=y=>v(y,l);return l.addEventListener("pointerleave",g),c.addEventListener("pointerleave",x),()=>{l.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",x)}}},[l,c,v,d]),q.useEffect(()=>{if(o){const g=x=>{const y=x.target,b={x:x.clientX,y:x.clientY},w=(l==null?void 0:l.contains(y))||(c==null?void 0:c.contains(y)),T=!q$(b,o);w?d():T&&(d(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,c,o,u,d]),S.jsx(eG,{...r,ref:i})}),[G$,H$]=N1(Bp,{isInside:!1}),F$=Uq("TooltipContent"),eG=q.forwardRef((r,e)=>{const{__scopeTooltip:t,children:n,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:o,...s}=r,l=Dg(Th,t),u=L1(t),{onClose:c}=l;return q.useEffect(()=>(document.addEventListener(z2,c),()=>document.removeEventListener(z2,c)),[c]),q.useEffect(()=>{if(l.trigger){const f=d=>{const v=d.target;v!=null&&v.contains(l.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,c]),S.jsx(SV,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:S.jsxs(S$,{"data-state":l.stateAttribute,...u,...s,ref:e,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[S.jsx(F$,{children:n}),S.jsx(G$,{scope:t,isInside:!0,children:S.jsx(I$,{id:l.contentId,role:"tooltip",children:a||n})})]})})});JV.displayName=Th;var tG="TooltipArrow",U$=q.forwardRef((r,e)=>{const{__scopeTooltip:t,...n}=r,a=L1(t);return H$(tG,t).isInside?null:S.jsx(w$,{...a,...n,ref:e})});U$.displayName=tG;function Y$(r,e){const t=Math.abs(e.top-r.y),n=Math.abs(e.bottom-r.y),a=Math.abs(e.right-r.x),i=Math.abs(e.left-r.x);switch(Math.min(t,n,a,i)){case i:return"left";case a:return"right";case t:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function W$(r,e,t=5){const n=[];switch(e){case"top":n.push({x:r.x-t,y:r.y+t},{x:r.x+t,y:r.y+t});break;case"bottom":n.push({x:r.x-t,y:r.y-t},{x:r.x+t,y:r.y-t});break;case"left":n.push({x:r.x+t,y:r.y-t},{x:r.x+t,y:r.y+t});break;case"right":n.push({x:r.x-t,y:r.y-t},{x:r.x-t,y:r.y+t});break}return n}function X$(r){const{top:e,right:t,bottom:n,left:a}=r;return[{x:a,y:e},{x:t,y:e},{x:t,y:n},{x:a,y:n}]}function q$(r,e){const{x:t,y:n}=r;let a=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const s=e[i],l=e[o],u=s.x,c=s.y,f=l.x,d=l.y;c>n!=d>n&&t<(f-u)*(n-c)/(d-c)+u&&(a=!a)}return a}function Z$(r){const e=r.slice();return e.sort((t,n)=>t.x<n.x?-1:t.x>n.x?1:t.y<n.y?-1:t.y>n.y?1:0),$$(e)}function $$(r){if(r.length<=1)return r.slice();const e=[];for(let n=0;n<r.length;n++){const a=r[n];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))e.pop();else break}e.push(a)}e.pop();const t=[];for(let n=r.length-1;n>=0;n--){const a=r[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))t.pop();else break}t.push(a)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var K$=ZV,Q$=$V,J$=KV,eK=QV,rG=JV;const nG=K$,tK=Q$,rK=J$,aG=q.forwardRef(({className:r,sideOffset:e=4,...t},n)=>S.jsx(eK,{children:S.jsx(rG,{ref:n,sideOffset:e,className:Ge("z-50 max-w-[280px] rounded-md bg-popover px-3 py-1.5 text-[11px] leading-relaxed text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r),...t})}));aG.displayName=rG.displayName;function Bo({children:r,content:e,delayDuration:t=200,side:n,contentClassName:a}){return S.jsxs(tK,{delayDuration:t,children:[S.jsx(rK,{asChild:!0,children:r}),S.jsx(aG,{side:n,className:a,children:e})]})}async function Er(r){const e=await fetch(`/api${r}`);if(!e.ok)throw new Error(`API ${r} failed: ${e.status}`);return e.json()}function Ng(){return Rr({queryKey:["status"],queryFn:()=>Er("/status"),refetchInterval:3e4})}function nK(){return Rr({queryKey:["overview"],queryFn:()=>Er("/overview"),refetchInterval:3e4})}function aK(){return Rr({queryKey:["sessions"],queryFn:()=>Er("/session").then(r=>r.sessions),refetchInterval:3e3})}function iK(){return Rr({queryKey:["market-cache"],queryFn:()=>Er("/market-cache").then(r=>r.entries),refetchInterval:1e4})}function oK(){return Rr({queryKey:["supplier-verify"],queryFn:()=>Er("/supplier-verify").then(r=>r.entries),refetchInterval:15e3})}function iG(r){return Rr({queryKey:["imported-summary",r],queryFn:()=>{const e=r?new URLSearchParams(Object.fromEntries(Object.entries(r).filter(([,t])=>t))).toString():"";return Er(`/imported/summary${e?`?${e}`:""}`)},refetchInterval:15e3})}function sK(){return Rr({queryKey:["settlement-fee-rules"],queryFn:()=>Er("/settlement/fee-rules"),staleTime:1e4})}function lK(r,e){const t=r||e?`?${new URLSearchParams(Object.fromEntries([r?["from",r]:null,e?["to",e]:null].filter(Boolean)))}`:"";return Rr({queryKey:["deposit-schedule",r,e],queryFn:()=>Er(`/settlement/deposit-schedule${t}`).then(n=>n.schedule),staleTime:3e4})}function uK(r,e,t=!0){return Rr({queryKey:["smartstore-daily",r,e],queryFn:()=>Er(`/settlement/smartstore/daily?orderFrom=${r}&orderTo=${e}`),enabled:t&&!!r&&!!e,staleTime:5*6e4})}function cK(r,e,t=!0){return Rr({queryKey:["smartstore-order-settlement",r,e],queryFn:()=>Er(`/settlement/smartstore/order?orderId=${r}&payDate=${e}`),enabled:t&&!!r&&!!e,staleTime:10*6e4})}function fK(r,e=!0){return Rr({queryKey:["coupang-monthly",r],queryFn:()=>Er(`/settlement/coupang/monthly?yearMonth=${r}`),enabled:e&&!!r,staleTime:5*6e4})}function hK(r,e,t=!0){return Rr({queryKey:["coupang-reconcile",r,e],queryFn:()=>Er(`/settlement/coupang/reconcile?from=${r}&to=${e}`),enabled:t&&!!r&&!!e,staleTime:5*6e4})}function oG(r){return Rr({queryKey:["orders",r],queryFn:()=>{const e=r?new URLSearchParams(r).toString():"";return Er(`/orders${e?`?${e}`:""}`)},staleTime:3e4})}function sG(r){return Rr({queryKey:["product-catalog",r],queryFn:()=>{const e=r?new URLSearchParams(r).toString():"";return Er(`/product-catalog${e?`?${e}`:""}`)},staleTime:3e4})}function dK(){return Rr({queryKey:["trend-status"],queryFn:()=>Er("/trend/status"),staleTime:3e4})}async function vK(r){const e=await fetch(`/api/trend/keyword?q=${encodeURIComponent(r)}`);if(!e.ok)throw new Error(`API /trend/keyword failed: ${e.status}`);return e.json()}async function pK(r,e=20){const t=await fetch(`/api/trend/platform?id=${encodeURIComponent(r)}&limit=${e}`);if(!t.ok)throw new Error(`API /trend/platform failed: ${t.status}`);return t.json()}function gK(){return Rr({queryKey:["trend-history"],queryFn:()=>Er("/trend/history?limit=50"),staleTime:5e3,refetchInterval:1e4})}async function mK(){const r=await fetch("/api/orders/sync",{method:"POST"});if(!r.ok)throw new Error(`API /orders/sync failed: ${r.status}`);return r.json()}function lG(){const r=uV(),[e,t]=q.useState(!1),[n,a]=q.useState(null);async function i(){t(!0),a(null);try{const o=await mK();a(`${o.synced}건 동기화 완료`),r.invalidateQueries()}catch{a("동기화 실패")}finally{t(!1)}}return{syncing:e,syncResult:n,handleSync:i}}function yK(){return Rr({queryKey:["config"],queryFn:()=>Er("/config"),staleTime:5e3})}function xK(){return Rr({queryKey:["weekly-stats"],queryFn:()=>Er("/stats/weekly"),staleTime:3e5})}function bK(){return Rr({queryKey:["period-stats"],queryFn:()=>Er("/stats/period"),refetchInterval:6e4})}async function _K(r){const e=await fetch("/api/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!e.ok)throw new Error(`PUT /api/config failed: ${e.status}`);return e.json()}/**
50
- * @license lucide-react v0.469.0 - ISC
51
- *
52
- * This source code is licensed under the ISC license.
53
- * See the LICENSE file in the root directory of this source tree.
54
- */const SK=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),uG=(...r)=>r.filter((e,t,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===t).join(" ").trim();/**
55
- * @license lucide-react v0.469.0 - ISC
56
- *
57
- * This source code is licensed under the ISC license.
58
- * See the LICENSE file in the root directory of this source tree.
59
- */var wK={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"};/**
60
- * @license lucide-react v0.469.0 - ISC
61
- *
62
- * This source code is licensed under the ISC license.
63
- * See the LICENSE file in the root directory of this source tree.
64
- */const TK=q.forwardRef(({color:r="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:o,...s},l)=>q.createElement("svg",{ref:l,...wK,width:e,height:e,stroke:r,strokeWidth:n?Number(t)*24/Number(e):t,className:uG("lucide",a),...s},[...o.map(([u,c])=>q.createElement(u,c)),...Array.isArray(i)?i:[i]]));/**
65
- * @license lucide-react v0.469.0 - ISC
66
- *
67
- * This source code is licensed under the ISC license.
68
- * See the LICENSE file in the root directory of this source tree.
69
- */const Mt=(r,e)=>{const t=q.forwardRef(({className:n,...a},i)=>q.createElement(TK,{ref:i,iconNode:e,className:uG(`lucide-${SK(r)}`,n),...a}));return t.displayName=`${r}`,t};/**
70
- * @license lucide-react v0.469.0 - ISC
71
- *
72
- * This source code is licensed under the ISC license.
73
- * See the LICENSE file in the root directory of this source tree.
74
- */const CK=Mt("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
75
- * @license lucide-react v0.469.0 - ISC
76
- *
77
- * This source code is licensed under the ISC license.
78
- * See the LICENSE file in the root directory of this source tree.
79
- */const Vp=Mt("ChartNoAxesColumn",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]]);/**
80
- * @license lucide-react v0.469.0 - ISC
81
- *
82
- * This source code is licensed under the ISC license.
83
- * See the LICENSE file in the root directory of this source tree.
84
- */const cG=Mt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
85
- * @license lucide-react v0.469.0 - ISC
86
- *
87
- * This source code is licensed under the ISC license.
88
- * See the LICENSE file in the root directory of this source tree.
89
- */const _n=Mt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
90
- * @license lucide-react v0.469.0 - ISC
91
- *
92
- * This source code is licensed under the ISC license.
93
- * See the LICENSE file in the root directory of this source tree.
94
- */const AK=Mt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
95
- * @license lucide-react v0.469.0 - ISC
96
- *
97
- * This source code is licensed under the ISC license.
98
- * See the LICENSE file in the root directory of this source tree.
99
- */const On=Mt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
100
- * @license lucide-react v0.469.0 - ISC
101
- *
102
- * This source code is licensed under the ISC license.
103
- * See the LICENSE file in the root directory of this source tree.
104
- */const fG=Mt("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"}]]);/**
105
- * @license lucide-react v0.469.0 - ISC
106
- *
107
- * This source code is licensed under the ISC license.
108
- * See the LICENSE file in the root directory of this source tree.
109
- */const MK=Mt("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
110
- * @license lucide-react v0.469.0 - ISC
111
- *
112
- * This source code is licensed under the ISC license.
113
- * See the LICENSE file in the root directory of this source tree.
114
- */const DK=Mt("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
115
- * @license lucide-react v0.469.0 - ISC
116
- *
117
- * This source code is licensed under the ISC license.
118
- * See the LICENSE file in the root directory of this source tree.
119
- */const NK=Mt("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
120
- * @license lucide-react v0.469.0 - ISC
121
- *
122
- * This source code is licensed under the ISC license.
123
- * See the LICENSE file in the root directory of this source tree.
124
- */const gM=Mt("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"}]]);/**
125
- * @license lucide-react v0.469.0 - ISC
126
- *
127
- * This source code is licensed under the ISC license.
128
- * See the LICENSE file in the root directory of this source tree.
129
- */const II=Mt("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
130
- * @license lucide-react v0.469.0 - ISC
131
- *
132
- * This source code is licensed under the ISC license.
133
- * See the LICENSE file in the root directory of this source tree.
134
- */const LK=Mt("History",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
135
- * @license lucide-react v0.469.0 - ISC
136
- *
137
- * This source code is licensed under the ISC license.
138
- * See the LICENSE file in the root directory of this source tree.
139
- */const hG=Mt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
140
- * @license lucide-react v0.469.0 - ISC
141
- *
142
- * This source code is licensed under the ISC license.
143
- * See the LICENSE file in the root directory of this source tree.
144
- */const RK=Mt("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"}]]);/**
145
- * @license lucide-react v0.469.0 - ISC
146
- *
147
- * This source code is licensed under the ISC license.
148
- * See the LICENSE file in the root directory of this source tree.
149
- */const EK=Mt("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
150
- * @license lucide-react v0.469.0 - ISC
151
- *
152
- * This source code is licensed under the ISC license.
153
- * See the LICENSE file in the root directory of this source tree.
154
- */const kK=Mt("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);/**
155
- * @license lucide-react v0.469.0 - ISC
156
- *
157
- * This source code is licensed under the ISC license.
158
- * See the LICENSE file in the root directory of this source tree.
159
- */const OI=Mt("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
160
- * @license lucide-react v0.469.0 - ISC
161
- *
162
- * This source code is licensed under the ISC license.
163
- * See the LICENSE file in the root directory of this source tree.
164
- */const dG=Mt("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
165
- * @license lucide-react v0.469.0 - ISC
166
- *
167
- * This source code is licensed under the ISC license.
168
- * See the LICENSE file in the root directory of this source tree.
169
- */const IK=Mt("Receipt",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]]);/**
170
- * @license lucide-react v0.469.0 - ISC
171
- *
172
- * This source code is licensed under the ISC license.
173
- * See the LICENSE file in the root directory of this source tree.
174
- */const P0=Mt("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/**
175
- * @license lucide-react v0.469.0 - ISC
176
- *
177
- * This source code is licensed under the ISC license.
178
- * See the LICENSE file in the root directory of this source tree.
179
- */const vG=Mt("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"}]]);/**
180
- * @license lucide-react v0.469.0 - ISC
181
- *
182
- * This source code is licensed under the ISC license.
183
- * See the LICENSE file in the root directory of this source tree.
184
- */const pG=Mt("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"}]]);/**
185
- * @license lucide-react v0.469.0 - ISC
186
- *
187
- * This source code is licensed under the ISC license.
188
- * See the LICENSE file in the root directory of this source tree.
189
- */const cx=Mt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
190
- * @license lucide-react v0.469.0 - ISC
191
- *
192
- * This source code is licensed under the ISC license.
193
- * See the LICENSE file in the root directory of this source tree.
194
- */const OK=Mt("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"}]]);/**
195
- * @license lucide-react v0.469.0 - ISC
196
- *
197
- * This source code is licensed under the ISC license.
198
- * See the LICENSE file in the root directory of this source tree.
199
- */const PK=Mt("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
200
- * @license lucide-react v0.469.0 - ISC
201
- *
202
- * This source code is licensed under the ISC license.
203
- * See the LICENSE file in the root directory of this source tree.
204
- */const gG=Mt("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
205
- * @license lucide-react v0.469.0 - ISC
206
- *
207
- * This source code is licensed under the ISC license.
208
- * See the LICENSE file in the root directory of this source tree.
209
- */const mG=Mt("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
210
- * @license lucide-react v0.469.0 - ISC
211
- *
212
- * This source code is licensed under the ISC license.
213
- * See the LICENSE file in the root directory of this source tree.
214
- */const ll=Mt("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
215
- * @license lucide-react v0.469.0 - ISC
216
- *
217
- * This source code is licensed under the ISC license.
218
- * See the LICENSE file in the root directory of this source tree.
219
- */const yG=Mt("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"}]]);/**
220
- * @license lucide-react v0.469.0 - ISC
221
- *
222
- * This source code is licensed under the ISC license.
223
- * See the LICENSE file in the root directory of this source tree.
224
- */const oc=Mt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
225
- * @license lucide-react v0.469.0 - ISC
226
- *
227
- * This source code is licensed under the ISC license.
228
- * See the LICENSE file in the root directory of this source tree.
229
- */const zK=Mt("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"}]]),jK={cafe24:"카페24",coupang:"쿠팡",smartstore:"스마트스토어",shopify:"Shopify",domeggook:"도매꾹",specialoffer:"특가몰",cjdropshipping:"CJ Dropshipping"},BK={cafe24:"bg-blue-500",coupang:"bg-orange-500",smartstore:"bg-green-500",shopify:"bg-emerald-600",domeggook:"bg-violet-500",specialoffer:"bg-pink-500",cjdropshipping:"bg-sky-500"};function VK({channel:r,connected:e,storeId:t,rateLimit:n,intervalMs:a,webhook:i,hint:o,keyExpiry:s,isSourcing:l,dailyLimit:u}){const c=jK[r]??r,f=BK[r]??"bg-muted",d=s!==void 0&&s<=14;return S.jsxs("div",{className:Ge("border border-border rounded-lg p-5",!e&&"opacity-60"),children:[S.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[S.jsx("div",{className:Ge("w-2 h-2 rounded-full",f)}),S.jsx("span",{className:"font-medium text-[14px]",children:c}),S.jsx("div",{className:"ml-auto",children:e?S.jsx(MK,{size:16,className:"text-green-500"}):S.jsx(DK,{size:16,className:"text-muted-foreground/50"})})]}),e?S.jsxs("div",{className:"space-y-2",children:[t&&S.jsxs("div",{className:"flex justify-between text-[12px]",children:[S.jsx("span",{className:"text-muted-foreground",children:"스토어 ID"}),S.jsx("span",{className:"font-mono text-[11px]",children:t})]}),S.jsxs("div",{className:"flex justify-between text-[12px]",children:[S.jsx("span",{className:"text-muted-foreground",children:"Rate limit"}),S.jsxs("span",{children:[n," rps"]})]}),u&&S.jsxs("div",{className:"flex justify-between text-[12px]",children:[S.jsx("span",{className:"text-muted-foreground",children:"일일 한도"}),S.jsxs("span",{children:[u.toLocaleString(),"회"]})]}),!l&&i!==void 0&&S.jsxs("div",{className:"flex justify-between text-[12px]",children:[S.jsx("span",{className:"text-muted-foreground",children:"웹훅"}),S.jsx("span",{className:i?"text-green-600":"text-muted-foreground",children:i?"지원":"미지원"})]}),d&&s!==void 0&&S.jsxs("div",{className:"flex items-center gap-1.5 mt-2 text-[11px] text-amber-600 bg-amber-50 dark:bg-amber-950/30 border border-amber-200 dark:border-amber-800 rounded px-2 py-1",children:[S.jsx(yG,{size:11}),"API 키 ",s,"일 후 만료"]})]}):S.jsxs("div",{className:"text-[11px] text-muted-foreground space-y-1",children:[S.jsx("div",{className:"mb-2",children:"연결되지 않은 채널"}),S.jsx("div",{className:"font-mono bg-muted/50 rounded px-2 py-1.5 break-all leading-relaxed",children:o}),S.jsxs("div",{className:"mt-2 text-[10px]",children:[S.jsx("code",{children:"sppt init"}),"으로 설정"]})]})]})}function GK(){const{data:r,isLoading:e}=Ng(),t=(r==null?void 0:r.channels.filter(n=>n.connected).length)??0;return e?S.jsxs("div",{children:[S.jsx("h2",{className:"text-xl font-medium mb-6",children:"채널 연동"}),S.jsx("div",{className:"text-sm text-muted-foreground",children:"로딩 중..."})]}):S.jsxs("div",{children:[S.jsxs("div",{className:"flex items-center justify-between mb-6",children:[S.jsx("h2",{className:"text-xl font-medium",children:"채널 연동"}),S.jsxs("div",{className:"text-[12px] text-muted-foreground",children:["판매 ",t,"/5 연결"]})]}),S.jsxs("div",{children:[S.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider mb-3",children:"판매 채널"}),S.jsx("div",{className:"grid grid-cols-2 gap-3",children:r==null?void 0:r.channels.map(n=>S.jsx(VK,{channel:n.channel,connected:n.connected,storeId:n.storeId,rateLimit:n.rateLimit,intervalMs:n.intervalMs,webhook:n.webhook,hint:n.hint,keyExpiry:n.keyExpiry},n.channel))})]})]})}const HK={cafe24:{label:"카페24",guide:"https://developers.cafe24.com",cliNote:"sppt config set cafe24 storeId <mallId>",fields:[{key:"storeId",label:"스토어 ID (mallId)",type:"text",placeholder:"mymall"},{key:"clientId",label:"Client ID",type:"text"},{key:"clientSecret",label:"Client Secret",type:"password"},{key:"accessToken",label:"Access Token",type:"text",readOnly:!0,hint:"OAuth 인증 후 자동 발급·갱신"}]},coupang:{label:"쿠팡",guide:"https://wing.coupang.com",cliNote:"sppt config set coupang storeId <vendorId>",ipNote:`Wing 포털 → 판매자정보 → Open API → IP 관리에서 아래 IP를 등록해야 합니다.
230
- 209.71.88.61 (shopport 프록시 서버)`,fields:[{key:"storeId",label:"Vendor ID",type:"text",placeholder:"A00123456"},{key:"accessKey",label:"Access Key",type:"text"},{key:"secretKey",label:"Secret Key",type:"password"},{key:"keyExpiresAt",label:"키 만료일",type:"text",readOnly:!0,hint:"키 생성 후 180일. CLI에서 accessKey 입력 시 자동 계산"},{key:"vendorUserId",label:"Wing 포털 ID",type:"text",optional:!0},{key:"outboundShippingPlaceCode",label:"출고지 코드",type:"number",optional:!0,hint:"Wing → 판매자정보 → 출고지 관리"},{key:"returnCenterCode",label:"반품지 코드",type:"text",optional:!0}]},smartstore:{label:"스마트스토어",guide:"https://sell.smartstore.naver.com",cliNote:"sppt config set smartstore clientId <id>",ipNote:`네이버 커머스 API → 애플리케이션 관리 → IP 허용 목록에서 아래 IP를 등록해야 합니다.
231
- 209.71.88.61 (shopport 프록시 서버)`,fields:[{key:"clientId",label:"애플리케이션 ID",type:"text"},{key:"clientSecret",label:"애플리케이션 시크릿",type:"password"},{key:"accessToken",label:"Access Token",type:"text",readOnly:!0,hint:"자동 발급·갱신"},{key:"quickSettlement",label:"빠른정산 사용 중",type:"boolean",optional:!0,hint:"체크 시 정산 기준일이 구매확정일 대신 집화처리일로 계산됩니다"}]},shopify:{label:"Shopify",guide:"https://admin.shopify.com",cliNote:"sppt config set shopify storeId <domain>",fields:[{key:"storeId",label:"스토어 도메인",type:"text",placeholder:"mystore.myshopify.com"},{key:"accessToken",label:"Access Token",type:"password",hint:"Shopify Admin → Apps → 앱 개발 → Token 발급"},{key:"apiVersion",label:"API Version",type:"text",placeholder:"2024-10"}]},"toss-shopping":{label:"토스쇼핑",guide:"https://shopping-seller.toss.im/integration-key",cliNote:"sppt config set toss-shopping clientId <id>",fields:[{key:"clientId",label:"Client ID",type:"text",hint:"토스쇼핑 셀러 포털 → 연동 키 관리"},{key:"clientSecret",label:"Client Secret",type:"password"},{key:"accessToken",label:"Access Token",type:"text",readOnly:!0,hint:"자동 갱신"}]},"29cm":{label:"29CM",guide:"https://openapi.29cm.co.kr",cliNote:"sppt config set 29cm clientId <id>",fields:[{key:"clientId",label:"Client ID",type:"text",hint:"29CM 파트너 포털(29Connect)에서 발급"},{key:"clientSecret",label:"Client Secret",type:"password"},{key:"partnerKey",label:"Partner Key",type:"password",hint:"상품 API 전용 키 (별도 발급)"},{key:"accessToken",label:"Access Token",type:"text",readOnly:!0,hint:"자동 갱신"}]},musinsa:{label:"무신사",guide:"https://partners.musinsa.com",cliNote:"sppt config set musinsa apiKey <key>",fields:[{key:"apiKey",label:"API Key",type:"text",hint:"⚠️ 2026-04 현재 공개 API 미제공 — EDI 계약 필요"},{key:"apiSecret",label:"API Secret",type:"password"}]},oliveyoung:{label:"올리브영 파트너 · 브라우저",guide:"https://partner.oliveyoung.co.kr",cliNote:"sppt init browser oliveyoung",fields:[{key:"id",label:"파트너 ID",type:"text",hint:"partner.oliveyoung.co.kr 로그인 ID"},{key:"password",label:"비밀번호",type:"password"}]},kurly:{label:"컬리 파트너 오피스 · 브라우저",guide:"https://3p-partner.kurly.com",cliNote:"sppt init browser kurly",fields:[{key:"id",label:"파트너 ID (이메일)",type:"text"},{key:"password",label:"비밀번호",type:"password"}]},ohouse:{label:"오늘의집 파트너센터 · 브라우저",guide:"https://partner.ohou.se",cliNote:"sppt init browser ohouse",fields:[{key:"id",label:"파트너 ID",type:"text"},{key:"password",label:"비밀번호",type:"password"}]}},FK=new Set(["oliveyoung","kurly","ohouse"]),UK={domeggook:{label:"도매꾹",guide:"https://mobile.domeggook.com/openAPI/management",cliNote:"sppt config set domeggook apiKey <key>",fields:[{key:"apiKey",label:"API Key",type:"password"}]},domemae:{label:"도매매",cliNote:"sppt config set domemae apiKey <key>",fields:[{key:"apiKey",label:"API Key",type:"password",hint:"도매꾹 API Key 공유 (동일 계정)"}]},specialoffer:{label:"스페셜오퍼",cliNote:"sppt config set specialoffer apiKey <key>",fields:[{key:"apiKey",label:"API Key",type:"password"}]},cjdropshipping:{label:"CJ Dropshipping",guide:"https://cjdropshipping.com",cliNote:"sppt config set cjdropshipping accessToken <token>",fields:[{key:"accessToken",label:"Access Token",type:"password",hint:"CJ Dropshipping 셀러 센터에서 발급"}]}},YK={"naver-datalab":{label:"네이버 데이터랩",guide:"https://developers.naver.com/apps",cliNote:"sppt config set naver-datalab clientId <id>",proxyNote:"shopport 공용 키로 검색 트렌드를 조회합니다. 월 요청량이 많거나 전용 키가 필요하면 직접 설정하세요.",fields:[{key:"clientId",label:"Client ID",type:"text",hint:"네이버 개발자 센터 → 내 애플리케이션"},{key:"clientSecret",label:"Client Secret",type:"password"}]},"naver-searchad":{label:"네이버 검색광고",guide:"https://searchad.naver.com",cliNote:"sppt config set naver-searchad customerId <id>",proxyNote:"shopport 공용 키로 키워드 검색량을 조회합니다. 직접 계정을 연결하면 더 정확한 데이터를 얻을 수 있습니다.",fields:[{key:"customerId",label:"Customer ID",type:"text",hint:"네이버 검색광고 → API 관리"},{key:"accessLicense",label:"Access License",type:"text"},{key:"secretKey",label:"Secret Key",type:"password"}]},"naver-shopping":{label:"네이버 쇼핑",guide:"https://developers.naver.com/apps",cliNote:"sppt config set naver-shopping clientId <id>",proxyNote:"shopport 공용 키로 네이버 쇼핑 데이터를 조회합니다. 직접 설정 시 네이버 개발자 센터에서 발급하세요.",fields:[{key:"clientId",label:"Client ID",type:"text"},{key:"clientSecret",label:"Client Secret",type:"password"}]}},WK={"dada-erp":{label:"DADA ERP (세이고)",cliNote:"sppt config set dada-erp apiKey <key>",fields:[{key:"apiKey",label:"API Key",type:"password",hint:"세이고 ERP → 시스템설정 → API 관리"},{key:"apiSecret",label:"API Secret",type:"password"},{key:"companyCode",label:"업체 코드",type:"text",optional:!0}]},ezadmin:{label:"이지어드민",cliNote:"sppt config set ezadmin apiKey <key>",fields:[{key:"apiKey",label:"API Key",type:"password",hint:"이지어드민 → 환경설정 → API 연동 관리"},{key:"shopCode",label:"쇼핑몰 코드",type:"text",hint:"가입 시 부여된 코드 (예: SHOP001)"}]},onewms:{label:"OneWMS",cliNote:"sppt config set onewms apiKey <key>",fields:[{key:"apiKey",label:"API Key",type:"password",hint:"OneWMS → 관리 → API 설정"},{key:"warehouseCode",label:"창고 코드",type:"text"},{key:"clientCode",label:"고객사 코드",type:"text",optional:!0}]},sabangnet:{label:"사방넷",cliNote:"sppt config set sabangnet sabangId <id>",fields:[{key:"sabangId",label:"아이디",type:"text"},{key:"sabangKey",label:"API Key",type:"password",hint:"사방넷 → 기본설정 → API 설정"}]},boxhero:{label:"박스히어로",guide:"https://www.boxhero.io",cliNote:"sppt config set boxhero accessToken <token>",fields:[{key:"accessToken",label:"Access Token",type:"password",hint:"BoxHero → Settings → Integrations → Open API"},{key:"teamId",label:"팀 ID",type:"text",optional:!0}]},"ecount-erp":{label:"이카운트ERP",cliNote:"sppt config set ecount-erp companyCode <code>",fields:[{key:"companyCode",label:"회사 코드",type:"text",hint:"로그인 화면에서 확인"},{key:"userId",label:"아이디",type:"text"},{key:"apiKey",label:"API Key",type:"password",hint:"ERP → 시스템관리 → Open API 설정"},{key:"zoneCode",label:"Zone 코드 (A~E)",type:"text",optional:!0}]},"douzone-wehago":{label:"더존 WEHAGO",guide:"https://developer.wehago.com",cliNote:"sppt config set douzone-wehago clientId <id>",fields:[{key:"clientId",label:"Client ID",type:"text",hint:"더존 개발자 포털에서 발급"},{key:"clientSecret",label:"Client Secret",type:"password"},{key:"companyCode",label:"회사 코드",type:"text"},{key:"accessToken",label:"Access Token",type:"text",readOnly:!0,hint:"자동 갱신"}]},playauto:{label:"플레이오토",guide:"https://plto.com/additional/API/",cliNote:"sppt config set playauto apiKey <key>",fields:[{key:"apiKey",label:"API Key",type:"password"},{key:"apiSecret",label:"API Secret",type:"password"},{key:"shopId",label:"쇼핑몰 ID",type:"text",optional:!0}]},argo:{label:"아르고 풀필먼트",cliNote:"sppt config set argo apiKey <key>",fields:[{key:"apiKey",label:"API Key",type:"password"},{key:"clientCode",label:"고객사 코드",type:"text",optional:!0}]},poomgo:{label:"품고",cliNote:"sppt config set poomgo apiKey <key>",fields:[{key:"apiKey",label:"API Key",type:"password"},{key:"warehouseCode",label:"창고 코드",type:"text",optional:!0}]}};function vv({schema:r,current:e,onSave:t,saving:n,saved:a}){const i=r.fields.filter(y=>!y.readOnly),o=r.fields.filter(y=>y.readOnly),s=i.some(y=>{const b=e[y.key];return b!==void 0&&b!==""&&b!==null}),l=i.some(y=>{const b=e[y.key];return b!==void 0&&b!==""&&b!==null}),[u,c]=q.useState(s),[f,d]=q.useState(!r.proxyNote||l),[v,g]=q.useState(()=>{const y={};for(const b of i){const w=e[b.key];b.type==="boolean"?y[b.key]=!!w:b.type==="number"?y[b.key]=w!==void 0&&w!==""?Number(w):"":y[b.key]=String(w??"")}return y});function x(){if(!i.some(w=>{const T=v[w.key];return T!==""&&T!==void 0})){t({});return}const b={...e};for(const w of i){const T=v[w.key];T!==""&&T!==void 0?b[w.key]=T:delete b[w.key]}t(b)}return S.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[S.jsxs("button",{type:"button",onClick:()=>c(y=>!y),className:"w-full flex items-center justify-between px-4 py-2.5 text-[13px] hover:bg-muted/30 transition-colors",children:[S.jsxs("span",{className:"flex items-center gap-2",children:[u?S.jsx(_n,{size:13,className:"text-muted-foreground"}):S.jsx(On,{size:13,className:"text-muted-foreground"}),S.jsx("span",{className:"font-medium",children:r.label}),s&&S.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0"})]}),S.jsx("span",{className:"text-[11px] text-muted-foreground",children:s?S.jsx("span",{className:"text-emerald-600",children:"연결됨"}):r.proxyNote&&!l?S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx(OI,{size:10})," 공용 키"]}):null})]}),u&&S.jsxs("div",{className:"border-t border-border bg-muted/10",children:[(r.guide||r.cliNote)&&S.jsxs("div",{className:"px-4 pt-3 pb-2 flex items-center gap-4 text-[11px] text-muted-foreground border-b border-border/50",children:[r.guide&&S.jsxs("a",{href:r.guide,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1 hover:text-foreground transition-colors",onClick:y=>y.stopPropagation(),children:[S.jsx(gM,{size:10}),"자격증명 발급"]}),r.cliNote&&S.jsx("code",{className:"font-mono text-[10px] bg-muted px-1.5 py-0.5 rounded text-foreground/70",children:r.cliNote})]}),r.ipNote&&S.jsx("div",{className:"px-4 py-2.5 bg-amber-50 dark:bg-amber-950/30 border-b border-amber-200/60 dark:border-amber-800/40",children:r.ipNote.split(`
232
- `).map((y,b)=>b===0?S.jsx("p",{className:"text-[11px] text-amber-800 dark:text-amber-300",children:y},y):S.jsx("p",{className:"mt-0.5 font-mono text-[12px] font-semibold text-amber-900 dark:text-amber-200 select-all",children:y},y))}),r.proxyNote&&!f?S.jsxs("div",{className:"px-4 py-4 flex items-start justify-between gap-4",children:[S.jsx("div",{className:"space-y-1",children:S.jsx("p",{className:"text-[12px] text-foreground/80",children:r.proxyNote})}),S.jsxs("button",{type:"button",onClick:()=>d(!0),className:"shrink-0 flex items-center gap-1.5 px-3 py-1.5 text-[11px] border border-border rounded hover:bg-muted transition-colors",children:[S.jsx(kK,{size:10}),"직접 설정"]})]}):S.jsxs("div",{className:"px-4 py-4 space-y-2.5",children:[r.proxyNote&&f&&S.jsxs("div",{className:"flex items-center justify-between pb-1 border-b border-border/50",children:[S.jsx("span",{className:"text-[11px] text-muted-foreground",children:"직접 설정 중"}),S.jsxs("button",{type:"button",onClick:()=>d(!1),className:"flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground",children:[S.jsx(OI,{size:10})," 공용 키로 전환"]})]}),i.map(y=>S.jsxs("div",{className:"grid grid-cols-[190px_1fr] items-start gap-3",children:[S.jsxs("span",{className:Ge("text-[12px] text-right pt-1.5 leading-tight",y.optional?"text-muted-foreground/60":"text-muted-foreground"),children:[y.label,y.optional&&S.jsx("span",{className:"ml-1 text-[10px]",children:"(선택)"})]}),S.jsxs("div",{className:"space-y-0.5",children:[y.type==="boolean"?S.jsx("input",{type:"checkbox",checked:!!v[y.key],onChange:b=>g(w=>({...w,[y.key]:b.target.checked})),className:"w-4 h-4 accent-primary mt-1.5"}):S.jsx("input",{type:y.type==="password"?"password":y.type==="number"?"number":"text",value:String(v[y.key]??""),placeholder:y.placeholder??"",onChange:b=>g(w=>({...w,[y.key]:b.target.value})),className:"h-7 px-2 text-[12px] border border-border rounded bg-background w-full font-mono focus:outline-none focus:ring-1 focus:ring-primary/50"}),y.hint&&S.jsx("p",{className:"text-[10px] text-muted-foreground/70 pl-0.5",children:y.hint})]})]},y.key)),o.filter(y=>e[y.key]!==void 0&&e[y.key]!=="").map(y=>S.jsxs("div",{className:"grid grid-cols-[190px_1fr] items-start gap-3",children:[S.jsx("span",{className:"text-[12px] text-right pt-1.5 text-muted-foreground/50",children:y.label}),S.jsxs("div",{className:"space-y-0.5",children:[S.jsx("div",{className:"h-7 px-2 flex items-center",children:S.jsx("span",{className:"text-[12px] font-mono text-muted-foreground/70 truncate",children:y.type==="password"?"••••••••":String(e[y.key])})}),y.hint&&S.jsx("p",{className:"text-[10px] text-muted-foreground/50 pl-0.5",children:y.hint})]})]},y.key)),S.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[a&&S.jsxs("span",{className:"text-[11px] text-emerald-600 flex items-center gap-1",children:[S.jsx(cG,{size:11})," 저장됨"]}),S.jsxs("button",{type:"button",onClick:x,disabled:n,className:"flex items-center gap-1.5 px-3 py-1.5 text-[12px] bg-primary text-primary-foreground rounded hover:bg-primary/90 disabled:opacity-50 transition-colors",children:[S.jsx(pG,{size:11}),n?"저장 중...":"저장"]})]})]})]})]})}function vf({id:r,title:e,defaultOpen:t=!0,children:n}){const[a,i]=q.useState(t);return S.jsxs("div",{id:r,className:"space-y-2 scroll-mt-4",children:[S.jsxs("button",{type:"button",onClick:()=>i(o=>!o),className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground uppercase tracking-wider hover:text-foreground transition-colors w-full",children:[a?S.jsx(_n,{size:11}):S.jsx(On,{size:11}),e]}),a&&S.jsx("div",{className:"space-y-1.5",children:n})]})}const py=[{id:"cfg-seller",label:"사업자 정보"},{id:"cfg-sell",label:"판매 채널"},{id:"cfg-source",label:"소싱 채널"},{id:"cfg-trend",label:"트렌드 · 외부 도구"},{id:"cfg-logistics",label:"물류 채널"},{id:"cfg-advanced",label:"고급 설정"}];function XK(){const[r,e]=q.useState(py[0].id);q.useEffect(()=>{function n(){const a=window.innerHeight/3;let i=py[0].id;for(const{id:o}of py){const s=document.getElementById(o);s&&s.getBoundingClientRect().top<a&&(i=o)}e(i)}return window.addEventListener("scroll",n,{passive:!0}),()=>window.removeEventListener("scroll",n)},[]);function t(n){var a;(a=document.getElementById(n))==null||a.scrollIntoView({behavior:"smooth",block:"start"}),e(n)}return S.jsxs("nav",{className:"fixed top-8 right-6 w-36 z-20 pt-1",children:[S.jsx("p",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-2 px-2",children:"목차"}),S.jsx("ul",{className:"space-y-0.5",children:py.map(n=>S.jsx("li",{children:S.jsx("button",{type:"button",onClick:()=>t(n.id),className:Ge("w-full text-left text-[12px] px-2 py-1.5 rounded border-l-2 transition-colors leading-tight",r===n.id?"border-primary text-foreground font-medium bg-muted/60":"border-transparent text-muted-foreground hover:text-foreground hover:bg-muted/30"),children:n.label})},n.id))})]})}function pv({title:r,description:e,fields:t,values:n,onSave:a,saving:i,saved:o,defaultOpen:s=!1,cliNote:l}){const[u,c]=q.useState(s),[f,d]=q.useState(()=>{const y={};for(const b of t){const w=n[b.key];b.type==="boolean"?y[b.key]=!!w:b.type==="number"?y[b.key]=w!==void 0&&w!==""?Number(w):"":y[b.key]=String(w??"")}return y}),[v,g]=q.useState(n);if(n!==v){g(n);const y={};for(const b of t){const w=n[b.key];b.type==="boolean"?y[b.key]=!!w:b.type==="number"?y[b.key]=w!==void 0&&w!==""?Number(w):"":y[b.key]=String(w??"")}d(y)}function x(){const y={};for(const b of t){const w=f[b.key];w!==""&&w!==void 0&&(y[b.key]=w)}a(y)}return S.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[S.jsx("button",{type:"button",onClick:()=>c(y=>!y),className:"w-full flex items-center justify-between px-4 py-2.5 text-[13px] hover:bg-muted/30 transition-colors",children:S.jsxs("span",{className:"flex items-center gap-2",children:[u?S.jsx(_n,{size:13,className:"text-muted-foreground"}):S.jsx(On,{size:13,className:"text-muted-foreground"}),S.jsx("span",{className:"font-medium",children:r})]})}),u&&S.jsxs("div",{className:"border-t border-border bg-muted/10",children:[(e||l)&&S.jsxs("div",{className:"px-4 pt-3 pb-2 space-y-1 border-b border-border/50",children:[e&&S.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed",children:e}),l&&S.jsx("code",{className:"text-[10px] font-mono bg-muted px-1.5 py-0.5 rounded text-foreground/70",children:l})]}),S.jsxs("div",{className:"px-4 py-4 space-y-2.5",children:[t.map(y=>S.jsxs("div",{className:"grid grid-cols-[190px_1fr] items-start gap-3",children:[S.jsxs("span",{className:Ge("text-[12px] text-right pt-1.5 leading-tight",y.optional?"text-muted-foreground/60":"text-muted-foreground"),children:[y.label,y.optional&&S.jsx("span",{className:"ml-1 text-[10px]",children:"(선택)"})]}),S.jsxs("div",{className:"space-y-0.5",children:[y.type==="boolean"?S.jsx("input",{type:"checkbox",checked:!!f[y.key],onChange:b=>d(w=>({...w,[y.key]:b.target.checked})),className:"w-4 h-4 accent-primary mt-1.5"}):S.jsx("input",{type:y.type==="password"?"password":y.type==="number"?"number":"text",value:String(f[y.key]??""),placeholder:y.placeholder??"",onChange:b=>d(w=>({...w,[y.key]:b.target.value})),className:"h-7 px-2 text-[12px] border border-border rounded bg-background w-full font-mono focus:outline-none focus:ring-1 focus:ring-primary/50"}),y.hint&&S.jsx("p",{className:"text-[10px] text-muted-foreground/70 pl-0.5",children:y.hint})]})]},y.key)),S.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[o&&S.jsxs("span",{className:"text-[11px] text-emerald-600 flex items-center gap-1",children:[S.jsx(cG,{size:11})," 저장됨"]}),S.jsxs("button",{type:"button",onClick:x,disabled:i,className:"flex items-center gap-1.5 px-3 py-1.5 text-[12px] bg-primary text-primary-foreground rounded hover:bg-primary/90 disabled:opacity-50 transition-colors",children:[S.jsx(pG,{size:11}),i?"저장 중...":"저장"]})]})]})]})]})}function qK(){var d,v,g,x;const{data:r,isLoading:e,refetch:t}=yK(),[n,a]=q.useState(null),[i,o]=q.useState({}),[s,l]=q.useState({});q.useEffect(()=>{r&&a(r)},[r]);async function u(y,b){a(b),o(w=>({...w,[y]:!0}));try{await _K(b),l(w=>({...w,[y]:!0})),setTimeout(()=>l(w=>({...w,[y]:!1})),2e3),t()}finally{o(w=>({...w,[y]:!1}))}}function c(y,b){return w=>{if(!n)return;const T=`${y}.${b}`,C={...n[y]??{}};Object.keys(w).length>0?C[b]={...w,channel:b}:delete C[b],u(T,{...n,[y]:C})}}const f=y=>({saving:!!i[y],saved:!!s[y]});return e||!n?S.jsx("div",{className:"text-[13px] text-muted-foreground p-4",children:"설정 불러오는 중..."}):S.jsxs("div",{className:"flex gap-8 mx-auto max-w-[860px]",children:[S.jsxs("div",{className:"flex-1 min-w-0 space-y-8",children:[S.jsxs("div",{children:[S.jsx("h2",{className:"text-[17px] font-semibold",children:"설정"}),S.jsx("p",{className:"text-[12px] text-muted-foreground mt-0.5",children:"~/.shopport/config.json 과 양방향 동기화됩니다."}),S.jsxs("div",{className:"mt-2 px-3 py-2 bg-muted/50 rounded-lg border border-border/60 text-[11px] text-muted-foreground",children:["커맨드라인에서도 설정 가능:",S.jsx("code",{className:"ml-2 font-mono text-foreground/70",children:"sppt config set <채널> <키> <값>"}),S.jsx("span",{className:"mx-2 text-border",children:"·"}),S.jsx("code",{className:"font-mono text-foreground/70",children:"sppt config list"})]})]}),S.jsxs(vf,{id:"cfg-seller",title:"사업자 정보",children:[S.jsx(pv,{title:"사업자 기본 정보",description:"오픈마켓 입점 및 채널 온보딩에 활용됩니다. 사업자등록번호·통신판매업 신고번호는 쿠팡·스마트스토어 등 판매의 필수 전제 조건입니다.",cliNote:"sppt config set seller businessRegNumber <번호>",defaultOpen:!0,fields:[{key:"businessRegNumber",label:"사업자등록번호",type:"text",placeholder:"123-45-67890"},{key:"mailOrderRegNumber",label:"통신판매업 신고번호",type:"text",placeholder:"2024-서울강남-12345"},{key:"businessName",label:"상호명",type:"text"},{key:"representative",label:"대표자명",type:"text"}],values:n.seller??{},onSave:y=>u("seller",{...n,seller:y}),...f("seller")}),S.jsx(pv,{title:"연 매출 설정",description:"스마트스토어 Npay 등급, 카페24 카드 영중소 우대 등 채널별 수수료율이 연 매출 기준으로 결정됩니다. 대략적인 연 매출을 입력하면 정산 페이지의 수수료율 계산 정확도가 높아집니다.",defaultOpen:!0,fields:[{key:"annualRevenue",label:"연 매출 (원)",type:"number",placeholder:"500000000",optional:!0,hint:"정확하지 않아도 됩니다. 대략적인 구간만 맞아도 등급 판정에 충분합니다."}],values:{annualRevenue:((d=n.settlement)==null?void 0:d.annualRevenue)??""},onSave:y=>u("settlement.annualRevenue",{...n,settlement:{...n.settlement??{},annualRevenue:y.annualRevenue?Number(y.annualRevenue):void 0}}),...f("settlement.annualRevenue")})]}),S.jsx(vf,{id:"cfg-sell",title:"판매 채널",children:Object.entries(HK).map(([y,b])=>{var T,C;const w=FK.has(y);return S.jsx(vv,{schema:b,current:w?((T=n.browserChannels)==null?void 0:T[y])??{}:((C=n.channels)==null?void 0:C[y])??{},onSave:c(w?"browserChannels":"channels",y),...f(`${w?"browserChannels":"channels"}.${y}`)},y)})}),S.jsx(vf,{id:"cfg-source",title:"소싱 채널",children:Object.entries(UK).map(([y,b])=>{var w;return S.jsx(vv,{schema:b,current:((w=n.sourceChannels)==null?void 0:w[y])??{},onSave:c("sourceChannels",y),...f(`sourceChannels.${y}`)},y)})}),S.jsxs(vf,{id:"cfg-trend",title:"트렌드 · 외부 도구",children:[Object.entries(YK).map(([y,b])=>{var w;return S.jsx(vv,{schema:b,current:((w=n.trendChannels)==null?void 0:w[y])??{},onSave:c("trendChannels",y),...f(`trendChannels.${y}`)},y)}),S.jsx(vv,{schema:{label:"Apify",guide:"https://console.apify.com/account/integrations",cliNote:"sppt config set apify apiToken <token>",proxyNote:"shopport 공용 Apify 계정으로 전문몰 랭킹 등을 수집합니다. 크롤링 한도가 부족하거나 전용 계정이 필요하면 직접 설정하세요.",fields:[{key:"apiToken",label:"API Token",type:"password",hint:"Apify Console → Settings → Integrations"}]},current:n.apify??{},onSave:y=>u("apify",{...n,apify:y}),...f("apify")})]}),S.jsx(vf,{id:"cfg-logistics",title:"물류 채널",defaultOpen:!1,children:Object.entries(WK).map(([y,b])=>{var w;return S.jsx(vv,{schema:b,current:((w=n.logisticsChannels)==null?void 0:w[y])??{},onSave:c("logisticsChannels",y),...f(`logisticsChannels.${y}`)},y)})}),S.jsxs(vf,{id:"cfg-advanced",title:"고급 설정",defaultOpen:!1,children:[S.jsx(pv,{title:"소싱 환율 (USD → KRW)",description:"중국·해외 소싱 상품의 원가를 원화로 계산할 때 사용합니다.",fields:[{key:"usdToKrw",label:"환율",type:"number",placeholder:"1380",hint:"기본값: 1380",optional:!0}],values:{usdToKrw:n.usdToKrw??""},onSave:y=>u("usdToKrw",{...n,usdToKrw:y.usdToKrw?Number(y.usdToKrw):void 0}),...f("usdToKrw")}),S.jsx(pv,{title:"DB 연결",description:"PostgreSQL에 운영 이력, 상품 매핑, 주문 내역을 저장합니다. 설정하지 않으면 로컬 파일(JSONL)에 저장됩니다.",fields:[{key:"url",label:"Connection URL",type:"text",placeholder:"postgresql://user:pass@host:5432/db",optional:!0}],values:{url:((v=n.database)==null?void 0:v.url)??""},onSave:y=>u("database",{...n,database:y.url?{url:String(y.url)}:void 0}),...f("database")}),S.jsx(pv,{title:"프록시 설정",description:"Fly.io 정적 IP 프록시를 통해 쿠팡 IP 화이트리스트를 우회합니다.",fields:[{key:"enabled",label:"사용",type:"boolean"},{key:"baseUrl",label:"프록시 URL",type:"text",placeholder:"https://rocketsell-proxy.fly.dev",optional:!0}],values:{enabled:((g=n.proxy)==null?void 0:g.enabled)??!1,baseUrl:((x=n.proxy)==null?void 0:x.baseUrl)??""},onSave:y=>u("proxy",{...n,proxy:{enabled:!!y.enabled,baseUrl:y.baseUrl?String(y.baseUrl):void 0}}),...f("proxy")})]})]}),S.jsx("div",{className:"w-36 shrink-0","aria-hidden":"true"}),S.jsx(XK,{})]})}const gv=r=>r.toISOString().slice(0,10),PI=r=>{const e=new Date;return e.setDate(e.getDate()-r),e};function mM({from:r,to:e,onChange:t,className:n}){var f;const a=gv(new Date),i=new Date,o=`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}-01`,s=gv(new Date(i.getFullYear(),i.getMonth()-1,1)),l=gv(new Date(i.getFullYear(),i.getMonth(),0)),u=[{label:"전체",from:"",to:""},{label:"오늘",from:a,to:a},{label:"7일",from:gv(PI(7)),to:a},{label:"이번 달",from:o,to:a},{label:"지난 달",from:s,to:l},{label:"3개월",from:gv(PI(90)),to:a}],c=((f=u.find(d=>d.from===r&&d.to===e))==null?void 0:f.label)??null;return S.jsxs("div",{className:Ge("flex items-center gap-2 flex-wrap",n),children:[S.jsx("div",{className:"flex items-center gap-1",children:u.map(({label:d,from:v,to:g})=>S.jsx("button",{type:"button",onClick:()=>t(v,g),className:Ge("text-[11px] px-2 py-0.5 rounded border cursor-pointer transition-colors",c===d?"border-primary/60 bg-primary/10 text-foreground font-medium":"border-border bg-card text-muted-foreground hover:text-foreground"),children:d},d))}),S.jsx("span",{className:"text-muted-foreground/30",children:"|"}),S.jsx("input",{type:"date",value:r,onChange:d=>t(d.target.value,e),className:"text-[12px] px-2 py-1 rounded-md border border-border bg-card outline-none"}),S.jsx("span",{className:"text-[11px] text-muted-foreground",children:"~"}),S.jsx("input",{type:"date",value:e,onChange:d=>t(r,d.target.value),className:"text-[12px] px-2 py-1 rounded-md border border-border bg-card outline-none"}),(!!r||!!e)&&c===null&&S.jsxs("button",{type:"button",onClick:()=>t("",""),className:"text-[11px] text-muted-foreground hover:text-foreground flex items-center gap-0.5 cursor-pointer",children:[S.jsx(oc,{size:11})," 초기화"]})]})}const xG=6048e5,ZK=864e5,bG=6e4,_G=36e5,gy=43200,zI=1440,jI=Symbol.for("constructDateFrom");function Yi(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&jI in r?r[jI](e):r instanceof Date?new r.constructor(e):new Date(e)}function br(r,e){return Yi(e||r,r)}let $K={};function Lg(){return $K}function Gp(r,e){var s,l,u,c;const t=Lg(),n=(e==null?void 0:e.weekStartsOn)??((l=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??t.weekStartsOn??((c=(u=t.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,a=br(r,e==null?void 0:e.in),i=a.getDay(),o=(i<n?7:0)+i-n;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function fx(r,e){return Gp(r,{...e,weekStartsOn:1})}function SG(r,e){const t=br(r,e==null?void 0:e.in),n=t.getFullYear(),a=Yi(t,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const i=fx(a),o=Yi(t,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const s=fx(o);return t.getTime()>=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function hx(r){const e=br(r),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+r-+t}function R1(r,...e){const t=Yi.bind(null,r||e.find(n=>typeof n=="object"));return e.map(t)}function BI(r,e){const t=br(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function KK(r,e,t){const[n,a]=R1(t==null?void 0:t.in,r,e),i=BI(n),o=BI(a),s=+i-hx(i),l=+o-hx(o);return Math.round((s-l)/ZK)}function QK(r,e){const t=SG(r,e),n=Yi(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),fx(n)}function z0(r,e){const t=+br(r)-+br(e);return t<0?-1:t>0?1:t}function JK(r){return Yi(r,Date.now())}function eQ(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function tQ(r){return!(!eQ(r)&&typeof r!="number"||isNaN(+br(r)))}function rQ(r,e,t){const[n,a]=R1(t==null?void 0:t.in,r,e),i=n.getFullYear()-a.getFullYear(),o=n.getMonth()-a.getMonth();return i*12+o}function nQ(r){return e=>{const n=(r?Math[r]:Math.trunc)(e);return n===0?0:n}}function aQ(r,e){return+br(r)-+br(e)}function iQ(r,e){const t=br(r,e==null?void 0:e.in);return t.setHours(23,59,59,999),t}function oQ(r,e){const t=br(r,e==null?void 0:e.in),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function sQ(r,e){const t=br(r,e==null?void 0:e.in);return+iQ(t,e)==+oQ(t,e)}function lQ(r,e,t){const[n,a,i]=R1(t==null?void 0:t.in,r,r,e),o=z0(a,i),s=Math.abs(rQ(a,i));if(s<1)return 0;a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-o*s);let l=z0(a,i)===-o;sQ(n)&&s===1&&z0(n,i)===1&&(l=!1);const u=o*(s-+l);return u===0?0:u}function uQ(r,e,t){const n=aQ(r,e)/1e3;return nQ(t==null?void 0:t.roundingMethod)(n)}function cQ(r,e){const t=br(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const fQ={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},hQ=(r,e,t)=>{let n;const a=fQ[r];return typeof a=="string"?n=a:e===1?n=a.one:n=a.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function nh(r){return(e={})=>{const t=e.width?String(e.width):r.defaultWidth;return r.formats[t]||r.formats[r.defaultWidth]}}const dQ={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vQ={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},pQ={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},gQ={date:nh({formats:dQ,defaultWidth:"full"}),time:nh({formats:vQ,defaultWidth:"full"}),dateTime:nh({formats:pQ,defaultWidth:"full"})},mQ={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},yQ=(r,e,t,n)=>mQ[r];function Di(r){return(e,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let a;if(n==="formatting"&&r.formattingValues){const o=r.defaultFormattingWidth||r.defaultWidth,s=t!=null&&t.width?String(t.width):o;a=r.formattingValues[s]||r.formattingValues[o]}else{const o=r.defaultWidth,s=t!=null&&t.width?String(t.width):r.defaultWidth;a=r.values[s]||r.values[o]}const i=r.argumentCallback?r.argumentCallback(e):e;return a[i]}}const xQ={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bQ={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},_Q={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},SQ={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},wQ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},TQ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},CQ=(r,e)=>{const t=Number(r),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},AQ={ordinalNumber:CQ,era:Di({values:xQ,defaultWidth:"wide"}),quarter:Di({values:bQ,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Di({values:_Q,defaultWidth:"wide"}),day:Di({values:SQ,defaultWidth:"wide"}),dayPeriod:Di({values:wQ,defaultWidth:"wide",formattingValues:TQ,defaultFormattingWidth:"wide"})};function Ni(r){return(e,t={})=>{const n=t.width,a=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],s=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],l=Array.isArray(s)?DQ(s,f=>f.test(o)):MQ(s,f=>f.test(o));let u;u=r.valueCallback?r.valueCallback(l):l,u=t.valueCallback?t.valueCallback(u):u;const c=e.slice(o.length);return{value:u,rest:c}}}function MQ(r,e){for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&e(r[t]))return t}function DQ(r,e){for(let t=0;t<r.length;t++)if(e(r[t]))return t}function wG(r){return(e,t={})=>{const n=e.match(r.matchPattern);if(!n)return null;const a=n[0],i=e.match(r.parsePattern);if(!i)return null;let o=r.valueCallback?r.valueCallback(i[0]):i[0];o=t.valueCallback?t.valueCallback(o):o;const s=e.slice(a.length);return{value:o,rest:s}}}const NQ=/^(\d+)(th|st|nd|rd)?/i,LQ=/\d+/i,RQ={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},EQ={any:[/^b/i,/^(a|c)/i]},kQ={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},IQ={any:[/1/i,/2/i,/3/i,/4/i]},OQ={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},PQ={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},zQ={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},jQ={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},BQ={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},VQ={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},GQ={ordinalNumber:wG({matchPattern:NQ,parsePattern:LQ,valueCallback:r=>parseInt(r,10)}),era:Ni({matchPatterns:RQ,defaultMatchWidth:"wide",parsePatterns:EQ,defaultParseWidth:"any"}),quarter:Ni({matchPatterns:kQ,defaultMatchWidth:"wide",parsePatterns:IQ,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Ni({matchPatterns:OQ,defaultMatchWidth:"wide",parsePatterns:PQ,defaultParseWidth:"any"}),day:Ni({matchPatterns:zQ,defaultMatchWidth:"wide",parsePatterns:jQ,defaultParseWidth:"any"}),dayPeriod:Ni({matchPatterns:BQ,defaultMatchWidth:"any",parsePatterns:VQ,defaultParseWidth:"any"})},TG={code:"en-US",formatDistance:hQ,formatLong:gQ,formatRelative:yQ,localize:AQ,match:GQ,options:{weekStartsOn:0,firstWeekContainsDate:1}};function HQ(r,e){const t=br(r,e==null?void 0:e.in);return KK(t,cQ(t))+1}function FQ(r,e){const t=br(r,e==null?void 0:e.in),n=+fx(t)-+QK(t);return Math.round(n/xG)+1}function CG(r,e){var c,f,d,v;const t=br(r,e==null?void 0:e.in),n=t.getFullYear(),a=Lg(),i=(e==null?void 0:e.firstWeekContainsDate)??((f=(c=e==null?void 0:e.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((v=(d=a.locale)==null?void 0:d.options)==null?void 0:v.firstWeekContainsDate)??1,o=Yi((e==null?void 0:e.in)||r,0);o.setFullYear(n+1,0,i),o.setHours(0,0,0,0);const s=Gp(o,e),l=Yi((e==null?void 0:e.in)||r,0);l.setFullYear(n,0,i),l.setHours(0,0,0,0);const u=Gp(l,e);return+t>=+s?n+1:+t>=+u?n:n-1}function UQ(r,e){var s,l,u,c;const t=Lg(),n=(e==null?void 0:e.firstWeekContainsDate)??((l=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??t.firstWeekContainsDate??((c=(u=t.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,a=CG(r,e),i=Yi((e==null?void 0:e.in)||r,0);return i.setFullYear(a,0,n),i.setHours(0,0,0,0),Gp(i,e)}function YQ(r,e){const t=br(r,e==null?void 0:e.in),n=+Gp(t,e)-+UQ(t,e);return Math.round(n/xG)+1}function Pt(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const Es={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return Pt(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):Pt(t+1,2)},d(r,e){return Pt(r.getDate(),e.length)},a(r,e){const t=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(r,e){return Pt(r.getHours()%12||12,e.length)},H(r,e){return Pt(r.getHours(),e.length)},m(r,e){return Pt(r.getMinutes(),e.length)},s(r,e){return Pt(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),a=Math.trunc(n*Math.pow(10,t-3));return Pt(a,e.length)}},pf={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},VI={G:function(r,e,t){const n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){const n=r.getFullYear(),a=n>0?n:1-n;return t.ordinalNumber(a,{unit:"year"})}return Es.y(r,e)},Y:function(r,e,t,n){const a=CG(r,n),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return Pt(o,2)}return e==="Yo"?t.ordinalNumber(i,{unit:"year"}):Pt(i,e.length)},R:function(r,e){const t=SG(r);return Pt(t,e.length)},u:function(r,e){const t=r.getFullYear();return Pt(t,e.length)},Q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Pt(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Pt(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){const n=r.getMonth();switch(e){case"M":case"MM":return Es.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){const n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return Pt(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){const a=YQ(r,n);return e==="wo"?t.ordinalNumber(a,{unit:"week"}):Pt(a,e.length)},I:function(r,e,t){const n=FQ(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):Pt(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):Es.d(r,e)},D:function(r,e,t){const n=HQ(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):Pt(n,e.length)},E:function(r,e,t){const n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){const a=r.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return Pt(i,2);case"eo":return t.ordinalNumber(i,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(r,e,t,n){const a=r.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return Pt(i,e.length);case"co":return t.ordinalNumber(i,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(r,e,t){const n=r.getDay(),a=n===0?7:n;switch(e){case"i":return String(a);case"ii":return Pt(a,e.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){const a=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(r,e,t){const n=r.getHours();let a;switch(n===12?a=pf.noon:n===0?a=pf.midnight:a=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(r,e,t){const n=r.getHours();let a;switch(n>=17?a=pf.evening:n>=12?a=pf.afternoon:n>=4?a=pf.morning:a=pf.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return Es.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):Es.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):Pt(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):Pt(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):Es.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):Es.s(r,e)},S:function(r,e){return Es.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return HI(n);case"XXXX":case"XX":return Tu(n);case"XXXXX":case"XXX":default:return Tu(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return HI(n);case"xxxx":case"xx":return Tu(n);case"xxxxx":case"xxx":default:return Tu(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+GI(n,":");case"OOOO":default:return"GMT"+Tu(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+GI(n,":");case"zzzz":default:return"GMT"+Tu(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return Pt(n,e.length)},T:function(r,e,t){return Pt(+r,e.length)}};function GI(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),a=Math.trunc(n/60),i=n%60;return i===0?t+String(a):t+String(a)+e+Pt(i,2)}function HI(r,e){return r%60===0?(r>0?"-":"+")+Pt(Math.abs(r)/60,2):Tu(r,e)}function Tu(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),a=Pt(Math.trunc(n/60),2),i=Pt(n%60,2);return t+a+e+i}const FI=(r,e)=>{switch(r){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},AG=(r,e)=>{switch(r){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},WQ=(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],a=t[2];if(!a)return FI(r,e);let i;switch(n){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",FI(n,e)).replace("{{time}}",AG(a,e))},XQ={p:AG,P:WQ},qQ=/^D+$/,ZQ=/^Y+$/,$Q=["D","DD","YY","YYYY"];function KQ(r){return qQ.test(r)}function QQ(r){return ZQ.test(r)}function JQ(r,e,t){const n=eJ(r,e,t);if(console.warn(n),$Q.includes(r))throw new RangeError(n)}function eJ(r,e,t){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const tJ=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rJ=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nJ=/^'([^]*?)'?$/,aJ=/''/g,iJ=/[a-zA-Z]/;function oJ(r,e,t){var c,f,d,v,g,x,y,b;const n=Lg(),a=(t==null?void 0:t.locale)??n.locale??TG,i=(t==null?void 0:t.firstWeekContainsDate)??((f=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??n.firstWeekContainsDate??((v=(d=n.locale)==null?void 0:d.options)==null?void 0:v.firstWeekContainsDate)??1,o=(t==null?void 0:t.weekStartsOn)??((x=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:x.weekStartsOn)??n.weekStartsOn??((b=(y=n.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??0,s=br(r,t==null?void 0:t.in);if(!tQ(s))throw new RangeError("Invalid time value");let l=e.match(rJ).map(w=>{const T=w[0];if(T==="p"||T==="P"){const C=XQ[T];return C(w,a.formatLong)}return w}).join("").match(tJ).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const T=w[0];if(T==="'")return{isToken:!1,value:sJ(w)};if(VI[T])return{isToken:!0,value:w};if(T.match(iJ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:w}});a.localize.preprocessor&&(l=a.localize.preprocessor(s,l));const u={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return l.map(w=>{if(!w.isToken)return w.value;const T=w.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&QQ(T)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&KQ(T))&&JQ(T,e,String(r));const C=VI[T[0]];return C(s,T,a.localize,u)}).join("")}function sJ(r){const e=r.match(nJ);return e?e[1].replace(aJ,"'"):r}function lJ(r,e,t){const n=Lg(),a=(t==null?void 0:t.locale)??n.locale??TG,i=2520,o=z0(r,e);if(isNaN(o))throw new RangeError("Invalid time value");const s=Object.assign({},t,{addSuffix:t==null?void 0:t.addSuffix,comparison:o}),[l,u]=R1(t==null?void 0:t.in,...o>0?[e,r]:[r,e]),c=uQ(u,l),f=(hx(u)-hx(l))/1e3,d=Math.round((c-f)/60);let v;if(d<2)return t!=null&&t.includeSeconds?c<5?a.formatDistance("lessThanXSeconds",5,s):c<10?a.formatDistance("lessThanXSeconds",10,s):c<20?a.formatDistance("lessThanXSeconds",20,s):c<40?a.formatDistance("halfAMinute",0,s):c<60?a.formatDistance("lessThanXMinutes",1,s):a.formatDistance("xMinutes",1,s):d===0?a.formatDistance("lessThanXMinutes",1,s):a.formatDistance("xMinutes",d,s);if(d<45)return a.formatDistance("xMinutes",d,s);if(d<90)return a.formatDistance("aboutXHours",1,s);if(d<zI){const g=Math.round(d/60);return a.formatDistance("aboutXHours",g,s)}else{if(d<i)return a.formatDistance("xDays",1,s);if(d<gy){const g=Math.round(d/zI);return a.formatDistance("xDays",g,s)}else if(d<gy*2)return v=Math.round(d/gy),a.formatDistance("aboutXMonths",v,s)}if(v=lQ(u,l),v<12){const g=Math.round(d/gy);return a.formatDistance("xMonths",g,s)}else{const g=v%12,x=Math.trunc(v/12);return g<3?a.formatDistance("aboutXYears",x,s):g<9?a.formatDistance("overXYears",x,s):a.formatDistance("almostXYears",x+1,s)}}function yM(r,e){return lJ(r,JK(r),e)}function uJ(r,e){const t=()=>Yi(e==null?void 0:e.in,NaN),a=dJ(r);let i;if(a.date){const u=vJ(a.date,2);i=pJ(u.restDateString,u.year)}if(!i||isNaN(+i))return t();const o=+i;let s=0,l;if(a.time&&(s=gJ(a.time),isNaN(s)))return t();if(a.timezone){if(l=mJ(a.timezone),isNaN(l))return t()}else{const u=new Date(o+s),c=br(0,e==null?void 0:e.in);return c.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),c.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),c}return br(o+s+l,e==null?void 0:e.in)}const my={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},cJ=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,fJ=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,hJ=/^([+-])(\d{2})(?::?(\d{2}))?$/;function dJ(r){const e={},t=r.split(my.dateTimeDelimiter);let n;if(t.length>2)return e;if(/:/.test(t[0])?n=t[0]:(e.date=t[0],n=t[1],my.timeZoneDelimiter.test(e.date)&&(e.date=r.split(my.timeZoneDelimiter)[0],n=r.substr(e.date.length,r.length))),n){const a=my.timezone.exec(n);a?(e.time=n.replace(a[1],""),e.timezone=a[1]):e.time=n}return e}function vJ(r,e){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=r.match(t);if(!n)return{year:NaN,restDateString:""};const a=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:i===null?a:i*100,restDateString:r.slice((n[1]||n[2]).length)}}function pJ(r,e){if(e===null)return new Date(NaN);const t=r.match(cJ);if(!t)return new Date(NaN);const n=!!t[4],a=mv(t[1]),i=mv(t[2])-1,o=mv(t[3]),s=mv(t[4]),l=mv(t[5])-1;if(n)return SJ(e,s,l)?yJ(e,s,l):new Date(NaN);{const u=new Date(0);return!bJ(e,i,o)||!_J(e,a)?new Date(NaN):(u.setUTCFullYear(e,i,Math.max(a,o)),u)}}function mv(r){return r?parseInt(r):1}function gJ(r){const e=r.match(fJ);if(!e)return NaN;const t=VS(e[1]),n=VS(e[2]),a=VS(e[3]);return wJ(t,n,a)?t*_G+n*bG+a*1e3:NaN}function VS(r){return r&&parseFloat(r.replace(",","."))||0}function mJ(r){if(r==="Z")return 0;const e=r.match(hJ);if(!e)return 0;const t=e[1]==="+"?-1:1,n=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return TJ(n,a)?t*(n*_G+a*bG):NaN}function yJ(r,e,t){const n=new Date(0);n.setUTCFullYear(r,0,4);const a=n.getUTCDay()||7,i=(e-1)*7+t+1-a;return n.setUTCDate(n.getUTCDate()+i),n}const xJ=[31,null,31,30,31,30,31,31,30,31,30,31];function MG(r){return r%400===0||r%4===0&&r%100!==0}function bJ(r,e,t){return e>=0&&e<=11&&t>=1&&t<=(xJ[e]||(MG(r)?29:28))}function _J(r,e){return e>=1&&e<=(MG(r)?366:365)}function SJ(r,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function wJ(r,e,t){return r===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&r>=0&&r<25}function TJ(r,e){return e>=0&&e<=59}const CJ={lessThanXSeconds:{one:"1초 미만",other:"{{count}}초 미만"},xSeconds:{one:"1초",other:"{{count}}초"},halfAMinute:"30초",lessThanXMinutes:{one:"1분 미만",other:"{{count}}분 미만"},xMinutes:{one:"1분",other:"{{count}}분"},aboutXHours:{one:"약 1시간",other:"약 {{count}}시간"},xHours:{one:"1시간",other:"{{count}}시간"},xDays:{one:"1일",other:"{{count}}일"},aboutXWeeks:{one:"약 1주",other:"약 {{count}}주"},xWeeks:{one:"1주",other:"{{count}}주"},aboutXMonths:{one:"약 1개월",other:"약 {{count}}개월"},xMonths:{one:"1개월",other:"{{count}}개월"},aboutXYears:{one:"약 1년",other:"약 {{count}}년"},xYears:{one:"1년",other:"{{count}}년"},overXYears:{one:"1년 이상",other:"{{count}}년 이상"},almostXYears:{one:"거의 1년",other:"거의 {{count}}년"}},AJ=(r,e,t)=>{let n;const a=CJ[r];return typeof a=="string"?n=a:e===1?n=a.one:n=a.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?n+" 후":n+" 전":n},MJ={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},DJ={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},NJ={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},LJ={date:nh({formats:MJ,defaultWidth:"full"}),time:nh({formats:DJ,defaultWidth:"full"}),dateTime:nh({formats:NJ,defaultWidth:"full"})},RJ={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},EJ=(r,e,t,n)=>RJ[r],kJ={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},IJ={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},OJ={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],wide:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},PJ={narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},zJ={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},jJ={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},BJ=(r,e)=>{const t=Number(r);switch(String(e==null?void 0:e.unit)){case"minute":case"second":return String(t);case"date":return t+"일";default:return t+"번째"}},VJ={ordinalNumber:BJ,era:Di({values:kJ,defaultWidth:"wide"}),quarter:Di({values:IJ,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Di({values:OJ,defaultWidth:"wide"}),day:Di({values:PJ,defaultWidth:"wide"}),dayPeriod:Di({values:zJ,defaultWidth:"wide",formattingValues:jJ,defaultFormattingWidth:"wide"})},GJ=/^(\d+)(일|번째)?/i,HJ=/\d+/i,FJ={narrow:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(기원전|서기)/i},UJ={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},YJ={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},WJ={any:[/1/i,/2/i,/3/i,/4/i]},XJ={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},qJ={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},ZJ={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},$J={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},KJ={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},QJ={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},JJ={ordinalNumber:wG({matchPattern:GJ,parsePattern:HJ,valueCallback:r=>parseInt(r,10)}),era:Ni({matchPatterns:FJ,defaultMatchWidth:"wide",parsePatterns:UJ,defaultParseWidth:"any"}),quarter:Ni({matchPatterns:YJ,defaultMatchWidth:"wide",parsePatterns:WJ,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Ni({matchPatterns:XJ,defaultMatchWidth:"wide",parsePatterns:qJ,defaultParseWidth:"any"}),day:Ni({matchPatterns:ZJ,defaultMatchWidth:"wide",parsePatterns:$J,defaultParseWidth:"any"}),dayPeriod:Ni({matchPatterns:KJ,defaultMatchWidth:"any",parsePatterns:QJ,defaultParseWidth:"any"})},E1={code:"ko",formatDistance:AJ,formatLong:LJ,formatRelative:EJ,localize:VJ,match:JJ,options:{weekStartsOn:0,firstWeekContainsDate:1}};function eee(){const r=window.location.hash.slice(1),e=r.includes("?")?r.split("?")[1]:"",n=new URLSearchParams(e).get("status");return n?new Set(n.split(",")):new Set}const tee={pending:"결제대기",paid:"결제완료",confirmed:"구매확정",preparing:"발송준비",shipped:"배송중",delivered:"배송완료",cancelled:"취소",returned:"반품",unknown:"알수없음"},UI={pending:"bg-amber-100 text-amber-700 dark:bg-amber-950/50 dark:text-amber-400",paid:"bg-blue-100 text-blue-700 dark:bg-blue-950/50 dark:text-blue-400",confirmed:"bg-emerald-100 text-emerald-700 dark:bg-emerald-950/50 dark:text-emerald-400",preparing:"bg-purple-100 text-purple-700 dark:bg-purple-950/50 dark:text-purple-400",shipped:"bg-sky-100 text-sky-700 dark:bg-sky-950/50 dark:text-sky-400",delivered:"bg-green-100 text-green-700 dark:bg-green-950/50 dark:text-green-400",cancelled:"bg-muted text-muted-foreground",returned:"bg-red-100 text-red-700 dark:bg-red-950/50 dark:text-red-400",unknown:"bg-muted text-muted-foreground"},YI={cafe24:"카페24",coupang:"쿠팡",smartstore:"스마트스토어",shopify:"Shopify","toss-shopping":"토스쇼핑","29cm":"29CM",musinsa:"무신사",kurly:"컬리",ssf:"SSF",bronte:"브론테",ezadmin:"이지어드민"};function WI({status:r}){return S.jsx("span",{className:Ge("inline-block text-[10px] font-medium px-1.5 py-0.5 rounded-full",UI[r]??UI.unknown),children:tee[r]??r})}function ree(r){if(!r)return"-";try{return oJ(uJ(r),"MM.dd HH:mm",{locale:E1})}catch{return r.slice(0,10)}}function XI({label:r,options:e,selected:t,onToggle:n,onClear:a,renderOption:i}){const[o,s]=q.useState(!1),l=q.useRef(null);return S.jsxs("div",{className:"relative",ref:l,children:[S.jsxs("button",{type:"button",onClick:()=>s(!o),className:Ge("flex items-center gap-1 text-[12px] px-2.5 py-1 rounded-md border cursor-pointer transition-colors",t.size>0?"border-primary/40 bg-primary/5 text-foreground":"border-border bg-card text-muted-foreground"),children:[r,t.size>0&&S.jsx("span",{className:"text-[10px] font-semibold bg-primary/10 text-primary px-1 rounded",children:t.size}),S.jsx(_n,{size:12,className:Ge("transition-transform",o&&"rotate-180")})]}),o&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>s(!1)}),S.jsxs("div",{className:"absolute top-full left-0 mt-1 z-20 bg-card border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[t.size>0&&S.jsxs("button",{type:"button",onClick:()=>{a(),s(!1)},className:"w-full text-left px-3 py-1.5 text-[11px] text-muted-foreground hover:bg-muted/50 flex items-center gap-1",children:[S.jsx(oc,{size:10})," 초기화"]}),e.map(u=>S.jsxs("label",{className:"flex items-center gap-2 px-3 py-1.5 text-[12px] hover:bg-muted/50 cursor-pointer",children:[S.jsx("input",{type:"checkbox",checked:t.has(u),onChange:()=>n(u),className:"rounded border-border"}),i?i(u):u]},u))]})]})]})}function nee({label:r,value:e,onChange:t}){return S.jsxs("div",{className:"relative",children:[S.jsx("input",{type:"text",placeholder:r,value:e,onChange:n=>t(n.target.value),className:Ge("text-[12px] px-2.5 py-1 rounded-md border bg-card w-[140px] outline-none transition-colors",e?"border-primary/40 text-foreground":"border-border text-muted-foreground placeholder:text-muted-foreground/60")}),e&&S.jsx("button",{type:"button",onClick:()=>t(""),className:"absolute right-1.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:S.jsx(oc,{size:11})})]})}function aee(){const[r,e]=q.useState(""),[t,n]=q.useState(""),a=!!r||!!t,{data:i,isLoading:o,error:s}=oG(a?{from:r,to:t}:void 0),l=(i==null?void 0:i.orders)??[],{syncing:u,syncResult:c,handleSync:f}=lG(),[d,v]=q.useState(new Set),[g,x]=q.useState(eee),[y,b]=q.useState(""),w=q.useMemo(()=>[...new Set(l.map(N=>N.channel))].sort(),[l]),T=q.useMemo(()=>[...new Set(l.map(N=>N.status))].sort(),[l]),C=q.useMemo(()=>l.filter(N=>!(d.size>0&&!d.has(N.channel)||g.size>0&&!g.has(N.status)||y&&!N.productName.toLowerCase().includes(y.toLowerCase()))),[l,d,g,y]),D=(N,R)=>{const E=new Set(N);return E.has(R)?E.delete(R):E.add(R),E},M=d.size>0||g.size>0||y;return S.jsxs("div",{children:[S.jsxs("div",{className:"flex items-center justify-between mb-4",children:[S.jsx("h2",{className:"text-xl font-medium",children:"주문 현황"}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("span",{className:"text-[12px] text-muted-foreground",children:M?`${C.length.toLocaleString()} / ${((i==null?void 0:i.total)??0).toLocaleString()}건`:`총 ${((i==null?void 0:i.total)??0).toLocaleString()}건`}),c&&S.jsx("span",{className:"text-[11px] text-muted-foreground",children:c}),S.jsxs("button",{type:"button",onClick:f,disabled:u,className:"flex items-center gap-1.5 text-[12px] text-muted-foreground hover:text-foreground border border-border rounded px-2.5 py-1 transition-colors disabled:opacity-50",children:[S.jsx(vG,{size:12,className:u?"animate-spin":""}),u?"동기화 중...":"주문 동기화"]})]})]}),S.jsx(mM,{from:r,to:t,onChange:(N,R)=>{e(N),n(R)},className:"mb-4"}),l.length>0&&S.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[S.jsx(XI,{label:"채널",options:w,selected:d,onToggle:N=>v(D(d,N)),onClear:()=>v(new Set),renderOption:N=>S.jsx("span",{children:YI[N]??N})}),S.jsx(XI,{label:"상태",options:T,selected:g,onToggle:N=>x(D(g,N)),onClear:()=>x(new Set),renderOption:N=>S.jsx(WI,{status:N})}),S.jsx(nee,{label:"상품 검색",value:y,onChange:b}),M&&S.jsxs("button",{type:"button",onClick:()=>{v(new Set),x(new Set),b("")},className:"text-[11px] text-muted-foreground hover:text-foreground flex items-center gap-0.5 cursor-pointer",children:[S.jsx(oc,{size:11})," 전체 초기화"]})]}),o?S.jsx("div",{className:"text-sm text-muted-foreground py-8 text-center",children:"불러오는 중..."}):s?S.jsx("div",{className:"text-sm text-destructive py-8 text-center",children:"주문 조회 실패"}):l.length===0?S.jsxs("div",{className:"border border-dashed border-border rounded-lg p-12 text-center text-muted-foreground text-sm",children:["주문 데이터가 없습니다.",S.jsxs("div",{className:"text-[11px] mt-2 space-y-1",children:[S.jsxs("p",{children:["위의 ",S.jsx("strong",{children:"주문 동기화"})," 버튼을 눌러 연결된 채널에서 주문을 가져오거나,"]}),S.jsxs("p",{children:[S.jsx("code",{className:"bg-muted px-1 py-0.5 rounded text-[10px]",children:"sppt import"}),"로 CSV/엑셀 파일을 불러올 수 있습니다."]}),S.jsx("p",{className:"pt-1 text-muted-foreground/70",children:'터미널에서 AI에게 "주문 동기화해줘", "이 CSV 불러와줘" 라고 말해도 됩니다.'})]})]}):S.jsx("div",{className:"border border-border rounded-lg overflow-hidden",children:S.jsxs("table",{className:"w-full text-[12px] border-collapse",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border bg-muted/40 text-[11px] font-semibold text-muted-foreground",children:[S.jsx("th",{className:"px-3 py-2 text-left",children:"채널"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"상품"}),S.jsx("th",{className:"px-3 py-2 text-left w-[90px]",children:"주문번호"}),S.jsx("th",{className:"px-3 py-2 text-center",children:"상태"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"금액"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"주문일"})]})}),S.jsxs("tbody",{className:"bg-card",children:[C.map((N,R)=>{const E=N.salePrice!=null?(N.salePrice*N.quantity).toLocaleString():null;return S.jsxs("tr",{className:Ge("border-b border-border/60",R%2!==0&&"bg-muted/5"),children:[S.jsx("td",{className:"px-3 py-2",children:YI[N.channel]??N.channel}),S.jsx("td",{className:"px-3 py-2 max-w-[280px] truncate",title:N.productName,children:N.productName}),S.jsx("td",{className:"px-3 py-2 text-muted-foreground font-mono text-[10px] w-[90px] max-w-[90px] truncate",title:N.channelOrderId,children:N.channelOrderId}),S.jsx("td",{className:"px-3 py-2 text-center",children:S.jsx(WI,{status:N.status})}),S.jsx("td",{className:"px-3 py-2 text-right",children:E!=null?`${E}원`:"-"}),S.jsx("td",{className:"px-3 py-2 text-muted-foreground text-right",children:ree(N.orderDate)})]},`${N.channelOrderId}-${R}`)}),C.length===0&&S.jsx("tr",{children:S.jsx("td",{colSpan:6,className:"px-3 py-8 text-center text-muted-foreground text-[13px]",children:"필터 조건에 맞는 주문이 없습니다."})})]})]})}),S.jsx("p",{className:"text-[11px] text-muted-foreground/60 mt-4",children:"주문 동기화 · CSV 불러오기 · 수동 입력 등 터미널에서 AI에게 요청할 수 있습니다."})]})}function Qr({label:r,value:e,sub:t,highlight:n,warn:a,accent:i,onClick:o}){const s=Ge("border border-border rounded-lg p-4 bg-card text-left w-full",n&&"border-primary/50 bg-primary/5",a&&"border-amber-500/50",o&&"cursor-pointer hover:border-primary/70 transition-colors"),l=Ge("text-2xl font-semibold",n&&"text-primary",a&&"text-amber-500",i&&"text-emerald-600 dark:text-emerald-400"),u=S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"text-[11px] text-muted-foreground mb-1",children:r}),S.jsx("div",{className:l,children:e}),t&&S.jsx("div",{className:"text-[11px] text-muted-foreground mt-0.5",children:t})]});return o?S.jsx("button",{type:"button",className:s,onClick:o,children:u}):S.jsx("div",{className:s,children:u})}const Gi={cafe24:"카페24",coupang:"쿠팡",smartstore:"스마트스토어",shopify:"Shopify","toss-shopping":"토스쇼핑","29cm":"29CM",musinsa:"무신사",kurly:"컬리",ssf:"SSF",bronte:"브론테",ezadmin:"이지어드민",기타:"기타"},xM={cafe24:"#3b82f6",coupang:"#f97316",smartstore:"#22c55e",shopify:"#10b981","toss-shopping":"#38bdf8","29cm":"#64748b",musinsa:"#a1a1aa",kurly:"#a855f7",ssf:"#38bdf8",bronte:"#f43f5e"},iee={cafe24:"bg-blue-500",coupang:"bg-orange-500",smartstore:"bg-green-500",shopify:"bg-emerald-500","toss-shopping":"bg-blue-400","29cm":"bg-slate-700 dark:bg-slate-400",musinsa:"bg-zinc-800 dark:bg-zinc-200",kurly:"bg-purple-500",ssf:"bg-sky-500",bronte:"bg-rose-500",ezadmin:"bg-gray-500"};/*! *****************************************************************************
233
- Copyright (c) Microsoft Corporation.
234
-
235
- Permission to use, copy, modify, and/or distribute this software for any
236
- purpose with or without fee is hereby granted.
237
-
238
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
239
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
240
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
241
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
242
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
243
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
244
- PERFORMANCE OF THIS SOFTWARE.
245
- ***************************************************************************** */var B2=function(r,e){return B2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},B2(r,e)};function K(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");B2(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var yp=function(){return yp=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},yp.apply(this,arguments)};function oee(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(r);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(r,n[a])&&(t[n[a]]=r[n[a]]);return t}function qI(r,e,t,n){function a(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?i(c.value):a(c.value).then(s,l)}u((n=n.apply(r,[])).next())})}function ZI(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,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(;t;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,a=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){t.label=u[1];break}if(u[0]===6&&t.label<i[1]){t.label=i[1],i=u;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(u);break}i[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(r,t)}catch(c){u=[6,c],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var see=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),lee=(function(){function r(){this.browser=new see,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r})(),nt=new lee;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(nt.wxa=!0,nt.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?nt.worker=!0:!nt.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(nt.node=!0,nt.svgSupported=!0):uee(navigator.userAgent,nt);function uee(r,e){var t=e.browser,n=r.match(/Firefox\/([\d.]+)/),a=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(t.firefox=!0,t.version=n[1]),a&&(t.ie=!0,t.version=a[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in l||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}}var bM=12,DG="sans-serif",qo=bM+"px "+DG,cee=20,fee=100,hee="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function dee(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t<r.length;t++){var n=String.fromCharCode(t+32),a=(r.charCodeAt(t)-cee)/fee;e[n]=a}return e}var vee=dee(hee),jn={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var r,e;return function(t,n){if(!r){var a=jn.createCanvas();r=a&&a.getContext("2d")}if(r)return e!==n&&(e=r.font=n||qo),r.measureText(t);t=t||"",n=n||qo;var i=/((?:\d+)?\.?\d*)px/.exec(n),o=i&&+i[1]||bM,s=0;if(n.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=vee[t[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(r,e,t){var n=new Image;return n.onload=e,n.onerror=t,n.src=r,n}};function NG(r){for(var e in jn)r[e]&&(jn[e]=r[e])}var LG=ka(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),RG=ka(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),Yh=Object.prototype.toString,k1=Array.prototype,pee=k1.forEach,gee=k1.filter,_M=k1.slice,mee=k1.map,$I=(function(){}).constructor,yy=$I?$I.prototype:null,SM="__proto__",yee=2311;function wM(){return yee++}function I1(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console<"u"&&console.error.apply(console,r)}function Me(r){if(r==null||typeof r!="object")return r;var e=r,t=Yh.call(r);if(t==="[object Array]"){if(!ah(r)){e=[];for(var n=0,a=r.length;n<a;n++)e[n]=Me(r[n])}}else if(RG[t]){if(!ah(r)){var i=r.constructor;if(i.from)e=i.from(r);else{e=new i(r.length);for(var n=0,a=r.length;n<a;n++)e[n]=r[n]}}}else if(!LG[t]&&!ah(r)&&!sc(r)){e={};for(var o in r)r.hasOwnProperty(o)&&o!==SM&&(e[o]=Me(r[o]))}return e}function Ye(r,e,t){if(!Re(e)||!Re(r))return t?Me(e):r;for(var n in e)if(e.hasOwnProperty(n)&&n!==SM){var a=r[n],i=e[n];Re(i)&&Re(a)&&!ce(i)&&!ce(a)&&!sc(i)&&!sc(a)&&!V2(i)&&!V2(a)&&!ah(i)&&!ah(a)?Ye(a,i,t):(t||!(n in r))&&(r[n]=Me(e[n]))}return r}function O1(r,e){for(var t=r[0],n=1,a=r.length;n<a;n++)t=Ye(t,r[n],e);return t}function ie(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==SM&&(r[t]=e[t]);return r}function Le(r,e,t){for(var n=it(e),a=0,i=n.length;a<i;a++){var o=n[a];(t?e[o]!=null:r[o]==null)&&(r[o]=e[o])}return r}var xee=jn.createCanvas;function Fe(r,e){if(r){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t}return-1}function TM(r,e){var t=r.prototype;function n(){}n.prototype=e.prototype,r.prototype=new n;for(var a in t)t.hasOwnProperty(a)&&(r.prototype[a]=t[a]);r.prototype.constructor=r,r.superClass=e}function Jt(r,e,t){if(r="prototype"in r?r.prototype:r,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),a=0;a<n.length;a++){var i=n[a];i!=="constructor"&&(t?e[i]!=null:r[i]==null)&&(r[i]=e[i])}else Le(r,e,t)}function en(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function O(r,e,t){if(r&&e)if(r.forEach&&r.forEach===pee)r.forEach(e,t);else if(r.length===+r.length)for(var n=0,a=r.length;n<a;n++)e.call(t,r[n],n,r);else for(var i in r)r.hasOwnProperty(i)&&e.call(t,r[i],i,r)}function fe(r,e,t){if(!r)return[];if(!e)return P1(r);if(r.map&&r.map===mee)return r.map(e,t);for(var n=[],a=0,i=r.length;a<i;a++)n.push(e.call(t,r[a],a,r));return n}function ka(r,e,t,n){if(r&&e){for(var a=0,i=r.length;a<i;a++)t=e.call(n,t,r[a],a,r);return t}}function dt(r,e,t){if(!r)return[];if(!e)return P1(r);if(r.filter&&r.filter===gee)return r.filter(e,t);for(var n=[],a=0,i=r.length;a<i;a++)e.call(t,r[a],a,r)&&n.push(r[a]);return n}function Ml(r,e,t){if(r&&e){for(var n=0,a=r.length;n<a;n++)if(e.call(t,r[n],n,r))return r[n]}}function it(r){if(!r)return[];if(Object.keys)return Object.keys(r);var e=[];for(var t in r)r.hasOwnProperty(t)&&e.push(t);return e}function bee(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return function(){return r.apply(e,t.concat(_M.call(arguments)))}}var xe=yy&&Ae(yy.bind)?yy.call.bind(yy.bind):bee;function He(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(_M.call(arguments)))}}function ce(r){return Array.isArray?Array.isArray(r):Yh.call(r)==="[object Array]"}function Ae(r){return typeof r=="function"}function ye(r){return typeof r=="string"}function dx(r){return Yh.call(r)==="[object String]"}function st(r){return typeof r=="number"}function Re(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function V2(r){return!!LG[Yh.call(r)]}function wn(r){return!!RG[Yh.call(r)]}function sc(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function Rg(r){return r.colorStops!=null}function EG(r){return r.image!=null}function kG(r){return Yh.call(r)==="[object RegExp]"}function Jr(r){return r!==r}function Hr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0,n=r.length;t<n;t++)if(r[t]!=null)return r[t]}function Ce(r,e){return r??e}function zn(r,e,t){return r??e??t}function P1(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return _M.apply(r,e)}function Eg(r){if(typeof r=="number")return[r,r,r,r];var e=r.length;return e===2?[r[0],r[1],r[0],r[1]]:e===3?[r[0],r[1],r[2],r[1]]:r}function tn(r,e){if(!r)throw new Error(e)}function ta(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var IG="__ec_primitive__";function Hp(r){r[IG]=!0}function ah(r){return r[IG]}var _ee=(function(){function r(){this.data={}}return r.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},r.prototype.has=function(e){return this.data.hasOwnProperty(e)},r.prototype.get=function(e){return this.data[e]},r.prototype.set=function(e,t){return this.data[e]=t,this},r.prototype.keys=function(){return it(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},r})(),OG=typeof Map=="function";function See(){return OG?new Map:new _ee}var PG=(function(){function r(e){var t=ce(e);this.data=See();var n=this;e instanceof r?e.each(a):e&&O(e,a);function a(i,o){t?n.set(i,o):n.set(o,i)}}return r.prototype.hasKey=function(e){return this.data.has(e)},r.prototype.get=function(e){return this.data.get(e)},r.prototype.set=function(e,t){return this.data.set(e,t),t},r.prototype.each=function(e,t){this.data.forEach(function(n,a){e.call(t,n,a)})},r.prototype.keys=function(){var e=this.data.keys();return OG?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r})();function Te(r){return new PG(r)}function Ch(r,e){for(var t=new r.constructor(r.length+e.length),n=0;n<r.length;n++)t[n]=r[n];for(var a=r.length,n=0;n<e.length;n++)t[n+a]=e[n];return t}function kg(r,e){var t;if(Object.create)t=Object.create(r);else{var n=function(){};n.prototype=r,t=new n}return e&&ie(t,e),t}function CM(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function _e(r,e){return r.hasOwnProperty(e)}function Kt(){}var xp=180/Math.PI,wee=Number.EPSILON||Math.pow(2,-52);const Tee=Object.freeze(Object.defineProperty({__proto__:null,EPSILON:wee,HashMap:PG,RADIAN_TO_DEGREE:xp,assert:tn,bind:xe,clone:Me,concatArray:Ch,createCanvas:xee,createHashMap:Te,createObject:kg,curry:He,defaults:Le,disableUserSelect:CM,each:O,eqNaN:Jr,extend:ie,filter:dt,find:Ml,guid:wM,hasOwn:_e,indexOf:Fe,inherits:TM,isArray:ce,isArrayLike:en,isBuiltInObject:V2,isDom:sc,isFunction:Ae,isGradientObject:Rg,isImagePatternObject:EG,isNumber:st,isObject:Re,isPrimitive:ah,isRegExp:kG,isString:ye,isStringSafe:dx,isTypedArray:wn,keys:it,logError:I1,map:fe,merge:Ye,mergeAll:O1,mixin:Jt,noop:Kt,normalizeCssArray:Eg,reduce:ka,retrieve:Hr,retrieve2:Ce,retrieve3:zn,setAsPrimitive:Hp,slice:P1,trim:ta},Symbol.toStringTag,{value:"Module"}));function Dl(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function cn(r,e){return r[0]=e[0],r[1]=e[1],r}function Hi(r){return[r[0],r[1]]}function z1(r,e,t){return r[0]=e,r[1]=t,r}function G2(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function vx(r,e,t,n){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r}function el(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function Fp(r){return Math.sqrt(AM(r))}var Cee=Fp;function AM(r){return r[0]*r[0]+r[1]*r[1]}var Aee=AM;function Mee(r,e,t){return r[0]=e[0]*t[0],r[1]=e[1]*t[1],r}function Dee(r,e,t){return r[0]=e[0]/t[0],r[1]=e[1]/t[1],r}function Nee(r,e){return r[0]*e[0]+r[1]*e[1]}function bp(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function xc(r,e){var t=Fp(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function px(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var Io=px;function zG(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var ul=zG;function Lee(r,e){return r[0]=-e[0],r[1]=-e[1],r}function _p(r,e,t,n){return r[0]=e[0]+n*(t[0]-e[0]),r[1]=e[1]+n*(t[1]-e[1]),r}function Qt(r,e,t){var n=e[0],a=e[1];return r[0]=t[0]*n+t[2]*a+t[4],r[1]=t[1]*n+t[3]*a+t[5],r}function Oo(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function Po(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}const Ree=Object.freeze(Object.defineProperty({__proto__:null,add:G2,applyTransform:Qt,clone:Hi,copy:cn,create:Dl,dist:Io,distSquare:ul,distance:px,distanceSquare:zG,div:Dee,dot:Nee,len:Fp,lenSquare:AM,length:Cee,lengthSquare:Aee,lerp:_p,max:Po,min:Oo,mul:Mee,negate:Lee,normalize:xc,scale:bp,scaleAndAdd:vx,set:z1,sub:el},Symbol.toStringTag,{value:"Module"}));var gf=(function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r})(),Eee=(function(){function r(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new gf(t,e),"dragstart",e.event))},r.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,a=e.offsetY,i=n-this._x,o=a-this._y;this._x=n,this._y=a,t.drift(i,o,e),this.handler.dispatchToElement(new gf(t,e),"drag",e.event);var s=this.handler.findHover(n,a,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new gf(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new gf(s,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new gf(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new gf(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r})(),za=(function(){function r(e){e&&(this._$eventProcessor=e)}return r.prototype.on=function(e,t,n,a){this._$handlers||(this._$handlers={});var i=this._$handlers;if(typeof t=="function"&&(a=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;t!=null&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),i[e]||(i[e]=[]);for(var s=0;s<i[e].length;s++)if(i[e][s].h===n)return this;var l={h:n,query:t,ctx:a||this,callAtLast:n.zrEventfulCallAtLast},u=i[e].length-1,c=i[e][u];return c&&c.callAtLast?i[e].splice(u,0,l):i[e].push(l),this},r.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},r.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var a=[],i=0,o=n[e].length;i<o;i++)n[e][i].h!==t&&a.push(n[e][i]);n[e]=a}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},r.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[e],i=this._$eventProcessor;if(a)for(var o=t.length,s=a.length,l=0;l<s;l++){var u=a[l];if(!(i&&i.filter&&u.query!=null&&!i.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},r.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[e],i=this._$eventProcessor;if(a)for(var o=t.length,s=t[o-1],l=a.length,u=0;u<l;u++){var c=a[u];if(!(i&&i.filter&&c.query!=null&&!i.filter(e,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,t[0]);break;case 2:c.h.call(s,t[0],t[1]);break;default:c.h.apply(s,t.slice(1,o-1));break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},r})(),kee=Math.log(2);function H2(r,e,t,n,a,i){var o=n+"-"+a,s=r.length;if(i.hasOwnProperty(o))return i[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~a)/kee);return r[t][l]}for(var u=n|1<<t,c=t+1;n&1<<c;)c++;for(var f=0,d=0,v=0;d<s;d++){var g=1<<d;g&a||(f+=(v%2?-1:1)*r[t][d]*H2(r,e-1,c,u,a|g,i),v++)}return i[o]=f,f}function KI(r,e){var t=[[r[0],r[1],1,0,0,0,-e[0]*r[0],-e[0]*r[1]],[0,0,0,r[0],r[1],1,-e[1]*r[0],-e[1]*r[1]],[r[2],r[3],1,0,0,0,-e[2]*r[2],-e[2]*r[3]],[0,0,0,r[2],r[3],1,-e[3]*r[2],-e[3]*r[3]],[r[4],r[5],1,0,0,0,-e[4]*r[4],-e[4]*r[5]],[0,0,0,r[4],r[5],1,-e[5]*r[4],-e[5]*r[5]],[r[6],r[7],1,0,0,0,-e[6]*r[6],-e[6]*r[7]],[0,0,0,r[6],r[7],1,-e[7]*r[6],-e[7]*r[7]]],n={},a=H2(t,8,0,0,0,n);if(a!==0){for(var i=[],o=0;o<8;o++)for(var s=0;s<8;s++)i[s]==null&&(i[s]=0),i[s]+=((o+s)%2?-1:1)*H2(t,7,o===0?1:0,1<<o,1<<s,n)/a*e[o];return function(l,u,c){var f=u*i[6]+c*i[7]+1;l[0]=(u*i[0]+c*i[1]+i[2])/f,l[1]=(u*i[3]+c*i[4]+i[5])/f}}}var gx="___zrEVENTSAVED",GS=[];function Iee(r,e,t,n,a){return F2(GS,e,n,a,!0)&&F2(r,t,GS[0],GS[1])}function Oee(r,e){r&&t(r),e&&t(e);function t(n){var a=n[gx];a&&(a.clearMarkers&&a.clearMarkers(),delete n[gx])}}function F2(r,e,t,n,a){if(e.getBoundingClientRect&&nt.domSupported&&!jG(e)){var i=e[gx]||(e[gx]={}),o=Pee(e,i),s=zee(o,i,a);if(s)return s(r,t,n),!0}return!1}function Pee(r,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var n=["left","right"],a=["top","bottom"],i=0;i<4;i++){var o=document.createElement("div"),s=o.style,l=i%2,u=(i>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return e.clearMarkers=function(){O(t,function(c){c.parentNode&&c.parentNode.removeChild(c)})},t}function zee(r,e,t){for(var n=t?"invTrans":"trans",a=e[n],i=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),f=2*u,d=c.left,v=c.top;o.push(d,v),l=l&&i&&d===i[f]&&v===i[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&a?a:(e.srcCoords=o,e[n]=t?KI(s,o):KI(o,s))}function jG(r){return r.nodeName.toUpperCase()==="CANVAS"}var jee=/([&<>"'])/g,Bee={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function hn(r){return r==null?"":(r+"").replace(jee,function(e,t){return Bee[t]})}var Vee=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,HS=[],Gee=nt.browser.firefox&&+nt.browser.version.split(".")[0]<39;function U2(r,e,t,n){return t=t||{},n?QI(r,e,t):Gee&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):QI(r,e,t),t}function QI(r,e,t){if(nt.domSupported&&r.getBoundingClientRect){var n=e.clientX,a=e.clientY;if(jG(r)){var i=r.getBoundingClientRect();t.zrX=n-i.left,t.zrY=a-i.top;return}else if(F2(HS,r,n,a)){t.zrX=HS[0],t.zrY=HS[1];return}}t.zrX=t.zrY=0}function MM(r){return r||window.event}function Sa(r,e,t){if(e=MM(e),e.zrX!=null)return e;var n=e.type,a=n&&n.indexOf("touch")>=0;if(a){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&U2(r,o,e,t)}else{U2(r,e,e,t);var i=Hee(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&Vee.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function Hee(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,n=r.deltaY;if(t==null||n==null)return e;var a=Math.abs(n!==0?n:t),i=n>0?-1:n<0?1:t>0?-1:1;return 3*a*i}function Y2(r,e,t,n){r.addEventListener(e,t,n)}function Fee(r,e,t,n){r.removeEventListener(e,t,n)}var Zo=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function JI(r){return r.which===2||r.which===3}var Uee=(function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,n){var a=e.touches;if(a){for(var i={points:[],touches:[],target:t,event:e},o=0,s=a.length;o<s;o++){var l=a[o],u=U2(n,l,{});i.points.push([u.zrX,u.zrY]),i.touches.push(l)}this._track.push(i)}},r.prototype._recognize=function(e){for(var t in FS)if(FS.hasOwnProperty(t)){var n=FS[t](this._track,e);if(n)return n}},r})();function eO(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function Yee(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var FS={pinch:function(r,e){var t=r.length;if(t){var n=(r[t-1]||{}).points,a=(r[t-2]||{}).points||n;if(a&&a.length>1&&n&&n.length>1){var i=eO(n)/eO(a);!isFinite(i)&&(i=1),e.pinchScale=i;var o=Yee(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function Dr(){return[1,0,0,1,0,0]}function Ig(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Og(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function Qa(r,e,t){var n=e[0]*t[0]+e[2]*t[1],a=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=n,r[1]=a,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function ai(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function ns(r,e,t,n){n===void 0&&(n=[0,0]);var a=e[0],i=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(t),f=Math.cos(t);return r[0]=a*f+s*c,r[1]=-a*c+s*f,r[2]=i*f+l*c,r[3]=-i*c+f*l,r[4]=f*(o-n[0])+c*(u-n[1])+n[0],r[5]=f*(u-n[1])-c*(o-n[0])+n[1],r}function j1(r,e,t){var n=t[0],a=t[1];return r[0]=e[0]*n,r[1]=e[1]*a,r[2]=e[2]*n,r[3]=e[3]*a,r[4]=e[4]*n,r[5]=e[5]*a,r}function Ia(r,e){var t=e[0],n=e[2],a=e[4],i=e[1],o=e[3],s=e[5],l=t*o-i*n;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-n*l,r[3]=t*l,r[4]=(n*s-o*a)*l,r[5]=(i*a-t*s)*l,r):null}function BG(r){var e=Dr();return Og(e,r),e}const Wee=Object.freeze(Object.defineProperty({__proto__:null,clone:BG,copy:Og,create:Dr,identity:Ig,invert:Ia,mul:Qa,rotate:ns,scale:j1,translate:ai},Symbol.toStringTag,{value:"Module"}));var ke=(function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,n){e.x=t,e.y=n},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},r.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},r.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},r.scaleAndAdd=function(e,t,n,a){e.x=t.x+n.x*a,e.y=t.y+n.y*a},r.lerp=function(e,t,n,a){var i=1-a;e.x=i*t.x+a*n.x,e.y=i*t.y+a*n.y},r})(),Pu=Math.min,qf=Math.max,W2=Math.abs,tO=["x","y"],Xee=["width","height"],Ql=new ke,Jl=new ke,eu=new ke,tu=new ke,Kn=VG(),ap=Kn.minTv,X2=Kn.maxTv,Sp=[0,0],Ie=(function(){function r(e,t,n,a){r.set(this,e,t,n,a)}return r.set=function(e,t,n,a,i){return a<0&&(t=t+a,a=-a),i<0&&(n=n+i,i=-i),e.x=t,e.y=n,e.width=a,e.height=i,e},r.prototype.union=function(e){var t=Pu(e.x,this.x),n=Pu(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=qf(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=qf(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,a=e.height/t.height,i=Dr();return ai(i,i,[-t.x,-t.y]),j1(i,i,[n,a]),ai(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t,n){return r.intersect(this,e,t,n)},r.intersect=function(e,t,n,a){n&&ke.set(n,0,0);var i=a&&a.outIntersectRect||null,o=a&&a.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!e||!t)return!1;e instanceof r||(e=r.set(qee,e.x,e.y,e.width,e.height)),t instanceof r||(t=r.set(Zee,t.x,t.y,t.width,t.height));var s=!!n;Kn.reset(a,s);var l=Kn.touchThreshold,u=e.x+l,c=e.x+e.width-l,f=e.y+l,d=e.y+e.height-l,v=t.x+l,g=t.x+t.width-l,x=t.y+l,y=t.y+t.height-l;if(u>c||f>d||v>g||x>y)return!1;var b=!(c<v||g<u||d<x||y<f);return(s||i)&&(Sp[0]=1/0,Sp[1]=0,rO(u,c,v,g,0,s,i,o),rO(f,d,x,y,1,s,i,o),s&&ke.copy(n,b?Kn.useDir?Kn.dirMinTv:ap:X2)),b},r.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},r.prototype.contain=function(e,t){return r.contain(this,e,t)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},r.applyTransform=function(e,t,n){if(!n){e!==t&&r.copy(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var a=n[0],i=n[3],o=n[4],s=n[5];e.x=t.x*a+o,e.y=t.y*i+s,e.width=t.width*a,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Ql.x=eu.x=t.x,Ql.y=tu.y=t.y,Jl.x=tu.x=t.x+t.width,Jl.y=eu.y=t.y+t.height,Ql.transform(n),tu.transform(n),Jl.transform(n),eu.transform(n),e.x=Pu(Ql.x,Jl.x,eu.x,tu.x),e.y=Pu(Ql.y,Jl.y,eu.y,tu.y);var l=qf(Ql.x,Jl.x,eu.x,tu.x),u=qf(Ql.y,Jl.y,eu.y,tu.y);e.width=l-e.x,e.height=u-e.y},r})(),qee=new Ie(0,0,0,0),Zee=new Ie(0,0,0,0);function rO(r,e,t,n,a,i,o,s){var l=W2(e-t),u=W2(n-r),c=Pu(l,u),f=tO[a],d=tO[1-a],v=Xee[a];e<t||n<r?l<u?(i&&(X2[f]=-l),s&&(o[f]=e,o[v]=0)):(i&&(X2[f]=u),s&&(o[f]=r,o[v]=0)):(o&&(o[f]=qf(r,t),o[v]=Pu(e,n)-o[f]),i&&(c<Sp[0]||Kn.useDir)&&(Sp[0]=Pu(c,Sp[0]),(l<u||!Kn.bidirectional)&&(ap[f]=l,ap[d]=0,Kn.useDir&&Kn.calcDirMTV()),(l>=u||!Kn.bidirectional)&&(ap[f]=-u,ap[d]=0,Kn.useDir&&Kn.calcDirMTV())))}function VG(){var r=0,e=new ke,t=new ke,n={minTv:new ke,maxTv:new ke,useDir:!1,dirMinTv:new ke,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){n.touchThreshold=0,i&&i.touchThreshold!=null&&(n.touchThreshold=qf(0,i.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,i&&i.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),t.copy(n.minTv),r=i.direction,n.bidirectional=i.bidirectional==null||!!i.bidirectional,n.bidirectional||e.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var i=n.minTv,o=n.dirMinTv,s=i.y*i.y+i.x*i.x,l=Math.sin(r),u=Math.cos(r),c=l*i.y+u*i.x;if(a(c)){a(i.x)&&a(i.y)&&o.set(0,0);return}if(t.x=s*u/c,t.y=s*l/c,a(t.x)&&a(t.y)){o.set(0,0);return}(n.bidirectional||e.dot(t)>0)&&t.len()<o.len()&&o.copy(t)}};function a(i){return W2(i)<1e-10}return n}var GG="silent";function $ee(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:Kee}}function Kee(){Zo(this.event)}var Qee=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e})(za),yv=(function(){function r(e,t){this.x=e,this.y=t}return r})(),Jee=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],US=new Ie(0,0,0,0),HG=(function(r){K(e,r);function e(t,n,a,i,o){var s=r.call(this)||this;return s._hovered=new yv(0,0),s.storage=t,s.painter=n,s.painterRoot=i,s._pointerSize=o,a=a||new Qee,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new Eee(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(O(Jee,function(n){t.on&&t.on(n,this[n],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var n=t.zrX,a=t.zrY,i=FG(this,n,a),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new yv(n,a):this.findHover(n,a),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var n=t.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new yv(0,0)},e.prototype.dispatch=function(t,n){var a=this[t];a&&a.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},e.prototype.dispatchToElement=function(t,n,a){t=t||{};var i=t.target;if(!(i&&i.silent)){for(var o="on"+n,s=$ee(n,t,a);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(n,s),i=i.__hostTarget?i.__hostTarget:i.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(t,n,a){var i=this.storage.getDisplayList(),o=new yv(t,n);if(nO(i,o,t,n,a),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new Ie(t-u,n-u,l,l),f=i.length-1;f>=0;f--){var d=i[f];d!==a&&!d.ignore&&!d.ignoreCoarsePointer&&(!d.parent||!d.parent.ignoreCoarsePointer)&&(US.copy(d.getBoundingRect()),d.transform&&US.applyTransform(d.transform),US.intersect(c)&&s.push(d))}if(s.length)for(var v=4,g=Math.PI/12,x=Math.PI*2,y=0;y<u;y+=v)for(var b=0;b<x;b+=g){var w=t+y*Math.cos(b),T=n+y*Math.sin(b);if(nO(s,o,w,T,a),o.target)return o}}return o},e.prototype.processGesture=function(t,n){this._gestureMgr||(this._gestureMgr=new Uee);var a=this._gestureMgr;n==="start"&&a.clear();var i=a.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(n==="end"&&a.clear(),i){var o=i.type;t.gestureEvent=o;var s=new yv;s.target=i.target,this.dispatchToElement(s,o,i.event)}},e})(za);O(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){HG.prototype[r]=function(e){var t=e.zrX,n=e.zrY,a=FG(this,t,n),i,o;if((r!=="mouseup"||!a)&&(i=this.findHover(t,n),o=i.target),r==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||Io(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,r,e)}});function ete(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var n=r,a=void 0,i=!1;n;){if(n.ignoreClip&&(i=!0),!i){var o=n.getClipPath();if(o&&!o.contain(e,t))return!1}n.silent&&(a=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return a?GG:!0}return!1}function nO(r,e,t,n,a){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==a&&!o.ignore&&(s=ete(o,t,n))&&(!e.topTarget&&(e.topTarget=o),s!==GG)){e.target=o;break}}}function FG(r,e,t){var n=r.painter;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var UG=32,xv=7;function tte(r){for(var e=0;r>=UG;)e|=r&1,r>>=1;return r+e}function aO(r,e,t,n){var a=e+1;if(a===t)return 1;if(n(r[a++],r[e])<0){for(;a<t&&n(r[a],r[a-1])<0;)a++;rte(r,e,a)}else for(;a<t&&n(r[a],r[a-1])>=0;)a++;return a-e}function rte(r,e,t){for(t--;e<t;){var n=r[e];r[e++]=r[t],r[t--]=n}}function iO(r,e,t,n,a){for(n===e&&n++;n<t;n++){for(var i=r[n],o=e,s=n,l;o<s;)l=o+s>>>1,a(i,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function YS(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])>0){for(s=n-a;l<s&&i(r,e[t+a+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;l<s&&i(r,e[t+a-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o<l;){var c=o+(l-o>>>1);i(r,e[t+c])>0?o=c+1:l=c}return l}function WS(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])<0){for(s=a+1;l<s&&i(r,e[t+a-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=n-a;l<s&&i(r,e[t+a+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o<l;){var c=o+(l-o>>>1);i(r,e[t+c])<0?l=c:o=c+1}return l}function nte(r,e){var t=xv,n,a,i=0,o=[];n=[],a=[];function s(v,g){n[i]=v,a[i]=g,i+=1}function l(){for(;i>1;){var v=i-2;if(v>=1&&a[v-1]<=a[v]+a[v+1]||v>=2&&a[v-2]<=a[v]+a[v-1])a[v-1]<a[v+1]&&v--;else if(a[v]>a[v+1])break;c(v)}}function u(){for(;i>1;){var v=i-2;v>0&&a[v-1]<a[v+1]&&v--,c(v)}}function c(v){var g=n[v],x=a[v],y=n[v+1],b=a[v+1];a[v]=x+b,v===i-3&&(n[v+1]=n[v+2],a[v+1]=a[v+2]),i--;var w=WS(r[y],r,g,x,0,e);g+=w,x-=w,x!==0&&(b=YS(r[g+x-1],r,y,b,b-1,e),b!==0&&(x<=b?f(g,x,y,b):d(g,x,y,b)))}function f(v,g,x,y){var b=0;for(b=0;b<g;b++)o[b]=r[v+b];var w=0,T=x,C=v;if(r[C++]=r[T++],--y===0){for(b=0;b<g;b++)r[C+b]=o[w+b];return}if(g===1){for(b=0;b<y;b++)r[C+b]=r[T+b];r[C+y]=o[w];return}for(var D=t,M,N,R;;){M=0,N=0,R=!1;do if(e(r[T],o[w])<0){if(r[C++]=r[T++],N++,M=0,--y===0){R=!0;break}}else if(r[C++]=o[w++],M++,N=0,--g===1){R=!0;break}while((M|N)<D);if(R)break;do{if(M=WS(r[T],o,w,g,0,e),M!==0){for(b=0;b<M;b++)r[C+b]=o[w+b];if(C+=M,w+=M,g-=M,g<=1){R=!0;break}}if(r[C++]=r[T++],--y===0){R=!0;break}if(N=YS(o[w],r,T,y,0,e),N!==0){for(b=0;b<N;b++)r[C+b]=r[T+b];if(C+=N,T+=N,y-=N,y===0){R=!0;break}}if(r[C++]=o[w++],--g===1){R=!0;break}D--}while(M>=xv||N>=xv);if(R)break;D<0&&(D=0),D+=2}if(t=D,t<1&&(t=1),g===1){for(b=0;b<y;b++)r[C+b]=r[T+b];r[C+y]=o[w]}else{if(g===0)throw new Error;for(b=0;b<g;b++)r[C+b]=o[w+b]}}function d(v,g,x,y){var b=0;for(b=0;b<y;b++)o[b]=r[x+b];var w=v+g-1,T=y-1,C=x+y-1,D=0,M=0;if(r[C--]=r[w--],--g===0){for(D=C-(y-1),b=0;b<y;b++)r[D+b]=o[b];return}if(y===1){for(C-=g,w-=g,M=C+1,D=w+1,b=g-1;b>=0;b--)r[M+b]=r[D+b];r[C]=o[T];return}for(var N=t;;){var R=0,E=0,k=!1;do if(e(o[T],r[w])<0){if(r[C--]=r[w--],R++,E=0,--g===0){k=!0;break}}else if(r[C--]=o[T--],E++,R=0,--y===1){k=!0;break}while((R|E)<N);if(k)break;do{if(R=g-WS(o[T],r,v,g,g-1,e),R!==0){for(C-=R,w-=R,g-=R,M=C+1,D=w+1,b=R-1;b>=0;b--)r[M+b]=r[D+b];if(g===0){k=!0;break}}if(r[C--]=o[T--],--y===1){k=!0;break}if(E=y-YS(r[w],o,0,y,y-1,e),E!==0){for(C-=E,T-=E,y-=E,M=C+1,D=T+1,b=0;b<E;b++)r[M+b]=o[D+b];if(y<=1){k=!0;break}}if(r[C--]=r[w--],--g===0){k=!0;break}N--}while(R>=xv||E>=xv);if(k)break;N<0&&(N=0),N+=2}if(t=N,t<1&&(t=1),y===1){for(C-=g,w-=g,M=C+1,D=w+1,b=g-1;b>=0;b--)r[M+b]=r[D+b];r[C]=o[T]}else{if(y===0)throw new Error;for(D=C-(y-1),b=0;b<y;b++)r[D+b]=o[b]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function j0(r,e,t,n){t||(t=0),n||(n=r.length);var a=n-t;if(!(a<2)){var i=0;if(a<UG){i=aO(r,t,n,e),iO(r,t,n,t+i,e);return}var o=nte(r,e),s=tte(a);do{if(i=aO(r,t,n,e),i<s){var l=a;l>s&&(l=s),iO(r,t,t+l,t+i,e),i=l}o.pushRun(t,i),o.mergeRuns(),a-=i,t+=i}while(a!==0);o.forceMergeRuns()}}var Jn=1,ip=2,Uf=4,oO=!1;function XS(){oO||(oO=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function sO(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var ate=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=sO}return r.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},r.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},r.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,a=0,i=t.length;a<i;a++)this._updateAndAddDisplayable(t[a],null,e);n.length=this._displayListLen,j0(n,sO)},r.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var a=e.getClipPath(),i=t&&t.length,o=0,s=e.__clipPaths;if(!e.ignoreClip&&(i||a)){if(s||(s=e.__clipPaths=[]),i)for(var l=0;l<t.length;l++)s[o++]=t[l];for(var u=a,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 f=e.childrenRef(),d=0;d<f.length;d++){var v=f[d];e.__dirty&&(v.__dirty|=Jn),this._updateAndAddDisplayable(v,s,n)}e.__dirty=0}else{var g=e;isNaN(g.z)&&(XS(),g.z=0),isNaN(g.z2)&&(XS(),g.z2=0),isNaN(g.zlevel)&&(XS(),g.zlevel=0),this._displayList[this._displayListLen++]=g}var x=e.getDecalElement&&e.getDecalElement();x&&this._updateAndAddDisplayable(x,s,n);var y=e.getTextGuideLine();y&&this._updateAndAddDisplayable(y,s,n);var b=e.getTextContent();b&&this._updateAndAddDisplayable(b,s,n)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var a=Fe(this._roots,e);a>=0&&this._roots.splice(a,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),mx;mx=nt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var wp={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)))},elasticOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-wp.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?wp.bounceIn(r*2)*.5:wp.bounceOut(r*2-1)*.5+.5}},xy=Math.pow,cl=Math.sqrt,yx=1e-8,YG=1e-4,lO=cl(3),by=1/3,Li=Dl(),Da=Dl(),ih=Dl();function tl(r){return r>-yx&&r<yx}function WG(r){return r>yx||r<-yx}function Ar(r,e,t,n,a){var i=1-a;return i*i*(i*r+3*a*e)+a*a*(a*n+3*i*t)}function uO(r,e,t,n,a){var i=1-a;return 3*(((e-r)*i+2*(t-e)*a)*i+(n-t)*a*a)}function xx(r,e,t,n,a,i){var o=n+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-a,c=s*s-3*o*l,f=s*l-9*o*u,d=l*l-3*s*u,v=0;if(tl(c)&&tl(f))if(tl(s))i[0]=0;else{var g=-l/s;g>=0&&g<=1&&(i[v++]=g)}else{var x=f*f-4*c*d;if(tl(x)){var y=f/c,g=-s/o+y,b=-y/2;g>=0&&g<=1&&(i[v++]=g),b>=0&&b<=1&&(i[v++]=b)}else if(x>0){var w=cl(x),T=c*s+1.5*o*(-f+w),C=c*s+1.5*o*(-f-w);T<0?T=-xy(-T,by):T=xy(T,by),C<0?C=-xy(-C,by):C=xy(C,by);var g=(-s-(T+C))/(3*o);g>=0&&g<=1&&(i[v++]=g)}else{var D=(2*c*s-3*o*f)/(2*cl(c*c*c)),M=Math.acos(D)/3,N=cl(c),R=Math.cos(M),g=(-s-2*N*R)/(3*o),b=(-s+N*(R+lO*Math.sin(M)))/(3*o),E=(-s+N*(R-lO*Math.sin(M)))/(3*o);g>=0&&g<=1&&(i[v++]=g),b>=0&&b<=1&&(i[v++]=b),E>=0&&E<=1&&(i[v++]=E)}}return v}function XG(r,e,t,n,a){var i=6*t-12*e+6*r,o=9*e+3*n-3*r-9*t,s=3*e-3*r,l=0;if(tl(o)){if(WG(i)){var u=-s/i;u>=0&&u<=1&&(a[l++]=u)}}else{var c=i*i-4*o*s;if(tl(c))a[0]=-i/(2*o);else if(c>0){var f=cl(c),u=(-i+f)/(2*o),d=(-i-f)/(2*o);u>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l}function bl(r,e,t,n,a,i){var o=(e-r)*a+r,s=(t-e)*a+e,l=(n-t)*a+t,u=(s-o)*a+o,c=(l-s)*a+s,f=(c-u)*a+u;i[0]=r,i[1]=o,i[2]=u,i[3]=f,i[4]=f,i[5]=c,i[6]=l,i[7]=n}function qG(r,e,t,n,a,i,o,s,l,u,c){var f,d=.005,v=1/0,g,x,y,b;Li[0]=l,Li[1]=u;for(var w=0;w<1;w+=.05)Da[0]=Ar(r,t,a,o,w),Da[1]=Ar(e,n,i,s,w),y=ul(Li,Da),y<v&&(f=w,v=y);v=1/0;for(var T=0;T<32&&!(d<YG);T++)g=f-d,x=f+d,Da[0]=Ar(r,t,a,o,g),Da[1]=Ar(e,n,i,s,g),y=ul(Da,Li),g>=0&&y<v?(f=g,v=y):(ih[0]=Ar(r,t,a,o,x),ih[1]=Ar(e,n,i,s,x),b=ul(ih,Li),x<=1&&b<v?(f=x,v=b):d*=.5);return c&&(c[0]=Ar(r,t,a,o,f),c[1]=Ar(e,n,i,s,f)),cl(v)}function ite(r,e,t,n,a,i,o,s,l){for(var u=r,c=e,f=0,d=1/l,v=1;v<=l;v++){var g=v*d,x=Ar(r,t,a,o,g),y=Ar(e,n,i,s,g),b=x-u,w=y-c;f+=Math.sqrt(b*b+w*w),u=x,c=y}return f}function Gr(r,e,t,n){var a=1-n;return a*(a*r+2*n*e)+n*n*t}function q2(r,e,t,n){return 2*((1-n)*(e-r)+n*(t-e))}function ote(r,e,t,n,a){var i=r-2*e+t,o=2*(e-r),s=r-n,l=0;if(tl(i)){if(WG(o)){var u=-s/o;u>=0&&u<=1&&(a[l++]=u)}}else{var c=o*o-4*i*s;if(tl(c)){var u=-o/(2*i);u>=0&&u<=1&&(a[l++]=u)}else if(c>0){var f=cl(c),u=(-o+f)/(2*i),d=(-o-f)/(2*i);u>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l}function ZG(r,e,t){var n=r+t-2*e;return n===0?.5:(r-e)/n}function Up(r,e,t,n,a){var i=(e-r)*n+r,o=(t-e)*n+e,s=(o-i)*n+i;a[0]=r,a[1]=i,a[2]=s,a[3]=s,a[4]=o,a[5]=t}function $G(r,e,t,n,a,i,o,s,l){var u,c=.005,f=1/0;Li[0]=o,Li[1]=s;for(var d=0;d<1;d+=.05){Da[0]=Gr(r,t,a,d),Da[1]=Gr(e,n,i,d);var v=ul(Li,Da);v<f&&(u=d,f=v)}f=1/0;for(var g=0;g<32&&!(c<YG);g++){var x=u-c,y=u+c;Da[0]=Gr(r,t,a,x),Da[1]=Gr(e,n,i,x);var v=ul(Da,Li);if(x>=0&&v<f)u=x,f=v;else{ih[0]=Gr(r,t,a,y),ih[1]=Gr(e,n,i,y);var b=ul(ih,Li);y<=1&&b<f?(u=y,f=b):c*=.5}}return l&&(l[0]=Gr(r,t,a,u),l[1]=Gr(e,n,i,u)),cl(f)}function ste(r,e,t,n,a,i,o){for(var s=r,l=e,u=0,c=1/o,f=1;f<=o;f++){var d=f*c,v=Gr(r,t,a,d),g=Gr(e,n,i,d),x=v-s,y=g-l;u+=Math.sqrt(x*x+y*y),s=v,l=g}return u}var lte=/cubic-bezier\(([0-9,\.e ]+)\)/;function DM(r){var e=r&&lte.exec(r);if(e){var t=e[1].split(","),n=+ta(t[0]),a=+ta(t[1]),i=+ta(t[2]),o=+ta(t[3]);if(isNaN(n+a+i+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:xx(0,n,i,1,l,s)&&Ar(0,a,o,1,s[0])}}}var ute=(function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Kt,this.ondestroy=e.ondestroy||Kt,this.onrestart=e.onrestart||Kt,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,a=e-this._startTime-this._pausedTime,i=a/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=a%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Ae(e)?e:wp[e]||DM(e)},r})(),KG=(function(){function r(e){this.value=e}return r})(),cte=(function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new KG(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),Ah=(function(){function r(e){this._list=new cte,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var n=this._list,a=this._map,i=null;if(a[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete a[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new KG(t),s.key=e,n.insertEntry(s),a[e]=s}return i},r.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),cO={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 Ja(r){return r=Math.round(r),r<0?0:r>255?255:r}function fte(r){return r=Math.round(r),r<0?0:r>360?360:r}function Yp(r){return r<0?0:r>1?1:r}function B0(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Ja(parseFloat(e)/100*255):Ja(parseInt(e,10))}function Vo(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Yp(parseFloat(e)/100):Yp(parseFloat(e))}function qS(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function rl(r,e,t){return r+(e-r)*t}function _a(r,e,t,n,a){return r[0]=e,r[1]=t,r[2]=n,r[3]=a,r}function Z2(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var QG=new Ah(20),_y=null;function mf(r,e){_y&&Z2(_y,e),_y=QG.put(r,_y||e.slice())}function dn(r,e){if(r){e=e||[];var t=QG.get(r);if(t)return Z2(e,t);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in cO)return Z2(e,cO[n]),mf(r,e),e;var a=n.length;if(n.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(n.slice(1,4),16);if(!(i>=0&&i<=4095)){_a(e,0,0,0,1);return}return _a(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(n.slice(4),16)/15:1),mf(r,e),e}else if(a===7||a===9){var i=parseInt(n.slice(1,7),16);if(!(i>=0&&i<=16777215)){_a(e,0,0,0,1);return}return _a(e,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(n.slice(7),16)/255:1),mf(r,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===a){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?_a(e,+u[0],+u[1],+u[2],1):_a(e,0,0,0,1);c=Vo(u.pop());case"rgb":if(u.length>=3)return _a(e,B0(u[0]),B0(u[1]),B0(u[2]),u.length===3?c:Vo(u[3])),mf(r,e),e;_a(e,0,0,0,1);return;case"hsla":if(u.length!==4){_a(e,0,0,0,1);return}return u[3]=Vo(u[3]),$2(u,e),mf(r,e),e;case"hsl":if(u.length!==3){_a(e,0,0,0,1);return}return $2(u,e),mf(r,e),e;default:return}}_a(e,0,0,0,1)}}function $2(r,e){var t=(parseFloat(r[0])%360+360)%360/360,n=Vo(r[1]),a=Vo(r[2]),i=a<=.5?a*(n+1):a+n-a*n,o=a*2-i;return e=e||[],_a(e,Ja(qS(o,i,t+1/3)*255),Ja(qS(o,i,t)*255),Ja(qS(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function hte(r){if(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,a=Math.min(e,t,n),i=Math.max(e,t,n),o=i-a,s=(i+a)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+a):u=o/(2-i-a);var c=((i-e)/6+o/2)/o,f=((i-t)/6+o/2)/o,d=((i-n)/6+o/2)/o;e===i?l=d-f:t===i?l=1/3+c-d:n===i&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return r[3]!=null&&v.push(r[3]),v}}function bx(r,e){var t=dn(r);if(t){for(var n=0;n<3;n++)e<0?t[n]=t[n]*(1-e)|0:t[n]=(255-t[n])*e+t[n]|0,t[n]>255?t[n]=255:t[n]<0&&(t[n]=0);return Ra(t,t.length===4?"rgba":"rgb")}}function dte(r){var e=dn(r);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Tp(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var n=r*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=e[a],s=e[i],l=n-a;return t[0]=Ja(rl(o[0],s[0],l)),t[1]=Ja(rl(o[1],s[1],l)),t[2]=Ja(rl(o[2],s[2],l)),t[3]=Yp(rl(o[3],s[3],l)),t}}var vte=Tp;function NM(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var n=r*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=dn(e[a]),s=dn(e[i]),l=n-a,u=Ra([Ja(rl(o[0],s[0],l)),Ja(rl(o[1],s[1],l)),Ja(rl(o[2],s[2],l)),Yp(rl(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:a,rightIndex:i,value:n}:u}}var pte=NM;function Go(r,e,t,n){var a=dn(r);if(r)return a=hte(a),e!=null&&(a[0]=fte(Ae(e)?e(a[0]):e)),t!=null&&(a[1]=Vo(Ae(t)?t(a[1]):t)),n!=null&&(a[2]=Vo(Ae(n)?n(a[2]):n)),Ra($2(a),"rgba")}function Wp(r,e){var t=dn(r);if(t&&e!=null)return t[3]=Yp(e),Ra(t,"rgba")}function Ra(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function Xp(r,e){var t=dn(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}function gte(){return Ra([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var fO=new Ah(100);function _x(r){if(ye(r)){var e=fO.get(r);return e||(e=bx(r,-.1),fO.put(r,e)),e}else if(Rg(r)){var t=ie({},r);return t.colorStops=fe(r.colorStops,function(n){return{offset:n.offset,color:bx(n.color,-.1)}}),t}return r}const mte=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:Tp,fastMapToColor:vte,lerp:NM,lift:bx,liftColor:_x,lum:Xp,mapToColor:pte,modifyAlpha:Wp,modifyHSL:Go,parse:dn,parseCssFloat:Vo,parseCssInt:B0,random:gte,stringify:Ra,toHex:dte},Symbol.toStringTag,{value:"Module"}));var Sx=Math.round;function qp(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=dn(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var hO=1e-4;function nl(r){return r<hO&&r>-hO}function Sy(r){return Sx(r*1e3)/1e3}function K2(r){return Sx(r*1e4)/1e4}function yte(r){return"matrix("+Sy(r[0])+","+Sy(r[1])+","+Sy(r[2])+","+Sy(r[3])+","+K2(r[4])+","+K2(r[5])+")"}var xte={left:"start",right:"end",center:"middle",middle:"middle"};function bte(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function _te(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function Ste(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function JG(r){return r&&!!r.image}function wte(r){return r&&!!r.svgElement}function LM(r){return JG(r)||wte(r)}function e6(r){return r.type==="linear"}function t6(r){return r.type==="radial"}function r6(r){return r&&(r.type==="linear"||r.type==="radial")}function B1(r){return"url(#"+r+")"}function n6(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function a6(r){var e=r.x||0,t=r.y||0,n=(r.rotation||0)*xp,a=Ce(r.scaleX,1),i=Ce(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),n&&l.push("rotate("+n+")"),(a!==1||i!==1)&&l.push("scale("+a+","+i+")"),(o||s)&&l.push("skew("+Sx(o*xp)+"deg, "+Sx(s*xp)+"deg)"),l.join(" ")}var Tte=(function(){return nt.hasGlobalWindow&&Ae(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})(),Q2=Array.prototype.slice;function Do(r,e,t){return(e-r)*t+r}function ZS(r,e,t,n){for(var a=e.length,i=0;i<a;i++)r[i]=Do(e[i],t[i],n);return r}function Cte(r,e,t,n){for(var a=e.length,i=a&&e[0].length,o=0;o<a;o++){r[o]||(r[o]=[]);for(var s=0;s<i;s++)r[o][s]=Do(e[o][s],t[o][s],n)}return r}function wy(r,e,t,n){for(var a=e.length,i=0;i<a;i++)r[i]=e[i]+t[i]*n;return r}function dO(r,e,t,n){for(var a=e.length,i=a&&e[0].length,o=0;o<a;o++){r[o]||(r[o]=[]);for(var s=0;s<i;s++)r[o][s]=e[o][s]+t[o][s]*n}return r}function Ate(r,e){for(var t=r.length,n=e.length,a=t>n?e:r,i=Math.min(t,n),o=a[i-1]||{color:[0,0,0,0],offset:0},s=i;s<Math.max(t,n);s++)a.push({offset:o.offset,color:o.color.slice()})}function Mte(r,e,t){var n=r,a=e;if(!(!n.push||!a.push)){var i=n.length,o=a.length;if(i!==o){var s=i>o;if(s)n.length=o;else for(var l=i;l<o;l++)n.push(t===1?a[l]:Q2.call(a[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(t===1)isNaN(n[l])&&(n[l]=a[l]);else for(var c=0;c<u;c++)isNaN(n[l][c])&&(n[l][c]=a[l][c])}}function Cp(r){if(en(r)){var e=r.length;if(en(r[0])){for(var t=[],n=0;n<e;n++)t.push(Q2.call(r[n]));return t}return Q2.call(r)}return r}function V0(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function Dte(r){return en(r&&r[0])?2:1}var Ty=0,G0=1,i6=2,op=3,J2=4,eC=5,vO=6;function pO(r){return r===J2||r===eC}function Cy(r){return r===G0||r===i6}var bv=[0,0,0,0],Nte=(function(){function r(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var a=this.keyframes,i=a.length,o=!1,s=vO,l=t;if(en(t)){var u=Dte(t);s=u,(u===1&&!st(t[0])||u===2&&!st(t[0][0]))&&(o=!0)}else if(st(t)&&!Jr(t))s=Ty;else if(ye(t))if(!isNaN(+t))s=Ty;else{var c=dn(t);c&&(l=c,s=op)}else if(Rg(t)){var f=ie({},l);f.colorStops=fe(t.colorStops,function(v){return{offset:v.offset,color:dn(v.color)}}),e6(t)?s=J2:t6(t)&&(s=eC),l=f}i===0?this.valType=s:(s!==this.valType||s===vO)&&(o=!0),this.discrete=this.discrete||o;var d={time:e,value:l,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Ae(n)?n:wp[n]||DM(n)),a.push(d),d},r.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(x,y){return x.time-y.time});for(var a=this.valType,i=n.length,o=n[i-1],s=this.discrete,l=Cy(a),u=pO(a),c=0;c<i;c++){var f=n[c],d=f.value,v=o.value;f.percent=f.time/e,s||(l&&c!==i-1?Mte(d,v,a):u&&Ate(d.colorStops,v.colorStops))}if(!s&&a!==eC&&t&&this.needsAnimate()&&t.needsAnimate()&&a===t.valType&&!t._finished){this._additiveTrack=t;for(var g=n[0].value,c=0;c<i;c++)a===Ty?n[c].additiveValue=n[c].value-g:a===op?n[c].additiveValue=wy([],n[c].value,g,-1):Cy(a)&&(n[c].additiveValue=a===G0?wy([],n[c].value,g,-1):dO([],n[c].value,g,-1))}},r.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,a=n?"additiveValue":"value",i=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=i===op,c,f=this._lastFr,d=Math.min,v,g;if(s===1)v=g=o[0];else{if(t<0)c=0;else if(t<this._lastFrP){var x=d(f+1,s-1);for(c=x;c>=0&&!(o[c].percent<=t);c--);c=d(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>t);c++);c=d(c-1,s-2)}g=o[c+1],v=o[c]}if(v&&g){this._lastFr=c,this._lastFrP=t;var y=g.percent-v.percent,b=y===0?1:d((t-v.percent)/y,1);g.easingFunc&&(b=g.easingFunc(b));var w=n?this._additiveValue:u?bv:e[l];if((Cy(i)||u)&&!w&&(w=this._additiveValue=[]),this.discrete)e[l]=b<1?v.rawValue:g.rawValue;else if(Cy(i))i===G0?ZS(w,v[a],g[a],b):Cte(w,v[a],g[a],b);else if(pO(i)){var T=v[a],C=g[a],D=i===J2;e[l]={type:D?"linear":"radial",x:Do(T.x,C.x,b),y:Do(T.y,C.y,b),colorStops:fe(T.colorStops,function(N,R){var E=C.colorStops[R];return{offset:Do(N.offset,E.offset,b),color:V0(ZS([],N.color,E.color,b))}}),global:C.global},D?(e[l].x2=Do(T.x2,C.x2,b),e[l].y2=Do(T.y2,C.y2,b)):e[l].r=Do(T.r,C.r,b)}else if(u)ZS(w,v[a],g[a],b),n||(e[l]=V0(w));else{var M=Do(v[a],g[a],b);n?this._additiveValue=M:e[l]=M}n&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,a=this._additiveValue;t===Ty?e[n]=e[n]+a:t===op?(dn(e[n],bv),wy(bv,bv,a,1),e[n]=V0(bv)):t===G0?wy(e[n],e[n],a,1):t===i6&&dO(e[n],e[n],a,1)},r})(),RM=(function(){function r(e,t,n,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&a){I1("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,it(t),n)},r.prototype.whenWithKeys=function(e,t,n,a){for(var i=this._tracks,o=0;o<n.length;o++){var s=n[o],l=i[s];if(!l){l=i[s]=new Nte(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var f=c.keyframes,d=f[f.length-1];u=d&&d.value,c.valType===op&&u&&(u=V0(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,Cp(u),a),this._trackKeys.push(s)}l.addKeyframe(e,Cp(t[s]),a)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},r.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},r.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var a=0;a<n.length;a++){var i=n[a].getTrack(e);i&&(t=i)}return t},r.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],a=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(a,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(t._target[s.propName]=f.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var d=new ute({life:a,loop:this._loop,delay:this._delay||0,onframe:function(v){t._started=2;var g=t._additiveAnimators;if(g){for(var x=!1,y=0;y<g.length;y++)if(g[y]._clip){x=!0;break}x||(t._additiveAnimators=null)}for(var y=0;y<n.length;y++)n[y].step(t._target,v);var b=t._onframeCbs;if(b)for(var y=0;y<b.length;y++)b[y](t._target,v)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},r.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},r.prototype.delay=function(e){return this._delay=e,this},r.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},r.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},r.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(e){return this._tracks[e]},r.prototype.getTracks=function(){var e=this;return fe(this._trackKeys,function(t){return e._tracks[t]})},r.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,a=this._trackKeys,i=0;i<e.length;i++){var o=n[e[i]];o&&!o.isFinished()&&(t?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,i=0;i<a.length;i++)if(!n[a[i]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var a=0;a<t.length;a++){var i=t[a],o=this._tracks[i];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(e[i]=Cp(l.rawValue))}}}},r.prototype.__changeFinalValue=function(e,t){t=t||it(e);for(var n=0;n<t.length;n++){var a=t[n],i=this._tracks[a];if(i){var o=i.keyframes;if(o.length>1){var s=o.pop();i.addKeyframe(s.time,e[a]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r})();function Zf(){return new Date().getTime()}var Lte=(function(r){K(e,r);function e(t){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(t){if(t.animation){var n=t.prev,a=t.next;n?n.next=a:this._head=a,a?a.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},e.prototype.update=function(t){for(var n=Zf()-this._pausedTime,a=n-this._time,i=this._head;i;){var o=i.next,s=i.step(n,a);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=n,t||(this.trigger("frame",a),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function n(){t._running&&(mx(n),!t._paused&&t.update())}mx(n)},e.prototype.start=function(){this._running||(this._time=Zf(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Zf(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Zf()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,n){n=n||{},this.start();var a=new RM(t,n.loop);return this.addAnimator(a),a},e})(za),Rte=300,$S=nt.domSupported,KS=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=fe(r,function(a){var i=a.replace("mouse","pointer");return t.hasOwnProperty(i)?i:a});return{mouse:r,touch:e,pointer:n}})(),gO={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},mO=!1;function tC(r){var e=r.pointerType;return e==="pen"||e==="touch"}function Ete(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function QS(r){r&&(r.zrByTouch=!0)}function kte(r,e){return Sa(r.dom,new Ite(r,e),!0)}function o6(r,e){for(var t=e,n=!1;t&&t.nodeType!==9&&!(n=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return n}var Ite=(function(){function r(e,t){this.stopPropagation=Kt,this.stopImmediatePropagation=Kt,this.preventDefault=Kt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r})(),Wa={mousedown:function(r){r=Sa(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Sa(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Sa(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Sa(this.dom,r);var e=r.toElement||r.relatedTarget;o6(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){mO=!0,r=Sa(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){mO||(r=Sa(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Sa(this.dom,r),QS(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Wa.mousemove.call(this,r),Wa.mousedown.call(this,r)},touchmove:function(r){r=Sa(this.dom,r),QS(r),this.handler.processGesture(r,"change"),Wa.mousemove.call(this,r)},touchend:function(r){r=Sa(this.dom,r),QS(r),this.handler.processGesture(r,"end"),Wa.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<Rte&&Wa.click.call(this,r)},pointerdown:function(r){Wa.mousedown.call(this,r)},pointermove:function(r){tC(r)||Wa.mousemove.call(this,r)},pointerup:function(r){Wa.mouseup.call(this,r)},pointerout:function(r){tC(r)||Wa.mouseout.call(this,r)}};O(["click","dblclick","contextmenu"],function(r){Wa[r]=function(e){e=Sa(this.dom,e),this.trigger(r,e)}});var rC={pointermove:function(r){tC(r)||rC.mousemove.call(this,r)},pointerup:function(r){rC.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),e&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function Ote(r,e){var t=e.domHandlers;nt.pointerEventsSupported?O(KS.pointer,function(n){H0(e,n,function(a){t[n].call(r,a)})}):(nt.touchEventsSupported&&O(KS.touch,function(n){H0(e,n,function(a){t[n].call(r,a),Ete(e)})}),O(KS.mouse,function(n){H0(e,n,function(a){a=MM(a),e.touching||t[n].call(r,a)})}))}function Pte(r,e){nt.pointerEventsSupported?O(gO.pointer,t):nt.touchEventsSupported||O(gO.mouse,t);function t(n){function a(i){i=MM(i),o6(r,i.target)||(i=kte(r,i),e.domHandlers[n].call(r,i))}H0(e,n,a,{capture:!0})}}function H0(r,e,t,n){r.mounted[e]=t,r.listenerOpts[e]=n,Y2(r.domTarget,e,t,n)}function JS(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&Fee(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var yO=(function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r})(),zte=(function(r){K(e,r);function e(t,n){var a=r.call(this)||this;return a.__pointerCapturing=!1,a.dom=t,a.painterRoot=n,a._localHandlerScope=new yO(t,Wa),$S&&(a._globalHandlerScope=new yO(document,rC)),Ote(a,a._localHandlerScope),a}return e.prototype.dispose=function(){JS(this._localHandlerScope),$S&&JS(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,$S&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var n=this._globalHandlerScope;t?Pte(this,n):JS(n)}},e})(za),s6=1;nt.hasGlobalWindow&&(s6=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Tx=s6,nC=.4,aC="#333",iC="#ccc",jte="#eee",xO=Ig,bO=5e-5;function ru(r){return r>bO||r<-bO}var nu=[],yf=[],ew=Dr(),tw=Math.abs,zo=(function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return ru(this.rotation)||ru(this.x)||ru(this.y)||ru(this.scaleX-1)||ru(this.scaleY-1)||ru(this.skewX)||ru(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(xO(n),this.invTransform=null);return}n=n||Dr(),t?this.getLocalTransform(n):xO(n),e&&(t?Qa(n,e,n):Og(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(nu);var n=nu[0]<0?-1:1,a=nu[1]<0?-1:1,i=((nu[0]-n)*t+n)/nu[0]||0,o=((nu[1]-a)*t+a)/nu[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Dr(),Ia(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],a=Math.atan2(e[1],e[0]),i=Math.PI/2+a-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-a,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Dr(),Qa(yf,e.invTransform,t),t=yf);var n=this.originX,a=this.originY;(n||a)&&(ew[4]=n,ew[5]=a,Qa(yf,t,ew),yf[4]-=n,yf[5]-=a,t=yf),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var n=[e,t],a=this.invTransform;return a&&Qt(n,n,a),n},r.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],a=this.transform;return a&&Qt(n,n,a),n},r.prototype.getLineScale=function(){var e=this.transform;return e&&tw(e[0]-1)>1e-10&&tw(e[3]-1)>1e-10?Math.sqrt(tw(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){Cx(this,e)},r.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,a=e.originY||0,i=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,d=e.skewX?Math.tan(e.skewX):0,v=e.skewY?Math.tan(-e.skewY):0;if(n||a||s||l){var g=n+s,x=a+l;t[4]=-g*i-d*x*o,t[5]=-x*o-v*g*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=v*i,t[2]=d*o,u&&ns(t,t,u),t[4]+=n+c,t[5]+=a+f,t},r.initDefaultProps=(function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0})(),r})(),Wi=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Cx(r,e){for(var t=0;t<Wi.length;t++){var n=Wi[t];r[n]=e[n]}}function Fi(r){Ay||(Ay=new Ah(100)),r=r||qo;var e=Ay.get(r);return e||(e={font:r,strWidthCache:new Ah(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:jn.measureText("国",r).width,asciiCharWidth:jn.measureText("a",r).width},Ay.put(r,e)),e}var Ay;function Bte(r){if(!(rw>=_O)){r=r||qo;for(var e=[],t=+new Date,n=0;n<=127;n++)e[n]=jn.measureText(String.fromCharCode(n),r).width;var a=+new Date-t;return a>16?rw=_O:a>2&&rw++,e}}var rw=0,_O=5;function l6(r,e){return r.asciiWidthMapTried||(r.asciiWidthMap=Bte(r.font),r.asciiWidthMapTried=!0),0<=e&&e<=127?r.asciiWidthMap!=null?r.asciiWidthMap[e]:r.asciiCharWidth:r.stWideCharWidth}function Ui(r,e){var t=r.strWidthCache,n=t.get(e);return n==null&&(n=jn.measureText(e,r.font).width,t.put(e,n)),n}function SO(r,e,t,n){var a=Ui(Fi(e),r),i=Pg(e),o=Mh(0,a,t),s=Qu(0,i,n),l=new Ie(o,s,a,i);return l}function V1(r,e,t,n){var a=((r||"")+"").split(`
246
- `),i=a.length;if(i===1)return SO(a[0],e,t,n);for(var o=new Ie(0,0,0,0),s=0;s<a.length;s++){var l=SO(a[s],e,t,n);s===0?o.copy(l):o.union(l)}return o}function Mh(r,e,t,n){return t==="right"?n?r+=e:r-=e:t==="center"&&(n?r+=e/2:r-=e/2),r}function Qu(r,e,t,n){return t==="middle"?n?r+=e/2:r-=e/2:t==="bottom"&&(n?r+=e:r-=e),r}function Pg(r){return Fi(r).stWideCharWidth}function ii(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function Ax(r,e,t){var n=e.position||"inside",a=e.distance!=null?e.distance:5,i=t.height,o=t.width,s=i/2,l=t.x,u=t.y,c="left",f="top";if(n instanceof Array)l+=ii(n[0],t.width),u+=ii(n[1],t.height),c=null,f=null;else switch(n){case"left":l-=a,u+=s,c="right",f="middle";break;case"right":l+=a+o,u+=s,f="middle";break;case"top":l+=o/2,u-=a,c="center",f="bottom";break;case"bottom":l+=o/2,u+=i+a,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=a,u+=s,f="middle";break;case"insideRight":l+=o-a,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=a,c="center";break;case"insideBottom":l+=o/2,u+=i-a,c="center",f="bottom";break;case"insideTopLeft":l+=a,u+=a;break;case"insideTopRight":l+=o-a,u+=a,c="right";break;case"insideBottomLeft":l+=a,u+=i-a,f="bottom";break;case"insideBottomRight":l+=o-a,u+=i-a,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var nw="__zr_normal__",aw=Wi.concat(["ignore"]),Vte=ka(Wi,function(r,e){return r[e]=!0,r},{ignore:!1}),xf={},Gte=new Ie(0,0,0,0),My=[],G1=(function(){function r(e){this.id=wM(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=e,a[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,a=n.local,i=t.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=a?this:null;var u=!1;i.copyTransform(t);var c=n.position!=null,f=n.autoOverflowArea,d=void 0;if((f||c)&&(d=Gte,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),a||d.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(xf,n,d):Ax(xf,n,d),i.x=xf.x,i.y=xf.y,o=xf.align,s=xf.verticalAlign;var v=n.origin;if(v&&n.rotation!=null){var g=void 0,x=void 0;v==="center"?(g=d.width*.5,x=d.height*.5):(g=ii(v[0],d.width),x=ii(v[1],d.height)),u=!0,i.originX=-i.x+g+(a?0:d.x),i.originY=-i.y+x+(a?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var y=n.offset;y&&(i.x+=y[0],i.y+=y[1],u||(i.originX=-y[0],i.originY=-y[1]));var b=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var w=b.overflowRect=b.overflowRect||new Ie(0,0,0,0);i.getLocalTransform(My),Ia(My,My),Ie.copy(w,d),w.applyTransform(My)}else b.overflowRect=null;var T=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,C=void 0,D=void 0,M=void 0;T&&this.canBeInsideText()?(C=n.insideFill,D=n.insideStroke,(C==null||C==="auto")&&(C=this.getInsideTextFill()),(D==null||D==="auto")&&(D=this.getInsideTextStroke(C),M=!0)):(C=n.outsideFill,D=n.outsideStroke,(C==null||C==="auto")&&(C=this.getOutsideFill()),(D==null||D==="auto")&&(D=this.getOutsideStroke(C),M=!0)),C=C||"#000",(C!==b.fill||D!==b.stroke||M!==b.autoStroke||o!==b.align||s!==b.verticalAlign)&&(l=!0,b.fill=C,b.stroke=D,b.autoStroke=M,b.align=o,b.verticalAlign=s,t.setDefaultTextStyle(b)),t.__dirty|=Jn,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?iC:aC},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t=="string"&&dn(t);n||(n=[255,255,255,1]);for(var a=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*a+(i?0:255)*(1-a);return n[3]=1,Ra(n,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},ie(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(Re(e))for(var n=e,a=it(n),i=0;i<a.length;i++){var o=a[i];this.attrKV(o,e[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var a=this.animators[n],i=a.__fromStateTransition;if(!(a.getLoop()||i&&i!==nw)){var o=a.targetName,s=o?t[o]:t;a.saveTo(s)}}},r.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,aw)},r.prototype._savePrimaryToNormal=function(e,t,n){for(var a=0;a<n.length;a++){var i=n[a];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(nw,!1,e)},r.prototype.useState=function(e,t,n,a){var i=e===nw,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(Fe(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!i){I1("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||a);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,d=this._textGuide;return f&&f.useState(e,t,n,c),d&&d.useState(e,t,n,c),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Jn),u}}},r.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var a=[],i=this.currentStates,o=e.length,s=o===i.length;if(s){for(var l=0;l<o;l++)if(e[l]!==i[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&&a.push(c)}var f=a[o-1],d=!!(f&&f.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var v=this._mergeStates(a),g=this.stateTransition;this.saveCurrentToNormalState(v),this._applyStateObj(e.join(","),v,this._normalState,!1,!t&&!this.__inHover&&g&&g.duration>0,g);var x=this._textContent,y=this._textGuide;x&&x.useStates(e,t,d),y&&y.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Jn)}},r.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},r.prototype.removeState=function(e){var t=Fe(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},r.prototype.replaceState=function(e,t,n){var a=this.currentStates.slice(),i=Fe(a,e),o=Fe(a,t)>=0;i>=0?o?a.splice(i,1):a[i]=t:n&&!o&&a.push(t),this.useStates(a)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},n,a=0;a<e.length;a++){var i=e[a];ie(t,i),i.textConfig&&(n=n||{},ie(n,i.textConfig))}return n&&(t.textConfig=n),t},r.prototype._applyStateObj=function(e,t,n,a,i,o){var s=!(t&&a);t&&t.textConfig?(this.textConfig=ie({},a?this.textConfig:n.textConfig),ie(this.textConfig,t.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,c=0;c<aw.length;c++){var f=aw[c],d=i&&Vte[f];t&&t[f]!=null?d?(u=!0,l[f]=t[f]):this[f]=t[f]:s&&n[f]!=null&&(d?(u=!0,l[f]=n[f]):this[f]=n[f])}if(!i)for(var c=0;c<this.animators.length;c++){var v=this.animators[c],g=v.targetName;v.getLoop()||v.__changeFinalValue(g?(t||n)[g]:t||n)}u&&this._transitionState(e,l,o)},r.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},r.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},r.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new zo,this._attachComponent(e),this._textContent=e,this.markRedraw())},r.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),ie(this.textConfig,e),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=Jn;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},r.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},r.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},r.prototype.animate=function(e,t,n){var a=e?this[e]:this,i=new RM(a,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},r.prototype.addAnimator=function(e,t){var n=this.__zr,a=this;e.during(function(){a.updateDuringAnimation(t)}).done(function(){var i=a.animators,o=Fe(i,e);o>=0&&i.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var n=this.animators,a=n.length,i=[],o=0;o<a;o++){var s=n[o];!e||e===s.scope?s.stop(t):i.push(s)}return this.animators=i,this},r.prototype.animateTo=function(e,t,n){iw(this,e,t,n)},r.prototype.animateFrom=function(e,t,n){iw(this,e,t,n,!0)},r.prototype._transitionState=function(e,t,n,a){for(var i=iw(this,t,n,a),o=0;o<i.length;o++)i[o].__fromStateTransition=e},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=(function(){var e=r.prototype;e.type="element",e.name="",e.ignore=e.silent=e.ignoreHostSilent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=Jn;function t(n,a,i,o){Object.defineProperty(e,n,{get:function(){if(!this[a]){var l=this[a]=[];s(this,l)}return this[a]},set:function(l){this[i]=l[0],this[o]=l[1],this[a]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[i]},set:function(c){l[i]=c}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(c){l[o]=c}})}}Object.defineProperty&&(t("position","_legacyPos","x","y"),t("scale","_legacyScale","scaleX","scaleY"),t("origin","_legacyOrigin","originX","originY"))})(),r})();Jt(G1,za);Jt(G1,zo);function iw(r,e,t,n,a){t=t||{};var i=[];u6(r,"",r,e,t,n,i,a);var o=i.length,s=!1,l=t.done,u=t.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},f=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),i.length>0&&t.during&&i[0].during(function(g,x){t.during(x)});for(var d=0;d<i.length;d++){var v=i[d];c&&v.done(c),f&&v.aborted(f),t.force&&v.duration(t.duration),v.start(t.easing)}return i}function ow(r,e,t){for(var n=0;n<t;n++)r[n]=e[n]}function Hte(r){return en(r[0])}function Fte(r,e,t){if(en(e[t]))if(en(r[t])||(r[t]=[]),wn(e[t])){var n=e[t].length;r[t].length!==n&&(r[t]=new e[t].constructor(n),ow(r[t],e[t],n))}else{var a=e[t],i=r[t],o=a.length;if(Hte(a))for(var s=a[0].length,l=0;l<o;l++)i[l]?ow(i[l],a[l],s):i[l]=Array.prototype.slice.call(a[l]);else ow(i,a,o);i.length=a.length}else r[t]=e[t]}function Ute(r,e){return r===e||en(r)&&en(e)&&Yte(r,e)}function Yte(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++)if(r[n]!==e[n])return!1;return!0}function u6(r,e,t,n,a,i,o,s){for(var l=it(n),u=a.duration,c=a.delay,f=a.additive,d=a.setToFinal,v=!Re(i),g=r.animators,x=[],y=0;y<l.length;y++){var b=l[y],w=n[b];if(w!=null&&t[b]!=null&&(v||i[b]))if(Re(w)&&!en(w)&&!Rg(w)){if(e){s||(t[b]=w,r.updateDuringAnimation(e));continue}u6(r,b,t[b],w,a,i&&i[b],o,s)}else x.push(b);else s||(t[b]=w,r.updateDuringAnimation(e),x.push(b))}var T=x.length;if(!f&&T)for(var C=0;C<g.length;C++){var D=g[C];if(D.targetName===e){var M=D.stopTracks(x);if(M){var N=Fe(g,D);g.splice(N,1)}}}if(a.force||(x=dt(x,function(I){return!Ute(n[I],t[I])}),T=x.length),T>0||a.force&&!o.length){var R=void 0,E=void 0,k=void 0;if(s){E={},d&&(R={});for(var C=0;C<T;C++){var b=x[C];E[b]=t[b],d?R[b]=n[b]:t[b]=n[b]}}else if(d){k={};for(var C=0;C<T;C++){var b=x[C];k[b]=Cp(t[b]),Fte(t,n,b)}}var D=new RM(t,!1,!1,f?dt(g,function(z){return z.targetName===e}):null);D.targetName=e,a.scope&&(D.scope=a.scope),d&&R&&D.whenWithKeys(0,R,x),k&&D.whenWithKeys(0,k,x),D.whenWithKeys(u??500,s?E:n,x).delay(c||0),r.addAnimator(D,e),o.push(D)}}var De=(function(r){K(e,r);function e(t){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var n=this._children,a=0;a<n.length;a++)if(n[a].name===t)return n[a]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,n){if(t&&t!==this&&t.parent!==this&&n&&n.parent===this){var a=this._children,i=a.indexOf(n);i>=0&&(a.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,n){var a=Fe(this._children,t);return a>=0&&this.replaceAt(n,a),this},e.prototype.replaceAt=function(t,n){var a=this._children,i=a[n];if(t&&t!==this&&t.parent!==this&&t!==i){a[n]=t,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(t){var n=this.__zr,a=this._children,i=Fe(a,t);return i<0?this:(a.splice(i,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,a=0;a<t.length;a++){var i=t[a];n&&i.removeSelfFromZr(n),i.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,n){for(var a=this._children,i=0;i<a.length;i++){var o=a[i];t.call(n,o,i)}return this},e.prototype.traverse=function(t,n){for(var a=0;a<this._children.length;a++){var i=this._children[a],o=t.call(n,i);i.isGroup&&!o&&i.traverse(t,n)}return this},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){var a=this._children[n];a.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){var a=this._children[n];a.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var n=new Ie(0,0,0,0),a=t||this._children,i=[],o=null,s=0;s<a.length;s++){var l=a[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(i);c?(Ie.applyTransform(n,u,c),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},e})(G1);De.prototype.type="group";/*!
247
- * ZRender, a high performance 2d drawing library.
248
- *
249
- * Copyright (c) 2013, Baidu Inc.
250
- * All rights reserved.
251
- *
252
- * LICENSE
253
- * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
254
- */var F0={},zu={};function Wte(r){delete zu[r]}function Xte(r){if(!r)return!1;if(typeof r=="string")return Xp(r,1)<nC;if(r.colorStops){for(var e=r.colorStops,t=0,n=e.length,a=0;a<n;a++)t+=Xp(e[a].color,1);return t/=n,t<nC}return!1}var qte=(function(){function r(e,t,n){var a=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var i=new ate,o=n.renderer||"canvas";F0[o]||(o=it(F0)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new F0[o](t,i,n,e),l=n.ssr||s.ssrOnly;this.storage=i,this.painter=s;var u=!nt.node&&!nt.worker&&!l?new zte(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,f=c==null||c==="auto"?nt.touchEventsSupported:!!c,d=44,v;f&&(v=Ce(n.pointerSize,d)),this.handler=new HG(i,s,u,s.root,v),this.animation=new Lte({stage:{update:l?null:function(){return a._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},r.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},r.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=Xte(e))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(e){this._darkMode=e},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(e){var t,n=Zf();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var a=Zf();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof De&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,Wte(this.id))},r})();function oC(r,e){var t=new qte(wM(),r,e);return zu[t.id]=t,t}function Zte(r){r.dispose()}function $te(){for(var r in zu)zu.hasOwnProperty(r)&&zu[r].dispose();zu={}}function Kte(r){return zu[r]}function c6(r,e){F0[r]=e}var sC;function f6(r){if(typeof sC=="function")return sC(r)}function h6(r){sC=r}var Qte="6.0.0";const Jte=Object.freeze(Object.defineProperty({__proto__:null,dispose:Zte,disposeAll:$te,getElementSSRData:f6,getInstance:Kte,init:oC,registerPainter:c6,registerSSRDataGetter:h6,version:Qte},Symbol.toStringTag,{value:"Module"}));var wO=1e-4,d6=20;function ere(r){return r.replace(/^\s+|\s+$/g,"")}var oa=Math.min,or=Math.max,Oi=Math.abs;function pt(r,e,t,n){var a=e[0],i=e[1],o=t[0],s=t[1],l=i-a,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=a)return o;if(r>=i)return s}else{if(r>=a)return o;if(r<=i)return s}else{if(r===a)return o;if(r===i)return s}return(r-a)/l*u+o}var me=tre;function tre(r,e,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Mx(r,e,t)}function Mx(r,e,t){return ye(r)?ere(r).match(/%$/)?parseFloat(r)/100*e+(t||0):parseFloat(r):r==null?NaN:+r}function sr(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),d6),r=(+r).toFixed(e),t?r:+r}function ra(r){return r.sort(function(e,t){return e-t}),r}function $a(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return v6(r)}function v6(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),n=t>0?+e.slice(t+1):0,a=t>0?t:e.length,i=e.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function EM(r,e){var t=Math.log,n=Math.LN10,a=Math.floor(t(r[1]-r[0])/n),i=Math.round(t(Oi(e[1]-e[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function rre(r,e,t){if(!r[e])return 0;var n=p6(r,t);return n[e]||0}function p6(r,e){var t=ka(r,function(v,g){return v+(isNaN(g)?0:g)},0);if(t===0)return[];for(var n=Math.pow(10,e),a=fe(r,function(v){return(isNaN(v)?0:v)/t*n*100}),i=n*100,o=fe(a,function(v){return Math.floor(v)}),s=ka(o,function(v,g){return v+g},0),l=fe(a,function(v,g){return v-o[g]});s<i;){for(var u=Number.NEGATIVE_INFINITY,c=null,f=0,d=l.length;f<d;++f)l[f]>u&&(u=l[f],c=f);++o[c],l[c]=0,++s}return fe(o,function(v){return v/n})}function nre(r,e){var t=Math.max($a(r),$a(e)),n=r+e;return t>d6?n:sr(n,t)}var lC=9007199254740991;function kM(r){var e=Math.PI*2;return(r%e+e)%e}function Dh(r){return r>-wO&&r<wO}var are=/^(?:(\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 Ji(r){if(r instanceof Date)return r;if(ye(r)){var e=are.exec(r);if(!e)return new Date(NaN);if(e[8]){var t=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function g6(r){return Math.pow(10,H1(r))}function H1(r){if(r===0)return 0;var e=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,e)>=10&&e++,e}function IM(r,e){var t=H1(r),n=Math.pow(10,t),a=r/n,i;return e?a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10:a<1?i=1:a<2?i=2:a<3?i=3:a<5?i=5:i=10,r=i*n,t>=-20?+r.toFixed(t<0?-t:0):r}function U0(r,e){var t=(r.length-1)*e+1,n=Math.floor(t),a=+r[n-1],i=t-n;return i?a+i*(r[n]-a):a}function uC(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,n=0;n<r.length;){for(var a=r[n].interval,i=r[n].close,o=0;o<2;o++)a[o]<=e&&(a[o]=e,i[o]=o?1:1-t),e=a[o],t=i[o];a[0]===a[1]&&i[0]*i[1]!==1?r.splice(n,1):n++}return r;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 Xi(r){var e=parseFloat(r);return e==r&&(e!==0||!ye(r)||r.indexOf("x")<=0)?e:NaN}function OM(r){return!isNaN(Xi(r))}function m6(){return Math.round(Math.random()*9)}function y6(r,e){return e===0?r:y6(e,r%e)}function TO(r,e){return r==null?e:e==null?r:r*e/y6(r,e)}var ire="[ECharts] ",ore=typeof console<"u"&&console.warn&&console.log;function sre(r,e,t){ore&&console[r](ire+e)}function x6(r,e){sre("error",r)}function gt(r){throw new Error(r)}function CO(r,e,t){return(e-r)*t+r}var b6="series\0",_6="\0_ec_\0";function Lt(r){return r instanceof Array?r:r==null?[]:[r]}function lc(r,e,t){if(r){r[e]=r[e]||{},r.emphasis=r.emphasis||{},r.emphasis[e]=r.emphasis[e]||{};for(var n=0,a=t.length;n<a;n++){var i=t[n];!r.emphasis[e].hasOwnProperty(i)&&r[e].hasOwnProperty(i)&&(r.emphasis[e][i]=r[e][i])}}}var AO=["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 Wh(r){return Re(r)&&!ce(r)&&!(r instanceof Date)?r.value:r}function lre(r){return Re(r)&&!(r instanceof Array)}function S6(r,e,t){var n=t==="normalMerge",a=t==="replaceMerge",i=t==="replaceAll";r=r||[],e=(e||[]).slice();var o=Te();O(e,function(l,u){if(!Re(l)){e[u]=null;return}});var s=ure(r,o,t);return(n||a)&&cre(s,r,o,e),n&&fre(s,e),n||a?hre(s,e,a):i&&dre(s,e),vre(s),s}function ure(r,e,t){var n=[];if(t==="replaceAll")return n;for(var a=0;a<r.length;a++){var i=r[a];i&&i.id!=null&&e.set(i.id,a),n.push({existing:t==="replaceMerge"||Zp(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return n}function cre(r,e,t,n){O(n,function(a,i){if(!(!a||a.id==null)){var o=Ap(a.id),s=t.get(o);if(s!=null){var l=r[s];tn(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=a,l.existing=e[s],n[i]=null}}})}function fre(r,e){O(e,function(t,n){if(!(!t||t.name==null))for(var a=0;a<r.length;a++){var i=r[a].existing;if(!r[a].newOption&&i&&(i.id==null||t.id==null)&&!Zp(t)&&!Zp(i)&&w6("name",i,t)){r[a].newOption=t,e[n]=null;return}}})}function hre(r,e,t){O(e,function(n){if(n){for(var a,i=0;(a=r[i])&&(a.newOption||Zp(a.existing)||a.existing&&n.id!=null&&!w6("id",n,a.existing));)i++;a?(a.newOption=n,a.brandNew=t):r.push({newOption:n,brandNew:t,existing:null,keyInfo:null}),i++}})}function dre(r,e){O(e,function(t){r.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function vre(r){var e=Te();O(r,function(t){var n=t.existing;n&&e.set(n.id,t)}),O(r,function(t){var n=t.newOption;tn(!n||n.id==null||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),O(r,function(t,n){var a=t.existing,i=t.newOption,o=t.keyInfo;if(Re(i)){if(o.name=i.name!=null?Ap(i.name):a?a.name:b6+n,a)o.id=Ap(a.id);else if(i.id!=null)o.id=Ap(i.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,t)}})}function w6(r,e,t){var n=xr(e[r],null),a=xr(t[r],null);return n!=null&&a!=null&&n===a}function Ap(r){return xr(r,"")}function xr(r,e){return r==null?e:ye(r)?r:st(r)||dx(r)?r+"":e}function PM(r){var e=r.name;return!!(e&&e.indexOf(b6))}function Zp(r){return r&&r.id!=null&&Ap(r.id).indexOf(_6)===0}function pre(r){return _6+r}function gre(r,e,t){O(r,function(n){var a=n.newOption;Re(a)&&(n.keyInfo.mainType=e,n.keyInfo.subType=mre(e,a,n.existing,t))})}function mre(r,e,t,n){var a=e.type?e.type:t?t.subType:n.determineSubType(r,e);return a}function yre(r,e){var t={},n={};return a(r||[],t),a(e||[],n,t),[i(t),i(n)];function a(o,s,l){for(var u=0,c=o.length;u<c;u++){var f=xr(o[u].seriesId,null);if(f==null)return;for(var d=Lt(o[u].dataIndex),v=l&&l[f],g=0,x=d.length;g<x;g++){var y=d[g];v&&v[y]?v[y]=null:(s[f]||(s[f]={}))[y]=1}}}function i(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var c=i(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function uc(r,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return ce(e.dataIndex)?fe(e.dataIndex,function(t){return r.indexOfRawIndex(t)}):r.indexOfRawIndex(e.dataIndex);if(e.name!=null)return ce(e.name)?fe(e.name,function(t){return r.indexOfName(t)}):r.indexOfName(e.name)}function Je(){var r="__ec_inner_"+xre++;return function(e){return e[r]||(e[r]={})}}var xre=m6();function oh(r,e,t){var n=zM(e,t),a=n.mainTypeSpecified,i=n.queryOptionMap,o=n.others,s=o,l=t?t.defaultMainType:null;return!a&&l&&i.set(l,{}),i.each(function(u,c){var f=Xh(r,c,u,{useDefault:l===c,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});s[c+"Models"]=f.models,s[c+"Model"]=f.models[0]}),s}function zM(r,e){var t;if(ye(r)){var n={};n[r+"Index"]=0,t=n}else t=r;var a=Te(),i={},o=!1;return O(t,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){i[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],f=(u[2]||"").toLowerCase();if(!(!c||!f||e&&e.includeMainTypes&&Fe(e.includeMainTypes,c)<0)){o=o||!!c;var d=a.get(c)||a.set(c,{});d[f]=s}}),{mainTypeSpecified:o,queryOptionMap:a,others:i}}var Zt={useDefault:!0,enableAll:!1,enableNone:!1},bre={useDefault:!1,enableAll:!0,enableNone:!0};function Xh(r,e,t,n){n=n||Zt;var a=t.index,i=t.id,o=t.name,s={models:null,specified:a!=null||i!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=r.getComponent(e))?[l]:[],s}if(a==="none"||a===!1){if(n.enableNone)return s.models=[],s;a=-1}return a==="all"&&(n.enableAll?a=i=o=null:a=-1),s.models=r.queryComponents({mainType:e,index:a,id:i,name:o}),s}function T6(r,e,t){r.setAttribute?r.setAttribute(e,t):r[e]=t}function _re(r,e){return r.getAttribute?r.getAttribute(e):r[e]}function Sre(r){return r==="auto"?nt.domSupported?"html":"richText":r||"html"}function cC(r,e){var t=Te(),n=[];return O(r,function(a){var i=e(a);(t.get(i)||(n.push(i),t.set(i,[]))).push(a)}),{keys:n,buckets:t}}function C6(r,e,t,n,a){var i=e==null||e==="auto";if(n==null)return n;if(st(n)){var o=CO(t||0,n,a);return sr(o,i?Math.max($a(t||0),$a(n)):e)}else{if(ye(n))return a<1?t:n;for(var s=[],l=t,u=n,c=Math.max(l?l.length:0,u.length),f=0;f<c;++f){var d=r.getDimensionInfo(f);if(d&&d.type==="ordinal")s[f]=(a<1&&l?l:u)[f];else{var v=l&&l[f]?l[f]:0,g=u[f],o=CO(v,g,a);s[f]=sr(o,i?Math.max($a(v),$a(g)):e)}}return s}}var fl=(function(){function r(){}return r.prototype.reset=function(e,t,n,a){return this._list=e,this._step=a=a||1,this._idx=t,this._end=n??(a>0?e.length:0),this.item=null,this.key=NaN,this},r.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},r})();function sw(r){r.option=r.parentModel=r.ecModel=null}var wre=".",au="___EC__COMPONENT__CONTAINER___",A6="___EC__EXTENDED_CLASS___";function Pi(r){var e={main:"",sub:""};if(r){var t=r.split(wre);e.main=t[0]||"",e.sub=t[1]||""}return e}function Tre(r){tn(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function Cre(r){return!!(r&&r[A6])}function jM(r,e){r.$constructor=r,r.extend=function(t){var n=this,a;return Are(n)?a=(function(i){K(o,i);function o(){return i.apply(this,arguments)||this}return o})(n):(a=function(){(t.$constructor||n).apply(this,arguments)},TM(a,this)),ie(a.prototype,t),a[A6]=!0,a.extend=this.extend,a.superCall=Nre,a.superApply=Lre,a.superClass=n,a}}function Are(r){return Ae(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function M6(r,e){r.extend=e.extend}var Mre=Math.round(Math.random()*10);function Dre(r){var e=["__\0is_clz",Mre++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function Nre(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return this.superClass.prototype[e].apply(r,t)}function Lre(r,e,t){return this.superClass.prototype[e].apply(r,t)}function F1(r){var e={};r.registerClass=function(n){var a=n.type||n.prototype.type;if(a){Tre(a),n.prototype.type=a;var i=Pi(a);if(!i.sub)e[i.main]=n;else if(i.sub!==au){var o=t(i);o[i.sub]=n}}return n},r.getClass=function(n,a,i){var o=e[n];if(o&&o[au]&&(o=a?o[a]:null),i&&!o)throw new Error(a?"Component "+n+"."+(a||"")+" is used but not imported.":n+".type should be specified.");return o},r.getClassesByMainType=function(n){var a=Pi(n),i=[],o=e[a.main];return o&&o[au]?O(o,function(s,l){l!==au&&i.push(s)}):i.push(o),i},r.hasClass=function(n){var a=Pi(n);return!!e[a.main]},r.getAllClassMainTypes=function(){var n=[];return O(e,function(a,i){n.push(i)}),n},r.hasSubTypes=function(n){var a=Pi(n),i=e[a.main];return i&&i[au]};function t(n){var a=e[n.main];return(!a||!a[au])&&(a=e[n.main]={},a[au]=!0),a}}function cc(r,e){for(var t=0;t<r.length;t++)r[t][1]||(r[t][1]=r[t][0]);return e=e||!1,function(n,a,i){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(a&&Fe(a,l)>=0||i&&Fe(i,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var Rre=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Ere=cc(Rre),kre=(function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return Ere(this,e,t)},r})(),fC=new Ah(50);function Ire(r){if(typeof r=="string"){var e=fC.get(r);return e&&e.image}else return r}function BM(r,e,t,n,a){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var i=fC.get(r),o={hostEl:t,cb:n,cbPayload:a};return i?(e=i.image,!U1(e)&&i.pending.push(o)):(e=jn.loadImage(r,MO,MO),e.__zrImageSrc=r,fC.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function MO(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<r.pending.length;e++){var t=r.pending[e],n=t.cb;n&&n(this,t.cbPayload),t.hostEl.dirty()}r.pending.length=0}function U1(r){return r&&r.width&&r.height}var lw=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Ore(r,e,t,n,a){var i={};return D6(i,r,e,t,n,a),i.text}function D6(r,e,t,n,a,i){if(!t){r.text="",r.isTruncated=!1;return}var o=(e+"").split(`
255
- `);i=N6(t,n,a,i);for(var s=!1,l={},u=0,c=o.length;u<c;u++)L6(l,o[u],i),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
256
- `),r.isTruncated=s}function N6(r,e,t,n){n=n||{};var a=ie({},n);t=Ce(t,"..."),a.maxIterations=Ce(n.maxIterations,2);var i=a.minChar=Ce(n.minChar,0),o=a.fontMeasureInfo=Fi(e),s=o.asciiCharWidth;a.placeholder=Ce(n.placeholder,"");for(var l=r=Math.max(0,r-1),u=0;u<i&&l>=s;u++)l-=s;var c=Ui(o,t);return c>l&&(t="",c=0),l=r-c,a.ellipsis=t,a.ellipsisWidth=c,a.contentWidth=l,a.containerWidth=r,a}function L6(r,e,t){var n=t.containerWidth,a=t.contentWidth,i=t.fontMeasureInfo;if(!n){r.textLine="",r.isTruncated=!1;return}var o=Ui(i,e);if(o<=n){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?Pre(e,a,i):o>0?Math.floor(e.length*a/o):0;e=e.substr(0,l),o=Ui(i,e)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function Pre(r,e,t){for(var n=0,a=0,i=r.length;a<i&&n<e;a++)n+=l6(t,r.charCodeAt(a));return a}function zre(r,e,t,n){var a=VM(r),i=e.overflow,o=e.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=e.font,c=i==="truncate",f=Pg(u),d=Ce(e.lineHeight,f),v=e.lineOverflow==="truncate",g=!1,x=e.width;x==null&&t!=null&&(x=t-s);var y=e.height;y==null&&n!=null&&(y=n-l);var b;x!=null&&(i==="break"||i==="breakAll")?b=a?R6(a,e.font,x,i==="breakAll",0).lines:[]:b=a?a.split(`
257
- `):[];var w=b.length*d;if(y==null&&(y=w),w>y&&v){var T=Math.floor(y/d);g=g||b.length>T,b=b.slice(0,T),w=b.length*d}if(a&&c&&x!=null)for(var C=N6(x,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),D={},M=0;M<b.length;M++)L6(D,b[M],C),b[M]=D.textLine,g=g||D.isTruncated;for(var N=y,R=0,E=Fi(u),M=0;M<b.length;M++)R=Math.max(Ui(E,b[M]),R);x==null&&(x=R);var k=x;return N+=l,k+=s,{lines:b,height:y,outerWidth:k,outerHeight:N,lineHeight:d,calculatedLineHeight:f,contentWidth:R,contentHeight:w,width:x,isTruncated:g}}var jre=(function(){function r(){}return r})(),DO=(function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r})(),Bre=(function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r})();function Vre(r,e,t,n,a){var i=new Bre,o=VM(r);if(!o)return i;var s=e.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,c=e.width;c==null&&t!=null&&(c=t-l);var f=e.height;f==null&&n!=null&&(f=n-u);for(var d=e.overflow,v=(d==="break"||d==="breakAll")&&c!=null?{width:c,accumWidth:0,breakAll:d==="breakAll"}:null,g=lw.lastIndex=0,x;(x=lw.exec(o))!=null;){var y=x.index;y>g&&uw(i,o.substring(g,y),e,v),uw(i,x[2],e,v,x[1]),g=lw.lastIndex}g<o.length&&uw(i,o.substring(g,o.length),e,v);var b=[],w=0,T=0,C=d==="truncate",D=e.lineOverflow==="truncate",M={};function N(Se,Xe,be){Se.width=Xe,Se.lineHeight=be,w+=be,T=Math.max(T,Xe)}e:for(var R=0;R<i.lines.length;R++){for(var E=i.lines[R],k=0,I=0,z=0;z<E.tokens.length;z++){var P=E.tokens[z],G=P.styleName&&e.rich[P.styleName]||{},U=P.textPadding=G.padding,B=U?U[1]+U[3]:0,F=P.font=G.font||e.font;P.contentHeight=Pg(F);var H=Ce(G.height,P.contentHeight);if(P.innerHeight=H,U&&(H+=U[0]+U[2]),P.height=H,P.lineHeight=zn(G.lineHeight,e.lineHeight,H),P.align=G&&G.align||a,P.verticalAlign=G&&G.verticalAlign||"middle",D&&f!=null&&w+P.lineHeight>f){var X=i.lines.length;z>0?(E.tokens=E.tokens.slice(0,z),N(E,I,k),i.lines=i.lines.slice(0,R+1)):i.lines=i.lines.slice(0,R),i.isTruncated=i.isTruncated||i.lines.length<X;break e}var V=G.width,W=V==null||V==="auto";if(typeof V=="string"&&V.charAt(V.length-1)==="%")P.percentWidth=V,b.push(P),P.contentWidth=Ui(Fi(F),P.text);else{if(W){var $=G.backgroundColor,te=$&&$.image;te&&(te=Ire(te),U1(te)&&(P.width=Math.max(P.width,te.width*H/te.height)))}var ue=C&&c!=null?c-I:null;ue!=null&&ue<P.width?!W||ue<B?(P.text="",P.width=P.contentWidth=0):(D6(M,P.text,ue-B,F,e.ellipsis,{minChar:e.truncateMinChar}),P.text=M.text,i.isTruncated=i.isTruncated||M.isTruncated,P.width=P.contentWidth=Ui(Fi(F),P.text)):P.contentWidth=Ui(Fi(F),P.text)}P.width+=B,I+=P.width,G&&(k=Math.max(k,P.lineHeight))}N(E,I,k)}i.outerWidth=i.width=Ce(c,T),i.outerHeight=i.height=Ce(f,w),i.contentHeight=w,i.contentWidth=T,i.outerWidth+=l,i.outerHeight+=u;for(var R=0;R<b.length;R++){var P=b[R],ge=P.percentWidth;P.width=parseInt(ge,10)/100*i.width}return i}function uw(r,e,t,n,a){var i=e==="",o=a&&t.rich[a]||{},s=r.lines,l=o.font||t.font,u=!1,c,f;if(n){var d=o.padding,v=d?d[1]+d[3]:0;if(o.width!=null&&o.width!=="auto"){var g=ii(o.width,n.width)+v;s.length>0&&g+n.accumWidth>n.width&&(c=e.split(`
258
- `),u=!0),n.accumWidth=g}else{var x=R6(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=x.accumWidth+v,f=x.linesWidths,c=x.lines}}c||(c=e.split(`
259
- `));for(var y=Fi(l),b=0;b<c.length;b++){var w=c[b],T=new jre;if(T.styleName=a,T.text=w,T.isLineHolder=!w&&!i,typeof o.width=="number"?T.width=o.width:T.width=f?f[b]:Ui(y,w),!b&&!u){var C=(s[s.length-1]||(s[0]=new DO)).tokens,D=C.length;D===1&&C[0].isLineHolder?C[0]=T:(w||!D||i)&&C.push(T)}else s.push(new DO([T]))}}function Gre(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var Hre=ka(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function Fre(r){return Gre(r)?!!Hre[r]:!0}function R6(r,e,t,n,a){for(var i=[],o=[],s="",l="",u=0,c=0,f=Fi(e),d=0;d<r.length;d++){var v=r.charAt(d);if(v===`
260
- `){l&&(s+=l,c+=u),i.push(s),o.push(c),s="",l="",u=0,c=0;continue}var g=l6(f,v.charCodeAt(0)),x=n?!1:!Fre(v);if(i.length?c+g>t:a+c+g>t){c?(s||l)&&(x?(s||(s=l,l="",u=0,c=u),i.push(s),o.push(c-u),l+=v,u+=g,s="",c=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(c),s=v,c=g)):x?(i.push(l),o.push(u),l=v,u=g):(i.push(v),o.push(g));continue}c+=g,x?(l+=v,u+=g):(l&&(s+=l,l="",u=0),s+=v)}return l&&(s+=l),s&&(i.push(s),o.push(c)),i.length===1&&(c+=a),{accumWidth:c,lines:i,linesWidths:o}}function NO(r,e,t,n,a,i){if(r.baseX=t,r.baseY=n,r.outerWidth=r.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;Ie.set(LO,Mh(t,o,a),Qu(n,s,i),o,s),Ie.intersect(e,LO,null,RO);var l=RO.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=Mh(l.x,l.width,a,!0),r.baseY=Qu(l.y,l.height,i,!0)}}var LO=new Ie(0,0,0,0),RO={outIntersectRect:{},clamp:!0};function VM(r){return r!=null?r+="":r=""}function Ure(r){var e=VM(r.text),t=r.font,n=Ui(Fi(t),e),a=Pg(t);return hC(r,n,a,null)}function hC(r,e,t,n){var a=new Ie(Mh(r.x||0,e,r.textAlign),Qu(r.y||0,t,r.textBaseline),e,t),i=n??(E6(r)?r.lineWidth:0);return i>0&&(a.x-=i/2,a.y-=i/2,a.width+=i,a.height+=i),a}function E6(r){var e=r.stroke;return e!=null&&e!=="none"&&r.lineWidth>0}var dC="__zr_style_"+Math.round(Math.random()*10),Ju={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Y1={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ju[dC]=!0;var EO=["z","z2","invisible"],Yre=["invisible"],Oa=(function(r){K(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var n=it(t),a=0;a<n.length;a++){var i=n[a];i==="style"?this.useStyle(t[i]):r.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,n,a,i){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Wre(this,t,n)||o&&!o[0]&&!o[3])return!1;if(a&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(i&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(t,n){return this.rectContain(t,n)},e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.rectContain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();return i.contain(a[0],a[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,a=this.getBoundingRect(),i=this.style,o=i.shadowBlur||0,s=i.shadowOffsetX||0,l=i.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new Ie(0,0,0,0)),n?Ie.applyTransform(t,a,n):t.copy(a),(o||s||l)&&(t.width+=o*2+Math.abs(s),t.height+=o*2+Math.abs(l),t.x=Math.min(t.x,t.x+s-o),t.y=Math.min(t.y,t.y+l-o));var u=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-u),t.y=Math.floor(t.y-u),t.width=Math.ceil(t.width+1+u*2),t.height=Math.ceil(t.height+1+u*2))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new Ie(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(t,n){t!=="style"?r.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(t,n){return typeof t=="string"?this.style[t]=n:ie(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=ip,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&ip)},e.prototype.styleUpdated=function(){this.__dirty&=~ip},e.prototype.createStyle=function(t){return kg(Ju,t)},e.prototype.useStyle=function(t){t[dC]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[dC]},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,EO)},e.prototype._applyStateObj=function(t,n,a,i,o,s){r.prototype._applyStateObj.call(this,t,n,a,i,o,s);var l=!(n&&i),u;if(n&&n.style?o?i?u=n.style:(u=this._mergeStyle(this.createStyle(),a.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),i?this.style:a.style),this._mergeStyle(u,n.style)):l&&(u=a.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var f=it(c),d=0;d<f.length;d++){var v=f[d];v in u&&(u[v]=u[v],this.style[v]=c[v])}for(var g=it(u),d=0;d<g.length;d++){var v=g[d];this.style[v]=this.style[v]}this._transitionState(t,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var x=this.__inHover?Yre:EO,d=0;d<x.length;d++){var v=x[d];n&&n[v]!=null?this[v]=n[v]:l&&a[v]!=null&&(this[v]=a[v])}},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),a,i=0;i<t.length;i++){var o=t[i];o.style&&(a=a||{},this._mergeStyle(a,o.style))}return a&&(n.style=a),n},e.prototype._mergeStyle=function(t,n){return ie(t,n),t},e.prototype.getAnimationStyleProps=function(){return Y1},e.initDefaultProps=(function(){var t=e.prototype;t.type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=Jn|ip})(),e})(G1),cw=new Ie(0,0,0,0),fw=new Ie(0,0,0,0);function Wre(r,e,t){return cw.copy(r.getBoundingRect()),r.transform&&cw.applyTransform(r.transform),fw.width=e,fw.height=t,!cw.intersect(fw)}var kn=Math.min,In=Math.max,hw=Math.sin,dw=Math.cos,iu=Math.PI*2,Dy=Dl(),Ny=Dl(),Ly=Dl();function W1(r,e,t){if(r.length!==0){for(var n=r[0],a=n[0],i=n[0],o=n[1],s=n[1],l=1;l<r.length;l++)n=r[l],a=kn(a,n[0]),i=In(i,n[0]),o=kn(o,n[1]),s=In(s,n[1]);e[0]=a,e[1]=o,t[0]=i,t[1]=s}}function kO(r,e,t,n,a,i){a[0]=kn(r,t),a[1]=kn(e,n),i[0]=In(r,t),i[1]=In(e,n)}var IO=[],OO=[];function Xre(r,e,t,n,a,i,o,s,l,u){var c=XG,f=Ar,d=c(r,t,a,o,IO);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var v=0;v<d;v++){var g=f(r,t,a,o,IO[v]);l[0]=kn(g,l[0]),u[0]=In(g,u[0])}d=c(e,n,i,s,OO);for(var v=0;v<d;v++){var x=f(e,n,i,s,OO[v]);l[1]=kn(x,l[1]),u[1]=In(x,u[1])}l[0]=kn(r,l[0]),u[0]=In(r,u[0]),l[0]=kn(o,l[0]),u[0]=In(o,u[0]),l[1]=kn(e,l[1]),u[1]=In(e,u[1]),l[1]=kn(s,l[1]),u[1]=In(s,u[1])}function qre(r,e,t,n,a,i,o,s){var l=ZG,u=Gr,c=In(kn(l(r,t,a),1),0),f=In(kn(l(e,n,i),1),0),d=u(r,t,a,c),v=u(e,n,i,f);o[0]=kn(r,a,d),o[1]=kn(e,i,v),s[0]=In(r,a,d),s[1]=In(e,i,v)}function Zre(r,e,t,n,a,i,o,s,l){var u=Oo,c=Po,f=Math.abs(a-i);if(f%iu<1e-4&&f>1e-4){s[0]=r-t,s[1]=e-n,l[0]=r+t,l[1]=e+n;return}if(Dy[0]=dw(a)*t+r,Dy[1]=hw(a)*n+e,Ny[0]=dw(i)*t+r,Ny[1]=hw(i)*n+e,u(s,Dy,Ny),c(l,Dy,Ny),a=a%iu,a<0&&(a=a+iu),i=i%iu,i<0&&(i=i+iu),a>i&&!o?i+=iu:a<i&&o&&(a+=iu),o){var d=i;i=a,a=d}for(var v=0;v<i;v+=Math.PI/2)v>a&&(Ly[0]=dw(v)*t+r,Ly[1]=hw(v)*n+e,u(s,Ly,s),c(l,Ly,l))}var Et={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ou=[],su=[],pi=[],ks=[],gi=[],mi=[],vw=Math.min,pw=Math.max,lu=Math.cos,uu=Math.sin,xo=Math.abs,vC=Math.PI,Hs=vC*2,gw=typeof Float32Array<"u",_v=[];function mw(r){var e=Math.round(r/vC*1e8)/1e8;return e%2*vC}function X1(r,e){var t=mw(r[0]);t<0&&(t+=Hs);var n=t-r[0],a=r[1];a+=n,!e&&a-t>=Hs?a=t+Hs:e&&t-a>=Hs?a=t-Hs:!e&&t>a?a=t+(Hs-mw(t-a)):e&&t<a&&(a=t-(Hs-mw(a-t))),r[0]=t,r[1]=a}var qi=(function(){function r(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(e,t,n){n=n||0,n>0&&(this._ux=xo(n/Tx/e)||0,this._uy=xo(n/Tx/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Et.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var n=xo(e-this._xi),a=xo(t-this._yi),i=n>this._ux||a>this._uy;if(this.addData(Et.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+a*a;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){return this._drawPendingPt(),this.addData(Et.C,e,t,n,a,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,a,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,n,a){return this._drawPendingPt(),this.addData(Et.Q,e,t,n,a),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,a),this._xi=n,this._yi=a,this},r.prototype.arc=function(e,t,n,a,i,o){this._drawPendingPt(),_v[0]=a,_v[1]=i,X1(_v,o),a=_v[0],i=_v[1];var s=i-a;return this.addData(Et.A,e,t,n,n,a,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,a,i,o),this._xi=lu(i)*n+e,this._yi=uu(i)*n+t,this},r.prototype.arcTo=function(e,t,n,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,a,i),this},r.prototype.rect=function(e,t,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,a),this.addData(Et.R,e,t,n,a),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Et.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&gw&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},r.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,a=this._len,i=0;i<t;i++)n+=e[i].len();var o=this.data;if(gw&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(a+n),a>0&&o))for(var s=0;s<a;s++)this.data[s]=o[s];for(var i=0;i<t;i++)for(var l=e[i].data,s=0;s<l.length;s++)this.data[a++]=l[s];this._len=a}},r.prototype.addData=function(e,t,n,a,i,o,s,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var f=0;f<arguments.length;f++)c[this._len++]=arguments[f]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,gw&&this._len>11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){pi[0]=pi[1]=gi[0]=gi[1]=Number.MAX_VALUE,ks[0]=ks[1]=mi[0]=mi[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,a=0,i=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(t=e[o],n=e[o+1],a=t,i=n),s){case Et.M:t=a=e[o++],n=i=e[o++],gi[0]=a,gi[1]=i,mi[0]=a,mi[1]=i;break;case Et.L:kO(t,n,e[o],e[o+1],gi,mi),t=e[o++],n=e[o++];break;case Et.C:Xre(t,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],gi,mi),t=e[o++],n=e[o++];break;case Et.Q:qre(t,n,e[o++],e[o++],e[o],e[o+1],gi,mi),t=e[o++],n=e[o++];break;case Et.A:var u=e[o++],c=e[o++],f=e[o++],d=e[o++],v=e[o++],g=e[o++]+v;o+=1;var x=!e[o++];l&&(a=lu(v)*f+u,i=uu(v)*d+c),Zre(u,c,f,d,v,g,x,gi,mi),t=lu(g)*f+u,n=uu(g)*d+c;break;case Et.R:a=t=e[o++],i=n=e[o++];var y=e[o++],b=e[o++];kO(a,i,a+y,i+b,gi,mi);break;case Et.Z:t=a,n=i;break}Oo(pi,pi,gi),Po(ks,ks,mi)}return o===0&&(pi[0]=pi[1]=ks[0]=ks[1]=0),new Ie(pi[0],pi[1],ks[0]-pi[0],ks[1]-pi[1])},r.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,a=this._uy,i=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,f=0,d=0;d<t;){var v=e[d++],g=d===1;g&&(i=e[d],o=e[d+1],s=i,l=o);var x=-1;switch(v){case Et.M:i=s=e[d++],o=l=e[d++];break;case Et.L:{var y=e[d++],b=e[d++],w=y-i,T=b-o;(xo(w)>n||xo(T)>a||d===t-1)&&(x=Math.sqrt(w*w+T*T),i=y,o=b);break}case Et.C:{var C=e[d++],D=e[d++],y=e[d++],b=e[d++],M=e[d++],N=e[d++];x=ite(i,o,C,D,y,b,M,N,10),i=M,o=N;break}case Et.Q:{var C=e[d++],D=e[d++],y=e[d++],b=e[d++];x=ste(i,o,C,D,y,b,10),i=y,o=b;break}case Et.A:var R=e[d++],E=e[d++],k=e[d++],I=e[d++],z=e[d++],P=e[d++],G=P+z;d+=1,g&&(s=lu(z)*k+R,l=uu(z)*I+E),x=pw(k,I)*vw(Hs,Math.abs(P)),i=lu(G)*k+R,o=uu(G)*I+E;break;case Et.R:{s=i=e[d++],l=o=e[d++];var U=e[d++],B=e[d++];x=U*2+B*2;break}case Et.Z:{var w=s-i,T=l-o;x=Math.sqrt(w*w+T*T),i=s,o=l;break}}x>=0&&(u[f++]=x,c+=x)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var n=this.data,a=this._ux,i=this._uy,o=this._len,s,l,u,c,f,d,v=t<1,g,x,y=0,b=0,w,T=0,C,D;if(!(v&&(this._pathSegLen||this._calculateLength(),g=this._pathSegLen,x=this._pathLen,w=t*x,!w)))e:for(var M=0;M<o;){var N=n[M++],R=M===1;switch(R&&(u=n[M],c=n[M+1],s=u,l=c),N!==Et.L&&T>0&&(e.lineTo(C,D),T=0),N){case Et.M:s=u=n[M++],l=c=n[M++],e.moveTo(u,c);break;case Et.L:{f=n[M++],d=n[M++];var E=xo(f-u),k=xo(d-c);if(E>a||k>i){if(v){var I=g[b++];if(y+I>w){var z=(w-y)/I;e.lineTo(u*(1-z)+f*z,c*(1-z)+d*z);break e}y+=I}e.lineTo(f,d),u=f,c=d,T=0}else{var P=E*E+k*k;P>T&&(C=f,D=d,T=P)}break}case Et.C:{var G=n[M++],U=n[M++],B=n[M++],F=n[M++],H=n[M++],X=n[M++];if(v){var I=g[b++];if(y+I>w){var z=(w-y)/I;bl(u,G,B,H,z,ou),bl(c,U,F,X,z,su),e.bezierCurveTo(ou[1],su[1],ou[2],su[2],ou[3],su[3]);break e}y+=I}e.bezierCurveTo(G,U,B,F,H,X),u=H,c=X;break}case Et.Q:{var G=n[M++],U=n[M++],B=n[M++],F=n[M++];if(v){var I=g[b++];if(y+I>w){var z=(w-y)/I;Up(u,G,B,z,ou),Up(c,U,F,z,su),e.quadraticCurveTo(ou[1],su[1],ou[2],su[2]);break e}y+=I}e.quadraticCurveTo(G,U,B,F),u=B,c=F;break}case Et.A:var V=n[M++],W=n[M++],$=n[M++],te=n[M++],ue=n[M++],ge=n[M++],Se=n[M++],Xe=!n[M++],be=$>te?$:te,we=xo($-te)>.001,ze=ue+ge,oe=!1;if(v){var I=g[b++];y+I>w&&(ze=ue+ge*(w-y)/I,oe=!0),y+=I}if(we&&e.ellipse?e.ellipse(V,W,$,te,Se,ue,ze,Xe):e.arc(V,W,be,ue,ze,Xe),oe)break e;R&&(s=lu(ue)*$+V,l=uu(ue)*te+W),u=lu(ze)*$+V,c=uu(ze)*te+W;break;case Et.R:s=u=n[M],l=c=n[M+1],f=n[M++],d=n[M++];var pe=n[M++],je=n[M++];if(v){var I=g[b++];if(y+I>w){var Ne=w-y;e.moveTo(f,d),e.lineTo(f+vw(Ne,pe),d),Ne-=pe,Ne>0&&e.lineTo(f+pe,d+vw(Ne,je)),Ne-=je,Ne>0&&e.lineTo(f+pw(pe-Ne,0),d+je),Ne-=pe,Ne>0&&e.lineTo(f,d+pw(je-Ne,0));break e}y+=I}e.rect(f,d,pe,je);break;case Et.Z:if(v){var I=g[b++];if(y+I>w){var z=(w-y)/I;e.lineTo(u*(1-z)+s*z,c*(1-z)+l*z);break e}y+=I}e.closePath(),u=s,c=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.prototype.canSave=function(){return!!this._saveData},r.CMD=Et,r.initDefaultProps=(function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0})(),r})();function Us(r,e,t,n,a,i,o){if(a===0)return!1;var s=a,l=0,u=r;if(o>e+s&&o>n+s||o<e-s&&o<n-s||i>r+s&&i>t+s||i<r-s&&i<t-s)return!1;if(r!==t)l=(e-n)/(r-t),u=(r*n-t*e)/(r-t);else return Math.abs(i-r)<=s/2;var c=l*i-o+u,f=c*c/(l*l+1);return f<=s/2*s/2}function $re(r,e,t,n,a,i,o,s,l,u,c){if(l===0)return!1;var f=l;if(c>e+f&&c>n+f&&c>i+f&&c>s+f||c<e-f&&c<n-f&&c<i-f&&c<s-f||u>r+f&&u>t+f&&u>a+f&&u>o+f||u<r-f&&u<t-f&&u<a-f&&u<o-f)return!1;var d=qG(r,e,t,n,a,i,o,s,u,c,null);return d<=f/2}function k6(r,e,t,n,a,i,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>n+u&&l>i+u||l<e-u&&l<n-u&&l<i-u||s>r+u&&s>t+u&&s>a+u||s<r-u&&s<t-u&&s<a-u)return!1;var c=$G(r,e,t,n,a,i,s,l,null);return c<=u/2}var PO=Math.PI*2;function na(r){return r%=PO,r<0&&(r+=PO),r}var Sv=Math.PI*2;function Kre(r,e,t,n,a,i,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>t||c+u<t)return!1;if(Math.abs(n-a)%Sv<1e-4)return!0;if(i){var f=n;n=na(a),a=na(f)}else n=na(n),a=na(a);n>a&&(a+=Sv);var d=Math.atan2(l,s);return d<0&&(d+=Sv),d>=n&&d<=a||d+Sv>=n&&d+Sv<=a}function No(r,e,t,n,a,i){if(i>e&&i>n||i<e&&i<n||n===e)return 0;var o=(i-e)/(n-e),s=n<e?1:-1;(o===1||o===0)&&(s=n<e?.5:-.5);var l=o*(t-r)+r;return l===a?1/0:l>a?s:0}var Is=qi.CMD,cu=Math.PI*2,Qre=1e-4;function Jre(r,e){return Math.abs(r-e)<Qre}var yn=[-1,-1,-1],Ca=[-1,-1];function ene(){var r=Ca[0];Ca[0]=Ca[1],Ca[1]=r}function tne(r,e,t,n,a,i,o,s,l,u){if(u>e&&u>n&&u>i&&u>s||u<e&&u<n&&u<i&&u<s)return 0;var c=xx(e,n,i,s,u,yn);if(c===0)return 0;for(var f=0,d=-1,v=void 0,g=void 0,x=0;x<c;x++){var y=yn[x],b=y===0||y===1?.5:1,w=Ar(r,t,a,o,y);w<l||(d<0&&(d=XG(e,n,i,s,Ca),Ca[1]<Ca[0]&&d>1&&ene(),v=Ar(e,n,i,s,Ca[0]),d>1&&(g=Ar(e,n,i,s,Ca[1]))),d===2?y<Ca[0]?f+=v<e?b:-b:y<Ca[1]?f+=g<v?b:-b:f+=s<g?b:-b:y<Ca[0]?f+=v<e?b:-b:f+=s<v?b:-b)}return f}function rne(r,e,t,n,a,i,o,s){if(s>e&&s>n&&s>i||s<e&&s<n&&s<i)return 0;var l=ote(e,n,i,s,yn);if(l===0)return 0;var u=ZG(e,n,i);if(u>=0&&u<=1){for(var c=0,f=Gr(e,n,i,u),d=0;d<l;d++){var v=yn[d]===0||yn[d]===1?.5:1,g=Gr(r,t,a,yn[d]);g<o||(yn[d]<u?c+=f<e?v:-v:c+=i<f?v:-v)}return c}else{var v=yn[0]===0||yn[0]===1?.5:1,g=Gr(r,t,a,yn[0]);return g<o?0:i<e?v:-v}}function nne(r,e,t,n,a,i,o,s){if(s-=e,s>t||s<-t)return 0;var l=Math.sqrt(t*t-s*s);yn[0]=-l,yn[1]=l;var u=Math.abs(n-a);if(u<1e-4)return 0;if(u>=cu-1e-4){n=0,a=cu;var c=i?1:-1;return o>=yn[0]+r&&o<=yn[1]+r?c:0}if(n>a){var f=n;n=a,a=f}n<0&&(n+=cu,a+=cu);for(var d=0,v=0;v<2;v++){var g=yn[v];if(g+r>o){var x=Math.atan2(s,g),c=i?1:-1;x<0&&(x=cu+x),(x>=n&&x<=a||x+cu>=n&&x+cu<=a)&&(x>Math.PI/2&&x<Math.PI*1.5&&(c=-c),d+=c)}}return d}function I6(r,e,t,n,a){for(var i=r.data,o=r.len(),s=0,l=0,u=0,c=0,f=0,d,v,g=0;g<o;){var x=i[g++],y=g===1;switch(x===Is.M&&g>1&&(t||(s+=No(l,u,c,f,n,a))),y&&(l=i[g],u=i[g+1],c=l,f=u),x){case Is.M:c=i[g++],f=i[g++],l=c,u=f;break;case Is.L:if(t){if(Us(l,u,i[g],i[g+1],e,n,a))return!0}else s+=No(l,u,i[g],i[g+1],n,a)||0;l=i[g++],u=i[g++];break;case Is.C:if(t){if($re(l,u,i[g++],i[g++],i[g++],i[g++],i[g],i[g+1],e,n,a))return!0}else s+=tne(l,u,i[g++],i[g++],i[g++],i[g++],i[g],i[g+1],n,a)||0;l=i[g++],u=i[g++];break;case Is.Q:if(t){if(k6(l,u,i[g++],i[g++],i[g],i[g+1],e,n,a))return!0}else s+=rne(l,u,i[g++],i[g++],i[g],i[g+1],n,a)||0;l=i[g++],u=i[g++];break;case Is.A:var b=i[g++],w=i[g++],T=i[g++],C=i[g++],D=i[g++],M=i[g++];g+=1;var N=!!(1-i[g++]);d=Math.cos(D)*T+b,v=Math.sin(D)*C+w,y?(c=d,f=v):s+=No(l,u,d,v,n,a);var R=(n-b)*C/T+b;if(t){if(Kre(b,w,C,D,D+M,N,e,R,a))return!0}else s+=nne(b,w,C,D,D+M,N,R,a);l=Math.cos(D+M)*T+b,u=Math.sin(D+M)*C+w;break;case Is.R:c=l=i[g++],f=u=i[g++];var E=i[g++],k=i[g++];if(d=c+E,v=f+k,t){if(Us(c,f,d,f,e,n,a)||Us(d,f,d,v,e,n,a)||Us(d,v,c,v,e,n,a)||Us(c,v,c,f,e,n,a))return!0}else s+=No(d,f,d,v,n,a),s+=No(c,v,c,f,n,a);break;case Is.Z:if(t){if(Us(l,u,c,f,e,n,a))return!0}else s+=No(l,u,c,f,n,a);l=c,u=f;break}}return!t&&!Jre(u,f)&&(s+=No(l,u,c,f,n,a)||0),s!==0}function ane(r,e,t){return I6(r,0,!1,e,t)}function ine(r,e,t,n){return I6(r,e,!0,t,n)}var Dx=Le({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ju),one={style:Le({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Y1.style)},yw=Wi.concat(["invisible","culling","z","z2","zlevel","parent"]),tt=(function(r){K(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var a=this._decalEl=this._decalEl||new e;a.buildPath===e.prototype.buildPath&&(a.buildPath=function(l){t.buildPath(l,t.shape)}),a.silent=!0;var i=a.style;for(var o in n)i[o]!==n[o]&&(i[o]=n[o]);i.fill=n.fill?n.decal:null,i.decal=null,i.shadowColor=null,n.strokeFirst&&(i.stroke=null);for(var s=0;s<yw.length;++s)a[yw[s]]=this[yw[s]];a.__dirty|=Jn}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var n=it(t);this.shape=this.getDefaultShape();var a=this.getDefaultStyle();a&&this.useStyle(a);for(var i=0;i<n.length;i++){var o=n[i],s=t[o];o==="style"?this.style?ie(this.style,s):this.useStyle(s):o==="shape"?ie(this.shape,s):r.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if(t!=="none"){if(ye(t)){var n=Xp(t,0);return n>.5?aC:n>.2?jte:iC}else if(t)return iC}return aC},e.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(ye(n)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=Xp(t,0)<nC;if(i===o)return n}},e.prototype.buildPath=function(t,n,a){},e.prototype.pathUpdated=function(){this.__dirty&=~Uf},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new qi(!1)},e.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return!(n==null||n==="none"||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,a=!t;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Uf)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||a){s.copy(t);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 t},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect(),o=this.style;if(t=a[0],n=a[1],i.contain(t,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)),ine(s,l/u,t,n)))return!0}if(this.hasFill())return ane(s,t,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Uf,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,n){t==="shape"?this.setShape(n):r.prototype.attrKV.call(this,t,n)},e.prototype.setShape=function(t,n){var a=this.shape;return a||(a=this.shape={}),typeof t=="string"?a[t]=n:ie(a,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Uf)},e.prototype.createStyle=function(t){return kg(Dx,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=ie({},this.shape))},e.prototype._applyStateObj=function(t,n,a,i,o,s){r.prototype._applyStateObj.call(this,t,n,a,i,o,s);var l=!(n&&i),u;if(n&&n.shape?o?i?u=n.shape:(u=ie({},a.shape),ie(u,n.shape)):(u=ie({},i?this.shape:a.shape),ie(u,n.shape)):l&&(u=a.shape),u)if(o){this.shape=ie({},this.shape);for(var c={},f=it(u),d=0;d<f.length;d++){var v=f[d];typeof u[v]=="object"?this.shape[v]=u[v]:c[v]=u[v]}this._transitionState(t,{shape:c},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),a,i=0;i<t.length;i++){var o=t[i];o.shape&&(a=a||{},this._mergeStyle(a,o.shape))}return a&&(n.shape=a),n},e.prototype.getAnimationStyleProps=function(){return one},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var n=(function(i){K(o,i);function o(s){var l=i.call(this,s)||this;return t.init&&t.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return Me(t.style)},o.prototype.getDefaultShape=function(){return Me(t.shape)},o})(e);for(var a in t)typeof t[a]=="function"&&(n.prototype[a]=t[a]);return n},e.initDefaultProps=(function(){var t=e.prototype;t.type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=Jn|ip|Uf})(),e})(Oa),sne=Le({strokeFirst:!0,font:qo,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Dx),Nh=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.hasStroke=function(){return E6(this.style)},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(t){return kg(sne,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){return this._rect||(this._rect=Ure(this.style)),this._rect},e.initDefaultProps=(function(){var t=e.prototype;t.dirtyRectTolerance=10})(),e})(Oa);Nh.prototype.type="tspan";var lne=Le({x:0,y:0},Ju),une={style:Le({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Y1.style)};function cne(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var kr=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return kg(lne,t)},e.prototype._getSize=function(t){var n=this.style,a=n[t];if(a!=null)return a;var i=cne(n.image)?n.image:this.__image;if(!i)return 0;var o=t==="width"?"height":"width",s=n[o];return s==null?i[t]:i[t]/i[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return une},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Ie(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e})(Oa);kr.prototype.type="image";function fne(r,e){var t=e.x,n=e.y,a=e.width,i=e.height,o=e.r,s,l,u,c;a<0&&(t=t+a,a=-a),i<0&&(n=n+i,i=-i),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 f;s+l>a&&(f=s+l,s*=a/f,l*=a/f),u+c>a&&(f=u+c,u*=a/f,c*=a/f),l+u>i&&(f=l+u,l*=i/f,u*=i/f),s+c>i&&(f=s+c,s*=i/f,c*=i/f),r.moveTo(t+s,n),r.lineTo(t+a-l,n),l!==0&&r.arc(t+a-l,n+l,l,-Math.PI/2,0),r.lineTo(t+a,n+i-u),u!==0&&r.arc(t+a-u,n+i-u,u,0,Math.PI/2),r.lineTo(t+c,n+i),c!==0&&r.arc(t+c,n+i-c,c,Math.PI/2,Math.PI),r.lineTo(t,n+s),s!==0&&r.arc(t+s,n+s,s,Math.PI,Math.PI*1.5)}var $f=Math.round;function q1(r,e,t){if(e){var n=e.x1,a=e.x2,i=e.y1,o=e.y2;r.x1=n,r.x2=a,r.y1=i,r.y2=o;var s=t&&t.lineWidth;return s&&($f(n*2)===$f(a*2)&&(r.x1=r.x2=aa(n,s,!0)),$f(i*2)===$f(o*2)&&(r.y1=r.y2=aa(i,s,!0))),r}}function O6(r,e,t){if(e){var n=e.x,a=e.y,i=e.width,o=e.height;r.x=n,r.y=a,r.width=i,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=aa(n,s,!0),r.y=aa(a,s,!0),r.width=Math.max(aa(n+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(aa(a+o,s,!1)-r.y,o===0?0:1)),r}}function aa(r,e,t){if(!e)return r;var n=$f(r*2);return(n+$f(e))%2===0?n/2:(n+(t?1:-1))/2}var hne=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})(),dne={},qe=(function(r){K(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new hne},e.prototype.buildPath=function(t,n){var a,i,o,s;if(this.subPixelOptimize){var l=O6(dne,n,this.style);a=l.x,i=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else a=n.x,i=n.y,o=n.width,s=n.height;n.r?fne(t,n):t.rect(a,i,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e})(tt);qe.prototype.type="rect";var zO={fill:"#000"},jO=2,yi={},vne={style:Le({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},Y1.style)},ot=(function(r){K(e,r);function e(t){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=zO,n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];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 t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):r.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):r.prototype.getLocalTransform.call(this,t)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,mne(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);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 t=new Ie(0,0,0,0),n=this._children,a=[],i=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(a);u?(t.copy(l),t.applyTransform(u),i=i||t.clone(),i.union(t)):(i=i||l.clone(),i.union(l))}this._rect=i||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||zO},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,n){if(!n)return t;var a=n.rich,i=t.rich||a&&{};return ie(t,n),a&&i?(this._mergeRich(i,a),t.rich=i):i&&(t.rich=i),t},e.prototype._mergeRich=function(t,n){for(var a=it(n),i=0;i<a.length;i++){var o=a[i];t[o]=t[o]||{},ie(t[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return vne},e.prototype._getOrCreateChild=function(t){var n=this._children[this._childCursor];return(!n||!(n instanceof t))&&(n=new t),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var t=this.style,n=t.font||qo,a=t.padding,i=this._defaultStyle,o=t.x||0,s=t.y||0,l=t.align||i.align||"left",u=t.verticalAlign||i.verticalAlign||"top";NO(yi,i.overflowRect,o,s,l,u),o=yi.baseX,s=yi.baseY;var c=YO(t),f=zre(c,t,yi.outerWidth,yi.outerHeight),d=xw(t),v=!!t.backgroundColor,g=f.outerHeight,x=f.outerWidth,y=f.lines,b=f.lineHeight;this.isTruncated=!!f.isTruncated;var w=o,T=Qu(s,f.contentHeight,u);if(d||a){var C=Mh(o,x,l),D=Qu(s,g,u);d&&this._renderBackground(t,t,C,D,x,g)}T+=b/2,a&&(w=UO(o,l,a),u==="top"?T+=a[0]:u==="bottom"&&(T-=a[2]));for(var M=0,N=!1,R=!1,E=FO("fill"in t?t.fill:(R=!0,i.fill)),k=HO("stroke"in t?t.stroke:!v&&(!i.autoStroke||R)?(M=jO,N=!0,i.stroke):null),I=t.textShadowBlur>0,z=0;z<y.length;z++){var P=this._getOrCreateChild(Nh),G=P.createStyle();P.useStyle(G),G.text=y[z],G.x=w,G.y=T,G.textAlign=l,G.textBaseline="middle",G.opacity=t.opacity,G.strokeFirst=!0,I&&(G.shadowBlur=t.textShadowBlur||0,G.shadowColor=t.textShadowColor||"transparent",G.shadowOffsetX=t.textShadowOffsetX||0,G.shadowOffsetY=t.textShadowOffsetY||0),G.stroke=k,G.fill=E,k&&(G.lineWidth=t.lineWidth||M,G.lineDash=t.lineDash,G.lineDashOffset=t.lineDashOffset||0),G.font=n,VO(G,t),T+=b,P.setBoundingRect(hC(G,f.contentWidth,f.calculatedLineHeight,N?0:null))}},e.prototype._updateRichTexts=function(){var t=this.style,n=this._defaultStyle,a=t.align||n.align,i=t.verticalAlign||n.verticalAlign,o=t.x||0,s=t.y||0;NO(yi,n.overflowRect,o,s,a,i),o=yi.baseX,s=yi.baseY;var l=YO(t),u=Vre(l,t,yi.outerWidth,yi.outerHeight,a),c=u.width,f=u.outerWidth,d=u.outerHeight,v=t.padding;this.isTruncated=!!u.isTruncated;var g=Mh(o,f,a),x=Qu(s,d,i),y=g,b=x;v&&(y+=v[3],b+=v[0]);var w=y+c;xw(t)&&this._renderBackground(t,t,g,x,f,d);for(var T=!!t.backgroundColor,C=0;C<u.lines.length;C++){for(var D=u.lines[C],M=D.tokens,N=M.length,R=D.lineHeight,E=D.width,k=0,I=y,z=w,P=N-1,G=void 0;k<N&&(G=M[k],!G.align||G.align==="left");)this._placeToken(G,t,R,b,I,"left",T),E-=G.width,I+=G.width,k++;for(;P>=0&&(G=M[P],G.align==="right");)this._placeToken(G,t,R,b,z,"right",T),E-=G.width,z-=G.width,P--;for(I+=(c-(I-y)-(w-z)-E)/2;k<=P;)G=M[k],this._placeToken(G,t,R,b,I+G.width/2,"center",T),I+=G.width,k++;b+=R}},e.prototype._placeToken=function(t,n,a,i,o,s,l){var u=n.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,f=i+a/2;c==="top"?f=i+t.height/2:c==="bottom"&&(f=i+a-t.height/2);var d=!t.isLineHolder&&xw(u);d&&this._renderBackground(u,n,s==="right"?o-t.width:s==="center"?o-t.width/2:o,f-t.height/2,t.width,t.height);var v=!!u.backgroundColor,g=t.textPadding;g&&(o=UO(o,s,g),f-=t.height/2-g[0]-t.innerHeight/2);var x=this._getOrCreateChild(Nh),y=x.createStyle();x.useStyle(y);var b=this._defaultStyle,w=!1,T=0,C=!1,D=FO("fill"in u?u.fill:"fill"in n?n.fill:(w=!0,b.fill)),M=HO("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!b.autoStroke||w)?(T=jO,C=!0,b.stroke):null),N=u.textShadowBlur>0||n.textShadowBlur>0;y.text=t.text,y.x=o,y.y=f,N&&(y.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,y.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",y.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,y.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),y.textAlign=s,y.textBaseline="middle",y.font=t.font||qo,y.opacity=zn(u.opacity,n.opacity,1),VO(y,u),M&&(y.lineWidth=zn(u.lineWidth,n.lineWidth,T),y.lineDash=Ce(u.lineDash,n.lineDash),y.lineDashOffset=n.lineDashOffset||0,y.stroke=M),D&&(y.fill=D),x.setBoundingRect(hC(y,t.contentWidth,t.contentHeight,C?0:null))},e.prototype._renderBackground=function(t,n,a,i,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,f=l&&l.image,d=l&&!f,v=t.borderRadius,g=this,x,y;if(d||t.lineHeight||u&&c){x=this._getOrCreateChild(qe),x.useStyle(x.createStyle()),x.style.fill=null;var b=x.shape;b.x=a,b.y=i,b.width=o,b.height=s,b.r=v,x.dirtyShape()}if(d){var w=x.style;w.fill=l||null,w.fillOpacity=Ce(t.fillOpacity,1)}else if(f){y=this._getOrCreateChild(kr),y.onload=function(){g.dirtyStyle()};var T=y.style;T.image=l.image,T.x=a,T.y=i,T.width=o,T.height=s}if(u&&c){var w=x.style;w.lineWidth=u,w.stroke=c,w.strokeOpacity=Ce(t.strokeOpacity,1),w.lineDash=t.borderDash,w.lineDashOffset=t.borderDashOffset||0,x.strokeContainThreshold=0,x.hasFill()&&x.hasStroke()&&(w.strokeFirst=!0,w.lineWidth*=2)}var C=(x||y).style;C.shadowBlur=t.shadowBlur||0,C.shadowColor=t.shadowColor||"transparent",C.shadowOffsetX=t.shadowOffsetX||0,C.shadowOffsetY=t.shadowOffsetY||0,C.opacity=zn(t.opacity,n.opacity,1)},e.makeFont=function(t){var n="";return z6(t)&&(n=[t.fontStyle,t.fontWeight,P6(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&ta(n)||t.textFont||t.font},e})(Oa),pne={left:!0,right:1,center:1},gne={top:1,bottom:1,middle:1},BO=["fontStyle","fontWeight","fontSize","fontFamily"];function P6(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?bM+"px":r+"px"}function VO(r,e){for(var t=0;t<BO.length;t++){var n=BO[t],a=e[n];a!=null&&(r[n]=a)}}function z6(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function mne(r){return GO(r),O(r.rich,GO),r}function GO(r){if(r){r.font=ot.makeFont(r);var e=r.align;e==="middle"&&(e="center"),r.align=e==null||pne[e]?e:"left";var t=r.verticalAlign;t==="center"&&(t="middle"),r.verticalAlign=t==null||gne[t]?t:"top";var n=r.padding;n&&(r.padding=Eg(r.padding))}}function HO(r,e){return r==null||e<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function FO(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function UO(r,e,t){return e==="right"?r-t[1]:e==="center"?r+t[3]/2-t[1]/2:r+t[3]}function YO(r){var e=r.text;return e!=null&&(e+=""),e}function xw(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var Pe=Je(),pC=function(r,e,t,n){if(n){var a=Pe(n);a.dataIndex=t,a.dataType=e,a.seriesIndex=r,a.ssrType="chart",n.type==="group"&&n.traverse(function(i){var o=Pe(i);o.seriesIndex=r,o.dataIndex=t,o.dataType=e,o.ssrType="chart"})}},WO=1,XO={},j6=Je(),GM=Je(),HM=0,zg=1,Z1=2,Tn=["emphasis","blur","select"],$p=["normal","emphasis","blur","select"],qh=10,yne=9,ec="highlight",Y0="downplay",Nx="select",gC="unselect",Lx="toggleSelect",FM="selectchanged";function bf(r){return r!=null&&r!=="none"}function $1(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function B6(r){$1(r,"emphasis",Z1)}function V6(r){r.hoverState===Z1&&$1(r,"normal",HM)}function UM(r){$1(r,"blur",zg)}function G6(r){r.hoverState===zg&&$1(r,"normal",HM)}function xne(r){r.selected=!0}function bne(r){r.selected=!1}function qO(r,e,t){e(r,t)}function as(r,e,t){qO(r,e,t),r.isGroup&&r.traverse(function(n){qO(n,e,t)})}function Rx(r,e){switch(e){case"emphasis":r.hoverState=Z1;break;case"normal":r.hoverState=HM;break;case"blur":r.hoverState=zg;break;case"select":r.selected=!0}}function _ne(r,e,t,n){for(var a=r.style,i={},o=0;o<e.length;o++){var s=e[o],l=a[s];i[s]=l??(n&&n[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(t)<0&&u.targetName==="style"&&u.saveTo(i,e)}return i}function Sne(r,e,t,n){var a=t&&Fe(t,"select")>=0,i=!1;if(r instanceof tt){var o=j6(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(bf(s)||bf(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=ie({},n),u=ie({},u),u.fill=s):!bf(u.fill)&&bf(s)?(i=!0,n=ie({},n),u=ie({},u),u.fill=_x(s)):!bf(u.stroke)&&bf(l)&&(i||(n=ie({},n),u=ie({},u)),u.stroke=_x(l)),n.style=u}}if(n&&n.z2==null){i||(n=ie({},n));var c=r.z2EmphasisLift;n.z2=r.z2+(c??qh)}return n}function wne(r,e,t){if(t&&t.z2==null){t=ie({},t);var n=r.z2SelectLift;t.z2=r.z2+(n??yne)}return t}function Tne(r,e,t){var n=Fe(r.currentStates,e)>=0,a=r.style.opacity,i=n?null:_ne(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=ie({},t),o=ie({opacity:n?a:i.opacity*.1},o),t.style=o),t}function bw(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return Sne(this,r,e,t);if(r==="blur")return Tne(this,r,t);if(r==="select")return wne(this,r,t)}return t}function fc(r){r.stateProxy=bw;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=bw),t&&(t.stateProxy=bw)}function ZO(r,e){!Y6(r,e)&&!r.__highByOuter&&as(r,B6)}function $O(r,e){!Y6(r,e)&&!r.__highByOuter&&as(r,V6)}function $o(r,e){r.__highByOuter|=1<<(e||0),as(r,B6)}function Ko(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&as(r,V6)}function H6(r){as(r,UM)}function YM(r){as(r,G6)}function F6(r){as(r,xne)}function U6(r){as(r,bne)}function Y6(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function W6(r){var e=r.getModel(),t=[],n=[];e.eachComponent(function(a,i){var o=GM(i),s=a==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){G6(u)}),s&&t.push(i)),o.isBlured=!1}),O(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(t,!1,e)})}function mC(r,e,t,n){var a=n.getModel();t=t||"coordinateSystem";function i(u,c){for(var f=0;f<c.length;f++){var d=u.getItemGraphicEl(c[f]);d&&YM(d)}}if(r!=null&&!(!e||e==="none")){var o=a.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];a.eachSeries(function(u){var c=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var d=f&&s?f===s:c;if(!(t==="series"&&!c||t==="coordinateSystem"&&!d||e==="series"&&c)){var v=n.getViewOfSeriesModel(u);if(v.group.traverse(function(y){y.__highByOuter&&c&&e==="self"||UM(y)}),en(e))i(u.getData(),e);else if(Re(e))for(var g=it(e),x=0;x<g.length;x++)i(u.getData(g[x]),e[g[x]]);l.push(u),GM(u).isBlured=!0}}),a.eachComponent(function(u,c){if(u!=="series"){var f=n.getViewOfComponentModel(c);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,a)}})}}function yC(r,e,t){if(!(r==null||e==null)){var n=t.getModel().getComponent(r,e);if(n){GM(n).isBlured=!0;var a=t.getViewOfComponentModel(n);!a||!a.focusBlurEnabled||a.group.traverse(function(i){UM(i)})}}}function Cne(r,e,t){var n=r.seriesIndex,a=r.getData(e.dataType);if(a){var i=uc(a,e);i=(ce(i)?i[0]:i)||0;var o=a.getItemGraphicEl(i);if(!o)for(var s=a.count(),l=0;!o&&l<s;)o=a.getItemGraphicEl(l++);if(o){var u=Pe(o);mC(n,u.focus,u.blurScope,t)}else{var c=r.get(["emphasis","focus"]),f=r.get(["emphasis","blurScope"]);c!=null&&mC(n,c,f,t)}}}function WM(r,e,t,n){var a={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||e==null||t==null)return a;var i=n.getModel().getComponent(r,e);if(!i)return a;var o=n.getViewOfComponentModel(i);if(!o||!o.findHighDownDispatchers)return a;for(var s=o.findHighDownDispatchers(t),l,u=0;u<s.length;u++)if(Pe(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function Ane(r,e,t){var n=Pe(r),a=WM(n.componentMainType,n.componentIndex,n.componentHighDownName,t),i=a.dispatchers,o=a.focusSelf;i?(o&&yC(n.componentMainType,n.componentIndex,t),O(i,function(s){return ZO(s,e)})):(mC(n.seriesIndex,n.focus,n.blurScope,t),n.focus==="self"&&yC(n.componentMainType,n.componentIndex,t),ZO(r,e))}function Mne(r,e,t){W6(t);var n=Pe(r),a=WM(n.componentMainType,n.componentIndex,n.componentHighDownName,t).dispatchers;a?O(a,function(i){return $O(i,e)}):$O(r,e)}function Dne(r,e,t){if(bC(e)){var n=e.dataType,a=r.getData(n),i=uc(a,e);ce(i)||(i=[i]),r[e.type===Lx?"toggleSelect":e.type===Nx?"select":"unselect"](i,n)}}function KO(r){var e=r.getAllData();O(e,function(t){var n=t.data,a=t.type;n.eachItemGraphicEl(function(i,o){r.isSelected(o,a)?F6(i):U6(i)})})}function Nne(r){var e=[];return r.eachSeries(function(t){var n=t.getAllData();O(n,function(a){a.data;var i=a.type,o=t.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function hl(r,e,t){ju(r,!0),as(r,fc),xC(r,e,t)}function Lne(r){ju(r,!1)}function Ut(r,e,t,n){n?Lne(r):hl(r,e,t)}function xC(r,e,t){var n=Pe(r);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var QO=["emphasis","blur","select"],Rne={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function _r(r,e,t,n){t=t||"itemStyle";for(var a=0;a<QO.length;a++){var i=QO[a],o=e.getModel([i,t]),s=r.ensureState(i);s.style=n?n(o):o[Rne[t]]()}}function ju(r,e){var t=e===!1,n=r;r.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!t)}function Kp(r){return!!(r&&r.__highDownDispatcher)}function Ene(r,e,t){var n=Pe(r);n.componentMainType=e.mainType,n.componentIndex=e.componentIndex,n.componentHighDownName=t}function kne(r){var e=XO[r];return e==null&&WO<=32&&(e=XO[r]=WO++),e}function bC(r){var e=r.type;return e===Nx||e===gC||e===Lx}function JO(r){var e=r.type;return e===ec||e===Y0}function Ine(r){var e=j6(r);e.normalFill=r.style.fill,e.normalStroke=r.style.stroke;var t=r.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var _f=qi.CMD,One=[[],[],[]],eP=Math.sqrt,Pne=Math.atan2;function X6(r,e){if(e){var t=r.data,n=r.len(),a,i,o,s,l,u,c=_f.M,f=_f.C,d=_f.L,v=_f.R,g=_f.A,x=_f.Q;for(o=0,s=0;o<n;){switch(a=t[o++],s=o,i=0,a){case c:i=1;break;case d:i=1;break;case f:i=3;break;case x:i=2;break;case g:var y=e[4],b=e[5],w=eP(e[0]*e[0]+e[1]*e[1]),T=eP(e[2]*e[2]+e[3]*e[3]),C=Pne(-e[1]/T,e[0]/w);t[o]*=w,t[o++]+=y,t[o]*=T,t[o++]+=b,t[o++]*=w,t[o++]*=T,t[o++]+=C,t[o++]+=C,o+=2,s=o;break;case v:u[0]=t[o++],u[1]=t[o++],Qt(u,u,e),t[s++]=u[0],t[s++]=u[1],u[0]+=t[o++],u[1]+=t[o++],Qt(u,u,e),t[s++]=u[0],t[s++]=u[1]}for(l=0;l<i;l++){var D=One[l];D[0]=t[o++],D[1]=t[o++],Qt(D,D,e),t[s++]=D[0],t[s++]=D[1]}}r.increaseVersion()}}var _w=Math.sqrt,Ry=Math.sin,Ey=Math.cos,wv=Math.PI;function tP(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function _C(r,e){return(r[0]*e[0]+r[1]*e[1])/(tP(r)*tP(e))}function rP(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(_C(r,e))}function nP(r,e,t,n,a,i,o,s,l,u,c){var f=l*(wv/180),d=Ey(f)*(r-t)/2+Ry(f)*(e-n)/2,v=-1*Ry(f)*(r-t)/2+Ey(f)*(e-n)/2,g=d*d/(o*o)+v*v/(s*s);g>1&&(o*=_w(g),s*=_w(g));var x=(a===i?-1:1)*_w((o*o*(s*s)-o*o*(v*v)-s*s*(d*d))/(o*o*(v*v)+s*s*(d*d)))||0,y=x*o*v/s,b=x*-s*d/o,w=(r+t)/2+Ey(f)*y-Ry(f)*b,T=(e+n)/2+Ry(f)*y+Ey(f)*b,C=rP([1,0],[(d-y)/o,(v-b)/s]),D=[(d-y)/o,(v-b)/s],M=[(-1*d-y)/o,(-1*v-b)/s],N=rP(D,M);if(_C(D,M)<=-1&&(N=wv),_C(D,M)>=1&&(N=0),N<0){var R=Math.round(N/wv*1e6)/1e6;N=wv*2+R%2*wv}c.addData(u,w,T,o,s,C,N,f,i)}var zne=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,jne=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Bne(r){var e=new qi;if(!r)return e;var t=0,n=0,a=t,i=n,o,s=qi.CMD,l=r.match(zne);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],f=c.charAt(0),d=void 0,v=c.match(jne)||[],g=v.length,x=0;x<g;x++)v[x]=parseFloat(v[x]);for(var y=0;y<g;){var b=void 0,w=void 0,T=void 0,C=void 0,D=void 0,M=void 0,N=void 0,R=t,E=n,k=void 0,I=void 0;switch(f){case"l":t+=v[y++],n+=v[y++],d=s.L,e.addData(d,t,n);break;case"L":t=v[y++],n=v[y++],d=s.L,e.addData(d,t,n);break;case"m":t+=v[y++],n+=v[y++],d=s.M,e.addData(d,t,n),a=t,i=n,f="l";break;case"M":t=v[y++],n=v[y++],d=s.M,e.addData(d,t,n),a=t,i=n,f="L";break;case"h":t+=v[y++],d=s.L,e.addData(d,t,n);break;case"H":t=v[y++],d=s.L,e.addData(d,t,n);break;case"v":n+=v[y++],d=s.L,e.addData(d,t,n);break;case"V":n=v[y++],d=s.L,e.addData(d,t,n);break;case"C":d=s.C,e.addData(d,v[y++],v[y++],v[y++],v[y++],v[y++],v[y++]),t=v[y-2],n=v[y-1];break;case"c":d=s.C,e.addData(d,v[y++]+t,v[y++]+n,v[y++]+t,v[y++]+n,v[y++]+t,v[y++]+n),t+=v[y-2],n+=v[y-1];break;case"S":b=t,w=n,k=e.len(),I=e.data,o===s.C&&(b+=t-I[k-4],w+=n-I[k-3]),d=s.C,R=v[y++],E=v[y++],t=v[y++],n=v[y++],e.addData(d,b,w,R,E,t,n);break;case"s":b=t,w=n,k=e.len(),I=e.data,o===s.C&&(b+=t-I[k-4],w+=n-I[k-3]),d=s.C,R=t+v[y++],E=n+v[y++],t+=v[y++],n+=v[y++],e.addData(d,b,w,R,E,t,n);break;case"Q":R=v[y++],E=v[y++],t=v[y++],n=v[y++],d=s.Q,e.addData(d,R,E,t,n);break;case"q":R=v[y++]+t,E=v[y++]+n,t+=v[y++],n+=v[y++],d=s.Q,e.addData(d,R,E,t,n);break;case"T":b=t,w=n,k=e.len(),I=e.data,o===s.Q&&(b+=t-I[k-4],w+=n-I[k-3]),t=v[y++],n=v[y++],d=s.Q,e.addData(d,b,w,t,n);break;case"t":b=t,w=n,k=e.len(),I=e.data,o===s.Q&&(b+=t-I[k-4],w+=n-I[k-3]),t+=v[y++],n+=v[y++],d=s.Q,e.addData(d,b,w,t,n);break;case"A":T=v[y++],C=v[y++],D=v[y++],M=v[y++],N=v[y++],R=t,E=n,t=v[y++],n=v[y++],d=s.A,nP(R,E,t,n,M,N,T,C,D,d,e);break;case"a":T=v[y++],C=v[y++],D=v[y++],M=v[y++],N=v[y++],R=t,E=n,t+=v[y++],n+=v[y++],d=s.A,nP(R,E,t,n,M,N,T,C,D,d,e);break}}(f==="z"||f==="Z")&&(d=s.Z,e.addData(d),t=a,n=i),o=d}return e.toStatic(),e}var q6=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e})(tt);function Z6(r){return r.setData!=null}function $6(r,e){var t=Bne(r),n=ie({},e);return n.buildPath=function(a){var i=Z6(a);if(i&&a.canSave()){a.appendPath(t);var o=a.getContext();o&&a.rebuildPath(o,1)}else{var o=i?a.getContext():a;o&&t.rebuildPath(o,1)}},n.applyTransform=function(a){X6(t,a),this.dirtyShape()},n}function K6(r,e){return new q6($6(r,e))}function Vne(r,e){var t=$6(r,e),n=(function(a){K(i,a);function i(o){var s=a.call(this,o)||this;return s.applyTransform=t.applyTransform,s.buildPath=t.buildPath,s}return i})(q6);return n}function Gne(r,e){for(var t=[],n=r.length,a=0;a<n;a++){var i=r[a];t.push(i.getUpdatedPathProxy(!0))}var o=new tt(e);return o.createPathProxy(),o.buildPath=function(s){if(Z6(s)){s.appendPath(t);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function XM(r,e){e=e||{};var t=new tt;return r.shape&&t.setShape(r.shape),t.setStyle(r.style),e.bakeTransform?X6(t.path,r.getComputedTransform()):e.toLocal?t.setLocalTransform(r.getComputedTransform()):t.copyTransform(r),t.buildPath=r.buildPath,t.applyTransform=t.applyTransform,t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t}var Hne=(function(){function r(){this.cx=0,this.cy=0,this.r=0}return r})(),eo=(function(r){K(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Hne},e.prototype.buildPath=function(t,n){t.moveTo(n.cx+n.r,n.cy),t.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e})(tt);eo.prototype.type="circle";var Fne=(function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r})(),jg=(function(r){K(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Fne},e.prototype.buildPath=function(t,n){var a=.5522848,i=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*a,c=l*a;t.moveTo(i-s,o),t.bezierCurveTo(i-s,o-c,i-u,o-l,i,o-l),t.bezierCurveTo(i+u,o-l,i+s,o-c,i+s,o),t.bezierCurveTo(i+s,o+c,i+u,o+l,i,o+l),t.bezierCurveTo(i-u,o+l,i-s,o+c,i-s,o),t.closePath()},e})(tt);jg.prototype.type="ellipse";var Q6=Math.PI,Sw=Q6*2,fu=Math.sin,Sf=Math.cos,Une=Math.acos,ln=Math.atan2,aP=Math.abs,Mp=Math.sqrt,sp=Math.max,xi=Math.min,Ya=1e-4;function Yne(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,d=f*l-c*u;if(!(d*d<Ya))return d=(c*(e-i)-f*(r-a))/d,[r+d*l,e+d*u]}function ky(r,e,t,n,a,i,o){var s=r-t,l=e-n,u=(o?i:-i)/Mp(s*s+l*l),c=u*l,f=-u*s,d=r+c,v=e+f,g=t+c,x=n+f,y=(d+g)/2,b=(v+x)/2,w=g-d,T=x-v,C=w*w+T*T,D=a-i,M=d*x-g*v,N=(T<0?-1:1)*Mp(sp(0,D*D*C-M*M)),R=(M*T-w*N)/C,E=(-M*w-T*N)/C,k=(M*T+w*N)/C,I=(-M*w+T*N)/C,z=R-y,P=E-b,G=k-y,U=I-b;return z*z+P*P>G*G+U*U&&(R=k,E=I),{cx:R,cy:E,x0:-c,y0:-f,x1:R*(a/D-1),y1:E*(a/D-1)}}function Wne(r){var e;if(ce(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function Xne(r,e){var t,n=sp(e.r,0),a=sp(e.r0||0,0),i=n>0,o=a>0;if(!(!i&&!o)){if(i||(n=a,a=0),a>n){var s=n;n=a,a=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,d=!!e.clockwise,v=aP(u-l),g=v>Sw&&v%Sw;if(g>Ya&&(v=g),!(n>Ya))r.moveTo(c,f);else if(v>Sw-Ya)r.moveTo(c+n*Sf(l),f+n*fu(l)),r.arc(c,f,n,l,u,!d),a>Ya&&(r.moveTo(c+a*Sf(u),f+a*fu(u)),r.arc(c,f,a,u,l,d));else{var x=void 0,y=void 0,b=void 0,w=void 0,T=void 0,C=void 0,D=void 0,M=void 0,N=void 0,R=void 0,E=void 0,k=void 0,I=void 0,z=void 0,P=void 0,G=void 0,U=n*Sf(l),B=n*fu(l),F=a*Sf(u),H=a*fu(u),X=v>Ya;if(X){var V=e.cornerRadius;V&&(t=Wne(V),x=t[0],y=t[1],b=t[2],w=t[3]);var W=aP(n-a)/2;if(T=xi(W,b),C=xi(W,w),D=xi(W,x),M=xi(W,y),E=N=sp(T,C),k=R=sp(D,M),(N>Ya||R>Ya)&&(I=n*Sf(u),z=n*fu(u),P=a*Sf(l),G=a*fu(l),v<Q6)){var $=Yne(U,B,P,G,I,z,F,H);if($){var te=U-$[0],ue=B-$[1],ge=I-$[0],Se=z-$[1],Xe=1/fu(Une((te*ge+ue*Se)/(Mp(te*te+ue*ue)*Mp(ge*ge+Se*Se)))/2),be=Mp($[0]*$[0]+$[1]*$[1]);E=xi(N,(n-be)/(Xe+1)),k=xi(R,(a-be)/(Xe-1))}}}if(!X)r.moveTo(c+U,f+B);else if(E>Ya){var we=xi(b,E),ze=xi(w,E),oe=ky(P,G,U,B,n,we,d),pe=ky(I,z,F,H,n,ze,d);r.moveTo(c+oe.cx+oe.x0,f+oe.cy+oe.y0),E<N&&we===ze?r.arc(c+oe.cx,f+oe.cy,E,ln(oe.y0,oe.x0),ln(pe.y0,pe.x0),!d):(we>0&&r.arc(c+oe.cx,f+oe.cy,we,ln(oe.y0,oe.x0),ln(oe.y1,oe.x1),!d),r.arc(c,f,n,ln(oe.cy+oe.y1,oe.cx+oe.x1),ln(pe.cy+pe.y1,pe.cx+pe.x1),!d),ze>0&&r.arc(c+pe.cx,f+pe.cy,ze,ln(pe.y1,pe.x1),ln(pe.y0,pe.x0),!d))}else r.moveTo(c+U,f+B),r.arc(c,f,n,l,u,!d);if(!(a>Ya)||!X)r.lineTo(c+F,f+H);else if(k>Ya){var we=xi(x,k),ze=xi(y,k),oe=ky(F,H,I,z,a,-ze,d),pe=ky(U,B,P,G,a,-we,d);r.lineTo(c+oe.cx+oe.x0,f+oe.cy+oe.y0),k<R&&we===ze?r.arc(c+oe.cx,f+oe.cy,k,ln(oe.y0,oe.x0),ln(pe.y0,pe.x0),!d):(ze>0&&r.arc(c+oe.cx,f+oe.cy,ze,ln(oe.y0,oe.x0),ln(oe.y1,oe.x1),!d),r.arc(c,f,a,ln(oe.cy+oe.y1,oe.cx+oe.x1),ln(pe.cy+pe.y1,pe.cx+pe.x1),d),we>0&&r.arc(c+pe.cx,f+pe.cy,we,ln(pe.y1,pe.x1),ln(pe.y0,pe.x0),!d))}else r.lineTo(c+F,f+H),r.arc(c,f,a,u,l,d)}r.closePath()}}}var qne=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r})(),rn=(function(r){K(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new qne},e.prototype.buildPath=function(t,n){Xne(t,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e})(tt);rn.prototype.type="sector";var Zne=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})(),Zh=(function(r){K(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Zne},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.PI*2;t.moveTo(a+n.r,i),t.arc(a,i,n.r,0,o,!1),t.moveTo(a+n.r0,i),t.arc(a,i,n.r0,0,o,!0)},e})(tt);Zh.prototype.type="ring";function $ne(r,e,t,n){var a=[],i=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var d=0,v=r.length;d<v;d++)Oo(c,c,r[d]),Po(f,f,r[d]);Oo(c,c,n[0]),Po(f,f,n[1])}for(var d=0,v=r.length;d<v;d++){var g=r[d];if(t)l=r[d?d-1:v-1],u=r[(d+1)%v];else if(d===0||d===v-1){a.push(Hi(r[d]));continue}else l=r[d-1],u=r[d+1];el(i,u,l),bp(i,i,e);var x=px(g,l),y=px(g,u),b=x+y;b!==0&&(x/=b,y/=b),bp(o,i,-x),bp(s,i,y);var w=G2([],g,o),T=G2([],g,s);n&&(Po(w,w,c),Oo(w,w,f),Po(T,T,c),Oo(T,T,f)),a.push(w),a.push(T)}return t&&a.push(a.shift()),a}function J6(r,e,t){var n=e.smooth,a=e.points;if(a&&a.length>=2){if(n){var i=$ne(a,n,t,e.smoothConstraint);r.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(t?o:o-1);s++){var l=i[s*2],u=i[s*2+1],c=a[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(a[0][0],a[0][1]);for(var s=1,f=a.length;s<f;s++)r.lineTo(a[s][0],a[s][1])}t&&r.closePath()}}var Kne=(function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r})(),nn=(function(r){K(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Kne},e.prototype.buildPath=function(t,n){J6(t,n,!0)},e})(tt);nn.prototype.type="polygon";var Qne=(function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r})(),Fr=(function(r){K(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Qne},e.prototype.buildPath=function(t,n){J6(t,n,!1)},e})(tt);Fr.prototype.type="polyline";var Jne={},eae=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})(),lr=(function(r){K(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new eae},e.prototype.buildPath=function(t,n){var a,i,o,s;if(this.subPixelOptimize){var l=q1(Jne,n,this.style);a=l.x1,i=l.y1,o=l.x2,s=l.y2}else a=n.x1,i=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(t.moveTo(a,i),u<1&&(o=a*(1-u)+o*u,s=i*(1-u)+s*u),t.lineTo(o,s))},e.prototype.pointAt=function(t){var n=this.shape;return[n.x1*(1-t)+n.x2*t,n.y1*(1-t)+n.y2*t]},e})(tt);lr.prototype.type="line";var Ln=[],tae=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r})();function iP(r,e,t){var n=r.cpx2,a=r.cpy2;return n!=null||a!=null?[(t?uO:Ar)(r.x1,r.cpx1,r.cpx2,r.x2,e),(t?uO:Ar)(r.y1,r.cpy1,r.cpy2,r.y2,e)]:[(t?q2:Gr)(r.x1,r.cpx1,r.x2,e),(t?q2:Gr)(r.y1,r.cpy1,r.y2,e)]}var $h=(function(r){K(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new tae},e.prototype.buildPath=function(t,n){var a=n.x1,i=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,c=n.cpx2,f=n.cpy2,d=n.percent;d!==0&&(t.moveTo(a,i),c==null||f==null?(d<1&&(Up(a,l,o,d,Ln),l=Ln[1],o=Ln[2],Up(i,u,s,d,Ln),u=Ln[1],s=Ln[2]),t.quadraticCurveTo(l,u,o,s)):(d<1&&(bl(a,l,c,o,d,Ln),l=Ln[1],c=Ln[2],o=Ln[3],bl(i,u,f,s,d,Ln),u=Ln[1],f=Ln[2],s=Ln[3]),t.bezierCurveTo(l,u,c,f,o,s)))},e.prototype.pointAt=function(t){return iP(this.shape,t,!1)},e.prototype.tangentAt=function(t){var n=iP(this.shape,t,!0);return xc(n,n)},e})(tt);$h.prototype.type="bezier-curve";var rae=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),Bg=(function(r){K(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new rae},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,c=Math.cos(s),f=Math.sin(s);t.moveTo(c*o+a,f*o+i),t.arc(a,i,o,s,l,!u)},e})(tt);Bg.prototype.type="arc";var Vg=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="compound",t}return e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,n=this.shapeChanged(),a=0;a<t.length;a++)n=n||t[a].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],n=this.getGlobalScale(),a=0;a<t.length;a++)t[a].path||t[a].createPathProxy(),t[a].path.setScale(n[0],n[1],t[a].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,n){for(var a=n.paths||[],i=0;i<a.length;i++)a[i].buildPath(t,a[i].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],n=0;n<t.length;n++)t[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),tt.prototype.getBoundingRect.call(this)},e})(tt),eH=(function(){function r(e){this.colorStops=e||[]}return r.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},r})(),bc=(function(r){K(e,r);function e(t,n,a,i,o,s){var l=r.call(this,o)||this;return l.x=t??0,l.y=n??0,l.x2=a??1,l.y2=i??0,l.type="linear",l.global=s||!1,l}return e})(eH),qM=(function(r){K(e,r);function e(t,n,a,i,o){var s=r.call(this,i)||this;return s.x=t??.5,s.y=n??.5,s.r=a??.5,s.type="radial",s.global=o||!1,s}return e})(eH),ww=Math.min,nae=Math.max,Iy=Math.abs,hu=[0,0],du=[0,0],Br=VG(),Oy=Br.minTv,Py=Br.maxTv,tH=(function(){function r(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new ke;for(var n=0;n<2;n++)this._axes[n]=new ke;e&&this.fromBoundingRect(e,t)}return r.prototype.fromBoundingRect=function(e,t){var n=this._corners,a=this._axes,i=e.x,o=e.y,s=i+e.width,l=o+e.height;if(n[0].set(i,o),n[1].set(s,o),n[2].set(s,l),n[3].set(i,l),t)for(var u=0;u<4;u++)n[u].transform(t);ke.sub(a[0],n[1],n[0]),ke.sub(a[1],n[3],n[0]),a[0].normalize(),a[1].normalize();for(var u=0;u<2;u++)this._origin[u]=a[u].dot(n[0])},r.prototype.intersect=function(e,t,n){var a=!0,i=!t;return t&&ke.set(t,0,0),Br.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(a=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(a=!1,i)||!i&&!Br.negativeSize&&ke.copy(t,a?Br.useDir?Br.dirMinTv:Oy:Py),a},r.prototype._intersectCheckOneSide=function(e,t,n,a){for(var i=!0,o=0;o<2;o++){var s=e._axes[o];if(e._getProjMinMaxOnAxis(o,e._corners,hu),e._getProjMinMaxOnAxis(o,t._corners,du),Br.negativeSize||hu[1]<du[0]||hu[0]>du[1]){if(i=!1,Br.negativeSize||n)return i;var l=Iy(du[0]-hu[1]),u=Iy(hu[0]-du[1]);ww(l,u)>Py.len()&&(l<u?ke.scale(Py,s,-l*a):ke.scale(Py,s,u*a))}else if(!n){var l=Iy(du[0]-hu[1]),u=Iy(hu[0]-du[1]);(Br.useDir||ww(l,u)<Oy.len())&&((l<u||!Br.bidirectional)&&(ke.scale(Oy,s,l*a),Br.useDir&&Br.calcDirMTV()),(l>=u||!Br.bidirectional)&&(ke.scale(Oy,s,-u*a),Br.useDir&&Br.calcDirMTV()))}}return i},r.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var a=this._axes[e],i=this._origin,o=t[0].dot(a)+i[e],s=o,l=o,u=1;u<t.length;u++){var c=t[u].dot(a)+i[e];s=ww(c,s),l=nae(c,l)}n[0]=s+Br.touchThreshold,n[1]=l-Br.touchThreshold,Br.negativeSize=n[1]<n[0]},r})(),aae=[],rH=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return e.prototype.traverse=function(t,n){t.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(t,n){n?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,n){n=n||!1;for(var a=0;a<t.length;a++)this.addDisplayable(t[a],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var n=this._cursor;n<this._displayables.length;n++)t&&t(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)t&&t(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var n=this._displayables[t];n.parent=this,n.update(),n.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var n=this._temporaryDisplayables[t];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Ie(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var a=this._displayables[n],i=a.getBoundingRect().clone();a.needLocalTransform()&&i.applyTransform(a.getLocalTransform(aae)),t.union(i)}this._rect=t}return this._rect},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(i.contain(a[0],a[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(t,n))return!0}return!1},e})(Oa),nH=Je();function Kh(r,e,t,n,a){var i;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();i=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,c=void 0,f=void 0;n?(u=Ce(n.duration,200),c=Ce(n.easing,"cubicOut"),f=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),f=e.getShallow(l?"animationDelayUpdate":"animationDelay")),i&&(i.duration!=null&&(u=i.duration),i.easing!=null&&(c=i.easing),i.delay!=null&&(f=i.delay)),Ae(f)&&(f=f(t,a)),Ae(u)&&(u=u(t));var d={duration:u||0,delay:f,easing:c};return d}else return null}function ZM(r,e,t,n,a,i,o){var s=!1,l;Ae(a)?(o=i,i=a,a=null):Re(a)&&(i=a.cb,o=a.during,s=a.isFrom,l=a.removeOpt,a=a.dataIndex);var u=r==="leave";u||e.stopAnimation("leave");var c=Kh(r,n,a,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,a):null);if(c&&c.duration>0){var f=c.duration,d=c.delay,v=c.easing,g={duration:f,delay:d||0,easing:v,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,g):e.animateTo(t,g)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),i&&i()}function lt(r,e,t,n,a,i){ZM("update",r,e,t,n,a,i)}function jt(r,e,t,n,a,i){ZM("enter",r,e,t,n,a,i)}function sh(r){if(!r.__zr)return!0;for(var e=0;e<r.animators.length;e++){var t=r.animators[e];if(t.scope==="leave")return!0}return!1}function _l(r,e,t,n,a,i){sh(r)||ZM("leave",r,e,t,n,a,i)}function oP(r,e,t,n){r.removeTextContent(),r.removeTextGuideLine(),_l(r,{style:{opacity:0}},e,t,n)}function Ho(r,e,t){function n(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(a){a.isGroup||oP(a,e,t,n)}):oP(r,e,t,n)}function Pa(r){nH(r).oldStyle=r.style}function iae(r){return nH(r).oldStyle}var SC={},Ve=["x","y"],vr=["width","height"];function aH(r){return tt.extend(r)}var oae=Vne;function iH(r,e){return oae(r,e)}function ja(r,e){SC[r]=e}function Qp(r){if(SC.hasOwnProperty(r))return SC[r]}function Lh(r,e,t,n){var a=K6(r,e);return t&&(n==="center"&&(t=oH(t,a.getBoundingRect())),KM(a,t)),a}function $M(r,e,t){var n=new kr({style:{image:r,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(a){if(t==="center"){var i={width:a.width,height:a.height};n.setStyle(oH(e,i))}}});return n}function oH(r,e){var t=e.width/e.height,n=r.height*t,a;n<=r.width?a=r.height:(n=r.width,a=n/t);var i=r.x+r.width/2,o=r.y+r.height/2;return{x:i-n/2,y:o-a/2,width:n,height:a}}var ea=Gne;function KM(r,e){if(r.applyTransform){var t=r.getBoundingRect(),n=t.calculateTransform(e);r.applyTransform(n)}}function Rh(r,e){return q1(r,r,{lineWidth:e}),r}function sae(r,e){return O6(r,r,e),r}var W0=aa;function dl(r,e){for(var t=Ig([]);r&&r!==e;)Qa(t,r.getLocalTransform(),t),r=r.parent;return t}function ei(r,e,t){return e&&!en(e)&&(e=zo.getLocalTransform(e)),t&&(e=Ia([],e)),Qt([],r,e)}function K1(r,e,t){var n=e[4]===0||e[5]===0||e[0]===0?1:Oi(2*e[4]/e[0]),a=e[4]===0||e[5]===0||e[2]===0?1:Oi(2*e[4]/e[2]),i=[r==="left"?-n:r==="right"?n:0,r==="top"?-a:r==="bottom"?a:0];return i=ei(i,e,t),Oi(i[0])>Oi(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function sP(r){return!r.isGroup}function lae(r){return r.shape!=null}function Gg(r,e,t){if(!r||!e)return;function n(o){var s={};return o.traverse(function(l){sP(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return lae(o)&&(s.shape=Me(o.shape)),s}var i=n(r);e.traverse(function(o){if(sP(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),lt(o,l,t,Pe(o).dataIndex)}}})}function QM(r,e){return fe(r,function(t){var n=t[0];n=or(n,e.x),n=oa(n,e.x+e.width);var a=t[1];return a=or(a,e.y),a=oa(a,e.y+e.height),[n,a]})}function sH(r,e){var t=or(r.x,e.x),n=oa(r.x+r.width,e.x+e.width),a=or(r.y,e.y),i=oa(r.y+r.height,e.y+e.height);if(n>=t&&i>=a)return{x:t,y:a,width:n-t,height:i-a}}function Qh(r,e,t){var n=ie({rectHover:!0},e),a=n.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),Le(a,t),new kr(n)):Lh(r.replace("path://",""),n,t,"center")}function lp(r,e,t,n,a){for(var i=0,o=a[a.length-1];i<a.length;i++){var s=a[i];if(lH(r,e,t,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function lH(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,d=Tw(c,f,l,u);if(uae(d))return!1;var v=r-a,g=e-i,x=Tw(v,g,l,u)/d;if(x<0||x>1)return!1;var y=Tw(v,g,c,f)/d;return!(y<0||y>1)}function Tw(r,e,t,n){return r*n-t*e}function uae(r){return r<=1e-6&&r>=-1e-6}function hc(r,e,t,n,a){return e==null||(st(e)?Wt[0]=Wt[1]=Wt[2]=Wt[3]=e:(Wt[0]=e[0],Wt[1]=e[1],Wt[2]=e[2],Wt[3]=e[3]),n&&(Wt[0]=or(0,Wt[0]),Wt[1]=or(0,Wt[1]),Wt[2]=or(0,Wt[2]),Wt[3]=or(0,Wt[3])),t&&(Wt[0]=-Wt[0],Wt[1]=-Wt[1],Wt[2]=-Wt[2],Wt[3]=-Wt[3]),lP(r,Wt,"x","width",3,1,a&&a[0]||0),lP(r,Wt,"y","height",0,2,a&&a[1]||0)),r}var Wt=[0,0,0,0];function lP(r,e,t,n,a,i,o){var s=e[i]+e[a],l=r[n];r[n]+=s,o=or(0,oa(o,l)),r[n]<o?(r[n]=o,r[t]+=e[a]>=0?-e[a]:e[i]>=0?l+e[i]:Oi(s)>1e-8?(l-o)*e[a]/s:0):r[t]-=e[a]}function is(r){var e=r.itemTooltipOption,t=r.componentModel,n=r.itemName,a=ye(e)?{formatter:e}:e,i=t.mainType,o=t.componentIndex,s={componentType:i,name:n,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&O(it(l),function(c){_e(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Pe(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:Le({content:n,encodeHTMLContent:!0,formatterParams:s},a)}}function wC(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function Nl(r,e){if(r)if(ce(r))for(var t=0;t<r.length;t++)wC(r[t],e);else wC(r,e)}function JM(r){return!r||Oi(r[1])<zy&&Oi(r[2])<zy||Oi(r[0])<zy&&Oi(r[3])<zy}var zy=1e-5;function Jp(r,e){return r?Ie.copy(r,e):e.clone()}function eD(r,e){return e?Og(r||Dr(),e):void 0}function dc(r){return{z:r.get("z")||0,zlevel:r.get("zlevel")||0}}function uH(r){var e=-1/0,t=1/0;wC(r,function(i){n(i),n(i.getTextContent()),n(i.getTextGuideLine())});function n(i){if(!(!i||i.isGroup)){var o=i.currentStates;if(o.length)for(var s=0;s<o.length;s++)a(i.states[o[s]]);a(i)}}function a(i){if(i){var o=i.z2;o>e&&(e=o),o<t&&(t=o)}}return t>e&&(t=e=0),{min:t,max:e}}function Q1(r,e,t){cH(r,e,t,-1/0)}function cH(r,e,t,n){if(r.ignoreModelZ)return n;var a=r.getTextContent(),i=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l<s.length;l++)n=or(cH(s[l],e,t,n),n);else r.z=e,r.zlevel=t,n=or(r.z2||0,n);if(a&&(a.z=e,a.zlevel=t,isFinite(n)&&(a.z2=n+2)),i){var u=r.textGuideLineConfig;i.z=e,i.zlevel=t,isFinite(n)&&(i.z2=n+(u&&u.showAbove?1:-1))}return n}ja("circle",eo);ja("ellipse",jg);ja("sector",rn);ja("ring",Zh);ja("polygon",nn);ja("polyline",Fr);ja("rect",qe);ja("line",lr);ja("bezierCurve",$h);ja("arc",Bg);const _c=Object.freeze(Object.defineProperty({__proto__:null,Arc:Bg,BezierCurve:$h,BoundingRect:Ie,Circle:eo,CompoundPath:Vg,Ellipse:jg,Group:De,Image:kr,IncrementalDisplayable:rH,Line:lr,LinearGradient:bc,OrientedBoundingRect:tH,Path:tt,Point:ke,Polygon:nn,Polyline:Fr,RadialGradient:qM,Rect:qe,Ring:Zh,Sector:rn,Text:ot,WH:vr,XY:Ve,applyTransform:ei,calcZ2Range:uH,clipPointsByRect:QM,clipRectByRect:sH,createIcon:Qh,ensureCopyRect:Jp,ensureCopyTransform:eD,expandOrShrinkRect:hc,extendPath:iH,extendShape:aH,getShapeClass:Qp,getTransform:dl,groupTransition:Gg,initProps:jt,isBoundingRectAxisAligned:JM,isElementRemoved:sh,lineLineIntersect:lH,linePolygonIntersect:lp,makeImage:$M,makePath:Lh,mergePath:ea,registerShape:ja,removeElement:_l,removeElementWithFadeOut:Ho,resizePath:KM,retrieveZInfo:dc,setTooltipConfig:is,subPixelOptimize:W0,subPixelOptimizeLine:Rh,subPixelOptimizeRect:sae,transformDirection:K1,traverseElements:Nl,traverseUpdateZ:Q1,updateProps:lt},Symbol.toStringTag,{value:"Module"}));var J1={};function fH(r,e){for(var t=0;t<Tn.length;t++){var n=Tn[t],a=e[n],i=r.ensureState(n);i.style=i.style||{},i.style.text=a}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:e.normal}),r.useStates(o,!0)}function TC(r,e,t){var n=r.labelFetcher,a=r.labelDataIndex,i=r.labelDimIndex,o=e.normal,s;n&&(s=n.getFormattedLabel(a,"normal",null,i,o&&o.get("formatter"),t!=null?{interpolatedValue:t}:null)),s==null&&(s=Ae(r.defaultText)?r.defaultText(a,r,t):r.defaultText);for(var l={normal:s},u=0;u<Tn.length;u++){var c=Tn[u],f=e[c];l[c]=Ce(n?n.getFormattedLabel(a,c,null,i,f&&f.get("formatter")):null,s)}return l}function Lr(r,e,t,n){t=t||J1;for(var a=r instanceof ot,i=!1,o=0;o<$p.length;o++){var s=e[$p[o]];if(s&&s.getShallow("show")){i=!0;break}}var l=a?r:r.getTextContent();if(i){a||(l||(l=new ot,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=TC(t,e),c=e.normal,f=!!c.getShallow("show"),d=Nt(c,n&&n.normal,t,!1,!a);d.text=u.normal,a||r.setTextConfig(Ex(c,t,!1));for(var o=0;o<Tn.length;o++){var v=Tn[o],s=e[v];if(s){var g=l.ensureState(v),x=!!Ce(s.getShallow("show"),f);if(x!==f&&(g.ignore=!x),g.style=Nt(s,n&&n[v],t,!0,!a),g.style.text=u[v],!a){var y=r.ensureState(v);y.textConfig=Ex(s,t,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(d.x=l.style.x),l.style.y!=null&&(d.y=l.style.y),l.ignore=!f,l.useStyle(d),l.dirty(),t.enableTextSetter&&(Jh(l).setLabelText=function(b){var w=TC(t,e,b);fH(l,w)})}else l&&(l.ignore=!0);r.dirty()}function Sr(r,e){e=e||"label";for(var t={normal:r.getModel(e)},n=0;n<Tn.length;n++){var a=Tn[n];t[a]=r.getModel([a,e])}return t}function Nt(r,e,t,n,a){var i={};return cae(i,r,t,n,a),e&&ie(i,e),i}function Ex(r,e,t){e=e||{};var n={},a,i=r.getShallow("rotate"),o=Ce(r.getShallow("distance"),t?null:5),s=r.getShallow("offset");return a=r.getShallow("position")||(t?null:"inside"),a==="outside"&&(a=e.defaultOutsidePosition||"top"),a!=null&&(n.position=a),s!=null&&(n.offset=s),i!=null&&(i*=Math.PI/180,n.rotation=i),o!=null&&(n.distance=o),n.outsideFill=r.get("color")==="inherit"?e.inheritColor||null:"auto",e.autoOverflowArea!=null&&(n.autoOverflowArea=e.autoOverflowArea),e.layoutRect!=null&&(n.layoutRect=e.layoutRect),n}function cae(r,e,t,n,a){t=t||J1;var i=e.ecModel,o=i&&i.option.textStyle,s=fae(e),l;if(s){l={};var u="richInheritPlainLabel",c=Ce(e.get(u),i?i.get(u):void 0);for(var f in s)if(s.hasOwnProperty(f)){var d=e.getModel(["rich",f]);hP(l[f]={},d,o,e,c,t,n,a,!1,!0)}}l&&(r.rich=l);var v=e.get("overflow");v&&(r.overflow=v);var g=e.get("lineOverflow");g&&(r.lineOverflow=g);var x=r,y=e.get("minMargin");if(y!=null)y=st(y)?y/2:0,x.margin=[y,y,y,y],x.__marginType=Kf.minMargin;else{var b=e.get("textMargin");b!=null&&(x.margin=Eg(b),x.__marginType=Kf.textMargin)}hP(r,e,o,null,null,t,n,a,!0,!1)}function fae(r){for(var e;r&&r!==r.ecModel;){var t=(r.option||J1).rich;if(t){e=e||{};for(var n=it(t),a=0;a<n.length;a++){var i=n[a];e[i]=1}}r=r.parentModel}return e}var uP=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],cP=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],fP=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function hP(r,e,t,n,a,i,o,s,l,u){t=!o&&t||J1;var c=i&&i.inheritColor,f=e.getShallow("color"),d=e.getShallow("textBorderColor"),v=Ce(e.getShallow("opacity"),t.opacity);(f==="inherit"||f==="auto")&&(c?f=c:f=null),(d==="inherit"||d==="auto")&&(c?d=c:d=null),s||(f=f||t.color,d=d||t.textBorderColor),f!=null&&(r.fill=f),d!=null&&(r.stroke=d);var g=Ce(e.getShallow("textBorderWidth"),t.textBorderWidth);g!=null&&(r.lineWidth=g);var x=Ce(e.getShallow("textBorderType"),t.textBorderType);x!=null&&(r.lineDash=x);var y=Ce(e.getShallow("textBorderDashOffset"),t.textBorderDashOffset);y!=null&&(r.lineDashOffset=y),!o&&v==null&&!u&&(v=i&&i.defaultOpacity),v!=null&&(r.opacity=v),!o&&!s&&r.fill==null&&i.inheritColor&&(r.fill=i.inheritColor);for(var b=0;b<uP.length;b++){var w=uP[b],T=a!==!1&&n?zn(e.getShallow(w),n.getShallow(w),t[w]):Ce(e.getShallow(w),t[w]);T!=null&&(r[w]=T)}for(var b=0;b<cP.length;b++){var w=cP[b],T=e.getShallow(w);T!=null&&(r[w]=T)}if(r.verticalAlign==null){var C=e.getShallow("baseline");C!=null&&(r.verticalAlign=C)}if(!l||!i.disableBox){for(var b=0;b<fP.length;b++){var w=fP[b],T=e.getShallow(w);T!=null&&(r[w]=T)}var D=e.getShallow("borderType");D!=null&&(r.borderDash=D),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&c&&(r.backgroundColor=c),(r.borderColor==="auto"||r.borderColor==="inherit")&&c&&(r.borderColor=c)}}function tD(r,e){var t=e&&e.getModel("textStyle");return ta([r.fontStyle||t&&t.getShallow("fontStyle")||"",r.fontWeight||t&&t.getShallow("fontWeight")||"",(r.fontSize||t&&t.getShallow("fontSize")||12)+"px",r.fontFamily||t&&t.getShallow("fontFamily")||"sans-serif"].join(" "))}var Jh=Je();function hH(r,e,t,n){if(r){var a=Jh(r);a.prevValue=a.value,a.value=t;var i=e.normal;a.valueAnimation=i.get("valueAnimation"),a.valueAnimation&&(a.precision=i.get("precision"),a.defaultInterpolatedText=n,a.statesModels=e)}}function dH(r,e,t,n,a){var i=Jh(r);if(!i.valueAnimation||i.prevValue===i.value)return;var o=i.defaultInterpolatedText,s=Ce(i.interpolatedValue,i.prevValue),l=i.value;function u(c){var f=C6(t,i.precision,s,l,c);i.interpolatedValue=c===1?null:f;var d=TC({labelDataIndex:e,labelFetcher:a,defaultText:o?o(f):f+""},i.statesModels,f);fH(r,d)}r.percent=0,(i.prevValue==null?jt:lt)(r,{percent:1},n,e,null,u)}var Kf={minMargin:1,textMargin:2},hae=["textStyle","color"],Cw=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Aw=new ot,dae=(function(){function r(){}return r.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(hae):null)},r.prototype.getFont=function(){return tD({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<Cw.length;n++)t[Cw[n]]=this.getShallow(Cw[n]);return Aw.useStyle(t),Aw.update(),Aw.getBoundingRect()},r})(),vH=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],vae=cc(vH),pae=(function(){function r(){}return r.prototype.getLineStyle=function(e){return vae(this,e)},r})(),pH=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],gae=cc(pH),mae=(function(){function r(){}return r.prototype.getItemStyle=function(e,t){return gae(this,e,t)},r})(),et=(function(){function r(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return r.prototype.init=function(e,t,n){},r.prototype.mergeOption=function(e,t){Ye(this.option,e,!0)},r.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},r.prototype.getShallow=function(e,t){var n=this.option,a=n==null?n:n[e];if(a==null&&!t){var i=this.parentModel;i&&(a=i.getShallow(e))}return a},r.prototype.getModel=function(e,t){var n=e!=null,a=n?this.parsePath(e):null,i=n?this._doGet(a):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(a)),new r(i,t,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var e=this.constructor;return new e(Me(this.option))},r.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},r.prototype.resolveParentPath=function(e){return e},r.prototype.isAnimationEnabled=function(){if(!nt.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var a=0;a<e.length&&!(e[a]&&(n=n&&typeof n=="object"?n[e[a]]:null,n==null));a++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},r})();jM(et);Dre(et);Jt(et,pae);Jt(et,mae);Jt(et,kre);Jt(et,dae);var yae=Math.round(Math.random()*10);function ed(r){return[r||"",yae++].join("_")}function xae(r){var e={};r.registerSubTypeDefaulter=function(t,n){var a=Pi(t);e[a.main]=n},r.determineSubType=function(t,n){var a=n.type;if(!a){var i=Pi(t).main;r.hasSubTypes(t)&&e[i]&&(a=e[i](n))}return a}}function bae(r,e){r.topologicalTravel=function(i,o,s,l){if(!i.length)return;var u=t(o),c=u.graph,f=u.noEntryList,d={};for(O(i,function(w){d[w]=!0});f.length;){var v=f.pop(),g=c[v],x=!!d[v];x&&(s.call(l,v,g.originalDeps.slice()),delete d[v]),O(g.successor,x?b:y)}O(d,function(){var w="";throw new Error(w)});function y(w){c[w].entryCount--,c[w].entryCount===0&&f.push(w)}function b(w){d[w]=!0,y(w)}};function t(i){var o={},s=[];return O(i,function(l){var u=n(o,l),c=u.originalDeps=e(l),f=a(c,i);u.entryCount=f.length,u.entryCount===0&&s.push(l),O(f,function(d){Fe(u.predecessor,d)<0&&u.predecessor.push(d);var v=n(o,d);Fe(v.successor,d)<0&&v.successor.push(l)})}),{graph:o,noEntryList:s}}function n(i,o){return i[o]||(i[o]={predecessor:[],successor:[]}),i[o]}function a(i,o){var s=[];return O(i,function(l){Fe(o,l)>=0&&s.push(l)}),s}}function Ll(r,e){return Ye(Ye({},r,!0),e,!0)}const _ae={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:". "}}}},Sae={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 kx="ZH",rD="EN",lh=rD,X0={},nD={},gH=nt.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||lh).toUpperCase();return r.indexOf(kx)>-1?kx:lh})():lh;function aD(r,e){r=r.toUpperCase(),nD[r]=new et(e),X0[r]=e}function wae(r){if(ye(r)){var e=X0[r.toUpperCase()]||{};return r===kx||r===rD?Me(e):Ye(Me(e),Me(X0[lh]),!1)}else return Ye(Me(r),Me(X0[lh]),!1)}function CC(r){return nD[r]}function Tae(){return nD[lh]}aD(rD,_ae);aD(kx,Sae);var AC=null;function Cae(r){AC||(AC=r)}function dr(){return AC}var iD=1e3,oD=iD*60,Dp=oD*60,La=Dp*24,dP=La*365,Aae={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})/},q0={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},Mae="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",jy="{yyyy}-{MM}-{dd}",vP={year:"{yyyy}",month:"{yyyy}-{MM}",day:jy,hour:jy+" "+q0.hour,minute:jy+" "+q0.minute,second:jy+" "+q0.second,millisecond:Mae},Zn=["year","month","day","hour","minute","second","millisecond"],Dae=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Nae(r){return!ye(r)&&!Ae(r)?Lae(r):r}function Lae(r){r=r||{};var e={},t=!0;return O(Zn,function(n){t&&(t=r[n]==null)}),O(Zn,function(n,a){var i=r[n];e[n]={};for(var o=null,s=a;s>=0;s--){var l=Zn[s],u=Re(i)&&!ce(i)?i[l]:i,c=void 0;ce(u)?(c=u.slice(),o=c[0]||""):ye(u)?(o=u,c=[o]):(o==null?o=q0[n]:Aae[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],t&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function xn(r,e){return r+="","0000".substr(0,e-r.length)+r}function Np(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function Rae(r){return r===Np(r)}function Eae(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Hg(r,e,t,n){var a=Ji(r),i=a[mH(t)](),o=a[sD(t)]()+1,s=Math.floor((o-1)/3)+1,l=a[lD(t)](),u=a["get"+(t?"UTC":"")+"Day"](),c=a[uD(t)](),f=(c-1)%12+1,d=a[cD(t)](),v=a[fD(t)](),g=a[hD(t)](),x=c>=12?"pm":"am",y=x.toUpperCase(),b=n instanceof et?n:CC(n||gH)||Tae(),w=b.getModel("time"),T=w.get("month"),C=w.get("monthAbbr"),D=w.get("dayOfWeek"),M=w.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,x+"").replace(/{A}/g,y+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,xn(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,T[o-1]).replace(/{MMM}/g,C[o-1]).replace(/{MM}/g,xn(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,xn(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,D[u]).replace(/{ee}/g,M[u]).replace(/{e}/g,u+"").replace(/{HH}/g,xn(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,xn(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,xn(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,xn(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,xn(g,3)).replace(/{S}/g,g+"")}function kae(r,e,t,n,a){var i=null;if(ye(t))i=t;else if(Ae(t)){var o={time:r.time,level:r.time.level},s=dr();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),i=t(r.value,e,o)}else{var l=r.time;if(l){var u=t[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var c=Qf(r.value,a);i=t[c][c][0]}}return Hg(new Date(r.value),i,a,n)}function Qf(r,e){var t=Ji(r),n=t[sD(e)]()+1,a=t[lD(e)](),i=t[uD(e)](),o=t[cD(e)](),s=t[fD(e)](),l=t[hD(e)](),u=l===0,c=u&&s===0,f=c&&o===0,d=f&&i===0,v=d&&a===1,g=v&&n===1;return g?"year":v?"month":d?"day":f?"hour":c?"minute":u?"second":"millisecond"}function Ix(r,e,t){switch(e){case"year":r[yH(t)](0);case"month":r[xH(t)](1);case"day":r[bH(t)](0);case"hour":r[_H(t)](0);case"minute":r[SH(t)](0);case"second":r[wH(t)](0)}return r}function mH(r){return r?"getUTCFullYear":"getFullYear"}function sD(r){return r?"getUTCMonth":"getMonth"}function lD(r){return r?"getUTCDate":"getDate"}function uD(r){return r?"getUTCHours":"getHours"}function cD(r){return r?"getUTCMinutes":"getMinutes"}function fD(r){return r?"getUTCSeconds":"getSeconds"}function hD(r){return r?"getUTCMilliseconds":"getMilliseconds"}function Iae(r){return r?"setUTCFullYear":"setFullYear"}function yH(r){return r?"setUTCMonth":"setMonth"}function xH(r){return r?"setUTCDate":"setDate"}function bH(r){return r?"setUTCHours":"setHours"}function _H(r){return r?"setUTCMinutes":"setMinutes"}function SH(r){return r?"setUTCSeconds":"setSeconds"}function wH(r){return r?"setUTCMilliseconds":"setMilliseconds"}function Oae(r,e,t,n,a,i,o,s){var l=new ot({style:{text:r,font:e,align:t,verticalAlign:n,padding:a,rich:i,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function dD(r){if(!OM(r))return ye(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function vD(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,n){return n.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var td=Eg;function MC(r,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(c){return c&&ta(c)?c:"-"}function i(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Ji(r):r;if(isNaN(+l)){if(s)return"-"}else return Hg(l,n,t)}if(e==="ordinal")return dx(r)?a(r):st(r)&&i(r)?r+"":"-";var u=Xi(r);return i(u)?dD(u):dx(r)?a(r):typeof r=="boolean"?r+"":"-"}var pP=["a","b","c","d","e","f","g"],Mw=function(r,e){return"{"+r+(e??"")+"}"};function pD(r,e,t){ce(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],i=0;i<a.length;i++){var o=pP[i];r=r.replace(Mw(o),Mw(o,0))}for(var s=0;s<n;s++)for(var l=0;l<a.length;l++){var u=e[s][a[l]];r=r.replace(Mw(pP[l],s),t?hn(u):u)}return r}function Pae(r,e,t){return O(e,function(n,a){r=r.replace("{"+a+"}",n)}),r}function TH(r,e){var t=ye(r)?{color:r,extraCssText:e}:r||{},n=t.color,a=t.type;e=t.extraCssText;var i=t.renderMode||"html";if(!n)return"";if(i==="html")return a==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+hn(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+hn(n)+";"+(e||"")+'"></span>';var o=t.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function zae(r,e,t){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd
261
- yyyy`);var n=Ji(e),a=t?"getUTC":"get",i=n[a+"FullYear"](),o=n[a+"Month"]()+1,s=n[a+"Date"](),l=n[a+"Hours"](),u=n[a+"Minutes"](),c=n[a+"Seconds"](),f=n[a+"Milliseconds"]();return r=r.replace("MM",xn(o,2)).replace("M",o).replace("yyyy",i).replace("yy",xn(i%100+"",2)).replace("dd",xn(s,2)).replace("d",s).replace("hh",xn(l,2)).replace("h",l).replace("mm",xn(u,2)).replace("m",u).replace("ss",xn(c,2)).replace("s",c).replace("SSS",xn(f,3)),r}function jae(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function vc(r,e){return e=e||"transparent",ye(r)?r:Re(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function Ox(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Z0={},Dw={},rd=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Z0),this._normalMasterList=n(Dw);function n(a,i){var o=[];return O(a,function(s,l){var u=s.create(e,t);o=o.concat(u||[])}),o}},r.prototype.update=function(e,t){O(this._normalMasterList,function(n){n.update&&n.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(e,t){if(e==="matrix"||e==="calendar"){Z0[e]=t;return}Dw[e]=t},r.get=function(e){return Dw[e]||Z0[e]},r})();function Bae(r){return!!Z0[r]}var DC={coord:1,coord2:2};function Vae(r){CH.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var CH=Te();function Gae(r){var e=r.getShallow("coord",!0),t=DC.coord;if(e==null){var n=CH.get(r.type);n&&n.getCoord2&&(t=DC.coord2,e=n.getCoord2(r))}return{coord:e,from:t}}var Ri={none:0,dataCoordSys:1,boxCoordSys:2};function AH(r,e){var t=r.getShallow("coordinateSystem"),n=r.getShallow("coordinateSystemUsage",!0),a=Ri.none;if(t){var i=r.mainType==="series";n==null&&(n=i?"data":"box"),n==="data"?(a=Ri.dataCoordSys,i||(a=Ri.none)):n==="box"&&(a=Ri.boxCoordSys,!i&&!Bae(t)&&(a=Ri.none))}return{coordSysType:t,kind:a}}function Fg(r){var e=r.targetModel,t=r.coordSysType,n=r.coordSysProvider,a=r.isDefaultDataCoordSys;r.allowNotFound;var i=AH(e),o=i.kind,s=i.coordSysType;if(a&&o!==Ri.dataCoordSys&&(o=Ri.dataCoordSys,s=t),o===Ri.none||s!==t)return!1;var l=n(t,e);return l?(o===Ri.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var MH=function(r,e){var t=e.getReferringComponents(r,Zt).models[0];return t&&t.coordinateSystem},$0=O,DH=["left","right","top","bottom","width","height"],Bu=[["width","left","right"],["height","top","bottom"]];function gD(r,e,t,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),d=f&&f.getBoundingRect(),v,g;if(r==="horizontal"){var x=c.width+(d?-d.x+c.x:0);v=i+x,v>n||l.newline?(i=0,v=x,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var y=c.height+(d?-d.y+c.y:0);g=o+y,g>a||l.newline?(i+=s+t,o=0,g=y,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=v+t:o=g+t)})}var tc=gD;He(gD,"vertical");He(gD,"horizontal");function NH(r,e){return{left:r.getShallow("left",e),top:r.getShallow("top",e),right:r.getShallow("right",e),bottom:r.getShallow("bottom",e),width:r.getShallow("width",e),height:r.getShallow("height",e)}}function Hae(r,e){var t=wr(r,e,{enableLayoutOnlyByCenter:!0}),n=r.getBoxLayoutParams(),a,i;if(t.type===up.point)i=t.refPoint,a=Ht(n,{width:e.getWidth(),height:e.getHeight()});else{var o=r.get("center"),s=ce(o)?o:[o,o];a=Ht(n,t.refContainer),i=t.boxCoordFrom===DC.coord2?t.refPoint:[me(s[0],a.width)+a.x,me(s[1],a.height)+a.y]}return{viewRect:a,center:i}}function LH(r,e){var t=Hae(r,e),n=t.viewRect,a=t.center,i=r.get("radius");ce(i)||(i=[0,i]);var o=me(n.width,e.getWidth()),s=me(n.height,e.getHeight()),l=Math.min(o,s),u=me(i[0],l/2),c=me(i[1],l/2);return{cx:a[0],cy:a[1],r0:u,r:c,viewRect:n}}function Ht(r,e,t){t=td(t||0);var n=e.width,a=e.height,i=me(r.left,n),o=me(r.top,a),s=me(r.right,n),l=me(r.bottom,a),u=me(r.width,n),c=me(r.height,a),f=t[2]+t[0],d=t[1]+t[3],v=r.aspect;switch(isNaN(u)&&(u=n-s-d-i),isNaN(c)&&(c=a-l-f-o),v!=null&&(isNaN(u)&&isNaN(c)&&(v>n/a?u=n*.8:c=a*.8),isNaN(u)&&(u=v*c),isNaN(c)&&(c=u/v)),isNaN(i)&&(i=n-s-u-d),isNaN(o)&&(o=a-l-c-f),r.left||r.right){case"center":i=n/2-u/2-t[3];break;case"right":i=n-u-d;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-c/2-t[0];break;case"bottom":o=a-c-f;break}i=i||0,o=o||0,isNaN(u)&&(u=n-d-i-(s||0)),isNaN(c)&&(c=a-f-o-(l||0));var g=new Ie((e.x||0)+i+t[3],(e.y||0)+o+t[0],u,c);return g.margin=t,g}function RH(r,e,t){var n=r.getShallow("preserveAspect",!0);if(!n)return e;var a=e.width/e.height;if(Math.abs(Math.atan(t)-Math.atan(a))<1e-9)return e;var i=r.getShallow("preserveAspectAlign",!0),o=r.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=n==="cover";return a>t&&!l||a<t&&l?(s.width=e.height*t,i==="left"?s.left=0:i==="right"?s.right=0:s.left="center"):(s.height=e.width/t,o==="top"?s.top=0:o==="bottom"?s.bottom=0:s.top="middle"),Ht(s,e)}var up={rect:1,point:2};function wr(r,e,t){var n,a,i,o=r.boxCoordinateSystem,s;if(o){var l=Gae(r),u=l.coord,c=l.from;if(o.dataToLayout){i=up.rect,s=c;var f=o.dataToLayout(u);n=f.contentRect||f.rect}else t&&t.enableLayoutOnlyByCenter&&o.dataToPoint&&(i=up.point,s=c,a=o.dataToPoint(u))}return i==null&&(i=up.rect),i===up.rect&&(n||(n={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),a=[n.x+n.width/2,n.y+n.height/2]),{type:i,refContainer:n,refPoint:a,boxCoordFrom:s}}function eb(r,e,t,n,a,i){var o=!a||!a.hv||a.hv[0],s=!a||!a.hv||a.hv[1],l=a&&a.boundingMode||"all";if(i=i||r,i.x=r.x,i.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new Ie(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var f=Ht(Le({width:u.width,height:u.height},e),t,n),d=o?f.x-u.x:0,v=s?f.y-u.y:0;return l==="raw"?(i.x=d,i.y=v):(i.x+=d,i.y+=v),i===r&&r.markRedraw(),!0}function Fae(r,e){return r[Bu[e][0]]!=null||r[Bu[e][1]]!=null&&r[Bu[e][2]]!=null}function eg(r){var e=r.layoutMode||r.constructor.layoutMode;return Re(e)?e:e?{type:e}:null}function Zi(r,e,t){var n=t&&t.ignoreSize;!ce(n)&&(n=[n,n]);var a=o(Bu[0],0),i=o(Bu[1],1);l(Bu[0],r,a),l(Bu[1],r,i);function o(u,c){var f={},d=0,v={},g=0,x=2;if($0(u,function(w){v[w]=r[w]}),$0(u,function(w){_e(e,w)&&(f[w]=v[w]=e[w]),s(f,w)&&d++,s(v,w)&&g++}),n[c])return s(e,u[1])?v[u[2]]=null:s(e,u[2])&&(v[u[1]]=null),v;if(g===x||!d)return v;if(d>=x)return f;for(var y=0;y<u.length;y++){var b=u[y];if(!_e(f,b)&&_e(r,b)){f[b]=r[b];break}}return f}function s(u,c){return u[c]!=null&&u[c]!=="auto"}function l(u,c,f){$0(u,function(d){c[d]=f[d]})}}function Sc(r){return EH({},r)}function EH(r,e){return e&&r&&$0(DH,function(t){_e(e,t)&&(r[t]=e[t])}),r}var Uae=Je(),Qe=(function(r){K(e,r);function e(t,n,a){var i=r.call(this,t,n,a)||this;return i.uid=ed("ec_cpt_model"),i}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=eg(this),i=a?Sc(t):{},o=n.getTheme();Ye(t,o.get(this.mainType)),Ye(t,this.getDefaultOption()),a&&Zi(t,i,a)},e.prototype.mergeOption=function(t,n){Ye(this.option,t,!0);var a=eg(this);a&&Zi(this.option,t,a)},e.prototype.optionUpdated=function(t,n){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!Cre(t))return t.defaultOption;var n=Uae(this);if(!n.defaultOption){for(var a=[],i=t;i;){var o=i.prototype.defaultOption;o&&a.push(o),i=i.superClass}for(var s={},l=a.length-1;l>=0;l--)s=Ye(s,a[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var a=t+"Index",i=t+"Id";return Xh(this.ecModel,t,{index:this.get(a,!0),id:this.get(i,!0)},n)},e.prototype.getBoxLayoutParams=function(){return NH(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=(function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0})(),e})(et);M6(Qe,et);F1(Qe);xae(Qe);bae(Qe,Yae);function Yae(r){var e=[];return O(Qe.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=fe(e,function(t){return Pi(t).main}),r!=="dataset"&&Fe(e,"dataset")<=0&&e.unshift("dataset"),e}var ee={color:{},darkColor:{},size:{}},ar=ee.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)"};ie(ar,{primary:ar.neutral80,secondary:ar.neutral70,tertiary:ar.neutral60,quaternary:ar.neutral50,disabled:ar.neutral20,border:ar.neutral30,borderTint:ar.neutral20,borderShade:ar.neutral40,background:ar.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:ar.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:ar.neutral70,axisLineTint:ar.neutral40,axisTick:ar.neutral70,axisTickMinor:ar.neutral60,axisLabel:ar.neutral70,axisSplitLine:ar.neutral15,axisMinorSplitLine:ar.neutral05});for(var vu in ar)if(ar.hasOwnProperty(vu)){var gP=ar[vu];vu==="theme"?ee.darkColor.theme=ar.theme.slice():vu==="highlight"?ee.darkColor.highlight="rgba(255,231,130,0.4)":vu.indexOf("accent")===0?ee.darkColor[vu]=Go(gP,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):ee.darkColor[vu]=Go(gP,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}ee.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var kH="";typeof navigator<"u"&&(kH=navigator.platform||"");var wf="rgba(0, 0, 0, 0.2)",IH=ee.color.theme[0],Wae=Go(IH,null,null,.9);const Xae={darkMode:"auto",colorBy:"series",color:ee.color.theme,gradientColor:[Wae,IH],aria:{decal:{decals:[{color:wf,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:wf,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:wf,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:wf,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:wf,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:wf,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:kH.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 OH=Te(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),sa="original",Ur="arrayRows",la="objectRows",si="keyedColumns",vl="typedArray",PH="unknown",ti="column",wc="row",Zr={Must:1,Might:2,Not:3},zH=Je();function qae(r){zH(r).datasetMap=Te()}function jH(r,e,t){var n={},a=yD(e);if(!a||!r)return n;var i=[],o=[],s=e.ecModel,l=zH(s).datasetMap,u=a.uid+"_"+t.seriesLayoutBy,c,f;r=r.slice(),O(r,function(x,y){var b=Re(x)?x:r[y]={name:x};b.type==="ordinal"&&c==null&&(c=y,f=g(b)),n[b.name]=[]});var d=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});O(r,function(x,y){var b=x.name,w=g(x);if(c==null){var T=d.valueWayDim;v(n[b],T,w),v(o,T,w),d.valueWayDim+=w}else if(c===y)v(n[b],0,w),v(i,0,w);else{var T=d.categoryWayDim;v(n[b],T,w),v(o,T,w),d.categoryWayDim+=w}});function v(x,y,b){for(var w=0;w<b;w++)x.push(y+w)}function g(x){var y=x.dimsDef;return y?y.length:1}return i.length&&(n.itemName=i),o.length&&(n.seriesName=o),n}function mD(r,e,t){var n={},a=yD(r);if(!a)return n;var i=e.sourceFormat,o=e.dimensionsDefine,s;(i===la||i===si)&&O(o,function(c,f){(Re(c)?c.name:c)==="name"&&(s=f)});var l=(function(){for(var c={},f={},d=[],v=0,g=Math.min(5,t);v<g;v++){var x=VH(e.data,i,e.seriesLayoutBy,o,e.startIndex,v);d.push(x);var y=x===Zr.Not;if(y&&c.v==null&&v!==s&&(c.v=v),(c.n==null||c.n===c.v||!y&&d[c.n]===Zr.Not)&&(c.n=v),b(c)&&d[c.n]!==Zr.Not)return c;y||(x===Zr.Might&&f.v==null&&v!==s&&(f.v=v),(f.n==null||f.n===f.v)&&(f.n=v))}function b(w){return w.v!=null&&w.n!=null}return b(c)?c:b(f)?f:null})();if(l){n.value=[l.v];var u=s??l.n;n.itemName=[u],n.seriesName=[u]}return n}function yD(r){var e=r.get("data",!0);if(!e)return Xh(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},Zt).models[0]}function Zae(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:Xh(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},Zt).models}function BH(r,e){return VH(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,e)}function VH(r,e,t,n,a,i){var o,s=5;if(wn(r))return Zr.Not;var l,u;if(n){var c=n[i];Re(c)?(l=c.name,u=c.type):ye(c)&&(l=c)}if(u!=null)return u==="ordinal"?Zr.Must:Zr.Not;if(e===Ur){var f=r;if(t===wc){for(var d=f[i],v=0;v<(d||[]).length&&v<s;v++)if((o=C(d[a+v]))!=null)return o}else for(var v=0;v<f.length&&v<s;v++){var g=f[a+v];if(g&&(o=C(g[i]))!=null)return o}}else if(e===la){var x=r;if(!l)return Zr.Not;for(var v=0;v<x.length&&v<s;v++){var y=x[v];if(y&&(o=C(y[l]))!=null)return o}}else if(e===si){var b=r;if(!l)return Zr.Not;var d=b[l];if(!d||wn(d))return Zr.Not;for(var v=0;v<d.length&&v<s;v++)if((o=C(d[v]))!=null)return o}else if(e===sa)for(var w=r,v=0;v<w.length&&v<s;v++){var y=w[v],T=Wh(y);if(!ce(T))return Zr.Not;if((o=C(T[i]))!=null)return o}function C(D){var M=ye(D);if(D!=null&&Number.isFinite(Number(D))&&D!=="")return M?Zr.Might:Zr.Not;if(M&&D!=="-")return Zr.Must}return Zr.Not}var NC=Te();function $ae(r,e){tn(NC.get(r)==null&&e),NC.set(r,e)}function Kae(r,e,t){var n=NC.get(e);if(!n)return t;var a=n(r);return a?t.concat(a):t}var mP=Je(),Qae=Je(),xD=(function(){function r(){}return r.prototype.getColorFromPalette=function(e,t,n){var a=Lt(this.get("color",!0)),i=this.get("colorLayer",!0);return GH(this,mP,a,i,e,t,n)},r.prototype.clearColorPalette=function(){eie(this,mP)},r})();function LC(r,e,t,n){var a=Lt(r.get(["aria","decal","decals"]));return GH(r,Qae,a,null,e,t,n)}function Jae(r,e){for(var t=r.length,n=0;n<t;n++)if(r[n].length>e)return r[n];return r[t-1]}function GH(r,e,t,n,a,i,o){i=i||r;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var c=o==null||!n?t:Jae(n,o);if(c=c||t,!(!c||!c.length)){var f=c[l];return a&&(u[a]=f),s.paletteIdx=(l+1)%c.length,f}}function eie(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var By,Tv,yP,xP="\0_ec_inner",tie=1,bD=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,n,a,i,o,s){i=i||{},this.option=null,this._theme=new et(i),this._locale=new et(o),this._optionManager=s},e.prototype.setOption=function(t,n,a){var i=SP(n);this._optionManager.setOption(t,a,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,n){return this._resetOption(t,SP(n))},e.prototype._resetOption=function(t,n){var a=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");!this.option||t==="recreate"?yP(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,n))}if(!t||t==="recreate"||t==="media"){var l=i.getMediaOption(this);l.length&&O(l,function(u){a=!0,this._mergeOption(u,n)},this)}return a},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=Te(),u=n&&n.replaceMergeMainTypeMap;qae(this),O(t,function(f,d){f!=null&&(Qe.hasClass(d)?d&&(s.push(d),l.set(d,!0)):a[d]=a[d]==null?Me(f):Ye(a[d],f,!0))}),u&&u.each(function(f,d){Qe.hasClass(d)&&!l.get(d)&&(s.push(d),l.set(d,!0))}),Qe.topologicalTravel(s,Qe.getAllClassMainTypes(),c,this);function c(f){var d=Kae(this,f,Lt(t[f])),v=i.get(f),g=v?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",x=S6(v,d,g);gre(x,f,Qe),a[f]=null,i.set(f,null),o.set(f,0);var y=[],b=[],w=0,T;O(x,function(C,D){var M=C.existing,N=C.newOption;if(!N)M&&(M.mergeOption({},this),M.optionUpdated({},!1));else{var R=f==="series",E=Qe.getClass(f,C.keyInfo.subType,!R);if(!E)return;if(f==="tooltip"){if(T)return;T=!0}if(M&&M.constructor===E)M.name=C.keyInfo.name,M.mergeOption(N,this),M.optionUpdated(N,!1);else{var k=ie({componentIndex:D},C.keyInfo);M=new E(N,this,this,k),ie(M,k),C.brandNew&&(M.__requireNewView=!0),M.init(N,this,this),M.optionUpdated(null,!0)}}M?(y.push(M.option),b.push(M),w++):(y.push(void 0),b.push(void 0))},this),a[f]=y,i.set(f,b),o.set(f,w),f==="series"&&By(this)}this._seriesIndices||By(this)},e.prototype.getOption=function(){var t=Me(this.option);return O(t,function(n,a){if(Qe.hasClass(a)){for(var i=Lt(n),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!Zp(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[a]=i}}),delete t[xP],t},e.prototype.setTheme=function(t){this._theme=new et(t),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,n){var a=this._componentsMap.get(t);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o<a.length;o++)if(a[o])return a[o]}}},e.prototype.queryComponents=function(t){var n=t.mainType;if(!n)return[];var a=t.index,i=t.id,o=t.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return a!=null?(l=[],O(Lt(a),function(u){s[u]&&l.push(s[u])})):i!=null?l=bP("id",i,s):o!=null?l=bP("name",o,s):l=dt(s,function(u){return!!u}),_P(l,t)},e.prototype.findComponents=function(t){var n=t.query,a=t.mainType,i=s(n),o=i?this.queryComponents(i):dt(this._componentsMap.get(a),function(u){return!!u});return l(_P(o,t));function s(u){var c=a+"Index",f=a+"Id",d=a+"Name";return u&&(u[c]!=null||u[f]!=null||u[d]!=null)?{mainType:a,index:u[c],id:u[f],name:u[d]}:null}function l(u){return t.filter?dt(u,t.filter):u}},e.prototype.eachComponent=function(t,n,a){var i=this._componentsMap;if(Ae(t)){var o=n,s=t;i.each(function(f,d){for(var v=0;f&&v<f.length;v++){var g=f[v];g&&s.call(o,d,g,g.componentIndex)}})}else for(var l=ye(t)?i.get(t):Re(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(a,c,c.componentIndex)}},e.prototype.getSeriesByName=function(t){var n=xr(t,null);return dt(this._componentsMap.get("series"),function(a){return!!a&&n!=null&&a.name===n})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return dt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===t})},e.prototype.getSeries=function(){return dt(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,n){Tv(this),O(this._seriesIndices,function(a){var i=this._componentsMap.get("series")[a];t.call(n,i,a)},this)},e.prototype.eachRawSeries=function(t,n){O(this._componentsMap.get("series"),function(a){a&&t.call(n,a,a.componentIndex)})},e.prototype.eachSeriesByType=function(t,n,a){Tv(this),O(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];o.subType===t&&n.call(a,o,i)},this)},e.prototype.eachRawSeriesByType=function(t,n,a){return O(this.getSeriesByType(t),n,a)},e.prototype.isSeriesFiltered=function(t){return Tv(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,n){Tv(this);var a=[];O(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];t.call(n,o,i)&&a.push(i)},this),this._seriesIndices=a,this._seriesIndicesMap=Te(a)},e.prototype.restoreData=function(t){By(this);var n=this._componentsMap,a=[];n.each(function(i,o){Qe.hasClass(o)&&a.push(o)}),Qe.topologicalTravel(a,Qe.getAllClassMainTypes(),function(i){O(n.get(i),function(o){o&&(i!=="series"||!rie(o,t))&&o.restoreData()})})},e.internalField=(function(){By=function(t){var n=t._seriesIndices=[];O(t._componentsMap.get("series"),function(a){a&&n.push(a.componentIndex)}),t._seriesIndicesMap=Te(n)},Tv=function(t){},yP=function(t,n){t.option={},t.option[xP]=tie,t._componentsMap=Te({series:[]}),t._componentsCount=Te();var a=n.aria;Re(a)&&a.enabled==null&&(a.enabled=!0),nie(n,t._theme.option),Ye(n,Xae,!1),t._mergeOption(n,null)}})(),e})(et);function rie(r,e){if(e){var t=e.seriesIndex,n=e.seriesId,a=e.seriesName;return t!=null&&r.componentIndex!==t||n!=null&&r.id!==n||a!=null&&r.name!==a}}function nie(r,e){var t=r.color&&!r.colorLayer;O(e,function(n,a){a==="colorLayer"&&t||a==="color"&&r.color||Qe.hasClass(a)||(typeof n=="object"?r[a]=r[a]?Ye(r[a],n,!1):Me(n):r[a]==null&&(r[a]=n))})}function bP(r,e,t){if(ce(e)){var n=Te();return O(e,function(i){if(i!=null){var o=xr(i,null);o!=null&&n.set(i,!0)}}),dt(t,function(i){return i&&n.get(i[r])})}else{var a=xr(e,null);return dt(t,function(i){return i&&a!=null&&i[r]===a})}}function _P(r,e){return e.hasOwnProperty("subType")?dt(r,function(t){return t&&t.subType===e.subType}):r}function SP(r){var e=Te();return r&&O(Lt(r.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}Jt(bD,xD);var aie=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],HH=(function(){function r(e){O(aie,function(t){this[t]=xe(e[t],e)},this)}return r})(),iie=/^(min|max)?(.+)$/,oie=(function(){function r(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return r.prototype.setOption=function(e,t,n){e&&(O(Lt(e.series),function(o){o&&o.data&&wn(o.data)&&Hp(o.data)}),O(Lt(e.dataset),function(o){o&&o.source&&wn(o.source)&&Hp(o.source)})),e=Me(e);var a=this._optionBackup,i=sie(e,t,!a);this._newBaseOption=i.baseOption,a?(i.timelineOptions.length&&(a.timelineOptions=i.timelineOptions),i.mediaList.length&&(a.mediaList=i.mediaList),i.mediaDefault&&(a.mediaDefault=i.mediaDefault)):this._optionBackup=i},r.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],Me(e?t.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var a=e.getComponent("timeline");a&&(t=Me(n[a.getCurrentIndex()]))}return t},r.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),a=this._mediaList,i=this._mediaDefault,o=[],s=[];if(!a.length&&!i)return s;for(var l=0,u=a.length;l<u;l++)lie(a[l].query,t,n)&&o.push(l);return!o.length&&i&&(o=[-1]),o.length&&!cie(o,this._currentMediaIndices)&&(s=fe(o,function(c){return Me(c===-1?i.option:a[c].option)})),this._currentMediaIndices=o,s},r})();function sie(r,e,t){var n=[],a,i,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,c=!!r.media,f=!!(l||s||o&&o.timeline);o?(i=o,i.timeline||(i.timeline=s)):((f||c)&&(r.options=r.media=null),i=r),c&&ce(u)&&O(u,function(v){v&&v.option&&(v.query?n.push(v):a||(a=v))}),d(i),O(l,function(v){return d(v)}),O(n,function(v){return d(v.option)});function d(v){O(e,function(g){g(v,t)})}return{baseOption:i,timelineOptions:l||[],mediaDefault:a,mediaList:n}}function lie(r,e,t){var n={width:e,height:t,aspectratio:e/t},a=!0;return O(r,function(i,o){var s=o.match(iie);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();uie(n[u],i,l)||(a=!1)}}),a}function uie(r,e,t){return t==="min"?r>=e:t==="max"?r<=e:r===e}function cie(r,e){return r.join(",")===e.join(",")}var Ua=O,tg=Re,wP=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Nw(r){var e=r&&r.itemStyle;if(e)for(var t=0,n=wP.length;t<n;t++){var a=wP[t],i=e.normal,o=e.emphasis;i&&i[a]&&(r[a]=r[a]||{},r[a].normal?Ye(r[a].normal,i[a]):r[a].normal=i[a],i[a]=null),o&&o[a]&&(r[a]=r[a]||{},r[a].emphasis?Ye(r[a].emphasis,o[a]):r[a].emphasis=o[a],o[a]=null)}}function fn(r,e,t){if(r&&r[e]&&(r[e].normal||r[e].emphasis)){var n=r[e].normal,a=r[e].emphasis;n&&(t?(r[e].normal=r[e].emphasis=null,Le(r[e],n)):r[e]=n),a&&(r.emphasis=r.emphasis||{},r.emphasis[e]=a,a.focus&&(r.emphasis.focus=a.focus),a.blurScope&&(r.emphasis.blurScope=a.blurScope))}}function cp(r){fn(r,"itemStyle"),fn(r,"lineStyle"),fn(r,"areaStyle"),fn(r,"label"),fn(r,"labelLine"),fn(r,"upperLabel"),fn(r,"edgeLabel")}function hr(r,e){var t=tg(r)&&r[e],n=tg(t)&&t.textStyle;if(n)for(var a=0,i=AO.length;a<i;a++){var o=AO[a];n.hasOwnProperty(o)&&(t[o]=n[o])}}function wa(r){r&&(cp(r),hr(r,"label"),r.emphasis&&hr(r.emphasis,"label"))}function fie(r){if(tg(r)){Nw(r),cp(r),hr(r,"label"),hr(r,"upperLabel"),hr(r,"edgeLabel"),r.emphasis&&(hr(r.emphasis,"label"),hr(r.emphasis,"upperLabel"),hr(r.emphasis,"edgeLabel"));var e=r.markPoint;e&&(Nw(e),wa(e));var t=r.markLine;t&&(Nw(t),wa(t));var n=r.markArea;n&&wa(n);var a=r.data;if(r.type==="graph"){a=a||r.nodes;var i=r.links||r.edges;if(i&&!wn(i))for(var o=0;o<i.length;o++)wa(i[o]);O(r.categories,function(u){cp(u)})}if(a&&!wn(a))for(var o=0;o<a.length;o++)wa(a[o]);if(e=r.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)wa(s[o]);if(t=r.markLine,t&&t.data)for(var l=t.data,o=0;o<l.length;o++)ce(l[o])?(wa(l[o][0]),wa(l[o][1])):wa(l[o]);r.type==="gauge"?(hr(r,"axisLabel"),hr(r,"title"),hr(r,"detail")):r.type==="treemap"?(fn(r.breadcrumb,"itemStyle"),O(r.levels,function(u){cp(u)})):r.type==="tree"&&cp(r.leaves)}}function bo(r){return ce(r)?r:r?[r]:[]}function TP(r){return(ce(r)?r[0]:r)||{}}function hie(r,e){Ua(bo(r.series),function(n){tg(n)&&fie(n)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),Ua(t,function(n){Ua(bo(r[n]),function(a){a&&(hr(a,"axisLabel"),hr(a.axisPointer,"label"))})}),Ua(bo(r.parallel),function(n){var a=n&&n.parallelAxisDefault;hr(a,"axisLabel"),hr(a&&a.axisPointer,"label")}),Ua(bo(r.calendar),function(n){fn(n,"itemStyle"),hr(n,"dayLabel"),hr(n,"monthLabel"),hr(n,"yearLabel")}),Ua(bo(r.radar),function(n){hr(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)}),Ua(bo(r.geo),function(n){tg(n)&&(wa(n),Ua(bo(n.regions),function(a){wa(a)}))}),Ua(bo(r.timeline),function(n){wa(n),fn(n,"label"),fn(n,"itemStyle"),fn(n,"controlStyle",!0);var a=n.data;ce(a)&&O(a,function(i){Re(i)&&(fn(i,"label"),fn(i,"itemStyle"))})}),Ua(bo(r.toolbox),function(n){fn(n,"iconStyle"),Ua(n.feature,function(a){fn(a,"iconStyle")})}),hr(TP(r.axisPointer),"label"),hr(TP(r.tooltip).axisPointer,"label")}function die(r,e){for(var t=e.split(","),n=r,a=0;a<t.length&&(n=n&&n[t[a]],n!=null);a++);return n}function vie(r,e,t,n){for(var a=e.split(","),i=r,o,s=0;s<a.length-1;s++)o=a[s],i[o]==null&&(i[o]={}),i=i[o];i[a[s]]==null&&(i[a[s]]=t)}function CP(r){r&&O(pie,function(e){e[0]in r&&!(e[1]in r)&&(r[e[1]]=r[e[0]])})}var pie=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],gie=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Lw=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Cv(r){var e=r&&r.itemStyle;if(e)for(var t=0;t<Lw.length;t++){var n=Lw[t][1],a=Lw[t][0];e[n]!=null&&(e[a]=e[n])}}function AP(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function MP(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function mie(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function FH(r,e){if(r)for(var t=0;t<r.length;t++)e(r[t]),r[t]&&FH(r[t].children,e)}function UH(r,e){hie(r,e),r.series=Lt(r.series),O(r.series,function(t){if(Re(t)){var n=t.type;if(n==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow);else if(n==="pie"||n==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise),AP(t.label);var a=t.data;if(a&&!wn(a))for(var i=0;i<a.length;i++)AP(a[i]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if(n==="gauge"){var o=die(t,"pointer.color");o!=null&&vie(t,"itemStyle.color",o)}else if(n==="bar"){Cv(t),Cv(t.backgroundStyle),Cv(t.emphasis);var a=t.data;if(a&&!wn(a))for(var i=0;i<a.length;i++)typeof a[i]=="object"&&(Cv(a[i]),Cv(a[i]&&a[i].emphasis))}else if(n==="sunburst"){var s=t.highlightPolicy;s&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=s)),MP(t),FH(t.data,MP)}else n==="graph"||n==="sankey"?mie(t):n==="map"&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&Le(t,t.mapLocation));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(t.emphasis.scale=t.hoverAnimation)),CP(t)}}),r.dataRange&&(r.visualMap=r.dataRange),O(gie,function(t){var n=r[t];n&&(ce(n)||(n=[n]),O(n,function(a){CP(a)}))})}function yie(r){var e=Te();r.eachSeries(function(t){var n=t.get("stack");if(n){var a=e.get(n)||e.set(n,[]),i=t.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:t};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;a.push(o)}}),e.each(function(t){if(t.length!==0){var n=t[0].seriesModel,a=n.get("stackOrder")||"seriesAsc";a==="seriesDesc"&&t.reverse(),O(t,function(i,o){i.data.setCalculationInfo("stackedOnSeries",o>0?t[o-1].seriesModel:null)}),xie(t)}})}function xie(r){O(r,function(e,t){var n=[],a=[NaN,NaN],i=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,c,f){var d=o.get(e.stackedDimension,f);if(isNaN(d))return a;var v,g;s?g=o.getRawIndex(f):v=o.get(e.stackedByDimension,f);for(var x=NaN,y=t-1;y>=0;y--){var b=r[y];if(s||(g=b.data.rawIndexOf(b.stackedByDimension,v)),g>=0){var w=b.data.getByRawIndex(b.stackResultDimension,g);if(l==="all"||l==="positive"&&w>0||l==="negative"&&w<0||l==="samesign"&&d>=0&&w>0||l==="samesign"&&d<=0&&w<0){d=nre(d,w),x=w;break}}}return n[0]=d,n[1]=x,n})})}var tb=(function(){function r(e){this.data=e.data||(e.sourceFormat===si?{}:[]),this.sourceFormat=e.sourceFormat||PH,this.seriesLayoutBy=e.seriesLayoutBy||ti,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var a=t[n];a.type==null&&BH(this,n)===Zr.Must&&(a.type="ordinal")}}return r})();function _D(r){return r instanceof tb}function RC(r,e,t){t=t||YH(r);var n=e.seriesLayoutBy,a=_ie(r,t,n,e.sourceHeader,e.dimensions),i=new tb({data:r,sourceFormat:t,seriesLayoutBy:n,dimensionsDefine:a.dimensionsDefine,startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount,metaRawOption:Me(e)});return i}function SD(r){return new tb({data:r,sourceFormat:wn(r)?vl:sa})}function bie(r){return new tb({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:Me(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function YH(r){var e=PH;if(wn(r))e=vl;else if(ce(r)){r.length===0&&(e=Ur);for(var t=0,n=r.length;t<n;t++){var a=r[t];if(a!=null){if(ce(a)||wn(a)){e=Ur;break}else if(Re(a)){e=la;break}}}}else if(Re(r)){for(var i in r)if(_e(r,i)&&en(r[i])){e=si;break}}return e}function _ie(r,e,t,n,a){var i,o;if(!r)return{dimensionsDefine:DP(a),startIndex:o,dimensionsDetectedCount:i};if(e===Ur){var s=r;n==="auto"||n==null?NP(function(u){u!=null&&u!=="-"&&(ye(u)?o==null&&(o=1):o=0)},t,s,10):o=st(n)?n:n?1:0,!a&&o===1&&(a=[],NP(function(u,c){a[c]=u!=null?u+"":""},t,s,1/0)),i=a?a.length:t===wc?s.length:s[0]?s[0].length:null}else if(e===la)a||(a=Sie(r));else if(e===si)a||(a=[],O(r,function(u,c){a.push(c)}));else if(e===sa){var l=Wh(r[0]);i=ce(l)&&l.length||1}return{startIndex:o,dimensionsDefine:DP(a),dimensionsDetectedCount:i}}function Sie(r){for(var e=0,t;e<r.length&&!(t=r[e++]););if(t)return it(t)}function DP(r){if(r){var e=Te();return fe(r,function(t,n){t=Re(t)?t:{name:t};var a={name:t.name,displayName:t.displayName,type:t.type};if(a.name==null)return a;a.name+="",a.displayName==null&&(a.displayName=a.name);var i=e.get(a.name);return i?a.name+="-"+i.count++:e.set(a.name,{count:1}),a})}}function NP(r,e,t,n){if(e===wc)for(var a=0;a<t.length&&a<n;a++)r(t[a]?t[a][0]:null,a);else for(var i=t[0]||[],a=0;a<i.length&&a<n;a++)r(i[a],a)}function WH(r){var e=r.sourceFormat;return e===la||e===si}var pu,gu,mu,yu,LP,RP,XH=(function(){function r(e,t){var n=_D(e)?e:SD(e);this._source=n;var a=this._data=n.data,i=n.sourceFormat;n.seriesLayoutBy,i===vl&&(this._offset=0,this._dimSize=t,this._data=a),RP(this,a,n)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(e,t){},r.prototype.appendData=function(e){},r.prototype.clean=function(){},r.protoInitialize=(function(){var e=r.prototype;e.pure=!1,e.persistent=!0})(),r.internalField=(function(){var e;RP=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,d=l.dimensionsDefine,v=LP[wD(u,c)];if(ie(o,v),u===vl)o.getItem=t,o.count=a,o.fillStorage=n;else{var g=qH(u,c);o.getItem=xe(g,null,s,f,d);var x=ZH(u,c);o.count=xe(x,null,s,f,d)}};var t=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,f=0;f<u;f++)s[f]=l[c+f];return s},n=function(o,s,l,u){for(var c=this._data,f=this._dimSize,d=0;d<f;d++){for(var v=u[d],g=v[0]==null?1/0:v[0],x=v[1]==null?-1/0:v[1],y=s-o,b=l[d],w=0;w<y;w++){var T=c[w*f+d];b[o+w]=T,T<g&&(g=T),T>x&&(x=T)}v[0]=g,v[1]=x}},a=function(){return this._data?this._data.length/this._dimSize:0};LP=(e={},e[Ur+"_"+ti]={pure:!0,appendData:i},e[Ur+"_"+wc]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[la]={pure:!0,appendData:i},e[si]={pure:!0,appendData:function(o){var s=this._data;O(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[sa]={appendData:i},e[vl]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}})(),r})(),Vy=function(r){ce(r)||x6("series.data or dataset.source must be an array.")};pu={},pu[Ur+"_"+ti]=Vy,pu[Ur+"_"+wc]=Vy,pu[la]=Vy,pu[si]=function(r,e){for(var t=0;t<e.length;t++){var n=e[t].name;n==null&&x6("dimension name must not be null/undefined.")}},pu[sa]=Vy;var EP=function(r,e,t,n){return r[n]},wie=(gu={},gu[Ur+"_"+ti]=function(r,e,t,n){return r[n+e]},gu[Ur+"_"+wc]=function(r,e,t,n,a){n+=e;for(var i=a||[],o=r,s=0;s<o.length;s++){var l=o[s];i[s]=l?l[n]:null}return i},gu[la]=EP,gu[si]=function(r,e,t,n,a){for(var i=a||[],o=0;o<t.length;o++){var s=t[o].name,l=s!=null?r[s]:null;i[o]=l?l[n]:null}return i},gu[sa]=EP,gu);function qH(r,e){var t=wie[wD(r,e)];return t}var kP=function(r,e,t){return r.length},Tie=(mu={},mu[Ur+"_"+ti]=function(r,e,t){return Math.max(0,r.length-e)},mu[Ur+"_"+wc]=function(r,e,t){var n=r[0];return n?Math.max(0,n.length-e):0},mu[la]=kP,mu[si]=function(r,e,t){var n=t[0].name,a=n!=null?r[n]:null;return a?a.length:0},mu[sa]=kP,mu);function ZH(r,e){var t=Tie[wD(r,e)];return t}var Rw=function(r,e,t){return r[e]},Cie=(yu={},yu[Ur]=Rw,yu[la]=function(r,e,t){return r[t]},yu[si]=Rw,yu[sa]=function(r,e,t){var n=Wh(r);return n instanceof Array?n[e]:n},yu[vl]=Rw,yu);function $H(r){var e=Cie[r];return e}function wD(r,e){return r===Ur?r+"_"+e:r}function Eh(r,e,t){if(r){var n=r.getRawDataItem(e);if(n!=null){var a=r.getStore(),i=a.getSource().sourceFormat;if(t!=null){var o=r.getDimensionIndex(t),s=a.getDimensionProperty(o);return $H(i)(n,o,s)}else{var l=n;return i===sa&&(l=Wh(n)),l}}}}var Aie=/\{@(.+?)\}/g,rb=(function(){function r(){}return r.prototype.getDataParams=function(e,t){var n=this.getData(t),a=this.getRawValue(e,t),i=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,f=this.mainType,d=f==="series",v=n.userOutput&&n.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:o,dataIndex:i,data:s,dataType:t,value:a,color:u,borderColor:c,dimensionNames:v?v.fullDimensions:null,encode:v?v.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(e,t,n,a,i,o){t=t||"normal";var s=this.getData(n),l=this.getDataParams(e,n);if(o&&(l.value=o.interpolatedValue),a!=null&&ce(l.value)&&(l.value=l.value[a]),!i){var u=s.getItemModel(e);i=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if(Ae(i))return l.status=t,l.dimensionIndex=a,i(l);if(ye(i)){var c=pD(i,l);return c.replace(Aie,function(f,d){var v=d.length,g=d;g.charAt(0)==="["&&g.charAt(v-1)==="]"&&(g=+g.slice(1,v-1));var x=Eh(s,e,g);if(o&&ce(o.interpolatedValue)){var y=s.getDimensionIndex(g);y>=0&&(x=o.interpolatedValue[y])}return x!=null?x+"":""})}},r.prototype.getRawValue=function(e,t){return Eh(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,n){},r})();function IP(r){var e,t;return Re(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function Lp(r){return new Mie(r)}var Mie=(function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var a=this.context;a.data=a.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=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)&&(i="reset");function c(w){return!(w>=1)&&(w=1),w}var f;(this._dirty||i==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,g=Math.min(d!=null?this._dueIndex+d:1/0,this._dueEnd);if(!n&&(f||v<g)){var x=this._progress;if(ce(x))for(var y=0;y<x.length;y++)this._doProgress(x[y],v,g,l,u);else this._doProgress(x,v,g,l,u)}this._dueIndex=g;var b=this._settedOutputEnd!=null?this._settedOutputEnd:g;this._outputDueEnd=b}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(e,t,n,a,i){OP.reset(t,n,a,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:OP.next},this.context)},r.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),ce(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var a=this._downstream;return a&&a.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},r})(),OP=(function(){var r,e,t,n,a,i={reset:function(l,u,c,f){e=l,r=u,t=c,n=f,a=Math.ceil(n/t),i.next=t>1&&n>0?s:o}};return i;function o(){return e<r?e++:null}function s(){var l=e%a*t+Math.ceil(e/a),u=e>=r?null:l<n?l:e;return e++,u}})();function pl(r,e){var t=e&&e.type;return t==="ordinal"?r:(t==="time"&&!st(r)&&r!=null&&r!=="-"&&(r=+Ji(r)),r==null||r===""?NaN:Number(r))}var Die=Te({number:function(r){return parseFloat(r)},time:function(r){return+Ji(r)},trim:function(r){return ye(r)?ta(r):r}});function KH(r){return Die.get(r)}var QH={lt:function(r,e){return r<e},lte:function(r,e){return r<=e},gt:function(r,e){return r>e},gte:function(r,e){return r>=e}},Nie=(function(){function r(e,t){if(!st(t)){var n="";gt(n)}this._opFn=QH[e],this._rvalFloat=Xi(t)}return r.prototype.evaluate=function(e){return st(e)?this._opFn(e,this._rvalFloat):this._opFn(Xi(e),this._rvalFloat)},r})(),JH=(function(){function r(e,t){var n=e==="desc";this._resultLT=n?1:-1,t==null&&(t=n?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var n=st(e)?e:Xi(e),a=st(t)?t:Xi(t),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=ye(e),l=ye(t);s&&(n=l?e:0),l&&(a=s?t:0)}return n<a?this._resultLT:n>a?-this._resultLT:0},r})(),Lie=(function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Xi(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(t=Xi(e)===this._rvalFloat)}return this._isEQ?t:!t},r})();function Rie(r,e){return r==="eq"||r==="ne"?new Lie(r==="eq",e):_e(QH,r)?new Nie(r,e):null}var Eie=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return pl(e,t)},r})();function kie(r,e){var t=new Eie,n=r.data,a=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==ti&&gt(o);var s=[],l={},u=r.dimensionsDefine;if(u)O(u,function(x,y){var b=x.name,w={index:y,name:b,displayName:x.displayName};if(s.push(w),b!=null){var T="";_e(l,b)&&gt(T),l[b]=w}});else for(var c=0;c<r.dimensionsDetectedCount;c++)s.push({index:c});var f=qH(a,ti);e.__isBuiltIn&&(t.getRawDataItem=function(x){return f(n,i,s,x)},t.getRawData=xe(Iie,null,r)),t.cloneRawData=xe(Oie,null,r);var d=ZH(a,ti);t.count=xe(d,null,n,i,s);var v=$H(a);t.retrieveValue=function(x,y){var b=f(n,i,s,x);return g(b,y)};var g=t.retrieveValueFromItem=function(x,y){if(x!=null){var b=s[y];if(b)return v(x,y,b.name)}};return t.getDimensionInfo=xe(Pie,null,s,l),t.cloneAllDimensionInfo=xe(zie,null,s),t}function Iie(r){var e=r.sourceFormat;if(!TD(e)){var t="";gt(t)}return r.data}function Oie(r){var e=r.sourceFormat,t=r.data;if(!TD(e)){var n="";gt(n)}if(e===Ur){for(var a=[],i=0,o=t.length;i<o;i++)a.push(t[i].slice());return a}else if(e===la){for(var a=[],i=0,o=t.length;i<o;i++)a.push(ie({},t[i]));return a}}function Pie(r,e,t){if(t!=null){if(st(t)||!isNaN(t)&&!_e(e,t))return r[t];if(_e(e,t))return e[t]}}function zie(r){return Me(r)}var e8=Te();function jie(r){r=Me(r);var e=r.type,t="";e||gt(t);var n=e.split(":");n.length!==2&&gt(t);var a=!1;n[0]==="echarts"&&(e=n[1],a=!0),r.__isBuiltIn=a,e8.set(e,r)}function Bie(r,e,t){var n=Lt(r),a=n.length,i="";a||gt(i);for(var o=0,s=a;o<s;o++){var l=n[o];e=Vie(l,e),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function Vie(r,e,t,n){var a="";e.length||gt(a),Re(r)||gt(a);var i=r.type,o=e8.get(i);o||gt(a);var s=fe(e,function(u){return kie(u,o)}),l=Lt(o.transform({upstream:s[0],upstreamList:s,config:Me(r.config)}));return fe(l,function(u,c){var f="";Re(u)||gt(f),u.data||gt(f);var d=YH(u.data);TD(d)||gt(f);var v,g=e[0];if(g&&c===0&&!u.dimensions){var x=g.startIndex;x&&(u.data=g.data.slice(0,x).concat(u.data)),v={seriesLayoutBy:ti,sourceHeader:x,dimensions:g.metaRawOption.dimensions}}else v={seriesLayoutBy:ti,sourceHeader:0,dimensions:u.dimensions};return RC(u.data,v,null)})}function TD(r){return r===Ur||r===la}var nb="undefined",Gie=typeof Uint32Array===nb?Array:Uint32Array,Hie=typeof Uint16Array===nb?Array:Uint16Array,t8=typeof Int32Array===nb?Array:Int32Array,PP=typeof Float64Array===nb?Array:Float64Array,r8={float:PP,int:t8,ordinal:Array,number:Array,time:PP},Ew;function Tf(r){return r>65535?Gie:Hie}function Cf(){return[1/0,-1/0]}function Fie(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function zP(r,e,t,n,a){var i=r8[t||"float"];if(a){var o=r[e],s=o&&o.length;if(s!==n){for(var l=new i(n),u=0;u<s;u++)l[u]=o[u];r[e]=l}}else r[e]=new i(n)}var EC=(function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Te()}return r.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var a=e.getSource(),i=this.defaultDimValueGetter=Ew[a.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],WH(a),this._dimensions=fe(t,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,e.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,a=this._dimensions,i=n.get(e);if(i!=null){if(a[i].type===t)return i}else i=a.length;return a[i]={type:t},n.set(e,i),this._chunks[i]=new r8[t||"float"](this._rawCount),this._rawExtent[i]=Cf(),i},r.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],a=this._dimensions[e],i=this._rawExtent,o=a.ordinalOffset||0,s=n.length;o===0&&(i[e]=Cf());for(var l=i[e],u=o;u<s;u++){var c=n[u]=t.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}a.ordinalMeta=t,a.ordinalOffset=s,a.type="ordinal"},r.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],n=t.ordinalMeta;return n},r.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},r.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var a=t.count();return t.persistent||(a+=n),n<a&&this._initDataFromProvider(n,a,!0),[n,a]},r.prototype.appendValues=function(e,t){for(var n=this._chunks,a=this._dimensions,i=a.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t||0),u=0;u<i;u++){var c=a[u];zP(n,u,c.type,l,!0)}for(var f=[],d=s;d<l;d++)for(var v=d-s,g=0;g<i;g++){var c=a[g],x=Ew.arrayRows.call(this,e[v]||f,c.property,v,g);n[g][d]=x;var y=o[g];x<y[0]&&(y[0]=x),x>y[1]&&(y[1]=x)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=fe(o,function(w){return w.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=Cf()),zP(i,c,f.type,t,n)}if(a.fillStorage)a.fillStorage(e,t,i,l);else for(var d=[],v=e;v<t;v++){d=a.getItem(v,d);for(var g=0;g<s;g++){var x=i[g],y=this._dimValueGetter(d,u[g],v,g);x[v]=y;var b=l[g];y<b[0]&&(b[0]=y),y>b[1]&&(b[1]=y)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},r.prototype.getValues=function(e,t){var n=[],a=[];if(t==null){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)a.push(i)}else a=e;for(var i=0,o=a.length;i<o;i++)n.push(this.get(a[i],t));return n},r.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},r.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var a=0,i=this.count();a<i;a++){var o=this.get(e,a);isNaN(o)||(n+=o)}return n},r.prototype.getMedian=function(e){var t=[];this.each([e],function(i){isNaN(i)||t.push(i)});var n=t.sort(function(i,o){return i-o}),a=this.count();return a===0?0:a%2===1?n[(a-1)/2]:(n[a/2]+n[a/2-1])/2},r.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;for(var a=0,i=this._count-1;a<=i;){var o=(a+i)/2|0;if(t[o]<e)a=o+1;else if(t[o]>e)i=o-1;else return o}return-1},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,a=this._count;if(n===Array){e=new n(a);for(var i=0;i<a;i++)e[i]=t[i]}else e=new n(t.buffer,0,a)}else{var n=Tf(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},r.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),a=n.count(),i=Tf(n._rawCount),o=new i(a),s=[],l=e.length,u=0,c=e[0],f=n._chunks,d=0;d<a;d++){var v=void 0,g=n.getRawIndex(d);if(l===0)v=t(d);else if(l===1){var x=f[c][g];v=t(x,d)}else{for(var y=0;y<l;y++)s[y]=f[e[y]][g];s[y]=d,v=t.apply(null,s)}v&&(o[u++]=g)}return u<a&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},r.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var a=it(e),i=a.length;if(!i)return this;var o=t.count(),s=Tf(t._rawCount),l=new s(o),u=0,c=a[0],f=e[c][0],d=e[c][1],v=t._chunks,g=!1;if(!t._indices){var x=0;if(i===1){for(var y=v[a[0]],b=0;b<n;b++){var w=y[b];(w>=f&&w<=d||isNaN(w))&&(l[u++]=x),x++}g=!0}else if(i===2){for(var y=v[a[0]],T=v[a[1]],C=e[a[1]][0],D=e[a[1]][1],b=0;b<n;b++){var w=y[b],M=T[b];(w>=f&&w<=d||isNaN(w))&&(M>=C&&M<=D||isNaN(M))&&(l[u++]=x),x++}g=!0}}if(!g)if(i===1)for(var b=0;b<o;b++){var N=t.getRawIndex(b),w=v[a[0]][N];(w>=f&&w<=d||isNaN(w))&&(l[u++]=N)}else for(var b=0;b<o;b++){for(var R=!0,N=t.getRawIndex(b),E=0;E<i;E++){var k=a[E],w=v[k][N];(w<e[k][0]||w>e[k][1])&&(R=!1)}R&&(l[u++]=t.getRawIndex(b))}return u<o&&(t._indices=l),t._count=u,t._extent=[],t._updateGetRawIdx(),t},r.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},r.prototype.modify=function(e,t){this._updateDims(this,e,t)},r.prototype._updateDims=function(e,t,n){for(var a=e._chunks,i=[],o=t.length,s=e.count(),l=[],u=e._rawExtent,c=0;c<t.length;c++)u[t[c]]=Cf();for(var f=0;f<s;f++){for(var d=e.getRawIndex(f),v=0;v<o;v++)l[v]=a[t[v]][d];l[o]=f;var g=n&&n.apply(null,l);if(g!=null){typeof g!="object"&&(i[0]=g,g=i);for(var c=0;c<g.length;c++){var x=t[c],y=g[c],b=u[x],w=a[x];w&&(w[d]=y),y<b[0]&&(b[0]=y),y>b[1]&&(b[1]=y)}}}},r.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),a=n._chunks,i=a[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,f,d,v=new(Tf(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var g=1;g<o-1;g+=l){for(var x=Math.min(g+l,o-1),y=Math.min(g+l*2,o),b=(y+x)/2,w=0,T=x;T<y;T++){var C=this.getRawIndex(T),D=i[C];isNaN(D)||(w+=D)}w/=y-x;var M=g,N=Math.min(g+l,o),R=g-1,E=i[u];c=-1,d=M;for(var k=-1,I=0,T=M;T<N;T++){var C=this.getRawIndex(T),D=i[C];if(isNaN(D)){I++,k<0&&(k=C);continue}f=Math.abs((R-b)*(D-E)-(R-T)*(w-E)),f>c&&(c=f,d=C)}I>0&&I<N-M&&(v[s++]=Math.min(k,d),d=Math.max(k,d)),v[s++]=d,u=d}return v[s++]=this.getRawIndex(o-1),n._count=s,n._indices=v,n.getRawIndex=this._getRawIdx,n},r.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),a=n._chunks,i=Math.floor(1/t),o=a[e],s=this.count(),l=new(Tf(this._rawCount))(Math.ceil(s/i)*2),u=0,c=0;c<s;c+=i){var f=c,d=o[this.getRawIndex(f)],v=c,g=o[this.getRawIndex(v)],x=i;c+i>s&&(x=s-c);for(var y=0;y<x;y++){var b=this.getRawIndex(c+y),w=o[b];w<d&&(d=w,f=c+y),w>g&&(g=w,v=c+y)}var T=this.getRawIndex(f),C=this.getRawIndex(v);f<v?(l[u++]=T,l[u++]=C):(l[u++]=C,l[u++]=T)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},r.prototype.downSample=function(e,t,n,a){for(var i=this.clone([e],!0),o=i._chunks,s=[],l=Math.floor(1/t),u=o[e],c=this.count(),f=i._rawExtent[e]=Cf(),d=new(Tf(this._rawCount))(Math.ceil(c/l)),v=0,g=0;g<c;g+=l){l>c-g&&(l=c-g,s.length=l);for(var x=0;x<l;x++){var y=this.getRawIndex(g+x);s[x]=u[y]}var b=n(s),w=this.getRawIndex(Math.min(g+a(s,b)||0,c-1));u[w]=b,b<f[0]&&(f[0]=b),b>f[1]&&(f[1]=b),d[v++]=w}return i._count=v,i._indices=d,i._updateGetRawIdx(),i},r.prototype.each=function(e,t){if(this._count)for(var n=e.length,a=this._chunks,i=0,o=this.count();i<o;i++){var s=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(a[e[0]][s],i);break;case 2:t(a[e[0]][s],a[e[1]][s],i);break;default:for(var l=0,u=[];l<n;l++)u[l]=a[e[l]][s];u[l]=i,t.apply(null,u)}}},r.prototype.getDataExtent=function(e){var t=this._chunks[e],n=Cf();if(!t)return n;var a=this.count(),i=!this._indices,o;if(i)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<a;u++){var c=this.getRawIndex(u),f=t[c];f<s&&(s=f),f>l&&(l=f)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],a=this._chunks,i=0;i<a.length;i++)n.push(a[i][t]);return n},r.prototype.clone=function(e,t){var n=new r,a=this._chunks,i=e&&ka(e,function(s,l){return s[l]=!0,s},{});if(i)for(var o=0;o<a.length;o++)n._chunks[o]=i[o]?Fie(a[o]):a[o];else n._chunks=a;return this._copyCommonProps(n),t||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},r.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=Me(this._extent),e._rawExtent=Me(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var a=0;a<n;a++)t[a]=this._indices[a]}else t=new e(this._indices);return t}return null},r.prototype._getRawIdxIdentity=function(e){return e},r.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function e(t,n,a,i){return pl(t[i],this._dimensions[i])}Ew={arrayRows:e,objectRows:function(t,n,a,i){return pl(t[n],this._dimensions[i])},keyedColumns:e,original:function(t,n,a,i){var o=t&&(t.value==null?t:t.value);return pl(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,n,a,i){return t[i]}}})(),r})(),n8=(function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,a,i;if(Gy(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,i=[c._getVersionSign()]}else s=o.get("data",!0),l=wn(s)?vl:sa,i=[];var f=this._getSourceMetaRawOption()||{},d=u&&u.metaRawOption||{},v=Ce(f.seriesLayoutBy,d.seriesLayoutBy)||null,g=Ce(f.sourceHeader,d.sourceHeader),x=Ce(f.dimensions,d.dimensions),y=v!==d.seriesLayoutBy||!!g!=!!d.sourceHeader||x;a=y?[RC(s,{seriesLayoutBy:v,sourceHeader:g,dimensions:x},l)]:[]}else{var b=e;if(n){var w=this._applyTransform(t);a=w.sourceList,i=w.upstreamSignList}else{var T=b.get("source",!0);a=[RC(T,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(a,i)},r.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get("transform",!0),a=t.get("fromTransformResult",!0);if(a!=null){var i="";e.length!==1&&BP(i)}var o,s=[],l=[];return O(e,function(u){u.prepareSource();var c=u.getSource(a||0),f="";a!=null&&!c&&BP(f),s.push(c),l.push(u._getVersionSign())}),n?o=Bie(n,s,{datasetIndex:t.componentIndex}):a!=null&&(o=[bie(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},r.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},r.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},r.prototype._innerGetDataStore=function(e,t,n){var a=0,i=this._storeList,o=i[a];o||(o=i[a]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];Gy(this._sourceHost)&&l?s=l._innerGetDataStore(e,t,n):(s=new EC,s.initData(new XH(t,e.length),e)),o[n]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Gy(e)){var t=yD(e);return t?[t.getSourceManager()]:[]}else return fe(Zae(e),function(n){return n.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,a;if(Gy(e))t=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),a=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=e;t=i.get("seriesLayoutBy",!0),n=i.get("sourceHeader",!0),a=i.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:a}},r})();function jP(r){var e=r.option.transform;e&&Hp(r.option.transform)}function Gy(r){return r.mainType==="series"}function BP(r){throw new Error(r)}var Uie="line-height:1";function a8(r){var e=r.lineHeight;return e==null?Uie:"line-height:"+hn(e+"")+"px"}function i8(r,e){var t=r.color||ee.color.tertiary,n=r.fontSize||12,a=r.fontWeight||"400",i=r.color||ee.color.secondary,o=r.fontSize||14,s=r.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+hn(n+"")+"px;color:"+hn(t)+";font-weight:"+hn(a+""),valueStyle:"font-size:"+hn(o+"")+"px;color:"+hn(i)+";font-weight:"+hn(s+"")}:{nameStyle:{fontSize:n,fill:t,fontWeight:a},valueStyle:{fontSize:o,fill:i,fontWeight:s}}}var Yie=[0,10,20,30],Wie=["",`
262
- `,`
263
-
264
- `,`
265
-
266
-
267
- `];function pr(r,e){return e.type=r,e}function kC(r){return r.type==="section"}function o8(r){return kC(r)?Xie:qie}function s8(r){if(kC(r)){var e=0,t=r.blocks.length,n=t>1||t>0&&!r.noHeader;return O(r.blocks,function(a){var i=s8(a);i>=e&&(e=i+ +(n&&(!i||kC(a)&&!a.noHeader)))}),e}return 0}function Xie(r,e,t,n){var a=e.noHeader,i=Zie(s8(e)),o=[],s=e.blocks||[];tn(!s||ce(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(_e(u,l)){var c=new JH(u[l],null);s.sort(function(x,y){return c.evaluate(x.sortParam,y.sortParam)})}else l==="seriesDesc"&&s.reverse()}O(s,function(x,y){var b=e.valueFormatter,w=o8(x)(b?ie(ie({},r),{valueFormatter:b}):r,x,y>0?i.html:0,n);w!=null&&o.push(w)});var f=r.renderMode==="richText"?o.join(i.richText):IC(n,o.join(""),a?t:i.html);if(a)return f;var d=MC(e.header,"ordinal",r.useUTC),v=i8(n,r.renderMode).nameStyle,g=a8(n);return r.renderMode==="richText"?l8(r,d,v)+i.richText+f:IC(n,'<div style="'+v+";"+g+';">'+hn(d)+"</div>"+f,t)}function qie(r,e,t,n){var a=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(C){return C=ce(C)?C:[C],fe(C,function(D,M){return MC(D,ce(v)?v[M]:v,u)})};if(!(i&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||ee.color.secondary,a),d=i?"":MC(l,"ordinal",u),v=e.valueType,g=o?[]:c(e.value,e.dataIndex),x=!s||!i,y=!s&&i,b=i8(n,a),w=b.nameStyle,T=b.valueStyle;return a==="richText"?(s?"":f)+(i?"":l8(r,d,w))+(o?"":Qie(r,g,x,y,T)):IC(n,(s?"":f)+(i?"":$ie(d,!s,w))+(o?"":Kie(g,x,y,T)),t)}}function VP(r,e,t,n,a,i){if(r){var o=o8(r),s={useUTC:a,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function Zie(r){return{html:Yie[r],richText:Wie[r]}}function IC(r,e,t){var n='<div style="clear:both"></div>',a="margin: "+t+"px 0 0",i=a8(r);return'<div style="'+a+";"+i+';">'+e+n+"</div>"}function $ie(r,e,t){var n=e?"margin-left:2px":"";return'<span style="'+t+";"+n+'">'+hn(r)+"</span>"}function Kie(r,e,t,n){var a=t?"10px":"20px",i=e?"float:right;margin-left:"+a:"";return r=ce(r)?r:[r],'<span style="'+i+";"+n+'">'+fe(r,function(o){return hn(o)}).join("&nbsp;&nbsp;")+"</span>"}function l8(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function Qie(r,e,t,n,a){var i=[a],o=n?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(ce(e)?e.join(" "):e,i)}function u8(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return vc(n)}function c8(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var kw=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=m6()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,n){var a=n==="richText"?this._generateStyleName():null,i=TH({color:t,type:e,renderMode:n,markerId:a});return ye(i)?i:(this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};ce(t)?O(t,function(i){return ie(n,i)}):ie(n,t);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+e+"}"},r})();function f8(r){var e=r.series,t=r.dataIndex,n=r.multipleSeries,a=e.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=ce(s),u=u8(e,t),c,f,d,v;if(o>1||l&&!o){var g=Jie(s,e,t,i,u);c=g.inlineValues,f=g.inlineValueTypes,d=g.blocks,v=g.inlineValues[0]}else if(o){var x=a.getDimensionInfo(i[0]);v=c=Eh(a,t,i[0]),f=x.type}else v=c=l?s[0]:s;var y=PM(e),b=y&&e.name||"",w=a.getName(t),T=n?b:w;return pr("section",{header:b,noHeader:n||!y,sortParam:v,blocks:[pr("nameValue",{markerType:"item",markerColor:u,name:T,noName:!ta(T),value:c,valueType:f,dataIndex:t})].concat(d||[])})}function Jie(r,e,t,n,a){var i=e.getData(),o=ka(r,function(f,d,v){var g=i.getDimensionInfo(v);return f=f||g&&g.tooltip!==!1&&g.displayName!=null},!1),s=[],l=[],u=[];n.length?O(n,function(f){c(Eh(i,t,f),f)}):O(r,c);function c(f,d){var v=i.getDimensionInfo(d);!v||v.otherDims.tooltip===!1||(o?u.push(pr("nameValue",{markerType:"subItem",markerColor:a,name:v.displayName,value:f,valueType:v.type})):(s.push(f),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Os=Je();function Hy(r,e){return r.getName(e)||r.getId(e)}var K0="__universalTransitionEnabled",Tt=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,a){this.seriesIndex=this.componentIndex,this.dataTask=Lp({count:toe,reset:roe}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,a);var i=Os(this).sourceManager=new n8(this);i.prepareSource();var o=this.getInitialData(t,a);HP(o,this),this.dataTask.context.data=o,Os(this).dataBeforeProcessed=o,GP(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=eg(this),i=a?Sc(t):{},o=this.subType;Qe.hasClass(o)&&(o+="Series"),Ye(t,n.getTheme().get(this.subType)),Ye(t,this.getDefaultOption()),lc(t,"label",["show"]),this.fillDataTextStyle(t.data),a&&Zi(t,i,a)},e.prototype.mergeOption=function(t,n){t=Ye(this.option,t,!0),this.fillDataTextStyle(t.data);var a=eg(this);a&&Zi(this.option,t,a);var i=Os(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,n);HP(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Os(this).dataBeforeProcessed=o,GP(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!wn(t))for(var n=["show"],a=0;a<t.length;a++)t[a]&&t[a].label&&lc(t[a],"label",n)},e.prototype.getInitialData=function(t,n){},e.prototype.appendData=function(t){var n=this.getRawData();n.appendData(t.data)},e.prototype.getData=function(t){var n=OC(this);if(n){var a=n.context.data;return t==null||!a.getLinkedData?a:a.getLinkedData(t)}else return Os(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var n=OC(this);if(n){var a=n.context;a.outputData=t,n!==this.dataTask&&(a.data=t)}Os(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return Te(t)},e.prototype.getSourceManager=function(){return Os(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Os(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.indicesOfNearest=function(t,n,a,i){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(t);if(!s||!l)return[];var u=l.dataToCoord(a);i==null&&(i=1/0);var c=[],f=1/0,d=-1,v=0;return o.each(n,function(g,x){var y=l.dataToCoord(g),b=u-y,w=Math.abs(b);w<=i&&((w<f||w===f&&b>=0&&d<0)&&(f=w,d=b,v=0),b===d&&(c[v++]=x))}),c.length=v,c},e.prototype.formatTooltip=function(t,n,a){return f8({series:this,dataIndex:t,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(nt.node&&!(t&&t.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(t,n,a){var i=this.ecModel,o=xD.prototype.getColorFromPalette.call(this,t,n,a);return o||(o=i.getColorFromPalette(t,n,a)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},e.prototype.unselect=function(t,n){var a=this.option.selectedMap;if(a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<t.length;s++){var l=t[s],u=Hy(o,l);a[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,n){for(var a=[],i=0;i<t.length;i++)a[0]=t[i],this.isSelected(t[i],n)?this.unselect(a,n):this.select(a,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,n=it(t),a=[],i=0;i<n.length;i++){var o=t[n[i]];o>=0&&a.push(o)}return a},e.prototype.isSelected=function(t,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[Hy(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[K0])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,n){var a,i,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Re(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=n[c],d=Hy(t,f);u[d]=!0,this._selectedDataIndicesMap[d]=t.getRawIndex(f)}}else if(s==="single"||s===!0){var v=n[l-1],d=Hy(t,v);o.selectedMap=(a={},a[d]=!0,a),this._selectedDataIndicesMap=(i={},i[d]=t.getRawIndex(v),i)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var n=[];t.hasItemOption&&t.each(function(a){var i=t.getRawDataItem(a);i&&i.selected&&n.push(a)}),n.length>0&&this._innerSelect(t,n)}},e.registerClass=function(t){return Qe.registerClass(t)},e.protoInitialize=(function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"})(),e})(Qe);Jt(Tt,rb);Jt(Tt,xD);M6(Tt,Qe);function GP(r){var e=r.name;PM(r)||(r.name=eoe(r)||e)}function eoe(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return O(t,function(a){var i=e.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function toe(r){return r.model.getRawData().count()}function roe(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),noe}function noe(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function HP(r,e){O(Ch(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,He(aoe,e))})}function aoe(r,e){var t=OC(r);return t&&t.setOutputEnd((e||this).count()),e}function OC(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var n=t.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(r.uid))}return n}}var Rt=(function(){function r(){this.group=new De,this.uid=ed("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){},r.prototype.updateLayout=function(e,t,n,a){},r.prototype.updateVisual=function(e,t,n,a){},r.prototype.toggleBlurSeries=function(e,t,n){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r})();jM(Rt);F1(Rt);function nd(){var r=Je();return function(e){var t=r(e),n=e.pipelineContext,a=!!t.large,i=!!t.progressiveRender,o=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==s)&&"reset"}}var h8=Je(),ioe=nd(),_t=(function(){function r(){this.group=new De,this.uid=ed("viewChart"),this.renderTask=Lp({plan:ooe,reset:soe}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.highlight=function(e,t,n,a){var i=e.getData(a&&a.dataType);i&&UP(i,a,"emphasis")},r.prototype.downplay=function(e,t,n,a){var i=e.getData(a&&a.dataType);i&&UP(i,a,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateLayout=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateVisual=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.eachRendered=function(e){Nl(this.group,e)},r.markUpdateMethod=function(e,t){h8(e).updateMethod=t},r.protoInitialize=(function(){var e=r.prototype;e.type="chart"})(),r})();function FP(r,e,t){r&&Kp(r)&&(e==="emphasis"?$o:Ko)(r,t)}function UP(r,e,t){var n=uc(r,e),a=e&&e.highlightKey!=null?kne(e.highlightKey):null;n!=null?O(Lt(n),function(i){FP(r.getItemGraphicEl(i),t,a)}):r.eachItemGraphicEl(function(i){FP(i,t,a)})}jM(_t);F1(_t);function ooe(r){return ioe(r.model)}function soe(r){var e=r.model,t=r.ecModel,n=r.api,a=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=a&&h8(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,a),loe[l]}var loe={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Px="\0__throttleOriginMethod",YP="\0__throttleRate",WP="\0__throttleType";function ab(r,e,t){var n,a=0,i=0,o=null,s,l,u,c;e=e||0;function f(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var d=function(){for(var v=[],g=0;g<arguments.length;g++)v[g]=arguments[g];n=new Date().getTime(),l=this,u=v;var x=c||e,y=c||t;c=null,s=n-(y?a:i)-x,clearTimeout(o),y?o=setTimeout(f,x):s>=0?f():o=setTimeout(f,-s),a=n};return d.clear=function(){o&&(clearTimeout(o),o=null)},d.debounceNextCall=function(v){c=v},d}function ad(r,e,t,n){var a=r[e];if(a){var i=a[Px]||a,o=a[WP],s=a[YP];if(s!==t||o!==n){if(t==null||!n)return r[e]=i;a=r[e]=ab(i,t,n==="debounce"),a[Px]=i,a[WP]=n,a[YP]=t}return a}}function rg(r,e){var t=r[e];t&&t[Px]&&(t.clear&&t.clear(),r[e]=t[Px])}var XP=Je(),qP={itemStyle:cc(pH,!0),lineStyle:cc(vH,!0)},uoe={lineStyle:"stroke",itemStyle:"fill"};function d8(r,e){var t=r.visualStyleMapper||qP[e];return t||(console.warn("Unknown style type '"+e+"'."),qP.itemStyle)}function v8(r,e){var t=r.visualDrawType||uoe[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var coe={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=d8(r,n),o=i(a),s=a.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=v8(r,n),u=o[l],c=Ae(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var d=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=d,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Ae(o.fill)?d:o.fill,o.stroke=o.stroke==="auto"||Ae(o.stroke)?d:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(v,g){var x=r.getDataParams(g),y=ie({},o);y[l]=c(x),v.setItemVisual(g,"style",y)}}}},Av=new et,foe={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=d8(r,n),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Av.option=l[n];var u=a(Av),c=o.ensureUniqueItemVisual(s,"style");ie(c,u),Av.option.decal&&(o.setItemVisual(s,"decal",Av.option.decal),Av.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},hoe={performRawSeries:!0,overallReset:function(r){var e=Te();r.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var a=t.type+"-"+n,i=e.get(a);i||(i={},e.set(a,i)),XP(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),a={},i=t.getData(),o=XP(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=v8(t,s);i.each(function(u){var c=i.getRawIndex(u);a[c]=u}),n.each(function(u){var c=a[u],f=i.getItemVisual(c,"colorFromPalette");if(f){var d=i.ensureUniqueItemVisual(c,"style"),v=n.getName(u)||u+"",g=n.count();d[l]=t.getColorFromPalette(v,o,g)}})}})}},Fy=Math.PI;function doe(r,e){e=e||{},Le(e,{text:"loading",textColor:ee.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:ee.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var t=new De,n=new qe({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var a=new ot({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new qe({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new Bg({shape:{startAngle:-Fy/2,endAngle:-Fy/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:Fy*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Fy*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=a.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),i.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var p8=(function(){function r(e,t,n,a){this._stageTaskMap=Te(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),a=n.context,i=!t&&n.progressiveEnabled&&(!a||a.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=i?n.step:null,s=a&&a.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),a=e.getData(),i=a.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=Te();e.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;n.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;O(this._allHandlers,function(a){var i=e.get(a.uid)||e.set(a.uid,{}),o="";tn(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,t,n),a.overallReset&&this._createOverallStageTask(a,i,t,n)},this)},r.prototype.prepareView=function(e,t,n,a){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=a,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},r.prototype._performStageTasks=function(e,t,n,a){a=a||{};var i=!1,o=this;O(e,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,d=c.overallTask;if(d){var v,g=d.agentStubMap;g.each(function(y){s(a,y)&&(y.dirty(),v=!0)}),v&&d.dirty(),o.updatePayload(d,n);var x=o.getPerformArgs(d,a.block);g.each(function(y){y.perform(x)}),d.perform(x)&&(i=!0)}else f&&f.each(function(y,b){s(a,y)&&y.dirty();var w=o.getPerformArgs(y,a.block);w.skip=!l.performRawSeries&&t.isSeriesFiltered(y.context.model),o.updatePayload(y,n),y.perform(w)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(n){t=n.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,n,a){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=Te(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,a).each(c);function c(f){var d=f.uid,v=s.set(d,o&&o.get(d)||Lp({plan:yoe,reset:xoe,count:_oe}));v.context={model:f,ecModel:n,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(f,v)}},r.prototype._createOverallStageTask=function(e,t,n,a){var i=this,o=t.overallTask=t.overallTask||Lp({reset:voe});o.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=Te(),u=e.seriesType,c=e.getTargetSeries,f=!0,d=!1,v="";tn(!e.createOnAllSeries,v),u?n.eachRawSeriesByType(u,g):c?c(n,a).each(g):(f=!1,O(n.getSeries(),g));function g(x){var y=x.uid,b=l.set(y,s&&s.get(y)||(d=!0,Lp({reset:poe,onDirty:moe})));b.context={model:x,overallProgress:f},b.agent=o,b.__block=f,i._pipe(x,b)}d&&o.dirty()},r.prototype._pipe=function(e,t){var n=e.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=t),a.tail&&a.tail.pipe(t),a.tail=t,t.__idxInPipeline=a.count++,t.__pipeline=a},r.wrapStageHandler=function(e,t){return Ae(e)&&(e={overallReset:e,seriesType:Soe(e)}),e.uid=ed("stageHandler"),t&&(e.visualType=t),e},r})();function voe(r){r.overallReset(r.ecModel,r.api,r.payload)}function poe(r){return r.overallProgress&&goe}function goe(){this.agent.dirty(),this.getDownstream().dirty()}function moe(){this.agent&&this.agent.dirty()}function yoe(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function xoe(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Lt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?fe(e,function(t,n){return g8(n)}):boe}var boe=g8(0);function g8(r){return function(e,t){var n=t.data,a=t.resetDefines[r];if(a&&a.dataEach)for(var i=e.start;i<e.end;i++)a.dataEach(n,i);else a&&a.progress&&a.progress(e,n)}}function _oe(r){return r.data.count()}function Soe(r){zx=null;try{r(ng,m8)}catch{}return zx}var ng={},m8={},zx;y8(ng,bD);y8(m8,HH);ng.eachSeriesByType=ng.eachRawSeriesByType=function(r){zx=r};ng.eachComponent=function(r){r.mainType==="series"&&r.subType&&(zx=r.subType)};function y8(r,e){for(var t in e.prototype)r[t]=Kt}var Ee=ee.darkColor,woe=Ee.background,Mv=function(){return{axisLine:{lineStyle:{color:Ee.axisLine}},splitLine:{lineStyle:{color:Ee.axisSplitLine}},splitArea:{areaStyle:{color:[Ee.backgroundTint,Ee.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:Ee.axisMinorSplitLine}},axisLabel:{color:Ee.axisLabel},axisName:{}}},ZP={label:{color:Ee.secondary},itemStyle:{borderColor:Ee.borderTint},dividerLineStyle:{color:Ee.border}},x8={darkMode:!0,color:Ee.theme,backgroundColor:woe,axisPointer:{lineStyle:{color:Ee.border},crossStyle:{color:Ee.borderShade},label:{color:Ee.tertiary}},legend:{textStyle:{color:Ee.secondary},pageTextStyle:{color:Ee.tertiary}},textStyle:{color:Ee.secondary},title:{textStyle:{color:Ee.primary},subtextStyle:{color:Ee.quaternary}},toolbox:{iconStyle:{borderColor:Ee.accent50}},tooltip:{backgroundColor:Ee.neutral20,defaultBorderColor:Ee.border,textStyle:{color:Ee.tertiary}},dataZoom:{borderColor:Ee.accent10,textStyle:{color:Ee.tertiary},brushStyle:{color:Ee.backgroundTint},handleStyle:{color:Ee.neutral00,borderColor:Ee.accent20},moveHandleStyle:{color:Ee.accent40},emphasis:{handleStyle:{borderColor:Ee.accent50}},dataBackground:{lineStyle:{color:Ee.accent30},areaStyle:{color:Ee.accent20}},selectedDataBackground:{lineStyle:{color:Ee.accent50},areaStyle:{color:Ee.accent30}}},visualMap:{textStyle:{color:Ee.secondary},handleStyle:{borderColor:Ee.neutral30}},timeline:{lineStyle:{color:Ee.accent10},label:{color:Ee.tertiary},controlStyle:{color:Ee.accent30,borderColor:Ee.accent30}},calendar:{itemStyle:{color:Ee.neutral00,borderColor:Ee.neutral20},dayLabel:{color:Ee.tertiary},monthLabel:{color:Ee.secondary},yearLabel:{color:Ee.secondary}},matrix:{x:ZP,y:ZP,backgroundColor:{borderColor:Ee.axisLine},body:{itemStyle:{borderColor:Ee.borderTint}}},timeAxis:Mv(),logAxis:Mv(),valueAxis:Mv(),categoryAxis:Mv(),line:{symbol:"circle"},graph:{color:Ee.theme},gauge:{title:{color:Ee.secondary},axisLine:{lineStyle:{color:[[1,Ee.neutral05]]}},axisLabel:{color:Ee.axisLabel},detail:{color:Ee.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:Ee.background}},radar:(function(){var r=Mv();return r.axisName={color:Ee.axisLabel},r.axisLine.lineStyle.color=Ee.neutral20,r})(),treemap:{breadcrumb:{itemStyle:{color:Ee.neutral20,textStyle:{color:Ee.secondary}},emphasis:{itemStyle:{color:Ee.neutral30}}}},sunburst:{itemStyle:{borderColor:Ee.background}},map:{itemStyle:{borderColor:Ee.border,areaColor:Ee.neutral10},label:{color:Ee.tertiary},emphasis:{label:{color:Ee.primary},itemStyle:{areaColor:Ee.highlight}},select:{label:{color:Ee.primary},itemStyle:{areaColor:Ee.highlight}}},geo:{itemStyle:{borderColor:Ee.border,areaColor:Ee.neutral10},emphasis:{label:{color:Ee.primary},itemStyle:{areaColor:Ee.highlight}},select:{label:{color:Ee.primary},itemStyle:{color:Ee.highlight}}}};x8.categoryAxis.splitLine.show=!1;var Toe=(function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},n={},a={};if(ye(e)){var i=Pi(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};O(e,function(l,u){for(var c=!1,f=0;f<o.length;f++){var d=o[f],v=u.lastIndexOf(d);if(v>0&&v===u.length-d.length){var g=u.slice(0,v);g!=="data"&&(t.mainType=g,t[d.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(a[u]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:a}},r.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.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,i,"name")&&c(u,i,"dataIndex")&&c(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,i));function c(f,d,v,g){return f[v]==null||d[g||v]===f[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),PC=["symbol","symbolSize","symbolRotate","symbolOffset"],$P=PC.concat(["symbolKeepAspect"]),Coe={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o<PC.length;o++){var s=PC[o],l=r.get(s);Ae(l)?(i=!0,a[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,t.setVisual(ie({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),e.isSeriesFiltered(r))return;var u=it(a);function c(f,d){for(var v=r.getRawValue(d),g=r.getDataParams(d),x=0;x<u.length;x++){var y=u[x];f.setItemVisual(d,y,a[y](v,g))}}return{dataEach:i?c:null}}},Aoe={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!r.hasSymbolVisual||e.isSeriesFiltered(r))return;var t=r.getData();function n(a,i){for(var o=a.getItemModel(i),s=0;s<$P.length;s++){var l=$P[s],u=o.getShallow(l,!0);u!=null&&a.setItemVisual(i,l,u)}}return{dataEach:t.hasItemOption?n:null}}};function CD(r,e,t){switch(t){case"color":var n=r.getItemVisual(e,"style");return n[r.getVisual("drawType")];case"opacity":return r.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(e,t)}}function Ug(r,e){switch(e){case"color":var t=r.getVisual("style");return t[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(e)}}function b8(r,e,t,n){switch(t){case"color":var a=r.ensureUniqueItemVisual(e,"style");a[r.getVisual("drawType")]=n,r.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(e,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(e,t,n);break}}function _8(r,e){function t(n,a){var i=[];return n.eachComponent({mainType:"series",subType:r,query:a},function(o){i.push(o.seriesIndex)}),i}O([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(n){e(n[0],function(a,i,o){a=ie({},a),o.dispatchAction(ie(a,{type:n[1],seriesIndex:t(i,a)}))})})}function Af(r,e,t,n,a){var i=r+e;t.isSilent(i)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=a.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),d=uc(f,a.fromActionPayload);t.trigger(i,{type:i,seriesId:o.id,name:ce(d)?f.getName(d[0]):f.getName(d),selected:ye(l)?l:ie({},l)})}})}function Moe(r,e,t){r.on("selectchanged",function(n){var a=t.getModel();n.isFromClick?(Af("map","selectchanged",e,a,n),Af("pie","selectchanged",e,a,n)):n.fromAction==="select"?(Af("map","selected",e,a,n),Af("pie","selected",e,a,n)):n.fromAction==="unselect"&&(Af("map","unselected",e,a,n),Af("pie","unselected",e,a,n))})}function Vu(r,e,t){for(var n;r&&!(e(r)&&(n=r,t));)r=r.__hostTarget||r.parent;return n}var Doe=Math.round(Math.random()*9),Noe=typeof Object.defineProperty=="function",Loe=(function(){function r(){this._id="__ec_inner_"+Doe++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var n=this._guard(e);return Noe?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},r.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},r.prototype.has=function(e){return!!this._guard(e)[this._id]},r.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},r})(),Roe=tt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,a=e.width/2,i=e.height/2;r.moveTo(t,n-i),r.lineTo(t+a,n+i),r.lineTo(t-a,n+i),r.closePath()}}),Eoe=tt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,a=e.width/2,i=e.height/2;r.moveTo(t,n-i),r.lineTo(t+a,n),r.lineTo(t,n+i),r.lineTo(t-a,n),r.closePath()}}),koe=tt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.x,n=e.y,a=e.width/5*3,i=Math.max(a,e.height),o=a/2,s=o*o/(i-o),l=n-i+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),d=Math.cos(u),v=o*.6,g=o*.7;r.moveTo(t-c,l+s),r.arc(t,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(t+c-f*v,l+s+d*v,t,n-g,t,n),r.bezierCurveTo(t,n-g,t-c+f*v,l+s+d*v,t-c,l+s),r.closePath()}}),Ioe=tt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.height,n=e.width,a=e.x,i=e.y,o=n/3*2;r.moveTo(a,i),r.lineTo(a+o,i+t),r.lineTo(a,i+t/4*3),r.lineTo(a-o,i+t),r.lineTo(a,i),r.closePath()}}),Ooe={line:lr,rect:qe,roundRect:qe,square:qe,circle:eo,diamond:Eoe,pin:koe,arrow:Ioe,triangle:Roe},Poe={line:function(r,e,t,n,a){a.x1=r,a.y1=e+n/2,a.x2=r+t,a.y2=e+n/2},rect:function(r,e,t,n,a){a.x=r,a.y=e,a.width=t,a.height=n},roundRect:function(r,e,t,n,a){a.x=r,a.y=e,a.width=t,a.height=n,a.r=Math.min(t,n)/4},square:function(r,e,t,n,a){var i=Math.min(t,n);a.x=r,a.y=e,a.width=i,a.height=i},circle:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.r=Math.min(t,n)/2},diamond:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.width=t,a.height=n},pin:function(r,e,t,n,a){a.x=r+t/2,a.y=e+n/2,a.width=t,a.height=n},arrow:function(r,e,t,n,a){a.x=r+t/2,a.y=e+n/2,a.width=t,a.height=n},triangle:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.width=t,a.height=n}},jx={};O(Ooe,function(r,e){jx[e]=new r});var zoe=tt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var n=Ax(r,e,t),a=this.shape;return a&&a.symbolType==="pin"&&e.position==="inside"&&(n.y=t.y+t.height*.4),n},buildPath:function(r,e,t){var n=e.symbolType;if(n!=="none"){var a=jx[n];a||(n="rect",a=jx[n]),Poe[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(r,a.shape,t)}}});function joe(r,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=r,t.fill=e||ee.color.neutral00,t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=r:t.fill=r,this.markRedraw()}}function ur(r,e,t,n,a,i,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=$M(r.slice(8),new Ie(e,t,n,a),o?"center":"cover"):r.indexOf("path://")===0?l=Lh(r.slice(7),{},new Ie(e,t,n,a),o?"center":"cover"):l=new zoe({shape:{symbolType:r,x:e,y:t,width:n,height:a}}),l.__isEmptyBrush=s,l.setColor=joe,i&&l.setColor(i),l}function id(r){return ce(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function Tc(r,e){if(r!=null)return ce(r)||(r=[r,r]),[me(r[0],e[0])||0,me(Ce(r[1],r[0]),e[1])||0]}function Gu(r){return isFinite(r)}function Boe(r,e,t){var n=e.x==null?0:e.x,a=e.x2==null?1:e.x2,i=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*t.width+t.x,a=a*t.width+t.x,i=i*t.height+t.y,o=o*t.height+t.y),n=Gu(n)?n:0,a=Gu(a)?a:1,i=Gu(i)?i:0,o=Gu(o)?o:0;var s=r.createLinearGradient(n,i,a,o);return s}function Voe(r,e,t){var n=t.width,a=t.height,i=Math.min(n,a),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+t.x,s=s*a+t.y,l=l*i),o=Gu(o)?o:.5,s=Gu(s)?s:.5,l=l>=0&&Gu(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function zC(r,e,t){for(var n=e.type==="radial"?Voe(r,e,t):Boe(r,e,t),a=e.colorStops,i=0;i<a.length;i++)n.addColorStop(a[i].offset,a[i].color);return n}function Goe(r,e){if(r===e||!r&&!e)return!1;if(!r||!e||r.length!==e.length)return!0;for(var t=0;t<r.length;t++)if(r[t]!==e[t])return!0;return!1}function Uy(r){return parseInt(r,10)}function Jf(r,e,t){var n=["width","height"][e],a=["clientWidth","clientHeight"][e],i=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(t[n]!=null&&t[n]!=="auto")return parseFloat(t[n]);var s=document.defaultView.getComputedStyle(r);return(r[a]||Uy(s[n])||Uy(r.style[n]))-(Uy(s[i])||0)-(Uy(s[o])||0)|0}function Hoe(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:st(r)?[r]:ce(r)?r:null}function AD(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&Hoe(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var a=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;a&&a!==1&&(t=fe(t,function(i){return i/a}),n/=a)}return[t,n]}var Foe=new qi(!0);function Bx(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function KP(r){return typeof r=="string"&&r!=="none"}function Vx(r){var e=r.fill;return e!=null&&e!=="none"}function QP(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function JP(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function jC(r,e,t){var n=BM(e.image,e.__image,t);if(U1(n)){var a=r.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*xp),i.scaleSelf(e.scaleX||1,e.scaleY||1),a.setTransform(i)}return a}}function Uoe(r,e,t,n){var a,i=Bx(t),o=Vx(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||Foe,f=e.__dirty;if(!n){var d=t.fill,v=t.stroke,g=o&&!!d.colorStops,x=i&&!!v.colorStops,y=o&&!!d.image,b=i&&!!v.image,w=void 0,T=void 0,C=void 0,D=void 0,M=void 0;(g||x)&&(M=e.getBoundingRect()),g&&(w=f?zC(r,d,M):e.__canvasFillGradient,e.__canvasFillGradient=w),x&&(T=f?zC(r,v,M):e.__canvasStrokeGradient,e.__canvasStrokeGradient=T),y&&(C=f||!e.__canvasFillPattern?jC(r,d,e):e.__canvasFillPattern,e.__canvasFillPattern=C),b&&(D=f||!e.__canvasStrokePattern?jC(r,v,e):e.__canvasStrokePattern,e.__canvasStrokePattern=D),g?r.fillStyle=w:y&&(C?r.fillStyle=C:o=!1),x?r.strokeStyle=T:b&&(D?r.strokeStyle=D:i=!1)}var N=e.getGlobalScale();c.setScale(N[0],N[1],e.segmentIgnoreThreshold);var R,E;r.setLineDash&&t.lineDash&&(a=AD(e),R=a[0],E=a[1]);var k=!0;(u||f&Uf)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),k=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),k&&c.rebuildPath(r,l?s:1),R&&(r.setLineDash(R),r.lineDashOffset=E),n||(t.strokeFirst?(i&&JP(r,t),o&&QP(r,t)):(o&&QP(r,t),i&&JP(r,t))),R&&r.setLineDash([])}function Yoe(r,e,t){var n=e.__image=BM(t.image,e.__image,e,e.onload);if(!(!n||!U1(n))){var a=t.x||0,i=t.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),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;r.drawImage(n,u,c,t.sWidth,t.sHeight,a,i,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,f=o-u,d=s-c;r.drawImage(n,u,c,f,d,a,i,o,s)}else r.drawImage(n,a,i,o,s)}}function Woe(r,e,t){var n,a=t.text;if(a!=null&&(a+=""),a){r.font=t.font||qo,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=AD(e),i=n[0],o=n[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(Bx(t)&&r.strokeText(a,t.x,t.y),Vx(t)&&r.fillText(a,t.x,t.y)):(Vx(t)&&r.fillText(a,t.x,t.y),Bx(t)&&r.strokeText(a,t.x,t.y)),i&&r.setLineDash([])}}var e5=["shadowBlur","shadowOffsetX","shadowOffsetY"],t5=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function S8(r,e,t,n,a){var i=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){Pn(r,a),i=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?Ju.opacity:o}(n||e.blend!==t.blend)&&(i||(Pn(r,a),i=!0),r.globalCompositeOperation=e.blend||Ju.blend);for(var s=0;s<e5.length;s++){var l=e5[s];(n||e[l]!==t[l])&&(i||(Pn(r,a),i=!0),r[l]=r.dpr*(e[l]||0))}return(n||e.shadowColor!==t.shadowColor)&&(i||(Pn(r,a),i=!0),r.shadowColor=e.shadowColor||Ju.shadowColor),i}function r5(r,e,t,n,a){var i=ag(e,a.inHover),o=n?null:t&&ag(t,a.inHover)||{};if(i===o)return!1;var s=S8(r,i,o,n,a);if((n||i.fill!==o.fill)&&(s||(Pn(r,a),s=!0),KP(i.fill)&&(r.fillStyle=i.fill)),(n||i.stroke!==o.stroke)&&(s||(Pn(r,a),s=!0),KP(i.stroke)&&(r.strokeStyle=i.stroke)),(n||i.opacity!==o.opacity)&&(s||(Pn(r,a),s=!0),r.globalAlpha=i.opacity==null?1:i.opacity),e.hasStroke()){var l=i.lineWidth,u=l/(i.strokeNoScale&&e.getLineScale?e.getLineScale():1);r.lineWidth!==u&&(s||(Pn(r,a),s=!0),r.lineWidth=u)}for(var c=0;c<t5.length;c++){var f=t5[c],d=f[0];(n||i[d]!==o[d])&&(s||(Pn(r,a),s=!0),r[d]=i[d]||f[1])}return s}function Xoe(r,e,t,n,a){return S8(r,ag(e,a.inHover),t&&ag(t,a.inHover),n,a)}function w8(r,e){var t=e.transform,n=r.dpr||1;t?r.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):r.setTransform(n,0,0,n,0,0)}function qoe(r,e,t){for(var n=!1,a=0;a<r.length;a++){var i=r[a];n=n||i.isZeroArea(),w8(e,i),e.beginPath(),i.buildPath(e,i.shape),e.clip()}t.allClipped=n}function Zoe(r,e){return r&&e?r[0]!==e[0]||r[1]!==e[1]||r[2]!==e[2]||r[3]!==e[3]||r[4]!==e[4]||r[5]!==e[5]:!(!r&&!e)}var n5=1,a5=2,i5=3,o5=4;function $oe(r){var e=Vx(r),t=Bx(r);return!(r.lineDash||!(+e^+t)||e&&typeof r.fill!="string"||t&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function Pn(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function ag(r,e){return e&&r.__hoverStyle||r.style}function MD(r,e){Hu(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Hu(r,e,t,n){var a=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~Jn,e.__isRendered=!1;return}var i=e.__clipPaths,o=t.prevElClipPaths,s=!1,l=!1;if((!o||Goe(i,o))&&(o&&o.length&&(Pn(r,t),r.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),i&&i.length&&(Pn(r,t),r.save(),qoe(i,r,t),s=!0),t.prevElClipPaths=i),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=t.prevEl;u||(l=s=!0);var c=e instanceof tt&&e.autoBatch&&$oe(e.style);s||Zoe(a,u.transform)?(Pn(r,t),w8(r,e)):c||Pn(r,t);var f=ag(e,t.inHover);e instanceof tt?(t.lastDrawType!==n5&&(l=!0,t.lastDrawType=n5),r5(r,e,u,l,t),(!c||!t.batchFill&&!t.batchStroke)&&r.beginPath(),Uoe(r,e,f,c),c&&(t.batchFill=f.fill||"",t.batchStroke=f.stroke||"")):e instanceof Nh?(t.lastDrawType!==i5&&(l=!0,t.lastDrawType=i5),r5(r,e,u,l,t),Woe(r,e,f)):e instanceof kr?(t.lastDrawType!==a5&&(l=!0,t.lastDrawType=a5),Xoe(r,e,u,l,t),Yoe(r,e,f)):e.getTemporalDisplayables&&(t.lastDrawType!==o5&&(l=!0,t.lastDrawType=o5),Koe(r,e,t)),c&&n&&Pn(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function Koe(r,e,t){var n=e.getDisplayables(),a=e.getTemporalDisplayables();r.save();var i={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Hu(r,l,i,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}for(var u=0,c=a.length;u<c;u++){var l=a[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Hu(r,l,i,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var Iw=new Loe,s5=new Ah(100),l5=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function kh(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),n=e.getZr(),a=n.painter.type==="svg";r.dirty&&Iw.delete(r);var i=Iw.get(r);if(i)return i;var o=Le(r,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=a?1:1/t,Iw.set(r,s),r.dirty=!1,s;function l(u){for(var c=[t],f=!0,d=0;d<l5.length;++d){var v=o[l5[d]];if(v!=null&&!ce(v)&&!ye(v)&&!st(v)&&typeof v!="boolean"){f=!1;break}c.push(v)}var g;if(f){g=c.join(",")+(a?"-svg":"");var x=s5.get(g);x&&(a?u.svgElement=x:u.image=x)}var y=C8(o.dashArrayX),b=Qoe(o.dashArrayY),w=T8(o.symbol),T=Joe(y),C=A8(b),D=!a&&jn.createCanvas(),M=a&&{tag:"g",attrs:{},key:"dcl",children:[]},N=E(),R;D&&(D.width=N.width*t,D.height=N.height*t,R=D.getContext("2d")),k(),f&&s5.put(g,D||M),u.image=D,u.svgElement=M,u.svgWidth=N.width,u.svgHeight=N.height;function E(){for(var I=1,z=0,P=T.length;z<P;++z)I=TO(I,T[z]);for(var G=1,z=0,P=w.length;z<P;++z)G=TO(G,w[z].length);I*=G;var U=C*T.length*w.length;return{width:Math.max(1,Math.min(I,o.maxTileWidth)),height:Math.max(1,Math.min(U,o.maxTileHeight))}}function k(){R&&(R.clearRect(0,0,D.width,D.height),o.backgroundColor&&(R.fillStyle=o.backgroundColor,R.fillRect(0,0,D.width,D.height)));for(var I=0,z=0;z<b.length;++z)I+=b[z];if(I<=0)return;for(var P=-C,G=0,U=0,B=0;P<N.height;){if(G%2===0){for(var F=U/2%w.length,H=0,X=0,V=0;H<N.width*2;){for(var W=0,z=0;z<y[B].length;++z)W+=y[B][z];if(W<=0)break;if(X%2===0){var $=(1-o.symbolSize)*.5,te=H+y[B][X]*$,ue=P+b[G]*$,ge=y[B][X]*o.symbolSize,Se=b[G]*o.symbolSize,Xe=V/2%w[F].length;be(te,ue,ge,Se,w[F][Xe])}H+=y[B][X],++V,++X,X===y[B].length&&(X=0)}++B,B===y.length&&(B=0)}P+=b[G],++U,++G,G===b.length&&(G=0)}function be(we,ze,oe,pe,je){var Ne=a?1:t,at=ur(je,we*Ne,ze*Ne,oe*Ne,pe*Ne,o.color,o.symbolKeepAspect);if(a){var ft=n.painter.renderOneToVNode(at);ft&&M.children.push(ft)}else MD(R,at)}}}}function T8(r){if(!r||r.length===0)return[["rect"]];if(ye(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!ye(r[t])){e=!1;break}if(e)return T8([r]);for(var n=[],t=0;t<r.length;++t)ye(r[t])?n.push([r[t]]):n.push(r[t]);return n}function C8(r){if(!r||r.length===0)return[[0,0]];if(st(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,n=0;n<r.length;++n)if(!st(r[n])){t=!1;break}if(t)return C8([r]);for(var a=[],n=0;n<r.length;++n)if(st(r[n])){var e=Math.ceil(r[n]);a.push([e,e])}else{var e=fe(r[n],function(s){return Math.ceil(s)});e.length%2===1?a.push(e.concat(e)):a.push(e)}return a}function Qoe(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(st(r)){var e=Math.ceil(r);return[e,e]}var t=fe(r,function(n){return Math.ceil(n)});return r.length%2?t.concat(t):t}function Joe(r){return fe(r,function(e){return A8(e)})}function A8(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function ese(r,e){r.eachRawSeries(function(t){if(!r.isSeriesFiltered(t)){var n=t.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=kh(s,e)}});var a=n.getVisual("decal");if(a){var i=n.getVisual("style");i.decal=kh(a,e)}}})}var Xa=new za,M8={};function tse(r,e){M8[r]=e}function D8(r){return M8[r]}var N8={};function L8(r,e){N8[r]=e}function rse(r){return N8[r]}var nse="6.0.0",ase={zrender:"6.0.0"},ise=1,ose=800,sse=900,lse=1e3,use=2e3,cse=5e3,R8=1e3,fse=1100,DD=2e3,E8=3e3,hse=4e3,ib=4500,dse=4600,vse=5e3,pse=6e3,k8=7e3,I8={PROCESSOR:{FILTER:lse,SERIES_FILTER:ose,STATISTIC:cse},VISUAL:{LAYOUT:R8,PROGRESSIVE_LAYOUT:fse,GLOBAL:DD,CHART:E8,POST_CHART_LAYOUT:dse,COMPONENT:hse,BRUSH:vse,CHART_ITEM:ib,ARIA:pse,DECAL:k8}},yr="__flagInMainProcess",Yy="__mainProcessVersion",jr="__pendingUpdate",Ow="__needsUpdateStatus",u5=/^[a-zA-Z0-9_]+$/,Pw="__connectUpdateStatus",c5=0,gse=1,mse=2;function O8(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return z8(this,r,e)}}function P8(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return z8(this,r,e)}}function z8(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),za.prototype[e].apply(r,t)}var j8=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(za),B8=j8.prototype;B8.on=P8("on");B8.off=P8("off");var xu,zw,Wy,_o,Xy,jw,Bw,Mf,Df,f5,h5,Vw,d5,qy,v5,V8,ya,p5,Nf,Gx=(function(r){K(e,r);function e(t,n,a){var i=r.call(this,new Toe)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],a=a||{},i._dom=t;var o="canvas",s="auto",l=!1;i[Yy]=1,a.ssr&&h6(function(d){var v=Pe(d),g=v.dataIndex;if(g!=null){var x=Te();return x.set("series_index",v.seriesIndex),x.set("data_index",g),v.ssrType&&x.set("ssr_type",v.ssrType),x}});var u=i._zr=oC(t,{renderer:a.renderer||o,devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height,ssr:a.ssr,useDirtyRect:Ce(a.useDirtyRect,l),useCoarsePointer:Ce(a.useCoarsePointer,s),pointerSize:a.pointerSize});i._ssr=a.ssr,i._throttledZrFlush=ab(xe(u.flush,u),17),i._updateTheme(n),i._locale=wae(a.locale||gH),i._coordSysMgr=new rd;var c=i._api=v5(i);function f(d,v){return d.__prio-v.__prio}return j0(Fx,f),j0(GC,f),i._scheduler=new p8(i,c,GC,Fx),i._messageCenter=new j8,i._initEvents(),i.resize=xe(i.resize,i),u.animation.on("frame",i._onframe,i),f5(u,i),h5(u,i),Hp(i),i}return e.prototype._onframe=function(){if(!this._disposed){p5(this);var t=this._scheduler;if(this[jr]){var n=this[jr].silent;this[yr]=!0,Nf(this);try{xu(this),_o.update.call(this,null,this[jr].updateParams)}catch(l){throw this[yr]=!1,this[jr]=null,l}this._zr.flush(),this[yr]=!1,this[jr]=null,Mf.call(this,n),Df.call(this,n)}else if(t.unfinished){var a=ise,i=this._model,o=this._api;t.unfinished=!1;do{var s=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),jw(this,i),t.performVisualTasks(i),qy(this,this._model,o,"remain",{}),a-=+new Date-s}while(a>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,n,a){if(!this[yr]){if(this._disposed){this.id;return}var i,o,s;if(Re(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[yr]=!0,Nf(this),!this._model||n){var l=new oie(this._api),u=this._theme,c=this._model=new bD;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},HC);var f={seriesTransition:s,optionChanged:!0};if(a)this[jr]={silent:i,updateParams:f},this[yr]=!1,this.getZr().wakeUp();else{try{xu(this),_o.update.call(this,null,f)}catch(d){throw this[jr]=null,this[yr]=!1,d}this._ssr||this._zr.flush(),this[jr]=null,this[yr]=!1,Mf.call(this,i),Df.call(this,i)}}},e.prototype.setTheme=function(t,n){if(!this[yr]){if(this._disposed){this.id;return}var a=this._model;if(a){var i=n&&n.silent,o=null;this[jr]&&(i==null&&(i=this[jr].silent),o=this[jr].updateParams,this[jr]=null),this[yr]=!0,Nf(this);try{this._updateTheme(t),a.setTheme(this._theme),xu(this),_o.update.call(this,{type:"setTheme"},o)}catch(s){throw this[yr]=!1,s}this[yr]=!1,Mf.call(this,i),Df.call(this,i)}}},e.prototype._updateTheme=function(t){ye(t)&&(t=G8[t]),t&&(t=Me(t),t&&UH(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||nt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var n=this._zr.painter;return n.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr,n=t.storage.getDisplayList();return O(n,function(a){a.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var n=t.excludeComponents,a=this._model,i=[],o=this;O(n,function(l){a.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(i.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return O(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var n=t.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(Ux[a]){var l=s,u=s,c=-s,f=-s,d=[],v=t&&t.pixelRatio||this.getDevicePixelRatio();O(rc,function(T,C){if(T.group===a){var D=n?T.getZr().painter.getSvgDom().innerHTML:T.renderToCanvas(Me(t)),M=T.getDom().getBoundingClientRect();l=i(M.left,l),u=i(M.top,u),c=o(M.right,c),f=o(M.bottom,f),d.push({dom:D,left:M.left,top:M.top})}}),l*=v,u*=v,c*=v,f*=v;var g=c-l,x=f-u,y=jn.createCanvas(),b=oC(y,{renderer:n?"svg":"canvas"});if(b.resize({width:g,height:x}),n){var w="";return O(d,function(T){var C=T.left-l,D=T.top-u;w+='<g transform="translate('+C+","+D+')">'+T.dom+"</g>"}),b.painter.getSvgRoot().innerHTML=w,t.connectedBackgroundColor&&b.painter.setBackgroundColor(t.connectedBackgroundColor),b.refreshImmediately(),b.painter.toDataURL()}else return t.connectedBackgroundColor&&b.add(new qe({shape:{x:0,y:0,width:g,height:x},style:{fill:t.connectedBackgroundColor}})),O(d,function(T){var C=new kr({style:{x:T.left*v-l,y:T.top*v-u,image:T.dom}});b.add(C)}),b.refreshImmediately(),y.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n,a){return Xy(this,"convertToPixel",t,n,a)},e.prototype.convertToLayout=function(t,n,a){return Xy(this,"convertToLayout",t,n,a)},e.prototype.convertFromPixel=function(t,n,a){return Xy(this,"convertFromPixel",t,n,a)},e.prototype.containPixel=function(t,n){if(this._disposed){this.id;return}var a=this._model,i,o=oh(a,t);return O(o,function(s,l){l.indexOf("Models")>=0&&O(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)i=i||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(i=i||f.containPoint(n,u))}},this)},this),!!i},e.prototype.getVisual=function(t,n){var a=this._model,i=oh(a,t,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?CD(s,l,n):Ug(s,n)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;O(yse,function(a){var i=function(o){var s=t.getModel(),l=o.target,u,c=a==="globalout";if(c?u={}:l&&Vu(l,function(x){var y=Pe(x);if(y&&y.dataIndex!=null){var b=y.dataModel||s.getSeriesByIndex(y.seriesIndex);return u=b&&b.getDataParams(y.dataIndex,y.dataType,l)||{},!0}else if(y.eventData)return u=ie({},y.eventData),!0},!0),u){var f=u.componentType,d=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",d=u.seriesIndex);var v=f&&d!=null&&s.getComponent(f,d),g=v&&t[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];u.event=o,u.type=a,t._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:v,view:g},t.trigger(a,u)}};i.zrEventfulCallAtLast=!0,t._zr.on(a,i,t)});var n=this._messageCenter;O(VC,function(a,i){n.on(i,function(o){t.trigger(i,o)})}),Moe(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 t=this.getDom();t&&T6(this.getDom(),LD,"");var n=this,a=n._api,i=n._model;O(n._componentsViews,function(o){o.dispose(i,a)}),O(n._chartsViews,function(o){o.dispose(i,a)}),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 rc[n.id]},e.prototype.resize=function(t){if(!this[yr]){if(this._disposed){this.id;return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=t&&t.silent;this[jr]&&(i==null&&(i=this[jr].silent),a=!0,this[jr]=null),this[yr]=!0,Nf(this);try{a&&xu(this),_o.update.call(this,{type:"resize",animation:ie({duration:0},t&&t.animation)})}catch(o){throw this[yr]=!1,o}this[yr]=!1,Mf.call(this,i),Df.call(this,i)}}},e.prototype.showLoading=function(t,n){if(this._disposed){this.id;return}if(Re(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!!FC[t]){var a=FC[t](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=ie({},t);return n.type=BC[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){this.id;return}if(Re(n)||(n={silent:!!n}),!!Hx[t.type]&&this._model){if(this[yr]){this._pendingActions.push(t);return}var a=n.silent;Bw.call(this,t,a);var i=n.flush;i?this._zr.flush():i!==!1&&nt.browser.weChat&&this._throttledZrFlush(),Mf.call(this,a),Df.call(this,a)}},e.prototype.updateLabelLayout=function(){Xa.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var n=t.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=(function(){xu=function(f){var d=f._scheduler;d.restorePipelines(f._model),d.prepareStageTasks(),zw(f,!0),zw(f,!1),d.plan()},zw=function(f,d){for(var v=f._model,g=f._scheduler,x=d?f._componentsViews:f._chartsViews,y=d?f._componentsMap:f._chartsMap,b=f._zr,w=f._api,T=0;T<x.length;T++)x[T].__alive=!1;d?v.eachComponent(function(M,N){M!=="series"&&C(N)}):v.eachSeries(C);function C(M){var N=M.__requireNewView;M.__requireNewView=!1;var R="_ec_"+M.id+"_"+M.type,E=!N&&y[R];if(!E){var k=Pi(M.type),I=d?Rt.getClass(k.main,k.sub):_t.getClass(k.sub);E=new I,E.init(v,w),y[R]=E,x.push(E),b.add(E.group)}M.__viewId=E.__id=R,E.__alive=!0,E.__model=M,E.group.__ecComponentInfo={mainType:M.mainType,index:M.componentIndex},!d&&g.prepareView(E,M,v,w)}for(var T=0;T<x.length;){var D=x[T];D.__alive?T++:(!d&&D.renderTask.dispose(),b.remove(D.group),D.dispose(v,w),x.splice(T,1),y[D.__id]===D&&delete y[D.__id],D.__id=D.group.__ecComponentInfo=null)}},Wy=function(f,d,v,g,x){var y=f._model;if(y.setUpdatePayload(v),!g){O([].concat(f._componentsViews).concat(f._chartsViews),D);return}var b={};b[g+"Id"]=v[g+"Id"],b[g+"Index"]=v[g+"Index"],b[g+"Name"]=v[g+"Name"];var w={mainType:g,query:b};x&&(w.subType=x);var T=v.excludeSeriesId,C;T!=null&&(C=Te(),O(Lt(T),function(M){var N=xr(M,null);N!=null&&C.set(N,!0)})),y&&y.eachComponent(w,function(M){var N=C&&C.get(M.id)!=null;if(!N)if(JO(v))if(M instanceof Tt)v.type===ec&&!v.notBlur&&!M.get(["emphasis","disabled"])&&Cne(M,v,f._api);else{var R=WM(M.mainType,M.componentIndex,v.name,f._api),E=R.focusSelf,k=R.dispatchers;v.type===ec&&E&&!v.notBlur&&yC(M.mainType,M.componentIndex,f._api),k&&O(k,function(I){v.type===ec?$o(I):Ko(I)})}else bC(v)&&M instanceof Tt&&(Dne(M,v,f._api),KO(M),ya(f))},f),y&&y.eachComponent(w,function(M){var N=C&&C.get(M.id)!=null;N||D(f[g==="series"?"_chartsMap":"_componentsMap"][M.__viewId])},f);function D(M){M&&M.__alive&&M[d]&&M[d](M.__model,y,f._api,v)}},_o={prepareAndUpdate:function(f){xu(this),_o.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,d){var v=this._model,g=this._api,x=this._zr,y=this._coordSysMgr,b=this._scheduler;if(v){v.setUpdatePayload(f),b.restoreData(v,f),b.performSeriesTasks(v),y.create(v,g),b.performDataProcessorTasks(v,f),jw(this,v),y.update(v,g),n(v),b.performVisualTasks(v,f);var w=v.get("backgroundColor")||"transparent";x.setBackgroundColor(w);var T=v.get("darkMode");T!=null&&T!=="auto"&&x.setDarkMode(T),Vw(this,v,g,f,d),Xa.trigger("afterupdate",v,g)}},updateTransform:function(f){var d=this,v=this._model,g=this._api;if(v){v.setUpdatePayload(f);var x=[];v.eachComponent(function(b,w){if(b!=="series"){var T=d.getViewOfComponentModel(w);if(T&&T.__alive)if(T.updateTransform){var C=T.updateTransform(w,v,g,f);C&&C.update&&x.push(T)}else x.push(T)}});var y=Te();v.eachSeries(function(b){var w=d._chartsMap[b.__viewId];if(w.updateTransform){var T=w.updateTransform(b,v,g,f);T&&T.update&&y.set(b.uid,1)}else y.set(b.uid,1)}),n(v),this._scheduler.performVisualTasks(v,f,{setDirty:!0,dirtyMap:y}),qy(this,v,g,f,{},y),Xa.trigger("afterupdate",v,g)}},updateView:function(f){var d=this._model;d&&(d.setUpdatePayload(f),_t.markUpdateMethod(f,"updateView"),n(d),this._scheduler.performVisualTasks(d,f,{setDirty:!0}),Vw(this,d,this._api,f,{}),Xa.trigger("afterupdate",d,this._api))},updateVisual:function(f){var d=this,v=this._model;v&&(v.setUpdatePayload(f),v.eachSeries(function(g){g.getData().clearAllVisual()}),_t.markUpdateMethod(f,"updateVisual"),n(v),this._scheduler.performVisualTasks(v,f,{visualType:"visual",setDirty:!0}),v.eachComponent(function(g,x){if(g!=="series"){var y=d.getViewOfComponentModel(x);y&&y.__alive&&y.updateVisual(x,v,d._api,f)}}),v.eachSeries(function(g){var x=d._chartsMap[g.__viewId];x.updateVisual(g,v,d._api,f)}),Xa.trigger("afterupdate",v,this._api))},updateLayout:function(f){_o.update.call(this,f)}};function t(f,d,v,g,x){if(f._disposed){f.id;return}for(var y=f._model,b=f._coordSysMgr.getCoordinateSystems(),w,T=oh(y,v),C=0;C<b.length;C++){var D=b[C];if(D[d]&&(w=D[d](y,T,g,x))!=null)return w}}Xy=t,jw=function(f,d){var v=f._chartsMap,g=f._scheduler;d.eachSeries(function(x){g.updateStreamModes(x,v[x.__viewId])})},Bw=function(f,d){var v=this,g=this.getModel(),x=f.type,y=f.escapeConnect,b=Hx[x],w=(b.update||"update").split(":"),T=w.pop(),C=w[0]!=null&&Pi(w[0]);this[yr]=!0,Nf(this);var D=[f],M=!1;f.batch&&(M=!0,D=fe(f.batch,function(B){return B=Le(ie({},B),f),B.batch=null,B}));var N=[],R,E=[],k=b.nonRefinedEventType,I=bC(f),z=JO(f);if(z&&W6(this._api),O(D,function(B){var F=b.action(B,g,v._api);if(b.refineEvent?E.push(F):R=F,R=R||ie({},B),R.type=k,N.push(R),z){var H=zM(f),X=H.queryOptionMap,V=H.mainTypeSpecified,W=V?X.keys()[0]:"series";Wy(v,T,B,W),ya(v)}else I?(Wy(v,T,B,"series"),ya(v)):C&&Wy(v,T,B,C.main,C.sub)}),T!=="none"&&!z&&!I&&!C)try{this[jr]?(xu(this),_o.update.call(this,f),this[jr]=null):_o[T].call(this,f)}catch(B){throw this[yr]=!1,B}if(M?R={type:k,escapeConnect:y,batch:N}:R=N[0],this[yr]=!1,!d){var P=void 0;if(b.refineEvent){var G=b.refineEvent(E,f,g,this._api).eventContent;tn(Re(G)),P=Le({type:b.refinedEventType},G),P.fromAction=f.type,P.fromActionPayload=f,P.escapeConnect=!0}var U=this._messageCenter;U.trigger(R.type,R),P&&U.trigger(P.type,P)}},Mf=function(f){for(var d=this._pendingActions;d.length;){var v=d.shift();Bw.call(this,v,f)}},Df=function(f){!f&&this.trigger("updated")},f5=function(f,d){f.on("rendered",function(v){d.trigger("rendered",v),f.animation.isFinished()&&!d[jr]&&!d._scheduler.unfinished&&!d._pendingActions.length&&d.trigger("finished")})},h5=function(f,d){f.on("mouseover",function(v){var g=v.target,x=Vu(g,Kp);x&&(Ane(x,v,d._api),ya(d))}).on("mouseout",function(v){var g=v.target,x=Vu(g,Kp);x&&(Mne(x,v,d._api),ya(d))}).on("click",function(v){var g=v.target,x=Vu(g,function(w){return Pe(w).dataIndex!=null},!0);if(x){var y=x.selected?"unselect":"select",b=Pe(x);d._api.dispatchAction({type:y,dataType:b.dataType,dataIndexInside:b.dataIndex,seriesIndex:b.seriesIndex,isFromClick:!0})}})};function n(f){f.clearColorPalette(),f.eachSeries(function(d){d.clearColorPalette()})}function a(f){var d=[],v=[],g=!1;if(f.eachComponent(function(w,T){var C=T.get("zlevel")||0,D=T.get("z")||0,M=T.getZLevelKey();g=g||!!M,(w==="series"?v:d).push({zlevel:C,z:D,idx:T.componentIndex,type:w,key:M})}),g){var x=d.concat(v),y,b;j0(x,function(w,T){return w.zlevel===T.zlevel?w.z-T.z:w.zlevel-T.zlevel}),O(x,function(w){var T=f.getComponent(w.type,w.idx),C=w.zlevel,D=w.key;y!=null&&(C=Math.max(y,C)),D?(C===y&&D!==b&&C++,b=D):b&&(C===y&&C++,b=""),y=C,T.setZLevel(C)})}}Vw=function(f,d,v,g,x){a(d),d5(f,d,v,g,x),O(f._chartsViews,function(y){y.__alive=!1}),qy(f,d,v,g,x),O(f._chartsViews,function(y){y.__alive||y.remove(d,v)})},d5=function(f,d,v,g,x,y){O(y||f._componentsViews,function(b){var w=b.__model;u(w,b),b.render(w,d,v,g),l(w,b),c(w,b)})},qy=function(f,d,v,g,x,y){var b=f._scheduler;x=ie(x||{},{updatedSeries:d.getSeries()}),Xa.trigger("series:beforeupdate",d,v,x);var w=!1;d.eachSeries(function(T){var C=f._chartsMap[T.__viewId];C.__alive=!0;var D=C.renderTask;b.updatePayload(D,g),u(T,C),y&&y.get(T.uid)&&D.dirty(),D.perform(b.getPerformArgs(D))&&(w=!0),C.group.silent=!!T.get("silent"),s(T,C),KO(T)}),b.unfinished=w||b.unfinished,Xa.trigger("series:layoutlabels",d,v,x),Xa.trigger("series:transition",d,v,x),d.eachSeries(function(T){var C=f._chartsMap[T.__viewId];l(T,C),c(T,C)}),o(f,d),Xa.trigger("series:afterupdate",d,v,x)},ya=function(f){f[Ow]=!0,f.getZr().wakeUp()},Nf=function(f){f[Yy]=(f[Yy]+1)%1e3},p5=function(f){f[Ow]&&(f.getZr().storage.traverse(function(d){sh(d)||i(d)}),f[Ow]=!1)};function i(f){for(var d=[],v=f.currentStates,g=0;g<v.length;g++){var x=v[g];x==="emphasis"||x==="blur"||x==="select"||d.push(x)}f.selected&&f.states.select&&d.push("select"),f.hoverState===Z1&&f.states.emphasis?d.push("emphasis"):f.hoverState===zg&&f.states.blur&&d.push("blur"),f.useStates(d)}function o(f,d){var v=f._zr,g=v.storage,x=0;g.traverse(function(y){y.isGroup||x++}),x>d.get("hoverLayerThreshold")&&!nt.node&&!nt.worker&&d.eachSeries(function(y){if(!y.preventUsingHoverLayer){var b=f._chartsMap[y.__viewId];b.__alive&&b.eachRendered(function(w){w.states.emphasis&&(w.states.emphasis.hoverLayer=!0)})}})}function s(f,d){var v=f.get("blendMode")||null;d.eachRendered(function(g){g.isGroup||(g.style.blend=v)})}function l(f,d){if(!f.preventAutoZ){var v=dc(f);d.eachRendered(function(g){return Q1(g,v.z,v.zlevel),!0})}}function u(f,d){d.eachRendered(function(v){if(!sh(v)){var g=v.getTextContent(),x=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),x&&x.stateTransition&&(x.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function c(f,d){var v=f.getModel("stateAnimation"),g=f.isAnimationEnabled(),x=v.get("duration"),y=x>0?{duration:x,delay:v.get("delay"),easing:v.get("easing")}:null;d.eachRendered(function(b){if(b.states&&b.states.emphasis){if(sh(b))return;if(b instanceof tt&&Ine(b),b.__dirty){var w=b.prevStates;w&&b.useStates(w)}if(g){b.stateTransition=y;var T=b.getTextContent(),C=b.getTextGuideLine();T&&(T.stateTransition=y),C&&(C.stateTransition=y)}b.__dirty&&i(b)}})}v5=function(f){return new((function(d){K(v,d);function v(){return d!==null&&d.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(g){for(;g;){var x=g.__ecComponentInfo;if(x!=null)return f._model.getComponent(x.mainType,x.index);g=g.parent}},v.prototype.enterEmphasis=function(g,x){$o(g,x),ya(f)},v.prototype.leaveEmphasis=function(g,x){Ko(g,x),ya(f)},v.prototype.enterBlur=function(g){H6(g),ya(f)},v.prototype.leaveBlur=function(g){YM(g),ya(f)},v.prototype.enterSelect=function(g){F6(g),ya(f)},v.prototype.leaveSelect=function(g){U6(g),ya(f)},v.prototype.getModel=function(){return f.getModel()},v.prototype.getViewOfComponentModel=function(g){return f.getViewOfComponentModel(g)},v.prototype.getViewOfSeriesModel=function(g){return f.getViewOfSeriesModel(g)},v.prototype.getMainProcessVersion=function(){return f[Yy]},v})(HH))(f)},V8=function(f){function d(v,g){for(var x=0;x<v.length;x++){var y=v[x];y[Pw]=g}}O(BC,function(v,g){f._messageCenter.on(g,function(x){if(Ux[f.group]&&f[Pw]!==c5){if(x&&x.escapeConnect)return;var y=f.makeActionFromEvent(x),b=[];O(rc,function(w){w!==f&&w.group===f.group&&b.push(w)}),d(b,c5),O(b,function(w){w[Pw]!==gse&&w.dispatchAction(y)}),d(b,mse)}})})}})(),e})(za),ND=Gx.prototype;ND.on=O8("on");ND.off=O8("off");ND.one=function(r,e,t){var n=this;function a(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];e&&e.apply&&e.apply(this,i),n.off(r,a)}this.on.call(this,r,a,t)};var yse=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var Hx={},BC={},VC={},GC=[],HC=[],Fx=[],G8={},FC={},rc={},Ux={},xse=+new Date-0,bse=+new Date-0,LD="_echarts_instance_";function _se(r,e,t){var n=!(t&&t.ssr);if(n){var a=RD(r);if(a)return a}var i=new Gx(r,e,t);return i.id="ec_"+xse++,rc[i.id]=i,n&&T6(r,LD,i.id),V8(i),Xa.trigger("afterinit",i),i}function Sse(r){if(ce(r)){var e=r;r=null,O(e,function(t){t.group!=null&&(r=t.group)}),r=r||"g_"+bse++,O(e,function(t){t.group=r})}return Ux[r]=!0,r}function H8(r){Ux[r]=!1}var wse=H8;function Tse(r){ye(r)?r=rc[r]:r instanceof Gx||(r=RD(r)),r instanceof Gx&&!r.isDisposed()&&r.dispose()}function RD(r){return rc[_re(r,LD)]}function Cse(r){return rc[r]}function ED(r,e){G8[r]=e}function kD(r){Fe(HC,r)<0&&HC.push(r)}function ID(r,e){OD(GC,r,e,use)}function F8(r){ob("afterinit",r)}function U8(r){ob("afterupdate",r)}function ob(r,e){Xa.on(r,e)}function li(r,e,t){var n,a,i,o,s;Ae(e)&&(t=e,e=""),Re(r)?(n=r.type,a=r.event,o=r.update,s=r.publishNonRefinedEvent,t||(t=r.action),i=r.refineEvent):(n=r,a=e);function l(c){return c.toLowerCase()}a=l(a||n);var u=i?l(n):a;Hx[n]||(tn(u5.test(n)&&u5.test(a)),i&&tn(a!==n),Hx[n]={actionType:n,refinedEventType:a,nonRefinedEventType:u,update:o,action:t,refineEvent:i},VC[a]=1,i&&s&&(VC[u]=1),BC[u]=n)}function Y8(r,e){rd.register(r,e)}function Ase(r){var e=rd.get(r);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function Mse(r,e){L8(r,e)}function W8(r,e){OD(Fx,r,e,R8,"layout")}function Rl(r,e){OD(Fx,r,e,E8,"visual")}var g5=[];function OD(r,e,t,n,a){if((Ae(e)||Re(e))&&(t=e,e=n),!(Fe(g5,t)>=0)){g5.push(t);var i=p8.wrapStageHandler(t,a);i.__prio=e,i.__raw=t,r.push(i)}}function PD(r,e){FC[r]=e}function Dse(r){NG({createCanvas:r})}function X8(r,e,t){var n=D8("registerMap");n&&n(r,e,t)}function Nse(r){var e=D8("getMap");return e&&e(r)}var q8=jie;Rl(DD,coe);Rl(ib,foe);Rl(ib,hoe);Rl(DD,Coe);Rl(ib,Aoe);Rl(k8,ese);kD(UH);ID(sse,yie);PD("default",doe);li({type:ec,event:ec,update:ec},Kt);li({type:Y0,event:Y0,update:Y0},Kt);li({type:Nx,event:FM,update:Nx,action:Kt,refineEvent:zD,publishNonRefinedEvent:!0});li({type:gC,event:FM,update:gC,action:Kt,refineEvent:zD,publishNonRefinedEvent:!0});li({type:Lx,event:FM,update:Lx,action:Kt,refineEvent:zD,publishNonRefinedEvent:!0});function zD(r,e,t,n){return{eventContent:{selected:Nne(t),isFromClick:e.isFromClick||!1}}}ED("default",{});ED("dark",x8);var Lse={},m5=[],Rse={registerPreprocessor:kD,registerProcessor:ID,registerPostInit:F8,registerPostUpdate:U8,registerUpdateLifecycle:ob,registerAction:li,registerCoordinateSystem:Y8,registerLayout:W8,registerVisual:Rl,registerTransform:q8,registerLoading:PD,registerMap:X8,registerImpl:tse,PRIORITY:I8,ComponentModel:Qe,ComponentView:Rt,SeriesModel:Tt,ChartView:_t,registerComponentModel:function(r){Qe.registerClass(r)},registerComponentView:function(r){Rt.registerClass(r)},registerSeriesModel:function(r){Tt.registerClass(r)},registerChartView:function(r){_t.registerClass(r)},registerCustomSeries:function(r,e){L8(r,e)},registerSubTypeDefaulter:function(r,e){Qe.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){c6(r,e)}};function We(r){if(ce(r)){O(r,function(e){We(e)});return}Fe(m5,r)>=0||(m5.push(r),Ae(r)&&(r={install:r}),r.install(Rse))}function Dv(r){return r==null?0:r.length||1}function y5(r){return r}var Qo=(function(){function r(e,t,n,a,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||y5,this._newKeyGetter=a||y5,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},a=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,a,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=a[o],l=n[s],u=Dv(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(i,n)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},a={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,a,o,"_newKeyGetter");for(var s=0;s<i.length;s++){var l=i[s],u=n[l],c=a[l],f=Dv(u),d=Dv(c);if(f>1&&d===1)this._updateManyToOne&&this._updateManyToOne(c,u),a[l]=null;else if(f===1&&d>1)this._updateOneToMany&&this._updateOneToMany(c,u),a[l]=null;else if(f===1&&d===1)this._update&&this._update(c,u),a[l]=null;else if(f>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,u),a[l]=null;else if(f>1)for(var v=0;v<f;v++)this._remove&&this._remove(u[v]);else this._remove&&this._remove(u)}this._performRestAdd(o,a)},r.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var a=e[n],i=t[a],o=Dv(i);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(i[s]);else o===1&&this._add&&this._add(i);t[a]=null}},r.prototype._initIndexMap=function(e,t,n,a){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[a](e[o],o);if(i||(n[o]=s),!!t){var l=t[s],u=Dv(l);u===0?(t[s]=o,i&&n.push(s)):u===1?t[s]=[l,o]:l.push(o)}}},r})(),Ese=(function(){function r(e,t){this._encode=e,this._schema=t}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r})();function kse(r,e){var t={},n=t.encode={},a=Te(),i=[],o=[],s={};O(r.dimensions,function(d){var v=r.getDimensionInfo(d),g=v.coordDim;if(g){var x=v.coordDimIndex;Gw(n,g)[x]=d,v.isExtraCoord||(a.set(g,1),Ise(v.type)&&(i[0]=d),Gw(s,g)[x]=r.getDimensionIndex(v.name)),v.defaultTooltip&&o.push(d)}OH.each(function(y,b){var w=Gw(n,b),T=v.otherDims[b];T!=null&&T!==!1&&(w[T]=v.name)})});var l=[],u={};a.each(function(d,v){var g=n[v];u[v]=g[0],l=l.concat(g)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=fe(l,function(d){return r.getDimensionInfo(d).storeDimIndex}),t.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(i=c.slice());var f=n.tooltip;return f&&f.length?o=f.slice():o.length||(o=i.slice()),n.defaultedLabel=i,n.defaultedTooltip=o,t.userOutput=new Ese(s,e),t}function Gw(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function Yx(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function Ise(r){return!(r==="ordinal"||r==="time")}var Q0=(function(){function r(e){this.otherDims={},e!=null&&ie(this,e)}return r})(),Ose=Je(),Pse={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Z8=(function(){function r(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=Q8(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return Ce(this._dimNameMap.get(e),-1)},r.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},r.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=WH(this.source),n=!J8(e),a="",i=[],o=0,s=0;o<e;o++){var l=void 0,u=void 0,c=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=t?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var d=this.getSourceDimension(o);d&&(l=t?d.name:null,u=d.type)}i.push({property:l,type:u,ordinalMeta:c}),t&&l!=null&&(!f||!f.isCalculationCoord)&&(a+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),a+="$",a+=Pse[u]||"f",c&&(a+=c.uid),a+="$"}var v=this.source,g=[v.seriesLayoutBy,v.startIndex,a].join("$$");return{dimensions:i,hash:g}},r.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var a=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(a=i.name),n++;else{var o=this.getSourceDimension(t);o&&(a=o.name)}e.push(a)}return e},r.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r})();function $8(r){return r instanceof Z8}function K8(r){for(var e=Te(),t=0;t<(r||[]).length;t++){var n=r[t],a=Re(n)?n.name:n;a!=null&&e.get(a)==null&&e.set(a,t)}return e}function Q8(r){var e=Ose(r);return e.dimNameMap||(e.dimNameMap=K8(r.dimensionsDefine))}function J8(r){return r>30}var Nv=Re,Ps=fe,zse=typeof Int32Array>"u"?Array:Int32Array,jse="e\0\0",x5=-1,Bse=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Vse=["_approximateExtent"],b5,Zy,Lv,Rv,Hw,Ev,Fw,vn=(function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,a=!1;$8(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(a=!0,n=e),n=n||["x","y"];for(var i={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var f=n[c],d=ye(f)?new Q0({name:f}):f instanceof Q0?f:new Q0(f),v=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=v,d.coordDimIndex=0);var g=d.otherDims=d.otherDims||{};o.push(v),i[v]=d,u[v]!=null&&(l=!0),d.createInvertedIndices&&(s[v]=[]);var x=c;st(d.storeDimIndex)&&(x=d.storeDimIndex),g.itemName===0&&(this._nameDimIdx=x),g.itemId===0&&(this._idDimIdx=x),a&&(d.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var y=this._dimIdxToName=Te();O(o,function(b){y.set(i[b].storeDimIndex,b)})}}return r.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var a=this._schema.getSourceDimension(t);if(a)return a.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(st(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},r.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);return t},r.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},r.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(n){return t.hasOwnProperty(n)?t[n]:void 0}:function(n){return t[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var a=n.encode[e];return a?a[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,n=t.encode[e];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,n){var a=this,i;if(e instanceof EC&&(i=e),!i){var o=this.dimensions,s=_D(e)||en(e)?new XH(e,o.length):e;i=new EC;var l=Ps(o,function(u){return{type:a._dimInfos[u].type,property:u}});i.initData(s,l,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=kse(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},r.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),a=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var s=a;s<i;s++){var l=s-a;this._nameList[s]=t[l],o&&Fw(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var a=this._dimInfos[t[n]];a.ordinalMeta&&e.collectOrdinalMeta(a.storeDimIndex,a.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==vl&&!e.fillStorage},r.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===sa;if(l&&!a.pure)for(var u=[],c=e;c<t;c++){var f=a.getItem(c,u);if(!this.hasItemOption&&lre(f)&&(this.hasItemOption=!0),f){var d=f.name;i[c]==null&&d!=null&&(i[c]=xr(d,null));var v=f.id;o[c]==null&&v!=null&&(o[c]=xr(v,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<t;c++)Fw(this,c);b5(this)}},r.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},r.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},r.prototype.setCalculationInfo=function(e,t){Nv(e)?ie(this._calculationInfo,e):this._calculationInfo[e]=t},r.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=Lv(this,this._nameDimIdx,t)),n==null&&(n=""),n},r.prototype._getCategory=function(e,t){var n=this._store.get(e,t),a=this._store.getOrdinalMeta(e);return a?a.categories[n]:n},r.prototype.getId=function(e){return Zy(this,this.getRawIndex(e))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(e,t){var n=this._store,a=this._dimInfos[e];if(a)return n.get(a.storeDimIndex,t)},r.prototype.getByRawIndex=function(e,t){var n=this._store,a=this._dimInfos[e];if(a)return n.getByRawIndex(a.storeDimIndex,t)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},r.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},r.prototype.getValues=function(e,t){var n=this,a=this._store;return ce(e)?a.getValues(Ps(e,function(i){return n._getStoreDimIndex(i)}),t):a.getValues(e)},r.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,a=t.length;n<a;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},r.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},r.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},r.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},r.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],a=n&&n[t];return a==null||isNaN(a)?x5:a},r.prototype.each=function(e,t,n){Ae(e)&&(n=t,t=e,e=[]);var a=n||this,i=Ps(Rv(e),this._getStoreDimIndex,this);this._store.each(i,a?xe(t,a):t)},r.prototype.filterSelf=function(e,t,n){Ae(e)&&(n=t,t=e,e=[]);var a=n||this,i=Ps(Rv(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,a?xe(t,a):t),this},r.prototype.selectRange=function(e){var t=this,n={},a=it(e);return O(a,function(i){var o=t._getStoreDimIndex(i);n[o]=e[i]}),this._store=this._store.selectRange(n),this},r.prototype.mapArray=function(e,t,n){Ae(e)&&(n=t,t=e,e=[]),n=n||this;var a=[];return this.each(e,function(){a.push(t&&t.apply(this,arguments))},n),a},r.prototype.map=function(e,t,n,a){var i=n||a||this,o=Ps(Rv(e),this._getStoreDimIndex,this),s=Ev(this);return s._store=this._store.map(o,i?xe(t,i):t),s},r.prototype.modify=function(e,t,n,a){var i=n||a||this,o=Ps(Rv(e),this._getStoreDimIndex,this);this._store.modify(o,i?xe(t,i):t)},r.prototype.downSample=function(e,t,n,a){var i=Ev(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,a),i},r.prototype.minmaxDownSample=function(e,t){var n=Ev(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},r.prototype.lttbDownSample=function(e,t){var n=Ev(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},r.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},r.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new et(n,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new Qo(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return Zy(e,n)},function(n){return Zy(t,n)})},r.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},r.prototype.setVisual=function(e,t){this._visual=this._visual||{},Nv(e)?ie(this._visual,e):this._visual[e]=t},r.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],a=n&&n[t];return a??this.getVisual(t)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,a=n[e];a||(a=n[e]={});var i=a[t];return i==null&&(i=this.getVisual(t),ce(i)?i=i.slice():Nv(i)&&(i=ie({},i)),a[t]=i),i},r.prototype.setItemVisual=function(e,t,n){var a=this._itemVisuals[e]||{};this._itemVisuals[e]=a,Nv(t)?ie(a,t):a[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Nv(e)?ie(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?ie(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;pC(n,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){O(this._graphicEls,function(n,a){n&&e&&e.call(t,n,a)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:Ps(this.dimensions,this._getDimInfo,this),this.hostModel)),Hw(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];Ae(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var a=n.apply(this,arguments);return t.apply(this,[a].concat(P1(arguments)))})},r.internalField=(function(){b5=function(e){var t=e._invertedIndicesMap;O(t,function(n,a){var i=e._dimInfos[a],o=i.ordinalMeta,s=e._store;if(o){n=t[a]=new zse(o.categories.length);for(var l=0;l<n.length;l++)n[l]=x5;for(var l=0;l<s.count();l++)n[s.get(i.storeDimIndex,l)]=l}})},Lv=function(e,t,n){return xr(e._getCategory(t,n),null)},Zy=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Lv(e,e._idDimIdx,t)),n==null&&(n=jse+t),n},Rv=function(e){return ce(e)||(e=e!=null?[e]:[]),e},Ev=function(e){var t=new r(e._schema?e._schema:Ps(e.dimensions,e._getDimInfo,e),e.hostModel);return Hw(t,e),t},Hw=function(e,t){O(Bse.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,O(Vse,function(n){e[n]=Me(t[n])}),e._calculationInfo=ie({},t._calculationInfo)},Fw=function(e,t){var n=e._nameList,a=e._idList,i=e._nameDimIdx,o=e._idDimIdx,s=n[t],l=a[t];if(s==null&&i!=null&&(n[t]=s=Lv(e,i,t)),l==null&&o!=null&&(a[t]=l=Lv(e,o,t)),l==null&&s!=null){var u=e._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),a[t]=l}}})(),r})();function Gse(r,e){return od(r,e).dimensions}function od(r,e){_D(r)||(r=SD(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],a=Te(),i=[],o=Fse(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&J8(o),l=n===r.dimensionsDefine,u=l?Q8(r):K8(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=Te(c),d=new t8(o),v=0;v<d.length;v++)d[v]=-1;function g(E){var k=d[E];if(k<0){var I=n[E],z=Re(I)?I:{name:I},P=new Q0,G=z.name;G!=null&&u.get(G)!=null&&(P.name=P.displayName=G),z.type!=null&&(P.type=z.type),z.displayName!=null&&(P.displayName=z.displayName);var U=i.length;return d[E]=U,P.storeDimIndex=E,i.push(P),P}return i[k]}if(!s)for(var v=0;v<o;v++)g(v);f.each(function(E,k){var I=Lt(E).slice();if(I.length===1&&!ye(I[0])&&I[0]<0){f.set(k,!1);return}var z=f.set(k,[]);O(I,function(P,G){var U=ye(P)?u.get(P):P;U!=null&&U<o&&(z[G]=U,y(g(U),k,G))})});var x=0;O(t,function(E){var k,I,z,P;if(ye(E))k=E,P={};else{P=E,k=P.name;var G=P.ordinalMeta;P.ordinalMeta=null,P=ie({},P),P.ordinalMeta=G,I=P.dimsDef,z=P.otherDims,P.name=P.coordDim=P.coordDimIndex=P.dimsDef=P.otherDims=null}var U=f.get(k);if(U!==!1){if(U=Lt(U),!U.length)for(var B=0;B<(I&&I.length||1);B++){for(;x<o&&g(x).coordDim!=null;)x++;x<o&&U.push(x++)}O(U,function(F,H){var X=g(F);if(l&&P.type!=null&&(X.type=P.type),y(Le(X,P),k,H),X.name==null&&I){var V=I[H];!Re(V)&&(V={name:V}),X.name=X.displayName=V.name,X.defaultTooltip=V.defaultTooltip}z&&Le(X.otherDims,z)})}});function y(E,k,I){OH.get(k)!=null?E.otherDims[k]=I:(E.coordDim=k,E.coordDimIndex=I,a.set(k,!0))}var b=e.generateCoord,w=e.generateCoordCount,T=w!=null;w=b?w||1:0;var C=b||"value";function D(E){E.name==null&&(E.name=E.coordDim)}if(s)O(i,function(E){D(E)}),i.sort(function(E,k){return E.storeDimIndex-k.storeDimIndex});else for(var M=0;M<o;M++){var N=g(M),R=N.coordDim;R==null&&(N.coordDim=Use(C,a,T),N.coordDimIndex=0,(!b||w<=0)&&(N.isExtraCoord=!0),w--),D(N),N.type==null&&(BH(r,M)===Zr.Must||N.isExtraCoord&&(N.otherDims.itemName!=null||N.otherDims.seriesName!=null))&&(N.type="ordinal")}return Hse(i),new Z8({source:r,dimensions:i,fullDimensionCount:o,dimensionOmitted:s})}function Hse(r){for(var e=Te(),t=0;t<r.length;t++){var n=r[t],a=n.name,i=e.get(a)||0;i>0&&(n.name=a+(i-1)),i++,e.set(a,i)}}function Fse(r,e,t,n){var a=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return O(e,function(i){var o;Re(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function Use(r,e,t){if(t||e.hasKey(r)){for(var n=0;e.hasKey(r+n);)n++;r+=n}return e.set(r,!0),r}var Yse=(function(){function r(e){this.coordSysDims=[],this.axisMap=Te(),this.categoryAxisMap=Te(),this.coordSysName=e}return r})();function Wse(r){var e=r.get("coordinateSystem"),t=new Yse(e),n=Xse[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var Xse={cartesian2d:function(r,e,t,n){var a=r.getReferringComponents("xAxis",Zt).models[0],i=r.getReferringComponents("yAxis",Zt).models[0];e.coordSysDims=["x","y"],t.set("x",a),t.set("y",i),Lf(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),Lf(i)&&(n.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var a=r.getReferringComponents("singleAxis",Zt).models[0];e.coordSysDims=["single"],t.set("single",a),Lf(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var a=r.getReferringComponents("polar",Zt).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),Lf(i)&&(n.set("radius",i),e.firstCategoryDimIndex=0),Lf(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,n){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,n){var a=r.ecModel,i=a.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();O(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),c=o[l];t.set(c,u),Lf(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(r,e,t,n){var a=r.getReferringComponents("matrix",Zt).models[0];e.coordSysDims=["x","y"];var i=a.getDimensionModel("x"),o=a.getDimensionModel("y");t.set("x",i),t.set("y",o),n.set("x",i),n.set("y",o)}};function Lf(r){return r.get("type")==="category"}function eF(r,e,t){t=t||{};var n=t.byIndex,a=t.stackedCoordDimension,i,o,s;qse(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,f,d;if(O(i,function(w,T){ye(w)&&(i[T]=w={name:w}),l&&!w.isExtraCoord&&(!n&&!u&&w.ordinalMeta&&(u=w),!c&&w.type!=="ordinal"&&w.type!=="time"&&(!a||a===w.coordDim)&&(c=w))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+r.id,d="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=c.coordDim,g=c.type,x=0;O(i,function(w){w.coordDim===v&&x++});var y={name:f,coordDim:v,coordDimIndex:x,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},b={name:d,coordDim:d,coordDimIndex:x+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(y.storeDimIndex=s.ensureCalculationDimension(d,g),b.storeDimIndex=s.ensureCalculationDimension(f,g)),o.appendCalculationDimension(y),o.appendCalculationDimension(b)):(i.push(y),i.push(b))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:d,stackResultDimension:f}}function qse(r){return!$8(r.schema)}function Jo(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function jD(r,e){return Jo(r,e)?r.getCalculationInfo("stackResultDimension"):e}function Zse(r,e){var t=r.get("coordinateSystem"),n=rd.get(t),a;return e&&e.coordSysDims&&(a=fe(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=Yx(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function $se(r,e,t){var n,a;return t&&O(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(r[n].otherDims.itemName=0),n}function to(r,e,t){t=t||{};var n=e.getSourceManager(),a,i=!1;r?(i=!0,a=SD(r)):(a=n.getSource(),i=a.sourceFormat===sa);var o=Wse(e),s=Zse(e,o),l=t.useEncodeDefaulter,u=Ae(l)?l:l?He(jH,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},f=od(a,c),d=$se(f.dimensions,t.createInvertedIndices,o),v=i?null:n.getSharedDataStore(f),g=eF(e,{schema:f,store:v}),x=new vn(f,e);x.setCalculationInfo(g);var y=d!=null&&Kse(a)?function(b,w,T,C){return C===d?T:this.defaultDimValueGetter(b,w,T,C)}:null;return x.hasItemOption=!1,x.initData(i?a:v,null,y),x}function Kse(r){if(r.sourceFormat===sa){var e=Qse(r.data||[]);return!ce(Wh(e))}}function Qse(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}function UC(r){return r.type==="interval"||r.type==="log"}function Jse(r,e,t,n,a){var i={},o=i.interval=IM(e/t,!0);n!=null&&o<n&&(o=i.interval=n),a!=null&&o>a&&(o=i.interval=a);var s=i.intervalPrecision=ig(o),l=i.niceTickExtent=[sr(Math.ceil(r[0]/o)*o,s),sr(Math.floor(r[1]/o)*o,s)];return ele(l,r),i}function Uw(r){var e=Math.pow(10,H1(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,sr(t*e)}function ig(r){return $a(r)+2}function _5(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function ele(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),_5(r,0,e),_5(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function BD(r,e){return r>=e[0]&&r<=e[1]}var tle=(function(){function r(){this.normalize=S5,this.scale=w5}return r.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=xe(e.normalize,e),this.scale=xe(e.scale,e)):(this.normalize=S5,this.scale=w5)},r})();function S5(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function w5(r,e){return r*(e[1]-e[0])+e[0]}function YC(r,e,t){var n=Math.log(r);return[Math.log(t?e[0]:Math.max(0,e[0]))/n,Math.log(t?e[1]:Math.max(0,e[1]))/n]}var El=(function(){function r(e){this._calculator=new tle,this._setting=e||{},this._extent=[1/0,-1/0];var t=dr();t&&(this._brkCtx=t.createScaleBreakContext(),this._brkCtx.update(this._extent))}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]<t[0]?e[0]:t[0],e[1]>t[1]?e[1]:t[1])},r.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},r.prototype._innerSetExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t),this._brkCtx&&this._brkCtx.update(n)},r.prototype.setBreaksFromOption=function(e){var t=dr();t&&this._innerSetBreak(t.parseAxisBreakOption(e,xe(this.parse,this)))},r.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r})();F1(El);var rle=0,og=(function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++rle,this._onCollect=e.onCollect}return r.createByAxisModel=function(e){var t=e.option,n=t.data,a=n&&fe(n,nle);return new r({categories:a,needCollect:!a,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!ye(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var a=this._getOrCreateMap();return t=a.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,a.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=Te(this.categories))},r})();function nle(r){return Re(r)&&r.value!=null?r.value:r+""}var Ih=(function(r){K(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new og({})),ce(a)&&(a=new og({categories:fe(a,function(i){return Re(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:ye(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return BD(t,this._extent)&&t>=0&&t<this._ordinalMeta.categories.length},e.prototype.normalize=function(t){return t=this._getTickNumber(t),this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(this._calculator.scale(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],n=this._extent,a=n[0];a<=n[1];)t.push({value:a}),a++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=t.ordinalNumbers,a=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];a[o]=u,i[u]=o}for(var c=0;o<s;++o){for(;i[c]!=null;)c++;a.push(c),i[c]=o}},e.prototype._getTickNumber=function(t){var n=this._ticksByOrdinalNumber;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getRawOrdinalNumber=function(t){var n=this._ordinalNumbersByTick;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var n=this.getRawOrdinalNumber(t.value),a=this._ordinalMeta.categories[n];return a==null?"":a+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e})(El);El.registerClass(Ih);var zs=sr,es=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t==null||t===""?NaN:Number(t)},e.prototype.contain=function(t){return BD(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=ig(t)},e.prototype.getTicks=function(t){t=t||{};var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=dr(),l=[];if(!n)return l;if(t.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;a[0]<i[0]&&(t.expandToNicedExtent?l.push({value:zs(i[0]-n,o)}):l.push({value:a[0]}));for(var c=function(g,x){return Math.round((x-g)/n)},f=i[0];f<=i[1];){if(l.push({value:f}),f=zs(f+n,o),this._brkCtx){var d=this._brkCtx.calcNiceTickMultiple(f,c);d>=0&&(f=zs(f+d*n,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var v=l.length?l[l.length-1].value:i[1];return a[1]>v&&(t.expandToNicedExtent?l.push({value:zs(v+n,o)}):l.push({value:a[1]})),s&&s.pruneTicksByBreak(t.pruneByBreak,l,this._brkCtx.breaks,function(g){return g.value},this._interval,this._extent),t.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(t){for(var n=this.getTicks({expandToNicedExtent:!0}),a=[],i=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=[],f=s.value-l.value,d=f/t,v=ig(d);u<t-1;){var g=zs(l.value+(u+1)*d,v);g>i[0]&&g<i[1]&&c.push(g),u++}var x=dr();x&&x.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(y){return y},this._interval,i),a.push(c)}}return a},e.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.getLabel=function(t,n){if(t==null)return"";var a=n&&n.precision;a==null?a=$a(t.value)||0:a==="auto"&&(a=this._intervalPrecision);var i=zs(t.value,a,!0);return dD(i)},e.prototype.calcNiceTicks=function(t,n,a){t=t||5;var i=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,i.reverse(),this._innerSetExtent(i[0],i[1]),i=this._extent.slice());var s=Jse(i,o,t,n,a);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var n=this._extent.slice();if(n[0]===n[1])if(n[0]!==0){var a=Math.abs(n[0]);t.fixMax||(n[1]+=a/2),n[0]-=a/2}else n[1]=1;var i=n[1]-n[0];isFinite(i)||(n[0]=0,n[1]=1),this._innerSetExtent(n[0],n[1]),n=this._extent.slice(),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval,s=this._intervalPrecision;t.fixMin||(n[0]=zs(Math.floor(n[0]/o)*o,s)),t.fixMax||(n[1]=zs(Math.ceil(n[1]/o)*o,s)),this._innerSetExtent(n[0],n[1])},e.prototype.setNiceExtent=function(t,n){this._niceExtent=[t,n]},e.type="interval",e})(El);El.registerClass(es);var tF=typeof Float32Array<"u",ale=tF?Float32Array:Array;function zi(r){return ce(r)?tF?new Float32Array(r):r:new ale(r)}var WC="__ec_stack_";function rF(r){return r.get("stack")||WC+r.seriesIndex}function VD(r){return r.dim+r.index}function ile(r){var e=[],t=r.axis,n="axis0";if(t.type==="category"){for(var a=t.getBandWidth(),i=0;i<r.count;i++)e.push(Le({bandWidth:a,axisKey:n,stackId:WC+i},r));for(var o=iF(e),s=[],i=0;i<r.count;i++){var l=o[n][WC+i];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function nF(r,e){var t=[];return e.eachSeriesByType(r,function(n){lF(n)&&t.push(n)}),t}function ole(r){var e={};O(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),d=c.dim+"_"+c.index,v=f.getDimensionIndex(f.mapDimension(c.dim)),g=f.getStore(),x=0,y=g.count();x<y;++x){var b=g.get(v,x);e[d]?e[d].push(b):e[d]=[b]}});var t={};for(var n in e)if(e.hasOwnProperty(n)){var a=e[n];if(a){a.sort(function(l,u){return l-u});for(var i=null,o=1;o<a.length;++o){var s=a[o]-a[o-1];s>0&&(i=i===null?s:Math.min(i,s))}t[n]=i}}return t}function aF(r){var e=ole(r),t=[];return O(r,function(n){var a=n.coordinateSystem,i=a.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=e[l],c=Math.abs(o[1]-o[0]),f=i.scale.getExtent(),d=Math.abs(f[1]-f[0]);s=u?c/d*u:c}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var g=me(n.get("barWidth"),s),x=me(n.get("barMaxWidth"),s),y=me(n.get("barMinWidth")||(uF(n)?.5:1),s),b=n.get("barGap"),w=n.get("barCategoryGap"),T=n.get("defaultBarGap");t.push({bandWidth:s,barWidth:g,barMaxWidth:x,barMinWidth:y,barGap:b,barCategoryGap:w,defaultBarGap:T,axisKey:VD(i),stackId:rF(n)})}),iF(t)}function iF(r){var e={};O(r,function(n,a){var i=n.axisKey,o=n.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[i]=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 f=n.barMaxWidth;f&&(l[u].maxWidth=f);var d=n.barMinWidth;d&&(l[u].minWidth=d);var v=n.barGap;v!=null&&(s.gap=v);var g=n.barCategoryGap;g!=null&&(s.categoryGap=g)});var t={};return O(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=it(i).length;s=Math.max(35-l*4,15)+"%"}var u=me(s,o),c=me(n.gap,1),f=n.remainedWidth,d=n.autoWidthCount,v=(f-u)/(d+(d-1)*c);v=Math.max(v,0),O(i,function(b){var w=b.maxWidth,T=b.minWidth;if(b.width){var C=b.width;w&&(C=Math.min(C,w)),T&&(C=Math.max(C,T)),b.width=C,f-=C+c*C,d--}else{var C=v;w&&w<C&&(C=Math.min(w,f)),T&&T>C&&(C=T),C!==v&&(b.width=C,f-=C+c*C,d--)}}),v=(f-u)/(d+(d-1)*c),v=Math.max(v,0);var g=0,x;O(i,function(b,w){b.width||(b.width=v),x=b,g+=b.width*(1+c)}),x&&(g-=x.width*c);var y=-g/2;O(i,function(b,w){t[a][w]=t[a][w]||{bandWidth:o,offset:y,width:b.width},y+=b.width*(1+c)})}),t}function sle(r,e,t){if(r&&e){var n=r[VD(e)];return n}}function oF(r,e){var t=nF(r,e),n=aF(t);O(t,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=rF(a),u=n[VD(s)][l],c=u.offset,f=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function sF(r){return{seriesType:r,plan:nd(),reset:function(e){if(lF(e)){var t=e.getData(),n=e.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(a.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),c=t.getCalculationInfo("stackResultDimension"),f=Jo(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),v=lle(a,i),g=uF(e),x=e.get("barMinHeight")||0,y=c&&t.getDimensionIndex(c),b=t.getLayout("size"),w=t.getLayout("offset");return{progress:function(T,C){for(var D=T.count,M=g&&zi(D*3),N=g&&l&&zi(D*3),R=g&&zi(D),E=n.master.getRect(),k=d?E.width:E.height,I,z=C.getStore(),P=0;(I=T.next())!=null;){var G=z.get(f?y:o,I),U=z.get(s,I),B=v,F=void 0;f&&(F=+G-z.get(o,I));var H=void 0,X=void 0,V=void 0,W=void 0;if(d){var $=n.dataToPoint([G,U]);if(f){var te=n.dataToPoint([F,U]);B=te[0]}H=B,X=$[1]+w,V=$[0]-B,W=b,Math.abs(V)<x&&(V=(V<0?-1:1)*x)}else{var $=n.dataToPoint([U,G]);if(f){var te=n.dataToPoint([U,F]);B=te[1]}H=$[0]+w,X=B,V=b,W=$[1]-B,Math.abs(W)<x&&(W=(W<=0?-1:1)*x)}g?(M[P]=H,M[P+1]=X,M[P+2]=d?V:W,N&&(N[P]=d?E.x:H,N[P+1]=d?X:E.y,N[P+2]=k),R[I]=I):C.setItemLayout(I,{x:H,y:X,width:V,height:W}),P+=3}g&&C.setLayout({largePoints:M,largeDataIndices:R,largeBackgroundPoints:N,valueAxisHorizontal:d})}}}}}}function lF(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function uF(r){return r.pipelineContext&&r.pipelineContext.large}function lle(r,e){var t=e.model.get("startValue");return t||(t=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?t>0?t:1:t))}var ule=function(r,e,t,n){for(;t<n;){var a=t+n>>>1;r[a][1]<e?t=a+1:n=a}return t},GD=(function(r){K(e,r);function e(t){var n=r.call(this,t)||this;return n.type="time",n}return e.prototype.getLabel=function(t){var n=this.getSetting("useUTC");return Hg(t.value,vP[Eae(Np(this._minLevelUnit))]||vP.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,n,a){var i=this.getSetting("useUTC"),o=this.getSetting("locale");return kae(t,n,a,o,i)},e.prototype.getTicks=function(t){t=t||{};var n=this._interval,a=this._extent,i=dr(),o=[];if(!n)return o;var s=this.getSetting("useUTC");if(i&&t.breakTicks==="only_break")return dr().addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o;var l=Qf(a[1],s);o.push({value:a[0],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}});var u=gle(this._minLevelUnit,this._approxInterval,s,a,this._getExtentSpanWithBreaks(),this._brkCtx);o=o.concat(u);var c=Qf(a[1],s);o.push({value:a[1],time:{level:0,upperTimeUnit:c,lowerTimeUnit:c}});var f=this.getSetting("useUTC"),d=Zn.length-1,v=0;return O(o,function(g){d=Math.min(d,Fe(Zn,g.time.upperTimeUnit)),v=Math.max(v,g.time.level)}),i&&dr().pruneTicksByBreak(t.pruneByBreak,o,this._brkCtx.breaks,function(g){return g.value},this._approxInterval,this._extent),i&&t.breakTicks!=="none"&&dr().addBreaksToTicks(o,this._brkCtx.breaks,this._extent,function(g){for(var x=Math.max(Fe(Zn,Qf(g.vmin,f)),Fe(Zn,Qf(g.vmax,f))),y=0,b=0;b<Zn.length;b++)if(!cF(Zn[b],g.vmin,g.vmax,f)){y=b;break}var w=Math.min(y,d),T=Math.max(w,x);return{level:v,lowerTimeUnit:Zn[T],upperTimeUnit:Zn[w]}}),o},e.prototype.calcNiceExtent=function(t){var n=this.getExtent();if(n[0]===n[1]&&(n[0]-=La,n[1]+=La),n[1]===-1/0&&n[0]===1/0){var a=new Date;n[1]=+new Date(a.getFullYear(),a.getMonth(),a.getDate()),n[0]=n[1]-La}this._innerSetExtent(n[0],n[1]),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,n,a){t=t||10;var i=this._getExtentSpanWithBreaks();this._approxInterval=i/t,n!=null&&this._approxInterval<n&&(this._approxInterval=n),a!=null&&this._approxInterval>a&&(this._approxInterval=a);var o=$y.length,s=Math.min(ule($y,this._approxInterval,0,o),o-1);this._interval=$y[s][1],this._intervalPrecision=ig(this._interval),this._minLevelUnit=$y[Math.max(s-1,0)][0]},e.prototype.parse=function(t){return st(t)?t:+Ji(t)},e.prototype.contain=function(t){return BD(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e})(es),$y=[["second",iD],["minute",oD],["hour",Dp],["quarter-day",Dp*6],["half-day",Dp*12],["day",La*1.2],["half-week",La*3.5],["week",La*7],["month",La*31],["quarter",La*95],["half-year",dP/2],["year",dP]];function cF(r,e,t,n){return Ix(new Date(e),r,n).getTime()===Ix(new Date(t),r,n).getTime()}function cle(r,e){return r/=La,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function fle(r){var e=30*La;return r/=e,r>6?6:r>3?3:r>2?2:1}function hle(r){return r/=Dp,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function T5(r,e){return r/=e?oD:iD,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function dle(r){return IM(r,!0)}function vle(r,e,t){var n=Math.max(0,Fe(Zn,e)-1);return Ix(new Date(r),Zn[n],t).getTime()}function ple(r,e){var t=new Date(0);t[r](1);var n=t.getTime();t[r](1+e);var a=t.getTime()-n;return function(i,o){return Math.max(0,Math.round((o-i)/a))}}function gle(r,e,t,n,a,i){var o=1e4,s=Dae,l=0;function u(P,G,U,B,F,H,X){for(var V=ple(F,P),W=G,$=new Date(W);W<U&&W<=n[1]&&(X.push({value:W}),!(l++>o));)if($[F]($[B]()+P),W=$.getTime(),i){var te=i.calcNiceTickMultiple(W,V);te>0&&($[F]($[B]()+te*P),W=$.getTime())}X.push({value:W,notAdd:!0})}function c(P,G,U){var B=[],F=!G.length;if(!cF(Np(P),n[0],n[1],t)){F&&(G=[{value:vle(n[0],P,t)},{value:n[1]}]);for(var H=0;H<G.length-1;H++){var X=G[H].value,V=G[H+1].value;if(X!==V){var W=void 0,$=void 0,te=void 0,ue=!1;switch(P){case"year":W=Math.max(1,Math.round(e/La/365)),$=mH(t),te=Iae(t);break;case"half-year":case"quarter":case"month":W=fle(e),$=sD(t),te=yH(t);break;case"week":case"half-week":case"day":W=cle(e),$=lD(t),te=xH(t),ue=!0;break;case"half-day":case"quarter-day":case"hour":W=hle(e),$=uD(t),te=bH(t);break;case"minute":W=T5(e,!0),$=cD(t),te=_H(t);break;case"second":W=T5(e,!1),$=fD(t),te=SH(t);break;case"millisecond":W=dle(e),$=hD(t),te=wH(t);break}V>=n[0]&&X<=n[1]&&u(W,X,V,$,te,ue,B),P==="year"&&U.length>1&&H===0&&U.unshift({value:U[0].value-W})}}for(var H=0;H<B.length;H++)U.push(B[H])}}for(var f=[],d=[],v=0,g=0,x=0;x<s.length;++x){var y=Np(s[x]);if(Rae(s[x])){c(s[x],f[f.length-1]||[],d);var b=s[x+1]?Np(s[x+1]):null;if(y!==b){if(d.length){g=v,d.sort(function(P,G){return P.value-G.value});for(var w=[],T=0;T<d.length;++T){var C=d[T].value;(T===0||d[T-1].value!==C)&&(w.push(d[T]),C>=n[0]&&C<=n[1]&&v++)}var D=a/e;if(v>D*1.5&&g>D/1.5||(f.push(w),v>D||r===s[x]))break}d=[]}}}for(var M=dt(fe(f,function(P){return dt(P,function(G){return G.value>=n[0]&&G.value<=n[1]&&!G.notAdd})}),function(P){return P.length>0}),N=[],R=M.length-1,x=0;x<M.length;++x)for(var E=M[x],k=0;k<E.length;++k){var I=Qf(E[k].value,t);N.push({value:E[k].value,time:{level:R-x,upperTimeUnit:I,lowerTimeUnit:I}})}N.sort(function(P,G){return P.value-G.value});for(var z=[],x=0;x<N.length;++x)(x===0||N[x].value!==N[x-1].value)&&z.push(N[x]);return z}El.registerClass(GD);var XC=sr,mle=Math.floor,yle=Math.ceil,Ky=Math.pow,Qy=Math.log,fF=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new es,t}return e.prototype.getTicks=function(t){t=t||{};var n=this._extent.slice(),a=this._originalScale.getExtent(),i=r.prototype.getTicks.call(this,t),o=this.base,s=this._originalScale._innerGetBreaks(),l=dr();return fe(i,function(u){var c=u.value,f=null,d=Ky(o,c);c===n[0]&&this._fixMin?f=a[0]:c===n[1]&&this._fixMax&&(f=a[1]);var v;if(l){var g=l.getTicksLogTransformBreak(u,o,s,Jy);v=g.vBreak,f==null&&(f=g.brkRoundingCriterion)}return f!=null&&(d=Jy(d,f)),{value:d,break:v}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(t,n){this._originalScale.setExtent(t,n);var a=YC(this.base,[t,n]);r.prototype.setExtent.call(this,a[0],a[1])},e.prototype.getExtent=function(){var t=this.base,n=r.prototype.getExtent.call(this);n[0]=Ky(t,n[0]),n[1]=Ky(t,n[1]);var a=this._originalScale.getExtent();return this._fixMin&&(n[0]=Jy(n[0],a[0])),this._fixMax&&(n[1]=Jy(n[1],a[1])),n},e.prototype.unionExtentFromData=function(t,n){this._originalScale.unionExtentFromData(t,n);var a=YC(this.base,t.getApproximateExtent(n),!0);this._innerUnionExtent(a)},e.prototype.calcNiceTicks=function(t){t=t||10;var n=this._extent.slice(),a=this._getExtentSpanWithBreaks();if(!(!isFinite(a)||a<=0)){var i=g6(a),o=t/a*i;for(o<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var s=[XC(yle(n[0]/i)*i),XC(mle(n[1]/i)*i)];this._interval=i,this._intervalPrecision=ig(i),this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){r.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.contain=function(t){return t=Qy(t)/Qy(this.base),r.prototype.contain.call(this,t)},e.prototype.normalize=function(t){return t=Qy(t)/Qy(this.base),r.prototype.normalize.call(this,t)},e.prototype.scale=function(t){return t=r.prototype.scale.call(this,t),Ky(this.base,t)},e.prototype.setBreaksFromOption=function(t){var n=dr();if(n){var a=n.logarithmicParseBreaksFromOption(t,this.base,xe(this.parse,this)),i=a.parsedOriginal,o=a.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(o)}},e.type="log",e})(es);function Jy(r,e){return XC(r,$a(e))}El.registerClass(fF);var xle=(function(){function r(e,t,n){this._prepareParams(e,t,n)}return r.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var a=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=t.get("min",!0);i==null&&(i=t.get("startValue",!0));var o=this._modelMinRaw=i;Ae(o)?this._modelMinNum=e0(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=e0(e,o));var s=this._modelMaxRaw=t.get("max",!0);if(Ae(s)?this._modelMaxNum=e0(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=e0(e,s)),a)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),u=ce(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[ii(u[0],1),ii(u[1],1)]}},r.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,a=this._axisDataLen,i=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),s=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=e?a?0:NaN:t-i[0]*o),l==null&&(l=e?a?a-1:NaN:n+i[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=Jr(s)||Jr(l)||e&&!a;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var d=this._determinedMin,v=this._determinedMax;return d!=null&&(s=d,u=!0),v!=null&&(l=v,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){this[_le[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=ble[e];this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r})(),ble={min:"_determinedMin",max:"_determinedMax"},_le={min:"_dataMin",max:"_dataMax"};function hF(r,e,t){var n=r.rawExtentInfo;return n||(n=new xle(r,e,t),r.rawExtentInfo=n,n)}function e0(r,e){return e==null?null:Jr(e)?NaN:r.parse(e)}function dF(r,e){var t=r.type,n=hF(r,e,r.getExtent()).calculate();r.setBlank(n.isBlank);var a=n.min,i=n.max,o=e.ecModel;if(o&&t==="time"){var s=nF("bar",o),l=!1;if(O(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=aF(s),c=Sle(a,i,e,u);a=c.min,i=c.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function Sle(r,e,t,n){var a=t.axis.getExtent(),i=Math.abs(a[1]-a[0]),o=sle(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;O(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;O(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,f=1-(s+l)/i,d=c/f-c;return e+=d*(l/u),r-=d*(s/u),{min:r,max:e}}function pc(r,e){var t=e,n=dF(r,t),a=n.extent,i=t.get("splitNumber");r instanceof fF&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(pF(t)),r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Yg(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new Ih({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new GD({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(El.getClass(e)||es)}}function wle(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function sd(r){var e=r.getLabelModel().get("formatter");if(r.type==="time"){var t=Nae(e);return function(a,i){return r.scale.getFormattedLabel(a,i,t)}}else{if(ye(e))return function(a){var i=r.scale.getLabel(a),o=e.replace("{value}",i??"");return o};if(Ae(e)){if(r.type==="category")return function(a,i){return e(Wx(r,a),a.value-r.scale.getExtent()[0],null)};var n=dr();return function(a,i){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,a.break)),e(Wx(r,a),i,o)}}else return function(a){return r.scale.getLabel(a)}}}function Wx(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function HD(r){var e=r.get("interval");return e??"auto"}function vF(r){return r.type==="category"&&HD(r.getLabelModel())===0}function Xx(r,e){var t={};return O(r.mapDimensionsAll(e),function(n){t[jD(r,n)]=!0}),it(t)}function Tle(r,e,t){e&&O(Xx(e,t),function(n){var a=e.getApproximateExtent(n);a[0]<r[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1])})}function Oh(r){return r==="middle"||r==="center"}function sg(r){return r.getShallow("show")}function pF(r){var e=r.get("breaks",!0);if(e!=null)return!dr()||!Cle(r.axis)?void 0:e}function Cle(r){return(r.dim==="x"||r.dim==="y"||r.dim==="z"||r.dim==="single")&&r.type!=="category"}var ld=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r})();function Ale(r){return to(null,r)}var Mle={isDimensionStacked:Jo,enableDataStack:eF,getStackedDimension:jD};function Dle(r,e){var t=e;e instanceof et||(t=new et(e));var n=Yg(t);return n.setExtent(r[0],r[1]),pc(n,t),n}function Nle(r){Jt(r,ld)}function Lle(r,e){return e=e||{},Nt(r,null,null,e.state!=="normal")}const Rle=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:Gse,createList:Ale,createScale:Dle,createSymbol:ur,createTextStyle:Lle,dataStack:Mle,enableHoverEmphasis:hl,getECData:Pe,getLayoutRect:Ht,mixinAxisModelCommonMethods:Nle},Symbol.toStringTag,{value:"Module"}));var Ele=1e-8;function C5(r,e){return Math.abs(r-e)<Ele}function Ru(r,e,t){var n=0,a=r[0];if(!a)return!1;for(var i=1;i<r.length;i++){var o=r[i];n+=No(a[0],a[1],o[0],o[1],e,t),a=o}var s=r[0];return(!C5(a[0],s[0])||!C5(a[1],s[1]))&&(n+=No(a[0],a[1],s[0],s[1],e,t)),n!==0}var kle=[];function Yw(r,e){for(var t=0;t<r.length;t++)Qt(r[t],r[t],e)}function A5(r,e,t,n){for(var a=0;a<r.length;a++){var i=r[a];n&&(i=n.project(i)),i&&isFinite(i[0])&&isFinite(i[1])&&(Oo(e,e,i),Po(t,t,i))}}function Ile(r){for(var e=0,t=0,n=0,a=r.length,i=r[a-1][0],o=r[a-1][1],s=0;s<a;s++){var l=r[s][0],u=r[s][1],c=i*u-l*o;e+=c,t+=(i+l)*c,n+=(o+u)*c,i=l,o=u}return e?[t/e/3,n/e/3,e]:[r[0][0]||0,r[0][1]||0]}var gF=(function(){function r(e){this.name=e}return r.prototype.setCenter=function(e){this._center=e},r.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},r})(),M5=(function(){function r(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return r})(),D5=(function(){function r(e){this.type="linestring",this.points=e}return r})(),mF=(function(r){K(e,r);function e(t,n,a){var i=r.call(this,t)||this;return i.type="geoJSON",i.geometries=n,i._center=a&&[a[0],a[1]],i}return e.prototype.calcCenter=function(){for(var t=this.geometries,n,a=0,i=0;i<t.length;i++){var o=t[i],s=o.exterior,l=s&&s.length;l>a&&(n=o,a=l)}if(n)return Ile(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var n=this._rect;if(n&&!t)return n;var a=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return O(o,function(s){s.type==="polygon"?A5(s.exterior,a,i,t):O(s.points,function(l){A5(l,a,i,t)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])||(a[0]=a[1]=i[0]=i[1]=0),n=new Ie(a[0],a[1],i[0]-a[0],i[1]-a[1]),t||(this._rect=n),n},e.prototype.contain=function(t){var n=this.getBoundingRect(),a=this.geometries;if(!n.contain(t[0],t[1]))return!1;e:for(var i=0,o=a.length;i<o;i++){var s=a[i];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(Ru(l,t[0],t[1])){for(var c=0;c<(u?u.length:0);c++)if(Ru(u[c],t[0],t[1]))continue e;return!0}}}return!1},e.prototype.transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=o.width/o.height;a?i||(i=a/s):a=s*i;for(var l=new Ie(t,n,a,i),u=o.calculateTransform(l),c=this.geometries,f=0;f<c.length;f++){var d=c[f];d.type==="polygon"?(Yw(d.exterior,u),O(d.interiors,function(v){Yw(v,u)})):O(d.points,function(v){Yw(v,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){t==null&&(t=this.name);var n=new e(t,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},e})(gF),Ole=(function(r){K(e,r);function e(t,n){var a=r.call(this,t)||this;return a.type="geoSVG",a._elOnlyForCalculate=n,a}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,n=t.getBoundingRect(),a=[n.x+n.width/2,n.y+n.height/2],i=Ig(kle),o=t;o&&!o.isGeoSVGGraphicRoot;)Qa(i,o.getLocalTransform(),i),o=o.parent;return Ia(i,i),Qt(a,a,i),a},e})(gF);function Ple(r){if(!r.UTF8Encoding)return r;var e=r,t=e.UTF8Scale;t==null&&(t=1024);var n=e.features;return O(n,function(a){var i=a.geometry,o=i.encodeOffsets,s=i.coordinates;if(o)switch(i.type){case"LineString":i.coordinates=yF(s,o,t);break;case"Polygon":Ww(s,o,t);break;case"MultiLineString":Ww(s,o,t);break;case"MultiPolygon":O(s,function(l,u){return Ww(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function Ww(r,e,t){for(var n=0;n<r.length;n++)r[n]=yF(r[n],e[n],t)}function yF(r,e,t){for(var n=[],a=e[0],i=e[1],o=0;o<r.length;o+=2){var s=r.charCodeAt(o)-64,l=r.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=a,l+=i,a=s,i=l,n.push([s/t,l/t])}return n}function qC(r,e){return r=Ple(r),fe(dt(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,a=t.geometry,i=[];switch(a.type){case"Polygon":var o=a.coordinates;i.push(new M5(o[0],o.slice(1)));break;case"MultiPolygon":O(a.coordinates,function(l){l[0]&&i.push(new M5(l[0],l.slice(1)))});break;case"LineString":i.push(new D5([a.coordinates]));break;case"MultiLineString":i.push(new D5(a.coordinates))}var s=new mF(n[e||"name"],i,n.cp);return s.properties=n,s})}const zle=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:lC,asc:ra,getPercentWithPrecision:rre,getPixelPrecision:EM,getPrecision:$a,getPrecisionSafe:v6,isNumeric:OM,isRadianAroundZero:Dh,linearMap:pt,nice:IM,numericToNumber:Xi,parseDate:Ji,parsePercent:me,quantile:U0,quantity:g6,quantityExponent:H1,reformIntervals:uC,remRadian:kM,round:sr},Symbol.toStringTag,{value:"Module"})),jle=Object.freeze(Object.defineProperty({__proto__:null,format:Hg,parse:Ji,roundTime:Ix},Symbol.toStringTag,{value:"Module"})),Ble=Object.freeze(Object.defineProperty({__proto__:null,Arc:Bg,BezierCurve:$h,BoundingRect:Ie,Circle:eo,CompoundPath:Vg,Ellipse:jg,Group:De,Image:kr,IncrementalDisplayable:rH,Line:lr,LinearGradient:bc,Polygon:nn,Polyline:Fr,RadialGradient:qM,Rect:qe,Ring:Zh,Sector:rn,Text:ot,clipPointsByRect:QM,clipRectByRect:sH,createIcon:Qh,extendPath:iH,extendShape:aH,getShapeClass:Qp,getTransform:dl,initProps:jt,makeImage:$M,makePath:Lh,mergePath:ea,registerShape:ja,resizePath:KM,updateProps:lt},Symbol.toStringTag,{value:"Module"})),Vle=Object.freeze(Object.defineProperty({__proto__:null,addCommas:dD,capitalFirst:jae,encodeHTML:hn,formatTime:zae,formatTpl:pD,getTextRect:Oae,getTooltipMarker:TH,normalizeCssArray:td,toCamelCase:vD,truncateText:Ore},Symbol.toStringTag,{value:"Module"})),Gle=Object.freeze(Object.defineProperty({__proto__:null,bind:xe,clone:Me,curry:He,defaults:Le,each:O,extend:ie,filter:dt,indexOf:Fe,inherits:TM,isArray:ce,isFunction:Ae,isObject:Re,isString:ye,map:fe,merge:Ye,reduce:ka},Symbol.toStringTag,{value:"Module"}));var Hle=Je(),Rp=Je(),oi={estimate:1,determine:2};function qx(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function xF(r,e){var t=fe(e,function(n){return r.scale.parse(n)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function Fle(r,e){var t=r.getLabelModel().get("customValues");if(t){var n=sd(r),a=r.scale.getExtent(),i=xF(r,t),o=dt(i,function(s){return s>=a[0]&&s<=a[1]});return{labels:fe(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?Yle(r,e):Xle(r)}function Ule(r,e,t){var n=r.getTickModel().get("customValues");if(n){var a=r.scale.getExtent(),i=xF(r,n);return{ticks:dt(i,function(o){return o>=a[0]&&o<=a[1]})}}return r.type==="category"?Wle(r,e):{ticks:fe(r.scale.getTicks(t),function(o){return o.value})}}function Yle(r,e){var t=r.getLabelModel(),n=bF(r,t,e);return!t.get("show")||r.scale.isBlank()?{labels:[]}:n}function bF(r,e,t){var n=Zle(r),a=HD(e),i=t.kind===oi.estimate;if(!i){var o=SF(n,a);if(o)return o}var s,l;Ae(a)?s=CF(r,a):(l=a==="auto"?$le(r,t):a,s=TF(r,l));var u={labels:s,labelCategoryInterval:l};return i?t.out.noPxChangeTryDetermine.push(function(){return ZC(n,a,u),!0}):ZC(n,a,u),u}function Wle(r,e){var t=qle(r),n=HD(e),a=SF(t,n);if(a)return a;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),Ae(n))i=CF(r,n,!0);else if(n==="auto"){var s=bF(r,r.getLabelModel(),qx(oi.determine));o=s.labelCategoryInterval,i=fe(s.labels,function(l){return l.tickValue})}else o=n,i=TF(r,o,!0);return ZC(t,n,{ticks:i,tickCategoryInterval:o})}function Xle(r){var e=r.scale.getTicks(),t=sd(r);return{labels:fe(e,function(n,a){return{formattedLabel:t(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var qle=_F("axisTick"),Zle=_F("axisLabel");function _F(r){return function(t){return Rp(t)[r]||(Rp(t)[r]={list:[]})}}function SF(r,e){for(var t=0;t<r.list.length;t++)if(r.list[t].key===e)return r.list[t].value}function ZC(r,e,t){return r.list.push({key:e,value:t}),t}function $le(r,e){if(e.kind===oi.estimate){var t=r.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return Rp(r).autoInterval=t,!0}),t}var n=Rp(r).autoInterval;return n??(Rp(r).autoInterval=r.calculateCategoryInterval(e))}function Kle(r,e){var t=e.kind,n=Jle(r),a=sd(r),i=(n.axisRotate-n.labelRotate)/180*Math.PI,o=r.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 f=s[0],d=r.dataToCoord(f+1)-r.dataToCoord(f),v=Math.abs(d*Math.cos(i)),g=Math.abs(d*Math.sin(i)),x=0,y=0;f<=s[1];f+=u){var b=0,w=0,T=V1(a({value:f}),n.font,"center","top");b=T.width*1.3,w=T.height*1.3,x=Math.max(x,b,7),y=Math.max(y,w,7)}var C=x/v,D=y/g;isNaN(C)&&(C=1/0),isNaN(D)&&(D=1/0);var M=Math.max(0,Math.floor(Math.min(C,D)));if(t===oi.estimate)return e.out.noPxChangeTryDetermine.push(xe(Qle,null,r,M,l)),M;var N=wF(r,M,l);return N??M}function Qle(r,e,t){return wF(r,e,t)==null}function wF(r,e,t){var n=Hle(r.model),a=r.getExtent(),i=n.lastAutoInterval,o=n.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-e)<=1&&Math.abs(o-t)<=1&&i>e&&n.axisExtent0===a[0]&&n.axisExtent1===a[1])return i;n.lastTickCount=t,n.lastAutoInterval=e,n.axisExtent0=a[0],n.axisExtent1=a[1]}function Jle(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function TF(r,e,t){var n=sd(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],c=a.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=vF(r),d=o.get("showMinLabel")||f,v=o.get("showMaxLabel")||f;d&&u!==i[0]&&x(i[0]);for(var g=u;g<=i[1];g+=l)x(g);v&&g-l!==i[1]&&x(i[1]);function x(y){var b={value:y};s.push(t?y:{formattedLabel:n(b),rawLabel:a.getLabel(b),tickValue:y,time:void 0,break:void 0})}return s}function CF(r,e,t){var n=r.scale,a=sd(r),i=[];return O(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:a(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var N5=[0,1],Ba=(function(){function r(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return r.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),a=Math.max(t[0],t[1]);return e>=n&&e<=a},r.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return EM(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},r.prototype.dataToCoord=function(e,t){var n=this._extent,a=this.scale;return e=a.normalize(a.parse(e)),this.onBand&&a.type==="ordinal"&&(n=n.slice(),L5(n,a.count())),pt(e,N5,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),L5(n,a.count()));var i=pt(e,n,N5,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=Ule(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),a=n.ticks,i=fe(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return eue(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),a=fe(n,function(i){return fe(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(e){return e=e||qx(oi.determine),Fle(this,e).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(e[1]-e[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(e){return e=e||qx(oi.determine),Kle(this,e)},r})();function L5(r,e){var t=r[1]-r[0],n=e,a=t/n/2;r[0]+=a,r[1]-=a}function eue(r,e,t,n){var a=e.length;if(!r.onBand||t||!a)return;var i=r.getExtent(),o,s;if(a===1)e[0].coord=i[0],e[0].onBand=!0,o=e[1]={coord:i[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[a-1].tickValue-e[0].tickValue,u=(e[a-1].coord-e[0].coord)/l;O(e,function(v){v.coord-=u/2,v.onBand=!0});var c=r.scale.getExtent();s=1+c[1]-e[a-1].tickValue,o={coord:e[a-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var f=i[0]>i[1];d(e[0].coord,i[0])&&(n?e[0].coord=i[0]:e.shift()),n&&d(i[0],e[0].coord)&&e.unshift({coord:i[0],onBand:!0}),d(i[1],o.coord)&&(n?o.coord=i[1]:e.pop()),n&&d(o.coord,i[1])&&e.push({coord:i[1],onBand:!0});function d(v,g){return v=sr(v),g=sr(g),f?v>g:v<g}}function tue(r){var e=Qe.extend(r);return Qe.registerClass(e),e}function rue(r){var e=Rt.extend(r);return Rt.registerClass(e),e}function nue(r){var e=Tt.extend(r);return Tt.registerClass(e),e}function aue(r){var e=_t.extend(r);return _t.registerClass(e),e}var kv=Math.PI*2,bu=qi.CMD,iue=["top","right","bottom","left"];function oue(r,e,t,n,a){var i=t.width,o=t.height;switch(r){case"top":n.set(t.x+i/2,t.y-e),a.set(0,-1);break;case"bottom":n.set(t.x+i/2,t.y+o+e),a.set(0,1);break;case"left":n.set(t.x-e,t.y+o/2),a.set(-1,0);break;case"right":n.set(t.x+i+e,t.y+o/2),a.set(1,0);break}}function sue(r,e,t,n,a,i,o,s,l){o-=r,s-=e;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*t+r,f=s*t+e;if(Math.abs(n-a)%kv<1e-4)return l[0]=c,l[1]=f,u-t;if(i){var d=n;n=na(a),a=na(d)}else n=na(n),a=na(a);n>a&&(a+=kv);var v=Math.atan2(s,o);if(v<0&&(v+=kv),v>=n&&v<=a||v+kv>=n&&v+kv<=a)return l[0]=c,l[1]=f,u-t;var g=t*Math.cos(n)+r,x=t*Math.sin(n)+e,y=t*Math.cos(a)+r,b=t*Math.sin(a)+e,w=(g-o)*(g-o)+(x-s)*(x-s),T=(y-o)*(y-o)+(b-s)*(b-s);return w<T?(l[0]=g,l[1]=x,Math.sqrt(w)):(l[0]=y,l[1]=b,Math.sqrt(T))}function Zx(r,e,t,n,a,i,o,s){var l=a-r,u=i-e,c=t-r,f=n-e,d=Math.sqrt(c*c+f*f);c/=d,f/=d;var v=l*c+u*f,g=v/d;s&&(g=Math.min(Math.max(g,0),1)),g*=d;var x=o[0]=r+g*c,y=o[1]=e+g*f;return Math.sqrt((x-a)*(x-a)+(y-i)*(y-i))}function AF(r,e,t,n,a,i,o){t<0&&(r=r+t,t=-t),n<0&&(e=e+n,n=-n);var s=r+t,l=e+n,u=o[0]=Math.min(Math.max(a,r),s),c=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-a)*(u-a)+(c-i)*(c-i))}var qa=[];function lue(r,e,t){var n=AF(e.x,e.y,e.width,e.height,r.x,r.y,qa);return t.set(qa[0],qa[1]),n}function uue(r,e,t){for(var n=0,a=0,i=0,o=0,s,l,u=1/0,c=e.data,f=r.x,d=r.y,v=0;v<c.length;){var g=c[v++];v===1&&(n=c[v],a=c[v+1],i=n,o=a);var x=u;switch(g){case bu.M:i=c[v++],o=c[v++],n=i,a=o;break;case bu.L:x=Zx(n,a,c[v],c[v+1],f,d,qa,!0),n=c[v++],a=c[v++];break;case bu.C:x=qG(n,a,c[v++],c[v++],c[v++],c[v++],c[v],c[v+1],f,d,qa),n=c[v++],a=c[v++];break;case bu.Q:x=$G(n,a,c[v++],c[v++],c[v],c[v+1],f,d,qa),n=c[v++],a=c[v++];break;case bu.A:var y=c[v++],b=c[v++],w=c[v++],T=c[v++],C=c[v++],D=c[v++];v+=1;var M=!!(1-c[v++]);s=Math.cos(C)*w+y,l=Math.sin(C)*T+b,v<=1&&(i=s,o=l);var N=(f-y)*T/w+y;x=sue(y,b,T,C,C+D,M,N,d,qa),n=Math.cos(C+D)*w+y,a=Math.sin(C+D)*T+b;break;case bu.R:i=n=c[v++],o=a=c[v++];var R=c[v++],E=c[v++];x=AF(i,o,R,E,f,d,qa);break;case bu.Z:x=Zx(n,a,i,o,f,d,qa,!0),n=i,a=o;break}x<u&&(u=x,t.set(qa[0],qa[1]))}return u}var Ka=new ke,zt=new ke,ir=new ke,ji=new ke,Ei=new ke;function R5(r,e){if(r){var t=r.getTextGuideLine(),n=r.getTextContent();if(n&&t){var a=r.textGuideLineConfig||{},i=[[0,0],[0,0],[0,0]],o=a.candidates||iue,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=a.anchor,c=r.getComputedTransform(),f=c&&Ia([],c),d=e.get("length2")||0;u&&ir.copy(u);for(var v=0;v<o.length;v++){var g=o[v];oue(g,0,s,Ka,ji),ke.scaleAndAdd(zt,Ka,ji,d),zt.transform(f);var x=r.getBoundingRect(),y=u?u.distance(zt):r instanceof tt?uue(zt,r.path,ir):lue(zt,x,ir);y<l&&(l=y,zt.transform(c),ir.transform(c),ir.toArray(i[0]),zt.toArray(i[1]),Ka.toArray(i[2]))}MF(i,e.get("minTurnAngle")),t.setShape({points:i})}}}var $x=[],bn=new ke;function MF(r,e){if(e<=180&&e>0){e=e/180*Math.PI,Ka.fromArray(r[0]),zt.fromArray(r[1]),ir.fromArray(r[2]),ke.sub(ji,Ka,zt),ke.sub(Ei,ir,zt);var t=ji.len(),n=Ei.len();if(!(t<.001||n<.001)){ji.scale(1/t),Ei.scale(1/n);var a=ji.dot(Ei),i=Math.cos(e);if(i<a){var o=Zx(zt.x,zt.y,ir.x,ir.y,Ka.x,Ka.y,$x,!1);bn.fromArray($x),bn.scaleAndAdd(Ei,o/Math.tan(Math.PI-e));var s=ir.x!==zt.x?(bn.x-zt.x)/(ir.x-zt.x):(bn.y-zt.y)/(ir.y-zt.y);if(isNaN(s))return;s<0?ke.copy(bn,zt):s>1&&ke.copy(bn,ir),bn.toArray(r[1])}}}}function cue(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Ka.fromArray(r[0]),zt.fromArray(r[1]),ir.fromArray(r[2]),ke.sub(ji,zt,Ka),ke.sub(Ei,ir,zt);var n=ji.len(),a=Ei.len();if(!(n<.001||a<.001)){ji.scale(1/n),Ei.scale(1/a);var i=ji.dot(e),o=Math.cos(t);if(i<o){var s=Zx(zt.x,zt.y,ir.x,ir.y,Ka.x,Ka.y,$x,!1);bn.fromArray($x);var l=Math.PI/2,u=Math.acos(Ei.dot(e)),c=l+u-t;if(c>=l)ke.copy(bn,ir);else{bn.scaleAndAdd(Ei,s/Math.tan(Math.PI/2-c));var f=ir.x!==zt.x?(bn.x-zt.x)/(ir.x-zt.x):(bn.y-zt.y)/(ir.y-zt.y);if(isNaN(f))return;f<0?ke.copy(bn,zt):f>1&&ke.copy(bn,ir)}bn.toArray(r[1])}}}}function Xw(r,e,t,n){var a=t==="normal",i=a?r:r.ensureState(t);i.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();a?r.useStyle(s):i.style=s}function fue(r,e){var t=e.smooth,n=e.points;if(n)if(r.moveTo(n[0][0],n[0][1]),t>0&&n.length>=3){var a=Io(n[0],n[1]),i=Io(n[1],n[2]);if(!a||!i){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*t,s=_p([],n[1],n[0],o/a),l=_p([],n[1],n[2],o/i),u=_p([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)r.lineTo(n[c][0],n[c][1])}function FD(r,e,t){var n=r.getTextGuideLine(),a=r.getTextContent();if(!a){n&&r.removeTextGuideLine();return}for(var i=e.normal,o=i.get("show"),s=a.ignore,l=0;l<$p.length;l++){var u=$p[l],c=e[u],f=u==="normal";if(c){var d=c.get("show"),v=f?s:Ce(a.states[u]&&a.states[u].ignore,s);if(v||!Ce(d,o)){var g=f?n:n&&n.states[u];g&&(g.ignore=!0),n&&Xw(n,!0,u,c);continue}n||(n=new Fr,r.setTextGuideLine(n),!f&&(s||!o)&&Xw(n,!0,"normal",e.normal),r.stateProxy&&(n.stateProxy=r.stateProxy)),Xw(n,!1,u,c)}}if(n){Le(n.style,t),n.style.fill=null;var x=i.get("showAbove"),y=r.textGuideLineConfig=r.textGuideLineConfig||{};y.showAbove=x||!1,n.buildPath=fue}}function UD(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},n=0;n<Tn.length;n++){var a=Tn[n];t[a]=r.getModel([a,e])}return t}var E5=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],hue=1,Kx=2,DF=hue|Kx;function Qx(r,e,t){t=t||DF,e?r.dirty|=t:r.dirty&=~t}function NF(r,e){return e=e||DF,r.dirty==null||!!(r.dirty&e)}function $i(r){if(r)return NF(r)&&LF(r,r.label,r),r}function LF(r,e,t){var n=e.getComputedTransform();r.transform=eD(r.transform,n);var a=r.localRect=Jp(r.localRect,e.getBoundingRect()),i=e.style,o=i.margin,s=t&&t.marginForce,l=t&&t.minMarginForce,u=t&&t.marginDefault,c=i.__marginType;c==null&&u&&(o=u,c=Kf.textMargin);for(var f=0;f<4;f++)qw[f]=c===Kf.minMargin&&l&&l[f]!=null?l[f]:s&&s[f]!=null?s[f]:o?o[f]:0;c===Kf.textMargin&&hc(a,qw,!1,!1);var d=r.rect=Jp(r.rect,a);return n&&d.applyTransform(n),c===Kf.minMargin&&hc(d,qw,!1,!1),r.axisAligned=JM(n),(r.label=r.label||{}).ignore=e.ignore,Qx(r,!1),Qx(r,!0,Kx),r}var qw=[0,0,0,0];function due(r,e,t){return r.transform=eD(r.transform,t),r.localRect=Jp(r.localRect,e),r.rect=Jp(r.rect,e),t&&r.rect.applyTransform(t),r.axisAligned=JM(t),r.obb=void 0,(r.label=r.label||{}).ignore=!1,r}function $C(r,e){if(r){r.label.x+=e.x,r.label.y+=e.y,r.label.markRedraw();var t=r.transform;t&&(t[4]+=e.x,t[5]+=e.y);var n=r.rect;n&&(n.x+=e.x,n.y+=e.y);var a=r.obb;a&&a.fromBoundingRect(r.localRect,t)}}function KC(r,e){for(var t=0;t<E5.length;t++){var n=E5[t];r[n]==null&&(r[n]=e[n])}return $i(r)}function k5(r){var e=r.obb;return(!e||NF(r,Kx))&&(r.obb=e=e||new tH,e.fromBoundingRect(r.localRect,r.transform),Qx(r,!1,Kx)),e}function QC(r,e,t,n,a){var i=r.length,o=Ve[e],s=vr[e];if(i<2)return!1;r.sort(function(N,R){return N.rect[o]-R.rect[o]});for(var l=0,u,c=!1,f=0;f<i;f++){var d=r[f],v=d.rect;u=v[o]-l,u<0&&(v[o]-=u,d.label[o]-=u,c=!0),l=v[o]+v[s]}var g=r[0],x=r[i-1],y,b;w(),y<0&&D(-y,.8),b<0&&D(b,.8),w(),T(y,b,1),T(b,y,-1),w(),y<0&&M(-y),b<0&&M(b);function w(){y=g.rect[o]-t,b=n-x.rect[o]-x.rect[s]}function T(N,R,E){if(N<0){var k=Math.min(R,-N);if(k>0){C(k*E,0,i);var I=k+N;I<0&&D(-I*E,1)}else D(-N*E,1)}}function C(N,R,E){N!==0&&(c=!0);for(var k=R;k<E;k++){var I=r[k],z=I.rect;z[o]+=N,I.label[o]+=N}}function D(N,R){for(var E=[],k=0,I=1;I<i;I++){var z=r[I-1].rect,P=Math.max(r[I].rect[o]-z[o]-z[s],0);E.push(P),k+=P}if(k){var G=Math.min(Math.abs(N)/k,R);if(N>0)for(var I=0;I<i-1;I++){var U=E[I]*G;C(U,0,I+1)}else for(var I=i-1;I>0;I--){var U=E[I-1]*G;C(-U,I,i)}}}function M(N){var R=N<0?-1:1;N=Math.abs(N);for(var E=Math.ceil(N/(i-1)),k=0;k<i-1;k++)if(R>0?C(E,0,k+1):C(-E,i-k-1,i),N-=E,N<=0)return}return c}function vue(r){for(var e=0;e<r.length;e++){var t=r[e],n=t.defaultAttr,a=t.labelLine;t.label.attr("ignore",n.ignore),a&&a.attr("ignore",n.labelGuideIgnore)}}function RF(r){var e=[];r.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function t(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var n=0;n<r.length;n++){var a=$i(r[n]);if(!a.label.ignore){for(var i=a.label,o=a.labelLine,s=!1,l=0;l<e.length;l++)if(sb(a,e[l],null,{touchThreshold:.05})){s=!0;break}s?(t(i),o&&t(o)):e.push(a)}}}function sb(r,e,t,n){return!r||!e||r.label&&r.label.ignore||e.label&&e.label.ignore||!r.rect.intersect(e.rect,t,n)?!1:r.axisAligned&&e.axisAligned?!0:k5(r).intersect(k5(e),t,n)}function pue(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function gue(r,e){var t=r.label,n=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:pue(n&&n.shape.points)}}var I5=["align","verticalAlign","width","height","fontSize"],gn=new zo,Zw=Je(),mue=Je();function t0(r,e,t){for(var n=0;n<t.length;n++){var a=t[n];e[a]!=null&&(r[a]=e[a])}}var r0=["x","y","rotation"],yue=(function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,n,a,i){var o=a.style,s=a.__hostTarget,l=s.textConfig||{},u=a.getComputedTransform(),c=a.getBoundingRect().plain();Ie.applyTransform(c,c,u),u?gn.setLocalTransform(u):(gn.x=gn.y=gn.rotation=gn.originX=gn.originY=0,gn.scaleX=gn.scaleY=1),gn.rotation=na(gn.rotation);var f=a.__hostTarget,d;if(f){d=f.getBoundingRect().plain();var v=f.getComputedTransform();Ie.applyTransform(d,d,v)}var g=d&&f.getTextGuideLine();this._labelList.push({label:a,labelLine:g,seriesModel:n,dataIndex:e,dataType:t,layoutOptionOrCb:i,layoutOption:null,rect:c,hostRect:d,priority:d?d.width*d.height:0,defaultAttr:{ignore:a.ignore,labelGuideIgnore:g&&g.ignore,x:gn.x,y:gn.y,scaleX:gn.scaleX,scaleY:gn.scaleY,rotation:gn.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:a.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,a=n.get("labelLayout");(Ae(a)||it(a).length)&&e.group.traverse(function(i){if(i.ignore)return!0;var o=i.getTextContent(),s=Pe(i);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,n,o,a)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function a(T,C){return function(){R5(T,C)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;Ae(o.layoutOptionOrCb)?c=o.layoutOptionOrCb(gue(o,l)):c=o.layoutOptionOrCb,c=c||{},o.layoutOption=c;var f=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*f:u.attachedRot,offset:[c.dx||0,c.dy||0]});var d=!1;if(c.x!=null?(s.x=me(c.x,t),s.setStyle("x",0),d=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=me(c.y,n),s.setStyle("y",0),d=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var v=l.getTextGuideLine();v&&(v.setShape({points:c.labelLinePoints}),d=!1)}var g=Zw(s);g.needsUpdateLabelLine=d,s.rotation=c.rotate!=null?c.rotate*f:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var x=0;x<I5.length;x++){var y=I5[x];s.setStyle(y,c[y]!=null?c[y]:u.style[y])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var b=o.seriesModel;if(o.dataIndex!=null){var w=o.seriesModel.getData(o.dataType);b=w.getItemModel(o.dataIndex)}s.on("drag",a(l,b.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),a=[];O(this._labelList,function(l){l.defaultAttr.ignore||a.push(KC({},l))});var i=dt(a,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=dt(a,function(l){return l.layoutOption.moveOverlap==="shiftY"});QC(i,0,0,t),QC(o,1,0,n);var s=dt(a,function(l){return l.layoutOption.hideOverlap});vue(s),RF(s)},r.prototype.processLabelsOverall=function(){var e=this;O(this._chartViewList,function(t){var n=t.__model,a=t.ignoreLabelLineUpdate,i=n.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!a,l=o.getTextContent();!s&&l&&(s=Zw(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),i&&e._animateLabels(o,n)})})},r.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),a=Pe(e),i=a.dataIndex;if(n&&i!=null){var o=t.getData(a.dataType),s=o.getItemModel(i),l={},u=o.getItemVisual(i,"style");if(u){var c=o.getVisual("drawType");l.stroke=u[c]}var f=s.getModel("labelLine");FD(e,UD(s),l),R5(e,f)}},r.prototype._animateLabels=function(e,t){var n=e.getTextContent(),a=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!sh(e))){var i=Zw(n),o=i.oldLayout,s=Pe(e),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},c=t.getData(s.dataType);if(o){n.attr(o);var d=e.prevStates;d&&(Fe(d,"select")>=0&&n.attr(i.oldLayoutSelect),Fe(d,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),lt(n,u,t,l)}else if(n.attr(u),!Jh(n).valueAnimation){var f=Ce(n.style.opacity,1);n.style.opacity=0,jt(n,{style:{opacity:f}},t,l)}if(i.oldLayout=u,n.states.select){var v=i.oldLayoutSelect={};t0(v,u,r0),t0(v,n.states.select,r0)}if(n.states.emphasis){var g=i.oldLayoutEmphasis={};t0(g,u,r0),t0(g,n.states.emphasis,r0)}dH(n,l,c,t,t)}if(a&&!a.ignore&&!a.invisible){var i=mue(a),o=i.oldLayout,x={points:a.shape.points};o?(a.attr({shape:o}),lt(a,{shape:x},t)):(a.setShape(x),a.style.strokePercent=0,jt(a,{style:{strokePercent:1}},t)),i.oldLayout=x}},r})(),$w=Je();function xue(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var a=$w(t).labelManager;a||(a=$w(t).labelManager=new yue),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var a=$w(t).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),a.updateLayoutConfig(t),a.layout(t),a.processLabelsOverall()})}var Kw=Math.sin,Qw=Math.cos,EF=Math.PI,_u=Math.PI*2,bue=180/EF,kF=(function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){this._add("C",e,t,n,a,i,o)},r.prototype.quadraticCurveTo=function(e,t,n,a){this._add("Q",e,t,n,a)},r.prototype.arc=function(e,t,n,a,i,o){this.ellipse(e,t,n,n,0,a,i,o)},r.prototype.ellipse=function(e,t,n,a,i,o,s,l){var u=s-o,c=!l,f=Math.abs(u),d=nl(f-_u)||(c?u>=_u:-u>=_u),v=u>0?u%_u:u%_u+_u,g=!1;d?g=!0:nl(f)?g=!1:g=v>=EF==!!c;var x=e+n*Qw(o),y=t+a*Kw(o);this._start&&this._add("M",x,y);var b=Math.round(i*bue);if(d){var w=1/this._p,T=(c?1:-1)*(_u-w);this._add("A",n,a,b,1,+c,e+n*Qw(o+T),t+a*Kw(o+T)),w>.01&&this._add("A",n,a,b,0,+c,x,y)}else{var C=e+n*Qw(s),D=t+a*Kw(s);this._add("A",n,a,b,+g,+c,C,D)}},r.prototype.rect=function(e,t,n,a){this._add("M",e,t),this._add("l",n,0),this._add("l",0,a),this._add("l",-n,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,n,a,i,o,s,l,u){for(var c=[],f=this._p,d=1;d<arguments.length;d++){var v=arguments[d];if(isNaN(v)){this._invalid=!0;return}c.push(Math.round(v*f)/f)}this._d.push(e+c.join(" ")),this._start=e==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r})(),YD="none",_ue=Math.round;function Sue(r){var e=r.fill;return e!=null&&e!==YD}function wue(r){var e=r.stroke;return e!=null&&e!==YD}var JC=["lineCap","miterLimit","lineJoin"],Tue=fe(JC,function(r){return"stroke-"+r.toLowerCase()});function Cue(r,e,t,n){var a=e.opacity==null?1:e.opacity;if(t instanceof kr){r("opacity",a);return}if(Sue(e)){var i=qp(e.fill);r("fill",i.color);var o=e.fillOpacity!=null?e.fillOpacity*i.opacity*a:i.opacity*a;o<1&&r("fill-opacity",o)}else r("fill",YD);if(wue(e)){var s=qp(e.stroke);r("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*a:s.opacity*a,f=e.strokeFirst;if(u!==1&&r("stroke-width",u),f&&r("paint-order",f?"stroke":"fill"),c<1&&r("stroke-opacity",c),e.lineDash){var d=AD(t),v=d[0],g=d[1];v&&(g=_ue(g||0),r("stroke-dasharray",v.join(",")),(g||n)&&r("stroke-dashoffset",g))}for(var x=0;x<JC.length;x++){var y=JC[x];if(e[y]!==Dx[y]){var b=e[y]||Dx[y];b&&r(Tue[x],b)}}}}var IF="http://www.w3.org/2000/svg",OF="http://www.w3.org/1999/xlink",Aue="http://www.w3.org/2000/xmlns/",Mue="http://www.w3.org/XML/1998/namespace",O5="ecmeta_";function PF(r){return document.createElementNS(IF,r)}function Mr(r,e,t,n,a){return{tag:r,attrs:t||{},children:n,text:a,key:e}}function Due(r,e){var t=[];if(e)for(var n in e){var a=e[n],i=n;a!==!1&&(a!==!0&&a!=null&&(i+='="'+a+'"'),t.push(i))}return"<"+r+" "+t.join(" ")+">"}function Nue(r){return"</"+r+">"}function WD(r,e){e=e||{};var t=e.newline?`
268
- `:"";function n(a){var i=a.children,o=a.tag,s=a.attrs,l=a.text;return Due(o,s)+(o!=="style"?hn(l):l||"")+(i?""+t+fe(i,function(u){return n(u)}).join(t)+t:"")+Nue(o)}return n(r)}function Lue(r,e,t){t=t||{};var n=t.newline?`
269
- `:"",a=" {"+n,i=n+"}",o=fe(it(r),function(l){return l+a+fe(it(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+i}).join(n),s=fe(it(e),function(l){return"@keyframes "+l+a+fe(it(e[l]),function(u){return u+a+fe(it(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+i}).join(n)+i}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function eA(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function P5(r,e,t,n){return Mr("svg","root",{width:r,height:e,xmlns:IF,"xmlns:xlink":OF,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+e:!1},t)}var Rue=0;function zF(){return Rue++}var z5={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"},Cu="transform-origin";function Eue(r,e,t){var n=ie({},r.shape);ie(n,e),r.buildPath(t,n);var a=new kF;return a.reset(n6(r)),t.rebuildPath(a,1),a.generateStr(),a.getStr()}function kue(r,e){var t=e.originX,n=e.originY;(t||n)&&(r[Cu]=t+"px "+n+"px")}var Iue={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function jF(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function Oue(r,e,t){var n=r.shape.paths,a={},i,o;if(O(n,function(l){var u=eA(t.zrId);u.animation=!0,lb(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,d=it(c),v=d.length;if(v){o=d[v-1];var g=c[o];for(var x in g){var y=g[x];a[x]=a[x]||{d:""},a[x].d+=y.d||""}for(var b in f){var w=f[b].animation;w.indexOf(o)>=0&&(i=w)}}}),!!i){e.d=!1;var s=jF(a,t);return i.replace(o,s)}}function j5(r){return ye(r)?z5[r]?"cubic-bezier("+z5[r]+")":DM(r)?r:"":""}function lb(r,e,t,n){var a=r.animators,i=a.length,o=[];if(r instanceof Vg){var s=Oue(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u<i;u++){var c=a[u],f=[c.getMaxTime()/1e3+"s"],d=j5(c.getClip().easing),v=c.getDelay();d?f.push(d):f.push("linear"),v&&f.push(v/1e3+"s"),c.getLoop()&&f.push("infinite");var g=f.join(" ");l[g]=l[g]||[g,[]],l[g][1].push(c)}function x(w){var T=w[1],C=T.length,D={},M={},N={},R="animation-timing-function";function E(be,we,ze){for(var oe=be.getTracks(),pe=be.getMaxTime(),je=0;je<oe.length;je++){var Ne=oe[je];if(Ne.needsAnimate()){var at=Ne.keyframes,ft=Ne.propName;if(ze&&(ft=ze(ft)),ft)for(var Ct=0;Ct<at.length;Ct++){var Yr=at[Ct],er=Math.round(Yr.time/pe*100)+"%",ui=j5(Yr.easing),Va=Yr.rawValue;(ye(Va)||st(Va))&&(we[er]=we[er]||{},we[er][ft]=Yr.rawValue,ui&&(we[er][R]=ui))}}}}for(var k=0;k<C;k++){var I=T[k],z=I.targetName;z?z==="shape"&&E(I,M):!n&&E(I,D)}for(var P in D){var G={};Cx(G,r),ie(G,D[P]);var U=a6(G),B=D[P][R];N[P]=U?{transform:U}:{},kue(N[P],G),B&&(N[P][R]=B)}var F,H=!0;for(var P in M){N[P]=N[P]||{};var X=!F,B=M[P][R];X&&(F=new qi);var V=F.len();F.reset(),N[P].d=Eue(r,M[P],F);var W=F.len();if(!X&&V!==W){H=!1;break}B&&(N[P][R]=B)}if(!H)for(var P in N)delete N[P].d;if(!n)for(var k=0;k<C;k++){var I=T[k],z=I.targetName;z==="style"&&E(I,N,function(oe){return Iue[oe]})}for(var $=it(N),te=!0,ue,k=1;k<$.length;k++){var ge=$[k-1],Se=$[k];if(N[ge][Cu]!==N[Se][Cu]){te=!1;break}ue=N[ge][Cu]}if(te&&ue){for(var P in N)N[P][Cu]&&delete N[P][Cu];e[Cu]=ue}if(dt($,function(be){return it(N[be]).length>0}).length){var Xe=jF(N,t);return Xe+" "+w[0]+" both"}}for(var y in l){var s=x(l[y]);s&&o.push(s)}if(o.length){var b=t.zrId+"-cls-"+zF();t.cssNodes["."+b]={animation:o.join(",")},e.class=b}}function Pue(r,e,t){if(!r.ignore)if(r.isSilent()){var n={"pointer-events":"none"};B5(n,e,t)}else{var a=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=a.fill;if(!i){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(i=_x(l))}var u=a.lineWidth;if(u){var c=!a.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var n={cursor:"pointer"};i&&(n.fill=i),a.stroke&&(n.stroke=a.stroke),u&&(n["stroke-width"]=u),B5(n,e,t)}}function B5(r,e,t,n){var a=JSON.stringify(r),i=t.cssStyleCache[a];i||(i=t.zrId+"-cls-"+zF(),t.cssStyleCache[a]=i,t.cssNodes["."+i+":hover"]=r),e.class=e.class?e.class+" "+i:i}var lg=Math.round;function BF(r){return r&&ye(r.src)}function VF(r){return r&&Ae(r.toDataURL)}function XD(r,e,t,n){Cue(function(a,i){var o=a==="fill"||a==="stroke";o&&r6(i)?HF(e,r,a,n):o&&LM(i)?FF(t,r,a,n):r[a]=i,o&&n.ssr&&i==="none"&&(r["pointer-events"]="visible")},e,t,!1),Fue(t,r,n)}function qD(r,e){var t=f6(e);t&&(t.each(function(n,a){n!=null&&(r[(O5+a).toLowerCase()]=n+"")}),e.isSilent()&&(r[O5+"silent"]="true"))}function V5(r){return nl(r[0]-1)&&nl(r[1])&&nl(r[2])&&nl(r[3]-1)}function zue(r){return nl(r[4])&&nl(r[5])}function ZD(r,e,t){if(e&&!(zue(e)&&V5(e))){var n=1e4;r.transform=V5(e)?"translate("+lg(e[4]*n)/n+" "+lg(e[5]*n)/n+")":yte(e)}}function G5(r,e,t){for(var n=r.points,a=[],i=0;i<n.length;i++)a.push(lg(n[i][0]*t)/t),a.push(lg(n[i][1]*t)/t);e.points=a.join(" ")}function H5(r){return!r.smooth}function jue(r){var e=fe(r,function(t){return typeof t=="string"?[t,t]:t});return function(t,n,a){for(var i=0;i<e.length;i++){var o=e[i],s=t[o[0]];s!=null&&(n[o[1]]=lg(s*a)/a)}}}var Bue={circle:[jue(["cx","cy","r"])],polyline:[G5,H5],polygon:[G5,H5]};function Vue(r){for(var e=r.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function GF(r,e){var t=r.style,n=r.shape,a=Bue[r.type],i={},o=e.animation,s="path",l=r.style.strokePercent,u=e.compress&&n6(r)||4;if(a&&!e.willUpdate&&!(a[1]&&!a[1](n))&&!(o&&Vue(r))&&!(l<1)){s=r.type;var c=Math.pow(10,u);a[0](n,i,c)}else{var f=!r.path||r.shapeChanged();r.path||r.createPathProxy();var d=r.path;f&&(d.beginPath(),r.buildPath(d,r.shape),r.pathUpdated());var v=d.getVersion(),g=r,x=g.__svgPathBuilder;(g.__svgPathVersion!==v||!x||l!==g.__svgPathStrokePercent)&&(x||(x=g.__svgPathBuilder=new kF),x.reset(u),d.rebuildPath(x,l),x.generateStr(),g.__svgPathVersion=v,g.__svgPathStrokePercent=l),i.d=x.getStr()}return ZD(i,r.transform),XD(i,t,r,e),qD(i,r),e.animation&&lb(r,i,e),e.emphasis&&Pue(r,i,e),Mr(s,r.id+"",i)}function Gue(r,e){var t=r.style,n=t.image;if(n&&!ye(n)&&(BF(n)?n=n.src:VF(n)&&(n=n.toDataURL())),!!n){var a=t.x||0,i=t.y||0,o=t.width,s=t.height,l={href:n,width:o,height:s};return a&&(l.x=a),i&&(l.y=i),ZD(l,r.transform),XD(l,t,r,e),qD(l,r),e.animation&&lb(r,l,e),Mr("image",r.id+"",l)}}function Hue(r,e){var t=r.style,n=t.text;if(n!=null&&(n+=""),!(!n||isNaN(t.x)||isNaN(t.y))){var a=t.font||qo,i=t.x||0,o=bte(t.y||0,Pg(a),t.textBaseline),s=xte[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(z6(t)){var u="",c=t.fontStyle,f=P6(t.fontSize);if(!parseFloat(f))return;var d=t.fontFamily||DG,v=t.fontWeight;u+="font-size:"+f+";font-family:"+d+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),v&&v!=="normal"&&(u+="font-weight:"+v+";"),l.style=u}else l.style="font: "+a;return n.match(/\s/)&&(l["xml:space"]="preserve"),i&&(l.x=i),o&&(l.y=o),ZD(l,r.transform),XD(l,t,r,e),qD(l,r),e.animation&&lb(r,l,e),Mr("text",r.id+"",l,void 0,n)}}function F5(r,e){if(r instanceof tt)return GF(r,e);if(r instanceof kr)return Gue(r,e);if(r instanceof Nh)return Hue(r,e)}function Fue(r,e,t){var n=r.style;if(_te(n)){var a=Ste(r),i=t.shadowCache,o=i[a];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,f=n.shadowOffsetY||0,d=n.shadowBlur,v=qp(n.shadowColor),g=v.opacity,x=v.color,y=d/2/l,b=d/2/u,w=y+" "+b;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=Mr("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Mr("feDropShadow","",{dx:c/l,dy:f/u,stdDeviation:w,"flood-color":x,"flood-opacity":g})]),i[a]=o}e.filter=B1(o)}}function HF(r,e,t,n){var a=r[t],i,o={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if(e6(a))i="linearGradient",o.x1=a.x,o.y1=a.y,o.x2=a.x2,o.y2=a.y2;else if(t6(a))i="radialGradient",o.cx=Ce(a.x,.5),o.cy=Ce(a.y,.5),o.r=Ce(a.r,.5);else return;for(var s=a.colorStops,l=[],u=0,c=s.length;u<c;++u){var f=K2(s[u].offset)*100+"%",d=s[u].color,v=qp(d),g=v.color,x=v.opacity,y={offset:f};y["stop-color"]=g,x<1&&(y["stop-opacity"]=x),l.push(Mr("stop",u+"",y))}var b=Mr(i,"",o,l),w=WD(b),T=n.gradientCache,C=T[w];C||(C=n.zrId+"-g"+n.gradientIdx++,T[w]=C,o.id=C,n.defs[C]=Mr(i,C,o,l)),e[t]=B1(C)}function FF(r,e,t,n){var a=r.style[t],i=r.getBoundingRect(),o={},s=a.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",f;if(JG(a)){var d=a.imageWidth,v=a.imageHeight,g=void 0,x=a.image;if(ye(x)?g=x:BF(x)?g=x.src:VF(x)&&(g=x.toDataURL()),typeof Image>"u"){var y="Image width/height must been given explictly in svg-ssr renderer.";tn(d,y),tn(v,y)}else if(d==null||v==null){var b=function(k,I){if(k){var z=k.elm,P=d||I.width,G=v||I.height;k.tag==="pattern"&&(u?(G=1,P/=i.width):c&&(P=1,G/=i.height)),k.attrs.width=P,k.attrs.height=G,z&&(z.setAttribute("width",P),z.setAttribute("height",G))}},w=BM(g,null,r,function(k){l||b(M,k),b(f,k)});w&&w.width&&w.height&&(d=d||w.width,v=v||w.height)}f=Mr("image","img",{href:g,width:d,height:v}),o.width=d,o.height=v}else a.svgElement&&(f=Me(a.svgElement),o.width=a.svgWidth,o.height=a.svgHeight);if(f){var T,C;l?T=C=1:u?(C=1,T=o.width/i.width):c?(T=1,C=o.height/i.height):o.patternUnits="userSpaceOnUse",T!=null&&!isNaN(T)&&(o.width=T),C!=null&&!isNaN(C)&&(o.height=C);var D=a6(a);D&&(o.patternTransform=D);var M=Mr("pattern","",o,[f]),N=WD(M),R=n.patternCache,E=R[N];E||(E=n.zrId+"-p"+n.patternIdx++,R[N]=E,o.id=E,M=n.defs[E]=Mr("pattern",E,o,[f])),e[t]=B1(E)}}function Uue(r,e,t){var n=t.clipPathCache,a=t.defs,i=n[r.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};n[r.id]=i,a[i]=Mr("clipPath",i,o,[GF(r,t)])}e["clip-path"]=B1(i)}function U5(r){return document.createTextNode(r)}function Eu(r,e,t){r.insertBefore(e,t)}function Y5(r,e){r.removeChild(e)}function W5(r,e){r.appendChild(e)}function UF(r){return r.parentNode}function YF(r){return r.nextSibling}function Jw(r,e){r.textContent=e}var X5=58,Yue=120,Wue=Mr("","");function tA(r){return r===void 0}function Ti(r){return r!==void 0}function Xue(r,e,t){for(var n={},a=e;a<=t;++a){var i=r[a].key;i!==void 0&&(n[i]=a)}return n}function fp(r,e){var t=r.key===e.key,n=r.tag===e.tag;return n&&t}function ug(r){var e,t=r.children,n=r.tag;if(Ti(n)){var a=r.elm=PF(n);if($D(Wue,r),ce(t))for(e=0;e<t.length;++e){var i=t[e];i!=null&&W5(a,ug(i))}else Ti(r.text)&&!Re(r.text)&&W5(a,U5(r.text))}else r.elm=U5(r.text);return r.elm}function WF(r,e,t,n,a){for(;n<=a;++n){var i=t[n];i!=null&&Eu(r,ug(i),e)}}function Jx(r,e,t,n){for(;t<=n;++t){var a=e[t];if(a!=null)if(Ti(a.tag)){var i=UF(a.elm);Y5(i,a.elm)}else Y5(r,a.elm)}}function $D(r,e){var t,n=e.elm,a=r&&r.attrs||{},i=e.attrs||{};if(a!==i){for(t in i){var o=i[t],s=a[t];s!==o&&(o===!0?n.setAttribute(t,""):o===!1?n.removeAttribute(t):t==="style"?n.style.cssText=o:t.charCodeAt(0)!==Yue?n.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?n.setAttributeNS(Aue,t,o):t.charCodeAt(3)===X5?n.setAttributeNS(Mue,t,o):t.charCodeAt(5)===X5?n.setAttributeNS(OF,t,o):n.setAttribute(t,o))}for(t in a)t in i||n.removeAttribute(t)}}function que(r,e,t){for(var n=0,a=0,i=e.length-1,o=e[0],s=e[i],l=t.length-1,u=t[0],c=t[l],f,d,v,g;n<=i&&a<=l;)o==null?o=e[++n]:s==null?s=e[--i]:u==null?u=t[++a]:c==null?c=t[--l]:fp(o,u)?(Yf(o,u),o=e[++n],u=t[++a]):fp(s,c)?(Yf(s,c),s=e[--i],c=t[--l]):fp(o,c)?(Yf(o,c),Eu(r,o.elm,YF(s.elm)),o=e[++n],c=t[--l]):fp(s,u)?(Yf(s,u),Eu(r,s.elm,o.elm),s=e[--i],u=t[++a]):(tA(f)&&(f=Xue(e,n,i)),d=f[u.key],tA(d)?Eu(r,ug(u),o.elm):(v=e[d],v.tag!==u.tag?Eu(r,ug(u),o.elm):(Yf(v,u),e[d]=void 0,Eu(r,v.elm,o.elm))),u=t[++a]);(n<=i||a<=l)&&(n>i?(g=t[l+1]==null?null:t[l+1].elm,WF(r,g,t,a,l)):Jx(r,e,n,i))}function Yf(r,e){var t=e.elm=r.elm,n=r.children,a=e.children;r!==e&&($D(r,e),tA(e.text)?Ti(n)&&Ti(a)?n!==a&&que(t,n,a):Ti(a)?(Ti(r.text)&&Jw(t,""),WF(t,null,a,0,a.length-1)):Ti(n)?Jx(t,n,0,n.length-1):Ti(r.text)&&Jw(t,""):r.text!==e.text&&(Ti(n)&&Jx(t,n,0,n.length-1),Jw(t,e.text)))}function Zue(r,e){if(fp(r,e))Yf(r,e);else{var t=r.elm,n=UF(t);ug(e),n!==null&&(Eu(n,e.elm,YF(t)),Jx(n,[r],0,0))}return e}var $ue=0,Kue=(function(){function r(e,t,n){if(this.type="svg",this.refreshHover=q5(),this.configLayer=q5(),this.storage=t,this._opts=n=ie({},n),this.root=e,this._id="zr"+$ue++,this._oldVNode=P5(n.width,n.height),e&&!n.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=PF("svg");$D(null,this._oldVNode),a.appendChild(i),e.appendChild(a)}this.resize(n.width,n.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",Zue(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return F5(e,eA(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,a=this._height,i=eA(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=Que(n,a,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=Mr("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=fe(it(i.defs),function(d){return i.defs[d]});if(u.length&&o.push(Mr("defs","defs",{},u)),e.animation){var c=Lue(i.cssNodes,i.cssAnims,{newline:!0});if(c){var f=Mr("style","stl",{},[],c);o.push(f)}}return P5(n,a,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},WD(this.renderToVNode({animation:Ce(e.cssAnimation,!0),emphasis:Ce(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Ce(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,n){for(var a=e.length,i=[],o=0,s,l,u=0,c=0;c<a;c++){var f=e[c];if(!f.invisible){var d=f.__clipPaths,v=d&&d.length||0,g=l&&l.length||0,x=void 0;for(x=Math.max(v-1,g-1);x>=0&&!(d&&l&&d[x]===l[x]);x--);for(var y=g-1;y>x;y--)o--,s=i[o-1];for(var b=x+1;b<v;b++){var w={};Uue(d[b],w,t);var T=Mr("g","clip-g-"+u++,w,[]);(s?s.children:n).push(T),i[o++]=T,s=T}l=d;var C=F5(f,t);C&&(s?s.children:n).push(C)}}},r.prototype.resize=function(e,t){var n=this._opts,a=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),a&&i&&(i.style.display="none",e=Jf(a,0,n),t=Jf(a,1,n),i.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var o=i.style;o.width=e+"px",o.height=t+"px"}if(LM(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",t));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",t))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=Tte(t),t&&n+"base64,"+t):n+"charset=UTF-8,"+encodeURIComponent(t)},r})();function q5(r){return function(){}}function Que(r,e,t,n){var a;if(t&&t!=="none")if(a=Mr("rect","bg",{width:r,height:e,x:"0",y:"0"}),r6(t))HF({fill:t},a.attrs,"fill",n);else if(LM(t))FF({style:{fill:t},dirty:Kt,getBoundingRect:function(){return{width:r,height:e}}},a.attrs,"fill",n);else{var i=qp(t),o=i.color,s=i.opacity;a.attrs.fill=o,s<1&&(a.attrs["fill-opacity"]=s)}return a}function Jue(r){r.registerPainter("svg",Kue)}function Z5(r,e,t){var n=jn.createCanvas(),a=e.getWidth(),i=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=a+"px",o.height=i+"px",n.setAttribute("data-zr-dom-id",r)),n.width=a*t,n.height=i*t,n}var eT=(function(r){K(e,r);function e(t,n,a){var i=r.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var o;a=a||Tx,typeof t=="string"?o=Z5(t,n,a):Re(t)&&(o=t,t=o.id),i.id=t,i.dom=o;var s=o.style;return s&&(CM(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),i.painter=n,i.dpr=a,i}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Z5("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,n,a,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new Ie(0,0,0,0);function c(w){if(!(!w.isFinite()||w.isZero()))if(o.length===0){var T=new Ie(0,0,0,0);T.copy(w),o.push(T)}else{for(var C=!1,D=1/0,M=0,N=0;N<o.length;++N){var R=o[N];if(R.intersect(w)){var E=new Ie(0,0,0,0);E.copy(R),E.union(w),o[N]=E,C=!0;break}else if(l){u.copy(w),u.union(R);var k=w.width*w.height,I=R.width*R.height,z=u.width*u.height,P=z-k-I;P<D&&(D=P,M=N)}}if(l&&(o[M].union(w),C=!0),!C){var T=new Ie(0,0,0,0);T.copy(w),o.push(T)}l||(l=o.length>=s)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var d=t[f];if(d){var v=d.shouldBePainted(a,i,!0,!0),g=d.__isRendered&&(d.__dirty&Jn||!v)?d.getPrevPaintRect():null;g&&c(g);var x=v&&(d.__dirty&Jn||!d.__isRendered)?d.getPaintRect():null;x&&c(x)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var d=n[f],v=d&&d.shouldBePainted(a,i,!0,!0);if(d&&(!v||!d.__zr)&&d.__isRendered){var g=d.getPrevPaintRect();g&&c(g)}}var y;do{y=!1;for(var f=0;f<o.length;){if(o[f].isZero()){o.splice(f,1);continue}for(var b=f+1;b<o.length;)o[f].intersect(o[b])?(y=!0,o[f].union(o[b]),o.splice(b,1)):b++;f++}}while(y);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,n){var a=this.dpr,i=this.dom,o=i.style,s=this.domBack;o&&(o.width=t+"px",o.height=n+"px"),i.width=t*a,i.height=n*a,s&&(s.width=t*a,s.height=n*a,a!==1&&this.ctxBack.scale(a,a))},e.prototype.clear=function(t,n,a){var i=this.dom,o=this.ctx,s=i.width,l=i.height;n=n||this.clearColor;var u=this.motionBlur&&!t,c=this.lastFrameAlpha,f=this.dpr,d=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,s/f,l/f));var v=this.domBack;function g(x,y,b,w){if(o.clearRect(x,y,b,w),n&&n!=="transparent"){var T=void 0;if(Rg(n)){var C=n.global||n.__width===b&&n.__height===w;T=C&&n.__canvasGradient||zC(o,n,{x:0,y:0,width:b,height:w}),n.__canvasGradient=T,n.__width=b,n.__height=w}else EG(n)&&(n.scaleX=n.scaleX||f,n.scaleY=n.scaleY||f,T=jC(o,n,{dirty:function(){d.setUnpainted(),d.painter.refresh()}}));o.save(),o.fillStyle=T||n,o.fillRect(x,y,b,w),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(v,x,y,b,w),o.restore())}!a||u?g(0,0,s,l):a.length&&O(a,function(x){g(x.x*f,x.y*f,x.width*f,x.height*f)})},e})(za),$5=1e5,Su=314159,n0=.01,ece=.001;function tce(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function rce(r,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+r+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var nce=(function(){function r(e,t,n,a){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=ie({},n||{}),this.dpr=n.devicePixelRatio||Tx,this._singleCanvas=i,this.root=e;var o=e.style;o&&(CM(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(i){var c=e,f=c.width,d=c.height;n.width!=null&&(f=n.width),n.height!=null&&(d=n.height),this.dpr=n.devicePixelRatio||1,c.width=f*this.dpr,c.height=d*this.dpr,this._width=f,this._height=d;var v=new eT(c,this,this.dpr);v.__builtin__=!0,v.initContext(),l[Su]=v,v.zlevel=Su,s.push(Su),this._domRoot=e}else{this._width=Jf(e,0,n),this._height=Jf(e,1,n);var u=this._domRoot=rce(this._width,this._height);e.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,a=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<a.length;i++){var o=a[i],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=i===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),!!t){for(var a={inHover:!0,viewWidth:this._width,viewHeight:this._height},i,o=0;o<t;o++){var s=e[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer($5)),i||(i=n.ctx,i.save()),Hu(i,s,a,o===t-1))}i&&i.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer($5)},r.prototype.paintOne=function(e,t){MD(e,t)},r.prototype._paintList=function(e,t,n,a){if(this._redrawId===a){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),o=i.finished,s=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;mx(function(){l._paintList(e,t,n,a)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(Su).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(a){a.virtual&&e.drawImage(a.dom,0,0,t,n)})},r.prototype._doPaintList=function(e,t,n){for(var a=this,i=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&i.push(u)}for(var c=!0,f=!1,d=function(x){var y=i[x],b=y.ctx,w=o&&y.createRepaintRects(e,t,v._width,v._height),T=n?y.__startIndex:y.__drawIndex,C=!n&&y.incremental&&Date.now,D=C&&Date.now(),M=y.zlevel===v._zlevelList[0]?v._backgroundColor:null;if(y.__startIndex===y.__endIndex)y.clear(!1,M,w);else if(T===y.__startIndex){var N=e[T];(!N.incremental||!N.notClear||n)&&y.clear(!1,M,w)}T===-1&&(console.error("For some unknown reason. drawIndex is -1"),T=y.__startIndex);var R,E=function(P){var G={inHover:!1,allClipped:!1,prevEl:null,viewWidth:a._width,viewHeight:a._height};for(R=T;R<y.__endIndex;R++){var U=e[R];if(U.__inHover&&(f=!0),a._doPaintEl(U,y,o,P,G,R===y.__endIndex-1),C){var B=Date.now()-D;if(B>15)break}}G.prevElClipPaths&&b.restore()};if(w)if(w.length===0)R=y.__endIndex;else for(var k=v.dpr,I=0;I<w.length;++I){var z=w[I];b.save(),b.beginPath(),b.rect(z.x*k,z.y*k,z.width*k,z.height*k),b.clip(),E(z),b.restore()}else b.save(),E(),b.restore();y.__drawIndex=R,y.__drawIndex<y.__endIndex&&(c=!1)},v=this,g=0;g<i.length;g++)d(g);return nt.wxa&&O(this._layers,function(x){x&&x.ctx&&x.ctx.draw&&x.ctx.draw()}),{finished:c,needsRefreshHover:f}},r.prototype._doPaintEl=function(e,t,n,a,i,o){var s=t.ctx;if(n){var l=e.getPaintRect();(!a||l&&l.intersect(a))&&(Hu(s,e,i,o),e.setPrevPaintRect(l))}else Hu(s,e,i,o)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Su);var n=this._layers[e];return n||(n=new eT("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Ye(n,this._layerConfig[e],!0):this._layerConfig[e-n0]&&Ye(n,this._layerConfig[e-n0],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},r.prototype.insertLayer=function(e,t){var n=this._layers,a=this._zlevelList,i=a.length,o=this._domRoot,s=null,l=-1;if(!n[e]&&tce(t)){if(i>0&&e>a[0]){for(l=0;l<i-1&&!(a[l]<e&&a[l+1]>e);l++);s=n[a[l]]}if(a.splice(l+1,0,e),n[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a];e.call(t,this._layers[i],i)}},r.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},r.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(f,d){f.__dirty=f.__used=!1});function t(f){i&&(i.__endIndex!==f&&(i.__dirty=!0),i.__endIndex=f)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var a=e[n];if(a.zlevel!==e[n-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}var i=null,o=0,s,l;for(l=0;l<e.length;l++){var a=e[l],u=a.zlevel,c=void 0;s!==u&&(s=u,o=0),a.incremental?(c=this.getLayer(u+ece,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?n0:0),this._needsManuallyCompositing),c.__builtin__||I1("ZLevel "+u+" has been used by unkown layer "+c.id),c!==i&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),i=c),a.__dirty&Jn&&!a.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(f,d){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,O(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?Ye(n[e],t,!0):n[e]=t;for(var a=0;a<this._zlevelList.length;a++){var i=this._zlevelList[a];if(i===e||i===e+n0){var o=this._layers[i];Ye(o,n[e],!0)}}}},r.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,a=t[e];a&&(a.dom.parentNode.removeChild(a.dom),delete t[e],n.splice(Fe(n,e),1))},r.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var a=this._opts,i=this.root;if(e!=null&&(a.width=e),t!=null&&(a.height=t),e=Jf(i,0,a),t=Jf(i,1,a),n.style.display="",this._width!==e||t!==this._height){n.style.width=e+"px",n.style.height=t+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(Su).resize(e,t)}return this},r.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[Su].dom;var t=new eT("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var a=t.dom.width,i=t.dom.height;this.eachLayer(function(f){f.__builtin__?n.drawImage(f.dom,0,0,a,i):f.renderToCanvas&&(n.save(),f.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];Hu(n,c,o,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r})();function ace(r){r.registerPainter("canvas",nce)}var ice=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){return to(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var n=new De,a=ur("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);n.add(a),a.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=i==="none"?"circle":i,l=t.itemHeight*.8,u=ur(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);n.add(u),u.setStyle(t.itemStyle);var c=t.iconRotate==="inherit"?o:t.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=ee.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})(Tt);function Ph(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var a=Eh(r,e,t[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o<t.length;o++)i.push(Eh(r,e,t[o]));return i.join(" ")}}function XF(r,e){var t=r.mapDimensionsAll("defaultedLabel");if(!ce(e))return e+"";for(var n=[],a=0;a<t.length;a++){var i=r.getDimensionIndex(t[a]);i>=0&&n.push(e[i])}return n.join(" ")}var Wg=(function(r){K(e,r);function e(t,n,a,i){var o=r.call(this)||this;return o.updateData(t,n,a,i),o}return e.prototype._createSymbol=function(t,n,a,i,o,s){this.removeAll();var l=ur(t,-1,-1,2,2,null,s);l.attr({z2:Ce(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=oce,this._symbolType=t,this.add(l)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){$o(this.childAt(0))},e.prototype.downplay=function(){Ko(this.childAt(0))},e.prototype.setZ=function(t,n){var a=this.childAt(0);a.zlevel=t,a.z=n},e.prototype.setDraggable=function(t,n){var a=this.childAt(0);a.draggable=t,a.cursor=!n&&t?"move":a.cursor},e.prototype.updateData=function(t,n,a,i){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=e.getSymbolZ2(t,n),c=o!==this._symbolType,f=i&&i.disableAnimation;if(c){var d=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,l,u,d)}else{var v=this.childAt(0);v.silent=!1;var g={scaleX:l[0]/2,scaleY:l[1]/2};f?v.attr(g):lt(v,g,s,n),Pa(v)}if(this._updateCommon(t,n,l,a,i),c){var v=this.childAt(0);if(!f){var g={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,jt(v,g,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,n,a,i,o){var s=this.childAt(0),l=t.hostModel,u,c,f,d,v,g,x,y,b;if(i&&(u=i.emphasisItemStyle,c=i.blurItemStyle,f=i.selectItemStyle,d=i.focus,v=i.blurScope,x=i.labelStatesModels,y=i.hoverScale,b=i.cursorStyle,g=i.emphasisDisabled),!i||t.hasItemOption){var w=i&&i.itemModel?i.itemModel:t.getItemModel(n),T=w.getModel("emphasis");u=T.getModel("itemStyle").getItemStyle(),f=w.getModel(["select","itemStyle"]).getItemStyle(),c=w.getModel(["blur","itemStyle"]).getItemStyle(),d=T.get("focus"),v=T.get("blurScope"),g=T.get("disabled"),x=Sr(w),y=T.getShallow("scale"),b=w.getShallow("cursor")}var C=t.getItemVisual(n,"symbolRotate");s.attr("rotation",(C||0)*Math.PI/180||0);var D=Tc(t.getItemVisual(n,"symbolOffset"),a);D&&(s.x=D[0],s.y=D[1]),b&&s.attr("cursor",b);var M=t.getItemVisual(n,"style"),N=M.fill;if(s instanceof kr){var R=s.style;s.useStyle(ie({image:R.image,x:R.x,y:R.y,width:R.width,height:R.height},M))}else s.__isEmptyBrush?s.useStyle(ie({},M)):s.useStyle(M),s.style.decal=null,s.setColor(N,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var E=t.getItemVisual(n,"liftZ"),k=this._z2;E!=null?k==null&&(this._z2=s.z2,s.z2+=E):k!=null&&(s.z2=k,this._z2=null);var I=o&&o.useNameLabel;Lr(s,x,{labelFetcher:l,labelDataIndex:n,defaultText:z,inheritColor:N,defaultOpacity:M.opacity});function z(U){return I?t.getName(U):Ph(t,U)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var P=s.ensureState("emphasis");P.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var G=y==null||y===!0?Math.max(1.1,3/this._sizeY):isFinite(y)&&y>0?+y:1;P.scaleX=this._sizeX*G,P.scaleY=this._sizeY*G,this.setSymbolScale(1),Ut(this,d,v,g)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,n,a){var i=this.childAt(0),o=Pe(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&_l(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();_l(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return id(t.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(t,n){return t.getItemVisual(n,"z2")},e})(De);function oce(r,e){this.parent.drift(r,e)}function tT(r,e,t,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(t))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function K5(r){return r!=null&&!Re(r)&&(r={isIgnore:r}),r||{}}function Q5(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:Sr(e),cursorStyle:e.get("cursor")}}var Xg=(function(){function r(e){this.group=new De,this._SymbolCtor=e||Wg}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=K5(t);var n=this.group,a=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=Q5(e),u={disableAnimation:s},c=t.getSymbolPoint||function(f){return e.getItemLayout(f)};i||n.removeAll(),e.diff(i).add(function(f){var d=c(f);if(tT(e,d,f,t)){var v=new o(e,f,l,u);v.setPosition(d),e.setItemGraphicEl(f,v),n.add(v)}}).update(function(f,d){var v=i.getItemGraphicEl(d),g=c(f);if(!tT(e,g,f,t)){n.remove(v);return}var x=e.getItemVisual(f,"symbol")||"circle",y=v&&v.getSymbolType&&v.getSymbolType();if(!v||y&&y!==x)n.remove(v),v=new o(e,f,l,u),v.setPosition(g);else{v.updateData(e,f,l,u);var b={x:g[0],y:g[1]};s?v.attr(b):lt(v,b,a)}n.add(v),e.setItemGraphicEl(f,v)}).remove(function(f){var d=i.getItemGraphicEl(f);d&&d.fadeOut(function(){n.remove(d)},a)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(n,a){var i=e._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Q5(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=K5(n);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(tT(t,o,i,n)){var s=new this._SymbolCtor(t,i,this._seriesScope);s.traverse(a),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(i,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(e){Nl(this._progressiveEls||this.group,e)},r.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(a){a.fadeOut(function(){t.remove(a)},n.hostModel)}):t.removeAll()},r})();function qF(r,e,t){var n=r.getBaseAxis(),a=r.getOtherAxis(n),i=sce(a,t),o=n.dim,s=a.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=fe(r.dimensions,function(g){return e.mapDimension(g)}),d=!1,v=e.getCalculationInfo("stackResultDimension");return Jo(e,f[0])&&(d=!0,f[0]=v),Jo(e,f[1])&&(d=!0,f[1]=v),{dataDimsForPoint:f,valueStart:i,valueAxisDim:s,baseAxisDim:o,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function sce(r,e){var t=0,n=r.scale.getExtent();return e==="start"?t=n[0]:e==="end"?t=n[1]:st(e)&&!isNaN(e)?t=e:n[0]>0?t=n[0]:n[1]<0&&(t=n[1]),t}function ZF(r,e,t,n){var a=NaN;r.stacked&&(a=t.get(t.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,n),o[1-i]=a,e.dataToPoint(o)}function lce(r,e){var t=[];return e.diff(r).add(function(n){t.push({cmd:"+",idx:n})}).update(function(n,a){t.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){t.push({cmd:"-",idx:n})}).execute(),t}function uce(r,e,t,n,a,i,o,s){for(var l=lce(r,e),u=[],c=[],f=[],d=[],v=[],g=[],x=[],y=qF(a,e,o),b=r.getLayout("points")||[],w=e.getLayout("points")||[],T=0;T<l.length;T++){var C=l[T],D=!0,M=void 0,N=void 0;switch(C.cmd){case"=":M=C.idx*2,N=C.idx1*2;var R=b[M],E=b[M+1],k=w[N],I=w[N+1];(isNaN(R)||isNaN(E))&&(R=k,E=I),u.push(R,E),c.push(k,I),f.push(t[M],t[M+1]),d.push(n[N],n[N+1]),x.push(e.getRawIndex(C.idx1));break;case"+":var z=C.idx,P=y.dataDimsForPoint,G=a.dataToPoint([e.get(P[0],z),e.get(P[1],z)]);N=z*2,u.push(G[0],G[1]),c.push(w[N],w[N+1]);var U=ZF(y,a,e,z);f.push(U[0],U[1]),d.push(n[N],n[N+1]),x.push(e.getRawIndex(z));break;case"-":D=!1}D&&(v.push(C),g.push(g.length))}g.sort(function(ge,Se){return x[ge]-x[Se]});for(var B=u.length,F=zi(B),H=zi(B),X=zi(B),V=zi(B),W=[],T=0;T<g.length;T++){var $=g[T],te=T*2,ue=$*2;F[te]=u[ue],F[te+1]=u[ue+1],H[te]=c[ue],H[te+1]=c[ue+1],X[te]=f[ue],X[te+1]=f[ue+1],V[te]=d[ue],V[te+1]=d[ue+1],W[T]=v[$]}return{current:F,next:H,stackedOnCurrent:X,stackedOnNext:V,status:W}}var js=Math.min,Bs=Math.max;function nc(r,e){return isNaN(r)||isNaN(e)}function rA(r,e,t,n,a,i,o,s,l){for(var u,c,f,d,v,g,x=t,y=0;y<n;y++){var b=e[x*2],w=e[x*2+1];if(x>=a||x<0)break;if(nc(b,w)){if(l){x+=i;continue}break}if(x===t)r[i>0?"moveTo":"lineTo"](b,w),f=b,d=w;else{var T=b-u,C=w-c;if(T*T+C*C<.5){x+=i;continue}if(o>0){for(var D=x+i,M=e[D*2],N=e[D*2+1];M===b&&N===w&&y<n;)y++,D+=i,x+=i,M=e[D*2],N=e[D*2+1],b=e[x*2],w=e[x*2+1],T=b-u,C=w-c;var R=y+1;if(l)for(;nc(M,N)&&R<n;)R++,D+=i,M=e[D*2],N=e[D*2+1];var E=.5,k=0,I=0,z=void 0,P=void 0;if(R>=n||nc(M,N))v=b,g=w;else{k=M-u,I=N-c;var G=b-u,U=M-b,B=w-c,F=N-w,H=void 0,X=void 0;if(s==="x"){H=Math.abs(G),X=Math.abs(U);var V=k>0?1:-1;v=b-V*H*o,g=w,z=b+V*X*o,P=w}else if(s==="y"){H=Math.abs(B),X=Math.abs(F);var W=I>0?1:-1;v=b,g=w-W*H*o,z=b,P=w+W*X*o}else H=Math.sqrt(G*G+B*B),X=Math.sqrt(U*U+F*F),E=X/(X+H),v=b-k*o*(1-E),g=w-I*o*(1-E),z=b+k*o*E,P=w+I*o*E,z=js(z,Bs(M,b)),P=js(P,Bs(N,w)),z=Bs(z,js(M,b)),P=Bs(P,js(N,w)),k=z-b,I=P-w,v=b-k*H/X,g=w-I*H/X,v=js(v,Bs(u,b)),g=js(g,Bs(c,w)),v=Bs(v,js(u,b)),g=Bs(g,js(c,w)),k=b-v,I=w-g,z=b+k*X/H,P=w+I*X/H}r.bezierCurveTo(f,d,v,g,b,w),f=z,d=P}else r.lineTo(b,w)}u=b,c=w,x+=i}return y}var $F=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),cce=(function(r){K(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:ee.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new $F},e.prototype.buildPath=function(t,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&nc(a[o*2-2],a[o*2-1]);o--);for(;i<o&&nc(a[i*2],a[i*2+1]);i++);}for(;i<o;)i+=rA(t,a,i,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(t,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var a=this.path,i=a.data,o=qi.CMD,s,l,u=n==="x",c=[],f=0;f<i.length;){var d=i[f++],v=void 0,g=void 0,x=void 0,y=void 0,b=void 0,w=void 0,T=void 0;switch(d){case o.M:s=i[f++],l=i[f++];break;case o.L:if(v=i[f++],g=i[f++],T=u?(t-s)/(v-s):(t-l)/(g-l),T<=1&&T>=0){var C=u?(g-l)*T+l:(v-s)*T+s;return u?[t,C]:[C,t]}s=v,l=g;break;case o.C:v=i[f++],g=i[f++],x=i[f++],y=i[f++],b=i[f++],w=i[f++];var D=u?xx(s,v,x,b,t,c):xx(l,g,y,w,t,c);if(D>0)for(var M=0;M<D;M++){var N=c[M];if(N<=1&&N>=0){var C=u?Ar(l,g,y,w,N):Ar(s,v,x,b,N);return u?[t,C]:[C,t]}}s=b,l=w;break}}},e})(tt),fce=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})($F),KF=(function(r){K(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new fce},e.prototype.buildPath=function(t,n){var a=n.points,i=n.stackedOnPoints,o=0,s=a.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&nc(a[s*2-2],a[s*2-1]);s--);for(;o<s&&nc(a[o*2],a[o*2+1]);o++);}for(;o<s;){var u=rA(t,a,o,s,s,1,n.smooth,l,n.connectNulls);rA(t,i,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,t.closePath()}},e})(tt);function QF(r,e,t,n,a){var i=r.getArea(),o=i.x,s=i.y,l=i.width,u=i.height,c=t.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 f=new qe({shape:{x:o,y:s,width:l,height:u}});if(e){var d=r.getBaseAxis(),v=d.isHorizontal(),g=d.inverse;v?(g&&(f.shape.x+=l),f.shape.width=0):(g||(f.shape.y+=u),f.shape.height=0);var x=Ae(a)?function(y){a(y,f)}:null;jt(f,{shape:{width:l,height:u,x:o,y:s}},t,null,n,x)}return f}function JF(r,e,t){var n=r.getArea(),a=sr(n.r0,1),i=sr(n.r,1),o=new rn({shape:{cx:sr(r.cx,1),cy:sr(r.cy,1),r0:a,r:i,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=a,jt(o,{shape:{endAngle:n.endAngle,r:i}},t)}return o}function qg(r,e,t,n,a){if(r){if(r.type==="polar")return JF(r,e,t);if(r.type==="cartesian2d")return QF(r,e,t,n,a)}else return null;return null}function Sl(r,e){return r.type===e}function J5(r,e){if(r.length===e.length){for(var t=0;t<r.length;t++)if(r[t]!==e[t])return;return!0}}function e3(r){for(var e=1/0,t=1/0,n=-1/0,a=-1/0,i=0;i<r.length;){var o=r[i++],s=r[i++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(t=Math.min(s,t),a=Math.max(s,a))}return[[e,t],[n,a]]}function t3(r,e){var t=e3(r),n=t[0],a=t[1],i=e3(e),o=i[0],s=i[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(a[0]-s[0]),Math.abs(a[1]-s[1]))}function r3(r){return st(r)?r:r?.5:0}function hce(r,e,t){if(!t.valueDim)return[];for(var n=e.count(),a=zi(n*2),i=0;i<n;i++){var o=ZF(t,r,e,i);a[i*2]=o[0],a[i*2+1]=o[1]}return a}function Vs(r,e,t,n,a){var i=t.getBaseAxis(),o=i.dim==="x"||i.dim==="radius"?0:1,s=[],l=0,u=[],c=[],f=[],d=[];if(a){for(l=0;l<r.length;l+=2){var v=e||r;!isNaN(v[l])&&!isNaN(v[l+1])&&d.push(r[l],r[l+1])}r=d}for(l=0;l<r.length-2;l+=2)switch(f[0]=r[l+2],f[1]=r[l+3],c[0]=r[l],c[1]=r[l+1],s.push(c[0],c[1]),n){case"end":u[o]=f[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var g=(c[o]+f[o])/2,x=[];u[o]=x[o]=g,u[1-o]=c[1-o],x[1-o]=f[1-o],s.push(u[0],u[1]),s.push(x[0],x[1]);break;default:u[o]=c[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function dce(r,e){var t=[],n=r.length,a,i;function o(c,f,d){var v=c.coord,g=(d-v)/(f.coord-v),x=NM(g,[c.color,f.color]);return{coord:d,color:x}}for(var s=0;s<n;s++){var l=r[s],u=l.coord;if(u<0)a=l;else if(u>e){i?t.push(o(i,l,e)):a&&t.push(o(a,l,0),o(a,l,e));break}else a&&(t.push(o(a,l,0)),a=null),t.push(l),i=l}return t}function vce(r,e,t){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&e.type==="cartesian2d"){for(var a,i,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=n[o];break}}if(i){var l=e.getAxis(a),u=fe(i.stops,function(T){return{coord:l.toGlobalCoord(l.dataToCoord(T.value)),color:T.color}}),c=u.length,f=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var d=dce(u,a==="x"?t.getWidth():t.getHeight()),v=d.length;if(!v&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var g=10,x=d[0].coord-g,y=d[v-1].coord+g,b=y-x;if(b<.001)return"transparent";O(d,function(T){T.offset=(T.coord-x)/b}),d.push({offset:v?d[v-1].offset:.5,color:f[1]||"transparent"}),d.unshift({offset:v?d[0].offset:.5,color:f[0]||"transparent"});var w=new bc(0,0,0,0,d,!0);return w[a]=x,w[a+"2"]=y,w}}}function pce(r,e,t){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(a&&gce(i,e))){var o=e.mapDimension(i.dim),s={};return O(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function gce(r,e){var t=r.getExtent(),n=Math.abs(t[1]-t[0])/r.scale.count();isNaN(n)&&(n=0);for(var a=e.count(),i=Math.max(1,Math.round(a/5)),o=0;o<a;o+=i)if(Wg.getSymbolSize(e,o)[r.isHorizontal()?1:0]*1.5>n)return!1;return!0}function mce(r,e){return isNaN(r)||isNaN(e)}function yce(r){for(var e=r.length/2;e>0&&mce(r[e*2-2],r[e*2-1]);e--);return e-1}function n3(r,e){return[r[e*2],r[e*2+1]]}function xce(r,e,t){for(var n=r.length/2,a=t==="x"?0:1,i,o,s=0,l=-1,u=0;u<n;u++)if(o=r[u*2+a],!(isNaN(o)||isNaN(r[u*2+1-a]))){if(u===0){i=o;continue}if(i<=e&&o>=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function e7(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e<Tn.length;e++)if(r.get([Tn[e],"endLabel","show"]))return!0;return!1}function rT(r,e,t,n){if(Sl(e,"cartesian2d")){var a=n.getModel("endLabel"),i=a.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=e7(n)?function(v,g){r._endLabelOnDuring(v,g,o,s,i,a,e)}:null,u=e.getBaseAxis().isHorizontal(),c=QF(e,t,n,function(){var v=r._endLabel;v&&t&&s.originalX!=null&&v.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var f=c.shape,d=Math.max(f.width,f.height);u?(f.y-=d,f.height+=d*2):(f.x-=d,f.width+=d*2)}return l&&l(1,c),c}else return JF(e,t,n)}function bce(r,e){var t=e.getBaseAxis(),n=t.isHorizontal(),a=t.inverse,i=n?a?"right":"left":"center",o=n?"middle":a?"top":"bottom";return{normal:{align:r.get("align")||i,verticalAlign:r.get("verticalAlign")||o}}}var _ce=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=new De,n=new Xg;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=t,this._changePolyState=xe(this._changePolyState,this)},e.prototype.render=function(t,n,a){var i=t.coordinateSystem,o=this.group,s=t.getData(),l=t.getModel("lineStyle"),u=t.getModel("areaStyle"),c=s.getLayout("points")||[],f=i.type==="polar",d=this._coordSys,v=this._symbolDraw,g=this._polyline,x=this._polygon,y=this._lineGroup,b=!n.ssr&&t.get("animation"),w=!u.isEmpty(),T=u.get("origin"),C=qF(i,s,T),D=w&&hce(i,s,C),M=t.get("showSymbol"),N=t.get("connectNulls"),R=M&&!f&&pce(t,s,i),E=this._data;E&&E.eachItemGraphicEl(function(ge,Se){ge.__temp&&(o.remove(ge),E.setItemGraphicEl(Se,null))}),M||v.remove(),o.add(y);var k=f?!1:t.get("step"),I;i&&i.getArea&&t.get("clip",!0)&&(I=i.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=vce(s,i,a)||s.getVisual("style")[s.getVisual("drawType")];if(!(g&&d.type===i.type&&k===this._step))M&&v.updateData(s,{isIgnore:R,clipShape:I,disableAnimation:!0,getSymbolPoint:function(ge){return[c[ge*2],c[ge*2+1]]}}),b&&this._initSymbolLabelAnimation(s,i,I),k&&(D&&(D=Vs(D,c,i,k,N)),c=Vs(c,null,i,k,N)),g=this._newPolyline(c),w?x=this._newPolygon(c,D):x&&(y.remove(x),x=this._polygon=null),f||this._initOrUpdateEndLabel(t,i,vc(z)),y.setClipPath(rT(this,i,!0,t));else{w&&!x?x=this._newPolygon(c,D):x&&!w&&(y.remove(x),x=this._polygon=null),f||this._initOrUpdateEndLabel(t,i,vc(z));var P=y.getClipPath();if(P){var G=rT(this,i,!1,t);jt(P,{shape:G.shape},t)}else y.setClipPath(rT(this,i,!0,t));M&&v.updateData(s,{isIgnore:R,clipShape:I,disableAnimation:!0,getSymbolPoint:function(ge){return[c[ge*2],c[ge*2+1]]}}),(!J5(this._stackedOnPoints,D)||!J5(this._points,c))&&(b?this._doUpdateAnimation(s,D,i,a,k,T,N):(k&&(D&&(D=Vs(D,c,i,k,N)),c=Vs(c,null,i,k,N)),g.setShape({points:c}),x&&x.setShape({points:c,stackedOnPoints:D})))}var U=t.getModel("emphasis"),B=U.get("focus"),F=U.get("blurScope"),H=U.get("disabled");if(g.useStyle(Le(l.getLineStyle(),{fill:"none",stroke:z,lineJoin:"bevel"})),_r(g,t,"lineStyle"),g.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var X=g.getState("emphasis").style;X.lineWidth=+g.style.lineWidth+1}Pe(g).seriesIndex=t.seriesIndex,Ut(g,B,F,H);var V=r3(t.get("smooth")),W=t.get("smoothMonotone");if(g.setShape({smooth:V,smoothMonotone:W,connectNulls:N}),x){var $=s.getCalculationInfo("stackedOnSeries"),te=0;x.useStyle(Le(u.getAreaStyle(),{fill:z,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),$&&(te=r3($.get("smooth"))),x.setShape({smooth:V,stackedOnSmooth:te,smoothMonotone:W,connectNulls:N}),_r(x,t,"areaStyle"),Pe(x).seriesIndex=t.seriesIndex,Ut(x,B,F,H)}var ue=this._changePolyState;s.eachItemGraphicEl(function(ge){ge&&(ge.onHoverStateChange=ue)}),this._polyline.onHoverStateChange=ue,this._data=s,this._coordSys=i,this._stackedOnPoints=D,this._points=c,this._step=k,this._valueOrigin=T,t.get("triggerLineEvent")&&(this.packEventData(t,g),x&&this.packEventData(t,x))},e.prototype.packEventData=function(t,n){Pe(n).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,n,a,i){var o=t.getData(),s=uc(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var d=t.get("zlevel")||0,v=t.get("z")||0;u=new Wg(o,s),u.x=c,u.y=f,u.setZ(d,v);var g=u.getSymbolPath().getTextContent();g&&(g.zlevel=d,g.z=v,g.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else _t.prototype.highlight.call(this,t,n,a,i)},e.prototype.downplay=function(t,n,a,i){var o=t.getData(),s=uc(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else _t.prototype.downplay.call(this,t,n,a,i)},e.prototype._changePolyState=function(t){var n=this._polygon;Rx(this._polyline,t),n&&Rx(n,t)},e.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new cce({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(t,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new KF({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},e.prototype._initSymbolLabelAnimation=function(t,n,a){var i,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):n.type==="polar"&&(i=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");Ae(c)&&(c=c(null));var f=u.get("animationDelay")||0,d=Ae(f)?f(null):f;t.eachItemGraphicEl(function(v,g){var x=v;if(x){var y=[v.x,v.y],b=void 0,w=void 0,T=void 0;if(a)if(o){var C=a,D=n.pointToCoord(y);i?(b=C.startAngle,w=C.endAngle,T=-D[1]/180*Math.PI):(b=C.r0,w=C.r,T=D[0])}else{var M=a;i?(b=M.x,w=M.x+M.width,T=v.x):(b=M.y+M.height,w=M.y,T=v.y)}var N=w===b?0:(T-b)/(w-b);l&&(N=1-N);var R=Ae(f)?f(g):c*N+d,E=x.getSymbolPath(),k=E.getTextContent();x.attr({scaleX:0,scaleY:0}),x.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:R}),k&&k.animateFrom({style:{opacity:0}},{duration:300,delay:R}),E.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,n,a){var i=t.getModel("endLabel");if(e7(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new ot({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=yce(l);c>=0&&(Lr(s,Sr(t,"endLabel"),{inheritColor:a,labelFetcher:t,labelDataIndex:c,defaultText:function(f,d,v){return v!=null?XF(o,v):Ph(o,f)},enableTextSetter:!0},bce(i,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,n,a,i,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var f=a.getLayout("points"),d=a.hostModel,v=d.get("connectNulls"),g=s.get("precision"),x=s.get("distance")||0,y=l.getBaseAxis(),b=y.isHorizontal(),w=y.inverse,T=n.shape,C=w?b?T.x:T.y+T.height:b?T.x+T.width:T.y,D=(b?x:0)*(w?-1:1),M=(b?0:-x)*(w?-1:1),N=b?"x":"y",R=xce(f,C,N),E=R.range,k=E[1]-E[0],I=void 0;if(k>=1){if(k>1&&!v){var z=n3(f,E[0]);u.attr({x:z[0]+D,y:z[1]+M}),o&&(I=d.getRawValue(E[0]))}else{var z=c.getPointOn(C,N);z&&u.attr({x:z[0]+D,y:z[1]+M});var P=d.getRawValue(E[0]),G=d.getRawValue(E[1]);o&&(I=C6(a,g,P,G,R.t))}i.lastFrameIndex=E[0]}else{var U=t===1||i.lastFrameIndex>0?E[0]:0,z=n3(f,U);o&&(I=d.getRawValue(U)),u.attr({x:z[0]+D,y:z[1]+M})}if(o){var B=Jh(u);typeof B.setLabelText=="function"&&B.setLabelText(I)}}},e.prototype._doUpdateAnimation=function(t,n,a,i,o,s,l){var u=this._polyline,c=this._polygon,f=t.hostModel,d=uce(this._data,t,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),v=d.current,g=d.stackedOnCurrent,x=d.next,y=d.stackedOnNext;if(o&&(g=Vs(d.stackedOnCurrent,d.current,a,o,l),v=Vs(d.current,null,a,o,l),y=Vs(d.stackedOnNext,d.next,a,o,l),x=Vs(d.next,null,a,o,l)),t3(v,x)>3e3||c&&t3(g,y)>3e3){u.stopAnimation(),u.setShape({points:x}),c&&(c.stopAnimation(),c.setShape({points:x,stackedOnPoints:y}));return}u.shape.__points=d.current,u.shape.points=v;var b={shape:{points:x}};d.current!==v&&(b.shape.__points=d.next),u.stopAnimation(),lt(u,b,f),c&&(c.setShape({points:v,stackedOnPoints:g}),c.stopAnimation(),lt(c,{shape:{stackedOnPoints:y}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var w=[],T=d.status,C=0;C<T.length;C++){var D=T[C].cmd;if(D==="="){var M=t.getItemGraphicEl(T[C].idx1);M&&w.push({el:M,ptIdx:C})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var N=u.shape.__points,R=0;R<w.length;R++){var E=w[R].el,k=w[R].ptIdx*2;E.x=N[k],E.y=N[k+1],E.markRedraw()}})},e.prototype.remove=function(t){var n=this.group,a=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),a&&a.eachItemGraphicEl(function(i,o){i.__temp&&(n.remove(i),a.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e})(_t);function Zg(r,e){return{seriesType:r,plan:nd(),reset:function(t){var n=t.getData(),a=t.coordinateSystem,i=t.pipelineContext,o=e||i.large;if(a){var s=fe(a.dimensions,function(v){return n.mapDimension(v)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");Jo(n,s[0])&&(s[0]=u),Jo(n,s[1])&&(s[1]=u);var c=n.getStore(),f=n.getDimensionIndex(s[0]),d=n.getDimensionIndex(s[1]);return l&&{progress:function(v,g){for(var x=v.end-v.start,y=o&&zi(x*l),b=[],w=[],T=v.start,C=0;T<v.end;T++){var D=void 0;if(l===1){var M=c.get(f,T);D=a.dataToPoint(M,null,w)}else b[0]=c.get(f,T),b[1]=c.get(d,T),D=a.dataToPoint(b,null,w);o?(y[C++]=D[0],y[C++]=D[1]):g.setItemLayout(T,D.slice())}o&&g.setLayout("points",y)}}}}}}var Sce={average:function(r){for(var e=0,t=0,n=0;n<r.length;n++)isNaN(r[n])||(e+=r[n],t++);return t===0?NaN:e/t},sum:function(r){for(var e=0,t=0;t<r.length;t++)e+=r[t]||0;return e},max:function(r){for(var e=-1/0,t=0;t<r.length;t++)r[t]>e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t<r.length;t++)r[t]<e&&(e=r[t]);return isFinite(e)?e:NaN},nearest:function(r){return r[0]}},wce=function(r){return Math.round(r.length/2)};function t7(r){return{seriesType:r,reset:function(e,t,n){var a=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,s=a.count();if(s>10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),d=Math.abs(c[1]-c[0])*(f||1),v=Math.round(s/d);if(isFinite(v)&&v>1){i==="lttb"?e.setData(a.lttbDownSample(a.mapDimension(u.dim),1/v)):i==="minmax"&&e.setData(a.minmaxDownSample(a.mapDimension(u.dim),1/v));var g=void 0;ye(i)?g=Sce[i]:Ae(i)&&(g=i),g&&e.setData(a.downSample(a.mapDimension(u.dim),1/v,g,wce))}}}}}function Tce(r){r.registerChartView(_ce),r.registerSeriesModel(ice),r.registerLayout(Zg("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,t7("line"))}var cg=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return to(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),s=i.dataToPoint(o);if(a)O(i.getAxes(),function(d,v){if(d.type==="category"&&n!=null){var g=d.getTicksCoords(),x=d.getTickModel().get("alignWithLabel"),y=o[v],b=n[v]==="x1"||n[v]==="y1";if(b&&!x&&(y+=1),g.length<2)return;if(g.length===2){s[v]=d.toGlobalCoord(d.getExtent()[b?1:0]);return}for(var w=void 0,T=void 0,C=1,D=0;D<g.length;D++){var M=g[D].coord,N=D===g.length-1?g[D-1].tickValue+C:g[D].tickValue;if(N===y){T=M;break}else if(N<y)w=M;else if(w!=null&&N>y){T=(M+w)/2;break}D===1&&(C=N-g[0].tickValue)}T==null&&(w?w&&(T=g[g.length-1].coord):T=g[0].coord),s[v]=d.toGlobalCoord(T)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=i.getBaseAxis().isHorizontal()?0:1;s[f]+=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})(Tt);Tt.registerClass(cg);var Cce=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return to(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>t&&(t=n),t},e.prototype.brushSelector=function(t,n,a){return a.rect(n.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Ll(cg.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:ee.color.primary,borderWidth:2}},realtimeSort:!1}),e})(cg),Ace=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),e1=(function(r){K(e,r);function e(t){var n=r.call(this,t)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new Ace},e.prototype.buildPath=function(t,n){var a=n.cx,i=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,f=n.endAngle,d=n.clockwise,v=Math.PI*2,g=d?f-c<v:c-f<v;g||(c=f-(d?v:-v));var x=Math.cos(c),y=Math.sin(c),b=Math.cos(f),w=Math.sin(f);g?(t.moveTo(x*o+a,y*o+i),t.arc(x*u+a,y*u+i,l,-Math.PI+c,c,!d)):t.moveTo(x*s+a,y*s+i),t.arc(a,i,s,c,f,!d),t.arc(b*u+a,w*u+i,l,f-Math.PI*2,f-Math.PI,!d),o!==0&&t.arc(a,i,o,f,c,d)},e})(tt);function Mce(r,e){e=e||{};var t=e.isRoundCap;return function(n,a,i){var o=a.position;if(!o||o instanceof Array)return Ax(n,a,i);var s=r(o),l=a.distance!=null?a.distance:5,u=this.shape,c=u.cx,f=u.cy,d=u.r,v=u.r0,g=(d+v)/2,x=u.startAngle,y=u.endAngle,b=(x+y)/2,w=t?Math.abs(d-v)/2:0,T=Math.cos,C=Math.sin,D=c+d*T(x),M=f+d*C(x),N="left",R="top";switch(s){case"startArc":D=c+(v-l)*T(b),M=f+(v-l)*C(b),N="center",R="top";break;case"insideStartArc":D=c+(v+l)*T(b),M=f+(v+l)*C(b),N="center",R="bottom";break;case"startAngle":D=c+g*T(x)+a0(x,l+w,!1),M=f+g*C(x)+i0(x,l+w,!1),N="right",R="middle";break;case"insideStartAngle":D=c+g*T(x)+a0(x,-l+w,!1),M=f+g*C(x)+i0(x,-l+w,!1),N="left",R="middle";break;case"middle":D=c+g*T(b),M=f+g*C(b),N="center",R="middle";break;case"endArc":D=c+(d+l)*T(b),M=f+(d+l)*C(b),N="center",R="bottom";break;case"insideEndArc":D=c+(d-l)*T(b),M=f+(d-l)*C(b),N="center",R="top";break;case"endAngle":D=c+g*T(y)+a0(y,l+w,!0),M=f+g*C(y)+i0(y,l+w,!0),N="left",R="middle";break;case"insideEndAngle":D=c+g*T(y)+a0(y,-l+w,!0),M=f+g*C(y)+i0(y,-l+w,!0),N="right",R="middle";break;default:return Ax(n,a,i)}return n=n||{},n.x=D,n.y=M,n.align=N,n.verticalAlign=R,n}}function Dce(r,e,t,n){if(st(n)){r.setTextConfig({rotation:n});return}else if(ce(e)){r.setTextConfig({rotation:0});return}var a=r.shape,i=a.clockwise?a.startAngle:a.endAngle,o=a.clockwise?a.endAngle:a.startAngle,s=(i+o)/2,l,u=t(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=i;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.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),r.setTextConfig({rotation:c})}function a0(r,e,t){return e*Math.sin(r)*(t?-1:1)}function i0(r,e,t){return e*Math.cos(r)*(t?1:-1)}function Bi(r,e,t){var n=r.get("borderRadius");if(n==null)return t?{cornerRadius:0}:null;ce(n)||(n=[n,n,n,n]);var a=Math.abs(e.r||0-e.r0||0);return{cornerRadius:fe(n,function(i){return ii(i,a)})}}var nT=Math.max,aT=Math.min;function Nce(r,e){var t=r.getArea&&r.getArea();if(Sl(r,"cartesian2d")){var n=r.getBaseAxis();if(n.type!=="category"||!n.onBand){var a=e.getLayout("bandWidth");n.isHorizontal()?(t.x-=a,t.width+=a*2):(t.y-=a,t.height+=a*2)}}return t}var Lce=(function(r){K(e,r);function e(){var t=r.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,n,a,i){this._model=t,this._removeOnRenderedListener(a),this._updateDrawMode(t);var o=t.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,n,a):this._renderNormal(t,n,a,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,n){this._progressiveEls=[],this._incrementalRenderLarge(t,n)},e.prototype.eachRendered=function(t){Nl(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t,n,a,i){var o=this.group,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),f;u.type==="cartesian2d"?f=c.isHorizontal():u.type==="polar"&&(f=c.dim==="angle");var d=t.isAnimationEnabled()?t:null,v=Rce(t,u);v&&this._enableRealtimeSort(v,s,a);var g=t.get("clip",!0)||v,x=Nce(u,s);o.removeClipPath();var y=t.get("roundCap",!0),b=t.get("showBackground",!0),w=t.getModel("backgroundStyle"),T=w.get("borderRadius")||0,C=[],D=this._backgroundEls,M=i&&i.isInitSort,N=i&&i.type==="changeAxisOrder";function R(I){var z=o0[u.type](s,I);if(!z)return null;var P=jce(u,f,z);return P.useStyle(w.getItemStyle()),u.type==="cartesian2d"?P.setShape("r",T):P.setShape("cornerRadius",T),C[I]=P,P}s.diff(l).add(function(I){var z=s.getItemModel(I),P=o0[u.type](s,I,z);if(P&&(b&&R(I),!(!s.hasValue(I)||!l3[u.type](P)))){var G=!1;g&&(G=a3[u.type](x,P));var U=i3[u.type](t,s,I,P,f,d,c.model,!1,y);v&&(U.forceLabelAnimation=!0),u3(U,s,I,z,P,t,f,u.type==="polar"),M?U.attr({shape:P}):v?o3(v,d,U,P,I,f,!1,!1):jt(U,{shape:P},t,I),s.setItemGraphicEl(I,U),o.add(U),U.ignore=G}}).update(function(I,z){var P=s.getItemModel(I),G=o0[u.type](s,I,P);if(G){if(b){var U=void 0;D.length===0?U=R(z):(U=D[z],U.useStyle(w.getItemStyle()),u.type==="cartesian2d"?U.setShape("r",T):U.setShape("cornerRadius",T),C[I]=U);var B=o0[u.type](s,I),F=n7(f,B,u);lt(U,{shape:F},d,I)}var H=l.getItemGraphicEl(z);if(!s.hasValue(I)||!l3[u.type](G)){o.remove(H);return}var X=!1;g&&(X=a3[u.type](x,G),X&&o.remove(H));var V=H&&(H.type==="sector"&&y||H.type==="sausage"&&!y);if(V&&(H&&Ho(H,t,z),H=null),H?Pa(H):H=i3[u.type](t,s,I,G,f,d,c.model,!0,y),v&&(H.forceLabelAnimation=!0),N){var W=H.getTextContent();if(W){var $=Jh(W);$.prevValue!=null&&($.prevValue=$.value)}}else u3(H,s,I,P,G,t,f,u.type==="polar");M?H.attr({shape:G}):v?o3(v,d,H,G,I,f,!0,N):lt(H,{shape:G},t,I,null),s.setItemGraphicEl(I,H),H.ignore=X,o.add(H)}}).remove(function(I){var z=l.getItemGraphicEl(I);z&&Ho(z,t,I)}).execute();var E=this._backgroundGroup||(this._backgroundGroup=new De);E.removeAll();for(var k=0;k<C.length;++k)E.add(C[k]);o.add(E),this._backgroundEls=C,this._data=s},e.prototype._renderLarge=function(t,n,a){this._clear(),f3(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,n){this._removeBackground(),f3(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var n=t.get("clip",!0)&&qg(t.coordinateSystem,!1,t),a=this.group;n?a.setClipPath(n):a.removeClipPath()},e.prototype._enableRealtimeSort=function(t,n,a){var i=this;if(n.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,t,a),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(){i._updateSortWithinSameData(n,s,o,a)},a.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,n,a){var i=[];return t.each(t.mapDimension(n.dim),function(o,s){var l=a(s);l=l??NaN,i.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),i.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:fe(i,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,n,a){for(var i=a.scale,o=t.mapDimension(a.dim),s=Number.MAX_VALUE,l=0,u=i.getOrdinalMeta().categories.length;l<u;++l){var c=t.rawIndexOf(o,i.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:n(t.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(t,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,n,a,i){if(this._isOrderChangedWithinSameData(t,n,a)){var o=this._dataSort(t,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,n,a){var i=n.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(t,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var n=this.group,a=this._data;t&&t.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){Ho(i,t,Pe(i).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})(_t),a3={cartesian2d:function(r,e){var t=e.width<0?-1:1,n=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var a=r.x+r.width,i=r.y+r.height,o=nT(e.x,r.x),s=aT(e.x+e.width,a),l=nT(e.y,r.y),u=aT(e.y+e.height,i),c=s<o,f=u<l;return e.x=c&&o>a?s:o,e.y=f&&l>i?u:l,e.width=c?0:s-o,e.height=f?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}var a=aT(e.r,r.r),i=nT(e.r0,r.r0);e.r=a,e.r0=i;var o=a-i<0;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},i3={cartesian2d:function(r,e,t,n,a,i,o,s,l){var u=new qe({shape:ie({},n),z2:1});if(u.__dataIndex=t,u.name="item",i){var c=u.shape,f=a?"height":"width";c[f]=0}return u},polar:function(r,e,t,n,a,i,o,s,l){var u=!a&&l?e1:rn,c=new u({shape:n,z2:1});c.name="item";var f=r7(a);if(c.calculateTextPosition=Mce(f,{isRoundCap:u===e1}),i){var d=c.shape,v=a?"r":"endAngle",g={};d[v]=a?n.r0:n.startAngle,g[v]=n[v],(s?lt:jt)(c,{shape:g},i)}return c}};function Rce(r,e){var t=r.get("realtimeSort",!0),n=e.getBaseAxis();if(t&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function o3(r,e,t,n,a,i,o,s){var l,u;i?(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?lt:jt)(t,{shape:l},e,a,null);var c=e?r.baseAxis.model:null;(o?lt:jt)(t,{shape:u},c,a)}function s3(r,e){for(var t=0;t<e.length;t++)if(!isFinite(r[e[t]]))return!0;return!1}var Ece=["x","y","width","height"],kce=["cx","cy","r","startAngle","endAngle"],l3={cartesian2d:function(r){return!s3(r,Ece)},polar:function(r){return!s3(r,kce)}},o0={cartesian2d:function(r,e,t){var n=r.getItemLayout(e);if(!n)return null;var a=t?Oce(t,n):0,i=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(r,e,t){var n=r.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 Ice(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function r7(r){return(function(e){var t=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+t;default:return n}}})(r)}function u3(r,e,t,n,a,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var c=r.shape,f=Bi(n.getModel("itemStyle"),c,!0);ie(c,f),r.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var d=n.getShallow("cursor");d&&r.attr("cursor",d);var v=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",g=Sr(n);Lr(r,g,{labelFetcher:i,labelDataIndex:t,defaultText:Ph(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var x=r.getTextContent();if(s&&x){var y=n.get(["label","position"]);r.textConfig.inside=y==="middle"?!0:null,Dce(r,y==="outside"?v:y,r7(o),n.get(["label","rotate"]))}hH(x,g,i.getRawValue(t),function(w){return XF(e,w)});var b=n.getModel(["emphasis"]);Ut(r,b.get("focus"),b.get("blurScope"),b.get("disabled")),_r(r,n),Ice(a)&&(r.style.fill="none",r.style.stroke="none",O(r.states,function(w){w.style&&(w.style.fill=w.style.stroke="none")}))}function Oce(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,a=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,a,i)}var Pce=(function(){function r(){}return r})(),c3=(function(r){K(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new Pce},e.prototype.buildPath=function(t,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<a.length;c+=3)l[i]=u,l[o]=a[c+2],s[i]=a[c+i],s[o]=a[c+o],t.rect(s[0],s[1],l[0],l[1])},e})(tt);function f3(r,e,t,n){var a=r.getData(),i=a.getLayout("valueAxisHorizontal")?1:0,o=a.getLayout("largeDataIndices"),s=a.getLayout("size"),l=r.getModel("backgroundStyle"),u=a.getLayout("largeBackgroundPoints");if(u){var c=new c3({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=i,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),t&&t.push(c)}var f=new c3({shape:{points:a.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=i,f.largeDataIndices=o,f.barWidth=s,e.add(f),f.useStyle(a.getVisual("style")),f.style.stroke=null,Pe(f).seriesIndex=r.seriesIndex,r.get("silent")||(f.on("mousedown",h3),f.on("mousemove",h3)),t&&t.push(f)}var h3=ab(function(r){var e=this,t=zce(e,r.offsetX,r.offsetY);Pe(e).dataIndex=t>=0?t:null},30,!1);function zce(r,e,t){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=i.length/3;c<f;c++){var d=c*3;if(l[n]=u,l[a]=i[d+2],s[n]=i[d+n],s[a]=i[d+a],l[a]<0&&(s[a]+=l[a],l[a]=-l[a]),e>=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function n7(r,e,t){if(Sl(t,"cartesian2d")){var n=e,a=t.getArea();return{x:r?n.x:a.x,y:r?a.y:n.y,width:r?n.width:a.width,height:r?a.height:n.height}}else{var a=t.getArea(),i=e;return{cx:a.cx,cy:a.cy,r0:r?a.r0:i.r0,r:r?a.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function jce(r,e,t){var n=r.type==="polar"?rn:qe;return new n({shape:n7(e,t,r),silent:!0,z2:0})}function Bce(r){r.registerChartView(Lce),r.registerSeriesModel(Cce),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,He(oF,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,sF("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,t7("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(a){e.sortInfo&&a.axis.setCategorySortInfo(e.sortInfo)})})}var d3=Math.PI*2,s0=Math.PI/180;function Vce(r,e,t){e.eachSeriesByType(r,function(n){var a=n.getData(),i=a.mapDimension("value"),o=LH(n,t),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,d=-n.get("startAngle")*s0,v=n.get("endAngle"),g=n.get("padAngle")*s0;v=v==="auto"?d-d3:-v*s0;var x=n.get("minAngle")*s0,y=x+g,b=0;a.each(i,function(F){!isNaN(F)&&b++});var w=a.getSum(i),T=Math.PI/(w||b)*2,C=n.get("clockwise"),D=n.get("roseType"),M=n.get("stillShowZeroSum"),N=a.getDataExtent(i);N[0]=0;var R=C?1:-1,E=[d,v],k=R*g/2;X1(E,!C),d=E[0],v=E[1];var I=a7(n);I.startAngle=d,I.endAngle=v,I.clockwise=C,I.cx=s,I.cy=l,I.r=u,I.r0=c;var z=Math.abs(v-d),P=z,G=0,U=d;if(a.setLayout({viewRect:f,r:u}),a.each(i,function(F,H){var X;if(isNaN(F)){a.setItemLayout(H,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:C,cx:s,cy:l,r0:c,r:D?NaN:u});return}D!=="area"?X=w===0&&M?T:F*T:X=z/b,X<y?(X=y,P-=y):G+=F;var V=U+R*X,W=0,$=0;g>X?(W=U+R*X/2,$=W):(W=U+k,$=V-k),a.setItemLayout(H,{angle:X,startAngle:W,endAngle:$,clockwise:C,cx:s,cy:l,r0:c,r:D?pt(F,N,[c,u]):u}),U=V}),P<d3&&b)if(P<=.001){var B=z/b;a.each(i,function(F,H){if(!isNaN(F)){var X=a.getItemLayout(H);X.angle=B;var V=0,W=0;B<g?(V=d+R*(H+1/2)*B,W=V):(V=d+R*H*B+k,W=d+R*(H+1)*B-k),X.startAngle=V,X.endAngle=W}})}else T=P/G,U=d,a.each(i,function(F,H){if(!isNaN(F)){var X=a.getItemLayout(H),V=X.angle===y?y:F*T,W=0,$=0;V<g?(W=U+R*V/2,$=W):(W=U+k,$=U+R*V-k),X.startAngle=W,X.endAngle=$,U+=R*V}})})}var a7=Je();function ud(r){return{seriesType:r,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(!(!n||!n.length)){var a=e.getData();a.filterSelf(function(i){for(var o=a.getName(i),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var Gce=Math.PI/180;function v3(r,e,t,n,a,i,o,s,l,u){if(r.length<2)return;function c(x){for(var y=x.rB,b=y*y,w=0;w<x.list.length;w++){var T=x.list[w],C=Math.abs(T.label.y-t),D=n+T.len,M=D*D,N=Math.sqrt(Math.abs((1-C*C/b)*M)),R=e+(N+T.len2)*a,E=R-T.label.x,k=T.targetTextWidth-E*a;i7(T,k,!0),T.label.x=R}}function f(x){for(var y={list:[],maxY:0},b={list:[],maxY:0},w=0;w<x.length;w++)if(x[w].labelAlignTo==="none"){var T=x[w],C=T.label.y>t?b:y,D=Math.abs(T.label.y-t);if(D>=C.maxY){var M=T.label.x-e-T.len2*a,N=n+T.len,R=Math.abs(M)<N?Math.sqrt(D*D/(1-M*M/N/N)):N;C.rB=R,C.maxY=D}C.list.push(T)}c(y),c(b)}for(var d=r.length,v=0;v<d;v++)if(r[v].position==="outer"&&r[v].labelAlignTo==="labelLine"){var g=r[v].label.x-u;r[v].linePoints[1][0]+=g,r[v].label.x=u}QC(r,1,l,l+o)&&f(r)}function Hce(r,e,t,n,a,i,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,d=0;d<r.length;d++){var v=r[d].label;iT(r[d])||(v.x<e?(c=Math.min(c,v.x),l.push(r[d])):(f=Math.max(f,v.x),u.push(r[d])))}for(var d=0;d<r.length;d++){var g=r[d];if(!iT(g)&&g.linePoints){if(g.labelStyleWidth!=null)continue;var v=g.label,x=g.linePoints,y=void 0;g.labelAlignTo==="edge"?v.x<e?y=x[2][0]-g.labelDistance-o-g.edgeDistance:y=o+a-g.edgeDistance-x[2][0]-g.labelDistance:g.labelAlignTo==="labelLine"?v.x<e?y=c-o-g.bleedMargin:y=o+a-f-g.bleedMargin:v.x<e?y=v.x-o-g.bleedMargin:y=o+a-v.x-g.bleedMargin,g.targetTextWidth=y,i7(g,y,!1)}}v3(u,e,t,n,1,a,i,o,s,f),v3(l,e,t,n,-1,a,i,o,s,c);for(var d=0;d<r.length;d++){var g=r[d];if(!iT(g)&&g.linePoints){var v=g.label,x=g.linePoints,b=g.labelAlignTo==="edge",w=v.style.padding,T=w?w[1]+w[3]:0,C=v.style.backgroundColor?0:T,D=g.rect.width+C,M=x[1][0]-x[2][0];b?v.x<e?x[2][0]=o+g.edgeDistance+D+g.labelDistance:x[2][0]=o+a-g.edgeDistance-D-g.labelDistance:(v.x<e?x[2][0]=v.x+g.labelDistance:x[2][0]=v.x-g.labelDistance,x[1][0]=x[2][0]+M),x[1][1]=x[2][1]=v.y}}}function i7(r,e,t){if(r.labelStyleWidth==null){var n=r.label,a=n.style,i=r.rect,o=a.backgroundColor,s=a.padding,l=s?s[1]+s[3]:0,u=a.overflow,c=i.width+(o?0:l);if(e<c||t){if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-l);var f=n.getBoundingRect();n.setStyle("width",Math.ceil(f.width)),n.setStyle("backgroundColor",o)}else{var d=e-l,v=e<c?d:t?d>r.unconstrainedWidth?null:d:null;n.setStyle("width",v)}o7(i,n)}}}function o7(r,e){p3.rect=r,LF(p3,e,Fce)}var Fce={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},p3={};function iT(r){return r.position==="center"}function Uce(r){var e=r.getData(),t=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*Gce,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,d=s.height;function v(M){M.ignore=!0}function g(M){if(!M.ignore)return!0;for(var N in M.states)if(M.states[N].ignore===!1)return!0;return!1}e.each(function(M){var N=e.getItemGraphicEl(M),R=N.shape,E=N.getTextContent(),k=N.getTextGuideLine(),I=e.getItemModel(M),z=I.getModel("label"),P=z.get("position")||I.get(["emphasis","label","position"]),G=z.get("distanceToLabelLine"),U=z.get("alignTo"),B=me(z.get("edgeDistance"),u),F=z.get("bleedMargin");F==null&&(F=Math.min(u,d)>200?10:2);var H=I.getModel("labelLine"),X=H.get("length");X=me(X,u);var V=H.get("length2");if(V=me(V,u),Math.abs(R.endAngle-R.startAngle)<o){O(E.states,v),E.ignore=!0,k&&(O(k.states,v),k.ignore=!0);return}if(g(E)){var W=(R.startAngle+R.endAngle)/2,$=Math.cos(W),te=Math.sin(W),ue,ge,Se,Xe;n=R.cx,a=R.cy;var be=P==="inside"||P==="inner";if(P==="center")ue=R.cx,ge=R.cy,Xe="center";else{var we=(be?(R.r+R.r0)/2*$:R.r*$)+n,ze=(be?(R.r+R.r0)/2*te:R.r*te)+a;if(ue=we+$*3,ge=ze+te*3,!be){var oe=we+$*(X+l-R.r),pe=ze+te*(X+l-R.r),je=oe+($<0?-1:1)*V,Ne=pe;U==="edge"?ue=$<0?c+B:c+u-B:ue=je+($<0?-G:G),ge=Ne,Se=[[we,ze],[oe,pe],[je,Ne]]}Xe=be?"center":U==="edge"?$>0?"right":"left":$>0?"left":"right"}var at=Math.PI,ft=0,Ct=z.get("rotate");if(st(Ct))ft=Ct*(at/180);else if(P==="center")ft=0;else if(Ct==="radial"||Ct===!0){var Yr=$<0?-W+at:-W;ft=Yr}else if(Ct==="tangential"&&P!=="outside"&&P!=="outer"){var er=Math.atan2($,te);er<0&&(er=at*2+er);var ui=te>0;ui&&(er=at+er),ft=er-at}if(i=!!ft,E.x=ue,E.y=ge,E.rotation=ft,E.setStyle({verticalAlign:"middle"}),be){E.setStyle({align:Xe});var hd=E.states.select;hd&&(hd.x+=E.x,hd.y+=E.y)}else{var Va=new Ie(0,0,0,0);o7(Va,E),t.push({label:E,labelLine:k,position:P,len:X,len2:V,minTurnAngle:H.get("minTurnAngle"),maxSurfaceAngle:H.get("maxSurfaceAngle"),surfaceNormal:new ke($,te),linePoints:Se,textAlign:Xe,labelDistance:G,labelAlignTo:U,edgeDistance:B,bleedMargin:F,rect:Va,unconstrainedWidth:Va.width,labelStyleWidth:E.style.width})}N.setTextConfig({inside:be})}}),!i&&r.get("avoidLabelOverlap")&&Hce(t,n,a,l,u,d,c,f);for(var x=0;x<t.length;x++){var y=t[x],b=y.label,w=y.labelLine,T=isNaN(b.x)||isNaN(b.y);if(b){b.setStyle({align:y.textAlign}),T&&(O(b.states,v),b.ignore=!0);var C=b.states.select;C&&(C.x+=b.x,C.y+=b.y)}if(w){var D=y.linePoints;T||!D?(O(w.states,v),w.ignore=!0):(MF(D,y.minTurnAngle),cue(D,y.surfaceNormal,y.maxSurfaceAngle),w.setShape({points:D}),b.__hostTarget.textGuideLineConfig={anchor:new ke(D[0][0],D[0][1])})}}}var Yce=(function(r){K(e,r);function e(t,n,a){var i=r.call(this)||this;i.z2=2;var o=new ot;return i.setTextContent(o),i.updateData(t,n,a,!0),i}return e.prototype.updateData=function(t,n,a,i){var o=this,s=t.hostModel,l=t.getItemModel(n),u=l.getModel("emphasis"),c=t.getItemLayout(n),f=ie(Bi(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(i){o.setShape(f);var d=s.getShallow("animationType");s.ecModel.ssr?(jt(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=f.cx,o.originY=f.cy):d==="scale"?(o.shape.r=c.r0,jt(o,{shape:{r:c.r}},s,n)):a!=null?(o.setShape({startAngle:a,endAngle:a}),jt(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,lt(o,{shape:{endAngle:c.endAngle}},s,n))}else Pa(o),lt(o,{shape:f},s,n);o.useStyle(t.getItemVisual(n,"style")),_r(o,l);var v=(c.startAngle+c.endAngle)/2,g=s.get("selectedOffset"),x=Math.cos(v)*g,y=Math.sin(v)*g,b=l.getShallow("cursor");b&&o.attr("cursor",b),this._updateLabel(s,t,n),o.ensureState("emphasis").shape=ie({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},Bi(u.getModel("itemStyle"),c)),ie(o.ensureState("select"),{x,y,shape:Bi(l.getModel(["select","itemStyle"]),c)}),ie(o.ensureState("blur"),{shape:Bi(l.getModel(["blur","itemStyle"]),c)});var w=o.getTextGuideLine(),T=o.getTextContent();w&&ie(w.ensureState("select"),{x,y}),ie(T.ensureState("select"),{x,y}),Ut(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n,a){var i=this,o=n.getItemModel(a),s=o.getModel("labelLine"),l=n.getItemVisual(a,"style"),u=l&&l.fill,c=l&&l.opacity;Lr(i,Sr(o),{labelFetcher:n.hostModel,labelDataIndex:a,inheritColor:u,defaultOpacity:c,defaultText:t.getFormattedLabel(a,"normal")||n.getName(a)});var f=i.getTextContent();i.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var d=o.get(["label","position"]);if(d!=="outside"&&d!=="outer")i.removeTextGuideLine();else{var v=this.getTextGuideLine();v||(v=new Fr,this.setTextGuideLine(v)),FD(this,UD(o),{stroke:u,opacity:zn(s.get(["lineStyle","opacity"]),c,1)})}},e})(rn),Wce=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,a,i){var o=t.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f<o.count();++f)c=o.getItemLayout(f);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&t.get("showEmptyCircle")){var d=a7(t),v=new rn({shape:Me(d)});v.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=v,l.add(v)}o.diff(s).add(function(g){var x=new Yce(o,g,u);o.setItemGraphicEl(g,x),l.add(x)}).update(function(g,x){var y=s.getItemGraphicEl(x);y.updateData(o,g,u),y.off("click"),l.add(y),o.setItemGraphicEl(g,y)}).remove(function(g){var x=s.getItemGraphicEl(g);Ho(x,t,g)}).execute(),Uce(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="pie",e})(_t);function cd(r,e,t){e=ce(e)&&{coordDimensions:e}||ie({encodeDefine:r.getEncode()},e);var n=r.getSource(),a=od(n,e).dimensions,i=new vn(a,r);return i.initData(n,t),i}var fd=(function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,t)},r})(),Xce=Je(),s7=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new fd(xe(this.getData,this),xe(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return cd(this,{coordDimensions:["value"],encodeDefaulter:He(mD,this)})},e.prototype.getDataParams=function(t){var n=this.getData(),a=Xce(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=p6(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){lc(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e})(Tt);Vae({fullType:s7.type,getCoord2:function(r){return r.getShallow("center")}});function qce(r){return{seriesType:r,reset:function(e,t){var n=e.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(st(o)&&!isNaN(o)&&o<0)})}}}function Zce(r){r.registerChartView(Wce),r.registerSeriesModel(s7),_8("pie",r.registerAction),r.registerLayout(He(Vce,"pie")),r.registerProcessor(ud("pie")),r.registerProcessor(qce("pie"))}var $ce=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return to(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,n,a){return a.point(n.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:ee.color.primary}},universalTransition:{divideShape:"clone"}},e})(Tt),l7=4,Kce=(function(){function r(){}return r})(),Qce=(function(r){K(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new Kce},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,n){var a=n.points,i=n.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]<l7,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<a.length;){var d=a[f++],v=a[f++];isNaN(d)||isNaN(v)||c&&!c.contain(d,v)||(s.x=d-i[0]/2,s.y=v-i[1]/2,s.width=i[0],s.height=i[1],o.buildPath(t,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,n=t.points,a=t.size,i=this._ctx,o=this.softClipShape,s;if(i){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||i.fillRect(l-a[0]/2,u-a[1]/2,a[0],a[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(t,n){for(var a=this.shape,i=a.points,o=a.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=i.length/2-1;u>=0;u--){var c=u*2,f=i[c]-s/2,d=i[c+1]-l/2;if(t>=f&&n>=d&&t<=f+s&&n<=d+l)return u}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.points,i=n.size,o=i[0],s=i[1],l=1/0,u=1/0,c=-1/0,f=-1/0,d=0;d<a.length;){var v=a[d++],g=a[d++];l=Math.min(v,l),c=Math.max(v,c),u=Math.min(g,u),f=Math.max(g,f)}t=this._rect=new Ie(l-o/2,u-s/2,c-l+o,f-u+s)}return t},e})(tt),Jce=(function(){function r(){this.group=new De}return r.prototype.updateData=function(e,t){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,t)},r.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var a=(n.endIndex-n.startIndex)*2,i=n.startIndex*4*2;t=new Float32Array(t.buffer,i,a)}n.setShape("points",t),n.reset()})},r.prototype.incrementalPrepareUpdate=function(e){this._clear()},r.prototype.incrementalUpdate=function(e,t,n){var a=this._newAdded[0],i=t.getLayout("points"),o=a&&a.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+i.length);l.set(o),l.set(i,s),a.endIndex=e.end,a.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:i}),this._setCommon(u,t,n)}},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new Qce({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},r.prototype._setCommon=function(e,t,n){var a=t.hostModel;n=n||{};var i=t.getVisual("symbolSize");e.setShape("size",i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=ur(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<l7;e.useStyle(a.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=Pe(e);u.seriesIndex=a.seriesIndex,e.on("mousemove",function(c){u.dataIndex=null;var f=e.hoverDataIdx;f>=0&&(u.dataIndex=f+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),efe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._symbolDraw.incrementalUpdate(t,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=t.end===n.getData().count()},e.prototype.updateTransform=function(t,n,a){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Zg("").reset(t,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var n=t.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,n){var a=this._symbolDraw,i=n.pipelineContext,o=i.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new Jce:new Xg,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e})(_t),u7={left:0,right:0,top:0,bottom:0},t1=["25%","25%"],tfe=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(t,n){var a=Sc(t.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),a&&t.outerBounds&&Zi(t.outerBounds,a)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Zi(this.option.outerBounds,t.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:u7,outerBoundsContain:"all",outerBoundsClampWidth:t1[0],outerBoundsClampHeight:t1[1],backgroundColor:ee.color.transparent,borderWidth:1,borderColor:ee.color.neutral30},e})(Qe),nA=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Zt).models[0]},e.type="cartesian2dAxis",e})(Qe);Jt(nA,ld);var c7={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:ee.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:ee.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:ee.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[ee.color.backgroundTint,ee.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:ee.color.neutral00,borderColor:ee.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},rfe=Ye({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},c7),KD=Ye({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:ee.color.axisMinorSplitLine,width:1}}},c7),nfe=Ye({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},KD),afe=Le({logBase:10},KD);const f7={category:rfe,value:KD,time:nfe,log:afe};var ife={value:1,category:1,time:1,log:1},aA=null;function ofe(r){aA||(aA=r)}function $g(){return aA}function zh(r,e,t,n){O(ife,function(a,i){var o=Ye(Ye({},f7[i],!0),n,!0),s=(function(l){K(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+i,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var d=eg(this),v=d?Sc(c):{},g=f.getTheme();Ye(c,g.get(i+"Axis")),Ye(c,this.getDefaultOption()),c.type=g3(c),d&&Zi(c,v,d)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=og.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=$g();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+i,u.defaultOption=o,u})(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",g3)}function g3(r){return r.type||(r.data?"category":"value")}var sfe=(function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return fe(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),dt(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r})(),iA=["x","y"];function m3(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var lfe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=iA,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!m3(t)||!m3(n))){var a=t.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),l=a[1]-a[0],u=i[1]-i[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,d=o[0]-a[0]*c,v=o[1]-i[0]*f,g=this._transform=[c,0,0,f,d,v];this._invTransform=Ia([],g)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(t[0]))&&a.contain(a.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,n){var a=this.dataToPoint(t),i=this.dataToPoint(n),o=this.getArea(),s=new Ie(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,n,a){a=a||[];var i=t[0],o=t[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return Qt(a,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,n)),a[1]=l.toGlobalCoord(l.dataToCoord(o,n)),a},e.prototype.clampData=function(t,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),l=a.parse(t[0]),u=i.parse(t[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(t,n,a){if(a=a||[],this._invTransform)return Qt(a,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(t[0]),n),a[1]=o.coordToData(o.toLocalCoord(t[1]),n),a},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var n=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(n[0],n[1])-t,o=Math.min(a[0],a[1])-t,s=Math.max(n[0],n[1])-i+t,l=Math.max(a[0],a[1])-o+t;return new Ie(i,o,s,l)},e})(sfe),h7=(function(r){K(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),t&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(t,n){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e})(Ba),ub="expandAxisBreak",d7="collapseAxisBreak",v7="toggleAxisBreak",QD="axisbreakchanged",ufe={type:ub,event:QD,update:"update",refineEvent:JD},cfe={type:d7,event:QD,update:"update",refineEvent:JD},ffe={type:v7,event:QD,update:"update",refineEvent:JD};function JD(r,e,t,n){var a=[];return O(r,function(i){a=a.concat(i.eventBreaks)}),{eventContent:{breaks:a}}}function hfe(r){r.registerAction(ufe,e),r.registerAction(cfe,e),r.registerAction(ffe,e);function e(t,n){var a=[],i=oh(n,t);function o(s,l){O(i[s],function(u){var c=u.updateAxisBreaks(t);O(c.breaks,function(f){var d;a.push(Le((d={},d[l]=u.componentIndex,d),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:a}}}var al=Math.PI,dfe=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],vfe=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],jh=Je(),p7=Je(),g7=(function(){function r(e){this.recordMap={},this.resolveAxisNameOverlap=e}return r.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,a=this.recordMap,i=a[t]||(a[t]=[]);return i[n]||(i[n]={ready:{}})},r})();function pfe(r,e,t,n){var a=t.axis,i=e.ensureRecord(t),o=[],s,l=eN(r.axisName)&&Oh(r.nameLocation);O(n,function(g){var x=$i(g);if(!(!x||x.label.ignore)){o.push(x);var y=i.transGroup;l&&(y.transform?Ia(Iv,y.transform):Ig(Iv),x.transform&&Qa(Iv,Iv,x.transform),Ie.copy(l0,x.localRect),l0.applyTransform(Iv),s?s.union(l0):Ie.copy(s=new Ie(0,0,0,0),l0))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",c=i.transGroup[u];if(o.sort(function(g,x){return Math.abs(g.label[u]-c)-Math.abs(x.label[u]-c)}),l&&s){var f=a.getExtent(),d=Math.min(f[0],f[1]),v=Math.max(f[0],f[1])-d;s.union(new Ie(d,0,v,1))}i.stOccupiedRect=s,i.labelInfoList=o}var Iv=Dr(),l0=new Ie(0,0,0,0),m7=function(r,e,t,n,a,i){if(Oh(r.nameLocation)){var o=i.stOccupiedRect;o&&y7(due({},o,i.transGroup.transform),n,a)}else x7(i.labelInfoList,i.dirVec,n,a)};function y7(r,e,t){var n=new ke;sb(r,e,n,{direction:Math.atan2(t.y,t.x),bidirectional:!1,touchThreshold:.05})&&$C(e,n)}function x7(r,e,t,n){for(var a=ke.dot(n,e)>=0,i=0,o=r.length;i<o;i++){var s=r[a?i:o-1-i];s.label.ignore||y7(s,t,n)}}var Sn=(function(){function r(e,t,n,a){this.group=new De,this._axisModel=e,this._api=t,this._local={},this._shared=a||new g7(m7),this._resetCfgDetermined(n)}return r.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},r.prototype.__getRawCfg=function(){return this._cfg.raw},r.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},a=Ce(e.axisName,t.get("name")),i=t.get("nameMoveOverlap");(i==null||i==="auto")&&(i=Ce(e.defaultNameMoveOverlap,!0));var o={raw:e,position:e.position,rotation:e.rotation,nameDirection:Ce(e.nameDirection,1),tickDirection:Ce(e.tickDirection,1),labelDirection:Ce(e.labelDirection,1),labelOffset:Ce(e.labelOffset,0),silent:Ce(e.silent,!0),axisName:a,nameLocation:zn(t.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:eN(a)&&i,optionHideOverlap:t.get(["axisLabel","hideOverlap"]),showMinorTicks:t.get(["minorTick","show"])};this._cfg=o;var s=new De({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(t);l.transGroup=this._transformGroup,l.dirVec=new ke(Math.cos(-o.rotation),Math.sin(-o.rotation))},r.prototype.build=function(e,t){var n=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),O(gfe,function(a){e[a]&&mfe[a](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},r.innerTextLayout=function(e,t,n){var a=kM(t-e),i,o;return Dh(a)?(o=n>0?"top":"bottom",i="center"):Dh(a-al)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a<al?i=n>0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r})(),gfe=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],mfe={axisLine:function(r,e,t,n,a,i,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=i.transform,c=[l[0],0],f=[l[1],0],d=c[0]>f[0];u&&(Qt(c,c,u),Qt(f,f,u));var v=ie({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),g={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())$g().buildAxisBreakLine(n,a,i,g);else{var x=new lr(ie({shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]}},g));Rh(x.shape,x.style.lineWidth),x.anid="line",a.add(x)}var y=n.get(["axisLine","symbol"]);if(y!=null){var b=n.get(["axisLine","symbolSize"]);ye(y)&&(y=[y,y]),(ye(b)||st(b))&&(b=[b,b]);var w=Tc(n.get(["axisLine","symbolOffset"])||0,b),T=b[0],C=b[1];O([{rotate:r.rotation+Math.PI/2,offset:w[0],r:0},{rotate:r.rotation-Math.PI/2,offset:w[1],r:Math.sqrt((c[0]-f[0])*(c[0]-f[0])+(c[1]-f[1])*(c[1]-f[1]))}],function(D,M){if(y[M]!=="none"&&y[M]!=null){var N=ur(y[M],-T/2,-C/2,T,C,v.stroke,!0),R=D.r+D.offset,E=d?f:c;N.attr({rotation:D.rotate,x:E[0]+R*Math.cos(r.rotation),y:E[1]-R*Math.sin(r.rotation),silent:!0,z2:11}),a.add(N)}})}}},axisTickLabelEstimate:function(r,e,t,n,a,i,o,s){var l=x3(e,a,s);l&&y3(r,e,t,n,a,i,o,oi.estimate)},axisTickLabelDetermine:function(r,e,t,n,a,i,o,s){var l=x3(e,a,s);l&&y3(r,e,t,n,a,i,o,oi.determine);var u=_fe(r,a,i,n);bfe(r,e.labelLayoutList,u),Sfe(r,a,i,n,r.tickDirection)},axisName:function(r,e,t,n,a,i,o,s){var l=t.ensureRecord(n);e.nameEl&&(a.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(eN(u)){var c=r.nameLocation,f=r.nameDirection,d=n.getModel("nameTextStyle"),v=n.get("nameGap")||0,g=n.axis.getExtent(),x=n.axis.inverse?-1:1,y=new ke(0,0),b=new ke(0,0);c==="start"?(y.x=g[0]-x*v,b.x=-x):c==="end"?(y.x=g[1]+x*v,b.x=x):(y.x=(g[0]+g[1])/2,y.y=r.labelOffset+f*v,b.y=f);var w=Dr();b.transform(ns(w,w,r.rotation));var T=n.get("nameRotate");T!=null&&(T=T*al/180);var C,D;Oh(c)?C=Sn.innerTextLayout(r.rotation,T??r.rotation,f):(C=yfe(r.rotation,c,T||0,g),D=r.raw.axisNameAvailableWidth,D!=null&&(D=Math.abs(D/Math.sin(C.rotation)),!isFinite(D)&&(D=null)));var M=d.getFont(),N=n.get("nameTruncate",!0)||{},R=N.ellipsis,E=Hr(r.raw.nameTruncateMaxWidth,N.maxWidth,D),k=s.nameMarginLevel||0,I=new ot({x:y.x,y:y.y,rotation:C.rotation,silent:Sn.isLabelSilent(n),style:Nt(d,{text:u,font:M,overflow:"truncate",width:E,ellipsis:R,fill:d.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:d.get("align")||C.textAlign,verticalAlign:d.get("verticalAlign")||C.textVerticalAlign}),z2:1});if(is({el:I,componentModel:n,itemName:u}),I.__fullText=u,I.anid="name",n.get("triggerEvent")){var z=Sn.makeAxisEventDataBase(n);z.targetType="axisName",z.name=u,Pe(I).eventData=z}i.add(I),I.updateTransform(),e.nameEl=I;var P=l.nameLayout=$i({label:I,priority:I.z2,defaultAttr:{ignore:I.ignore},marginDefault:Oh(c)?dfe[k]:vfe[k]});if(l.nameLocation=c,a.add(I),I.decomposeTransform(),r.shouldNameMoveOverlap&&P){var G=t.ensureRecord(n);t.resolveAxisNameOverlap(r,t,n,P,b,G)}}}};function y3(r,e,t,n,a,i,o,s){_7(e)||wfe(r,e,a,s,n,o);var l=e.labelLayoutList;Tfe(r,n,l,i),Mfe(n,r.rotation,l);var u=r.optionHideOverlap;xfe(n,l,u),u&&RF(dt(l,function(c){return c&&!c.label.ignore})),pfe(r,t,n,l)}function yfe(r,e,t,n){var a=kM(t-r),i,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Dh(a-al/2)?(o=l?"bottom":"top",i="center"):Dh(a-al*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",a<al*1.5&&a>al/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function xfe(r,e,t){if(vF(r.axis))return;function n(s,l,u){var c=$i(e[l]),f=$i(e[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){hp(c.label);return}if(f.suggestIgnore){hp(f.label);return}var d=.1;if(!t){var v=[0,0,0,0];c=KC({marginForce:v},c),f=KC({marginForce:v},f)}sb(c,f,null,{touchThreshold:d})&&hp(s?f.label:c.label)}}var a=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]),o=e.length;n(a,0,1),n(i,o-1,o-2)}function bfe(r,e,t){r.showMinorTicks||O(e,function(n){if(n&&n.label.ignore)for(var a=0;a<t.length;a++){var i=t[a],o=p7(i),s=jh(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){hp(i);return}}})}function hp(r){r&&(r.ignore=!0)}function b7(r,e,t,n,a){for(var i=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=t,e&&(Qt(o,o,e),Qt(s,s,e));var c=new lr({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Rh(c.shape,c.style.lineWidth),c.anid=a+"_"+r[l].tickValue,i.push(c);var f=p7(c);f.onBand=!!r[l].onBand,f.tickValue=r[l].tickValue}return i}function _fe(r,e,t,n){var a=n.axis,i=n.getModel("axisTick"),o=i.get("show");if(o==="auto"&&(o=!0,r.raw.axisTickAutoShow!=null&&(o=!!r.raw.axisTickAutoShow)),!o||a.scale.isBlank())return[];for(var s=i.getModel("lineStyle"),l=r.tickDirection*i.get("length"),u=a.getTicksCoords(),c=b7(u,t.transform,l,Le(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)e.add(c[f]);return c}function Sfe(r,e,t,n,a){var i=n.axis,o=n.getModel("minorTick");if(!(!r.showMinorTicks||i.scale.isBlank())){var s=i.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=a*o.get("length"),c=Le(l.getLineStyle(),Le(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),f=0;f<s.length;f++)for(var d=b7(s[f],t.transform,u,c,"minorticks_"+f),v=0;v<d.length;v++)e.add(d[v])}}function x3(r,e,t){if(_7(r)){var n=r.axisLabelsCreationContext,a=n.out.noPxChangeTryDetermine;if(t.noPxChange){for(var i=!0,o=0;o<a.length;o++)i=i&&a[o]();if(i)return!1}a.length&&(e.remove(r.labelGroup),oA(r,null,null,null))}return!0}function wfe(r,e,t,n,a,i){var o=a.axis,s=Hr(r.raw.axisLabelShow,a.get(["axisLabel","show"])),l=new De;t.add(l);var u=qx(n);if(!s||o.scale.isBlank()){oA(e,[],l,u);return}var c=a.getModel("axisLabel"),f=o.getViewLabels(u),d=(Hr(r.raw.labelRotate,c.get("rotate"))||0)*al/180,v=Sn.innerTextLayout(r.rotation,d,r.labelDirection),g=a.getCategories&&a.getCategories(!0),x=[],y=a.get("triggerEvent"),b=1/0,w=-1/0;O(f,function(C,D){var M,N=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(C.tickValue):C.tickValue,R=C.formattedLabel,E=C.rawLabel,k=c;if(g&&g[N]){var I=g[N];Re(I)&&I.textStyle&&(k=new et(I.textStyle,c,a.ecModel))}var z=k.getTextColor()||a.get(["axisLine","lineStyle","color"]),P=k.getShallow("align",!0)||v.textAlign,G=Ce(k.getShallow("alignMinLabel",!0),P),U=Ce(k.getShallow("alignMaxLabel",!0),P),B=k.getShallow("verticalAlign",!0)||k.getShallow("baseline",!0)||v.textVerticalAlign,F=Ce(k.getShallow("verticalAlignMinLabel",!0),B),H=Ce(k.getShallow("verticalAlignMaxLabel",!0),B),X=10+(((M=C.time)===null||M===void 0?void 0:M.level)||0);b=Math.min(b,X),w=Math.max(w,X);var V=new ot({x:0,y:0,rotation:0,silent:Sn.isLabelSilent(a),z2:X,style:Nt(k,{text:R,align:D===0?G:D===f.length-1?U:P,verticalAlign:D===0?F:D===f.length-1?H:B,fill:Ae(z)?z(o.type==="category"?E:o.type==="value"?N+"":N,D):z})});V.anid="label_"+N;var W=jh(V);if(W.break=C.break,W.tickValue=N,W.layoutRotation=v.rotation,is({el:V,componentModel:a,itemName:R,formatterParamsExtra:{isTruncated:function(){return V.isTruncated},value:E,tickIndex:D}}),y){var $=Sn.makeAxisEventDataBase(a);$.targetType="axisLabel",$.value=E,$.tickIndex=D,C.break&&($.break={start:C.break.parsedBreak.vmin,end:C.break.parsedBreak.vmax}),o.type==="category"&&($.dataIndex=N),Pe(V).eventData=$,C.break&&Afe(a,i,V,C.break)}x.push(V),l.add(V)});var T=fe(x,function(C){return{label:C,priority:jh(C).break?C.z2+(w-b+1):C.z2,defaultAttr:{ignore:C.ignore}}});oA(e,T,l,u)}function _7(r){return!!r.labelLayoutList}function oA(r,e,t,n){r.labelLayoutList=e,r.labelGroup=t,r.axisLabelsCreationContext=n}function Tfe(r,e,t,n){var a=e.get(["axisLabel","margin"]);O(t,function(i,o){var s=$i(i);if(s){var l=s.label,u=jh(l);s.suggestIgnore=l.ignore,l.ignore=!1,Cx(So,Cfe),So.x=e.axis.dataToCoord(u.tickValue),So.y=r.labelOffset+r.labelDirection*a,So.rotation=u.layoutRotation,n.add(So),So.updateTransform(),n.remove(So),So.decomposeTransform(),Cx(l,So),l.markRedraw(),Qx(s,!0),$i(s)}})}var So=new qe,Cfe=new qe;function eN(r){return!!r}function Afe(r,e,t,n){t.on("click",function(a){var i={type:ub,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};i[r.axis.dim+"AxisIndex"]=r.componentIndex,e.dispatchAction(i)})}function Mfe(r,e,t){var n=dr();if(n){var a=n.retrieveAxisBreakPairs(t,function(o){return o&&jh(o.label).break},!0),i=r.get(["breakLabelLayout","moveOverlap"],!0);(i===!0||i==="auto")&&O(a,function(o){$g().adjustBreakLabelPair(r.axis.inverse,e,[$i(t[o[0]]),$i(t[o[1]])])})}}function r1(r,e,t){t=t||{};var n=e.axis,a={},i=n.getAxesOnZeroOf()[0],o=n.position,s=i?"onZero":o,l=n.dim,u=[r.x,r.x+r.width,r.y,r.y+r.height],c={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,d=l==="x"?[u[2]-f,u[3]+f]:[u[0]-f,u[1]+f];if(i){var v=i.toGlobalCoord(i.dataToCoord(0));d[c.onZero]=Math.max(Math.min(v,d[1]),d[0])}a.position=[l==="y"?d[c[s]]:u[0],l==="x"?d[c[s]]:u[3]],a.rotation=Math.PI/2*(l==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[o],a.labelOffset=i?d[c[o]]-d[c.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Hr(t.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var x=e.get(["axisLabel","rotate"]);return a.labelRotate=s==="top"?-x:x,a.z2=1,a}function Dfe(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function b3(r){var e={xAxisModel:null,yAxisModel:null};return O(e,function(t,n){var a=n.replace(/Model$/,""),i=r.getReferringComponents(a,Zt).models[0];e[n]=i}),e}function Nfe(r,e,t,n,a,i){for(var o=r1(r,t),s=!1,l=!1,u=0;u<e.length;u++)UC(e[u].getOtherAxis(t.axis).scale)&&(s=l=!0,t.axis.type==="category"&&t.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=i,new Sn(t,n,o,a)}function Lfe(r,e,t){var n=r1(e,t);r.updateCfg(n)}function S7(r,e,t){var n=es.prototype,a=n.getTicks.call(t),i=n.getTicks.call(t,{expandToNicedExtent:!0}),o=a.length-1,s=n.getInterval.call(t),l=dF(r,e),u=l.extent,c=l.fixMin,f=l.fixMax;r.type==="log"&&(u=YC(r.base,u,!0)),r.setBreaksFromOption(pF(e)),r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var d=n.getExtent.call(r);c&&(u[0]=d[0]),f&&(u[1]=d[1]);var v=n.getInterval.call(r),g=u[0],x=u[1];if(c&&f)v=(x-g)/o;else if(c)for(x=u[0]+v*o;x<u[1]&&isFinite(x)&&isFinite(u[1]);)v=Uw(v),x=u[0]+v*o;else if(f)for(g=u[1]-v*o;g>u[0]&&isFinite(g)&&isFinite(u[0]);)v=Uw(v),g=u[1]-v*o;else{var y=r.getTicks().length-1;y>o&&(v=Uw(v));var b=v*o;x=Math.ceil(u[1]/v)*v,g=sr(x-b),g<0&&u[0]>=0?(g=0,x=sr(b)):x>0&&u[1]<=0&&(x=0,g=-sr(b))}var w=(a[0].value-i[0].value)/s,T=(a[o].value-i[o].value)/s;n.setExtent.call(r,g+v*w,x+v*T),n.setInterval.call(r,v),(w||T)&&n.setNiceExtent.call(r,g+v,x-v)}var _3=[[3,1],[0,2]],Rfe=(function(){function r(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=iA,this._initCartesian(e,t,n),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function a(o){var s,l=it(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var d=+l[f],v=o[d],g=v.model,x=v.scale;UC(x)&&g.get("alignTicks")&&g.get("interval")==null?c.push(v):(pc(x,g),UC(x)&&(s=v))}c.length&&(s||(s=c.pop(),pc(s.scale,s.model)),O(c,function(y){S7(y.scale,y.model,s.scale)}))}}a(n.x),a(n.y);var i={};O(n.x,function(o){S3(n,"y",o,i)}),O(n.y,function(o){S3(n,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,n){var a=wr(e,t),i=this._rect=Ht(e.getBoxLayoutParams(),a.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(sA(o,i),!n){var u=Ife(i,s,o,l,t),c=void 0;if(l)lA?(lA(this._axesList,i),sA(o,i)):c=C3(i.clone(),"axisLabel",null,i,o,u,a);else{var f=Ofe(e,i,a),d=f.outerBoundsRect,v=f.parsedOuterBoundsContain,g=f.outerBoundsClamp;d&&(c=C3(d,v,g,i,o,u,a))}w7(i,o,oi.determine,null,c,a)}O(this._coordsList,function(x){x.calcAffineTransform()})},r.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n="x"+e+"y"+t;return this._coordsMap[n]}Re(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var a=0,i=this._coordsList;a<i.length;a++)if(i[a].getAxis("x").index===e||i[a].getAxis("y").index===t)return i[a]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(e,t,n){var a=this._findConvertTarget(t);return a.cartesian?a.cartesian.dataToPoint(n):a.axis?a.axis.toGlobalCoord(a.axis.dataToCoord(n)):null},r.prototype.convertFromPixel=function(e,t,n){var a=this._findConvertTarget(t);return a.cartesian?a.cartesian.pointToData(n):a.axis?a.axis.coordToData(a.axis.toLocalCoord(n)):null},r.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents("xAxis",Zt).models[0],a=e.yAxisModel||t&&t.getReferringComponents("yAxis",Zt).models[0],i=e.gridModel,o=this._coordsList,s,l;if(t)s=t.coordinateSystem,Fe(o,s)<0&&(s=null);else if(n&&a)s=this.getCartesian(n.componentIndex,a.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(a)l=this.getAxis("y",a.componentIndex);else if(i){var u=i.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},r.prototype._initCartesian=function(e,t,n){var a=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(t.eachComponent("xAxis",u("x"),this),t.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,O(s.x,function(c,f){O(s.y,function(d,v){var g="x"+f+"y"+v,x=new lfe(g);x.master=a,x.model=e,a._coordsMap[g]=x,a._coordsList.push(x),x.addAxis(c),x.addAxis(d)})});function u(c){return function(f,d){if(oT(f,e)){var v=f.get("position");c==="x"?v!=="top"&&v!=="bottom"&&(v=o.bottom?"top":"bottom"):v!=="left"&&v!=="right"&&(v=o.left?"right":"left"),o[v]=!0;var g=new h7(c,Yg(f),[0,0],f.get("type"),v),x=g.type==="category";g.onBand=x&&f.get("boundaryGap"),g.inverse=f.get("inverse"),f.axis=g,g.model=f,g.grid=i,g.index=d,i._axesList.push(g),s[c][d]=g,l[c]++}}}},r.prototype._updateScale=function(e,t){O(this._axesList,function(a){if(a.scale.setExtent(1/0,-1/0),a.type==="category"){var i=a.model.get("categorySortInfo");a.scale.setSortInfo(i)}}),e.eachSeries(function(a){if(Dfe(a)){var i=b3(a),o=i.xAxisModel,s=i.yAxisModel;if(!oT(o,t)||!oT(s,t))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=a.getData(),c=l.getAxis("x"),f=l.getAxis("y");n(u,c),n(u,f)}},this);function n(a,i){O(Xx(a,i.dim),function(o){i.scale.unionExtentFromData(a,o)})}},r.prototype.getTooltipAxes=function(e){var t=[],n=[];return O(this.getCartesians(),function(a){var i=e!=null&&e!=="auto"?a.getAxis(e):a.getBaseAxis(),o=a.getOtherAxis(i);Fe(t,i)<0&&t.push(i),Fe(n,o)<0&&n.push(o)}),{baseAxes:t,otherAxes:n}},r.create=function(e,t){var n=[];return e.eachComponent("grid",function(a,i){var o=new r(a,e,t);o.name="grid_"+i,o.resize(a,t,!0),a.coordinateSystem=o,n.push(o)}),e.eachSeries(function(a){Fg({targetModel:a,coordSysType:"cartesian2d",coordSysProvider:i});function i(){var o=b3(a),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel(),c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),n},r.dimensions=iA,r})();function oT(r,e){return r.getCoordSysModel()===e}function S3(r,e,t,n){t.getAxesOnZeroOf=function(){return i?[i]:[]};var a=r[e],i,o=t.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)w3(a[l])&&(i=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&w3(a[u])&&!n[c(a[u])]){i=a[u];break}i&&(n[c(i)]=!0);function c(f){return f.dim+"_"+f.index}}function w3(r){return r&&r.type!=="category"&&r.type!=="time"&&wle(r)}function Efe(r,e){var t=r.getExtent(),n=t[0]+t[1];r.toGlobalCoord=r.dim==="x"?function(a){return a+e}:function(a){return n-a+e},r.toLocalCoord=r.dim==="x"?function(a){return a-e}:function(a){return n-a+e}}function sA(r,e){O(r.x,function(t){return T3(t,e.x,e.width)}),O(r.y,function(t){return T3(t,e.y,e.height)})}function T3(r,e,t){var n=[0,t],a=r.inverse?1:0;r.setExtent(n[a],n[1-a]),Efe(r,e)}var lA;function kfe(r){lA=r}function C3(r,e,t,n,a,i,o){w7(n,a,oi.estimate,e,!1,o);var s=[0,0,0,0];u(0),u(1),c(n,0,NaN),c(n,1,NaN);var l=Ml(s,function(d){return d>0})==null;return hc(n,s,!0,!0,t),sA(a,n),l;function u(d){O(a[Ve[d]],function(v){if(sg(v.model)){var g=i.ensureRecord(v.model),x=g.labelInfoList;if(x)for(var y=0;y<x.length;y++){var b=x[y],w=v.scale.normalize(jh(b.label).tickValue);w=d===1?1-w:w,c(b.rect,d,w),c(b.rect,1-d,NaN)}var T=g.nameLayout;if(T){var w=Oh(g.nameLocation)?.5:NaN;c(T.rect,d,w),c(T.rect,1-d,NaN)}}})}function c(d,v,g){var x=r[Ve[v]]-d[Ve[v]],y=d[vr[v]]+d[Ve[v]]-(r[vr[v]]+r[Ve[v]]);x=f(x,1-g),y=f(y,g);var b=_3[v][0],w=_3[v][1];s[b]=or(s[b],x),s[w]=or(s[w],y)}function f(d,v){return d>0&&!Jr(v)&&v>1e-4&&(d/=v),d}}function Ife(r,e,t,n,a){var i=new g7(Pfe);return O(t,function(o){return O(o,function(s){if(sg(s.model)){var l=!n;s.axisBuilder=Nfe(r,e,s.model,a,i,l)}})}),i}function w7(r,e,t,n,a,i){var o=t===oi.determine;O(e,function(u){return O(u,function(c){sg(c.model)&&(Lfe(c.axisBuilder,r,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:a}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Ve[1-u]]=r[vr[u]]<=i.refContainer[vr[u]]*.5?0:1-u===1?2:1}O(e,function(u,c){return O(u,function(f){sg(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function Ofe(r,e,t){var n,a=r.get("outerBoundsMode",!0);a==="same"?n=e.clone():(a==null||a==="auto")&&(n=Ht(r.get("outerBounds",!0)||u7,t.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||Fe(["all","axisLabel"],i)<0?o="all":o=i;var s=[Mx(Ce(r.get("outerBoundsClampWidth",!0),t1[0]),e.width),Mx(Ce(r.get("outerBoundsClampHeight",!0),t1[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var Pfe=function(r,e,t,n,a,i){var o=t.axis.dim==="x"?"y":"x";m7(r,e,t,n,a,i),Oh(r.nameLocation)||O(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&x7(s.labelInfoList,s.dirVec,n,a)})};function zfe(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return jfe(t,r,e),t.seriesInvolved&&Vfe(t,r),t}function jfe(r,e,t){var n=e.getComponent("tooltip"),a=e.getComponent("axisPointer"),i=a.get("link",!0)||[],o=[];O(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=fg(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(O(s.getAxes(),He(x,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var d=f.get("trigger")==="axis",v=f.get(["axisPointer","type"])==="cross",g=s.getTooltipAxes(f.get(["axisPointer","axis"]));(d||v)&&O(g.baseAxes,He(x,v?"cross":!0,d)),v&&O(g.otherAxes,He(x,"cross",!1))}function x(y,b,w){var T=w.model.getModel("axisPointer",a),C=T.get("show");if(!(!C||C==="auto"&&!y&&!uA(T))){b==null&&(b=T.get("triggerTooltip")),T=y?Bfe(w,f,a,e,y,b):T;var D=T.get("snap"),M=T.get("triggerEmphasis"),N=fg(w.model),R=b||D||w.type==="category",E=r.axesInfo[N]={key:N,axis:w,coordSys:s,axisPointerModel:T,triggerTooltip:b,triggerEmphasis:M,involveSeries:R,snap:D,useHandle:uA(T),seriesModels:[],linkGroup:null};u[N]=E,r.seriesInvolved=r.seriesInvolved||R;var k=Gfe(i,w);if(k!=null){var I=o[k]||(o[k]={axesInfo:{}});I.axesInfo[N]=E,I.mapper=i[k].mapper,E.linkGroup=I}}}})}function Bfe(r,e,t,n,a,i){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};O(s,function(d){l[d]=Me(o.get(d))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),a==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!i){var f=l.lineStyle=o.get("crossStyle");f&&Le(u,f.textStyle)}}return r.model.getModel("axisPointer",new et(l,t,n))}function Vfe(r,e){e.eachSeries(function(t){var n=t.coordinateSystem,a=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);!n||!n.model||a==="none"||a===!1||a==="item"||i===!1||t.get(["axisPointer","show"],!0)===!1||O(r.coordSysAxesInfo[fg(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function Gfe(r,e){for(var t=e.model,n=e.dim,a=0;a<r.length;a++){var i=r[a]||{};if(sT(i[n+"AxisId"],t.id)||sT(i[n+"AxisIndex"],t.componentIndex)||sT(i[n+"AxisName"],t.name))return a}}function sT(r,e){return r==="all"||ce(r)&&Fe(r,e)>=0||r===e}function Hfe(r){var e=tN(r);if(e){var t=e.axisPointerModel,n=e.axis.scale,a=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=n.parse(o));var s=uA(t);i==null&&(a.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]),a.value=o,s&&(a.status=e.axis.scale.isBlank()?"hide":"show")}}function tN(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[fg(r)]}function Ffe(r){var e=tN(r);return e&&e.axisPointerModel}function uA(r){return!!r.get(["handle","show"])}function fg(r){return r.type+"||"+r.id}var A3={},Cc=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this.axisPointerClass&&Hfe(t),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,a,!0)},e.prototype.updateAxisPointer=function(t,n,a,i){this._doUpdateAxisPointerClass(t,a,!1)},e.prototype.remove=function(t,n){var a=this._axisPointer;a&&a.remove(n)},e.prototype.dispose=function(t,n){this._disposeAxisPointer(n),r.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,a){var i=e.getAxisPointerClass(this.axisPointerClass);if(i){var o=Ffe(t);o?(this._axisPointer||(this._axisPointer=new i)).render(t,o,n,a):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,n){A3[t]=n},e.getAxisPointerClass=function(t){return t&&A3[t]},e.type="axis",e})(Rt),cA=Je();function T7(r,e,t,n){var a=t.axis;if(!a.scale.isBlank()){var i=t.getModel("splitArea"),o=i.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=a.getTicksCoords({tickModel:i,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,f=cA(r).splitAreaColors,d=Te(),v=0;if(f)for(var g=0;g<u.length;g++){var x=f.get(u[g].tickValue);if(x!=null){v=(x+(c-1)*g)%c;break}}var y=a.toGlobalCoord(u[0].coord),b=o.getAreaStyle();s=ce(s)?s:[s];for(var g=1;g<u.length;g++){var w=a.toGlobalCoord(u[g].coord),T=void 0,C=void 0,D=void 0,M=void 0;a.isHorizontal()?(T=y,C=l.y,D=w-T,M=l.height,y=T+D):(T=l.x,C=y,D=l.width,M=w-C,y=C+M);var N=u[g-1].tickValue;N!=null&&d.set(N,v),e.add(new qe({anid:N!=null?"area_"+N:null,shape:{x:T,y:C,width:D,height:M},style:Le({fill:s[v]},b),autoBatch:!0,silent:!0})),v=(v+1)%c}cA(r).splitAreaColors=d}}}function C7(r){cA(r).splitAreaColors=null}var Ufe=["splitArea","splitLine","minorSplitLine","breakArea"],A7=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,n,a,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new De,this.group.add(this._axisGroup),!!sg(t)){this._axisGroup.add(t.axis.axisBuilder.group),O(Ufe,function(l){t.get([l,"show"])&&Yfe[l](this,this._axisGroup,t,t.getCoordSysModel(),a)},this);var s=i&&i.type==="changeAxisOrder"&&i.isInitSort;s||Gg(o,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)}},e.prototype.remove=function(){C7(this)},e.type="cartesianAxis",e})(Cc),Yfe={splitLine:function(r,e,t,n,a){var i=t.axis;if(!i.scale.isBlank()){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=ce(l)?l:[l];for(var f=n.coordinateSystem.getRect(),d=i.isHorizontal(),v=0,g=i.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),x=[],y=[],b=s.getLineStyle(),w=0;w<g.length;w++){var T=i.toGlobalCoord(g[w].coord);if(!(w===0&&!u||w===g.length-1&&!c)){var C=g[w].tickValue;d?(x[0]=T,x[1]=f.y,y[0]=T,y[1]=f.y+f.height):(x[0]=f.x,x[1]=T,y[0]=f.x+f.width,y[1]=T);var D=v++%l.length,M=new lr({anid:C!=null?"line_"+C:null,autoBatch:!0,shape:{x1:x[0],y1:x[1],x2:y[0],y2:y[1]},style:Le({stroke:l[D]},b),silent:!0});Rh(M.shape,b.lineWidth),e.add(M)}}}},minorSplitLine:function(r,e,t,n,a){var i=t.axis,o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=i.isHorizontal(),c=i.getMinorTicksCoords();if(c.length)for(var f=[],d=[],v=s.getLineStyle(),g=0;g<c.length;g++)for(var x=0;x<c[g].length;x++){var y=i.toGlobalCoord(c[g][x].coord);u?(f[0]=y,f[1]=l.y,d[0]=y,d[1]=l.y+l.height):(f[0]=l.x,f[1]=y,d[0]=l.x+l.width,d[1]=y);var b=new lr({anid:"minor_line_"+c[g][x].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]},style:v,silent:!0});Rh(b.shape,v.lineWidth),e.add(b)}},splitArea:function(r,e,t,n,a){T7(r,e,t,n)},breakArea:function(r,e,t,n,a){var i=$g(),o=t.axis.scale;i&&o.type!=="ordinal"&&i.rectCoordBuildBreakAxis(e,r,t,n.coordinateSystem.getRect(),a)}},M7=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e})(A7),Wfe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=M7.type,t}return e.type="yAxis",e})(A7),Xfe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,n){this.group.removeAll(),t.get("show")&&this.group.add(new qe({shape:t.coordinateSystem.getRect(),style:Le({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e})(Rt),M3={offset:0};function D7(r){r.registerComponentView(Xfe),r.registerComponentModel(tfe),r.registerCoordinateSystem("cartesian2d",Rfe),zh(r,"x",nA,M3),zh(r,"y",nA,M3),r.registerComponentView(M7),r.registerComponentView(Wfe),r.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function qfe(r,e){var t=r.coordinateSystem,n=t&&t.type,a=t&&t.getBaseAxis&&t.getBaseAxis(),i=a&&a.scale&&a.scale.type,o=n==="cartesian2d"&&i==="ordinal"||n==="single",s=e.model.get("jitter")>0;return o&&s}var Zfe=Je();function D3(r,e,t,n){if(r instanceof h7){var a=r.scale.type;if(a!=="category"&&a!=="ordinal")return t}var i=r.model,o=i.get("jitter"),s=i.get("jitterOverlap"),l=i.get("jitterMargin")||0,u=r.scale.type==="ordinal"?r.getBandWidth():null;return o>0?s?N7(t,o,u,n):$fe(r,e,t,n,o,l):t}function N7(r,e,t,n){if(t===null)return r+(Math.random()-.5)*e;var a=t-n*2,i=Math.min(Math.max(0,e),a);return r+(Math.random()-.5)*i}function $fe(r,e,t,n,a,i){var o=Zfe(r);o.items||(o.items=[]);var s=o.items,l=N3(s,e,t,n,a,i,1),u=N3(s,e,t,n,a,i,-1),c=Math.abs(l-t)<Math.abs(u-t)?l:u,f=r.scale.type==="ordinal"?r.getBandWidth():null,d=Math.abs(c-t);return d>a/2||f&&d>f/2-n?N7(t,a,f,n):(s.push({fixedCoord:e,floatCoord:c,r:n}),c)}function N3(r,e,t,n,a,i,o){for(var s=t,l=0;l<r.length;l++){var u=r[l],c=e-u.fixedCoord,f=s-u.floatCoord,d=c*c+f*f,v=n+u.r+i;if(d<v*v){var g=u.floatCoord+Math.sqrt(v*v-c*c)*o;if(Math.abs(g-t)>a/2)return Number.MAX_VALUE;if(o===1&&g>s||o===-1&&g<s){s=g,l=-1;continue}}}return s}function Kfe(r){r.eachSeriesByType("scatter",function(e){var t=e.coordinateSystem;if(t&&(t.type==="cartesian2d"||t.type==="single")){var n=t.getBaseAxis?t.getBaseAxis():null,a=n&&qfe(e,n);if(a){var i=e.getData();i.each(function(o){var s=n.dim,l=n.orient,u=l==="horizontal"&&n.type!=="category"||l==="vertical"&&n.type==="category",c=i.getItemLayout(o),f=i.getItemVisual(o,"symbolSize"),d=f instanceof Array?(f[1]+f[0])/2:f;if(s==="y"||s==="single"&&u){var v=D3(n,c[0],c[1],d/2);i.setItemLayout(o,[c[0],v])}else if(s==="x"||s==="single"&&!u){var v=D3(n,c[1],c[0],d/2);i.setItemLayout(o,[v,c[1]])}})}}})}function Qfe(r){We(D7),r.registerSeriesModel($ce),r.registerChartView(efe),r.registerLayout(Zg("scatter"))}function Jfe(r){r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,Kfe)}function ehe(r){r.eachSeriesByType("radar",function(e){var t=e.getData(),n=[],a=e.coordinateSystem;if(a){var i=a.getIndicatorAxes();O(i,function(o,s){t.each(t.mapDimension(i[s].dim),function(l,u){n[u]=n[u]||[];var c=a.dataToPoint(l,s);n[u][s]=L3(c)?c:R3(a)})}),t.each(function(o){var s=Ml(n[o],function(l){return L3(l)})||R3(a);n[o].push(s.slice()),t.setItemLayout(o,n[o])})}})}function L3(r){return!isNaN(r[0])&&!isNaN(r[1])}function R3(r){return[r.cx,r.cy]}function the(r){var e=r.polar;if(e){ce(e)||(e=[e]);var t=[];O(e,function(n,a){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),r.radar=r.radar||[],ce(r.radar)||(r.radar=[r.radar]),r.radar.push(n)):t.push(n)}),r.polar=t}O(r.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var rhe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.coordinateSystem,o=this.group,s=t.getData(),l=this._data;function u(d,v){var g=d.getItemVisual(v,"symbol")||"circle";if(g!=="none"){var x=id(d.getItemVisual(v,"symbolSize")),y=ur(g,-1,-1,2,2),b=d.getItemVisual(v,"symbolRotate")||0;return y.attr({style:{strokeNoScale:!0},z2:100,scaleX:x[0]/2,scaleY:x[1]/2,rotation:b*Math.PI/180||0}),y}}function c(d,v,g,x,y,b){g.removeAll();for(var w=0;w<v.length-1;w++){var T=u(x,y);T&&(T.__dimIdx=w,d[w]?(T.setPosition(d[w]),_c[b?"initProps":"updateProps"](T,{x:v[w][0],y:v[w][1]},t,y)):T.setPosition(v[w]),g.add(T))}}function f(d){return fe(d,function(v){return[i.cx,i.cy]})}s.diff(l).add(function(d){var v=s.getItemLayout(d);if(v){var g=new nn,x=new Fr,y={shape:{points:v}};g.shape.points=f(v),x.shape.points=f(v),jt(g,y,t,d),jt(x,y,t,d);var b=new De,w=new De;b.add(x),b.add(g),b.add(w),c(x.shape.points,v,w,s,d,!0),s.setItemGraphicEl(d,b)}}).update(function(d,v){var g=l.getItemGraphicEl(v),x=g.childAt(0),y=g.childAt(1),b=g.childAt(2),w={shape:{points:s.getItemLayout(d)}};w.shape.points&&(c(x.shape.points,w.shape.points,b,s,d,!1),Pa(y),Pa(x),lt(x,w,t),lt(y,w,t),s.setItemGraphicEl(d,g))}).remove(function(d){o.remove(l.getItemGraphicEl(d))}).execute(),s.eachItemGraphicEl(function(d,v){var g=s.getItemModel(v),x=d.childAt(0),y=d.childAt(1),b=d.childAt(2),w=s.getItemVisual(v,"style"),T=w.fill;o.add(d),x.useStyle(Le(g.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:T})),_r(x,g,"lineStyle"),_r(y,g,"areaStyle");var C=g.getModel("areaStyle"),D=C.isEmpty()&&C.parentModel.isEmpty();y.ignore=D,O(["emphasis","select","blur"],function(N){var R=g.getModel([N,"areaStyle"]),E=R.isEmpty()&&R.parentModel.isEmpty();y.ensureState(N).ignore=E&&D;var k=g.getModel([N,"lineStyle"]).getLineStyle();x.ensureState(N).style=k;var I=R.getAreaStyle();y.ensureState(N).style=I;var z=g.getModel([N,"itemStyle"]).getItemStyle();b.eachChild(function(P){P.ensureState(N).style=Me(z)})}),y.useStyle(Le(g.getModel("areaStyle").getAreaStyle(),{fill:T,opacity:.7,decal:w.decal}));var M=g.getModel("emphasis");b.eachChild(function(N){if(N instanceof kr){var R=N.style;N.useStyle(ie({image:R.image,x:R.x,y:R.y,width:R.width,height:R.height},w))}else N.useStyle(w),N.setColor(T),N.style.strokeNoScale=!0;var E=s.getStore().get(s.getDimensionIndex(N.__dimIdx),v);(E==null||isNaN(E))&&(E=""),Lr(N,Sr(g),{labelFetcher:s.hostModel,labelDataIndex:v,labelDimIndex:N.__dimIdx,defaultText:E,inheritColor:T,defaultOpacity:w.opacity})}),Ut(d,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})(_t),nhe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new fd(xe(this.getData,this),xe(this.getRawData,this))},e.prototype.getInitialData=function(t,n){return cd(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,c=u8(this,t);return pr("section",{header:u,sortBlocks:!0,blocks:fe(s,function(f){var d=i.get(i.mapDimension(f.dim),t);return pr("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:d,sortParam:d})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var n=this.getData(),a=this.coordinateSystem,i=n.getValues(fe(a.dimensions,function(u){return n.mapDimension(u)}),t),o=0,s=i.length;o<s;o++)if(!isNaN(i[o])){var l=a.getIndicatorAxes();return a.coordToPoint(l[o].dataToCoord(i[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})(Tt),Ov=f7.value;function u0(r,e){return Le({show:e},r)}var ahe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),n=this.get("splitNumber"),a=this.get("scale"),i=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"]),f=this.get("axisNameGap"),d=this.get("triggerEvent"),v=fe(this.get("indicator")||[],function(g){g.max!=null&&g.max>0&&!g.min?g.min=0:g.min!=null&&g.min<0&&!g.max&&(g.max=0);var x=l;g.color!=null&&(x=Le({color:g.color},l));var y=Ye(Me(g),{boundaryGap:t,splitNumber:n,scale:a,axisLine:i,axisTick:o,axisLabel:s,name:g.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:x,triggerEvent:d},!1);if(ye(c)){var b=y.name;y.name=c.replace("{value}",b??"")}else Ae(c)&&(y.name=c(y.name,y));var w=new et(y,null,this.ecModel);return Jt(w,ld.prototype),w.mainType="radar",w.componentIndex=this.componentIndex,w},this);this._indicatorModels=v},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:ee.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Ye({lineStyle:{color:ee.color.neutral20}},Ov.axisLine),axisLabel:u0(Ov.axisLabel,!1),axisTick:u0(Ov.axisTick,!1),splitLine:u0(Ov.splitLine,!0),splitArea:u0(Ov.splitArea,!0),indicator:[]},e})(Qe),ihe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll(),this._buildAxes(t,a),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t,n){var a=t.coordinateSystem,i=a.getIndicatorAxes(),o=fe(i,function(s){var l=s.model.get("showName")?s.name:"",u=new Sn(s.model,n,{axisName:l,position:[a.cx,a.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});O(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(t){var n=t.coordinateSystem,a=n.getIndicatorAxes();if(!a.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),d=l.get("color"),v=u.get("color"),g=ce(d)?d:[d],x=ce(v)?v:[v],y=[],b=[];function w(U,B,F){var H=F%B.length;return U[H]=U[H]||[],H}if(i==="circle")for(var T=a[0].getTicksCoords(),C=n.cx,D=n.cy,M=0;M<T.length;M++){if(c){var N=w(y,g,M);y[N].push(new eo({shape:{cx:C,cy:D,r:T[M].coord}}))}if(f&&M<T.length-1){var N=w(b,x,M);b[N].push(new Zh({shape:{cx:C,cy:D,r0:T[M].coord,r:T[M+1].coord}}))}}else for(var R,E=fe(a,function(U,B){var F=U.getTicksCoords();return R=R==null?F.length-1:Math.min(F.length-1,R),fe(F,function(H){return n.coordToPoint(H.coord,B)})}),k=[],M=0;M<=R;M++){for(var I=[],z=0;z<a.length;z++)I.push(E[z][M]);if(I[0]&&I.push(I[0].slice()),c){var N=w(y,g,M);y[N].push(new Fr({shape:{points:I}}))}if(f&&k){var N=w(b,x,M-1);b[N].push(new nn({shape:{points:I.concat(k)}}))}k=I.slice().reverse()}var P=l.getLineStyle(),G=u.getAreaStyle();O(b,function(U,B){this.group.add(ea(U,{style:Le({stroke:"none",fill:x[B%x.length]},G),silent:!0}))},this),O(y,function(U,B){this.group.add(ea(U,{style:Le({fill:"none",stroke:g[B%g.length]},P),silent:!0}))},this)},e.type="radar",e})(Rt),ohe=(function(r){K(e,r);function e(t,n,a){var i=r.call(this,t,n,a)||this;return i.type="value",i.angle=0,i.name="",i}return e})(Ba),she=(function(){function r(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=fe(e.getIndicatorModels(),function(a,i){var o="indicator_"+i,s=new ohe(o,new es);return s.name=a.get("name"),s.model=a,a.axis=s,this.dimensions.push(o),s},this),this.resize(e,n)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},r.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t],a=n.angle,i=this.cx+e*Math.cos(a),o=this.cy-e*Math.sin(a);return[i,o]},r.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,a=Math.sqrt(t*t+n*n);t/=a,n/=a;for(var i=Math.atan2(-n,t),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],f=Math.abs(i-c.angle);f<o&&(s=c,l=u,o=f)}return[l,+(s&&s.coordToData(a))]},r.prototype.resize=function(e,t){var n=wr(e,t).refContainer,a=e.get("center"),i=Math.min(n.width,n.height)/2;this.cx=me(a[0],n.width)+n.x,this.cy=me(a[1],n.height)+n.y,this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");(ye(o)||st(o))&&(o=[0,o]),this.r0=me(o[0],i),this.r=me(o[1],i),O(this._indicatorAxes,function(s,l){s.setExtent(this.r0,this.r);var u=this.startAngle+l*Math.PI*2/this._indicatorAxes.length;u=Math.atan2(Math.sin(u),Math.cos(u)),s.angle=u},this)},r.prototype.update=function(e,t){var n=this._indicatorAxes,a=this._model;O(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"))!==a)){var u=s.getData();O(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var i=a.get("splitNumber"),o=new es;o.setExtent(0,i),o.setInterval(1),O(n,function(s,l){S7(s.scale,s.model,o)})},r.prototype.convertToPixel=function(e,t,n){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,t,n){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,t){var n=[];return e.eachComponent("radar",function(a){var i=new r(a,e,t);n.push(i),a.coordinateSystem=i}),e.eachSeriesByType("radar",function(a){a.get("coordinateSystem")==="radar"&&(a.coordinateSystem=n[a.get("radarIndex")||0])}),n},r.dimensions=[],r})();function lhe(r){r.registerCoordinateSystem("radar",she),r.registerComponentModel(ahe),r.registerComponentView(ihe),r.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(n){t.setItemVisual(n,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function uhe(r){We(lhe),r.registerChartView(rhe),r.registerSeriesModel(nhe),r.registerLayout(ehe),r.registerProcessor(ud("radar")),r.registerPreprocessor(the)}var rN=Je();function che(r,e,t){rN(r)[e]=t}function fhe(r,e,t){var n=rN(r),a=n[e];a===t&&(n[e]=null)}function E3(r,e){return!!rN(r)[e]}li({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Kt);var hhe={axisPointer:1,tooltip:1,brush:1};function L7(r,e,t){var n=e.getComponentByElement(r.topTarget);if(!n||n===t||hhe.hasOwnProperty(n.mainType))return!1;var a=n.coordinateSystem;if(!a||a.model===t)return!1;var i=dc(n),o=dc(t);return!((i.zlevel-o.zlevel||i.z-o.z)<=0)}var Ac=(function(r){K(e,r);function e(t){var n=r.call(this)||this;n._zr=t;var a=xe(n._mousedownHandler,n),i=xe(n._mousemoveHandler,n),o=xe(n._mouseupHandler,n),s=xe(n._mousewheelHandler,n),l=xe(n._pinchHandler,n);return n.enable=function(u,c){var f=c.zInfo,d=dc(f.component),v=d.z,g=d.zlevel,x={component:f.component,z:v,zlevel:g,z2:Ce(f.z2,-1/0)},y=ie({},c.triggerInfo);this._opt=Le(ie({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:x,triggerInfo:y}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this._enabled=!0,this.disable(),(u===!0||u==="move"||u==="pan")&&(zv(t,"mousedown",a,x),zv(t,"mousemove",i,x),zv(t,"mouseup",o,x)),(u===!0||u==="scale"||u==="zoom")&&(zv(t,"mousewheel",s,x),zv(t,"pinch",l,x)))},n.disable=function(){this._enabled=!1,jv(t,"mousedown",a),jv(t,"mousemove",i),jv(t,"mouseup",o),jv(t,"mousewheel",s),jv(t,"pinch",l)},n}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype._checkPointer=function(t,n,a){var i=this._opt,o=i.zInfoParsed;if(L7(t,i.api,o.component))return!1;var s=i.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(t,n,a)),u&&s.isInClip&&!s.isInClip(t,n,a)&&(u=!1),u},e.prototype._decideCursorStyle=function(t,n,a,i){var o=t.target;if(!o&&this._checkPointer(t,n,a))return"grab";if(i)return o&&o.cursor||"default"},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(JI(t)||Pv(t))){for(var n=t.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var a=t.offsetX,i=t.offsetY;this._checkPointer(t,a,i)&&(this._x=a,this._y=i,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){var n=this._zr;if(!(t.gestureEvent==="pinch"||E3(n,"globalPan")||Pv(t))){var a=t.offsetX,i=t.offsetY;if(!this._dragging||!J0("moveOnMouseMove",t,this._opt)){var o=this._decideCursorStyle(t,a,i,!1);o&&n.setCursorStyle(o);return}n.setCursorStyle("grabbing");var s=this._x,l=this._y,u=a-s,c=i-l;this._x=a,this._y=i,this._opt.preventDefaultMouseMove&&Zo(t.event),t.__ecRoamConsumed=!0,k3(this,"pan","moveOnMouseMove",t,{dx:u,dy:c,oldX:s,oldY:l,newX:a,newY:i,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){if(!Pv(t)){var n=this._zr;if(!JI(t)){this._dragging=!1;var a=this._decideCursorStyle(t,t.offsetX,t.offsetY,!0);a&&n.setCursorStyle(a)}}},e.prototype._mousewheelHandler=function(t){if(!Pv(t)){var n=J0("zoomOnMouseWheel",t,this._opt),a=J0("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,o=Math.abs(i),s=t.offsetX,l=t.offsetY;if(!(i===0||!n&&!a)){if(n){var u=o>3?1.4:o>1?1.2:1.1,c=i>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(a){var f=Math.abs(i),d=(i>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:d,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(t){if(!(E3(this._zr,"globalPan")||Pv(t))){var n=t.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(t,n,a,i,o){t._checkPointer(i,o.originX,o.originY)&&(Zo(i.event),i.__ecRoamConsumed=!0,k3(t,n,a,i,o))},e})(za);function Pv(r){return r.__ecRoamConsumed}var dhe=Je();function cb(r){var e=dhe(r);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function zv(r,e,t,n){for(var a=cb(r),i=a.roam,o=i[e]=i[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:t,zInfoParsed:n}),vhe(r,e)}function jv(r,e,t){for(var n=cb(r),a=n.roam[e]||[],i=0;i<a.length;i++)if(a[i].listener===t){a.splice(i,1),a.length||phe(r,e);return}}function vhe(r,e){var t=cb(r);t.uniform[e]||r.on(e,t.uniform[e]=function(n){var a=t.roam[e];if(a)for(var i=0;i<a.length;i++)a[i].listener(n)})}function phe(r,e){var t=cb(r),n=t.uniform;n[e]&&(r.off(e,n[e]),n[e]=null)}function k3(r,e,t,n,a){a.isAvailableBehavior=xe(J0,null,t,n),r.trigger(e,a)}function J0(r,e,t){var n=t[r];return!r||n&&(!ye(n)||e.event[n+"Key"])}function nN(r,e,t){var n=r.target;n.x+=e,n.y+=t,n.dirty()}function aN(r,e,t,n){var a=r.target,i=r.zoomLimit,o=r.zoom=r.zoom||1;o*=e,o=iN(o,i);var s=o/r.zoom;r.zoom=o,E7(a,t,n,s),a.dirty()}function R7(r,e,t,n,a,i){var o=new Ie(0,0,0,0);n.enable(r.get("roam"),{api:e,zInfo:{component:r},triggerInfo:{roamTrigger:r.get("roamTrigger"),isInSelf:function(u,c,f){return o.copy(t.getBoundingRect()),o.applyTransform(t.getComputedTransform()),o.contain(c,f)},isInClip:function(u,c,f){return!i||i.contain(c,f)}}}),a.zoomLimit=r.get("scaleLimit");var s=r.coordinateSystem;a.zoom=s?s.getZoom():1;var l=r.subType+"Roam";n.off("pan").off("zoom").on("pan",function(u){nN(a,u.dx,u.dy),e.dispatchAction({seriesId:r.id,type:l,dx:u.dx,dy:u.dy})}).on("zoom",function(u){aN(a,u.scale,u.originX,u.originY),e.dispatchAction({seriesId:r.id,type:l,zoom:u.scale,originX:u.originX,originY:u.originY}),e.updateLabelLayout()})}function I3(r,e){return r.pointToProjected?r.pointToProjected(e):r.pointToData(e)}function fb(r,e,t){var n=r.getZoom(),a=r.getCenter(),i=e.zoom,o=r.projectedToPoint?r.projectedToPoint(a):r.dataToPoint(a);return e.dx!=null&&e.dy!=null&&(o[0]-=e.dx,o[1]-=e.dy,r.setCenter(I3(r,o))),i!=null&&(i=iN(n*i,t)/n,E7(r,e.originX,e.originY,i),r.updateTransform(),r.setCenter(I3(r,o)),r.setZoom(i*n)),{center:r.getCenter(),zoom:r.getZoom()}}function E7(r,e,t,n){r.x-=(e-r.x)*(n-1),r.y-=(t-r.y)*(n-1),r.scaleX*=n,r.scaleY*=n}function iN(r,e){if(e){var t=e.min||0,n=e.max||1/0;r=Math.max(Math.min(n,r),t)}return r}function k7(r){if(ye(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var lT,n1={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"},O3=it(n1),a1={"alignment-baseline":"textBaseline","stop-color":"stopColor"},P3=it(a1),ghe=(function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var n=k7(e);this._defsUsePending=[];var a=new De;this._root=a;var i=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||t.width),l=parseFloat(n.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),qn(n,a,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,a,i,null,!1,!1),u=u.nextSibling;xhe(this._defs,this._defsUsePending),this._defsUsePending=[];var c,f;if(o){var d=hb(o);d.length>=4&&(c={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(c&&s!=null&&l!=null&&(f=O7(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var v=a;a=new De,a.add(v),v.scaleX=v.scaleY=f.scale,v.x=f.x,v.y=f.y}return!t.ignoreRootClip&&s!=null&&l!=null&&a.setClipPath(new qe({shape:{x:0,y:0,width:s,height:l}})),{root:a,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:i}},r.prototype._parseNode=function(e,t,n,a,i,o){var s=e.nodeName.toLowerCase(),l,u=a;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var c=lT[s];if(c&&_e(lT,s)){l=c.call(this,e,t);var f=e.getAttribute("name");if(f){var d={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(d),s==="g"&&(u=d)}else a&&n.push({name:a.name,namedFrom:a,svgNodeTagLower:s,el:l});t.add(l)}}var v=z3[s];if(v&&_e(z3,s)){var g=v.call(this,e),x=e.getAttribute("id");x&&(this._defs[x]=g)}}if(l&&l.isGroup)for(var y=e.firstChild;y;)y.nodeType===1?this._parseNode(y,l,n,u,i,o):y.nodeType===3&&o&&this._parseText(y,l),y=y.nextSibling},r.prototype._parseText=function(e,t){var n=new Nh({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});xa(t,n),qn(e,n,this._defsUsePending,!1,!1),mhe(n,t);var a=n.style,i=a.fontSize;i&&i<9&&(a.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var o=(a.fontSize||a.fontFamily)&&[a.fontStyle,a.fontWeight,(a.fontSize||12)+"px",a.fontFamily||"sans-serif"].join(" ");a.font=o;var s=n.getBoundingRect();return this._textX+=s.width,t.add(n),n},r.internalField=(function(){lT={g:function(e,t){var n=new De;return xa(t,n),qn(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new qe;return xa(t,n),qn(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,t){var n=new eo;return xa(t,n),qn(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,t){var n=new lr;return xa(t,n),qn(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,t){var n=new jg;return xa(t,n),qn(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,t){var n=e.getAttribute("points"),a;n&&(a=V3(n));var i=new nn({shape:{points:a||[]},silent:!0});return xa(t,i),qn(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute("points"),a;n&&(a=V3(n));var i=new Fr({shape:{points:a||[]},silent:!0});return xa(t,i),qn(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new kr;return xa(t,n),qn(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,t){var n=e.getAttribute("x")||"0",a=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(a)+parseFloat(o);var s=new De;return xa(t,s),qn(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var n=e.getAttribute("x"),a=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),a!=null&&(this._textY=parseFloat(a));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new De;return xa(t,s),qn(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var n=e.getAttribute("d")||"",a=K6(n);return xa(t,a),qn(e,a,this._defsUsePending,!1,!1),a.silent=!0,a}}})(),r})(),z3={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),n=parseInt(r.getAttribute("x2")||"10",10),a=parseInt(r.getAttribute("y2")||"0",10),i=new bc(e,t,n,a);return j3(r,i),B3(r,i),i},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),n=parseInt(r.getAttribute("r")||"0",10),a=new qM(e,t,n);return j3(r,a),B3(r,a),a}};function j3(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function B3(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var n=t.getAttribute("offset"),a=void 0;n&&n.indexOf("%")>0?a=parseInt(n,10)/100:n?a=parseFloat(n):a=0;var i={};I7(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000",s=i.stopOpacity||t.getAttribute("stop-opacity");if(s){var l=dn(o),u=l&&l[3];u&&(l[3]*=Vo(s),o=Ra(l,"rgba"))}e.colorStops.push({offset:a,color:o})}t=t.nextSibling}}function xa(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Le(e.__inheritedStyle,r.__inheritedStyle))}function V3(r){for(var e=hb(r),t=[],n=0;n<e.length;n+=2){var a=parseFloat(e[n]),i=parseFloat(e[n+1]);t.push([a,i])}return t}function qn(r,e,t,n,a){var i=e,o=i.__inheritedStyle=i.__inheritedStyle||{},s={};r.nodeType===1&&(She(r,e),I7(r,o,s),n||whe(r,o,s)),i.style=i.style||{},o.fill!=null&&(i.style.fill=G3(i,"fill",o.fill,t)),o.stroke!=null&&(i.style.stroke=G3(i,"stroke",o.stroke,t)),O(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(i.style[l]=parseFloat(o[l]))}),O(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(i.style[l]=o[l])}),a&&(i.__selfStyle=s),o.lineDash&&(i.style.lineDash=fe(hb(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(i.invisible=!0),o.display==="none"&&(i.ignore=!0)}function mhe(r,e){var t=e.__selfStyle;if(t){var n=t.textBaseline,a=n;!n||n==="auto"||n==="baseline"?a="alphabetic":n==="before-edge"||n==="text-before-edge"?a="top":n==="after-edge"||n==="text-after-edge"?a="bottom":(n==="central"||n==="mathematical")&&(a="middle"),r.style.textBaseline=a}var i=e.__inheritedStyle;if(i){var o=i.textAlign,s=o;o&&(o==="middle"&&(s="center"),r.style.textAlign=s)}}var yhe=/^url\(\s*#(.*?)\)/;function G3(r,e,t,n){var a=t&&t.match(yhe);if(a){var i=ta(a[1]);n.push([r,e,i]);return}return t==="none"&&(t=null),t}function xhe(r,e){for(var t=0;t<e.length;t++){var n=e[t];n[0].style[n[1]]=r[n[2]]}}var bhe=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function hb(r){return r.match(bhe)||[]}var _he=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,uT=Math.PI/180;function She(r,e){var t=r.getAttribute("transform");if(t){t=t.replace(/,/g," ");var n=[],a=null;t.replace(_he,function(f,d,v){return n.push(d,v),""});for(var i=n.length-1;i>0;i-=2){var o=n[i],s=n[i-1],l=hb(o);switch(a=a||Dr(),s){case"translate":ai(a,a,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":j1(a,a,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ns(a,a,-parseFloat(l[0])*uT,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*uT);Qa(a,[1,0,u,1,0,0],a);break;case"skewY":var c=Math.tan(parseFloat(l[0])*uT);Qa(a,[1,c,0,1,0,0],a);break;case"matrix":a[0]=parseFloat(l[0]),a[1]=parseFloat(l[1]),a[2]=parseFloat(l[2]),a[3]=parseFloat(l[3]),a[4]=parseFloat(l[4]),a[5]=parseFloat(l[5]);break}}e.setLocalTransform(a)}}var H3=/([^\s:;]+)\s*:\s*([^:;]+)/g;function I7(r,e,t){var n=r.getAttribute("style");if(n){H3.lastIndex=0;for(var a;(a=H3.exec(n))!=null;){var i=a[1],o=_e(n1,i)?n1[i]:null;o&&(e[o]=a[2]);var s=_e(a1,i)?a1[i]:null;s&&(t[s]=a[2])}}}function whe(r,e,t){for(var n=0;n<O3.length;n++){var a=O3[n],i=r.getAttribute(a);i!=null&&(e[n1[a]]=i)}for(var n=0;n<P3.length;n++){var a=P3[n],i=r.getAttribute(a);i!=null&&(t[a1[a]]=i)}}function O7(r,e){var t=e.width/r.width,n=e.height/r.height,a=Math.min(t,n);return{scale:a,x:-(r.x+r.width/2)*a+(e.x+e.width/2),y:-(r.y+r.height/2)*a+(e.y+e.height/2)}}function The(r,e){var t=new ghe;return t.parse(r,e)}var Che=Te(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Ahe=(function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=Te(),this._freedGraphics=[],this._mapName=e,this._parsedXML=k7(t)}return r.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=Dhe(e.named),n=t.regions,a=t.regionsMap;this._regions=n,this._regionsMap=a}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(e){var t,n;try{t=e&&The(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=t.root,tn(n!=null)}catch(y){throw new Error(`Invalid svg format
270
- `+y.message)}var a=new De;a.add(n),a.isGeoSVGGraphicRoot=!0;var i=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,f=void 0,d=void 0;if(i!=null?(u=0,f=i):s&&(u=s.x,f=s.width),o!=null?(c=0,d=o):s&&(c=s.y,d=s.height),u==null||c==null){var v=n.getBoundingRect();u==null&&(u=v.x,f=v.width),c==null&&(c=v.y,d=v.height)}l=this._boundingRect=new Ie(u,c,f,d)}if(s){var g=O7(s,l);n.scaleX=n.scaleY=g.scale,n.x=g.x,n.y=g.y}a.setClipPath(new qe({shape:l.plain()}));var x=[];return O(t.named,function(y){Che.get(y.svgNodeTagLower)!=null&&(x.push(y),Mhe(y.el))}),{root:a,boundingRect:l,named:x}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},r})();function Mhe(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function Dhe(r){var e=[],t=Te();return O(r,function(n){if(n.namedFrom==null){var a=new Ole(n.name,n.el);e.push(a),t.set(n.name,a)}}),{regions:e,regionsMap:t}}var fA=[126,25],F3="南海诸岛",Au=[[[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 wu=0;wu<Au.length;wu++)for(var Rf=0;Rf<Au[wu].length;Rf++)Au[wu][Rf][0]/=10.5,Au[wu][Rf][1]/=-10.5/.75,Au[wu][Rf][0]+=fA[0],Au[wu][Rf][1]+=fA[1];function Nhe(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===F3)return;e.push(new mF(F3,fe(Au,function(n){return{type:"polygon",exterior:n}}),fA))}}var Lhe={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function Rhe(r,e){if(r==="china"){var t=Lhe[e.name];if(t){var n=e.getCenter();n[0]+=t[0]/10.5,n[1]+=-t[1]/(10.5/.75),e.setCenter(n)}}}var Ehe=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function khe(r,e){r==="china"&&e.name==="台湾"&&e.geometries.push({type:"polygon",exterior:Ehe[0]})}var Ihe="name",Ohe=(function(){function r(e,t,n){this.type="geoJSON",this._parsedMap=Te(),this._mapName=e,this._specialAreas=n,this._geoJSON=zhe(t)}return r.prototype.load=function(e,t){t=t||Ihe;var n=this._parsedMap.get(t);if(!n){var a=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:a,boundingRect:Phe(a)})}var i=Te(),o=[];return O(n.regions,function(s){var l=s.name;e&&_e(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),i.set(l,s)}),{regions:o,boundingRect:n.boundingRect||new Ie(0,0,0,0),regionsMap:i}},r.prototype._parseToRegions=function(e){var t=this._mapName,n=this._geoJSON,a;try{a=n?qC(n,e):[]}catch(i){throw new Error(`Invalid geoJson format
271
- `+i.message)}return Nhe(t,a),O(a,function(i){var o=i.name;Rhe(t,i),khe(t,i);var s=this._specialAreas&&this._specialAreas[o];s&&i.transformTo(s.left,s.top,s.width,s.height)},this),a},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r})();function Phe(r){for(var e,t=0;t<r.length;t++){var n=r[t].getBoundingRect();e=e||n.clone(),e.union(n)}return e}function zhe(r){return ye(r)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var Bv=Te();const ts={registerMap:function(r,e,t){if(e.svg){var n=new Ahe(r,e.svg);Bv.set(r,n)}else{var a=e.geoJson||e.geoJSON;a&&!e.features?t=e.specialAreas:a=e;var n=new Ohe(r,a,t);Bv.set(r,n)}},getGeoResource:function(r){return Bv.get(r)},getMapForUser:function(r){var e=Bv.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var n=Bv.get(r);if(n)return n.load(e,t)}};var oN=["rect","circle","line","ellipse","polygon","polyline","path"],jhe=Te(oN),Bhe=Te(oN.concat(["g"])),Vhe=Te(oN.concat(["g"])),P7=Je();function c0(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function U3(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var z7=(function(){function r(e){var t=this.group=new De,n=this._transformGroup=new De;t.add(n),this.uid=ed("ec_map_draw"),this._controller=new Ac(e.getZr()),this._controllerHost={target:n},n.add(this._regionsGroup=new De),n.add(this._svgGroup=new De)}return r.prototype.draw=function(e,t,n,a,i){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(T){!s&&T.getHostGeoModel()===e&&(s=T.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this._transformGroup,f=l.getTransformInfo(),d=f.raw,v=f.roam,g=!u.childAt(0)||i,x=e.getShallow("clip",!0),y;x?(y=l.getViewRect().clone(),this.group.setClipPath(new qe({shape:y.clone()}))):this.group.removeClipPath(),g?(c.x=v.x,c.y=v.y,c.scaleX=v.scaleX,c.scaleY=v.scaleY,c.dirty()):lt(c,v,e);var b=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,w={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:b,isGeo:o,transformInfoRaw:d};l.resourceType==="geoJSON"?this._buildGeoJSON(w):l.resourceType==="geoSVG"&&this._buildSVG(w),this._updateController(e,y,t,n),this._updateMapSelectHandler(e,u,n,a)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=Te(),n=Te(),a=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(v,g){return g&&(v=g(v)),v&&[v[0]*i.scaleX+i.x,v[1]*i.scaleY+i.y]}function f(v){for(var g=[],x=!u&&l&&l.project,y=0;y<v.length;++y){var b=c(v[y],x);b&&g.push(b)}return g}function d(v){return{shape:{points:f(v)}}}a.removeAll(),O(e.geo.regions,function(v){var g=v.name,x=t.get(g),y=n.get(g)||{},b=y.dataIdx,w=y.regionModel;if(!x){x=t.set(g,new De),a.add(x),b=s?s.indexOfName(g):null,w=e.isGeo?o.getRegionModel(g):s?s.getItemModel(b):null;var T=w.get("silent",!0);T!=null&&(x.silent=T),n.set(g,{dataIdx:b,regionModel:w})}var C=[],D=[];O(v.geometries,function(R){if(R.type==="polygon"){var E=[R.exterior].concat(R.interiors||[]);u&&(E=$3(E,u)),O(E,function(I){C.push(new nn(d(I)))})}else{var k=R.points;u&&(k=$3(k,u,!0)),O(k,function(I){D.push(new Fr(d(I)))})}});var M=c(v.getCenter(),l&&l.project);function N(R,E){if(R.length){var k=new Vg({culling:!0,segmentIgnoreThreshold:1,shape:{paths:R}});x.add(k),Y3(e,k,b,w),W3(e,k,g,w,o,b,M),E&&(U3(k),O(k.states,U3))}}N(C),N(D,!0)}),t.each(function(v,g){var x=n.get(g),y=x.dataIdx,b=x.regionModel;X3(e,v,g,b,o,y),q3(e,v,g,b,o),Z3(e,v,g,b,o)},this)},r.prototype._buildSVG=function(e){var t=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(t)&&(this._freeSVG(),this._useSVG(t));var a=this._svgDispatcherMap=Te(),i=!1;O(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,c=o.svgNodeTagLower,f=o.el,d=u?u.indexOfName(s):null,v=l.getRegionModel(s);jhe.get(c)!=null&&f instanceof Oa&&Y3(e,f,d,v),f instanceof Oa&&(f.culling=!0);var g=v.get("silent",!0);if(g!=null&&(f.silent=g),f.z2EmphasisLift=0,!o.namedFrom&&(Vhe.get(c)!=null&&W3(e,f,s,v,l,d,null),X3(e,f,s,v,l,d),q3(e,f,s,v,l),Bhe.get(c)!=null)){var x=Z3(e,f,s,v,l);x==="self"&&(i=!0);var y=a.get(s)||a.set(s,[]);y.push(f)}},this),this._enableBlurEntireSVG(i,e)},r.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var n=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),a=n.opacity;this._svgGraphicRecord.root.traverse(function(i){if(!i.isGroup){fc(i);var o=i.ensureState("blur").style||{};o.opacity==null&&a!=null&&(o.opacity=a),i.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var n=t.coordinateSystem;if(n.resourceType==="geoJSON"){var a=this._regionsGroupByName;if(a){var i=a.get(e);return i?[i]:[]}}else if(n.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},r.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},r.prototype._useSVG=function(e){var t=ts.getGeoResource(e);if(t&&t.type==="geoSVG"){var n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},r.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=ts.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(e,t,n,a){var i=e.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=e.get("scaleLimit"),s.zoom=i.getZoom(),o.enable(e.get("roam")||!1,{api:a,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(c,f,d){return i.containPoint([f,d])},isInClip:function(c,f,d){return!t||t.contain(f,d)}}});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,nN(s,c.dx,c.dy),a.dispatchAction(ie(u(),{dx:c.dx,dy:c.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(c){this._mouseDownFlag=!1,aN(s,c.scale,c.originX,c.originY),a.dispatchAction(ie(u(),{totalZoom:s.zoom,zoom:c.scale,originX:c.originX,originY:c.originY,animation:{duration:0}}))},this)},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=P7(t).ignore)})},r.prototype._updateMapSelectHandler=function(e,t,n,a){var i=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){i._mouseDownFlag=!0}),t.on("click",function(o){i._mouseDownFlag&&(i._mouseDownFlag=!1)}))},r})();function Y3(r,e,t,n){var a=n.getModel("itemStyle"),i=n.getModel(["emphasis","itemStyle"]),o=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=c0(a),u=c0(i),c=c0(s),f=c0(o),d=r.data;if(d){var v=d.getItemVisual(t,"style"),g=d.getItemVisual(t,"decal");r.isVisualEncodedByVisualMap&&v.fill&&(l.fill=v.fill),g&&(l.decal=kh(g,r.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=f,fc(e)}function W3(r,e,t,n,a,i,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),i)),c=s&&s.getItemLayout(i);if(l||u||c&&c.showLabel){var f=l?t:i,d=void 0;(!s||i>=0)&&(d=a);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Lr(e,Sr(n),{labelFetcher:d,labelDataIndex:f,defaultText:t},v);var g=e.getTextContent();if(g&&(P7(g).ignore=g.ignore,e.textConfig&&o)){var x=e.getBoundingRect().clone();e.textConfig.layoutRect=x,e.textConfig.position=[(o[0]-x.x)/x.width*100+"%",(o[1]-x.y)/x.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function X3(r,e,t,n,a,i){r.data?r.data.setItemGraphicEl(i,e):Pe(e).eventData={componentType:"geo",componentIndex:a.componentIndex,geoIndex:a.componentIndex,name:t,region:n&&n.option||{}}}function q3(r,e,t,n,a){r.data||is({el:e,componentModel:a,itemName:t,itemTooltipOption:n.get("tooltip")})}function Z3(r,e,t,n,a){e.highDownSilentOnTouch=!!a.get("selectedMode");var i=n.getModel("emphasis"),o=i.get("focus");return Ut(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&Ene(e,a,t),o}function $3(r,e,t){var n=[],a;function i(){a=[]}function o(){a.length&&(n.push(a),a=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&a.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),O(r,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!t&&s.polygonEnd(),n}var Ghe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){if(!(i&&i.type==="mapToggleSelect"&&i.from===this.uid)){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&i&&i.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),i&&i.type==="geoRoam"&&i.componentType==="series"&&i.seriesId===t.id){var s=this._mapDraw;s&&o.add(s.group)}else if(t.needsDrawMap){var s=this._mapDraw||new z7(a);o.add(s.group),s.draw(t,n,a,this,i),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(t,n,a)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,n,a){var i=t.originalData,o=this.group;i.each(i.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=i.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,f=u.offset,d=new eo({style:{fill:t.getData().getVisual("style").fill},shape:{cx:c[0]+f*9,cy:c[1],r:3},silent:!0,z2:8+(f?0:qh+1)});if(!f){var v=t.mainSeries.getData(),g=i.getName(l),x=v.indexOfName(g),y=i.getItemModel(l),b=y.getModel("label"),w=v.getItemGraphicEl(x);Lr(d,Sr(y),{labelFetcher:{getFormattedLabel:function(T,C){return t.getFormattedLabel(x,C)}},defaultText:g}),d.disableLabelAnimation=!0,b.get("position")||d.setTextConfig({position:"bottom"}),w.onHoverStateChange=function(T){Rx(d,T)}}o.add(d)}}})},e.type="map",e})(_t),Hhe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(n){if(n!=null){var a=this.getData().getName(n),i=this.coordinateSystem,o=i.getRegion(a);return o&&i.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var n=cd(this,{coordDimensions:["value"],encodeDefaulter:He(mD,this)}),a=Te(),i=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);a.set(l,o)}var u=ts.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return O(u.regions,function(c){var f=c.name,d=a.get(f),v=c.properties&&c.properties.echartsStyle,g;d==null?(g={name:f},i.push(g)):g=n.getRawDataItem(d),v&&Ye(g,v)}),n.appendData(i),n},e.prototype.getHostGeoModel=function(){if(AH(this).kind!==Ri.boxCoordSys)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var n=this.getData();return n.get(n.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var n=this.getData();return n.getItemModel(n.indexOfName(t))},e.prototype.formatTooltip=function(t,n,a){for(var i=this.getData(),o=this.getRawValue(t),s=i.getName(t),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var f=l[c].originalData.indexOfName(s),d=i.mapDimension("value");isNaN(l[c].originalData.get(d,f))||u.push(l[c].name)}return pr("section",{header:u.join(", "),noHeader:!u.length,blocks:[pr("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var n=t.icon||"roundRect",a=ur(n,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return a.setStyle(t.itemStyle),a.style.stroke="none",n.indexOf("empty")>-1&&(a.style.stroke=a.style.fill,a.style.fill=ee.color.neutral00,a.style.lineWidth=2),a},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:ee.color.tertiary},itemStyle:{borderWidth:.5,borderColor:ee.color.border,areaColor:ee.color.background},emphasis:{label:{show:!0,color:ee.color.primary},itemStyle:{areaColor:ee.color.highlight}},select:{label:{show:!0,color:ee.color.primary},itemStyle:{color:ee.color.highlight}},nameProperty:"name"},e})(Tt);function Fhe(r,e){var t={};return O(r,function(n){n.each(n.mapDimension("value"),function(a,i){var o="ec-"+n.getName(i);t[o]=t[o]||[],isNaN(a)||t[o].push(a)})}),r[0].map(r[0].mapDimension("value"),function(n,a){for(var i="ec-"+r[0].getName(a),o=0,s=1/0,l=-1/0,u=t[i].length,c=0;c<u;c++)s=Math.min(s,t[i][c]),l=Math.max(l,t[i][c]),o+=t[i][c];var f;return e==="min"?f=s:e==="max"?f=l:e==="average"?f=o/u:f=o,u===0?NaN:f})}function Uhe(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getHostGeoModel(),a=n?"o"+n.id:"i"+t.getMapType();(e[a]=e[a]||[]).push(t)}),O(e,function(t,n){for(var a=Fhe(fe(t,function(o){return o.getData()}),t[0].get("mapValueCalculation")),i=0;i<t.length;i++)t[i].originalData=t[i].getData();for(var i=0;i<t.length;i++)t[i].seriesGroup=t,t[i].needsDrawMap=i===0&&!t[i].getHostGeoModel(),t[i].setData(a.cloneShallow()),t[i].mainSeries=t[0]})}function Yhe(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getMapType();if(!(t.getHostGeoModel()||e[n])){var a={};O(t.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&r.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var f=l.getName(c),d=s.getRegion(f);if(!(!d||isNaN(u))){var v=a[f]||0,g=s.dataToPoint(d.getCenter());a[f]=v+1,l.setItemLayout(c,{point:g,offset:v})}})});var i=t.getData();i.each(function(o){var s=i.getName(o),l=i.getItemLayout(o)||{};l.showLabel=!a[s],i.setItemLayout(o,l)}),e[n]=!0}})}var K3=Qt,Mc=(function(r){K(e,r);function e(t,n){var a=r.call(this)||this;return a.type="view",a.dimensions=["x","y"],a._roamTransformable=new zo,a._rawTransformable=new zo,a.name=t,a._opt=n,a}return e.prototype.setBoundingRect=function(t,n,a,i){return this._rect=new Ie(t,n,a,i),this._updateCenterAndZoom(),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,n,a,i){this._transformTo(t,n,a,i),this._viewRect=new Ie(t,n,a,i)},e.prototype._transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new Ie(t,n,a,i));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t){var n=this._opt;n&&n.api&&n.ecModel&&n.ecModel.getShallow("legacyViewCoordSysCenterBase")&&t&&(t=[me(t[0],n.api.getWidth()),me(t[1],n.api.getWidth())]),this._centerOption=Me(t),this._updateCenterAndZoom()},e.prototype.setZoom=function(t){this._zoom=iN(t||1,this.zoomLimit),this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),n=t.x+t.width/2,a=t.y+t.height/2;return[n,a]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._centerOption,n=this._rect;t&&n&&(this._center=[me(t[0],n.width,n.x),me(t[1],n.height,n.y)]);var a=this._rawTransformable.getLocalTransform(),i=this._roamTransformable,o=this.getDefaultCenter(),s=this.getCenter(),l=this.getZoom();s=Qt([],s,a),o=Qt([],o,a),i.originX=s[0],i.originY=s[1],i.x=o[0]-s[0],i.y=o[1]-s[1],i.scaleX=i.scaleY=l,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,n=this._rawTransformable;n.parent=t,t.updateTransform(),n.updateTransform(),Og(this.transform||(this.transform=[]),n.transform||Dr()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],Ia(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,n=this._roamTransformable,a=new zo;return a.transform=n.transform,a.decomposeTransform(),{roam:{x:a.x,y:a.y,scaleX:a.scaleX,scaleY:a.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,n,a){var i=n?this._rawTransform:this.transform;return a=a||[],i?K3(a,t,i):cn(a,t)},e.prototype.pointToData=function(t,n,a){a=a||[];var i=this.invTransform;return i?K3(a,t,i):(a[0]=t[0],a[1]=t[1],a)},e.prototype.convertToPixel=function(t,n,a){var i=Q3(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=Q3(n);return i===this?i.pointToData(a):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e})(zo);function Q3(r){var e=r.seriesModel;return e?e.coordinateSystem:null}var Whe={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},j7=["lng","lat"],hA=(function(r){K(e,r);function e(t,n,a){var i=r.call(this,t,{api:a.api,ecModel:a.ecModel})||this;i.dimensions=j7,i.type="geo",i._nameCoordMap=Te(),i.map=n;var o=a.projection,s=ts.load(n,a.nameMap,a.nameProperty),l=ts.getGeoResource(n);i.resourceType=l?l.type:null;var u=i.regions=s.regions,c=Whe[l.type];i._regionsMap=s.regionsMap,i.regions=s.regions,i.projection=o;var f;if(o)for(var d=0;d<u.length;d++){var v=u[d].getBoundingRect(o);f=f||v.clone(),f.union(v)}else f=s.boundingRect;return i.setBoundingRect(f.x,f.y,f.width,f.height),i.aspectScale=o?1:Ce(a.aspectScale,c.aspectScale),i._invertLongitute=o?!1:c.invertLongitute,i}return e.prototype._transformTo=function(t,n,a,i){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 Ie(t,n,a,i));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var n=this.regions,a=0;a<n.length;a++){var i=n[a];if(i.type==="geoJSON"&&i.contain(t))return n[a]}},e.prototype.addGeoCoord=function(t,n){this._nameCoordMap.set(t,n)},e.prototype.getGeoCoord=function(t){var n=this._regionsMap.get(t);return this._nameCoordMap.get(t)||n&&n.getCenter()},e.prototype.dataToPoint=function(t,n,a){if(ye(t)&&(t=this.getGeoCoord(t)),t){var i=this.projection;return i&&(t=i.project(t)),t&&this.projectedToPoint(t,n,a)}},e.prototype.pointToData=function(t,n,a){var i=this.projection;return i&&(t=i.unproject(t)),t&&this.pointToProjected(t,a)},e.prototype.pointToProjected=function(t,n){return r.prototype.pointToData.call(this,t,0,n)},e.prototype.projectedToPoint=function(t,n,a){return r.prototype.dataToPoint.call(this,t,n,a)},e.prototype.convertToPixel=function(t,n,a){var i=J3(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=J3(n);return i===this?i.pointToData(a):null},e})(Mc);Jt(hA,Mc);function J3(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",Zt).models[0]||{}).coordinateSystem:null}function ez(r,e){var t=r.get("boundingCoords");if(t!=null){var n=t[0],a=t[1];if(isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])){var i=this.projection;if(i){var o=n[0],s=n[1],l=a[0],u=a[1];n=[1/0,1/0],a=[-1/0,-1/0];var c=function(D,M,N,R){for(var E=N-D,k=R-M,I=0;I<=100;I++){var z=I/100,P=i.project([D+E*z,M+k*z]);Oo(n,n,P),Po(a,a,P)}};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],a[0]-n[0],a[1]-n[1])}}var f=this.getBoundingRect(),d=r.get("layoutCenter"),v=r.get("layoutSize"),g=wr(r,e).refContainer,x=f.width/f.height*this.aspectScale,y=!1,b,w;d&&v&&(b=[me(d[0],g.width)+g.x,me(d[1],g.height)+g.y],w=me(v,Math.min(g.width,g.height)),!isNaN(b[0])&&!isNaN(b[1])&&!isNaN(w)&&(y=!0));var T;if(y)T={},x>1?(T.width=w,T.height=w/x):(T.height=w,T.width=w*x),T.y=b[1]-T.height/2,T.x=b[0]-T.width/2;else{var C=r.getBoxLayoutParams();C.aspect=x,T=Ht(C,g),T=RH(r,T,x)}this.setViewRect(T.x,T.y,T.width,T.height),this.setCenter(r.get("center")),this.setZoom(r.get("zoom"))}function Xhe(r,e){O(e.get("geoCoord"),function(t,n){r.addGeoCoord(n,t)})}var qhe=(function(){function r(){this.dimensions=j7}return r.prototype.create=function(e,t){var n=[];function a(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 hA(l+s,l,ie({nameMap:o.get("nameMap"),api:t,ecModel:e},a(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=ez,u.resize(o,t)}),e.eachSeries(function(o){Fg({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Zt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),O(i,function(o,s){var l=fe(o,function(c){return c.get("nameMap")}),u=new hA(s,s,ie({nameMap:O1(l),api:t,ecModel:e},a(o[0])));u.zoomLimit=Hr.apply(null,fe(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=ez,u.resize(o[0],t),O(o,function(c){c.coordinateSystem=u,Xhe(u,c)})}),n},r.prototype.getFilledRegions=function(e,t,n,a){for(var i=(e||[]).slice(),o=Te(),s=0;s<i.length;s++)o.set(i[s].name,i[s]);var l=ts.load(t,n,a);return O(l.regions,function(u){var c=u.name,f=o.get(c),d=u.properties&&u.properties.echartsStyle;f||(f={name:c},i.push(f)),d&&Ye(f,d)}),i},r})(),B7=new qhe,Zhe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a);var i=ts.getGeoResource(t.map);if(i&&i.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color=t.defaultItemStyleColor||ee.color.backgroundTint)}lc(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,n=this.option;n.regions=B7.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var a={};this._optionModelMap=ka(n.regions||[],function(i,o){var s=o.name;return s&&(i.set(s,new et(o,t,t.ecModel)),o.selected&&(a[s]=!0)),i},Te()),n.selectedMap||(n.selectedMap=a)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new et(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,n){var a=this.getRegionModel(t),i=n==="normal"?a.get(["label","formatter"]):a.get(["emphasis","label","formatter"]),o={name:t};if(Ae(i))return o.status=n,i(o);if(ye(i))return i.replace("{a}",t??"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var n=this.option,a=n.selectedMode;if(a){a!=="multiple"&&(n.selectedMap=null);var i=n.selectedMap||(n.selectedMap={});i[t]=!0}},e.prototype.unSelect=function(t){var n=this.option.selectedMap;n&&(n[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var n=this.option.selectedMap;return!!(n&&n[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:ee.color.tertiary},itemStyle:{borderWidth:.5,borderColor:ee.color.border},emphasis:{label:{show:!0,color:ee.color.primary},itemStyle:{color:ee.color.highlight}},select:{label:{show:!0,color:ee.color.primary},itemStyle:{color:ee.color.highlight}},regions:[]},e})(Qe),$he=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,n){this._api=n},e.prototype.render=function(t,n,a,i){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new z7(a));var o=this._mapDraw;o.draw(t,n,a,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,n,a)},e.prototype._handleRegionClick=function(t){var n;Vu(t.target,function(a){return(n=Pe(a).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},e.prototype.updateSelectStatus=function(t,n,a){var i=this;this._mapDraw.group.traverse(function(o){var s=Pe(o).eventData;if(s)return i._model.isSelected(s.name)?a.enterSelect(o):a.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e})(Rt);function Khe(r,e,t){ts.registerMap(r,e,t)}function V7(r){r.registerCoordinateSystem("geo",B7),r.registerComponentModel(Zhe),r.registerComponentView($he),r.registerImpl("registerMap",Khe),r.registerImpl("getMap",function(t){return ts.getMapForUser(t)});function e(t,n){n.update="geo:updateSelectStatus",r.registerAction(n,function(a,i){var o={},s=[];return i.eachComponent({mainType:"geo",query:a},function(l){l[t](a.name);var u=l.coordinateSystem;O(u.regions,function(f){o[f.name]=l.isSelected(f.name)||!1});var c=[];O(o,function(f,d){o[d]&&c.push(d)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:a.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,n,a){var i=t.componentType;i||(t.geoId!=null?i="geo":t.seriesId!=null&&(i="series")),i||(i="series"),n.eachComponent({mainType:i,query:t},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=fb(s,t,o.get("scaleLimit"));o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),i==="series"&&O(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function Qhe(r){We(V7),r.registerChartView(Ghe),r.registerSeriesModel(Hhe),r.registerLayout(Yhe),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Uhe),_8("map",r.registerAction)}function Jhe(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],n,a;n=t.pop();)if(a=n.children,n.isExpand&&a.length)for(var i=a.length,o=i-1;o>=0;o--){var s=a[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function ede(r,e){var t=r.isExpand?r.children:[],n=r.parentNode.children,a=r.hierNode.i?n[r.hierNode.i-1]:null;if(t.length){rde(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;a?(r.hierNode.prelim=a.hierNode.prelim+e(r,a),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else a&&(r.hierNode.prelim=a.hierNode.prelim+e(r,a));r.parentNode.hierNode.defaultAncestor=nde(r,a,r.parentNode.hierNode.defaultAncestor||n[0],e)}function tde(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function tz(r){return arguments.length?r:ode}function dp(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function rde(r){for(var e=r.children,t=e.length,n=0,a=0;--t>=0;){var i=e[t];i.hierNode.prelim+=n,i.hierNode.modifier+=n,a+=i.hierNode.change,n+=i.hierNode.shift+a}}function nde(r,e,t,n){if(e){for(var a=r,i=r,o=i.parentNode.children[0],s=e,l=a.hierNode.modifier,u=i.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=cT(s),i=fT(i),s&&i;){a=cT(a),o=fT(o),a.hierNode.ancestor=r;var d=s.hierNode.prelim+f-i.hierNode.prelim-u+n(s,i);d>0&&(ide(ade(s,r,t),r,d),u+=d,l+=d),f+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=a.hierNode.modifier,c+=o.hierNode.modifier}s&&!cT(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=f-l),i&&!fT(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-c,t=r)}return t}function cT(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function fT(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function ade(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function ide(r,e,t){var n=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=n}function ode(r,e){return r.parentNode===e.parentNode?1:2}var sde=(function(){function r(){this.parentPoint=[],this.childPoints=[]}return r})(),lde=(function(r){K(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:ee.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new sde},e.prototype.buildPath=function(t,n){var a=n.childPoints,i=a.length,o=n.parentPoint,s=a[0],l=a[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,d=me(n.forkPosition,1),v=[];v[c]=o[c],v[f]=o[f]+(l[f]-o[f])*d,t.moveTo(o[0],o[1]),t.lineTo(v[0],v[1]),t.moveTo(s[0],s[1]),v[c]=s[c],t.lineTo(v[0],v[1]),v[c]=l[c],t.lineTo(v[0],v[1]),t.lineTo(l[0],l[1]);for(var g=1;g<i-1;g++){var x=a[g];t.moveTo(x[0],x[1]),v[c]=x[c],t.lineTo(v[0],v[1])}},e})(tt),ude=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new De,t}return e.prototype.init=function(t,n){this._controller=new Ac(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,n,a){var i=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(t,a),this._updateController(t,null,n,a);var u=this._data;i.diff(u).add(function(c){rz(i,c)&&nz(i,c,null,s,t)}).update(function(c,f){var d=u.getItemGraphicEl(f);if(!rz(i,c)){d&&iz(u,f,d,s,t);return}nz(i,c,d,s,t)}).remove(function(c){var f=u.getItemGraphicEl(c);f&&iz(u,c,f,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(c,f){c.off("click").on("click",function(){a.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:f})})}),this._data=i},e.prototype._updateViewCoordSys=function(t,n){var a=t.getData(),i=[];a.each(function(f){var d=a.getItemLayout(f);d&&!isNaN(d.x)&&!isNaN(d.y)&&i.push([+d.x,+d.y])});var o=[],s=[];W1(i,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=t.coordinateSystem=new Mc(null,{api:n,ecModel:t.ecModel});c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(t.get("center")),c.setZoom(t.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(t,n,a,i){var o=this;R7(t,i,this.group,this._controller,this._controllerHost,n),this._controller.on("zoom",function(s){o._updateNodeAndLinkScale(t)})},e.prototype._updateNodeAndLinkScale=function(t){var n=t.getData(),a=this._getNodeGlobalScale(t);n.eachItemGraphicEl(function(i,o){i.setSymbolScale(a)})},e.prototype._getNodeGlobalScale=function(t){var n=t.coordinateSystem;if(n.type!=="view")return 1;var a=this._nodeScaleRatio,i=n.scaleX||1,o=n.getZoom(),s=(o-1)*a+1;return s/i},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})(_t);function rz(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function nz(r,e,t,n,a){var i=!t,o=r.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:ee.color.neutral00,c=r.tree.root,f=o.parentNode===c?o:o.parentNode||o,d=r.getItemGraphicEl(f.dataIndex),v=f.getLayout(),g=d?{x:d.__oldX,y:d.__oldY,rawX:d.__radialOldRawX,rawY:d.__radialOldRawY}:v,x=o.getLayout();i?(t=new Wg(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=g.x,t.y=g.y):t.updateData(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=x.rawX,t.__radialRawY=x.rawY,n.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,lt(t,{x:x.x,y:x.y},a);var y=t.getSymbolPath();if(a.get("layout")==="radial"){var b=c.children[0],w=b.getLayout(),T=b.children.length,C=void 0,D=void 0;if(x.x===w.x&&o.isExpand===!0&&b.children.length){var M={x:(b.children[0].getLayout().x+b.children[T-1].getLayout().x)/2,y:(b.children[0].getLayout().y+b.children[T-1].getLayout().y)/2};C=Math.atan2(M.y-w.y,M.x-w.x),C<0&&(C=Math.PI*2+C),D=M.x<w.x,D&&(C=C-Math.PI)}else C=Math.atan2(x.y-w.y,x.x-w.x),C<0&&(C=Math.PI*2+C),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(D=x.x<w.x,D&&(C=C-Math.PI)):(D=x.x>w.x,D||(C=C-Math.PI));var N=D?"left":"right",R=s.getModel("label"),E=R.get("rotate"),k=E*(Math.PI/180),I=y.getTextContent();I&&(y.setTextConfig({position:R.get("position")||N,rotation:E==null?-C:k,origin:"center"}),I.setStyle("verticalAlign","middle"))}var z=s.get(["emphasis","focus"]),P=z==="relative"?Ch(o.getAncestorsIndices(),o.getDescendantIndices()):z==="ancestor"?o.getAncestorsIndices():z==="descendant"?o.getDescendantIndices():null;P&&(Pe(t).focus=P),cde(a,o,c,t,g,v,x,n),t.__edge&&(t.onHoverStateChange=function(G){if(G!=="blur"){var U=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);U&&U.hoverState===zg||Rx(t.__edge,G)}})}function cde(r,e,t,n,a,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),f=r.getOrient(),d=r.get(["lineStyle","curveness"]),v=r.get("edgeForkPosition"),g=l.getModel("lineStyle").getLineStyle(),x=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(x||(x=n.__edge=new $h({shape:dA(c,f,d,a,a)})),lt(x,{shape:dA(c,f,d,i,o)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var y=e.children,b=[],w=0;w<y.length;w++){var T=y[w].getLayout();b.push([T.x,T.y])}x||(x=n.__edge=new lde({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:f,forkPosition:v}})),lt(x,{shape:{parentPoint:[o.x,o.y],childPoints:b}},r)}x&&!(u==="polyline"&&!e.isExpand)&&(x.useStyle(Le({strokeNoScale:!0,fill:null},g)),_r(x,l,"lineStyle"),fc(x),s.add(x))}function az(r,e,t,n,a){var i=e.tree.root,o=G7(i,r),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(u){var c=e.getItemGraphicEl(s.dataIndex),f=c.__edge,d=u.__edge||(s.isExpand===!1||s.children.length===1?f:void 0),v=n.get("edgeShape"),g=n.get("layout"),x=n.get("orient"),y=n.get(["lineStyle","curveness"]);d&&(v==="curve"?_l(d,{shape:dA(g,x,y,l,l),style:{opacity:0}},n,{cb:function(){t.remove(d)},removeOpt:a}):v==="polyline"&&n.get("layout")==="orthogonal"&&_l(d,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){t.remove(d)},removeOpt:a}))}}function G7(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,n;n=t.getLayout(),n==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:n}}function iz(r,e,t,n,a){var i=r.tree.getNodeByDataIndex(e),o=r.tree.root,s=G7(o,i).sourceLayout,l={duration:a.get("animationDurationUpdate"),easing:a.get("animationEasingUpdate")};_l(t,{x:s.x+1,y:s.y+1},a,{cb:function(){n.remove(t),r.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),i.children.forEach(function(u){az(u,r,n,a,l)}),az(i,r,n,a,l)}function dA(r,e,t,n,a){var i,o,s,l,u,c,f,d;if(r==="radial"){u=n.rawX,f=n.rawY,c=a.rawX,d=a.rawY;var v=dp(u,f),g=dp(u,f+(d-f)*t),x=dp(c,d+(f-d)*t),y=dp(c,d);return{x1:v.x||0,y1:v.y||0,x2:y.x||0,y2:y.y||0,cpx1:g.x||0,cpy1:g.y||0,cpx2:x.x||0,cpy2:x.y||0}}else u=n.x,f=n.y,c=a.x,d=a.y,(e==="LR"||e==="RL")&&(i=u+(c-u)*t,o=f,s=c+(u-c)*t,l=d),(e==="TB"||e==="BT")&&(i=u,o=f+(d-f)*t,s=c,l=d+(f-d)*t);return{x1:u,y1:f,x2:c,y2:d,cpx1:i,cpy1:o,cpx2:s,cpy2:l}}var Ea=Je();function H7(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,F7(e,t,r),O(t,function(n){O(e.TRANSFERABLE_METHODS,function(a){n.wrapMethod(a,He(fde,r))})}),e.wrapMethod("cloneShallow",He(dde,r)),O(e.CHANGABLE_METHODS,function(n){e.wrapMethod(n,He(hde,r))}),tn(t[e.dataType]===e)}function fde(r,e){if(gde(this)){var t=ie({},Ea(this).datas);t[this.dataType]=e,F7(e,t,r)}else sN(e,this.dataType,Ea(this).mainData,r);return e}function hde(r,e){return r.struct&&r.struct.update(),e}function dde(r,e){return O(Ea(e).datas,function(t,n){t!==e&&sN(t.cloneShallow(),n,e,r)}),e}function vde(r){var e=Ea(this).mainData;return r==null||e==null?e:Ea(e).datas[r]}function pde(){var r=Ea(this).mainData;return r==null?[{data:r}]:fe(it(Ea(r).datas),function(e){return{type:e,data:Ea(r).datas[e]}})}function gde(r){return Ea(r).mainData===r}function F7(r,e,t){Ea(r).datas={},O(e,function(n,a){sN(n,a,r,t)})}function sN(r,e,t,n){Ea(t).datas[e]=r,Ea(r).mainData=t,r.dataType=e,n.struct&&(r[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=r),r.getLinkedData=vde,r.getLinkedDataAll=pde}var mde=(function(){function r(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(e,t,n){Ae(e)&&(n=t,t=e,e=null),e=e||{},ye(e)&&(e={order:e});var a=e.order||"preorder",i=this[e.attr||"children"],o;a==="preorder"&&(o=t.call(n,this));for(var s=0;!o&&s<i.length;s++)i[s].eachNode(e,t,n);a==="postorder"&&t.call(n,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var a=this.children[n];a.updateDepthAndHeight(e+1),a.height>t&&(t=a.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,a=n.length;t<a;t++){var i=n[t].getNodeById(e);if(i)return i}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,a=n.length;t<a;t++){var i=n[t].contains(e);if(i)return i}},r.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},r.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},r.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},r.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},r.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},r.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},r.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},r})(),lN=(function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},r.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},r.prototype.getNodeById=function(e){return this.root.getNodeById(e)},r.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,a=t.length;n<a;n++)t[n].dataIndex=-1;for(var n=0,a=e.count();n<a;n++)t[e.getRawIndex(n)].dataIndex=n},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,n){var a=new r(t),i=[],o=1;s(e);function s(c,f){var d=c.value;o=Math.max(o,ce(d)?d.length:1),i.push(c);var v=new mde(xr(c.name,""),a);f?yde(v,f):a.root=v,a._nodes.push(v);var g=c.children;if(g)for(var x=0;x<g.length;x++)s(g[x],v)}a.root.updateDepthAndHeight(0);var l=od(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new vn(l,t);return u.initData(i),n&&n(u),H7({mainData:u,struct:a,structAttr:"tree"}),a.update(),a},r})();function yde(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}function hg(r,e,t){if(r&&Fe(e,r.type)>=0){var n=t.getData().tree.root,a=r.targetNode;if(ye(a)&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var i=r.targetNodeId;if(i!=null&&(a=n.getNodeById(i)))return{node:a}}}function U7(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function uN(r,e){var t=U7(r);return Fe(t,e)>=0}function db(r,e){for(var t=[];r;){var n=r.dataIndex;t.push({name:r.name,dataIndex:n,value:e.getRawValue(n)}),r=r.parentNode}return t.reverse(),t}var xde=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var n={name:t.name,children:t.data},a=t.leaves||{},i=new et(a,this,this.ecModel),o=lN.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(d,v){var g=o.getNodeByDataIndex(v);return g&&g.children.length&&g.isExpand||(d.parentModel=i),d})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var d=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=d&&d.collapsed!=null?!d.collapsed:f.depth<=c}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,n,a){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return pr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=db(a,this),n.collapsed=!a.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:ee.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e})(Tt);function bde(r,e,t){for(var n=[r],a=[],i;i=n.pop();)if(a.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;i=a.pop();)e(i,t)}function Vv(r,e){for(var t=[r],n;n=t.pop();)if(e(n),n.isExpand){var a=n.children;if(a.length)for(var i=a.length-1;i>=0;i--)t.push(a[i])}}function _de(r,e){r.eachSeriesByType("tree",function(t){Sde(t,e)})}function Sde(r,e){var t=wr(r,e).refContainer,n=Ht(r.getBoxLayoutParams(),t);r.layoutInfo=n;var a=r.get("layout"),i=0,o=0,s=null;a==="radial"?(i=2*Math.PI,o=Math.min(n.height,n.width)/2,s=tz(function(C,D){return(C.parentNode===D.parentNode?1:2)/C.depth})):(i=n.width,o=n.height,s=tz());var l=r.getData().tree.root,u=l.children[0];if(u){Jhe(l),bde(u,ede,s),l.hierNode.modifier=-u.hierNode.prelim,Vv(u,tde);var c=u,f=u,d=u;Vv(u,function(C){var D=C.getLayout().x;D<c.getLayout().x&&(c=C),D>f.getLayout().x&&(f=C),C.depth>d.depth&&(d=C)});var v=c===f?1:s(c,f)/2,g=v-c.getLayout().x,x=0,y=0,b=0,w=0;if(a==="radial")x=i/(f.getLayout().x+v+g),y=o/(d.depth-1||1),Vv(u,function(C){b=(C.getLayout().x+g)*x,w=(C.depth-1)*y;var D=dp(b,w);C.setLayout({x:D.x,y:D.y,rawX:b,rawY:w},!0)});else{var T=r.getOrient();T==="RL"||T==="LR"?(y=o/(f.getLayout().x+v+g),x=i/(d.depth-1||1),Vv(u,function(C){w=(C.getLayout().x+g)*y,b=T==="LR"?(C.depth-1)*x:i-(C.depth-1)*x,C.setLayout({x:b,y:w},!0)})):(T==="TB"||T==="BT")&&(x=i/(f.getLayout().x+v+g),y=o/(d.depth-1||1),Vv(u,function(C){b=(C.getLayout().x+g)*x,w=T==="TB"?(C.depth-1)*y:o-(C.depth-1)*y,C.setLayout({x:b,y:w},!0)}))}}}function wde(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),n=t.tree;n.eachNode(function(a){var i=a.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(a.dataIndex,"style");ie(s,o)})})}function Tde(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var a=e.dataIndex,i=n.getData().tree,o=i.getNodeByDataIndex(a);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var i=a.coordinateSystem,o=fb(i,e,a.get("scaleLimit"));a.setCenter(o.center),a.setZoom(o.zoom)})})}function Cde(r){r.registerChartView(ude),r.registerSeriesModel(xde),r.registerLayout(_de),r.registerVisual(wde),Tde(r)}var oz=["treemapZoomToNode","treemapRender","treemapMove"];function Ade(r){for(var e=0;e<oz.length;e++)r.registerAction({type:oz[e],update:"updateView"},Kt);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,n){n.eachComponent({mainType:"series",subType:"treemap",query:t},a);function a(i,o){var s=["treemapZoomToNode","treemapRootToNode"],l=hg(t,s,i);if(l){var u=i.getViewRoot();u&&(t.direction=uN(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function Y7(r){var e=r.getData(),t=e.tree,n={};t.eachNode(function(a){for(var i=a;i&&i.depth>1;)i=i.parentNode;var o=LC(r.ecModel,i.name||i.dataIndex+"",n);a.setVisual("decal",o)})}var Mde=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};W7(a);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new et({itemStyle:o},this,n);i=t.levels=Dde(i,n);var l=fe(i||[],function(f){return new et(f,s,n)},this),u=lN.createTree(a,this,c);function c(f){f.wrapMethod("getItemModel",function(d,v){var g=u.getNodeByDataIndex(v),x=g?l[g.depth]:null;return d.parentModel=x||s,d})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return pr("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=db(a,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},ie(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var n=this._idIndexMap;n||(n=this._idIndexMap=Te(),this._idIndexMapCount=0);var a=n.get(t);return a==null&&n.set(t,a=this._idIndexMapCount++),a},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){Y7(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:ee.size.l,top:ee.size.xxxl,right:ee.size.l,bottom:ee.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:ee.size.m,emptyItemWidth:25,itemStyle:{color:ee.color.backgroundShade,textStyle:{color:ee.color.secondary}},emphasis:{itemStyle:{color:ee.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:ee.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:ee.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})(Tt);function W7(r){var e=0;O(r.children,function(n){W7(n);var a=n.value;ce(a)&&(a=a[0]),e+=a});var t=r.value;ce(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),ce(r.value)?r.value[0]=t:r.value=t}function Dde(r,e){var t=Lt(e.get("color")),n=Lt(e.get(["aria","decal","decals"]));if(t){r=r||[];var a,i;O(r,function(s){var l=new et(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(a=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return a||(o.color=t.slice()),!i&&n&&(o.decal=n.slice()),r}}var Nde=8,sz=8,hT=5,Lde=(function(){function r(e){this.group=new De,e.add(this.group)}return r.prototype.render=function(e,t,n,a){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!n)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f=wr(e,t).refContainer,d={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},v={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},g=Ht(d,f);this._prepare(n,v,u),this._renderContent(e,v,g,s,l,u,c,a),eb(o,d,f)}},r.prototype._prepare=function(e,t,n){for(var a=e;a;a=a.parentNode){var i=xr(a.getModel().get("name"),""),o=n.getTextRect(i),s=Math.max(o.width+Nde*2,t.emptyItemWidth);t.totalWidth+=s+sz,t.renderList.push({node:a,text:i,width:s})}},r.prototype._renderContent=function(e,t,n,a,i,o,s,l){for(var u=0,c=t.emptyItemWidth,f=e.get(["breadcrumb","height"]),d=t.totalWidth,v=t.renderList,g=i.getModel("itemStyle").getItemStyle(),x=v.length-1;x>=0;x--){var y=v[x],b=y.node,w=y.width,T=y.text;d>n.width&&(d-=w-c,w=c,T=null);var C=new nn({shape:{points:Rde(u,0,w,f,x===v.length-1,x===0)},style:Le(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new ot({style:Nt(o,{text:T})}),textConfig:{position:"inside"},z2:qh*1e4,onclick:He(l,b)});C.disableLabelAnimation=!0,C.getTextContent().ensureState("emphasis").style=Nt(s,{text:T}),C.ensureState("emphasis").style=g,Ut(C,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(C),Ede(C,e,b),u+=w+sz}},r.prototype.remove=function(){this.group.removeAll()},r})();function Rde(r,e,t,n,a,i){var o=[[a?r:r-hT,e],[r+t,e],[r+t,e+n],[a?r:r-hT,e+n]];return!i&&o.splice(2,0,[r+t+hT,e+n/2]),!a&&o.push([r,e+n/2]),o}function Ede(r,e,t){Pe(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&db(t,e)}}var kde=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,n,a,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:a,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},a=0,i=this._storage.length;a<i;a++){var o=this._storage[a];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},r})();function Ide(){return new kde}var vA=De,lz=qe,uz=3,cz="label",fz="upperLabel",Ode=qh*10,Pde=qh*2,zde=qh*3,Mu=cc([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),hz=function(r){var e=Mu(r);return e.stroke=e.fill=e.lineWidth=null,e},i1=Je(),jde=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=Gv(),t}return e.prototype.render=function(t,n,a,i){var o=n.findComponents({mainType:"series",subType:"treemap",query:i});if(!(Fe(o,t)<0)){this.seriesModel=t,this.api=a,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=hg(i,s,t),u=i&&i.type,c=t.layoutInfo,f=!this._oldTree,d=this._storage,v=u==="treemapRootToNode"&&l&&d?{rootNodeGroup:d.nodeGroup[l.node.getRawIndex()],direction:i.direction}:null,g=this._giveContainerGroup(c),x=t.get("animation"),y=this._doRender(g,t,v);x&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(g,y,t,v):y.renderFinally(),this._resetController(a),this._renderBreadcrumb(t,a,l)}},e.prototype._giveContainerGroup=function(t){var n=this._containerGroup;return n||(n=this._containerGroup=new vA,this._initEvents(n),this.group.add(n)),n.x=t.x,n.y=t.y,n},e.prototype._doRender=function(t,n,a){var i=n.getData().tree,o=this._oldTree,s=Gv(),l=Gv(),u=this._storage,c=[];function f(w,T,C,D){return Bde(n,l,u,a,s,c,w,T,C,D)}x(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var d=y(u);if(this._oldTree=i,this._storage=l,this._controllerHost){var v=this.seriesModel.layoutInfo,g=i.root.getLayout();g.width===v.width&&g.height===v.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:d,renderFinally:b};function x(w,T,C,D,M){D?(T=w,O(w,function(E,k){!E.isRemoved()&&R(k,k)})):new Qo(T,w,N,N).add(R).update(R).remove(He(R,null)).execute();function N(E){return E.getId()}function R(E,k){var I=E!=null?w[E]:null,z=k!=null?T[k]:null,P=f(I,z,C,M);P&&x(I&&I.viewChildren||[],z&&z.viewChildren||[],P,D,M+1)}}function y(w){var T=Gv();return w&&O(w,function(C,D){var M=T[D];O(C,function(N){N&&(M.push(N),i1(N).willDelete=!0)})}),T}function b(){O(d,function(w){O(w,function(T){T.parent&&T.parent.remove(T)})}),O(c,function(w){w.invisible=!0,w.dirty()})}},e.prototype._doAnimation=function(t,n,a,i){var o=a.get("animationDurationUpdate"),s=a.get("animationEasing"),l=(Ae(o)?0:o)||0,u=(Ae(s)?null:s)||"cubicOut",c=Ide();O(n.willDeleteEls,function(f,d){O(f,function(v,g){if(!v.invisible){var x=v.parent,y,b=i1(x);if(i&&i.direction==="drillDown")y=x===i.rootNodeGroup?{shape:{x:0,y:0,width:b.nodeWidth,height:b.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var w=0,T=0;b.willDelete||(w=b.nodeWidth/2,T=b.nodeHeight/2),y=d==="nodeGroup"?{x:w,y:T,style:{opacity:0}}:{shape:{x:w,y:T,width:0,height:0},style:{opacity:0}}}y&&c.add(v,y,l,0,u)}})}),O(this._storage,function(f,d){O(f,function(v,g){var x=n.lastsForAnimation[d][g],y={};x&&(v instanceof De?x.oldX!=null&&(y.x=v.x,y.y=v.y,v.x=x.oldX,v.y=x.oldY):(x.oldShape&&(y.shape=ie({},v.shape),v.setShape(x.oldShape)),x.fadein?(v.setStyle("opacity",0),y.style={opacity:1}):v.style.opacity!==1&&(y.style={opacity:1})),c.add(v,y,l,0,u))})},this),this._state="animating",c.finished(xe(function(){this._state="ready",n.renderFinally()},this)).start()},e.prototype._resetController=function(t){var n=this,a=this._controller,i=this._controllerHost;i||(this._controllerHost={target:this.group},i=this._controllerHost);var o=this.seriesModel;a||(a=this._controller=new Ac(t.getZr()),a.on("pan",xe(this._onPan,this)),a.on("zoom",xe(this._onZoom,this))),a.enable(o.get("roam"),{api:t,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}}}),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.get("zoom")},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>uz||Math.abs(t.dy)>uz)){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x+t.dx,y:a.y+t.dy,width:a.width,height:a.height}})}},e.prototype._onZoom=function(t){var n=t.originX,a=t.originY,i=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Ie(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=i,u){var d=u.min||0,v=u.max||1/0;f=Math.max(Math.min(v,f),d)}var g=f/c.zoom;c.zoom=f;var x=this.seriesModel.layoutInfo;n-=x.x,a-=x.y;var y=Dr();ai(y,y,[-n,-a]),j1(y,y,[g,g]),ai(y,y,[n,a]),l.applyTransform(y),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var n=this;t.on("click",function(a){if(n._state==="ready"){var i=n.seriesModel.get("nodeClick",!0);if(i){var o=n.findTarget(a.offsetX,a.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(i==="zoomToNode")n._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&Ox(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,n,a){var i=this;a||(a=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),a||(a={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Lde(this.group))).render(t,n,a.node,function(o){i._state!=="animating"&&(uN(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Gv(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,n){var a,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,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)a={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),a},e.type="treemap",e})(_t);function Gv(){return{nodeGroup:[],background:[],content:[]}}function Bde(r,e,t,n,a,i,o,s,l,u){if(!o)return;var c=o.getLayout(),f=r.getData(),d=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var v=c.width,g=c.height,x=c.borderWidth,y=c.invisible,b=o.getRawIndex(),w=s&&s.getRawIndex(),T=o.viewChildren,C=c.upperHeight,D=T&&T.length,M=d.getModel("itemStyle"),N=d.getModel(["emphasis","itemStyle"]),R=d.getModel(["blur","itemStyle"]),E=d.getModel(["select","itemStyle"]),k=M.get("borderRadius")||0,I=ge("nodeGroup",vA);if(!I)return;if(l.add(I),I.x=c.x||0,I.y=c.y||0,I.markRedraw(),i1(I).nodeWidth=v,i1(I).nodeHeight=g,c.isAboveViewRoot)return I;var z=ge("background",lz,u,Pde);z&&V(I,z,D&&c.upperLabelHeight);var P=d.getModel("emphasis"),G=P.get("focus"),U=P.get("blurScope"),B=P.get("disabled"),F=G==="ancestor"?o.getAncestorsIndices():G==="descendant"?o.getDescendantIndices():G;if(D)Kp(I)&&ju(I,!1),z&&(ju(z,!B),f.setItemGraphicEl(o.dataIndex,z),xC(z,F,U));else{var H=ge("content",lz,u,zde);H&&W(I,H),z.disableMorphing=!0,z&&Kp(z)&&ju(z,!1),ju(I,!B),f.setItemGraphicEl(o.dataIndex,I);var X=d.getShallow("cursor");X&&H.attr("cursor",X),xC(I,F,U)}return I;function V(be,we,ze){var oe=Pe(we);if(oe.dataIndex=o.dataIndex,oe.seriesIndex=r.seriesIndex,we.setShape({x:0,y:0,width:v,height:g,r:k}),y)$(we);else{we.invisible=!1;var pe=o.getVisual("style"),je=pe.stroke,Ne=hz(M);Ne.fill=je;var at=Mu(N);at.fill=N.get("borderColor");var ft=Mu(R);ft.fill=R.get("borderColor");var Ct=Mu(E);if(Ct.fill=E.get("borderColor"),ze){var Yr=v-2*x;te(we,je,pe.opacity,{x,y:0,width:Yr,height:C})}else we.removeTextContent();we.setStyle(Ne),we.ensureState("emphasis").style=at,we.ensureState("blur").style=ft,we.ensureState("select").style=Ct,fc(we)}be.add(we)}function W(be,we){var ze=Pe(we);ze.dataIndex=o.dataIndex,ze.seriesIndex=r.seriesIndex;var oe=Math.max(v-2*x,0),pe=Math.max(g-2*x,0);if(we.culling=!0,we.setShape({x,y:x,width:oe,height:pe,r:k}),y)$(we);else{we.invisible=!1;var je=o.getVisual("style"),Ne=je.fill,at=hz(M);at.fill=Ne,at.decal=je.decal;var ft=Mu(N),Ct=Mu(R),Yr=Mu(E);te(we,Ne,je.opacity,null),we.setStyle(at),we.ensureState("emphasis").style=ft,we.ensureState("blur").style=Ct,we.ensureState("select").style=Yr,fc(we)}be.add(we)}function $(be){!be.invisible&&i.push(be)}function te(be,we,ze,oe){var pe=d.getModel(oe?fz:cz),je=xr(d.get("name"),null),Ne=pe.getShallow("show");Lr(be,Sr(d,oe?fz:cz),{defaultText:Ne?je:null,inheritColor:we,defaultOpacity:ze,labelFetcher:r,labelDataIndex:o.dataIndex});var at=be.getTextContent();if(at){var ft=at.style,Ct=Eg(ft.padding||0);oe&&(be.setTextConfig({layoutRect:oe}),at.disableLabelLayout=!0),at.beforeUpdate=function(){var er=Math.max((oe?oe.width:be.shape.width)-Ct[1]-Ct[3],0),ui=Math.max((oe?oe.height:be.shape.height)-Ct[0]-Ct[2],0);(ft.width!==er||ft.height!==ui)&&at.setStyle({width:er,height:ui})},ft.truncateMinChar=2,ft.lineOverflow="truncate",ue(ft,oe,c);var Yr=at.getState("emphasis");ue(Yr?Yr.style:null,oe,c)}}function ue(be,we,ze){var oe=be?be.text:null;if(!we&&ze.isLeafRoot&&oe!=null){var pe=r.get("drillDownIcon",!0);be.text=pe?pe+" "+oe:oe}}function ge(be,we,ze,oe){var pe=w!=null&&t[be][w],je=a[be];return pe?(t[be][w]=null,Se(je,pe)):y||(pe=new we,pe instanceof Oa&&(pe.z2=Vde(ze,oe)),Xe(je,pe)),e[be][b]=pe}function Se(be,we){var ze=be[b]={};we instanceof vA?(ze.oldX=we.x,ze.oldY=we.y):ze.oldShape=ie({},we.shape)}function Xe(be,we){var ze=be[b]={},oe=o.parentNode,pe=we instanceof De;if(oe&&(!n||n.direction==="drillDown")){var je=0,Ne=0,at=a.background[oe.getRawIndex()];!n&&at&&at.oldShape&&(je=at.oldShape.width,Ne=at.oldShape.height),pe?(ze.oldX=0,ze.oldY=Ne):ze.oldShape={x:je,y:Ne,width:0,height:0}}ze.fadein=!pe}}function Vde(r,e){return r*Ode+e}var dg=O,Gde=Re,o1=-1,Nr=(function(){function r(e){var t=e.mappingMethod,n=e.type,a=this.option=Me(e);this.type=n,this.mappingMethod=t,this._normalizeData=Ude[t];var i=r.visualHandlers[n];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(dT(a),Hde(a)):t==="category"?a.categories?Fde(a):dT(a,!0):(tn(t!=="linear"||a.dataExtent),dT(a))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return xe(this._normalizeData,this)},r.listVisualTypes=function(){return it(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,n){Re(e)?O(e,t,n):t.call(n,e)},r.mapVisual=function(e,t,n){var a,i=ce(e)?[]:Re(e)?{}:(a=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(n,o,s);a?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},n;return e&&dg(r.visualHandlers,function(a,i){e.hasOwnProperty(i)&&(t[i]=e[i],n=!0)}),n?t:null},r.prepareVisualTypes=function(e){if(ce(e))e=e.slice();else if(Gde(e)){var t=[];dg(e,function(n,a){t.push(a)}),e=t}else return[];return e.sort(function(n,a){return a==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,n){for(var a,i=1/0,o=0,s=t.length;o<s;o++){var l=t[o].value;if(l!=null){if(l===e||ye(l)&&l===e+"")return o;n&&d(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],c=u.interval,f=u.close;if(c){if(c[0]===-1/0){if(h0(f[1],e,c[1]))return o}else if(c[1]===1/0){if(h0(f[0],c[0],e))return o}else if(h0(f[0],c[0],e)&&h0(f[1],e,c[1]))return o;n&&d(c[0],o),n&&d(c[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:a;function d(v,g){var x=Math.abs(v-e);x<i&&(i=x,a=g)}},r.visualHandlers={color:{applyVisual:Hv("color"),getColorMapper:function(){var e=this.option;return xe(e.mappingMethod==="category"?function(t,n){return!n&&(t=this._normalizeData(t)),vp.call(this,t)}:function(t,n,a){var i=!!a;return!n&&(t=this._normalizeData(t)),a=Tp(t,e.parsedVisual,a),i?a:Ra(a,"rgba")},this)},_normalizedToVisual:{linear:function(e){return Ra(Tp(e,this.option.parsedVisual),"rgba")},category:vp,piecewise:function(e,t){var n=gA.call(this,t);return n==null&&(n=Ra(Tp(e,this.option.parsedVisual),"rgba")),n},fixed:Du}},colorHue:f0(function(e,t){return Go(e,t)}),colorSaturation:f0(function(e,t){return Go(e,null,t)}),colorLightness:f0(function(e,t){return Go(e,null,null,t)}),colorAlpha:f0(function(e,t){return Wp(e,t)}),decal:{applyVisual:Hv("decal"),_normalizedToVisual:{linear:null,category:vp,piecewise:null,fixed:null}},opacity:{applyVisual:Hv("opacity"),_normalizedToVisual:pA([0,1])},liftZ:{applyVisual:Hv("liftZ"),_normalizedToVisual:{linear:Du,category:Du,piecewise:Du,fixed:Du}},symbol:{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("symbol",a)},_normalizedToVisual:{linear:dz,category:vp,piecewise:function(e,t){var n=gA.call(this,t);return n==null&&(n=dz.call(this,e)),n},fixed:Du}},symbolSize:{applyVisual:Hv("symbolSize"),_normalizedToVisual:pA([0,1])}},r})();function Hde(r){var e=r.pieceList;r.hasSpecialVisual=!1,O(e,function(t,n){t.originIndex=n,t.visual!=null&&(r.hasSpecialVisual=!0)})}function Fde(r){var e=r.categories,t=r.categoryMap={},n=r.visual;if(dg(e,function(o,s){t[o]=s}),!ce(n)){var a=[];Re(n)?dg(n,function(o,s){var l=t[s];a[l??o1]=o}):a[o1]=n,n=X7(r,a)}for(var i=e.length-1;i>=0;i--)n[i]==null&&(delete t[e[i]],e.pop())}function dT(r,e){var t=r.visual,n=[];Re(t)?dg(t,function(i){n.push(i)}):t!=null&&n.push(t);var a={color:1,symbol:1};!e&&n.length===1&&!a.hasOwnProperty(r.type)&&(n[1]=n[0]),X7(r,n)}function f0(r){return{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("color",r(t("color"),a))},_normalizedToVisual:pA([0,1])}}function dz(r){var e=this.option.visual;return e[Math.round(pt(r,[0,1],[0,e.length-1],!0))]||{}}function Hv(r){return function(e,t,n){n(r,this.mapValueToVisual(e))}}function vp(r){var e=this.option.visual;return e[this.option.loop&&r!==o1?r%e.length:r]}function Du(){return this.option.visual[0]}function pA(r){return{linear:function(e){return pt(e,r,this.option.visual,!0)},category:vp,piecewise:function(e,t){var n=gA.call(this,t);return n==null&&(n=pt(e,r,this.option.visual,!0)),n},fixed:Du}}function gA(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var n=Nr.findPieceIndex(r,t),a=t[n];if(a&&a.visual)return a.visual[this.type]}}function X7(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=fe(e,function(t){var n=dn(t);return n||[0,0,0,1]})),e}var Ude={linear:function(r){return pt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=Nr.findPieceIndex(r,e,!0);if(t!=null)return pt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??o1},fixed:Kt};function h0(r,e,t){return r?e<=t:e<t}var Yde="itemStyle",q7=Je();const Wde={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||Z7(t,{},r.getViewRoot().getAncestors(),r)}};function Z7(r,e,t,n){var a=r.getModel(),i=r.getLayout(),o=r.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=a.getModel(Yde),l=Xde(s,e,n),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),c=s.get("borderColor"),f=s.get("borderColorSaturation"),d;f!=null&&(d=vz(l),c=qde(f,d)),u.stroke=c;var v=r.viewChildren;if(!v||!v.length)d=vz(l),u.fill=d;else{var g=Zde(r,a,i,s,l,v);O(v,function(x,y){if(x.depth>=t.length||x===t[x.depth]){var b=$de(a,l,x,y,g,n);Z7(x,b,t,n)}})}}}function Xde(r,e,t){var n=ie({},e),a=t.designatedVisualItemStyle;return O(["color","colorAlpha","colorSaturation"],function(i){a[i]=e[i];var o=r.get(i);a[i]=null,o!=null&&(n[i]=o)}),n}function vz(r){var e=vT(r,"color");if(e){var t=vT(r,"colorAlpha"),n=vT(r,"colorSaturation");return n&&(e=Go(e,null,null,n)),t&&(e=Wp(e,t)),e}}function qde(r,e){return e!=null?Go(e,null,null,r):null}function vT(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function Zde(r,e,t,n,a,i){if(!(!i||!i.length)){var o=pT(e,"color")||a.color!=null&&a.color!=="none"&&(pT(e,"colorAlpha")||pT(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var d=new Nr(f);return q7(d).drColorMappingBy=c,d}}}function pT(r,e){var t=r.get(e);return ce(t)&&t.length?{name:e,range:t}:null}function $de(r,e,t,n,a,i){var o=ie({},e);if(a){var s=a.type,l=s==="color"&&q7(a).drColorMappingBy,u=l==="index"?n:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}var vg=Math.max,s1=Math.min,pz=Hr,cN=O,$7=["itemStyle","borderWidth"],Kde=["itemStyle","gapWidth"],Qde=["upperLabel","show"],Jde=["upperLabel","height"];const eve={seriesType:"treemap",reset:function(r,e,t,n){var a=r.option,i=wr(r,t).refContainer,o=Ht(r.getBoxLayoutParams(),i),s=a.size||[],l=me(pz(o.width,s[0]),i.width),u=me(pz(o.height,s[1]),i.height),c=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],d=hg(n,f,r),v=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,g=r.getViewRoot(),x=U7(g);if(c!=="treemapMove"){var y=c==="treemapZoomToNode"?ove(r,d,g,l,u):v?[v.width,v.height]:[l,u],b=a.sort;b&&b!=="asc"&&b!=="desc"&&(b="desc");var w={squareRatio:a.squareRatio,sort:b,leafDepth:a.leafDepth};g.hostTree.clearLayouts();var T={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};g.setLayout(T),K7(g,w,!1,0),T=g.getLayout(),cN(x,function(D,M){var N=(x[M+1]||g).getValue();D.setLayout(ie({dataExtent:[N,N],borderWidth:0,upperHeight:0},T))})}var C=r.getData().tree.root;C.setLayout(sve(o,v,d),!0),r.setLayoutInfo(o),Q7(C,new Ie(-o.x,-o.y,t.getWidth(),t.getHeight()),x,g,0)}};function K7(r,e,t,n){var a,i;if(!r.isRemoved()){var o=r.getLayout();a=o.width,i=o.height;var s=r.getModel(),l=s.get($7),u=s.get(Kde)/2,c=J7(s),f=Math.max(l,c),d=l-u,v=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),a=vg(a-2*d,0),i=vg(i-d-v,0);var g=a*i,x=tve(r,s,g,e,t,n);if(x.length){var y={x:d,y:v,width:a,height:i},b=s1(a,i),w=1/0,T=[];T.area=0;for(var C=0,D=x.length;C<D;){var M=x[C];T.push(M),T.area+=M.getLayout().area;var N=ive(T,b,e.squareRatio);N<=w?(C++,w=N):(T.area-=T.pop().getLayout().area,gz(T,b,y,u,!1),b=s1(y.width,y.height),T.length=T.area=0,w=1/0)}if(T.length&&gz(T,b,y,u,!0),!t){var R=s.get("childrenVisibleMin");R!=null&&g<R&&(t=!0)}for(var C=0,D=x.length;C<D;C++)K7(x[C],e,t,n+1)}}}function tve(r,e,t,n,a,i){var o=r.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=i;if(a&&!l)return r.viewChildren=[];o=dt(o,function(v){return!v.isRemoved()}),nve(o,s);var u=ave(e,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=rve(e,t,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var c=0,f=o.length;c<f;c++){var d=o[c].getValue()/u.sum*t;o[c].setLayout({area:d})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function rve(r,e,t,n,a){if(!n)return t;for(var i=r.get("visibleMin"),o=a.length,s=o,l=o-1;l>=0;l--){var u=a[n==="asc"?o-l-1:l].getValue();u/t*e<i&&(s=l,t-=u)}return n==="asc"?a.splice(0,o-s):a.splice(s,o-s),t}function nve(r,e){return e&&r.sort(function(t,n){var a=e==="asc"?t.getValue()-n.getValue():n.getValue()-t.getValue();return a===0?e==="asc"?t.dataIndex-n.dataIndex:n.dataIndex-t.dataIndex:a}),r}function ave(r,e,t){for(var n=0,a=0,i=e.length;a<i;a++)n+=e[a].getValue();var o=r.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&t?(s=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&s.reverse()):(s=[1/0,-1/0],cN(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 ive(r,e,t){for(var n=0,a=1/0,i=0,o=void 0,s=r.length;i<s;i++)o=r[i].getLayout().area,o&&(o<a&&(a=o),o>n&&(n=o));var l=r.area*r.area,u=e*e*t;return l?vg(u*n/l,l/(u*a)):1/0}function gz(r,e,t,n,a){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],c=e?r.area/e:0;(a||c>t[l[o]])&&(c=t[l[o]]);for(var f=0,d=r.length;f<d;f++){var v=r[f],g={},x=c?v.getLayout().area/c:0,y=g[l[o]]=vg(c-2*n,0),b=t[s[i]]+t[l[i]]-u,w=f===d-1||b<x?b:x,T=g[l[i]]=vg(w-2*n,0);g[s[o]]=t[s[o]]+s1(n,y/2),g[s[i]]=u+s1(n,T/2),u+=w,v.setLayout(g,!0)}t[s[o]]+=c,t[l[o]]-=c}function ove(r,e,t,n,a){var i=(e||{}).node,o=[n,a];if(!i||i===t)return o;for(var s,l=n*a,u=l*r.option.zoomToNodeRatio;s=i.parentNode;){for(var c=0,f=s.children,d=0,v=f.length;d<v;d++)c+=f[d].getValue();var g=i.getValue();if(g===0)return o;u*=c/g;var x=s.getModel(),y=x.get($7),b=Math.max(y,J7(x));u+=4*y*y+(3*y+b)*Math.pow(u,.5),u>lC&&(u=lC),i=s}u<l&&(u=l);var w=Math.pow(u/l,.5);return[n*w,a*w]}function sve(r,e,t){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!t)return n;var a=t.node,i=a.getLayout();if(!i)return n;for(var o=[i.width/2,i.height/2],s=a;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function Q7(r,e,t,n,a){var i=r.getLayout(),o=t[a],s=o&&o===r;if(!(o&&!s||a===t.length&&r!==n)){r.setLayout({isInView:!0,invisible:!s&&!e.intersect(i),isAboveViewRoot:s},!0);var l=new Ie(e.x-i.x,e.y-i.y,e.width,e.height);cN(r.viewChildren||[],function(u){Q7(u,l,t,n,a+1)})}}function J7(r){return r.get(Qde)?r.get(Jde):0}function lve(r){r.registerSeriesModel(Mde),r.registerChartView(jde),r.registerVisual(Wde),r.registerLayout(eve),Ade(r)}function uve(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),a=t.getGraph(),i=a.data,o=n.mapArray(n.getName);i.filterSelf(function(s){var l=i.getItemModel(s),u=l.getShallow("category");if(u!=null){st(u)&&(u=o[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function cve(r){var e={};r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),a=t.getData(),i={};n.each(function(o){var s=n.getName(o);i["ec-"+s]=o;var l=n.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),n.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++){var d=l.getShallow(c[f],!0);d!=null&&n.setItemVisual(o,c[f],d)}}),n.count()&&a.each(function(o){var s=a.getItemModel(o),l=s.getShallow("category");if(l!=null){ye(l)&&(l=i["ec-"+l]);var u=n.getItemVisual(l,"style"),c=a.ensureUniqueItemVisual(o,"style");ie(c,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],d=0;d<f.length;d++)a.setItemVisual(o,f[d],n.getItemVisual(l,f[d]))}})})}function d0(r){return r instanceof Array||(r=[r,r]),r}function fve(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),n=e.getEdgeData(),a=d0(e.get("edgeSymbol")),i=d0(e.get("edgeSymbolSize"));n.setVisual("fromSymbol",a&&a[0]),n.setVisual("toSymbol",a&&a[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),n.setVisual("style",e.getModel("lineStyle").getLineStyle()),n.each(function(o){var s=n.getItemModel(o),l=t.getEdgeByIndex(o),u=d0(s.getShallow("symbol",!0)),c=d0(s.getShallow("symbolSize",!0)),f=s.getModel("lineStyle").getLineStyle(),d=n.ensureUniqueItemVisual(o,"style");switch(ie(d,f),d.stroke){case"source":{var v=l.node1.getVisual("style");d.stroke=v&&v.fill;break}case"target":{var v=l.node2.getVisual("style");d.stroke=v&&v.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 mA="-->",vb=function(r){return r.get("autoCurveness")||null},eU=function(r,e){var t=vb(r),n=20,a=[];if(st(t))n=t;else if(ce(t)){r.__curvenessList=t;return}e>n&&(n=e);var i=n%2?n+2:n+3;a=[];for(var o=0;o<i;o++)a.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=a},pg=function(r,e,t){var n=[r.id,r.dataIndex].join("."),a=[e.id,e.dataIndex].join(".");return[t.uid,n,a].join(mA)},tU=function(r){var e=r.split(mA);return[e[0],e[2],e[1]].join(mA)},hve=function(r,e){var t=pg(r.node1,r.node2,e);return e.__edgeMap[t]},dve=function(r,e){var t=yA(pg(r.node1,r.node2,e),e),n=yA(pg(r.node2,r.node1,e),e);return t+n},yA=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function vve(r){vb(r)&&(r.__curvenessList=[],r.__edgeMap={},eU(r))}function pve(r,e,t,n){if(vb(t)){var a=pg(r,e,t),i=t.__edgeMap,o=i[tU(a)];i[a]&&!o?i[a].isForward=!0:o&&i[a]&&(o.isForward=!0,i[a].isForward=!1),i[a]=i[a]||[],i[a].push(n)}}function fN(r,e,t,n){var a=vb(e),i=ce(a);if(!a)return null;var o=hve(r,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=dve(r,e);eU(e,u),r.lineStyle=r.lineStyle||{};var c=pg(r.node1,r.node2,e),f=e.__curvenessList,d=i||u%2?0:1;if(o.isForward)return f[d+s];var v=tU(c),g=yA(v,e),x=f[s+g+d];return n?i?a&&a[0]===0?(g+d)%2?x:-x:((g%2?0:1)+d)%2?x:-x:(g+d)%2?x:-x:f[s+g+d]}function rU(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(n){var a=n.getModel();n.setLayout([+a.get("x"),+a.get("y")])}),hN(t,r)}}function hN(r,e){r.eachEdge(function(t,n){var a=zn(t.getModel().get(["lineStyle","curveness"]),-fN(t,e,n,!0),0),i=Hi(t.node1.getLayout()),o=Hi(t.node2.getLayout()),s=[i,o];+a&&s.push([(i[0]+o[0])/2-(i[1]-o[1])*a,(i[1]+o[1])/2-(o[0]-i[0])*a]),t.setLayout(s)})}function gve(r,e){r.eachSeriesByType("graph",function(t){var n=t.get("layout"),a=t.coordinateSystem;if(a&&a.type!=="view"){var i=t.getData(),o=[];O(a.dimensions,function(d){o=o.concat(i.mapDimensionsAll(d))});for(var s=0;s<i.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var f=i.get(o[c],s);isNaN(f)||(u=!0),l.push(f)}u?i.setItemLayout(s,a.dataToPoint(l)):i.setItemLayout(s,[NaN,NaN])}hN(i.graph,t)}else(!n||n==="none")&&rU(t)})}function pp(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,n=e.scaleX,a=e.getZoom(),i=(a-1)*t+1;return i/n}function gp(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var mz=Math.PI,gT=[];function dN(r,e,t,n){var a=r.coordinateSystem;if(!(a&&a.type!=="view")){var i=a.getBoundingRect(),o=r.getData(),s=o.graph,l=i.width/2+i.x,u=i.height/2+i.y,c=Math.min(i.width,i.height)/2,f=o.count();if(o.setLayout({cx:l,cy:u}),!!f){if(t){var d=a.pointToData(n),v=d[0],g=d[1],x=[v-l,g-u];xc(x,x),bp(x,x,c),t.setLayout([l+x[0],u+x[1]],!0);var y=r.get(["circular","rotateLabel"]);nU(t,y,l,u)}mve[e](r,s,o,c,l,u,f),s.eachEdge(function(b,w){var T=zn(b.getModel().get(["lineStyle","curveness"]),fN(b,r,w),0),C=Hi(b.node1.getLayout()),D=Hi(b.node2.getLayout()),M,N=(C[0]+D[0])/2,R=(C[1]+D[1])/2;+T&&(T*=3,M=[l*T+N*(1-T),u*T+R*(1-T)]),b.setLayout([C,D,M])})}}}var mve={value:function(r,e,t,n,a,i,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(c){var f=c.getValue("value"),d=u*(l?f:1)/2;s+=d,c.setLayout([n*Math.cos(s)+a,n*Math.sin(s)+i]),s+=d})},symbolSize:function(r,e,t,n,a,i,o){var s=0;gT.length=o;var l=pp(r);e.eachNode(function(f){var d=gp(f);isNaN(d)&&(d=2),d<0&&(d=0),d*=l;var v=Math.asin(d/2/n);isNaN(v)&&(v=mz/2),gT[f.dataIndex]=v,s+=v*2});var u=(2*mz-s)/o/2,c=0;e.eachNode(function(f){var d=u+gT[f.dataIndex];c+=d,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([n*Math.cos(c)+a,n*Math.sin(c)+i]),c+=d})}};function nU(r,e,t,n){var a=r.getGraphicEl();if(a){var i=r.getModel(),o=i.get(["label","rotate"])||0,s=a.getSymbolPath();if(e){var l=r.getLayout(),u=Math.atan2(l[1]-n,l[0]-t);u<0&&(u=Math.PI*2+u);var c=l[0]<t;c&&(u=u-Math.PI);var f=c?"left":"right";s.setTextConfig({rotation:-u,position:f,origin:"center"});var d=s.ensureState("emphasis");ie(d.textConfig||(d.textConfig={}),{position:f})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function yve(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&dN(e,"symbolSize")})}var Ef=vx;function xve(r,e,t){for(var n=r,a=e,i=t.rect,o=i.width,s=i.height,l=[i.x+o/2,i.y+s/2],u=t.gravity==null?.1:t.gravity,c=0;c<n.length;c++){var f=n[c];f.p||(f.p=Dl(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),f.pp=Hi(f.p),f.edges=null}var d=t.friction==null?.6:t.friction,v=d,g,x;return{warmUp:function(){v=d*.8},setFixed:function(y){n[y].fixed=!0},setUnfixed:function(y){n[y].fixed=!1},beforeStep:function(y){g=y},afterStep:function(y){x=y},step:function(y){g&&g(n,a);for(var b=[],w=n.length,T=0;T<a.length;T++){var C=a[T];if(!C.ignoreForceLayout){var D=C.n1,M=C.n2;el(b,M.p,D.p);var N=Fp(b)-C.d,R=M.w/(D.w+M.w);isNaN(R)&&(R=0),xc(b,b),!D.fixed&&Ef(D.p,D.p,b,R*N*v),!M.fixed&&Ef(M.p,M.p,b,-(1-R)*N*v)}}for(var T=0;T<w;T++){var E=n[T];E.fixed||(el(b,l,E.p),Ef(E.p,E.p,b,u*v))}for(var T=0;T<w;T++)for(var D=n[T],k=T+1;k<w;k++){var M=n[k];el(b,M.p,D.p);var N=Fp(b);N===0&&(z1(b,Math.random()-.5,Math.random()-.5),N=1);var I=(D.rep+M.rep)/N/N;!D.fixed&&Ef(D.pp,D.pp,b,I),!M.fixed&&Ef(M.pp,M.pp,b,-I)}for(var z=[],T=0;T<w;T++){var E=n[T];E.fixed||(el(z,E.p,E.pp),Ef(E.p,E.p,z,v),cn(E.pp,E.p))}v=v*.992;var P=v<.01;x&&x(n,a,P),y&&y(P)}}}function bve(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var n=e.preservedPoints||{},a=e.getGraph(),i=a.data,o=a.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?i.each(function(T){var C=i.getId(T);i.setItemLayout(T,n[C]||[NaN,NaN])}):!l||l==="none"?rU(e):l==="circular"&&dN(e,"value");var u=i.getDataExtent("value"),c=o.getDataExtent("value"),f=s.get("repulsion"),d=s.get("edgeLength"),v=ce(f)?f:[f,f],g=ce(d)?d:[d,d];g=[g[1],g[0]];var x=i.mapArray("value",function(T,C){var D=i.getItemLayout(C),M=pt(T,u,v);return isNaN(M)&&(M=(v[0]+v[1])/2),{w:M,rep:M,fixed:i.getItemModel(C).get("fixed"),p:!D||isNaN(D[0])||isNaN(D[1])?null:D}}),y=o.mapArray("value",function(T,C){var D=a.getEdgeByIndex(C),M=pt(T,c,g);isNaN(M)&&(M=(g[0]+g[1])/2);var N=D.getModel(),R=zn(D.getModel().get(["lineStyle","curveness"]),-fN(D,e,C,!0),0);return{n1:x[D.node1.dataIndex],n2:x[D.node2.dataIndex],d:M,curveness:R,ignoreForceLayout:N.get("ignoreForceLayout")}}),b=t.getBoundingRect(),w=xve(x,y,{rect:b,gravity:s.get("gravity"),friction:s.get("friction")});w.beforeStep(function(T,C){for(var D=0,M=T.length;D<M;D++)T[D].fixed&&cn(T[D].p,a.getNodeByIndex(D).getLayout())}),w.afterStep(function(T,C,D){for(var M=0,N=T.length;M<N;M++)T[M].fixed||a.getNodeByIndex(M).setLayout(T[M].p),n[i.getId(M)]=T[M].p;for(var M=0,N=C.length;M<N;M++){var R=C[M],E=a.getEdgeByIndex(M),k=R.n1.p,I=R.n2.p,z=E.getLayout();z=z?z.slice():[],z[0]=z[0]||[],z[1]=z[1]||[],cn(z[0],k),cn(z[1],I),+R.curveness&&(z[2]=[(k[0]+I[0])/2-(k[1]-I[1])*R.curveness,(k[1]+I[1])/2-(I[0]-k[0])*R.curveness]),E.setLayout(z)}}),e.forceLayout=w,e.preservedPoints=n,w.step()}else e.forceLayout=null})}function _ve(r,e,t){var n=wr(r,e),a=ie(r.getBoxLayoutParams(),{aspect:t}),i=Ht(a,n.refContainer);return RH(r,i,t)}function Sve(r,e){var t=[];return r.eachSeriesByType("graph",function(n){Fg({targetModel:n,coordSysType:"view",coordSysProvider:a,isDefaultDataCoordSys:!0});function a(){var i=n.getData(),o=i.mapArray(function(g){var x=i.getItemModel(g);return[+x.get("x"),+x.get("y")]}),s=[],l=[];W1(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=_ve(n,e,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var f=l[0]-s[0],d=l[1]-s[1],v=new Mc(null,{api:e,ecModel:r});return v.zoomLimit=n.get("scaleLimit"),v.setBoundingRect(s[0],s[1],f,d),v.setViewRect(c.x,c.y,c.width,c.height),v.setCenter(n.get("center")),v.setZoom(n.get("zoom")),t.push(v),v}}),t}var yz=lr.prototype,mT=$h.prototype,aU=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})();(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(aU);function yT(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var iU=(function(r){K(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-line",n}return e.prototype.getDefaultStyle=function(){return{stroke:ee.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new aU},e.prototype.buildPath=function(t,n){yT(n)?yz.buildPath.call(this,t,n):mT.buildPath.call(this,t,n)},e.prototype.pointAt=function(t){return yT(this.shape)?yz.pointAt.call(this,t):mT.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var n=this.shape,a=yT(n)?[n.x2-n.x1,n.y2-n.y1]:mT.tangentAt.call(this,t);return xc(a,a)},e})(tt),xT=["fromSymbol","toSymbol"];function xz(r){return"_"+r+"Type"}function bz(r,e,t){var n=e.getItemVisual(t,r);if(!n||n==="none")return n;var a=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=id(a),u=Tc(o||0,l);return n+l+u+(i||"")+(s||"")}function _z(r,e,t){var n=e.getItemVisual(t,r);if(!(!n||n==="none")){var a=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=id(a),u=Tc(o||0,l),c=ur(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,c.name=r,c}}function wve(r){var e=new iU({name:"line",subPixelOptimize:!0});return xA(e.shape,r),e}function xA(r,e){r.x1=e[0][0],r.y1=e[0][1],r.x2=e[1][0],r.y2=e[1][1],r.percent=1;var t=e[2];t?(r.cpx1=t[0],r.cpy1=t[1]):(r.cpx1=NaN,r.cpy1=NaN)}var vN=(function(r){K(e,r);function e(t,n,a){var i=r.call(this)||this;return i._createLine(t,n,a),i}return e.prototype._createLine=function(t,n,a){var i=t.hostModel,o=t.getItemLayout(n),s=t.getItemVisual(n,"z2"),l=wve(o);l.shape.percent=0,jt(l,{z2:Ce(s,0),shape:{percent:1}},i,n),this.add(l),O(xT,function(u){var c=_z(u,t,n);this.add(c),this[xz(u)]=bz(u,t,n)},this),this._updateCommonStl(t,n,a)},e.prototype.updateData=function(t,n,a){var i=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(n),l={shape:{}};xA(l.shape,s),lt(o,l,i,n),O(xT,function(u){var c=bz(u,t,n),f=xz(u);if(this[f]!==c){this.remove(this.childOfName(u));var d=_z(u,t,n);this.add(d)}this[f]=c},this),this._updateCommonStl(t,n,a)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,n,a){var i=t.hostModel,o=this.childOfName("line"),s=a&&a.emphasisLineStyle,l=a&&a.blurLineStyle,u=a&&a.selectLineStyle,c=a&&a.labelStatesModels,f=a&&a.emphasisDisabled,d=a&&a.focus,v=a&&a.blurScope;if(!a||t.hasItemOption){var g=t.getItemModel(n),x=g.getModel("emphasis");s=x.getModel("lineStyle").getLineStyle(),l=g.getModel(["blur","lineStyle"]).getLineStyle(),u=g.getModel(["select","lineStyle"]).getLineStyle(),f=x.get("disabled"),d=x.get("focus"),v=x.get("blurScope"),c=Sr(g)}var y=t.getItemVisual(n,"style"),b=y.stroke;o.useStyle(y),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,O(xT,function(M){var N=this.childOfName(M);if(N){N.setColor(b),N.style.opacity=y.opacity;for(var R=0;R<Tn.length;R++){var E=Tn[R],k=o.getState(E);if(k){var I=k.style||{},z=N.ensureState(E),P=z.style||(z.style={});I.stroke!=null&&(P[N.__isEmptyBrush?"stroke":"fill"]=I.stroke),I.opacity!=null&&(P.opacity=I.opacity)}}N.markRedraw()}},this);var w=i.getRawValue(n);Lr(this,c,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(M,N){return i.getFormattedLabel(M,N,t.dataType)}},inheritColor:b||ee.color.neutral99,defaultOpacity:y.opacity,defaultText:(w==null?t.getName(n):isFinite(w)?sr(w):w)+""});var T=this.getTextContent();if(T){var C=c.normal;T.__align=T.style.align,T.__verticalAlign=T.style.verticalAlign,T.__position=C.get("position")||"middle";var D=C.get("distance");ce(D)||(D=[D,D]),T.__labelDistance=D}this.setTextConfig({position:null,local:!0,inside:!1}),Ut(this,d,v,f)},e.prototype.highlight=function(){$o(this)},e.prototype.downplay=function(){Ko(this)},e.prototype.updateLayout=function(t,n){this.setLinePoints(t.getItemLayout(n))},e.prototype.setLinePoints=function(t){var n=this.childOfName("line");xA(n.shape,t),n.dirty()},e.prototype.beforeUpdate=function(){var t=this,n=t.childOfName("fromSymbol"),a=t.childOfName("toSymbol"),i=t.getTextContent();if(!n&&!a&&(!i||i.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),f=l.pointAt(u),d=el([],f,c);xc(d,d);function v(k,I){var z=k.__specifiedRotation;if(z==null){var P=l.tangentAt(I);k.attr("rotation",(I===1?-1:1)*Math.PI/2-Math.atan2(P[1],P[0]))}else k.attr("rotation",z)}if(n&&(n.setPosition(c),v(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),a&&(a.setPosition(f),v(a,1),a.scaleX=a.scaleY=o*u,a.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var g=void 0,x=void 0,y=i.__labelDistance,b=y[0]*o,w=y[1]*o,T=u/2,C=l.tangentAt(T),D=[C[1],-C[0]],M=l.pointAt(T);D[1]>0&&(D[0]=-D[0],D[1]=-D[1]);var N=C[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var R=-Math.atan2(C[1],C[0]);f[0]<c[0]&&(R=Math.PI+R),i.rotation=R}var E=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":E=-w,x="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":E=w,x="top";break;default:E=0,x="middle"}switch(i.__position){case"end":i.x=d[0]*b+f[0],i.y=d[1]*w+f[1],g=d[0]>.8?"left":d[0]<-.8?"right":"center",x=d[1]>.8?"top":d[1]<-.8?"bottom":"middle";break;case"start":i.x=-d[0]*b+c[0],i.y=-d[1]*w+c[1],g=d[0]>.8?"right":d[0]<-.8?"left":"center",x=d[1]>.8?"bottom":d[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=b*N+c[0],i.y=c[1]+E,g=C[0]<0?"right":"left",i.originX=-b*N,i.originY=-E;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=M[0],i.y=M[1]+E,g="center",i.originY=-E;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-b*N+f[0],i.y=f[1]+E,g=C[0]>=0?"right":"left",i.originX=b*N,i.originY=-E;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||x,align:i.__align||g})}},e})(De),pN=(function(){function r(e){this.group=new De,this._LineCtor=e||vN}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,a=n.group,i=n._lineData;n._lineData=e,i||a.removeAll();var o=Sz(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){a.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Sz(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(s){!s.isGroup&&!Tve(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var i=t.getItemLayout(a);if(bT(i)){var o=new this._LineCtor(t,a,this._seriesScope);o.traverse(n),this.group.add(o),t.setItemGraphicEl(a,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){Nl(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,n){var a=e.getItemLayout(t);if(bT(a)){var i=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,i),this.group.add(i)}},r.prototype._doUpdate=function(e,t,n,a,i){var o=e.getItemGraphicEl(n);if(!bT(t.getItemLayout(a))){this.group.remove(o);return}o?o.updateData(t,a,i):o=new this._LineCtor(t,a,i),t.setItemGraphicEl(a,o),this.group.add(o)},r})();function Tve(r){return r.animators&&r.animators.length>0}function Sz(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Sr(e)}}function wz(r){return isNaN(r[0])||isNaN(r[1])}function bT(r){return r&&!wz(r[0])&&!wz(r[1])}var _T=[],ST=[],wT=[],kf=Gr,TT=ul,Tz=Math.abs;function Cz(r,e,t){for(var n=r[0],a=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){_T[0]=kf(n[0],a[0],i[0],c),_T[1]=kf(n[1],a[1],i[1],c);var f=Tz(TT(_T,e)-l);f<o&&(o=f,s=c)}for(var d=0;d<32;d++){var v=s+u;ST[0]=kf(n[0],a[0],i[0],s),ST[1]=kf(n[1],a[1],i[1],s),wT[0]=kf(n[0],a[0],i[0],v),wT[1]=kf(n[1],a[1],i[1],v);var f=TT(ST,e)-l;if(Tz(f)<.01)break;var g=TT(wT,e)-l;u/=2,f<0?g>=0?s=s+u:s=s-u:g>=0?s=s-u:s=s+u}return s}function CT(r,e){var t=[],n=Up,a=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[Hi(u[0]),Hi(u[1])],u[2]&&u.__original.push(Hi(u[2])));var d=u.__original;if(u[2]!=null){if(cn(a[0],d[0]),cn(a[1],d[2]),cn(a[2],d[1]),c&&c!=="none"){var v=gp(s.node1),g=Cz(a,d[0],v*e);n(a[0][0],a[1][0],a[2][0],g,t),a[0][0]=t[3],a[1][0]=t[4],n(a[0][1],a[1][1],a[2][1],g,t),a[0][1]=t[3],a[1][1]=t[4]}if(f&&f!=="none"){var v=gp(s.node2),g=Cz(a,d[1],v*e);n(a[0][0],a[1][0],a[2][0],g,t),a[1][0]=t[1],a[2][0]=t[2],n(a[0][1],a[1][1],a[2][1],g,t),a[1][1]=t[1],a[2][1]=t[2]}cn(u[0],a[0]),cn(u[1],a[2]),cn(u[2],a[1])}else{if(cn(i[0],d[0]),cn(i[1],d[1]),el(o,i[1],i[0]),xc(o,o),c&&c!=="none"){var v=gp(s.node1);vx(i[0],i[0],o,v*e)}if(f&&f!=="none"){var v=gp(s.node2);vx(i[1],i[1],o,-v*e)}cn(u[0],i[0]),cn(u[1],i[1])}})}var oU=Je();function Cve(r){if(r)return oU(r).bridge}function Az(r,e){r&&(oU(r).bridge=e)}function Mz(r){return r.type==="view"}var Ave=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){var a=new Xg,i=new pN,o=this.group,s=new De;this._controller=new Ac(n.getZr()),this._controllerHost={target:s},s.add(a.group),s.add(i.group),o.add(s),this._symbolDraw=a,this._lineDraw=i,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(t,n,a){var i=this,o=t.coordinateSystem,s=!1;this._model=t,this._api=a,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(a);var u=this._symbolDraw,c=this._lineDraw;if(Mz(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):lt(this._mainGroup,f,t)}CT(t.getGraph(),pp(t));var d=t.getData();u.updateData(d);var v=t.getEdgeData();c.updateData(v),this._updateNodeAndLinkScale(),this._updateController(null,t,a),clearTimeout(this._layoutTimeout);var g=t.forceLayout,x=t.get(["force","layoutAnimation"]);g&&(s=!0,this._startForceLayoutIteration(g,a,x));var y=t.get("layout");d.graph.eachNode(function(C){var D=C.dataIndex,M=C.getGraphicEl(),N=C.getModel();if(M){M.off("drag").off("dragend");var R=N.get("draggable");R&&M.on("drag",function(k){switch(y){case"force":g.warmUp(),!i._layouting&&i._startForceLayoutIteration(g,a,x),g.setFixed(D),d.setItemLayout(D,[M.x,M.y]);break;case"circular":d.setItemLayout(D,[M.x,M.y]),C.setLayout({fixed:!0},!0),dN(t,"symbolSize",C,[k.offsetX,k.offsetY]),i.updateLayout(t);break;case"none":default:d.setItemLayout(D,[M.x,M.y]),hN(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){g&&g.setUnfixed(D)}),M.setDraggable(R,!!N.get("cursor"));var E=N.get(["emphasis","focus"]);E==="adjacency"&&(Pe(M).focus=C.getAdjacentDataIndices())}}),d.graph.eachEdge(function(C){var D=C.getGraphicEl(),M=C.getModel().get(["emphasis","focus"]);D&&M==="adjacency"&&(Pe(D).focus={edge:[C.dataIndex],node:[C.node1.dataIndex,C.node2.dataIndex]})});var b=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),w=d.getLayout("cx"),T=d.getLayout("cy");d.graph.eachNode(function(C){nU(C,b,w,T)}),this._firstRender=!1,s||this._renderThumbnail(t,a,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,n,a){var i=this,o=!1;(function s(){t.step(function(l){i.updateLayout(i._model),(l||!o)&&(o=!0,i._renderThumbnail(i._model,n,i._symbolDraw,i._lineDraw)),(i._layouting=!l)&&(a?i._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(t,n,a){var i=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!Mz(s)){i.disable();return}i.enable(n.get("roam"),{api:a,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!t||t.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),i.off("pan").off("zoom").on("pan",function(l){a.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){a.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(t,n,a){this._active&&(nN(this._controllerHost,a.dx,a.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(t,n,a){this._active&&(aN(this._controllerHost,a.zoom,a.originX,a.originY),this._updateNodeAndLinkScale(),CT(t.getGraph(),pp(t)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),a=pp(t);n.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(a)})},e.prototype.updateLayout=function(t){this._active&&(CT(t.getGraph(),pp(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var t=this._model,n=t.coordinateSystem;if(n.type==="view"){var a=Cve(t);if(a)return{bridge:a,coordSys:n}}},e.prototype._updateThumbnailWindow=function(){var t=this._getThumbnailInfo();t&&t.bridge.updateWindow(t.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(t,n,a,i){var o=this._getThumbnailInfo();if(o){var s=new De,l=a.group.children(),u=i.group.children(),c=new De,f=new De;s.add(f),s.add(c);for(var d=0;d<l.length;d++){var v=l[d],g=v.children()[0],x=v.x,y=v.y,b=Me(g.shape),w=ie(b,{width:g.scaleX,height:g.scaleY,x:x-g.scaleX/2,y:y-g.scaleY/2}),T=Me(g.style),C=new g.constructor({shape:w,style:T,z2:151});f.add(C)}for(var d=0;d<u.length;d++){var v=u[d],D=v.children()[0],T=Me(D.style),w=Me(D.shape),M=new iU({style:T,shape:w,z2:151});c.add(M)}o.bridge.renderContent({api:n,roamType:t.get("roam"),viewportRect:null,group:s,targetTrans:o.coordSys.transform})}},e.type="graph",e})(_t);function If(r){return"_EC_"+r}var Mve=(function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var n=this._nodesMap;if(!n[If(e)]){var a=new Nu(e,t);return a.hostGraph=this,this.nodes.push(a),n[If(e)]=a,a}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[If(e)]},r.prototype.addEdge=function(e,t,n){var a=this._nodesMap,i=this._edgesMap;if(st(e)&&(e=this.nodes[e]),st(t)&&(t=this.nodes[t]),e instanceof Nu||(e=a[If(e)]),t instanceof Nu||(t=a[If(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new sU(e,t,n);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof Nu&&(e=e.id),t instanceof Nu&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var n=this.nodes,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)},r.prototype.eachEdge=function(e,t){for(var n=this.edges,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},r.prototype.breadthFirstTraverse=function(e,t,n,a){if(t instanceof Nu||(t=this._nodesMap[If(t)]),!!t){for(var i=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(a,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[i],o=0;o<u.length;o++){var c=u[o],f=c.node1===l?c.node2:c.node1;if(!f.__visited){if(e.call(a,f,l))return;s.push(f),f.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,a=this.edges,i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)n[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(s){var l=a[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var i=0,o=a.length;i<o;i++)a[i].dataIndex=-1;for(var i=0,o=t.count();i<o;i++)a[t.getRawIndex(i)].dataIndex=i},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,n=this.edges,a=0;a<t.length;a++)e.addNode(t[a].id,t[a].dataIndex);for(var a=0;a<n.length;a++){var i=n[a];e.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return e},r})(),Nu=(function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??"",this.dataIndex=t??-1}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},r.prototype.getTrajectoryDataIndices=function(){for(var e=Te(),t=Te(),n=0,a=this.edges.length;n<a;n++){var i=this.edges[n];if(!(i.dataIndex<0)){e.set(i.dataIndex,!0);for(var o=[i.node1],s=[i.node2],l=0;l<o.length;){var u=o[l];l++,t.set(u.dataIndex,!0);for(var c=u.inEdges,f=0,d=c.length,v=void 0,g=void 0;f<d;f++)v=c[f],g=v.dataIndex,g>=0&&!e.hasKey(g)&&(e.set(g,!0),o.push(v.node1))}for(l=0;l<s.length;){var x=s[l];l++,t.set(x.dataIndex,!0);for(var y=x.outEdges,f=0,b=y.length,w=void 0,T=void 0;f<b;f++)w=y[f],T=w.dataIndex,T>=0&&!e.hasKey(T)&&(e.set(T,!0),s.push(w.node2))}}}return{edge:e.keys(),node:t.keys()}},r})(),sU=(function(){function r(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=Te(),t=Te();e.set(this.dataIndex,!0);for(var n=[this.node1],a=[this.node2],i=0;i<n.length;){var o=n[i];i++,t.set(o.dataIndex,!0);for(var s=o.inEdges,l=0,u=s.length,c=void 0,f=void 0;l<u;l++)c=o.inEdges[l],f=c.dataIndex,f>=0&&!e.hasKey(f)&&(e.set(f,!0),n.push(c.node1))}for(i=0;i<a.length;){var d=a[i];i++,t.set(d.dataIndex,!0);for(var v=d.outEdges,l=0,u=v.length,g=void 0,x=void 0;l<u;l++)g=d.outEdges[l],x=g.dataIndex,x>=0&&!e.hasKey(x)&&(e.set(x,!0),a.push(g.node2))}return{edge:e.keys(),node:t.keys()}},r})();function lU(r,e){return{getValue:function(t){var n=this[r][e];return n.getStore().get(n.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,n){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,n)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,n){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,n)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}Jt(Nu,lU("hostGraph","data"));Jt(sU,lU("hostGraph","edgeData"));function gN(r,e,t,n,a){for(var i=new Mve(n),o=0;o<r.length;o++)i.addNode(Hr(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var c=e[o],f=c.source,d=c.target;i.addEdge(f,d,u)&&(l.push(c),s.push(Hr(xr(c.id,null),f+" > "+d)),u++)}var v=t.get("coordinateSystem"),g;if(v==="cartesian2d"||v==="polar"||v==="matrix")g=to(r,t);else{var x=rd.get(v),y=x?x.dimensions||[]:[];Fe(y,"value")<0&&y.concat(["value"]);var b=od(r,{coordDimensions:y,encodeDefine:t.getEncode()}).dimensions;g=new vn(b,t),g.initData(r)}var w=new vn(["value"],t);return w.initData(l,s),a&&a(g,w),H7({mainData:g,struct:i,structAttr:"graph",datas:{node:g,edge:w},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var Dve=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var n=this;function a(){return n._categoriesData}this.legendVisualProvider=new fd(a,a),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),lc(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&a){vve(this);var s=gN(i,a,this,!0,l);return O(s.edges,function(u){pve(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(g){var x=o._categoriesModels,y=g.getShallow("category"),b=x[y];return b&&(b.parentModel=g.parentModel,g.parentModel=b),g});var f=et.prototype.getModel;function d(g,x){var y=f.call(this,g,x);return y.resolveParentPath=v,y}c.wrapMethod("getItemModel",function(g){return g.resolveParentPath=v,g.getModel=d,g});function v(g){if(g&&(g[0]==="label"||g[1]==="label")){var x=g.slice();return g[0]==="label"?x[0]="edgeLabel":g[1]==="label"&&(x[1]="edgeLabel"),x}return g}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,n,a){if(a==="edge"){var i=this.getData(),o=this.getDataParams(t,a),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),pr("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=f8({series:this,dataIndex:t,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var t=fe(this.option.categories||[],function(a){return a.value!=null?a:ie({value:0},a)}),n=new vn(["value"],this);n.initData(t),this._categoriesData=n,this._categoriesModels=n.mapArray(function(a){return n.getItemModel(a)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:ee.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:ee.color.primary}}},e})(Tt);function Nve(r){r.registerChartView(Ave),r.registerSeriesModel(Dve),r.registerProcessor(uve),r.registerVisual(cve),r.registerVisual(fve),r.registerLayout(gve),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,yve),r.registerLayout(bve),r.registerCoordinateSystem("graphView",{dimensions:Mc.dimensions,create:Sve}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Kt),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Kt),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",query:e},function(a){var i=n.getViewOfSeriesModel(a);i&&(e.dx!=null&&e.dy!=null&&i.updateViewOnPan(a,n,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&i.updateViewOnZoom(a,n,e));var o=a.coordinateSystem,s=fb(o,e,a.get("scaleLimit"));a.setCenter&&a.setCenter(s.center),a.setZoom&&a.setZoom(s.zoom)})})}var Dz=(function(r){K(e,r);function e(t,n,a){var i=r.call(this)||this;Pe(i).dataType="node",i.z2=2;var o=new ot;return i.setTextContent(o),i.updateData(t,n,a,!0),i}return e.prototype.updateData=function(t,n,a,i){var o=this,s=t.graph.getNodeByIndex(n),l=t.hostModel,u=s.getModel(),c=u.getModel("emphasis"),f=t.getItemLayout(n),d=ie(Bi(u.getModel("itemStyle"),f,!0),f),v=this;if(isNaN(d.startAngle)){v.setShape(d);return}i?v.setShape(d):lt(v,{shape:d},l,n);var g=ie(Bi(u.getModel("itemStyle"),f,!0),f);o.setShape(g),o.useStyle(t.getItemVisual(n,"style")),_r(o,u),this._updateLabel(l,u,s),t.setItemGraphicEl(n,v),_r(v,u,"itemStyle");var x=c.get("focus");Ut(this,x==="adjacency"?s.getAdjacentDataIndices():x,c.get("blurScope"),c.get("disabled"))},e.prototype._updateLabel=function(t,n,a){var i=this.getTextContent(),o=a.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");i.ignore=!c.get("show");var f=Sr(n),d=a.getVisual("style");Lr(i,f,{labelFetcher:{getFormattedLabel:function(w,T,C,D,M,N){return t.getFormattedLabel(w,T,"node",D,zn(M,f.normal&&f.normal.get("formatter"),n.get("name")),N)}},labelDataIndex:a.dataIndex,defaultText:a.dataIndex+"",inheritColor:d.fill,defaultOpacity:d.opacity,defaultOutsidePosition:"startArc"});var v=c.get("position")||"outside",g=c.get("distance")||0,x;v==="outside"?x=o.r+g:x=(o.r+o.r0)/2,this.textConfig={inside:v!=="outside"};var y=v!=="outside"?c.get("align")||"center":l>0?"left":"right",b=v!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";i.attr({x:l*x+o.cx,y:u*x+o.cy,rotation:0,style:{align:y,verticalAlign:b}})},e})(rn),Lve=(function(r){K(e,r);function e(t,n,a,i){var o=r.call(this)||this;return Pe(o).dataType="edge",o.updateData(t,n,a,i,!0),o}return e.prototype.buildPath=function(t,n){t.moveTo(n.s1[0],n.s1[1]);var a=.7,i=n.clockwise;t.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!i),t.bezierCurveTo((n.cx-n.s2[0])*a+n.s2[0],(n.cy-n.s2[1])*a+n.s2[1],(n.cx-n.t1[0])*a+n.t1[0],(n.cy-n.t1[1])*a+n.t1[1],n.t1[0],n.t1[1]),t.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!i),t.bezierCurveTo((n.cx-n.t2[0])*a+n.t2[0],(n.cy-n.t2[1])*a+n.t2[1],(n.cx-n.s1[0])*a+n.s1[0],(n.cy-n.s1[1])*a+n.s1[1],n.s1[0],n.s1[1]),t.closePath()},e.prototype.updateData=function(t,n,a,i,o){var s=t.hostModel,l=n.graph.getEdgeByIndex(a),u=l.getLayout(),c=l.node1.getModel(),f=n.getItemModel(l.dataIndex),d=f.getModel("lineStyle"),v=f.getModel("emphasis"),g=v.get("focus"),x=ie(Bi(c.getModel("itemStyle"),u,!0),u),y=this;if(isNaN(x.sStartAngle)||isNaN(x.tStartAngle)){y.setShape(x);return}o?(y.setShape(x),Nz(y,l,t,d)):(Pa(y),Nz(y,l,t,d),lt(y,{shape:x},s,a)),Ut(this,g==="adjacency"?l.getAdjacentDataIndices():g,v.get("blurScope"),v.get("disabled")),_r(y,f,"lineStyle"),n.setItemGraphicEl(l.dataIndex,y)},e})(tt);function Nz(r,e,t,n){var a=e.node1,i=e.node2,o=r.style;r.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=t.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"target":o.fill=t.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var l=t.getItemVisual(a.dataIndex,"style").fill,u=t.getItemVisual(i.dataIndex,"style").fill;if(ye(l)&&ye(u)){var c=r.shape,f=(c.s1[0]+c.s2[0])/2,d=(c.s1[1]+c.s2[1])/2,v=(c.t1[0]+c.t2[0])/2,g=(c.t1[1]+c.t2[1])/2;o.fill=new bc(f,d,v,g,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var Rve=Math.PI/180,Eve=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){},e.prototype.render=function(t,n,a){var i=t.getData(),o=this._data,s=this.group,l=-t.get("startAngle")*Rve;if(i.diff(o).add(function(c){var f=i.getItemLayout(c);if(f){var d=new Dz(i,c,l);Pe(d).dataIndex=c,s.add(d)}}).update(function(c,f){var d=o.getItemGraphicEl(f),v=i.getItemLayout(c);if(!v){d&&Ho(d,t,f);return}d?d.updateData(i,c,l):d=new Dz(i,c,l),s.add(d)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&Ho(f,t,c)}).execute(),!o){var u=t.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=me(u[0],a.getWidth()),this.group.originY=me(u[1],a.getHeight()),jt(this.group,{scaleX:1,scaleY:1},t)}this._data=i,this.renderEdges(t,l)},e.prototype.renderEdges=function(t,n){var a=t.getData(),i=t.getEdgeData(),o=this._edgeData,s=this.group;i.diff(o).add(function(l){var u=new Lve(a,i,l,n);Pe(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,i,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&Ho(u,t,l)}).execute(),this._edgeData=i},e.prototype.dispose=function(){},e.type="chord",e})(_t),kve=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this.legendVisualProvider=new fd(xe(this.getData,this),xe(this.getRawData,this))},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links)},e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[];if(i&&a){var o=gN(i,a,this,!0,s);return o.data}function s(l,u){var c=et.prototype.getModel;function f(v,g){var x=c.call(this,v,g);return x.resolveParentPath=d,x}u.wrapMethod("getItemModel",function(v){return v.resolveParentPath=d,v.getModel=f,v});function d(v){if(v&&(v[0]==="label"||v[1]==="label")){var g=v.slice();return v[0]==="label"?g[0]="edgeLabel":v[1]==="label"&&(g[1]="edgeLabel"),g}return v}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,a){var i=this.getDataParams(t,a);if(a==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(t),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),pr("nameValue",{name:c.join(" > "),value:i.value,noValue:i.value==null})}return pr("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},e.prototype.getDataParams=function(t,n){var a=r.prototype.getDataParams.call(this,t,n);if(n==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(t);if(a.name==null&&(a.name=i.getName(t)),a.value==null){var s=o.getLayout().value;a.value=s}}return a},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})(Tt),AT=Math.PI/180;function Ive(r,e){r.eachSeriesByType("chord",function(t){Ove(t,e)})}function Ove(r,e){var t=r.getData(),n=t.graph,a=r.getEdgeData(),i=a.count();if(i){var o=LH(r,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=Math.max((r.get("padAngle")||0)*AT,0),d=Math.max((r.get("minAngle")||0)*AT,0),v=-r.get("startAngle")*AT,g=v+Math.PI*2,x=r.get("clockwise"),y=x?1:-1,b=[v,g];X1(b,!x);var w=b[0],T=b[1],C=T-w,D=t.getSum("value")===0&&a.getSum("value")===0,M=[],N=0;n.eachEdge(function(H){var X=D?1:H.getValue("value");D&&(X>0||d)&&(N+=2);var V=H.node1.dataIndex,W=H.node2.dataIndex;M[V]=(M[V]||0)+X,M[W]=(M[W]||0)+X});var R=0;if(n.eachNode(function(H){var X=H.getValue("value");isNaN(X)||(M[H.dataIndex]=Math.max(X,M[H.dataIndex]||0)),!D&&(M[H.dataIndex]>0||d)&&N++,R+=M[H.dataIndex]||0}),!(N===0||R===0)){f*N>=Math.abs(C)&&(f=Math.max(0,(Math.abs(C)-d*N)/N)),(f+d)*N>=Math.abs(C)&&(d=(Math.abs(C)-f*N)/N);var E=(C-f*N*y)/R,k=0,I=0,z=0;n.eachNode(function(H){var X=M[H.dataIndex]||0,V=E*(R?X:1)*y;Math.abs(V)<d?k+=d-Math.abs(V):(I+=Math.abs(V)-d,z+=Math.abs(V)),H.setLayout({angle:V,value:X})});var P=!1;if(k>I){var G=k/I;n.eachNode(function(H){var X=H.getLayout().angle;Math.abs(X)>=d?H.setLayout({angle:X*G,ratio:G},!0):H.setLayout({angle:d,ratio:d===0?1:X/d},!0)})}else n.eachNode(function(H){if(!P){var X=H.getLayout().angle,V=Math.min(X/z,1),W=V*k;X-W<d&&(P=!0)}});var U=k;n.eachNode(function(H){if(!(U<=0)){var X=H.getLayout().angle;if(X>d&&d>0){var V=P?1:Math.min(X/z,1),W=X-d,$=Math.min(W,Math.min(U,k*V));U-=$,H.setLayout({angle:X-$,ratio:(X-$)/X},!0)}else d>0&&H.setLayout({angle:d,ratio:X===0?1:d/X},!0)}});var B=w,F=[];n.eachNode(function(H){var X=Math.max(H.getLayout().angle,d);H.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:B,endAngle:B+X*y,clockwise:x},!0),F[H.dataIndex]=B,B+=(X+f)*y}),n.eachEdge(function(H){var X=D?1:H.getValue("value"),V=E*(R?X:1)*y,W=H.node1.dataIndex,$=F[W]||0,te=Math.abs((H.node1.getLayout().ratio||1)*V),ue=$+te*y,ge=[s+c*Math.cos($),l+c*Math.sin($)],Se=[s+c*Math.cos(ue),l+c*Math.sin(ue)],Xe=H.node2.dataIndex,be=F[Xe]||0,we=Math.abs((H.node2.getLayout().ratio||1)*V),ze=be+we*y,oe=[s+c*Math.cos(be),l+c*Math.sin(be)],pe=[s+c*Math.cos(ze),l+c*Math.sin(ze)];H.setLayout({s1:ge,s2:Se,sStartAngle:$,sEndAngle:ue,t1:oe,t2:pe,tStartAngle:be,tEndAngle:ze,cx:s,cy:l,r:c,value:X,clockwise:x}),F[W]=ue,F[Xe]=ze})}}}function Pve(r){r.registerChartView(Eve),r.registerSeriesModel(kve),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,Ive),r.registerProcessor(ud("chord"))}var zve=(function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r})(),jve=(function(r){K(e,r);function e(t){var n=r.call(this,t)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new zve},e.prototype.buildPath=function(t,n){var a=Math.cos,i=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-a(l)*s*(s>=o/3?1:2),c=n.y-i(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(n.x+a(l)*s,n.y+i(l)*s),t.lineTo(n.x+a(n.angle)*o,n.y+i(n.angle)*o),t.lineTo(n.x-a(l)*s,n.y-i(l)*s),t.lineTo(u,c)},e})(tt);function Bve(r,e){var t=r.get("center"),n=e.getWidth(),a=e.getHeight(),i=Math.min(n,a),o=me(t[0],e.getWidth()),s=me(t[1],e.getHeight()),l=me(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function v0(r,e){var t=r==null?"":r+"";return e&&(ye(e)?t=e.replace("{value}",t):Ae(e)&&(t=e(r))),t}var Vve=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=Bve(t,a);this._renderMain(t,n,a,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,n,a,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),d=f.get("roundCap"),v=d?e1:rn,g=f.get("show"),x=f.getModel("lineStyle"),y=x.get("width"),b=[u,c];X1(b,!l),u=b[0],c=b[1];for(var w=c-u,T=u,C=[],D=0;g&&D<i.length;D++){var M=Math.min(Math.max(i[D][0],0),1);c=u+w*M;var N=new v({shape:{startAngle:T,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-y,r:o.r},silent:!0});N.setStyle({fill:i[D][1]}),N.setStyle(x.getLineStyle(["color","width"])),C.push(N),T=c}C.reverse(),O(C,function(E){return s.add(E)});var R=function(E){if(E<=0)return i[0][1];var k;for(k=0;k<i.length;k++)if(i[k][0]>=E&&(k===0?0:i[k-1][0])<E)return i[k][1];return i[k-1][1]};this._renderTicks(t,n,a,R,o,u,c,l,y),this._renderTitleAndDetail(t,n,a,R,o),this._renderAnchor(t,o),this._renderPointer(t,n,a,R,o,u,c,l,y)},e.prototype._renderTicks=function(t,n,a,i,o,s,l,u,c){for(var f=this.group,d=o.cx,v=o.cy,g=o.r,x=+t.get("min"),y=+t.get("max"),b=t.getModel("splitLine"),w=t.getModel("axisTick"),T=t.getModel("axisLabel"),C=t.get("splitNumber"),D=w.get("splitNumber"),M=me(b.get("length"),g),N=me(w.get("length"),g),R=s,E=(l-s)/C,k=E/D,I=b.getModel("lineStyle").getLineStyle(),z=w.getModel("lineStyle").getLineStyle(),P=b.get("distance"),G,U,B=0;B<=C;B++){if(G=Math.cos(R),U=Math.sin(R),b.get("show")){var F=P?P+c:c,H=new lr({shape:{x1:G*(g-F)+d,y1:U*(g-F)+v,x2:G*(g-M-F)+d,y2:U*(g-M-F)+v},style:I,silent:!0});I.stroke==="auto"&&H.setStyle({stroke:i(B/C)}),f.add(H)}if(T.get("show")){var F=T.get("distance")+P,X=v0(sr(B/C*(y-x)+x),T.get("formatter")),V=i(B/C),W=G*(g-M-F)+d,$=U*(g-M-F)+v,te=T.get("rotate"),ue=0;te==="radial"?(ue=-R+2*Math.PI,ue>Math.PI/2&&(ue+=Math.PI)):te==="tangential"?ue=-R-Math.PI/2:st(te)&&(ue=te*Math.PI/180),ue===0?f.add(new ot({style:Nt(T,{text:X,x:W,y:$,verticalAlign:U<-.8?"top":U>.8?"bottom":"middle",align:G<-.4?"left":G>.4?"right":"center"},{inheritColor:V}),silent:!0})):f.add(new ot({style:Nt(T,{text:X,x:W,y:$,verticalAlign:"middle",align:"center"},{inheritColor:V}),silent:!0,originX:W,originY:$,rotation:ue}))}if(w.get("show")&&B!==C){var F=w.get("distance");F=F?F+c:c;for(var ge=0;ge<=D;ge++){G=Math.cos(R),U=Math.sin(R);var Se=new lr({shape:{x1:G*(g-F)+d,y1:U*(g-F)+v,x2:G*(g-N-F)+d,y2:U*(g-N-F)+v},silent:!0,style:z});z.stroke==="auto"&&Se.setStyle({stroke:i((B+ge/D)/C)}),f.add(Se),R+=k}R-=k}else R+=E}},e.prototype._renderPointer=function(t,n,a,i,o,s,l,u,c){var f=this.group,d=this._data,v=this._progressEls,g=[],x=t.get(["pointer","show"]),y=t.getModel("progress"),b=y.get("show"),w=t.getData(),T=w.mapDimension("value"),C=+t.get("min"),D=+t.get("max"),M=[C,D],N=[s,l];function R(k,I){var z=w.getItemModel(k),P=z.getModel("pointer"),G=me(P.get("width"),o.r),U=me(P.get("length"),o.r),B=t.get(["pointer","icon"]),F=P.get("offsetCenter"),H=me(F[0],o.r),X=me(F[1],o.r),V=P.get("keepAspect"),W;return B?W=ur(B,H-G/2,X-U,G,U,null,V):W=new jve({shape:{angle:-Math.PI/2,width:G,r:U,x:H,y:X}}),W.rotation=-(I+Math.PI/2),W.x=o.cx,W.y=o.cy,W}function E(k,I){var z=y.get("roundCap"),P=z?e1:rn,G=y.get("overlap"),U=G?y.get("width"):c/w.count(),B=G?o.r-U:o.r-(k+1)*U,F=G?o.r:o.r-k*U,H=new P({shape:{startAngle:s,endAngle:I,cx:o.cx,cy:o.cy,clockwise:u,r0:B,r:F}});return G&&(H.z2=pt(w.get(T,k),[C,D],[100,0],!0)),H}(b||x)&&(w.diff(d).add(function(k){var I=w.get(T,k);if(x){var z=R(k,s);jt(z,{rotation:-((isNaN(+I)?N[0]:pt(I,M,N,!0))+Math.PI/2)},t),f.add(z),w.setItemGraphicEl(k,z)}if(b){var P=E(k,s),G=y.get("clip");jt(P,{shape:{endAngle:pt(I,M,N,G)}},t),f.add(P),pC(t.seriesIndex,w.dataType,k,P),g[k]=P}}).update(function(k,I){var z=w.get(T,k);if(x){var P=d.getItemGraphicEl(I),G=P?P.rotation:s,U=R(k,G);U.rotation=G,lt(U,{rotation:-((isNaN(+z)?N[0]:pt(z,M,N,!0))+Math.PI/2)},t),f.add(U),w.setItemGraphicEl(k,U)}if(b){var B=v[I],F=B?B.shape.endAngle:s,H=E(k,F),X=y.get("clip");lt(H,{shape:{endAngle:pt(z,M,N,X)}},t),f.add(H),pC(t.seriesIndex,w.dataType,k,H),g[k]=H}}).execute(),w.each(function(k){var I=w.getItemModel(k),z=I.getModel("emphasis"),P=z.get("focus"),G=z.get("blurScope"),U=z.get("disabled");if(x){var B=w.getItemGraphicEl(k),F=w.getItemVisual(k,"style"),H=F.fill;if(B instanceof kr){var X=B.style;B.useStyle(ie({image:X.image,x:X.x,y:X.y,width:X.width,height:X.height},F))}else B.useStyle(F),B.type!=="pointer"&&B.setColor(H);B.setStyle(I.getModel(["pointer","itemStyle"]).getItemStyle()),B.style.fill==="auto"&&B.setStyle("fill",i(pt(w.get(T,k),M,[0,1],!0))),B.z2EmphasisLift=0,_r(B,I),Ut(B,P,G,U)}if(b){var V=g[k];V.useStyle(w.getItemVisual(k,"style")),V.setStyle(I.getModel(["progress","itemStyle"]).getItemStyle()),V.z2EmphasisLift=0,_r(V,I),Ut(V,P,G,U)}}),this._progressEls=g)},e.prototype._renderAnchor=function(t,n){var a=t.getModel("anchor"),i=a.get("show");if(i){var o=a.get("size"),s=a.get("icon"),l=a.get("offsetCenter"),u=a.get("keepAspect"),c=ur(s,n.cx-o/2+me(l[0],n.r),n.cy-o/2+me(l[1],n.r),o,o,null,u);c.z2=a.get("showAbove")?1:0,c.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,n,a,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),f=+t.get("max"),d=new De,v=[],g=[],x=t.isAnimationEnabled(),y=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(b){v[b]=new ot({silent:!0}),g[b]=new ot({silent:!0})}).update(function(b,w){v[b]=s._titleEls[w],g[b]=s._detailEls[w]}).execute(),l.each(function(b){var w=l.getItemModel(b),T=l.get(u,b),C=new De,D=i(pt(T,[c,f],[0,1],!0)),M=w.getModel("title");if(M.get("show")){var N=M.get("offsetCenter"),R=o.cx+me(N[0],o.r),E=o.cy+me(N[1],o.r),k=v[b];k.attr({z2:y?0:2,style:Nt(M,{x:R,y:E,text:l.getName(b),align:"center",verticalAlign:"middle"},{inheritColor:D})}),C.add(k)}var I=w.getModel("detail");if(I.get("show")){var z=I.get("offsetCenter"),P=o.cx+me(z[0],o.r),G=o.cy+me(z[1],o.r),U=me(I.get("width"),o.r),B=me(I.get("height"),o.r),F=t.get(["progress","show"])?l.getItemVisual(b,"style").fill:D,k=g[b],H=I.get("formatter");k.attr({z2:y?0:2,style:Nt(I,{x:P,y:G,text:v0(T,H),width:isNaN(U)?null:U,height:isNaN(B)?null:B,align:"center",verticalAlign:"middle"},{inheritColor:F})}),hH(k,{normal:I},T,function(V){return v0(V,H)}),x&&dH(k,b,l,t,{getFormattedLabel:function(V,W,$,te,ue,ge){return v0(ge?ge.interpolatedValue:T,H)}}),C.add(k)}d.add(C)}),this.group.add(d),this._titleEls=v,this._detailEls=g},e.type="gauge",e})(_t),Gve=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,n){return cd(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,ee.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:ee.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:ee.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:ee.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:ee.color.neutral00,borderWidth:0,borderColor:ee.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:ee.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:ee.color.transparent,borderWidth:0,borderColor:ee.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:ee.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e})(Tt);function Hve(r){r.registerChartView(Vve),r.registerSeriesModel(Gve)}var Fve=["itemStyle","opacity"],Uve=(function(r){K(e,r);function e(t,n){var a=r.call(this)||this,i=a,o=new Fr,s=new ot;return i.setTextContent(s),a.setTextGuideLine(o),a.updateData(t,n,!0),a}return e.prototype.updateData=function(t,n,a){var i=this,o=t.hostModel,s=t.getItemModel(n),l=t.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(Fve);c=c??1,a||Pa(i),i.useStyle(t.getItemVisual(n,"style")),i.style.lineJoin="round",a?(i.setShape({points:l.points}),i.style.opacity=0,jt(i,{style:{opacity:c}},o,n)):lt(i,{style:{opacity:c},shape:{points:l.points}},o,n),_r(i,s),this._updateLabel(t,n),Ut(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n){var a=this,i=this.getTextGuideLine(),o=a.getTextContent(),s=t.hostModel,l=t.getItemModel(n),u=t.getItemLayout(n),c=u.label,f=t.getItemVisual(n,"style"),d=f.fill;Lr(o,Sr(l),{labelFetcher:t.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:t.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var v=l.getModel("label"),g=v.get("color"),x=g==="inherit"?d:null;a.setTextConfig({local:!0,inside:!!c.inside,insideStroke:x,outsideFill:x});var y=c.linePoints;i.setShape({points:y}),a.textGuideLineConfig={anchor:y?new ke(y[0][0],y[0][1]):null},lt(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),FD(a,UD(l),{stroke:d})},e})(nn),Yve=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new Uve(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,l),s.add(c),i.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);Ho(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e})(_t),Wve=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new fd(xe(this.getData,this),xe(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,n){return cd(this,{coordDimensions:["value"],encodeDefaulter:He(mD,this)})},e.prototype._defaultLabelLine=function(t){lc(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var n=this.getData(),a=r.prototype.getDataParams.call(this,t),i=n.mapDimension("value"),o=n.getSum(i);return a.percent=o?+(n.get(i,t)/o*100).toFixed(2):0,a.$vars.push("percent"),a},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:ee.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:ee.color.primary}}},e})(Tt);function Xve(r,e){for(var t=r.mapDimension("value"),n=r.mapArray(t,function(l){return l}),a=[],i=e==="ascending",o=0,s=r.count();o<s;o++)a[o]=o;return Ae(e)?a.sort(e):e!=="none"&&a.sort(function(l,u){return i?n[l]-n[u]:n[u]-n[l]}),a}function qve(r){var e=r.hostModel,t=e.get("orient");r.each(function(n){var a=r.getItemModel(n),i=a.getModel("label"),o=i.get("position"),s=a.getModel("labelLine"),l=r.getItemLayout(n),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",f,d,v,g;if(c)o==="insideLeft"?(d=(u[0][0]+u[3][0])/2+5,v=(u[0][1]+u[3][1])/2,f="left"):o==="insideRight"?(d=(u[1][0]+u[2][0])/2-5,v=(u[1][1]+u[2][1])/2,f="right"):(d=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,v=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),g=[[d,v],[d,v]];else{var x=void 0,y=void 0,b=void 0,w=void 0,T=s.get("length");o==="left"?(x=(u[3][0]+u[0][0])/2,y=(u[3][1]+u[0][1])/2,b=x-T,d=b-5,f="right"):o==="right"?(x=(u[1][0]+u[2][0])/2,y=(u[1][1]+u[2][1])/2,b=x+T,d=b+5,f="left"):o==="top"?(x=(u[3][0]+u[0][0])/2,y=(u[3][1]+u[0][1])/2,w=y-T,v=w-5,f="center"):o==="bottom"?(x=(u[1][0]+u[2][0])/2,y=(u[1][1]+u[2][1])/2,w=y+T,v=w+5,f="center"):o==="rightTop"?(x=t==="horizontal"?u[3][0]:u[1][0],y=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(w=y-T,v=w-5,f="center"):(b=x+T,d=b+5,f="top")):o==="rightBottom"?(x=u[2][0],y=u[2][1],t==="horizontal"?(w=y+T,v=w+5,f="center"):(b=x+T,d=b+5,f="bottom")):o==="leftTop"?(x=u[0][0],y=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(w=y-T,v=w-5,f="center"):(b=x-T,d=b-5,f="right")):o==="leftBottom"?(x=t==="horizontal"?u[1][0]:u[3][0],y=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(w=y+T,v=w+5,f="center"):(b=x-T,d=b-5,f="right")):(x=(u[1][0]+u[2][0])/2,y=(u[1][1]+u[2][1])/2,t==="horizontal"?(w=y+T,v=w+5,f="center"):(b=x+T,d=b+5,f="left")),t==="horizontal"?(b=x,d=b):(w=y,v=w),g=[[x,y],[b,w]]}l.label={linePoints:g,x:d,y:v,verticalAlign:"middle",textAlign:f,inside:c}})}function Zve(r,e){r.eachSeriesByType("funnel",function(t){var n=t.getData(),a=n.mapDimension("value"),i=t.get("sort"),o=wr(t,e),s=Ht(t.getBoxLayoutParams(),o.refContainer),l=t.get("orient"),u=s.width,c=s.height,f=Xve(n,i),d=s.x,v=s.y,g=l==="horizontal"?[me(t.get("minSize"),c),me(t.get("maxSize"),c)]:[me(t.get("minSize"),u),me(t.get("maxSize"),u)],x=n.getDataExtent(a),y=t.get("min"),b=t.get("max");y==null&&(y=Math.min(x[0],0)),b==null&&(b=x[1]);var w=t.get("funnelAlign"),T=t.get("gap"),C=l==="horizontal"?u:c,D=(C-T*(n.count()-1))/n.count(),M=function(U,B){if(l==="horizontal"){var F=n.get(a,U)||0,H=pt(F,[y,b],g,!0),X=void 0;switch(w){case"top":X=v;break;case"center":X=v+(c-H)/2;break;case"bottom":X=v+(c-H);break}return[[B,X],[B,X+H]]}var V=n.get(a,U)||0,W=pt(V,[y,b],g,!0),$;switch(w){case"left":$=d;break;case"center":$=d+(u-W)/2;break;case"right":$=d+u-W;break}return[[$,B],[$+W,B]]};i==="ascending"&&(D=-D,T=-T,l==="horizontal"?d+=u:v+=c,f=f.reverse());for(var N=0;N<f.length;N++){var R=f[N],E=f[N+1],k=n.getItemModel(R);if(l==="horizontal"){var I=k.get(["itemStyle","width"]);I==null?I=D:(I=me(I,u),i==="ascending"&&(I=-I));var z=M(R,d),P=M(E,d+I);d+=I+T,n.setItemLayout(R,{points:z.concat(P.slice().reverse())})}else{var G=k.get(["itemStyle","height"]);G==null?G=D:(G=me(G,c),i==="ascending"&&(G=-G));var z=M(R,v),P=M(E,v+G);v+=G+T,n.setItemLayout(R,{points:z.concat(P.slice().reverse())})}}qve(n)})}function $ve(r){r.registerChartView(Yve),r.registerSeriesModel(Wve),r.registerLayout(Zve),r.registerProcessor(ud("funnel"))}var Kve=.3,Qve=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new De,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,n,a,i){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.dimensions,f=Rz(t);s.diff(l).add(d).update(v).remove(g).execute();function d(y){var b=Lz(s,o,y,c,u);MT(b,s,y,f)}function v(y,b){var w=l.getItemGraphicEl(b),T=uU(s,y,c,u);s.setItemGraphicEl(y,w),lt(w,{shape:{points:T}},t,y),Pa(w),MT(w,s,y,f)}function g(y){var b=l.getItemGraphicEl(y);o.remove(b)}if(!this._initialized){this._initialized=!0;var x=Jve(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(x)}this._data=s},e.prototype.incrementalPrepareRender=function(t,n,a){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,n,a){for(var i=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=Rz(n),u=this._progressiveEls=[],c=t.start;c<t.end;c++){var f=Lz(i,this._dataGroup,c,s,o);f.incremental=!0,MT(f,i,c,l),u.push(f)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e})(_t);function Jve(r,e,t){var n=r.model,a=r.getRect(),i=new qe({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),o=n.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),jt(i,{shape:{width:a.width,height:a.height}},e,t),i}function uU(r,e,t,n){for(var a=[],i=0;i<t.length;i++){var o=t[i],s=r.get(r.mapDimension(o),e);epe(s,n.getAxis(o).type)||a.push(n.dataToPoint(s,o))}return a}function Lz(r,e,t,n,a){var i=uU(r,t,n,a),o=new Fr({shape:{points:i},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function Rz(r){var e=r.get("smooth",!0);return e===!0&&(e=Kve),e=Xi(e),Jr(e)&&(e=0),{smooth:e}}function MT(r,e,t,n){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",n.smooth);var a=e.getItemModel(t),i=a.getModel("emphasis");_r(r,a,"lineStyle"),Ut(r,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function epe(r,e){return e==="category"?r==null:r==null||isNaN(r)}var tpe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,n){return to(null,this,{useEncodeDefaulter:xe(rpe,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var n=this.coordinateSystem,a=this.getData(),i=[];return n.eachActiveState(a,function(o,s){t===o&&i.push(a.getRawIndex(s))}),i},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})(Tt);function rpe(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(e){var t={};return O(e.dimensions,function(n){var a=npe(n);t[n]=a}),t}}function npe(r){return+r.replace("dim","")}var ape=["lineStyle","opacity"],ipe={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,n={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(a,i){t.eachActiveState(i,function(o,s){var l=n[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(s).get(ape,!0);u!=null&&(l=u)}var c=i.ensureUniqueItemVisual(s,"style");c.opacity=l},a.start,a.end)}}}};function ope(r){spe(r),lpe(r)}function spe(r){if(!r.parallel){var e=!1;O(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function lpe(r){var e=Lt(r.parallelAxis);O(e,function(t){if(Re(t)){var n=t.parallelIndex||0,a=Lt(r.parallel)[n];a&&a.parallelAxisDefault&&Ye(t,a.parallelAxisDefault,!1)}})}var upe=5,cpe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this._model=t,this._api=a,this._handlers||(this._handlers={},O(fpe,function(i,o){a.getZr().on(o,this._handlers[o]=xe(i,this))},this)),ad(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,n){rg(this,"_throttledDispatchExpand"),O(this._handlers,function(a,i){n.getZr().off(i,a)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(ie({type:"parallelAxisExpand"},t))},e.type="parallel",e})(Rt),fpe={mousedown:function(r){DT(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(DT(this,"click")&&e){var t=[r.offsetX,r.offsetY],n=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(n>upe)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);a.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!DT(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),n=t.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function DT(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var hpe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var n=this.option;t&&Ye(n,t,!0),this._initDimensions()},e.prototype.contains=function(t,n){var a=t.get("parallelIndex");return a!=null&&n.getComponent("parallel",a)===this},e.prototype.setAxisExpand=function(t){O(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){t.hasOwnProperty(n)&&(this.option[n]=t[n])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],n=this.parallelAxisIndex=[],a=dt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);O(a,function(i){t.push("dim"+i.get("dim")),n.push(i.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})(Qe),dpe=(function(r){K(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e})(Ba);function wl(r,e,t,n,a,i){r=r||0;var o=t[1]-t[0];if(a!=null&&(a=Of(a,[0,o])),i!=null&&(i=Math.max(i,a??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Of(s,[0,o]),a=i=Of(s,[a,i]),n=0}e[0]=Of(e[0],t),e[1]=Of(e[1],t);var l=NT(e,n);e[n]+=r;var u=a||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Of(e[n],c);var f;return f=NT(e,n),a!=null&&(f.sign!==l.sign||f.span<a)&&(e[1-n]=e[n]+l.sign*a),f=NT(e,n),i!=null&&f.span>i&&(e[1-n]=e[n]+f.sign*i),e}function NT(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Of(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var LT=O,cU=Math.min,fU=Math.max,Ez=Math.floor,vpe=Math.ceil,kz=sr,ppe=Math.PI,gpe=(function(){function r(e,t,n){this.type="parallel",this._axesMap=Te(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var a=e.dimensions,i=e.parallelAxisIndex;LT(a,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new dpe(o,Yg(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,a=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=n&&o<=n+t.axisLength&&s>=a&&s<=a+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(e.contains(n,t)){var a=n.getData();LT(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(a,a.mapDimension(i)),pc(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){var n=wr(e,t).refContainer;this._rect=Ht(e.getBoxLayoutParams(),n),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=["x","y"],a=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[a[o]],l=[0,s],u=this.dimensions.length,c=p0(e.get("axisExpandWidth"),l),f=p0(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,v=e.get("axisExpandWindow"),g;if(v)g=p0(v[1]-v[0],l),v[1]=v[0]+g;else{g=p0(c*(f-1),l);var x=e.get("axisExpandCenter")||Ez(u/2);v=[c*x-g/2],v[1]=v[0]+g}var y=(s-g)/(u-f);y<3&&(y=0);var b=[Ez(kz(v[0]/c,1))+1,vpe(kz(v[1]/c,1))-1],w=y/c*v[0];return{layout:i,pixelDimIndex:o,layoutBase:t[n[o]],layoutLength:s,axisBase:t[n[1-o]],axisLength:t[a[1-o]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:y,axisExpandWindow:v,axisCount:u,winInnerIndices:b,axisExpandWindow0Pos:w}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;t.each(function(o){var s=[0,a.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),LT(n,function(o,s){var l=(a.axisExpandable?ype:mpe)(s,a),u={horizontal:{x:l.position,y:a.axisLength},vertical:{x:0,y:l.position}},c={horizontal:ppe/2,vertical:0},f=[u[i].x+e.x,u[i].y+e.y],d=c[i],v=Dr();ns(v,v,d),ai(v,v,f),this._axesLayout[o]={position:f,rotation:d,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,n,a){n==null&&(n=0),a==null&&(a=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];O(o,function(y){s.push(e.mapDimension(y)),l.push(i.get(y).model)});for(var u=this.hasAxisBrushed(),c=n;c<a;c++){var f=void 0;if(!u)f="normal";else{f="active";for(var d=e.getValues(s,c),v=0,g=o.length;v<g;v++){var x=l[v].getActiveState(d[v]);if(x==="inactive"){f="inactive";break}}}t(f,c)}},r.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,n=!1,a=0,i=e.length;a<i;a++)t.get(e[a]).model.getActiveState()!=="normal"&&(n=!0);return n},r.prototype.axisCoordToPoint=function(e,t){var n=this._axesLayout[t];return ei([e,0],n.transform)},r.prototype.getAxisLayout=function(e){return Me(this._axesLayout[e])},r.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,a=t.axisExpandWindow.slice(),i=a[1]-a[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:a};var s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",c=t.axisCollapseWidth,f=this._model.get("axisExpandSlideTriggerArea"),d=f[0]!=null;if(c)d&&c&&s<i*f[0]?(u="jump",l=s-i*f[2]):d&&c&&s>i*(1-f[0])?(u="jump",l=s-i*(1-f[2])):(l=s-i*f[1])>=0&&(l=s-i*(1-f[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?wl(l,a,o,"all"):u="none";else{var v=a[1]-a[0],g=o[1]*s/v;a=[fU(0,g-v/2)],a[1]=cU(o[1],a[0]+v),a[0]=a[1]-v}return{axisExpandWindow:a,behavior:u}},r})();function p0(r,e){return cU(fU(r,e[0]),e[1])}function mpe(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function ype(r,e){var t=e.layoutLength,n=e.axisExpandWidth,a=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,c;return r<o[0]?(s=r*i,c=i):r<=o[1]?(s=e.axisExpandWindow0Pos+r*n-e.axisExpandWindow[0],l=n,u=!0):(s=t-(a-1-r)*i,c=i),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}function xpe(r,e){var t=[];return r.eachComponent("parallel",function(n,a){var i=new gpe(n,r,e);i.name="parallel_"+a,i.resize(n,e),n.coordinateSystem=i,i.model=n,t.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var a=n.getReferringComponents("parallel",Zt).models[0];n.coordinateSystem=a.coordinateSystem}}),t}var bpe={create:xpe},bA=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return cc([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var n=this.activeIntervals=Me(t);if(n)for(var a=n.length-1;a>=0;a--)ra(n[a])},e.prototype.getActiveState=function(t){var n=this.activeIntervals;if(!n.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(n.length===1){var a=n[0];if(a[0]<=t&&t<=a[1])return"active"}else for(var i=0,o=n.length;i<o;i++)if(n[i][0]<=t&&t<=n[i][1])return"active";return"inactive"},e})(Qe);Jt(bA,ld);var gc=!0,gg=Math.min,Bh=Math.max,_pe=Math.pow,Spe=1e4,wpe=6,Tpe=6,Iz="globalPan",Cpe={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Ape={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Oz={brushStyle:{lineWidth:2,stroke:ee.color.backgroundTint,fill:ee.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},Mpe=0,mN=(function(r){K(e,r);function e(t){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new De,n._uid="brushController_"+Mpe++,O(Ipe,function(a,i){this._handlers[i]=xe(a,this)},n),n}return e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var n=this._zr;this._enableGlobalPan||che(n,Iz,this._uid),O(this._handlers,function(a,i){n.on(i,a)}),this._brushType=t.brushType,this._brushOption=Ye(Me(Oz),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;fhe(t,Iz,this._uid),O(this._handlers,function(n,a){t.off(a,n)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var n=this._panels={};O(t,function(a){n[a.panelId]=Me(a)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=n.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=fe(t,function(d){return Ye(Me(Oz),d,!0)});var n="\0-brush-index-",a=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new Qo(a,t,u,l).add(c).update(c).remove(f).execute(),this;function l(d,v){return(d.id!=null?d.id:n+v)+"-"+d.brushType}function u(d,v){return l(d.__brushOption,v)}function c(d,v){var g=t[d];if(v!=null&&a[v]===s)i[d]=a[v];else{var x=i[d]=v!=null?(a[v].__brushOption=g,a[v]):dU(o,hU(o,g));yN(o,x)}}function f(d){a[d]!==s&&o.group.remove(a[d])}},e.prototype.unmount=function(){return this.enableBrush(!1),_A(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e})(za);function hU(r,e){var t=pb[e.brushType].createCover(r,e);return t.__brushOption=e,pU(t,e),r.group.add(t),t}function dU(r,e){var t=xN(e);return t.endCreating&&(t.endCreating(r,e),pU(e,e.__brushOption)),e}function vU(r,e){var t=e.__brushOption;xN(e).updateCoverShape(r,e,t.range,t)}function pU(r,e){var t=e.z;t==null&&(t=Spe),r.traverse(function(n){n.z=t,n.z2=t})}function yN(r,e){xN(e).updateCommon(r,e),vU(r,e)}function xN(r){return pb[r.__brushOption.brushType]}function bN(r,e,t){var n=r._panels;if(!n)return gc;var a,i=r._transform;return O(n,function(o){o.isTargetByCursor(e,t,i)&&(a=o)}),a}function gU(r,e){var t=r._panels;if(!t)return gc;var n=e.__brushOption.panelId;return n!=null?t[n]:gc}function _A(r){var e=r._covers,t=e.length;return O(e,function(n){r.group.remove(n)},r),e.length=0,!!t}function mc(r,e){var t=fe(r._covers,function(n){var a=n.__brushOption,i=Me(a.range);return{brushType:a.brushType,panelId:a.panelId,range:i}});r.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Dpe(r){var e=r._track;if(!e.length)return!1;var t=e[e.length-1],n=e[0],a=t[0]-n[0],i=t[1]-n[1],o=_pe(a*a+i*i,.5);return o>wpe}function mU(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function yU(r,e,t,n){var a=new De;return a.add(new qe({name:"main",style:_N(t),silent:!0,draggable:!0,cursor:"move",drift:He(Pz,r,e,a,["n","s","w","e"]),ondragend:He(mc,e,{isEnd:!0})})),O(n,function(i){a.add(new qe({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:He(Pz,r,e,a,i),ondragend:He(mc,e,{isEnd:!0})}))}),a}function xU(r,e,t,n){var a=n.brushStyle.lineWidth||0,i=Bh(a,Tpe),o=t[0][0],s=t[1][0],l=o-a/2,u=s-a/2,c=t[0][1],f=t[1][1],d=c-i+a/2,v=f-i+a/2,g=c-o,x=f-s,y=g+a,b=x+a;wo(r,e,"main",o,s,g,x),n.transformable&&(wo(r,e,"w",l,u,i,b),wo(r,e,"e",d,u,i,b),wo(r,e,"n",l,u,y,i),wo(r,e,"s",l,v,y,i),wo(r,e,"nw",l,u,i,i),wo(r,e,"ne",d,u,i,i),wo(r,e,"sw",l,v,i,i),wo(r,e,"se",d,v,i,i))}function SA(r,e){var t=e.__brushOption,n=t.transformable,a=e.childAt(0);a.useStyle(_N(t)),a.attr({silent:!n,cursor:n?"move":"default"}),O([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?wA(r,i[0]):Lpe(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?Ape[s]+"-resize":null})})}function wo(r,e,t,n,a,i,o){var s=e.childOfName(t);s&&s.setShape(Epe(SN(r,e,[[n,a],[n+i,a+o]])))}function _N(r){return Le({strokeNoScale:!0},r.brushStyle)}function bU(r,e,t,n){var a=[gg(r,t),gg(e,n)],i=[Bh(r,t),Bh(e,n)];return[[a[0],i[0]],[a[1],i[1]]]}function Npe(r){return dl(r.group)}function wA(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=K1(t[e],Npe(r));return n[a]}function Lpe(r,e){var t=[wA(r,e[0]),wA(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function Pz(r,e,t,n,a,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=_U(e,a,i);O(n,function(u){var c=Cpe[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(bU(s[0][0],s[1][0],s[0][1],s[1][1])),yN(e,t),mc(e,{isEnd:!1})}function Rpe(r,e,t,n){var a=e.__brushOption.range,i=_U(r,t,n);O(a,function(o){o[0]+=i[0],o[1]+=i[1]}),yN(r,e),mc(r,{isEnd:!1})}function _U(r,e,t){var n=r.group,a=n.transformCoordToLocal(e,t),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function SN(r,e,t){var n=gU(r,e);return n&&n!==gc?n.clipPath(t,r._transform):Me(t)}function Epe(r){var e=gg(r[0][0],r[1][0]),t=gg(r[0][1],r[1][1]),n=Bh(r[0][0],r[1][0]),a=Bh(r[0][1],r[1][1]);return{x:e,y:t,width:n-e,height:a-t}}function kpe(r,e,t){if(!(!r._brushType||Ope(r,e.offsetX,e.offsetY))){var n=r._zr,a=r._covers,i=bN(r,e,t);if(!r._dragging)for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(i&&(i===gc||s.panelId===i.panelId)&&pb[s.brushType].contain(a[o],t[0],t[1]))return}i&&n.setCursorStyle("crosshair")}}function TA(r){var e=r.event;e.preventDefault&&e.preventDefault()}function CA(r,e,t){return r.childOfName("main").contain(e,t)}function SU(r,e,t,n){var a=r._creatingCover,i=r._creatingPanel,o=r._brushOption,s;if(r._track.push(t.slice()),Dpe(r)||a){if(i&&!a){o.brushMode==="single"&&_A(r);var l=Me(o);l.brushType=zz(l.brushType,i),l.panelId=i===gc?null:i.panelId,a=r._creatingCover=hU(r,l),r._covers.push(a)}if(a){var u=pb[zz(r._brushType,i)],c=a.__brushOption;c.range=u.getCreatingRange(SN(r,a,r._track)),n&&(dU(r,a),u.updateCommon(r,a)),vU(r,a),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&bN(r,e,t)&&_A(r)&&(s={isEnd:n,removeOnClick:!0});return s}function zz(r,e){return r==="auto"?e.defaultBrushType:r}var Ipe={mousedown:function(r){if(this._dragging)jz(this,r);else if(!r.target||!r.target.draggable){TA(r);var e=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var t=this._creatingPanel=bN(this,r,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(r){var e=r.offsetX,t=r.offsetY,n=this.group.transformCoordToLocal(e,t);if(kpe(this,r,n),this._dragging){TA(r);var a=SU(this,r,n,!1);a&&mc(this,a)}},mouseup:function(r){jz(this,r)}};function jz(r,e){if(r._dragging){TA(e);var t=e.offsetX,n=e.offsetY,a=r.group.transformCoordToLocal(t,n),i=SU(r,e,a,!0);r._dragging=!1,r._track=[],r._creatingCover=null,i&&mc(r,i)}}function Ope(r,e,t){var n=r._zr;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var pb={lineX:Bz(0),lineY:Bz(1),rect:{createCover:function(r,e){function t(n){return n}return yU({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=mU(r);return bU(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){xU(r,e,t,n)},updateCommon:SA,contain:CA},polygon:{createCover:function(r,e){var t=new De;return t.add(new Fr({name:"main",style:_N(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new nn({name:"main",draggable:!0,drift:He(Rpe,r,e),ondragend:He(mc,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,n){e.childAt(0).setShape({points:SN(r,e,t)})},updateCommon:SA,contain:CA}};function Bz(r){return{createCover:function(e,t){return yU({toRectRange:function(n){var a=[n,[0,100]];return r&&a.reverse(),a},fromRectRange:function(n){return n[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=mU(e),n=gg(t[0][r],t[1][r]),a=Bh(t[0][r],t[1][r]);return[n,a]},updateCoverShape:function(e,t,n,a){var i,o=gU(e,t);if(o!==gc&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,i];r&&l.reverse(),xU(e,t,l,a)},updateCommon:SA,contain:CA}}function wU(r){return r=wN(r),function(e){return QM(e,r)}}function TU(r,e){return r=wN(r),function(t){var n=e??t,a=n?r.width:r.height,i=n?r.x:r.y;return[i,i+(a||0)]}}function CU(r,e,t){var n=wN(r);return function(a,i){return n.contain(i[0],i[1])&&!L7(a,e,t)}}function wN(r){return Ie.create(r)}var Ppe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){r.prototype.init.apply(this,arguments),(this._brushController=new mN(n.getZr())).on("brush",xe(this._onBrush,this))},e.prototype.render=function(t,n,a,i){if(!zpe(t,n,i)){this.axisModel=t,this.api=a,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new De,this.group.add(this._axisGroup),!!t.get("show")){var s=Bpe(t,n),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,f=t.axis.dim,d=l.getAxisLayout(f),v=ie({strokeContainThreshold:c},d),g=new Sn(t,a,v);g.build(),this._axisGroup.add(g.group),this._refreshBrushController(v,u,t,s,c,a),Gg(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,n,a,i,o,s){var l=a.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=Ie.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:wU(f),isTargetByCursor:CU(f,s,i),getLinearBrushOtherExtent:TU(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(jpe(a))},e.prototype._onBrush=function(t){var n=t.areas,a=this.axisModel,i=a.axis,o=fe(n,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!a.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:a.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e})(Rt);function zpe(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function jpe(r){var e=r.axis;return fe(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function Bpe(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var Vpe={type:"axisAreaSelect",event:"axisAreaSelected"};function Gpe(r){r.registerAction(Vpe,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var Hpe={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function AU(r){r.registerComponentView(cpe),r.registerComponentModel(hpe),r.registerCoordinateSystem("parallel",bpe),r.registerPreprocessor(ope),r.registerComponentModel(bA),r.registerComponentView(Ppe),zh(r,"parallel",bA,Hpe),Gpe(r)}function Fpe(r){We(AU),r.registerChartView(Qve),r.registerSeriesModel(tpe),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,ipe)}var Upe=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r})(),Ype=(function(r){K(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Upe},e.prototype.buildPath=function(t,n){var a=n.extent;t.moveTo(n.x1,n.y1),t.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(t.lineTo(n.x2+a,n.y2),t.bezierCurveTo(n.cpx2+a,n.cpy2,n.cpx1+a,n.cpy1,n.x1+a,n.y1)):(t.lineTo(n.x2,n.y2+a),t.bezierCurveTo(n.cpx2,n.cpy2+a,n.cpx1,n.cpy1+a,n.x1,n.y1+a)),t.closePath()},e.prototype.highlight=function(){$o(this)},e.prototype.downplay=function(){Ko(this)},e})(tt),Wpe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new De,t._focusAdjacencyDisabled=!1,t}return e.prototype.init=function(t,n){this._controller=new Ac(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,n,a){var i=this,o=t.getGraph(),s=this._mainGroup,l=t.layoutInfo,u=l.width,c=l.height,f=t.getData(),d=t.getData("edge"),v=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(t,a),R7(t,a,s,this._controller,this._controllerHost,null),o.eachEdge(function(g){var x=new Ype,y=Pe(x);y.dataIndex=g.dataIndex,y.seriesIndex=t.seriesIndex,y.dataType="edge";var b=g.getModel(),w=b.getModel("lineStyle"),T=w.get("curveness"),C=g.node1.getLayout(),D=g.node1.getModel(),M=D.get("localX"),N=D.get("localY"),R=g.node2.getLayout(),E=g.node2.getModel(),k=E.get("localX"),I=E.get("localY"),z=g.getLayout(),P,G,U,B,F,H,X,V;x.shape.extent=Math.max(1,z.dy),x.shape.orient=v,v==="vertical"?(P=(M!=null?M*u:C.x)+z.sy,G=(N!=null?N*c:C.y)+C.dy,U=(k!=null?k*u:R.x)+z.ty,B=I!=null?I*c:R.y,F=P,H=G*(1-T)+B*T,X=U,V=G*T+B*(1-T)):(P=(M!=null?M*u:C.x)+C.dx,G=(N!=null?N*c:C.y)+z.sy,U=k!=null?k*u:R.x,B=(I!=null?I*c:R.y)+z.ty,F=P*(1-T)+U*T,H=G,X=P*T+U*(1-T),V=B),x.setShape({x1:P,y1:G,x2:U,y2:B,cpx1:F,cpy1:H,cpx2:X,cpy2:V}),x.useStyle(w.getItemStyle()),Vz(x.style,v,g);var W=""+b.get("value"),$=Sr(b,"edgeLabel");Lr(x,$,{labelFetcher:{getFormattedLabel:function(ge,Se,Xe,be,we,ze){return t.getFormattedLabel(ge,Se,"edge",be,zn(we,$.normal&&$.normal.get("formatter"),W),ze)}},labelDataIndex:g.dataIndex,defaultText:W}),x.setTextConfig({position:"inside"});var te=b.getModel("emphasis");_r(x,b,"lineStyle",function(ge){var Se=ge.getItemStyle();return Vz(Se,v,g),Se}),s.add(x),d.setItemGraphicEl(g.dataIndex,x);var ue=te.get("focus");Ut(x,ue==="adjacency"?g.getAdjacentDataIndices():ue==="trajectory"?g.getTrajectoryDataIndices():ue,te.get("blurScope"),te.get("disabled"))}),o.eachNode(function(g){var x=g.getLayout(),y=g.getModel(),b=y.get("localX"),w=y.get("localY"),T=y.getModel("emphasis"),C=y.get(["itemStyle","borderRadius"])||0,D=new qe({shape:{x:b!=null?b*u:x.x,y:w!=null?w*c:x.y,width:x.dx,height:x.dy,r:C},style:y.getModel("itemStyle").getItemStyle(),z2:10});Lr(D,Sr(y),{labelFetcher:{getFormattedLabel:function(N,R){return t.getFormattedLabel(N,R,"node")}},labelDataIndex:g.dataIndex,defaultText:g.id}),D.disableLabelAnimation=!0,D.setStyle("fill",g.getVisual("color")),D.setStyle("decal",g.getVisual("style").decal),_r(D,y),s.add(D),f.setItemGraphicEl(g.dataIndex,D),Pe(D).dataType="node";var M=T.get("focus");Ut(D,M==="adjacency"?g.getAdjacentDataIndices():M==="trajectory"?g.getTrajectoryDataIndices():M,T.get("blurScope"),T.get("disabled"))}),f.eachItemGraphicEl(function(g,x){var y=f.getItemModel(x);y.get("draggable")&&(g.drift=function(b,w){i._focusAdjacencyDisabled=!0,this.shape.x+=b,this.shape.y+=w,this.dirty(),a.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(x),localX:this.shape.x/u,localY:this.shape.y/c})},g.ondragend=function(){i._focusAdjacencyDisabled=!1},g.draggable=!0,g.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(Xpe(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(t,n){var a=t.layoutInfo,i=a.width,o=a.height,s=t.coordinateSystem=new Mc(null,{api:n,ecModel:t.ecModel});s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(0,0,i,o),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e})(_t);function Vz(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var n=t.node1.getVisual("color"),a=t.node2.getVisual("color");ye(n)&&ye(a)&&(r.fill=new bc(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:a,offset:1}]))}}function Xpe(r,e,t){var n=new qe({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return jt(n,{shape:{width:r.width+20}},e,t),n}var qpe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new et(o[l],this,n));var u=gN(i,a,this,!0,c);return u.data;function c(f,d){f.wrapMethod("getItemModel",function(v,g){var x=v.parentModel,y=x.getData().getItemLayout(g);if(y){var b=y.depth,w=x.levelModels[b];w&&(v.parentModel=w)}return v}),d.wrapMethod("getItemModel",function(v,g){var x=v.parentModel,y=x.getGraph().getEdgeByIndex(g),b=y.node1.getLayout();if(b){var w=b.depth,T=x.levelModels[w];T&&(v.parentModel=T)}return v})}},e.prototype.setNodePosition=function(t,n){var a=this.option.data||this.option.nodes,i=a[t];i.localX=n[0],i.localY=n[1]},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,a){function i(v){return isNaN(v)||v==null}if(a==="edge"){var o=this.getDataParams(t,a),s=o.data,l=o.value,u=s.source+" -- "+s.target;return pr("nameValue",{name:u,value:l,noValue:i(l)})}else{var c=this.getGraph().getNodeByIndex(t),f=c.getLayout().value,d=this.getDataParams(t,a).data.name;return pr("nameValue",{name:d!=null?d+"":null,value:f,noValue:i(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,n){var a=r.prototype.getDataParams.call(this,t,n);if(a.value==null&&n==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;a.value=o}return a},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:ee.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:ee.color.primary}},animationEasing:"linear",animationDuration:1e3},e})(Tt);function Zpe(r,e){r.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),a=t.get("nodeGap"),i=wr(t,e).refContainer,o=Ht(t.getBoxLayoutParams(),i);t.layoutInfo=o;var s=o.width,l=o.height,u=t.getGraph(),c=u.nodes,f=u.edges;Kpe(c);var d=dt(c,function(y){return y.getLayout().value===0}),v=d.length!==0?0:t.get("layoutIterations"),g=t.get("orient"),x=t.get("nodeAlign");$pe(c,f,n,a,s,l,v,g,x)})}function $pe(r,e,t,n,a,i,o,s,l){Qpe(r,e,t,a,i,s,l),rge(r,e,i,a,n,o,s),fge(r,s)}function Kpe(r){O(r,function(e){var t=gl(e.outEdges,l1),n=gl(e.inEdges,l1),a=e.getValue()||0,i=Math.max(t,n,a);e.setLayout({value:i},!0)})}function Qpe(r,e,t,n,a,i,o){for(var s=[],l=[],u=[],c=[],f=0,d=0;d<e.length;d++)s[d]=1;for(var d=0;d<r.length;d++)l[d]=r[d].inEdges.length,l[d]===0&&u.push(r[d]);for(var v=-1;u.length;){for(var g=0;g<u.length;g++){var x=u[g],y=x.hostGraph.data.getRawDataItem(x.dataIndex),b=y.depth!=null&&y.depth>=0;b&&y.depth>v&&(v=y.depth),x.setLayout({depth:b?y.depth:f},!0),i==="vertical"?x.setLayout({dy:t},!0):x.setLayout({dx:t},!0);for(var w=0;w<x.outEdges.length;w++){var T=x.outEdges[w],C=e.indexOf(T);s[C]=0;var D=T.node2,M=r.indexOf(D);--l[M]===0&&c.indexOf(D)<0&&c.push(D)}}++f,u=c,c=[]}for(var d=0;d<s.length;d++)if(s[d]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var N=v>f-1?v:f-1;o&&o!=="left"&&Jpe(r,o,i,N);var R=i==="vertical"?(a-t)/N:(n-t)/N;tge(r,R,i)}function MU(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function Jpe(r,e,t,n){if(e==="right"){for(var a=[],i=r,o=0;i.length;){for(var s=0;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];a.indexOf(c.node1)<0&&a.push(c.node1)}}i=a,a=[],++o}O(r,function(f){MU(f)||f.setLayout({depth:Math.max(0,n-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&ege(r,n)}function ege(r,e){O(r,function(t){!MU(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function tge(r,e,t){O(r,function(n){var a=n.getLayout().depth*e;t==="vertical"?n.setLayout({y:a},!0):n.setLayout({x:a},!0)})}function rge(r,e,t,n,a,i,o){var s=nge(r,o);age(s,e,t,n,a,o),RT(s,a,t,n,o);for(var l=1;i>0;i--)l*=.99,ige(s,l,o),RT(s,a,t,n,o),cge(s,l,o),RT(s,a,t,n,o)}function nge(r,e){var t=[],n=e==="vertical"?"y":"x",a=cC(r,function(i){return i.getLayout()[n]});return a.keys.sort(function(i,o){return i-o}),O(a.keys,function(i){t.push(a.buckets.get(i))}),t}function age(r,e,t,n,a,i){var o=1/0;O(r,function(s){var l=s.length,u=0;O(s,function(f){u+=f.getLayout().value});var c=i==="vertical"?(n-(l-1)*a)/u:(t-(l-1)*a)/u;c<o&&(o=c)}),O(r,function(s){O(s,function(l,u){var c=l.getLayout().value*o;i==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),O(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function RT(r,e,t,n,a){var i=a==="vertical"?"x":"y";O(r,function(o){o.sort(function(x,y){return x.getLayout()[i]-y.getLayout()[i]});for(var s,l,u,c=0,f=o.length,d=a==="vertical"?"dx":"dy",v=0;v<f;v++)l=o[v],u=c-l.getLayout()[i],u>0&&(s=l.getLayout()[i]+u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]+l.getLayout()[d]+e;var g=a==="vertical"?n:t;if(u=c-e-g,u>0){s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var v=f-2;v>=0;--v)l=o[v],u=l.getLayout()[i]+l.getLayout()[d]+e-c,u>0&&(s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]}})}function ige(r,e,t){O(r.slice().reverse(),function(n){O(n,function(a){if(a.outEdges.length){var i=gl(a.outEdges,oge,t)/gl(a.outEdges,l1);if(isNaN(i)){var o=a.outEdges.length;i=o?gl(a.outEdges,sge,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-Tl(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-Tl(a,t))*e;a.setLayout({y:l},!0)}}})})}function oge(r,e){return Tl(r.node2,e)*r.getValue()}function sge(r,e){return Tl(r.node2,e)}function lge(r,e){return Tl(r.node1,e)*r.getValue()}function uge(r,e){return Tl(r.node1,e)}function Tl(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function l1(r){return r.getValue()}function gl(r,e,t){for(var n=0,a=r.length,i=-1;++i<a;){var o=+e(r[i],t);isNaN(o)||(n+=o)}return n}function cge(r,e,t){O(r,function(n){O(n,function(a){if(a.inEdges.length){var i=gl(a.inEdges,lge,t)/gl(a.inEdges,l1);if(isNaN(i)){var o=a.inEdges.length;i=o?gl(a.inEdges,uge,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-Tl(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-Tl(a,t))*e;a.setLayout({y:l},!0)}}})})}function fge(r,e){var t=e==="vertical"?"x":"y";O(r,function(n){n.outEdges.sort(function(a,i){return a.node2.getLayout()[t]-i.node2.getLayout()[t]}),n.inEdges.sort(function(a,i){return a.node1.getLayout()[t]-i.node1.getLayout()[t]})}),O(r,function(n){var a=0,i=0;O(n.outEdges,function(o){o.setLayout({sy:a},!0),a+=o.getLayout().dy}),O(n.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function hge(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),n=t.nodes,a=t.edges;if(n.length){var i=1/0,o=-1/0;O(n,function(s){var l=s.getLayout().value;l<i&&(i=l),l>o&&(o=l)}),O(n,function(s){var l=new Nr({type:"color",mappingMethod:"linear",dataExtent:[i,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}))})}a.length&&O(a,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function dge(r){r.registerChartView(Wpe),r.registerSeriesModel(qpe),r.registerLayout(Zpe),r.registerVisual(hge),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){var i=a.coordinateSystem,o=fb(i,e,a.get("scaleLimit"));a.setCenter(o.center),a.setZoom(o.zoom)})})}var DU=(function(){function r(){}return r.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},r.prototype.getInitialData=function(e,t){var n,a=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],d=u[1-c],v=[a,i],g=v[c].get("type"),x=v[1-c].get("type"),y=e.data;if(y&&l){var b=[];O(y,function(C,D){var M;ce(C)?(M=C.slice(),C.unshift(D)):ce(C.value)?(M=ie({},C),M.value=M.value.slice(),C.value.unshift(D)):M=C,b.push(M)}),e.data=b}var w=this.defaultValueDimensions,T=[{name:f,type:Yx(g),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:Yx(x),dimsDef:w.slice()}];return cd(this,{coordDimensions:T,dimensionsCount:w.length+1,encodeDefaulter:He(jH,T,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r})(),NU=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:ee.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:ee.color.shadow}},animationDuration:800},e})(Tt);Jt(NU,DU,!0);var vge=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var c=i.getItemLayout(u),f=Gz(c,i,u,l,!0);i.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!i.hasValue(u)){o.remove(f);return}var d=i.getItemLayout(u);f?(Pa(f),LU(d,f,i,u)):f=Gz(d,i,u,l),o.add(f),i.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=i},e.prototype.remove=function(t){var n=this.group,a=this._data;this._data=null,a&&a.eachItemGraphicEl(function(i){i&&n.remove(i)})},e.type="boxplot",e})(_t),pge=(function(){function r(){}return r})(),gge=(function(r){K(e,r);function e(t){var n=r.call(this,t)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new pge},e.prototype.buildPath=function(t,n){var a=n.points,i=0;for(t.moveTo(a[i][0],a[i][1]),i++;i<4;i++)t.lineTo(a[i][0],a[i][1]);for(t.closePath();i<a.length;i++)t.moveTo(a[i][0],a[i][1]),i++,t.lineTo(a[i][0],a[i][1])},e})(tt);function Gz(r,e,t,n,a){var i=r.ends,o=new gge({shape:{points:a?mge(i,n,r):i}});return LU(r,o,e,t,a),o}function LU(r,e,t,n,a){var i=t.hostModel,o=_c[a?"initProps":"updateProps"];o(e,{shape:{points:r.ends}},i,n),e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(n),l=s.getModel("emphasis");_r(e,s),Ut(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function mge(r,e,t){return fe(r,function(n){return n=n.slice(),n[e]=t.initBaseline,n})}var Ep=O;function yge(r){var e=xge(r);Ep(e,function(t){var n=t.seriesModels;n.length&&(bge(t),Ep(n,function(a,i){_ge(a,t.boxOffsetList[i],t.boxWidthList[i])}))})}function xge(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(n){var a=n.getBaseAxis(),i=Fe(t,a);i<0&&(i=t.length,t[i]=a,e[i]={axis:a,seriesModels:[]}),e[i].seriesModels.push(n)}),e}function bge(r){var e=r.axis,t=r.seriesModels,n=t.length,a=r.boxWidthList=[],i=r.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;Ep(t,function(g){l=Math.max(l,g.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}Ep(t,function(g){var x=g.get("boxWidth");ce(x)||(x=[x,x]),o.push([me(x[0],s)||0,me(x[1],s)||0])});var c=s*.8-2,f=c/n*.3,d=(c-f*(n-1))/n,v=d/2-c/2;Ep(t,function(g,x){i.push(v),v+=f+d,a.push(Math.min(Math.max(d,o[x][0]),o[x][1]))})}function _ge(r,e,t){var n=r.coordinateSystem,a=r.getData(),i=t/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=a.mapDimension(l[o]),c=a.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var f=0;f<a.count();f++){var d=a.get(u,f),v=T(d,c[2],f),g=T(d,c[0],f),x=T(d,c[1],f),y=T(d,c[3],f),b=T(d,c[4],f),w=[];C(w,x,!1),C(w,y,!0),w.push(g,x,b,y),D(w,g),D(w,b),D(w,v),a.setItemLayout(f,{initBaseline:v[s],ends:w})}function T(M,N,R){var E=a.get(N,R),k=[];k[o]=M,k[s]=E;var I;return isNaN(M)||isNaN(E)?I=[NaN,NaN]:(I=n.dataToPoint(k),I[o]+=e),I}function C(M,N,R){var E=N.slice(),k=N.slice();E[o]+=i,k[o]-=i,R?M.push(E,k):M.push(k,E)}function D(M,N){var R=N.slice(),E=N.slice();R[o]-=i,E[o]+=i,M.push(R,E)}}function Sge(r,e){e=e||{};for(var t=[],n=[],a=e.boundIQR,i=a==="none"||a===0,o=0;o<r.length;o++){var s=ra(r[o].slice()),l=U0(s,.25),u=U0(s,.5),c=U0(s,.75),f=s[0],d=s[s.length-1],v=(a??1.5)*(c-l),g=i?f:Math.max(f,l-v),x=i?d:Math.min(d,c+v),y=e.itemNameFormatter,b=Ae(y)?y({value:o}):ye(y)?y.replace("{value}",o+""):o+"";t.push([b,g,l,u,c,x]);for(var w=0;w<s.length;w++){var T=s[w];if(T<g||T>x){var C=[b,T];n.push(C)}}}return{boxData:t,outliers:n}}var wge={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Ur){var n="";gt(n)}var a=Sge(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function Tge(r){r.registerSeriesModel(NU),r.registerChartView(vge),r.registerLayout(yge),r.registerTransform(wge)}var Cge=["itemStyle","borderColor"],Age=["itemStyle","borderColor0"],Mge=["itemStyle","borderColorDoji"],Dge=["itemStyle","color"],Nge=["itemStyle","color0"];function TN(r,e){return e.get(r>0?Dge:Nge)}function CN(r,e){return e.get(r===0?Mge:r>0?Cge:Age)}var Lge={seriesType:"candlestick",plan:nd(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(n,a){for(var i;(i=n.next())!=null;){var o=a.getItemModel(i),s=a.getItemLayout(i).sign,l=o.getItemStyle();l.fill=TN(s,o),l.stroke=CN(s,o)||l.fill;var u=a.ensureUniqueItemVisual(i,"style");ie(u,l)}}}}}},Rge=["color","borderColor"],Ege=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,n,a){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,n,a,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,n):this._incrementalRenderNormal(t,n)},e.prototype.eachRendered=function(t){Nl(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t){var n=t.getData(),a=this._data,i=this.group,o=n.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),n.diff(a).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&Hz(u,f))return;var d=ET(f,c,!0);jt(d,{shape:{points:f.ends}},t,c),kT(d,n,c,o),i.add(d),n.setItemGraphicEl(c,d)}}).update(function(c,f){var d=a.getItemGraphicEl(f);if(!n.hasValue(c)){i.remove(d);return}var v=n.getItemLayout(c);if(s&&Hz(u,v)){i.remove(d);return}d?(lt(d,{shape:{points:v.ends}},t,c),Pa(d)):d=ET(v),kT(d,n,c,o),i.add(d),n.setItemGraphicEl(c,d)}).remove(function(c){var f=a.getItemGraphicEl(c);f&&i.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(t){this._clear(),Fz(t,this.group);var n=t.get("clip",!0)?qg(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,n){for(var a=n.getData(),i=a.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=a.getItemLayout(o),l=ET(s);kT(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){Fz(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e})(_t),kge=(function(){function r(){}return r})(),Ige=(function(r){K(e,r);function e(t){var n=r.call(this,t)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new kge},e.prototype.buildPath=function(t,n){var a=n.points;this.__simpleBox?(t.moveTo(a[4][0],a[4][1]),t.lineTo(a[6][0],a[6][1])):(t.moveTo(a[0][0],a[0][1]),t.lineTo(a[1][0],a[1][1]),t.lineTo(a[2][0],a[2][1]),t.lineTo(a[3][0],a[3][1]),t.closePath(),t.moveTo(a[4][0],a[4][1]),t.lineTo(a[5][0],a[5][1]),t.moveTo(a[6][0],a[6][1]),t.lineTo(a[7][0],a[7][1]))},e})(tt);function ET(r,e,t){var n=r.ends;return new Ige({shape:{points:t?Oge(n,r):n},z2:100})}function Hz(r,e){for(var t=!0,n=0;n<e.ends.length;n++)if(r.contain(e.ends[n][0],e.ends[n][1])){t=!1;break}return t}function kT(r,e,t,n){var a=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=n,_r(r,a);var i=e.getItemLayout(t).sign;O(r.states,function(s,l){var u=a.getModel(l),c=TN(i,u),f=CN(i,u)||c,d=s.style||(s.style={});c&&(d.fill=c),f&&(d.stroke=f)});var o=a.getModel("emphasis");Ut(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function Oge(r,e){return fe(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var Pge=(function(){function r(){}return r})(),IT=(function(r){K(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new Pge},e.prototype.buildPath=function(t,n){for(var a=n.points,i=0;i<a.length;)if(this.__sign===a[i++]){var o=a[i++];t.moveTo(o,a[i++]),t.lineTo(o,a[i++])}else i+=3},e})(tt);function Fz(r,e,t,n){var a=r.getData(),i=a.getLayout("largePoints"),o=new IT({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new IT({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new IT({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});e.add(l),OT(1,o,r),OT(-1,s,r),OT(0,l,r),n&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function OT(r,e,t,n){var a=CN(r,t)||TN(r,t),i=t.getModel("itemStyle").getItemStyle(Rge);e.useStyle(i),e.style.fill=null,e.style.stroke=a}var RU=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,n,a){var i=n.getItemLayout(t);return i&&a.rect(i.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})(Tt);Jt(RU,DU,!0);function zge(r){!r||!ce(r.series)||O(r.series,function(e){Re(e)&&e.type==="k"&&(e.type="candlestick")})}var jge={seriesType:"candlestick",plan:nd(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),n=Bge(r,t),a=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[a])),l=fe(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],c=l[1],f=l[2],d=l[3];if(t.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?g:v};function v(x,y){for(var b,w=y.getStore();(b=x.next())!=null;){var T=w.get(s,b),C=w.get(u,b),D=w.get(c,b),M=w.get(f,b),N=w.get(d,b),R=Math.min(C,D),E=Math.max(C,D),k=F(R,T),I=F(E,T),z=F(M,T),P=F(N,T),G=[];H(G,I,0),H(G,k,1),G.push(V(P),V(I),V(z),V(k));var U=y.getItemModel(b),B=!!U.get(["itemStyle","borderColorDoji"]);y.setItemLayout(b,{sign:Uz(w,b,C,D,c,B),initBaseline:C>D?I[i]:k[i],ends:G,brushRect:X(M,N,T)})}function F(W,$){var te=[];return te[a]=$,te[i]=W,isNaN($)||isNaN(W)?[NaN,NaN]:e.dataToPoint(te)}function H(W,$,te){var ue=$.slice(),ge=$.slice();ue[a]=W0(ue[a]+n/2,1,!1),ge[a]=W0(ge[a]-n/2,1,!0),te?W.push(ue,ge):W.push(ge,ue)}function X(W,$,te){var ue=F(W,te),ge=F($,te);return ue[a]-=n/2,ge[a]-=n/2,{x:ue[0],y:ue[1],width:n,height:ge[1]-ue[1]}}function V(W){return W[a]=W0(W[a],1),W}}function g(x,y){for(var b=zi(x.count*4),w=0,T,C=[],D=[],M,N=y.getStore(),R=!!r.get(["itemStyle","borderColorDoji"]);(M=x.next())!=null;){var E=N.get(s,M),k=N.get(u,M),I=N.get(c,M),z=N.get(f,M),P=N.get(d,M);if(isNaN(E)||isNaN(z)||isNaN(P)){b[w++]=NaN,w+=3;continue}b[w++]=Uz(N,M,k,I,c,R),C[a]=E,C[i]=z,T=e.dataToPoint(C,null,D),b[w++]=T?T[0]:NaN,b[w++]=T?T[1]:NaN,C[i]=P,T=e.dataToPoint(C,null,D),b[w++]=T?T[1]:NaN}y.setLayout("largePoints",b)}}};function Uz(r,e,t,n,a,i){var o;return t>n?o=-1:t<n?o=1:o=i?0:e>0?r.get(a,e-1)<=n?1:-1:1,o}function Bge(r,e){var t=r.getBaseAxis(),n,a=t.type==="category"?t.getBandWidth():(n=t.getExtent(),Math.abs(n[1]-n[0])/e.count()),i=me(Ce(r.get("barMaxWidth"),a),a),o=me(Ce(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?me(s,a):Math.max(Math.min(a/2,i),o)}function Vge(r){r.registerChartView(Ege),r.registerSeriesModel(RU),r.registerPreprocessor(zge),r.registerVisual(Lge),r.registerLayout(jge)}function Yz(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var Gge=(function(r){K(e,r);function e(t,n){var a=r.call(this)||this,i=new Wg(t,n),o=new De;return a.add(i),a.add(o),a.updateData(t,n),a}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var n=t.symbolType,a=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s<i;s++){var l=ur(n,-1,-1,2,2,a);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/i*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}Yz(o,t)},e.prototype.updateEffectAnimation=function(t){for(var n=this._effectCfg,a=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var s=i[o];if(n[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}Yz(a,t)},e.prototype.highlight=function(){$o(this)},e.prototype.downplay=function(){Ko(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,n){var a=this,i=t.hostModel;this.childAt(0).updateData(t,n);var o=this.childAt(1),s=t.getItemModel(n),l=t.getItemVisual(n,"symbol"),u=id(t.getItemVisual(n,"symbolSize")),c=t.getItemVisual(n,"style"),f=c&&c.fill,d=s.getModel("emphasis");o.setScale(u),o.traverse(function(y){y.setStyle("fill",f)});var v=Tc(t.getItemVisual(n,"symbolOffset"),u);v&&(o.x=v[0],o.y=v[1]);var g=t.getItemVisual(n,"symbolRotate");o.rotation=(g||0)*Math.PI/180||0;var x={};x.showEffectOn=i.get("showEffectOn"),x.rippleScale=s.get(["rippleEffect","scale"]),x.brushType=s.get(["rippleEffect","brushType"]),x.period=s.get(["rippleEffect","period"])*1e3,x.effectOffset=n/t.count(),x.z=i.getShallow("z")||0,x.zlevel=i.getShallow("zlevel")||0,x.symbolType=l,x.color=f,x.rippleEffectColor=s.get(["rippleEffect","color"]),x.rippleNumber=s.get(["rippleEffect","number"]),x.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(x):this.startEffectAnimation(x),this._effectCfg=x):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(y){y==="emphasis"?x.showEffectOn!=="render"&&a.startEffectAnimation(x):y==="normal"&&x.showEffectOn!=="render"&&a.stopEffectAnimation()}),this._effectCfg=x,Ut(this,d.get("focus"),d.get("blurScope"),d.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e})(De),Hge=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new Xg(Gge)},e.prototype.render=function(t,n,a){var i=t.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var n=t.coordinateSystem,a=n&&n.getArea&&n.getArea();return t.get("clip",!0)?a:null},e.prototype.updateTransform=function(t,n,a){var i=t.getData();this.group.dirty();var o=Zg("").reset(t,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var n=t.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=BG(n.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e})(_t),Fge=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return to(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,n,a){return a.point(n.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e})(Tt);function Uge(r){r.registerChartView(Hge),r.registerSeriesModel(Fge),r.registerLayout(Zg("effectScatter"))}var EU=(function(r){K(e,r);function e(t,n,a){var i=r.call(this)||this;return i.add(i.createLine(t,n,a)),i._updateEffectSymbol(t,n),i}return e.prototype.createLine=function(t,n,a){return new vN(t,n,a)},e.prototype._updateEffectSymbol=function(t,n){var a=t.getItemModel(n),i=a.getModel("effect"),o=i.get("symbolSize"),s=i.get("symbol");ce(o)||(o=[o,o]);var l=t.getItemVisual(n,"style"),u=i.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=ur(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(i.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,i,n))},e.prototype._updateEffectAnimation=function(t,n,a){var i=this.childAt(1);if(i){var o=t.getItemLayout(a),s=n.get("period")*1e3,l=n.get("loop"),u=n.get("roundTrip"),c=n.get("constantSpeed"),f=Hr(n.get("delay"),function(v){return v/t.count()*s/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),c>0&&(s=this._getLineLength(i)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var d=void 0;Ae(f)?d=f(a):d=f,i.__t>0&&(d=-s*i.__t),this._animateSymbol(i,s,d,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,n,a,i,o){if(n>0){t.__t=0;var s=this,l=t.animate("",i).when(o?n*2:n,{__t:o?2:1}).delay(a).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return Io(t.__p1,t.__cp1)+Io(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,n){t.__p1=n[0],t.__p2=n[1],t.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(t,n,a){this.childAt(0).updateData(t,n,a),this._updateEffectSymbol(t,n)},e.prototype._updateSymbolPosition=function(t){var n=t.__p1,a=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=Gr,c=q2;s[0]=u(n[0],i[0],a[0],o),s[1]=u(n[1],i[1],a[1],o);var f=t.__t<1?c(n[0],i[0],a[0],o):c(a[0],i[0],n[0],1-o),d=t.__t<1?c(n[1],i[1],a[1],o):c(a[1],i[1],n[1],1-o);t.rotation=-Math.atan2(d,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=Io(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*Io(n,s):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=s[0],t.y=s[1]},e.prototype.updateLayout=function(t,n){this.childAt(0).updateLayout(t,n);var a=t.getItemModel(n).getModel("effect");this._updateEffectAnimation(t,a,n)},e})(De),kU=(function(r){K(e,r);function e(t,n,a){var i=r.call(this)||this;return i._createPolyline(t,n,a),i}return e.prototype._createPolyline=function(t,n,a){var i=t.getItemLayout(n),o=new Fr({shape:{points:i}});this.add(o),this._updateCommonStl(t,n,a)},e.prototype.updateData=function(t,n,a){var i=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(n)}};lt(o,s,i,n),this._updateCommonStl(t,n,a)},e.prototype._updateCommonStl=function(t,n,a){var i=this.childAt(0),o=t.getItemModel(n),s=a&&a.emphasisLineStyle,l=a&&a.focus,u=a&&a.blurScope,c=a&&a.emphasisDisabled;if(!a||t.hasItemOption){var f=o.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),c=f.get("disabled"),l=f.get("focus"),u=f.get("blurScope")}i.useStyle(t.getItemVisual(n,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var d=i.ensureState("emphasis");d.style=s,Ut(this,l,u,c)},e.prototype.updateLayout=function(t,n){var a=this.childAt(0);a.setShape("points",t.getItemLayout(n))},e})(De),Yge=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,n,a){return new kU(t,n,a)},e.prototype._updateAnimationPoints=function(t,n){this._points=n;for(var a=[0],i=0,o=1;o<n.length;o++){var s=n[o-1],l=n[o];i+=Io(s,l),a.push(i)}if(i===0){this._length=0;return}for(var o=0;o<a.length;o++)a[o]/=i;this._offsets=a,this._length=i},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var n=t.__t<1?t.__t:2-t.__t,a=this._points,i=this._offsets,o=a.length;if(i){var s=this._lastFrame,l;if(n<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(i[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(i[l]>n);l++);l=Math.min(l-1,o-2)}var c=(n-i[l])/(i[l+1]-i[l]),f=a[l],d=a[l+1];t.x=f[0]*(1-c)+c*d[0],t.y=f[1]*(1-c)+c*d[1];var v=t.__t<1?d[0]-f[0]:f[0]-d[0],g=t.__t<1?d[1]-f[1]:f[1]-d[1];t.rotation=-Math.atan2(g,v)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,t.ignore=!1}},e})(EU),Wge=(function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r})(),Xge=(function(r){K(e,r);function e(t){var n=r.call(this,t)||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:ee.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Wge},e.prototype.buildPath=function(t,n){var a=n.segs,i=n.curveness,o;if(n.polyline)for(o=this._off;o<a.length;){var s=a[o++];if(s>0){t.moveTo(a[o++],a[o++]);for(var l=1;l<s;l++)t.lineTo(a[o++],a[o++])}}else for(o=this._off;o<a.length;){var u=a[o++],c=a[o++],f=a[o++],d=a[o++];if(t.moveTo(u,c),i>0){var v=(u+f)/2-(c-d)*i,g=(c+d)/2-(f-u)*i;t.quadraticCurveTo(v,g,f,d)}else t.lineTo(f,d)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,n){var a=this.shape,i=a.segs,o=a.curveness,s=this.style.lineWidth;if(a.polyline)for(var l=0,u=0;u<i.length;){var c=i[u++];if(c>0)for(var f=i[u++],d=i[u++],v=1;v<c;v++){var g=i[u++],x=i[u++];if(Us(f,d,g,x,s,t,n))return l}l++}else for(var l=0,u=0;u<i.length;){var f=i[u++],d=i[u++],g=i[u++],x=i[u++];if(o>0){var y=(f+g)/2-(d-x)*o,b=(d+x)/2-(g-f)*o;if(k6(f,d,y,b,g,x,s,t,n))return l}else if(Us(f,d,g,x,s,t,n))return l;l++}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<a.length;){var c=a[u++],f=a[u++];i=Math.min(c,i),s=Math.max(c,s),o=Math.min(f,o),l=Math.max(f,l)}t=this._rect=new Ie(i,o,s,l)}return t},e})(tt),qge=(function(){function r(){this.group=new De}return r.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},r.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(e,t){var n=this._newAdded[0],a=t.getLayout("linesPoints"),i=n&&n.shape.segs;if(i&&i.length<2e4){var o=i.length,s=new Float32Array(o+a.length);s.set(i),s.set(a,o),n.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:a}),this._setCommon(l,t),l.__startIndex=e.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new Xge({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,n){var a=t.hostModel;e.setShape({polyline:a.get("polyline"),curveness:a.get(["lineStyle","curveness"])}),e.useStyle(a.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual("style");i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null);var o=Pe(e);o.seriesIndex=a.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),IU={seriesType:"lines",plan:nd(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),n=r.pipelineContext.large;return{progress:function(a,i){var o=[];if(n){var s=void 0,l=a.end-a.start;if(t){for(var u=0,c=a.start;c<a.end;c++)u+=r.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var f=0,d=[],c=a.start;c<a.end;c++){var v=r.getLineCoords(c,o);t&&(s[f++]=v);for(var g=0;g<v;g++)d=e.dataToPoint(o[g],!1,d),s[f++]=d[0],s[f++]=d[1]}i.setLayout("linesPoints",s)}else for(var c=a.start;c<a.end;c++){var x=i.getItemModel(c),v=r.getLineCoords(c,o),y=[];if(t)for(var b=0;b<v;b++)y.push(e.dataToPoint(o[b]));else{y[0]=e.dataToPoint(o[0]),y[1]=e.dataToPoint(o[1]);var w=x.get(["lineStyle","curveness"]);+w&&(y[2]=[(y[0][0]+y[1][0])/2-(y[0][1]-y[1][1])*w,(y[0][1]+y[1][1])/2-(y[1][0]-y[0][0])*w])}i.setItemLayout(c,y)}}}}}},Zge=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._updateLineDraw(i,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=a.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(t)&&l>0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var f=t.get("clip",!0)&&qg(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(a),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._lineDraw.incrementalUpdate(t,n.getData()),this._finished=t.end===n.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,n,a){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=IU.reset(t,n,a);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(a)},e.prototype._updateLineDraw=function(t,n){var a=this._lineDraw,i=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!a||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(a&&a.remove(),a=this._lineDraw=l?new qge:new pN(o?i?Yge:kU:i?EU:vN),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(a.group),a},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var n=t.getZr(),a=n.painter.getType()==="svg";!a&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.type="lines",e})(_t),$ge=typeof Uint32Array>"u"?Array:Uint32Array,Kge=typeof Float64Array>"u"?Array:Float64Array;function Wz(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=fe(e,function(t){var n=[t[0].coord,t[1].coord],a={coords:n};return t[0].name&&(a.fromName=t[0].name),t[1].name&&(a.toName=t[1].name),O1([a,t[0],t[1]])}))}var Qge=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],Wz(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(Wz(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var n=this._processFlatCoordsArray(t.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=Ch(this._flatCoords,n.flatCoords),this._flatCoordsOffset=Ch(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),t.data=new Float32Array(n.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var n=this.getData().getItemModel(t),a=n.option instanceof Array?n.option:n.getShallow("coords");return a},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,n){if(this._flatCoordsOffset){for(var a=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o<i;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[a+o*2],n[o][1]=this._flatCoords[a+o*2+1];return i}else{for(var s=this._getCoordsFromItemModel(t),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(t){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),st(t[0])){for(var a=t.length,i=new $ge(a),o=new Kge(a),s=0,l=0,u=0,c=0;c<a;){u++;var f=t[c++];i[l++]=s+n,i[l++]=f;for(var d=0;d<f;d++){var v=t[c++],g=t[c++];o[s++]=v,o[s++]=g}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,n){var a=new vn(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(i,o,s,l){if(i instanceof Array)return NaN;a.hasItemOption=!0;var u=i.value;if(u!=null)return u instanceof Array?u[l]:u}),a},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=i.getItemModel(t),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),pr("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),n=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.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})(Tt);function g0(r){return r instanceof Array||(r=[r,r]),r}var Jge={seriesType:"lines",reset:function(r){var e=g0(r.get("symbol")),t=g0(r.get("symbolSize")),n=r.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",t&&t[0]),n.setVisual("toSymbolSize",t&&t[1]);function a(i,o){var s=i.getItemModel(o),l=g0(s.getShallow("symbol",!0)),u=g0(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?a:null}}};function eme(r){r.registerChartView(Zge),r.registerSeriesModel(Qge),r.registerLayout(IU),r.registerVisual(Jge)}var tme=256,rme=(function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=jn.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,n,a,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,d=f.getContext("2d"),v=e.length;f.width=t,f.height=n;for(var g=0;g<v;++g){var x=e[g],y=x[0],b=x[1],w=x[2],T=a(w);d.globalAlpha=T,d.drawImage(s,y-c,b-c)}if(!f.width||!f.height)return f;for(var C=d.getImageData(0,0,f.width,f.height),D=C.data,M=0,N=D.length,R=this.minOpacity,E=this.maxOpacity,k=E-R;M<N;){var T=D[M+3]/256,I=Math.floor(T*(tme-1))*4;if(T>0){var z=o(T)?l:u;T>0&&(T=T*k+R),D[M++]=z[I],D[M++]=z[I+1],D[M++]=z[I+2],D[M++]=z[I+3]*T*256}else M+=4}return d.putImageData(C,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=jn.createCanvas()),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var a=e.getContext("2d");return a.clearRect(0,0,n,n),a.shadowOffsetX=n,a.shadowBlur=this.blurSize,a.shadowColor=ee.color.neutral99,a.beginPath(),a.arc(-t,t,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),e},r.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,a=n[t]||(n[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],a[o++]=i[3];return a},r})();function nme(r,e,t){var n=r[1]-r[0];e=fe(e,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[0])/n]}});var a=e.length,i=0;return function(o){var s;for(s=i;s<a;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}if(s===a)for(s=i-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s<a&&t[s]}}function ame(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(n){return n>=e[0]&&n<=e[1]}}function Xz(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var ime=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(t,a,0,t.getData().count()):Xz(o)&&this._renderOnGeo(o,t,i,a)},e.prototype.incrementalPrepareRender=function(t,n,a){this.group.removeAll()},e.prototype.incrementalRender=function(t,n,a,i){var o=n.coordinateSystem;o&&(Xz(o)?this.render(n,a,i):(this._progressiveEls=[],this._renderOnGridLike(n,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Nl(this._progressiveEls||this.group,t)},e.prototype._renderOnGridLike=function(t,n,a,i,o){var s=t.coordinateSystem,l=Sl(s,"cartesian2d"),u=Sl(s,"matrix"),c,f,d,v;if(l){var g=s.getAxis("x"),x=s.getAxis("y");c=g.getBandWidth()+.5,f=x.getBandWidth()+.5,d=g.scale.getExtent(),v=x.scale.getExtent()}for(var y=this.group,b=t.getData(),w=t.getModel(["emphasis","itemStyle"]).getItemStyle(),T=t.getModel(["blur","itemStyle"]).getItemStyle(),C=t.getModel(["select","itemStyle"]).getItemStyle(),D=t.get(["itemStyle","borderRadius"]),M=Sr(t),N=t.getModel("emphasis"),R=N.get("focus"),E=N.get("blurScope"),k=N.get("disabled"),I=l||u?[b.mapDimension("x"),b.mapDimension("y"),b.mapDimension("value")]:[b.mapDimension("time"),b.mapDimension("value")],z=a;z<i;z++){var P=void 0,G=b.getItemVisual(z,"style");if(l){var U=b.get(I[0],z),B=b.get(I[1],z);if(isNaN(b.get(I[2],z))||isNaN(U)||isNaN(B)||U<d[0]||U>d[1]||B<v[0]||B>v[1])continue;var F=s.dataToPoint([U,B]);P=new qe({shape:{x:F[0]-c/2,y:F[1]-f/2,width:c,height:f},style:G})}else if(u){var H=s.dataToLayout([b.get(I[0],z),b.get(I[1],z)]).rect;if(Jr(H.x))continue;P=new qe({z2:1,shape:H,style:G})}else{if(isNaN(b.get(I[1],z)))continue;var X=s.dataToLayout([b.get(I[0],z)]),H=X.contentRect||X.rect;if(Jr(H.x)||Jr(H.y))continue;P=new qe({z2:1,shape:H,style:G})}if(b.hasItemOption){var V=b.getItemModel(z),W=V.getModel("emphasis");w=W.getModel("itemStyle").getItemStyle(),T=V.getModel(["blur","itemStyle"]).getItemStyle(),C=V.getModel(["select","itemStyle"]).getItemStyle(),D=V.get(["itemStyle","borderRadius"]),R=W.get("focus"),E=W.get("blurScope"),k=W.get("disabled"),M=Sr(V)}P.shape.r=D;var $=t.getRawValue(z),te="-";$&&$[2]!=null&&(te=$[2]+""),Lr(P,M,{labelFetcher:t,labelDataIndex:z,defaultOpacity:G.opacity,defaultText:te}),P.ensureState("emphasis").style=w,P.ensureState("blur").style=T,P.ensureState("select").style=C,Ut(P,R,E,k),P.incremental=o,o&&(P.states.emphasis.hoverLayer=!0),y.add(P),b.setItemGraphicEl(z,P),this._progressiveEls&&this._progressiveEls.push(P)}},e.prototype._renderOnGeo=function(t,n,a,i){var o=a.targetVisuals.inRange,s=a.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new rme;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=t.getViewRect().clone(),f=t.getRoamTransform();c.applyTransform(f);var d=Math.max(c.x,0),v=Math.max(c.y,0),g=Math.min(c.width+c.x,i.getWidth()),x=Math.min(c.height+c.y,i.getHeight()),y=g-d,b=x-v,w=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],T=l.mapArray(w,function(N,R,E){var k=t.dataToPoint([N,R]);return k[0]-=d,k[1]-=v,k.push(E),k}),C=a.getExtent(),D=a.type==="visualMap.continuous"?ame(C,a.option.range):nme(C,a.getPieceList(),a.option.selected);u.update(T,y,b,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},D);var M=new kr({style:{width:y,height:b,x:d,y:v,image:u.canvas},silent:!0});this.group.add(M)},e.type="heatmap",e})(_t),ome=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return to(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=rd.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:ee.color.primary}}},e})(Tt);function sme(r){r.registerChartView(ime),r.registerSeriesModel(ome)}var lme=["itemStyle","borderWidth"],qz=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],PT=new eo,ume=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),d={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:qz[+c],categoryDim:qz[1-+c]};o.diff(s).add(function(g){if(o.hasValue(g)){var x=$z(o,g),y=Zz(o,g,x,d),b=Kz(o,d,y);o.setItemGraphicEl(g,b),i.add(b),Jz(b,d,y)}}).update(function(g,x){var y=s.getItemGraphicEl(x);if(!o.hasValue(g)){i.remove(y);return}var b=$z(o,g),w=Zz(o,g,b,d),T=VU(o,w);y&&T!==y.__pictorialShapeStr&&(i.remove(y),o.setItemGraphicEl(g,null),y=null),y?gme(y,d,w):y=Kz(o,d,w,!0),o.setItemGraphicEl(g,y),y.__pictorialSymbolMeta=w,i.add(y),Jz(y,d,w)}).remove(function(g){var x=s.getItemGraphicEl(g);x&&Qz(s,g,x.__pictorialSymbolMeta.animationModel,x)}).execute();var v=t.get("clip",!0)?qg(t.coordinateSystem,!1,t):null;return v?i.setClipPath(v):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,n){var a=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){Qz(i,Pe(o).dataIndex,t,o)}):a.removeAll()},e.type="pictorialBar",e})(_t);function Zz(r,e,t,n){var a=r.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),d={dataIndex:e,layout:a,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};cme(t,i,a,n,d),fme(r,e,a,i,o,d.boundingLength,d.pxSign,c,n,d),hme(t,d.symbolScale,u,n,d);var v=d.symbolSize,g=Tc(t.get("symbolOffset"),v);return dme(t,v,a,i,o,g,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,n,d),d}function cme(r,e,t,n,a){var i=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),c;if(ce(o)){var f=[zT(s,o[0])-l,zT(s,o[1])-l];f[1]<f[0]&&f.reverse(),c=f[u]}else o!=null?c=zT(s,o)-l:e?c=n.coordSysExtent[i.index][u]-l:c=t[i.wh];a.boundingLength=c,e&&(a.repeatCutLength=t[i.wh]);var d=i.xy==="x",v=s.inverse;a.pxSign=d&&!v||!d&&v?c>=0?1:-1:c>0?1:-1}function zT(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function fme(r,e,t,n,a,i,o,s,l,u){var c=l.valueDim,f=l.categoryDim,d=Math.abs(t[f.wh]),v=r.getItemVisual(e,"symbolSize"),g;ce(v)?g=v.slice():v==null?g=["100%","100%"]:g=[v,v],g[f.index]=me(g[f.index],d),g[c.index]=me(g[c.index],n?d:Math.abs(i)),u.symbolSize=g;var x=u.symbolScale=[g[0]/s,g[1]/s];x[c.index]*=(l.isHorizontal?-1:1)*o}function hme(r,e,t,n,a){var i=r.get(lme)||0;i&&(PT.attr({scaleX:e[0],scaleY:e[1],rotation:t}),PT.updateTransform(),i/=PT.getLineScale(),i*=e[n.valueDim.index]),a.valueLineWidth=i||0}function dme(r,e,t,n,a,i,o,s,l,u,c,f){var d=c.categoryDim,v=c.valueDim,g=f.pxSign,x=Math.max(e[v.index]+s,0),y=x;if(n){var b=Math.abs(l),w=Hr(r.get("symbolMargin"),"15%")+"",T=!1;w.lastIndexOf("!")===w.length-1&&(T=!0,w=w.slice(0,w.length-1));var C=me(w,e[v.index]),D=Math.max(x+C*2,0),M=T?0:C*2,N=OM(n),R=N?n:ej((b+M)/D),E=b-R*x;C=E/2/(T?R:Math.max(R-1,1)),D=x+C*2,M=T?0:C*2,!N&&n!=="fixed"&&(R=u?ej((Math.abs(u)+M)/D):0),y=R*D-M,f.repeatTimes=R,f.symbolMargin=C}var k=g*(y/2),I=f.pathPosition=[];I[d.index]=t[d.wh]/2,I[v.index]=o==="start"?k:o==="end"?l-k:l/2,i&&(I[0]+=i[0],I[1]+=i[1]);var z=f.bundlePosition=[];z[d.index]=t[d.xy],z[v.index]=t[v.xy];var P=f.barRectShape=ie({},t);P[v.wh]=g*Math.max(Math.abs(t[v.wh]),Math.abs(I[v.index]+k)),P[d.wh]=t[d.wh];var G=f.clipShape={};G[d.xy]=-t[d.xy],G[d.wh]=c.ecSize[d.wh],G[v.xy]=0,G[v.wh]=t[v.wh]}function OU(r){var e=r.symbolPatternSize,t=ur(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function PU(r,e,t,n){var a=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,f=i[e.valueDim.index]+o+t.symbolMargin*2;for(AN(r,function(x){x.__pictorialAnimationIndex=c,x.__pictorialRepeatTimes=u,c<u?uh(x,null,g(c),t,n):uh(x,null,{scaleX:0,scaleY:0},t,n,function(){a.remove(x)}),c++});c<u;c++){var d=OU(t);d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,a.add(d);var v=g(c);uh(d,{x:v.x,y:v.y,scaleX:0,scaleY:0},{scaleX:v.scaleX,scaleY:v.scaleY,rotation:v.rotation},t,n)}function g(x){var y=s.slice(),b=t.pxSign,w=x;return(t.symbolRepeatDirection==="start"?b>0:b<0)&&(w=u-1-x),y[l.index]=f*(w-u/2+.5)+s[l.index],{x:y[0],y:y[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function zU(r,e,t,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?uh(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,n):(i=r.__pictorialMainPath=OU(t),a.add(i),uh(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,n))}function jU(r,e,t){var n=ie({},e.barRectShape),a=r.__pictorialBarRect;a?uh(a,null,{shape:n},e,t):(a=r.__pictorialBarRect=new qe({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function BU(r,e,t,n){if(t.symbolClip){var a=r.__pictorialClipPath,i=ie({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(a)lt(a,{shape:i},s,l);else{i[o.wh]=0,a=new qe({shape:i}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=t.clipShape[o.wh],_c[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function $z(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=vme,t.isAnimationEnabled=pme,t}function vme(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function pme(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Kz(r,e,t,n){var a=new De,i=new De;return a.add(i),a.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?PU(a,e,t):zU(a,e,t),jU(a,t,n),BU(a,e,t,n),a.__pictorialShapeStr=VU(r,t),a.__pictorialSymbolMeta=t,a}function gme(r,e,t){var n=t.animationModel,a=t.dataIndex,i=r.__pictorialBundle;lt(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,a),t.symbolRepeat?PU(r,e,t,!0):zU(r,e,t,!0),jU(r,t,!0),BU(r,e,t,!0)}function Qz(r,e,t,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];AN(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),O(i,function(o){_l(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function VU(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function AN(r,e,t){O(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function uh(r,e,t,n,a,i){e&&r.attr(e),n.symbolClip&&!a?t&&r.attr(t):t&&_c[a?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,i)}function Jz(r,e,t){var n=t.dataIndex,a=t.itemModel,i=a.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=a.getModel(["blur","itemStyle"]).getItemStyle(),l=a.getModel(["select","itemStyle"]).getItemStyle(),u=a.getShallow("cursor"),c=i.get("focus"),f=i.get("blurScope"),d=i.get("scale");AN(r,function(x){if(x instanceof kr){var y=x.style;x.useStyle(ie({image:y.image,x:y.x,y:y.y,width:y.width,height:y.height},t.style))}else x.useStyle(t.style);var b=x.ensureState("emphasis");b.style=o,d&&(b.scaleX=x.scaleX*1.1,b.scaleY=x.scaleY*1.1),x.ensureState("blur").style=s,x.ensureState("select").style=l,u&&(x.cursor=u),x.z2=t.z2});var v=e.valueDim.posDesc[+(t.boundingLength>0)],g=r.__pictorialBarRect;g.ignoreClip=!0,Lr(g,Sr(a),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:Ph(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:v}),Ut(r,c,f,i.get("disabled"))}function ej(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var mme=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Ll(cg.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:ee.color.primary}}}),e})(cg);function yme(r){r.registerChartView(ume),r.registerSeriesModel(mme),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,He(oF,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,sF("pictorialBar"))}var xme=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function d(y){return y.name}var v=new Qo(this._layersSeries||[],l,d,d),g=[];v.add(xe(x,this,"add")).update(xe(x,this,"update")).remove(xe(x,this,"remove")).execute();function x(y,b,w){var T=o._layers;if(y==="remove"){s.remove(T[b]);return}for(var C=[],D=[],M,N=l[b].indices,R=0;R<N.length;R++){var E=i.getItemLayout(N[R]),k=E.x,I=E.y0,z=E.y;C.push(k,I),D.push(k,I+z),M=i.getItemVisual(N[R],"style")}var P,G=i.getItemLayout(N[0]),U=t.getModel("label"),B=U.get("margin"),F=t.getModel("emphasis");if(y==="add"){var H=g[b]=new De;P=new KF({shape:{points:C,stackedOnPoints:D,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),H.add(P),s.add(H),t.isAnimationEnabled()&&P.setClipPath(bme(P.getBoundingRect(),t,function(){P.removeClipPath()}))}else{var H=T[w];P=H.childAt(0),s.add(H),g[b]=H,lt(P,{shape:{points:C,stackedOnPoints:D}},t),Pa(P)}Lr(P,Sr(t),{labelDataIndex:N[R-1],defaultText:i.getName(N[R-1]),inheritColor:M.fill},{normal:{verticalAlign:"middle"}}),P.setTextConfig({position:null,local:!0});var X=P.getTextContent();X&&(X.x=G.x-B,X.y=G.y0+G.y/2),P.useStyle(M),i.setItemGraphicEl(b,P),_r(P,t),Ut(P,F.get("focus"),F.get("blurScope"),F.get("disabled"))}this._layersSeries=l,this._layers=g},e.type="themeRiver",e})(_t);function bme(r,e,t){var n=new qe({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return jt(n,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),n}var jT=2,_me=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new fd(xe(this.getData,this),xe(this.getRawData,this))},e.prototype.fixData=function(t){var n=t.length,a={},i=cC(t,function(d){return a.hasOwnProperty(d[0]+"")||(a[d[0]+""]=-1),d[2]}),o=[];i.buckets.each(function(d,v){o.push({name:v,dataList:d})});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 f=o[l].dataList[c][0]+"";a[f]=l}for(var f in a)a.hasOwnProperty(f)&&a[f]!==l&&(a[f]=l,t[n]=[f,0,u],n++)}return t},e.prototype.getInitialData=function(t,n){for(var a=this.getReferringComponents("singleAxis",Zt).models[0],i=a.get("type"),o=dt(t.data,function(g){return g[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=Te(),c=0,f=0;f<s.length;++f)l.push(s[f][jT]),u.get(s[f][jT])||(u.set(s[f][jT],c),c++);var d=od(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Yx(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,v=new vn(d,this);return v.initData(s),v},e.prototype.getLayerSeries=function(){for(var t=this.getData(),n=t.count(),a=[],i=0;i<n;++i)a[i]=i;var o=t.mapDimension("single"),s=cC(a,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(f,d){return t.get(o,f)-t.get(o,d)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,n,a){ce(t)||(t=t?[t]:[]);for(var i=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var f=Number.MAX_VALUE,d=-1,v=o[c].indices.length,g=0;g<v;++g){var x=i.get(t[0],o[c].indices[g]),y=Math.abs(x-n);y<=f&&(u=x,f=y,d=o[c].indices[g])}s.push(d)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=i.getName(t),s=i.get(i.mapDimension("value"),t);return pr("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})(Tt);function Sme(r,e){r.eachSeriesByType("themeRiver",function(t){var n=t.getData(),a=t.coordinateSystem,i={},o=a.getRect();i.rect=o;var s=t.get("boundaryGap"),l=a.getAxis();if(i.boundaryGap=s,l.orient==="horizontal"){s[0]=me(s[0],o.height),s[1]=me(s[1],o.height);var u=o.height-s[0]-s[1];tj(n,t,u)}else{s[0]=me(s[0],o.width),s[1]=me(s[1],o.width);var c=o.width-s[0]-s[1];tj(n,t,c)}n.setLayout("layoutInfo",i)})}function tj(r,e,t){if(r.count())for(var n=e.coordinateSystem,a=e.getLayerSeries(),i=r.mapDimension("single"),o=r.mapDimension("value"),s=fe(a,function(y){return fe(y.indices,function(b){var w=n.dataToPoint(r.get(i,b));return w[1]=r.get(o,b),w})}),l=wme(s),u=l.y0,c=t/l.max,f=a.length,d=a[0].indices.length,v,g=0;g<d;++g){v=u[g]*c,r.setItemLayout(a[0].indices[g],{layerIndex:0,x:s[0][g][0],y0:v,y:s[0][g][1]*c});for(var x=1;x<f;++x)v+=s[x-1][g][1]*c,r.setItemLayout(a[x].indices[g],{layerIndex:x,x:s[x][g][0],y0:v,y:s[x][g][1]*c})}}function wme(r){for(var e=r.length,t=r[0].length,n=[],a=[],i=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=r[l][o][1];s>i&&(i=s),n.push(s)}for(var u=0;u<t;++u)a[u]=(i-n[u])/2;i=0;for(var c=0;c<t;++c){var f=n[c]+a[c];f>i&&(i=f)}return{y0:a,max:i}}function Tme(r){r.registerChartView(xme),r.registerSeriesModel(_me),r.registerLayout(Sme),r.registerProcessor(ud("themeRiver"))}var Cme=2,Ame=4,rj=(function(r){K(e,r);function e(t,n,a,i){var o=r.call(this)||this;o.z2=Cme,o.textConfig={inside:!0},Pe(o).seriesIndex=n.seriesIndex;var s=new ot({z2:Ame,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,n,a,i),o}return e.prototype.updateData=function(t,n,a,i,o){this.node=n,n.piece=this,a=a||this._seriesModel,i=i||this._ecModel;var s=this;Pe(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=ie({},c);f.label=null;var d=n.getVisual("style");d.lineJoin="bevel";var v=n.getVisual("decal");v&&(d.decal=kh(v,o));var g=Bi(l.getModel("itemStyle"),f,!0);ie(f,g),O(Tn,function(w){var T=s.ensureState(w),C=l.getModel([w,"itemStyle"]);T.style=C.getItemStyle();var D=Bi(C,f);D&&(T.shape=D)}),t?(s.setShape(f),s.shape.r=c.r0,jt(s,{shape:{r:c.r}},a,n.dataIndex)):(lt(s,{shape:f},a),Pa(s)),s.useStyle(d),this._updateLabel(a);var x=l.getShallow("cursor");x&&s.attr("cursor",x),this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel;var y=u.get("focus"),b=y==="relative"?Ch(n.getAncestorsIndices(),n.getDescendantIndices()):y==="ancestor"?n.getAncestorsIndices():y==="descendant"?n.getDescendantIndices():y;Ut(this,b,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var n=this,a=this.node.getModel(),i=a.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),f=this,d=f.getTextContent(),v=this.node.dataIndex,g=i.get("minAngle")/180*Math.PI,x=i.get("show")&&!(g!=null&&Math.abs(s)<g);d.ignore=!x,O($p,function(b){var w=b==="normal"?a.getModel("label"):a.getModel([b,"label"]),T=b==="normal",C=T?d:d.ensureState(b),D=t.getFormattedLabel(v,b);T&&(D=D||n.node.name),C.style=Nt(w,{},null,b!=="normal",!0),D&&(C.style.text=D);var M=w.get("show");M!=null&&!T&&(C.ignore=!M);var N=y(w,"position"),R=T?f:f.states[b],E=R.style.fill;R.textConfig={outsideFill:w.get("color")==="inherit"?E:null,inside:N!=="outside"};var k,I=y(w,"distance")||0,z=y(w,"align"),P=y(w,"rotate"),G=Math.PI*.5,U=Math.PI*1.5,B=na(P==="tangential"?Math.PI/2-l:l),F=B>G&&!Dh(B-G)&&B<U;N==="outside"?(k=o.r+I,z=F?"right":"left"):!z||z==="center"?(s===2*Math.PI&&o.r0===0?k=0:k=(o.r+o.r0)/2,z="center"):z==="left"?(k=o.r0+I,z=F?"right":"left"):z==="right"&&(k=o.r-I,z=F?"left":"right"),C.style.align=z,C.style.verticalAlign=y(w,"verticalAlign")||"middle",C.x=k*u+o.cx,C.y=k*c+o.cy;var H=0;P==="radial"?H=na(-l)+(F?Math.PI:0):P==="tangential"?H=na(Math.PI/2-l)+(F?Math.PI:0):st(P)&&(H=P*Math.PI/180),C.rotation=na(H)});function y(b,w){var T=b.get(w);return T??i.get(w)}d.dirtyStyle()},e})(rn),AA="sunburstRootToNode",nj="sunburstHighlight",Mme="sunburstUnhighlight";function Dme(r){r.registerAction({type:AA,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(a,i){var o=hg(e,[AA],a);if(o){var s=a.getViewRoot();s&&(e.direction=uN(s,o.node)?"rollUp":"drillDown"),a.resetViewRoot(o.node)}}}),r.registerAction({type:nj,update:"none"},function(e,t,n){e=ie({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(i){var o=hg(e,[nj],i);o&&(e.dataIndex=o.node.dataIndex)}n.dispatchAction(ie(e,{type:"highlight"}))}),r.registerAction({type:Mme,update:"updateView"},function(e,t,n){e=ie({},e),n.dispatchAction(ie(e,{type:"downplay"}))})}var Nme=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){var o=this;this.seriesModel=t,this.api=a,this.ecModel=n;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),c=this.group,f=t.get("renderLabelForZeroData"),d=[];u.eachNode(function(w){d.push(w)});var v=this._oldChildren||[];g(d,v),b(l,u),this._initEvents(),this._oldChildren=d;function g(w,T){if(w.length===0&&T.length===0)return;new Qo(T,w,C,C).add(D).update(D).remove(He(D,null)).execute();function C(M){return M.getId()}function D(M,N){var R=M==null?null:w[M],E=N==null?null:T[N];x(R,E)}}function x(w,T){if(!f&&w&&!w.getValue()&&(w=null),w!==l&&T!==l){if(T&&T.piece)w?(T.piece.updateData(!1,w,t,n,a),s.setItemGraphicEl(w.dataIndex,T.piece)):y(T);else if(w){var C=new rj(w,t,n,a);c.add(C),s.setItemGraphicEl(w.dataIndex,C)}}}function y(w){w&&w.piece&&(c.remove(w.piece),w.piece=null)}function b(w,T){T.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,w,t,n,a):(o.virtualPiece=new rj(w,t,n,a),c.add(o.virtualPiece)),T.piece.off("click"),o.virtualPiece.on("click",function(C){o._rootToNode(T.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(n){var a=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!a&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";Ox(u,c)}}a=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:AA,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e})(_t),Lme=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};GU(a);var i=this._levelModels=fe(t.levels||[],function(l){return new et(l,this,n)},this),o=lN.createTree(a,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),d=i[f.depth];return d&&(u.parentModel=d),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=db(a,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){Y7(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})(Tt);function GU(r){var e=0;O(r.children,function(n){GU(n);var a=n.value;ce(a)&&(a=a[0]),e+=a});var t=r.value;ce(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),ce(r.value)?r.value[0]=t:r.value=t}var aj=Math.PI/180;function Rme(r,e,t){e.eachSeriesByType(r,function(n){var a=n.get("center"),i=n.get("radius");ce(i)||(i=[0,i]),ce(a)||(a=[a,a]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=me(a[0],o),c=me(a[1],s),f=me(i[0],l/2),d=me(i[1],l/2),v=-n.get("startAngle")*aj,g=n.get("minAngle")*aj,x=n.getData().tree.root,y=n.getViewRoot(),b=y.depth,w=n.get("sort");w!=null&&HU(y,w);var T=0;O(y.children,function(B){!isNaN(B.getValue())&&T++});var C=y.getValue(),D=Math.PI/(C||T)*2,M=y.depth>0,N=y.height-(M?-1:1),R=(d-f)/(N||1),E=n.get("clockwise"),k=n.get("stillShowZeroSum"),I=E?1:-1,z=function(B,F){if(B){var H=F;if(B!==x){var X=B.getValue(),V=C===0&&k?D:X*D;V<g&&(V=g),H=F+I*V;var W=B.depth-b-(M?-1:1),$=f+R*W,te=f+R*(W+1),ue=n.getLevelModel(B);if(ue){var ge=ue.get("r0",!0),Se=ue.get("r",!0),Xe=ue.get("radius",!0);Xe!=null&&(ge=Xe[0],Se=Xe[1]),ge!=null&&($=me(ge,l/2)),Se!=null&&(te=me(Se,l/2))}B.setLayout({angle:V,startAngle:F,endAngle:H,clockwise:E,cx:u,cy:c,r0:$,r:te})}if(B.children&&B.children.length){var be=0;O(B.children,function(we){be+=z(we,F+be)})}return H-F}};if(M){var P=f,G=f+R,U=Math.PI*2;x.setLayout({angle:U,startAngle:v,endAngle:v+U,clockwise:E,cx:u,cy:c,r0:P,r:G})}z(y,v)})}function HU(r,e){var t=r.children||[];r.children=Eme(t,e),t.length&&O(r.children,function(n){HU(n,e)})}function Eme(r,e){if(Ae(e)){var t=fe(r,function(a,i){var o=a.getValue();return{params:{depth:a.depth,height:a.height,dataIndex:a.dataIndex,getValue:function(){return o}},index:i}});return t.sort(function(a,i){return e(a.params,i.params)}),fe(t,function(a){return r[a.index]})}else{var n=e==="asc";return r.sort(function(a,i){var o=(a.getValue()-i.getValue())*(n?1:-1);return o===0?(a.dataIndex-i.dataIndex)*(n?-1:1):o})}}function kme(r){var e={};function t(n,a,i){if(n.depth===0)return ee.color.neutral50;for(var o=n;o&&o.depth>1;)o=o.parentNode;var s=a.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&ye(s)&&(s=bx(s,(n.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(n){var a=n.getData(),i=a.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,n,i.root.height));var u=a.ensureUniqueItemVisual(o.dataIndex,"style");ie(u,l)})})}function Ime(r){r.registerChartView(Nme),r.registerSeriesModel(Lme),r.registerLayout(He(Rme,"sunburst")),r.registerProcessor(He(ud,"sunburst")),r.registerVisual(kme),Dme(r)}var ij={color:"fill",borderColor:"stroke"},Ome={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Fo=Je(),Pme=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,n){return to(null,this)},e.prototype.getDataParams=function(t,n,a){var i=r.prototype.getDataParams.call(this,t,n);return a&&(i.info=Fo(a).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e})(Tt);function zme(r,e){return e=e||[0,0],fe(["x","y"],function(t,n){var a=this.getAxis(t),i=e[n],o=r[n]/2;return a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(i-o)-a.dataToCoord(i+o))},this)}function jme(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:xe(zme,r)}}}function Bme(r,e){return e=e||[0,0],fe([0,1],function(t){var n=e[t],a=r[t]/2,i=[],o=[];return i[t]=n-a,o[t]=n+a,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function Vme(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:xe(Bme,r)}}}function Gme(r,e){var t=this.getAxis(),n=e instanceof Array?e[0]:e,a=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(n-a)-t.dataToCoord(n+a))}function Hme(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:xe(Gme,r)}}}function Fme(r,e){return e=e||[0,0],fe(["Radius","Angle"],function(t,n){var a="get"+t+"Axis",i=this[a](),o=e[n],s=r[n]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function Ume(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:n[1],r0:n[0]},api:{coord:function(a){var i=e.dataToRadius(a[0]),o=t.dataToAngle(a[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:xe(Fme,r)}}}function Yme(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(n,a){return r.dataToPoint(n,a)},layout:function(n,a){return r.dataToLayout(n,a)}}}}function Wme(r){var e=r.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t,n){return r.dataToPoint(t,n)},layout:function(t,n){return r.dataToLayout(t,n)}}}}function FU(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||_e(r,"text")))}function UU(r,e,t){var n=r,a,i,o;if(e==="text")o=n;else{o={},_e(n,"text")&&(o.text=n.text),_e(n,"rich")&&(o.rich=n.rich),_e(n,"textFill")&&(o.fill=n.textFill),_e(n,"textStroke")&&(o.stroke=n.textStroke),_e(n,"fontFamily")&&(o.fontFamily=n.fontFamily),_e(n,"fontSize")&&(o.fontSize=n.fontSize),_e(n,"fontStyle")&&(o.fontStyle=n.fontStyle),_e(n,"fontWeight")&&(o.fontWeight=n.fontWeight),i={type:"text",style:o,silent:!0},a={};var s=_e(n,"textPosition");t?a.position=s?n.textPosition:"inside":s&&(a.position=n.textPosition),_e(n,"textPosition")&&(a.position=n.textPosition),_e(n,"textOffset")&&(a.offset=n.textOffset),_e(n,"textRotation")&&(a.rotation=n.textRotation),_e(n,"textDistance")&&(a.distance=n.textDistance)}return oj(o,r),O(o.rich,function(l){oj(l,l)}),{textConfig:a,textContent:i}}function oj(r,e){e&&(e.font=e.textFont||e.font,_e(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),_e(e,"textAlign")&&(r.align=e.textAlign),_e(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),_e(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),_e(e,"textWidth")&&(r.width=e.textWidth),_e(e,"textHeight")&&(r.height=e.textHeight),_e(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),_e(e,"textPadding")&&(r.padding=e.textPadding),_e(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),_e(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),_e(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),_e(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),_e(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),_e(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),_e(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function sj(r,e,t){var n=r;n.textPosition=n.textPosition||t.position||"inside",t.offset!=null&&(n.textOffset=t.offset),t.rotation!=null&&(n.textRotation=t.rotation),t.distance!=null&&(n.textDistance=t.distance);var a=n.textPosition.indexOf("inside")>=0,i=r.fill||ee.color.neutral99;lj(n,e);var o=n.textFill==null;return a?o&&(n.textFill=t.insideFill||ee.color.neutral00,!n.textStroke&&t.insideStroke&&(n.textStroke=t.insideStroke),!n.textStroke&&(n.textStroke=i),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=r.fill||t.outsideFill||ee.color.neutral00),!n.textStroke&&t.outsideStroke&&(n.textStroke=t.outsideStroke)),n.text=e.text,n.rich=e.rich,O(e.rich,function(s){lj(s,s)}),n}function lj(r,e){e&&(_e(e,"fill")&&(r.textFill=e.fill),_e(e,"stroke")&&(r.textStroke=e.fill),_e(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),_e(e,"font")&&(r.font=e.font),_e(e,"fontStyle")&&(r.fontStyle=e.fontStyle),_e(e,"fontWeight")&&(r.fontWeight=e.fontWeight),_e(e,"fontSize")&&(r.fontSize=e.fontSize),_e(e,"fontFamily")&&(r.fontFamily=e.fontFamily),_e(e,"align")&&(r.textAlign=e.align),_e(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),_e(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),_e(e,"width")&&(r.textWidth=e.width),_e(e,"height")&&(r.textHeight=e.height),_e(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),_e(e,"padding")&&(r.textPadding=e.padding),_e(e,"borderColor")&&(r.textBorderColor=e.borderColor),_e(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),_e(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),_e(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),_e(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),_e(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),_e(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),_e(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),_e(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),_e(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),_e(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var YU={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},uj=it(YU);ka(Wi,function(r,e){return r[e]=1,r},{});Wi.join(", ");var u1=["","style","shape","extra"],Vh=Je();function MN(r,e,t,n,a){var i=r+"Animation",o=Kh(r,n,a)||{},s=Vh(e).userDuring;return o.duration>0&&(o.during=s?xe(Kme,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),ie(o,t[i]),o}function ex(r,e,t,n){n=n||{};var a=n.dataIndex,i=n.isInit,o=n.clearStyle,s=t.isAnimationEnabled(),l=Vh(r),u=e.style;l.userDuring=e.during;var c={},f={};if(Jme(r,e,f),r.type==="compound")for(var d=r.shape.paths,v=e.shape.paths,g=0;g<v.length;g++){var x=v[g];BT("shape",x,d[g])}else BT("shape",e,f),BT("extra",e,f);if(!i&&s&&(Qme(r,e,c),cj("shape",r,e,c),cj("extra",r,e,c),eye(r,e,u,c)),f.style=u,Xme(r,f,o),Zme(r,e),s)if(i){var y={};O(u1,function(w){var T=w?e[w]:e;T&&T.enterFrom&&(w&&(y[w]=y[w]||{}),ie(w?y[w]:y,T.enterFrom))});var b=MN("enter",r,e,t,a);b.duration>0&&r.animateFrom(y,b)}else qme(r,e,a||0,t,c);WU(r,e),u?r.dirty():r.markRedraw()}function WU(r,e){for(var t=Vh(r).leaveToProps,n=0;n<u1.length;n++){var a=u1[n],i=a?e[a]:e;i&&i.leaveTo&&(t||(t=Vh(r).leaveToProps={}),a&&(t[a]=t[a]||{}),ie(a?t[a]:t,i.leaveTo))}}function gb(r,e,t,n){if(r){var a=r.parent,i=Vh(r).leaveToProps;if(i){var o=MN("update",r,e,t,0);o.done=function(){a&&a.remove(r)},r.animateTo(i,o)}else a&&a.remove(r)}}function ac(r){return r==="all"}function Xme(r,e,t){var n=e.style;if(!r.isGroup&&n){if(t){r.useStyle({});for(var a=r.animators,i=0;i<a.length;i++){var o=a[i];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(n)}e&&(e.style=null,e&&r.attr(e),e.style=n)}function qme(r,e,t,n,a){if(a){var i=MN("update",r,e,n,t);i.duration>0&&r.animateFrom(a,i)}}function Zme(r,e){_e(e,"silent")&&(r.silent=e.silent),_e(e,"ignore")&&(r.ignore=e.ignore),r instanceof Oa&&_e(e,"invisible")&&(r.invisible=e.invisible),r instanceof tt&&_e(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Si={},$me={setTransform:function(r,e){return Si.el[r]=e,this},getTransform:function(r){return Si.el[r]},setShape:function(r,e){var t=Si.el,n=t.shape||(t.shape={});return n[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Si.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Si.el,n=t.style;return n&&(n[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Si.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Si.el.extra||(Si.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Si.el.extra;if(e)return e[r]}};function Kme(){var r=this,e=r.el;if(e){var t=Vh(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}Si.el=e,n($me)}}function cj(r,e,t,n){var a=t[r];if(a){var i=e[r],o;if(i){var s=t.transition,l=a.transition;if(l)if(!o&&(o=n[r]={}),ac(l))ie(o,i);else for(var u=Lt(l),c=0;c<u.length;c++){var f=u[c],d=i[f];o[f]=d}else if(ac(s)||Fe(s,r)>=0){!o&&(o=n[r]={});for(var v=it(i),c=0;c<v.length;c++){var f=v[c],d=i[f];tye(a[f],d)&&(o[f]=d)}}}}}function BT(r,e,t){var n=e[r];if(n)for(var a=t[r]={},i=it(n),o=0;o<i.length;o++){var s=i[o];a[s]=Cp(n[s])}}function Qme(r,e,t){for(var n=e.transition,a=ac(n)?Wi:Lt(n||[]),i=0;i<a.length;i++){var o=a[i];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];t[o]=s}}}function Jme(r,e,t){for(var n=0;n<uj.length;n++){var a=uj[n],i=YU[a],o=e[a];o&&(t[i[0]]=o[0],t[i[1]]=o[1])}for(var n=0;n<Wi.length;n++){var s=Wi[n];e[s]!=null&&(t[s]=e[s])}}function eye(r,e,t,n){if(t){var a=r.style,i;if(a){var o=t.transition,s=e.transition;if(o&&!ac(o)){var l=Lt(o);!i&&(i=n.style={});for(var u=0;u<l.length;u++){var c=l[u],f=a[c];i[c]=f}}else if(r.getAnimationStyleProps&&(ac(s)||ac(o)||Fe(s,"style")>=0)){var d=r.getAnimationStyleProps(),v=d?d.style:null;if(v){!i&&(i=n.style={});for(var g=it(t),u=0;u<g.length;u++){var c=g[u];if(v[c]){var f=a[c];i[c]=f}}}}}}}function tye(r,e){return en(r)?r!==e:r!=null&&isFinite(r)}var XU=Je(),rye=["percent","easing","shape","style","extra"];function qU(r){r.stopAnimation("keyframe"),r.attr(XU(r))}function c1(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(ce(e)){O(e,function(s){c1(r,s,t)});return}var n=e.keyframes,a=e.duration;if(t&&a==null){var i=Kh("enter",t,0);a=i&&i.duration}if(!(!n||!a)){var o=XU(r);O(u1,function(s){if(!(s&&!r[s])){var l;n.sort(function(u,c){return u.percent-c.percent}),O(n,function(u){var c=r.animators,f=s?u[s]:u;if(f){var d=it(f);if(s||(d=dt(d,function(x){return Fe(rye,x)<0})),!!d.length){l||(l=r.animate(s,e.loop,!0),l.scope="keyframe");for(var v=0;v<c.length;v++)c[v]!==l&&c[v].targetName===l.targetName&&c[v].stopTracks(d);s&&(o[s]=o[s]||{});var g=s?o[s]:o;O(d,function(x){g[x]=((s?r[s]:r)||{})[x]}),l.whenWithKeys(a*u.percent,f,d,u.easing)}}}),l&&l.delay(e.delay||0).duration(a).start(e.easing)}})}}}var Uo="emphasis",il="normal",DN="blur",NN="select",Cl=[il,Uo,DN,NN],VT={normal:["itemStyle"],emphasis:[Uo,"itemStyle"],blur:[DN,"itemStyle"],select:[NN,"itemStyle"]},GT={normal:["label"],emphasis:[Uo,"label"],blur:[DN,"label"],select:[NN,"label"]},nye=["x","y"],aye="e\0\0",ba={normal:{},emphasis:{},blur:{},select:{}},iye={cartesian2d:jme,geo:Vme,single:Hme,polar:Ume,calendar:Yme,matrix:Wme};function MA(r){return r instanceof tt}function DA(r){return r instanceof Oa}function oye(r,e){e.copyTransform(r),DA(e)&&DA(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,MA(e)&&MA(r)&&e.setShape(r.shape))}var sye=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=fj(t,s,n,a);o||l.removeAll(),s.diff(o).add(function(f){HT(a,null,f,u(f,i),t,l,s)}).remove(function(f){var d=o.getItemGraphicEl(f);d&&gb(d,Fo(d).option,t)}).update(function(f,d){var v=o.getItemGraphicEl(d);HT(a,v,f,u(f,i),t,l,s)}).execute();var c=t.get("clip",!0)?qg(t.coordinateSystem,!1,t):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,n,a){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,n,a,i,o){var s=n.getData(),l=fj(n,s,a,i),u=this._progressiveEls=[];function c(v){v.isGroup||(v.incremental=!0,v.ensureState("emphasis").hoverLayer=!0)}for(var f=t.start;f<t.end;f++){var d=HT(null,null,f,l(f,o),n,this.group,s);d&&(d.traverse(c),u.push(d))}},e.prototype.eachRendered=function(t){Nl(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,n,a,i){var o=n.element;if(o==null||a.name===o)return!0;for(;(a=a.__hostTarget||a.parent)&&a!==this.group;)if(a.name===o)return!0;return!1},e.type="custom",e})(_t);function LN(r){var e=r.type,t;if(e==="path"){var n=r.shape,a=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,i=KU(n);t=Lh(i,null,a,n.layout||"center"),Fo(t).customPathData=i}else if(e==="image")t=new kr({}),Fo(t).customImagePath=r.style.image;else if(e==="text")t=new ot({});else if(e==="group")t=new De;else if(e==="compoundPath"){var n=r.shape;if(!n||!n.paths){var o="";gt(o)}var s=fe(n.paths,function(c){if(c.type==="path")return Lh(c.shape.pathData,c,null);var f=Qp(c.type);if(!f){var d="";gt(d)}return new f});t=new Vg({shape:{paths:s}})}else{var l=Qp(e);if(!l){var o="";gt(o)}t=new l}return Fo(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function RN(r,e,t,n,a,i,o){qU(e);var s=a&&a.normal.cfg;s&&e.setTextConfig(s),n&&n.transition==null&&(n.transition=nye);var l=n&&n.style;if(l){if(e.type==="text"){var u=l;_e(u,"textFill")&&(u.fill=u.textFill),_e(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,f=MA(e)?l.decal:null;r&&f&&(f.dirty=!0,c=kh(f,r)),l.__decalPattern=c}if(DA(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}ex(e,n,i,{dataIndex:t,isInit:o,clearStyle:!0}),c1(e,n.keyframeAnimation,i)}function ZU(r,e,t,n,a){var i=e.isGroup?null:e,o=a&&a[r].cfg;if(i){var s=i.ensureState(r);if(n===!1){var l=i.getState(r);l&&(l.style=null)}else s.style=n||null;o&&(s.textConfig=o),fc(i)}}function lye(r,e,t){if(!r.isGroup){var n=r,a=t.currentZ,i=t.currentZLevel;n.z=a,n.zlevel=i;var o=e.z2;o!=null&&(n.z2=o||0);for(var s=0;s<Cl.length;s++)uye(n,e,Cl[s])}}function uye(r,e,t){var n=t===il,a=n?e:f1(e,t),i=a?a.z2:null,o;i!=null&&(o=n?r:r.ensureState(t),o.z2=i||0)}function fj(r,e,t,n){var a=r.get("renderItem");if(typeof a=="string"){var i=rse(a);i&&(a=i)}var o=r.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):iye[o.type](o));for(var l=Le({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:D,style:N,ordinalRawValue:M,styleEmphasis:R,visual:I,barLayout:z,currentSeriesIndices:P,font:G},s.api||{}),u={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:s.coordSys,dataInsideLength:e.count(),encode:cye(r.getData()),itemPayload:r.get("itemPayload")||{}},c,f,d={},v={},g={},x={},y=0;y<Cl.length;y++){var b=Cl[y];g[b]=r.getModel(VT[b]),x[b]=r.getModel(GT[b])}function w(U){return U===c?f||(f=e.getItemModel(U)):e.getItemModel(U)}function T(U,B){return e.hasItemOption?U===c?d[B]||(d[B]=w(U).getModel(VT[B])):w(U).getModel(VT[B]):g[B]}function C(U,B){return e.hasItemOption?U===c?v[B]||(v[B]=w(U).getModel(GT[B])):w(U).getModel(GT[B]):x[B]}return function(U,B){return c=U,f=null,d={},v={},a&&a(Le({dataIndexInside:U,dataIndex:e.getRawIndex(U),actionType:B?B.type:null},u),l)};function D(U,B){return B==null&&(B=c),e.getStore().get(e.getDimensionIndex(U||0),B)}function M(U,B){B==null&&(B=c),U=U||0;var F=e.getDimensionInfo(U);if(!F){var H=e.getDimensionIndex(U);return H>=0?e.getStore().get(H,B):void 0}var X=e.get(F.name,B),V=F&&F.ordinalMeta;return V?V.categories[X]:X}function N(U,B){B==null&&(B=c);var F=e.getItemVisual(B,"style"),H=F&&F.fill,X=F&&F.opacity,V=T(B,il).getItemStyle();H!=null&&(V.fill=H),X!=null&&(V.opacity=X);var W={inheritColor:ye(H)?H:ee.color.neutral99},$=C(B,il),te=Nt($,null,W,!1,!0);te.text=$.getShallow("show")?Ce(r.getFormattedLabel(B,il),Ph(e,B)):null;var ue=Ex($,W,!1);return k(U,V),V=sj(V,te,ue),U&&E(V,U),V.legacy=!0,V}function R(U,B){B==null&&(B=c);var F=T(B,Uo).getItemStyle(),H=C(B,Uo),X=Nt(H,null,null,!0,!0);X.text=H.getShallow("show")?zn(r.getFormattedLabel(B,Uo),r.getFormattedLabel(B,il),Ph(e,B)):null;var V=Ex(H,null,!0);return k(U,F),F=sj(F,X,V),U&&E(F,U),F.legacy=!0,F}function E(U,B){for(var F in B)_e(B,F)&&(U[F]=B[F])}function k(U,B){U&&(U.textFill&&(B.textFill=U.textFill),U.textPosition&&(B.textPosition=U.textPosition))}function I(U,B){if(B==null&&(B=c),_e(ij,U)){var F=e.getItemVisual(B,"style");return F?F[ij[U]]:null}if(_e(Ome,U))return e.getItemVisual(B,U)}function z(U){if(o.type==="cartesian2d"){var B=o.getBaseAxis();return ile(Le({axis:B},U))}}function P(){return t.getCurrentSeriesIndices()}function G(U){return tD(U,t)}}function cye(r){var e={};return O(r.dimensions,function(t){var n=r.getDimensionInfo(t);if(!n.isExtraCoord){var a=n.coordDim,i=e[a]=e[a]||[];i[n.coordDimIndex]=r.getDimensionIndex(t)}}),e}function HT(r,e,t,n,a,i,o){if(!n){i.remove(e);return}var s=EN(r,e,t,n,a,i);return s&&o.setItemGraphicEl(t,s),s&&Ut(s,n.focus,n.blurScope,n.emphasisDisabled),s}function EN(r,e,t,n,a,i){var o=-1,s=e;e&&$U(e,n,a)&&(o=Fe(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=LN(n),s&&oye(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),ba.normal.cfg=ba.normal.conOpt=ba.emphasis.cfg=ba.emphasis.conOpt=ba.blur.cfg=ba.blur.conOpt=ba.select.cfg=ba.select.conOpt=null,ba.isLegacy=!1,hye(u,t,n,a,l,ba),fye(u,t,n,a,l),RN(r,u,t,n,ba,a,l),_e(n,"info")&&(Fo(u).info=n.info);for(var c=0;c<Cl.length;c++){var f=Cl[c];if(f!==il){var d=f1(n,f),v=kN(n,d,f);ZU(f,u,d,v,ba)}}return lye(u,n,a),n.type==="group"&&dye(r,u,t,n,a),o>=0?i.replaceAt(u,o):i.add(u),u}function $U(r,e,t){var n=Fo(r),a=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||a!=null&&a!==n.customGraphicType||a==="path"&&mye(i)&&KU(i)!==n.customPathData||a==="image"&&_e(o,"image")&&o.image!==n.customImagePath}function fye(r,e,t,n,a){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&$U(o,i,n)&&(o=null),o||(o=LN(i),r.setClipPath(o)),RN(null,o,e,i,null,n,a)}}function hye(r,e,t,n,a,i){if(!(r.isGroup||r.type==="compoundPath")){hj(t,null,i),hj(t,Uo,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=LN(o),r.setTextContent(c)),RN(null,c,e,o,null,n,a);for(var f=o&&o.style,d=0;d<Cl.length;d++){var v=Cl[d];if(v!==il){var g=i[v].conOpt;ZU(v,c,g,kN(o,g,v),null)}}f?c.dirty():c.markRedraw()}}}}function hj(r,e,t){var n=e?f1(r,e):r,a=e?kN(r,n,Uo):r.style,i=r.type,o=n?n.textConfig:null,s=r.textContent,l=s?e?f1(s,e):s:null;if(a&&(t.isLegacy||FU(a,i,!!o,!!l))){t.isLegacy=!0;var u=UU(a,i,!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 f=e?t[e]:t.normal;f.cfg=o,f.conOpt=l}function f1(r,e){return e?r?r[e]:null:r}function kN(r,e,t){var n=e&&e.style;return n==null&&t===Uo&&r&&(n=r.styleEmphasis),n}function dye(r,e,t,n,a){var i=n.children,o=i?i.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){pye({api:r,oldChildren:e.children()||[],newChildren:i||[],dataIndex:t,seriesModel:a,group:e});return}u&&e.removeAll();for(var c=0;c<o;c++){var f=i[c],d=e.childAt(c);f?(f.ignore==null&&(f.ignore=!1),EN(r,d,t,f,a,e)):d.ignore=!0}for(var v=e.childCount()-1;v>=c;v--){var g=e.childAt(v);vye(e,g,a)}}}function vye(r,e,t){e&&gb(e,Fo(r).option,t)}function pye(r){new Qo(r.oldChildren,r.newChildren,dj,dj,r).add(vj).update(vj).remove(gye).execute()}function dj(r,e){var t=r&&r.name;return t??aye+e}function vj(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,a=e!=null?t.oldChildren[e]:null;EN(t.api,a,t.dataIndex,n,t.seriesModel,t.group)}function gye(r){var e=this.context,t=e.oldChildren[r];t&&gb(t,Fo(t).option,e.seriesModel)}function KU(r){return r&&(r.pathData||r.d)}function mye(r){return r&&(_e(r,"pathData")||_e(r,"d"))}function yye(r){r.registerChartView(sye),r.registerSeriesModel(Pme)}var ku=Je(),pj=Me,FT=xe,IN=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,n,a){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!a&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,e,t,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new De,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var d=He(gj,t,f);this.updatePointerEl(s,u,d),this.updateLabelEl(s,u,d,t)}yj(s,t,!0),this._renderHandle(i)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var n=t.get("animation"),a=e.axis,i=a.type==="category",o=t.get("snap");if(!o&&!i)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(i&&a.getBandWidth()>s)return!0;if(o){var l=tN(e).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(e,t,n,a,i){},r.prototype.createPointerEl=function(e,t,n,a){var i=t.pointer;if(i){var o=ku(e).pointerEl=new _c[i.type](pj(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,a){if(t.label){var i=ku(e).labelEl=new ot(pj(t.label));e.add(i),mj(i,a)}},r.prototype.updatePointerEl=function(e,t,n){var a=ku(e).pointerEl;a&&t.pointer&&(a.setStyle(t.pointer.style),n(a,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,n,a){var i=ku(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),mj(i,a))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=t.getModel("handle"),o=t.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=Qh(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Zo(u.event)},onmousedown:FT(this._onHandleDragMove,this,0,0),drift:FT(this._onHandleDragMove,this),ondragend:FT(this._onHandleDragEnd,this)}),n.add(a)),yj(a,t,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");ce(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,ad(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){gj(this._axisPointerModel,!t&&this._moveAnimation,this._handle,UT(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var a=this.updateHandleTransform(UT(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(UT(a)),ku(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,a=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),a&&t.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),rg(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},r})();function gj(r,e,t,n){QU(ku(t).lastProp,n)||(ku(t).lastProp=n,e?lt(t,n,r):(t.stopAnimation(),t.attr(n)))}function QU(r,e){if(Re(r)&&Re(e)){var t=!0;return O(e,function(n,a){t=t&&QU(r[a],n)}),!!t}else return r===e}function mj(r,e){r[e.get(["label","show"])?"show":"hide"]()}function UT(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function yj(r,e,t){var n=e.get("z"),a=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=t)})}function ON(r){var e=r.get("type"),t=r.getModel(e+"Style"),n;return e==="line"?(n=t.getLineStyle(),n.fill=null):e==="shadow"&&(n=t.getAreaStyle(),n.stroke=null),n}function JU(r,e,t,n,a){var i=t.get("value"),o=e9(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=td(s.get("padding")||0),u=s.getFont(),c=V1(o,u),f=a.position,d=c.width+l[1]+l[3],v=c.height+l[0]+l[2],g=a.align;g==="right"&&(f[0]-=d),g==="center"&&(f[0]-=d/2);var x=a.verticalAlign;x==="bottom"&&(f[1]-=v),x==="middle"&&(f[1]-=v/2),xye(f,d,v,n);var y=s.get("backgroundColor");(!y||y==="auto")&&(y=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:Nt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:y}),z2:10}}function xye(r,e,t,n){var a=n.getWidth(),i=n.getHeight();r[0]=Math.min(r[0]+e,a)-e,r[1]=Math.min(r[1]+t,i)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function e9(r,e,t,n,a){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:Wx(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};O(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),ye(o)?i=o.replace("{value}",i):Ae(o)&&(i=o(s))}return i}function PN(r,e,t){var n=Dr();return ns(n,n,t.rotation),ai(n,n,t.position),ei([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function t9(r,e,t,n,a,i){var o=Sn.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=a.get(["label","margin"]),JU(e,n,a,i,{position:PN(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function zN(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function r9(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function xj(r,e,t,n,a,i){return{cx:r,cy:e,r0:t,r:n,startAngle:a,endAngle:i,clockwise:!0}}var bye=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),c=bj(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var d=ON(i),v=_ye[u](s,f,c);v.style=d,t.graphicKey=v.type,t.pointer=v}var g=r1(l.getRect(),a);t9(n,t,g,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=r1(n.axis.grid.getRect(),n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=PN(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=bj(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[t.x,t.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var d=(u[1]+u[0])/2,v=[d,d];v[c]=f[c];var g=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:v,tooltipOption:g[c]}},e})(IN);function bj(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var _ye={line:function(r,e,t){var n=zN([e,t[0]],[e,t[1]],_j(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=Math.max(1,r.getBandWidth()),a=t[1]-t[0];return{type:"Rect",shape:r9([e-n/2,t[0]],[n,a],_j(r))}}};function _j(r){return r.dim==="x"?0:1}var Sye=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:ee.color.border,width:1,type:"dashed"},shadowStyle:{color:ee.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:ee.color.neutral00,padding:[5,7,5,7],backgroundColor:ee.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:ee.color.accent40,throttle:40}},e})(Qe),jo=Je(),wye=O;function n9(r,e,t){if(!nt.node){var n=e.getZr();jo(n).records||(jo(n).records={}),Tye(n,e);var a=jo(n).records[r]||(jo(n).records[r]={});a.handler=t}}function Tye(r,e){if(jo(r).initialized)return;jo(r).initialized=!0,t("click",He(Sj,"click")),t("mousemove",He(Sj,"mousemove")),t("globalout",Aye);function t(n,a){r.on(n,function(i){var o=Mye(e);wye(jo(r).records,function(s){s&&a(s,i,o.dispatchAction)}),Cye(o.pendings,e)})}}function Cye(r,e){var t=r.showTip.length,n=r.hideTip.length,a;t?a=r.showTip[t-1]:n&&(a=r.hideTip[n-1]),a&&(a.dispatchAction=null,e.dispatchAction(a))}function Aye(r,e,t){r.handler("leave",null,t)}function Sj(r,e,t,n){e.handler(r,t,n)}function Mye(r){var e={showTip:[],hideTip:[]},t=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=t,r.dispatchAction(n))};return{dispatchAction:t,pendings:e}}function NA(r,e){if(!nt.node){var t=e.getZr(),n=(jo(t).records||{})[r];n&&(jo(t).records[r]=null)}}var Dye=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=n.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";n9("axisPointer",a,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,n){NA("axisPointer",n)},e.prototype.dispose=function(t,n){NA("axisPointer",n)},e.type="axisPointer",e})(Rt);function a9(r,e){var t=[],n=r.seriesIndex,a;if(n==null||!(a=e.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=uc(i,r);if(o==null||o<0||ce(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)t=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,d=u.dim,v=f==="x"||f==="radius"?1:0,g=i.mapDimension(d),x=[];x[v]=i.get(g,o),x[1-v]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(x)||[]}else t=l.dataToPoint(i.getValues(fe(l.dimensions,function(b){return i.mapDimension(b)}),o))||[];else if(s){var y=s.getBoundingRect().clone();y.applyTransform(s.transform),t=[y.x+y.width/2,y.y+y.height/2]}return{point:t,el:s}}var wj=Je();function Nye(r,e,t){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||xe(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){tx(a)&&(a=a9({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=tx(a),u=i.axesInfo,c=s.axesInfo,f=n==="leave"||tx(a),d={},v={},g={list:[],map:{}},x={showPointer:He(Rye,v),showTooltip:He(Eye,g)};O(s.coordSysMap,function(b,w){var T=l||b.containPoint(a);O(s.coordSysAxesInfo[w],function(C,D){var M=C.axis,N=Pye(u,C);if(!f&&T&&(!u||N)){var R=N&&N.value;R==null&&!l&&(R=M.pointToData(a)),R!=null&&Tj(C,R,x,!1,d)}})});var y={};return O(c,function(b,w){var T=b.linkGroup;T&&!v[w]&&O(T.axesInfo,function(C,D){var M=v[D];if(C!==b&&M){var N=M.value;T.mapper&&(N=b.axis.scale.parse(T.mapper(N,Cj(C),Cj(b)))),y[b.key]=N}})}),O(y,function(b,w){Tj(c[w],b,x,!0,d)}),kye(v,c,d),Iye(g,a,r,o),Oye(c,o,t),d}}function Tj(r,e,t,n,a){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=Lye(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&ie(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function Lye(r,e){var t=e.axis,n=t.dim,a=r,i=[],o=Number.MAX_VALUE,s=-1;return O(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,d;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(c,r,t);d=v.dataIndices,f=v.nestestValue}else{if(d=l.indicesOfNearest(n,c[0],r,t.type==="category"?.5:null),!d.length)return;f=l.getData().get(c[0],d[0])}if(!(f==null||!isFinite(f))){var g=r-f,x=Math.abs(g);x<=o&&((x<o||g>=0&&s<0)&&(o=x,s=g,a=f,i.length=0),O(d,function(y){i.push({seriesIndex:l.seriesIndex,dataIndexInside:y,dataIndex:l.getData().getRawIndex(y)})}))}}),{payloadBatch:i,snapToValue:a}}function Rye(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function Eye(r,e,t,n){var a=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!a.length)){var l=e.coordSys.model,u=fg(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function kye(r,e,t){var n=t.axesInfo=[];O(e,function(a,i){var o=a.axisPointerModel.option,s=r[i];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function Iye(r,e,t,n){if(tx(e)||!r.list.length){n({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function Oye(r,e,t){var n=t.getZr(),a="axisPointerLastHighlights",i=wj(n)[a]||{},o=wj(n)[a]={};O(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&O(f.seriesDataIndices,function(d){var v=d.seriesIndex+" | "+d.dataIndex;o[v]=d})});var s=[],l=[];O(i,function(u,c){!o[c]&&l.push(u)}),O(o,function(u,c){!i[c]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Pye(r,e){for(var t=0;t<(r||[]).length;t++){var n=r[t];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function Cj(r){var e=r.axis.model,t={},n=t.axisDim=r.axis.dim;return t.axisIndex=t[n+"AxisIndex"]=e.componentIndex,t.axisName=t[n+"AxisName"]=e.name,t.axisId=t[n+"AxisId"]=e.id,t}function tx(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Kg(r){Cc.registerAxisPointerClass("CartesianAxisPointer",bye),r.registerComponentModel(Sye),r.registerComponentView(Dye),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!ce(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=zfe(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Nye)}function zye(r){We(D7),We(Kg)}var jye=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),d=i.get("type");if(d&&d!=="none"){var v=ON(i),g=Vye[d](s,l,f,c);g.style=v,t.graphicKey=g.type,t.pointer=g}var x=i.get(["label","margin"]),y=Bye(n,a,i,l,x);JU(t,a,i,o,y)},e})(IN);function Bye(r,e,t,n,a){var i=e.axis,o=i.dataToCoord(r),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(i.dim==="radius"){var d=Dr();ns(d,d,s),ai(d,d,[n.cx,n.cy]),u=ei([o,-a],d);var v=e.getModel("axisLabel").get("rotate")||0,g=Sn.innerTextLayout(s,v*Math.PI/180,-1);c=g.textAlign,f=g.textVerticalAlign}else{var x=l[1];u=n.coordToPoint([x+a,o]);var y=n.cx,b=n.cy;c=Math.abs(u[0]-y)/x<.3?"center":u[0]>y?"left":"right",f=Math.abs(u[1]-b)/x<.3?"middle":u[1]>b?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var Vye={line:function(r,e,t,n){return r.dim==="angle"?{type:"Line",shape:zN(e.coordToPoint([n[0],t]),e.coordToPoint([n[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,n){var a=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:xj(e.cx,e.cy,n[0],n[1],(-t-a/2)*i,(-t+a/2)*i)}:{type:"Sector",shape:xj(e.cx,e.cy,t-a/2,t+a/2,0,Math.PI*2)}}},Gye=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var n,a=this.ecModel;return a.eachComponent(t,function(i){i.getCoordSysModel()===this&&(n=i)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e})(Qe),jN=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Zt).models[0]},e.type="polarAxis",e})(Qe);Jt(jN,ld);var Hye=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e})(jN),Fye=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e})(jN),BN=(function(r){K(e,r);function e(t,n){return r.call(this,"radius",t,n)||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e})(Ba);BN.prototype.dataToRadius=Ba.prototype.dataToCoord;BN.prototype.radiusToData=Ba.prototype.coordToData;var Uye=Je(),VN=(function(r){K(e,r);function e(t,n){return r.call(this,"angle",t,n||[0,360])||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,n=t.getLabelModel(),a=t.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=V1(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),d=f/u;isNaN(d)&&(d=1/0);var v=Math.max(0,Math.floor(d)),g=Uye(t.model),x=g.lastAutoInterval,y=g.lastTickCount;return x!=null&&y!=null&&Math.abs(x-v)<=1&&Math.abs(y-o)<=1&&x>v?v=x:(g.lastTickCount=o,g.lastAutoInterval=v),v},e})(Ba);VN.prototype.dataToAngle=Ba.prototype.dataToCoord;VN.prototype.angleToData=Ba.prototype.coordToData;var i9=["radius","angle"],Yye=(function(){function r(e){this.dimensions=i9,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new BN,this._angleAxis=new VN,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,a=this._radiusAxis;return n.scale.type===e&&t.push(n),a.scale.type===e&&t.push(a),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],n)},r.prototype.pointToData=function(e,t,n){n=n||[];var a=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(a[0],t),n[1]=this._angleAxis.angleToData(a[1],t),n},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);a.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+n*n);t/=l,n/=l;for(var u=Math.atan2(-n,t)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e,t){t=t||[];var n=e[0],a=e[1]/180*Math.PI;return t[0]=Math.cos(a)*n+this.cx,t[1]=-Math.sin(a)*n+this.cy,t},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),n=t.getExtent().slice();n[0]>n[1]&&n.reverse();var a=e.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-a[0]*i,endAngle:-a[1]*i,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,d=this.r,v=this.r0;return d!==v&&f-o<=d*d&&f+o>=v*v},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},r.prototype.convertToPixel=function(e,t,n){var a=Aj(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=Aj(t);return a===this?this.pointToData(n):null},r})();function Aj(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Wye(r,e,t){var n=e.get("center"),a=wr(e,t).refContainer;r.cx=me(n[0],a.width)+a.x,r.cy=me(n[1],a.height)+a.y;var i=r.getRadiusAxis(),o=Math.min(a.width,a.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:ce(s)||(s=[0,s]);var l=[me(s[0],o),me(s[1],o)];i.inverse?i.setExtent(l[1],l[0]):i.setExtent(l[0],l[1])}function Xye(r,e){var t=this,n=t.getAngleAxis(),a=t.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();O(Xx(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),O(Xx(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),pc(n.scale,n.model),pc(a.scale,a.model),n.type==="category"&&!n.onBand){var i=n.getExtent(),o=360/n.scale.count();n.inverse?i[1]+=o:i[1]-=o,n.setExtent(i[0],i[1])}}function qye(r){return r.mainType==="angleAxis"}function Mj(r,e){var t;if(r.type=e.get("type"),r.scale=Yg(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),qye(e)){r.inverse=r.inverse!==e.get("clockwise");var n=e.get("startAngle"),a=(t=e.get("endAngle"))!==null&&t!==void 0?t:n+(r.inverse?-360:360);r.setExtent(n,a)}e.axis=r,r.model=e}var Zye={dimensions:i9,create:function(r,e){var t=[];return r.eachComponent("polar",function(n,a){var i=new Yye(a+"");i.update=Xye;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");Mj(o,l),Mj(s,u),Wye(i,n,e),t.push(i),n.coordinateSystem=i,i.model=n}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var a=n.getReferringComponents("polar",Zt).models[0];n.coordinateSystem=a.coordinateSystem}}),t}},$ye=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function m0(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var n=r.coordToPoint([e[0],t]),a=r.coordToPoint([e[1],t]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function y0(r){var e=r.getRadiusAxis();return e.inverse?0:1}function Dj(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var Kye=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var a=t.axis,i=a.polar,o=i.getRadiusAxis().getExtent(),s=a.getTicksCoords({breakTicks:"none"}),l=a.getMinorTicksCoords(),u=fe(a.getViewLabels(),function(c){c=Me(c);var f=a.scale,d=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=a.dataToCoord(d),c});Dj(u),Dj(s),O($ye,function(c){t.get([c,"show"])&&(!a.scale.isBlank()||c==="axisLine")&&Qye[c](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e})(Cc),Qye={axisLine:function(r,e,t,n,a,i){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=y0(t),f=c?0:1,d,v=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[f]===0?d=new _c[v]({shape:{cx:t.cx,cy:t.cy,r:i[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):d=new Zh({shape:{cx:t.cx,cy:t.cy,r:i[c],r0:i[f]},style:o.getLineStyle(),z2:1,silent:!0}),d.style.fill=null,r.add(d)},axisTick:function(r,e,t,n,a,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[y0(t)],u=fe(n,function(c){return new lr({shape:m0(t,[l,l+s],c.coord)})});r.add(ea(u,{style:Le(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,n,a,i){if(a.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[y0(t)],c=[],f=0;f<a.length;f++)for(var d=0;d<a[f].length;d++)c.push(new lr({shape:m0(t,[u,u+l],a[f][d].coord)}));r.add(ea(c,{style:Le(s.getModel("lineStyle").getLineStyle(),Le(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,e,t,n,a,i,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");O(o,function(f,d){var v=l,g=f.tickValue,x=i[y0(t)],y=t.coordToPoint([x+u,f.coord]),b=t.cx,w=t.cy,T=Math.abs(y[0]-b)/x<.3?"center":y[0]>b?"left":"right",C=Math.abs(y[1]-w)/x<.3?"middle":y[1]>w?"top":"bottom";if(s&&s[g]){var D=s[g];Re(D)&&D.textStyle&&(v=new et(D.textStyle,l,l.ecModel))}var M=new ot({silent:Sn.isLabelSilent(e),style:Nt(v,{x:y[0],y:y[1],fill:v.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:T,verticalAlign:C})});if(r.add(M),is({el:M,componentModel:e,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return M.isTruncated},value:f.rawLabel,tickIndex:d}}),c){var N=Sn.makeAxisEventDataBase(e);N.targetType="axisLabel",N.value=f.rawLabel,Pe(M).eventData=N}},this)},splitLine:function(r,e,t,n,a,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f<n.length;f++){var d=u++%l.length;c[d]=c[d]||[],c[d].push(new lr({shape:m0(t,i,n[f].coord)}))}for(var f=0;f<c.length;f++)r.add(ea(c[f],{style:Le({stroke:l[f%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(r,e,t,n,a,i){if(a.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var c=0;c<a[u].length;c++)l.push(new lr({shape:m0(t,i,a[u][c].coord)}));r.add(ea(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(r,e,t,n,a,i){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=[],f=Math.PI/180,d=-n[0].coord*f,v=Math.min(i[0],i[1]),g=Math.max(i[0],i[1]),x=e.get("clockwise"),y=1,b=n.length;y<=b;y++){var w=y===b?n[0].coord:n[y].coord,T=u++%l.length;c[T]=c[T]||[],c[T].push(new rn({shape:{cx:t.cx,cy:t.cy,r0:v,r:g,startAngle:d,endAngle:-w*f,clockwise:x},silent:!0})),d=-w*f}for(var y=0;y<c.length;y++)r.add(ea(c[y],{style:Le({fill:l[y%l.length]},s.getAreaStyle()),silent:!0}))}}},Jye=["splitLine","splitArea","minorSplitLine"],e0e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n,a){if(this.group.removeAll(),!!t.get("show")){var i=this._axisGroup,o=this._axisGroup=new De;this.group.add(o);var s=t.axis,l=s.polar,u=l.getAngleAxis(),c=s.getTicksCoords(),f=s.getMinorTicksCoords(),d=u.getExtent()[0],v=s.getExtent(),g=r0e(l,t,d),x=new Sn(t,a,g);x.build(),o.add(x.group),Gg(i,o,t),O(Jye,function(y){t.get([y,"show"])&&!s.scale.isBlank()&&t0e[y](this.group,t,l,d,v,c,f)},this)}},e.type="radiusAxis",e})(Cc),t0e={splitLine:function(r,e,t,n,a,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=t.getAngleAxis(),f=Math.PI/180,d=c.getExtent(),v=Math.abs(d[1]-d[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var g=[],x=0;x<i.length;x++){var y=u++%l.length;g[y]=g[y]||[],g[y].push(new _c[v]({shape:{cx:t.cx,cy:t.cy,r:Math.max(i[x].coord,0),startAngle:-d[0]*f,endAngle:-d[1]*f,clockwise:c.inverse}}))}for(var x=0;x<g.length;x++)r.add(ea(g[x],{style:Le({stroke:l[x%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(r,e,t,n,a,i,o){if(o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var f=0;f<o[c].length;f++)u.push(new eo({shape:{cx:t.cx,cy:t.cy,r:o[c][f].coord}}));r.add(ea(u,{style:Le({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,e,t,n,a,i){if(i.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=[],f=i[0].coord,d=1;d<i.length;d++){var v=u++%l.length;c[v]=c[v]||[],c[v].push(new rn({shape:{cx:t.cx,cy:t.cy,r0:f,r:i[d].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),f=i[d].coord}for(var d=0;d<c.length;d++)r.add(ea(c[d],{style:Le({fill:l[d%l.length]},s.getAreaStyle()),silent:!0}))}}};function r0e(r,e,t){return{position:[r.cx,r.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function o9(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function s9(r,e){return e.dim+r.model.componentIndex}function n0e(r,e,t){var n={},a=a0e(dt(e.getSeriesByType(r),function(i){return!e.isSeriesFiltered(i)&&i.coordinateSystem&&i.coordinateSystem.type==="polar"}));e.eachSeriesByType(r,function(i){if(i.coordinateSystem.type==="polar"){var o=i.getData(),s=i.coordinateSystem,l=s.getBaseAxis(),u=s9(s,l),c=o9(i),f=a[u][c],d=f.offset,v=f.width,g=s.getOtherAxis(l),x=i.coordinateSystem.cx,y=i.coordinateSystem.cy,b=i.get("barMinHeight")||0,w=i.get("barMinAngle")||0;n[c]=n[c]||[];for(var T=o.mapDimension(g.dim),C=o.mapDimension(l.dim),D=Jo(o,T),M=l.dim!=="radius"||!i.get("roundCap",!0),N=g.model,R=N.get("startValue"),E=g.dataToCoord(R||0),k=0,I=o.count();k<I;k++){var z=o.get(T,k),P=o.get(C,k),G=z>=0?"p":"n",U=E;D&&(n[c][P]||(n[c][P]={p:E,n:E}),U=n[c][P][G]);var B=void 0,F=void 0,H=void 0,X=void 0;if(g.dim==="radius"){var V=g.dataToCoord(z)-E,W=l.dataToCoord(P);Math.abs(V)<b&&(V=(V<0?-1:1)*b),B=U,F=U+V,H=W-d,X=H-v,D&&(n[c][P][G]=F)}else{var $=g.dataToCoord(z,M)-E,te=l.dataToCoord(P);Math.abs($)<w&&($=($<0?-1:1)*w),B=te+d,F=B+v,H=U,X=U+$,D&&(n[c][P][G]=X)}o.setItemLayout(k,{cx:x,cy:y,r0:B,r:F,startAngle:-H*Math.PI/180,endAngle:-X*Math.PI/180,clockwise:H>=X})}}})}function a0e(r){var e={};O(r,function(n,a){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=s9(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},d=f.stacks;e[l]=f;var v=o9(n);d[v]||f.autoWidthCount++,d[v]=d[v]||{width:0,maxWidth:0};var g=me(n.get("barWidth"),c),x=me(n.get("barMaxWidth"),c),y=n.get("barGap"),b=n.get("barCategoryGap");g&&!d[v].width&&(g=Math.min(f.remainedWidth,g),d[v].width=g,f.remainedWidth-=g),x&&(d[v].maxWidth=x),y!=null&&(f.gap=y),b!=null&&(f.categoryGap=b)});var t={};return O(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=me(n.categoryGap,o),l=me(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),O(i,function(x,y){var b=x.maxWidth;b&&b<f&&(b=Math.min(b,u),x.width&&(b=Math.min(b,x.width)),u-=b,x.width=b,c--)}),f=(u-s)/(c+(c-1)*l),f=Math.max(f,0);var d=0,v;O(i,function(x,y){x.width||(x.width=f),v=x,d+=x.width*(1+l)}),v&&(d-=v.width*l);var g=-d/2;O(i,function(x,y){t[a][y]=t[a][y]||{offset:g,width:x.width},g+=x.width*(1+l)})}),t}var i0e={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},o0e={splitNumber:5},s0e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e})(Rt);function l0e(r){We(Kg),Cc.registerAxisPointerClass("PolarAxisPointer",jye),r.registerCoordinateSystem("polar",Zye),r.registerComponentModel(Gye),r.registerComponentView(s0e),zh(r,"angle",Hye,i0e),zh(r,"radius",Fye,o0e),r.registerComponentView(Kye),r.registerComponentView(e0e),r.registerLayout(He(n0e,"bar"))}function LA(r,e){e=e||{};var t=r.coordinateSystem,n=r.axis,a={},i=n.position,o=n.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=[o==="vertical"?u.vertical[i]:l[0],o==="horizontal"?u.horizontal[i]:l[3]];var c={horizontal:0,vertical:1};a.rotation=Math.PI/2*c[o];var f={top:-1,bottom:1,right:1,left:-1};a.labelDirection=a.tickDirection=a.nameDirection=f[i],r.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Hr(e.labelInside,r.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var d=r.get(["axisLabel","rotate"]);return a.labelRotate=i==="top"?-d:d,a.z2=1,a}var u0e=["splitArea","splitLine","breakArea"],c0e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,n,a,i){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new De;var l=LA(t),u=new Sn(t,a,l);u.build(),o.add(this._axisGroup),o.add(u.group),O(u0e,function(c){t.get([c,"show"])&&f0e[c](this,this.group,this._axisGroup,t,a)},this),Gg(s,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)},e.prototype.remove=function(){C7(this)},e.type="singleAxis",e})(Cc),f0e={splitLine:function(r,e,t,n,a){var i=n.axis;if(!i.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(),f=i.isHorizontal(),d=[],v=0,g=i.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),x=[],y=[],b=0;b<g.length;++b){var w=i.toGlobalCoord(g[b].coord);f?(x[0]=w,x[1]=c.y,y[0]=w,y[1]=c.y+c.height):(x[0]=c.x,x[1]=w,y[0]=c.x+c.width,y[1]=w);var T=new lr({shape:{x1:x[0],y1:x[1],x2:y[0],y2:y[1]},silent:!0});Rh(T.shape,u);var C=v++%l.length;d[C]=d[C]||[],d[C].push(T)}for(var D=s.getLineStyle(["color"]),b=0;b<d.length;++b)e.add(ea(d[b],{style:Le({stroke:l[b%l.length]},D),silent:!0}))}},splitArea:function(r,e,t,n,a){T7(r,t,n,n)},breakArea:function(r,e,t,n,a){var i=$g(),o=n.axis.scale;i&&o.type!=="ordinal"&&i.rectCoordBuildBreakAxis(e,r,n,n.coordinateSystem.getRect(),a)}},rx=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}},jitter:0,jitterOverlap:!0,jitterMargin:2},e})(Qe);Jt(rx,ld.prototype);var h0e=(function(r){K(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,n){return this.coordinateSystem.pointToData(t)[0]},e})(Ba),l9=["single"],d0e=(function(){function r(e,t,n){this.type="single",this.dimension="single",this.dimensions=l9,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var a=this.dimension,i=new h0e(a,Yg(e),[0,0],e.get("type"),e.get("position")),o=i.type==="category";i.onBand=o&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},r.prototype.update=function(e,t){e.eachSeries(function(n){if(n.coordinateSystem===this){var a=n.getData();O(a.mapDimensionsAll(this.dimension),function(i){this._axis.scale.unionExtentFromData(a,i)},this),pc(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){var n=wr(e,t).refContainer;this._rect=Ht(e.getBoxLayoutParams(),n),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),a=n?[0,e.width]:[0,e.height],i=t.inverse?1:0;t.setExtent(a[i],a[1-i]),this._updateAxisTransform(t,n?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var n=e.getExtent(),a=n[0]+n[1],i=e.isHorizontal();e.toGlobalCoord=i?function(o){return o+t}:function(o){return a-o+t},e.toLocalCoord=i?function(o){return o-t}:function(o){return a-o+t}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(e){var t=this.getRect(),n=this.getAxis(),a=n.orient;return a==="horizontal"?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e,t,n){n=n||[];var a=this.getAxis();return n[0]=a.coordToData(a.toLocalCoord(e[a.orient==="horizontal"?0:1])),n},r.prototype.dataToPoint=function(e,t,n){var a=this.getAxis(),i=this.getRect();n=n||[];var o=a.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[o]=a.toGlobalCoord(a.dataToCoord(+e)),n[1-o]=o===0?i.y+i.height/2:i.x+i.width/2,n},r.prototype.convertToPixel=function(e,t,n){var a=Nj(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=Nj(t);return a===this?this.pointToData(n):null},r})();function Nj(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function v0e(r,e){var t=[];return r.eachComponent("singleAxis",function(n,a){var i=new d0e(n,r,e);i.name="single_"+a,i.resize(n,e),n.coordinateSystem=i,t.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var a=n.getReferringComponents("singleAxis",Zt).models[0];n.coordinateSystem=a&&a.coordinateSystem}}),t}var p0e={create:v0e,dimensions:l9},Lj=["x","y"],g0e=["width","height"],m0e=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.coordinateSystem,u=YT(l,1-h1(s)),c=l.dataToPoint(n)[0],f=i.get("type");if(f&&f!=="none"){var d=ON(i),v=y0e[f](s,c,u);v.style=d,t.graphicKey=v.type,t.pointer=v}var g=LA(a);t9(n,t,g,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=LA(n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=PN(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.coordinateSystem,l=h1(o),u=YT(s,l),c=[t.x,t.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=YT(s,1-l),d=(f[1]+f[0])/2,v=[d,d];return v[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},e})(IN),y0e={line:function(r,e,t){var n=zN([e,t[0]],[e,t[1]],h1(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=r.getBandWidth(),a=t[1]-t[0];return{type:"Rect",shape:r9([e-n/2,t[0]],[n,a],h1(r))}}};function h1(r){return r.isHorizontal()?0:1}function YT(r,e){var t=r.getRect();return[t[Lj[e]],t[Lj[e]]+t[g0e[e]]]}var x0e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e})(Rt);function b0e(r){We(Kg),Cc.registerAxisPointerClass("SingleAxisPointer",m0e),r.registerComponentView(x0e),r.registerComponentView(c0e),r.registerComponentModel(rx),zh(r,"single",rx,rx.defaultOption),r.registerCoordinateSystem("single",p0e)}var _0e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,a){var i=Sc(t);r.prototype.init.apply(this,arguments),Rj(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),Rj(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:ee.color.axisLine,width:1,type:"solid"}},itemStyle:{color:ee.color.neutral00,borderWidth:1,borderColor:ee.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:ee.size.s,color:ee.color.secondary},monthLabel:{show:!0,position:"start",margin:ee.size.s,align:"center",formatter:null,color:ee.color.secondary},yearLabel:{show:!0,position:null,margin:ee.size.xl,formatter:null,color:ee.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e})(Qe);function Rj(r,e){var t=r.cellSize,n;ce(t)?n=t:n=r.cellSize=[t,t],n.length===1&&(n[1]=n[0]);var a=fe([0,1],function(i){return Fae(e,i)&&(n[i]="auto"),n[i]!=null&&n[i]!=="auto"});Zi(r,e,{type:"box",ignoreSize:a})}var S0e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,n,a){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=n.start.time;u<=n.end.time;u=i.getNextNDay(u,1).time){var c=i.dataToCalendarLayout([u],!1).tl,f=new qe({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});a.add(f)}},e.prototype._renderLines=function(t,n,a,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,d=0;f.time<=n.end.time;d++){g(f.formatedDate),d===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var v=f.date;v.setMonth(v.getMonth()+1),f=s.getDateInfo(v)}g(s.getNextNDay(n.end.time,1).formatedDate);function g(x){o._firstDayOfMonth.push(s.getDateInfo(x)),o._firstDayPoints.push(s.dataToCalendarLayout([x],!1).tl);var y=o._getLinePointsOfOneWeek(t,x,a);o._tlpoints.push(y[0]),o._blpoints.push(y[y.length-1]),u&&o._drawSplitline(y,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,a),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,a),l,i)},e.prototype._getEdgesPoints=function(t,n,a){var i=[t[0].slice(),t[t.length-1].slice()],o=a==="horizontal"?0:1;return i[0][o]=i[0][o]-n/2,i[1][o]=i[1][o]+n/2,i},e.prototype._drawSplitline=function(t,n,a){var i=new Fr({z2:20,shape:{points:t},style:n});a.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,n,a){for(var i=t.coordinateSystem,o=i.getDateInfo(n),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),c=i.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[a==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,n){return ye(t)&&t?Pae(t,n):Ae(t)?t(n):n.nameMap},e.prototype._yearTextPositionControl=function(t,n,a,i,o){var s=n[0],l=n[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(i==="left"||i==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,n,a,i){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=a!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,d=a==="horizontal"?0:1,v={top:[c,u[d][1]],bottom:[c,u[1-d][1]],left:[u[1-d][0],f],right:[u[d][0],f]},g=n.start.y;+n.end.y>+n.start.y&&(g=g+"-"+n.end.y);var x=o.get("formatter"),y={start:n.start.y,end:n.end.y,nameMap:g},b=this._formatterLabel(x,y),w=new ot({z2:30,style:Nt(o,{text:b}),silent:o.get("silent")});w.attr(this._yearTextPositionControl(w,v[l],a,l,s)),i.add(w)}},e.prototype._monthTextPositionControl=function(t,n,a,i,o){var s="left",l="top",u=t[0],c=t[1];return a==="horizontal"?(c=c+o,n&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),i==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,n,a,i){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||ye(s))&&(s&&(n=CC(s)||n),s=n.get(["time","monthAbbr"])||[]);var d=u==="start"?0:1,v=a==="horizontal"?0:1;l=u==="start"?-l:l;for(var g=c==="center",x=o.get("silent"),y=0;y<f[d].length-1;y++){var b=f[d][y].slice(),w=this._firstDayOfMonth[y];if(g){var T=this._firstDayPoints[y];b[v]=(T[v]+f[0][y+1][v])/2}var C=o.get("formatter"),D=s[+w.m-1],M={yyyy:w.y,yy:(w.y+"").slice(2),MM:w.m,M:+w.m,nameMap:D},N=this._formatterLabel(C,M),R=new ot({z2:30,style:ie(Nt(o,{text:N}),this._monthTextPositionControl(b,g,a,u,l)),silent:x});i.add(R)}}},e.prototype._weekTextPositionControl=function(t,n,a,i,o){var s="center",l="middle",u=t[0],c=t[1],f=a==="start";return n==="horizontal"?(u=u+i+(f?1:-1)*o[0]/2,s=f?"right":"left"):(c=c+i+(f?1:-1)*o[1]/2,l=f?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,n,a,i,o){var s=t.getModel("dayLabel");if(s.get("show")){var l=t.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),f=s.get("margin"),d=l.getFirstDayOfWeek();if(!c||ye(c)){c&&(n=CC(c)||n);var v=n.get(["time","dayOfWeekShort"]);c=v||fe(n.get(["time","dayOfWeekAbbr"]),function(M){return M[0]})}var g=l.getNextNDay(a.end.time,7-a.lweek).time,x=[l.getCellWidth(),l.getCellHeight()];f=me(f,Math.min(x[1],x[0])),u==="start"&&(g=l.getNextNDay(a.start.time,-(7+a.fweek)).time,f=-f);for(var y=s.get("silent"),b=0;b<7;b++){var w=l.getNextNDay(g,b),T=l.dataToCalendarLayout([w.time],!1).center,C=b;C=Math.abs((b+d)%7);var D=new ot({z2:30,style:ie(Nt(s,{text:c[C]}),this._weekTextPositionControl(T,i,u,f,x)),silent:y});o.add(D)}}},e.type="calendar",e})(Rt),WT=864e5,w0e=(function(){function r(e,t,n){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=e,this._update(t,n)}return r.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},r.prototype.getRangeInfo=function(){return this._rangeInfo},r.prototype.getModel=function(){return this._model},r.prototype.getRect=function(){return this._rect},r.prototype.getCellWidth=function(){return this._sw},r.prototype.getCellHeight=function(){return this._sh},r.prototype.getOrient=function(){return this._orient},r.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},r.prototype.getDateInfo=function(e){e=Ji(e);var t=e.getFullYear(),n=e.getMonth()+1,a=n<10?"0"+n:""+n,i=e.getDate(),o=i<10?"0"+i:""+i,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:a,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+a+"-"+o,date:e}},r.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},r.prototype._update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,a=["width","height"],i=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[n,7]:[7,n];O([0,1],function(f){c(i,f)&&(o[a[f]]=i[f]*s[f])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=Ht(o,l);O([0,1],function(f){c(i,f)||(i[f]=u[a[f]]/s[f])});function c(f,d){return f[d]!=null&&f[d]!=="auto"}this._sw=i[0],this._sh=i[1]},r.prototype.dataToPoint=function(e,t,n){n=n||[],ce(e)&&(e=e[0]),t==null&&(t=!0);var a=this.getDateInfo(e),i=this._rangeInfo,o=a.formatedDate;if(t&&!(a.time>=i.start.time&&a.time<i.end.time+WT))return n[0]=n[1]=NaN,n;var s=a.day,l=this._getRangeInfo([i.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},r.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},r.prototype.dataToLayout=function(e,t,n){n=n||{};var a=n.rect=n.rect||{},i=n.contentRect=n.contentRect||{},o=this.dataToPoint(e,t);return a.x=o[0]-this._sw/2,a.y=o[1]-this._sh/2,a.width=this._sw,a.height=this._sh,Ie.copy(i,a),hc(i,this._lineWidth/2,!0,!0),n},r.prototype.dataToCalendarLayout=function(e,t){var n=this.dataToPoint(e,t);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]}},r.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,a=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(n,t-1,a):this._getDateByWeeksAndDay(t,n-1,a)},r.prototype.convertToPixel=function(e,t,n){var a=XT(t);return a===this?a.dataToPoint(n):null},r.prototype.convertToLayout=function(e,t,n){var a=XT(t);return a===this?a.dataToLayout(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=XT(t);return a===this?a.pointToData(n):null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(ce(e)&&e.length===1&&(e=e[0]),ce(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var a=this.getDateInfo(n),i=a.date;i.setMonth(i.getMonth()+1);var o=this.getNextNDay(i,-1);t=[a.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var a=Math.floor(t[1].time/WT)-Math.floor(t[0].time/WT)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+a-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)a-=u,i.setDate(l-u);var c=Math.floor((a+t[0].day+6)/7),f=n?-c+1:c-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:a,weeks:c,nthWeek:f,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,n){var a=this._getRangeInfo(n);if(e>a.weeks||e===0&&t<a.fweek||e===a.weeks&&t>a.lweek)return null;var i=(e-1)*7-a.fweek+t,o=new Date(a.start.time);return o.setDate(+a.start.d+i),this.getDateInfo(o)},r.create=function(e,t){var n=[];return e.eachComponent("calendar",function(a){var i=new r(a,e,t);n.push(i),a.coordinateSystem=i}),e.eachComponent(function(a,i){Fg({targetModel:i,coordSysType:"calendar",coordSysProvider:MH})}),n},r.dimensions=["time","value"],r})();function XT(r){var e=r.calendarModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}function T0e(r){r.registerComponentModel(_0e),r.registerComponentView(S0e),r.registerCoordinateSystem("calendar",w0e)}var ko={level:1,leaf:2,nonLeaf:3},Yo={none:0,all:1,body:2,corner:3};function RA(r,e,t){var n=e[Ve[t]].getCell(r);return!n&&st(r)&&r<0&&(n=e[Ve[1-t]].getUnitLayoutInfo(t,Math.round(r))),n}function u9(r){var e=r||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function c9(r,e,t,n,a){Ej(r[0],e,a,t,n,0),Ej(r[1],e,a,t,n,1)}function Ej(r,e,t,n,a,i){r[0]=1/0,r[1]=-1/0;var o=n[i],s=ce(o)?o:[o],l=s.length,u=!!t;if(l>=1?(kj(r,e,s,u,a,i,0),l>1&&kj(r,e,s,u,a,i,l-1)):r[0]=r[1]=NaN,u){var c=-a[Ve[1-i]].getLocatorCount(i),f=a[Ve[i]].getLocatorCount(i)-1;t===Yo.body?c=or(0,c):t===Yo.corner&&(f=oa(-1,f)),f<c&&(c=f=NaN),Jr(r[0])&&(r[0]=c),Jr(r[1])&&(r[1]=f),r[0]=or(oa(r[0],f),c),r[1]=or(oa(r[1],f),c)}}function kj(r,e,t,n,a,i,o){var s=RA(t[o],a,i);if(!s){r[0]=r[1]=NaN;return}var l=s.id[Ve[i]],u=l,c=D0e(s);c&&(u+=c.span[Ve[i]]-1),r[0]=oa(r[0],l,u),r[1]=or(r[1],l,u)}function x0(r,e){return Jr(r[e][0])||Jr(r[e][1])}function Ij(r,e,t,n){e=e||C0e;for(var a=0;a<n;a++)e[a]=!1;for(;;){for(var i=!1,a=0;a<n;a++){var o=t[a];!e[a]&&o.cellMergeOwner&&A0e(r,o.locatorRange)&&(e[a]=!0,i=!0)}if(!i)break}}var C0e=[];function A0e(r,e){return!Oj(r[0],e[0])||!Oj(r[1],e[1])?!1:(r[0][0]=oa(r[0][0],e[0][0]),r[0][1]=or(r[0][1],e[0][1]),r[1][0]=oa(r[1][0],e[1][0]),r[1][1]=or(r[1][1],e[1][1]),!0)}function Oj(r,e){return r[1]>=e[0]&&r[0]<=e[1]}function Pj(r,e){r.id.set(e[0][0],e[1][0]),r.span.set(e[0][1]-r.id.x+1,e[1][1]-r.id.y+1)}function M0e(r,e){r[0][0]=e[0][0],r[0][1]=e[0][1],r[1][0]=e[1][0],r[1][1]=e[1][1]}function zj(r,e,t,n){var a=RA(e[n][0],t,n),i=RA(e[n][1],t,n);r[Ve[n]]=r[vr[n]]=NaN,a&&i&&(r[Ve[n]]=a.xy,r[vr[n]]=i.xy+i.wh-a.xy)}function Fv(r,e,t,n){return r[Ve[e]]=t,r[Ve[1-e]]=n,r}function D0e(r){return r&&(r.type===ko.leaf||r.type===ko.nonLeaf)?r:null}function d1(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var jj=(function(){function r(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=t,this._uniqueValueGen=N0e(e);var n=t.get("data",!0);n!=null&&!ce(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return r.prototype._initByDimModelData=function(e){var t=this,n=t._cells,a=t._levels,i=[],o=0;t._leavesCount=s(e,0,0),l();return;function s(u,c,f){var d=0;return u&&O(u,function(v,g){var x;ye(v)?x={value:v}:Re(v)?(x=v,v.value!=null&&!ye(v.value)&&(x={value:null})):x={value:null};var y={type:ko.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:c,id:new ke,span:Fv(new ke,t.dimIdx,1,1),option:x,xy:NaN,wh:NaN,dim:t,rect:d1()};o++,(i[c]||(i[c]=[])).push(y),a[f]||(a[f]={type:ko.level,xy:NaN,wh:NaN,option:null,id:new ke,dim:t});var b=s(x.children,c,f+1),w=Math.max(1,b);y.span[Ve[t.dimIdx]]=w,d+=w,c+=w}),d}function l(){for(var u=[];n.length<o;)for(var c=0;c<i.length;c++){var f=i[c].pop();if(f){f.ordinal=u.length;var d=f.option.value;u.push(d),n.push(f),t._uniqueValueGen.calcDupBase(d)}}t._uniqueValueGen.ensureValueUnique(u,n);var v=t._ordinalMeta=new og({categories:u,needCollect:!1,deduplication:!1});t._scale=new Ih({ordinalMeta:v});for(var g=0;g<t._leavesCount;g++){var x=t._cells[g];x.type=ko.leaf,x.span[Ve[1-t.dimIdx]]=t._levels.length-x.level}t._initCellsId(),t._initLevelIdOptions()}},r.prototype._initBySeriesData=function(){var e=this;e._leavesCount=0,e._levels=[{type:ko.level,xy:NaN,wh:NaN,option:null,id:new ke,dim:e}],e._initLevelIdOptions();var t=e._ordinalMeta=new og({needCollect:!0,deduplication:!0,onCollect:function(n,a){var i=e._cells[a]={type:ko.leaf,ordinal:a,level:0,firstLeafLocator:a,id:new ke,span:Fv(new ke,e.dimIdx,1,1),option:{value:n+""},xy:NaN,wh:NaN,dim:e,rect:d1()};e._leavesCount++,e._setCellId(i)}});e._scale=new Ih({ordinalMeta:t})},r.prototype._setCellId=function(e){var t=this._levels.length,n=this.dimIdx;Fv(e.id,n,e.firstLeafLocator,e.level-t)},r.prototype._initCellsId=function(){var e=this._levels.length,t=this.dimIdx;O(this._cells,function(n){Fv(n.id,t,n.firstLeafLocator,n.level-e)})},r.prototype._initLevelIdOptions=function(){var e=this._levels.length,t=this.dimIdx,n=this._model.get("levels",!0);n=ce(n)?n:[],O(this._levels,function(a,i){Fv(a.id,t,0,i-e),a.option=n[i]})},r.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},r.prototype.resetLayoutIterator=function(e,t,n,a){if(e=e||new fl,t===this.dimIdx){var i=this._leavesCount,o=n!=null?Math.max(0,n):0;a=a!=null?Math.min(a,i):i,e.reset(this._cells,o,o+a)}else{var i=this._levels.length,o=n!=null?Math.max(0,n+i):0;a=a!=null?Math.min(a,i):i,e.reset(this._levels,o,o+a)}return e},r.prototype.resetCellIterator=function(e){return(e||new fl).reset(this._cells,0)},r.prototype.resetLevelIterator=function(e){return(e||new fl).reset(this._levels,0)},r.prototype.getLayout=function(e,t,n){var a=this.getUnitLayoutInfo(t,n);e[Ve[t]]=a?a.xy:NaN,e[vr[t]]=a?a.wh:NaN},r.prototype.getUnitLayoutInfo=function(e,t){return e===this.dimIdx?t<this._leavesCount?this._cells[t]:void 0:this._levels[t+this._levels.length]},r.prototype.getCell=function(e){var t=this._scale.parse(e);return Jr(t)?void 0:this._cells[t]},r.prototype.getLocatorCount=function(e){return e===this.dimIdx?this._leavesCount:this._levels.length},r.prototype.getOrdinalMeta=function(){return this._ordinalMeta},r})();function N0e(r){var e=r.toUpperCase(),t=new RegExp("^"+e+"([0-9]+)$"),n=0;function a(s){var l;s!=null&&(l=s.match(t))&&(n=or(n,+l[1]+1))}function i(){return""+e+n++}function o(s,l){for(var u=Te(),c=0;c<s.length;c++){var f=s[c];(f==null||u.get(f)!=null)&&(s[c]=f=i(),l[c].option=Le({value:f},l[c].option)),u.set(f,!0)}}return{calcDupBase:a,ensureValueUnique:o}}var Bj=(function(){function r(e,t,n){this._model=t,this._dims=n,this._kind=e,this._cellMergeOwnerList=[]}return r.prototype._ensureCellMap=function(){var e=this,t=e._cellMap;return t||(t=e._cellMap=Te(),n()),t;function n(){var i=[],o=e._model.getShallow("data");o&&!ce(o)&&(o=null),O(o,function(g,x){if(!(!Re(g)||!ce(g.coord))){var y=u9([]),b=null;if(c9(y,b,g.coord,e._dims,g.coordClamp?Yo[e._kind]:Yo.none),!(x0(y,0)||x0(y,1))){var w=g&&g.mergeCells,T={id:new ke,span:new ke,locatorRange:y,option:g,cellMergeOwner:w};Pj(T,y),i.push(T)}}});for(var s=[],l=0;l<i.length;l++){var u=i[l];if(u.cellMergeOwner){var c=u.locatorRange;Ij(c,s,i,l);for(var f=0;f<l;f++)s[f]&&(i[f].cellMergeOwner=!1);if(c[0][0]!==u.id.x||c[1][0]!==u.id.y){u.cellMergeOwner=!1;var d=ie({},u.option);d.coord=null;var v={id:new ke,span:new ke,locatorRange:c,option:d,cellMergeOwner:!0};Pj(v,c),i.push(v)}}}O(i,function(g){var x=a(g.id.x,g.id.y);if(g.cellMergeOwner&&(x.cellMergeOwner=!0,x.span=g.span,x.locatorRange=g.locatorRange,x.spanRect=d1(),e._cellMergeOwnerList.push(x)),!(!g.cellMergeOwner&&!g.option))for(var y=0;y<g.span.y;y++)for(var b=0;b<g.span.x;b++){var w=a(g.id.x+b,g.id.y+y);w.option=g.option,g.cellMergeOwner&&(w.inSpanOf=x)}})}function a(i,o){var s=Vj(i,o),l=t.get(s);return l||(l=t.set(s,{id:new ke(i,o),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),l}},r.prototype.getCell=function(e){return this._ensureCellMap().get(Vj(e[0],e[1]))},r.prototype.travelExistingCells=function(e){this._ensureCellMap().each(e)},r.prototype.expandRangeByCellMerge=function(e){if(!x0(e,0)&&!x0(e,1)&&e[0][0]===e[0][1]&&e[1][0]===e[1][1]){qT[0]=e[0][0],qT[1]=e[1][0];var t=this.getCell(qT),n=t&&t.inSpanOf;if(n){M0e(e,n.locatorRange);return}}var a=this._cellMergeOwnerList;Ij(e,null,a,a.length)},r})(),qT=[];function Vj(r,e){return r+"|"+e}var GN={show:!0,color:ee.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function HN(r){return{color:"none",borderWidth:1,borderColor:r?"none":ee.color.borderTint}}var Gj={show:!0,label:GN,itemStyle:HN(!1),silent:void 0,dividerLineStyle:{width:1,color:ee.color.border}},L0e={label:GN,itemStyle:HN(!1),silent:void 0},R0e={label:GN,itemStyle:HN(!0),silent:void 0},E0e={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:Gj,y:Gj,body:L0e,corner:R0e,backgroundStyle:{color:"none",borderColor:ee.color.axisLine,borderWidth:1}},k0e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this._dimModels={x:new Hj(this.get("x",!0)||{}),y:new Hj(this.get("y",!0)||{})};t.x.option.type=t.y.option.type="category";var n=t.x.dim=new jj("x",t.x),a=t.y.dim=new jj("y",t.y),i={x:n,y:a};this._body=new Bj("body",new et(this.getShallow("body")),i),this._corner=new Bj("corner",new et(this.getShallow("corner")),i)},e.prototype.getDimensionModel=function(t){return this._dimModels[t]},e.prototype.getBody=function(){return this._body},e.prototype.getCorner=function(){return this._corner},e.type="matrix",e.layoutMode="box",e.defaultOption=E0e,e})(Qe),Hj=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},e})(et),b0=Math.round,I0e=0,O0e=99,P0e={normal:25,special:100},z0e={normal:50,special:125},j0e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n){this.group.removeAll();var a=this.group,i=t.coordinateSystem,o=i.getRect(),s=t.getDimensionModel("x"),l=t.getDimensionModel("y"),u=s.dim,c=l.dim;B0e(a,t,n),V0e(a,t,u,c,n);var f=t.getShallow("borderZ2",!0),d=Ce(f,O0e),v=d-1,g=t.getModel("backgroundStyle").getItemStyle(["borderWidth"]);g.lineWidth=0;var x=t.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);x.fill="none";var y=EA(o.clone(),g,I0e),b=EA(o.clone(),x,d);y.silent=!0,b.silent=!0,a.add(y),a.add(b);var w=u.getUnitLayoutInfo(0,0),T=c.getUnitLayoutInfo(1,0);w&&T&&(u.shouldShow()&&a.add(Fj({x1:o.x,y1:T.xy,x2:o.x+o.width,y2:T.xy},s.getModel("dividerLineStyle").getLineStyle(),v)),c.shouldShow()&&a.add(Fj({x1:w.xy,y1:o.y,x2:w.xy,y2:o.y+o.height},l.getModel("dividerLineStyle").getLineStyle(),v)))},e.type="matrix",e})(Rt);function B0e(r,e,t){n(0),n(1);function n(a){var i=e.getDimensionModel(Ve[a]),o=i.dim;if(o.shouldShow())for(var s=i.getModel("itemStyle"),l=i.getModel("label"),u=e.getShallow("tooltip",!0),c=[],f=o.resetCellIterator();f.next();){var d=f.item,v={};Ie.copy(v,d.rect),z1(c,d.id.x,d.id.y),f9(c,e,r,t,d.option,s,l,i,v,d.option.value,z0e,u)}}}function V0e(r,e,t,n,a){i("body",e.getBody(),t,n),t.shouldShow()&&n.shouldShow()&&i("corner",e.getCorner(),n,t);function i(o,s,l,u){var c=new et(e.getShallow(o,!0)),f=c.getModel("itemStyle"),d=c.getModel("label"),v=new fl,g=new fl,x=[],y=e.getShallow("tooltip",!0);for(u.resetLayoutIterator(g,1);g.next();)for(l.resetLayoutIterator(v,0);v.next();){var b=v.item,w=g.item;z1(x,b.id.x,w.id.y);var T=s.getCell(x);if(!(T&&T.inSpanOf&&T.inSpanOf!==T)){var C={};T&&T.span?Ie.copy(C,T.spanRect):(b.dim.getLayout(C,0,x[0]),w.dim.getLayout(C,1,x[1]));var D=T?T.option:null;f9(x,e,r,a,D,f,d,c,C,D?D.value:null,P0e,y)}}}}function f9(r,e,t,n,a,i,o,s,l,u,c,f){var d;_0.option=a?a.itemStyle:null,_0.parentModel=i,Pf.option=a,Pf.parentModel=s;var v=Ce(Pf.getShallow("z2"),a&&a.itemStyle?c.special:c.normal),g=f&&f.show,x=EA(l,_0.getItemStyle(),v);t.add(x);var y=Pf.get("cursor");y!=null&&x.attr("cursor",y);var b;if(u!=null){var w=u+"";if(zf.option=a?a.label:null,zf.parentModel=o,zf.ecModel=n,Lr(x,{normal:zf},{defaultText:w,autoOverflowArea:!0,layoutRect:Me(x.shape)}),b=x.getTextContent(),b){b.z2=v+1;var T=b.style;if(T&&T.overflow&&T.overflow!=="none"&&T.lineOverflow){var C={};Ie.copy(C,l),hc(C,(((d=x.style)===null||d===void 0?void 0:d.lineWidth)||0)/2,!0,!0),x.updateInnerText(),b.getLocalTransform(S0),Ia(S0,S0),Ie.applyTransform(C,C,S0),b.setClipPath(new qe({shape:C}))}}is({el:x,componentModel:e,itemName:w,itemTooltipOption:f,formatterParamsExtra:{xyLocator:r.slice()}})}if(b){var D=zf.get("silent");D==null&&(D=!g),b.silent=D,b.ignoreHostSilent=!0}var M=Pf.get("silent");M==null&&(M=!x.style||x.style.fill==="none"||!x.style.fill),x.silent=M,sw(Pf),sw(_0),sw(zf)}var Pf=new et,_0=new et,zf=new et,S0=[];function EA(r,e,t){var n=e.lineWidth;if(n){var a=r.x+r.width,i=r.y+r.height;r.x=aa(r.x,n,!0),r.y=aa(r.y,n,!0),r.width=aa(a,n,!0)-r.x,r.height=aa(i,n,!0)-r.y}return new qe({shape:r,style:e,z2:t})}function Fj(r,e,t){var n=e.lineWidth;return n&&(b0(r.x1*2)===b0(r.x2*2)&&(r.x1=r.x2=aa(r.x1,n,!0)),b0(r.y1*2)===b0(r.y2*2)&&(r.y1=r.y2=aa(r.y1,n,!0))),new lr({shape:r,style:e,silent:!0,z2:t})}var G0e=(function(){function r(e,t,n){this.dimensions=r.dimensions,this.type="matrix",this._model=e;var a=this._dimModels={x:e.getDimensionModel("x"),y:e.getDimensionModel("y")};this._dims={x:a.x.dim,y:a.y.dim},this._resize(e,n)}return r.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},r.create=function(e,t){var n=[];return e.eachComponent("matrix",function(a){var i=new r(a,e,t);n.push(i),a.coordinateSystem=i}),e.eachComponent(function(a,i){Fg({targetModel:i,coordSysType:"matrix",coordSysProvider:MH})}),n},r.prototype.getRect=function(){return this._rect},r.prototype._resize=function(e,t){var n=this._dims,a=this._dimModels,i=this._rect=Ht(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});Uj(a,n,i,0),Uj(a,n,i,1),Yj(0,n),Yj(1,n),Wj(this._model.getBody(),n),Wj(this._model.getCorner(),n)},r.prototype.dataToPoint=function(e,t,n){return n=n||[],this.dataToLayout(e,t,Uv),n[0]=Uv.rect.x+Uv.rect.width/2,n[1]=Uv.rect.y+Uv.rect.height/2,n},r.prototype.dataToLayout=function(e,t,n){var a=this._dims;n=n||{};var i=n.rect=n.rect||{};i.x=i.y=i.width=i.height=NaN;var o=n.matrixXYLocatorRange=u9(n.matrixXYLocatorRange);return ce(e)&&(c9(o,null,e,a,Ce(t&&t.clamp,Yo.none)),(!t||!t.ignoreMergeCells)&&((!t||t.clamp!==Yo.corner)&&this._model.getBody().expandRangeByCellMerge(o),(!t||t.clamp!==Yo.body)&&this._model.getCorner().expandRangeByCellMerge(o)),zj(i,o,a,0),zj(i,o,a,1)),n},r.prototype.pointToData=function(e,t,n){var a=this._dims;return Xj(bi,0,a,e,t&&t.clamp),Xj(bi,1,a,e,t&&t.clamp),n=n||[],n[0]=n[1]=NaN,bi.y===$r.inCorner&&bi.x===$r.inBody?qj(bi,n,0,a):bi.x===$r.inCorner&&bi.y===$r.inBody?qj(bi,n,1,a):(Zj(bi,n,0,a),Zj(bi,n,1,a)),n},r.prototype.convertToPixel=function(e,t,n,a){var i=$T(t);return i===this?i.dataToPoint(n,a):void 0},r.prototype.convertToLayout=function(e,t,n,a){var i=$T(t);return i===this?i.dataToLayout(n,a):void 0},r.prototype.convertFromPixel=function(e,t,n,a){var i=$T(t);return i===this?i.pointToData(n,a):void 0},r.prototype.containPoint=function(e){return this._rect.contain(e[0],e[1])},r.dimensions=["x","y","value"],r})(),Uv={rect:d1()},w0=new fl,ZT=new fl;function Uj(r,e,t,n){for(var a=1-n,i=e[Ve[n]],o=e[Ve[a]],s=o.shouldShow(),l=i.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=t[vr[n]],f=i.getLocatorCount(n)+o.getLocatorCount(n),d=new et,v=o.resetLevelIterator();v.next();)d.option=v.item.option,d.parentModel=r[Ve[a]],y(v.item,s?d.get("levelSize"):0);for(var g=new et,x=i.resetCellIterator();x.next();)x.item.type===ko.leaf&&(g.option=x.item.option,g.parentModel=void 0,y(x.item,g.get("size")));function y(N,R){var E=H0e(R,n,t);Jr(E)||(N.wh=kA(E,c),c=kA(c-N.wh),f--)}var b=f?c/f:0,w=!f&&c>=1,T=t[Ve[n]],C=i.getLocatorCount(n)-1,D=new fl;for(o.resetLayoutIterator(D,n);D.next();)M(D.item);for(i.resetLayoutIterator(D,n);D.next();)M(D.item);function M(N){Jr(N.wh)&&(N.wh=b),N.xy=T,N.id[Ve[n]]===C&&!w&&(N.wh=t[Ve[n]]+t[vr[n]]-N.xy),T+=N.wh}}function Yj(r,e){for(var t=e[Ve[r]].resetCellIterator();t.next();){var n=t.item;v1(n.rect,r,n.id,n.span,e),v1(n.rect,1-r,n.id,n.span,e),n.type===ko.nonLeaf&&(n.xy=n.rect[Ve[r]],n.wh=n.rect[vr[r]])}}function Wj(r,e){r.travelExistingCells(function(t){var n=t.span;if(n){var a=t.spanRect,i=t.id;v1(a,0,i,n,e),v1(a,1,i,n,e)}})}function v1(r,e,t,n,a){r[vr[e]]=0;var i=t[Ve[e]],o=i<0?a[Ve[1-e]]:a[Ve[e]],s=o.getUnitLayoutInfo(e,t[Ve[e]]);if(r[Ve[e]]=s.xy,r[vr[e]]=s.wh,n[Ve[e]]>1){var l=o.getUnitLayoutInfo(e,t[Ve[e]]+n[Ve[e]]-1);r[vr[e]]=l.xy+l.wh-s.xy}}function H0e(r,e,t){var n=Mx(r,t[vr[e]]);return kA(n,t[vr[e]])}function kA(r,e){return Math.max(Math.min(r,Ce(e,1/0)),0)}function $T(r){var e=r.matrixModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}var $r={inBody:1,inCorner:2,outside:3},bi={x:null,y:null,point:[]};function Xj(r,e,t,n,a){var i=t[Ve[e]],o=t[Ve[1-e]],s=i.getUnitLayoutInfo(e,i.getLocatorCount(e)-1),l=i.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),c=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,f=r.point[e]=n[e];if(!l&&!c){r[Ve[e]]=$r.outside;return}if(a===Yo.body){l?(r[Ve[e]]=$r.inBody,f=oa(s.xy+s.wh,or(l.xy,f)),r.point[e]=f):r[Ve[e]]=$r.outside;return}else if(a===Yo.corner){c?(r[Ve[e]]=$r.inCorner,f=oa(c.xy+c.wh,or(u.xy,f)),r.point[e]=f):r[Ve[e]]=$r.outside;return}var d=l?l.xy:c?c.xy+c.wh:NaN,v=u?u.xy:d,g=s?s.xy+s.wh:d;if(f<v){if(!a){r[Ve[e]]=$r.outside;return}f=v}else if(f>g){if(!a){r[Ve[e]]=$r.outside;return}f=g}r.point[e]=f,r[Ve[e]]=d<=f&&f<=g?$r.inBody:v<=f&&f<=d?$r.inCorner:$r.outside}function qj(r,e,t,n){var a=1-t;if(r[Ve[t]]!==$r.outside)for(n[Ve[t]].resetCellIterator(ZT);ZT.next();){var i=ZT.item;if($j(r.point[t],i.rect,t)&&$j(r.point[a],i.rect,a)){e[t]=i.ordinal,e[a]=i.id[Ve[a]];return}}}function Zj(r,e,t,n){if(r[Ve[t]]!==$r.outside){var a=r[Ve[t]]===$r.inCorner?n[Ve[1-t]]:n[Ve[t]];for(a.resetLayoutIterator(w0,t);w0.next();)if(F0e(r.point[t],w0.item)){e[t]=w0.item.id[Ve[t]];return}}}function F0e(r,e){return e.xy<=r&&r<=e.xy+e.wh}function $j(r,e,t){return e[Ve[t]]<=r&&r<=e[Ve[t]]+e[vr[t]]}function U0e(r){r.registerComponentModel(k0e),r.registerComponentView(j0e),r.registerCoordinateSystem("matrix",G0e)}function Y0e(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function Kj(r,e){var t;return O(e,function(n){r[n]!=null&&r[n]!=="auto"&&(t=!0)}),t}function W0e(r,e,t){var n=ie({},t),a=r[e],i=t.$action||"merge";i==="merge"?a?(Ye(a,n,!0),Zi(a,n,{ignoreSize:!0}),EH(t,a),T0(t,a),T0(t,a,"shape"),T0(t,a,"style"),T0(t,a,"extra"),t.clipPath=a.clipPath):r[e]=n:i==="replace"?r[e]=n:i==="remove"&&a&&(r[e]=null)}var h9=["transition","enterFrom","leaveTo"],X0e=h9.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function T0(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var n=t?h9:X0e,a=0;a<n.length;a++){var i=n[a];r[i]==null&&e[i]!=null&&(r[i]=e[i])}}function q0e(r,e){if(r&&(r.hv=e.hv=[Kj(e,["left","right"]),Kj(e,["top","bottom"])],r.type==="group")){var t=r,n=e;t.width==null&&(t.width=n.width=0),t.height==null&&(t.height=n.height=0)}}var Z0e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,n){var a=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,t,n),this.option.elements=a},e.prototype.optionUpdated=function(t,n){var a=this.option,i=(n?a:t).elements,o=a.elements=n?[]:a.elements,s=[];this._flatten(i,s,null);var l=S6(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];O(l,function(c,f){var d=c.newOption;d&&(u.push(d),Y0e(c,d),W0e(o,f,d),q0e(o[f],d))},this),a.elements=dt(o,function(c){return c&&delete c.$action,c!=null})},e.prototype._flatten=function(t,n,a){O(t,function(i){if(i){a&&(i.parentOption=a),n.push(i);var o=i.children;o&&o.length&&this._flatten(o,n,i),delete i.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e})(Qe),Qj={path:null,compoundPath:null,group:De,image:kr,text:ot},Aa=Je(),$0e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=Te()},e.prototype.render=function(t,n,a){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,a)},e.prototype._updateElements=function(t){var n=t.useElOptionsToUpdate();if(n){var a=this._elMap,i=this.group,o=t.get("z"),s=t.get("zlevel");O(n,function(l){var u=xr(l.id,null),c=u!=null?a.get(u):null,f=xr(l.parentId,null),d=f!=null?a.get(f):i,v=l.type,g=l.style;v==="text"&&g&&l.hv&&l.hv[1]&&(g.textVerticalAlign=g.textBaseline=g.verticalAlign=g.align=null);var x=l.textContent,y=l.textConfig;if(g&&FU(g,v,!!y,!!x)){var b=UU(g,v,!0);!y&&b.textConfig&&(y=l.textConfig=b.textConfig),!x&&b.textContent&&(x=b.textContent)}var w=K0e(l),T=l.$action||"merge",C=T==="merge",D=T==="replace";if(C){var M=!c,N=c;M?N=Jj(u,d,l.type,a):(N&&(Aa(N).isNew=!1),qU(N)),N&&(ex(N,w,t,{isInit:M}),eB(N,l,o,s))}else if(D){nx(c,l,a,t);var R=Jj(u,d,l.type,a);R&&(ex(R,w,t,{isInit:!0}),eB(R,l,o,s))}else T==="remove"&&(WU(c,l),nx(c,l,a,t));var E=a.get(u);if(E&&x)if(C){var k=E.getTextContent();k?k.attr(x):E.setTextContent(new ot(x))}else D&&E.setTextContent(new ot(x));if(E){var I=l.clipPath;if(I){var z=I.type,P=void 0,M=!1;if(C){var G=E.getClipPath();M=!G||Aa(G).type!==z,P=M?IA(z):G}else D&&(M=!0,P=IA(z));E.setClipPath(P),ex(P,I,t,{isInit:M}),c1(P,I.keyframeAnimation,t)}var U=Aa(E);E.setTextConfig(y),U.option=l,Q0e(E,t,l),is({el:E,componentModel:t,itemName:E.name,itemTooltipOption:l.tooltip}),c1(E,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,n){for(var a=t.option.elements,i=this.group,o=this._elMap,s=n.getWidth(),l=n.getHeight(),u=["x","y"],c=0;c<a.length;c++){var f=a[c],d=xr(f.id,null),v=d!=null?o.get(d):null;if(!(!v||!v.isGroup)){var g=v.parent,x=g===i,y=Aa(v),b=Aa(g);y.width=me(y.option.width,x?s:b.width)||0,y.height=me(y.option.height,x?l:b.height)||0}}for(var c=a.length-1;c>=0;c--){var f=a[c],d=xr(f.id,null),v=d!=null?o.get(d):null;if(v){var g=v.parent,b=Aa(g),w=g===i?{width:s,height:l}:{width:b.width,height:b.height},T={},C=eb(v,f,w,null,{hv:f.hv,boundingMode:f.bounding},T);if(!Aa(v).isNew&&C){for(var D=f.transition,M={},N=0;N<u.length;N++){var R=u[N],E=T[R];D&&(ac(D)||Fe(D,R)>=0)?M[R]=E:v[R]=E}lt(v,M,t,0)}else v.attr(T)}}},e.prototype._clear=function(){var t=this,n=this._elMap;n.each(function(a){nx(a,Aa(a).option,n,t._lastGraphicModel)}),this._elMap=Te()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e})(Rt);function IA(r){var e=_e(Qj,r)?Qj[r]:Qp(r),t=new e({});return Aa(t).type=r,t}function Jj(r,e,t,n){var a=IA(t);return e.add(a),n.set(r,a),Aa(a).id=r,Aa(a).isNew=!0,a}function nx(r,e,t,n){var a=r&&r.parent;a&&(r.type==="group"&&r.traverse(function(i){nx(i,e,t,n)}),gb(r,e,n),t.removeKey(Aa(r).id))}function eB(r,e,t,n){r.isGroup||O([["cursor",Oa.prototype.cursor],["zlevel",n||0],["z",t||0],["z2",0]],function(a){var i=a[0];_e(e,i)?r[i]=Ce(e[i],a[1]):r[i]==null&&(r[i]=a[1])}),O(it(e),function(a){if(a.indexOf("on")===0){var i=e[a];r[a]=Ae(i)?i:null}}),_e(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function K0e(r){return r=ie({},r),O(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(DH),function(e){delete r[e]}),r}function Q0e(r,e,t){var n=Pe(r).eventData;!r.silent&&!r.ignore&&!n&&(n=Pe(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),n&&(n.info=t.info)}function J0e(r){r.registerComponentModel(Z0e),r.registerComponentView($0e),r.registerPreprocessor(function(e){var t=e.graphic;ce(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var tB=["x","y","radius","angle","single"],exe=["cartesian2d","polar","singleAxis"];function txe(r){var e=r.get("coordinateSystem");return Fe(exe,e)>=0}function ol(r){return r+"Axis"}function rxe(r,e){var t=Te(),n=[],a=Te();r.eachComponent({mainType:"dataZoom",query:e},function(c){a.get(c.uid)||s(c)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(c){!a.get(c.uid)&&l(c)&&(s(c),i=!0)}function s(c){a.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(d,v){var g=t.get(d);g&&g[v]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,d){(t.get(f)||t.set(f,[]))[d]=!0})}return n}function d9(r){var e=r.ecModel,t={infoList:[],infoMap:Te()};return r.eachTargetAxis(function(n,a){var i=e.getComponent(ol(n),a);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(i)}}}),t}var KT=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r})(),mg=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,n,a){var i=rB(t);this.settledOption=i,this.mergeDefaultAndTheme(t,a),this._doInit(i)},e.prototype.mergeOption=function(t){var n=rB(t);Ye(this.option,t,!0),Ye(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var a=this.settledOption;O([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=Te(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return O(tB,function(a){var i=this.getReferringComponents(ol(a),bre);if(i.specified){n=!0;var o=new KT;O(i.models,function(s){o.add(s.componentIndex)}),t.set(a,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,n){var a=this.ecModel,i=!0;if(i){var o=n==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=a.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var d=new KT;if(d.add(f.componentIndex),t.set(c,d),i=!1,c==="x"||c==="y"){var v=f.getReferringComponents("grid",Zt).models[0];v&&O(u,function(g){f.componentIndex!==g.componentIndex&&v===g.getReferringComponents("grid",Zt).models[0]&&d.add(g.componentIndex)})}}}i&&O(tB,function(u){if(i){var c=a.findComponents({mainType:ol(u),filter:function(d){return d.get("type",!0)==="category"}});if(c[0]){var f=new KT;f.add(c[0].componentIndex),t.set(u,f),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(n){!t&&(t=n)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.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(t){var n=this._rangePropMode,a=this.get("rangeMode");O([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":a?n[o]=a[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,a){t==null&&(t=this.ecModel.getComponent(ol(n),a))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(a,i){O(a.indexList,function(o){t.call(n,i,o)})})},e.prototype.getAxisProxy=function(t,n){var a=this.getAxisModel(t,n);if(a)return a.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){var a=this._targetAxisInfoMap.get(t);if(a&&a.indexMap[n])return this.ecModel.getComponent(ol(t),n)},e.prototype.setRawRange=function(t){var n=this.option,a=this.settledOption;O([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(n[i[0]]=a[i[0]]=t[i[0]],n[i[1]]=a[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;O(["start","startValue","end","endValue"],function(a){n[a]=t[a]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,n){if(t==null&&n==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,a=this._targetAxisInfoMap.keys(),i=0;i<a.length;i++)for(var o=a[i],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;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})(Qe);function rB(r){var e={};return O(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var nxe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e})(mg),FN=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this.dataZoomModel=t,this.ecModel=n,this.api=a},e.type="dataZoom",e})(Rt),axe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e})(FN),Wf=O,nB=ra,ixe=(function(){function r(e,t,n,a){this._dimName=e,this._axisIndex=t,this.ecModel=a,this._dataZoomModel=n}return r.prototype.hostedBy=function(e){return this._dataZoomModel===e},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(txe(t)){var n=ol(this._dimName),a=t.getReferringComponents(n,Zt).models[0];a&&this._axisIndex===a.componentIndex&&e.push(t)}},this),e},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return Me(this._minMaxSpan)},r.prototype.calculateDataWindow=function(e){var t=this._dataExtent,n=this.getAxisModel(),a=n.axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;Wf(["start","end"],function(d,v){var g=e[d],x=e[d+"Value"];i[v]==="percent"?(g==null&&(g=o[v]),x=a.parse(pt(g,o,t))):(u=!0,x=x==null?t[v]:a.parse(x),g=pt(x,t,o)),l[v]=x==null||isNaN(x)?t[v]:x,s[v]=g==null||isNaN(g)?o[v]:g}),nB(l),nB(s);var c=this._minMaxSpan;u?f(l,s,t,o,!1):f(s,l,o,t,!0);function f(d,v,g,x,y){var b=y?"Span":"ValueSpan";wl(0,d,g,"all",c["min"+b],c["max"+b]);for(var w=0;w<2;w++)v[w]=pt(d[w],g,x,!0),y&&(v[w]=a.parse(v[w]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=oxe(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var n=this._dimName,a=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;if(i==="none")return;Wf(a,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(c.length){if(i==="weakFilter"){var f=u.getStore(),d=fe(c,function(v){return u.getDimensionIndex(v)},u);u.filterSelf(function(v){for(var g,x,y,b=0;b<c.length;b++){var w=f.get(d[b],v),T=!isNaN(w),C=w<o[0],D=w>o[1];if(T&&!C&&!D)return!0;T&&(y=!0),C&&(g=!0),D&&(x=!0)}return y&&g&&x})}else Wf(c,function(v){if(i==="empty")l.setData(u=u.map(v,function(x){return s(x)?x:NaN}));else{var g={};g[v]=o,u.selectRange(g)}});Wf(c,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;Wf(["min","max"],function(a){var i=t.get(a+"Span"),o=t.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=pt(n[0]+o,n,[0,100],!0):i!=null&&(o=pt(i,[0,100],n,!0)-n[0]),e[a+"Span"]=i,e[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var a=EM(n,[0,500]);a=Math.min(a,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(a)),t[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(a)),i.freeze()}},r})();function oxe(r,e,t){var n=[1/0,-1/0];Wf(t,function(o){Tle(n,o.getData(),e)});var a=r.getAxisModel(),i=hF(a.axis.scale,a,n).calculate();return[i.min,i.max]}var sxe={getTargetSeries:function(r){function e(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(ol(o),s);a(o,s,l,i)})})}e(function(a,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(a,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new ixe(a,i,s,r),t.push(o.__dzAxisProxy))});var n=Te();return O(t,function(a){O(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).reset(t)}),t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var a=n.getDataPercentWindow(),i=n.getDataValueWindow();t.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}};function lxe(r){r.registerAction("dataZoom",function(e,t){var n=rxe(t,e);O(n,function(a){a.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var aB=!1;function UN(r){aB||(aB=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,sxe),lxe(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function uxe(r){r.registerComponentModel(nxe),r.registerComponentView(axe),UN(r)}var Na=(function(){function r(){}return r})(),v9={};function Xf(r,e){v9[r]=e}function p9(r){return v9[r]}var cxe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;O(this.option.feature,function(n,a){var i=p9(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),Ye(n,i.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:ee.color.border,borderRadius:0,borderWidth:0,padding:ee.size.m,itemSize:15,itemGap:ee.size.s,showTitle:!0,iconStyle:{borderColor:ee.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:ee.color.accent50}},tooltip:{show:!1,position:"bottom"}},e})(Qe);function g9(r,e){var t=td(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var a=new qe({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return a}var fxe=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),f=[];O(u,function(w,T){f.push(T)}),new Qo(this._featureNames||[],f).add(d).update(d).remove(He(d,null)).execute(),this._featureNames=f;function d(w,T){var C=f[w],D=f[T],M=u[C],N=new et(M,t,t.ecModel),R;if(i&&i.newTitle!=null&&i.featureName===C&&(M.title=i.newTitle),C&&!D){if(hxe(C))R={onclick:N.option.onclick,featureName:C};else{var E=p9(C);if(!E)return;R=new E}c[C]=R}else if(R=c[D],!R)return;R.uid=ed("toolbox-feature"),R.model=N,R.ecModel=n,R.api=a;var k=R instanceof Na;if(!C&&D){k&&R.dispose&&R.dispose(n,a);return}if(!N.get("show")||k&&R.unusable){k&&R.remove&&R.remove(n,a);return}v(N,R,C),N.setIconStatus=function(I,z){var P=this.option,G=this.iconPaths;P.iconStatus=P.iconStatus||{},P.iconStatus[I]=z,G[I]&&(z==="emphasis"?$o:Ko)(G[I])},R instanceof Na&&R.render&&R.render(N,n,a,i)}function v(w,T,C){var D=w.getModel("iconStyle"),M=w.getModel(["emphasis","iconStyle"]),N=T instanceof Na&&T.getIcons?T.getIcons():w.get("icon"),R=w.get("title")||{},E,k;ye(N)?(E={},E[C]=N):E=N,ye(R)?(k={},k[C]=R):k=R;var I=w.iconPaths={};O(E,function(z,P){var G=Qh(z,{},{x:-s/2,y:-s/2,width:s,height:s});G.setStyle(D.getItemStyle());var U=G.ensureState("emphasis");U.style=M.getItemStyle();var B=new ot({style:{text:k[P],align:M.get("textAlign"),borderRadius:M.get("textBorderRadius"),padding:M.get("textPadding"),fill:null,font:tD({fontStyle:M.get("textFontStyle"),fontFamily:M.get("textFontFamily"),fontSize:M.get("textFontSize"),fontWeight:M.get("textFontWeight")},n)},ignore:!0});G.setTextContent(B),is({el:G,componentModel:t,itemName:P,formatterParamsExtra:{title:k[P]}}),G.__title=k[P],G.on("mouseover",function(){var F=M.getItemStyle(),H=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";B.setStyle({fill:M.get("textFill")||F.fill||F.stroke||ee.color.neutral99,backgroundColor:M.get("textBackgroundColor")}),G.setTextConfig({position:M.get("textPosition")||H}),B.ignore=!t.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){w.get(["iconStatus",P])!=="emphasis"&&a.leaveEmphasis(this),B.hide()}),(w.get(["iconStatus",P])==="emphasis"?$o:Ko)(G),o.add(G),G.on("click",xe(T.onclick,T,n,a,P)),I[P]=G})}var g=wr(t,a).refContainer,x=t.getBoxLayoutParams(),y=t.get("padding"),b=Ht(x,g,y);tc(t.get("orient"),o,t.get("itemGap"),b.width,b.height),eb(o,x,g,y),o.add(g9(o.getBoundingRect(),t)),l||o.eachChild(function(w){var T=w.__title,C=w.ensureState("emphasis"),D=C.textConfig||(C.textConfig={}),M=w.getTextContent(),N=M&&M.ensureState("emphasis");if(N&&!Ae(N)&&T){var R=N.style||(N.style={}),E=V1(T,ot.makeFont(R)),k=w.x+o.x,I=w.y+o.y+s,z=!1;I+E.height>a.getHeight()&&(D.position="top",z=!0);var P=z?-5-E.height:s+10;k+E.width/2>a.getWidth()?(D.position=["100%",P],R.align="right"):k-E.width/2<0&&(D.position=[0,P],R.align="left")}})},e.prototype.updateView=function(t,n,a,i){O(this._features,function(o){o instanceof Na&&o.updateView&&o.updateView(o.model,n,a,i)})},e.prototype.remove=function(t,n){O(this._features,function(a){a instanceof Na&&a.remove&&a.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){O(this._features,function(a){a instanceof Na&&a.dispose&&a.dispose(t,n)})},e.type="toolbox",e})(Rt);function hxe(r){return r.indexOf("my")===0}var dxe=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){var a=this.model,i=a.get("name")||t.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||t.get("backgroundColor")||ee.color.neutral00,connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=nt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=i+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var d=l.split(","),v=d[0].indexOf("base64")>-1,g=o?decodeURIComponent(d[1]):d[1];v&&(g=window.atob(g));var x=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var y=g.length,b=new Uint8Array(y);y--;)b[y]=g.charCodeAt(y);var w=new Blob([b]);window.navigator.msSaveOrOpenBlob(w,x)}else{var T=document.createElement("iframe");document.body.appendChild(T);var C=T.contentWindow,D=C.document;D.open("image/svg+xml","replace"),D.write(g),D.close(),C.focus(),D.execCommand("SaveAs",!0,x),document.body.removeChild(T)}}else{var M=a.get("lang"),N='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(M&&M[0]||"")+'" /></body>',R=window.open();R.document.write(N),R.document.title=i}},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:ee.color.neutral00,name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e})(Na),iB="__ec_magicType_stack__",vxe=[["line","bar"],["stack"]],pxe=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,n=t.get("icon"),a={};return O(t.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(t,n,a){var i=this.model,o=i.get(["seriesIndex",a]);if(oB[a]){var s={series:[]},l=function(f){var d=f.subType,v=f.id,g=oB[a](d,v,f,i);g&&(Le(g,f.option),s.series.push(g));var x=f.coordinateSystem;if(x&&x.type==="cartesian2d"&&(a==="line"||a==="bar")){var y=x.getAxesByScale("ordinal")[0];if(y){var b=y.dim,w=b+"Axis",T=f.getReferringComponents(w,Zt).models[0],C=T.componentIndex;s[w]=s[w]||[];for(var D=0;D<=C;D++)s[w][C]=s[w][C]||{};s[w][C].boundaryGap=a==="bar"}}};O(vxe,function(f){Fe(f,a)>=0&&O(f,function(d){i.setIconStatus(d,"normal")})}),i.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=a;a==="stack"&&(u=Ye({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e})(Na),oB={line:function(r,e,t,n){if(r==="bar")return Ye({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,e,t,n){if(r==="line")return Ye({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,e,t,n){var a=t.get("stack")===iB;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),Ye({id:e,stack:a?"":iB},n.get(["option","stack"])||{},!0)}};li({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var mb=new Array(60).join("-"),Gh=" ";function gxe(r){var e={},t=[],n=[];return r.eachRawSeries(function(a){var i=a.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(a)}else t.push(a)}else t.push(a)}),{seriesGroupByCategoryAxis:e,other:t,meta:n}}function mxe(r){var e=[];return O(r,function(t,n){var a=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(fe(t.series,function(v){return v.name})),l=[a.model.getCategories()];O(t.series,function(v){var g=v.getRawData();l.push(v.getRawData().mapArray(g.mapDimension(o),function(x){return x}))});for(var u=[s.join(Gh)],c=0;c<l[0].length;c++){for(var f=[],d=0;d<l.length;d++)f.push(l[d][c]);u.push(f.join(Gh))}e.push(u.join(`
272
- `))}),e.join(`
273
-
274
- `+mb+`
275
-
276
- `)}function yxe(r){return fe(r,function(e){var t=e.getRawData(),n=[e.name],a=[];return t.each(t.dimensions,function(){for(var i=arguments.length,o=arguments[i-1],s=t.getName(o),l=0;l<i-1;l++)a[l]=arguments[l];n.push((s?s+Gh:"")+a.join(Gh))}),n.join(`
277
- `)}).join(`
278
-
279
- `+mb+`
280
-
281
- `)}function xxe(r){var e=gxe(r);return{value:dt([mxe(e.seriesGroupByCategoryAxis),yxe(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
282
-
283
- `+mb+`
284
-
285
- `),meta:e.meta}}function p1(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function bxe(r){var e=r.slice(0,r.indexOf(`
286
- `));if(e.indexOf(Gh)>=0)return!0}var OA=new RegExp("["+Gh+"]+","g");function _xe(r){for(var e=r.split(/\n+/g),t=p1(e.shift()).split(OA),n=[],a=fe(t,function(l){return{name:l,data:[]}}),i=0;i<e.length;i++){var o=p1(e[i]).split(OA);n.push(o.shift());for(var s=0;s<o.length;s++)a[s]&&(a[s].data[i]=o[s])}return{series:a,categories:n}}function Sxe(r){for(var e=r.split(/\n+/g),t=p1(e.shift()),n=[],a=0;a<e.length;a++){var i=p1(e[a]);if(i){var o=i.split(OA),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),n[a]={name:s,value:[]},l=n[a].value):l=n[a]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?n[a].value=l[0]:n[a]=l[0])}}return{name:t,data:n}}function wxe(r,e){var t=r.split(new RegExp(`
287
- *`+mb+`
288
- *`,"g")),n={series:[]};return O(t,function(a,i){if(bxe(a)){var o=_xe(a),s=e[i],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=Sxe(a);n.series.push(o)}}),n}var Txe=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var a=n.getDom(),i=this.model;this._dom&&a.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=i.get("backgroundColor")||ee.color.neutral00;var s=document.createElement("h4"),l=i.get("lang")||[];s.innerHTML=l[0]||i.get("title"),s.style.cssText="margin:10px 20px",s.style.color=i.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var f=i.get("optionToContent"),d=i.get("contentToOption"),v=xxe(t);if(Ae(f)){var g=f(n.getOption());ye(g)?u.innerHTML=g:sc(g)&&u.appendChild(g)}else{c.readOnly=i.get("readOnly");var x=c.style;x.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",x.color=i.get("textColor"),x.borderColor=i.get("textareaBorderColor"),x.backgroundColor=i.get("textareaColor"),c.value=v.value,u.appendChild(c)}var y=v.meta,b=document.createElement("div");b.style.cssText="position:absolute;bottom:5px;left:0;right:0";var w="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",T=document.createElement("div"),C=document.createElement("div");w+=";background-color:"+i.get("buttonColor"),w+=";color:"+i.get("buttonTextColor");var D=this;function M(){a.removeChild(o),D._dom=null}Y2(T,"click",M),Y2(C,"click",function(){if(d==null&&f!=null||d!=null&&f==null){M();return}var N;try{Ae(d)?N=d(u,n.getOption()):N=wxe(c.value,y)}catch(R){throw M(),new Error("Data view format error "+R)}N&&n.dispatchAction({type:"changeDataView",newOption:N}),M()}),T.innerHTML=l[1],C.innerHTML=l[2],C.style.cssText=T.style.cssText=w,!i.get("readOnly")&&b.appendChild(C),b.appendChild(T),o.appendChild(s),o.appendChild(u),o.appendChild(b),u.style.height=a.clientHeight-80+"px",a.appendChild(o),this._dom=o},e.prototype.remove=function(t,n){this._dom&&n.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:ee.color.background,textColor:ee.color.primary,textareaColor:ee.color.background,textareaBorderColor:ee.color.border,buttonColor:ee.color.accent50,buttonTextColor:ee.color.neutral00};return n},e})(Na);function Cxe(r,e){return fe(r,function(t,n){var a=e&&e[n];if(Re(a)&&!ce(a)){var i=Re(t)&&!ce(t);i||(t={value:t});var o=a.name!=null&&t.name==null;return t=Le(t,a),o&&delete t.name,t}else return t})}li({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,e){var t=[];O(r.newOption.series,function(n){var a=e.getSeriesByName(n.name)[0];if(!a)t.push(ie({type:"scatter"},n));else{var i=a.get("data");t.push({name:n.name,data:Cxe(n.data,i)})}}),e.mergeOption(Le({series:t},r.newOption))});var m9=O,y9=Je();function Axe(r,e){var t=YN(r);m9(e,function(n,a){for(var i=t.length-1;i>=0;i--){var o=t[i];if(o[a])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(s){var l=s.getPercentRange();t[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),t.push(e)}function Mxe(r){var e=YN(r),t=e[e.length-1];e.length>1&&e.pop();var n={};return m9(t,function(a,i){for(var o=e.length-1;o>=0;o--)if(a=e[o][i],a){n[i]=a;break}}),n}function Dxe(r){y9(r).snapshots=null}function Nxe(r){return YN(r).length}function YN(r){var e=y9(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var Lxe=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){Dxe(t),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","restore","title"])};return n},e})(Na);li({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var Rxe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],WN=(function(){function r(e,t,n){var a=this;this._targetInfoList=[];var i=sB(t,e);O(Exe,function(o,s){(!n||!n.include||Fe(n.include,s)>=0)&&o(i,a._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(n,a,i){if((n.coordRanges||(n.coordRanges=[])).push(a),!n.coordRange){n.coordRange=a;var o=QT[n.brushType](0,i,a);n.__rangeOffset={offset:fB[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,n){O(e,function(a){var i=this.findTargetInfo(a,t);i&&i!==!0&&O(i.coordSyses,function(o){var s=QT[a.brushType](1,o,a.range,!0);n(a,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){O(e,function(n){var a=this.findTargetInfo(n,t);if(n.range=n.range||[],a&&a!==!0){n.panelId=a.panelId;var i=QT[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?fB[n.brushType](i.values,o.offset,kxe(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return fe(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:wU(a),isTargetByCursor:CU(a,e,n.coordSysModel),getLinearBrushOtherExtent:TU(a)}})},r.prototype.controlSeries=function(e,t,n){var a=this.findTargetInfo(e,n);return a===!0||a&&Fe(a.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,a=sB(t,e),i=0;i<n.length;i++){var o=n[i],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<lB.length;l++)if(lB[l](a,o))return o}return!0},r})();function PA(r){return r[0]>r[1]&&r.reverse(),r}function sB(r,e){return oh(r,e,{includeMainTypes:Rxe})}var Exe={grid:function(r,e){var t=r.xAxisModels,n=r.yAxisModels,a=r.gridModels,i=Te(),o={},s={};!t&&!n&&!a||(O(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),O(n,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),O(a,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,c=[];O(u.getCartesians(),function(f,d){(Fe(t,f.getAxis("x").model)>=0||Fe(n,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:uB.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){O(r.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:uB.geo})})}},lB=[function(r,e){var t=r.xAxisModel,n=r.yAxisModel,a=r.gridModel;return!a&&t&&(a=t.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],uB={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(dl(r)),e}},QT={lineX:He(cB,0),lineY:He(cB,1),rect:function(r,e,t,n){var a=r?e.pointToData([t[0][0],t[1][0]],n):e.dataToPoint([t[0][0],t[1][0]],n),i=r?e.pointToData([t[0][1],t[1][1]],n):e.dataToPoint([t[0][1],t[1][1]],n),o=[PA([a[0],i[0]]),PA([a[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,n){var a=[[1/0,-1/0],[1/0,-1/0]],i=fe(t,function(o){var s=r?e.pointToData(o,n):e.dataToPoint(o,n);return a[0][0]=Math.min(a[0][0],s[0]),a[1][0]=Math.min(a[1][0],s[1]),a[0][1]=Math.max(a[0][1],s[0]),a[1][1]=Math.max(a[1][1],s[1]),s});return{values:i,xyMinMax:a}}};function cB(r,e,t,n){var a=t.getAxis(["x","y"][r]),i=PA(fe([0,1],function(s){return e?a.coordToData(a.toLocalCoord(n[s]),!0):a.toGlobalCoord(a.dataToCoord(n[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var fB={lineX:He(hB,0),lineY:He(hB,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return fe(r,function(n,a){return[n[0]-t[0]*e[a][0],n[1]-t[1]*e[a][1]]})}};function hB(r,e,t,n){return[e[0]-n[r]*t[0],e[1]-n[r]*t[1]]}function kxe(r,e){var t=dB(r),n=dB(e),a=[t[0]/n[0],t[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function dB(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var zA=O,Ixe=pre("toolbox-dataZoom_"),Oxe=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){this._brushController||(this._brushController=new mN(a.getZr()),this._brushController.on("brush",xe(this._onBrush,this)).mount()),jxe(t,n,this,i,a),zxe(t,n)},e.prototype.onclick=function(t,n,a){Pxe[a].call(this)},e.prototype.remove=function(t,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var n=t.areas;if(!t.isEnd||!n.length)return;var a={},i=this.ecModel;this._brushController.updateCovers([]);var o=new WN(XN(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,function(u,c,f){if(f.type==="cartesian2d"){var d=u.brushType;d==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[d],f,c)}}),Axe(i,a),this._dispatchZoomAction(a);function s(u,c,f){var d=c.getAxis(u),v=d.model,g=l(u,v,i),x=g.findRepresentativeAxisProxy(v).getMinMaxSpan();(x.minValueSpan!=null||x.maxValueSpan!=null)&&(f=wl(0,f.slice(),d.scale.getExtent(),0,x.minValueSpan,x.maxValueSpan)),g&&(a[g.id]={dataZoomId:g.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var d;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var g=v.getAxisModel(u,c.componentIndex);g&&(d=v)}),d}},e.prototype._dispatchZoomAction=function(t){var n=[];zA(t,function(a,i){n.push(Me(a))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:ee.color.backgroundTint}};return n},e})(Na),Pxe={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(Mxe(this.ecModel))}};function XN(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function zxe(r,e){r.setIconStatus("back",Nxe(e)>1?"emphasis":"normal")}function jxe(r,e,t,n,a){var i=t._isZoomActive;n&&n.type==="takeGlobalCursor"&&(i=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),t._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new WN(XN(r),e,{include:["grid"]}),s=o.makePanelOpts(a,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}$ae("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var n=e.getModel(t),a=[],i=XN(n),o=oh(r,i);zA(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),zA(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,d={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:Ixe+u+f};d[c]=f,a.push(d)}return a});function Bxe(r){r.registerComponentModel(cxe),r.registerComponentView(fxe),Xf("saveAsImage",dxe),Xf("magicType",pxe),Xf("dataView",Txe),Xf("dataZoom",Oxe),Xf("restore",Lxe),We(uxe)}var Vxe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:ee.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:ee.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:ee.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:ee.color.tertiary,fontSize:14}},e})(Qe);function x9(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function b9(r){if(nt.domSupported){for(var e=document.documentElement.style,t=0,n=r.length;t<n;t++)if(r[t]in e)return r[t]}}var _9=b9(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Gxe=b9(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function S9(r,e){if(!r)return e;e=vD(e,!0);var t=r.indexOf(e);return r=t===-1?e:"-"+r.slice(0,t)+"-"+e,r.toLowerCase()}function Hxe(r,e){var t=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return t?t[e]:null}var Fxe=S9(Gxe,"transition"),qN=S9(_9,"transform"),Uxe="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(nt.transform3dSupported?"will-change:transform;":"");function Yxe(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function Wxe(r,e,t){if(!ye(t)||t==="inside")return"";var n=r.get("backgroundColor"),a=r.get("borderWidth");e=vc(e);var i=Yxe(t),o=Math.max(Math.round(a)*1.5,6),s="",l=qN+":",u;Fe(["left","right"],i)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+a,d=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),v=Math.round(((d-Math.SQRT2*a)/2+Math.SQRT2*a-(d-f)/2)*100)/100;s+=";"+i+":-"+v+"px";var g=e+" solid "+a+"px;",x=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+g,"border-right:"+g,"background-color:"+n+";"];return'<div style="'+x.join("")+'"></div>'}function Xxe(r,e,t){var n="cubic-bezier(0.23,1,0.32,1)",a="",i="";return t&&(a=" "+r/2+"s "+n,i="opacity"+a+",visibility"+a),e||(a=" "+r+"s "+n,i+=(i.length?",":"")+(nt.transformSupported?""+qN+a:",left"+a+",top"+a)),Fxe+":"+i}function vB(r,e,t){var n=r.toFixed(0)+"px",a=e.toFixed(0)+"px";if(!nt.transformSupported)return t?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=nt.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return t?"top:0;left:0;"+qN+":"+o+";":[["top",0],["left",0],[_9,o]]}function qxe(r){var e=[],t=r.get("fontSize"),n=r.getTextColor();n&&e.push("color:"+n),e.push("font:"+r.getFont());var a=Ce(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+a+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),O(["decoration","align"],function(u){var c=r.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function Zxe(r,e,t,n){var a=[],i=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),c=r.get("shadowOffsetY"),f=r.getModel("textStyle"),d=c8(r,"html"),v=u+"px "+c+"px "+s+"px "+l;return a.push("box-shadow:"+v),e&&i>0&&a.push(Xxe(i,t,n)),o&&a.push("background-color:"+o),O(["width","color","radius"],function(g){var x="border-"+g,y=vD(x),b=r.get(y);b!=null&&a.push(x+":"+b+(g==="color"?"":"px"))}),a.push(qxe(f)),d!=null&&a.push("padding:"+td(d).join("px ")+"px"),a.join(";")+";"}function pB(r,e,t,n,a){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&Iee(r,o,t,n,a)}else{r[0]=n,r[1]=a;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var $xe=(function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,nt.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var a=this._zr=e.getZr(),i=t.appendTo,o=i&&(ye(i)?document.querySelector(i):sc(i)?i:Ae(i)&&i(e.getDom()));pB(this._styleCoord,a,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=a.handler,c=a.painter.getViewportRoot();Sa(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=Hxe(t,"position"),a=t.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=Uxe+Zxe(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+vB(i[0],i[1],!0)+("border-color:"+vc(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,n,a,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(ye(i)&&n.get("trigger")==="item"&&!x9(n)&&(s=Wxe(n,a,i)),ye(e))o.innerHTML=e+s;else if(e){o.innerHTML="",ce(e)||(e=[e]);for(var l=0;l<e.length;l++)sc(e[l])&&e[l].parentNode!==o&&o.appendChild(e[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},r.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(pB(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var a=this.el.style,i=vB(n[0],n[1]);O(i,function(o){a[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility="hidden",t.opacity="0"):t.display="none",nt.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(xe(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;Oee(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},r})(),Kxe=(function(){function r(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),mB(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return r.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(e,t,n,a,i){var o=this;Re(e)&&gt(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new ot({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:a,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:c8(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),O(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),O(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=gB(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},r.prototype.moveTo=function(e,t){var n=this.el;if(n){var a=this._styleCoord;mB(a,this._zr,e,t),e=a[0],t=a[1];var i=n.style,o=Fs(i.borderWidth||0),s=gB(i);n.x=e+o+s.left,n.y=t+o+s.top,n.markRedraw()}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(xe(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r})();function Fs(r){return Math.max(0,r)}function gB(r){var e=Fs(r.shadowBlur||0),t=Fs(r.shadowOffsetX||0),n=Fs(r.shadowOffsetY||0);return{left:Fs(e-t),right:Fs(e+t),top:Fs(e-n),bottom:Fs(e+n)}}function mB(r,e,t,n){r[0]=t,r[1]=n,r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var Qxe=new qe({shape:{x:-1,y:-1,width:2,height:2}}),Jxe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){if(!(nt.node||!n.getDom())){var a=t.getComponent("tooltip"),i=this._renderMode=Sre(a.get("renderMode"));this._tooltipContent=i==="richText"?new Kxe(n):new $xe(n,{appendTo:a.get("appendToBody",!0)?"body":a.get("appendTo",!0)})}},e.prototype.render=function(t,n,a){if(!(nt.node||!a.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=n,this._api=a;var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?ad(this,"_updatePosition",50,"fixRate"):rg(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,n=t.get("triggerOn");n9("itemTooltip",this._api,xe(function(a,i,o){n!=="none"&&(n.indexOf(a)>=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,a=this._api,i=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(t,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,n,a,i){if(!(i.from===this.uid||nt.node||!a.getDom())){var o=yB(i,a);this._ticket="";var s=i.dataByCoordSys,l=n1e(i,n,a);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var c=Qxe;c.x=i.x,c.y=i.y,c.update(),Pe(c).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:c},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(t,n,a,i))return;var f=a9(i,n),d=f.point[0],v=f.point[1];d!=null&&v!=null&&this._tryShow({offsetX:d,offsetY:v,target:f.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,n,a,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(yB(i,a))},e.prototype._manuallyAxisShowTip=function(t,n,a,i){var o=i.seriesIndex,s=i.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=Yv([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},e.prototype._tryShow=function(t,n){var a=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(a){var s=Pe(a);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Vu(a,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(Pe(c).dataIndex!=null?l=c:Pe(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(t,l,n):u?this._showComponentItemTooltip(t,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(t,n){var a=t.get("showDelay");n=xe(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},e.prototype._showAxisTooltip=function(t,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Yv([n.tooltipOption],i),l=this._renderMode,u=[],c=pr("section",{blocks:[],noHeader:!0}),f=[],d=new kw;O(t,function(w){O(w.dataByAxis,function(T){var C=a.getComponent(T.axisDim+"Axis",T.axisIndex),D=T.value;if(!(!C||D==null)){var M=e9(D,C.axis,a,T.seriesDataIndices,T.valueLabelOpt),N=pr("section",{header:M,noHeader:!ta(M),sortBlocks:!0,blocks:[]});c.blocks.push(N),O(T.seriesDataIndices,function(R){var E=a.getSeriesByIndex(R.seriesIndex),k=R.dataIndexInside,I=E.getDataParams(k);if(!(I.dataIndex<0)){I.axisDim=T.axisDim,I.axisIndex=T.axisIndex,I.axisType=T.axisType,I.axisId=T.axisId,I.axisValue=Wx(C.axis,{value:D}),I.axisValueLabel=M,I.marker=d.makeTooltipMarker("item",vc(I.color),l);var z=IP(E.formatTooltip(k,!0,null)),P=z.frag;if(P){var G=Yv([E],i).get("valueFormatter");N.blocks.push(G?ie({valueFormatter:G},P):P)}z.text&&f.push(z.text),u.push(I)}})}})}),c.blocks.reverse(),f.reverse();var v=n.position,g=s.get("order"),x=VP(c,d,l,g,a.get("useUTC"),s.get("textStyle"));x&&f.unshift(x);var y=l==="richText"?`
289
-
290
- `:"<br/>",b=f.join(y);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,b,u,Math.random()+"",o[0],o[1],v,null,d)})},e.prototype._showSeriesItemTooltip=function(t,n,a){var i=this._ecModel,o=Pe(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,d=u.getData(f),v=this._renderMode,g=t.positionDefault,x=Yv([d.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,g?{position:g}:null),y=x.get("trigger");if(!(y!=null&&y!=="item")){var b=u.getDataParams(c,f),w=new kw;b.marker=w.makeTooltipMarker("item",vc(b.color),v);var T=IP(u.formatTooltip(c,!1,f)),C=x.get("order"),D=x.get("valueFormatter"),M=T.frag,N=M?VP(D?ie({valueFormatter:D},M):M,w,v,C,i.get("useUTC"),x.get("textStyle")):T.text,R="item_"+u.name+"_"+c;this._showOrMove(x,function(){this._showTooltipContent(x,N,b,R,t.offsetX,t.offsetY,t.position,t.target,w)}),a({type:"showTip",dataIndexInside:c,dataIndex:d.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,a){var i=this._renderMode==="html",o=Pe(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(ye(l)){var c=l;l={content:c,formatter:c},u=!0}u&&i&&l.content&&(l=Me(l),l.content=hn(l.content));var f=[l],d=this._ecModel.getComponent(o.componentMainType,o.componentIndex);d&&f.push(d),f.push({formatter:l.content});var v=t.positionDefault,g=Yv(f,this._tooltipModel,v?{position:v}:null),x=g.get("content"),y=Math.random()+"",b=new kw;this._showOrMove(g,function(){var w=Me(g.get("formatterParams")||{});this._showTooltipContent(g,x,w,y,t.offsetX,t.offsetY,t.position,n,b)}),a({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,a,i,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var d=t.get("formatter");l=l||t.get("position");var v=n,g=this._getNearestPoint([o,s],a,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)),x=g.color;if(d)if(ye(d)){var y=t.ecModel.get("useUTC"),b=ce(a)?a[0]:a,w=b&&b.axisType&&b.axisType.indexOf("time")>=0;v=d,w&&(v=Hg(b.axisValue,v,y)),v=pD(v,a,!0)}else if(Ae(d)){var T=xe(function(C,D){C===this._ticket&&(f.setContent(D,c,t,x,l),this._updatePosition(t,l,o,s,f,a,u))},this);this._ticket=i,v=d(a,i,T)}else v=d;f.setContent(v,c,t,x,l),f.show(t,x),this._updatePosition(t,l,o,s,f,a,u)}},e.prototype._getNearestPoint=function(t,n,a,i,o){if(a==="axis"||ce(n))return{color:i||o};if(!ce(n))return{color:i||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,a,i,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||t.get("position");var f=o.getSize(),d=t.get("align"),v=t.get("verticalAlign"),g=l&&l.getBoundingRect().clone();if(l&&g.applyTransform(l.transform),Ae(n)&&(n=n([a,i],s,o.el,g,{viewSize:[u,c],contentSize:f.slice()})),ce(n))a=me(n[0],u),i=me(n[1],c);else if(Re(n)){var x=n;x.width=f[0],x.height=f[1];var y=Ht(x,{width:u,height:c});a=y.x,i=y.y,d=null,v=null}else if(ye(n)&&l){var b=r1e(n,g,f,t.get("borderWidth"));a=b[0],i=b[1]}else{var b=e1e(a,i,o,u,c,d?null:20,v?null:20);a=b[0],i=b[1]}if(d&&(a-=xB(d)?f[0]/2:d==="right"?f[0]:0),v&&(i-=xB(v)?f[1]/2:v==="bottom"?f[1]:0),x9(t)){var b=t1e(a,i,o,u,c);a=b[0],i=b[1]}o.moveTo(a,i)},e.prototype._updateContentNotChangedOnAxis=function(t,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===t.length;return o&&O(a,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&O(u,function(d,v){var g=f[v]||{},x=d.seriesDataIndices||[],y=g.seriesDataIndices||[];o=o&&d.value===g.value&&d.axisType===g.axisType&&d.axisId===g.axisId&&x.length===y.length,o&&O(x,function(b,w){var T=y[w];o=o&&b.seriesIndex===T.seriesIndex&&b.dataIndex===T.dataIndex}),i&&O(d.seriesDataIndices,function(b){var w=b.seriesIndex,T=n[w],C=i[w];T&&C&&C.data!==T.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=n,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,n){nt.node||!n.getDom()||(rg(this,"_updatePosition"),this._tooltipContent.dispose(),NA("itemTooltip",n))},e.type="tooltip",e})(Rt);function Yv(r,e,t){var n=e.ecModel,a;t?(a=new et(t,n,n),a=new et(e.option,a,n)):a=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof et&&(o=o.get("tooltip",!0)),ye(o)&&(o={formatter:o}),o&&(a=new et(o,a,n)))}return a}function yB(r,e){return r.dispatchAction||xe(e.dispatchAction,e)}function e1e(r,e,t,n,a,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>n?r-=l+i:r+=i),o!=null&&(e+u+o>a?e-=u+o:e+=o),[r,e]}function t1e(r,e,t,n,a){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,n)-o,e=Math.min(e+s,a)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function r1e(r,e,t,n){var a=t[0],i=t[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-a/2,l=e.y+c/2-i/2;break;case"top":s=e.x+u/2-a/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-a/2,l=e.y+c+o;break;case"left":s=e.x-a-o,l=e.y+c/2-i/2;break;case"right":s=e.x+u+o,l=e.y+c/2-i/2}return[s,l]}function xB(r){return r==="center"||r==="middle"}function n1e(r,e,t){var n=zM(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=Xh(e,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Pe(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}function a1e(r){We(Kg),r.registerComponentModel(Vxe),r.registerComponentView(Jxe),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Kt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Kt)}var i1e=["rect","polygon","keep","clear"];function o1e(r,e){var t=Lt(r?r.brush:[]);if(t.length){var n=[];O(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var a=r&&r.toolbox;ce(a)&&(a=a[0]),a||(a={feature:{}},r.toolbox=[a]);var i=a.feature||(a.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),s1e(s),e&&!s.length&&s.push.apply(s,i1e)}}function s1e(r){var e={};O(r,function(t){e[t]=1}),r.length=0,O(e,function(t,n){r.push(n)})}var bB=O;function _B(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function jA(r,e,t){var n={};return bB(e,function(i){var o=n[i]=a();bB(r[i],function(s,l){if(Nr.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new Nr(u),l==="opacity"&&(u=Me(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Nr(u))}})}),n;function a(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function w9(r,e,t){var n;O(t,function(a){e.hasOwnProperty(a)&&_B(e[a])&&(n=!0)}),n&&O(t,function(a){e.hasOwnProperty(a)&&_B(e[a])?r[a]=Me(e[a]):delete r[a]})}function l1e(r,e,t,n,a,i){var o={};O(r,function(f){var d=Nr.prepareVisualTypes(e[f]);o[f]=d});var s;function l(f){return CD(t,s,f)}function u(f,d){b8(t,s,f,d)}t.each(c);function c(f,d){s=f;var v=t.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var g=n.call(a,f),x=e[g],y=o[g],b=0,w=y.length;b<w;b++){var T=y[b];x[T]&&x[T].applyVisual(f,l,u)}}}function u1e(r,e,t,n){var a={};return O(r,function(i){var o=Nr.prepareVisualTypes(e[i]);a[i]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(D){return CD(s,f,D)}function c(D,M){b8(s,f,D,M)}for(var f,d=s.getStore();(f=o.next())!=null;){var v=s.getRawDataItem(f);if(!(v&&v.visualMap===!1))for(var g=n!=null?d.get(l,f):f,x=t(g),y=e[x],b=a[x],w=0,T=b.length;w<T;w++){var C=b[w];y[C]&&y[C].applyVisual(g,u,c)}}}}}function c1e(r){var e=r.brushType,t={point:function(n){return SB[e].point(n,t,r)},rect:function(n){return SB[e].rect(n,t,r)}};return t}var SB={lineX:wB(0),lineY:wB(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&Ru(t.range,r[0],r[1])},rect:function(r,e,t){var n=t.range;if(!r||n.length<=1)return!1;var a=r.x,i=r.y,o=r.width,s=r.height,l=n[0];if(Ru(n,a,i)||Ru(n,a+o,i)||Ru(n,a,i+s)||Ru(n,a+o,i+s)||Ie.create(r).contain(l[0],l[1])||lp(a,i,a+o,i,n)||lp(a,i,a,i+s,n)||lp(a+o,i,a+o,i+s,n)||lp(a,i+s,a+o,i+s,n))return!0}}};function wB(r){var e=["x","y"],t=["width","height"];return{point:function(n,a,i){if(n){var o=i.range,s=n[r];return Wv(s,o)}},rect:function(n,a,i){if(n){var o=i.range,s=[n[e[r]],n[e[r]]+n[t[r]]];return s[1]<s[0]&&s.reverse(),Wv(s[0],o)||Wv(s[1],o)||Wv(o[0],s)||Wv(o[1],s)}}}}function Wv(r,e){return e[0]<=r&&r<=e[1]}var TB=["inBrush","outOfBrush"],JT="__ecBrushSelect",BA="__ecInBrushSelectEvent";function T9(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new WN(e.option,r);t.setInputRanges(e.areas,r)})}function f1e(r,e,t){var n=[],a,i;r.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),T9(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:Me(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,f=[],d=[],v=[],g=!1;s||(a=u.throttleType,i=u.throttleDelay);var x=fe(o.areas,function(D){var M=p1e[D.brushType],N=Le({boundingRect:M?M(D):void 0},D);return N.selectors=c1e(N),N}),y=jA(o.option,TB,function(D){D.mappingMethod="fixed"});ce(c)&&O(c,function(D){f[D]=1});function b(D){return c==="all"||!!f[D]}function w(D){return!!D.length}r.eachSeries(function(D,M){var N=v[M]=[];D.subType==="parallel"?T(D,M):C(D,M,N)});function T(D,M){var N=D.coordinateSystem;g=g||N.hasAxisBrushed(),b(M)&&N.eachActiveState(D.getData(),function(R,E){R==="active"&&(d[E]=1)})}function C(D,M,N){if(!(!D.brushSelector||v1e(o,M))&&(O(x,function(E){o.brushTargetManager.controlSeries(E,D,r)&&N.push(E),g=g||w(N)}),b(M)&&w(N))){var R=D.getData();R.each(function(E){CB(D,N,R,E)&&(d[E]=1)})}}r.eachSeries(function(D,M){var N={seriesId:D.id,seriesIndex:M,seriesName:D.name,dataIndex:[]};l.selected.push(N);var R=v[M],E=D.getData(),k=b(M)?function(I){return d[I]?(N.dataIndex.push(E.getRawIndex(I)),"inBrush"):"outOfBrush"}:function(I){return CB(D,R,E,I)?(N.dataIndex.push(E.getRawIndex(I)),"inBrush"):"outOfBrush"};(b(M)?g:w(R))&&l1e(TB,y,E,k)})}),h1e(e,a,i,n,t)}function h1e(r,e,t,n,a){if(a){var i=r.getZr();if(!i[BA]){i[JT]||(i[JT]=d1e);var o=ad(i,JT,t,e);o(r,n)}}}function d1e(r,e){if(!r.isDisposed()){var t=r.getZr();t[BA]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[BA]=!1}}function CB(r,e,t,n){for(var a=0,i=e.length;a<i;a++){var o=e[a];if(r.brushSelector(n,t,o.selectors,o))return!0}}function v1e(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(ce(t)?Fe(t,e)<0:e!==t)}var p1e={rect:function(r){return AB(r.range)},polygon:function(r){for(var e,t=r.range,n=0,a=t.length;n<a;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var i=t[n];i[0]<e[0][0]&&(e[0][0]=i[0]),i[0]>e[0][1]&&(e[0][1]=i[0]),i[1]<e[1][0]&&(e[1][0]=i[1]),i[1]>e[1][1]&&(e[1][1]=i[1])}return e&&AB(e)}};function AB(r){return new Ie(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var g1e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n,this.model,(this._brushController=new mN(n.getZr())).on("brush",xe(this._onBrush,this)).mount()},e.prototype.render=function(t,n,a,i){this.model=t,this._updateController(t,n,a,i)},e.prototype.updateTransform=function(t,n,a,i){T9(n),this._updateController(t,n,a,i)},e.prototype.updateVisual=function(t,n,a,i){this.updateTransform(t,n,a,i)},e.prototype.updateView=function(t,n,a,i){this._updateController(t,n,a,i)},e.prototype._updateController=function(t,n,a,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(a)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var n=this.model.id,a=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:Me(a),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:Me(a),$from:n})},e.type="brush",e})(Rt),m1e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&w9(a,t,["inBrush","outOfBrush"]);var i=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:this.option.defaultOutOfBrushColor},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=fe(t,function(n){return MB(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=MB(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:ee.color.backgroundTint,borderColor:ee.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:ee.color.disabled},e})(Qe);function MB(r,e){return Ye({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new et(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var y1e=["rect","polygon","lineX","lineY","keep","clear"],x1e=(function(r){K(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a){var i,o,s;n.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,O(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,n,a){this.render(t,n,a)},e.prototype.getIcons=function(){var t=this.model,n=t.get("icon",!0),a={};return O(t.get("type",!0),function(i){n[i]&&(a[i]=n[i])}),a},e.prototype.onclick=function(t,n,a){var i=this._brushType,o=this._brushMode;a==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:a==="keep"?i:i===a?!1:a,brushMode:a==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var n={show:!0,type:y1e.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return n},e})(Na);function b1e(r){r.registerComponentView(g1e),r.registerComponentModel(m1e),r.registerPreprocessor(o1e),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,f1e),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Kt),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Kt),Xf("brush",x1e)}var _1e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:ee.size.m,backgroundColor:ee.color.transparent,borderColor:ee.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:ee.color.primary},subtextStyle:{fontSize:12,color:ee.color.quaternary}},e})(Qe),S1e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Ce(t.get("textBaseline"),t.get("textVerticalAlign")),c=new ot({style:Nt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),d=t.get("subtext"),v=new ot({style:Nt(s,{text:d,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),g=t.get("link"),x=t.get("sublink"),y=t.get("triggerEvent",!0);c.silent=!g&&!y,v.silent=!x&&!y,g&&c.on("click",function(){Ox(g,"_"+t.get("target"))}),x&&v.on("click",function(){Ox(x,"_"+t.get("subtarget"))}),Pe(c).eventData=Pe(v).eventData=y?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(c),d&&i.add(v);var b=i.getBoundingRect(),w=t.getBoxLayoutParams();w.width=b.width,w.height=b.height;var T=wr(t,a),C=Ht(w,T.refContainer,t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?C.x+=C.width:l==="center"&&(C.x+=C.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?C.y+=C.height:u==="middle"&&(C.y+=C.height/2),u=u||"top"),i.x=C.x,i.y=C.y,i.markRedraw();var D={align:l,verticalAlign:u};c.setStyle(D),v.setStyle(D),b=i.getBoundingRect();var M=C.margin,N=t.getItemStyle(["color","opacity"]);N.fill=t.get("backgroundColor");var R=new qe({shape:{x:b.x-M[3],y:b.y-M[0],width:b.width+M[1]+M[3],height:b.height+M[0]+M[2],r:t.get("borderRadius")},style:N,subPixelOptimize:!0,silent:!0});i.add(R)}},e.type="title",e})(Rt);function w1e(r){r.registerComponentModel(_1e),r.registerComponentView(S1e)}var DB=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var n=this._data.count();this.option.loop?t=(t%n+n)%n:(t>=n&&(t=n-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,n=t.data||[],a=t.axisType,i=this._names=[],o;a==="category"?(o=[],O(n,function(u,c){var f=xr(Wh(u),""),d;Re(u)?(d=Me(u),d.value=c):d=c,o.push(d),i.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[a]||"number",l=this._data=new vn([{name:"value",type:s}],this);l.initData(o,i)},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:ee.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:ee.color.secondary},data:[]},e})(Qe),C9=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=Ll(DB.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:ee.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:ee.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:ee.color.tertiary},itemStyle:{color:ee.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:ee.color.accent50,borderColor:ee.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:ee.color.accent50,borderColor:ee.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:ee.color.accent60},itemStyle:{color:ee.color.accent60,borderColor:ee.color.accent60},controlStyle:{color:ee.color.accent70,borderColor:ee.color.accent70}},progress:{lineStyle:{color:ee.color.accent30},itemStyle:{color:ee.color.accent40}},data:[]}),e})(DB);Jt(C9,rb.prototype);var T1e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e})(Rt),C1e=(function(r){K(e,r);function e(t,n,a,i){var o=r.call(this,t,n,a)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e})(Ba),e2=Math.PI,NB=Je(),A1e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.api=n},e.prototype.render=function(t,n,a){if(this.model=t,this.api=a,this.ecModel=n,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,a),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return pr("nameValue",{noName:!0,value:c})},O(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,n){var a=t.get(["label","position"]),i=t.get("orient"),o=D1e(t,n),s;a==null||a==="auto"?s=i==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":ye(a)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][a]:s=a;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:e2/2},f=i==="vertical"?o.height:o.width,d=t.getModel("controlStyle"),v=d.get("show",!0),g=v?d.get("itemSize"):0,x=v?d.get("itemGap"):0,y=g+x,b=t.get(["label","rotate"])||0;b=b*e2/180;var w,T,C,D=d.get("position",!0),M=v&&d.get("showPlayBtn",!0),N=v&&d.get("showPrevBtn",!0),R=v&&d.get("showNextBtn",!0),E=0,k=f;D==="left"||D==="bottom"?(M&&(w=[0,0],E+=y),N&&(T=[E,0],E+=y),R&&(C=[k-g,0],k-=y)):(M&&(w=[k-g,0],k-=y),N&&(T=[0,0],E+=y),R&&(C=[k-g,0],k-=y));var I=[E,k];return t.get("inverse")&&I.reverse(),{viewRect:o,mainLength:f,orient:i,rotation:c[i],labelRotation:b,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:w,prevBtnPosition:T,nextBtnPosition:C,axisExtent:I,controlSize:g,controlGap:x}},e.prototype._position=function(t,n){var a=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=Dr(),l=o.x,u=o.y+o.height;ai(s,s,[-l,-u]),ns(s,s,-e2/2),ai(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=w(o),f=w(a.getBoundingRect()),d=w(i.getBoundingRect()),v=[a.x,a.y],g=[i.x,i.y];g[0]=v[0]=c[0][0];var x=t.labelPosOpt;if(x==null||ye(x)){var y=x==="+"?0:1;T(v,f,c,1,y),T(g,d,c,1,1-y)}else{var y=x>=0?0:1;T(v,f,c,1,y),g[1]=v[1]+x}a.setPosition(v),i.setPosition(g),a.rotation=i.rotation=t.rotation,b(a),b(i);function b(C){C.originX=c[0][0]-C.x,C.originY=c[1][0]-C.y}function w(C){return[[C.x,C.x+C.width],[C.y,C.y+C.height]]}function T(C,D,M,N,R){C[N]+=M[N][R]-D[N][R]}},e.prototype._createAxis=function(t,n){var a=n.getData(),i=n.get("axisType"),o=M1e(n,i);o.getTicks=function(){return a.mapArray(["value"],function(u){return{value:u}})};var s=a.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new C1e("value",o,t.axisExtent,i);return l.model=n,l},e.prototype._createGroup=function(t){var n=this[t]=new De;return this.group.add(n),n},e.prototype._renderAxisLine=function(t,n,a,i){var o=a.getExtent();if(i.get(["lineStyle","show"])){var s=new lr({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:ie({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new lr({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Le({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(t,n,a,i){var o=this,s=i.getData(),l=a.scale.getTicks();this._tickSymbols=[],O(l,function(u){var c=a.dataToCoord(u.value),f=s.getItemModel(u.value),d=f.getModel("itemStyle"),v=f.getModel(["emphasis","itemStyle"]),g=f.getModel(["progress","itemStyle"]),x={x:c,y:0,onclick:xe(o._changeTimeline,o,u.value)},y=LB(f,d,n,x);y.ensureState("emphasis").style=v.getItemStyle(),y.ensureState("progress").style=g.getItemStyle(),hl(y);var b=Pe(y);f.get("tooltip")?(b.dataIndex=u.value,b.dataModel=i):b.dataIndex=b.dataModel=null,o._tickSymbols.push(y)})},e.prototype._renderAxisLabel=function(t,n,a,i){var o=this,s=a.getLabelModel();if(s.get("show")){var l=i.getData(),u=a.getViewLabels();this._tickLabels=[],O(u,function(c){var f=c.tickValue,d=l.getItemModel(f),v=d.getModel("label"),g=d.getModel(["emphasis","label"]),x=d.getModel(["progress","label"]),y=a.dataToCoord(c.tickValue),b=new ot({x:y,y:0,rotation:t.labelRotation-t.rotation,onclick:xe(o._changeTimeline,o,f),silent:!1,style:Nt(v,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});b.ensureState("emphasis").style=Nt(g),b.ensureState("progress").style=Nt(x),n.add(b),hl(b),NB(b).dataIndex=f,o._tickLabels.push(b)})}},e.prototype._renderControl=function(t,n,a,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),c=i.getPlayState(),f=i.get("inverse",!0);d(t.nextBtnPosition,"next",xe(this._changeTimeline,this,f?"-":"+")),d(t.prevBtnPosition,"prev",xe(this._changeTimeline,this,f?"+":"-")),d(t.playPosition,c?"stop":"play",xe(this._handlePlayClick,this,!c),!0);function d(v,g,x,y){if(v){var b=ii(Ce(i.get(["controlStyle",g+"BtnSize"]),o),o),w=[0,-b/2,b,b],T=N1e(i,g+"Icon",w,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:y?-s:0,rectHover:!0,style:l,onclick:x});T.ensureState("emphasis").style=u,n.add(T),hl(T)}}},e.prototype._renderCurrentPointer=function(t,n,a,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=xe(u._handlePointerDrag,u),f.ondragend=xe(u._handlePointerDragend,u),RB(f,u._progressLine,s,a,i,!0)},onUpdate:function(f){RB(f,u._progressLine,s,a,i)}};this._currentPointer=LB(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,n,a){this._clearTimer(),this._pointerChangeTimeline([a.offsetX,a.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,n){var a=this._toAxisCoord(t)[0],i=this._axis,o=ra(i.getExtent().slice());a>o[1]&&(a=o[1]),a<o[0]&&(a=o[0]),this._currentPointer.x=a,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=a,s.dirty());var l=this._findNearestTick(a),u=this.model;(n||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var n=t.model;t._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var n=this._mainGroup.getLocalTransform();return ei(t,n,!0)},e.prototype._findNearestTick=function(t){var n=this.model.getData(),a=1/0,i,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-t);c<a&&(a=c,i=l)}),i},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var n=this.model.getCurrentIndex();t==="+"?t=n+1:t==="-"&&(t=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),n=this._tickSymbols,a=this._tickLabels;if(n)for(var i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",i<t);if(a)for(var i=0;i<a.length;i++)a&&a[i]&&a[i].toggleState("progress",NB(a[i]).dataIndex<=t)},e.type="timeline.slider",e})(T1e);function M1e(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new Ih({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new GD({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new es}}function D1e(r,e){return Ht(r.getBoxLayoutParams(),wr(r,e).refContainer,r.get("padding"))}function N1e(r,e,t,n){var a=n.style,i=Qh(r.get(["controlStyle",e]),n||{},new Ie(t[0],t[1],t[2],t[3]));return a&&i.setStyle(a),i}function LB(r,e,t,n,a,i){var o=e.get("color");if(a)a.setColor(o),t.add(a),i&&i.onUpdate(a);else{var s=r.get("symbol");a=ur(s,-1,-1,2,2,o),a.setStyle("strokeNoScale",!0),t.add(a),i&&i.onCreate(a)}var l=e.getItemStyle(["color"]);a.setStyle(l),n=Ye({rectHover:!0,z2:100},n,!0);var u=id(r.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=Tc(r.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var f=r.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function RB(r,e,t,n,a,i){if(!r.dragging){var o=a.getModel("checkpointStyle"),s=n.dataToCoord(a.getData().get("value",t));if(i||!o.get("animation",!0))r.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}function L1e(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,n){var a=t.getComponent("timeline");return a&&e.currentIndex!=null&&(a.setCurrentIndex(e.currentIndex),!a.get("loop",!0)&&a.isIndexMax()&&a.getPlayState()&&(a.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:a.get("replaceMerge",!0)}),Le({currentIndex:a.option.currentIndex},e)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var n=t.getComponent("timeline");n&&e.playState!=null&&n.setPlayState(e.playState)})}function R1e(r){var e=r&&r.timeline;ce(e)||(e=e?[e]:[]),O(e,function(t){t&&E1e(t)})}function E1e(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),EB(r),Iu(r,"controlPosition")){var n=r.controlStyle||(r.controlStyle={});Iu(n,"position")||(n.position=r.controlPosition),n.position==="none"&&!Iu(n,"show")&&(n.show=!1,delete n.position),delete r.controlPosition}O(r.data||[],function(a){Re(a)&&!ce(a)&&(!Iu(a,"value")&&Iu(a,"name")&&(a.value=a.name),EB(a))})}function EB(r){var e=r.itemStyle||(r.itemStyle={}),t=e.emphasis||(e.emphasis={}),n=r.label||r.label||{},a=n.normal||(n.normal={}),i={normal:1,emphasis:1};O(n,function(o,s){!i[s]&&!Iu(a,s)&&(a[s]=o)}),t.label&&!Iu(n,"emphasis")&&(n.emphasis=t.label,delete t.label)}function Iu(r,e){return r.hasOwnProperty(e)}function k1e(r){r.registerComponentModel(C9),r.registerComponentView(A1e),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),L1e(r),r.registerPreprocessor(R1e)}function ZN(r,e){if(!r)return!1;for(var t=ce(r)?r:[r],n=0;n<t.length;n++)if(t[n]&&t[n][e])return!0;return!1}function C0(r){lc(r,"label",["show"])}var A0=Je(),Ki=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t.preventAutoZ=!0,t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),this._mergeOption(t,a,!1,!0)},e.prototype.isAnimationEnabled=function(){if(nt.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,n){this._mergeOption(t,n,!1,!1)},e.prototype._mergeOption=function(t,n,a,i){var o=this.mainType;a||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=A0(s)[o];if(!l||!l.data){A0(s)[o]=null;return}u?u._mergeOption(l,n,!0):(i&&C0(l),O(l.data,function(c){c instanceof Array?(C0(c[0]),C0(c[1])):C0(c)}),u=this.createMarkerModelFromSeries(l,this,n),ie(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),A0(s)[o]=u},this)},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return pr("section",{header:this.name,blocks:[pr("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,n){var a=rb.prototype.getDataParams.call(this,t,n),i=this.__hostSeries;return i&&(a.seriesId=i.id,a.seriesName=i.name,a.seriesType=i.subType),a},e.getMarkerModelFromSeries=function(t,n){return A0(t)[n]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e})(Qe);Jt(Ki,rb.prototype);var I1e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},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})(Ki);function VA(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function O1e(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function M0(r,e,t,n,a,i,o){var s=[],l=Jo(e,a),u=l?e.getCalculationInfo("stackResultDimension"):a,c=g1(e,u,r),f=e.hostModel,d=f.indicesOfNearest(t,u,c)[0];s[i]=e.get(n,d),s[o]=e.get(u,d);var v=e.get(a,d),g=$a(e.get(a,d));return g=Math.min(g,20),g>=0&&(s[o]=+s[o].toFixed(g)),[s,v]}var D0={min:He(M0,"min"),max:He(M0,"max"),average:He(M0,"average"),median:He(M0,"median")};function yg(r,e){if(e){var t=r.getData(),n=r.coordinateSystem,a=n&&n.dimensions;if(!O1e(e)&&!ce(e.coord)&&ce(a)){var i=A9(e,t,n,r);if(e=Me(e),e.type&&D0[e.type]&&i.baseAxis&&i.valueAxis){var o=Fe(a,i.baseAxis.dim),s=Fe(a,i.valueAxis.dim),l=D0[e.type](t,i.valueAxis.dim,i.baseDataDim,i.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||!ce(a)){e.coord=[];var u=r.getBaseAxis();if(u&&e.type&&D0[e.type]){var c=n.getOtherAxis(u);c&&(e.value=g1(t,t.mapDimension(c.dim),e.type))}}else for(var f=e.coord,d=0;d<2;d++)D0[f[d]]&&(f[d]=g1(t,t.mapDimension(a[d]),f[d]));return e}}function A9(r,e,t,n){var a={};return r.valueIndex!=null||r.valueDim!=null?(a.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,a.valueAxis=t.getAxis(P1e(n,a.valueDataDim)),a.baseAxis=t.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=t.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function P1e(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function xg(r,e){return r&&r.containData&&e.coord&&!VA(e)?r.containData(e.coord):!0}function z1e(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!VA(e)&&!VA(t)?r.containZone(e.coord,t.coord):!0}function M9(r,e){return r?function(t,n,a,i){var o=i<2?t.coord&&t.coord[i]:t.value;return pl(o,e[i])}:function(t,n,a,i){return pl(t.value,e[i])}}function g1(r,e,t){if(t==="average"){var n=0,a=0;return r.each(e,function(i,o){isNaN(i)||(n+=i,a++)}),n/a}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var t2=Je(),$N=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=Te()},e.prototype.render=function(t,n,a){var i=this,o=this.markerGroupMap;o.each(function(s){t2(s).keep=!1}),n.eachSeries(function(s){var l=Ki.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,n,a)}),o.each(function(s){!t2(s).keep&&i.group.remove(s.group)}),j1e(n,o,this.type)},e.prototype.markKeep=function(t){t2(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var a=this;O(t,function(i){var o=Ki.getMarkerModelFromSeries(i,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?H6(l):YM(l))})}})},e.type="marker",e})(Rt);function j1e(r,e,t){r.eachSeries(function(n){var a=Ki.getMarkerModelFromSeries(n,t),i=e.get(n.id);if(a&&i&&i.group){var o=dc(a),s=o.z,l=o.zlevel;Q1(i.group,s,l)}})}function kB(r,e,t){var n=e.coordinateSystem,a=t.getWidth(),i=t.getHeight(),o=n&&n.getArea&&n.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:a,f=u?o?o.height:0:i,d=u&&o?o.x:0,v=u&&o?o.y:0,g,x=me(l.get("x"),c)+d,y=me(l.get("y"),f)+v;if(!isNaN(x)&&!isNaN(y))g=[x,y];else if(e.getMarkerPosition)g=e.getMarkerPosition(r.getValues(r.dimensions,s));else if(n){var b=r.get(n.dimensions[0],s),w=r.get(n.dimensions[1],s);g=n.dataToPoint([b,w])}isNaN(x)||(g[0]=x),isNaN(y)||(g[1]=y),r.setItemLayout(s,g)})}var B1e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=Ki.getMarkerModelFromSeries(i,"markPoint");o&&(kB(o.getData(),i,a),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Xg),f=V1e(o,t,n);n.setData(f),kB(n.getData(),t,i),f.each(function(d){var v=f.getItemModel(d),g=v.getShallow("symbol"),x=v.getShallow("symbolSize"),y=v.getShallow("symbolRotate"),b=v.getShallow("symbolOffset"),w=v.getShallow("symbolKeepAspect");if(Ae(g)||Ae(x)||Ae(y)||Ae(b)){var T=n.getRawValue(d),C=n.getDataParams(d);Ae(g)&&(g=g(T,C)),Ae(x)&&(x=x(T,C)),Ae(y)&&(y=y(T,C)),Ae(b)&&(b=b(T,C))}var D=v.getModel("itemStyle").getItemStyle(),M=v.get("z2"),N=Ug(l,"color");D.fill||(D.fill=N),f.setItemVisual(d,{z2:Ce(M,0),symbol:g,symbolSize:x,symbolRotate:y,symbolOffset:b,symbolKeepAspect:w,style:D})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(d){d.traverse(function(v){Pe(v).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markPoint",e})($N);function V1e(r,e,t){var n;r?n=fe(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return ie(ie({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new vn(n,t),i=fe(t.get("data"),He(yg,e));r&&(i=dt(i,He(xg,r)));var o=M9(!!r,n);return a.initData(i,null,o),a}function G1e(r){r.registerComponentModel(I1e),r.registerComponentView(B1e),r.registerPreprocessor(function(e){ZN(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var H1e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},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})(Ki),N0=Je(),F1e=function(r,e,t,n){var a=r.getData(),i;if(ce(n))i=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=Hr(n.yAxis,n.xAxis);else{var u=A9(n,a,e,r);s=u.valueAxis;var c=jD(a,u.valueDataDim);l=g1(a,c,o)}var f=s.dim==="x"?0:1,d=1-f,v=Me(n),g={coord:[]};v.type=null,v.coord=[],v.coord[d]=-1/0,g.coord[d]=1/0;var x=t.get("precision");x>=0&&st(l)&&(l=+l.toFixed(Math.min(x,20))),v.coord[f]=g.coord[f]=l,i=[v,g,{type:o,valueIndex:n.valueIndex,value:l}]}else i=[]}var y=[yg(r,i[0]),yg(r,i[1]),ie({},i[2])];return y[2].type=y[2].type||null,Ye(y[2],y[0]),Ye(y[2],y[1]),y};function m1(r){return!isNaN(r)&&!isFinite(r)}function IB(r,e,t,n){var a=1-r,i=n.dimensions[r];return m1(e[a])&&m1(t[a])&&e[r]===t[r]&&n.getAxis(i).containData(e[r])}function U1e(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,n=e[1].coord;if(t&&n&&(IB(1,t,n,r)||IB(0,t,n,r)))return!0}return xg(r,e[0])&&xg(r,e[1])}function r2(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=me(o.get("x"),a.getWidth()),u=me(o.get("y"),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=i.dimensions,f=r.get(c[0],e),d=r.get(c[1],e);s=i.dataToPoint([f,d])}if(Sl(i,"cartesian2d")){var v=i.getAxis("x"),g=i.getAxis("y"),c=i.dimensions;m1(r.get(c[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[t?0:1]):m1(r.get(c[1],e))&&(s[1]=g.toGlobalCoord(g.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var Y1e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=Ki.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=N0(o).from,u=N0(o).to;l.each(function(c){r2(l,c,!0,i,a),r2(u,c,!1,i,a)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new pN);this.group.add(c.group);var f=W1e(o,t,n),d=f.from,v=f.to,g=f.line;N0(n).from=d,N0(n).to=v,n.setData(g);var x=n.get("symbol"),y=n.get("symbolSize"),b=n.get("symbolRotate"),w=n.get("symbolOffset");ce(x)||(x=[x,x]),ce(y)||(y=[y,y]),ce(b)||(b=[b,b]),ce(w)||(w=[w,w]),f.from.each(function(C){T(d,C,!0),T(v,C,!1)}),g.each(function(C){var D=g.getItemModel(C),M=D.getModel("lineStyle").getLineStyle();g.setItemLayout(C,[d.getItemLayout(C),v.getItemLayout(C)]);var N=D.get("z2");M.stroke==null&&(M.stroke=d.getItemVisual(C,"style").fill),g.setItemVisual(C,{z2:Ce(N,0),fromSymbolKeepAspect:d.getItemVisual(C,"symbolKeepAspect"),fromSymbolOffset:d.getItemVisual(C,"symbolOffset"),fromSymbolRotate:d.getItemVisual(C,"symbolRotate"),fromSymbolSize:d.getItemVisual(C,"symbolSize"),fromSymbol:d.getItemVisual(C,"symbol"),toSymbolKeepAspect:v.getItemVisual(C,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(C,"symbolOffset"),toSymbolRotate:v.getItemVisual(C,"symbolRotate"),toSymbolSize:v.getItemVisual(C,"symbolSize"),toSymbol:v.getItemVisual(C,"symbol"),style:M})}),c.updateData(g),f.line.eachItemGraphicEl(function(C){Pe(C).dataModel=n,C.traverse(function(D){Pe(D).dataModel=n})});function T(C,D,M){var N=C.getItemModel(D);r2(C,D,M,t,i);var R=N.getModel("itemStyle").getItemStyle();R.fill==null&&(R.fill=Ug(l,"color")),C.setItemVisual(D,{symbolKeepAspect:N.get("symbolKeepAspect"),symbolOffset:Ce(N.get("symbolOffset",!0),w[M?0:1]),symbolRotate:Ce(N.get("symbolRotate",!0),b[M?0:1]),symbolSize:Ce(N.get("symbolSize"),y[M?0:1]),symbol:Ce(N.get("symbol",!0),x[M?0:1]),style:R})}this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markLine",e})($N);function W1e(r,e,t){var n;r?n=fe(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return ie(ie({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new vn(n,t),i=new vn(n,t),o=new vn([],t),s=fe(t.get("data"),He(F1e,e,r,t));r&&(s=dt(s,He(U1e,r)));var l=M9(!!r,n);return a.initData(fe(s,function(u){return u[0]}),null,l),i.initData(fe(s,function(u){return u[1]}),null,l),o.initData(fe(s,function(u){return u[2]})),o.hasItemOption=!0,{from:a,to:i,line:o}}function X1e(r){r.registerComponentModel(H1e),r.registerComponentView(Y1e),r.registerPreprocessor(function(e){ZN(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var q1e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},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})(Ki),L0=Je(),Z1e=function(r,e,t,n){var a=n[0],i=n[1];if(!(!a||!i)){var o=yg(r,a),s=yg(r,i),l=o.coord,u=s.coord;l[0]=Hr(l[0],-1/0),l[1]=Hr(l[1],-1/0),u[0]=Hr(u[0],1/0),u[1]=Hr(u[1],1/0);var c=O1([{},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 y1(r){return!isNaN(r)&&!isFinite(r)}function OB(r,e,t,n){var a=1-r;return y1(e[a])&&y1(t[a])}function $1e(r,e){var t=e.coord[0],n=e.coord[1],a={coord:t,x:e.x0,y:e.y0},i={coord:n,x:e.x1,y:e.y1};return Sl(r,"cartesian2d")?t&&n&&(OB(1,t,n)||OB(0,t,n))?!0:z1e(r,a,i):xg(r,a)||xg(r,i)}function PB(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=me(o.get(t[0]),a.getWidth()),u=me(o.get(t[1]),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),d=i.clampData(c),v=i.clampData(f),g=[];t[0]==="x0"?g[0]=d[0]>v[0]?f[0]:c[0]:g[0]=d[0]>v[0]?c[0]:f[0],t[1]==="y0"?g[1]=d[1]>v[1]?f[1]:c[1]:g[1]=d[1]>v[1]?c[1]:f[1],s=n.getMarkerPosition(g,t,!0)}else{var x=r.get(t[0],e),y=r.get(t[1],e),b=[x,y];i.clampData&&i.clampData(b,b),s=i.dataToPoint(b,!0)}if(Sl(i,"cartesian2d")){var w=i.getAxis("x"),T=i.getAxis("y"),x=r.get(t[0],e),y=r.get(t[1],e);y1(x)?s[0]=w.toGlobalCoord(w.getExtent()[t[0]==="x0"?0:1]):y1(y)&&(s[1]=T.toGlobalCoord(T.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var zB=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],K1e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=Ki.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=fe(zB,function(f){return PB(s,l,f,i,a)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new De});this.group.add(c.group),this.markKeep(c);var f=Q1e(o,t,n);n.setData(f),f.each(function(d){var v=fe(zB,function(k){return PB(f,d,k,t,i)}),g=o.getAxis("x").scale,x=o.getAxis("y").scale,y=g.getExtent(),b=x.getExtent(),w=[g.parse(f.get("x0",d)),g.parse(f.get("x1",d))],T=[x.parse(f.get("y0",d)),x.parse(f.get("y1",d))];ra(w),ra(T);var C=!(y[0]>w[1]||y[1]<w[0]||b[0]>T[1]||b[1]<T[0]),D=!C;f.setItemLayout(d,{points:v,allClipped:D});var M=f.getItemModel(d),N=M.getModel("itemStyle").getItemStyle(),R=M.get("z2"),E=Ug(l,"color");N.fill||(N.fill=E,ye(N.fill)&&(N.fill=Wp(N.fill,.4))),N.stroke||(N.stroke=E),f.setItemVisual(d,"style",N),f.setItemVisual(d,"z2",Ce(R,0))}),f.diff(L0(c).data).add(function(d){var v=f.getItemLayout(d),g=f.getItemVisual(d,"z2");if(!v.allClipped){var x=new nn({z2:Ce(g,0),shape:{points:v.points}});f.setItemGraphicEl(d,x),c.group.add(x)}}).update(function(d,v){var g=L0(c).data.getItemGraphicEl(v),x=f.getItemLayout(d),y=f.getItemVisual(d,"z2");x.allClipped?g&&c.group.remove(g):(g?lt(g,{z2:Ce(y,0),shape:{points:x.points}},n,d):g=new nn({shape:{points:x.points}}),f.setItemGraphicEl(d,g),c.group.add(g))}).remove(function(d){var v=L0(c).data.getItemGraphicEl(d);c.group.remove(v)}).execute(),f.eachItemGraphicEl(function(d,v){var g=f.getItemModel(v),x=f.getItemVisual(v,"style");d.useStyle(f.getItemVisual(v,"style")),Lr(d,Sr(g),{labelFetcher:n,labelDataIndex:v,defaultText:f.getName(v)||"",inheritColor:ye(x.fill)?Wp(x.fill,1):ee.color.neutral99}),_r(d,g),Ut(d,null,null,g.get(["emphasis","disabled"])),Pe(d).dataModel=n}),L0(c).data=f,c.group.silent=n.get("silent")||t.get("silent")},e.type="markArea",e})($N);function Q1e(r,e,t){var n,a,i=["x0","y0","x1","y1"];if(r){var o=fe(r&&r.dimensions,function(u){var c=e.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return ie(ie({},f),{name:u,ordinalMeta:null})});a=fe(i,function(u,c){return{name:u,type:o[c%2].type}}),n=new vn(a,t)}else a=[{name:"value",type:"float"}],n=new vn(a,t);var s=fe(t.get("data"),He(Z1e,e,r,t));r&&(s=dt(s,He($1e,r)));var l=r?function(u,c,f,d){var v=u.coord[Math.floor(d/2)][d%2];return pl(v,a[d])}:function(u,c,f,d){return pl(u.value,a[d])};return n.initData(s,null,l),n.hasItemOption=!0,n}function J1e(r){r.registerComponentModel(q1e),r.registerComponentView(K1e),r.registerPreprocessor(function(e){ZN(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var ebe=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},GA=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},e.prototype._updateSelector=function(t){var n=t.selector,a=this.ecModel;n===!0&&(n=t.selector=["all","inverse"]),ce(n)&&O(n,function(i,o){ye(i)&&(i={type:i}),n[o]=Ye(i,ebe(a,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var n=!1,a=0;a<t.length;a++){var i=t[a].get("name");if(this.isSelected(i)){this.select(i),n=!0;break}}!n&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var n=[],a=[];t.eachRawSeries(function(l){var u=l.name;a.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,d=f.getAllNames();t.isSeriesFiltered(l)||(a=a.concat(d)),d.length?n=n.concat(d):c=!0}else c=!0;c&&PM(l)&&n.push(l.name)}),this._availableNames=a;var i=this.get("data")||n,o=Te(),s=fe(i,function(l){return(ye(l)||st(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new et(l,this,this.ecModel))},this);this._data=dt(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var n=this.option.selected,a=this.get("selectedMode");if(a==="single"){var i=this._data;O(i,function(o){n[o.get("name")]=!1})}n[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var n=this.option.selected;n.hasOwnProperty(t)||(n[t]=!0),this[n[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,n=this.option.selected;O(t,function(a){n[a.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,n=this.option.selected;O(t,function(a){var i=a.get("name",!0);n.hasOwnProperty(i)||(n[i]=!0),n[i]=!n[i]})},e.prototype.isSelected=function(t){var n=this.option.selected;return!(n.hasOwnProperty(t)&&!n[t])&&Fe(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:ee.size.m,align:"auto",backgroundColor:ee.color.transparent,borderColor:ee.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:ee.color.disabled,inactiveBorderColor:ee.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:ee.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:ee.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:ee.color.tertiary,borderWidth:1,borderColor:ee.color.border},emphasis:{selectorLabel:{show:!0,color:ee.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e})(Qe),jf=He,HA=O,R0=De,D9=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new R0),this.group.add(this._selectorGroup=new R0),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,n,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,n,a,l,s,u);var c=wr(t,a).refContainer,f=t.getBoxLayoutParams(),d=t.get("padding"),v=Ht(f,c,d),g=this.layoutInner(t,o,v,i,l,u),x=Ht(Le({width:g.width,height:g.height},f),c,d);this.group.x=x.x-g.x,this.group.y=x.y-g.y,this.group.markRedraw(),this.group.add(this._backgroundEl=g9(g,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this.getContentGroup(),c=Te(),f=n.get("selectedMode"),d=n.get("triggerEvent"),v=[];a.eachRawSeries(function(g){!g.get("legendHoverLink")&&v.push(g.id)}),HA(n.getData(),function(g,x){var y=this,b=g.get("name");if(!this.newlineDisabled&&(b===""||b===`
291
- `)){var w=new R0;w.newline=!0,u.add(w);return}var T=a.getSeriesByName(b)[0];if(!c.get(b))if(T){var C=T.getData(),D=C.getVisual("legendLineStyle")||{},M=C.getVisual("legendIcon"),N=C.getVisual("style"),R=this._createItem(T,b,x,g,n,t,D,N,M,f,i);R.on("click",jf(jB,b,null,i,v)).on("mouseover",jf(FA,T.name,null,i,v)).on("mouseout",jf(UA,T.name,null,i,v)),a.ssr&&R.eachChild(function(E){var k=Pe(E);k.seriesIndex=T.seriesIndex,k.dataIndex=x,k.ssrType="legend"}),d&&R.eachChild(function(E){y.packEventData(E,n,T,x,b)}),c.set(b,!0)}else a.eachRawSeries(function(E){var k=this;if(!c.get(b)&&E.legendVisualProvider){var I=E.legendVisualProvider;if(!I.containName(b))return;var z=I.indexOfName(b),P=I.getItemVisual(z,"style"),G=I.getItemVisual(z,"legendIcon"),U=dn(P.fill);U&&U[3]===0&&(U[3]=.2,P=ie(ie({},P),{fill:Ra(U,"rgba")}));var B=this._createItem(E,b,x,g,n,t,{},P,G,f,i);B.on("click",jf(jB,null,b,i,v)).on("mouseover",jf(FA,null,b,i,v)).on("mouseout",jf(UA,null,b,i,v)),a.ssr&&B.eachChild(function(F){var H=Pe(F);H.seriesIndex=E.seriesIndex,H.dataIndex=x,H.ssrType="legend"}),d&&B.eachChild(function(F){k.packEventData(F,n,E,x,b)}),c.set(b,!0)}},this)},this),o&&this._createSelector(o,n,i,s,l)},e.prototype.packEventData=function(t,n,a,i,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:i,value:o,seriesIndex:a.seriesIndex};Pe(t).eventData=s},e.prototype._createSelector=function(t,n,a,i,o){var s=this.getSelectorGroup();HA(t,function(u){var c=u.type,f=new ot({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var d=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);Lr(f,{normal:d,emphasis:v},{defaultText:u.title}),hl(f)})},e.prototype._createItem=function(t,n,a,i,o,s,l,u,c,f,d){var v=t.visualDrawType,g=o.get("itemWidth"),x=o.get("itemHeight"),y=o.isSelected(n),b=i.get("symbolRotate"),w=i.get("symbolKeepAspect"),T=i.get("icon");c=T||c||"roundRect";var C=tbe(c,i,l,u,v,y,d),D=new R0,M=i.getModel("textStyle");if(Ae(t.getLegendIcon)&&(!T||T==="inherit"))D.add(t.getLegendIcon({itemWidth:g,itemHeight:x,icon:c,iconRotate:b,itemStyle:C.itemStyle,lineStyle:C.lineStyle,symbolKeepAspect:w}));else{var N=T==="inherit"&&t.getData().getVisual("symbol")?b==="inherit"?t.getData().getVisual("symbolRotate"):b:0;D.add(rbe({itemWidth:g,itemHeight:x,icon:c,iconRotate:N,itemStyle:C.itemStyle,symbolKeepAspect:w}))}var R=s==="left"?g+5:-5,E=s,k=o.get("formatter"),I=n;ye(k)&&k?I=k.replace("{name}",n??""):Ae(k)&&(I=k(n));var z=y?M.getTextColor():i.get("inactiveColor");D.add(new ot({style:Nt(M,{text:I,x:R,y:x/2,fill:z,align:E,verticalAlign:"middle"},{inheritColor:z})}));var P=new qe({shape:D.getBoundingRect(),style:{fill:"transparent"}}),G=i.getModel("tooltip");return G.get("show")&&is({el:P,componentModel:o,itemName:n,itemTooltipOption:G.option}),D.add(P),D.eachChild(function(U){U.silent=!0}),P.silent=!f,this.getContentGroup().add(D),hl(D),D.__legendDataIndex=a,D},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();tc(t.get("orient"),l,t.get("itemGap"),a.width,a.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){tc("horizontal",u,t.get("selectorItemGap",!0));var d=u.getBoundingRect(),v=[-d.x,-d.y],g=t.get("selectorButtonGap",!0),x=t.getOrient().index,y=x===0?"width":"height",b=x===0?"height":"width",w=x===0?"y":"x";s==="end"?v[x]+=c[y]+g:f[x]+=d[y]+g,v[1-x]+=c[b]/2-d[b]/2,u.x=v[0],u.y=v[1],l.x=f[0],l.y=f[1];var T={x:0,y:0};return T[y]=c[y]+g+d[y],T[b]=Math.max(c[b],d[b]),T[w]=Math.min(0,d[w]+v[1-x]),T}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e})(Rt);function tbe(r,e,t,n,a,i,o){function s(y,b){y.lineWidth==="auto"&&(y.lineWidth=b.lineWidth>0?2:0),HA(y,function(w,T){y[T]==="inherit"&&(y[T]=b[T])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:kh(f,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?n:t).opacity),s(u,n);var d=e.getModel("lineStyle"),v=d.getLineStyle();if(s(v,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!i){var g=e.get("inactiveBorderWidth"),x=u[c];u.lineWidth=g==="auto"?n.lineWidth>0&&x?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),v.stroke=d.get("inactiveColor"),v.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function rbe(r){var e=r.icon||"roundRect",t=ur(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill=ee.color.neutral00,t.style.lineWidth=2),t}function jB(r,e,t,n){UA(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r??e}),FA(r,e,t,n)}function N9(r){for(var e=r.getZr().storage.getDisplayList(),t,n=0,a=e.length;n<a&&!(t=e[n].states.emphasis);)n++;return t&&t.hoverLayer}function FA(r,e,t,n){N9(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:n})}function UA(r,e,t,n){N9(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:n})}function nbe(r){var e=r.findComponents({mainType:"legend"});e&&e.length&&r.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})}function Xv(r,e,t){var n=r==="allSelect"||r==="inverseSelect",a={},i=[];t.eachComponent({mainType:"legend",query:e},function(s){n?s[r]():s[r](e.name),BB(s,a),i.push(s.componentIndex)});var o={};return t.eachComponent("legend",function(s){O(a,function(l,u){s[l?"select":"unSelect"](u)}),BB(s,o)}),n?{selected:o,legendIndex:i}:{name:e.name,selected:o}}function BB(r,e){var t=e||{};return O(r.getData(),function(n){var a=n.get("name");if(!(a===`
292
- `||a==="")){var i=r.isSelected(a);_e(t,a)?t[a]=t[a]&&i:t[a]=i}}),t}function abe(r){r.registerAction("legendToggleSelect","legendselectchanged",He(Xv,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",He(Xv,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",He(Xv,"inverseSelect")),r.registerAction("legendSelect","legendselected",He(Xv,"select")),r.registerAction("legendUnSelect","legendunselected",He(Xv,"unSelect"))}function L9(r){r.registerComponentModel(GA),r.registerComponentView(D9),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,nbe),r.registerSubTypeDefaulter("legend",function(){return"plain"}),abe(r)}var ibe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,n,a){var i=Sc(t);r.prototype.init.call(this,t,n,a),VB(this,t,i)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),VB(this,this.option,t)},e.type="legend.scroll",e.defaultOption=Ll(GA.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:ee.color.accent50,pageIconInactiveColor:ee.color.accent10,pageIconSize:15,pageTextStyle:{color:ee.color.tertiary},animationDurationUpdate:800}),e})(GA);function VB(r,e,t){var n=r.getOrient(),a=[1,1];a[n.index]=0,Zi(e,t,{type:"box",ignoreSize:!!a})}var GB=De,n2=["width","height"],a2=["x","y"],obe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new GB),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new GB)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this;r.prototype.renderInner.call(this,t,n,a,i,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),d=ce(f)?f:[f,f];g("pagePrev",0);var v=n.getModel("pageTextStyle");c.add(new ot({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),g("pageNext",1);function g(x,y){var b=x+"DataIndex",w=Qh(n.get("pageIcons",!0)[n.getOrient().name][y],{onclick:xe(u._pageGo,u,b,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});w.name=x,c.add(w)}},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,c=n2[u],f=a2[u],d=n2[1-u],v=a2[1-u];o&&tc("horizontal",l,t.get("selectorItemGap",!0));var g=t.get("selectorButtonGap",!0),x=l.getBoundingRect(),y=[-x.x,-x.y],b=Me(a);o&&(b[c]=a[c]-x[c]-g);var w=this._layoutContentAndController(t,i,b,u,c,d,v,f);if(o){if(s==="end")y[u]+=w[c]+g;else{var T=x[c]+g;y[u]-=T,w[f]-=T}w[c]+=x[c]+g,y[1-u]+=w[v]+w[d]/2-x[d]/2,w[d]=Math.max(w[d],x[d]),w[v]=Math.min(w[v],x[v]+y[1-u]),l.x=y[0],l.y=y[1],l.markRedraw()}return w},e.prototype._layoutContentAndController=function(t,n,a,i,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,d=this._controllerGroup;tc(t.get("orient"),c,t.get("itemGap"),i?a.width:null,i?null:a.height),tc("horizontal",d,t.get("pageButtonItemGap",!0));var v=c.getBoundingRect(),g=d.getBoundingRect(),x=this._showController=v[o]>a[o],y=[-v.x,-v.y];n||(y[i]=c[u]);var b=[0,0],w=[-g.x,-g.y],T=Ce(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(x){var C=t.get("pageButtonPosition",!0);C==="end"?w[i]+=a[o]-g[o]:b[i]+=g[o]+T}w[1-i]+=v[s]/2-g[s]/2,c.setPosition(y),f.setPosition(b),d.setPosition(w);var D={x:0,y:0};if(D[o]=x?a[o]:v[o],D[s]=Math.max(v[s],g[s]),D[l]=Math.min(0,g[l]+w[1-i]),f.__rectSize=a[o],x){var M={x:0,y:0};M[o]=Math.max(a[o]-g[o]-T,0),M[s]=D[s],f.setClipPath(new qe({shape:M})),f.__rectSize=M[o]}else d.eachChild(function(R){R.attr({invisible:!0,silent:!0})});var N=this._getPageInfo(t);return N.pageIndex!=null&&lt(c,{x:N.contentPosition[0],y:N.contentPosition[1]},x?t:null),this._updatePageInfoView(t,N),D},e.prototype._pageGo=function(t,n,a){var i=this._getPageInfo(n)[t];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var a=this._controllerGroup;O(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",d=n[f]!=null,v=a.childOfName(c);v&&(v.setStyle("fill",d?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),v.cursor=d?"pointer":"default")});var i=a.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",ye(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=n2[o],l=a2[o],u=this._findTargetItemIndex(n),c=a.children(),f=c[u],d=c.length,v=d?1:0,g={contentPosition:[a.x,a.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return g;var x=C(f);g.contentPosition[o]=-x.s;for(var y=u+1,b=x,w=x,T=null;y<=d;++y)T=C(c[y]),(!T&&w.e>b.s+i||T&&!D(T,b.s))&&(w.i>b.i?b=w:b=T,b&&(g.pageNextDataIndex==null&&(g.pageNextDataIndex=b.i),++g.pageCount)),w=T;for(var y=u-1,b=x,w=x,T=null;y>=-1;--y)T=C(c[y]),(!T||!D(w,T.s))&&b.i<w.i&&(w=b,g.pagePrevDataIndex==null&&(g.pagePrevDataIndex=b.i),++g.pageCount,++g.pageIndex),b=T;return g;function C(M){if(M){var N=M.getBoundingRect(),R=N[l]+M[l];return{s:R,e:R+N[s],i:M.__legendDataIndex}}}function D(M,N){return M.e>=N&&M.s<=N+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(n=s)}),n??i},e.type="legend.scroll",e})(D9);function sbe(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(a){a.setScrollDataIndex(n)})})}function lbe(r){We(L9),r.registerComponentModel(ibe),r.registerComponentView(obe),sbe(r)}function ube(r){We(L9),We(lbe)}var cbe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Ll(mg.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e})(mg),KN=Je();function fbe(r,e,t){KN(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function hbe(r,e){for(var t=KN(r).coordSysRecordMap,n=t.keys(),a=0;a<n.length;a++){var i=n[a],o=t.get(i),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||R9(t,o))}}}function R9(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function dbe(r,e){var t={model:e,containsPoint:He(pbe,e),dispatchAction:He(vbe,r),dataZoomInfoMap:null,controller:null},n=t.controller=new Ac(r.getZr());return O(["pan","zoom","scrollMove"],function(a){n.on(a,function(i){var o=[];t.dataZoomInfoMap.each(function(s){if(i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[a],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,i);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function vbe(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function pbe(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function gbe(r,e,t){var n,a="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return r.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;i[a+u]>i[a+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function mbe(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=KN(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=Te());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=d9(i);O(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,dbe(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=Te());c.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),a.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){R9(a,i);return}var c=gbe(l,i,t);o.enable(c.controlType,c.opt),ad(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var ybe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,a){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),fbe(a,t,{pan:xe(i2.pan,this),zoom:xe(i2.zoom,this),scrollMove:xe(i2.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){hbe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e})(FN),i2={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(o){var s=o2[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/n.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(wl(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:HB(function(r,e,t,n,a,i){var o=o2[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:HB(function(r,e,t,n,a,i){var o=o2[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function HB(r){return function(e,t,n,a){var i=this.range,o=i.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,n,a);if(wl(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var o2={grid:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,n,a){var i=t.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function E9(r){UN(r),r.registerComponentModel(cbe),r.registerComponentView(ybe),mbe(r)}var xbe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Ll(mg.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:ee.color.accent10,borderRadius:0,backgroundColor:ee.color.transparent,dataBackground:{lineStyle:{color:ee.color.accent30,width:.5},areaStyle:{color:ee.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:ee.color.accent40,width:.5},areaStyle:{color:ee.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:ee.color.neutral00,borderColor:ee.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:ee.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:ee.color.tertiary},brushSelect:!0,brushStyle:{color:ee.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:ee.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e})(mg),qv=qe,bbe=1,s2=30,_be=7,Zv="horizontal",FB="vertical",Sbe=5,wbe=["line","bar","candlestick","scatter"],Tbe={easing:"cubicOut",duration:100,delay:0},Cbe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=xe(this._onBrush,this),this._onBrushEnd=xe(this._onBrushEnd,this)},e.prototype.render=function(t,n,a,i){if(r.prototype.render.apply(this,arguments),ad(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){rg(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new De;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,a=t.get("brushSelect"),i=a?_be:0,o=wr(t,n).refContainer,s=this._findCoordRect(),l=t.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Zv?{right:o.width-s.x-s.width,top:o.height-s2-l-i,width:s.width,height:s2}:{right:l,top:s.y,width:s2,height:s.height},c=Sc(t.option);O(["right","top","width","height"],function(d){c[d]==="ph"&&(c[d]=u[d])});var f=Ht(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===FB&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,a=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===Zv&&!o?{scaleY:l?1:-1,scaleX:1}:a===Zv&&o?{scaleY:l?1:-1,scaleX:-1}:a===FB&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,a=this._displayables.sliderGroup,i=t.get("brushSelect");a.add(new qv({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new qv({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:xe(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),a.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,a=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var f=o.getDataExtent(t.thisDim),d=o.getDataExtent(l),v=(d[1]-d[0])*.3;d=[d[0]-v,d[1]+v];var g=[0,n[1]],x=[0,n[0]],y=[[n[0],0],[0,0]],b=[],w=x[1]/Math.max(1,o.count()-1),T=n[0]/(f[1]-f[0]),C=t.thisAxis.type==="time",D=-w,M=Math.round(o.count()/n[0]),N;o.each([t.thisDim,l],function(z,P,G){if(M>0&&G%M){C||(D+=w);return}D=C?(+z-f[0])*T:D+w;var U=P==null||isNaN(P)||P==="",B=U?0:pt(P,d,g,!0);U&&!N&&G?(y.push([y[y.length-1][0],0]),b.push([b[b.length-1][0],0])):!U&&N&&(y.push([D,0]),b.push([D,0])),U||(y.push([D,B]),b.push([D,B])),N=U}),u=this._shadowPolygonPts=y,c=this._shadowPolylinePts=b}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var R=this.dataZoomModel;function E(z){var P=R.getModel(z?"selectedDataBackground":"dataBackground"),G=new De,U=new nn({shape:{points:u},segmentIgnoreThreshold:1,style:P.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),B=new Fr({shape:{points:c},segmentIgnoreThreshold:1,style:P.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return G.add(U),G.add(B),G}for(var k=0;k<3;k++){var I=E(k===1);this._displayables.sliderGroup.add(I),this._displayables.dataShadowSegs.push(I)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var a,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();O(l,function(u){if(!a&&!(n!==!0&&Fe(wbe,u.get("type"))<0)){var c=i.getComponent(ol(o),s).axis,f=Abe(o),d,v=u.coordinateSystem;f!=null&&v.getOtherAxis&&(d=v.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var g=u.getData().mapDimension(o);a={thisAxis:c,series:u,thisDim:g,otherDim:f,otherAxisInverse:d}}},this)},this),a}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,a=n.handles=[null,null],i=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),d=n.filler=new qv({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(d),o.add(new qv({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:bbe,fill:ee.color.transparent}})),O([0,1],function(T){var C=l.get("handleIcon");!jx[C]&&C.indexOf("path://")<0&&C.indexOf("image://")<0&&(C="path://"+C);var D=ur(C,-1,0,2,2,null,!0);D.attr({cursor:Mbe(this._orient),draggable:!0,drift:xe(this._onDragMove,this,T),ondragend:xe(this._onDragEnd,this),onmouseover:xe(this._showDataInfo,this,!0),onmouseout:xe(this._showDataInfo,this,!1),z2:5});var M=D.getBoundingRect(),N=l.get("handleSize");this._handleHeight=me(N,this._size[1]),this._handleWidth=M.width/M.height*this._handleHeight,D.setStyle(l.getModel("handleStyle").getItemStyle()),D.style.strokeNoScale=!0,D.rectHover=!0,D.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),hl(D);var R=l.get("handleColor");R!=null&&(D.style.fill=R),o.add(a[T]=D);var E=l.getModel("textStyle"),k=l.get("handleLabel")||{},I=k.show||!1;t.add(i[T]=new ot({silent:!0,invisible:!I,style:Nt(E,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:E.getTextColor(),font:E.getFont()}),z2:10}))},this);var v=d;if(f){var g=me(l.get("moveHandleSize"),s[1]),x=n.moveHandle=new qe({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:g}}),y=g*.8,b=n.moveHandleIcon=ur(l.get("moveHandleIcon"),-y/2,-y/2,y,y,ee.color.neutral00,!0);b.silent=!0,b.y=s[1]+g/2-.5,x.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var w=Math.min(s[1]/2,Math.max(g,10));v=n.moveZone=new qe({invisible:!0,shape:{y:s[1]-w,height:g+w}}),v.on("mouseover",function(){u.enterEmphasis(x)}).on("mouseout",function(){u.leaveEmphasis(x)}),o.add(x),o.add(b),o.add(v)}v.attr({draggable:!0,cursor:"default",drift:xe(this._onDragMove,this,"all"),ondragstart:xe(this._showDataInfo,this,!0),ondragend:xe(this._onDragEnd,this),onmouseover:xe(this._showDataInfo,this,!0),onmouseout:xe(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[pt(t[0],[0,100],n,!0),pt(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var a=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];wl(n,i,o,a.get("zoomLock")?"all":t,s.minSpan!=null?pt(s.minSpan,l,o,!0):null,s.maxSpan!=null?pt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=ra([pt(i[0],o,l,!0),pt(i[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,a=this._handleEnds,i=ra(a.slice()),o=this._size;O([0,1],function(v){var g=n.handles[v],x=this._handleHeight;g.attr({scaleX:x/2,scaleY:x/2,x:a[v]+(v?-1:1),y:o[1]/2-x/2})},this),n.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};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,i[0],i[1],o[0]],c=0;c<l.length;c++){var f=l[c],d=f.getClipPath();d||(d=new qe,f.setClipPath(d)),d.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var n=this.dataZoomModel,a=this._displayables,i=a.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var d=ra(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(g){var x=dl(a.handles[g].parent,this.group),y=K1(g===0?"right":"left",x),b=this._handleWidth/2+Sbe,w=ei([d[g]+(g===0?-b:b),this._size[1]/2],x);i[g].setStyle({x:w[0],y:w[1],verticalAlign:o===Zv?"middle":y,align:o===Zv?y:"center",text:s[g]})}},e.prototype._formatLabel=function(t,n){var a=this.dataZoomModel,i=a.get("labelFormatter"),o=a.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=t==null||isNaN(t)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return Ae(i)?i(t,s):ye(i)?i.replace("{value}",s):s},e.prototype._showDataInfo=function(t){var n=this.dataZoomModel.get("handleLabel")||{},a=n.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=i.get("show")||!1,s=t||this._dragging?o:a,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},e.prototype._onDragMove=function(t,n,a,i){this._dragging=!0,Zo(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=ei([n,a],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var n=this._size,a=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(a[0]<0||a[0]>n[0]||a[1]<0||a[1]>n[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,a=t.offsetY;this._brushStart=new ke(n,a),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var a=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[a.x,a.x+a.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();wl(0,l,o,0,u.minSpan!=null?pt(u.minSpan,s,o,!0):null,u.maxSpan!=null?pt(u.maxSpan,s,o,!0):null),this._range=ra([pt(l[0],o,s,!0),pt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Zo(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var a=this._displayables,i=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new qv({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?Tbe:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=d9(this.dataZoomModel).infoList;if(!t&&n.length){var a=n[0].model.coordinateSystem;t=a.getRect&&a.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e})(FN);function Abe(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function Mbe(r){return r==="vertical"?"ns-resize":"ew-resize"}function k9(r){r.registerComponentModel(xbe),r.registerComponentView(Cbe),UN(r)}function Dbe(r){We(E9),We(k9)}var I9={get:function(r,e,t){var n=Me((Nbe[r]||{})[e]);return t&&ce(n)?n[n.length-1]:n}},Nbe={color:{active:["#006edd","#e0ffff"],inactive:[ee.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]}},UB=Nr.mapVisual,Lbe=Nr.eachVisual,Rbe=ce,YB=O,Ebe=ra,kbe=pt,x1=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&w9(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=xe(t,this),this.controllerVisuals=jA(this.option.controller,n,t),this.targetVisuals=jA(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesId,n=this.option.seriesIndex;n==null&&t==null&&(n="all");var a=Xh(this.ecModel,"series",{index:n,id:t},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return fe(a,function(i){return i.componentIndex})},e.prototype.eachTargetSeries=function(t,n){O(this.getTargetSeriesIndices(),function(a){var i=this.ecModel.getSeriesByIndex(a);i&&t.call(n,i)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(a){a===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,a){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;a=a||["<",">"],ce(t)&&(t=t.slice(),u=!0);var c=n?t:u?[f(t[0]),f(t[1])]:f(t);if(ye(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(Ae(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+c[1]:t[1]===s[1]?a[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(d){return d===s[0]?"min":d===s[1]?"max":(+d).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=Ebe([t.min,t.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(n!=null)return t.getDimensionIndex(n);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var o=a[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,n=this.option,a={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});Ye(i,a),Ye(o,a);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function l(f){Rbe(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,d,v){var g=f[d],x=f[v];g&&!x&&(x=f[v]={},YB(g,function(y,b){if(Nr.isValidType(b)){var w=I9.get(b,"inactive",s);w!=null&&(x[b]=w,b==="color"&&!x.hasOwnProperty("opacity")&&!x.hasOwnProperty("colorAlpha")&&(x.opacity=[0,0]))}}))}function c(f){var d=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,v=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,g=this.get("inactiveColor"),x=this.getItemSymbol(),y=x||"roundRect";YB(this.stateList,function(b){var w=this.itemSize,T=f[b];T||(T=f[b]={color:s?g:[g]}),T.symbol==null&&(T.symbol=d&&Me(d)||(s?y:[y])),T.symbolSize==null&&(T.symbolSize=v&&Me(v)||(s?w[0]:[w[0],w[0]])),T.symbol=UB(T.symbol,function(M){return M==="none"?y:M});var C=T.symbolSize;if(C!=null){var D=-1/0;Lbe(C,function(M){M>D&&(D=M)}),T.symbolSize=UB(C,function(M){return kbe(M,[0,D],[0,w[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:ee.color.transparent,borderColor:ee.color.borderTint,contentColor:ee.color.theme[0],inactiveColor:ee.color.disabled,borderWidth:0,padding:ee.size.m,textGap:10,precision:0,textStyle:{color:ee.color.secondary}},e})(Qe),WB=[20,140],Ibe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=WB[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=WB[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):ce(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),O(this.stateList,function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),n=ra((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]<t[0]&&(n[0]=t[0]),n[1]<t[0]&&(n[1]=t[0]),n},e.prototype.getValueState=function(t){var n=this.option.range,a=this.getExtent(),i=Ce(this.option.unboundedRange,!0);return(i&&n[0]<=a[0]||n[0]<=t)&&(i&&n[1]>=a[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(a){var i=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),n.push({seriesId:a.id,dataIndex:i})},this),n},e.prototype.getVisualMeta=function(t){var n=XB(this,"outOfRange",this.getExtent()),a=XB(this,"inRange",this.option.range.slice()),i=[];function o(v,g){i.push({value:v,color:t(v,g)})}for(var s=0,l=0,u=a.length,c=n.length;l<c&&(!a.length||n[l]<=a[0]);l++)n[l]<a[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&i.length&&o(a[s],"outOfRange"),o(a[s],"inRange");for(var f=1;l<c;l++)(!a.length||a[a.length-1]<n[l])&&(f&&(i.length&&o(i[i.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var d=i.length;return{stops:i,outerColors:[d?i[0].color:"transparent",d?i[d-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=Ll(x1.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:ee.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:ee.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:ee.color.shadow}}),e})(x1);function XB(r,e,t){if(t[0]===t[1])return t.slice();for(var n=200,a=(t[1]-t[0])/n,i=t[0],o=[],s=0;s<=n&&i<t[1];s++)o.push(i),i+=a;return o.push(t[1]),o}var O9=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n},e.prototype.render=function(t,n,a,i){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,n,a,i)},e.prototype.renderBackground=function(t){var n=this.visualMapModel,a=td(n.get("padding")||0),i=t.getBoundingRect();t.add(new qe({z2:-1,silent:!0,shape:{x:i.x-a[3],y:i.y-a[0],width:i.width+a[3]+a[1],height:i.height+a[0]+a[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,n,a){a=a||{};var i=a.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(v){return s[v]}function c(v,g){s[v]=g}var f=o.controllerVisuals[i||o.getValueState(t)],d=Nr.prepareVisualTypes(f);return O(d,function(v){var g=f[v];a.convertOpacityToAlpha&&v==="opacity"&&(v="colorAlpha",g=f.__alphaForOpacity),Nr.dependsOn(v,n)&&g&&g.applyVisual(t,u,c)}),s[n]},e.prototype.positionGroup=function(t){var n=this.visualMapModel,a=this.api,i=wr(n,a).refContainer;eb(t,n.getBoxLayoutParams(),i)},e.prototype.doRender=function(t,n,a,i){},e.type="visualMap",e})(Rt),qB=[["left","right","width"],["top","bottom","height"]];function P9(r,e,t){var n=r.option,a=n.align;if(a!=null&&a!=="auto")return a;for(var i={width:e.getWidth(),height:e.getHeight()},o=n.orient==="horizontal"?1:0,s=qB[o],l=[0,null,10],u={},c=0;c<3;c++)u[qB[1-o][c]]=l[c],u[s[c]]=c===2?t[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],d=Ht(u,i,n.padding);return s[(d.margin[f[2]]||0)+d[f[0]]+d[f[1]]*.5<i[f[1]]*.5?0:1]}function ax(r,e){return O(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var wi=pt,Obe=O,ZB=Math.min,l2=Math.max,Pbe=12,zbe=6,jbe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,n){r.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=xe(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=xe(this._hideIndicator,this)},e.prototype.doRender=function(t,n,a,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,n=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(n);var a=t.get("text");this._renderEndsText(n,a,0),this._renderEndsText(n,a,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},e.prototype._renderEndsText=function(t,n,a){if(n){var i=n[1-a];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,a===0?-s:l[1]+s],u),f=this._applyTransform(a===0?"bottom":"top",u),d=this._orient,v=this.visualMapModel.textStyleModel;this.group.add(new ot({style:Nt(v,{x:c[0],y:c[1],verticalAlign:v.get("verticalAlign")||(d==="horizontal"?"middle":f),align:v.get("align")||(d==="horizontal"?f:"center"),text:i})}))}},e.prototype._renderBar=function(t){var n=this.visualMapModel,a=this._shapes,i=n.itemSize,o=this._orient,s=this._useHandle,l=P9(n,this.api,i),u=a.mainGroup=this._createBarGroup(l),c=new De;u.add(c),c.add(a.outOfRange=$B()),c.add(a.inRange=$B(null,s?QB(this._orient):null,xe(this._dragHandle,this,"all",!1),xe(this._dragHandle,this,"all",!0))),c.setClipPath(new qe({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var f=n.textStyleModel.getTextRect("国"),d=l2(f.width,f.height);s&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(n,u,0,i,d,o),this._createHandle(n,u,1,i,d,o)),this._createIndicator(n,u,i,d,o),t.add(u)},e.prototype._createHandle=function(t,n,a,i,o,s){var l=xe(this._dragHandle,this,a,!1),u=xe(this._dragHandle,this,a,!0),c=ii(t.get("handleSize"),i[0]),f=ur(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),d=QB(this._orient);f.attr({cursor:d,draggable:!0,drift:l,ondragend:u,onmousemove:function(b){Zo(b.event)}}),f.x=i[0]/2,f.useStyle(t.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),ju(f,!0),n.add(f);var v=this.visualMapModel.textStyleModel,g=new ot({cursor:d,draggable:!0,drift:l,onmousemove:function(b){Zo(b.event)},ondragend:u,style:Nt(v,{x:0,y:0,text:""})});g.ensureState("blur").style={opacity:.1},g.stateTransition={duration:200},this.group.add(g);var x=[c,0],y=this._shapes;y.handleThumbs[a]=f,y.handleLabelPoints[a]=x,y.handleLabels[a]=g},e.prototype._createIndicator=function(t,n,a,i,o){var s=ii(t.get("indicatorSize"),a[0]),l=ur(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof kr){var c=l.style;l.useStyle(ie({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,d=new ot({silent:!0,invisible:!0,style:Nt(f,{x:0,y:0,text:""})});this.group.add(d);var v=[(o==="horizontal"?i/2:zbe)+a[0]/2,0],g=this._shapes;g.indicator=l,g.indicatorLabel=d,g.indicatorLabelPoint=v,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,n,a,i){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([a,i],this._shapes.mainGroup,!0);this._updateInterval(t,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():KB(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,n=this._dataInterval=t.getSelected(),a=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[wi(n[0],a,i,!0),wi(n[1],a,i,!0)]},e.prototype._updateInterval=function(t,n){n=n||0;var a=this.visualMapModel,i=this._handleEnds,o=[0,a.itemSize[1]];wl(n,i,o,t,0);var s=a.getExtent();this._dataInterval=[wi(i[0],o,s,!0),wi(i[1],o,s,!0)]},e.prototype._updateView=function(t){var n=this.visualMapModel,a=n.getExtent(),i=this._shapes,o=[0,n.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,a,s,"inRange"),u=this._createBarVisual(a,a,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,n,a,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(a,l);return{barColor:new bc(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,n){var a=100,i=[],o=(t[1]-t[0])/a;i.push({color:this.getControllerVisual(t[0],"color",n),offset:0});for(var s=1;s<a;s++){var l=t[0]+o*s;if(l>t[1])break;i.push({color:this.getControllerVisual(l,"color",n),offset:s/a})}return i.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),i},e.prototype._createBarPoints=function(t,n){var a=this.visualMapModel.itemSize;return[[a[0]-n[0],t[0]],[a[0],t[0]],[a[0],t[1]],[a[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,a=this.visualMapModel.get("inverse");return new De(n==="horizontal"&&!a?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&a?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!a?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(this._useHandle){var a=this._shapes,i=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=i.itemSize,u=i.getExtent(),c=this._applyTransform("left",a.mainGroup);Obe([0,1],function(f){var d=o[f];d.setStyle("fill",n.handlesColor[f]),d.y=t[f];var v=wi(t[f],[0,l[1]],u,!0),g=this.getControllerVisual(v,"symbolSize");d.scaleX=d.scaleY=g/l[0],d.x=l[0]-g/2;var x=ei(a.handleLabelPoints[f],dl(d,this.group));if(this._orient==="horizontal"){var y=c==="left"||c==="top"?(l[0]-g)/2:(l[0]-g)/-2;x[1]+=y}s[f].setStyle({x:x[0],y:x[1],text:i.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,a,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var d={convertOpacityToAlpha:!0},v=this.getControllerVisual(t,"color",d),g=this.getControllerVisual(t,"symbolSize"),x=wi(t,s,u,!0),y=l[0]-g/2,b={x:f.x,y:f.y};f.y=x,f.x=y;var w=ei(c.indicatorLabelPoint,dl(f,this.group)),T=c.indicatorLabel;T.attr("invisible",!1);var C=this._applyTransform("left",c.mainGroup),D=this._orient,M=D==="horizontal";T.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:M?C:"middle",align:M?"center":C});var N={x:y,y:x,style:{fill:v}},R={style:{x:w[0],y:w[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var E={duration:100,easing:"cubicInOut",additive:!0};f.x=b.x,f.y=b.y,f.animateTo(N,E),T.animateTo(R,E)}else f.attr(N),T.attr(R);this._firstShowIndicator=!1;var k=this._shapes.handleLabels;if(k)for(var I=0;I<k.length;I++)this.api.enterBlur(k[I])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(n){if(t._hovering=!0,!t._dragging){var a=t.visualMapModel.itemSize,i=t._applyTransform([n.offsetX,n.offsetY],t._shapes.mainGroup,!0,!0);i[1]=ZB(l2(0,i[1]),a[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=a[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,n){var a=this.visualMapModel,i=a.itemSize;if(a.option.hoverLink){var o=[0,i[1]],s=a.getExtent();t=ZB(l2(o[0],t),o[1]);var l=Bbe(a,s,o),u=[t-l,t+l],c=wi(t,o,s,!0),f=[wi(u[0],o,s,!0),wi(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var d=this._hoverLinkDataIndices,v=[];(n||KB(a))&&(v=this._hoverLinkDataIndices=a.findTargetDataIndices(f));var g=yre(d,v);this._dispatchHighDown("downplay",ax(g[0],a)),this._dispatchHighDown("highlight",ax(g[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(Vu(t.target,function(l){var u=Pe(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var a=this.ecModel.getSeriesByIndex(n.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(a)){var o=a.getData(n.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var a=0;a<n.length;a++)this.api.leaveBlur(n[a])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",ax(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,n,a,i){var o=dl(n,i?null:this.group);return ce(t)?ei(t,o,a):K1(t,o,a)},e.prototype._dispatchHighDown=function(t,n){n&&n.length&&this.api.dispatchAction({type:t,batch:n})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e})(O9);function $B(r,e,t,n){return new nn({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){Zo(a.event)},ondragend:n})}function Bbe(r,e,t){var n=Pbe/2,a=r.get("hoverLinkDataSize");return a&&(n=wi(a,e,t,!0)/2),n}function KB(r){var e=r.get("hoverLinkOnHandle");return!!(e??r.get("realtime"))}function QB(r){return r==="vertical"?"ns-resize":"ew-resize"}var Vbe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Gbe=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},Hbe=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(n){var a=r.pipelineContext;!n.isTargetSeries(r)||a&&a.large||t.push(u1e(n.stateList,n.targetVisuals,xe(n.getValueState,n),n.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),n=[];e.eachComponent("visualMap",function(a){if(a.isTargetSeries(r)){var i=a.getVisualMeta(xe(Fbe,null,r,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(t);o>=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function Fbe(r,e,t,n){for(var a=e.targetVisuals[n],i=Nr.prepareVisualTypes(a),o={color:Ug(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],c=a[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,f,d)}return o.color;function f(v){return o[v]}function d(v,g){o[v]=g}}var JB=O;function Ube(r){var e=r&&r.visualMap;ce(e)||(e=e?[e]:[]),JB(e,function(t){if(t){Bf(t,"splitList")&&!Bf(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&ce(n)&&JB(n,function(a){Re(a)&&(Bf(a,"start")&&!Bf(a,"min")&&(a.min=a.start),Bf(a,"end")&&!Bf(a,"max")&&(a.max=a.end))})}})}function Bf(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var e4=!1;function z9(r){e4||(e4=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(Vbe,Gbe),O(Hbe,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(Ube))}function j9(r){r.registerComponentModel(Ibe),r.registerComponentView(jbe),z9(r)}var Ybe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],Wbe[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=Me(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=fe(this._pieceList,function(l){return l=Me(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},a=Nr.listVisualTypes(),i=this.isCategory();O(t.pieces,function(s){O(a,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),O(n,function(s,l){var u=!1;O(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&O(this.stateList,function(c){(t[c]||(t[c]={}))[l]=I9.get(l,c==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,n){var a=this.option,i=this._pieceList,o=(n?a:t).selected||{};if(a.selected=o,O(i,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),a.selectedMode==="single"){var s=!1;O(i,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(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=Me(t)},e.prototype.getValueState=function(t){var n=Nr.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],a=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=Nr.findPieceIndex(l,a);c===t&&o.push(u)},this),n.push({seriesId:i.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(t.value!=null)n=t.value;else{var a=t.interval||[];n=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],a=["",""],i=this;function o(c,f){var d=i.getRepresentValue({interval:c});f||(f=i.getValueState(d));var v=t(d,f);c[0]===-1/0?a[0]=v:c[1]===1/0?a[1]=v:n.push({value:c[0],color:v},{value:c[1],color:v})}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 O(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:a}},e.type="visualMap.piecewise",e.defaultOption=Ll(x1.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})(x1),Wbe={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var i=(n[1]-n[0])/a;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<a;s+=i,o++){var l=o===a-1?n[1]:s+i;r.push({interval:[s,l],close:[1,1]})}e.maxOpen&&r.push({interval:[n[1],1/0],close:[0,0]}),uC(r),O(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;O(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),t4(e,r)},pieces:function(r){var e=this.option;O(e.pieces,function(t,n){Re(t)||(t={value:t});var a={text:"",index:n};if(t.label!=null&&(a.text=t.label),t.hasOwnProperty("value")){var i=a.value=t.value;a.interval=[i,i],a.close=[1,1]}else{for(var o=a.interval=[],s=a.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var d=[["gte","gt","min"],["lte","lt","max"]][f],v=0;v<3&&o[f]==null;v++)o[f]=t[d[v]],s[f]=l[v],c[f]=v===2;o[f]==null&&(o[f]=u[f])}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]&&(a.value=o[0])}a.visual=Nr.retrieveVisuals(t),r.push(a)},this),t4(e,r),uC(r),O(r,function(t){var n=t.close,a=[["<","≤"][n[1]],[">","≥"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,a)},this)}};function t4(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var Xbe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,a=n.get("textGap"),i=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,c=Hr(n.get("showLabel",!0),!u),f=!n.get("selectedMode");u&&this._renderEndsText(t,u[0],s,c,o),O(l.viewPieceList,function(d){var v=d.piece,g=new De;g.onclick=xe(this._onItemClick,this,v),this._enableHoverLink(g,d.indexInModelPieceList);var x=n.getRepresentValue(v);if(this._createItemSymbol(g,x,[0,0,s[0],s[1]],f),c){var y=this.visualMapModel.getValueState(x),b=i.get("align")||o;g.add(new ot({style:Nt(i,{x:b==="right"?-a:s[0]+a,y:s[1]/2,text:v.text,verticalAlign:i.get("verticalAlign")||"middle",align:b,opacity:Ce(i.get("opacity"),y==="outOfRange"?.5:1)}),silent:f}))}t.add(g)},this),u&&this._renderEndsText(t,u[1],s,c,o),tc(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var a=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:ax(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return P9(t,this.api,t.itemSize);var a=n.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(t,n,a,i,o){if(n){var s=new De,l=this.visualMapModel.textStyleModel;s.add(new ot({style:Nt(l,{x:i?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:i?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=fe(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?n.reverse():a&&(a=a.slice().reverse()),{viewPieceList:n,endsText:a}},e.prototype._createItemSymbol=function(t,n,a,i){var o=ur(this.getControllerVisual(n,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(n,"color"));o.silent=i,t.add(o)},e.prototype._onItemClick=function(t){var n=this.visualMapModel,a=n.option,i=a.selectedMode;if(i){var o=Me(a.selected),s=n.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,O(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})(O9);function B9(r){r.registerComponentModel(Ybe),r.registerComponentView(Xbe),z9(r)}function qbe(r){We(j9),We(B9)}var Zbe=(function(){function r(e){this._thumbnailModel=e}return r.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},r.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:uH(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},r.prototype.updateWindow=function(e,t){var n=t.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},r})(),$be=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.optionUpdated=function(t,n){this._updateBridge()},e.prototype._updateBridge=function(){var t=this._birdge=this._birdge||new Zbe(this);if(this._target=null,this.ecModel.eachSeries(function(a){Az(a,null)}),this.shouldShow()){var n=this.getTarget();Az(n.baseMapProvider,t)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var t=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return t?t.subType!=="graph"&&(t=null):t=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:t},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:ee.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:ee.color.neutral30,borderColor:ee.color.neutral40,opacity:.3},z:10},e})(Qe),Kbe=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){if(this._api=a,this._model=t,this._coordSys||(this._coordSys=new Mc),!this._isEnabled()){this._clear();return}this._renderVersion=a.getMainProcessVersion();var i=this.group;i.removeAll();var o=t.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||ee.color.neutral00);var l=wr(t,a).refContainer,u=Ht(NH(t,!0),l),c=s.lineWidth||0,f=this._contentRect=hc(u.clone(),c/2,!0,!0),d=new De;i.add(d),d.setClipPath(new qe({shape:f.plain()}));var v=this._targetGroup=new De;d.add(v);var g=u.plain();g.r=o.getShallow("borderRadius",!0),i.add(this._bgRect=new qe({style:s,shape:g,silent:!1,cursor:"grab"}));var x=t.getModel("windowStyle"),y=x.getShallow("borderRadius",!0);d.add(this._windowRect=new qe({shape:{x:0,y:0,width:0,height:0,r:y},style:x.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),n4(t,this)},e.prototype.renderContent=function(t){this._bridgeRendered=t,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),n4(this._model,this))},e.prototype._dealRenderContent=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var n=this._targetGroup,a=this._coordSys,i=this._contentRect;if(n.removeAll(),!!t){var o=t.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=t.z2Range.min-10,a.setBoundingRect(s.x,s.y,s.width,s.height);var l=Ht({left:"center",top:"center",aspect:s.width/s.height},i);a.setViewRect(l.x,l.y,l.width,l.height),o.attr(a.getTransformInfo().raw),this._windowRect.z2=t.z2Range.max+10,this._resetRoamController(t.roamType)}}},e.prototype.updateWindow=function(t){var n=this._bridgeRendered;n&&n.renderVersion===t.renderVersion&&(n.targetTrans=t.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var n=Ia([],t.targetTrans),a=Qa([],this._coordSys.transform,n);this._transThisToTarget=Ia([],a);var i=t.viewportRect;i?i=i.clone():i=new Ie(0,0,this._api.getWidth(),this._api.getHeight()),i.applyTransform(a);var o=this._windowRect,s=o.shape.r;o.setShape(Le({r:s},i))}},e.prototype._resetRoamController=function(t){var n=this,a=this._api,i=this._roamController;if(i||(i=this._roamController=new Ac(a.getZr())),!t||!this._isEnabled()){i.disable();return}i.enable(t,{api:a,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),i.off("pan").off("zoom").on("pan",xe(this._onPan,this)).on("zoom",xe(this._onZoom,this))},e.prototype._onPan=function(t){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var a=Qt([],[t.oldX,t.oldY],n),i=Qt([],[t.oldX-t.dx,t.oldY-t.dy],n);this._api.dispatchAction(r4(this._model.getTarget().baseMapProvider,{dx:i[0]-a[0],dy:i[1]-a[1]}))}},e.prototype._onZoom=function(t){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var a=Qt([],[t.originX,t.originY],n);this._api.dispatchAction(r4(this._model.getTarget().baseMapProvider,{zoom:1/t.scale,originX:a[0],originY:a[1]}))}},e.prototype._isEnabled=function(){var t=this._model;if(!t||!t.shouldShow())return!1;var n=t.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})(Rt);function r4(r,e){var t=r.mainType==="series"?r.subType+"Roam":r.mainType+"Roam",n={type:t};return n[r.mainType+"Id"]=r.id,ie(n,e),n}function n4(r,e){var t=dc(r);Q1(e.group,t.z,t.zlevel)}function Qbe(r){r.registerComponentModel($be),r.registerComponentView(Kbe)}var Jbe={label:{enabled:!0},decal:{show:!1}},a4=Je(),e_e={};function t_e(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=Me(Jbe);Ye(n.label,r.getLocaleModel().get("aria"),!1),Ye(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=Te();r.eachSeries(function(d){if(!d.isColorBySeries()){var v=f.get(d.type);v||(v={},f.set(d.type,v)),a4(d).scope=v}}),r.eachRawSeries(function(d){if(r.isSeriesFiltered(d))return;if(Ae(d.enableAriaDecal)){d.enableAriaDecal();return}var v=d.getData();if(d.isColorBySeries()){var w=LC(d.ecModel,d.name,e_e,r.getSeriesCount()),T=v.getVisual("decal");v.setVisual("decal",C(T,w))}else{var g=d.getRawData(),x={},y=a4(d).scope;v.each(function(D){var M=v.getRawIndex(D);x[M]=D});var b=g.count();g.each(function(D){var M=x[D],N=g.getName(D)||D+"",R=LC(d.ecModel,N,y,b),E=v.getItemVisual(M,"decal");v.setItemVisual(M,"decal",C(E,R))})}function C(D,M){var N=D?ie(ie({},M),D):M;return N.dirty=!0,N}})}}function i(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=Le(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var d=r.getSeriesCount(),v=f.get(["data","maxCount"])||10,g=f.get(["series","maxCount"])||10,x=Math.min(d,g),y;if(!(d<1)){var b=s();if(b){var w=f.get(["general","withTitle"]);y=o(w,{title:b})}else y=f.get(["general","withoutTitle"]);var T=[],C=d>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);y+=o(C,{seriesCount:d}),r.eachSeries(function(R,E){if(E<x){var k=void 0,I=R.get("name"),z=I?"withName":"withoutName";k=d>1?f.get(["series","multiple",z]):f.get(["series","single",z]),k=o(k,{seriesId:R.seriesIndex,seriesName:R.get("name"),seriesType:l(R.subType)});var P=R.getData();if(P.count()>v){var G=f.get(["data","partialData"]);k+=o(G,{displayCnt:v})}else k+=f.get(["data","allData"]);for(var U=f.get(["data","separator","middle"]),B=f.get(["data","separator","end"]),F=f.get(["data","excludeDimensionId"]),H=[],X=0;X<P.count();X++)if(X<v){var V=P.getName(X),W=F?dt(P.getValues(X),function(te,ue){return Fe(F,ue)===-1}):P.getValues(X),$=f.get(["data",V?"withName":"withoutName"]);H.push(o($,{name:V,value:W.join(U)}))}k+=H.join(U)+B,T.push(k)}});var D=f.getModel(["series","multiple","separator"]),M=D.get("middle"),N=D.get("end");y+=T.join(M)+N,u.setAttribute("aria-label",y)}}}}function o(u,c){if(!ye(u))return u;var f=u;return O(c,function(d,v){f=f.replace(new RegExp("\\{\\s*"+v+"\\s*\\}","g"),d)}),f}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=r.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function r_e(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},O(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function n_e(r){r.registerPreprocessor(r_e),r.registerVisual(r.PRIORITY.VISUAL.ARIA,t_e)}var i4={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},a_e=(function(){function r(e){var t=this._condVal=ye(e)?new RegExp(e):kG(e)?e:null;if(t==null){var n="";gt(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return ye(t)?this._condVal.test(e):st(t)?this._condVal.test(e+""):!1},r})(),i_e=(function(){function r(){}return r.prototype.evaluate=function(){return this.value},r})(),o_e=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r})(),s_e=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r})(),l_e=(function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r})(),u_e=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),a=e?this.valueParser(n):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?a:n))return!1;return!0},r})();function QN(r,e){if(r===!0||r===!1){var t=new i_e;return t.value=r,t}var n="";return V9(r)||gt(n),r.and?o4("and",r,e):r.or?o4("or",r,e):r.not?c_e(r,e):f_e(r,e)}function o4(r,e,t){var n=e[r],a="";ce(n)||gt(a),n.length||gt(a);var i=r==="and"?new o_e:new s_e;return i.children=fe(n,function(o){return QN(o,t)}),i.children.length||gt(a),i}function c_e(r,e){var t=r.not,n="";V9(t)||gt(n);var a=new l_e;return a.child=QN(t,e),a.child||gt(n),a}function f_e(r,e){for(var t="",n=e.prepareGetValue(r),a=[],i=it(r),o=r.parser,s=o?KH(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=_e(i4,u)?i4[u]:u,f=r[u],d=s?s(f):f,v=Rie(c,d)||c==="reg"&&new a_e(d);v||gt(t),a.push(v)}}a.length||gt(t);var g=new u_e;return g.valueGetterParam=n,g.valueParser=s,g.getValue=e.getValue,g.subCondList=a,g}function V9(r){return Re(r)&&!en(r)}var h_e=(function(){function r(e,t){this._cond=QN(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r})();function d_e(r,e){return new h_e(r,e)}var v_e={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,n=d_e(r.config,{valueGetterAttrMap:Te({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;_e(s,"dimension")||gt(l);var c=e.getDimensionInfo(u);return c||gt(l),{dimIdx:c.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),a=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),n.evaluate()&&a.push(t);return{data:a}}},p_e={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,n="",a=Lt(t);a.length||gt(n);var i=[];O(a,function(c){var f=c.dimension,d=c.order,v=c.parser,g=c.incomparable;if(f==null&&gt(n),d!=="asc"&&d!=="desc"&&gt(n),g&&g!=="min"&&g!=="max"){var x="";gt(x)}if(d!=="asc"&&d!=="desc"){var y="";gt(y)}var b=e.getDimensionInfo(f);b||gt(n);var w=v?KH(v):null;v&&!w&&gt(n),i.push({dimIdx:b.index,parser:w,comparator:new JH(d,g)})});var o=e.sourceFormat;o!==Ur&&o!==la&&gt(n);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,f){for(var d=0;d<i.length;d++){var v=i[d],g=e.retrieveValueFromItem(c,v.dimIdx),x=e.retrieveValueFromItem(f,v.dimIdx);v.parser&&(g=v.parser(g),x=v.parser(x));var y=v.comparator.evaluate(g,x);if(y!==0)return y}return 0}),{data:s}}};function g_e(r){r.registerTransform(v_e),r.registerTransform(p_e)}var m_e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,n,a){r.prototype.init.call(this,t,n,a),this._sourceManager=new n8(this),jP(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),jP(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:ti},e})(Qe),y_e=(function(r){K(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e})(Rt);function x_e(r){r.registerComponentModel(m_e),r.registerComponentView(y_e)}var _i=qi.CMD;function eh(r,e){return Math.abs(r-e)<1e-5}function YA(r){var e=r.data,t=r.len(),n=[],a,i=0,o=0,s=0,l=0;function u(P,G){a&&a.length>2&&n.push(a),a=[P,G]}function c(P,G,U,B){eh(P,U)&&eh(G,B)||a.push(P,G,U,B,U,B)}function f(P,G,U,B,F,H){var X=Math.abs(G-P),V=Math.tan(X/4)*4/3,W=G<P?-1:1,$=Math.cos(P),te=Math.sin(P),ue=Math.cos(G),ge=Math.sin(G),Se=$*F+U,Xe=te*H+B,be=ue*F+U,we=ge*H+B,ze=F*V*W,oe=H*V*W;a.push(Se-ze*te,Xe+oe*$,be+ze*ge,we-oe*ue,be,we)}for(var d,v,g,x,y=0;y<t;){var b=e[y++],w=y===1;switch(w&&(i=e[y],o=e[y+1],s=i,l=o,(b===_i.L||b===_i.C||b===_i.Q)&&(a=[s,l])),b){case _i.M:i=s=e[y++],o=l=e[y++],u(s,l);break;case _i.L:d=e[y++],v=e[y++],c(i,o,d,v),i=d,o=v;break;case _i.C:a.push(e[y++],e[y++],e[y++],e[y++],i=e[y++],o=e[y++]);break;case _i.Q:d=e[y++],v=e[y++],g=e[y++],x=e[y++],a.push(i+2/3*(d-i),o+2/3*(v-o),g+2/3*(d-g),x+2/3*(v-x),g,x),i=g,o=x;break;case _i.A:var T=e[y++],C=e[y++],D=e[y++],M=e[y++],N=e[y++],R=e[y++]+N;y+=1;var E=!e[y++];d=Math.cos(N)*D+T,v=Math.sin(N)*M+C,w?(s=d,l=v,u(s,l)):c(i,o,d,v),i=Math.cos(R)*D+T,o=Math.sin(R)*M+C;for(var k=(E?-1:1)*Math.PI/2,I=N;E?I>R:I<R;I+=k){var z=E?Math.max(I+k,R):Math.min(I+k,R);f(I,z,T,C,D,M)}break;case _i.R:s=i=e[y++],l=o=e[y++],d=s+e[y++],v=l+e[y++],u(d,l),c(d,l,d,v),c(d,v,s,v),c(s,v,s,l),c(s,l,d,l);break;case _i.Z:a&&c(i,o,s,l),i=s,o=l;break}}return a&&a.length>2&&n.push(a),n}function WA(r,e,t,n,a,i,o,s,l,u){if(eh(r,t)&&eh(e,n)&&eh(a,o)&&eh(i,s)){l.push(o,s);return}var c=2/u,f=c*c,d=o-r,v=s-e,g=Math.sqrt(d*d+v*v);d/=g,v/=g;var x=t-r,y=n-e,b=a-o,w=i-s,T=x*x+y*y,C=b*b+w*w;if(T<f&&C<f){l.push(o,s);return}var D=d*x+v*y,M=-d*b-v*w,N=T-D*D,R=C-M*M;if(N<f&&D>=0&&R<f&&M>=0){l.push(o,s);return}var E=[],k=[];bl(r,t,a,o,.5,E),bl(e,n,i,s,.5,k),WA(E[0],k[0],E[1],k[1],E[2],k[2],E[3],k[3],l,u),WA(E[4],k[4],E[5],k[5],E[6],k[6],E[7],k[7],l,u)}function b_e(r,e){var t=YA(r),n=[];e=e||1;for(var a=0;a<t.length;a++){var i=t[a],o=[],s=i[0],l=i[1];o.push(s,l);for(var u=2;u<i.length;){var c=i[u++],f=i[u++],d=i[u++],v=i[u++],g=i[u++],x=i[u++];WA(s,l,c,f,d,v,g,x,o,e),s=g,l=x}n.push(o)}return n}function G9(r,e,t){var n=r[e],a=r[1-e],i=Math.abs(n/a),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=t-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function s4(r,e,t){for(var n=r.r0,a=r.r,i=r.startAngle,o=r.endAngle,s=Math.abs(o-i),l=s*a,u=a-n,c=l>Math.abs(u),f=G9([l,u],c?0:1,e),d=(c?s:u)/f.length,v=0;v<f.length;v++)for(var g=(c?u:s)/f[v],x=0;x<f[v];x++){var y={};c?(y.startAngle=i+d*v,y.endAngle=i+d*(v+1),y.r0=n+g*x,y.r=n+g*(x+1)):(y.startAngle=i+g*x,y.endAngle=i+g*(x+1),y.r0=n+d*v,y.r=n+d*(v+1)),y.clockwise=r.clockwise,y.cx=r.cx,y.cy=r.cy,t.push(y)}}function __e(r,e,t){for(var n=r.width,a=r.height,i=n>a,o=G9([n,a],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",c=i?"y":"x",f=r[s]/o.length,d=0;d<o.length;d++)for(var v=r[l]/o[d],g=0;g<o[d];g++){var x={};x[u]=d*f,x[c]=g*v,x[s]=f,x[l]=v,x.x+=r.x,x.y+=r.y,t.push(x)}}function l4(r,e,t,n){return r*n-t*e}function S_e(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,d=l4(c,f,l,u);if(Math.abs(d)<1e-6)return null;var v=r-a,g=e-i,x=l4(v,g,c,f)/d;return x<0||x>1?null:new ke(x*l+r,x*u+e)}function w_e(r,e,t){var n=new ke;ke.sub(n,t,e),n.normalize();var a=new ke;ke.sub(a,r,e);var i=a.dot(n);return i}function Vf(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function T_e(r,e,t){for(var n=r.length,a=[],i=0;i<n;i++){var o=r[i],s=r[(i+1)%n],l=S_e(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&a.push({projPt:w_e(l,e,t),pt:l,idx:i})}if(a.length<2)return[{points:r},{points:r}];a.sort(function(y,b){return y.projPt-b.projPt});var u=a[0],c=a[a.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var d=[u.pt.x,u.pt.y],v=[c.pt.x,c.pt.y],g=[d],x=[v],i=u.idx+1;i<=c.idx;i++)Vf(g,r[i].slice());Vf(g,v),Vf(g,d);for(var i=c.idx+1;i<=u.idx+n;i++)Vf(x,r[i%n].slice());return Vf(x,d),Vf(x,v),[{points:g},{points:x}]}function u4(r){var e=r.points,t=[],n=[];W1(e,t,n);var a=new Ie(t[0],t[1],n[0]-t[0],n[1]-t[1]),i=a.width,o=a.height,s=a.x,l=a.y,u=new ke,c=new ke;return i>o?(u.x=c.x=s+i/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+i),T_e(e,u,c)}function b1(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);b1(r,i[0],a,n),b1(r,i[1],t-a,n)}return n}function C_e(r,e){for(var t=[],n=0;n<e;n++)t.push(XM(r));return t}function A_e(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function M_e(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function D_e(r,e){var t=[],n=r.shape,a;switch(r.type){case"rect":__e(n,e,t),a=qe;break;case"sector":s4(n,e,t),a=rn;break;case"circle":s4({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),a=rn;break;default:var i=r.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=fe(b_e(r.getUpdatedPathProxy(),o),function(b){return M_e(b)}),l=s.length;if(l===0)b1(u4,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var c=0,f=fe(s,function(b){var w=[],T=[];W1(b,w,T);var C=(T[1]-w[1])*(T[0]-w[0]);return c+=C,{poly:b,area:C}});f.sort(function(b,w){return w.area-b.area});for(var d=e,u=0;u<l;u++){var v=f[u];if(d<=0)break;var g=u===l-1?d:Math.ceil(v.area/c*e);g<0||(b1(u4,{points:v.poly},g,t),d-=g)}}a=nn;break}if(!a)return C_e(r,e);for(var x=[],u=0;u<t.length;u++){var y=new a;y.setShape(t[u]),A_e(r,y),x.push(y)}return x}function N_e(r,e){var t=r.length,n=e.length;if(t===n)return[r,e];for(var a=[],i=[],o=t<n?r:e,s=Math.min(t,n),l=Math.abs(n-t)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],d=l,v=2;v<s;){var g=o[v-2],x=o[v-1],y=o[v++],b=o[v++],w=o[v++],T=o[v++],C=o[v++],D=o[v++];if(d<=0){f.push(y,b,w,T,C,D);continue}for(var M=Math.min(d,c-1)+1,N=1;N<=M;N++){var R=N/M;bl(g,y,w,C,R,a),bl(x,b,T,D,R,i),g=a[3],x=i[3],f.push(a[1],i[1],a[2],i[2],g,x),y=a[5],b=i[5],w=a[6],T=i[6]}d-=M-1}return o===r?[f,e]:[r,f]}function c4(r,e){for(var t=r.length,n=r[t-2],a=r[t-1],i=[],o=0;o<e.length;)i[o++]=n,i[o++]=a;return i}function L_e(r,e){for(var t,n,a,i=[],o=[],s=0;s<Math.max(r.length,e.length);s++){var l=r[s],u=e[s],c=void 0,f=void 0;l?u?(t=N_e(l,u),c=t[0],f=t[1],n=c,a=f):(f=c4(a||l,l),c=l):(c=c4(n||u,u),f=u),i.push(c),o.push(f)}return[i,o]}function f4(r){for(var e=0,t=0,n=0,a=r.length,i=0,o=a-2;i<a;o=i,i+=2){var s=r[o],l=r[o+1],u=r[i],c=r[i+1],f=s*c-u*l;e+=f,t+=(s+u)*f,n+=(l+c)*f}return e===0?[r[0]||0,r[1]||0]:[t/e/3,n/e/3,e]}function R_e(r,e,t,n){for(var a=(r.length-2)/6,i=1/0,o=0,s=r.length,l=s-2,u=0;u<a;u++){for(var c=u*6,f=0,d=0;d<s;d+=2){var v=d===0?c:(c+d-2)%l+2,g=r[v]-t[0],x=r[v+1]-t[1],y=e[d]-n[0],b=e[d+1]-n[1],w=y-g,T=b-x;f+=w*w+T*T}f<i&&(i=f,o=u)}return o}function E_e(r){for(var e=[],t=r.length,n=0;n<t;n+=2)e[n]=r[t-n-2],e[n+1]=r[t-n-1];return e}function k_e(r,e,t,n){for(var a=[],i,o=0;o<r.length;o++){var s=r[o],l=e[o],u=f4(s),c=f4(l);i==null&&(i=u[2]<0!=c[2]<0);var f=[],d=[],v=0,g=1/0,x=[],y=s.length;i&&(s=E_e(s));for(var b=R_e(s,l,u,c)*6,w=y-2,T=0;T<w;T+=2){var C=(b+T)%w+2;f[T+2]=s[C]-u[0],f[T+3]=s[C+1]-u[1]}f[0]=s[b]-u[0],f[1]=s[b+1]-u[1];for(var D=n/t,M=-n/2;M<=n/2;M+=D){for(var N=Math.sin(M),R=Math.cos(M),E=0,T=0;T<s.length;T+=2){var k=f[T],I=f[T+1],z=l[T]-c[0],P=l[T+1]-c[1],G=z*R-P*N,U=z*N+P*R;x[T]=G,x[T+1]=U;var B=G-k,F=U-I;E+=B*B+F*F}if(E<g){g=E,v=M;for(var H=0;H<x.length;H++)d[H]=x[H]}}a.push({from:f,to:d,fromCp:u,toCp:c,rotation:-v})}return a}function _1(r){return r.__isCombineMorphing}var H9="__mOriginal_";function S1(r,e,t){var n=H9+e,a=r[n]||r[e];r[n]||(r[n]=r[e]);var i=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),i?u=i.apply(this,l):u=a.apply(this,l),o&&o.apply(this,l),u}}function kp(r,e){var t=H9+e;r[t]&&(r[e]=r[t],r[t]=null)}function h4(r,e){for(var t=0;t<r.length;t++)for(var n=r[t],a=0;a<n.length;){var i=n[a],o=n[a+1];n[a++]=e[0]*i+e[2]*o+e[4],n[a++]=e[1]*i+e[3]*o+e[5]}}function F9(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),a=L_e(YA(t),YA(n)),i=a[0],o=a[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&h4(i,s),l&&h4(o,l),S1(e,"updateTransform",{replace:u}),e.transform=null;var c=k_e(i,o,10,Math.PI),f=[];S1(e,"buildPath",{replace:function(d){for(var v=e.__morphT,g=1-v,x=[],y=0;y<c.length;y++){var b=c[y],w=b.from,T=b.to,C=b.rotation*v,D=b.fromCp,M=b.toCp,N=Math.sin(C),R=Math.cos(C);_p(x,D,M,v);for(var E=0;E<w.length;E+=2){var k=w[E],I=w[E+1],z=T[E],P=T[E+1],G=k*g+z*v,U=I*g+P*v;f[E]=G*R-U*N+x[0],f[E+1]=G*N+U*R+x[1]}var B=f[0],F=f[1];d.moveTo(B,F);for(var E=2;E<w.length;){var z=f[E++],P=f[E++],H=f[E++],X=f[E++],V=f[E++],W=f[E++];B===z&&F===P&&H===V&&X===W?d.lineTo(V,W):d.bezierCurveTo(z,P,H,X,V,W),B=V,F=W}}}})}function JN(r,e,t){if(!r||!e)return e;var n=t.done,a=t.during;F9(r,e),e.__morphT=0;function i(){kp(e,"buildPath"),kp(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},Le({during:function(o){e.dirtyShape(),a&&a(o)},done:function(){i(),n&&n()}},t)),e}function I_e(r,e,t,n,a,i){var o=16;r=a===t?0:Math.round(32767*(r-t)/(a-t)),e=i===n?0:Math.round(32767*(e-n)/(i-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(r&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function w1(r){var e=1/0,t=1/0,n=-1/0,a=-1/0,i=fe(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(f,t),n=Math.max(c,n),a=Math.max(f,a),[c,f]}),o=fe(i,function(s,l){return{cp:s,z:I_e(s[0],s[1],e,t,n,a),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function U9(r){return D_e(r.path,r.count)}function XA(){return{fromIndividuals:[],toIndividuals:[],count:0}}function O_e(r,e,t){var n=[];function a(D){for(var M=0;M<D.length;M++){var N=D[M];_1(N)?a(N.childrenRef()):N instanceof tt&&n.push(N)}}a(r);var i=n.length;if(!i)return XA();var o=t.dividePath||U9,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),XA();n=w1(n),s=w1(s);for(var l=t.done,u=t.during,c=t.individualDelay,f=new zo,d=0;d<i;d++){var v=n[d],g=s[d];g.parent=e,g.copyTransform(f),c||F9(v,g)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function x(D){for(var M=0;M<s.length;M++)s[M].addSelfToZr(D)}S1(e,"addSelfToZr",{after:function(D){x(D)}}),S1(e,"removeSelfFromZr",{after:function(D){for(var M=0;M<s.length;M++)s[M].removeSelfFromZr(D)}});function y(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,kp(e,"addSelfToZr"),kp(e,"removeSelfFromZr")}var b=s.length;if(c)for(var w=b,T=function(){w--,w===0&&(y(),l&&l())},d=0;d<b;d++){var C=c?Le({delay:(t.delay||0)+c(d,b,n[d],s[d]),done:T},t):t;JN(n[d],s[d],C)}else e.__morphT=0,e.animateTo({__morphT:1},Le({during:function(D){for(var M=0;M<b;M++){var N=s[M];N.__morphT=e.__morphT,N.dirtyShape()}u&&u(D)},done:function(){y();for(var D=0;D<r.length;D++)kp(r[D],"updateTransform");l&&l()}},t));return e.__zr&&x(e.__zr),{fromIndividuals:n,toIndividuals:s,count:b}}function P_e(r,e,t){var n=e.length,a=[],i=t.dividePath||U9;function o(v){for(var g=0;g<v.length;g++){var x=v[g];_1(x)?o(x.childrenRef()):x instanceof tt&&a.push(x)}}if(_1(r)){o(r.childrenRef());var s=a.length;if(s<n)for(var l=0,u=s;u<n;u++)a.push(XM(a[l++%s]));a.length=n}else{a=i({path:r,count:n});for(var c=r.getComputedTransform(),u=0;u<a.length;u++)a[u].setLocalTransform(c);if(a.length!==n)return console.error("Invalid morphing: unmatched splitted path"),XA()}a=w1(a),e=w1(e);for(var f=t.individualDelay,u=0;u<n;u++){var d=f?Le({delay:(t.delay||0)+f(u,n,a[u],e[u])},t):t;JN(a[u],e[u],d)}return{fromIndividuals:a,toIndividuals:e,count:e.length}}function d4(r){return ce(r[0])}function v4(r,e){for(var t=[],n=r.length,a=0;a<n;a++)t.push({one:r[a],many:[]});for(var a=0;a<e.length;a++){var i=e[a].length,o=void 0;for(o=0;o<i;o++)t[o%n].many.push(e[a][o])}for(var s=0,a=n-1;a>=0;a--)if(!t[a].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[a].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var z_e={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n<r.count;n++){var a=XM(r.path);a.setStyle("opacity",t),e.push(a)}return e},split:null};function u2(r,e,t,n,a,i){if(!r.length||!e.length)return;var o=Kh("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;d4(r)&&(u=r,c=e),d4(e)&&(u=e,c=r);function f(b,w,T,C,D){var M=b.many,N=b.one;if(M.length===1&&!D){var R=w?M[0]:N,E=w?N:M[0];if(_1(R))f({many:[R],one:E},!0,T,C,!0);else{var k=s?Le({delay:s(T,C)},l):l;JN(R,E,k),i(R,E,R,E,k)}}else for(var I=Le({dividePath:z_e[t],individualDelay:s&&function(F,H,X,V){return s(F+T,C)}},l),z=w?O_e(M,N,I):P_e(N,M,I),P=z.fromIndividuals,G=z.toIndividuals,U=P.length,B=0;B<U;B++){var k=s?Le({delay:s(B,U)},l):l;i(P[B],G[B],w?M[B]:b.one,w?b.one:M[B],k)}}for(var d=u?u===r:r.length>e.length,v=u?v4(c,u):v4(d?e:r,[d?r:e]),g=0,x=0;x<v.length;x++)g+=v[x].many.length;for(var y=0,x=0;x<v.length;x++)f(v[x],d,y,g),y+=v[x].many.length}function Lu(r){if(!r)return[];if(ce(r)){for(var e=[],t=0;t<r.length;t++)e.push(Lu(r[t]));return e}var n=[];return r.traverse(function(a){a instanceof tt&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var Y9=1e4,j_e=0,p4=1,g4=2,B_e=Je();function V_e(r,e){for(var t=r.dimensions,n=0;n<t.length;n++){var a=r.getDimensionInfo(t[n]);if(a&&a.otherDims[e]===0)return t[n]}}function G_e(r,e,t){var n=r.getDimensionInfo(t),a=n&&n.ordinalMeta;if(n){var i=r.get(n.name,e);return a&&a.categories[i]||i+""}}function m4(r,e,t,n){var a=n?"itemChildGroupId":"itemGroupId",i=V_e(r,a);if(i){var o=G_e(r,e,i);return o}var s=r.getRawDataItem(e),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return t||r.getId(e)}function y4(r){var e=[];return O(r,function(t){var n=t.data,a=t.dataGroupId;if(!(n.count()>Y9))for(var i=n.getIndices(),o=0;o<i.length;o++)e.push({data:n,groupId:m4(n,o,a,!1),childGroupId:m4(n,o,a,!0),divide:t.divide,dataIndex:o})}),e}function c2(r,e,t){r.traverse(function(n){n instanceof tt&&jt(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function f2(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function Gf(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function H_e(r,e,t){var n=Kh("update",t,e);n&&r.traverse(function(a){if(a instanceof Oa){var i=iae(a);i&&a.animateFrom({style:i},n)}})}function F_e(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++){var a=r[n],i=e[n];if(a.data.getId(a.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function W9(r,e,t){var n=y4(r),a=y4(e);function i(T,C,D,M,N){(D||T)&&C.animateFrom({style:D&&D!==T?ie(ie({},D.style),T.style):T.style},N)}var o=!1,s=j_e,l=Te(),u=Te();n.forEach(function(T){T.groupId&&l.set(T.groupId,!0),T.childGroupId&&u.set(T.childGroupId,!0)});for(var c=0;c<a.length;c++){var f=a[c].groupId;if(u.get(f)){s=p4;break}var d=a[c].childGroupId;if(d&&l.get(d)){s=g4;break}}function v(T,C){return function(D){var M=D.data,N=D.dataIndex;return C?M.getId(N):T?s===p4?D.childGroupId:D.groupId:s===g4?D.childGroupId:D.groupId}}var g=F_e(n,a),x={};if(!g)for(var c=0;c<a.length;c++){var y=a[c],b=y.data.getItemGraphicEl(y.dataIndex);b&&(x[b.id]=!0)}function w(T,C){var D=n[C],M=a[T],N=M.data.hostModel,R=D.data.getItemGraphicEl(D.dataIndex),E=M.data.getItemGraphicEl(M.dataIndex);if(R===E){E&&H_e(E,M.dataIndex,N);return}R&&x[R.id]||E&&(Gf(E),R?(Gf(R),f2(R),o=!0,u2(Lu(R),Lu(E),M.divide,N,T,i)):c2(E,N,T))}new Qo(n,a,v(!0,g),v(!1,g),null,"multiple").update(w).updateManyToOne(function(T,C){var D=a[T],M=D.data,N=M.hostModel,R=M.getItemGraphicEl(D.dataIndex),E=dt(fe(C,function(k){return n[k].data.getItemGraphicEl(n[k].dataIndex)}),function(k){return k&&k!==R&&!x[k.id]});R&&(Gf(R),E.length?(O(E,function(k){Gf(k),f2(k)}),o=!0,u2(Lu(E),Lu(R),D.divide,N,T,i)):c2(R,N,D.dataIndex))}).updateOneToMany(function(T,C){var D=n[C],M=D.data.getItemGraphicEl(D.dataIndex);if(!(M&&x[M.id])){var N=dt(fe(T,function(E){return a[E].data.getItemGraphicEl(a[E].dataIndex)}),function(E){return E&&E!==M}),R=a[T[0]].data.hostModel;N.length&&(O(N,function(E){return Gf(E)}),M?(Gf(M),f2(M),o=!0,u2(Lu(M),Lu(N),D.divide,R,T[0],i)):O(N,function(E){return c2(E,R,T[0])}))}}).updateManyToMany(function(T,C){new Qo(C,T,function(D){return n[D].data.getId(n[D].dataIndex)},function(D){return a[D].data.getId(a[D].dataIndex)}).update(function(D,M){w(T[D],C[M])}).execute()}).execute(),o&&O(e,function(T){var C=T.data,D=C.hostModel,M=D&&t.getViewOfSeriesModel(D),N=Kh("update",D,0);M&&D.isAnimationEnabled()&&N&&N.duration>0&&M.group.traverse(function(R){R instanceof tt&&!R.animators.length&&R.animateFrom({style:{opacity:0}},N)})})}function x4(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function b4(r){return ce(r)?r.sort().join(","):r}function Ys(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function U_e(r,e){var t=Te(),n=Te(),a=Te();return O(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=x4(i),c=b4(u);n.set(c,{dataGroupId:s,data:l}),ce(u)&&O(u,function(f){a.set(f,{key:c,dataGroupId:s,data:l})})}),O(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=x4(i),u=b4(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ys(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Ys(s),data:s}]});else if(ce(l)){var f=[];O(l,function(g){var x=n.get(g);x.data&&f.push({dataGroupId:x.dataGroupId,divide:Ys(x.data),data:x.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Ys(s)}]})}else{var d=a.get(l);if(d){var v=t.get(d.key);v||(v={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:Ys(d.data)}],newSeries:[]},t.set(d.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Ys(s)})}}}}),t}function _4(r,e){for(var t=0;t<r.length;t++){var n=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(n)return t}}function Y_e(r,e,t,n){var a=[],i=[];O(Lt(r.from),function(o){var s=_4(e.oldSeries,o);s>=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ys(e.oldData[s]),groupIdDim:o.dimension})}),O(Lt(r.to),function(o){var s=_4(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Ys(l),groupIdDim:o.dimension})}}),a.length>0&&i.length>0&&W9(a,i,n)}function W_e(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){O(Lt(n.seriesTransition),function(a){O(Lt(a.to),function(i){for(var o=n.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][K0]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,n){var a=B_e(t);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)O(Lt(i),function(v){Y_e(v,a,n,t)});else{var o=U_e(a,n);O(o.keys(),function(v){var g=o.get(v);W9(g.oldSeries,g.newSeries,t)})}O(n.updatedSeries,function(v){v[K0]&&(v[K0]=!1)})}for(var s=e.getSeries(),l=a.oldSeries=[],u=a.oldDataGroupIds=[],c=a.oldData=[],f=0;f<s.length;f++){var d=s[f].getData();d.count()<Y9&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(d))}})}var X_e=(function(){function r(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return r.prototype.setBreaks=function(e){this.breaks=e.breaks},r.prototype.update=function(e){Z_e(this,e);var t=this._elapsedExtent;t[0]=this.elapse(e[0]),t[1]=this.elapse(e[1])},r.prototype.hasBreaks=function(){return!!this.breaks.length},r.prototype.calcNiceTickMultiple=function(e,t){for(var n=0;n<this.breaks.length;n++){var a=this.breaks[n];if(a.vmin<e&&e<a.vmax){var i=t(e,a.vmax);return i}}return 0},r.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},r.prototype.normalize=function(e){var t=this._elapsedExtent[1]-this._elapsedExtent[0];return t===0?.5:(this.elapse(e)-this._elapsedExtent[0])/t},r.prototype.scale=function(e){return this.unelapse(e*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},r.prototype.elapse=function(e){for(var t=S4,n=w4,a=!0,i=0;i<this.breaks.length;i++){var o=this.breaks[i];if(e<=o.vmax){e>o.vmin?t+=o.vmin-n+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:t+=e-n,n=o.vmax,a=!1;break}t+=o.vmin-n+o.gapReal,n=o.vmax}return a&&(t+=e-n),t},r.prototype.unelapse=function(e){for(var t=S4,n=w4,a=!0,i=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],l=t+s.vmin-n,u=l+s.gapReal;if(e<=u){e>l?i=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):i=n+e-t,n=s.vmax,a=!1;break}t=u,n=s.vmax}return a&&(i=n+e-t),i},r})();function q_e(){return new X_e}var S4=0,w4=0;function Z_e(r,e){var t=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},a=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},i={S:{tpAbs:a(),tpPrct:a()},E:{tpAbs:a(),tpPrct:a()}};O(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(t+=l.val);var u=eL(s,e);if(u){var c=u.vmin!==s.vmin,f=u.vmax!==s.vmax,d=u.vmax-u.vmin;if(!(c&&f))if(c||f){var v=c?"S":"E";i[v][l.type].has=!0,i[v][l.type].span=d,i[v][l.type].inExtFrac=d/(s.vmax-s.vmin),i[v][l.type].val=l.val}else n[l.type].span+=d,n[l.type].val+=l.val}});var o=t*(0+(e[1]-e[0])+(n.tpAbs.val-n.tpAbs.span)+(i.S.tpAbs.has?(i.S.tpAbs.val-i.S.tpAbs.span)*i.S.tpAbs.inExtFrac:0)+(i.E.tpAbs.has?(i.E.tpAbs.val-i.E.tpAbs.span)*i.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(i.S.tpPrct.has?i.S.tpPrct.span*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.span*i.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(i.S.tpPrct.has?i.S.tpPrct.val*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.val*i.E.tpPrct.inExtFrac:0));O(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=t!==0?Math.max(o,0)*l.val/t:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function $_e(r,e,t,n,a,i){r!=="no"&&O(t,function(o){var s=eL(o,i);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],c=n(u),f=a*3/4;c>s.vmin-f&&c<s.vmax+f&&(r!=="preserve_extent_bound"||c!==i[0]&&c!==i[1])&&e.splice(l,1)}})}function K_e(r,e,t,n){O(e,function(a){var i=eL(a,t);i&&(r.push({value:i.vmin,break:{type:"vmin",parsedBreak:i},time:n?n(i):void 0}),r.push({value:i.vmax,break:{type:"vmax",parsedBreak:i},time:n?n(i):void 0}))}),e.length&&r.sort(function(a,i){return a.value-i.value})}function eL(r,e){var t=Math.max(r.vmin,e[0]),n=Math.min(r.vmax,e[1]);return t<n||t===n&&t>e[0]&&t<e[1]?{vmin:t,vmax:n,breakOption:r.breakOption,gapParsed:r.gapParsed,gapReal:r.gapReal}:null}function qA(r,e,t){var n=[];if(!r)return{breaks:n};function a(o,s){return o>=0&&o<1-1e-5}O(r,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:Me(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(ye(o.gap)){var u=ta(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;a(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var f=e(o.gap);(!isFinite(f)||f<0)&&(f=0),s.gapParsed.type="tpAbs",s.gapParsed.val=f}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),t&&t.noNegative&&O(["vmin","vmax"],function(v){s[v]<0&&(s[v]=0)}),s.vmin>s.vmax){var d=s.vmax;s.vmax=s.vmin,s.vmin=d}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var i=-1/0;return O(n,function(o,s){i>o.vmin&&(n[s]=null),i=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function tL(r,e){return ZA(e)===ZA(r)}function ZA(r){return r.start+"_\0_"+r.end}function Q_e(r,e,t){var n=[];O(r,function(i,o){var s=e(i);s&&s.type==="vmin"&&n.push([o])}),O(r,function(i,o){var s=e(i);if(s&&s.type==="vmax"){var l=Ml(n,function(u){return tL(e(r[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var a=[];return O(n,function(i){i.length===2&&a.push(t?i:[r[i[0]],r[i[1]]])}),a}function J_e(r,e,t,n){var a,i;if(r.break){var o=r.break.parsedBreak,s=Ml(t,function(f){return tL(f.breakOption,r.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"?sr(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};a={type:r.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},i=s[r.break.type]}return{brkRoundingCriterion:i,vBreak:a}}function eSe(r,e,t){var n={noNegative:!0},a=qA(r,t,n),i=qA(r,t,n),o=Math.log(e);return i.breaks=fe(i.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:a,parsedLogged:i}}var tSe={vmin:"start",vmax:"end"};function rSe(r,e){return e&&(r=r||{},r.break={type:tSe[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),r}function nSe(){Cae({createScaleBreakContext:q_e,pruneTicksByBreak:$_e,addBreaksToTicks:K_e,parseAxisBreakOption:qA,identifyAxisBreak:tL,serializeAxisBreakIdentifier:ZA,retrieveAxisBreakPairs:Q_e,getTicksLogTransformBreak:J_e,logarithmicParseBreaksFromOption:eSe,makeAxisLabelFormatterParamBreak:rSe})}var T4=Je();function aSe(r,e){var t=Ml(r,function(n){return dr().identifyAxisBreak(n.parsedBreak.breakOption,e.breakOption)});return t||r.push(t={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),t}function iSe(r){O(r,function(e){return e.shouldRemove=!0})}function oSe(r){for(var e=r.length-1;e>=0;e--)r[e].shouldRemove&&r.splice(e,1)}function sSe(r,e,t,n,a){var i=t.axis;if(i.scale.isBlank()||!dr())return;var o=dr().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(E){return E.break},!1);if(!o.length)return;var s=t.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 f=s.get("expandOnClick"),d=s.get("zigzagZ"),v=s.getModel("itemStyle"),g=v.getItemStyle(),x=g.stroke,y=g.lineWidth,b=g.lineDash,w=g.fill,T=new De({ignoreModelZ:!0}),C=i.isHorizontal(),D=T4(e).visualList||(T4(e).visualList=[]);iSe(D);for(var M=function(E){var k=o[E][0].break.parsedBreak,I=[];I[0]=i.toGlobalCoord(i.dataToCoord(k.vmin,!0)),I[1]=i.toGlobalCoord(i.dataToCoord(k.vmax,!0)),I[1]<I[0]&&I.reverse();var z=aSe(D,k);z.shouldRemove=!1;var P=new De;R(z.zigzagRandomList,P,I[0],I[1],C,k),f&&P.on("click",function(){var G={type:ub,breaks:[{start:k.breakOption.start,end:k.breakOption.end}]};G[i.dim+"AxisIndex"]=t.componentIndex,a.dispatchAction(G)}),P.silent=!f,T.add(P)},N=0;N<o.length;N++)M(N);r.add(T),oSe(D);function R(E,k,I,z,P,G){var U={stroke:x,lineWidth:y,lineDash:b,fill:"none"},B=P?0:1,F=1-B,H=n[Ve[F]]+n[vr[F]];function X(je){var Ne=[],at=[];Ne[B]=at[B]=je,Ne[F]=n[Ve[F]],at[F]=H;var ft={x1:Ne[0],y1:Ne[1],x2:at[0],y2:at[1]};return q1(ft,ft,{lineWidth:1}),Ne[0]=ft.x1,Ne[1]=ft.y1,Ne[B]}I=X(I),z=X(z);for(var V=[],W=[],$=!0,te=n[Ve[F]],ue=0;;ue++){var ge=te===n[Ve[F]],Se=te>=H;Se&&(te=H);var Xe=[],be=[];Xe[B]=I,be[B]=z,!ge&&!Se&&(Xe[B]+=$?-l:l,be[B]-=$?l:-l),Xe[F]=te,be[F]=te,V.push(Xe),W.push(be);var we=void 0;if(ue<E.length?we=E[ue]:(we=Math.random(),E.push(we)),te+=we*(c-u)+u,$=!$,Se)break}var ze=dr().serializeAxisBreakIdentifier(G.breakOption);if(k.add(new Fr({anid:"break_a_"+ze,shape:{points:V},style:U,z:d})),G.gapReal!==0){k.add(new Fr({anid:"break_b_"+ze,shape:{points:W},style:U,z:d}));var oe=W.slice();oe.reverse();var pe=V.concat(oe);k.add(new nn({anid:"break_c_"+ze,shape:{points:pe},style:{fill:w,opacity:g.opacity},z:d}))}}}function lSe(r,e,t,n){var a=r.axis,i=t.transform;tn(n.style);var o=a.getExtent();a.inverse&&(o=o.slice(),o.reverse());var s=dr().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(y){return y.break},!1),l=fe(s,function(y){var b=y[0].break.parsedBreak,w=[a.dataToCoord(b.vmin,!0),a.dataToCoord(b.vmax,!0)];return w[0]>w[1]&&w.reverse(),{coordPair:w,brkId:dr().serializeAxisBreakIdentifier(b.breakOption)}});l.sort(function(y,b){return y.coordPair[0]-b.coordPair[0]});for(var u=o[0],c=null,f=0;f<l.length;f++){var d=l[f],v=Math.max(d.coordPair[0],o[0]),g=Math.min(d.coordPair[1],o[1]);u<=v&&x(u,v,c,d),u=g,c=d}u<=o[1]&&x(u,o[1],c,null);function x(y,b,w,T){function C(I,z){i&&(Qt(I,I,i),Qt(z,z,i))}function D(I,z){var P={x1:I[0],y1:I[1],x2:z[0],y2:z[1]};q1(P,P,n.style),I[0]=P.x1,I[1]=P.y1,z[0]=P.x2,z[1]=P.y2}var M=[y,0],N=[b,0],R=[y,5],E=[b,5];C(M,R),D(M,R),C(N,E),D(N,E),D(M,N);var k=new lr(ie({shape:{x1:M[0],y1:M[1],x2:N[0],y2:N[1]}},n));e.add(k),k.anid="breakLine_"+(w?w.brkId:"\0")+"_\0_"+(T?T.brkId:"\0")}}function uSe(r,e,t){if(Ml(t,function(w){return!w}))return;var n=new ke;if(!sb(t[0],t[1],n,{direction:-(r?e+Math.PI:e),touchThreshold:0,bidirectional:!1}))return;var a=Dr();ns(a,a,-e);var i=fe(t,function(w){return w.transform?Qa(Dr(),a,w.transform):a});function o(w){var T=t[0].localRect,C=new ke(T[vr[w]]*i[0][0],T[vr[w]]*i[0][1]);return Math.abs(C.y)<1e-5}var s=.5;if(o(0)||o(1)){var l=fe(t,function(w,T){var C=w.localRect.clone();return C.applyTransform(i[T]),C}),u=new ke;u.copy(t[0].label).add(t[1].label).scale(.5),u.transform(a);var c=n.clone().transform(a),f=l[0].x+l[1].x+(c.x>=0?l[0].width:l[1].width),d=(f+c.x)/2-u.x,v=Math.min(d,d-c.x),g=Math.max(d,d-c.x),x=g<0?g:v>0?v:0;s=(d-x)/c.x}var y=new ke,b=new ke;ke.scale(y,n,-s),ke.scale(b,n,1-s),$C(t[0],y),$C(t[1],b)}function cSe(r,e){var t={breaks:[]};return O(e.breaks,function(n){if(n){var a=Ml(r.get("breaks",!0),function(s){return dr().identifyAxisBreak(s,n)});if(a){var i=e.type,o={isExpanded:!!a.isExpanded};a.isExpanded=i===ub?!0:i===d7?!1:i===v7?!a.isExpanded:a.isExpanded,t.breaks.push({start:a.start,end:a.end,isExpanded:!!a.isExpanded,old:o})}}}),t}function fSe(){ofe({adjustBreakLabelPair:uSe,buildAxisBreakLine:lSe,rectCoordBuildBreakAxis:sSe,updateModelAxisBreak:cSe})}function hSe(r){hfe(r),nSe(),fSe()}function dSe(){kfe(vSe)}function vSe(r,e){O(r,function(t){if(!t.model.get(["axisLabel","inside"])){var n=pSe(t);if(n){var a=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);e[a]-=n[a]+i,t.position==="top"?e.y+=n.height+i:t.position==="left"&&(e.x+=n.width+i)}}})}function pSe(r){var e=r.model,t=r.scale;if(!e.get(["axisLabel","show"])||t.isBlank())return;var n,a,i=t.getExtent();t instanceof Ih?a=t.count():(n=t.getTicks(),a=n.length);var o=r.getLabelModel(),s=sd(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var c=0;c<a;c+=u){var f=n?n[c]:{value:i[0]+c},d=s(f,c),v=o.getTextRect(d),g=x(v,o.get("rotate")||0);l?l.union(g):l=g}return l;function x(y,b){var w=b*Math.PI/180,T=y.width,C=y.height,D=T*Math.abs(Math.cos(w))+Math.abs(C*Math.sin(w)),M=T*Math.abs(Math.sin(w))+Math.abs(C*Math.cos(w)),N=new Ie(y.x,y.y,D,M);return N}}We([ace]);We([Jue]);We([Tce,Bce,Zce,Qfe,uhe,Qhe,Cde,lve,Nve,Pve,Hve,$ve,Fpe,dge,Tge,Vge,Uge,eme,sme,yme,Tme,Ime,yye]);We(zye);We(l0e);We(V7);We(b0e);We(AU);We(T0e);We(U0e);We(J0e);We(Bxe);We(a1e);We(Kg);We(b1e);We(w1e);We(k1e);We(G1e);We(X1e);We(J1e);We(ube);We(Dbe);We(E9);We(k9);We(qbe);We(j9);We(B9);We(Qbe);We(n_e);We(g_e);We(x_e);We(W_e);We(xue);We(hSe);We(dSe);We(Jfe);const gSe=Object.freeze(Object.defineProperty({__proto__:null,Axis:Ba,ChartView:_t,ComponentModel:Qe,ComponentView:Rt,List:vn,Model:et,PRIORITY:I8,SeriesModel:Tt,color:mte,connect:Sse,dataTool:Lse,dependencies:ase,disConnect:wse,disconnect:H8,dispose:Tse,env:nt,extendChartView:aue,extendComponentModel:tue,extendComponentView:rue,extendSeriesModel:nue,format:Vle,getCoordinateSystemDimensions:Ase,getInstanceByDom:RD,getInstanceById:Cse,getMap:Nse,graphic:Ble,helper:Rle,init:_se,innerDrawElementOnCanvas:MD,matrix:Wee,number:zle,parseGeoJSON:qC,parseGeoJson:qC,registerAction:li,registerCoordinateSystem:Y8,registerCustomSeries:Mse,registerLayout:W8,registerLoading:PD,registerLocale:aD,registerMap:X8,registerPostInit:F8,registerPostUpdate:U8,registerPreprocessor:kD,registerProcessor:ID,registerTheme:ED,registerTransform:q8,registerUpdateLifecycle:ob,registerVisual:Rl,setCanvasCreator:Dse,setPlatformAPI:NG,throttle:ab,time:jle,use:We,util:Gle,vector:Ree,version:nse,zrUtil:Tee,zrender:Jte},Symbol.toStringTag,{value:"Module"}));var To={},Co={},h2={},C4;function mSe(){return C4||(C4=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=1;r.default=function(){return"".concat(e++)}})(h2)),h2}var $v={},Kv={},d2={},A4;function X9(){return A4||(A4=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.default=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,a=null;return function(){for(var i=this,o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];clearTimeout(a),a=setTimeout(function(){t.apply(i,s)},n)}}})(d2)),d2}var Ao={},M4;function rL(){return M4||(M4=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.SizeSensorId=Ao.SensorTabIndex=Ao.SensorClassName=void 0,Ao.SizeSensorId="size-sensor-id",Ao.SensorClassName="size-sensor-object",Ao.SensorTabIndex="-1"),Ao}var D4;function ySe(){if(D4)return Kv;D4=1,Object.defineProperty(Kv,"__esModule",{value:!0}),Kv.createSensor=void 0;var r=t(X9()),e=rL();function t(n){return n&&n.__esModule?n:{default:n}}return Kv.createSensor=function(a,i){var o=void 0,s=[],l=function(){getComputedStyle(a).position==="static"&&(a.style.position="relative");var g=document.createElement("object");return g.onload=function(){g.contentDocument.defaultView.addEventListener("resize",u),u()},g.style.display="block",g.style.position="absolute",g.style.top="0",g.style.left="0",g.style.height="100%",g.style.width="100%",g.style.overflow="hidden",g.style.pointerEvents="none",g.style.zIndex="-1",g.style.opacity="0",g.setAttribute("class",e.SensorClassName),g.setAttribute("tabindex",e.SensorTabIndex),g.type="text/html",a.appendChild(g),g.data="about:blank",g},u=(0,r.default)(function(){s.forEach(function(v){v(a)})}),c=function(g){o||(o=l()),s.indexOf(g)===-1&&s.push(g)},f=function(){o&&o.parentNode&&(o.contentDocument&&o.contentDocument.defaultView.removeEventListener("resize",u),o.parentNode.removeChild(o),a.removeAttribute(e.SizeSensorId),o=void 0,s=[],i&&i())},d=function(g){var x=s.indexOf(g);x!==-1&&s.splice(x,1),s.length===0&&o&&f()};return{element:a,bind:c,destroy:f,unbind:d}},Kv}var Qv={},N4;function xSe(){if(N4)return Qv;N4=1,Object.defineProperty(Qv,"__esModule",{value:!0}),Qv.createSensor=void 0;var r=rL(),e=t(X9());function t(n){return n&&n.__esModule?n:{default:n}}return Qv.createSensor=function(a,i){var o=void 0,s=[],l=(0,e.default)(function(){s.forEach(function(v){v(a)})}),u=function(){var g=new ResizeObserver(l);return g.observe(a),l(),g},c=function(g){o||(o=u()),s.indexOf(g)===-1&&s.push(g)},f=function(){o&&o.disconnect(),s=[],o=void 0,a.removeAttribute(r.SizeSensorId),i&&i()},d=function(g){var x=s.indexOf(g);x!==-1&&s.splice(x,1),s.length===0&&o&&f()};return{element:a,bind:c,destroy:f,unbind:d}},Qv}var L4;function bSe(){if(L4)return $v;L4=1,Object.defineProperty($v,"__esModule",{value:!0}),$v.createSensor=void 0;var r=ySe(),e=xSe();return $v.createSensor=typeof ResizeObserver<"u"?e.createSensor:r.createSensor,$v}var R4;function _Se(){if(R4)return Co;R4=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.removeSensor=Co.getSensor=Co.Sensors=void 0;var r=n(mSe()),e=bSe(),t=rL();function n(o){return o&&o.__esModule?o:{default:o}}var a=Co.Sensors={};function i(o){o&&a[o]&&delete a[o]}return Co.getSensor=function(s){var l=s.getAttribute(t.SizeSensorId);if(l&&a[l])return a[l];var u=(0,r.default)();s.setAttribute(t.SizeSensorId,u);var c=(0,e.createSensor)(s,function(){return i(u)});return a[u]=c,c},Co.removeSensor=function(s){var l=s.element.getAttribute(t.SizeSensorId);s.destroy(),i(l)},Co}var E4;function SSe(){if(E4)return To;E4=1,Object.defineProperty(To,"__esModule",{value:!0}),To.ver=To.clear=To.bind=void 0;var r=_Se();return To.bind=function(t,n){var a=(0,r.getSensor)(t);return a.bind(n),function(){a.unbind(n)}},To.clear=function(t){var n=(0,r.getSensor)(t);(0,r.removeSensor)(n)},To.ver="1.0.3",To}var k4=SSe();function I4(r,e){var t={};return e.forEach(function(n){t[n]=r[n]}),t}function v2(r){return typeof r=="function"}function wSe(r){return typeof r=="string"}var p2,O4;function TSe(){return O4||(O4=1,p2=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,a,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(a=n;a--!==0;)if(!r(e[a],t[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[a]))return!1;for(a=n;a--!==0;){var o=i[a];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}),p2}var CSe=TSe();const Hf=KA(CSe);var ASe=(function(r){K(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=t.echarts,n.ele=null,n.isInitialResize=!0,n.eventHandlerRefs={},n}return e.prototype.componentDidMount=function(){this.renderNewEcharts()},e.prototype.componentDidUpdate=function(t){var n=this.props.shouldSetOption;if(!(v2(n)&&!n(t,this.props))){if(!Hf(t.theme,this.props.theme)||!Hf(t.opts,this.props.opts)){this.dispose(),this.renderNewEcharts();return}var a=this.getEchartsInstance();Hf(t.onEvents,this.props.onEvents)||(this.unbindEvents(a),this.bindEvents(a,this.props.onEvents));var i=["option","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption"];Hf(I4(this.props,i),I4(t,i))||this.updateEChartsOption(),(!Hf(t.style,this.props.style)||!Hf(t.className,this.props.className))&&this.resize()}},e.prototype.componentWillUnmount=function(){this.dispose()},e.prototype.initEchartsInstance=function(){return qI(this,void 0,void 0,function(){var t=this;return ZI(this,function(n){return[2,new Promise(function(a){t.echarts.init(t.ele,t.props.theme,t.props.opts);var i=t.getEchartsInstance();i.on("finished",function(){var o=t.ele.clientWidth,s=t.ele.clientHeight;t.echarts.dispose(t.ele);var l=yp({width:o,height:s},t.props.opts);a(t.echarts.init(t.ele,t.props.theme,l))})})]})})},e.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)},e.prototype.dispose=function(){if(this.ele){try{k4.clear(this.ele)}catch(t){console.warn(t)}this.echarts.dispose(this.ele)}},e.prototype.renderNewEcharts=function(){return qI(this,void 0,void 0,function(){var t,n,a,i,o,s,l=this;return ZI(this,function(u){switch(u.label){case 0:return t=this.props,n=t.onEvents,a=t.onChartReady,i=t.autoResize,o=i===void 0?!0:i,[4,this.initEchartsInstance()];case 1:return u.sent(),s=this.updateEChartsOption(),this.bindEvents(s,n||{}),v2(a)&&a(s),this.ele&&o&&k4.bind(this.ele,function(){l.resize()}),[2]}})})},e.prototype.bindEvents=function(t,n){var a=this,i=function(s,l){if(wSe(s)&&v2(l)){var u=function(c){l(c,t)};t.on(s,u),a.eventHandlerRefs[s]=u}};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&i(o,n[o])},e.prototype.unbindEvents=function(t){for(var n=0,a=Object.entries(this.eventHandlerRefs);n<a.length;n++){var i=a[n],o=i[0],s=i[1];t.off(o,s)}this.eventHandlerRefs={}},e.prototype.updateEChartsOption=function(){var t=this.props,n=t.option,a=t.notMerge,i=a===void 0?!1:a,o=t.replaceMerge,s=o===void 0?null:o,l=t.lazyUpdate,u=l===void 0?!1:l,c=t.showLoading,f=t.loadingOption,d=f===void 0?null:f,v=this.getEchartsInstance();return v.setOption(n,{notMerge:i,replaceMerge:s,lazyUpdate:u}),c?v.showLoading(d):v.hideLoading(),v},e.prototype.resize=function(){var t=this.getEchartsInstance();if(!this.isInitialResize)try{t.resize({width:"auto",height:"auto"})}catch(n){console.warn(n)}this.isInitialResize=!1},e.prototype.render=function(){var t=this,n=this.props,a=n.style,i=n.className,o=i===void 0?"":i;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=oee(n,["style","className","echarts","option","theme","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption","opts","onChartReady","onEvents","shouldSetOption","autoResize"]),l=yp({height:300},a);return oV.createElement("div",yp({ref:function(u){t.ele=u},style:l,className:"echarts-for-react ".concat(o)},s))},e})(q.PureComponent),MSe=(function(r){K(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=gSe,n}return e})(ASe);function DSe({connected:r}){return S.jsx("span",{className:Ge("inline-block w-2 h-2 rounded-full shrink-0",r?"bg-green-500":"bg-muted-foreground/40")})}function NSe({log:r}){return S.jsxs("div",{className:"flex items-start gap-3 py-1.5 border-b border-border/50 last:border-0",children:[S.jsx("span",{className:"text-[11px] text-muted-foreground font-mono shrink-0 pt-px",children:r.time}),S.jsx("span",{className:"text-[11px] text-muted-foreground/70 shrink-0 w-[88px] truncate",children:r.channel}),S.jsx("span",{className:"text-[12px] text-foreground",children:r.message})]})}function LSe({thisYear:r,lastYear:e}){const t=Array.from({length:52},(o,s)=>{const l=r.find(u=>u.week===s+1);return(l==null?void 0:l.count)??null}),n=Array.from({length:52},(o,s)=>{const l=e.find(u=>u.week===s+1);return(l==null?void 0:l.count)??null}),a=Array.from({length:52},(o,s)=>`${s+1}주`),i={animation:!0,grid:{top:8,right:8,bottom:24,left:36},xAxis:{type:"category",data:a,axisLabel:{interval:3,formatter:(o,s)=>{const u=[0,4,8,13,17,21,26,30,34,39,43,47].indexOf(s);return u>=0?`${u+1}월`:""},fontSize:10,color:"#999"},axisTick:{show:!1},axisLine:{show:!1},splitLine:{show:!0,interval:(o,s)=>["1주","5주","9주","14주","18주","22주","27주","31주","35주","40주","44주","48주"].includes(s),lineStyle:{color:"#e5e7eb",width:1}}},yAxis:{type:"value",axisLabel:{fontSize:10,color:"#999"},splitLine:{lineStyle:{color:"#f3f4f6"}},minInterval:1},series:[{name:"올해",type:"line",data:t,smooth:!0,symbol:"none",connectNulls:!1,lineStyle:{width:2.5,color:"hsl(var(--primary))"},itemStyle:{color:"hsl(var(--primary))"},emphasis:{focus:"none",lineStyle:{width:2.5,opacity:1}},blur:{lineStyle:{opacity:1,width:2.5}}},{name:"작년",type:"line",data:n,smooth:!0,symbol:"none",connectNulls:!1,lineStyle:{width:1.5,color:"#999",type:"dashed"},itemStyle:{color:"#999"},emphasis:{focus:"none",lineStyle:{width:1.5,opacity:1}},blur:{lineStyle:{opacity:1,width:1.5}}}],tooltip:{trigger:"axis",formatter:o=>{var u;const s=((u=o[0])==null?void 0:u.dataIndex)+1,l=o.filter(c=>c.value!=null).map(c=>`${c.seriesName}: ${c.value}건`).join("<br/>");return`${s}주차<br/>${l}`}},legend:{show:!1}};return S.jsx(MSe,{option:i,style:{height:160}})}function RSe(){const{data:r,isLoading:e}=nK(),{data:t}=Ng(),{data:n}=iG(),{data:a}=bK(),{data:i}=xK(),{data:o,isLoading:s}=sG(),{syncing:l,syncResult:u,handleSync:c}=lG(),[f,d]=q.useState("product");t==null||t.channels.filter(M=>M.connected).length;const v=(r==null?void 0:r.operations.actionNeeded)??0;function g(M,N){return N?Math.round((M-N)/N*100):null}function x(M){return M===null?"-":M>=0?`+${M}%`:`${M}%`}const y=g((a==null?void 0:a.thisMonth.revenue)??0,(a==null?void 0:a.lastMonth.revenue)??0),b=g((a==null?void 0:a.thisMonth.revenue)??0,(a==null?void 0:a.lastYearSameMonth.revenue)??0),w=g((a==null?void 0:a.thisWeek.count)??0,(a==null?void 0:a.lastWeek.count)??0),T={pending:"결제대기",paid:"결제완료",preparing:"발송준비",shipped:"배송중",delivered:"배송완료",cancelled:"취소"},C=(n==null?void 0:n.settlement)??[],D=Math.max(...C.map(M=>M.netRevenue??0),1);return e?S.jsxs("div",{children:[S.jsx("h2",{className:"text-xl font-medium mb-6",children:"Overview"}),S.jsx("div",{className:"text-sm text-muted-foreground",children:"로딩 중..."})]}):S.jsxs("div",{children:[S.jsxs("div",{className:"flex items-center justify-between mb-6",children:[S.jsx("h2",{className:"text-xl font-medium",children:"Overview"}),S.jsxs("div",{className:"flex items-center gap-2",children:[v>0&&S.jsxs("div",{className:"flex items-center gap-1.5 text-[12px] text-amber-600 bg-amber-50 dark:bg-amber-950/30 dark:text-amber-400 border border-amber-200 dark:border-amber-800 rounded px-2.5 py-1",children:[S.jsx(fG,{size:12}),"처리 필요 주문 ",v,"건"]}),u&&S.jsx("span",{className:"text-[11px] text-muted-foreground",children:u}),S.jsxs("button",{type:"button",onClick:c,disabled:l,className:"flex items-center gap-1.5 text-[12px] text-muted-foreground hover:text-foreground border border-border rounded px-2.5 py-1 transition-colors disabled:opacity-50",children:[S.jsx(vG,{size:12,className:l?"animate-spin":""}),l?"동기화 중...":"주문 동기화"]})]})]}),S.jsxs("div",{className:"grid grid-cols-6 gap-3 mb-6",children:[S.jsx(Qr,{label:"오늘 주문",value:(a==null?void 0:a.today.count)??"-",sub:"건"}),S.jsx(Qr,{label:"처리 필요 주문",value:v,sub:"결제대기 + 결제완료",highlight:v>0,onClick:()=>{window.location.hash="orders?status=pending,paid"}}),S.jsx(Qr,{label:"이번 달 매출",value:a?`${Math.round(a.thisMonth.revenue/1e4).toLocaleString()}만`:"-",sub:y!==null?`전월比 ${x(y)}`:"전월 데이터 없음",highlight:y!==null&&y>0}),S.jsx(Qr,{label:"이번 달 주문",value:(a==null?void 0:a.thisMonth.count)??"-",sub:"건"}),S.jsx(Qr,{label:"누적 주문",value:(n==null?void 0:n.totalOrders.toLocaleString())??"-"}),S.jsx(Qr,{label:"누적 매출",value:`${Math.round(((n==null?void 0:n.totalRevenue)??0)/1e4).toLocaleString()}만원`})]}),S.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-6",children:[S.jsxs("div",{className:"border border-border rounded-lg bg-card p-4",children:[S.jsxs("div",{className:"flex items-center gap-1.5 text-[12px] font-medium",children:[S.jsx(dG,{size:13}),"판매채널"]}),S.jsx("div",{className:"text-[10px] text-muted-foreground opacity-60 mb-3",children:"API 연결 상태"}),S.jsx("div",{className:"space-y-1.5 mb-3",children:((r==null?void 0:r.listing.channels)??(t==null?void 0:t.channels)??[]).map(M=>S.jsxs("div",{className:"flex items-center gap-2 text-[12px]",children:[S.jsx(DSe,{connected:M.connected}),S.jsx("span",{className:"text-foreground",children:M.channel}),M.connected?S.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:M.storeId}):S.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:"미연결"})]},M.channel))}),((r==null?void 0:r.listing.recentLogs)??[]).length>0&&S.jsx("div",{className:"pt-2 border-t border-border/50",children:r==null?void 0:r.listing.recentLogs.map((M,N)=>S.jsx("div",{className:"text-[11px] text-muted-foreground py-0.5 truncate",children:M.message},`${N}-${M.message}`))})]}),S.jsxs("div",{className:"border border-border rounded-lg bg-card p-4",children:[S.jsxs("div",{className:"flex items-center gap-1.5 text-[12px] font-medium",children:[S.jsx(Vp,{size:13}),"채널별 주문"]}),S.jsx("div",{className:"text-[10px] text-muted-foreground opacity-60 mb-3",children:"임포트 데이터 기준 (API+CSV 포함)"}),C.length>0?(()=>{const M=Math.max(...C.map(N=>N.orderCount),1);return S.jsx("div",{className:"space-y-2",children:[...C].sort((N,R)=>R.orderCount-N.orderCount).map(N=>S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("span",{className:"text-[11px] w-[72px] shrink-0 truncate",children:Gi[N.channel]??N.channel}),S.jsx("div",{className:"flex-1 min-w-0",children:S.jsx("div",{className:"w-full bg-muted rounded-full h-1.5",children:S.jsx("div",{className:"h-full bg-primary/50 rounded-full",style:{width:`${N.orderCount/M*100}%`}})})}),S.jsx("span",{className:"text-[11px] text-muted-foreground shrink-0 w-8 text-right",children:N.orderCount.toLocaleString()})]},N.channel))})})():S.jsx("div",{className:"text-[12px] text-muted-foreground",children:"데이터 없음"})]}),S.jsxs("div",{className:"border border-border rounded-lg bg-card p-4",children:[S.jsxs("div",{className:"flex items-center gap-1.5 mb-3 text-[12px] font-medium",children:[S.jsx(gG,{size:13}),"주문상태"]}),r!=null&&r.operations.orderSummary&&Object.keys(r.operations.orderSummary).length>0?S.jsx("div",{className:"space-y-1 mb-3",children:Object.entries(r.operations.orderSummary).map(([M,N])=>S.jsxs("div",{className:"flex items-center justify-between text-[12px]",children:[S.jsx("span",{className:"text-muted-foreground",children:T[M]??M}),S.jsxs("span",{className:"font-medium",children:[N,"건"]})]},M))}):S.jsx("div",{className:"text-[12px] text-muted-foreground mb-3",children:"주문 데이터 없음"}),(r==null?void 0:r.operations.orderCacheAge)!==null&&(r==null?void 0:r.operations.orderCacheAge)!==void 0&&S.jsxs("div",{className:"text-[10px] text-muted-foreground/60 pt-2 border-t border-border/50",children:[Math.floor(r.operations.orderCacheAge/60),"분 전 갱신"]})]})]}),S.jsxs("div",{className:"grid grid-cols-[1fr_2fr_1fr] gap-4 mb-6",children:[S.jsxs("div",{className:"border border-border rounded-lg bg-card p-4",children:[S.jsxs("div",{className:"flex items-center justify-between mb-3",children:[S.jsxs("div",{className:"flex items-center gap-1.5 text-[12px] font-medium",children:[S.jsx(Vp,{size:13}),"매출 랭킹"]}),S.jsx("div",{className:"flex gap-0.5",children:["product","sku","category","line"].map(M=>S.jsx("button",{type:"button",onClick:()=>d(M),className:Ge("text-[10px] px-1.5 py-0.5 rounded transition-colors",f===M?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:M==="product"?"상품":M==="sku"?"SKU":M==="category"?"카테고리":"제품라인"},M))})]}),s?S.jsx("div",{className:"text-[11px] text-muted-foreground",children:"로딩 중..."}):(()=>{var R;let M=[];if(f==="product"?M=[...(o==null?void 0:o.catalog)??[]].sort((E,k)=>k.totalRevenue-E.totalRevenue).slice(0,8).map(E=>({key:E.productName,label:E.productName,totalRevenue:E.totalRevenue})):f==="sku"?M=[...(o==null?void 0:o.catalog)??[]].sort((E,k)=>k.totalRevenue-E.totalRevenue).slice(0,8).map(E=>({key:E.sku,label:E.sku||E.productName,totalRevenue:E.totalRevenue})):f==="category"?M=[...(o==null?void 0:o.byCategory)??[]].sort((E,k)=>k.totalRevenue-E.totalRevenue).slice(0,8).map(E=>({key:E.category,label:E.category||"미분류",totalRevenue:E.totalRevenue})):M=[...(o==null?void 0:o.byLine)??[]].sort((E,k)=>k.totalRevenue-E.totalRevenue).slice(0,8).map(E=>({key:E.productLine,label:E.productLine||"미분류",totalRevenue:E.totalRevenue})),M.length===0)return S.jsx("div",{className:"text-[11px] text-muted-foreground",children:"데이터 없음"});const N=((R=M[0])==null?void 0:R.totalRevenue)??1;return S.jsx("div",{className:"space-y-2",children:M.map((E,k)=>S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("span",{className:"text-[10px] text-muted-foreground w-3 text-right shrink-0",children:k+1}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[S.jsx("span",{className:"text-[11px] truncate",children:E.label}),S.jsxs("span",{className:"text-[10px] text-muted-foreground ml-1 shrink-0",children:[Math.round(E.totalRevenue/1e4).toLocaleString(),"만"]})]}),S.jsx("div",{className:"w-full bg-muted rounded-full h-1",children:S.jsx("div",{className:"h-full bg-primary/50 rounded-full",style:{width:`${E.totalRevenue/N*100}%`}})})]})]},E.key||k))})})(),(f==="category"||f==="line")&&((o==null?void 0:o.unmappedCount)??0)>0&&S.jsxs("div",{className:"mt-2 text-[10px] text-muted-foreground/60 border-t border-border/50 pt-1.5",children:["미매핑 ",o==null?void 0:o.unmappedCount,"건 제외"]})]}),C.length>0?S.jsxs("div",{className:"border border-border rounded-lg bg-card p-4",children:[S.jsx("div",{className:"text-[12px] font-medium mb-3",children:"채널별 정산 현황"}),S.jsxs("table",{className:"w-full text-[12px]",style:{borderCollapse:"collapse"},children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border",children:[S.jsx("th",{className:"py-1.5 text-left text-[11px] font-semibold text-muted-foreground",children:"채널"}),S.jsx("th",{className:"py-1.5 text-right text-[11px] font-semibold text-muted-foreground",children:"주문"}),S.jsx("th",{className:"py-1.5 text-right text-[11px] font-semibold text-muted-foreground",children:"매출"}),S.jsx("th",{className:"py-1.5 text-right text-[11px] font-semibold text-muted-foreground",children:"수수료율"}),S.jsx("th",{className:"py-1.5 text-right text-[11px] font-semibold text-muted-foreground",children:"순수익"})]})}),S.jsx("tbody",{children:C.map(M=>S.jsxs("tr",{className:"border-b border-border/50",children:[S.jsx("td",{className:"py-1.5",children:Gi[M.channel]??M.channel}),S.jsx("td",{className:"py-1.5 text-right text-muted-foreground",children:M.orderCount.toLocaleString()}),S.jsxs("td",{className:"py-1.5 text-right font-medium",children:[Math.round(M.totalRevenue/1e4).toLocaleString(),"만"]}),S.jsx("td",{className:"py-1.5 text-right text-muted-foreground",children:M.avgCommissionRate!=null?`${(M.avgCommissionRate*100).toFixed(1)}%`:"-"}),S.jsx("td",{className:"py-1.5 text-right text-emerald-600 dark:text-emerald-400 font-medium",children:M.netRevenue!=null?`${Math.round(M.netRevenue/1e4).toLocaleString()}만`:"-"})]},M.channel))})]})]}):S.jsx("div",{className:"border border-border rounded-lg bg-card p-4 flex items-center justify-center text-[12px] text-muted-foreground",children:"정산 데이터 없음"}),S.jsxs("div",{className:"border border-border rounded-lg bg-card p-4",children:[S.jsxs("div",{className:"flex items-center gap-1.5 mb-3 text-[12px] font-medium",children:[S.jsx(CK,{size:13}),"공헌이익 순위"]}),C.length>0?S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"space-y-2",children:[...C].filter(M=>M.netRevenue!=null).sort((M,N)=>(N.netRevenue??0)-(M.netRevenue??0)).slice(0,8).map((M,N)=>{const R=(M.netRevenue??0)/D*100;return S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("span",{className:"text-[10px] text-muted-foreground w-3 text-right shrink-0",children:N+1}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[S.jsx("span",{className:"text-[11px] truncate",children:Gi[M.channel]??M.channel}),S.jsxs("span",{className:"text-[10px] text-emerald-600 dark:text-emerald-400 ml-1 shrink-0",children:[Math.round((M.netRevenue??0)/1e4).toLocaleString(),"만"]})]}),S.jsx("div",{className:"w-full bg-muted rounded-full h-1",children:S.jsx("div",{className:"h-full bg-emerald-500/50 rounded-full",style:{width:`${R}%`}})})]})]},M.channel)})}),S.jsx("div",{className:"mt-2 text-[10px] text-muted-foreground/60 border-t border-border/50 pt-1.5",children:"채널별 순수익 기준 · 채널×카테고리 조합 추후 지원"})]}):S.jsx("div",{className:"text-[12px] text-muted-foreground",children:"데이터 없음"})]})]}),(a||i)&&S.jsxs("div",{className:"border border-border rounded-lg bg-card p-4 mb-6",children:[S.jsxs("div",{className:"flex items-center gap-1.5 mb-4 text-[12px] font-medium",children:[S.jsx(ll,{size:13}),"성장 트렌드"]}),S.jsxs("div",{className:"grid grid-cols-[200px_1fr] gap-6",children:[S.jsx("div",{className:"space-y-3",children:[{label:"전월비 MoM",pct:y,sub:"이번달 매출 기준"},{label:"전년동월비 YoY",pct:b,sub:"이번달 매출 기준"},{label:"전주비 WoW",pct:w,sub:"이번주 주문 기준"}].map(({label:M,pct:N,sub:R})=>S.jsxs("div",{children:[S.jsx("div",{className:"text-[10px] text-muted-foreground opacity-60",children:M}),S.jsxs("div",{className:Ge("text-[18px] font-semibold flex items-center gap-1",N===null?"text-muted-foreground":N>=0?"text-emerald-600 dark:text-emerald-400":"text-red-500"),children:[N!==null&&(N>=0?S.jsx(ll,{size:14}):S.jsx(mG,{size:14})),x(N)]}),S.jsx("div",{className:"text-[10px] text-muted-foreground opacity-60",children:R})]},M))}),S.jsxs("div",{children:[S.jsxs("div",{className:"flex items-center gap-3 mb-2 text-[10px] text-muted-foreground",children:[S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx("span",{className:"inline-block w-4 h-0.5 bg-primary rounded"}),"올해"]}),S.jsxs("span",{className:"flex items-center gap-1 opacity-40",children:[S.jsx("span",{className:"inline-block w-4 h-0.5 bg-muted-foreground rounded"}),"작년"]}),S.jsx("span",{className:"ml-auto opacity-60",children:"주간 주문 건수"})]}),i?S.jsx(LSe,{thisYear:i.thisYear,lastYear:i.lastYear}):S.jsx("div",{className:"h-[72px] flex items-center justify-center text-[11px] text-muted-foreground",children:"로딩 중..."})]})]})]}),S.jsxs("div",{className:"border border-border rounded-lg bg-card p-4",children:[S.jsxs("div",{className:"text-[12px] font-medium mb-3 flex items-center gap-1.5",children:[S.jsx(zK,{size:12}),"최근 활동"]}),((r==null?void 0:r.logs)??[]).length===0?S.jsx("div",{className:"text-[12px] text-muted-foreground py-3 text-center",children:"활동 없음"}):S.jsx("div",{children:((r==null?void 0:r.logs)??[]).slice(0,10).map((M,N)=>S.jsx(NSe,{log:M},N))})]})]})}function E0(r){return`${Math.round(r/1e4).toLocaleString()}만원`}function P4({label:r,options:e,selected:t,onToggle:n,onClear:a}){const[i,o]=q.useState(!1);return S.jsxs("div",{className:"relative",children:[S.jsxs("button",{type:"button",onClick:()=>o(!i),className:Ge("flex items-center gap-1 text-[12px] px-2.5 py-1 rounded-md border cursor-pointer transition-colors",t.size>0?"border-primary/40 bg-primary/5 text-foreground":"border-border bg-card text-muted-foreground"),children:[r,t.size>0&&S.jsx("span",{className:"text-[10px] font-semibold bg-primary/10 text-primary px-1 rounded",children:t.size}),S.jsx(_n,{size:12,className:Ge("transition-transform",i&&"rotate-180")})]}),i&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>o(!1)}),S.jsxs("div",{className:"absolute top-full left-0 mt-1 z-20 bg-card border border-border rounded-lg shadow-lg py-1 min-w-[160px] max-h-[280px] overflow-y-auto",children:[t.size>0&&S.jsxs("button",{type:"button",onClick:()=>{a(),o(!1)},className:"w-full text-left px-3 py-1.5 text-[11px] text-muted-foreground hover:bg-muted/50 flex items-center gap-1",children:[S.jsx(oc,{size:10})," 초기화"]}),e.map(s=>S.jsxs("label",{className:"flex items-center gap-2 px-3 py-1.5 text-[12px] hover:bg-muted/50 cursor-pointer",children:[S.jsx("input",{type:"checkbox",checked:t.has(s),onChange:()=>n(s),className:"rounded border-border"}),s||"(미분류)"]},s))]})]})]})}function ESe(){const[r,e]=q.useState(""),[t,n]=q.useState(""),a=q.useMemo(()=>{const oe={};return r&&(oe.from=r),t&&(oe.to=t),Object.keys(oe).length>0?oe:void 0},[r,t]),{data:i,isLoading:o,error:s}=sG(a),[l,u]=q.useState("category"),[c,f]=q.useState(new Set),[d,v]=q.useState(new Set),[g,x]=q.useState(new Set),[y,b]=q.useState(!1),[w,T]=q.useState(null),[C,D]=q.useState(""),[M,N]=q.useState(!1),[R,E]=q.useState(""),[k,I]=q.useState(!1),z=q.useCallback(async()=>{if(y){b(!1),N(!1);return}try{const pe=await(await fetch("/api/product-rules")).json();T(pe.content),D(pe.path),b(!0)}catch{b(!0)}},[y]),P=q.useCallback(()=>{E(w??""),N(!0)},[w]),G=q.useCallback(async()=>{I(!0);try{await fetch("/api/product-rules",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:R})}),T(R),N(!1)}finally{I(!1)}},[R]),U=(i==null?void 0:i.catalog)??[],B=(i==null?void 0:i.byCategory)??[],F=(i==null?void 0:i.byLine)??[],H=q.useMemo(()=>U.filter(oe=>!(d.size>0&&!d.has(oe.category??"")||g.size>0&&!g.has(oe.productLine??""))),[U,d,g]),X=q.useMemo(()=>[...H].sort((oe,pe)=>pe.totalRevenue-oe.totalRevenue),[H]),V=q.useMemo(()=>{const oe=new Map;for(const pe of X){const je=`${pe.productName}||${pe.brand??""}||${pe.productLine??""}`,Ne=oe.get(je);Ne?(Ne.skus.push(pe),Ne.totalQuantity+=pe.totalQuantity,Ne.totalRevenue+=pe.totalRevenue,Ne.orderCount+=pe.orderCount):oe.set(je,{key:je,productName:pe.productName,brand:pe.brand,productLine:pe.productLine,category:pe.category,skus:[pe],totalQuantity:pe.totalQuantity,totalRevenue:pe.totalRevenue,orderCount:pe.orderCount})}return[...oe.values()].sort((pe,je)=>je.totalRevenue-pe.totalRevenue)},[X]),W=oe=>{f(pe=>{const je=new Set(pe);return je.has(oe)?je.delete(oe):je.add(oe),je})},$=q.useMemo(()=>U.reduce((oe,pe)=>oe+pe.totalQuantity,0),[U]),te=q.useMemo(()=>U.reduce((oe,pe)=>oe+pe.totalRevenue,0),[U]),ue=q.useMemo(()=>[...new Set(U.map(oe=>oe.category??""))].sort(),[U]),ge=q.useMemo(()=>[...new Set(U.map(oe=>oe.productLine??""))].sort(),[U]),Se=q.useMemo(()=>Math.max(...B.map(oe=>oe.totalRevenue),1),[B]),Xe=q.useMemo(()=>Math.max(...F.map(oe=>oe.totalRevenue),1),[F]),be=(oe,pe)=>{const je=new Set(oe);return je.has(pe)?je.delete(pe):je.add(pe),je},we=d.size>0||g.size>0,ze=!!r||!!t;return o?S.jsxs("div",{children:[S.jsx("h2",{className:"text-xl font-medium mb-6",children:"상품"}),S.jsx("div",{className:"text-sm text-muted-foreground py-8 text-center",children:"불러오는 중..."})]}):s?S.jsxs("div",{children:[S.jsx("h2",{className:"text-xl font-medium mb-6",children:"상품"}),S.jsx("div",{className:"text-sm text-destructive py-8 text-center",children:"카탈로그 조회 실패"})]}):U.length===0&&!ze?S.jsxs("div",{children:[S.jsx("h2",{className:"text-xl font-medium mb-6",children:"상품"}),S.jsxs("div",{className:"border border-dashed border-border rounded-lg p-12 text-center text-muted-foreground text-sm",children:["상품 카탈로그가 비어있습니다.",S.jsx("div",{className:"text-[11px] mt-1",children:"sppt product parse 스킬로 상품명을 해체하세요."})]})]}):S.jsxs("div",{children:[S.jsxs("div",{className:"flex items-center justify-between mb-4",children:[S.jsx("h2",{className:"text-xl font-medium",children:"상품"}),S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsxs("button",{type:"button",onClick:z,className:Ge("flex items-center gap-1.5 text-[12px] px-2.5 py-1 rounded-md border cursor-pointer transition-colors",y?"border-primary bg-primary text-primary-foreground":"border-primary bg-primary text-primary-foreground hover:opacity-90"),children:[S.jsx(II,{size:12}),"분류 규칙"]}),S.jsxs("span",{className:"text-[12px] text-muted-foreground",children:["총 ",U.length.toLocaleString(),"개 SKU"]})]})]}),S.jsx(mM,{from:r,to:t,onChange:(oe,pe)=>{e(oe),n(pe)},className:"mb-5"}),y&&S.jsxs("div",{className:"border border-border rounded-lg bg-card mb-6 overflow-hidden",children:[S.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border bg-muted/40",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(II,{size:13,className:"text-muted-foreground"}),S.jsx("span",{className:"text-[12px] font-medium",children:"분류 규칙"}),C&&S.jsx("span",{className:"text-[10px] text-muted-foreground font-mono",children:C})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[M?S.jsxs(S.Fragment,{children:[S.jsx("button",{type:"button",onClick:()=>N(!1),className:"text-[11px] px-2 py-0.5 rounded border border-border text-muted-foreground hover:text-foreground cursor-pointer",children:"취소"}),S.jsx("button",{type:"button",onClick:G,disabled:k,className:"text-[11px] px-2.5 py-0.5 rounded bg-primary text-primary-foreground cursor-pointer disabled:opacity-50",children:k?"저장 중...":"저장"})]}):S.jsx("button",{type:"button",onClick:P,className:"text-[11px] px-2.5 py-0.5 rounded border border-border bg-secondary text-foreground hover:bg-muted cursor-pointer",children:"편집"}),S.jsx("button",{type:"button",onClick:()=>{b(!1),N(!1)},className:"text-muted-foreground hover:text-foreground cursor-pointer",children:S.jsx(oc,{size:14})})]})]}),S.jsx("div",{className:"px-4 py-2 text-[11px] text-muted-foreground border-b border-border/50 bg-muted/20",children:"AI가 이 규칙을 바탕으로 주문 데이터의 상품명을 SKU, 카테고리, 제품라인 단위로 자동 분류합니다."}),S.jsx("div",{className:"px-4 py-3 max-h-[400px] overflow-y-auto",children:M?S.jsx("textarea",{value:R,onChange:oe=>E(oe.target.value),className:"w-full h-[350px] text-[11px] leading-relaxed bg-transparent outline-none resize-none font-sans text-foreground/90",placeholder:`예시:
293
-
294
- ## 카테고리 분류
295
- - 프라이팬/웍: '팬', '웍' 류
296
- - 냄비: '냄비', '쿠커' 포함
297
-
298
- ## 제품 라인
299
- - 디피니티, 엑스클립스 ...`}):w?S.jsx("pre",{className:"text-[11px] leading-relaxed text-foreground/80 whitespace-pre-wrap font-sans",children:w}):S.jsxs("div",{className:"text-[12px] text-muted-foreground py-4 text-center",children:["분류 규칙이 등록되지 않았습니다.",S.jsxs("div",{className:"text-[11px] mt-1",children:[S.jsx("button",{type:"button",onClick:P,className:"underline cursor-pointer",children:"여기서 직접 작성"}),"하거나 AI(e.g. Claude Code 등)에서 알려주세요."]})]})}),S.jsxs("div",{className:"px-4 py-2.5 border-t border-border bg-muted/20 text-[11px] text-muted-foreground",children:[S.jsx("span",{className:"font-medium text-foreground/70",children:"Tip"})," 분류 규칙은 자연어로 자유롭게 작성하세요. AI(e.g. Claude Code 등)에서"," ",S.jsx("span",{className:"font-mono bg-muted/40 px-1 rounded text-[10px]",children:"우리 상품 분류 규칙 이렇게 바꿔줘"})," ","라고 하면 AI가 이 파일을 직접 수정합니다. 규칙 작성 후"," ",S.jsx("span",{className:"font-mono bg-muted/40 px-1 rounded text-[10px]",children:"상품명 분석해줘"})," ","로 카탈로그를 자동 구축할 수 있습니다."]})]}),S.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[S.jsx(Qr,{label:"카탈로그 SKU",value:U.length.toLocaleString()}),S.jsx(Qr,{label:"미매핑 상품",value:(i==null?void 0:i.unmappedCount)??0,warn:((i==null?void 0:i.unmappedCount)??0)>0}),S.jsx(Qr,{label:"총 판매 수량",value:$.toLocaleString(),sub:"개"}),S.jsx(Qr,{label:"총 매출",value:E0(te)})]}),S.jsxs("div",{className:"border border-border/50 rounded-lg bg-muted/10 px-4 py-3 mb-6 text-[11px] text-muted-foreground space-y-1.5",children:[S.jsxs("div",{className:"flex gap-6",children:[S.jsx("span",{className:"shrink-0 font-medium text-foreground/50 w-16",children:"상품 분류"}),S.jsxs("span",{children:["위 ",S.jsx("span",{className:"text-foreground/70 font-medium",children:"분류 규칙"})," 버튼에서 규칙을 작성해두면, AI에서"," ",S.jsx("span",{className:"font-mono bg-muted/60 px-1 rounded",children:"상품명 분석해줘"})," 한마디로 상품 목록이 자동으로 구축됩니다."]})]}),S.jsxs("div",{className:"flex gap-6",children:[S.jsx("span",{className:"shrink-0 font-medium text-foreground/50 w-16",children:"원가 등록"}),S.jsxs("span",{children:["매입단가·택배비 등이 담긴 엑셀 파일을 AI에 붙여넣고 입력해달라고 하면,"," ",S.jsx("span",{className:"font-mono bg-muted/60 px-1 rounded",children:"sppt cost set"})," 커맨드로 알아서 처리해줍니다. 단품 기준으로 공헌이익이 계산됩니다."]})]})]}),S.jsxs("div",{className:"flex items-center justify-between mb-4",children:[S.jsx("span",{className:"text-[13px] font-medium",children:"판매요약"}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("button",{type:"button",onClick:()=>u("category"),className:Ge("text-[12px] px-3 py-1.5 rounded-md border transition-colors cursor-pointer",l==="category"?"border-primary/40 bg-primary/5 text-foreground font-medium":"border-border bg-card text-muted-foreground"),children:"카테고리별"}),S.jsx("button",{type:"button",onClick:()=>u("line"),className:Ge("text-[12px] px-3 py-1.5 rounded-md border transition-colors cursor-pointer",l==="line"?"border-primary/40 bg-primary/5 text-foreground font-medium":"border-border bg-card text-muted-foreground"),children:"제품라인별"})]})]}),S.jsx("div",{className:"border border-border rounded-lg overflow-hidden mb-6",children:S.jsxs("table",{className:"w-full text-[12px] border-collapse",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border bg-muted/40 text-[11px] font-semibold text-muted-foreground",children:[S.jsx("th",{className:"px-3 py-2 text-left",children:l==="category"?"카테고리":"제품라인"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"주문수"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"판매 수량"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"매출"}),S.jsx("th",{className:"px-3 py-2 text-right w-[60px]",children:"비중(%)"}),S.jsx("th",{className:"px-3 py-2 w-[120px]"})]})}),S.jsx("tbody",{className:"bg-card",children:(l==="category"?B:F).map((oe,pe)=>{const je=l==="category"?oe.category:oe.productLine,Ne=l==="category"?Se:Xe,at=te>0?oe.totalRevenue/te*100:0,ft=Ne>0?oe.totalRevenue/Ne*100:0;return S.jsxs("tr",{className:Ge("border-b border-border/60",pe%2!==0&&"bg-muted/5"),children:[S.jsx("td",{className:"px-3 py-2",children:je||"(미분류)"}),S.jsx("td",{className:"px-3 py-2 text-right",children:oe.orderCount.toLocaleString()}),S.jsx("td",{className:"px-3 py-2 text-right",children:oe.totalQuantity.toLocaleString()}),S.jsx("td",{className:"px-3 py-2 text-right",children:E0(oe.totalRevenue)}),S.jsx("td",{className:"px-3 py-2 text-right",children:at.toFixed(1)}),S.jsx("td",{className:"px-3 py-2",children:S.jsx("div",{className:"h-2 rounded-full bg-muted/30 overflow-hidden",children:S.jsx("div",{className:"h-full rounded-full bg-primary/60",style:{width:`${ft}%`}})})})]},je)})})]})}),S.jsxs("div",{className:"flex items-center justify-between mb-3",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("span",{className:"text-[12px] font-medium",children:"상품 목록"}),S.jsx(P4,{label:"카테고리",options:ue,selected:d,onToggle:oe=>v(be(d,oe)),onClear:()=>v(new Set)}),S.jsx(P4,{label:"제품라인",options:ge,selected:g,onToggle:oe=>x(be(g,oe)),onClear:()=>x(new Set)}),we&&S.jsxs(S.Fragment,{children:[S.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[V.length,"개 상품"]}),S.jsxs("button",{type:"button",onClick:()=>{v(new Set),x(new Set)},className:"text-[11px] text-muted-foreground hover:text-foreground flex items-center gap-0.5 cursor-pointer",children:[S.jsx(oc,{size:11})," 초기화"]})]})]}),S.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[V.length,"개 상품 · ",X.length,"개 품목"]})]}),S.jsx("div",{className:"border border-border rounded-lg overflow-hidden",children:S.jsxs("table",{className:"w-full text-[12px] border-collapse",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border bg-muted/40 text-[11px] font-semibold text-muted-foreground",children:[S.jsx("th",{className:"px-3 py-2 text-left w-6"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"상품명"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"브랜드"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"제품라인"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"카테고리"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"SKU수"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"수량"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"매출"})]})}),S.jsxs("tbody",{className:"bg-card",children:[V.map((oe,pe)=>{const je=c.has(oe.key);return S.jsxs(S.Fragment,{children:[S.jsxs("tr",{className:Ge("border-b border-border/60 cursor-pointer hover:bg-muted/30 transition-colors",pe%2!==0&&"bg-muted/5",je&&"bg-primary/5 border-primary/20"),onClick:()=>W(oe.key),onKeyDown:Ne=>{(Ne.key==="Enter"||Ne.key===" ")&&W(oe.key)},children:[S.jsx("td",{className:"px-3 py-2 text-muted-foreground/50 w-6",children:je?S.jsx(_n,{size:13}):S.jsx(On,{size:13})}),S.jsx("td",{className:"px-3 py-2 font-medium max-w-[260px] truncate",title:oe.productName,children:oe.productName}),S.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:oe.brand??"-"}),S.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:oe.productLine||"(미분류)"}),S.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:oe.category||"(미분류)"}),S.jsx("td",{className:"px-3 py-2 text-right text-muted-foreground",children:oe.skus.length}),S.jsx("td",{className:"px-3 py-2 text-right",children:oe.totalQuantity.toLocaleString()}),S.jsx("td",{className:"px-3 py-2 text-right",children:E0(oe.totalRevenue)})]},oe.key),je&&oe.skus.map(Ne=>{const at=Ne.contributionMargin,ft=at===null?"text-muted-foreground/40":at>=0?"text-emerald-600 dark:text-emerald-400":"text-red-500";return S.jsxs("tr",{className:"border-b border-border/40 bg-muted/20",children:[S.jsx("td",{className:"py-1.5 w-6"}),S.jsx("td",{className:"pl-6 pr-3 py-1.5 text-muted-foreground",colSpan:1,children:S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("span",{className:"font-mono text-[10px] bg-muted/60 px-1.5 py-0.5 rounded shrink-0",children:Ne.sku}),S.jsx("span",{className:"text-[11px] text-foreground/80",children:[Ne.productName,Ne.option].filter(Boolean).join(" / ")})]})}),S.jsxs("td",{colSpan:3,className:"px-3 py-1.5 text-[11px] text-muted-foreground/60",children:["판매단가"," ",Ne.totalQuantity>0?`${Math.round(Ne.totalRevenue/Ne.totalQuantity).toLocaleString()}원`:"-",Ne.totalVariableCost!==null&&S.jsxs("span",{className:"ml-2",children:["· 변동비 ",Math.round(Ne.totalVariableCost).toLocaleString(),"원"]}),at!==null&&S.jsxs("span",{className:Ge("ml-2 font-medium",ft),children:["· 공헌이익 ",Math.round(at).toLocaleString(),"원"]})]}),S.jsx("td",{className:"px-3 py-1.5 text-right text-[11px] text-muted-foreground",children:Ne.totalQuantity.toLocaleString()}),S.jsx("td",{className:"px-3 py-1.5 text-right text-[11px]",colSpan:2,children:E0(Ne.totalRevenue)})]},Ne.sku)})]})}),V.length===0&&S.jsx("tr",{children:S.jsx("td",{colSpan:8,className:"px-3 py-8 text-center text-muted-foreground text-[13px]",children:"필터 조건에 맞는 상품이 없습니다."})})]})]})})]})}function kSe(r){if(!r.startedAt)return"";const t=(r.endedAt??Date.now())-r.startedAt;return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function ISe({status:r}){return r==="pending"?S.jsx("span",{className:"w-4 h-4 rounded-full border-2 border-muted-foreground/40 flex-shrink-0"}):r==="running"?S.jsx("span",{className:"w-4 h-4 flex-shrink-0 flex items-center justify-center",children:S.jsx("span",{className:"w-3.5 h-3.5 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})}):r==="completed"?S.jsx("span",{className:"w-4 h-4 rounded-full bg-green-500/15 flex-shrink-0 flex items-center justify-center",children:S.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:S.jsx("path",{d:"M2 5l2.5 2.5L8 3",stroke:"#22c55e",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}):S.jsx("span",{className:"w-4 h-4 rounded-full bg-red-500/15 flex-shrink-0 flex items-center justify-center",children:S.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:S.jsx("path",{d:"M3 3l4 4M7 3l-4 4",stroke:"#ef4444",strokeWidth:"1.5",strokeLinecap:"round"})})})}function OSe({session:r}){if(!r)return S.jsx("div",{className:"bg-card border border-border rounded-xl flex items-center justify-center min-h-[120px]",children:S.jsx("p",{className:"text-[13px] text-muted-foreground",children:"세션을 선택하세요"})});const e=r.tasks.length>0?"태스크":"출력";return S.jsxs("div",{className:"bg-card border border-border rounded-xl overflow-hidden",children:[S.jsxs("div",{className:"px-4 py-2.5 border-b border-border flex items-center gap-2",children:[S.jsx("span",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wide",children:e}),S.jsx("span",{className:"font-mono text-[11px] text-foreground/70 truncate",children:r.command.replace(/^sppt\s+/,"")})]}),r.tasks.length>0?S.jsx("ul",{className:"divide-y divide-border",children:r.tasks.map(t=>S.jsxs("li",{className:"flex items-center gap-3 px-4 py-2.5",children:[S.jsx(ISe,{status:t.status}),S.jsx("span",{className:"text-[12px] flex-1 truncate",children:t.name}),t.detail&&S.jsx("span",{className:"text-[11px] text-muted-foreground truncate max-w-[120px]",children:t.detail}),t.startedAt&&S.jsx("span",{className:"text-[10px] text-muted-foreground flex-shrink-0",children:kSe(t)})]},t.id))}):r.output?S.jsx("pre",{className:"px-4 py-3 text-[12px] leading-relaxed text-foreground/80 whitespace-pre-wrap font-mono overflow-x-auto",children:r.output}):S.jsx("div",{className:"flex items-center justify-center py-8",children:S.jsx("p",{className:"text-[12px] text-muted-foreground",children:"출력 없음"})})]})}function PSe({sessions:r,selectedId:e,onSelect:t}){return r.length===0?S.jsx("div",{className:"bg-card border border-border rounded-xl flex items-center justify-center p-4",children:S.jsxs("p",{className:"text-[12px] text-muted-foreground text-center",children:["CLI 커맨드를 실행하면",S.jsx("br",{}),"여기에 표시됩니다"]})}):S.jsxs("div",{className:"bg-card border border-border rounded-xl overflow-hidden flex flex-col max-h-[70vh]",children:[S.jsx("div",{className:"px-3 py-2 border-b border-border flex-shrink-0",children:S.jsx("span",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wide",children:"세션"})}),S.jsx("ul",{className:"overflow-y-auto flex-1",children:r.map(n=>{const a=n.tasks.filter(u=>u.status==="completed").length,i=n.tasks.length,o=n.tasks.some(u=>u.status==="running"),s=n.id===e,l=yM(new Date(n.createdAt),{addSuffix:!0,locale:E1});return S.jsx("li",{children:S.jsxs("button",{type:"button",onClick:()=>t(n.id),className:["w-full text-left pl-2 pr-3 py-2.5 hover:bg-muted/60 transition-colors border-b border-border last:border-b-0",s?"bg-muted":""].join(" "),children:[S.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[S.jsx("span",{className:["w-1.5 h-1.5 rounded-full flex-shrink-0",o?"bg-green-500 animate-pulse":"bg-muted-foreground/40"].join(" ")}),S.jsx("span",{className:"text-[12px] font-medium truncate flex-1 font-mono",children:n.command.replace(/^sppt\s+/,"")})]}),S.jsxs("div",{className:"flex items-center justify-between pl-2",children:[S.jsx("span",{className:"text-[11px] text-muted-foreground",children:i>0?`${a}/${i} 완료`:"태스크 없음"}),S.jsx("span",{className:"text-[10px] text-muted-foreground",children:l})]})]})},n.id)})})]})}function zSe(){const r=window.location.hash.slice(1),e=r.includes("?")?r.split("?")[1]:"";return new URLSearchParams(e).get("id")}function jSe(){const{data:r=[]}=aK(),[e,t]=q.useState(zSe),n=q.useCallback(i=>{t(i);const o=window.location.hash.split("?")[0];window.history.replaceState(null,"",`${o}?id=${i}`)},[]);q.useEffect(()=>{r.length>0&&!e&&n(r[0].id)},[r,e,n]);const a=r.find(i=>i.id===e)??null;return S.jsxs("div",{children:[S.jsx("div",{className:"flex items-center justify-between mb-6",children:S.jsx("h2",{className:"text-xl font-medium",children:"Session"})}),S.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 mb-8",children:[S.jsx(PSe,{sessions:r,selectedId:e,onSelect:n}),S.jsx(OSe,{session:a})]})]})}function ki({content:r,size:e=10,side:t,contentClassName:n}){return S.jsx(Bo,{content:r,side:t,contentClassName:n,children:S.jsx("span",{className:"cursor-help text-muted-foreground inline-flex items-center",children:S.jsx(hG,{size:e})})})}function nL({channel:r}){return S.jsx("span",{className:Ge("inline-block w-2 h-2 rounded-full shrink-0",iee[r]??"bg-muted-foreground")})}function BSe(r){return r==null?"무제한":r>=1e8?`${(r/1e8).toFixed(0)}억원 미만`:r>=1e7?`${(r/1e7).toFixed(0)}천만원 미만`:`${r.toLocaleString()}원 미만`}function Jv({children:r}){return S.jsx("span",{className:"inline-flex items-center text-[10px] font-medium bg-muted text-muted-foreground px-1.5 py-0.5 rounded-full",children:r})}function bg(r,e){if(!(r!=null&&r.length)||e==null)return null;const t=r.findIndex(n=>n.maxAnnualRevenue==null||e<=n.maxAnnualRevenue);return t>=0?t:r.length-1}function VSe({d:r,annualRevenue:e}){var w,T,C,D,M,N,R,E,k,I;const[t,n]=q.useState(!1),[a,i]=q.useState(!1),[o,s]=q.useState(!1),[l,u]=q.useState(!1),[c,f]=q.useState(!1),d=r.categoryRates&&Object.keys(r.categoryRates).length>0,v=r.pgRateByPayment&&Object.keys(r.pgRateByPayment).length>0,g=r.revenueTiers&&r.revenueTiers.length>0,x=r.verticalRates&&Object.keys(r.verticalRates).length>0,y=r.discrepancyHints&&r.discrepancyHints.length>0,b=r.sources&&r.sources.length>0;return!d&&!v&&!g&&!x&&!y&&!b?null:S.jsx("tr",{className:"border-b border-border/40 bg-muted/5",children:S.jsx("td",{colSpan:7,className:"px-3 pb-3 pt-0",children:S.jsxs("div",{className:"flex flex-wrap gap-3 mt-2",children:[d&&S.jsxs("div",{className:"w-full",children:[S.jsxs("button",{type:"button",onClick:()=>n(z=>!z),className:"flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[t?S.jsx(_n,{size:11}):S.jsx(On,{size:11}),S.jsx("span",{className:"font-medium text-foreground/70",children:"카테고리별 수수료"}),S.jsxs(Jv,{children:[Object.keys(r.categoryRates??{}).length,"개"]})]}),t&&S.jsx("div",{className:"mt-1.5 ml-4 border border-border/60 rounded overflow-hidden",children:S.jsxs("table",{className:"w-full text-[11px]",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"bg-muted/50 text-muted-foreground",children:[S.jsx("th",{className:"px-2 py-1 text-left font-medium",children:"카테고리"}),S.jsx("th",{className:"px-2 py-1 text-right font-medium",children:"수수료율"})]})}),S.jsx("tbody",{children:Object.entries(r.categoryRates??{}).sort((z,P)=>z[1]-P[1]).map(([z,P])=>S.jsxs("tr",{className:"border-t border-border/40",children:[S.jsx("td",{className:"px-2 py-1",children:z}),S.jsxs("td",{className:"px-2 py-1 text-right font-medium",children:[P,"%"]})]},z))})]})})]}),v&&S.jsxs("div",{className:"w-full",children:[S.jsxs("button",{type:"button",onClick:()=>i(z=>!z),className:"flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[a?S.jsx(_n,{size:11}):S.jsx(On,{size:11}),S.jsx("span",{className:"font-medium text-foreground/70",children:"결제수단별 PG 수수료"}),S.jsxs(Jv,{children:[Object.keys(r.pgRateByPayment??{}).length,"종"]})]}),a&&S.jsx("div",{className:"mt-1.5 ml-4 border border-border/60 rounded overflow-hidden",children:S.jsxs("table",{className:"w-full text-[11px]",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"bg-muted/50 text-muted-foreground",children:[S.jsx("th",{className:"px-2 py-1 text-left font-medium",children:"결제수단"}),S.jsx("th",{className:"px-2 py-1 text-right font-medium",children:"수수료율"})]})}),S.jsx("tbody",{children:Object.entries(r.pgRateByPayment??{}).map(([z,P])=>S.jsxs("tr",{className:"border-t border-border/40",children:[S.jsx("td",{className:"px-2 py-1",children:P.label}),S.jsxs("td",{className:"px-2 py-1 text-right font-medium",children:[P.rate,"%"]})]},z))})]})})]}),g&&S.jsxs("div",{className:"w-full",children:[S.jsxs("button",{type:"button",onClick:()=>s(z=>!z),className:"flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[o?S.jsx(_n,{size:11}):S.jsx(On,{size:11}),S.jsx("span",{className:"font-medium text-foreground/70",children:"매출 등급별 수수료"}),S.jsxs(Jv,{children:[(w=r.revenueTiers)==null?void 0:w.length,"구간"]}),(()=>{var G;const z=bg(r.revenueTiers,e),P=z!=null?(G=r.revenueTiers)==null?void 0:G[z]:null;return P?S.jsxs("span",{className:"inline-flex items-center text-[10px] font-medium bg-emerald-100 text-emerald-700 dark:bg-emerald-950/50 dark:text-emerald-400 px-1.5 py-0.5 rounded-full ml-1",children:["현재 ",P.label]}):S.jsx("span",{className:"inline-flex items-center text-[10px] text-amber-500 px-1 ml-1",children:"연매출 미설정"})})()]}),o&&S.jsxs("div",{className:"mt-1.5 ml-4 border border-border/60 rounded overflow-hidden",children:[S.jsxs("table",{className:"w-full text-[11px]",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"bg-muted/50 text-muted-foreground",children:[S.jsx("th",{className:"px-2 py-1 text-left font-medium",children:"등급"}),S.jsx("th",{className:"px-2 py-1 text-left font-medium",children:"연매출 기준"}),((T=r.revenueTiers)==null?void 0:T.some(z=>z.pgRate!=null))&&S.jsx("th",{className:"px-2 py-1 text-right font-medium",children:"PG수수료"}),((C=r.revenueTiers)==null?void 0:C.some(z=>z.commissionRate!=null))&&S.jsx("th",{className:"px-2 py-1 text-right font-medium",children:"판매수수료"}),S.jsx("th",{className:"px-2 py-1 text-right font-medium",children:"적용"})]})}),S.jsx("tbody",{children:(D=r.revenueTiers)==null?void 0:D.map((z,P)=>{var B,F;const U=bg(r.revenueTiers,e)===P;return S.jsxs("tr",{className:Ge("border-t border-border/40",U&&"bg-emerald-50 dark:bg-emerald-950/30"),children:[S.jsx("td",{className:Ge("px-2 py-1 font-medium",U&&"text-emerald-700 dark:text-emerald-400"),children:z.label}),S.jsx("td",{className:"px-2 py-1 text-muted-foreground",children:BSe(z.maxAnnualRevenue)}),((B=r.revenueTiers)==null?void 0:B.some(H=>H.pgRate!=null))&&S.jsx("td",{className:Ge("px-2 py-1 text-right",U&&"font-semibold text-emerald-700 dark:text-emerald-400"),children:z.pgRate!=null?`${z.pgRate}%`:"-"}),((F=r.revenueTiers)==null?void 0:F.some(H=>H.commissionRate!=null))&&S.jsx("td",{className:Ge("px-2 py-1 text-right",U&&"font-semibold text-emerald-700 dark:text-emerald-400"),children:z.commissionRate!=null?`${z.commissionRate}%`:"-"}),S.jsx("td",{className:"px-2 py-1 text-right",children:U?S.jsx("span",{className:"text-emerald-600 dark:text-emerald-400 font-medium",children:"◀ 현재"}):null})]},z.label)})})]}),e==null&&S.jsxs("div",{className:"px-2 py-1.5 bg-amber-50/50 dark:bg-amber-950/20 border-t border-amber-200/50 dark:border-amber-900/50 text-[10px] text-amber-700 dark:text-amber-400",children:["연매출을 설정하면 현재 적용 등급을 확인할 수 있습니다."," ",S.jsx("code",{className:"bg-amber-100 dark:bg-amber-950 px-1 rounded",children:"~/.shopport/config.json → settlement.annualRevenue"})]})]})]}),x&&S.jsxs("div",{className:"w-full",children:[S.jsxs("button",{type:"button",onClick:()=>u(z=>!z),className:"flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[l?S.jsx(_n,{size:11}):S.jsx(On,{size:11}),S.jsx("span",{className:"font-medium text-foreground/70",children:"버티컬/솔루션 추가 수수료"}),S.jsxs(Jv,{children:[Object.keys(r.verticalRates??{}).length,"종"]})]}),l&&S.jsxs("div",{className:"mt-1.5 ml-4 border border-border/60 rounded overflow-hidden",children:[S.jsxs("table",{className:"w-full text-[11px]",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"bg-muted/50 text-muted-foreground",children:[S.jsx("th",{className:"px-2 py-1 text-left font-medium",children:"서비스"}),S.jsx("th",{className:"px-2 py-1 text-right font-medium",children:"추가 수수료율"}),S.jsx("th",{className:"px-2 py-1 text-left font-medium",children:"비고"})]})}),S.jsx("tbody",{children:Object.entries(r.verticalRates??{}).map(([z,P])=>S.jsxs("tr",{className:"border-t border-border/40",children:[S.jsx("td",{className:"px-2 py-1 font-medium",children:z}),S.jsxs("td",{className:"px-2 py-1 text-right text-red-500",children:["+",P.rate,"%"]}),S.jsx("td",{className:"px-2 py-1 text-muted-foreground",children:P.label})]},z))})]}),S.jsx("div",{className:"px-2 py-1.5 bg-muted/30 text-[10px] text-muted-foreground border-t border-border/40",children:"판매수수료에 중복 부과됩니다. 쇼핑라이브·렌탈 등 해당 서비스 이용 시만 적용."})]})]}),y&&S.jsxs("div",{className:"w-full",children:[S.jsxs("button",{type:"button",onClick:()=>f(z=>!z),className:"flex items-center gap-1 text-[11px] text-amber-600 dark:text-amber-400 hover:text-foreground transition-colors",children:[c?S.jsx(_n,{size:11}):S.jsx(On,{size:11}),S.jsx("span",{className:"font-medium",children:"실정산 차이 발생 가능 원인"}),S.jsxs(Jv,{children:[(M=r.discrepancyHints)==null?void 0:M.length,"가지"]})]}),c&&S.jsxs("div",{className:"mt-1.5 ml-4 space-y-1.5",children:[((N=r.discrepancyHints)==null?void 0:N.some(z=>z.type==="fix"))&&S.jsxs("div",{className:"border border-emerald-200 dark:border-emerald-900/60 rounded bg-emerald-50/50 dark:bg-emerald-950/20 p-2",children:[S.jsx("p",{className:"text-[9px] font-semibold text-emerald-700 dark:text-emerald-400 uppercase tracking-wide mb-1",children:"입력·설정으로 개선 가능"}),S.jsx("ul",{className:"space-y-1",children:(R=r.discrepancyHints)==null?void 0:R.filter(z=>z.type==="fix").map(z=>S.jsxs("li",{className:"text-[10px] text-emerald-800 dark:text-emerald-300 flex items-start gap-1.5",children:[S.jsx("span",{className:"shrink-0 mt-0.5",children:"✓"}),S.jsxs("span",{children:[z.text,z.configHref&&S.jsx("a",{href:z.configHref,className:"ml-1.5 underline underline-offset-2 text-emerald-600 dark:text-emerald-400 hover:text-foreground transition-colors",children:"설정 →"})]})]},z.text))})]}),((E=r.discrepancyHints)==null?void 0:E.some(z=>z.type==="info"))&&S.jsxs("div",{className:"border border-amber-200 dark:border-amber-900/60 rounded bg-amber-50/50 dark:bg-amber-950/20 p-2",children:[S.jsx("p",{className:"text-[9px] font-semibold text-amber-600 dark:text-amber-500 uppercase tracking-wide mb-1",children:"계산 범위 밖 참고 항목"}),S.jsx("ul",{className:"space-y-1",children:(k=r.discrepancyHints)==null?void 0:k.filter(z=>z.type==="info").map(z=>S.jsxs("li",{className:"text-[10px] text-amber-700 dark:text-amber-400 flex gap-1.5",children:[S.jsx("span",{className:"shrink-0 mt-0.5",children:"·"}),S.jsx("span",{children:z.text})]},z.text))})]})]})]}),r.supportsQuickSettlement&&S.jsxs("div",{className:"w-full flex items-center gap-2 text-[10px] text-blue-600 dark:text-blue-400",children:[S.jsx("span",{children:"⚡"}),S.jsx("span",{children:"빠른정산 지원 채널 — 집화처리일 기준 다음 영업일 정산. 신청 후 체크:"}),S.jsx("a",{href:"#config",className:"underline underline-offset-2 hover:text-foreground transition-colors",children:"설정 → 스마트스토어"})]}),b&&S.jsxs("div",{className:"flex flex-wrap gap-2 pt-0.5 border-t border-border/30 w-full",children:[S.jsx("span",{className:"text-[10px] text-muted-foreground/50 self-center",children:"출처"}),(I=r.sources)==null?void 0:I.map(z=>{const P=new URL(z).hostname.replace(/^www\./,"");return S.jsxs("a",{href:z,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-0.5 text-[10px] text-muted-foreground/70 hover:text-foreground transition-colors underline underline-offset-2",children:[S.jsx(gM,{size:9}),P]},z)})]})]})})})}function wt(r){return r==null?"-":`${Math.round(r).toLocaleString()}원`}function GSe({data:r,isLoading:e}){if(e)return S.jsx("div",{className:"text-[12px] text-muted-foreground py-4",children:"조회 중…"});if(!r)return null;const t=Array.isArray(r)?r:r.data??[];return t.length?S.jsx("div",{className:"border border-border rounded-lg overflow-hidden",children:S.jsxs("table",{className:"w-full text-[12px]",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border bg-muted/40 text-[11px] font-semibold text-muted-foreground",children:[S.jsx("th",{className:"px-3 py-2 text-left",children:"매출인식월"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"정산대상금액"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"서비스수수료"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"공제금액"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"최종 정산금액"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"정산예정일"})]})}),S.jsx("tbody",{className:"bg-card divide-y divide-border/50",children:t.map((n,a)=>S.jsxs("tr",{className:Ge(a%2!==0&&"bg-muted/20"),children:[S.jsx("td",{className:"px-3 py-2 font-medium",children:n.revenueRecognitionMonth??"-"}),S.jsx("td",{className:"px-3 py-2 text-right",children:wt(n.settlementTargetAmount)}),S.jsx("td",{className:"px-3 py-2 text-right text-red-600 dark:text-red-400",children:n.serviceFee!=null?wt(Math.abs(n.serviceFee)):"-"}),S.jsx("td",{className:"px-3 py-2 text-right text-muted-foreground",children:n.deductionAmount!=null?wt(Math.abs(n.deductionAmount)):"-"}),S.jsx("td",{className:"px-3 py-2 text-right font-medium text-emerald-600 dark:text-emerald-400",children:wt(n.finalSettlementAmount)}),S.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:n.settlementDate??n.finalSettlementDate??"-"})]},a))})]})}):S.jsx("div",{className:"text-[12px] text-muted-foreground py-2",children:"해당 월 정산 내역 없음"})}function HSe({data:r,isLoading:e}){if(e)return S.jsx("div",{className:"text-[12px] text-muted-foreground py-4",children:"조회 중… (매출인식일별 조회로 시간이 걸릴 수 있습니다)"});if(!r)return null;const{items:t,totalActual:n,totalPredicted:a,totalDiff:i,accuracy:o,scannedDates:s}=r;if(!t.length)return S.jsx("div",{className:"text-[12px] text-muted-foreground py-2",children:"해당 기간 매출인식 데이터 없음 — 구매확정 주문이 있는지 확인하세요"});const l=o>=99?"text-emerald-600 dark:text-emerald-400":o>=95?"text-amber-600":"text-red-600";return S.jsxs("div",{className:"space-y-2",children:[S.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[S.jsx(Qr,{label:"실 정산 합계",value:wt(n)}),S.jsx(Qr,{label:"예상 정산 합계",value:wt(a)}),S.jsx(Qr,{label:"예측 정확도",value:`${o.toFixed(1)}%`,sub:i!==0?`실정산이 예상보다 ${i>0?"+":""}${wt(i)}`:"완전 일치",accent:o>=99})]}),S.jsx("div",{className:"border border-border rounded-lg overflow-hidden",children:S.jsxs("table",{className:"w-full text-[12px]",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border bg-muted/40 text-[11px] font-semibold text-muted-foreground",children:[S.jsx("th",{className:"px-3 py-2 text-left",children:"주문번호"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"상품명"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"결제금액"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"실정산"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"예상정산"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"차이"})]})}),S.jsx("tbody",{className:"bg-card divide-y divide-border/50",children:t.map((u,c)=>S.jsxs("tr",{className:Ge(c%2!==0&&"bg-muted/20"),children:[S.jsx("td",{className:"px-3 py-2 font-mono text-[11px] text-muted-foreground",children:u.orderId.slice(-10)}),S.jsx("td",{className:"px-3 py-2 max-w-[180px] truncate",children:u.productName}),S.jsx("td",{className:"px-3 py-2 text-right",children:wt(u.gross)}),S.jsx("td",{className:"px-3 py-2 text-right font-medium",children:wt(u.actual)}),S.jsx("td",{className:"px-3 py-2 text-right text-muted-foreground",children:wt(u.predicted)}),S.jsxs("td",{className:Ge("px-3 py-2 text-right",Math.abs(u.diff)>500?"text-amber-600 font-medium":"text-muted-foreground"),children:[u.diff>=0?"+":"",wt(u.diff)]})]},c))})]})}),S.jsxs("p",{className:Ge("text-[11px]",l),children:["예측 정확도 ",o.toFixed(1),"% · ",s,"개 매출인식일 조회"]})]})}function FSe({dateFrom:r,dateTo:e}){const t=(r||new Date().toISOString()).slice(0,7),[n,a]=q.useState(t),[i,o]=q.useState("monthly"),{data:s,isLoading:l}=fK(n,i==="monthly"),{data:u,isLoading:c}=hK(r,e,i==="reconcile");return S.jsxs("div",{className:"bg-muted/10 border-t border-border/30 px-4 py-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("span",{className:"text-[12px] font-semibold",children:"쿠팡 실정산"}),S.jsx("span",{className:"text-[11px] text-muted-foreground",children:"쿠팡 Wing API 직접 조회"})]}),S.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[S.jsx("div",{className:"flex rounded border border-border overflow-hidden text-[11px]",children:["monthly","reconcile"].map(f=>S.jsx("button",{type:"button",onClick:()=>o(f),className:Ge("px-3 py-1 transition-colors",i===f?"bg-primary text-primary-foreground":"hover:bg-muted/50 text-muted-foreground"),children:f==="monthly"?"월별 정산":"예상 비교"},f))}),i==="monthly"&&S.jsx("input",{type:"month",value:n,onChange:f=>a(f.target.value),className:"h-7 px-2 border border-border rounded bg-background text-[12px] focus:outline-none focus:ring-1 focus:ring-primary/50"}),i==="reconcile"&&S.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[r," ~ ",e," 기간 조회"]})]}),i==="monthly"&&S.jsx(GSe,{data:s,isLoading:l}),i==="reconcile"&&S.jsx(HSe,{data:u,isLoading:c})]})}function USe({order:r}){var o;const e=((o=r.orderDate)==null?void 0:o.slice(0,10))??"",t=r.channelOrderId??"",{data:n,isLoading:a}=cK(t,e),i=(n==null?void 0:n.elements)??[];return a?S.jsx("div",{className:"text-[11px] text-muted-foreground py-2 pl-4",children:"건별 정산 조회 중…"}):i.length?S.jsx("div",{className:"border-t border-border/40 bg-muted/10",children:S.jsxs("table",{className:"w-full text-[11px]",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"text-[10px] text-muted-foreground/70",children:[S.jsx("th",{className:"px-4 py-1 text-left",children:"상품주문번호"}),S.jsx("th",{className:"px-3 py-1 text-left",children:"상품명"}),S.jsx("th",{className:"px-3 py-1 text-right",children:"결제금액"}),S.jsx("th",{className:"px-3 py-1 text-right",children:"수수료"}),S.jsx("th",{className:"px-3 py-1 text-right",children:"실수령"}),S.jsx("th",{className:"px-3 py-1 text-left",children:"정산완료일"})]})}),S.jsx("tbody",{children:i.map((s,l)=>{var u;return S.jsxs("tr",{className:Ge(l%2!==0&&"bg-muted/20"),children:[S.jsx("td",{className:"px-4 py-1 font-mono text-[10px] text-muted-foreground",children:((u=s.productOrderId)==null?void 0:u.slice(-10))??"-"}),S.jsx("td",{className:"px-3 py-1 max-w-[160px] truncate text-muted-foreground",children:s.productName??"-"}),S.jsx("td",{className:"px-3 py-1 text-right",children:wt(s.paySettleAmount)}),S.jsx("td",{className:"px-3 py-1 text-right text-red-600 dark:text-red-400",children:s.totalPayCommissionAmount!=null?wt(Math.abs(s.totalPayCommissionAmount)):"-"}),S.jsx("td",{className:"px-3 py-1 text-right text-emerald-600 dark:text-emerald-400 font-medium",children:wt(s.settleExpectAmount)}),S.jsx("td",{className:"px-3 py-1 text-muted-foreground",children:s.settleCompleteDate??"-"})]},l)})})]})}):S.jsx("div",{className:"text-[11px] text-muted-foreground py-2 pl-4",children:"건별 정산 내역 없음"})}const Ff=20;function YSe({dateFrom:r,dateTo:e}){const[t,n]=q.useState(new Set),[a,i]=q.useState(0),{data:o,isLoading:s}=oG({channel:"smartstore",from:r,to:e,limit:"500"}),l=(o==null?void 0:o.orders)??[],u=Math.max(1,Math.ceil(l.length/Ff)),c=l.slice(a*Ff,(a+1)*Ff);function f(d){n(v=>{const g=new Set(v);return g.has(d)?g.delete(d):g.add(d),g})}return S.jsxs("div",{className:"bg-muted/10 border-t border-border/30 px-4 py-3 space-y-2",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("span",{className:"text-[12px] font-semibold",children:"주문별 실정산"}),S.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[r," ~ ",e," · 총 ",l.length,"건"]})]}),s?S.jsx("div",{className:"text-[12px] text-muted-foreground py-3 text-center",children:"불러오는 중…"}):c.length===0?S.jsx("div",{className:"text-[12px] text-muted-foreground py-2",children:"해당 기간 주문 없음"}):S.jsx("div",{className:"border border-border rounded-lg overflow-hidden",children:S.jsxs("table",{className:"w-full text-[12px]",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border bg-muted/40 text-[11px] font-semibold text-muted-foreground",children:[S.jsx("th",{className:"px-3 py-2 text-left",children:"주문일"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"주문번호"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"상품명"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"판매가"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"상태"})]})}),S.jsx("tbody",{className:"bg-card divide-y divide-border/50",children:c.map((d,v)=>{var y;const g=d.channelOrderId,x=t.has(g);return S.jsxs(q.Fragment,{children:[S.jsxs("tr",{className:Ge(v%2!==0&&"bg-muted/20","cursor-pointer hover:bg-muted/30 transition-colors"),onClick:()=>f(g),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&f(g)},tabIndex:0,children:[S.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:((y=d.orderDate)==null?void 0:y.slice(0,10))??"-"}),S.jsx("td",{className:"px-3 py-2 font-mono text-[11px] text-muted-foreground",children:S.jsxs("span",{className:"inline-flex items-center gap-1",children:[x?S.jsx(_n,{size:11,className:"shrink-0"}):S.jsx(On,{size:11,className:"shrink-0"}),g.slice(-10)]})}),S.jsx("td",{className:"px-3 py-2 max-w-[200px] truncate",children:d.productName}),S.jsx("td",{className:"px-3 py-2 text-right font-medium",children:d.salePrice!=null?wt(d.salePrice*d.quantity):"-"}),S.jsx("td",{className:"px-3 py-2 text-muted-foreground text-[11px]",children:d.status})]}),x&&S.jsx("tr",{children:S.jsx("td",{colSpan:5,className:"p-0",children:S.jsx(USe,{order:d})})})]},g)})})]})}),l.length>Ff&&S.jsxs("div",{className:"flex items-center justify-between pt-1",children:[S.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[a*Ff+1,"–",Math.min((a+1)*Ff,l.length)," /"," ",l.length,"건"]}),S.jsxs("div",{className:"flex items-center gap-1",children:[S.jsx("button",{type:"button",onClick:()=>{i(d=>Math.max(0,d-1)),n(new Set)},disabled:a===0,className:"px-2 py-1 text-[11px] border border-border rounded hover:bg-muted/50 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:"←"}),S.jsxs("span",{className:"text-[11px] text-muted-foreground px-1",children:[a+1," / ",u]}),S.jsx("button",{type:"button",onClick:()=>{i(d=>Math.min(u-1,d+1)),n(new Set)},disabled:a>=u-1,className:"px-2 py-1 text-[11px] border border-border rounded hover:bg-muted/50 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:"→"})]})]})]})}function WSe(r,e,t,n){var M,N;const a=r.avgCommissionRate;if(a==null)return null;const i=a>1?a:a*100,o=t[r.channel],s=o?o.commissionRate+o.pgRate:null,l=e.filter(R=>R.channel===r.channel),u=(o==null?void 0:o.discrepancyHints)??[],c=R=>({k:"text",v:R}),f=(R,E,k)=>({k:"row",label:R,value:E,accent:k}),d={k:"divider"},v=(R,E)=>({k:"section",v:R,accent:E}),g=R=>({k:"bullet",v:R}),x=(R,E)=>({k:"fixbullet",v:R,href:E}),y=u.filter(R=>R.type==="fix"),b=u.filter(R=>R.type==="info");function w(R={fix:3,info:2}){const E=[];if(y.length>0){E.push(v("개선 가능","fix"));for(const k of y.slice(0,R.fix))E.push(x(k.text,k.configHref))}if(b.length>0){E.push(v("참고 항목","info"));for(const k of b.slice(0,R.info))E.push(g(k.text))}return E}const T=l.find(R=>{const E=(R.commissionRate??0)+(R.pgRate??0);return Math.abs(E-i)<.5});if(s!=null&&Math.abs(s-i)<.1){const R=bg(o.revenueTiers,n),E=R!=null?(M=o.revenueTiers)==null?void 0:M[R]:null,k=(E==null?void 0:E.pgRate)??o.pgRate,I=o.commissionRate+k;return{method:"default",label:"채널 기본 요율 적용",lines:[c("실 정산 데이터 없음 — 추정값"),...o.commissionRate>0?[f("판매수수료",`${o.commissionRate}%`,"muted")]:[],...k>0?[f(`PG${E?` (${E.label})`:""}`,`${k}%`,"muted")]:[],f("합계",`${I.toFixed(2)}%`),...n==null&&((N=o.revenueTiers)!=null&&N.length)?[c("⚠ 연매출 미설정 — 일반 등급 기준")]:[]]}}for(const R of l){const E=(R.commissionRate??0)+(R.pgRate??0);if(Math.abs(E-i)<.5)return{method:"custom_rule",label:"커스텀 규칙 적용",lines:[f("규칙 ID",R.id,"muted"),...R.commissionRate!=null?[f("판매수수료",`${R.commissionRate}%`)]:[],...R.pgRate!=null?[f("PG수수료",`${R.pgRate}%`)]:[],...R.note?[f("메모",R.note,"muted")]:[]]}}const C=s!=null&&Math.abs(s-i)>1&&!T,D=s!=null?i-s:null;return{method:"order_data",label:"주문 데이터 평균",lines:[c("주문별 수수료율의 평균값"),f("적용 요율",`${i.toFixed(2)}%`),...s!=null?[f("채널 기준",`${s.toFixed(2)}%`,"muted"),...D!=null&&Math.abs(D)>=.1?[f("차이",`${D>0?"+":""}${D.toFixed(2)}%p`,D>.5?"warn":D<-.5?"green":"muted")]:[],...T?[c(`커스텀 규칙 적용 중${T.note?` (${T.note})`:""}`)]:[]]:[],...C&&(y.length>0||b.length>0)?[d,...w({fix:2,info:2})]:[]]}}function XSe(r){return r==null?"-":`${(r>1?r:r*100).toFixed(1)}%`}function qSe({lines:r}){return S.jsx("div",{className:"space-y-0.5",children:r.map((e,t)=>{const n=`${e.k}-${t}`;if(e.k==="divider")return S.jsx("div",{className:"border-t border-border/40 my-1"},n);if(e.k==="section")return S.jsx("p",{className:Ge("text-[9px] font-semibold uppercase tracking-wide pt-0.5",e.accent==="fix"?"text-emerald-600 dark:text-emerald-400":e.accent==="info"?"text-amber-600 dark:text-amber-400":"text-foreground/50"),children:e.v},n);if(e.k==="fixbullet")return S.jsxs("div",{className:"flex gap-1.5 text-[10px] leading-snug",children:[S.jsx("span",{className:"text-foreground/40 shrink-0 mt-px",children:"✓"}),S.jsxs("span",{children:[e.v,e.href&&S.jsx("a",{href:e.href,className:"ml-1 text-emerald-600 dark:text-emerald-400 underline underline-offset-2 hover:opacity-80 transition-opacity",children:"설정→"})]})]},n);if(e.k==="bullet")return S.jsxs("div",{className:"flex gap-1.5 text-muted-foreground text-[10px] leading-snug",children:[S.jsx("span",{className:"text-foreground/40 shrink-0 mt-px",children:"•"}),S.jsx("span",{children:e.v})]},n);if(e.k==="row"){const a=e.accent==="muted"?"text-muted-foreground":e.accent==="green"?"text-emerald-500 tabular-nums":e.accent==="red"?"text-red-500 tabular-nums":e.accent==="warn"?"text-amber-500 tabular-nums":"tabular-nums";return S.jsxs("div",{className:"flex justify-between gap-4 text-[11px]",children:[S.jsx("span",{className:"text-muted-foreground shrink-0",children:e.label}),S.jsx("span",{className:a,children:e.value})]},n)}return S.jsx("p",{className:"text-muted-foreground text-[11px]",children:e.v},n)})})}function ZSe({channels:r,rules:e,defaults:t,annualRevenue:n,quickSettlement:a,totalRevenue:i,totalOrders:o,totalCommission:s,netRevenue:l,commissionRate:u,isLoading:c,ssDaily:f,dateFrom:d,dateTo:v}){var T;const[g,x]=q.useState(null),{data:y}=Ng(),b=((T=y==null?void 0:y.channels)==null?void 0:T.some(C=>C.channel==="coupang"&&C.connected))??!1,w=(()=>{const C=(f==null?void 0:f.elements)??[];if(!C.length)return null;const D=C.reduce((E,k)=>E+(k.paySettleAmount??0),0),M=C.reduce((E,k)=>E+(k.commissionSettleAmount??0),0),N=C.reduce((E,k)=>E+(k.settleAmount??0),0),R=D>0?Math.abs(M)/D*100:null;return{totalPay:D,totalComm:M,totalNet:N,rate:R}})();return c?S.jsx("div",{className:"text-sm text-muted-foreground py-6 text-center",children:"불러오는 중..."}):r.length===0?S.jsxs("div",{className:"border border-dashed border-border rounded-lg p-10 text-center text-muted-foreground text-sm",children:["정산 데이터가 없습니다.",S.jsxs("div",{className:"text-[11px] mt-1",children:[S.jsx("code",{className:"bg-muted px-1 rounded",children:"sppt import"}),"로 주문 데이터를 가져오거나 채널을 동기화하세요."]})]}):S.jsx("div",{className:"border border-border rounded-lg overflow-hidden",children:S.jsxs("table",{className:"w-full text-[12px] border-collapse",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border bg-muted/40 text-[11px] font-semibold text-muted-foreground",children:[S.jsx("th",{className:"px-3 py-2 text-left",children:"채널"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"주문수"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"총 매출"}),S.jsx("th",{className:"px-3 py-2 text-right",children:S.jsxs("span",{className:"inline-flex items-center gap-1 justify-end",children:["수수료",S.jsx(ki,{side:"top",content:S.jsxs("div",{className:"space-y-1",children:[S.jsx("p",{className:"font-medium",children:"수수료 계산 기준"}),S.jsx("p",{children:"채널별 수수료 정책 기반 추정"}),S.jsx("p",{className:"pl-2 text-muted-foreground",children:"커스텀 규칙 → 채널 기본 요율 순 적용"})]})})]})}),S.jsx("th",{className:"px-3 py-2 text-right",children:S.jsxs("span",{className:"inline-flex items-center gap-1 justify-end",children:["평균 수수료율",S.jsx(ki,{side:"top",contentClassName:"max-w-[340px]",content:S.jsxs("div",{className:"space-y-2",children:[S.jsx("p",{className:"font-medium",children:"수수료율 결정 우선순위"}),S.jsxs("div",{className:"space-y-0.5 text-muted-foreground",children:[S.jsx("p",{children:"① 주문별 수수료율 데이터 평균"}),S.jsx("p",{className:"pl-3 text-[10px]",children:"채널 CSV에 수수료율 컬럼이 있을 때"}),S.jsx("p",{children:"② 커스텀 fee rule"}),S.jsx("p",{className:"pl-3 text-[10px]",children:"직접 설정한 규칙이 있을 때"}),S.jsx("p",{children:"③ 채널 기본 요율"}),S.jsx("p",{className:"pl-3 text-[10px]",children:"공식 자료 기반 기본값 (추정)"})]}),Object.keys(t).length>0&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"border-t border-border/40 pt-1.5",children:[S.jsxs("p",{className:"font-medium mb-0.5",children:["채널별 기본 수수료",n!=null?` (연매출 ${(n/1e8).toFixed(1)}억 기준)`:" (일반 등급 기준, 추정)"]}),n==null&&S.jsx("p",{className:"text-[10px] text-amber-500 mb-1",children:"연매출 미설정 — 등급별 실제 요율과 다를 수 있음"}),S.jsx("div",{className:"space-y-0.5",children:Object.entries(t).map(([C,D])=>{var P;const M=bg(D.revenueTiers,n),N=M!=null?(P=D.revenueTiers)==null?void 0:P[M]:null,R=(N==null?void 0:N.pgRate)??D.pgRate,E=D.commissionRate+R,k=e.some(G=>G.channel===C),I=e.find(G=>G.channel===C&&!G.from&&!G.to&&!G.paymentMethod&&!G.category),z=I?(I.commissionRate??0)+(I.pgRate??0):null;return S.jsxs("div",{className:"flex justify-between gap-4 text-[10px]",children:[S.jsx("span",{className:"text-muted-foreground",children:Gi[C]??C}),S.jsx("span",{children:I&&z!=null?S.jsxs("span",{className:"text-amber-400",children:[z.toFixed(1),"%"," ",S.jsxs("span",{className:"text-muted-foreground/50",children:["(기본 ",E.toFixed(1),"% ✎)"]})]}):k?S.jsxs("span",{className:Ge(N?"text-emerald-400":""),children:[E.toFixed(1),"%"," ",S.jsx("span",{className:"text-amber-400/70",children:"✎"})]}):S.jsxs("span",{className:N?"text-emerald-400":"",children:[E.toFixed(1),"%",N?` (${N.label})`:""]})})]},C)})}),S.jsx("p",{className:"text-[10px] text-muted-foreground/60 mt-1",children:"✎ 커스텀 규칙 · 초록 = 등급 적용"})]}),S.jsx("p",{className:"text-[10px] text-muted-foreground/60 border-t border-border/40 pt-1.5",children:"정확한 등급 요율 → 아래 '채널 기본 수수료 규칙' 펼치기"})]})]})})]})}),S.jsx("th",{className:"px-3 py-2 text-right",children:"실수령 예상"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"매출 비중"})]})}),S.jsx("tbody",{className:"bg-card",children:r.map((C,D)=>{var V,W;const M=C.channel==="smartstore",N=C.channel==="coupang",R=M?w:null,E=M?f==null?void 0:f.settleMeta:void 0,k=R?Math.abs(R.totalComm):C.totalCommission!=null?C.totalCommission:C.totalRevenue-(C.netRevenue??0),I=R?R.totalNet:C.netRevenue,z=(R==null?void 0:R.rate)??C.avgCommissionRate,P=M&&t.smartstore?(t.smartstore.commissionRate??0)+(t.smartstore.pgRate??0):null,G=(R==null?void 0:R.rate)!=null&&P!=null?R.rate-P:null,U=G!=null&&Math.abs(G)>.5,B=i>0?(C.totalRevenue/i*100).toFixed(1):"0",F=WSe(C,e,t,n),H=M||N&&b,X=g==="smartstore"&&M||g==="coupang"&&N;return S.jsxs(q.Fragment,{children:[S.jsxs("tr",{className:Ge("border-b border-border/60",D%2!==0&&"bg-muted/30",H&&"cursor-pointer hover:bg-muted/20"),onClick:H?()=>x(X?null:M?"smartstore":"coupang"):void 0,onKeyDown:H?$=>{($.key==="Enter"||$.key===" ")&&x(X?null:M?"smartstore":"coupang")}:void 0,tabIndex:H?0:void 0,children:[S.jsx("td",{className:"px-3 py-2.5",children:S.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[H&&(X?S.jsx(_n,{size:12,className:"text-muted-foreground shrink-0"}):S.jsx(On,{size:12,className:"text-muted-foreground shrink-0"})),S.jsx(nL,{channel:C.channel}),Gi[C.channel]??C.channel,M&&R&&S.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:"실정산"}),N&&b&&S.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:"API 연동"}),C.channel==="smartstore"&&a&&S.jsx("span",{className:"inline-flex items-center text-[10px] font-medium bg-blue-100 text-blue-700 dark:bg-blue-950/50 dark:text-blue-400 px-1.5 py-0.5 rounded-full",children:"⚡ 빠른정산"})]})}),S.jsxs("td",{className:"px-3 py-2.5 text-right text-muted-foreground",children:[C.orderCount.toLocaleString(),"건"]}),S.jsx("td",{className:"px-3 py-2.5 text-right font-medium",children:wt(C.totalRevenue)}),S.jsx("td",{className:"px-3 py-2.5 text-right text-red-600 dark:text-red-400",children:wt(k)}),S.jsx("td",{className:"px-3 py-2.5 text-right text-muted-foreground",children:S.jsxs("span",{className:"inline-flex items-center gap-1 justify-end",onClick:$=>$.stopPropagation(),children:[XSe(z),U&&S.jsx(Bo,{side:"left",contentClassName:"max-w-[300px]",content:S.jsxs("div",{className:"space-y-1.5",children:[S.jsx("p",{className:"font-medium text-[11px] text-amber-500",children:"수수료율 불일치"}),S.jsxs("div",{className:"space-y-0.5 text-[11px]",children:[S.jsxs("div",{className:"flex justify-between gap-4",children:[S.jsx("span",{className:"text-muted-foreground",children:"설정값"}),S.jsxs("span",{children:[P==null?void 0:P.toFixed(1),"%"]})]}),S.jsxs("div",{className:"flex justify-between gap-4",children:[S.jsx("span",{className:"text-muted-foreground",children:"실측"}),S.jsxs("span",{className:"text-amber-500",children:[(V=R==null?void 0:R.rate)==null?void 0:V.toFixed(1),"%"]})]}),S.jsxs("div",{className:"flex justify-between gap-4",children:[S.jsx("span",{className:"text-muted-foreground",children:"차이"}),S.jsxs("span",{className:"text-amber-500",children:[G!=null&&G>=0?"+":"",G==null?void 0:G.toFixed(1),"%p"]})]})]}),E&&S.jsx("div",{className:"border-t border-border/40 pt-1 text-[10px] text-muted-foreground/70",children:S.jsxs("p",{children:["📅 정산완료일 기준 · 주문일+",E.offsetDays.min,"~",E.offsetDays.max,"일 오프셋 적용"]})})]}),children:S.jsx("span",{className:"cursor-help inline-flex items-center",children:S.jsx(yG,{size:11,className:"text-amber-500"})})}),!U&&R&&E&&S.jsx(ki,{side:"left",contentClassName:"max-w-[320px]",content:S.jsxs("div",{className:"space-y-1.5",children:[S.jsx("p",{className:"font-medium text-[11px]",children:"실정산 수수료율"}),S.jsxs("div",{className:"space-y-0.5 text-[11px]",children:[S.jsxs("div",{className:"flex justify-between gap-4",children:[S.jsx("span",{className:"text-muted-foreground",children:"결제 기준금액"}),S.jsx("span",{children:wt(R.totalPay)})]}),S.jsxs("div",{className:"flex justify-between gap-4",children:[S.jsx("span",{className:"text-muted-foreground",children:"수수료 합계"}),S.jsx("span",{className:"text-red-500",children:wt(Math.abs(R.totalComm))})]}),S.jsxs("div",{className:"flex justify-between gap-4",children:[S.jsx("span",{className:"text-muted-foreground",children:"실수령"}),S.jsx("span",{className:"text-emerald-500",children:wt(R.totalNet)})]})]}),S.jsxs("div",{className:"border-t border-border/40 pt-1 text-[10px] text-muted-foreground/70 space-y-1",children:[S.jsx("p",{className:"font-medium text-foreground/60",children:"조회 방식"}),S.jsxs("p",{children:["주문일(",E.orderFrom,"~",E.orderTo,")에 배송·구매확정 소요일(+",E.offsetDays.min,"~",E.offsetDays.max,"일)을 더해 정산완료일 범위로 조회합니다."]}),S.jsx("p",{children:"월 경계 주문은 실제 정산일과 다소 차이가 날 수 있습니다."}),S.jsx("p",{className:"text-foreground/50",children:"행 클릭 → 주문건별 정산 상세 확인 가능"})]})]})}),!R&&F&&S.jsx(ki,{side:"left",contentClassName:"max-w-[300px]",content:S.jsxs("div",{className:"space-y-1.5",children:[S.jsx("p",{className:"font-medium text-[11px]",children:F.label}),S.jsx(qSe,{lines:F.lines}),C.channel==="smartstore"&&!a&&((W=t.smartstore)==null?void 0:W.supportsQuickSettlement)&&S.jsxs("div",{className:"mt-1.5 pt-1.5 border-t border-border/40 flex gap-1.5 text-[10px] leading-snug",children:[S.jsx("span",{className:"text-foreground/40 shrink-0 mt-px",children:"✓"}),S.jsxs("span",{children:["빠른정산 미사용 — 집화처리일 기준으로 입금 앞당기기"," ",S.jsx("a",{href:"#config",className:"text-emerald-600 dark:text-emerald-400 underline underline-offset-2 hover:opacity-80 transition-opacity",children:"설정→"})]})]}),M&&S.jsxs("div",{className:"mt-1.5 pt-1.5 border-t border-border/40 text-[10px] text-muted-foreground/60 space-y-0.5",children:[S.jsx("p",{children:"현재 추정값입니다. 정산 데이터가 있는 기간 선택 시 네이버 실정산 기준으로 자동 교체됩니다."}),S.jsx("p",{children:"주문일에 배송·구매확정 소요일(+1~15일)을 더해 정산완료일 범위로 조회하며, 월 경계 주문은 다소 차이가 날 수 있습니다."}),S.jsx("p",{className:"text-foreground/40",children:"행 클릭 → 주문건별 정산 상세 확인 가능"})]})]})})]})}),S.jsx("td",{className:"px-3 py-2.5 text-right text-emerald-600 dark:text-emerald-400 font-medium",children:wt(I)}),S.jsx("td",{className:"px-3 py-2.5 text-right",children:S.jsxs("div",{className:"flex items-center justify-end gap-2",children:[S.jsx("div",{className:"w-[60px] bg-muted rounded-full h-1.5 overflow-hidden",children:S.jsx("div",{className:"h-full bg-primary/60 rounded-full",style:{width:`${B}%`}})}),S.jsxs("span",{className:"text-muted-foreground text-[11px] w-[32px] text-right",children:[B,"%"]})]})})]}),X&&M&&S.jsx("tr",{className:"border-b border-border/60",children:S.jsx("td",{colSpan:7,className:"p-0",children:S.jsx(YSe,{dateFrom:d||new Date(Date.now()-720*60*60*1e3).toISOString().slice(0,10),dateTo:v||new Date().toISOString().slice(0,10)})})}),X&&N&&S.jsx("tr",{className:"border-b border-border/60",children:S.jsx("td",{colSpan:7,className:"p-0",children:S.jsx(FSe,{dateFrom:d||new Date(Date.now()-720*60*60*1e3).toISOString().slice(0,10),dateTo:v||new Date().toISOString().slice(0,10)})})})]},C.channel)})}),r.length>1&&S.jsx("tfoot",{children:S.jsxs("tr",{className:"border-t border-border bg-muted/30 text-[12px] font-semibold",children:[S.jsx("td",{className:"px-3 py-2.5",children:"합계"}),S.jsxs("td",{className:"px-3 py-2.5 text-right text-muted-foreground",children:[o.toLocaleString(),"건"]}),S.jsx("td",{className:"px-3 py-2.5 text-right",children:wt(i)}),S.jsx("td",{className:"px-3 py-2.5 text-right text-red-600 dark:text-red-400",children:wt(s)}),S.jsxs("td",{className:"px-3 py-2.5 text-right text-muted-foreground",children:[u.toFixed(1),"%"]}),S.jsx("td",{className:"px-3 py-2.5 text-right text-emerald-600 dark:text-emerald-400",children:wt(l)}),S.jsx("td",{})]})})]})})}function $Se({defaults:r,rules:e,annualRevenue:t,isLoading:n}){const a={ordered:"주문일",paid:"결제일",confirmed:"구매확정일"};return n?S.jsx("div",{className:"text-sm text-muted-foreground py-4 text-center",children:"불러오는 중..."}):S.jsx("div",{className:"border border-border rounded-lg overflow-hidden",children:S.jsxs("table",{className:"w-full text-[12px] border-collapse",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border bg-muted/40 text-[11px] font-semibold text-muted-foreground",children:[S.jsx("th",{className:"px-3 py-2 text-left",children:"채널"}),S.jsx("th",{className:"px-3 py-2 text-right",children:S.jsxs("span",{className:"inline-flex items-center gap-1 justify-end",children:["판매수수료",S.jsx(ki,{side:"top",content:S.jsx("p",{children:"네이버쇼핑·일반 유입 기준 요율. 마케팅 링크 유입 시 별도 요율 적용 (셀별 ℹ 확인)"})})]})}),S.jsx("th",{className:"px-3 py-2 text-right",children:"PG수수료"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"합계"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"정산 기준"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"정산 주기"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"커스텀 규칙"})]})}),S.jsx("tbody",{className:"bg-card",children:Object.entries(r).map(([i,o],s)=>{const l=e.filter(c=>c.channel===i).length,u=o.commissionRate+o.pgRate;return S.jsxs(S.Fragment,{children:[S.jsxs("tr",{className:Ge("border-b border-border/60",s%2!==0&&"bg-muted/30"),children:[S.jsx("td",{className:"px-3 py-2.5",children:S.jsxs("div",{className:"flex items-center gap-1.5",children:[S.jsx(nL,{channel:i}),Gi[i]??i]})}),S.jsx("td",{className:"px-3 py-2.5 text-right",children:o.commissionRate>0?S.jsxs("span",{className:"inline-flex items-center gap-1 justify-end",children:[S.jsxs("span",{className:"font-medium",children:[o.commissionRate,"%"]}),o.marketingLinkCommissionRate!=null&&S.jsx(ki,{side:"top",content:S.jsxs("div",{className:"space-y-0.5",children:[S.jsx("p",{className:"font-medium",children:"판매수수료 2종 (택1)"}),S.jsxs("p",{children:["일반 유입: ",o.commissionRate,"%"]}),S.jsxs("p",{children:["마케팅 링크 유입: ",o.marketingLinkCommissionRate,"%"]})]})})]}):S.jsx("span",{className:"text-muted-foreground",children:"-"})}),S.jsx("td",{className:"px-3 py-2.5 text-right",children:o.pgRate>0?S.jsxs("span",{className:"inline-flex items-center gap-1 justify-end",children:[(()=>{var v;const c=bg(o.revenueTiers,t),f=c!=null?(v=o.revenueTiers)==null?void 0:v[c]:null,d=(f==null?void 0:f.pgRate)??null;return d!=null&&d!==o.pgRate?S.jsxs("span",{className:"inline-flex items-center gap-1",children:[S.jsxs("span",{className:"font-semibold text-emerald-600 dark:text-emerald-400",children:[d,"%"]}),S.jsx(ki,{side:"top",content:S.jsxs("div",{className:"space-y-0.5",children:[S.jsxs("p",{className:"font-medium text-emerald-400",children:["현재 적용: ",d,"% (",f==null?void 0:f.label,")"]}),S.jsxs("p",{className:"text-muted-foreground",children:["기본(일반): ",o.pgRate,"%"]}),t!=null&&S.jsxs("p",{className:"text-muted-foreground text-[10px]",children:["연매출 ",(t/1e8).toFixed(1),"억 기준"]})]})})]}):S.jsxs("span",{className:"font-medium",children:[o.pgRate,"%"]})})(),o.pgRateAppliesToShipping&&S.jsx(ki,{side:"top",content:S.jsx("p",{children:"배송비 포함 금액에도 적용 (스마트스토어 Npay 수수료)"})})]}):S.jsx("span",{className:"text-muted-foreground",children:"-"})}),S.jsx("td",{className:"px-3 py-2.5 text-right text-muted-foreground",children:u>0?S.jsxs("span",{children:[u.toFixed(2),"%",o.shippingCommissionRate!=null&&o.shippingCommissionRate>0&&S.jsx(ki,{side:"top",content:S.jsxs("p",{children:["배송비 수수료 ",o.shippingCommissionRate,"% 별도"]})})]}):"-"}),S.jsx("td",{className:"px-3 py-2.5 text-muted-foreground",children:a[o.settlementDayBasis]??o.settlementDayBasis}),S.jsxs("td",{className:"px-3 py-2.5 text-right text-muted-foreground",children:[o.settlementCycleDays,"일"]}),S.jsx("td",{className:"px-3 py-2.5",children:l>0?S.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-medium bg-amber-100 text-amber-700 dark:bg-amber-950/50 dark:text-amber-400 px-1.5 py-0.5 rounded-full",children:[l,"개 규칙 적용"]}):S.jsx("span",{className:"text-[11px] text-muted-foreground",children:"기본값"})})]},i),S.jsx(VSe,{d:o,annualRevenue:t},`${i}-detail`)]})})})]})})}const KSe=/^\d{4}-\d{2}-\d{2}$/,QSe=["일","월","화","수","목","금","토"];function mp(r,e){const t=new Date(`${r}T00:00:00Z`);return Number.isNaN(t.getTime())?r:(t.setUTCDate(t.getUTCDate()+e),t.toISOString().slice(0,10))}function z4(r){if(!KSe.test(r))return null;const e=new Date(`${r}T00:00:00Z`);if(Number.isNaN(e.getTime()))return null;const t=e.getUTCDay();return e.setUTCDate(e.getUTCDate()+(t===0?-6:1-t)),e.toISOString().slice(0,10)}function aL(r){const e=new Date(`${r}T00:00:00Z`);return QSe[e.getUTCDay()]??""}function q9(r){return r>=1e8?`${(r/1e8).toFixed(1)}억`:r>=1e4?`${Math.round(r/1e4)}만`:r>=1e3?`${Math.round(r/1e3)}천`:r.toLocaleString()}function ch(r){return r.slice(5).replace("-","/")}function JSe({dateStr:r,channels:e,total:t}){return S.jsxs("div",{className:"min-w-[180px] space-y-1",children:[S.jsxs("div",{className:"text-[10px] text-muted-foreground font-medium mb-0.5",children:[ch(r)," (",aL(r),")"]}),e.map(n=>S.jsxs("div",{className:"flex items-center justify-between gap-4 text-[11px]",children:[S.jsxs("div",{className:"flex items-center gap-1.5",children:[S.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:xM[n.channel]??"#888"}}),S.jsx("span",{className:"text-muted-foreground",children:Gi[n.channel]??n.channel})]}),S.jsx("span",{className:"font-medium tabular-nums",children:wt(n.amount)})]},n.channel)),S.jsxs("div",{className:"flex justify-between gap-4 text-[11px] font-semibold pt-1 border-t border-border/40",children:[S.jsx("span",{children:"합계"}),S.jsx("span",{className:"tabular-nums text-emerald-500",children:wt(t)})]})]})}function ewe({wk:r,days:e,total:t}){const n=mp(r,6);return S.jsxs("div",{className:"min-w-[200px] space-y-2",children:[S.jsxs("div",{className:"text-[10px] text-muted-foreground font-medium",children:[ch(r)," ~ ",ch(n)]}),e.length===0?S.jsx("p",{className:"text-[11px] text-muted-foreground",children:"입금 없음"}):S.jsxs(S.Fragment,{children:[e.map(a=>S.jsxs("div",{children:[S.jsxs("div",{className:"text-[10px] text-muted-foreground/70 mb-0.5",children:[ch(a.date)," (",aL(a.date),")"]}),a.channels.map(i=>S.jsxs("div",{className:"flex items-center justify-between gap-4 text-[11px]",children:[S.jsxs("div",{className:"flex items-center gap-1.5",children:[S.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:xM[i.channel]??"#888"}}),S.jsx("span",{className:"text-muted-foreground",children:Gi[i.channel]??i.channel})]}),S.jsx("span",{className:"font-medium tabular-nums",children:wt(i.amount)})]},i.channel))]},a.date)),S.jsxs("div",{className:"flex justify-between gap-4 text-[11px] font-semibold pt-1 border-t border-border/40",children:[S.jsx("span",{children:"주간 합계"}),S.jsx("span",{className:"tabular-nums text-emerald-500",children:wt(t)})]})]})]})}const ep=64,g2=20;function twe({schedule:r,today:e,maxAmount:t}){const n=new Map;for(const c of r){const f=z4(c.depositDate);if(!f)continue;const d=c.byChannel.reduce((g,x)=>x.amount>g.amount?x:g,c.byChannel[0]),v=n.get(f);n.set(f,{amount:((v==null?void 0:v.amount)??0)+c.totalAmount,topChannel:(v==null?void 0:v.topChannel)??(d==null?void 0:d.channel)??"",days:[...(v==null?void 0:v.days)??[],{date:c.depositDate,amount:c.totalAmount,channels:c.byChannel}].sort((g,x)=>g.date.localeCompare(x.date))})}const a=z4(e)??e,i=[...n.keys()].sort(),o=[mp(a,-28),i[0]??a].sort()[0],s=[mp(a,56),i[i.length-1]??a].sort().at(-1),l=[];let u=o;for(;u<=s;)l.push(u),u=mp(u,7);for(;l.length<20;)l.push(mp(l[l.length-1],7));return S.jsxs("div",{className:"relative flex",style:{height:`${ep+g2}px`},children:[S.jsx("div",{className:"absolute bottom-[20px] left-0 right-0 border-b border-border/40 pointer-events-none"}),l.map(c=>{const f=n.get(c),d=(f==null?void 0:f.amount)??0,v=d>0?Math.max(5,Math.round(d/t*ep)):0,g=c===a,x=d>0?.2+d/t*.72:0;return S.jsx(Bo,{content:S.jsx(ewe,{wk:c,days:(f==null?void 0:f.days)??[],total:(f==null?void 0:f.amount)??0}),side:"top",contentClassName:"max-w-[260px]",children:S.jsxs("div",{className:"relative flex flex-col flex-1 min-w-0 cursor-default px-0.5",style:{height:`${ep+g2}px`},children:[g&&S.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 w-px bg-primary/50 pointer-events-none",style:{top:0,height:`${ep}px`}}),g&&S.jsx("span",{className:"absolute top-0 left-0 right-0 text-center text-[7px] text-primary font-semibold leading-none bg-card/80 pointer-events-none",children:"이번주"}),S.jsx("div",{style:{height:`${ep-v}px`,flexShrink:0}}),v>0&&S.jsx("div",{className:"w-full rounded-t",style:{height:`${v}px`,backgroundColor:`hsl(var(--primary) / ${x})`,flexShrink:0}}),S.jsx("div",{className:Ge("text-center mt-1 leading-none truncate text-[7px]",g?"text-primary font-semibold":"text-muted-foreground/50"),children:ch(c)}),v>=20&&S.jsx("div",{className:"absolute left-0 right-0 text-center text-[7px] font-medium text-white/90 pointer-events-none",style:{bottom:`${g2+2}px`},children:q9(d)})]})},c)})]})}function rwe({year:r,month:e,depositMap:t,today:n,maxAmount:a}){const i=new Date(`${r}-${String(e).padStart(2,"0")}-01T00:00:00Z`).getUTCDay(),o=new Date(r,e,0).getDate(),s=[...Array(i).fill(null),...Array.from({length:o},(l,u)=>u+1)];return S.jsxs("div",{children:[S.jsxs("div",{className:"text-[11px] font-medium text-muted-foreground mb-2",children:[r,"년 ",e,"월"]}),S.jsxs("div",{className:"grid grid-cols-7 gap-[2px]",children:[["일","월","화","수","목","금","토"].map(l=>S.jsx("div",{className:"text-center text-[9px] text-muted-foreground/50 py-0.5 font-medium",children:l},l)),s.map((l,u)=>{if(!l)return S.jsx("div",{className:"h-[40px]"},`e-${u}`);const c=`${r}-${String(e).padStart(2,"0")}-${String(l).padStart(2,"0")}`,f=t.get(c),d=c===n,v=f?.07+f.totalAmount/a*.28:0,g=S.jsxs("div",{className:Ge("h-[40px] flex flex-col items-center justify-center gap-0.5 rounded cursor-default",d&&"ring-1 ring-inset ring-primary/50"),style:f?{backgroundColor:`hsl(var(--primary) / ${v})`}:void 0,children:[S.jsx("span",{className:Ge("text-[10px] leading-none",d?"font-bold text-primary":f?"font-medium text-foreground":"text-muted-foreground/60"),children:l}),f&&S.jsx("span",{className:"text-[8px] font-semibold leading-none text-foreground/80",children:q9(f.totalAmount)})]});return f?S.jsx(Bo,{content:S.jsx(JSe,{dateStr:c,channels:f.byChannel,total:f.totalAmount}),side:"top",contentClassName:"max-w-[240px]",children:g},c):S.jsx("div",{children:g},c)})]})]})}function nwe({schedule:r,today:e}){const t=r.filter(n=>n.depositDate>=e).sort((n,a)=>n.depositDate.localeCompare(a.depositDate));return S.jsxs("div",{className:"border border-border rounded-lg bg-card overflow-y-auto h-full",children:[S.jsx("div",{className:"px-3 pt-3 pb-2 text-[11px] font-medium text-muted-foreground border-b border-border/50",children:"예정 입금"}),t.length===0?S.jsx("p",{className:"text-[12px] text-muted-foreground px-3 py-3",children:"향후 예정 없음"}):S.jsx("div",{className:"divide-y divide-border/50",children:t.map(n=>S.jsxs("div",{className:"px-3 py-2.5",children:[S.jsxs("div",{className:"text-[10px] font-semibold text-foreground/70 mb-1.5",children:[ch(n.depositDate)," ",S.jsxs("span",{className:"font-normal text-muted-foreground/60",children:["(",aL(n.depositDate),")"]})]}),S.jsxs("div",{className:"space-y-1",children:[n.byChannel.map(a=>S.jsxs("div",{className:"flex items-center justify-between gap-2 text-[11px]",children:[S.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[S.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:xM[a.channel]??"#888"}}),S.jsx("span",{className:"text-muted-foreground truncate",children:Gi[a.channel]??a.channel})]}),S.jsx("span",{className:"font-medium tabular-nums text-foreground shrink-0",children:wt(a.amount)})]},a.channel)),n.byChannel.length>1&&S.jsxs("div",{className:"flex justify-between text-[10px] font-semibold pt-1 border-t border-border/30",children:[S.jsx("span",{className:"text-muted-foreground/60",children:"합계"}),S.jsx("span",{className:"text-emerald-600 dark:text-emerald-400 tabular-nums",children:wt(n.totalAmount)})]})]})]},n.depositDate))})]})}function awe({schedule:r,isLoading:e}){const t=new Date().toISOString().slice(0,10),n=new Map(r.map(f=>[f.depositDate,f])),[a,i]=t.split("-").map(Number),o=[{year:a,month:i},{year:i===12?a+1:a,month:i===12?1:i+1}],s=Math.max(...r.map(f=>f.totalAmount),1),l=r.filter(f=>f.depositDate>=t),u=l.reduce((f,d)=>f+d.totalAmount,0),c=l.reduce((f,d)=>f+d.orderCount,0);return S.jsx(nG,{delayDuration:80,children:S.jsxs("div",{className:"mt-6",children:[S.jsxs("div",{className:"flex items-center justify-between mb-3",children:[S.jsx("h3",{className:"text-[13px] font-medium",children:"입금 스케줄"}),u>0&&S.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["향후"," ",S.jsx("span",{className:"text-emerald-600 dark:text-emerald-400 font-medium",children:wt(u)})," ","예정 · ",c,"건"]})]}),e?S.jsx("div",{className:"text-sm text-muted-foreground py-4 text-center",children:"불러오는 중..."}):r.length===0?S.jsx("div",{className:"border border-dashed border-border rounded-lg px-4 py-5 text-[12px] text-muted-foreground text-center",children:"정산 데이터가 없어 입금 스케줄을 계산할 수 없습니다."}):S.jsxs("div",{className:"flex gap-3 items-start",children:[S.jsxs("div",{className:"flex-[2] min-w-0",children:[S.jsx("div",{className:"border border-border rounded-lg bg-card px-3 pt-7 pb-2 mb-3",children:S.jsx(twe,{schedule:r,today:t,maxAmount:s})}),S.jsx("div",{className:"border border-border rounded-lg bg-card p-4",children:S.jsx("div",{className:"grid grid-cols-2 gap-6",children:o.map(({year:f,month:d})=>S.jsx(rwe,{year:f,month:d,depositMap:n,today:t,maxAmount:s},`${f}-${d}`))})})]}),S.jsx("div",{className:"flex-[1] min-w-0 self-stretch",children:S.jsx(nwe,{schedule:r,today:t})})]})]})})}function iwe({rule:r}){const e=r.from||r.to;return S.jsxs("tr",{className:"border-b border-border/60 text-[12px]",children:[S.jsx("td",{className:"px-3 py-2.5 font-mono text-[10px] text-muted-foreground",children:r.id}),S.jsx("td",{className:"px-3 py-2.5",children:S.jsxs("div",{className:"flex items-center gap-1.5",children:[S.jsx(nL,{channel:r.channel}),Gi[r.channel]??r.channel]})}),S.jsx("td",{className:"px-3 py-2.5 text-right",children:r.commissionRate!=null?S.jsxs("span",{className:"font-medium",children:[r.commissionRate,"%"]}):S.jsx("span",{className:"text-muted-foreground text-[11px]",children:"기본값"})}),S.jsx("td",{className:"px-3 py-2.5 text-right",children:r.pgRate!=null?S.jsxs("span",{className:"font-medium",children:[r.pgRate,"%"]}):S.jsx("span",{className:"text-muted-foreground text-[11px]",children:"기본값"})}),S.jsx("td",{className:"px-3 py-2.5 text-muted-foreground",children:e?S.jsxs("span",{children:[r.from??"~"," ~ ",r.to??""]}):S.jsx("span",{className:"text-[11px]",children:"상시"})}),S.jsx("td",{className:"px-3 py-2.5 text-muted-foreground",children:r.paymentMethod??S.jsx("span",{className:"text-[11px]",children:"전체"})}),S.jsx("td",{className:"px-3 py-2.5 text-muted-foreground max-w-[160px] truncate",title:r.note,children:r.note??"-"})]})}function owe(){var z;const[r,e]=q.useState(""),[t,n]=q.useState(""),a=!!r||!!t,{data:i,isLoading:o}=iG(a?{from:r,to:t}:void 0),{data:s,isLoading:l}=sK(),{data:u=[],isLoading:c}=lK(r||void 0,t||void 0),f=(s==null?void 0:s.defaults)??{},{data:d}=Ng(),v=((z=d==null?void 0:d.channels)==null?void 0:z.some(P=>P.channel==="smartstore"&&P.connected))??!1,{data:g}=uK(r||new Date(Date.now()-720*60*60*1e3).toISOString().slice(0,10),t||new Date().toISOString().slice(0,10),v),[x,y]=q.useState(!1),[b,w]=q.useState(!1),T=(i==null?void 0:i.settlement)??[],C=(i==null?void 0:i.totalRevenue)??0,D=(i==null?void 0:i.netRevenue)??0,M=(i==null?void 0:i.totalOrders)??0,N=C-D,R=C>0?N/C*100:0,E=(s==null?void 0:s.rules)??[],k=(s==null?void 0:s.annualRevenue)??null,I=(s==null?void 0:s.quickSettlement)??!1;return S.jsxs("div",{children:[S.jsxs("div",{className:"flex items-center justify-between mb-4",children:[S.jsx("h2",{className:"text-xl font-medium",children:"정산"}),S.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[S.jsx(hG,{size:12}),"orders.jsonl 기반 추정값 · 실제 정산과 차이 있을 수 있음"]})]}),S.jsx(mM,{from:r,to:t,onChange:(P,G)=>{e(P),n(G)},className:"mb-6"}),S.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-6",children:[S.jsx(Qr,{label:"총 매출",value:wt(C),sub:`주문 ${M.toLocaleString()}건`}),S.jsx(Qr,{label:"수수료 · PG 합계",value:wt(N),sub:`평균 ${R.toFixed(1)}%`}),S.jsx(Qr,{label:"실수령 예상",value:wt(D),accent:!0}),S.jsx(Qr,{label:"수수료 규칙",value:`${E.length}개`,sub:E.length===0?"기본값 적용 중":"커스텀 규칙 적용"})]}),S.jsxs("div",{className:"mb-6",children:[S.jsx("h3",{className:"text-[13px] font-medium mb-3",children:"채널별 정산 현황"}),S.jsx(ZSe,{channels:T,rules:E,defaults:f,annualRevenue:k,quickSettlement:I,totalRevenue:C,totalOrders:M,totalCommission:N,netRevenue:D,commissionRate:R,isLoading:o,ssDaily:g,dateFrom:r,dateTo:t})]}),S.jsxs("div",{className:"mb-4",children:[S.jsxs("button",{type:"button",onClick:()=>y(P=>!P),className:"flex items-center gap-2 w-full text-left group mb-0",children:[x?S.jsx(_n,{size:13,className:"shrink-0 text-muted-foreground"}):S.jsx(On,{size:13,className:"shrink-0 text-muted-foreground"}),S.jsx("span",{className:"text-[13px] font-medium group-hover:text-foreground/80 transition-colors",children:"채널 기본 수수료 규칙"}),S.jsx(ki,{size:12,contentClassName:"max-w-[300px]",content:S.jsxs("div",{className:"space-y-1.5",children:[S.jsx("p",{className:"font-medium",children:"채널 기본 수수료 규칙이란?"}),S.jsxs("div",{className:"space-y-1 text-muted-foreground",children:[S.jsx("p",{children:"공식 자료·실데이터 기반 채널별 표준 요율입니다."}),S.jsx("p",{children:"커스텀 규칙이 없을 때 정산 추정에 사용됩니다."}),S.jsx("p",{children:"실제 계약 조건이 다르면 커스텀 규칙으로 오버라이드하세요."})]})]})})]}),x&&S.jsx("div",{className:"mt-3",children:S.jsx($Se,{defaults:f,rules:E,annualRevenue:k,isLoading:l})})]}),S.jsxs("div",{children:[S.jsxs("button",{type:"button",onClick:()=>w(P=>!P),className:"flex items-center gap-2 w-full text-left group mb-0",children:[b?S.jsx(_n,{size:13,className:"shrink-0 text-muted-foreground"}):S.jsx(On,{size:13,className:"shrink-0 text-muted-foreground"}),S.jsx("span",{className:"text-[13px] font-medium group-hover:text-foreground/80 transition-colors",children:"커스텀 수수료 규칙"}),E.length>0&&S.jsxs("span",{className:"inline-flex items-center text-[10px] font-medium bg-amber-100 text-amber-700 dark:bg-amber-950/50 dark:text-amber-400 px-1.5 py-0.5 rounded-full",children:[E.length,"개"]}),S.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground flex items-center gap-1",children:S.jsx("code",{className:"bg-muted px-1 rounded text-[10px] mr-2",children:"sppt settlement fee set <channel>"})})]}),b&&S.jsx("div",{className:"mt-3",children:l?S.jsx("div",{className:"text-sm text-muted-foreground py-4 text-center",children:"불러오는 중..."}):E.length===0?S.jsxs("div",{className:"border border-dashed border-border rounded-lg px-4 py-5 text-[12px] text-muted-foreground flex items-center gap-2",children:[S.jsx(fG,{size:13,className:"shrink-0"}),"등록된 커스텀 규칙 없음 — 채널 기본 수수료 규칙이 적용됩니다."]}):S.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[S.jsxs("table",{className:"w-full text-[12px] border-collapse",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border bg-muted/40 text-[11px] font-semibold text-muted-foreground",children:[S.jsx("th",{className:"px-3 py-2 text-left w-[72px]",children:"ID"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"채널"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"판매수수료"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"PG수수료"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"적용 기간"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"결제수단"}),S.jsx("th",{className:"px-3 py-2 text-left",children:"메모"})]})}),S.jsx("tbody",{className:"bg-card",children:E.map(P=>S.jsx(iwe,{rule:P},P.id))})]}),S.jsxs("div",{className:"px-3 py-2 border-t border-border bg-muted/20 flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[S.jsx(mG,{size:11}),"조건이 많이 맞는 규칙이 우선 적용 (기간 > 결제수단 > 카테고리 순)"]})]})})]}),S.jsx(awe,{schedule:u,isLoading:c})]})}function swe({trendPoints:r,direction:e}){const[t,n]=q.useState(null);if(!r||r.length<2)return S.jsx("span",{className:"inline-block w-[50px] h-[24px]"});const a=50,i=24,o=2,s=r.map(y=>y.ratio),l=Math.min(...s),c=Math.max(...s)-l||1,f=r.map((y,b)=>({x:o+b/(r.length-1)*(a-o*2),y:i-o-(y.ratio-l)/c*(i-o*2),period:y.period,ratio:y.ratio})),d=f.map(y=>`${y.x},${y.y}`).join(" "),v=e==="상승"?"#22c55e":e==="하락"?"#ef4444":"#94a3b8",g=f.map((y,b)=>{const w=b>0?(f[b-1].x+y.x)/2:0,T=b<f.length-1?(y.x+f[b+1].x)/2:a;return{x:w,width:T-w}}),x=t!==null?f[t]:null;return S.jsxs("svg",{width:a,height:i,viewBox:`0 0 ${a} ${i}`,className:"inline-block overflow-visible","aria-hidden":"true",children:[S.jsx("polyline",{points:d,fill:"none",stroke:v,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),x&&S.jsxs(S.Fragment,{children:[S.jsx("line",{x1:x.x,y1:0,x2:x.x,y2:i,stroke:v,strokeWidth:1,strokeDasharray:"2 2",strokeOpacity:.5}),S.jsx("circle",{cx:x.x,cy:x.y,r:2.5,fill:v,stroke:"white",strokeWidth:1})]}),g.map((y,b)=>S.jsx(Bo,{side:"top",content:S.jsxs("span",{children:[S.jsx("span",{className:"font-medium",children:f[b].period}),S.jsx("br",{}),"상대 검색량 ",S.jsx("span",{className:"font-semibold",children:Math.round(f[b].ratio)}),S.jsx("span",{className:"opacity-60",children:" / 100"})]}),children:S.jsx("rect",{x:y.x,y:0,width:y.width,height:i,fill:"transparent",stroke:"none",className:"cursor-default",onMouseEnter:()=>n(b),onMouseLeave:()=>n(null)})},f[b].period))]})}const lwe={낮음:"bg-green-500/15 text-green-600",보통:"bg-yellow-500/15 text-yellow-600",높음:"bg-orange-500/15 text-orange-600",매우높음:"bg-red-500/15 text-red-600"},uwe={상승:{icon:"↑",cls:"text-green-500"},하락:{icon:"↓",cls:"text-red-500"},보합:{icon:"→",cls:"text-muted-foreground"}};function j4(r){return r==null?"—":r.toLocaleString("ko-KR")}function k0(r){return r==null?"—":`${r.toLocaleString("ko-KR")}원`}function cwe(r,e,t,n){const a=(e+t)/2,i=Math.max(n,t);return r<=a?{dot:"🟢",label:"신규진입 가능 — 하위 ~20%, 리뷰 없어도 경쟁 가능",cls:"text-green-600 font-semibold"}:r<=i?{dot:"🟡",label:"판매 가능 — 시장 평균 이하, 경쟁력 있음",cls:"text-yellow-600 font-medium"}:{dot:"🔴",label:"판매 어려움 — 시장가 초과",cls:"text-red-500"}}function fwe(r){var n;const e=new Set,t=[];for(const a of r)for(const i of((n=a.analysis.marginAnalysis)==null?void 0:n.platforms)??[])e.has(i.platform)||(e.add(i.platform),t.push(i.platform));return t}function hwe({entries:r}){const e=fwe(r),t=e.length>0;return S.jsx("div",{className:"overflow-x-auto rounded-xl border border-border",children:S.jsxs("table",{className:"w-full text-[12px] border-collapse",children:[S.jsxs("thead",{children:[S.jsxs("tr",{className:"border-b border-border bg-muted/40",children:[S.jsx(I0,{align:"left",children:"키워드"}),S.jsx(I0,{align:"left",children:"소싱 채널"}),S.jsx(tp,{tip:"도매 소싱가",children:"소싱가"}),S.jsxs(tp,{tip:"네이버쇼핑 검색결과 기준. 중앙값은 저가 잡상품에 왜곡될 수 있어, avg가 중앙값보다 높으면 avg를 함께 표시합니다.",children:["시장판매가",S.jsx("br",{}),S.jsx("span",{className:"font-normal text-[10px] opacity-60",children:"(중앙값 / avg)"})]}),S.jsxs(tp,{tip:"네이버쇼핑 기준 해당 키워드 검색 시 노출되는 경쟁 상품 수",children:["경쟁상품수",S.jsx("br",{}),S.jsx("span",{className:"font-normal text-[10px] opacity-60",children:"(네이버쇼핑)"})]}),S.jsxs(tp,{tip:"최근 1개월 네이버 검색량 (PC+모바일)",children:["월검색량",S.jsx("br",{}),S.jsx("span",{className:"font-normal text-[10px] opacity-60",children:"(트렌드)"})]}),S.jsx(I0,{children:"경쟁도"}),t&&S.jsxs(tp,{colSpan:e.length,tip:"소싱가 기준 플랫폼 수수료 포함, 각 마진율 달성 최소판매가. 30% * = 세전 최소기준선(≈×1.7). 🟢 신규진입 가능(하위~20%) 🟡 판매 가능(시장 평균↓) 🔴 판매 어려움(시장가 초과)",children:["채널별 최소판매가",S.jsx("br",{}),S.jsx("span",{className:"font-normal text-[10px] opacity-60",children:"(수수료 포함, 5·10·20·30% * 기준)"})]}),S.jsx(I0,{children:"검토"})]}),t&&S.jsxs("tr",{className:"border-b border-border bg-muted/20",children:[Array.from({length:7}).map((n,a)=>S.jsx("td",{},a)),e.map(n=>S.jsx("td",{className:"px-3 py-1 text-center text-[10px] text-muted-foreground font-medium border-l border-border",children:n},n)),S.jsx("td",{})]})]}),S.jsx("tbody",{className:"bg-white dark:bg-card",children:r.map((n,a)=>{const{analysis:i,keyword:o,productName:s,sourceChannel:l,sourcingPrice:u,savedAt:c}=n,{demand:f,marginAnalysis:d,price:v,competitionLevel:g,totalListings:x}=i,y=yM(new Date(c),{addSuffix:!0,locale:E1}),b=(f==null?void 0:f.trendDirection)??null,w=b?uwe[b]:null,T=f==null?void 0:f.monthlyTotal,C=u&&v.median>0?Math.round((v.median-u)/u*100):null,D=new Map((d==null?void 0:d.platforms.map(N=>[N.platform,N]))??[]),M=v.avg>v.median*1.5;return S.jsxs("tr",{className:["border-b border-border/60 hover:bg-blue-50/40 dark:hover:bg-muted/20 transition-colors",a%2!==0?"bg-gray-50/60 dark:bg-muted/5":""].join(" "),children:[S.jsxs("td",{className:"px-3 py-2.5 max-w-[140px]",children:[S.jsx("div",{className:"font-semibold truncate",children:o}),s&&S.jsx("div",{className:"text-[10px] text-muted-foreground truncate mt-0.5",children:s})]}),S.jsx("td",{className:"px-3 py-2.5 text-center whitespace-nowrap",children:l??"—"}),S.jsx("td",{className:"px-3 py-2.5 text-right whitespace-nowrap",children:u?S.jsx("span",{className:"font-medium",children:k0(u)}):S.jsx("span",{className:"text-muted-foreground",children:"—"})}),S.jsxs("td",{className:"px-3 py-2.5 text-right whitespace-nowrap",children:[S.jsxs("div",{className:"flex items-baseline justify-end gap-1",children:[S.jsx("span",{className:"font-medium",children:k0(v.median)}),C!=null&&S.jsx(Bo,{content:`소싱가 대비 ${C>=0?"+":""}${C}%`,children:S.jsxs("span",{className:["text-[10px] cursor-default",C>=0?"text-green-500":"text-red-500"].join(" "),children:[C>=0?"+":"",C,"%"]})})]}),M&&S.jsx(Bo,{content:"평균가 — 중앙값이 저가 잡상품에 왜곡된 경우 이 값이 실거래 기준이 됩니다. 티어 판정(🟢🟡🔴)에 사용됩니다.",children:S.jsxs("div",{className:"text-[10px] text-blue-500 mt-0.5 cursor-default",children:["avg ",k0(v.avg)]})})]}),S.jsxs("td",{className:"px-3 py-2.5 text-right whitespace-nowrap",children:[j4(x),"개"]}),S.jsx("td",{className:"px-3 py-2.5 whitespace-nowrap",children:T!=null?S.jsxs("div",{className:"flex items-center justify-end gap-1.5",children:[S.jsxs("span",{children:[j4(T),"회"]}),w&&S.jsx("span",{className:["font-medium text-[10px]",w.cls].join(" "),children:w.icon}),f&&f.trendPoints.length>=2&&S.jsx(swe,{trendPoints:f.trendPoints,direction:b})]}):S.jsx("span",{className:"text-muted-foreground float-right",children:"—"})}),S.jsx("td",{className:"px-3 py-2.5 text-center",children:S.jsx("span",{className:["text-[10px] font-semibold px-2 py-0.5 rounded-full whitespace-nowrap",lwe[g]??"bg-muted text-muted-foreground"].join(" "),children:g})}),e.map(N=>{const R=D.get(N),E=R&&(R.sell5||R.sell10||R.sell20||R.sell30),k=E?[{label:"5%",sell:R.sell5||null,isMin:!1},{label:"10%",sell:R.sell10||null,isMin:!1},{label:"20%",sell:R.sell20||null,isMin:!1},{label:"30% *",sell:R.sell30||null,isMin:!0}]:[];return S.jsx("td",{className:"px-3 py-2 border-l border-border/40 align-top",children:E?S.jsx("div",{className:"flex flex-col gap-0.5",children:k.map(({label:I,sell:z,isMin:P})=>{if(z==null)return null;const G=cwe(z,v.min,v.median,v.avg);return S.jsx(Bo,{content:P?`[최소기준선] ${G.label}`:G.label,children:S.jsxs("div",{className:["flex items-center justify-between gap-1.5 text-[11px] cursor-default",P?"font-semibold":""].join(" "),children:[S.jsx("span",{className:["w-10 shrink-0 whitespace-nowrap",P?"text-foreground/70":"text-muted-foreground"].join(" "),children:I}),S.jsx("span",{className:[G.cls,"whitespace-nowrap"].join(" "),children:k0(z)}),S.jsx("span",{children:G.dot})]})},I)})}):S.jsx("span",{className:"text-muted-foreground",children:"—"})},N)}),S.jsx("td",{className:"px-3 py-2.5 text-right whitespace-nowrap text-muted-foreground",children:y})]},n.id)})})]})})}function I0({children:r,align:e="center",colSpan:t}){return S.jsx("th",{colSpan:t,className:["px-3 py-2 text-[11px] font-semibold text-muted-foreground leading-tight whitespace-nowrap",e==="left"?"text-left":e==="right"?"text-right":"text-center"].join(" "),children:r})}function tp({children:r,tip:e,align:t="center",colSpan:n}){return S.jsx("th",{colSpan:n,className:["px-3 py-2 text-[11px] font-semibold text-muted-foreground leading-tight whitespace-nowrap",t==="left"?"text-left":t==="right"?"text-right":"text-center"].join(" "),children:S.jsx(Bo,{content:e,children:S.jsx("span",{className:"cursor-help underline decoration-dotted decoration-muted-foreground/40",children:r})})})}const rp=20;function dwe(r){var l;const e=(l=r.analysis.marginAnalysis)==null?void 0:l.platforms;if(!(e!=null&&e.length))return"🔴";const{min:t,median:n,avg:a}=r.analysis.price,i=(t+n)/2,o=Math.max(a,n);let s="🔴";for(const u of e){const c=u.sell30;if(c){if(c<=i)return"🟢";c<=o&&s!=="🟢"&&(s="🟡")}}return s}function vwe(r,e){return e?r.filter(t=>dwe(t)===e):r}const pwe={domeggook:"도매꾹",specialoffer:"특가몰",cjdropshipping:"CJ Dropshipping"};function gwe({channel:r,connected:e,rateLimit:t,dailyLimit:n}){const a=pwe[r]??r;return S.jsxs("div",{className:"flex items-center gap-3 py-3 border-b border-border/60 last:border-0",children:[S.jsx("span",{className:Ge("w-2 h-2 rounded-full shrink-0",e?"bg-green-500":"bg-muted-foreground/30")}),S.jsx("span",{className:"text-[13px] font-medium",children:a}),e?S.jsxs("div",{className:"ml-auto flex gap-3 text-[11px] text-muted-foreground",children:[S.jsxs("span",{children:[t," rps"]}),n&&S.jsxs("span",{children:["일 ",n.toLocaleString(),"회"]}),S.jsx("span",{className:"text-green-600 font-medium",children:"연결됨"})]}):S.jsxs("div",{className:"ml-auto text-[11px] text-muted-foreground",children:["미연결 · ",S.jsx("code",{className:"font-mono",children:"sppt init"})]})]})}function mwe(){const{data:r}=Ng(),{data:e=[],refetch:t,isFetching:n}=iK(),{data:a=[]}=oK(),[i,o]=q.useState(1),[s,l]=q.useState(null),u=(r==null?void 0:r.sourceChannels)??[],c=u.filter(y=>y.connected).length,f=vwe(e,s),d=Math.max(1,Math.ceil(f.length/rp)),v=Math.min(i,d),g=f.slice((v-1)*rp,v*rp);function x(y){l(b=>b===y?null:y),o(1)}return S.jsxs("div",{children:[S.jsxs("div",{className:"flex items-center justify-between mb-6",children:[S.jsx("h2",{className:"text-xl font-medium",children:"소싱 채널"}),S.jsxs("div",{className:"text-[12px] text-muted-foreground",children:[c,"/",u.length," 연결됨"]})]}),S.jsxs("div",{className:"border border-border rounded-lg px-4 py-1 mb-8",children:[u.map(y=>S.jsx(gwe,{channel:y.channel,connected:y.connected,rateLimit:y.rateLimit,dailyLimit:y.dailyLimit},y.channel)),u.length===0&&S.jsx("div",{className:"py-4 text-center text-[12px] text-muted-foreground",children:"로딩 중..."})]}),S.jsxs("div",{children:[S.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[S.jsx(Vp,{size:13,className:"text-muted-foreground"}),S.jsx("span",{className:"text-[13px] font-semibold text-muted-foreground",children:"소싱 검토 이력"}),e.length>0&&S.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[s?`${f.length} / `:"",e.length,"건"]}),e.length>0&&S.jsx("div",{className:"flex items-center gap-1 ml-2",children:["🟢","🟡","🔴"].map(y=>S.jsx("button",{type:"button",onClick:()=>x(y),className:Ge("px-2 py-0.5 rounded-full text-[11px] border transition-colors",s===y?"border-foreground/50 bg-muted text-foreground font-medium":"border-border text-muted-foreground hover:border-foreground/30"),children:y},y))}),S.jsxs("button",{type:"button",onClick:()=>t(),className:Ge("ml-auto flex items-center gap-1 text-[11px] border border-border rounded px-2 py-1 hover:border-foreground/40 transition-colors",n&&"opacity-50 pointer-events-none"),children:[S.jsx(P0,{size:10,className:Ge(n&&"animate-spin")}),"새로고침"]})]}),e.length===0||f.length===0?S.jsxs("div",{className:"border border-dashed border-border rounded-lg p-10 text-center text-muted-foreground text-sm",children:[S.jsx(ll,{size:24,className:"mx-auto mb-3 opacity-30"}),e.length===0?"소싱 상품 시장 분석 이력이 없습니다.":`${s} 해당 항목이 없습니다.`,S.jsxs("div",{className:"mt-3 space-y-1",children:[S.jsx("code",{className:"block bg-muted rounded px-2 py-1 text-[11px] text-foreground font-mono",children:"sppt source market-check <keyword>"}),S.jsx("code",{className:"block bg-muted rounded px-2 py-1 text-[11px] text-foreground font-mono",children:"sppt source detail <id> --market-check"})]})]}):S.jsxs(S.Fragment,{children:[S.jsx(hwe,{entries:g}),d>1&&S.jsxs("div",{className:"flex items-center justify-between mt-3 text-[12px] text-muted-foreground",children:[S.jsxs("span",{children:[(v-1)*rp+1,"–",Math.min(v*rp,f.length)," ","/ ",f.length,"건"]}),S.jsxs("div",{className:"flex items-center gap-1",children:[S.jsx("button",{type:"button",onClick:()=>o(y=>Math.max(1,y-1)),disabled:v===1,className:"p-1 rounded hover:bg-muted disabled:opacity-30 disabled:pointer-events-none",children:S.jsx(AK,{size:14})}),Array.from({length:d},(y,b)=>b+1).map(y=>S.jsx("button",{type:"button",onClick:()=>o(y),className:Ge("w-6 h-6 rounded text-[11px] hover:bg-muted",y===v&&"bg-muted font-semibold text-foreground"),children:y},y)),S.jsx("button",{type:"button",onClick:()=>o(y=>Math.min(d,y+1)),disabled:v===d,className:"p-1 rounded hover:bg-muted disabled:opacity-30 disabled:pointer-events-none",children:S.jsx(On,{size:14})})]})]})]})]}),a.length>0&&S.jsxs("div",{className:"mt-8",children:[S.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[S.jsx(PK,{size:13,className:"text-muted-foreground"}),S.jsx("span",{className:"text-[13px] font-semibold text-muted-foreground",children:"공급처 검증 이력"}),S.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[a.length,"건"]})]}),S.jsx("div",{className:"border border-border rounded-lg overflow-hidden",children:S.jsxs("table",{className:"w-full text-[12px] border-collapse",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border bg-muted/40 text-[11px] font-semibold text-muted-foreground",children:[S.jsx("th",{className:"px-3 py-2 text-left",children:"공급처"}),S.jsx("th",{className:"px-3 py-2 text-center",children:"채널"}),S.jsx("th",{className:"px-3 py-2 text-center",children:"판정"}),S.jsx("th",{className:"px-3 py-2 text-center",children:"재고(평균)"}),S.jsx("th",{className:"px-3 py-2 text-center",children:"품절율"}),S.jsx("th",{className:"px-3 py-2 text-center",children:"즉시출고"}),S.jsx("th",{className:"px-3 py-2 text-center",children:"자동검증"}),S.jsx("th",{className:"px-3 py-2 text-right",children:"검토"})]})}),S.jsx("tbody",{children:a.map((y,b)=>S.jsxs("tr",{className:Ge("border-b border-border/60",b%2!==0&&"bg-muted/5"),children:[S.jsxs("td",{className:"px-3 py-2",children:[S.jsx("div",{className:"font-medium",children:y.supplierNick??y.productId}),y.isPowerSeller&&S.jsx("span",{className:"text-[10px] text-blue-500",children:"파워셀러"}),y.isGoodSeller&&S.jsx("span",{className:"text-[10px] text-green-500 ml-1",children:"우수셀러"})]}),S.jsx("td",{className:"px-3 py-2 text-center text-muted-foreground",children:y.channel}),S.jsx("td",{className:"px-3 py-2 text-center text-base",children:y.tier}),S.jsx("td",{className:"px-3 py-2 text-center",children:y.avgStock!==void 0?S.jsxs("span",{className:y.avgStock>=30?"text-green-600":"text-red-500",children:[y.avgStock,"개"]}):"—"}),S.jsx("td",{className:"px-3 py-2 text-center",children:y.outOfStockRatioPct!==void 0?S.jsxs("span",{className:y.outOfStockRatioPct<30?"text-green-600":"text-red-500",children:[y.outOfStockRatioPct,"%"]}):"—"}),S.jsx("td",{className:"px-3 py-2 text-center",children:y.immediateShipPct!==void 0?S.jsxs("span",{className:y.immediateShipPct>=50?"text-green-600":"text-yellow-600",children:[y.immediateShipPct,"%"]}):"—"}),S.jsxs("td",{className:"px-3 py-2 text-center text-muted-foreground",children:[y.autoPassCount,"/",y.autoTotalCount]}),S.jsx("td",{className:"px-3 py-2 text-right text-muted-foreground whitespace-nowrap",children:yM(new Date(y.savedAt),{addSuffix:!0,locale:E1})})]},y.id))})]})})]})]})}const ywe=[{id:"musinsa",label:"무신사"},{id:"hwahae",label:"화해"}];function Ip(r){return r==null?"-":r==="<10"?"<10":typeof r=="number"?r.toLocaleString():String(r)}function iL(r){return r==="낮음"?"text-green-600":r==="보통"?"text-yellow-600":"text-red-500"}function m2(r){const e=Date.now()-new Date(r).getTime(),t=Math.floor(e/6e4);if(t<1)return"방금";if(t<60)return`${t}분 전`;const n=Math.floor(t/60);return n<24?`${n}시간 전`:`${Math.floor(n/24)}일 전`}function xwe({data:r}){const e=Math.max(...r.map(t=>t.ratio),1);return S.jsx("div",{className:"flex items-end gap-0.5 h-12",children:r.map(t=>S.jsxs("div",{className:"flex flex-col items-center flex-1 gap-0.5 group relative",children:[S.jsx("div",{className:"w-full bg-primary/70 rounded-sm transition-all",style:{height:`${Math.round(t.ratio/e*100)}%`}}),S.jsxs("div",{className:"absolute -top-6 left-1/2 -translate-x-1/2 hidden group-hover:block text-[10px] bg-popover border border-border rounded px-1 py-0.5 whitespace-nowrap z-10",children:[t.period,": ",t.ratio]})]},t.period))})}function bwe({kw:r,highlight:e}){const t=typeof r.monthlyPcQcCnt=="number"?r.monthlyPcQcCnt:0,n=typeof r.monthlyMobileQcCnt=="number"?r.monthlyMobileQcCnt:0,a=t+n;return S.jsxs("tr",{className:Ge("border-b border-border/50 text-[12px]",e&&"bg-muted/50"),children:[S.jsx("td",{className:"py-2 px-3 font-medium text-foreground",children:r.relKeyword}),S.jsx("td",{className:"py-2 px-3 text-right tabular-nums text-muted-foreground",children:Ip(r.monthlyPcQcCnt)}),S.jsx("td",{className:"py-2 px-3 text-right tabular-nums text-muted-foreground",children:Ip(r.monthlyMobileQcCnt)}),S.jsx("td",{className:"py-2 px-3 text-right tabular-nums font-medium",children:a>0?a.toLocaleString():Ip(r.monthlyPcQcCnt)}),S.jsx("td",{className:Ge("py-2 px-3 text-center font-medium",iL(r.compIdx)),children:r.compIdx})]})}function _we({ranking:r}){return r?S.jsxs("div",{children:[S.jsx("div",{className:"flex items-center gap-2 mb-3",children:S.jsxs("span",{className:"text-[12px] text-muted-foreground",children:[r.platformLabel," · ",r.items.length,"개 ·"," ",new Date(r.fetchedAt).toLocaleTimeString("ko-KR",{hour:"2-digit",minute:"2-digit"})," ","기준"]})}),S.jsx("div",{className:"border border-border rounded-lg overflow-hidden",children:S.jsxs("table",{className:"w-full",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border bg-muted/40",children:[S.jsx("th",{className:"py-2 px-3 text-left text-[11px] text-muted-foreground font-medium w-8",children:"순위"}),S.jsx("th",{className:"py-2 px-3 text-left text-[11px] text-muted-foreground font-medium",children:"상품명"}),S.jsx("th",{className:"py-2 px-3 text-left text-[11px] text-muted-foreground font-medium",children:"브랜드"}),S.jsx("th",{className:"py-2 px-3 text-right text-[11px] text-muted-foreground font-medium",children:"가격"}),S.jsx("th",{className:"py-2 px-3 text-right text-[11px] text-muted-foreground font-medium",children:"리뷰"}),S.jsx("th",{className:"py-2 px-3 text-center text-[11px] text-muted-foreground font-medium w-8",children:"링크"})]})}),S.jsx("tbody",{children:r.items.map(e=>S.jsxs("tr",{className:"border-b border-border/50 hover:bg-muted/30 transition-colors text-[12px]",children:[S.jsx("td",{className:"py-2 px-3 text-muted-foreground tabular-nums text-center",children:e.rank}),S.jsx("td",{className:"py-2 px-3 font-medium max-w-[220px] truncate",children:e.name||"-"}),S.jsx("td",{className:"py-2 px-3 text-muted-foreground",children:e.brand||"-"}),S.jsx("td",{className:"py-2 px-3 text-right tabular-nums",children:e.price?S.jsxs("span",{children:[e.price.toLocaleString(),e.discountRate?S.jsxs("span",{className:"ml-1 text-[10px] text-red-500",children:["-",e.discountRate,"%"]}):null]}):"-"}),S.jsx("td",{className:"py-2 px-3 text-right tabular-nums text-muted-foreground",children:e.reviewCount?e.reviewCount.toLocaleString():"-"}),S.jsx("td",{className:"py-2 px-3 text-center",children:e.url?S.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex text-muted-foreground hover:text-foreground transition-colors",children:S.jsx(gM,{size:12})}):"-"})]},e.rank))})]})})]}):null}function Swe({onSelectKeyword:r,onSelectPlatform:e}){const{data:t,isLoading:n}=gK(),[a,i]=q.useState(!0);return n||!t||t.length===0?null:S.jsxs("section",{className:"mt-8",children:[S.jsxs("button",{type:"button",onClick:()=>i(o=>!o),className:"flex items-center gap-2 mb-3 text-[13px] font-semibold text-muted-foreground hover:text-foreground transition-colors",children:[S.jsx(LK,{size:13}),"CLI 기록",S.jsxs("span",{className:"text-[11px] font-normal opacity-60",children:["(",t.length,"건)"]}),S.jsx("span",{className:"ml-auto text-[11px]",children:a?"▲":"▼"})]}),a&&S.jsx("div",{className:"border border-border rounded-lg overflow-hidden divide-y divide-border",children:t.map(o=>S.jsx(wwe,{entry:o,onSelectKeyword:r,onSelectPlatform:e},o.id))})]})}function wwe({entry:r,onSelectKeyword:e,onSelectPlatform:t}){var n;if(r.type==="keyword"){const a=(n=r.volume)==null?void 0:n.results[0],i=typeof(a==null?void 0:a.monthlyPcQcCnt)=="number"?a.monthlyPcQcCnt:0,o=typeof(a==null?void 0:a.monthlyMobileQcCnt)=="number"?a.monthlyMobileQcCnt:0,s=i+o;return S.jsxs("button",{type:"button",onClick:()=>e(r),className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-muted/40 transition-colors text-left",children:[S.jsx(cx,{size:11,className:"text-muted-foreground shrink-0"}),S.jsx("span",{className:"text-[13px] font-medium flex-1",children:r.keyword}),s>0&&S.jsxs("span",{className:"text-[11px] tabular-nums text-muted-foreground",children:[s.toLocaleString(),"회"]}),(a==null?void 0:a.compIdx)&&S.jsx("span",{className:Ge("text-[11px]",iL(a.compIdx)),children:a.compIdx}),S.jsx("span",{className:"text-[11px] text-muted-foreground/60",children:m2(r.timestamp)})]})}return r.type==="compare"?S.jsxs("button",{type:"button",onClick:()=>e(r),className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-muted/40 transition-colors text-left",children:[S.jsx(Vp,{size:11,className:"text-muted-foreground shrink-0"}),S.jsx("span",{className:"text-[13px] font-medium flex-1",children:r.keywords.join(" vs ")}),S.jsx("span",{className:"text-[11px] text-muted-foreground/60",children:m2(r.timestamp)})]}):S.jsxs("button",{type:"button",onClick:()=>t(r),className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-muted/40 transition-colors text-left",children:[S.jsx(ll,{size:11,className:"text-muted-foreground shrink-0"}),S.jsxs("span",{className:"text-[13px] font-medium flex-1",children:[r.platformLabel," 랭킹"]}),S.jsxs("span",{className:"text-[11px] tabular-nums text-muted-foreground",children:[r.ranking.items.length,"위"]}),S.jsx("span",{className:"text-[11px] text-muted-foreground/60",children:m2(r.timestamp)})]})}function Twe(){var I,z,P,G,U,B;const{data:r}=dK(),[e,t]=q.useState(""),[n,a]=q.useState(null),[i,o]=q.useState(!1),[s,l]=q.useState(null),[u,c]=q.useState(null),[f,d]=q.useState(null),[v,g]=q.useState(!1),[x,y]=q.useState(null),b=q.useRef(new Map);async function w(){const F=e.trim();if(F){o(!0),l(null),a(null);try{const H=await vK(F);H.error==="not_configured"?l(H.message??"채널이 설정되지 않았습니다"):H.error?l(H.message??H.error):a(H)}catch(H){l(H instanceof Error?H.message:String(H))}finally{o(!1)}}}async function T(F,H=!1){if(c(F),y(null),!H&&b.current.has(F)){d(b.current.get(F));return}g(!0),d(null);try{const X=await pK(F,20);X.error==="not_configured"?y(X.message??"Apify가 설정되지 않았습니다"):X.error?y(X.message??X.error):(b.current.set(F,X),d(X))}catch(X){y(X instanceof Error?X.message:String(X))}finally{g(!1)}}function C(F){if(u===F&&f){c(null),d(null);return}T(F)}function D(){u&&T(u,!0)}function M(F){if(F.type==="keyword")t(F.keyword),a({keyword:F.keyword,volume:F.volume,trend:F.trend}),l(null),c(null),d(null);else{const H=F.keywords.join(", ");t(H),a({keyword:H,trend:F.trend}),l(null),c(null),d(null)}}function N(F){const H={ranking:F.ranking};b.current.set(F.platform,H),c(F.platform),d(H),y(null),a(null),l(null)}const R=((P=(z=(I=n==null?void 0:n.trend)==null?void 0:I.results)==null?void 0:z[0])==null?void 0:P.data)??[],E=((G=n==null?void 0:n.volume)==null?void 0:G.results)??[],k=E[0]??null;return S.jsxs("div",{children:[S.jsxs("div",{className:"flex items-center justify-between mb-6",children:[S.jsx("h2",{className:"text-xl font-medium",children:"트렌드"}),r&&S.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[S.jsx("span",{className:Ge("w-1.5 h-1.5 rounded-full",r.searchad?"bg-green-500":"bg-muted-foreground/30")}),"검색광고",S.jsx("span",{className:Ge("w-1.5 h-1.5 rounded-full",r.datalab?"bg-green-500":"bg-muted-foreground/30")}),"데이터랩",S.jsx("span",{className:Ge("w-1.5 h-1.5 rounded-full",r.apify?"bg-green-500":"bg-muted-foreground/30")}),"Apify"]})]}),S.jsxs("section",{className:"mb-8",children:[S.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[S.jsx(cx,{size:13,className:"text-muted-foreground"}),S.jsx("span",{className:"text-[13px] font-semibold text-muted-foreground",children:"키워드 검색량"})]}),S.jsxs("div",{className:"flex gap-2 mb-4",children:[S.jsx("input",{type:"text",value:e,onChange:F=>t(F.target.value),onKeyDown:F=>F.key==="Enter"&&!i&&w(),placeholder:"키워드 입력 (예: 여름 원피스)",className:"flex-1 h-9 px-3 text-[13px] border border-border rounded-md bg-background focus:outline-none focus:ring-1 focus:ring-ring"}),S.jsx("button",{type:"button",onClick:w,disabled:i||!e.trim(),className:"h-9 px-4 text-[13px] font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1.5",children:i?S.jsxs(S.Fragment,{children:[S.jsx(P0,{size:12,className:"animate-spin"}),"조회 중"]}):S.jsxs(S.Fragment,{children:[S.jsx(cx,{size:12}),"검색"]})})]}),s&&S.jsx("div",{className:"flex items-center gap-2 text-[12px] text-red-600 bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900/50 rounded-lg px-4 py-3 mb-4",children:s}),n&&!s&&S.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[k&&S.jsx("div",{className:"px-5 py-4 border-b border-border bg-muted/30",children:S.jsxs("div",{className:"flex items-center gap-6",children:[S.jsxs("div",{children:[S.jsx("div",{className:"text-[11px] text-muted-foreground mb-0.5",children:"키워드"}),S.jsx("div",{className:"text-[14px] font-semibold",children:k.relKeyword})]}),S.jsxs("div",{children:[S.jsx("div",{className:"text-[11px] text-muted-foreground mb-0.5",children:"PC 검색량"}),S.jsx("div",{className:"text-[14px] font-semibold tabular-nums",children:Ip(k.monthlyPcQcCnt)})]}),S.jsxs("div",{children:[S.jsx("div",{className:"text-[11px] text-muted-foreground mb-0.5",children:"모바일 검색량"}),S.jsx("div",{className:"text-[14px] font-semibold tabular-nums",children:Ip(k.monthlyMobileQcCnt)})]}),S.jsxs("div",{children:[S.jsx("div",{className:"text-[11px] text-muted-foreground mb-0.5",children:"합계"}),S.jsx("div",{className:"text-[14px] font-semibold tabular-nums",children:(()=>{const F=typeof k.monthlyPcQcCnt=="number"?k.monthlyPcQcCnt:0,H=typeof k.monthlyMobileQcCnt=="number"?k.monthlyMobileQcCnt:0;return(F+H).toLocaleString()})()})]}),S.jsxs("div",{children:[S.jsx("div",{className:"text-[11px] text-muted-foreground mb-0.5",children:"경쟁강도"}),S.jsx("div",{className:Ge("text-[14px] font-semibold",iL(k.compIdx)),children:k.compIdx})]})]})}),R.length>0&&S.jsxs("div",{className:"px-5 py-4 border-b border-border",children:[S.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[S.jsx(ll,{size:12,className:"text-muted-foreground"}),S.jsx("span",{className:"text-[11px] text-muted-foreground font-medium",children:"최근 3개월 트렌드 (월별 상대지수)"})]}),S.jsx(xwe,{data:R}),S.jsxs("div",{className:"flex justify-between text-[10px] text-muted-foreground mt-1",children:[S.jsx("span",{children:(U=R[0])==null?void 0:U.period}),S.jsx("span",{children:(B=R[R.length-1])==null?void 0:B.period})]})]}),E.length>1&&S.jsx("div",{className:"overflow-x-auto",children:S.jsxs("table",{className:"w-full",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border bg-muted/30",children:[S.jsx("th",{className:"py-2 px-3 text-left text-[11px] text-muted-foreground font-medium",children:"연관 키워드"}),S.jsx("th",{className:"py-2 px-3 text-right text-[11px] text-muted-foreground font-medium",children:"PC"}),S.jsx("th",{className:"py-2 px-3 text-right text-[11px] text-muted-foreground font-medium",children:"모바일"}),S.jsx("th",{className:"py-2 px-3 text-right text-[11px] text-muted-foreground font-medium",children:"합계"}),S.jsx("th",{className:"py-2 px-3 text-center text-[11px] text-muted-foreground font-medium",children:"경쟁강도"})]})}),S.jsx("tbody",{children:E.map((F,H)=>S.jsx(bwe,{kw:F,highlight:H%2===1},F.relKeyword))})]})})]}),!n&&!i&&!s&&S.jsxs("div",{className:"border border-dashed border-border rounded-lg p-8 text-center text-muted-foreground text-sm",children:[S.jsx(Vp,{size:24,className:"mx-auto mb-3 opacity-30"}),S.jsx("p",{className:"text-[13px]",children:"키워드를 입력하면 검색량과 트렌드를 조회합니다"})]})]}),S.jsxs("section",{children:[S.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[S.jsx(ll,{size:13,className:"text-muted-foreground"}),S.jsx("span",{className:"text-[13px] font-semibold text-muted-foreground",children:"전문몰 랭킹"}),r&&!r.apify&&S.jsx("span",{className:"text-[11px] text-muted-foreground",children:"· Apify 미설정"})]}),S.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-4",children:[ywe.map(F=>S.jsx("button",{type:"button",onClick:()=>C(F.id),className:Ge("px-3 py-1.5 text-[12px] rounded-md border transition-colors",u===F.id?"border-foreground/50 bg-muted text-foreground font-medium":"border-border text-muted-foreground hover:border-foreground/30 hover:text-foreground"),children:F.label},F.id)),f&&u&&!v&&S.jsxs("button",{type:"button",onClick:D,className:"ml-auto flex items-center gap-1 px-2.5 py-1.5 text-[11px] border border-border rounded-md text-muted-foreground hover:border-foreground/30 hover:text-foreground transition-colors",title:"Apify 재조회 (비용 발생)",children:[S.jsx(P0,{size:11}),"새로고침"]})]}),v&&S.jsxs("div",{className:"flex items-center gap-2 py-8 justify-center text-[12px] text-muted-foreground",children:[S.jsx(P0,{size:13,className:"animate-spin"}),"랭킹 수집 중... (최대 2분 소요)"]}),x&&!v&&S.jsx("div",{className:"flex items-center gap-2 text-[12px] text-red-600 bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900/50 rounded-lg px-4 py-3",children:x}),(f==null?void 0:f.ranking)&&!v&&S.jsx(_we,{ranking:f.ranking}),!u&&!v&&S.jsxs("div",{className:"border border-dashed border-border rounded-lg p-8 text-center text-muted-foreground text-sm",children:[S.jsx(ll,{size:24,className:"mx-auto mb-3 opacity-30"}),S.jsx("p",{className:"text-[13px]",children:"플랫폼을 선택하면 실시간 랭킹을 수집합니다"}),S.jsx("p",{className:"text-[11px] mt-1 opacity-70",children:"Apify 기반 · 수집에 1-2분 소요"})]})]}),S.jsx(Swe,{onSelectKeyword:M,onSelectPlatform:N})]})}const Cwe=["overview","session","config","orders","products","channels","sourcing","trend","settlement"];function B4(){const r=window.location.hash.slice(1).split("?")[0];return Cwe.includes(r)?r:"overview"}const Awe=[{type:"item",id:"overview",label:"Overview",icon:RK},{type:"item",id:"session",label:"Session",icon:NK},{type:"item",id:"config",label:"Settings",icon:OK},{type:"section",label:"상품전략"},{type:"item",id:"trend",label:"트렌드",icon:ll},{type:"item",id:"sourcing",label:"소싱",icon:cx},{type:"item",id:"products",label:"상품",icon:dG},{type:"section",label:"판매채널"},{type:"item",id:"channels",label:"채널",icon:EK},{type:"item",id:"orders",label:"주문",icon:gG},{type:"item",id:"settlement",label:"정산",icon:IK}];function Mwe(){const[r,e]=q.useState(B4);q.useEffect(()=>{const n=()=>e(B4());return window.addEventListener("hashchange",n),()=>window.removeEventListener("hashchange",n)},[]);const t=n=>{window.location.hash=n};return S.jsx(nG,{delayDuration:200,children:S.jsxs("div",{className:"flex min-h-screen",children:[S.jsxs("nav",{className:"w-[220px] border-r border-border flex flex-col shrink-0 sticky top-0 h-screen overflow-y-auto",children:[S.jsx("div",{className:"px-4 py-4 border-b border-border",children:S.jsxs("h1",{className:"text-[15px] font-semibold flex items-center gap-2",children:[S.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"hsl(var(--primary))",strokeWidth:"2","aria-hidden":"true",children:[S.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"}),S.jsx("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),S.jsx("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"})]}),"shopport",S.jsx("span",{className:"text-[11px] text-muted-foreground font-normal",children:"v0.1.0"})]})}),S.jsx("div",{className:"flex-1 py-2",children:Awe.map(n=>n.type==="section"?S.jsx("div",{className:"px-4 pt-4 pb-1 text-[11px] font-medium text-muted-foreground/60 uppercase tracking-wider",children:n.label},n.label):S.jsxs("button",{type:"button",onClick:()=>t(n.id),className:Ge("flex items-center gap-2.5 w-full px-4 py-2 text-[13px] text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",r===n.id&&"bg-muted text-foreground font-medium"),children:[S.jsx(n.icon,{size:14}),n.label]},n.id))})]}),S.jsx("main",{className:"flex-1 overflow-y-auto",children:S.jsxs("div",{className:"max-w-[1280px] mx-auto p-7",children:[r==="overview"&&S.jsx(RSe,{}),r==="session"&&S.jsx(jSe,{}),r==="config"&&S.jsx(qK,{}),r==="orders"&&S.jsx(aee,{}),r==="products"&&S.jsx(ESe,{}),r==="channels"&&S.jsx(GK,{}),r==="sourcing"&&S.jsx(mwe,{}),r==="trend"&&S.jsx(Twe,{}),r==="settlement"&&S.jsx(owe,{})]})})]})})}const Dwe=new GX({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1,staleTime:1e4}}}),Z9=document.getElementById("root");if(!Z9)throw new Error("Root element not found");oq.createRoot(Z9).render(S.jsx(q.StrictMode,{children:S.jsx(FX,{client:Dwe,children:S.jsx(Mwe,{})})}));