diff --git a/.gitignore b/.gitignore index 0d8ca50..f6df315 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ packages/ release/ test/bin/ vendor/ +lastversion/ dist/ .idea/ .vscode/ diff --git a/Makefile b/Makefile index e9b9ec5..d94e7c3 100644 --- a/Makefile +++ b/Makefile @@ -46,8 +46,23 @@ e2e: e2e-trace: DEBUG=true LOG_LEVEL=trace ./hack/run-e2e.sh +e2e-compatibility-last-frpc: + if [ ! -d "./lastversion" ]; then \ + TARGET_DIRNAME=lastversion ./hack/download.sh; \ + fi + FRPC_PATH="`pwd`/lastversion/frpc" ./hack/run-e2e.sh + rm -r ./lastversion + +e2e-compatibility-last-frps: + if [ ! -d "./lastversion" ]; then \ + TARGET_DIRNAME=lastversion ./hack/download.sh; \ + fi + FRPS_PATH="`pwd`/lastversion/frps" ./hack/run-e2e.sh + rm -r ./lastversion + alltest: vet gotest e2e clean: rm -f ./bin/frpc rm -f ./bin/frps + rm -rf ./lastversion diff --git a/README.md b/README.md index 4cf18b6..82fb87d 100644 --- a/README.md +++ b/README.md @@ -562,11 +562,9 @@ use_compression = true #### TLS -frp supports the TLS protocol between `frpc` and `frps` since v0.25.0. +Since v0.50.0, the default value of `tls_enable` and `disable_custom_tls_first_byte` has been changed to true, and tls is enabled by default. -For port multiplexing, frp sends a first byte `0x17` to dial a TLS connection. - -Configure `tls_enable = true` in the `[common]` section to `frpc.ini` to enable this feature. +For port multiplexing, frp sends a first byte `0x17` to dial a TLS connection. This only takes effect when you set `disable_custom_tls_first_byte` to false. To **enforce** `frps` to only accept TLS connections - configure `tls_only = true` in the `[common]` section in `frps.ini`. **This is optional.** @@ -581,7 +579,6 @@ tls_trusted_ca_file = ca.crt **`frps` TLS settings (under the `[common]` section):** ```ini tls_only = true -tls_enable = true tls_cert_file = certificate.crt tls_key_file = certificate.key tls_trusted_ca_file = ca.crt diff --git a/Release.md b/Release.md index 2b2fbab..ab58d8d 100644 --- a/Release.md +++ b/Release.md @@ -1,19 +1,18 @@ ## Notes -We have thoroughly refactored xtcp in this version to improve its penetration rate and stability. +**For enhanced security, the default values for `tls_enable` and `disable_custom_tls_first_byte` have been set to true.** -In this version, different penetration strategies can be attempted by retrying connections multiple times. Once a hole is successfully punched, the strategy will be recorded in the server cache for future reuse. When new users connect, the successfully penetrated tunnel can be reused instead of punching a new hole. +If you wish to revert to the previous default values, you need to manually set the values of these two parameters to false. -**Due to a significant refactor of xtcp, this version is not compatible with previous versions of xtcp.** +### Features -**To use features related to xtcp, both frpc and frps need to be updated to the latest version.** +* Added support for `allow_users` in stcp, sudp, xtcp. By default, only the same user is allowed to access. Use `*` to allow access from any user. The visitor configuration now supports `server_user` to connect to proxies of other users. +* Added fallback support to a specified alternative visitor when xtcp connection fails. -### New +### Improvements -* The frpc has added the `nathole discover` command for testing the NAT type of the current network. -* `XTCP` has been refactored, resulting in a significant improvement in the success rate of penetration. -* When verifying passwords, use `subtle.ConstantTimeCompare` and introduce a certain delay when the password is incorrect. +* Increased the default value of `MaxStreamWindowSize` for yamux to 6MB, improving traffic forwarding rate in high-latency scenarios. -### Fix +### Fixes -* Fix the problem of lagging when opening multiple table entries in the frps dashboard. +* Fixed an issue where having proxies with the same name would cause previously working proxies to become ineffective in `xtcp`. diff --git a/assets/frps/static/index-93e38bbf.js b/assets/frps/static/index-ea3edf22.js similarity index 98% rename from assets/frps/static/index-93e38bbf.js rename to assets/frps/static/index-ea3edf22.js index 7ef0809..206292c 100644 --- a/assets/frps/static/index-93e38bbf.js +++ b/assets/frps/static/index-ea3edf22.js @@ -1,4 +1,4 @@ -var fD=Object.defineProperty;var dD=(e,t,r)=>t in e?fD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var hD=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Wt=(e,t,r)=>(dD(e,typeof t!="symbol"?t+"":t,r),r);var Tre=hD((Nr,Fr)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerpolicy&&(a.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?a.credentials="include":i.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();function Em(e,t){const r=Object.create(null),n=e.split(",");for(let i=0;i!!r[i.toLowerCase()]:i=>!!r[i]}function St(e){if(be(e)){const t={};for(let r=0;r{if(r){const n=r.split(pD);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function ue(e){let t="";if(He(e))t=e;else if(be(e))for(let r=0;rOd(r,t))}const Te=e=>He(e)?e:e==null?"":be(e)||Xe(e)&&(e.toString===mC||!De(e.toString))?JSON.stringify(e,gC,2):String(e),gC=(e,t)=>t&&t.__v_isRef?gC(e,t.value):is(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,i])=>(r[`${n} =>`]=i,r),{})}:kd(t)?{[`Set(${t.size})`]:[...t.values()]}:Xe(t)&&!be(t)&&!yC(t)?String(t):t,yt={},ns=[],ur=()=>{},wD=()=>!1,xD=/^on[^a-z]/,Rd=e=>xD.test(e),Pm=e=>e.startsWith("onUpdate:"),Gt=Object.assign,Lm=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},SD=Object.prototype.hasOwnProperty,We=(e,t)=>SD.call(e,t),be=Array.isArray,is=e=>Bu(e)==="[object Map]",kd=e=>Bu(e)==="[object Set]",K0=e=>Bu(e)==="[object Date]",De=e=>typeof e=="function",He=e=>typeof e=="string",tu=e=>typeof e=="symbol",Xe=e=>e!==null&&typeof e=="object",jf=e=>Xe(e)&&De(e.then)&&De(e.catch),mC=Object.prototype.toString,Bu=e=>mC.call(e),CD=e=>Bu(e).slice(8,-1),yC=e=>Bu(e)==="[object Object]",Dm=e=>He(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,mf=Em(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Nd=e=>{const t=Object.create(null);return r=>t[r]||(t[r]=e(r))},TD=/-(\w)/g,An=Nd(e=>e.replace(TD,(t,r)=>r?r.toUpperCase():"")),MD=/\B([A-Z])/g,xo=Nd(e=>e.replace(MD,"-$1").toLowerCase()),Fd=Nd(e=>e.charAt(0).toUpperCase()+e.slice(1)),yf=Nd(e=>e?`on${Fd(e)}`:""),ru=(e,t)=>!Object.is(e,t),_f=(e,t)=>{for(let r=0;r{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:r})},AD=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ED=e=>{const t=He(e)?Number(e):NaN;return isNaN(t)?e:t};let X0;const PD=()=>X0||(X0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Or;class LD{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Or,!t&&Or&&(this.index=(Or.scopes||(Or.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const r=Or;try{return Or=this,t()}finally{Or=r}}}on(){Or=this}off(){Or=this.parent}stop(t){if(this._active){let r,n;for(r=0,n=this.effects.length;r{const t=new Set(e);return t.w=0,t.n=0,t},bC=e=>(e.w&ea)>0,wC=e=>(e.n&ea)>0,OD=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let r=0;for(let n=0;n{(c==="length"||c>=l)&&s.push(u)})}else switch(r!==void 0&&s.push(o.get(r)),t){case"add":be(e)?Dm(r)&&s.push(o.get("length")):(s.push(o.get(no)),is(e)&&s.push(o.get(Cp)));break;case"delete":be(e)||(s.push(o.get(no)),is(e)&&s.push(o.get(Cp)));break;case"set":is(e)&&s.push(o.get(no));break}if(s.length===1)s[0]&&Tp(s[0]);else{const l=[];for(const u of s)u&&l.push(...u);Tp(Im(l))}}function Tp(e,t){const r=be(e)?e:[...e];for(const n of r)n.computed&&Q0(n);for(const n of r)n.computed||Q0(n)}function Q0(e,t){(e!==bn||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function kD(e,t){var r;return(r=qf.get(e))===null||r===void 0?void 0:r.get(t)}const ND=Em("__proto__,__v_isRef,__isVue"),CC=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(tu)),FD=Rm(),BD=Rm(!1,!0),$D=Rm(!0),J0=HD();function HD(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...r){const n=Ke(this);for(let a=0,o=this.length;a{e[t]=function(...r){Os();const n=Ke(this)[t].apply(this,r);return Rs(),n}}),e}function zD(e){const t=Ke(this);return Mr(t,"has",e),t.hasOwnProperty(e)}function Rm(e=!1,t=!1){return function(n,i,a){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&a===(e?t?nI:PC:t?EC:AC).get(n))return n;const o=be(n);if(!e){if(o&&We(J0,i))return Reflect.get(J0,i,a);if(i==="hasOwnProperty")return zD}const s=Reflect.get(n,i,a);return(tu(i)?CC.has(i):ND(i))||(e||Mr(n,"get",i),t)?s:Ct(s)?o&&Dm(i)?s:s.value:Xe(s)?e?$u(s):fn(s):s}}const WD=TC(),VD=TC(!0);function TC(e=!1){return function(r,n,i,a){let o=r[n];if(vs(o)&&Ct(o)&&!Ct(i))return!1;if(!e&&(!Kf(i)&&!vs(i)&&(o=Ke(o),i=Ke(i)),!be(r)&&Ct(o)&&!Ct(i)))return o.value=i,!0;const s=be(r)&&Dm(n)?Number(n)e,Bd=e=>Reflect.getPrototypeOf(e);function uc(e,t,r=!1,n=!1){e=e.__v_raw;const i=Ke(e),a=Ke(t);r||(t!==a&&Mr(i,"get",t),Mr(i,"get",a));const{has:o}=Bd(i),s=n?km:r?Bm:nu;if(o.call(i,t))return s(e.get(t));if(o.call(i,a))return s(e.get(a));e!==i&&e.get(t)}function cc(e,t=!1){const r=this.__v_raw,n=Ke(r),i=Ke(e);return t||(e!==i&&Mr(n,"has",e),Mr(n,"has",i)),e===i?r.has(e):r.has(e)||r.has(i)}function fc(e,t=!1){return e=e.__v_raw,!t&&Mr(Ke(e),"iterate",no),Reflect.get(e,"size",e)}function e_(e){e=Ke(e);const t=Ke(this);return Bd(t).has.call(t,e)||(t.add(e),gi(t,"add",e,e)),this}function t_(e,t){t=Ke(t);const r=Ke(this),{has:n,get:i}=Bd(r);let a=n.call(r,e);a||(e=Ke(e),a=n.call(r,e));const o=i.call(r,e);return r.set(e,t),a?ru(t,o)&&gi(r,"set",e,t):gi(r,"add",e,t),this}function r_(e){const t=Ke(this),{has:r,get:n}=Bd(t);let i=r.call(t,e);i||(e=Ke(e),i=r.call(t,e)),n&&n.call(t,e);const a=t.delete(e);return i&&gi(t,"delete",e,void 0),a}function n_(){const e=Ke(this),t=e.size!==0,r=e.clear();return t&&gi(e,"clear",void 0,void 0),r}function dc(e,t){return function(n,i){const a=this,o=a.__v_raw,s=Ke(o),l=t?km:e?Bm:nu;return!e&&Mr(s,"iterate",no),o.forEach((u,c)=>n.call(i,l(u),l(c),a))}}function hc(e,t,r){return function(...n){const i=this.__v_raw,a=Ke(i),o=is(a),s=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=i[e](...n),c=r?km:t?Bm:nu;return!t&&Mr(a,"iterate",l?Cp:no),{next(){const{value:f,done:d}=u.next();return d?{value:f,done:d}:{value:s?[c(f[0]),c(f[1])]:c(f),done:d}},[Symbol.iterator](){return this}}}}function Pi(e){return function(...t){return e==="delete"?!1:this}}function KD(){const e={get(a){return uc(this,a)},get size(){return fc(this)},has:cc,add:e_,set:t_,delete:r_,clear:n_,forEach:dc(!1,!1)},t={get(a){return uc(this,a,!1,!0)},get size(){return fc(this)},has:cc,add:e_,set:t_,delete:r_,clear:n_,forEach:dc(!1,!0)},r={get(a){return uc(this,a,!0)},get size(){return fc(this,!0)},has(a){return cc.call(this,a,!0)},add:Pi("add"),set:Pi("set"),delete:Pi("delete"),clear:Pi("clear"),forEach:dc(!0,!1)},n={get(a){return uc(this,a,!0,!0)},get size(){return fc(this,!0)},has(a){return cc.call(this,a,!0)},add:Pi("add"),set:Pi("set"),delete:Pi("delete"),clear:Pi("clear"),forEach:dc(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{e[a]=hc(a,!1,!1),r[a]=hc(a,!0,!1),t[a]=hc(a,!1,!0),n[a]=hc(a,!0,!0)}),[e,r,t,n]}const[XD,ZD,QD,JD]=KD();function Nm(e,t){const r=t?e?JD:QD:e?ZD:XD;return(n,i,a)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(We(r,i)&&i in n?r:n,i,a)}const eI={get:Nm(!1,!1)},tI={get:Nm(!1,!0)},rI={get:Nm(!0,!1)},AC=new WeakMap,EC=new WeakMap,PC=new WeakMap,nI=new WeakMap;function iI(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function aI(e){return e.__v_skip||!Object.isExtensible(e)?0:iI(CD(e))}function fn(e){return vs(e)?e:Fm(e,!1,MC,eI,AC)}function LC(e){return Fm(e,!1,qD,tI,EC)}function $u(e){return Fm(e,!0,YD,rI,PC)}function Fm(e,t,r,n,i){if(!Xe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=i.get(e);if(a)return a;const o=aI(e);if(o===0)return e;const s=new Proxy(e,o===2?n:r);return i.set(e,s),s}function as(e){return vs(e)?as(e.__v_raw):!!(e&&e.__v_isReactive)}function vs(e){return!!(e&&e.__v_isReadonly)}function Kf(e){return!!(e&&e.__v_isShallow)}function DC(e){return as(e)||vs(e)}function Ke(e){const t=e&&e.__v_raw;return t?Ke(t):e}function IC(e){return Yf(e,"__v_skip",!0),e}const nu=e=>Xe(e)?fn(e):e,Bm=e=>Xe(e)?$u(e):e;function OC(e){Xi&&bn&&(e=Ke(e),SC(e.dep||(e.dep=Im())))}function RC(e,t){e=Ke(e);const r=e.dep;r&&Tp(r)}function Ct(e){return!!(e&&e.__v_isRef===!0)}function B(e){return kC(e,!1)}function $m(e){return kC(e,!0)}function kC(e,t){return Ct(e)?e:new oI(e,t)}class oI{constructor(t,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?t:Ke(t),this._value=r?t:nu(t)}get value(){return OC(this),this._value}set value(t){const r=this.__v_isShallow||Kf(t)||vs(t);t=r?t:Ke(t),ru(t,this._rawValue)&&(this._rawValue=t,this._value=r?t:nu(t),RC(this))}}function E(e){return Ct(e)?e.value:e}const sI={get:(e,t,r)=>E(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const i=e[t];return Ct(i)&&!Ct(r)?(i.value=r,!0):Reflect.set(e,t,r,n)}};function NC(e){return as(e)?e:new Proxy(e,sI)}function $d(e){const t=be(e)?new Array(e.length):{};for(const r in e)t[r]=tn(e,r);return t}class lI{constructor(t,r,n){this._object=t,this._key=r,this._defaultValue=n,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return kD(Ke(this._object),this._key)}}function tn(e,t,r){const n=e[t];return Ct(n)?n:new lI(e,t,r)}var FC;class uI{constructor(t,r,n,i){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this[FC]=!1,this._dirty=!0,this.effect=new Om(t,()=>{this._dirty||(this._dirty=!0,RC(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const t=Ke(this);return OC(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}FC="__v_isReadonly";function cI(e,t,r=!1){let n,i;const a=De(e);return a?(n=e,i=ur):(n=e.get,i=e.set),new uI(n,i,a||!i,r)}function fI(e,...t){}function Zi(e,t,r,n){let i;try{i=n?e(...n):e()}catch(a){Hd(a,t,r)}return i}function rn(e,t,r,n){if(De(e)){const a=Zi(e,t,r,n);return a&&jf(a)&&a.catch(o=>{Hd(o,t,r)}),a}const i=[];for(let a=0;a>>1;au(tr[n])$n&&tr.splice(t,1)}function pI(e){be(e)?os.push(...e):(!ci||!ci.includes(e,e.allowRecurse?Ga+1:Ga))&&os.push(e),$C()}function i_(e,t=iu?$n+1:0){for(;tau(r)-au(n)),Ga=0;Gae.id==null?1/0:e.id,gI=(e,t)=>{const r=au(e)-au(t);if(r===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return r};function zC(e){Mp=!1,iu=!0,tr.sort(gI);const t=ur;try{for($n=0;$nHe(h)?h.trim():h)),f&&(i=r.map(AD))}let s,l=n[s=yf(t)]||n[s=yf(An(t))];!l&&a&&(l=n[s=yf(xo(t))]),l&&rn(l,e,6,i);const u=n[s+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,rn(u,e,6,i)}}function WC(e,t,r=!1){const n=t.emitsCache,i=n.get(e);if(i!==void 0)return i;const a=e.emits;let o={},s=!1;if(!De(e)){const l=u=>{const c=WC(u,t,!0);c&&(s=!0,Gt(o,c))};!r&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!a&&!s?(Xe(e)&&n.set(e,null),null):(be(a)?a.forEach(l=>o[l]=null):Gt(o,a),Xe(e)&&n.set(e,o),o)}function zd(e,t){return!e||!Rd(t)?!1:(t=t.slice(2).replace(/Once$/,""),We(e,t[0].toLowerCase()+t.slice(1))||We(e,xo(t))||We(e,t))}let qt=null,VC=null;function Xf(e){const t=qt;return qt=e,VC=e&&e.type.__scopeId||null,t}function Z(e,t=qt,r){if(!t||e._n)return e;const n=(...i)=>{n._d&&g_(-1);const a=Xf(t);let o;try{o=e(...i)}finally{Xf(a),n._d&&g_(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Ih(e){const{type:t,vnode:r,proxy:n,withProxy:i,props:a,propsOptions:[o],slots:s,attrs:l,emit:u,render:c,renderCache:f,data:d,setupState:h,ctx:v,inheritAttrs:p}=e;let g,m;const y=Xf(e);try{if(r.shapeFlag&4){const b=i||n;g=Bn(c.call(b,b,f,a,h,d,v)),m=l}else{const b=t;g=Bn(b.length>1?b(a,{attrs:l,slots:s,emit:u}):b(a,null)),m=t.props?l:yI(l)}}catch(b){Dl.length=0,Hd(b,e,1),g=ee(xr)}let _=g;if(m&&p!==!1){const b=Object.keys(m),{shapeFlag:x}=_;b.length&&x&7&&(o&&b.some(Pm)&&(m=_I(m,o)),_=mi(_,m))}return r.dirs&&(_=mi(_),_.dirs=_.dirs?_.dirs.concat(r.dirs):r.dirs),r.transition&&(_.transition=r.transition),g=_,Xf(y),g}const yI=e=>{let t;for(const r in e)(r==="class"||r==="style"||Rd(r))&&((t||(t={}))[r]=e[r]);return t},_I=(e,t)=>{const r={};for(const n in e)(!Pm(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function bI(e,t,r){const{props:n,children:i,component:a}=e,{props:o,children:s,patchFlag:l}=t,u=a.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?a_(n,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let f=0;fe.__isSuspense;function SI(e,t){t&&t.pendingBranch?be(e)?t.effects.push(...e):t.effects.push(e):pI(e)}function At(e,t){if(It){let r=It.provides;const n=It.parent&&It.parent.provides;n===r&&(r=It.provides=Object.create(n)),r[e]=t}}function Ee(e,t,r=!1){const n=It||qt;if(n){const i=n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return r&&De(t)?t.call(n.proxy):t}}function io(e,t){return Wm(e,null,t)}const vc={};function Se(e,t,r){return Wm(e,t,r)}function Wm(e,t,{immediate:r,deep:n,flush:i,onTrack:a,onTrigger:o}=yt){const s=_C()===(It==null?void 0:It.scope)?It:null;let l,u=!1,c=!1;if(Ct(e)?(l=()=>e.value,u=Kf(e)):as(e)?(l=()=>e,n=!0):be(e)?(c=!0,u=e.some(_=>as(_)||Kf(_)),l=()=>e.map(_=>{if(Ct(_))return _.value;if(as(_))return Xa(_);if(De(_))return Zi(_,s,2)})):De(e)?t?l=()=>Zi(e,s,2):l=()=>{if(!(s&&s.isUnmounted))return f&&f(),rn(e,s,3,[d])}:l=ur,t&&n){const _=l;l=()=>Xa(_())}let f,d=_=>{f=m.onStop=()=>{Zi(_,s,4)}},h;if(uu)if(d=ur,t?r&&rn(t,s,3,[l(),c?[]:void 0,d]):l(),i==="sync"){const _=vO();h=_.__watcherHandles||(_.__watcherHandles=[])}else return ur;let v=c?new Array(e.length).fill(vc):vc;const p=()=>{if(m.active)if(t){const _=m.run();(n||u||(c?_.some((b,x)=>ru(b,v[x])):ru(_,v)))&&(f&&f(),rn(t,s,3,[_,v===vc?void 0:c&&v[0]===vc?[]:v,d]),v=_)}else m.run()};p.allowRecurse=!!t;let g;i==="sync"?g=p:i==="post"?g=()=>yr(p,s&&s.suspense):(p.pre=!0,s&&(p.id=s.uid),g=()=>zm(p));const m=new Om(l,g);t?r?p():v=m.run():i==="post"?yr(m.run.bind(m),s&&s.suspense):m.run();const y=()=>{m.stop(),s&&s.scope&&Lm(s.scope.effects,m)};return h&&h.push(y),y}function CI(e,t,r){const n=this.proxy,i=He(e)?e.includes(".")?GC(n,e):()=>n[e]:e.bind(n,n);let a;De(t)?a=t:(a=t.handler,r=t);const o=It;ps(this);const s=Wm(i,a.bind(n),r);return o?ps(o):ao(),s}function GC(e,t){const r=t.split(".");return()=>{let n=e;for(let i=0;i{Xa(r,t)});else if(yC(e))for(const r in e)Xa(e[r],t);return e}function UC(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return wt(()=>{e.isMounted=!0}),Xt(()=>{e.isUnmounting=!0}),e}const Wr=[Function,Array],TI={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Wr,onEnter:Wr,onAfterEnter:Wr,onEnterCancelled:Wr,onBeforeLeave:Wr,onLeave:Wr,onAfterLeave:Wr,onLeaveCancelled:Wr,onBeforeAppear:Wr,onAppear:Wr,onAfterAppear:Wr,onAppearCancelled:Wr},setup(e,{slots:t}){const r=ct(),n=UC();let i;return()=>{const a=t.default&&Vm(t.default(),!0);if(!a||!a.length)return;let o=a[0];if(a.length>1){for(const p of a)if(p.type!==xr){o=p;break}}const s=Ke(e),{mode:l}=s;if(n.isLeaving)return Oh(o);const u=o_(o);if(!u)return Oh(o);const c=ou(u,s,n,r);su(u,c);const f=r.subTree,d=f&&o_(f);let h=!1;const{getTransitionKey:v}=u.type;if(v){const p=v();i===void 0?i=p:p!==i&&(i=p,h=!0)}if(d&&d.type!==xr&&(!Ua(u,d)||h)){const p=ou(d,s,n,r);if(su(d,p),l==="out-in")return n.isLeaving=!0,p.afterLeave=()=>{n.isLeaving=!1,r.update.active!==!1&&r.update()},Oh(o);l==="in-out"&&u.type!==xr&&(p.delayLeave=(g,m,y)=>{const _=YC(n,d);_[String(d.key)]=d,g._leaveCb=()=>{m(),g._leaveCb=void 0,delete c.delayedLeave},c.delayedLeave=y})}return o}}},jC=TI;function YC(e,t){const{leavingVNodes:r}=e;let n=r.get(t.type);return n||(n=Object.create(null),r.set(t.type,n)),n}function ou(e,t,r,n){const{appear:i,mode:a,persisted:o=!1,onBeforeEnter:s,onEnter:l,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:f,onLeave:d,onAfterLeave:h,onLeaveCancelled:v,onBeforeAppear:p,onAppear:g,onAfterAppear:m,onAppearCancelled:y}=t,_=String(e.key),b=YC(r,e),x=(C,M)=>{C&&rn(C,n,9,M)},w=(C,M)=>{const P=M[1];x(C,M),be(C)?C.every(A=>A.length<=1)&&P():C.length<=1&&P()},S={mode:a,persisted:o,beforeEnter(C){let M=s;if(!r.isMounted)if(i)M=p||s;else return;C._leaveCb&&C._leaveCb(!0);const P=b[_];P&&Ua(e,P)&&P.el._leaveCb&&P.el._leaveCb(),x(M,[C])},enter(C){let M=l,P=u,A=c;if(!r.isMounted)if(i)M=g||l,P=m||u,A=y||c;else return;let T=!1;const D=C._enterCb=N=>{T||(T=!0,N?x(A,[C]):x(P,[C]),S.delayedLeave&&S.delayedLeave(),C._enterCb=void 0)};M?w(M,[C,D]):D()},leave(C,M){const P=String(e.key);if(C._enterCb&&C._enterCb(!0),r.isUnmounting)return M();x(f,[C]);let A=!1;const T=C._leaveCb=D=>{A||(A=!0,M(),D?x(v,[C]):x(h,[C]),C._leaveCb=void 0,b[P]===e&&delete b[P])};b[P]=e,d?w(d,[C,T]):T()},clone(C){return ou(C,t,r,n)}};return S}function Oh(e){if(Wd(e))return e=mi(e),e.children=null,e}function o_(e){return Wd(e)?e.children?e.children[0]:void 0:e}function su(e,t){e.shapeFlag&6&&e.component?su(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Vm(e,t=!1,r){let n=[],i=0;for(let a=0;a1)for(let a=0;a!!e.type.__asyncLoader,Wd=e=>e.type.__isKeepAlive;function MI(e,t){KC(e,"a",t)}function qC(e,t){KC(e,"da",t)}function KC(e,t,r=It){const n=e.__wdc||(e.__wdc=()=>{let i=r;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Vd(t,n,r),r){let i=r.parent;for(;i&&i.parent;)Wd(i.parent.vnode)&&AI(n,t,r,i),i=i.parent}}function AI(e,t,r,n){const i=Vd(t,e,n,!0);ks(()=>{Lm(n[t],i)},r)}function Vd(e,t,r=It,n=!1){if(r){const i=r[e]||(r[e]=[]),a=t.__weh||(t.__weh=(...o)=>{if(r.isUnmounted)return;Os(),ps(r);const s=rn(t,r,e,o);return ao(),Rs(),s});return n?i.unshift(a):i.push(a),a}}const Si=e=>(t,r=It)=>(!uu||e==="sp")&&Vd(e,(...n)=>t(...n),r),Gd=Si("bm"),wt=Si("m"),EI=Si("bu"),Hu=Si("u"),Xt=Si("bum"),ks=Si("um"),PI=Si("sp"),LI=Si("rtg"),DI=Si("rtc");function II(e,t=It){Vd("ec",e,t)}function nr(e,t){const r=qt;if(r===null)return e;const n=jd(r)||r.proxy,i=e.dirs||(e.dirs=[]);for(let a=0;at(o,s,void 0,a&&a[s]));else{const o=Object.keys(e);i=new Array(o.length);for(let s=0,l=o.length;sta(t)?!(t.type===xr||t.type===pt&&!QC(t.children)):!0)?e:null}function RI(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:yf(n)]=e[n];return r}const Ap=e=>e?uT(e)?jd(e)||e.proxy:Ap(e.parent):null,Pl=Gt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ap(e.parent),$root:e=>Ap(e.root),$emit:e=>e.emit,$options:e=>jm(e),$forceUpdate:e=>e.f||(e.f=()=>zm(e.update)),$nextTick:e=>e.n||(e.n=Ft.bind(e.proxy)),$watch:e=>CI.bind(e)}),Rh=(e,t)=>e!==yt&&!e.__isScriptSetup&&We(e,t),kI={get({_:e},t){const{ctx:r,setupState:n,data:i,props:a,accessCache:o,type:s,appContext:l}=e;let u;if(t[0]!=="$"){const h=o[t];if(h!==void 0)switch(h){case 1:return n[t];case 2:return i[t];case 4:return r[t];case 3:return a[t]}else{if(Rh(n,t))return o[t]=1,n[t];if(i!==yt&&We(i,t))return o[t]=2,i[t];if((u=e.propsOptions[0])&&We(u,t))return o[t]=3,a[t];if(r!==yt&&We(r,t))return o[t]=4,r[t];Ep&&(o[t]=0)}}const c=Pl[t];let f,d;if(c)return t==="$attrs"&&Mr(e,"get",t),c(e);if((f=s.__cssModules)&&(f=f[t]))return f;if(r!==yt&&We(r,t))return o[t]=4,r[t];if(d=l.config.globalProperties,We(d,t))return d[t]},set({_:e},t,r){const{data:n,setupState:i,ctx:a}=e;return Rh(i,t)?(i[t]=r,!0):n!==yt&&We(n,t)?(n[t]=r,!0):We(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:i,propsOptions:a}},o){let s;return!!r[o]||e!==yt&&We(e,o)||Rh(t,o)||(s=a[0])&&We(s,o)||We(n,o)||We(Pl,o)||We(i.config.globalProperties,o)},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:We(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}};let Ep=!0;function NI(e){const t=jm(e),r=e.proxy,n=e.ctx;Ep=!1,t.beforeCreate&&u_(t.beforeCreate,e,"bc");const{data:i,computed:a,methods:o,watch:s,provide:l,inject:u,created:c,beforeMount:f,mounted:d,beforeUpdate:h,updated:v,activated:p,deactivated:g,beforeDestroy:m,beforeUnmount:y,destroyed:_,unmounted:b,render:x,renderTracked:w,renderTriggered:S,errorCaptured:C,serverPrefetch:M,expose:P,inheritAttrs:A,components:T,directives:D,filters:N}=t;if(u&&FI(u,n,null,e.appContext.config.unwrapInjectedRef),o)for(const G in o){const F=o[G];De(F)&&(n[G]=F.bind(r))}if(i){const G=i.call(r,r);Xe(G)&&(e.data=fn(G))}if(Ep=!0,a)for(const G in a){const F=a[G],R=De(F)?F.bind(r,r):De(F.get)?F.get.bind(r,r):ur,j=!De(F)&&De(F.set)?F.set.bind(r):ur,re=k({get:R,set:j});Object.defineProperty(n,G,{enumerable:!0,configurable:!0,get:()=>re.value,set:oe=>re.value=oe})}if(s)for(const G in s)JC(s[G],n,r,G);if(l){const G=De(l)?l.call(r):l;Reflect.ownKeys(G).forEach(F=>{At(F,G[F])})}c&&u_(c,e,"c");function $(G,F){be(F)?F.forEach(R=>G(R.bind(r))):F&&G(F.bind(r))}if($(Gd,f),$(wt,d),$(EI,h),$(Hu,v),$(MI,p),$(qC,g),$(II,C),$(DI,w),$(LI,S),$(Xt,y),$(ks,b),$(PI,M),be(P))if(P.length){const G=e.exposed||(e.exposed={});P.forEach(F=>{Object.defineProperty(G,F,{get:()=>r[F],set:R=>r[F]=R})})}else e.exposed||(e.exposed={});x&&e.render===ur&&(e.render=x),A!=null&&(e.inheritAttrs=A),T&&(e.components=T),D&&(e.directives=D)}function FI(e,t,r=ur,n=!1){be(e)&&(e=Pp(e));for(const i in e){const a=e[i];let o;Xe(a)?"default"in a?o=Ee(a.from||i,a.default,!0):o=Ee(a.from||i):o=Ee(a),Ct(o)&&n?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:s=>o.value=s}):t[i]=o}}function u_(e,t,r){rn(be(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function JC(e,t,r,n){const i=n.includes(".")?GC(r,n):()=>r[n];if(He(e)){const a=t[e];De(a)&&Se(i,a)}else if(De(e))Se(i,e.bind(r));else if(Xe(e))if(be(e))e.forEach(a=>JC(a,t,r,n));else{const a=De(e.handler)?e.handler.bind(r):t[e.handler];De(a)&&Se(i,a,e)}}function jm(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t);let l;return s?l=s:!i.length&&!r&&!n?l=t:(l={},i.length&&i.forEach(u=>Zf(l,u,o,!0)),Zf(l,t,o)),Xe(t)&&a.set(t,l),l}function Zf(e,t,r,n=!1){const{mixins:i,extends:a}=t;a&&Zf(e,a,r,!0),i&&i.forEach(o=>Zf(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const s=BI[o]||r&&r[o];e[o]=s?s(e[o],t[o]):t[o]}return e}const BI={data:c_,props:za,emits:za,methods:za,computed:za,beforeCreate:ir,created:ir,beforeMount:ir,mounted:ir,beforeUpdate:ir,updated:ir,beforeDestroy:ir,beforeUnmount:ir,destroyed:ir,unmounted:ir,activated:ir,deactivated:ir,errorCaptured:ir,serverPrefetch:ir,components:za,directives:za,watch:HI,provide:c_,inject:$I};function c_(e,t){return t?e?function(){return Gt(De(e)?e.call(this,this):e,De(t)?t.call(this,this):t)}:t:e}function $I(e,t){return za(Pp(e),Pp(t))}function Pp(e){if(be(e)){const t={};for(let r=0;r0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let f=0;f{l=!0;const[d,h]=tT(f,t,!0);Gt(o,d),h&&s.push(...h)};!r&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!a&&!l)return Xe(e)&&n.set(e,ns),ns;if(be(a))for(let c=0;c-1,h[1]=p<0||v-1||We(h,"default"))&&s.push(f)}}}const u=[o,s];return Xe(e)&&n.set(e,u),u}function f_(e){return e[0]!=="$"}function d_(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function h_(e,t){return d_(e)===d_(t)}function v_(e,t){return be(t)?t.findIndex(r=>h_(r,e)):De(t)&&h_(t,e)?0:-1}const rT=e=>e[0]==="_"||e==="$stable",Ym=e=>be(e)?e.map(Bn):[Bn(e)],VI=(e,t,r)=>{if(t._n)return t;const n=Z((...i)=>Ym(t(...i)),r);return n._c=!1,n},nT=(e,t,r)=>{const n=e._ctx;for(const i in e){if(rT(i))continue;const a=e[i];if(De(a))t[i]=VI(i,a,n);else if(a!=null){const o=Ym(a);t[i]=()=>o}}},iT=(e,t)=>{const r=Ym(t);e.slots.default=()=>r},GI=(e,t)=>{if(e.vnode.shapeFlag&32){const r=t._;r?(e.slots=Ke(t),Yf(t,"_",r)):nT(t,e.slots={})}else e.slots={},t&&iT(e,t);Yf(e.slots,Ud,1)},UI=(e,t,r)=>{const{vnode:n,slots:i}=e;let a=!0,o=yt;if(n.shapeFlag&32){const s=t._;s?r&&s===1?a=!1:(Gt(i,t),!r&&s===1&&delete i._):(a=!t.$stable,nT(t,i)),o=t}else t&&(iT(e,t),o={default:1});if(a)for(const s in i)!rT(s)&&!(s in o)&&delete i[s]};function aT(){return{app:null,config:{isNativeTag:wD,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let jI=0;function YI(e,t){return function(n,i=null){De(n)||(n=Object.assign({},n)),i!=null&&!Xe(i)&&(i=null);const a=aT(),o=new Set;let s=!1;const l=a.app={_uid:jI++,_component:n,_props:i,_container:null,_context:a,_instance:null,version:pO,get config(){return a.config},set config(u){},use(u,...c){return o.has(u)||(u&&De(u.install)?(o.add(u),u.install(l,...c)):De(u)&&(o.add(u),u(l,...c))),l},mixin(u){return a.mixins.includes(u)||a.mixins.push(u),l},component(u,c){return c?(a.components[u]=c,l):a.components[u]},directive(u,c){return c?(a.directives[u]=c,l):a.directives[u]},mount(u,c,f){if(!s){const d=ee(n,i);return d.appContext=a,c&&t?t(d,u):e(d,u,f),s=!0,l._container=u,u.__vue_app__=l,jd(d.component)||d.component.proxy}},unmount(){s&&(e(null,l._container),delete l._container.__vue_app__)},provide(u,c){return a.provides[u]=c,l}};return l}}function Dp(e,t,r,n,i=!1){if(be(e)){e.forEach((d,h)=>Dp(d,t&&(be(t)?t[h]:t),r,n,i));return}if(El(n)&&!i)return;const a=n.shapeFlag&4?jd(n.component)||n.component.proxy:n.el,o=i?null:a,{i:s,r:l}=e,u=t&&t.r,c=s.refs===yt?s.refs={}:s.refs,f=s.setupState;if(u!=null&&u!==l&&(He(u)?(c[u]=null,We(f,u)&&(f[u]=null)):Ct(u)&&(u.value=null)),De(l))Zi(l,s,12,[o,c]);else{const d=He(l),h=Ct(l);if(d||h){const v=()=>{if(e.f){const p=d?We(f,l)?f[l]:c[l]:l.value;i?be(p)&&Lm(p,a):be(p)?p.includes(a)||p.push(a):d?(c[l]=[a],We(f,l)&&(f[l]=c[l])):(l.value=[a],e.k&&(c[e.k]=l.value))}else d?(c[l]=o,We(f,l)&&(f[l]=o)):h&&(l.value=o,e.k&&(c[e.k]=o))};o?(v.id=-1,yr(v,r)):v()}}}const yr=SI;function qI(e){return KI(e)}function KI(e,t){const r=PD();r.__VUE__=!0;const{insert:n,remove:i,patchProp:a,createElement:o,createText:s,createComment:l,setText:u,setElementText:c,parentNode:f,nextSibling:d,setScopeId:h=ur,insertStaticContent:v}=e,p=(L,I,z,U=null,K=null,ne=null,fe=!1,te=null,ie=!!I.dynamicChildren)=>{if(L===I)return;L&&!Ua(L,I)&&(U=W(L),oe(L,K,ne,!0),L=null),I.patchFlag===-2&&(ie=!1,I.dynamicChildren=null);const{type:X,ref:we,shapeFlag:he}=I;switch(X){case Ns:g(L,I,z,U);break;case xr:m(L,I,z,U);break;case kh:L==null&&y(I,z,U,fe);break;case pt:T(L,I,z,U,K,ne,fe,te,ie);break;default:he&1?x(L,I,z,U,K,ne,fe,te,ie):he&6?D(L,I,z,U,K,ne,fe,te,ie):(he&64||he&128)&&X.process(L,I,z,U,K,ne,fe,te,ie,le)}we!=null&&K&&Dp(we,L&&L.ref,ne,I||L,!I)},g=(L,I,z,U)=>{if(L==null)n(I.el=s(I.children),z,U);else{const K=I.el=L.el;I.children!==L.children&&u(K,I.children)}},m=(L,I,z,U)=>{L==null?n(I.el=l(I.children||""),z,U):I.el=L.el},y=(L,I,z,U)=>{[L.el,L.anchor]=v(L.children,I,z,U,L.el,L.anchor)},_=({el:L,anchor:I},z,U)=>{let K;for(;L&&L!==I;)K=d(L),n(L,z,U),L=K;n(I,z,U)},b=({el:L,anchor:I})=>{let z;for(;L&&L!==I;)z=d(L),i(L),L=z;i(I)},x=(L,I,z,U,K,ne,fe,te,ie)=>{fe=fe||I.type==="svg",L==null?w(I,z,U,K,ne,fe,te,ie):M(L,I,K,ne,fe,te,ie)},w=(L,I,z,U,K,ne,fe,te)=>{let ie,X;const{type:we,props:he,shapeFlag:xe,transition:Oe,dirs:ze}=L;if(ie=L.el=o(L.type,ne,he&&he.is,he),xe&8?c(ie,L.children):xe&16&&C(L.children,ie,null,U,K,ne&&we!=="foreignObject",fe,te),ze&&ha(L,null,U,"created"),S(ie,L,L.scopeId,fe,U),he){for(const Je in he)Je!=="value"&&!mf(Je)&&a(ie,Je,null,he[Je],ne,L.children,U,K,Q);"value"in he&&a(ie,"value",null,he.value),(X=he.onVnodeBeforeMount)&&On(X,U,L)}ze&&ha(L,null,U,"beforeMount");const rt=(!K||K&&!K.pendingBranch)&&Oe&&!Oe.persisted;rt&&Oe.beforeEnter(ie),n(ie,I,z),((X=he&&he.onVnodeMounted)||rt||ze)&&yr(()=>{X&&On(X,U,L),rt&&Oe.enter(ie),ze&&ha(L,null,U,"mounted")},K)},S=(L,I,z,U,K)=>{if(z&&h(L,z),U)for(let ne=0;ne{for(let X=ie;X{const te=I.el=L.el;let{patchFlag:ie,dynamicChildren:X,dirs:we}=I;ie|=L.patchFlag&16;const he=L.props||yt,xe=I.props||yt;let Oe;z&&va(z,!1),(Oe=xe.onVnodeBeforeUpdate)&&On(Oe,z,I,L),we&&ha(I,L,z,"beforeUpdate"),z&&va(z,!0);const ze=K&&I.type!=="foreignObject";if(X?P(L.dynamicChildren,X,te,z,U,ze,ne):fe||F(L,I,te,null,z,U,ze,ne,!1),ie>0){if(ie&16)A(te,I,he,xe,z,U,K);else if(ie&2&&he.class!==xe.class&&a(te,"class",null,xe.class,K),ie&4&&a(te,"style",he.style,xe.style,K),ie&8){const rt=I.dynamicProps;for(let Je=0;Je{Oe&&On(Oe,z,I,L),we&&ha(I,L,z,"updated")},U)},P=(L,I,z,U,K,ne,fe)=>{for(let te=0;te{if(z!==U){if(z!==yt)for(const te in z)!mf(te)&&!(te in U)&&a(L,te,z[te],null,fe,I.children,K,ne,Q);for(const te in U){if(mf(te))continue;const ie=U[te],X=z[te];ie!==X&&te!=="value"&&a(L,te,X,ie,fe,I.children,K,ne,Q)}"value"in U&&a(L,"value",z.value,U.value)}},T=(L,I,z,U,K,ne,fe,te,ie)=>{const X=I.el=L?L.el:s(""),we=I.anchor=L?L.anchor:s("");let{patchFlag:he,dynamicChildren:xe,slotScopeIds:Oe}=I;Oe&&(te=te?te.concat(Oe):Oe),L==null?(n(X,z,U),n(we,z,U),C(I.children,z,we,K,ne,fe,te,ie)):he>0&&he&64&&xe&&L.dynamicChildren?(P(L.dynamicChildren,xe,z,K,ne,fe,te),(I.key!=null||K&&I===K.subTree)&&qm(L,I,!0)):F(L,I,z,we,K,ne,fe,te,ie)},D=(L,I,z,U,K,ne,fe,te,ie)=>{I.slotScopeIds=te,L==null?I.shapeFlag&512?K.ctx.activate(I,z,U,fe,ie):N(I,z,U,K,ne,fe,ie):H(L,I,ie)},N=(L,I,z,U,K,ne,fe)=>{const te=L.component=oO(L,U,K);if(Wd(L)&&(te.ctx.renderer=le),sO(te),te.asyncDep){if(K&&K.registerDep(te,$),!L.el){const ie=te.subTree=ee(xr);m(null,ie,I,z)}return}$(te,L,I,z,K,ne,fe)},H=(L,I,z)=>{const U=I.component=L.component;if(bI(L,I,z))if(U.asyncDep&&!U.asyncResolved){G(U,I,z);return}else U.next=I,vI(U.update),U.update();else I.el=L.el,U.vnode=I},$=(L,I,z,U,K,ne,fe)=>{const te=()=>{if(L.isMounted){let{next:we,bu:he,u:xe,parent:Oe,vnode:ze}=L,rt=we,Je;va(L,!1),we?(we.el=ze.el,G(L,we,fe)):we=ze,he&&_f(he),(Je=we.props&&we.props.onVnodeBeforeUpdate)&&On(Je,Oe,we,ze),va(L,!0);const Lt=Ih(L),ve=L.subTree;L.subTree=Lt,p(ve,Lt,f(ve.el),W(ve),L,K,ne),we.el=Lt.el,rt===null&&wI(L,Lt.el),xe&&yr(xe,K),(Je=we.props&&we.props.onVnodeUpdated)&&yr(()=>On(Je,Oe,we,ze),K)}else{let we;const{el:he,props:xe}=I,{bm:Oe,m:ze,parent:rt}=L,Je=El(I);if(va(L,!1),Oe&&_f(Oe),!Je&&(we=xe&&xe.onVnodeBeforeMount)&&On(we,rt,I),va(L,!0),he&&J){const Lt=()=>{L.subTree=Ih(L),J(he,L.subTree,L,K,null)};Je?I.type.__asyncLoader().then(()=>!L.isUnmounted&&Lt()):Lt()}else{const Lt=L.subTree=Ih(L);p(null,Lt,z,U,L,K,ne),I.el=Lt.el}if(ze&&yr(ze,K),!Je&&(we=xe&&xe.onVnodeMounted)){const Lt=I;yr(()=>On(we,rt,Lt),K)}(I.shapeFlag&256||rt&&El(rt.vnode)&&rt.vnode.shapeFlag&256)&&L.a&&yr(L.a,K),L.isMounted=!0,I=z=U=null}},ie=L.effect=new Om(te,()=>zm(X),L.scope),X=L.update=()=>ie.run();X.id=L.uid,va(L,!0),X()},G=(L,I,z)=>{I.component=L;const U=L.vnode.props;L.vnode=I,L.next=null,WI(L,I.props,U,z),UI(L,I.children,z),Os(),i_(),Rs()},F=(L,I,z,U,K,ne,fe,te,ie=!1)=>{const X=L&&L.children,we=L?L.shapeFlag:0,he=I.children,{patchFlag:xe,shapeFlag:Oe}=I;if(xe>0){if(xe&128){j(X,he,z,U,K,ne,fe,te,ie);return}else if(xe&256){R(X,he,z,U,K,ne,fe,te,ie);return}}Oe&8?(we&16&&Q(X,K,ne),he!==X&&c(z,he)):we&16?Oe&16?j(X,he,z,U,K,ne,fe,te,ie):Q(X,K,ne,!0):(we&8&&c(z,""),Oe&16&&C(he,z,U,K,ne,fe,te,ie))},R=(L,I,z,U,K,ne,fe,te,ie)=>{L=L||ns,I=I||ns;const X=L.length,we=I.length,he=Math.min(X,we);let xe;for(xe=0;xewe?Q(L,K,ne,!0,!1,he):C(I,z,U,K,ne,fe,te,ie,he)},j=(L,I,z,U,K,ne,fe,te,ie)=>{let X=0;const we=I.length;let he=L.length-1,xe=we-1;for(;X<=he&&X<=xe;){const Oe=L[X],ze=I[X]=ie?Vi(I[X]):Bn(I[X]);if(Ua(Oe,ze))p(Oe,ze,z,null,K,ne,fe,te,ie);else break;X++}for(;X<=he&&X<=xe;){const Oe=L[he],ze=I[xe]=ie?Vi(I[xe]):Bn(I[xe]);if(Ua(Oe,ze))p(Oe,ze,z,null,K,ne,fe,te,ie);else break;he--,xe--}if(X>he){if(X<=xe){const Oe=xe+1,ze=Oexe)for(;X<=he;)oe(L[X],K,ne,!0),X++;else{const Oe=X,ze=X,rt=new Map;for(X=ze;X<=xe;X++){const it=I[X]=ie?Vi(I[X]):Bn(I[X]);it.key!=null&&rt.set(it.key,X)}let Je,Lt=0;const ve=xe-ze+1;let Pe=!1,je=0;const Be=new Array(ve);for(X=0;X=ve){oe(it,K,ne,!0);continue}let Mt;if(it.key!=null)Mt=rt.get(it.key);else for(Je=ze;Je<=xe;Je++)if(Be[Je-ze]===0&&Ua(it,I[Je])){Mt=Je;break}Mt===void 0?oe(it,K,ne,!0):(Be[Mt-ze]=X+1,Mt>=je?je=Mt:Pe=!0,p(it,I[Mt],z,null,K,ne,fe,te,ie),Lt++)}const nt=Pe?XI(Be):ns;for(Je=nt.length-1,X=ve-1;X>=0;X--){const it=ze+X,Mt=I[it],ri=it+1{const{el:ne,type:fe,transition:te,children:ie,shapeFlag:X}=L;if(X&6){re(L.component.subTree,I,z,U);return}if(X&128){L.suspense.move(I,z,U);return}if(X&64){fe.move(L,I,z,le);return}if(fe===pt){n(ne,I,z);for(let he=0;hete.enter(ne),K);else{const{leave:he,delayLeave:xe,afterLeave:Oe}=te,ze=()=>n(ne,I,z),rt=()=>{he(ne,()=>{ze(),Oe&&Oe()})};xe?xe(ne,ze,rt):rt()}else n(ne,I,z)},oe=(L,I,z,U=!1,K=!1)=>{const{type:ne,props:fe,ref:te,children:ie,dynamicChildren:X,shapeFlag:we,patchFlag:he,dirs:xe}=L;if(te!=null&&Dp(te,null,z,L,!0),we&256){I.ctx.deactivate(L);return}const Oe=we&1&&xe,ze=!El(L);let rt;if(ze&&(rt=fe&&fe.onVnodeBeforeUnmount)&&On(rt,I,L),we&6)V(L.component,z,U);else{if(we&128){L.suspense.unmount(z,U);return}Oe&&ha(L,null,I,"beforeUnmount"),we&64?L.type.remove(L,I,z,K,le,U):X&&(ne!==pt||he>0&&he&64)?Q(X,I,z,!1,!0):(ne===pt&&he&384||!K&&we&16)&&Q(ie,I,z),U&&ye(L)}(ze&&(rt=fe&&fe.onVnodeUnmounted)||Oe)&&yr(()=>{rt&&On(rt,I,L),Oe&&ha(L,null,I,"unmounted")},z)},ye=L=>{const{type:I,el:z,anchor:U,transition:K}=L;if(I===pt){Ae(z,U);return}if(I===kh){b(L);return}const ne=()=>{i(z),K&&!K.persisted&&K.afterLeave&&K.afterLeave()};if(L.shapeFlag&1&&K&&!K.persisted){const{leave:fe,delayLeave:te}=K,ie=()=>fe(z,ne);te?te(L.el,ne,ie):ie()}else ne()},Ae=(L,I)=>{let z;for(;L!==I;)z=d(L),i(L),L=z;i(I)},V=(L,I,z)=>{const{bum:U,scope:K,update:ne,subTree:fe,um:te}=L;U&&_f(U),K.stop(),ne&&(ne.active=!1,oe(fe,L,I,z)),te&&yr(te,I),yr(()=>{L.isUnmounted=!0},I),I&&I.pendingBranch&&!I.isUnmounted&&L.asyncDep&&!L.asyncResolved&&L.suspenseId===I.pendingId&&(I.deps--,I.deps===0&&I.resolve())},Q=(L,I,z,U=!1,K=!1,ne=0)=>{for(let fe=ne;feL.shapeFlag&6?W(L.component.subTree):L.shapeFlag&128?L.suspense.next():d(L.anchor||L.el),q=(L,I,z)=>{L==null?I._vnode&&oe(I._vnode,null,null,!0):p(I._vnode||null,L,I,null,null,null,z),i_(),HC(),I._vnode=L},le={p,um:oe,m:re,r:ye,mt:N,mc:C,pc:F,pbc:P,n:W,o:e};let de,J;return t&&([de,J]=t(le)),{render:q,hydrate:de,createApp:YI(q,de)}}function va({effect:e,update:t},r){e.allowRecurse=t.allowRecurse=r}function qm(e,t,r=!1){const n=e.children,i=t.children;if(be(n)&&be(i))for(let a=0;a>1,e[r[s]]0&&(t[n]=r[a-1]),r[a]=n)}}for(a=r.length,o=r[a-1];a-- >0;)r[a]=o,o=t[o];return r}const ZI=e=>e.__isTeleport,Ll=e=>e&&(e.disabled||e.disabled===""),p_=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Ip=(e,t)=>{const r=e&&e.to;return He(r)?t?t(r):null:r},QI={__isTeleport:!0,process(e,t,r,n,i,a,o,s,l,u){const{mc:c,pc:f,pbc:d,o:{insert:h,querySelector:v,createText:p,createComment:g}}=u,m=Ll(t.props);let{shapeFlag:y,children:_,dynamicChildren:b}=t;if(e==null){const x=t.el=p(""),w=t.anchor=p("");h(x,r,n),h(w,r,n);const S=t.target=Ip(t.props,v),C=t.targetAnchor=p("");S&&(h(C,S),o=o||p_(S));const M=(P,A)=>{y&16&&c(_,P,A,i,a,o,s,l)};m?M(r,w):S&&M(S,C)}else{t.el=e.el;const x=t.anchor=e.anchor,w=t.target=e.target,S=t.targetAnchor=e.targetAnchor,C=Ll(e.props),M=C?r:w,P=C?x:S;if(o=o||p_(w),b?(d(e.dynamicChildren,b,M,i,a,o,s),qm(e,t,!0)):l||f(e,t,M,P,i,a,o,s,!1),m)C||pc(t,r,x,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const A=t.target=Ip(t.props,v);A&&pc(t,A,null,u,0)}else C&&pc(t,w,S,u,1)}oT(t)},remove(e,t,r,n,{um:i,o:{remove:a}},o){const{shapeFlag:s,children:l,anchor:u,targetAnchor:c,target:f,props:d}=e;if(f&&a(c),(o||!Ll(d))&&(a(u),s&16))for(let h=0;h0?wn||ns:null,tO(),lu>0&&wn&&wn.push(e),e}function me(e,t,r,n,i,a){return sT(ae(e,t,r,n,i,a,!0))}function _e(e,t,r,n,i){return sT(ee(e,t,r,n,i,!0))}function ta(e){return e?e.__v_isVNode===!0:!1}function Ua(e,t){return e.type===t.type&&e.key===t.key}const Ud="__vInternal",lT=({key:e})=>e??null,bf=({ref:e,ref_key:t,ref_for:r})=>e!=null?He(e)||Ct(e)||De(e)?{i:qt,r:e,k:t,f:!!r}:e:null;function ae(e,t=null,r=null,n=0,i=null,a=e===pt?0:1,o=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&lT(t),ref:t&&bf(t),scopeId:VC,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:qt};return s?(Km(l,r),a&128&&e.normalize(l)):r&&(l.shapeFlag|=He(r)?8:16),lu>0&&!o&&wn&&(l.patchFlag>0||a&6)&&l.patchFlag!==32&&wn.push(l),l}const ee=rO;function rO(e,t=null,r=null,n=0,i=null,a=!1){if((!e||e===XC)&&(e=xr),ta(e)){const s=mi(e,t,!0);return r&&Km(s,r),lu>0&&!a&&wn&&(s.shapeFlag&6?wn[wn.indexOf(e)]=s:wn.push(s)),s.patchFlag|=-2,s}if(fO(e)&&(e=e.__vccOpts),t){t=nO(t);let{class:s,style:l}=t;s&&!He(s)&&(t.class=ue(s)),Xe(l)&&(DC(l)&&!be(l)&&(l=Gt({},l)),t.style=St(l))}const o=He(e)?1:xI(e)?128:ZI(e)?64:Xe(e)?4:De(e)?2:0;return ae(e,t,r,n,i,o,a,!0)}function nO(e){return e?DC(e)||Ud in e?Gt({},e):e:null}function mi(e,t,r=!1){const{props:n,ref:i,patchFlag:a,children:o}=e,s=t?ca(n||{},t):n;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:s,key:s&&lT(s),ref:t&&t.ref?r&&i?be(i)?i.concat(bf(t)):[i,bf(t)]:bf(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==pt?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&mi(e.ssContent),ssFallback:e.ssFallback&&mi(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Bt(e=" ",t=0){return ee(Ns,null,e,t)}function ke(e="",t=!1){return t?(Y(),_e(xr,null,e)):ee(xr,null,e)}function Bn(e){return e==null||typeof e=="boolean"?ee(xr):be(e)?ee(pt,null,e.slice()):typeof e=="object"?Vi(e):ee(Ns,null,String(e))}function Vi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:mi(e)}function Km(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(be(t))r=16;else if(typeof t=="object")if(n&65){const i=t.default;i&&(i._c&&(i._d=!1),Km(e,i()),i._c&&(i._d=!0));return}else{r=32;const i=t._;!i&&!(Ud in t)?t._ctx=qt:i===3&&qt&&(qt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else De(t)?(t={default:t,_ctx:qt},r=32):(t=String(t),n&64?(r=16,t=[Bt(t)]):r=8);e.children=t,e.shapeFlag|=r}function ca(...e){const t={};for(let r=0;rIt||qt,ps=e=>{It=e,e.scope.on()},ao=()=>{It&&It.scope.off(),It=null};function uT(e){return e.vnode.shapeFlag&4}let uu=!1;function sO(e,t=!1){uu=t;const{props:r,children:n}=e.vnode,i=uT(e);zI(e,r,i,t),GI(e,n);const a=i?lO(e,t):void 0;return uu=!1,a}function lO(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=IC(new Proxy(e.ctx,kI));const{setup:n}=r;if(n){const i=e.setupContext=n.length>1?fT(e):null;ps(e),Os();const a=Zi(n,e,0,[e.props,i]);if(Rs(),ao(),jf(a)){if(a.then(ao,ao),t)return a.then(o=>{m_(e,o,t)}).catch(o=>{Hd(o,e,0)});e.asyncDep=a}else m_(e,a,t)}else cT(e,t)}function m_(e,t,r){De(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Xe(t)&&(e.setupState=NC(t)),cT(e,r)}let y_;function cT(e,t,r){const n=e.type;if(!e.render){if(!t&&y_&&!n.render){const i=n.template||jm(e).template;if(i){const{isCustomElement:a,compilerOptions:o}=e.appContext.config,{delimiters:s,compilerOptions:l}=n,u=Gt(Gt({isCustomElement:a,delimiters:s},o),l);n.render=y_(i,u)}}e.render=n.render||ur}ps(e),Os(),NI(e),Rs(),ao()}function uO(e){return new Proxy(e.attrs,{get(t,r){return Mr(e,"get","$attrs"),t[r]}})}function fT(e){const t=n=>{e.exposed=n||{}};let r;return{get attrs(){return r||(r=uO(e))},slots:e.slots,emit:e.emit,expose:t}}function jd(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(NC(IC(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in Pl)return Pl[r](e)},has(t,r){return r in t||r in Pl}}))}function cO(e,t=!0){return De(e)?e.displayName||e.name:e.name||t&&e.__name}function fO(e){return De(e)&&"__vccOpts"in e}const k=(e,t)=>cI(e,t,uu);function Yd(){return dO().slots}function dO(){const e=ct();return e.setupContext||(e.setupContext=fT(e))}function Ce(e,t,r){const n=arguments.length;return n===2?Xe(t)&&!be(t)?ta(t)?ee(e,null,[t]):ee(e,t):ee(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&ta(r)&&(r=[r]),ee(e,t,r))}const hO=Symbol(""),vO=()=>Ee(hO),pO="3.2.47",gO="http://www.w3.org/2000/svg",ja=typeof document<"u"?document:null,__=ja&&ja.createElement("template"),mO={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const i=t?ja.createElementNS(gO,e):ja.createElement(e,r?{is:r}:void 0);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>ja.createTextNode(e),createComment:e=>ja.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ja.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,i,a){const o=r?r.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),r),!(i===a||!(i=i.nextSibling)););else{__.innerHTML=n?`${e}`:e;const s=__.content;if(n){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}t.insertBefore(s,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}};function yO(e,t,r){const n=e._vtc;n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}function _O(e,t,r){const n=e.style,i=He(r);if(r&&!i){if(t&&!He(t))for(const a in t)r[a]==null&&Op(n,a,"");for(const a in r)Op(n,a,r[a])}else{const a=n.display;i?t!==r&&(n.cssText=r):t&&e.removeAttribute("style"),"_vod"in e&&(n.display=a)}}const b_=/\s*!important$/;function Op(e,t,r){if(be(r))r.forEach(n=>Op(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=bO(e,t);b_.test(r)?e.setProperty(xo(n),r.replace(b_,""),"important"):e[n]=r}}const w_=["Webkit","Moz","ms"],Nh={};function bO(e,t){const r=Nh[t];if(r)return r;let n=An(t);if(n!=="filter"&&n in e)return Nh[t]=n;n=Fd(n);for(let i=0;iFh||(MO.then(()=>Fh=0),Fh=Date.now());function EO(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;rn(PO(n,r.value),t,5,[n])};return r.value=e,r.attached=AO(),r}function PO(e,t){if(be(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(n=>i=>!i._stopped&&n&&n(i))}else return t}const C_=/^on[a-z]/,LO=(e,t,r,n,i=!1,a,o,s,l)=>{t==="class"?yO(e,n,i):t==="style"?_O(e,r,n):Rd(t)?Pm(t)||CO(e,t,r,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):DO(e,t,n,i))?xO(e,t,n,a,o,s,l):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),wO(e,t,n,i))};function DO(e,t,r,n){return n?!!(t==="innerHTML"||t==="textContent"||t in e&&C_.test(t)&&De(r)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||C_.test(t)&&He(r)?!1:t in e}const Li="transition",Ys="animation",Ci=(e,{slots:t})=>Ce(jC,vT(e),t);Ci.displayName="Transition";const hT={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},IO=Ci.props=Gt({},jC.props,hT),pa=(e,t=[])=>{be(e)?e.forEach(r=>r(...t)):e&&e(...t)},T_=e=>e?be(e)?e.some(t=>t.length>1):e.length>1:!1;function vT(e){const t={};for(const T in e)T in hT||(t[T]=e[T]);if(e.css===!1)return t;const{name:r="v",type:n,duration:i,enterFromClass:a=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:s=`${r}-enter-to`,appearFromClass:l=a,appearActiveClass:u=o,appearToClass:c=s,leaveFromClass:f=`${r}-leave-from`,leaveActiveClass:d=`${r}-leave-active`,leaveToClass:h=`${r}-leave-to`}=e,v=OO(i),p=v&&v[0],g=v&&v[1],{onBeforeEnter:m,onEnter:y,onEnterCancelled:_,onLeave:b,onLeaveCancelled:x,onBeforeAppear:w=m,onAppear:S=y,onAppearCancelled:C=_}=t,M=(T,D,N)=>{Bi(T,D?c:s),Bi(T,D?u:o),N&&N()},P=(T,D)=>{T._isLeaving=!1,Bi(T,f),Bi(T,h),Bi(T,d),D&&D()},A=T=>(D,N)=>{const H=T?S:y,$=()=>M(D,T,N);pa(H,[D,$]),M_(()=>{Bi(D,T?l:a),li(D,T?c:s),T_(H)||A_(D,n,p,$)})};return Gt(t,{onBeforeEnter(T){pa(m,[T]),li(T,a),li(T,o)},onBeforeAppear(T){pa(w,[T]),li(T,l),li(T,u)},onEnter:A(!1),onAppear:A(!0),onLeave(T,D){T._isLeaving=!0;const N=()=>P(T,D);li(T,f),gT(),li(T,d),M_(()=>{T._isLeaving&&(Bi(T,f),li(T,h),T_(b)||A_(T,n,g,N))}),pa(b,[T,N])},onEnterCancelled(T){M(T,!1),pa(_,[T])},onAppearCancelled(T){M(T,!0),pa(C,[T])},onLeaveCancelled(T){P(T),pa(x,[T])}})}function OO(e){if(e==null)return null;if(Xe(e))return[Bh(e.enter),Bh(e.leave)];{const t=Bh(e);return[t,t]}}function Bh(e){return ED(e)}function li(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e._vtc||(e._vtc=new Set)).add(t)}function Bi(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const{_vtc:r}=e;r&&(r.delete(t),r.size||(e._vtc=void 0))}function M_(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let RO=0;function A_(e,t,r,n){const i=e._endId=++RO,a=()=>{i===e._endId&&n()};if(r)return setTimeout(a,r);const{type:o,timeout:s,propCount:l}=pT(e,t);if(!o)return n();const u=o+"end";let c=0;const f=()=>{e.removeEventListener(u,d),a()},d=h=>{h.target===e&&++c>=l&&f()};setTimeout(()=>{c(r[v]||"").split(", "),i=n(`${Li}Delay`),a=n(`${Li}Duration`),o=E_(i,a),s=n(`${Ys}Delay`),l=n(`${Ys}Duration`),u=E_(s,l);let c=null,f=0,d=0;t===Li?o>0&&(c=Li,f=o,d=a.length):t===Ys?u>0&&(c=Ys,f=u,d=l.length):(f=Math.max(o,u),c=f>0?o>u?Li:Ys:null,d=c?c===Li?a.length:l.length:0);const h=c===Li&&/\b(transform|all)(,|$)/.test(n(`${Li}Property`).toString());return{type:c,timeout:f,propCount:d,hasTransform:h}}function E_(e,t){for(;e.lengthP_(r)+P_(e[n])))}function P_(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function gT(){return document.body.offsetHeight}const mT=new WeakMap,yT=new WeakMap,_T={name:"TransitionGroup",props:Gt({},IO,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=ct(),n=UC();let i,a;return Hu(()=>{if(!i.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!HO(i[0].el,r.vnode.el,o))return;i.forEach(FO),i.forEach(BO);const s=i.filter($O);gT(),s.forEach(l=>{const u=l.el,c=u.style;li(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const f=u._moveCb=d=>{d&&d.target!==u||(!d||/transform$/.test(d.propertyName))&&(u.removeEventListener("transitionend",f),u._moveCb=null,Bi(u,o))};u.addEventListener("transitionend",f)})}),()=>{const o=Ke(e),s=vT(o);let l=o.tag||pt;i=a,a=t.default?Vm(t.default()):[];for(let u=0;udelete e.mode;_T.props;const NO=_T;function FO(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function BO(e){yT.set(e,e.el.getBoundingClientRect())}function $O(e){const t=mT.get(e),r=yT.get(e),n=t.left-r.left,i=t.top-r.top;if(n||i){const a=e.el.style;return a.transform=a.webkitTransform=`translate(${n}px,${i}px)`,a.transitionDuration="0s",e}}function HO(e,t,r){const n=e.cloneNode();e._vtc&&e._vtc.forEach(o=>{o.split(/\s+/).forEach(s=>s&&n.classList.remove(s))}),r.split(/\s+/).forEach(o=>o&&n.classList.add(o)),n.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(n);const{hasTransform:a}=pT(n);return i.removeChild(n),a}const L_=e=>{const t=e.props["onUpdate:modelValue"]||!1;return be(t)?r=>_f(t,r):t},Qf={deep:!0,created(e,t,r){e._assign=L_(r),dT(e,"change",()=>{const n=e._modelValue,i=zO(e),a=e.checked,o=e._assign;if(be(n)){const s=pC(n,i),l=s!==-1;if(a&&!l)o(n.concat(i));else if(!a&&l){const u=[...n];u.splice(s,1),o(u)}}else if(kd(n)){const s=new Set(n);a?s.add(i):s.delete(i),o(s)}else o(bT(e,a))})},mounted:D_,beforeUpdate(e,t,r){e._assign=L_(r),D_(e,t,r)}};function D_(e,{value:t,oldValue:r},n){e._modelValue=t,be(t)?e.checked=pC(t,n.props.value)>-1:kd(t)?e.checked=t.has(n.props.value):t!==r&&(e.checked=Od(t,bT(e,!0)))}function zO(e){return"_value"in e?e._value:e.value}function bT(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}const WO=["ctrl","shift","alt","meta"],VO={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>WO.some(r=>e[`${r}Key`]&&!t.includes(r))},Jf=(e,t)=>(r,...n)=>{for(let i=0;ir=>{if(!("key"in r))return;const n=xo(r.key);if(t.some(i=>i===n||GO[i]===n))return e(r)},yi={beforeMount(e,{value:t},{transition:r}){e._vod=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):qs(e,t)},mounted(e,{value:t},{transition:r}){r&&t&&r.enter(e)},updated(e,{value:t,oldValue:r},{transition:n}){!t!=!r&&(n?t?(n.beforeEnter(e),qs(e,!0),n.enter(e)):n.leave(e,()=>{qs(e,!1)}):qs(e,t))},beforeUnmount(e,{value:t}){qs(e,t)}};function qs(e,t){e.style.display=t?e._vod:"none"}const jO=Gt({patchProp:LO},mO);let I_;function wT(){return I_||(I_=qI(jO))}const O_=(...e)=>{wT().render(...e)},YO=(...e)=>{const t=wT().createApp(...e),{mount:r}=t;return t.mount=n=>{const i=qO(n);if(!i)return;const a=t._component;!De(a)&&!a.render&&!a.template&&(a.template=i.innerHTML),i.innerHTML="";const o=r(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},t};function qO(e){return He(e)?document.querySelector(e):e}const wf=function(e,t,...r){let n;t.includes("mouse")||t.includes("click")?n="MouseEvents":t.includes("key")?n="KeyboardEvent":n="HTMLEvents";const i=document.createEvent(n);return i.initEvent(t,...r),e.dispatchEvent(i),e},fi=(e,t,{checkForDefaultPrevented:r=!0}={})=>i=>{const a=e==null?void 0:e(i);if(r===!1||!a)return t==null?void 0:t(i)};var R_;const Nt=typeof window<"u",Br=e=>typeof e=="boolean",KO=e=>typeof e=="function",$t=e=>typeof e=="number",XO=e=>typeof e=="string",Rp=()=>{};Nt&&((R_=window==null?void 0:window.navigator)!=null&&R_.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ho(e){return typeof e=="function"?e():E(e)}function xT(e,t){function r(...n){return new Promise((i,a)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(i).catch(a)})}return r}const ST=e=>e();function ZO(e,t={}){let r,n,i=Rp;const a=s=>{clearTimeout(s),i(),i=Rp};return s=>{const l=ho(e),u=ho(t.maxWait);return r&&a(r),l<=0||u!==void 0&&u<=0?(n&&(a(n),n=null),Promise.resolve(s())):new Promise((c,f)=>{i=t.rejectOnCancel?f:c,u&&!n&&(n=setTimeout(()=>{r&&a(r),n=null,c(s())},u)),r=setTimeout(()=>{n&&a(n),n=null,c(s())},l)})}}function QO(e=ST){const t=B(!0);function r(){t.value=!1}function n(){t.value=!0}const i=(...a)=>{t.value&&e(...a)};return{isActive:$u(t),pause:r,resume:n,eventFilter:i}}function JO(e){return e}function zu(e){return _C()?(ID(e),!0):!1}function eR(e,t=200,r={}){return xT(ZO(t,r),e)}function tR(e,t=200,r={}){const n=B(e.value),i=eR(()=>{n.value=e.value},t,r);return Se(e,()=>i()),n}function rR(e){return typeof e=="function"?k(e):B(e)}function CT(e,t=!0){ct()?wt(e):t?e():Ft(e)}function kp(e,t,r={}){const{immediate:n=!0}=r,i=B(!1);let a=null;function o(){a&&(clearTimeout(a),a=null)}function s(){i.value=!1,o()}function l(...u){o(),i.value=!0,a=setTimeout(()=>{i.value=!1,a=null,e(...u)},ho(t))}return n&&(i.value=!0,Nt&&l()),zu(s),{isPending:$u(i),start:l,stop:s}}function nR(e=!1,t={}){const{truthyValue:r=!0,falsyValue:n=!1}=t,i=Ct(e),a=B(e);function o(s){if(arguments.length)return a.value=s,a.value;{const l=ho(r);return a.value=a.value===l?ho(n):l,a.value}}return i?o:[a,o]}var k_=Object.getOwnPropertySymbols,iR=Object.prototype.hasOwnProperty,aR=Object.prototype.propertyIsEnumerable,oR=(e,t)=>{var r={};for(var n in e)iR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&k_)for(var n of k_(e))t.indexOf(n)<0&&aR.call(e,n)&&(r[n]=e[n]);return r};function sR(e,t,r={}){const n=r,{eventFilter:i=ST}=n,a=oR(n,["eventFilter"]);return Se(e,xT(i,t),a)}var lR=Object.defineProperty,uR=Object.defineProperties,cR=Object.getOwnPropertyDescriptors,ed=Object.getOwnPropertySymbols,TT=Object.prototype.hasOwnProperty,MT=Object.prototype.propertyIsEnumerable,N_=(e,t,r)=>t in e?lR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fR=(e,t)=>{for(var r in t||(t={}))TT.call(t,r)&&N_(e,r,t[r]);if(ed)for(var r of ed(t))MT.call(t,r)&&N_(e,r,t[r]);return e},dR=(e,t)=>uR(e,cR(t)),hR=(e,t)=>{var r={};for(var n in e)TT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ed)for(var n of ed(e))t.indexOf(n)<0&&MT.call(e,n)&&(r[n]=e[n]);return r};function vR(e,t,r={}){const n=r,{eventFilter:i}=n,a=hR(n,["eventFilter"]),{eventFilter:o,pause:s,resume:l,isActive:u}=QO(i);return{stop:sR(e,t,dR(fR({},a),{eventFilter:o})),pause:s,resume:l,isActive:u}}function Ui(e){var t;const r=ho(e);return(t=r==null?void 0:r.$el)!=null?t:r}const ra=Nt?window:void 0;function xn(...e){let t,r,n,i;if(XO(e[0])||Array.isArray(e[0])?([r,n,i]=e,t=ra):[t,r,n,i]=e,!t)return Rp;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const a=[],o=()=>{a.forEach(c=>c()),a.length=0},s=(c,f,d)=>(c.addEventListener(f,d,i),()=>c.removeEventListener(f,d,i)),l=Se(()=>Ui(t),c=>{o(),c&&a.push(...r.flatMap(f=>n.map(d=>s(c,f,d))))},{immediate:!0,flush:"post"}),u=()=>{l(),o()};return zu(u),u}function pR(e,t,r={}){const{window:n=ra,ignore:i=[],capture:a=!0,detectIframe:o=!1}=r;if(!n)return;let s=!0,l;const u=h=>i.some(v=>{if(typeof v=="string")return Array.from(n.document.querySelectorAll(v)).some(p=>p===h.target||h.composedPath().includes(p));{const p=Ui(v);return p&&(h.target===p||h.composedPath().includes(p))}}),c=h=>{n.clearTimeout(l);const v=Ui(e);if(!(!v||v===h.target||h.composedPath().includes(v))){if(h.detail===0&&(s=!u(h)),!s){s=!0;return}t(h)}},f=[xn(n,"click",c,{passive:!0,capture:a}),xn(n,"pointerdown",h=>{const v=Ui(e);v&&(s=!h.composedPath().includes(v)&&!u(h))},{passive:!0}),xn(n,"pointerup",h=>{if(h.button===0){const v=h.composedPath();h.composedPath=()=>v,l=n.setTimeout(()=>c(h),50)}},{passive:!0}),o&&xn(n,"blur",h=>{var v;const p=Ui(e);((v=n.document.activeElement)==null?void 0:v.tagName)==="IFRAME"&&!(p!=null&&p.contains(n.document.activeElement))&&t(h)})].filter(Boolean);return()=>f.forEach(h=>h())}function AT(e,t=!1){const r=B(),n=()=>r.value=Boolean(e());return n(),CT(n,t),r}function gR(e,t={}){const{window:r=ra}=t,n=AT(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function");let i;const a=B(!1),o=()=>{i&&("removeEventListener"in i?i.removeEventListener("change",s):i.removeListener(s))},s=()=>{n.value&&(o(),i=r.matchMedia(rR(e).value),a.value=i.matches,"addEventListener"in i?i.addEventListener("change",s):i.addListener(s))};return io(s),zu(()=>o()),a}const Np=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Fp="__vueuse_ssr_handlers__";Np[Fp]=Np[Fp]||{};const mR=Np[Fp];function ET(e,t){return mR[e]||t}function yR(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}var _R=Object.defineProperty,F_=Object.getOwnPropertySymbols,bR=Object.prototype.hasOwnProperty,wR=Object.prototype.propertyIsEnumerable,B_=(e,t,r)=>t in e?_R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$_=(e,t)=>{for(var r in t||(t={}))bR.call(t,r)&&B_(e,r,t[r]);if(F_)for(var r of F_(t))wR.call(t,r)&&B_(e,r,t[r]);return e};const xR={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}};function SR(e,t,r,n={}){var i;const{flush:a="pre",deep:o=!0,listenToStorageChanges:s=!0,writeDefaults:l=!0,mergeDefaults:u=!1,shallow:c,window:f=ra,eventFilter:d,onError:h=S=>{console.error(S)}}=n,v=(c?$m:B)(t);if(!r)try{r=ET("getDefaultStorage",()=>{var S;return(S=ra)==null?void 0:S.localStorage})()}catch(S){h(S)}if(!r)return v;const p=ho(t),g=yR(p),m=(i=n.serializer)!=null?i:xR[g],{pause:y,resume:_}=vR(v,()=>b(v.value),{flush:a,deep:o,eventFilter:d});return f&&s&&xn(f,"storage",w),w(),v;function b(S){try{if(S==null)r.removeItem(e);else{const C=m.write(S),M=r.getItem(e);M!==C&&(r.setItem(e,C),f&&(f==null||f.dispatchEvent(new StorageEvent("storage",{key:e,oldValue:M,newValue:C,storageArea:r}))))}}catch(C){h(C)}}function x(S){const C=S?S.newValue:r.getItem(e);if(C==null)return l&&p!==null&&r.setItem(e,m.write(p)),p;if(!S&&u){const M=m.read(C);return KO(u)?u(M,p):g==="object"&&!Array.isArray(M)?$_($_({},p),M):M}else return typeof C!="string"?C:m.read(C)}function w(S){if(!(S&&S.storageArea!==r)){if(S&&S.key==null){v.value=p;return}if(!(S&&S.key!==e)){y();try{v.value=x(S)}catch(C){h(C)}finally{S?Ft(_):_()}}}}}function PT(e){return gR("(prefers-color-scheme: dark)",e)}var CR=Object.defineProperty,H_=Object.getOwnPropertySymbols,TR=Object.prototype.hasOwnProperty,MR=Object.prototype.propertyIsEnumerable,z_=(e,t,r)=>t in e?CR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,AR=(e,t)=>{for(var r in t||(t={}))TR.call(t,r)&&z_(e,r,t[r]);if(H_)for(var r of H_(t))MR.call(t,r)&&z_(e,r,t[r]);return e};function ER(e={}){const{selector:t="html",attribute:r="class",initialValue:n="auto",window:i=ra,storage:a,storageKey:o="vueuse-color-scheme",listenToStorageChanges:s=!0,storageRef:l,emitAuto:u}=e,c=AR({auto:"",light:"light",dark:"dark"},e.modes||{}),f=PT({window:i}),d=k(()=>f.value?"dark":"light"),h=l||(o==null?B(n):SR(o,n,a,{window:i,listenToStorageChanges:s})),v=k({get(){return h.value==="auto"&&!u?d.value:h.value},set(y){h.value=y}}),p=ET("updateHTMLAttrs",(y,_,b)=>{const x=i==null?void 0:i.document.querySelector(y);if(x)if(_==="class"){const w=b.split(/\s/g);Object.values(c).flatMap(S=>(S||"").split(/\s/g)).filter(Boolean).forEach(S=>{w.includes(S)?x.classList.add(S):x.classList.remove(S)})}else x.setAttribute(_,b)});function g(y){var _;const b=y==="auto"?d.value:y;p(t,r,(_=c[b])!=null?_:b)}function m(y){e.onChanged?e.onChanged(y,g):g(y)}return Se(v,m,{flush:"post",immediate:!0}),u&&Se(d,()=>m(v.value),{flush:"post"}),CT(()=>m(v.value)),v}var PR=Object.defineProperty,LR=Object.defineProperties,DR=Object.getOwnPropertyDescriptors,W_=Object.getOwnPropertySymbols,IR=Object.prototype.hasOwnProperty,OR=Object.prototype.propertyIsEnumerable,V_=(e,t,r)=>t in e?PR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,RR=(e,t)=>{for(var r in t||(t={}))IR.call(t,r)&&V_(e,r,t[r]);if(W_)for(var r of W_(t))OR.call(t,r)&&V_(e,r,t[r]);return e},kR=(e,t)=>LR(e,DR(t));function NR(e={}){const{valueDark:t="dark",valueLight:r="",window:n=ra}=e,i=ER(kR(RR({},e),{onChanged:(s,l)=>{var u;e.onChanged?(u=e.onChanged)==null||u.call(e,s==="dark"):l(s)},modes:{dark:t,light:r}})),a=PT({window:n});return k({get(){return i.value==="dark"},set(s){s===a.value?i.value="auto":i.value=s?"dark":"light"}})}var G_=Object.getOwnPropertySymbols,FR=Object.prototype.hasOwnProperty,BR=Object.prototype.propertyIsEnumerable,$R=(e,t)=>{var r={};for(var n in e)FR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&G_)for(var n of G_(e))t.indexOf(n)<0&&BR.call(e,n)&&(r[n]=e[n]);return r};function gs(e,t,r={}){const n=r,{window:i=ra}=n,a=$R(n,["window"]);let o;const s=AT(()=>i&&"ResizeObserver"in i),l=()=>{o&&(o.disconnect(),o=void 0)},u=Se(()=>Ui(e),f=>{l(),s.value&&i&&f&&(o=new ResizeObserver(t),o.observe(f,a))},{immediate:!0,flush:"post"}),c=()=>{l(),u()};return zu(c),{isSupported:s,stop:c}}var U_;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(U_||(U_={}));var HR=Object.defineProperty,j_=Object.getOwnPropertySymbols,zR=Object.prototype.hasOwnProperty,WR=Object.prototype.propertyIsEnumerable,Y_=(e,t,r)=>t in e?HR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,VR=(e,t)=>{for(var r in t||(t={}))zR.call(t,r)&&Y_(e,r,t[r]);if(j_)for(var r of j_(t))WR.call(t,r)&&Y_(e,r,t[r]);return e};const GR={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};VR({linear:JO},GR);var UR=typeof global=="object"&&global&&global.Object===Object&&global;const LT=UR;var jR=typeof self=="object"&&self&&self.Object===Object&&self,YR=LT||jR||Function("return this")();const Pn=YR;var qR=Pn.Symbol;const sn=qR;var DT=Object.prototype,KR=DT.hasOwnProperty,XR=DT.toString,Ks=sn?sn.toStringTag:void 0;function ZR(e){var t=KR.call(e,Ks),r=e[Ks];try{e[Ks]=void 0;var n=!0}catch{}var i=XR.call(e);return n&&(t?e[Ks]=r:delete e[Ks]),i}var QR=Object.prototype,JR=QR.toString;function ek(e){return JR.call(e)}var tk="[object Null]",rk="[object Undefined]",q_=sn?sn.toStringTag:void 0;function So(e){return e==null?e===void 0?rk:tk:q_&&q_ in Object(e)?ZR(e):ek(e)}function qn(e){return e!=null&&typeof e=="object"}var nk="[object Symbol]";function qd(e){return typeof e=="symbol"||qn(e)&&So(e)==nk}function IT(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r0){if(++t>=kk)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function $k(e){return function(){return e}}var Hk=function(){try{var e=To(Object,"defineProperty");return e({},"",{}),e}catch{}}();const td=Hk;var zk=td?function(e,t){return td(e,"toString",{configurable:!0,enumerable:!1,value:$k(t),writable:!0})}:Xm;const Wk=zk;var Vk=Bk(Wk);const kT=Vk;function Gk(e,t){for(var r=-1,n=e==null?0:e.length;++r-1&&e%1==0&&e-1&&e%1==0&&e<=Xk}function Fs(e){return e!=null&&ey(e.length)&&!Zm(e)}function Zk(e,t,r){if(!Ar(r))return!1;var n=typeof t;return(n=="number"?Fs(r)&&Kd(t,r.length):n=="string"&&t in r)?Wu(r[t],e):!1}function Qk(e){return Kk(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&Zk(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++n-1}function vF(e,t){var r=this.__data__,n=Xd(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ti(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0&&r(s)?t>1?ly(s,t-1,r,n,i):sy(i,s):n||(i[i.length]=s)}return i}function IF(e){var t=e==null?0:e.length;return t?ly(e,1):[]}function OF(e){return kT(NT(e,void 0,IF),e+"")}var RF=zT(Object.getPrototypeOf,Object);const uy=RF;var kF="[object Object]",NF=Function.prototype,FF=Object.prototype,WT=NF.toString,BF=FF.hasOwnProperty,$F=WT.call(Object);function HF(e){if(!qn(e)||So(e)!=kF)return!1;var t=uy(e);if(t===null)return!0;var r=BF.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&WT.call(r)==$F}function $p(){if(!arguments.length)return[];var e=arguments[0];return fr(e)?e:[e]}function zF(){this.__data__=new Ti,this.size=0}function WF(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function VF(e){return this.__data__.get(e)}function GF(e){return this.__data__.has(e)}var UF=200;function jF(e,t){var r=this.__data__;if(r instanceof Ti){var n=r.__data__;if(!hu||n.lengths))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,h=r&P$?new nd:void 0;for(a.set(e,t),a.set(t,e);++f=t||S<0||f&&C>=a}function m(){var w=Wh();if(g(w))return y(w);s=setTimeout(m,p(w))}function y(w){return s=void 0,d&&n?h(w):(n=i=void 0,o)}function _(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function b(){return s===void 0?o:y(Wh())}function x(){var w=Wh(),S=g(w);if(n=arguments,i=this,l=w,S){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(m,t),h(l)}return s===void 0&&(s=setTimeout(m,t)),o}return x.cancel=_,x.flush=b,x}function Gp(e,t,r){(r!==void 0&&!Wu(e[t],r)||r===void 0&&!(t in e))&&Qm(e,t,r)}function S5(e){return qn(e)&&Fs(e)}function Up(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function C5(e){return Vu(e,Uu(e))}function T5(e,t,r,n,i,a,o){var s=Up(e,r),l=Up(t,r),u=o.get(l);if(u){Gp(e,r,u);return}var c=a?a(s,l,r+"",e,t,o):void 0,f=c===void 0;if(f){var d=fr(l),h=!d&&fu(l),v=!d&&!h&&ny(l);c=l,d||h||v?fr(s)?c=s:S5(s)?c=RT(s):h?(f=!1,c=GT(l,!0)):v?(f=!1,c=qT(l,!0)):c=[]:HF(l)||cu(l)?(c=s,cu(s)?c=C5(s):(!Ar(s)||Zm(s))&&(c=KT(l))):f=!1}f&&(o.set(l,c),i(c,l,n,a,o),o.delete(l)),Gp(e,r,c)}function iM(e,t,r,n,i){e!==t&&nM(t,function(a,o){if(i||(i=new Mn),Ar(a))T5(e,t,o,r,iM,n,i);else{var s=n?n(Up(e,o),a,o+"",e,t,i):void 0;s===void 0&&(s=a),Gp(e,o,s)}},Uu)}function M5(e,t){var r=-1,n=Fs(e)?Array(e.length):[];return y5(e,function(i,a,o){n[++r]=t(i,a,o)}),n}function A5(e,t){var r=fr(e)?IT:M5;return r(e,d5(t))}function E5(e,t){return ly(A5(e,t),1)}function jp(e){for(var t=-1,r=e==null?0:e.length,n={};++te===void 0,ys=e=>typeof Element>"u"?!1:e instanceof Element,F5=e=>He(e)?!Number.isNaN(Number(e)):!1,Tb=e=>Object.keys(e),Sf=(e,t,r)=>({get value(){return vu(e,t,r)},set value(n){N5(e,t,n)}});class B5 extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function na(e,t){throw new B5(`[${e}] ${t}`)}const sM=(e="")=>e.split(" ").filter(t=>!!t.trim()),Ol=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},Zo=(e,t)=>{!e||!t.trim()||e.classList.add(...sM(t))},ss=(e,t)=>{!e||!t.trim()||e.classList.remove(...sM(t))},Mb=(e,t)=>{var r;if(!Nt||!e||!t)return"";let n=An(t);n==="float"&&(n="cssFloat");try{const i=e.style[n];if(i)return i;const a=(r=document.defaultView)==null?void 0:r.getComputedStyle(e,"");return a?a[n]:""}catch{return e.style[n]}};function po(e,t="px"){if(!e)return"";if($t(e)||F5(e))return`${e}${t}`;if(He(e))return e}/*! Element Plus Icons Vue v2.0.10 */var Zn=(e,t)=>{let r=e.__vccOpts||e;for(let[n,i]of t)r[n]=i;return r},$5={name:"ArrowDown"},H5={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},z5=ae("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"},null,-1),W5=[z5];function V5(e,t,r,n,i,a){return Y(),me("svg",H5,W5)}var lM=Zn($5,[["render",V5],["__file","arrow-down.vue"]]),G5={name:"ArrowRight"},U5={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},j5=ae("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"},null,-1),Y5=[j5];function q5(e,t,r,n,i,a){return Y(),me("svg",U5,Y5)}var dy=Zn(G5,[["render",q5],["__file","arrow-right.vue"]]),K5={name:"ArrowUp"},X5={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Z5=ae("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0z"},null,-1),Q5=[Z5];function J5(e,t,r,n,i,a){return Y(),me("svg",X5,Q5)}var e3=Zn(K5,[["render",J5],["__file","arrow-up.vue"]]),t3={name:"CircleCloseFilled"},r3={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},n3=ae("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336L512 457.664z"},null,-1),i3=[n3];function a3(e,t,r,n,i,a){return Y(),me("svg",r3,i3)}var uM=Zn(t3,[["render",a3],["__file","circle-close-filled.vue"]]),o3={name:"Close"},s3={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},l3=ae("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"},null,-1),u3=[l3];function c3(e,t,r,n,i,a){return Y(),me("svg",s3,u3)}var Yp=Zn(o3,[["render",c3],["__file","close.vue"]]),f3={name:"InfoFilled"},d3={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},h3=ae("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64zm67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344zM590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"},null,-1),v3=[h3];function p3(e,t,r,n,i,a){return Y(),me("svg",d3,v3)}var cM=Zn(f3,[["render",p3],["__file","info-filled.vue"]]),g3={name:"Loading"},m3={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},y3=ae("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"},null,-1),_3=[y3];function b3(e,t,r,n,i,a){return Y(),me("svg",m3,_3)}var hy=Zn(g3,[["render",b3],["__file","loading.vue"]]),w3={name:"More"},x3={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},S3=ae("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96zm336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224zm0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96zm336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224zm0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96z"},null,-1),C3=[S3];function T3(e,t,r,n,i,a){return Y(),me("svg",x3,C3)}var M3=Zn(w3,[["render",T3],["__file","more.vue"]]),A3={name:"SuccessFilled"},E3={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},P3=ae("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336L456.192 600.384z"},null,-1),L3=[P3];function D3(e,t,r,n,i,a){return Y(),me("svg",E3,L3)}var fM=Zn(A3,[["render",D3],["__file","success-filled.vue"]]),I3={name:"WarningFilled"},O3={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},R3=ae("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256zm0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4z"},null,-1),k3=[R3];function N3(e,t,r,n,i,a){return Y(),me("svg",O3,k3)}var dM=Zn(I3,[["render",N3],["__file","warning-filled.vue"]]);const hM="__epPropKey",Le=e=>e,F3=e=>Xe(e)&&!!e[hM],eh=(e,t)=>{if(!Xe(e)||F3(e))return e;const{values:r,required:n,default:i,type:a,validator:o}=e,l={type:a,required:!!n,validator:r||o?u=>{let c=!1,f=[];if(r&&(f=Array.from(r),We(e,"default")&&f.push(i),c||(c=f.includes(u))),o&&(c||(c=o(u))),!c&&f.length>0){const d=[...new Set(f)].map(h=>JSON.stringify(h)).join(", ");fI(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${d}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[hM]:!0};return We(e,"default")&&(l.default=i),l},tt=e=>jp(Object.entries(e).map(([t,r])=>[t,eh(r,t)])),Wn=Le([String,Object,Function]),B3={Close:Yp,SuccessFilled:fM,InfoFilled:cM,WarningFilled:dM,CircleCloseFilled:uM},Ab={success:fM,warning:dM,error:uM,info:cM},hr=(e,t)=>{if(e.install=r=>{for(const n of[e,...Object.values(t??{})])r.component(n.name,n)},t)for(const[r,n]of Object.entries(t))e[r]=n;return e},$3=(e,t)=>(e.install=r=>{e._context=r._context,r.config.globalProperties[t]=e},e),H3=(e,t)=>(e.install=r=>{r.directive(t,e)},e),fa=e=>(e.install=ur,e),Ot={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},go="update:modelValue",qp="change",Kp="input",Yu=["","default","small","large"],z3=e=>["",...Yu].includes(e),Cf=e=>{const t=be(e)?e:[e],r=[];return t.forEach(n=>{var i;be(n)?r.push(...Cf(n)):ta(n)&&be(n.children)?r.push(...Cf(n.children)):(r.push(n),ta(n)&&((i=n.component)!=null&&i.subTree)&&r.push(...Cf(n.component.subTree)))}),r},Ya=e=>e,vy=({from:e,replacement:t,scope:r,version:n,ref:i,type:a="API"},o)=>{Se(()=>E(o),s=>{},{immediate:!0})};var W3={name:"en",el:{colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color."},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"}}};const V3=e=>(t,r)=>G3(t,r,E(e)),G3=(e,t,r)=>vu(r,e,e).replace(/\{(\w+)\}/g,(n,i)=>{var a;return`${(a=t==null?void 0:t[i])!=null?a:`{${i}}`}`}),U3=e=>{const t=k(()=>E(e).name),r=Ct(e)?e:B(e);return{lang:t,locale:r,t:V3(e)}},vM=Symbol("localeContextKey"),py=e=>{const t=e||Ee(vM,B());return U3(k(()=>t.value||W3))},Xp="el",j3="is-",ga=(e,t,r,n,i)=>{let a=`${e}-${t}`;return r&&(a+=`-${r}`),n&&(a+=`__${n}`),i&&(a+=`--${i}`),a},pM=Symbol("namespaceContextKey"),gy=e=>{const t=e||Ee(pM,B(Xp));return k(()=>E(t)||Xp)},Fe=(e,t)=>{const r=gy(t);return{namespace:r,b:(p="")=>ga(r.value,e,p,"",""),e:p=>p?ga(r.value,e,"",p,""):"",m:p=>p?ga(r.value,e,"","",p):"",be:(p,g)=>p&&g?ga(r.value,e,p,g,""):"",em:(p,g)=>p&&g?ga(r.value,e,"",p,g):"",bm:(p,g)=>p&&g?ga(r.value,e,p,"",g):"",bem:(p,g,m)=>p&&g&&m?ga(r.value,e,p,g,m):"",is:(p,...g)=>{const m=g.length>=1?g[0]:!0;return p&&m?`${j3}${p}`:""},cssVar:p=>{const g={};for(const m in p)p[m]&&(g[`--${r.value}-${m}`]=p[m]);return g},cssVarName:p=>`--${r.value}-${p}`,cssVarBlock:p=>{const g={};for(const m in p)p[m]&&(g[`--${r.value}-${e}-${m}`]=p[m]);return g},cssVarBlockName:p=>`--${r.value}-${e}-${p}`}},Y3=eh({type:Le(Boolean),default:null}),q3=eh({type:Le(Function)}),K3=e=>{const t=`update:${e}`,r=`onUpdate:${e}`,n=[t],i={[e]:Y3,[r]:q3};return{useModelToggle:({indicator:o,toggleReason:s,shouldHideWhenRouteChanges:l,shouldProceed:u,onShow:c,onHide:f})=>{const d=ct(),{emit:h}=d,v=d.props,p=k(()=>De(v[r])),g=k(()=>v[e]===null),m=S=>{o.value!==!0&&(o.value=!0,s&&(s.value=S),De(c)&&c(S))},y=S=>{o.value!==!1&&(o.value=!1,s&&(s.value=S),De(f)&&f(S))},_=S=>{if(v.disabled===!0||De(u)&&!u())return;const C=p.value&&Nt;C&&h(t,!0),(g.value||!C)&&m(S)},b=S=>{if(v.disabled===!0||!Nt)return;const C=p.value&&Nt;C&&h(t,!1),(g.value||!C)&&y(S)},x=S=>{Br(S)&&(v.disabled&&S?p.value&&h(t,!1):o.value!==S&&(S?m():y()))},w=()=>{o.value?b():_()};return Se(()=>v[e],x),l&&d.appContext.config.globalProperties.$route!==void 0&&Se(()=>({...d.proxy.$route}),()=>{l.value&&o.value&&b()}),wt(()=>{x(v[e])}),{hide:b,show:_,toggle:w,hasUpdateHandler:p}},useModelToggleProps:i,useModelToggleEmits:n}},gM=e=>{const t=ct();return k(()=>{var r,n;return(n=(r=t==null?void 0:t.proxy)==null?void 0:r.$props)==null?void 0:n[e]})};var Sr="top",ln="bottom",un="right",Cr="left",my="auto",qu=[Sr,ln,un,Cr],_s="start",mu="end",X3="clippingParents",mM="viewport",Xs="popper",Z3="reference",Eb=qu.reduce(function(e,t){return e.concat([t+"-"+_s,t+"-"+mu])},[]),yy=[].concat(qu,[my]).reduce(function(e,t){return e.concat([t,t+"-"+_s,t+"-"+mu])},[]),Q3="beforeRead",J3="read",e4="afterRead",t4="beforeMain",r4="main",n4="afterMain",i4="beforeWrite",a4="write",o4="afterWrite",s4=[Q3,J3,e4,t4,r4,n4,i4,a4,o4];function Kn(e){return e?(e.nodeName||"").toLowerCase():null}function Ln(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function bs(e){var t=Ln(e).Element;return e instanceof t||e instanceof Element}function an(e){var t=Ln(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function _y(e){if(typeof ShadowRoot>"u")return!1;var t=Ln(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function l4(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},a=t.elements[r];!an(a)||!Kn(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function u4(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],a=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=o.reduce(function(l,u){return l[u]="",l},{});!an(i)||!Kn(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}var yM={name:"applyStyles",enabled:!0,phase:"write",fn:l4,effect:u4,requires:["computeStyles"]};function jn(e){return e.split("-")[0]}var oo=Math.max,od=Math.min,ws=Math.round;function xs(e,t){t===void 0&&(t=!1);var r=e.getBoundingClientRect(),n=1,i=1;if(an(e)&&t){var a=e.offsetHeight,o=e.offsetWidth;o>0&&(n=ws(r.width)/o||1),a>0&&(i=ws(r.height)/a||1)}return{width:r.width/n,height:r.height/i,top:r.top/i,right:r.right/n,bottom:r.bottom/i,left:r.left/n,x:r.left/n,y:r.top/i}}function by(e){var t=xs(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function _M(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&_y(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function _i(e){return Ln(e).getComputedStyle(e)}function c4(e){return["table","td","th"].indexOf(Kn(e))>=0}function da(e){return((bs(e)?e.ownerDocument:e.document)||window.document).documentElement}function th(e){return Kn(e)==="html"?e:e.assignedSlot||e.parentNode||(_y(e)?e.host:null)||da(e)}function Pb(e){return!an(e)||_i(e).position==="fixed"?null:e.offsetParent}function f4(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&an(e)){var n=_i(e);if(n.position==="fixed")return null}var i=th(e);for(_y(i)&&(i=i.host);an(i)&&["html","body"].indexOf(Kn(i))<0;){var a=_i(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Ku(e){for(var t=Ln(e),r=Pb(e);r&&c4(r)&&_i(r).position==="static";)r=Pb(r);return r&&(Kn(r)==="html"||Kn(r)==="body"&&_i(r).position==="static")?t:r||f4(e)||t}function wy(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Rl(e,t,r){return oo(e,od(t,r))}function d4(e,t,r){var n=Rl(e,t,r);return n>r?r:n}function bM(){return{top:0,right:0,bottom:0,left:0}}function wM(e){return Object.assign({},bM(),e)}function xM(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var h4=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,wM(typeof e!="number"?e:xM(e,qu))};function v4(e){var t,r=e.state,n=e.name,i=e.options,a=r.elements.arrow,o=r.modifiersData.popperOffsets,s=jn(r.placement),l=wy(s),u=[Cr,un].indexOf(s)>=0,c=u?"height":"width";if(!(!a||!o)){var f=h4(i.padding,r),d=by(a),h=l==="y"?Sr:Cr,v=l==="y"?ln:un,p=r.rects.reference[c]+r.rects.reference[l]-o[l]-r.rects.popper[c],g=o[l]-r.rects.reference[l],m=Ku(a),y=m?l==="y"?m.clientHeight||0:m.clientWidth||0:0,_=p/2-g/2,b=f[h],x=y-d[c]-f[v],w=y/2-d[c]/2+_,S=Rl(b,w,x),C=l;r.modifiersData[n]=(t={},t[C]=S,t.centerOffset=S-w,t)}}function p4(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!_M(t.elements.popper,i)||(t.elements.arrow=i))}var g4={name:"arrow",enabled:!0,phase:"main",fn:v4,effect:p4,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ss(e){return e.split("-")[1]}var m4={top:"auto",right:"auto",bottom:"auto",left:"auto"};function y4(e){var t=e.x,r=e.y,n=window,i=n.devicePixelRatio||1;return{x:ws(t*i)/i||0,y:ws(r*i)/i||0}}function Lb(e){var t,r=e.popper,n=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,f=e.isFixed,d=o.x,h=d===void 0?0:d,v=o.y,p=v===void 0?0:v,g=typeof c=="function"?c({x:h,y:p}):{x:h,y:p};h=g.x,p=g.y;var m=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),_=Cr,b=Sr,x=window;if(u){var w=Ku(r),S="clientHeight",C="clientWidth";if(w===Ln(r)&&(w=da(r),_i(w).position!=="static"&&s==="absolute"&&(S="scrollHeight",C="scrollWidth")),w=w,i===Sr||(i===Cr||i===un)&&a===mu){b=ln;var M=f&&w===x&&x.visualViewport?x.visualViewport.height:w[S];p-=M-n.height,p*=l?1:-1}if(i===Cr||(i===Sr||i===ln)&&a===mu){_=un;var P=f&&w===x&&x.visualViewport?x.visualViewport.width:w[C];h-=P-n.width,h*=l?1:-1}}var A=Object.assign({position:s},u&&m4),T=c===!0?y4({x:h,y:p}):{x:h,y:p};if(h=T.x,p=T.y,l){var D;return Object.assign({},A,(D={},D[b]=y?"0":"",D[_]=m?"0":"",D.transform=(x.devicePixelRatio||1)<=1?"translate("+h+"px, "+p+"px)":"translate3d("+h+"px, "+p+"px, 0)",D))}return Object.assign({},A,(t={},t[b]=y?p+"px":"",t[_]=m?h+"px":"",t.transform="",t))}function _4(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,a=r.adaptive,o=a===void 0?!0:a,s=r.roundOffsets,l=s===void 0?!0:s,u={placement:jn(t.placement),variation:Ss(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Lb(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Lb(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var SM={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_4,data:{}},mc={passive:!0};function b4(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,a=i===void 0?!0:i,o=n.resize,s=o===void 0?!0:o,l=Ln(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach(function(c){c.addEventListener("scroll",r.update,mc)}),s&&l.addEventListener("resize",r.update,mc),function(){a&&u.forEach(function(c){c.removeEventListener("scroll",r.update,mc)}),s&&l.removeEventListener("resize",r.update,mc)}}var CM={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:b4,data:{}},w4={left:"right",right:"left",bottom:"top",top:"bottom"};function Tf(e){return e.replace(/left|right|bottom|top/g,function(t){return w4[t]})}var x4={start:"end",end:"start"};function Db(e){return e.replace(/start|end/g,function(t){return x4[t]})}function xy(e){var t=Ln(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Sy(e){return xs(da(e)).left+xy(e).scrollLeft}function S4(e){var t=Ln(e),r=da(e),n=t.visualViewport,i=r.clientWidth,a=r.clientHeight,o=0,s=0;return n&&(i=n.width,a=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=n.offsetLeft,s=n.offsetTop)),{width:i,height:a,x:o+Sy(e),y:s}}function C4(e){var t,r=da(e),n=xy(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=oo(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=oo(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+Sy(e),l=-n.scrollTop;return _i(i||r).direction==="rtl"&&(s+=oo(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:l}}function Cy(e){var t=_i(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function TM(e){return["html","body","#document"].indexOf(Kn(e))>=0?e.ownerDocument.body:an(e)&&Cy(e)?e:TM(th(e))}function kl(e,t){var r;t===void 0&&(t=[]);var n=TM(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),a=Ln(n),o=i?[a].concat(a.visualViewport||[],Cy(n)?n:[]):n,s=t.concat(o);return i?s:s.concat(kl(th(o)))}function Zp(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function T4(e){var t=xs(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Ib(e,t){return t===mM?Zp(S4(e)):bs(t)?T4(t):Zp(C4(da(e)))}function M4(e){var t=kl(th(e)),r=["absolute","fixed"].indexOf(_i(e).position)>=0,n=r&&an(e)?Ku(e):e;return bs(n)?t.filter(function(i){return bs(i)&&_M(i,n)&&Kn(i)!=="body"}):[]}function A4(e,t,r){var n=t==="clippingParents"?M4(e):[].concat(t),i=[].concat(n,[r]),a=i[0],o=i.reduce(function(s,l){var u=Ib(e,l);return s.top=oo(u.top,s.top),s.right=od(u.right,s.right),s.bottom=od(u.bottom,s.bottom),s.left=oo(u.left,s.left),s},Ib(e,a));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function MM(e){var t=e.reference,r=e.element,n=e.placement,i=n?jn(n):null,a=n?Ss(n):null,o=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,l;switch(i){case Sr:l={x:o,y:t.y-r.height};break;case ln:l={x:o,y:t.y+t.height};break;case un:l={x:t.x+t.width,y:s};break;case Cr:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?wy(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(a){case _s:l[u]=l[u]-(t[c]/2-r[c]/2);break;case mu:l[u]=l[u]+(t[c]/2-r[c]/2);break}}return l}function yu(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,a=r.boundary,o=a===void 0?X3:a,s=r.rootBoundary,l=s===void 0?mM:s,u=r.elementContext,c=u===void 0?Xs:u,f=r.altBoundary,d=f===void 0?!1:f,h=r.padding,v=h===void 0?0:h,p=wM(typeof v!="number"?v:xM(v,qu)),g=c===Xs?Z3:Xs,m=e.rects.popper,y=e.elements[d?g:c],_=A4(bs(y)?y:y.contextElement||da(e.elements.popper),o,l),b=xs(e.elements.reference),x=MM({reference:b,element:m,strategy:"absolute",placement:i}),w=Zp(Object.assign({},m,x)),S=c===Xs?w:b,C={top:_.top-S.top+p.top,bottom:S.bottom-_.bottom+p.bottom,left:_.left-S.left+p.left,right:S.right-_.right+p.right},M=e.modifiersData.offset;if(c===Xs&&M){var P=M[i];Object.keys(C).forEach(function(A){var T=[un,ln].indexOf(A)>=0?1:-1,D=[Sr,ln].indexOf(A)>=0?"y":"x";C[A]+=P[D]*T})}return C}function E4(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,a=r.rootBoundary,o=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,u=l===void 0?yy:l,c=Ss(n),f=c?s?Eb:Eb.filter(function(v){return Ss(v)===c}):qu,d=f.filter(function(v){return u.indexOf(v)>=0});d.length===0&&(d=f);var h=d.reduce(function(v,p){return v[p]=yu(e,{placement:p,boundary:i,rootBoundary:a,padding:o})[jn(p)],v},{});return Object.keys(h).sort(function(v,p){return h[v]-h[p]})}function P4(e){if(jn(e)===my)return[];var t=Tf(e);return[Db(e),t,Db(t)]}function L4(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!0:o,l=r.fallbackPlacements,u=r.padding,c=r.boundary,f=r.rootBoundary,d=r.altBoundary,h=r.flipVariations,v=h===void 0?!0:h,p=r.allowedAutoPlacements,g=t.options.placement,m=jn(g),y=m===g,_=l||(y||!v?[Tf(g)]:P4(g)),b=[g].concat(_).reduce(function(Ae,V){return Ae.concat(jn(V)===my?E4(t,{placement:V,boundary:c,rootBoundary:f,padding:u,flipVariations:v,allowedAutoPlacements:p}):V)},[]),x=t.rects.reference,w=t.rects.popper,S=new Map,C=!0,M=b[0],P=0;P=0,H=N?"width":"height",$=yu(t,{placement:A,boundary:c,rootBoundary:f,altBoundary:d,padding:u}),G=N?D?un:Cr:D?ln:Sr;x[H]>w[H]&&(G=Tf(G));var F=Tf(G),R=[];if(a&&R.push($[T]<=0),s&&R.push($[G]<=0,$[F]<=0),R.every(function(Ae){return Ae})){M=A,C=!1;break}S.set(A,R)}if(C)for(var j=v?3:1,re=function(Ae){var V=b.find(function(Q){var W=S.get(Q);if(W)return W.slice(0,Ae).every(function(q){return q})});if(V)return M=V,"break"},oe=j;oe>0;oe--){var ye=re(oe);if(ye==="break")break}t.placement!==M&&(t.modifiersData[n]._skip=!0,t.placement=M,t.reset=!0)}}var D4={name:"flip",enabled:!0,phase:"main",fn:L4,requiresIfExists:["offset"],data:{_skip:!1}};function Ob(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Rb(e){return[Sr,un,ln,Cr].some(function(t){return e[t]>=0})}function I4(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=yu(t,{elementContext:"reference"}),s=yu(t,{altBoundary:!0}),l=Ob(o,n),u=Ob(s,i,a),c=Rb(l),f=Rb(u);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}var O4={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:I4};function R4(e,t,r){var n=jn(e),i=[Cr,Sr].indexOf(n)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[Cr,un].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function k4(e){var t=e.state,r=e.options,n=e.name,i=r.offset,a=i===void 0?[0,0]:i,o=yy.reduce(function(c,f){return c[f]=R4(f,t.rects,a),c},{}),s=o[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=o}var N4={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:k4};function F4(e){var t=e.state,r=e.name;t.modifiersData[r]=MM({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var AM={name:"popperOffsets",enabled:!0,phase:"read",fn:F4,data:{}};function B4(e){return e==="x"?"y":"x"}function $4(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!1:o,l=r.boundary,u=r.rootBoundary,c=r.altBoundary,f=r.padding,d=r.tether,h=d===void 0?!0:d,v=r.tetherOffset,p=v===void 0?0:v,g=yu(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),m=jn(t.placement),y=Ss(t.placement),_=!y,b=wy(m),x=B4(b),w=t.modifiersData.popperOffsets,S=t.rects.reference,C=t.rects.popper,M=typeof p=="function"?p(Object.assign({},t.rects,{placement:t.placement})):p,P=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(w){if(a){var D,N=b==="y"?Sr:Cr,H=b==="y"?ln:un,$=b==="y"?"height":"width",G=w[b],F=G+g[N],R=G-g[H],j=h?-C[$]/2:0,re=y===_s?S[$]:C[$],oe=y===_s?-C[$]:-S[$],ye=t.elements.arrow,Ae=h&&ye?by(ye):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:bM(),Q=V[N],W=V[H],q=Rl(0,S[$],Ae[$]),le=_?S[$]/2-j-q-Q-P.mainAxis:re-q-Q-P.mainAxis,de=_?-S[$]/2+j+q+W+P.mainAxis:oe+q+W+P.mainAxis,J=t.elements.arrow&&Ku(t.elements.arrow),L=J?b==="y"?J.clientTop||0:J.clientLeft||0:0,I=(D=A==null?void 0:A[b])!=null?D:0,z=G+le-I-L,U=G+de-I,K=Rl(h?od(F,z):F,G,h?oo(R,U):R);w[b]=K,T[b]=K-G}if(s){var ne,fe=b==="x"?Sr:Cr,te=b==="x"?ln:un,ie=w[x],X=x==="y"?"height":"width",we=ie+g[fe],he=ie-g[te],xe=[Sr,Cr].indexOf(m)!==-1,Oe=(ne=A==null?void 0:A[x])!=null?ne:0,ze=xe?we:ie-S[X]-C[X]-Oe+P.altAxis,rt=xe?ie+S[X]+C[X]-Oe-P.altAxis:he,Je=h&&xe?d4(ze,ie,rt):Rl(h?ze:we,ie,h?rt:he);w[x]=Je,T[x]=Je-ie}t.modifiersData[n]=T}}var H4={name:"preventOverflow",enabled:!0,phase:"main",fn:$4,requiresIfExists:["offset"]};function z4(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function W4(e){return e===Ln(e)||!an(e)?xy(e):z4(e)}function V4(e){var t=e.getBoundingClientRect(),r=ws(t.width)/e.offsetWidth||1,n=ws(t.height)/e.offsetHeight||1;return r!==1||n!==1}function G4(e,t,r){r===void 0&&(r=!1);var n=an(t),i=an(t)&&V4(t),a=da(t),o=xs(e,i),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((Kn(t)!=="body"||Cy(a))&&(s=W4(t)),an(t)?(l=xs(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=Sy(a))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function U4(e){var t=new Map,r=new Set,n=[];e.forEach(function(a){t.set(a.name,a)});function i(a){r.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!r.has(s)){var l=t.get(s);l&&i(l)}}),n.push(a)}return e.forEach(function(a){r.has(a.name)||i(a)}),n}function j4(e){var t=U4(e);return s4.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function Y4(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function q4(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var kb={placement:"bottom",modifiers:[],strategy:"absolute"};function Nb(){for(var e=arguments.length,t=new Array(e),r=0;r{const n={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const u=Q4(l);Object.assign(o.value,u)},requires:["computeStyles"]},i=k(()=>{const{onFirstUpdate:l,placement:u,strategy:c,modifiers:f}=E(r);return{onFirstUpdate:l,placement:u||"bottom",strategy:c||"absolute",modifiers:[...f||[],n,{name:"applyStyles",enabled:!1}]}}),a=$m(),o=B({styles:{popper:{position:E(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=()=>{a.value&&(a.value.destroy(),a.value=void 0)};return Se(i,l=>{const u=E(a);u&&u.setOptions(l)},{deep:!0}),Se([e,t],([l,u])=>{s(),!(!l||!u)&&(a.value=EM(l,u,E(i)))}),Xt(()=>{s()}),{state:k(()=>{var l;return{...((l=E(a))==null?void 0:l.state)||{}}}),styles:k(()=>E(o).styles),attributes:k(()=>E(o).attributes),update:()=>{var l;return(l=E(a))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=E(a))==null?void 0:l.forceUpdate()},instanceRef:k(()=>E(a))}};function Q4(e){const t=Object.keys(e.elements),r=jp(t.map(i=>[i,e.styles[i]||{}])),n=jp(t.map(i=>[i,e.attributes[i]]));return{styles:r,attributes:n}}function Fb(){let e;const t=(n,i)=>{r(),e=window.setTimeout(n,i)},r=()=>window.clearTimeout(e);return zu(()=>r()),{registerTimeout:t,cancelTimeout:r}}const Bb={prefix:Math.floor(Math.random()*1e4),current:0},J4=Symbol("elIdInjection"),PM=()=>ct()?Ee(J4,Bb):Bb,My=e=>{const t=PM(),r=gy();return k(()=>E(e)||`${r.value}-id-${t.prefix}-${t.current++}`)};let Yo=[];const $b=e=>{const t=e;t.key===Ot.esc&&Yo.forEach(r=>r(t))},eH=e=>{wt(()=>{Yo.length===0&&document.addEventListener("keydown",$b),Nt&&Yo.push(e)}),Xt(()=>{Yo=Yo.filter(t=>t!==e),Yo.length===0&&Nt&&document.removeEventListener("keydown",$b)})};let Hb;const LM=()=>{const e=gy(),t=PM(),r=k(()=>`${e.value}-popper-container-${t.prefix}`),n=k(()=>`#${r.value}`);return{id:r,selector:n}},tH=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},rH=()=>{const{id:e,selector:t}=LM();return Gd(()=>{Nt&&!Hb&&!document.body.querySelector(t.value)&&(Hb=tH(e.value))}),{id:e,selector:t}},nH=tt({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),DM=({showAfter:e,hideAfter:t,autoClose:r,open:n,close:i})=>{const{registerTimeout:a}=Fb(),{registerTimeout:o,cancelTimeout:s}=Fb();return{onOpen:c=>{a(()=>{n(c);const f=E(r);$t(f)&&f>0&&o(()=>{i(c)},f)},E(e))},onClose:c=>{s(),a(()=>{i(c)},E(t))}}},IM=Symbol("elForwardRef"),iH=e=>{At(IM,{setForwardRef:r=>{e.value=r}})},aH=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),zb=B(0),OM=2e3,RM=Symbol("zIndexContextKey"),Ay=e=>{const t=e||Ee(RM,void 0),r=k(()=>{const a=E(t);return $t(a)?a:OM}),n=k(()=>r.value+zb.value);return{initialZIndex:r,currentZIndex:n,nextZIndex:()=>(zb.value++,n.value)}},Xu=eh({type:String,values:Yu,required:!1}),kM=Symbol("size"),oH=()=>{const e=Ee(kM,{});return k(()=>E(e.size)||"")},NM=Symbol(),sd=B();function Ey(e,t=void 0){const r=ct()?Ee(NM,sd):sd;return e?k(()=>{var n,i;return(i=(n=r.value)==null?void 0:n[e])!=null?i:t}):r}function sH(e,t){const r=Ey(),n=Fe(e,k(()=>{var s;return((s=r.value)==null?void 0:s.namespace)||Xp})),i=py(k(()=>{var s;return(s=r.value)==null?void 0:s.locale})),a=Ay(k(()=>{var s;return((s=r.value)==null?void 0:s.zIndex)||OM})),o=k(()=>{var s;return E(t)||((s=r.value)==null?void 0:s.size)||""});return FM(k(()=>E(r)||{})),{ns:n,locale:i,zIndex:a,size:o}}const FM=(e,t,r=!1)=>{var n;const i=!!ct(),a=i?Ey():void 0,o=(n=t==null?void 0:t.provide)!=null?n:i?At:void 0;if(!o)return;const s=k(()=>{const l=E(e);return a!=null&&a.value?lH(a.value,l):l});return o(NM,s),o(vM,k(()=>s.value.locale)),o(pM,k(()=>s.value.namespace)),o(RM,k(()=>s.value.zIndex)),o(kM,{size:k(()=>s.value.size||"")}),(r||!sd.value)&&(sd.value=s.value),s},lH=(e,t)=>{var r;const n=[...new Set([...Tb(e),...Tb(t)])],i={};for(const a of n)i[a]=(r=t[a])!=null?r:e[a];return i},uH=tt({a11y:{type:Boolean,default:!0},locale:{type:Le(Object)},size:Xu,button:{type:Le(Object)},experimentalFeatures:{type:Le(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:Le(Object)},zIndex:Number,namespace:{type:String,default:"el"}}),Qp={};ce({name:"ElConfigProvider",props:uH,setup(e,{slots:t}){Se(()=>e.message,n=>{Object.assign(Qp,n??{})},{immediate:!0,deep:!0});const r=FM(e);return()=>$e(t,"default",{config:r==null?void 0:r.value})}});var Ze=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r};const cH=tt({size:{type:Le([Number,String])},color:{type:String}}),fH=ce({name:"ElIcon",inheritAttrs:!1}),dH=ce({...fH,props:cH,setup(e){const t=e,r=Fe("icon"),n=k(()=>{const{size:i,color:a}=t;return!i&&!a?{}:{fontSize:ad(i)?void 0:po(i),"--color":a}});return(i,a)=>(Y(),me("i",ca({class:E(r).b(),style:E(n)},i.$attrs),[$e(i.$slots,"default")],16))}});var hH=Ze(dH,[["__file","/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);const lr=hr(hH),Bs=Symbol("formContextKey"),mo=Symbol("formItemContextKey"),ia=(e,t={})=>{const r=B(void 0),n=t.prop?r:gM("size"),i=t.global?r:oH(),a=t.form?{size:void 0}:Ee(Bs,void 0),o=t.formItem?{size:void 0}:Ee(mo,void 0);return k(()=>n.value||E(e)||(o==null?void 0:o.size)||(a==null?void 0:a.size)||i.value||"")},rh=e=>{const t=gM("disabled"),r=Ee(Bs,void 0);return k(()=>t.value||E(e)||(r==null?void 0:r.disabled)||!1)},Zu=()=>{const e=Ee(Bs,void 0),t=Ee(mo,void 0);return{form:e,formItem:t}},Py=(e,{formItemContext:t,disableIdGeneration:r,disableIdManagement:n})=>{r||(r=B(!1)),n||(n=B(!1));const i=B();let a;const o=k(()=>{var s;return!!(!e.label&&t&&t.inputIds&&((s=t.inputIds)==null?void 0:s.length)<=1)});return wt(()=>{a=Se([tn(e,"id"),r],([s,l])=>{const u=s??(l?void 0:My().value);u!==i.value&&(t!=null&&t.removeInputId&&(i.value&&t.removeInputId(i.value),!(n!=null&&n.value)&&!l&&u&&t.addInputId(u)),i.value=u)},{immediate:!0})}),ks(()=>{a&&a(),t!=null&&t.removeInputId&&i.value&&t.removeInputId(i.value)}),{isLabeledByFormItem:o,inputId:i}},vH=tt({size:{type:String,values:Yu},disabled:Boolean}),pH=tt({...vH,model:Object,rules:{type:Le(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:{type:Boolean,default:!1},scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),gH={validate:(e,t,r)=>(be(e)||He(e))&&Br(t)&&He(r)};function mH(){const e=B([]),t=k(()=>{if(!e.value.length)return"0";const a=Math.max(...e.value);return a?`${a}px`:""});function r(a){const o=e.value.indexOf(a);return o===-1&&t.value,o}function n(a,o){if(a&&o){const s=r(o);e.value.splice(s,1,a)}else a&&e.value.push(a)}function i(a){const o=r(a);o>-1&&e.value.splice(o,1)}return{autoLabelWidth:t,registerLabelWidth:n,deregisterLabelWidth:i}}const yc=(e,t)=>{const r=$p(t);return r.length>0?e.filter(n=>n.prop&&r.includes(n.prop)):e},yH="ElForm",_H=ce({name:yH}),bH=ce({..._H,props:pH,emits:gH,setup(e,{expose:t,emit:r}){const n=e,i=[],a=ia(),o=Fe("form"),s=k(()=>{const{labelPosition:y,inline:_}=n;return[o.b(),o.m(a.value||"default"),{[o.m(`label-${y}`)]:y,[o.m("inline")]:_}]}),l=y=>{i.push(y)},u=y=>{y.prop&&i.splice(i.indexOf(y),1)},c=(y=[])=>{n.model&&yc(i,y).forEach(_=>_.resetField())},f=(y=[])=>{yc(i,y).forEach(_=>_.clearValidate())},d=k(()=>!!n.model),h=y=>{if(i.length===0)return[];const _=yc(i,y);return _.length?_:[]},v=async y=>g(void 0,y),p=async(y=[])=>{if(!d.value)return!1;const _=h(y);if(_.length===0)return!0;let b={};for(const x of _)try{await x.validate("")}catch(w){b={...b,...w}}return Object.keys(b).length===0?!0:Promise.reject(b)},g=async(y=[],_)=>{const b=!De(_);try{const x=await p(y);return x===!0&&(_==null||_(x)),x}catch(x){if(x instanceof Error)throw x;const w=x;return n.scrollToError&&m(Object.keys(w)[0]),_==null||_(!1,w),b&&Promise.reject(w)}},m=y=>{var _;const b=yc(i,y)[0];b&&((_=b.$el)==null||_.scrollIntoView(n.scrollIntoViewOptions))};return Se(()=>n.rules,()=>{n.validateOnRuleChange&&v().catch(y=>void 0)},{deep:!0}),At(Bs,fn({...$d(n),emit:r,resetFields:c,clearValidate:f,validateField:g,addField:l,removeField:u,...mH()})),t({validate:v,validateField:g,resetFields:c,clearValidate:f,scrollToField:m}),(y,_)=>(Y(),me("form",{class:ue(E(s))},[$e(y.$slots,"default")],2))}});var wH=Ze(bH,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]);function Za(){return Za=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mf(e,t,r){return SH()?Mf=Reflect.construct.bind():Mf=function(i,a,o){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(i,s),u=new l;return o&&_u(u,o.prototype),u},Mf.apply(null,arguments)}function CH(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function eg(e){var t=typeof Map=="function"?new Map:void 0;return eg=function(n){if(n===null||!CH(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return Mf(n,arguments,Jp(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),_u(i,n)},eg(e)}var TH=/%[sdj%]/g,MH=function(){};typeof process<"u"&&process.env;function tg(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function kr(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=a)return s;switch(s){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch{return"[Circular]"}break;default:return s}});return o}return e}function AH(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function zt(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||AH(t)&&typeof e=="string"&&!e)}function EH(e,t,r){var n=[],i=0,a=e.length;function o(s){n.push.apply(n,s||[]),i++,i===a&&r(n)}e.forEach(function(s){t(s,o)})}function Wb(e,t,r){var n=0,i=e.length;function a(o){if(o&&o.length){r(o);return}var s=n;n=n+1,st in e?fD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var hD=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Wt=(e,t,r)=>(dD(e,typeof t!="symbol"?t+"":t,r),r);var Tre=hD((Nr,Fr)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerpolicy&&(a.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?a.credentials="include":i.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();function Em(e,t){const r=Object.create(null),n=e.split(",");for(let i=0;i!!r[i.toLowerCase()]:i=>!!r[i]}function St(e){if(be(e)){const t={};for(let r=0;r{if(r){const n=r.split(pD);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function ue(e){let t="";if(He(e))t=e;else if(be(e))for(let r=0;rOd(r,t))}const Me=e=>He(e)?e:e==null?"":be(e)||Xe(e)&&(e.toString===mC||!De(e.toString))?JSON.stringify(e,gC,2):String(e),gC=(e,t)=>t&&t.__v_isRef?gC(e,t.value):is(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,i])=>(r[`${n} =>`]=i,r),{})}:kd(t)?{[`Set(${t.size})`]:[...t.values()]}:Xe(t)&&!be(t)&&!yC(t)?String(t):t,yt={},ns=[],ur=()=>{},wD=()=>!1,xD=/^on[^a-z]/,Rd=e=>xD.test(e),Pm=e=>e.startsWith("onUpdate:"),Gt=Object.assign,Lm=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},SD=Object.prototype.hasOwnProperty,We=(e,t)=>SD.call(e,t),be=Array.isArray,is=e=>Bu(e)==="[object Map]",kd=e=>Bu(e)==="[object Set]",K0=e=>Bu(e)==="[object Date]",De=e=>typeof e=="function",He=e=>typeof e=="string",tu=e=>typeof e=="symbol",Xe=e=>e!==null&&typeof e=="object",jf=e=>Xe(e)&&De(e.then)&&De(e.catch),mC=Object.prototype.toString,Bu=e=>mC.call(e),CD=e=>Bu(e).slice(8,-1),yC=e=>Bu(e)==="[object Object]",Dm=e=>He(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,mf=Em(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Nd=e=>{const t=Object.create(null);return r=>t[r]||(t[r]=e(r))},TD=/-(\w)/g,An=Nd(e=>e.replace(TD,(t,r)=>r?r.toUpperCase():"")),MD=/\B([A-Z])/g,xo=Nd(e=>e.replace(MD,"-$1").toLowerCase()),Fd=Nd(e=>e.charAt(0).toUpperCase()+e.slice(1)),yf=Nd(e=>e?`on${Fd(e)}`:""),ru=(e,t)=>!Object.is(e,t),_f=(e,t)=>{for(let r=0;r{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:r})},AD=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ED=e=>{const t=He(e)?Number(e):NaN;return isNaN(t)?e:t};let X0;const PD=()=>X0||(X0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Or;class LD{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Or,!t&&Or&&(this.index=(Or.scopes||(Or.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const r=Or;try{return Or=this,t()}finally{Or=r}}}on(){Or=this}off(){Or=this.parent}stop(t){if(this._active){let r,n;for(r=0,n=this.effects.length;r{const t=new Set(e);return t.w=0,t.n=0,t},bC=e=>(e.w&ea)>0,wC=e=>(e.n&ea)>0,OD=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let r=0;for(let n=0;n{(c==="length"||c>=l)&&s.push(u)})}else switch(r!==void 0&&s.push(o.get(r)),t){case"add":be(e)?Dm(r)&&s.push(o.get("length")):(s.push(o.get(no)),is(e)&&s.push(o.get(Cp)));break;case"delete":be(e)||(s.push(o.get(no)),is(e)&&s.push(o.get(Cp)));break;case"set":is(e)&&s.push(o.get(no));break}if(s.length===1)s[0]&&Tp(s[0]);else{const l=[];for(const u of s)u&&l.push(...u);Tp(Im(l))}}function Tp(e,t){const r=be(e)?e:[...e];for(const n of r)n.computed&&Q0(n);for(const n of r)n.computed||Q0(n)}function Q0(e,t){(e!==bn||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function kD(e,t){var r;return(r=qf.get(e))===null||r===void 0?void 0:r.get(t)}const ND=Em("__proto__,__v_isRef,__isVue"),CC=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(tu)),FD=Rm(),BD=Rm(!1,!0),$D=Rm(!0),J0=HD();function HD(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...r){const n=Ke(this);for(let a=0,o=this.length;a{e[t]=function(...r){Os();const n=Ke(this)[t].apply(this,r);return Rs(),n}}),e}function zD(e){const t=Ke(this);return Mr(t,"has",e),t.hasOwnProperty(e)}function Rm(e=!1,t=!1){return function(n,i,a){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&a===(e?t?nI:PC:t?EC:AC).get(n))return n;const o=be(n);if(!e){if(o&&We(J0,i))return Reflect.get(J0,i,a);if(i==="hasOwnProperty")return zD}const s=Reflect.get(n,i,a);return(tu(i)?CC.has(i):ND(i))||(e||Mr(n,"get",i),t)?s:Ct(s)?o&&Dm(i)?s:s.value:Xe(s)?e?$u(s):fn(s):s}}const WD=TC(),VD=TC(!0);function TC(e=!1){return function(r,n,i,a){let o=r[n];if(vs(o)&&Ct(o)&&!Ct(i))return!1;if(!e&&(!Kf(i)&&!vs(i)&&(o=Ke(o),i=Ke(i)),!be(r)&&Ct(o)&&!Ct(i)))return o.value=i,!0;const s=be(r)&&Dm(n)?Number(n)e,Bd=e=>Reflect.getPrototypeOf(e);function uc(e,t,r=!1,n=!1){e=e.__v_raw;const i=Ke(e),a=Ke(t);r||(t!==a&&Mr(i,"get",t),Mr(i,"get",a));const{has:o}=Bd(i),s=n?km:r?Bm:nu;if(o.call(i,t))return s(e.get(t));if(o.call(i,a))return s(e.get(a));e!==i&&e.get(t)}function cc(e,t=!1){const r=this.__v_raw,n=Ke(r),i=Ke(e);return t||(e!==i&&Mr(n,"has",e),Mr(n,"has",i)),e===i?r.has(e):r.has(e)||r.has(i)}function fc(e,t=!1){return e=e.__v_raw,!t&&Mr(Ke(e),"iterate",no),Reflect.get(e,"size",e)}function e_(e){e=Ke(e);const t=Ke(this);return Bd(t).has.call(t,e)||(t.add(e),gi(t,"add",e,e)),this}function t_(e,t){t=Ke(t);const r=Ke(this),{has:n,get:i}=Bd(r);let a=n.call(r,e);a||(e=Ke(e),a=n.call(r,e));const o=i.call(r,e);return r.set(e,t),a?ru(t,o)&&gi(r,"set",e,t):gi(r,"add",e,t),this}function r_(e){const t=Ke(this),{has:r,get:n}=Bd(t);let i=r.call(t,e);i||(e=Ke(e),i=r.call(t,e)),n&&n.call(t,e);const a=t.delete(e);return i&&gi(t,"delete",e,void 0),a}function n_(){const e=Ke(this),t=e.size!==0,r=e.clear();return t&&gi(e,"clear",void 0,void 0),r}function dc(e,t){return function(n,i){const a=this,o=a.__v_raw,s=Ke(o),l=t?km:e?Bm:nu;return!e&&Mr(s,"iterate",no),o.forEach((u,c)=>n.call(i,l(u),l(c),a))}}function hc(e,t,r){return function(...n){const i=this.__v_raw,a=Ke(i),o=is(a),s=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=i[e](...n),c=r?km:t?Bm:nu;return!t&&Mr(a,"iterate",l?Cp:no),{next(){const{value:f,done:d}=u.next();return d?{value:f,done:d}:{value:s?[c(f[0]),c(f[1])]:c(f),done:d}},[Symbol.iterator](){return this}}}}function Pi(e){return function(...t){return e==="delete"?!1:this}}function KD(){const e={get(a){return uc(this,a)},get size(){return fc(this)},has:cc,add:e_,set:t_,delete:r_,clear:n_,forEach:dc(!1,!1)},t={get(a){return uc(this,a,!1,!0)},get size(){return fc(this)},has:cc,add:e_,set:t_,delete:r_,clear:n_,forEach:dc(!1,!0)},r={get(a){return uc(this,a,!0)},get size(){return fc(this,!0)},has(a){return cc.call(this,a,!0)},add:Pi("add"),set:Pi("set"),delete:Pi("delete"),clear:Pi("clear"),forEach:dc(!0,!1)},n={get(a){return uc(this,a,!0,!0)},get size(){return fc(this,!0)},has(a){return cc.call(this,a,!0)},add:Pi("add"),set:Pi("set"),delete:Pi("delete"),clear:Pi("clear"),forEach:dc(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{e[a]=hc(a,!1,!1),r[a]=hc(a,!0,!1),t[a]=hc(a,!1,!0),n[a]=hc(a,!0,!0)}),[e,r,t,n]}const[XD,ZD,QD,JD]=KD();function Nm(e,t){const r=t?e?JD:QD:e?ZD:XD;return(n,i,a)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(We(r,i)&&i in n?r:n,i,a)}const eI={get:Nm(!1,!1)},tI={get:Nm(!1,!0)},rI={get:Nm(!0,!1)},AC=new WeakMap,EC=new WeakMap,PC=new WeakMap,nI=new WeakMap;function iI(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function aI(e){return e.__v_skip||!Object.isExtensible(e)?0:iI(CD(e))}function fn(e){return vs(e)?e:Fm(e,!1,MC,eI,AC)}function LC(e){return Fm(e,!1,qD,tI,EC)}function $u(e){return Fm(e,!0,YD,rI,PC)}function Fm(e,t,r,n,i){if(!Xe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=i.get(e);if(a)return a;const o=aI(e);if(o===0)return e;const s=new Proxy(e,o===2?n:r);return i.set(e,s),s}function as(e){return vs(e)?as(e.__v_raw):!!(e&&e.__v_isReactive)}function vs(e){return!!(e&&e.__v_isReadonly)}function Kf(e){return!!(e&&e.__v_isShallow)}function DC(e){return as(e)||vs(e)}function Ke(e){const t=e&&e.__v_raw;return t?Ke(t):e}function IC(e){return Yf(e,"__v_skip",!0),e}const nu=e=>Xe(e)?fn(e):e,Bm=e=>Xe(e)?$u(e):e;function OC(e){Xi&&bn&&(e=Ke(e),SC(e.dep||(e.dep=Im())))}function RC(e,t){e=Ke(e);const r=e.dep;r&&Tp(r)}function Ct(e){return!!(e&&e.__v_isRef===!0)}function B(e){return kC(e,!1)}function $m(e){return kC(e,!0)}function kC(e,t){return Ct(e)?e:new oI(e,t)}class oI{constructor(t,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?t:Ke(t),this._value=r?t:nu(t)}get value(){return OC(this),this._value}set value(t){const r=this.__v_isShallow||Kf(t)||vs(t);t=r?t:Ke(t),ru(t,this._rawValue)&&(this._rawValue=t,this._value=r?t:nu(t),RC(this))}}function E(e){return Ct(e)?e.value:e}const sI={get:(e,t,r)=>E(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const i=e[t];return Ct(i)&&!Ct(r)?(i.value=r,!0):Reflect.set(e,t,r,n)}};function NC(e){return as(e)?e:new Proxy(e,sI)}function $d(e){const t=be(e)?new Array(e.length):{};for(const r in e)t[r]=tn(e,r);return t}class lI{constructor(t,r,n){this._object=t,this._key=r,this._defaultValue=n,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return kD(Ke(this._object),this._key)}}function tn(e,t,r){const n=e[t];return Ct(n)?n:new lI(e,t,r)}var FC;class uI{constructor(t,r,n,i){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this[FC]=!1,this._dirty=!0,this.effect=new Om(t,()=>{this._dirty||(this._dirty=!0,RC(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const t=Ke(this);return OC(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}FC="__v_isReadonly";function cI(e,t,r=!1){let n,i;const a=De(e);return a?(n=e,i=ur):(n=e.get,i=e.set),new uI(n,i,a||!i,r)}function fI(e,...t){}function Zi(e,t,r,n){let i;try{i=n?e(...n):e()}catch(a){Hd(a,t,r)}return i}function rn(e,t,r,n){if(De(e)){const a=Zi(e,t,r,n);return a&&jf(a)&&a.catch(o=>{Hd(o,t,r)}),a}const i=[];for(let a=0;a>>1;au(tr[n])$n&&tr.splice(t,1)}function pI(e){be(e)?os.push(...e):(!ci||!ci.includes(e,e.allowRecurse?Ga+1:Ga))&&os.push(e),$C()}function i_(e,t=iu?$n+1:0){for(;tau(r)-au(n)),Ga=0;Gae.id==null?1/0:e.id,gI=(e,t)=>{const r=au(e)-au(t);if(r===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return r};function zC(e){Mp=!1,iu=!0,tr.sort(gI);const t=ur;try{for($n=0;$nHe(h)?h.trim():h)),f&&(i=r.map(AD))}let s,l=n[s=yf(t)]||n[s=yf(An(t))];!l&&a&&(l=n[s=yf(xo(t))]),l&&rn(l,e,6,i);const u=n[s+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,rn(u,e,6,i)}}function WC(e,t,r=!1){const n=t.emitsCache,i=n.get(e);if(i!==void 0)return i;const a=e.emits;let o={},s=!1;if(!De(e)){const l=u=>{const c=WC(u,t,!0);c&&(s=!0,Gt(o,c))};!r&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!a&&!s?(Xe(e)&&n.set(e,null),null):(be(a)?a.forEach(l=>o[l]=null):Gt(o,a),Xe(e)&&n.set(e,o),o)}function zd(e,t){return!e||!Rd(t)?!1:(t=t.slice(2).replace(/Once$/,""),We(e,t[0].toLowerCase()+t.slice(1))||We(e,xo(t))||We(e,t))}let qt=null,VC=null;function Xf(e){const t=qt;return qt=e,VC=e&&e.type.__scopeId||null,t}function Z(e,t=qt,r){if(!t||e._n)return e;const n=(...i)=>{n._d&&g_(-1);const a=Xf(t);let o;try{o=e(...i)}finally{Xf(a),n._d&&g_(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Ih(e){const{type:t,vnode:r,proxy:n,withProxy:i,props:a,propsOptions:[o],slots:s,attrs:l,emit:u,render:c,renderCache:f,data:d,setupState:h,ctx:v,inheritAttrs:p}=e;let g,m;const y=Xf(e);try{if(r.shapeFlag&4){const b=i||n;g=Bn(c.call(b,b,f,a,h,d,v)),m=l}else{const b=t;g=Bn(b.length>1?b(a,{attrs:l,slots:s,emit:u}):b(a,null)),m=t.props?l:yI(l)}}catch(b){Dl.length=0,Hd(b,e,1),g=ee(xr)}let _=g;if(m&&p!==!1){const b=Object.keys(m),{shapeFlag:x}=_;b.length&&x&7&&(o&&b.some(Pm)&&(m=_I(m,o)),_=mi(_,m))}return r.dirs&&(_=mi(_),_.dirs=_.dirs?_.dirs.concat(r.dirs):r.dirs),r.transition&&(_.transition=r.transition),g=_,Xf(y),g}const yI=e=>{let t;for(const r in e)(r==="class"||r==="style"||Rd(r))&&((t||(t={}))[r]=e[r]);return t},_I=(e,t)=>{const r={};for(const n in e)(!Pm(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function bI(e,t,r){const{props:n,children:i,component:a}=e,{props:o,children:s,patchFlag:l}=t,u=a.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?a_(n,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let f=0;fe.__isSuspense;function SI(e,t){t&&t.pendingBranch?be(e)?t.effects.push(...e):t.effects.push(e):pI(e)}function At(e,t){if(It){let r=It.provides;const n=It.parent&&It.parent.provides;n===r&&(r=It.provides=Object.create(n)),r[e]=t}}function Ee(e,t,r=!1){const n=It||qt;if(n){const i=n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return r&&De(t)?t.call(n.proxy):t}}function io(e,t){return Wm(e,null,t)}const vc={};function Se(e,t,r){return Wm(e,t,r)}function Wm(e,t,{immediate:r,deep:n,flush:i,onTrack:a,onTrigger:o}=yt){const s=_C()===(It==null?void 0:It.scope)?It:null;let l,u=!1,c=!1;if(Ct(e)?(l=()=>e.value,u=Kf(e)):as(e)?(l=()=>e,n=!0):be(e)?(c=!0,u=e.some(_=>as(_)||Kf(_)),l=()=>e.map(_=>{if(Ct(_))return _.value;if(as(_))return Xa(_);if(De(_))return Zi(_,s,2)})):De(e)?t?l=()=>Zi(e,s,2):l=()=>{if(!(s&&s.isUnmounted))return f&&f(),rn(e,s,3,[d])}:l=ur,t&&n){const _=l;l=()=>Xa(_())}let f,d=_=>{f=m.onStop=()=>{Zi(_,s,4)}},h;if(uu)if(d=ur,t?r&&rn(t,s,3,[l(),c?[]:void 0,d]):l(),i==="sync"){const _=vO();h=_.__watcherHandles||(_.__watcherHandles=[])}else return ur;let v=c?new Array(e.length).fill(vc):vc;const p=()=>{if(m.active)if(t){const _=m.run();(n||u||(c?_.some((b,x)=>ru(b,v[x])):ru(_,v)))&&(f&&f(),rn(t,s,3,[_,v===vc?void 0:c&&v[0]===vc?[]:v,d]),v=_)}else m.run()};p.allowRecurse=!!t;let g;i==="sync"?g=p:i==="post"?g=()=>yr(p,s&&s.suspense):(p.pre=!0,s&&(p.id=s.uid),g=()=>zm(p));const m=new Om(l,g);t?r?p():v=m.run():i==="post"?yr(m.run.bind(m),s&&s.suspense):m.run();const y=()=>{m.stop(),s&&s.scope&&Lm(s.scope.effects,m)};return h&&h.push(y),y}function CI(e,t,r){const n=this.proxy,i=He(e)?e.includes(".")?GC(n,e):()=>n[e]:e.bind(n,n);let a;De(t)?a=t:(a=t.handler,r=t);const o=It;ps(this);const s=Wm(i,a.bind(n),r);return o?ps(o):ao(),s}function GC(e,t){const r=t.split(".");return()=>{let n=e;for(let i=0;i{Xa(r,t)});else if(yC(e))for(const r in e)Xa(e[r],t);return e}function UC(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return wt(()=>{e.isMounted=!0}),Xt(()=>{e.isUnmounting=!0}),e}const Wr=[Function,Array],TI={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Wr,onEnter:Wr,onAfterEnter:Wr,onEnterCancelled:Wr,onBeforeLeave:Wr,onLeave:Wr,onAfterLeave:Wr,onLeaveCancelled:Wr,onBeforeAppear:Wr,onAppear:Wr,onAfterAppear:Wr,onAppearCancelled:Wr},setup(e,{slots:t}){const r=ct(),n=UC();let i;return()=>{const a=t.default&&Vm(t.default(),!0);if(!a||!a.length)return;let o=a[0];if(a.length>1){for(const p of a)if(p.type!==xr){o=p;break}}const s=Ke(e),{mode:l}=s;if(n.isLeaving)return Oh(o);const u=o_(o);if(!u)return Oh(o);const c=ou(u,s,n,r);su(u,c);const f=r.subTree,d=f&&o_(f);let h=!1;const{getTransitionKey:v}=u.type;if(v){const p=v();i===void 0?i=p:p!==i&&(i=p,h=!0)}if(d&&d.type!==xr&&(!Ua(u,d)||h)){const p=ou(d,s,n,r);if(su(d,p),l==="out-in")return n.isLeaving=!0,p.afterLeave=()=>{n.isLeaving=!1,r.update.active!==!1&&r.update()},Oh(o);l==="in-out"&&u.type!==xr&&(p.delayLeave=(g,m,y)=>{const _=YC(n,d);_[String(d.key)]=d,g._leaveCb=()=>{m(),g._leaveCb=void 0,delete c.delayedLeave},c.delayedLeave=y})}return o}}},jC=TI;function YC(e,t){const{leavingVNodes:r}=e;let n=r.get(t.type);return n||(n=Object.create(null),r.set(t.type,n)),n}function ou(e,t,r,n){const{appear:i,mode:a,persisted:o=!1,onBeforeEnter:s,onEnter:l,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:f,onLeave:d,onAfterLeave:h,onLeaveCancelled:v,onBeforeAppear:p,onAppear:g,onAfterAppear:m,onAppearCancelled:y}=t,_=String(e.key),b=YC(r,e),x=(C,M)=>{C&&rn(C,n,9,M)},w=(C,M)=>{const P=M[1];x(C,M),be(C)?C.every(A=>A.length<=1)&&P():C.length<=1&&P()},S={mode:a,persisted:o,beforeEnter(C){let M=s;if(!r.isMounted)if(i)M=p||s;else return;C._leaveCb&&C._leaveCb(!0);const P=b[_];P&&Ua(e,P)&&P.el._leaveCb&&P.el._leaveCb(),x(M,[C])},enter(C){let M=l,P=u,A=c;if(!r.isMounted)if(i)M=g||l,P=m||u,A=y||c;else return;let T=!1;const D=C._enterCb=N=>{T||(T=!0,N?x(A,[C]):x(P,[C]),S.delayedLeave&&S.delayedLeave(),C._enterCb=void 0)};M?w(M,[C,D]):D()},leave(C,M){const P=String(e.key);if(C._enterCb&&C._enterCb(!0),r.isUnmounting)return M();x(f,[C]);let A=!1;const T=C._leaveCb=D=>{A||(A=!0,M(),D?x(v,[C]):x(h,[C]),C._leaveCb=void 0,b[P]===e&&delete b[P])};b[P]=e,d?w(d,[C,T]):T()},clone(C){return ou(C,t,r,n)}};return S}function Oh(e){if(Wd(e))return e=mi(e),e.children=null,e}function o_(e){return Wd(e)?e.children?e.children[0]:void 0:e}function su(e,t){e.shapeFlag&6&&e.component?su(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Vm(e,t=!1,r){let n=[],i=0;for(let a=0;a1)for(let a=0;a!!e.type.__asyncLoader,Wd=e=>e.type.__isKeepAlive;function MI(e,t){KC(e,"a",t)}function qC(e,t){KC(e,"da",t)}function KC(e,t,r=It){const n=e.__wdc||(e.__wdc=()=>{let i=r;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Vd(t,n,r),r){let i=r.parent;for(;i&&i.parent;)Wd(i.parent.vnode)&&AI(n,t,r,i),i=i.parent}}function AI(e,t,r,n){const i=Vd(t,e,n,!0);ks(()=>{Lm(n[t],i)},r)}function Vd(e,t,r=It,n=!1){if(r){const i=r[e]||(r[e]=[]),a=t.__weh||(t.__weh=(...o)=>{if(r.isUnmounted)return;Os(),ps(r);const s=rn(t,r,e,o);return ao(),Rs(),s});return n?i.unshift(a):i.push(a),a}}const Si=e=>(t,r=It)=>(!uu||e==="sp")&&Vd(e,(...n)=>t(...n),r),Gd=Si("bm"),wt=Si("m"),EI=Si("bu"),Hu=Si("u"),Xt=Si("bum"),ks=Si("um"),PI=Si("sp"),LI=Si("rtg"),DI=Si("rtc");function II(e,t=It){Vd("ec",e,t)}function nr(e,t){const r=qt;if(r===null)return e;const n=jd(r)||r.proxy,i=e.dirs||(e.dirs=[]);for(let a=0;at(o,s,void 0,a&&a[s]));else{const o=Object.keys(e);i=new Array(o.length);for(let s=0,l=o.length;sta(t)?!(t.type===xr||t.type===pt&&!QC(t.children)):!0)?e:null}function RI(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:yf(n)]=e[n];return r}const Ap=e=>e?uT(e)?jd(e)||e.proxy:Ap(e.parent):null,Pl=Gt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ap(e.parent),$root:e=>Ap(e.root),$emit:e=>e.emit,$options:e=>jm(e),$forceUpdate:e=>e.f||(e.f=()=>zm(e.update)),$nextTick:e=>e.n||(e.n=Ft.bind(e.proxy)),$watch:e=>CI.bind(e)}),Rh=(e,t)=>e!==yt&&!e.__isScriptSetup&&We(e,t),kI={get({_:e},t){const{ctx:r,setupState:n,data:i,props:a,accessCache:o,type:s,appContext:l}=e;let u;if(t[0]!=="$"){const h=o[t];if(h!==void 0)switch(h){case 1:return n[t];case 2:return i[t];case 4:return r[t];case 3:return a[t]}else{if(Rh(n,t))return o[t]=1,n[t];if(i!==yt&&We(i,t))return o[t]=2,i[t];if((u=e.propsOptions[0])&&We(u,t))return o[t]=3,a[t];if(r!==yt&&We(r,t))return o[t]=4,r[t];Ep&&(o[t]=0)}}const c=Pl[t];let f,d;if(c)return t==="$attrs"&&Mr(e,"get",t),c(e);if((f=s.__cssModules)&&(f=f[t]))return f;if(r!==yt&&We(r,t))return o[t]=4,r[t];if(d=l.config.globalProperties,We(d,t))return d[t]},set({_:e},t,r){const{data:n,setupState:i,ctx:a}=e;return Rh(i,t)?(i[t]=r,!0):n!==yt&&We(n,t)?(n[t]=r,!0):We(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:i,propsOptions:a}},o){let s;return!!r[o]||e!==yt&&We(e,o)||Rh(t,o)||(s=a[0])&&We(s,o)||We(n,o)||We(Pl,o)||We(i.config.globalProperties,o)},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:We(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}};let Ep=!0;function NI(e){const t=jm(e),r=e.proxy,n=e.ctx;Ep=!1,t.beforeCreate&&u_(t.beforeCreate,e,"bc");const{data:i,computed:a,methods:o,watch:s,provide:l,inject:u,created:c,beforeMount:f,mounted:d,beforeUpdate:h,updated:v,activated:p,deactivated:g,beforeDestroy:m,beforeUnmount:y,destroyed:_,unmounted:b,render:x,renderTracked:w,renderTriggered:S,errorCaptured:C,serverPrefetch:M,expose:P,inheritAttrs:A,components:T,directives:D,filters:N}=t;if(u&&FI(u,n,null,e.appContext.config.unwrapInjectedRef),o)for(const G in o){const F=o[G];De(F)&&(n[G]=F.bind(r))}if(i){const G=i.call(r,r);Xe(G)&&(e.data=fn(G))}if(Ep=!0,a)for(const G in a){const F=a[G],R=De(F)?F.bind(r,r):De(F.get)?F.get.bind(r,r):ur,j=!De(F)&&De(F.set)?F.set.bind(r):ur,re=k({get:R,set:j});Object.defineProperty(n,G,{enumerable:!0,configurable:!0,get:()=>re.value,set:oe=>re.value=oe})}if(s)for(const G in s)JC(s[G],n,r,G);if(l){const G=De(l)?l.call(r):l;Reflect.ownKeys(G).forEach(F=>{At(F,G[F])})}c&&u_(c,e,"c");function $(G,F){be(F)?F.forEach(R=>G(R.bind(r))):F&&G(F.bind(r))}if($(Gd,f),$(wt,d),$(EI,h),$(Hu,v),$(MI,p),$(qC,g),$(II,C),$(DI,w),$(LI,S),$(Xt,y),$(ks,b),$(PI,M),be(P))if(P.length){const G=e.exposed||(e.exposed={});P.forEach(F=>{Object.defineProperty(G,F,{get:()=>r[F],set:R=>r[F]=R})})}else e.exposed||(e.exposed={});x&&e.render===ur&&(e.render=x),A!=null&&(e.inheritAttrs=A),T&&(e.components=T),D&&(e.directives=D)}function FI(e,t,r=ur,n=!1){be(e)&&(e=Pp(e));for(const i in e){const a=e[i];let o;Xe(a)?"default"in a?o=Ee(a.from||i,a.default,!0):o=Ee(a.from||i):o=Ee(a),Ct(o)&&n?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:s=>o.value=s}):t[i]=o}}function u_(e,t,r){rn(be(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function JC(e,t,r,n){const i=n.includes(".")?GC(r,n):()=>r[n];if(He(e)){const a=t[e];De(a)&&Se(i,a)}else if(De(e))Se(i,e.bind(r));else if(Xe(e))if(be(e))e.forEach(a=>JC(a,t,r,n));else{const a=De(e.handler)?e.handler.bind(r):t[e.handler];De(a)&&Se(i,a,e)}}function jm(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t);let l;return s?l=s:!i.length&&!r&&!n?l=t:(l={},i.length&&i.forEach(u=>Zf(l,u,o,!0)),Zf(l,t,o)),Xe(t)&&a.set(t,l),l}function Zf(e,t,r,n=!1){const{mixins:i,extends:a}=t;a&&Zf(e,a,r,!0),i&&i.forEach(o=>Zf(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const s=BI[o]||r&&r[o];e[o]=s?s(e[o],t[o]):t[o]}return e}const BI={data:c_,props:za,emits:za,methods:za,computed:za,beforeCreate:ir,created:ir,beforeMount:ir,mounted:ir,beforeUpdate:ir,updated:ir,beforeDestroy:ir,beforeUnmount:ir,destroyed:ir,unmounted:ir,activated:ir,deactivated:ir,errorCaptured:ir,serverPrefetch:ir,components:za,directives:za,watch:HI,provide:c_,inject:$I};function c_(e,t){return t?e?function(){return Gt(De(e)?e.call(this,this):e,De(t)?t.call(this,this):t)}:t:e}function $I(e,t){return za(Pp(e),Pp(t))}function Pp(e){if(be(e)){const t={};for(let r=0;r0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let f=0;f{l=!0;const[d,h]=tT(f,t,!0);Gt(o,d),h&&s.push(...h)};!r&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!a&&!l)return Xe(e)&&n.set(e,ns),ns;if(be(a))for(let c=0;c-1,h[1]=p<0||v-1||We(h,"default"))&&s.push(f)}}}const u=[o,s];return Xe(e)&&n.set(e,u),u}function f_(e){return e[0]!=="$"}function d_(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function h_(e,t){return d_(e)===d_(t)}function v_(e,t){return be(t)?t.findIndex(r=>h_(r,e)):De(t)&&h_(t,e)?0:-1}const rT=e=>e[0]==="_"||e==="$stable",Ym=e=>be(e)?e.map(Bn):[Bn(e)],VI=(e,t,r)=>{if(t._n)return t;const n=Z((...i)=>Ym(t(...i)),r);return n._c=!1,n},nT=(e,t,r)=>{const n=e._ctx;for(const i in e){if(rT(i))continue;const a=e[i];if(De(a))t[i]=VI(i,a,n);else if(a!=null){const o=Ym(a);t[i]=()=>o}}},iT=(e,t)=>{const r=Ym(t);e.slots.default=()=>r},GI=(e,t)=>{if(e.vnode.shapeFlag&32){const r=t._;r?(e.slots=Ke(t),Yf(t,"_",r)):nT(t,e.slots={})}else e.slots={},t&&iT(e,t);Yf(e.slots,Ud,1)},UI=(e,t,r)=>{const{vnode:n,slots:i}=e;let a=!0,o=yt;if(n.shapeFlag&32){const s=t._;s?r&&s===1?a=!1:(Gt(i,t),!r&&s===1&&delete i._):(a=!t.$stable,nT(t,i)),o=t}else t&&(iT(e,t),o={default:1});if(a)for(const s in i)!rT(s)&&!(s in o)&&delete i[s]};function aT(){return{app:null,config:{isNativeTag:wD,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let jI=0;function YI(e,t){return function(n,i=null){De(n)||(n=Object.assign({},n)),i!=null&&!Xe(i)&&(i=null);const a=aT(),o=new Set;let s=!1;const l=a.app={_uid:jI++,_component:n,_props:i,_container:null,_context:a,_instance:null,version:pO,get config(){return a.config},set config(u){},use(u,...c){return o.has(u)||(u&&De(u.install)?(o.add(u),u.install(l,...c)):De(u)&&(o.add(u),u(l,...c))),l},mixin(u){return a.mixins.includes(u)||a.mixins.push(u),l},component(u,c){return c?(a.components[u]=c,l):a.components[u]},directive(u,c){return c?(a.directives[u]=c,l):a.directives[u]},mount(u,c,f){if(!s){const d=ee(n,i);return d.appContext=a,c&&t?t(d,u):e(d,u,f),s=!0,l._container=u,u.__vue_app__=l,jd(d.component)||d.component.proxy}},unmount(){s&&(e(null,l._container),delete l._container.__vue_app__)},provide(u,c){return a.provides[u]=c,l}};return l}}function Dp(e,t,r,n,i=!1){if(be(e)){e.forEach((d,h)=>Dp(d,t&&(be(t)?t[h]:t),r,n,i));return}if(El(n)&&!i)return;const a=n.shapeFlag&4?jd(n.component)||n.component.proxy:n.el,o=i?null:a,{i:s,r:l}=e,u=t&&t.r,c=s.refs===yt?s.refs={}:s.refs,f=s.setupState;if(u!=null&&u!==l&&(He(u)?(c[u]=null,We(f,u)&&(f[u]=null)):Ct(u)&&(u.value=null)),De(l))Zi(l,s,12,[o,c]);else{const d=He(l),h=Ct(l);if(d||h){const v=()=>{if(e.f){const p=d?We(f,l)?f[l]:c[l]:l.value;i?be(p)&&Lm(p,a):be(p)?p.includes(a)||p.push(a):d?(c[l]=[a],We(f,l)&&(f[l]=c[l])):(l.value=[a],e.k&&(c[e.k]=l.value))}else d?(c[l]=o,We(f,l)&&(f[l]=o)):h&&(l.value=o,e.k&&(c[e.k]=o))};o?(v.id=-1,yr(v,r)):v()}}}const yr=SI;function qI(e){return KI(e)}function KI(e,t){const r=PD();r.__VUE__=!0;const{insert:n,remove:i,patchProp:a,createElement:o,createText:s,createComment:l,setText:u,setElementText:c,parentNode:f,nextSibling:d,setScopeId:h=ur,insertStaticContent:v}=e,p=(L,I,z,U=null,K=null,ne=null,fe=!1,te=null,ie=!!I.dynamicChildren)=>{if(L===I)return;L&&!Ua(L,I)&&(U=W(L),oe(L,K,ne,!0),L=null),I.patchFlag===-2&&(ie=!1,I.dynamicChildren=null);const{type:X,ref:we,shapeFlag:he}=I;switch(X){case Ns:g(L,I,z,U);break;case xr:m(L,I,z,U);break;case kh:L==null&&y(I,z,U,fe);break;case pt:T(L,I,z,U,K,ne,fe,te,ie);break;default:he&1?x(L,I,z,U,K,ne,fe,te,ie):he&6?D(L,I,z,U,K,ne,fe,te,ie):(he&64||he&128)&&X.process(L,I,z,U,K,ne,fe,te,ie,le)}we!=null&&K&&Dp(we,L&&L.ref,ne,I||L,!I)},g=(L,I,z,U)=>{if(L==null)n(I.el=s(I.children),z,U);else{const K=I.el=L.el;I.children!==L.children&&u(K,I.children)}},m=(L,I,z,U)=>{L==null?n(I.el=l(I.children||""),z,U):I.el=L.el},y=(L,I,z,U)=>{[L.el,L.anchor]=v(L.children,I,z,U,L.el,L.anchor)},_=({el:L,anchor:I},z,U)=>{let K;for(;L&&L!==I;)K=d(L),n(L,z,U),L=K;n(I,z,U)},b=({el:L,anchor:I})=>{let z;for(;L&&L!==I;)z=d(L),i(L),L=z;i(I)},x=(L,I,z,U,K,ne,fe,te,ie)=>{fe=fe||I.type==="svg",L==null?w(I,z,U,K,ne,fe,te,ie):M(L,I,K,ne,fe,te,ie)},w=(L,I,z,U,K,ne,fe,te)=>{let ie,X;const{type:we,props:he,shapeFlag:xe,transition:Oe,dirs:ze}=L;if(ie=L.el=o(L.type,ne,he&&he.is,he),xe&8?c(ie,L.children):xe&16&&C(L.children,ie,null,U,K,ne&&we!=="foreignObject",fe,te),ze&&ha(L,null,U,"created"),S(ie,L,L.scopeId,fe,U),he){for(const Je in he)Je!=="value"&&!mf(Je)&&a(ie,Je,null,he[Je],ne,L.children,U,K,Q);"value"in he&&a(ie,"value",null,he.value),(X=he.onVnodeBeforeMount)&&On(X,U,L)}ze&&ha(L,null,U,"beforeMount");const rt=(!K||K&&!K.pendingBranch)&&Oe&&!Oe.persisted;rt&&Oe.beforeEnter(ie),n(ie,I,z),((X=he&&he.onVnodeMounted)||rt||ze)&&yr(()=>{X&&On(X,U,L),rt&&Oe.enter(ie),ze&&ha(L,null,U,"mounted")},K)},S=(L,I,z,U,K)=>{if(z&&h(L,z),U)for(let ne=0;ne{for(let X=ie;X{const te=I.el=L.el;let{patchFlag:ie,dynamicChildren:X,dirs:we}=I;ie|=L.patchFlag&16;const he=L.props||yt,xe=I.props||yt;let Oe;z&&va(z,!1),(Oe=xe.onVnodeBeforeUpdate)&&On(Oe,z,I,L),we&&ha(I,L,z,"beforeUpdate"),z&&va(z,!0);const ze=K&&I.type!=="foreignObject";if(X?P(L.dynamicChildren,X,te,z,U,ze,ne):fe||F(L,I,te,null,z,U,ze,ne,!1),ie>0){if(ie&16)A(te,I,he,xe,z,U,K);else if(ie&2&&he.class!==xe.class&&a(te,"class",null,xe.class,K),ie&4&&a(te,"style",he.style,xe.style,K),ie&8){const rt=I.dynamicProps;for(let Je=0;Je{Oe&&On(Oe,z,I,L),we&&ha(I,L,z,"updated")},U)},P=(L,I,z,U,K,ne,fe)=>{for(let te=0;te{if(z!==U){if(z!==yt)for(const te in z)!mf(te)&&!(te in U)&&a(L,te,z[te],null,fe,I.children,K,ne,Q);for(const te in U){if(mf(te))continue;const ie=U[te],X=z[te];ie!==X&&te!=="value"&&a(L,te,X,ie,fe,I.children,K,ne,Q)}"value"in U&&a(L,"value",z.value,U.value)}},T=(L,I,z,U,K,ne,fe,te,ie)=>{const X=I.el=L?L.el:s(""),we=I.anchor=L?L.anchor:s("");let{patchFlag:he,dynamicChildren:xe,slotScopeIds:Oe}=I;Oe&&(te=te?te.concat(Oe):Oe),L==null?(n(X,z,U),n(we,z,U),C(I.children,z,we,K,ne,fe,te,ie)):he>0&&he&64&&xe&&L.dynamicChildren?(P(L.dynamicChildren,xe,z,K,ne,fe,te),(I.key!=null||K&&I===K.subTree)&&qm(L,I,!0)):F(L,I,z,we,K,ne,fe,te,ie)},D=(L,I,z,U,K,ne,fe,te,ie)=>{I.slotScopeIds=te,L==null?I.shapeFlag&512?K.ctx.activate(I,z,U,fe,ie):N(I,z,U,K,ne,fe,ie):H(L,I,ie)},N=(L,I,z,U,K,ne,fe)=>{const te=L.component=oO(L,U,K);if(Wd(L)&&(te.ctx.renderer=le),sO(te),te.asyncDep){if(K&&K.registerDep(te,$),!L.el){const ie=te.subTree=ee(xr);m(null,ie,I,z)}return}$(te,L,I,z,K,ne,fe)},H=(L,I,z)=>{const U=I.component=L.component;if(bI(L,I,z))if(U.asyncDep&&!U.asyncResolved){G(U,I,z);return}else U.next=I,vI(U.update),U.update();else I.el=L.el,U.vnode=I},$=(L,I,z,U,K,ne,fe)=>{const te=()=>{if(L.isMounted){let{next:we,bu:he,u:xe,parent:Oe,vnode:ze}=L,rt=we,Je;va(L,!1),we?(we.el=ze.el,G(L,we,fe)):we=ze,he&&_f(he),(Je=we.props&&we.props.onVnodeBeforeUpdate)&&On(Je,Oe,we,ze),va(L,!0);const Lt=Ih(L),ve=L.subTree;L.subTree=Lt,p(ve,Lt,f(ve.el),W(ve),L,K,ne),we.el=Lt.el,rt===null&&wI(L,Lt.el),xe&&yr(xe,K),(Je=we.props&&we.props.onVnodeUpdated)&&yr(()=>On(Je,Oe,we,ze),K)}else{let we;const{el:he,props:xe}=I,{bm:Oe,m:ze,parent:rt}=L,Je=El(I);if(va(L,!1),Oe&&_f(Oe),!Je&&(we=xe&&xe.onVnodeBeforeMount)&&On(we,rt,I),va(L,!0),he&&J){const Lt=()=>{L.subTree=Ih(L),J(he,L.subTree,L,K,null)};Je?I.type.__asyncLoader().then(()=>!L.isUnmounted&&Lt()):Lt()}else{const Lt=L.subTree=Ih(L);p(null,Lt,z,U,L,K,ne),I.el=Lt.el}if(ze&&yr(ze,K),!Je&&(we=xe&&xe.onVnodeMounted)){const Lt=I;yr(()=>On(we,rt,Lt),K)}(I.shapeFlag&256||rt&&El(rt.vnode)&&rt.vnode.shapeFlag&256)&&L.a&&yr(L.a,K),L.isMounted=!0,I=z=U=null}},ie=L.effect=new Om(te,()=>zm(X),L.scope),X=L.update=()=>ie.run();X.id=L.uid,va(L,!0),X()},G=(L,I,z)=>{I.component=L;const U=L.vnode.props;L.vnode=I,L.next=null,WI(L,I.props,U,z),UI(L,I.children,z),Os(),i_(),Rs()},F=(L,I,z,U,K,ne,fe,te,ie=!1)=>{const X=L&&L.children,we=L?L.shapeFlag:0,he=I.children,{patchFlag:xe,shapeFlag:Oe}=I;if(xe>0){if(xe&128){j(X,he,z,U,K,ne,fe,te,ie);return}else if(xe&256){R(X,he,z,U,K,ne,fe,te,ie);return}}Oe&8?(we&16&&Q(X,K,ne),he!==X&&c(z,he)):we&16?Oe&16?j(X,he,z,U,K,ne,fe,te,ie):Q(X,K,ne,!0):(we&8&&c(z,""),Oe&16&&C(he,z,U,K,ne,fe,te,ie))},R=(L,I,z,U,K,ne,fe,te,ie)=>{L=L||ns,I=I||ns;const X=L.length,we=I.length,he=Math.min(X,we);let xe;for(xe=0;xewe?Q(L,K,ne,!0,!1,he):C(I,z,U,K,ne,fe,te,ie,he)},j=(L,I,z,U,K,ne,fe,te,ie)=>{let X=0;const we=I.length;let he=L.length-1,xe=we-1;for(;X<=he&&X<=xe;){const Oe=L[X],ze=I[X]=ie?Vi(I[X]):Bn(I[X]);if(Ua(Oe,ze))p(Oe,ze,z,null,K,ne,fe,te,ie);else break;X++}for(;X<=he&&X<=xe;){const Oe=L[he],ze=I[xe]=ie?Vi(I[xe]):Bn(I[xe]);if(Ua(Oe,ze))p(Oe,ze,z,null,K,ne,fe,te,ie);else break;he--,xe--}if(X>he){if(X<=xe){const Oe=xe+1,ze=Oexe)for(;X<=he;)oe(L[X],K,ne,!0),X++;else{const Oe=X,ze=X,rt=new Map;for(X=ze;X<=xe;X++){const it=I[X]=ie?Vi(I[X]):Bn(I[X]);it.key!=null&&rt.set(it.key,X)}let Je,Lt=0;const ve=xe-ze+1;let Pe=!1,je=0;const Be=new Array(ve);for(X=0;X=ve){oe(it,K,ne,!0);continue}let Mt;if(it.key!=null)Mt=rt.get(it.key);else for(Je=ze;Je<=xe;Je++)if(Be[Je-ze]===0&&Ua(it,I[Je])){Mt=Je;break}Mt===void 0?oe(it,K,ne,!0):(Be[Mt-ze]=X+1,Mt>=je?je=Mt:Pe=!0,p(it,I[Mt],z,null,K,ne,fe,te,ie),Lt++)}const nt=Pe?XI(Be):ns;for(Je=nt.length-1,X=ve-1;X>=0;X--){const it=ze+X,Mt=I[it],ri=it+1{const{el:ne,type:fe,transition:te,children:ie,shapeFlag:X}=L;if(X&6){re(L.component.subTree,I,z,U);return}if(X&128){L.suspense.move(I,z,U);return}if(X&64){fe.move(L,I,z,le);return}if(fe===pt){n(ne,I,z);for(let he=0;hete.enter(ne),K);else{const{leave:he,delayLeave:xe,afterLeave:Oe}=te,ze=()=>n(ne,I,z),rt=()=>{he(ne,()=>{ze(),Oe&&Oe()})};xe?xe(ne,ze,rt):rt()}else n(ne,I,z)},oe=(L,I,z,U=!1,K=!1)=>{const{type:ne,props:fe,ref:te,children:ie,dynamicChildren:X,shapeFlag:we,patchFlag:he,dirs:xe}=L;if(te!=null&&Dp(te,null,z,L,!0),we&256){I.ctx.deactivate(L);return}const Oe=we&1&&xe,ze=!El(L);let rt;if(ze&&(rt=fe&&fe.onVnodeBeforeUnmount)&&On(rt,I,L),we&6)V(L.component,z,U);else{if(we&128){L.suspense.unmount(z,U);return}Oe&&ha(L,null,I,"beforeUnmount"),we&64?L.type.remove(L,I,z,K,le,U):X&&(ne!==pt||he>0&&he&64)?Q(X,I,z,!1,!0):(ne===pt&&he&384||!K&&we&16)&&Q(ie,I,z),U&&ye(L)}(ze&&(rt=fe&&fe.onVnodeUnmounted)||Oe)&&yr(()=>{rt&&On(rt,I,L),Oe&&ha(L,null,I,"unmounted")},z)},ye=L=>{const{type:I,el:z,anchor:U,transition:K}=L;if(I===pt){Ae(z,U);return}if(I===kh){b(L);return}const ne=()=>{i(z),K&&!K.persisted&&K.afterLeave&&K.afterLeave()};if(L.shapeFlag&1&&K&&!K.persisted){const{leave:fe,delayLeave:te}=K,ie=()=>fe(z,ne);te?te(L.el,ne,ie):ie()}else ne()},Ae=(L,I)=>{let z;for(;L!==I;)z=d(L),i(L),L=z;i(I)},V=(L,I,z)=>{const{bum:U,scope:K,update:ne,subTree:fe,um:te}=L;U&&_f(U),K.stop(),ne&&(ne.active=!1,oe(fe,L,I,z)),te&&yr(te,I),yr(()=>{L.isUnmounted=!0},I),I&&I.pendingBranch&&!I.isUnmounted&&L.asyncDep&&!L.asyncResolved&&L.suspenseId===I.pendingId&&(I.deps--,I.deps===0&&I.resolve())},Q=(L,I,z,U=!1,K=!1,ne=0)=>{for(let fe=ne;feL.shapeFlag&6?W(L.component.subTree):L.shapeFlag&128?L.suspense.next():d(L.anchor||L.el),q=(L,I,z)=>{L==null?I._vnode&&oe(I._vnode,null,null,!0):p(I._vnode||null,L,I,null,null,null,z),i_(),HC(),I._vnode=L},le={p,um:oe,m:re,r:ye,mt:N,mc:C,pc:F,pbc:P,n:W,o:e};let de,J;return t&&([de,J]=t(le)),{render:q,hydrate:de,createApp:YI(q,de)}}function va({effect:e,update:t},r){e.allowRecurse=t.allowRecurse=r}function qm(e,t,r=!1){const n=e.children,i=t.children;if(be(n)&&be(i))for(let a=0;a>1,e[r[s]]0&&(t[n]=r[a-1]),r[a]=n)}}for(a=r.length,o=r[a-1];a-- >0;)r[a]=o,o=t[o];return r}const ZI=e=>e.__isTeleport,Ll=e=>e&&(e.disabled||e.disabled===""),p_=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Ip=(e,t)=>{const r=e&&e.to;return He(r)?t?t(r):null:r},QI={__isTeleport:!0,process(e,t,r,n,i,a,o,s,l,u){const{mc:c,pc:f,pbc:d,o:{insert:h,querySelector:v,createText:p,createComment:g}}=u,m=Ll(t.props);let{shapeFlag:y,children:_,dynamicChildren:b}=t;if(e==null){const x=t.el=p(""),w=t.anchor=p("");h(x,r,n),h(w,r,n);const S=t.target=Ip(t.props,v),C=t.targetAnchor=p("");S&&(h(C,S),o=o||p_(S));const M=(P,A)=>{y&16&&c(_,P,A,i,a,o,s,l)};m?M(r,w):S&&M(S,C)}else{t.el=e.el;const x=t.anchor=e.anchor,w=t.target=e.target,S=t.targetAnchor=e.targetAnchor,C=Ll(e.props),M=C?r:w,P=C?x:S;if(o=o||p_(w),b?(d(e.dynamicChildren,b,M,i,a,o,s),qm(e,t,!0)):l||f(e,t,M,P,i,a,o,s,!1),m)C||pc(t,r,x,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const A=t.target=Ip(t.props,v);A&&pc(t,A,null,u,0)}else C&&pc(t,w,S,u,1)}oT(t)},remove(e,t,r,n,{um:i,o:{remove:a}},o){const{shapeFlag:s,children:l,anchor:u,targetAnchor:c,target:f,props:d}=e;if(f&&a(c),(o||!Ll(d))&&(a(u),s&16))for(let h=0;h0?wn||ns:null,tO(),lu>0&&wn&&wn.push(e),e}function me(e,t,r,n,i,a){return sT(ae(e,t,r,n,i,a,!0))}function _e(e,t,r,n,i){return sT(ee(e,t,r,n,i,!0))}function ta(e){return e?e.__v_isVNode===!0:!1}function Ua(e,t){return e.type===t.type&&e.key===t.key}const Ud="__vInternal",lT=({key:e})=>e??null,bf=({ref:e,ref_key:t,ref_for:r})=>e!=null?He(e)||Ct(e)||De(e)?{i:qt,r:e,k:t,f:!!r}:e:null;function ae(e,t=null,r=null,n=0,i=null,a=e===pt?0:1,o=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&lT(t),ref:t&&bf(t),scopeId:VC,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:qt};return s?(Km(l,r),a&128&&e.normalize(l)):r&&(l.shapeFlag|=He(r)?8:16),lu>0&&!o&&wn&&(l.patchFlag>0||a&6)&&l.patchFlag!==32&&wn.push(l),l}const ee=rO;function rO(e,t=null,r=null,n=0,i=null,a=!1){if((!e||e===XC)&&(e=xr),ta(e)){const s=mi(e,t,!0);return r&&Km(s,r),lu>0&&!a&&wn&&(s.shapeFlag&6?wn[wn.indexOf(e)]=s:wn.push(s)),s.patchFlag|=-2,s}if(fO(e)&&(e=e.__vccOpts),t){t=nO(t);let{class:s,style:l}=t;s&&!He(s)&&(t.class=ue(s)),Xe(l)&&(DC(l)&&!be(l)&&(l=Gt({},l)),t.style=St(l))}const o=He(e)?1:xI(e)?128:ZI(e)?64:Xe(e)?4:De(e)?2:0;return ae(e,t,r,n,i,o,a,!0)}function nO(e){return e?DC(e)||Ud in e?Gt({},e):e:null}function mi(e,t,r=!1){const{props:n,ref:i,patchFlag:a,children:o}=e,s=t?ca(n||{},t):n;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:s,key:s&&lT(s),ref:t&&t.ref?r&&i?be(i)?i.concat(bf(t)):[i,bf(t)]:bf(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==pt?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&mi(e.ssContent),ssFallback:e.ssFallback&&mi(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Bt(e=" ",t=0){return ee(Ns,null,e,t)}function Fe(e="",t=!1){return t?(Y(),_e(xr,null,e)):ee(xr,null,e)}function Bn(e){return e==null||typeof e=="boolean"?ee(xr):be(e)?ee(pt,null,e.slice()):typeof e=="object"?Vi(e):ee(Ns,null,String(e))}function Vi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:mi(e)}function Km(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(be(t))r=16;else if(typeof t=="object")if(n&65){const i=t.default;i&&(i._c&&(i._d=!1),Km(e,i()),i._c&&(i._d=!0));return}else{r=32;const i=t._;!i&&!(Ud in t)?t._ctx=qt:i===3&&qt&&(qt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else De(t)?(t={default:t,_ctx:qt},r=32):(t=String(t),n&64?(r=16,t=[Bt(t)]):r=8);e.children=t,e.shapeFlag|=r}function ca(...e){const t={};for(let r=0;rIt||qt,ps=e=>{It=e,e.scope.on()},ao=()=>{It&&It.scope.off(),It=null};function uT(e){return e.vnode.shapeFlag&4}let uu=!1;function sO(e,t=!1){uu=t;const{props:r,children:n}=e.vnode,i=uT(e);zI(e,r,i,t),GI(e,n);const a=i?lO(e,t):void 0;return uu=!1,a}function lO(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=IC(new Proxy(e.ctx,kI));const{setup:n}=r;if(n){const i=e.setupContext=n.length>1?fT(e):null;ps(e),Os();const a=Zi(n,e,0,[e.props,i]);if(Rs(),ao(),jf(a)){if(a.then(ao,ao),t)return a.then(o=>{m_(e,o,t)}).catch(o=>{Hd(o,e,0)});e.asyncDep=a}else m_(e,a,t)}else cT(e,t)}function m_(e,t,r){De(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Xe(t)&&(e.setupState=NC(t)),cT(e,r)}let y_;function cT(e,t,r){const n=e.type;if(!e.render){if(!t&&y_&&!n.render){const i=n.template||jm(e).template;if(i){const{isCustomElement:a,compilerOptions:o}=e.appContext.config,{delimiters:s,compilerOptions:l}=n,u=Gt(Gt({isCustomElement:a,delimiters:s},o),l);n.render=y_(i,u)}}e.render=n.render||ur}ps(e),Os(),NI(e),Rs(),ao()}function uO(e){return new Proxy(e.attrs,{get(t,r){return Mr(e,"get","$attrs"),t[r]}})}function fT(e){const t=n=>{e.exposed=n||{}};let r;return{get attrs(){return r||(r=uO(e))},slots:e.slots,emit:e.emit,expose:t}}function jd(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(NC(IC(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in Pl)return Pl[r](e)},has(t,r){return r in t||r in Pl}}))}function cO(e,t=!0){return De(e)?e.displayName||e.name:e.name||t&&e.__name}function fO(e){return De(e)&&"__vccOpts"in e}const k=(e,t)=>cI(e,t,uu);function Yd(){return dO().slots}function dO(){const e=ct();return e.setupContext||(e.setupContext=fT(e))}function Ce(e,t,r){const n=arguments.length;return n===2?Xe(t)&&!be(t)?ta(t)?ee(e,null,[t]):ee(e,t):ee(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&ta(r)&&(r=[r]),ee(e,t,r))}const hO=Symbol(""),vO=()=>Ee(hO),pO="3.2.47",gO="http://www.w3.org/2000/svg",ja=typeof document<"u"?document:null,__=ja&&ja.createElement("template"),mO={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const i=t?ja.createElementNS(gO,e):ja.createElement(e,r?{is:r}:void 0);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>ja.createTextNode(e),createComment:e=>ja.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ja.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,i,a){const o=r?r.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),r),!(i===a||!(i=i.nextSibling)););else{__.innerHTML=n?`${e}`:e;const s=__.content;if(n){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}t.insertBefore(s,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}};function yO(e,t,r){const n=e._vtc;n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}function _O(e,t,r){const n=e.style,i=He(r);if(r&&!i){if(t&&!He(t))for(const a in t)r[a]==null&&Op(n,a,"");for(const a in r)Op(n,a,r[a])}else{const a=n.display;i?t!==r&&(n.cssText=r):t&&e.removeAttribute("style"),"_vod"in e&&(n.display=a)}}const b_=/\s*!important$/;function Op(e,t,r){if(be(r))r.forEach(n=>Op(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=bO(e,t);b_.test(r)?e.setProperty(xo(n),r.replace(b_,""),"important"):e[n]=r}}const w_=["Webkit","Moz","ms"],Nh={};function bO(e,t){const r=Nh[t];if(r)return r;let n=An(t);if(n!=="filter"&&n in e)return Nh[t]=n;n=Fd(n);for(let i=0;iFh||(MO.then(()=>Fh=0),Fh=Date.now());function EO(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;rn(PO(n,r.value),t,5,[n])};return r.value=e,r.attached=AO(),r}function PO(e,t){if(be(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(n=>i=>!i._stopped&&n&&n(i))}else return t}const C_=/^on[a-z]/,LO=(e,t,r,n,i=!1,a,o,s,l)=>{t==="class"?yO(e,n,i):t==="style"?_O(e,r,n):Rd(t)?Pm(t)||CO(e,t,r,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):DO(e,t,n,i))?xO(e,t,n,a,o,s,l):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),wO(e,t,n,i))};function DO(e,t,r,n){return n?!!(t==="innerHTML"||t==="textContent"||t in e&&C_.test(t)&&De(r)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||C_.test(t)&&He(r)?!1:t in e}const Li="transition",Ys="animation",Ci=(e,{slots:t})=>Ce(jC,vT(e),t);Ci.displayName="Transition";const hT={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},IO=Ci.props=Gt({},jC.props,hT),pa=(e,t=[])=>{be(e)?e.forEach(r=>r(...t)):e&&e(...t)},T_=e=>e?be(e)?e.some(t=>t.length>1):e.length>1:!1;function vT(e){const t={};for(const T in e)T in hT||(t[T]=e[T]);if(e.css===!1)return t;const{name:r="v",type:n,duration:i,enterFromClass:a=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:s=`${r}-enter-to`,appearFromClass:l=a,appearActiveClass:u=o,appearToClass:c=s,leaveFromClass:f=`${r}-leave-from`,leaveActiveClass:d=`${r}-leave-active`,leaveToClass:h=`${r}-leave-to`}=e,v=OO(i),p=v&&v[0],g=v&&v[1],{onBeforeEnter:m,onEnter:y,onEnterCancelled:_,onLeave:b,onLeaveCancelled:x,onBeforeAppear:w=m,onAppear:S=y,onAppearCancelled:C=_}=t,M=(T,D,N)=>{Bi(T,D?c:s),Bi(T,D?u:o),N&&N()},P=(T,D)=>{T._isLeaving=!1,Bi(T,f),Bi(T,h),Bi(T,d),D&&D()},A=T=>(D,N)=>{const H=T?S:y,$=()=>M(D,T,N);pa(H,[D,$]),M_(()=>{Bi(D,T?l:a),li(D,T?c:s),T_(H)||A_(D,n,p,$)})};return Gt(t,{onBeforeEnter(T){pa(m,[T]),li(T,a),li(T,o)},onBeforeAppear(T){pa(w,[T]),li(T,l),li(T,u)},onEnter:A(!1),onAppear:A(!0),onLeave(T,D){T._isLeaving=!0;const N=()=>P(T,D);li(T,f),gT(),li(T,d),M_(()=>{T._isLeaving&&(Bi(T,f),li(T,h),T_(b)||A_(T,n,g,N))}),pa(b,[T,N])},onEnterCancelled(T){M(T,!1),pa(_,[T])},onAppearCancelled(T){M(T,!0),pa(C,[T])},onLeaveCancelled(T){P(T),pa(x,[T])}})}function OO(e){if(e==null)return null;if(Xe(e))return[Bh(e.enter),Bh(e.leave)];{const t=Bh(e);return[t,t]}}function Bh(e){return ED(e)}function li(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e._vtc||(e._vtc=new Set)).add(t)}function Bi(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const{_vtc:r}=e;r&&(r.delete(t),r.size||(e._vtc=void 0))}function M_(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let RO=0;function A_(e,t,r,n){const i=e._endId=++RO,a=()=>{i===e._endId&&n()};if(r)return setTimeout(a,r);const{type:o,timeout:s,propCount:l}=pT(e,t);if(!o)return n();const u=o+"end";let c=0;const f=()=>{e.removeEventListener(u,d),a()},d=h=>{h.target===e&&++c>=l&&f()};setTimeout(()=>{c(r[v]||"").split(", "),i=n(`${Li}Delay`),a=n(`${Li}Duration`),o=E_(i,a),s=n(`${Ys}Delay`),l=n(`${Ys}Duration`),u=E_(s,l);let c=null,f=0,d=0;t===Li?o>0&&(c=Li,f=o,d=a.length):t===Ys?u>0&&(c=Ys,f=u,d=l.length):(f=Math.max(o,u),c=f>0?o>u?Li:Ys:null,d=c?c===Li?a.length:l.length:0);const h=c===Li&&/\b(transform|all)(,|$)/.test(n(`${Li}Property`).toString());return{type:c,timeout:f,propCount:d,hasTransform:h}}function E_(e,t){for(;e.lengthP_(r)+P_(e[n])))}function P_(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function gT(){return document.body.offsetHeight}const mT=new WeakMap,yT=new WeakMap,_T={name:"TransitionGroup",props:Gt({},IO,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=ct(),n=UC();let i,a;return Hu(()=>{if(!i.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!HO(i[0].el,r.vnode.el,o))return;i.forEach(FO),i.forEach(BO);const s=i.filter($O);gT(),s.forEach(l=>{const u=l.el,c=u.style;li(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const f=u._moveCb=d=>{d&&d.target!==u||(!d||/transform$/.test(d.propertyName))&&(u.removeEventListener("transitionend",f),u._moveCb=null,Bi(u,o))};u.addEventListener("transitionend",f)})}),()=>{const o=Ke(e),s=vT(o);let l=o.tag||pt;i=a,a=t.default?Vm(t.default()):[];for(let u=0;udelete e.mode;_T.props;const NO=_T;function FO(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function BO(e){yT.set(e,e.el.getBoundingClientRect())}function $O(e){const t=mT.get(e),r=yT.get(e),n=t.left-r.left,i=t.top-r.top;if(n||i){const a=e.el.style;return a.transform=a.webkitTransform=`translate(${n}px,${i}px)`,a.transitionDuration="0s",e}}function HO(e,t,r){const n=e.cloneNode();e._vtc&&e._vtc.forEach(o=>{o.split(/\s+/).forEach(s=>s&&n.classList.remove(s))}),r.split(/\s+/).forEach(o=>o&&n.classList.add(o)),n.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(n);const{hasTransform:a}=pT(n);return i.removeChild(n),a}const L_=e=>{const t=e.props["onUpdate:modelValue"]||!1;return be(t)?r=>_f(t,r):t},Qf={deep:!0,created(e,t,r){e._assign=L_(r),dT(e,"change",()=>{const n=e._modelValue,i=zO(e),a=e.checked,o=e._assign;if(be(n)){const s=pC(n,i),l=s!==-1;if(a&&!l)o(n.concat(i));else if(!a&&l){const u=[...n];u.splice(s,1),o(u)}}else if(kd(n)){const s=new Set(n);a?s.add(i):s.delete(i),o(s)}else o(bT(e,a))})},mounted:D_,beforeUpdate(e,t,r){e._assign=L_(r),D_(e,t,r)}};function D_(e,{value:t,oldValue:r},n){e._modelValue=t,be(t)?e.checked=pC(t,n.props.value)>-1:kd(t)?e.checked=t.has(n.props.value):t!==r&&(e.checked=Od(t,bT(e,!0)))}function zO(e){return"_value"in e?e._value:e.value}function bT(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}const WO=["ctrl","shift","alt","meta"],VO={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>WO.some(r=>e[`${r}Key`]&&!t.includes(r))},Jf=(e,t)=>(r,...n)=>{for(let i=0;ir=>{if(!("key"in r))return;const n=xo(r.key);if(t.some(i=>i===n||GO[i]===n))return e(r)},yi={beforeMount(e,{value:t},{transition:r}){e._vod=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):qs(e,t)},mounted(e,{value:t},{transition:r}){r&&t&&r.enter(e)},updated(e,{value:t,oldValue:r},{transition:n}){!t!=!r&&(n?t?(n.beforeEnter(e),qs(e,!0),n.enter(e)):n.leave(e,()=>{qs(e,!1)}):qs(e,t))},beforeUnmount(e,{value:t}){qs(e,t)}};function qs(e,t){e.style.display=t?e._vod:"none"}const jO=Gt({patchProp:LO},mO);let I_;function wT(){return I_||(I_=qI(jO))}const O_=(...e)=>{wT().render(...e)},YO=(...e)=>{const t=wT().createApp(...e),{mount:r}=t;return t.mount=n=>{const i=qO(n);if(!i)return;const a=t._component;!De(a)&&!a.render&&!a.template&&(a.template=i.innerHTML),i.innerHTML="";const o=r(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},t};function qO(e){return He(e)?document.querySelector(e):e}const wf=function(e,t,...r){let n;t.includes("mouse")||t.includes("click")?n="MouseEvents":t.includes("key")?n="KeyboardEvent":n="HTMLEvents";const i=document.createEvent(n);return i.initEvent(t,...r),e.dispatchEvent(i),e},fi=(e,t,{checkForDefaultPrevented:r=!0}={})=>i=>{const a=e==null?void 0:e(i);if(r===!1||!a)return t==null?void 0:t(i)};var R_;const Nt=typeof window<"u",Br=e=>typeof e=="boolean",KO=e=>typeof e=="function",$t=e=>typeof e=="number",XO=e=>typeof e=="string",Rp=()=>{};Nt&&((R_=window==null?void 0:window.navigator)!=null&&R_.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ho(e){return typeof e=="function"?e():E(e)}function xT(e,t){function r(...n){return new Promise((i,a)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(i).catch(a)})}return r}const ST=e=>e();function ZO(e,t={}){let r,n,i=Rp;const a=s=>{clearTimeout(s),i(),i=Rp};return s=>{const l=ho(e),u=ho(t.maxWait);return r&&a(r),l<=0||u!==void 0&&u<=0?(n&&(a(n),n=null),Promise.resolve(s())):new Promise((c,f)=>{i=t.rejectOnCancel?f:c,u&&!n&&(n=setTimeout(()=>{r&&a(r),n=null,c(s())},u)),r=setTimeout(()=>{n&&a(n),n=null,c(s())},l)})}}function QO(e=ST){const t=B(!0);function r(){t.value=!1}function n(){t.value=!0}const i=(...a)=>{t.value&&e(...a)};return{isActive:$u(t),pause:r,resume:n,eventFilter:i}}function JO(e){return e}function zu(e){return _C()?(ID(e),!0):!1}function eR(e,t=200,r={}){return xT(ZO(t,r),e)}function tR(e,t=200,r={}){const n=B(e.value),i=eR(()=>{n.value=e.value},t,r);return Se(e,()=>i()),n}function rR(e){return typeof e=="function"?k(e):B(e)}function CT(e,t=!0){ct()?wt(e):t?e():Ft(e)}function kp(e,t,r={}){const{immediate:n=!0}=r,i=B(!1);let a=null;function o(){a&&(clearTimeout(a),a=null)}function s(){i.value=!1,o()}function l(...u){o(),i.value=!0,a=setTimeout(()=>{i.value=!1,a=null,e(...u)},ho(t))}return n&&(i.value=!0,Nt&&l()),zu(s),{isPending:$u(i),start:l,stop:s}}function nR(e=!1,t={}){const{truthyValue:r=!0,falsyValue:n=!1}=t,i=Ct(e),a=B(e);function o(s){if(arguments.length)return a.value=s,a.value;{const l=ho(r);return a.value=a.value===l?ho(n):l,a.value}}return i?o:[a,o]}var k_=Object.getOwnPropertySymbols,iR=Object.prototype.hasOwnProperty,aR=Object.prototype.propertyIsEnumerable,oR=(e,t)=>{var r={};for(var n in e)iR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&k_)for(var n of k_(e))t.indexOf(n)<0&&aR.call(e,n)&&(r[n]=e[n]);return r};function sR(e,t,r={}){const n=r,{eventFilter:i=ST}=n,a=oR(n,["eventFilter"]);return Se(e,xT(i,t),a)}var lR=Object.defineProperty,uR=Object.defineProperties,cR=Object.getOwnPropertyDescriptors,ed=Object.getOwnPropertySymbols,TT=Object.prototype.hasOwnProperty,MT=Object.prototype.propertyIsEnumerable,N_=(e,t,r)=>t in e?lR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fR=(e,t)=>{for(var r in t||(t={}))TT.call(t,r)&&N_(e,r,t[r]);if(ed)for(var r of ed(t))MT.call(t,r)&&N_(e,r,t[r]);return e},dR=(e,t)=>uR(e,cR(t)),hR=(e,t)=>{var r={};for(var n in e)TT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ed)for(var n of ed(e))t.indexOf(n)<0&&MT.call(e,n)&&(r[n]=e[n]);return r};function vR(e,t,r={}){const n=r,{eventFilter:i}=n,a=hR(n,["eventFilter"]),{eventFilter:o,pause:s,resume:l,isActive:u}=QO(i);return{stop:sR(e,t,dR(fR({},a),{eventFilter:o})),pause:s,resume:l,isActive:u}}function Ui(e){var t;const r=ho(e);return(t=r==null?void 0:r.$el)!=null?t:r}const ra=Nt?window:void 0;function xn(...e){let t,r,n,i;if(XO(e[0])||Array.isArray(e[0])?([r,n,i]=e,t=ra):[t,r,n,i]=e,!t)return Rp;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const a=[],o=()=>{a.forEach(c=>c()),a.length=0},s=(c,f,d)=>(c.addEventListener(f,d,i),()=>c.removeEventListener(f,d,i)),l=Se(()=>Ui(t),c=>{o(),c&&a.push(...r.flatMap(f=>n.map(d=>s(c,f,d))))},{immediate:!0,flush:"post"}),u=()=>{l(),o()};return zu(u),u}function pR(e,t,r={}){const{window:n=ra,ignore:i=[],capture:a=!0,detectIframe:o=!1}=r;if(!n)return;let s=!0,l;const u=h=>i.some(v=>{if(typeof v=="string")return Array.from(n.document.querySelectorAll(v)).some(p=>p===h.target||h.composedPath().includes(p));{const p=Ui(v);return p&&(h.target===p||h.composedPath().includes(p))}}),c=h=>{n.clearTimeout(l);const v=Ui(e);if(!(!v||v===h.target||h.composedPath().includes(v))){if(h.detail===0&&(s=!u(h)),!s){s=!0;return}t(h)}},f=[xn(n,"click",c,{passive:!0,capture:a}),xn(n,"pointerdown",h=>{const v=Ui(e);v&&(s=!h.composedPath().includes(v)&&!u(h))},{passive:!0}),xn(n,"pointerup",h=>{if(h.button===0){const v=h.composedPath();h.composedPath=()=>v,l=n.setTimeout(()=>c(h),50)}},{passive:!0}),o&&xn(n,"blur",h=>{var v;const p=Ui(e);((v=n.document.activeElement)==null?void 0:v.tagName)==="IFRAME"&&!(p!=null&&p.contains(n.document.activeElement))&&t(h)})].filter(Boolean);return()=>f.forEach(h=>h())}function AT(e,t=!1){const r=B(),n=()=>r.value=Boolean(e());return n(),CT(n,t),r}function gR(e,t={}){const{window:r=ra}=t,n=AT(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function");let i;const a=B(!1),o=()=>{i&&("removeEventListener"in i?i.removeEventListener("change",s):i.removeListener(s))},s=()=>{n.value&&(o(),i=r.matchMedia(rR(e).value),a.value=i.matches,"addEventListener"in i?i.addEventListener("change",s):i.addListener(s))};return io(s),zu(()=>o()),a}const Np=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Fp="__vueuse_ssr_handlers__";Np[Fp]=Np[Fp]||{};const mR=Np[Fp];function ET(e,t){return mR[e]||t}function yR(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}var _R=Object.defineProperty,F_=Object.getOwnPropertySymbols,bR=Object.prototype.hasOwnProperty,wR=Object.prototype.propertyIsEnumerable,B_=(e,t,r)=>t in e?_R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$_=(e,t)=>{for(var r in t||(t={}))bR.call(t,r)&&B_(e,r,t[r]);if(F_)for(var r of F_(t))wR.call(t,r)&&B_(e,r,t[r]);return e};const xR={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}};function SR(e,t,r,n={}){var i;const{flush:a="pre",deep:o=!0,listenToStorageChanges:s=!0,writeDefaults:l=!0,mergeDefaults:u=!1,shallow:c,window:f=ra,eventFilter:d,onError:h=S=>{console.error(S)}}=n,v=(c?$m:B)(t);if(!r)try{r=ET("getDefaultStorage",()=>{var S;return(S=ra)==null?void 0:S.localStorage})()}catch(S){h(S)}if(!r)return v;const p=ho(t),g=yR(p),m=(i=n.serializer)!=null?i:xR[g],{pause:y,resume:_}=vR(v,()=>b(v.value),{flush:a,deep:o,eventFilter:d});return f&&s&&xn(f,"storage",w),w(),v;function b(S){try{if(S==null)r.removeItem(e);else{const C=m.write(S),M=r.getItem(e);M!==C&&(r.setItem(e,C),f&&(f==null||f.dispatchEvent(new StorageEvent("storage",{key:e,oldValue:M,newValue:C,storageArea:r}))))}}catch(C){h(C)}}function x(S){const C=S?S.newValue:r.getItem(e);if(C==null)return l&&p!==null&&r.setItem(e,m.write(p)),p;if(!S&&u){const M=m.read(C);return KO(u)?u(M,p):g==="object"&&!Array.isArray(M)?$_($_({},p),M):M}else return typeof C!="string"?C:m.read(C)}function w(S){if(!(S&&S.storageArea!==r)){if(S&&S.key==null){v.value=p;return}if(!(S&&S.key!==e)){y();try{v.value=x(S)}catch(C){h(C)}finally{S?Ft(_):_()}}}}}function PT(e){return gR("(prefers-color-scheme: dark)",e)}var CR=Object.defineProperty,H_=Object.getOwnPropertySymbols,TR=Object.prototype.hasOwnProperty,MR=Object.prototype.propertyIsEnumerable,z_=(e,t,r)=>t in e?CR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,AR=(e,t)=>{for(var r in t||(t={}))TR.call(t,r)&&z_(e,r,t[r]);if(H_)for(var r of H_(t))MR.call(t,r)&&z_(e,r,t[r]);return e};function ER(e={}){const{selector:t="html",attribute:r="class",initialValue:n="auto",window:i=ra,storage:a,storageKey:o="vueuse-color-scheme",listenToStorageChanges:s=!0,storageRef:l,emitAuto:u}=e,c=AR({auto:"",light:"light",dark:"dark"},e.modes||{}),f=PT({window:i}),d=k(()=>f.value?"dark":"light"),h=l||(o==null?B(n):SR(o,n,a,{window:i,listenToStorageChanges:s})),v=k({get(){return h.value==="auto"&&!u?d.value:h.value},set(y){h.value=y}}),p=ET("updateHTMLAttrs",(y,_,b)=>{const x=i==null?void 0:i.document.querySelector(y);if(x)if(_==="class"){const w=b.split(/\s/g);Object.values(c).flatMap(S=>(S||"").split(/\s/g)).filter(Boolean).forEach(S=>{w.includes(S)?x.classList.add(S):x.classList.remove(S)})}else x.setAttribute(_,b)});function g(y){var _;const b=y==="auto"?d.value:y;p(t,r,(_=c[b])!=null?_:b)}function m(y){e.onChanged?e.onChanged(y,g):g(y)}return Se(v,m,{flush:"post",immediate:!0}),u&&Se(d,()=>m(v.value),{flush:"post"}),CT(()=>m(v.value)),v}var PR=Object.defineProperty,LR=Object.defineProperties,DR=Object.getOwnPropertyDescriptors,W_=Object.getOwnPropertySymbols,IR=Object.prototype.hasOwnProperty,OR=Object.prototype.propertyIsEnumerable,V_=(e,t,r)=>t in e?PR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,RR=(e,t)=>{for(var r in t||(t={}))IR.call(t,r)&&V_(e,r,t[r]);if(W_)for(var r of W_(t))OR.call(t,r)&&V_(e,r,t[r]);return e},kR=(e,t)=>LR(e,DR(t));function NR(e={}){const{valueDark:t="dark",valueLight:r="",window:n=ra}=e,i=ER(kR(RR({},e),{onChanged:(s,l)=>{var u;e.onChanged?(u=e.onChanged)==null||u.call(e,s==="dark"):l(s)},modes:{dark:t,light:r}})),a=PT({window:n});return k({get(){return i.value==="dark"},set(s){s===a.value?i.value="auto":i.value=s?"dark":"light"}})}var G_=Object.getOwnPropertySymbols,FR=Object.prototype.hasOwnProperty,BR=Object.prototype.propertyIsEnumerable,$R=(e,t)=>{var r={};for(var n in e)FR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&G_)for(var n of G_(e))t.indexOf(n)<0&&BR.call(e,n)&&(r[n]=e[n]);return r};function gs(e,t,r={}){const n=r,{window:i=ra}=n,a=$R(n,["window"]);let o;const s=AT(()=>i&&"ResizeObserver"in i),l=()=>{o&&(o.disconnect(),o=void 0)},u=Se(()=>Ui(e),f=>{l(),s.value&&i&&f&&(o=new ResizeObserver(t),o.observe(f,a))},{immediate:!0,flush:"post"}),c=()=>{l(),u()};return zu(c),{isSupported:s,stop:c}}var U_;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(U_||(U_={}));var HR=Object.defineProperty,j_=Object.getOwnPropertySymbols,zR=Object.prototype.hasOwnProperty,WR=Object.prototype.propertyIsEnumerable,Y_=(e,t,r)=>t in e?HR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,VR=(e,t)=>{for(var r in t||(t={}))zR.call(t,r)&&Y_(e,r,t[r]);if(j_)for(var r of j_(t))WR.call(t,r)&&Y_(e,r,t[r]);return e};const GR={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};VR({linear:JO},GR);var UR=typeof global=="object"&&global&&global.Object===Object&&global;const LT=UR;var jR=typeof self=="object"&&self&&self.Object===Object&&self,YR=LT||jR||Function("return this")();const Pn=YR;var qR=Pn.Symbol;const sn=qR;var DT=Object.prototype,KR=DT.hasOwnProperty,XR=DT.toString,Ks=sn?sn.toStringTag:void 0;function ZR(e){var t=KR.call(e,Ks),r=e[Ks];try{e[Ks]=void 0;var n=!0}catch{}var i=XR.call(e);return n&&(t?e[Ks]=r:delete e[Ks]),i}var QR=Object.prototype,JR=QR.toString;function ek(e){return JR.call(e)}var tk="[object Null]",rk="[object Undefined]",q_=sn?sn.toStringTag:void 0;function So(e){return e==null?e===void 0?rk:tk:q_&&q_ in Object(e)?ZR(e):ek(e)}function qn(e){return e!=null&&typeof e=="object"}var nk="[object Symbol]";function qd(e){return typeof e=="symbol"||qn(e)&&So(e)==nk}function IT(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r0){if(++t>=kk)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function $k(e){return function(){return e}}var Hk=function(){try{var e=To(Object,"defineProperty");return e({},"",{}),e}catch{}}();const td=Hk;var zk=td?function(e,t){return td(e,"toString",{configurable:!0,enumerable:!1,value:$k(t),writable:!0})}:Xm;const Wk=zk;var Vk=Bk(Wk);const kT=Vk;function Gk(e,t){for(var r=-1,n=e==null?0:e.length;++r-1&&e%1==0&&e-1&&e%1==0&&e<=Xk}function Fs(e){return e!=null&&ey(e.length)&&!Zm(e)}function Zk(e,t,r){if(!Ar(r))return!1;var n=typeof t;return(n=="number"?Fs(r)&&Kd(t,r.length):n=="string"&&t in r)?Wu(r[t],e):!1}function Qk(e){return Kk(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&Zk(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++n-1}function vF(e,t){var r=this.__data__,n=Xd(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ti(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0&&r(s)?t>1?ly(s,t-1,r,n,i):sy(i,s):n||(i[i.length]=s)}return i}function IF(e){var t=e==null?0:e.length;return t?ly(e,1):[]}function OF(e){return kT(NT(e,void 0,IF),e+"")}var RF=zT(Object.getPrototypeOf,Object);const uy=RF;var kF="[object Object]",NF=Function.prototype,FF=Object.prototype,WT=NF.toString,BF=FF.hasOwnProperty,$F=WT.call(Object);function HF(e){if(!qn(e)||So(e)!=kF)return!1;var t=uy(e);if(t===null)return!0;var r=BF.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&WT.call(r)==$F}function $p(){if(!arguments.length)return[];var e=arguments[0];return fr(e)?e:[e]}function zF(){this.__data__=new Ti,this.size=0}function WF(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function VF(e){return this.__data__.get(e)}function GF(e){return this.__data__.has(e)}var UF=200;function jF(e,t){var r=this.__data__;if(r instanceof Ti){var n=r.__data__;if(!hu||n.lengths))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,h=r&P$?new nd:void 0;for(a.set(e,t),a.set(t,e);++f=t||S<0||f&&C>=a}function m(){var w=Wh();if(g(w))return y(w);s=setTimeout(m,p(w))}function y(w){return s=void 0,d&&n?h(w):(n=i=void 0,o)}function _(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function b(){return s===void 0?o:y(Wh())}function x(){var w=Wh(),S=g(w);if(n=arguments,i=this,l=w,S){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(m,t),h(l)}return s===void 0&&(s=setTimeout(m,t)),o}return x.cancel=_,x.flush=b,x}function Gp(e,t,r){(r!==void 0&&!Wu(e[t],r)||r===void 0&&!(t in e))&&Qm(e,t,r)}function S5(e){return qn(e)&&Fs(e)}function Up(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function C5(e){return Vu(e,Uu(e))}function T5(e,t,r,n,i,a,o){var s=Up(e,r),l=Up(t,r),u=o.get(l);if(u){Gp(e,r,u);return}var c=a?a(s,l,r+"",e,t,o):void 0,f=c===void 0;if(f){var d=fr(l),h=!d&&fu(l),v=!d&&!h&&ny(l);c=l,d||h||v?fr(s)?c=s:S5(s)?c=RT(s):h?(f=!1,c=GT(l,!0)):v?(f=!1,c=qT(l,!0)):c=[]:HF(l)||cu(l)?(c=s,cu(s)?c=C5(s):(!Ar(s)||Zm(s))&&(c=KT(l))):f=!1}f&&(o.set(l,c),i(c,l,n,a,o),o.delete(l)),Gp(e,r,c)}function iM(e,t,r,n,i){e!==t&&nM(t,function(a,o){if(i||(i=new Mn),Ar(a))T5(e,t,o,r,iM,n,i);else{var s=n?n(Up(e,o),a,o+"",e,t,i):void 0;s===void 0&&(s=a),Gp(e,o,s)}},Uu)}function M5(e,t){var r=-1,n=Fs(e)?Array(e.length):[];return y5(e,function(i,a,o){n[++r]=t(i,a,o)}),n}function A5(e,t){var r=fr(e)?IT:M5;return r(e,d5(t))}function E5(e,t){return ly(A5(e,t),1)}function jp(e){for(var t=-1,r=e==null?0:e.length,n={};++te===void 0,ys=e=>typeof Element>"u"?!1:e instanceof Element,F5=e=>He(e)?!Number.isNaN(Number(e)):!1,Tb=e=>Object.keys(e),Sf=(e,t,r)=>({get value(){return vu(e,t,r)},set value(n){N5(e,t,n)}});class B5 extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function na(e,t){throw new B5(`[${e}] ${t}`)}const sM=(e="")=>e.split(" ").filter(t=>!!t.trim()),Ol=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},Zo=(e,t)=>{!e||!t.trim()||e.classList.add(...sM(t))},ss=(e,t)=>{!e||!t.trim()||e.classList.remove(...sM(t))},Mb=(e,t)=>{var r;if(!Nt||!e||!t)return"";let n=An(t);n==="float"&&(n="cssFloat");try{const i=e.style[n];if(i)return i;const a=(r=document.defaultView)==null?void 0:r.getComputedStyle(e,"");return a?a[n]:""}catch{return e.style[n]}};function po(e,t="px"){if(!e)return"";if($t(e)||F5(e))return`${e}${t}`;if(He(e))return e}/*! Element Plus Icons Vue v2.0.10 */var Zn=(e,t)=>{let r=e.__vccOpts||e;for(let[n,i]of t)r[n]=i;return r},$5={name:"ArrowDown"},H5={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},z5=ae("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"},null,-1),W5=[z5];function V5(e,t,r,n,i,a){return Y(),me("svg",H5,W5)}var lM=Zn($5,[["render",V5],["__file","arrow-down.vue"]]),G5={name:"ArrowRight"},U5={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},j5=ae("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"},null,-1),Y5=[j5];function q5(e,t,r,n,i,a){return Y(),me("svg",U5,Y5)}var dy=Zn(G5,[["render",q5],["__file","arrow-right.vue"]]),K5={name:"ArrowUp"},X5={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Z5=ae("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0z"},null,-1),Q5=[Z5];function J5(e,t,r,n,i,a){return Y(),me("svg",X5,Q5)}var e3=Zn(K5,[["render",J5],["__file","arrow-up.vue"]]),t3={name:"CircleCloseFilled"},r3={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},n3=ae("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336L512 457.664z"},null,-1),i3=[n3];function a3(e,t,r,n,i,a){return Y(),me("svg",r3,i3)}var uM=Zn(t3,[["render",a3],["__file","circle-close-filled.vue"]]),o3={name:"Close"},s3={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},l3=ae("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"},null,-1),u3=[l3];function c3(e,t,r,n,i,a){return Y(),me("svg",s3,u3)}var Yp=Zn(o3,[["render",c3],["__file","close.vue"]]),f3={name:"InfoFilled"},d3={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},h3=ae("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64zm67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344zM590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"},null,-1),v3=[h3];function p3(e,t,r,n,i,a){return Y(),me("svg",d3,v3)}var cM=Zn(f3,[["render",p3],["__file","info-filled.vue"]]),g3={name:"Loading"},m3={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},y3=ae("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"},null,-1),_3=[y3];function b3(e,t,r,n,i,a){return Y(),me("svg",m3,_3)}var hy=Zn(g3,[["render",b3],["__file","loading.vue"]]),w3={name:"More"},x3={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},S3=ae("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96zm336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224zm0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96zm336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224zm0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96z"},null,-1),C3=[S3];function T3(e,t,r,n,i,a){return Y(),me("svg",x3,C3)}var M3=Zn(w3,[["render",T3],["__file","more.vue"]]),A3={name:"SuccessFilled"},E3={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},P3=ae("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336L456.192 600.384z"},null,-1),L3=[P3];function D3(e,t,r,n,i,a){return Y(),me("svg",E3,L3)}var fM=Zn(A3,[["render",D3],["__file","success-filled.vue"]]),I3={name:"WarningFilled"},O3={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},R3=ae("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256zm0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4z"},null,-1),k3=[R3];function N3(e,t,r,n,i,a){return Y(),me("svg",O3,k3)}var dM=Zn(I3,[["render",N3],["__file","warning-filled.vue"]]);const hM="__epPropKey",Le=e=>e,F3=e=>Xe(e)&&!!e[hM],eh=(e,t)=>{if(!Xe(e)||F3(e))return e;const{values:r,required:n,default:i,type:a,validator:o}=e,l={type:a,required:!!n,validator:r||o?u=>{let c=!1,f=[];if(r&&(f=Array.from(r),We(e,"default")&&f.push(i),c||(c=f.includes(u))),o&&(c||(c=o(u))),!c&&f.length>0){const d=[...new Set(f)].map(h=>JSON.stringify(h)).join(", ");fI(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${d}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[hM]:!0};return We(e,"default")&&(l.default=i),l},tt=e=>jp(Object.entries(e).map(([t,r])=>[t,eh(r,t)])),Wn=Le([String,Object,Function]),B3={Close:Yp,SuccessFilled:fM,InfoFilled:cM,WarningFilled:dM,CircleCloseFilled:uM},Ab={success:fM,warning:dM,error:uM,info:cM},hr=(e,t)=>{if(e.install=r=>{for(const n of[e,...Object.values(t??{})])r.component(n.name,n)},t)for(const[r,n]of Object.entries(t))e[r]=n;return e},$3=(e,t)=>(e.install=r=>{e._context=r._context,r.config.globalProperties[t]=e},e),H3=(e,t)=>(e.install=r=>{r.directive(t,e)},e),fa=e=>(e.install=ur,e),Ot={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},go="update:modelValue",qp="change",Kp="input",Yu=["","default","small","large"],z3=e=>["",...Yu].includes(e),Cf=e=>{const t=be(e)?e:[e],r=[];return t.forEach(n=>{var i;be(n)?r.push(...Cf(n)):ta(n)&&be(n.children)?r.push(...Cf(n.children)):(r.push(n),ta(n)&&((i=n.component)!=null&&i.subTree)&&r.push(...Cf(n.component.subTree)))}),r},Ya=e=>e,vy=({from:e,replacement:t,scope:r,version:n,ref:i,type:a="API"},o)=>{Se(()=>E(o),s=>{},{immediate:!0})};var W3={name:"en",el:{colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color."},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"}}};const V3=e=>(t,r)=>G3(t,r,E(e)),G3=(e,t,r)=>vu(r,e,e).replace(/\{(\w+)\}/g,(n,i)=>{var a;return`${(a=t==null?void 0:t[i])!=null?a:`{${i}}`}`}),U3=e=>{const t=k(()=>E(e).name),r=Ct(e)?e:B(e);return{lang:t,locale:r,t:V3(e)}},vM=Symbol("localeContextKey"),py=e=>{const t=e||Ee(vM,B());return U3(k(()=>t.value||W3))},Xp="el",j3="is-",ga=(e,t,r,n,i)=>{let a=`${e}-${t}`;return r&&(a+=`-${r}`),n&&(a+=`__${n}`),i&&(a+=`--${i}`),a},pM=Symbol("namespaceContextKey"),gy=e=>{const t=e||Ee(pM,B(Xp));return k(()=>E(t)||Xp)},Ne=(e,t)=>{const r=gy(t);return{namespace:r,b:(p="")=>ga(r.value,e,p,"",""),e:p=>p?ga(r.value,e,"",p,""):"",m:p=>p?ga(r.value,e,"","",p):"",be:(p,g)=>p&&g?ga(r.value,e,p,g,""):"",em:(p,g)=>p&&g?ga(r.value,e,"",p,g):"",bm:(p,g)=>p&&g?ga(r.value,e,p,"",g):"",bem:(p,g,m)=>p&&g&&m?ga(r.value,e,p,g,m):"",is:(p,...g)=>{const m=g.length>=1?g[0]:!0;return p&&m?`${j3}${p}`:""},cssVar:p=>{const g={};for(const m in p)p[m]&&(g[`--${r.value}-${m}`]=p[m]);return g},cssVarName:p=>`--${r.value}-${p}`,cssVarBlock:p=>{const g={};for(const m in p)p[m]&&(g[`--${r.value}-${e}-${m}`]=p[m]);return g},cssVarBlockName:p=>`--${r.value}-${e}-${p}`}},Y3=eh({type:Le(Boolean),default:null}),q3=eh({type:Le(Function)}),K3=e=>{const t=`update:${e}`,r=`onUpdate:${e}`,n=[t],i={[e]:Y3,[r]:q3};return{useModelToggle:({indicator:o,toggleReason:s,shouldHideWhenRouteChanges:l,shouldProceed:u,onShow:c,onHide:f})=>{const d=ct(),{emit:h}=d,v=d.props,p=k(()=>De(v[r])),g=k(()=>v[e]===null),m=S=>{o.value!==!0&&(o.value=!0,s&&(s.value=S),De(c)&&c(S))},y=S=>{o.value!==!1&&(o.value=!1,s&&(s.value=S),De(f)&&f(S))},_=S=>{if(v.disabled===!0||De(u)&&!u())return;const C=p.value&&Nt;C&&h(t,!0),(g.value||!C)&&m(S)},b=S=>{if(v.disabled===!0||!Nt)return;const C=p.value&&Nt;C&&h(t,!1),(g.value||!C)&&y(S)},x=S=>{Br(S)&&(v.disabled&&S?p.value&&h(t,!1):o.value!==S&&(S?m():y()))},w=()=>{o.value?b():_()};return Se(()=>v[e],x),l&&d.appContext.config.globalProperties.$route!==void 0&&Se(()=>({...d.proxy.$route}),()=>{l.value&&o.value&&b()}),wt(()=>{x(v[e])}),{hide:b,show:_,toggle:w,hasUpdateHandler:p}},useModelToggleProps:i,useModelToggleEmits:n}},gM=e=>{const t=ct();return k(()=>{var r,n;return(n=(r=t==null?void 0:t.proxy)==null?void 0:r.$props)==null?void 0:n[e]})};var Sr="top",ln="bottom",un="right",Cr="left",my="auto",qu=[Sr,ln,un,Cr],_s="start",mu="end",X3="clippingParents",mM="viewport",Xs="popper",Z3="reference",Eb=qu.reduce(function(e,t){return e.concat([t+"-"+_s,t+"-"+mu])},[]),yy=[].concat(qu,[my]).reduce(function(e,t){return e.concat([t,t+"-"+_s,t+"-"+mu])},[]),Q3="beforeRead",J3="read",e4="afterRead",t4="beforeMain",r4="main",n4="afterMain",i4="beforeWrite",a4="write",o4="afterWrite",s4=[Q3,J3,e4,t4,r4,n4,i4,a4,o4];function Kn(e){return e?(e.nodeName||"").toLowerCase():null}function Ln(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function bs(e){var t=Ln(e).Element;return e instanceof t||e instanceof Element}function an(e){var t=Ln(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function _y(e){if(typeof ShadowRoot>"u")return!1;var t=Ln(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function l4(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},a=t.elements[r];!an(a)||!Kn(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function u4(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],a=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=o.reduce(function(l,u){return l[u]="",l},{});!an(i)||!Kn(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}var yM={name:"applyStyles",enabled:!0,phase:"write",fn:l4,effect:u4,requires:["computeStyles"]};function jn(e){return e.split("-")[0]}var oo=Math.max,od=Math.min,ws=Math.round;function xs(e,t){t===void 0&&(t=!1);var r=e.getBoundingClientRect(),n=1,i=1;if(an(e)&&t){var a=e.offsetHeight,o=e.offsetWidth;o>0&&(n=ws(r.width)/o||1),a>0&&(i=ws(r.height)/a||1)}return{width:r.width/n,height:r.height/i,top:r.top/i,right:r.right/n,bottom:r.bottom/i,left:r.left/n,x:r.left/n,y:r.top/i}}function by(e){var t=xs(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function _M(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&_y(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function _i(e){return Ln(e).getComputedStyle(e)}function c4(e){return["table","td","th"].indexOf(Kn(e))>=0}function da(e){return((bs(e)?e.ownerDocument:e.document)||window.document).documentElement}function th(e){return Kn(e)==="html"?e:e.assignedSlot||e.parentNode||(_y(e)?e.host:null)||da(e)}function Pb(e){return!an(e)||_i(e).position==="fixed"?null:e.offsetParent}function f4(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&an(e)){var n=_i(e);if(n.position==="fixed")return null}var i=th(e);for(_y(i)&&(i=i.host);an(i)&&["html","body"].indexOf(Kn(i))<0;){var a=_i(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Ku(e){for(var t=Ln(e),r=Pb(e);r&&c4(r)&&_i(r).position==="static";)r=Pb(r);return r&&(Kn(r)==="html"||Kn(r)==="body"&&_i(r).position==="static")?t:r||f4(e)||t}function wy(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Rl(e,t,r){return oo(e,od(t,r))}function d4(e,t,r){var n=Rl(e,t,r);return n>r?r:n}function bM(){return{top:0,right:0,bottom:0,left:0}}function wM(e){return Object.assign({},bM(),e)}function xM(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var h4=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,wM(typeof e!="number"?e:xM(e,qu))};function v4(e){var t,r=e.state,n=e.name,i=e.options,a=r.elements.arrow,o=r.modifiersData.popperOffsets,s=jn(r.placement),l=wy(s),u=[Cr,un].indexOf(s)>=0,c=u?"height":"width";if(!(!a||!o)){var f=h4(i.padding,r),d=by(a),h=l==="y"?Sr:Cr,v=l==="y"?ln:un,p=r.rects.reference[c]+r.rects.reference[l]-o[l]-r.rects.popper[c],g=o[l]-r.rects.reference[l],m=Ku(a),y=m?l==="y"?m.clientHeight||0:m.clientWidth||0:0,_=p/2-g/2,b=f[h],x=y-d[c]-f[v],w=y/2-d[c]/2+_,S=Rl(b,w,x),C=l;r.modifiersData[n]=(t={},t[C]=S,t.centerOffset=S-w,t)}}function p4(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!_M(t.elements.popper,i)||(t.elements.arrow=i))}var g4={name:"arrow",enabled:!0,phase:"main",fn:v4,effect:p4,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ss(e){return e.split("-")[1]}var m4={top:"auto",right:"auto",bottom:"auto",left:"auto"};function y4(e){var t=e.x,r=e.y,n=window,i=n.devicePixelRatio||1;return{x:ws(t*i)/i||0,y:ws(r*i)/i||0}}function Lb(e){var t,r=e.popper,n=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,f=e.isFixed,d=o.x,h=d===void 0?0:d,v=o.y,p=v===void 0?0:v,g=typeof c=="function"?c({x:h,y:p}):{x:h,y:p};h=g.x,p=g.y;var m=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),_=Cr,b=Sr,x=window;if(u){var w=Ku(r),S="clientHeight",C="clientWidth";if(w===Ln(r)&&(w=da(r),_i(w).position!=="static"&&s==="absolute"&&(S="scrollHeight",C="scrollWidth")),w=w,i===Sr||(i===Cr||i===un)&&a===mu){b=ln;var M=f&&w===x&&x.visualViewport?x.visualViewport.height:w[S];p-=M-n.height,p*=l?1:-1}if(i===Cr||(i===Sr||i===ln)&&a===mu){_=un;var P=f&&w===x&&x.visualViewport?x.visualViewport.width:w[C];h-=P-n.width,h*=l?1:-1}}var A=Object.assign({position:s},u&&m4),T=c===!0?y4({x:h,y:p}):{x:h,y:p};if(h=T.x,p=T.y,l){var D;return Object.assign({},A,(D={},D[b]=y?"0":"",D[_]=m?"0":"",D.transform=(x.devicePixelRatio||1)<=1?"translate("+h+"px, "+p+"px)":"translate3d("+h+"px, "+p+"px, 0)",D))}return Object.assign({},A,(t={},t[b]=y?p+"px":"",t[_]=m?h+"px":"",t.transform="",t))}function _4(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,a=r.adaptive,o=a===void 0?!0:a,s=r.roundOffsets,l=s===void 0?!0:s,u={placement:jn(t.placement),variation:Ss(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Lb(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Lb(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var SM={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_4,data:{}},mc={passive:!0};function b4(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,a=i===void 0?!0:i,o=n.resize,s=o===void 0?!0:o,l=Ln(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach(function(c){c.addEventListener("scroll",r.update,mc)}),s&&l.addEventListener("resize",r.update,mc),function(){a&&u.forEach(function(c){c.removeEventListener("scroll",r.update,mc)}),s&&l.removeEventListener("resize",r.update,mc)}}var CM={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:b4,data:{}},w4={left:"right",right:"left",bottom:"top",top:"bottom"};function Tf(e){return e.replace(/left|right|bottom|top/g,function(t){return w4[t]})}var x4={start:"end",end:"start"};function Db(e){return e.replace(/start|end/g,function(t){return x4[t]})}function xy(e){var t=Ln(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Sy(e){return xs(da(e)).left+xy(e).scrollLeft}function S4(e){var t=Ln(e),r=da(e),n=t.visualViewport,i=r.clientWidth,a=r.clientHeight,o=0,s=0;return n&&(i=n.width,a=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=n.offsetLeft,s=n.offsetTop)),{width:i,height:a,x:o+Sy(e),y:s}}function C4(e){var t,r=da(e),n=xy(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=oo(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=oo(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+Sy(e),l=-n.scrollTop;return _i(i||r).direction==="rtl"&&(s+=oo(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:l}}function Cy(e){var t=_i(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function TM(e){return["html","body","#document"].indexOf(Kn(e))>=0?e.ownerDocument.body:an(e)&&Cy(e)?e:TM(th(e))}function kl(e,t){var r;t===void 0&&(t=[]);var n=TM(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),a=Ln(n),o=i?[a].concat(a.visualViewport||[],Cy(n)?n:[]):n,s=t.concat(o);return i?s:s.concat(kl(th(o)))}function Zp(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function T4(e){var t=xs(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Ib(e,t){return t===mM?Zp(S4(e)):bs(t)?T4(t):Zp(C4(da(e)))}function M4(e){var t=kl(th(e)),r=["absolute","fixed"].indexOf(_i(e).position)>=0,n=r&&an(e)?Ku(e):e;return bs(n)?t.filter(function(i){return bs(i)&&_M(i,n)&&Kn(i)!=="body"}):[]}function A4(e,t,r){var n=t==="clippingParents"?M4(e):[].concat(t),i=[].concat(n,[r]),a=i[0],o=i.reduce(function(s,l){var u=Ib(e,l);return s.top=oo(u.top,s.top),s.right=od(u.right,s.right),s.bottom=od(u.bottom,s.bottom),s.left=oo(u.left,s.left),s},Ib(e,a));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function MM(e){var t=e.reference,r=e.element,n=e.placement,i=n?jn(n):null,a=n?Ss(n):null,o=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,l;switch(i){case Sr:l={x:o,y:t.y-r.height};break;case ln:l={x:o,y:t.y+t.height};break;case un:l={x:t.x+t.width,y:s};break;case Cr:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?wy(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(a){case _s:l[u]=l[u]-(t[c]/2-r[c]/2);break;case mu:l[u]=l[u]+(t[c]/2-r[c]/2);break}}return l}function yu(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,a=r.boundary,o=a===void 0?X3:a,s=r.rootBoundary,l=s===void 0?mM:s,u=r.elementContext,c=u===void 0?Xs:u,f=r.altBoundary,d=f===void 0?!1:f,h=r.padding,v=h===void 0?0:h,p=wM(typeof v!="number"?v:xM(v,qu)),g=c===Xs?Z3:Xs,m=e.rects.popper,y=e.elements[d?g:c],_=A4(bs(y)?y:y.contextElement||da(e.elements.popper),o,l),b=xs(e.elements.reference),x=MM({reference:b,element:m,strategy:"absolute",placement:i}),w=Zp(Object.assign({},m,x)),S=c===Xs?w:b,C={top:_.top-S.top+p.top,bottom:S.bottom-_.bottom+p.bottom,left:_.left-S.left+p.left,right:S.right-_.right+p.right},M=e.modifiersData.offset;if(c===Xs&&M){var P=M[i];Object.keys(C).forEach(function(A){var T=[un,ln].indexOf(A)>=0?1:-1,D=[Sr,ln].indexOf(A)>=0?"y":"x";C[A]+=P[D]*T})}return C}function E4(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,a=r.rootBoundary,o=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,u=l===void 0?yy:l,c=Ss(n),f=c?s?Eb:Eb.filter(function(v){return Ss(v)===c}):qu,d=f.filter(function(v){return u.indexOf(v)>=0});d.length===0&&(d=f);var h=d.reduce(function(v,p){return v[p]=yu(e,{placement:p,boundary:i,rootBoundary:a,padding:o})[jn(p)],v},{});return Object.keys(h).sort(function(v,p){return h[v]-h[p]})}function P4(e){if(jn(e)===my)return[];var t=Tf(e);return[Db(e),t,Db(t)]}function L4(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!0:o,l=r.fallbackPlacements,u=r.padding,c=r.boundary,f=r.rootBoundary,d=r.altBoundary,h=r.flipVariations,v=h===void 0?!0:h,p=r.allowedAutoPlacements,g=t.options.placement,m=jn(g),y=m===g,_=l||(y||!v?[Tf(g)]:P4(g)),b=[g].concat(_).reduce(function(Ae,V){return Ae.concat(jn(V)===my?E4(t,{placement:V,boundary:c,rootBoundary:f,padding:u,flipVariations:v,allowedAutoPlacements:p}):V)},[]),x=t.rects.reference,w=t.rects.popper,S=new Map,C=!0,M=b[0],P=0;P=0,H=N?"width":"height",$=yu(t,{placement:A,boundary:c,rootBoundary:f,altBoundary:d,padding:u}),G=N?D?un:Cr:D?ln:Sr;x[H]>w[H]&&(G=Tf(G));var F=Tf(G),R=[];if(a&&R.push($[T]<=0),s&&R.push($[G]<=0,$[F]<=0),R.every(function(Ae){return Ae})){M=A,C=!1;break}S.set(A,R)}if(C)for(var j=v?3:1,re=function(Ae){var V=b.find(function(Q){var W=S.get(Q);if(W)return W.slice(0,Ae).every(function(q){return q})});if(V)return M=V,"break"},oe=j;oe>0;oe--){var ye=re(oe);if(ye==="break")break}t.placement!==M&&(t.modifiersData[n]._skip=!0,t.placement=M,t.reset=!0)}}var D4={name:"flip",enabled:!0,phase:"main",fn:L4,requiresIfExists:["offset"],data:{_skip:!1}};function Ob(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Rb(e){return[Sr,un,ln,Cr].some(function(t){return e[t]>=0})}function I4(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=yu(t,{elementContext:"reference"}),s=yu(t,{altBoundary:!0}),l=Ob(o,n),u=Ob(s,i,a),c=Rb(l),f=Rb(u);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}var O4={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:I4};function R4(e,t,r){var n=jn(e),i=[Cr,Sr].indexOf(n)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[Cr,un].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function k4(e){var t=e.state,r=e.options,n=e.name,i=r.offset,a=i===void 0?[0,0]:i,o=yy.reduce(function(c,f){return c[f]=R4(f,t.rects,a),c},{}),s=o[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=o}var N4={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:k4};function F4(e){var t=e.state,r=e.name;t.modifiersData[r]=MM({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var AM={name:"popperOffsets",enabled:!0,phase:"read",fn:F4,data:{}};function B4(e){return e==="x"?"y":"x"}function $4(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!1:o,l=r.boundary,u=r.rootBoundary,c=r.altBoundary,f=r.padding,d=r.tether,h=d===void 0?!0:d,v=r.tetherOffset,p=v===void 0?0:v,g=yu(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),m=jn(t.placement),y=Ss(t.placement),_=!y,b=wy(m),x=B4(b),w=t.modifiersData.popperOffsets,S=t.rects.reference,C=t.rects.popper,M=typeof p=="function"?p(Object.assign({},t.rects,{placement:t.placement})):p,P=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(w){if(a){var D,N=b==="y"?Sr:Cr,H=b==="y"?ln:un,$=b==="y"?"height":"width",G=w[b],F=G+g[N],R=G-g[H],j=h?-C[$]/2:0,re=y===_s?S[$]:C[$],oe=y===_s?-C[$]:-S[$],ye=t.elements.arrow,Ae=h&&ye?by(ye):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:bM(),Q=V[N],W=V[H],q=Rl(0,S[$],Ae[$]),le=_?S[$]/2-j-q-Q-P.mainAxis:re-q-Q-P.mainAxis,de=_?-S[$]/2+j+q+W+P.mainAxis:oe+q+W+P.mainAxis,J=t.elements.arrow&&Ku(t.elements.arrow),L=J?b==="y"?J.clientTop||0:J.clientLeft||0:0,I=(D=A==null?void 0:A[b])!=null?D:0,z=G+le-I-L,U=G+de-I,K=Rl(h?od(F,z):F,G,h?oo(R,U):R);w[b]=K,T[b]=K-G}if(s){var ne,fe=b==="x"?Sr:Cr,te=b==="x"?ln:un,ie=w[x],X=x==="y"?"height":"width",we=ie+g[fe],he=ie-g[te],xe=[Sr,Cr].indexOf(m)!==-1,Oe=(ne=A==null?void 0:A[x])!=null?ne:0,ze=xe?we:ie-S[X]-C[X]-Oe+P.altAxis,rt=xe?ie+S[X]+C[X]-Oe-P.altAxis:he,Je=h&&xe?d4(ze,ie,rt):Rl(h?ze:we,ie,h?rt:he);w[x]=Je,T[x]=Je-ie}t.modifiersData[n]=T}}var H4={name:"preventOverflow",enabled:!0,phase:"main",fn:$4,requiresIfExists:["offset"]};function z4(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function W4(e){return e===Ln(e)||!an(e)?xy(e):z4(e)}function V4(e){var t=e.getBoundingClientRect(),r=ws(t.width)/e.offsetWidth||1,n=ws(t.height)/e.offsetHeight||1;return r!==1||n!==1}function G4(e,t,r){r===void 0&&(r=!1);var n=an(t),i=an(t)&&V4(t),a=da(t),o=xs(e,i),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((Kn(t)!=="body"||Cy(a))&&(s=W4(t)),an(t)?(l=xs(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=Sy(a))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function U4(e){var t=new Map,r=new Set,n=[];e.forEach(function(a){t.set(a.name,a)});function i(a){r.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!r.has(s)){var l=t.get(s);l&&i(l)}}),n.push(a)}return e.forEach(function(a){r.has(a.name)||i(a)}),n}function j4(e){var t=U4(e);return s4.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function Y4(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function q4(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var kb={placement:"bottom",modifiers:[],strategy:"absolute"};function Nb(){for(var e=arguments.length,t=new Array(e),r=0;r{const n={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const u=Q4(l);Object.assign(o.value,u)},requires:["computeStyles"]},i=k(()=>{const{onFirstUpdate:l,placement:u,strategy:c,modifiers:f}=E(r);return{onFirstUpdate:l,placement:u||"bottom",strategy:c||"absolute",modifiers:[...f||[],n,{name:"applyStyles",enabled:!1}]}}),a=$m(),o=B({styles:{popper:{position:E(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=()=>{a.value&&(a.value.destroy(),a.value=void 0)};return Se(i,l=>{const u=E(a);u&&u.setOptions(l)},{deep:!0}),Se([e,t],([l,u])=>{s(),!(!l||!u)&&(a.value=EM(l,u,E(i)))}),Xt(()=>{s()}),{state:k(()=>{var l;return{...((l=E(a))==null?void 0:l.state)||{}}}),styles:k(()=>E(o).styles),attributes:k(()=>E(o).attributes),update:()=>{var l;return(l=E(a))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=E(a))==null?void 0:l.forceUpdate()},instanceRef:k(()=>E(a))}};function Q4(e){const t=Object.keys(e.elements),r=jp(t.map(i=>[i,e.styles[i]||{}])),n=jp(t.map(i=>[i,e.attributes[i]]));return{styles:r,attributes:n}}function Fb(){let e;const t=(n,i)=>{r(),e=window.setTimeout(n,i)},r=()=>window.clearTimeout(e);return zu(()=>r()),{registerTimeout:t,cancelTimeout:r}}const Bb={prefix:Math.floor(Math.random()*1e4),current:0},J4=Symbol("elIdInjection"),PM=()=>ct()?Ee(J4,Bb):Bb,My=e=>{const t=PM(),r=gy();return k(()=>E(e)||`${r.value}-id-${t.prefix}-${t.current++}`)};let Yo=[];const $b=e=>{const t=e;t.key===Ot.esc&&Yo.forEach(r=>r(t))},eH=e=>{wt(()=>{Yo.length===0&&document.addEventListener("keydown",$b),Nt&&Yo.push(e)}),Xt(()=>{Yo=Yo.filter(t=>t!==e),Yo.length===0&&Nt&&document.removeEventListener("keydown",$b)})};let Hb;const LM=()=>{const e=gy(),t=PM(),r=k(()=>`${e.value}-popper-container-${t.prefix}`),n=k(()=>`#${r.value}`);return{id:r,selector:n}},tH=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},rH=()=>{const{id:e,selector:t}=LM();return Gd(()=>{Nt&&!Hb&&!document.body.querySelector(t.value)&&(Hb=tH(e.value))}),{id:e,selector:t}},nH=tt({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),DM=({showAfter:e,hideAfter:t,autoClose:r,open:n,close:i})=>{const{registerTimeout:a}=Fb(),{registerTimeout:o,cancelTimeout:s}=Fb();return{onOpen:c=>{a(()=>{n(c);const f=E(r);$t(f)&&f>0&&o(()=>{i(c)},f)},E(e))},onClose:c=>{s(),a(()=>{i(c)},E(t))}}},IM=Symbol("elForwardRef"),iH=e=>{At(IM,{setForwardRef:r=>{e.value=r}})},aH=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),zb=B(0),OM=2e3,RM=Symbol("zIndexContextKey"),Ay=e=>{const t=e||Ee(RM,void 0),r=k(()=>{const a=E(t);return $t(a)?a:OM}),n=k(()=>r.value+zb.value);return{initialZIndex:r,currentZIndex:n,nextZIndex:()=>(zb.value++,n.value)}},Xu=eh({type:String,values:Yu,required:!1}),kM=Symbol("size"),oH=()=>{const e=Ee(kM,{});return k(()=>E(e.size)||"")},NM=Symbol(),sd=B();function Ey(e,t=void 0){const r=ct()?Ee(NM,sd):sd;return e?k(()=>{var n,i;return(i=(n=r.value)==null?void 0:n[e])!=null?i:t}):r}function sH(e,t){const r=Ey(),n=Ne(e,k(()=>{var s;return((s=r.value)==null?void 0:s.namespace)||Xp})),i=py(k(()=>{var s;return(s=r.value)==null?void 0:s.locale})),a=Ay(k(()=>{var s;return((s=r.value)==null?void 0:s.zIndex)||OM})),o=k(()=>{var s;return E(t)||((s=r.value)==null?void 0:s.size)||""});return FM(k(()=>E(r)||{})),{ns:n,locale:i,zIndex:a,size:o}}const FM=(e,t,r=!1)=>{var n;const i=!!ct(),a=i?Ey():void 0,o=(n=t==null?void 0:t.provide)!=null?n:i?At:void 0;if(!o)return;const s=k(()=>{const l=E(e);return a!=null&&a.value?lH(a.value,l):l});return o(NM,s),o(vM,k(()=>s.value.locale)),o(pM,k(()=>s.value.namespace)),o(RM,k(()=>s.value.zIndex)),o(kM,{size:k(()=>s.value.size||"")}),(r||!sd.value)&&(sd.value=s.value),s},lH=(e,t)=>{var r;const n=[...new Set([...Tb(e),...Tb(t)])],i={};for(const a of n)i[a]=(r=t[a])!=null?r:e[a];return i},uH=tt({a11y:{type:Boolean,default:!0},locale:{type:Le(Object)},size:Xu,button:{type:Le(Object)},experimentalFeatures:{type:Le(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:Le(Object)},zIndex:Number,namespace:{type:String,default:"el"}}),Qp={};ce({name:"ElConfigProvider",props:uH,setup(e,{slots:t}){Se(()=>e.message,n=>{Object.assign(Qp,n??{})},{immediate:!0,deep:!0});const r=FM(e);return()=>$e(t,"default",{config:r==null?void 0:r.value})}});var Ze=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r};const cH=tt({size:{type:Le([Number,String])},color:{type:String}}),fH=ce({name:"ElIcon",inheritAttrs:!1}),dH=ce({...fH,props:cH,setup(e){const t=e,r=Ne("icon"),n=k(()=>{const{size:i,color:a}=t;return!i&&!a?{}:{fontSize:ad(i)?void 0:po(i),"--color":a}});return(i,a)=>(Y(),me("i",ca({class:E(r).b(),style:E(n)},i.$attrs),[$e(i.$slots,"default")],16))}});var hH=Ze(dH,[["__file","/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);const lr=hr(hH),Bs=Symbol("formContextKey"),mo=Symbol("formItemContextKey"),ia=(e,t={})=>{const r=B(void 0),n=t.prop?r:gM("size"),i=t.global?r:oH(),a=t.form?{size:void 0}:Ee(Bs,void 0),o=t.formItem?{size:void 0}:Ee(mo,void 0);return k(()=>n.value||E(e)||(o==null?void 0:o.size)||(a==null?void 0:a.size)||i.value||"")},rh=e=>{const t=gM("disabled"),r=Ee(Bs,void 0);return k(()=>t.value||E(e)||(r==null?void 0:r.disabled)||!1)},Zu=()=>{const e=Ee(Bs,void 0),t=Ee(mo,void 0);return{form:e,formItem:t}},Py=(e,{formItemContext:t,disableIdGeneration:r,disableIdManagement:n})=>{r||(r=B(!1)),n||(n=B(!1));const i=B();let a;const o=k(()=>{var s;return!!(!e.label&&t&&t.inputIds&&((s=t.inputIds)==null?void 0:s.length)<=1)});return wt(()=>{a=Se([tn(e,"id"),r],([s,l])=>{const u=s??(l?void 0:My().value);u!==i.value&&(t!=null&&t.removeInputId&&(i.value&&t.removeInputId(i.value),!(n!=null&&n.value)&&!l&&u&&t.addInputId(u)),i.value=u)},{immediate:!0})}),ks(()=>{a&&a(),t!=null&&t.removeInputId&&i.value&&t.removeInputId(i.value)}),{isLabeledByFormItem:o,inputId:i}},vH=tt({size:{type:String,values:Yu},disabled:Boolean}),pH=tt({...vH,model:Object,rules:{type:Le(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:{type:Boolean,default:!1},scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),gH={validate:(e,t,r)=>(be(e)||He(e))&&Br(t)&&He(r)};function mH(){const e=B([]),t=k(()=>{if(!e.value.length)return"0";const a=Math.max(...e.value);return a?`${a}px`:""});function r(a){const o=e.value.indexOf(a);return o===-1&&t.value,o}function n(a,o){if(a&&o){const s=r(o);e.value.splice(s,1,a)}else a&&e.value.push(a)}function i(a){const o=r(a);o>-1&&e.value.splice(o,1)}return{autoLabelWidth:t,registerLabelWidth:n,deregisterLabelWidth:i}}const yc=(e,t)=>{const r=$p(t);return r.length>0?e.filter(n=>n.prop&&r.includes(n.prop)):e},yH="ElForm",_H=ce({name:yH}),bH=ce({..._H,props:pH,emits:gH,setup(e,{expose:t,emit:r}){const n=e,i=[],a=ia(),o=Ne("form"),s=k(()=>{const{labelPosition:y,inline:_}=n;return[o.b(),o.m(a.value||"default"),{[o.m(`label-${y}`)]:y,[o.m("inline")]:_}]}),l=y=>{i.push(y)},u=y=>{y.prop&&i.splice(i.indexOf(y),1)},c=(y=[])=>{n.model&&yc(i,y).forEach(_=>_.resetField())},f=(y=[])=>{yc(i,y).forEach(_=>_.clearValidate())},d=k(()=>!!n.model),h=y=>{if(i.length===0)return[];const _=yc(i,y);return _.length?_:[]},v=async y=>g(void 0,y),p=async(y=[])=>{if(!d.value)return!1;const _=h(y);if(_.length===0)return!0;let b={};for(const x of _)try{await x.validate("")}catch(w){b={...b,...w}}return Object.keys(b).length===0?!0:Promise.reject(b)},g=async(y=[],_)=>{const b=!De(_);try{const x=await p(y);return x===!0&&(_==null||_(x)),x}catch(x){if(x instanceof Error)throw x;const w=x;return n.scrollToError&&m(Object.keys(w)[0]),_==null||_(!1,w),b&&Promise.reject(w)}},m=y=>{var _;const b=yc(i,y)[0];b&&((_=b.$el)==null||_.scrollIntoView(n.scrollIntoViewOptions))};return Se(()=>n.rules,()=>{n.validateOnRuleChange&&v().catch(y=>void 0)},{deep:!0}),At(Bs,fn({...$d(n),emit:r,resetFields:c,clearValidate:f,validateField:g,addField:l,removeField:u,...mH()})),t({validate:v,validateField:g,resetFields:c,clearValidate:f,scrollToField:m}),(y,_)=>(Y(),me("form",{class:ue(E(s))},[$e(y.$slots,"default")],2))}});var wH=Ze(bH,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]);function Za(){return Za=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mf(e,t,r){return SH()?Mf=Reflect.construct.bind():Mf=function(i,a,o){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(i,s),u=new l;return o&&_u(u,o.prototype),u},Mf.apply(null,arguments)}function CH(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function eg(e){var t=typeof Map=="function"?new Map:void 0;return eg=function(n){if(n===null||!CH(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return Mf(n,arguments,Jp(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),_u(i,n)},eg(e)}var TH=/%[sdj%]/g,MH=function(){};typeof process<"u"&&process.env;function tg(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function kr(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=a)return s;switch(s){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch{return"[Circular]"}break;default:return s}});return o}return e}function AH(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function zt(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||AH(t)&&typeof e=="string"&&!e)}function EH(e,t,r){var n=[],i=0,a=e.length;function o(s){n.push.apply(n,s||[]),i++,i===a&&r(n)}e.forEach(function(s){t(s,o)})}function Wb(e,t,r){var n=0,i=e.length;function a(o){if(o&&o.length){r(o);return}var s=n;n=n+1,st in e?fD(e,t,{enumerable:!0,config (?:`+n+":){1}(?:(?::"+n+"){0,4}:"+r+"|(?::"+n+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 (?::(?:(?::`+n+"){0,5}:"+r+"|(?::"+n+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 -`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),a=new RegExp("(?:^"+r+"$)|(?:^"+i+"$)"),o=new RegExp("^"+r+"$"),s=new RegExp("^"+i+"$"),l=function(b){return b&&b.exact?a:new RegExp("(?:"+t(b)+r+t(b)+")|(?:"+t(b)+i+t(b)+")","g")};l.v4=function(_){return _&&_.exact?o:new RegExp(""+t(_)+r+t(_),"g")},l.v6=function(_){return _&&_.exact?s:new RegExp(""+t(_)+i+t(_),"g")};var u="(?:(?:[a-z]+:)?//)",c="(?:\\S+(?::\\S*)?@)?",f=l.v4().source,d=l.v6().source,h="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",v="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",p="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",g="(?::\\d{2,5})?",m='(?:[/?#][^\\s"]*)?',y="(?:"+u+"|www\\.)"+c+"(?:localhost|"+f+"|"+d+"|"+h+v+p+")"+g+m;return _c=new RegExp("(?:^"+y+"$)","i"),_c},jb={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},bl={integer:function(t){return bl.number(t)&&parseInt(t,10)===t},float:function(t){return bl.number(t)&&!bl.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!bl.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(jb.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(RH())},hex:function(t){return typeof t=="string"&&!!t.match(jb.hex)}},kH=function(t,r,n,i,a){if(t.required&&r===void 0){BM(t,r,n,i,a);return}var o=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;o.indexOf(s)>-1?bl[s](r)||i.push(kr(a.messages.types[s],t.fullField,t.type)):s&&typeof r!==t.type&&i.push(kr(a.messages.types[s],t.fullField,t.type))},NH=function(t,r,n,i,a){var o=typeof t.len=="number",s=typeof t.min=="number",l=typeof t.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=r,f=null,d=typeof r=="number",h=typeof r=="string",v=Array.isArray(r);if(d?f="number":h?f="string":v&&(f="array"),!f)return!1;v&&(c=r.length),h&&(c=r.replace(u,"_").length),o?c!==t.len&&i.push(kr(a.messages[f].len,t.fullField,t.len)):s&&!l&&ct.max?i.push(kr(a.messages[f].max,t.fullField,t.max)):s&&l&&(ct.max)&&i.push(kr(a.messages[f].range,t.fullField,t.min,t.max))},Lo="enum",FH=function(t,r,n,i,a){t[Lo]=Array.isArray(t[Lo])?t[Lo]:[],t[Lo].indexOf(r)===-1&&i.push(kr(a.messages[Lo],t.fullField,t[Lo].join(", ")))},BH=function(t,r,n,i,a){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(r)||i.push(kr(a.messages.pattern.mismatch,t.fullField,r,t.pattern));else if(typeof t.pattern=="string"){var o=new RegExp(t.pattern);o.test(r)||i.push(kr(a.messages.pattern.mismatch,t.fullField,r,t.pattern))}}},Ye={required:BM,whitespace:OH,type:kH,range:NH,enum:FH,pattern:BH},$H=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r,"string")&&!t.required)return n();Ye.required(t,r,i,o,a,"string"),zt(r,"string")||(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a),Ye.pattern(t,r,i,o,a),t.whitespace===!0&&Ye.whitespace(t,r,i,o,a))}n(o)},HH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&Ye.type(t,r,i,o,a)}n(o)},zH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(r===""&&(r=void 0),zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a))}n(o)},WH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&Ye.type(t,r,i,o,a)}n(o)},VH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),zt(r)||Ye.type(t,r,i,o,a)}n(o)},GH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a))}n(o)},UH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a))}n(o)},jH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(r==null&&!t.required)return n();Ye.required(t,r,i,o,a,"array"),r!=null&&(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a))}n(o)},YH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&Ye.type(t,r,i,o,a)}n(o)},qH="enum",KH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&Ye[qH](t,r,i,o,a)}n(o)},XH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r,"string")&&!t.required)return n();Ye.required(t,r,i,o,a),zt(r,"string")||Ye.pattern(t,r,i,o,a)}n(o)},ZH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r,"date")&&!t.required)return n();if(Ye.required(t,r,i,o,a),!zt(r,"date")){var l;r instanceof Date?l=r:l=new Date(r),Ye.type(t,l,i,o,a),l&&Ye.range(t,l.getTime(),i,o,a)}}n(o)},QH=function(t,r,n,i,a){var o=[],s=Array.isArray(r)?"array":typeof r;Ye.required(t,r,i,o,a,s),n(o)},Vh=function(t,r,n,i,a){var o=t.type,s=[],l=t.required||!t.required&&i.hasOwnProperty(t.field);if(l){if(zt(r,o)&&!t.required)return n();Ye.required(t,r,i,s,a,o),zt(r,o)||Ye.type(t,r,i,s,a)}n(s)},JH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a)}n(o)},Nl={string:$H,method:HH,number:zH,boolean:WH,regexp:VH,integer:GH,float:UH,array:jH,object:YH,enum:KH,pattern:XH,date:ZH,url:Vh,hex:Vh,email:Vh,required:QH,any:JH};function rg(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var ng=rg(),Qu=function(){function e(r){this.rules=null,this._messages=ng,this.define(r)}var t=e.prototype;return t.define=function(n){var i=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(typeof n!="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(a){var o=n[a];i.rules[a]=Array.isArray(o)?o:[o]})},t.messages=function(n){return n&&(this._messages=Ub(rg(),n)),this._messages},t.validate=function(n,i,a){var o=this;i===void 0&&(i={}),a===void 0&&(a=function(){});var s=n,l=i,u=a;if(typeof l=="function"&&(u=l,l={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,s),Promise.resolve(s);function c(p){var g=[],m={};function y(b){if(Array.isArray(b)){var x;g=(x=g).concat.apply(x,b)}else g.push(b)}for(var _=0;_");const i=Fe("form"),a=B(),o=B(0),s=()=>{var c;if((c=a.value)!=null&&c.firstElementChild){const f=window.getComputedStyle(a.value.firstElementChild).width;return Math.ceil(Number.parseFloat(f))}else return 0},l=(c="update")=>{Ft(()=>{t.default&&e.isAutoWidth&&(c==="update"?o.value=s():c==="remove"&&(r==null||r.deregisterLabelWidth(o.value)))})},u=()=>l("update");return wt(()=>{u()}),Xt(()=>{l("remove")}),Hu(()=>u()),Se(o,(c,f)=>{e.updateAll&&(r==null||r.registerLabelWidth(c,f))}),gs(k(()=>{var c,f;return(f=(c=a.value)==null?void 0:c.firstElementChild)!=null?f:null}),u),()=>{var c,f;if(!t)return null;const{isAutoWidth:d}=e;if(d){const h=r==null?void 0:r.autoLabelWidth,v=n==null?void 0:n.hasLabel,p={};if(v&&h&&h!=="auto"){const g=Math.max(0,Number.parseInt(h,10)-o.value),m=r.labelPosition==="left"?"marginRight":"marginLeft";g&&(p[m]=`${g}px`)}return ee("div",{ref:a,class:[i.be("item","label-wrap")],style:p},[(c=t.default)==null?void 0:c.call(t)])}else return ee(pt,{ref:a},[(f=t.default)==null?void 0:f.call(t)])}}});const nz=["role","aria-labelledby"],iz=ce({name:"ElFormItem"}),az=ce({...iz,props:tz,setup(e,{expose:t}){const r=e,n=Yd(),i=Ee(Bs,void 0),a=Ee(mo,void 0),o=ia(void 0,{formItem:!1}),s=Fe("form-item"),l=My().value,u=B([]),c=B(""),f=tR(c,100),d=B(""),h=B();let v,p=!1;const g=k(()=>{if((i==null?void 0:i.labelPosition)==="top")return{};const W=po(r.labelWidth||(i==null?void 0:i.labelWidth)||"");return W?{width:W}:{}}),m=k(()=>{if((i==null?void 0:i.labelPosition)==="top"||i!=null&&i.inline)return{};if(!r.label&&!r.labelWidth&&M)return{};const W=po(r.labelWidth||(i==null?void 0:i.labelWidth)||"");return!r.label&&!n.label?{marginLeft:W}:{}}),y=k(()=>[s.b(),s.m(o.value),s.is("error",c.value==="error"),s.is("validating",c.value==="validating"),s.is("success",c.value==="success"),s.is("required",N.value||r.required),s.is("no-asterisk",i==null?void 0:i.hideRequiredAsterisk),(i==null?void 0:i.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[s.m("feedback")]:i==null?void 0:i.statusIcon}]),_=k(()=>Br(r.inlineMessage)?r.inlineMessage:(i==null?void 0:i.inlineMessage)||!1),b=k(()=>[s.e("error"),{[s.em("error","inline")]:_.value}]),x=k(()=>r.prop?He(r.prop)?r.prop:r.prop.join("."):""),w=k(()=>!!(r.label||n.label)),S=k(()=>r.for||u.value.length===1?u.value[0]:void 0),C=k(()=>!S.value&&w.value),M=!!a,P=k(()=>{const W=i==null?void 0:i.model;if(!(!W||!r.prop))return Sf(W,r.prop).value}),A=k(()=>{const{required:W}=r,q=[];r.rules&&q.push(...$p(r.rules));const le=i==null?void 0:i.rules;if(le&&r.prop){const de=Sf(le,r.prop).value;de&&q.push(...$p(de))}if(W!==void 0){const de=q.map((J,L)=>[J,L]).filter(([J])=>Object.keys(J).includes("required"));if(de.length>0)for(const[J,L]of de)J.required!==W&&(q[L]={...J,required:W});else q.push({required:W})}return q}),T=k(()=>A.value.length>0),D=W=>A.value.filter(le=>!le.trigger||!W?!0:Array.isArray(le.trigger)?le.trigger.includes(W):le.trigger===W).map(({trigger:le,...de})=>de),N=k(()=>A.value.some(W=>W.required)),H=k(()=>{var W;return f.value==="error"&&r.showMessage&&((W=i==null?void 0:i.showMessage)!=null?W:!0)}),$=k(()=>`${r.label||""}${(i==null?void 0:i.labelSuffix)||""}`),G=W=>{c.value=W},F=W=>{var q,le;const{errors:de,fields:J}=W;(!de||!J)&&console.error(W),G("error"),d.value=de?(le=(q=de==null?void 0:de[0])==null?void 0:q.message)!=null?le:`${r.prop} is required`:"",i==null||i.emit("validate",r.prop,!1,d.value)},R=()=>{G("success"),i==null||i.emit("validate",r.prop,!0,"")},j=async W=>{const q=x.value;return new Qu({[q]:W}).validate({[q]:P.value},{firstFields:!0}).then(()=>(R(),!0)).catch(de=>(F(de),Promise.reject(de)))},re=async(W,q)=>{if(p||!r.prop)return!1;const le=De(q);if(!T.value)return q==null||q(!1),!1;const de=D(W);return de.length===0?(q==null||q(!0),!0):(G("validating"),j(de).then(()=>(q==null||q(!0),!0)).catch(J=>{const{fields:L}=J;return q==null||q(!1,L),le?!1:Promise.reject(L)}))},oe=()=>{G(""),d.value="",p=!1},ye=async()=>{const W=i==null?void 0:i.model;if(!W||!r.prop)return;const q=Sf(W,r.prop);p=!0,q.value=bb(v),await Ft(),oe(),p=!1},Ae=W=>{u.value.includes(W)||u.value.push(W)},V=W=>{u.value=u.value.filter(q=>q!==W)};Se(()=>r.error,W=>{d.value=W||"",G(W?"error":"")},{immediate:!0}),Se(()=>r.validateStatus,W=>G(W||""));const Q=fn({...$d(r),$el:h,size:o,validateState:c,labelId:l,inputIds:u,isGroup:C,hasLabel:w,addInputId:Ae,removeInputId:V,resetField:ye,clearValidate:oe,validate:re});return At(mo,Q),wt(()=>{r.prop&&(i==null||i.addField(Q),v=bb(P.value))}),Xt(()=>{i==null||i.removeField(Q)}),t({size:o,validateMessage:d,validateState:c,validate:re,clearValidate:oe,resetField:ye}),(W,q)=>{var le;return Y(),me("div",{ref_key:"formItemRef",ref:h,class:ue(E(y)),role:E(C)?"group":void 0,"aria-labelledby":E(C)?E(l):void 0},[ee(E(rz),{"is-auto-width":E(g).width==="auto","update-all":((le=E(i))==null?void 0:le.labelWidth)==="auto"},{default:Z(()=>[E(w)?(Y(),_e(nn(E(S)?"label":"div"),{key:0,id:E(l),for:E(S),class:ue(E(s).e("label")),style:St(E(g))},{default:Z(()=>[$e(W.$slots,"label",{label:E($)},()=>[Bt(Te(E($)),1)])]),_:3},8,["id","for","class","style"])):ke("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),ae("div",{class:ue(E(s).e("content")),style:St(E(m))},[$e(W.$slots,"default"),ee(NO,{name:`${E(s).namespace.value}-zoom-in-top`},{default:Z(()=>[E(H)?$e(W.$slots,"error",{key:0,error:d.value},()=>[ae("div",{class:ue(E(b))},Te(d.value),3)]):ke("v-if",!0)]),_:3},8,["name"])],6)],10,nz)}}});var $M=Ze(az,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]);const HM=hr(wH,{FormItem:$M}),zM=fa($M),Qo=4,oz={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},sz=({move:e,size:t,bar:r})=>({[r.size]:t,transform:`translate${r.axis}(${e}%)`}),WM=Symbol("scrollbarContextKey"),lz=tt({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),uz="Thumb",cz=ce({__name:"thumb",props:lz,setup(e){const t=e,r=Ee(WM),n=Fe("scrollbar");r||na(uz,"can not inject scrollbar context");const i=B(),a=B(),o=B({}),s=B(!1);let l=!1,u=!1,c=Nt?document.onselectstart:null;const f=k(()=>oz[t.vertical?"vertical":"horizontal"]),d=k(()=>sz({size:t.size,move:t.move,bar:f.value})),h=k(()=>i.value[f.value.offset]**2/r.wrapElement[f.value.scrollSize]/t.ratio/a.value[f.value.offset]),v=w=>{var S;if(w.stopPropagation(),w.ctrlKey||[1,2].includes(w.button))return;(S=window.getSelection())==null||S.removeAllRanges(),g(w);const C=w.currentTarget;C&&(o.value[f.value.axis]=C[f.value.offset]-(w[f.value.client]-C.getBoundingClientRect()[f.value.direction]))},p=w=>{if(!a.value||!i.value||!r.wrapElement)return;const S=Math.abs(w.target.getBoundingClientRect()[f.value.direction]-w[f.value.client]),C=a.value[f.value.offset]/2,M=(S-C)*100*h.value/i.value[f.value.offset];r.wrapElement[f.value.scroll]=M*r.wrapElement[f.value.scrollSize]/100},g=w=>{w.stopImmediatePropagation(),l=!0,document.addEventListener("mousemove",m),document.addEventListener("mouseup",y),c=document.onselectstart,document.onselectstart=()=>!1},m=w=>{if(!i.value||!a.value||l===!1)return;const S=o.value[f.value.axis];if(!S)return;const C=(i.value.getBoundingClientRect()[f.value.direction]-w[f.value.client])*-1,M=a.value[f.value.offset]-S,P=(C-M)*100*h.value/i.value[f.value.offset];r.wrapElement[f.value.scroll]=P*r.wrapElement[f.value.scrollSize]/100},y=()=>{l=!1,o.value[f.value.axis]=0,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",y),x(),u&&(s.value=!1)},_=()=>{u=!1,s.value=!!t.size},b=()=>{u=!0,s.value=l};Xt(()=>{x(),document.removeEventListener("mouseup",y)});const x=()=>{document.onselectstart!==c&&(document.onselectstart=c)};return xn(tn(r,"scrollbarElement"),"mousemove",_),xn(tn(r,"scrollbarElement"),"mouseleave",b),(w,S)=>(Y(),_e(Ci,{name:E(n).b("fade"),persisted:""},{default:Z(()=>[nr(ae("div",{ref_key:"instance",ref:i,class:ue([E(n).e("bar"),E(n).is(E(f).key)]),onMousedown:p},[ae("div",{ref_key:"thumb",ref:a,class:ue(E(n).e("thumb")),style:St(E(d)),onMousedown:v},null,38)],34),[[yi,w.always||s.value]])]),_:1},8,["name"]))}});var qb=Ze(cz,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/thumb.vue"]]);const fz=tt({always:{type:Boolean,default:!0},width:String,height:String,ratioX:{type:Number,default:1},ratioY:{type:Number,default:1}}),dz=ce({__name:"bar",props:fz,setup(e,{expose:t}){const r=e,n=B(0),i=B(0);return t({handleScroll:o=>{if(o){const s=o.offsetHeight-Qo,l=o.offsetWidth-Qo;i.value=o.scrollTop*100/s*r.ratioY,n.value=o.scrollLeft*100/l*r.ratioX}}}),(o,s)=>(Y(),me(pt,null,[ee(qb,{move:n.value,ratio:o.ratioX,size:o.width,always:o.always},null,8,["move","ratio","size","always"]),ee(qb,{move:i.value,ratio:o.ratioY,size:o.height,vertical:"",always:o.always},null,8,["move","ratio","size","always"])],64))}});var hz=Ze(dz,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/bar.vue"]]);const vz=tt({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:Le([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20}}),pz={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every($t)},gz="ElScrollbar",mz=ce({name:gz}),yz=ce({...mz,props:vz,emits:pz,setup(e,{expose:t,emit:r}){const n=e,i=Fe("scrollbar");let a,o;const s=B(),l=B(),u=B(),c=B("0"),f=B("0"),d=B(),h=B(1),v=B(1),p=k(()=>{const S={};return n.height&&(S.height=po(n.height)),n.maxHeight&&(S.maxHeight=po(n.maxHeight)),[n.wrapStyle,S]}),g=k(()=>[n.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!n.native}]),m=k(()=>[i.e("view"),n.viewClass]),y=()=>{var S;l.value&&((S=d.value)==null||S.handleScroll(l.value),r("scroll",{scrollTop:l.value.scrollTop,scrollLeft:l.value.scrollLeft}))};function _(S,C){Xe(S)?l.value.scrollTo(S):$t(S)&&$t(C)&&l.value.scrollTo(S,C)}const b=S=>{$t(S)&&(l.value.scrollTop=S)},x=S=>{$t(S)&&(l.value.scrollLeft=S)},w=()=>{if(!l.value)return;const S=l.value.offsetHeight-Qo,C=l.value.offsetWidth-Qo,M=S**2/l.value.scrollHeight,P=C**2/l.value.scrollWidth,A=Math.max(M,n.minSize),T=Math.max(P,n.minSize);h.value=M/(S-M)/(A/(S-A)),v.value=P/(C-P)/(T/(C-T)),f.value=A+Qon.noresize,S=>{S?(a==null||a(),o==null||o()):({stop:a}=gs(u,w),o=xn("resize",w))},{immediate:!0}),Se(()=>[n.maxHeight,n.height],()=>{n.native||Ft(()=>{var S;w(),l.value&&((S=d.value)==null||S.handleScroll(l.value))})}),At(WM,fn({scrollbarElement:s,wrapElement:l})),wt(()=>{n.native||Ft(()=>{w()})}),Hu(()=>w()),t({wrapRef:l,update:w,scrollTo:_,setScrollTop:b,setScrollLeft:x,handleScroll:y}),(S,C)=>(Y(),me("div",{ref_key:"scrollbarRef",ref:s,class:ue(E(i).b())},[ae("div",{ref_key:"wrapRef",ref:l,class:ue(E(g)),style:St(E(p)),onScroll:y},[(Y(),_e(nn(S.tag),{ref_key:"resizeRef",ref:u,class:ue(E(m)),style:St(S.viewStyle)},{default:Z(()=>[$e(S.$slots,"default")]),_:3},8,["class","style"]))],38),S.native?ke("v-if",!0):(Y(),_e(hz,{key:0,ref_key:"barRef",ref:d,height:f.value,width:c.value,always:S.always,"ratio-x":v.value,"ratio-y":h.value},null,8,["height","width","always","ratio-x","ratio-y"]))],2))}});var _z=Ze(yz,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/scrollbar.vue"]]);const VM=hr(_z),Ly=Symbol("popper"),GM=Symbol("popperContent"),bz=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],UM=tt({role:{type:String,values:bz,default:"tooltip"}}),wz=ce({name:"ElPopper",inheritAttrs:!1}),xz=ce({...wz,props:UM,setup(e,{expose:t}){const r=e,n=B(),i=B(),a=B(),o=B(),s=k(()=>r.role),l={triggerRef:n,popperInstanceRef:i,contentRef:a,referenceRef:o,role:s};return t(l),At(Ly,l),(u,c)=>$e(u.$slots,"default")}});var Sz=Ze(xz,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/popper.vue"]]);const jM=tt({arrowOffset:{type:Number,default:5}}),Cz=ce({name:"ElPopperArrow",inheritAttrs:!1}),Tz=ce({...Cz,props:jM,setup(e,{expose:t}){const r=e,n=Fe("popper"),{arrowOffset:i,arrowRef:a,arrowStyle:o}=Ee(GM,void 0);return Se(()=>r.arrowOffset,s=>{i.value=s}),Xt(()=>{a.value=void 0}),t({arrowRef:a}),(s,l)=>(Y(),me("span",{ref_key:"arrowRef",ref:a,class:ue(E(n).e("arrow")),style:St(E(o)),"data-popper-arrow":""},null,6))}});var Mz=Ze(Tz,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/arrow.vue"]]);const Az="ElOnlyChild",Ez=ce({name:Az,setup(e,{slots:t,attrs:r}){var n;const i=Ee(IM),a=aH((n=i==null?void 0:i.setForwardRef)!=null?n:ur);return()=>{var o;const s=(o=t.default)==null?void 0:o.call(t,r);if(!s||s.length>1)return null;const l=YM(s);return l?nr(mi(l,r),[[a]]):null}}});function YM(e){if(!e)return null;const t=e;for(const r of t){if(Xe(r))switch(r.type){case xr:continue;case Ns:case"svg":return Kb(r);case pt:return YM(r.children);default:return r}return Kb(r)}return null}function Kb(e){const t=Fe("only-child");return ee("span",{class:t.e("content")},[e])}const qM=tt({virtualRef:{type:Le(Object)},virtualTriggering:Boolean,onMouseenter:{type:Le(Function)},onMouseleave:{type:Le(Function)},onClick:{type:Le(Function)},onKeydown:{type:Le(Function)},onFocus:{type:Le(Function)},onBlur:{type:Le(Function)},onContextmenu:{type:Le(Function)},id:String,open:Boolean}),Pz=ce({name:"ElPopperTrigger",inheritAttrs:!1}),Lz=ce({...Pz,props:qM,setup(e,{expose:t}){const r=e,{role:n,triggerRef:i}=Ee(Ly,void 0);iH(i);const a=k(()=>s.value?r.id:void 0),o=k(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),s=k(()=>{if(n&&n.value!=="tooltip")return n.value}),l=k(()=>s.value?`${r.open}`:void 0);let u;return wt(()=>{Se(()=>r.virtualRef,c=>{c&&(i.value=Ui(c))},{immediate:!0}),Se(i,(c,f)=>{u==null||u(),u=void 0,ys(c)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(d=>{var h;const v=r[d];v&&(c.addEventListener(d.slice(2).toLowerCase(),v),(h=f==null?void 0:f.removeEventListener)==null||h.call(f,d.slice(2).toLowerCase(),v))}),u=Se([a,o,s,l],d=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((h,v)=>{gu(d[v])?c.removeAttribute(h):c.setAttribute(h,d[v])})},{immediate:!0})),ys(f)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(d=>f.removeAttribute(d))},{immediate:!0})}),Xt(()=>{u==null||u(),u=void 0}),t({triggerRef:i}),(c,f)=>c.virtualTriggering?ke("v-if",!0):(Y(),_e(E(Ez),ca({key:0},c.$attrs,{"aria-controls":E(a),"aria-describedby":E(o),"aria-expanded":E(l),"aria-haspopup":E(s)}),{default:Z(()=>[$e(c.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var Dz=Ze(Lz,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/trigger.vue"]]);const Gh="focus-trap.focus-after-trapped",Uh="focus-trap.focus-after-released",Iz="focus-trap.focusout-prevented",Xb={cancelable:!0,bubbles:!1},Oz={cancelable:!0,bubbles:!1},Zb="focusAfterTrapped",Qb="focusAfterReleased",Rz=Symbol("elFocusTrap"),Dy=B(),nh=B(0),Iy=B(0);let bc=0;const KM=e=>{const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0||n===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t},Jb=(e,t)=>{for(const r of e)if(!kz(r,t))return r},kz=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},Nz=e=>{const t=KM(e),r=Jb(t,e),n=Jb(t.reverse(),e);return[r,n]},Fz=e=>e instanceof HTMLInputElement&&"select"in e,$i=(e,t)=>{if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),Iy.value=window.performance.now(),e!==r&&Fz(e)&&t&&e.select()}};function e1(e,t){const r=[...e],n=e.indexOf(t);return n!==-1&&r.splice(n,1),r}const Bz=()=>{let e=[];return{push:n=>{const i=e[0];i&&n!==i&&i.pause(),e=e1(e,n),e.unshift(n)},remove:n=>{var i,a;e=e1(e,n),(a=(i=e[0])==null?void 0:i.resume)==null||a.call(i)}}},$z=(e,t=!1)=>{const r=document.activeElement;for(const n of e)if($i(n,t),document.activeElement!==r)return},t1=Bz(),Hz=()=>nh.value>Iy.value,wc=()=>{Dy.value="pointer",nh.value=window.performance.now()},r1=()=>{Dy.value="keyboard",nh.value=window.performance.now()},zz=()=>(wt(()=>{bc===0&&(document.addEventListener("mousedown",wc),document.addEventListener("touchstart",wc),document.addEventListener("keydown",r1)),bc++}),Xt(()=>{bc--,bc<=0&&(document.removeEventListener("mousedown",wc),document.removeEventListener("touchstart",wc),document.removeEventListener("keydown",r1))}),{focusReason:Dy,lastUserFocusTimestamp:nh,lastAutomatedFocusTimestamp:Iy}),xc=e=>new CustomEvent(Iz,{...Oz,detail:e}),Wz=ce({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Zb,Qb,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const r=B();let n,i;const{focusReason:a}=zz();eH(v=>{e.trapped&&!o.paused&&t("release-requested",v)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=v=>{if(!e.loop&&!e.trapped||o.paused)return;const{key:p,altKey:g,ctrlKey:m,metaKey:y,currentTarget:_,shiftKey:b}=v,{loop:x}=e,w=p===Ot.tab&&!g&&!m&&!y,S=document.activeElement;if(w&&S){const C=_,[M,P]=Nz(C);if(M&&P){if(!b&&S===P){const T=xc({focusReason:a.value});t("focusout-prevented",T),T.defaultPrevented||(v.preventDefault(),x&&$i(M,!0))}else if(b&&[M,C].includes(S)){const T=xc({focusReason:a.value});t("focusout-prevented",T),T.defaultPrevented||(v.preventDefault(),x&&$i(P,!0))}}else if(S===C){const T=xc({focusReason:a.value});t("focusout-prevented",T),T.defaultPrevented||v.preventDefault()}}};At(Rz,{focusTrapRef:r,onKeydown:s}),Se(()=>e.focusTrapEl,v=>{v&&(r.value=v)},{immediate:!0}),Se([r],([v],[p])=>{v&&(v.addEventListener("keydown",s),v.addEventListener("focusin",c),v.addEventListener("focusout",f)),p&&(p.removeEventListener("keydown",s),p.removeEventListener("focusin",c),p.removeEventListener("focusout",f))});const l=v=>{t(Zb,v)},u=v=>t(Qb,v),c=v=>{const p=E(r);if(!p)return;const g=v.target,m=v.relatedTarget,y=g&&p.contains(g);e.trapped||m&&p.contains(m)||(n=m),y&&t("focusin",v),!o.paused&&e.trapped&&(y?i=g:$i(i,!0))},f=v=>{const p=E(r);if(!(o.paused||!p))if(e.trapped){const g=v.relatedTarget;!gu(g)&&!p.contains(g)&&setTimeout(()=>{if(!o.paused&&e.trapped){const m=xc({focusReason:a.value});t("focusout-prevented",m),m.defaultPrevented||$i(i,!0)}},0)}else{const g=v.target;g&&p.contains(g)||t("focusout",v)}};async function d(){await Ft();const v=E(r);if(v){t1.push(o);const p=v.contains(document.activeElement)?n:document.activeElement;if(n=p,!v.contains(p)){const m=new Event(Gh,Xb);v.addEventListener(Gh,l),v.dispatchEvent(m),m.defaultPrevented||Ft(()=>{let y=e.focusStartEl;He(y)||($i(y),document.activeElement!==y&&(y="first")),y==="first"&&$z(KM(v),!0),(document.activeElement===p||y==="container")&&$i(v)})}}}function h(){const v=E(r);if(v){v.removeEventListener(Gh,l);const p=new CustomEvent(Uh,{...Xb,detail:{focusReason:a.value}});v.addEventListener(Uh,u),v.dispatchEvent(p),!p.defaultPrevented&&(a.value=="keyboard"||!Hz()||v.contains(document.activeElement))&&$i(n??document.body),v.removeEventListener(Uh,l),t1.remove(o)}}return wt(()=>{e.trapped&&d(),Se(()=>e.trapped,v=>{v?d():h()})}),Xt(()=>{e.trapped&&h()}),{onKeydown:s}}});function Vz(e,t,r,n,i,a){return $e(e.$slots,"default",{handleKeydown:e.onKeydown})}var Gz=Ze(Wz,[["render",Vz],["__file","/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);const Uz=["fixed","absolute"],jz=tt({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Le(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:yy,default:"bottom"},popperOptions:{type:Le(Object),default:()=>({})},strategy:{type:String,values:Uz,default:"absolute"}}),XM=tt({...jz,id:String,style:{type:Le([String,Array,Object])},className:{type:Le([String,Array,Object])},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:Le([String,Array,Object])},popperStyle:{type:Le([String,Array,Object])},referenceEl:{type:Le(Object)},triggerTargetEl:{type:Le(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),Yz={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},qz=(e,t=[])=>{const{placement:r,strategy:n,popperOptions:i}=e,a={placement:r,strategy:n,...i,modifiers:[...Xz(e),...t]};return Zz(a,i==null?void 0:i.modifiers),a},Kz=e=>{if(Nt)return Ui(e)};function Xz(e){const{offset:t,gpuAcceleration:r,fallbackPlacements:n}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:n}},{name:"computeStyles",options:{gpuAcceleration:r}}]}function Zz(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const Qz=0,Jz=e=>{const{popperInstanceRef:t,contentRef:r,triggerRef:n,role:i}=Ee(Ly,void 0),a=B(),o=B(),s=k(()=>({name:"eventListeners",enabled:!!e.visible})),l=k(()=>{var m;const y=E(a),_=(m=E(o))!=null?m:Qz;return{name:"arrow",enabled:!L5(y),options:{element:y,padding:_}}}),u=k(()=>({onFirstUpdate:()=>{v()},...qz(e,[E(l),E(s)])})),c=k(()=>Kz(e.referenceEl)||E(n)),{attributes:f,state:d,styles:h,update:v,forceUpdate:p,instanceRef:g}=Z4(c,r,u);return Se(g,m=>t.value=m),wt(()=>{Se(()=>{var m;return(m=E(c))==null?void 0:m.getBoundingClientRect()},()=>{v()})}),{attributes:f,arrowRef:a,contentRef:r,instanceRef:g,state:d,styles:h,role:i,forceUpdate:p,update:v}},e6=(e,{attributes:t,styles:r,role:n})=>{const{nextZIndex:i}=Ay(),a=Fe("popper"),o=k(()=>E(t).popper),s=B(e.zIndex||i()),l=k(()=>[a.b(),a.is("pure",e.pure),a.is(e.effect),e.popperClass]),u=k(()=>[{zIndex:E(s)},e.popperStyle||{},E(r).popper]),c=k(()=>n.value==="dialog"?"false":void 0),f=k(()=>E(r).arrow||{});return{ariaModal:c,arrowStyle:f,contentAttrs:o,contentClass:l,contentStyle:u,contentZIndex:s,updateZIndex:()=>{s.value=e.zIndex||i()}}},t6=(e,t)=>{const r=B(!1),n=B();return{focusStartRef:n,trapped:r,onFocusAfterReleased:u=>{var c;((c=u.detail)==null?void 0:c.focusReason)!=="pointer"&&(n.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:u=>{e.visible&&!r.value&&(u.target&&(n.value=u.target),r.value=!0)},onFocusoutPrevented:u=>{e.trapping||(u.detail.focusReason==="pointer"&&u.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,t("close")}}},r6=ce({name:"ElPopperContent"}),n6=ce({...r6,props:XM,emits:Yz,setup(e,{expose:t,emit:r}){const n=e,{focusStartRef:i,trapped:a,onFocusAfterReleased:o,onFocusAfterTrapped:s,onFocusInTrap:l,onFocusoutPrevented:u,onReleaseRequested:c}=t6(n,r),{attributes:f,arrowRef:d,contentRef:h,styles:v,instanceRef:p,role:g,update:m}=Jz(n),{ariaModal:y,arrowStyle:_,contentAttrs:b,contentClass:x,contentStyle:w,updateZIndex:S}=e6(n,{styles:v,attributes:f,role:g}),C=Ee(mo,void 0),M=B();At(GM,{arrowStyle:_,arrowRef:d,arrowOffset:M}),C&&(C.addInputId||C.removeInputId)&&At(mo,{...C,addInputId:ur,removeInputId:ur});let P;const A=(D=!0)=>{m(),D&&S()},T=()=>{A(!1),n.visible&&n.focusOnShow?a.value=!0:n.visible===!1&&(a.value=!1)};return wt(()=>{Se(()=>n.triggerTargetEl,(D,N)=>{P==null||P(),P=void 0;const H=E(D||h.value),$=E(N||h.value);ys(H)&&(P=Se([g,()=>n.ariaLabel,y,()=>n.id],G=>{["role","aria-label","aria-modal","id"].forEach((F,R)=>{gu(G[R])?H.removeAttribute(F):H.setAttribute(F,G[R])})},{immediate:!0})),$!==H&&ys($)&&["role","aria-label","aria-modal","id"].forEach(G=>{$.removeAttribute(G)})},{immediate:!0}),Se(()=>n.visible,T,{immediate:!0})}),Xt(()=>{P==null||P(),P=void 0}),t({popperContentRef:h,popperInstanceRef:p,updatePopper:A,contentStyle:w}),(D,N)=>(Y(),me("div",ca({ref_key:"contentRef",ref:h},E(b),{style:E(w),class:E(x),tabindex:"-1",onMouseenter:N[0]||(N[0]=H=>D.$emit("mouseenter",H)),onMouseleave:N[1]||(N[1]=H=>D.$emit("mouseleave",H))}),[ee(E(Gz),{trapped:E(a),"trap-on-focus-in":!0,"focus-trap-el":E(h),"focus-start-el":E(i),onFocusAfterTrapped:E(s),onFocusAfterReleased:E(o),onFocusin:E(l),onFocusoutPrevented:E(u),onReleaseRequested:E(c)},{default:Z(()=>[$e(D.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var i6=Ze(n6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/content.vue"]]);const a6=hr(Sz),Oy=Symbol("elTooltip"),qr=tt({...nH,...XM,appendTo:{type:Le([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:Le(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),bu=tt({...qM,disabled:Boolean,trigger:{type:Le([String,Array]),default:"hover"},triggerKeys:{type:Le(Array),default:()=>[Ot.enter,Ot.space]}}),{useModelToggleProps:o6,useModelToggleEmits:s6,useModelToggle:l6}=K3("visible"),u6=tt({...UM,...o6,...qr,...bu,...jM,showArrow:{type:Boolean,default:!0}}),c6=[...s6,"before-show","before-hide","show","hide","open","close"],f6=(e,t)=>be(e)?e.includes(t):e===t,Do=(e,t,r)=>n=>{f6(E(e),t)&&r(n)},d6=ce({name:"ElTooltipTrigger"}),h6=ce({...d6,props:bu,setup(e,{expose:t}){const r=e,n=Fe("tooltip"),{controlled:i,id:a,open:o,onOpen:s,onClose:l,onToggle:u}=Ee(Oy,void 0),c=B(null),f=()=>{if(E(i)||r.disabled)return!0},d=tn(r,"trigger"),h=fi(f,Do(d,"hover",s)),v=fi(f,Do(d,"hover",l)),p=fi(f,Do(d,"click",b=>{b.button===0&&u(b)})),g=fi(f,Do(d,"focus",s)),m=fi(f,Do(d,"focus",l)),y=fi(f,Do(d,"contextmenu",b=>{b.preventDefault(),u(b)})),_=fi(f,b=>{const{code:x}=b;r.triggerKeys.includes(x)&&(b.preventDefault(),u(b))});return t({triggerRef:c}),(b,x)=>(Y(),_e(E(Dz),{id:E(a),"virtual-ref":b.virtualRef,open:E(o),"virtual-triggering":b.virtualTriggering,class:ue(E(n).e("trigger")),onBlur:E(m),onClick:E(p),onContextmenu:E(y),onFocus:E(g),onMouseenter:E(h),onMouseleave:E(v),onKeydown:E(_)},{default:Z(()=>[$e(b.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var v6=Ze(h6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/trigger.vue"]]);const p6=ce({name:"ElTooltipContent",inheritAttrs:!1}),g6=ce({...p6,props:qr,setup(e,{expose:t}){const r=e,{selector:n}=LM(),i=Fe("tooltip"),a=B(null),o=B(!1),{controlled:s,id:l,open:u,trigger:c,onClose:f,onOpen:d,onShow:h,onHide:v,onBeforeShow:p,onBeforeHide:g}=Ee(Oy,void 0),m=k(()=>r.transition||`${i.namespace.value}-fade-in-linear`),y=k(()=>r.persistent);Xt(()=>{o.value=!0});const _=k(()=>E(y)?!0:E(u)),b=k(()=>r.disabled?!1:E(u)),x=k(()=>r.appendTo||n.value),w=k(()=>{var G;return(G=r.style)!=null?G:{}}),S=k(()=>!E(u)),C=()=>{v()},M=()=>{if(E(s))return!0},P=fi(M,()=>{r.enterable&&E(c)==="hover"&&d()}),A=fi(M,()=>{E(c)==="hover"&&f()}),T=()=>{var G,F;(F=(G=a.value)==null?void 0:G.updatePopper)==null||F.call(G),p==null||p()},D=()=>{g==null||g()},N=()=>{h(),$=pR(k(()=>{var G;return(G=a.value)==null?void 0:G.popperContentRef}),()=>{if(E(s))return;E(c)!=="hover"&&f()})},H=()=>{r.virtualTriggering||f()};let $;return Se(()=>E(u),G=>{G||$==null||$()},{flush:"post"}),Se(()=>r.content,()=>{var G,F;(F=(G=a.value)==null?void 0:G.updatePopper)==null||F.call(G)}),t({contentRef:a}),(G,F)=>(Y(),_e(eO,{disabled:!G.teleported,to:E(x)},[ee(Ci,{name:E(m),onAfterLeave:C,onBeforeEnter:T,onAfterEnter:N,onBeforeLeave:D},{default:Z(()=>[E(_)?nr((Y(),_e(E(i6),ca({key:0,id:E(l),ref_key:"contentRef",ref:a},G.$attrs,{"aria-label":G.ariaLabel,"aria-hidden":E(S),"boundaries-padding":G.boundariesPadding,"fallback-placements":G.fallbackPlacements,"gpu-acceleration":G.gpuAcceleration,offset:G.offset,placement:G.placement,"popper-options":G.popperOptions,strategy:G.strategy,effect:G.effect,enterable:G.enterable,pure:G.pure,"popper-class":G.popperClass,"popper-style":[G.popperStyle,E(w)],"reference-el":G.referenceEl,"trigger-target-el":G.triggerTargetEl,visible:E(b),"z-index":G.zIndex,onMouseenter:E(P),onMouseleave:E(A),onBlur:H,onClose:E(f)}),{default:Z(()=>[o.value?ke("v-if",!0):$e(G.$slots,"default",{key:0})]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[yi,E(b)]]):ke("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var m6=Ze(g6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]);const y6=["innerHTML"],_6={key:1},b6=ce({name:"ElTooltip"}),w6=ce({...b6,props:u6,emits:c6,setup(e,{expose:t,emit:r}){const n=e;rH();const i=My(),a=B(),o=B(),s=()=>{var m;const y=E(a);y&&((m=y.popperInstanceRef)==null||m.update())},l=B(!1),u=B(),{show:c,hide:f,hasUpdateHandler:d}=l6({indicator:l,toggleReason:u}),{onOpen:h,onClose:v}=DM({showAfter:tn(n,"showAfter"),hideAfter:tn(n,"hideAfter"),autoClose:tn(n,"autoClose"),open:c,close:f}),p=k(()=>Br(n.visible)&&!d.value);At(Oy,{controlled:p,id:i,open:$u(l),trigger:tn(n,"trigger"),onOpen:m=>{h(m)},onClose:m=>{v(m)},onToggle:m=>{E(l)?v(m):h(m)},onShow:()=>{r("show",u.value)},onHide:()=>{r("hide",u.value)},onBeforeShow:()=>{r("before-show",u.value)},onBeforeHide:()=>{r("before-hide",u.value)},updatePopper:s}),Se(()=>n.disabled,m=>{m&&l.value&&(l.value=!1)});const g=()=>{var m,y;const _=(y=(m=o.value)==null?void 0:m.contentRef)==null?void 0:y.popperContentRef;return _&&_.contains(document.activeElement)};return qC(()=>l.value&&f()),t({popperRef:a,contentRef:o,isFocusInsideContent:g,updatePopper:s,onOpen:h,onClose:v,hide:f}),(m,y)=>(Y(),_e(E(a6),{ref_key:"popperRef",ref:a,role:m.role},{default:Z(()=>[ee(v6,{disabled:m.disabled,trigger:m.trigger,"trigger-keys":m.triggerKeys,"virtual-ref":m.virtualRef,"virtual-triggering":m.virtualTriggering},{default:Z(()=>[m.$slots.default?$e(m.$slots,"default",{key:0}):ke("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),ee(m6,{ref_key:"contentRef",ref:o,"aria-label":m.ariaLabel,"boundaries-padding":m.boundariesPadding,content:m.content,disabled:m.disabled,effect:m.effect,enterable:m.enterable,"fallback-placements":m.fallbackPlacements,"hide-after":m.hideAfter,"gpu-acceleration":m.gpuAcceleration,offset:m.offset,persistent:m.persistent,"popper-class":m.popperClass,"popper-style":m.popperStyle,placement:m.placement,"popper-options":m.popperOptions,pure:m.pure,"raw-content":m.rawContent,"reference-el":m.referenceEl,"trigger-target-el":m.triggerTargetEl,"show-after":m.showAfter,strategy:m.strategy,teleported:m.teleported,transition:m.transition,"virtual-triggering":m.virtualTriggering,"z-index":m.zIndex,"append-to":m.appendTo},{default:Z(()=>[$e(m.$slots,"content",{},()=>[m.rawContent?(Y(),me("span",{key:0,innerHTML:m.content},null,8,y6)):(Y(),me("span",_6,Te(m.content),1))]),m.showArrow?(Y(),_e(E(Mz),{key:0,"arrow-offset":m.arrowOffset},null,8,["arrow-offset"])):ke("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var x6=Ze(w6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/tooltip.vue"]]);const Ju=hr(x6),S6=tt({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"}}),C6=["textContent"],T6=ce({name:"ElBadge"}),M6=ce({...T6,props:S6,setup(e,{expose:t}){const r=e,n=Fe("badge"),i=k(()=>r.isDot?"":$t(r.value)&&$t(r.max)?r.max(Y(),me("div",{class:ue(E(n).b())},[$e(a.$slots,"default"),ee(Ci,{name:`${E(n).namespace.value}-zoom-in-center`,persisted:""},{default:Z(()=>[nr(ae("sup",{class:ue([E(n).e("content"),E(n).em("content",a.type),E(n).is("fixed",!!a.$slots.default),E(n).is("dot",a.isDot)]),textContent:Te(E(i))},null,10,C6),[[yi,!a.hidden&&(E(i)||a.isDot)]])]),_:1},8,["name"])],2))}});var A6=Ze(M6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);const E6=hr(A6),ZM=Symbol("buttonGroupContextKey"),P6=(e,t)=>{vy({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},k(()=>e.type==="text"));const r=Ee(ZM,void 0),n=Ey("button"),{form:i}=Zu(),a=ia(k(()=>r==null?void 0:r.size)),o=rh(),s=B(),l=Yd(),u=k(()=>e.type||(r==null?void 0:r.type)||""),c=k(()=>{var h,v,p;return(p=(v=e.autoInsertSpace)!=null?v:(h=n.value)==null?void 0:h.autoInsertSpace)!=null?p:!1}),f=k(()=>{var h;const v=(h=l.default)==null?void 0:h.call(l);if(c.value&&(v==null?void 0:v.length)===1){const p=v[0];if((p==null?void 0:p.type)===Ns){const g=p.children;return/^\p{Unified_Ideograph}{2}$/u.test(g.trim())}}return!1});return{_disabled:o,_size:a,_type:u,_ref:s,shouldAddSpace:f,handleClick:h=>{e.nativeType==="reset"&&(i==null||i.resetFields()),t("click",h)}}},L6=["default","primary","success","warning","info","danger","text",""],D6=["button","submit","reset"],ig=tt({size:Xu,disabled:Boolean,type:{type:String,values:L6,default:""},icon:{type:Wn},nativeType:{type:String,values:D6,default:"button"},loading:Boolean,loadingIcon:{type:Wn,default:()=>hy},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0}}),I6={click:e=>e instanceof MouseEvent};function Kt(e,t){O6(e)&&(e="100%");var r=R6(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Sc(e){return Math.min(1,Math.max(0,e))}function O6(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function R6(e){return typeof e=="string"&&e.indexOf("%")!==-1}function QM(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Cc(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Qa(e){return e.length===1?"0"+e:String(e)}function k6(e,t,r){return{r:Kt(e,255)*255,g:Kt(t,255)*255,b:Kt(r,255)*255}}function n1(e,t,r){e=Kt(e,255),t=Kt(t,255),r=Kt(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a=0,o=0,s=(n+i)/2;if(n===i)o=0,a=0;else{var l=n-i;switch(o=s>.5?l/(2-n-i):l/(n+i),n){case e:a=(t-r)/l+(t1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function N6(e,t,r){var n,i,a;if(e=Kt(e,360),t=Kt(t,100),r=Kt(r,100),t===0)i=r,a=r,n=r;else{var o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;n=jh(s,o,e+1/3),i=jh(s,o,e),a=jh(s,o,e-1/3)}return{r:n*255,g:i*255,b:a*255}}function i1(e,t,r){e=Kt(e,255),t=Kt(t,255),r=Kt(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a=0,o=n,s=n-i,l=n===0?0:s/n;if(n===i)a=0;else{switch(n){case e:a=(t-r)/s+(t>16,g:(e&65280)>>8,b:e&255}}var ag={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function z6(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,a=null,o=!1,s=!1;return typeof e=="string"&&(e=G6(e)),typeof e=="object"&&(ii(e.r)&&ii(e.g)&&ii(e.b)?(t=k6(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ii(e.h)&&ii(e.s)&&ii(e.v)?(n=Cc(e.s),i=Cc(e.v),t=F6(e.h,n,i),o=!0,s="hsv"):ii(e.h)&&ii(e.s)&&ii(e.l)&&(n=Cc(e.s),a=Cc(e.l),t=N6(e.h,n,a),o=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=QM(r),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var W6="[-\\+]?\\d+%?",V6="[-\\+]?\\d*\\.\\d+%?",ji="(?:".concat(V6,")|(?:").concat(W6,")"),Yh="[\\s|\\(]+(".concat(ji,")[,|\\s]+(").concat(ji,")[,|\\s]+(").concat(ji,")\\s*\\)?"),qh="[\\s|\\(]+(".concat(ji,")[,|\\s]+(").concat(ji,")[,|\\s]+(").concat(ji,")[,|\\s]+(").concat(ji,")\\s*\\)?"),pn={CSS_UNIT:new RegExp(ji),rgb:new RegExp("rgb"+Yh),rgba:new RegExp("rgba"+qh),hsl:new RegExp("hsl"+Yh),hsla:new RegExp("hsla"+qh),hsv:new RegExp("hsv"+Yh),hsva:new RegExp("hsva"+qh),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function G6(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(ag[e])e=ag[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=pn.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=pn.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=pn.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=pn.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=pn.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=pn.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=pn.hex8.exec(e),r?{r:Ir(r[1]),g:Ir(r[2]),b:Ir(r[3]),a:o1(r[4]),format:t?"name":"hex8"}:(r=pn.hex6.exec(e),r?{r:Ir(r[1]),g:Ir(r[2]),b:Ir(r[3]),format:t?"name":"hex"}:(r=pn.hex4.exec(e),r?{r:Ir(r[1]+r[1]),g:Ir(r[2]+r[2]),b:Ir(r[3]+r[3]),a:o1(r[4]+r[4]),format:t?"name":"hex8"}:(r=pn.hex3.exec(e),r?{r:Ir(r[1]+r[1]),g:Ir(r[2]+r[2]),b:Ir(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function ii(e){return Boolean(pn.CSS_UNIT.exec(String(e)))}var JM=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=H6(t)),this.originalInput=t;var i=z6(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,i,a=t.r/255,o=t.g/255,s=t.b/255;return a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=QM(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=i1(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=i1(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=n1(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=n1(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),a1(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),B6(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(Kt(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(Kt(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+a1(this.r,this.g,this.b,!1),r=0,n=Object.entries(ag);r=0,a=!r&&i&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=Sc(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=Sc(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=Sc(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=Sc(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),a=r/100,o={r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a};return new e(o)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,a=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,a.push(new e(n));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/t;t--;)o.push(new e({h:n,s:i,v:a})),a=(a+s)%1;return o},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb();return new e({r:n.r+(r.r-n.r)*r.a,g:n.g+(r.g-n.g)*r.a,b:n.b+(r.b-n.b)*r.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,i=[this],a=360/t,o=1;o{let n={};const i=e.color;if(i){const a=new JM(i),o=e.dark?a.tint(20).toString():Di(a,20);if(e.plain)n=r.cssVarBlock({"bg-color":e.dark?Di(a,90):a.tint(90).toString(),"text-color":i,"border-color":e.dark?Di(a,50):a.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":o,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":o}),t.value&&(n[r.cssVarBlockName("disabled-bg-color")]=e.dark?Di(a,90):a.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=e.dark?Di(a,50):a.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=e.dark?Di(a,80):a.tint(80).toString());else{const s=e.dark?Di(a,30):a.tint(30).toString(),l=a.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(n=r.cssVarBlock({"bg-color":i,"text-color":l,"border-color":i,"hover-bg-color":s,"hover-text-color":l,"hover-border-color":s,"active-bg-color":o,"active-border-color":o}),t.value){const u=e.dark?Di(a,50):a.tint(50).toString();n[r.cssVarBlockName("disabled-bg-color")]=u,n[r.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,n[r.cssVarBlockName("disabled-border-color")]=u}}}return n})}const j6=["aria-disabled","disabled","autofocus","type"],Y6=ce({name:"ElButton"}),q6=ce({...Y6,props:ig,emits:I6,setup(e,{expose:t,emit:r}){const n=e,i=U6(n),a=Fe("button"),{_ref:o,_size:s,_type:l,_disabled:u,shouldAddSpace:c,handleClick:f}=P6(n,r);return t({ref:o,size:s,type:l,disabled:u,shouldAddSpace:c}),(d,h)=>(Y(),me("button",{ref_key:"_ref",ref:o,class:ue([E(a).b(),E(a).m(E(l)),E(a).m(E(s)),E(a).is("disabled",E(u)),E(a).is("loading",d.loading),E(a).is("plain",d.plain),E(a).is("round",d.round),E(a).is("circle",d.circle),E(a).is("text",d.text),E(a).is("link",d.link),E(a).is("has-bg",d.bg)]),"aria-disabled":E(u)||d.loading,disabled:E(u)||d.loading,autofocus:d.autofocus,type:d.nativeType,style:St(E(i)),onClick:h[0]||(h[0]=(...v)=>E(f)&&E(f)(...v))},[d.loading?(Y(),me(pt,{key:0},[d.$slots.loading?$e(d.$slots,"loading",{key:0}):(Y(),_e(E(lr),{key:1,class:ue(E(a).is("loading"))},{default:Z(()=>[(Y(),_e(nn(d.loadingIcon)))]),_:1},8,["class"]))],64)):d.icon||d.$slots.icon?(Y(),_e(E(lr),{key:1},{default:Z(()=>[d.icon?(Y(),_e(nn(d.icon),{key:0})):$e(d.$slots,"icon",{key:1})]),_:3})):ke("v-if",!0),d.$slots.default?(Y(),me("span",{key:2,class:ue({[E(a).em("text","expand")]:E(c)})},[$e(d.$slots,"default")],2)):ke("v-if",!0)],14,j6))}});var K6=Ze(q6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);const X6={size:ig.size,type:ig.type},Z6=ce({name:"ElButtonGroup"}),Q6=ce({...Z6,props:X6,setup(e){const t=e;At(ZM,fn({size:tn(t,"size"),type:tn(t,"type")}));const r=Fe("button");return(n,i)=>(Y(),me("div",{class:ue(`${E(r).b("group")}`)},[$e(n.$slots,"default")],2))}});var eA=Ze(Q6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);const J6=hr(K6,{ButtonGroup:eA});fa(eA);var e8=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};const Hi=new Map;let s1;Nt&&(document.addEventListener("mousedown",e=>s1=e),document.addEventListener("mouseup",e=>{for(const t of Hi.values())for(const{documentHandler:r}of t)r(e,s1)}));function l1(e,t){let r=[];return Array.isArray(t.arg)?r=t.arg:ys(t.arg)&&r.push(t.arg),function(n,i){const a=t.instance.popperRef,o=n.target,s=i==null?void 0:i.target,l=!t||!t.instance,u=!o||!s,c=e.contains(o)||e.contains(s),f=e===o,d=r.length&&r.some(v=>v==null?void 0:v.contains(o))||r.length&&r.includes(s),h=a&&(a.contains(o)||a.contains(s));l||u||c||f||d||h||t.value(n,i)}}const t8={beforeMount(e,t){Hi.has(e)||Hi.set(e,[]),Hi.get(e).push({documentHandler:l1(e,t),bindingFn:t.value})},updated(e,t){Hi.has(e)||Hi.set(e,[]);const r=Hi.get(e),n=r.findIndex(a=>a.bindingFn===t.oldValue),i={documentHandler:l1(e,t),bindingFn:t.value};n>=0?r.splice(n,1,i):r.push(i)},unmounted(e){Hi.delete(e)}};var u1=!1,qa,og,sg,Af,Ef,tA,Pf,lg,ug,cg,rA,fg,dg,nA,iA;function vr(){if(!u1){u1=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),r=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(fg=/\b(iPhone|iP[ao]d)/.exec(e),dg=/\b(iP[ao]d)/.exec(e),cg=/Android/i.exec(e),nA=/FBAN\/\w+;/i.exec(e),iA=/Mobile/i.exec(e),rA=!!/Win64/.exec(e),t){qa=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,qa&&document&&document.documentMode&&(qa=document.documentMode);var n=/(?:Trident\/(\d+.\d+))/.exec(e);tA=n?parseFloat(n[1])+4:qa,og=t[2]?parseFloat(t[2]):NaN,sg=t[3]?parseFloat(t[3]):NaN,Af=t[4]?parseFloat(t[4]):NaN,Af?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),Ef=t&&t[1]?parseFloat(t[1]):NaN):Ef=NaN}else qa=og=sg=Ef=Af=NaN;if(r){if(r[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);Pf=i?parseFloat(i[1].replace("_",".")):!0}else Pf=!1;lg=!!r[2],ug=!!r[3]}else Pf=lg=ug=!1}}var hg={ie:function(){return vr()||qa},ieCompatibilityMode:function(){return vr()||tA>qa},ie64:function(){return hg.ie()&&rA},firefox:function(){return vr()||og},opera:function(){return vr()||sg},webkit:function(){return vr()||Af},safari:function(){return hg.webkit()},chrome:function(){return vr()||Ef},windows:function(){return vr()||lg},osx:function(){return vr()||Pf},linux:function(){return vr()||ug},iphone:function(){return vr()||fg},mobile:function(){return vr()||fg||dg||cg||iA},nativeApp:function(){return vr()||nA},android:function(){return vr()||cg},ipad:function(){return vr()||dg}},r8=hg,Tc=!!(typeof window<"u"&&window.document&&window.document.createElement),n8={canUseDOM:Tc,canUseWorkers:typeof Worker<"u",canUseEventListeners:Tc&&!!(window.addEventListener||window.attachEvent),canUseViewport:Tc&&!!window.screen,isInWorker:!Tc},aA=n8,oA;aA.canUseDOM&&(oA=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function i8(e,t){if(!aA.canUseDOM||t&&!("addEventListener"in document))return!1;var r="on"+e,n=r in document;if(!n){var i=document.createElement("div");i.setAttribute(r,"return;"),n=typeof i[r]=="function"}return!n&&oA&&e==="wheel"&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}var a8=i8,c1=10,f1=40,d1=800;function sA(e){var t=0,r=0,n=0,i=0;return"detail"in e&&(r=e.detail),"wheelDelta"in e&&(r=-e.wheelDelta/120),"wheelDeltaY"in e&&(r=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=r,r=0),n=t*c1,i=r*c1,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||i)&&e.deltaMode&&(e.deltaMode==1?(n*=f1,i*=f1):(n*=d1,i*=d1)),n&&!t&&(t=n<1?-1:1),i&&!r&&(r=i<1?-1:1),{spinX:t,spinY:r,pixelX:n,pixelY:i}}sA.getEventType=function(){return r8.firefox()?"DOMMouseScroll":a8("wheel")?"wheel":"mousewheel"};var o8=sA;/** +`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),a=new RegExp("(?:^"+r+"$)|(?:^"+i+"$)"),o=new RegExp("^"+r+"$"),s=new RegExp("^"+i+"$"),l=function(b){return b&&b.exact?a:new RegExp("(?:"+t(b)+r+t(b)+")|(?:"+t(b)+i+t(b)+")","g")};l.v4=function(_){return _&&_.exact?o:new RegExp(""+t(_)+r+t(_),"g")},l.v6=function(_){return _&&_.exact?s:new RegExp(""+t(_)+i+t(_),"g")};var u="(?:(?:[a-z]+:)?//)",c="(?:\\S+(?::\\S*)?@)?",f=l.v4().source,d=l.v6().source,h="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",v="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",p="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",g="(?::\\d{2,5})?",m='(?:[/?#][^\\s"]*)?',y="(?:"+u+"|www\\.)"+c+"(?:localhost|"+f+"|"+d+"|"+h+v+p+")"+g+m;return _c=new RegExp("(?:^"+y+"$)","i"),_c},jb={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},bl={integer:function(t){return bl.number(t)&&parseInt(t,10)===t},float:function(t){return bl.number(t)&&!bl.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!bl.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(jb.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(RH())},hex:function(t){return typeof t=="string"&&!!t.match(jb.hex)}},kH=function(t,r,n,i,a){if(t.required&&r===void 0){BM(t,r,n,i,a);return}var o=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;o.indexOf(s)>-1?bl[s](r)||i.push(kr(a.messages.types[s],t.fullField,t.type)):s&&typeof r!==t.type&&i.push(kr(a.messages.types[s],t.fullField,t.type))},NH=function(t,r,n,i,a){var o=typeof t.len=="number",s=typeof t.min=="number",l=typeof t.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=r,f=null,d=typeof r=="number",h=typeof r=="string",v=Array.isArray(r);if(d?f="number":h?f="string":v&&(f="array"),!f)return!1;v&&(c=r.length),h&&(c=r.replace(u,"_").length),o?c!==t.len&&i.push(kr(a.messages[f].len,t.fullField,t.len)):s&&!l&&ct.max?i.push(kr(a.messages[f].max,t.fullField,t.max)):s&&l&&(ct.max)&&i.push(kr(a.messages[f].range,t.fullField,t.min,t.max))},Lo="enum",FH=function(t,r,n,i,a){t[Lo]=Array.isArray(t[Lo])?t[Lo]:[],t[Lo].indexOf(r)===-1&&i.push(kr(a.messages[Lo],t.fullField,t[Lo].join(", ")))},BH=function(t,r,n,i,a){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(r)||i.push(kr(a.messages.pattern.mismatch,t.fullField,r,t.pattern));else if(typeof t.pattern=="string"){var o=new RegExp(t.pattern);o.test(r)||i.push(kr(a.messages.pattern.mismatch,t.fullField,r,t.pattern))}}},Ye={required:BM,whitespace:OH,type:kH,range:NH,enum:FH,pattern:BH},$H=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r,"string")&&!t.required)return n();Ye.required(t,r,i,o,a,"string"),zt(r,"string")||(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a),Ye.pattern(t,r,i,o,a),t.whitespace===!0&&Ye.whitespace(t,r,i,o,a))}n(o)},HH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&Ye.type(t,r,i,o,a)}n(o)},zH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(r===""&&(r=void 0),zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a))}n(o)},WH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&Ye.type(t,r,i,o,a)}n(o)},VH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),zt(r)||Ye.type(t,r,i,o,a)}n(o)},GH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a))}n(o)},UH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a))}n(o)},jH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(r==null&&!t.required)return n();Ye.required(t,r,i,o,a,"array"),r!=null&&(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a))}n(o)},YH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&Ye.type(t,r,i,o,a)}n(o)},qH="enum",KH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&Ye[qH](t,r,i,o,a)}n(o)},XH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r,"string")&&!t.required)return n();Ye.required(t,r,i,o,a),zt(r,"string")||Ye.pattern(t,r,i,o,a)}n(o)},ZH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r,"date")&&!t.required)return n();if(Ye.required(t,r,i,o,a),!zt(r,"date")){var l;r instanceof Date?l=r:l=new Date(r),Ye.type(t,l,i,o,a),l&&Ye.range(t,l.getTime(),i,o,a)}}n(o)},QH=function(t,r,n,i,a){var o=[],s=Array.isArray(r)?"array":typeof r;Ye.required(t,r,i,o,a,s),n(o)},Vh=function(t,r,n,i,a){var o=t.type,s=[],l=t.required||!t.required&&i.hasOwnProperty(t.field);if(l){if(zt(r,o)&&!t.required)return n();Ye.required(t,r,i,s,a,o),zt(r,o)||Ye.type(t,r,i,s,a)}n(s)},JH=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(zt(r)&&!t.required)return n();Ye.required(t,r,i,o,a)}n(o)},Nl={string:$H,method:HH,number:zH,boolean:WH,regexp:VH,integer:GH,float:UH,array:jH,object:YH,enum:KH,pattern:XH,date:ZH,url:Vh,hex:Vh,email:Vh,required:QH,any:JH};function rg(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var ng=rg(),Qu=function(){function e(r){this.rules=null,this._messages=ng,this.define(r)}var t=e.prototype;return t.define=function(n){var i=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(typeof n!="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(a){var o=n[a];i.rules[a]=Array.isArray(o)?o:[o]})},t.messages=function(n){return n&&(this._messages=Ub(rg(),n)),this._messages},t.validate=function(n,i,a){var o=this;i===void 0&&(i={}),a===void 0&&(a=function(){});var s=n,l=i,u=a;if(typeof l=="function"&&(u=l,l={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,s),Promise.resolve(s);function c(p){var g=[],m={};function y(b){if(Array.isArray(b)){var x;g=(x=g).concat.apply(x,b)}else g.push(b)}for(var _=0;_");const i=Ne("form"),a=B(),o=B(0),s=()=>{var c;if((c=a.value)!=null&&c.firstElementChild){const f=window.getComputedStyle(a.value.firstElementChild).width;return Math.ceil(Number.parseFloat(f))}else return 0},l=(c="update")=>{Ft(()=>{t.default&&e.isAutoWidth&&(c==="update"?o.value=s():c==="remove"&&(r==null||r.deregisterLabelWidth(o.value)))})},u=()=>l("update");return wt(()=>{u()}),Xt(()=>{l("remove")}),Hu(()=>u()),Se(o,(c,f)=>{e.updateAll&&(r==null||r.registerLabelWidth(c,f))}),gs(k(()=>{var c,f;return(f=(c=a.value)==null?void 0:c.firstElementChild)!=null?f:null}),u),()=>{var c,f;if(!t)return null;const{isAutoWidth:d}=e;if(d){const h=r==null?void 0:r.autoLabelWidth,v=n==null?void 0:n.hasLabel,p={};if(v&&h&&h!=="auto"){const g=Math.max(0,Number.parseInt(h,10)-o.value),m=r.labelPosition==="left"?"marginRight":"marginLeft";g&&(p[m]=`${g}px`)}return ee("div",{ref:a,class:[i.be("item","label-wrap")],style:p},[(c=t.default)==null?void 0:c.call(t)])}else return ee(pt,{ref:a},[(f=t.default)==null?void 0:f.call(t)])}}});const nz=["role","aria-labelledby"],iz=ce({name:"ElFormItem"}),az=ce({...iz,props:tz,setup(e,{expose:t}){const r=e,n=Yd(),i=Ee(Bs,void 0),a=Ee(mo,void 0),o=ia(void 0,{formItem:!1}),s=Ne("form-item"),l=My().value,u=B([]),c=B(""),f=tR(c,100),d=B(""),h=B();let v,p=!1;const g=k(()=>{if((i==null?void 0:i.labelPosition)==="top")return{};const W=po(r.labelWidth||(i==null?void 0:i.labelWidth)||"");return W?{width:W}:{}}),m=k(()=>{if((i==null?void 0:i.labelPosition)==="top"||i!=null&&i.inline)return{};if(!r.label&&!r.labelWidth&&M)return{};const W=po(r.labelWidth||(i==null?void 0:i.labelWidth)||"");return!r.label&&!n.label?{marginLeft:W}:{}}),y=k(()=>[s.b(),s.m(o.value),s.is("error",c.value==="error"),s.is("validating",c.value==="validating"),s.is("success",c.value==="success"),s.is("required",N.value||r.required),s.is("no-asterisk",i==null?void 0:i.hideRequiredAsterisk),(i==null?void 0:i.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[s.m("feedback")]:i==null?void 0:i.statusIcon}]),_=k(()=>Br(r.inlineMessage)?r.inlineMessage:(i==null?void 0:i.inlineMessage)||!1),b=k(()=>[s.e("error"),{[s.em("error","inline")]:_.value}]),x=k(()=>r.prop?He(r.prop)?r.prop:r.prop.join("."):""),w=k(()=>!!(r.label||n.label)),S=k(()=>r.for||u.value.length===1?u.value[0]:void 0),C=k(()=>!S.value&&w.value),M=!!a,P=k(()=>{const W=i==null?void 0:i.model;if(!(!W||!r.prop))return Sf(W,r.prop).value}),A=k(()=>{const{required:W}=r,q=[];r.rules&&q.push(...$p(r.rules));const le=i==null?void 0:i.rules;if(le&&r.prop){const de=Sf(le,r.prop).value;de&&q.push(...$p(de))}if(W!==void 0){const de=q.map((J,L)=>[J,L]).filter(([J])=>Object.keys(J).includes("required"));if(de.length>0)for(const[J,L]of de)J.required!==W&&(q[L]={...J,required:W});else q.push({required:W})}return q}),T=k(()=>A.value.length>0),D=W=>A.value.filter(le=>!le.trigger||!W?!0:Array.isArray(le.trigger)?le.trigger.includes(W):le.trigger===W).map(({trigger:le,...de})=>de),N=k(()=>A.value.some(W=>W.required)),H=k(()=>{var W;return f.value==="error"&&r.showMessage&&((W=i==null?void 0:i.showMessage)!=null?W:!0)}),$=k(()=>`${r.label||""}${(i==null?void 0:i.labelSuffix)||""}`),G=W=>{c.value=W},F=W=>{var q,le;const{errors:de,fields:J}=W;(!de||!J)&&console.error(W),G("error"),d.value=de?(le=(q=de==null?void 0:de[0])==null?void 0:q.message)!=null?le:`${r.prop} is required`:"",i==null||i.emit("validate",r.prop,!1,d.value)},R=()=>{G("success"),i==null||i.emit("validate",r.prop,!0,"")},j=async W=>{const q=x.value;return new Qu({[q]:W}).validate({[q]:P.value},{firstFields:!0}).then(()=>(R(),!0)).catch(de=>(F(de),Promise.reject(de)))},re=async(W,q)=>{if(p||!r.prop)return!1;const le=De(q);if(!T.value)return q==null||q(!1),!1;const de=D(W);return de.length===0?(q==null||q(!0),!0):(G("validating"),j(de).then(()=>(q==null||q(!0),!0)).catch(J=>{const{fields:L}=J;return q==null||q(!1,L),le?!1:Promise.reject(L)}))},oe=()=>{G(""),d.value="",p=!1},ye=async()=>{const W=i==null?void 0:i.model;if(!W||!r.prop)return;const q=Sf(W,r.prop);p=!0,q.value=bb(v),await Ft(),oe(),p=!1},Ae=W=>{u.value.includes(W)||u.value.push(W)},V=W=>{u.value=u.value.filter(q=>q!==W)};Se(()=>r.error,W=>{d.value=W||"",G(W?"error":"")},{immediate:!0}),Se(()=>r.validateStatus,W=>G(W||""));const Q=fn({...$d(r),$el:h,size:o,validateState:c,labelId:l,inputIds:u,isGroup:C,hasLabel:w,addInputId:Ae,removeInputId:V,resetField:ye,clearValidate:oe,validate:re});return At(mo,Q),wt(()=>{r.prop&&(i==null||i.addField(Q),v=bb(P.value))}),Xt(()=>{i==null||i.removeField(Q)}),t({size:o,validateMessage:d,validateState:c,validate:re,clearValidate:oe,resetField:ye}),(W,q)=>{var le;return Y(),me("div",{ref_key:"formItemRef",ref:h,class:ue(E(y)),role:E(C)?"group":void 0,"aria-labelledby":E(C)?E(l):void 0},[ee(E(rz),{"is-auto-width":E(g).width==="auto","update-all":((le=E(i))==null?void 0:le.labelWidth)==="auto"},{default:Z(()=>[E(w)?(Y(),_e(nn(E(S)?"label":"div"),{key:0,id:E(l),for:E(S),class:ue(E(s).e("label")),style:St(E(g))},{default:Z(()=>[$e(W.$slots,"label",{label:E($)},()=>[Bt(Me(E($)),1)])]),_:3},8,["id","for","class","style"])):Fe("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),ae("div",{class:ue(E(s).e("content")),style:St(E(m))},[$e(W.$slots,"default"),ee(NO,{name:`${E(s).namespace.value}-zoom-in-top`},{default:Z(()=>[E(H)?$e(W.$slots,"error",{key:0,error:d.value},()=>[ae("div",{class:ue(E(b))},Me(d.value),3)]):Fe("v-if",!0)]),_:3},8,["name"])],6)],10,nz)}}});var $M=Ze(az,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]);const HM=hr(wH,{FormItem:$M}),zM=fa($M),Qo=4,oz={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},sz=({move:e,size:t,bar:r})=>({[r.size]:t,transform:`translate${r.axis}(${e}%)`}),WM=Symbol("scrollbarContextKey"),lz=tt({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),uz="Thumb",cz=ce({__name:"thumb",props:lz,setup(e){const t=e,r=Ee(WM),n=Ne("scrollbar");r||na(uz,"can not inject scrollbar context");const i=B(),a=B(),o=B({}),s=B(!1);let l=!1,u=!1,c=Nt?document.onselectstart:null;const f=k(()=>oz[t.vertical?"vertical":"horizontal"]),d=k(()=>sz({size:t.size,move:t.move,bar:f.value})),h=k(()=>i.value[f.value.offset]**2/r.wrapElement[f.value.scrollSize]/t.ratio/a.value[f.value.offset]),v=w=>{var S;if(w.stopPropagation(),w.ctrlKey||[1,2].includes(w.button))return;(S=window.getSelection())==null||S.removeAllRanges(),g(w);const C=w.currentTarget;C&&(o.value[f.value.axis]=C[f.value.offset]-(w[f.value.client]-C.getBoundingClientRect()[f.value.direction]))},p=w=>{if(!a.value||!i.value||!r.wrapElement)return;const S=Math.abs(w.target.getBoundingClientRect()[f.value.direction]-w[f.value.client]),C=a.value[f.value.offset]/2,M=(S-C)*100*h.value/i.value[f.value.offset];r.wrapElement[f.value.scroll]=M*r.wrapElement[f.value.scrollSize]/100},g=w=>{w.stopImmediatePropagation(),l=!0,document.addEventListener("mousemove",m),document.addEventListener("mouseup",y),c=document.onselectstart,document.onselectstart=()=>!1},m=w=>{if(!i.value||!a.value||l===!1)return;const S=o.value[f.value.axis];if(!S)return;const C=(i.value.getBoundingClientRect()[f.value.direction]-w[f.value.client])*-1,M=a.value[f.value.offset]-S,P=(C-M)*100*h.value/i.value[f.value.offset];r.wrapElement[f.value.scroll]=P*r.wrapElement[f.value.scrollSize]/100},y=()=>{l=!1,o.value[f.value.axis]=0,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",y),x(),u&&(s.value=!1)},_=()=>{u=!1,s.value=!!t.size},b=()=>{u=!0,s.value=l};Xt(()=>{x(),document.removeEventListener("mouseup",y)});const x=()=>{document.onselectstart!==c&&(document.onselectstart=c)};return xn(tn(r,"scrollbarElement"),"mousemove",_),xn(tn(r,"scrollbarElement"),"mouseleave",b),(w,S)=>(Y(),_e(Ci,{name:E(n).b("fade"),persisted:""},{default:Z(()=>[nr(ae("div",{ref_key:"instance",ref:i,class:ue([E(n).e("bar"),E(n).is(E(f).key)]),onMousedown:p},[ae("div",{ref_key:"thumb",ref:a,class:ue(E(n).e("thumb")),style:St(E(d)),onMousedown:v},null,38)],34),[[yi,w.always||s.value]])]),_:1},8,["name"]))}});var qb=Ze(cz,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/thumb.vue"]]);const fz=tt({always:{type:Boolean,default:!0},width:String,height:String,ratioX:{type:Number,default:1},ratioY:{type:Number,default:1}}),dz=ce({__name:"bar",props:fz,setup(e,{expose:t}){const r=e,n=B(0),i=B(0);return t({handleScroll:o=>{if(o){const s=o.offsetHeight-Qo,l=o.offsetWidth-Qo;i.value=o.scrollTop*100/s*r.ratioY,n.value=o.scrollLeft*100/l*r.ratioX}}}),(o,s)=>(Y(),me(pt,null,[ee(qb,{move:n.value,ratio:o.ratioX,size:o.width,always:o.always},null,8,["move","ratio","size","always"]),ee(qb,{move:i.value,ratio:o.ratioY,size:o.height,vertical:"",always:o.always},null,8,["move","ratio","size","always"])],64))}});var hz=Ze(dz,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/bar.vue"]]);const vz=tt({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:Le([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20}}),pz={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every($t)},gz="ElScrollbar",mz=ce({name:gz}),yz=ce({...mz,props:vz,emits:pz,setup(e,{expose:t,emit:r}){const n=e,i=Ne("scrollbar");let a,o;const s=B(),l=B(),u=B(),c=B("0"),f=B("0"),d=B(),h=B(1),v=B(1),p=k(()=>{const S={};return n.height&&(S.height=po(n.height)),n.maxHeight&&(S.maxHeight=po(n.maxHeight)),[n.wrapStyle,S]}),g=k(()=>[n.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!n.native}]),m=k(()=>[i.e("view"),n.viewClass]),y=()=>{var S;l.value&&((S=d.value)==null||S.handleScroll(l.value),r("scroll",{scrollTop:l.value.scrollTop,scrollLeft:l.value.scrollLeft}))};function _(S,C){Xe(S)?l.value.scrollTo(S):$t(S)&&$t(C)&&l.value.scrollTo(S,C)}const b=S=>{$t(S)&&(l.value.scrollTop=S)},x=S=>{$t(S)&&(l.value.scrollLeft=S)},w=()=>{if(!l.value)return;const S=l.value.offsetHeight-Qo,C=l.value.offsetWidth-Qo,M=S**2/l.value.scrollHeight,P=C**2/l.value.scrollWidth,A=Math.max(M,n.minSize),T=Math.max(P,n.minSize);h.value=M/(S-M)/(A/(S-A)),v.value=P/(C-P)/(T/(C-T)),f.value=A+Qon.noresize,S=>{S?(a==null||a(),o==null||o()):({stop:a}=gs(u,w),o=xn("resize",w))},{immediate:!0}),Se(()=>[n.maxHeight,n.height],()=>{n.native||Ft(()=>{var S;w(),l.value&&((S=d.value)==null||S.handleScroll(l.value))})}),At(WM,fn({scrollbarElement:s,wrapElement:l})),wt(()=>{n.native||Ft(()=>{w()})}),Hu(()=>w()),t({wrapRef:l,update:w,scrollTo:_,setScrollTop:b,setScrollLeft:x,handleScroll:y}),(S,C)=>(Y(),me("div",{ref_key:"scrollbarRef",ref:s,class:ue(E(i).b())},[ae("div",{ref_key:"wrapRef",ref:l,class:ue(E(g)),style:St(E(p)),onScroll:y},[(Y(),_e(nn(S.tag),{ref_key:"resizeRef",ref:u,class:ue(E(m)),style:St(S.viewStyle)},{default:Z(()=>[$e(S.$slots,"default")]),_:3},8,["class","style"]))],38),S.native?Fe("v-if",!0):(Y(),_e(hz,{key:0,ref_key:"barRef",ref:d,height:f.value,width:c.value,always:S.always,"ratio-x":v.value,"ratio-y":h.value},null,8,["height","width","always","ratio-x","ratio-y"]))],2))}});var _z=Ze(yz,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/scrollbar.vue"]]);const VM=hr(_z),Ly=Symbol("popper"),GM=Symbol("popperContent"),bz=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],UM=tt({role:{type:String,values:bz,default:"tooltip"}}),wz=ce({name:"ElPopper",inheritAttrs:!1}),xz=ce({...wz,props:UM,setup(e,{expose:t}){const r=e,n=B(),i=B(),a=B(),o=B(),s=k(()=>r.role),l={triggerRef:n,popperInstanceRef:i,contentRef:a,referenceRef:o,role:s};return t(l),At(Ly,l),(u,c)=>$e(u.$slots,"default")}});var Sz=Ze(xz,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/popper.vue"]]);const jM=tt({arrowOffset:{type:Number,default:5}}),Cz=ce({name:"ElPopperArrow",inheritAttrs:!1}),Tz=ce({...Cz,props:jM,setup(e,{expose:t}){const r=e,n=Ne("popper"),{arrowOffset:i,arrowRef:a,arrowStyle:o}=Ee(GM,void 0);return Se(()=>r.arrowOffset,s=>{i.value=s}),Xt(()=>{a.value=void 0}),t({arrowRef:a}),(s,l)=>(Y(),me("span",{ref_key:"arrowRef",ref:a,class:ue(E(n).e("arrow")),style:St(E(o)),"data-popper-arrow":""},null,6))}});var Mz=Ze(Tz,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/arrow.vue"]]);const Az="ElOnlyChild",Ez=ce({name:Az,setup(e,{slots:t,attrs:r}){var n;const i=Ee(IM),a=aH((n=i==null?void 0:i.setForwardRef)!=null?n:ur);return()=>{var o;const s=(o=t.default)==null?void 0:o.call(t,r);if(!s||s.length>1)return null;const l=YM(s);return l?nr(mi(l,r),[[a]]):null}}});function YM(e){if(!e)return null;const t=e;for(const r of t){if(Xe(r))switch(r.type){case xr:continue;case Ns:case"svg":return Kb(r);case pt:return YM(r.children);default:return r}return Kb(r)}return null}function Kb(e){const t=Ne("only-child");return ee("span",{class:t.e("content")},[e])}const qM=tt({virtualRef:{type:Le(Object)},virtualTriggering:Boolean,onMouseenter:{type:Le(Function)},onMouseleave:{type:Le(Function)},onClick:{type:Le(Function)},onKeydown:{type:Le(Function)},onFocus:{type:Le(Function)},onBlur:{type:Le(Function)},onContextmenu:{type:Le(Function)},id:String,open:Boolean}),Pz=ce({name:"ElPopperTrigger",inheritAttrs:!1}),Lz=ce({...Pz,props:qM,setup(e,{expose:t}){const r=e,{role:n,triggerRef:i}=Ee(Ly,void 0);iH(i);const a=k(()=>s.value?r.id:void 0),o=k(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),s=k(()=>{if(n&&n.value!=="tooltip")return n.value}),l=k(()=>s.value?`${r.open}`:void 0);let u;return wt(()=>{Se(()=>r.virtualRef,c=>{c&&(i.value=Ui(c))},{immediate:!0}),Se(i,(c,f)=>{u==null||u(),u=void 0,ys(c)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(d=>{var h;const v=r[d];v&&(c.addEventListener(d.slice(2).toLowerCase(),v),(h=f==null?void 0:f.removeEventListener)==null||h.call(f,d.slice(2).toLowerCase(),v))}),u=Se([a,o,s,l],d=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((h,v)=>{gu(d[v])?c.removeAttribute(h):c.setAttribute(h,d[v])})},{immediate:!0})),ys(f)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(d=>f.removeAttribute(d))},{immediate:!0})}),Xt(()=>{u==null||u(),u=void 0}),t({triggerRef:i}),(c,f)=>c.virtualTriggering?Fe("v-if",!0):(Y(),_e(E(Ez),ca({key:0},c.$attrs,{"aria-controls":E(a),"aria-describedby":E(o),"aria-expanded":E(l),"aria-haspopup":E(s)}),{default:Z(()=>[$e(c.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var Dz=Ze(Lz,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/trigger.vue"]]);const Gh="focus-trap.focus-after-trapped",Uh="focus-trap.focus-after-released",Iz="focus-trap.focusout-prevented",Xb={cancelable:!0,bubbles:!1},Oz={cancelable:!0,bubbles:!1},Zb="focusAfterTrapped",Qb="focusAfterReleased",Rz=Symbol("elFocusTrap"),Dy=B(),nh=B(0),Iy=B(0);let bc=0;const KM=e=>{const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0||n===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t},Jb=(e,t)=>{for(const r of e)if(!kz(r,t))return r},kz=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},Nz=e=>{const t=KM(e),r=Jb(t,e),n=Jb(t.reverse(),e);return[r,n]},Fz=e=>e instanceof HTMLInputElement&&"select"in e,$i=(e,t)=>{if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),Iy.value=window.performance.now(),e!==r&&Fz(e)&&t&&e.select()}};function e1(e,t){const r=[...e],n=e.indexOf(t);return n!==-1&&r.splice(n,1),r}const Bz=()=>{let e=[];return{push:n=>{const i=e[0];i&&n!==i&&i.pause(),e=e1(e,n),e.unshift(n)},remove:n=>{var i,a;e=e1(e,n),(a=(i=e[0])==null?void 0:i.resume)==null||a.call(i)}}},$z=(e,t=!1)=>{const r=document.activeElement;for(const n of e)if($i(n,t),document.activeElement!==r)return},t1=Bz(),Hz=()=>nh.value>Iy.value,wc=()=>{Dy.value="pointer",nh.value=window.performance.now()},r1=()=>{Dy.value="keyboard",nh.value=window.performance.now()},zz=()=>(wt(()=>{bc===0&&(document.addEventListener("mousedown",wc),document.addEventListener("touchstart",wc),document.addEventListener("keydown",r1)),bc++}),Xt(()=>{bc--,bc<=0&&(document.removeEventListener("mousedown",wc),document.removeEventListener("touchstart",wc),document.removeEventListener("keydown",r1))}),{focusReason:Dy,lastUserFocusTimestamp:nh,lastAutomatedFocusTimestamp:Iy}),xc=e=>new CustomEvent(Iz,{...Oz,detail:e}),Wz=ce({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Zb,Qb,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const r=B();let n,i;const{focusReason:a}=zz();eH(v=>{e.trapped&&!o.paused&&t("release-requested",v)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=v=>{if(!e.loop&&!e.trapped||o.paused)return;const{key:p,altKey:g,ctrlKey:m,metaKey:y,currentTarget:_,shiftKey:b}=v,{loop:x}=e,w=p===Ot.tab&&!g&&!m&&!y,S=document.activeElement;if(w&&S){const C=_,[M,P]=Nz(C);if(M&&P){if(!b&&S===P){const T=xc({focusReason:a.value});t("focusout-prevented",T),T.defaultPrevented||(v.preventDefault(),x&&$i(M,!0))}else if(b&&[M,C].includes(S)){const T=xc({focusReason:a.value});t("focusout-prevented",T),T.defaultPrevented||(v.preventDefault(),x&&$i(P,!0))}}else if(S===C){const T=xc({focusReason:a.value});t("focusout-prevented",T),T.defaultPrevented||v.preventDefault()}}};At(Rz,{focusTrapRef:r,onKeydown:s}),Se(()=>e.focusTrapEl,v=>{v&&(r.value=v)},{immediate:!0}),Se([r],([v],[p])=>{v&&(v.addEventListener("keydown",s),v.addEventListener("focusin",c),v.addEventListener("focusout",f)),p&&(p.removeEventListener("keydown",s),p.removeEventListener("focusin",c),p.removeEventListener("focusout",f))});const l=v=>{t(Zb,v)},u=v=>t(Qb,v),c=v=>{const p=E(r);if(!p)return;const g=v.target,m=v.relatedTarget,y=g&&p.contains(g);e.trapped||m&&p.contains(m)||(n=m),y&&t("focusin",v),!o.paused&&e.trapped&&(y?i=g:$i(i,!0))},f=v=>{const p=E(r);if(!(o.paused||!p))if(e.trapped){const g=v.relatedTarget;!gu(g)&&!p.contains(g)&&setTimeout(()=>{if(!o.paused&&e.trapped){const m=xc({focusReason:a.value});t("focusout-prevented",m),m.defaultPrevented||$i(i,!0)}},0)}else{const g=v.target;g&&p.contains(g)||t("focusout",v)}};async function d(){await Ft();const v=E(r);if(v){t1.push(o);const p=v.contains(document.activeElement)?n:document.activeElement;if(n=p,!v.contains(p)){const m=new Event(Gh,Xb);v.addEventListener(Gh,l),v.dispatchEvent(m),m.defaultPrevented||Ft(()=>{let y=e.focusStartEl;He(y)||($i(y),document.activeElement!==y&&(y="first")),y==="first"&&$z(KM(v),!0),(document.activeElement===p||y==="container")&&$i(v)})}}}function h(){const v=E(r);if(v){v.removeEventListener(Gh,l);const p=new CustomEvent(Uh,{...Xb,detail:{focusReason:a.value}});v.addEventListener(Uh,u),v.dispatchEvent(p),!p.defaultPrevented&&(a.value=="keyboard"||!Hz()||v.contains(document.activeElement))&&$i(n??document.body),v.removeEventListener(Uh,l),t1.remove(o)}}return wt(()=>{e.trapped&&d(),Se(()=>e.trapped,v=>{v?d():h()})}),Xt(()=>{e.trapped&&h()}),{onKeydown:s}}});function Vz(e,t,r,n,i,a){return $e(e.$slots,"default",{handleKeydown:e.onKeydown})}var Gz=Ze(Wz,[["render",Vz],["__file","/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);const Uz=["fixed","absolute"],jz=tt({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Le(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:yy,default:"bottom"},popperOptions:{type:Le(Object),default:()=>({})},strategy:{type:String,values:Uz,default:"absolute"}}),XM=tt({...jz,id:String,style:{type:Le([String,Array,Object])},className:{type:Le([String,Array,Object])},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:Le([String,Array,Object])},popperStyle:{type:Le([String,Array,Object])},referenceEl:{type:Le(Object)},triggerTargetEl:{type:Le(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),Yz={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},qz=(e,t=[])=>{const{placement:r,strategy:n,popperOptions:i}=e,a={placement:r,strategy:n,...i,modifiers:[...Xz(e),...t]};return Zz(a,i==null?void 0:i.modifiers),a},Kz=e=>{if(Nt)return Ui(e)};function Xz(e){const{offset:t,gpuAcceleration:r,fallbackPlacements:n}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:n}},{name:"computeStyles",options:{gpuAcceleration:r}}]}function Zz(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const Qz=0,Jz=e=>{const{popperInstanceRef:t,contentRef:r,triggerRef:n,role:i}=Ee(Ly,void 0),a=B(),o=B(),s=k(()=>({name:"eventListeners",enabled:!!e.visible})),l=k(()=>{var m;const y=E(a),_=(m=E(o))!=null?m:Qz;return{name:"arrow",enabled:!L5(y),options:{element:y,padding:_}}}),u=k(()=>({onFirstUpdate:()=>{v()},...qz(e,[E(l),E(s)])})),c=k(()=>Kz(e.referenceEl)||E(n)),{attributes:f,state:d,styles:h,update:v,forceUpdate:p,instanceRef:g}=Z4(c,r,u);return Se(g,m=>t.value=m),wt(()=>{Se(()=>{var m;return(m=E(c))==null?void 0:m.getBoundingClientRect()},()=>{v()})}),{attributes:f,arrowRef:a,contentRef:r,instanceRef:g,state:d,styles:h,role:i,forceUpdate:p,update:v}},e6=(e,{attributes:t,styles:r,role:n})=>{const{nextZIndex:i}=Ay(),a=Ne("popper"),o=k(()=>E(t).popper),s=B(e.zIndex||i()),l=k(()=>[a.b(),a.is("pure",e.pure),a.is(e.effect),e.popperClass]),u=k(()=>[{zIndex:E(s)},e.popperStyle||{},E(r).popper]),c=k(()=>n.value==="dialog"?"false":void 0),f=k(()=>E(r).arrow||{});return{ariaModal:c,arrowStyle:f,contentAttrs:o,contentClass:l,contentStyle:u,contentZIndex:s,updateZIndex:()=>{s.value=e.zIndex||i()}}},t6=(e,t)=>{const r=B(!1),n=B();return{focusStartRef:n,trapped:r,onFocusAfterReleased:u=>{var c;((c=u.detail)==null?void 0:c.focusReason)!=="pointer"&&(n.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:u=>{e.visible&&!r.value&&(u.target&&(n.value=u.target),r.value=!0)},onFocusoutPrevented:u=>{e.trapping||(u.detail.focusReason==="pointer"&&u.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,t("close")}}},r6=ce({name:"ElPopperContent"}),n6=ce({...r6,props:XM,emits:Yz,setup(e,{expose:t,emit:r}){const n=e,{focusStartRef:i,trapped:a,onFocusAfterReleased:o,onFocusAfterTrapped:s,onFocusInTrap:l,onFocusoutPrevented:u,onReleaseRequested:c}=t6(n,r),{attributes:f,arrowRef:d,contentRef:h,styles:v,instanceRef:p,role:g,update:m}=Jz(n),{ariaModal:y,arrowStyle:_,contentAttrs:b,contentClass:x,contentStyle:w,updateZIndex:S}=e6(n,{styles:v,attributes:f,role:g}),C=Ee(mo,void 0),M=B();At(GM,{arrowStyle:_,arrowRef:d,arrowOffset:M}),C&&(C.addInputId||C.removeInputId)&&At(mo,{...C,addInputId:ur,removeInputId:ur});let P;const A=(D=!0)=>{m(),D&&S()},T=()=>{A(!1),n.visible&&n.focusOnShow?a.value=!0:n.visible===!1&&(a.value=!1)};return wt(()=>{Se(()=>n.triggerTargetEl,(D,N)=>{P==null||P(),P=void 0;const H=E(D||h.value),$=E(N||h.value);ys(H)&&(P=Se([g,()=>n.ariaLabel,y,()=>n.id],G=>{["role","aria-label","aria-modal","id"].forEach((F,R)=>{gu(G[R])?H.removeAttribute(F):H.setAttribute(F,G[R])})},{immediate:!0})),$!==H&&ys($)&&["role","aria-label","aria-modal","id"].forEach(G=>{$.removeAttribute(G)})},{immediate:!0}),Se(()=>n.visible,T,{immediate:!0})}),Xt(()=>{P==null||P(),P=void 0}),t({popperContentRef:h,popperInstanceRef:p,updatePopper:A,contentStyle:w}),(D,N)=>(Y(),me("div",ca({ref_key:"contentRef",ref:h},E(b),{style:E(w),class:E(x),tabindex:"-1",onMouseenter:N[0]||(N[0]=H=>D.$emit("mouseenter",H)),onMouseleave:N[1]||(N[1]=H=>D.$emit("mouseleave",H))}),[ee(E(Gz),{trapped:E(a),"trap-on-focus-in":!0,"focus-trap-el":E(h),"focus-start-el":E(i),onFocusAfterTrapped:E(s),onFocusAfterReleased:E(o),onFocusin:E(l),onFocusoutPrevented:E(u),onReleaseRequested:E(c)},{default:Z(()=>[$e(D.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var i6=Ze(n6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/content.vue"]]);const a6=hr(Sz),Oy=Symbol("elTooltip"),qr=tt({...nH,...XM,appendTo:{type:Le([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:Le(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),bu=tt({...qM,disabled:Boolean,trigger:{type:Le([String,Array]),default:"hover"},triggerKeys:{type:Le(Array),default:()=>[Ot.enter,Ot.space]}}),{useModelToggleProps:o6,useModelToggleEmits:s6,useModelToggle:l6}=K3("visible"),u6=tt({...UM,...o6,...qr,...bu,...jM,showArrow:{type:Boolean,default:!0}}),c6=[...s6,"before-show","before-hide","show","hide","open","close"],f6=(e,t)=>be(e)?e.includes(t):e===t,Do=(e,t,r)=>n=>{f6(E(e),t)&&r(n)},d6=ce({name:"ElTooltipTrigger"}),h6=ce({...d6,props:bu,setup(e,{expose:t}){const r=e,n=Ne("tooltip"),{controlled:i,id:a,open:o,onOpen:s,onClose:l,onToggle:u}=Ee(Oy,void 0),c=B(null),f=()=>{if(E(i)||r.disabled)return!0},d=tn(r,"trigger"),h=fi(f,Do(d,"hover",s)),v=fi(f,Do(d,"hover",l)),p=fi(f,Do(d,"click",b=>{b.button===0&&u(b)})),g=fi(f,Do(d,"focus",s)),m=fi(f,Do(d,"focus",l)),y=fi(f,Do(d,"contextmenu",b=>{b.preventDefault(),u(b)})),_=fi(f,b=>{const{code:x}=b;r.triggerKeys.includes(x)&&(b.preventDefault(),u(b))});return t({triggerRef:c}),(b,x)=>(Y(),_e(E(Dz),{id:E(a),"virtual-ref":b.virtualRef,open:E(o),"virtual-triggering":b.virtualTriggering,class:ue(E(n).e("trigger")),onBlur:E(m),onClick:E(p),onContextmenu:E(y),onFocus:E(g),onMouseenter:E(h),onMouseleave:E(v),onKeydown:E(_)},{default:Z(()=>[$e(b.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var v6=Ze(h6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/trigger.vue"]]);const p6=ce({name:"ElTooltipContent",inheritAttrs:!1}),g6=ce({...p6,props:qr,setup(e,{expose:t}){const r=e,{selector:n}=LM(),i=Ne("tooltip"),a=B(null),o=B(!1),{controlled:s,id:l,open:u,trigger:c,onClose:f,onOpen:d,onShow:h,onHide:v,onBeforeShow:p,onBeforeHide:g}=Ee(Oy,void 0),m=k(()=>r.transition||`${i.namespace.value}-fade-in-linear`),y=k(()=>r.persistent);Xt(()=>{o.value=!0});const _=k(()=>E(y)?!0:E(u)),b=k(()=>r.disabled?!1:E(u)),x=k(()=>r.appendTo||n.value),w=k(()=>{var G;return(G=r.style)!=null?G:{}}),S=k(()=>!E(u)),C=()=>{v()},M=()=>{if(E(s))return!0},P=fi(M,()=>{r.enterable&&E(c)==="hover"&&d()}),A=fi(M,()=>{E(c)==="hover"&&f()}),T=()=>{var G,F;(F=(G=a.value)==null?void 0:G.updatePopper)==null||F.call(G),p==null||p()},D=()=>{g==null||g()},N=()=>{h(),$=pR(k(()=>{var G;return(G=a.value)==null?void 0:G.popperContentRef}),()=>{if(E(s))return;E(c)!=="hover"&&f()})},H=()=>{r.virtualTriggering||f()};let $;return Se(()=>E(u),G=>{G||$==null||$()},{flush:"post"}),Se(()=>r.content,()=>{var G,F;(F=(G=a.value)==null?void 0:G.updatePopper)==null||F.call(G)}),t({contentRef:a}),(G,F)=>(Y(),_e(eO,{disabled:!G.teleported,to:E(x)},[ee(Ci,{name:E(m),onAfterLeave:C,onBeforeEnter:T,onAfterEnter:N,onBeforeLeave:D},{default:Z(()=>[E(_)?nr((Y(),_e(E(i6),ca({key:0,id:E(l),ref_key:"contentRef",ref:a},G.$attrs,{"aria-label":G.ariaLabel,"aria-hidden":E(S),"boundaries-padding":G.boundariesPadding,"fallback-placements":G.fallbackPlacements,"gpu-acceleration":G.gpuAcceleration,offset:G.offset,placement:G.placement,"popper-options":G.popperOptions,strategy:G.strategy,effect:G.effect,enterable:G.enterable,pure:G.pure,"popper-class":G.popperClass,"popper-style":[G.popperStyle,E(w)],"reference-el":G.referenceEl,"trigger-target-el":G.triggerTargetEl,visible:E(b),"z-index":G.zIndex,onMouseenter:E(P),onMouseleave:E(A),onBlur:H,onClose:E(f)}),{default:Z(()=>[o.value?Fe("v-if",!0):$e(G.$slots,"default",{key:0})]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[yi,E(b)]]):Fe("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var m6=Ze(g6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]);const y6=["innerHTML"],_6={key:1},b6=ce({name:"ElTooltip"}),w6=ce({...b6,props:u6,emits:c6,setup(e,{expose:t,emit:r}){const n=e;rH();const i=My(),a=B(),o=B(),s=()=>{var m;const y=E(a);y&&((m=y.popperInstanceRef)==null||m.update())},l=B(!1),u=B(),{show:c,hide:f,hasUpdateHandler:d}=l6({indicator:l,toggleReason:u}),{onOpen:h,onClose:v}=DM({showAfter:tn(n,"showAfter"),hideAfter:tn(n,"hideAfter"),autoClose:tn(n,"autoClose"),open:c,close:f}),p=k(()=>Br(n.visible)&&!d.value);At(Oy,{controlled:p,id:i,open:$u(l),trigger:tn(n,"trigger"),onOpen:m=>{h(m)},onClose:m=>{v(m)},onToggle:m=>{E(l)?v(m):h(m)},onShow:()=>{r("show",u.value)},onHide:()=>{r("hide",u.value)},onBeforeShow:()=>{r("before-show",u.value)},onBeforeHide:()=>{r("before-hide",u.value)},updatePopper:s}),Se(()=>n.disabled,m=>{m&&l.value&&(l.value=!1)});const g=()=>{var m,y;const _=(y=(m=o.value)==null?void 0:m.contentRef)==null?void 0:y.popperContentRef;return _&&_.contains(document.activeElement)};return qC(()=>l.value&&f()),t({popperRef:a,contentRef:o,isFocusInsideContent:g,updatePopper:s,onOpen:h,onClose:v,hide:f}),(m,y)=>(Y(),_e(E(a6),{ref_key:"popperRef",ref:a,role:m.role},{default:Z(()=>[ee(v6,{disabled:m.disabled,trigger:m.trigger,"trigger-keys":m.triggerKeys,"virtual-ref":m.virtualRef,"virtual-triggering":m.virtualTriggering},{default:Z(()=>[m.$slots.default?$e(m.$slots,"default",{key:0}):Fe("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),ee(m6,{ref_key:"contentRef",ref:o,"aria-label":m.ariaLabel,"boundaries-padding":m.boundariesPadding,content:m.content,disabled:m.disabled,effect:m.effect,enterable:m.enterable,"fallback-placements":m.fallbackPlacements,"hide-after":m.hideAfter,"gpu-acceleration":m.gpuAcceleration,offset:m.offset,persistent:m.persistent,"popper-class":m.popperClass,"popper-style":m.popperStyle,placement:m.placement,"popper-options":m.popperOptions,pure:m.pure,"raw-content":m.rawContent,"reference-el":m.referenceEl,"trigger-target-el":m.triggerTargetEl,"show-after":m.showAfter,strategy:m.strategy,teleported:m.teleported,transition:m.transition,"virtual-triggering":m.virtualTriggering,"z-index":m.zIndex,"append-to":m.appendTo},{default:Z(()=>[$e(m.$slots,"content",{},()=>[m.rawContent?(Y(),me("span",{key:0,innerHTML:m.content},null,8,y6)):(Y(),me("span",_6,Me(m.content),1))]),m.showArrow?(Y(),_e(E(Mz),{key:0,"arrow-offset":m.arrowOffset},null,8,["arrow-offset"])):Fe("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var x6=Ze(w6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/tooltip.vue"]]);const Ju=hr(x6),S6=tt({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"}}),C6=["textContent"],T6=ce({name:"ElBadge"}),M6=ce({...T6,props:S6,setup(e,{expose:t}){const r=e,n=Ne("badge"),i=k(()=>r.isDot?"":$t(r.value)&&$t(r.max)?r.max(Y(),me("div",{class:ue(E(n).b())},[$e(a.$slots,"default"),ee(Ci,{name:`${E(n).namespace.value}-zoom-in-center`,persisted:""},{default:Z(()=>[nr(ae("sup",{class:ue([E(n).e("content"),E(n).em("content",a.type),E(n).is("fixed",!!a.$slots.default),E(n).is("dot",a.isDot)]),textContent:Me(E(i))},null,10,C6),[[yi,!a.hidden&&(E(i)||a.isDot)]])]),_:1},8,["name"])],2))}});var A6=Ze(M6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);const E6=hr(A6),ZM=Symbol("buttonGroupContextKey"),P6=(e,t)=>{vy({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},k(()=>e.type==="text"));const r=Ee(ZM,void 0),n=Ey("button"),{form:i}=Zu(),a=ia(k(()=>r==null?void 0:r.size)),o=rh(),s=B(),l=Yd(),u=k(()=>e.type||(r==null?void 0:r.type)||""),c=k(()=>{var h,v,p;return(p=(v=e.autoInsertSpace)!=null?v:(h=n.value)==null?void 0:h.autoInsertSpace)!=null?p:!1}),f=k(()=>{var h;const v=(h=l.default)==null?void 0:h.call(l);if(c.value&&(v==null?void 0:v.length)===1){const p=v[0];if((p==null?void 0:p.type)===Ns){const g=p.children;return/^\p{Unified_Ideograph}{2}$/u.test(g.trim())}}return!1});return{_disabled:o,_size:a,_type:u,_ref:s,shouldAddSpace:f,handleClick:h=>{e.nativeType==="reset"&&(i==null||i.resetFields()),t("click",h)}}},L6=["default","primary","success","warning","info","danger","text",""],D6=["button","submit","reset"],ig=tt({size:Xu,disabled:Boolean,type:{type:String,values:L6,default:""},icon:{type:Wn},nativeType:{type:String,values:D6,default:"button"},loading:Boolean,loadingIcon:{type:Wn,default:()=>hy},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0}}),I6={click:e=>e instanceof MouseEvent};function Kt(e,t){O6(e)&&(e="100%");var r=R6(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Sc(e){return Math.min(1,Math.max(0,e))}function O6(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function R6(e){return typeof e=="string"&&e.indexOf("%")!==-1}function QM(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Cc(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Qa(e){return e.length===1?"0"+e:String(e)}function k6(e,t,r){return{r:Kt(e,255)*255,g:Kt(t,255)*255,b:Kt(r,255)*255}}function n1(e,t,r){e=Kt(e,255),t=Kt(t,255),r=Kt(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a=0,o=0,s=(n+i)/2;if(n===i)o=0,a=0;else{var l=n-i;switch(o=s>.5?l/(2-n-i):l/(n+i),n){case e:a=(t-r)/l+(t1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function N6(e,t,r){var n,i,a;if(e=Kt(e,360),t=Kt(t,100),r=Kt(r,100),t===0)i=r,a=r,n=r;else{var o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;n=jh(s,o,e+1/3),i=jh(s,o,e),a=jh(s,o,e-1/3)}return{r:n*255,g:i*255,b:a*255}}function i1(e,t,r){e=Kt(e,255),t=Kt(t,255),r=Kt(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a=0,o=n,s=n-i,l=n===0?0:s/n;if(n===i)a=0;else{switch(n){case e:a=(t-r)/s+(t>16,g:(e&65280)>>8,b:e&255}}var ag={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function z6(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,a=null,o=!1,s=!1;return typeof e=="string"&&(e=G6(e)),typeof e=="object"&&(ii(e.r)&&ii(e.g)&&ii(e.b)?(t=k6(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ii(e.h)&&ii(e.s)&&ii(e.v)?(n=Cc(e.s),i=Cc(e.v),t=F6(e.h,n,i),o=!0,s="hsv"):ii(e.h)&&ii(e.s)&&ii(e.l)&&(n=Cc(e.s),a=Cc(e.l),t=N6(e.h,n,a),o=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=QM(r),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var W6="[-\\+]?\\d+%?",V6="[-\\+]?\\d*\\.\\d+%?",ji="(?:".concat(V6,")|(?:").concat(W6,")"),Yh="[\\s|\\(]+(".concat(ji,")[,|\\s]+(").concat(ji,")[,|\\s]+(").concat(ji,")\\s*\\)?"),qh="[\\s|\\(]+(".concat(ji,")[,|\\s]+(").concat(ji,")[,|\\s]+(").concat(ji,")[,|\\s]+(").concat(ji,")\\s*\\)?"),pn={CSS_UNIT:new RegExp(ji),rgb:new RegExp("rgb"+Yh),rgba:new RegExp("rgba"+qh),hsl:new RegExp("hsl"+Yh),hsla:new RegExp("hsla"+qh),hsv:new RegExp("hsv"+Yh),hsva:new RegExp("hsva"+qh),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function G6(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(ag[e])e=ag[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=pn.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=pn.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=pn.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=pn.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=pn.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=pn.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=pn.hex8.exec(e),r?{r:Ir(r[1]),g:Ir(r[2]),b:Ir(r[3]),a:o1(r[4]),format:t?"name":"hex8"}:(r=pn.hex6.exec(e),r?{r:Ir(r[1]),g:Ir(r[2]),b:Ir(r[3]),format:t?"name":"hex"}:(r=pn.hex4.exec(e),r?{r:Ir(r[1]+r[1]),g:Ir(r[2]+r[2]),b:Ir(r[3]+r[3]),a:o1(r[4]+r[4]),format:t?"name":"hex8"}:(r=pn.hex3.exec(e),r?{r:Ir(r[1]+r[1]),g:Ir(r[2]+r[2]),b:Ir(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function ii(e){return Boolean(pn.CSS_UNIT.exec(String(e)))}var JM=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=H6(t)),this.originalInput=t;var i=z6(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,i,a=t.r/255,o=t.g/255,s=t.b/255;return a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=QM(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=i1(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=i1(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=n1(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=n1(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),a1(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),B6(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(Kt(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(Kt(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+a1(this.r,this.g,this.b,!1),r=0,n=Object.entries(ag);r=0,a=!r&&i&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=Sc(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=Sc(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=Sc(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=Sc(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),a=r/100,o={r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a};return new e(o)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,a=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,a.push(new e(n));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/t;t--;)o.push(new e({h:n,s:i,v:a})),a=(a+s)%1;return o},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb();return new e({r:n.r+(r.r-n.r)*r.a,g:n.g+(r.g-n.g)*r.a,b:n.b+(r.b-n.b)*r.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,i=[this],a=360/t,o=1;o{let n={};const i=e.color;if(i){const a=new JM(i),o=e.dark?a.tint(20).toString():Di(a,20);if(e.plain)n=r.cssVarBlock({"bg-color":e.dark?Di(a,90):a.tint(90).toString(),"text-color":i,"border-color":e.dark?Di(a,50):a.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":o,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":o}),t.value&&(n[r.cssVarBlockName("disabled-bg-color")]=e.dark?Di(a,90):a.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=e.dark?Di(a,50):a.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=e.dark?Di(a,80):a.tint(80).toString());else{const s=e.dark?Di(a,30):a.tint(30).toString(),l=a.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(n=r.cssVarBlock({"bg-color":i,"text-color":l,"border-color":i,"hover-bg-color":s,"hover-text-color":l,"hover-border-color":s,"active-bg-color":o,"active-border-color":o}),t.value){const u=e.dark?Di(a,50):a.tint(50).toString();n[r.cssVarBlockName("disabled-bg-color")]=u,n[r.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,n[r.cssVarBlockName("disabled-border-color")]=u}}}return n})}const j6=["aria-disabled","disabled","autofocus","type"],Y6=ce({name:"ElButton"}),q6=ce({...Y6,props:ig,emits:I6,setup(e,{expose:t,emit:r}){const n=e,i=U6(n),a=Ne("button"),{_ref:o,_size:s,_type:l,_disabled:u,shouldAddSpace:c,handleClick:f}=P6(n,r);return t({ref:o,size:s,type:l,disabled:u,shouldAddSpace:c}),(d,h)=>(Y(),me("button",{ref_key:"_ref",ref:o,class:ue([E(a).b(),E(a).m(E(l)),E(a).m(E(s)),E(a).is("disabled",E(u)),E(a).is("loading",d.loading),E(a).is("plain",d.plain),E(a).is("round",d.round),E(a).is("circle",d.circle),E(a).is("text",d.text),E(a).is("link",d.link),E(a).is("has-bg",d.bg)]),"aria-disabled":E(u)||d.loading,disabled:E(u)||d.loading,autofocus:d.autofocus,type:d.nativeType,style:St(E(i)),onClick:h[0]||(h[0]=(...v)=>E(f)&&E(f)(...v))},[d.loading?(Y(),me(pt,{key:0},[d.$slots.loading?$e(d.$slots,"loading",{key:0}):(Y(),_e(E(lr),{key:1,class:ue(E(a).is("loading"))},{default:Z(()=>[(Y(),_e(nn(d.loadingIcon)))]),_:1},8,["class"]))],64)):d.icon||d.$slots.icon?(Y(),_e(E(lr),{key:1},{default:Z(()=>[d.icon?(Y(),_e(nn(d.icon),{key:0})):$e(d.$slots,"icon",{key:1})]),_:3})):Fe("v-if",!0),d.$slots.default?(Y(),me("span",{key:2,class:ue({[E(a).em("text","expand")]:E(c)})},[$e(d.$slots,"default")],2)):Fe("v-if",!0)],14,j6))}});var K6=Ze(q6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);const X6={size:ig.size,type:ig.type},Z6=ce({name:"ElButtonGroup"}),Q6=ce({...Z6,props:X6,setup(e){const t=e;At(ZM,fn({size:tn(t,"size"),type:tn(t,"type")}));const r=Ne("button");return(n,i)=>(Y(),me("div",{class:ue(`${E(r).b("group")}`)},[$e(n.$slots,"default")],2))}});var eA=Ze(Q6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);const J6=hr(K6,{ButtonGroup:eA});fa(eA);var e8=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};const Hi=new Map;let s1;Nt&&(document.addEventListener("mousedown",e=>s1=e),document.addEventListener("mouseup",e=>{for(const t of Hi.values())for(const{documentHandler:r}of t)r(e,s1)}));function l1(e,t){let r=[];return Array.isArray(t.arg)?r=t.arg:ys(t.arg)&&r.push(t.arg),function(n,i){const a=t.instance.popperRef,o=n.target,s=i==null?void 0:i.target,l=!t||!t.instance,u=!o||!s,c=e.contains(o)||e.contains(s),f=e===o,d=r.length&&r.some(v=>v==null?void 0:v.contains(o))||r.length&&r.includes(s),h=a&&(a.contains(o)||a.contains(s));l||u||c||f||d||h||t.value(n,i)}}const t8={beforeMount(e,t){Hi.has(e)||Hi.set(e,[]),Hi.get(e).push({documentHandler:l1(e,t),bindingFn:t.value})},updated(e,t){Hi.has(e)||Hi.set(e,[]);const r=Hi.get(e),n=r.findIndex(a=>a.bindingFn===t.oldValue),i={documentHandler:l1(e,t),bindingFn:t.value};n>=0?r.splice(n,1,i):r.push(i)},unmounted(e){Hi.delete(e)}};var u1=!1,qa,og,sg,Af,Ef,tA,Pf,lg,ug,cg,rA,fg,dg,nA,iA;function vr(){if(!u1){u1=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),r=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(fg=/\b(iPhone|iP[ao]d)/.exec(e),dg=/\b(iP[ao]d)/.exec(e),cg=/Android/i.exec(e),nA=/FBAN\/\w+;/i.exec(e),iA=/Mobile/i.exec(e),rA=!!/Win64/.exec(e),t){qa=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,qa&&document&&document.documentMode&&(qa=document.documentMode);var n=/(?:Trident\/(\d+.\d+))/.exec(e);tA=n?parseFloat(n[1])+4:qa,og=t[2]?parseFloat(t[2]):NaN,sg=t[3]?parseFloat(t[3]):NaN,Af=t[4]?parseFloat(t[4]):NaN,Af?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),Ef=t&&t[1]?parseFloat(t[1]):NaN):Ef=NaN}else qa=og=sg=Ef=Af=NaN;if(r){if(r[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);Pf=i?parseFloat(i[1].replace("_",".")):!0}else Pf=!1;lg=!!r[2],ug=!!r[3]}else Pf=lg=ug=!1}}var hg={ie:function(){return vr()||qa},ieCompatibilityMode:function(){return vr()||tA>qa},ie64:function(){return hg.ie()&&rA},firefox:function(){return vr()||og},opera:function(){return vr()||sg},webkit:function(){return vr()||Af},safari:function(){return hg.webkit()},chrome:function(){return vr()||Ef},windows:function(){return vr()||lg},osx:function(){return vr()||Pf},linux:function(){return vr()||ug},iphone:function(){return vr()||fg},mobile:function(){return vr()||fg||dg||cg||iA},nativeApp:function(){return vr()||nA},android:function(){return vr()||cg},ipad:function(){return vr()||dg}},r8=hg,Tc=!!(typeof window<"u"&&window.document&&window.document.createElement),n8={canUseDOM:Tc,canUseWorkers:typeof Worker<"u",canUseEventListeners:Tc&&!!(window.addEventListener||window.attachEvent),canUseViewport:Tc&&!!window.screen,isInWorker:!Tc},aA=n8,oA;aA.canUseDOM&&(oA=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function i8(e,t){if(!aA.canUseDOM||t&&!("addEventListener"in document))return!1;var r="on"+e,n=r in document;if(!n){var i=document.createElement("div");i.setAttribute(r,"return;"),n=typeof i[r]=="function"}return!n&&oA&&e==="wheel"&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}var a8=i8,c1=10,f1=40,d1=800;function sA(e){var t=0,r=0,n=0,i=0;return"detail"in e&&(r=e.detail),"wheelDelta"in e&&(r=-e.wheelDelta/120),"wheelDeltaY"in e&&(r=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=r,r=0),n=t*c1,i=r*c1,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||i)&&e.deltaMode&&(e.deltaMode==1?(n*=f1,i*=f1):(n*=d1,i*=d1)),n&&!t&&(t=n<1?-1:1),i&&!r&&(r=i<1?-1:1),{spinX:t,spinY:r,pixelX:n,pixelY:i}}sA.getEventType=function(){return r8.firefox()?"DOMMouseScroll":a8("wheel")?"wheel":"mousewheel"};var o8=sA;/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, @@ -22,13 +22,13 @@ var fD=Object.defineProperty;var dD=(e,t,r)=>t in e?fD(e,t,{enumerable:!0,config * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT -*/const s8=function(e,t){if(e&&e.addEventListener){const r=function(n){const i=o8(n);t&&Reflect.apply(t,this,[n,i])};e.addEventListener("wheel",r,{passive:!0})}},l8={beforeMount(e,t){s8(e,t.value)}},lA={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object]},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:Xu,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},uA={[go]:e=>He(e)||$t(e)||Br(e),change:e=>He(e)||$t(e)||Br(e)},$s=Symbol("checkboxGroupContextKey"),u8=({model:e,isChecked:t})=>{const r=Ee($s,void 0),n=k(()=>{var a,o;const s=(a=r==null?void 0:r.max)==null?void 0:a.value,l=(o=r==null?void 0:r.min)==null?void 0:o.value;return!ad(s)&&e.value.length>=s&&!t.value||!ad(l)&&e.value.length<=l&&t.value});return{isDisabled:rh(k(()=>(r==null?void 0:r.disabled.value)||n.value)),isLimitDisabled:n}},c8=(e,{model:t,isLimitExceeded:r,hasOwnLabel:n,isDisabled:i,isLabeledByFormItem:a})=>{const o=Ee($s,void 0),{formItem:s}=Zu(),{emit:l}=ct();function u(v){var p,g;return v===e.trueLabel||v===!0?(p=e.trueLabel)!=null?p:!0:(g=e.falseLabel)!=null?g:!1}function c(v,p){l("change",u(v),p)}function f(v){if(r.value)return;const p=v.target;l("change",u(p.checked),v)}async function d(v){r.value||!n.value&&!i.value&&a.value&&(v.composedPath().some(m=>m.tagName==="LABEL")||(t.value=u([!1,e.falseLabel].includes(t.value)),await Ft(),c(t.value,v)))}const h=k(()=>(o==null?void 0:o.validateEvent)||e.validateEvent);return Se(()=>e.modelValue,()=>{h.value&&(s==null||s.validate("change").catch(v=>void 0))}),{handleChange:f,onClickRoot:d}},f8=e=>{const t=B(!1),{emit:r}=ct(),n=Ee($s,void 0),i=k(()=>ad(n)===!1),a=B(!1);return{model:k({get(){var s,l;return i.value?(s=n==null?void 0:n.modelValue)==null?void 0:s.value:(l=e.modelValue)!=null?l:t.value},set(s){var l,u;i.value&&be(s)?(a.value=((l=n==null?void 0:n.max)==null?void 0:l.value)!==void 0&&s.length>(n==null?void 0:n.max.value),a.value===!1&&((u=n==null?void 0:n.changeEvent)==null||u.call(n,s))):(r(go,s),t.value=s)}}),isGroup:i,isLimitExceeded:a}},d8=(e,t,{model:r})=>{const n=Ee($s,void 0),i=B(!1),a=k(()=>{const u=r.value;return Br(u)?u:be(u)?Xe(e.label)?u.map(Ke).some(c=>P5(c,e.label)):u.map(Ke).includes(e.label):u!=null?u===e.trueLabel:!!u}),o=ia(k(()=>{var u;return(u=n==null?void 0:n.size)==null?void 0:u.value}),{prop:!0}),s=ia(k(()=>{var u;return(u=n==null?void 0:n.size)==null?void 0:u.value})),l=k(()=>!!(t.default||e.label));return{checkboxButtonSize:o,isChecked:a,isFocused:i,checkboxSize:s,hasOwnLabel:l}},h8=(e,{model:t})=>{function r(){be(t.value)&&!t.value.includes(e.label)?t.value.push(e.label):t.value=e.trueLabel||!0}e.checked&&r()},cA=(e,t)=>{const{formItem:r}=Zu(),{model:n,isGroup:i,isLimitExceeded:a}=f8(e),{isFocused:o,isChecked:s,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:c}=d8(e,t,{model:n}),{isDisabled:f}=u8({model:n,isChecked:s}),{inputId:d,isLabeledByFormItem:h}=Py(e,{formItemContext:r,disableIdGeneration:c,disableIdManagement:i}),{handleChange:v,onClickRoot:p}=c8(e,{model:n,isLimitExceeded:a,hasOwnLabel:c,isDisabled:f,isLabeledByFormItem:h});return h8(e,{model:n}),{inputId:d,isLabeledByFormItem:h,isChecked:s,isDisabled:f,isFocused:o,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:c,model:n,handleChange:v,onClickRoot:p}},v8=["tabindex","role","aria-checked"],p8=["id","aria-hidden","name","tabindex","disabled","true-value","false-value"],g8=["id","aria-hidden","disabled","value","name","tabindex"],m8=ce({name:"ElCheckbox"}),y8=ce({...m8,props:lA,emits:uA,setup(e){const t=e,r=Yd(),{inputId:n,isLabeledByFormItem:i,isChecked:a,isDisabled:o,isFocused:s,checkboxSize:l,hasOwnLabel:u,model:c,handleChange:f,onClickRoot:d}=cA(t,r),h=Fe("checkbox"),v=k(()=>[h.b(),h.m(l.value),h.is("disabled",o.value),h.is("bordered",t.border),h.is("checked",a.value)]),p=k(()=>[h.e("input"),h.is("disabled",o.value),h.is("checked",a.value),h.is("indeterminate",t.indeterminate),h.is("focus",s.value)]);return(g,m)=>(Y(),_e(nn(!E(u)&&E(i)?"span":"label"),{class:ue(E(v)),"aria-controls":g.indeterminate?g.controls:null,onClick:E(d)},{default:Z(()=>[ae("span",{class:ue(E(p)),tabindex:g.indeterminate?0:void 0,role:g.indeterminate?"checkbox":void 0,"aria-checked":g.indeterminate?"mixed":void 0},[g.trueLabel||g.falseLabel?nr((Y(),me("input",{key:0,id:E(n),"onUpdate:modelValue":m[0]||(m[0]=y=>Ct(c)?c.value=y:null),class:ue(E(h).e("original")),type:"checkbox","aria-hidden":g.indeterminate?"true":"false",name:g.name,tabindex:g.tabindex,disabled:E(o),"true-value":g.trueLabel,"false-value":g.falseLabel,onChange:m[1]||(m[1]=(...y)=>E(f)&&E(f)(...y)),onFocus:m[2]||(m[2]=y=>s.value=!0),onBlur:m[3]||(m[3]=y=>s.value=!1)},null,42,p8)),[[Qf,E(c)]]):nr((Y(),me("input",{key:1,id:E(n),"onUpdate:modelValue":m[4]||(m[4]=y=>Ct(c)?c.value=y:null),class:ue(E(h).e("original")),type:"checkbox","aria-hidden":g.indeterminate?"true":"false",disabled:E(o),value:g.label,name:g.name,tabindex:g.tabindex,onChange:m[5]||(m[5]=(...y)=>E(f)&&E(f)(...y)),onFocus:m[6]||(m[6]=y=>s.value=!0),onBlur:m[7]||(m[7]=y=>s.value=!1)},null,42,g8)),[[Qf,E(c)]]),ae("span",{class:ue(E(h).e("inner"))},null,2)],10,v8),E(u)?(Y(),me("span",{key:0,class:ue(E(h).e("label"))},[$e(g.$slots,"default"),g.$slots.default?ke("v-if",!0):(Y(),me(pt,{key:0},[Bt(Te(g.label),1)],64))],2)):ke("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var _8=Ze(y8,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox.vue"]]);const b8=["name","tabindex","disabled","true-value","false-value"],w8=["name","tabindex","disabled","value"],x8=ce({name:"ElCheckboxButton"}),S8=ce({...x8,props:lA,emits:uA,setup(e){const t=e,r=Yd(),{isFocused:n,isChecked:i,isDisabled:a,checkboxButtonSize:o,model:s,handleChange:l}=cA(t,r),u=Ee($s,void 0),c=Fe("checkbox"),f=k(()=>{var h,v,p,g;const m=(v=(h=u==null?void 0:u.fill)==null?void 0:h.value)!=null?v:"";return{backgroundColor:m,borderColor:m,color:(g=(p=u==null?void 0:u.textColor)==null?void 0:p.value)!=null?g:"",boxShadow:m?`-1px 0 0 0 ${m}`:void 0}}),d=k(()=>[c.b("button"),c.bm("button",o.value),c.is("disabled",a.value),c.is("checked",i.value),c.is("focus",n.value)]);return(h,v)=>(Y(),me("label",{class:ue(E(d))},[h.trueLabel||h.falseLabel?nr((Y(),me("input",{key:0,"onUpdate:modelValue":v[0]||(v[0]=p=>Ct(s)?s.value=p:null),class:ue(E(c).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:E(a),"true-value":h.trueLabel,"false-value":h.falseLabel,onChange:v[1]||(v[1]=(...p)=>E(l)&&E(l)(...p)),onFocus:v[2]||(v[2]=p=>n.value=!0),onBlur:v[3]||(v[3]=p=>n.value=!1)},null,42,b8)),[[Qf,E(s)]]):nr((Y(),me("input",{key:1,"onUpdate:modelValue":v[4]||(v[4]=p=>Ct(s)?s.value=p:null),class:ue(E(c).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:E(a),value:h.label,onChange:v[5]||(v[5]=(...p)=>E(l)&&E(l)(...p)),onFocus:v[6]||(v[6]=p=>n.value=!0),onBlur:v[7]||(v[7]=p=>n.value=!1)},null,42,w8)),[[Qf,E(s)]]),h.$slots.default||h.label?(Y(),me("span",{key:2,class:ue(E(c).be("button","inner")),style:St(E(i)?E(f):void 0)},[$e(h.$slots,"default",{},()=>[Bt(Te(h.label),1)])],6)):ke("v-if",!0)],2))}});var fA=Ze(S8,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-button.vue"]]);const C8=tt({modelValue:{type:Le(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Xu,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),T8={[go]:e=>be(e),change:e=>be(e)},M8=ce({name:"ElCheckboxGroup"}),A8=ce({...M8,props:C8,emits:T8,setup(e,{emit:t}){const r=e,n=Fe("checkbox"),{formItem:i}=Zu(),{inputId:a,isLabeledByFormItem:o}=Py(r,{formItemContext:i}),s=async u=>{t(go,u),await Ft(),t("change",u)},l=k({get(){return r.modelValue},set(u){s(u)}});return At($s,{...k5($d(r),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:l,changeEvent:s}),Se(()=>r.modelValue,()=>{r.validateEvent&&(i==null||i.validate("change").catch(u=>void 0))}),(u,c)=>{var f;return Y(),_e(nn(u.tag),{id:E(a),class:ue(E(n).b("group")),role:"group","aria-label":E(o)?void 0:u.label||"checkbox-group","aria-labelledby":E(o)?(f=E(i))==null?void 0:f.labelId:void 0},{default:Z(()=>[$e(u.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var dA=Ze(A8,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-group.vue"]]);const Cs=hr(_8,{CheckboxButton:fA,CheckboxGroup:dA});fa(fA);fa(dA);const E8=tt({closable:Boolean,type:{type:String,values:["success","info","warning","danger",""],default:""},hit:Boolean,disableTransitions:Boolean,color:{type:String,default:""},size:{type:String,values:Yu,default:""},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),P8={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},L8=ce({name:"ElTag"}),D8=ce({...L8,props:E8,emits:P8,setup(e,{emit:t}){const r=e,n=ia(),i=Fe("tag"),a=k(()=>{const{type:l,hit:u,effect:c,closable:f,round:d}=r;return[i.b(),i.is("closable",f),i.m(l),i.m(n.value),i.m(c),i.is("hit",u),i.is("round",d)]}),o=l=>{t("close",l)},s=l=>{t("click",l)};return(l,u)=>l.disableTransitions?(Y(),me("span",{key:0,class:ue(E(a)),style:St({backgroundColor:l.color}),onClick:s},[ae("span",{class:ue(E(i).e("content"))},[$e(l.$slots,"default")],2),l.closable?(Y(),_e(E(lr),{key:0,class:ue(E(i).e("close")),onClick:Jf(o,["stop"])},{default:Z(()=>[ee(E(Yp))]),_:1},8,["class","onClick"])):ke("v-if",!0)],6)):(Y(),_e(Ci,{key:1,name:`${E(i).namespace.value}-zoom-in-center`,appear:""},{default:Z(()=>[ae("span",{class:ue(E(a)),style:St({backgroundColor:l.color}),onClick:s},[ae("span",{class:ue(E(i).e("content"))},[$e(l.$slots,"default")],2),l.closable?(Y(),_e(E(lr),{key:0,class:ue(E(i).e("close")),onClick:Jf(o,["stop"])},{default:Z(()=>[ee(E(Yp))]),_:1},8,["class","onClick"])):ke("v-if",!0)],6)]),_:3},8,["name"]))}});var I8=Ze(D8,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]);const O8=hr(I8),hA=Symbol("rowContextKey"),R8=["start","center","end","space-around","space-between","space-evenly"],k8=["top","middle","bottom"],N8=tt({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:R8,default:"start"},align:{type:String,values:k8,default:"top"}}),F8=ce({name:"ElRow"}),B8=ce({...F8,props:N8,setup(e){const t=e,r=Fe("row"),n=k(()=>t.gutter);At(hA,{gutter:n});const i=k(()=>{const o={};return t.gutter&&(o.marginRight=o.marginLeft=`-${t.gutter/2}px`),o}),a=k(()=>[r.b(),r.is(`justify-${t.justify}`,t.justify!=="start"),r.is(`align-${t.align}`,t.align!=="top")]);return(o,s)=>(Y(),_e(nn(o.tag),{class:ue(E(a)),style:St(E(i))},{default:Z(()=>[$e(o.$slots,"default")]),_:3},8,["class","style"]))}});var $8=Ze(B8,[["__file","/home/runner/work/element-plus/element-plus/packages/components/row/src/row.vue"]]);const vA=hr($8),H8=tt({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:Le([Number,Object]),default:()=>Ya({})},sm:{type:Le([Number,Object]),default:()=>Ya({})},md:{type:Le([Number,Object]),default:()=>Ya({})},lg:{type:Le([Number,Object]),default:()=>Ya({})},xl:{type:Le([Number,Object]),default:()=>Ya({})}}),z8=ce({name:"ElCol"}),W8=ce({...z8,props:H8,setup(e){const t=e,{gutter:r}=Ee(hA,{gutter:k(()=>0)}),n=Fe("col"),i=k(()=>{const o={};return r.value&&(o.paddingLeft=o.paddingRight=`${r.value/2}px`),o}),a=k(()=>{const o=[];return["span","offset","pull","push"].forEach(u=>{const c=t[u];$t(c)&&(u==="span"?o.push(n.b(`${t[u]}`)):c>0&&o.push(n.b(`${u}-${t[u]}`)))}),["xs","sm","md","lg","xl"].forEach(u=>{$t(t[u])?o.push(n.b(`${u}-${t[u]}`)):Xe(t[u])&&Object.entries(t[u]).forEach(([c,f])=>{o.push(c!=="span"?n.b(`${u}-${c}-${f}`):n.b(`${u}-${f}`))})}),r.value&&o.push(n.is("guttered")),[n.b(),o]});return(o,s)=>(Y(),_e(nn(o.tag),{class:ue(E(a)),style:St(E(i))},{default:Z(()=>[$e(o.$slots,"default")]),_:3},8,["class","style"]))}});var V8=Ze(W8,[["__file","/home/runner/work/element-plus/element-plus/packages/components/col/src/col.vue"]]);const pA=hr(V8),G8=ce({name:"ElCollapseTransition"}),U8=ce({...G8,setup(e){const t=Fe("collapse-transition"),r={beforeEnter(n){n.dataset||(n.dataset={}),n.dataset.oldPaddingTop=n.style.paddingTop,n.dataset.oldPaddingBottom=n.style.paddingBottom,n.style.maxHeight=0,n.style.paddingTop=0,n.style.paddingBottom=0},enter(n){n.dataset.oldOverflow=n.style.overflow,n.scrollHeight!==0?(n.style.maxHeight=`${n.scrollHeight}px`,n.style.paddingTop=n.dataset.oldPaddingTop,n.style.paddingBottom=n.dataset.oldPaddingBottom):(n.style.maxHeight=0,n.style.paddingTop=n.dataset.oldPaddingTop,n.style.paddingBottom=n.dataset.oldPaddingBottom),n.style.overflow="hidden"},afterEnter(n){n.style.maxHeight="",n.style.overflow=n.dataset.oldOverflow},beforeLeave(n){n.dataset||(n.dataset={}),n.dataset.oldPaddingTop=n.style.paddingTop,n.dataset.oldPaddingBottom=n.style.paddingBottom,n.dataset.oldOverflow=n.style.overflow,n.style.maxHeight=`${n.scrollHeight}px`,n.style.overflow="hidden"},leave(n){n.scrollHeight!==0&&(n.style.maxHeight=0,n.style.paddingTop=0,n.style.paddingBottom=0)},afterLeave(n){n.style.maxHeight="",n.style.overflow=n.dataset.oldOverflow,n.style.paddingTop=n.dataset.oldPaddingTop,n.style.paddingBottom=n.dataset.oldPaddingBottom}};return(n,i)=>(Y(),_e(Ci,ca({name:E(t).b()},RI(r)),{default:Z(()=>[$e(n.$slots,"default")]),_:3},16,["name"]))}});var Lf=Ze(U8,[["__file","/home/runner/work/element-plus/element-plus/packages/components/collapse-transition/src/collapse-transition.vue"]]);Lf.install=e=>{e.component(Lf.name,Lf)};const j8=Lf,Y8=ce({inheritAttrs:!1});function q8(e,t,r,n,i,a){return $e(e.$slots,"default")}var K8=Ze(Y8,[["render",q8],["__file","/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection.vue"]]);const X8=ce({name:"ElCollectionItem",inheritAttrs:!1});function Z8(e,t,r,n,i,a){return $e(e.$slots,"default")}var Q8=Ze(X8,[["render",Z8],["__file","/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection-item.vue"]]);const J8="data-el-collection-item",eW=e=>{const t=`El${e}Collection`,r=`${t}Item`,n=Symbol(t),i=Symbol(r),a={...K8,name:t,setup(){const s=B(null),l=new Map;At(n,{itemMap:l,getItems:()=>{const c=E(s);if(!c)return[];const f=Array.from(c.querySelectorAll(`[${J8}]`));return[...l.values()].sort((h,v)=>f.indexOf(h.ref)-f.indexOf(v.ref))},collectionRef:s})}},o={...Q8,name:r,setup(s,{attrs:l}){const u=B(null),c=Ee(n,void 0);At(i,{collectionItemRef:u}),wt(()=>{const f=E(u);f&&c.itemMap.set(f,{ref:f,...l})}),Xt(()=>{const f=E(u);c.itemMap.delete(f)})}};return{COLLECTION_INJECTION_KEY:n,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:a,ElCollectionItem:o}},Kh=tt({trigger:bu.trigger,effect:{...qr.effect,default:"light"},type:{type:Le(String)},placement:{type:Le(String),default:"bottom"},popperOptions:{type:Le(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:Le([Number,String]),default:0},maxHeight:{type:Le([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:Le(Object)},teleported:qr.teleported});tt({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Wn}});tt({onKeydown:{type:Le(Function)}});Ot.down,Ot.pageDown,Ot.home;Ot.up,Ot.pageUp,Ot.end;eW("Dropdown");let tW=class{constructor(t,r){this.parent=t,this.domNode=r,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(t){t===this.subMenuItems.length?t=0:t<0&&(t=this.subMenuItems.length-1),this.subMenuItems[t].focus(),this.subIndex=t}addListeners(){const t=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,r=>{r.addEventListener("keydown",n=>{let i=!1;switch(n.code){case Ot.down:{this.gotoSubIndex(this.subIndex+1),i=!0;break}case Ot.up:{this.gotoSubIndex(this.subIndex-1),i=!0;break}case Ot.tab:{wf(t,"mouseleave");break}case Ot.enter:case Ot.space:{i=!0,n.currentTarget.click();break}}return i&&(n.preventDefault(),n.stopPropagation()),!1})})}},rW=class{constructor(t,r){this.domNode=t,this.submenu=null,this.submenu=null,this.init(r)}init(t){this.domNode.setAttribute("tabindex","0");const r=this.domNode.querySelector(`.${t}-menu`);r&&(this.submenu=new tW(this,r)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",t=>{let r=!1;switch(t.code){case Ot.down:{wf(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),r=!0;break}case Ot.up:{wf(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),r=!0;break}case Ot.tab:{wf(t.currentTarget,"mouseleave");break}case Ot.enter:case Ot.space:{r=!0,t.currentTarget.click();break}}r&&t.preventDefault()})}},nW=class{constructor(t,r){this.domNode=t,this.init(r)}init(t){const r=this.domNode.childNodes;Array.from(r).forEach(n=>{n.nodeType===1&&new rW(n,t)})}};const iW=ce({name:"ElMenuCollapseTransition",setup(){const e=Fe("menu");return{listeners:{onBeforeEnter:r=>r.style.opacity="0.2",onEnter(r,n){Zo(r,`${e.namespace.value}-opacity-transition`),r.style.opacity="1",n()},onAfterEnter(r){ss(r,`${e.namespace.value}-opacity-transition`),r.style.opacity=""},onBeforeLeave(r){r.dataset||(r.dataset={}),Ol(r,e.m("collapse"))?(ss(r,e.m("collapse")),r.dataset.oldOverflow=r.style.overflow,r.dataset.scrollWidth=r.clientWidth.toString(),Zo(r,e.m("collapse"))):(Zo(r,e.m("collapse")),r.dataset.oldOverflow=r.style.overflow,r.dataset.scrollWidth=r.clientWidth.toString(),ss(r,e.m("collapse"))),r.style.width=`${r.scrollWidth}px`,r.style.overflow="hidden"},onLeave(r){Zo(r,"horizontal-collapse-transition"),r.style.width=`${r.dataset.scrollWidth}px`}}}}});function aW(e,t,r,n,i,a){return Y(),_e(Ci,ca({mode:"out-in"},e.listeners),{default:Z(()=>[$e(e.$slots,"default")]),_:3},16)}var oW=Ze(iW,[["render",aW],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-collapse-transition.vue"]]);function gA(e,t){const r=k(()=>{let i=e.parent;const a=[t.value];for(;i.type.name!=="ElMenu";)i.props.index&&a.unshift(i.props.index),i=i.parent;return a});return{parentMenu:k(()=>{let i=e.parent;for(;i&&!["ElMenu","ElSubMenu"].includes(i.type.name);)i=i.parent;return i}),indexPath:r}}function sW(e){return k(()=>{const r=e.backgroundColor;return r?new JM(r).shade(20).toString():""})}const mA=(e,t)=>{const r=Fe("menu");return k(()=>r.cssVarBlock({"text-color":e.textColor||"","hover-text-color":e.textColor||"","bg-color":e.backgroundColor||"","hover-bg-color":sW(e).value||"","active-color":e.activeTextColor||"",level:`${t}`}))},lW=tt({index:{type:String,required:!0},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},popperClass:String,disabled:Boolean,popperAppendToBody:{type:Boolean,default:void 0},teleported:{type:Boolean,default:void 0},popperOffset:{type:Number,default:6},expandCloseIcon:{type:Wn},expandOpenIcon:{type:Wn},collapseCloseIcon:{type:Wn},collapseOpenIcon:{type:Wn}}),Mc="ElSubMenu";var Ry=ce({name:Mc,props:lW,setup(e,{slots:t,expose:r}){vy({from:"popper-append-to-body",replacement:"teleported",scope:Mc,version:"2.3.0",ref:"https://element-plus.org/en-US/component/menu.html#submenu-attributes"},k(()=>e.popperAppendToBody!==void 0));const n=ct(),{indexPath:i,parentMenu:a}=gA(n,k(()=>e.index)),o=Fe("menu"),s=Fe("sub-menu"),l=Ee("rootMenu");l||na(Mc,"can not inject root menu");const u=Ee(`subMenu:${a.value.uid}`);u||na(Mc,"can not inject sub menu");const c=B({}),f=B({});let d;const h=B(!1),v=B(),p=B(null),g=k(()=>A.value==="horizontal"&&y.value?"bottom-start":"right-start"),m=k(()=>A.value==="horizontal"&&y.value||A.value==="vertical"&&!l.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?w.value?e.expandOpenIcon:e.expandCloseIcon:lM:e.collapseCloseIcon&&e.collapseOpenIcon?w.value?e.collapseOpenIcon:e.collapseCloseIcon:dy),y=k(()=>u.level===0),_=k(()=>{var R;const j=(R=e.teleported)!=null?R:e.popperAppendToBody;return j===void 0?y.value:j}),b=k(()=>l.props.collapse?`${o.namespace.value}-zoom-in-left`:`${o.namespace.value}-zoom-in-top`),x=k(()=>A.value==="horizontal"&&y.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","left-start","bottom-start","bottom-end","top-start","top-end"]),w=k(()=>l.openedMenus.includes(e.index)),S=k(()=>{let R=!1;return Object.values(c.value).forEach(j=>{j.active&&(R=!0)}),Object.values(f.value).forEach(j=>{j.active&&(R=!0)}),R}),C=k(()=>l.props.backgroundColor||""),M=k(()=>l.props.activeTextColor||""),P=k(()=>l.props.textColor||""),A=k(()=>l.props.mode),T=fn({index:e.index,indexPath:i,active:S}),D=k(()=>A.value!=="horizontal"?{color:P.value}:{borderBottomColor:S.value?l.props.activeTextColor?M.value:"":"transparent",color:S.value?M.value:P.value}),N=()=>{var R,j,re;return(re=(j=(R=p.value)==null?void 0:R.popperRef)==null?void 0:j.popperInstanceRef)==null?void 0:re.destroy()},H=R=>{R||N()},$=()=>{l.props.menuTrigger==="hover"&&l.props.mode==="horizontal"||l.props.collapse&&l.props.mode==="vertical"||e.disabled||l.handleSubMenuClick({index:e.index,indexPath:i.value,active:S.value})},G=(R,j=e.showTimeout)=>{var re;R.type!=="focus"&&(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"||e.disabled||(u.mouseInChild.value=!0,d==null||d(),{stop:d}=kp(()=>{l.openMenu(e.index,i.value)},j),_.value&&((re=a.value.vnode.el)==null||re.dispatchEvent(new MouseEvent("mouseenter")))))},F=(R=!1)=>{var j,re;l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"||(d==null||d(),u.mouseInChild.value=!1,{stop:d}=kp(()=>!h.value&&l.closeMenu(e.index,i.value),e.hideTimeout),_.value&&R&&((j=n.parent)==null?void 0:j.type.name)==="ElSubMenu"&&((re=u.handleMouseleave)==null||re.call(u,!0)))};Se(()=>l.props.collapse,R=>H(Boolean(R)));{const R=re=>{f.value[re.index]=re},j=re=>{delete f.value[re.index]};At(`subMenu:${n.uid}`,{addSubMenu:R,removeSubMenu:j,handleMouseleave:F,mouseInChild:h,level:u.level+1})}return r({opened:w}),wt(()=>{l.addSubMenu(T),u.addSubMenu(T)}),Xt(()=>{u.removeSubMenu(T),l.removeSubMenu(T)}),()=>{var R;const j=[(R=t.title)==null?void 0:R.call(t),Ce(lr,{class:s.e("icon-arrow"),style:{transform:w.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&l.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>He(m.value)?Ce(n.appContext.components[m.value]):Ce(m.value)})],re=mA(l.props,u.level+1),oe=l.isMenuPopup?Ce(Ju,{ref:p,visible:w.value,effect:"light",pure:!0,offset:e.popperOffset,showArrow:!1,persistent:!0,popperClass:e.popperClass,placement:g.value,teleported:_.value,fallbackPlacements:x.value,transition:b.value,gpuAcceleration:!1},{content:()=>{var ye;return Ce("div",{class:[o.m(A.value),o.m("popup-container"),e.popperClass],onMouseenter:Ae=>G(Ae,100),onMouseleave:()=>F(!0),onFocus:Ae=>G(Ae,100)},[Ce("ul",{class:[o.b(),o.m("popup"),o.m(`popup-${g.value}`)],style:re.value},[(ye=t.default)==null?void 0:ye.call(t)])])},default:()=>Ce("div",{class:s.e("title"),style:[D.value,{backgroundColor:C.value}],onClick:$},j)}):Ce(pt,{},[Ce("div",{class:s.e("title"),style:[D.value,{backgroundColor:C.value}],ref:v,onClick:$},j),Ce(j8,{},{default:()=>{var ye;return nr(Ce("ul",{role:"menu",class:[o.b(),o.m("inline")],style:re.value},[(ye=t.default)==null?void 0:ye.call(t)]),[[yi,w.value]])}})]);return Ce("li",{class:[s.b(),s.is("active",S.value),s.is("opened",w.value),s.is("disabled",e.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:w.value,onMouseenter:G,onMouseleave:()=>F(!0),onFocus:G},[oe])}}});const uW=tt({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:Le(Array),default:()=>Ya([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperEffect:{type:String,values:["dark","light"],default:"dark"}}),Xh=e=>Array.isArray(e)&&e.every(t=>He(t)),cW={close:(e,t)=>He(e)&&Xh(t),open:(e,t)=>He(e)&&Xh(t),select:(e,t,r,n)=>He(e)&&Xh(t)&&Xe(r)&&(n===void 0||n instanceof Promise)};var fW=ce({name:"ElMenu",props:uW,emits:cW,setup(e,{emit:t,slots:r,expose:n}){const i=ct(),a=i.appContext.config.globalProperties.$router,o=B(),s=Fe("menu"),l=Fe("sub-menu"),u=B(-1),c=B(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),f=B(e.defaultActive),d=B({}),h=B({}),v=k(()=>e.mode==="horizontal"||e.mode==="vertical"&&e.collapse),p=()=>{const A=f.value&&d.value[f.value];if(!A||e.mode==="horizontal"||e.collapse)return;A.indexPath.forEach(D=>{const N=h.value[D];N&&g(D,N.indexPath)})},g=(A,T)=>{c.value.includes(A)||(e.uniqueOpened&&(c.value=c.value.filter(D=>T.includes(D))),c.value.push(A),t("open",A,T))},m=A=>{const T=c.value.indexOf(A);T!==-1&&c.value.splice(T,1)},y=(A,T)=>{m(A),t("close",A,T)},_=({index:A,indexPath:T})=>{c.value.includes(A)?y(A,T):g(A,T)},b=A=>{(e.mode==="horizontal"||e.collapse)&&(c.value=[]);const{index:T,indexPath:D}=A;if(!(gu(T)||gu(D)))if(e.router&&a){const N=A.route||T,H=a.push(N).then($=>($||(f.value=T),$));t("select",T,D,{index:T,indexPath:D,route:N},H)}else f.value=T,t("select",T,D,{index:T,indexPath:D})},x=A=>{const T=d.value,D=T[A]||f.value&&T[f.value]||T[e.defaultActive];D?f.value=D.index:f.value=A},w=()=>{var A,T;if(!o.value)return-1;const D=Array.from((T=(A=o.value)==null?void 0:A.childNodes)!=null?T:[]).filter(j=>j.nodeName!=="#text"||j.nodeValue),N=64,H=Number.parseInt(getComputedStyle(o.value).paddingLeft,10),$=Number.parseInt(getComputedStyle(o.value).paddingRight,10),G=o.value.clientWidth-H-$;let F=0,R=0;return D.forEach((j,re)=>{F+=j.offsetWidth||0,F<=G-N&&(R=re+1)}),R===D.length?-1:R},S=(A,T=33.34)=>{let D;return()=>{D&&clearTimeout(D),D=setTimeout(()=>{A()},T)}};let C=!0;const M=()=>{const A=()=>{u.value=-1,Ft(()=>{u.value=w()})};C?A():S(A)(),C=!1};Se(()=>e.defaultActive,A=>{d.value[A]||(f.value=""),x(A)}),Se(()=>e.collapse,A=>{A&&(c.value=[])}),Se(d.value,p);let P;io(()=>{e.mode==="horizontal"&&e.ellipsis?P=gs(o,M).stop:P==null||P()});{const A=H=>{h.value[H.index]=H},T=H=>{delete h.value[H.index]};At("rootMenu",fn({props:e,openedMenus:c,items:d,subMenus:h,activeIndex:f,isMenuPopup:v,addMenuItem:H=>{d.value[H.index]=H},removeMenuItem:H=>{delete d.value[H.index]},addSubMenu:A,removeSubMenu:T,openMenu:g,closeMenu:y,handleMenuItemClick:b,handleSubMenuClick:_})),At(`subMenu:${i.uid}`,{addSubMenu:A,removeSubMenu:T,mouseInChild:B(!1),level:0})}return wt(()=>{e.mode==="horizontal"&&new nW(i.vnode.el,s.namespace.value)}),n({open:T=>{const{indexPath:D}=h.value[T];D.forEach(N=>g(N,D))},close:m,handleResize:M}),()=>{var A,T;let D=(T=(A=r.default)==null?void 0:A.call(r))!=null?T:[];const N=[];if(e.mode==="horizontal"&&o.value){const G=Cf(D),F=u.value===-1?G:G.slice(0,u.value),R=u.value===-1?[]:G.slice(u.value);R!=null&&R.length&&e.ellipsis&&(D=F,N.push(Ce(Ry,{index:"sub-menu-more",class:l.e("hide-arrow")},{title:()=>Ce(lr,{class:l.e("icon-more")},{default:()=>Ce(M3)}),default:()=>R})))}const H=mA(e,0),$=Ce("ul",{key:String(e.collapse),role:"menubar",ref:o,style:H.value,class:{[s.b()]:!0,[s.m(e.mode)]:!0,[s.m("collapse")]:e.collapse}},[...D,...N]);return e.collapseTransition&&e.mode==="vertical"?Ce(oW,()=>$):$}}});const dW=tt({index:{type:Le([String,null]),default:null},route:{type:Le([String,Object])},disabled:Boolean}),hW={click:e=>He(e.index)&&Array.isArray(e.indexPath)},Zh="ElMenuItem",vW=ce({name:Zh,components:{ElTooltip:Ju},props:dW,emits:hW,setup(e,{emit:t}){const r=ct(),n=Ee("rootMenu"),i=Fe("menu"),a=Fe("menu-item");n||na(Zh,"can not inject root menu");const{parentMenu:o,indexPath:s}=gA(r,tn(e,"index")),l=Ee(`subMenu:${o.value.uid}`);l||na(Zh,"can not inject sub menu");const u=k(()=>e.index===n.activeIndex),c=fn({index:e.index,indexPath:s,active:u}),f=()=>{e.disabled||(n.handleMenuItemClick({index:e.index,indexPath:s.value,route:e.route}),t("click",c))};return wt(()=>{l.addSubMenu(c),n.addMenuItem(c)}),Xt(()=>{l.removeSubMenu(c),n.removeMenuItem(c)}),{parentMenu:o,rootMenu:n,active:u,nsMenu:i,nsMenuItem:a,handleClick:f}}});function pW(e,t,r,n,i,a){const o=_r("el-tooltip");return Y(),me("li",{class:ue([e.nsMenuItem.b(),e.nsMenuItem.is("active",e.active),e.nsMenuItem.is("disabled",e.disabled)]),role:"menuitem",tabindex:"-1",onClick:t[0]||(t[0]=(...s)=>e.handleClick&&e.handleClick(...s))},[e.parentMenu.type.name==="ElMenu"&&e.rootMenu.props.collapse&&e.$slots.title?(Y(),_e(o,{key:0,effect:e.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:Z(()=>[$e(e.$slots,"title")]),default:Z(()=>[ae("div",{class:ue(e.nsMenu.be("tooltip","trigger"))},[$e(e.$slots,"default")],2)]),_:3},8,["effect"])):(Y(),me(pt,{key:1},[$e(e.$slots,"default"),$e(e.$slots,"title")],64))],2)}var yA=Ze(vW,[["render",pW],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item.vue"]]);const gW={title:String},mW="ElMenuItemGroup",yW=ce({name:mW,props:gW,setup(){return{ns:Fe("menu-item-group")}}});function _W(e,t,r,n,i,a){return Y(),me("li",{class:ue(e.ns.b())},[ae("div",{class:ue(e.ns.e("title"))},[e.$slots.title?$e(e.$slots,"title",{key:1}):(Y(),me(pt,{key:0},[Bt(Te(e.title),1)],64))],2),ae("ul",null,[$e(e.$slots,"default")])],2)}var _A=Ze(yW,[["render",_W],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item-group.vue"]]);const bW=hr(fW,{MenuItem:yA,MenuItemGroup:_A,SubMenu:Ry}),wW=fa(yA);fa(_A);const xW=fa(Ry),SW=tt({trigger:bu.trigger,placement:Kh.placement,disabled:bu.disabled,visible:qr.visible,transition:qr.transition,popperOptions:Kh.popperOptions,tabindex:Kh.tabindex,content:qr.content,popperStyle:qr.popperStyle,popperClass:qr.popperClass,enterable:{...qr.enterable,default:!0},effect:{...qr.effect,default:"light"},teleported:qr.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),CW={"update:visible":e=>Br(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},TW="onUpdate:visible",MW=ce({name:"ElPopover"}),AW=ce({...MW,props:SW,emits:CW,setup(e,{expose:t,emit:r}){const n=e,i=k(()=>n[TW]),a=Fe("popover"),o=B(),s=k(()=>{var g;return(g=E(o))==null?void 0:g.popperRef}),l=k(()=>[{width:po(n.width)},n.popperStyle]),u=k(()=>[a.b(),n.popperClass,{[a.m("plain")]:!!n.content}]),c=k(()=>n.transition===`${a.namespace.value}-fade-in-linear`),f=()=>{var g;(g=o.value)==null||g.hide()},d=()=>{r("before-enter")},h=()=>{r("before-leave")},v=()=>{r("after-enter")},p=()=>{r("update:visible",!1),r("after-leave")};return t({popperRef:s,hide:f}),(g,m)=>(Y(),_e(E(Ju),ca({ref_key:"tooltipRef",ref:o},g.$attrs,{trigger:g.trigger,placement:g.placement,disabled:g.disabled,visible:g.visible,transition:g.transition,"popper-options":g.popperOptions,tabindex:g.tabindex,content:g.content,offset:g.offset,"show-after":g.showAfter,"hide-after":g.hideAfter,"auto-close":g.autoClose,"show-arrow":g.showArrow,"aria-label":g.title,effect:g.effect,enterable:g.enterable,"popper-class":E(u),"popper-style":E(l),teleported:g.teleported,persistent:g.persistent,"gpu-acceleration":E(c),"onUpdate:visible":E(i),onBeforeShow:d,onBeforeHide:h,onShow:v,onHide:p}),{content:Z(()=>[g.title?(Y(),me("div",{key:0,class:ue(E(a).e("title")),role:"title"},Te(g.title),3)):ke("v-if",!0),$e(g.$slots,"default",{},()=>[Bt(Te(g.content),1)])]),default:Z(()=>[g.$slots.reference?$e(g.$slots,"reference",{key:0}):ke("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var EW=Ze(AW,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popover/src/popover.vue"]]);const h1=(e,t)=>{const r=t.arg||t.value,n=r==null?void 0:r.popperRef;n&&(n.triggerRef=e)};var PW={mounted(e,t){h1(e,t)},updated(e,t){h1(e,t)}};const LW="popover",DW=H3(PW,LW),IW=hr(EW,{directive:DW}),OW=tt({modelValue:{type:[Boolean,String,Number],default:!1},value:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},width:{type:[String,Number],default:""},inlinePrompt:{type:Boolean,default:!1},activeIcon:{type:Wn},inactiveIcon:{type:Wn},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},borderColor:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},id:String,loading:{type:Boolean,default:!1},beforeChange:{type:Le(Function)},size:{type:String,validator:z3},tabindex:{type:[String,Number]}}),RW={[go]:e=>Br(e)||He(e)||$t(e),[qp]:e=>Br(e)||He(e)||$t(e),[Kp]:e=>Br(e)||He(e)||$t(e)},kW=["onClick"],NW=["id","aria-checked","aria-disabled","name","true-value","false-value","disabled","tabindex","onKeydown"],FW=["aria-hidden"],BW=["aria-hidden"],$W=["aria-hidden"],vg="ElSwitch",HW=ce({name:vg}),zW=ce({...HW,props:OW,emits:RW,setup(e,{expose:t,emit:r}){const n=e,i=ct(),{formItem:a}=Zu(),o=ia(),s=Fe("switch");vy({from:'"value"',replacement:'"model-value" or "v-model"',scope:vg,version:"2.3.0",ref:"https://element-plus.org/en-US/component/switch.html#attributes",type:"Attribute"},k(()=>{var x;return!!((x=i.vnode.props)!=null&&x.value)}));const{inputId:l}=Py(n,{formItemContext:a}),u=rh(k(()=>n.loading)),c=B(n.modelValue!==!1),f=B(),d=B(),h=k(()=>[s.b(),s.m(o.value),s.is("disabled",u.value),s.is("checked",g.value)]),v=k(()=>({width:po(n.width)}));Se(()=>n.modelValue,()=>{c.value=!0}),Se(()=>n.value,()=>{c.value=!1});const p=k(()=>c.value?n.modelValue:n.value),g=k(()=>p.value===n.activeValue);[n.activeValue,n.inactiveValue].includes(p.value)||(r(go,n.inactiveValue),r(qp,n.inactiveValue),r(Kp,n.inactiveValue)),Se(g,x=>{var w;f.value.checked=x,n.validateEvent&&((w=a==null?void 0:a.validate)==null||w.call(a,"change").catch(S=>void 0))});const m=()=>{const x=g.value?n.inactiveValue:n.activeValue;r(go,x),r(qp,x),r(Kp,x),Ft(()=>{f.value.checked=g.value})},y=()=>{if(u.value)return;const{beforeChange:x}=n;if(!x){m();return}const w=x();[jf(w),Br(w)].includes(!0)||na(vg,"beforeChange must return type `Promise` or `boolean`"),jf(w)?w.then(C=>{C&&m()}).catch(C=>{}):w&&m()},_=k(()=>s.cssVarBlock({...n.activeColor?{"on-color":n.activeColor}:null,...n.inactiveColor?{"off-color":n.inactiveColor}:null,...n.borderColor?{"border-color":n.borderColor}:null})),b=()=>{var x,w;(w=(x=f.value)==null?void 0:x.focus)==null||w.call(x)};return wt(()=>{f.value.checked=g.value}),t({focus:b,checked:g}),(x,w)=>(Y(),me("div",{class:ue(E(h)),style:St(E(_)),onClick:Jf(y,["prevent"])},[ae("input",{id:E(l),ref_key:"input",ref:f,class:ue(E(s).e("input")),type:"checkbox",role:"switch","aria-checked":E(g),"aria-disabled":E(u),name:x.name,"true-value":x.activeValue,"false-value":x.inactiveValue,disabled:E(u),tabindex:x.tabindex,onChange:m,onKeydown:UO(y,["enter"])},null,42,NW),!x.inlinePrompt&&(x.inactiveIcon||x.inactiveText)?(Y(),me("span",{key:0,class:ue([E(s).e("label"),E(s).em("label","left"),E(s).is("active",!E(g))])},[x.inactiveIcon?(Y(),_e(E(lr),{key:0},{default:Z(()=>[(Y(),_e(nn(x.inactiveIcon)))]),_:1})):ke("v-if",!0),!x.inactiveIcon&&x.inactiveText?(Y(),me("span",{key:1,"aria-hidden":E(g)},Te(x.inactiveText),9,FW)):ke("v-if",!0)],2)):ke("v-if",!0),ae("span",{ref_key:"core",ref:d,class:ue(E(s).e("core")),style:St(E(v))},[x.inlinePrompt?(Y(),me("div",{key:0,class:ue(E(s).e("inner"))},[x.activeIcon||x.inactiveIcon?(Y(),_e(E(lr),{key:0,class:ue(E(s).is("icon"))},{default:Z(()=>[(Y(),_e(nn(E(g)?x.activeIcon:x.inactiveIcon)))]),_:1},8,["class"])):x.activeText||x.inactiveText?(Y(),me("span",{key:1,class:ue(E(s).is("text")),"aria-hidden":!E(g)},Te(E(g)?x.activeText:x.inactiveText),11,BW)):ke("v-if",!0)],2)):ke("v-if",!0),ae("div",{class:ue(E(s).e("action"))},[x.loading?(Y(),_e(E(lr),{key:0,class:ue(E(s).is("loading"))},{default:Z(()=>[ee(E(hy))]),_:1},8,["class"])):ke("v-if",!0)],2)],6),!x.inlinePrompt&&(x.activeIcon||x.activeText)?(Y(),me("span",{key:1,class:ue([E(s).e("label"),E(s).em("label","right"),E(s).is("active",E(g))])},[x.activeIcon?(Y(),_e(E(lr),{key:0},{default:Z(()=>[(Y(),_e(nn(x.activeIcon)))]),_:1})):ke("v-if",!0),!x.activeIcon&&x.activeText?(Y(),me("span",{key:1,"aria-hidden":!E(g)},Te(x.activeText),9,$W)):ke("v-if",!0)],2)):ke("v-if",!0)],14,kW))}});var WW=Ze(zW,[["__file","/home/runner/work/element-plus/element-plus/packages/components/switch/src/switch.vue"]]);const VW=hr(WW);/*! +*/const s8=function(e,t){if(e&&e.addEventListener){const r=function(n){const i=o8(n);t&&Reflect.apply(t,this,[n,i])};e.addEventListener("wheel",r,{passive:!0})}},l8={beforeMount(e,t){s8(e,t.value)}},lA={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object]},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:Xu,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},uA={[go]:e=>He(e)||$t(e)||Br(e),change:e=>He(e)||$t(e)||Br(e)},$s=Symbol("checkboxGroupContextKey"),u8=({model:e,isChecked:t})=>{const r=Ee($s,void 0),n=k(()=>{var a,o;const s=(a=r==null?void 0:r.max)==null?void 0:a.value,l=(o=r==null?void 0:r.min)==null?void 0:o.value;return!ad(s)&&e.value.length>=s&&!t.value||!ad(l)&&e.value.length<=l&&t.value});return{isDisabled:rh(k(()=>(r==null?void 0:r.disabled.value)||n.value)),isLimitDisabled:n}},c8=(e,{model:t,isLimitExceeded:r,hasOwnLabel:n,isDisabled:i,isLabeledByFormItem:a})=>{const o=Ee($s,void 0),{formItem:s}=Zu(),{emit:l}=ct();function u(v){var p,g;return v===e.trueLabel||v===!0?(p=e.trueLabel)!=null?p:!0:(g=e.falseLabel)!=null?g:!1}function c(v,p){l("change",u(v),p)}function f(v){if(r.value)return;const p=v.target;l("change",u(p.checked),v)}async function d(v){r.value||!n.value&&!i.value&&a.value&&(v.composedPath().some(m=>m.tagName==="LABEL")||(t.value=u([!1,e.falseLabel].includes(t.value)),await Ft(),c(t.value,v)))}const h=k(()=>(o==null?void 0:o.validateEvent)||e.validateEvent);return Se(()=>e.modelValue,()=>{h.value&&(s==null||s.validate("change").catch(v=>void 0))}),{handleChange:f,onClickRoot:d}},f8=e=>{const t=B(!1),{emit:r}=ct(),n=Ee($s,void 0),i=k(()=>ad(n)===!1),a=B(!1);return{model:k({get(){var s,l;return i.value?(s=n==null?void 0:n.modelValue)==null?void 0:s.value:(l=e.modelValue)!=null?l:t.value},set(s){var l,u;i.value&&be(s)?(a.value=((l=n==null?void 0:n.max)==null?void 0:l.value)!==void 0&&s.length>(n==null?void 0:n.max.value),a.value===!1&&((u=n==null?void 0:n.changeEvent)==null||u.call(n,s))):(r(go,s),t.value=s)}}),isGroup:i,isLimitExceeded:a}},d8=(e,t,{model:r})=>{const n=Ee($s,void 0),i=B(!1),a=k(()=>{const u=r.value;return Br(u)?u:be(u)?Xe(e.label)?u.map(Ke).some(c=>P5(c,e.label)):u.map(Ke).includes(e.label):u!=null?u===e.trueLabel:!!u}),o=ia(k(()=>{var u;return(u=n==null?void 0:n.size)==null?void 0:u.value}),{prop:!0}),s=ia(k(()=>{var u;return(u=n==null?void 0:n.size)==null?void 0:u.value})),l=k(()=>!!(t.default||e.label));return{checkboxButtonSize:o,isChecked:a,isFocused:i,checkboxSize:s,hasOwnLabel:l}},h8=(e,{model:t})=>{function r(){be(t.value)&&!t.value.includes(e.label)?t.value.push(e.label):t.value=e.trueLabel||!0}e.checked&&r()},cA=(e,t)=>{const{formItem:r}=Zu(),{model:n,isGroup:i,isLimitExceeded:a}=f8(e),{isFocused:o,isChecked:s,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:c}=d8(e,t,{model:n}),{isDisabled:f}=u8({model:n,isChecked:s}),{inputId:d,isLabeledByFormItem:h}=Py(e,{formItemContext:r,disableIdGeneration:c,disableIdManagement:i}),{handleChange:v,onClickRoot:p}=c8(e,{model:n,isLimitExceeded:a,hasOwnLabel:c,isDisabled:f,isLabeledByFormItem:h});return h8(e,{model:n}),{inputId:d,isLabeledByFormItem:h,isChecked:s,isDisabled:f,isFocused:o,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:c,model:n,handleChange:v,onClickRoot:p}},v8=["tabindex","role","aria-checked"],p8=["id","aria-hidden","name","tabindex","disabled","true-value","false-value"],g8=["id","aria-hidden","disabled","value","name","tabindex"],m8=ce({name:"ElCheckbox"}),y8=ce({...m8,props:lA,emits:uA,setup(e){const t=e,r=Yd(),{inputId:n,isLabeledByFormItem:i,isChecked:a,isDisabled:o,isFocused:s,checkboxSize:l,hasOwnLabel:u,model:c,handleChange:f,onClickRoot:d}=cA(t,r),h=Ne("checkbox"),v=k(()=>[h.b(),h.m(l.value),h.is("disabled",o.value),h.is("bordered",t.border),h.is("checked",a.value)]),p=k(()=>[h.e("input"),h.is("disabled",o.value),h.is("checked",a.value),h.is("indeterminate",t.indeterminate),h.is("focus",s.value)]);return(g,m)=>(Y(),_e(nn(!E(u)&&E(i)?"span":"label"),{class:ue(E(v)),"aria-controls":g.indeterminate?g.controls:null,onClick:E(d)},{default:Z(()=>[ae("span",{class:ue(E(p)),tabindex:g.indeterminate?0:void 0,role:g.indeterminate?"checkbox":void 0,"aria-checked":g.indeterminate?"mixed":void 0},[g.trueLabel||g.falseLabel?nr((Y(),me("input",{key:0,id:E(n),"onUpdate:modelValue":m[0]||(m[0]=y=>Ct(c)?c.value=y:null),class:ue(E(h).e("original")),type:"checkbox","aria-hidden":g.indeterminate?"true":"false",name:g.name,tabindex:g.tabindex,disabled:E(o),"true-value":g.trueLabel,"false-value":g.falseLabel,onChange:m[1]||(m[1]=(...y)=>E(f)&&E(f)(...y)),onFocus:m[2]||(m[2]=y=>s.value=!0),onBlur:m[3]||(m[3]=y=>s.value=!1)},null,42,p8)),[[Qf,E(c)]]):nr((Y(),me("input",{key:1,id:E(n),"onUpdate:modelValue":m[4]||(m[4]=y=>Ct(c)?c.value=y:null),class:ue(E(h).e("original")),type:"checkbox","aria-hidden":g.indeterminate?"true":"false",disabled:E(o),value:g.label,name:g.name,tabindex:g.tabindex,onChange:m[5]||(m[5]=(...y)=>E(f)&&E(f)(...y)),onFocus:m[6]||(m[6]=y=>s.value=!0),onBlur:m[7]||(m[7]=y=>s.value=!1)},null,42,g8)),[[Qf,E(c)]]),ae("span",{class:ue(E(h).e("inner"))},null,2)],10,v8),E(u)?(Y(),me("span",{key:0,class:ue(E(h).e("label"))},[$e(g.$slots,"default"),g.$slots.default?Fe("v-if",!0):(Y(),me(pt,{key:0},[Bt(Me(g.label),1)],64))],2)):Fe("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var _8=Ze(y8,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox.vue"]]);const b8=["name","tabindex","disabled","true-value","false-value"],w8=["name","tabindex","disabled","value"],x8=ce({name:"ElCheckboxButton"}),S8=ce({...x8,props:lA,emits:uA,setup(e){const t=e,r=Yd(),{isFocused:n,isChecked:i,isDisabled:a,checkboxButtonSize:o,model:s,handleChange:l}=cA(t,r),u=Ee($s,void 0),c=Ne("checkbox"),f=k(()=>{var h,v,p,g;const m=(v=(h=u==null?void 0:u.fill)==null?void 0:h.value)!=null?v:"";return{backgroundColor:m,borderColor:m,color:(g=(p=u==null?void 0:u.textColor)==null?void 0:p.value)!=null?g:"",boxShadow:m?`-1px 0 0 0 ${m}`:void 0}}),d=k(()=>[c.b("button"),c.bm("button",o.value),c.is("disabled",a.value),c.is("checked",i.value),c.is("focus",n.value)]);return(h,v)=>(Y(),me("label",{class:ue(E(d))},[h.trueLabel||h.falseLabel?nr((Y(),me("input",{key:0,"onUpdate:modelValue":v[0]||(v[0]=p=>Ct(s)?s.value=p:null),class:ue(E(c).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:E(a),"true-value":h.trueLabel,"false-value":h.falseLabel,onChange:v[1]||(v[1]=(...p)=>E(l)&&E(l)(...p)),onFocus:v[2]||(v[2]=p=>n.value=!0),onBlur:v[3]||(v[3]=p=>n.value=!1)},null,42,b8)),[[Qf,E(s)]]):nr((Y(),me("input",{key:1,"onUpdate:modelValue":v[4]||(v[4]=p=>Ct(s)?s.value=p:null),class:ue(E(c).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:E(a),value:h.label,onChange:v[5]||(v[5]=(...p)=>E(l)&&E(l)(...p)),onFocus:v[6]||(v[6]=p=>n.value=!0),onBlur:v[7]||(v[7]=p=>n.value=!1)},null,42,w8)),[[Qf,E(s)]]),h.$slots.default||h.label?(Y(),me("span",{key:2,class:ue(E(c).be("button","inner")),style:St(E(i)?E(f):void 0)},[$e(h.$slots,"default",{},()=>[Bt(Me(h.label),1)])],6)):Fe("v-if",!0)],2))}});var fA=Ze(S8,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-button.vue"]]);const C8=tt({modelValue:{type:Le(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Xu,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),T8={[go]:e=>be(e),change:e=>be(e)},M8=ce({name:"ElCheckboxGroup"}),A8=ce({...M8,props:C8,emits:T8,setup(e,{emit:t}){const r=e,n=Ne("checkbox"),{formItem:i}=Zu(),{inputId:a,isLabeledByFormItem:o}=Py(r,{formItemContext:i}),s=async u=>{t(go,u),await Ft(),t("change",u)},l=k({get(){return r.modelValue},set(u){s(u)}});return At($s,{...k5($d(r),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:l,changeEvent:s}),Se(()=>r.modelValue,()=>{r.validateEvent&&(i==null||i.validate("change").catch(u=>void 0))}),(u,c)=>{var f;return Y(),_e(nn(u.tag),{id:E(a),class:ue(E(n).b("group")),role:"group","aria-label":E(o)?void 0:u.label||"checkbox-group","aria-labelledby":E(o)?(f=E(i))==null?void 0:f.labelId:void 0},{default:Z(()=>[$e(u.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var dA=Ze(A8,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-group.vue"]]);const Cs=hr(_8,{CheckboxButton:fA,CheckboxGroup:dA});fa(fA);fa(dA);const E8=tt({closable:Boolean,type:{type:String,values:["success","info","warning","danger",""],default:""},hit:Boolean,disableTransitions:Boolean,color:{type:String,default:""},size:{type:String,values:Yu,default:""},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),P8={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},L8=ce({name:"ElTag"}),D8=ce({...L8,props:E8,emits:P8,setup(e,{emit:t}){const r=e,n=ia(),i=Ne("tag"),a=k(()=>{const{type:l,hit:u,effect:c,closable:f,round:d}=r;return[i.b(),i.is("closable",f),i.m(l),i.m(n.value),i.m(c),i.is("hit",u),i.is("round",d)]}),o=l=>{t("close",l)},s=l=>{t("click",l)};return(l,u)=>l.disableTransitions?(Y(),me("span",{key:0,class:ue(E(a)),style:St({backgroundColor:l.color}),onClick:s},[ae("span",{class:ue(E(i).e("content"))},[$e(l.$slots,"default")],2),l.closable?(Y(),_e(E(lr),{key:0,class:ue(E(i).e("close")),onClick:Jf(o,["stop"])},{default:Z(()=>[ee(E(Yp))]),_:1},8,["class","onClick"])):Fe("v-if",!0)],6)):(Y(),_e(Ci,{key:1,name:`${E(i).namespace.value}-zoom-in-center`,appear:""},{default:Z(()=>[ae("span",{class:ue(E(a)),style:St({backgroundColor:l.color}),onClick:s},[ae("span",{class:ue(E(i).e("content"))},[$e(l.$slots,"default")],2),l.closable?(Y(),_e(E(lr),{key:0,class:ue(E(i).e("close")),onClick:Jf(o,["stop"])},{default:Z(()=>[ee(E(Yp))]),_:1},8,["class","onClick"])):Fe("v-if",!0)],6)]),_:3},8,["name"]))}});var I8=Ze(D8,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]);const O8=hr(I8),hA=Symbol("rowContextKey"),R8=["start","center","end","space-around","space-between","space-evenly"],k8=["top","middle","bottom"],N8=tt({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:R8,default:"start"},align:{type:String,values:k8,default:"top"}}),F8=ce({name:"ElRow"}),B8=ce({...F8,props:N8,setup(e){const t=e,r=Ne("row"),n=k(()=>t.gutter);At(hA,{gutter:n});const i=k(()=>{const o={};return t.gutter&&(o.marginRight=o.marginLeft=`-${t.gutter/2}px`),o}),a=k(()=>[r.b(),r.is(`justify-${t.justify}`,t.justify!=="start"),r.is(`align-${t.align}`,t.align!=="top")]);return(o,s)=>(Y(),_e(nn(o.tag),{class:ue(E(a)),style:St(E(i))},{default:Z(()=>[$e(o.$slots,"default")]),_:3},8,["class","style"]))}});var $8=Ze(B8,[["__file","/home/runner/work/element-plus/element-plus/packages/components/row/src/row.vue"]]);const vA=hr($8),H8=tt({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:Le([Number,Object]),default:()=>Ya({})},sm:{type:Le([Number,Object]),default:()=>Ya({})},md:{type:Le([Number,Object]),default:()=>Ya({})},lg:{type:Le([Number,Object]),default:()=>Ya({})},xl:{type:Le([Number,Object]),default:()=>Ya({})}}),z8=ce({name:"ElCol"}),W8=ce({...z8,props:H8,setup(e){const t=e,{gutter:r}=Ee(hA,{gutter:k(()=>0)}),n=Ne("col"),i=k(()=>{const o={};return r.value&&(o.paddingLeft=o.paddingRight=`${r.value/2}px`),o}),a=k(()=>{const o=[];return["span","offset","pull","push"].forEach(u=>{const c=t[u];$t(c)&&(u==="span"?o.push(n.b(`${t[u]}`)):c>0&&o.push(n.b(`${u}-${t[u]}`)))}),["xs","sm","md","lg","xl"].forEach(u=>{$t(t[u])?o.push(n.b(`${u}-${t[u]}`)):Xe(t[u])&&Object.entries(t[u]).forEach(([c,f])=>{o.push(c!=="span"?n.b(`${u}-${c}-${f}`):n.b(`${u}-${f}`))})}),r.value&&o.push(n.is("guttered")),[n.b(),o]});return(o,s)=>(Y(),_e(nn(o.tag),{class:ue(E(a)),style:St(E(i))},{default:Z(()=>[$e(o.$slots,"default")]),_:3},8,["class","style"]))}});var V8=Ze(W8,[["__file","/home/runner/work/element-plus/element-plus/packages/components/col/src/col.vue"]]);const pA=hr(V8),G8=ce({name:"ElCollapseTransition"}),U8=ce({...G8,setup(e){const t=Ne("collapse-transition"),r={beforeEnter(n){n.dataset||(n.dataset={}),n.dataset.oldPaddingTop=n.style.paddingTop,n.dataset.oldPaddingBottom=n.style.paddingBottom,n.style.maxHeight=0,n.style.paddingTop=0,n.style.paddingBottom=0},enter(n){n.dataset.oldOverflow=n.style.overflow,n.scrollHeight!==0?(n.style.maxHeight=`${n.scrollHeight}px`,n.style.paddingTop=n.dataset.oldPaddingTop,n.style.paddingBottom=n.dataset.oldPaddingBottom):(n.style.maxHeight=0,n.style.paddingTop=n.dataset.oldPaddingTop,n.style.paddingBottom=n.dataset.oldPaddingBottom),n.style.overflow="hidden"},afterEnter(n){n.style.maxHeight="",n.style.overflow=n.dataset.oldOverflow},beforeLeave(n){n.dataset||(n.dataset={}),n.dataset.oldPaddingTop=n.style.paddingTop,n.dataset.oldPaddingBottom=n.style.paddingBottom,n.dataset.oldOverflow=n.style.overflow,n.style.maxHeight=`${n.scrollHeight}px`,n.style.overflow="hidden"},leave(n){n.scrollHeight!==0&&(n.style.maxHeight=0,n.style.paddingTop=0,n.style.paddingBottom=0)},afterLeave(n){n.style.maxHeight="",n.style.overflow=n.dataset.oldOverflow,n.style.paddingTop=n.dataset.oldPaddingTop,n.style.paddingBottom=n.dataset.oldPaddingBottom}};return(n,i)=>(Y(),_e(Ci,ca({name:E(t).b()},RI(r)),{default:Z(()=>[$e(n.$slots,"default")]),_:3},16,["name"]))}});var Lf=Ze(U8,[["__file","/home/runner/work/element-plus/element-plus/packages/components/collapse-transition/src/collapse-transition.vue"]]);Lf.install=e=>{e.component(Lf.name,Lf)};const j8=Lf,Y8=ce({inheritAttrs:!1});function q8(e,t,r,n,i,a){return $e(e.$slots,"default")}var K8=Ze(Y8,[["render",q8],["__file","/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection.vue"]]);const X8=ce({name:"ElCollectionItem",inheritAttrs:!1});function Z8(e,t,r,n,i,a){return $e(e.$slots,"default")}var Q8=Ze(X8,[["render",Z8],["__file","/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection-item.vue"]]);const J8="data-el-collection-item",eW=e=>{const t=`El${e}Collection`,r=`${t}Item`,n=Symbol(t),i=Symbol(r),a={...K8,name:t,setup(){const s=B(null),l=new Map;At(n,{itemMap:l,getItems:()=>{const c=E(s);if(!c)return[];const f=Array.from(c.querySelectorAll(`[${J8}]`));return[...l.values()].sort((h,v)=>f.indexOf(h.ref)-f.indexOf(v.ref))},collectionRef:s})}},o={...Q8,name:r,setup(s,{attrs:l}){const u=B(null),c=Ee(n,void 0);At(i,{collectionItemRef:u}),wt(()=>{const f=E(u);f&&c.itemMap.set(f,{ref:f,...l})}),Xt(()=>{const f=E(u);c.itemMap.delete(f)})}};return{COLLECTION_INJECTION_KEY:n,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:a,ElCollectionItem:o}},Kh=tt({trigger:bu.trigger,effect:{...qr.effect,default:"light"},type:{type:Le(String)},placement:{type:Le(String),default:"bottom"},popperOptions:{type:Le(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:Le([Number,String]),default:0},maxHeight:{type:Le([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:Le(Object)},teleported:qr.teleported});tt({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Wn}});tt({onKeydown:{type:Le(Function)}});Ot.down,Ot.pageDown,Ot.home;Ot.up,Ot.pageUp,Ot.end;eW("Dropdown");let tW=class{constructor(t,r){this.parent=t,this.domNode=r,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(t){t===this.subMenuItems.length?t=0:t<0&&(t=this.subMenuItems.length-1),this.subMenuItems[t].focus(),this.subIndex=t}addListeners(){const t=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,r=>{r.addEventListener("keydown",n=>{let i=!1;switch(n.code){case Ot.down:{this.gotoSubIndex(this.subIndex+1),i=!0;break}case Ot.up:{this.gotoSubIndex(this.subIndex-1),i=!0;break}case Ot.tab:{wf(t,"mouseleave");break}case Ot.enter:case Ot.space:{i=!0,n.currentTarget.click();break}}return i&&(n.preventDefault(),n.stopPropagation()),!1})})}},rW=class{constructor(t,r){this.domNode=t,this.submenu=null,this.submenu=null,this.init(r)}init(t){this.domNode.setAttribute("tabindex","0");const r=this.domNode.querySelector(`.${t}-menu`);r&&(this.submenu=new tW(this,r)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",t=>{let r=!1;switch(t.code){case Ot.down:{wf(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),r=!0;break}case Ot.up:{wf(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),r=!0;break}case Ot.tab:{wf(t.currentTarget,"mouseleave");break}case Ot.enter:case Ot.space:{r=!0,t.currentTarget.click();break}}r&&t.preventDefault()})}},nW=class{constructor(t,r){this.domNode=t,this.init(r)}init(t){const r=this.domNode.childNodes;Array.from(r).forEach(n=>{n.nodeType===1&&new rW(n,t)})}};const iW=ce({name:"ElMenuCollapseTransition",setup(){const e=Ne("menu");return{listeners:{onBeforeEnter:r=>r.style.opacity="0.2",onEnter(r,n){Zo(r,`${e.namespace.value}-opacity-transition`),r.style.opacity="1",n()},onAfterEnter(r){ss(r,`${e.namespace.value}-opacity-transition`),r.style.opacity=""},onBeforeLeave(r){r.dataset||(r.dataset={}),Ol(r,e.m("collapse"))?(ss(r,e.m("collapse")),r.dataset.oldOverflow=r.style.overflow,r.dataset.scrollWidth=r.clientWidth.toString(),Zo(r,e.m("collapse"))):(Zo(r,e.m("collapse")),r.dataset.oldOverflow=r.style.overflow,r.dataset.scrollWidth=r.clientWidth.toString(),ss(r,e.m("collapse"))),r.style.width=`${r.scrollWidth}px`,r.style.overflow="hidden"},onLeave(r){Zo(r,"horizontal-collapse-transition"),r.style.width=`${r.dataset.scrollWidth}px`}}}}});function aW(e,t,r,n,i,a){return Y(),_e(Ci,ca({mode:"out-in"},e.listeners),{default:Z(()=>[$e(e.$slots,"default")]),_:3},16)}var oW=Ze(iW,[["render",aW],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-collapse-transition.vue"]]);function gA(e,t){const r=k(()=>{let i=e.parent;const a=[t.value];for(;i.type.name!=="ElMenu";)i.props.index&&a.unshift(i.props.index),i=i.parent;return a});return{parentMenu:k(()=>{let i=e.parent;for(;i&&!["ElMenu","ElSubMenu"].includes(i.type.name);)i=i.parent;return i}),indexPath:r}}function sW(e){return k(()=>{const r=e.backgroundColor;return r?new JM(r).shade(20).toString():""})}const mA=(e,t)=>{const r=Ne("menu");return k(()=>r.cssVarBlock({"text-color":e.textColor||"","hover-text-color":e.textColor||"","bg-color":e.backgroundColor||"","hover-bg-color":sW(e).value||"","active-color":e.activeTextColor||"",level:`${t}`}))},lW=tt({index:{type:String,required:!0},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},popperClass:String,disabled:Boolean,popperAppendToBody:{type:Boolean,default:void 0},teleported:{type:Boolean,default:void 0},popperOffset:{type:Number,default:6},expandCloseIcon:{type:Wn},expandOpenIcon:{type:Wn},collapseCloseIcon:{type:Wn},collapseOpenIcon:{type:Wn}}),Mc="ElSubMenu";var Ry=ce({name:Mc,props:lW,setup(e,{slots:t,expose:r}){vy({from:"popper-append-to-body",replacement:"teleported",scope:Mc,version:"2.3.0",ref:"https://element-plus.org/en-US/component/menu.html#submenu-attributes"},k(()=>e.popperAppendToBody!==void 0));const n=ct(),{indexPath:i,parentMenu:a}=gA(n,k(()=>e.index)),o=Ne("menu"),s=Ne("sub-menu"),l=Ee("rootMenu");l||na(Mc,"can not inject root menu");const u=Ee(`subMenu:${a.value.uid}`);u||na(Mc,"can not inject sub menu");const c=B({}),f=B({});let d;const h=B(!1),v=B(),p=B(null),g=k(()=>A.value==="horizontal"&&y.value?"bottom-start":"right-start"),m=k(()=>A.value==="horizontal"&&y.value||A.value==="vertical"&&!l.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?w.value?e.expandOpenIcon:e.expandCloseIcon:lM:e.collapseCloseIcon&&e.collapseOpenIcon?w.value?e.collapseOpenIcon:e.collapseCloseIcon:dy),y=k(()=>u.level===0),_=k(()=>{var R;const j=(R=e.teleported)!=null?R:e.popperAppendToBody;return j===void 0?y.value:j}),b=k(()=>l.props.collapse?`${o.namespace.value}-zoom-in-left`:`${o.namespace.value}-zoom-in-top`),x=k(()=>A.value==="horizontal"&&y.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","left-start","bottom-start","bottom-end","top-start","top-end"]),w=k(()=>l.openedMenus.includes(e.index)),S=k(()=>{let R=!1;return Object.values(c.value).forEach(j=>{j.active&&(R=!0)}),Object.values(f.value).forEach(j=>{j.active&&(R=!0)}),R}),C=k(()=>l.props.backgroundColor||""),M=k(()=>l.props.activeTextColor||""),P=k(()=>l.props.textColor||""),A=k(()=>l.props.mode),T=fn({index:e.index,indexPath:i,active:S}),D=k(()=>A.value!=="horizontal"?{color:P.value}:{borderBottomColor:S.value?l.props.activeTextColor?M.value:"":"transparent",color:S.value?M.value:P.value}),N=()=>{var R,j,re;return(re=(j=(R=p.value)==null?void 0:R.popperRef)==null?void 0:j.popperInstanceRef)==null?void 0:re.destroy()},H=R=>{R||N()},$=()=>{l.props.menuTrigger==="hover"&&l.props.mode==="horizontal"||l.props.collapse&&l.props.mode==="vertical"||e.disabled||l.handleSubMenuClick({index:e.index,indexPath:i.value,active:S.value})},G=(R,j=e.showTimeout)=>{var re;R.type!=="focus"&&(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"||e.disabled||(u.mouseInChild.value=!0,d==null||d(),{stop:d}=kp(()=>{l.openMenu(e.index,i.value)},j),_.value&&((re=a.value.vnode.el)==null||re.dispatchEvent(new MouseEvent("mouseenter")))))},F=(R=!1)=>{var j,re;l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"||(d==null||d(),u.mouseInChild.value=!1,{stop:d}=kp(()=>!h.value&&l.closeMenu(e.index,i.value),e.hideTimeout),_.value&&R&&((j=n.parent)==null?void 0:j.type.name)==="ElSubMenu"&&((re=u.handleMouseleave)==null||re.call(u,!0)))};Se(()=>l.props.collapse,R=>H(Boolean(R)));{const R=re=>{f.value[re.index]=re},j=re=>{delete f.value[re.index]};At(`subMenu:${n.uid}`,{addSubMenu:R,removeSubMenu:j,handleMouseleave:F,mouseInChild:h,level:u.level+1})}return r({opened:w}),wt(()=>{l.addSubMenu(T),u.addSubMenu(T)}),Xt(()=>{u.removeSubMenu(T),l.removeSubMenu(T)}),()=>{var R;const j=[(R=t.title)==null?void 0:R.call(t),Ce(lr,{class:s.e("icon-arrow"),style:{transform:w.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&l.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>He(m.value)?Ce(n.appContext.components[m.value]):Ce(m.value)})],re=mA(l.props,u.level+1),oe=l.isMenuPopup?Ce(Ju,{ref:p,visible:w.value,effect:"light",pure:!0,offset:e.popperOffset,showArrow:!1,persistent:!0,popperClass:e.popperClass,placement:g.value,teleported:_.value,fallbackPlacements:x.value,transition:b.value,gpuAcceleration:!1},{content:()=>{var ye;return Ce("div",{class:[o.m(A.value),o.m("popup-container"),e.popperClass],onMouseenter:Ae=>G(Ae,100),onMouseleave:()=>F(!0),onFocus:Ae=>G(Ae,100)},[Ce("ul",{class:[o.b(),o.m("popup"),o.m(`popup-${g.value}`)],style:re.value},[(ye=t.default)==null?void 0:ye.call(t)])])},default:()=>Ce("div",{class:s.e("title"),style:[D.value,{backgroundColor:C.value}],onClick:$},j)}):Ce(pt,{},[Ce("div",{class:s.e("title"),style:[D.value,{backgroundColor:C.value}],ref:v,onClick:$},j),Ce(j8,{},{default:()=>{var ye;return nr(Ce("ul",{role:"menu",class:[o.b(),o.m("inline")],style:re.value},[(ye=t.default)==null?void 0:ye.call(t)]),[[yi,w.value]])}})]);return Ce("li",{class:[s.b(),s.is("active",S.value),s.is("opened",w.value),s.is("disabled",e.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:w.value,onMouseenter:G,onMouseleave:()=>F(!0),onFocus:G},[oe])}}});const uW=tt({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:Le(Array),default:()=>Ya([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperEffect:{type:String,values:["dark","light"],default:"dark"}}),Xh=e=>Array.isArray(e)&&e.every(t=>He(t)),cW={close:(e,t)=>He(e)&&Xh(t),open:(e,t)=>He(e)&&Xh(t),select:(e,t,r,n)=>He(e)&&Xh(t)&&Xe(r)&&(n===void 0||n instanceof Promise)};var fW=ce({name:"ElMenu",props:uW,emits:cW,setup(e,{emit:t,slots:r,expose:n}){const i=ct(),a=i.appContext.config.globalProperties.$router,o=B(),s=Ne("menu"),l=Ne("sub-menu"),u=B(-1),c=B(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),f=B(e.defaultActive),d=B({}),h=B({}),v=k(()=>e.mode==="horizontal"||e.mode==="vertical"&&e.collapse),p=()=>{const A=f.value&&d.value[f.value];if(!A||e.mode==="horizontal"||e.collapse)return;A.indexPath.forEach(D=>{const N=h.value[D];N&&g(D,N.indexPath)})},g=(A,T)=>{c.value.includes(A)||(e.uniqueOpened&&(c.value=c.value.filter(D=>T.includes(D))),c.value.push(A),t("open",A,T))},m=A=>{const T=c.value.indexOf(A);T!==-1&&c.value.splice(T,1)},y=(A,T)=>{m(A),t("close",A,T)},_=({index:A,indexPath:T})=>{c.value.includes(A)?y(A,T):g(A,T)},b=A=>{(e.mode==="horizontal"||e.collapse)&&(c.value=[]);const{index:T,indexPath:D}=A;if(!(gu(T)||gu(D)))if(e.router&&a){const N=A.route||T,H=a.push(N).then($=>($||(f.value=T),$));t("select",T,D,{index:T,indexPath:D,route:N},H)}else f.value=T,t("select",T,D,{index:T,indexPath:D})},x=A=>{const T=d.value,D=T[A]||f.value&&T[f.value]||T[e.defaultActive];D?f.value=D.index:f.value=A},w=()=>{var A,T;if(!o.value)return-1;const D=Array.from((T=(A=o.value)==null?void 0:A.childNodes)!=null?T:[]).filter(j=>j.nodeName!=="#text"||j.nodeValue),N=64,H=Number.parseInt(getComputedStyle(o.value).paddingLeft,10),$=Number.parseInt(getComputedStyle(o.value).paddingRight,10),G=o.value.clientWidth-H-$;let F=0,R=0;return D.forEach((j,re)=>{F+=j.offsetWidth||0,F<=G-N&&(R=re+1)}),R===D.length?-1:R},S=(A,T=33.34)=>{let D;return()=>{D&&clearTimeout(D),D=setTimeout(()=>{A()},T)}};let C=!0;const M=()=>{const A=()=>{u.value=-1,Ft(()=>{u.value=w()})};C?A():S(A)(),C=!1};Se(()=>e.defaultActive,A=>{d.value[A]||(f.value=""),x(A)}),Se(()=>e.collapse,A=>{A&&(c.value=[])}),Se(d.value,p);let P;io(()=>{e.mode==="horizontal"&&e.ellipsis?P=gs(o,M).stop:P==null||P()});{const A=H=>{h.value[H.index]=H},T=H=>{delete h.value[H.index]};At("rootMenu",fn({props:e,openedMenus:c,items:d,subMenus:h,activeIndex:f,isMenuPopup:v,addMenuItem:H=>{d.value[H.index]=H},removeMenuItem:H=>{delete d.value[H.index]},addSubMenu:A,removeSubMenu:T,openMenu:g,closeMenu:y,handleMenuItemClick:b,handleSubMenuClick:_})),At(`subMenu:${i.uid}`,{addSubMenu:A,removeSubMenu:T,mouseInChild:B(!1),level:0})}return wt(()=>{e.mode==="horizontal"&&new nW(i.vnode.el,s.namespace.value)}),n({open:T=>{const{indexPath:D}=h.value[T];D.forEach(N=>g(N,D))},close:m,handleResize:M}),()=>{var A,T;let D=(T=(A=r.default)==null?void 0:A.call(r))!=null?T:[];const N=[];if(e.mode==="horizontal"&&o.value){const G=Cf(D),F=u.value===-1?G:G.slice(0,u.value),R=u.value===-1?[]:G.slice(u.value);R!=null&&R.length&&e.ellipsis&&(D=F,N.push(Ce(Ry,{index:"sub-menu-more",class:l.e("hide-arrow")},{title:()=>Ce(lr,{class:l.e("icon-more")},{default:()=>Ce(M3)}),default:()=>R})))}const H=mA(e,0),$=Ce("ul",{key:String(e.collapse),role:"menubar",ref:o,style:H.value,class:{[s.b()]:!0,[s.m(e.mode)]:!0,[s.m("collapse")]:e.collapse}},[...D,...N]);return e.collapseTransition&&e.mode==="vertical"?Ce(oW,()=>$):$}}});const dW=tt({index:{type:Le([String,null]),default:null},route:{type:Le([String,Object])},disabled:Boolean}),hW={click:e=>He(e.index)&&Array.isArray(e.indexPath)},Zh="ElMenuItem",vW=ce({name:Zh,components:{ElTooltip:Ju},props:dW,emits:hW,setup(e,{emit:t}){const r=ct(),n=Ee("rootMenu"),i=Ne("menu"),a=Ne("menu-item");n||na(Zh,"can not inject root menu");const{parentMenu:o,indexPath:s}=gA(r,tn(e,"index")),l=Ee(`subMenu:${o.value.uid}`);l||na(Zh,"can not inject sub menu");const u=k(()=>e.index===n.activeIndex),c=fn({index:e.index,indexPath:s,active:u}),f=()=>{e.disabled||(n.handleMenuItemClick({index:e.index,indexPath:s.value,route:e.route}),t("click",c))};return wt(()=>{l.addSubMenu(c),n.addMenuItem(c)}),Xt(()=>{l.removeSubMenu(c),n.removeMenuItem(c)}),{parentMenu:o,rootMenu:n,active:u,nsMenu:i,nsMenuItem:a,handleClick:f}}});function pW(e,t,r,n,i,a){const o=_r("el-tooltip");return Y(),me("li",{class:ue([e.nsMenuItem.b(),e.nsMenuItem.is("active",e.active),e.nsMenuItem.is("disabled",e.disabled)]),role:"menuitem",tabindex:"-1",onClick:t[0]||(t[0]=(...s)=>e.handleClick&&e.handleClick(...s))},[e.parentMenu.type.name==="ElMenu"&&e.rootMenu.props.collapse&&e.$slots.title?(Y(),_e(o,{key:0,effect:e.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:Z(()=>[$e(e.$slots,"title")]),default:Z(()=>[ae("div",{class:ue(e.nsMenu.be("tooltip","trigger"))},[$e(e.$slots,"default")],2)]),_:3},8,["effect"])):(Y(),me(pt,{key:1},[$e(e.$slots,"default"),$e(e.$slots,"title")],64))],2)}var yA=Ze(vW,[["render",pW],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item.vue"]]);const gW={title:String},mW="ElMenuItemGroup",yW=ce({name:mW,props:gW,setup(){return{ns:Ne("menu-item-group")}}});function _W(e,t,r,n,i,a){return Y(),me("li",{class:ue(e.ns.b())},[ae("div",{class:ue(e.ns.e("title"))},[e.$slots.title?$e(e.$slots,"title",{key:1}):(Y(),me(pt,{key:0},[Bt(Me(e.title),1)],64))],2),ae("ul",null,[$e(e.$slots,"default")])],2)}var _A=Ze(yW,[["render",_W],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item-group.vue"]]);const bW=hr(fW,{MenuItem:yA,MenuItemGroup:_A,SubMenu:Ry}),wW=fa(yA);fa(_A);const xW=fa(Ry),SW=tt({trigger:bu.trigger,placement:Kh.placement,disabled:bu.disabled,visible:qr.visible,transition:qr.transition,popperOptions:Kh.popperOptions,tabindex:Kh.tabindex,content:qr.content,popperStyle:qr.popperStyle,popperClass:qr.popperClass,enterable:{...qr.enterable,default:!0},effect:{...qr.effect,default:"light"},teleported:qr.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),CW={"update:visible":e=>Br(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},TW="onUpdate:visible",MW=ce({name:"ElPopover"}),AW=ce({...MW,props:SW,emits:CW,setup(e,{expose:t,emit:r}){const n=e,i=k(()=>n[TW]),a=Ne("popover"),o=B(),s=k(()=>{var g;return(g=E(o))==null?void 0:g.popperRef}),l=k(()=>[{width:po(n.width)},n.popperStyle]),u=k(()=>[a.b(),n.popperClass,{[a.m("plain")]:!!n.content}]),c=k(()=>n.transition===`${a.namespace.value}-fade-in-linear`),f=()=>{var g;(g=o.value)==null||g.hide()},d=()=>{r("before-enter")},h=()=>{r("before-leave")},v=()=>{r("after-enter")},p=()=>{r("update:visible",!1),r("after-leave")};return t({popperRef:s,hide:f}),(g,m)=>(Y(),_e(E(Ju),ca({ref_key:"tooltipRef",ref:o},g.$attrs,{trigger:g.trigger,placement:g.placement,disabled:g.disabled,visible:g.visible,transition:g.transition,"popper-options":g.popperOptions,tabindex:g.tabindex,content:g.content,offset:g.offset,"show-after":g.showAfter,"hide-after":g.hideAfter,"auto-close":g.autoClose,"show-arrow":g.showArrow,"aria-label":g.title,effect:g.effect,enterable:g.enterable,"popper-class":E(u),"popper-style":E(l),teleported:g.teleported,persistent:g.persistent,"gpu-acceleration":E(c),"onUpdate:visible":E(i),onBeforeShow:d,onBeforeHide:h,onShow:v,onHide:p}),{content:Z(()=>[g.title?(Y(),me("div",{key:0,class:ue(E(a).e("title")),role:"title"},Me(g.title),3)):Fe("v-if",!0),$e(g.$slots,"default",{},()=>[Bt(Me(g.content),1)])]),default:Z(()=>[g.$slots.reference?$e(g.$slots,"reference",{key:0}):Fe("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var EW=Ze(AW,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popover/src/popover.vue"]]);const h1=(e,t)=>{const r=t.arg||t.value,n=r==null?void 0:r.popperRef;n&&(n.triggerRef=e)};var PW={mounted(e,t){h1(e,t)},updated(e,t){h1(e,t)}};const LW="popover",DW=H3(PW,LW),IW=hr(EW,{directive:DW}),OW=tt({modelValue:{type:[Boolean,String,Number],default:!1},value:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},width:{type:[String,Number],default:""},inlinePrompt:{type:Boolean,default:!1},activeIcon:{type:Wn},inactiveIcon:{type:Wn},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},borderColor:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},id:String,loading:{type:Boolean,default:!1},beforeChange:{type:Le(Function)},size:{type:String,validator:z3},tabindex:{type:[String,Number]}}),RW={[go]:e=>Br(e)||He(e)||$t(e),[qp]:e=>Br(e)||He(e)||$t(e),[Kp]:e=>Br(e)||He(e)||$t(e)},kW=["onClick"],NW=["id","aria-checked","aria-disabled","name","true-value","false-value","disabled","tabindex","onKeydown"],FW=["aria-hidden"],BW=["aria-hidden"],$W=["aria-hidden"],vg="ElSwitch",HW=ce({name:vg}),zW=ce({...HW,props:OW,emits:RW,setup(e,{expose:t,emit:r}){const n=e,i=ct(),{formItem:a}=Zu(),o=ia(),s=Ne("switch");vy({from:'"value"',replacement:'"model-value" or "v-model"',scope:vg,version:"2.3.0",ref:"https://element-plus.org/en-US/component/switch.html#attributes",type:"Attribute"},k(()=>{var x;return!!((x=i.vnode.props)!=null&&x.value)}));const{inputId:l}=Py(n,{formItemContext:a}),u=rh(k(()=>n.loading)),c=B(n.modelValue!==!1),f=B(),d=B(),h=k(()=>[s.b(),s.m(o.value),s.is("disabled",u.value),s.is("checked",g.value)]),v=k(()=>({width:po(n.width)}));Se(()=>n.modelValue,()=>{c.value=!0}),Se(()=>n.value,()=>{c.value=!1});const p=k(()=>c.value?n.modelValue:n.value),g=k(()=>p.value===n.activeValue);[n.activeValue,n.inactiveValue].includes(p.value)||(r(go,n.inactiveValue),r(qp,n.inactiveValue),r(Kp,n.inactiveValue)),Se(g,x=>{var w;f.value.checked=x,n.validateEvent&&((w=a==null?void 0:a.validate)==null||w.call(a,"change").catch(S=>void 0))});const m=()=>{const x=g.value?n.inactiveValue:n.activeValue;r(go,x),r(qp,x),r(Kp,x),Ft(()=>{f.value.checked=g.value})},y=()=>{if(u.value)return;const{beforeChange:x}=n;if(!x){m();return}const w=x();[jf(w),Br(w)].includes(!0)||na(vg,"beforeChange must return type `Promise` or `boolean`"),jf(w)?w.then(C=>{C&&m()}).catch(C=>{}):w&&m()},_=k(()=>s.cssVarBlock({...n.activeColor?{"on-color":n.activeColor}:null,...n.inactiveColor?{"off-color":n.inactiveColor}:null,...n.borderColor?{"border-color":n.borderColor}:null})),b=()=>{var x,w;(w=(x=f.value)==null?void 0:x.focus)==null||w.call(x)};return wt(()=>{f.value.checked=g.value}),t({focus:b,checked:g}),(x,w)=>(Y(),me("div",{class:ue(E(h)),style:St(E(_)),onClick:Jf(y,["prevent"])},[ae("input",{id:E(l),ref_key:"input",ref:f,class:ue(E(s).e("input")),type:"checkbox",role:"switch","aria-checked":E(g),"aria-disabled":E(u),name:x.name,"true-value":x.activeValue,"false-value":x.inactiveValue,disabled:E(u),tabindex:x.tabindex,onChange:m,onKeydown:UO(y,["enter"])},null,42,NW),!x.inlinePrompt&&(x.inactiveIcon||x.inactiveText)?(Y(),me("span",{key:0,class:ue([E(s).e("label"),E(s).em("label","left"),E(s).is("active",!E(g))])},[x.inactiveIcon?(Y(),_e(E(lr),{key:0},{default:Z(()=>[(Y(),_e(nn(x.inactiveIcon)))]),_:1})):Fe("v-if",!0),!x.inactiveIcon&&x.inactiveText?(Y(),me("span",{key:1,"aria-hidden":E(g)},Me(x.inactiveText),9,FW)):Fe("v-if",!0)],2)):Fe("v-if",!0),ae("span",{ref_key:"core",ref:d,class:ue(E(s).e("core")),style:St(E(v))},[x.inlinePrompt?(Y(),me("div",{key:0,class:ue(E(s).e("inner"))},[x.activeIcon||x.inactiveIcon?(Y(),_e(E(lr),{key:0,class:ue(E(s).is("icon"))},{default:Z(()=>[(Y(),_e(nn(E(g)?x.activeIcon:x.inactiveIcon)))]),_:1},8,["class"])):x.activeText||x.inactiveText?(Y(),me("span",{key:1,class:ue(E(s).is("text")),"aria-hidden":!E(g)},Me(E(g)?x.activeText:x.inactiveText),11,BW)):Fe("v-if",!0)],2)):Fe("v-if",!0),ae("div",{class:ue(E(s).e("action"))},[x.loading?(Y(),_e(E(lr),{key:0,class:ue(E(s).is("loading"))},{default:Z(()=>[ee(E(hy))]),_:1},8,["class"])):Fe("v-if",!0)],2)],6),!x.inlinePrompt&&(x.activeIcon||x.activeText)?(Y(),me("span",{key:1,class:ue([E(s).e("label"),E(s).em("label","right"),E(s).is("active",E(g))])},[x.activeIcon?(Y(),_e(E(lr),{key:0},{default:Z(()=>[(Y(),_e(nn(x.activeIcon)))]),_:1})):Fe("v-if",!0),!x.activeIcon&&x.activeText?(Y(),me("span",{key:1,"aria-hidden":!E(g)},Me(x.activeText),9,$W)):Fe("v-if",!0)],2)):Fe("v-if",!0)],14,kW))}});var WW=Ze(zW,[["__file","/home/runner/work/element-plus/element-plus/packages/components/switch/src/switch.vue"]]);const VW=hr(WW);/*! * escape-html * Copyright(c) 2012-2013 TJ Holowaychuk * Copyright(c) 2015 Andreas Lubbe * Copyright(c) 2015 Tiancheng "Timothy" Gu * MIT Licensed - */var GW=/["'&<>]/,UW=jW;function jW(e){var t=""+e,r=GW.exec(t);if(!r)return t;var n,i="",a=0,o=0;for(a=r.index;atypeof u=="string"?vu(s,u):u(s,l,e))):(t!=="$key"&&Xe(s)&&"$value"in s&&(s=s.$value),[Xe(s)?vu(s,t):s])},o=function(s,l){if(n)return n(s.value,l.value);for(let u=0,c=s.key.length;ul.key[u])return 1}return 0};return e.map((s,l)=>({value:s,index:l,key:a?a(s,l):null})).sort((s,l)=>{let u=o(s,l);return u||(u=s.index-l.index),u*+r}).map(s=>s.value)},bA=function(e,t){let r=null;return e.columns.forEach(n=>{n.id===t&&(r=n)}),r},qW=function(e,t){let r=null;for(let n=0;n{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const r=t.split(".");let n=e;for(const i of r)n=n[i];return`${n}`}else if(typeof t=="function")return t.call(null,e)},Ja=function(e,t){const r={};return(e||[]).forEach((n,i)=>{r[Yt(n,t)]={row:n,index:i}}),r};function KW(e,t){const r={};let n;for(n in e)r[n]=e[n];for(n in t)if(We(t,n)){const i=t[n];typeof i<"u"&&(r[n]=i)}return r}function ky(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function wA(e){return e===""||e!==void 0&&(e=ky(e),Number.isNaN(e)&&(e=80)),e}function XW(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function ZW(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Fl(e,t,r){let n=!1;const i=e.indexOf(t),a=i!==-1,o=s=>{s==="add"?e.push(t):e.splice(i,1),n=!0,be(t.children)&&t.children.forEach(l=>{Fl(e,l,r??!a)})};return Br(r)?r&&!a?o("add"):!r&&a&&o("remove"):o(a?"remove":"add"),n}function QW(e,t,r="children",n="hasChildren"){const i=o=>!(Array.isArray(o)&&o.length);function a(o,s,l){t(o,s,l),s.forEach(u=>{if(u[n]){t(u,null,l+1);return}const c=u[r];i(c)||a(u,c,l+1)})}e.forEach(o=>{if(o[n]){t(o,null,0);return}const s=o[r];i(s)||a(o,s,0)})}let ui;function JW(e,t,r,n,i){i=aM({enterable:!0,showArrow:!0},i);const a=e==null?void 0:e.dataset.prefix,o=e==null?void 0:e.querySelector(`.${a}-scrollbar__wrap`);function s(){const g=i.effect==="light",m=document.createElement("div");return m.className=[`${a}-popper`,g?"is-light":"is-dark",i.popperClass||""].join(" "),r=UW(r),m.innerHTML=r,m.style.zIndex=String(n()),e==null||e.appendChild(m),m}function l(){const g=document.createElement("div");return g.className=`${a}-popper__arrow`,g}function u(){c&&c.update()}ui==null||ui(),ui=()=>{try{c&&c.destroy(),h&&(e==null||e.removeChild(h)),t.removeEventListener("mouseenter",f),t.removeEventListener("mouseleave",d),o==null||o.removeEventListener("scroll",ui),ui=void 0}catch{}};let c=null,f=u,d=ui;i.enterable&&({onOpen:f,onClose:d}=DM({showAfter:i.showAfter,hideAfter:i.hideAfter,open:u,close:ui}));const h=s();h.onmouseenter=f,h.onmouseleave=d;const v=[];if(i.offset&&v.push({name:"offset",options:{offset:[0,i.offset]}}),i.showArrow){const g=h.appendChild(l());v.push({name:"arrow",options:{element:g,padding:10}})}const p=i.popperOptions||{};return c=EM(t,h,{placement:i.placement||"top",strategy:"fixed",...p,modifiers:p.modifiers?v.concat(p.modifiers):v}),t.addEventListener("mouseenter",f),t.addEventListener("mouseleave",d),o==null||o.addEventListener("scroll",ui),c}function xA(e){return e.children?E5(e.children,xA):[e]}function p1(e,t){return e+t.colSpan}const SA=(e,t,r,n)=>{let i=0,a=e;const o=r.states.columns.value;if(n){const l=xA(n[e]);i=o.slice(0,o.indexOf(l[0])).reduce(p1,0),a=i+l.reduce(p1,0)-1}else i=e;let s;switch(t){case"left":a=o.length-r.states.rightFixedLeafColumnsLength.value&&(s="right");break;default:a=o.length-r.states.rightFixedLeafColumnsLength.value&&(s="right")}return s?{direction:s,start:i,after:a}:{}},Ny=(e,t,r,n,i,a=0)=>{const o=[],{direction:s,start:l,after:u}=SA(t,r,n,i);if(s){const c=s==="left";o.push(`${e}-fixed-column--${s}`),c&&u+a===n.states.fixedLeafColumnsLength.value-1?o.push("is-last-column"):!c&&l-a===n.states.columns.value.length-n.states.rightFixedLeafColumnsLength.value&&o.push("is-first-column")}return o};function g1(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const Fy=(e,t,r,n)=>{const{direction:i,start:a=0,after:o=0}=SA(e,t,r,n);if(!i)return;const s={},l=i==="left",u=r.states.columns.value;return l?s.left=u.slice(0,a).reduce(g1,0):s.right=u.slice(o+1).reverse().reduce(g1,0),s},Ts=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function eV(e){const t=ct(),r=B(!1),n=B([]);return{updateExpandRows:()=>{const l=e.data.value||[],u=e.rowKey.value;if(r.value)n.value=l.slice();else if(u){const c=Ja(n.value,u);n.value=l.reduce((f,d)=>{const h=Yt(d,u);return c[h]&&f.push(d),f},[])}else n.value=[]},toggleRowExpansion:(l,u)=>{Fl(n.value,l,u)&&t.emit("expand-change",l,n.value.slice())},setExpandRowKeys:l=>{t.store.assertRowKey();const u=e.data.value||[],c=e.rowKey.value,f=Ja(u,c);n.value=l.reduce((d,h)=>{const v=f[h];return v&&d.push(v.row),d},[])},isRowExpanded:l=>{const u=e.rowKey.value;return u?!!Ja(n.value,u)[Yt(l,u)]:n.value.includes(l)},states:{expandRows:n,defaultExpandAll:r}}}function tV(e){const t=ct(),r=B(null),n=B(null),i=u=>{t.store.assertRowKey(),r.value=u,o(u)},a=()=>{r.value=null},o=u=>{const{data:c,rowKey:f}=e;let d=null;f.value&&(d=(E(c)||[]).find(h=>Yt(h,f.value)===u)),n.value=d,t.emit("current-change",n.value,null)};return{setCurrentRowKey:i,restoreCurrentRowKey:a,setCurrentRowByKey:o,updateCurrentRow:u=>{const c=n.value;if(u&&u!==c){n.value=u,t.emit("current-change",n.value,c);return}!u&&c&&(n.value=null,t.emit("current-change",null,c))},updateCurrentRowData:()=>{const u=e.rowKey.value,c=e.data.value||[],f=n.value;if(!c.includes(f)&&f){if(u){const d=Yt(f,u);o(d)}else n.value=null;n.value===null&&t.emit("current-change",null,f)}else r.value&&(o(r.value),a())},states:{_currentRowKey:r,currentRow:n}}}function rV(e){const t=B([]),r=B({}),n=B(16),i=B(!1),a=B({}),o=B("hasChildren"),s=B("children"),l=ct(),u=k(()=>{if(!e.rowKey.value)return{};const m=e.data.value||[];return f(m)}),c=k(()=>{const m=e.rowKey.value,y=Object.keys(a.value),_={};return y.length&&y.forEach(b=>{if(a.value[b].length){const x={children:[]};a.value[b].forEach(w=>{const S=Yt(w,m);x.children.push(S),w[o.value]&&!_[S]&&(_[S]={children:[]})}),_[b]=x}}),_}),f=m=>{const y=e.rowKey.value,_={};return QW(m,(b,x,w)=>{const S=Yt(b,y);Array.isArray(x)?_[S]={children:x.map(C=>Yt(C,y)),level:w}:i.value&&(_[S]={children:[],lazy:!0,level:w})},s.value,o.value),_},d=(m=!1,y=(_=>(_=l.store)==null?void 0:_.states.defaultExpandAll.value)())=>{var _;const b=u.value,x=c.value,w=Object.keys(b),S={};if(w.length){const C=E(r),M=[],P=(T,D)=>{if(m)return t.value?y||t.value.includes(D):!!(y||T!=null&&T.expanded);{const N=y||t.value&&t.value.includes(D);return!!(T!=null&&T.expanded||N)}};w.forEach(T=>{const D=C[T],N={...b[T]};if(N.expanded=P(D,T),N.lazy){const{loaded:H=!1,loading:$=!1}=D||{};N.loaded=!!H,N.loading=!!$,M.push(T)}S[T]=N});const A=Object.keys(x);i.value&&A.length&&M.length&&A.forEach(T=>{const D=C[T],N=x[T].children;if(M.includes(T)){if(S[T].children.length!==0)throw new Error("[ElTable]children must be an empty array.");S[T].children=N}else{const{loaded:H=!1,loading:$=!1}=D||{};S[T]={lazy:!0,loaded:!!H,loading:!!$,expanded:P(D,T),children:N,level:""}}})}r.value=S,(_=l.store)==null||_.updateTableScrollY()};Se(()=>t.value,()=>{d(!0)}),Se(()=>u.value,()=>{d()}),Se(()=>c.value,()=>{d()});const h=m=>{t.value=m,d()},v=(m,y)=>{l.store.assertRowKey();const _=e.rowKey.value,b=Yt(m,_),x=b&&r.value[b];if(b&&x&&"expanded"in x){const w=x.expanded;y=typeof y>"u"?!x.expanded:y,r.value[b].expanded=y,w!==y&&l.emit("expand-change",m,y),l.store.updateTableScrollY()}},p=m=>{l.store.assertRowKey();const y=e.rowKey.value,_=Yt(m,y),b=r.value[_];i.value&&b&&"loaded"in b&&!b.loaded?g(m,_,b):v(m,void 0)},g=(m,y,_)=>{const{load:b}=l.props;b&&!r.value[y].loaded&&(r.value[y].loading=!0,b(m,_,x=>{if(!Array.isArray(x))throw new TypeError("[ElTable] data must be an array");r.value[y].loading=!1,r.value[y].loaded=!0,r.value[y].expanded=!0,x.length&&(a.value[y]=x),l.emit("expand-change",m,!0)}))};return{loadData:g,loadOrToggle:p,toggleTreeExpansion:v,updateTreeExpandKeys:h,updateTreeData:d,normalize:f,states:{expandRowKeys:t,treeData:r,indent:n,lazy:i,lazyTreeNodeMap:a,lazyColumnIdentifier:o,childrenColumnName:s}}}const nV=(e,t)=>{const r=t.sortingColumn;return!r||typeof r.sortable=="string"?e:YW(e,t.sortProp,t.sortOrder,r.sortMethod,r.sortBy)},Df=e=>{const t=[];return e.forEach(r=>{r.children?t.push.apply(t,Df(r.children)):t.push(r)}),t};function iV(){var e;const t=ct(),{size:r}=$d((e=t.proxy)==null?void 0:e.$props),n=B(null),i=B([]),a=B([]),o=B(!1),s=B([]),l=B([]),u=B([]),c=B([]),f=B([]),d=B([]),h=B([]),v=B([]),p=[],g=B(0),m=B(0),y=B(0),_=B(!1),b=B([]),x=B(!1),w=B(!1),S=B(null),C=B({}),M=B(null),P=B(null),A=B(null),T=B(null),D=B(null);Se(i,()=>t.state&&G(!1),{deep:!0});const N=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},H=ve=>{var Pe;(Pe=ve.children)==null||Pe.forEach(je=>{je.fixed=ve.fixed,H(je)})},$=()=>{s.value.forEach(nt=>{H(nt)}),c.value=s.value.filter(nt=>nt.fixed===!0||nt.fixed==="left"),f.value=s.value.filter(nt=>nt.fixed==="right"),c.value.length>0&&s.value[0]&&s.value[0].type==="selection"&&!s.value[0].fixed&&(s.value[0].fixed=!0,c.value.unshift(s.value[0]));const ve=s.value.filter(nt=>!nt.fixed);l.value=[].concat(c.value).concat(ve).concat(f.value);const Pe=Df(ve),je=Df(c.value),Be=Df(f.value);g.value=Pe.length,m.value=je.length,y.value=Be.length,u.value=[].concat(je).concat(Pe).concat(Be),o.value=c.value.length>0||f.value.length>0},G=(ve,Pe=!1)=>{ve&&$(),Pe?t.state.doLayout():t.state.debouncedUpdateLayout()},F=ve=>b.value.includes(ve),R=()=>{_.value=!1,b.value.length&&(b.value=[],t.emit("selection-change",[]))},j=()=>{let ve;if(n.value){ve=[];const Pe=Ja(b.value,n.value),je=Ja(i.value,n.value);for(const Be in Pe)We(Pe,Be)&&!je[Be]&&ve.push(Pe[Be].row)}else ve=b.value.filter(Pe=>!i.value.includes(Pe));if(ve.length){const Pe=b.value.filter(je=>!ve.includes(je));b.value=Pe,t.emit("selection-change",Pe.slice())}},re=()=>(b.value||[]).slice(),oe=(ve,Pe=void 0,je=!0)=>{if(Fl(b.value,ve,Pe)){const nt=(b.value||[]).slice();je&&t.emit("select",nt,ve),t.emit("selection-change",nt)}},ye=()=>{var ve,Pe;const je=w.value?!_.value:!(_.value||b.value.length);_.value=je;let Be=!1,nt=0;const it=(Pe=(ve=t==null?void 0:t.store)==null?void 0:ve.states)==null?void 0:Pe.rowKey.value;i.value.forEach((Mt,ri)=>{const ni=ri+nt;S.value?S.value.call(null,Mt,ni)&&Fl(b.value,Mt,je)&&(Be=!0):Fl(b.value,Mt,je)&&(Be=!0),nt+=Q(Yt(Mt,it))}),Be&&t.emit("selection-change",b.value?b.value.slice():[]),t.emit("select-all",b.value)},Ae=()=>{const ve=Ja(b.value,n.value);i.value.forEach(Pe=>{const je=Yt(Pe,n.value),Be=ve[je];Be&&(b.value[Be.index]=Pe)})},V=()=>{var ve,Pe,je;if(((ve=i.value)==null?void 0:ve.length)===0){_.value=!1;return}let Be;n.value&&(Be=Ja(b.value,n.value));const nt=function(ni){return Be?!!Be[Yt(ni,n.value)]:b.value.includes(ni)};let it=!0,Mt=0,ri=0;for(let ni=0,sD=(i.value||[]).length;ni{var Pe;if(!t||!t.store)return 0;const{treeData:je}=t.store.states;let Be=0;const nt=(Pe=je.value[ve])==null?void 0:Pe.children;return nt&&(Be+=nt.length,nt.forEach(it=>{Be+=Q(it)})),Be},W=(ve,Pe)=>{Array.isArray(ve)||(ve=[ve]);const je={};return ve.forEach(Be=>{C.value[Be.id]=Pe,je[Be.columnKey||Be.id]=Pe}),je},q=(ve,Pe,je)=>{P.value&&P.value!==ve&&(P.value.order=null),P.value=ve,A.value=Pe,T.value=je},le=()=>{let ve=E(a);Object.keys(C.value).forEach(Pe=>{const je=C.value[Pe];if(!je||je.length===0)return;const Be=bA({columns:u.value},Pe);Be&&Be.filterMethod&&(ve=ve.filter(nt=>je.some(it=>Be.filterMethod.call(null,it,nt,Be))))}),M.value=ve},de=()=>{i.value=nV(M.value,{sortingColumn:P.value,sortProp:A.value,sortOrder:T.value})},J=(ve=void 0)=>{ve&&ve.filter||le(),de()},L=ve=>{const{tableHeaderRef:Pe}=t.refs;if(!Pe)return;const je=Object.assign({},Pe.filterPanels),Be=Object.keys(je);if(Be.length)if(typeof ve=="string"&&(ve=[ve]),Array.isArray(ve)){const nt=ve.map(it=>qW({columns:u.value},it));Be.forEach(it=>{const Mt=nt.find(ri=>ri.id===it);Mt&&(Mt.filteredValue=[])}),t.store.commit("filterChange",{column:nt,values:[],silent:!0,multi:!0})}else Be.forEach(nt=>{const it=u.value.find(Mt=>Mt.id===nt);it&&(it.filteredValue=[])}),C.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},I=()=>{P.value&&(q(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:z,toggleRowExpansion:U,updateExpandRows:K,states:ne,isRowExpanded:fe}=eV({data:i,rowKey:n}),{updateTreeExpandKeys:te,toggleTreeExpansion:ie,updateTreeData:X,loadOrToggle:we,states:he}=rV({data:i,rowKey:n}),{updateCurrentRowData:xe,updateCurrentRow:Oe,setCurrentRowKey:ze,states:rt}=tV({data:i,rowKey:n});return{assertRowKey:N,updateColumns:$,scheduleLayout:G,isSelected:F,clearSelection:R,cleanSelection:j,getSelectionRows:re,toggleRowSelection:oe,_toggleAllSelection:ye,toggleAllSelection:null,updateSelectionByRowKey:Ae,updateAllSelected:V,updateFilters:W,updateCurrentRow:Oe,updateSort:q,execFilter:le,execSort:de,execQuery:J,clearFilter:L,clearSort:I,toggleRowExpansion:U,setExpandRowKeysAdapter:ve=>{z(ve),te(ve)},setCurrentRowKey:ze,toggleRowExpansionAdapter:(ve,Pe)=>{u.value.some(({type:Be})=>Be==="expand")?U(ve,Pe):ie(ve,Pe)},isRowExpanded:fe,updateExpandRows:K,updateCurrentRowData:xe,loadOrToggle:we,updateTreeData:X,states:{tableSize:r,rowKey:n,data:i,_data:a,isComplex:o,_columns:s,originColumns:l,columns:u,fixedColumns:c,rightFixedColumns:f,leafColumns:d,fixedLeafColumns:h,rightFixedLeafColumns:v,updateOrderFns:p,leafColumnsLength:g,fixedLeafColumnsLength:m,rightFixedLeafColumnsLength:y,isAllSelected:_,selection:b,reserveSelection:x,selectOnIndeterminate:w,selectable:S,filters:C,filteredData:M,sortingColumn:P,sortProp:A,sortOrder:T,hoverRow:D,...ne,...he,...rt}}}function pg(e,t){return e.map(r=>{var n;return r.id===t.id?t:((n=r.children)!=null&&n.length&&(r.children=pg(r.children,t)),r)})}function gg(e){e.forEach(t=>{var r,n;t.no=(r=t.getColumnIndex)==null?void 0:r.call(t),(n=t.children)!=null&&n.length&&gg(t.children)}),e.sort((t,r)=>t.no-r.no)}function aV(){const e=ct(),t=iV();return{ns:Fe("table"),...t,mutations:{setData(o,s){const l=E(o._data)!==s;o.data.value=s,o._data.value=s,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),E(o.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):l?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(o,s,l,u){const c=E(o._columns);let f=[];l?(l&&!l.children&&(l.children=[]),l.children.push(s),f=pg(c,l)):(c.push(s),f=c),gg(f),o._columns.value=f,o.updateOrderFns.push(u),s.type==="selection"&&(o.selectable.value=s.selectable,o.reserveSelection.value=s.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(o,s){var l;((l=s.getColumnIndex)==null?void 0:l.call(s))!==s.no&&(gg(o._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(o,s,l,u){const c=E(o._columns)||[];if(l)l.children.splice(l.children.findIndex(d=>d.id===s.id),1),Ft(()=>{var d;((d=l.children)==null?void 0:d.length)===0&&delete l.children}),o._columns.value=pg(c,l);else{const d=c.indexOf(s);d>-1&&(c.splice(d,1),o._columns.value=c)}const f=o.updateOrderFns.indexOf(u);f>-1&&o.updateOrderFns.splice(f,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(o,s){const{prop:l,order:u,init:c}=s;if(l){const f=E(o.columns).find(d=>d.property===l);f&&(f.order=u,e.store.updateSort(f,l,u),e.store.commit("changeSortCondition",{init:c}))}},changeSortCondition(o,s){const{sortingColumn:l,sortProp:u,sortOrder:c}=o,f=E(l),d=E(u),h=E(c);h===null&&(o.sortingColumn.value=null,o.sortProp.value=null);const v={filter:!0};e.store.execQuery(v),(!s||!(s.silent||s.init))&&e.emit("sort-change",{column:f,prop:d,order:h}),e.store.updateTableScrollY()},filterChange(o,s){const{column:l,values:u,silent:c}=s,f=e.store.updateFilters(l,u);e.store.execQuery(),c||e.emit("filter-change",f),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(o,s){e.store.toggleRowSelection(s),e.store.updateAllSelected()},setHoverRow(o,s){o.hoverRow.value=s},setCurrentRow(o,s){e.store.updateCurrentRow(s)}},commit:function(o,...s){const l=e.store.mutations;if(l[o])l[o].apply(e,[e.store.states].concat(s));else throw new Error(`Action not found: ${o}`)},updateTableScrollY:function(){Ft(()=>e.layout.updateScrollY.apply(e.layout))}}}const Bl={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data",["treeProps.hasChildren"]:{key:"lazyColumnIdentifier",default:"hasChildren"},["treeProps.children"]:{key:"childrenColumnName",default:"children"}};function oV(e,t){if(!e)throw new Error("Table is required.");const r=aV();return r.toggleAllSelection=id(r._toggleAllSelection,10),Object.keys(Bl).forEach(n=>{CA(TA(t,n),n,r)}),sV(r,t),r}function sV(e,t){Object.keys(Bl).forEach(r=>{Se(()=>TA(t,r),n=>{CA(n,r,e)})})}function CA(e,t,r){let n=e,i=Bl[t];typeof Bl[t]=="object"&&(i=i.key,n=n||Bl[t].default),r.states[i].value=n}function TA(e,t){if(t.includes(".")){const r=t.split(".");let n=e;return r.forEach(i=>{n=n[i]}),n}else return e[t]}class lV{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=B(null),this.scrollX=B(!1),this.scrollY=B(!1),this.bodyWidth=B(null),this.fixedWidth=B(null),this.rightFixedWidth=B(null),this.gutterWidth=0;for(const r in t)We(t,r)&&(Ct(this[r])?this[r].value=t[r]:this[r]=t[r]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(this.height.value===null)return!1;const r=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(r!=null&&r.wrapRef)){let n=!0;const i=this.scrollY.value;return n=r.wrapRef.scrollHeight>r.wrapRef.clientHeight,this.scrollY.value=n,i!==n}return!1}setHeight(t,r="height"){if(!Nt)return;const n=this.table.vnode.el;if(t=XW(t),this.height.value=Number(t),!n&&(t||t===0))return Ft(()=>this.setHeight(t,r));typeof t=="number"?(n.style[r]=`${t}px`,this.updateElsHeight()):typeof t=="string"&&(n.style[r]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(n=>{n.isColumnGroup?t.push.apply(t,n.columns):t.push(n)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let r=t;for(;r.tagName!=="DIV";){if(getComputedStyle(r).display==="none")return!0;r=r.parentElement}return!1}updateColumnsWidth(){if(!Nt)return;const t=this.fit,r=this.table.vnode.el.clientWidth;let n=0;const i=this.getFlattenColumns(),a=i.filter(l=>typeof l.width!="number");if(i.forEach(l=>{typeof l.width=="number"&&l.realWidth&&(l.realWidth=null)}),a.length>0&&t){if(i.forEach(l=>{n+=Number(l.width||l.minWidth||80)}),n<=r){this.scrollX.value=!1;const l=r-n;if(a.length===1)a[0].realWidth=Number(a[0].minWidth||80)+l;else{const u=a.reduce((d,h)=>d+Number(h.minWidth||80),0),c=l/u;let f=0;a.forEach((d,h)=>{if(h===0)return;const v=Math.floor(Number(d.minWidth||80)*c);f+=v,d.realWidth=Number(d.minWidth||80)+v}),a[0].realWidth=Number(a[0].minWidth||80)+l-f}}else this.scrollX.value=!0,a.forEach(l=>{l.realWidth=Number(l.minWidth)});this.bodyWidth.value=Math.max(n,r),this.table.state.resizeState.value.width=this.bodyWidth.value}else i.forEach(l=>{!l.width&&!l.minWidth?l.realWidth=80:l.realWidth=Number(l.width||l.minWidth),n+=l.realWidth}),this.scrollX.value=n>r,this.bodyWidth.value=n;const o=this.store.states.fixedColumns.value;if(o.length>0){let l=0;o.forEach(u=>{l+=Number(u.realWidth||u.width)}),this.fixedWidth.value=l}const s=this.store.states.rightFixedColumns.value;if(s.length>0){let l=0;s.forEach(u=>{l+=Number(u.realWidth||u.width)}),this.rightFixedWidth.value=l}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const r=this.observers.indexOf(t);r!==-1&&this.observers.splice(r,1)}notifyObservers(t){this.observers.forEach(n=>{var i,a;switch(t){case"columns":(i=n.state)==null||i.onColumnsChange(this);break;case"scrollable":(a=n.state)==null||a.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}}const{CheckboxGroup:uV}=Cs,cV=ce({name:"ElTableFilterPanel",components:{ElCheckbox:Cs,ElCheckboxGroup:uV,ElScrollbar:VM,ElTooltip:Ju,ElIcon:lr,ArrowDown:lM,ArrowUp:e3},directives:{ClickOutside:t8},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=ct(),{t:r}=py(),n=Fe("table-filter"),i=t==null?void 0:t.parent;i.filterPanels.value[e.column.id]||(i.filterPanels.value[e.column.id]=t);const a=B(!1),o=B(null),s=k(()=>e.column&&e.column.filters),l=k({get:()=>{var b;return(((b=e.column)==null?void 0:b.filteredValue)||[])[0]},set:b=>{u.value&&(typeof b<"u"&&b!==null?u.value.splice(0,1,b):u.value.splice(0,1))}}),u=k({get(){return e.column?e.column.filteredValue||[]:[]},set(b){e.column&&e.upDataColumn("filteredValue",b)}}),c=k(()=>e.column?e.column.filterMultiple:!0),f=b=>b.value===l.value,d=()=>{a.value=!1},h=b=>{b.stopPropagation(),a.value=!a.value},v=()=>{a.value=!1},p=()=>{y(u.value),d()},g=()=>{u.value=[],y(u.value),d()},m=b=>{l.value=b,y(typeof b<"u"&&b!==null?u.value:[]),d()},y=b=>{e.store.commit("filterChange",{column:e.column,values:b}),e.store.updateAllSelected()};Se(a,b=>{e.column&&e.upDataColumn("filterOpened",b)},{immediate:!0});const _=k(()=>{var b,x;return(x=(b=o.value)==null?void 0:b.popperRef)==null?void 0:x.contentRef});return{tooltipVisible:a,multiple:c,filteredValue:u,filterValue:l,filters:s,handleConfirm:p,handleReset:g,handleSelect:m,isActive:f,t:r,ns:n,showFilterPanel:h,hideFilterPanel:v,popperPaneRef:_,tooltip:o}}}),fV={key:0},dV=["disabled"],hV=["label","onClick"];function vV(e,t,r,n,i,a){const o=_r("el-checkbox"),s=_r("el-checkbox-group"),l=_r("el-scrollbar"),u=_r("arrow-up"),c=_r("arrow-down"),f=_r("el-icon"),d=_r("el-tooltip"),h=ZC("click-outside");return Y(),_e(d,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.ns.b(),persistent:""},{content:Z(()=>[e.multiple?(Y(),me("div",fV,[ae("div",{class:ue(e.ns.e("content"))},[ee(l,{"wrap-class":e.ns.e("wrap")},{default:Z(()=>[ee(s,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=v=>e.filteredValue=v),class:ue(e.ns.e("checkbox-group"))},{default:Z(()=>[(Y(!0),me(pt,null,l_(e.filters,v=>(Y(),_e(o,{key:v.value,label:v.value},{default:Z(()=>[Bt(Te(v.text),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),ae("div",{class:ue(e.ns.e("bottom"))},[ae("button",{class:ue({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...v)=>e.handleConfirm&&e.handleConfirm(...v))},Te(e.t("el.table.confirmFilter")),11,dV),ae("button",{type:"button",onClick:t[2]||(t[2]=(...v)=>e.handleReset&&e.handleReset(...v))},Te(e.t("el.table.resetFilter")),1)],2)])):(Y(),me("ul",{key:1,class:ue(e.ns.e("list"))},[ae("li",{class:ue([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:t[3]||(t[3]=v=>e.handleSelect(null))},Te(e.t("el.table.clearFilter")),3),(Y(!0),me(pt,null,l_(e.filters,v=>(Y(),me("li",{key:v.value,class:ue([e.ns.e("list-item"),e.ns.is("active",e.isActive(v))]),label:v.value,onClick:p=>e.handleSelect(v.value)},Te(v.text),11,hV))),128))],2))]),default:Z(()=>[nr((Y(),me("span",{class:ue([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:t[4]||(t[4]=(...v)=>e.showFilterPanel&&e.showFilterPanel(...v))},[ee(f,null,{default:Z(()=>[e.column.filterOpened?(Y(),_e(u,{key:0})):(Y(),_e(c,{key:1}))]),_:1})],2)),[[h,e.hideFilterPanel,e.popperPaneRef]])]),_:1},8,["visible","placement","popper-class"])}var pV=Ze(cV,[["render",vV],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]);function MA(e){const t=ct();Gd(()=>{r.value.addObserver(t)}),wt(()=>{n(r.value),i(r.value)}),Hu(()=>{n(r.value),i(r.value)}),ks(()=>{r.value.removeObserver(t)});const r=k(()=>{const a=e.layout;if(!a)throw new Error("Can not find table layout.");return a}),n=a=>{var o;const s=((o=e.vnode.el)==null?void 0:o.querySelectorAll("colgroup > col"))||[];if(!s.length)return;const l=a.getFlattenColumns(),u={};l.forEach(c=>{u[c.id]=c});for(let c=0,f=s.length;c{var o,s;const l=((o=e.vnode.el)==null?void 0:o.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let c=0,f=l.length;c{p.stopPropagation()},a=(p,g)=>{!g.filters&&g.sortable?v(p,g,!1):g.filterable&&!g.sortable&&i(p),n==null||n.emit("header-click",g,p)},o=(p,g)=>{n==null||n.emit("header-contextmenu",g,p)},s=B(null),l=B(!1),u=B({}),c=(p,g)=>{if(Nt&&!(g.children&&g.children.length>0)&&s.value&&e.border){l.value=!0;const m=n;t("set-drag-visible",!0);const _=(m==null?void 0:m.vnode.el).getBoundingClientRect().left,b=r.vnode.el.querySelector(`th.${g.id}`),x=b.getBoundingClientRect(),w=x.left-_+30;Zo(b,"noclick"),u.value={startMouseLeft:p.clientX,startLeft:x.right-_,startColumnLeft:x.left-_,tableLeft:_};const S=m==null?void 0:m.refs.resizeProxy;S.style.left=`${u.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const C=P=>{const A=P.clientX-u.value.startMouseLeft,T=u.value.startLeft+A;S.style.left=`${Math.max(w,T)}px`},M=()=>{if(l.value){const{startColumnLeft:P,startLeft:A}=u.value,D=Number.parseInt(S.style.left,10)-P;g.width=g.realWidth=D,m==null||m.emit("header-dragend",g.width,A-P,g,p),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",l.value=!1,s.value=null,u.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",M),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{ss(b,"noclick")},0)};document.addEventListener("mousemove",C),document.addEventListener("mouseup",M)}},f=(p,g)=>{var m;if(g.children&&g.children.length>0)return;const y=(m=p.target)==null?void 0:m.closest("th");if(!(!g||!g.resizable)&&!l.value&&e.border){const _=y.getBoundingClientRect(),b=document.body.style;_.width>12&&_.right-p.pageX<8?(b.cursor="col-resize",Ol(y,"is-sortable")&&(y.style.cursor="col-resize"),s.value=g):l.value||(b.cursor="",Ol(y,"is-sortable")&&(y.style.cursor="pointer"),s.value=null)}},d=()=>{Nt&&(document.body.style.cursor="")},h=({order:p,sortOrders:g})=>{if(p==="")return g[0];const m=g.indexOf(p||null);return g[m>g.length-2?0:m+1]},v=(p,g,m)=>{var y;p.stopPropagation();const _=g.order===m?null:m||h(g),b=(y=p.target)==null?void 0:y.closest("th");if(b&&Ol(b,"noclick")){ss(b,"noclick");return}if(!g.sortable)return;const x=e.store.states;let w=x.sortProp.value,S;const C=x.sortingColumn.value;(C!==g||C===g&&C.order===null)&&(C&&(C.order=null),x.sortingColumn.value=g,w=g.property),_?S=g.order=_:S=g.order=null,x.sortProp.value=w,x.sortOrder.value=S,n==null||n.store.commit("changeSortCondition")};return{handleHeaderClick:a,handleHeaderContextMenu:o,handleMouseDown:c,handleMouseMove:f,handleMouseOut:d,handleSortClick:v,handleFilterClick:i}}function mV(e){const t=Ee(Qn),r=Fe("table");return{getHeaderRowStyle:s=>{const l=t==null?void 0:t.props.headerRowStyle;return typeof l=="function"?l.call(null,{rowIndex:s}):l},getHeaderRowClass:s=>{const l=[],u=t==null?void 0:t.props.headerRowClassName;return typeof u=="string"?l.push(u):typeof u=="function"&&l.push(u.call(null,{rowIndex:s})),l.join(" ")},getHeaderCellStyle:(s,l,u,c)=>{var f;let d=(f=t==null?void 0:t.props.headerCellStyle)!=null?f:{};typeof d=="function"&&(d=d.call(null,{rowIndex:s,columnIndex:l,row:u,column:c}));const h=Fy(l,c.fixed,e.store,u);return Ts(h,"left"),Ts(h,"right"),Object.assign({},d,h)},getHeaderCellClass:(s,l,u,c)=>{const f=Ny(r.b(),l,c.fixed,e.store,u),d=[c.id,c.order,c.headerAlign,c.className,c.labelClassName,...f];c.children||d.push("is-leaf"),c.sortable&&d.push("is-sortable");const h=t==null?void 0:t.props.headerCellClassName;return typeof h=="string"?d.push(h):typeof h=="function"&&d.push(h.call(null,{rowIndex:s,columnIndex:l,row:u,column:c})),d.push(r.e("cell")),d.filter(v=>Boolean(v)).join(" ")}}}const AA=e=>{const t=[];return e.forEach(r=>{r.children?(t.push(r),t.push.apply(t,AA(r.children))):t.push(r)}),t},yV=e=>{let t=1;const r=(a,o)=>{if(o&&(a.level=o.level+1,t{r(l,a),s+=l.colSpan}),a.colSpan=s}else a.colSpan=1};e.forEach(a=>{a.level=1,r(a,void 0)});const n=[];for(let a=0;a{a.children?(a.rowSpan=1,a.children.forEach(o=>o.isSubColumn=!0)):a.rowSpan=t-a.level+1,n[a.level-1].push(a)}),n};function _V(e){const t=Ee(Qn),r=k(()=>yV(e.store.states.originColumns.value));return{isGroup:k(()=>{const a=r.value.length>1;return a&&t&&(t.state.isGroup.value=!0),a}),toggleAllSelection:a=>{a.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:r}}var bV=ce({name:"ElTableHeader",components:{ElCheckbox:Cs},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const r=ct(),n=Ee(Qn),i=Fe("table"),a=B({}),{onColumnsChange:o,onScrollableChange:s}=MA(n);wt(async()=>{await Ft(),await Ft();const{prop:w,order:S}=e.defaultSort;n==null||n.store.commit("sort",{prop:w,order:S,init:!0})});const{handleHeaderClick:l,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:f,handleMouseOut:d,handleSortClick:h,handleFilterClick:v}=gV(e,t),{getHeaderRowStyle:p,getHeaderRowClass:g,getHeaderCellStyle:m,getHeaderCellClass:y}=mV(e),{isGroup:_,toggleAllSelection:b,columnRows:x}=_V(e);return r.state={onColumnsChange:o,onScrollableChange:s},r.filterPanels=a,{ns:i,filterPanels:a,onColumnsChange:o,onScrollableChange:s,columnRows:x,getHeaderRowClass:g,getHeaderRowStyle:p,getHeaderCellClass:y,getHeaderCellStyle:m,handleHeaderClick:l,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:f,handleMouseOut:d,handleSortClick:h,handleFilterClick:v,isGroup:_,toggleAllSelection:b}},render(){const{ns:e,isGroup:t,columnRows:r,getHeaderCellStyle:n,getHeaderCellClass:i,getHeaderRowClass:a,getHeaderRowStyle:o,handleHeaderClick:s,handleHeaderContextMenu:l,handleMouseDown:u,handleMouseMove:c,handleSortClick:f,handleMouseOut:d,store:h,$parent:v}=this;let p=1;return Ce("thead",{class:{[e.is("group")]:t}},r.map((g,m)=>Ce("tr",{class:a(m),key:m,style:o(m)},g.map((y,_)=>(y.rowSpan>p&&(p=y.rowSpan),Ce("th",{class:i(m,_,g,y),colspan:y.colSpan,key:`${y.id}-thead`,rowspan:y.rowSpan,style:n(m,_,g,y),onClick:b=>s(b,y),onContextmenu:b=>l(b,y),onMousedown:b=>u(b,y),onMousemove:b=>c(b,y),onMouseout:d},[Ce("div",{class:["cell",y.filteredValue&&y.filteredValue.length>0?"highlight":""]},[y.renderHeader?y.renderHeader({column:y,$index:_,store:h,_self:v}):y.label,y.sortable&&Ce("span",{onClick:b=>f(b,y),class:"caret-wrapper"},[Ce("i",{onClick:b=>f(b,y,"ascending"),class:"sort-caret ascending"}),Ce("i",{onClick:b=>f(b,y,"descending"),class:"sort-caret descending"})]),y.filterable&&Ce(pV,{store:h,placement:y.filterPlacement||"bottom-start",column:y,upDataColumn:(b,x)=>{y[b]=x}})])]))))))}});function wV(e){const t=Ee(Qn),r=B(""),n=B(Ce("div")),{nextZIndex:i}=Ay(),a=(h,v,p)=>{var g;const m=t,y=Qh(h);let _;const b=(g=m==null?void 0:m.vnode.el)==null?void 0:g.dataset.prefix;y&&(_=v1({columns:e.store.states.columns.value},y,b),_&&(m==null||m.emit(`cell-${p}`,v,_,y,h))),m==null||m.emit(`row-${p}`,v,_,h)},o=(h,v)=>{a(h,v,"dblclick")},s=(h,v)=>{e.store.commit("setCurrentRow",v),a(h,v,"click")},l=(h,v)=>{a(h,v,"contextmenu")},u=id(h=>{e.store.commit("setHoverRow",h)},30),c=id(()=>{e.store.commit("setHoverRow",null)},30);return{handleDoubleClick:o,handleClick:s,handleContextMenu:l,handleMouseEnter:u,handleMouseLeave:c,handleCellMouseEnter:(h,v,p)=>{var g;const m=t,y=Qh(h),_=(g=m==null?void 0:m.vnode.el)==null?void 0:g.dataset.prefix;if(y){const C=v1({columns:e.store.states.columns.value},y,_),M=m.hoverState={cell:y,column:C,row:v};m==null||m.emit("cell-mouse-enter",M.row,M.column,M.cell,h)}if(!p)return;const b=h.target.querySelector(".cell");if(!(Ol(b,`${_}-tooltip`)&&b.childNodes.length))return;const x=document.createRange();x.setStart(b,0),x.setEnd(b,b.childNodes.length);const w=Math.round(x.getBoundingClientRect().width),S=(Number.parseInt(Mb(b,"paddingLeft"),10)||0)+(Number.parseInt(Mb(b,"paddingRight"),10)||0);(w+S>b.offsetWidth||b.scrollWidth>b.offsetWidth)&&JW(t==null?void 0:t.refs.tableWrapper,y,y.innerText||y.textContent,i,p)},handleCellMouseLeave:h=>{if(!Qh(h))return;const p=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",p==null?void 0:p.row,p==null?void 0:p.column,p==null?void 0:p.cell,h)},tooltipContent:r,tooltipTrigger:n}}function xV(e){const t=Ee(Qn),r=Fe("table");return{getRowStyle:(u,c)=>{const f=t==null?void 0:t.props.rowStyle;return typeof f=="function"?f.call(null,{row:u,rowIndex:c}):f||null},getRowClass:(u,c)=>{const f=[r.e("row")];t!=null&&t.props.highlightCurrentRow&&u===e.store.states.currentRow.value&&f.push("current-row"),e.stripe&&c%2===1&&f.push(r.em("row","striped"));const d=t==null?void 0:t.props.rowClassName;return typeof d=="string"?f.push(d):typeof d=="function"&&f.push(d.call(null,{row:u,rowIndex:c})),f},getCellStyle:(u,c,f,d)=>{const h=t==null?void 0:t.props.cellStyle;let v=h??{};typeof h=="function"&&(v=h.call(null,{rowIndex:u,columnIndex:c,row:f,column:d}));const p=Fy(c,e==null?void 0:e.fixed,e.store);return Ts(p,"left"),Ts(p,"right"),Object.assign({},v,p)},getCellClass:(u,c,f,d,h)=>{const v=Ny(r.b(),c,e==null?void 0:e.fixed,e.store,void 0,h),p=[d.id,d.align,d.className,...v],g=t==null?void 0:t.props.cellClassName;return typeof g=="string"?p.push(g):typeof g=="function"&&p.push(g.call(null,{rowIndex:u,columnIndex:c,row:f,column:d})),p.push(r.e("cell")),p.filter(m=>Boolean(m)).join(" ")},getSpan:(u,c,f,d)=>{let h=1,v=1;const p=t==null?void 0:t.props.spanMethod;if(typeof p=="function"){const g=p({row:u,column:c,rowIndex:f,columnIndex:d});Array.isArray(g)?(h=g[0],v=g[1]):typeof g=="object"&&(h=g.rowspan,v=g.colspan)}return{rowspan:h,colspan:v}},getColspanRealWidth:(u,c,f)=>{if(c<1)return u[f].realWidth;const d=u.map(({realWidth:h,width:v})=>h||v).slice(f,f+c);return Number(d.reduce((h,v)=>Number(h)+Number(v),-1))}}}function SV(e){const t=Ee(Qn),r=Fe("table"),{handleDoubleClick:n,handleClick:i,handleContextMenu:a,handleMouseEnter:o,handleMouseLeave:s,handleCellMouseEnter:l,handleCellMouseLeave:u,tooltipContent:c,tooltipTrigger:f}=wV(e),{getRowStyle:d,getRowClass:h,getCellStyle:v,getCellClass:p,getSpan:g,getColspanRealWidth:m}=xV(e),y=k(()=>e.store.states.columns.value.findIndex(({type:S})=>S==="default")),_=(S,C)=>{const M=t.props.rowKey;return M?Yt(S,M):C},b=(S,C,M,P=!1)=>{const{tooltipEffect:A,tooltipOptions:T,store:D}=e,{indent:N,columns:H}=D.states,$=h(S,C);let G=!0;return M&&($.push(r.em("row",`level-${M.level}`)),G=M.display),Ce("tr",{style:[G?null:{display:"none"},d(S,C)],class:$,key:_(S,C),onDblclick:R=>n(R,S),onClick:R=>i(R,S),onContextmenu:R=>a(R,S),onMouseenter:()=>o(C),onMouseleave:s},H.value.map((R,j)=>{const{rowspan:re,colspan:oe}=g(S,R,C,j);if(!re||!oe)return null;const ye={...R};ye.realWidth=m(H.value,oe,j);const Ae={store:e.store,_self:e.context||t,column:ye,row:S,$index:C,cellIndex:j,expanded:P};j===y.value&&M&&(Ae.treeNode={indent:M.level*N.value,level:M.level},typeof M.expanded=="boolean"&&(Ae.treeNode.expanded=M.expanded,"loading"in M&&(Ae.treeNode.loading=M.loading),"noLazyChildren"in M&&(Ae.treeNode.noLazyChildren=M.noLazyChildren)));const V=`${C},${j}`,Q=ye.columnKey||ye.rawColumnKey||"",W=x(j,R,Ae),q=R.showOverflowTooltip&&aM({effect:A},T,R.showOverflowTooltip);return Ce("td",{style:v(C,j,S,R),class:p(C,j,S,R,oe-1),key:`${Q}${V}`,rowspan:re,colspan:oe,onMouseenter:le=>l(le,S,q),onMouseleave:u},[W])}))},x=(S,C,M)=>C.renderCell(M);return{wrappedRowRender:(S,C)=>{const M=e.store,{isRowExpanded:P,assertRowKey:A}=M,{treeData:T,lazyTreeNodeMap:D,childrenColumnName:N,rowKey:H}=M.states,$=M.states.columns.value;if($.some(({type:F})=>F==="expand")){const F=P(S),R=b(S,C,void 0,F),j=t.renderExpanded;return F?j?[[R,Ce("tr",{key:`expanded-row__${R.key}`},[Ce("td",{colspan:$.length,class:`${r.e("cell")} ${r.e("expanded-cell")}`},[j({row:S,$index:C,store:M,expanded:F})])])]]:(console.error("[Element Error]renderExpanded is required."),R):[[R]]}else if(Object.keys(T.value).length){A();const F=Yt(S,H.value);let R=T.value[F],j=null;R&&(j={expanded:R.expanded,level:R.level,display:!0},typeof R.lazy=="boolean"&&(typeof R.loaded=="boolean"&&R.loaded&&(j.noLazyChildren=!(R.children&&R.children.length)),j.loading=R.loading));const re=[b(S,C,j)];if(R){let oe=0;const ye=(V,Q)=>{V&&V.length&&Q&&V.forEach(W=>{const q={display:Q.display&&Q.expanded,level:Q.level+1,expanded:!1,noLazyChildren:!1,loading:!1},le=Yt(W,H.value);if(le==null)throw new Error("For nested data item, row-key is required.");if(R={...T.value[le]},R&&(q.expanded=R.expanded,R.level=R.level||q.level,R.display=!!(R.expanded&&q.display),typeof R.lazy=="boolean"&&(typeof R.loaded=="boolean"&&R.loaded&&(q.noLazyChildren=!(R.children&&R.children.length)),q.loading=R.loading)),oe++,re.push(b(W,C+oe,q)),R){const de=D.value[le]||W[N.value];ye(de,R)}})};R.display=!0;const Ae=D.value[F]||S[N.value];ye(Ae,R)}return re}else return b(S,C,void 0)},tooltipContent:c,tooltipTrigger:f}}const CV={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var TV=ce({name:"ElTableBody",props:CV,setup(e){const t=ct(),r=Ee(Qn),n=Fe("table"),{wrappedRowRender:i,tooltipContent:a,tooltipTrigger:o}=SV(e),{onColumnsChange:s,onScrollableChange:l}=MA(r);return Se(e.store.states.hoverRow,(u,c)=>{if(!e.store.states.isComplex.value||!Nt)return;let f=window.requestAnimationFrame;f||(f=d=>window.setTimeout(d,16)),f(()=>{const d=t==null?void 0:t.vnode.el,h=Array.from((d==null?void 0:d.children)||[]).filter(g=>g==null?void 0:g.classList.contains(`${n.e("row")}`)),v=h[c],p=h[u];v&&ss(v,"hover-row"),p&&Zo(p,"hover-row")})}),ks(()=>{var u;(u=ui)==null||u()}),{ns:n,onColumnsChange:s,onScrollableChange:l,wrappedRowRender:i,tooltipContent:a,tooltipTrigger:o}},render(){const{wrappedRowRender:e,store:t}=this,r=t.states.data.value||[];return Ce("tbody",{},[r.reduce((n,i)=>n.concat(e(i,n.length)),[])])}});function By(e){const t=e.tableLayout==="auto";let r=e.columns||[];t&&r.every(i=>i.width===void 0)&&(r=[]);const n=i=>{const a={key:`${e.tableLayout}_${i.id}`,style:{},name:void 0};return t?a.style={width:`${i.width}px`}:a.name=i.id,a};return Ce("colgroup",{},r.map(i=>Ce("col",n(i))))}By.props=["columns","tableLayout"];function MV(){const e=Ee(Qn),t=e==null?void 0:e.store,r=k(()=>t.states.fixedLeafColumnsLength.value),n=k(()=>t.states.rightFixedColumns.value.length),i=k(()=>t.states.columns.value.length),a=k(()=>t.states.fixedColumns.value.length),o=k(()=>t.states.rightFixedColumns.value.length);return{leftFixedLeafCount:r,rightFixedLeafCount:n,columnsCount:i,leftFixedCount:a,rightFixedCount:o,columns:t.states.columns}}function AV(e){const{columns:t}=MV(),r=Fe("table");return{getCellClasses:(a,o)=>{const s=a[o],l=[r.e("cell"),s.id,s.align,s.labelClassName,...Ny(r.b(),o,s.fixed,e.store)];return s.className&&l.push(s.className),s.children||l.push(r.is("leaf")),l},getCellStyles:(a,o)=>{const s=Fy(o,a.fixed,e.store);return Ts(s,"left"),Ts(s,"right"),s},columns:t}}var EV=ce({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const{getCellClasses:t,getCellStyles:r,columns:n}=AV(e);return{ns:Fe("table"),getCellClasses:t,getCellStyles:r,columns:n}},render(){const{columns:e,getCellStyles:t,getCellClasses:r,summaryMethod:n,sumText:i,ns:a}=this,o=this.store.states.data.value;let s=[];return n?s=n({columns:e,data:o}):e.forEach((l,u)=>{if(u===0){s[u]=i;return}const c=o.map(v=>Number(v[l.property])),f=[];let d=!0;c.forEach(v=>{if(!Number.isNaN(+v)){d=!1;const p=`${v}`.split(".")[1];f.push(p?p.length:0)}});const h=Math.max.apply(null,f);d?s[u]="":s[u]=c.reduce((v,p)=>{const g=Number(p);return Number.isNaN(+g)?v:Number.parseFloat((v+p).toFixed(Math.min(h,20)))},0)}),Ce("table",{class:a.e("footer"),cellspacing:"0",cellpadding:"0",border:"0"},[By({columns:e}),Ce("tbody",[Ce("tr",{},[...e.map((l,u)=>Ce("td",{key:u,colspan:l.colSpan,rowspan:l.rowSpan,class:r(e,u),style:t(l,u)},[Ce("div",{class:["cell",l.labelClassName]},[s[u]])]))])])])}});function PV(e){return{setCurrentRow:c=>{e.commit("setCurrentRow",c)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(c,f)=>{e.toggleRowSelection(c,f,!1),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:c=>{e.clearFilter(c)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(c,f)=>{e.toggleRowExpansionAdapter(c,f)},clearSort:()=>{e.clearSort()},sort:(c,f)=>{e.commit("sort",{prop:c,order:f})}}}function LV(e,t,r,n){const i=B(!1),a=B(null),o=B(!1),s=F=>{o.value=F},l=B({width:null,height:null,headerHeight:null}),u=B(!1),c={display:"inline-block",verticalAlign:"middle"},f=B(),d=B(0),h=B(0),v=B(0),p=B(0);io(()=>{t.setHeight(e.height)}),io(()=>{t.setMaxHeight(e.maxHeight)}),Se(()=>[e.currentRowKey,r.states.rowKey],([F,R])=>{!E(R)||!E(F)||r.setCurrentRowKey(`${F}`)},{immediate:!0}),Se(()=>e.data,F=>{n.store.commit("setData",F)},{immediate:!0,deep:!0}),io(()=>{e.expandRowKeys&&r.setExpandRowKeysAdapter(e.expandRowKeys)});const g=()=>{n.store.commit("setHoverRow",null),n.hoverState&&(n.hoverState=null)},m=(F,R)=>{const{pixelX:j,pixelY:re}=R;Math.abs(j)>=Math.abs(re)&&(n.refs.bodyWrapper.scrollLeft+=R.pixelX/5)},y=k(()=>e.height||e.maxHeight||r.states.fixedColumns.value.length>0||r.states.rightFixedColumns.value.length>0),_=k(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),b=()=>{y.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(C)};wt(async()=>{await Ft(),r.updateColumns(),M(),requestAnimationFrame(b);const F=n.vnode.el,R=n.refs.headerWrapper;e.flexible&&F&&F.parentElement&&(F.parentElement.style.minWidth="0"),l.value={width:f.value=F.offsetWidth,height:F.offsetHeight,headerHeight:e.showHeader&&R?R.offsetHeight:null},r.states.columns.value.forEach(j=>{j.filteredValue&&j.filteredValue.length&&n.store.commit("filterChange",{column:j,values:j.filteredValue,silent:!0})}),n.$ready=!0});const x=(F,R)=>{if(!F)return;const j=Array.from(F.classList).filter(re=>!re.startsWith("is-scrolling-"));j.push(t.scrollX.value?R:"is-scrolling-none"),F.className=j.join(" ")},w=F=>{const{tableWrapper:R}=n.refs;x(R,F)},S=F=>{const{tableWrapper:R}=n.refs;return!!(R&&R.classList.contains(F))},C=function(){if(!n.refs.scrollBarRef)return;if(!t.scrollX.value){const V="is-scrolling-none";S(V)||w(V);return}const F=n.refs.scrollBarRef.wrapRef;if(!F)return;const{scrollLeft:R,offsetWidth:j,scrollWidth:re}=F,{headerWrapper:oe,footerWrapper:ye}=n.refs;oe&&(oe.scrollLeft=R),ye&&(ye.scrollLeft=R);const Ae=re-j-1;R>=Ae?w("is-scrolling-right"):w(R===0?"is-scrolling-left":"is-scrolling-middle")},M=()=>{n.refs.scrollBarRef&&(n.refs.scrollBarRef.wrapRef&&xn(n.refs.scrollBarRef.wrapRef,"scroll",C,{passive:!0}),e.fit?gs(n.vnode.el,P):xn(window,"resize",P),gs(n.refs.bodyWrapper,()=>{var F,R;P(),(R=(F=n.refs)==null?void 0:F.scrollBarRef)==null||R.update()}))},P=()=>{var F,R,j;const re=n.vnode.el;if(!n.$ready||!re)return;let oe=!1;const{width:ye,height:Ae,headerHeight:V}=l.value,Q=f.value=re.offsetWidth;ye!==Q&&(oe=!0);const W=re.offsetHeight;(e.height||y.value)&&Ae!==W&&(oe=!0);const q=e.tableLayout==="fixed"?n.refs.headerWrapper:(F=n.refs.tableHeaderRef)==null?void 0:F.$el;e.showHeader&&(q==null?void 0:q.offsetHeight)!==V&&(oe=!0),d.value=((R=n.refs.tableWrapper)==null?void 0:R.scrollHeight)||0,v.value=(q==null?void 0:q.scrollHeight)||0,p.value=((j=n.refs.footerWrapper)==null?void 0:j.offsetHeight)||0,h.value=d.value-v.value-p.value,oe&&(l.value={width:Q,height:W,headerHeight:e.showHeader&&(q==null?void 0:q.offsetHeight)||0},b())},A=ia(),T=k(()=>{const{bodyWidth:F,scrollY:R,gutterWidth:j}=t;return F.value?`${F.value-(R.value?j:0)}px`:""}),D=k(()=>e.maxHeight?"fixed":e.tableLayout),N=k(()=>{if(e.data&&e.data.length)return null;let F="100%";e.height&&h.value&&(F=`${h.value}px`);const R=f.value;return{width:R?`${R}px`:"",height:F}}),H=k(()=>e.height?{height:Number.isNaN(Number(e.height))?e.height:`${e.height}px`}:e.maxHeight?{maxHeight:Number.isNaN(Number(e.maxHeight))?e.maxHeight:`${e.maxHeight}px`}:{}),$=k(()=>{if(e.height)return{height:"100%"};if(e.maxHeight){if(Number.isNaN(Number(e.maxHeight)))return{maxHeight:`calc(${e.maxHeight} - ${v.value+p.value}px)`};{const F=e.maxHeight;if(d.value>=Number(F))return{maxHeight:`${d.value-v.value-p.value}px`}}}return{}});return{isHidden:i,renderExpanded:a,setDragVisible:s,isGroup:u,handleMouseLeave:g,handleHeaderFooterMousewheel:m,tableSize:A,emptyBlockStyle:N,handleFixedMousewheel:(F,R)=>{const j=n.refs.bodyWrapper;if(Math.abs(R.spinY)>0){const re=j.scrollTop;R.pixelY<0&&re!==0&&F.preventDefault(),R.pixelY>0&&j.scrollHeight-j.clientHeight>re&&F.preventDefault(),j.scrollTop+=Math.ceil(R.pixelY/5)}else j.scrollLeft+=Math.ceil(R.pixelX/5)},resizeProxyVisible:o,bodyWidth:T,resizeState:l,doLayout:b,tableBodyStyles:_,tableLayout:D,scrollbarViewStyle:c,tableInnerStyle:H,scrollbarStyle:$}}function DV(e){const t=B(),r=()=>{const i=e.vnode.el.querySelector(".hidden-columns"),a={childList:!0,subtree:!0},o=e.store.states.updateOrderFns;t.value=new MutationObserver(()=>{o.forEach(s=>s())}),t.value.observe(i,a)};wt(()=>{r()}),ks(()=>{var n;(n=t.value)==null||n.disconnect()})}var IV={data:{type:Array,default:()=>[]},size:Xu,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children"})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:{type:Boolean,default:!1},flexible:Boolean};const OV=()=>{const e=B(),t=(a,o)=>{const s=e.value;s&&s.scrollTo(a,o)},r=(a,o)=>{const s=e.value;s&&$t(o)&&["Top","Left"].includes(a)&&s[`setScroll${a}`](o)};return{scrollBarRef:e,scrollTo:t,setScrollTop:a=>r("Top",a),setScrollLeft:a=>r("Left",a)}};let RV=1;const kV=ce({name:"ElTable",directives:{Mousewheel:l8},components:{TableHeader:bV,TableBody:TV,TableFooter:EV,ElScrollbar:VM,hColgroup:By},props:IV,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t}=py(),r=Fe("table"),n=ct();At(Qn,n);const i=oV(n,e);n.store=i;const a=new lV({store:n.store,table:n,fit:e.fit,showHeader:e.showHeader});n.layout=a;const o=k(()=>(i.states.data.value||[]).length===0),{setCurrentRow:s,getSelectionRows:l,toggleRowSelection:u,clearSelection:c,clearFilter:f,toggleAllSelection:d,toggleRowExpansion:h,clearSort:v,sort:p}=PV(i),{isHidden:g,renderExpanded:m,setDragVisible:y,isGroup:_,handleMouseLeave:b,handleHeaderFooterMousewheel:x,tableSize:w,emptyBlockStyle:S,handleFixedMousewheel:C,resizeProxyVisible:M,bodyWidth:P,resizeState:A,doLayout:T,tableBodyStyles:D,tableLayout:N,scrollbarViewStyle:H,tableInnerStyle:$,scrollbarStyle:G}=LV(e,a,i,n),{scrollBarRef:F,scrollTo:R,setScrollLeft:j,setScrollTop:re}=OV(),oe=id(T,50),ye=`${r.namespace.value}-table_${RV++}`;n.tableId=ye,n.state={isGroup:_,resizeState:A,doLayout:T,debouncedUpdateLayout:oe};const Ae=k(()=>e.sumText||t("el.table.sumText")),V=k(()=>e.emptyText||t("el.table.emptyText"));return DV(n),{ns:r,layout:a,store:i,handleHeaderFooterMousewheel:x,handleMouseLeave:b,tableId:ye,tableSize:w,isHidden:g,isEmpty:o,renderExpanded:m,resizeProxyVisible:M,resizeState:A,isGroup:_,bodyWidth:P,tableBodyStyles:D,emptyBlockStyle:S,debouncedUpdateLayout:oe,handleFixedMousewheel:C,setCurrentRow:s,getSelectionRows:l,toggleRowSelection:u,clearSelection:c,clearFilter:f,toggleAllSelection:d,toggleRowExpansion:h,clearSort:v,doLayout:T,sort:p,t,setDragVisible:y,context:n,computedSumText:Ae,computedEmptyText:V,tableLayout:N,scrollbarViewStyle:H,tableInnerStyle:$,scrollbarStyle:G,scrollBarRef:F,scrollTo:R,setScrollLeft:j,setScrollTop:re}}}),NV=["data-prefix"],FV={ref:"hiddenColumns",class:"hidden-columns"};function BV(e,t,r,n,i,a){const o=_r("hColgroup"),s=_r("table-header"),l=_r("table-body"),u=_r("el-scrollbar"),c=_r("table-footer"),f=ZC("mousewheel");return Y(),me("div",{ref:"tableWrapper",class:ue([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:St(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[0]||(t[0]=(...d)=>e.handleMouseLeave&&e.handleMouseLeave(...d))},[ae("div",{class:ue(e.ns.e("inner-wrapper")),style:St(e.tableInnerStyle)},[ae("div",FV,[$e(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?nr((Y(),me("div",{key:0,ref:"headerWrapper",class:ue(e.ns.e("header-wrapper"))},[ae("table",{ref:"tableHeader",class:ue(e.ns.e("header")),style:St(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[ee(o,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),ee(s,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[f,e.handleHeaderFooterMousewheel]]):ke("v-if",!0),ae("div",{ref:"bodyWrapper",class:ue(e.ns.e("body-wrapper"))},[ee(u,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn},{default:Z(()=>[ae("table",{ref:"tableBody",class:ue(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:St({width:e.bodyWidth,tableLayout:e.tableLayout})},[ee(o,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(Y(),_e(s,{key:0,ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])):ke("v-if",!0),ee(l,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"])],6),e.isEmpty?(Y(),me("div",{key:0,ref:"emptyBlock",style:St(e.emptyBlockStyle),class:ue(e.ns.e("empty-block"))},[ae("span",{class:ue(e.ns.e("empty-text"))},[$e(e.$slots,"empty",{},()=>[Bt(Te(e.computedEmptyText),1)])],2)],6)):ke("v-if",!0),e.$slots.append?(Y(),me("div",{key:1,ref:"appendWrapper",class:ue(e.ns.e("append-wrapper"))},[$e(e.$slots,"append")],2)):ke("v-if",!0)]),_:3},8,["view-style","wrap-style","always"])],2),e.showSummary?nr((Y(),me("div",{key:1,ref:"footerWrapper",class:ue(e.ns.e("footer-wrapper"))},[ee(c,{border:e.border,"default-sort":e.defaultSort,store:e.store,style:St(e.tableBodyStyles),"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","style","sum-text","summary-method"])],2)),[[yi,!e.isEmpty],[f,e.handleHeaderFooterMousewheel]]):ke("v-if",!0),e.border||e.isGroup?(Y(),me("div",{key:2,class:ue(e.ns.e("border-left-patch"))},null,2)):ke("v-if",!0)],6),nr(ae("div",{ref:"resizeProxy",class:ue(e.ns.e("column-resize-proxy"))},null,2),[[yi,e.resizeProxyVisible]])],46,NV)}var $V=Ze(kV,[["render",BV],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]);const HV={selection:"table-column--selection",expand:"table__expand-column"},zV={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},WV=e=>HV[e]||"",VV={selection:{renderHeader({store:e}){function t(){return e.states.data.value&&e.states.data.value.length===0}return Ce(Cs,{disabled:t(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value})},renderCell({row:e,column:t,store:r,$index:n}){return Ce(Cs,{disabled:t.selectable?!t.selectable.call(null,e,n):!1,size:r.states.tableSize.value,onChange:()=>{r.commit("rowSelectedChanged",e)},onClick:i=>i.stopPropagation(),modelValue:r.isSelected(e)})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let r=t+1;const n=e.index;return typeof n=="number"?r=t+n:typeof n=="function"&&(r=n(t)),Ce("div",{},[r])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({row:e,store:t,expanded:r}){const{ns:n}=t,i=[n.e("expand-icon")];return r&&i.push(n.em("expand-icon","expanded")),Ce("div",{class:i,onClick:function(o){o.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[Ce(lr,null,{default:()=>[Ce(dy)]})]})},sortable:!1,resizable:!1}};function GV({row:e,column:t,$index:r}){var n;const i=t.property,a=i&&Sf(e,i).value;return t&&t.formatter?t.formatter(e,t,a,r):((n=a==null?void 0:a.toString)==null?void 0:n.call(a))||""}function UV({row:e,treeNode:t,store:r},n=!1){const{ns:i}=r;if(!t)return n?[Ce("span",{class:i.e("placeholder")})]:null;const a=[],o=function(s){s.stopPropagation(),!t.loading&&r.loadOrToggle(e)};if(t.indent&&a.push(Ce("span",{class:i.e("indent"),style:{"padding-left":`${t.indent}px`}})),typeof t.expanded=="boolean"&&!t.noLazyChildren){const s=[i.e("expand-icon"),t.expanded?i.em("expand-icon","expanded"):""];let l=dy;t.loading&&(l=hy),a.push(Ce("div",{class:s,onClick:o},{default:()=>[Ce(lr,{class:{[i.is("loading")]:t.loading}},{default:()=>[Ce(l)]})]}))}else a.push(Ce("span",{class:i.e("placeholder")}));return a}function m1(e,t){return e.reduce((r,n)=>(r[n]=n,r),t)}function jV(e,t){const r=ct();return{registerComplexWatchers:()=>{const a=["fixed"],o={realWidth:"width",realMinWidth:"minWidth"},s=m1(a,o);Object.keys(s).forEach(l=>{const u=o[l];We(t,u)&&Se(()=>t[u],c=>{let f=c;u==="width"&&l==="realWidth"&&(f=ky(c)),u==="minWidth"&&l==="realMinWidth"&&(f=wA(c)),r.columnConfig.value[u]=f,r.columnConfig.value[l]=f;const d=u==="fixed";e.value.store.scheduleLayout(d)})})},registerNormalWatchers:()=>{const a=["label","filters","filterMultiple","sortable","index","formatter","className","labelClassName","showOverflowTooltip"],o={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},s=m1(a,o);Object.keys(s).forEach(l=>{const u=o[l];We(t,u)&&Se(()=>t[u],c=>{r.columnConfig.value[l]=c})})}}}function YV(e,t,r){const n=ct(),i=B(""),a=B(!1),o=B(),s=B(),l=Fe("table");io(()=>{o.value=e.align?`is-${e.align}`:null,o.value}),io(()=>{s.value=e.headerAlign?`is-${e.headerAlign}`:o.value,s.value});const u=k(()=>{let b=n.vnode.vParent||n.parent;for(;b&&!b.tableId&&!b.columnId;)b=b.vnode.vParent||b.parent;return b}),c=k(()=>{const{store:b}=n.parent;if(!b)return!1;const{treeData:x}=b.states,w=x.value;return w&&Object.keys(w).length>0}),f=B(ky(e.width)),d=B(wA(e.minWidth)),h=b=>(f.value&&(b.width=f.value),d.value&&(b.minWidth=d.value),!f.value&&d.value&&(b.width=void 0),b.minWidth||(b.minWidth=80),b.realWidth=Number(b.width===void 0?b.minWidth:b.width),b),v=b=>{const x=b.type,w=VV[x]||{};Object.keys(w).forEach(C=>{const M=w[C];C!=="className"&&M!==void 0&&(b[C]=M)});const S=WV(x);if(S){const C=`${E(l.namespace)}-${S}`;b.className=b.className?`${b.className} ${C}`:C}return b},p=b=>{Array.isArray(b)?b.forEach(w=>x(w)):x(b);function x(w){var S;((S=w==null?void 0:w.type)==null?void 0:S.name)==="ElTableColumn"&&(w.vParent=n)}};return{columnId:i,realAlign:o,isSubColumn:a,realHeaderAlign:s,columnOrTableParent:u,setColumnWidth:h,setColumnForcedProps:v,setColumnRenders:b=>{e.renderHeader||b.type!=="selection"&&(b.renderHeader=w=>{n.columnConfig.value.label;const S=t.header;return S?S(w):b.label});let x=b.renderCell;return b.type==="expand"?(b.renderCell=w=>Ce("div",{class:"cell"},[x(w)]),r.value.renderExpanded=w=>t.default?t.default(w):t.default):(x=x||GV,b.renderCell=w=>{let S=null;if(t.default){const D=t.default(w);S=D.some(N=>N.type!==xr)?D:x(w)}else S=x(w);const{columns:C}=r.value.store.states,M=C.value.findIndex(D=>D.type==="default"),P=c.value&&w.cellIndex===M,A=UV(w,P),T={class:"cell",style:{}};return b.showOverflowTooltip&&(T.class=`${T.class} ${E(l.namespace)}-tooltip`,T.style={width:`${(w.column.realWidth||Number(w.column.width))-1}px`}),p(S),Ce("div",T,[A,S])}),b},getPropsData:(...b)=>b.reduce((x,w)=>(Array.isArray(w)&&w.forEach(S=>{x[S]=e[S]}),x),{}),getColumnElIndex:(b,x)=>Array.prototype.indexOf.call(b,x),updateColumnOrder:()=>{r.value.store.commit("updateColumnOrder",n.columnConfig.value)}}}var qV={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:[Boolean,Object],fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}};let KV=1;var EA=ce({name:"ElTableColumn",components:{ElCheckbox:Cs},props:qV,setup(e,{slots:t}){const r=ct(),n=B({}),i=k(()=>{let _=r.parent;for(;_&&!_.tableId;)_=_.parent;return _}),{registerNormalWatchers:a,registerComplexWatchers:o}=jV(i,e),{columnId:s,isSubColumn:l,realHeaderAlign:u,columnOrTableParent:c,setColumnWidth:f,setColumnForcedProps:d,setColumnRenders:h,getPropsData:v,getColumnElIndex:p,realAlign:g,updateColumnOrder:m}=YV(e,t,i),y=c.value;s.value=`${y.tableId||y.columnId}_column_${KV++}`,Gd(()=>{l.value=i.value!==y;const _=e.type||"default",b=e.sortable===""?!0:e.sortable,x={...zV[_],id:s.value,type:_,property:e.prop||e.property,align:g,headerAlign:u,showOverflowTooltip:e.showOverflowTooltip,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:b,index:e.index,rawColumnKey:r.vnode.key};let P=v(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement"]);P=KW(x,P),P=ZW(h,f,d)(P),n.value=P,a(),o()}),wt(()=>{var _;const b=c.value,x=l.value?b.vnode.el.children:(_=b.refs.hiddenColumns)==null?void 0:_.children,w=()=>p(x||[],r.vnode.el);n.value.getColumnIndex=w,w()>-1&&i.value.store.commit("insertColumn",n.value,l.value?b.columnConfig.value:null,m)}),Xt(()=>{i.value.store.commit("removeColumn",n.value,l.value?y.columnConfig.value:null,m)}),r.columnId=s.value,r.columnConfig=n},render(){var e,t,r;try{const n=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),i=[];if(Array.isArray(n))for(const o of n)((r=o.type)==null?void 0:r.name)==="ElTableColumn"||o.shapeFlag&2?i.push(o):o.type===pt&&Array.isArray(o.children)&&o.children.forEach(s=>{(s==null?void 0:s.patchFlag)!==1024&&!He(s==null?void 0:s.children)&&i.push(s)});return Ce("div",i)}catch{return Ce("div",[])}}});const XV=hr($V,{TableColumn:EA}),ZV=fa(EA),PA=["success","info","warning","error"],mr=Ya({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:Nt?document.body:void 0}),QV=tt({customClass:{type:String,default:mr.customClass},center:{type:Boolean,default:mr.center},dangerouslyUseHTMLString:{type:Boolean,default:mr.dangerouslyUseHTMLString},duration:{type:Number,default:mr.duration},icon:{type:Wn,default:mr.icon},id:{type:String,default:mr.id},message:{type:Le([String,Object,Function]),default:mr.message},onClose:{type:Le(Function),required:!1},showClose:{type:Boolean,default:mr.showClose},type:{type:String,values:PA,default:mr.type},offset:{type:Number,default:mr.offset},zIndex:{type:Number,default:mr.zIndex},grouping:{type:Boolean,default:mr.grouping},repeatNum:{type:Number,default:mr.repeatNum}}),JV={destroy:()=>!0},Sn=LC([]),eG=e=>{const t=Sn.findIndex(i=>i.id===e),r=Sn[t];let n;return t>0&&(n=Sn[t-1]),{current:r,prev:n}},tG=e=>{const{prev:t}=eG(e);return t?t.vm.exposed.bottom.value:0},rG=(e,t)=>Sn.findIndex(n=>n.id===e)>0?20:t,nG=["id"],iG=["innerHTML"],aG=ce({name:"ElMessage"}),oG=ce({...aG,props:QV,emits:JV,setup(e,{expose:t}){const r=e,{Close:n}=B3,{ns:i,zIndex:a}=sH("message"),{currentZIndex:o,nextZIndex:s}=a,l=B(),u=B(!1),c=B(0);let f;const d=k(()=>r.type?r.type==="error"?"danger":r.type:"info"),h=k(()=>{const S=r.type;return{[i.bm("icon",S)]:S&&Ab[S]}}),v=k(()=>r.icon||Ab[r.type]||""),p=k(()=>tG(r.id)),g=k(()=>rG(r.id,r.offset)+p.value),m=k(()=>c.value+g.value),y=k(()=>({top:`${g.value}px`,zIndex:o.value}));function _(){r.duration!==0&&({stop:f}=kp(()=>{x()},r.duration))}function b(){f==null||f()}function x(){u.value=!1}function w({code:S}){S===Ot.esc&&x()}return wt(()=>{_(),s(),u.value=!0}),Se(()=>r.repeatNum,()=>{b(),_()}),xn(document,"keydown",w),gs(l,()=>{c.value=l.value.getBoundingClientRect().height}),t({visible:u,bottom:m,close:x}),(S,C)=>(Y(),_e(Ci,{name:E(i).b("fade"),onBeforeLeave:S.onClose,onAfterLeave:C[0]||(C[0]=M=>S.$emit("destroy")),persisted:""},{default:Z(()=>[nr(ae("div",{id:S.id,ref_key:"messageRef",ref:l,class:ue([E(i).b(),{[E(i).m(S.type)]:S.type&&!S.icon},E(i).is("center",S.center),E(i).is("closable",S.showClose),S.customClass]),style:St(E(y)),role:"alert",onMouseenter:b,onMouseleave:_},[S.repeatNum>1?(Y(),_e(E(E6),{key:0,value:S.repeatNum,type:E(d),class:ue(E(i).e("badge"))},null,8,["value","type","class"])):ke("v-if",!0),E(v)?(Y(),_e(E(lr),{key:1,class:ue([E(i).e("icon"),E(h)])},{default:Z(()=>[(Y(),_e(nn(E(v))))]),_:1},8,["class"])):ke("v-if",!0),$e(S.$slots,"default",{},()=>[S.dangerouslyUseHTMLString?(Y(),me(pt,{key:1},[ke(" Caution here, message could've been compromised, never use user's input as message "),ae("p",{class:ue(E(i).e("content")),innerHTML:S.message},null,10,iG)],2112)):(Y(),me("p",{key:0,class:ue(E(i).e("content"))},Te(S.message),3))]),S.showClose?(Y(),_e(E(lr),{key:2,class:ue(E(i).e("closeBtn")),onClick:Jf(x,["stop"])},{default:Z(()=>[ee(E(n))]),_:1},8,["class","onClick"])):ke("v-if",!0)],46,nG),[[yi,u.value]])]),_:3},8,["name","onBeforeLeave"]))}});var sG=Ze(oG,[["__file","/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);let lG=1;const LA=e=>{const t=!e||He(e)||ta(e)||De(e)?{message:e}:e,r={...mr,...t};if(!r.appendTo)r.appendTo=document.body;else if(He(r.appendTo)){let n=document.querySelector(r.appendTo);ys(n)||(n=document.body),r.appendTo=n}return r},uG=e=>{const t=Sn.indexOf(e);if(t===-1)return;Sn.splice(t,1);const{handler:r}=e;r.close()},cG=({appendTo:e,...t},r)=>{const n=`message_${lG++}`,i=t.onClose,a=document.createElement("div"),o={...t,id:n,onClose:()=>{i==null||i(),uG(c)},onDestroy:()=>{O_(null,a)}},s=ee(sG,o,De(o.message)||ta(o.message)?{default:De(o.message)?o.message:()=>o.message}:null);s.appContext=r||Ms._context,O_(s,a),e.appendChild(a.firstElementChild);const l=s.component,c={id:n,vnode:s,vm:l,handler:{close:()=>{l.exposed.visible.value=!1}},props:s.component.props};return c},Ms=(e={},t)=>{if(!Nt)return{close:()=>{}};if($t(Qp.max)&&Sn.length>=Qp.max)return{close:()=>{}};const r=LA(e);if(r.grouping&&Sn.length){const i=Sn.find(({vnode:a})=>{var o;return((o=a.props)==null?void 0:o.message)===r.message});if(i)return i.props.repeatNum+=1,i.props.type=r.type,i.handler}const n=cG(r,t);return Sn.push(n),n.handler};PA.forEach(e=>{Ms[e]=(t={},r)=>{const n=LA(t);return Ms({...n,type:e},r)}});function fG(e){for(const t of Sn)(!e||e===t.props.type)&&t.handler.close()}Ms.closeAll=fG;Ms._context=null;const DA=$3(Ms,"$message"),dG={id:"app"},hG={class:"grid-content header-color"},vG={class:"header-content"},pG=ae("div",{class:"brand"},[ae("a",{href:"#"},"frp")],-1),gG={class:"dark-switch"},mG=ae("span",null,"Proxies",-1),yG={id:"content"},_G=ae("footer",null,null,-1),bG=ce({__name:"App",setup(e){const t=NR(),r=B(t),n=nR(t),i=a=>{a==""&&window.open("https://github.com/fatedier/frp")};return(a,o)=>{const s=VW,l=wW,u=xW,c=bW,f=pA,d=_r("router-view"),h=vA;return Y(),me("div",dG,[ae("header",hG,[ae("div",vG,[pG,ae("div",gG,[ee(s,{modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=v=>r.value=v),"inline-prompt":"","active-text":"Dark","inactive-text":"Light",onChange:E(n),style:{"--el-switch-on-color":"#444452","--el-switch-off-color":"#589ef8"}},null,8,["modelValue","onChange"])])])]),ae("section",null,[ee(h,null,{default:Z(()=>[ee(f,{id:"side-nav",xs:24,md:4},{default:Z(()=>[ee(c,{"default-active":"/",mode:"vertical",theme:"light",router:"false",onSelect:i},{default:Z(()=>[ee(l,{index:"/"},{default:Z(()=>[Bt("Overview")]),_:1}),ee(u,{index:"/proxies"},{title:Z(()=>[mG]),default:Z(()=>[ee(l,{index:"/proxies/tcp"},{default:Z(()=>[Bt("TCP")]),_:1}),ee(l,{index:"/proxies/udp"},{default:Z(()=>[Bt("UDP")]),_:1}),ee(l,{index:"/proxies/http"},{default:Z(()=>[Bt("HTTP")]),_:1}),ee(l,{index:"/proxies/https"},{default:Z(()=>[Bt("HTTPS")]),_:1}),ee(l,{index:"/proxies/stcp"},{default:Z(()=>[Bt("STCP")]),_:1}),ee(l,{index:"/proxies/sudp"},{default:Z(()=>[Bt("SUDP")]),_:1})]),_:1}),ee(l,{index:""},{default:Z(()=>[Bt("Help")]),_:1})]),_:1})]),_:1}),ee(f,{xs:24,md:20},{default:Z(()=>[ae("div",yG,[ee(d)])]),_:1})]),_:1})]),_G])}}});/*! + */var GW=/["'&<>]/,UW=jW;function jW(e){var t=""+e,r=GW.exec(t);if(!r)return t;var n,i="",a=0,o=0;for(a=r.index;atypeof u=="string"?vu(s,u):u(s,l,e))):(t!=="$key"&&Xe(s)&&"$value"in s&&(s=s.$value),[Xe(s)?vu(s,t):s])},o=function(s,l){if(n)return n(s.value,l.value);for(let u=0,c=s.key.length;ul.key[u])return 1}return 0};return e.map((s,l)=>({value:s,index:l,key:a?a(s,l):null})).sort((s,l)=>{let u=o(s,l);return u||(u=s.index-l.index),u*+r}).map(s=>s.value)},bA=function(e,t){let r=null;return e.columns.forEach(n=>{n.id===t&&(r=n)}),r},qW=function(e,t){let r=null;for(let n=0;n{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const r=t.split(".");let n=e;for(const i of r)n=n[i];return`${n}`}else if(typeof t=="function")return t.call(null,e)},Ja=function(e,t){const r={};return(e||[]).forEach((n,i)=>{r[Yt(n,t)]={row:n,index:i}}),r};function KW(e,t){const r={};let n;for(n in e)r[n]=e[n];for(n in t)if(We(t,n)){const i=t[n];typeof i<"u"&&(r[n]=i)}return r}function ky(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function wA(e){return e===""||e!==void 0&&(e=ky(e),Number.isNaN(e)&&(e=80)),e}function XW(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function ZW(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Fl(e,t,r){let n=!1;const i=e.indexOf(t),a=i!==-1,o=s=>{s==="add"?e.push(t):e.splice(i,1),n=!0,be(t.children)&&t.children.forEach(l=>{Fl(e,l,r??!a)})};return Br(r)?r&&!a?o("add"):!r&&a&&o("remove"):o(a?"remove":"add"),n}function QW(e,t,r="children",n="hasChildren"){const i=o=>!(Array.isArray(o)&&o.length);function a(o,s,l){t(o,s,l),s.forEach(u=>{if(u[n]){t(u,null,l+1);return}const c=u[r];i(c)||a(u,c,l+1)})}e.forEach(o=>{if(o[n]){t(o,null,0);return}const s=o[r];i(s)||a(o,s,0)})}let ui;function JW(e,t,r,n,i){i=aM({enterable:!0,showArrow:!0},i);const a=e==null?void 0:e.dataset.prefix,o=e==null?void 0:e.querySelector(`.${a}-scrollbar__wrap`);function s(){const g=i.effect==="light",m=document.createElement("div");return m.className=[`${a}-popper`,g?"is-light":"is-dark",i.popperClass||""].join(" "),r=UW(r),m.innerHTML=r,m.style.zIndex=String(n()),e==null||e.appendChild(m),m}function l(){const g=document.createElement("div");return g.className=`${a}-popper__arrow`,g}function u(){c&&c.update()}ui==null||ui(),ui=()=>{try{c&&c.destroy(),h&&(e==null||e.removeChild(h)),t.removeEventListener("mouseenter",f),t.removeEventListener("mouseleave",d),o==null||o.removeEventListener("scroll",ui),ui=void 0}catch{}};let c=null,f=u,d=ui;i.enterable&&({onOpen:f,onClose:d}=DM({showAfter:i.showAfter,hideAfter:i.hideAfter,open:u,close:ui}));const h=s();h.onmouseenter=f,h.onmouseleave=d;const v=[];if(i.offset&&v.push({name:"offset",options:{offset:[0,i.offset]}}),i.showArrow){const g=h.appendChild(l());v.push({name:"arrow",options:{element:g,padding:10}})}const p=i.popperOptions||{};return c=EM(t,h,{placement:i.placement||"top",strategy:"fixed",...p,modifiers:p.modifiers?v.concat(p.modifiers):v}),t.addEventListener("mouseenter",f),t.addEventListener("mouseleave",d),o==null||o.addEventListener("scroll",ui),c}function xA(e){return e.children?E5(e.children,xA):[e]}function p1(e,t){return e+t.colSpan}const SA=(e,t,r,n)=>{let i=0,a=e;const o=r.states.columns.value;if(n){const l=xA(n[e]);i=o.slice(0,o.indexOf(l[0])).reduce(p1,0),a=i+l.reduce(p1,0)-1}else i=e;let s;switch(t){case"left":a=o.length-r.states.rightFixedLeafColumnsLength.value&&(s="right");break;default:a=o.length-r.states.rightFixedLeafColumnsLength.value&&(s="right")}return s?{direction:s,start:i,after:a}:{}},Ny=(e,t,r,n,i,a=0)=>{const o=[],{direction:s,start:l,after:u}=SA(t,r,n,i);if(s){const c=s==="left";o.push(`${e}-fixed-column--${s}`),c&&u+a===n.states.fixedLeafColumnsLength.value-1?o.push("is-last-column"):!c&&l-a===n.states.columns.value.length-n.states.rightFixedLeafColumnsLength.value&&o.push("is-first-column")}return o};function g1(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const Fy=(e,t,r,n)=>{const{direction:i,start:a=0,after:o=0}=SA(e,t,r,n);if(!i)return;const s={},l=i==="left",u=r.states.columns.value;return l?s.left=u.slice(0,a).reduce(g1,0):s.right=u.slice(o+1).reverse().reduce(g1,0),s},Ts=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function eV(e){const t=ct(),r=B(!1),n=B([]);return{updateExpandRows:()=>{const l=e.data.value||[],u=e.rowKey.value;if(r.value)n.value=l.slice();else if(u){const c=Ja(n.value,u);n.value=l.reduce((f,d)=>{const h=Yt(d,u);return c[h]&&f.push(d),f},[])}else n.value=[]},toggleRowExpansion:(l,u)=>{Fl(n.value,l,u)&&t.emit("expand-change",l,n.value.slice())},setExpandRowKeys:l=>{t.store.assertRowKey();const u=e.data.value||[],c=e.rowKey.value,f=Ja(u,c);n.value=l.reduce((d,h)=>{const v=f[h];return v&&d.push(v.row),d},[])},isRowExpanded:l=>{const u=e.rowKey.value;return u?!!Ja(n.value,u)[Yt(l,u)]:n.value.includes(l)},states:{expandRows:n,defaultExpandAll:r}}}function tV(e){const t=ct(),r=B(null),n=B(null),i=u=>{t.store.assertRowKey(),r.value=u,o(u)},a=()=>{r.value=null},o=u=>{const{data:c,rowKey:f}=e;let d=null;f.value&&(d=(E(c)||[]).find(h=>Yt(h,f.value)===u)),n.value=d,t.emit("current-change",n.value,null)};return{setCurrentRowKey:i,restoreCurrentRowKey:a,setCurrentRowByKey:o,updateCurrentRow:u=>{const c=n.value;if(u&&u!==c){n.value=u,t.emit("current-change",n.value,c);return}!u&&c&&(n.value=null,t.emit("current-change",null,c))},updateCurrentRowData:()=>{const u=e.rowKey.value,c=e.data.value||[],f=n.value;if(!c.includes(f)&&f){if(u){const d=Yt(f,u);o(d)}else n.value=null;n.value===null&&t.emit("current-change",null,f)}else r.value&&(o(r.value),a())},states:{_currentRowKey:r,currentRow:n}}}function rV(e){const t=B([]),r=B({}),n=B(16),i=B(!1),a=B({}),o=B("hasChildren"),s=B("children"),l=ct(),u=k(()=>{if(!e.rowKey.value)return{};const m=e.data.value||[];return f(m)}),c=k(()=>{const m=e.rowKey.value,y=Object.keys(a.value),_={};return y.length&&y.forEach(b=>{if(a.value[b].length){const x={children:[]};a.value[b].forEach(w=>{const S=Yt(w,m);x.children.push(S),w[o.value]&&!_[S]&&(_[S]={children:[]})}),_[b]=x}}),_}),f=m=>{const y=e.rowKey.value,_={};return QW(m,(b,x,w)=>{const S=Yt(b,y);Array.isArray(x)?_[S]={children:x.map(C=>Yt(C,y)),level:w}:i.value&&(_[S]={children:[],lazy:!0,level:w})},s.value,o.value),_},d=(m=!1,y=(_=>(_=l.store)==null?void 0:_.states.defaultExpandAll.value)())=>{var _;const b=u.value,x=c.value,w=Object.keys(b),S={};if(w.length){const C=E(r),M=[],P=(T,D)=>{if(m)return t.value?y||t.value.includes(D):!!(y||T!=null&&T.expanded);{const N=y||t.value&&t.value.includes(D);return!!(T!=null&&T.expanded||N)}};w.forEach(T=>{const D=C[T],N={...b[T]};if(N.expanded=P(D,T),N.lazy){const{loaded:H=!1,loading:$=!1}=D||{};N.loaded=!!H,N.loading=!!$,M.push(T)}S[T]=N});const A=Object.keys(x);i.value&&A.length&&M.length&&A.forEach(T=>{const D=C[T],N=x[T].children;if(M.includes(T)){if(S[T].children.length!==0)throw new Error("[ElTable]children must be an empty array.");S[T].children=N}else{const{loaded:H=!1,loading:$=!1}=D||{};S[T]={lazy:!0,loaded:!!H,loading:!!$,expanded:P(D,T),children:N,level:""}}})}r.value=S,(_=l.store)==null||_.updateTableScrollY()};Se(()=>t.value,()=>{d(!0)}),Se(()=>u.value,()=>{d()}),Se(()=>c.value,()=>{d()});const h=m=>{t.value=m,d()},v=(m,y)=>{l.store.assertRowKey();const _=e.rowKey.value,b=Yt(m,_),x=b&&r.value[b];if(b&&x&&"expanded"in x){const w=x.expanded;y=typeof y>"u"?!x.expanded:y,r.value[b].expanded=y,w!==y&&l.emit("expand-change",m,y),l.store.updateTableScrollY()}},p=m=>{l.store.assertRowKey();const y=e.rowKey.value,_=Yt(m,y),b=r.value[_];i.value&&b&&"loaded"in b&&!b.loaded?g(m,_,b):v(m,void 0)},g=(m,y,_)=>{const{load:b}=l.props;b&&!r.value[y].loaded&&(r.value[y].loading=!0,b(m,_,x=>{if(!Array.isArray(x))throw new TypeError("[ElTable] data must be an array");r.value[y].loading=!1,r.value[y].loaded=!0,r.value[y].expanded=!0,x.length&&(a.value[y]=x),l.emit("expand-change",m,!0)}))};return{loadData:g,loadOrToggle:p,toggleTreeExpansion:v,updateTreeExpandKeys:h,updateTreeData:d,normalize:f,states:{expandRowKeys:t,treeData:r,indent:n,lazy:i,lazyTreeNodeMap:a,lazyColumnIdentifier:o,childrenColumnName:s}}}const nV=(e,t)=>{const r=t.sortingColumn;return!r||typeof r.sortable=="string"?e:YW(e,t.sortProp,t.sortOrder,r.sortMethod,r.sortBy)},Df=e=>{const t=[];return e.forEach(r=>{r.children?t.push.apply(t,Df(r.children)):t.push(r)}),t};function iV(){var e;const t=ct(),{size:r}=$d((e=t.proxy)==null?void 0:e.$props),n=B(null),i=B([]),a=B([]),o=B(!1),s=B([]),l=B([]),u=B([]),c=B([]),f=B([]),d=B([]),h=B([]),v=B([]),p=[],g=B(0),m=B(0),y=B(0),_=B(!1),b=B([]),x=B(!1),w=B(!1),S=B(null),C=B({}),M=B(null),P=B(null),A=B(null),T=B(null),D=B(null);Se(i,()=>t.state&&G(!1),{deep:!0});const N=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},H=ve=>{var Pe;(Pe=ve.children)==null||Pe.forEach(je=>{je.fixed=ve.fixed,H(je)})},$=()=>{s.value.forEach(nt=>{H(nt)}),c.value=s.value.filter(nt=>nt.fixed===!0||nt.fixed==="left"),f.value=s.value.filter(nt=>nt.fixed==="right"),c.value.length>0&&s.value[0]&&s.value[0].type==="selection"&&!s.value[0].fixed&&(s.value[0].fixed=!0,c.value.unshift(s.value[0]));const ve=s.value.filter(nt=>!nt.fixed);l.value=[].concat(c.value).concat(ve).concat(f.value);const Pe=Df(ve),je=Df(c.value),Be=Df(f.value);g.value=Pe.length,m.value=je.length,y.value=Be.length,u.value=[].concat(je).concat(Pe).concat(Be),o.value=c.value.length>0||f.value.length>0},G=(ve,Pe=!1)=>{ve&&$(),Pe?t.state.doLayout():t.state.debouncedUpdateLayout()},F=ve=>b.value.includes(ve),R=()=>{_.value=!1,b.value.length&&(b.value=[],t.emit("selection-change",[]))},j=()=>{let ve;if(n.value){ve=[];const Pe=Ja(b.value,n.value),je=Ja(i.value,n.value);for(const Be in Pe)We(Pe,Be)&&!je[Be]&&ve.push(Pe[Be].row)}else ve=b.value.filter(Pe=>!i.value.includes(Pe));if(ve.length){const Pe=b.value.filter(je=>!ve.includes(je));b.value=Pe,t.emit("selection-change",Pe.slice())}},re=()=>(b.value||[]).slice(),oe=(ve,Pe=void 0,je=!0)=>{if(Fl(b.value,ve,Pe)){const nt=(b.value||[]).slice();je&&t.emit("select",nt,ve),t.emit("selection-change",nt)}},ye=()=>{var ve,Pe;const je=w.value?!_.value:!(_.value||b.value.length);_.value=je;let Be=!1,nt=0;const it=(Pe=(ve=t==null?void 0:t.store)==null?void 0:ve.states)==null?void 0:Pe.rowKey.value;i.value.forEach((Mt,ri)=>{const ni=ri+nt;S.value?S.value.call(null,Mt,ni)&&Fl(b.value,Mt,je)&&(Be=!0):Fl(b.value,Mt,je)&&(Be=!0),nt+=Q(Yt(Mt,it))}),Be&&t.emit("selection-change",b.value?b.value.slice():[]),t.emit("select-all",b.value)},Ae=()=>{const ve=Ja(b.value,n.value);i.value.forEach(Pe=>{const je=Yt(Pe,n.value),Be=ve[je];Be&&(b.value[Be.index]=Pe)})},V=()=>{var ve,Pe,je;if(((ve=i.value)==null?void 0:ve.length)===0){_.value=!1;return}let Be;n.value&&(Be=Ja(b.value,n.value));const nt=function(ni){return Be?!!Be[Yt(ni,n.value)]:b.value.includes(ni)};let it=!0,Mt=0,ri=0;for(let ni=0,sD=(i.value||[]).length;ni{var Pe;if(!t||!t.store)return 0;const{treeData:je}=t.store.states;let Be=0;const nt=(Pe=je.value[ve])==null?void 0:Pe.children;return nt&&(Be+=nt.length,nt.forEach(it=>{Be+=Q(it)})),Be},W=(ve,Pe)=>{Array.isArray(ve)||(ve=[ve]);const je={};return ve.forEach(Be=>{C.value[Be.id]=Pe,je[Be.columnKey||Be.id]=Pe}),je},q=(ve,Pe,je)=>{P.value&&P.value!==ve&&(P.value.order=null),P.value=ve,A.value=Pe,T.value=je},le=()=>{let ve=E(a);Object.keys(C.value).forEach(Pe=>{const je=C.value[Pe];if(!je||je.length===0)return;const Be=bA({columns:u.value},Pe);Be&&Be.filterMethod&&(ve=ve.filter(nt=>je.some(it=>Be.filterMethod.call(null,it,nt,Be))))}),M.value=ve},de=()=>{i.value=nV(M.value,{sortingColumn:P.value,sortProp:A.value,sortOrder:T.value})},J=(ve=void 0)=>{ve&&ve.filter||le(),de()},L=ve=>{const{tableHeaderRef:Pe}=t.refs;if(!Pe)return;const je=Object.assign({},Pe.filterPanels),Be=Object.keys(je);if(Be.length)if(typeof ve=="string"&&(ve=[ve]),Array.isArray(ve)){const nt=ve.map(it=>qW({columns:u.value},it));Be.forEach(it=>{const Mt=nt.find(ri=>ri.id===it);Mt&&(Mt.filteredValue=[])}),t.store.commit("filterChange",{column:nt,values:[],silent:!0,multi:!0})}else Be.forEach(nt=>{const it=u.value.find(Mt=>Mt.id===nt);it&&(it.filteredValue=[])}),C.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},I=()=>{P.value&&(q(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:z,toggleRowExpansion:U,updateExpandRows:K,states:ne,isRowExpanded:fe}=eV({data:i,rowKey:n}),{updateTreeExpandKeys:te,toggleTreeExpansion:ie,updateTreeData:X,loadOrToggle:we,states:he}=rV({data:i,rowKey:n}),{updateCurrentRowData:xe,updateCurrentRow:Oe,setCurrentRowKey:ze,states:rt}=tV({data:i,rowKey:n});return{assertRowKey:N,updateColumns:$,scheduleLayout:G,isSelected:F,clearSelection:R,cleanSelection:j,getSelectionRows:re,toggleRowSelection:oe,_toggleAllSelection:ye,toggleAllSelection:null,updateSelectionByRowKey:Ae,updateAllSelected:V,updateFilters:W,updateCurrentRow:Oe,updateSort:q,execFilter:le,execSort:de,execQuery:J,clearFilter:L,clearSort:I,toggleRowExpansion:U,setExpandRowKeysAdapter:ve=>{z(ve),te(ve)},setCurrentRowKey:ze,toggleRowExpansionAdapter:(ve,Pe)=>{u.value.some(({type:Be})=>Be==="expand")?U(ve,Pe):ie(ve,Pe)},isRowExpanded:fe,updateExpandRows:K,updateCurrentRowData:xe,loadOrToggle:we,updateTreeData:X,states:{tableSize:r,rowKey:n,data:i,_data:a,isComplex:o,_columns:s,originColumns:l,columns:u,fixedColumns:c,rightFixedColumns:f,leafColumns:d,fixedLeafColumns:h,rightFixedLeafColumns:v,updateOrderFns:p,leafColumnsLength:g,fixedLeafColumnsLength:m,rightFixedLeafColumnsLength:y,isAllSelected:_,selection:b,reserveSelection:x,selectOnIndeterminate:w,selectable:S,filters:C,filteredData:M,sortingColumn:P,sortProp:A,sortOrder:T,hoverRow:D,...ne,...he,...rt}}}function pg(e,t){return e.map(r=>{var n;return r.id===t.id?t:((n=r.children)!=null&&n.length&&(r.children=pg(r.children,t)),r)})}function gg(e){e.forEach(t=>{var r,n;t.no=(r=t.getColumnIndex)==null?void 0:r.call(t),(n=t.children)!=null&&n.length&&gg(t.children)}),e.sort((t,r)=>t.no-r.no)}function aV(){const e=ct(),t=iV();return{ns:Ne("table"),...t,mutations:{setData(o,s){const l=E(o._data)!==s;o.data.value=s,o._data.value=s,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),E(o.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):l?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(o,s,l,u){const c=E(o._columns);let f=[];l?(l&&!l.children&&(l.children=[]),l.children.push(s),f=pg(c,l)):(c.push(s),f=c),gg(f),o._columns.value=f,o.updateOrderFns.push(u),s.type==="selection"&&(o.selectable.value=s.selectable,o.reserveSelection.value=s.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(o,s){var l;((l=s.getColumnIndex)==null?void 0:l.call(s))!==s.no&&(gg(o._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(o,s,l,u){const c=E(o._columns)||[];if(l)l.children.splice(l.children.findIndex(d=>d.id===s.id),1),Ft(()=>{var d;((d=l.children)==null?void 0:d.length)===0&&delete l.children}),o._columns.value=pg(c,l);else{const d=c.indexOf(s);d>-1&&(c.splice(d,1),o._columns.value=c)}const f=o.updateOrderFns.indexOf(u);f>-1&&o.updateOrderFns.splice(f,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(o,s){const{prop:l,order:u,init:c}=s;if(l){const f=E(o.columns).find(d=>d.property===l);f&&(f.order=u,e.store.updateSort(f,l,u),e.store.commit("changeSortCondition",{init:c}))}},changeSortCondition(o,s){const{sortingColumn:l,sortProp:u,sortOrder:c}=o,f=E(l),d=E(u),h=E(c);h===null&&(o.sortingColumn.value=null,o.sortProp.value=null);const v={filter:!0};e.store.execQuery(v),(!s||!(s.silent||s.init))&&e.emit("sort-change",{column:f,prop:d,order:h}),e.store.updateTableScrollY()},filterChange(o,s){const{column:l,values:u,silent:c}=s,f=e.store.updateFilters(l,u);e.store.execQuery(),c||e.emit("filter-change",f),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(o,s){e.store.toggleRowSelection(s),e.store.updateAllSelected()},setHoverRow(o,s){o.hoverRow.value=s},setCurrentRow(o,s){e.store.updateCurrentRow(s)}},commit:function(o,...s){const l=e.store.mutations;if(l[o])l[o].apply(e,[e.store.states].concat(s));else throw new Error(`Action not found: ${o}`)},updateTableScrollY:function(){Ft(()=>e.layout.updateScrollY.apply(e.layout))}}}const Bl={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data",["treeProps.hasChildren"]:{key:"lazyColumnIdentifier",default:"hasChildren"},["treeProps.children"]:{key:"childrenColumnName",default:"children"}};function oV(e,t){if(!e)throw new Error("Table is required.");const r=aV();return r.toggleAllSelection=id(r._toggleAllSelection,10),Object.keys(Bl).forEach(n=>{CA(TA(t,n),n,r)}),sV(r,t),r}function sV(e,t){Object.keys(Bl).forEach(r=>{Se(()=>TA(t,r),n=>{CA(n,r,e)})})}function CA(e,t,r){let n=e,i=Bl[t];typeof Bl[t]=="object"&&(i=i.key,n=n||Bl[t].default),r.states[i].value=n}function TA(e,t){if(t.includes(".")){const r=t.split(".");let n=e;return r.forEach(i=>{n=n[i]}),n}else return e[t]}class lV{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=B(null),this.scrollX=B(!1),this.scrollY=B(!1),this.bodyWidth=B(null),this.fixedWidth=B(null),this.rightFixedWidth=B(null),this.gutterWidth=0;for(const r in t)We(t,r)&&(Ct(this[r])?this[r].value=t[r]:this[r]=t[r]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(this.height.value===null)return!1;const r=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(r!=null&&r.wrapRef)){let n=!0;const i=this.scrollY.value;return n=r.wrapRef.scrollHeight>r.wrapRef.clientHeight,this.scrollY.value=n,i!==n}return!1}setHeight(t,r="height"){if(!Nt)return;const n=this.table.vnode.el;if(t=XW(t),this.height.value=Number(t),!n&&(t||t===0))return Ft(()=>this.setHeight(t,r));typeof t=="number"?(n.style[r]=`${t}px`,this.updateElsHeight()):typeof t=="string"&&(n.style[r]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(n=>{n.isColumnGroup?t.push.apply(t,n.columns):t.push(n)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let r=t;for(;r.tagName!=="DIV";){if(getComputedStyle(r).display==="none")return!0;r=r.parentElement}return!1}updateColumnsWidth(){if(!Nt)return;const t=this.fit,r=this.table.vnode.el.clientWidth;let n=0;const i=this.getFlattenColumns(),a=i.filter(l=>typeof l.width!="number");if(i.forEach(l=>{typeof l.width=="number"&&l.realWidth&&(l.realWidth=null)}),a.length>0&&t){if(i.forEach(l=>{n+=Number(l.width||l.minWidth||80)}),n<=r){this.scrollX.value=!1;const l=r-n;if(a.length===1)a[0].realWidth=Number(a[0].minWidth||80)+l;else{const u=a.reduce((d,h)=>d+Number(h.minWidth||80),0),c=l/u;let f=0;a.forEach((d,h)=>{if(h===0)return;const v=Math.floor(Number(d.minWidth||80)*c);f+=v,d.realWidth=Number(d.minWidth||80)+v}),a[0].realWidth=Number(a[0].minWidth||80)+l-f}}else this.scrollX.value=!0,a.forEach(l=>{l.realWidth=Number(l.minWidth)});this.bodyWidth.value=Math.max(n,r),this.table.state.resizeState.value.width=this.bodyWidth.value}else i.forEach(l=>{!l.width&&!l.minWidth?l.realWidth=80:l.realWidth=Number(l.width||l.minWidth),n+=l.realWidth}),this.scrollX.value=n>r,this.bodyWidth.value=n;const o=this.store.states.fixedColumns.value;if(o.length>0){let l=0;o.forEach(u=>{l+=Number(u.realWidth||u.width)}),this.fixedWidth.value=l}const s=this.store.states.rightFixedColumns.value;if(s.length>0){let l=0;s.forEach(u=>{l+=Number(u.realWidth||u.width)}),this.rightFixedWidth.value=l}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const r=this.observers.indexOf(t);r!==-1&&this.observers.splice(r,1)}notifyObservers(t){this.observers.forEach(n=>{var i,a;switch(t){case"columns":(i=n.state)==null||i.onColumnsChange(this);break;case"scrollable":(a=n.state)==null||a.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}}const{CheckboxGroup:uV}=Cs,cV=ce({name:"ElTableFilterPanel",components:{ElCheckbox:Cs,ElCheckboxGroup:uV,ElScrollbar:VM,ElTooltip:Ju,ElIcon:lr,ArrowDown:lM,ArrowUp:e3},directives:{ClickOutside:t8},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=ct(),{t:r}=py(),n=Ne("table-filter"),i=t==null?void 0:t.parent;i.filterPanels.value[e.column.id]||(i.filterPanels.value[e.column.id]=t);const a=B(!1),o=B(null),s=k(()=>e.column&&e.column.filters),l=k({get:()=>{var b;return(((b=e.column)==null?void 0:b.filteredValue)||[])[0]},set:b=>{u.value&&(typeof b<"u"&&b!==null?u.value.splice(0,1,b):u.value.splice(0,1))}}),u=k({get(){return e.column?e.column.filteredValue||[]:[]},set(b){e.column&&e.upDataColumn("filteredValue",b)}}),c=k(()=>e.column?e.column.filterMultiple:!0),f=b=>b.value===l.value,d=()=>{a.value=!1},h=b=>{b.stopPropagation(),a.value=!a.value},v=()=>{a.value=!1},p=()=>{y(u.value),d()},g=()=>{u.value=[],y(u.value),d()},m=b=>{l.value=b,y(typeof b<"u"&&b!==null?u.value:[]),d()},y=b=>{e.store.commit("filterChange",{column:e.column,values:b}),e.store.updateAllSelected()};Se(a,b=>{e.column&&e.upDataColumn("filterOpened",b)},{immediate:!0});const _=k(()=>{var b,x;return(x=(b=o.value)==null?void 0:b.popperRef)==null?void 0:x.contentRef});return{tooltipVisible:a,multiple:c,filteredValue:u,filterValue:l,filters:s,handleConfirm:p,handleReset:g,handleSelect:m,isActive:f,t:r,ns:n,showFilterPanel:h,hideFilterPanel:v,popperPaneRef:_,tooltip:o}}}),fV={key:0},dV=["disabled"],hV=["label","onClick"];function vV(e,t,r,n,i,a){const o=_r("el-checkbox"),s=_r("el-checkbox-group"),l=_r("el-scrollbar"),u=_r("arrow-up"),c=_r("arrow-down"),f=_r("el-icon"),d=_r("el-tooltip"),h=ZC("click-outside");return Y(),_e(d,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.ns.b(),persistent:""},{content:Z(()=>[e.multiple?(Y(),me("div",fV,[ae("div",{class:ue(e.ns.e("content"))},[ee(l,{"wrap-class":e.ns.e("wrap")},{default:Z(()=>[ee(s,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=v=>e.filteredValue=v),class:ue(e.ns.e("checkbox-group"))},{default:Z(()=>[(Y(!0),me(pt,null,l_(e.filters,v=>(Y(),_e(o,{key:v.value,label:v.value},{default:Z(()=>[Bt(Me(v.text),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),ae("div",{class:ue(e.ns.e("bottom"))},[ae("button",{class:ue({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...v)=>e.handleConfirm&&e.handleConfirm(...v))},Me(e.t("el.table.confirmFilter")),11,dV),ae("button",{type:"button",onClick:t[2]||(t[2]=(...v)=>e.handleReset&&e.handleReset(...v))},Me(e.t("el.table.resetFilter")),1)],2)])):(Y(),me("ul",{key:1,class:ue(e.ns.e("list"))},[ae("li",{class:ue([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:t[3]||(t[3]=v=>e.handleSelect(null))},Me(e.t("el.table.clearFilter")),3),(Y(!0),me(pt,null,l_(e.filters,v=>(Y(),me("li",{key:v.value,class:ue([e.ns.e("list-item"),e.ns.is("active",e.isActive(v))]),label:v.value,onClick:p=>e.handleSelect(v.value)},Me(v.text),11,hV))),128))],2))]),default:Z(()=>[nr((Y(),me("span",{class:ue([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:t[4]||(t[4]=(...v)=>e.showFilterPanel&&e.showFilterPanel(...v))},[ee(f,null,{default:Z(()=>[e.column.filterOpened?(Y(),_e(u,{key:0})):(Y(),_e(c,{key:1}))]),_:1})],2)),[[h,e.hideFilterPanel,e.popperPaneRef]])]),_:1},8,["visible","placement","popper-class"])}var pV=Ze(cV,[["render",vV],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]);function MA(e){const t=ct();Gd(()=>{r.value.addObserver(t)}),wt(()=>{n(r.value),i(r.value)}),Hu(()=>{n(r.value),i(r.value)}),ks(()=>{r.value.removeObserver(t)});const r=k(()=>{const a=e.layout;if(!a)throw new Error("Can not find table layout.");return a}),n=a=>{var o;const s=((o=e.vnode.el)==null?void 0:o.querySelectorAll("colgroup > col"))||[];if(!s.length)return;const l=a.getFlattenColumns(),u={};l.forEach(c=>{u[c.id]=c});for(let c=0,f=s.length;c{var o,s;const l=((o=e.vnode.el)==null?void 0:o.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let c=0,f=l.length;c{p.stopPropagation()},a=(p,g)=>{!g.filters&&g.sortable?v(p,g,!1):g.filterable&&!g.sortable&&i(p),n==null||n.emit("header-click",g,p)},o=(p,g)=>{n==null||n.emit("header-contextmenu",g,p)},s=B(null),l=B(!1),u=B({}),c=(p,g)=>{if(Nt&&!(g.children&&g.children.length>0)&&s.value&&e.border){l.value=!0;const m=n;t("set-drag-visible",!0);const _=(m==null?void 0:m.vnode.el).getBoundingClientRect().left,b=r.vnode.el.querySelector(`th.${g.id}`),x=b.getBoundingClientRect(),w=x.left-_+30;Zo(b,"noclick"),u.value={startMouseLeft:p.clientX,startLeft:x.right-_,startColumnLeft:x.left-_,tableLeft:_};const S=m==null?void 0:m.refs.resizeProxy;S.style.left=`${u.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const C=P=>{const A=P.clientX-u.value.startMouseLeft,T=u.value.startLeft+A;S.style.left=`${Math.max(w,T)}px`},M=()=>{if(l.value){const{startColumnLeft:P,startLeft:A}=u.value,D=Number.parseInt(S.style.left,10)-P;g.width=g.realWidth=D,m==null||m.emit("header-dragend",g.width,A-P,g,p),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",l.value=!1,s.value=null,u.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",M),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{ss(b,"noclick")},0)};document.addEventListener("mousemove",C),document.addEventListener("mouseup",M)}},f=(p,g)=>{var m;if(g.children&&g.children.length>0)return;const y=(m=p.target)==null?void 0:m.closest("th");if(!(!g||!g.resizable)&&!l.value&&e.border){const _=y.getBoundingClientRect(),b=document.body.style;_.width>12&&_.right-p.pageX<8?(b.cursor="col-resize",Ol(y,"is-sortable")&&(y.style.cursor="col-resize"),s.value=g):l.value||(b.cursor="",Ol(y,"is-sortable")&&(y.style.cursor="pointer"),s.value=null)}},d=()=>{Nt&&(document.body.style.cursor="")},h=({order:p,sortOrders:g})=>{if(p==="")return g[0];const m=g.indexOf(p||null);return g[m>g.length-2?0:m+1]},v=(p,g,m)=>{var y;p.stopPropagation();const _=g.order===m?null:m||h(g),b=(y=p.target)==null?void 0:y.closest("th");if(b&&Ol(b,"noclick")){ss(b,"noclick");return}if(!g.sortable)return;const x=e.store.states;let w=x.sortProp.value,S;const C=x.sortingColumn.value;(C!==g||C===g&&C.order===null)&&(C&&(C.order=null),x.sortingColumn.value=g,w=g.property),_?S=g.order=_:S=g.order=null,x.sortProp.value=w,x.sortOrder.value=S,n==null||n.store.commit("changeSortCondition")};return{handleHeaderClick:a,handleHeaderContextMenu:o,handleMouseDown:c,handleMouseMove:f,handleMouseOut:d,handleSortClick:v,handleFilterClick:i}}function mV(e){const t=Ee(Qn),r=Ne("table");return{getHeaderRowStyle:s=>{const l=t==null?void 0:t.props.headerRowStyle;return typeof l=="function"?l.call(null,{rowIndex:s}):l},getHeaderRowClass:s=>{const l=[],u=t==null?void 0:t.props.headerRowClassName;return typeof u=="string"?l.push(u):typeof u=="function"&&l.push(u.call(null,{rowIndex:s})),l.join(" ")},getHeaderCellStyle:(s,l,u,c)=>{var f;let d=(f=t==null?void 0:t.props.headerCellStyle)!=null?f:{};typeof d=="function"&&(d=d.call(null,{rowIndex:s,columnIndex:l,row:u,column:c}));const h=Fy(l,c.fixed,e.store,u);return Ts(h,"left"),Ts(h,"right"),Object.assign({},d,h)},getHeaderCellClass:(s,l,u,c)=>{const f=Ny(r.b(),l,c.fixed,e.store,u),d=[c.id,c.order,c.headerAlign,c.className,c.labelClassName,...f];c.children||d.push("is-leaf"),c.sortable&&d.push("is-sortable");const h=t==null?void 0:t.props.headerCellClassName;return typeof h=="string"?d.push(h):typeof h=="function"&&d.push(h.call(null,{rowIndex:s,columnIndex:l,row:u,column:c})),d.push(r.e("cell")),d.filter(v=>Boolean(v)).join(" ")}}}const AA=e=>{const t=[];return e.forEach(r=>{r.children?(t.push(r),t.push.apply(t,AA(r.children))):t.push(r)}),t},yV=e=>{let t=1;const r=(a,o)=>{if(o&&(a.level=o.level+1,t{r(l,a),s+=l.colSpan}),a.colSpan=s}else a.colSpan=1};e.forEach(a=>{a.level=1,r(a,void 0)});const n=[];for(let a=0;a{a.children?(a.rowSpan=1,a.children.forEach(o=>o.isSubColumn=!0)):a.rowSpan=t-a.level+1,n[a.level-1].push(a)}),n};function _V(e){const t=Ee(Qn),r=k(()=>yV(e.store.states.originColumns.value));return{isGroup:k(()=>{const a=r.value.length>1;return a&&t&&(t.state.isGroup.value=!0),a}),toggleAllSelection:a=>{a.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:r}}var bV=ce({name:"ElTableHeader",components:{ElCheckbox:Cs},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const r=ct(),n=Ee(Qn),i=Ne("table"),a=B({}),{onColumnsChange:o,onScrollableChange:s}=MA(n);wt(async()=>{await Ft(),await Ft();const{prop:w,order:S}=e.defaultSort;n==null||n.store.commit("sort",{prop:w,order:S,init:!0})});const{handleHeaderClick:l,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:f,handleMouseOut:d,handleSortClick:h,handleFilterClick:v}=gV(e,t),{getHeaderRowStyle:p,getHeaderRowClass:g,getHeaderCellStyle:m,getHeaderCellClass:y}=mV(e),{isGroup:_,toggleAllSelection:b,columnRows:x}=_V(e);return r.state={onColumnsChange:o,onScrollableChange:s},r.filterPanels=a,{ns:i,filterPanels:a,onColumnsChange:o,onScrollableChange:s,columnRows:x,getHeaderRowClass:g,getHeaderRowStyle:p,getHeaderCellClass:y,getHeaderCellStyle:m,handleHeaderClick:l,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:f,handleMouseOut:d,handleSortClick:h,handleFilterClick:v,isGroup:_,toggleAllSelection:b}},render(){const{ns:e,isGroup:t,columnRows:r,getHeaderCellStyle:n,getHeaderCellClass:i,getHeaderRowClass:a,getHeaderRowStyle:o,handleHeaderClick:s,handleHeaderContextMenu:l,handleMouseDown:u,handleMouseMove:c,handleSortClick:f,handleMouseOut:d,store:h,$parent:v}=this;let p=1;return Ce("thead",{class:{[e.is("group")]:t}},r.map((g,m)=>Ce("tr",{class:a(m),key:m,style:o(m)},g.map((y,_)=>(y.rowSpan>p&&(p=y.rowSpan),Ce("th",{class:i(m,_,g,y),colspan:y.colSpan,key:`${y.id}-thead`,rowspan:y.rowSpan,style:n(m,_,g,y),onClick:b=>s(b,y),onContextmenu:b=>l(b,y),onMousedown:b=>u(b,y),onMousemove:b=>c(b,y),onMouseout:d},[Ce("div",{class:["cell",y.filteredValue&&y.filteredValue.length>0?"highlight":""]},[y.renderHeader?y.renderHeader({column:y,$index:_,store:h,_self:v}):y.label,y.sortable&&Ce("span",{onClick:b=>f(b,y),class:"caret-wrapper"},[Ce("i",{onClick:b=>f(b,y,"ascending"),class:"sort-caret ascending"}),Ce("i",{onClick:b=>f(b,y,"descending"),class:"sort-caret descending"})]),y.filterable&&Ce(pV,{store:h,placement:y.filterPlacement||"bottom-start",column:y,upDataColumn:(b,x)=>{y[b]=x}})])]))))))}});function wV(e){const t=Ee(Qn),r=B(""),n=B(Ce("div")),{nextZIndex:i}=Ay(),a=(h,v,p)=>{var g;const m=t,y=Qh(h);let _;const b=(g=m==null?void 0:m.vnode.el)==null?void 0:g.dataset.prefix;y&&(_=v1({columns:e.store.states.columns.value},y,b),_&&(m==null||m.emit(`cell-${p}`,v,_,y,h))),m==null||m.emit(`row-${p}`,v,_,h)},o=(h,v)=>{a(h,v,"dblclick")},s=(h,v)=>{e.store.commit("setCurrentRow",v),a(h,v,"click")},l=(h,v)=>{a(h,v,"contextmenu")},u=id(h=>{e.store.commit("setHoverRow",h)},30),c=id(()=>{e.store.commit("setHoverRow",null)},30);return{handleDoubleClick:o,handleClick:s,handleContextMenu:l,handleMouseEnter:u,handleMouseLeave:c,handleCellMouseEnter:(h,v,p)=>{var g;const m=t,y=Qh(h),_=(g=m==null?void 0:m.vnode.el)==null?void 0:g.dataset.prefix;if(y){const C=v1({columns:e.store.states.columns.value},y,_),M=m.hoverState={cell:y,column:C,row:v};m==null||m.emit("cell-mouse-enter",M.row,M.column,M.cell,h)}if(!p)return;const b=h.target.querySelector(".cell");if(!(Ol(b,`${_}-tooltip`)&&b.childNodes.length))return;const x=document.createRange();x.setStart(b,0),x.setEnd(b,b.childNodes.length);const w=Math.round(x.getBoundingClientRect().width),S=(Number.parseInt(Mb(b,"paddingLeft"),10)||0)+(Number.parseInt(Mb(b,"paddingRight"),10)||0);(w+S>b.offsetWidth||b.scrollWidth>b.offsetWidth)&&JW(t==null?void 0:t.refs.tableWrapper,y,y.innerText||y.textContent,i,p)},handleCellMouseLeave:h=>{if(!Qh(h))return;const p=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",p==null?void 0:p.row,p==null?void 0:p.column,p==null?void 0:p.cell,h)},tooltipContent:r,tooltipTrigger:n}}function xV(e){const t=Ee(Qn),r=Ne("table");return{getRowStyle:(u,c)=>{const f=t==null?void 0:t.props.rowStyle;return typeof f=="function"?f.call(null,{row:u,rowIndex:c}):f||null},getRowClass:(u,c)=>{const f=[r.e("row")];t!=null&&t.props.highlightCurrentRow&&u===e.store.states.currentRow.value&&f.push("current-row"),e.stripe&&c%2===1&&f.push(r.em("row","striped"));const d=t==null?void 0:t.props.rowClassName;return typeof d=="string"?f.push(d):typeof d=="function"&&f.push(d.call(null,{row:u,rowIndex:c})),f},getCellStyle:(u,c,f,d)=>{const h=t==null?void 0:t.props.cellStyle;let v=h??{};typeof h=="function"&&(v=h.call(null,{rowIndex:u,columnIndex:c,row:f,column:d}));const p=Fy(c,e==null?void 0:e.fixed,e.store);return Ts(p,"left"),Ts(p,"right"),Object.assign({},v,p)},getCellClass:(u,c,f,d,h)=>{const v=Ny(r.b(),c,e==null?void 0:e.fixed,e.store,void 0,h),p=[d.id,d.align,d.className,...v],g=t==null?void 0:t.props.cellClassName;return typeof g=="string"?p.push(g):typeof g=="function"&&p.push(g.call(null,{rowIndex:u,columnIndex:c,row:f,column:d})),p.push(r.e("cell")),p.filter(m=>Boolean(m)).join(" ")},getSpan:(u,c,f,d)=>{let h=1,v=1;const p=t==null?void 0:t.props.spanMethod;if(typeof p=="function"){const g=p({row:u,column:c,rowIndex:f,columnIndex:d});Array.isArray(g)?(h=g[0],v=g[1]):typeof g=="object"&&(h=g.rowspan,v=g.colspan)}return{rowspan:h,colspan:v}},getColspanRealWidth:(u,c,f)=>{if(c<1)return u[f].realWidth;const d=u.map(({realWidth:h,width:v})=>h||v).slice(f,f+c);return Number(d.reduce((h,v)=>Number(h)+Number(v),-1))}}}function SV(e){const t=Ee(Qn),r=Ne("table"),{handleDoubleClick:n,handleClick:i,handleContextMenu:a,handleMouseEnter:o,handleMouseLeave:s,handleCellMouseEnter:l,handleCellMouseLeave:u,tooltipContent:c,tooltipTrigger:f}=wV(e),{getRowStyle:d,getRowClass:h,getCellStyle:v,getCellClass:p,getSpan:g,getColspanRealWidth:m}=xV(e),y=k(()=>e.store.states.columns.value.findIndex(({type:S})=>S==="default")),_=(S,C)=>{const M=t.props.rowKey;return M?Yt(S,M):C},b=(S,C,M,P=!1)=>{const{tooltipEffect:A,tooltipOptions:T,store:D}=e,{indent:N,columns:H}=D.states,$=h(S,C);let G=!0;return M&&($.push(r.em("row",`level-${M.level}`)),G=M.display),Ce("tr",{style:[G?null:{display:"none"},d(S,C)],class:$,key:_(S,C),onDblclick:R=>n(R,S),onClick:R=>i(R,S),onContextmenu:R=>a(R,S),onMouseenter:()=>o(C),onMouseleave:s},H.value.map((R,j)=>{const{rowspan:re,colspan:oe}=g(S,R,C,j);if(!re||!oe)return null;const ye={...R};ye.realWidth=m(H.value,oe,j);const Ae={store:e.store,_self:e.context||t,column:ye,row:S,$index:C,cellIndex:j,expanded:P};j===y.value&&M&&(Ae.treeNode={indent:M.level*N.value,level:M.level},typeof M.expanded=="boolean"&&(Ae.treeNode.expanded=M.expanded,"loading"in M&&(Ae.treeNode.loading=M.loading),"noLazyChildren"in M&&(Ae.treeNode.noLazyChildren=M.noLazyChildren)));const V=`${C},${j}`,Q=ye.columnKey||ye.rawColumnKey||"",W=x(j,R,Ae),q=R.showOverflowTooltip&&aM({effect:A},T,R.showOverflowTooltip);return Ce("td",{style:v(C,j,S,R),class:p(C,j,S,R,oe-1),key:`${Q}${V}`,rowspan:re,colspan:oe,onMouseenter:le=>l(le,S,q),onMouseleave:u},[W])}))},x=(S,C,M)=>C.renderCell(M);return{wrappedRowRender:(S,C)=>{const M=e.store,{isRowExpanded:P,assertRowKey:A}=M,{treeData:T,lazyTreeNodeMap:D,childrenColumnName:N,rowKey:H}=M.states,$=M.states.columns.value;if($.some(({type:F})=>F==="expand")){const F=P(S),R=b(S,C,void 0,F),j=t.renderExpanded;return F?j?[[R,Ce("tr",{key:`expanded-row__${R.key}`},[Ce("td",{colspan:$.length,class:`${r.e("cell")} ${r.e("expanded-cell")}`},[j({row:S,$index:C,store:M,expanded:F})])])]]:(console.error("[Element Error]renderExpanded is required."),R):[[R]]}else if(Object.keys(T.value).length){A();const F=Yt(S,H.value);let R=T.value[F],j=null;R&&(j={expanded:R.expanded,level:R.level,display:!0},typeof R.lazy=="boolean"&&(typeof R.loaded=="boolean"&&R.loaded&&(j.noLazyChildren=!(R.children&&R.children.length)),j.loading=R.loading));const re=[b(S,C,j)];if(R){let oe=0;const ye=(V,Q)=>{V&&V.length&&Q&&V.forEach(W=>{const q={display:Q.display&&Q.expanded,level:Q.level+1,expanded:!1,noLazyChildren:!1,loading:!1},le=Yt(W,H.value);if(le==null)throw new Error("For nested data item, row-key is required.");if(R={...T.value[le]},R&&(q.expanded=R.expanded,R.level=R.level||q.level,R.display=!!(R.expanded&&q.display),typeof R.lazy=="boolean"&&(typeof R.loaded=="boolean"&&R.loaded&&(q.noLazyChildren=!(R.children&&R.children.length)),q.loading=R.loading)),oe++,re.push(b(W,C+oe,q)),R){const de=D.value[le]||W[N.value];ye(de,R)}})};R.display=!0;const Ae=D.value[F]||S[N.value];ye(Ae,R)}return re}else return b(S,C,void 0)},tooltipContent:c,tooltipTrigger:f}}const CV={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var TV=ce({name:"ElTableBody",props:CV,setup(e){const t=ct(),r=Ee(Qn),n=Ne("table"),{wrappedRowRender:i,tooltipContent:a,tooltipTrigger:o}=SV(e),{onColumnsChange:s,onScrollableChange:l}=MA(r);return Se(e.store.states.hoverRow,(u,c)=>{if(!e.store.states.isComplex.value||!Nt)return;let f=window.requestAnimationFrame;f||(f=d=>window.setTimeout(d,16)),f(()=>{const d=t==null?void 0:t.vnode.el,h=Array.from((d==null?void 0:d.children)||[]).filter(g=>g==null?void 0:g.classList.contains(`${n.e("row")}`)),v=h[c],p=h[u];v&&ss(v,"hover-row"),p&&Zo(p,"hover-row")})}),ks(()=>{var u;(u=ui)==null||u()}),{ns:n,onColumnsChange:s,onScrollableChange:l,wrappedRowRender:i,tooltipContent:a,tooltipTrigger:o}},render(){const{wrappedRowRender:e,store:t}=this,r=t.states.data.value||[];return Ce("tbody",{},[r.reduce((n,i)=>n.concat(e(i,n.length)),[])])}});function By(e){const t=e.tableLayout==="auto";let r=e.columns||[];t&&r.every(i=>i.width===void 0)&&(r=[]);const n=i=>{const a={key:`${e.tableLayout}_${i.id}`,style:{},name:void 0};return t?a.style={width:`${i.width}px`}:a.name=i.id,a};return Ce("colgroup",{},r.map(i=>Ce("col",n(i))))}By.props=["columns","tableLayout"];function MV(){const e=Ee(Qn),t=e==null?void 0:e.store,r=k(()=>t.states.fixedLeafColumnsLength.value),n=k(()=>t.states.rightFixedColumns.value.length),i=k(()=>t.states.columns.value.length),a=k(()=>t.states.fixedColumns.value.length),o=k(()=>t.states.rightFixedColumns.value.length);return{leftFixedLeafCount:r,rightFixedLeafCount:n,columnsCount:i,leftFixedCount:a,rightFixedCount:o,columns:t.states.columns}}function AV(e){const{columns:t}=MV(),r=Ne("table");return{getCellClasses:(a,o)=>{const s=a[o],l=[r.e("cell"),s.id,s.align,s.labelClassName,...Ny(r.b(),o,s.fixed,e.store)];return s.className&&l.push(s.className),s.children||l.push(r.is("leaf")),l},getCellStyles:(a,o)=>{const s=Fy(o,a.fixed,e.store);return Ts(s,"left"),Ts(s,"right"),s},columns:t}}var EV=ce({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const{getCellClasses:t,getCellStyles:r,columns:n}=AV(e);return{ns:Ne("table"),getCellClasses:t,getCellStyles:r,columns:n}},render(){const{columns:e,getCellStyles:t,getCellClasses:r,summaryMethod:n,sumText:i,ns:a}=this,o=this.store.states.data.value;let s=[];return n?s=n({columns:e,data:o}):e.forEach((l,u)=>{if(u===0){s[u]=i;return}const c=o.map(v=>Number(v[l.property])),f=[];let d=!0;c.forEach(v=>{if(!Number.isNaN(+v)){d=!1;const p=`${v}`.split(".")[1];f.push(p?p.length:0)}});const h=Math.max.apply(null,f);d?s[u]="":s[u]=c.reduce((v,p)=>{const g=Number(p);return Number.isNaN(+g)?v:Number.parseFloat((v+p).toFixed(Math.min(h,20)))},0)}),Ce("table",{class:a.e("footer"),cellspacing:"0",cellpadding:"0",border:"0"},[By({columns:e}),Ce("tbody",[Ce("tr",{},[...e.map((l,u)=>Ce("td",{key:u,colspan:l.colSpan,rowspan:l.rowSpan,class:r(e,u),style:t(l,u)},[Ce("div",{class:["cell",l.labelClassName]},[s[u]])]))])])])}});function PV(e){return{setCurrentRow:c=>{e.commit("setCurrentRow",c)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(c,f)=>{e.toggleRowSelection(c,f,!1),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:c=>{e.clearFilter(c)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(c,f)=>{e.toggleRowExpansionAdapter(c,f)},clearSort:()=>{e.clearSort()},sort:(c,f)=>{e.commit("sort",{prop:c,order:f})}}}function LV(e,t,r,n){const i=B(!1),a=B(null),o=B(!1),s=F=>{o.value=F},l=B({width:null,height:null,headerHeight:null}),u=B(!1),c={display:"inline-block",verticalAlign:"middle"},f=B(),d=B(0),h=B(0),v=B(0),p=B(0);io(()=>{t.setHeight(e.height)}),io(()=>{t.setMaxHeight(e.maxHeight)}),Se(()=>[e.currentRowKey,r.states.rowKey],([F,R])=>{!E(R)||!E(F)||r.setCurrentRowKey(`${F}`)},{immediate:!0}),Se(()=>e.data,F=>{n.store.commit("setData",F)},{immediate:!0,deep:!0}),io(()=>{e.expandRowKeys&&r.setExpandRowKeysAdapter(e.expandRowKeys)});const g=()=>{n.store.commit("setHoverRow",null),n.hoverState&&(n.hoverState=null)},m=(F,R)=>{const{pixelX:j,pixelY:re}=R;Math.abs(j)>=Math.abs(re)&&(n.refs.bodyWrapper.scrollLeft+=R.pixelX/5)},y=k(()=>e.height||e.maxHeight||r.states.fixedColumns.value.length>0||r.states.rightFixedColumns.value.length>0),_=k(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),b=()=>{y.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(C)};wt(async()=>{await Ft(),r.updateColumns(),M(),requestAnimationFrame(b);const F=n.vnode.el,R=n.refs.headerWrapper;e.flexible&&F&&F.parentElement&&(F.parentElement.style.minWidth="0"),l.value={width:f.value=F.offsetWidth,height:F.offsetHeight,headerHeight:e.showHeader&&R?R.offsetHeight:null},r.states.columns.value.forEach(j=>{j.filteredValue&&j.filteredValue.length&&n.store.commit("filterChange",{column:j,values:j.filteredValue,silent:!0})}),n.$ready=!0});const x=(F,R)=>{if(!F)return;const j=Array.from(F.classList).filter(re=>!re.startsWith("is-scrolling-"));j.push(t.scrollX.value?R:"is-scrolling-none"),F.className=j.join(" ")},w=F=>{const{tableWrapper:R}=n.refs;x(R,F)},S=F=>{const{tableWrapper:R}=n.refs;return!!(R&&R.classList.contains(F))},C=function(){if(!n.refs.scrollBarRef)return;if(!t.scrollX.value){const V="is-scrolling-none";S(V)||w(V);return}const F=n.refs.scrollBarRef.wrapRef;if(!F)return;const{scrollLeft:R,offsetWidth:j,scrollWidth:re}=F,{headerWrapper:oe,footerWrapper:ye}=n.refs;oe&&(oe.scrollLeft=R),ye&&(ye.scrollLeft=R);const Ae=re-j-1;R>=Ae?w("is-scrolling-right"):w(R===0?"is-scrolling-left":"is-scrolling-middle")},M=()=>{n.refs.scrollBarRef&&(n.refs.scrollBarRef.wrapRef&&xn(n.refs.scrollBarRef.wrapRef,"scroll",C,{passive:!0}),e.fit?gs(n.vnode.el,P):xn(window,"resize",P),gs(n.refs.bodyWrapper,()=>{var F,R;P(),(R=(F=n.refs)==null?void 0:F.scrollBarRef)==null||R.update()}))},P=()=>{var F,R,j;const re=n.vnode.el;if(!n.$ready||!re)return;let oe=!1;const{width:ye,height:Ae,headerHeight:V}=l.value,Q=f.value=re.offsetWidth;ye!==Q&&(oe=!0);const W=re.offsetHeight;(e.height||y.value)&&Ae!==W&&(oe=!0);const q=e.tableLayout==="fixed"?n.refs.headerWrapper:(F=n.refs.tableHeaderRef)==null?void 0:F.$el;e.showHeader&&(q==null?void 0:q.offsetHeight)!==V&&(oe=!0),d.value=((R=n.refs.tableWrapper)==null?void 0:R.scrollHeight)||0,v.value=(q==null?void 0:q.scrollHeight)||0,p.value=((j=n.refs.footerWrapper)==null?void 0:j.offsetHeight)||0,h.value=d.value-v.value-p.value,oe&&(l.value={width:Q,height:W,headerHeight:e.showHeader&&(q==null?void 0:q.offsetHeight)||0},b())},A=ia(),T=k(()=>{const{bodyWidth:F,scrollY:R,gutterWidth:j}=t;return F.value?`${F.value-(R.value?j:0)}px`:""}),D=k(()=>e.maxHeight?"fixed":e.tableLayout),N=k(()=>{if(e.data&&e.data.length)return null;let F="100%";e.height&&h.value&&(F=`${h.value}px`);const R=f.value;return{width:R?`${R}px`:"",height:F}}),H=k(()=>e.height?{height:Number.isNaN(Number(e.height))?e.height:`${e.height}px`}:e.maxHeight?{maxHeight:Number.isNaN(Number(e.maxHeight))?e.maxHeight:`${e.maxHeight}px`}:{}),$=k(()=>{if(e.height)return{height:"100%"};if(e.maxHeight){if(Number.isNaN(Number(e.maxHeight)))return{maxHeight:`calc(${e.maxHeight} - ${v.value+p.value}px)`};{const F=e.maxHeight;if(d.value>=Number(F))return{maxHeight:`${d.value-v.value-p.value}px`}}}return{}});return{isHidden:i,renderExpanded:a,setDragVisible:s,isGroup:u,handleMouseLeave:g,handleHeaderFooterMousewheel:m,tableSize:A,emptyBlockStyle:N,handleFixedMousewheel:(F,R)=>{const j=n.refs.bodyWrapper;if(Math.abs(R.spinY)>0){const re=j.scrollTop;R.pixelY<0&&re!==0&&F.preventDefault(),R.pixelY>0&&j.scrollHeight-j.clientHeight>re&&F.preventDefault(),j.scrollTop+=Math.ceil(R.pixelY/5)}else j.scrollLeft+=Math.ceil(R.pixelX/5)},resizeProxyVisible:o,bodyWidth:T,resizeState:l,doLayout:b,tableBodyStyles:_,tableLayout:D,scrollbarViewStyle:c,tableInnerStyle:H,scrollbarStyle:$}}function DV(e){const t=B(),r=()=>{const i=e.vnode.el.querySelector(".hidden-columns"),a={childList:!0,subtree:!0},o=e.store.states.updateOrderFns;t.value=new MutationObserver(()=>{o.forEach(s=>s())}),t.value.observe(i,a)};wt(()=>{r()}),ks(()=>{var n;(n=t.value)==null||n.disconnect()})}var IV={data:{type:Array,default:()=>[]},size:Xu,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children"})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:{type:Boolean,default:!1},flexible:Boolean};const OV=()=>{const e=B(),t=(a,o)=>{const s=e.value;s&&s.scrollTo(a,o)},r=(a,o)=>{const s=e.value;s&&$t(o)&&["Top","Left"].includes(a)&&s[`setScroll${a}`](o)};return{scrollBarRef:e,scrollTo:t,setScrollTop:a=>r("Top",a),setScrollLeft:a=>r("Left",a)}};let RV=1;const kV=ce({name:"ElTable",directives:{Mousewheel:l8},components:{TableHeader:bV,TableBody:TV,TableFooter:EV,ElScrollbar:VM,hColgroup:By},props:IV,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t}=py(),r=Ne("table"),n=ct();At(Qn,n);const i=oV(n,e);n.store=i;const a=new lV({store:n.store,table:n,fit:e.fit,showHeader:e.showHeader});n.layout=a;const o=k(()=>(i.states.data.value||[]).length===0),{setCurrentRow:s,getSelectionRows:l,toggleRowSelection:u,clearSelection:c,clearFilter:f,toggleAllSelection:d,toggleRowExpansion:h,clearSort:v,sort:p}=PV(i),{isHidden:g,renderExpanded:m,setDragVisible:y,isGroup:_,handleMouseLeave:b,handleHeaderFooterMousewheel:x,tableSize:w,emptyBlockStyle:S,handleFixedMousewheel:C,resizeProxyVisible:M,bodyWidth:P,resizeState:A,doLayout:T,tableBodyStyles:D,tableLayout:N,scrollbarViewStyle:H,tableInnerStyle:$,scrollbarStyle:G}=LV(e,a,i,n),{scrollBarRef:F,scrollTo:R,setScrollLeft:j,setScrollTop:re}=OV(),oe=id(T,50),ye=`${r.namespace.value}-table_${RV++}`;n.tableId=ye,n.state={isGroup:_,resizeState:A,doLayout:T,debouncedUpdateLayout:oe};const Ae=k(()=>e.sumText||t("el.table.sumText")),V=k(()=>e.emptyText||t("el.table.emptyText"));return DV(n),{ns:r,layout:a,store:i,handleHeaderFooterMousewheel:x,handleMouseLeave:b,tableId:ye,tableSize:w,isHidden:g,isEmpty:o,renderExpanded:m,resizeProxyVisible:M,resizeState:A,isGroup:_,bodyWidth:P,tableBodyStyles:D,emptyBlockStyle:S,debouncedUpdateLayout:oe,handleFixedMousewheel:C,setCurrentRow:s,getSelectionRows:l,toggleRowSelection:u,clearSelection:c,clearFilter:f,toggleAllSelection:d,toggleRowExpansion:h,clearSort:v,doLayout:T,sort:p,t,setDragVisible:y,context:n,computedSumText:Ae,computedEmptyText:V,tableLayout:N,scrollbarViewStyle:H,tableInnerStyle:$,scrollbarStyle:G,scrollBarRef:F,scrollTo:R,setScrollLeft:j,setScrollTop:re}}}),NV=["data-prefix"],FV={ref:"hiddenColumns",class:"hidden-columns"};function BV(e,t,r,n,i,a){const o=_r("hColgroup"),s=_r("table-header"),l=_r("table-body"),u=_r("el-scrollbar"),c=_r("table-footer"),f=ZC("mousewheel");return Y(),me("div",{ref:"tableWrapper",class:ue([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:St(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[0]||(t[0]=(...d)=>e.handleMouseLeave&&e.handleMouseLeave(...d))},[ae("div",{class:ue(e.ns.e("inner-wrapper")),style:St(e.tableInnerStyle)},[ae("div",FV,[$e(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?nr((Y(),me("div",{key:0,ref:"headerWrapper",class:ue(e.ns.e("header-wrapper"))},[ae("table",{ref:"tableHeader",class:ue(e.ns.e("header")),style:St(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[ee(o,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),ee(s,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[f,e.handleHeaderFooterMousewheel]]):Fe("v-if",!0),ae("div",{ref:"bodyWrapper",class:ue(e.ns.e("body-wrapper"))},[ee(u,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn},{default:Z(()=>[ae("table",{ref:"tableBody",class:ue(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:St({width:e.bodyWidth,tableLayout:e.tableLayout})},[ee(o,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(Y(),_e(s,{key:0,ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])):Fe("v-if",!0),ee(l,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"])],6),e.isEmpty?(Y(),me("div",{key:0,ref:"emptyBlock",style:St(e.emptyBlockStyle),class:ue(e.ns.e("empty-block"))},[ae("span",{class:ue(e.ns.e("empty-text"))},[$e(e.$slots,"empty",{},()=>[Bt(Me(e.computedEmptyText),1)])],2)],6)):Fe("v-if",!0),e.$slots.append?(Y(),me("div",{key:1,ref:"appendWrapper",class:ue(e.ns.e("append-wrapper"))},[$e(e.$slots,"append")],2)):Fe("v-if",!0)]),_:3},8,["view-style","wrap-style","always"])],2),e.showSummary?nr((Y(),me("div",{key:1,ref:"footerWrapper",class:ue(e.ns.e("footer-wrapper"))},[ee(c,{border:e.border,"default-sort":e.defaultSort,store:e.store,style:St(e.tableBodyStyles),"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","style","sum-text","summary-method"])],2)),[[yi,!e.isEmpty],[f,e.handleHeaderFooterMousewheel]]):Fe("v-if",!0),e.border||e.isGroup?(Y(),me("div",{key:2,class:ue(e.ns.e("border-left-patch"))},null,2)):Fe("v-if",!0)],6),nr(ae("div",{ref:"resizeProxy",class:ue(e.ns.e("column-resize-proxy"))},null,2),[[yi,e.resizeProxyVisible]])],46,NV)}var $V=Ze(kV,[["render",BV],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]);const HV={selection:"table-column--selection",expand:"table__expand-column"},zV={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},WV=e=>HV[e]||"",VV={selection:{renderHeader({store:e}){function t(){return e.states.data.value&&e.states.data.value.length===0}return Ce(Cs,{disabled:t(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value})},renderCell({row:e,column:t,store:r,$index:n}){return Ce(Cs,{disabled:t.selectable?!t.selectable.call(null,e,n):!1,size:r.states.tableSize.value,onChange:()=>{r.commit("rowSelectedChanged",e)},onClick:i=>i.stopPropagation(),modelValue:r.isSelected(e)})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let r=t+1;const n=e.index;return typeof n=="number"?r=t+n:typeof n=="function"&&(r=n(t)),Ce("div",{},[r])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({row:e,store:t,expanded:r}){const{ns:n}=t,i=[n.e("expand-icon")];return r&&i.push(n.em("expand-icon","expanded")),Ce("div",{class:i,onClick:function(o){o.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[Ce(lr,null,{default:()=>[Ce(dy)]})]})},sortable:!1,resizable:!1}};function GV({row:e,column:t,$index:r}){var n;const i=t.property,a=i&&Sf(e,i).value;return t&&t.formatter?t.formatter(e,t,a,r):((n=a==null?void 0:a.toString)==null?void 0:n.call(a))||""}function UV({row:e,treeNode:t,store:r},n=!1){const{ns:i}=r;if(!t)return n?[Ce("span",{class:i.e("placeholder")})]:null;const a=[],o=function(s){s.stopPropagation(),!t.loading&&r.loadOrToggle(e)};if(t.indent&&a.push(Ce("span",{class:i.e("indent"),style:{"padding-left":`${t.indent}px`}})),typeof t.expanded=="boolean"&&!t.noLazyChildren){const s=[i.e("expand-icon"),t.expanded?i.em("expand-icon","expanded"):""];let l=dy;t.loading&&(l=hy),a.push(Ce("div",{class:s,onClick:o},{default:()=>[Ce(lr,{class:{[i.is("loading")]:t.loading}},{default:()=>[Ce(l)]})]}))}else a.push(Ce("span",{class:i.e("placeholder")}));return a}function m1(e,t){return e.reduce((r,n)=>(r[n]=n,r),t)}function jV(e,t){const r=ct();return{registerComplexWatchers:()=>{const a=["fixed"],o={realWidth:"width",realMinWidth:"minWidth"},s=m1(a,o);Object.keys(s).forEach(l=>{const u=o[l];We(t,u)&&Se(()=>t[u],c=>{let f=c;u==="width"&&l==="realWidth"&&(f=ky(c)),u==="minWidth"&&l==="realMinWidth"&&(f=wA(c)),r.columnConfig.value[u]=f,r.columnConfig.value[l]=f;const d=u==="fixed";e.value.store.scheduleLayout(d)})})},registerNormalWatchers:()=>{const a=["label","filters","filterMultiple","sortable","index","formatter","className","labelClassName","showOverflowTooltip"],o={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},s=m1(a,o);Object.keys(s).forEach(l=>{const u=o[l];We(t,u)&&Se(()=>t[u],c=>{r.columnConfig.value[l]=c})})}}}function YV(e,t,r){const n=ct(),i=B(""),a=B(!1),o=B(),s=B(),l=Ne("table");io(()=>{o.value=e.align?`is-${e.align}`:null,o.value}),io(()=>{s.value=e.headerAlign?`is-${e.headerAlign}`:o.value,s.value});const u=k(()=>{let b=n.vnode.vParent||n.parent;for(;b&&!b.tableId&&!b.columnId;)b=b.vnode.vParent||b.parent;return b}),c=k(()=>{const{store:b}=n.parent;if(!b)return!1;const{treeData:x}=b.states,w=x.value;return w&&Object.keys(w).length>0}),f=B(ky(e.width)),d=B(wA(e.minWidth)),h=b=>(f.value&&(b.width=f.value),d.value&&(b.minWidth=d.value),!f.value&&d.value&&(b.width=void 0),b.minWidth||(b.minWidth=80),b.realWidth=Number(b.width===void 0?b.minWidth:b.width),b),v=b=>{const x=b.type,w=VV[x]||{};Object.keys(w).forEach(C=>{const M=w[C];C!=="className"&&M!==void 0&&(b[C]=M)});const S=WV(x);if(S){const C=`${E(l.namespace)}-${S}`;b.className=b.className?`${b.className} ${C}`:C}return b},p=b=>{Array.isArray(b)?b.forEach(w=>x(w)):x(b);function x(w){var S;((S=w==null?void 0:w.type)==null?void 0:S.name)==="ElTableColumn"&&(w.vParent=n)}};return{columnId:i,realAlign:o,isSubColumn:a,realHeaderAlign:s,columnOrTableParent:u,setColumnWidth:h,setColumnForcedProps:v,setColumnRenders:b=>{e.renderHeader||b.type!=="selection"&&(b.renderHeader=w=>{n.columnConfig.value.label;const S=t.header;return S?S(w):b.label});let x=b.renderCell;return b.type==="expand"?(b.renderCell=w=>Ce("div",{class:"cell"},[x(w)]),r.value.renderExpanded=w=>t.default?t.default(w):t.default):(x=x||GV,b.renderCell=w=>{let S=null;if(t.default){const D=t.default(w);S=D.some(N=>N.type!==xr)?D:x(w)}else S=x(w);const{columns:C}=r.value.store.states,M=C.value.findIndex(D=>D.type==="default"),P=c.value&&w.cellIndex===M,A=UV(w,P),T={class:"cell",style:{}};return b.showOverflowTooltip&&(T.class=`${T.class} ${E(l.namespace)}-tooltip`,T.style={width:`${(w.column.realWidth||Number(w.column.width))-1}px`}),p(S),Ce("div",T,[A,S])}),b},getPropsData:(...b)=>b.reduce((x,w)=>(Array.isArray(w)&&w.forEach(S=>{x[S]=e[S]}),x),{}),getColumnElIndex:(b,x)=>Array.prototype.indexOf.call(b,x),updateColumnOrder:()=>{r.value.store.commit("updateColumnOrder",n.columnConfig.value)}}}var qV={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:[Boolean,Object],fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}};let KV=1;var EA=ce({name:"ElTableColumn",components:{ElCheckbox:Cs},props:qV,setup(e,{slots:t}){const r=ct(),n=B({}),i=k(()=>{let _=r.parent;for(;_&&!_.tableId;)_=_.parent;return _}),{registerNormalWatchers:a,registerComplexWatchers:o}=jV(i,e),{columnId:s,isSubColumn:l,realHeaderAlign:u,columnOrTableParent:c,setColumnWidth:f,setColumnForcedProps:d,setColumnRenders:h,getPropsData:v,getColumnElIndex:p,realAlign:g,updateColumnOrder:m}=YV(e,t,i),y=c.value;s.value=`${y.tableId||y.columnId}_column_${KV++}`,Gd(()=>{l.value=i.value!==y;const _=e.type||"default",b=e.sortable===""?!0:e.sortable,x={...zV[_],id:s.value,type:_,property:e.prop||e.property,align:g,headerAlign:u,showOverflowTooltip:e.showOverflowTooltip,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:b,index:e.index,rawColumnKey:r.vnode.key};let P=v(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement"]);P=KW(x,P),P=ZW(h,f,d)(P),n.value=P,a(),o()}),wt(()=>{var _;const b=c.value,x=l.value?b.vnode.el.children:(_=b.refs.hiddenColumns)==null?void 0:_.children,w=()=>p(x||[],r.vnode.el);n.value.getColumnIndex=w,w()>-1&&i.value.store.commit("insertColumn",n.value,l.value?b.columnConfig.value:null,m)}),Xt(()=>{i.value.store.commit("removeColumn",n.value,l.value?y.columnConfig.value:null,m)}),r.columnId=s.value,r.columnConfig=n},render(){var e,t,r;try{const n=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),i=[];if(Array.isArray(n))for(const o of n)((r=o.type)==null?void 0:r.name)==="ElTableColumn"||o.shapeFlag&2?i.push(o):o.type===pt&&Array.isArray(o.children)&&o.children.forEach(s=>{(s==null?void 0:s.patchFlag)!==1024&&!He(s==null?void 0:s.children)&&i.push(s)});return Ce("div",i)}catch{return Ce("div",[])}}});const XV=hr($V,{TableColumn:EA}),ZV=fa(EA),PA=["success","info","warning","error"],mr=Ya({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:Nt?document.body:void 0}),QV=tt({customClass:{type:String,default:mr.customClass},center:{type:Boolean,default:mr.center},dangerouslyUseHTMLString:{type:Boolean,default:mr.dangerouslyUseHTMLString},duration:{type:Number,default:mr.duration},icon:{type:Wn,default:mr.icon},id:{type:String,default:mr.id},message:{type:Le([String,Object,Function]),default:mr.message},onClose:{type:Le(Function),required:!1},showClose:{type:Boolean,default:mr.showClose},type:{type:String,values:PA,default:mr.type},offset:{type:Number,default:mr.offset},zIndex:{type:Number,default:mr.zIndex},grouping:{type:Boolean,default:mr.grouping},repeatNum:{type:Number,default:mr.repeatNum}}),JV={destroy:()=>!0},Sn=LC([]),eG=e=>{const t=Sn.findIndex(i=>i.id===e),r=Sn[t];let n;return t>0&&(n=Sn[t-1]),{current:r,prev:n}},tG=e=>{const{prev:t}=eG(e);return t?t.vm.exposed.bottom.value:0},rG=(e,t)=>Sn.findIndex(n=>n.id===e)>0?20:t,nG=["id"],iG=["innerHTML"],aG=ce({name:"ElMessage"}),oG=ce({...aG,props:QV,emits:JV,setup(e,{expose:t}){const r=e,{Close:n}=B3,{ns:i,zIndex:a}=sH("message"),{currentZIndex:o,nextZIndex:s}=a,l=B(),u=B(!1),c=B(0);let f;const d=k(()=>r.type?r.type==="error"?"danger":r.type:"info"),h=k(()=>{const S=r.type;return{[i.bm("icon",S)]:S&&Ab[S]}}),v=k(()=>r.icon||Ab[r.type]||""),p=k(()=>tG(r.id)),g=k(()=>rG(r.id,r.offset)+p.value),m=k(()=>c.value+g.value),y=k(()=>({top:`${g.value}px`,zIndex:o.value}));function _(){r.duration!==0&&({stop:f}=kp(()=>{x()},r.duration))}function b(){f==null||f()}function x(){u.value=!1}function w({code:S}){S===Ot.esc&&x()}return wt(()=>{_(),s(),u.value=!0}),Se(()=>r.repeatNum,()=>{b(),_()}),xn(document,"keydown",w),gs(l,()=>{c.value=l.value.getBoundingClientRect().height}),t({visible:u,bottom:m,close:x}),(S,C)=>(Y(),_e(Ci,{name:E(i).b("fade"),onBeforeLeave:S.onClose,onAfterLeave:C[0]||(C[0]=M=>S.$emit("destroy")),persisted:""},{default:Z(()=>[nr(ae("div",{id:S.id,ref_key:"messageRef",ref:l,class:ue([E(i).b(),{[E(i).m(S.type)]:S.type&&!S.icon},E(i).is("center",S.center),E(i).is("closable",S.showClose),S.customClass]),style:St(E(y)),role:"alert",onMouseenter:b,onMouseleave:_},[S.repeatNum>1?(Y(),_e(E(E6),{key:0,value:S.repeatNum,type:E(d),class:ue(E(i).e("badge"))},null,8,["value","type","class"])):Fe("v-if",!0),E(v)?(Y(),_e(E(lr),{key:1,class:ue([E(i).e("icon"),E(h)])},{default:Z(()=>[(Y(),_e(nn(E(v))))]),_:1},8,["class"])):Fe("v-if",!0),$e(S.$slots,"default",{},()=>[S.dangerouslyUseHTMLString?(Y(),me(pt,{key:1},[Fe(" Caution here, message could've been compromised, never use user's input as message "),ae("p",{class:ue(E(i).e("content")),innerHTML:S.message},null,10,iG)],2112)):(Y(),me("p",{key:0,class:ue(E(i).e("content"))},Me(S.message),3))]),S.showClose?(Y(),_e(E(lr),{key:2,class:ue(E(i).e("closeBtn")),onClick:Jf(x,["stop"])},{default:Z(()=>[ee(E(n))]),_:1},8,["class","onClick"])):Fe("v-if",!0)],46,nG),[[yi,u.value]])]),_:3},8,["name","onBeforeLeave"]))}});var sG=Ze(oG,[["__file","/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);let lG=1;const LA=e=>{const t=!e||He(e)||ta(e)||De(e)?{message:e}:e,r={...mr,...t};if(!r.appendTo)r.appendTo=document.body;else if(He(r.appendTo)){let n=document.querySelector(r.appendTo);ys(n)||(n=document.body),r.appendTo=n}return r},uG=e=>{const t=Sn.indexOf(e);if(t===-1)return;Sn.splice(t,1);const{handler:r}=e;r.close()},cG=({appendTo:e,...t},r)=>{const n=`message_${lG++}`,i=t.onClose,a=document.createElement("div"),o={...t,id:n,onClose:()=>{i==null||i(),uG(c)},onDestroy:()=>{O_(null,a)}},s=ee(sG,o,De(o.message)||ta(o.message)?{default:De(o.message)?o.message:()=>o.message}:null);s.appContext=r||Ms._context,O_(s,a),e.appendChild(a.firstElementChild);const l=s.component,c={id:n,vnode:s,vm:l,handler:{close:()=>{l.exposed.visible.value=!1}},props:s.component.props};return c},Ms=(e={},t)=>{if(!Nt)return{close:()=>{}};if($t(Qp.max)&&Sn.length>=Qp.max)return{close:()=>{}};const r=LA(e);if(r.grouping&&Sn.length){const i=Sn.find(({vnode:a})=>{var o;return((o=a.props)==null?void 0:o.message)===r.message});if(i)return i.props.repeatNum+=1,i.props.type=r.type,i.handler}const n=cG(r,t);return Sn.push(n),n.handler};PA.forEach(e=>{Ms[e]=(t={},r)=>{const n=LA(t);return Ms({...n,type:e},r)}});function fG(e){for(const t of Sn)(!e||e===t.props.type)&&t.handler.close()}Ms.closeAll=fG;Ms._context=null;const DA=$3(Ms,"$message"),dG={id:"app"},hG={class:"grid-content header-color"},vG={class:"header-content"},pG=ae("div",{class:"brand"},[ae("a",{href:"#"},"frp")],-1),gG={class:"dark-switch"},mG=ae("span",null,"Proxies",-1),yG={id:"content"},_G=ae("footer",null,null,-1),bG=ce({__name:"App",setup(e){const t=NR(),r=B(t),n=nR(t),i=a=>{a==""&&window.open("https://github.com/fatedier/frp")};return(a,o)=>{const s=VW,l=wW,u=xW,c=bW,f=pA,d=_r("router-view"),h=vA;return Y(),me("div",dG,[ae("header",hG,[ae("div",vG,[pG,ae("div",gG,[ee(s,{modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=v=>r.value=v),"inline-prompt":"","active-text":"Dark","inactive-text":"Light",onChange:E(n),style:{"--el-switch-on-color":"#444452","--el-switch-off-color":"#589ef8"}},null,8,["modelValue","onChange"])])])]),ae("section",null,[ee(h,null,{default:Z(()=>[ee(f,{id:"side-nav",xs:24,md:4},{default:Z(()=>[ee(c,{"default-active":"/",mode:"vertical",theme:"light",router:"false",onSelect:i},{default:Z(()=>[ee(l,{index:"/"},{default:Z(()=>[Bt("Overview")]),_:1}),ee(u,{index:"/proxies"},{title:Z(()=>[mG]),default:Z(()=>[ee(l,{index:"/proxies/tcp"},{default:Z(()=>[Bt("TCP")]),_:1}),ee(l,{index:"/proxies/udp"},{default:Z(()=>[Bt("UDP")]),_:1}),ee(l,{index:"/proxies/http"},{default:Z(()=>[Bt("HTTP")]),_:1}),ee(l,{index:"/proxies/https"},{default:Z(()=>[Bt("HTTPS")]),_:1}),ee(l,{index:"/proxies/stcp"},{default:Z(()=>[Bt("STCP")]),_:1}),ee(l,{index:"/proxies/sudp"},{default:Z(()=>[Bt("SUDP")]),_:1})]),_:1}),ee(l,{index:""},{default:Z(()=>[Bt("Help")]),_:1})]),_:1})]),_:1}),ee(f,{xs:24,md:20},{default:Z(()=>[ae("div",yG,[ee(d)])]),_:1})]),_:1})]),_G])}}});/*! * vue-router v4.1.6 * (c) 2022 Eduardo San Martin Morote * @license MIT @@ -46,7 +46,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var bg=function(e,t){return bg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},bg(e,t)};function pe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");bg(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var MU=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),AU=function(){function e(){this.browser=new MU,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return e}(),Va=new AU;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Va.wxa=!0,Va.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Va.worker=!0:typeof navigator>"u"?(Va.node=!0,Va.svgSupported=!0):EU(navigator.userAgent,Va);function EU(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}const Ge=Va;var zy=12,PU="sans-serif",yo=zy+"px "+PU,LU=20,DU=100,IU="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function OU(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return r}function a9(e,t,r){for(var n=r?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),f=2*u,d=c.left,h=c.top;o.push(d,h),l=l&&a&&d===a[f]&&h===a[f+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=r?F1(s,o):F1(o,s))}function XA(e){return e.nodeName.toUpperCase()==="CANVAS"}var o9=/([&<>"'])/g,s9={"&":"&","<":"<",">":">",'"':""","'":"'"};function Xr(e){return e==null?"":(e+"").replace(o9,function(t,r){return s9[r]})}var l9=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,av=[],u9=Ge.browser.firefox&&+Ge.browser.version.split(".")[0]<39;function Ag(e,t,r,n){return r=r||{},n?$1(e,t,r):u9&&t.layerX!=null&&t.layerX!==t.offsetX?(r.zrX=t.layerX,r.zrY=t.layerY):t.offsetX!=null?(r.zrX=t.offsetX,r.zrY=t.offsetY):$1(e,t,r),r}function $1(e,t,r){if(Ge.domSupported&&e.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(XA(e)){var a=e.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(Mg(av,e,n,i)){r.zrX=av[0],r.zrY=av[1];return}}r.zrX=r.zrY=0}function jy(e){return e||window.event}function jr(e,t,r){if(t=jy(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Ag(e,o,t,r)}else{Ag(e,t,t,r);var a=c9(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&l9.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function c9(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,n=e.deltaY;if(r==null||n==null)return t;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function f9(e,t,r,n){e.addEventListener(t,r,n)}function d9(e,t,r,n){e.removeEventListener(t,r,n)}var ZA=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},h9=function(){function e(){this._track=[]}return e.prototype.recognize=function(t,r,n){return this._doTrack(t,r,n),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,r,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:r,event:t},o=0,s=i.length;o1&&n&&n.length>1){var a=H1(n)/H1(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=v9(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function Su(){return[1,0,0,1,0,0]}function Yy(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function p9(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function us(e,t,r){var n=t[0]*r[0]+t[2]*r[1],i=t[1]*r[0]+t[3]*r[1],a=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],l=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e}function Eg(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function qy(e,t,r){var n=t[0],i=t[2],a=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(r),c=Math.cos(r);return e[0]=n*c+o*u,e[1]=-n*u+o*c,e[2]=i*c+s*u,e[3]=-i*u+c*s,e[4]=c*a+u*l,e[5]=c*l-u*a,e}function g9(e,t,r){var n=r[0],i=r[1];return e[0]=t[0]*n,e[1]=t[1]*i,e[2]=t[2]*n,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*i,e}function lh(e,t){var r=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=r*o-a*n;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-n*l,e[3]=r*l,e[4]=(n*s-o*i)*l,e[5]=(a*i-r*s)*l,e):null}var m9=function(){function e(t,r){this.x=t||0,this.y=r||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,r){return this.x=t,this.y=r,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,r){this.x+=t.x*r,this.y+=t.y*r},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var r=this.x-t.x,n=this.y-t.y;return Math.sqrt(r*r+n*n)},e.prototype.distanceSquare=function(t){var r=this.x-t.x,n=this.y-t.y;return r*r+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var r=this.x,n=this.y;return this.x=t[0]*r+t[2]*n+t[4],this.y=t[1]*r+t[3]*n+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,r,n){t.x=r,t.y=n},e.copy=function(t,r){t.x=r.x,t.y=r.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,r){return t.x*r.x+t.y*r.y},e.add=function(t,r,n){t.x=r.x+n.x,t.y=r.y+n.y},e.sub=function(t,r,n){t.x=r.x-n.x,t.y=r.y-n.y},e.scale=function(t,r,n){t.x=r.x*n,t.y=r.y*n},e.scaleAndAdd=function(t,r,n,i){t.x=r.x+n.x*i,t.y=r.y+n.y*i},e.lerp=function(t,r,n,i){var a=1-i;t.x=a*r.x+i*n.x,t.y=a*r.y+i*n.y},e}();const Ne=m9;var Ec=Math.min,Pc=Math.max,ma=new Ne,ya=new Ne,_a=new Ne,ba=new Ne,Qs=new Ne,Js=new Ne,y9=function(){function e(t,r,n,i){n<0&&(t=t+n,n=-n),i<0&&(r=r+i,i=-i),this.x=t,this.y=r,this.width=n,this.height=i}return e.prototype.union=function(t){var r=Ec(t.x,this.x),n=Ec(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Pc(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Pc(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=r,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var r=this,n=t.width/r.width,i=t.height/r.height,a=Su();return Eg(a,a,[-r.x,-r.y]),g9(a,a,[n,i]),Eg(a,a,[t.x,t.y]),a},e.prototype.intersect=function(t,r){if(!t)return!1;t instanceof e||(t=e.create(t));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=t.x,u=t.x+t.width,c=t.y,f=t.y+t.height,d=!(av&&(v=_,pv&&(v=b,m=n.x&&t<=n.x+n.width&&r>=n.y&&r<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(t,r){t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height},e.applyTransform=function(t,r,n){if(!n){t!==r&&e.copy(t,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=r.x*i+o,t.y=r.y*a+s,t.width=r.width*i,t.height=r.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}ma.x=_a.x=r.x,ma.y=ba.y=r.y,ya.x=ba.x=r.x+r.width,ya.y=_a.y=r.y+r.height,ma.transform(n),ba.transform(n),ya.transform(n),_a.transform(n),t.x=Ec(ma.x,ya.x,_a.x,ba.x),t.y=Ec(ma.y,ya.y,_a.y,ba.y);var l=Pc(ma.x,ya.x,_a.x,ba.x),u=Pc(ma.y,ya.y,_a.y,ba.y);t.width=l-t.x,t.height=u-t.y},e}();const et=y9;var QA="silent";function _9(e,t,r){return{type:e,event:r,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:b9}}function b9(){ZA(this.event)}var w9=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.handler=null,r}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(ei),el=function(){function e(t,r){this.x=t,this.y=r}return e}(),x9=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],sv=new et(0,0,0,0),JA=function(e){pe(t,e);function t(r,n,i,a,o){var s=e.call(this)||this;return s._hovered=new el(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new w9,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new e9(s),s}return t.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(O(x9,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},t.prototype.mousemove=function(r){var n=r.zrX,i=r.zrY,a=e2(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new el(n,i):this.findHover(n,i),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),u&&u!==s&&this.dispatchToElement(l,"mouseover",r)},t.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},t.prototype.resize=function(){this._hovered=new el(0,0)},t.prototype.dispatch=function(r,n){var i=this[r];i&&i.call(this,n)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},t.prototype.dispatchToElement=function(r,n,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=_9(n,r,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},t.prototype.findHover=function(r,n,i){var a=this.storage.getDisplayList(),o=new el(r,n);if(z1(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new et(r-u,n-u,l,l),f=a.length-1;f>=0;f--){var d=a[f];d!==i&&!d.ignore&&!d.ignoreCoarsePointer&&(!d.parent||!d.parent.ignoreCoarsePointer)&&(sv.copy(d.getBoundingRect()),d.transform&&sv.applyTransform(d.transform),sv.intersect(c)&&s.push(d))}if(s.length)for(var h=4,v=Math.PI/12,p=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function S9(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var n=e,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,r))return!1;n.silent&&(i=!0)}var s=n.__hostTarget;n=s||n.parent}return i?QA:!0}return!1}function z1(e,t,r,n,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=S9(o,r,n))&&(!t.topTarget&&(t.topTarget=o),s!==QA)){t.target=o;break}}}function e2(e,t,r){var n=e.painter;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}const C9=JA;var t2=32,tl=7;function T9(e){for(var t=0;e>=t2;)t|=e&1,e>>=1;return e+t}function W1(e,t,r,n){var i=t+1;if(i===r)return 1;if(n(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function M9(e,t,r){for(r--;t>>1,i(a,e[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;u>0;)e[o+u]=e[o+u-1],u--}e[o]=a}}function lv(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(e,t[r+c])>0?o=c+1:l=c}return l}function uv(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(e,t[r+c])<0?l=c:o=c+1}return l}function A9(e,t){var r=tl,n,i,a=0;e.length;var o=[];n=[],i=[];function s(h,v){n[a]=h,i[a]=v,a+=1}function l(){for(;a>1;){var h=a-2;if(h>=1&&i[h-1]<=i[h]+i[h+1]||h>=2&&i[h-2]<=i[h]+i[h-1])i[h-1]i[h+1])break;c(h)}}function u(){for(;a>1;){var h=a-2;h>0&&i[h-1]=tl||S>=tl);if(C)break;x<0&&(x=0),x+=2}if(r=x,r<1&&(r=1),v===1){for(m=0;m=0;m--)e[w+m]=e[x+m];e[b]=o[_];return}for(var S=r;;){var C=0,M=0,P=!1;do if(t(o[_],e[y])<0){if(e[b--]=e[y--],C++,M=0,--v===0){P=!0;break}}else if(e[b--]=o[_--],M++,C=0,--g===1){P=!0;break}while((C|M)=0;m--)e[w+m]=e[x+m];if(v===0){P=!0;break}}if(e[b--]=o[_--],--g===1){P=!0;break}if(M=g-lv(e[y],o,0,g,g-1,t),M!==0){for(b-=M,_-=M,g-=M,w=b+1,x=_+1,m=0;m=tl||M>=tl);if(P)break;S<0&&(S=0),S+=2}if(r=S,r<1&&(r=1),g===1){for(b-=v,y-=v,w=b+1,x=y+1,m=v-1;m>=0;m--)e[w+m]=e[x+m];e[b]=o[_]}else{if(g===0)throw new Error;for(x=b-(g-1),m=0;ms&&(l=s),V1(e,r,r+l,r+a,t),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var Rr=1,wl=2,Ko=4,G1=!1;function cv(){G1||(G1=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function U1(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var E9=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=U1}return e.prototype.traverse=function(t,r){for(var n=0;n0&&(c.__clipPaths=[]),isNaN(c.z)&&(cv(),c.z=0),isNaN(c.z2)&&(cv(),c.z2=0),isNaN(c.zlevel)&&(cv(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var f=t.getDecalElement&&t.getDecalElement();f&&this._updateAndAddDisplayable(f,r,n);var d=t.getTextGuideLine();d&&this._updateAndAddDisplayable(d,r,n);var h=t.getTextContent();h&&this._updateAndAddDisplayable(h,r,n)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var r=0,n=t.length;r=0&&this._roots.splice(i,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}();const P9=E9;var r2;r2=Ge.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};const Pg=r2;var Of={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)))},elasticOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},elasticInOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Of.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Of.bounceIn(e*2)*.5:Of.bounceOut(e*2-1)*.5+.5}};const n2=Of;var Lc=Math.pow,Qi=Math.sqrt,fd=1e-8,i2=1e-4,j1=Qi(3),Dc=1/3,Hn=Hs(),Zr=Hs(),cs=Hs();function Yi(e){return e>-fd&&efd||e<-fd}function jt(e,t,r,n,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*n+3*a*r)}function Y1(e,t,r,n,i){var a=1-i;return 3*(((t-e)*a+2*(r-t)*i)*a+(n-r)*i*i)}function o2(e,t,r,n,i,a){var o=n+3*(t-r)-e,s=3*(r-t*2+e),l=3*(t-e),u=e-i,c=s*s-3*o*l,f=s*l-9*o*u,d=l*l-3*s*u,h=0;if(Yi(c)&&Yi(f))if(Yi(s))a[0]=0;else{var v=-l/s;v>=0&&v<=1&&(a[h++]=v)}else{var p=f*f-4*c*d;if(Yi(p)){var g=f/c,v=-s/o+g,m=-g/2;v>=0&&v<=1&&(a[h++]=v),m>=0&&m<=1&&(a[h++]=m)}else if(p>0){var y=Qi(p),_=c*s+1.5*o*(-f+y),b=c*s+1.5*o*(-f-y);_<0?_=-Lc(-_,Dc):_=Lc(_,Dc),b<0?b=-Lc(-b,Dc):b=Lc(b,Dc);var v=(-s-(_+b))/(3*o);v>=0&&v<=1&&(a[h++]=v)}else{var x=(2*c*s-3*o*f)/(2*Qi(c*c*c)),w=Math.acos(x)/3,S=Qi(c),C=Math.cos(w),v=(-s-2*S*C)/(3*o),m=(-s+S*(C+j1*Math.sin(w)))/(3*o),M=(-s+S*(C-j1*Math.sin(w)))/(3*o);v>=0&&v<=1&&(a[h++]=v),m>=0&&m<=1&&(a[h++]=m),M>=0&&M<=1&&(a[h++]=M)}}return h}function s2(e,t,r,n,i){var a=6*r-12*t+6*e,o=9*t+3*n-3*e-9*r,s=3*t-3*e,l=0;if(Yi(o)){if(a2(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Yi(c))i[0]=-a/(2*o);else if(c>0){var f=Qi(c),u=(-a+f)/(2*o),d=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),d>=0&&d<=1&&(i[l++]=d)}}return l}function dd(e,t,r,n,i,a){var o=(t-e)*i+e,s=(r-t)*i+t,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=e,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function l2(e,t,r,n,i,a,o,s,l,u,c){var f,d=.005,h=1/0,v,p,g,m;Hn[0]=l,Hn[1]=u;for(var y=0;y<1;y+=.05)Zr[0]=jt(e,r,i,o,y),Zr[1]=jt(t,n,a,s,y),g=ls(Hn,Zr),g=0&&g=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Yi(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=Qi(c),u=(-o+f)/(2*a),d=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),d>=0&&d<=1&&(i[l++]=d)}}return l}function u2(e,t,r){var n=e+r-2*t;return n===0?.5:(e-t)/n}function hd(e,t,r,n,i){var a=(t-e)*n+e,o=(r-t)*n+t,s=(o-a)*n+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function c2(e,t,r,n,i,a,o,s,l){var u,c=.005,f=1/0;Hn[0]=o,Hn[1]=s;for(var d=0;d<1;d+=.05){Zr[0]=Jt(e,r,i,d),Zr[1]=Jt(t,n,a,d);var h=ls(Hn,Zr);h=0&&h=1?1:o2(0,n,a,1,l,s)&&jt(0,i,o,1,s[0])}}}var R9=function(){function e(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Tr,this.ondestroy=t.ondestroy||Tr,this.onrestart=t.onrestart||Tr,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,r){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Ve(t)?t:n2[t]||f2(t)},e}();const k9=R9;var d2=function(){function e(t){this.value=t}return e}(),N9=function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new d2(t);return this.insertEntry(r),r},e.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},e.prototype.remove=function(t){var r=t.prev,n=t.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),F9=function(){function e(t){this._list=new N9,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new d2(r),s.key=t,n.insertEntry(s),i[t]=s}return a},e.prototype.get=function(t){var r=this._map[t],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}();const tc=F9;var K1={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 Vl(e){return e=Math.round(e),e<0?0:e>255?255:e}function X1(e){return e<0?0:e>1?1:e}function fv(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Vl(parseFloat(t)/100*255):Vl(parseInt(t,10))}function Gl(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?X1(parseFloat(t)/100):X1(parseFloat(t))}function dv(e,t,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?e+(t-e)*r*6:r*2<1?t:r*3<2?e+(t-e)*(2/3-r)*6:e}function Ur(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function Lg(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var h2=new tc(20),Ic=null;function Ro(e,t){Ic&&Lg(Ic,t),Ic=h2.put(e,Ic||t.slice())}function so(e,t){if(e){t=t||[];var r=h2.get(e);if(r)return Lg(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in K1)return Lg(t,K1[n]),Ro(e,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Ur(t,0,0,0,1);return}return Ur(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Ro(e,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Ur(t,0,0,0,1);return}return Ur(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Ro(e,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Ur(t,+u[0],+u[1],+u[2],1):Ur(t,0,0,0,1);c=Gl(u.pop());case"rgb":if(u.length>=3)return Ur(t,fv(u[0]),fv(u[1]),fv(u[2]),u.length===3?c:Gl(u[3])),Ro(e,t),t;Ur(t,0,0,0,1);return;case"hsla":if(u.length!==4){Ur(t,0,0,0,1);return}return u[3]=Gl(u[3]),Z1(u,t),Ro(e,t),t;case"hsl":if(u.length!==3){Ur(t,0,0,0,1);return}return Z1(u,t),Ro(e,t),t;default:return}}Ur(t,0,0,0,1)}}function Z1(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=Gl(e[1]),i=Gl(e[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],Ur(t,Vl(dv(o,a,r+1/3)*255),Vl(dv(o,a,r)*255),Vl(dv(o,a,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Q1(e,t){var r=so(e);if(r){for(var n=0;n<3;n++)t<0?r[n]=r[n]*(1-t)|0:r[n]=(255-r[n])*t+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return Ky(r,r.length===4?"rgba":"rgb")}}function Ky(e,t){if(!(!e||!e.length)){var r=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(r+=","+e[3]),t+"("+r+")"}}function vd(e,t){var r=so(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}function B9(e){return e.type==="linear"}function $9(e){return e.type==="radial"}(function(){return Ge.hasGlobalWindow&&Ve(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}})();var Dg=Array.prototype.slice;function di(e,t,r){return(t-e)*r+e}function hv(e,t,r,n){for(var i=t.length,a=0;an?t:e,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=ew,l=r;if(Er(r)){var u=V9(r);s=u,(u===1&&!bt(r[0])||u===2&&!bt(r[0][0]))&&(o=!0)}else if(bt(r)&&!cd(r))s=Rc;else if(Me(r))if(!isNaN(+r))s=Rc;else{var c=so(r);c&&(l=c,s=xl)}else if(oh(r)){var f=se({},l);f.colorStops=Re(r.colorStops,function(h){return{offset:h.offset,color:so(h.color)}}),B9(r)?s=Ig:$9(r)&&(s=Og),l=f}a===0?this.valType=s:(s!==this.valType||s===ew)&&(o=!0),this.discrete=this.discrete||o;var d={time:t,value:l,rawValue:r,percent:0};return n&&(d.easing=n,d.easingFunc=Ve(n)?n:n2[n]||f2(n)),i.push(d),d},e.prototype.prepare=function(t,r){var n=this.keyframes;this._needsSort&&n.sort(function(p,g){return p.time-g.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=kc(i),u=tw(i),c=0;c=0&&!(o[c].percent<=r);c--);c=d(c,s-2)}else{for(c=f;cr);c++);c=d(c-1,s-2)}v=o[c+1],h=o[c]}if(h&&v){this._lastFr=c,this._lastFrP=r;var g=v.percent-h.percent,m=g===0?1:d((r-h.percent)/g,1);v.easingFunc&&(m=v.easingFunc(m));var y=n?this._additiveValue:u?rl:t[l];if((kc(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)t[l]=m<1?h.rawValue:v.rawValue;else if(kc(a))a===Nf?hv(y,h[i],v[i],m):H9(y,h[i],v[i],m);else if(tw(a)){var _=h[i],b=v[i],x=a===Ig;t[l]={type:x?"linear":"radial",x:di(_.x,b.x,m),y:di(_.y,b.y,m),colorStops:Re(_.colorStops,function(S,C){var M=b.colorStops[C];return{offset:di(S.offset,M.offset,m),color:kf(hv([],S.color,M.color,m))}}),global:b.global},x?(t[l].x2=di(_.x2,b.x2,m),t[l].y2=di(_.y2,b.y2,m)):t[l].r=di(_.r,b.r,m)}else if(u)hv(y,h[i],v[i],m),n||(t[l]=kf(y));else{var w=di(h[i],v[i],m);n?this._additiveValue=w:t[l]=w}n&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,n=this.propName,i=this._additiveValue;r===Rc?t[n]=t[n]+i:r===xl?(so(t[n],rl),Oc(rl,rl,i,1),t[n]=kf(rl)):r===Nf?Oc(t[n],t[n],i,1):r===v2&&J1(t[n],t[n],i,1)},e}(),U9=function(){function e(t,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&i){Gy("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,r,n){return this.whenWithKeys(t,r,Tt(r),n)},e.prototype.whenWithKeys=function(t,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,Rf(u),i),this._trackKeys.push(s)}l.addKeyframe(t,Rf(r[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var r=t.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},e}();const Xy=U9;function ts(){return new Date().getTime()}var j9=function(e){pe(t,e);function t(r){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return t.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},t.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},t.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},t.prototype.update=function(r){for(var n=ts()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(Pg(n),!r._paused&&r.update())}Pg(n)},t.prototype.start=function(){this._running||(this._time=ts(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=ts(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=ts()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(r,n){n=n||{},this.start();var i=new Xy(r,n.loop);return this.addAnimator(i),i},t}(ei);const Y9=j9;var q9=300,vv=Ge.domSupported,pv=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=Re(e,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:e,touch:t,pointer:n}}(),rw={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},nw=!1;function Rg(e){var t=e.pointerType;return t==="pen"||t==="touch"}function K9(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function gv(e){e&&(e.zrByTouch=!0)}function X9(e,t){return jr(e.dom,new Z9(e,t),!0)}function p2(e,t){for(var r=t,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==t&&r===e.painterRoot);)r=r.parentNode;return n}var Z9=function(){function e(t,r){this.stopPropagation=Tr,this.stopImmediatePropagation=Tr,this.preventDefault=Tr,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e}(),mn={mousedown:function(e){e=jr(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=jr(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=jr(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=jr(this.dom,e);var t=e.toElement||e.relatedTarget;p2(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){nw=!0,e=jr(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){nw||(e=jr(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=jr(this.dom,e),gv(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),mn.mousemove.call(this,e),mn.mousedown.call(this,e)},touchmove:function(e){e=jr(this.dom,e),gv(e),this.handler.processGesture(e,"change"),mn.mousemove.call(this,e)},touchend:function(e){e=jr(this.dom,e),gv(e),this.handler.processGesture(e,"end"),mn.mouseup.call(this,e),+new Date-+this.__lastTouchMomentow||e<-ow}var xa=[],ko=[],yv=Su(),_v=Math.abs,nj=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return wa(this.rotation)||wa(this.x)||wa(this.y)||wa(this.scaleX-1)||wa(this.scaleY-1)||wa(this.skewX)||wa(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||t)){n&&aw(n);return}n=n||Su(),r?this.getLocalTransform(n):aw(n),t&&(r?us(n,t,n):p9(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(xa);var n=xa[0]<0?-1:1,i=xa[1]<0?-1:1,a=((xa[0]-n)*r+n)/xa[0]||0,o=((xa[1]-i)*r+i)/xa[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Su(),lh(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,r=[];t;)r.push(t),t=t.parent;for(;t=r.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var r=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,r=this.transform;t&&t.transform&&(us(ko,t.invTransform,r),r=ko);var n=this.originX,i=this.originY;(n||i)&&(yv[4]=n,yv[5]=i,us(ko,r,yv),ko[4]-=n,ko[5]-=i,r=ko),this.setLocalTransform(r)}},e.prototype.getGlobalScale=function(t){var r=this.transform;return t=t||[],r?(t[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),t[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(t[0]=-t[0]),r[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,r){var n=[t,r],i=this.invTransform;return i&&on(n,n,i),n},e.prototype.transformCoordToGlobal=function(t,r){var n=[t,r],i=this.transform;return i&&on(n,n,i),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&_v(t[0]-1)>1e-10&&_v(t[3]-1)>1e-10?Math.sqrt(_v(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){ij(this,t)},e.getLocalTransform=function(t,r){r=r||[];var n=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,c=t.x,f=t.y,d=t.skewX?Math.tan(t.skewX):0,h=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var v=n+s,p=i+l;r[4]=-v*a-d*p*o,r[5]=-p*o-h*v*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=h*a,r[2]=d*o,u&&qy(r,r,u),r[4]+=n+c,r[5]+=i+f,r},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),Cu=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function ij(e,t){for(var r=0;r"u"&&typeof self<"u"?Va.worker=!0:typeof navigator>"u"?(Va.node=!0,Va.svgSupported=!0):EU(navigator.userAgent,Va);function EU(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}const Ge=Va;var zy=12,PU="sans-serif",yo=zy+"px "+PU,LU=20,DU=100,IU="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function OU(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return r}function a9(e,t,r){for(var n=r?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),f=2*u,d=c.left,h=c.top;o.push(d,h),l=l&&a&&d===a[f]&&h===a[f+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=r?F1(s,o):F1(o,s))}function XA(e){return e.nodeName.toUpperCase()==="CANVAS"}var o9=/([&<>"'])/g,s9={"&":"&","<":"<",">":">",'"':""","'":"'"};function Xr(e){return e==null?"":(e+"").replace(o9,function(t,r){return s9[r]})}var l9=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,av=[],u9=Ge.browser.firefox&&+Ge.browser.version.split(".")[0]<39;function Ag(e,t,r,n){return r=r||{},n?$1(e,t,r):u9&&t.layerX!=null&&t.layerX!==t.offsetX?(r.zrX=t.layerX,r.zrY=t.layerY):t.offsetX!=null?(r.zrX=t.offsetX,r.zrY=t.offsetY):$1(e,t,r),r}function $1(e,t,r){if(Ge.domSupported&&e.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(XA(e)){var a=e.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(Mg(av,e,n,i)){r.zrX=av[0],r.zrY=av[1];return}}r.zrX=r.zrY=0}function jy(e){return e||window.event}function jr(e,t,r){if(t=jy(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Ag(e,o,t,r)}else{Ag(e,t,t,r);var a=c9(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&l9.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function c9(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,n=e.deltaY;if(r==null||n==null)return t;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function f9(e,t,r,n){e.addEventListener(t,r,n)}function d9(e,t,r,n){e.removeEventListener(t,r,n)}var ZA=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},h9=function(){function e(){this._track=[]}return e.prototype.recognize=function(t,r,n){return this._doTrack(t,r,n),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,r,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:r,event:t},o=0,s=i.length;o1&&n&&n.length>1){var a=H1(n)/H1(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=v9(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function Su(){return[1,0,0,1,0,0]}function Yy(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function p9(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function us(e,t,r){var n=t[0]*r[0]+t[2]*r[1],i=t[1]*r[0]+t[3]*r[1],a=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],l=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e}function Eg(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function qy(e,t,r){var n=t[0],i=t[2],a=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(r),c=Math.cos(r);return e[0]=n*c+o*u,e[1]=-n*u+o*c,e[2]=i*c+s*u,e[3]=-i*u+c*s,e[4]=c*a+u*l,e[5]=c*l-u*a,e}function g9(e,t,r){var n=r[0],i=r[1];return e[0]=t[0]*n,e[1]=t[1]*i,e[2]=t[2]*n,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*i,e}function lh(e,t){var r=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=r*o-a*n;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-n*l,e[3]=r*l,e[4]=(n*s-o*i)*l,e[5]=(a*i-r*s)*l,e):null}var m9=function(){function e(t,r){this.x=t||0,this.y=r||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,r){return this.x=t,this.y=r,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,r){this.x+=t.x*r,this.y+=t.y*r},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var r=this.x-t.x,n=this.y-t.y;return Math.sqrt(r*r+n*n)},e.prototype.distanceSquare=function(t){var r=this.x-t.x,n=this.y-t.y;return r*r+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var r=this.x,n=this.y;return this.x=t[0]*r+t[2]*n+t[4],this.y=t[1]*r+t[3]*n+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,r,n){t.x=r,t.y=n},e.copy=function(t,r){t.x=r.x,t.y=r.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,r){return t.x*r.x+t.y*r.y},e.add=function(t,r,n){t.x=r.x+n.x,t.y=r.y+n.y},e.sub=function(t,r,n){t.x=r.x-n.x,t.y=r.y-n.y},e.scale=function(t,r,n){t.x=r.x*n,t.y=r.y*n},e.scaleAndAdd=function(t,r,n,i){t.x=r.x+n.x*i,t.y=r.y+n.y*i},e.lerp=function(t,r,n,i){var a=1-i;t.x=a*r.x+i*n.x,t.y=a*r.y+i*n.y},e}();const ke=m9;var Ec=Math.min,Pc=Math.max,ma=new ke,ya=new ke,_a=new ke,ba=new ke,Qs=new ke,Js=new ke,y9=function(){function e(t,r,n,i){n<0&&(t=t+n,n=-n),i<0&&(r=r+i,i=-i),this.x=t,this.y=r,this.width=n,this.height=i}return e.prototype.union=function(t){var r=Ec(t.x,this.x),n=Ec(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Pc(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Pc(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=r,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var r=this,n=t.width/r.width,i=t.height/r.height,a=Su();return Eg(a,a,[-r.x,-r.y]),g9(a,a,[n,i]),Eg(a,a,[t.x,t.y]),a},e.prototype.intersect=function(t,r){if(!t)return!1;t instanceof e||(t=e.create(t));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=t.x,u=t.x+t.width,c=t.y,f=t.y+t.height,d=!(av&&(v=_,pv&&(v=b,m=n.x&&t<=n.x+n.width&&r>=n.y&&r<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(t,r){t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height},e.applyTransform=function(t,r,n){if(!n){t!==r&&e.copy(t,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=r.x*i+o,t.y=r.y*a+s,t.width=r.width*i,t.height=r.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}ma.x=_a.x=r.x,ma.y=ba.y=r.y,ya.x=ba.x=r.x+r.width,ya.y=_a.y=r.y+r.height,ma.transform(n),ba.transform(n),ya.transform(n),_a.transform(n),t.x=Ec(ma.x,ya.x,_a.x,ba.x),t.y=Ec(ma.y,ya.y,_a.y,ba.y);var l=Pc(ma.x,ya.x,_a.x,ba.x),u=Pc(ma.y,ya.y,_a.y,ba.y);t.width=l-t.x,t.height=u-t.y},e}();const et=y9;var QA="silent";function _9(e,t,r){return{type:e,event:r,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:b9}}function b9(){ZA(this.event)}var w9=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.handler=null,r}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(ei),el=function(){function e(t,r){this.x=t,this.y=r}return e}(),x9=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],sv=new et(0,0,0,0),JA=function(e){pe(t,e);function t(r,n,i,a,o){var s=e.call(this)||this;return s._hovered=new el(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new w9,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new e9(s),s}return t.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(O(x9,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},t.prototype.mousemove=function(r){var n=r.zrX,i=r.zrY,a=e2(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new el(n,i):this.findHover(n,i),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),u&&u!==s&&this.dispatchToElement(l,"mouseover",r)},t.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},t.prototype.resize=function(){this._hovered=new el(0,0)},t.prototype.dispatch=function(r,n){var i=this[r];i&&i.call(this,n)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},t.prototype.dispatchToElement=function(r,n,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=_9(n,r,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},t.prototype.findHover=function(r,n,i){var a=this.storage.getDisplayList(),o=new el(r,n);if(z1(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new et(r-u,n-u,l,l),f=a.length-1;f>=0;f--){var d=a[f];d!==i&&!d.ignore&&!d.ignoreCoarsePointer&&(!d.parent||!d.parent.ignoreCoarsePointer)&&(sv.copy(d.getBoundingRect()),d.transform&&sv.applyTransform(d.transform),sv.intersect(c)&&s.push(d))}if(s.length)for(var h=4,v=Math.PI/12,p=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function S9(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var n=e,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,r))return!1;n.silent&&(i=!0)}var s=n.__hostTarget;n=s||n.parent}return i?QA:!0}return!1}function z1(e,t,r,n,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=S9(o,r,n))&&(!t.topTarget&&(t.topTarget=o),s!==QA)){t.target=o;break}}}function e2(e,t,r){var n=e.painter;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}const C9=JA;var t2=32,tl=7;function T9(e){for(var t=0;e>=t2;)t|=e&1,e>>=1;return e+t}function W1(e,t,r,n){var i=t+1;if(i===r)return 1;if(n(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function M9(e,t,r){for(r--;t>>1,i(a,e[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;u>0;)e[o+u]=e[o+u-1],u--}e[o]=a}}function lv(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(e,t[r+c])>0?o=c+1:l=c}return l}function uv(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(e,t[r+c])<0?l=c:o=c+1}return l}function A9(e,t){var r=tl,n,i,a=0;e.length;var o=[];n=[],i=[];function s(h,v){n[a]=h,i[a]=v,a+=1}function l(){for(;a>1;){var h=a-2;if(h>=1&&i[h-1]<=i[h]+i[h+1]||h>=2&&i[h-2]<=i[h]+i[h-1])i[h-1]i[h+1])break;c(h)}}function u(){for(;a>1;){var h=a-2;h>0&&i[h-1]=tl||S>=tl);if(C)break;x<0&&(x=0),x+=2}if(r=x,r<1&&(r=1),v===1){for(m=0;m=0;m--)e[w+m]=e[x+m];e[b]=o[_];return}for(var S=r;;){var C=0,M=0,P=!1;do if(t(o[_],e[y])<0){if(e[b--]=e[y--],C++,M=0,--v===0){P=!0;break}}else if(e[b--]=o[_--],M++,C=0,--g===1){P=!0;break}while((C|M)=0;m--)e[w+m]=e[x+m];if(v===0){P=!0;break}}if(e[b--]=o[_--],--g===1){P=!0;break}if(M=g-lv(e[y],o,0,g,g-1,t),M!==0){for(b-=M,_-=M,g-=M,w=b+1,x=_+1,m=0;m=tl||M>=tl);if(P)break;S<0&&(S=0),S+=2}if(r=S,r<1&&(r=1),g===1){for(b-=v,y-=v,w=b+1,x=y+1,m=v-1;m>=0;m--)e[w+m]=e[x+m];e[b]=o[_]}else{if(g===0)throw new Error;for(x=b-(g-1),m=0;ms&&(l=s),V1(e,r,r+l,r+a,t),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var Rr=1,wl=2,Ko=4,G1=!1;function cv(){G1||(G1=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function U1(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var E9=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=U1}return e.prototype.traverse=function(t,r){for(var n=0;n0&&(c.__clipPaths=[]),isNaN(c.z)&&(cv(),c.z=0),isNaN(c.z2)&&(cv(),c.z2=0),isNaN(c.zlevel)&&(cv(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var f=t.getDecalElement&&t.getDecalElement();f&&this._updateAndAddDisplayable(f,r,n);var d=t.getTextGuideLine();d&&this._updateAndAddDisplayable(d,r,n);var h=t.getTextContent();h&&this._updateAndAddDisplayable(h,r,n)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var r=0,n=t.length;r=0&&this._roots.splice(i,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}();const P9=E9;var r2;r2=Ge.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};const Pg=r2;var Of={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)))},elasticOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},elasticInOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Of.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Of.bounceIn(e*2)*.5:Of.bounceOut(e*2-1)*.5+.5}};const n2=Of;var Lc=Math.pow,Qi=Math.sqrt,fd=1e-8,i2=1e-4,j1=Qi(3),Dc=1/3,Hn=Hs(),Zr=Hs(),cs=Hs();function Yi(e){return e>-fd&&efd||e<-fd}function jt(e,t,r,n,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*n+3*a*r)}function Y1(e,t,r,n,i){var a=1-i;return 3*(((t-e)*a+2*(r-t)*i)*a+(n-r)*i*i)}function o2(e,t,r,n,i,a){var o=n+3*(t-r)-e,s=3*(r-t*2+e),l=3*(t-e),u=e-i,c=s*s-3*o*l,f=s*l-9*o*u,d=l*l-3*s*u,h=0;if(Yi(c)&&Yi(f))if(Yi(s))a[0]=0;else{var v=-l/s;v>=0&&v<=1&&(a[h++]=v)}else{var p=f*f-4*c*d;if(Yi(p)){var g=f/c,v=-s/o+g,m=-g/2;v>=0&&v<=1&&(a[h++]=v),m>=0&&m<=1&&(a[h++]=m)}else if(p>0){var y=Qi(p),_=c*s+1.5*o*(-f+y),b=c*s+1.5*o*(-f-y);_<0?_=-Lc(-_,Dc):_=Lc(_,Dc),b<0?b=-Lc(-b,Dc):b=Lc(b,Dc);var v=(-s-(_+b))/(3*o);v>=0&&v<=1&&(a[h++]=v)}else{var x=(2*c*s-3*o*f)/(2*Qi(c*c*c)),w=Math.acos(x)/3,S=Qi(c),C=Math.cos(w),v=(-s-2*S*C)/(3*o),m=(-s+S*(C+j1*Math.sin(w)))/(3*o),M=(-s+S*(C-j1*Math.sin(w)))/(3*o);v>=0&&v<=1&&(a[h++]=v),m>=0&&m<=1&&(a[h++]=m),M>=0&&M<=1&&(a[h++]=M)}}return h}function s2(e,t,r,n,i){var a=6*r-12*t+6*e,o=9*t+3*n-3*e-9*r,s=3*t-3*e,l=0;if(Yi(o)){if(a2(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Yi(c))i[0]=-a/(2*o);else if(c>0){var f=Qi(c),u=(-a+f)/(2*o),d=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),d>=0&&d<=1&&(i[l++]=d)}}return l}function dd(e,t,r,n,i,a){var o=(t-e)*i+e,s=(r-t)*i+t,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=e,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function l2(e,t,r,n,i,a,o,s,l,u,c){var f,d=.005,h=1/0,v,p,g,m;Hn[0]=l,Hn[1]=u;for(var y=0;y<1;y+=.05)Zr[0]=jt(e,r,i,o,y),Zr[1]=jt(t,n,a,s,y),g=ls(Hn,Zr),g=0&&g=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Yi(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=Qi(c),u=(-o+f)/(2*a),d=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),d>=0&&d<=1&&(i[l++]=d)}}return l}function u2(e,t,r){var n=e+r-2*t;return n===0?.5:(e-t)/n}function hd(e,t,r,n,i){var a=(t-e)*n+e,o=(r-t)*n+t,s=(o-a)*n+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function c2(e,t,r,n,i,a,o,s,l){var u,c=.005,f=1/0;Hn[0]=o,Hn[1]=s;for(var d=0;d<1;d+=.05){Zr[0]=Jt(e,r,i,d),Zr[1]=Jt(t,n,a,d);var h=ls(Hn,Zr);h=0&&h=1?1:o2(0,n,a,1,l,s)&&jt(0,i,o,1,s[0])}}}var R9=function(){function e(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Tr,this.ondestroy=t.ondestroy||Tr,this.onrestart=t.onrestart||Tr,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,r){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Ve(t)?t:n2[t]||f2(t)},e}();const k9=R9;var d2=function(){function e(t){this.value=t}return e}(),N9=function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new d2(t);return this.insertEntry(r),r},e.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},e.prototype.remove=function(t){var r=t.prev,n=t.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),F9=function(){function e(t){this._list=new N9,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new d2(r),s.key=t,n.insertEntry(s),i[t]=s}return a},e.prototype.get=function(t){var r=this._map[t],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}();const tc=F9;var K1={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 Vl(e){return e=Math.round(e),e<0?0:e>255?255:e}function X1(e){return e<0?0:e>1?1:e}function fv(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Vl(parseFloat(t)/100*255):Vl(parseInt(t,10))}function Gl(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?X1(parseFloat(t)/100):X1(parseFloat(t))}function dv(e,t,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?e+(t-e)*r*6:r*2<1?t:r*3<2?e+(t-e)*(2/3-r)*6:e}function Ur(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function Lg(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var h2=new tc(20),Ic=null;function Ro(e,t){Ic&&Lg(Ic,t),Ic=h2.put(e,Ic||t.slice())}function so(e,t){if(e){t=t||[];var r=h2.get(e);if(r)return Lg(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in K1)return Lg(t,K1[n]),Ro(e,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Ur(t,0,0,0,1);return}return Ur(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Ro(e,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Ur(t,0,0,0,1);return}return Ur(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Ro(e,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Ur(t,+u[0],+u[1],+u[2],1):Ur(t,0,0,0,1);c=Gl(u.pop());case"rgb":if(u.length>=3)return Ur(t,fv(u[0]),fv(u[1]),fv(u[2]),u.length===3?c:Gl(u[3])),Ro(e,t),t;Ur(t,0,0,0,1);return;case"hsla":if(u.length!==4){Ur(t,0,0,0,1);return}return u[3]=Gl(u[3]),Z1(u,t),Ro(e,t),t;case"hsl":if(u.length!==3){Ur(t,0,0,0,1);return}return Z1(u,t),Ro(e,t),t;default:return}}Ur(t,0,0,0,1)}}function Z1(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=Gl(e[1]),i=Gl(e[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],Ur(t,Vl(dv(o,a,r+1/3)*255),Vl(dv(o,a,r)*255),Vl(dv(o,a,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Q1(e,t){var r=so(e);if(r){for(var n=0;n<3;n++)t<0?r[n]=r[n]*(1-t)|0:r[n]=(255-r[n])*t+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return Ky(r,r.length===4?"rgba":"rgb")}}function Ky(e,t){if(!(!e||!e.length)){var r=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(r+=","+e[3]),t+"("+r+")"}}function vd(e,t){var r=so(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}function B9(e){return e.type==="linear"}function $9(e){return e.type==="radial"}(function(){return Ge.hasGlobalWindow&&Ve(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}})();var Dg=Array.prototype.slice;function di(e,t,r){return(t-e)*r+e}function hv(e,t,r,n){for(var i=t.length,a=0;an?t:e,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=ew,l=r;if(Er(r)){var u=V9(r);s=u,(u===1&&!bt(r[0])||u===2&&!bt(r[0][0]))&&(o=!0)}else if(bt(r)&&!cd(r))s=Rc;else if(Te(r))if(!isNaN(+r))s=Rc;else{var c=so(r);c&&(l=c,s=xl)}else if(oh(r)){var f=se({},l);f.colorStops=Re(r.colorStops,function(h){return{offset:h.offset,color:so(h.color)}}),B9(r)?s=Ig:$9(r)&&(s=Og),l=f}a===0?this.valType=s:(s!==this.valType||s===ew)&&(o=!0),this.discrete=this.discrete||o;var d={time:t,value:l,rawValue:r,percent:0};return n&&(d.easing=n,d.easingFunc=Ve(n)?n:n2[n]||f2(n)),i.push(d),d},e.prototype.prepare=function(t,r){var n=this.keyframes;this._needsSort&&n.sort(function(p,g){return p.time-g.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=kc(i),u=tw(i),c=0;c=0&&!(o[c].percent<=r);c--);c=d(c,s-2)}else{for(c=f;cr);c++);c=d(c-1,s-2)}v=o[c+1],h=o[c]}if(h&&v){this._lastFr=c,this._lastFrP=r;var g=v.percent-h.percent,m=g===0?1:d((r-h.percent)/g,1);v.easingFunc&&(m=v.easingFunc(m));var y=n?this._additiveValue:u?rl:t[l];if((kc(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)t[l]=m<1?h.rawValue:v.rawValue;else if(kc(a))a===Nf?hv(y,h[i],v[i],m):H9(y,h[i],v[i],m);else if(tw(a)){var _=h[i],b=v[i],x=a===Ig;t[l]={type:x?"linear":"radial",x:di(_.x,b.x,m),y:di(_.y,b.y,m),colorStops:Re(_.colorStops,function(S,C){var M=b.colorStops[C];return{offset:di(S.offset,M.offset,m),color:kf(hv([],S.color,M.color,m))}}),global:b.global},x?(t[l].x2=di(_.x2,b.x2,m),t[l].y2=di(_.y2,b.y2,m)):t[l].r=di(_.r,b.r,m)}else if(u)hv(y,h[i],v[i],m),n||(t[l]=kf(y));else{var w=di(h[i],v[i],m);n?this._additiveValue=w:t[l]=w}n&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,n=this.propName,i=this._additiveValue;r===Rc?t[n]=t[n]+i:r===xl?(so(t[n],rl),Oc(rl,rl,i,1),t[n]=kf(rl)):r===Nf?Oc(t[n],t[n],i,1):r===v2&&J1(t[n],t[n],i,1)},e}(),U9=function(){function e(t,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&i){Gy("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,r,n){return this.whenWithKeys(t,r,Tt(r),n)},e.prototype.whenWithKeys=function(t,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,Rf(u),i),this._trackKeys.push(s)}l.addKeyframe(t,Rf(r[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var r=t.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},e}();const Xy=U9;function ts(){return new Date().getTime()}var j9=function(e){pe(t,e);function t(r){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return t.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},t.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},t.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},t.prototype.update=function(r){for(var n=ts()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(Pg(n),!r._paused&&r.update())}Pg(n)},t.prototype.start=function(){this._running||(this._time=ts(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=ts(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=ts()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(r,n){n=n||{},this.start();var i=new Xy(r,n.loop);return this.addAnimator(i),i},t}(ei);const Y9=j9;var q9=300,vv=Ge.domSupported,pv=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=Re(e,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:e,touch:t,pointer:n}}(),rw={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},nw=!1;function Rg(e){var t=e.pointerType;return t==="pen"||t==="touch"}function K9(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function gv(e){e&&(e.zrByTouch=!0)}function X9(e,t){return jr(e.dom,new Z9(e,t),!0)}function p2(e,t){for(var r=t,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==t&&r===e.painterRoot);)r=r.parentNode;return n}var Z9=function(){function e(t,r){this.stopPropagation=Tr,this.stopImmediatePropagation=Tr,this.preventDefault=Tr,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e}(),mn={mousedown:function(e){e=jr(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=jr(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=jr(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=jr(this.dom,e);var t=e.toElement||e.relatedTarget;p2(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){nw=!0,e=jr(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){nw||(e=jr(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=jr(this.dom,e),gv(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),mn.mousemove.call(this,e),mn.mousedown.call(this,e)},touchmove:function(e){e=jr(this.dom,e),gv(e),this.handler.processGesture(e,"change"),mn.mousemove.call(this,e)},touchend:function(e){e=jr(this.dom,e),gv(e),this.handler.processGesture(e,"end"),mn.mouseup.call(this,e),+new Date-+this.__lastTouchMomentow||e<-ow}var xa=[],ko=[],yv=Su(),_v=Math.abs,nj=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return wa(this.rotation)||wa(this.x)||wa(this.y)||wa(this.scaleX-1)||wa(this.scaleY-1)||wa(this.skewX)||wa(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||t)){n&&aw(n);return}n=n||Su(),r?this.getLocalTransform(n):aw(n),t&&(r?us(n,t,n):p9(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(xa);var n=xa[0]<0?-1:1,i=xa[1]<0?-1:1,a=((xa[0]-n)*r+n)/xa[0]||0,o=((xa[1]-i)*r+i)/xa[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Su(),lh(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,r=[];t;)r.push(t),t=t.parent;for(;t=r.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var r=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,r=this.transform;t&&t.transform&&(us(ko,t.invTransform,r),r=ko);var n=this.originX,i=this.originY;(n||i)&&(yv[4]=n,yv[5]=i,us(ko,r,yv),ko[4]-=n,ko[5]-=i,r=ko),this.setLocalTransform(r)}},e.prototype.getGlobalScale=function(t){var r=this.transform;return t=t||[],r?(t[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),t[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(t[0]=-t[0]),r[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,r){var n=[t,r],i=this.invTransform;return i&&on(n,n,i),n},e.prototype.transformCoordToGlobal=function(t,r){var n=[t,r],i=this.transform;return i&&on(n,n,i),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&_v(t[0]-1)>1e-10&&_v(t[3]-1)>1e-10?Math.sqrt(_v(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){ij(this,t)},e.getLocalTransform=function(t,r){r=r||[];var n=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,c=t.x,f=t.y,d=t.skewX?Math.tan(t.skewX):0,h=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var v=n+s,p=i+l;r[4]=-v*a-d*p*o,r[5]=-p*o-h*v*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=h*a,r[2]=d*o,u&&qy(r,r,u),r[4]+=n+c,r[5]+=i+f,r},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),Cu=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function ij(e,t){for(var r=0;r=0?parseFloat(e)/100*t:parseFloat(e):e}function gd(e,t,r){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,c="left",f="top";if(n instanceof Array)l+=sa(n[0],r.width),u+=sa(n[1],r.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return e=e||{},e.x=l,e.y=u,e.align=c,e.verticalAlign=f,e}var bv="__zr_normal__",wv=Cu.concat(["ignore"]),aj=oa(Cu,function(e,t){return e[t]=!0,e},{ignore:!1}),No={},oj=new et(0,0,0,0),Jy=function(){function e(t){this.id=UA(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":t=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=r,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var r=this._textContent;if(r&&(!r.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(r),n.position!=null){var c=oj;n.layoutRect?c.copy(n.layoutRect):c.copy(this.getBoundingRect()),i||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(No,n,c):gd(No,n,c),a.x=No.x,a.y=No.y,o=No.align,s=No.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var d=void 0,h=void 0;f==="center"?(d=c.width*.5,h=c.height*.5):(d=sa(f[0],c.width),h=sa(f[1],c.height)),u=!0,a.originX=-a.x+d+(i?0:c.x),a.originY=-a.y+h+(i?0:c.y)}}n.rotation!=null&&(a.rotation=n.rotation);var v=n.offset;v&&(a.x+=v[0],a.y+=v[1],u||(a.originX=-v[0],a.originY=-v[1]));var p=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,_=void 0;p&&this.canBeInsideText()?(m=n.insideFill,y=n.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),_=!0)):(m=n.outsideFill,y=n.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),_=!0)),m=m||"#000",(m!==g.fill||y!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=m,g.stroke=y,g.autoStroke=_,g.align=o,g.verticalAlign=s,r.setDefaultTextStyle(g)),r.__dirty|=Rr,l&&r.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Bg:Fg},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&so(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,Ky(n,"rgba")},e.prototype.traverse=function(t,r){},e.prototype.attrKV=function(t,r){t==="textConfig"?this.setTextConfig(r):t==="textContent"?this.setTextContent(r):t==="clipPath"?this.setClipPath(r):t==="extra"?(this.extra=this.extra||{},se(this.extra,r)):this[t]=r},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,r){if(typeof t=="string")this.attrKV(t,r);else if(Ie(t))for(var n=t,i=Tt(n),a=0;a0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var r=this.states;return r[t]||(r[t]={}),r[t]},e.prototype.clearStates=function(t){this.useState(bv,!1,t)},e.prototype.useState=function(t,r,n,i){var a=t===bv,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(ot(s,t)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){Gy("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,d=this._textGuide;return f&&f.useState(t,r,n,c),d&&d.useState(t,r,n,c),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Rr),u}}},e.prototype.useStates=function(t,r,n){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l0,v);var p=this._textContent,g=this._textGuide;p&&p.useStates(t,r,d),g&&g.useStates(t,r,d),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Rr)}},e.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},e.prototype.replaceState=function(t,r,n){var i=this.currentStates.slice(),a=ot(i,t),o=ot(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},e.prototype.toggleState=function(t,r){r?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var r={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,r){for(var n=this.animators,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(v,p){r.during(p)});for(var d=0;d0||i.force&&!o.length){var C=void 0,M=void 0,P=void 0;if(s){M={},d&&(C={});for(var b=0;b<_;b++){var m=p[b];M[m]=r[m],d?C[m]=n[m]:r[m]=n[m]}}else if(d){P={};for(var b=0;b<_;b++){var m=p[b];P[m]=Rf(r[m]),lj(r,n,m)}}var x=new Xy(r,!1,!1,f?Vt(v,function(T){return T.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),d&&C&&x.whenWithKeys(0,C,p),P&&x.whenWithKeys(0,P,p),x.whenWithKeys(u??500,s?M:n,p).delay(c||0),e.addAnimator(x,t),o.push(x)}}const y2=Jy;var _2=function(e){pe(t,e);function t(r){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(r){return this._children[r]},t.prototype.childOfName=function(r){for(var n=this._children,i=0;i=0&&(i.splice(a,0,r),this._doAdd(r))}return this},t.prototype.replace=function(r,n){var i=ot(this._children,r);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},t.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(r){var n=this.__zr,i=this._children,a=ot(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},e.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){return this.handler.findHover(t,r)},e.prototype.on=function(t,r,n){return this.handler.on(t,r,n),this},e.prototype.off=function(t,r){this.handler.off(t,r)},e.prototype.trigger=function(t,r){this.handler.trigger(t,r)},e.prototype.clear=function(){for(var t=this.storage.getRoots(),r=0;r0){if(e<=i)return o;if(e>=a)return s}else{if(e>=i)return o;if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/l*u+o}function gt(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return Me(e)?pj(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==null?NaN:+e}function kt(e,t,r){return t==null&&(t=10),t=Math.min(Math.max(0,t),w2),e=(+e).toFixed(t),r?e:+e}function hi(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,r=0;r<15;r++,t*=10)if(Math.round(e*t)/t===e)return r}return gj(e)}function gj(e){var t=e.toString().toLowerCase(),r=t.indexOf("e"),n=r>0?+t.slice(r+1):0,i=r>0?r:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function mj(e,t){var r=Math.log,n=Math.LN10,i=Math.floor(r(e[1]-e[0])/n),a=Math.round(r(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function yj(e,t){var r=oa(e,function(h,v){return h+(isNaN(v)?0:v)},0);if(r===0)return[];for(var n=Math.pow(10,t),i=Re(e,function(h){return(isNaN(h)?0:h)/r*n*100}),a=n*100,o=Re(i,function(h){return Math.floor(h)}),s=oa(o,function(h,v){return h+v},0),l=Re(i,function(h,v){return h-o[v]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return Re(o,function(h){return h/n})}function _j(e,t){var r=Math.max(hi(e),hi(t)),n=e+t;return r>w2?n:kt(n,r)}function x2(e){var t=Math.PI*2;return(e%t+t)%t}function md(e){return e>-cw&&e=10&&t++,t}function S2(e,t){var r=e0(e),n=Math.pow(10,r),i=e/n,a;return t?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,e=a*n,r>=-20?+e.toFixed(r<0?-r:0):e}function yd(e){var t=parseFloat(e);return t==e&&(t!==0||!Me(e)||e.indexOf("x")<=0)?t:NaN}function xj(e){return!isNaN(yd(e))}function C2(){return Math.round(Math.random()*9)}function T2(e,t){return t===0?e:T2(t,e%t)}function fw(e,t){return e==null?t:t==null?e:e*t/T2(e,t)}function br(e){throw new Error(e)}function dw(e,t,r){return(t-e)*r+e}var M2="series\0",Sj="\0_ec_\0";function cr(e){return e instanceof Array?e:e==null?[]:[e]}function Hg(e,t,r){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var n=0,i=r.length;n=0||a&&ot(a,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[e[s][0]]=u)}}return o}}var jj=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Yj=Mu(jj),qj=function(){function e(){}return e.prototype.getAreaStyle=function(t,r){return Yj(this,t,r)},e}(),zg=new tc(50);function Kj(e){if(typeof e=="string"){var t=zg.get(e);return t&&t.image}else return e}function D2(e,t,r,n,i){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!r)return t;var a=zg.get(e),o={hostEl:r,cb:n,cbPayload:i};return a?(t=a.image,!fh(t)&&a.pending.push(o)):(t=Mo.loadImage(e,vw,vw),t.__zrImageSrc=e,zg.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function vw(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},e.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){return this.handler.findHover(t,r)},e.prototype.on=function(t,r,n){return this.handler.on(t,r,n),this},e.prototype.off=function(t,r){this.handler.off(t,r)},e.prototype.trigger=function(t,r){this.handler.trigger(t,r)},e.prototype.clear=function(){for(var t=this.storage.getRoots(),r=0;r0){if(e<=i)return o;if(e>=a)return s}else{if(e>=i)return o;if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/l*u+o}function gt(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return Te(e)?pj(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==null?NaN:+e}function kt(e,t,r){return t==null&&(t=10),t=Math.min(Math.max(0,t),w2),e=(+e).toFixed(t),r?e:+e}function hi(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,r=0;r<15;r++,t*=10)if(Math.round(e*t)/t===e)return r}return gj(e)}function gj(e){var t=e.toString().toLowerCase(),r=t.indexOf("e"),n=r>0?+t.slice(r+1):0,i=r>0?r:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function mj(e,t){var r=Math.log,n=Math.LN10,i=Math.floor(r(e[1]-e[0])/n),a=Math.round(r(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function yj(e,t){var r=oa(e,function(h,v){return h+(isNaN(v)?0:v)},0);if(r===0)return[];for(var n=Math.pow(10,t),i=Re(e,function(h){return(isNaN(h)?0:h)/r*n*100}),a=n*100,o=Re(i,function(h){return Math.floor(h)}),s=oa(o,function(h,v){return h+v},0),l=Re(i,function(h,v){return h-o[v]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return Re(o,function(h){return h/n})}function _j(e,t){var r=Math.max(hi(e),hi(t)),n=e+t;return r>w2?n:kt(n,r)}function x2(e){var t=Math.PI*2;return(e%t+t)%t}function md(e){return e>-cw&&e=10&&t++,t}function S2(e,t){var r=e0(e),n=Math.pow(10,r),i=e/n,a;return t?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,e=a*n,r>=-20?+e.toFixed(r<0?-r:0):e}function yd(e){var t=parseFloat(e);return t==e&&(t!==0||!Te(e)||e.indexOf("x")<=0)?t:NaN}function xj(e){return!isNaN(yd(e))}function C2(){return Math.round(Math.random()*9)}function T2(e,t){return t===0?e:T2(t,e%t)}function fw(e,t){return e==null?t:t==null?e:e*t/T2(e,t)}function br(e){throw new Error(e)}function dw(e,t,r){return(t-e)*r+e}var M2="series\0",Sj="\0_ec_\0";function cr(e){return e instanceof Array?e:e==null?[]:[e]}function Hg(e,t,r){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var n=0,i=r.length;n=0||a&&ot(a,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[e[s][0]]=u)}}return o}}var jj=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Yj=Mu(jj),qj=function(){function e(){}return e.prototype.getAreaStyle=function(t,r){return Yj(this,t,r)},e}(),zg=new tc(50);function Kj(e){if(typeof e=="string"){var t=zg.get(e);return t&&t.image}else return e}function D2(e,t,r,n,i){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!r)return t;var a=zg.get(e),o={hostEl:r,cb:n,cbPayload:i};return a?(t=a.image,!fh(t)&&a.pending.push(o)):(t=Mo.loadImage(e,vw,vw),t.__zrImageSrc=e,zg.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function vw(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=o;l++)s-=o;var u=$r(r,t);return u>s&&(r="",u=0),s=e-u,i.ellipsis=r,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=e,i}function O2(e,t){var r=t.containerWidth,n=t.font,i=t.contentWidth;if(!r)return"";var a=$r(e,n);if(a<=r)return e;for(var o=0;;o++){if(a<=i||o>=t.maxIterations){e+=t.ellipsis;break}var s=o===0?Zj(e,i,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*i/a):0;e=e.substr(0,s),a=$r(e,n)}return e===""&&(e=t.placeholder),e}function Zj(e,t,r,n){for(var i=0,a=0,o=e.length;ah&&u){var v=Math.floor(h/s);f=f.slice(0,v)}if(e&&a&&c!=null)for(var p=I2(c,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),g=0;gs&&Mv(r,e.substring(s,u),t,o),Mv(r,l[2],t,o,l[1]),s=Tv.lastIndex}si){x>0?(y.tokens=y.tokens.slice(0,x),g(y,b,_),r.lines=r.lines.slice(0,m+1)):r.lines=r.lines.slice(0,m);break e}var T=S.width,D=T==null||T==="auto";if(typeof T=="string"&&T.charAt(T.length-1)==="%")w.percentWidth=T,c.push(w),w.contentWidth=$r(w.text,P);else{if(D){var N=S.backgroundColor,H=N&&N.image;H&&(H=Kj(H),fh(H)&&(w.width=Math.max(w.width,H.width*A/H.height)))}var $=v&&n!=null?n-b:null;$!=null&&$0&&v+n.accumWidth>n.width&&(c=t.split(` `),u=!0),n.accumWidth=v}else{var p=R2(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=p.accumWidth+h,f=p.linesWidths,c=p.lines}}else c=t.split(` `);for(var g=0;g=33&&t<=383}var nY=oa(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function iY(e){return rY(e)?!!nY[e]:!0}function R2(e,t,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=0;fr:i+c+h>r){c?(s||l)&&(v?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=d,u+=h,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=d,c=h)):v?(a.push(l),o.push(u),l=d,u=h):(a.push(d),o.push(h));continue}c+=h,v?(l+=d,u+=h):(l&&(s+=l,l="",u=0),s+=d)}return!a.length&&!s&&(s=e,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}var Wg="__zr_style_"+Math.round(Math.random()*10),lo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},dh={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};lo[Wg]=!0;var gw=["z","z2","invisible"],aY=["invisible"],oY=function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=Tt(r),i=0;i1e-4){s[0]=e-r,s[1]=t-n,l[0]=e+r,l[1]=t+n;return}if(Nc[0]=Lv(i)*r+e,Nc[1]=Pv(i)*n+t,Fc[0]=Lv(a)*r+e,Fc[1]=Pv(a)*n+t,u(s,Nc,Fc),c(l,Nc,Fc),i=i%Ca,i<0&&(i=i+Ca),a=a%Ca,a<0&&(a=a+Ca),i>a&&!o?a+=Ca:ii&&(Bc[0]=Lv(h)*r+e,Bc[1]=Pv(h)*n+t,u(s,Bc,s),c(l,Bc,l))}var at={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ta=[],Ma=[],Rn=[],Oi=[],kn=[],Nn=[],Dv=Math.min,Iv=Math.max,Aa=Math.cos,Ea=Math.sin,oi=Math.abs,Vg=Math.PI,zi=Vg*2,Ov=typeof Float32Array<"u",nl=[];function Rv(e){var t=Math.round(e/Vg*1e8)/1e8;return t%2*Vg}function fY(e,t){var r=Rv(e[0]);r<0&&(r+=zi);var n=r-e[0],i=e[1];i+=n,!t&&i-r>=zi?i=r+zi:t&&r-i>=zi?i=r-zi:!t&&r>i?i=r+(zi-Rv(r-i)):t&&r0&&(this._ux=oi(n/pd/t)||0,this._uy=oi(n/pd/r)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,r){return this._drawPendingPt(),this.addData(at.M,t,r),this._ctx&&this._ctx.moveTo(t,r),this._x0=t,this._y0=r,this._xi=t,this._yi=r,this},e.prototype.lineTo=function(t,r){var n=oi(t-this._xi),i=oi(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(at.L,t,r),this._ctx&&a&&this._ctx.lineTo(t,r),a)this._xi=t,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=r,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){return this._drawPendingPt(),this.addData(at.C,t,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,r,n,i,a,o),this._xi=a,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,r,n,i){return this._drawPendingPt(),this.addData(at.Q,t,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,r,n,i),this._xi=n,this._yi=i,this},e.prototype.arc=function(t,r,n,i,a,o){this._drawPendingPt(),nl[0]=i,nl[1]=a,fY(nl,o),i=nl[0],a=nl[1];var s=a-i;return this.addData(at.A,t,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,r,n,i,a,o),this._xi=Aa(a)*n+t,this._yi=Ea(a)*n+r,this},e.prototype.arcTo=function(t,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,r,n,i,a),this},e.prototype.rect=function(t,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,r,n,i),this.addData(at.R,t,r,n,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(at.Z);var t=this._ctx,r=this._x0,n=this._y0;return t&&t.closePath(),this._xi=r,this._yi=n,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){var r=t.length;!(this.data&&this.data.length===r)&&Ov&&(this.data=new Float32Array(r));for(var n=0;nc.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],r=0;r11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){Rn[0]=Rn[1]=kn[0]=kn[1]=Number.MAX_VALUE,Oi[0]=Oi[1]=Nn[0]=Nn[1]=-Number.MAX_VALUE;var t=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||oi(_)>i||d===r-1)&&(p=Math.sqrt(y*y+_*_),a=g,o=m);break}case at.C:{var b=t[d++],x=t[d++],g=t[d++],m=t[d++],w=t[d++],S=t[d++];p=L9(a,o,b,x,g,m,w,S,10),a=w,o=S;break}case at.Q:{var b=t[d++],x=t[d++],g=t[d++],m=t[d++];p=I9(a,o,b,x,g,m,10),a=g,o=m;break}case at.A:var C=t[d++],M=t[d++],P=t[d++],A=t[d++],T=t[d++],D=t[d++],N=D+T;d+=1,t[d++],v&&(s=Aa(T)*P+C,l=Ea(T)*A+M),p=Iv(P,A)*Dv(zi,Math.abs(D)),a=Aa(N)*P+C,o=Ea(N)*A+M;break;case at.R:{s=a=t[d++],l=o=t[d++];var H=t[d++],$=t[d++];p=H*2+$*2;break}case at.Z:{var y=s-a,_=l-o;p=Math.sqrt(y*y+_*_),a=s,o=l;break}}p>=0&&(u[f++]=p,c+=p)}return this._pathLen=c,c},e.prototype.rebuildPath=function(t,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,d,h=r<1,v,p,g=0,m=0,y,_=0,b,x;if(h&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,p=this._pathLen,y=r*p,!y))return;e:for(var w=0;w0&&(t.lineTo(b,x),_=0),S){case at.M:s=u=n[w++],l=c=n[w++],t.moveTo(u,c);break;case at.L:{f=n[w++],d=n[w++];var M=oi(f-u),P=oi(d-c);if(M>i||P>a){if(h){var A=v[m++];if(g+A>y){var T=(y-g)/A;t.lineTo(u*(1-T)+f*T,c*(1-T)+d*T);break e}g+=A}t.lineTo(f,d),u=f,c=d,_=0}else{var D=M*M+P*P;D>_&&(b=f,x=d,_=D)}break}case at.C:{var N=n[w++],H=n[w++],$=n[w++],G=n[w++],F=n[w++],R=n[w++];if(h){var A=v[m++];if(g+A>y){var T=(y-g)/A;dd(u,N,$,F,T,Ta),dd(c,H,G,R,T,Ma),t.bezierCurveTo(Ta[1],Ma[1],Ta[2],Ma[2],Ta[3],Ma[3]);break e}g+=A}t.bezierCurveTo(N,H,$,G,F,R),u=F,c=R;break}case at.Q:{var N=n[w++],H=n[w++],$=n[w++],G=n[w++];if(h){var A=v[m++];if(g+A>y){var T=(y-g)/A;hd(u,N,$,T,Ta),hd(c,H,G,T,Ma),t.quadraticCurveTo(Ta[1],Ma[1],Ta[2],Ma[2]);break e}g+=A}t.quadraticCurveTo(N,H,$,G),u=$,c=G;break}case at.A:var j=n[w++],re=n[w++],oe=n[w++],ye=n[w++],Ae=n[w++],V=n[w++],Q=n[w++],W=!n[w++],q=oe>ye?oe:ye,le=oi(oe-ye)>.001,de=Ae+V,J=!1;if(h){var A=v[m++];g+A>y&&(de=Ae+V*(y-g)/A,J=!0),g+=A}if(le&&t.ellipse?t.ellipse(j,re,oe,ye,Q,Ae,de,W):t.arc(j,re,q,Ae,de,W),J)break e;C&&(s=Aa(Ae)*oe+j,l=Ea(Ae)*ye+re),u=Aa(de)*oe+j,c=Ea(de)*ye+re;break;case at.R:s=u=n[w],l=c=n[w+1],f=n[w++],d=n[w++];var L=n[w++],I=n[w++];if(h){var A=v[m++];if(g+A>y){var z=y-g;t.moveTo(f,d),t.lineTo(f+Dv(z,L),d),z-=L,z>0&&t.lineTo(f+L,d+Dv(z,I)),z-=I,z>0&&t.lineTo(f+Iv(L-z,0),d+I),z-=L,z>0&&t.lineTo(f,d+Iv(I-z,0));break e}g+=A}t.rect(f,d,L,I);break;case at.Z:if(h){var A=v[m++];if(g+A>y){var T=(y-g)/A;t.lineTo(u*(1-T)+s*T,c*(1-T)+l*T);break e}g+=A}t.closePath(),u=s,c=l}}},e.prototype.clone=function(){var t=new e,r=this.data;return t.data=r.slice?r.slice():Array.prototype.slice.call(r),t._len=this._len,t},e.CMD=at,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();const _o=dY;function Fo(e,t,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=e;if(o>t+s&&o>n+s||oe+s&&a>r+s||at+f&&c>n+f&&c>a+f&&c>s+f||ce+f&&u>r+f&&u>i+f&&u>o+f||ut+u&&l>n+u&&l>a+u||le+u&&s>r+u&&s>i+u||sr||c+ui&&(i+=il);var d=Math.atan2(l,s);return d<0&&(d+=il),d>=n&&d<=i||d+il>=n&&d+il<=i}function Pa(e,t,r,n,i,a){if(a>t&&a>n||ai?s:0}var Ri=_o.CMD,La=Math.PI*2,gY=1e-4;function mY(e,t){return Math.abs(e-t)t&&u>n&&u>a&&u>s||u1&&yY(),h=jt(t,n,a,s,Kr[0]),d>1&&(v=jt(t,n,a,s,Kr[1]))),d===2?gt&&s>n&&s>a||s=0&&u<=1){for(var c=0,f=Jt(t,n,a,u),d=0;dr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);or[0]=-l,or[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=La-1e-4){n=0,i=La;var c=a?1:-1;return o>=or[0]+e&&o<=or[1]+e?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=La,i+=La);for(var d=0,h=0;h<2;h++){var v=or[h];if(v+e>o){var p=Math.atan2(s,v),c=a?1:-1;p<0&&(p=La+p),(p>=n&&p<=i||p+La>=n&&p+La<=i)&&(p>Math.PI/2&&p1&&(r||(s+=Pa(l,u,c,f,n,i))),g&&(l=a[v],u=a[v+1],c=l,f=u),p){case Ri.M:c=a[v++],f=a[v++],l=c,u=f;break;case Ri.L:if(r){if(Fo(l,u,a[v],a[v+1],t,n,i))return!0}else s+=Pa(l,u,a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Ri.C:if(r){if(hY(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],t,n,i))return!0}else s+=_Y(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Ri.Q:if(r){if(vY(l,u,a[v++],a[v++],a[v],a[v+1],t,n,i))return!0}else s+=bY(l,u,a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Ri.A:var m=a[v++],y=a[v++],_=a[v++],b=a[v++],x=a[v++],w=a[v++];v+=1;var S=!!(1-a[v++]);d=Math.cos(x)*_+m,h=Math.sin(x)*b+y,g?(c=d,f=h):s+=Pa(l,u,d,h,n,i);var C=(n-m)*b/_+m;if(r){if(pY(m,y,b,x,x+w,S,t,C,i))return!0}else s+=wY(m,y,b,x,x+w,S,C,i);l=Math.cos(x+w)*_+m,u=Math.sin(x+w)*b+y;break;case Ri.R:c=l=a[v++],f=u=a[v++];var M=a[v++],P=a[v++];if(d=c+M,h=f+P,r){if(Fo(c,f,d,f,t,n,i)||Fo(d,f,d,h,t,n,i)||Fo(d,h,c,h,t,n,i)||Fo(c,h,c,f,t,n,i))return!0}else s+=Pa(d,f,d,h,n,i),s+=Pa(c,h,c,f,n,i);break;case Ri.Z:if(r){if(Fo(l,u,c,f,t,n,i))return!0}else s+=Pa(l,u,c,f,n,i);l=c,u=f;break}}return!r&&!mY(u,f)&&(s+=Pa(l,u,c,f,n,i)||0),s!==0}function xY(e,t,r){return k2(e,0,!1,t,r)}function SY(e,t,r,n){return k2(e,t,!0,r,n)}var N2=dt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},lo),CY={style:dt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},dh.style)},kv=Cu.concat(["invisible","culling","z","z2","zlevel","parent"]),TY=function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype.update=function(){var r=this;e.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Fg:n>.2?rj:Bg}else if(r)return Bg}return Fg},t.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(Me(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=vd(r,0)0))},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Ko)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),SY(s,l/u,r,n)))return!0}if(this.hasFill())return xY(s,r,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Ko,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(r){return this.animate("shape",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):e.prototype.attrKV.call(this,r,n)},t.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:se(i,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Ko)},t.prototype.createStyle=function(r){return sh(N2,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=se({},this.shape))},t.prototype._applyStateObj=function(r,n,i,a,o,s){e.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=se({},i.shape),se(u,n.shape)):(u=se({},a?this.shape:i.shape),se(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=se({},this.shape);for(var c={},f=Tt(u),d=0;d0},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(r){return sh(MY,r)},t.prototype.setBoundingRect=function(r){this._rect=r},t.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var n=r.text;n!=null?n+="":n="";var i=Zy(n,r.font,r.textAlign,r.textBaseline);if(i.x+=r.x||0,i.y+=r.y||0,this.hasStroke()){var a=r.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},t.initDefaultProps=function(){var r=t.prototype;r.dirtyRectTolerance=10}(),t}(ac);F2.prototype.type="tspan";const Gg=F2;var AY=dt({x:0,y:0},lo),EY={style:dt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},dh.style)};function PY(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var B2=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(r){return sh(AY,r)},t.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=PY(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return EY},t.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new et(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},t}(ac);B2.prototype.type="image";const zs=B2;function LY(e,t){var r=t.x,n=t.y,i=t.width,a=t.height,o=t.r,s,l,u,c;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>i&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),e.moveTo(r+s,n),e.lineTo(r+i-l,n),l!==0&&e.arc(r+i-l,n+l,l,-Math.PI/2,0),e.lineTo(r+i,n+a-u),u!==0&&e.arc(r+i-u,n+a-u,u,0,Math.PI/2),e.lineTo(r+c,n+a),c!==0&&e.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),e.lineTo(r,n+s),s!==0&&e.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var rs=Math.round;function $2(e,t,r){if(t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=n,e.x2=i,e.y1=a,e.y2=o;var s=r&&r.lineWidth;return s&&(rs(n*2)===rs(i*2)&&(e.x1=e.x2=eo(n,s,!0)),rs(a*2)===rs(o*2)&&(e.y1=e.y2=eo(a,s,!0))),e}}function H2(e,t,r){if(t){var n=t.x,i=t.y,a=t.width,o=t.height;e.x=n,e.y=i,e.width=a,e.height=o;var s=r&&r.lineWidth;return s&&(e.x=eo(n,s,!0),e.y=eo(i,s,!0),e.width=Math.max(eo(n+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(eo(i+o,s,!1)-e.y,o===0?0:1)),e}}function eo(e,t,r){if(!t)return e;var n=rs(e*2);return(n+rs(t))%2===0?n/2:(n+(r?1:-1))/2}var DY=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),IY={},z2=function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new DY},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=H2(IY,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?LY(r,n):r.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(ht);z2.prototype.type="rect";const Ht=z2;var ww={fill:"#000"},xw=2,OY={style:dt({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},dh.style)},W2=function(e){pe(t,e);function t(r){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=ww,n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,T=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),D=o.calculatedLineHeight,N=0;N=0&&(N=w[D],N.align==="right");)this._placeToken(N,r,C,m,T,"right",_),M-=N.width,T-=N.width,D--;for(A+=(a-(A-g)-(y-T)-M)/2;P<=D;)N=w[P],this._placeToken(N,r,C,m,A+N.width/2,"center",_),A+=N.width,P++;m+=C}},t.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,f=a+i/2;c==="top"?f=a+r.height/2:c==="bottom"&&(f=a+i-r.height/2);var d=!r.isLineHolder&&Nv(u);d&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,f-r.height/2,r.width,r.height);var h=!!u.backgroundColor,v=r.textPadding;v&&(o=Ew(o,s,v),f-=r.height/2-v[0]-r.innerHeight/2);var p=this._getOrCreateChild(Gg),g=p.createStyle();p.useStyle(g);var m=this._defaultStyle,y=!1,_=0,b=Aw("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,m.fill)),x=Mw("stroke"in u?u.stroke:"stroke"in n?n.stroke:!h&&!l&&(!m.autoStroke||y)?(_=xw,m.stroke):null),w=u.textShadowBlur>0||n.textShadowBlur>0;g.text=r.text,g.x=o,g.y=f,w&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=r.font||yo,g.opacity=zl(u.opacity,n.opacity,1),Cw(g,u),x&&(g.lineWidth=zl(u.lineWidth,n.lineWidth,_),g.lineDash=qe(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=x),b&&(g.fill=b);var S=r.contentWidth,C=r.contentHeight;p.setBoundingRect(new et(Sl(g.x,S,g.textAlign),Xo(g.y,C,g.textBaseline),S,C))},t.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,f=l&&l.image,d=l&&!f,h=r.borderRadius,v=this,p,g;if(d||r.lineHeight||u&&c){p=this._getOrCreateChild(Ht),p.useStyle(p.createStyle()),p.style.fill=null;var m=p.shape;m.x=i,m.y=a,m.width=o,m.height=s,m.r=h,p.dirtyShape()}if(d){var y=p.style;y.fill=l||null,y.fillOpacity=qe(r.fillOpacity,1)}else if(f){g=this._getOrCreateChild(zs),g.onload=function(){v.dirtyStyle()};var _=g.style;_.image=l.image,_.x=i,_.y=a,_.width=o,_.height=s}if(u&&c){var y=p.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=qe(r.strokeOpacity,1),y.lineDash=r.borderDash,y.lineDashOffset=r.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var b=(p||g).style;b.shadowBlur=r.shadowBlur||0,b.shadowColor=r.shadowColor||"transparent",b.shadowOffsetX=r.shadowOffsetX||0,b.shadowOffsetY=r.shadowOffsetY||0,b.opacity=zl(r.opacity,n.opacity,1)},t.makeFont=function(r){var n="";return FY(r)&&(n=[r.fontStyle,r.fontWeight,NY(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Vn(n)||r.textFont||r.font},t}(ac),RY={left:!0,right:1,center:1},kY={top:1,bottom:1,middle:1},Sw=["fontStyle","fontWeight","fontSize","fontFamily"];function NY(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?zy+"px":e+"px"}function Cw(e,t){for(var r=0;r=0,a=!1;if(e instanceof ht){var o=V2(e),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Bo(s)||Bo(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=se({},n),u=se({},u),u.fill=s):!Bo(u.fill)&&Bo(s)?(a=!0,n=se({},n),u=se({},u),u.fill=Ow(s)):!Bo(u.stroke)&&Bo(l)&&(a||(n=se({},n),u=se({},u)),u.stroke=Ow(l)),n.style=u}}if(n&&n.z2==null){a||(n=se({},n));var c=e.z2EmphasisLift;n.z2=e.z2+(c??HY)}return n}function jY(e,t,r){if(r&&r.z2==null){r=se({},r);var n=e.z2SelectLift;r.z2=e.z2+(n??zY)}return r}function YY(e,t,r){var n=ot(e.currentStates,t)>=0,i=e.style.opacity,a=n?null:GY(e,["opacity"],t,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=se({},r),o=se({opacity:n?i:a.opacity*.1},o),r.style=o),r}function Fv(e,t){var r=this.states[e];if(this.style){if(e==="emphasis")return UY(this,e,t,r);if(e==="blur")return YY(this,e,r);if(e==="select")return jY(this,e,r)}return r}function qY(e){e.stateProxy=Fv;var t=e.getTextContent(),r=e.getTextGuideLine();t&&(t.stateProxy=Fv),r&&(r.stateProxy=Fv)}function kw(e,t){!Z2(e,t)&&!e.__highByOuter&&Ai(e,U2)}function Nw(e,t){!Z2(e,t)&&!e.__highByOuter&&Ai(e,j2)}function Ug(e,t){e.__highByOuter|=1<<(t||0),Ai(e,U2)}function jg(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Ai(e,j2)}function KY(e){Ai(e,s0)}function q2(e){Ai(e,Y2)}function K2(e){Ai(e,WY)}function X2(e){Ai(e,VY)}function Z2(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Q2(e){var t=e.getModel(),r=[],n=[];t.eachComponent(function(i,a){var o=i0(a),s=i==="series",l=s?e.getViewOfSeriesModel(a):e.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){Y2(u)}),s&&r.push(a)),o.isBlured=!1}),O(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,t)})}function Yg(e,t,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function Kg(e,t,r){tE(e,!0),Ai(e,qY),r7(e,t,r)}function t7(e){tE(e,!1)}function J2(e,t,r,n){n?t7(e):Kg(e,t,r)}function r7(e,t,r){var n=ft(e);t!=null?(n.focus=t,n.blurScope=r):n.focus&&(n.focus=null)}var Bw=["emphasis","blur","select"],n7={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function eE(e,t,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=Bv(v),s*=Bv(v));var p=(i===a?-1:1)*Bv((o*o*(s*s)-o*o*(h*h)-s*s*(d*d))/(o*o*(h*h)+s*s*(d*d)))||0,g=p*o*h/s,m=p*-s*d/o,y=(e+r)/2+Hc(f)*g-$c(f)*m,_=(t+n)/2+$c(f)*g+Hc(f)*m,b=Ww([1,0],[(d-g)/o,(h-m)/s]),x=[(d-g)/o,(h-m)/s],w=[(-1*d-g)/o,(-1*h-m)/s],S=Ww(x,w);if(Qg(x,w)<=-1&&(S=al),Qg(x,w)>=1&&(S=0),S<0){var C=Math.round(S/al*1e6)/1e6;S=al*2+C%2*al}c.addData(u,y,_,o,s,b,S,f,a)}var u7=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,c7=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function f7(e){var t=new _o;if(!e)return t;var r=0,n=0,i=r,a=n,o,s=_o.CMD,l=e.match(u7);if(!l)return t;for(var u=0;uN*N+H*H&&(C=P,M=A),{cx:C,cy:M,x0:-c,y0:-f,x1:C*(i/x-1),y1:M*(i/x-1)}}function _7(e){var t;if(ge(e)){var r=e.length;if(!r)return e;r===1?t=[e[0],e[0],0,0]:r===2?t=[e[0],e[0],e[1],e[1]]:r===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function b7(e,t){var r,n=Cl(t.r,0),i=Cl(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,f=t.cy,d=!!t.clockwise,h=Gw(u-l),v=h>$v&&h%$v;if(v>gn&&(h=v),!(n>gn))e.moveTo(c,f);else if(h>$v-gn)e.moveTo(c+n*Ho(l),f+n*Da(l)),e.arc(c,f,n,l,u,!d),i>gn&&(e.moveTo(c+i*Ho(u),f+i*Da(u)),e.arc(c,f,i,u,l,d));else{var p=void 0,g=void 0,m=void 0,y=void 0,_=void 0,b=void 0,x=void 0,w=void 0,S=void 0,C=void 0,M=void 0,P=void 0,A=void 0,T=void 0,D=void 0,N=void 0,H=n*Ho(l),$=n*Da(l),G=i*Ho(u),F=i*Da(u),R=h>gn;if(R){var j=t.cornerRadius;j&&(r=_7(j),p=r[0],g=r[1],m=r[2],y=r[3]);var re=Gw(n-i)/2;if(_=Fn(re,m),b=Fn(re,y),x=Fn(re,p),w=Fn(re,g),M=S=Cl(_,b),P=C=Cl(x,w),(S>gn||C>gn)&&(A=n*Ho(u),T=n*Da(u),D=i*Ho(l),N=i*Da(l),hgn){var le=Fn(m,M),de=Fn(y,M),J=zc(D,N,H,$,n,le,d),L=zc(A,T,G,F,n,de,d);e.moveTo(c+J.cx+J.x0,f+J.cy+J.y0),M0&&e.arc(c+J.cx,f+J.cy,le,Zt(J.y0,J.x0),Zt(J.y1,J.x1),!d),e.arc(c,f,n,Zt(J.cy+J.y1,J.cx+J.x1),Zt(L.cy+L.y1,L.cx+L.x1),!d),de>0&&e.arc(c+L.cx,f+L.cy,de,Zt(L.y1,L.x1),Zt(L.y0,L.x0),!d))}else e.moveTo(c+H,f+$),e.arc(c,f,n,l,u,!d);if(!(i>gn)||!R)e.lineTo(c+G,f+F);else if(P>gn){var le=Fn(p,P),de=Fn(g,P),J=zc(G,F,A,T,i,-de,d),L=zc(H,$,D,N,i,-le,d);e.lineTo(c+J.cx+J.x0,f+J.cy+J.y0),P0&&e.arc(c+J.cx,f+J.cy,de,Zt(J.y0,J.x0),Zt(J.y1,J.x1),!d),e.arc(c,f,i,Zt(J.cy+J.y1,J.cx+J.x1),Zt(L.cy+L.y1,L.cx+L.x1),d),le>0&&e.arc(c+L.cx,f+L.cy,le,Zt(L.y1,L.x1),Zt(L.y0,L.x0),!d))}else e.lineTo(c+G,f+F),e.arc(c,f,i,u,l,d)}e.closePath()}}}var w7=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),uE=function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new w7},t.prototype.buildPath=function(r,n){b7(r,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(ht);uE.prototype.type="sector";const Ao=uE;var x7=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),cE=function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new x7},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},t}(ht);cE.prototype.type="ring";const fE=cE;function S7(e,t,r,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var d=0,h=e.length;d=2){if(n){var a=S7(i,n,r,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;sOa[1]){if(s=!1,a)return s;var c=Math.abs(Oa[0]-Ia[1]),f=Math.abs(Ia[0]-Oa[1]);Math.min(c,f)>i.len()&&(c0){var f=c.duration,d=c.delay,h=c.easing,v={duration:f,delay:d||0,easing:h,done:a,force:!!a||!!o,setToFinal:!u,scope:e,during:o};s?t.animateFrom(r,v):t.animateTo(r,v)}else t.stopAnimation(),!s&&t.attr(r),o&&o(1),a&&a()}function Pr(e,t,r,n,i,a){f0("update",e,t,r,n,i,a)}function Hr(e,t,r,n,i,a){f0("enter",e,t,r,n,i,a)}function fs(e){if(!e.__zr)return!0;for(var t=0;tMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Yw(e){return!e.isGroup}function Q7(e){return e.shape!=null}function ME(e,t,r){if(!e||!t)return;function n(o){var s={};return o.traverse(function(l){Yw(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return Q7(o)&&(s.shape=se({},o.shape)),s}var a=n(e);t.traverse(function(o){if(Yw(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Pr(o,l,r,ft(o).dataIndex)}}})}function J7(e,t){return Re(e,function(r){var n=r[0];n=xd(n,t.x),n=Sd(n,t.x+t.width);var i=r[1];return i=xd(i,t.y),i=Sd(i,t.y+t.height),[n,i]})}function eq(e,t){var r=xd(e.x,t.x),n=Sd(e.x+e.width,t.x+t.width),i=xd(e.y,t.y),a=Sd(e.y+e.height,t.y+t.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function v0(e,t,r){var n=se({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(i.image=e.slice(8),dt(i,r),new zs(n)):d0(e.replace("path://",""),n,r,"center")}function tq(e,t,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=Hv(h,v,c,f)/d;return!(g<0||g>1)}function Hv(e,t,r,n){return e*n-r*t}function rq(e){return e<=1e-6&&e>=-1e-6}function p0(e){var t=e.itemTooltipOption,r=e.componentModel,n=e.itemName,i=Me(t)?{formatter:t}:t,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=e.formatterParamsExtra;l&&O(Tt(l),function(c){Ps(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=ft(e.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:dt({content:n,formatterParams:s},i)}}function qw(e,t){var r;e.isGroup&&(r=t(e)),r||e.traverse(t)}function g0(e,t){if(e)if(ge(e))for(var r=0;r=0&&s.push(l)}),s}}function IE(e,t){return st(st({},e,!0),t,!0)}const _q={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},bq={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Cd="ZH",y0="EN",Eu=y0,zf={},_0={},OE=Ge.domSupported?function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return e.indexOf(Cd)>-1?Cd:Eu}():Eu;function RE(e,t){e=e.toUpperCase(),_0[e]=new rr(t),zf[e]=t}function wq(e){if(Me(e)){var t=zf[e.toUpperCase()]||{};return e===Cd||e===y0?Qe(t):st(Qe(t),Qe(zf[Eu]),!1)}else return st(Qe(e),Qe(zf[Eu]),!1)}function xq(e){return _0[e]}function Sq(){return _0[Eu]}RE(y0,_q);RE(Cd,bq);var b0=1e3,w0=b0*60,Kl=w0*60,en=Kl*24,ex=en*365,Tl={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Gc="{yyyy}-{MM}-{dd}",tx={year:"{yyyy}",month:"{yyyy}-{MM}",day:Gc,hour:Gc+" "+Tl.hour,minute:Gc+" "+Tl.minute,second:Gc+" "+Tl.second,millisecond:Tl.none},Vv=["year","month","day","hour","minute","second","millisecond"],kE=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Ra(e,t){return e+="","0000".substr(0,t-e.length)+e}function ds(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function Cq(e){return e===ds(e)}function Tq(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function mh(e,t,r,n){var i=wi(e),a=i[x0(r)](),o=i[hs(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[yh(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[Pu(r)](),f=(c-1)%12+1,d=i[_h(r)](),h=i[bh(r)](),v=i[wh(r)](),p=n instanceof rr?n:xq(n||OE)||Sq(),g=p.getModel("time"),m=g.get("month"),y=g.get("monthAbbr"),_=g.get("dayOfWeek"),b=g.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,a%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,Ra(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Ra(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Ra(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Ra(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Ra(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,Ra(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,Ra(v,3)).replace(/{S}/g,v+"")}function Mq(e,t,r,n,i){var a=null;if(Me(r))a=r;else if(Ve(r))a=r(e.value,t,{level:e.level});else{var o=se({},Tl);if(e.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(ge(a)){var f=e.level==null?0:e.level>=0?e.level:a.length+e.level;f=Math.min(f,a.length-1),a=a[f]}}return mh(new Date(e.value),a,i,n)}function NE(e,t){var r=wi(e),n=r[hs(t)]()+1,i=r[yh(t)](),a=r[Pu(t)](),o=r[_h(t)](),s=r[bh(t)](),l=r[wh(t)](),u=l===0,c=u&&s===0,f=c&&o===0,d=f&&a===0,h=d&&i===1,v=h&&n===1;return v?"year":h?"month":d?"day":f?"hour":c?"minute":u?"second":"millisecond"}function rx(e,t,r){var n=bt(e)?wi(e):e;switch(t=t||NE(e,r),t){case"year":return n[x0(r)]();case"half-year":return n[hs(r)]()>=6?1:0;case"quarter":return Math.floor((n[hs(r)]()+1)/4);case"month":return n[hs(r)]();case"day":return n[yh(r)]();case"half-day":return n[Pu(r)]()/24;case"hour":return n[Pu(r)]();case"minute":return n[_h(r)]();case"second":return n[bh(r)]();case"millisecond":return n[wh(r)]()}}function x0(e){return e?"getUTCFullYear":"getFullYear"}function hs(e){return e?"getUTCMonth":"getMonth"}function yh(e){return e?"getUTCDate":"getDate"}function Pu(e){return e?"getUTCHours":"getHours"}function _h(e){return e?"getUTCMinutes":"getMinutes"}function bh(e){return e?"getUTCSeconds":"getSeconds"}function wh(e){return e?"getUTCMilliseconds":"getMilliseconds"}function Aq(e){return e?"setUTCFullYear":"setFullYear"}function FE(e){return e?"setUTCMonth":"setMonth"}function BE(e){return e?"setUTCDate":"setDate"}function $E(e){return e?"setUTCHours":"setHours"}function HE(e){return e?"setUTCMinutes":"setMinutes"}function zE(e){return e?"setUTCSeconds":"setSeconds"}function WE(e){return e?"setUTCMilliseconds":"setMilliseconds"}function VE(e){if(!xj(e))return Me(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function GE(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var xh=jA;function tm(e,t,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Vn(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=t==="time",s=e instanceof Date;if(o||s){var l=o?wi(e):e;if(isNaN(+l)){if(s)return"-"}else return mh(l,n,r)}if(t==="ordinal")return wg(e)?i(e):bt(e)&&a(e)?e+"":"-";var u=yd(e);return a(u)?VE(u):wg(e)?i(e):typeof e=="boolean"?e+"":"-"}var nx=["a","b","c","d","e","f","g"],Gv=function(e,t){return"{"+e+(t??"")+"}"};function UE(e,t,r){ge(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function Lu(e,t){return t=t||"transparent",Me(e)?e:Ie(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function ix(e,t){if(t==="_blank"||t==="blank"){var r=window.open();r.opener=null,r.location.href=e}else window.open(e,t)}var Wf=O,Pq=["left","right","top","bottom","width","height"],Uc=[["width","left","right"],["height","top","bottom"]];function S0(e,t,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),f=t.childAt(u+1),d=f&&f.getBoundingRect(),h,v;if(e==="horizontal"){var p=c.width+(d?-d.x+c.x:0);h=a+p,h>n||l.newline?(a=0,h=p,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var g=c.height+(d?-d.y+c.y:0);v=o+g,v>i||l.newline?(a+=s+r,o=0,v=g,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),e==="horizontal"?a=h+r:o=v+r)})}var Xl=S0;Rt(S0,"vertical");Rt(S0,"horizontal");function Ls(e,t,r){r=xh(r||0);var n=t.width,i=t.height,a=gt(e.left,n),o=gt(e.top,i),s=gt(e.right,n),l=gt(e.bottom,i),u=gt(e.width,n),c=gt(e.height,i),f=r[2]+r[0],d=r[1]+r[3],h=e.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(c)&&(c=i-l-f-o),h!=null&&(isNaN(u)&&isNaN(c)&&(h>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(a)&&(a=n-s-u-d),isNaN(o)&&(o=i-l-c-f),e.left||e.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-d;break}switch(e.top||e.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var v=new et(a+r[3],o+r[0],u,c);return v.margin=r,v}function Du(e){var t=e.layoutMode||e.constructor.layoutMode;return Ie(t)?t:t?{type:t}:null}function Ds(e,t,r){var n=r&&r.ignoreSize;!ge(n)&&(n=[n,n]);var i=o(Uc[0],0),a=o(Uc[1],1);u(Uc[0],e,i),u(Uc[1],e,a);function o(c,f){var d={},h=0,v={},p=0,g=2;if(Wf(c,function(_){v[_]=e[_]}),Wf(c,function(_){s(t,_)&&(d[_]=v[_]=t[_]),l(d,_)&&h++,l(v,_)&&p++}),n[f])return l(t,c[1])?v[c[2]]=null:l(t,c[2])&&(v[c[1]]=null),v;if(p===g||!h)return v;if(h>=g)return d;for(var m=0;m=0;l--)s=st(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return ic(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){var r=this;return{left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(r){this.option.zlevel=r},t.protoInitialize=function(){var r=t.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),t}(rr);L2(Ws,rr);ch(Ws);mq(Ws);yq(Ws,Iq);function Iq(e){var t=[];return O(Ws.getClassesByMainType(e),function(r){t=t.concat(r.dependencies||r.prototype.dependencies||[])}),t=Re(t,function(r){return Gn(r).main}),e!=="dataset"&&ot(t,"dataset")<=0&&t.unshift("dataset"),t}const xt=Ws;var jE="";typeof navigator<"u"&&(jE=navigator.platform||"");var zo="rgba(0, 0, 0, 0.2)";const Oq={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:zo,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:zo,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:zo,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:zo,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:zo,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:zo,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:jE.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 YE=Ue(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),dn="original",Lr="arrayRows",In="objectRows",ti="keyedColumns",Ji="typedArray",qE="unknown",pi="column",Vs="row",Ut={Must:1,Might:2,Not:3},KE=Et();function Rq(e){KE(e).datasetMap=Ue()}function kq(e,t,r){var n={},i=C0(t);if(!i||!e)return n;var a=[],o=[],s=t.ecModel,l=KE(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,f;e=e.slice(),O(e,function(p,g){var m=Ie(p)?p:e[g]={name:p};m.type==="ordinal"&&c==null&&(c=g,f=v(m)),n[m.name]=[]});var d=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});O(e,function(p,g){var m=p.name,y=v(p);if(c==null){var _=d.valueWayDim;h(n[m],_,y),h(o,_,y),d.valueWayDim+=y}else if(c===g)h(n[m],0,y),h(a,0,y);else{var _=d.categoryWayDim;h(n[m],_,y),h(o,_,y),d.categoryWayDim+=y}});function h(p,g,m){for(var y=0;yt)return e[n];return e[r-1]}function zq(e,t,r,n,i,a,o){a=a||e;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:Hq(n,o);if(c=c||r,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function Wq(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var jc,ol,ox,sx="\0_ec_inner",Vq=1,QE=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new rr(a),this._locale=new rr(o),this._optionManager=s},t.prototype.setOption=function(r,n,i){var a=cx(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(r,n){return this._resetOption(r,cx(n))},t.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?ox(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&O(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},t.prototype.mergeOption=function(r){this._mergeOption(r,null)},t.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=Ue(),u=n&&n.replaceMergeMainTypeMap;Rq(this),O(r,function(f,d){f!=null&&(xt.hasClass(d)?d&&(s.push(d),l.set(d,!0)):i[d]=i[d]==null?Qe(f):st(i[d],f,!0))}),u&&u.each(function(f,d){xt.hasClass(d)&&!l.get(d)&&(s.push(d),l.set(d,!0))}),xt.topologicalTravel(s,xt.getAllClassMainTypes(),c,this);function c(f){var d=$q(this,f,cr(r[f])),h=a.get(f),v=h?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",p=Tj(h,d,v);Ij(p,f,xt),i[f]=null,a.set(f,null),o.set(f,0);var g=[],m=[],y=0,_;O(p,function(b,x){var w=b.existing,S=b.newOption;if(!S)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var C=f==="series",M=xt.getClass(f,b.keyInfo.subType,!C);if(!M)return;if(f==="tooltip"){if(_)return;_=!0}if(w&&w.constructor===M)w.name=b.keyInfo.name,w.mergeOption(S,this),w.optionUpdated(S,!1);else{var P=se({componentIndex:x},b.keyInfo);w=new M(S,this,this,P),se(w,P),b.brandNew&&(w.__requireNewView=!0),w.init(S,this,this),w.optionUpdated(null,!0)}}w?(g.push(w.option),m.push(w),y++):(g.push(void 0),m.push(void 0))},this),i[f]=g,a.set(f,m),o.set(f,y),f==="series"&&jc(this)}this._seriesIndices||jc(this)},t.prototype.getOption=function(){var r=Qe(this.option);return O(r,function(n,i){if(xt.hasClass(i)){for(var a=cr(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Tu(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[sx],r},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(r){this._payload=r},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=t:r==="max"?e<=t:e===t}function eK(e,t){return e.join(",")===t.join(",")}const tK=Xq;var hn=O,Iu=Ie,fx=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function jv(e){var t=e&&e.itemStyle;if(t)for(var r=0,n=fx.length;r=0;g--){var m=e[g];if(s||(v=m.data.rawIndexOf(m.stackedByDimension,h)),v>=0){var y=m.data.getByRawIndex(m.stackResultDimension,v);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&d>=0&&y>0||l==="samesign"&&d<=0&&y<0){d=_j(d,y),p=y;break}}}return n[0]=d,n[1]=p,n})})}var Ch=function(){function e(t){this.data=t.data||(t.sourceFormat===ti?{}:[]),this.sourceFormat=t.sourceFormat||qE,this.seriesLayoutBy=t.seriesLayoutBy||pi,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var r=this.dimensionsDefine=t.dimensionsDefine;if(r)for(var n=0;np&&(p=_)}h[0]=v,h[1]=p}},i=function(){return this._data?this._data.length/this._dimSize:0};yx=(t={},t[Lr+"_"+pi]={pure:!0,appendData:a},t[Lr+"_"+Vs]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[In]={pure:!0,appendData:a},t[ti]={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])})}},t[dn]={appendData:a},t[Ji]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},e.prototype.getRawValue=function(t,r){return Is(this.getData(r),t)},e.prototype.formatTooltip=function(t,r,n){},e}();function Sx(e){var t,r;return Ie(e)?e.type&&(r=e):t=e,{text:t,frag:r}}function Zl(e){return new _K(e)}var _K=function(){function e(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return e.prototype.perform=function(t){var r=this._upstream,n=t&&t.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var d=t&&t.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,v=Math.min(d!=null?this._dueIndex+d:1/0,this._dueEnd);if(!n&&(f||h1&&n>0?s:o}};return a;function o(){return t=e?null:li?-this._resultLT:0},e}(),wK=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(t){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(t){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(t,r){},e.prototype.retrieveValueFromItem=function(t,r){},e.prototype.convertValue=function(t,r){return Vf(t,r)},e}();function xK(e,t){var r=new wK,n=e.data,i=r.sourceFormat=e.sourceFormat,a=e.startIndex,o="";e.seriesLayoutBy!==pi&&br(o);var s=[],l={},u=e.dimensionsDefine;if(u)O(u,function(p,g){var m=p.name,y={index:g,name:m,displayName:p.displayName};if(s.push(y),m!=null){var _="";Ps(l,m)&&br(_),l[m]=y}});else for(var c=0;c65535?LK:DK}function Wo(){return[1/0,-1/0]}function IK(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Mx(e,t,r,n,i){var a=fP[r||"float"];if(i){var o=e[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;ug[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},e.prototype._initDataFromProvider=function(t,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Re(o,function(y){return y.property}),c=0;cm[1]&&(m[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,r){if(!(r>=0&&r=0&&r=this._rawCount||t<0)return-1;if(!this._indices)return t;var r=this._indices,n=r[t];if(n!=null&&nt)a=o-1;else return o}return-1},e.prototype.indicesOfNearest=function(t,r,n){var i=this._chunks,a=i[t],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,c=0,f=this.count();c=0&&l<0)&&(s=v,l=h,u=0),h===l&&(o[u++]=c))}return o.length=u,o},e.prototype.getIndices=function(){var t,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a=f&&y<=d||isNaN(y))&&(l[u++]=p),p++}v=!0}else if(a===2){for(var g=h[i[0]],_=h[i[1]],b=t[i[1]][0],x=t[i[1]][1],m=0;m=f&&y<=d||isNaN(y))&&(w>=b&&w<=x||isNaN(w))&&(l[u++]=p),p++}v=!0}}if(!v)if(a===1)for(var m=0;m=f&&y<=d||isNaN(y))&&(l[u++]=S)}else for(var m=0;mt[P][1])&&(C=!1)}C&&(l[u++]=r.getRawIndex(m))}return um[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(t,r){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,f,d,h=new(ll(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var v=1;vc&&(c=f,d=b)}A>0&&Ac-v&&(l=c-v,s.length=l);for(var p=0;pf[1]&&(f[1]=m),d[h++]=y}return a._count=h,a._indices=d,a._updateGetRawIdx(),a},e.prototype.each=function(t,r){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();al&&(l=f)}return o=[s,l],this._extent[t]=o,o},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function t(r,n,i,a){return Vf(r[a],this._dimensions[a])}Kv={arrayRows:t,objectRows:function(r,n,i,a){return Vf(r[n],this._dimensions[a])},keyedColumns:t,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return Vf(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),e}(),OK=function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,r){this._sourceList=t,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(Yc(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=zr(s)?Ji:dn,a=[];var f=this._getSourceMetaRawOption()||{},d=u&&u.metaRawOption||{},h=qe(f.seriesLayoutBy,d.seriesLayoutBy)||null,v=qe(f.sourceHeader,d.sourceHeader),p=qe(f.dimensions,d.dimensions),g=h!==d.seriesLayoutBy||!!v!=!!d.sourceHeader||p;i=g?[rm(s,{seriesLayoutBy:h,sourceHeader:v,dimensions:p},l)]:[]}else{var m=t;if(n){var y=this._applyTransform(r);i=y.sourceList,a=y.upstreamSignList}else{var _=m.get("source",!0);i=[rm(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},e.prototype._applyTransform=function(t){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&Ax(a)}var o,s=[],l=[];return O(t,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&Ax(f),s.push(c),l.push(u._getVersionSign())}),n?o=EK(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[fK(s[0])]),{sourceList:o,upstreamSignList:l}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),r=0;rr:i+c+h>r){c?(s||l)&&(v?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=d,u+=h,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=d,c=h)):v?(a.push(l),o.push(u),l=d,u=h):(a.push(d),o.push(h));continue}c+=h,v?(l+=d,u+=h):(l&&(s+=l,l="",u=0),s+=d)}return!a.length&&!s&&(s=e,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}var Wg="__zr_style_"+Math.round(Math.random()*10),lo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},dh={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};lo[Wg]=!0;var gw=["z","z2","invisible"],aY=["invisible"],oY=function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=Tt(r),i=0;i1e-4){s[0]=e-r,s[1]=t-n,l[0]=e+r,l[1]=t+n;return}if(Nc[0]=Lv(i)*r+e,Nc[1]=Pv(i)*n+t,Fc[0]=Lv(a)*r+e,Fc[1]=Pv(a)*n+t,u(s,Nc,Fc),c(l,Nc,Fc),i=i%Ca,i<0&&(i=i+Ca),a=a%Ca,a<0&&(a=a+Ca),i>a&&!o?a+=Ca:ii&&(Bc[0]=Lv(h)*r+e,Bc[1]=Pv(h)*n+t,u(s,Bc,s),c(l,Bc,l))}var at={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ta=[],Ma=[],Rn=[],Oi=[],kn=[],Nn=[],Dv=Math.min,Iv=Math.max,Aa=Math.cos,Ea=Math.sin,oi=Math.abs,Vg=Math.PI,zi=Vg*2,Ov=typeof Float32Array<"u",nl=[];function Rv(e){var t=Math.round(e/Vg*1e8)/1e8;return t%2*Vg}function fY(e,t){var r=Rv(e[0]);r<0&&(r+=zi);var n=r-e[0],i=e[1];i+=n,!t&&i-r>=zi?i=r+zi:t&&r-i>=zi?i=r-zi:!t&&r>i?i=r+(zi-Rv(r-i)):t&&r0&&(this._ux=oi(n/pd/t)||0,this._uy=oi(n/pd/r)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,r){return this._drawPendingPt(),this.addData(at.M,t,r),this._ctx&&this._ctx.moveTo(t,r),this._x0=t,this._y0=r,this._xi=t,this._yi=r,this},e.prototype.lineTo=function(t,r){var n=oi(t-this._xi),i=oi(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(at.L,t,r),this._ctx&&a&&this._ctx.lineTo(t,r),a)this._xi=t,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=r,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){return this._drawPendingPt(),this.addData(at.C,t,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,r,n,i,a,o),this._xi=a,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,r,n,i){return this._drawPendingPt(),this.addData(at.Q,t,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,r,n,i),this._xi=n,this._yi=i,this},e.prototype.arc=function(t,r,n,i,a,o){this._drawPendingPt(),nl[0]=i,nl[1]=a,fY(nl,o),i=nl[0],a=nl[1];var s=a-i;return this.addData(at.A,t,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,r,n,i,a,o),this._xi=Aa(a)*n+t,this._yi=Ea(a)*n+r,this},e.prototype.arcTo=function(t,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,r,n,i,a),this},e.prototype.rect=function(t,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,r,n,i),this.addData(at.R,t,r,n,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(at.Z);var t=this._ctx,r=this._x0,n=this._y0;return t&&t.closePath(),this._xi=r,this._yi=n,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){var r=t.length;!(this.data&&this.data.length===r)&&Ov&&(this.data=new Float32Array(r));for(var n=0;nc.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],r=0;r11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){Rn[0]=Rn[1]=kn[0]=kn[1]=Number.MAX_VALUE,Oi[0]=Oi[1]=Nn[0]=Nn[1]=-Number.MAX_VALUE;var t=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||oi(_)>i||d===r-1)&&(p=Math.sqrt(y*y+_*_),a=g,o=m);break}case at.C:{var b=t[d++],x=t[d++],g=t[d++],m=t[d++],w=t[d++],S=t[d++];p=L9(a,o,b,x,g,m,w,S,10),a=w,o=S;break}case at.Q:{var b=t[d++],x=t[d++],g=t[d++],m=t[d++];p=I9(a,o,b,x,g,m,10),a=g,o=m;break}case at.A:var C=t[d++],M=t[d++],P=t[d++],A=t[d++],T=t[d++],D=t[d++],N=D+T;d+=1,t[d++],v&&(s=Aa(T)*P+C,l=Ea(T)*A+M),p=Iv(P,A)*Dv(zi,Math.abs(D)),a=Aa(N)*P+C,o=Ea(N)*A+M;break;case at.R:{s=a=t[d++],l=o=t[d++];var H=t[d++],$=t[d++];p=H*2+$*2;break}case at.Z:{var y=s-a,_=l-o;p=Math.sqrt(y*y+_*_),a=s,o=l;break}}p>=0&&(u[f++]=p,c+=p)}return this._pathLen=c,c},e.prototype.rebuildPath=function(t,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,d,h=r<1,v,p,g=0,m=0,y,_=0,b,x;if(h&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,p=this._pathLen,y=r*p,!y))return;e:for(var w=0;w0&&(t.lineTo(b,x),_=0),S){case at.M:s=u=n[w++],l=c=n[w++],t.moveTo(u,c);break;case at.L:{f=n[w++],d=n[w++];var M=oi(f-u),P=oi(d-c);if(M>i||P>a){if(h){var A=v[m++];if(g+A>y){var T=(y-g)/A;t.lineTo(u*(1-T)+f*T,c*(1-T)+d*T);break e}g+=A}t.lineTo(f,d),u=f,c=d,_=0}else{var D=M*M+P*P;D>_&&(b=f,x=d,_=D)}break}case at.C:{var N=n[w++],H=n[w++],$=n[w++],G=n[w++],F=n[w++],R=n[w++];if(h){var A=v[m++];if(g+A>y){var T=(y-g)/A;dd(u,N,$,F,T,Ta),dd(c,H,G,R,T,Ma),t.bezierCurveTo(Ta[1],Ma[1],Ta[2],Ma[2],Ta[3],Ma[3]);break e}g+=A}t.bezierCurveTo(N,H,$,G,F,R),u=F,c=R;break}case at.Q:{var N=n[w++],H=n[w++],$=n[w++],G=n[w++];if(h){var A=v[m++];if(g+A>y){var T=(y-g)/A;hd(u,N,$,T,Ta),hd(c,H,G,T,Ma),t.quadraticCurveTo(Ta[1],Ma[1],Ta[2],Ma[2]);break e}g+=A}t.quadraticCurveTo(N,H,$,G),u=$,c=G;break}case at.A:var j=n[w++],re=n[w++],oe=n[w++],ye=n[w++],Ae=n[w++],V=n[w++],Q=n[w++],W=!n[w++],q=oe>ye?oe:ye,le=oi(oe-ye)>.001,de=Ae+V,J=!1;if(h){var A=v[m++];g+A>y&&(de=Ae+V*(y-g)/A,J=!0),g+=A}if(le&&t.ellipse?t.ellipse(j,re,oe,ye,Q,Ae,de,W):t.arc(j,re,q,Ae,de,W),J)break e;C&&(s=Aa(Ae)*oe+j,l=Ea(Ae)*ye+re),u=Aa(de)*oe+j,c=Ea(de)*ye+re;break;case at.R:s=u=n[w],l=c=n[w+1],f=n[w++],d=n[w++];var L=n[w++],I=n[w++];if(h){var A=v[m++];if(g+A>y){var z=y-g;t.moveTo(f,d),t.lineTo(f+Dv(z,L),d),z-=L,z>0&&t.lineTo(f+L,d+Dv(z,I)),z-=I,z>0&&t.lineTo(f+Iv(L-z,0),d+I),z-=L,z>0&&t.lineTo(f,d+Iv(I-z,0));break e}g+=A}t.rect(f,d,L,I);break;case at.Z:if(h){var A=v[m++];if(g+A>y){var T=(y-g)/A;t.lineTo(u*(1-T)+s*T,c*(1-T)+l*T);break e}g+=A}t.closePath(),u=s,c=l}}},e.prototype.clone=function(){var t=new e,r=this.data;return t.data=r.slice?r.slice():Array.prototype.slice.call(r),t._len=this._len,t},e.CMD=at,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();const _o=dY;function Fo(e,t,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=e;if(o>t+s&&o>n+s||oe+s&&a>r+s||at+f&&c>n+f&&c>a+f&&c>s+f||ce+f&&u>r+f&&u>i+f&&u>o+f||ut+u&&l>n+u&&l>a+u||le+u&&s>r+u&&s>i+u||sr||c+ui&&(i+=il);var d=Math.atan2(l,s);return d<0&&(d+=il),d>=n&&d<=i||d+il>=n&&d+il<=i}function Pa(e,t,r,n,i,a){if(a>t&&a>n||ai?s:0}var Ri=_o.CMD,La=Math.PI*2,gY=1e-4;function mY(e,t){return Math.abs(e-t)t&&u>n&&u>a&&u>s||u1&&yY(),h=jt(t,n,a,s,Kr[0]),d>1&&(v=jt(t,n,a,s,Kr[1]))),d===2?gt&&s>n&&s>a||s=0&&u<=1){for(var c=0,f=Jt(t,n,a,u),d=0;dr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);or[0]=-l,or[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=La-1e-4){n=0,i=La;var c=a?1:-1;return o>=or[0]+e&&o<=or[1]+e?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=La,i+=La);for(var d=0,h=0;h<2;h++){var v=or[h];if(v+e>o){var p=Math.atan2(s,v),c=a?1:-1;p<0&&(p=La+p),(p>=n&&p<=i||p+La>=n&&p+La<=i)&&(p>Math.PI/2&&p1&&(r||(s+=Pa(l,u,c,f,n,i))),g&&(l=a[v],u=a[v+1],c=l,f=u),p){case Ri.M:c=a[v++],f=a[v++],l=c,u=f;break;case Ri.L:if(r){if(Fo(l,u,a[v],a[v+1],t,n,i))return!0}else s+=Pa(l,u,a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Ri.C:if(r){if(hY(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],t,n,i))return!0}else s+=_Y(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Ri.Q:if(r){if(vY(l,u,a[v++],a[v++],a[v],a[v+1],t,n,i))return!0}else s+=bY(l,u,a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Ri.A:var m=a[v++],y=a[v++],_=a[v++],b=a[v++],x=a[v++],w=a[v++];v+=1;var S=!!(1-a[v++]);d=Math.cos(x)*_+m,h=Math.sin(x)*b+y,g?(c=d,f=h):s+=Pa(l,u,d,h,n,i);var C=(n-m)*b/_+m;if(r){if(pY(m,y,b,x,x+w,S,t,C,i))return!0}else s+=wY(m,y,b,x,x+w,S,C,i);l=Math.cos(x+w)*_+m,u=Math.sin(x+w)*b+y;break;case Ri.R:c=l=a[v++],f=u=a[v++];var M=a[v++],P=a[v++];if(d=c+M,h=f+P,r){if(Fo(c,f,d,f,t,n,i)||Fo(d,f,d,h,t,n,i)||Fo(d,h,c,h,t,n,i)||Fo(c,h,c,f,t,n,i))return!0}else s+=Pa(d,f,d,h,n,i),s+=Pa(c,h,c,f,n,i);break;case Ri.Z:if(r){if(Fo(l,u,c,f,t,n,i))return!0}else s+=Pa(l,u,c,f,n,i);l=c,u=f;break}}return!r&&!mY(u,f)&&(s+=Pa(l,u,c,f,n,i)||0),s!==0}function xY(e,t,r){return k2(e,0,!1,t,r)}function SY(e,t,r,n){return k2(e,t,!0,r,n)}var N2=dt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},lo),CY={style:dt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},dh.style)},kv=Cu.concat(["invisible","culling","z","z2","zlevel","parent"]),TY=function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype.update=function(){var r=this;e.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Fg:n>.2?rj:Bg}else if(r)return Bg}return Fg},t.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(Te(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=vd(r,0)0))},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Ko)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),SY(s,l/u,r,n)))return!0}if(this.hasFill())return xY(s,r,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Ko,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(r){return this.animate("shape",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):e.prototype.attrKV.call(this,r,n)},t.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:se(i,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Ko)},t.prototype.createStyle=function(r){return sh(N2,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=se({},this.shape))},t.prototype._applyStateObj=function(r,n,i,a,o,s){e.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=se({},i.shape),se(u,n.shape)):(u=se({},a?this.shape:i.shape),se(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=se({},this.shape);for(var c={},f=Tt(u),d=0;d0},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(r){return sh(MY,r)},t.prototype.setBoundingRect=function(r){this._rect=r},t.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var n=r.text;n!=null?n+="":n="";var i=Zy(n,r.font,r.textAlign,r.textBaseline);if(i.x+=r.x||0,i.y+=r.y||0,this.hasStroke()){var a=r.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},t.initDefaultProps=function(){var r=t.prototype;r.dirtyRectTolerance=10}(),t}(ac);F2.prototype.type="tspan";const Gg=F2;var AY=dt({x:0,y:0},lo),EY={style:dt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},dh.style)};function PY(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var B2=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(r){return sh(AY,r)},t.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=PY(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return EY},t.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new et(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},t}(ac);B2.prototype.type="image";const zs=B2;function LY(e,t){var r=t.x,n=t.y,i=t.width,a=t.height,o=t.r,s,l,u,c;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>i&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),e.moveTo(r+s,n),e.lineTo(r+i-l,n),l!==0&&e.arc(r+i-l,n+l,l,-Math.PI/2,0),e.lineTo(r+i,n+a-u),u!==0&&e.arc(r+i-u,n+a-u,u,0,Math.PI/2),e.lineTo(r+c,n+a),c!==0&&e.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),e.lineTo(r,n+s),s!==0&&e.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var rs=Math.round;function $2(e,t,r){if(t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=n,e.x2=i,e.y1=a,e.y2=o;var s=r&&r.lineWidth;return s&&(rs(n*2)===rs(i*2)&&(e.x1=e.x2=eo(n,s,!0)),rs(a*2)===rs(o*2)&&(e.y1=e.y2=eo(a,s,!0))),e}}function H2(e,t,r){if(t){var n=t.x,i=t.y,a=t.width,o=t.height;e.x=n,e.y=i,e.width=a,e.height=o;var s=r&&r.lineWidth;return s&&(e.x=eo(n,s,!0),e.y=eo(i,s,!0),e.width=Math.max(eo(n+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(eo(i+o,s,!1)-e.y,o===0?0:1)),e}}function eo(e,t,r){if(!t)return e;var n=rs(e*2);return(n+rs(t))%2===0?n/2:(n+(r?1:-1))/2}var DY=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),IY={},z2=function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new DY},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=H2(IY,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?LY(r,n):r.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(ht);z2.prototype.type="rect";const Ht=z2;var ww={fill:"#000"},xw=2,OY={style:dt({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},dh.style)},W2=function(e){pe(t,e);function t(r){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=ww,n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,T=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),D=o.calculatedLineHeight,N=0;N=0&&(N=w[D],N.align==="right");)this._placeToken(N,r,C,m,T,"right",_),M-=N.width,T-=N.width,D--;for(A+=(a-(A-g)-(y-T)-M)/2;P<=D;)N=w[P],this._placeToken(N,r,C,m,A+N.width/2,"center",_),A+=N.width,P++;m+=C}},t.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,f=a+i/2;c==="top"?f=a+r.height/2:c==="bottom"&&(f=a+i-r.height/2);var d=!r.isLineHolder&&Nv(u);d&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,f-r.height/2,r.width,r.height);var h=!!u.backgroundColor,v=r.textPadding;v&&(o=Ew(o,s,v),f-=r.height/2-v[0]-r.innerHeight/2);var p=this._getOrCreateChild(Gg),g=p.createStyle();p.useStyle(g);var m=this._defaultStyle,y=!1,_=0,b=Aw("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,m.fill)),x=Mw("stroke"in u?u.stroke:"stroke"in n?n.stroke:!h&&!l&&(!m.autoStroke||y)?(_=xw,m.stroke):null),w=u.textShadowBlur>0||n.textShadowBlur>0;g.text=r.text,g.x=o,g.y=f,w&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=r.font||yo,g.opacity=zl(u.opacity,n.opacity,1),Cw(g,u),x&&(g.lineWidth=zl(u.lineWidth,n.lineWidth,_),g.lineDash=qe(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=x),b&&(g.fill=b);var S=r.contentWidth,C=r.contentHeight;p.setBoundingRect(new et(Sl(g.x,S,g.textAlign),Xo(g.y,C,g.textBaseline),S,C))},t.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,f=l&&l.image,d=l&&!f,h=r.borderRadius,v=this,p,g;if(d||r.lineHeight||u&&c){p=this._getOrCreateChild(Ht),p.useStyle(p.createStyle()),p.style.fill=null;var m=p.shape;m.x=i,m.y=a,m.width=o,m.height=s,m.r=h,p.dirtyShape()}if(d){var y=p.style;y.fill=l||null,y.fillOpacity=qe(r.fillOpacity,1)}else if(f){g=this._getOrCreateChild(zs),g.onload=function(){v.dirtyStyle()};var _=g.style;_.image=l.image,_.x=i,_.y=a,_.width=o,_.height=s}if(u&&c){var y=p.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=qe(r.strokeOpacity,1),y.lineDash=r.borderDash,y.lineDashOffset=r.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var b=(p||g).style;b.shadowBlur=r.shadowBlur||0,b.shadowColor=r.shadowColor||"transparent",b.shadowOffsetX=r.shadowOffsetX||0,b.shadowOffsetY=r.shadowOffsetY||0,b.opacity=zl(r.opacity,n.opacity,1)},t.makeFont=function(r){var n="";return FY(r)&&(n=[r.fontStyle,r.fontWeight,NY(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Vn(n)||r.textFont||r.font},t}(ac),RY={left:!0,right:1,center:1},kY={top:1,bottom:1,middle:1},Sw=["fontStyle","fontWeight","fontSize","fontFamily"];function NY(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?zy+"px":e+"px"}function Cw(e,t){for(var r=0;r=0,a=!1;if(e instanceof ht){var o=V2(e),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Bo(s)||Bo(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=se({},n),u=se({},u),u.fill=s):!Bo(u.fill)&&Bo(s)?(a=!0,n=se({},n),u=se({},u),u.fill=Ow(s)):!Bo(u.stroke)&&Bo(l)&&(a||(n=se({},n),u=se({},u)),u.stroke=Ow(l)),n.style=u}}if(n&&n.z2==null){a||(n=se({},n));var c=e.z2EmphasisLift;n.z2=e.z2+(c??HY)}return n}function jY(e,t,r){if(r&&r.z2==null){r=se({},r);var n=e.z2SelectLift;r.z2=e.z2+(n??zY)}return r}function YY(e,t,r){var n=ot(e.currentStates,t)>=0,i=e.style.opacity,a=n?null:GY(e,["opacity"],t,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=se({},r),o=se({opacity:n?i:a.opacity*.1},o),r.style=o),r}function Fv(e,t){var r=this.states[e];if(this.style){if(e==="emphasis")return UY(this,e,t,r);if(e==="blur")return YY(this,e,r);if(e==="select")return jY(this,e,r)}return r}function qY(e){e.stateProxy=Fv;var t=e.getTextContent(),r=e.getTextGuideLine();t&&(t.stateProxy=Fv),r&&(r.stateProxy=Fv)}function kw(e,t){!Z2(e,t)&&!e.__highByOuter&&Ai(e,U2)}function Nw(e,t){!Z2(e,t)&&!e.__highByOuter&&Ai(e,j2)}function Ug(e,t){e.__highByOuter|=1<<(t||0),Ai(e,U2)}function jg(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Ai(e,j2)}function KY(e){Ai(e,s0)}function q2(e){Ai(e,Y2)}function K2(e){Ai(e,WY)}function X2(e){Ai(e,VY)}function Z2(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Q2(e){var t=e.getModel(),r=[],n=[];t.eachComponent(function(i,a){var o=i0(a),s=i==="series",l=s?e.getViewOfSeriesModel(a):e.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){Y2(u)}),s&&r.push(a)),o.isBlured=!1}),O(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,t)})}function Yg(e,t,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function Kg(e,t,r){tE(e,!0),Ai(e,qY),r7(e,t,r)}function t7(e){tE(e,!1)}function J2(e,t,r,n){n?t7(e):Kg(e,t,r)}function r7(e,t,r){var n=ft(e);t!=null?(n.focus=t,n.blurScope=r):n.focus&&(n.focus=null)}var Bw=["emphasis","blur","select"],n7={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function eE(e,t,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=Bv(v),s*=Bv(v));var p=(i===a?-1:1)*Bv((o*o*(s*s)-o*o*(h*h)-s*s*(d*d))/(o*o*(h*h)+s*s*(d*d)))||0,g=p*o*h/s,m=p*-s*d/o,y=(e+r)/2+Hc(f)*g-$c(f)*m,_=(t+n)/2+$c(f)*g+Hc(f)*m,b=Ww([1,0],[(d-g)/o,(h-m)/s]),x=[(d-g)/o,(h-m)/s],w=[(-1*d-g)/o,(-1*h-m)/s],S=Ww(x,w);if(Qg(x,w)<=-1&&(S=al),Qg(x,w)>=1&&(S=0),S<0){var C=Math.round(S/al*1e6)/1e6;S=al*2+C%2*al}c.addData(u,y,_,o,s,b,S,f,a)}var u7=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,c7=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function f7(e){var t=new _o;if(!e)return t;var r=0,n=0,i=r,a=n,o,s=_o.CMD,l=e.match(u7);if(!l)return t;for(var u=0;uN*N+H*H&&(C=P,M=A),{cx:C,cy:M,x0:-c,y0:-f,x1:C*(i/x-1),y1:M*(i/x-1)}}function _7(e){var t;if(ge(e)){var r=e.length;if(!r)return e;r===1?t=[e[0],e[0],0,0]:r===2?t=[e[0],e[0],e[1],e[1]]:r===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function b7(e,t){var r,n=Cl(t.r,0),i=Cl(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,f=t.cy,d=!!t.clockwise,h=Gw(u-l),v=h>$v&&h%$v;if(v>gn&&(h=v),!(n>gn))e.moveTo(c,f);else if(h>$v-gn)e.moveTo(c+n*Ho(l),f+n*Da(l)),e.arc(c,f,n,l,u,!d),i>gn&&(e.moveTo(c+i*Ho(u),f+i*Da(u)),e.arc(c,f,i,u,l,d));else{var p=void 0,g=void 0,m=void 0,y=void 0,_=void 0,b=void 0,x=void 0,w=void 0,S=void 0,C=void 0,M=void 0,P=void 0,A=void 0,T=void 0,D=void 0,N=void 0,H=n*Ho(l),$=n*Da(l),G=i*Ho(u),F=i*Da(u),R=h>gn;if(R){var j=t.cornerRadius;j&&(r=_7(j),p=r[0],g=r[1],m=r[2],y=r[3]);var re=Gw(n-i)/2;if(_=Fn(re,m),b=Fn(re,y),x=Fn(re,p),w=Fn(re,g),M=S=Cl(_,b),P=C=Cl(x,w),(S>gn||C>gn)&&(A=n*Ho(u),T=n*Da(u),D=i*Ho(l),N=i*Da(l),hgn){var le=Fn(m,M),de=Fn(y,M),J=zc(D,N,H,$,n,le,d),L=zc(A,T,G,F,n,de,d);e.moveTo(c+J.cx+J.x0,f+J.cy+J.y0),M0&&e.arc(c+J.cx,f+J.cy,le,Zt(J.y0,J.x0),Zt(J.y1,J.x1),!d),e.arc(c,f,n,Zt(J.cy+J.y1,J.cx+J.x1),Zt(L.cy+L.y1,L.cx+L.x1),!d),de>0&&e.arc(c+L.cx,f+L.cy,de,Zt(L.y1,L.x1),Zt(L.y0,L.x0),!d))}else e.moveTo(c+H,f+$),e.arc(c,f,n,l,u,!d);if(!(i>gn)||!R)e.lineTo(c+G,f+F);else if(P>gn){var le=Fn(p,P),de=Fn(g,P),J=zc(G,F,A,T,i,-de,d),L=zc(H,$,D,N,i,-le,d);e.lineTo(c+J.cx+J.x0,f+J.cy+J.y0),P0&&e.arc(c+J.cx,f+J.cy,de,Zt(J.y0,J.x0),Zt(J.y1,J.x1),!d),e.arc(c,f,i,Zt(J.cy+J.y1,J.cx+J.x1),Zt(L.cy+L.y1,L.cx+L.x1),d),le>0&&e.arc(c+L.cx,f+L.cy,le,Zt(L.y1,L.x1),Zt(L.y0,L.x0),!d))}else e.lineTo(c+G,f+F),e.arc(c,f,i,u,l,d)}e.closePath()}}}var w7=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),uE=function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new w7},t.prototype.buildPath=function(r,n){b7(r,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(ht);uE.prototype.type="sector";const Ao=uE;var x7=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),cE=function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new x7},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},t}(ht);cE.prototype.type="ring";const fE=cE;function S7(e,t,r,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var d=0,h=e.length;d=2){if(n){var a=S7(i,n,r,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;sOa[1]){if(s=!1,a)return s;var c=Math.abs(Oa[0]-Ia[1]),f=Math.abs(Ia[0]-Oa[1]);Math.min(c,f)>i.len()&&(c0){var f=c.duration,d=c.delay,h=c.easing,v={duration:f,delay:d||0,easing:h,done:a,force:!!a||!!o,setToFinal:!u,scope:e,during:o};s?t.animateFrom(r,v):t.animateTo(r,v)}else t.stopAnimation(),!s&&t.attr(r),o&&o(1),a&&a()}function Pr(e,t,r,n,i,a){f0("update",e,t,r,n,i,a)}function Hr(e,t,r,n,i,a){f0("enter",e,t,r,n,i,a)}function fs(e){if(!e.__zr)return!0;for(var t=0;tMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Yw(e){return!e.isGroup}function Q7(e){return e.shape!=null}function ME(e,t,r){if(!e||!t)return;function n(o){var s={};return o.traverse(function(l){Yw(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return Q7(o)&&(s.shape=se({},o.shape)),s}var a=n(e);t.traverse(function(o){if(Yw(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Pr(o,l,r,ft(o).dataIndex)}}})}function J7(e,t){return Re(e,function(r){var n=r[0];n=xd(n,t.x),n=Sd(n,t.x+t.width);var i=r[1];return i=xd(i,t.y),i=Sd(i,t.y+t.height),[n,i]})}function eq(e,t){var r=xd(e.x,t.x),n=Sd(e.x+e.width,t.x+t.width),i=xd(e.y,t.y),a=Sd(e.y+e.height,t.y+t.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function v0(e,t,r){var n=se({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(i.image=e.slice(8),dt(i,r),new zs(n)):d0(e.replace("path://",""),n,r,"center")}function tq(e,t,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=Hv(h,v,c,f)/d;return!(g<0||g>1)}function Hv(e,t,r,n){return e*n-r*t}function rq(e){return e<=1e-6&&e>=-1e-6}function p0(e){var t=e.itemTooltipOption,r=e.componentModel,n=e.itemName,i=Te(t)?{formatter:t}:t,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=e.formatterParamsExtra;l&&O(Tt(l),function(c){Ps(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=ft(e.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:dt({content:n,formatterParams:s},i)}}function qw(e,t){var r;e.isGroup&&(r=t(e)),r||e.traverse(t)}function g0(e,t){if(e)if(ge(e))for(var r=0;r=0&&s.push(l)}),s}}function IE(e,t){return st(st({},e,!0),t,!0)}const _q={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},bq={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Cd="ZH",y0="EN",Eu=y0,zf={},_0={},OE=Ge.domSupported?function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return e.indexOf(Cd)>-1?Cd:Eu}():Eu;function RE(e,t){e=e.toUpperCase(),_0[e]=new rr(t),zf[e]=t}function wq(e){if(Te(e)){var t=zf[e.toUpperCase()]||{};return e===Cd||e===y0?Qe(t):st(Qe(t),Qe(zf[Eu]),!1)}else return st(Qe(e),Qe(zf[Eu]),!1)}function xq(e){return _0[e]}function Sq(){return _0[Eu]}RE(y0,_q);RE(Cd,bq);var b0=1e3,w0=b0*60,Kl=w0*60,en=Kl*24,ex=en*365,Tl={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Gc="{yyyy}-{MM}-{dd}",tx={year:"{yyyy}",month:"{yyyy}-{MM}",day:Gc,hour:Gc+" "+Tl.hour,minute:Gc+" "+Tl.minute,second:Gc+" "+Tl.second,millisecond:Tl.none},Vv=["year","month","day","hour","minute","second","millisecond"],kE=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Ra(e,t){return e+="","0000".substr(0,t-e.length)+e}function ds(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function Cq(e){return e===ds(e)}function Tq(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function mh(e,t,r,n){var i=wi(e),a=i[x0(r)](),o=i[hs(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[yh(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[Pu(r)](),f=(c-1)%12+1,d=i[_h(r)](),h=i[bh(r)](),v=i[wh(r)](),p=n instanceof rr?n:xq(n||OE)||Sq(),g=p.getModel("time"),m=g.get("month"),y=g.get("monthAbbr"),_=g.get("dayOfWeek"),b=g.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,a%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,Ra(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Ra(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Ra(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Ra(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Ra(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,Ra(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,Ra(v,3)).replace(/{S}/g,v+"")}function Mq(e,t,r,n,i){var a=null;if(Te(r))a=r;else if(Ve(r))a=r(e.value,t,{level:e.level});else{var o=se({},Tl);if(e.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(ge(a)){var f=e.level==null?0:e.level>=0?e.level:a.length+e.level;f=Math.min(f,a.length-1),a=a[f]}}return mh(new Date(e.value),a,i,n)}function NE(e,t){var r=wi(e),n=r[hs(t)]()+1,i=r[yh(t)](),a=r[Pu(t)](),o=r[_h(t)](),s=r[bh(t)](),l=r[wh(t)](),u=l===0,c=u&&s===0,f=c&&o===0,d=f&&a===0,h=d&&i===1,v=h&&n===1;return v?"year":h?"month":d?"day":f?"hour":c?"minute":u?"second":"millisecond"}function rx(e,t,r){var n=bt(e)?wi(e):e;switch(t=t||NE(e,r),t){case"year":return n[x0(r)]();case"half-year":return n[hs(r)]()>=6?1:0;case"quarter":return Math.floor((n[hs(r)]()+1)/4);case"month":return n[hs(r)]();case"day":return n[yh(r)]();case"half-day":return n[Pu(r)]()/24;case"hour":return n[Pu(r)]();case"minute":return n[_h(r)]();case"second":return n[bh(r)]();case"millisecond":return n[wh(r)]()}}function x0(e){return e?"getUTCFullYear":"getFullYear"}function hs(e){return e?"getUTCMonth":"getMonth"}function yh(e){return e?"getUTCDate":"getDate"}function Pu(e){return e?"getUTCHours":"getHours"}function _h(e){return e?"getUTCMinutes":"getMinutes"}function bh(e){return e?"getUTCSeconds":"getSeconds"}function wh(e){return e?"getUTCMilliseconds":"getMilliseconds"}function Aq(e){return e?"setUTCFullYear":"setFullYear"}function FE(e){return e?"setUTCMonth":"setMonth"}function BE(e){return e?"setUTCDate":"setDate"}function $E(e){return e?"setUTCHours":"setHours"}function HE(e){return e?"setUTCMinutes":"setMinutes"}function zE(e){return e?"setUTCSeconds":"setSeconds"}function WE(e){return e?"setUTCMilliseconds":"setMilliseconds"}function VE(e){if(!xj(e))return Te(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function GE(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var xh=jA;function tm(e,t,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Vn(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=t==="time",s=e instanceof Date;if(o||s){var l=o?wi(e):e;if(isNaN(+l)){if(s)return"-"}else return mh(l,n,r)}if(t==="ordinal")return wg(e)?i(e):bt(e)&&a(e)?e+"":"-";var u=yd(e);return a(u)?VE(u):wg(e)?i(e):typeof e=="boolean"?e+"":"-"}var nx=["a","b","c","d","e","f","g"],Gv=function(e,t){return"{"+e+(t??"")+"}"};function UE(e,t,r){ge(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function Lu(e,t){return t=t||"transparent",Te(e)?e:Ie(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function ix(e,t){if(t==="_blank"||t==="blank"){var r=window.open();r.opener=null,r.location.href=e}else window.open(e,t)}var Wf=O,Pq=["left","right","top","bottom","width","height"],Uc=[["width","left","right"],["height","top","bottom"]];function S0(e,t,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),f=t.childAt(u+1),d=f&&f.getBoundingRect(),h,v;if(e==="horizontal"){var p=c.width+(d?-d.x+c.x:0);h=a+p,h>n||l.newline?(a=0,h=p,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var g=c.height+(d?-d.y+c.y:0);v=o+g,v>i||l.newline?(a+=s+r,o=0,v=g,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),e==="horizontal"?a=h+r:o=v+r)})}var Xl=S0;Rt(S0,"vertical");Rt(S0,"horizontal");function Ls(e,t,r){r=xh(r||0);var n=t.width,i=t.height,a=gt(e.left,n),o=gt(e.top,i),s=gt(e.right,n),l=gt(e.bottom,i),u=gt(e.width,n),c=gt(e.height,i),f=r[2]+r[0],d=r[1]+r[3],h=e.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(c)&&(c=i-l-f-o),h!=null&&(isNaN(u)&&isNaN(c)&&(h>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(a)&&(a=n-s-u-d),isNaN(o)&&(o=i-l-c-f),e.left||e.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-d;break}switch(e.top||e.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var v=new et(a+r[3],o+r[0],u,c);return v.margin=r,v}function Du(e){var t=e.layoutMode||e.constructor.layoutMode;return Ie(t)?t:t?{type:t}:null}function Ds(e,t,r){var n=r&&r.ignoreSize;!ge(n)&&(n=[n,n]);var i=o(Uc[0],0),a=o(Uc[1],1);u(Uc[0],e,i),u(Uc[1],e,a);function o(c,f){var d={},h=0,v={},p=0,g=2;if(Wf(c,function(_){v[_]=e[_]}),Wf(c,function(_){s(t,_)&&(d[_]=v[_]=t[_]),l(d,_)&&h++,l(v,_)&&p++}),n[f])return l(t,c[1])?v[c[2]]=null:l(t,c[2])&&(v[c[1]]=null),v;if(p===g||!h)return v;if(h>=g)return d;for(var m=0;m=0;l--)s=st(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return ic(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){var r=this;return{left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(r){this.option.zlevel=r},t.protoInitialize=function(){var r=t.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),t}(rr);L2(Ws,rr);ch(Ws);mq(Ws);yq(Ws,Iq);function Iq(e){var t=[];return O(Ws.getClassesByMainType(e),function(r){t=t.concat(r.dependencies||r.prototype.dependencies||[])}),t=Re(t,function(r){return Gn(r).main}),e!=="dataset"&&ot(t,"dataset")<=0&&t.unshift("dataset"),t}const xt=Ws;var jE="";typeof navigator<"u"&&(jE=navigator.platform||"");var zo="rgba(0, 0, 0, 0.2)";const Oq={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:zo,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:zo,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:zo,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:zo,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:zo,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:zo,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:jE.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 YE=Ue(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),dn="original",Lr="arrayRows",In="objectRows",ti="keyedColumns",Ji="typedArray",qE="unknown",pi="column",Vs="row",Ut={Must:1,Might:2,Not:3},KE=Et();function Rq(e){KE(e).datasetMap=Ue()}function kq(e,t,r){var n={},i=C0(t);if(!i||!e)return n;var a=[],o=[],s=t.ecModel,l=KE(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,f;e=e.slice(),O(e,function(p,g){var m=Ie(p)?p:e[g]={name:p};m.type==="ordinal"&&c==null&&(c=g,f=v(m)),n[m.name]=[]});var d=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});O(e,function(p,g){var m=p.name,y=v(p);if(c==null){var _=d.valueWayDim;h(n[m],_,y),h(o,_,y),d.valueWayDim+=y}else if(c===g)h(n[m],0,y),h(a,0,y);else{var _=d.categoryWayDim;h(n[m],_,y),h(o,_,y),d.categoryWayDim+=y}});function h(p,g,m){for(var y=0;yt)return e[n];return e[r-1]}function zq(e,t,r,n,i,a,o){a=a||e;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:Hq(n,o);if(c=c||r,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function Wq(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var jc,ol,ox,sx="\0_ec_inner",Vq=1,QE=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new rr(a),this._locale=new rr(o),this._optionManager=s},t.prototype.setOption=function(r,n,i){var a=cx(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(r,n){return this._resetOption(r,cx(n))},t.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?ox(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&O(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},t.prototype.mergeOption=function(r){this._mergeOption(r,null)},t.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=Ue(),u=n&&n.replaceMergeMainTypeMap;Rq(this),O(r,function(f,d){f!=null&&(xt.hasClass(d)?d&&(s.push(d),l.set(d,!0)):i[d]=i[d]==null?Qe(f):st(i[d],f,!0))}),u&&u.each(function(f,d){xt.hasClass(d)&&!l.get(d)&&(s.push(d),l.set(d,!0))}),xt.topologicalTravel(s,xt.getAllClassMainTypes(),c,this);function c(f){var d=$q(this,f,cr(r[f])),h=a.get(f),v=h?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",p=Tj(h,d,v);Ij(p,f,xt),i[f]=null,a.set(f,null),o.set(f,0);var g=[],m=[],y=0,_;O(p,function(b,x){var w=b.existing,S=b.newOption;if(!S)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var C=f==="series",M=xt.getClass(f,b.keyInfo.subType,!C);if(!M)return;if(f==="tooltip"){if(_)return;_=!0}if(w&&w.constructor===M)w.name=b.keyInfo.name,w.mergeOption(S,this),w.optionUpdated(S,!1);else{var P=se({componentIndex:x},b.keyInfo);w=new M(S,this,this,P),se(w,P),b.brandNew&&(w.__requireNewView=!0),w.init(S,this,this),w.optionUpdated(null,!0)}}w?(g.push(w.option),m.push(w),y++):(g.push(void 0),m.push(void 0))},this),i[f]=g,a.set(f,m),o.set(f,y),f==="series"&&jc(this)}this._seriesIndices||jc(this)},t.prototype.getOption=function(){var r=Qe(this.option);return O(r,function(n,i){if(xt.hasClass(i)){for(var a=cr(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Tu(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[sx],r},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(r){this._payload=r},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=t:r==="max"?e<=t:e===t}function eK(e,t){return e.join(",")===t.join(",")}const tK=Xq;var hn=O,Iu=Ie,fx=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function jv(e){var t=e&&e.itemStyle;if(t)for(var r=0,n=fx.length;r=0;g--){var m=e[g];if(s||(v=m.data.rawIndexOf(m.stackedByDimension,h)),v>=0){var y=m.data.getByRawIndex(m.stackResultDimension,v);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&d>=0&&y>0||l==="samesign"&&d<=0&&y<0){d=_j(d,y),p=y;break}}}return n[0]=d,n[1]=p,n})})}var Ch=function(){function e(t){this.data=t.data||(t.sourceFormat===ti?{}:[]),this.sourceFormat=t.sourceFormat||qE,this.seriesLayoutBy=t.seriesLayoutBy||pi,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var r=this.dimensionsDefine=t.dimensionsDefine;if(r)for(var n=0;np&&(p=_)}h[0]=v,h[1]=p}},i=function(){return this._data?this._data.length/this._dimSize:0};yx=(t={},t[Lr+"_"+pi]={pure:!0,appendData:a},t[Lr+"_"+Vs]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[In]={pure:!0,appendData:a},t[ti]={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])})}},t[dn]={appendData:a},t[Ji]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},e.prototype.getRawValue=function(t,r){return Is(this.getData(r),t)},e.prototype.formatTooltip=function(t,r,n){},e}();function Sx(e){var t,r;return Ie(e)?e.type&&(r=e):t=e,{text:t,frag:r}}function Zl(e){return new _K(e)}var _K=function(){function e(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return e.prototype.perform=function(t){var r=this._upstream,n=t&&t.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var d=t&&t.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,v=Math.min(d!=null?this._dueIndex+d:1/0,this._dueEnd);if(!n&&(f||h1&&n>0?s:o}};return a;function o(){return t=e?null:li?-this._resultLT:0},e}(),wK=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(t){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(t){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(t,r){},e.prototype.retrieveValueFromItem=function(t,r){},e.prototype.convertValue=function(t,r){return Vf(t,r)},e}();function xK(e,t){var r=new wK,n=e.data,i=r.sourceFormat=e.sourceFormat,a=e.startIndex,o="";e.seriesLayoutBy!==pi&&br(o);var s=[],l={},u=e.dimensionsDefine;if(u)O(u,function(p,g){var m=p.name,y={index:g,name:m,displayName:p.displayName};if(s.push(y),m!=null){var _="";Ps(l,m)&&br(_),l[m]=y}});else for(var c=0;c65535?LK:DK}function Wo(){return[1/0,-1/0]}function IK(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Mx(e,t,r,n,i){var a=fP[r||"float"];if(i){var o=e[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;ug[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},e.prototype._initDataFromProvider=function(t,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Re(o,function(y){return y.property}),c=0;cm[1]&&(m[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,r){if(!(r>=0&&r=0&&r=this._rawCount||t<0)return-1;if(!this._indices)return t;var r=this._indices,n=r[t];if(n!=null&&nt)a=o-1;else return o}return-1},e.prototype.indicesOfNearest=function(t,r,n){var i=this._chunks,a=i[t],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,c=0,f=this.count();c=0&&l<0)&&(s=v,l=h,u=0),h===l&&(o[u++]=c))}return o.length=u,o},e.prototype.getIndices=function(){var t,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a=f&&y<=d||isNaN(y))&&(l[u++]=p),p++}v=!0}else if(a===2){for(var g=h[i[0]],_=h[i[1]],b=t[i[1]][0],x=t[i[1]][1],m=0;m=f&&y<=d||isNaN(y))&&(w>=b&&w<=x||isNaN(w))&&(l[u++]=p),p++}v=!0}}if(!v)if(a===1)for(var m=0;m=f&&y<=d||isNaN(y))&&(l[u++]=S)}else for(var m=0;mt[P][1])&&(C=!1)}C&&(l[u++]=r.getRawIndex(m))}return um[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(t,r){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,f,d,h=new(ll(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var v=1;vc&&(c=f,d=b)}A>0&&Ac-v&&(l=c-v,s.length=l);for(var p=0;pf[1]&&(f[1]=m),d[h++]=y}return a._count=h,a._indices=d,a._updateGetRawIdx(),a},e.prototype.each=function(t,r){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();al&&(l=f)}return o=[s,l],this._extent[t]=o,o},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function t(r,n,i,a){return Vf(r[a],this._dimensions[a])}Kv={arrayRows:t,objectRows:function(r,n,i,a){return Vf(r[n],this._dimensions[a])},keyedColumns:t,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return Vf(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),e}(),OK=function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,r){this._sourceList=t,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(Yc(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=zr(s)?Ji:dn,a=[];var f=this._getSourceMetaRawOption()||{},d=u&&u.metaRawOption||{},h=qe(f.seriesLayoutBy,d.seriesLayoutBy)||null,v=qe(f.sourceHeader,d.sourceHeader),p=qe(f.dimensions,d.dimensions),g=h!==d.seriesLayoutBy||!!v!=!!d.sourceHeader||p;i=g?[rm(s,{seriesLayoutBy:h,sourceHeader:v,dimensions:p},l)]:[]}else{var m=t;if(n){var y=this._applyTransform(r);i=y.sourceList,a=y.upstreamSignList}else{var _=m.get("source",!0);i=[rm(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},e.prototype._applyTransform=function(t){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&Ax(a)}var o,s=[],l=[];return O(t,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&Ax(f),s.push(c),l.push(u._getVersionSign())}),n?o=EK(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[fK(s[0])]),{sourceList:o,upstreamSignList:l}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),r=0;r1||r>0&&!e.noHeader;return O(e.blocks,function(i){var a=pP(i);a>=t&&(t=a+ +(n&&(!a||im(i)&&!i.noHeader)))}),t}return 0}function NK(e,t,r,n){var i=t.noHeader,a=BK(pP(t)),o=[],s=t.blocks||[];bi(!s||ge(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Ps(u,l)){var c=new bK(u[l],null);s.sort(function(v,p){return c.evaluate(v.sortParam,p.sortParam)})}else l==="seriesDesc"&&s.reverse()}O(s,function(v,p){var g=t.valueFormatter,m=vP(v)(g?se(se({},e),{valueFormatter:g}):e,v,p>0?a.html:0,n);m!=null&&o.push(m)});var f=e.renderMode==="richText"?o.join(a.richText):am(o.join(""),i?r:a.html);if(i)return f;var d=tm(t.header,"ordinal",e.useUTC),h=hP(n,e.renderMode).nameStyle;return e.renderMode==="richText"?gP(e,d,h)+a.richText+f:am('
'+Xr(d)+"
"+f,r)}function FK(e,t,r,n){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(b){return b=ge(b)?b:[b],Re(b,function(x,w){return tm(x,ge(h)?h[w]:h,u)})};if(!(a&&o)){var f=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),d=a?"":tm(l,"ordinal",u),h=t.valueType,v=o?[]:c(t.value),p=!s||!a,g=!s&&a,m=hP(n,i),y=m.nameStyle,_=m.valueStyle;return i==="richText"?(s?"":f)+(a?"":gP(e,d,y))+(o?"":zK(e,v,p,g,_)):am((s?"":f)+(a?"":$K(d,!s,y))+(o?"":HK(v,p,g,_)),r)}}function Ex(e,t,r,n,i,a){if(e){var o=vP(e),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,a)}}function BK(e){return{html:RK[e],richText:kK[e]}}function am(e,t){var r='
',n="margin: "+t+"px 0 0";return'
'+e+r+"
"}function $K(e,t,r){var n=t?"margin-left:2px":"";return''+Xr(e)+""}function HK(e,t,r,n){var i=r?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=ge(e)?e:[e],''+Re(e,function(o){return Xr(o)}).join("  ")+""}function gP(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function zK(e,t,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(ge(t)?t.join(" "):t,a)}function WK(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return Lu(n)}function mP(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var Xv=function(){function e(){this.richTextStyles={},this._nextStyleNameId=C2()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var i=n==="richText"?this._generateStyleName():null,a=Eq({color:r,type:t,renderMode:n,markerId:i});return Me(a)?a:(this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};ge(r)?O(r,function(a){return se(n,a)}):se(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e}();function VK(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),l=ge(s),u=WK(t,r),c,f,d,h;if(o>1||l&&!o){var v=GK(s,t,r,a,u);c=v.inlineValues,f=v.inlineValueTypes,d=v.blocks,h=v.inlineValues[0]}else if(o){var p=i.getDimensionInfo(a[0]);h=c=Is(i,r,a[0]),f=p.type}else h=c=l?s[0]:s;var g=t0(t),m=g&&t.name||"",y=i.getName(r),_=n?m:y;return Ou("section",{header:m,noHeader:n||!g,sortParam:h,blocks:[Ou("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Vn(_),value:c,valueType:f})].concat(d||[])})}function GK(e,t,r,n,i){var a=t.getData(),o=oa(e,function(f,d,h){var v=a.getDimensionInfo(h);return f=f||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];n.length?O(n,function(f){c(Is(a,r,f),f)}):O(e,c);function c(f,d){var h=a.getDimensionInfo(d);!h||h.otherDims.tooltip===!1||(o?u.push(Ou("nameValue",{markerType:"subItem",markerColor:i,name:h.displayName,value:f,valueType:h.type})):(s.push(f),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var ki=Et();function qc(e,t){return e.getName(t)||e.getId(t)}var UK="__universalTransitionEnabled",Mh=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Zl({count:YK,reset:qK}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=ki(this).sourceManager=new OK(this);a.prepareSource();var o=this.getInitialData(r,i);Lx(o,this),this.dataTask.context.data=o,ki(this).dataBeforeProcessed=o,Px(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=Du(this),a=i?Sh(r):{},o=this.subType;xt.hasClass(o)&&(o+="Series"),st(r,n.getTheme().get(this.subType)),st(r,this.getDefaultOption()),Hg(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Ds(r,a,i)},t.prototype.mergeOption=function(r,n){r=st(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Du(this);i&&Ds(this.option,r,i);var a=ki(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);Lx(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,ki(this).dataBeforeProcessed=o,Px(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!zr(r))for(var n=["show"],i=0;ithis.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=T0.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},t.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},t.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},t.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[qc(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[UK])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Ie(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(r,n)}},t.registerClass=function(r){return xt.registerClass(r)},t.protoInitialize=function(){var r=t.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),t}(xt);Jn(Mh,yK);Jn(Mh,T0);L2(Mh,xt);function Px(e){var t=e.name;t0(e)||(e.name=jK(e)||t)}function jK(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return O(r,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function YK(e){return e.model.getRawData().count()}function qK(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),KK}function KK(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Lx(e,t){O(UU(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,Rt(XK,t))})}function XK(e,t){var r=om(e);return r&&r.setOutputEnd((t||this).count()),t}function om(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(e.uid))}return n}}const wo=Mh;var D0=function(){function e(){this.group=new cn,this.uid=gh("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){},e.prototype.updateLayout=function(t,r,n,i){},e.prototype.updateVisual=function(t,r,n,i){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e}();n0(D0);ch(D0);const xi=D0;function yP(){var e=Et();return function(t){var r=e(t),n=t.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var _P=Et(),ZK=yP(),I0=function(){function e(){this.group=new cn,this.uid=gh("viewChart"),this.renderTask=Zl({plan:QK,reset:JK}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.highlight=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&Ix(a,i,"emphasis")},e.prototype.downplay=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&Ix(a,i,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateLayout=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.eachRendered=function(t){g0(this.group,t)},e.markUpdateMethod=function(t,r){_P(t).updateMethod=r},e.protoInitialize=function(){var t=e.prototype;t.type="chart"}(),e}();function Dx(e,t,r){e&&Xg(e)&&(t==="emphasis"?Ug:jg)(e,r)}function Ix(e,t,r){var n=nc(e,t),i=t&&t.highlightKey!=null?i7(t.highlightKey):null;n!=null?O(cr(n),function(a){Dx(e.getItemGraphicEl(a),r,i)}):e.eachItemGraphicEl(function(a){Dx(a,r,i)})}n0(I0);ch(I0);function QK(e){return ZK(e.model)}function JK(e){var t=e.model,r=e.ecModel,n=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&_P(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,r,n,i),eX[l]}var eX={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};const co=I0;var Td="\0__throttleOriginMethod",Ox="\0__throttleRate",Rx="\0__throttleType";function O0(e,t,r){var n,i=0,a=0,o=null,s,l,u,c;t=t||0;function f(){a=new Date().getTime(),o=null,e.apply(l,u||[])}var d=function(){for(var h=[],v=0;v=0?f():o=setTimeout(f,-s),i=n};return d.clear=function(){o&&(clearTimeout(o),o=null)},d.debounceNextCall=function(h){c=h},d}function bP(e,t,r,n){var i=e[t];if(i){var a=i[Td]||i,o=i[Rx],s=i[Ox];if(s!==r||o!==n){if(r==null||!n)return e[t]=a;i=e[t]=O0(a,r,n==="debounce"),i[Td]=a,i[Rx]=n,i[Ox]=r}return i}}function sm(e,t){var r=e[t];r&&r[Td]&&(r.clear&&r.clear(),e[t]=r[Td])}var kx=Et(),Nx={itemStyle:Mu(DE,!0),lineStyle:Mu(LE,!0)},tX={lineStyle:"stroke",itemStyle:"fill"};function wP(e,t){var r=e.visualStyleMapper||Nx[t];return r||(console.warn("Unknown style type '"+t+"'."),Nx.itemStyle)}function xP(e,t){var r=e.visualDrawType||tX[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var rX={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=e.getModel(n),a=wP(e,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=xP(e,n),u=o[l],c=Ve(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=d,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Ve(o.fill)?d:o.fill,o.stroke=o.stroke==="auto"||Ve(o.stroke)?d:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!t.isSeriesFiltered(e)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(h,v){var p=e.getDataParams(v),g=se({},o);g[l]=c(p),h.setItemVisual(v,"style",g)}}}},ul=new rr,nX={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=wP(e,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){ul.option=l[n];var u=i(ul),c=o.ensureUniqueItemVisual(s,"style");se(c,u),ul.option.decal&&(o.setItemVisual(s,"decal",ul.option.decal),ul.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},iX={performRawSeries:!0,overallReset:function(e){var t=Ue();e.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),kx(r).scope=a}}),e.eachSeries(function(r){if(!(r.isColorBySeries()||e.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=kx(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=xP(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var d=a.ensureUniqueItemVisual(c,"style"),h=n.getName(u)||u+"",v=n.count();d[l]=r.getColorFromPalette(h,o,v)}})}})}},Kc=Math.PI;function aX(e,t){t=t||{},dt(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new cn,n=new Ht({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var i=new dr({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Ht({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(a);var o;return t.showSpinner&&(o=new c0({shape:{startAngle:-Kc/2,endAngle:-Kc/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Kc*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Kc*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(e.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=e.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var oX=function(){function e(t,r,n,i){this._stageTaskMap=Ue(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},e.prototype.restorePipelines=function(t){var r=this,n=r._pipelineMap=Ue();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;O(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";bi(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},e.prototype.prepareView=function(t,r,n,i){var a=t.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(r,a)},e.prototype.performDataProcessorTasks=function(t,r){this._performStageTasks(this._dataProcessorHandlers,t,r,{block:!0})},e.prototype.performVisualTasks=function(t,r,n){this._performStageTasks(this._visualHandlers,t,r,n)},e.prototype._performStageTasks=function(t,r,n,i){i=i||{};var a=!1,o=this;O(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,d=c.overallTask;if(d){var h,v=d.agentStubMap;v.each(function(g){s(i,g)&&(g.dirty(),h=!0)}),h&&d.dirty(),o.updatePayload(d,n);var p=o.getPerformArgs(d,i.block);v.each(function(g){g.perform(p)}),d.perform(p)&&(a=!0)}else f&&f.each(function(g,m){s(i,g)&&g.dirty();var y=o.getPerformArgs(g,i.block);y.skip=!l.performRawSeries&&r.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},e.prototype.performSeriesTasks=function(t){var r;t.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var r=t.tail;do{if(r.__block){t.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},e.prototype.updatePayload=function(t,r){r!=="remain"&&(t.context.payload=r)},e.prototype._createSeriesStageTask=function(t,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Ue(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var d=f.uid,h=s.set(d,o&&o.get(d)||Zl({plan:fX,reset:dX,count:vX}));h.context={model:f,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(f,h)}},e.prototype._createOverallStageTask=function(t,r,n,i){var a=this,o=r.overallTask=r.overallTask||Zl({reset:sX});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Ue(),u=t.seriesType,c=t.getTargetSeries,f=!0,d=!1,h="";bi(!t.createOnAllSeries,h),u?n.eachRawSeriesByType(u,v):c?c(n,i).each(v):(f=!1,O(n.getSeries(),v));function v(p){var g=p.uid,m=l.set(g,s&&s.get(g)||(d=!0,Zl({reset:lX,onDirty:cX})));m.context={model:p,overallProgress:f},m.agent=o,m.__block=f,a._pipe(p,m)}d&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},e.wrapStageHandler=function(t,r){return Ve(t)&&(t={overallReset:t,seriesType:pX(t)}),t.uid=gh("stageHandler"),r&&(t.visualType=r),t},e}();function sX(e){e.overallReset(e.ecModel,e.api,e.payload)}function lX(e){return e.overallProgress&&uX}function uX(){this.agent.dirty(),this.getDownstream().dirty()}function cX(){this.agent&&this.agent.dirty()}function fX(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function dX(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=cr(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?Re(t,function(r,n){return SP(n)}):hX}var hX=SP(0);function SP(e){return function(t,r){var n=r.data,i=r.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&h===u.length-d.length){var v=u.slice(0,h);v!=="data"&&(r.mainType=v,r[d.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},e.prototype.filter=function(t,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,i,a));function c(f,d,h,v){return f[h]==null||d[v||h]===f[h]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),lm=["symbol","symbolSize","symbolRotate","symbolOffset"],Hx=lm.concat(["symbolKeepAspect"]),_X={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData();if(e.legendIcon&&r.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&to(l)?l:.5;var u=e.createRadialGradient(o,s,0,o,s,l);return u}function cm(e,t,r){for(var n=t.type==="radial"?$X(e,t,r):BX(e,t,r),i=t.colorStops,a=0;a0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:bt(e)?[e]:ge(e)?e:null}function EP(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&zX(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(r=Re(r,function(a){return a/i}),n/=i)}return[r,n]}var WX=new _o(!0);function Ad(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function zx(e){return typeof e=="string"&&e!=="none"}function Ed(e){var t=e.fill;return t!=null&&t!=="none"}function Wx(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function Vx(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function fm(e,t,r){var n=D2(t.image,t.__image,r);if(fh(n)){var i=e.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*jU),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function VX(e,t,r,n){var i,a=Ad(r),o=Ed(r),s=r.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var c=t.path||WX,f=t.__dirty;if(!n){var d=r.fill,h=r.stroke,v=o&&!!d.colorStops,p=a&&!!h.colorStops,g=o&&!!d.image,m=a&&!!h.image,y=void 0,_=void 0,b=void 0,x=void 0,w=void 0;(v||p)&&(w=t.getBoundingRect()),v&&(y=f?cm(e,d,w):t.__canvasFillGradient,t.__canvasFillGradient=y),p&&(_=f?cm(e,h,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(b=f||!t.__canvasFillPattern?fm(e,d,t):t.__canvasFillPattern,t.__canvasFillPattern=b),m&&(x=f||!t.__canvasStrokePattern?fm(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=b),v?e.fillStyle=y:g&&(b?e.fillStyle=b:o=!1),p?e.strokeStyle=_:m&&(x?e.strokeStyle=x:a=!1)}var S=t.getGlobalScale();c.setScale(S[0],S[1],t.segmentIgnoreThreshold);var C,M;e.setLineDash&&r.lineDash&&(i=EP(t),C=i[0],M=i[1]);var P=!0;(u||f&Ko)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),P=!1),c.reset(),t.buildPath(c,t.shape,n),c.toStatic(),t.pathUpdated()),P&&c.rebuildPath(e,l?s:1),C&&(e.setLineDash(C),e.lineDashOffset=M),n||(r.strokeFirst?(a&&Vx(e,r),o&&Wx(e,r)):(o&&Wx(e,r),a&&Vx(e,r))),C&&e.setLineDash([])}function GX(e,t,r){var n=t.__image=D2(r.image,t.__image,t,t.onload);if(!(!n||!fh(n))){var i=r.x||0,a=r.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;e.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,f=o-u,d=s-c;e.drawImage(n,u,c,f,d,i,a,o,s)}else e.drawImage(n,i,a,o,s)}}function UX(e,t,r){var n,i=r.text;if(i!=null&&(i+=""),i){e.font=r.font||yo,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=EP(t),a=n[0],o=n[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(Ad(r)&&e.strokeText(i,r.x,r.y),Ed(r)&&e.fillText(i,r.x,r.y)):(Ed(r)&&e.fillText(i,r.x,r.y),Ad(r)&&e.strokeText(i,r.x,r.y)),a&&e.setLineDash([])}}var Gx=["shadowBlur","shadowOffsetX","shadowOffsetY"],Ux=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function PP(e,t,r,n,i){var a=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){wr(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?lo.opacity:o}(n||t.blend!==r.blend)&&(a||(wr(e,i),a=!0),e.globalCompositeOperation=t.blend||lo.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(r,n,i){if(!this[Qt]){if(this._disposed){this.id;return}var a,o,s;if(Ie(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Qt]=!0,!this._model||n){var l=new tK(this._api),u=this._theme,c=this._model=new JE;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},vm);var f={seriesTransition:s,optionChanged:!0};if(i)this[gr]={silent:a,updateParams:f},this[Qt]=!1,this.getZr().wakeUp();else{try{Go(this),Ni.update.call(this,null,f)}catch(d){throw this[gr]=null,this[Qt]=!1,d}this._ssr||this._zr.flush(),this[gr]=null,this[Qt]=!1,cl.call(this,a),fl.call(this,a)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ge.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},t.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},t.prototype.getSvgDataURL=function(){if(Ge.svgSupported){var r=this._zr,n=r.storage.getDisplayList();return O(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()}},t.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;O(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return O(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(oS[i]){var l=s,u=s,c=-s,f=-s,d=[],h=r&&r.pixelRatio||this.getDevicePixelRatio();O(Jl,function(_,b){if(_.group===i){var x=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(Qe(r)),w=_.getDom().getBoundingClientRect();l=a(w.left,l),u=a(w.top,u),c=o(w.right,c),f=o(w.bottom,f),d.push({dom:x,left:w.left,top:w.top})}}),l*=h,u*=h,c*=h,f*=h;var v=c-l,p=f-u,g=Mo.createCanvas(),m=uw(g,{renderer:n?"svg":"canvas"});if(m.resize({width:v,height:p}),n){var y="";return O(d,function(_){var b=_.left-l,x=_.top-u;y+=''+_.dom+""}),m.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&m.painter.setBackgroundColor(r.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return r.connectedBackgroundColor&&m.add(new Ht({shape:{x:0,y:0,width:v,height:p},style:{fill:r.connectedBackgroundColor}})),O(d,function(_){var b=new zs({style:{x:_.left*h-l,y:_.top*h-u,image:_.dom}});m.add(b)}),m.refreshImmediately(),g.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n){return tp(this,"convertToPixel",r,n)},t.prototype.convertFromPixel=function(r,n){return tp(this,"convertFromPixel",r,n)},t.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Cv(i,r);return O(o,function(s,l){l.indexOf("Models")>=0&&O(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(n,u))}},this)},this),!!a},t.prototype.getVisual=function(r,n){var i=this._model,a=Cv(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?wX(s,l,n):xX(s,n)},t.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},t.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},t.prototype._initEvents=function(){var r=this;O(mZ,function(n){var i=function(a){var o=r.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&Al(s,function(v){var p=ft(v);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType)||{},!0}else if(p.eventData)return l=se({},p.eventData),!0},!0),l){var c=l.componentType,f=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",f=l.seriesIndex);var d=c&&f!=null&&o.getComponent(c,f),h=d&&r[d.mainType==="series"?"_chartsMap":"_componentsMap"][d.__viewId];l.event=a,l.type=n,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:d,view:h},r.trigger(n,l)}};i.zrEventfulCallAtLast=!0,r._zr.on(n,i,r)}),O(Ql,function(n,i){r._messageCenter.on(i,function(a){this.trigger(i,a)},r)}),O(["selectchanged"],function(n){r._messageCenter.on(n,function(i){this.trigger(n,i)},r)}),CX(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&E2(this.getDom(),F0,"");var n=this,i=n._api,a=n._model;O(n._componentsViews,function(o){o.dispose(a,i)}),O(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Jl[n.id]},t.prototype.resize=function(r){if(!this[Qt]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[gr]&&(a==null&&(a=this[gr].silent),i=!0,this[gr]=null),this[Qt]=!0;try{i&&Go(this),Ni.update.call(this,{type:"resize",animation:se({duration:0},r&&r.animation)})}catch(o){throw this[Qt]=!1,o}this[Qt]=!1,cl.call(this,a),fl.call(this,a)}}},t.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(Ie(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!pm[r]){var i=pm[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(r){var n=se({},r);return n.type=Ql[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(Ie(n)||(n={silent:!!n}),!!Pd[r.type]&&this._model){if(this[Qt]){this._pendingActions.push(r);return}var i=n.silent;np.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Ge.browser.weChat&&this._throttledZrFlush(),cl.call(this,i),fl.call(this,i)}},t.prototype.updateLabelLayout=function(){yn.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Go=function(f){var d=f._scheduler;d.restorePipelines(f._model),d.prepareStageTasks(),ep(f,!0),ep(f,!1),d.plan()},ep=function(f,d){for(var h=f._model,v=f._scheduler,p=d?f._componentsViews:f._chartsViews,g=d?f._componentsMap:f._chartsMap,m=f._zr,y=f._api,_=0;_d.get("hoverLayerThreshold")&&!Ge.node&&!Ge.worker&&d.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=f._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(f,d){var h=f.get("blendMode")||null;d.eachRendered(function(v){v.isGroup||(v.style.blend=h)})}function s(f,d){if(!f.preventAutoZ){var h=f.get("z")||0,v=f.get("zlevel")||0;d.eachRendered(function(p){return l(p,h,v,-1/0),!0})}}function l(f,d,h,v){var p=f.getTextContent(),g=f.getTextGuideLine(),m=f.isGroup;if(m)for(var y=f.childrenRef(),_=0;_0?{duration:p,delay:h.get("delay"),easing:h.get("easing")}:null;d.eachRendered(function(m){if(m.states&&m.states.emphasis){if(fs(m))return;if(m instanceof ht&&a7(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(v){m.stateTransition=g;var _=m.getTextContent(),b=m.getTextGuideLine();_&&(_.stateTransition=g),b&&(b.stateTransition=g)}m.__dirty&&i(m)}})}iS=function(f){return new(function(d){pe(h,d);function h(){return d!==null&&d.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(v){for(;v;){var p=v.__ecComponentInfo;if(p!=null)return f._model.getComponent(p.mainType,p.index);v=v.parent}},h.prototype.enterEmphasis=function(v,p){Ug(v,p),Vr(f)},h.prototype.leaveEmphasis=function(v,p){jg(v,p),Vr(f)},h.prototype.enterBlur=function(v){KY(v),Vr(f)},h.prototype.leaveBlur=function(v){q2(v),Vr(f)},h.prototype.enterSelect=function(v){K2(v),Vr(f)},h.prototype.leaveSelect=function(v){X2(v),Vr(f)},h.prototype.getModel=function(){return f.getModel()},h.prototype.getViewOfComponentModel=function(v){return f.getViewOfComponentModel(v)},h.prototype.getViewOfSeriesModel=function(v){return f.getViewOfSeriesModel(v)},h}(eP))(f)},GP=function(f){function d(h,v){for(var p=0;p=0)){sS.push(r);var a=MP.wrapStageHandler(r,i);a.__prio=t,a.__raw=r,e.push(a)}}function XP(e,t){pm[e]=t}function CZ(e,t,r){var n=rZ("registerMap");n&&n(e,t,r)}var TZ=AK;Po(k0,rX);Po(Ah,nX);Po(Ah,iX);Po(k0,_X);Po(Ah,bX);Po(BP,JX);qP(rP);KP(aZ,uK);XP("default",aX);Gs({type:uo,event:uo,update:uo},Tr);Gs({type:$f,event:$f,update:$f},Tr);Gs({type:jl,event:jl,update:jl},Tr);Gs({type:Hf,event:Hf,update:Hf},Tr);Gs({type:Yl,event:Yl,update:Yl},Tr);YP("light",gX);YP("dark",mX);function dl(e){return e==null?0:e.length||1}function lS(e){return e}var MZ=function(){function e(t,r,n,i,a,o){this._old=t,this._new=r,this._oldKeyGetter=n||lS,this._newKeyGetter=i||lS,this.context=a,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,r=this._new,n={},i=new Array(t.length),a=new Array(r.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&d===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&d>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&d===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var h=0;h1)for(var s=0;s30}var hl=Ie,Fi=Re,kZ=typeof Int32Array>"u"?Array:Int32Array,NZ="e\0\0",uS=-1,FZ=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],BZ=["_approximateExtent"],cS,tf,vl,pl,op,rf,sp,$Z=function(){function e(t,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;QP(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===dn;if(l&&!i.pure)for(var u=[],c=t;c0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[r];return a==null&&(a=this.getVisual(r),ge(a)?a=a.slice():hl(a)&&(a=se({},a)),i[r]=a),a},e.prototype.setItemVisual=function(t,r,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,hl(r)?se(i,r):i[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){hl(t)?se(this._layout,t):this._layout[t]=r},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,r,n){this._itemLayouts[t]=n?se(this._itemLayouts[t]||{},r):r},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,r){var n=this.hostModel&&this.hostModel.seriesIndex;$Y(n,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){O(this._graphicEls,function(n,i){n&&t&&t.call(r,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:Fi(this.dimensions,this._getDimInfo,this),this.hostModel)),op(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];Ve(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(Uy(arguments)))})},e.internalField=function(){cS=function(t){var r=t._invertedIndicesMap;O(r,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=r[i]=new kZ(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[r]=l}}}(),e}();const rL=$Z;function nL(e,t){A0(e)||(e=E0(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],i=Ue(),a=[],o=zZ(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&tL(o),l=n===e.dimensionsDefine,u=l?eL(e):JP(n),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,o));for(var f=Ue(c),d=new cP(o),h=0;h0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function zZ(e,t,r,n){var i=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return O(t,function(a){var o;Ie(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function WZ(e,t,r){if(r||t.hasKey(e)){for(var n=0;t.hasKey(e+n);)n++;e+=n}return t.set(e,!0),e}var VZ=function(){function e(t){this.coordSysDims=[],this.axisMap=Ue(),this.categoryAxisMap=Ue(),this.coordSysName=t}return e}();function GZ(e){var t=e.get("coordinateSystem"),r=new VZ(t),n=UZ[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var UZ={cartesian2d:function(e,t,r,n){var i=e.getReferringComponents("xAxis",Cn).models[0],a=e.getReferringComponents("yAxis",Cn).models[0];t.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Uo(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),Uo(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var i=e.getReferringComponents("singleAxis",Cn).models[0];t.coordSysDims=["single"],r.set("single",i),Uo(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var i=e.getReferringComponents("polar",Cn).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Uo(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),Uo(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,n){var i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();O(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),Uo(u)&&(n.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function Uo(e){return e.get("type")==="category"}function jZ(e,t,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;YZ(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(e&&e.get("stack")),u,c,f,d;if(O(a,function(y,_){Me(y)&&(a[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,v=c.type,p=0;O(a,function(y){y.coordDim===h&&p++});var g={name:f,coordDim:h,coordDimIndex:p,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:d,coordDim:d,coordDimIndex:p+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(d,v),m.storeDimIndex=s.ensureCalculationDimension(f,v)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:d,stackResultDimension:f}}function YZ(e){return!QP(e.schema)}function iL(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function qZ(e,t){return iL(e,t)?e.getCalculationInfo("stackResultDimension"):t}function KZ(e,t){var r=e.get("coordinateSystem"),n=M0.get(r),i;return t&&t.coordSysDims&&(i=Re(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=LZ(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function XZ(e,t,r){var n,i;return r&&O(e,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(e[n].otherDims.itemName=0),n}function aL(e,t,r){r=r||{};var n=t.getSourceManager(),i,a=!1;e?(a=!0,i=E0(e)):(i=n.getSource(),a=i.sourceFormat===dn);var o=GZ(t),s=KZ(t,o),l=r.useEncodeDefaulter,u=Ve(l)?l:l?Rt(kq,s,t):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=nL(i,c),d=XZ(f.dimensions,r.createInvertedIndices,o),h=a?null:n.getSharedDataStore(f),v=jZ(t,{schema:f,store:h}),p=new rL(f,t);p.setCalculationInfo(v);var g=d!=null&&ZZ(i)?function(m,y,_,b){return b===d?_:this.defaultDimValueGetter(m,y,_,b)}:null;return p.hasItemOption=!1,p.initData(a?i:h,null,g),p}function ZZ(e){if(e.sourceFormat===dn){var t=QZ(e.data||[]);return!ge(rc(t))}}function QZ(e){for(var t=0;tr[1]&&(r[1]=t[1])},e.prototype.unionExtentFromData=function(t,r){this.unionExtent(t.getApproximateExtent(r))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(r)||(n[1]=r)},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e}();ch(oL);const Ei=oL;var JZ=0,eQ=function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++JZ}return e.createByAxisModel=function(t){var r=t.option,n=r.data,i=n&&Re(n,tQ);return new e({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var r,n=this._needCollect;if(!Me(t)&&!n)return t;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=t,r;var i=this._getOrCreateMap();return r=i.get(t),r==null&&(n?(r=this.categories.length,this.categories[r]=t,i.set(t,r)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Ue(this.categories))},e}();function tQ(e){return Ie(e)&&e.value!=null?e.value:e+""}const gm=eQ;function mm(e){return e.type==="interval"||e.type==="log"}function rQ(e,t,r,n){var i={},a=e[1]-e[0],o=i.interval=S2(a/t,!0);r!=null&&on&&(o=i.interval=n);var s=i.intervalPrecision=sL(o),l=i.niceTickExtent=[kt(Math.ceil(e[0]/o)*o,s),kt(Math.floor(e[1]/o)*o,s)];return nQ(l,e),i}function lp(e){var t=Math.pow(10,e0(e)),r=e/t;return r?r===2?r=3:r===3?r=5:r*=2:r=1,kt(r*t)}function sL(e){return hi(e)+2}function fS(e,t,r){e[t]=Math.max(Math.min(e[t],r[1]),r[0])}function nQ(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),fS(e,0,t),fS(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function Eh(e,t){return e>=t[0]&&e<=t[1]}function Ph(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function Lh(e,t){return e*(t[1]-t[0])+t[0]}var lL=function(e){pe(t,e);function t(r){var n=e.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new gm({})),ge(i)&&(i=new gm({categories:Re(i,function(a){return Ie(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(r){return r==null?NaN:Me(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},t.prototype.contain=function(r){return r=this.parse(r),Eh(r,this._extent)&&this._ordinalMeta.categories[r]!=null},t.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),Ph(r,this._extent)},t.prototype.scale=function(r){return r=Math.round(Lh(r,this._extent)),this.getRawOrdinalNumber(r)},t.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},t.prototype.getMinorTicks=function(r){},t.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o=0&&r=0&&r=r},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Ei);Ei.registerClass(lL);const uL=lL;var Ba=kt,cL=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return t.prototype.parse=function(r){return r},t.prototype.contain=function(r){return Eh(r,this._extent)},t.prototype.normalize=function(r){return Ph(r,this._extent)},t.prototype.scale=function(r){return Lh(r,this._extent)},t.prototype.setExtent=function(r,n){var i=this._extent;isNaN(r)||(i[0]=parseFloat(r)),isNaN(n)||(i[1]=parseFloat(n))},t.prototype.unionExtent=function(r){var n=this._extent;r[0]n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=sL(r)},t.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]l)return[];var c=s.length?s[s.length-1].value:a[1];return i[1]>c&&(r?s.push({value:Ba(c+n,o)}):s.push({value:i[1]})),s},t.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;oa[0]&&h0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function hL(e){var t=oQ(e),r=[];return O(e,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),d=Math.abs(f[1]-f[0]);s=u?c/d*u:c}else{var h=n.getData();s=Math.abs(o[1]-o[0])/h.count()}var v=gt(n.get("barWidth"),s),p=gt(n.get("barMaxWidth"),s),g=gt(n.get("barMinWidth")||(pL(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");r.push({bandWidth:s,barWidth:v,barMaxWidth:p,barMinWidth:g,barGap:m,barCategoryGap:y,axisKey:W0(a),stackId:z0(n)})}),sQ(r)}function sQ(e){var t={};O(e,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var 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 h=n.barGap;h!=null&&(s.gap=h);var v=n.barCategoryGap;v!=null&&(s.categoryGap=v)});var r={};return O(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Tt(a).length;s=Math.max(35-l*4,15)+"%"}var u=gt(s,o),c=gt(n.gap,1),f=n.remainedWidth,d=n.autoWidthCount,h=(f-u)/(d+(d-1)*c);h=Math.max(h,0),O(a,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var b=m.width;y&&(b=Math.min(b,y)),_&&(b=Math.max(b,_)),m.width=b,f-=b+c*b,d--}else{var b=h;y&&yb&&(b=_),b!==h&&(m.width=b,f-=b+c*b,d--)}}),h=(f-u)/(d+(d-1)*c),h=Math.max(h,0);var v=0,p;O(a,function(m,y){m.width||(m.width=h),p=m,v+=m.width*(1+c)}),p&&(v-=p.width*c);var g=-v/2;O(a,function(m,y){r[i][y]=r[i][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+c)})}),r}function lQ(e,t,r){if(e&&t){var n=e[W0(t)];return n!=null&&r!=null?n[z0(r)]:n}}function uQ(e,t){var r=dL(e,t),n=hL(r);O(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=z0(i),u=n[W0(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function cQ(e){return{seriesType:e,plan:yP(),reset:function(t){if(vL(t)){var r=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=t.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),f=iL(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),d=a.isHorizontal(),h=fQ(i,a),v=pL(t),p=t.get("barMinHeight")||0,g=c&&r.getDimensionIndex(c),m=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(_,b){for(var x=_.count,w=v&&up(x*3),S=v&&l&&up(x*3),C=v&&up(x),M=n.master.getRect(),P=d?M.width:M.height,A,T=b.getStore(),D=0;(A=_.next())!=null;){var N=T.get(f?g:o,A),H=T.get(s,A),$=h,G=void 0;f&&(G=+N-T.get(o,A));var F=void 0,R=void 0,j=void 0,re=void 0;if(d){var oe=n.dataToPoint([N,H]);if(f){var ye=n.dataToPoint([G,H]);$=ye[0]}F=$,R=oe[1]+y,j=oe[0]-$,re=m,Math.abs(j)>>1;e[i][1]i&&(this._approxInterval=i);var s=nf.length,l=Math.min(dQ(nf,this._approxInterval,0,s),s-1);this._interval=nf[l][1],this._minLevelUnit=nf[Math.max(l-1,0)][0]},t.prototype.parse=function(r){return bt(r)?r:+wi(r)},t.prototype.contain=function(r){return Eh(this.parse(r),this._extent)},t.prototype.normalize=function(r){return Ph(this.parse(r),this._extent)},t.prototype.scale=function(r){return Lh(r,this._extent)},t.type="time",t}(sc),nf=[["second",b0],["minute",w0],["hour",Kl],["quarter-day",Kl*6],["half-day",Kl*12],["day",en*1.2],["half-week",en*3.5],["week",en*7],["month",en*31],["quarter",en*95],["half-year",ex/2],["year",ex]];function hQ(e,t,r,n){var i=wi(t),a=wi(r),o=function(v){return rx(i,v,n)===rx(a,v,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},f=function(){return c()&&o("minute")},d=function(){return f()&&o("second")},h=function(){return d()&&o("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return f();case"second":return d();case"millisecond":return h()}}function vQ(e,t){return e/=en,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function pQ(e){var t=30*en;return e/=t,e>6?6:e>3?3:e>2?2:1}function gQ(e){return e/=Kl,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function dS(e,t){return e/=t?w0:b0,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function mQ(e){return S2(e,!0)}function yQ(e,t,r){var n=new Date(e);switch(ds(t)){case"year":case"month":n[FE(r)](0);case"day":n[BE(r)](1);case"hour":n[$E(r)](0);case"minute":n[HE(r)](0);case"second":n[zE(r)](0),n[WE(r)](0)}return n.getTime()}function _Q(e,t,r,n){var i=1e4,a=kE,o=0;function s(P,A,T,D,N,H,$){for(var G=new Date(A),F=A,R=G[D]();F1&&H===0&&T.unshift({value:T[0].value-F})}}for(var H=0;H=n[0]&&y<=n[1]&&f++)}var _=(n[1]-n[0])/t;if(f>_*1.5&&d>_/1.5||(u.push(g),f>_||e===a[h]))break}c=[]}}}for(var b=Vt(Re(u,function(P){return Vt(P,function(A){return A.value>=n[0]&&A.value<=n[1]&&!A.notAdd})}),function(P){return P.length>0}),x=[],w=b.length-1,h=0;h0;)a*=10;var s=[kt(SQ(n[0]/a)*a),kt(xQ(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(r){eu.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},t.prototype.parse=function(r){return r},t.prototype.contain=function(r){return r=vn(r)/vn(this.base),Eh(r,this._extent)},t.prototype.normalize=function(r){return r=vn(r)/vn(this.base),Ph(r,this._extent)},t.prototype.scale=function(r){return r=Lh(r,this._extent),af(this.base,r)},t.type="log",t}(Ei),mL=V0.prototype;mL.getMinorTicks=eu.getMinorTicks;mL.getLabel=eu.getLabel;function of(e,t){return wQ(e,hi(t))}Ei.registerClass(V0);const CQ=V0;var TQ=function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var d=this._determinedMin,h=this._determinedMax;return d!=null&&(s=d,u=!0),h!=null&&(l=h,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},e.prototype.modifyDataMinMax=function(t,r){this[AQ[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=MQ[t];this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e}(),MQ={min:"_determinedMin",max:"_determinedMax"},AQ={min:"_dataMin",max:"_dataMax"};function EQ(e,t,r){var n=e.rawExtentInfo;return n||(n=new TQ(e,t,r),e.rawExtentInfo=n,n)}function sf(e,t){return t==null?null:cd(t)?NaN:e.parse(t)}function yL(e,t){var r=e.type,n=EQ(e,t,e.getExtent()).calculate();e.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&r==="time"){var s=dL("bar",o),l=!1;if(O(s,function(f){l=l||f.getBaseAxis()===t.axis}),l){var u=hL(s),c=PQ(i,a,t,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function PQ(e,t,r,n){var i=r.axis.getExtent(),a=i[1]-i[0],o=lQ(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;O(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;O(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,f=1-(s+l)/a,d=c/f-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}function vS(e,t){var r=t,n=yL(e,r),i=n.extent,a=r.get("splitNumber");e instanceof CQ&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),l=o==="interval"||o==="time";e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function LQ(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new uL({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new bQ({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Ei.getClass(t)||sc)}}function DQ(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function lc(e){var t=e.getLabelModel().get("formatter"),r=e.type==="category"?e.scale.getExtent()[0]:null;return e.scale.type==="time"?function(n){return function(i,a){return e.scale.getFormattedLabel(i,a,n)}}(t):Me(t)?function(n){return function(i){var a=e.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(t):Ve(t)?function(n){return function(i,a){return r!=null&&(a=i.value-r),n(G0(e,i),a,i.level!=null?{level:i.level}:null)}}(t):function(n){return e.scale.getLabel(n)}}function G0(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function IQ(e){var t=e.model,r=e.scale;if(!(!t.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof uL?i=r.count():(n=r.getTicks(),i=n.length);var o=e.getLabelModel(),s=lc(e),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c=0||(pS.push(e),Ve(e)&&(e={install:e}),e.install(NQ))}var Nu=Et();function FQ(e){return e.type==="category"?$Q(e):zQ(e)}function BQ(e,t){return e.type==="category"?HQ(e,t):{ticks:Re(e.scale.getTicks(),function(r){return r.value})}}function $Q(e){var t=e.getLabelModel(),r=bL(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function bL(e,t){var r=wL(e,"labels"),n=U0(t),i=xL(r,n);if(i)return i;var a,o;return Ve(n)?a=TL(e,n):(o=n==="auto"?WQ(e):n,a=CL(e,o)),SL(r,n,{labels:a,labelCategoryInterval:o})}function HQ(e,t){var r=wL(e,"ticks"),n=U0(t),i=xL(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),Ve(n))a=TL(e,n,!0);else if(n==="auto"){var s=bL(e,e.getLabelModel());o=s.labelCategoryInterval,a=Re(s.labels,function(l){return l.tickValue})}else o=n,a=CL(e,o,!0);return SL(r,n,{ticks:a,tickCategoryInterval:o})}function zQ(e){var t=e.scale.getTicks(),r=lc(e);return{labels:Re(t,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tickValue:n.value}})}}function wL(e,t){return Nu(e)[t]||(Nu(e)[t]=[])}function xL(e,t){for(var r=0;r40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(n)),f=Math.abs(u*Math.sin(n)),d=0,h=0;l<=a[1];l+=s){var v=0,p=0,g=Zy(r({value:l}),t.font,"center","top");v=g.width*1.3,p=g.height*1.3,d=Math.max(d,v,7),h=Math.max(h,p,7)}var m=d/c,y=h/f;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),b=Nu(e.model),x=e.getExtent(),w=b.lastAutoInterval,S=b.lastTickCount;return w!=null&&S!=null&&Math.abs(w-_)<=1&&Math.abs(S-o)<=1&&w>_&&b.axisExtent0===x[0]&&b.axisExtent1===x[1]?_=w:(b.lastTickCount=o,b.lastAutoInterval=_,b.axisExtent0=x[0],b.axisExtent1=x[1]),_}function GQ(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function CL(e,t,r){var n=lc(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=_L(e),d=o.get("showMinLabel")||f,h=o.get("showMaxLabel")||f;d&&u!==a[0]&&p(a[0]);for(var v=u;v<=a[1];v+=l)p(v);h&&v-l!==a[1]&&p(a[1]);function p(g){var m={value:g};s.push(r?g:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:g})}return s}function TL(e,t,r){var n=e.scale,i=lc(e),a=[];return O(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var gS=[0,1],UQ=function(){function e(t,r,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=r,this._extent=n||[0,0]}return e.prototype.contain=function(t){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return t>=n&&t<=i},e.prototype.containData=function(t){return this.scale.contain(t)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return mj(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,r){var n=this._extent;n[0]=t,n[1]=r},e.prototype.dataToCoord=function(t,r){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&i.type==="ordinal"&&(n=n.slice(),mS(n,i.count())),$g(t,gS,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),mS(n,i.count()));var a=$g(t,n,gS,r);return this.scale.scale(a)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=BQ(this,r),i=n.ticks,a=Re(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return jQ(this,a,o,t.clamp),a},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=Re(n,function(a){return Re(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(){return FQ(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(){return VQ(this)},e}();function mS(e,t){var r=e[1]-e[0],n=t,i=r/n/2;e[0]+=i,e[1]-=i}function jQ(e,t,r,n){var i=t.length;if(!e.onBand||r||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],o=t[1]={coord:a[0]};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;O(t,function(h){h.coord-=u/2});var c=e.scale.getExtent();s=1+c[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s},t.push(o)}var f=a[0]>a[1];d(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&d(a[0],t[0].coord)&&t.unshift({coord:a[0]}),d(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&d(o.coord,a[1])&&t.push({coord:a[1]});function d(h,v){return h=kt(h),v=kt(v),f?h>v:hi&&(i+=gl);var h=Math.atan2(s,o);if(h<0&&(h+=gl),h>=n&&h<=i||h+gl>=n&&h+gl<=i)return l[0]=c,l[1]=f,u-r;var v=r*Math.cos(n)+e,p=r*Math.sin(n)+t,g=r*Math.cos(i)+e,m=r*Math.sin(i)+t,y=(v-o)*(v-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(m-s)*(m-s);return y<_?(l[0]=v,l[1]=p,Math.sqrt(y)):(l[0]=g,l[1]=m,Math.sqrt(_))}function Dd(e,t,r,n,i,a,o,s){var l=i-e,u=a-t,c=r-e,f=n-t,d=Math.sqrt(c*c+f*f);c/=d,f/=d;var h=l*c+u*f,v=h/d;s&&(v=Math.min(Math.max(v,0),1)),v*=d;var p=o[0]=e+v*c,g=o[1]=t+v*f;return Math.sqrt((p-i)*(p-i)+(g-a)*(g-a))}function ML(e,t,r,n,i,a,o){r<0&&(e=e+r,r=-r),n<0&&(t=t+n,n=-n);var s=e+r,l=t+n,u=o[0]=Math.min(Math.max(i,e),s),c=o[1]=Math.min(Math.max(a,t),l);return Math.sqrt((u-i)*(u-i)+(c-a)*(c-a))}var _n=[];function ZQ(e,t,r){var n=ML(t.x,t.y,t.width,t.height,e.x,e.y,_n);return r.set(_n[0],_n[1]),n}function QQ(e,t,r){for(var n=0,i=0,a=0,o=0,s,l,u=1/0,c=t.data,f=e.x,d=e.y,h=0;h0){t=t/180*Math.PI,Tn.fromArray(e[0]),ut.fromArray(e[1]),Pt.fromArray(e[2]),Ne.sub(Un,Tn,ut),Ne.sub(zn,Pt,ut);var r=Un.len(),n=zn.len();if(!(r<.001||n<.001)){Un.scale(1/r),zn.scale(1/n);var i=Un.dot(zn),a=Math.cos(t);if(a1&&Ne.copy(sr,Pt),sr.toArray(e[1])}}}}function JQ(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,Tn.fromArray(e[0]),ut.fromArray(e[1]),Pt.fromArray(e[2]),Ne.sub(Un,ut,Tn),Ne.sub(zn,Pt,ut);var n=Un.len(),i=zn.len();if(!(n<.001||i<.001)){Un.scale(1/n),zn.scale(1/i);var a=Un.dot(t),o=Math.cos(r);if(a=l)Ne.copy(sr,Pt);else{sr.scaleAndAdd(zn,s/Math.tan(Math.PI/2-c));var f=Pt.x!==ut.x?(sr.x-ut.x)/(Pt.x-ut.x):(sr.y-ut.y)/(Pt.y-ut.y);if(isNaN(f))return;f<0?Ne.copy(sr,ut):f>1&&Ne.copy(sr,Pt)}sr.toArray(e[1])}}}}function _S(e,t,r,n){var i=r==="normal",a=i?e:e.ensureState(r);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?e.useStyle(s):a.style=s}function eJ(e,t){var r=t.smooth,n=t.points;if(n)if(e.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=Cg(n[0],n[1]),a=Cg(n[1],n[2]);if(!i||!a){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=nv([],n[1],n[0],o/i),l=nv([],n[1],n[2],o/a),u=nv([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c0&&a&&x(-c/o,0,o);var p=e[0],g=e[o-1],m,y;_(),m<0&&w(-m,.8),y<0&&w(y,.8),_(),b(m,y,1),b(y,m,-1),_(),m<0&&S(-m),y<0&&S(y);function _(){m=p.rect[t]-n,y=i-g.rect[t]-g.rect[r]}function b(C,M,P){if(C<0){var A=Math.min(M,-C);if(A>0){x(A*P,0,o);var T=A+C;T<0&&w(-T*P,1)}else w(-C*P,1)}}function x(C,M,P){C!==0&&(u=!0);for(var A=M;A0)for(var T=0;T0;T--){var $=P[T-1]*H;x(-$,T,o)}}}function S(C){var M=C<0?-1:1;C=Math.abs(C);for(var P=Math.ceil(C/(o-1)),A=0;A0?x(P,0,A+1):x(-P,o-A-1,o),C-=P,C<=0)return}return u}function tJ(e,t,r,n){return DL(e,"x","width",t,r,n)}function IL(e,t,r,n){return DL(e,"y","height",t,r,n)}function OL(e){var t=[];e.sort(function(p,g){return g.priority-p.priority});var r=new et(0,0,0,0);function n(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var i=0;i=0&&n.attr(a.oldLayoutSelect),ot(d,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Pr(n,u,r,l)}else if(n.attr(u),!oc(n).valueAnimation){var f=qe(n.style.opacity,1);n.style.opacity=0,Hr(n,{style:{opacity:f}},r,l)}if(a.oldLayout=u,n.states.select){var h=a.oldLayoutSelect={};lf(h,u,uf),lf(h,n.states.select,uf)}if(n.states.emphasis){var v=a.oldLayoutEmphasis={};lf(v,u,uf),lf(v,n.states.emphasis,uf)}lq(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=iJ(i),o=a.oldLayout,p={points:i.shape.points};o?(i.attr({shape:o}),Pr(i,{shape:p},r)):(i.setShape(p),i.style.strokePercent=0,Hr(i,{style:{strokePercent:1}},r)),a.oldLayout=p}},e}();const oJ=aJ;var fp=Et();function sJ(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){var i=fp(r).labelManager;i||(i=fp(r).labelManager=new oJ),i.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(t,r,n){var i=fp(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}function lJ(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=Is(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(t[a])}return n.join(" ")}function cJ(e,t,r,n,i){var a=e.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=r.get(["lineStyle","width"])||2;o-=c/2,s-=c/2,l+=c,u+=c,o=Math.floor(o),l=Math.round(l);var f=new Ht({shape:{x:o,y:s,width:l,height:u}});if(t){var d=e.getBaseAxis(),h=d.isHorizontal(),v=d.inverse;h?(v&&(f.shape.x+=l),f.shape.width=0):(v||(f.shape.y+=u),f.shape.height=0);var p=Ve(i)?function(g){i(g,f)}:null;Hr(f,{shape:{width:l,height:u,x:o,y:s}},r,null,n,p)}return f}function fJ(e,t,r){var n=e.getArea(),i=kt(n.r0,1),a=kt(n.r,1),o=new Ao({shape:{cx:kt(e.cx,1),cy:kt(e.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=e.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,Hr(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function dJ(e,t,r,n,i){if(e){if(e.type==="polar")return fJ(e,t,r);if(e.type==="cartesian2d")return cJ(e,t,r,n,i)}else return null;return null}function RL(e,t){return e.type===t}var hJ={average:function(e){for(var t=0,r=0,n=0;nt&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),d=Math.abs(c[1]-c[0])*(f||1),h=Math.round(s/d);if(isFinite(h)&&h>1){a==="lttb"&&t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/h));var v=void 0;Me(a)?v=hJ[a]:Ve(a)&&(v=a),v&&t.setData(i.downSample(i.mapDimension(u.dim),1/h,v,vJ))}}}}}var kL=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return aL(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.dataToPoint(a.clampData(r));if(i)O(a.getAxes(),function(f,d){if(f.type==="category"){var h=f.getTicksCoords(),v=a.clampData(r)[d];n&&(n[d]==="x1"||n[d]==="y1")&&(v+=1),v>h.length-1&&(v=h.length-1),v<0&&(v=0),h[v]&&(o[d]=f.toGlobalCoord(h[v].coord))}});else{var s=this.getData(),l=s.getLayout("offset"),u=s.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;o[c]+=l+u/2}return o}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(wo);wo.registerClass(kL);const wS=kL;var gJ=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return aL(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=IE(wS.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(wS);const mJ=gJ;var yJ=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),_J=function(e){pe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new yJ},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,d=n.clockwise,h=Math.PI*2,v=d?f-cMath.PI/2&&cs)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){wd(a,r,ft(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(co),SS={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=dp(t.x,e.x),s=hp(t.x+t.width,i),l=dp(t.y,e.y),u=hp(t.y+t.height,a),c=si?s:o,t.y=f&&l>a?u:l,t.width=c?0:s-o,t.height=f?0:u-l,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),c||f},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var i=hp(t.r,e.r),a=dp(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},CS={cartesian2d:function(e,t,r,n,i,a,o,s,l){var u=new Ht({shape:se({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(e,t,r,n,i,a,o,s,l){var u=!i&&l?xS:Ao,c=new u({shape:n,z2:1});c.name="item";var f=NL(i);if(c.calculateTextPosition=bJ(f,{isRoundCap:u===xS}),a){var d=c.shape,h=i?"r":"endAngle",v={};d[h]=i?0:n.startAngle,v[h]=n[h],(s?Pr:Hr)(c,{shape:v},a)}return c}};function CJ(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function TS(e,t,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Pr:Hr)(r,{shape:l},t,i,null);var c=t?e.baseAxis.model:null;(o?Pr:Hr)(r,{shape:u},c,i)}function MS(e,t){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(e,t,r){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function AJ(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function NL(e){return function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(e)}function ES(e,t,r,n,i,a,o,s){var l=t.getItemVisual(r,"style");s||e.setShape("r",n.get(["itemStyle","borderRadius"])||0),e.useStyle(l);var u=n.getShallow("cursor");u&&e.attr("cursor",u);var c=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",f=PE(n);m0(e,f,{labelFetcher:a,labelDataIndex:r,defaultText:lJ(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var d=e.getTextContent();if(s&&d){var h=n.get(["label","position"]);e.textConfig.inside=h==="middle"?!0:null,wJ(e,h==="outside"?c:h,NL(o),n.get(["label","rotate"]))}sq(d,f,a.getRawValue(r),function(p){return uJ(t,p)});var v=n.getModel(["emphasis"]);J2(e,v.get("focus"),v.get("blurScope"),v.get("disabled")),eE(e,n),AJ(i)&&(e.style.fill="none",e.style.stroke="none",O(e.states,function(p){p.style&&(p.style.fill=p.style.stroke="none")}))}function EJ(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var PJ=function(){function e(){}return e}(),PS=function(e){pe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new PJ},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?r:null},30,!1);function LJ(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,f=a.length/3;c=s[0]&&t<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function FL(e,t,r){if(RL(r,"cartesian2d")){var n=t,i=r.getArea();return{x:e?n.x:i.x,y:e?i.y:n.y,width:e?n.width:i.width,height:e?i.height:n.height}}else{var i=r.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function DJ(e,t,r){var n=e.type==="polar"?Ao:Ht;return new n({shape:FL(t,r,e),silent:!0,z2:0})}const IJ=SJ;function OJ(e){e.registerChartView(IJ),e.registerSeriesModel(mJ),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Rt(uQ,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,cQ("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,pJ("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var hf=Math.PI*2,IS=Math.PI/180;function BL(e,t){return Ls(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function $L(e,t){var r=BL(e,t),n=e.get("center"),i=e.get("radius");ge(i)||(i=[0,i]);var a=gt(r.width,t.getWidth()),o=gt(r.height,t.getHeight()),s=Math.min(a,o),l=gt(i[0],s/2),u=gt(i[1],s/2),c,f,d=e.coordinateSystem;if(d){var h=d.dataToPoint(n);c=h[0]||0,f=h[1]||0}else ge(n)||(n=[n,n]),c=gt(n[0],a)+r.x,f=gt(n[1],o)+r.y;return{cx:c,cy:f,r0:l,r:u}}function RJ(e,t,r){t.eachSeriesByType(e,function(n){var i=n.getData(),a=i.mapDimension("value"),o=BL(n,r),s=$L(n,r),l=s.cx,u=s.cy,c=s.r,f=s.r0,d=-n.get("startAngle")*IS,h=n.get("minAngle")*IS,v=0;i.each(a,function(P){!isNaN(P)&&v++});var p=i.getSum(a),g=Math.PI/(p||v)*2,m=n.get("clockwise"),y=n.get("roseType"),_=n.get("stillShowZeroSum"),b=i.getDataExtent(a);b[0]=0;var x=hf,w=0,S=d,C=m?1:-1;if(i.setLayout({viewRect:o,r:c}),i.each(a,function(P,A){var T;if(isNaN(P)){i.setItemLayout(A,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:m,cx:l,cy:u,r0:f,r:y?NaN:c});return}y!=="area"?T=p===0&&_?g:P*g:T=hf/v,Tr?m:g,x=Math.abs(_.label.y-r);if(x>=b.maxY){var w=_.label.x-t-_.len2*i,S=n+_.len,C=Math.abs(w)e.unconstrainedWidth?null:h:null;n.setStyle("width",v)}var p=n.getBoundingRect();a.width=p.width;var g=(n.style.margin||0)+2.1;a.height=p.height+g,a.y-=(a.height-f)/2}}}function vp(e){return e.position==="center"}function BJ(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*NJ,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,f=s.y,d=s.height;function h(w){w.ignore=!0}function v(w){if(!w.ignore)return!0;for(var S in w.states)if(w.states[S].ignore===!1)return!0;return!1}t.each(function(w){var S=t.getItemGraphicEl(w),C=S.shape,M=S.getTextContent(),P=S.getTextGuideLine(),A=t.getItemModel(w),T=A.getModel("label"),D=T.get("position")||A.get(["emphasis","label","position"]),N=T.get("distanceToLabelLine"),H=T.get("alignTo"),$=gt(T.get("edgeDistance"),u),G=T.get("bleedMargin"),F=A.getModel("labelLine"),R=F.get("length");R=gt(R,u);var j=F.get("length2");if(j=gt(j,u),Math.abs(C.endAngle-C.startAngle)0?"right":"left":oe>0?"left":"right"}var U=Math.PI,K=0,ne=T.get("rotate");if(bt(ne))K=ne*(U/180);else if(D==="center")K=0;else if(ne==="radial"||ne===!0){var fe=oe<0?-re+U:-re;K=fe}else if(ne==="tangential"&&D!=="outside"&&D!=="outer"){var te=Math.atan2(oe,ye);te<0&&(te=U*2+te);var ie=ye>0;ie&&(te=U+te),K=te-U}if(a=!!K,M.x=Ae,M.y=V,M.rotation=K,M.setStyle({verticalAlign:"middle"}),q){M.setStyle({align:W});var he=M.states.select;he&&(he.x+=M.x,he.y+=M.y)}else{var X=M.getBoundingRect().clone();X.applyTransform(M.getComputedTransform());var we=(M.style.margin||0)+2.1;X.y-=we/2,X.height+=we,r.push({label:M,labelLine:P,position:D,len:R,len2:j,minTurnAngle:F.get("minTurnAngle"),maxSurfaceAngle:F.get("maxSurfaceAngle"),surfaceNormal:new Ne(oe,ye),linePoints:Q,textAlign:W,labelDistance:N,labelAlignTo:H,edgeDistance:$,bleedMargin:G,rect:X,unconstrainedWidth:X.width,labelStyleWidth:M.style.width})}S.setTextConfig({inside:q})}}),!a&&e.get("avoidLabelOverlap")&&FJ(r,n,i,l,u,d,c,f);for(var p=0;p0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=a.r0}},t.type="pie",t}(co);const zJ=HJ;function WJ(e,t,r){t=ge(t)&&{coordDimensions:t}||se({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=nL(n,t).dimensions,a=new rL(i,e);return a.initData(n,r),a}var VJ=function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e}();const GJ=VJ;var UJ=Et(),jJ=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new GJ(_t(this.getData,this),_t(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return WJ(this,{coordDimensions:["value"],encodeDefaulter:Rt(Nq,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=UJ(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=yj(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(r){Hg(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(wo);const YJ=jJ;function qJ(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(bt(o)&&!isNaN(o)&&o<0)})}}}function KJ(e){e.registerChartView(zJ),e.registerSeriesModel(YJ),SX("pie",e.registerAction),e.registerLayout(Rt(RJ,"pie")),e.registerProcessor(kJ("pie")),e.registerProcessor(qJ("pie"))}var XJ=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(xt);const ZJ=XJ;var ym=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Cn).models[0]},t.type="cartesian2dAxis",t}(xt);Jn(ym,kQ);var zL={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},QJ=st({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},zL),j0=st({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},zL),JJ=st({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},j0),eee=dt({logBase:10},j0);const tee={category:QJ,value:j0,time:JJ,log:eee};var ree={value:1,category:1,time:1,log:1};function RS(e,t,r,n){O(ree,function(i,a){var o=st(st({},tee[a],!0),n,!0),s=function(l){pe(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var d=Du(this),h=d?Sh(c):{},v=f.getTheme();st(c,v.get(a+"Axis")),st(c,this.getDefaultOption()),c.type=kS(c),d&&Ds(c,h,d)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=gm.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.type=t+"Axis."+a,u.defaultOption=o,u}(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",kS)}function kS(e){return e.type||(e.data?"category":"value")}var nee=function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return Re(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Vt(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e}();const iee=nee;var _m=["x","y"];function NS(e){return e.type==="interval"||e.type==="time"}var aee=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=_m,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!NS(r)||!NS(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,d=o[0]-i[0]*c,h=o[1]-a[0]*f,v=this._transform=[c,0,0,f,d,h];this._invTransform=lh([],v)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new et(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return on(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n){var i=[];if(this._invTransform)return on(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(){var r=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(r[0],r[1]),a=Math.min(n[0],n[1]),o=Math.max(r[0],r[1])-i,s=Math.max(n[0],n[1])-a;return new et(i,a,o,s)},t}(iee),oee=function(e){pe(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t}(YQ);const see=oee;function bm(e,t,r){r=r||{};var n=e.coordinateSystem,i=t.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,c=n.getRect(),f=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,v=u==="x"?[f[2]-h,f[3]+h]:[f[0]-h,f[1]+h];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));v[d.onZero]=Math.max(Math.min(p,v[1]),v[0])}a.position=[u==="y"?v[d[l]]:f[0],u==="x"?v[d[l]]:f[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[s],a.labelOffset=o?v[d[s]]-v[d.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),xu(r.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-m:m,a.z2=1,a}function FS(e){return e.get("coordinateSystem")==="cartesian2d"}function BS(e){var t={xAxisModel:null,yAxisModel:null};return O(t,function(r,n){var i=n.replace(/Model$/,""),a=e.getReferringComponents(i,Cn).models[0];t[n]=a}),t}var pp=Math.log;function lee(e,t,r){var n=sc.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,!0),o=i.length-1,s=n.getInterval.call(r),l=yL(e,t),u=l.extent,c=l.fixMin,f=l.fixMax;if(e.type==="log"){var d=pp(e.base);u=[pp(u[0])/d,pp(u[1])/d]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var h=n.getExtent.call(e);c&&(u[0]=h[0]),f&&(u[1]=h[1]);var v=n.getInterval.call(e),p=u[0],g=u[1];if(c&&f)v=(g-p)/o;else if(c)for(g=u[0]+v*o;gu[0]&&isFinite(p)&&isFinite(u[0]);)v=lp(v),p=u[1]-v*o;else{var m=e.getTicks().length-1;m>o&&(v=lp(v));var y=v*o;g=Math.ceil(u[1]/v)*v,p=kt(g-y),p<0&&u[0]>=0?(p=0,g=kt(y)):g>0&&u[1]<=0&&(g=0,p=-kt(y))}var _=(i[0].value-a[0].value)/s,b=(i[o].value-a[o].value)/s;n.setExtent.call(e,p+v*_,g+v*b),n.setInterval.call(e,v),(_||b)&&n.setNiceExtent.call(e,p+v,g-v)}var uee=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=_m,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=Tt(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var d=+l[f],h=o[d],v=h.model,p=h.scale;mm(p)&&v.get("alignTicks")&&v.get("interval")==null?c.push(h):(vS(p,v),mm(p)&&(s=h))}c.length&&(s||(s=c.pop(),vS(s.scale,s.model)),O(c,function(g){lee(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};O(n.x,function(o){$S(n,"y",o,a)}),O(n.y,function(o){$S(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=t.getBoxLayoutParams(),a=!n&&t.get("containLabel"),o=Ls(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(O(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=IQ(u);if(c){var f=u.isHorizontal()?"height":"width",d=u.model.get(["axisLabel","margin"]);o[f]-=c[f]+d,u.position==="top"?o.y+=c.height+d:u.position==="left"&&(o.x+=c.width+d)}}}),l()),O(this._coordsList,function(u){u.calcAffineTransform()});function l(){O(s,function(u){var c=u.isHorizontal(),f=c?[0,o.width]:[0,o.height],d=u.inverse?1:0;u.setExtent(f[d],f[1-d]),cee(u,c?o.x:o.y)})}},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}Ie(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i0?"top":"bottom",a="center"):md(i-Ki)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e}(),zS={axisLine:function(e,t,r,n){var i=t.get(["axisLine","show"]);if(i==="auto"&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),!!i){var a=t.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(on(s,s,o),on(l,l,o));var c=se({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new bo({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});Au(f.shape,f.style.lineWidth),f.anid="line",r.add(f);var d=t.get(["axisLine","symbol"]);if(d!=null){var h=t.get(["axisLine","symbolSize"]);Me(d)&&(d=[d,d]),(Me(h)||bt(h))&&(h=[h,h]);var v=FX(t.get(["axisLine","symbolOffset"])||0,h),p=h[0],g=h[1];O([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,y){if(d[y]!=="none"&&d[y]!=null){var _=R0(d[y],-p/2,-g/2,p,g,c.stroke,!0),b=m.r+m.offset,x=u?l:s;_.attr({rotation:m.rotate,x:x[0]+b*Math.cos(e.rotation),y:x[1]-b*Math.sin(e.rotation),silent:!0,z2:11}),r.add(_)}})}}},axisTickLabel:function(e,t,r,n){var i=vee(r,n,t,e),a=gee(r,n,t,e);if(hee(t,a,i),pee(r,n,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=LL(Re(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));OL(o)}},axisName:function(e,t,r,n){var i=xu(e.axisName,t.get("name"));if(i){var a=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),c=u[0]>u[1]?-1:1,f=[a==="start"?u[0]-c*l:a==="end"?u[1]+c*l:(u[0]+u[1])/2,VS(a)?e.labelOffset+o*l:0],d,h=t.get("nameRotate");h!=null&&(h=h*Ki/180);var v;VS(a)?d=fo.innerTextLayout(e.rotation,h??e.rotation,o):(d=dee(e.rotation,a,h||0,u),v=e.axisNameAvailableWidth,v!=null&&(v=Math.abs(v/Math.sin(d.rotation)),!isFinite(v)&&(v=null)));var p=s.getFont(),g=t.get("nameTruncate",!0)||{},m=g.ellipsis,y=xu(e.nameTruncateMaxWidth,g.maxWidth,v),_=new dr({x:f[0],y:f[1],rotation:d.rotation,silent:fo.isLabelSilent(t),style:la(s,{text:i,font:p,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||d.textAlign,verticalAlign:s.get("verticalAlign")||d.textVerticalAlign}),z2:1});if(p0({el:_,componentModel:t,itemName:i}),_.__fullText=i,_.anid="name",t.get("triggerEvent")){var b=fo.makeAxisEventDataBase(t);b.targetType="axisName",b.name=i,ft(_).eventData=b}n.add(_),_.updateTransform(),r.add(_),_.decomposeTransform()}}};function dee(e,t,r,n){var i=x2(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return md(i-Ki/2)?(o=l?"bottom":"top",a="center"):md(i-Ki*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iKi/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function hee(e,t,r){if(!_L(e.axis)){var n=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);t=t||[],r=r||[];var a=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=r[0],c=r[1],f=r[r.length-1],d=r[r.length-2];n===!1?(Gr(a),Gr(u)):WS(a,o)&&(n?(Gr(o),Gr(c)):(Gr(a),Gr(u))),i===!1?(Gr(s),Gr(f)):WS(l,s)&&(i?(Gr(l),Gr(d)):(Gr(s),Gr(f)))}}function Gr(e){e&&(e.ignore=!0)}function WS(e,t){var r=e&&e.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!r||!n)){var i=Yy([]);return qy(i,i,-e.rotation),r.applyTransform(us([],i,e.getLocalTransform())),n.applyTransform(us([],i,t.getLocalTransform())),r.intersect(n)}}function VS(e){return e==="middle"||e==="center"}function WL(e,t,r,n,i){for(var a=[],o=[],s=[],l=0;l=0||e===t}function xee(e){var t=Y0(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=wm(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o=s)}}for(var f=this.__startIndex;f15)break}}N.prevElClipPaths&&m.restore()};if(y)if(y.length===0)C=g.__endIndex;else for(var P=h.dpr,A=0;A0&&t>i[0]){for(l=0;lt);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.__painter=this}},e.prototype.eachLayer=function(t,r){for(var n=this._zlevelList,i=0;i0?pf:0),this._needsManuallyCompositing),c.__builtin__||Gy("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&Rr&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(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)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,O(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?st(n[t],r,!0):n[t]=r;for(var i=0;is)return!0;if(o){var l=Y0(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,i,a){},e.prototype.createPointerEl=function(t,r,n,i){var a=r.pointer;if(a){var o=Ka(t).pointerEl=new nq[a.type](qS(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=Ka(t).labelEl=new dr(qS(r.label));t.add(a),XS(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=Ka(t).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,i){var a=Ka(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),XS(a,i))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=v0(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){ZA(u.event)},onmousedown:_p(this._onHandleDragMove,this,0,0),drift:_p(this._onHandleDragMove,this),ondragend:_p(this._onHandleDragEnd,this)}),n.add(i)),ZS(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ge(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,bP(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){KS(this._axisPointerModel,!r&&this._moveAnimation,this._handle,bp(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(bp(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(bp(i)),Ka(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var r=t.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),sm(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,r,n){return n=n||0,{x:t[n],y:t[1-n],width:r[n],height:r[1-n]}},e}();function KS(e,t,r,n){YL(Ka(r).lastProp,n)||(Ka(r).lastProp=n,t?Pr(r,n,e):(r.stopAnimation(),r.attr(n)))}function YL(e,t){if(Ie(e)&&Ie(t)){var r=!0;return O(t,function(n,i){r=r&&YL(e[i],n)}),!!r}else return e===t}function XS(e,t){e[t.get(["label","show"])?"show":"hide"]()}function bp(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function ZS(e,t,r){var n=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}const zee=Hee;function Wee(e){var t=e.get("type"),r=e.getModel(t+"Style"),n;return t==="line"?(n=r.getLineStyle(),n.fill=null):t==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function Vee(e,t,r,n,i){var a=r.get("value"),o=qL(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=xh(s.get("padding")||0),u=s.getFont(),c=Zy(o,u),f=i.position,d=c.width+l[1]+l[3],h=c.height+l[0]+l[2],v=i.align;v==="right"&&(f[0]-=d),v==="center"&&(f[0]-=d/2);var p=i.verticalAlign;p==="bottom"&&(f[1]-=h),p==="middle"&&(f[1]-=h/2),Gee(f,d,h,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),e.label={x:f[0],y:f[1],style:la(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function Gee(e,t,r,n){var i=n.getWidth(),a=n.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+r,a)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function qL(e,t,r,n,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:G0(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};O(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),Me(o)?a=o.replace("{value}",a):Ve(o)&&(a=o(s))}return a}function KL(e,t,r){var n=Su();return qy(n,n,r.rotation),Eg(n,n,r.position),h0([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function Uee(e,t,r,n,i,a){var o=VL.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),Vee(t,n,i,a,{position:KL(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function jee(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function Yee(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}var qee=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=QS(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var d=Wee(a),h=Kee[u](s,f,c);h.style=d,r.graphicKey=h.type,r.pointer=h}var v=bm(l.model,i);Uee(n,r,v,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=bm(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=KL(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=QS(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[r.x,r.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,h=[d,d];h[c]=f[c];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:r.rotation,cursorPoint:h,tooltipOption:v[c]}},t}(zee);function QS(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var Kee={line:function(e,t,r){var n=jee([t,r[0]],[t,r[1]],JS(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=Math.max(1,e.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:Yee([t-n/2,r[0]],[n,i],JS(e))}}};function JS(e){return e.dim==="x"?0:1}const Xee=qee;var Zee=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(xt);const Qee=Zee;var vi=Et(),Jee=O;function XL(e,t,r){if(!Ge.node){var n=t.getZr();vi(n).records||(vi(n).records={}),ete(n,t);var i=vi(n).records[e]||(vi(n).records[e]={});i.handler=r}}function ete(e,t){if(vi(e).initialized)return;vi(e).initialized=!0,r("click",Rt(eC,"click")),r("mousemove",Rt(eC,"mousemove")),r("globalout",rte);function r(n,i){e.on(n,function(a){var o=nte(t);Jee(vi(e).records,function(s){s&&i(s,a,o.dispatchAction)}),tte(o.pendings,t)})}}function tte(e,t){var r=e.showTip.length,n=e.hideTip.length,i;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function rte(e,t,r){e.handler("leave",null,r)}function eC(e,t,r,n){t.handler(e,r,n)}function nte(e){var t={showTip:[],hideTip:[]},r=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function Sm(e,t){if(!Ge.node){var r=t.getZr(),n=(vi(r).records||{})[e];n&&(vi(r).records[e]=null)}}var ite=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";XL("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(r,n){Sm("axisPointer",n)},t.prototype.dispose=function(r,n){Sm("axisPointer",n)},t.type="axisPointer",t}(xi);const ate=ite;function ZL(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=nc(a,e);if(o==null||o<0||ge(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,d=u.dim,h=f==="x"||f==="radius"?1:0,v=a.mapDimension(d),p=[];p[h]=a.get(v,o),p[1-h]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(p)||[]}else r=l.dataToPoint(a.getValues(Re(l.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var tC=Et();function ote(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||_t(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Uf(i)&&(i=ZL({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=Uf(i),u=a.axesInfo,c=s.axesInfo,f=n==="leave"||Uf(i),d={},h={},v={list:[],map:{}},p={showPointer:Rt(lte,h),showTooltip:Rt(ute,v)};O(s.coordSysMap,function(m,y){var _=l||m.containPoint(i);O(s.coordSysAxesInfo[y],function(b,x){var w=b.axis,S=hte(u,b);if(!f&&_&&(!u||S)){var C=S&&S.value;C==null&&!l&&(C=w.pointToData(i)),C!=null&&rC(b,C,p,!1,d)}})});var g={};return O(c,function(m,y){var _=m.linkGroup;_&&!h[y]&&O(_.axesInfo,function(b,x){var w=h[x];if(b!==m&&w){var S=w.value;_.mapper&&(S=m.axis.scale.parse(_.mapper(S,nC(b),nC(m)))),g[m.key]=S}})}),O(g,function(m,y){rC(c[y],m,p,!0,d)}),cte(h,c,d),fte(v,i,e,o),dte(c,o,r),d}}function rC(e,t,r,n,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=ste(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&se(i,s[0]),!n&&e.snap&&a.containData(l)&&l!=null&&(t=l),r.showPointer(e,t,s),r.showTooltip(e,o,l)}}function ste(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return O(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,d;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(c,e,r);d=h.dataIndices,f=h.nestestValue}else{if(d=l.getData().indicesOfNearest(c[0],e,r.type==="category"?.5:null),!d.length)return;f=l.getData().get(c[0],d[0])}if(!(f==null||!isFinite(f))){var v=e-f,p=Math.abs(v);p<=o&&((p=0&&s<0)&&(o=p,s=v,i=f,a.length=0),O(d,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:i}}function lte(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function ute(e,t,r,n){var i=r.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=Fu(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function cte(e,t,r){var n=r.axesInfo=[];O(t,function(i,a){var o=i.axisPointerModel.option,s=e[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function fte(e,t,r,n){if(Uf(t)||!e.list.length){n({type:"hideTip"});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function dte(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=tC(n)[i]||{},o=tC(n)[i]={};O(e,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&O(f.seriesDataIndices,function(d){var h=d.seriesIndex+" | "+d.dataIndex;o[h]=d})});var s=[],l=[];O(a,function(u,c){!o[c]&&l.push(u)}),O(o,function(u,c){!a[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function hte(e,t){for(var r=0;r<(e||[]).length;r++){var n=e[r];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function nC(e){var t=e.axis.model,r={},n=r.axisDim=e.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=t.componentIndex,r.axisName=r[n+"AxisName"]=t.name,r.axisId=r[n+"AxisId"]=t.id,r}function Uf(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function QL(e){GL.registerAxisPointerClass("CartesianAxisPointer",Xee),e.registerComponentModel(Qee),e.registerComponentView(ate),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!ge(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=mee(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},ote)}function vte(e){ua(Iee),ua(QL)}function pte(e,t){var r=xh(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),e=new Ht({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1}),e}var gte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(xt);const mte=gte;function JL(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function eD(e){if(Ge.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+i,d=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),h=Math.round(((d-Math.SQRT2*i)/2+Math.SQRT2*i-(d-f)/2)*100)/100;s+=";"+a+":-"+h+"px";var v=t+" solid "+i+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+v,"border-right:"+v,"background-color:"+n+";"];return'
'}function Cte(e,t){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+e/2+"s "+r,i="opacity"+n+",visibility"+n;return t||(n=" "+e+"s "+r,i+=Ge.transformSupported?","+q0+n:",left"+n+",top"+n),bte+":"+i}function iC(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Ge.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Ge.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+q0+":"+o+";":[["top",0],["left",0],[tD,o]]}function Tte(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont()),r&&t.push("line-height:"+Math.round(r*3/2)+"px");var i=e.get("textShadowColor"),a=e.get("textShadowBlur")||0,o=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return i&&a&&t.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),O(["decoration","align"],function(l){var u=e.get(l);u&&t.push("text-"+l+":"+u)}),t.join(";")}function Mte(e,t,r){var n=[],i=e.get("transitionDuration"),a=e.get("backgroundColor"),o=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),c=e.getModel("textStyle"),f=mP(e,"html"),d=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+d),t&&i&&n.push(Cte(i,r)),a&&n.push("background-color:"+a),O(["width","color","radius"],function(h){var v="border-"+h,p=GE(v),g=e.get(p);g!=null&&n.push(v+":"+g+(h==="color"?"":"px"))}),n.push(Tte(c)),f!=null&&n.push("padding:"+xh(f).join("px ")+"px"),n.join(";")+";"}function aC(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&n9(e,o,document.body,n,i)}else{e[0]=n,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var Ate=function(){function e(t,r,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,Ge.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var a=this._zr=r.getZr(),o=this._appendToBody=n&&n.appendToBody;aC(this._styleCoord,a,o,r.getWidth()/2,r.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,c=a.painter.getViewportRoot();jr(c,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){var r=this._container,n=_te(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative");var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=wte+Mte(t,!this._firstShow,this._longHide)+iC(a[0],a[1],!0)+("border-color:"+Lu(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(Me(a)&&n.get("trigger")==="item"&&!JL(n)&&(s=Ste(n,i,a)),Me(t))o.innerHTML=t+s;else if(t){o.innerHTML="",ge(t)||(t=[t]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Ge.node||!i.getDom())){var o=lC(a,i);this._ticket="";var s=a.dataByCoordSys,l=Nte(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=Dte;c.x=a.x,c.y=a.y,c.update(),ft(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var f=ZL(a,n),d=f.point[0],h=f.point[1];d!=null&&h!=null&&this._tryShow({offsetX:d,offsetY:h,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(lC(a,i))},t.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=ml([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){this._lastDataByCoordSys=null;var s,l;Al(i,function(u){if(ft(u).dataIndex!=null)return s=u,!0;if(ft(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(r,s,n):l?this._showComponentItemTooltip(r,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=_t(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=ml([n.tooltipOption],a),l=this._renderMode,u=[],c=Ou("section",{blocks:[],noHeader:!0}),f=[],d=new Xv;O(r,function(y){O(y.dataByAxis,function(_){var b=i.getComponent(_.axisDim+"Axis",_.axisIndex),x=_.value;if(!(!b||x==null)){var w=qL(x,b.axis,i,_.seriesDataIndices,_.valueLabelOpt),S=Ou("section",{header:w,noHeader:!Vn(w),sortBlocks:!0,blocks:[]});c.blocks.push(S),O(_.seriesDataIndices,function(C){var M=i.getSeriesByIndex(C.seriesIndex),P=C.dataIndexInside,A=M.getDataParams(P);if(!(A.dataIndex<0)){A.axisDim=_.axisDim,A.axisIndex=_.axisIndex,A.axisType=_.axisType,A.axisId=_.axisId,A.axisValue=G0(b.axis,{value:x}),A.axisValueLabel=w,A.marker=d.makeTooltipMarker("item",Lu(A.color),l);var T=Sx(M.formatTooltip(P,!0,null)),D=T.frag;if(D){var N=ml([M],a).get("valueFormatter");S.blocks.push(N?se({valueFormatter:N},D):D)}T.text&&f.push(T.text),u.push(A)}})}})}),c.blocks.reverse(),f.reverse();var h=n.position,v=s.get("order"),p=Ex(c,d,l,v,i.get("useUTC"),s.get("textStyle"));p&&f.unshift(p);var g=l==="richText"?` +`];function Ou(e,t){return t.type=e,t}function im(e){return e.type==="section"}function vP(e){return im(e)?NK:FK}function pP(e){if(im(e)){var t=0,r=e.blocks.length,n=r>1||r>0&&!e.noHeader;return O(e.blocks,function(i){var a=pP(i);a>=t&&(t=a+ +(n&&(!a||im(i)&&!i.noHeader)))}),t}return 0}function NK(e,t,r,n){var i=t.noHeader,a=BK(pP(t)),o=[],s=t.blocks||[];bi(!s||ge(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Ps(u,l)){var c=new bK(u[l],null);s.sort(function(v,p){return c.evaluate(v.sortParam,p.sortParam)})}else l==="seriesDesc"&&s.reverse()}O(s,function(v,p){var g=t.valueFormatter,m=vP(v)(g?se(se({},e),{valueFormatter:g}):e,v,p>0?a.html:0,n);m!=null&&o.push(m)});var f=e.renderMode==="richText"?o.join(a.richText):am(o.join(""),i?r:a.html);if(i)return f;var d=tm(t.header,"ordinal",e.useUTC),h=hP(n,e.renderMode).nameStyle;return e.renderMode==="richText"?gP(e,d,h)+a.richText+f:am('
'+Xr(d)+"
"+f,r)}function FK(e,t,r,n){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(b){return b=ge(b)?b:[b],Re(b,function(x,w){return tm(x,ge(h)?h[w]:h,u)})};if(!(a&&o)){var f=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),d=a?"":tm(l,"ordinal",u),h=t.valueType,v=o?[]:c(t.value),p=!s||!a,g=!s&&a,m=hP(n,i),y=m.nameStyle,_=m.valueStyle;return i==="richText"?(s?"":f)+(a?"":gP(e,d,y))+(o?"":zK(e,v,p,g,_)):am((s?"":f)+(a?"":$K(d,!s,y))+(o?"":HK(v,p,g,_)),r)}}function Ex(e,t,r,n,i,a){if(e){var o=vP(e),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,a)}}function BK(e){return{html:RK[e],richText:kK[e]}}function am(e,t){var r='
',n="margin: "+t+"px 0 0";return'
'+e+r+"
"}function $K(e,t,r){var n=t?"margin-left:2px":"";return''+Xr(e)+""}function HK(e,t,r,n){var i=r?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=ge(e)?e:[e],''+Re(e,function(o){return Xr(o)}).join("  ")+""}function gP(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function zK(e,t,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(ge(t)?t.join(" "):t,a)}function WK(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return Lu(n)}function mP(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var Xv=function(){function e(){this.richTextStyles={},this._nextStyleNameId=C2()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var i=n==="richText"?this._generateStyleName():null,a=Eq({color:r,type:t,renderMode:n,markerId:i});return Te(a)?a:(this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};ge(r)?O(r,function(a){return se(n,a)}):se(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e}();function VK(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),l=ge(s),u=WK(t,r),c,f,d,h;if(o>1||l&&!o){var v=GK(s,t,r,a,u);c=v.inlineValues,f=v.inlineValueTypes,d=v.blocks,h=v.inlineValues[0]}else if(o){var p=i.getDimensionInfo(a[0]);h=c=Is(i,r,a[0]),f=p.type}else h=c=l?s[0]:s;var g=t0(t),m=g&&t.name||"",y=i.getName(r),_=n?m:y;return Ou("section",{header:m,noHeader:n||!g,sortParam:h,blocks:[Ou("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Vn(_),value:c,valueType:f})].concat(d||[])})}function GK(e,t,r,n,i){var a=t.getData(),o=oa(e,function(f,d,h){var v=a.getDimensionInfo(h);return f=f||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];n.length?O(n,function(f){c(Is(a,r,f),f)}):O(e,c);function c(f,d){var h=a.getDimensionInfo(d);!h||h.otherDims.tooltip===!1||(o?u.push(Ou("nameValue",{markerType:"subItem",markerColor:i,name:h.displayName,value:f,valueType:h.type})):(s.push(f),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var ki=Et();function qc(e,t){return e.getName(t)||e.getId(t)}var UK="__universalTransitionEnabled",Mh=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Zl({count:YK,reset:qK}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=ki(this).sourceManager=new OK(this);a.prepareSource();var o=this.getInitialData(r,i);Lx(o,this),this.dataTask.context.data=o,ki(this).dataBeforeProcessed=o,Px(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=Du(this),a=i?Sh(r):{},o=this.subType;xt.hasClass(o)&&(o+="Series"),st(r,n.getTheme().get(this.subType)),st(r,this.getDefaultOption()),Hg(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Ds(r,a,i)},t.prototype.mergeOption=function(r,n){r=st(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Du(this);i&&Ds(this.option,r,i);var a=ki(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);Lx(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,ki(this).dataBeforeProcessed=o,Px(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!zr(r))for(var n=["show"],i=0;ithis.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=T0.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},t.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},t.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},t.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[qc(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[UK])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Ie(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(r,n)}},t.registerClass=function(r){return xt.registerClass(r)},t.protoInitialize=function(){var r=t.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),t}(xt);Jn(Mh,yK);Jn(Mh,T0);L2(Mh,xt);function Px(e){var t=e.name;t0(e)||(e.name=jK(e)||t)}function jK(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return O(r,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function YK(e){return e.model.getRawData().count()}function qK(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),KK}function KK(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Lx(e,t){O(UU(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,Rt(XK,t))})}function XK(e,t){var r=om(e);return r&&r.setOutputEnd((t||this).count()),t}function om(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(e.uid))}return n}}const wo=Mh;var D0=function(){function e(){this.group=new cn,this.uid=gh("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){},e.prototype.updateLayout=function(t,r,n,i){},e.prototype.updateVisual=function(t,r,n,i){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e}();n0(D0);ch(D0);const xi=D0;function yP(){var e=Et();return function(t){var r=e(t),n=t.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var _P=Et(),ZK=yP(),I0=function(){function e(){this.group=new cn,this.uid=gh("viewChart"),this.renderTask=Zl({plan:QK,reset:JK}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.highlight=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&Ix(a,i,"emphasis")},e.prototype.downplay=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&Ix(a,i,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateLayout=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.eachRendered=function(t){g0(this.group,t)},e.markUpdateMethod=function(t,r){_P(t).updateMethod=r},e.protoInitialize=function(){var t=e.prototype;t.type="chart"}(),e}();function Dx(e,t,r){e&&Xg(e)&&(t==="emphasis"?Ug:jg)(e,r)}function Ix(e,t,r){var n=nc(e,t),i=t&&t.highlightKey!=null?i7(t.highlightKey):null;n!=null?O(cr(n),function(a){Dx(e.getItemGraphicEl(a),r,i)}):e.eachItemGraphicEl(function(a){Dx(a,r,i)})}n0(I0);ch(I0);function QK(e){return ZK(e.model)}function JK(e){var t=e.model,r=e.ecModel,n=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&_P(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,r,n,i),eX[l]}var eX={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};const co=I0;var Td="\0__throttleOriginMethod",Ox="\0__throttleRate",Rx="\0__throttleType";function O0(e,t,r){var n,i=0,a=0,o=null,s,l,u,c;t=t||0;function f(){a=new Date().getTime(),o=null,e.apply(l,u||[])}var d=function(){for(var h=[],v=0;v=0?f():o=setTimeout(f,-s),i=n};return d.clear=function(){o&&(clearTimeout(o),o=null)},d.debounceNextCall=function(h){c=h},d}function bP(e,t,r,n){var i=e[t];if(i){var a=i[Td]||i,o=i[Rx],s=i[Ox];if(s!==r||o!==n){if(r==null||!n)return e[t]=a;i=e[t]=O0(a,r,n==="debounce"),i[Td]=a,i[Rx]=n,i[Ox]=r}return i}}function sm(e,t){var r=e[t];r&&r[Td]&&(r.clear&&r.clear(),e[t]=r[Td])}var kx=Et(),Nx={itemStyle:Mu(DE,!0),lineStyle:Mu(LE,!0)},tX={lineStyle:"stroke",itemStyle:"fill"};function wP(e,t){var r=e.visualStyleMapper||Nx[t];return r||(console.warn("Unknown style type '"+t+"'."),Nx.itemStyle)}function xP(e,t){var r=e.visualDrawType||tX[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var rX={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=e.getModel(n),a=wP(e,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=xP(e,n),u=o[l],c=Ve(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=d,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Ve(o.fill)?d:o.fill,o.stroke=o.stroke==="auto"||Ve(o.stroke)?d:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!t.isSeriesFiltered(e)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(h,v){var p=e.getDataParams(v),g=se({},o);g[l]=c(p),h.setItemVisual(v,"style",g)}}}},ul=new rr,nX={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=wP(e,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){ul.option=l[n];var u=i(ul),c=o.ensureUniqueItemVisual(s,"style");se(c,u),ul.option.decal&&(o.setItemVisual(s,"decal",ul.option.decal),ul.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},iX={performRawSeries:!0,overallReset:function(e){var t=Ue();e.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),kx(r).scope=a}}),e.eachSeries(function(r){if(!(r.isColorBySeries()||e.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=kx(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=xP(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var d=a.ensureUniqueItemVisual(c,"style"),h=n.getName(u)||u+"",v=n.count();d[l]=r.getColorFromPalette(h,o,v)}})}})}},Kc=Math.PI;function aX(e,t){t=t||{},dt(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new cn,n=new Ht({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var i=new dr({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Ht({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(a);var o;return t.showSpinner&&(o=new c0({shape:{startAngle:-Kc/2,endAngle:-Kc/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Kc*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Kc*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(e.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=e.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var oX=function(){function e(t,r,n,i){this._stageTaskMap=Ue(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},e.prototype.restorePipelines=function(t){var r=this,n=r._pipelineMap=Ue();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;O(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";bi(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},e.prototype.prepareView=function(t,r,n,i){var a=t.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(r,a)},e.prototype.performDataProcessorTasks=function(t,r){this._performStageTasks(this._dataProcessorHandlers,t,r,{block:!0})},e.prototype.performVisualTasks=function(t,r,n){this._performStageTasks(this._visualHandlers,t,r,n)},e.prototype._performStageTasks=function(t,r,n,i){i=i||{};var a=!1,o=this;O(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,d=c.overallTask;if(d){var h,v=d.agentStubMap;v.each(function(g){s(i,g)&&(g.dirty(),h=!0)}),h&&d.dirty(),o.updatePayload(d,n);var p=o.getPerformArgs(d,i.block);v.each(function(g){g.perform(p)}),d.perform(p)&&(a=!0)}else f&&f.each(function(g,m){s(i,g)&&g.dirty();var y=o.getPerformArgs(g,i.block);y.skip=!l.performRawSeries&&r.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},e.prototype.performSeriesTasks=function(t){var r;t.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var r=t.tail;do{if(r.__block){t.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},e.prototype.updatePayload=function(t,r){r!=="remain"&&(t.context.payload=r)},e.prototype._createSeriesStageTask=function(t,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Ue(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var d=f.uid,h=s.set(d,o&&o.get(d)||Zl({plan:fX,reset:dX,count:vX}));h.context={model:f,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(f,h)}},e.prototype._createOverallStageTask=function(t,r,n,i){var a=this,o=r.overallTask=r.overallTask||Zl({reset:sX});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Ue(),u=t.seriesType,c=t.getTargetSeries,f=!0,d=!1,h="";bi(!t.createOnAllSeries,h),u?n.eachRawSeriesByType(u,v):c?c(n,i).each(v):(f=!1,O(n.getSeries(),v));function v(p){var g=p.uid,m=l.set(g,s&&s.get(g)||(d=!0,Zl({reset:lX,onDirty:cX})));m.context={model:p,overallProgress:f},m.agent=o,m.__block=f,a._pipe(p,m)}d&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},e.wrapStageHandler=function(t,r){return Ve(t)&&(t={overallReset:t,seriesType:pX(t)}),t.uid=gh("stageHandler"),r&&(t.visualType=r),t},e}();function sX(e){e.overallReset(e.ecModel,e.api,e.payload)}function lX(e){return e.overallProgress&&uX}function uX(){this.agent.dirty(),this.getDownstream().dirty()}function cX(){this.agent&&this.agent.dirty()}function fX(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function dX(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=cr(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?Re(t,function(r,n){return SP(n)}):hX}var hX=SP(0);function SP(e){return function(t,r){var n=r.data,i=r.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&h===u.length-d.length){var v=u.slice(0,h);v!=="data"&&(r.mainType=v,r[d.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},e.prototype.filter=function(t,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,i,a));function c(f,d,h,v){return f[h]==null||d[v||h]===f[h]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),lm=["symbol","symbolSize","symbolRotate","symbolOffset"],Hx=lm.concat(["symbolKeepAspect"]),_X={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData();if(e.legendIcon&&r.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&to(l)?l:.5;var u=e.createRadialGradient(o,s,0,o,s,l);return u}function cm(e,t,r){for(var n=t.type==="radial"?$X(e,t,r):BX(e,t,r),i=t.colorStops,a=0;a0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:bt(e)?[e]:ge(e)?e:null}function EP(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&zX(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(r=Re(r,function(a){return a/i}),n/=i)}return[r,n]}var WX=new _o(!0);function Ad(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function zx(e){return typeof e=="string"&&e!=="none"}function Ed(e){var t=e.fill;return t!=null&&t!=="none"}function Wx(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function Vx(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function fm(e,t,r){var n=D2(t.image,t.__image,r);if(fh(n)){var i=e.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*jU),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function VX(e,t,r,n){var i,a=Ad(r),o=Ed(r),s=r.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var c=t.path||WX,f=t.__dirty;if(!n){var d=r.fill,h=r.stroke,v=o&&!!d.colorStops,p=a&&!!h.colorStops,g=o&&!!d.image,m=a&&!!h.image,y=void 0,_=void 0,b=void 0,x=void 0,w=void 0;(v||p)&&(w=t.getBoundingRect()),v&&(y=f?cm(e,d,w):t.__canvasFillGradient,t.__canvasFillGradient=y),p&&(_=f?cm(e,h,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(b=f||!t.__canvasFillPattern?fm(e,d,t):t.__canvasFillPattern,t.__canvasFillPattern=b),m&&(x=f||!t.__canvasStrokePattern?fm(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=b),v?e.fillStyle=y:g&&(b?e.fillStyle=b:o=!1),p?e.strokeStyle=_:m&&(x?e.strokeStyle=x:a=!1)}var S=t.getGlobalScale();c.setScale(S[0],S[1],t.segmentIgnoreThreshold);var C,M;e.setLineDash&&r.lineDash&&(i=EP(t),C=i[0],M=i[1]);var P=!0;(u||f&Ko)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),P=!1),c.reset(),t.buildPath(c,t.shape,n),c.toStatic(),t.pathUpdated()),P&&c.rebuildPath(e,l?s:1),C&&(e.setLineDash(C),e.lineDashOffset=M),n||(r.strokeFirst?(a&&Vx(e,r),o&&Wx(e,r)):(o&&Wx(e,r),a&&Vx(e,r))),C&&e.setLineDash([])}function GX(e,t,r){var n=t.__image=D2(r.image,t.__image,t,t.onload);if(!(!n||!fh(n))){var i=r.x||0,a=r.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;e.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,f=o-u,d=s-c;e.drawImage(n,u,c,f,d,i,a,o,s)}else e.drawImage(n,i,a,o,s)}}function UX(e,t,r){var n,i=r.text;if(i!=null&&(i+=""),i){e.font=r.font||yo,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=EP(t),a=n[0],o=n[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(Ad(r)&&e.strokeText(i,r.x,r.y),Ed(r)&&e.fillText(i,r.x,r.y)):(Ed(r)&&e.fillText(i,r.x,r.y),Ad(r)&&e.strokeText(i,r.x,r.y)),a&&e.setLineDash([])}}var Gx=["shadowBlur","shadowOffsetX","shadowOffsetY"],Ux=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function PP(e,t,r,n,i){var a=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){wr(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?lo.opacity:o}(n||t.blend!==r.blend)&&(a||(wr(e,i),a=!0),e.globalCompositeOperation=t.blend||lo.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(r,n,i){if(!this[Qt]){if(this._disposed){this.id;return}var a,o,s;if(Ie(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Qt]=!0,!this._model||n){var l=new tK(this._api),u=this._theme,c=this._model=new JE;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},vm);var f={seriesTransition:s,optionChanged:!0};if(i)this[gr]={silent:a,updateParams:f},this[Qt]=!1,this.getZr().wakeUp();else{try{Go(this),Ni.update.call(this,null,f)}catch(d){throw this[gr]=null,this[Qt]=!1,d}this._ssr||this._zr.flush(),this[gr]=null,this[Qt]=!1,cl.call(this,a),fl.call(this,a)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ge.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},t.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},t.prototype.getSvgDataURL=function(){if(Ge.svgSupported){var r=this._zr,n=r.storage.getDisplayList();return O(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()}},t.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;O(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return O(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(oS[i]){var l=s,u=s,c=-s,f=-s,d=[],h=r&&r.pixelRatio||this.getDevicePixelRatio();O(Jl,function(_,b){if(_.group===i){var x=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(Qe(r)),w=_.getDom().getBoundingClientRect();l=a(w.left,l),u=a(w.top,u),c=o(w.right,c),f=o(w.bottom,f),d.push({dom:x,left:w.left,top:w.top})}}),l*=h,u*=h,c*=h,f*=h;var v=c-l,p=f-u,g=Mo.createCanvas(),m=uw(g,{renderer:n?"svg":"canvas"});if(m.resize({width:v,height:p}),n){var y="";return O(d,function(_){var b=_.left-l,x=_.top-u;y+=''+_.dom+""}),m.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&m.painter.setBackgroundColor(r.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return r.connectedBackgroundColor&&m.add(new Ht({shape:{x:0,y:0,width:v,height:p},style:{fill:r.connectedBackgroundColor}})),O(d,function(_){var b=new zs({style:{x:_.left*h-l,y:_.top*h-u,image:_.dom}});m.add(b)}),m.refreshImmediately(),g.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n){return tp(this,"convertToPixel",r,n)},t.prototype.convertFromPixel=function(r,n){return tp(this,"convertFromPixel",r,n)},t.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Cv(i,r);return O(o,function(s,l){l.indexOf("Models")>=0&&O(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(n,u))}},this)},this),!!a},t.prototype.getVisual=function(r,n){var i=this._model,a=Cv(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?wX(s,l,n):xX(s,n)},t.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},t.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},t.prototype._initEvents=function(){var r=this;O(mZ,function(n){var i=function(a){var o=r.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&Al(s,function(v){var p=ft(v);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType)||{},!0}else if(p.eventData)return l=se({},p.eventData),!0},!0),l){var c=l.componentType,f=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",f=l.seriesIndex);var d=c&&f!=null&&o.getComponent(c,f),h=d&&r[d.mainType==="series"?"_chartsMap":"_componentsMap"][d.__viewId];l.event=a,l.type=n,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:d,view:h},r.trigger(n,l)}};i.zrEventfulCallAtLast=!0,r._zr.on(n,i,r)}),O(Ql,function(n,i){r._messageCenter.on(i,function(a){this.trigger(i,a)},r)}),O(["selectchanged"],function(n){r._messageCenter.on(n,function(i){this.trigger(n,i)},r)}),CX(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&E2(this.getDom(),F0,"");var n=this,i=n._api,a=n._model;O(n._componentsViews,function(o){o.dispose(a,i)}),O(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Jl[n.id]},t.prototype.resize=function(r){if(!this[Qt]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[gr]&&(a==null&&(a=this[gr].silent),i=!0,this[gr]=null),this[Qt]=!0;try{i&&Go(this),Ni.update.call(this,{type:"resize",animation:se({duration:0},r&&r.animation)})}catch(o){throw this[Qt]=!1,o}this[Qt]=!1,cl.call(this,a),fl.call(this,a)}}},t.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(Ie(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!pm[r]){var i=pm[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(r){var n=se({},r);return n.type=Ql[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(Ie(n)||(n={silent:!!n}),!!Pd[r.type]&&this._model){if(this[Qt]){this._pendingActions.push(r);return}var i=n.silent;np.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Ge.browser.weChat&&this._throttledZrFlush(),cl.call(this,i),fl.call(this,i)}},t.prototype.updateLabelLayout=function(){yn.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Go=function(f){var d=f._scheduler;d.restorePipelines(f._model),d.prepareStageTasks(),ep(f,!0),ep(f,!1),d.plan()},ep=function(f,d){for(var h=f._model,v=f._scheduler,p=d?f._componentsViews:f._chartsViews,g=d?f._componentsMap:f._chartsMap,m=f._zr,y=f._api,_=0;_d.get("hoverLayerThreshold")&&!Ge.node&&!Ge.worker&&d.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=f._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(f,d){var h=f.get("blendMode")||null;d.eachRendered(function(v){v.isGroup||(v.style.blend=h)})}function s(f,d){if(!f.preventAutoZ){var h=f.get("z")||0,v=f.get("zlevel")||0;d.eachRendered(function(p){return l(p,h,v,-1/0),!0})}}function l(f,d,h,v){var p=f.getTextContent(),g=f.getTextGuideLine(),m=f.isGroup;if(m)for(var y=f.childrenRef(),_=0;_0?{duration:p,delay:h.get("delay"),easing:h.get("easing")}:null;d.eachRendered(function(m){if(m.states&&m.states.emphasis){if(fs(m))return;if(m instanceof ht&&a7(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(v){m.stateTransition=g;var _=m.getTextContent(),b=m.getTextGuideLine();_&&(_.stateTransition=g),b&&(b.stateTransition=g)}m.__dirty&&i(m)}})}iS=function(f){return new(function(d){pe(h,d);function h(){return d!==null&&d.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(v){for(;v;){var p=v.__ecComponentInfo;if(p!=null)return f._model.getComponent(p.mainType,p.index);v=v.parent}},h.prototype.enterEmphasis=function(v,p){Ug(v,p),Vr(f)},h.prototype.leaveEmphasis=function(v,p){jg(v,p),Vr(f)},h.prototype.enterBlur=function(v){KY(v),Vr(f)},h.prototype.leaveBlur=function(v){q2(v),Vr(f)},h.prototype.enterSelect=function(v){K2(v),Vr(f)},h.prototype.leaveSelect=function(v){X2(v),Vr(f)},h.prototype.getModel=function(){return f.getModel()},h.prototype.getViewOfComponentModel=function(v){return f.getViewOfComponentModel(v)},h.prototype.getViewOfSeriesModel=function(v){return f.getViewOfSeriesModel(v)},h}(eP))(f)},GP=function(f){function d(h,v){for(var p=0;p=0)){sS.push(r);var a=MP.wrapStageHandler(r,i);a.__prio=t,a.__raw=r,e.push(a)}}function XP(e,t){pm[e]=t}function CZ(e,t,r){var n=rZ("registerMap");n&&n(e,t,r)}var TZ=AK;Po(k0,rX);Po(Ah,nX);Po(Ah,iX);Po(k0,_X);Po(Ah,bX);Po(BP,JX);qP(rP);KP(aZ,uK);XP("default",aX);Gs({type:uo,event:uo,update:uo},Tr);Gs({type:$f,event:$f,update:$f},Tr);Gs({type:jl,event:jl,update:jl},Tr);Gs({type:Hf,event:Hf,update:Hf},Tr);Gs({type:Yl,event:Yl,update:Yl},Tr);YP("light",gX);YP("dark",mX);function dl(e){return e==null?0:e.length||1}function lS(e){return e}var MZ=function(){function e(t,r,n,i,a,o){this._old=t,this._new=r,this._oldKeyGetter=n||lS,this._newKeyGetter=i||lS,this.context=a,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,r=this._new,n={},i=new Array(t.length),a=new Array(r.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&d===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&d>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&d===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var h=0;h1)for(var s=0;s30}var hl=Ie,Fi=Re,kZ=typeof Int32Array>"u"?Array:Int32Array,NZ="e\0\0",uS=-1,FZ=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],BZ=["_approximateExtent"],cS,tf,vl,pl,op,rf,sp,$Z=function(){function e(t,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;QP(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===dn;if(l&&!i.pure)for(var u=[],c=t;c0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[r];return a==null&&(a=this.getVisual(r),ge(a)?a=a.slice():hl(a)&&(a=se({},a)),i[r]=a),a},e.prototype.setItemVisual=function(t,r,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,hl(r)?se(i,r):i[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){hl(t)?se(this._layout,t):this._layout[t]=r},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,r,n){this._itemLayouts[t]=n?se(this._itemLayouts[t]||{},r):r},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,r){var n=this.hostModel&&this.hostModel.seriesIndex;$Y(n,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){O(this._graphicEls,function(n,i){n&&t&&t.call(r,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:Fi(this.dimensions,this._getDimInfo,this),this.hostModel)),op(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];Ve(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(Uy(arguments)))})},e.internalField=function(){cS=function(t){var r=t._invertedIndicesMap;O(r,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=r[i]=new kZ(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[r]=l}}}(),e}();const rL=$Z;function nL(e,t){A0(e)||(e=E0(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],i=Ue(),a=[],o=zZ(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&tL(o),l=n===e.dimensionsDefine,u=l?eL(e):JP(n),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,o));for(var f=Ue(c),d=new cP(o),h=0;h0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function zZ(e,t,r,n){var i=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return O(t,function(a){var o;Ie(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function WZ(e,t,r){if(r||t.hasKey(e)){for(var n=0;t.hasKey(e+n);)n++;e+=n}return t.set(e,!0),e}var VZ=function(){function e(t){this.coordSysDims=[],this.axisMap=Ue(),this.categoryAxisMap=Ue(),this.coordSysName=t}return e}();function GZ(e){var t=e.get("coordinateSystem"),r=new VZ(t),n=UZ[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var UZ={cartesian2d:function(e,t,r,n){var i=e.getReferringComponents("xAxis",Cn).models[0],a=e.getReferringComponents("yAxis",Cn).models[0];t.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Uo(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),Uo(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var i=e.getReferringComponents("singleAxis",Cn).models[0];t.coordSysDims=["single"],r.set("single",i),Uo(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var i=e.getReferringComponents("polar",Cn).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Uo(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),Uo(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,n){var i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();O(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),Uo(u)&&(n.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function Uo(e){return e.get("type")==="category"}function jZ(e,t,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;YZ(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(e&&e.get("stack")),u,c,f,d;if(O(a,function(y,_){Te(y)&&(a[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,v=c.type,p=0;O(a,function(y){y.coordDim===h&&p++});var g={name:f,coordDim:h,coordDimIndex:p,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:d,coordDim:d,coordDimIndex:p+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(d,v),m.storeDimIndex=s.ensureCalculationDimension(f,v)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:d,stackResultDimension:f}}function YZ(e){return!QP(e.schema)}function iL(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function qZ(e,t){return iL(e,t)?e.getCalculationInfo("stackResultDimension"):t}function KZ(e,t){var r=e.get("coordinateSystem"),n=M0.get(r),i;return t&&t.coordSysDims&&(i=Re(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=LZ(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function XZ(e,t,r){var n,i;return r&&O(e,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(e[n].otherDims.itemName=0),n}function aL(e,t,r){r=r||{};var n=t.getSourceManager(),i,a=!1;e?(a=!0,i=E0(e)):(i=n.getSource(),a=i.sourceFormat===dn);var o=GZ(t),s=KZ(t,o),l=r.useEncodeDefaulter,u=Ve(l)?l:l?Rt(kq,s,t):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=nL(i,c),d=XZ(f.dimensions,r.createInvertedIndices,o),h=a?null:n.getSharedDataStore(f),v=jZ(t,{schema:f,store:h}),p=new rL(f,t);p.setCalculationInfo(v);var g=d!=null&&ZZ(i)?function(m,y,_,b){return b===d?_:this.defaultDimValueGetter(m,y,_,b)}:null;return p.hasItemOption=!1,p.initData(a?i:h,null,g),p}function ZZ(e){if(e.sourceFormat===dn){var t=QZ(e.data||[]);return!ge(rc(t))}}function QZ(e){for(var t=0;tr[1]&&(r[1]=t[1])},e.prototype.unionExtentFromData=function(t,r){this.unionExtent(t.getApproximateExtent(r))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(r)||(n[1]=r)},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e}();ch(oL);const Ei=oL;var JZ=0,eQ=function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++JZ}return e.createByAxisModel=function(t){var r=t.option,n=r.data,i=n&&Re(n,tQ);return new e({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var r,n=this._needCollect;if(!Te(t)&&!n)return t;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=t,r;var i=this._getOrCreateMap();return r=i.get(t),r==null&&(n?(r=this.categories.length,this.categories[r]=t,i.set(t,r)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Ue(this.categories))},e}();function tQ(e){return Ie(e)&&e.value!=null?e.value:e+""}const gm=eQ;function mm(e){return e.type==="interval"||e.type==="log"}function rQ(e,t,r,n){var i={},a=e[1]-e[0],o=i.interval=S2(a/t,!0);r!=null&&on&&(o=i.interval=n);var s=i.intervalPrecision=sL(o),l=i.niceTickExtent=[kt(Math.ceil(e[0]/o)*o,s),kt(Math.floor(e[1]/o)*o,s)];return nQ(l,e),i}function lp(e){var t=Math.pow(10,e0(e)),r=e/t;return r?r===2?r=3:r===3?r=5:r*=2:r=1,kt(r*t)}function sL(e){return hi(e)+2}function fS(e,t,r){e[t]=Math.max(Math.min(e[t],r[1]),r[0])}function nQ(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),fS(e,0,t),fS(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function Eh(e,t){return e>=t[0]&&e<=t[1]}function Ph(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function Lh(e,t){return e*(t[1]-t[0])+t[0]}var lL=function(e){pe(t,e);function t(r){var n=e.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new gm({})),ge(i)&&(i=new gm({categories:Re(i,function(a){return Ie(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(r){return r==null?NaN:Te(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},t.prototype.contain=function(r){return r=this.parse(r),Eh(r,this._extent)&&this._ordinalMeta.categories[r]!=null},t.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),Ph(r,this._extent)},t.prototype.scale=function(r){return r=Math.round(Lh(r,this._extent)),this.getRawOrdinalNumber(r)},t.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},t.prototype.getMinorTicks=function(r){},t.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o=0&&r=0&&r=r},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Ei);Ei.registerClass(lL);const uL=lL;var Ba=kt,cL=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return t.prototype.parse=function(r){return r},t.prototype.contain=function(r){return Eh(r,this._extent)},t.prototype.normalize=function(r){return Ph(r,this._extent)},t.prototype.scale=function(r){return Lh(r,this._extent)},t.prototype.setExtent=function(r,n){var i=this._extent;isNaN(r)||(i[0]=parseFloat(r)),isNaN(n)||(i[1]=parseFloat(n))},t.prototype.unionExtent=function(r){var n=this._extent;r[0]n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=sL(r)},t.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]l)return[];var c=s.length?s[s.length-1].value:a[1];return i[1]>c&&(r?s.push({value:Ba(c+n,o)}):s.push({value:i[1]})),s},t.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;oa[0]&&h0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function hL(e){var t=oQ(e),r=[];return O(e,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),d=Math.abs(f[1]-f[0]);s=u?c/d*u:c}else{var h=n.getData();s=Math.abs(o[1]-o[0])/h.count()}var v=gt(n.get("barWidth"),s),p=gt(n.get("barMaxWidth"),s),g=gt(n.get("barMinWidth")||(pL(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");r.push({bandWidth:s,barWidth:v,barMaxWidth:p,barMinWidth:g,barGap:m,barCategoryGap:y,axisKey:W0(a),stackId:z0(n)})}),sQ(r)}function sQ(e){var t={};O(e,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var 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 h=n.barGap;h!=null&&(s.gap=h);var v=n.barCategoryGap;v!=null&&(s.categoryGap=v)});var r={};return O(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Tt(a).length;s=Math.max(35-l*4,15)+"%"}var u=gt(s,o),c=gt(n.gap,1),f=n.remainedWidth,d=n.autoWidthCount,h=(f-u)/(d+(d-1)*c);h=Math.max(h,0),O(a,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var b=m.width;y&&(b=Math.min(b,y)),_&&(b=Math.max(b,_)),m.width=b,f-=b+c*b,d--}else{var b=h;y&&yb&&(b=_),b!==h&&(m.width=b,f-=b+c*b,d--)}}),h=(f-u)/(d+(d-1)*c),h=Math.max(h,0);var v=0,p;O(a,function(m,y){m.width||(m.width=h),p=m,v+=m.width*(1+c)}),p&&(v-=p.width*c);var g=-v/2;O(a,function(m,y){r[i][y]=r[i][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+c)})}),r}function lQ(e,t,r){if(e&&t){var n=e[W0(t)];return n!=null&&r!=null?n[z0(r)]:n}}function uQ(e,t){var r=dL(e,t),n=hL(r);O(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=z0(i),u=n[W0(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function cQ(e){return{seriesType:e,plan:yP(),reset:function(t){if(vL(t)){var r=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=t.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),f=iL(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),d=a.isHorizontal(),h=fQ(i,a),v=pL(t),p=t.get("barMinHeight")||0,g=c&&r.getDimensionIndex(c),m=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(_,b){for(var x=_.count,w=v&&up(x*3),S=v&&l&&up(x*3),C=v&&up(x),M=n.master.getRect(),P=d?M.width:M.height,A,T=b.getStore(),D=0;(A=_.next())!=null;){var N=T.get(f?g:o,A),H=T.get(s,A),$=h,G=void 0;f&&(G=+N-T.get(o,A));var F=void 0,R=void 0,j=void 0,re=void 0;if(d){var oe=n.dataToPoint([N,H]);if(f){var ye=n.dataToPoint([G,H]);$=ye[0]}F=$,R=oe[1]+y,j=oe[0]-$,re=m,Math.abs(j)>>1;e[i][1]i&&(this._approxInterval=i);var s=nf.length,l=Math.min(dQ(nf,this._approxInterval,0,s),s-1);this._interval=nf[l][1],this._minLevelUnit=nf[Math.max(l-1,0)][0]},t.prototype.parse=function(r){return bt(r)?r:+wi(r)},t.prototype.contain=function(r){return Eh(this.parse(r),this._extent)},t.prototype.normalize=function(r){return Ph(this.parse(r),this._extent)},t.prototype.scale=function(r){return Lh(r,this._extent)},t.type="time",t}(sc),nf=[["second",b0],["minute",w0],["hour",Kl],["quarter-day",Kl*6],["half-day",Kl*12],["day",en*1.2],["half-week",en*3.5],["week",en*7],["month",en*31],["quarter",en*95],["half-year",ex/2],["year",ex]];function hQ(e,t,r,n){var i=wi(t),a=wi(r),o=function(v){return rx(i,v,n)===rx(a,v,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},f=function(){return c()&&o("minute")},d=function(){return f()&&o("second")},h=function(){return d()&&o("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return f();case"second":return d();case"millisecond":return h()}}function vQ(e,t){return e/=en,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function pQ(e){var t=30*en;return e/=t,e>6?6:e>3?3:e>2?2:1}function gQ(e){return e/=Kl,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function dS(e,t){return e/=t?w0:b0,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function mQ(e){return S2(e,!0)}function yQ(e,t,r){var n=new Date(e);switch(ds(t)){case"year":case"month":n[FE(r)](0);case"day":n[BE(r)](1);case"hour":n[$E(r)](0);case"minute":n[HE(r)](0);case"second":n[zE(r)](0),n[WE(r)](0)}return n.getTime()}function _Q(e,t,r,n){var i=1e4,a=kE,o=0;function s(P,A,T,D,N,H,$){for(var G=new Date(A),F=A,R=G[D]();F1&&H===0&&T.unshift({value:T[0].value-F})}}for(var H=0;H=n[0]&&y<=n[1]&&f++)}var _=(n[1]-n[0])/t;if(f>_*1.5&&d>_/1.5||(u.push(g),f>_||e===a[h]))break}c=[]}}}for(var b=Vt(Re(u,function(P){return Vt(P,function(A){return A.value>=n[0]&&A.value<=n[1]&&!A.notAdd})}),function(P){return P.length>0}),x=[],w=b.length-1,h=0;h0;)a*=10;var s=[kt(SQ(n[0]/a)*a),kt(xQ(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(r){eu.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},t.prototype.parse=function(r){return r},t.prototype.contain=function(r){return r=vn(r)/vn(this.base),Eh(r,this._extent)},t.prototype.normalize=function(r){return r=vn(r)/vn(this.base),Ph(r,this._extent)},t.prototype.scale=function(r){return r=Lh(r,this._extent),af(this.base,r)},t.type="log",t}(Ei),mL=V0.prototype;mL.getMinorTicks=eu.getMinorTicks;mL.getLabel=eu.getLabel;function of(e,t){return wQ(e,hi(t))}Ei.registerClass(V0);const CQ=V0;var TQ=function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var d=this._determinedMin,h=this._determinedMax;return d!=null&&(s=d,u=!0),h!=null&&(l=h,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},e.prototype.modifyDataMinMax=function(t,r){this[AQ[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=MQ[t];this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e}(),MQ={min:"_determinedMin",max:"_determinedMax"},AQ={min:"_dataMin",max:"_dataMax"};function EQ(e,t,r){var n=e.rawExtentInfo;return n||(n=new TQ(e,t,r),e.rawExtentInfo=n,n)}function sf(e,t){return t==null?null:cd(t)?NaN:e.parse(t)}function yL(e,t){var r=e.type,n=EQ(e,t,e.getExtent()).calculate();e.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&r==="time"){var s=dL("bar",o),l=!1;if(O(s,function(f){l=l||f.getBaseAxis()===t.axis}),l){var u=hL(s),c=PQ(i,a,t,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function PQ(e,t,r,n){var i=r.axis.getExtent(),a=i[1]-i[0],o=lQ(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;O(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;O(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,f=1-(s+l)/a,d=c/f-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}function vS(e,t){var r=t,n=yL(e,r),i=n.extent,a=r.get("splitNumber");e instanceof CQ&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),l=o==="interval"||o==="time";e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function LQ(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new uL({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new bQ({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Ei.getClass(t)||sc)}}function DQ(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function lc(e){var t=e.getLabelModel().get("formatter"),r=e.type==="category"?e.scale.getExtent()[0]:null;return e.scale.type==="time"?function(n){return function(i,a){return e.scale.getFormattedLabel(i,a,n)}}(t):Te(t)?function(n){return function(i){var a=e.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(t):Ve(t)?function(n){return function(i,a){return r!=null&&(a=i.value-r),n(G0(e,i),a,i.level!=null?{level:i.level}:null)}}(t):function(n){return e.scale.getLabel(n)}}function G0(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function IQ(e){var t=e.model,r=e.scale;if(!(!t.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof uL?i=r.count():(n=r.getTicks(),i=n.length);var o=e.getLabelModel(),s=lc(e),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c=0||(pS.push(e),Ve(e)&&(e={install:e}),e.install(NQ))}var Nu=Et();function FQ(e){return e.type==="category"?$Q(e):zQ(e)}function BQ(e,t){return e.type==="category"?HQ(e,t):{ticks:Re(e.scale.getTicks(),function(r){return r.value})}}function $Q(e){var t=e.getLabelModel(),r=bL(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function bL(e,t){var r=wL(e,"labels"),n=U0(t),i=xL(r,n);if(i)return i;var a,o;return Ve(n)?a=TL(e,n):(o=n==="auto"?WQ(e):n,a=CL(e,o)),SL(r,n,{labels:a,labelCategoryInterval:o})}function HQ(e,t){var r=wL(e,"ticks"),n=U0(t),i=xL(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),Ve(n))a=TL(e,n,!0);else if(n==="auto"){var s=bL(e,e.getLabelModel());o=s.labelCategoryInterval,a=Re(s.labels,function(l){return l.tickValue})}else o=n,a=CL(e,o,!0);return SL(r,n,{ticks:a,tickCategoryInterval:o})}function zQ(e){var t=e.scale.getTicks(),r=lc(e);return{labels:Re(t,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tickValue:n.value}})}}function wL(e,t){return Nu(e)[t]||(Nu(e)[t]=[])}function xL(e,t){for(var r=0;r40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(n)),f=Math.abs(u*Math.sin(n)),d=0,h=0;l<=a[1];l+=s){var v=0,p=0,g=Zy(r({value:l}),t.font,"center","top");v=g.width*1.3,p=g.height*1.3,d=Math.max(d,v,7),h=Math.max(h,p,7)}var m=d/c,y=h/f;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),b=Nu(e.model),x=e.getExtent(),w=b.lastAutoInterval,S=b.lastTickCount;return w!=null&&S!=null&&Math.abs(w-_)<=1&&Math.abs(S-o)<=1&&w>_&&b.axisExtent0===x[0]&&b.axisExtent1===x[1]?_=w:(b.lastTickCount=o,b.lastAutoInterval=_,b.axisExtent0=x[0],b.axisExtent1=x[1]),_}function GQ(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function CL(e,t,r){var n=lc(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=_L(e),d=o.get("showMinLabel")||f,h=o.get("showMaxLabel")||f;d&&u!==a[0]&&p(a[0]);for(var v=u;v<=a[1];v+=l)p(v);h&&v-l!==a[1]&&p(a[1]);function p(g){var m={value:g};s.push(r?g:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:g})}return s}function TL(e,t,r){var n=e.scale,i=lc(e),a=[];return O(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var gS=[0,1],UQ=function(){function e(t,r,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=r,this._extent=n||[0,0]}return e.prototype.contain=function(t){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return t>=n&&t<=i},e.prototype.containData=function(t){return this.scale.contain(t)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return mj(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,r){var n=this._extent;n[0]=t,n[1]=r},e.prototype.dataToCoord=function(t,r){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&i.type==="ordinal"&&(n=n.slice(),mS(n,i.count())),$g(t,gS,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),mS(n,i.count()));var a=$g(t,n,gS,r);return this.scale.scale(a)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=BQ(this,r),i=n.ticks,a=Re(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return jQ(this,a,o,t.clamp),a},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=Re(n,function(a){return Re(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(){return FQ(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(){return VQ(this)},e}();function mS(e,t){var r=e[1]-e[0],n=t,i=r/n/2;e[0]+=i,e[1]-=i}function jQ(e,t,r,n){var i=t.length;if(!e.onBand||r||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],o=t[1]={coord:a[0]};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;O(t,function(h){h.coord-=u/2});var c=e.scale.getExtent();s=1+c[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s},t.push(o)}var f=a[0]>a[1];d(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&d(a[0],t[0].coord)&&t.unshift({coord:a[0]}),d(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&d(o.coord,a[1])&&t.push({coord:a[1]});function d(h,v){return h=kt(h),v=kt(v),f?h>v:hi&&(i+=gl);var h=Math.atan2(s,o);if(h<0&&(h+=gl),h>=n&&h<=i||h+gl>=n&&h+gl<=i)return l[0]=c,l[1]=f,u-r;var v=r*Math.cos(n)+e,p=r*Math.sin(n)+t,g=r*Math.cos(i)+e,m=r*Math.sin(i)+t,y=(v-o)*(v-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(m-s)*(m-s);return y<_?(l[0]=v,l[1]=p,Math.sqrt(y)):(l[0]=g,l[1]=m,Math.sqrt(_))}function Dd(e,t,r,n,i,a,o,s){var l=i-e,u=a-t,c=r-e,f=n-t,d=Math.sqrt(c*c+f*f);c/=d,f/=d;var h=l*c+u*f,v=h/d;s&&(v=Math.min(Math.max(v,0),1)),v*=d;var p=o[0]=e+v*c,g=o[1]=t+v*f;return Math.sqrt((p-i)*(p-i)+(g-a)*(g-a))}function ML(e,t,r,n,i,a,o){r<0&&(e=e+r,r=-r),n<0&&(t=t+n,n=-n);var s=e+r,l=t+n,u=o[0]=Math.min(Math.max(i,e),s),c=o[1]=Math.min(Math.max(a,t),l);return Math.sqrt((u-i)*(u-i)+(c-a)*(c-a))}var _n=[];function ZQ(e,t,r){var n=ML(t.x,t.y,t.width,t.height,e.x,e.y,_n);return r.set(_n[0],_n[1]),n}function QQ(e,t,r){for(var n=0,i=0,a=0,o=0,s,l,u=1/0,c=t.data,f=e.x,d=e.y,h=0;h0){t=t/180*Math.PI,Tn.fromArray(e[0]),ut.fromArray(e[1]),Pt.fromArray(e[2]),ke.sub(Un,Tn,ut),ke.sub(zn,Pt,ut);var r=Un.len(),n=zn.len();if(!(r<.001||n<.001)){Un.scale(1/r),zn.scale(1/n);var i=Un.dot(zn),a=Math.cos(t);if(a1&&ke.copy(sr,Pt),sr.toArray(e[1])}}}}function JQ(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,Tn.fromArray(e[0]),ut.fromArray(e[1]),Pt.fromArray(e[2]),ke.sub(Un,ut,Tn),ke.sub(zn,Pt,ut);var n=Un.len(),i=zn.len();if(!(n<.001||i<.001)){Un.scale(1/n),zn.scale(1/i);var a=Un.dot(t),o=Math.cos(r);if(a=l)ke.copy(sr,Pt);else{sr.scaleAndAdd(zn,s/Math.tan(Math.PI/2-c));var f=Pt.x!==ut.x?(sr.x-ut.x)/(Pt.x-ut.x):(sr.y-ut.y)/(Pt.y-ut.y);if(isNaN(f))return;f<0?ke.copy(sr,ut):f>1&&ke.copy(sr,Pt)}sr.toArray(e[1])}}}}function _S(e,t,r,n){var i=r==="normal",a=i?e:e.ensureState(r);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?e.useStyle(s):a.style=s}function eJ(e,t){var r=t.smooth,n=t.points;if(n)if(e.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=Cg(n[0],n[1]),a=Cg(n[1],n[2]);if(!i||!a){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=nv([],n[1],n[0],o/i),l=nv([],n[1],n[2],o/a),u=nv([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c0&&a&&x(-c/o,0,o);var p=e[0],g=e[o-1],m,y;_(),m<0&&w(-m,.8),y<0&&w(y,.8),_(),b(m,y,1),b(y,m,-1),_(),m<0&&S(-m),y<0&&S(y);function _(){m=p.rect[t]-n,y=i-g.rect[t]-g.rect[r]}function b(C,M,P){if(C<0){var A=Math.min(M,-C);if(A>0){x(A*P,0,o);var T=A+C;T<0&&w(-T*P,1)}else w(-C*P,1)}}function x(C,M,P){C!==0&&(u=!0);for(var A=M;A0)for(var T=0;T0;T--){var $=P[T-1]*H;x(-$,T,o)}}}function S(C){var M=C<0?-1:1;C=Math.abs(C);for(var P=Math.ceil(C/(o-1)),A=0;A0?x(P,0,A+1):x(-P,o-A-1,o),C-=P,C<=0)return}return u}function tJ(e,t,r,n){return DL(e,"x","width",t,r,n)}function IL(e,t,r,n){return DL(e,"y","height",t,r,n)}function OL(e){var t=[];e.sort(function(p,g){return g.priority-p.priority});var r=new et(0,0,0,0);function n(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var i=0;i=0&&n.attr(a.oldLayoutSelect),ot(d,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Pr(n,u,r,l)}else if(n.attr(u),!oc(n).valueAnimation){var f=qe(n.style.opacity,1);n.style.opacity=0,Hr(n,{style:{opacity:f}},r,l)}if(a.oldLayout=u,n.states.select){var h=a.oldLayoutSelect={};lf(h,u,uf),lf(h,n.states.select,uf)}if(n.states.emphasis){var v=a.oldLayoutEmphasis={};lf(v,u,uf),lf(v,n.states.emphasis,uf)}lq(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=iJ(i),o=a.oldLayout,p={points:i.shape.points};o?(i.attr({shape:o}),Pr(i,{shape:p},r)):(i.setShape(p),i.style.strokePercent=0,Hr(i,{style:{strokePercent:1}},r)),a.oldLayout=p}},e}();const oJ=aJ;var fp=Et();function sJ(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){var i=fp(r).labelManager;i||(i=fp(r).labelManager=new oJ),i.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(t,r,n){var i=fp(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}function lJ(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=Is(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(t[a])}return n.join(" ")}function cJ(e,t,r,n,i){var a=e.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=r.get(["lineStyle","width"])||2;o-=c/2,s-=c/2,l+=c,u+=c,o=Math.floor(o),l=Math.round(l);var f=new Ht({shape:{x:o,y:s,width:l,height:u}});if(t){var d=e.getBaseAxis(),h=d.isHorizontal(),v=d.inverse;h?(v&&(f.shape.x+=l),f.shape.width=0):(v||(f.shape.y+=u),f.shape.height=0);var p=Ve(i)?function(g){i(g,f)}:null;Hr(f,{shape:{width:l,height:u,x:o,y:s}},r,null,n,p)}return f}function fJ(e,t,r){var n=e.getArea(),i=kt(n.r0,1),a=kt(n.r,1),o=new Ao({shape:{cx:kt(e.cx,1),cy:kt(e.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=e.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,Hr(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function dJ(e,t,r,n,i){if(e){if(e.type==="polar")return fJ(e,t,r);if(e.type==="cartesian2d")return cJ(e,t,r,n,i)}else return null;return null}function RL(e,t){return e.type===t}var hJ={average:function(e){for(var t=0,r=0,n=0;nt&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),d=Math.abs(c[1]-c[0])*(f||1),h=Math.round(s/d);if(isFinite(h)&&h>1){a==="lttb"&&t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/h));var v=void 0;Te(a)?v=hJ[a]:Ve(a)&&(v=a),v&&t.setData(i.downSample(i.mapDimension(u.dim),1/h,v,vJ))}}}}}var kL=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return aL(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.dataToPoint(a.clampData(r));if(i)O(a.getAxes(),function(f,d){if(f.type==="category"){var h=f.getTicksCoords(),v=a.clampData(r)[d];n&&(n[d]==="x1"||n[d]==="y1")&&(v+=1),v>h.length-1&&(v=h.length-1),v<0&&(v=0),h[v]&&(o[d]=f.toGlobalCoord(h[v].coord))}});else{var s=this.getData(),l=s.getLayout("offset"),u=s.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;o[c]+=l+u/2}return o}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(wo);wo.registerClass(kL);const wS=kL;var gJ=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return aL(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=IE(wS.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(wS);const mJ=gJ;var yJ=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),_J=function(e){pe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new yJ},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,d=n.clockwise,h=Math.PI*2,v=d?f-cMath.PI/2&&cs)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){wd(a,r,ft(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(co),SS={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=dp(t.x,e.x),s=hp(t.x+t.width,i),l=dp(t.y,e.y),u=hp(t.y+t.height,a),c=si?s:o,t.y=f&&l>a?u:l,t.width=c?0:s-o,t.height=f?0:u-l,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),c||f},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var i=hp(t.r,e.r),a=dp(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},CS={cartesian2d:function(e,t,r,n,i,a,o,s,l){var u=new Ht({shape:se({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(e,t,r,n,i,a,o,s,l){var u=!i&&l?xS:Ao,c=new u({shape:n,z2:1});c.name="item";var f=NL(i);if(c.calculateTextPosition=bJ(f,{isRoundCap:u===xS}),a){var d=c.shape,h=i?"r":"endAngle",v={};d[h]=i?0:n.startAngle,v[h]=n[h],(s?Pr:Hr)(c,{shape:v},a)}return c}};function CJ(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function TS(e,t,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Pr:Hr)(r,{shape:l},t,i,null);var c=t?e.baseAxis.model:null;(o?Pr:Hr)(r,{shape:u},c,i)}function MS(e,t){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(e,t,r){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function AJ(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function NL(e){return function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(e)}function ES(e,t,r,n,i,a,o,s){var l=t.getItemVisual(r,"style");s||e.setShape("r",n.get(["itemStyle","borderRadius"])||0),e.useStyle(l);var u=n.getShallow("cursor");u&&e.attr("cursor",u);var c=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",f=PE(n);m0(e,f,{labelFetcher:a,labelDataIndex:r,defaultText:lJ(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var d=e.getTextContent();if(s&&d){var h=n.get(["label","position"]);e.textConfig.inside=h==="middle"?!0:null,wJ(e,h==="outside"?c:h,NL(o),n.get(["label","rotate"]))}sq(d,f,a.getRawValue(r),function(p){return uJ(t,p)});var v=n.getModel(["emphasis"]);J2(e,v.get("focus"),v.get("blurScope"),v.get("disabled")),eE(e,n),AJ(i)&&(e.style.fill="none",e.style.stroke="none",O(e.states,function(p){p.style&&(p.style.fill=p.style.stroke="none")}))}function EJ(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var PJ=function(){function e(){}return e}(),PS=function(e){pe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new PJ},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?r:null},30,!1);function LJ(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,f=a.length/3;c=s[0]&&t<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function FL(e,t,r){if(RL(r,"cartesian2d")){var n=t,i=r.getArea();return{x:e?n.x:i.x,y:e?i.y:n.y,width:e?n.width:i.width,height:e?i.height:n.height}}else{var i=r.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function DJ(e,t,r){var n=e.type==="polar"?Ao:Ht;return new n({shape:FL(t,r,e),silent:!0,z2:0})}const IJ=SJ;function OJ(e){e.registerChartView(IJ),e.registerSeriesModel(mJ),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Rt(uQ,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,cQ("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,pJ("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var hf=Math.PI*2,IS=Math.PI/180;function BL(e,t){return Ls(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function $L(e,t){var r=BL(e,t),n=e.get("center"),i=e.get("radius");ge(i)||(i=[0,i]);var a=gt(r.width,t.getWidth()),o=gt(r.height,t.getHeight()),s=Math.min(a,o),l=gt(i[0],s/2),u=gt(i[1],s/2),c,f,d=e.coordinateSystem;if(d){var h=d.dataToPoint(n);c=h[0]||0,f=h[1]||0}else ge(n)||(n=[n,n]),c=gt(n[0],a)+r.x,f=gt(n[1],o)+r.y;return{cx:c,cy:f,r0:l,r:u}}function RJ(e,t,r){t.eachSeriesByType(e,function(n){var i=n.getData(),a=i.mapDimension("value"),o=BL(n,r),s=$L(n,r),l=s.cx,u=s.cy,c=s.r,f=s.r0,d=-n.get("startAngle")*IS,h=n.get("minAngle")*IS,v=0;i.each(a,function(P){!isNaN(P)&&v++});var p=i.getSum(a),g=Math.PI/(p||v)*2,m=n.get("clockwise"),y=n.get("roseType"),_=n.get("stillShowZeroSum"),b=i.getDataExtent(a);b[0]=0;var x=hf,w=0,S=d,C=m?1:-1;if(i.setLayout({viewRect:o,r:c}),i.each(a,function(P,A){var T;if(isNaN(P)){i.setItemLayout(A,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:m,cx:l,cy:u,r0:f,r:y?NaN:c});return}y!=="area"?T=p===0&&_?g:P*g:T=hf/v,Tr?m:g,x=Math.abs(_.label.y-r);if(x>=b.maxY){var w=_.label.x-t-_.len2*i,S=n+_.len,C=Math.abs(w)e.unconstrainedWidth?null:h:null;n.setStyle("width",v)}var p=n.getBoundingRect();a.width=p.width;var g=(n.style.margin||0)+2.1;a.height=p.height+g,a.y-=(a.height-f)/2}}}function vp(e){return e.position==="center"}function BJ(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*NJ,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,f=s.y,d=s.height;function h(w){w.ignore=!0}function v(w){if(!w.ignore)return!0;for(var S in w.states)if(w.states[S].ignore===!1)return!0;return!1}t.each(function(w){var S=t.getItemGraphicEl(w),C=S.shape,M=S.getTextContent(),P=S.getTextGuideLine(),A=t.getItemModel(w),T=A.getModel("label"),D=T.get("position")||A.get(["emphasis","label","position"]),N=T.get("distanceToLabelLine"),H=T.get("alignTo"),$=gt(T.get("edgeDistance"),u),G=T.get("bleedMargin"),F=A.getModel("labelLine"),R=F.get("length");R=gt(R,u);var j=F.get("length2");if(j=gt(j,u),Math.abs(C.endAngle-C.startAngle)0?"right":"left":oe>0?"left":"right"}var U=Math.PI,K=0,ne=T.get("rotate");if(bt(ne))K=ne*(U/180);else if(D==="center")K=0;else if(ne==="radial"||ne===!0){var fe=oe<0?-re+U:-re;K=fe}else if(ne==="tangential"&&D!=="outside"&&D!=="outer"){var te=Math.atan2(oe,ye);te<0&&(te=U*2+te);var ie=ye>0;ie&&(te=U+te),K=te-U}if(a=!!K,M.x=Ae,M.y=V,M.rotation=K,M.setStyle({verticalAlign:"middle"}),q){M.setStyle({align:W});var he=M.states.select;he&&(he.x+=M.x,he.y+=M.y)}else{var X=M.getBoundingRect().clone();X.applyTransform(M.getComputedTransform());var we=(M.style.margin||0)+2.1;X.y-=we/2,X.height+=we,r.push({label:M,labelLine:P,position:D,len:R,len2:j,minTurnAngle:F.get("minTurnAngle"),maxSurfaceAngle:F.get("maxSurfaceAngle"),surfaceNormal:new ke(oe,ye),linePoints:Q,textAlign:W,labelDistance:N,labelAlignTo:H,edgeDistance:$,bleedMargin:G,rect:X,unconstrainedWidth:X.width,labelStyleWidth:M.style.width})}S.setTextConfig({inside:q})}}),!a&&e.get("avoidLabelOverlap")&&FJ(r,n,i,l,u,d,c,f);for(var p=0;p0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=a.r0}},t.type="pie",t}(co);const zJ=HJ;function WJ(e,t,r){t=ge(t)&&{coordDimensions:t}||se({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=nL(n,t).dimensions,a=new rL(i,e);return a.initData(n,r),a}var VJ=function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e}();const GJ=VJ;var UJ=Et(),jJ=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new GJ(_t(this.getData,this),_t(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return WJ(this,{coordDimensions:["value"],encodeDefaulter:Rt(Nq,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=UJ(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=yj(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(r){Hg(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(wo);const YJ=jJ;function qJ(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(bt(o)&&!isNaN(o)&&o<0)})}}}function KJ(e){e.registerChartView(zJ),e.registerSeriesModel(YJ),SX("pie",e.registerAction),e.registerLayout(Rt(RJ,"pie")),e.registerProcessor(kJ("pie")),e.registerProcessor(qJ("pie"))}var XJ=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(xt);const ZJ=XJ;var ym=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Cn).models[0]},t.type="cartesian2dAxis",t}(xt);Jn(ym,kQ);var zL={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},QJ=st({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},zL),j0=st({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},zL),JJ=st({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},j0),eee=dt({logBase:10},j0);const tee={category:QJ,value:j0,time:JJ,log:eee};var ree={value:1,category:1,time:1,log:1};function RS(e,t,r,n){O(ree,function(i,a){var o=st(st({},tee[a],!0),n,!0),s=function(l){pe(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var d=Du(this),h=d?Sh(c):{},v=f.getTheme();st(c,v.get(a+"Axis")),st(c,this.getDefaultOption()),c.type=kS(c),d&&Ds(c,h,d)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=gm.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.type=t+"Axis."+a,u.defaultOption=o,u}(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",kS)}function kS(e){return e.type||(e.data?"category":"value")}var nee=function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return Re(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Vt(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e}();const iee=nee;var _m=["x","y"];function NS(e){return e.type==="interval"||e.type==="time"}var aee=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=_m,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!NS(r)||!NS(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,d=o[0]-i[0]*c,h=o[1]-a[0]*f,v=this._transform=[c,0,0,f,d,h];this._invTransform=lh([],v)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new et(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return on(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n){var i=[];if(this._invTransform)return on(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(){var r=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(r[0],r[1]),a=Math.min(n[0],n[1]),o=Math.max(r[0],r[1])-i,s=Math.max(n[0],n[1])-a;return new et(i,a,o,s)},t}(iee),oee=function(e){pe(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t}(YQ);const see=oee;function bm(e,t,r){r=r||{};var n=e.coordinateSystem,i=t.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,c=n.getRect(),f=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,v=u==="x"?[f[2]-h,f[3]+h]:[f[0]-h,f[1]+h];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));v[d.onZero]=Math.max(Math.min(p,v[1]),v[0])}a.position=[u==="y"?v[d[l]]:f[0],u==="x"?v[d[l]]:f[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[s],a.labelOffset=o?v[d[s]]-v[d.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),xu(r.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-m:m,a.z2=1,a}function FS(e){return e.get("coordinateSystem")==="cartesian2d"}function BS(e){var t={xAxisModel:null,yAxisModel:null};return O(t,function(r,n){var i=n.replace(/Model$/,""),a=e.getReferringComponents(i,Cn).models[0];t[n]=a}),t}var pp=Math.log;function lee(e,t,r){var n=sc.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,!0),o=i.length-1,s=n.getInterval.call(r),l=yL(e,t),u=l.extent,c=l.fixMin,f=l.fixMax;if(e.type==="log"){var d=pp(e.base);u=[pp(u[0])/d,pp(u[1])/d]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var h=n.getExtent.call(e);c&&(u[0]=h[0]),f&&(u[1]=h[1]);var v=n.getInterval.call(e),p=u[0],g=u[1];if(c&&f)v=(g-p)/o;else if(c)for(g=u[0]+v*o;gu[0]&&isFinite(p)&&isFinite(u[0]);)v=lp(v),p=u[1]-v*o;else{var m=e.getTicks().length-1;m>o&&(v=lp(v));var y=v*o;g=Math.ceil(u[1]/v)*v,p=kt(g-y),p<0&&u[0]>=0?(p=0,g=kt(y)):g>0&&u[1]<=0&&(g=0,p=-kt(y))}var _=(i[0].value-a[0].value)/s,b=(i[o].value-a[o].value)/s;n.setExtent.call(e,p+v*_,g+v*b),n.setInterval.call(e,v),(_||b)&&n.setNiceExtent.call(e,p+v,g-v)}var uee=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=_m,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=Tt(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var d=+l[f],h=o[d],v=h.model,p=h.scale;mm(p)&&v.get("alignTicks")&&v.get("interval")==null?c.push(h):(vS(p,v),mm(p)&&(s=h))}c.length&&(s||(s=c.pop(),vS(s.scale,s.model)),O(c,function(g){lee(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};O(n.x,function(o){$S(n,"y",o,a)}),O(n.y,function(o){$S(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=t.getBoxLayoutParams(),a=!n&&t.get("containLabel"),o=Ls(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(O(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=IQ(u);if(c){var f=u.isHorizontal()?"height":"width",d=u.model.get(["axisLabel","margin"]);o[f]-=c[f]+d,u.position==="top"?o.y+=c.height+d:u.position==="left"&&(o.x+=c.width+d)}}}),l()),O(this._coordsList,function(u){u.calcAffineTransform()});function l(){O(s,function(u){var c=u.isHorizontal(),f=c?[0,o.width]:[0,o.height],d=u.inverse?1:0;u.setExtent(f[d],f[1-d]),cee(u,c?o.x:o.y)})}},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}Ie(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i0?"top":"bottom",a="center"):md(i-Ki)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e}(),zS={axisLine:function(e,t,r,n){var i=t.get(["axisLine","show"]);if(i==="auto"&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),!!i){var a=t.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(on(s,s,o),on(l,l,o));var c=se({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new bo({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});Au(f.shape,f.style.lineWidth),f.anid="line",r.add(f);var d=t.get(["axisLine","symbol"]);if(d!=null){var h=t.get(["axisLine","symbolSize"]);Te(d)&&(d=[d,d]),(Te(h)||bt(h))&&(h=[h,h]);var v=FX(t.get(["axisLine","symbolOffset"])||0,h),p=h[0],g=h[1];O([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,y){if(d[y]!=="none"&&d[y]!=null){var _=R0(d[y],-p/2,-g/2,p,g,c.stroke,!0),b=m.r+m.offset,x=u?l:s;_.attr({rotation:m.rotate,x:x[0]+b*Math.cos(e.rotation),y:x[1]-b*Math.sin(e.rotation),silent:!0,z2:11}),r.add(_)}})}}},axisTickLabel:function(e,t,r,n){var i=vee(r,n,t,e),a=gee(r,n,t,e);if(hee(t,a,i),pee(r,n,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=LL(Re(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));OL(o)}},axisName:function(e,t,r,n){var i=xu(e.axisName,t.get("name"));if(i){var a=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),c=u[0]>u[1]?-1:1,f=[a==="start"?u[0]-c*l:a==="end"?u[1]+c*l:(u[0]+u[1])/2,VS(a)?e.labelOffset+o*l:0],d,h=t.get("nameRotate");h!=null&&(h=h*Ki/180);var v;VS(a)?d=fo.innerTextLayout(e.rotation,h??e.rotation,o):(d=dee(e.rotation,a,h||0,u),v=e.axisNameAvailableWidth,v!=null&&(v=Math.abs(v/Math.sin(d.rotation)),!isFinite(v)&&(v=null)));var p=s.getFont(),g=t.get("nameTruncate",!0)||{},m=g.ellipsis,y=xu(e.nameTruncateMaxWidth,g.maxWidth,v),_=new dr({x:f[0],y:f[1],rotation:d.rotation,silent:fo.isLabelSilent(t),style:la(s,{text:i,font:p,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||d.textAlign,verticalAlign:s.get("verticalAlign")||d.textVerticalAlign}),z2:1});if(p0({el:_,componentModel:t,itemName:i}),_.__fullText=i,_.anid="name",t.get("triggerEvent")){var b=fo.makeAxisEventDataBase(t);b.targetType="axisName",b.name=i,ft(_).eventData=b}n.add(_),_.updateTransform(),r.add(_),_.decomposeTransform()}}};function dee(e,t,r,n){var i=x2(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return md(i-Ki/2)?(o=l?"bottom":"top",a="center"):md(i-Ki*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iKi/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function hee(e,t,r){if(!_L(e.axis)){var n=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);t=t||[],r=r||[];var a=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=r[0],c=r[1],f=r[r.length-1],d=r[r.length-2];n===!1?(Gr(a),Gr(u)):WS(a,o)&&(n?(Gr(o),Gr(c)):(Gr(a),Gr(u))),i===!1?(Gr(s),Gr(f)):WS(l,s)&&(i?(Gr(l),Gr(d)):(Gr(s),Gr(f)))}}function Gr(e){e&&(e.ignore=!0)}function WS(e,t){var r=e&&e.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!r||!n)){var i=Yy([]);return qy(i,i,-e.rotation),r.applyTransform(us([],i,e.getLocalTransform())),n.applyTransform(us([],i,t.getLocalTransform())),r.intersect(n)}}function VS(e){return e==="middle"||e==="center"}function WL(e,t,r,n,i){for(var a=[],o=[],s=[],l=0;l=0||e===t}function xee(e){var t=Y0(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=wm(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o=s)}}for(var f=this.__startIndex;f15)break}}N.prevElClipPaths&&m.restore()};if(y)if(y.length===0)C=g.__endIndex;else for(var P=h.dpr,A=0;A0&&t>i[0]){for(l=0;lt);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.__painter=this}},e.prototype.eachLayer=function(t,r){for(var n=this._zlevelList,i=0;i0?pf:0),this._needsManuallyCompositing),c.__builtin__||Gy("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&Rr&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(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)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,O(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?st(n[t],r,!0):n[t]=r;for(var i=0;is)return!0;if(o){var l=Y0(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,i,a){},e.prototype.createPointerEl=function(t,r,n,i){var a=r.pointer;if(a){var o=Ka(t).pointerEl=new nq[a.type](qS(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=Ka(t).labelEl=new dr(qS(r.label));t.add(a),XS(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=Ka(t).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,i){var a=Ka(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),XS(a,i))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=v0(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){ZA(u.event)},onmousedown:_p(this._onHandleDragMove,this,0,0),drift:_p(this._onHandleDragMove,this),ondragend:_p(this._onHandleDragEnd,this)}),n.add(i)),ZS(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ge(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,bP(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){KS(this._axisPointerModel,!r&&this._moveAnimation,this._handle,bp(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(bp(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(bp(i)),Ka(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var r=t.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),sm(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,r,n){return n=n||0,{x:t[n],y:t[1-n],width:r[n],height:r[1-n]}},e}();function KS(e,t,r,n){YL(Ka(r).lastProp,n)||(Ka(r).lastProp=n,t?Pr(r,n,e):(r.stopAnimation(),r.attr(n)))}function YL(e,t){if(Ie(e)&&Ie(t)){var r=!0;return O(t,function(n,i){r=r&&YL(e[i],n)}),!!r}else return e===t}function XS(e,t){e[t.get(["label","show"])?"show":"hide"]()}function bp(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function ZS(e,t,r){var n=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}const zee=Hee;function Wee(e){var t=e.get("type"),r=e.getModel(t+"Style"),n;return t==="line"?(n=r.getLineStyle(),n.fill=null):t==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function Vee(e,t,r,n,i){var a=r.get("value"),o=qL(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=xh(s.get("padding")||0),u=s.getFont(),c=Zy(o,u),f=i.position,d=c.width+l[1]+l[3],h=c.height+l[0]+l[2],v=i.align;v==="right"&&(f[0]-=d),v==="center"&&(f[0]-=d/2);var p=i.verticalAlign;p==="bottom"&&(f[1]-=h),p==="middle"&&(f[1]-=h/2),Gee(f,d,h,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),e.label={x:f[0],y:f[1],style:la(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function Gee(e,t,r,n){var i=n.getWidth(),a=n.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+r,a)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function qL(e,t,r,n,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:G0(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};O(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),Te(o)?a=o.replace("{value}",a):Ve(o)&&(a=o(s))}return a}function KL(e,t,r){var n=Su();return qy(n,n,r.rotation),Eg(n,n,r.position),h0([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function Uee(e,t,r,n,i,a){var o=VL.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),Vee(t,n,i,a,{position:KL(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function jee(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function Yee(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}var qee=function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=QS(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var d=Wee(a),h=Kee[u](s,f,c);h.style=d,r.graphicKey=h.type,r.pointer=h}var v=bm(l.model,i);Uee(n,r,v,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=bm(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=KL(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=QS(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[r.x,r.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,h=[d,d];h[c]=f[c];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:r.rotation,cursorPoint:h,tooltipOption:v[c]}},t}(zee);function QS(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var Kee={line:function(e,t,r){var n=jee([t,r[0]],[t,r[1]],JS(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=Math.max(1,e.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:Yee([t-n/2,r[0]],[n,i],JS(e))}}};function JS(e){return e.dim==="x"?0:1}const Xee=qee;var Zee=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(xt);const Qee=Zee;var vi=Et(),Jee=O;function XL(e,t,r){if(!Ge.node){var n=t.getZr();vi(n).records||(vi(n).records={}),ete(n,t);var i=vi(n).records[e]||(vi(n).records[e]={});i.handler=r}}function ete(e,t){if(vi(e).initialized)return;vi(e).initialized=!0,r("click",Rt(eC,"click")),r("mousemove",Rt(eC,"mousemove")),r("globalout",rte);function r(n,i){e.on(n,function(a){var o=nte(t);Jee(vi(e).records,function(s){s&&i(s,a,o.dispatchAction)}),tte(o.pendings,t)})}}function tte(e,t){var r=e.showTip.length,n=e.hideTip.length,i;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function rte(e,t,r){e.handler("leave",null,r)}function eC(e,t,r,n){t.handler(e,r,n)}function nte(e){var t={showTip:[],hideTip:[]},r=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function Sm(e,t){if(!Ge.node){var r=t.getZr(),n=(vi(r).records||{})[e];n&&(vi(r).records[e]=null)}}var ite=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";XL("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(r,n){Sm("axisPointer",n)},t.prototype.dispose=function(r,n){Sm("axisPointer",n)},t.type="axisPointer",t}(xi);const ate=ite;function ZL(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=nc(a,e);if(o==null||o<0||ge(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,d=u.dim,h=f==="x"||f==="radius"?1:0,v=a.mapDimension(d),p=[];p[h]=a.get(v,o),p[1-h]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(p)||[]}else r=l.dataToPoint(a.getValues(Re(l.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var tC=Et();function ote(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||_t(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Uf(i)&&(i=ZL({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=Uf(i),u=a.axesInfo,c=s.axesInfo,f=n==="leave"||Uf(i),d={},h={},v={list:[],map:{}},p={showPointer:Rt(lte,h),showTooltip:Rt(ute,v)};O(s.coordSysMap,function(m,y){var _=l||m.containPoint(i);O(s.coordSysAxesInfo[y],function(b,x){var w=b.axis,S=hte(u,b);if(!f&&_&&(!u||S)){var C=S&&S.value;C==null&&!l&&(C=w.pointToData(i)),C!=null&&rC(b,C,p,!1,d)}})});var g={};return O(c,function(m,y){var _=m.linkGroup;_&&!h[y]&&O(_.axesInfo,function(b,x){var w=h[x];if(b!==m&&w){var S=w.value;_.mapper&&(S=m.axis.scale.parse(_.mapper(S,nC(b),nC(m)))),g[m.key]=S}})}),O(g,function(m,y){rC(c[y],m,p,!0,d)}),cte(h,c,d),fte(v,i,e,o),dte(c,o,r),d}}function rC(e,t,r,n,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=ste(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&se(i,s[0]),!n&&e.snap&&a.containData(l)&&l!=null&&(t=l),r.showPointer(e,t,s),r.showTooltip(e,o,l)}}function ste(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return O(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,d;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(c,e,r);d=h.dataIndices,f=h.nestestValue}else{if(d=l.getData().indicesOfNearest(c[0],e,r.type==="category"?.5:null),!d.length)return;f=l.getData().get(c[0],d[0])}if(!(f==null||!isFinite(f))){var v=e-f,p=Math.abs(v);p<=o&&((p=0&&s<0)&&(o=p,s=v,i=f,a.length=0),O(d,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:i}}function lte(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function ute(e,t,r,n){var i=r.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=Fu(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function cte(e,t,r){var n=r.axesInfo=[];O(t,function(i,a){var o=i.axisPointerModel.option,s=e[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function fte(e,t,r,n){if(Uf(t)||!e.list.length){n({type:"hideTip"});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function dte(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=tC(n)[i]||{},o=tC(n)[i]={};O(e,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&O(f.seriesDataIndices,function(d){var h=d.seriesIndex+" | "+d.dataIndex;o[h]=d})});var s=[],l=[];O(a,function(u,c){!o[c]&&l.push(u)}),O(o,function(u,c){!a[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function hte(e,t){for(var r=0;r<(e||[]).length;r++){var n=e[r];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function nC(e){var t=e.axis.model,r={},n=r.axisDim=e.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=t.componentIndex,r.axisName=r[n+"AxisName"]=t.name,r.axisId=r[n+"AxisId"]=t.id,r}function Uf(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function QL(e){GL.registerAxisPointerClass("CartesianAxisPointer",Xee),e.registerComponentModel(Qee),e.registerComponentView(ate),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!ge(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=mee(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},ote)}function vte(e){ua(Iee),ua(QL)}function pte(e,t){var r=xh(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),e=new Ht({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1}),e}var gte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(xt);const mte=gte;function JL(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function eD(e){if(Ge.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+i,d=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),h=Math.round(((d-Math.SQRT2*i)/2+Math.SQRT2*i-(d-f)/2)*100)/100;s+=";"+a+":-"+h+"px";var v=t+" solid "+i+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+v,"border-right:"+v,"background-color:"+n+";"];return'
'}function Cte(e,t){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+e/2+"s "+r,i="opacity"+n+",visibility"+n;return t||(n=" "+e+"s "+r,i+=Ge.transformSupported?","+q0+n:",left"+n+",top"+n),bte+":"+i}function iC(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Ge.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Ge.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+q0+":"+o+";":[["top",0],["left",0],[tD,o]]}function Tte(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont()),r&&t.push("line-height:"+Math.round(r*3/2)+"px");var i=e.get("textShadowColor"),a=e.get("textShadowBlur")||0,o=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return i&&a&&t.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),O(["decoration","align"],function(l){var u=e.get(l);u&&t.push("text-"+l+":"+u)}),t.join(";")}function Mte(e,t,r){var n=[],i=e.get("transitionDuration"),a=e.get("backgroundColor"),o=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),c=e.getModel("textStyle"),f=mP(e,"html"),d=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+d),t&&i&&n.push(Cte(i,r)),a&&n.push("background-color:"+a),O(["width","color","radius"],function(h){var v="border-"+h,p=GE(v),g=e.get(p);g!=null&&n.push(v+":"+g+(h==="color"?"":"px"))}),n.push(Tte(c)),f!=null&&n.push("padding:"+xh(f).join("px ")+"px"),n.join(";")+";"}function aC(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&n9(e,o,document.body,n,i)}else{e[0]=n,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var Ate=function(){function e(t,r,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,Ge.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var a=this._zr=r.getZr(),o=this._appendToBody=n&&n.appendToBody;aC(this._styleCoord,a,o,r.getWidth()/2,r.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,c=a.painter.getViewportRoot();jr(c,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){var r=this._container,n=_te(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative");var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=wte+Mte(t,!this._firstShow,this._longHide)+iC(a[0],a[1],!0)+("border-color:"+Lu(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(Te(a)&&n.get("trigger")==="item"&&!JL(n)&&(s=Ste(n,i,a)),Te(t))o.innerHTML=t+s;else if(t){o.innerHTML="",ge(t)||(t=[t]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Ge.node||!i.getDom())){var o=lC(a,i);this._ticket="";var s=a.dataByCoordSys,l=Nte(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=Dte;c.x=a.x,c.y=a.y,c.update(),ft(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var f=ZL(a,n),d=f.point[0],h=f.point[1];d!=null&&h!=null&&this._tryShow({offsetX:d,offsetY:h,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(lC(a,i))},t.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=ml([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){this._lastDataByCoordSys=null;var s,l;Al(i,function(u){if(ft(u).dataIndex!=null)return s=u,!0;if(ft(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(r,s,n):l?this._showComponentItemTooltip(r,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=_t(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=ml([n.tooltipOption],a),l=this._renderMode,u=[],c=Ou("section",{blocks:[],noHeader:!0}),f=[],d=new Xv;O(r,function(y){O(y.dataByAxis,function(_){var b=i.getComponent(_.axisDim+"Axis",_.axisIndex),x=_.value;if(!(!b||x==null)){var w=qL(x,b.axis,i,_.seriesDataIndices,_.valueLabelOpt),S=Ou("section",{header:w,noHeader:!Vn(w),sortBlocks:!0,blocks:[]});c.blocks.push(S),O(_.seriesDataIndices,function(C){var M=i.getSeriesByIndex(C.seriesIndex),P=C.dataIndexInside,A=M.getDataParams(P);if(!(A.dataIndex<0)){A.axisDim=_.axisDim,A.axisIndex=_.axisIndex,A.axisType=_.axisType,A.axisId=_.axisId,A.axisValue=G0(b.axis,{value:x}),A.axisValueLabel=w,A.marker=d.makeTooltipMarker("item",Lu(A.color),l);var T=Sx(M.formatTooltip(P,!0,null)),D=T.frag;if(D){var N=ml([M],a).get("valueFormatter");S.blocks.push(N?se({valueFormatter:N},D):D)}T.text&&f.push(T.text),u.push(A)}})}})}),c.blocks.reverse(),f.reverse();var h=n.position,v=s.get("order"),p=Ex(c,d,l,v,i.get("useUTC"),s.get("textStyle"));p&&f.unshift(p);var g=l==="richText"?` -`:"
",m=f.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],h,null,d)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=ft(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,d=u.getData(f),h=this._renderMode,v=r.positionDefault,p=ml([d.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(c,f),y=new Xv;m.marker=y.makeTooltipMarker("item",Lu(m.color),h);var _=Sx(u.formatTooltip(c,!1,f)),b=p.get("order"),x=p.get("valueFormatter"),w=_.frag,S=w?Ex(x?se({valueFormatter:x},w):w,y,h,b,a.get("useUTC"),p.get("textStyle")):_.text,C="item_"+u.name+"_"+c;this._showOrMove(p,function(){this._showTooltipContent(p,S,m,C,r.offsetX,r.offsetY,r.position,r.target,y)}),i({type:"showTip",dataIndexInside:c,dataIndex:d.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=ft(n),o=a.tooltipConfig,s=o.option||{};if(Me(s)){var l=s;s={content:l,formatter:l}}var u=[s],c=this._ecModel.getComponent(a.componentMainType,a.componentIndex);c&&u.push(c),u.push({formatter:s.content});var f=r.positionDefault,d=ml(u,this._tooltipModel,f?{position:f}:null),h=d.get("content"),v=Math.random()+"",p=new Xv;this._showOrMove(d,function(){var g=Qe(d.get("formatterParams")||{});this._showTooltipContent(d,h,g,v,r.offsetX,r.offsetY,r.position,n,p)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var f=this._tooltipContent;f.setEnterable(r.get("enterable"));var d=r.get("formatter");l=l||r.get("position");var h=n,v=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),p=v.color;if(d)if(Me(d)){var g=r.ecModel.get("useUTC"),m=ge(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;h=d,y&&(h=mh(m.axisValue,h,g)),h=UE(h,i,!0)}else if(Ve(d)){var _=_t(function(b,x){b===this._ticket&&(f.setContent(x,c,r,p,l),this._updatePosition(r,l,o,s,f,i,u))},this);this._ticket=a,h=d(i,a,_)}else h=d;f.setContent(h,c,r,p,l),f.show(r,p),this._updatePosition(r,l,o,s,f,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||ge(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!ge(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var f=o.getSize(),d=r.get("align"),h=r.get("verticalAlign"),v=l&&l.getBoundingRect().clone();if(l&&v.applyTransform(l.transform),Ve(n)&&(n=n([i,a],s,o.el,v,{viewSize:[u,c],contentSize:f.slice()})),ge(n))i=gt(n[0],u),a=gt(n[1],c);else if(Ie(n)){var p=n;p.width=f[0],p.height=f[1];var g=Ls(p,{width:u,height:c});i=g.x,a=g.y,d=null,h=null}else if(Me(n)&&l){var m=kte(n,v,f,r.get("borderWidth"));i=m[0],a=m[1]}else{var m=Ote(i,a,o,u,c,d?null:20,h?null:20);i=m[0],a=m[1]}if(d&&(i-=uC(d)?f[0]/2:d==="right"?f[0]:0),h&&(a-=uC(h)?f[1]/2:h==="bottom"?f[1]:0),JL(r)){var m=Rte(i,a,o,u,c);i=m[0],a=m[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&O(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&O(u,function(d,h){var v=f[h]||{},p=d.seriesDataIndices||[],g=v.seriesDataIndices||[];o=o&&d.value===v.value&&d.axisType===v.axisType&&d.axisId===v.axisId&&p.length===g.length,o&&O(p,function(m,y){var _=g[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),a&&O(d.seriesDataIndices,function(m){var y=m.seriesIndex,_=n[y],b=a[y];_&&b&&b.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){Ge.node||!n.getDom()||(sm(this,"_updatePosition"),this._tooltipContent.dispose(),Sm("itemTooltip",n))},t.type="tooltip",t}(xi);function ml(e,t,r){var n=t.ecModel,i;r?(i=new rr(r,n,n),i=new rr(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof rr&&(o=o.get("tooltip",!0)),Me(o)&&(o={formatter:o}),o&&(i=new rr(o,i,n)))}return i}function lC(e,t){return e.dispatchAction||_t(t.dispatchAction,t)}function Ote(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function Rte(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function kte(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+o;break;case"left":s=t.x-i-o,l=t.y+c/2-a/2;break;case"right":s=t.x+u+o,l=t.y+c/2-a/2}return[s,l]}function uC(e){return e==="center"||e==="middle"}function Nte(e,t,r){var n=r0(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=ic(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=ft(u).tooltipConfig;if(c&&c.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}const Fte=Ite;function Bte(e){ua(QL),e.registerComponentModel(mte),e.registerComponentView(Fte),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Tr),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Tr)}var $te=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(xt),Hte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=qe(r.get("textBaseline"),r.get("textVerticalAlign")),c=new dr({style:la(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),d=r.get("subtext"),h=new dr({style:la(s,{text:d,fill:s.getTextColor(),y:f.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=r.get("link"),p=r.get("sublink"),g=r.get("triggerEvent",!0);c.silent=!v&&!g,h.silent=!p&&!g,v&&c.on("click",function(){ix(v,"_"+r.get("target"))}),p&&h.on("click",function(){ix(p,"_"+r.get("subtarget"))}),ft(c).eventData=ft(h).eventData=g?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),d&&a.add(h);var m=a.getBoundingRect(),y=r.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=Ls(y,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var b={align:l,verticalAlign:u};c.setStyle(b),h.setStyle(b),m=a.getBoundingRect();var x=_.margin,w=r.getItemStyle(["color","opacity"]);w.fill=r.get("backgroundColor");var S=new Ht({shape:{x:m.x-x[3],y:m.y-x[0],width:m.width+x[1]+x[3],height:m.height+x[0]+x[2],r:r.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});a.add(S)}},t.type="title",t}(xi);function zte(e){e.registerComponentModel($te),e.registerComponentView(Hte)}var Wte=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},Vte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},t.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),ge(n)&&O(n,function(a,o){Me(a)&&(a={type:a}),n[o]=st(a,Wte(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(xt);const Cm=Vte;var jo=Rt,Tm=O,gf=cn,Gte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new gf),this.group.add(this._selectorGroup=new gf),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=r.getBoxLayoutParams(),f={width:i.getWidth(),height:i.getHeight()},d=r.get("padding"),h=Ls(c,f,d),v=this.layoutInner(r,o,h,a,l,u),p=Ls(dt({width:v.width,height:v.height},c),f,d);this.group.x=p.x-v.x,this.group.y=p.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=pte(v,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=Ue(),f=n.get("selectedMode"),d=[];i.eachRawSeries(function(h){!h.get("legendHoverLink")&&d.push(h.id)}),Tm(n.getData(),function(h,v){var p=h.get("name");if(!this.newlineDisabled&&(p===""||p===` -`)){var g=new gf;g.newline=!0,u.add(g);return}var m=i.getSeriesByName(p)[0];if(!c.get(p))if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},b=y.getVisual("legendIcon"),x=y.getVisual("style"),w=this._createItem(m,p,v,h,n,r,_,x,b,f,a);w.on("click",jo(cC,p,null,a,d)).on("mouseover",jo(Mm,m.name,null,a,d)).on("mouseout",jo(Am,m.name,null,a,d)),c.set(p,!0)}else i.eachRawSeries(function(S){if(!c.get(p)&&S.legendVisualProvider){var C=S.legendVisualProvider;if(!C.containName(p))return;var M=C.indexOfName(p),P=C.getItemVisual(M,"style"),A=C.getItemVisual(M,"legendIcon"),T=so(P.fill);T&&T[3]===0&&(T[3]=.2,P=se(se({},P),{fill:Ky(T,"rgba")}));var D=this._createItem(S,p,v,h,n,r,{},P,A,f,a);D.on("click",jo(cC,null,p,a,d)).on("mouseover",jo(Mm,null,p,a,d)).on("mouseout",jo(Am,null,p,a,d)),c.set(p,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();Tm(r,function(u){var c=u.type,f=new dr({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(f);var d=n.getModel("selectorLabel"),h=n.getModel(["emphasis","selectorLabel"]);m0(f,{normal:d,emphasis:h},{defaultText:u.title}),Kg(f)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,d){var h=r.visualDrawType,v=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");c=_||c||"roundRect";var b=Ute(c,a,l,u,h,g,d),x=new gf,w=a.getModel("textStyle");if(Ve(r.getLegendIcon)&&(!_||_==="inherit"))x.add(r.getLegendIcon({itemWidth:v,itemHeight:p,icon:c,iconRotate:m,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}));else{var S=_==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;x.add(jte({itemWidth:v,itemHeight:p,icon:c,iconRotate:S,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}))}var C=s==="left"?v+5:-5,M=s,P=o.get("formatter"),A=n;Me(P)&&P?A=P.replace("{name}",n??""):Ve(P)&&(A=P(n));var T=a.get("inactiveColor");x.add(new dr({style:la(w,{text:A,x:C,y:p/2,fill:g?w.getTextColor():T,align:M,verticalAlign:"middle"})}));var D=new Ht({shape:x.getBoundingRect(),invisible:!0}),N=a.getModel("tooltip");return N.get("show")&&p0({el:D,componentModel:o,itemName:n,itemTooltipOption:N.option}),x.add(D),x.eachChild(function(H){H.silent=!0}),D.silent=!f,this.getContentGroup().add(x),Kg(x),x.__legendDataIndex=i,x},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Xl(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Xl("horizontal",u,r.get("selectorItemGap",!0));var d=u.getBoundingRect(),h=[-d.x,-d.y],v=r.get("selectorButtonGap",!0),p=r.getOrient().index,g=p===0?"width":"height",m=p===0?"height":"width",y=p===0?"y":"x";s==="end"?h[p]+=c[g]+v:f[p]+=d[g]+v,h[1-p]+=c[m]/2-d[m]/2,u.x=h[0],u.y=h[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[g]=c[g]+v+d[g],_[m]=Math.max(c[m],d[m]),_[y]=Math.min(0,d[y]+h[1-p]),_}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(xi);function Ute(e,t,r,n,i,a,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),Tm(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=e.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:dm(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var d=t.getModel("lineStyle"),h=d.getLineStyle();if(s(h,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),h.stroke==="auto"&&(h.stroke=n.fill),!a){var v=t.get("inactiveBorderWidth"),p=u[c];u.lineWidth=v==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=d.get("inactiveColor"),h.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function jte(e){var t=e.icon||"roundRect",r=R0(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function cC(e,t,r,n){Am(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),Mm(e,t,r,n)}function nD(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;ni[o],g=[-h.x,-h.y];n||(g[a]=c[u]);var m=[0,0],y=[-v.x,-v.y],_=qe(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(p){var b=r.get("pageButtonPosition",!0);b==="end"?y[a]+=i[o]-v[o]:m[a]+=v[o]+_}y[1-a]+=h[s]/2-v[s]/2,c.setPosition(g),f.setPosition(m),d.setPosition(y);var x={x:0,y:0};if(x[o]=p?i[o]:h[o],x[s]=Math.max(h[s],v[s]),x[l]=Math.min(0,v[l]+y[1-a]),f.__rectSize=i[o],p){var w={x:0,y:0};w[o]=Math.max(i[o]-v[o]-_,0),w[s]=x[s],f.setClipPath(new Ht({shape:w})),f.__rectSize=w[o]}else d.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var S=this._getPageInfo(r);return S.pageIndex!=null&&Pr(c,{x:S.contentPosition[0],y:S.contentPosition[1]},p?r:null),this._updatePageInfoView(r,S),x},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;O(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",d=n[f]!=null,h=i.childOfName(c);h&&(h.setStyle("fill",d?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),h.cursor=d?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",Me(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=wp[o],l=xp[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],d=c.length,h=d?1:0,v={contentPosition:[i.x,i.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return v;var p=b(f);v.contentPosition[o]=-p.s;for(var g=u+1,m=p,y=p,_=null;g<=d;++g)_=b(c[g]),(!_&&y.e>m.s+a||_&&!x(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=m.i),++v.pageCount)),y=_;for(var g=u-1,m=p,y=p,_=null;g>=-1;--g)_=b(c[g]),(!_||!x(y,_.s))&&m.i=S&&w.s<=S+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(iD);const Qte=Zte;function Jte(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function ere(e){ua(aD),e.registerComponentModel(Xte),e.registerComponentView(Qte),Jte(e)}function tre(e){ua(aD),ua(ere)}ua([KJ,OJ,$ee,sJ,zte,Bte,tre,vte]);function rre(e,t,r){const n=B0(document.getElementById(e),"macarons");n.showLoading();const i={title:{text:"Network Traffic",subtext:"today",left:"center"},tooltip:{trigger:"item",formatter:function(a){return aa.fileSize(a.data.value)+" ("+a.percent+"%)"}},legend:{orient:"vertical",left:"left",data:["Traffic In","Traffic Out"]},series:[{type:"pie",radius:"55%",center:["50%","60%"],data:[{value:t,name:"Traffic In"},{value:r,name:"Traffic Out"}],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};n.setOption(i),n.hideLoading()}function nre(e,t){const r=B0(document.getElementById(e),"macarons");r.showLoading();const n={title:{text:"Proxies",subtext:"now",left:"center"},tooltip:{trigger:"item",formatter:function(i){return String(i.data.value)}},legend:{orient:"vertical",left:"left",data:[]},series:[{type:"pie",radius:"55%",center:["50%","60%"],data:[],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};t.proxy_type_count.tcp!=null&&t.proxy_type_count.tcp!=0&&(n.series[0].data.push({value:t.proxy_type_count.tcp,name:"TCP"}),n.legend.data.push("TCP")),t.proxy_type_count.udp!=null&&t.proxy_type_count.udp!=0&&(n.series[0].data.push({value:t.proxy_type_count.udp,name:"UDP"}),n.legend.data.push("UDP")),t.proxy_type_count.http!=null&&t.proxy_type_count.http!=0&&(n.series[0].data.push({value:t.proxy_type_count.http,name:"HTTP"}),n.legend.data.push("HTTP")),t.proxy_type_count.https!=null&&t.proxy_type_count.https!=0&&(n.series[0].data.push({value:t.proxy_type_count.https,name:"HTTPS"}),n.legend.data.push("HTTPS")),t.proxy_type_count.stcp!=null&&t.proxy_type_count.stcp!=0&&(n.series[0].data.push({value:t.proxy_type_count.stcp,name:"STCP"}),n.legend.data.push("STCP")),t.proxy_type_count.sudp!=null&&t.proxy_type_count.sudp!=0&&(n.series[0].data.push({value:t.proxy_type_count.sudp,name:"SUDP"}),n.legend.data.push("SUDP")),t.proxy_type_count.xtcp!=null&&t.proxy_type_count.xtcp!=0&&(n.series[0].data.push({value:t.proxy_type_count.xtcp,name:"XTCP"}),n.legend.data.push("XTCP")),r.setOption(n),r.hideLoading()}function ire(e,t,r){const n={width:"600px",height:"400px"},i=B0(document.getElementById(e),"macarons",n);i.showLoading(),t=t.reverse(),r=r.reverse();let a=new Date;a=new Date(a.getFullYear(),a.getMonth(),a.getDate()-6);const o=[];for(let l=0;l<7;l++)o.push(a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate()),a=new Date(a.getFullYear(),a.getMonth(),a.getDate()+1);const s={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(l){let u="";l.length>0&&(u+=l[0].name+"
");for(const c of l){const f='';u+=f+c.seriesName+": "+aa.fileSize(c.value)+"
"}return u}},legend:{data:["Traffic In","Traffic Out"]},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:o}],yAxis:[{type:"value",axisLabel:{formatter:function(l){return aa.fileSize(l)}}}],series:[{name:"Traffic In",type:"bar",data:t},{name:"Traffic Out",type:"bar",data:r}]};i.setOption(s),i.hideLoading()}const hC=ce({__name:"LongSpan",props:{content:null,length:null},setup(e){return(t,r)=>{const n=Ju;return Y(),me(pt,null,[ee(n,{content:e.content,placement:"top"},{default:Z(()=>[nr(ae("span",null,Te(e.content.slice(0,e.length))+"...",513),[[yi,e.content.length>e.length]])]),_:1},8,["content"]),nr(ae("span",null,Te(e.content),513),[[yi,e.content.length<30]])],64)}}}),are={class:"source"},ore=ae("div",{id:"traffic",style:{width:"400px",height:"250px","margin-bottom":"30px"}},null,-1),sre=ae("div",{id:"proxies",style:{width:"400px",height:"250px"}},null,-1),lre=ce({__name:"ServerOverview",setup(e){let t=B({version:"",bind_port:0,bind_udp_port:0,kcp_bind_port:0,quic_bind_port:0,vhost_http_port:0,vhost_https_port:0,tcpmux_httpconnect_port:0,subdomain_host:"",max_pool_count:0,max_ports_per_client:"",allow_ports_str:"",tls_only:!1,heart_beat_timeout:0,client_counts:0,cur_conns:0,proxy_counts:0});return(()=>{fetch("../api/serverinfo",{credentials:"include"}).then(n=>n.json()).then(n=>{t.value.version=n.version,t.value.bind_port=n.bind_port,t.value.bind_udp_port=n.bind_udp_port,t.value.kcp_bind_port=n.kcp_bind_port,t.value.quic_bind_port=n.quic_bind_port,t.value.vhost_http_port=n.vhost_http_port,t.value.vhost_https_port=n.vhost_https_port,t.value.tcpmux_httpconnect_port=n.tcpmux_httpconnect_port,t.value.subdomain_host=n.subdomain_host,t.value.max_pool_count=n.max_pool_count,t.value.max_ports_per_client=n.max_ports_per_client,t.value.max_ports_per_client=="0"&&(t.value.max_ports_per_client="no limit"),t.value.allow_ports_str=n.allow_ports_str,t.value.tls_only=n.tls_only,t.value.heart_beat_timeout=n.heart_beat_timeout,t.value.client_counts=n.client_counts,t.value.cur_conns=n.cur_conns,t.value.proxy_counts=0,n.proxy_type_count!=null&&(n.proxy_type_count.tcp!=null&&(t.value.proxy_counts+=n.proxy_type_count.tcp),n.proxy_type_count.udp!=null&&(t.value.proxy_counts+=n.proxy_type_count.udp),n.proxy_type_count.http!=null&&(t.value.proxy_counts+=n.proxy_type_count.http),n.proxy_type_count.https!=null&&(t.value.proxy_counts+=n.proxy_type_count.https),n.proxy_type_count.stcp!=null&&(t.value.proxy_counts+=n.proxy_type_count.stcp),n.proxy_type_count.sudp!=null&&(t.value.proxy_counts+=n.proxy_type_count.sudp),n.proxy_type_count.xtcp!=null&&(t.value.proxy_counts+=n.proxy_type_count.xtcp)),rre("traffic",n.total_traffic_in,n.total_traffic_out),nre("proxies",n)}).catch(()=>{DA({showClose:!0,message:"Get server info from frps failed!",type:"warning"})})})(),(n,i)=>{const a=zM,o=HM,s=pA,l=vA;return Y(),me("div",null,[ee(l,null,{default:Z(()=>[ee(s,{md:12},{default:Z(()=>[ae("div",are,[ee(o,{"label-position":"left","label-width":"220px",class:"server_info"},{default:Z(()=>[ee(a,{label:"Version"},{default:Z(()=>[ae("span",null,Te(E(t).version),1)]),_:1}),ee(a,{label:"BindPort"},{default:Z(()=>[ae("span",null,Te(E(t).bind_port),1)]),_:1}),E(t).bind_udp_port!=0?(Y(),_e(a,{key:0,label:"Bind UDP Port"},{default:Z(()=>[ae("span",null,Te(E(t).bind_udp_port),1)]),_:1})):ke("",!0),E(t).kcp_bind_port!=0?(Y(),_e(a,{key:1,label:"KCP Bind Port"},{default:Z(()=>[ae("span",null,Te(E(t).kcp_bind_port),1)]),_:1})):ke("",!0),E(t).quic_bind_port!=0?(Y(),_e(a,{key:2,label:"QUIC Bind Port"},{default:Z(()=>[ae("span",null,Te(E(t).quic_bind_port),1)]),_:1})):ke("",!0),E(t).vhost_http_port!=0?(Y(),_e(a,{key:3,label:"Http Port"},{default:Z(()=>[ae("span",null,Te(E(t).vhost_http_port),1)]),_:1})):ke("",!0),E(t).vhost_https_port!=0?(Y(),_e(a,{key:4,label:"Https Port"},{default:Z(()=>[ae("span",null,Te(E(t).vhost_https_port),1)]),_:1})):ke("",!0),E(t).tcpmux_httpconnect_port!=0?(Y(),_e(a,{key:5,label:"TCPMux HTTPConnect Port"},{default:Z(()=>[ae("span",null,Te(E(t).tcpmux_httpconnect_port),1)]),_:1})):ke("",!0),E(t).subdomain_host!=""?(Y(),_e(a,{key:6,label:"Subdomain Host"},{default:Z(()=>[ee(hC,{content:E(t).subdomain_host,length:30},null,8,["content"])]),_:1})):ke("",!0),ee(a,{label:"Max PoolCount"},{default:Z(()=>[ae("span",null,Te(E(t).max_pool_count),1)]),_:1}),ee(a,{label:"Max Ports Per Client"},{default:Z(()=>[ae("span",null,Te(E(t).max_ports_per_client),1)]),_:1}),E(t).allow_ports_str!=""?(Y(),_e(a,{key:7,label:"Allow Ports"},{default:Z(()=>[ee(hC,{content:E(t).allow_ports_str,length:30},null,8,["content"])]),_:1})):ke("",!0),E(t).tls_only===!0?(Y(),_e(a,{key:8,label:"TLS Only"},{default:Z(()=>[ae("span",null,Te(E(t).tls_only),1)]),_:1})):ke("",!0),ee(a,{label:"HeartBeat Timeout"},{default:Z(()=>[ae("span",null,Te(E(t).heart_beat_timeout),1)]),_:1}),ee(a,{label:"Client Counts"},{default:Z(()=>[ae("span",null,Te(E(t).client_counts),1)]),_:1}),ee(a,{label:"Current Connections"},{default:Z(()=>[ae("span",null,Te(E(t).cur_conns),1)]),_:1}),ee(a,{label:"Proxy Counts"},{default:Z(()=>[ae("span",null,Te(E(t).proxy_counts),1)]),_:1})]),_:1})])]),_:1}),ee(s,{md:12},{default:Z(()=>[ore,sre]),_:1})]),_:1})])}}});class Us{constructor(t){Wt(this,"name");Wt(this,"type");Wt(this,"encryption");Wt(this,"compression");Wt(this,"conns");Wt(this,"traffic_in");Wt(this,"traffic_out");Wt(this,"last_start_time");Wt(this,"last_close_time");Wt(this,"status");Wt(this,"client_version");Wt(this,"addr");Wt(this,"port");Wt(this,"custom_domains");Wt(this,"host_header_rewrite");Wt(this,"locations");Wt(this,"subdomain");this.name=t.name,this.type="",t.conf!=null?(this.encryption=t.conf.use_encryption,this.compression=t.conf.use_compression):(this.encryption=!1,this.compression=!1),this.conns=t.cur_conns,this.traffic_in=t.today_traffic_in,this.traffic_out=t.today_traffic_out,this.last_start_time=t.last_start_time,this.last_close_time=t.last_close_time,this.status=t.status,this.client_version=t.client_version,this.addr="",this.port=0,this.custom_domains="",this.host_header_rewrite="",this.locations="",this.subdomain=""}}class ure extends Us{constructor(t){super(t),this.type="tcp",t.conf!=null?(this.addr=":"+t.conf.remote_port,this.port=t.conf.remote_port):(this.addr="",this.port=0)}}class cre extends Us{constructor(t){super(t),this.type="udp",t.conf!=null?(this.addr=":"+t.conf.remote_port,this.port=t.conf.remote_port):(this.addr="",this.port=0)}}class fre extends Us{constructor(t,r,n){super(t),this.type="http",this.port=r,t.conf!=null?(this.custom_domains=t.conf.custom_domains,this.host_header_rewrite=t.conf.host_header_rewrite,this.locations=t.conf.locations,t.conf.subdomain!=""?this.subdomain=t.conf.subdomain+"."+n:this.subdomain=""):(this.custom_domains="",this.host_header_rewrite="",this.subdomain="",this.locations="")}}class dre extends Us{constructor(t,r,n){super(t),this.type="https",this.port=r,t.conf!=null?(this.custom_domains=t.conf.custom_domains,t.conf.subdomain!=""?this.subdomain=t.conf.subdomain+"."+n:this.subdomain=""):(this.custom_domains="",this.subdomain="")}}class hre extends Us{constructor(t){super(t),this.type="stcp"}}class vre extends Us{constructor(t){super(t),this.type="sudp"}}const pre=["id"],gre=ce({__name:"Traffic",props:{proxy_name:null},setup(e){const t=e;return(()=>{let n="../api/traffic/"+t.proxy_name;fetch(n,{credentials:"include"}).then(i=>i.json()).then(i=>{ire(t.proxy_name,i.traffic_in,i.traffic_out)}).catch(i=>{DA({showClose:!0,message:"Get traffic info failed!"+i,type:"warning"})})})(),(n,i)=>(Y(),me("div",{id:e.proxy_name,style:{width:"600px",height:"400px"}},null,8,pre))}}),mre=ce({__name:"ProxyViewExpand",props:{row:null,proxyType:null},setup(e){return(t,r)=>{const n=zM,i=HM;return e.proxyType==="http"||e.proxyType==="https"?(Y(),_e(i,{key:0,"label-position":"left",inline:"",class:"proxy-table-expand"},{default:Z(()=>[ee(n,{label:"Name"},{default:Z(()=>[ae("span",null,Te(e.row.name),1)]),_:1}),ee(n,{label:"Type"},{default:Z(()=>[ae("span",null,Te(e.row.type),1)]),_:1}),ee(n,{label:"Domains"},{default:Z(()=>[ae("span",null,Te(e.row.custom_domains),1)]),_:1}),ee(n,{label:"SubDomain"},{default:Z(()=>[ae("span",null,Te(e.row.subdomain),1)]),_:1}),ee(n,{label:"locations"},{default:Z(()=>[ae("span",null,Te(e.row.locations),1)]),_:1}),ee(n,{label:"HostRewrite"},{default:Z(()=>[ae("span",null,Te(e.row.host_header_rewrite),1)]),_:1}),ee(n,{label:"Encryption"},{default:Z(()=>[ae("span",null,Te(e.row.encryption),1)]),_:1}),ee(n,{label:"Compression"},{default:Z(()=>[ae("span",null,Te(e.row.compression),1)]),_:1}),ee(n,{label:"Last Start"},{default:Z(()=>[ae("span",null,Te(e.row.last_start_time),1)]),_:1}),ee(n,{label:"Last Close"},{default:Z(()=>[ae("span",null,Te(e.row.last_close_time),1)]),_:1})]),_:1})):(Y(),_e(i,{key:1,"label-position":"left",inline:"",class:"proxy-table-expand"},{default:Z(()=>[ee(n,{label:"Name"},{default:Z(()=>[ae("span",null,Te(e.row.name),1)]),_:1}),ee(n,{label:"Type"},{default:Z(()=>[ae("span",null,Te(e.row.type),1)]),_:1}),ee(n,{label:"Addr"},{default:Z(()=>[ae("span",null,Te(e.row.addr),1)]),_:1}),ee(n,{label:"Encryption"},{default:Z(()=>[ae("span",null,Te(e.row.encryption),1)]),_:1}),ee(n,{label:"Compression"},{default:Z(()=>[ae("span",null,Te(e.row.compression),1)]),_:1}),ee(n,{label:"Last Start"},{default:Z(()=>[ae("span",null,Te(e.row.last_start_time),1)]),_:1}),ee(n,{label:"Last Close"},{default:Z(()=>[ae("span",null,Te(e.row.last_close_time),1)]),_:1})]),_:1}))}}}),js=ce({__name:"ProxyView",props:{proxies:null,proxyType:null},setup(e){const t=(n,i)=>aa.fileSize(n.traffic_in),r=(n,i)=>aa.fileSize(n.traffic_out);return(n,i)=>{const a=gre,o=J6,s=IW,l=ZV,u=O8,c=XV;return Y(),me("div",null,[ee(c,{data:e.proxies,"default-sort":{prop:"name",order:"ascending"},style:{width:"100%"}},{default:Z(()=>[ee(l,{type:"expand"},{default:Z(f=>[ee(s,{placement:"right",width:"600",style:{"margin-left":"0px"},trigger:"click"},{default:Z(()=>[ee(a,{proxy_name:f.row.name},null,8,["proxy_name"])]),reference:Z(()=>[ee(o,{type:"primary",size:"large",name:f.row.name,style:{"margin-bottom":"10px"}},{default:Z(()=>[Bt("Traffic Statistics ")]),_:2},1032,["name"])]),_:2},1024),ee(mre,{row:f.row,proxyType:e.proxyType},null,8,["row","proxyType"])]),_:1}),ee(l,{label:"Name",prop:"name",sortable:""}),ee(l,{label:"Port",prop:"port",sortable:""}),ee(l,{label:"Connections",prop:"conns",sortable:""}),ee(l,{label:"Traffic In",prop:"traffic_in",formatter:t,sortable:""}),ee(l,{label:"Traffic Out",prop:"traffic_out",formatter:r,sortable:""}),ee(l,{label:"ClientVersion",prop:"client_version",sortable:""}),ee(l,{label:"Status",prop:"status",sortable:""},{default:Z(f=>[f.row.status==="online"?(Y(),_e(u,{key:0,type:"success"},{default:Z(()=>[Bt(Te(f.row.status),1)]),_:2},1024)):(Y(),_e(u,{key:1,type:"danger"},{default:Z(()=>[Bt(Te(f.row.status),1)]),_:2},1024))]),_:1})]),_:1},8,["data"])])}}}),yre=ce({__name:"ProxiesTCP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/tcp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new ure(i))})})(),(n,i)=>(Y(),_e(js,{proxies:E(t),proxyType:"tcp"},null,8,["proxies"]))}}),_re=ce({__name:"ProxiesUDP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/udp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new cre(i))})})(),(n,i)=>(Y(),_e(js,{proxies:E(t),proxyType:"udp"},null,8,["proxies"]))}}),bre=ce({__name:"ProxiesHTTP",setup(e){let t=B([]);return(()=>{let n,i;fetch("../api/serverinfo",{credentials:"include"}).then(a=>a.json()).then(a=>{n=a.vhost_http_port,i=a.subdomain_host,!(n==null||n==0)&&fetch("../api/proxy/http",{credentials:"include"}).then(o=>o.json()).then(o=>{for(let s of o.proxies)t.value.push(new fre(s,n,i))})})})(),(n,i)=>(Y(),_e(js,{proxies:E(t),proxyType:"http"},null,8,["proxies"]))}}),wre=ce({__name:"ProxiesHTTPS",setup(e){let t=B([]);return(()=>{let n,i;fetch("../api/serverinfo",{credentials:"include"}).then(a=>a.json()).then(a=>{n=a.vhost_https_port,i=a.subdomain_host,!(n==null||n==0)&&fetch("../api/proxy/https",{credentials:"include"}).then(o=>o.json()).then(o=>{for(let s of o.proxies)t.value.push(new dre(s,n,i))})})})(),(n,i)=>(Y(),_e(js,{proxies:E(t),proxyType:"https"},null,8,["proxies"]))}}),xre=ce({__name:"ProxiesSTCP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/stcp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new hre(i))})})(),(n,i)=>(Y(),_e(js,{proxies:E(t),proxyType:"stcp"},null,8,["proxies"]))}}),Sre=ce({__name:"ProxiesSUDP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/sudp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new vre(i))})})(),(n,i)=>(Y(),_e(js,{proxies:E(t),proxyType:"sudp"},null,8,["proxies"]))}}),Cre=SU({history:$G(),routes:[{path:"/",name:"ServerOverview",component:lre},{path:"/proxies/tcp",name:"ProxiesTCP",component:yre},{path:"/proxies/udp",name:"ProxiesUDP",component:_re},{path:"/proxies/http",name:"ProxiesHTTP",component:bre},{path:"/proxies/https",name:"ProxiesHTTPS",component:wre},{path:"/proxies/stcp",name:"ProxiesSTCP",component:xre},{path:"/proxies/sudp",name:"ProxiesSUDP",component:Sre}]}),oD=YO(bG);oD.use(Cre);oD.mount("#app")});export default Tre(); +`:"
",m=f.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],h,null,d)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=ft(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,d=u.getData(f),h=this._renderMode,v=r.positionDefault,p=ml([d.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(c,f),y=new Xv;m.marker=y.makeTooltipMarker("item",Lu(m.color),h);var _=Sx(u.formatTooltip(c,!1,f)),b=p.get("order"),x=p.get("valueFormatter"),w=_.frag,S=w?Ex(x?se({valueFormatter:x},w):w,y,h,b,a.get("useUTC"),p.get("textStyle")):_.text,C="item_"+u.name+"_"+c;this._showOrMove(p,function(){this._showTooltipContent(p,S,m,C,r.offsetX,r.offsetY,r.position,r.target,y)}),i({type:"showTip",dataIndexInside:c,dataIndex:d.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=ft(n),o=a.tooltipConfig,s=o.option||{};if(Te(s)){var l=s;s={content:l,formatter:l}}var u=[s],c=this._ecModel.getComponent(a.componentMainType,a.componentIndex);c&&u.push(c),u.push({formatter:s.content});var f=r.positionDefault,d=ml(u,this._tooltipModel,f?{position:f}:null),h=d.get("content"),v=Math.random()+"",p=new Xv;this._showOrMove(d,function(){var g=Qe(d.get("formatterParams")||{});this._showTooltipContent(d,h,g,v,r.offsetX,r.offsetY,r.position,n,p)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var f=this._tooltipContent;f.setEnterable(r.get("enterable"));var d=r.get("formatter");l=l||r.get("position");var h=n,v=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),p=v.color;if(d)if(Te(d)){var g=r.ecModel.get("useUTC"),m=ge(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;h=d,y&&(h=mh(m.axisValue,h,g)),h=UE(h,i,!0)}else if(Ve(d)){var _=_t(function(b,x){b===this._ticket&&(f.setContent(x,c,r,p,l),this._updatePosition(r,l,o,s,f,i,u))},this);this._ticket=a,h=d(i,a,_)}else h=d;f.setContent(h,c,r,p,l),f.show(r,p),this._updatePosition(r,l,o,s,f,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||ge(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!ge(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var f=o.getSize(),d=r.get("align"),h=r.get("verticalAlign"),v=l&&l.getBoundingRect().clone();if(l&&v.applyTransform(l.transform),Ve(n)&&(n=n([i,a],s,o.el,v,{viewSize:[u,c],contentSize:f.slice()})),ge(n))i=gt(n[0],u),a=gt(n[1],c);else if(Ie(n)){var p=n;p.width=f[0],p.height=f[1];var g=Ls(p,{width:u,height:c});i=g.x,a=g.y,d=null,h=null}else if(Te(n)&&l){var m=kte(n,v,f,r.get("borderWidth"));i=m[0],a=m[1]}else{var m=Ote(i,a,o,u,c,d?null:20,h?null:20);i=m[0],a=m[1]}if(d&&(i-=uC(d)?f[0]/2:d==="right"?f[0]:0),h&&(a-=uC(h)?f[1]/2:h==="bottom"?f[1]:0),JL(r)){var m=Rte(i,a,o,u,c);i=m[0],a=m[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&O(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&O(u,function(d,h){var v=f[h]||{},p=d.seriesDataIndices||[],g=v.seriesDataIndices||[];o=o&&d.value===v.value&&d.axisType===v.axisType&&d.axisId===v.axisId&&p.length===g.length,o&&O(p,function(m,y){var _=g[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),a&&O(d.seriesDataIndices,function(m){var y=m.seriesIndex,_=n[y],b=a[y];_&&b&&b.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){Ge.node||!n.getDom()||(sm(this,"_updatePosition"),this._tooltipContent.dispose(),Sm("itemTooltip",n))},t.type="tooltip",t}(xi);function ml(e,t,r){var n=t.ecModel,i;r?(i=new rr(r,n,n),i=new rr(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof rr&&(o=o.get("tooltip",!0)),Te(o)&&(o={formatter:o}),o&&(i=new rr(o,i,n)))}return i}function lC(e,t){return e.dispatchAction||_t(t.dispatchAction,t)}function Ote(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function Rte(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function kte(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+o;break;case"left":s=t.x-i-o,l=t.y+c/2-a/2;break;case"right":s=t.x+u+o,l=t.y+c/2-a/2}return[s,l]}function uC(e){return e==="center"||e==="middle"}function Nte(e,t,r){var n=r0(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=ic(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=ft(u).tooltipConfig;if(c&&c.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}const Fte=Ite;function Bte(e){ua(QL),e.registerComponentModel(mte),e.registerComponentView(Fte),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Tr),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Tr)}var $te=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(xt),Hte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=qe(r.get("textBaseline"),r.get("textVerticalAlign")),c=new dr({style:la(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),d=r.get("subtext"),h=new dr({style:la(s,{text:d,fill:s.getTextColor(),y:f.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=r.get("link"),p=r.get("sublink"),g=r.get("triggerEvent",!0);c.silent=!v&&!g,h.silent=!p&&!g,v&&c.on("click",function(){ix(v,"_"+r.get("target"))}),p&&h.on("click",function(){ix(p,"_"+r.get("subtarget"))}),ft(c).eventData=ft(h).eventData=g?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),d&&a.add(h);var m=a.getBoundingRect(),y=r.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=Ls(y,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var b={align:l,verticalAlign:u};c.setStyle(b),h.setStyle(b),m=a.getBoundingRect();var x=_.margin,w=r.getItemStyle(["color","opacity"]);w.fill=r.get("backgroundColor");var S=new Ht({shape:{x:m.x-x[3],y:m.y-x[0],width:m.width+x[1]+x[3],height:m.height+x[0]+x[2],r:r.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});a.add(S)}},t.type="title",t}(xi);function zte(e){e.registerComponentModel($te),e.registerComponentView(Hte)}var Wte=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},Vte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},t.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),ge(n)&&O(n,function(a,o){Te(a)&&(a={type:a}),n[o]=st(a,Wte(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(xt);const Cm=Vte;var jo=Rt,Tm=O,gf=cn,Gte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new gf),this.group.add(this._selectorGroup=new gf),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=r.getBoxLayoutParams(),f={width:i.getWidth(),height:i.getHeight()},d=r.get("padding"),h=Ls(c,f,d),v=this.layoutInner(r,o,h,a,l,u),p=Ls(dt({width:v.width,height:v.height},c),f,d);this.group.x=p.x-v.x,this.group.y=p.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=pte(v,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=Ue(),f=n.get("selectedMode"),d=[];i.eachRawSeries(function(h){!h.get("legendHoverLink")&&d.push(h.id)}),Tm(n.getData(),function(h,v){var p=h.get("name");if(!this.newlineDisabled&&(p===""||p===` +`)){var g=new gf;g.newline=!0,u.add(g);return}var m=i.getSeriesByName(p)[0];if(!c.get(p))if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},b=y.getVisual("legendIcon"),x=y.getVisual("style"),w=this._createItem(m,p,v,h,n,r,_,x,b,f,a);w.on("click",jo(cC,p,null,a,d)).on("mouseover",jo(Mm,m.name,null,a,d)).on("mouseout",jo(Am,m.name,null,a,d)),c.set(p,!0)}else i.eachRawSeries(function(S){if(!c.get(p)&&S.legendVisualProvider){var C=S.legendVisualProvider;if(!C.containName(p))return;var M=C.indexOfName(p),P=C.getItemVisual(M,"style"),A=C.getItemVisual(M,"legendIcon"),T=so(P.fill);T&&T[3]===0&&(T[3]=.2,P=se(se({},P),{fill:Ky(T,"rgba")}));var D=this._createItem(S,p,v,h,n,r,{},P,A,f,a);D.on("click",jo(cC,null,p,a,d)).on("mouseover",jo(Mm,null,p,a,d)).on("mouseout",jo(Am,null,p,a,d)),c.set(p,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();Tm(r,function(u){var c=u.type,f=new dr({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(f);var d=n.getModel("selectorLabel"),h=n.getModel(["emphasis","selectorLabel"]);m0(f,{normal:d,emphasis:h},{defaultText:u.title}),Kg(f)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,d){var h=r.visualDrawType,v=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");c=_||c||"roundRect";var b=Ute(c,a,l,u,h,g,d),x=new gf,w=a.getModel("textStyle");if(Ve(r.getLegendIcon)&&(!_||_==="inherit"))x.add(r.getLegendIcon({itemWidth:v,itemHeight:p,icon:c,iconRotate:m,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}));else{var S=_==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;x.add(jte({itemWidth:v,itemHeight:p,icon:c,iconRotate:S,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}))}var C=s==="left"?v+5:-5,M=s,P=o.get("formatter"),A=n;Te(P)&&P?A=P.replace("{name}",n??""):Ve(P)&&(A=P(n));var T=a.get("inactiveColor");x.add(new dr({style:la(w,{text:A,x:C,y:p/2,fill:g?w.getTextColor():T,align:M,verticalAlign:"middle"})}));var D=new Ht({shape:x.getBoundingRect(),invisible:!0}),N=a.getModel("tooltip");return N.get("show")&&p0({el:D,componentModel:o,itemName:n,itemTooltipOption:N.option}),x.add(D),x.eachChild(function(H){H.silent=!0}),D.silent=!f,this.getContentGroup().add(x),Kg(x),x.__legendDataIndex=i,x},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Xl(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Xl("horizontal",u,r.get("selectorItemGap",!0));var d=u.getBoundingRect(),h=[-d.x,-d.y],v=r.get("selectorButtonGap",!0),p=r.getOrient().index,g=p===0?"width":"height",m=p===0?"height":"width",y=p===0?"y":"x";s==="end"?h[p]+=c[g]+v:f[p]+=d[g]+v,h[1-p]+=c[m]/2-d[m]/2,u.x=h[0],u.y=h[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[g]=c[g]+v+d[g],_[m]=Math.max(c[m],d[m]),_[y]=Math.min(0,d[y]+h[1-p]),_}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(xi);function Ute(e,t,r,n,i,a,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),Tm(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=e.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:dm(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var d=t.getModel("lineStyle"),h=d.getLineStyle();if(s(h,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),h.stroke==="auto"&&(h.stroke=n.fill),!a){var v=t.get("inactiveBorderWidth"),p=u[c];u.lineWidth=v==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=d.get("inactiveColor"),h.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function jte(e){var t=e.icon||"roundRect",r=R0(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function cC(e,t,r,n){Am(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),Mm(e,t,r,n)}function nD(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;ni[o],g=[-h.x,-h.y];n||(g[a]=c[u]);var m=[0,0],y=[-v.x,-v.y],_=qe(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(p){var b=r.get("pageButtonPosition",!0);b==="end"?y[a]+=i[o]-v[o]:m[a]+=v[o]+_}y[1-a]+=h[s]/2-v[s]/2,c.setPosition(g),f.setPosition(m),d.setPosition(y);var x={x:0,y:0};if(x[o]=p?i[o]:h[o],x[s]=Math.max(h[s],v[s]),x[l]=Math.min(0,v[l]+y[1-a]),f.__rectSize=i[o],p){var w={x:0,y:0};w[o]=Math.max(i[o]-v[o]-_,0),w[s]=x[s],f.setClipPath(new Ht({shape:w})),f.__rectSize=w[o]}else d.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var S=this._getPageInfo(r);return S.pageIndex!=null&&Pr(c,{x:S.contentPosition[0],y:S.contentPosition[1]},p?r:null),this._updatePageInfoView(r,S),x},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;O(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",d=n[f]!=null,h=i.childOfName(c);h&&(h.setStyle("fill",d?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),h.cursor=d?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",Te(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=wp[o],l=xp[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],d=c.length,h=d?1:0,v={contentPosition:[i.x,i.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return v;var p=b(f);v.contentPosition[o]=-p.s;for(var g=u+1,m=p,y=p,_=null;g<=d;++g)_=b(c[g]),(!_&&y.e>m.s+a||_&&!x(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=m.i),++v.pageCount)),y=_;for(var g=u-1,m=p,y=p,_=null;g>=-1;--g)_=b(c[g]),(!_||!x(y,_.s))&&m.i=S&&w.s<=S+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(iD);const Qte=Zte;function Jte(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function ere(e){ua(aD),e.registerComponentModel(Xte),e.registerComponentView(Qte),Jte(e)}function tre(e){ua(aD),ua(ere)}ua([KJ,OJ,$ee,sJ,zte,Bte,tre,vte]);function rre(e,t,r){const n=B0(document.getElementById(e),"macarons");n.showLoading();const i={title:{text:"Network Traffic",subtext:"today",left:"center"},tooltip:{trigger:"item",formatter:function(a){return aa.fileSize(a.data.value)+" ("+a.percent+"%)"}},legend:{orient:"vertical",left:"left",data:["Traffic In","Traffic Out"]},series:[{type:"pie",radius:"55%",center:["50%","60%"],data:[{value:t,name:"Traffic In"},{value:r,name:"Traffic Out"}],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};n.setOption(i),n.hideLoading()}function nre(e,t){const r=B0(document.getElementById(e),"macarons");r.showLoading();const n={title:{text:"Proxies",subtext:"now",left:"center"},tooltip:{trigger:"item",formatter:function(i){return String(i.data.value)}},legend:{orient:"vertical",left:"left",data:[]},series:[{type:"pie",radius:"55%",center:["50%","60%"],data:[],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};t.proxy_type_count.tcp!=null&&t.proxy_type_count.tcp!=0&&(n.series[0].data.push({value:t.proxy_type_count.tcp,name:"TCP"}),n.legend.data.push("TCP")),t.proxy_type_count.udp!=null&&t.proxy_type_count.udp!=0&&(n.series[0].data.push({value:t.proxy_type_count.udp,name:"UDP"}),n.legend.data.push("UDP")),t.proxy_type_count.http!=null&&t.proxy_type_count.http!=0&&(n.series[0].data.push({value:t.proxy_type_count.http,name:"HTTP"}),n.legend.data.push("HTTP")),t.proxy_type_count.https!=null&&t.proxy_type_count.https!=0&&(n.series[0].data.push({value:t.proxy_type_count.https,name:"HTTPS"}),n.legend.data.push("HTTPS")),t.proxy_type_count.stcp!=null&&t.proxy_type_count.stcp!=0&&(n.series[0].data.push({value:t.proxy_type_count.stcp,name:"STCP"}),n.legend.data.push("STCP")),t.proxy_type_count.sudp!=null&&t.proxy_type_count.sudp!=0&&(n.series[0].data.push({value:t.proxy_type_count.sudp,name:"SUDP"}),n.legend.data.push("SUDP")),t.proxy_type_count.xtcp!=null&&t.proxy_type_count.xtcp!=0&&(n.series[0].data.push({value:t.proxy_type_count.xtcp,name:"XTCP"}),n.legend.data.push("XTCP")),r.setOption(n),r.hideLoading()}function ire(e,t,r){const n={width:"600px",height:"400px"},i=B0(document.getElementById(e),"macarons",n);i.showLoading(),t=t.reverse(),r=r.reverse();let a=new Date;a=new Date(a.getFullYear(),a.getMonth(),a.getDate()-6);const o=[];for(let l=0;l<7;l++)o.push(a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate()),a=new Date(a.getFullYear(),a.getMonth(),a.getDate()+1);const s={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(l){let u="";l.length>0&&(u+=l[0].name+"
");for(const c of l){const f='';u+=f+c.seriesName+": "+aa.fileSize(c.value)+"
"}return u}},legend:{data:["Traffic In","Traffic Out"]},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:o}],yAxis:[{type:"value",axisLabel:{formatter:function(l){return aa.fileSize(l)}}}],series:[{name:"Traffic In",type:"bar",data:t},{name:"Traffic Out",type:"bar",data:r}]};i.setOption(s),i.hideLoading()}const hC=ce({__name:"LongSpan",props:{content:null,length:null},setup(e){return(t,r)=>{const n=Ju;return Y(),me(pt,null,[ee(n,{content:e.content,placement:"top"},{default:Z(()=>[nr(ae("span",null,Me(e.content.slice(0,e.length))+"...",513),[[yi,e.content.length>e.length]])]),_:1},8,["content"]),nr(ae("span",null,Me(e.content),513),[[yi,e.content.length<30]])],64)}}}),are={class:"source"},ore=ae("div",{id:"traffic",style:{width:"400px",height:"250px","margin-bottom":"30px"}},null,-1),sre=ae("div",{id:"proxies",style:{width:"400px",height:"250px"}},null,-1),lre=ce({__name:"ServerOverview",setup(e){let t=B({version:"",bind_port:0,kcp_bind_port:0,quic_bind_port:0,vhost_http_port:0,vhost_https_port:0,tcpmux_httpconnect_port:0,subdomain_host:"",max_pool_count:0,max_ports_per_client:"",allow_ports_str:"",tls_only:!1,heart_beat_timeout:0,client_counts:0,cur_conns:0,proxy_counts:0});return(()=>{fetch("../api/serverinfo",{credentials:"include"}).then(n=>n.json()).then(n=>{t.value.version=n.version,t.value.bind_port=n.bind_port,t.value.kcp_bind_port=n.kcp_bind_port,t.value.quic_bind_port=n.quic_bind_port,t.value.vhost_http_port=n.vhost_http_port,t.value.vhost_https_port=n.vhost_https_port,t.value.tcpmux_httpconnect_port=n.tcpmux_httpconnect_port,t.value.subdomain_host=n.subdomain_host,t.value.max_pool_count=n.max_pool_count,t.value.max_ports_per_client=n.max_ports_per_client,t.value.max_ports_per_client=="0"&&(t.value.max_ports_per_client="no limit"),t.value.allow_ports_str=n.allow_ports_str,t.value.tls_only=n.tls_only,t.value.heart_beat_timeout=n.heart_beat_timeout,t.value.client_counts=n.client_counts,t.value.cur_conns=n.cur_conns,t.value.proxy_counts=0,n.proxy_type_count!=null&&(n.proxy_type_count.tcp!=null&&(t.value.proxy_counts+=n.proxy_type_count.tcp),n.proxy_type_count.udp!=null&&(t.value.proxy_counts+=n.proxy_type_count.udp),n.proxy_type_count.http!=null&&(t.value.proxy_counts+=n.proxy_type_count.http),n.proxy_type_count.https!=null&&(t.value.proxy_counts+=n.proxy_type_count.https),n.proxy_type_count.stcp!=null&&(t.value.proxy_counts+=n.proxy_type_count.stcp),n.proxy_type_count.sudp!=null&&(t.value.proxy_counts+=n.proxy_type_count.sudp),n.proxy_type_count.xtcp!=null&&(t.value.proxy_counts+=n.proxy_type_count.xtcp)),rre("traffic",n.total_traffic_in,n.total_traffic_out),nre("proxies",n)}).catch(()=>{DA({showClose:!0,message:"Get server info from frps failed!",type:"warning"})})})(),(n,i)=>{const a=zM,o=HM,s=pA,l=vA;return Y(),me("div",null,[ee(l,null,{default:Z(()=>[ee(s,{md:12},{default:Z(()=>[ae("div",are,[ee(o,{"label-position":"left","label-width":"220px",class:"server_info"},{default:Z(()=>[ee(a,{label:"Version"},{default:Z(()=>[ae("span",null,Me(E(t).version),1)]),_:1}),ee(a,{label:"BindPort"},{default:Z(()=>[ae("span",null,Me(E(t).bind_port),1)]),_:1}),E(t).kcp_bind_port!=0?(Y(),_e(a,{key:0,label:"KCP Bind Port"},{default:Z(()=>[ae("span",null,Me(E(t).kcp_bind_port),1)]),_:1})):Fe("",!0),E(t).quic_bind_port!=0?(Y(),_e(a,{key:1,label:"QUIC Bind Port"},{default:Z(()=>[ae("span",null,Me(E(t).quic_bind_port),1)]),_:1})):Fe("",!0),E(t).vhost_http_port!=0?(Y(),_e(a,{key:2,label:"Http Port"},{default:Z(()=>[ae("span",null,Me(E(t).vhost_http_port),1)]),_:1})):Fe("",!0),E(t).vhost_https_port!=0?(Y(),_e(a,{key:3,label:"Https Port"},{default:Z(()=>[ae("span",null,Me(E(t).vhost_https_port),1)]),_:1})):Fe("",!0),E(t).tcpmux_httpconnect_port!=0?(Y(),_e(a,{key:4,label:"TCPMux HTTPConnect Port"},{default:Z(()=>[ae("span",null,Me(E(t).tcpmux_httpconnect_port),1)]),_:1})):Fe("",!0),E(t).subdomain_host!=""?(Y(),_e(a,{key:5,label:"Subdomain Host"},{default:Z(()=>[ee(hC,{content:E(t).subdomain_host,length:30},null,8,["content"])]),_:1})):Fe("",!0),ee(a,{label:"Max PoolCount"},{default:Z(()=>[ae("span",null,Me(E(t).max_pool_count),1)]),_:1}),ee(a,{label:"Max Ports Per Client"},{default:Z(()=>[ae("span",null,Me(E(t).max_ports_per_client),1)]),_:1}),E(t).allow_ports_str!=""?(Y(),_e(a,{key:6,label:"Allow Ports"},{default:Z(()=>[ee(hC,{content:E(t).allow_ports_str,length:30},null,8,["content"])]),_:1})):Fe("",!0),E(t).tls_only===!0?(Y(),_e(a,{key:7,label:"TLS Only"},{default:Z(()=>[ae("span",null,Me(E(t).tls_only),1)]),_:1})):Fe("",!0),ee(a,{label:"HeartBeat Timeout"},{default:Z(()=>[ae("span",null,Me(E(t).heart_beat_timeout),1)]),_:1}),ee(a,{label:"Client Counts"},{default:Z(()=>[ae("span",null,Me(E(t).client_counts),1)]),_:1}),ee(a,{label:"Current Connections"},{default:Z(()=>[ae("span",null,Me(E(t).cur_conns),1)]),_:1}),ee(a,{label:"Proxy Counts"},{default:Z(()=>[ae("span",null,Me(E(t).proxy_counts),1)]),_:1})]),_:1})])]),_:1}),ee(s,{md:12},{default:Z(()=>[ore,sre]),_:1})]),_:1})])}}});class Us{constructor(t){Wt(this,"name");Wt(this,"type");Wt(this,"encryption");Wt(this,"compression");Wt(this,"conns");Wt(this,"traffic_in");Wt(this,"traffic_out");Wt(this,"last_start_time");Wt(this,"last_close_time");Wt(this,"status");Wt(this,"client_version");Wt(this,"addr");Wt(this,"port");Wt(this,"custom_domains");Wt(this,"host_header_rewrite");Wt(this,"locations");Wt(this,"subdomain");this.name=t.name,this.type="",t.conf!=null?(this.encryption=t.conf.use_encryption,this.compression=t.conf.use_compression):(this.encryption=!1,this.compression=!1),this.conns=t.cur_conns,this.traffic_in=t.today_traffic_in,this.traffic_out=t.today_traffic_out,this.last_start_time=t.last_start_time,this.last_close_time=t.last_close_time,this.status=t.status,this.client_version=t.client_version,this.addr="",this.port=0,this.custom_domains="",this.host_header_rewrite="",this.locations="",this.subdomain=""}}class ure extends Us{constructor(t){super(t),this.type="tcp",t.conf!=null?(this.addr=":"+t.conf.remote_port,this.port=t.conf.remote_port):(this.addr="",this.port=0)}}class cre extends Us{constructor(t){super(t),this.type="udp",t.conf!=null?(this.addr=":"+t.conf.remote_port,this.port=t.conf.remote_port):(this.addr="",this.port=0)}}class fre extends Us{constructor(t,r,n){super(t),this.type="http",this.port=r,t.conf!=null?(this.custom_domains=t.conf.custom_domains,this.host_header_rewrite=t.conf.host_header_rewrite,this.locations=t.conf.locations,t.conf.subdomain!=""?this.subdomain=t.conf.subdomain+"."+n:this.subdomain=""):(this.custom_domains="",this.host_header_rewrite="",this.subdomain="",this.locations="")}}class dre extends Us{constructor(t,r,n){super(t),this.type="https",this.port=r,t.conf!=null?(this.custom_domains=t.conf.custom_domains,t.conf.subdomain!=""?this.subdomain=t.conf.subdomain+"."+n:this.subdomain=""):(this.custom_domains="",this.subdomain="")}}class hre extends Us{constructor(t){super(t),this.type="stcp"}}class vre extends Us{constructor(t){super(t),this.type="sudp"}}const pre=["id"],gre=ce({__name:"Traffic",props:{proxy_name:null},setup(e){const t=e;return(()=>{let n="../api/traffic/"+t.proxy_name;fetch(n,{credentials:"include"}).then(i=>i.json()).then(i=>{ire(t.proxy_name,i.traffic_in,i.traffic_out)}).catch(i=>{DA({showClose:!0,message:"Get traffic info failed!"+i,type:"warning"})})})(),(n,i)=>(Y(),me("div",{id:e.proxy_name,style:{width:"600px",height:"400px"}},null,8,pre))}}),mre=ce({__name:"ProxyViewExpand",props:{row:null,proxyType:null},setup(e){return(t,r)=>{const n=zM,i=HM;return e.proxyType==="http"||e.proxyType==="https"?(Y(),_e(i,{key:0,"label-position":"left",inline:"",class:"proxy-table-expand"},{default:Z(()=>[ee(n,{label:"Name"},{default:Z(()=>[ae("span",null,Me(e.row.name),1)]),_:1}),ee(n,{label:"Type"},{default:Z(()=>[ae("span",null,Me(e.row.type),1)]),_:1}),ee(n,{label:"Domains"},{default:Z(()=>[ae("span",null,Me(e.row.custom_domains),1)]),_:1}),ee(n,{label:"SubDomain"},{default:Z(()=>[ae("span",null,Me(e.row.subdomain),1)]),_:1}),ee(n,{label:"locations"},{default:Z(()=>[ae("span",null,Me(e.row.locations),1)]),_:1}),ee(n,{label:"HostRewrite"},{default:Z(()=>[ae("span",null,Me(e.row.host_header_rewrite),1)]),_:1}),ee(n,{label:"Encryption"},{default:Z(()=>[ae("span",null,Me(e.row.encryption),1)]),_:1}),ee(n,{label:"Compression"},{default:Z(()=>[ae("span",null,Me(e.row.compression),1)]),_:1}),ee(n,{label:"Last Start"},{default:Z(()=>[ae("span",null,Me(e.row.last_start_time),1)]),_:1}),ee(n,{label:"Last Close"},{default:Z(()=>[ae("span",null,Me(e.row.last_close_time),1)]),_:1})]),_:1})):(Y(),_e(i,{key:1,"label-position":"left",inline:"",class:"proxy-table-expand"},{default:Z(()=>[ee(n,{label:"Name"},{default:Z(()=>[ae("span",null,Me(e.row.name),1)]),_:1}),ee(n,{label:"Type"},{default:Z(()=>[ae("span",null,Me(e.row.type),1)]),_:1}),ee(n,{label:"Addr"},{default:Z(()=>[ae("span",null,Me(e.row.addr),1)]),_:1}),ee(n,{label:"Encryption"},{default:Z(()=>[ae("span",null,Me(e.row.encryption),1)]),_:1}),ee(n,{label:"Compression"},{default:Z(()=>[ae("span",null,Me(e.row.compression),1)]),_:1}),ee(n,{label:"Last Start"},{default:Z(()=>[ae("span",null,Me(e.row.last_start_time),1)]),_:1}),ee(n,{label:"Last Close"},{default:Z(()=>[ae("span",null,Me(e.row.last_close_time),1)]),_:1})]),_:1}))}}}),js=ce({__name:"ProxyView",props:{proxies:null,proxyType:null},setup(e){const t=(n,i)=>aa.fileSize(n.traffic_in),r=(n,i)=>aa.fileSize(n.traffic_out);return(n,i)=>{const a=gre,o=J6,s=IW,l=ZV,u=O8,c=XV;return Y(),me("div",null,[ee(c,{data:e.proxies,"default-sort":{prop:"name",order:"ascending"},style:{width:"100%"}},{default:Z(()=>[ee(l,{type:"expand"},{default:Z(f=>[ee(s,{placement:"right",width:"600",style:{"margin-left":"0px"},trigger:"click"},{default:Z(()=>[ee(a,{proxy_name:f.row.name},null,8,["proxy_name"])]),reference:Z(()=>[ee(o,{type:"primary",size:"large",name:f.row.name,style:{"margin-bottom":"10px"}},{default:Z(()=>[Bt("Traffic Statistics ")]),_:2},1032,["name"])]),_:2},1024),ee(mre,{row:f.row,proxyType:e.proxyType},null,8,["row","proxyType"])]),_:1}),ee(l,{label:"Name",prop:"name",sortable:""}),ee(l,{label:"Port",prop:"port",sortable:""}),ee(l,{label:"Connections",prop:"conns",sortable:""}),ee(l,{label:"Traffic In",prop:"traffic_in",formatter:t,sortable:""}),ee(l,{label:"Traffic Out",prop:"traffic_out",formatter:r,sortable:""}),ee(l,{label:"ClientVersion",prop:"client_version",sortable:""}),ee(l,{label:"Status",prop:"status",sortable:""},{default:Z(f=>[f.row.status==="online"?(Y(),_e(u,{key:0,type:"success"},{default:Z(()=>[Bt(Me(f.row.status),1)]),_:2},1024)):(Y(),_e(u,{key:1,type:"danger"},{default:Z(()=>[Bt(Me(f.row.status),1)]),_:2},1024))]),_:1})]),_:1},8,["data"])])}}}),yre=ce({__name:"ProxiesTCP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/tcp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new ure(i))})})(),(n,i)=>(Y(),_e(js,{proxies:E(t),proxyType:"tcp"},null,8,["proxies"]))}}),_re=ce({__name:"ProxiesUDP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/udp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new cre(i))})})(),(n,i)=>(Y(),_e(js,{proxies:E(t),proxyType:"udp"},null,8,["proxies"]))}}),bre=ce({__name:"ProxiesHTTP",setup(e){let t=B([]);return(()=>{let n,i;fetch("../api/serverinfo",{credentials:"include"}).then(a=>a.json()).then(a=>{n=a.vhost_http_port,i=a.subdomain_host,!(n==null||n==0)&&fetch("../api/proxy/http",{credentials:"include"}).then(o=>o.json()).then(o=>{for(let s of o.proxies)t.value.push(new fre(s,n,i))})})})(),(n,i)=>(Y(),_e(js,{proxies:E(t),proxyType:"http"},null,8,["proxies"]))}}),wre=ce({__name:"ProxiesHTTPS",setup(e){let t=B([]);return(()=>{let n,i;fetch("../api/serverinfo",{credentials:"include"}).then(a=>a.json()).then(a=>{n=a.vhost_https_port,i=a.subdomain_host,!(n==null||n==0)&&fetch("../api/proxy/https",{credentials:"include"}).then(o=>o.json()).then(o=>{for(let s of o.proxies)t.value.push(new dre(s,n,i))})})})(),(n,i)=>(Y(),_e(js,{proxies:E(t),proxyType:"https"},null,8,["proxies"]))}}),xre=ce({__name:"ProxiesSTCP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/stcp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new hre(i))})})(),(n,i)=>(Y(),_e(js,{proxies:E(t),proxyType:"stcp"},null,8,["proxies"]))}}),Sre=ce({__name:"ProxiesSUDP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/sudp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new vre(i))})})(),(n,i)=>(Y(),_e(js,{proxies:E(t),proxyType:"sudp"},null,8,["proxies"]))}}),Cre=SU({history:$G(),routes:[{path:"/",name:"ServerOverview",component:lre},{path:"/proxies/tcp",name:"ProxiesTCP",component:yre},{path:"/proxies/udp",name:"ProxiesUDP",component:_re},{path:"/proxies/http",name:"ProxiesHTTP",component:bre},{path:"/proxies/https",name:"ProxiesHTTPS",component:wre},{path:"/proxies/stcp",name:"ProxiesSTCP",component:xre},{path:"/proxies/sudp",name:"ProxiesSUDP",component:Sre}]}),oD=YO(bG);oD.use(Cre);oD.mount("#app")});export default Tre(); diff --git a/assets/frps/static/index.html b/assets/frps/static/index.html index 6a6a252..c08019b 100644 --- a/assets/frps/static/index.html +++ b/assets/frps/static/index.html @@ -4,7 +4,7 @@ frps dashboard - + diff --git a/client/admin.go b/client/admin.go index 949ab8a..37959e7 100644 --- a/client/admin.go +++ b/client/admin.go @@ -23,7 +23,7 @@ import ( "github.com/gorilla/mux" "github.com/fatedier/frp/assets" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" ) var ( @@ -48,7 +48,7 @@ func (svr *Service) RunAdminServer(address string) (err error) { subRouter := router.NewRoute().Subrouter() user, passwd := svr.cfg.AdminUser, svr.cfg.AdminPwd - subRouter.Use(frpNet.NewHTTPAuthMiddleware(user, passwd).SetAuthFailDelay(200 * time.Millisecond).Middleware) + subRouter.Use(utilnet.NewHTTPAuthMiddleware(user, passwd).SetAuthFailDelay(200 * time.Millisecond).Middleware) // api, see admin_api.go subRouter.HandleFunc("/api/reload", svr.apiReload).Methods("GET") @@ -58,7 +58,7 @@ func (svr *Service) RunAdminServer(address string) (err error) { // view subRouter.Handle("/favicon.ico", http.FileServer(assets.FileSystem)).Methods("GET") - subRouter.PathPrefix("/static/").Handler(frpNet.MakeHTTPGzipHandler(http.StripPrefix("/static/", http.FileServer(assets.FileSystem)))).Methods("GET") + subRouter.PathPrefix("/static/").Handler(utilnet.MakeHTTPGzipHandler(http.StripPrefix("/static/", http.FileServer(assets.FileSystem)))).Methods("GET") subRouter.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, "/static/", http.StatusMovedPermanently) }) diff --git a/client/admin_api.go b/client/admin_api.go index 2a3633a..5d163de 100644 --- a/client/admin_api.go +++ b/client/admin_api.go @@ -91,7 +91,7 @@ func NewProxyStatusResp(status *proxy.WorkingStatus, serverAddr string) ProxySta Status: status.Phase, Err: status.Err, } - baseCfg := status.Cfg.GetBaseInfo() + baseCfg := status.Cfg.GetBaseConfig() if baseCfg.LocalPort != 0 { psr.LocalAddr = net.JoinHostPort(baseCfg.LocalIP, strconv.Itoa(baseCfg.LocalPort)) } diff --git a/client/control.go b/client/control.go index 7626bde..95f84f8 100644 --- a/client/control.go +++ b/client/control.go @@ -109,7 +109,7 @@ func NewControl( ctl.msgTransporter = transport.NewMessageTransporter(ctl.sendCh) ctl.pm = proxy.NewManager(ctl.ctx, clientCfg, ctl.msgTransporter) - ctl.vm = visitor.NewManager(ctl.ctx, ctl.clientCfg, ctl.connectServer, ctl.msgTransporter) + ctl.vm = visitor.NewManager(ctl.ctx, ctl.runID, ctl.clientCfg, ctl.connectServer, ctl.msgTransporter) ctl.vm.Reload(visitorCfgs) return ctl } diff --git a/client/proxy/general_tcp.go b/client/proxy/general_tcp.go new file mode 100644 index 0000000..7efe476 --- /dev/null +++ b/client/proxy/general_tcp.go @@ -0,0 +1,47 @@ +// Copyright 2023 The frp Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package proxy + +import ( + "reflect" + + "github.com/fatedier/frp/pkg/config" +) + +func init() { + pxyConfs := []config.ProxyConf{ + &config.TCPProxyConf{}, + &config.HTTPProxyConf{}, + &config.HTTPSProxyConf{}, + &config.STCPProxyConf{}, + &config.TCPMuxProxyConf{}, + } + for _, cfg := range pxyConfs { + RegisterProxyFactory(reflect.TypeOf(cfg), NewGeneralTCPProxy) + } +} + +// GeneralTCPProxy is a general implementation of Proxy interface for TCP protocol. +// If the default GeneralTCPProxy cannot meet the requirements, you can customize +// the implementation of the Proxy interface. +type GeneralTCPProxy struct { + *BaseProxy +} + +func NewGeneralTCPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy { + return &GeneralTCPProxy{ + BaseProxy: baseProxy, + } +} diff --git a/client/proxy/proxy.go b/client/proxy/proxy.go index 61e6763..82d5d9f 100644 --- a/client/proxy/proxy.go +++ b/client/proxy/proxy.go @@ -19,12 +19,13 @@ import ( "context" "io" "net" + "reflect" "strconv" "strings" "sync" "time" - frpIo "github.com/fatedier/golib/io" + libio "github.com/fatedier/golib/io" libdial "github.com/fatedier/golib/net/dial" pp "github.com/pires/go-proxyproto" "golang.org/x/time/rate" @@ -37,6 +38,12 @@ import ( "github.com/fatedier/frp/pkg/util/xlog" ) +var proxyFactoryRegistry = map[reflect.Type]func(*BaseProxy, config.ProxyConf) Proxy{} + +func RegisterProxyFactory(proxyConfType reflect.Type, factory func(*BaseProxy, config.ProxyConf) Proxy) { + proxyFactoryRegistry[proxyConfType] = factory +} + // Proxy defines how to handle work connections for different proxy type. type Proxy interface { Run() error @@ -54,253 +61,94 @@ func NewProxy( msgTransporter transport.MessageTransporter, ) (pxy Proxy) { var limiter *rate.Limiter - limitBytes := pxyConf.GetBaseInfo().BandwidthLimit.Bytes() - if limitBytes > 0 && pxyConf.GetBaseInfo().BandwidthLimitMode == config.BandwidthLimitModeClient { + limitBytes := pxyConf.GetBaseConfig().BandwidthLimit.Bytes() + if limitBytes > 0 && pxyConf.GetBaseConfig().BandwidthLimitMode == config.BandwidthLimitModeClient { limiter = rate.NewLimiter(rate.Limit(float64(limitBytes)), int(limitBytes)) } baseProxy := BaseProxy{ - clientCfg: clientCfg, - limiter: limiter, - msgTransporter: msgTransporter, - xl: xlog.FromContextSafe(ctx), - ctx: ctx, + baseProxyConfig: pxyConf.GetBaseConfig(), + clientCfg: clientCfg, + limiter: limiter, + msgTransporter: msgTransporter, + xl: xlog.FromContextSafe(ctx), + ctx: ctx, } - switch cfg := pxyConf.(type) { - case *config.TCPProxyConf: - pxy = &TCPProxy{ - BaseProxy: &baseProxy, - cfg: cfg, - } - case *config.TCPMuxProxyConf: - pxy = &TCPMuxProxy{ - BaseProxy: &baseProxy, - cfg: cfg, - } - case *config.UDPProxyConf: - pxy = &UDPProxy{ - BaseProxy: &baseProxy, - cfg: cfg, - } - case *config.HTTPProxyConf: - pxy = &HTTPProxy{ - BaseProxy: &baseProxy, - cfg: cfg, - } - case *config.HTTPSProxyConf: - pxy = &HTTPSProxy{ - BaseProxy: &baseProxy, - cfg: cfg, - } - case *config.STCPProxyConf: - pxy = &STCPProxy{ - BaseProxy: &baseProxy, - cfg: cfg, - } - case *config.XTCPProxyConf: - pxy = &XTCPProxy{ - BaseProxy: &baseProxy, - cfg: cfg, - } - case *config.SUDPProxyConf: - pxy = &SUDPProxy{ - BaseProxy: &baseProxy, - cfg: cfg, - closeCh: make(chan struct{}), - } + + factory := proxyFactoryRegistry[reflect.TypeOf(pxyConf)] + if factory == nil { + return nil } - return + return factory(&baseProxy, pxyConf) } type BaseProxy struct { - closed bool - clientCfg config.ClientCommonConf - msgTransporter transport.MessageTransporter - limiter *rate.Limiter + baseProxyConfig *config.BaseProxyConf + clientCfg config.ClientCommonConf + msgTransporter transport.MessageTransporter + limiter *rate.Limiter + // proxyPlugin is used to handle connections instead of dialing to local service. + // It's only validate for TCP protocol now. + proxyPlugin plugin.Plugin mu sync.RWMutex xl *xlog.Logger ctx context.Context } -// TCP -type TCPProxy struct { - *BaseProxy - - cfg *config.TCPProxyConf - proxyPlugin plugin.Plugin -} - -func (pxy *TCPProxy) Run() (err error) { - if pxy.cfg.Plugin != "" { - pxy.proxyPlugin, err = plugin.Create(pxy.cfg.Plugin, pxy.cfg.PluginParams) +func (pxy *BaseProxy) Run() error { + if pxy.baseProxyConfig.Plugin != "" { + p, err := plugin.Create(pxy.baseProxyConfig.Plugin, pxy.baseProxyConfig.PluginParams) if err != nil { - return + return err } + pxy.proxyPlugin = p } - return + return nil } -func (pxy *TCPProxy) Close() { +func (pxy *BaseProxy) Close() { if pxy.proxyPlugin != nil { pxy.proxyPlugin.Close() } } -func (pxy *TCPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) { - HandleTCPWorkConnection(pxy.ctx, &pxy.cfg.LocalSvrConf, pxy.proxyPlugin, pxy.cfg.GetBaseInfo(), pxy.limiter, - conn, []byte(pxy.clientCfg.Token), m) -} - -// TCP Multiplexer -type TCPMuxProxy struct { - *BaseProxy - - cfg *config.TCPMuxProxyConf - proxyPlugin plugin.Plugin -} - -func (pxy *TCPMuxProxy) Run() (err error) { - if pxy.cfg.Plugin != "" { - pxy.proxyPlugin, err = plugin.Create(pxy.cfg.Plugin, pxy.cfg.PluginParams) - if err != nil { - return - } - } - return -} - -func (pxy *TCPMuxProxy) Close() { - if pxy.proxyPlugin != nil { - pxy.proxyPlugin.Close() - } -} - -func (pxy *TCPMuxProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) { - HandleTCPWorkConnection(pxy.ctx, &pxy.cfg.LocalSvrConf, pxy.proxyPlugin, pxy.cfg.GetBaseInfo(), pxy.limiter, - conn, []byte(pxy.clientCfg.Token), m) -} - -// HTTP -type HTTPProxy struct { - *BaseProxy - - cfg *config.HTTPProxyConf - proxyPlugin plugin.Plugin -} - -func (pxy *HTTPProxy) Run() (err error) { - if pxy.cfg.Plugin != "" { - pxy.proxyPlugin, err = plugin.Create(pxy.cfg.Plugin, pxy.cfg.PluginParams) - if err != nil { - return - } - } - return -} - -func (pxy *HTTPProxy) Close() { - if pxy.proxyPlugin != nil { - pxy.proxyPlugin.Close() - } -} - -func (pxy *HTTPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) { - HandleTCPWorkConnection(pxy.ctx, &pxy.cfg.LocalSvrConf, pxy.proxyPlugin, pxy.cfg.GetBaseInfo(), pxy.limiter, - conn, []byte(pxy.clientCfg.Token), m) -} - -// HTTPS -type HTTPSProxy struct { - *BaseProxy - - cfg *config.HTTPSProxyConf - proxyPlugin plugin.Plugin -} - -func (pxy *HTTPSProxy) Run() (err error) { - if pxy.cfg.Plugin != "" { - pxy.proxyPlugin, err = plugin.Create(pxy.cfg.Plugin, pxy.cfg.PluginParams) - if err != nil { - return - } - } - return -} - -func (pxy *HTTPSProxy) Close() { - if pxy.proxyPlugin != nil { - pxy.proxyPlugin.Close() - } -} - -func (pxy *HTTPSProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) { - HandleTCPWorkConnection(pxy.ctx, &pxy.cfg.LocalSvrConf, pxy.proxyPlugin, pxy.cfg.GetBaseInfo(), pxy.limiter, - conn, []byte(pxy.clientCfg.Token), m) -} - -// STCP -type STCPProxy struct { - *BaseProxy - - cfg *config.STCPProxyConf - proxyPlugin plugin.Plugin -} - -func (pxy *STCPProxy) Run() (err error) { - if pxy.cfg.Plugin != "" { - pxy.proxyPlugin, err = plugin.Create(pxy.cfg.Plugin, pxy.cfg.PluginParams) - if err != nil { - return - } - } - return -} - -func (pxy *STCPProxy) Close() { - if pxy.proxyPlugin != nil { - pxy.proxyPlugin.Close() - } -} - -func (pxy *STCPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) { - HandleTCPWorkConnection(pxy.ctx, &pxy.cfg.LocalSvrConf, pxy.proxyPlugin, pxy.cfg.GetBaseInfo(), pxy.limiter, - conn, []byte(pxy.clientCfg.Token), m) +func (pxy *BaseProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) { + pxy.HandleTCPWorkConnection(conn, m, []byte(pxy.clientCfg.Token)) } // Common handler for tcp work connections. -func HandleTCPWorkConnection(ctx context.Context, localInfo *config.LocalSvrConf, proxyPlugin plugin.Plugin, - baseInfo *config.BaseProxyConf, limiter *rate.Limiter, workConn net.Conn, encKey []byte, m *msg.StartWorkConn, -) { - xl := xlog.FromContextSafe(ctx) +func (pxy *BaseProxy) HandleTCPWorkConnection(workConn net.Conn, m *msg.StartWorkConn, encKey []byte) { + xl := pxy.xl + baseConfig := pxy.baseProxyConfig var ( remote io.ReadWriteCloser err error ) remote = workConn - if limiter != nil { - remote = frpIo.WrapReadWriteCloser(limit.NewReader(workConn, limiter), limit.NewWriter(workConn, limiter), func() error { + if pxy.limiter != nil { + remote = libio.WrapReadWriteCloser(limit.NewReader(workConn, pxy.limiter), limit.NewWriter(workConn, pxy.limiter), func() error { return workConn.Close() }) } xl.Trace("handle tcp work connection, use_encryption: %t, use_compression: %t", - baseInfo.UseEncryption, baseInfo.UseCompression) - if baseInfo.UseEncryption { - remote, err = frpIo.WithEncryption(remote, encKey) + baseConfig.UseEncryption, baseConfig.UseCompression) + if baseConfig.UseEncryption { + remote, err = libio.WithEncryption(remote, encKey) if err != nil { workConn.Close() xl.Error("create encryption stream error: %v", err) return } } - if baseInfo.UseCompression { - remote = frpIo.WithCompression(remote) + if baseConfig.UseCompression { + remote = libio.WithCompression(remote) } // check if we need to send proxy protocol info var extraInfo []byte - if baseInfo.ProxyProtocolVersion != "" { + if baseConfig.ProxyProtocolVersion != "" { if m.SrcAddr != "" && m.SrcPort != 0 { if m.DstAddr == "" { m.DstAddr = "127.0.0.1" @@ -319,9 +167,9 @@ func HandleTCPWorkConnection(ctx context.Context, localInfo *config.LocalSvrConf h.TransportProtocol = pp.TCPv6 } - if baseInfo.ProxyProtocolVersion == "v1" { + if baseConfig.ProxyProtocolVersion == "v1" { h.Version = 1 - } else if baseInfo.ProxyProtocolVersion == "v2" { + } else if baseConfig.ProxyProtocolVersion == "v2" { h.Version = 2 } @@ -331,21 +179,21 @@ func HandleTCPWorkConnection(ctx context.Context, localInfo *config.LocalSvrConf } } - if proxyPlugin != nil { - // if plugin is set, let plugin handle connections first - xl.Debug("handle by plugin: %s", proxyPlugin.Name()) - proxyPlugin.Handle(remote, workConn, extraInfo) + if pxy.proxyPlugin != nil { + // if plugin is set, let plugin handle connection first + xl.Debug("handle by plugin: %s", pxy.proxyPlugin.Name()) + pxy.proxyPlugin.Handle(remote, workConn, extraInfo) xl.Debug("handle by plugin finished") return } localConn, err := libdial.Dial( - net.JoinHostPort(localInfo.LocalIP, strconv.Itoa(localInfo.LocalPort)), + net.JoinHostPort(baseConfig.LocalIP, strconv.Itoa(baseConfig.LocalPort)), libdial.WithTimeout(10*time.Second), ) if err != nil { workConn.Close() - xl.Error("connect to local service [%s:%d] error: %v", localInfo.LocalIP, localInfo.LocalPort, err) + xl.Error("connect to local service [%s:%d] error: %v", baseConfig.LocalIP, baseConfig.LocalPort, err) return } @@ -360,7 +208,7 @@ func HandleTCPWorkConnection(ctx context.Context, localInfo *config.LocalSvrConf } } - _, _, errs := frpIo.Join(localConn, remote) + _, _, errs := libio.Join(localConn, remote) xl.Debug("join connections closed") if len(errs) > 0 { xl.Trace("join connections errors: %v", errs) diff --git a/client/proxy/proxy_manager.go b/client/proxy/proxy_manager.go index f5d7502..9e551ce 100644 --- a/client/proxy/proxy_manager.go +++ b/client/proxy/proxy_manager.go @@ -18,6 +18,7 @@ import ( "context" "fmt" "net" + "reflect" "sync" "github.com/fatedier/frp/client/event" @@ -121,21 +122,18 @@ func (pm *Manager) Reload(pxyCfgs map[string]config.ProxyConf) { for name, pxy := range pm.proxies { del := false cfg, ok := pxyCfgs[name] - if !ok { - del = true - } else if !pxy.Cfg.Compare(cfg) { + if !ok || !reflect.DeepEqual(pxy.Cfg, cfg) { del = true } if del { delPxyNames = append(delPxyNames, name) delete(pm.proxies, name) - pxy.Stop() } } if len(delPxyNames) > 0 { - xl.Info("proxy removed: %v", delPxyNames) + xl.Info("proxy removed: %s", delPxyNames) } addPxyNames := make([]string, 0) @@ -149,6 +147,6 @@ func (pm *Manager) Reload(pxyCfgs map[string]config.ProxyConf) { } } if len(addPxyNames) > 0 { - xl.Info("proxy added: %v", addPxyNames) + xl.Info("proxy added: %s", addPxyNames) } } diff --git a/client/proxy/proxy_wrapper.go b/client/proxy/proxy_wrapper.go index f2caa61..9130942 100644 --- a/client/proxy/proxy_wrapper.go +++ b/client/proxy/proxy_wrapper.go @@ -91,7 +91,7 @@ func NewWrapper( eventHandler event.Handler, msgTransporter transport.MessageTransporter, ) *Wrapper { - baseInfo := cfg.GetBaseInfo() + baseInfo := cfg.GetBaseConfig() xl := xlog.FromContextSafe(ctx).Spawn().AppendPrefix(baseInfo.ProxyName) pw := &Wrapper{ WorkingStatus: WorkingStatus{ diff --git a/client/proxy/sudp.go b/client/proxy/sudp.go index f540590..9d61e22 100644 --- a/client/proxy/sudp.go +++ b/client/proxy/sudp.go @@ -17,20 +17,25 @@ package proxy import ( "io" "net" + "reflect" "strconv" "sync" "time" "github.com/fatedier/golib/errors" - frpIo "github.com/fatedier/golib/io" + libio "github.com/fatedier/golib/io" "github.com/fatedier/frp/pkg/config" "github.com/fatedier/frp/pkg/msg" "github.com/fatedier/frp/pkg/proto/udp" "github.com/fatedier/frp/pkg/util/limit" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" ) +func init() { + RegisterProxyFactory(reflect.TypeOf(&config.SUDPProxyConf{}), NewSUDPProxy) +} + type SUDPProxy struct { *BaseProxy @@ -41,6 +46,18 @@ type SUDPProxy struct { closeCh chan struct{} } +func NewSUDPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy { + unwrapped, ok := cfg.(*config.SUDPProxyConf) + if !ok { + return nil + } + return &SUDPProxy{ + BaseProxy: baseProxy, + cfg: unwrapped, + closeCh: make(chan struct{}), + } +} + func (pxy *SUDPProxy) Run() (err error) { pxy.localAddr, err = net.ResolveUDPAddr("udp", net.JoinHostPort(pxy.cfg.LocalIP, strconv.Itoa(pxy.cfg.LocalPort))) if err != nil { @@ -67,12 +84,12 @@ func (pxy *SUDPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) { var rwc io.ReadWriteCloser = conn var err error if pxy.limiter != nil { - rwc = frpIo.WrapReadWriteCloser(limit.NewReader(conn, pxy.limiter), limit.NewWriter(conn, pxy.limiter), func() error { + rwc = libio.WrapReadWriteCloser(limit.NewReader(conn, pxy.limiter), limit.NewWriter(conn, pxy.limiter), func() error { return conn.Close() }) } if pxy.cfg.UseEncryption { - rwc, err = frpIo.WithEncryption(rwc, []byte(pxy.clientCfg.Token)) + rwc, err = libio.WithEncryption(rwc, []byte(pxy.clientCfg.Token)) if err != nil { conn.Close() xl.Error("create encryption stream error: %v", err) @@ -80,9 +97,9 @@ func (pxy *SUDPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) { } } if pxy.cfg.UseCompression { - rwc = frpIo.WithCompression(rwc) + rwc = libio.WithCompression(rwc) } - conn = frpNet.WrapReadWriteCloserToConn(rwc, conn) + conn = utilnet.WrapReadWriteCloserToConn(rwc, conn) workConn := conn readCh := make(chan *msg.UDPPacket, 1024) diff --git a/client/proxy/udp.go b/client/proxy/udp.go index 8a59936..adf9276 100644 --- a/client/proxy/udp.go +++ b/client/proxy/udp.go @@ -17,20 +17,24 @@ package proxy import ( "io" "net" + "reflect" "strconv" "time" "github.com/fatedier/golib/errors" - frpIo "github.com/fatedier/golib/io" + libio "github.com/fatedier/golib/io" "github.com/fatedier/frp/pkg/config" "github.com/fatedier/frp/pkg/msg" "github.com/fatedier/frp/pkg/proto/udp" "github.com/fatedier/frp/pkg/util/limit" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" ) -// UDP +func init() { + RegisterProxyFactory(reflect.TypeOf(&config.UDPProxyConf{}), NewUDPProxy) +} + type UDPProxy struct { *BaseProxy @@ -42,6 +46,18 @@ type UDPProxy struct { // include msg.UDPPacket and msg.Ping sendCh chan msg.Message workConn net.Conn + closed bool +} + +func NewUDPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy { + unwrapped, ok := cfg.(*config.UDPProxyConf) + if !ok { + return nil + } + return &UDPProxy{ + BaseProxy: baseProxy, + cfg: unwrapped, + } } func (pxy *UDPProxy) Run() (err error) { @@ -79,12 +95,12 @@ func (pxy *UDPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) { var rwc io.ReadWriteCloser = conn var err error if pxy.limiter != nil { - rwc = frpIo.WrapReadWriteCloser(limit.NewReader(conn, pxy.limiter), limit.NewWriter(conn, pxy.limiter), func() error { + rwc = libio.WrapReadWriteCloser(limit.NewReader(conn, pxy.limiter), limit.NewWriter(conn, pxy.limiter), func() error { return conn.Close() }) } if pxy.cfg.UseEncryption { - rwc, err = frpIo.WithEncryption(rwc, []byte(pxy.clientCfg.Token)) + rwc, err = libio.WithEncryption(rwc, []byte(pxy.clientCfg.Token)) if err != nil { conn.Close() xl.Error("create encryption stream error: %v", err) @@ -92,9 +108,9 @@ func (pxy *UDPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) { } } if pxy.cfg.UseCompression { - rwc = frpIo.WithCompression(rwc) + rwc = libio.WithCompression(rwc) } - conn = frpNet.WrapReadWriteCloserToConn(rwc, conn) + conn = utilnet.WrapReadWriteCloserToConn(rwc, conn) pxy.mu.Lock() pxy.workConn = conn diff --git a/client/proxy/xtcp.go b/client/proxy/xtcp.go index 9535a31..ccf3907 100644 --- a/client/proxy/xtcp.go +++ b/client/proxy/xtcp.go @@ -17,6 +17,7 @@ package proxy import ( "io" "net" + "reflect" "time" fmux "github.com/hashicorp/yamux" @@ -25,32 +26,28 @@ import ( "github.com/fatedier/frp/pkg/config" "github.com/fatedier/frp/pkg/msg" "github.com/fatedier/frp/pkg/nathole" - plugin "github.com/fatedier/frp/pkg/plugin/client" "github.com/fatedier/frp/pkg/transport" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" ) -// XTCP +func init() { + RegisterProxyFactory(reflect.TypeOf(&config.XTCPProxyConf{}), NewXTCPProxy) +} + type XTCPProxy struct { *BaseProxy - cfg *config.XTCPProxyConf - proxyPlugin plugin.Plugin + cfg *config.XTCPProxyConf } -func (pxy *XTCPProxy) Run() (err error) { - if pxy.cfg.Plugin != "" { - pxy.proxyPlugin, err = plugin.Create(pxy.cfg.Plugin, pxy.cfg.PluginParams) - if err != nil { - return - } +func NewXTCPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy { + unwrapped, ok := cfg.(*config.XTCPProxyConf) + if !ok { + return nil } - return -} - -func (pxy *XTCPProxy) Close() { - if pxy.proxyPlugin != nil { - pxy.proxyPlugin.Close() + return &XTCPProxy{ + BaseProxy: baseProxy, + cfg: unwrapped, } } @@ -64,6 +61,7 @@ func (pxy *XTCPProxy) InWorkConn(conn net.Conn, startWorkConnMsg *msg.StartWorkC return } + xl.Trace("nathole prepare start") prepareResult, err := nathole.Prepare([]string{pxy.clientCfg.NatHoleSTUNServer}) if err != nil { xl.Warn("nathole prepare error: %v", err) @@ -83,6 +81,7 @@ func (pxy *XTCPProxy) InWorkConn(conn net.Conn, startWorkConnMsg *msg.StartWorkC AssistedAddrs: prepareResult.AssistedAddrs, } + xl.Trace("nathole exchange info start") natHoleRespMsg, err := nathole.ExchangeInfo(pxy.ctx, pxy.msgTransporter, transactionID, natHoleClientMsg, 5*time.Second) if err != nil { xl.Warn("nathole exchange info error: %v", err) @@ -132,7 +131,7 @@ func (pxy *XTCPProxy) listenByKCP(listenConn *net.UDPConn, raddr *net.UDPAddr, s } defer lConn.Close() - remote, err := frpNet.NewKCPConnFromUDP(lConn, true, raddr.String()) + remote, err := utilnet.NewKCPConnFromUDP(lConn, true, raddr.String()) if err != nil { xl.Warn("create kcp connection from udp connection error: %v", err) return @@ -140,7 +139,7 @@ func (pxy *XTCPProxy) listenByKCP(listenConn *net.UDPConn, raddr *net.UDPAddr, s fmuxCfg := fmux.DefaultConfig() fmuxCfg.KeepAliveInterval = 10 * time.Second - fmuxCfg.MaxStreamWindowSize = 2 * 1024 * 1024 + fmuxCfg.MaxStreamWindowSize = 6 * 1024 * 1024 fmuxCfg.LogOutput = io.Discard session, err := fmux.Server(remote, fmuxCfg) if err != nil { @@ -155,8 +154,7 @@ func (pxy *XTCPProxy) listenByKCP(listenConn *net.UDPConn, raddr *net.UDPAddr, s xl.Error("accept connection error: %v", err) return } - go HandleTCPWorkConnection(pxy.ctx, &pxy.cfg.LocalSvrConf, pxy.proxyPlugin, pxy.cfg.GetBaseInfo(), pxy.limiter, - muxConn, []byte(pxy.cfg.Sk), startWorkConnMsg) + go pxy.HandleTCPWorkConnection(muxConn, startWorkConnMsg, []byte(pxy.cfg.Sk)) } } @@ -194,7 +192,6 @@ func (pxy *XTCPProxy) listenByQUIC(listenConn *net.UDPConn, _ *net.UDPAddr, star _ = c.CloseWithError(0, "") return } - go HandleTCPWorkConnection(pxy.ctx, &pxy.cfg.LocalSvrConf, pxy.proxyPlugin, pxy.cfg.GetBaseInfo(), pxy.limiter, - frpNet.QuicStreamToNetConn(stream, c), []byte(pxy.cfg.Sk), startWorkConnMsg) + go pxy.HandleTCPWorkConnection(utilnet.QuicStreamToNetConn(stream, c), startWorkConnMsg, []byte(pxy.cfg.Sk)) } } diff --git a/client/service.go b/client/service.go index 83439c7..df85c05 100644 --- a/client/service.go +++ b/client/service.go @@ -39,7 +39,7 @@ import ( "github.com/fatedier/frp/pkg/msg" "github.com/fatedier/frp/pkg/transport" "github.com/fatedier/frp/pkg/util/log" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" "github.com/fatedier/frp/pkg/util/util" "github.com/fatedier/frp/pkg/util/version" "github.com/fatedier/frp/pkg/util/xlog" @@ -369,7 +369,8 @@ func (cm *ConnectionManager) OpenConnection() error { } tlsConfig.NextProtos = []string{"frp"} - conn, err := quic.DialAddr( + conn, err := quic.DialAddrContext( + cm.ctx, net.JoinHostPort(cm.cfg.ServerAddr, strconv.Itoa(cm.cfg.ServerPort)), tlsConfig, &quic.Config{ MaxIdleTimeout: time.Duration(cm.cfg.QUICMaxIdleTimeout) * time.Second, @@ -395,6 +396,7 @@ func (cm *ConnectionManager) OpenConnection() error { fmuxCfg := fmux.DefaultConfig() fmuxCfg.KeepAliveInterval = time.Duration(cm.cfg.TCPMuxKeepaliveInterval) * time.Second fmuxCfg.LogOutput = io.Discard + fmuxCfg.MaxStreamWindowSize = 6 * 1024 * 1024 session, err := fmux.Client(conn, fmuxCfg) if err != nil { return err @@ -409,7 +411,7 @@ func (cm *ConnectionManager) Connect() (net.Conn, error) { if err != nil { return nil, err } - return frpNet.QuicStreamToNetConn(stream, cm.quicConn), nil + return utilnet.QuicStreamToNetConn(stream, cm.quicConn), nil } else if cm.muxSession != nil { stream, err := cm.muxSession.OpenStream() if err != nil { @@ -451,7 +453,7 @@ func (cm *ConnectionManager) realConnect() (net.Conn, error) { protocol := cm.cfg.Protocol if protocol == "websocket" { protocol = "tcp" - dialOptions = append(dialOptions, libdial.WithAfterHook(libdial.AfterHook{Hook: frpNet.DialHookWebsocket()})) + dialOptions = append(dialOptions, libdial.WithAfterHook(libdial.AfterHook{Hook: utilnet.DialHookWebsocket()})) } if cm.cfg.ConnectServerLocalIP != "" { dialOptions = append(dialOptions, libdial.WithLocalAddr(cm.cfg.ConnectServerLocalIP)) @@ -464,10 +466,11 @@ func (cm *ConnectionManager) realConnect() (net.Conn, error) { libdial.WithProxyAuth(auth), libdial.WithTLSConfig(tlsConfig), libdial.WithAfterHook(libdial.AfterHook{ - Hook: frpNet.DialHookCustomTLSHeadByte(tlsConfig != nil, cm.cfg.DisableCustomTLSFirstByte), + Hook: utilnet.DialHookCustomTLSHeadByte(tlsConfig != nil, cm.cfg.DisableCustomTLSFirstByte), }), ) - conn, err := libdial.Dial( + conn, err := libdial.DialContext( + cm.ctx, net.JoinHostPort(cm.cfg.ServerAddr, strconv.Itoa(cm.cfg.ServerPort)), dialOptions..., ) diff --git a/client/visitor/stcp.go b/client/visitor/stcp.go index 2a7cf64..2ea27f3 100644 --- a/client/visitor/stcp.go +++ b/client/visitor/stcp.go @@ -20,7 +20,7 @@ import ( "strconv" "time" - frpIo "github.com/fatedier/golib/io" + libio "github.com/fatedier/golib/io" "github.com/fatedier/frp/pkg/config" "github.com/fatedier/frp/pkg/msg" @@ -35,17 +35,20 @@ type STCPVisitor struct { } func (sv *STCPVisitor) Run() (err error) { - sv.l, err = net.Listen("tcp", net.JoinHostPort(sv.cfg.BindAddr, strconv.Itoa(sv.cfg.BindPort))) - if err != nil { - return + if sv.cfg.BindPort > 0 { + sv.l, err = net.Listen("tcp", net.JoinHostPort(sv.cfg.BindAddr, strconv.Itoa(sv.cfg.BindPort))) + if err != nil { + return + } + go sv.worker() } - go sv.worker() + go sv.internalConnWorker() return } func (sv *STCPVisitor) Close() { - sv.l.Close() + sv.BaseVisitor.Close() } func (sv *STCPVisitor) worker() { @@ -56,7 +59,18 @@ func (sv *STCPVisitor) worker() { xl.Warn("stcp local listener closed") return } + go sv.handleConn(conn) + } +} +func (sv *STCPVisitor) internalConnWorker() { + xl := xlog.FromContextSafe(sv.ctx) + for { + conn, err := sv.internalLn.Accept() + if err != nil { + xl.Warn("stcp internal listener closed") + return + } go sv.handleConn(conn) } } @@ -66,7 +80,7 @@ func (sv *STCPVisitor) handleConn(userConn net.Conn) { defer userConn.Close() xl.Debug("get a new stcp user connection") - visitorConn, err := sv.connectServer() + visitorConn, err := sv.helper.ConnectServer() if err != nil { return } @@ -74,6 +88,7 @@ func (sv *STCPVisitor) handleConn(userConn net.Conn) { now := time.Now().Unix() newVisitorConnMsg := &msg.NewVisitorConn{ + RunID: sv.helper.RunID(), ProxyName: sv.cfg.ServerName, SignKey: util.GetAuthKey(sv.cfg.Sk, now), Timestamp: now, @@ -103,7 +118,7 @@ func (sv *STCPVisitor) handleConn(userConn net.Conn) { var remote io.ReadWriteCloser remote = visitorConn if sv.cfg.UseEncryption { - remote, err = frpIo.WithEncryption(remote, []byte(sv.cfg.Sk)) + remote, err = libio.WithEncryption(remote, []byte(sv.cfg.Sk)) if err != nil { xl.Error("create encryption stream error: %v", err) return @@ -111,8 +126,8 @@ func (sv *STCPVisitor) handleConn(userConn net.Conn) { } if sv.cfg.UseCompression { - remote = frpIo.WithCompression(remote) + remote = libio.WithCompression(remote) } - frpIo.Join(userConn, remote) + libio.Join(userConn, remote) } diff --git a/client/visitor/sudp.go b/client/visitor/sudp.go index cd6f2af..5b2d517 100644 --- a/client/visitor/sudp.go +++ b/client/visitor/sudp.go @@ -23,12 +23,12 @@ import ( "time" "github.com/fatedier/golib/errors" - frpIo "github.com/fatedier/golib/io" + libio "github.com/fatedier/golib/io" "github.com/fatedier/frp/pkg/config" "github.com/fatedier/frp/pkg/msg" "github.com/fatedier/frp/pkg/proto/udp" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" "github.com/fatedier/frp/pkg/util/util" "github.com/fatedier/frp/pkg/util/xlog" ) @@ -199,13 +199,14 @@ func (sv *SUDPVisitor) worker(workConn net.Conn, firstPacket *msg.UDPPacket) { func (sv *SUDPVisitor) getNewVisitorConn() (net.Conn, error) { xl := xlog.FromContextSafe(sv.ctx) - visitorConn, err := sv.connectServer() + visitorConn, err := sv.helper.ConnectServer() if err != nil { return nil, fmt.Errorf("frpc connect frps error: %v", err) } now := time.Now().Unix() newVisitorConnMsg := &msg.NewVisitorConn{ + RunID: sv.helper.RunID(), ProxyName: sv.cfg.ServerName, SignKey: util.GetAuthKey(sv.cfg.Sk, now), Timestamp: now, @@ -232,16 +233,16 @@ func (sv *SUDPVisitor) getNewVisitorConn() (net.Conn, error) { var remote io.ReadWriteCloser remote = visitorConn if sv.cfg.UseEncryption { - remote, err = frpIo.WithEncryption(remote, []byte(sv.cfg.Sk)) + remote, err = libio.WithEncryption(remote, []byte(sv.cfg.Sk)) if err != nil { xl.Error("create encryption stream error: %v", err) return nil, err } } if sv.cfg.UseCompression { - remote = frpIo.WithCompression(remote) + remote = libio.WithCompression(remote) } - return frpNet.WrapReadWriteCloserToConn(remote, visitorConn), nil + return utilnet.WrapReadWriteCloserToConn(remote, visitorConn), nil } func (sv *SUDPVisitor) Close() { @@ -254,6 +255,7 @@ func (sv *SUDPVisitor) Close() { default: close(sv.checkCloseCh) } + sv.BaseVisitor.Close() if sv.udpConn != nil { sv.udpConn.Close() } diff --git a/client/visitor/visitor.go b/client/visitor/visitor.go index 1f6471d..7020df6 100644 --- a/client/visitor/visitor.go +++ b/client/visitor/visitor.go @@ -21,12 +21,27 @@ import ( "github.com/fatedier/frp/pkg/config" "github.com/fatedier/frp/pkg/transport" + utilnet "github.com/fatedier/frp/pkg/util/net" "github.com/fatedier/frp/pkg/util/xlog" ) +// Helper wrapps some functions for visitor to use. +type Helper interface { + // ConnectServer directly connects to the frp server. + ConnectServer() (net.Conn, error) + // TransferConn transfers the connection to another visitor. + TransferConn(string, net.Conn) error + // MsgTransporter returns the message transporter that is used to send and receive messages + // to the frp server through the controller. + MsgTransporter() transport.MessageTransporter + // RunID returns the run id of current controller. + RunID() string +} + // Visitor is used for forward traffics from local port tot remote service. type Visitor interface { Run() error + AcceptConn(conn net.Conn) error Close() } @@ -34,15 +49,14 @@ func NewVisitor( ctx context.Context, cfg config.VisitorConf, clientCfg config.ClientCommonConf, - connectServer func() (net.Conn, error), - msgTransporter transport.MessageTransporter, + helper Helper, ) (visitor Visitor) { - xl := xlog.FromContextSafe(ctx).Spawn().AppendPrefix(cfg.GetBaseInfo().ProxyName) + xl := xlog.FromContextSafe(ctx).Spawn().AppendPrefix(cfg.GetBaseConfig().ProxyName) baseVisitor := BaseVisitor{ - clientCfg: clientCfg, - connectServer: connectServer, - msgTransporter: msgTransporter, - ctx: xlog.NewContext(ctx, xl), + clientCfg: clientCfg, + helper: helper, + ctx: xlog.NewContext(ctx, xl), + internalLn: utilnet.NewInternalListener(), } switch cfg := cfg.(type) { case *config.STCPVisitorConf: @@ -67,11 +81,24 @@ func NewVisitor( } type BaseVisitor struct { - clientCfg config.ClientCommonConf - connectServer func() (net.Conn, error) - msgTransporter transport.MessageTransporter - l net.Listener + clientCfg config.ClientCommonConf + helper Helper + l net.Listener + internalLn *utilnet.InternalListener mu sync.RWMutex ctx context.Context } + +func (v *BaseVisitor) AcceptConn(conn net.Conn) error { + return v.internalLn.PutConn(conn) +} + +func (v *BaseVisitor) Close() { + if v.l != nil { + v.l.Close() + } + if v.internalLn != nil { + v.internalLn.Close() + } +} diff --git a/client/visitor/visitor_manager.go b/client/visitor/visitor_manager.go index 02b7e49..344101a 100644 --- a/client/visitor/visitor_manager.go +++ b/client/visitor/visitor_manager.go @@ -16,7 +16,9 @@ package visitor import ( "context" + "fmt" "net" + "reflect" "sync" "time" @@ -26,15 +28,14 @@ import ( ) type Manager struct { - clientCfg config.ClientCommonConf - connectServer func() (net.Conn, error) - msgTransporter transport.MessageTransporter - cfgs map[string]config.VisitorConf - visitors map[string]Visitor + clientCfg config.ClientCommonConf + cfgs map[string]config.VisitorConf + visitors map[string]Visitor + helper Helper checkInterval time.Duration - mu sync.Mutex + mu sync.RWMutex ctx context.Context stopCh chan struct{} @@ -42,20 +43,26 @@ type Manager struct { func NewManager( ctx context.Context, + runID string, clientCfg config.ClientCommonConf, connectServer func() (net.Conn, error), msgTransporter transport.MessageTransporter, ) *Manager { - return &Manager{ - clientCfg: clientCfg, - connectServer: connectServer, - msgTransporter: msgTransporter, - cfgs: make(map[string]config.VisitorConf), - visitors: make(map[string]Visitor), - checkInterval: 10 * time.Second, - ctx: ctx, - stopCh: make(chan struct{}), + m := &Manager{ + clientCfg: clientCfg, + cfgs: make(map[string]config.VisitorConf), + visitors: make(map[string]Visitor), + checkInterval: 10 * time.Second, + ctx: ctx, + stopCh: make(chan struct{}), } + m.helper = &visitorHelperImpl{ + connectServerFn: connectServer, + msgTransporter: msgTransporter, + transferConnFn: m.TransferConn, + runID: runID, + } + return m } func (vm *Manager) Run() { @@ -72,7 +79,7 @@ func (vm *Manager) Run() { case <-ticker.C: vm.mu.Lock() for _, cfg := range vm.cfgs { - name := cfg.GetBaseInfo().ProxyName + name := cfg.GetBaseConfig().ProxyName if _, exist := vm.visitors[name]; !exist { xl.Info("try to start visitor [%s]", name) _ = vm.startVisitor(cfg) @@ -83,11 +90,24 @@ func (vm *Manager) Run() { } } +func (vm *Manager) Close() { + vm.mu.Lock() + defer vm.mu.Unlock() + for _, v := range vm.visitors { + v.Close() + } + select { + case <-vm.stopCh: + default: + close(vm.stopCh) + } +} + // Hold lock before calling this function. func (vm *Manager) startVisitor(cfg config.VisitorConf) (err error) { xl := xlog.FromContextSafe(vm.ctx) - name := cfg.GetBaseInfo().ProxyName - visitor := NewVisitor(vm.ctx, cfg, vm.clientCfg, vm.connectServer, vm.msgTransporter) + name := cfg.GetBaseConfig().ProxyName + visitor := NewVisitor(vm.ctx, cfg, vm.clientCfg, vm.helper) err = visitor.Run() if err != nil { xl.Warn("start error: %v", err) @@ -107,9 +127,7 @@ func (vm *Manager) Reload(cfgs map[string]config.VisitorConf) { for name, oldCfg := range vm.cfgs { del := false cfg, ok := cfgs[name] - if !ok { - del = true - } else if !oldCfg.Compare(cfg) { + if !ok || !reflect.DeepEqual(oldCfg, cfg) { del = true } @@ -139,15 +157,36 @@ func (vm *Manager) Reload(cfgs map[string]config.VisitorConf) { } } -func (vm *Manager) Close() { - vm.mu.Lock() - defer vm.mu.Unlock() - for _, v := range vm.visitors { - v.Close() - } - select { - case <-vm.stopCh: - default: - close(vm.stopCh) +// TransferConn transfers a connection to a visitor. +func (vm *Manager) TransferConn(name string, conn net.Conn) error { + vm.mu.RLock() + defer vm.mu.RUnlock() + v, ok := vm.visitors[name] + if !ok { + return fmt.Errorf("visitor [%s] not found", name) } + return v.AcceptConn(conn) +} + +type visitorHelperImpl struct { + connectServerFn func() (net.Conn, error) + msgTransporter transport.MessageTransporter + transferConnFn func(name string, conn net.Conn) error + runID string +} + +func (v *visitorHelperImpl) ConnectServer() (net.Conn, error) { + return v.connectServerFn() +} + +func (v *visitorHelperImpl) TransferConn(name string, conn net.Conn) error { + return v.transferConnFn(name, conn) +} + +func (v *visitorHelperImpl) MsgTransporter() transport.MessageTransporter { + return v.msgTransporter +} + +func (v *visitorHelperImpl) RunID() string { + return v.runID } diff --git a/client/visitor/xtcp.go b/client/visitor/xtcp.go index 6ace768..9f83b39 100644 --- a/client/visitor/xtcp.go +++ b/client/visitor/xtcp.go @@ -24,7 +24,7 @@ import ( "sync" "time" - frpIo "github.com/fatedier/golib/io" + libio "github.com/fatedier/golib/io" fmux "github.com/hashicorp/yamux" quic "github.com/quic-go/quic-go" "golang.org/x/time/rate" @@ -33,7 +33,7 @@ import ( "github.com/fatedier/frp/pkg/msg" "github.com/fatedier/frp/pkg/nathole" "github.com/fatedier/frp/pkg/transport" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" "github.com/fatedier/frp/pkg/util/util" "github.com/fatedier/frp/pkg/util/xlog" ) @@ -59,12 +59,15 @@ func (sv *XTCPVisitor) Run() (err error) { sv.session = NewQUICTunnelSession(&sv.clientCfg) } - sv.l, err = net.Listen("tcp", net.JoinHostPort(sv.cfg.BindAddr, strconv.Itoa(sv.cfg.BindPort))) - if err != nil { - return + if sv.cfg.BindPort > 0 { + sv.l, err = net.Listen("tcp", net.JoinHostPort(sv.cfg.BindAddr, strconv.Itoa(sv.cfg.BindPort))) + if err != nil { + return + } + go sv.worker() } - go sv.worker() + go sv.internalConnWorker() go sv.processTunnelStartEvents() if sv.cfg.KeepTunnelOpen { sv.retryLimiter = rate.NewLimiter(rate.Every(time.Hour/time.Duration(sv.cfg.MaxRetriesAnHour)), sv.cfg.MaxRetriesAnHour) @@ -74,8 +77,12 @@ func (sv *XTCPVisitor) Run() (err error) { } func (sv *XTCPVisitor) Close() { - sv.l.Close() - sv.cancel() + sv.mu.Lock() + defer sv.mu.Unlock() + sv.BaseVisitor.Close() + if sv.cancel != nil { + sv.cancel() + } if sv.session != nil { sv.session.Close() } @@ -89,7 +96,18 @@ func (sv *XTCPVisitor) worker() { xl.Warn("xtcp local listener closed") return } + go sv.handleConn(conn) + } +} +func (sv *XTCPVisitor) internalConnWorker() { + xl := xlog.FromContextSafe(sv.ctx) + for { + conn, err := sv.internalLn.Accept() + if err != nil { + xl.Warn("xtcp internal listener closed") + return + } go sv.handleConn(conn) } } @@ -139,31 +157,53 @@ func (sv *XTCPVisitor) keepTunnelOpenWorker() { func (sv *XTCPVisitor) handleConn(userConn net.Conn) { xl := xlog.FromContextSafe(sv.ctx) - defer userConn.Close() + isConnTrasfered := false + defer func() { + if !isConnTrasfered { + userConn.Close() + } + }() xl.Debug("get a new xtcp user connection") // Open a tunnel connection to the server. If there is already a successful hole-punching connection, // it will be reused. Otherwise, it will block and wait for a successful hole-punching connection until timeout. - tunnelConn, err := sv.openTunnel() + ctx := context.Background() + if sv.cfg.FallbackTo != "" { + timeoutCtx, cancel := context.WithTimeout(ctx, time.Duration(sv.cfg.FallbackTimeoutMs)*time.Millisecond) + defer cancel() + ctx = timeoutCtx + } + tunnelConn, err := sv.openTunnel(ctx) if err != nil { xl.Error("open tunnel error: %v", err) + // no fallback, just return + if sv.cfg.FallbackTo == "" { + return + } + + xl.Debug("try to transfer connection to visitor: %s", sv.cfg.FallbackTo) + if err := sv.helper.TransferConn(sv.cfg.FallbackTo, userConn); err != nil { + xl.Error("transfer connection to visitor %s error: %v", sv.cfg.FallbackTo, err) + return + } + isConnTrasfered = true return } var muxConnRWCloser io.ReadWriteCloser = tunnelConn if sv.cfg.UseEncryption { - muxConnRWCloser, err = frpIo.WithEncryption(muxConnRWCloser, []byte(sv.cfg.Sk)) + muxConnRWCloser, err = libio.WithEncryption(muxConnRWCloser, []byte(sv.cfg.Sk)) if err != nil { xl.Error("create encryption stream error: %v", err) return } } if sv.cfg.UseCompression { - muxConnRWCloser = frpIo.WithCompression(muxConnRWCloser) + muxConnRWCloser = libio.WithCompression(muxConnRWCloser) } - _, _, errs := frpIo.Join(userConn, muxConnRWCloser) + _, _, errs := libio.Join(userConn, muxConnRWCloser) xl.Debug("join connections closed") if len(errs) > 0 { xl.Trace("join connections errors: %v", errs) @@ -171,7 +211,7 @@ func (sv *XTCPVisitor) handleConn(userConn net.Conn) { } // openTunnel will open a tunnel connection to the target server. -func (sv *XTCPVisitor) openTunnel() (conn net.Conn, err error) { +func (sv *XTCPVisitor) openTunnel(ctx context.Context) (conn net.Conn, err error) { xl := xlog.FromContextSafe(sv.ctx) ticker := time.NewTicker(500 * time.Millisecond) defer ticker.Stop() @@ -185,6 +225,8 @@ func (sv *XTCPVisitor) openTunnel() (conn net.Conn, err error) { select { case <-sv.ctx.Done(): return nil, sv.ctx.Err() + case <-ctx.Done(): + return nil, ctx.Err() case <-immediateTrigger: conn, err = sv.getTunnelConn() case <-ticker.C: @@ -224,11 +266,13 @@ func (sv *XTCPVisitor) getTunnelConn() (net.Conn, error) { // 4. Create a tunnel session using an underlying UDP connection. func (sv *XTCPVisitor) makeNatHole() { xl := xlog.FromContextSafe(sv.ctx) - if err := nathole.PreCheck(sv.ctx, sv.msgTransporter, sv.cfg.ServerName, 5*time.Second); err != nil { + xl.Trace("makeNatHole start") + if err := nathole.PreCheck(sv.ctx, sv.helper.MsgTransporter(), sv.cfg.ServerName, 5*time.Second); err != nil { xl.Warn("nathole precheck error: %v", err) return } + xl.Trace("nathole prepare start") prepareResult, err := nathole.Prepare([]string{sv.clientCfg.NatHoleSTUNServer}) if err != nil { xl.Warn("nathole prepare error: %v", err) @@ -252,7 +296,8 @@ func (sv *XTCPVisitor) makeNatHole() { AssistedAddrs: prepareResult.AssistedAddrs, } - natHoleRespMsg, err := nathole.ExchangeInfo(sv.ctx, sv.msgTransporter, transactionID, natHoleVisitorMsg, 5*time.Second) + xl.Trace("nathole exchange info start") + natHoleRespMsg, err := nathole.ExchangeInfo(sv.ctx, sv.helper.MsgTransporter(), transactionID, natHoleVisitorMsg, 5*time.Second) if err != nil { listenConn.Close() xl.Warn("nathole exchange info error: %v", err) @@ -302,14 +347,14 @@ func (ks *KCPTunnelSession) Init(listenConn *net.UDPConn, raddr *net.UDPAddr) er if err != nil { return fmt.Errorf("dial udp error: %v", err) } - remote, err := frpNet.NewKCPConnFromUDP(lConn, true, raddr.String()) + remote, err := utilnet.NewKCPConnFromUDP(lConn, true, raddr.String()) if err != nil { return fmt.Errorf("create kcp connection from udp connection error: %v", err) } fmuxCfg := fmux.DefaultConfig() fmuxCfg.KeepAliveInterval = 10 * time.Second - fmuxCfg.MaxStreamWindowSize = 2 * 1024 * 1024 + fmuxCfg.MaxStreamWindowSize = 6 * 1024 * 1024 fmuxCfg.LogOutput = io.Discard session, err := fmux.Client(remote, fmuxCfg) if err != nil { @@ -393,7 +438,7 @@ func (qs *QUICTunnelSession) OpenConn(ctx context.Context) (net.Conn, error) { if err != nil { return nil, err } - return frpNet.QuicStreamToNetConn(stream, session), nil + return utilnet.QuicStreamToNetConn(stream, session), nil } func (qs *QUICTunnelSession) Close() { diff --git a/cmd/frpc/sub/http.go b/cmd/frpc/sub/http.go index 22eeefe..1d15258 100644 --- a/cmd/frpc/sub/http.go +++ b/cmd/frpc/sub/http.go @@ -79,7 +79,7 @@ var httpCmd = &cobra.Command{ } cfg.BandwidthLimitMode = bandwidthLimitMode - err = cfg.CheckForCli() + err = cfg.ValidateForClient() if err != nil { fmt.Println(err) os.Exit(1) diff --git a/cmd/frpc/sub/https.go b/cmd/frpc/sub/https.go index 187aa99..2eb6ed6 100644 --- a/cmd/frpc/sub/https.go +++ b/cmd/frpc/sub/https.go @@ -71,7 +71,7 @@ var httpsCmd = &cobra.Command{ } cfg.BandwidthLimitMode = bandwidthLimitMode - err = cfg.CheckForCli() + err = cfg.ValidateForClient() if err != nil { fmt.Println(err) os.Exit(1) diff --git a/cmd/frpc/sub/root.go b/cmd/frpc/sub/root.go index 8271d06..515a193 100644 --- a/cmd/frpc/sub/root.go +++ b/cmd/frpc/sub/root.go @@ -94,7 +94,7 @@ func RegisterCommonFlags(cmd *cobra.Command) { cmd.PersistentFlags().StringVarP(&logFile, "log_file", "", "console", "console or file path") cmd.PersistentFlags().IntVarP(&logMaxDays, "log_max_days", "", 3, "log file reversed days") cmd.PersistentFlags().BoolVarP(&disableLogColor, "disable_log_color", "", false, "disable log color in console") - cmd.PersistentFlags().BoolVarP(&tlsEnable, "tls_enable", "", false, "enable frpc tls") + cmd.PersistentFlags().BoolVarP(&tlsEnable, "tls_enable", "", true, "enable frpc tls") cmd.PersistentFlags().StringVarP(&dnsServer, "dns_server", "", "", "specify dns server instead of using system default one") } @@ -117,7 +117,6 @@ var rootCmd = &cobra.Command{ // Do not show command usage here. err := runClient(cfgFile) if err != nil { - fmt.Println(err) os.Exit(1) } return nil @@ -199,6 +198,7 @@ func parseClientCommonCfgFromCmd() (cfg config.ClientCommonConf, err error) { func runClient(cfgFilePath string) error { cfg, pxyCfgs, visitorCfgs, err := config.ParseClientConfig(cfgFilePath) if err != nil { + fmt.Println(err) return err } return startService(cfg, pxyCfgs, visitorCfgs, cfgFilePath) @@ -214,8 +214,8 @@ func startService( cfg.LogMaxDays, cfg.DisableLogColor) if cfgFile != "" { - log.Trace("start frpc service for config file [%s]", cfgFile) - defer log.Trace("frpc service for config file [%s] stopped", cfgFile) + log.Info("start frpc service for config file [%s]", cfgFile) + defer log.Info("frpc service for config file [%s] stopped", cfgFile) } svr, errRet := client.NewService(cfg, pxyCfgs, visitorCfgs, cfgFile) if errRet != nil { diff --git a/cmd/frpc/sub/stcp.go b/cmd/frpc/sub/stcp.go index ad0a57c..24aa955 100644 --- a/cmd/frpc/sub/stcp.go +++ b/cmd/frpc/sub/stcp.go @@ -78,7 +78,7 @@ var stcpCmd = &cobra.Command{ os.Exit(1) } cfg.BandwidthLimitMode = bandwidthLimitMode - err = cfg.CheckForCli() + err = cfg.ValidateForClient() if err != nil { fmt.Println(err) os.Exit(1) @@ -95,7 +95,7 @@ var stcpCmd = &cobra.Command{ cfg.ServerName = serverName cfg.BindAddr = bindAddr cfg.BindPort = bindPort - err = cfg.Check() + err = cfg.Validate() if err != nil { fmt.Println(err) os.Exit(1) diff --git a/cmd/frpc/sub/sudp.go b/cmd/frpc/sub/sudp.go index 0ae8498..553e425 100644 --- a/cmd/frpc/sub/sudp.go +++ b/cmd/frpc/sub/sudp.go @@ -78,7 +78,7 @@ var sudpCmd = &cobra.Command{ os.Exit(1) } cfg.BandwidthLimitMode = bandwidthLimitMode - err = cfg.CheckForCli() + err = cfg.ValidateForClient() if err != nil { fmt.Println(err) os.Exit(1) @@ -95,7 +95,7 @@ var sudpCmd = &cobra.Command{ cfg.ServerName = serverName cfg.BindAddr = bindAddr cfg.BindPort = bindPort - err = cfg.Check() + err = cfg.Validate() if err != nil { fmt.Println(err) os.Exit(1) diff --git a/cmd/frpc/sub/tcp.go b/cmd/frpc/sub/tcp.go index 2c597f1..2da9ad6 100644 --- a/cmd/frpc/sub/tcp.go +++ b/cmd/frpc/sub/tcp.go @@ -68,7 +68,7 @@ var tcpCmd = &cobra.Command{ } cfg.BandwidthLimitMode = bandwidthLimitMode - err = cfg.CheckForCli() + err = cfg.ValidateForClient() if err != nil { fmt.Println(err) os.Exit(1) diff --git a/cmd/frpc/sub/tcpmux.go b/cmd/frpc/sub/tcpmux.go index ecdd600..4b993f9 100644 --- a/cmd/frpc/sub/tcpmux.go +++ b/cmd/frpc/sub/tcpmux.go @@ -73,7 +73,7 @@ var tcpMuxCmd = &cobra.Command{ } cfg.BandwidthLimitMode = bandwidthLimitMode - err = cfg.CheckForCli() + err = cfg.ValidateForClient() if err != nil { fmt.Println(err) os.Exit(1) diff --git a/cmd/frpc/sub/udp.go b/cmd/frpc/sub/udp.go index f9dfa3f..9a4803d 100644 --- a/cmd/frpc/sub/udp.go +++ b/cmd/frpc/sub/udp.go @@ -68,7 +68,7 @@ var udpCmd = &cobra.Command{ } cfg.BandwidthLimitMode = bandwidthLimitMode - err = cfg.CheckForCli() + err = cfg.ValidateForClient() if err != nil { fmt.Println(err) os.Exit(1) diff --git a/cmd/frpc/sub/xtcp.go b/cmd/frpc/sub/xtcp.go index ea201d5..60483af 100644 --- a/cmd/frpc/sub/xtcp.go +++ b/cmd/frpc/sub/xtcp.go @@ -78,7 +78,7 @@ var xtcpCmd = &cobra.Command{ os.Exit(1) } cfg.BandwidthLimitMode = bandwidthLimitMode - err = cfg.CheckForCli() + err = cfg.ValidateForClient() if err != nil { fmt.Println(err) os.Exit(1) @@ -95,7 +95,7 @@ var xtcpCmd = &cobra.Command{ cfg.ServerName = serverName cfg.BindAddr = bindAddr cfg.BindPort = bindPort - err = cfg.Check() + err = cfg.Validate() if err != nil { fmt.Println(err) os.Exit(1) diff --git a/conf/frpc_full.ini b/conf/frpc_full.ini index e18d2a0..4982f4f 100644 --- a/conf/frpc_full.ini +++ b/conf/frpc_full.ini @@ -107,7 +107,8 @@ connect_server_local_ip = 0.0.0.0 # quic_max_idle_timeout = 30 # quic_max_incoming_streams = 100000 -# if tls_enable is true, frpc will connect frps by tls +# If tls_enable is true, frpc will connect frps by tls. +# Since v0.50.0, the default value has been changed to true, and tls is enabled by default. tls_enable = true # tls_cert_file = client.crt @@ -140,9 +141,10 @@ udp_packet_size = 1500 # include other config files for proxies. # includes = ./confd/*.ini -# By default, frpc will connect frps with first custom byte if tls is enabled. -# If DisableCustomTLSFirstByte is true, frpc will not send that custom byte. -disable_custom_tls_first_byte = false +# If the disable_custom_tls_first_byte is set to false, frpc will establish a connection with frps using the +# first custom byte when tls is enabled. +# Since v0.50.0, the default value has been changed to true, and the first custom byte is disabled by default. +disable_custom_tls_first_byte = true # Enable golang pprof handlers in admin listener. # Admin port must be set first. @@ -326,6 +328,9 @@ local_ip = 127.0.0.1 local_port = 22 use_encryption = false use_compression = false +# If not empty, only visitors from specified users can connect. +# Otherwise, visitors from same user can connect. '*' means allow all users. +allow_users = * # user of frpc should be same in both stcp server and stcp visitor [secret_tcp_visitor] @@ -337,6 +342,8 @@ server_name = secret_tcp sk = abcdefg # connect this address to visitor stcp server bind_addr = 127.0.0.1 +# bind_port can be less than 0, it means don't bind to the port and only receive connections redirected from +# other visitors. (This is not supported for SUDP now) bind_port = 9000 use_encryption = false use_compression = false @@ -348,13 +355,20 @@ local_ip = 127.0.0.1 local_port = 22 use_encryption = false use_compression = false +# If not empty, only visitors from specified users can connect. +# Otherwise, visitors from same user can connect. '*' means allow all users. +allow_users = user1, user2 [p2p_tcp_visitor] role = visitor type = xtcp +# if the server user is not set, it defaults to the current user +server_user = user1 server_name = p2p_tcp sk = abcdefg bind_addr = 127.0.0.1 +# bind_port can be less than 0, it means don't bind to the port and only receive connections redirected from +# other visitors. (This is not supported for SUDP now) bind_port = 9001 use_encryption = false use_compression = false @@ -363,6 +377,8 @@ keep_tunnel_open = false # effective when keep_tunnel_open is set to true, the number of attempts to punch through per hour max_retries_an_hour = 8 min_retry_interval = 90 +# fallback_to = stcp_visitor +# fallback_timeout_ms = 500 [tcpmuxhttpconnect] type = tcpmux diff --git a/hack/download.sh b/hack/download.sh new file mode 100755 index 0000000..acdf033 --- /dev/null +++ b/hack/download.sh @@ -0,0 +1,63 @@ +#!/bin/sh + +OS="$(go env GOOS)" +ARCH="$(go env GOARCH)" + +if [ "${TARGET_OS}" ]; then + OS="${TARGET_OS}" +fi +if [ "${TARGET_ARCH}" ]; then + ARCH="${TARGET_ARCH}" +fi + +# Determine the latest version by version number ignoring alpha, beta, and rc versions. +if [ "${FRP_VERSION}" = "" ] ; then + FRP_VERSION="$(curl -sL https://github.com/fatedier/frp/releases | \ + grep -o 'releases/tag/v[0-9]*.[0-9]*.[0-9]*"' | sort -V | \ + tail -1 | awk -F'/' '{ print $3}')" + FRP_VERSION="${FRP_VERSION%?}" + FRP_VERSION="${FRP_VERSION#?}" +fi + +if [ "${FRP_VERSION}" = "" ] ; then + printf "Unable to get latest frp version. Set FRP_VERSION env var and re-run. For example: export FRP_VERSION=1.0.0" + exit 1; +fi + +SUFFIX=".tar.gz" +if [ "${OS}" = "windows" ] ; then + SUFFIX=".zip" +fi +NAME="frp_${FRP_VERSION}_${OS}_${ARCH}${SUFFIX}" +DIR_NAME="frp_${FRP_VERSION}_${OS}_${ARCH}" +URL="https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/${NAME}" + +download_and_extract() { + printf "Downloading %s from %s ...\n" "$NAME" "${URL}" + if ! curl -o /dev/null -sIf "${URL}"; then + printf "\n%s is not found, please specify a valid FRP_VERSION\n" "${URL}" + exit 1 + fi + curl -fsLO "${URL}" + filename=$NAME + + if [ "${OS}" = "windows" ]; then + unzip "${filename}" + else + tar -xzf "${filename}" + fi + rm "${filename}" + + if [ "${TARGET_DIRNAME}" ]; then + mv "${DIR_NAME}" "${TARGET_DIRNAME}" + DIR_NAME="${TARGET_DIRNAME}" + fi +} + +download_and_extract + +printf "" +printf "\nfrp %s Download Complete!\n" "$FRP_VERSION" +printf "\n" +printf "frp has been successfully downloaded into the %s folder on your system.\n" "$DIR_NAME" +printf "\n" diff --git a/hack/run-e2e.sh b/hack/run-e2e.sh index e5dfecf..953df0e 100755 --- a/hack/run-e2e.sh +++ b/hack/run-e2e.sh @@ -1,20 +1,30 @@ -#!/usr/bin/env bash +#!/bin/sh -ROOT=$(unset CDPATH && cd $(dirname "${BASH_SOURCE[0]}")/.. && pwd) +SCRIPT=$(readlink -f "$0") +ROOT=$(unset CDPATH && cd "$(dirname "$SCRIPT")/.." && pwd) -which ginkgo &> /dev/null -if [ $? -ne 0 ]; then +ginkgo_command=$(which ginkgo 2>/dev/null) +if [ -z "$ginkgo_command" ]; then echo "ginkgo not found, try to install..." go install github.com/onsi/ginkgo/v2/ginkgo@v2.8.3 fi debug=false -if [ x${DEBUG} == x"true" ]; then +if [ "x${DEBUG}" = "xtrue" ]; then debug=true fi logLevel=debug -if [ x${LOG_LEVEL} != x"" ]; then - logLevel=${LOG_LEVEL} +if [ "${LOG_LEVEL}" ]; then + logLevel="${LOG_LEVEL}" fi -ginkgo -nodes=8 --poll-progress-after=30s ${ROOT}/test/e2e -- -frpc-path=${ROOT}/bin/frpc -frps-path=${ROOT}/bin/frps -log-level=${logLevel} -debug=${debug} +frpcPath=${ROOT}/bin/frpc +if [ "${FRPC_PATH}" ]; then + frpcPath="${FRPC_PATH}" +fi +frpsPath=${ROOT}/bin/frps +if [ "${FRPS_PATH}" ]; then + frpsPath="${FRPS_PATH}" +fi + +ginkgo -nodes=8 --poll-progress-after=60s ${ROOT}/test/e2e -- -frpc-path=${frpcPath} -frps-path=${frpsPath} -log-level=${logLevel} -debug=${debug} diff --git a/pkg/config/client.go b/pkg/config/client.go index 50a46d5..b60e480 100644 --- a/pkg/config/client.go +++ b/pkg/config/client.go @@ -127,6 +127,7 @@ type ClientCommonConf struct { // TLSEnable specifies whether or not TLS should be used when communicating // with the server. If "tls_cert_file" and "tls_key_file" are valid, // client will load the supplied tls configuration. + // Since v0.50.0, the default value has been changed to true, and tls is enabled by default. TLSEnable bool `ini:"tls_enable" json:"tls_enable"` // TLSCertPath specifies the path of the cert file that client will // load. It only works when "tls_enable" is true and "tls_key_file" is valid. @@ -142,8 +143,9 @@ type ClientCommonConf struct { // TLSServerName specifies the custom server name of tls certificate. By // default, server name if same to ServerAddr. TLSServerName string `ini:"tls_server_name" json:"tls_server_name"` - // By default, frpc will connect frps with first custom byte if tls is enabled. - // If DisableCustomTLSFirstByte is true, frpc will not send that custom byte. + // If the disable_custom_tls_first_byte is set to false, frpc will establish a connection with frps using the + // first custom byte when tls is enabled. + // Since v0.50.0, the default value has been changed to true, and the first custom byte is disabled by default. DisableCustomTLSFirstByte bool `ini:"disable_custom_tls_first_byte" json:"disable_custom_tls_first_byte"` // HeartBeatInterval specifies at what interval heartbeats are sent to the // server, in seconds. It is not recommended to change this value. By @@ -168,32 +170,34 @@ type ClientCommonConf struct { // GetDefaultClientConf returns a client configuration with default values. func GetDefaultClientConf() ClientCommonConf { return ClientCommonConf{ - ClientConfig: auth.GetDefaultClientConf(), - ServerAddr: "0.0.0.0", - ServerPort: 7000, - NatHoleSTUNServer: "stun.easyvoip.com:3478", - DialServerTimeout: 10, - DialServerKeepAlive: 7200, - HTTPProxy: os.Getenv("http_proxy"), - LogFile: "console", - LogWay: "console", - LogLevel: "info", - LogMaxDays: 3, - AdminAddr: "127.0.0.1", - PoolCount: 1, - TCPMux: true, - TCPMuxKeepaliveInterval: 60, - LoginFailExit: true, - Start: make([]string, 0), - Protocol: "tcp", - QUICKeepalivePeriod: 10, - QUICMaxIdleTimeout: 30, - QUICMaxIncomingStreams: 100000, - HeartbeatInterval: 30, - HeartbeatTimeout: 90, - Metas: make(map[string]string), - UDPPacketSize: 1500, - IncludeConfigFiles: make([]string, 0), + ClientConfig: auth.GetDefaultClientConf(), + ServerAddr: "0.0.0.0", + ServerPort: 7000, + NatHoleSTUNServer: "stun.easyvoip.com:3478", + DialServerTimeout: 10, + DialServerKeepAlive: 7200, + HTTPProxy: os.Getenv("http_proxy"), + LogFile: "console", + LogWay: "console", + LogLevel: "info", + LogMaxDays: 3, + AdminAddr: "127.0.0.1", + PoolCount: 1, + TCPMux: true, + TCPMuxKeepaliveInterval: 60, + LoginFailExit: true, + Start: make([]string, 0), + Protocol: "tcp", + QUICKeepalivePeriod: 10, + QUICMaxIdleTimeout: 30, + QUICMaxIncomingStreams: 100000, + TLSEnable: true, + DisableCustomTLSFirstByte: true, + HeartbeatInterval: 30, + HeartbeatTimeout: 90, + Metas: make(map[string]string), + UDPPacketSize: 1500, + IncludeConfigFiles: make([]string, 0), } } @@ -352,7 +356,7 @@ func LoadAllProxyConfsFromIni( case "visitor": newConf, newErr := NewVisitorConfFromIni(prefix, name, section) if newErr != nil { - return nil, nil, newErr + return nil, nil, fmt.Errorf("failed to parse visitor %s, err: %v", name, newErr) } visitorConfs[prefix+name] = newConf default: diff --git a/pkg/config/client_test.go b/pkg/config/client_test.go index bff47cd..187324a 100644 --- a/pkg/config/client_test.go +++ b/pkg/config/client_test.go @@ -258,40 +258,41 @@ func Test_LoadClientCommonConf(t *testing.T) { OidcTokenEndpointURL: "endpoint_url", }, }, - ServerAddr: "0.0.0.9", - ServerPort: 7009, - NatHoleSTUNServer: "stun.easyvoip.com:3478", - DialServerTimeout: 10, - DialServerKeepAlive: 7200, - HTTPProxy: "http://user:passwd@192.168.1.128:8080", - LogFile: "./frpc.log9", - LogWay: "file", - LogLevel: "info9", - LogMaxDays: 39, - DisableLogColor: false, - AdminAddr: "127.0.0.9", - AdminPort: 7409, - AdminUser: "admin9", - AdminPwd: "admin9", - AssetsDir: "./static9", - PoolCount: 59, - TCPMux: true, - TCPMuxKeepaliveInterval: 60, - User: "your_name", - LoginFailExit: true, - Protocol: "tcp", - QUICKeepalivePeriod: 10, - QUICMaxIdleTimeout: 30, - QUICMaxIncomingStreams: 100000, - TLSEnable: true, - TLSCertFile: "client.crt", - TLSKeyFile: "client.key", - TLSTrustedCaFile: "ca.crt", - TLSServerName: "example.com", - DNSServer: "8.8.8.9", - Start: []string{"ssh", "dns"}, - HeartbeatInterval: 39, - HeartbeatTimeout: 99, + ServerAddr: "0.0.0.9", + ServerPort: 7009, + NatHoleSTUNServer: "stun.easyvoip.com:3478", + DialServerTimeout: 10, + DialServerKeepAlive: 7200, + HTTPProxy: "http://user:passwd@192.168.1.128:8080", + LogFile: "./frpc.log9", + LogWay: "file", + LogLevel: "info9", + LogMaxDays: 39, + DisableLogColor: false, + AdminAddr: "127.0.0.9", + AdminPort: 7409, + AdminUser: "admin9", + AdminPwd: "admin9", + AssetsDir: "./static9", + PoolCount: 59, + TCPMux: true, + TCPMuxKeepaliveInterval: 60, + User: "your_name", + LoginFailExit: true, + Protocol: "tcp", + QUICKeepalivePeriod: 10, + QUICMaxIdleTimeout: 30, + QUICMaxIncomingStreams: 100000, + TLSEnable: true, + TLSCertFile: "client.crt", + TLSKeyFile: "client.key", + TLSTrustedCaFile: "ca.crt", + TLSServerName: "example.com", + DisableCustomTLSFirstByte: true, + DNSServer: "8.8.8.9", + Start: []string{"ssh", "dns"}, + HeartbeatInterval: 39, + HeartbeatTimeout: 99, Metas: map[string]string{ "var1": "123", "var2": "234", @@ -500,8 +501,10 @@ func Test_LoadClientBasicConf(t *testing.T) { }, BandwidthLimitMode: BandwidthLimitModeClient, }, - Role: "server", - Sk: "abcdefg", + RoleServerCommonConf: RoleServerCommonConf{ + Role: "server", + Sk: "abcdefg", + }, }, testUser + ".p2p_tcp": &XTCPProxyConf{ BaseProxyConf: BaseProxyConf{ @@ -513,8 +516,10 @@ func Test_LoadClientBasicConf(t *testing.T) { }, BandwidthLimitMode: BandwidthLimitModeClient, }, - Role: "server", - Sk: "abcdefg", + RoleServerCommonConf: RoleServerCommonConf{ + Role: "server", + Sk: "abcdefg", + }, }, testUser + ".tcpmuxhttpconnect": &TCPMuxProxyConf{ BaseProxyConf: BaseProxyConf{ @@ -661,9 +666,10 @@ func Test_LoadClientBasicConf(t *testing.T) { BindAddr: "127.0.0.1", BindPort: 9001, }, - Protocol: "quic", - MaxRetriesAnHour: 8, - MinRetryInterval: 90, + Protocol: "quic", + MaxRetriesAnHour: 8, + MinRetryInterval: 90, + FallbackTimeoutMs: 1000, }, } diff --git a/pkg/config/proxy.go b/pkg/config/proxy.go index 133d59e..ae1d077 100644 --- a/pkg/config/proxy.go +++ b/pkg/config/proxy.go @@ -51,13 +51,23 @@ func NewConfByType(proxyType string) ProxyConf { } type ProxyConf interface { - GetBaseInfo() *BaseProxyConf + // GetBaseConfig returns the BaseProxyConf for this config. + GetBaseConfig() *BaseProxyConf + // SetDefaultValues sets the default values for this config. + SetDefaultValues() + // UnmarshalFromMsg unmarshals a msg.NewProxy message into this config. + // This function will be called on the frps side. UnmarshalFromMsg(*msg.NewProxy) + // UnmarshalFromIni unmarshals a ini.Section into this config. This function + // will be called on the frpc side. UnmarshalFromIni(string, string, *ini.Section) error + // MarshalToMsg marshals this config into a msg.NewProxy message. This + // function will be called on the frpc side. MarshalToMsg(*msg.NewProxy) - CheckForCli() error - CheckForSvr(ServerCommonConf) error - Compare(ProxyConf) bool + // ValidateForClient checks that the config is valid for the frpc side. + ValidateForClient() error + // ValidateForServer checks that the config is valid for the frps side. + ValidateForServer(ServerCommonConf) error } // LocalSvrConf configures what location the client will to, or what @@ -158,6 +168,26 @@ type DomainConf struct { SubDomain string `ini:"subdomain" json:"subdomain"` } +type RoleServerCommonConf struct { + Role string `ini:"role" json:"role"` + Sk string `ini:"sk" json:"sk"` + AllowUsers []string `ini:"allow_users" json:"allow_users"` +} + +func (cfg *RoleServerCommonConf) setDefaultValues() { + cfg.Role = "server" +} + +func (cfg *RoleServerCommonConf) marshalToMsg(m *msg.NewProxy) { + m.Sk = cfg.Sk + m.AllowUsers = cfg.AllowUsers +} + +func (cfg *RoleServerCommonConf) unmarshalFromMsg(m *msg.NewProxy) { + cfg.Sk = m.Sk + cfg.AllowUsers = m.AllowUsers +} + // HTTP type HTTPProxyConf struct { BaseProxyConf `ini:",extends"` @@ -183,6 +213,13 @@ type TCPProxyConf struct { RemotePort int `ini:"remote_port" json:"remote_port"` } +// UDP +type UDPProxyConf struct { + BaseProxyConf `ini:",extends"` + + RemotePort int `ini:"remote_port" json:"remote_port"` +} + // TCPMux type TCPMuxProxyConf struct { BaseProxyConf `ini:",extends"` @@ -196,80 +233,30 @@ type TCPMuxProxyConf struct { // STCP type STCPProxyConf struct { - BaseProxyConf `ini:",extends"` - - Role string `ini:"role" json:"role"` - Sk string `ini:"sk" json:"sk"` + BaseProxyConf `ini:",extends"` + RoleServerCommonConf `ini:",extends"` } // XTCP type XTCPProxyConf struct { - BaseProxyConf `ini:",extends"` - - Role string `ini:"role" json:"role"` - Sk string `ini:"sk" json:"sk"` -} - -// UDP -type UDPProxyConf struct { - BaseProxyConf `ini:",extends"` - - RemotePort int `ini:"remote_port" json:"remote_port"` + BaseProxyConf `ini:",extends"` + RoleServerCommonConf `ini:",extends"` } // SUDP type SUDPProxyConf struct { - BaseProxyConf `ini:",extends"` - - Role string `ini:"role" json:"role"` - Sk string `ini:"sk" json:"sk"` + BaseProxyConf `ini:",extends"` + RoleServerCommonConf `ini:",extends"` } // Proxy Conf Loader // DefaultProxyConf creates a empty ProxyConf object by proxyType. // If proxyType doesn't exist, return nil. func DefaultProxyConf(proxyType string) ProxyConf { - var conf ProxyConf - switch proxyType { - case consts.TCPProxy: - conf = &TCPProxyConf{ - BaseProxyConf: defaultBaseProxyConf(proxyType), - } - case consts.TCPMuxProxy: - conf = &TCPMuxProxyConf{ - BaseProxyConf: defaultBaseProxyConf(proxyType), - } - case consts.UDPProxy: - conf = &UDPProxyConf{ - BaseProxyConf: defaultBaseProxyConf(proxyType), - } - case consts.HTTPProxy: - conf = &HTTPProxyConf{ - BaseProxyConf: defaultBaseProxyConf(proxyType), - } - case consts.HTTPSProxy: - conf = &HTTPSProxyConf{ - BaseProxyConf: defaultBaseProxyConf(proxyType), - } - case consts.STCPProxy: - conf = &STCPProxyConf{ - BaseProxyConf: defaultBaseProxyConf(proxyType), - Role: "server", - } - case consts.XTCPProxy: - conf = &XTCPProxyConf{ - BaseProxyConf: defaultBaseProxyConf(proxyType), - Role: "server", - } - case consts.SUDPProxy: - conf = &SUDPProxyConf{ - BaseProxyConf: defaultBaseProxyConf(proxyType), - Role: "server", - } - default: - return nil + conf := NewConfByType(proxyType) + if conf != nil { + conf.SetDefaultValues() } - return conf } @@ -283,34 +270,33 @@ func NewProxyConfFromIni(prefix, name string, section *ini.Section) (ProxyConf, conf := DefaultProxyConf(proxyType) if conf == nil { - return nil, fmt.Errorf("proxy %s has invalid type [%s]", name, proxyType) + return nil, fmt.Errorf("invalid type [%s]", proxyType) } if err := conf.UnmarshalFromIni(prefix, name, section); err != nil { return nil, err } - if err := conf.CheckForCli(); err != nil { + if err := conf.ValidateForClient(); err != nil { return nil, err } - return conf, nil } // Proxy loaded from msg -func NewProxyConfFromMsg(pMsg *msg.NewProxy, serverCfg ServerCommonConf) (ProxyConf, error) { - if pMsg.ProxyType == "" { - pMsg.ProxyType = consts.TCPProxy +func NewProxyConfFromMsg(m *msg.NewProxy, serverCfg ServerCommonConf) (ProxyConf, error) { + if m.ProxyType == "" { + m.ProxyType = consts.TCPProxy } - conf := DefaultProxyConf(pMsg.ProxyType) + conf := DefaultProxyConf(m.ProxyType) if conf == nil { - return nil, fmt.Errorf("proxy [%s] type [%s] error", pMsg.ProxyName, pMsg.ProxyType) + return nil, fmt.Errorf("proxy [%s] type [%s] error", m.ProxyName, m.ProxyType) } - conf.UnmarshalFromMsg(pMsg) + conf.UnmarshalFromMsg(m) - err := conf.CheckForSvr(serverCfg) + err := conf.ValidateForServer(serverCfg) if err != nil { return nil, err } @@ -319,42 +305,15 @@ func NewProxyConfFromMsg(pMsg *msg.NewProxy, serverCfg ServerCommonConf) (ProxyC } // Base -func defaultBaseProxyConf(proxyType string) BaseProxyConf { - return BaseProxyConf{ - ProxyType: proxyType, - LocalSvrConf: LocalSvrConf{ - LocalIP: "127.0.0.1", - }, - BandwidthLimitMode: BandwidthLimitModeClient, - } -} - -func (cfg *BaseProxyConf) GetBaseInfo() *BaseProxyConf { +func (cfg *BaseProxyConf) GetBaseConfig() *BaseProxyConf { return cfg } -func (cfg *BaseProxyConf) compare(cmp *BaseProxyConf) bool { - if cfg.ProxyName != cmp.ProxyName || - cfg.ProxyType != cmp.ProxyType || - cfg.UseEncryption != cmp.UseEncryption || - cfg.UseCompression != cmp.UseCompression || - cfg.Group != cmp.Group || - cfg.GroupKey != cmp.GroupKey || - cfg.ProxyProtocolVersion != cmp.ProxyProtocolVersion || - !cfg.BandwidthLimit.Equal(&cmp.BandwidthLimit) || - cfg.BandwidthLimitMode != cmp.BandwidthLimitMode || - !reflect.DeepEqual(cfg.Metas, cmp.Metas) { - return false +func (cfg *BaseProxyConf) SetDefaultValues() { + cfg.LocalSvrConf = LocalSvrConf{ + LocalIP: "127.0.0.1", } - - if !reflect.DeepEqual(cfg.LocalSvrConf, cmp.LocalSvrConf) { - return false - } - if !reflect.DeepEqual(cfg.HealthCheckConf, cmp.HealthCheckConf) { - return false - } - - return true + cfg.BandwidthLimitMode = BandwidthLimitModeClient } // BaseProxyConf apply custom logic changes. @@ -392,38 +351,38 @@ func (cfg *BaseProxyConf) decorate(prefix string, name string, section *ini.Sect return nil } -func (cfg *BaseProxyConf) marshalToMsg(pMsg *msg.NewProxy) { - pMsg.ProxyName = cfg.ProxyName - pMsg.ProxyType = cfg.ProxyType - pMsg.UseEncryption = cfg.UseEncryption - pMsg.UseCompression = cfg.UseCompression - pMsg.BandwidthLimit = cfg.BandwidthLimit.String() +func (cfg *BaseProxyConf) marshalToMsg(m *msg.NewProxy) { + m.ProxyName = cfg.ProxyName + m.ProxyType = cfg.ProxyType + m.UseEncryption = cfg.UseEncryption + m.UseCompression = cfg.UseCompression + m.BandwidthLimit = cfg.BandwidthLimit.String() // leave it empty for default value to reduce traffic if cfg.BandwidthLimitMode != "client" { - pMsg.BandwidthLimitMode = cfg.BandwidthLimitMode + m.BandwidthLimitMode = cfg.BandwidthLimitMode } - pMsg.Group = cfg.Group - pMsg.GroupKey = cfg.GroupKey - pMsg.Metas = cfg.Metas + m.Group = cfg.Group + m.GroupKey = cfg.GroupKey + m.Metas = cfg.Metas } -func (cfg *BaseProxyConf) unmarshalFromMsg(pMsg *msg.NewProxy) { - cfg.ProxyName = pMsg.ProxyName - cfg.ProxyType = pMsg.ProxyType - cfg.UseEncryption = pMsg.UseEncryption - cfg.UseCompression = pMsg.UseCompression - if pMsg.BandwidthLimit != "" { - cfg.BandwidthLimit, _ = NewBandwidthQuantity(pMsg.BandwidthLimit) +func (cfg *BaseProxyConf) unmarshalFromMsg(m *msg.NewProxy) { + cfg.ProxyName = m.ProxyName + cfg.ProxyType = m.ProxyType + cfg.UseEncryption = m.UseEncryption + cfg.UseCompression = m.UseCompression + if m.BandwidthLimit != "" { + cfg.BandwidthLimit, _ = NewBandwidthQuantity(m.BandwidthLimit) } - if pMsg.BandwidthLimitMode != "" { - cfg.BandwidthLimitMode = pMsg.BandwidthLimitMode + if m.BandwidthLimitMode != "" { + cfg.BandwidthLimitMode = m.BandwidthLimitMode } - cfg.Group = pMsg.Group - cfg.GroupKey = pMsg.GroupKey - cfg.Metas = pMsg.Metas + cfg.Group = m.Group + cfg.GroupKey = m.GroupKey + cfg.Metas = m.Metas } -func (cfg *BaseProxyConf) checkForCli() (err error) { +func (cfg *BaseProxyConf) validateForClient() (err error) { if cfg.ProxyProtocolVersion != "" { if cfg.ProxyProtocolVersion != "v1" && cfg.ProxyProtocolVersion != "v2" { return fmt.Errorf("no support proxy protocol version: %s", cfg.ProxyProtocolVersion) @@ -434,16 +393,16 @@ func (cfg *BaseProxyConf) checkForCli() (err error) { return fmt.Errorf("bandwidth_limit_mode should be client or server") } - if err = cfg.LocalSvrConf.checkForCli(); err != nil { + if err = cfg.LocalSvrConf.validateForClient(); err != nil { return } - if err = cfg.HealthCheckConf.checkForCli(); err != nil { + if err = cfg.HealthCheckConf.validateForClient(); err != nil { return } return nil } -func (cfg *BaseProxyConf) checkForSvr() (err error) { +func (cfg *BaseProxyConf) validateForServer() (err error) { if cfg.BandwidthLimitMode != "client" && cfg.BandwidthLimitMode != "server" { return fmt.Errorf("bandwidth_limit_mode should be client or server") } @@ -459,14 +418,14 @@ func (cfg *DomainConf) check() (err error) { return } -func (cfg *DomainConf) checkForCli() (err error) { +func (cfg *DomainConf) validateForClient() (err error) { if err = cfg.check(); err != nil { return } return } -func (cfg *DomainConf) checkForSvr(serverCfg ServerCommonConf) (err error) { +func (cfg *DomainConf) validateForServer(serverCfg ServerCommonConf) (err error) { if err = cfg.check(); err != nil { return } @@ -491,7 +450,7 @@ func (cfg *DomainConf) checkForSvr(serverCfg ServerCommonConf) (err error) { } // LocalSvrConf -func (cfg *LocalSvrConf) checkForCli() (err error) { +func (cfg *LocalSvrConf) validateForClient() (err error) { if cfg.Plugin == "" { if cfg.LocalIP == "" { err = fmt.Errorf("local ip or plugin is required") @@ -506,7 +465,7 @@ func (cfg *LocalSvrConf) checkForCli() (err error) { } // HealthCheckConf -func (cfg *HealthCheckConf) checkForCli() error { +func (cfg *HealthCheckConf) validateForClient() error { if cfg.HealthCheckType != "" && cfg.HealthCheckType != "tcp" && cfg.HealthCheckType != "http" { return fmt.Errorf("unsupport health check type") } @@ -524,7 +483,7 @@ func preUnmarshalFromIni(cfg ProxyConf, prefix string, name string, section *ini return err } - err = cfg.GetBaseInfo().decorate(prefix, name, section) + err = cfg.GetBaseConfig().decorate(prefix, name, section) if err != nil { return err } @@ -533,29 +492,11 @@ func preUnmarshalFromIni(cfg ProxyConf, prefix string, name string, section *ini } // TCP -func (cfg *TCPProxyConf) Compare(cmp ProxyConf) bool { - cmpConf, ok := cmp.(*TCPProxyConf) - if !ok { - return false - } - - if !cfg.BaseProxyConf.compare(&cmpConf.BaseProxyConf) { - return false - } - - // Add custom logic equal if exists. - if cfg.RemotePort != cmpConf.RemotePort { - return false - } - - return true -} - -func (cfg *TCPProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.unmarshalFromMsg(pMsg) +func (cfg *TCPProxyConf) UnmarshalFromMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.unmarshalFromMsg(m) // Add custom logic unmarshal if exists - cfg.RemotePort = pMsg.RemotePort + cfg.RemotePort = m.RemotePort } func (cfg *TCPProxyConf) UnmarshalFromIni(prefix string, name string, section *ini.Section) error { @@ -569,15 +510,15 @@ func (cfg *TCPProxyConf) UnmarshalFromIni(prefix string, name string, section *i return nil } -func (cfg *TCPProxyConf) MarshalToMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.marshalToMsg(pMsg) +func (cfg *TCPProxyConf) MarshalToMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.marshalToMsg(m) // Add custom logic marshal if exists - pMsg.RemotePort = cfg.RemotePort + m.RemotePort = cfg.RemotePort } -func (cfg *TCPProxyConf) CheckForCli() (err error) { - if err = cfg.BaseProxyConf.checkForCli(); err != nil { +func (cfg *TCPProxyConf) ValidateForClient() (err error) { + if err = cfg.BaseProxyConf.validateForClient(); err != nil { return } @@ -586,39 +527,14 @@ func (cfg *TCPProxyConf) CheckForCli() (err error) { return } -func (cfg *TCPProxyConf) CheckForSvr(serverCfg ServerCommonConf) error { - if err := cfg.BaseProxyConf.checkForSvr(); err != nil { +func (cfg *TCPProxyConf) ValidateForServer(serverCfg ServerCommonConf) error { + if err := cfg.BaseProxyConf.validateForServer(); err != nil { return err } return nil } // TCPMux -func (cfg *TCPMuxProxyConf) Compare(cmp ProxyConf) bool { - cmpConf, ok := cmp.(*TCPMuxProxyConf) - if !ok { - return false - } - - if !cfg.BaseProxyConf.compare(&cmpConf.BaseProxyConf) { - return false - } - - // Add custom logic equal if exists. - if !reflect.DeepEqual(cfg.DomainConf, cmpConf.DomainConf) { - return false - } - - if cfg.Multiplexer != cmpConf.Multiplexer || - cfg.HTTPUser != cmpConf.HTTPUser || - cfg.HTTPPwd != cmpConf.HTTPPwd || - cfg.RouteByHTTPUser != cmpConf.RouteByHTTPUser { - return false - } - - return true -} - func (cfg *TCPMuxProxyConf) UnmarshalFromIni(prefix string, name string, section *ini.Section) error { err := preUnmarshalFromIni(cfg, prefix, name, section) if err != nil { @@ -630,37 +546,37 @@ func (cfg *TCPMuxProxyConf) UnmarshalFromIni(prefix string, name string, section return nil } -func (cfg *TCPMuxProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.unmarshalFromMsg(pMsg) +func (cfg *TCPMuxProxyConf) UnmarshalFromMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.unmarshalFromMsg(m) // Add custom logic unmarshal if exists - cfg.CustomDomains = pMsg.CustomDomains - cfg.SubDomain = pMsg.SubDomain - cfg.Multiplexer = pMsg.Multiplexer - cfg.HTTPUser = pMsg.HTTPUser - cfg.HTTPPwd = pMsg.HTTPPwd - cfg.RouteByHTTPUser = pMsg.RouteByHTTPUser + cfg.CustomDomains = m.CustomDomains + cfg.SubDomain = m.SubDomain + cfg.Multiplexer = m.Multiplexer + cfg.HTTPUser = m.HTTPUser + cfg.HTTPPwd = m.HTTPPwd + cfg.RouteByHTTPUser = m.RouteByHTTPUser } -func (cfg *TCPMuxProxyConf) MarshalToMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.marshalToMsg(pMsg) +func (cfg *TCPMuxProxyConf) MarshalToMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.marshalToMsg(m) // Add custom logic marshal if exists - pMsg.CustomDomains = cfg.CustomDomains - pMsg.SubDomain = cfg.SubDomain - pMsg.Multiplexer = cfg.Multiplexer - pMsg.HTTPUser = cfg.HTTPUser - pMsg.HTTPPwd = cfg.HTTPPwd - pMsg.RouteByHTTPUser = cfg.RouteByHTTPUser + m.CustomDomains = cfg.CustomDomains + m.SubDomain = cfg.SubDomain + m.Multiplexer = cfg.Multiplexer + m.HTTPUser = cfg.HTTPUser + m.HTTPPwd = cfg.HTTPPwd + m.RouteByHTTPUser = cfg.RouteByHTTPUser } -func (cfg *TCPMuxProxyConf) CheckForCli() (err error) { - if err = cfg.BaseProxyConf.checkForCli(); err != nil { +func (cfg *TCPMuxProxyConf) ValidateForClient() (err error) { + if err = cfg.BaseProxyConf.validateForClient(); err != nil { return } // Add custom logic check if exists - if err = cfg.DomainConf.checkForCli(); err != nil { + if err = cfg.DomainConf.validateForClient(); err != nil { return } @@ -671,8 +587,8 @@ func (cfg *TCPMuxProxyConf) CheckForCli() (err error) { return } -func (cfg *TCPMuxProxyConf) CheckForSvr(serverCfg ServerCommonConf) (err error) { - if err := cfg.BaseProxyConf.checkForSvr(); err != nil { +func (cfg *TCPMuxProxyConf) ValidateForServer(serverCfg ServerCommonConf) (err error) { + if err := cfg.BaseProxyConf.validateForServer(); err != nil { return err } @@ -684,7 +600,7 @@ func (cfg *TCPMuxProxyConf) CheckForSvr(serverCfg ServerCommonConf) (err error) return fmt.Errorf("proxy [%s] type [tcpmux] with multiplexer [httpconnect] requires tcpmux_httpconnect_port configuration", cfg.ProxyName) } - if err = cfg.DomainConf.checkForSvr(serverCfg); err != nil { + if err = cfg.DomainConf.validateForServer(serverCfg); err != nil { err = fmt.Errorf("proxy [%s] domain conf check error: %v", cfg.ProxyName, err) return } @@ -693,24 +609,6 @@ func (cfg *TCPMuxProxyConf) CheckForSvr(serverCfg ServerCommonConf) (err error) } // UDP -func (cfg *UDPProxyConf) Compare(cmp ProxyConf) bool { - cmpConf, ok := cmp.(*UDPProxyConf) - if !ok { - return false - } - - if !cfg.BaseProxyConf.compare(&cmpConf.BaseProxyConf) { - return false - } - - // Add custom logic equal if exists. - if cfg.RemotePort != cmpConf.RemotePort { - return false - } - - return true -} - func (cfg *UDPProxyConf) UnmarshalFromIni(prefix string, name string, section *ini.Section) error { err := preUnmarshalFromIni(cfg, prefix, name, section) if err != nil { @@ -722,22 +620,22 @@ func (cfg *UDPProxyConf) UnmarshalFromIni(prefix string, name string, section *i return nil } -func (cfg *UDPProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.unmarshalFromMsg(pMsg) +func (cfg *UDPProxyConf) UnmarshalFromMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.unmarshalFromMsg(m) // Add custom logic unmarshal if exists - cfg.RemotePort = pMsg.RemotePort + cfg.RemotePort = m.RemotePort } -func (cfg *UDPProxyConf) MarshalToMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.marshalToMsg(pMsg) +func (cfg *UDPProxyConf) MarshalToMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.marshalToMsg(m) // Add custom logic marshal if exists - pMsg.RemotePort = cfg.RemotePort + m.RemotePort = cfg.RemotePort } -func (cfg *UDPProxyConf) CheckForCli() (err error) { - if err = cfg.BaseProxyConf.checkForCli(); err != nil { +func (cfg *UDPProxyConf) ValidateForClient() (err error) { + if err = cfg.BaseProxyConf.validateForClient(); err != nil { return } @@ -746,41 +644,14 @@ func (cfg *UDPProxyConf) CheckForCli() (err error) { return } -func (cfg *UDPProxyConf) CheckForSvr(serverCfg ServerCommonConf) error { - if err := cfg.BaseProxyConf.checkForSvr(); err != nil { +func (cfg *UDPProxyConf) ValidateForServer(serverCfg ServerCommonConf) error { + if err := cfg.BaseProxyConf.validateForServer(); err != nil { return err } return nil } // HTTP -func (cfg *HTTPProxyConf) Compare(cmp ProxyConf) bool { - cmpConf, ok := cmp.(*HTTPProxyConf) - if !ok { - return false - } - - if !cfg.BaseProxyConf.compare(&cmpConf.BaseProxyConf) { - return false - } - - // Add custom logic equal if exists. - if !reflect.DeepEqual(cfg.DomainConf, cmpConf.DomainConf) { - return false - } - - if !reflect.DeepEqual(cfg.Locations, cmpConf.Locations) || - cfg.HTTPUser != cmpConf.HTTPUser || - cfg.HTTPPwd != cmpConf.HTTPPwd || - cfg.HostHeaderRewrite != cmpConf.HostHeaderRewrite || - cfg.RouteByHTTPUser != cmpConf.RouteByHTTPUser || - !reflect.DeepEqual(cfg.Headers, cmpConf.Headers) { - return false - } - - return true -} - func (cfg *HTTPProxyConf) UnmarshalFromIni(prefix string, name string, section *ini.Section) error { err := preUnmarshalFromIni(cfg, prefix, name, section) if err != nil { @@ -789,53 +660,52 @@ func (cfg *HTTPProxyConf) UnmarshalFromIni(prefix string, name string, section * // Add custom logic unmarshal if exists cfg.Headers = GetMapWithoutPrefix(section.KeysHash(), "header_") - return nil } -func (cfg *HTTPProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.unmarshalFromMsg(pMsg) +func (cfg *HTTPProxyConf) UnmarshalFromMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.unmarshalFromMsg(m) // Add custom logic unmarshal if exists - cfg.CustomDomains = pMsg.CustomDomains - cfg.SubDomain = pMsg.SubDomain - cfg.Locations = pMsg.Locations - cfg.HostHeaderRewrite = pMsg.HostHeaderRewrite - cfg.HTTPUser = pMsg.HTTPUser - cfg.HTTPPwd = pMsg.HTTPPwd - cfg.Headers = pMsg.Headers - cfg.RouteByHTTPUser = pMsg.RouteByHTTPUser + cfg.CustomDomains = m.CustomDomains + cfg.SubDomain = m.SubDomain + cfg.Locations = m.Locations + cfg.HostHeaderRewrite = m.HostHeaderRewrite + cfg.HTTPUser = m.HTTPUser + cfg.HTTPPwd = m.HTTPPwd + cfg.Headers = m.Headers + cfg.RouteByHTTPUser = m.RouteByHTTPUser } -func (cfg *HTTPProxyConf) MarshalToMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.marshalToMsg(pMsg) +func (cfg *HTTPProxyConf) MarshalToMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.marshalToMsg(m) // Add custom logic marshal if exists - pMsg.CustomDomains = cfg.CustomDomains - pMsg.SubDomain = cfg.SubDomain - pMsg.Locations = cfg.Locations - pMsg.HostHeaderRewrite = cfg.HostHeaderRewrite - pMsg.HTTPUser = cfg.HTTPUser - pMsg.HTTPPwd = cfg.HTTPPwd - pMsg.Headers = cfg.Headers - pMsg.RouteByHTTPUser = cfg.RouteByHTTPUser + m.CustomDomains = cfg.CustomDomains + m.SubDomain = cfg.SubDomain + m.Locations = cfg.Locations + m.HostHeaderRewrite = cfg.HostHeaderRewrite + m.HTTPUser = cfg.HTTPUser + m.HTTPPwd = cfg.HTTPPwd + m.Headers = cfg.Headers + m.RouteByHTTPUser = cfg.RouteByHTTPUser } -func (cfg *HTTPProxyConf) CheckForCli() (err error) { - if err = cfg.BaseProxyConf.checkForCli(); err != nil { +func (cfg *HTTPProxyConf) ValidateForClient() (err error) { + if err = cfg.BaseProxyConf.validateForClient(); err != nil { return } // Add custom logic check if exists - if err = cfg.DomainConf.checkForCli(); err != nil { + if err = cfg.DomainConf.validateForClient(); err != nil { return } return } -func (cfg *HTTPProxyConf) CheckForSvr(serverCfg ServerCommonConf) (err error) { - if err := cfg.BaseProxyConf.checkForSvr(); err != nil { +func (cfg *HTTPProxyConf) ValidateForServer(serverCfg ServerCommonConf) (err error) { + if err := cfg.BaseProxyConf.validateForServer(); err != nil { return err } @@ -843,7 +713,7 @@ func (cfg *HTTPProxyConf) CheckForSvr(serverCfg ServerCommonConf) (err error) { return fmt.Errorf("type [http] not support when vhost_http_port is not set") } - if err = cfg.DomainConf.checkForSvr(serverCfg); err != nil { + if err = cfg.DomainConf.validateForServer(serverCfg); err != nil { err = fmt.Errorf("proxy [%s] domain conf check error: %v", cfg.ProxyName, err) return } @@ -852,24 +722,6 @@ func (cfg *HTTPProxyConf) CheckForSvr(serverCfg ServerCommonConf) (err error) { } // HTTPS -func (cfg *HTTPSProxyConf) Compare(cmp ProxyConf) bool { - cmpConf, ok := cmp.(*HTTPSProxyConf) - if !ok { - return false - } - - if !cfg.BaseProxyConf.compare(&cmpConf.BaseProxyConf) { - return false - } - - // Add custom logic equal if exists. - if !reflect.DeepEqual(cfg.DomainConf, cmpConf.DomainConf) { - return false - } - - return true -} - func (cfg *HTTPSProxyConf) UnmarshalFromIni(prefix string, name string, section *ini.Section) error { err := preUnmarshalFromIni(cfg, prefix, name, section) if err != nil { @@ -877,41 +729,39 @@ func (cfg *HTTPSProxyConf) UnmarshalFromIni(prefix string, name string, section } // Add custom logic unmarshal if exists - return nil } -func (cfg *HTTPSProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.unmarshalFromMsg(pMsg) +func (cfg *HTTPSProxyConf) UnmarshalFromMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.unmarshalFromMsg(m) // Add custom logic unmarshal if exists - cfg.CustomDomains = pMsg.CustomDomains - cfg.SubDomain = pMsg.SubDomain + cfg.CustomDomains = m.CustomDomains + cfg.SubDomain = m.SubDomain } -func (cfg *HTTPSProxyConf) MarshalToMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.marshalToMsg(pMsg) +func (cfg *HTTPSProxyConf) MarshalToMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.marshalToMsg(m) // Add custom logic marshal if exists - pMsg.CustomDomains = cfg.CustomDomains - pMsg.SubDomain = cfg.SubDomain + m.CustomDomains = cfg.CustomDomains + m.SubDomain = cfg.SubDomain } -func (cfg *HTTPSProxyConf) CheckForCli() (err error) { - if err = cfg.BaseProxyConf.checkForCli(); err != nil { +func (cfg *HTTPSProxyConf) ValidateForClient() (err error) { + if err = cfg.BaseProxyConf.validateForClient(); err != nil { return } // Add custom logic check if exists - if err = cfg.DomainConf.checkForCli(); err != nil { + if err = cfg.DomainConf.validateForClient(); err != nil { return } - return } -func (cfg *HTTPSProxyConf) CheckForSvr(serverCfg ServerCommonConf) (err error) { - if err := cfg.BaseProxyConf.checkForSvr(); err != nil { +func (cfg *HTTPSProxyConf) ValidateForServer(serverCfg ServerCommonConf) (err error) { + if err := cfg.BaseProxyConf.validateForServer(); err != nil { return err } @@ -919,7 +769,7 @@ func (cfg *HTTPSProxyConf) CheckForSvr(serverCfg ServerCommonConf) (err error) { return fmt.Errorf("type [https] not support when vhost_https_port is not set") } - if err = cfg.DomainConf.checkForSvr(serverCfg); err != nil { + if err = cfg.DomainConf.validateForServer(serverCfg); err != nil { err = fmt.Errorf("proxy [%s] domain conf check error: %v", cfg.ProxyName, err) return } @@ -928,23 +778,9 @@ func (cfg *HTTPSProxyConf) CheckForSvr(serverCfg ServerCommonConf) (err error) { } // SUDP -func (cfg *SUDPProxyConf) Compare(cmp ProxyConf) bool { - cmpConf, ok := cmp.(*SUDPProxyConf) - if !ok { - return false - } - - if !cfg.BaseProxyConf.compare(&cmpConf.BaseProxyConf) { - return false - } - - // Add custom logic equal if exists. - if cfg.Role != cmpConf.Role || - cfg.Sk != cmpConf.Sk { - return false - } - - return true +func (cfg *SUDPProxyConf) SetDefaultValues() { + cfg.BaseProxyConf.SetDefaultValues() + cfg.RoleServerCommonConf.setDefaultValues() } func (cfg *SUDPProxyConf) UnmarshalFromIni(prefix string, name string, section *ini.Section) error { @@ -954,27 +790,26 @@ func (cfg *SUDPProxyConf) UnmarshalFromIni(prefix string, name string, section * } // Add custom logic unmarshal if exists - return nil } // Only for role server. -func (cfg *SUDPProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.unmarshalFromMsg(pMsg) +func (cfg *SUDPProxyConf) UnmarshalFromMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.unmarshalFromMsg(m) // Add custom logic unmarshal if exists - cfg.Sk = pMsg.Sk + cfg.RoleServerCommonConf.unmarshalFromMsg(m) } -func (cfg *SUDPProxyConf) MarshalToMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.marshalToMsg(pMsg) +func (cfg *SUDPProxyConf) MarshalToMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.marshalToMsg(m) // Add custom logic marshal if exists - pMsg.Sk = cfg.Sk + cfg.RoleServerCommonConf.marshalToMsg(m) } -func (cfg *SUDPProxyConf) CheckForCli() (err error) { - if err := cfg.BaseProxyConf.checkForCli(); err != nil { +func (cfg *SUDPProxyConf) ValidateForClient() (err error) { + if err := cfg.BaseProxyConf.validateForClient(); err != nil { return err } @@ -986,31 +821,17 @@ func (cfg *SUDPProxyConf) CheckForCli() (err error) { return nil } -func (cfg *SUDPProxyConf) CheckForSvr(serverCfg ServerCommonConf) error { - if err := cfg.BaseProxyConf.checkForSvr(); err != nil { +func (cfg *SUDPProxyConf) ValidateForServer(serverCfg ServerCommonConf) error { + if err := cfg.BaseProxyConf.validateForServer(); err != nil { return err } return nil } // STCP -func (cfg *STCPProxyConf) Compare(cmp ProxyConf) bool { - cmpConf, ok := cmp.(*STCPProxyConf) - if !ok { - return false - } - - if !cfg.BaseProxyConf.compare(&cmpConf.BaseProxyConf) { - return false - } - - // Add custom logic equal if exists. - if cfg.Role != cmpConf.Role || - cfg.Sk != cmpConf.Sk { - return false - } - - return true +func (cfg *STCPProxyConf) SetDefaultValues() { + cfg.BaseProxyConf.SetDefaultValues() + cfg.RoleServerCommonConf.setDefaultValues() } func (cfg *STCPProxyConf) UnmarshalFromIni(prefix string, name string, section *ini.Section) error { @@ -1023,27 +844,26 @@ func (cfg *STCPProxyConf) UnmarshalFromIni(prefix string, name string, section * if cfg.Role == "" { cfg.Role = "server" } - return nil } // Only for role server. -func (cfg *STCPProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.unmarshalFromMsg(pMsg) +func (cfg *STCPProxyConf) UnmarshalFromMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.unmarshalFromMsg(m) // Add custom logic unmarshal if exists - cfg.Sk = pMsg.Sk + cfg.RoleServerCommonConf.unmarshalFromMsg(m) } -func (cfg *STCPProxyConf) MarshalToMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.marshalToMsg(pMsg) +func (cfg *STCPProxyConf) MarshalToMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.marshalToMsg(m) // Add custom logic marshal if exists - pMsg.Sk = cfg.Sk + cfg.RoleServerCommonConf.marshalToMsg(m) } -func (cfg *STCPProxyConf) CheckForCli() (err error) { - if err = cfg.BaseProxyConf.checkForCli(); err != nil { +func (cfg *STCPProxyConf) ValidateForClient() (err error) { + if err = cfg.BaseProxyConf.validateForClient(); err != nil { return } @@ -1055,30 +875,17 @@ func (cfg *STCPProxyConf) CheckForCli() (err error) { return } -func (cfg *STCPProxyConf) CheckForSvr(serverCfg ServerCommonConf) error { - if err := cfg.BaseProxyConf.checkForSvr(); err != nil { +func (cfg *STCPProxyConf) ValidateForServer(serverCfg ServerCommonConf) error { + if err := cfg.BaseProxyConf.validateForServer(); err != nil { return err } return nil } // XTCP -func (cfg *XTCPProxyConf) Compare(cmp ProxyConf) bool { - cmpConf, ok := cmp.(*XTCPProxyConf) - if !ok { - return false - } - - if !cfg.BaseProxyConf.compare(&cmpConf.BaseProxyConf) { - return false - } - - // Add custom logic equal if exists. - if cfg.Role != cmpConf.Role || - cfg.Sk != cmpConf.Sk { - return false - } - return true +func (cfg *XTCPProxyConf) SetDefaultValues() { + cfg.BaseProxyConf.SetDefaultValues() + cfg.RoleServerCommonConf.setDefaultValues() } func (cfg *XTCPProxyConf) UnmarshalFromIni(prefix string, name string, section *ini.Section) error { @@ -1095,22 +902,22 @@ func (cfg *XTCPProxyConf) UnmarshalFromIni(prefix string, name string, section * } // Only for role server. -func (cfg *XTCPProxyConf) UnmarshalFromMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.unmarshalFromMsg(pMsg) +func (cfg *XTCPProxyConf) UnmarshalFromMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.unmarshalFromMsg(m) // Add custom logic unmarshal if exists - cfg.Sk = pMsg.Sk + cfg.RoleServerCommonConf.unmarshalFromMsg(m) } -func (cfg *XTCPProxyConf) MarshalToMsg(pMsg *msg.NewProxy) { - cfg.BaseProxyConf.marshalToMsg(pMsg) +func (cfg *XTCPProxyConf) MarshalToMsg(m *msg.NewProxy) { + cfg.BaseProxyConf.marshalToMsg(m) // Add custom logic marshal if exists - pMsg.Sk = cfg.Sk + cfg.RoleServerCommonConf.marshalToMsg(m) } -func (cfg *XTCPProxyConf) CheckForCli() (err error) { - if err = cfg.BaseProxyConf.checkForCli(); err != nil { +func (cfg *XTCPProxyConf) ValidateForClient() (err error) { + if err = cfg.BaseProxyConf.validateForClient(); err != nil { return } @@ -1121,8 +928,8 @@ func (cfg *XTCPProxyConf) CheckForCli() (err error) { return } -func (cfg *XTCPProxyConf) CheckForSvr(serverCfg ServerCommonConf) error { - if err := cfg.BaseProxyConf.checkForSvr(); err != nil { +func (cfg *XTCPProxyConf) ValidateForServer(serverCfg ServerCommonConf) error { + if err := cfg.BaseProxyConf.validateForServer(); err != nil { return err } return nil diff --git a/pkg/config/proxy_test.go b/pkg/config/proxy_test.go index 894d6fd..9ef6f87 100644 --- a/pkg/config/proxy_test.go +++ b/pkg/config/proxy_test.go @@ -254,8 +254,10 @@ func Test_Proxy_UnmarshalFromIni(t *testing.T) { }, BandwidthLimitMode: BandwidthLimitModeClient, }, - Role: "server", - Sk: "abcdefg", + RoleServerCommonConf: RoleServerCommonConf{ + Role: "server", + Sk: "abcdefg", + }, }, }, { @@ -279,8 +281,10 @@ func Test_Proxy_UnmarshalFromIni(t *testing.T) { }, BandwidthLimitMode: BandwidthLimitModeClient, }, - Role: "server", - Sk: "abcdefg", + RoleServerCommonConf: RoleServerCommonConf{ + Role: "server", + Sk: "abcdefg", + }, }, }, { diff --git a/pkg/config/server_test.go b/pkg/config/server_test.go index 85a63f5..7218397 100644 --- a/pkg/config/server_test.go +++ b/pkg/config/server_test.go @@ -36,7 +36,6 @@ func Test_LoadServerCommonConf(t *testing.T) { [common] bind_addr = 0.0.0.9 bind_port = 7009 - bind_udp_port = 7008 kcp_bind_port = 7007 proxy_bind_addr = 127.0.0.9 vhost_http_port = 89 @@ -170,7 +169,6 @@ func Test_LoadServerCommonConf(t *testing.T) { [common] bind_addr = 0.0.0.9 bind_port = 7009 - bind_udp_port = 7008 `), expected: ServerCommonConf{ ServerConfig: auth.ServerConfig{ diff --git a/pkg/config/visitor.go b/pkg/config/visitor.go index 0ee010f..31a8a02 100644 --- a/pkg/config/visitor.go +++ b/pkg/config/visitor.go @@ -34,10 +34,12 @@ var ( ) type VisitorConf interface { - GetBaseInfo() *BaseVisitorConf - Compare(cmp VisitorConf) bool + // GetBaseConfig returns the base config of visitor. + GetBaseConfig() *BaseVisitorConf + // UnmarshalFromIni unmarshals config from ini. UnmarshalFromIni(prefix string, name string, section *ini.Section) error - Check() error + // Validate validates config. + Validate() error } type BaseVisitorConf struct { @@ -47,9 +49,14 @@ type BaseVisitorConf struct { UseCompression bool `ini:"use_compression" json:"use_compression"` Role string `ini:"role" json:"role"` Sk string `ini:"sk" json:"sk"` - ServerName string `ini:"server_name" json:"server_name"` - BindAddr string `ini:"bind_addr" json:"bind_addr"` - BindPort int `ini:"bind_port" json:"bind_port"` + // if the server user is not set, it defaults to the current user + ServerUser string `ini:"server_user" json:"server_user"` + ServerName string `ini:"server_name" json:"server_name"` + BindAddr string `ini:"bind_addr" json:"bind_addr"` + // BindPort is the port that visitor listens on. + // It can be less than 0, it means don't bind to the port and only receive connections redirected from + // other visitors. (This is not supported for SUDP now) + BindPort int `ini:"bind_port" json:"bind_port"` } type SUDPVisitorConf struct { @@ -63,10 +70,12 @@ type STCPVisitorConf struct { type XTCPVisitorConf struct { BaseVisitorConf `ini:",extends"` - Protocol string `ini:"protocol" json:"protocol,omitempty"` - KeepTunnelOpen bool `ini:"keep_tunnel_open" json:"keep_tunnel_open,omitempty"` - MaxRetriesAnHour int `ini:"max_retries_an_hour" json:"max_retries_an_hour,omitempty"` - MinRetryInterval int `ini:"min_retry_interval" json:"min_retry_interval,omitempty"` + Protocol string `ini:"protocol" json:"protocol,omitempty"` + KeepTunnelOpen bool `ini:"keep_tunnel_open" json:"keep_tunnel_open,omitempty"` + MaxRetriesAnHour int `ini:"max_retries_an_hour" json:"max_retries_an_hour,omitempty"` + MinRetryInterval int `ini:"min_retry_interval" json:"min_retry_interval,omitempty"` + FallbackTo string `ini:"fallback_to" json:"fallback_to,omitempty"` + FallbackTimeoutMs int `ini:"fallback_timeout_ms" json:"fallback_timeout_ms,omitempty"` } // DefaultVisitorConf creates a empty VisitorConf object by visitorType. @@ -76,7 +85,6 @@ func DefaultVisitorConf(visitorType string) VisitorConf { if !ok { return nil } - return reflect.New(v).Interface().(VisitorConf) } @@ -86,19 +94,19 @@ func NewVisitorConfFromIni(prefix string, name string, section *ini.Section) (Vi visitorType := section.Key("type").String() if visitorType == "" { - return nil, fmt.Errorf("visitor [%s] type shouldn't be empty", name) + return nil, fmt.Errorf("type shouldn't be empty") } conf := DefaultVisitorConf(visitorType) if conf == nil { - return nil, fmt.Errorf("visitor [%s] type [%s] error", name, visitorType) + return nil, fmt.Errorf("type [%s] error", visitorType) } if err := conf.UnmarshalFromIni(prefix, name, section); err != nil { - return nil, fmt.Errorf("visitor [%s] type [%s] error", name, visitorType) + return nil, fmt.Errorf("type [%s] error", visitorType) } - if err := conf.Check(); err != nil { + if err := conf.Validate(); err != nil { return nil, err } @@ -106,26 +114,11 @@ func NewVisitorConfFromIni(prefix string, name string, section *ini.Section) (Vi } // Base -func (cfg *BaseVisitorConf) GetBaseInfo() *BaseVisitorConf { +func (cfg *BaseVisitorConf) GetBaseConfig() *BaseVisitorConf { return cfg } -func (cfg *BaseVisitorConf) compare(cmp *BaseVisitorConf) bool { - if cfg.ProxyName != cmp.ProxyName || - cfg.ProxyType != cmp.ProxyType || - cfg.UseEncryption != cmp.UseEncryption || - cfg.UseCompression != cmp.UseCompression || - cfg.Role != cmp.Role || - cfg.Sk != cmp.Sk || - cfg.ServerName != cmp.ServerName || - cfg.BindAddr != cmp.BindAddr || - cfg.BindPort != cmp.BindPort { - return false - } - return true -} - -func (cfg *BaseVisitorConf) check() (err error) { +func (cfg *BaseVisitorConf) validate() (err error) { if cfg.Role != "visitor" { err = fmt.Errorf("invalid role") return @@ -134,7 +127,9 @@ func (cfg *BaseVisitorConf) check() (err error) { err = fmt.Errorf("bind_addr shouldn't be empty") return } - if cfg.BindPort <= 0 { + // BindPort can be less than 0, it means don't bind to the port and only receive connections redirected from + // other visitors + if cfg.BindPort == 0 { err = fmt.Errorf("bind_port is required") return } @@ -149,13 +144,16 @@ func (cfg *BaseVisitorConf) unmarshalFromIni(prefix string, name string, section cfg.ProxyName = prefix + name // server_name - cfg.ServerName = prefix + cfg.ServerName + if cfg.ServerUser == "" { + cfg.ServerName = prefix + cfg.ServerName + } else { + cfg.ServerName = cfg.ServerUser + "." + cfg.ServerName + } // bind_addr if cfg.BindAddr == "" { cfg.BindAddr = "127.0.0.1" } - return nil } @@ -165,32 +163,16 @@ func preVisitorUnmarshalFromIni(cfg VisitorConf, prefix string, name string, sec return err } - err = cfg.GetBaseInfo().unmarshalFromIni(prefix, name, section) + err = cfg.GetBaseConfig().unmarshalFromIni(prefix, name, section) if err != nil { return err } - return nil } // SUDP var _ VisitorConf = &SUDPVisitorConf{} -func (cfg *SUDPVisitorConf) Compare(cmp VisitorConf) bool { - cmpConf, ok := cmp.(*SUDPVisitorConf) - if !ok { - return false - } - - if !cfg.BaseVisitorConf.compare(&cmpConf.BaseVisitorConf) { - return false - } - - // Add custom login equal, if exists - - return true -} - func (cfg *SUDPVisitorConf) UnmarshalFromIni(prefix string, name string, section *ini.Section) (err error) { err = preVisitorUnmarshalFromIni(cfg, prefix, name, section) if err != nil { @@ -202,8 +184,8 @@ func (cfg *SUDPVisitorConf) UnmarshalFromIni(prefix string, name string, section return } -func (cfg *SUDPVisitorConf) Check() (err error) { - if err = cfg.BaseVisitorConf.check(); err != nil { +func (cfg *SUDPVisitorConf) Validate() (err error) { + if err = cfg.BaseVisitorConf.validate(); err != nil { return } @@ -215,21 +197,6 @@ func (cfg *SUDPVisitorConf) Check() (err error) { // STCP var _ VisitorConf = &STCPVisitorConf{} -func (cfg *STCPVisitorConf) Compare(cmp VisitorConf) bool { - cmpConf, ok := cmp.(*STCPVisitorConf) - if !ok { - return false - } - - if !cfg.BaseVisitorConf.compare(&cmpConf.BaseVisitorConf) { - return false - } - - // Add custom login equal, if exists - - return true -} - func (cfg *STCPVisitorConf) UnmarshalFromIni(prefix string, name string, section *ini.Section) (err error) { err = preVisitorUnmarshalFromIni(cfg, prefix, name, section) if err != nil { @@ -241,8 +208,8 @@ func (cfg *STCPVisitorConf) UnmarshalFromIni(prefix string, name string, section return } -func (cfg *STCPVisitorConf) Check() (err error) { - if err = cfg.BaseVisitorConf.check(); err != nil { +func (cfg *STCPVisitorConf) Validate() (err error) { + if err = cfg.BaseVisitorConf.validate(); err != nil { return } @@ -254,26 +221,6 @@ func (cfg *STCPVisitorConf) Check() (err error) { // XTCP var _ VisitorConf = &XTCPVisitorConf{} -func (cfg *XTCPVisitorConf) Compare(cmp VisitorConf) bool { - cmpConf, ok := cmp.(*XTCPVisitorConf) - if !ok { - return false - } - - if !cfg.BaseVisitorConf.compare(&cmpConf.BaseVisitorConf) { - return false - } - - // Add custom login equal, if exists - if cfg.Protocol != cmpConf.Protocol || - cfg.KeepTunnelOpen != cmpConf.KeepTunnelOpen || - cfg.MaxRetriesAnHour != cmpConf.MaxRetriesAnHour || - cfg.MinRetryInterval != cmpConf.MinRetryInterval { - return false - } - return true -} - func (cfg *XTCPVisitorConf) UnmarshalFromIni(prefix string, name string, section *ini.Section) (err error) { err = preVisitorUnmarshalFromIni(cfg, prefix, name, section) if err != nil { @@ -290,11 +237,14 @@ func (cfg *XTCPVisitorConf) UnmarshalFromIni(prefix string, name string, section if cfg.MinRetryInterval <= 0 { cfg.MinRetryInterval = 90 } + if cfg.FallbackTimeoutMs <= 0 { + cfg.FallbackTimeoutMs = 1000 + } return } -func (cfg *XTCPVisitorConf) Check() (err error) { - if err = cfg.BaseVisitorConf.check(); err != nil { +func (cfg *XTCPVisitorConf) Validate() (err error) { + if err = cfg.BaseVisitorConf.validate(); err != nil { return } diff --git a/pkg/config/visitor_test.go b/pkg/config/visitor_test.go index d91f90b..0f4171d 100644 --- a/pkg/config/visitor_test.go +++ b/pkg/config/visitor_test.go @@ -87,9 +87,10 @@ func Test_Visitor_UnmarshalFromIni(t *testing.T) { BindAddr: "127.0.0.1", BindPort: 9001, }, - Protocol: "quic", - MaxRetriesAnHour: 8, - MinRetryInterval: 90, + Protocol: "quic", + MaxRetriesAnHour: 8, + MinRetryInterval: 90, + FallbackTimeoutMs: 1000, }, }, } diff --git a/pkg/msg/msg.go b/pkg/msg/msg.go index c6fec4d..7a86578 100644 --- a/pkg/msg/msg.go +++ b/pkg/msg/msg.go @@ -110,8 +110,9 @@ type NewProxy struct { Headers map[string]string `json:"headers,omitempty"` RouteByHTTPUser string `json:"route_by_http_user,omitempty"` - // stcp - Sk string `json:"sk,omitempty"` + // stcp, sudp, xtcp + Sk string `json:"sk,omitempty"` + AllowUsers []string `json:"allow_users,omitempty"` // tcpmux Multiplexer string `json:"multiplexer,omitempty"` @@ -145,6 +146,7 @@ type StartWorkConn struct { } type NewVisitorConn struct { + RunID string `json:"run_id,omitempty"` ProxyName string `json:"proxy_name,omitempty"` SignKey string `json:"sign_key,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` diff --git a/pkg/nathole/analysis.go b/pkg/nathole/analysis.go index 772fd8f..75f9a55 100644 --- a/pkg/nathole/analysis.go +++ b/pkg/nathole/analysis.go @@ -63,20 +63,20 @@ var ( } // mode 2, HardNAT is receiver, EasyNAT is sender - // sender, portsRandomNumber 1000, sendDelayMs 2000 | receiver, listen 256 ports, ttl 7 - // sender, portsRandomNumber 1000, sendDelayMs 2000 | receiver, listen 256 ports, ttl 4 - // sender, portsRandomNumber 1000, sendDelayMs 2000 | receiver, listen 256 ports + // sender, portsRandomNumber 1000, sendDelayMs 3000 | receiver, listen 256 ports, ttl 7 + // sender, portsRandomNumber 1000, sendDelayMs 3000 | receiver, listen 256 ports, ttl 4 + // sender, portsRandomNumber 1000, sendDelayMs 3000 | receiver, listen 256 ports mode2Behaviors = []lo.Tuple2[RecommandBehavior, RecommandBehavior]{ lo.T2( - RecommandBehavior{Role: DetectRoleSender, PortsRandomNumber: 1000, SendDelayMs: 2000}, + RecommandBehavior{Role: DetectRoleSender, PortsRandomNumber: 1000, SendDelayMs: 3000}, RecommandBehavior{Role: DetectRoleReceiver, ListenRandomPorts: 256, TTL: 7}, ), lo.T2( - RecommandBehavior{Role: DetectRoleSender, PortsRandomNumber: 1000, SendDelayMs: 2000}, + RecommandBehavior{Role: DetectRoleSender, PortsRandomNumber: 1000, SendDelayMs: 3000}, RecommandBehavior{Role: DetectRoleReceiver, ListenRandomPorts: 256, TTL: 4}, ), lo.T2( - RecommandBehavior{Role: DetectRoleSender, PortsRandomNumber: 1000, SendDelayMs: 2000}, + RecommandBehavior{Role: DetectRoleSender, PortsRandomNumber: 1000, SendDelayMs: 3000}, RecommandBehavior{Role: DetectRoleReceiver, ListenRandomPorts: 256}, ), } @@ -98,21 +98,21 @@ var ( } // mode 4, Regular ports changes are usually the sender. - // sender, portsRandomNumber 1000, sendDelayMs: 2000 | receiver, listen 256 ports, ttl 7, portsRangeNumber 10 - // sender, portsRandomNumber 1000, sendDelayMs: 2000 | receiver, listen 256 ports, ttl 4, portsRangeNumber 10 - // sender, portsRandomNumber 1000, SendDelayMs: 2000 | receiver, listen 256 ports, portsRangeNumber 10 + // sender, portsRandomNumber 1000, sendDelayMs: 2000 | receiver, listen 256 ports, ttl 7, portsRangeNumber 2 + // sender, portsRandomNumber 1000, sendDelayMs: 2000 | receiver, listen 256 ports, ttl 4, portsRangeNumber 2 + // sender, portsRandomNumber 1000, SendDelayMs: 2000 | receiver, listen 256 ports, portsRangeNumber 2 mode4Behaviors = []lo.Tuple2[RecommandBehavior, RecommandBehavior]{ lo.T2( - RecommandBehavior{Role: DetectRoleSender, PortsRandomNumber: 1000, SendDelayMs: 2000}, - RecommandBehavior{Role: DetectRoleReceiver, ListenRandomPorts: 256, TTL: 7, PortsRangeNumber: 10}, + RecommandBehavior{Role: DetectRoleSender, PortsRandomNumber: 1000, SendDelayMs: 3000}, + RecommandBehavior{Role: DetectRoleReceiver, ListenRandomPorts: 256, TTL: 7, PortsRangeNumber: 2}, ), lo.T2( - RecommandBehavior{Role: DetectRoleSender, PortsRandomNumber: 1000, SendDelayMs: 2000}, - RecommandBehavior{Role: DetectRoleReceiver, ListenRandomPorts: 256, TTL: 4, PortsRangeNumber: 10}, + RecommandBehavior{Role: DetectRoleSender, PortsRandomNumber: 1000, SendDelayMs: 3000}, + RecommandBehavior{Role: DetectRoleReceiver, ListenRandomPorts: 256, TTL: 4, PortsRangeNumber: 2}, ), lo.T2( - RecommandBehavior{Role: DetectRoleSender, PortsRandomNumber: 1000, SendDelayMs: 2000}, - RecommandBehavior{Role: DetectRoleReceiver, ListenRandomPorts: 256, PortsRangeNumber: 10}, + RecommandBehavior{Role: DetectRoleSender, PortsRandomNumber: 1000, SendDelayMs: 3000}, + RecommandBehavior{Role: DetectRoleReceiver, ListenRandomPorts: 256, PortsRangeNumber: 2}, ), } ) diff --git a/pkg/nathole/classify.go b/pkg/nathole/classify.go index 79f8efe..1ec5952 100644 --- a/pkg/nathole/classify.go +++ b/pkg/nathole/classify.go @@ -85,11 +85,6 @@ func ClassifyNATFeature(addresses []string, localIPs []string) (*NatFeature, err } } - natFeature.PortsDifference = portMax - portMin - if natFeature.PortsDifference <= 10 && natFeature.PortsDifference >= 1 { - natFeature.RegularPortsChange = true - } - switch { case ipChanged && portChanged: natFeature.NatType = HardNAT @@ -104,6 +99,12 @@ func ClassifyNATFeature(addresses []string, localIPs []string) (*NatFeature, err natFeature.NatType = EasyNAT natFeature.Behavior = BehaviorNoChange } + if natFeature.Behavior == BehaviorPortChanged { + natFeature.PortsDifference = portMax - portMin + if natFeature.PortsDifference <= 5 && natFeature.PortsDifference >= 1 { + natFeature.RegularPortsChange = true + } + } return natFeature, nil } diff --git a/pkg/nathole/controller.go b/pkg/nathole/controller.go index a04006b..dd134ab 100644 --- a/pkg/nathole/controller.go +++ b/pkg/nathole/controller.go @@ -43,9 +43,10 @@ func NewTransactionID() string { } type ClientCfg struct { - name string - sk string - sidCh chan string + name string + sk string + allowUsers []string + sidCh chan string } type Session struct { @@ -120,16 +121,20 @@ func (c *Controller) CleanWorker(ctx context.Context) { } } -func (c *Controller) ListenClient(name string, sk string) chan string { +func (c *Controller) ListenClient(name string, sk string, allowUsers []string) (chan string, error) { cfg := &ClientCfg{ - name: name, - sk: sk, - sidCh: make(chan string), + name: name, + sk: sk, + allowUsers: allowUsers, + sidCh: make(chan string), } c.mu.Lock() defer c.mu.Unlock() + if _, ok := c.clientCfgs[name]; ok { + return nil, fmt.Errorf("proxy [%s] is repeated", name) + } c.clientCfgs[name] = cfg - return cfg.sidCh + return cfg.sidCh, nil } func (c *Controller) CloseClient(name string) { @@ -144,14 +149,18 @@ func (c *Controller) GenSid() string { return fmt.Sprintf("%d%s", t, id) } -func (c *Controller) HandleVisitor(m *msg.NatHoleVisitor, transporter transport.MessageTransporter) { +func (c *Controller) HandleVisitor(m *msg.NatHoleVisitor, transporter transport.MessageTransporter, visitorUser string) { if m.PreCheck { - _, ok := c.clientCfgs[m.ProxyName] + cfg, ok := c.clientCfgs[m.ProxyName] if !ok { _ = transporter.Send(c.GenNatHoleResponse(m.TransactionID, nil, fmt.Sprintf("xtcp server for [%s] doesn't exist", m.ProxyName))) - } else { - _ = transporter.Send(c.GenNatHoleResponse(m.TransactionID, nil, "")) + return } + if !lo.Contains(cfg.allowUsers, visitorUser) && !lo.Contains(cfg.allowUsers, "*") { + _ = transporter.Send(c.GenNatHoleResponse(m.TransactionID, nil, fmt.Sprintf("xtcp visitor user [%s] not allowed for [%s]", visitorUser, m.ProxyName))) + return + } + _ = transporter.Send(c.GenNatHoleResponse(m.TransactionID, nil, "")) return } @@ -185,7 +194,7 @@ func (c *Controller) HandleVisitor(m *msg.NatHoleVisitor, transporter transport. _ = transporter.Send(c.GenNatHoleResponse(m.TransactionID, nil, err.Error())) return } - log.Trace("handle visitor message, sid [%s]", sid) + log.Trace("handle visitor message, sid [%s], server name: %s", sid, m.ProxyName) defer func() { c.mu.Lock() @@ -247,7 +256,7 @@ func (c *Controller) HandleClient(m *msg.NatHoleClient, transporter transport.Me if !ok { return } - log.Trace("handle client message, sid [%s]", session.sid) + log.Trace("handle client message, sid [%s], server name: %s", session.sid, m.ProxyName) session.clientMsg = m session.clientTransporter = transporter select { diff --git a/pkg/nathole/nathole.go b/pkg/nathole/nathole.go index a4d5e46..c10eb30 100644 --- a/pkg/nathole/nathole.go +++ b/pkg/nathole/nathole.go @@ -384,7 +384,7 @@ func sendSidMessageToRangePorts( if err := sendFunc(conn, detectAddr); err != nil { xl.Trace("send sid message from %s to %s error: %v", conn.LocalAddr(), detectAddr, err) } - time.Sleep(5 * time.Millisecond) + time.Sleep(2 * time.Millisecond) } } } diff --git a/pkg/plugin/client/http2https.go b/pkg/plugin/client/http2https.go index f50a6c4..f84b0a0 100644 --- a/pkg/plugin/client/http2https.go +++ b/pkg/plugin/client/http2https.go @@ -23,7 +23,7 @@ import ( "net/http/httputil" "strings" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" ) const PluginHTTP2HTTPS = "http2https" @@ -98,7 +98,7 @@ func NewHTTP2HTTPSPlugin(params map[string]string) (Plugin, error) { } func (p *HTTP2HTTPSPlugin) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) { - wrapConn := frpNet.WrapReadWriteCloserToConn(conn, realConn) + wrapConn := utilnet.WrapReadWriteCloserToConn(conn, realConn) _ = p.l.PutConn(wrapConn) } diff --git a/pkg/plugin/client/http_proxy.go b/pkg/plugin/client/http_proxy.go index 8654204..51a191b 100644 --- a/pkg/plugin/client/http_proxy.go +++ b/pkg/plugin/client/http_proxy.go @@ -23,10 +23,10 @@ import ( "strings" "time" - frpIo "github.com/fatedier/golib/io" - gnet "github.com/fatedier/golib/net" + libio "github.com/fatedier/golib/io" + libnet "github.com/fatedier/golib/net" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" "github.com/fatedier/frp/pkg/util/util" ) @@ -69,9 +69,9 @@ func (hp *HTTPProxy) Name() string { } func (hp *HTTPProxy) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) { - wrapConn := frpNet.WrapReadWriteCloserToConn(conn, realConn) + wrapConn := utilnet.WrapReadWriteCloserToConn(conn, realConn) - sc, rd := gnet.NewSharedConn(wrapConn) + sc, rd := libnet.NewSharedConn(wrapConn) firstBytes := make([]byte, 7) _, err := rd.Read(firstBytes) if err != nil { @@ -86,7 +86,7 @@ func (hp *HTTPProxy) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBuf wrapConn.Close() return } - hp.handleConnectReq(request, frpIo.WrapReadWriteCloser(bufRd, wrapConn, wrapConn.Close)) + hp.handleConnectReq(request, libio.WrapReadWriteCloser(bufRd, wrapConn, wrapConn.Close)) return } @@ -158,7 +158,7 @@ func (hp *HTTPProxy) ConnectHandler(rw http.ResponseWriter, req *http.Request) { } _, _ = client.Write([]byte("HTTP/1.1 200 OK\r\n\r\n")) - go frpIo.Join(remote, client) + go libio.Join(remote, client) } func (hp *HTTPProxy) Auth(req *http.Request) bool { @@ -213,7 +213,7 @@ func (hp *HTTPProxy) handleConnectReq(req *http.Request, rwc io.ReadWriteCloser) } _, _ = rwc.Write([]byte("HTTP/1.1 200 OK\r\n\r\n")) - frpIo.Join(remote, rwc) + libio.Join(remote, rwc) } func copyHeaders(dst, src http.Header) { diff --git a/pkg/plugin/client/https2http.go b/pkg/plugin/client/https2http.go index 18138dc..55edf83 100644 --- a/pkg/plugin/client/https2http.go +++ b/pkg/plugin/client/https2http.go @@ -24,7 +24,7 @@ import ( "strings" "github.com/fatedier/frp/pkg/transport" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" ) const PluginHTTPS2HTTP = "https2http" @@ -123,7 +123,7 @@ func (p *HTTPS2HTTPPlugin) genTLSConfig() (*tls.Config, error) { } func (p *HTTPS2HTTPPlugin) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) { - wrapConn := frpNet.WrapReadWriteCloserToConn(conn, realConn) + wrapConn := utilnet.WrapReadWriteCloserToConn(conn, realConn) _ = p.l.PutConn(wrapConn) } diff --git a/pkg/plugin/client/https2https.go b/pkg/plugin/client/https2https.go index 596bdc1..c236c4c 100644 --- a/pkg/plugin/client/https2https.go +++ b/pkg/plugin/client/https2https.go @@ -24,7 +24,7 @@ import ( "strings" "github.com/fatedier/frp/pkg/transport" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" ) const PluginHTTPS2HTTPS = "https2https" @@ -128,7 +128,7 @@ func (p *HTTPS2HTTPSPlugin) genTLSConfig() (*tls.Config, error) { } func (p *HTTPS2HTTPSPlugin) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) { - wrapConn := frpNet.WrapReadWriteCloserToConn(conn, realConn) + wrapConn := utilnet.WrapReadWriteCloserToConn(conn, realConn) _ = p.l.PutConn(wrapConn) } diff --git a/pkg/plugin/client/socks5.go b/pkg/plugin/client/socks5.go index f731e87..06a88b6 100644 --- a/pkg/plugin/client/socks5.go +++ b/pkg/plugin/client/socks5.go @@ -21,7 +21,7 @@ import ( gosocks5 "github.com/armon/go-socks5" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" ) const PluginSocks5 = "socks5" @@ -52,7 +52,7 @@ func NewSocks5Plugin(params map[string]string) (p Plugin, err error) { func (sp *Socks5Plugin) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) { defer conn.Close() - wrapConn := frpNet.WrapReadWriteCloserToConn(conn, realConn) + wrapConn := utilnet.WrapReadWriteCloserToConn(conn, realConn) _ = sp.Server.ServeConn(wrapConn) } diff --git a/pkg/plugin/client/static_file.go b/pkg/plugin/client/static_file.go index 097af06..32a888a 100644 --- a/pkg/plugin/client/static_file.go +++ b/pkg/plugin/client/static_file.go @@ -22,7 +22,7 @@ import ( "github.com/gorilla/mux" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" ) const PluginStaticFile = "static_file" @@ -65,8 +65,8 @@ func NewStaticFilePlugin(params map[string]string) (Plugin, error) { } router := mux.NewRouter() - router.Use(frpNet.NewHTTPAuthMiddleware(httpUser, httpPasswd).SetAuthFailDelay(200 * time.Millisecond).Middleware) - router.PathPrefix(prefix).Handler(frpNet.MakeHTTPGzipHandler(http.StripPrefix(prefix, http.FileServer(http.Dir(localPath))))).Methods("GET") + router.Use(utilnet.NewHTTPAuthMiddleware(httpUser, httpPasswd).SetAuthFailDelay(200 * time.Millisecond).Middleware) + router.PathPrefix(prefix).Handler(utilnet.MakeHTTPGzipHandler(http.StripPrefix(prefix, http.FileServer(http.Dir(localPath))))).Methods("GET") sp.s = &http.Server{ Handler: router, } @@ -77,7 +77,7 @@ func NewStaticFilePlugin(params map[string]string) (Plugin, error) { } func (sp *StaticFilePlugin) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) { - wrapConn := frpNet.WrapReadWriteCloserToConn(conn, realConn) + wrapConn := utilnet.WrapReadWriteCloserToConn(conn, realConn) _ = sp.l.PutConn(wrapConn) } diff --git a/pkg/plugin/client/unix_domain_socket.go b/pkg/plugin/client/unix_domain_socket.go index 6890247..416938b 100644 --- a/pkg/plugin/client/unix_domain_socket.go +++ b/pkg/plugin/client/unix_domain_socket.go @@ -19,7 +19,7 @@ import ( "io" "net" - frpIo "github.com/fatedier/golib/io" + libio "github.com/fatedier/golib/io" ) const PluginUnixDomainSocket = "unix_domain_socket" @@ -62,7 +62,7 @@ func (uds *UnixDomainSocketPlugin) Handle(conn io.ReadWriteCloser, realConn net. } } - frpIo.Join(localConn, conn) + libio.Join(localConn, conn) } func (uds *UnixDomainSocketPlugin) Name() string { diff --git a/pkg/util/net/listener.go b/pkg/util/net/listener.go index 3b199c8..6f2d8a5 100644 --- a/pkg/util/net/listener.go +++ b/pkg/util/net/listener.go @@ -22,20 +22,21 @@ import ( "github.com/fatedier/golib/errors" ) -// Custom listener -type CustomListener struct { +// InternalListener is a listener that can be used to accept connections from +// other goroutines. +type InternalListener struct { acceptCh chan net.Conn closed bool mu sync.Mutex } -func NewCustomListener() *CustomListener { - return &CustomListener{ - acceptCh: make(chan net.Conn, 64), +func NewInternalListener() *InternalListener { + return &InternalListener{ + acceptCh: make(chan net.Conn, 128), } } -func (l *CustomListener) Accept() (net.Conn, error) { +func (l *InternalListener) Accept() (net.Conn, error) { conn, ok := <-l.acceptCh if !ok { return nil, fmt.Errorf("listener closed") @@ -43,7 +44,7 @@ func (l *CustomListener) Accept() (net.Conn, error) { return conn, nil } -func (l *CustomListener) PutConn(conn net.Conn) error { +func (l *InternalListener) PutConn(conn net.Conn) error { err := errors.PanicToError(func() { select { case l.acceptCh <- conn: @@ -54,7 +55,7 @@ func (l *CustomListener) PutConn(conn net.Conn) error { return err } -func (l *CustomListener) Close() error { +func (l *InternalListener) Close() error { l.mu.Lock() defer l.mu.Unlock() if !l.closed { @@ -64,6 +65,16 @@ func (l *CustomListener) Close() error { return nil } -func (l *CustomListener) Addr() net.Addr { - return (*net.TCPAddr)(nil) +func (l *InternalListener) Addr() net.Addr { + return &InternalAddr{} +} + +type InternalAddr struct{} + +func (ia *InternalAddr) Network() string { + return "internal" +} + +func (ia *InternalAddr) String() string { + return "internal" } diff --git a/pkg/util/net/tls.go b/pkg/util/net/tls.go index 3aecb48..6645dfa 100644 --- a/pkg/util/net/tls.go +++ b/pkg/util/net/tls.go @@ -20,7 +20,7 @@ import ( "net" "time" - gnet "github.com/fatedier/golib/net" + libnet "github.com/fatedier/golib/net" ) var FRPTLSHeadByte = 0x17 @@ -28,7 +28,7 @@ var FRPTLSHeadByte = 0x17 func CheckAndEnableTLSServerConnWithTimeout( c net.Conn, tlsConfig *tls.Config, tlsOnly bool, timeout time.Duration, ) (out net.Conn, isTLS bool, custom bool, err error) { - sc, r := gnet.NewSharedConnSize(c, 2) + sc, r := libnet.NewSharedConnSize(c, 2) buf := make([]byte, 1) var n int _ = c.SetReadDeadline(time.Now().Add(timeout)) diff --git a/pkg/util/tcpmux/httpconnect.go b/pkg/util/tcpmux/httpconnect.go index 970897a..d6c0ce5 100644 --- a/pkg/util/tcpmux/httpconnect.go +++ b/pkg/util/tcpmux/httpconnect.go @@ -22,7 +22,7 @@ import ( "net/http" "time" - gnet "github.com/fatedier/golib/net" + libnet "github.com/fatedier/golib/net" "github.com/fatedier/frp/pkg/util/util" "github.com/fatedier/frp/pkg/util/vhost" @@ -94,7 +94,7 @@ func (muxer *HTTPConnectTCPMuxer) auth(c net.Conn, username, password string, re func (muxer *HTTPConnectTCPMuxer) getHostFromHTTPConnect(c net.Conn) (net.Conn, map[string]string, error) { reqInfoMap := make(map[string]string, 0) - sc, rd := gnet.NewSharedConn(c) + sc, rd := libnet.NewSharedConn(c) host, httpUser, httpPwd, err := muxer.readHTTPConnectRequest(rd) if err != nil { diff --git a/pkg/util/version/version.go b/pkg/util/version/version.go index 1623bd8..bc7ea9f 100644 --- a/pkg/util/version/version.go +++ b/pkg/util/version/version.go @@ -19,7 +19,7 @@ import ( "strings" ) -var version = "0.49.0" +var version = "0.50.0" func Full() string { return version diff --git a/pkg/util/vhost/http.go b/pkg/util/vhost/http.go index 5addb47..af3a4ab 100644 --- a/pkg/util/vhost/http.go +++ b/pkg/util/vhost/http.go @@ -28,7 +28,7 @@ import ( "strings" "time" - frpIo "github.com/fatedier/golib/io" + libio "github.com/fatedier/golib/io" "github.com/fatedier/golib/pool" frpLog "github.com/fatedier/frp/pkg/util/log" @@ -256,7 +256,7 @@ func (rp *HTTPReverseProxy) connectHandler(rw http.ResponseWriter, req *http.Req return } _ = req.Write(remote) - go frpIo.Join(remote, client) + go libio.Join(remote, client) } func parseBasicAuth(auth string) (username, password string, ok bool) { diff --git a/pkg/util/vhost/https.go b/pkg/util/vhost/https.go index 2e94b4a..991c929 100644 --- a/pkg/util/vhost/https.go +++ b/pkg/util/vhost/https.go @@ -20,7 +20,7 @@ import ( "net" "time" - gnet "github.com/fatedier/golib/net" + libnet "github.com/fatedier/golib/net" ) type HTTPSMuxer struct { @@ -37,7 +37,7 @@ func NewHTTPSMuxer(listener net.Listener, timeout time.Duration) (*HTTPSMuxer, e func GetHTTPSHostname(c net.Conn) (_ net.Conn, _ map[string]string, err error) { reqInfoMap := make(map[string]string, 0) - sc, rd := gnet.NewSharedConn(c) + sc, rd := libnet.NewSharedConn(c) clientHello, err := readClientHello(rd) if err != nil { diff --git a/pkg/util/vhost/vhost.go b/pkg/util/vhost/vhost.go index acb9cb1..6051a21 100644 --- a/pkg/util/vhost/vhost.go +++ b/pkg/util/vhost/vhost.go @@ -22,7 +22,7 @@ import ( "github.com/fatedier/golib/errors" "github.com/fatedier/frp/pkg/util/log" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" "github.com/fatedier/frp/pkg/util/xlog" ) @@ -282,7 +282,7 @@ func (l *Listener) Accept() (net.Conn, error) { xl.Debug("rewrite host to [%s] success", l.rewriteHost) conn = sConn } - return frpNet.NewContextConn(l.ctx, conn), nil + return utilnet.NewContextConn(l.ctx, conn), nil } func (l *Listener) Close() error { diff --git a/server/control.go b/server/control.go index d7ed327..637a76b 100644 --- a/server/control.go +++ b/server/control.go @@ -30,7 +30,7 @@ import ( "github.com/fatedier/frp/pkg/auth" "github.com/fatedier/frp/pkg/config" "github.com/fatedier/frp/pkg/consts" - frpErr "github.com/fatedier/frp/pkg/errors" + pkgerr "github.com/fatedier/frp/pkg/errors" "github.com/fatedier/frp/pkg/msg" plugin "github.com/fatedier/frp/pkg/plugin/server" "github.com/fatedier/frp/pkg/transport" @@ -268,7 +268,7 @@ func (ctl *Control) GetWorkConn() (workConn net.Conn, err error) { select { case workConn, ok = <-ctl.workConnCh: if !ok { - err = frpErr.ErrCtlClosed + err = pkgerr.ErrCtlClosed return } xl.Debug("get work connection from pool") @@ -283,7 +283,7 @@ func (ctl *Control) GetWorkConn() (workConn net.Conn, err error) { select { case workConn, ok = <-ctl.workConnCh: if !ok { - err = frpErr.ErrCtlClosed + err = pkgerr.ErrCtlClosed xl.Warn("no work connections available, %v", err) return } @@ -394,7 +394,7 @@ func (ctl *Control) stoper() { for _, pxy := range ctl.proxies { pxy.Close() ctl.pxyManager.Del(pxy.GetName()) - metrics.Server.CloseProxy(pxy.GetName(), pxy.GetConf().GetBaseInfo().ProxyType) + metrics.Server.CloseProxy(pxy.GetName(), pxy.GetConf().GetBaseConfig().ProxyType) notifyContent := &plugin.CloseProxyContent{ User: plugin.UserInfo{ @@ -524,7 +524,7 @@ func (ctl *Control) manager() { } func (ctl *Control) HandleNatHoleVisitor(m *msg.NatHoleVisitor) { - ctl.rc.NatHoleController.HandleVisitor(m, ctl.msgTransporter) + ctl.rc.NatHoleController.HandleVisitor(m, ctl.msgTransporter, ctl.loginMsg.User) } func (ctl *Control) HandleNatHoleClient(m *msg.NatHoleClient) { @@ -537,7 +537,7 @@ func (ctl *Control) HandleNatHoleReport(m *msg.NatHoleReport) { func (ctl *Control) RegisterProxy(pxyMsg *msg.NewProxy) (remoteAddr string, err error) { var pxyConf config.ProxyConf - // Load configures from NewProxy message and check. + // Load configures from NewProxy message and validate. pxyConf, err = config.NewProxyConfFromMsg(pxyMsg, ctl.serverCfg) if err != nil { return @@ -550,8 +550,8 @@ func (ctl *Control) RegisterProxy(pxyMsg *msg.NewProxy) (remoteAddr string, err RunID: ctl.runID, } - // NewProxy will return a interface Proxy. - // In fact it create different proxies by different proxy type, we just call run() here. + // NewProxy will return an interface Proxy. + // In fact, it creates different proxies based on the proxy type. We just call run() here. pxy, err := proxy.NewProxy(ctl.ctx, userInfo, ctl.rc, ctl.poolCount, ctl.GetWorkConn, pxyConf, ctl.serverCfg, ctl.loginMsg) if err != nil { return remoteAddr, err @@ -577,6 +577,11 @@ func (ctl *Control) RegisterProxy(pxyMsg *msg.NewProxy) (remoteAddr string, err }() } + if ctl.pxyManager.Exist(pxyMsg.ProxyName) { + err = fmt.Errorf("proxy [%s] already exists", pxyMsg.ProxyName) + return + } + remoteAddr, err = pxy.Run() if err != nil { return @@ -614,7 +619,7 @@ func (ctl *Control) CloseProxy(closeMsg *msg.CloseProxy) (err error) { delete(ctl.proxies, closeMsg.ProxyName) ctl.mu.Unlock() - metrics.Server.CloseProxy(pxy.GetName(), pxy.GetConf().GetBaseInfo().ProxyType) + metrics.Server.CloseProxy(pxy.GetName(), pxy.GetConf().GetBaseConfig().ProxyType) notifyContent := &plugin.CloseProxyContent{ User: plugin.UserInfo{ diff --git a/server/dashboard.go b/server/dashboard.go index ff94139..a5c46ba 100644 --- a/server/dashboard.go +++ b/server/dashboard.go @@ -25,7 +25,7 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/fatedier/frp/assets" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" ) var ( @@ -50,7 +50,7 @@ func (svr *Service) RunDashboardServer(address string) (err error) { subRouter := router.NewRoute().Subrouter() user, passwd := svr.cfg.DashboardUser, svr.cfg.DashboardPwd - subRouter.Use(frpNet.NewHTTPAuthMiddleware(user, passwd).SetAuthFailDelay(200 * time.Millisecond).Middleware) + subRouter.Use(utilnet.NewHTTPAuthMiddleware(user, passwd).SetAuthFailDelay(200 * time.Millisecond).Middleware) // metrics if svr.cfg.EnablePrometheus { @@ -65,7 +65,7 @@ func (svr *Service) RunDashboardServer(address string) (err error) { // view subRouter.Handle("/favicon.ico", http.FileServer(assets.FileSystem)).Methods("GET") - subRouter.PathPrefix("/static/").Handler(frpNet.MakeHTTPGzipHandler(http.StripPrefix("/static/", http.FileServer(assets.FileSystem)))).Methods("GET") + subRouter.PathPrefix("/static/").Handler(utilnet.MakeHTTPGzipHandler(http.StripPrefix("/static/", http.FileServer(assets.FileSystem)))).Methods("GET") subRouter.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, "/static/", http.StatusMovedPermanently) diff --git a/server/proxy/http.go b/server/proxy/http.go index 0f25c8c..432dbc1 100644 --- a/server/proxy/http.go +++ b/server/proxy/http.go @@ -17,19 +17,23 @@ package proxy import ( "io" "net" + "reflect" "strings" - frpIo "github.com/fatedier/golib/io" - "golang.org/x/time/rate" + libio "github.com/fatedier/golib/io" "github.com/fatedier/frp/pkg/config" "github.com/fatedier/frp/pkg/util/limit" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" "github.com/fatedier/frp/pkg/util/util" "github.com/fatedier/frp/pkg/util/vhost" "github.com/fatedier/frp/server/metrics" ) +func init() { + RegisterProxyFactory(reflect.TypeOf(&config.HTTPProxyConf{}), NewHTTPProxy) +} + type HTTPProxy struct { *BaseProxy cfg *config.HTTPProxyConf @@ -37,6 +41,17 @@ type HTTPProxy struct { closeFuncs []func() } +func NewHTTPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy { + unwrapped, ok := cfg.(*config.HTTPProxyConf) + if !ok { + return nil + } + return &HTTPProxy{ + BaseProxy: baseProxy, + cfg: unwrapped, + } +} + func (pxy *HTTPProxy) Run() (remoteAddr string, err error) { xl := pxy.xl routeConfig := vhost.RouteConfig{ @@ -137,10 +152,6 @@ func (pxy *HTTPProxy) GetConf() config.ProxyConf { return pxy.cfg } -func (pxy *HTTPProxy) GetLimiter() *rate.Limiter { - return pxy.limiter -} - func (pxy *HTTPProxy) GetRealConn(remoteAddr string) (workConn net.Conn, err error) { xl := pxy.xl rAddr, errRet := net.ResolveTCPAddr("tcp", remoteAddr) @@ -157,31 +168,31 @@ func (pxy *HTTPProxy) GetRealConn(remoteAddr string) (workConn net.Conn, err err var rwc io.ReadWriteCloser = tmpConn if pxy.cfg.UseEncryption { - rwc, err = frpIo.WithEncryption(rwc, []byte(pxy.serverCfg.Token)) + rwc, err = libio.WithEncryption(rwc, []byte(pxy.serverCfg.Token)) if err != nil { xl.Error("create encryption stream error: %v", err) return } } if pxy.cfg.UseCompression { - rwc = frpIo.WithCompression(rwc) + rwc = libio.WithCompression(rwc) } if pxy.GetLimiter() != nil { - rwc = frpIo.WrapReadWriteCloser(limit.NewReader(rwc, pxy.GetLimiter()), limit.NewWriter(rwc, pxy.GetLimiter()), func() error { + rwc = libio.WrapReadWriteCloser(limit.NewReader(rwc, pxy.GetLimiter()), limit.NewWriter(rwc, pxy.GetLimiter()), func() error { return rwc.Close() }) } - workConn = frpNet.WrapReadWriteCloserToConn(rwc, tmpConn) - workConn = frpNet.WrapStatsConn(workConn, pxy.updateStatsAfterClosedConn) - metrics.Server.OpenConnection(pxy.GetName(), pxy.GetConf().GetBaseInfo().ProxyType) + workConn = utilnet.WrapReadWriteCloserToConn(rwc, tmpConn) + workConn = utilnet.WrapStatsConn(workConn, pxy.updateStatsAfterClosedConn) + metrics.Server.OpenConnection(pxy.GetName(), pxy.GetConf().GetBaseConfig().ProxyType) return } func (pxy *HTTPProxy) updateStatsAfterClosedConn(totalRead, totalWrite int64) { name := pxy.GetName() - proxyType := pxy.GetConf().GetBaseInfo().ProxyType + proxyType := pxy.GetConf().GetBaseConfig().ProxyType metrics.Server.CloseConnection(name, proxyType) metrics.Server.AddTrafficIn(name, proxyType, totalWrite) metrics.Server.AddTrafficOut(name, proxyType, totalRead) diff --git a/server/proxy/https.go b/server/proxy/https.go index 1fb579e..74f0e7c 100644 --- a/server/proxy/https.go +++ b/server/proxy/https.go @@ -15,20 +15,34 @@ package proxy import ( + "reflect" "strings" - "golang.org/x/time/rate" - "github.com/fatedier/frp/pkg/config" "github.com/fatedier/frp/pkg/util/util" "github.com/fatedier/frp/pkg/util/vhost" ) +func init() { + RegisterProxyFactory(reflect.TypeOf(&config.HTTPSProxyConf{}), NewHTTPSProxy) +} + type HTTPSProxy struct { *BaseProxy cfg *config.HTTPSProxyConf } +func NewHTTPSProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy { + unwrapped, ok := cfg.(*config.HTTPSProxyConf) + if !ok { + return nil + } + return &HTTPSProxy{ + BaseProxy: baseProxy, + cfg: unwrapped, + } +} + func (pxy *HTTPSProxy) Run() (remoteAddr string, err error) { xl := pxy.xl routeConfig := &vhost.RouteConfig{} @@ -67,7 +81,7 @@ func (pxy *HTTPSProxy) Run() (remoteAddr string, err error) { addrs = append(addrs, util.CanonicalAddr(routeConfig.Domain, pxy.serverCfg.VhostHTTPSPort)) } - pxy.startListenHandler(pxy, HandleUserTCPConnection) + pxy.startCommonTCPListenersHandler() remoteAddr = strings.Join(addrs, ",") return } @@ -76,10 +90,6 @@ func (pxy *HTTPSProxy) GetConf() config.ProxyConf { return pxy.cfg } -func (pxy *HTTPSProxy) GetLimiter() *rate.Limiter { - return pxy.limiter -} - func (pxy *HTTPSProxy) Close() { pxy.BaseProxy.Close() } diff --git a/server/proxy/proxy.go b/server/proxy/proxy.go index 088d637..aeb2ef0 100644 --- a/server/proxy/proxy.go +++ b/server/proxy/proxy.go @@ -19,23 +19,30 @@ import ( "fmt" "io" "net" + "reflect" "strconv" "sync" "time" - frpIo "github.com/fatedier/golib/io" + libio "github.com/fatedier/golib/io" "golang.org/x/time/rate" "github.com/fatedier/frp/pkg/config" "github.com/fatedier/frp/pkg/msg" plugin "github.com/fatedier/frp/pkg/plugin/server" "github.com/fatedier/frp/pkg/util/limit" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" "github.com/fatedier/frp/pkg/util/xlog" "github.com/fatedier/frp/server/controller" "github.com/fatedier/frp/server/metrics" ) +var proxyFactoryRegistry = map[reflect.Type]func(*BaseProxy, config.ProxyConf) Proxy{} + +func RegisterProxyFactory(proxyConfType reflect.Type, factory func(*BaseProxy, config.ProxyConf) Proxy) { + proxyFactoryRegistry[proxyConfType] = factory +} + type GetWorkConnFn func() (net.Conn, error) type Proxy interface { @@ -63,6 +70,7 @@ type BaseProxy struct { limiter *rate.Limiter userInfo plugin.UserInfo loginMsg *msg.Login + pxyConf config.ProxyConf mu sync.RWMutex xl *xlog.Logger @@ -93,6 +101,10 @@ func (pxy *BaseProxy) GetLoginMsg() *msg.Login { return pxy.loginMsg } +func (pxy *BaseProxy) GetLimiter() *rate.Limiter { + return pxy.limiter +} + func (pxy *BaseProxy) Close() { xl := xlog.FromContextSafe(pxy.ctx) xl.Info("proxy closing") @@ -113,7 +125,7 @@ func (pxy *BaseProxy) GetWorkConnFromPool(src, dst net.Addr) (workConn net.Conn, } xl.Debug("get a new work connection: [%s]", workConn.RemoteAddr().String()) xl.Spawn().AppendPrefix(pxy.GetName()) - workConn = frpNet.NewContextConn(pxy.ctx, workConn) + workConn = utilnet.NewContextConn(pxy.ctx, workConn) var ( srcAddr string @@ -155,10 +167,8 @@ func (pxy *BaseProxy) GetWorkConnFromPool(src, dst net.Addr) (workConn net.Conn, return } -// startListenHandler start a goroutine handler for each listener. -// p: p will just be passed to handler(Proxy, frpNet.Conn). -// handler: each proxy type can set different handler function to deal with connections accepted from listeners. -func (pxy *BaseProxy) startListenHandler(p Proxy, handler func(Proxy, net.Conn, config.ServerCommonConf)) { +// startCommonTCPListenersHandler start a goroutine handler for each listener. +func (pxy *BaseProxy) startCommonTCPListenersHandler() { xl := xlog.FromContextSafe(pxy.ctx) for _, listener := range pxy.listeners { go func(l net.Listener) { @@ -187,97 +197,25 @@ func (pxy *BaseProxy) startListenHandler(p Proxy, handler func(Proxy, net.Conn, return } xl.Info("get a user connection [%s]", c.RemoteAddr().String()) - go handler(p, c, pxy.serverCfg) + go pxy.handleUserTCPConnection(c) } }(listener) } } -func NewProxy(ctx context.Context, userInfo plugin.UserInfo, rc *controller.ResourceController, poolCount int, - getWorkConnFn GetWorkConnFn, pxyConf config.ProxyConf, serverCfg config.ServerCommonConf, loginMsg *msg.Login, -) (pxy Proxy, err error) { - xl := xlog.FromContextSafe(ctx).Spawn().AppendPrefix(pxyConf.GetBaseInfo().ProxyName) - - var limiter *rate.Limiter - limitBytes := pxyConf.GetBaseInfo().BandwidthLimit.Bytes() - if limitBytes > 0 && pxyConf.GetBaseInfo().BandwidthLimitMode == config.BandwidthLimitModeServer { - limiter = rate.NewLimiter(rate.Limit(float64(limitBytes)), int(limitBytes)) - } - - basePxy := BaseProxy{ - name: pxyConf.GetBaseInfo().ProxyName, - rc: rc, - listeners: make([]net.Listener, 0), - poolCount: poolCount, - getWorkConnFn: getWorkConnFn, - serverCfg: serverCfg, - limiter: limiter, - xl: xl, - ctx: xlog.NewContext(ctx, xl), - userInfo: userInfo, - loginMsg: loginMsg, - } - switch cfg := pxyConf.(type) { - case *config.TCPProxyConf: - basePxy.usedPortsNum = 1 - pxy = &TCPProxy{ - BaseProxy: &basePxy, - cfg: cfg, - } - case *config.TCPMuxProxyConf: - pxy = &TCPMuxProxy{ - BaseProxy: &basePxy, - cfg: cfg, - } - case *config.HTTPProxyConf: - pxy = &HTTPProxy{ - BaseProxy: &basePxy, - cfg: cfg, - } - case *config.HTTPSProxyConf: - pxy = &HTTPSProxy{ - BaseProxy: &basePxy, - cfg: cfg, - } - case *config.UDPProxyConf: - basePxy.usedPortsNum = 1 - pxy = &UDPProxy{ - BaseProxy: &basePxy, - cfg: cfg, - } - case *config.STCPProxyConf: - pxy = &STCPProxy{ - BaseProxy: &basePxy, - cfg: cfg, - } - case *config.XTCPProxyConf: - pxy = &XTCPProxy{ - BaseProxy: &basePxy, - cfg: cfg, - } - case *config.SUDPProxyConf: - pxy = &SUDPProxy{ - BaseProxy: &basePxy, - cfg: cfg, - } - default: - return pxy, fmt.Errorf("proxy type not support") - } - return -} - // HandleUserTCPConnection is used for incoming user TCP connections. -// It can be used for tcp, http, https type. -func HandleUserTCPConnection(pxy Proxy, userConn net.Conn, serverCfg config.ServerCommonConf) { +func (pxy *BaseProxy) handleUserTCPConnection(userConn net.Conn) { xl := xlog.FromContextSafe(pxy.Context()) defer userConn.Close() + serverCfg := pxy.serverCfg + cfg := pxy.pxyConf.GetBaseConfig() // server plugin hook rc := pxy.GetResourceController() content := &plugin.NewUserConnContent{ User: pxy.GetUserInfo(), ProxyName: pxy.GetName(), - ProxyType: pxy.GetConf().GetBaseInfo().ProxyType, + ProxyType: cfg.ProxyType, RemoteAddr: userConn.RemoteAddr().String(), } _, err := rc.PluginManager.NewUserConn(content) @@ -294,21 +232,20 @@ func HandleUserTCPConnection(pxy Proxy, userConn net.Conn, serverCfg config.Serv defer workConn.Close() var local io.ReadWriteCloser = workConn - cfg := pxy.GetConf().GetBaseInfo() xl.Trace("handler user tcp connection, use_encryption: %t, use_compression: %t", cfg.UseEncryption, cfg.UseCompression) if cfg.UseEncryption { - local, err = frpIo.WithEncryption(local, []byte(serverCfg.Token)) + local, err = libio.WithEncryption(local, []byte(serverCfg.Token)) if err != nil { xl.Error("create encryption stream error: %v", err) return } } if cfg.UseCompression { - local = frpIo.WithCompression(local) + local = libio.WithCompression(local) } if pxy.GetLimiter() != nil { - local = frpIo.WrapReadWriteCloser(limit.NewReader(local, pxy.GetLimiter()), limit.NewWriter(local, pxy.GetLimiter()), func() error { + local = libio.WrapReadWriteCloser(limit.NewReader(local, pxy.GetLimiter()), limit.NewWriter(local, pxy.GetLimiter()), func() error { return local.Close() }) } @@ -317,15 +254,52 @@ func HandleUserTCPConnection(pxy Proxy, userConn net.Conn, serverCfg config.Serv workConn.RemoteAddr().String(), userConn.LocalAddr().String(), userConn.RemoteAddr().String()) name := pxy.GetName() - proxyType := pxy.GetConf().GetBaseInfo().ProxyType + proxyType := cfg.ProxyType metrics.Server.OpenConnection(name, proxyType) - inCount, outCount, _ := frpIo.Join(local, userConn) + inCount, outCount, _ := libio.Join(local, userConn) metrics.Server.CloseConnection(name, proxyType) metrics.Server.AddTrafficIn(name, proxyType, inCount) metrics.Server.AddTrafficOut(name, proxyType, outCount) xl.Debug("join connections closed") } +func NewProxy(ctx context.Context, userInfo plugin.UserInfo, rc *controller.ResourceController, poolCount int, + getWorkConnFn GetWorkConnFn, pxyConf config.ProxyConf, serverCfg config.ServerCommonConf, loginMsg *msg.Login, +) (pxy Proxy, err error) { + xl := xlog.FromContextSafe(ctx).Spawn().AppendPrefix(pxyConf.GetBaseConfig().ProxyName) + + var limiter *rate.Limiter + limitBytes := pxyConf.GetBaseConfig().BandwidthLimit.Bytes() + if limitBytes > 0 && pxyConf.GetBaseConfig().BandwidthLimitMode == config.BandwidthLimitModeServer { + limiter = rate.NewLimiter(rate.Limit(float64(limitBytes)), int(limitBytes)) + } + + basePxy := BaseProxy{ + name: pxyConf.GetBaseConfig().ProxyName, + rc: rc, + listeners: make([]net.Listener, 0), + poolCount: poolCount, + getWorkConnFn: getWorkConnFn, + serverCfg: serverCfg, + limiter: limiter, + xl: xl, + ctx: xlog.NewContext(ctx, xl), + userInfo: userInfo, + loginMsg: loginMsg, + pxyConf: pxyConf, + } + + factory := proxyFactoryRegistry[reflect.TypeOf(pxyConf)] + if factory == nil { + return pxy, fmt.Errorf("proxy type not support") + } + pxy = factory(&basePxy, pxyConf) + if pxy == nil { + return nil, fmt.Errorf("proxy not created") + } + return pxy, nil +} + type Manager struct { // proxies indexed by proxy name pxys map[string]Proxy @@ -350,6 +324,13 @@ func (pm *Manager) Add(name string, pxy Proxy) error { return nil } +func (pm *Manager) Exist(name string) bool { + pm.mu.RLock() + defer pm.mu.RUnlock() + _, ok := pm.pxys[name] + return ok +} + func (pm *Manager) Del(name string) { pm.mu.Lock() defer pm.mu.Unlock() diff --git a/server/proxy/stcp.go b/server/proxy/stcp.go index 2ece405..7c1511a 100644 --- a/server/proxy/stcp.go +++ b/server/proxy/stcp.go @@ -15,19 +15,39 @@ package proxy import ( - "golang.org/x/time/rate" + "reflect" "github.com/fatedier/frp/pkg/config" ) +func init() { + RegisterProxyFactory(reflect.TypeOf(&config.STCPProxyConf{}), NewSTCPProxy) +} + type STCPProxy struct { *BaseProxy cfg *config.STCPProxyConf } +func NewSTCPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy { + unwrapped, ok := cfg.(*config.STCPProxyConf) + if !ok { + return nil + } + return &STCPProxy{ + BaseProxy: baseProxy, + cfg: unwrapped, + } +} + func (pxy *STCPProxy) Run() (remoteAddr string, err error) { xl := pxy.xl - listener, errRet := pxy.rc.VisitorManager.Listen(pxy.GetName(), pxy.cfg.Sk) + allowUsers := pxy.cfg.AllowUsers + // if allowUsers is empty, only allow same user from proxy + if len(allowUsers) == 0 { + allowUsers = []string{pxy.GetUserInfo().User} + } + listener, errRet := pxy.rc.VisitorManager.Listen(pxy.GetName(), pxy.cfg.Sk, allowUsers) if errRet != nil { err = errRet return @@ -35,7 +55,7 @@ func (pxy *STCPProxy) Run() (remoteAddr string, err error) { pxy.listeners = append(pxy.listeners, listener) xl.Info("stcp proxy custom listen success") - pxy.startListenHandler(pxy, HandleUserTCPConnection) + pxy.startCommonTCPListenersHandler() return } @@ -43,10 +63,6 @@ func (pxy *STCPProxy) GetConf() config.ProxyConf { return pxy.cfg } -func (pxy *STCPProxy) GetLimiter() *rate.Limiter { - return pxy.limiter -} - func (pxy *STCPProxy) Close() { pxy.BaseProxy.Close() pxy.rc.VisitorManager.CloseListener(pxy.GetName()) diff --git a/server/proxy/sudp.go b/server/proxy/sudp.go index 93707f2..492b095 100644 --- a/server/proxy/sudp.go +++ b/server/proxy/sudp.go @@ -15,20 +15,39 @@ package proxy import ( - "golang.org/x/time/rate" + "reflect" "github.com/fatedier/frp/pkg/config" ) +func init() { + RegisterProxyFactory(reflect.TypeOf(&config.SUDPProxyConf{}), NewSUDPProxy) +} + type SUDPProxy struct { *BaseProxy cfg *config.SUDPProxyConf } +func NewSUDPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy { + unwrapped, ok := cfg.(*config.SUDPProxyConf) + if !ok { + return nil + } + return &SUDPProxy{ + BaseProxy: baseProxy, + cfg: unwrapped, + } +} + func (pxy *SUDPProxy) Run() (remoteAddr string, err error) { xl := pxy.xl - - listener, errRet := pxy.rc.VisitorManager.Listen(pxy.GetName(), pxy.cfg.Sk) + allowUsers := pxy.cfg.AllowUsers + // if allowUsers is empty, only allow same user from proxy + if len(allowUsers) == 0 { + allowUsers = []string{pxy.GetUserInfo().User} + } + listener, errRet := pxy.rc.VisitorManager.Listen(pxy.GetName(), pxy.cfg.Sk, allowUsers) if errRet != nil { err = errRet return @@ -36,7 +55,7 @@ func (pxy *SUDPProxy) Run() (remoteAddr string, err error) { pxy.listeners = append(pxy.listeners, listener) xl.Info("sudp proxy custom listen success") - pxy.startListenHandler(pxy, HandleUserTCPConnection) + pxy.startCommonTCPListenersHandler() return } @@ -44,10 +63,6 @@ func (pxy *SUDPProxy) GetConf() config.ProxyConf { return pxy.cfg } -func (pxy *SUDPProxy) GetLimiter() *rate.Limiter { - return pxy.limiter -} - func (pxy *SUDPProxy) Close() { pxy.BaseProxy.Close() pxy.rc.VisitorManager.CloseListener(pxy.GetName()) diff --git a/server/proxy/tcp.go b/server/proxy/tcp.go index 1ba0fb1..5bb5c1a 100644 --- a/server/proxy/tcp.go +++ b/server/proxy/tcp.go @@ -17,24 +17,39 @@ package proxy import ( "fmt" "net" + "reflect" "strconv" - "golang.org/x/time/rate" - "github.com/fatedier/frp/pkg/config" ) +func init() { + RegisterProxyFactory(reflect.TypeOf(&config.TCPProxyConf{}), NewTCPProxy) +} + type TCPProxy struct { *BaseProxy cfg *config.TCPProxyConf - realPort int + realBindPort int +} + +func NewTCPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy { + unwrapped, ok := cfg.(*config.TCPProxyConf) + if !ok { + return nil + } + baseProxy.usedPortsNum = 1 + return &TCPProxy{ + BaseProxy: baseProxy, + cfg: unwrapped, + } } func (pxy *TCPProxy) Run() (remoteAddr string, err error) { xl := pxy.xl if pxy.cfg.Group != "" { - l, realPort, errRet := pxy.rc.TCPGroupCtl.Listen(pxy.name, pxy.cfg.Group, pxy.cfg.GroupKey, pxy.serverCfg.ProxyBindAddr, pxy.cfg.RemotePort) + l, realBindPort, errRet := pxy.rc.TCPGroupCtl.Listen(pxy.name, pxy.cfg.Group, pxy.cfg.GroupKey, pxy.serverCfg.ProxyBindAddr, pxy.cfg.RemotePort) if errRet != nil { err = errRet return @@ -44,20 +59,20 @@ func (pxy *TCPProxy) Run() (remoteAddr string, err error) { l.Close() } }() - pxy.realPort = realPort + pxy.realBindPort = realBindPort pxy.listeners = append(pxy.listeners, l) xl.Info("tcp proxy listen port [%d] in group [%s]", pxy.cfg.RemotePort, pxy.cfg.Group) } else { - pxy.realPort, err = pxy.rc.TCPPortManager.Acquire(pxy.name, pxy.cfg.RemotePort) + pxy.realBindPort, err = pxy.rc.TCPPortManager.Acquire(pxy.name, pxy.cfg.RemotePort) if err != nil { return } defer func() { if err != nil { - pxy.rc.TCPPortManager.Release(pxy.realPort) + pxy.rc.TCPPortManager.Release(pxy.realBindPort) } }() - listener, errRet := net.Listen("tcp", net.JoinHostPort(pxy.serverCfg.ProxyBindAddr, strconv.Itoa(pxy.realPort))) + listener, errRet := net.Listen("tcp", net.JoinHostPort(pxy.serverCfg.ProxyBindAddr, strconv.Itoa(pxy.realBindPort))) if errRet != nil { err = errRet return @@ -66,9 +81,9 @@ func (pxy *TCPProxy) Run() (remoteAddr string, err error) { xl.Info("tcp proxy listen port [%d]", pxy.cfg.RemotePort) } - pxy.cfg.RemotePort = pxy.realPort - remoteAddr = fmt.Sprintf(":%d", pxy.realPort) - pxy.startListenHandler(pxy, HandleUserTCPConnection) + pxy.cfg.RemotePort = pxy.realBindPort + remoteAddr = fmt.Sprintf(":%d", pxy.realBindPort) + pxy.startCommonTCPListenersHandler() return } @@ -76,13 +91,9 @@ func (pxy *TCPProxy) GetConf() config.ProxyConf { return pxy.cfg } -func (pxy *TCPProxy) GetLimiter() *rate.Limiter { - return pxy.limiter -} - func (pxy *TCPProxy) Close() { pxy.BaseProxy.Close() if pxy.cfg.Group == "" { - pxy.rc.TCPPortManager.Release(pxy.realPort) + pxy.rc.TCPPortManager.Release(pxy.realBindPort) } } diff --git a/server/proxy/tcpmux.go b/server/proxy/tcpmux.go index 23e833b..6d25a84 100644 --- a/server/proxy/tcpmux.go +++ b/server/proxy/tcpmux.go @@ -17,21 +17,35 @@ package proxy import ( "fmt" "net" + "reflect" "strings" - "golang.org/x/time/rate" - "github.com/fatedier/frp/pkg/config" "github.com/fatedier/frp/pkg/consts" "github.com/fatedier/frp/pkg/util/util" "github.com/fatedier/frp/pkg/util/vhost" ) +func init() { + RegisterProxyFactory(reflect.TypeOf(&config.TCPMuxProxyConf{}), NewTCPMuxProxy) +} + type TCPMuxProxy struct { *BaseProxy cfg *config.TCPMuxProxyConf } +func NewTCPMuxProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy { + unwrapped, ok := cfg.(*config.TCPMuxProxyConf) + if !ok { + return nil + } + return &TCPMuxProxy{ + BaseProxy: baseProxy, + cfg: unwrapped, + } +} + func (pxy *TCPMuxProxy) httpConnectListen( domain, routeByHTTPUser, httpUser, httpPwd string, addrs []string) ([]string, error, ) { @@ -78,7 +92,7 @@ func (pxy *TCPMuxProxy) httpConnectRun() (remoteAddr string, err error) { } } - pxy.startListenHandler(pxy, HandleUserTCPConnection) + pxy.startCommonTCPListenersHandler() remoteAddr = strings.Join(addrs, ",") return remoteAddr, err } @@ -101,10 +115,6 @@ func (pxy *TCPMuxProxy) GetConf() config.ProxyConf { return pxy.cfg } -func (pxy *TCPMuxProxy) GetLimiter() *rate.Limiter { - return pxy.limiter -} - func (pxy *TCPMuxProxy) Close() { pxy.BaseProxy.Close() } diff --git a/server/proxy/udp.go b/server/proxy/udp.go index 3a136c3..20108bf 100644 --- a/server/proxy/udp.go +++ b/server/proxy/udp.go @@ -19,26 +19,30 @@ import ( "fmt" "io" "net" + "reflect" "strconv" "time" "github.com/fatedier/golib/errors" - frpIo "github.com/fatedier/golib/io" - "golang.org/x/time/rate" + libio "github.com/fatedier/golib/io" "github.com/fatedier/frp/pkg/config" "github.com/fatedier/frp/pkg/msg" "github.com/fatedier/frp/pkg/proto/udp" "github.com/fatedier/frp/pkg/util/limit" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" "github.com/fatedier/frp/server/metrics" ) +func init() { + RegisterProxyFactory(reflect.TypeOf(&config.UDPProxyConf{}), NewUDPProxy) +} + type UDPProxy struct { *BaseProxy cfg *config.UDPProxyConf - realPort int + realBindPort int // udpConn is the listener of udp packages udpConn *net.UDPConn @@ -59,21 +63,33 @@ type UDPProxy struct { isClosed bool } +func NewUDPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy { + unwrapped, ok := cfg.(*config.UDPProxyConf) + if !ok { + return nil + } + baseProxy.usedPortsNum = 1 + return &UDPProxy{ + BaseProxy: baseProxy, + cfg: unwrapped, + } +} + func (pxy *UDPProxy) Run() (remoteAddr string, err error) { xl := pxy.xl - pxy.realPort, err = pxy.rc.UDPPortManager.Acquire(pxy.name, pxy.cfg.RemotePort) + pxy.realBindPort, err = pxy.rc.UDPPortManager.Acquire(pxy.name, pxy.cfg.RemotePort) if err != nil { return "", fmt.Errorf("acquire port %d error: %v", pxy.cfg.RemotePort, err) } defer func() { if err != nil { - pxy.rc.UDPPortManager.Release(pxy.realPort) + pxy.rc.UDPPortManager.Release(pxy.realBindPort) } }() - remoteAddr = fmt.Sprintf(":%d", pxy.realPort) - pxy.cfg.RemotePort = pxy.realPort - addr, errRet := net.ResolveUDPAddr("udp", net.JoinHostPort(pxy.serverCfg.ProxyBindAddr, strconv.Itoa(pxy.realPort))) + remoteAddr = fmt.Sprintf(":%d", pxy.realBindPort) + pxy.cfg.RemotePort = pxy.realBindPort + addr, errRet := net.ResolveUDPAddr("udp", net.JoinHostPort(pxy.serverCfg.ProxyBindAddr, strconv.Itoa(pxy.realBindPort))) if errRet != nil { err = errRet return @@ -124,7 +140,7 @@ func (pxy *UDPProxy) Run() (remoteAddr string, err error) { pxy.readCh <- m metrics.Server.AddTrafficOut( pxy.GetName(), - pxy.GetConf().GetBaseInfo().ProxyType, + pxy.GetConf().GetBaseConfig().ProxyType, int64(len(m.Content)), ) }); errRet != nil { @@ -154,7 +170,7 @@ func (pxy *UDPProxy) Run() (remoteAddr string, err error) { xl.Trace("send message to udp workConn: %s", udpMsg.Content) metrics.Server.AddTrafficIn( pxy.GetName(), - pxy.GetConf().GetBaseInfo().ProxyType, + pxy.GetConf().GetBaseConfig().ProxyType, int64(len(udpMsg.Content)), ) continue @@ -189,7 +205,7 @@ func (pxy *UDPProxy) Run() (remoteAddr string, err error) { var rwc io.ReadWriteCloser = workConn if pxy.cfg.UseEncryption { - rwc, err = frpIo.WithEncryption(rwc, []byte(pxy.serverCfg.Token)) + rwc, err = libio.WithEncryption(rwc, []byte(pxy.serverCfg.Token)) if err != nil { xl.Error("create encryption stream error: %v", err) workConn.Close() @@ -197,16 +213,16 @@ func (pxy *UDPProxy) Run() (remoteAddr string, err error) { } } if pxy.cfg.UseCompression { - rwc = frpIo.WithCompression(rwc) + rwc = libio.WithCompression(rwc) } if pxy.GetLimiter() != nil { - rwc = frpIo.WrapReadWriteCloser(limit.NewReader(rwc, pxy.GetLimiter()), limit.NewWriter(rwc, pxy.GetLimiter()), func() error { + rwc = libio.WrapReadWriteCloser(limit.NewReader(rwc, pxy.GetLimiter()), limit.NewWriter(rwc, pxy.GetLimiter()), func() error { return rwc.Close() }) } - pxy.workConn = frpNet.WrapReadWriteCloserToConn(rwc, workConn) + pxy.workConn = utilnet.WrapReadWriteCloserToConn(rwc, workConn) ctx, cancel := context.WithCancel(context.Background()) go workConnReaderFn(pxy.workConn) go workConnSenderFn(pxy.workConn, ctx) @@ -233,10 +249,6 @@ func (pxy *UDPProxy) GetConf() config.ProxyConf { return pxy.cfg } -func (pxy *UDPProxy) GetLimiter() *rate.Limiter { - return pxy.limiter -} - func (pxy *UDPProxy) Close() { pxy.mu.Lock() defer pxy.mu.Unlock() @@ -254,5 +266,5 @@ func (pxy *UDPProxy) Close() { close(pxy.readCh) close(pxy.sendCh) } - pxy.rc.UDPPortManager.Release(pxy.realPort) + pxy.rc.UDPPortManager.Release(pxy.realBindPort) } diff --git a/server/proxy/xtcp.go b/server/proxy/xtcp.go index 8b2717b..acf127d 100644 --- a/server/proxy/xtcp.go +++ b/server/proxy/xtcp.go @@ -16,14 +16,18 @@ package proxy import ( "fmt" + "reflect" "github.com/fatedier/golib/errors" - "golang.org/x/time/rate" "github.com/fatedier/frp/pkg/config" "github.com/fatedier/frp/pkg/msg" ) +func init() { + RegisterProxyFactory(reflect.TypeOf(&config.XTCPProxyConf{}), NewXTCPProxy) +} + type XTCPProxy struct { *BaseProxy cfg *config.XTCPProxyConf @@ -31,15 +35,33 @@ type XTCPProxy struct { closeCh chan struct{} } +func NewXTCPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy { + unwrapped, ok := cfg.(*config.XTCPProxyConf) + if !ok { + return nil + } + return &XTCPProxy{ + BaseProxy: baseProxy, + cfg: unwrapped, + } +} + func (pxy *XTCPProxy) Run() (remoteAddr string, err error) { xl := pxy.xl if pxy.rc.NatHoleController == nil { - xl.Error("udp port for xtcp is not specified.") err = fmt.Errorf("xtcp is not supported in frps") return } - sidCh := pxy.rc.NatHoleController.ListenClient(pxy.GetName(), pxy.cfg.Sk) + allowUsers := pxy.cfg.AllowUsers + // if allowUsers is empty, only allow same user from proxy + if len(allowUsers) == 0 { + allowUsers = []string{pxy.GetUserInfo().User} + } + sidCh, err := pxy.rc.NatHoleController.ListenClient(pxy.GetName(), pxy.cfg.Sk, allowUsers) + if err != nil { + return "", err + } go func() { for { select { @@ -68,10 +90,6 @@ func (pxy *XTCPProxy) GetConf() config.ProxyConf { return pxy.cfg } -func (pxy *XTCPProxy) GetLimiter() *rate.Limiter { - return pxy.limiter -} - func (pxy *XTCPProxy) Close() { pxy.BaseProxy.Close() pxy.rc.NatHoleController.CloseClient(pxy.GetName()) diff --git a/server/service.go b/server/service.go index 0cdd266..3c4f5a8 100644 --- a/server/service.go +++ b/server/service.go @@ -39,7 +39,7 @@ import ( plugin "github.com/fatedier/frp/pkg/plugin/server" "github.com/fatedier/frp/pkg/transport" "github.com/fatedier/frp/pkg/util/log" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" "github.com/fatedier/frp/pkg/util/tcpmux" "github.com/fatedier/frp/pkg/util/util" "github.com/fatedier/frp/pkg/util/version" @@ -210,7 +210,7 @@ func NewService(cfg config.ServerCommonConf) (svr *Service, err error) { // Listen for accepting connections from client using kcp protocol. if cfg.KCPBindPort > 0 { address := net.JoinHostPort(cfg.BindAddr, strconv.Itoa(cfg.KCPBindPort)) - svr.kcpListener, err = frpNet.ListenKcp(address) + svr.kcpListener, err = utilnet.ListenKcp(address) if err != nil { err = fmt.Errorf("listen on kcp udp address %s error: %v", address, err) return @@ -235,11 +235,11 @@ func NewService(cfg config.ServerCommonConf) (svr *Service, err error) { } // Listen for accepting connections from client using websocket protocol. - websocketPrefix := []byte("GET " + frpNet.FrpWebsocketPath) + websocketPrefix := []byte("GET " + utilnet.FrpWebsocketPath) websocketLn := svr.muxer.Listen(0, uint32(len(websocketPrefix)), func(data []byte) bool { return bytes.Equal(data, websocketPrefix) }) - svr.websocketListener = frpNet.NewWebsocketListener(websocketLn) + svr.websocketListener = utilnet.NewWebsocketListener(websocketLn) // Create http vhost muxer. if cfg.VhostHTTPPort > 0 { @@ -294,7 +294,7 @@ func NewService(cfg config.ServerCommonConf) (svr *Service, err error) { // frp tls listener svr.tlsListener = svr.muxer.Listen(2, 1, func(data []byte) bool { // tls first byte can be 0x16 only when vhost https port is not same with bind port - return int(data[0]) == frpNet.FRPTLSHeadByte || int(data[0]) == 0x16 + return int(data[0]) == utilnet.FRPTLSHeadByte || int(data[0]) == 0x16 }) // Create nat hole controller. @@ -442,12 +442,12 @@ func (svr *Service) HandleListener(l net.Listener) { xl := xlog.New() ctx := context.Background() - c = frpNet.NewContextConn(xlog.NewContext(ctx, xl), c) + c = utilnet.NewContextConn(xlog.NewContext(ctx, xl), c) log.Trace("start check TLS connection...") originConn := c var isTLS, custom bool - c, isTLS, custom, err = frpNet.CheckAndEnableTLSServerConnWithTimeout(c, svr.tlsConfig, svr.cfg.TLSOnly, connReadTimeout) + c, isTLS, custom, err = utilnet.CheckAndEnableTLSServerConnWithTimeout(c, svr.tlsConfig, svr.cfg.TLSOnly, connReadTimeout) if err != nil { log.Warn("CheckAndEnableTLSServerConnWithTimeout error: %v", err) originConn.Close() @@ -461,6 +461,7 @@ func (svr *Service) HandleListener(l net.Listener) { fmuxCfg := fmux.DefaultConfig() fmuxCfg.KeepAliveInterval = time.Duration(svr.cfg.TCPMuxKeepaliveInterval) * time.Second fmuxCfg.LogOutput = io.Discard + fmuxCfg.MaxStreamWindowSize = 6 * 1024 * 1024 session, err := fmux.Server(frpConn, fmuxCfg) if err != nil { log.Warn("Failed to create mux connection: %v", err) @@ -501,7 +502,7 @@ func (svr *Service) HandleQUICListener(l quic.Listener) { _ = frpConn.CloseWithError(0, "") return } - go svr.handleConnection(ctx, frpNet.QuicStreamToNetConn(stream, frpConn)) + go svr.handleConnection(ctx, utilnet.QuicStreamToNetConn(stream, frpConn)) } }(context.Background(), c) } @@ -517,7 +518,7 @@ func (svr *Service) RegisterControl(ctlConn net.Conn, loginMsg *msg.Login) (err } } - ctx := frpNet.NewContextFromConn(ctlConn) + ctx := utilnet.NewContextFromConn(ctlConn) xl := xlog.FromContextSafe(ctx) xl.AppendPrefix(loginMsg.RunID) ctx = xlog.NewContext(ctx, xl) @@ -555,7 +556,7 @@ func (svr *Service) RegisterControl(ctlConn net.Conn, loginMsg *msg.Login) (err // RegisterWorkConn register a new work connection to control and proxies need it. func (svr *Service) RegisterWorkConn(workConn net.Conn, newMsg *msg.NewWorkConn) error { - xl := frpNet.NewLogFromConn(workConn) + xl := utilnet.NewLogFromConn(workConn) ctl, exist := svr.ctlManager.GetByID(newMsg.RunID) if !exist { xl.Warn("No client control found for run id [%s]", newMsg.RunID) @@ -587,6 +588,15 @@ func (svr *Service) RegisterWorkConn(workConn net.Conn, newMsg *msg.NewWorkConn) } func (svr *Service) RegisterVisitorConn(visitorConn net.Conn, newMsg *msg.NewVisitorConn) error { + visitorUser := "" + // TODO: Compatible with old versions, can be without runID, user is empty. In later versions, it will be mandatory to include runID. + if newMsg.RunID != "" { + ctl, exist := svr.ctlManager.GetByID(newMsg.RunID) + if !exist { + return fmt.Errorf("no client control found for run id [%s]", newMsg.RunID) + } + visitorUser = ctl.loginMsg.User + } return svr.rc.VisitorManager.NewConn(newMsg.ProxyName, visitorConn, newMsg.Timestamp, newMsg.SignKey, - newMsg.UseEncryption, newMsg.UseCompression) + newMsg.UseEncryption, newMsg.UseCompression, visitorUser) } diff --git a/server/visitor/visitor.go b/server/visitor/visitor.go index 70f603b..c76bcee 100644 --- a/server/visitor/visitor.go +++ b/server/visitor/visitor.go @@ -20,66 +20,78 @@ import ( "net" "sync" - frpIo "github.com/fatedier/golib/io" + libio "github.com/fatedier/golib/io" + "github.com/samber/lo" - frpNet "github.com/fatedier/frp/pkg/util/net" + utilnet "github.com/fatedier/frp/pkg/util/net" "github.com/fatedier/frp/pkg/util/util" ) +type listenerBundle struct { + l *utilnet.InternalListener + sk string + allowUsers []string +} + // Manager for visitor listeners. type Manager struct { - visitorListeners map[string]*frpNet.CustomListener - skMap map[string]string + listeners map[string]*listenerBundle mu sync.RWMutex } func NewManager() *Manager { return &Manager{ - visitorListeners: make(map[string]*frpNet.CustomListener), - skMap: make(map[string]string), + listeners: make(map[string]*listenerBundle), } } -func (vm *Manager) Listen(name string, sk string) (l *frpNet.CustomListener, err error) { +func (vm *Manager) Listen(name string, sk string, allowUsers []string) (l *utilnet.InternalListener, err error) { vm.mu.Lock() defer vm.mu.Unlock() - if _, ok := vm.visitorListeners[name]; ok { + if _, ok := vm.listeners[name]; ok { err = fmt.Errorf("custom listener for [%s] is repeated", name) return } - l = frpNet.NewCustomListener() - vm.visitorListeners[name] = l - vm.skMap[name] = sk + l = utilnet.NewInternalListener() + vm.listeners[name] = &listenerBundle{ + l: l, + sk: sk, + allowUsers: allowUsers, + } return } func (vm *Manager) NewConn(name string, conn net.Conn, timestamp int64, signKey string, - useEncryption bool, useCompression bool, + useEncryption bool, useCompression bool, visitorUser string, ) (err error) { vm.mu.RLock() defer vm.mu.RUnlock() - if l, ok := vm.visitorListeners[name]; ok { - var sk string - if sk = vm.skMap[name]; util.GetAuthKey(sk, timestamp) != signKey { + if l, ok := vm.listeners[name]; ok { + if util.GetAuthKey(l.sk, timestamp) != signKey { err = fmt.Errorf("visitor connection of [%s] auth failed", name) return } + if !lo.Contains(l.allowUsers, visitorUser) && !lo.Contains(l.allowUsers, "*") { + err = fmt.Errorf("visitor connection of [%s] user [%s] not allowed", name, visitorUser) + return + } + var rwc io.ReadWriteCloser = conn if useEncryption { - if rwc, err = frpIo.WithEncryption(rwc, []byte(sk)); err != nil { + if rwc, err = libio.WithEncryption(rwc, []byte(l.sk)); err != nil { err = fmt.Errorf("create encryption connection failed: %v", err) return } } if useCompression { - rwc = frpIo.WithCompression(rwc) + rwc = libio.WithCompression(rwc) } - err = l.PutConn(frpNet.WrapReadWriteCloserToConn(rwc, conn)) + err = l.l.PutConn(utilnet.WrapReadWriteCloserToConn(rwc, conn)) } else { err = fmt.Errorf("custom listener for [%s] doesn't exist", name) return @@ -91,6 +103,5 @@ func (vm *Manager) CloseListener(name string) { vm.mu.Lock() defer vm.mu.Unlock() - delete(vm.visitorListeners, name) - delete(vm.skMap, name) + delete(vm.listeners, name) } diff --git a/test/e2e/basic/basic.go b/test/e2e/basic/basic.go index 111e494..d9deafb 100644 --- a/test/e2e/basic/basic.go +++ b/test/e2e/basic/basic.go @@ -282,8 +282,9 @@ var _ = ginkgo.Describe("[Feature: Basic]", func() { proxyType := t ginkgo.It(fmt.Sprintf("Expose echo server with %s", strings.ToUpper(proxyType)), func() { serverConf := consts.DefaultServerConfig - clientServerConf := consts.DefaultClientConfig - clientVisitorConf := consts.DefaultClientConfig + clientServerConf := consts.DefaultClientConfig + "\nuser = user1" + clientVisitorConf := consts.DefaultClientConfig + "\nuser = user1" + clientUser2VisitorConf := consts.DefaultClientConfig + "\nuser = user2" localPortName := "" protocol := "tcp" @@ -323,11 +324,14 @@ var _ = ginkgo.Describe("[Feature: Basic]", func() { } tests := []struct { - proxyName string - bindPortName string - visitorSK string - extraConfig string - expectError bool + proxyName string + bindPortName string + visitorSK string + commonExtraConfig string + proxyExtraConfig string + visitorExtraConfig string + expectError bool + user2 bool }{ { proxyName: "normal", @@ -335,22 +339,22 @@ var _ = ginkgo.Describe("[Feature: Basic]", func() { visitorSK: correctSK, }, { - proxyName: "with-encryption", - bindPortName: port.GenName("WithEncryption"), - visitorSK: correctSK, - extraConfig: "use_encryption = true", + proxyName: "with-encryption", + bindPortName: port.GenName("WithEncryption"), + visitorSK: correctSK, + commonExtraConfig: "use_encryption = true", }, { - proxyName: "with-compression", - bindPortName: port.GenName("WithCompression"), - visitorSK: correctSK, - extraConfig: "use_compression = true", + proxyName: "with-compression", + bindPortName: port.GenName("WithCompression"), + visitorSK: correctSK, + commonExtraConfig: "use_compression = true", }, { proxyName: "with-encryption-and-compression", bindPortName: port.GenName("WithEncryptionAndCompression"), visitorSK: correctSK, - extraConfig: ` + commonExtraConfig: ` use_encryption = true use_compression = true `, @@ -361,22 +365,57 @@ var _ = ginkgo.Describe("[Feature: Basic]", func() { visitorSK: wrongSK, expectError: true, }, + { + proxyName: "allowed-user", + bindPortName: port.GenName("AllowedUser"), + visitorSK: correctSK, + proxyExtraConfig: "allow_users = another, user2", + visitorExtraConfig: "server_user = user1", + user2: true, + }, + { + proxyName: "not-allowed-user", + bindPortName: port.GenName("NotAllowedUser"), + visitorSK: correctSK, + proxyExtraConfig: "allow_users = invalid", + visitorExtraConfig: "server_user = user1", + expectError: true, + }, + { + proxyName: "allow-all", + bindPortName: port.GenName("AllowAll"), + visitorSK: correctSK, + proxyExtraConfig: "allow_users = *", + visitorExtraConfig: "server_user = user1", + user2: true, + }, } // build all client config for _, test := range tests { - clientServerConf += getProxyServerConf(test.proxyName, test.extraConfig) + "\n" + clientServerConf += getProxyServerConf(test.proxyName, test.commonExtraConfig+"\n"+test.proxyExtraConfig) + "\n" } for _, test := range tests { - clientVisitorConf += getProxyVisitorConf(test.proxyName, test.bindPortName, test.visitorSK, test.extraConfig) + "\n" + config := getProxyVisitorConf( + test.proxyName, test.bindPortName, test.visitorSK, test.commonExtraConfig+"\n"+test.visitorExtraConfig, + ) + "\n" + if test.user2 { + clientUser2VisitorConf += config + } else { + clientVisitorConf += config + } } // run frps and frpc - f.RunProcesses([]string{serverConf}, []string{clientServerConf, clientVisitorConf}) + f.RunProcesses([]string{serverConf}, []string{clientServerConf, clientVisitorConf, clientUser2VisitorConf}) for _, test := range tests { + timeout := time.Second + if t == "xtcp" { + timeout = 4 * time.Second + } framework.NewRequestExpect(f). RequestModify(func(r *request.Request) { - r.Timeout(5 * time.Second) + r.Timeout(timeout) }). Protocol(protocol). PortName(test.bindPortName). diff --git a/test/e2e/basic/client_server.go b/test/e2e/basic/client_server.go index 65ba2ba..a02e454 100644 --- a/test/e2e/basic/client_server.go +++ b/test/e2e/basic/client_server.go @@ -101,11 +101,13 @@ var _ = ginkgo.Describe("[Feature: Client-Server]", func() { supportProtocols := []string{"tcp", "kcp", "quic", "websocket"} for _, protocol := range supportProtocols { tmp := protocol - defineClientServerTest("TLS over "+strings.ToUpper(tmp), f, &generalTestConfigures{ + // Since v0.50.0, the default value of tls_enable has been changed to true. + // Therefore, here it needs to be set as false to test the scenario of turning it off. + defineClientServerTest("Disable TLS over "+strings.ToUpper(tmp), f, &generalTestConfigures{ server: fmt.Sprintf(` %s `, renderBindPortConfig(protocol)), - client: fmt.Sprintf(`tls_enable = true + client: fmt.Sprintf(`tls_enable = false protocol = %s `, protocol), }) @@ -113,10 +115,10 @@ var _ = ginkgo.Describe("[Feature: Client-Server]", func() { defineClientServerTest("enable tls_only, client with TLS", f, &generalTestConfigures{ server: "tls_only = true", - client: "tls_enable = true", }) defineClientServerTest("enable tls_only, client without TLS", f, &generalTestConfigures{ server: "tls_only = true", + client: "tls_enable = false", expectError: true, }) }) @@ -155,7 +157,6 @@ var _ = ginkgo.Describe("[Feature: Client-Server]", func() { `, renderBindPortConfig(tmp), caCrtPath), client: fmt.Sprintf(` protocol = %s - tls_enable = true tls_cert_file = %s tls_key_file = %s `, tmp, clientCrtPath, clientKeyPath), @@ -172,7 +173,6 @@ var _ = ginkgo.Describe("[Feature: Client-Server]", func() { `, renderBindPortConfig(tmp), serverCrtPath, serverKeyPath, caCrtPath), client: fmt.Sprintf(` protocol = %s - tls_enable = true tls_cert_file = %s tls_key_file = %s tls_trusted_ca_file = %s @@ -211,7 +211,6 @@ var _ = ginkgo.Describe("[Feature: Client-Server]", func() { tls_trusted_ca_file = %s `, serverCrtPath, serverKeyPath, caCrtPath), client: fmt.Sprintf(` - tls_enable = true tls_server_name = example.com tls_cert_file = %s tls_key_file = %s @@ -228,7 +227,6 @@ var _ = ginkgo.Describe("[Feature: Client-Server]", func() { tls_trusted_ca_file = %s `, serverCrtPath, serverKeyPath, caCrtPath), client: fmt.Sprintf(` - tls_enable = true tls_server_name = invalid.com tls_cert_file = %s tls_key_file = %s @@ -239,7 +237,7 @@ var _ = ginkgo.Describe("[Feature: Client-Server]", func() { }) }) - ginkgo.Describe("TLS with disable_custom_tls_first_byte", func() { + ginkgo.Describe("TLS with disable_custom_tls_first_byte set to false", func() { supportProtocols := []string{"tcp", "kcp", "quic", "websocket"} for _, protocol := range supportProtocols { tmp := protocol @@ -248,9 +246,8 @@ var _ = ginkgo.Describe("[Feature: Client-Server]", func() { %s `, renderBindPortConfig(protocol)), client: fmt.Sprintf(` - tls_enable = true protocol = %s - disable_custom_tls_first_byte = true + disable_custom_tls_first_byte = false `, protocol), }) } @@ -266,9 +263,7 @@ var _ = ginkgo.Describe("[Feature: Client-Server]", func() { %s `, renderBindPortConfig(protocol)), client: fmt.Sprintf(` - tls_enable = true protocol = %s - disable_custom_tls_first_byte = true `, protocol), }) } diff --git a/test/e2e/basic/server.go b/test/e2e/basic/server.go index 4ae8251..bfa2f2e 100644 --- a/test/e2e/basic/server.go +++ b/test/e2e/basic/server.go @@ -37,7 +37,7 @@ var _ = ginkgo.Describe("[Feature: Server Manager]", func() { [tcp-port-not-allowed] type = tcp local_port = {{ .%s }} - remote_port = 20001 + remote_port = 25001 `, framework.TCPEchoServerPort) clientConf += fmt.Sprintf(` [tcp-port-unavailable] @@ -55,7 +55,7 @@ var _ = ginkgo.Describe("[Feature: Server Manager]", func() { [udp-port-not-allowed] type = udp local_port = {{ .%s }} - remote_port = 20003 + remote_port = 25003 `, framework.UDPEchoServerPort) f.RunProcesses([]string{serverConf}, []string{clientConf}) @@ -65,7 +65,7 @@ var _ = ginkgo.Describe("[Feature: Server Manager]", func() { framework.NewRequestExpect(f).PortName(tcpPortName).Ensure() // Not Allowed - framework.NewRequestExpect(f).Port(25003).ExpectError(true).Ensure() + framework.NewRequestExpect(f).Port(25001).ExpectError(true).Ensure() // Unavailable, already bind by frps framework.NewRequestExpect(f).PortName(consts.PortServerName).ExpectError(true).Ensure() diff --git a/test/e2e/basic/xtcp.go b/test/e2e/basic/xtcp.go new file mode 100644 index 0000000..a501d79 --- /dev/null +++ b/test/e2e/basic/xtcp.go @@ -0,0 +1,52 @@ +package basic + +import ( + "fmt" + "time" + + "github.com/onsi/ginkgo/v2" + + "github.com/fatedier/frp/test/e2e/framework" + "github.com/fatedier/frp/test/e2e/framework/consts" + "github.com/fatedier/frp/test/e2e/pkg/port" + "github.com/fatedier/frp/test/e2e/pkg/request" +) + +var _ = ginkgo.Describe("[Feature: XTCP]", func() { + f := framework.NewDefaultFramework() + + ginkgo.It("Fallback To STCP", func() { + serverConf := consts.DefaultServerConfig + clientConf := consts.DefaultClientConfig + + bindPortName := port.GenName("XTCP") + clientConf += fmt.Sprintf(` + [foo] + type = stcp + local_port = {{ .%s }} + + [foo-visitor] + type = stcp + role = visitor + server_name = foo + bind_port = -1 + + [bar-visitor] + type = xtcp + role = visitor + server_name = bar + bind_port = {{ .%s }} + keep_tunnel_open = true + fallback_to = foo-visitor + fallback_timeout_ms = 200 + `, framework.TCPEchoServerPort, bindPortName) + + f.RunProcesses([]string{serverConf}, []string{clientConf}) + framework.NewRequestExpect(f). + RequestModify(func(r *request.Request) { + r.Timeout(time.Second) + }). + PortName(bindPortName). + Ensure() + }) +}) diff --git a/test/e2e/framework/process.go b/test/e2e/framework/process.go index dba809d..ca717e2 100644 --- a/test/e2e/framework/process.go +++ b/test/e2e/framework/process.go @@ -56,7 +56,7 @@ func (f *Framework) RunProcesses(serverTemplates []string, clientTemplates []str ExpectNoError(err) time.Sleep(500 * time.Millisecond) } - time.Sleep(2 * time.Second) + time.Sleep(3 * time.Second) return currentServerProcesses, currentClientProcesses } diff --git a/web/frps/src/components/ServerOverview.vue b/web/frps/src/components/ServerOverview.vue index e9a830e..8266b48 100644 --- a/web/frps/src/components/ServerOverview.vue +++ b/web/frps/src/components/ServerOverview.vue @@ -14,9 +14,6 @@ {{ data.bind_port }} - - {{ data.bind_udp_port }} - {{ data.kcp_bind_port }} @@ -91,7 +88,6 @@ import LongSpan from './LongSpan.vue' let data = ref({ version: '', bind_port: 0, - bind_udp_port: 0, kcp_bind_port: 0, quic_bind_port: 0, vhost_http_port: 0, @@ -114,7 +110,6 @@ const fetchData = () => { .then((json) => { data.value.version = json.version data.value.bind_port = json.bind_port - data.value.bind_udp_port = json.bind_udp_port data.value.kcp_bind_port = json.kcp_bind_port data.value.quic_bind_port = json.quic_bind_port data.value.vhost_http_port = json.vhost_http_port