mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-12-26 07:24:10 +08:00
105 lines
361 KiB
JavaScript
105 lines
361 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Setup-CdphtcBj.js","./DocumentTitle-DG90V81t.js","./Overview-B99qGorf.js","./Connections-N_Z6THP_.js","./index-CBBLUqwt.js","./time-CHbJgbks.js","./Logs-uIQcQmXC.js","./Proxies-Lk5uJ4LX.js","./IconReload--QlVe2wP.js","./Rules-C4_l0aqo.js","./Config-9NNS9COU.js"])))=>i.map(i=>d[i]);
|
||
var zx=Object.defineProperty;var Wx=(e,t,n)=>t in e?zx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Kt=(e,t,n)=>Wx(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();const jx="modulepreload",Hx=function(e,t){return new URL(e,t).href},uh={},Ti=function(t,n,i){let o=Promise.resolve();if(n&&n.length>0){const c=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),f=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));o=Promise.allSettled(n.map(h=>{if(h=Hx(h,i),h in uh)return;uh[h]=!0;const p=h.endsWith(".css"),m=p?'[rel="stylesheet"]':"";if(!!i)for(let A=c.length-1;A>=0;A--){const T=c[A];if(T.href===h&&(!p||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${h}"]${m}`))return;const w=document.createElement("link");if(w.rel=p?"stylesheet":jx,p||(w.as="script"),w.crossOrigin="",w.href=h,f&&w.setAttribute("nonce",f),document.head.appendChild(w),p)return new Promise((A,T)=>{w.addEventListener("load",A),w.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${h}`)))})}))}function a(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return o.then(c=>{for(const u of c||[])u.status==="rejected"&&a(u.reason);return t().catch(a)})},be={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return fh(this.context.count)},getNextContextId(){return fh(this.context.count++)}};function fh(e){const t=String(e),n=t.length-1;return be.context.id+(n?String.fromCharCode(96+n):"")+t}function zs(e){be.context=e}const Zx=(e,t)=>e===t,zn=Symbol("solid-proxy"),mp=typeof Proxy=="function",Ia=Symbol("solid-track"),Ra={equals:Zx};let vp=_p;const Er=1,La=2,yp={owned:null,cleanups:null,context:null,owner:null},kc={};var Ze=null;let Pc=null,qx=null,Ye=null,Mt=null,Tr=null,nl=0;function Tn(e,t){const n=Ye,i=Ze,o=e.length===0,a=t===void 0?i:t,c=o?yp:{owned:null,cleanups:null,context:a?a.context:null,owner:a},u=o?e:()=>e(()=>xe(()=>Ys(c)));Ze=c,Ye=null;try{return Qn(u,!0)}finally{Ye=n,Ze=i}}function J(e,t){t=t?Object.assign({},Ra,t):Ra;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},i=o=>(typeof o=="function"&&(o=o(n.value)),wp(n,o));return[bp.bind(n),i]}function dh(e,t,n){const i=il(e,t,!0,Er);ys(i)}function ze(e,t,n){const i=il(e,t,!1,Er);ys(i)}function Re(e,t,n){vp=Qx;const i=il(e,t,!1,Er);(!n||!n.render)&&(i.user=!0),Tr?Tr.push(i):ys(i)}function de(e,t,n){n=n?Object.assign({},Ra,n):Ra;const i=il(e,t,!0,0);return i.observers=null,i.observerSlots=null,i.comparator=n.equals||void 0,ys(i),bp.bind(i)}function Gx(e){return e&&typeof e=="object"&&"then"in e}function Vx(e,t,n){let i,o,a;arguments.length===2&&typeof t=="object"||arguments.length===1?(i=!0,o=e,a=t||{}):(i=e,o=t,a={});let c=null,u=kc,f=null,h=!1,p="initialValue"in a,m=typeof i=="function"&&de(i);const b=new Set,[w,A]=(a.storage||J)(a.initialValue),[T,S]=J(void 0),[_,C]=J(void 0,{equals:!1}),[L,N]=J(p?"ready":"unresolved");be.context&&(f=be.getNextContextId(),a.ssrLoadFrom==="initial"?u=a.initialValue:be.load&&be.has(f)&&(u=be.load(f)));function F(oe,X,j,ne){return c===oe&&(c=null,ne!==void 0&&(p=!0),(oe===u||X===u)&&a.onHydrated&&queueMicrotask(()=>a.onHydrated(ne,{value:X})),u=kc,Y(X,j)),X}function Y(oe,X){Qn(()=>{X===void 0&&A(()=>oe),N(X!==void 0?"errored":p?"ready":"unresolved"),S(X);for(const j of b.keys())j.decrement();b.clear()},!1)}function re(){const oe=Yx,X=w(),j=T();if(j!==void 0&&!c)throw j;return Ye&&!Ye.user&&oe&&dh(()=>{_(),c&&(oe.resolved||b.has(oe)||(oe.increment(),b.add(oe)))}),X}function he(oe=!0){if(oe!==!1&&h)return;h=!1;const X=m?m():i;if(X==null||X===!1){F(c,xe(w));return}const j=u!==kc?u:xe(()=>o(X,{value:w(),refetching:oe}));return Gx(j)?(c=j,"value"in j?(j.status==="success"?F(c,j.value,void 0,X):F(c,void 0,qc(j.value),X),j):(h=!0,queueMicrotask(()=>h=!1),Qn(()=>{N(p?"refreshing":"pending"),C()},!1),j.then(ne=>F(j,ne,void 0,X),ne=>F(j,void 0,qc(ne),X)))):(F(c,j,void 0,X),j)}return Object.defineProperties(re,{state:{get:()=>L()},error:{get:()=>T()},loading:{get(){const oe=L();return oe==="pending"||oe==="refreshing"}},latest:{get(){if(!p)return re();const oe=T();if(oe&&!c)throw oe;return w()}}}),m?dh(()=>he(!1)):he(!1),[re,{refetch:he,mutate:A}]}function An(e){return Qn(e,!1)}function xe(e){if(Ye===null)return e();const t=Ye;Ye=null;try{return e()}finally{Ye=t}}function rl(e,t,n){const i=Array.isArray(e);let o,a=n&&n.defer;return c=>{let u;if(i){u=Array(e.length);for(let h=0;h<e.length;h++)u[h]=e[h]()}else u=e();if(a)return a=!1,c;const f=xe(()=>t(u,o,c));return o=u,f}}function vs(e){Re(()=>xe(e))}function Xe(e){return Ze===null||(Ze.cleanups===null?Ze.cleanups=[e]:Ze.cleanups.push(e)),e}function Zc(){return Ye}function ls(){return Ze}function gu(e,t){const n=Ze,i=Ye;Ze=e,Ye=null;try{return Qn(t,!0)}catch(o){mu(o)}finally{Ze=n,Ye=i}}function Kx(e){const t=Ye,n=Ze;return Promise.resolve().then(()=>{Ye=t,Ze=n;let i;return Qn(e,!1),Ye=Ze=null,i?i.done:void 0})}function sr(e,t){const n=Symbol("context");return{id:n,Provider:e1(n),defaultValue:e}}function On(e){let t;return Ze&&Ze.context&&(t=Ze.context[e.id])!==void 0?t:e.defaultValue}function ei(e){const t=de(e),n=de(()=>Gc(t()));return n.toArray=()=>{const i=n();return Array.isArray(i)?i:i!=null?[i]:[]},n}let Yx;function bp(){if(this.sources&&this.state)if(this.state===Er)ys(this);else{const e=Mt;Mt=null,Qn(()=>$a(this),!1),Mt=e}if(Ye){const e=this.observers?this.observers.length:0;Ye.sources?(Ye.sources.push(this),Ye.sourceSlots.push(e)):(Ye.sources=[this],Ye.sourceSlots=[e]),this.observers?(this.observers.push(Ye),this.observerSlots.push(Ye.sources.length-1)):(this.observers=[Ye],this.observerSlots=[Ye.sources.length-1])}return this.value}function wp(e,t,n){let i=e.value;return(!e.comparator||!e.comparator(i,t))&&(e.value=t,e.observers&&e.observers.length&&Qn(()=>{for(let o=0;o<e.observers.length;o+=1){const a=e.observers[o],c=Pc&&Pc.running;c&&Pc.disposed.has(a),(c?!a.tState:!a.state)&&(a.pure?Mt.push(a):Tr.push(a),a.observers&&xp(a)),c||(a.state=Er)}if(Mt.length>1e6)throw Mt=[],new Error},!1)),t}function ys(e){if(!e.fn)return;Ys(e);const t=nl;Xx(e,e.value,t)}function Xx(e,t,n){let i;const o=Ze,a=Ye;Ye=Ze=e;try{i=e.fn(t)}catch(c){return e.pure&&(e.state=Er,e.owned&&e.owned.forEach(Ys),e.owned=null),e.updatedAt=n+1,mu(c)}finally{Ye=a,Ze=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?wp(e,i):e.value=i,e.updatedAt=n)}function il(e,t,n,i=Er,o){const a={fn:e,state:i,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Ze,context:Ze?Ze.context:null,pure:n};return Ze===null||Ze!==yp&&(Ze.owned?Ze.owned.push(a):Ze.owned=[a]),a}function Ma(e){if(e.state===0)return;if(e.state===La)return $a(e);if(e.suspense&&xe(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<nl);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Er)ys(e);else if(e.state===La){const i=Mt;Mt=null,Qn(()=>$a(e,t[0]),!1),Mt=i}}function Qn(e,t){if(Mt)return e();let n=!1;t||(Mt=[]),Tr?n=!0:Tr=[],nl++;try{const i=e();return Jx(n),i}catch(i){n||(Tr=null),Mt=null,mu(i)}}function Jx(e){if(Mt&&(_p(Mt),Mt=null),e)return;const t=Tr;Tr=null,t.length&&Qn(()=>vp(t),!1)}function _p(e){for(let t=0;t<e.length;t++)Ma(e[t])}function Qx(e){let t,n=0;for(t=0;t<e.length;t++){const i=e[t];i.user?e[n++]=i:Ma(i)}if(be.context){if(be.count){be.effects||(be.effects=[]),be.effects.push(...e.slice(0,n));return}zs()}for(be.effects&&(be.done||!be.count)&&(e=[...be.effects,...e],n+=be.effects.length,delete be.effects),t=0;t<n;t++)Ma(e[t])}function $a(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const i=e.sources[n];if(i.sources){const o=i.state;o===Er?i!==t&&(!i.updatedAt||i.updatedAt<nl)&&Ma(i):o===La&&$a(i,t)}}}function xp(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=La,n.pure?Mt.push(n):Tr.push(n),n.observers&&xp(n))}}function Ys(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),i=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const a=o.pop(),c=n.observerSlots.pop();i<o.length&&(a.sourceSlots[c]=i,o[i]=a,n.observerSlots[i]=c)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Ys(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ys(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function qc(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function mu(e,t=Ze){throw qc(e)}function Gc(e){if(typeof e=="function"&&!e.length)return Gc(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const i=Gc(e[n]);Array.isArray(i)?t.push.apply(t,i):t.push(i)}return t}return e}function e1(e,t){return function(i){let o;return ze(()=>o=xe(()=>(Ze.context={...Ze.context,[e]:i.value},ei(()=>i.children))),void 0),o}}const Vc=Symbol("fallback");function Na(e){for(let t=0;t<e.length;t++)e[t]()}function t1(e,t,n={}){let i=[],o=[],a=[],c=0,u=t.length>1?[]:null;return Xe(()=>Na(a)),()=>{let f=e()||[],h=f.length,p,m;return f[Ia],xe(()=>{let w,A,T,S,_,C,L,N,F;if(h===0)c!==0&&(Na(a),a=[],i=[],o=[],c=0,u&&(u=[])),n.fallback&&(i=[Vc],o[0]=Tn(Y=>(a[0]=Y,n.fallback())),c=1);else if(c===0){for(o=new Array(h),m=0;m<h;m++)i[m]=f[m],o[m]=Tn(b);c=h}else{for(T=new Array(h),S=new Array(h),u&&(_=new Array(h)),C=0,L=Math.min(c,h);C<L&&i[C]===f[C];C++);for(L=c-1,N=h-1;L>=C&&N>=C&&i[L]===f[N];L--,N--)T[N]=o[L],S[N]=a[L],u&&(_[N]=u[L]);for(w=new Map,A=new Array(N+1),m=N;m>=C;m--)F=f[m],p=w.get(F),A[m]=p===void 0?-1:p,w.set(F,m);for(p=C;p<=L;p++)F=i[p],m=w.get(F),m!==void 0&&m!==-1?(T[m]=o[p],S[m]=a[p],u&&(_[m]=u[p]),m=A[m],w.set(F,m)):a[p]();for(m=C;m<h;m++)m in T?(o[m]=T[m],a[m]=S[m],u&&(u[m]=_[m],u[m](m))):o[m]=Tn(b);o=o.slice(0,c=h),i=f.slice(0)}return o});function b(w){if(a[m]=w,u){const[A,T]=J(m);return u[m]=T,t(f[m],A)}return t(f[m])}}}function n1(e,t,n={}){let i=[],o=[],a=[],c=[],u=0,f;return Xe(()=>Na(a)),()=>{const h=e()||[],p=h.length;return h[Ia],xe(()=>{if(p===0)return u!==0&&(Na(a),a=[],i=[],o=[],u=0,c=[]),n.fallback&&(i=[Vc],o[0]=Tn(b=>(a[0]=b,n.fallback())),u=1),o;for(i[0]===Vc&&(a[0](),a=[],i=[],o=[],u=0),f=0;f<p;f++)f<i.length&&i[f]!==h[f]?c[f](()=>h[f]):f>=i.length&&(o[f]=Tn(m));for(;f<i.length;f++)a[f]();return u=c.length=a.length=p,i=h.slice(0),o=o.slice(0,u)});function m(b){a[f]=b;const[w,A]=J(h[f]);return c[f]=A,t(w,f)}}}function B(e,t){return xe(()=>e(t||{}))}function fa(){return!0}const Kc={get(e,t,n){return t===zn?n:e.get(t)},has(e,t){return t===zn?!0:e.has(t)},set:fa,deleteProperty:fa,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:fa,deleteProperty:fa}},ownKeys(e){return e.keys()}};function Dc(e){return(e=typeof e=="function"?e():e)?e:{}}function r1(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function qe(...e){let t=!1;for(let c=0;c<e.length;c++){const u=e[c];t=t||!!u&&zn in u,e[c]=typeof u=="function"?(t=!0,de(u)):u}if(mp&&t)return new Proxy({get(c){for(let u=e.length-1;u>=0;u--){const f=Dc(e[u])[c];if(f!==void 0)return f}},has(c){for(let u=e.length-1;u>=0;u--)if(c in Dc(e[u]))return!0;return!1},keys(){const c=[];for(let u=0;u<e.length;u++)c.push(...Object.keys(Dc(e[u])));return[...new Set(c)]}},Kc);const n={},i=Object.create(null);for(let c=e.length-1;c>=0;c--){const u=e[c];if(!u)continue;const f=Object.getOwnPropertyNames(u);for(let h=f.length-1;h>=0;h--){const p=f[h];if(p==="__proto__"||p==="constructor")continue;const m=Object.getOwnPropertyDescriptor(u,p);if(!i[p])i[p]=m.get?{enumerable:!0,configurable:!0,get:r1.bind(n[p]=[m.get.bind(u)])}:m.value!==void 0?m:void 0;else{const b=n[p];b&&(m.get?b.push(m.get.bind(u)):m.value!==void 0&&b.push(()=>m.value))}}}const o={},a=Object.keys(i);for(let c=a.length-1;c>=0;c--){const u=a[c],f=i[u];f&&f.get?Object.defineProperty(o,u,f):o[u]=f?f.value:void 0}return o}function en(e,...t){if(mp&&zn in e){const o=new Set(t.length>1?t.flat():t[0]),a=t.map(c=>new Proxy({get(u){return c.includes(u)?e[u]:void 0},has(u){return c.includes(u)&&u in e},keys(){return c.filter(u=>u in e)}},Kc));return a.push(new Proxy({get(c){return o.has(c)?void 0:e[c]},has(c){return o.has(c)?!1:c in e},keys(){return Object.keys(e).filter(c=>!o.has(c))}},Kc)),a}const n={},i=t.map(()=>({}));for(const o of Object.getOwnPropertyNames(e)){const a=Object.getOwnPropertyDescriptor(e,o),c=!a.get&&!a.set&&a.enumerable&&a.writable&&a.configurable;let u=!1,f=0;for(const h of t)h.includes(o)&&(u=!0,c?i[f][o]=a.value:Object.defineProperty(i[f],o,a)),++f;u||(c?n[o]=a.value:Object.defineProperty(n,o,a))}return[...i,n]}function Ci(e){let t,n;const i=o=>{const a=be.context;if(a){const[u,f]=J();be.count||(be.count=0),be.count++,(n||(n=e())).then(h=>{!be.done&&zs(a),be.count--,f(()=>h.default),zs()}),t=u}else if(!t){const[u]=Vx(()=>(n||(n=e())).then(f=>f.default));t=u}let c;return de(()=>(c=t())?xe(()=>{if(!a||be.done)return c(o);const u=be.context;zs(a);const f=c(o);return zs(u),f}):"")};return i.preload=()=>n||((n=e()).then(o=>t=()=>o.default),n),i}let i1=0;function go(){return be.context?be.getNextContextId():`cl-${i1++}`}const Sp=e=>`Stale read from <${e}>.`;function Zr(e){const t="fallback"in e&&{fallback:()=>e.fallback};return de(t1(()=>e.each,e.children,t||void 0))}function s1(e){const t="fallback"in e&&{fallback:()=>e.fallback};return de(n1(()=>e.each,e.children,t||void 0))}function Qt(e){const t=e.keyed,n=de(()=>e.when,void 0,{equals:(i,o)=>t?i===o:!i==!o});return de(()=>{const i=n();if(i){const o=e.children;return typeof o=="function"&&o.length>0?xe(()=>o(t?i:()=>{if(!xe(n))throw Sp("Show");return e.when})):o}return e.fallback},void 0,void 0)}function o1(e){let t=!1;const n=(a,c)=>(t?a[1]===c[1]:!a[1]==!c[1])&&a[2]===c[2],i=ei(()=>e.children),o=de(()=>{let a=i();Array.isArray(a)||(a=[a]);for(let c=0;c<a.length;c++){const u=a[c].when;if(u)return t=!!a[c].keyed,[c,u,a[c]]}return[-1]},void 0,{equals:n});return de(()=>{const[a,c,u]=o();if(a<0)return e.fallback;const f=u.children;return typeof f=="function"&&f.length>0?xe(()=>f(t?c:()=>{if(xe(o)[0]!==a)throw Sp("Match");return u.when})):f},void 0,void 0)}function da(e){return e}const a1=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],l1=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...a1]),c1=new Set(["innerHTML","textContent","innerText","children"]),u1=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),f1=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function d1(e,t){const n=f1[e];return typeof n=="object"?n[t]?n.$:void 0:n}const h1=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Ap=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),p1={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function g1(e,t,n){let i=n.length,o=t.length,a=i,c=0,u=0,f=t[o-1].nextSibling,h=null;for(;c<o||u<a;){if(t[c]===n[u]){c++,u++;continue}for(;t[o-1]===n[a-1];)o--,a--;if(o===c){const p=a<i?u?n[u-1].nextSibling:n[a-u]:f;for(;u<a;)e.insertBefore(n[u++],p)}else if(a===u)for(;c<o;)(!h||!h.has(t[c]))&&t[c].remove(),c++;else if(t[c]===n[a-1]&&n[u]===t[o-1]){const p=t[--o].nextSibling;e.insertBefore(n[u++],t[c++].nextSibling),e.insertBefore(n[--a],p),t[o]=n[a]}else{if(!h){h=new Map;let m=u;for(;m<a;)h.set(n[m],m++)}const p=h.get(t[c]);if(p!=null)if(u<p&&p<a){let m=c,b=1,w;for(;++m<o&&m<a&&!((w=h.get(t[m]))==null||w!==p+b);)b++;if(b>p-u){const A=t[c];for(;u<p;)e.insertBefore(n[u++],A)}else e.replaceChild(n[u++],t[c++])}else c++;else t[c++].remove()}}}const hh="_$DX_DELEGATE";function m1(e,t,n,i={}){let o;return Tn(a=>{o=a,t===document?e():te(t,e(),t.firstChild?null:void 0,n)},i.owner),()=>{o(),t.textContent=""}}function Me(e,t,n){let i;const o=()=>{const c=document.createElement("template");return c.innerHTML=e,n?c.content.firstChild.firstChild:c.content.firstChild},a=t?()=>xe(()=>document.importNode(i||(i=o()),!0)):()=>(i||(i=o())).cloneNode(!0);return a.cloneNode=a,a}function Oi(e,t=window.document){const n=t[hh]||(t[hh]=new Set);for(let i=0,o=e.length;i<o;i++){const a=e[i];n.has(a)||(n.add(a),t.addEventListener(a,S1))}}function dn(e,t,n){Ei(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function v1(e,t,n,i){Ei(e)||(i==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,i))}function y1(e,t,n){Ei(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function er(e,t){Ei(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Tp(e,t,n,i){if(i)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=a=>o.call(e,n[1],a))}else e.addEventListener(t,n,typeof n!="function"&&n)}function b1(e,t,n={}){const i=Object.keys(t||{}),o=Object.keys(n);let a,c;for(a=0,c=o.length;a<c;a++){const u=o[a];!u||u==="undefined"||t[u]||(ph(e,u,!1),delete n[u])}for(a=0,c=i.length;a<c;a++){const u=i[a],f=!!t[u];!u||u==="undefined"||n[u]===f||!f||(ph(e,u,!0),n[u]=f)}return n}function Mn(e,t,n){if(!t)return n?dn(e,"style"):t;const i=e.style;if(typeof t=="string")return i.cssText=t;typeof n=="string"&&(i.cssText=n=void 0),n||(n={}),t||(t={});let o,a;for(a in n)t[a]==null&&i.removeProperty(a),delete n[a];for(a in t)o=t[a],o!==n[a]&&(i.setProperty(a,o),n[a]=o);return n}function Wt(e,t={},n,i){const o={};return i||ze(()=>o.children=cs(e,t.children,o.children)),ze(()=>typeof t.ref=="function"&&ti(t.ref,e)),ze(()=>Cp(e,t,n,!0,o,!0)),o}function w1(e,t){const n=e[t];return Object.defineProperty(e,t,{get(){return n()},enumerable:!0}),e}function ti(e,t,n){return xe(()=>e(t,n))}function te(e,t,n,i){if(n!==void 0&&!i&&(i=[]),typeof t!="function")return cs(e,t,i,n);ze(o=>cs(e,t(),o,n),i)}function Cp(e,t,n,i,o={},a=!1){t||(t={});for(const c in o)if(!(c in t)){if(c==="children")continue;o[c]=gh(e,c,null,o[c],n,a,t)}for(const c in t){if(c==="children"){i||cs(e,t.children);continue}const u=t[c];o[c]=gh(e,c,u,o[c],n,a,t)}}function _1(e){let t,n;return!Ei()||!(t=be.registry.get(n=A1()))?e():(be.completed&&be.completed.add(t),be.registry.delete(n),t)}function Ei(e){return!!be.context&&!be.done&&(!e||e.isConnected)}function x1(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function ph(e,t,n){const i=t.trim().split(/\s+/);for(let o=0,a=i.length;o<a;o++)e.classList.toggle(i[o],n)}function gh(e,t,n,i,o,a,c){let u,f,h,p,m;if(t==="style")return Mn(e,n,i);if(t==="classList")return b1(e,n,i);if(n===i)return i;if(t==="ref")a||n(e);else if(t.slice(0,3)==="on:"){const b=t.slice(3);i&&e.removeEventListener(b,i,typeof i!="function"&&i),n&&e.addEventListener(b,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const b=t.slice(10);i&&e.removeEventListener(b,i,!0),n&&e.addEventListener(b,n,!0)}else if(t.slice(0,2)==="on"){const b=t.slice(2).toLowerCase(),w=h1.has(b);if(!w&&i){const A=Array.isArray(i)?i[0]:i;e.removeEventListener(b,A)}(w||n)&&(Tp(e,b,n,w),w&&Oi([b]))}else if(t.slice(0,5)==="attr:")dn(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")y1(e,t.slice(5),n);else if((m=t.slice(0,5)==="prop:")||(h=c1.has(t))||!o&&((p=d1(t,e.tagName))||(f=l1.has(t)))||(u=e.nodeName.includes("-")||"is"in c)){if(m)t=t.slice(5),f=!0;else if(Ei(e))return n;t==="class"||t==="className"?er(e,n):u&&!f&&!h?e[x1(t)]=n:e[p||t]=n}else{const b=o&&t.indexOf(":")>-1&&p1[t.split(":")[0]];b?v1(e,b,t,n):dn(e,u1[t]||t,n)}return n}function S1(e){if(be.registry&&be.events&&be.events.find(([f,h])=>h===e))return;let t=e.target;const n=`$$${e.type}`,i=e.target,o=e.currentTarget,a=f=>Object.defineProperty(e,"target",{configurable:!0,value:f}),c=()=>{const f=t[n];if(f&&!t.disabled){const h=t[`${n}Data`];if(h!==void 0?f.call(t,h,e):f.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&a(t.host),!0},u=()=>{for(;c()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),be.registry&&!be.done&&(be.done=_$HY.done=!0),e.composedPath){const f=e.composedPath();a(f[0]);for(let h=0;h<f.length-2&&(t=f[h],!!c());h++){if(t._$host){t=t._$host,u();break}if(t.parentNode===o)break}}else u();a(i)}function cs(e,t,n,i,o){const a=Ei(e);if(a){!n&&(n=[...e.childNodes]);let f=[];for(let h=0;h<n.length;h++){const p=n[h];p.nodeType===8&&p.data.slice(0,2)==="!$"?p.remove():f.push(p)}n=f}for(;typeof n=="function";)n=n();if(t===n)return n;const c=typeof t,u=i!==void 0;if(e=u&&n[0]&&n[0].parentNode||e,c==="string"||c==="number"){if(a||c==="number"&&(t=t.toString(),t===n))return n;if(u){let f=n[0];f&&f.nodeType===3?f.data!==t&&(f.data=t):f=document.createTextNode(t),n=Zi(e,n,i,f)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||c==="boolean"){if(a)return n;n=Zi(e,n,i)}else{if(c==="function")return ze(()=>{let f=t();for(;typeof f=="function";)f=f();n=cs(e,f,n,i)}),()=>n;if(Array.isArray(t)){const f=[],h=n&&Array.isArray(n);if(Yc(f,t,n,o))return ze(()=>n=cs(e,f,n,i,!0)),()=>n;if(a){if(!f.length)return n;if(i===void 0)return n=[...e.childNodes];let p=f[0];if(p.parentNode!==e)return n;const m=[p];for(;(p=p.nextSibling)!==i;)m.push(p);return n=m}if(f.length===0){if(n=Zi(e,n,i),u)return n}else h?n.length===0?mh(e,f,i):g1(e,n,f):(n&&Zi(e),mh(e,f));n=f}else if(t.nodeType){if(a&&t.parentNode)return n=u?[t]:t;if(Array.isArray(n)){if(u)return n=Zi(e,n,i,t);Zi(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Yc(e,t,n,i){let o=!1;for(let a=0,c=t.length;a<c;a++){let u=t[a],f=n&&n[e.length],h;if(!(u==null||u===!0||u===!1))if((h=typeof u)=="object"&&u.nodeType)e.push(u);else if(Array.isArray(u))o=Yc(e,u,f)||o;else if(h==="function")if(i){for(;typeof u=="function";)u=u();o=Yc(e,Array.isArray(u)?u:[u],Array.isArray(f)?f:[f])||o}else e.push(u),o=!0;else{const p=String(u);f&&f.nodeType===3&&f.data===p?e.push(f):e.push(document.createTextNode(p))}}return o}function mh(e,t,n=null){for(let i=0,o=t.length;i<o;i++)e.insertBefore(t[i],n)}function Zi(e,t,n,i){if(n===void 0)return e.textContent="";const o=i||document.createTextNode("");if(t.length){let a=!1;for(let c=t.length-1;c>=0;c--){const u=t[c];if(o!==u){const f=u.parentNode===e;!a&&!c?f?e.replaceChild(o,u):e.insertBefore(o,n):f&&u.remove()}else a=!0}}else e.insertBefore(o,n);return[o]}function A1(){return be.getNextContextId()}const T1=!1,C1="http://www.w3.org/2000/svg";function Op(e,t=!1){return t?document.createElementNS(C1,e):document.createElement(e)}function Ep(e){const{useShadow:t}=e,n=document.createTextNode(""),i=()=>e.mount||document.body,o=ls();let a,c=!!be.context;return Re(()=>{c&&(ls().user=c=!1),a||(a=gu(o,()=>de(()=>e.children)));const u=i();if(u instanceof HTMLHeadElement){const[f,h]=J(!1),p=()=>h(!0);Tn(m=>te(u,()=>f()?m():a(),null)),Xe(p)}else{const f=Op(e.isSVG?"g":"div",e.isSVG),h=t&&f.attachShadow?f.attachShadow({mode:"open"}):f;Object.defineProperty(f,"_$host",{get(){return n.parentNode},configurable:!0}),te(h,a),u.appendChild(f),e.ref&&e.ref(f),Xe(()=>u.removeChild(f))}},void 0,{render:!c}),n}function O1(e){const[t,n]=en(e,["component"]),i=de(()=>t.component);return de(()=>{const o=i();switch(typeof o){case"function":return xe(()=>o(n));case"string":const a=Ap.has(o),c=be.context?_1():Op(o,a);return Wt(c,n,a),c}})}const kp=sr(),E1=["title","meta"],vh=[],yh=["name","http-equiv","content","charset","media"].concat(["property"]),bh=(e,t)=>{const n=Object.fromEntries(Object.entries(e.props).filter(([i])=>t.includes(i)).sort());return(Object.hasOwn(n,"name")||Object.hasOwn(n,"property"))&&(n.name=n.name||n.property,delete n.property),e.tag+JSON.stringify(n)};function k1(){if(!be.context){const n=document.head.querySelectorAll("[data-sm]");Array.prototype.forEach.call(n,i=>i.parentNode.removeChild(i))}const e=new Map;function t(n){if(n.ref)return n.ref;let i=document.querySelector(`[data-sm="${n.id}"]`);return i?(i.tagName.toLowerCase()!==n.tag&&(i.parentNode&&i.parentNode.removeChild(i),i=document.createElement(n.tag)),i.removeAttribute("data-sm")):i=document.createElement(n.tag),i}return{addTag(n){if(E1.indexOf(n.tag)!==-1){const a=n.tag==="title"?vh:yh,c=bh(n,a);e.has(c)||e.set(c,[]);let u=e.get(c),f=u.length;u=[...u,n],e.set(c,u);let h=t(n);n.ref=h,Wt(h,n.props);let p=null;for(var i=f-1;i>=0;i--)if(u[i]!=null){p=u[i];break}return h.parentNode!=document.head&&document.head.appendChild(h),p&&p.ref&&p.ref.parentNode&&document.head.removeChild(p.ref),f}let o=t(n);return n.ref=o,Wt(o,n.props),o.parentNode!=document.head&&document.head.appendChild(o),-1},removeTag(n,i){const o=n.tag==="title"?vh:yh,a=bh(n,o);if(n.ref){const c=e.get(a);if(c){if(n.ref.parentNode){n.ref.parentNode.removeChild(n.ref);for(let u=i-1;u>=0;u--)c[u]!=null&&document.head.appendChild(c[u].ref)}c[i]=null,e.set(a,c)}else n.ref.parentNode&&n.ref.parentNode.removeChild(n.ref)}}}}const P1=e=>{const t=k1();return B(kp.Provider,{value:t,get children(){return e.children}})},D1=(e,t,n)=>(I1({tag:e,props:t,setting:n,id:go(),get name(){return t.name||t.property}}),null);function I1(e){const t=On(kp);if(!t)throw new Error("<MetaProvider /> should be in the tree");ze(()=>{const n=t.addTag(e);Xe(()=>t.removeTag(e,n))})}const HD=e=>D1("title",e,{escape:!0,close:!0});var ha=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ca={exports:{}},R1=Ca.exports,wh;function Pp(){return wh||(wh=1,function(e,t){(function(n,i){e.exports=i()})(R1,function(){var n=1e3,i=6e4,o=36e5,a="millisecond",c="second",u="minute",f="hour",h="day",p="week",m="month",b="quarter",w="year",A="date",T="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var I=["th","st","nd","rd"],D=E%100;return"["+E+(I[(D-20)%10]||I[D]||I[0])+"]"}},L=function(E,I,D){var Z=String(E);return!Z||Z.length>=I?E:""+Array(I+1-Z.length).join(D)+E},N={s:L,z:function(E){var I=-E.utcOffset(),D=Math.abs(I),Z=Math.floor(D/60),M=D%60;return(I<=0?"+":"-")+L(Z,2,"0")+":"+L(M,2,"0")},m:function E(I,D){if(I.date()<D.date())return-E(D,I);var Z=12*(D.year()-I.year())+(D.month()-I.month()),M=I.clone().add(Z,m),R=D-M<0,z=I.clone().add(Z+(R?-1:1),m);return+(-(Z+(D-M)/(R?M-z:z-M))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:m,y:w,w:p,d:h,D:A,h:f,m:u,s:c,ms:a,Q:b}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},F="en",Y={};Y[F]=C;var re="$isDayjsObject",he=function(E){return E instanceof ne||!(!E||!E[re])},oe=function E(I,D,Z){var M;if(!I)return F;if(typeof I=="string"){var R=I.toLowerCase();Y[R]&&(M=R),D&&(Y[R]=D,M=R);var z=I.split("-");if(!M&&z.length>1)return E(z[0])}else{var q=I.name;Y[q]=I,M=q}return!Z&&M&&(F=M),M||!Z&&F},X=function(E,I){if(he(E))return E.clone();var D=typeof I=="object"?I:{};return D.date=E,D.args=arguments,new ne(D)},j=N;j.l=oe,j.i=he,j.w=function(E,I){return X(E,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var ne=function(){function E(D){this.$L=oe(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[re]=!0}var I=E.prototype;return I.parse=function(D){this.$d=function(Z){var M=Z.date,R=Z.utc;if(M===null)return new Date(NaN);if(j.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var z=M.match(S);if(z){var q=z[2]-1||0,ce=(z[7]||"0").substring(0,3);return R?new Date(Date.UTC(z[1],q,z[3]||1,z[4]||0,z[5]||0,z[6]||0,ce)):new Date(z[1],q,z[3]||1,z[4]||0,z[5]||0,z[6]||0,ce)}}return new Date(M)}(D),this.init()},I.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},I.$utils=function(){return j},I.isValid=function(){return this.$d.toString()!==T},I.isSame=function(D,Z){var M=X(D);return this.startOf(Z)<=M&&M<=this.endOf(Z)},I.isAfter=function(D,Z){return X(D)<this.startOf(Z)},I.isBefore=function(D,Z){return this.endOf(Z)<X(D)},I.$g=function(D,Z,M){return j.u(D)?this[Z]:this.set(M,D)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(D,Z){var M=this,R=!!j.u(Z)||Z,z=j.p(D),q=function(_t,ut){var pt=j.w(M.$u?Date.UTC(M.$y,ut,_t):new Date(M.$y,ut,_t),M);return R?pt:pt.endOf(h)},ce=function(_t,ut){return j.w(M.toDate()[_t].apply(M.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(ut)),M)},ye=this.$W,Ce=this.$M,Ue=this.$D,ht="set"+(this.$u?"UTC":"");switch(z){case w:return R?q(1,0):q(31,11);case m:return R?q(1,Ce):q(0,Ce+1);case p:var Tt=this.$locale().weekStart||0,wt=(ye<Tt?ye+7:ye)-Tt;return q(R?Ue-wt:Ue+(6-wt),Ce);case h:case A:return ce(ht+"Hours",0);case f:return ce(ht+"Minutes",1);case u:return ce(ht+"Seconds",2);case c:return ce(ht+"Milliseconds",3);default:return this.clone()}},I.endOf=function(D){return this.startOf(D,!1)},I.$set=function(D,Z){var M,R=j.p(D),z="set"+(this.$u?"UTC":""),q=(M={},M[h]=z+"Date",M[A]=z+"Date",M[m]=z+"Month",M[w]=z+"FullYear",M[f]=z+"Hours",M[u]=z+"Minutes",M[c]=z+"Seconds",M[a]=z+"Milliseconds",M)[R],ce=R===h?this.$D+(Z-this.$W):Z;if(R===m||R===w){var ye=this.clone().set(A,1);ye.$d[q](ce),ye.init(),this.$d=ye.set(A,Math.min(this.$D,ye.daysInMonth())).$d}else q&&this.$d[q](ce);return this.init(),this},I.set=function(D,Z){return this.clone().$set(D,Z)},I.get=function(D){return this[j.p(D)]()},I.add=function(D,Z){var M,R=this;D=Number(D);var z=j.p(Z),q=function(Ce){var Ue=X(R);return j.w(Ue.date(Ue.date()+Math.round(Ce*D)),R)};if(z===m)return this.set(m,this.$M+D);if(z===w)return this.set(w,this.$y+D);if(z===h)return q(1);if(z===p)return q(7);var ce=(M={},M[u]=i,M[f]=o,M[c]=n,M)[z]||1,ye=this.$d.getTime()+D*ce;return j.w(ye,this)},I.subtract=function(D,Z){return this.add(-1*D,Z)},I.format=function(D){var Z=this,M=this.$locale();if(!this.isValid())return M.invalidDate||T;var R=D||"YYYY-MM-DDTHH:mm:ssZ",z=j.z(this),q=this.$H,ce=this.$m,ye=this.$M,Ce=M.weekdays,Ue=M.months,ht=M.meridiem,Tt=function(ut,pt,gt,le){return ut&&(ut[pt]||ut(Z,R))||gt[pt].slice(0,le)},wt=function(ut){return j.s(q%12||12,ut,"0")},_t=ht||function(ut,pt,gt){var le=ut<12?"AM":"PM";return gt?le.toLowerCase():le};return R.replace(_,function(ut,pt){return pt||function(gt){switch(gt){case"YY":return String(Z.$y).slice(-2);case"YYYY":return j.s(Z.$y,4,"0");case"M":return ye+1;case"MM":return j.s(ye+1,2,"0");case"MMM":return Tt(M.monthsShort,ye,Ue,3);case"MMMM":return Tt(Ue,ye);case"D":return Z.$D;case"DD":return j.s(Z.$D,2,"0");case"d":return String(Z.$W);case"dd":return Tt(M.weekdaysMin,Z.$W,Ce,2);case"ddd":return Tt(M.weekdaysShort,Z.$W,Ce,3);case"dddd":return Ce[Z.$W];case"H":return String(q);case"HH":return j.s(q,2,"0");case"h":return wt(1);case"hh":return wt(2);case"a":return _t(q,ce,!0);case"A":return _t(q,ce,!1);case"m":return String(ce);case"mm":return j.s(ce,2,"0");case"s":return String(Z.$s);case"ss":return j.s(Z.$s,2,"0");case"SSS":return j.s(Z.$ms,3,"0");case"Z":return z}return null}(ut)||z.replace(":","")})},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(D,Z,M){var R,z=this,q=j.p(Z),ce=X(D),ye=(ce.utcOffset()-this.utcOffset())*i,Ce=this-ce,Ue=function(){return j.m(z,ce)};switch(q){case w:R=Ue()/12;break;case m:R=Ue();break;case b:R=Ue()/3;break;case p:R=(Ce-ye)/6048e5;break;case h:R=(Ce-ye)/864e5;break;case f:R=Ce/o;break;case u:R=Ce/i;break;case c:R=Ce/n;break;default:R=Ce}return M?R:j.a(R)},I.daysInMonth=function(){return this.endOf(m).$D},I.$locale=function(){return Y[this.$L]},I.locale=function(D,Z){if(!D)return this.$L;var M=this.clone(),R=oe(D,Z,!0);return R&&(M.$L=R),M},I.clone=function(){return j.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},E}(),$e=ne.prototype;return X.prototype=$e,[["$ms",a],["$s",c],["$m",u],["$H",f],["$W",h],["$M",m],["$y",w],["$D",A]].forEach(function(E){$e[E[1]]=function(I){return this.$g(I,E[0],E[1])}}),X.extend=function(E,I){return E.$i||(E(I,ne,X),E.$i=!0),X},X.locale=oe,X.isDayjs=he,X.unix=function(E){return X(1e3*E)},X.en=Y[F],X.Ls=Y,X.p={},X})}(Ca)),Ca.exports}var L1=Pp();const Dp=vu(L1);var Oa={exports:{}},M1=Oa.exports,_h;function $1(){return _h||(_h=1,function(e,t){(function(n,i){e.exports=i(Pp())})(M1,function(n){function i(c){return c&&typeof c=="object"&&"default"in c?c:{default:c}}var o=i(n),a={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(c,u){return u==="W"?c+"周":c+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(c,u){var f=100*c+u;return f<600?"凌晨":f<900?"早上":f<1100?"上午":f<1300?"中午":f<1800?"下午":"晚上"}};return o.default.locale(a,null,!0),a})}(Oa)),Oa.exports}$1();var Ea={exports:{}},N1=Ea.exports,xh;function F1(){return xh||(xh=1,function(e,t){(function(n,i){e.exports=i()})(N1,function(){return function(n,i,o){n=n||{};var a=i.prototype,c={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(h,p,m,b){return a.fromToBase(h,p,m,b)}o.en.relativeTime=c,a.fromToBase=function(h,p,m,b,w){for(var A,T,S,_=m.$locale().relativeTime||c,C=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],L=C.length,N=0;N<L;N+=1){var F=C[N];F.d&&(A=b?o(h).diff(m,F.d,!0):m.diff(h,F.d,!0));var Y=(n.rounding||Math.round)(Math.abs(A));if(S=A>0,Y<=F.r||!F.r){Y<=1&&N>0&&(F=C[N-1]);var re=_[F.l];w&&(Y=w(""+Y)),T=typeof re=="string"?re.replace("%d",Y):re(Y,p,F.l,S);break}}if(p)return T;var he=S?_.future:_.past;return typeof he=="function"?he(T):he.replace("%s",T)},a.to=function(h,p){return u(h,p,this,!0)},a.from=function(h,p){return u(h,p,this)};var f=function(h){return h.$u?o.utc():o()};a.toNow=function(h){return this.to(f(this),h)},a.fromNow=function(h){return this.from(f(this),h)}}})}(Ea)),Ea.exports}var U1=F1();const B1=vu(U1),z1=e=>typeof e=="function",Fa=(e,t)=>z1(e)?e(t):e;var bt;(function(e){e[e.ADD_TOAST=0]="ADD_TOAST",e[e.UPDATE_TOAST=1]="UPDATE_TOAST",e[e.UPSERT_TOAST=2]="UPSERT_TOAST",e[e.DISMISS_TOAST=3]="DISMISS_TOAST",e[e.REMOVE_TOAST=4]="REMOVE_TOAST",e[e.START_PAUSE=5]="START_PAUSE",e[e.END_PAUSE=6]="END_PAUSE"})(bt||(bt={}));const Ua=Symbol("store-raw"),Qi=Symbol("store-node"),br=Symbol("store-has"),Ip=Symbol("store-self");function Rp(e){let t=e[zn];if(!t&&(Object.defineProperty(e,zn,{value:t=new Proxy(e,H1)}),!Array.isArray(e))){const n=Object.keys(e),i=Object.getOwnPropertyDescriptors(e);for(let o=0,a=n.length;o<a;o++){const c=n[o];i[c].get&&Object.defineProperty(e,c,{enumerable:i[c].enumerable,get:i[c].get.bind(t)})}}return t}function tr(e){let t;return e!=null&&typeof e=="object"&&(e[zn]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function bi(e,t=new Set){let n,i,o,a;if(n=e!=null&&e[Ua])return n;if(!tr(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let c=0,u=e.length;c<u;c++)o=e[c],(i=bi(o,t))!==o&&(e[c]=i)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const c=Object.keys(e),u=Object.getOwnPropertyDescriptors(e);for(let f=0,h=c.length;f<h;f++)a=c[f],!u[a].get&&(o=e[a],(i=bi(o,t))!==o&&(e[a]=i))}return e}function Ba(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function Xs(e,t,n){if(e[t])return e[t];const[i,o]=J(n,{equals:!1,internal:!0});return i.$=o,e[t]=i}function W1(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===zn||t===Qi||(delete n.value,delete n.writable,n.get=()=>e[zn][t]),n}function Lp(e){Zc()&&Xs(Ba(e,Qi),Ip)()}function j1(e){return Lp(e),Reflect.ownKeys(e)}const H1={get(e,t,n){if(t===Ua)return e;if(t===zn)return n;if(t===Ia)return Lp(e),n;const i=Ba(e,Qi),o=i[t];let a=o?o():e[t];if(t===Qi||t===br||t==="__proto__")return a;if(!o){const c=Object.getOwnPropertyDescriptor(e,t);Zc()&&(typeof a!="function"||e.hasOwnProperty(t))&&!(c&&c.get)&&(a=Xs(i,t,a)())}return tr(a)?Rp(a):a},has(e,t){return t===Ua||t===zn||t===Ia||t===Qi||t===br||t==="__proto__"?!0:(Zc()&&Xs(Ba(e,br),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:j1,getOwnPropertyDescriptor:W1};function Yt(e,t,n,i=!1){if(!i&&e[t]===n)return;const o=e[t],a=e.length;n===void 0?(delete e[t],e[br]&&e[br][t]&&o!==void 0&&e[br][t].$()):(e[t]=n,e[br]&&e[br][t]&&o===void 0&&e[br][t].$());let c=Ba(e,Qi),u;if((u=Xs(c,t,o))&&u.$(()=>n),Array.isArray(e)&&e.length!==a){for(let f=e.length;f<a;f++)(u=c[f])&&u.$();(u=Xs(c,"length",a))&&u.$(e.length)}(u=c[Ip])&&u.$()}function Mp(e,t){const n=Object.keys(t);for(let i=0;i<n.length;i+=1){const o=n[i];Yt(e,o,t[o])}}function Z1(e,t){if(typeof t=="function"&&(t=t(e)),t=bi(t),Array.isArray(t)){if(e===t)return;let n=0,i=t.length;for(;n<i;n++){const o=t[n];e[n]!==o&&Yt(e,n,o)}Yt(e,"length",i)}else Mp(e,t)}function Ws(e,t,n=[]){let i,o=e;if(t.length>1){i=t.shift();const c=typeof i,u=Array.isArray(e);if(Array.isArray(i)){for(let f=0;f<i.length;f++)Ws(e,[i[f]].concat(t),n);return}else if(u&&c==="function"){for(let f=0;f<e.length;f++)i(e[f],f)&&Ws(e,[f].concat(t),n);return}else if(u&&c==="object"){const{from:f=0,to:h=e.length-1,by:p=1}=i;for(let m=f;m<=h;m+=p)Ws(e,[m].concat(t),n);return}else if(t.length>1){Ws(e[i],t,[i].concat(n));return}o=e[i],n=[i].concat(n)}let a=t[0];typeof a=="function"&&(a=a(o,n),a===o)||i===void 0&&a==null||(a=bi(a),i===void 0||tr(o)&&tr(a)&&!Array.isArray(a)?Mp(o,a):Yt(e,i,a))}function yu(...[e,t]){const n=bi(e||{}),i=Array.isArray(n),o=Rp(n);function a(...c){An(()=>{i&&c.length===1?Z1(n,c[0]):Ws(n,c)})}return[o,a]}const Xc=Symbol("store-root");function Vi(e,t,n,i,o){const a=t[n];if(e===a)return;const c=Array.isArray(e);if(n!==Xc&&(!tr(e)||!tr(a)||c!==Array.isArray(a)||o&&e[o]!==a[o])){Yt(t,n,e);return}if(c){if(e.length&&a.length&&(!i||o&&e[0]&&e[0][o]!=null)){let h,p,m,b,w,A,T,S;for(m=0,b=Math.min(a.length,e.length);m<b&&(a[m]===e[m]||o&&a[m]&&e[m]&&a[m][o]===e[m][o]);m++)Vi(e[m],a,m,i,o);const _=new Array(e.length),C=new Map;for(b=a.length-1,w=e.length-1;b>=m&&w>=m&&(a[b]===e[w]||o&&a[m]&&e[m]&&a[b][o]===e[w][o]);b--,w--)_[w]=a[b];if(m>w||m>b){for(p=m;p<=w;p++)Yt(a,p,e[p]);for(;p<e.length;p++)Yt(a,p,_[p]),Vi(e[p],a,p,i,o);a.length>e.length&&Yt(a,"length",e.length);return}for(T=new Array(w+1),p=w;p>=m;p--)A=e[p],S=o&&A?A[o]:A,h=C.get(S),T[p]=h===void 0?-1:h,C.set(S,p);for(h=m;h<=b;h++)A=a[h],S=o&&A?A[o]:A,p=C.get(S),p!==void 0&&p!==-1&&(_[p]=a[h],p=T[p],C.set(S,p));for(p=m;p<e.length;p++)p in _?(Yt(a,p,_[p]),Vi(e[p],a,p,i,o)):Yt(a,p,e[p])}else for(let h=0,p=e.length;h<p;h++)Vi(e[h],a,h,i,o);a.length>e.length&&Yt(a,"length",e.length);return}const u=Object.keys(e);for(let h=0,p=u.length;h<p;h++)Vi(e[u[h]],a,u[h],i,o);const f=Object.keys(a);for(let h=0,p=f.length;h<p;h++)e[f[h]]===void 0&&Yt(a,f[h],void 0)}function q1(e,t={}){const{merge:n,key:i="id"}=t,o=bi(e);return a=>{if(!tr(a)||!tr(o))return o;const c=Vi(o,{[Xc]:a},Xc,n,i);return c===void 0?a:c}}const za=new WeakMap,$p={get(e,t){if(t===Ua)return e;const n=e[t];let i;return tr(n)?za.get(n)||(za.set(n,i=new Proxy(n,$p)),i):n},set(e,t,n){return Yt(e,t,bi(n)),!0},deleteProperty(e,t){return Yt(e,t,void 0,!0),!0}};function pa(e){return t=>{if(tr(t)){let n;(n=za.get(t))||za.set(t,n=new Proxy(t,$p)),e(n)}return t}}const[mi,Ur]=yu({toasts:[],pausedAt:void 0}),G1=()=>{const{pausedAt:e,toasts:t}=mi;if(e)return;const n=Date.now();return t.map(o=>{if(o.duration===1/0)return;const a=(o.duration||0)+o.pauseDuration-(n-o.createdAt);if(a<=0){o.visible&&Wn({type:bt.DISMISS_TOAST,toastId:o.id});return}return setTimeout(()=>{Wn({type:bt.DISMISS_TOAST,toastId:o.id})},a)})},Vs=new Map,Sh=(e,t)=>{if(Vs.has(e))return;const n=setTimeout(()=>{Vs.delete(e),Wn({type:bt.REMOVE_TOAST,toastId:e})},t);Vs.set(e,n)},V1=e=>{const t=Vs.get(e);Vs.delete(e),t&&clearTimeout(t)},Wn=e=>{switch(e.type){case bt.ADD_TOAST:Ur("toasts",o=>{const a=o;return[e.toast,...a]});break;case bt.DISMISS_TOAST:const{toastId:t}=e,n=mi.toasts;if(t){const o=n.find(a=>a.id===t);o&&Sh(t,o.unmountDelay),Ur("toasts",a=>a.id===t,pa(a=>a.visible=!1))}else n.forEach(o=>{Sh(o.id,o.unmountDelay)}),Ur("toasts",o=>o.id!==void 0,pa(o=>o.visible=!1));break;case bt.REMOVE_TOAST:if(!e.toastId){Ur("toasts",[]);break}Ur("toasts",o=>o.filter(c=>c.id!==e.toastId));break;case bt.UPDATE_TOAST:e.toast.id&&V1(e.toast.id),Ur("toasts",o=>o.id===e.toast.id,o=>({...o,...e.toast}));break;case bt.UPSERT_TOAST:mi.toasts.find(o=>o.id===e.toast.id)?Wn({type:bt.UPDATE_TOAST,toast:e.toast}):Wn({type:bt.ADD_TOAST,toast:e.toast});break;case bt.START_PAUSE:Ur(pa(o=>{o.pausedAt=Date.now(),o.toasts.forEach(a=>{a.paused=!0})}));break;case bt.END_PAUSE:const i=e.time-(mi.pausedAt||0);Ur(pa(o=>{o.pausedAt=void 0,o.toasts.forEach(a=>{a.pauseDuration+=i,a.paused=!1})}));break}},K1={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},es={id:"",icon:"",unmountDelay:500,duration:3e3,ariaProps:{role:"status","aria-live":"polite"},className:"",style:{},position:"top-right",iconTheme:{}},Np={position:"top-right",toastOptions:es,gutter:8,containerStyle:{},containerClassName:""},ga="16px",Y1={position:"fixed","z-index":9999,top:ga,bottom:ga,left:ga,right:ga,"pointer-events":"none"},X1=(()=>{let e=0;return()=>String(++e)})(),J1=e=>{sS(t=>({containerClassName:e.containerClassName??t.containerClassName,containerStyle:e.containerStyle??t.containerStyle,gutter:e.gutter??t.gutter,position:e.position??t.position,toastOptions:{...e.toastOptions}}))},Q1=(e,t)=>{const i=e.includes("top")?{top:0,"margin-top":`${t}px`}:{bottom:0,"margin-bottom":`${t}px`},o=e.includes("center")?{"justify-content":"center"}:e.includes("right")?{"justify-content":"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:"all 230ms cubic-bezier(.21,1.02,.73,1)",...i,...o}},eS=(e,t)=>{const n=e.getBoundingClientRect();n.height!==t.height&&Wn({type:bt.UPDATE_TOAST,toast:{id:t.id,height:n.height}})},tS=(e,t)=>{const{toasts:n}=mi,i=Ki().gutter||Np.gutter||8,o=n.filter(f=>(f.position||t)===t&&f.height),a=o.findIndex(f=>f.id===e.id),c=o.filter((f,h)=>h<a&&f.visible).length;return o.slice(0,c).reduce((f,h)=>f+i+(h.height||0),0)},nS=(e,t)=>(e.position||t).includes("top")?1:-1,rS={display:"flex","align-items":"center",color:"#363636",background:"white","box-shadow":"0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05)","max-width":"350px","pointer-events":"auto",padding:"8px 10px","border-radius":"4px","line-height":"1.3","will-change":"transform"},iS={display:"flex","align-items":"center",flex:"1 1 auto",margin:"4px 10px","white-space":"pre-line"},ma={"flex-shrink":0,"min-width":"20px","min-height":"20px",display:"flex","align-items":"center","justify-content":"center","text-align":"center"},Wa=e=>({calcMode:"spline",keyTimes:"0; 1",keySplines:e}),[Ki,sS]=J(Np),oS=(e,t="blank",n)=>{var i,o,a;return{...es,...Ki().toastOptions,...n,type:t,message:e,pauseDuration:0,createdAt:Date.now(),visible:!0,id:n.id||X1(),paused:!1,style:{...es.style,...(i=Ki().toastOptions)==null?void 0:i.style,...n.style},duration:n.duration||((o=Ki().toastOptions)==null?void 0:o.duration)||K1[t],position:n.position||((a=Ki().toastOptions)==null?void 0:a.position)||Ki().position||es.position}},mo=e=>(t,n={})=>Tn(()=>{const i=mi.toasts.find(a=>a.id===n.id),o=oS(t,e,{...i,duration:void 0,...n});return Wn({type:bt.UPSERT_TOAST,toast:o}),o.id}),cn=(e,t)=>mo("blank")(e,t);xe(()=>cn);cn.error=mo("error");cn.success=mo("success");cn.loading=mo("loading");cn.custom=mo("custom");cn.dismiss=e=>{Wn({type:bt.DISMISS_TOAST,toastId:e})};cn.promise=(e,t,n)=>{const i=cn.loading(t.loading,{...n});return e.then(o=>(cn.success(Fa(t.success,o),{id:i,...n}),o)).catch(o=>{cn.error(Fa(t.error,o),{id:i,...n})}),e};cn.remove=e=>{Wn({type:bt.REMOVE_TOAST,toastId:e})};var aS=Me("<div><style>.sldt-active{z-index:9999;}.sldt-active>*{pointer-events:auto;}");const lS=e=>(Re(()=>{J1(e)}),Re(()=>{const t=G1();Xe(()=>{t&&t.forEach(n=>n&&clearTimeout(n))})}),(()=>{var t=aS();return t.firstChild,te(t,B(Zr,{get each(){return mi.toasts},children:n=>B(dS,{toast:n})}),null),ze(n=>{var i={...Y1,...e.containerStyle},o=e.containerClassName;return n.e=Mn(t,i,n.e),o!==n.t&&er(t,n.t=o),n},{e:void 0,t:void 0}),t})());var va=Me("<div>"),cS=Me("<div><div>");const uS=e=>{let t;return Re(()=>{if(!t)return;const n=nS(e.toast,e.position);e.toast.visible?t.animate([{transform:`translate3d(0,${n*-200}%,0) scale(.6)`,opacity:.5},{transform:"translate3d(0,0,0) scale(1)",opacity:1}],{duration:350,fill:"forwards",easing:"cubic-bezier(.21,1.02,.73,1)"}):t.animate([{transform:"translate3d(0,0,-1px) scale(1)",opacity:1},{transform:`translate3d(0,${n*-150}%,-1px) scale(.4)`,opacity:0}],{duration:400,fill:"forwards",easing:"cubic-bezier(.06,.71,.55,1)"})}),(()=>{var n=cS(),i=n.firstChild,o=t;return typeof o=="function"?ti(o,n):t=n,te(n,B(o1,{get children(){return[B(da,{get when(){return e.toast.icon},get children(){var a=va();return te(a,()=>e.toast.icon),ze(c=>Mn(a,ma,c)),a}}),B(da,{get when(){return e.toast.type==="loading"},get children(){var a=va();return te(a,B(wS,qe(()=>e.toast.iconTheme))),ze(c=>Mn(a,ma,c)),a}}),B(da,{get when(){return e.toast.type==="success"},get children(){var a=va();return te(a,B(mS,qe(()=>e.toast.iconTheme))),ze(c=>Mn(a,ma,c)),a}}),B(da,{get when(){return e.toast.type==="error"},get children(){var a=va();return te(a,B(yS,qe(()=>e.toast.iconTheme))),ze(c=>Mn(a,ma,c)),a}})]}}),i),Wt(i,qe(()=>e.toast.ariaProps),!1,!0),te(i,()=>Fa(e.toast.message,e.toast)),ze(a=>{var c=e.toast.className,u={...rS,...e.toast.style},f=iS;return c!==a.e&&er(n,a.e=c),a.t=Mn(n,u,a.t),a.a=Mn(i,f,a.a),a},{e:void 0,t:void 0,a:void 0}),n})()};var fS=Me("<div>");const dS=e=>{const t=()=>{const o=e.toast.position||es.position,a=tS(e.toast,o);return Q1(o,a)},n=de(()=>t());let i;return vs(()=>{i&&eS(i,e.toast)}),(()=>{var o=fS();o.addEventListener("mouseleave",()=>Wn({type:bt.END_PAUSE,time:Date.now()})),o.addEventListener("mouseenter",()=>Wn({type:bt.START_PAUSE,time:Date.now()}));var a=i;return typeof a=="function"?ti(a,o):i=o,te(o,(()=>{var c=de(()=>e.toast.type==="custom");return()=>c()?Fa(e.toast.message,e.toast):B(uS,{get toast(){return e.toast},get position(){return e.toast.position||es.position}})})()),ze(c=>{var u=n(),f=e.toast.visible?"sldt-active":"";return c.e=Mn(o,u,c.e),f!==c.t&&er(o,c.t=f),c},{e:void 0,t:void 0}),o})()};var hS=Me('<svg><circle cx=16 cy=16 r=0><animate attributeName=opacity values="0; 1; 1"></animate><animate attributeName=r values="0; 17.5; 16"></svg>',!1,!0),pS=Me('<svg><circle cx=16 cy=16 r=12 opacity=0><animate attributeName=opacity values="1; 0"></animate><animate attributeName=r values="12; 26"></svg>',!1,!0);const Fp=e=>{const t={dur:"0.35s",begin:"100ms",fill:"freeze",calcMode:"spline",keyTimes:"0; 0.6; 1",keySplines:"0.25 0.71 0.4 0.88; .59 .22 .87 .63"};return(()=>{var n=hS(),i=n.firstChild,o=i.nextSibling;return Wt(i,t,!0,!1),Wt(o,t,!0,!1),ze(()=>dn(n,"fill",e.fill)),n})()},Up=e=>{const t={dur:"1s",begin:e.begin||"320ms",fill:"freeze",...Wa("0.0 0.0 0.2 1")};return(()=>{var n=pS(),i=n.firstChild,o=i.nextSibling;return Wt(i,t,!0,!1),Wt(o,t,!0,!1),ze(()=>dn(n,"fill",e.fill)),n})()};var gS=Me('<svg viewBox="0 0 32 32"width=1.25rem height=1.25rem><path fill=none stroke-width=4 stroke-dasharray=22 stroke-dashoffset=22 stroke-linecap=round stroke-miterlimit=10 d=M9.8,17.2l3.8,3.6c0.1,0.1,0.3,0.1,0.4,0l9.6-9.7><animate attributeName=stroke-dashoffset values=22;0 dur=0.25s begin=250ms fill=freeze>');const mS=e=>{const t=e.primary||"#34C759";return(()=>{var n=gS(),i=n.firstChild,o=i.firstChild;return n.style.setProperty("overflow","visible"),te(n,B(Fp,{fill:t}),i),te(n,B(Up,{fill:t,begin:"350ms"}),i),Wt(o,qe(()=>Wa("0.0, 0.0, 0.58, 1.0")),!0,!1),ze(()=>dn(i,"stroke",e.secondary||"#FCFCFC")),n})()};var vS=Me('<svg viewBox="0 0 32 32"width=1.25rem height=1.25rem><path fill=none stroke-width=4 stroke-dasharray=9 stroke-dashoffset=9 stroke-linecap=round d=M16,7l0,9><animate attributeName=stroke-dashoffset values=9;0 dur=0.2s begin=250ms fill=freeze></animate></path><circle cx=16 cy=23 r=2.5 opacity=0><animate attributeName=opacity values=0;1 dur=0.25s begin=350ms fill=freeze>');const yS=e=>{const t=e.primary||"#FF3B30";return(()=>{var n=vS(),i=n.firstChild,o=i.firstChild,a=i.nextSibling,c=a.firstChild;return n.style.setProperty("overflow","visible"),te(n,B(Fp,{fill:t}),i),te(n,B(Up,{fill:t}),i),Wt(o,qe(()=>Wa("0.0, 0.0, 0.58, 1.0")),!0,!1),Wt(c,qe(()=>Wa("0.0, 0.0, 0.58, 1.0")),!0,!1),ze(u=>{var f=e.secondary||"#FFFFFF",h=e.secondary||"#FFFFFF";return f!==u.e&&dn(i,"stroke",u.e=f),h!==u.t&&dn(a,"fill",u.t=h),u},{e:void 0,t:void 0}),n})()};var bS=Me('<svg viewBox="0 0 32 32"width=1.25rem height=1.25rem><path fill=none stroke-width=4 stroke-miterlimit=10 d=M16,6c3,0,5.7,1.3,7.5,3.4c1.5,1.8,2.5,4,2.5,6.6c0,5.5-4.5,10-10,10S6,21.6,6,16S10.5,6,16,6z></path><path fill=none stroke-width=4 stroke-linecap=round stroke-miterlimit=10 d=M16,6c3,0,5.7,1.3,7.5,3.4c0.6,0.7,1.1,1.4,1.5,2.2><animateTransform attributeName=transform type=rotate from="0 16 16"to="360 16 16"dur=0.75s repeatCount=indefinite>');const wS=e=>(()=>{var t=bS(),n=t.firstChild,i=n.nextSibling;return t.style.setProperty("overflow","visible"),ze(o=>{var a=e.primary||"#E5E7EB",c=e.secondary||"#4b5563";return a!==o.e&&dn(n,"stroke",o.e=a),c!==o.t&&dn(i,"stroke",o.t=c),o},{e:void 0,t:void 0}),t})();function ZD(e){return e!==null&&(typeof e=="object"||typeof e=="function")}var Ah=e=>typeof e=="function"&&!e.length?e():e,Th=e=>Array.isArray(e)?e:e?[e]:[];function qD(e,...t){return typeof e=="function"?e(...t):e}var _S=Xe;function xS(e,t,n){if(be.context){const[i,o]=J(e,n);return vs(()=>o(()=>t())),[i,o]}return J(t(),n)}function Bp(e,t,n,i){return e.addEventListener(t,n,i),_S(e.removeEventListener.bind(e,t,n,i))}function SS(e,t,n,i){const o=()=>{Th(Ah(e)).forEach(a=>{a&&Th(Ah(t)).forEach(c=>Bp(a,c,n,i))})};typeof e=="function"?Re(o):ze(o)}function AS(e,t,n){const[i,o]=J();return SS(e,t,o,n),i}function TS(e,t=ls()){let n=0,i,o;return()=>(n++,Xe(()=>{n--,queueMicrotask(()=>{!n&&o&&(o(),o=i=void 0)})}),o||Tn(a=>i=e(o=a),t),i)}function CS(e){const t=ls(),n=TS(e,t);return()=>be.context?Tn(e,t):n()}function OS(e,t=!1){const n=window.matchMedia(e),[i,o]=xS(t,()=>n.matches);return Bp(n,"change",()=>o(n.matches)),i}function ES(e){return OS("(prefers-color-scheme: dark)",e)}var kS=CS(ES.bind(void 0,!1));const bu="-",PS=e=>{const t=IS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{const u=c.split(bu);return u[0]===""&&u.length!==1&&u.shift(),zp(u,t)||DS(c)},getConflictingClassGroupIds:(c,u)=>{const f=n[c]||[];return u&&i[c]?[...f,...i[c]]:f}}},zp=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),o=i?zp(e.slice(1),i):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(bu);return(c=t.validators.find(({validator:u})=>u(a)))==null?void 0:c.classGroupId},Ch=/^\[(.+)\]$/,DS=e=>{if(Ch.test(e)){const t=Ch.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},IS=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return LS(Object.entries(e.classGroups),n).forEach(([a,c])=>{Jc(c,i,a,t)}),i},Jc=(e,t,n,i)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Oh(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(RS(o)){Jc(o(i),t,n,i);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,c])=>{Jc(c,Oh(t,a),n,i)})})},Oh=(e,t)=>{let n=e;return t.split(bu).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},RS=e=>e.isThemeGetter,LS=(e,t)=>t?e.map(([n,i])=>{const o=i.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([c,u])=>[t+c,u])):a);return[n,o]}):e,MS=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const o=(a,c)=>{n.set(a,c),t++,t>e&&(t=0,i=n,n=new Map)};return{get(a){let c=n.get(a);if(c!==void 0)return c;if((c=i.get(a))!==void 0)return o(a,c),c},set(a,c){n.has(a)?n.set(a,c):o(a,c)}}},Wp="!",$S=e=>{const{separator:t,experimentalParseClassName:n}=e,i=t.length===1,o=t[0],a=t.length,c=u=>{const f=[];let h=0,p=0,m;for(let S=0;S<u.length;S++){let _=u[S];if(h===0){if(_===o&&(i||u.slice(S,S+a)===t)){f.push(u.slice(p,S)),p=S+a;continue}if(_==="/"){m=S;continue}}_==="["?h++:_==="]"&&h--}const b=f.length===0?u:u.substring(p),w=b.startsWith(Wp),A=w?b.substring(1):b,T=m&&m>p?m-p:void 0;return{modifiers:f,hasImportantModifier:w,baseClassName:A,maybePostfixModifierPosition:T}};return n?u=>n({className:u,parseClassName:c}):c},NS=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(i=>{i[0]==="["?(t.push(...n.sort(),i),n=[]):n.push(i)}),t.push(...n.sort()),t},FS=e=>({cache:MS(e.cacheSize),parseClassName:$S(e),...PS(e)}),US=/\s+/,BS=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o}=t,a=[],c=e.trim().split(US);let u="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{modifiers:p,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:w}=n(h);let A=!!w,T=i(A?b.substring(0,w):b);if(!T){if(!A){u=h+(u.length>0?" "+u:u);continue}if(T=i(b),!T){u=h+(u.length>0?" "+u:u);continue}A=!1}const S=NS(p).join(":"),_=m?S+Wp:S,C=_+T;if(a.includes(C))continue;a.push(C);const L=o(T,A);for(let N=0;N<L.length;++N){const F=L[N];a.push(_+F)}u=h+(u.length>0?" "+u:u)}return u};function zS(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=jp(t))&&(i&&(i+=" "),i+=n);return i}const jp=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=jp(e[i]))&&(n&&(n+=" "),n+=t);return n};function WS(e,...t){let n,i,o,a=c;function c(f){const h=t.reduce((p,m)=>m(p),e());return n=FS(h),i=n.cache.get,o=n.cache.set,a=u,u(f)}function u(f){const h=i(f);if(h)return h;const p=BS(f,n);return o(f,p),p}return function(){return a(zS.apply(null,arguments))}}const rt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Hp=/^\[(?:([a-z-]+):)?(.+)\]$/i,jS=/^\d+\/\d+$/,HS=new Set(["px","full","screen"]),ZS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qS=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,GS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,VS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vr=e=>ts(e)||HS.has(e)||jS.test(e),Br=e=>bs(e,"length",rA),ts=e=>!!e&&!Number.isNaN(Number(e)),Ic=e=>bs(e,"number",ts),Fs=e=>!!e&&Number.isInteger(Number(e)),YS=e=>e.endsWith("%")&&ts(e.slice(0,-1)),Ee=e=>Hp.test(e),zr=e=>ZS.test(e),XS=new Set(["length","size","percentage"]),JS=e=>bs(e,XS,Zp),QS=e=>bs(e,"position",Zp),eA=new Set(["image","url"]),tA=e=>bs(e,eA,sA),nA=e=>bs(e,"",iA),Us=()=>!0,bs=(e,t,n)=>{const i=Hp.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},rA=e=>qS.test(e)&&!GS.test(e),Zp=()=>!1,iA=e=>VS.test(e),sA=e=>KS.test(e),oA=()=>{const e=rt("colors"),t=rt("spacing"),n=rt("blur"),i=rt("brightness"),o=rt("borderColor"),a=rt("borderRadius"),c=rt("borderSpacing"),u=rt("borderWidth"),f=rt("contrast"),h=rt("grayscale"),p=rt("hueRotate"),m=rt("invert"),b=rt("gap"),w=rt("gradientColorStops"),A=rt("gradientColorStopPositions"),T=rt("inset"),S=rt("margin"),_=rt("opacity"),C=rt("padding"),L=rt("saturate"),N=rt("scale"),F=rt("sepia"),Y=rt("skew"),re=rt("space"),he=rt("translate"),oe=()=>["auto","contain","none"],X=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",Ee,t],ne=()=>[Ee,t],$e=()=>["",vr,Br],E=()=>["auto",ts,Ee],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",Ee],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[ts,Ee];return{cacheSize:500,separator:":",theme:{colors:[Us],spacing:[vr,Br],blur:["none","",zr,Ee],brightness:q(),borderColor:[e],borderRadius:["none","","full",zr,Ee],borderSpacing:ne(),borderWidth:$e(),contrast:q(),grayscale:R(),hueRotate:q(),invert:R(),gap:ne(),gradientColorStops:[e],gradientColorStopPositions:[YS,Br],inset:j(),margin:j(),opacity:q(),padding:ne(),saturate:q(),scale:q(),sepia:R(),skew:q(),space:ne(),translate:ne()},classGroups:{aspect:[{aspect:["auto","square","video",Ee]}],container:["container"],columns:[{columns:[zr]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),Ee]}],overflow:[{overflow:X()}],"overflow-x":[{"overflow-x":X()}],"overflow-y":[{"overflow-y":X()}],overscroll:[{overscroll:oe()}],"overscroll-x":[{"overscroll-x":oe()}],"overscroll-y":[{"overscroll-y":oe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[T]}],"inset-x":[{"inset-x":[T]}],"inset-y":[{"inset-y":[T]}],start:[{start:[T]}],end:[{end:[T]}],top:[{top:[T]}],right:[{right:[T]}],bottom:[{bottom:[T]}],left:[{left:[T]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Fs,Ee]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ee]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",Fs,Ee]}],"grid-cols":[{"grid-cols":[Us]}],"col-start-end":[{col:["auto",{span:["full",Fs,Ee]},Ee]}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":[Us]}],"row-start-end":[{row:["auto",{span:[Fs,Ee]},Ee]}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ee]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[re]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[re]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ee,t]}],"min-w":[{"min-w":[Ee,t,"min","max","fit"]}],"max-w":[{"max-w":[Ee,t,"none","full","min","max","fit","prose",{screen:[zr]},zr]}],h:[{h:[Ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",zr,Br]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ic]}],"font-family":[{font:[Us]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ee]}],"line-clamp":[{"line-clamp":["none",ts,Ic]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vr,Ee]}],"list-image":[{"list-image":["none",Ee]}],"list-style-type":[{list:["none","disc","decimal",Ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vr,Br]}],"underline-offset":[{"underline-offset":["auto",vr,Ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ne()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),QS]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",JS]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},tA]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:D()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[vr,Ee]}],"outline-w":[{outline:[vr,Br]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$e()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[vr,Br]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",zr,nA]}],"shadow-color":[{shadow:[Us]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",zr,Ee]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[m]}],saturate:[{saturate:[L]}],sepia:[{sepia:[F]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[L]}],"backdrop-sepia":[{"backdrop-sepia":[F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ee]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",Ee]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[Fs,Ee]}],"translate-x":[{"translate-x":[he]}],"translate-y":[{"translate-y":[he]}],"skew-x":[{"skew-x":[Y]}],"skew-y":[{"skew-y":[Y]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ee]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ne()}],"scroll-mx":[{"scroll-mx":ne()}],"scroll-my":[{"scroll-my":ne()}],"scroll-ms":[{"scroll-ms":ne()}],"scroll-me":[{"scroll-me":ne()}],"scroll-mt":[{"scroll-mt":ne()}],"scroll-mr":[{"scroll-mr":ne()}],"scroll-mb":[{"scroll-mb":ne()}],"scroll-ml":[{"scroll-ml":ne()}],"scroll-p":[{"scroll-p":ne()}],"scroll-px":[{"scroll-px":ne()}],"scroll-py":[{"scroll-py":ne()}],"scroll-ps":[{"scroll-ps":ne()}],"scroll-pe":[{"scroll-pe":ne()}],"scroll-pt":[{"scroll-pt":ne()}],"scroll-pr":[{"scroll-pr":ne()}],"scroll-pb":[{"scroll-pb":ne()}],"scroll-pl":[{"scroll-pl":ne()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[vr,Br,Ic]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Cr=WS(oA);var aA=Me('<div class="loading loading-spinner">'),lA=Me('<button><span class="truncate rounded-none">');const hi=e=>{const[t,n]=en(e,["class","loading","icon"]);return(()=>{var i=lA(),o=i.firstChild;return Wt(i,qe({get class(){return Cr("btn flex items-center leading-8",t.loading?"btn-disabled":t.class)}},n),!1,!0),te(i,B(Qt,{get when(){return t.loading},get children(){return aA()}}),o),te(o,()=>e.icon||e.children),ze(()=>o.classList.toggle("flex-1",!t.icon)),i})()};var cA=e=>(typeof e.clear=="function"||(e.clear=()=>{let t;for(;t=e.key(0);)e.removeItem(t)}),e),uA=["clear","getItem","getAll","setItem","removeItem","key","getLength"],fA=e=>(e.withOptions=t=>uA.reduce((n,i)=>(typeof e[i]=="function"&&(n[i]=(...o)=>(o[e[i].length-1]=t,e[i](...o))),n),{get length(){return e.length},withOptions:n=>e.withOptions(n)}),e),dA={domain:"Domain",expires:"Expires",path:"Path",secure:"Secure",httpOnly:"HttpOnly",maxAge:"Max-Age",sameSite:"SameSite"};function hA(e){if(!e)return"";const t=Object.entries(e).map(([n,i])=>{const o=dA[n];if(o)return i instanceof Date?`${o}=${i.toUTCString()}`:typeof i=="boolean"?i?`${o}`:void 0:`${o}=${i}`}).filter(n=>!!n);return t.length!=0?`; ${t.join("; ")}`:""}function pA(e,t){var i;const n=(i=e.match(`(^|;)\\s*${t}\\s*=\\s*([^;]+)`))==null?void 0:i.pop();return n!=null?decodeURIComponent(n):null}var Bs=fA(cA({_read:()=>document.cookie,_write:(e,t,n)=>{document.cookie=`${e}=${t}${hA(n)}`},getItem:(e,t)=>pA(Bs._read(t),e),setItem:(e,t,n)=>{Bs._write(e,t.replace(/[\u00c0-\uffff\&;]/g,i=>encodeURIComponent(i)),n)},removeItem:(e,t)=>{Bs._write(e,"deleted",{...t,expires:new Date(0)})},key:(e,t)=>{let n=null,i=0;return Bs._read(t).replace(/(?:^|;)\s*(.+?)\s*=\s*[^;]+/g,(o,a)=>(!n&&a&&i++===e&&(n=a),"")),n},getLength:e=>{let t=0;return Bs._read(e).replace(/(?:^|;)\s*.+?\s*=\s*[^;]+/g,n=>(t+=n?1:0,"")),t},get length(){return this.getLength()}}));function it(e,t={}){var p;const n=t.storage||globalThis.localStorage,i=t.name||`storage-${go()}`;if(!n)return[e[0],e[1],null];const o=t.storageOptions,a=t.serialize||JSON.stringify.bind(JSON),c=t.deserialize||JSON.parse.bind(JSON),u=n.getItem(i,o),f=typeof e[0]=="function"?m=>{try{const b=c(m);e[1](()=>b)}catch{}}:m=>{try{const b=c(m);e[1](q1(b))}catch{}};let h=!0;if(u instanceof Promise?u.then(m=>h&&m&&f(m)):u&&f(u),typeof((p=t.sync)==null?void 0:p[0])=="function"){const m=typeof e[0]=="function"?e[0]:()=>e[0];t.sync[0](b=>{b.key!==i||(b.url||globalThis.location.href)!==globalThis.location.href||b.newValue===a(xe(m))||f(b.newValue)})}return[e[0],typeof e[0]=="function"?m=>{var A;const b=e[1](m),w=m!=null?a(b):m;return(A=t.sync)==null||A[1](i,w),w!=null?n.setItem(i,w,o):n.removeItem(i,o),h=!1,b}:(...m)=>{var w;e[1](...m);const b=a(xe(()=>e[0]));(w=t.sync)==null||w[1](i,b),n.setItem(i,b,o),h=!1},u]}let qp={};const Eh=new WeakMap,kh={metric:[{from:0,to:1e3,unit:"B",long:"bytes"},{from:1e3,to:1e6,unit:"kB",long:"kilobytes"},{from:1e6,to:1e9,unit:"MB",long:"megabytes"},{from:1e9,to:1e12,unit:"GB",long:"gigabytes"},{from:1e12,to:1e15,unit:"TB",long:"terabytes"},{from:1e15,to:1e18,unit:"PB",long:"petabytes"},{from:1e18,to:1e21,unit:"EB",long:"exabytes"},{from:1e21,to:1e24,unit:"ZB",long:"zettabytes"},{from:1e24,to:1e27,unit:"YB",long:"yottabytes"}],metric_octet:[{from:0,to:1e3,unit:"o",long:"octets"},{from:1e3,to:1e6,unit:"ko",long:"kilooctets"},{from:1e6,to:1e9,unit:"Mo",long:"megaoctets"},{from:1e9,to:1e12,unit:"Go",long:"gigaoctets"},{from:1e12,to:1e15,unit:"To",long:"teraoctets"},{from:1e15,to:1e18,unit:"Po",long:"petaoctets"},{from:1e18,to:1e21,unit:"Eo",long:"exaoctets"},{from:1e21,to:1e24,unit:"Zo",long:"zettaoctets"},{from:1e24,to:1e27,unit:"Yo",long:"yottaoctets"}],iec:[{from:0,to:Math.pow(1024,1),unit:"B",long:"bytes"},{from:Math.pow(1024,1),to:Math.pow(1024,2),unit:"KiB",long:"kibibytes"},{from:Math.pow(1024,2),to:Math.pow(1024,3),unit:"MiB",long:"mebibytes"},{from:Math.pow(1024,3),to:Math.pow(1024,4),unit:"GiB",long:"gibibytes"},{from:Math.pow(1024,4),to:Math.pow(1024,5),unit:"TiB",long:"tebibytes"},{from:Math.pow(1024,5),to:Math.pow(1024,6),unit:"PiB",long:"pebibytes"},{from:Math.pow(1024,6),to:Math.pow(1024,7),unit:"EiB",long:"exbibytes"},{from:Math.pow(1024,7),to:Math.pow(1024,8),unit:"ZiB",long:"zebibytes"},{from:Math.pow(1024,8),to:Math.pow(1024,9),unit:"YiB",long:"yobibytes"}],iec_octet:[{from:0,to:Math.pow(1024,1),unit:"o",long:"octets"},{from:Math.pow(1024,1),to:Math.pow(1024,2),unit:"Kio",long:"kibioctets"},{from:Math.pow(1024,2),to:Math.pow(1024,3),unit:"Mio",long:"mebioctets"},{from:Math.pow(1024,3),to:Math.pow(1024,4),unit:"Gio",long:"gibioctets"},{from:Math.pow(1024,4),to:Math.pow(1024,5),unit:"Tio",long:"tebioctets"},{from:Math.pow(1024,5),to:Math.pow(1024,6),unit:"Pio",long:"pebioctets"},{from:Math.pow(1024,6),to:Math.pow(1024,7),unit:"Eio",long:"exbioctets"},{from:Math.pow(1024,7),to:Math.pow(1024,8),unit:"Zio",long:"zebioctets"},{from:Math.pow(1024,8),to:Math.pow(1024,9),unit:"Yio",long:"yobioctets"}]};class gA{constructor(t,n){n=Object.assign({units:"metric",precision:1,locale:void 0},qp,n),Eh.set(this,n),Object.assign(kh,n.customUnits);const i=t<0?"-":"";t=Math.abs(t);const o=kh[n.units];if(o){const a=o.find(c=>t>=c.from&&t<c.to);if(a){const c=new Intl.NumberFormat(n.locale,{style:"decimal",maximumFractionDigits:n.precision}),u=a.from===0?i+c.format(t):i+c.format(t/a.from);this.value=u,this.unit=a.unit,this.long=a.long}else this.value=i+t,this.unit="",this.long=""}else throw new Error(`Invalid units specified: ${n.units}`)}toString(){const t=Eh.get(this);return t.toStringFn?t.toStringFn.bind(this)():`${this.value} ${this.unit}`}}function Gp(e,t){return new gA(e,t)}Gp.defaultOptions=function(e){qp=e};const mA=["acid","aqua","autumn","black","bumblebee","business","cmyk","coffee","corporate","cupcake","cyberpunk","dark","dim","dracula","emerald","fantasy","forest","garden","halloween","lemonade","light","lofi","luxury","night","nord","pastel","retro","sunset","synthwave","valentine","winter","wireframe"];var zt=(e=>(e.Overview="/overview",e.Proxies="/proxies",e.Rules="/rules",e.Conns="/conns",e.Log="/logs",e.Config="/config",e.Setup="/setup",e))(zt||{});const vA=10,GD={title:{align:"center",style:{color:"gray",fontSize:"16px"}},chart:{toolbar:{show:!1},zoom:{enabled:!1},animations:{easing:"linear"}},noData:{text:"Loading..."},legend:{showForSingleSeries:!0,fontSize:"16px",labels:{colors:"gray"},itemMargin:{horizontal:32}},dataLabels:{enabled:!1},grid:{yaxis:{lines:{show:!1}}},stroke:{curve:"smooth"},tooltip:{enabled:!1},xaxis:{range:vA,labels:{show:!1},axisTicks:{show:!1}},yaxis:{labels:{style:{colors:"gray",fontSize:"13px"},formatter:e=>Gp(e).toString()}}};var wu=(e=>(e[e.NOT_CONNECTED=0]="NOT_CONNECTED",e[e.MEDIUM=200]="MEDIUM",e[e.HIGH=500]="HIGH",e))(wu||{}),Vp=(e=>(e[e.NOT_CONNECTED=0]="NOT_CONNECTED",e[e.MEDIUM=800]="MEDIUM",e[e.HIGH=1500]="HIGH",e))(Vp||{}),Kp=(e=>(e.OFF="off",e.DOTS="dots",e.BAR="bar",e.Auto="auto",e))(Kp||{}),pi=(e=>(e.NATURAL="orderNatural",e.LATENCY_ASC="orderLatency_asc",e.LATENCY_DESC="orderLatency_desc",e.NAME_ASC="orderName_asc",e.NAME_DESC="orderName_desc",e))(pi||{}),Ks=(e=>(e.EN="en-US",e.ZH="zh-CN",e.RU="ru-RU",e))(Ks||{}),Yp=(e=>(e.Details="details",e.Close="close",e.ID="ID",e.Type="type",e.Process="process",e.Host="host",e.SniffHost="sniffHost",e.Rule="rule",e.Chains="chains",e.DlSpeed="dlSpeed",e.UlSpeed="ulSpeed",e.Download="dl",e.Upload="ul",e.ConnectTime="connectTime",e.SourceIP="sourceIP",e.SourcePort="sourcePort",e.Destination="destination",e.InboundUser="inboundUser",e))(Yp||{});const Ph=200,_u=Object.values(Yp),Xp={...Object.fromEntries(_u.map(e=>[e,!1])),details:!0,close:!0,host:!0,rule:!0,chains:!0,dlSpeed:!0,ulSpeed:!0,sourceIP:!0};var Hr=(e=>(e.XS="xs",e.SM="sm",e.MD="md",e.LG="lg",e))(Hr||{}),Jp=(e=>(e.Info="info",e.Error="error",e.Warning="warning",e.Debug="debug",e.Silent="silent",e))(Jp||{});const yA=[200,300,500,800,1e3],bA=yA[0],wA=Kp.Auto,[VD,KD]=it(J(wA),{name:"proxiesPreviewType",storage:localStorage}),_A=pi.NATURAL,[YD,XD]=it(J(_A),{name:"proxiesOrderingType",storage:localStorage}),xA=!0,[SA,JD]=it(J(xA),{name:"renderProxiesInTwoColumns",storage:localStorage}),AA=!1,[QD,eI]=it(J(AA),{name:"hideUnAvailableProxies",storage:localStorage}),TA="https://www.gstatic.com/generate_204",[Sr,tI]=it(J(TA),{name:"urlForLatencyTest",storage:localStorage}),CA=!0,[OA,nI]=it(J(CA),{name:"autoCloseConns",storage:localStorage}),EA=!1,[kA,rI]=it(J(EA),{name:"useTwemoji",storage:localStorage}),PA=!1,[DA,iI]=it(J(PA),{name:"autoSwitchTheme",storage:localStorage}),IA="nord",[RA,sI]=it(J(IA),{name:"favDayTheme",storage:localStorage}),LA="sunset",[MA,oI]=it(J(LA),{name:"favNightTheme",storage:localStorage}),$A=Hr.XS,[NA,FA]=it(J($A),{name:"connectionsTableSize",storage:localStorage}),UA=Xp,[aI,lI]=it(J(UA),{name:"connectionsTableColumnVisibility",storage:localStorage}),BA=_u,[cI,uI]=it(J(BA),{name:"connectionsTableColumnOrder",storage:localStorage}),zA=[],[Qp,eg]=it(J(zA),{name:"clientSourceIPTags",storage:localStorage}),WA=Hr.XS,[fI,dI]=it(J(WA),{name:"logsTableSize",storage:localStorage}),jA=Jp.Info,[Dh,hI]=it(J(jA),{name:"logLevel",storage:localStorage}),HA=bA,[ZA,pI]=it(J(HA),{name:"logMaxRows",storage:localStorage}),gI=e=>{let t="table-xs";switch(e){case Hr.XS:t="table-xs";break;case Hr.SM:t="table-sm";break;case Hr.MD:t="table-md";break;case Hr.LG:t="table-lg";break}return t},qA=5e3,[Ih,mI]=it(J(qA),{name:"latencyTestTimeoutDuration",storage:localStorage}),GA=()=>Sr().startsWith("https"),$n=()=>GA()?Vp:wu,VA=24,[vI,yI]=it(J(VA),{name:"iconHeight",storage:localStorage}),KA=8,[bI,wI]=it(J(KA),{name:"iconMarginRight",storage:localStorage});var js={exports:{}};/**
|
||
* @license
|
||
* Lodash <https://lodash.com/>
|
||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||
* Released under MIT license <https://lodash.com/license>
|
||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||
*/var YA=js.exports,Rh;function XA(){return Rh||(Rh=1,function(e,t){(function(){var n,i="4.17.21",o=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,p="__lodash_placeholder__",m=1,b=2,w=4,A=1,T=2,S=1,_=2,C=4,L=8,N=16,F=32,Y=64,re=128,he=256,oe=512,X=30,j="...",ne=800,$e=16,E=1,I=2,D=3,Z=1/0,M=9007199254740991,R=17976931348623157e292,z=NaN,q=4294967295,ce=q-1,ye=q>>>1,Ce=[["ary",re],["bind",S],["bindKey",_],["curry",L],["curryRight",N],["flip",oe],["partial",F],["partialRight",Y],["rearg",he]],Ue="[object Arguments]",ht="[object Array]",Tt="[object AsyncFunction]",wt="[object Boolean]",_t="[object Date]",ut="[object DOMException]",pt="[object Error]",gt="[object Function]",le="[object GeneratorFunction]",G="[object Map]",pe="[object Number]",ke="[object Null]",st="[object Object]",En="[object Promise]",pn="[object Proxy]",ot="[object RegExp]",Ge="[object Set]",Ct="[object String]",Nt="[object Symbol]",Gn="[object Undefined]",ni="[object WeakMap]",Je="[object WeakSet]",je="[object ArrayBuffer]",ft="[object DataView]",Ot="[object Float32Array]",tn="[object Float64Array]",Ht="[object Int8Array]",kn="[object Int16Array]",gn="[object Int32Array]",Pn="[object Uint8Array]",Pi="[object Uint8ClampedArray]",ar="[object Uint16Array]",xs="[object Uint32Array]",lm=/\b__p \+= '';/g,cm=/\b(__p \+=) '' \+/g,um=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Lu=/&(?:amp|lt|gt|quot|#39);/g,Mu=/[&<>"']/g,fm=RegExp(Lu.source),dm=RegExp(Mu.source),hm=/<%-([\s\S]+?)%>/g,pm=/<%([\s\S]+?)%>/g,$u=/<%=([\s\S]+?)%>/g,gm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mm=/^\w*$/,vm=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vl=/[\\^$.*+?()[\]{}|]/g,ym=RegExp(vl.source),yl=/^\s+/,bm=/\s/,wm=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_m=/\{\n\/\* \[wrapped with (.+)\] \*/,xm=/,? & /,Sm=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Am=/[()=,{}\[\]\/\s]/,Tm=/\\(\\)?/g,Cm=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nu=/\w*$/,Om=/^[-+]0x[0-9a-f]+$/i,Em=/^0b[01]+$/i,km=/^\[object .+?Constructor\]$/,Pm=/^0o[0-7]+$/i,Dm=/^(?:0|[1-9]\d*)$/,Im=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,So=/($^)/,Rm=/['\n\r\u2028\u2029\\]/g,Ao="\\ud800-\\udfff",Lm="\\u0300-\\u036f",Mm="\\ufe20-\\ufe2f",$m="\\u20d0-\\u20ff",Fu=Lm+Mm+$m,Uu="\\u2700-\\u27bf",Bu="a-z\\xdf-\\xf6\\xf8-\\xff",Nm="\\xac\\xb1\\xd7\\xf7",Fm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Um="\\u2000-\\u206f",Bm=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",zu="A-Z\\xc0-\\xd6\\xd8-\\xde",Wu="\\ufe0e\\ufe0f",ju=Nm+Fm+Um+Bm,bl="['’]",zm="["+Ao+"]",Hu="["+ju+"]",To="["+Fu+"]",Zu="\\d+",Wm="["+Uu+"]",qu="["+Bu+"]",Gu="[^"+Ao+ju+Zu+Uu+Bu+zu+"]",wl="\\ud83c[\\udffb-\\udfff]",jm="(?:"+To+"|"+wl+")",Vu="[^"+Ao+"]",_l="(?:\\ud83c[\\udde6-\\uddff]){2}",xl="[\\ud800-\\udbff][\\udc00-\\udfff]",Di="["+zu+"]",Ku="\\u200d",Yu="(?:"+qu+"|"+Gu+")",Hm="(?:"+Di+"|"+Gu+")",Xu="(?:"+bl+"(?:d|ll|m|re|s|t|ve))?",Ju="(?:"+bl+"(?:D|LL|M|RE|S|T|VE))?",Qu=jm+"?",ef="["+Wu+"]?",Zm="(?:"+Ku+"(?:"+[Vu,_l,xl].join("|")+")"+ef+Qu+")*",qm="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Gm="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",tf=ef+Qu+Zm,Vm="(?:"+[Wm,_l,xl].join("|")+")"+tf,Km="(?:"+[Vu+To+"?",To,_l,xl,zm].join("|")+")",Ym=RegExp(bl,"g"),Xm=RegExp(To,"g"),Sl=RegExp(wl+"(?="+wl+")|"+Km+tf,"g"),Jm=RegExp([Di+"?"+qu+"+"+Xu+"(?="+[Hu,Di,"$"].join("|")+")",Hm+"+"+Ju+"(?="+[Hu,Di+Yu,"$"].join("|")+")",Di+"?"+Yu+"+"+Xu,Di+"+"+Ju,Gm,qm,Zu,Vm].join("|"),"g"),Qm=RegExp("["+Ku+Ao+Fu+Wu+"]"),ev=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tv=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nv=-1,nt={};nt[Ot]=nt[tn]=nt[Ht]=nt[kn]=nt[gn]=nt[Pn]=nt[Pi]=nt[ar]=nt[xs]=!0,nt[Ue]=nt[ht]=nt[je]=nt[wt]=nt[ft]=nt[_t]=nt[pt]=nt[gt]=nt[G]=nt[pe]=nt[st]=nt[ot]=nt[Ge]=nt[Ct]=nt[ni]=!1;var et={};et[Ue]=et[ht]=et[je]=et[ft]=et[wt]=et[_t]=et[Ot]=et[tn]=et[Ht]=et[kn]=et[gn]=et[G]=et[pe]=et[st]=et[ot]=et[Ge]=et[Ct]=et[Nt]=et[Pn]=et[Pi]=et[ar]=et[xs]=!0,et[pt]=et[gt]=et[ni]=!1;var rv={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},iv={"&":"&","<":"<",">":">",'"':""","'":"'"},sv={"&":"&","<":"<",">":">",""":'"',"'":"'"},ov={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},av=parseFloat,lv=parseInt,nf=typeof ha=="object"&&ha&&ha.Object===Object&&ha,cv=typeof self=="object"&&self&&self.Object===Object&&self,Et=nf||cv||Function("return this")(),Al=t&&!t.nodeType&&t,ri=Al&&!0&&e&&!e.nodeType&&e,rf=ri&&ri.exports===Al,Tl=rf&&nf.process,mn=function(){try{var k=ri&&ri.require&&ri.require("util").types;return k||Tl&&Tl.binding&&Tl.binding("util")}catch{}}(),sf=mn&&mn.isArrayBuffer,of=mn&&mn.isDate,af=mn&&mn.isMap,lf=mn&&mn.isRegExp,cf=mn&&mn.isSet,uf=mn&&mn.isTypedArray;function nn(k,U,$){switch($.length){case 0:return k.call(U);case 1:return k.call(U,$[0]);case 2:return k.call(U,$[0],$[1]);case 3:return k.call(U,$[0],$[1],$[2])}return k.apply(U,$)}function uv(k,U,$,se){for(var Se=-1,He=k==null?0:k.length;++Se<He;){var xt=k[Se];U(se,xt,$(xt),k)}return se}function vn(k,U){for(var $=-1,se=k==null?0:k.length;++$<se&&U(k[$],$,k)!==!1;);return k}function fv(k,U){for(var $=k==null?0:k.length;$--&&U(k[$],$,k)!==!1;);return k}function ff(k,U){for(var $=-1,se=k==null?0:k.length;++$<se;)if(!U(k[$],$,k))return!1;return!0}function Pr(k,U){for(var $=-1,se=k==null?0:k.length,Se=0,He=[];++$<se;){var xt=k[$];U(xt,$,k)&&(He[Se++]=xt)}return He}function Co(k,U){var $=k==null?0:k.length;return!!$&&Ii(k,U,0)>-1}function Cl(k,U,$){for(var se=-1,Se=k==null?0:k.length;++se<Se;)if($(U,k[se]))return!0;return!1}function at(k,U){for(var $=-1,se=k==null?0:k.length,Se=Array(se);++$<se;)Se[$]=U(k[$],$,k);return Se}function Dr(k,U){for(var $=-1,se=U.length,Se=k.length;++$<se;)k[Se+$]=U[$];return k}function Ol(k,U,$,se){var Se=-1,He=k==null?0:k.length;for(se&&He&&($=k[++Se]);++Se<He;)$=U($,k[Se],Se,k);return $}function dv(k,U,$,se){var Se=k==null?0:k.length;for(se&&Se&&($=k[--Se]);Se--;)$=U($,k[Se],Se,k);return $}function El(k,U){for(var $=-1,se=k==null?0:k.length;++$<se;)if(U(k[$],$,k))return!0;return!1}var hv=kl("length");function pv(k){return k.split("")}function gv(k){return k.match(Sm)||[]}function df(k,U,$){var se;return $(k,function(Se,He,xt){if(U(Se,He,xt))return se=He,!1}),se}function Oo(k,U,$,se){for(var Se=k.length,He=$+(se?1:-1);se?He--:++He<Se;)if(U(k[He],He,k))return He;return-1}function Ii(k,U,$){return U===U?Ov(k,U,$):Oo(k,hf,$)}function mv(k,U,$,se){for(var Se=$-1,He=k.length;++Se<He;)if(se(k[Se],U))return Se;return-1}function hf(k){return k!==k}function pf(k,U){var $=k==null?0:k.length;return $?Dl(k,U)/$:z}function kl(k){return function(U){return U==null?n:U[k]}}function Pl(k){return function(U){return k==null?n:k[U]}}function gf(k,U,$,se,Se){return Se(k,function(He,xt,Qe){$=se?(se=!1,He):U($,He,xt,Qe)}),$}function vv(k,U){var $=k.length;for(k.sort(U);$--;)k[$]=k[$].value;return k}function Dl(k,U){for(var $,se=-1,Se=k.length;++se<Se;){var He=U(k[se]);He!==n&&($=$===n?He:$+He)}return $}function Il(k,U){for(var $=-1,se=Array(k);++$<k;)se[$]=U($);return se}function yv(k,U){return at(U,function($){return[$,k[$]]})}function mf(k){return k&&k.slice(0,wf(k)+1).replace(yl,"")}function rn(k){return function(U){return k(U)}}function Rl(k,U){return at(U,function($){return k[$]})}function Ss(k,U){return k.has(U)}function vf(k,U){for(var $=-1,se=k.length;++$<se&&Ii(U,k[$],0)>-1;);return $}function yf(k,U){for(var $=k.length;$--&&Ii(U,k[$],0)>-1;);return $}function bv(k,U){for(var $=k.length,se=0;$--;)k[$]===U&&++se;return se}var wv=Pl(rv),_v=Pl(iv);function xv(k){return"\\"+ov[k]}function Sv(k,U){return k==null?n:k[U]}function Ri(k){return Qm.test(k)}function Av(k){return ev.test(k)}function Tv(k){for(var U,$=[];!(U=k.next()).done;)$.push(U.value);return $}function Ll(k){var U=-1,$=Array(k.size);return k.forEach(function(se,Se){$[++U]=[Se,se]}),$}function bf(k,U){return function($){return k(U($))}}function Ir(k,U){for(var $=-1,se=k.length,Se=0,He=[];++$<se;){var xt=k[$];(xt===U||xt===p)&&(k[$]=p,He[Se++]=$)}return He}function Eo(k){var U=-1,$=Array(k.size);return k.forEach(function(se){$[++U]=se}),$}function Cv(k){var U=-1,$=Array(k.size);return k.forEach(function(se){$[++U]=[se,se]}),$}function Ov(k,U,$){for(var se=$-1,Se=k.length;++se<Se;)if(k[se]===U)return se;return-1}function Ev(k,U,$){for(var se=$+1;se--;)if(k[se]===U)return se;return se}function Li(k){return Ri(k)?Pv(k):hv(k)}function Dn(k){return Ri(k)?Dv(k):pv(k)}function wf(k){for(var U=k.length;U--&&bm.test(k.charAt(U)););return U}var kv=Pl(sv);function Pv(k){for(var U=Sl.lastIndex=0;Sl.test(k);)++U;return U}function Dv(k){return k.match(Sl)||[]}function Iv(k){return k.match(Jm)||[]}var Rv=function k(U){U=U==null?Et:Mi.defaults(Et.Object(),U,Mi.pick(Et,tv));var $=U.Array,se=U.Date,Se=U.Error,He=U.Function,xt=U.Math,Qe=U.Object,Ml=U.RegExp,Lv=U.String,yn=U.TypeError,ko=$.prototype,Mv=He.prototype,$i=Qe.prototype,Po=U["__core-js_shared__"],Do=Mv.toString,Ke=$i.hasOwnProperty,$v=0,_f=function(){var r=/[^.]+$/.exec(Po&&Po.keys&&Po.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Io=$i.toString,Nv=Do.call(Qe),Fv=Et._,Uv=Ml("^"+Do.call(Ke).replace(vl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ro=rf?U.Buffer:n,Rr=U.Symbol,Lo=U.Uint8Array,xf=Ro?Ro.allocUnsafe:n,Mo=bf(Qe.getPrototypeOf,Qe),Sf=Qe.create,Af=$i.propertyIsEnumerable,$o=ko.splice,Tf=Rr?Rr.isConcatSpreadable:n,As=Rr?Rr.iterator:n,ii=Rr?Rr.toStringTag:n,No=function(){try{var r=ci(Qe,"defineProperty");return r({},"",{}),r}catch{}}(),Bv=U.clearTimeout!==Et.clearTimeout&&U.clearTimeout,zv=se&&se.now!==Et.Date.now&&se.now,Wv=U.setTimeout!==Et.setTimeout&&U.setTimeout,Fo=xt.ceil,Uo=xt.floor,$l=Qe.getOwnPropertySymbols,jv=Ro?Ro.isBuffer:n,Cf=U.isFinite,Hv=ko.join,Zv=bf(Qe.keys,Qe),St=xt.max,It=xt.min,qv=se.now,Gv=U.parseInt,Of=xt.random,Vv=ko.reverse,Nl=ci(U,"DataView"),Ts=ci(U,"Map"),Fl=ci(U,"Promise"),Ni=ci(U,"Set"),Cs=ci(U,"WeakMap"),Os=ci(Qe,"create"),Bo=Cs&&new Cs,Fi={},Kv=ui(Nl),Yv=ui(Ts),Xv=ui(Fl),Jv=ui(Ni),Qv=ui(Cs),zo=Rr?Rr.prototype:n,Es=zo?zo.valueOf:n,Ef=zo?zo.toString:n;function v(r){if(dt(r)&&!Ae(r)&&!(r instanceof Fe)){if(r instanceof bn)return r;if(Ke.call(r,"__wrapped__"))return kd(r)}return new bn(r)}var Ui=function(){function r(){}return function(s){if(!lt(s))return{};if(Sf)return Sf(s);r.prototype=s;var l=new r;return r.prototype=n,l}}();function Wo(){}function bn(r,s){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=n}v.templateSettings={escape:hm,evaluate:pm,interpolate:$u,variable:"",imports:{_:v}},v.prototype=Wo.prototype,v.prototype.constructor=v,bn.prototype=Ui(Wo.prototype),bn.prototype.constructor=bn;function Fe(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=q,this.__views__=[]}function ey(){var r=new Fe(this.__wrapped__);return r.__actions__=Zt(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Zt(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Zt(this.__views__),r}function ty(){if(this.__filtered__){var r=new Fe(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function ny(){var r=this.__wrapped__.value(),s=this.__dir__,l=Ae(r),d=s<0,g=l?r.length:0,y=pb(0,g,this.__views__),x=y.start,O=y.end,P=O-x,W=d?O:x-1,H=this.__iteratees__,V=H.length,Q=0,ue=It(P,this.__takeCount__);if(!l||!d&&g==P&&ue==P)return Jf(r,this.__actions__);var me=[];e:for(;P--&&Q<ue;){W+=s;for(var Pe=-1,ve=r[W];++Pe<V;){var Ne=H[Pe],Be=Ne.iteratee,an=Ne.type,Bt=Be(ve);if(an==I)ve=Bt;else if(!Bt){if(an==E)continue e;break e}}me[Q++]=ve}return me}Fe.prototype=Ui(Wo.prototype),Fe.prototype.constructor=Fe;function si(r){var s=-1,l=r==null?0:r.length;for(this.clear();++s<l;){var d=r[s];this.set(d[0],d[1])}}function ry(){this.__data__=Os?Os(null):{},this.size=0}function iy(r){var s=this.has(r)&&delete this.__data__[r];return this.size-=s?1:0,s}function sy(r){var s=this.__data__;if(Os){var l=s[r];return l===f?n:l}return Ke.call(s,r)?s[r]:n}function oy(r){var s=this.__data__;return Os?s[r]!==n:Ke.call(s,r)}function ay(r,s){var l=this.__data__;return this.size+=this.has(r)?0:1,l[r]=Os&&s===n?f:s,this}si.prototype.clear=ry,si.prototype.delete=iy,si.prototype.get=sy,si.prototype.has=oy,si.prototype.set=ay;function lr(r){var s=-1,l=r==null?0:r.length;for(this.clear();++s<l;){var d=r[s];this.set(d[0],d[1])}}function ly(){this.__data__=[],this.size=0}function cy(r){var s=this.__data__,l=jo(s,r);if(l<0)return!1;var d=s.length-1;return l==d?s.pop():$o.call(s,l,1),--this.size,!0}function uy(r){var s=this.__data__,l=jo(s,r);return l<0?n:s[l][1]}function fy(r){return jo(this.__data__,r)>-1}function dy(r,s){var l=this.__data__,d=jo(l,r);return d<0?(++this.size,l.push([r,s])):l[d][1]=s,this}lr.prototype.clear=ly,lr.prototype.delete=cy,lr.prototype.get=uy,lr.prototype.has=fy,lr.prototype.set=dy;function cr(r){var s=-1,l=r==null?0:r.length;for(this.clear();++s<l;){var d=r[s];this.set(d[0],d[1])}}function hy(){this.size=0,this.__data__={hash:new si,map:new(Ts||lr),string:new si}}function py(r){var s=ta(this,r).delete(r);return this.size-=s?1:0,s}function gy(r){return ta(this,r).get(r)}function my(r){return ta(this,r).has(r)}function vy(r,s){var l=ta(this,r),d=l.size;return l.set(r,s),this.size+=l.size==d?0:1,this}cr.prototype.clear=hy,cr.prototype.delete=py,cr.prototype.get=gy,cr.prototype.has=my,cr.prototype.set=vy;function oi(r){var s=-1,l=r==null?0:r.length;for(this.__data__=new cr;++s<l;)this.add(r[s])}function yy(r){return this.__data__.set(r,f),this}function by(r){return this.__data__.has(r)}oi.prototype.add=oi.prototype.push=yy,oi.prototype.has=by;function In(r){var s=this.__data__=new lr(r);this.size=s.size}function wy(){this.__data__=new lr,this.size=0}function _y(r){var s=this.__data__,l=s.delete(r);return this.size=s.size,l}function xy(r){return this.__data__.get(r)}function Sy(r){return this.__data__.has(r)}function Ay(r,s){var l=this.__data__;if(l instanceof lr){var d=l.__data__;if(!Ts||d.length<o-1)return d.push([r,s]),this.size=++l.size,this;l=this.__data__=new cr(d)}return l.set(r,s),this.size=l.size,this}In.prototype.clear=wy,In.prototype.delete=_y,In.prototype.get=xy,In.prototype.has=Sy,In.prototype.set=Ay;function kf(r,s){var l=Ae(r),d=!l&&fi(r),g=!l&&!d&&Fr(r),y=!l&&!d&&!g&&ji(r),x=l||d||g||y,O=x?Il(r.length,Lv):[],P=O.length;for(var W in r)(s||Ke.call(r,W))&&!(x&&(W=="length"||g&&(W=="offset"||W=="parent")||y&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||hr(W,P)))&&O.push(W);return O}function Pf(r){var s=r.length;return s?r[Kl(0,s-1)]:n}function Ty(r,s){return na(Zt(r),ai(s,0,r.length))}function Cy(r){return na(Zt(r))}function Ul(r,s,l){(l!==n&&!Rn(r[s],l)||l===n&&!(s in r))&&ur(r,s,l)}function ks(r,s,l){var d=r[s];(!(Ke.call(r,s)&&Rn(d,l))||l===n&&!(s in r))&&ur(r,s,l)}function jo(r,s){for(var l=r.length;l--;)if(Rn(r[l][0],s))return l;return-1}function Oy(r,s,l,d){return Lr(r,function(g,y,x){s(d,g,l(g),x)}),d}function Df(r,s){return r&&Kn(s,At(s),r)}function Ey(r,s){return r&&Kn(s,Gt(s),r)}function ur(r,s,l){s=="__proto__"&&No?No(r,s,{configurable:!0,enumerable:!0,value:l,writable:!0}):r[s]=l}function Bl(r,s){for(var l=-1,d=s.length,g=$(d),y=r==null;++l<d;)g[l]=y?n:wc(r,s[l]);return g}function ai(r,s,l){return r===r&&(l!==n&&(r=r<=l?r:l),s!==n&&(r=r>=s?r:s)),r}function wn(r,s,l,d,g,y){var x,O=s&m,P=s&b,W=s&w;if(l&&(x=g?l(r,d,g,y):l(r)),x!==n)return x;if(!lt(r))return r;var H=Ae(r);if(H){if(x=mb(r),!O)return Zt(r,x)}else{var V=Rt(r),Q=V==gt||V==le;if(Fr(r))return td(r,O);if(V==st||V==Ue||Q&&!g){if(x=P||Q?{}:wd(r),!O)return P?sb(r,Ey(x,r)):ib(r,Df(x,r))}else{if(!et[V])return g?r:{};x=vb(r,V,O)}}y||(y=new In);var ue=y.get(r);if(ue)return ue;y.set(r,x),Kd(r)?r.forEach(function(ve){x.add(wn(ve,s,l,ve,r,y))}):Gd(r)&&r.forEach(function(ve,Ne){x.set(Ne,wn(ve,s,l,Ne,r,y))});var me=W?P?oc:sc:P?Gt:At,Pe=H?n:me(r);return vn(Pe||r,function(ve,Ne){Pe&&(Ne=ve,ve=r[Ne]),ks(x,Ne,wn(ve,s,l,Ne,r,y))}),x}function ky(r){var s=At(r);return function(l){return If(l,r,s)}}function If(r,s,l){var d=l.length;if(r==null)return!d;for(r=Qe(r);d--;){var g=l[d],y=s[g],x=r[g];if(x===n&&!(g in r)||!y(x))return!1}return!0}function Rf(r,s,l){if(typeof r!="function")throw new yn(c);return $s(function(){r.apply(n,l)},s)}function Ps(r,s,l,d){var g=-1,y=Co,x=!0,O=r.length,P=[],W=s.length;if(!O)return P;l&&(s=at(s,rn(l))),d?(y=Cl,x=!1):s.length>=o&&(y=Ss,x=!1,s=new oi(s));e:for(;++g<O;){var H=r[g],V=l==null?H:l(H);if(H=d||H!==0?H:0,x&&V===V){for(var Q=W;Q--;)if(s[Q]===V)continue e;P.push(H)}else y(s,V,d)||P.push(H)}return P}var Lr=od(Vn),Lf=od(Wl,!0);function Py(r,s){var l=!0;return Lr(r,function(d,g,y){return l=!!s(d,g,y),l}),l}function Ho(r,s,l){for(var d=-1,g=r.length;++d<g;){var y=r[d],x=s(y);if(x!=null&&(O===n?x===x&&!on(x):l(x,O)))var O=x,P=y}return P}function Dy(r,s,l,d){var g=r.length;for(l=Oe(l),l<0&&(l=-l>g?0:g+l),d=d===n||d>g?g:Oe(d),d<0&&(d+=g),d=l>d?0:Xd(d);l<d;)r[l++]=s;return r}function Mf(r,s){var l=[];return Lr(r,function(d,g,y){s(d,g,y)&&l.push(d)}),l}function kt(r,s,l,d,g){var y=-1,x=r.length;for(l||(l=bb),g||(g=[]);++y<x;){var O=r[y];s>0&&l(O)?s>1?kt(O,s-1,l,d,g):Dr(g,O):d||(g[g.length]=O)}return g}var zl=ad(),$f=ad(!0);function Vn(r,s){return r&&zl(r,s,At)}function Wl(r,s){return r&&$f(r,s,At)}function Zo(r,s){return Pr(s,function(l){return pr(r[l])})}function li(r,s){s=$r(s,r);for(var l=0,d=s.length;r!=null&&l<d;)r=r[Yn(s[l++])];return l&&l==d?r:n}function Nf(r,s,l){var d=s(r);return Ae(r)?d:Dr(d,l(r))}function Ft(r){return r==null?r===n?Gn:ke:ii&&ii in Qe(r)?hb(r):Cb(r)}function jl(r,s){return r>s}function Iy(r,s){return r!=null&&Ke.call(r,s)}function Ry(r,s){return r!=null&&s in Qe(r)}function Ly(r,s,l){return r>=It(s,l)&&r<St(s,l)}function Hl(r,s,l){for(var d=l?Cl:Co,g=r[0].length,y=r.length,x=y,O=$(y),P=1/0,W=[];x--;){var H=r[x];x&&s&&(H=at(H,rn(s))),P=It(H.length,P),O[x]=!l&&(s||g>=120&&H.length>=120)?new oi(x&&H):n}H=r[0];var V=-1,Q=O[0];e:for(;++V<g&&W.length<P;){var ue=H[V],me=s?s(ue):ue;if(ue=l||ue!==0?ue:0,!(Q?Ss(Q,me):d(W,me,l))){for(x=y;--x;){var Pe=O[x];if(!(Pe?Ss(Pe,me):d(r[x],me,l)))continue e}Q&&Q.push(me),W.push(ue)}}return W}function My(r,s,l,d){return Vn(r,function(g,y,x){s(d,l(g),y,x)}),d}function Ds(r,s,l){s=$r(s,r),r=Ad(r,s);var d=r==null?r:r[Yn(xn(s))];return d==null?n:nn(d,r,l)}function Ff(r){return dt(r)&&Ft(r)==Ue}function $y(r){return dt(r)&&Ft(r)==je}function Ny(r){return dt(r)&&Ft(r)==_t}function Is(r,s,l,d,g){return r===s?!0:r==null||s==null||!dt(r)&&!dt(s)?r!==r&&s!==s:Fy(r,s,l,d,Is,g)}function Fy(r,s,l,d,g,y){var x=Ae(r),O=Ae(s),P=x?ht:Rt(r),W=O?ht:Rt(s);P=P==Ue?st:P,W=W==Ue?st:W;var H=P==st,V=W==st,Q=P==W;if(Q&&Fr(r)){if(!Fr(s))return!1;x=!0,H=!1}if(Q&&!H)return y||(y=new In),x||ji(r)?vd(r,s,l,d,g,y):fb(r,s,P,l,d,g,y);if(!(l&A)){var ue=H&&Ke.call(r,"__wrapped__"),me=V&&Ke.call(s,"__wrapped__");if(ue||me){var Pe=ue?r.value():r,ve=me?s.value():s;return y||(y=new In),g(Pe,ve,l,d,y)}}return Q?(y||(y=new In),db(r,s,l,d,g,y)):!1}function Uy(r){return dt(r)&&Rt(r)==G}function Zl(r,s,l,d){var g=l.length,y=g,x=!d;if(r==null)return!y;for(r=Qe(r);g--;){var O=l[g];if(x&&O[2]?O[1]!==r[O[0]]:!(O[0]in r))return!1}for(;++g<y;){O=l[g];var P=O[0],W=r[P],H=O[1];if(x&&O[2]){if(W===n&&!(P in r))return!1}else{var V=new In;if(d)var Q=d(W,H,P,r,s,V);if(!(Q===n?Is(H,W,A|T,d,V):Q))return!1}}return!0}function Uf(r){if(!lt(r)||_b(r))return!1;var s=pr(r)?Uv:km;return s.test(ui(r))}function By(r){return dt(r)&&Ft(r)==ot}function zy(r){return dt(r)&&Rt(r)==Ge}function Wy(r){return dt(r)&&la(r.length)&&!!nt[Ft(r)]}function Bf(r){return typeof r=="function"?r:r==null?Vt:typeof r=="object"?Ae(r)?jf(r[0],r[1]):Wf(r):lh(r)}function ql(r){if(!Ms(r))return Zv(r);var s=[];for(var l in Qe(r))Ke.call(r,l)&&l!="constructor"&&s.push(l);return s}function jy(r){if(!lt(r))return Tb(r);var s=Ms(r),l=[];for(var d in r)d=="constructor"&&(s||!Ke.call(r,d))||l.push(d);return l}function Gl(r,s){return r<s}function zf(r,s){var l=-1,d=qt(r)?$(r.length):[];return Lr(r,function(g,y,x){d[++l]=s(g,y,x)}),d}function Wf(r){var s=lc(r);return s.length==1&&s[0][2]?xd(s[0][0],s[0][1]):function(l){return l===r||Zl(l,r,s)}}function jf(r,s){return uc(r)&&_d(s)?xd(Yn(r),s):function(l){var d=wc(l,r);return d===n&&d===s?_c(l,r):Is(s,d,A|T)}}function qo(r,s,l,d,g){r!==s&&zl(s,function(y,x){if(g||(g=new In),lt(y))Hy(r,s,x,l,qo,d,g);else{var O=d?d(dc(r,x),y,x+"",r,s,g):n;O===n&&(O=y),Ul(r,x,O)}},Gt)}function Hy(r,s,l,d,g,y,x){var O=dc(r,l),P=dc(s,l),W=x.get(P);if(W){Ul(r,l,W);return}var H=y?y(O,P,l+"",r,s,x):n,V=H===n;if(V){var Q=Ae(P),ue=!Q&&Fr(P),me=!Q&&!ue&&ji(P);H=P,Q||ue||me?Ae(O)?H=O:mt(O)?H=Zt(O):ue?(V=!1,H=td(P,!0)):me?(V=!1,H=nd(P,!0)):H=[]:Ns(P)||fi(P)?(H=O,fi(O)?H=Jd(O):(!lt(O)||pr(O))&&(H=wd(P))):V=!1}V&&(x.set(P,H),g(H,P,d,y,x),x.delete(P)),Ul(r,l,H)}function Hf(r,s){var l=r.length;if(l)return s+=s<0?l:0,hr(s,l)?r[s]:n}function Zf(r,s,l){s.length?s=at(s,function(y){return Ae(y)?function(x){return li(x,y.length===1?y[0]:y)}:y}):s=[Vt];var d=-1;s=at(s,rn(ge()));var g=zf(r,function(y,x,O){var P=at(s,function(W){return W(y)});return{criteria:P,index:++d,value:y}});return vv(g,function(y,x){return rb(y,x,l)})}function Zy(r,s){return qf(r,s,function(l,d){return _c(r,d)})}function qf(r,s,l){for(var d=-1,g=s.length,y={};++d<g;){var x=s[d],O=li(r,x);l(O,x)&&Rs(y,$r(x,r),O)}return y}function qy(r){return function(s){return li(s,r)}}function Vl(r,s,l,d){var g=d?mv:Ii,y=-1,x=s.length,O=r;for(r===s&&(s=Zt(s)),l&&(O=at(r,rn(l)));++y<x;)for(var P=0,W=s[y],H=l?l(W):W;(P=g(O,H,P,d))>-1;)O!==r&&$o.call(O,P,1),$o.call(r,P,1);return r}function Gf(r,s){for(var l=r?s.length:0,d=l-1;l--;){var g=s[l];if(l==d||g!==y){var y=g;hr(g)?$o.call(r,g,1):Jl(r,g)}}return r}function Kl(r,s){return r+Uo(Of()*(s-r+1))}function Gy(r,s,l,d){for(var g=-1,y=St(Fo((s-r)/(l||1)),0),x=$(y);y--;)x[d?y:++g]=r,r+=l;return x}function Yl(r,s){var l="";if(!r||s<1||s>M)return l;do s%2&&(l+=r),s=Uo(s/2),s&&(r+=r);while(s);return l}function Ie(r,s){return hc(Sd(r,s,Vt),r+"")}function Vy(r){return Pf(Hi(r))}function Ky(r,s){var l=Hi(r);return na(l,ai(s,0,l.length))}function Rs(r,s,l,d){if(!lt(r))return r;s=$r(s,r);for(var g=-1,y=s.length,x=y-1,O=r;O!=null&&++g<y;){var P=Yn(s[g]),W=l;if(P==="__proto__"||P==="constructor"||P==="prototype")return r;if(g!=x){var H=O[P];W=d?d(H,P,O):n,W===n&&(W=lt(H)?H:hr(s[g+1])?[]:{})}ks(O,P,W),O=O[P]}return r}var Vf=Bo?function(r,s){return Bo.set(r,s),r}:Vt,Yy=No?function(r,s){return No(r,"toString",{configurable:!0,enumerable:!1,value:Sc(s),writable:!0})}:Vt;function Xy(r){return na(Hi(r))}function _n(r,s,l){var d=-1,g=r.length;s<0&&(s=-s>g?0:g+s),l=l>g?g:l,l<0&&(l+=g),g=s>l?0:l-s>>>0,s>>>=0;for(var y=$(g);++d<g;)y[d]=r[d+s];return y}function Jy(r,s){var l;return Lr(r,function(d,g,y){return l=s(d,g,y),!l}),!!l}function Go(r,s,l){var d=0,g=r==null?d:r.length;if(typeof s=="number"&&s===s&&g<=ye){for(;d<g;){var y=d+g>>>1,x=r[y];x!==null&&!on(x)&&(l?x<=s:x<s)?d=y+1:g=y}return g}return Xl(r,s,Vt,l)}function Xl(r,s,l,d){var g=0,y=r==null?0:r.length;if(y===0)return 0;s=l(s);for(var x=s!==s,O=s===null,P=on(s),W=s===n;g<y;){var H=Uo((g+y)/2),V=l(r[H]),Q=V!==n,ue=V===null,me=V===V,Pe=on(V);if(x)var ve=d||me;else W?ve=me&&(d||Q):O?ve=me&&Q&&(d||!ue):P?ve=me&&Q&&!ue&&(d||!Pe):ue||Pe?ve=!1:ve=d?V<=s:V<s;ve?g=H+1:y=H}return It(y,ce)}function Kf(r,s){for(var l=-1,d=r.length,g=0,y=[];++l<d;){var x=r[l],O=s?s(x):x;if(!l||!Rn(O,P)){var P=O;y[g++]=x===0?0:x}}return y}function Yf(r){return typeof r=="number"?r:on(r)?z:+r}function sn(r){if(typeof r=="string")return r;if(Ae(r))return at(r,sn)+"";if(on(r))return Ef?Ef.call(r):"";var s=r+"";return s=="0"&&1/r==-Z?"-0":s}function Mr(r,s,l){var d=-1,g=Co,y=r.length,x=!0,O=[],P=O;if(l)x=!1,g=Cl;else if(y>=o){var W=s?null:cb(r);if(W)return Eo(W);x=!1,g=Ss,P=new oi}else P=s?[]:O;e:for(;++d<y;){var H=r[d],V=s?s(H):H;if(H=l||H!==0?H:0,x&&V===V){for(var Q=P.length;Q--;)if(P[Q]===V)continue e;s&&P.push(V),O.push(H)}else g(P,V,l)||(P!==O&&P.push(V),O.push(H))}return O}function Jl(r,s){return s=$r(s,r),r=Ad(r,s),r==null||delete r[Yn(xn(s))]}function Xf(r,s,l,d){return Rs(r,s,l(li(r,s)),d)}function Vo(r,s,l,d){for(var g=r.length,y=d?g:-1;(d?y--:++y<g)&&s(r[y],y,r););return l?_n(r,d?0:y,d?y+1:g):_n(r,d?y+1:0,d?g:y)}function Jf(r,s){var l=r;return l instanceof Fe&&(l=l.value()),Ol(s,function(d,g){return g.func.apply(g.thisArg,Dr([d],g.args))},l)}function Ql(r,s,l){var d=r.length;if(d<2)return d?Mr(r[0]):[];for(var g=-1,y=$(d);++g<d;)for(var x=r[g],O=-1;++O<d;)O!=g&&(y[g]=Ps(y[g]||x,r[O],s,l));return Mr(kt(y,1),s,l)}function Qf(r,s,l){for(var d=-1,g=r.length,y=s.length,x={};++d<g;){var O=d<y?s[d]:n;l(x,r[d],O)}return x}function ec(r){return mt(r)?r:[]}function tc(r){return typeof r=="function"?r:Vt}function $r(r,s){return Ae(r)?r:uc(r,s)?[r]:Ed(Ve(r))}var Qy=Ie;function Nr(r,s,l){var d=r.length;return l=l===n?d:l,!s&&l>=d?r:_n(r,s,l)}var ed=Bv||function(r){return Et.clearTimeout(r)};function td(r,s){if(s)return r.slice();var l=r.length,d=xf?xf(l):new r.constructor(l);return r.copy(d),d}function nc(r){var s=new r.constructor(r.byteLength);return new Lo(s).set(new Lo(r)),s}function eb(r,s){var l=s?nc(r.buffer):r.buffer;return new r.constructor(l,r.byteOffset,r.byteLength)}function tb(r){var s=new r.constructor(r.source,Nu.exec(r));return s.lastIndex=r.lastIndex,s}function nb(r){return Es?Qe(Es.call(r)):{}}function nd(r,s){var l=s?nc(r.buffer):r.buffer;return new r.constructor(l,r.byteOffset,r.length)}function rd(r,s){if(r!==s){var l=r!==n,d=r===null,g=r===r,y=on(r),x=s!==n,O=s===null,P=s===s,W=on(s);if(!O&&!W&&!y&&r>s||y&&x&&P&&!O&&!W||d&&x&&P||!l&&P||!g)return 1;if(!d&&!y&&!W&&r<s||W&&l&&g&&!d&&!y||O&&l&&g||!x&&g||!P)return-1}return 0}function rb(r,s,l){for(var d=-1,g=r.criteria,y=s.criteria,x=g.length,O=l.length;++d<x;){var P=rd(g[d],y[d]);if(P){if(d>=O)return P;var W=l[d];return P*(W=="desc"?-1:1)}}return r.index-s.index}function id(r,s,l,d){for(var g=-1,y=r.length,x=l.length,O=-1,P=s.length,W=St(y-x,0),H=$(P+W),V=!d;++O<P;)H[O]=s[O];for(;++g<x;)(V||g<y)&&(H[l[g]]=r[g]);for(;W--;)H[O++]=r[g++];return H}function sd(r,s,l,d){for(var g=-1,y=r.length,x=-1,O=l.length,P=-1,W=s.length,H=St(y-O,0),V=$(H+W),Q=!d;++g<H;)V[g]=r[g];for(var ue=g;++P<W;)V[ue+P]=s[P];for(;++x<O;)(Q||g<y)&&(V[ue+l[x]]=r[g++]);return V}function Zt(r,s){var l=-1,d=r.length;for(s||(s=$(d));++l<d;)s[l]=r[l];return s}function Kn(r,s,l,d){var g=!l;l||(l={});for(var y=-1,x=s.length;++y<x;){var O=s[y],P=d?d(l[O],r[O],O,l,r):n;P===n&&(P=r[O]),g?ur(l,O,P):ks(l,O,P)}return l}function ib(r,s){return Kn(r,cc(r),s)}function sb(r,s){return Kn(r,yd(r),s)}function Ko(r,s){return function(l,d){var g=Ae(l)?uv:Oy,y=s?s():{};return g(l,r,ge(d,2),y)}}function Bi(r){return Ie(function(s,l){var d=-1,g=l.length,y=g>1?l[g-1]:n,x=g>2?l[2]:n;for(y=r.length>3&&typeof y=="function"?(g--,y):n,x&&Ut(l[0],l[1],x)&&(y=g<3?n:y,g=1),s=Qe(s);++d<g;){var O=l[d];O&&r(s,O,d,y)}return s})}function od(r,s){return function(l,d){if(l==null)return l;if(!qt(l))return r(l,d);for(var g=l.length,y=s?g:-1,x=Qe(l);(s?y--:++y<g)&&d(x[y],y,x)!==!1;);return l}}function ad(r){return function(s,l,d){for(var g=-1,y=Qe(s),x=d(s),O=x.length;O--;){var P=x[r?O:++g];if(l(y[P],P,y)===!1)break}return s}}function ob(r,s,l){var d=s&S,g=Ls(r);function y(){var x=this&&this!==Et&&this instanceof y?g:r;return x.apply(d?l:this,arguments)}return y}function ld(r){return function(s){s=Ve(s);var l=Ri(s)?Dn(s):n,d=l?l[0]:s.charAt(0),g=l?Nr(l,1).join(""):s.slice(1);return d[r]()+g}}function zi(r){return function(s){return Ol(oh(sh(s).replace(Ym,"")),r,"")}}function Ls(r){return function(){var s=arguments;switch(s.length){case 0:return new r;case 1:return new r(s[0]);case 2:return new r(s[0],s[1]);case 3:return new r(s[0],s[1],s[2]);case 4:return new r(s[0],s[1],s[2],s[3]);case 5:return new r(s[0],s[1],s[2],s[3],s[4]);case 6:return new r(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new r(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var l=Ui(r.prototype),d=r.apply(l,s);return lt(d)?d:l}}function ab(r,s,l){var d=Ls(r);function g(){for(var y=arguments.length,x=$(y),O=y,P=Wi(g);O--;)x[O]=arguments[O];var W=y<3&&x[0]!==P&&x[y-1]!==P?[]:Ir(x,P);if(y-=W.length,y<l)return hd(r,s,Yo,g.placeholder,n,x,W,n,n,l-y);var H=this&&this!==Et&&this instanceof g?d:r;return nn(H,this,x)}return g}function cd(r){return function(s,l,d){var g=Qe(s);if(!qt(s)){var y=ge(l,3);s=At(s),l=function(O){return y(g[O],O,g)}}var x=r(s,l,d);return x>-1?g[y?s[x]:x]:n}}function ud(r){return dr(function(s){var l=s.length,d=l,g=bn.prototype.thru;for(r&&s.reverse();d--;){var y=s[d];if(typeof y!="function")throw new yn(c);if(g&&!x&&ea(y)=="wrapper")var x=new bn([],!0)}for(d=x?d:l;++d<l;){y=s[d];var O=ea(y),P=O=="wrapper"?ac(y):n;P&&fc(P[0])&&P[1]==(re|L|F|he)&&!P[4].length&&P[9]==1?x=x[ea(P[0])].apply(x,P[3]):x=y.length==1&&fc(y)?x[O]():x.thru(y)}return function(){var W=arguments,H=W[0];if(x&&W.length==1&&Ae(H))return x.plant(H).value();for(var V=0,Q=l?s[V].apply(this,W):H;++V<l;)Q=s[V].call(this,Q);return Q}})}function Yo(r,s,l,d,g,y,x,O,P,W){var H=s&re,V=s&S,Q=s&_,ue=s&(L|N),me=s&oe,Pe=Q?n:Ls(r);function ve(){for(var Ne=arguments.length,Be=$(Ne),an=Ne;an--;)Be[an]=arguments[an];if(ue)var Bt=Wi(ve),ln=bv(Be,Bt);if(d&&(Be=id(Be,d,g,ue)),y&&(Be=sd(Be,y,x,ue)),Ne-=ln,ue&&Ne<W){var vt=Ir(Be,Bt);return hd(r,s,Yo,ve.placeholder,l,Be,vt,O,P,W-Ne)}var Ln=V?l:this,mr=Q?Ln[r]:r;return Ne=Be.length,O?Be=Ob(Be,O):me&&Ne>1&&Be.reverse(),H&&P<Ne&&(Be.length=P),this&&this!==Et&&this instanceof ve&&(mr=Pe||Ls(mr)),mr.apply(Ln,Be)}return ve}function fd(r,s){return function(l,d){return My(l,r,s(d),{})}}function Xo(r,s){return function(l,d){var g;if(l===n&&d===n)return s;if(l!==n&&(g=l),d!==n){if(g===n)return d;typeof l=="string"||typeof d=="string"?(l=sn(l),d=sn(d)):(l=Yf(l),d=Yf(d)),g=r(l,d)}return g}}function rc(r){return dr(function(s){return s=at(s,rn(ge())),Ie(function(l){var d=this;return r(s,function(g){return nn(g,d,l)})})})}function Jo(r,s){s=s===n?" ":sn(s);var l=s.length;if(l<2)return l?Yl(s,r):s;var d=Yl(s,Fo(r/Li(s)));return Ri(s)?Nr(Dn(d),0,r).join(""):d.slice(0,r)}function lb(r,s,l,d){var g=s&S,y=Ls(r);function x(){for(var O=-1,P=arguments.length,W=-1,H=d.length,V=$(H+P),Q=this&&this!==Et&&this instanceof x?y:r;++W<H;)V[W]=d[W];for(;P--;)V[W++]=arguments[++O];return nn(Q,g?l:this,V)}return x}function dd(r){return function(s,l,d){return d&&typeof d!="number"&&Ut(s,l,d)&&(l=d=n),s=gr(s),l===n?(l=s,s=0):l=gr(l),d=d===n?s<l?1:-1:gr(d),Gy(s,l,d,r)}}function Qo(r){return function(s,l){return typeof s=="string"&&typeof l=="string"||(s=Sn(s),l=Sn(l)),r(s,l)}}function hd(r,s,l,d,g,y,x,O,P,W){var H=s&L,V=H?x:n,Q=H?n:x,ue=H?y:n,me=H?n:y;s|=H?F:Y,s&=~(H?Y:F),s&C||(s&=~(S|_));var Pe=[r,s,g,ue,V,me,Q,O,P,W],ve=l.apply(n,Pe);return fc(r)&&Td(ve,Pe),ve.placeholder=d,Cd(ve,r,s)}function ic(r){var s=xt[r];return function(l,d){if(l=Sn(l),d=d==null?0:It(Oe(d),292),d&&Cf(l)){var g=(Ve(l)+"e").split("e"),y=s(g[0]+"e"+(+g[1]+d));return g=(Ve(y)+"e").split("e"),+(g[0]+"e"+(+g[1]-d))}return s(l)}}var cb=Ni&&1/Eo(new Ni([,-0]))[1]==Z?function(r){return new Ni(r)}:Cc;function pd(r){return function(s){var l=Rt(s);return l==G?Ll(s):l==Ge?Cv(s):yv(s,r(s))}}function fr(r,s,l,d,g,y,x,O){var P=s&_;if(!P&&typeof r!="function")throw new yn(c);var W=d?d.length:0;if(W||(s&=~(F|Y),d=g=n),x=x===n?x:St(Oe(x),0),O=O===n?O:Oe(O),W-=g?g.length:0,s&Y){var H=d,V=g;d=g=n}var Q=P?n:ac(r),ue=[r,s,l,d,g,H,V,y,x,O];if(Q&&Ab(ue,Q),r=ue[0],s=ue[1],l=ue[2],d=ue[3],g=ue[4],O=ue[9]=ue[9]===n?P?0:r.length:St(ue[9]-W,0),!O&&s&(L|N)&&(s&=~(L|N)),!s||s==S)var me=ob(r,s,l);else s==L||s==N?me=ab(r,s,O):(s==F||s==(S|F))&&!g.length?me=lb(r,s,l,d):me=Yo.apply(n,ue);var Pe=Q?Vf:Td;return Cd(Pe(me,ue),r,s)}function gd(r,s,l,d){return r===n||Rn(r,$i[l])&&!Ke.call(d,l)?s:r}function md(r,s,l,d,g,y){return lt(r)&<(s)&&(y.set(s,r),qo(r,s,n,md,y),y.delete(s)),r}function ub(r){return Ns(r)?n:r}function vd(r,s,l,d,g,y){var x=l&A,O=r.length,P=s.length;if(O!=P&&!(x&&P>O))return!1;var W=y.get(r),H=y.get(s);if(W&&H)return W==s&&H==r;var V=-1,Q=!0,ue=l&T?new oi:n;for(y.set(r,s),y.set(s,r);++V<O;){var me=r[V],Pe=s[V];if(d)var ve=x?d(Pe,me,V,s,r,y):d(me,Pe,V,r,s,y);if(ve!==n){if(ve)continue;Q=!1;break}if(ue){if(!El(s,function(Ne,Be){if(!Ss(ue,Be)&&(me===Ne||g(me,Ne,l,d,y)))return ue.push(Be)})){Q=!1;break}}else if(!(me===Pe||g(me,Pe,l,d,y))){Q=!1;break}}return y.delete(r),y.delete(s),Q}function fb(r,s,l,d,g,y,x){switch(l){case ft:if(r.byteLength!=s.byteLength||r.byteOffset!=s.byteOffset)return!1;r=r.buffer,s=s.buffer;case je:return!(r.byteLength!=s.byteLength||!y(new Lo(r),new Lo(s)));case wt:case _t:case pe:return Rn(+r,+s);case pt:return r.name==s.name&&r.message==s.message;case ot:case Ct:return r==s+"";case G:var O=Ll;case Ge:var P=d&A;if(O||(O=Eo),r.size!=s.size&&!P)return!1;var W=x.get(r);if(W)return W==s;d|=T,x.set(r,s);var H=vd(O(r),O(s),d,g,y,x);return x.delete(r),H;case Nt:if(Es)return Es.call(r)==Es.call(s)}return!1}function db(r,s,l,d,g,y){var x=l&A,O=sc(r),P=O.length,W=sc(s),H=W.length;if(P!=H&&!x)return!1;for(var V=P;V--;){var Q=O[V];if(!(x?Q in s:Ke.call(s,Q)))return!1}var ue=y.get(r),me=y.get(s);if(ue&&me)return ue==s&&me==r;var Pe=!0;y.set(r,s),y.set(s,r);for(var ve=x;++V<P;){Q=O[V];var Ne=r[Q],Be=s[Q];if(d)var an=x?d(Be,Ne,Q,s,r,y):d(Ne,Be,Q,r,s,y);if(!(an===n?Ne===Be||g(Ne,Be,l,d,y):an)){Pe=!1;break}ve||(ve=Q=="constructor")}if(Pe&&!ve){var Bt=r.constructor,ln=s.constructor;Bt!=ln&&"constructor"in r&&"constructor"in s&&!(typeof Bt=="function"&&Bt instanceof Bt&&typeof ln=="function"&&ln instanceof ln)&&(Pe=!1)}return y.delete(r),y.delete(s),Pe}function dr(r){return hc(Sd(r,n,Id),r+"")}function sc(r){return Nf(r,At,cc)}function oc(r){return Nf(r,Gt,yd)}var ac=Bo?function(r){return Bo.get(r)}:Cc;function ea(r){for(var s=r.name+"",l=Fi[s],d=Ke.call(Fi,s)?l.length:0;d--;){var g=l[d],y=g.func;if(y==null||y==r)return g.name}return s}function Wi(r){var s=Ke.call(v,"placeholder")?v:r;return s.placeholder}function ge(){var r=v.iteratee||Ac;return r=r===Ac?Bf:r,arguments.length?r(arguments[0],arguments[1]):r}function ta(r,s){var l=r.__data__;return wb(s)?l[typeof s=="string"?"string":"hash"]:l.map}function lc(r){for(var s=At(r),l=s.length;l--;){var d=s[l],g=r[d];s[l]=[d,g,_d(g)]}return s}function ci(r,s){var l=Sv(r,s);return Uf(l)?l:n}function hb(r){var s=Ke.call(r,ii),l=r[ii];try{r[ii]=n;var d=!0}catch{}var g=Io.call(r);return d&&(s?r[ii]=l:delete r[ii]),g}var cc=$l?function(r){return r==null?[]:(r=Qe(r),Pr($l(r),function(s){return Af.call(r,s)}))}:Oc,yd=$l?function(r){for(var s=[];r;)Dr(s,cc(r)),r=Mo(r);return s}:Oc,Rt=Ft;(Nl&&Rt(new Nl(new ArrayBuffer(1)))!=ft||Ts&&Rt(new Ts)!=G||Fl&&Rt(Fl.resolve())!=En||Ni&&Rt(new Ni)!=Ge||Cs&&Rt(new Cs)!=ni)&&(Rt=function(r){var s=Ft(r),l=s==st?r.constructor:n,d=l?ui(l):"";if(d)switch(d){case Kv:return ft;case Yv:return G;case Xv:return En;case Jv:return Ge;case Qv:return ni}return s});function pb(r,s,l){for(var d=-1,g=l.length;++d<g;){var y=l[d],x=y.size;switch(y.type){case"drop":r+=x;break;case"dropRight":s-=x;break;case"take":s=It(s,r+x);break;case"takeRight":r=St(r,s-x);break}}return{start:r,end:s}}function gb(r){var s=r.match(_m);return s?s[1].split(xm):[]}function bd(r,s,l){s=$r(s,r);for(var d=-1,g=s.length,y=!1;++d<g;){var x=Yn(s[d]);if(!(y=r!=null&&l(r,x)))break;r=r[x]}return y||++d!=g?y:(g=r==null?0:r.length,!!g&&la(g)&&hr(x,g)&&(Ae(r)||fi(r)))}function mb(r){var s=r.length,l=new r.constructor(s);return s&&typeof r[0]=="string"&&Ke.call(r,"index")&&(l.index=r.index,l.input=r.input),l}function wd(r){return typeof r.constructor=="function"&&!Ms(r)?Ui(Mo(r)):{}}function vb(r,s,l){var d=r.constructor;switch(s){case je:return nc(r);case wt:case _t:return new d(+r);case ft:return eb(r,l);case Ot:case tn:case Ht:case kn:case gn:case Pn:case Pi:case ar:case xs:return nd(r,l);case G:return new d;case pe:case Ct:return new d(r);case ot:return tb(r);case Ge:return new d;case Nt:return nb(r)}}function yb(r,s){var l=s.length;if(!l)return r;var d=l-1;return s[d]=(l>1?"& ":"")+s[d],s=s.join(l>2?", ":" "),r.replace(wm,`{
|
||
/* [wrapped with `+s+`] */
|
||
`)}function bb(r){return Ae(r)||fi(r)||!!(Tf&&r&&r[Tf])}function hr(r,s){var l=typeof r;return s=s??M,!!s&&(l=="number"||l!="symbol"&&Dm.test(r))&&r>-1&&r%1==0&&r<s}function Ut(r,s,l){if(!lt(l))return!1;var d=typeof s;return(d=="number"?qt(l)&&hr(s,l.length):d=="string"&&s in l)?Rn(l[s],r):!1}function uc(r,s){if(Ae(r))return!1;var l=typeof r;return l=="number"||l=="symbol"||l=="boolean"||r==null||on(r)?!0:mm.test(r)||!gm.test(r)||s!=null&&r in Qe(s)}function wb(r){var s=typeof r;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?r!=="__proto__":r===null}function fc(r){var s=ea(r),l=v[s];if(typeof l!="function"||!(s in Fe.prototype))return!1;if(r===l)return!0;var d=ac(l);return!!d&&r===d[0]}function _b(r){return!!_f&&_f in r}var xb=Po?pr:Ec;function Ms(r){var s=r&&r.constructor,l=typeof s=="function"&&s.prototype||$i;return r===l}function _d(r){return r===r&&!lt(r)}function xd(r,s){return function(l){return l==null?!1:l[r]===s&&(s!==n||r in Qe(l))}}function Sb(r){var s=oa(r,function(d){return l.size===h&&l.clear(),d}),l=s.cache;return s}function Ab(r,s){var l=r[1],d=s[1],g=l|d,y=g<(S|_|re),x=d==re&&l==L||d==re&&l==he&&r[7].length<=s[8]||d==(re|he)&&s[7].length<=s[8]&&l==L;if(!(y||x))return r;d&S&&(r[2]=s[2],g|=l&S?0:C);var O=s[3];if(O){var P=r[3];r[3]=P?id(P,O,s[4]):O,r[4]=P?Ir(r[3],p):s[4]}return O=s[5],O&&(P=r[5],r[5]=P?sd(P,O,s[6]):O,r[6]=P?Ir(r[5],p):s[6]),O=s[7],O&&(r[7]=O),d&re&&(r[8]=r[8]==null?s[8]:It(r[8],s[8])),r[9]==null&&(r[9]=s[9]),r[0]=s[0],r[1]=g,r}function Tb(r){var s=[];if(r!=null)for(var l in Qe(r))s.push(l);return s}function Cb(r){return Io.call(r)}function Sd(r,s,l){return s=St(s===n?r.length-1:s,0),function(){for(var d=arguments,g=-1,y=St(d.length-s,0),x=$(y);++g<y;)x[g]=d[s+g];g=-1;for(var O=$(s+1);++g<s;)O[g]=d[g];return O[s]=l(x),nn(r,this,O)}}function Ad(r,s){return s.length<2?r:li(r,_n(s,0,-1))}function Ob(r,s){for(var l=r.length,d=It(s.length,l),g=Zt(r);d--;){var y=s[d];r[d]=hr(y,l)?g[y]:n}return r}function dc(r,s){if(!(s==="constructor"&&typeof r[s]=="function")&&s!="__proto__")return r[s]}var Td=Od(Vf),$s=Wv||function(r,s){return Et.setTimeout(r,s)},hc=Od(Yy);function Cd(r,s,l){var d=s+"";return hc(r,yb(d,Eb(gb(d),l)))}function Od(r){var s=0,l=0;return function(){var d=qv(),g=$e-(d-l);if(l=d,g>0){if(++s>=ne)return arguments[0]}else s=0;return r.apply(n,arguments)}}function na(r,s){var l=-1,d=r.length,g=d-1;for(s=s===n?d:s;++l<s;){var y=Kl(l,g),x=r[y];r[y]=r[l],r[l]=x}return r.length=s,r}var Ed=Sb(function(r){var s=[];return r.charCodeAt(0)===46&&s.push(""),r.replace(vm,function(l,d,g,y){s.push(g?y.replace(Tm,"$1"):d||l)}),s});function Yn(r){if(typeof r=="string"||on(r))return r;var s=r+"";return s=="0"&&1/r==-Z?"-0":s}function ui(r){if(r!=null){try{return Do.call(r)}catch{}try{return r+""}catch{}}return""}function Eb(r,s){return vn(Ce,function(l){var d="_."+l[0];s&l[1]&&!Co(r,d)&&r.push(d)}),r.sort()}function kd(r){if(r instanceof Fe)return r.clone();var s=new bn(r.__wrapped__,r.__chain__);return s.__actions__=Zt(r.__actions__),s.__index__=r.__index__,s.__values__=r.__values__,s}function kb(r,s,l){(l?Ut(r,s,l):s===n)?s=1:s=St(Oe(s),0);var d=r==null?0:r.length;if(!d||s<1)return[];for(var g=0,y=0,x=$(Fo(d/s));g<d;)x[y++]=_n(r,g,g+=s);return x}function Pb(r){for(var s=-1,l=r==null?0:r.length,d=0,g=[];++s<l;){var y=r[s];y&&(g[d++]=y)}return g}function Db(){var r=arguments.length;if(!r)return[];for(var s=$(r-1),l=arguments[0],d=r;d--;)s[d-1]=arguments[d];return Dr(Ae(l)?Zt(l):[l],kt(s,1))}var Ib=Ie(function(r,s){return mt(r)?Ps(r,kt(s,1,mt,!0)):[]}),Rb=Ie(function(r,s){var l=xn(s);return mt(l)&&(l=n),mt(r)?Ps(r,kt(s,1,mt,!0),ge(l,2)):[]}),Lb=Ie(function(r,s){var l=xn(s);return mt(l)&&(l=n),mt(r)?Ps(r,kt(s,1,mt,!0),n,l):[]});function Mb(r,s,l){var d=r==null?0:r.length;return d?(s=l||s===n?1:Oe(s),_n(r,s<0?0:s,d)):[]}function $b(r,s,l){var d=r==null?0:r.length;return d?(s=l||s===n?1:Oe(s),s=d-s,_n(r,0,s<0?0:s)):[]}function Nb(r,s){return r&&r.length?Vo(r,ge(s,3),!0,!0):[]}function Fb(r,s){return r&&r.length?Vo(r,ge(s,3),!0):[]}function Ub(r,s,l,d){var g=r==null?0:r.length;return g?(l&&typeof l!="number"&&Ut(r,s,l)&&(l=0,d=g),Dy(r,s,l,d)):[]}function Pd(r,s,l){var d=r==null?0:r.length;if(!d)return-1;var g=l==null?0:Oe(l);return g<0&&(g=St(d+g,0)),Oo(r,ge(s,3),g)}function Dd(r,s,l){var d=r==null?0:r.length;if(!d)return-1;var g=d-1;return l!==n&&(g=Oe(l),g=l<0?St(d+g,0):It(g,d-1)),Oo(r,ge(s,3),g,!0)}function Id(r){var s=r==null?0:r.length;return s?kt(r,1):[]}function Bb(r){var s=r==null?0:r.length;return s?kt(r,Z):[]}function zb(r,s){var l=r==null?0:r.length;return l?(s=s===n?1:Oe(s),kt(r,s)):[]}function Wb(r){for(var s=-1,l=r==null?0:r.length,d={};++s<l;){var g=r[s];d[g[0]]=g[1]}return d}function Rd(r){return r&&r.length?r[0]:n}function jb(r,s,l){var d=r==null?0:r.length;if(!d)return-1;var g=l==null?0:Oe(l);return g<0&&(g=St(d+g,0)),Ii(r,s,g)}function Hb(r){var s=r==null?0:r.length;return s?_n(r,0,-1):[]}var Zb=Ie(function(r){var s=at(r,ec);return s.length&&s[0]===r[0]?Hl(s):[]}),qb=Ie(function(r){var s=xn(r),l=at(r,ec);return s===xn(l)?s=n:l.pop(),l.length&&l[0]===r[0]?Hl(l,ge(s,2)):[]}),Gb=Ie(function(r){var s=xn(r),l=at(r,ec);return s=typeof s=="function"?s:n,s&&l.pop(),l.length&&l[0]===r[0]?Hl(l,n,s):[]});function Vb(r,s){return r==null?"":Hv.call(r,s)}function xn(r){var s=r==null?0:r.length;return s?r[s-1]:n}function Kb(r,s,l){var d=r==null?0:r.length;if(!d)return-1;var g=d;return l!==n&&(g=Oe(l),g=g<0?St(d+g,0):It(g,d-1)),s===s?Ev(r,s,g):Oo(r,hf,g,!0)}function Yb(r,s){return r&&r.length?Hf(r,Oe(s)):n}var Xb=Ie(Ld);function Ld(r,s){return r&&r.length&&s&&s.length?Vl(r,s):r}function Jb(r,s,l){return r&&r.length&&s&&s.length?Vl(r,s,ge(l,2)):r}function Qb(r,s,l){return r&&r.length&&s&&s.length?Vl(r,s,n,l):r}var e0=dr(function(r,s){var l=r==null?0:r.length,d=Bl(r,s);return Gf(r,at(s,function(g){return hr(g,l)?+g:g}).sort(rd)),d});function t0(r,s){var l=[];if(!(r&&r.length))return l;var d=-1,g=[],y=r.length;for(s=ge(s,3);++d<y;){var x=r[d];s(x,d,r)&&(l.push(x),g.push(d))}return Gf(r,g),l}function pc(r){return r==null?r:Vv.call(r)}function n0(r,s,l){var d=r==null?0:r.length;return d?(l&&typeof l!="number"&&Ut(r,s,l)?(s=0,l=d):(s=s==null?0:Oe(s),l=l===n?d:Oe(l)),_n(r,s,l)):[]}function r0(r,s){return Go(r,s)}function i0(r,s,l){return Xl(r,s,ge(l,2))}function s0(r,s){var l=r==null?0:r.length;if(l){var d=Go(r,s);if(d<l&&Rn(r[d],s))return d}return-1}function o0(r,s){return Go(r,s,!0)}function a0(r,s,l){return Xl(r,s,ge(l,2),!0)}function l0(r,s){var l=r==null?0:r.length;if(l){var d=Go(r,s,!0)-1;if(Rn(r[d],s))return d}return-1}function c0(r){return r&&r.length?Kf(r):[]}function u0(r,s){return r&&r.length?Kf(r,ge(s,2)):[]}function f0(r){var s=r==null?0:r.length;return s?_n(r,1,s):[]}function d0(r,s,l){return r&&r.length?(s=l||s===n?1:Oe(s),_n(r,0,s<0?0:s)):[]}function h0(r,s,l){var d=r==null?0:r.length;return d?(s=l||s===n?1:Oe(s),s=d-s,_n(r,s<0?0:s,d)):[]}function p0(r,s){return r&&r.length?Vo(r,ge(s,3),!1,!0):[]}function g0(r,s){return r&&r.length?Vo(r,ge(s,3)):[]}var m0=Ie(function(r){return Mr(kt(r,1,mt,!0))}),v0=Ie(function(r){var s=xn(r);return mt(s)&&(s=n),Mr(kt(r,1,mt,!0),ge(s,2))}),y0=Ie(function(r){var s=xn(r);return s=typeof s=="function"?s:n,Mr(kt(r,1,mt,!0),n,s)});function b0(r){return r&&r.length?Mr(r):[]}function w0(r,s){return r&&r.length?Mr(r,ge(s,2)):[]}function _0(r,s){return s=typeof s=="function"?s:n,r&&r.length?Mr(r,n,s):[]}function gc(r){if(!(r&&r.length))return[];var s=0;return r=Pr(r,function(l){if(mt(l))return s=St(l.length,s),!0}),Il(s,function(l){return at(r,kl(l))})}function Md(r,s){if(!(r&&r.length))return[];var l=gc(r);return s==null?l:at(l,function(d){return nn(s,n,d)})}var x0=Ie(function(r,s){return mt(r)?Ps(r,s):[]}),S0=Ie(function(r){return Ql(Pr(r,mt))}),A0=Ie(function(r){var s=xn(r);return mt(s)&&(s=n),Ql(Pr(r,mt),ge(s,2))}),T0=Ie(function(r){var s=xn(r);return s=typeof s=="function"?s:n,Ql(Pr(r,mt),n,s)}),C0=Ie(gc);function O0(r,s){return Qf(r||[],s||[],ks)}function E0(r,s){return Qf(r||[],s||[],Rs)}var k0=Ie(function(r){var s=r.length,l=s>1?r[s-1]:n;return l=typeof l=="function"?(r.pop(),l):n,Md(r,l)});function $d(r){var s=v(r);return s.__chain__=!0,s}function P0(r,s){return s(r),r}function ra(r,s){return s(r)}var D0=dr(function(r){var s=r.length,l=s?r[0]:0,d=this.__wrapped__,g=function(y){return Bl(y,r)};return s>1||this.__actions__.length||!(d instanceof Fe)||!hr(l)?this.thru(g):(d=d.slice(l,+l+(s?1:0)),d.__actions__.push({func:ra,args:[g],thisArg:n}),new bn(d,this.__chain__).thru(function(y){return s&&!y.length&&y.push(n),y}))});function I0(){return $d(this)}function R0(){return new bn(this.value(),this.__chain__)}function L0(){this.__values__===n&&(this.__values__=Yd(this.value()));var r=this.__index__>=this.__values__.length,s=r?n:this.__values__[this.__index__++];return{done:r,value:s}}function M0(){return this}function $0(r){for(var s,l=this;l instanceof Wo;){var d=kd(l);d.__index__=0,d.__values__=n,s?g.__wrapped__=d:s=d;var g=d;l=l.__wrapped__}return g.__wrapped__=r,s}function N0(){var r=this.__wrapped__;if(r instanceof Fe){var s=r;return this.__actions__.length&&(s=new Fe(this)),s=s.reverse(),s.__actions__.push({func:ra,args:[pc],thisArg:n}),new bn(s,this.__chain__)}return this.thru(pc)}function F0(){return Jf(this.__wrapped__,this.__actions__)}var U0=Ko(function(r,s,l){Ke.call(r,l)?++r[l]:ur(r,l,1)});function B0(r,s,l){var d=Ae(r)?ff:Py;return l&&Ut(r,s,l)&&(s=n),d(r,ge(s,3))}function z0(r,s){var l=Ae(r)?Pr:Mf;return l(r,ge(s,3))}var W0=cd(Pd),j0=cd(Dd);function H0(r,s){return kt(ia(r,s),1)}function Z0(r,s){return kt(ia(r,s),Z)}function q0(r,s,l){return l=l===n?1:Oe(l),kt(ia(r,s),l)}function Nd(r,s){var l=Ae(r)?vn:Lr;return l(r,ge(s,3))}function Fd(r,s){var l=Ae(r)?fv:Lf;return l(r,ge(s,3))}var G0=Ko(function(r,s,l){Ke.call(r,l)?r[l].push(s):ur(r,l,[s])});function V0(r,s,l,d){r=qt(r)?r:Hi(r),l=l&&!d?Oe(l):0;var g=r.length;return l<0&&(l=St(g+l,0)),ca(r)?l<=g&&r.indexOf(s,l)>-1:!!g&&Ii(r,s,l)>-1}var K0=Ie(function(r,s,l){var d=-1,g=typeof s=="function",y=qt(r)?$(r.length):[];return Lr(r,function(x){y[++d]=g?nn(s,x,l):Ds(x,s,l)}),y}),Y0=Ko(function(r,s,l){ur(r,l,s)});function ia(r,s){var l=Ae(r)?at:zf;return l(r,ge(s,3))}function X0(r,s,l,d){return r==null?[]:(Ae(s)||(s=s==null?[]:[s]),l=d?n:l,Ae(l)||(l=l==null?[]:[l]),Zf(r,s,l))}var J0=Ko(function(r,s,l){r[l?0:1].push(s)},function(){return[[],[]]});function Q0(r,s,l){var d=Ae(r)?Ol:gf,g=arguments.length<3;return d(r,ge(s,4),l,g,Lr)}function ew(r,s,l){var d=Ae(r)?dv:gf,g=arguments.length<3;return d(r,ge(s,4),l,g,Lf)}function tw(r,s){var l=Ae(r)?Pr:Mf;return l(r,aa(ge(s,3)))}function nw(r){var s=Ae(r)?Pf:Vy;return s(r)}function rw(r,s,l){(l?Ut(r,s,l):s===n)?s=1:s=Oe(s);var d=Ae(r)?Ty:Ky;return d(r,s)}function iw(r){var s=Ae(r)?Cy:Xy;return s(r)}function sw(r){if(r==null)return 0;if(qt(r))return ca(r)?Li(r):r.length;var s=Rt(r);return s==G||s==Ge?r.size:ql(r).length}function ow(r,s,l){var d=Ae(r)?El:Jy;return l&&Ut(r,s,l)&&(s=n),d(r,ge(s,3))}var aw=Ie(function(r,s){if(r==null)return[];var l=s.length;return l>1&&Ut(r,s[0],s[1])?s=[]:l>2&&Ut(s[0],s[1],s[2])&&(s=[s[0]]),Zf(r,kt(s,1),[])}),sa=zv||function(){return Et.Date.now()};function lw(r,s){if(typeof s!="function")throw new yn(c);return r=Oe(r),function(){if(--r<1)return s.apply(this,arguments)}}function Ud(r,s,l){return s=l?n:s,s=r&&s==null?r.length:s,fr(r,re,n,n,n,n,s)}function Bd(r,s){var l;if(typeof s!="function")throw new yn(c);return r=Oe(r),function(){return--r>0&&(l=s.apply(this,arguments)),r<=1&&(s=n),l}}var mc=Ie(function(r,s,l){var d=S;if(l.length){var g=Ir(l,Wi(mc));d|=F}return fr(r,d,s,l,g)}),zd=Ie(function(r,s,l){var d=S|_;if(l.length){var g=Ir(l,Wi(zd));d|=F}return fr(s,d,r,l,g)});function Wd(r,s,l){s=l?n:s;var d=fr(r,L,n,n,n,n,n,s);return d.placeholder=Wd.placeholder,d}function jd(r,s,l){s=l?n:s;var d=fr(r,N,n,n,n,n,n,s);return d.placeholder=jd.placeholder,d}function Hd(r,s,l){var d,g,y,x,O,P,W=0,H=!1,V=!1,Q=!0;if(typeof r!="function")throw new yn(c);s=Sn(s)||0,lt(l)&&(H=!!l.leading,V="maxWait"in l,y=V?St(Sn(l.maxWait)||0,s):y,Q="trailing"in l?!!l.trailing:Q);function ue(vt){var Ln=d,mr=g;return d=g=n,W=vt,x=r.apply(mr,Ln),x}function me(vt){return W=vt,O=$s(Ne,s),H?ue(vt):x}function Pe(vt){var Ln=vt-P,mr=vt-W,ch=s-Ln;return V?It(ch,y-mr):ch}function ve(vt){var Ln=vt-P,mr=vt-W;return P===n||Ln>=s||Ln<0||V&&mr>=y}function Ne(){var vt=sa();if(ve(vt))return Be(vt);O=$s(Ne,Pe(vt))}function Be(vt){return O=n,Q&&d?ue(vt):(d=g=n,x)}function an(){O!==n&&ed(O),W=0,d=P=g=O=n}function Bt(){return O===n?x:Be(sa())}function ln(){var vt=sa(),Ln=ve(vt);if(d=arguments,g=this,P=vt,Ln){if(O===n)return me(P);if(V)return ed(O),O=$s(Ne,s),ue(P)}return O===n&&(O=$s(Ne,s)),x}return ln.cancel=an,ln.flush=Bt,ln}var cw=Ie(function(r,s){return Rf(r,1,s)}),uw=Ie(function(r,s,l){return Rf(r,Sn(s)||0,l)});function fw(r){return fr(r,oe)}function oa(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new yn(c);var l=function(){var d=arguments,g=s?s.apply(this,d):d[0],y=l.cache;if(y.has(g))return y.get(g);var x=r.apply(this,d);return l.cache=y.set(g,x)||y,x};return l.cache=new(oa.Cache||cr),l}oa.Cache=cr;function aa(r){if(typeof r!="function")throw new yn(c);return function(){var s=arguments;switch(s.length){case 0:return!r.call(this);case 1:return!r.call(this,s[0]);case 2:return!r.call(this,s[0],s[1]);case 3:return!r.call(this,s[0],s[1],s[2])}return!r.apply(this,s)}}function dw(r){return Bd(2,r)}var hw=Qy(function(r,s){s=s.length==1&&Ae(s[0])?at(s[0],rn(ge())):at(kt(s,1),rn(ge()));var l=s.length;return Ie(function(d){for(var g=-1,y=It(d.length,l);++g<y;)d[g]=s[g].call(this,d[g]);return nn(r,this,d)})}),vc=Ie(function(r,s){var l=Ir(s,Wi(vc));return fr(r,F,n,s,l)}),Zd=Ie(function(r,s){var l=Ir(s,Wi(Zd));return fr(r,Y,n,s,l)}),pw=dr(function(r,s){return fr(r,he,n,n,n,s)});function gw(r,s){if(typeof r!="function")throw new yn(c);return s=s===n?s:Oe(s),Ie(r,s)}function mw(r,s){if(typeof r!="function")throw new yn(c);return s=s==null?0:St(Oe(s),0),Ie(function(l){var d=l[s],g=Nr(l,0,s);return d&&Dr(g,d),nn(r,this,g)})}function vw(r,s,l){var d=!0,g=!0;if(typeof r!="function")throw new yn(c);return lt(l)&&(d="leading"in l?!!l.leading:d,g="trailing"in l?!!l.trailing:g),Hd(r,s,{leading:d,maxWait:s,trailing:g})}function yw(r){return Ud(r,1)}function bw(r,s){return vc(tc(s),r)}function ww(){if(!arguments.length)return[];var r=arguments[0];return Ae(r)?r:[r]}function _w(r){return wn(r,w)}function xw(r,s){return s=typeof s=="function"?s:n,wn(r,w,s)}function Sw(r){return wn(r,m|w)}function Aw(r,s){return s=typeof s=="function"?s:n,wn(r,m|w,s)}function Tw(r,s){return s==null||If(r,s,At(s))}function Rn(r,s){return r===s||r!==r&&s!==s}var Cw=Qo(jl),Ow=Qo(function(r,s){return r>=s}),fi=Ff(function(){return arguments}())?Ff:function(r){return dt(r)&&Ke.call(r,"callee")&&!Af.call(r,"callee")},Ae=$.isArray,Ew=sf?rn(sf):$y;function qt(r){return r!=null&&la(r.length)&&!pr(r)}function mt(r){return dt(r)&&qt(r)}function kw(r){return r===!0||r===!1||dt(r)&&Ft(r)==wt}var Fr=jv||Ec,Pw=of?rn(of):Ny;function Dw(r){return dt(r)&&r.nodeType===1&&!Ns(r)}function Iw(r){if(r==null)return!0;if(qt(r)&&(Ae(r)||typeof r=="string"||typeof r.splice=="function"||Fr(r)||ji(r)||fi(r)))return!r.length;var s=Rt(r);if(s==G||s==Ge)return!r.size;if(Ms(r))return!ql(r).length;for(var l in r)if(Ke.call(r,l))return!1;return!0}function Rw(r,s){return Is(r,s)}function Lw(r,s,l){l=typeof l=="function"?l:n;var d=l?l(r,s):n;return d===n?Is(r,s,n,l):!!d}function yc(r){if(!dt(r))return!1;var s=Ft(r);return s==pt||s==ut||typeof r.message=="string"&&typeof r.name=="string"&&!Ns(r)}function Mw(r){return typeof r=="number"&&Cf(r)}function pr(r){if(!lt(r))return!1;var s=Ft(r);return s==gt||s==le||s==Tt||s==pn}function qd(r){return typeof r=="number"&&r==Oe(r)}function la(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=M}function lt(r){var s=typeof r;return r!=null&&(s=="object"||s=="function")}function dt(r){return r!=null&&typeof r=="object"}var Gd=af?rn(af):Uy;function $w(r,s){return r===s||Zl(r,s,lc(s))}function Nw(r,s,l){return l=typeof l=="function"?l:n,Zl(r,s,lc(s),l)}function Fw(r){return Vd(r)&&r!=+r}function Uw(r){if(xb(r))throw new Se(a);return Uf(r)}function Bw(r){return r===null}function zw(r){return r==null}function Vd(r){return typeof r=="number"||dt(r)&&Ft(r)==pe}function Ns(r){if(!dt(r)||Ft(r)!=st)return!1;var s=Mo(r);if(s===null)return!0;var l=Ke.call(s,"constructor")&&s.constructor;return typeof l=="function"&&l instanceof l&&Do.call(l)==Nv}var bc=lf?rn(lf):By;function Ww(r){return qd(r)&&r>=-M&&r<=M}var Kd=cf?rn(cf):zy;function ca(r){return typeof r=="string"||!Ae(r)&&dt(r)&&Ft(r)==Ct}function on(r){return typeof r=="symbol"||dt(r)&&Ft(r)==Nt}var ji=uf?rn(uf):Wy;function jw(r){return r===n}function Hw(r){return dt(r)&&Rt(r)==ni}function Zw(r){return dt(r)&&Ft(r)==Je}var qw=Qo(Gl),Gw=Qo(function(r,s){return r<=s});function Yd(r){if(!r)return[];if(qt(r))return ca(r)?Dn(r):Zt(r);if(As&&r[As])return Tv(r[As]());var s=Rt(r),l=s==G?Ll:s==Ge?Eo:Hi;return l(r)}function gr(r){if(!r)return r===0?r:0;if(r=Sn(r),r===Z||r===-Z){var s=r<0?-1:1;return s*R}return r===r?r:0}function Oe(r){var s=gr(r),l=s%1;return s===s?l?s-l:s:0}function Xd(r){return r?ai(Oe(r),0,q):0}function Sn(r){if(typeof r=="number")return r;if(on(r))return z;if(lt(r)){var s=typeof r.valueOf=="function"?r.valueOf():r;r=lt(s)?s+"":s}if(typeof r!="string")return r===0?r:+r;r=mf(r);var l=Em.test(r);return l||Pm.test(r)?lv(r.slice(2),l?2:8):Om.test(r)?z:+r}function Jd(r){return Kn(r,Gt(r))}function Vw(r){return r?ai(Oe(r),-M,M):r===0?r:0}function Ve(r){return r==null?"":sn(r)}var Kw=Bi(function(r,s){if(Ms(s)||qt(s)){Kn(s,At(s),r);return}for(var l in s)Ke.call(s,l)&&ks(r,l,s[l])}),Qd=Bi(function(r,s){Kn(s,Gt(s),r)}),ua=Bi(function(r,s,l,d){Kn(s,Gt(s),r,d)}),Yw=Bi(function(r,s,l,d){Kn(s,At(s),r,d)}),Xw=dr(Bl);function Jw(r,s){var l=Ui(r);return s==null?l:Df(l,s)}var Qw=Ie(function(r,s){r=Qe(r);var l=-1,d=s.length,g=d>2?s[2]:n;for(g&&Ut(s[0],s[1],g)&&(d=1);++l<d;)for(var y=s[l],x=Gt(y),O=-1,P=x.length;++O<P;){var W=x[O],H=r[W];(H===n||Rn(H,$i[W])&&!Ke.call(r,W))&&(r[W]=y[W])}return r}),e_=Ie(function(r){return r.push(n,md),nn(eh,n,r)});function t_(r,s){return df(r,ge(s,3),Vn)}function n_(r,s){return df(r,ge(s,3),Wl)}function r_(r,s){return r==null?r:zl(r,ge(s,3),Gt)}function i_(r,s){return r==null?r:$f(r,ge(s,3),Gt)}function s_(r,s){return r&&Vn(r,ge(s,3))}function o_(r,s){return r&&Wl(r,ge(s,3))}function a_(r){return r==null?[]:Zo(r,At(r))}function l_(r){return r==null?[]:Zo(r,Gt(r))}function wc(r,s,l){var d=r==null?n:li(r,s);return d===n?l:d}function c_(r,s){return r!=null&&bd(r,s,Iy)}function _c(r,s){return r!=null&&bd(r,s,Ry)}var u_=fd(function(r,s,l){s!=null&&typeof s.toString!="function"&&(s=Io.call(s)),r[s]=l},Sc(Vt)),f_=fd(function(r,s,l){s!=null&&typeof s.toString!="function"&&(s=Io.call(s)),Ke.call(r,s)?r[s].push(l):r[s]=[l]},ge),d_=Ie(Ds);function At(r){return qt(r)?kf(r):ql(r)}function Gt(r){return qt(r)?kf(r,!0):jy(r)}function h_(r,s){var l={};return s=ge(s,3),Vn(r,function(d,g,y){ur(l,s(d,g,y),d)}),l}function p_(r,s){var l={};return s=ge(s,3),Vn(r,function(d,g,y){ur(l,g,s(d,g,y))}),l}var g_=Bi(function(r,s,l){qo(r,s,l)}),eh=Bi(function(r,s,l,d){qo(r,s,l,d)}),m_=dr(function(r,s){var l={};if(r==null)return l;var d=!1;s=at(s,function(y){return y=$r(y,r),d||(d=y.length>1),y}),Kn(r,oc(r),l),d&&(l=wn(l,m|b|w,ub));for(var g=s.length;g--;)Jl(l,s[g]);return l});function v_(r,s){return th(r,aa(ge(s)))}var y_=dr(function(r,s){return r==null?{}:Zy(r,s)});function th(r,s){if(r==null)return{};var l=at(oc(r),function(d){return[d]});return s=ge(s),qf(r,l,function(d,g){return s(d,g[0])})}function b_(r,s,l){s=$r(s,r);var d=-1,g=s.length;for(g||(g=1,r=n);++d<g;){var y=r==null?n:r[Yn(s[d])];y===n&&(d=g,y=l),r=pr(y)?y.call(r):y}return r}function w_(r,s,l){return r==null?r:Rs(r,s,l)}function __(r,s,l,d){return d=typeof d=="function"?d:n,r==null?r:Rs(r,s,l,d)}var nh=pd(At),rh=pd(Gt);function x_(r,s,l){var d=Ae(r),g=d||Fr(r)||ji(r);if(s=ge(s,4),l==null){var y=r&&r.constructor;g?l=d?new y:[]:lt(r)?l=pr(y)?Ui(Mo(r)):{}:l={}}return(g?vn:Vn)(r,function(x,O,P){return s(l,x,O,P)}),l}function S_(r,s){return r==null?!0:Jl(r,s)}function A_(r,s,l){return r==null?r:Xf(r,s,tc(l))}function T_(r,s,l,d){return d=typeof d=="function"?d:n,r==null?r:Xf(r,s,tc(l),d)}function Hi(r){return r==null?[]:Rl(r,At(r))}function C_(r){return r==null?[]:Rl(r,Gt(r))}function O_(r,s,l){return l===n&&(l=s,s=n),l!==n&&(l=Sn(l),l=l===l?l:0),s!==n&&(s=Sn(s),s=s===s?s:0),ai(Sn(r),s,l)}function E_(r,s,l){return s=gr(s),l===n?(l=s,s=0):l=gr(l),r=Sn(r),Ly(r,s,l)}function k_(r,s,l){if(l&&typeof l!="boolean"&&Ut(r,s,l)&&(s=l=n),l===n&&(typeof s=="boolean"?(l=s,s=n):typeof r=="boolean"&&(l=r,r=n)),r===n&&s===n?(r=0,s=1):(r=gr(r),s===n?(s=r,r=0):s=gr(s)),r>s){var d=r;r=s,s=d}if(l||r%1||s%1){var g=Of();return It(r+g*(s-r+av("1e-"+((g+"").length-1))),s)}return Kl(r,s)}var P_=zi(function(r,s,l){return s=s.toLowerCase(),r+(l?ih(s):s)});function ih(r){return xc(Ve(r).toLowerCase())}function sh(r){return r=Ve(r),r&&r.replace(Im,wv).replace(Xm,"")}function D_(r,s,l){r=Ve(r),s=sn(s);var d=r.length;l=l===n?d:ai(Oe(l),0,d);var g=l;return l-=s.length,l>=0&&r.slice(l,g)==s}function I_(r){return r=Ve(r),r&&dm.test(r)?r.replace(Mu,_v):r}function R_(r){return r=Ve(r),r&&ym.test(r)?r.replace(vl,"\\$&"):r}var L_=zi(function(r,s,l){return r+(l?"-":"")+s.toLowerCase()}),M_=zi(function(r,s,l){return r+(l?" ":"")+s.toLowerCase()}),$_=ld("toLowerCase");function N_(r,s,l){r=Ve(r),s=Oe(s);var d=s?Li(r):0;if(!s||d>=s)return r;var g=(s-d)/2;return Jo(Uo(g),l)+r+Jo(Fo(g),l)}function F_(r,s,l){r=Ve(r),s=Oe(s);var d=s?Li(r):0;return s&&d<s?r+Jo(s-d,l):r}function U_(r,s,l){r=Ve(r),s=Oe(s);var d=s?Li(r):0;return s&&d<s?Jo(s-d,l)+r:r}function B_(r,s,l){return l||s==null?s=0:s&&(s=+s),Gv(Ve(r).replace(yl,""),s||0)}function z_(r,s,l){return(l?Ut(r,s,l):s===n)?s=1:s=Oe(s),Yl(Ve(r),s)}function W_(){var r=arguments,s=Ve(r[0]);return r.length<3?s:s.replace(r[1],r[2])}var j_=zi(function(r,s,l){return r+(l?"_":"")+s.toLowerCase()});function H_(r,s,l){return l&&typeof l!="number"&&Ut(r,s,l)&&(s=l=n),l=l===n?q:l>>>0,l?(r=Ve(r),r&&(typeof s=="string"||s!=null&&!bc(s))&&(s=sn(s),!s&&Ri(r))?Nr(Dn(r),0,l):r.split(s,l)):[]}var Z_=zi(function(r,s,l){return r+(l?" ":"")+xc(s)});function q_(r,s,l){return r=Ve(r),l=l==null?0:ai(Oe(l),0,r.length),s=sn(s),r.slice(l,l+s.length)==s}function G_(r,s,l){var d=v.templateSettings;l&&Ut(r,s,l)&&(s=n),r=Ve(r),s=ua({},s,d,gd);var g=ua({},s.imports,d.imports,gd),y=At(g),x=Rl(g,y),O,P,W=0,H=s.interpolate||So,V="__p += '",Q=Ml((s.escape||So).source+"|"+H.source+"|"+(H===$u?Cm:So).source+"|"+(s.evaluate||So).source+"|$","g"),ue="//# sourceURL="+(Ke.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nv+"]")+`
|
||
`;r.replace(Q,function(ve,Ne,Be,an,Bt,ln){return Be||(Be=an),V+=r.slice(W,ln).replace(Rm,xv),Ne&&(O=!0,V+=`' +
|
||
__e(`+Ne+`) +
|
||
'`),Bt&&(P=!0,V+=`';
|
||
`+Bt+`;
|
||
__p += '`),Be&&(V+=`' +
|
||
((__t = (`+Be+`)) == null ? '' : __t) +
|
||
'`),W=ln+ve.length,ve}),V+=`';
|
||
`;var me=Ke.call(s,"variable")&&s.variable;if(!me)V=`with (obj) {
|
||
`+V+`
|
||
}
|
||
`;else if(Am.test(me))throw new Se(u);V=(P?V.replace(lm,""):V).replace(cm,"$1").replace(um,"$1;"),V="function("+(me||"obj")+`) {
|
||
`+(me?"":`obj || (obj = {});
|
||
`)+"var __t, __p = ''"+(O?", __e = _.escape":"")+(P?`, __j = Array.prototype.join;
|
||
function print() { __p += __j.call(arguments, '') }
|
||
`:`;
|
||
`)+V+`return __p
|
||
}`;var Pe=ah(function(){return He(y,ue+"return "+V).apply(n,x)});if(Pe.source=V,yc(Pe))throw Pe;return Pe}function V_(r){return Ve(r).toLowerCase()}function K_(r){return Ve(r).toUpperCase()}function Y_(r,s,l){if(r=Ve(r),r&&(l||s===n))return mf(r);if(!r||!(s=sn(s)))return r;var d=Dn(r),g=Dn(s),y=vf(d,g),x=yf(d,g)+1;return Nr(d,y,x).join("")}function X_(r,s,l){if(r=Ve(r),r&&(l||s===n))return r.slice(0,wf(r)+1);if(!r||!(s=sn(s)))return r;var d=Dn(r),g=yf(d,Dn(s))+1;return Nr(d,0,g).join("")}function J_(r,s,l){if(r=Ve(r),r&&(l||s===n))return r.replace(yl,"");if(!r||!(s=sn(s)))return r;var d=Dn(r),g=vf(d,Dn(s));return Nr(d,g).join("")}function Q_(r,s){var l=X,d=j;if(lt(s)){var g="separator"in s?s.separator:g;l="length"in s?Oe(s.length):l,d="omission"in s?sn(s.omission):d}r=Ve(r);var y=r.length;if(Ri(r)){var x=Dn(r);y=x.length}if(l>=y)return r;var O=l-Li(d);if(O<1)return d;var P=x?Nr(x,0,O).join(""):r.slice(0,O);if(g===n)return P+d;if(x&&(O+=P.length-O),bc(g)){if(r.slice(O).search(g)){var W,H=P;for(g.global||(g=Ml(g.source,Ve(Nu.exec(g))+"g")),g.lastIndex=0;W=g.exec(H);)var V=W.index;P=P.slice(0,V===n?O:V)}}else if(r.indexOf(sn(g),O)!=O){var Q=P.lastIndexOf(g);Q>-1&&(P=P.slice(0,Q))}return P+d}function ex(r){return r=Ve(r),r&&fm.test(r)?r.replace(Lu,kv):r}var tx=zi(function(r,s,l){return r+(l?" ":"")+s.toUpperCase()}),xc=ld("toUpperCase");function oh(r,s,l){return r=Ve(r),s=l?n:s,s===n?Av(r)?Iv(r):gv(r):r.match(s)||[]}var ah=Ie(function(r,s){try{return nn(r,n,s)}catch(l){return yc(l)?l:new Se(l)}}),nx=dr(function(r,s){return vn(s,function(l){l=Yn(l),ur(r,l,mc(r[l],r))}),r});function rx(r){var s=r==null?0:r.length,l=ge();return r=s?at(r,function(d){if(typeof d[1]!="function")throw new yn(c);return[l(d[0]),d[1]]}):[],Ie(function(d){for(var g=-1;++g<s;){var y=r[g];if(nn(y[0],this,d))return nn(y[1],this,d)}})}function ix(r){return ky(wn(r,m))}function Sc(r){return function(){return r}}function sx(r,s){return r==null||r!==r?s:r}var ox=ud(),ax=ud(!0);function Vt(r){return r}function Ac(r){return Bf(typeof r=="function"?r:wn(r,m))}function lx(r){return Wf(wn(r,m))}function cx(r,s){return jf(r,wn(s,m))}var ux=Ie(function(r,s){return function(l){return Ds(l,r,s)}}),fx=Ie(function(r,s){return function(l){return Ds(r,l,s)}});function Tc(r,s,l){var d=At(s),g=Zo(s,d);l==null&&!(lt(s)&&(g.length||!d.length))&&(l=s,s=r,r=this,g=Zo(s,At(s)));var y=!(lt(l)&&"chain"in l)||!!l.chain,x=pr(r);return vn(g,function(O){var P=s[O];r[O]=P,x&&(r.prototype[O]=function(){var W=this.__chain__;if(y||W){var H=r(this.__wrapped__),V=H.__actions__=Zt(this.__actions__);return V.push({func:P,args:arguments,thisArg:r}),H.__chain__=W,H}return P.apply(r,Dr([this.value()],arguments))})}),r}function dx(){return Et._===this&&(Et._=Fv),this}function Cc(){}function hx(r){return r=Oe(r),Ie(function(s){return Hf(s,r)})}var px=rc(at),gx=rc(ff),mx=rc(El);function lh(r){return uc(r)?kl(Yn(r)):qy(r)}function vx(r){return function(s){return r==null?n:li(r,s)}}var yx=dd(),bx=dd(!0);function Oc(){return[]}function Ec(){return!1}function wx(){return{}}function _x(){return""}function xx(){return!0}function Sx(r,s){if(r=Oe(r),r<1||r>M)return[];var l=q,d=It(r,q);s=ge(s),r-=q;for(var g=Il(d,s);++l<r;)s(l);return g}function Ax(r){return Ae(r)?at(r,Yn):on(r)?[r]:Zt(Ed(Ve(r)))}function Tx(r){var s=++$v;return Ve(r)+s}var Cx=Xo(function(r,s){return r+s},0),Ox=ic("ceil"),Ex=Xo(function(r,s){return r/s},1),kx=ic("floor");function Px(r){return r&&r.length?Ho(r,Vt,jl):n}function Dx(r,s){return r&&r.length?Ho(r,ge(s,2),jl):n}function Ix(r){return pf(r,Vt)}function Rx(r,s){return pf(r,ge(s,2))}function Lx(r){return r&&r.length?Ho(r,Vt,Gl):n}function Mx(r,s){return r&&r.length?Ho(r,ge(s,2),Gl):n}var $x=Xo(function(r,s){return r*s},1),Nx=ic("round"),Fx=Xo(function(r,s){return r-s},0);function Ux(r){return r&&r.length?Dl(r,Vt):0}function Bx(r,s){return r&&r.length?Dl(r,ge(s,2)):0}return v.after=lw,v.ary=Ud,v.assign=Kw,v.assignIn=Qd,v.assignInWith=ua,v.assignWith=Yw,v.at=Xw,v.before=Bd,v.bind=mc,v.bindAll=nx,v.bindKey=zd,v.castArray=ww,v.chain=$d,v.chunk=kb,v.compact=Pb,v.concat=Db,v.cond=rx,v.conforms=ix,v.constant=Sc,v.countBy=U0,v.create=Jw,v.curry=Wd,v.curryRight=jd,v.debounce=Hd,v.defaults=Qw,v.defaultsDeep=e_,v.defer=cw,v.delay=uw,v.difference=Ib,v.differenceBy=Rb,v.differenceWith=Lb,v.drop=Mb,v.dropRight=$b,v.dropRightWhile=Nb,v.dropWhile=Fb,v.fill=Ub,v.filter=z0,v.flatMap=H0,v.flatMapDeep=Z0,v.flatMapDepth=q0,v.flatten=Id,v.flattenDeep=Bb,v.flattenDepth=zb,v.flip=fw,v.flow=ox,v.flowRight=ax,v.fromPairs=Wb,v.functions=a_,v.functionsIn=l_,v.groupBy=G0,v.initial=Hb,v.intersection=Zb,v.intersectionBy=qb,v.intersectionWith=Gb,v.invert=u_,v.invertBy=f_,v.invokeMap=K0,v.iteratee=Ac,v.keyBy=Y0,v.keys=At,v.keysIn=Gt,v.map=ia,v.mapKeys=h_,v.mapValues=p_,v.matches=lx,v.matchesProperty=cx,v.memoize=oa,v.merge=g_,v.mergeWith=eh,v.method=ux,v.methodOf=fx,v.mixin=Tc,v.negate=aa,v.nthArg=hx,v.omit=m_,v.omitBy=v_,v.once=dw,v.orderBy=X0,v.over=px,v.overArgs=hw,v.overEvery=gx,v.overSome=mx,v.partial=vc,v.partialRight=Zd,v.partition=J0,v.pick=y_,v.pickBy=th,v.property=lh,v.propertyOf=vx,v.pull=Xb,v.pullAll=Ld,v.pullAllBy=Jb,v.pullAllWith=Qb,v.pullAt=e0,v.range=yx,v.rangeRight=bx,v.rearg=pw,v.reject=tw,v.remove=t0,v.rest=gw,v.reverse=pc,v.sampleSize=rw,v.set=w_,v.setWith=__,v.shuffle=iw,v.slice=n0,v.sortBy=aw,v.sortedUniq=c0,v.sortedUniqBy=u0,v.split=H_,v.spread=mw,v.tail=f0,v.take=d0,v.takeRight=h0,v.takeRightWhile=p0,v.takeWhile=g0,v.tap=P0,v.throttle=vw,v.thru=ra,v.toArray=Yd,v.toPairs=nh,v.toPairsIn=rh,v.toPath=Ax,v.toPlainObject=Jd,v.transform=x_,v.unary=yw,v.union=m0,v.unionBy=v0,v.unionWith=y0,v.uniq=b0,v.uniqBy=w0,v.uniqWith=_0,v.unset=S_,v.unzip=gc,v.unzipWith=Md,v.update=A_,v.updateWith=T_,v.values=Hi,v.valuesIn=C_,v.without=x0,v.words=oh,v.wrap=bw,v.xor=S0,v.xorBy=A0,v.xorWith=T0,v.zip=C0,v.zipObject=O0,v.zipObjectDeep=E0,v.zipWith=k0,v.entries=nh,v.entriesIn=rh,v.extend=Qd,v.extendWith=ua,Tc(v,v),v.add=Cx,v.attempt=ah,v.camelCase=P_,v.capitalize=ih,v.ceil=Ox,v.clamp=O_,v.clone=_w,v.cloneDeep=Sw,v.cloneDeepWith=Aw,v.cloneWith=xw,v.conformsTo=Tw,v.deburr=sh,v.defaultTo=sx,v.divide=Ex,v.endsWith=D_,v.eq=Rn,v.escape=I_,v.escapeRegExp=R_,v.every=B0,v.find=W0,v.findIndex=Pd,v.findKey=t_,v.findLast=j0,v.findLastIndex=Dd,v.findLastKey=n_,v.floor=kx,v.forEach=Nd,v.forEachRight=Fd,v.forIn=r_,v.forInRight=i_,v.forOwn=s_,v.forOwnRight=o_,v.get=wc,v.gt=Cw,v.gte=Ow,v.has=c_,v.hasIn=_c,v.head=Rd,v.identity=Vt,v.includes=V0,v.indexOf=jb,v.inRange=E_,v.invoke=d_,v.isArguments=fi,v.isArray=Ae,v.isArrayBuffer=Ew,v.isArrayLike=qt,v.isArrayLikeObject=mt,v.isBoolean=kw,v.isBuffer=Fr,v.isDate=Pw,v.isElement=Dw,v.isEmpty=Iw,v.isEqual=Rw,v.isEqualWith=Lw,v.isError=yc,v.isFinite=Mw,v.isFunction=pr,v.isInteger=qd,v.isLength=la,v.isMap=Gd,v.isMatch=$w,v.isMatchWith=Nw,v.isNaN=Fw,v.isNative=Uw,v.isNil=zw,v.isNull=Bw,v.isNumber=Vd,v.isObject=lt,v.isObjectLike=dt,v.isPlainObject=Ns,v.isRegExp=bc,v.isSafeInteger=Ww,v.isSet=Kd,v.isString=ca,v.isSymbol=on,v.isTypedArray=ji,v.isUndefined=jw,v.isWeakMap=Hw,v.isWeakSet=Zw,v.join=Vb,v.kebabCase=L_,v.last=xn,v.lastIndexOf=Kb,v.lowerCase=M_,v.lowerFirst=$_,v.lt=qw,v.lte=Gw,v.max=Px,v.maxBy=Dx,v.mean=Ix,v.meanBy=Rx,v.min=Lx,v.minBy=Mx,v.stubArray=Oc,v.stubFalse=Ec,v.stubObject=wx,v.stubString=_x,v.stubTrue=xx,v.multiply=$x,v.nth=Yb,v.noConflict=dx,v.noop=Cc,v.now=sa,v.pad=N_,v.padEnd=F_,v.padStart=U_,v.parseInt=B_,v.random=k_,v.reduce=Q0,v.reduceRight=ew,v.repeat=z_,v.replace=W_,v.result=b_,v.round=Nx,v.runInContext=k,v.sample=nw,v.size=sw,v.snakeCase=j_,v.some=ow,v.sortedIndex=r0,v.sortedIndexBy=i0,v.sortedIndexOf=s0,v.sortedLastIndex=o0,v.sortedLastIndexBy=a0,v.sortedLastIndexOf=l0,v.startCase=Z_,v.startsWith=q_,v.subtract=Fx,v.sum=Ux,v.sumBy=Bx,v.template=G_,v.times=Sx,v.toFinite=gr,v.toInteger=Oe,v.toLength=Xd,v.toLower=V_,v.toNumber=Sn,v.toSafeInteger=Vw,v.toString=Ve,v.toUpper=K_,v.trim=Y_,v.trimEnd=X_,v.trimStart=J_,v.truncate=Q_,v.unescape=ex,v.uniqueId=Tx,v.upperCase=tx,v.upperFirst=xc,v.each=Nd,v.eachRight=Fd,v.first=Rd,Tc(v,function(){var r={};return Vn(v,function(s,l){Ke.call(v.prototype,l)||(r[l]=s)}),r}(),{chain:!1}),v.VERSION=i,vn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){v[r].placeholder=v}),vn(["drop","take"],function(r,s){Fe.prototype[r]=function(l){l=l===n?1:St(Oe(l),0);var d=this.__filtered__&&!s?new Fe(this):this.clone();return d.__filtered__?d.__takeCount__=It(l,d.__takeCount__):d.__views__.push({size:It(l,q),type:r+(d.__dir__<0?"Right":"")}),d},Fe.prototype[r+"Right"]=function(l){return this.reverse()[r](l).reverse()}}),vn(["filter","map","takeWhile"],function(r,s){var l=s+1,d=l==E||l==D;Fe.prototype[r]=function(g){var y=this.clone();return y.__iteratees__.push({iteratee:ge(g,3),type:l}),y.__filtered__=y.__filtered__||d,y}}),vn(["head","last"],function(r,s){var l="take"+(s?"Right":"");Fe.prototype[r]=function(){return this[l](1).value()[0]}}),vn(["initial","tail"],function(r,s){var l="drop"+(s?"":"Right");Fe.prototype[r]=function(){return this.__filtered__?new Fe(this):this[l](1)}}),Fe.prototype.compact=function(){return this.filter(Vt)},Fe.prototype.find=function(r){return this.filter(r).head()},Fe.prototype.findLast=function(r){return this.reverse().find(r)},Fe.prototype.invokeMap=Ie(function(r,s){return typeof r=="function"?new Fe(this):this.map(function(l){return Ds(l,r,s)})}),Fe.prototype.reject=function(r){return this.filter(aa(ge(r)))},Fe.prototype.slice=function(r,s){r=Oe(r);var l=this;return l.__filtered__&&(r>0||s<0)?new Fe(l):(r<0?l=l.takeRight(-r):r&&(l=l.drop(r)),s!==n&&(s=Oe(s),l=s<0?l.dropRight(-s):l.take(s-r)),l)},Fe.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Fe.prototype.toArray=function(){return this.take(q)},Vn(Fe.prototype,function(r,s){var l=/^(?:filter|find|map|reject)|While$/.test(s),d=/^(?:head|last)$/.test(s),g=v[d?"take"+(s=="last"?"Right":""):s],y=d||/^find/.test(s);g&&(v.prototype[s]=function(){var x=this.__wrapped__,O=d?[1]:arguments,P=x instanceof Fe,W=O[0],H=P||Ae(x),V=function(Ne){var Be=g.apply(v,Dr([Ne],O));return d&&Q?Be[0]:Be};H&&l&&typeof W=="function"&&W.length!=1&&(P=H=!1);var Q=this.__chain__,ue=!!this.__actions__.length,me=y&&!Q,Pe=P&&!ue;if(!y&&H){x=Pe?x:new Fe(this);var ve=r.apply(x,O);return ve.__actions__.push({func:ra,args:[V],thisArg:n}),new bn(ve,Q)}return me&&Pe?r.apply(this,O):(ve=this.thru(V),me?d?ve.value()[0]:ve.value():ve)})}),vn(["pop","push","shift","sort","splice","unshift"],function(r){var s=ko[r],l=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",d=/^(?:pop|shift)$/.test(r);v.prototype[r]=function(){var g=arguments;if(d&&!this.__chain__){var y=this.value();return s.apply(Ae(y)?y:[],g)}return this[l](function(x){return s.apply(Ae(x)?x:[],g)})}}),Vn(Fe.prototype,function(r,s){var l=v[s];if(l){var d=l.name+"";Ke.call(Fi,d)||(Fi[d]=[]),Fi[d].push({name:s,func:l})}}),Fi[Yo(n,_).name]=[{name:"wrapper",func:n}],Fe.prototype.clone=ey,Fe.prototype.reverse=ty,Fe.prototype.value=ny,v.prototype.at=D0,v.prototype.chain=I0,v.prototype.commit=R0,v.prototype.next=L0,v.prototype.plant=$0,v.prototype.reverse=N0,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=F0,v.prototype.first=v.prototype.head,As&&(v.prototype[As]=M0),v},Mi=Rv();ri?((ri.exports=Mi)._=Mi,Al._=Mi):Et._=Mi}).call(YA)}(js,js.exports)),js.exports}var us=XA();const JA=vu(us),[QA,eT]=it(J("DIRECT|direct|dns-out"),{name:"quickFilterRegex",storage:localStorage}),[tg,ng]=J([]),[rg,tT]=J(null),_I=()=>{const[e,t]=J([]),[n,i]=J([]),[o,a]=J(!1);Re(()=>{var f;const u=(f=rg())==null?void 0:f.connections;u&&xe(()=>{const h=ig(u,n());if(nT(n()),!o()){const p=rT(h,tg());i(h),t(p.slice(-Ph))}ng(p=>p.slice(-(h.length+Ph)))})});const c=de(()=>{const u={};return n().forEach(f=>{f.chains.forEach(h=>{u[h]||(u[h]=0),u[h]+=f.downloadSpeed})}),u});return{closedConnections:e,activeConnections:n,speedGroupByName:c,paused:o,setPaused:a}},ig=(e,t)=>{const n=new Map;return t.forEach(i=>n.set(i.id,i)),e.map(i=>{const o=n.get(i.id);return!o||!us.isNumber(o.download)||!us.isNumber(o.upload)?{...i,downloadSpeed:0,uploadSpeed:0}:{...i,downloadSpeed:i.download-o.download,uploadSpeed:i.upload-o.upload}})},nT=e=>{ng(t=>us.unionWith(t,e,(n,i)=>n.id===i.id))},rT=(e,t)=>us.differenceWith(t,e,(n,i)=>n.id===i.id),[iT,sT]=J(document.createElement("div"));let Lh=1;const[oT,aT]=J([]),[Mh,lT]=J(!1),xI=()=>(Re(rl(Dh,(e,t)=>{if(e===t)return;const n=gg("logs",{level:Dh()});Re(()=>{const i=n();!i||Mh()||(aT(o=>[{...i,seq:Lh},...o].slice(0,ZA())),Lh++)})})),{logs:oT,paused:Mh,setPaused:lT});class $h extends Error{constructor(n,i,o){const a=n.status||n.status===0?n.status:"",c=n.statusText||"",u=`${a} ${c}`.trim(),f=u?`status code ${u}`:"an unknown error";super(`Request failed with ${f}: ${i.method} ${i.url}`);Kt(this,"response");Kt(this,"request");Kt(this,"options");this.name="HTTPError",this.response=n,this.request=i,this.options=o}}class sg extends Error{constructor(n){super(`Request timed out: ${n.method} ${n.url}`);Kt(this,"request");this.name="TimeoutError",this.request=n}}const Hs=e=>e!==null&&typeof e=="object",ya=(...e)=>{for(const t of e)if((!Hs(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return xu({},...e)},og=(e={},t={})=>{const n=new globalThis.Headers(e),i=t instanceof globalThis.Headers,o=new globalThis.Headers(t);for(const[a,c]of o.entries())i&&c==="undefined"||c===void 0?n.delete(a):n.set(a,c);return n};function ba(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:xu(e[n]??[],t[n]??[])}const ag=(e={},t={})=>({beforeRequest:ba(e,t,"beforeRequest"),beforeRetry:ba(e,t,"beforeRetry"),afterResponse:ba(e,t,"afterResponse"),beforeError:ba(e,t,"beforeError")}),xu=(...e)=>{let t={},n={},i={};for(const o of e)if(Array.isArray(o))Array.isArray(t)||(t=[]),t=[...t,...o];else if(Hs(o)){for(let[a,c]of Object.entries(o))Hs(c)&&a in t&&(c=xu(t[a],c)),t={...t,[a]:c};Hs(o.hooks)&&(i=ag(i,o.hooks),t.hooks=i),Hs(o.headers)&&(n=og(n,o.headers),t.headers=n)}return t},cT=(()=>{let e=!1,t=!1;const n=typeof globalThis.ReadableStream=="function",i=typeof globalThis.Request=="function";if(n&&i)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(o){if(o instanceof Error&&o.message==="unsupported BodyInit type")return!1;throw o}return e&&!t})(),uT=typeof globalThis.AbortController=="function",fT=typeof globalThis.ReadableStream=="function",dT=typeof globalThis.FormData=="function",lg=["get","post","put","patch","head","delete"],hT={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Rc=2147483647,cg=Symbol("stop"),pT={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,fetch:!0},gT={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},mT=e=>lg.includes(e)?e.toUpperCase():e,vT=["get","put","head","delete","options","trace"],yT=[408,413,429,500,502,503,504],bT=[413,429,503],Nh={limit:2,methods:vT,statusCodes:yT,afterStatusCodes:bT,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},wT=(e={})=>{if(typeof e=="number")return{...Nh,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...Nh,...e}};async function _T(e,t,n,i){return new Promise((o,a)=>{const c=setTimeout(()=>{n&&n.abort(),a(new sg(e))},i.timeout);i.fetch(e,t).then(o).catch(a).then(()=>{clearTimeout(c)})})}async function xT(e,{signal:t}){return new Promise((n,i)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));function o(){clearTimeout(a),i(t.reason)}const a=setTimeout(()=>{t==null||t.removeEventListener("abort",o),n()},e)})}const ST=(e,t)=>{const n={};for(const i in t)!(i in gT)&&!(i in pT)&&!(i in e)&&(n[i]=t[i]);return n};class ja{constructor(t,n={}){Kt(this,"request");Kt(this,"abortController");Kt(this,"_retryCount",0);Kt(this,"_input");Kt(this,"_options");var i,o;if(this._input=t,this._options={...n,headers:og(this._input.headers,n.headers),hooks:ag({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:mT(n.method??this._input.method),prefixUrl:String(n.prefixUrl||""),retry:wT(n.retry),throwHttpErrors:n.throwHttpErrors!==!1,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(uT){this.abortController=new globalThis.AbortController;const a=this._options.signal??this._input.signal;a!=null&&a.aborted&&this.abortController.abort(a==null?void 0:a.reason),a==null||a.addEventListener("abort",()=>{this.abortController.abort(a.reason)}),this._options.signal=this.abortController.signal}if(cT&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=((o=(i=this._options).stringifyJson)==null?void 0:o.call(i,this._options.json))??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const c="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),u=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,c);(dT&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(u,{...this.request}),this._options)}}static create(t,n){const i=new ja(t,n),o=async()=>{if(typeof i._options.timeout=="number"&&i._options.timeout>Rc)throw new RangeError(`The \`timeout\` option cannot be greater than ${Rc}`);await Promise.resolve();let u=await i._fetch();for(const f of i._options.hooks.afterResponse){const h=await f(i.request,i._options,i._decorateResponse(u.clone()));h instanceof globalThis.Response&&(u=h)}if(i._decorateResponse(u),!u.ok&&i._options.throwHttpErrors){let f=new $h(u,i.request,i._options);for(const h of i._options.hooks.beforeError)f=await h(f);throw f}if(i._options.onDownloadProgress){if(typeof i._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!fT)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return i._stream(u.clone(),i._options.onDownloadProgress)}return u},c=i._options.retry.methods.includes(i.request.method.toLowerCase())?i._retry(o):o();for(const[u,f]of Object.entries(hT))c[u]=async()=>{i.request.headers.set("accept",i.request.headers.get("accept")||f);const h=await c;if(u==="json"){if(h.status===204||(await h.clone().arrayBuffer()).byteLength===0)return"";if(n.parseJson)return n.parseJson(await h.text())}return h[u]()};return c}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount>this._options.retry.limit||t instanceof sg)throw t;if(t instanceof $h){if(!this._options.retry.statusCodes.includes(t.response.status))throw t;const i=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(i&&this._options.retry.afterStatusCodes.includes(t.response.status)){let o=Number(i)*1e3;Number.isNaN(o)?o=Date.parse(i)-Date.now():o>=Date.parse("2024-01-01")&&(o-=Date.now());const a=this._options.retry.maxRetryAfter??o;return o<a?o:a}if(t.response.status===413)throw t}const n=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,n)}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(n){const i=Math.min(this._calculateRetryDelay(n),Rc);if(this._retryCount<1)throw n;await xT(i,{signal:this._options.signal});for(const o of this._options.hooks.beforeRetry)if(await o({request:this.request,options:this._options,error:n,retryCount:this._retryCount})===cg)return;return this._retry(t)}}async _fetch(){for(const i of this._options.hooks.beforeRequest){const o=await i(this.request,this._options);if(o instanceof Request){this.request=o;break}if(o instanceof Response)return o}const t=ST(this.request,this._options),n=this.request;return this.request=n.clone(),this._options.timeout===!1?this._options.fetch(n,t):_T(n,t,this.abortController,this._options)}_stream(t,n){const i=Number(t.headers.get("content-length"))||0;let o=0;return t.status===204?(n&&n({percent:1,totalBytes:i,transferredBytes:o},new Uint8Array),new globalThis.Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(a){const c=t.body.getReader();n&&n({percent:0,transferredBytes:0,totalBytes:i},new Uint8Array);async function u(){const{done:f,value:h}=await c.read();if(f){a.close();return}if(n){o+=h.byteLength;const p=i===0?0:o/i;n({percent:p,transferredBytes:o,totalBytes:i},h)}a.enqueue(h),await u()}await u()}}),{status:t.status,statusText:t.statusText,headers:t.headers})}}/*! MIT License © Sindre Sorhus */const Qc=e=>{const t=(n,i)=>ja.create(n,ya(e,i));for(const n of lg)t[n]=(i,o)=>ja.create(i,ya(e,o,{method:n}));return t.create=n=>Qc(ya(n)),t.extend=n=>(typeof n=="function"&&(n=n(e??{})),Qc(ya(e,n))),t.stop=cg,t},Js=Qc(),SI=(e,t)=>Js.get(e,{headers:t?{Authorization:`Bearer ${t}`}:{}}).then(({ok:n})=>n).catch(n=>{const{message:i}=n;cn.error(i)}),AI=()=>yt().delete("connections"),AT=e=>yt().delete(`connections/${e}`),[TI,Fh]=J(!1),[CI,Uh]=J(!1),[OI,Bh]=J(!1),[EI,zh]=J(!1),[kI,Wh]=J(!1),[PI,jh]=J(!1),DI=async()=>{const e=yt();Fh(!0);try{await e.put("configs",{searchParams:{force:!0},json:{path:"",payload:""}})}catch{}Fh(!1)},II=async()=>{const e=yt();Bh(!0);try{await e.post("cache/fakeip/flush")}catch{}Bh(!1)},RI=async()=>{const e=yt();Uh(!0);try{await e.post("configs/geo")}catch{}Uh(!1)},LI=async()=>{const e=yt();zh(!0);try{await e.post("upgrade")}catch{}zh(!1)},MI=async()=>{const e=yt();Wh(!0);try{await e.post("upgrade/ui")}catch{}Wh(!1)},$I=async()=>{const e=yt();jh(!0);try{await e.post("restart")}catch{}jh(!1)},NI=()=>yt().get("configs").json(),FI=async(e,t,n)=>{try{await yt().patch("configs",{json:{[e]:t}}).json(),await n()}catch(i){cn.error(i.message)}},UI=async()=>{const e=yt(),{version:t}=await e.get("version").json();return t},TT=()=>yt().get("providers/proxies").json(),CT=()=>yt().get("proxies").json(),Hh=e=>yt().put(`providers/proxies/${encodeURIComponent(e)}`),ug=e=>yt().get(`providers/proxies/${encodeURIComponent(e)}/healthcheck`,{timeout:20*1e3}).json(),OT=(e,t)=>yt().put(`proxies/${encodeURIComponent(e)}`,{body:JSON.stringify({name:t})}),ET=(e,t,n,i)=>{const o=yt();return t!==""?ug(t).then(a=>({delay:a[e]})):o.get(`proxies/${encodeURIComponent(e)}/delay`,{searchParams:{url:n,timeout:i}}).json()},kT=(e,t,n)=>yt().get(`group/${encodeURIComponent(e)}/delay`,{searchParams:{url:t,timeout:n}}).json(),BI=()=>yt().get("rules").json(),zI=()=>yt().get("providers/rules").json(),WI=e=>yt().put(`providers/rules/${encodeURIComponent(e)}`),jI=async e=>{const t="https://api.github.com/repos/MetaCubeX/metacubexd",{tag_name:n}=await Js.get(`${t}/releases/latest`).json();return n!==e},HI=async e=>{const t="https://api.github.com/repos/MetaCubeX/mihomo",n=/(alpha|beta|meta)-?(\w+)/.exec(e);if(!n)return!1;const i=async c=>{const{assets:u}=await Js.get(`${t}${c}`).json();return!u.some(({name:h})=>h.includes(a))},o=n[1],a=n[2];return o==="meta"?await i("/releases/latest"):o==="alpha"?await i("/releases/tags/Prerelease-Alpha"):!1},ZI=e=>/^https?:\/\//.test(e)?e:`${window.location.protocol}//${e}`,sl=()=>{const[e,t]=J({}),n=(o,a)=>{t({...e(),[o]:a})};return{map:e,set:n,setWithCallback:async(o,a)=>{n(o,!0);try{await a()}catch{}n(o,!1)}}};function PT(e,t){const n=sr(t);return[i=>B(n.Provider,{value:e(i),get children(){return i.children}}),()=>On(n)]}var fg=e=>e!=null&&(e=Object.getPrototypeOf(e),e===Array.prototype||e===Object.prototype);function dg(e,t,n){for(const[i,o]of Object.entries(t)){const a=`${n}.${i}`;e[a]=o,fg(o)&&dg(e,o,a)}}function DT(e){const t={...e};for(const[n,i]of Object.entries(e))fg(i)&&dg(t,i,n);return t}var IT=(e,t)=>{if(t)for(const[n,i]of Object.entries(t))e=e.replace(new RegExp(`{{\\s*${n}\\s*}}`,"g"),i);return e},RT=e=>e;function LT(e,t=RT){return(n,...i)=>{var a;n[0]==="."&&(n=n.slice(1));const o=(a=e())==null?void 0:a[n];switch(typeof o){case"function":return o(...i);case"string":return t(o,i[0]);default:return o}}}const MT={add:"Add",setup:"Setup",overview:"Overview",proxies:"Proxies",proxiesSettings:"Proxies Settings",rules:"Rules",connections:"Connections",connectionsSettings:"Connections Settings",connectionsDetails:"Connections Details",logs:"Logs",logsSettings:"Logs Settings",config:"Config",upload:"Upload",download:"Download",uploadTotal:"Upload Total",downloadTotal:"Download Total",activeConnections:"Active Connections",memoryUsage:"Memory Usage",traffic:"Traffic",memory:"Memory",down:"Down",up:"Up",proxyProviders:"Proxy Providers",ruleProviders:"Rule Providers",search:"Search",ID:"ID",type:"Type",name:"Name",process:"Process",host:"Host",sniffHost:"Sniff Host",chains:"Chains",connectTime:"Time",dlSpeed:"DL Speed",ulSpeed:"UL Speed",dl:"DL",ul:"UL",sourceIP:"Source IP",sourcePort:"Source Port",destination:"Destination",inboundUser:"Inbound User",close:"Close",reset:"Reset",dnsQuery:"DNS Query",dots:"Dots",bar:"Bar",auto:"Auto",off:"Off",proxiesPreviewType:"Proxies Preview Type",urlForLatencyTest:"URL for Latency Test",autoCloseConns:"Automatically Close Connections",useTwemoji:"Use Twemoji Mozilla Font",autoSwitchTheme:"Automatically switch theme",favDayTheme:"Favorite light theme",favNightTheme:"Favorite dark theme",renderInTwoColumns:"Render In Two Columns",updateGEODatabases:"Update GEO Databases",restartCore:"Restart Core",upgradeCore:"Upgrade Core",upgradeUI:"Upgrade Dashboard",proxiesSorting:"Proxies Sorting",orderNatural:"Original order in config file",orderLatency_asc:"By latency from low to high",orderLatency_desc:"By latency from high to low",orderName_asc:"By name alphabetically (A-Z)",orderName_desc:"By name alphabetically (Z-A)",ms:"ms",updated:"Updated",tableSize:"Table size",logLevel:"Log Level",info:"info",silent:"silent",debug:"debug",warning:"warning",error:"error",logMaxRows:"Log Maximum Reserved Rows",xs:"Extra small size",sm:"Small size",md:"Normal size",lg:"Large size",switchEndpoint:"Switch Endpoint",switchLanguage:"Switch Language",latencyTestTimeoutDuration:"Latency Test Timeout Duration",all:"All",sequence:"Sequence",payload:"Payload",details:"Details",endpointURL:"Endpoint URL",secret:"Secret",runningMode:"Running Mode",global:"Global",rule:"Rule",direct:"Direct",reject:"Reject",rejectdrop:"Drop",selector:"Selector",urltest:"Urltest",loadbalance:"Balance",fallback:"Fallback",relay:"Relay",pass:"Pass",active:"Active",closed:"Closed",sort:"Sort",hideUnavailableProxies:"Hide Unavailable Proxies",reloadConfig:"Reload Config",flushFakeIP:"Flush Fake-IP",tagClientSourceIPWithName:"Tag Client Source IP With Name",tag:"Tag",coreConfig:"Core Config",xdConfig:"XD Config",version:"Version",expire:"Expire",noExpire:"Null",allowLan:"Allow Lan",enableTunDevice:"Enable TUN Device",tunModeStack:"TUN Mode Stack",tunDeviceName:"TUN Device Name",outboundInterfaceName:"Outbound Interface Name",en:"English",zh:"Chinese",ru:"Russian",port:"{{ name }} Port",quickFilter:"Quick Filter",iconHeight:"Icon Height",iconMarginRight:"Icon Margin Right"},$T={add:"Добавить",setup:"Настройка",overview:"Обзор",proxies:"Прокси",proxiesSettings:"Настройки прокси",rules:"Правила",connections:"Подключения",connectionsSettings:"Настройки подключений",connectionsDetails:"Детали подключений",logs:"Журналы",logsSettings:"Настройки журналов",config:"Настройки",upload:"Загрузка",download:"Скачивание",uploadTotal:"Всего загружено",downloadTotal:"Всего скачано",activeConnections:"Активные подключения",memoryUsage:"Использование памяти",traffic:"Трафик",memory:"Память",down:"Скачано",up:"Загружено",proxyProviders:"Поставщики прокси",ruleProviders:"Поставщики правил",search:"Поиск",ID:"ID",type:"Тип",name:"Название",process:"Процесс",host:"Хост",sniffHost:"Сниффинг хоста",chains:"Цепочки",connectTime:"Время подключения",dlSpeed:"Скачивание",ulSpeed:"Загрузка",dl:"Скачано",ul:"Загружено",sourceIP:"IP источника",sourcePort:"Порт источника",destination:"Назначение",inboundUser:"Входящий пользователь",close:"Закрыть",reset:"Сбросить",dnsQuery:"DNS-запрос",dots:"Точки",bar:"Полоса",auto:"Авто",off:"Выключено",proxiesPreviewType:"Тип предварительного просмотра прокси",urlForLatencyTest:"URL для теста задержки",autoCloseConns:"Автоматически закрывать соединения",useTwemoji:"Использовать шрифт Twemoji Mozilla",autoSwitchTheme:"Автоматически переключать тему",favDayTheme:"Предпочитаемая светлая тема",favNightTheme:"Предпочитаемая темная тема",renderInTwoColumns:"Отображать в два столбца",updateGEODatabases:"Обновить GEO БД",restartCore:"Перезапустить ядро",upgradeCore:"Обновить ядро",upgradeUI:"Обновить интерфейс",proxiesSorting:"Сортировка прокси",orderNatural:"Как в конфигурации",orderLatency_asc:"По задержке (от меньшей к большей)",orderLatency_desc:"По задержке (от большей к меньшей)",orderName_asc:"По алфавиту (A-Z)",orderName_desc:"По алфавиту (Z-A)",ms:"мс",updated:"Обновлено",tableSize:"Размер таблицы",logLevel:"Уровень журналирования",info:"Информация",silent:"Тишина",debug:"Отладка",warning:"Предупреждение",error:"Ошибка",logMaxRows:"Максимальное количество строк в журнале",xs:"Крохотный",sm:"Маленький",md:"Обычный",lg:"Большой",switchEndpoint:"Сменить адрес подключения",switchLanguage:"Язык интерфейса",latencyTestTimeoutDuration:"Тайм-аут теста задержки",all:"Все",sequence:"№",payload:"Нагрузка",details:"Детали",endpointURL:"URL-адрес подключения",secret:"Пароль",runningMode:"Режим работы",global:"Глобальный",rule:"Правила",direct:"Прямое подключение",reject:"Отклонить",rejectdrop:"Сбросить",selector:"Селектор",urltest:"Тестирование URL",loadbalance:"Балансировка",fallback:"Резервный",relay:"Реле",pass:"Пропустить",active:"Активно",closed:"Закрыто",sort:"Сортировка",hideUnavailableProxies:"Скрыть недоступные прокси",reloadConfig:"Перезагрузить конфиг",flushFakeIP:"Очистить Fake-IP",tagClientSourceIPWithName:"Пометить IP клиента с именем",tag:"Тег",coreConfig:"Конфигурация ядра",xdConfig:"Конфигурация XD",version:"Версия",expire:"Истекает",noExpire:"Не истекает",allowLan:"Разрешить LAN",enableTunDevice:"Включить TUN-устройство",tunModeStack:"Стек режима TUN",tunDeviceName:"Имя TUN-устройства",outboundInterfaceName:"Имя исходящего интерфейса",en:"Английский",zh:"Китайский",ru:"Русский",port:"{{ name }} Порт",quickFilter:"Быстрый фильтр",iconHeight:"Высота иконки",iconMarginRight:"Отступ иконки справа"},NT={add:"添加",setup:"设置",overview:"概览",proxies:"代理",proxiesSettings:"代理设置",rules:"规则",connections:"连接",connectionsSettings:"连接设置",connectionsDetails:"连接详情",logs:"日志",logsSettings:"日志设置",config:"配置",upload:"上传",download:"下载",uploadTotal:"上传总量",downloadTotal:"下载总量",activeConnections:"活动连接",memoryUsage:"内存使用情况",traffic:"流量",memory:"内存",down:"下载",up:"上传",proxyProviders:"代理提供者",ruleProviders:"规则提供者",search:"搜索",ID:"ID",type:"类型",name:"名字",process:"进程",host:"主机",sniffHost:"嗅探域名",chains:"链路",connectTime:"连接时间",dlSpeed:"下载速度",ulSpeed:"上传速度",dl:"下载量",ul:"上传量",sourceIP:"源地址",sourcePort:"源端口",destination:"目标地址",inboundUser:"入站用户",close:"关闭",reset:"重置",dnsQuery:"DNS 查询",dots:"点阵",bar:"条形",auto:"自适应",off:"关闭",proxiesPreviewType:"节点组预览样式",urlForLatencyTest:"测速链接",autoCloseConns:"自动断开连接",useTwemoji:"使用 Twemoji Mozilla 字体",autoSwitchTheme:"自动切换主题",favDayTheme:"浅色主题偏好",favNightTheme:"深色主题偏好",renderInTwoColumns:"双列渲染",updateGEODatabases:"更新 GEO 数据库",restartCore:"重启核心",upgradeCore:"更新核心",upgradeUI:"更新控制面板",proxiesSorting:"节点排序",orderNatural:"原配置文件中的排序",orderLatency_asc:"按延迟从低到高",orderLatency_desc:"按延迟从高到低",orderName_asc:"按名称字母排序 (A-Z)",orderName_desc:"按名称字母排序 (Z-A)",ms:"毫秒",updated:"更新于",tableSize:"表格大小",logLevel:"日志等级",info:"信息",silent:"静默",debug:"调试",warning:"警告",error:"错误",logMaxRows:"日志最大保留行数",xs:"超小尺寸",sm:"小尺寸",md:"正常尺寸",lg:"超大尺寸",switchEndpoint:"切换后端",switchLanguage:"切换语言",latencyTestTimeoutDuration:"测速超时时间",all:"全部",sequence:"序列号",payload:"内容",details:"详情",endpointURL:"后端地址",secret:"密钥",runningMode:"运行模式",global:"全局",rule:"规则",direct:"直连",reject:"拒绝",rejectdrop:"丢弃",selector:"手动选择",urltest:"自动选择",loadbalance:"负载均衡",fallback:"故障转移",relay:"链式代理",pass:"绕过",active:"活动",closed:"已关闭",sort:"排序",hideUnavailableProxies:"隐藏不可用节点",reloadConfig:"重载配置",flushFakeIP:"清空 Fake-IP",tagClientSourceIPWithName:"为客户端源 IP 地址添加名称标记",tag:"标记",coreConfig:"核心配置",xdConfig:"XD 配置",version:"版本",expire:"到期时间",noExpire:"不限时",allowLan:"允许局域网访问",enableTunDevice:"开启 TUN 转发",tunModeStack:"TUN 模式堆栈",tunDeviceName:"TUN 设备名称",outboundInterfaceName:"出站接口名称",en:"英文",zh:"中文",ru:"俄文",port:"{{ name }} 端口",quickFilter:"快速过滤",iconHeight:"图标高度",iconMarginRight:"图标右边距"},hg={[Ks.EN]:MT,[Ks.ZH]:NT,[Ks.RU]:$T},[FT,qI]=it(J(Reflect.has(hg,navigator.language)?navigator.language:Ks.EN),{name:"lang",storage:localStorage}),[UT,BT]=PT(e=>[LT(()=>DT(hg[e.locale]),IT)]),ol=()=>BT(),zT=(e="")=>{const[t]=ol(),n=e.toLowerCase(),i=new Map([["shadowsocks","SS"],["shadowsocksr","SSR"],["hysteria","HY"],["hysteria2","HY2"],["wireguard","WG"],["selector",t("selector")],["urltest",t("urltest")],["fallback",t("fallback")],["loadbalance",t("loadbalance")],["direct",t("direct")],["reject",t("reject")],["rejectdrop",t("rejectdrop")],["relay",t("relay")],["pass",t("pass")]]);return i.has(n)?i.get(n):n},pg=e=>e>$n().HIGH?"text-red-500":e>$n().MEDIUM?"text-yellow-500":e===wu.NOT_CONNECTED?"text-gray":"text-green-600",WT=(e="")=>!["selector","direct","reject","urltest","loadbalance","fallback","relay"].includes(e.toLowerCase()),GI=({proxyNames:e,orderingType:t,testUrl:n})=>{const{getLatencyByName:i}=al();if(t===pi.NATURAL)return e;const o=n||Sr();return e.sort((a,c)=>{const u=i(a,o),f=i(c,o);switch(t){case pi.LATENCY_ASC:return u===$n().NOT_CONNECTED?1:f===$n().NOT_CONNECTED?-1:u-f;case pi.LATENCY_DESC:return u===$n().NOT_CONNECTED?1:f===$n().NOT_CONNECTED?-1:f-u;case pi.NAME_ASC:return a.localeCompare(c);case pi.NAME_DESC:return c.localeCompare(a);default:return 0}})},VI=({proxyNames:e,enabled:t,testUrl:n})=>{const{getLatencyByName:i,isProxyGroup:o}=al(),a=n||Sr();return t?e.filter(c=>o(c)||i(c,a)!==$n().NOT_CONNECTED):e},{map:jT,setWithCallback:HT}=sl(),{map:ZT,setWithCallback:qT}=sl(),{map:GT,setWithCallback:VT}=sl(),{map:KT,setWithCallback:YT}=sl(),[XT,Zh]=J(!1),[qh,JT]=J([]),[Gh,QT]=J([]),[ka,eu]=J({}),[di,eC]=J({}),tC=(e,t=!0)=>{var a,c;const n=e.extra||{},{allTestUrlLatency:i,allTestUrlLatencyHistory:o}=Object.keys(n).reduce((u,f)=>{var m,b;const h=n[f],p=((b=(m=h==null?void 0:h.history)==null?void 0:m.at(-1))==null?void 0:b.delay)??$n().NOT_CONNECTED;return u.allTestUrlLatency[f]=p,u.allTestUrlLatencyHistory[f]=h.history,u},{allTestUrlLatency:{},allTestUrlLatencyHistory:{}});if(t){const u=e.testUrl||Sr();if(!(u in i)){const h=((c=(a=e.history)==null?void 0:a.at(-1))==null?void 0:c.delay)??$n().NOT_CONNECTED;i[u]=h,o[u]=e.history}}return{allTestUrlLatency:i,allTestUrlLatencyHistory:o}},nC=e=>{const t={...di()},n={...ka()};e.forEach(i=>{const{allTestUrlLatency:o,allTestUrlLatencyHistory:a}=tC(i),{udp:c,xudp:u,type:f,now:h,name:p,tfo:m,provider:b=""}=i;t[i.name]={udp:c,xudp:u,type:f,latency:h,latencyTestHistory:a,name:p,tfo:m,provider:b},n[i.name]=o}),An(()=>{eC(t),eu(n)})},al=()=>{const e=async()=>{const[{providers:m},{proxies:b}]=await Promise.all([TT(),CT()]),w=Object.values(b).map(C=>{var L;if((L=C.all)!=null&&L.length&&!C.testUrl){const{testUrl:N,timeout:F}=(m==null?void 0:m[C.name])||{};return{...C,testUrl:N,timeout:F}}else return C}),A=[...b.GLOBAL.all??[],"GLOBAL"],T=Object.values(w).filter(C=>{var L;return(L=C.all)==null?void 0:L.length}).sort((C,L)=>A.indexOf(C.name)-A.indexOf(L.name)),S=Object.values(m).filter(C=>C.name!=="default"&&C.vehicleType!=="Compatible"),_=[...w,...S.flatMap(C=>C.proxies.filter(L=>!(L.name in b)).map(L=>({...L,provider:C.name})))];An(()=>{JT(T),QT(S),nC(_)})},t=async(m,b)=>{await OT(m.name,b),await e(),OA()&&xe(()=>{var A;const w=ig(((A=rg())==null?void 0:A.connections)??[],[]);w.length>0&&w.forEach(({id:T,chains:S})=>{S.includes(m.name)&&AT(T)})})},n=async(m,b,w,A)=>{const T=u(m);HT(T,async()=>{var C;const S=w||Sr(),_=((C=ka())==null?void 0:C[T])||{};try{const{delay:L}=await ET(T,b,S,A??Ih());_[S]=L,eu(N=>({...N,[T]:_}))}catch{_[S]=$n().NOT_CONNECTED,eu(L=>({...L,[T]:_}))}})},i=async m=>{const b=qh();qT(m,async()=>{const w=b.find(A=>A.name===m);await kT(m,(w==null?void 0:w.testUrl)||Sr(),(w==null?void 0:w.timeout)??Ih()),await e()})},o=m=>YT(m,async()=>{try{await Hh(m)}catch{}await e()}),a=async()=>{Zh(!0);try{await Promise.allSettled(Gh().map(m=>Hh(m.name))),await e()}finally{Zh(!1)}},c=m=>VT(m,async()=>{await ug(m),await e()}),u=m=>{let b=di()[m];if(!m||!b)return m;for(;b.latency&&b.latency!==b.name;){const w=di()[b.latency];if(!w)return b.name;b=w}return b.name};return{proxyLatencyTestingMap:jT,proxyGroupLatencyTestingMap:ZT,proxyProviderLatencyTestingMap:GT,updatingMap:KT,isAllProviderUpdating:XT,proxies:qh,proxyProviders:Gh,proxyLatencyTest:n,proxyGroupLatencyTest:i,latencyMap:ka,proxyNodeMap:di,fetchProxies:e,selectProxyInGroup:t,updateProviderByProviderName:o,updateAllProvider:a,proxyProviderLatencyTest:c,getNowProxyNodeName:u,getLatencyByName:(m,b)=>{var T,S;const w=b||Sr(),A=ka();return((T=A[u(m)])==null?void 0:T[w])||((S=A[m])==null?void 0:S[w])||$n().NOT_CONNECTED},getLatencyHistoryByName:(m,b)=>{const w=di()[m],A=u(m),T=di()[A],S=b||Sr();return T.latencyTestHistory[S]||w.latencyTestHistory[S]||[]},isProxyGroup:m=>{const b=di()[m];return b?["direct","reject","loadbalance"].includes(b.type.toLowerCase())||!!b.latency:!1}}};var rC=(e,t,n=[])=>{const i=new WebSocket(e,t),o=i.send.bind(i);return i.send=a=>i.readyState==1?o(a):n.push(a),i.addEventListener("open",()=>{for(;n.length;)o(n.shift())}),i},iC=(e,t,n={})=>{let i=n.retries||1/0,o;const a=[];let c=[["close",()=>{i-- >0&&setTimeout(u,n.delay||3e3)}]];const u=()=>{o&&o.readyState<2&&o.close(),o=Object.assign(rC(e,t,a),{reconnect:u}),c.forEach(h=>o.addEventListener(...h))};u();const f={close:(...h)=>(i=0,o.close(...h)),addEventListener:(...h)=>(c.push(h),o.addEventListener(...h)),removeEventListener:(...h)=>(c=c.filter(p=>h[0]!==p[0]||h[1]!==p[1]),o.removeEventListener(...h)),send:h=>{var p,m;return(m=(p=f.send).before)==null||m.call(p),o.send(h)}};for(const h in o)f[h]==null&&Object.defineProperty(f,h,{enumerable:!0,get:()=>typeof o[h]=="function"?o[h].bind(o):o[h]});return f},sC=(e,t,n)=>{const i=iC(e,t,n);return Xe(()=>i.close()),i};const[oC,KI]=it(J(""),{name:"selectedEndpoint",storage:localStorage}),[aC,YI]=it(J([]),{name:"endpointList",storage:localStorage}),yt=()=>{const e=vo();if(!e)return Js.create({});const t=new Headers;return e.secret&&t.set("Authorization",`Bearer ${e.secret}`),Js.create({prefixUrl:e.url,headers:t})},vo=()=>aC().find(({id:e})=>e===oC()),lC=()=>{var e;return(e=vo())==null?void 0:e.secret},cC=()=>{var e;return JA.trimEnd(new URL(((e=vo())==null?void 0:e.url)??"").href.replace("http","ws"),"/")},Lc=new Map,gg=(e,t={})=>{const n=Lc.get(e);n&&(n.close(),Lc.delete(e));const i=new URLSearchParams(t);i.set("token",lC()??"");const o=sC(`${cC()}/${e}?${i.toString()}`),a=AS(o,"message");return Lc.set(e,o),de(()=>{var u;return a()?JSON.parse((u=a())==null?void 0:u.data):null})},[uC,mg]=it(J("sunset"),{name:"theme",storage:localStorage});var fC=Me('<div><div class="collapse-title pr-4 text-xl font-medium after:!top-8"></div><div>');const XI=e=>{const{title:t,onCollapse:n}=e,i=()=>e.isOpen?"collapse-open":"collapse-close",o=()=>e.isOpen?"opacity-100":"opacity-0",a=de(()=>SA()?"lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5":"sm:grid-cols-4 lg:grid-cols-6 xl:grid-cols-8 2xl:grid-cols-10");return(()=>{var c=fC(),u=c.firstChild,f=u.nextSibling;return u.$$click=()=>n(!e.isOpen),te(u,t),te(f,B(Qt,{get when(){return e.isOpen},get children(){return ei(()=>e.children)()}})),ze(h=>{var p=Cr(i(),"collapse collapse-arrow select-none border-secondary bg-base-200 shadow-md"),m=Cr(o(),a(),"collapse-content grid grid-cols-2 gap-2 transition-opacity duration-1000");return p!==h.e&&er(c,h.e=p),m!==h.t&&er(f,h.t=m),h},{e:void 0,t:void 0}),c})()};Oi(["click"]);var dC=Me('<div class="py-2 text-center text-lg font-semibold">');const wa=e=>(()=>{var t=dC();return te(t,()=>ei(()=>e.children)()),ze(()=>t.classList.toggle("divider",!!e.withDivider)),t})();function hC(e,...t){const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function wr(e){let t;return hC(e,n=>t=n)(),t}class pC extends Error{constructor(t,n){super(t),this.name="FelteSubmitError",this.response=n}}function gC(e,t){return Object.keys(e).some(i=>t(e[i]))}function ll(e,t){return Object.keys(e||{}).reduce((i,o)=>Object.assign(Object.assign({},i),{[o]:t(e[o])}),{})}function Le(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xt(e){return Object.keys(e||{}).reduce((t,n)=>Object.assign(Object.assign({},t),{[n]:Le(e[n])?Xt(e[n]):Array.isArray(e[n])?[...e[n]]:e[n]}),{})}function mC(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n}function vC(e){return function(t){if(Le(t)){const n=Jt(t,e);return mC(n,["key"])}return e}}function Jt(e,t){return ll(e,n=>Le(n)?Jt(n,t):Array.isArray(n)?n.map(vC(t)):t)}function qr(...e){const t=e.pop(),n=e.shift();if(typeof n=="string")return n;const i=Xt(n);if(e.length===0)return i;for(const o of e){if(!o)continue;if(typeof o=="string")return o;let a=t(i,o);if(typeof a<"u")return a;const c=Array.from(new Set(Object.keys(i).concat(Object.keys(o))));for(const u of c)if(a=t(i[u],o[u]),typeof a<"u")i[u]=a;else if(Le(o[u])&&Le(i[u]))i[u]=qr(i[u],o[u],t);else if(Array.isArray(o[u]))i[u]=o[u].map((f,h)=>{if(!Le(f))return f;const p=Array.isArray(i[u])?i[u][h]:i[u];return qr(p,f,t)});else if(Le(o[u])){const f=Jt(Xt(o[u]),void 0);i[u]=qr(f,o[u],t)}else typeof o[u]<"u"&&(i[u]=o[u])}return i}function yC(e,t){if(!(Le(e)&&Le(t))){if(Array.isArray(t)){if(t.some(Le))return;const n=Array.isArray(e)?e:[];return t.map((i,o)=>{var a;return(a=n[o])!==null&&a!==void 0?a:i})}if(typeof e<"u")return e}}function Vh(...e){return qr(...e,yC)}function vg(...e){return qr(...e,()=>{})}function Xn(e,t,n){const i=a=>String.prototype.split.call(t,a).filter(Boolean).reduce((c,u)=>c!=null?c[u]:c,e),o=i(/[,[\]]+?/)||i(/[,[\].]+?/);return o===void 0||o===e?n:o}function ws(e,t,n){e&&(e=Xt(e)),Le(e)||(e={});const i=Array.isArray(t)?t:t.match(/[^.[\]]+/g)||[],o=i[i.length-1];if(!o)return e;let a=e;for(let c=0;c<i.length-1;c++){const u=i[c];if(!a[u]||!Le(a[u])&&!Array.isArray(a[u])){const f=i[c+1];isNaN(Number(f))?a[u]={}:a[u]=[]}a=a[u]}return a[o]=n(a[o]),e}function tt(e,t,n){return ws(e,t,()=>n)}function Zs(e,t){if(!e||Object(e)!==e)return;typeof e<"u"&&(e=Xt(e));const n=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g)||[],i=n.length===1?e:Xn(e,n.slice(0,-1).join("."));return Array.isArray(i)?i.splice(Number(n[n.length-1]),1):i==null||delete i[n[n.length-1]],e}function Qs(e,t){return gC(e,n=>Le(n)?Qs(n,t):Array.isArray(n)?n.length===0||n.every(i=>typeof i=="string")?t(n):n.some(i=>Le(i)?Qs(i,t):t(i)):t(n))}function ns(e){return(e==null?void 0:e.nodeName)==="INPUT"}function bC(e){return(e==null?void 0:e.nodeName)==="TEXTAREA"}function rs(e){return(e==null?void 0:e.nodeName)==="SELECT"}function cl(e){return(e==null?void 0:e.nodeName)==="FIELDSET"}function Dt(e){return ns(e)||bC(e)||rs(e)}function Kh(e){return e.nodeType===Node.ELEMENT_NODE}function Pt(e,t){return t??(Dt(e)?e.name:"")}function Mc(e){let t=e;for(;t&&t.nodeName!=="FORM";){if(t.hasAttribute("data-felte-ignore"))return!0;t=t.parentElement}return!1}function Yh(e,t){return!Le(e)||!t?e:typeof t=="string"?Xn(e,t):t(e)}function wC(e,t){if(!(Le(e)||Le(t))){if(e===null||e==="")return t;if(t===null||t===""||!t)return e;if(!(!e||!t)){if(Array.isArray(e)){if(!Array.isArray(t))return[...e,t];const n=[],i=Math.max(t.length,e.length);for(let o=0;o<i;o++){let a=e[o],c=t[o];!Le(a)&&!Le(c)?(Array.isArray(a)||(a=[a]),Array.isArray(c)||(c=[c]),n.push(...a,...c)):n.push(Yi([a??{},c??{}]))}return n.filter(Boolean)}return Array.isArray(t)||(t=[t]),[e,...t].reduce((n,i)=>n.concat(i),[]).filter(Boolean)}}}function Yi(e){return qr(...e,wC)}function _C(e,t){return t?(Array.isArray(t)?t:[t]).map(i=>i(e)):[]}function tu(e,t){return t?Array.isArray(t)?t.reduce((n,i)=>i(n),e):t(e):e}function yg(e=8){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let i=0;i<e;i++)n+=t.charAt(Math.floor(Math.random()*t.length));return n}function nu(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,i)=>nu(n,t[i]));if(Le(e)&&Le(t)){const n=Object.keys(e),i=Object.keys(t);return n.length!==i.length?!1:n.every(o=>nu(e[o],t[o]))}return!1}function Ha(e,t,{onInit:n,onEnd:i}={}){let o;return(...a)=>{o||n==null||n(),o&&clearTimeout(o),o=setTimeout(()=>{e.apply(this,a),o=void 0,i==null||i()},t)}}function ru(e){if(Dt(e))return[e];if(e.childElementCount===0)return[];const t=new Set;for(const n of e.children){if(Dt(n)&&t.add(n),cl(n))for(const i of n.elements)Dt(i)&&t.add(i);n.childElementCount>0&&ru(n).forEach(i=>t.add(i))}return Array.from(t)}function bg(e){for(const t of e.elements)!Dt(t)&&!cl(t)||e.hasAttribute("data-felte-keep-on-remove")&&!t.hasAttribute("data-felte-keep-on-remove")&&(t.dataset.felteKeepOnRemove=e.dataset.felteKeepOnRemove)}function wg(e){return e.type.match(/^(number|range)$/)?e.value?+e.value:null:e.value}function Xh(e){var t;let n={},i={};for(const o of e.elements){if(cl(o)&&bg(o),!Dt(o)||!o.name)continue;const a=Pt(o);if(ns(o)){if(o.type==="checkbox"){if(typeof Xn(n,a)>"u"){if(Array.from(e.querySelectorAll(`[name="${o.name}"]`)).filter(f=>Dt(f)?a===Pt(f):!1).length===1){n=tt(n,a,o.checked),i=tt(i,a,!1);continue}n=tt(n,a,o.checked?[o.value]:[]),i=tt(i,a,!1);continue}Array.isArray(Xn(n,a))&&o.checked&&(n=ws(n,a,u=>[...u,o.value]));continue}if(o.type==="radio"){if(Xn(n,a))continue;n=tt(n,a,o.checked?o.value:void 0),i=tt(i,a,!1);continue}if(o.type==="file"){n=tt(n,a,o.multiple?Array.from(o.files||[]):(t=o.files)===null||t===void 0?void 0:t[0]),i=tt(i,a,!1);continue}}else if(rs(o)){if(!o.multiple)n=tt(n,a,o.value);else{const f=Array.from(o.selectedOptions).map(h=>h.value);n=tt(n,a,f)}i=tt(i,a,!1);continue}const c=wg(o);n=tt(n,a,c),i=tt(i,a,!1)}return{defaultData:n,defaultTouched:i}}function xC(e,t){var n;if(!Dt(e))return;const i=t;if(ns(e)){if(e.type==="checkbox"){const o=i;if(typeof o>"u"||typeof o=="boolean"){e.checked=!!o;return}Array.isArray(o)&&(o.includes(e.value)?e.checked=!0:e.checked=!1);return}if(e.type==="radio"){const o=i;e.value===o?e.checked=!0:e.checked=!1;return}if(e.type==="file"){if(t instanceof FileList)e.files=t;else if(t instanceof File&&typeof DataTransfer<"u"){const o=new DataTransfer;o.items.add(t),e.files=o.files}else if(typeof DataTransfer<"u"&&Array.isArray(t)&&t.some(o=>o instanceof File)){const o=new DataTransfer;for(const a of t)a instanceof File&&o.items.add(a);e.files=o.files}else(!t||Array.isArray(t)&&!t.length)&&(e.files=null,e.value="");return}}else if(rs(e)){if(e.multiple){if(Array.isArray(i)){e.value=String((n=i[0])!==null&&n!==void 0?n:"");const a=i.map(c=>String(c));for(const c of e.options)a.includes(c.value)?c.selected=!0:c.selected=!1}}else{e.value=String(i??"");for(const a of e.options)a.value===String(i)?a.selected=!0:a.selected=!1}return}e.value=String(i??"")}function _a(e,t){for(const n of e.elements){if(cl(n)&&bg(n),!Dt(n)||!n.name)continue;const i=Pt(n);xC(n,Xn(t,i))}}function _g(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n}function _r(e,t){return ll(e,n=>Le(n)?_r(n,t):Array.isArray(n)?n.length===0||n.every(i=>typeof i=="string")?t:n.map(i=>{const o=_r(i,t);return _g(o,["key"])}):t)}function wi(e){return e?ll(e,t=>Le(t)?wi(t):Array.isArray(t)?t.length===0||t.every(n=>typeof n=="string")?t:t.map(n=>{if(!Le(n))return n;const i=wi(n);return i.key||(i.key=yg()),i}):t):{}}function is(e){return e?ll(e,t=>Le(t)?is(t):Array.isArray(t)?t.length===0||t.every(n=>typeof n=="string")?t:t.map(n=>{if(!Le(n))return n;const i=is(n);return _g(i,["key"])}):t):{}}function SC(){class e extends CustomEvent{constructor(o){super("feltesuccess",{detail:o})}}class t extends CustomEvent{constructor(o){super("felteerror",{detail:o,cancelable:!0})}setErrors(o){this.preventDefault(),this.errors=o}}class n extends Event{constructor(){super("feltesubmit",{cancelable:!0})}handleSubmit(o){this.onSubmit=o}handleError(o){this.onError=o}handleSuccess(o){this.onSuccess=o}}return{createErrorEvent:i=>new t(i),createSubmitEvent:()=>new n,createSuccessEvent:i=>new e(i)}}function AC(e){if(e)return async function(){let n=new FormData(e);const i=new URL(e.action),o=e.method.toLowerCase()==="get"?"get":i.searchParams.get("_method")||e.method;let a=e.enctype;e.querySelector('input[type="file"]')&&(a="multipart/form-data"),(o==="get"||a==="application/x-www-form-urlencoded")&&(n=new URLSearchParams(n));let c;o==="get"?(n.forEach((f,h)=>{i.searchParams.append(h,f)}),c={method:o,headers:{Accept:"application/json"}}):c={method:o,body:n,headers:Object.assign(Object.assign({},a!=="multipart/form-data"&&{"Content-Type":a}),{Accept:"application/json"})};const u=await window.fetch(i.toString(),c);if(u.ok)return u;throw new pC("An error occurred while submitting the form",u)}}function xa(e,t,n,i){return ws(e,t,o=>(typeof o<"u"&&!Array.isArray(o)||(o||(o=[]),typeof i>"u"?o.push(n):o.splice(i,0,n)),o))}function TC(e,t,n,i){return ws(e,t,o=>(!o||!Array.isArray(o)||([o[n],o[i]]=[o[i],o[n]]),o))}function CC(e,t,n,i){return ws(e,t,o=>(!o||!Array.isArray(o)||o.splice(i,0,o.splice(n,1)[0]),o))}function Jh(e){return typeof e=="function"}function Wr(e){return(n,i)=>{if(typeof n=="string"){const o=n;e(a=>{const c=Jh(i)?i(Xn(a,o)):i;return tt(a,o,c)})}else e(o=>Jh(n)?n(o):n)}}function OC({stores:e,config:t,validateErrors:n,validateWarnings:i,_getCurrentExtenders:o}){var a;let c,u=wi((a=t.initialValues)!==null&&a!==void 0?a:{});const{data:f,touched:h,errors:p,warnings:m,isDirty:b,isSubmitting:w,interacted:A}=e,T=Wr(f.update),S=Wr(h.update),_=Wr(p.update),C=Wr(m.update);function L(R){T(z=>{const q=R(z);return c&&_a(c,q),q})}const N=(R,z,q)=>{Wr(L)(R,z),typeof R=="string"&&q&&S(R,!0)};function F(R,z,q){const ce=Le(z)?_r(z,!1):!1,ye=Le(ce)?Jt(ce,[]):[];z=Le(z)?Object.assign(Object.assign({},z),{key:yg()}):z,p.update(Ce=>xa(Ce,R,ye,q)),m.update(Ce=>xa(Ce,R,ye,q)),h.update(Ce=>xa(Ce,R,ce,q)),f.update(Ce=>{const Ue=xa(Ce,R,z,q);return setTimeout(()=>c&&_a(c,Ue)),Ue})}function Y(R){p.update(R),m.update(R),h.update(R),f.update(z=>{const q=R(z);return setTimeout(()=>c&&_a(c,q)),q})}function re(R){Y(z=>Zs(z,R))}function he(R,z,q){Y(ce=>TC(ce,R,z,q))}function oe(R,z,q){Y(ce=>CC(ce,R,z,q))}function X(R){const z=Xn(u,R),q=Le(z)?_r(z,!1):!1,ce=Le(q)?Jt(q,[]):[];f.update(ye=>{const Ce=tt(ye,R,z);return c&&_a(c,Ce),Ce}),h.update(ye=>tt(ye,R,q)),p.update(ye=>tt(ye,R,ce)),m.update(ye=>tt(ye,R,ce))}const j=Wr(w.update),ne=Wr(b.update),$e=Wr(A.update);async function E(){const R=wr(f);h.set(_r(R,!0)),A.set(null);const z=await n(R);return await i(R),z}function I(){N(Xt(u)),S(R=>Jt(R,!1)),A.set(null),b.set(!1)}function D(R){return async function(q){var ce,ye,Ce,Ue,ht,Tt,wt;const{createErrorEvent:_t,createSubmitEvent:ut,createSuccessEvent:pt}=SC(),gt=ut();c==null||c.dispatchEvent(gt);const le=(ye=(ce=gt.onError)!==null&&ce!==void 0?ce:R==null?void 0:R.onError)!==null&&ye!==void 0?ye:t.onError,G=(Ue=(Ce=gt.onSuccess)!==null&&Ce!==void 0?Ce:R==null?void 0:R.onSuccess)!==null&&Ue!==void 0?Ue:t.onSuccess,pe=(wt=(Tt=(ht=gt.onSubmit)!==null&&ht!==void 0?ht:R==null?void 0:R.onSubmit)!==null&&Tt!==void 0?Tt:t.onSubmit)!==null&&wt!==void 0?wt:AC(c);if(!pe||(q==null||q.preventDefault(),gt.defaultPrevented))return;w.set(!0),A.set(null);const ke=is(wr(f)),st=await n(ke,R==null?void 0:R.validate),En=await i(ke,R==null?void 0:R.warn);if(En&&m.set(vg(Jt(ke,[]),En)),h.set(_r(ke,!0)),st&&(h.set(_r(st,!0)),Qs(st,Ge=>Array.isArray(Ge)?Ge.length>=1:!!Ge))){await new Promise(Ge=>setTimeout(Ge)),o().forEach(Ge=>{var Ct;return(Ct=Ge.onSubmitError)===null||Ct===void 0?void 0:Ct.call(Ge,{data:ke,errors:st})}),w.set(!1);return}const pn={event:q,setFields:N,setData:T,setTouched:S,setErrors:_,setWarnings:C,unsetField:re,addField:F,resetField:X,reset:I,setInitialValues:Z.setInitialValues,moveField:oe,swapFields:he,form:c,controls:c&&Array.from(c.elements).filter(Dt),config:Object.assign(Object.assign({},t),R)};try{const ot=await pe(ke,pn);c==null||c.dispatchEvent(pt(Object.assign({response:ot},pn))),await(G==null?void 0:G(ot,pn))}catch(ot){const Ge=_t(Object.assign({error:ot},pn));if(c==null||c.dispatchEvent(Ge),!le&&!Ge.defaultPrevented)throw ot;if(!le&&!Ge.errors)return;const Ct=Ge.errors||await(le==null?void 0:le(ot,pn));Ct&&(h.set(_r(Ct,!0)),p.set(Ct),await new Promise(Nt=>setTimeout(Nt)),o().forEach(Nt=>{var Gn;return(Gn=Nt.onSubmitError)===null||Gn===void 0?void 0:Gn.call(Nt,{data:ke,errors:wr(p)})}))}finally{w.set(!1)}}}const Z={setData:T,setFields:N,setTouched:S,setErrors:_,setWarnings:C,setIsSubmitting:j,setIsDirty:ne,setInteracted:$e,validate:E,reset:I,unsetField:re,resetField:X,addField:F,swapFields:he,moveField:oe,createSubmitHandler:D,handleSubmit:D(),setInitialValues:R=>{u=wi(R)}};return{public:Z,private:{_setFormNode(R){c=R},_getInitialValues:()=>u}}}function EC({helpers:e,stores:t,config:n,extender:i,createSubmitHandler:o,handleSubmit:a,_setFormNode:c,_getInitialValues:u,_setCurrentExtenders:f,_getCurrentExtenders:h}){const{setFields:p,setTouched:m,reset:b,setInitialValues:w}=e,{addValidator:A,addTransformer:T,validate:S}=e,{data:_,errors:C,warnings:L,touched:N,isSubmitting:F,isDirty:Y,interacted:re,isValid:he,isValidating:oe}=t;function X(j){j.requestSubmit||(j.requestSubmit=a);function ne(le){return function(G){return G({form:j,stage:le,controls:Array.from(j.elements).filter(Dt),data:_,errors:C,warnings:L,touched:N,isValid:he,isValidating:oe,isSubmitting:F,isDirty:Y,interacted:re,config:n,addValidator:A,addTransformer:T,setFields:p,validate:S,reset:b,createSubmitHandler:o,handleSubmit:a})}}f(i.map(ne("MOUNT"))),j.noValidate=!!n.validate;const{defaultData:$e,defaultTouched:E}=Xh(j);c(j),w(vg(Xt($e),u())),p(u()),N.set(E);function I(le){const G=Pt(le),pe=Array.from(j.querySelectorAll(`[name="${le.name}"]`)).filter(ke=>Dt(ke)?G===Pt(ke):!1);if(pe.length!==0)return pe.length===1?_.update(ke=>tt(ke,Pt(le),le.checked)):_.update(ke=>tt(ke,Pt(le),pe.filter(ns).filter(st=>st.checked).map(st=>st.value)))}function D(le){const G=j.querySelectorAll(`[name="${le.name}"]`),pe=Array.from(G).find(ke=>ns(ke)&&ke.checked);_.update(ke=>tt(ke,Pt(le),pe==null?void 0:pe.value))}function Z(le){var G;const pe=Array.from((G=le.files)!==null&&G!==void 0?G:[]);_.update(ke=>tt(ke,Pt(le),le.multiple?pe:pe[0]))}function M(le){if(!le.multiple)_.update(G=>tt(G,Pt(le),le.value));else{const G=Array.from(le.selectedOptions).map(pe=>pe.value);_.update(pe=>tt(pe,Pt(le),G))}}function R(le){const G=le.target;if(!G||!Dt(G)||rs(G)||Mc(G)||["checkbox","radio","file"].includes(G.type)||!G.name)return;Y.set(!0);const pe=wg(G);re.set(G.name),_.update(ke=>tt(ke,Pt(G),pe))}function z(le){const G=le.target;if(!(!G||!Dt(G)||Mc(G))&&G.name)if(m(Pt(G),!0),re.set(G.name),(rs(G)||["checkbox","radio","file","hidden"].includes(G.type))&&Y.set(!0),G.type==="hidden"&&_.update(pe=>tt(pe,Pt(G),G.value)),rs(G))M(G);else if(ns(G))G.type==="checkbox"?I(G):G.type==="radio"?D(G):G.type==="file"&&Z(G);else return}function q(le){const G=le.target;!G||!Dt(G)||Mc(G)||G.name&&(m(Pt(G),!0),re.set(G.name))}function ce(le){le.preventDefault(),b()}const ye={childList:!0,subtree:!0};function Ce(le){let G=wr(_),pe=wr(N),ke=wr(C),st=wr(L);for(const En of le.reverse()){if(En.hasAttribute("data-felte-keep-on-remove")&&En.dataset.felteKeepOnRemove!=="false")continue;const pn=/.*(\[[0-9]+\]|\.[0-9]+)\.[^.]+$/;let ot=Pt(En);const Ge=wr(N);if(pn.test(ot)){const Nt=ot.split(".").slice(0,-1).join("."),Gn=Xn(Ge,Nt);Le(Gn)&&Object.keys(Gn).length<=1&&(ot=Nt)}G=Zs(G,ot),pe=Zs(pe,ot),ke=Zs(ke,ot),st=Zs(st,ot)}_.set(G),N.set(pe),C.set(ke),L.set(st)}const Ue=Ha(()=>{h().forEach(pe=>{var ke;return(ke=pe.destroy)===null||ke===void 0?void 0:ke.call(pe)}),f(i.map(ne("UPDATE")));const{defaultData:le,defaultTouched:G}=Xh(j);_.update(pe=>Vh(pe,le)),N.update(pe=>Vh(pe,G)),e.setFields(wr(_))},0);let ht=[];const Tt=Ha(()=>{h().forEach(le=>{var G;return(G=le.destroy)===null||G===void 0?void 0:G.call(le)}),f(i.map(ne("UPDATE"))),Ce(ht),ht=[]},0);function wt(le){Array.from(le.addedNodes).some(pe=>Kh(pe)?Dt(pe)?!0:ru(pe).length>0:!1)&&Ue()}function _t(le){for(const G of le.removedNodes){if(!Kh(G))continue;const pe=ru(G);pe.length!==0&&(ht.push(...pe),Tt())}}function ut(le){for(const G of le)G.type==="childList"&&(G.addedNodes.length>0&&wt(G),G.removedNodes.length>0&&_t(G))}const pt=new MutationObserver(ut);pt.observe(j,ye),j.addEventListener("input",R),j.addEventListener("change",z),j.addEventListener("focusout",q),j.addEventListener("submit",a),j.addEventListener("reset",ce);const gt=C.subscribe(le=>{for(const G of j.elements){if(!Dt(G)||!G.name)continue;const pe=Xn(le,Pt(G)),ke=Array.isArray(pe)?pe.join(`
|
||
`):typeof pe=="string"?pe:void 0;ke!==G.dataset.felteValidationMessage&&(ke?(G.dataset.felteValidationMessage=ke,G.setAttribute("aria-invalid","true")):(delete G.dataset.felteValidationMessage,G.removeAttribute("aria-invalid")))}});return{destroy(){pt.disconnect(),j.removeEventListener("input",R),j.removeEventListener("change",z),j.removeEventListener("focusout",q),j.removeEventListener("submit",a),j.removeEventListener("reset",ce),gt(),h().forEach(le=>{var G;return(G=le.destroy)===null||G===void 0?void 0:G.call(le)})}}}return{form:X}}function kC(e){const t={aborted:!1,priority:e};return{signal:t,abort(){t.aborted=!0}}}function PC(e,t){if(Le(e))return!t||Le(t)&&Object.keys(t).length===0?Jt(e,null):void 0;if(Array.isArray(e)){if(e.some(Le))return;const n=Array.isArray(t)?t:[];return e.map((i,o)=>{const a=n[o];return Array.isArray(a)&&a.length===0?null:i&&a||null})}return Array.isArray(t)&&t.length===0?null:Array.isArray(t)?e?t:null:e&&t?[t]:null}function DC(e,t){if(Le(e))return!t||Le(t)&&Object.keys(t).length===0?Jt(e,null):void 0;if(Array.isArray(e)){if(e.some(Le))return;const n=Array.isArray(t)?t:[];return e.map((i,o)=>{const a=n[o];return Array.isArray(a)&&a.length===0?null:a||null})}return Array.isArray(t)&&t.length===0?null:Array.isArray(t)?t:t?[t]:null}function IC([e,t]){return qr(t,e,PC)}function RC([e,t]){return qr(t,e,DC)}function LC(e){return function(n,i,o){const a=Array.isArray(n)?n:[n],c=new Array(a.length),u=e(o),f=u.set,h=u.subscribe;let p;function m(){p=a.map((w,A)=>w.subscribe(T=>{c[A]=T,f(i(c))}))}function b(){p==null||p.forEach(w=>w())}return u.subscribe=function(A){const T=h(A);return()=>{T()}},[u,m,b]}}function MC(e,t){var n,i,o,a,c,u,f,h,p;const m=LC(e),b=t.initialValues=t.initialValues?wi(tu(Xt(t.initialValues),t.transform)):{},w=_r(is(b),!1),A=e(w),T=e(0),[S,_,C]=m([A,T],([Je,je])=>Qs(Je,Ot=>!!Ot)&&je>=1,!1);delete S.set,delete S.update;function L(Je){let je;return async function(Ot,tn,Ht,kn=!1){if(!Ht||!Ot)return;let gn=tn&&Object.keys(tn).length>0?tn:Jt(Ot,[]);const Pn=kC(kn);if((!(je!=null&&je.signal.priority)||kn)&&(je==null||je.abort(),je=Pn),je.signal.priority&&!kn)return;T.update(ar=>ar+1);const Pi=_C(is(Ot),Ht);return Pi.forEach(async ar=>{const xs=await ar;Pn.signal.aborted||(gn=Yi([gn,xs]),Je.set(gn))}),await Promise.all(Pi),je=void 0,T.update(ar=>ar-1),gn}}let N=Jt(w,[]);const F=e(b),Y=Jt(w,[]),re=e(Y),he=e(Xt(Y)),[oe,X,j]=m([re,he],Yi,Xt(Y)),ne=Jt(w,[]),$e=e(ne),E=e(Xt(ne)),[I,D,Z]=m([$e,E],Yi,Xt(ne)),[M,R,z]=m([oe,A],IC,Xt(Y)),[q,ce,ye]=m([I,A],RC,Xt(ne));let Ce=!1;const[Ue,ht,Tt]=m(oe,([Je])=>{var je;return Ce?!Qs(Je,ft=>Array.isArray(ft)?ft.length>=1:!!ft):(Ce=!0,!t.validate&&!(!((je=t.debounced)===null||je===void 0)&&je.validate))},!t.validate&&!(!((n=t.debounced)===null||n===void 0)&&n.validate));delete Ue.set,delete Ue.update;const wt=e(!1),_t=e(!1),ut=e(null),pt=L(re),gt=L($e),le=L(he),G=L(E),pe=Ha(le,(c=(o=(i=t.debounced)===null||i===void 0?void 0:i.validateTimeout)!==null&&o!==void 0?o:(a=t.debounced)===null||a===void 0?void 0:a.timeout)!==null&&c!==void 0?c:300,{onInit:()=>{T.update(Je=>Je+1)},onEnd:()=>{T.update(Je=>Je-1)}}),ke=Ha(G,(p=(f=(u=t.debounced)===null||u===void 0?void 0:u.warnTimeout)!==null&&f!==void 0?f:(h=t.debounced)===null||h===void 0?void 0:h.timeout)!==null&&p!==void 0?p:300);async function st(Je,je){var ft;const Ot=pt(Je,N,je??t.validate,!0);if(je)return Ot;const tn=le(Je,N,(ft=t.debounced)===null||ft===void 0?void 0:ft.validate,!0);return Yi(await Promise.all([Ot,tn]))}async function En(Je,je){var ft;const Ot=gt(Je,N,je??t.warn,!0);if(je)return Ot;const tn=G(Je,N,(ft=t.debounced)===null||ft===void 0?void 0:ft.warn,!0);return Yi(await Promise.all([Ot,tn]))}let pn=Y,ot=ne;function Ge(){const Je=F.subscribe(Ht=>{var kn,gn;const Pn=is(Ht);pt(Pn,N,t.validate),gt(Pn,N,t.warn),pe(Pn,N,(kn=t.debounced)===null||kn===void 0?void 0:kn.validate),ke(Pn,N,(gn=t.debounced)===null||gn===void 0?void 0:gn.warn)}),je=A.subscribe(Ht=>{N=Jt(Ht,[])}),ft=oe.subscribe(Ht=>{pn=Ht}),Ot=I.subscribe(Ht=>{ot=Ht});X(),ht(),D(),R(),ce(),_();function tn(){Je(),z(),j(),Z(),ye(),Tt(),C(),je(),ft(),Ot()}return tn}function Ct(Je){re.set(Je(pn)),he.set({})}function Nt(Je){$e.set(Je(ot)),E.set({})}function Gn(Je){Ct(()=>Je)}function ni(Je){Nt(()=>Je)}return M.set=Gn,M.update=Ct,q.set=ni,q.update=Nt,{data:F,errors:M,warnings:q,touched:A,isValid:Ue,isSubmitting:wt,isDirty:_t,isValidating:S,interacted:ut,validateErrors:st,validateWarnings:En,cleanup:t.preventStoreStart?()=>{}:Ge(),start:Ge}}function $C(e,t){var n,i;(n=e.extend)!==null&&n!==void 0||(e.extend=[]),(i=e.debounced)!==null&&i!==void 0||(e.debounced={}),e.validate&&!Array.isArray(e.validate)&&(e.validate=[e.validate]),e.debounced.validate&&!Array.isArray(e.debounced.validate)&&(e.debounced.validate=[e.debounced.validate]),e.transform&&!Array.isArray(e.transform)&&(e.transform=[e.transform]),e.warn&&!Array.isArray(e.warn)&&(e.warn=[e.warn]),e.debounced.warn&&!Array.isArray(e.debounced.warn)&&(e.debounced.warn=[e.debounced.warn]);function o(D,{debounced:Z,level:M}={debounced:!1,level:"error"}){var R;const z=M==="error"?"validate":"warn";(R=e.debounced)!==null&&R!==void 0||(e.debounced={});const q=Z?e.debounced:e;q[z]?q[z]=[...q[z],D]:q[z]=[D]}function a(D){e.transform?e.transform=[...e.transform,D]:e.transform=[D]}const c=Array.isArray(e.extend)?e.extend:[e.extend];let u=[];const f=()=>u,h=D=>{u=D},{isSubmitting:p,isValidating:m,data:b,errors:w,warnings:A,touched:T,isValid:S,isDirty:_,cleanup:C,start:L,validateErrors:N,validateWarnings:F,interacted:Y}=MC(t.storeFactory,e),re=b.update,he=b.set,oe=D=>re(Z=>wi(tu(D(Z),e.transform))),X=D=>he(wi(tu(D,e.transform)));b.update=oe,b.set=X;const j=OC({extender:c,config:e,addValidator:o,addTransformer:a,validateErrors:N,validateWarnings:F,_getCurrentExtenders:f,stores:{data:b,errors:w,warnings:A,touched:T,isValid:S,isValidating:m,isSubmitting:p,isDirty:_,interacted:Y}}),{createSubmitHandler:ne,handleSubmit:$e}=j.public;u=c.map(D=>D({stage:"SETUP",errors:w,warnings:A,touched:T,data:b,isDirty:_,isValid:S,isValidating:m,isSubmitting:p,interacted:Y,config:e,addValidator:o,addTransformer:a,setFields:j.public.setFields,reset:j.public.reset,validate:j.public.validate,handleSubmit:$e,createSubmitHandler:ne}));const E=Object.assign({config:e,stores:{data:b,touched:T,errors:w,warnings:A,isSubmitting:p,isValidating:m,isValid:S,isDirty:_,interacted:Y},createSubmitHandler:ne,handleSubmit:$e,helpers:Object.assign(Object.assign({},j.public),{addTransformer:a,addValidator:o}),extender:c,_getCurrentExtenders:f,_setCurrentExtenders:h},j.private),{form:I}=EC(E);return Object.assign({data:b,errors:w,warnings:A,touched:T,isValid:S,isSubmitting:p,isValidating:m,isDirty:_,interacted:Y,form:I,cleanup:C,startStores:L},j.public)}function NC(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n}function FC(e){const t={},n={};function i(o){if(!o)return e();if(!t[o.toString()]){const c=J(Yh(xe(e),o));n[o.toString()]=c,t[o.toString()]=o}const[a]=n[o.toString()];return a()}return Re(()=>{const o=e(),a=Object.keys(t);for(const c of a){const u=t[c],f=Yh(o,u),[h,p]=n[u.toString()];nu(f,xe(h))||p(f)}}),i}function UC(e){return function(n){return Tn(i=>(Re(()=>n(e())),i))}}const BC=e=>{const[t,n]=J(e);function i(u){n(()=>u)}function o(u){n(u)}const a=FC(t),c=UC(t);return a.subscribe=c,a.set=i,a.update=o,a};function zC(e){const t=$C(e??{},{storeFactory:BC}),{form:n,cleanup:i,startStores:o,data:a,errors:c,warnings:u,touched:f}=t,h=NC(t,["form","cleanup","startStores","data","errors","warnings","touched"]);let p=null;const m=()=>p==null?void 0:p(),[b,w]=J(null);Re(()=>{const T=b();T&&(m(),p=n(T).destroy)});const A=T=>(w(T),{destroy:m});return Xe(m),Xe(i),Object.assign(Object.assign({},h),{data:a,errors:c,warnings:u,touched:f,form:A})}function WC(e){function t(n){return n.issues.reduce((i,o)=>o.path?ws(i,o.path.join("."),a=>!a||!Array.isArray(a)?[o.message]:[...a,o.message]):i,{})}return async function(i){try{await e.parseAsync(i)}catch(o){return t(o)}}}function jC({schema:e,level:t="error"}){return function(i){if(i.stage!=="SETUP")return{};const o=WC(e);return i.addValidator(o,{level:t}),{}}}/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const HC={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}},Sa=Symbol("hyper-element");function ZC(e){function t(){let n=[].slice.call(arguments),i,o=[],a=!1;for(;Array.isArray(n[0]);)n=n[0];n[0][Sa]&&n.unshift(t.Fragment),typeof n[0]=="string"&&h(n);const c=()=>{for(;n.length;)u(n.shift());return i instanceof Element&&o.length&&i.classList.add(...o),i};return c[Sa]=!0,c;function u(p){const m=typeof p;if(p!=null){if(m==="string")i?i.appendChild(document.createTextNode(p)):f(p);else if(m==="number"||m==="boolean"||m==="bigint"||m==="symbol"||p instanceof Date||p instanceof RegExp)i.appendChild(document.createTextNode(p.toString()));else if(Array.isArray(p))for(let b=0;b<p.length;b++)u(p[b]);else if(p instanceof Element)e.insert(i,p,a?null:void 0);else if(m==="object"){let b=!1;const w=Object.getOwnPropertyDescriptors(p);for(const A in w){if(A==="class"&&o.length!==0){const T=o.join(" "),S=typeof w.class.value=="function"?()=>T+" "+w.class.value():T+" "+p.class;Object.defineProperty(p,"class",{...w[A],value:S}),o=[]}A!=="ref"&&A.slice(0,2)!=="on"&&typeof w[A].value=="function"?(e.dynamicProperty(p,A),b=!0):w[A].get&&(b=!0)}b?e.spread(i,p,i instanceof SVGElement,!!n.length):e.assign(i,p,i instanceof SVGElement,!!n.length)}else if(m==="function")if(i){for(;p[Sa];)p=p();e.insert(i,p,a?null:void 0)}else{let b,w=n[0];(w==null||typeof w=="object"&&!Array.isArray(w)&&!(w instanceof Element))&&(b=n.shift()),b||(b={}),n.length&&(b.children=n.length>1?n:n[0]);const A=Object.getOwnPropertyDescriptors(b);for(const T in A)if(Array.isArray(A[T].value)){const S=A[T].value;b[T]=()=>{for(let _=0;_<S.length;_++)for(;S[_][Sa];)S[_]=S[_]();return S},e.dynamicProperty(b,T)}else typeof A[T].value=="function"&&!A[T].value.length&&e.dynamicProperty(b,T);i=e.createComponent(p,b),n=[]}}}function f(p){const m=p.split(/([\.#]?[^\s#.]+)/);/^\.|#/.test(m[1])&&(i=document.createElement("div"));for(let b=0;b<m.length;b++){const w=m[b],A=w.substring(1,w.length);w&&(i?w[0]==="."?o.push(A):w[0]==="#"&&i.setAttribute("id",A):i=e.SVGElements.has(w)?document.createElementNS("http://www.w3.org/2000/svg",w):document.createElement(w))}}function h(p){for(let m=1;m<p.length;m++)if(typeof p[m]=="function"){a=!0;return}else Array.isArray(p[m])&&h(p[m])}}return t.Fragment=n=>n.children,t}const $c=ZC({spread:Wt,assign:Cp,insert:te,createComponent:B,dynamicProperty:w1,SVGElements:Ap});/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const hn=(e,t,n,i)=>{const o=a=>{const[c,u]=en(a,["color","size","stroke","title","children","class"]),f=HC[e],h={...f,width:()=>c.size!=null?c.size:f.width,height:()=>c.size!=null?c.size:f.height,title:()=>c.title!=null?c.title:void 0,...e==="filled"?{fill:()=>c.color!=null?c.color:"currentColor"}:{stroke:()=>c.color!=null?c.color:"currentColor","stroke-width":()=>c.stroke!=null?c.stroke:f["stroke-width"]},class:()=>`tabler-icon tabler-icon-${t} ${c.class!=null?c.class:""}`};return $c("svg",[h,u],[c.title&&$c("title",{},c.title),...i.map(([p,m])=>$c(p,m)),c.children])};return o.displayName=`${n}`,o};/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var qC=hn("outline","arrow-down","IconArrowDown",[["path",{d:"M12 5l0 14"}],["path",{d:"M18 13l-6 6"}],["path",{d:"M6 13l6 6"}]]);/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var GC=hn("outline","arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14"}],["path",{d:"M18 11l-6 -6"}],["path",{d:"M6 11l6 -6"}]]);/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var VC=hn("outline","file-stack","IconFileStack",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}],["path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}],["path",{d:"M5 21h14"}],["path",{d:"M5 18h14"}],["path",{d:"M5 15h14"}]]);/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var KC=hn("outline","globe","IconGlobe",[["path",{d:"M7 9a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"}],["path",{d:"M5.75 15a8.015 8.015 0 1 0 9.25 -13"}],["path",{d:"M11 17v4"}],["path",{d:"M7 21h8"}]]);/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var YC=hn("outline","home","IconHome",[["path",{d:"M5 12l-2 0l9 -9l9 9l-2 0"}],["path",{d:"M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7"}],["path",{d:"M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6"}]]);/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var XC=hn("outline","menu-order","IconMenuOrder",[["path",{d:"M4 10h16"}],["path",{d:"M4 14h16"}],["path",{d:"M9 18l3 3l3 -3"}],["path",{d:"M9 6l3 -3l3 3"}]]);/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var JC=hn("outline","menu","IconMenu",[["path",{d:"M4 8l16 0"}],["path",{d:"M4 16l16 0"}]]);/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var xg=hn("outline","network","IconNetwork",[["path",{d:"M6 9a6 6 0 1 0 12 0a6 6 0 0 0 -12 0"}],["path",{d:"M12 3c1.333 .333 2 2.333 2 6s-.667 5.667 -2 6"}],["path",{d:"M12 3c-1.333 .333 -2 2.333 -2 6s.667 5.667 2 6"}],["path",{d:"M6 9h12"}],["path",{d:"M3 20h7"}],["path",{d:"M14 20h7"}],["path",{d:"M10 20a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}],["path",{d:"M12 15v3"}]]);/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var QC=hn("outline","palette","IconPalette",[["path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25"}],["path",{d:"M8.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}],["path",{d:"M12.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}],["path",{d:"M16.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}]]);/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var eO=hn("outline","ruler","IconRuler",[["path",{d:"M5 4h14a1 1 0 0 1 1 1v5a1 1 0 0 1 -1 1h-7a1 1 0 0 0 -1 1v7a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1"}],["path",{d:"M4 8l2 0"}],["path",{d:"M4 12l3 0"}],["path",{d:"M4 16l2 0"}],["path",{d:"M8 4l0 2"}],["path",{d:"M12 4l0 3"}],["path",{d:"M16 4l0 2"}]]);/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var tO=hn("outline","settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"}]]);/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var Sg=hn("outline","x","IconX",[["path",{d:"M18 6l-12 12"}],["path",{d:"M6 6l12 12"}]]);/**
|
||
* @license @tabler/icons-solidjs v3.26.0 - MIT
|
||
*
|
||
* This source code is licensed under the MIT license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var nO=hn("filled","circle-check-filled","IconCircleCheckFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z"}]]),rO=Me("<div>"),ul=class{constructor(e){Kt(this,"x");Kt(this,"y");Kt(this,"width");Kt(this,"height");this.x=Math.floor(e.x),this.y=Math.floor(e.y),this.width=Math.floor(e.width),this.height=Math.floor(e.height)}get rect(){return{x:this.x,y:this.y,width:this.width,height:this.height}}get left(){return this.x}get top(){return this.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}get center(){return{x:this.x+this.width*.5,y:this.y+this.height*.5}}get corners(){return{topLeft:{x:this.left,y:this.top},topRight:{x:this.right,y:this.top},bottomRight:{x:this.left,y:this.bottom},bottomLeft:{x:this.right,y:this.bottom}}}},ss=e=>{let t=new ul(e.getBoundingClientRect());const{transform:n}=getComputedStyle(e);return n&&(t=iO(t,n)),t},iO=(e,t)=>{let n,i;if(t.startsWith("matrix3d(")){const o=t.slice(9,-1).split(/, /);n=+o[12],i=+o[13]}else if(t.startsWith("matrix(")){const o=t.slice(7,-1).split(/, /);n=+o[4],i=+o[5]}else n=0,i=0;return new ul({...e,x:e.x-n,y:e.y-i})},Nn=()=>({x:0,y:0}),Su=(e,t)=>e.x===t.x&&e.y===t.y,Nc=(e,t)=>new ul({...e,x:e.x+t.x,y:e.y+t.y}),sO=(e,t)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)),oO=(e,t)=>{const n=Math.max(e.top,t.top),i=Math.max(e.left,t.left),o=Math.min(e.right,t.right),a=Math.min(e.bottom,t.bottom),c=o-i,u=a-n;if(i<o&&n<a){const f=e.width*e.height,h=t.width*t.height,p=c*u;return p/(f+h-p)}return 0},Fc=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,aO=(e,t,n)=>{const i=e.transformed.center,o={distance:1/0,droppable:null};for(const a of t){const c=sO(i,a.layout.center);c<o.distance?(o.distance=c,o.droppable=a):c===o.distance&&a.id===n.activeDroppableId&&(o.droppable=a)}return o.droppable},lO=(e,t,n)=>{const i=e.transformed,o={ratio:0,droppable:null};for(const a of t){const c=oO(i,a.layout);c>o.ratio?(o.ratio=c,o.droppable=a):c>0&&c===o.ratio&&a.id===n.activeDroppableId&&(o.droppable=a)}return o.droppable},Ag=sr(),cO=e=>{const t=qe({collisionDetector:lO},e),[n,i]=yu({draggables:{},droppables:{},sensors:{},active:{draggableId:null,get draggable(){return n.active.draggableId!==null?n.draggables[n.active.draggableId]:null},droppableId:null,get droppable(){return n.active.droppableId!==null?n.droppables[n.active.droppableId]:null},sensorId:null,get sensor(){return n.active.sensorId!==null?n.sensors[n.active.sensorId]:null},overlay:null}}),o=(E,I,D)=>{E.substring(0,E.length-1),xe(()=>n[E][I])&&i(E,I,"transformers",D.id,D)},a=(E,I,D)=>{E.substring(0,E.length-1),xe(()=>n[E][I])&&xe(()=>n[E][I].transformers[D])&&i(E,I,"transformers",D,void 0)},c=({id:E,node:I,layout:D,data:Z})=>{const M=n.draggables[E],R={id:E,node:I,layout:D,data:Z,_pendingCleanup:!1};let z;if(!M)Object.defineProperties(R,{transformers:{enumerable:!0,configurable:!0,writable:!0,value:{}},transform:{enumerable:!0,configurable:!0,get:()=>{if(n.active.overlay)return Nn();const q=Object.values(n.draggables[E].transformers);return q.sort((ce,ye)=>ce.order-ye.order),q.reduce((ce,ye)=>ye.callback(ce),Nn())}},transformed:{enumerable:!0,configurable:!0,get:()=>Nc(n.draggables[E].layout,n.draggables[E].transform)}});else if(n.active.draggableId===E&&!n.active.overlay){const q={x:M.layout.x-D.x,y:M.layout.y-D.y},ce="addDraggable-existing-offset",ye=M.transformers[ce],Ce=ye?ye.callback(q):q;z={id:ce,order:100,callback:Ue=>({x:Ue.x+Ce.x,y:Ue.y+Ce.y})},j(()=>a("draggables",E,ce))}An(()=>{i("draggables",E,R),z&&o("draggables",E,z)}),n.active.draggable&&N()},u=E=>{xe(()=>n.draggables[E])&&(i("draggables",E,"_pendingCleanup",!0),queueMicrotask(()=>f(E)))},f=E=>{var I;if((I=n.draggables[E])!=null&&I._pendingCleanup){const D=n.active.draggableId===E;An(()=>{D&&i("active","draggableId",null),i("draggables",E,void 0)})}},h=({id:E,node:I,layout:D,data:Z})=>{const M=n.droppables[E],R={id:E,node:I,layout:D,data:Z,_pendingCleanup:!1};M||Object.defineProperties(R,{transformers:{enumerable:!0,configurable:!0,writable:!0,value:{}},transform:{enumerable:!0,configurable:!0,get:()=>{const z=Object.values(n.droppables[E].transformers);return z.sort((q,ce)=>q.order-ce.order),z.reduce((q,ce)=>ce.callback(q),Nn())}},transformed:{enumerable:!0,configurable:!0,get:()=>Nc(n.droppables[E].layout,n.droppables[E].transform)}}),i("droppables",E,R),n.active.draggable&&N()},p=E=>{xe(()=>n.droppables[E])&&(i("droppables",E,"_pendingCleanup",!0),queueMicrotask(()=>m(E)))},m=E=>{var I;if((I=n.droppables[E])!=null&&I._pendingCleanup){const D=n.active.droppableId===E;An(()=>{D&&i("active","droppableId",null),i("droppables",E,void 0)})}},b=({id:E,activators:I})=>{i("sensors",E,{id:E,activators:I,coordinates:{origin:{x:0,y:0},current:{x:0,y:0},get delta(){return{x:n.sensors[E].coordinates.current.x-n.sensors[E].coordinates.origin.x,y:n.sensors[E].coordinates.current.y-n.sensors[E].coordinates.origin.y}}}})},w=E=>{if(!xe(()=>n.sensors[E]))return;const I=n.active.sensorId===E;An(()=>{I&&i("active","sensorId",null),i("sensors",E,void 0)})},A=({node:E,layout:I})=>{const D=n.active.overlay,Z={node:E,layout:I};D||Object.defineProperties(Z,{id:{enumerable:!0,configurable:!0,get:()=>{var M;return(M=n.active.draggable)==null?void 0:M.id}},data:{enumerable:!0,configurable:!0,get:()=>{var M;return(M=n.active.draggable)==null?void 0:M.data}},transformers:{enumerable:!0,configurable:!0,get:()=>Object.fromEntries(Object.entries(n.active.draggable?n.active.draggable.transformers:{}).filter(([M])=>M!=="addDraggable-existing-offset"))},transform:{enumerable:!0,configurable:!0,get:()=>{const M=Object.values(n.active.overlay?n.active.overlay.transformers:[]);return M.sort((R,z)=>R.order-z.order),M.reduce((R,z)=>z.callback(R),Nn())}},transformed:{enumerable:!0,configurable:!0,get:()=>n.active.overlay?Nc(n.active.overlay.layout,n.active.overlay.transform):new ul({x:0,y:0,width:0,height:0})}}),i("active","overlay",Z)},T=()=>i("active","overlay",null),S=(E,I)=>{An(()=>{i("sensors",E,"coordinates",{origin:{...I},current:{...I}}),i("active","sensorId",E)})},_=E=>{const I=n.active.sensorId;I&&i("sensors",I,"coordinates","current",{...E})},C=()=>i("active","sensorId",null),L=(E,I)=>{const D={};for(const M of Object.values(n.sensors))if(M)for(const[R,z]of Object.entries(M.activators))D[R]??(D[R]=[]),D[R].push({sensor:M,activator:z});const Z={};for(const M in D){let R=M;I&&(R=`on${M}`),Z[R]=z=>{for(const{activator:q}of D[M]){if(n.active.sensor)break;q(z,E)}}}return Z},N=()=>{let E=!1;const I=Object.values(n.draggables),D=Object.values(n.droppables),Z=n.active.overlay;return An(()=>{const M=new WeakMap;for(const R of I)if(R){const z=R.layout;M.has(R.node)||M.set(R.node,ss(R.node));const q=M.get(R.node);Fc(z,q)||(i("draggables",R.id,"layout",q),E=!0)}for(const R of D)if(R){const z=R.layout;M.has(R.node)||M.set(R.node,ss(R.node));const q=M.get(R.node);Fc(z,q)||(i("droppables",R.id,"layout",q),E=!0)}if(Z){const R=Z.layout,z=ss(Z.node);Fc(R,z)||(i("active","overlay","layout",z),E=!0)}}),E},F=()=>{const E=n.active.overlay??n.active.draggable;if(E){const I=t.collisionDetector(E,Object.values(n.droppables),{activeDroppableId:n.active.droppableId}),D=I?I.id:null;n.active.droppableId!==D&&i("active","droppableId",D)}},Y=E=>{const I={id:"sensorMove",order:0,callback:D=>n.active.sensor?{x:D.x+n.active.sensor.coordinates.delta.x,y:D.y+n.active.sensor.coordinates.delta.y}:D};N(),An(()=>{i("active","draggableId",E),o("draggables",E,I)}),F()},re=()=>{const E=xe(()=>n.active.draggableId);An(()=>{E!==null&&a("draggables",E,"sensorMove"),i("active",["draggableId","droppableId"],null)}),N()},he=E=>{Re(()=>{const I=n.active.draggable;I&&xe(()=>E({draggable:I}))})},oe=E=>{Re(()=>{const I=n.active.draggable;if(I){const D=xe(()=>n.active.overlay);Object.values(D?D.transform:I.transform),xe(()=>E({draggable:I,overlay:D}))}})},X=E=>{Re(()=>{const I=n.active.draggable,D=n.active.droppable;I&&xe(()=>E({draggable:I,droppable:D,overlay:n.active.overlay}))})},j=E=>{Re(({previousDraggable:I,previousDroppable:D,previousOverlay:Z})=>{const M=n.active.draggable,R=M?n.active.droppable:null,z=M?n.active.overlay:null;return!M&&I&&xe(()=>E({draggable:I,droppable:D,overlay:Z})),{previousDraggable:M,previousDroppable:R,previousOverlay:z}},{previousDraggable:null,previousDroppable:null,previousOverlay:null})};oe(()=>F()),t.onDragStart&&he(t.onDragStart),t.onDragMove&&oe(t.onDragMove),t.onDragOver&&X(t.onDragOver),t.onDragEnd&&j(t.onDragEnd);const $e=[n,{addTransformer:o,removeTransformer:a,addDraggable:c,removeDraggable:u,addDroppable:h,removeDroppable:p,addSensor:b,removeSensor:w,setOverlay:A,clearOverlay:T,recomputeLayouts:N,detectCollisions:F,draggableActivators:L,sensorStart:S,sensorMove:_,sensorEnd:C,dragStart:Y,dragEnd:re,onDragStart:he,onDragMove:oe,onDragOver:X,onDragEnd:j}];return B(Ag.Provider,{value:$e,get children(){return t.children}})},ki=()=>On(Ag)||null,uO=(e="pointer-sensor")=>{const[t,{addSensor:n,removeSensor:i,sensorStart:o,sensorMove:a,sensorEnd:c,dragStart:u,dragEnd:f}]=ki(),h=250,p=10;vs(()=>{n({id:e,activators:{pointerdown:T}})}),Xe(()=>{i(e)});const m=()=>t.active.sensorId===e,b={x:0,y:0};let w=null,A=null;const T=(F,Y)=>{F.button===0&&(document.addEventListener("pointermove",C),document.addEventListener("pointerup",L),A=Y,b.x=F.clientX,b.y=F.clientY,w=window.setTimeout(_,h))},S=()=>{w&&(clearTimeout(w),w=null),document.removeEventListener("pointermove",C),document.removeEventListener("pointerup",L),document.removeEventListener("selectionchange",N)},_=()=>{t.active.sensor?m()||S():(o(e,b),u(A),N(),document.addEventListener("selectionchange",N))},C=F=>{const Y={x:F.clientX,y:F.clientY};if(!t.active.sensor){const re={x:Y.x-b.x,y:Y.y-b.y};Math.sqrt(re.x**2+re.y**2)>p&&_()}m()&&(F.preventDefault(),a(Y))},L=F=>{S(),m()&&(F.preventDefault(),f(),c())},N=()=>{var F;(F=window.getSelection())==null||F.removeAllRanges()}},fO=e=>(uO(),de(()=>e.children)),yo=e=>({transform:`translate3d(${e.x}px, ${e.y}px, 0)`}),dO=(e,t={})=>{const[n,{addDraggable:i,removeDraggable:o,draggableActivators:a}]=ki(),[c,u]=J(null);vs(()=>{const m=c();m&&i({id:e,node:m,layout:ss(m),data:t})}),Xe(()=>o(e));const f=()=>n.active.draggableId===e,h=()=>{var m;return((m=n.draggables[e])==null?void 0:m.transform)||Nn()};return Object.defineProperties((m,b)=>{const w=b?b():{};Re(()=>{const A=c(),T=a(e);if(A)for(const S in T)A.addEventListener(S,T[S]);Xe(()=>{if(A)for(const S in T)A.removeEventListener(S,T[S])})}),u(m),w.skipTransform||Re(()=>{const A=h();if(Su(A,Nn()))m.style.removeProperty("transform");else{const T=yo(h());m.style.setProperty("transform",T.transform??null)}})},{ref:{enumerable:!0,value:u},isActiveDraggable:{enumerable:!0,get:f},dragActivators:{enumerable:!0,get:()=>a(e,!0)},transform:{enumerable:!0,get:h}})},hO=(e,t={})=>{const[n,{addDroppable:i,removeDroppable:o}]=ki(),[a,c]=J(null);vs(()=>{const p=a();p&&i({id:e,node:p,layout:ss(p),data:t})}),Xe(()=>o(e));const u=()=>n.active.droppableId===e,f=()=>{var p;return((p=n.droppables[e])==null?void 0:p.transform)||Nn()};return Object.defineProperties((p,m)=>{const b=m?m():{};c(p),b.skipTransform||Re(()=>{const w=f();if(Su(w,Nn()))p.style.removeProperty("transform");else{const A=yo(f());p.style.setProperty("transform",A.transform??null)}})},{ref:{enumerable:!0,value:c},isActiveDroppable:{enumerable:!0,get:u},transform:{enumerable:!0,get:f}})},pO=e=>{const[t,{onDragStart:n,onDragEnd:i,setOverlay:o,clearOverlay:a}]=ki();let c;n(({draggable:f})=>{o({node:f.node,layout:f.layout}),queueMicrotask(()=>{if(c){const h=ss(c),p={x:(f.layout.width-h.width)/2,y:(f.layout.height-h.height)/2};h.x+=p.x,h.y+=p.y,o({node:c,layout:h})}})}),i(()=>queueMicrotask(a));const u=()=>{const f=t.active.overlay,h=t.active.draggable;return!f||!h?{}:{position:"fixed",transition:"transform 0s",top:`${f.layout.top}px`,left:`${f.layout.left}px`,"min-width":`${h.layout.width}px`,"min-height":`${h.layout.height}px`,...yo(f.transform),...e.style}};return B(Ep,{get mount(){return document.body},get children(){return B(Qt,{get when(){return t.active.draggable},get children(){var f=rO(),h=c;return typeof h=="function"?ti(h,f):c=f,te(f,(()=>{var p=de(()=>typeof e.children=="function");return()=>p()?e.children(t.active.draggable):e.children})()),ze(p=>{var m=e.class,b=u();return m!==p.e&&er(f,p.e=m),p.t=Mn(f,b,p.t),p},{e:void 0,t:void 0}),f}})}})},gO=(e,t,n)=>{const i=e.slice();return i.splice(n,0,...i.splice(t,1)),i},Tg=sr(),mO=e=>{const[t]=ki(),[n,i]=yu({initialIds:[],sortedIds:[]}),o=u=>u>=0&&u<n.initialIds.length;Re(()=>{i("initialIds",[...e.ids]),i("sortedIds",[...e.ids])}),Re(()=>{t.active.draggableId&&t.active.droppableId?xe(()=>{const u=n.sortedIds.indexOf(t.active.draggableId),f=n.initialIds.indexOf(t.active.droppableId);if(!o(u)||!o(f))i("sortedIds",[...e.ids]);else if(u!==f){const h=gO(n.sortedIds,u,f);i("sortedIds",h)}}):i("sortedIds",[...e.ids])});const c=[n,{}];return B(Tg.Provider,{value:c,get children(){return e.children}})},vO=()=>On(Tg)||null,yO=(e,t)=>n=>{e(n),t(n)},bO=(e,t={})=>{const[n,{addTransformer:i,removeTransformer:o}]=ki(),[a]=vO(),c=dO(e,t),u=hO(e,t),f=yO(c.ref,u.ref),h=()=>a.initialIds.indexOf(e),p=()=>a.sortedIds.indexOf(e),m=S=>{var _;return((_=n.droppables[S])==null?void 0:_.layout)||null},b=()=>{const S=Nn(),_=h(),C=p();if(C!==_){const L=m(e),N=m(a.initialIds[C]);L&&N&&(S.x=N.x-L.x,S.y=N.y-L.y)}return S},w={id:"sortableOffset",order:100,callback:S=>{const _=b();return{x:S.x+_.x,y:S.y+_.y}}};vs(()=>i("droppables",e,w)),Xe(()=>o("droppables",e,w.id));const A=()=>{var S,_;return(e===n.active.draggableId&&!n.active.overlay?(S=n.draggables[e])==null?void 0:S.transform:(_=n.droppables[e])==null?void 0:_.transform)||Nn()};return Object.defineProperties(S=>{c(S,()=>({skipTransform:!0})),u(S,()=>({skipTransform:!0})),Re(()=>{const _=A();if(Su(_,Nn()))S.style.removeProperty("transform");else{const C=yo(A());S.style.setProperty("transform",C.transform??null)}})},{ref:{enumerable:!0,value:f},transform:{enumerable:!0,get:A},isActiveDraggable:{enumerable:!0,get:()=>c.isActiveDraggable},dragActivators:{enumerable:!0,get:()=>c.dragActivators},isActiveDroppable:{enumerable:!0,get:()=>u.isActiveDroppable}})},We;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const a={};for(const c of o)a[c]=c;return a},e.getValidEnumValues=o=>{const a=e.objectKeys(o).filter(u=>typeof o[o[u]]!="number"),c={};for(const u of a)c[u]=o[u];return e.objectValues(c)},e.objectValues=o=>e.objectKeys(o).map(function(a){return o[a]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const a=[];for(const c in o)Object.prototype.hasOwnProperty.call(o,c)&&a.push(c);return a},e.find=(o,a)=>{for(const c of o)if(a(c))return c},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function i(o,a=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(a)}e.joinValues=i,e.jsonStringifyReplacer=(o,a)=>typeof a=="bigint"?a.toString():a})(We||(We={}));var iu;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(iu||(iu={}));const ie=We.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xr=e=>{switch(typeof e){case"undefined":return ie.undefined;case"string":return ie.string;case"number":return isNaN(e)?ie.nan:ie.number;case"boolean":return ie.boolean;case"function":return ie.function;case"bigint":return ie.bigint;case"symbol":return ie.symbol;case"object":return Array.isArray(e)?ie.array:e===null?ie.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ie.promise:typeof Map<"u"&&e instanceof Map?ie.map:typeof Set<"u"&&e instanceof Set?ie.set:typeof Date<"u"&&e instanceof Date?ie.date:ie.object;default:return ie.unknown}},K=We.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),wO=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class un extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},i={_errors:[]},o=a=>{for(const c of a.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)i._errors.push(n(c));else{let u=i,f=0;for(;f<c.path.length;){const h=c.path[f];f===c.path.length-1?(u[h]=u[h]||{_errors:[]},u[h]._errors.push(n(c))):u[h]=u[h]||{_errors:[]},u=u[h],f++}}};return o(this),i}static assert(t){if(!(t instanceof un))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,We.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},i=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}}un.create=e=>new un(e);const fs=(e,t)=>{let n;switch(e.code){case K.invalid_type:e.received===ie.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,We.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${We.joinValues(e.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${We.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${We.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:n="Invalid function arguments";break;case K.invalid_return_type:n="Invalid function return type";break;case K.invalid_date:n="Invalid date";break;case K.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:We.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case K.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case K.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case K.custom:n="Invalid input";break;case K.invalid_intersection_types:n="Intersection results could not be merged";break;case K.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:n="Number must be finite";break;default:n=t.defaultError,We.assertNever(e)}return{message:n}};let Cg=fs;function _O(e){Cg=e}function Za(){return Cg}const qa=e=>{const{data:t,path:n,errorMaps:i,issueData:o}=e,a=[...n,...o.path||[]],c={...o,path:a};if(o.message!==void 0)return{...o,path:a,message:o.message};let u="";const f=i.filter(h=>!!h).slice().reverse();for(const h of f)u=h(c,{data:t,defaultError:u}).message;return{...o,path:a,message:u}},xO=[];function ee(e,t){const n=Za(),i=qa({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===fs?void 0:fs].filter(o=>!!o)});e.common.issues.push(i)}class $t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const i=[];for(const o of n){if(o.status==="aborted")return _e;o.status==="dirty"&&t.dirty(),i.push(o.value)}return{status:t.value,value:i}}static async mergeObjectAsync(t,n){const i=[];for(const o of n){const a=await o.key,c=await o.value;i.push({key:a,value:c})}return $t.mergeObjectSync(t,i)}static mergeObjectSync(t,n){const i={};for(const o of n){const{key:a,value:c}=o;if(a.status==="aborted"||c.status==="aborted")return _e;a.status==="dirty"&&t.dirty(),c.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(i[a.value]=c.value)}return{status:t.value,value:i}}}const _e=Object.freeze({status:"aborted"}),Ji=e=>({status:"dirty",value:e}),jt=e=>({status:"valid",value:e}),su=e=>e.status==="aborted",ou=e=>e.status==="dirty",_i=e=>e.status==="valid",eo=e=>typeof Promise<"u"&&e instanceof Promise;function Ga(e,t,n,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Og(e,t,n,i,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var fe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(fe||(fe={}));var qs,Gs;class nr{constructor(t,n,i,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=i,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Qh=(e,t)=>{if(_i(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new un(e.common.issues);return this._error=n,this._error}}};function Te(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:i,description:o}=e;if(t&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(c,u)=>{var f,h;const{message:p}=e;return c.code==="invalid_enum_value"?{message:p??u.defaultError}:typeof u.data>"u"?{message:(f=p??i)!==null&&f!==void 0?f:u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:(h=p??n)!==null&&h!==void 0?h:u.defaultError}},description:o}}class De{get description(){return this._def.description}_getType(t){return xr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:xr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $t,ctx:{common:t.parent.common,data:t.data,parsedType:xr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(eo(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const i=this.safeParse(t,n);if(i.success)return i.data;throw i.error}safeParse(t,n){var i;const o={common:{issues:[],async:(i=n==null?void 0:n.async)!==null&&i!==void 0?i:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:xr(t)},a=this._parseSync({data:t,path:o.path,parent:o});return Qh(o,a)}"~validate"(t){var n,i;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:xr(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:o});return _i(a)?{value:a.value}:{issues:o.common.issues}}catch(a){!((i=(n=a==null?void 0:a.message)===null||n===void 0?void 0:n.toLowerCase())===null||i===void 0)&&i.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(a=>_i(a)?{value:a.value}:{issues:o.common.issues})}async parseAsync(t,n){const i=await this.safeParseAsync(t,n);if(i.success)return i.data;throw i.error}async safeParseAsync(t,n){const i={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:xr(t)},o=this._parse({data:t,path:i.path,parent:i}),a=await(eo(o)?o:Promise.resolve(o));return Qh(i,a)}refine(t,n){const i=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,a)=>{const c=t(o),u=()=>a.addIssue({code:K.custom,...i(o)});return typeof Promise<"u"&&c instanceof Promise?c.then(f=>f?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(t,n){return this._refinement((i,o)=>t(i)?!0:(o.addIssue(typeof n=="function"?n(i,o):n),!1))}_refinement(t){return new jn({schema:this,typeName:we.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Jn.create(this,this._def)}nullable(){return Yr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Un.create(this)}promise(){return hs.create(this,this._def)}or(t){return io.create([this,t],this._def)}and(t){return so.create(this,t,this._def)}transform(t){return new jn({...Te(this._def),schema:this,typeName:we.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new uo({...Te(this._def),innerType:this,defaultValue:n,typeName:we.ZodDefault})}brand(){return new Au({typeName:we.ZodBranded,type:this,...Te(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new fo({...Te(this._def),innerType:this,catchValue:n,typeName:we.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return bo.create(this,t)}readonly(){return ho.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const SO=/^c[^\s-]{8,}$/i,AO=/^[0-9a-z]+$/,TO=/^[0-9A-HJKMNP-TV-Z]{26}$/i,CO=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,OO=/^[a-z0-9_-]{21}$/i,EO=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,kO=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,PO=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,DO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Uc;const IO=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,RO=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,LO=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,MO=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$O=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,NO=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Eg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",FO=new RegExp(`^${Eg}$`);function kg(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function UO(e){return new RegExp(`^${kg(e)}$`)}function Pg(e){let t=`${Eg}T${kg(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function BO(e,t){return!!((t==="v4"||!t)&&IO.test(e)||(t==="v6"||!t)&&LO.test(e))}function zO(e,t){if(!EO.test(e))return!1;try{const[n]=e.split("."),i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(i));return!(typeof o!="object"||o===null||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function WO(e,t){return!!((t==="v4"||!t)&&RO.test(e)||(t==="v6"||!t)&&MO.test(e))}class Fn extends De{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ie.string){const a=this._getOrReturnCtx(t);return ee(a,{code:K.invalid_type,expected:ie.string,received:a.parsedType}),_e}const i=new $t;let o;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:K.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="max")t.data.length>a.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:K.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="length"){const c=t.data.length>a.value,u=t.data.length<a.value;(c||u)&&(o=this._getOrReturnCtx(t,o),c?ee(o,{code:K.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):u&&ee(o,{code:K.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),i.dirty())}else if(a.kind==="email")PO.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"email",code:K.invalid_string,message:a.message}),i.dirty());else if(a.kind==="emoji")Uc||(Uc=new RegExp(DO,"u")),Uc.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"emoji",code:K.invalid_string,message:a.message}),i.dirty());else if(a.kind==="uuid")CO.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"uuid",code:K.invalid_string,message:a.message}),i.dirty());else if(a.kind==="nanoid")OO.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"nanoid",code:K.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid")SO.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid",code:K.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid2")AO.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid2",code:K.invalid_string,message:a.message}),i.dirty());else if(a.kind==="ulid")TO.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ulid",code:K.invalid_string,message:a.message}),i.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ee(o,{validation:"url",code:K.invalid_string,message:a.message}),i.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"regex",code:K.invalid_string,message:a.message}),i.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(o=this._getOrReturnCtx(t,o),ee(o,{code:K.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),i.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:K.invalid_string,validation:{startsWith:a.value},message:a.message}),i.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:K.invalid_string,validation:{endsWith:a.value},message:a.message}),i.dirty()):a.kind==="datetime"?Pg(a).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:K.invalid_string,validation:"datetime",message:a.message}),i.dirty()):a.kind==="date"?FO.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:K.invalid_string,validation:"date",message:a.message}),i.dirty()):a.kind==="time"?UO(a).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:K.invalid_string,validation:"time",message:a.message}),i.dirty()):a.kind==="duration"?kO.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"duration",code:K.invalid_string,message:a.message}),i.dirty()):a.kind==="ip"?BO(t.data,a.version)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ip",code:K.invalid_string,message:a.message}),i.dirty()):a.kind==="jwt"?zO(t.data,a.alg)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"jwt",code:K.invalid_string,message:a.message}),i.dirty()):a.kind==="cidr"?WO(t.data,a.version)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cidr",code:K.invalid_string,message:a.message}),i.dirty()):a.kind==="base64"?$O.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"base64",code:K.invalid_string,message:a.message}),i.dirty()):a.kind==="base64url"?NO.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"base64url",code:K.invalid_string,message:a.message}),i.dirty()):We.assertNever(a);return{status:i.value,value:t.data}}_regex(t,n,i){return this.refinement(o=>t.test(o),{validation:n,code:K.invalid_string,...fe.errToObj(i)})}_addCheck(t){return new Fn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...fe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...fe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...fe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...fe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...fe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...fe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...fe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...fe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...fe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...fe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...fe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...fe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...fe.errToObj(t)})}datetime(t){var n,i;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(i=t==null?void 0:t.local)!==null&&i!==void 0?i:!1,...fe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...fe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...fe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...fe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...fe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...fe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...fe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...fe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...fe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...fe.errToObj(n)})}nonempty(t){return this.min(1,fe.errToObj(t))}trim(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Fn.create=e=>{var t;return new Fn({checks:[],typeName:we.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Te(e)})};function jO(e,t){const n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,o=n>i?n:i,a=parseInt(e.toFixed(o).replace(".","")),c=parseInt(t.toFixed(o).replace(".",""));return a%c/Math.pow(10,o)}class Gr extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ie.number){const a=this._getOrReturnCtx(t);return ee(a,{code:K.invalid_type,expected:ie.number,received:a.parsedType}),_e}let i;const o=new $t;for(const a of this._def.checks)a.kind==="int"?We.isInteger(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{code:K.invalid_type,expected:"integer",received:"float",message:a.message}),o.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(i=this._getOrReturnCtx(t,i),ee(i,{code:K.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(i=this._getOrReturnCtx(t,i),ee(i,{code:K.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="multipleOf"?jO(t.data,a.value)!==0&&(i=this._getOrReturnCtx(t,i),ee(i,{code:K.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{code:K.not_finite,message:a.message}),o.dirty()):We.assertNever(a);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,i,o){return new Gr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:i,message:fe.toString(o)}]})}_addCheck(t){return new Gr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:fe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:fe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&We.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(t===null||i.value<t)&&(t=i.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Gr.create=e=>new Gr({checks:[],typeName:we.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Te(e)});class Vr extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ie.bigint)return this._getInvalidInput(t);let i;const o=new $t;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(i=this._getOrReturnCtx(t,i),ee(i,{code:K.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(i=this._getOrReturnCtx(t,i),ee(i,{code:K.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(i=this._getOrReturnCtx(t,i),ee(i,{code:K.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):We.assertNever(a);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ee(n,{code:K.invalid_type,expected:ie.bigint,received:n.parsedType}),_e}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,i,o){return new Vr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:i,message:fe.toString(o)}]})}_addCheck(t){return new Vr({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Vr.create=e=>{var t;return new Vr({checks:[],typeName:we.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Te(e)})};class to extends De{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ie.boolean){const i=this._getOrReturnCtx(t);return ee(i,{code:K.invalid_type,expected:ie.boolean,received:i.parsedType}),_e}return jt(t.data)}}to.create=e=>new to({typeName:we.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Te(e)});class xi extends De{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ie.date){const a=this._getOrReturnCtx(t);return ee(a,{code:K.invalid_type,expected:ie.date,received:a.parsedType}),_e}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return ee(a,{code:K.invalid_date}),_e}const i=new $t;let o;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:K.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),i.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:K.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),i.dirty()):We.assertNever(a);return{status:i.value,value:new Date(t.data.getTime())}}_addCheck(t){return new xi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:fe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:fe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}xi.create=e=>new xi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:we.ZodDate,...Te(e)});class Va extends De{_parse(t){if(this._getType(t)!==ie.symbol){const i=this._getOrReturnCtx(t);return ee(i,{code:K.invalid_type,expected:ie.symbol,received:i.parsedType}),_e}return jt(t.data)}}Va.create=e=>new Va({typeName:we.ZodSymbol,...Te(e)});class no extends De{_parse(t){if(this._getType(t)!==ie.undefined){const i=this._getOrReturnCtx(t);return ee(i,{code:K.invalid_type,expected:ie.undefined,received:i.parsedType}),_e}return jt(t.data)}}no.create=e=>new no({typeName:we.ZodUndefined,...Te(e)});class ro extends De{_parse(t){if(this._getType(t)!==ie.null){const i=this._getOrReturnCtx(t);return ee(i,{code:K.invalid_type,expected:ie.null,received:i.parsedType}),_e}return jt(t.data)}}ro.create=e=>new ro({typeName:we.ZodNull,...Te(e)});class ds extends De{constructor(){super(...arguments),this._any=!0}_parse(t){return jt(t.data)}}ds.create=e=>new ds({typeName:we.ZodAny,...Te(e)});class vi extends De{constructor(){super(...arguments),this._unknown=!0}_parse(t){return jt(t.data)}}vi.create=e=>new vi({typeName:we.ZodUnknown,...Te(e)});class Or extends De{_parse(t){const n=this._getOrReturnCtx(t);return ee(n,{code:K.invalid_type,expected:ie.never,received:n.parsedType}),_e}}Or.create=e=>new Or({typeName:we.ZodNever,...Te(e)});class Ka extends De{_parse(t){if(this._getType(t)!==ie.undefined){const i=this._getOrReturnCtx(t);return ee(i,{code:K.invalid_type,expected:ie.void,received:i.parsedType}),_e}return jt(t.data)}}Ka.create=e=>new Ka({typeName:we.ZodVoid,...Te(e)});class Un extends De{_parse(t){const{ctx:n,status:i}=this._processInputParams(t),o=this._def;if(n.parsedType!==ie.array)return ee(n,{code:K.invalid_type,expected:ie.array,received:n.parsedType}),_e;if(o.exactLength!==null){const c=n.data.length>o.exactLength.value,u=n.data.length<o.exactLength.value;(c||u)&&(ee(n,{code:c?K.too_big:K.too_small,minimum:u?o.exactLength.value:void 0,maximum:c?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),i.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ee(n,{code:K.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),i.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ee(n,{code:K.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((c,u)=>o.type._parseAsync(new nr(n,c,n.path,u)))).then(c=>$t.mergeArray(i,c));const a=[...n.data].map((c,u)=>o.type._parseSync(new nr(n,c,n.path,u)));return $t.mergeArray(i,a)}get element(){return this._def.type}min(t,n){return new Un({...this._def,minLength:{value:t,message:fe.toString(n)}})}max(t,n){return new Un({...this._def,maxLength:{value:t,message:fe.toString(n)}})}length(t,n){return new Un({...this._def,exactLength:{value:t,message:fe.toString(n)}})}nonempty(t){return this.min(1,t)}}Un.create=(e,t)=>new Un({type:e,minLength:null,maxLength:null,exactLength:null,typeName:we.ZodArray,...Te(t)});function Xi(e){if(e instanceof ct){const t={};for(const n in e.shape){const i=e.shape[n];t[n]=Jn.create(Xi(i))}return new ct({...e._def,shape:()=>t})}else return e instanceof Un?new Un({...e._def,type:Xi(e.element)}):e instanceof Jn?Jn.create(Xi(e.unwrap())):e instanceof Yr?Yr.create(Xi(e.unwrap())):e instanceof rr?rr.create(e.items.map(t=>Xi(t))):e}class ct extends De{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=We.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ie.object){const h=this._getOrReturnCtx(t);return ee(h,{code:K.invalid_type,expected:ie.object,received:h.parsedType}),_e}const{status:i,ctx:o}=this._processInputParams(t),{shape:a,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof Or&&this._def.unknownKeys==="strip"))for(const h in o.data)c.includes(h)||u.push(h);const f=[];for(const h of c){const p=a[h],m=o.data[h];f.push({key:{status:"valid",value:h},value:p._parse(new nr(o,m,o.path,h)),alwaysSet:h in o.data})}if(this._def.catchall instanceof Or){const h=this._def.unknownKeys;if(h==="passthrough")for(const p of u)f.push({key:{status:"valid",value:p},value:{status:"valid",value:o.data[p]}});else if(h==="strict")u.length>0&&(ee(o,{code:K.unrecognized_keys,keys:u}),i.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const p of u){const m=o.data[p];f.push({key:{status:"valid",value:p},value:h._parse(new nr(o,m,o.path,p)),alwaysSet:p in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const h=[];for(const p of f){const m=await p.key,b=await p.value;h.push({key:m,value:b,alwaysSet:p.alwaysSet})}return h}).then(h=>$t.mergeObjectSync(i,h)):$t.mergeObjectSync(i,f)}get shape(){return this._def.shape()}strict(t){return fe.errToObj,new ct({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,i)=>{var o,a,c,u;const f=(c=(a=(o=this._def).errorMap)===null||a===void 0?void 0:a.call(o,n,i).message)!==null&&c!==void 0?c:i.defaultError;return n.code==="unrecognized_keys"?{message:(u=fe.errToObj(t).message)!==null&&u!==void 0?u:f}:{message:f}}}:{}})}strip(){return new ct({...this._def,unknownKeys:"strip"})}passthrough(){return new ct({...this._def,unknownKeys:"passthrough"})}extend(t){return new ct({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ct({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:we.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ct({...this._def,catchall:t})}pick(t){const n={};return We.objectKeys(t).forEach(i=>{t[i]&&this.shape[i]&&(n[i]=this.shape[i])}),new ct({...this._def,shape:()=>n})}omit(t){const n={};return We.objectKeys(this.shape).forEach(i=>{t[i]||(n[i]=this.shape[i])}),new ct({...this._def,shape:()=>n})}deepPartial(){return Xi(this)}partial(t){const n={};return We.objectKeys(this.shape).forEach(i=>{const o=this.shape[i];t&&!t[i]?n[i]=o:n[i]=o.optional()}),new ct({...this._def,shape:()=>n})}required(t){const n={};return We.objectKeys(this.shape).forEach(i=>{if(t&&!t[i])n[i]=this.shape[i];else{let a=this.shape[i];for(;a instanceof Jn;)a=a._def.innerType;n[i]=a}}),new ct({...this._def,shape:()=>n})}keyof(){return Dg(We.objectKeys(this.shape))}}ct.create=(e,t)=>new ct({shape:()=>e,unknownKeys:"strip",catchall:Or.create(),typeName:we.ZodObject,...Te(t)});ct.strictCreate=(e,t)=>new ct({shape:()=>e,unknownKeys:"strict",catchall:Or.create(),typeName:we.ZodObject,...Te(t)});ct.lazycreate=(e,t)=>new ct({shape:e,unknownKeys:"strip",catchall:Or.create(),typeName:we.ZodObject,...Te(t)});class io extends De{_parse(t){const{ctx:n}=this._processInputParams(t),i=this._def.options;function o(a){for(const u of a)if(u.result.status==="valid")return u.result;for(const u of a)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const c=a.map(u=>new un(u.ctx.common.issues));return ee(n,{code:K.invalid_union,unionErrors:c}),_e}if(n.common.async)return Promise.all(i.map(async a=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(o);{let a;const c=[];for(const f of i){const h={...n,common:{...n.common,issues:[]},parent:null},p=f._parseSync({data:n.data,path:n.path,parent:h});if(p.status==="valid")return p;p.status==="dirty"&&!a&&(a={result:p,ctx:h}),h.common.issues.length&&c.push(h.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const u=c.map(f=>new un(f));return ee(n,{code:K.invalid_union,unionErrors:u}),_e}}get options(){return this._def.options}}io.create=(e,t)=>new io({options:e,typeName:we.ZodUnion,...Te(t)});const yr=e=>e instanceof ao?yr(e.schema):e instanceof jn?yr(e.innerType()):e instanceof lo?[e.value]:e instanceof Kr?e.options:e instanceof co?We.objectValues(e.enum):e instanceof uo?yr(e._def.innerType):e instanceof no?[void 0]:e instanceof ro?[null]:e instanceof Jn?[void 0,...yr(e.unwrap())]:e instanceof Yr?[null,...yr(e.unwrap())]:e instanceof Au||e instanceof ho?yr(e.unwrap()):e instanceof fo?yr(e._def.innerType):[];class fl extends De{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ie.object)return ee(n,{code:K.invalid_type,expected:ie.object,received:n.parsedType}),_e;const i=this.discriminator,o=n.data[i],a=this.optionsMap.get(o);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(ee(n,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),_e)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,i){const o=new Map;for(const a of n){const c=yr(a.shape[t]);if(!c.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const u of c){if(o.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);o.set(u,a)}}return new fl({typeName:we.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Te(i)})}}function au(e,t){const n=xr(e),i=xr(t);if(e===t)return{valid:!0,data:e};if(n===ie.object&&i===ie.object){const o=We.objectKeys(t),a=We.objectKeys(e).filter(u=>o.indexOf(u)!==-1),c={...e,...t};for(const u of a){const f=au(e[u],t[u]);if(!f.valid)return{valid:!1};c[u]=f.data}return{valid:!0,data:c}}else if(n===ie.array&&i===ie.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let a=0;a<e.length;a++){const c=e[a],u=t[a],f=au(c,u);if(!f.valid)return{valid:!1};o.push(f.data)}return{valid:!0,data:o}}else return n===ie.date&&i===ie.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class so extends De{_parse(t){const{status:n,ctx:i}=this._processInputParams(t),o=(a,c)=>{if(su(a)||su(c))return _e;const u=au(a.value,c.value);return u.valid?((ou(a)||ou(c))&&n.dirty(),{status:n.value,value:u.data}):(ee(i,{code:K.invalid_intersection_types}),_e)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([a,c])=>o(a,c)):o(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}so.create=(e,t,n)=>new so({left:e,right:t,typeName:we.ZodIntersection,...Te(n)});class rr extends De{_parse(t){const{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==ie.array)return ee(i,{code:K.invalid_type,expected:ie.array,received:i.parsedType}),_e;if(i.data.length<this._def.items.length)return ee(i,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_e;!this._def.rest&&i.data.length>this._def.items.length&&(ee(i,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...i.data].map((c,u)=>{const f=this._def.items[u]||this._def.rest;return f?f._parse(new nr(i,c,i.path,u)):null}).filter(c=>!!c);return i.common.async?Promise.all(a).then(c=>$t.mergeArray(n,c)):$t.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new rr({...this._def,rest:t})}}rr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new rr({items:e,typeName:we.ZodTuple,rest:null,...Te(t)})};class oo extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==ie.object)return ee(i,{code:K.invalid_type,expected:ie.object,received:i.parsedType}),_e;const o=[],a=this._def.keyType,c=this._def.valueType;for(const u in i.data)o.push({key:a._parse(new nr(i,u,i.path,u)),value:c._parse(new nr(i,i.data[u],i.path,u)),alwaysSet:u in i.data});return i.common.async?$t.mergeObjectAsync(n,o):$t.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,i){return n instanceof De?new oo({keyType:t,valueType:n,typeName:we.ZodRecord,...Te(i)}):new oo({keyType:Fn.create(),valueType:t,typeName:we.ZodRecord,...Te(n)})}}class Ya extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==ie.map)return ee(i,{code:K.invalid_type,expected:ie.map,received:i.parsedType}),_e;const o=this._def.keyType,a=this._def.valueType,c=[...i.data.entries()].map(([u,f],h)=>({key:o._parse(new nr(i,u,i.path,[h,"key"])),value:a._parse(new nr(i,f,i.path,[h,"value"]))}));if(i.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const f of c){const h=await f.key,p=await f.value;if(h.status==="aborted"||p.status==="aborted")return _e;(h.status==="dirty"||p.status==="dirty")&&n.dirty(),u.set(h.value,p.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const f of c){const h=f.key,p=f.value;if(h.status==="aborted"||p.status==="aborted")return _e;(h.status==="dirty"||p.status==="dirty")&&n.dirty(),u.set(h.value,p.value)}return{status:n.value,value:u}}}}Ya.create=(e,t,n)=>new Ya({valueType:t,keyType:e,typeName:we.ZodMap,...Te(n)});class Si extends De{_parse(t){const{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==ie.set)return ee(i,{code:K.invalid_type,expected:ie.set,received:i.parsedType}),_e;const o=this._def;o.minSize!==null&&i.data.size<o.minSize.value&&(ee(i,{code:K.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&i.data.size>o.maxSize.value&&(ee(i,{code:K.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const a=this._def.valueType;function c(f){const h=new Set;for(const p of f){if(p.status==="aborted")return _e;p.status==="dirty"&&n.dirty(),h.add(p.value)}return{status:n.value,value:h}}const u=[...i.data.values()].map((f,h)=>a._parse(new nr(i,f,i.path,h)));return i.common.async?Promise.all(u).then(f=>c(f)):c(u)}min(t,n){return new Si({...this._def,minSize:{value:t,message:fe.toString(n)}})}max(t,n){return new Si({...this._def,maxSize:{value:t,message:fe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Si.create=(e,t)=>new Si({valueType:e,minSize:null,maxSize:null,typeName:we.ZodSet,...Te(t)});class os extends De{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ie.function)return ee(n,{code:K.invalid_type,expected:ie.function,received:n.parsedType}),_e;function i(u,f){return qa({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Za(),fs].filter(h=>!!h),issueData:{code:K.invalid_arguments,argumentsError:f}})}function o(u,f){return qa({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Za(),fs].filter(h=>!!h),issueData:{code:K.invalid_return_type,returnTypeError:f}})}const a={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof hs){const u=this;return jt(async function(...f){const h=new un([]),p=await u._def.args.parseAsync(f,a).catch(w=>{throw h.addIssue(i(f,w)),h}),m=await Reflect.apply(c,this,p);return await u._def.returns._def.type.parseAsync(m,a).catch(w=>{throw h.addIssue(o(m,w)),h})})}else{const u=this;return jt(function(...f){const h=u._def.args.safeParse(f,a);if(!h.success)throw new un([i(f,h.error)]);const p=Reflect.apply(c,this,h.data),m=u._def.returns.safeParse(p,a);if(!m.success)throw new un([o(p,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new os({...this._def,args:rr.create(t).rest(vi.create())})}returns(t){return new os({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,i){return new os({args:t||rr.create([]).rest(vi.create()),returns:n||vi.create(),typeName:we.ZodFunction,...Te(i)})}}class ao extends De{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ao.create=(e,t)=>new ao({getter:e,typeName:we.ZodLazy,...Te(t)});class lo extends De{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ee(n,{received:n.data,code:K.invalid_literal,expected:this._def.value}),_e}return{status:"valid",value:t.data}}get value(){return this._def.value}}lo.create=(e,t)=>new lo({value:e,typeName:we.ZodLiteral,...Te(t)});function Dg(e,t){return new Kr({values:e,typeName:we.ZodEnum,...Te(t)})}class Kr extends De{constructor(){super(...arguments),qs.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),i=this._def.values;return ee(n,{expected:We.joinValues(i),received:n.parsedType,code:K.invalid_type}),_e}if(Ga(this,qs)||Og(this,qs,new Set(this._def.values)),!Ga(this,qs).has(t.data)){const n=this._getOrReturnCtx(t),i=this._def.values;return ee(n,{received:n.data,code:K.invalid_enum_value,options:i}),_e}return jt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Kr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Kr.create(this.options.filter(i=>!t.includes(i)),{...this._def,...n})}}qs=new WeakMap;Kr.create=Dg;class co extends De{constructor(){super(...arguments),Gs.set(this,void 0)}_parse(t){const n=We.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==ie.string&&i.parsedType!==ie.number){const o=We.objectValues(n);return ee(i,{expected:We.joinValues(o),received:i.parsedType,code:K.invalid_type}),_e}if(Ga(this,Gs)||Og(this,Gs,new Set(We.getValidEnumValues(this._def.values))),!Ga(this,Gs).has(t.data)){const o=We.objectValues(n);return ee(i,{received:i.data,code:K.invalid_enum_value,options:o}),_e}return jt(t.data)}get enum(){return this._def.values}}Gs=new WeakMap;co.create=(e,t)=>new co({values:e,typeName:we.ZodNativeEnum,...Te(t)});class hs extends De{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ie.promise&&n.common.async===!1)return ee(n,{code:K.invalid_type,expected:ie.promise,received:n.parsedType}),_e;const i=n.parsedType===ie.promise?n.data:Promise.resolve(n.data);return jt(i.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}hs.create=(e,t)=>new hs({type:e,typeName:we.ZodPromise,...Te(t)});class jn extends De{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===we.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:i}=this._processInputParams(t),o=this._def.effect||null,a={addIssue:c=>{ee(i,c),c.fatal?n.abort():n.dirty()},get path(){return i.path}};if(a.addIssue=a.addIssue.bind(a),o.type==="preprocess"){const c=o.transform(i.data,a);if(i.common.async)return Promise.resolve(c).then(async u=>{if(n.value==="aborted")return _e;const f=await this._def.schema._parseAsync({data:u,path:i.path,parent:i});return f.status==="aborted"?_e:f.status==="dirty"||n.value==="dirty"?Ji(f.value):f});{if(n.value==="aborted")return _e;const u=this._def.schema._parseSync({data:c,path:i.path,parent:i});return u.status==="aborted"?_e:u.status==="dirty"||n.value==="dirty"?Ji(u.value):u}}if(o.type==="refinement"){const c=u=>{const f=o.refinement(u,a);if(i.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(i.common.async===!1){const u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return u.status==="aborted"?_e:(u.status==="dirty"&&n.dirty(),c(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(u=>u.status==="aborted"?_e:(u.status==="dirty"&&n.dirty(),c(u.value).then(()=>({status:n.value,value:u.value}))))}if(o.type==="transform")if(i.common.async===!1){const c=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!_i(c))return c;const u=o.transform(c.value,a);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(c=>_i(c)?Promise.resolve(o.transform(c.value,a)).then(u=>({status:n.value,value:u})):c);We.assertNever(o)}}jn.create=(e,t,n)=>new jn({schema:e,typeName:we.ZodEffects,effect:t,...Te(n)});jn.createWithPreprocess=(e,t,n)=>new jn({schema:t,effect:{type:"preprocess",transform:e},typeName:we.ZodEffects,...Te(n)});class Jn extends De{_parse(t){return this._getType(t)===ie.undefined?jt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jn.create=(e,t)=>new Jn({innerType:e,typeName:we.ZodOptional,...Te(t)});class Yr extends De{_parse(t){return this._getType(t)===ie.null?jt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Yr.create=(e,t)=>new Yr({innerType:e,typeName:we.ZodNullable,...Te(t)});class uo extends De{_parse(t){const{ctx:n}=this._processInputParams(t);let i=n.data;return n.parsedType===ie.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}uo.create=(e,t)=>new uo({innerType:e,typeName:we.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Te(t)});class fo extends De{_parse(t){const{ctx:n}=this._processInputParams(t),i={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return eo(o)?o.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new un(i.common.issues)},input:i.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new un(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}fo.create=(e,t)=>new fo({innerType:e,typeName:we.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Te(t)});class Xa extends De{_parse(t){if(this._getType(t)!==ie.nan){const i=this._getOrReturnCtx(t);return ee(i,{code:K.invalid_type,expected:ie.nan,received:i.parsedType}),_e}return{status:"valid",value:t.data}}}Xa.create=e=>new Xa({typeName:we.ZodNaN,...Te(e)});const HO=Symbol("zod_brand");class Au extends De{_parse(t){const{ctx:n}=this._processInputParams(t),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}}class bo extends De{_parse(t){const{status:n,ctx:i}=this._processInputParams(t);if(i.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?_e:a.status==="dirty"?(n.dirty(),Ji(a.value)):this._def.out._parseAsync({data:a.value,path:i.path,parent:i})})();{const o=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?_e:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:i.path,parent:i})}}static create(t,n){return new bo({in:t,out:n,typeName:we.ZodPipeline})}}class ho extends De{_parse(t){const n=this._def.innerType._parse(t),i=o=>(_i(o)&&(o.value=Object.freeze(o.value)),o);return eo(n)?n.then(o=>i(o)):i(n)}unwrap(){return this._def.innerType}}ho.create=(e,t)=>new ho({innerType:e,typeName:we.ZodReadonly,...Te(t)});function Ig(e,t={},n){return e?ds.create().superRefine((i,o)=>{var a,c;if(!e(i)){const u=typeof t=="function"?t(i):typeof t=="string"?{message:t}:t,f=(c=(a=u.fatal)!==null&&a!==void 0?a:n)!==null&&c!==void 0?c:!0,h=typeof u=="string"?{message:u}:u;o.addIssue({code:"custom",...h,fatal:f})}}):ds.create()}const ZO={object:ct.lazycreate};var we;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(we||(we={}));const qO=(e,t={message:`Input not instance of ${e.name}`})=>Ig(n=>n instanceof e,t),Rg=Fn.create,Lg=Gr.create,GO=Xa.create,VO=Vr.create,Mg=to.create,KO=xi.create,YO=Va.create,XO=no.create,JO=ro.create,QO=ds.create,eE=vi.create,tE=Or.create,nE=Ka.create,rE=Un.create,iE=ct.create,sE=ct.strictCreate,oE=io.create,aE=fl.create,lE=so.create,cE=rr.create,uE=oo.create,fE=Ya.create,dE=Si.create,hE=os.create,pE=ao.create,gE=lo.create,mE=Kr.create,vE=co.create,yE=hs.create,ep=jn.create,bE=Jn.create,wE=Yr.create,_E=jn.createWithPreprocess,xE=bo.create,SE=()=>Rg().optional(),AE=()=>Lg().optional(),TE=()=>Mg().optional(),CE={string:e=>Fn.create({...e,coerce:!0}),number:e=>Gr.create({...e,coerce:!0}),boolean:e=>to.create({...e,coerce:!0}),bigint:e=>Vr.create({...e,coerce:!0}),date:e=>xi.create({...e,coerce:!0})},OE=_e;var Bc=Object.freeze({__proto__:null,defaultErrorMap:fs,setErrorMap:_O,getErrorMap:Za,makeIssue:qa,EMPTY_PATH:xO,addIssueToContext:ee,ParseStatus:$t,INVALID:_e,DIRTY:Ji,OK:jt,isAborted:su,isDirty:ou,isValid:_i,isAsync:eo,get util(){return We},get objectUtil(){return iu},ZodParsedType:ie,getParsedType:xr,ZodType:De,datetimeRegex:Pg,ZodString:Fn,ZodNumber:Gr,ZodBigInt:Vr,ZodBoolean:to,ZodDate:xi,ZodSymbol:Va,ZodUndefined:no,ZodNull:ro,ZodAny:ds,ZodUnknown:vi,ZodNever:Or,ZodVoid:Ka,ZodArray:Un,ZodObject:ct,ZodUnion:io,ZodDiscriminatedUnion:fl,ZodIntersection:so,ZodTuple:rr,ZodRecord:oo,ZodMap:Ya,ZodSet:Si,ZodFunction:os,ZodLazy:ao,ZodLiteral:lo,ZodEnum:Kr,ZodNativeEnum:co,ZodPromise:hs,ZodEffects:jn,ZodTransformer:jn,ZodOptional:Jn,ZodNullable:Yr,ZodDefault:uo,ZodCatch:fo,ZodNaN:Xa,BRAND:HO,ZodBranded:Au,ZodPipeline:bo,ZodReadonly:ho,custom:Ig,Schema:De,ZodSchema:De,late:ZO,get ZodFirstPartyTypeKind(){return we},coerce:CE,any:QO,array:rE,bigint:VO,boolean:Mg,date:KO,discriminatedUnion:aE,effect:ep,enum:mE,function:hE,instanceof:qO,intersection:lE,lazy:pE,literal:gE,map:fE,nan:GO,nativeEnum:vE,never:tE,null:JO,nullable:wE,number:Lg,object:iE,oboolean:TE,onumber:AE,optional:bE,ostring:SE,pipeline:xE,preprocess:_E,promise:yE,record:uE,set:dE,strictObject:sE,string:Rg,symbol:YO,transformer:ep,tuple:cE,undefined:XO,union:oE,unknown:eE,void:nE,NEVER:OE,ZodIssueCode:K,quotelessJson:wO,ZodError:un});function $g(){let e=new Set;function t(o){return e.add(o),()=>e.delete(o)}let n=!1;function i(o,a){if(n)return!(n=!1);const c={to:o,options:a,defaultPrevented:!1,preventDefault:()=>c.defaultPrevented=!0};for(const u of e)u.listener({...c,from:u.location,retry:f=>{f&&(n=!0),u.navigate(o,{...a,resolve:!1})}});return!c.defaultPrevented}return{subscribe:t,confirm:i}}let lu;function Tu(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),lu=window.history.state._depth}Tu();function EE(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function kE(e,t){let n=!1;return()=>{const i=lu;Tu();const o=i==null?null:lu-i;if(n){n=!1;return}o&&t(o)?(n=!0,window.history.go(-o)):e()}}const PE=/^(?:[a-z0-9]+:)?\/\//i,DE=/^\/+|(\/)\/+$/g,Ng="http://sr";function yi(e,t=!1){const n=e.replace(DE,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function Pa(e,t,n){if(PE.test(t))return;const i=yi(e),o=n&&yi(n);let a="";return!o||t.startsWith("/")?a=i:o.toLowerCase().indexOf(i.toLowerCase())!==0?a=i+o:a=o,(a||"/")+yi(t,!a)}function IE(e,t){if(e==null)throw new Error(t);return e}function RE(e,t){return yi(e).replace(/\/*(\*.*)?$/g,"")+yi(t)}function Fg(e){const t={};return e.searchParams.forEach((n,i)=>{i in t?Array.isArray(t[i])?t[i].push(n):t[i]=[t[i],n]:t[i]=n}),t}function LE(e,t,n){const[i,o]=e.split("/*",2),a=i.split("/").filter(Boolean),c=a.length;return u=>{const f=u.split("/").filter(Boolean),h=f.length-c;if(h<0||h>0&&o===void 0&&!t)return null;const p={path:c?"":"/",params:{}},m=b=>n===void 0?void 0:n[b];for(let b=0;b<c;b++){const w=a[b],A=w[0]===":",T=A?f[b]:f[b].toLowerCase(),S=A?w.slice(1):w.toLowerCase();if(A&&zc(T,m(S)))p.params[S]=T;else if(A||!zc(T,S))return null;p.path+=`/${T}`}if(o){const b=h?f.slice(-h).join("/"):"";if(zc(b,m(o)))p.params[o]=b;else return null}return p}}function zc(e,t){const n=i=>i===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function ME(e){const[t,n]=e.pattern.split("/*",2),i=t.split("/").filter(Boolean);return i.reduce((o,a)=>o+(a.startsWith(":")?2:3),i.length-(n===void 0?0:1))}function Ug(e){const t=new Map,n=ls();return new Proxy({},{get(i,o){return t.has(o)||gu(n,()=>t.set(o,de(()=>e()[o]))),t.get(o)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())}})}function Bg(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),i=e.slice(t.index+t[0].length);const o=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(i);)o.push(n+=t[1]),i=i.slice(t[0].length);return Bg(i).reduce((a,c)=>[...a,...o.map(u=>u+c)],[])}const $E=100,zg=sr(),Cu=sr(),dl=()=>IE(On(zg),"<A> and 'use' router primitives can be only used inside a Route."),NE=()=>On(Cu)||dl().base,FE=e=>{const t=NE();return de(()=>t.resolvePath(e()))},UE=e=>{const t=dl();return de(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},JI=()=>dl().navigatorFactory(),Wg=()=>dl().location;function BE(e,t=""){const{component:n,preload:i,load:o,children:a,info:c}=e,u=!a||Array.isArray(a)&&!a.length,f={key:e,component:n,preload:i||o,info:c};return jg(e.path).reduce((h,p)=>{for(const m of Bg(p)){const b=RE(t,m);let w=u?b:b.split("/*",1)[0];w=w.split("/").map(A=>A.startsWith(":")||A.startsWith("*")?A:encodeURIComponent(A)).join("/"),h.push({...f,originalPath:p,pattern:w,matcher:LE(w,!u,e.matchFilters)})}return h},[])}function zE(e,t=0){return{routes:e,score:ME(e[e.length-1])*1e4-t,matcher(n){const i=[];for(let o=e.length-1;o>=0;o--){const a=e[o],c=a.matcher(n);if(!c)return null;i.unshift({...c,route:a})}return i}}}function jg(e){return Array.isArray(e)?e:[e]}function Hg(e,t="",n=[],i=[]){const o=jg(e);for(let a=0,c=o.length;a<c;a++){const u=o[a];if(u&&typeof u=="object"){u.hasOwnProperty("path")||(u.path="");const f=BE(u,t);for(const h of f){n.push(h);const p=Array.isArray(u.children)&&u.children.length===0;if(u.children&&!p)Hg(u.children,h.pattern,n,i);else{const m=zE([...n],i.length);i.push(m)}n.pop()}}}return n.length?i:i.sort((a,c)=>c.score-a.score)}function Wc(e,t){for(let n=0,i=e.length;n<i;n++){const o=e[n].matcher(t);if(o)return o}return[]}function WE(e,t,n){const i=new URL(Ng),o=de(p=>{const m=e();try{return new URL(m,i)}catch{return console.error(`Invalid path ${m}`),p}},i,{equals:(p,m)=>p.href===m.href}),a=de(()=>o().pathname),c=de(()=>o().search,!0),u=de(()=>o().hash),f=()=>"",h=rl(c,()=>Fg(o()));return{get pathname(){return a()},get search(){return c()},get hash(){return u()},get state(){return t()},get key(){return f()},query:n?n(h):Ug(h)}}let gi;function jE(){return gi}function HE(e,t,n,i={}){const{signal:[o,a],utils:c={}}=e,u=c.parsePath||(E=>E),f=c.renderPath||(E=>E),h=c.beforeLeave||$g(),p=Pa("",i.base||"");if(p===void 0)throw new Error(`${p} is not a valid base path`);p&&!o().value&&a({value:p,replace:!0,scroll:!1});const[m,b]=J(!1);let w;const A=(E,I)=>{I.value===T()&&I.state===_()||(w===void 0&&b(!0),gi=E,w=I,Kx(()=>{w===I&&(S(w.value),C(w.state),F[1](D=>D.filter(Z=>Z.pending)))}).finally(()=>{w===I&&An(()=>{gi=void 0,E==="navigate"&&ne(w),b(!1),w=void 0})}))},[T,S]=J(o().value),[_,C]=J(o().state),L=WE(T,_,c.queryWrapper),N=[],F=J([]),Y=de(()=>typeof i.transformUrl=="function"?Wc(t(),i.transformUrl(L.pathname)):Wc(t(),L.pathname)),re=()=>{const E=Y(),I={};for(let D=0;D<E.length;D++)Object.assign(I,E[D].params);return I},he=c.paramsWrapper?c.paramsWrapper(re,t):Ug(re),oe={pattern:p,path:()=>p,outlet:()=>null,resolvePath(E){return Pa(p,E)}};return ze(rl(o,E=>A("native",E),{defer:!0})),{base:oe,location:L,params:he,isRouting:m,renderPath:f,parsePath:u,navigatorFactory:j,matches:Y,beforeLeave:h,preloadRoute:$e,singleFlight:i.singleFlight===void 0?!0:i.singleFlight,submissions:F};function X(E,I,D){xe(()=>{if(typeof I=="number"){I&&(c.go?c.go(I):console.warn("Router integration does not support relative routing"));return}const Z=!I||I[0]==="?",{replace:M,resolve:R,scroll:z,state:q}={replace:!1,resolve:!Z,scroll:!0,...D},ce=R?E.resolvePath(I):Pa(Z&&L.pathname||"",I);if(ce===void 0)throw new Error(`Path '${I}' is not a routable path`);if(N.length>=$E)throw new Error("Too many redirects");const ye=T();(ce!==ye||q!==_())&&(T1||h.confirm(ce,D)&&(N.push({value:ye,replace:M,scroll:z,state:_()}),A("navigate",{value:ce,state:q})))})}function j(E){return E=E||On(Cu)||oe,(I,D)=>X(E,I,D)}function ne(E){const I=N[0];I&&(a({...E,replace:I.replace,scroll:I.scroll}),N.length=0)}function $e(E,I){const D=Wc(t(),E.pathname),Z=gi;gi="preload";for(let M in D){const{route:R,params:z}=D[M];R.component&&R.component.preload&&R.component.preload();const{preload:q}=R;I&&q&&gu(n(),()=>q({params:z,location:{pathname:E.pathname,search:E.search,hash:E.hash,query:Fg(E),state:null,key:""},intent:"preload"}))}gi=Z}}function ZE(e,t,n,i){const{base:o,location:a,params:c}=e,{pattern:u,component:f,preload:h}=i().route,p=de(()=>i().path);f&&f.preload&&f.preload();const m=h?h({params:c,location:a,intent:gi||"initial"}):void 0;return{parent:t,pattern:u,path:p,outlet:()=>f?B(f,{params:c,location:a,data:m,get children(){return n()}}):n(),resolvePath(w){return Pa(o.path(),w,p())}}}const qE=e=>t=>{const{base:n}=t,i=ei(()=>t.children),o=de(()=>Hg(i(),t.base||""));let a;const c=HE(e,o,()=>a,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(c),B(zg.Provider,{value:c,get children(){return B(GE,{routerState:c,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[de(()=>(a=ls())&&null),B(VE,{routerState:c,get branches(){return o()}})]}})}})};function GE(e){const t=e.routerState.location,n=e.routerState.params,i=de(()=>e.preload&&xe(()=>{e.preload({params:n,location:t,intent:jE()||"initial"})}));return B(Qt,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:o=>B(o,{params:n,location:t,get data(){return i()},get children(){return e.children}})})}function VE(e){const t=[];let n;const i=de(rl(e.routerState.matches,(o,a,c)=>{let u=a&&o.length===a.length;const f=[];for(let h=0,p=o.length;h<p;h++){const m=a&&a[h],b=o[h];c&&m&&b.route.key===m.route.key?f[h]=c[h]:(u=!1,t[h]&&t[h](),Tn(w=>{t[h]=w,f[h]=ZE(e.routerState,f[h-1]||e.routerState.base,tp(()=>i()[h+1]),()=>e.routerState.matches()[h])}))}return t.splice(o.length).forEach(h=>h()),c&&u?c:(n=f[0],f)}));return tp(()=>i()&&n)()}const tp=e=>()=>B(Qt,{get when(){return e()},keyed:!0,children:t=>B(Cu.Provider,{value:t,get children(){return t.outlet()}})}),jr=e=>{const t=ei(()=>e.children);return qe(e,{get children(){return t()}})};function KE([e,t],n,i){return[e,i?o=>t(i(o)):t]}function YE(e){let t=!1;const n=o=>typeof o=="string"?{value:o}:o,i=KE(J(n(e.get()),{equals:(o,a)=>o.value===a.value&&o.state===a.state}),void 0,o=>(!t&&e.set(o),be.registry&&!be.done&&(be.done=!0),o));return e.init&&Xe(e.init((o=e.get())=>{t=!0,i[1](n(o)),t=!1})),qE({signal:i,create:e.create,utils:e.utils})}function XE(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function JE(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const QE=new Map;function ek(e=!0,t=!1,n="/_server",i){return o=>{const a=o.base.path(),c=o.navigatorFactory(o.base);let u,f;function h(T){return T.namespaceURI==="http://www.w3.org/2000/svg"}function p(T){if(T.defaultPrevented||T.button!==0||T.metaKey||T.altKey||T.ctrlKey||T.shiftKey)return;const S=T.composedPath().find(Y=>Y instanceof Node&&Y.nodeName.toUpperCase()==="A");if(!S||t&&!S.hasAttribute("link"))return;const _=h(S),C=_?S.href.baseVal:S.href;if((_?S.target.baseVal:S.target)||!C&&!S.hasAttribute("state"))return;const N=(S.getAttribute("rel")||"").split(/\s+/);if(S.hasAttribute("download")||N&&N.includes("external"))return;const F=_?new URL(C,document.baseURI):new URL(C);if(!(F.origin!==window.location.origin||a&&F.pathname&&!F.pathname.toLowerCase().startsWith(a.toLowerCase())))return[S,F]}function m(T){const S=p(T);if(!S)return;const[_,C]=S,L=o.parsePath(C.pathname+C.search+C.hash),N=_.getAttribute("state");T.preventDefault(),c(L,{resolve:!1,replace:_.hasAttribute("replace"),scroll:!_.hasAttribute("noscroll"),state:N?JSON.parse(N):void 0})}function b(T){const S=p(T);if(!S)return;const[_,C]=S;o.preloadRoute(C,_.getAttribute("preload")!=="false")}function w(T){clearTimeout(u);const S=p(T);if(!S)return f=null;const[_,C]=S;f!==_&&(u=setTimeout(()=>{o.preloadRoute(C,_.getAttribute("preload")!=="false"),f=_},20))}function A(T){if(T.defaultPrevented)return;let S=T.submitter&&T.submitter.hasAttribute("formaction")?T.submitter.getAttribute("formaction"):T.target.getAttribute("action");if(!S)return;if(!S.startsWith("https://action/")){const C=new URL(S,Ng);if(S=o.parsePath(C.pathname+C.search),!S.startsWith(n))return}if(T.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const _=QE.get(S);if(_){T.preventDefault();const C=new FormData(T.target,T.submitter);_.call({r:o,f:T.target},T.target.enctype==="multipart/form-data"?C:new URLSearchParams(C))}}Oi(["click","submit"]),document.addEventListener("click",m),e&&(document.addEventListener("mousemove",w,{passive:!0}),document.addEventListener("focusin",b,{passive:!0}),document.addEventListener("touchstart",b,{passive:!0})),document.addEventListener("submit",A),Xe(()=>{document.removeEventListener("click",m),e&&(document.removeEventListener("mousemove",w),document.removeEventListener("focusin",b),document.removeEventListener("touchstart",b)),document.removeEventListener("submit",A)})}}function tk(e){const t=e.replace(/^.*?#/,"");if(!t.startsWith("/")){const[,n="/"]=window.location.hash.split("#",2);return`${n}#${t}`}return t}function nk(e){const t=()=>window.location.hash.slice(1),n=$g();return YE({get:t,set({value:i,replace:o,scroll:a,state:c}){o?window.history.replaceState(EE(c),"","#"+i):window.history.pushState(c,"","#"+i);const u=i.indexOf("#"),f=u>=0?i.slice(u+1):"";JE(f,a),Tu()},init:i=>XE(window,"hashchange",kE(i,o=>!n.confirm(o&&o<0?o:t()))),create:ek(e.preload,e.explicitLinks,e.actionBase),utils:{go:i=>window.history.go(i),renderPath:i=>`#${i}`,parsePath:tk,beforeLeave:n}})(e)}var rk=Me("<a>");function Ou(e){e=qe({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=en(e,["href","state","class","activeClass","inactiveClass","end"]),n=FE(()=>e.href),i=UE(n),o=Wg(),a=de(()=>{const c=n();if(c===void 0)return[!1,!1];const u=yi(c.split(/[?#]/,1)[0]).toLowerCase(),f=decodeURI(yi(o.pathname).toLowerCase());return[e.end?u===f:f.startsWith(u+"/")||f===u,u===f]});return(()=>{var c=rk();return Wt(c,qe(t,{get href(){return i()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!a()[0],[e.activeClass]:a()[0],...t.classList}},link:"",get"aria-current"(){return a()[1]?"page":void 0}}),!1,!1),c})()}var ik=Me('<form><div class="join flex"><select name=sourceIP class="join-item select select-bordered"><option></option></select><input name=tagName class="input join-item input-bordered min-w-0 flex-1"placeholder=name>'),sk=Me("<option class=badge>"),ok=Me('<div><div class="flex justify-between py-2"><div class="flex items-center gap-2"><span></span></div><div><input type=checkbox class=toggle>'),ak=Me("<div>"),lk=Me('<div class="flex flex-col gap-4"><div><input type=text class="input input-bordered w-full"></div><div><select class="select select-bordered w-full"></select></div><div><div class="flex flex-col gap-4"><div class="flex flex-col gap-2"></div></div></div><div>'),ck=Me("<option>"),uk=Me('<div class="badge badge-primary w-full items-center justify-between gap-2 py-4"><span class=truncate> (<!>)');const fk=()=>{const e=Bc.object({tagName:Bc.string().min(1),sourceIP:Bc.string().min(1)}),[t]=ol(),{form:n,reset:i}=zC({extend:jC({schema:e}),onSubmit:({tagName:o,sourceIP:a})=>{eg(c=>c.some(u=>u.tagName===o||u.sourceIP===a)?c:[...c,{tagName:o,sourceIP:a}]),i()}});return(()=>{var o=ik(),a=o.firstChild,c=a.firstChild;return c.firstChild,c.nextSibling,ti(n,o,()=>n),te(c,B(s1,{get each(){return us.uniq(tg().map(({metadata:{sourceIP:u}})=>u)).sort().filter(u=>!Qp().some(({sourceIP:f})=>f===u))},children:u=>(()=>{var f=sk();return te(f,u),ze(()=>f.value=u()),f})()}),null),te(a,B(hi,{type:"submit",class:"join-item",get children(){return t("tag")}}),null),o})()},QI=e=>{const[t]=ol(),[n,i]=J(null),o=({draggable:f})=>i(f.id),a=({draggable:f,droppable:h})=>{if(f&&h){const p=e.order,m=p.indexOf(f.id),b=p.indexOf(h.id);if(m!==b){const w=p.slice();w.splice(b,0,...w.splice(m,1)),e.onOrderChange(w)}}},c=(f,h)=>{const p=[...e.order],m=p.length,b=p.indexOf(f);if(b<0||b>=m)return;const w=h==="forward"?b+1:b-1;w<0||w>=m||([p[b],p[w]]=[p[w],p[b]],e.onOrderChange(p))},u=({key:f})=>{const h=bO(f),[p]=ki();return(()=>{var m=ok(),b=m.firstChild,w=b.firstChild,A=w.firstChild,T=w.nextSibling,S=T.firstChild,_=h.ref;return typeof _=="function"?ti(_,m):h.ref=m,te(w,B(hi,qe({class:"btn-ghost btn-sm hidden cursor-grab sm:inline-block",get icon(){return B(XC,{size:24})}},()=>h.dragActivators)),A),te(A,()=>t(f)),te(T,B(hi,{class:"btn-circle btn-sm mx-2 inline-block sm:hidden",get icon(){return B(GC,{width:30,size:24})},onClick:()=>c(f,"backward")}),S),te(T,B(hi,{class:"btn-circle btn-sm mx-2 inline-block sm:hidden",get icon(){return B(qC,{width:30,size:24})},onClick:()=>c(f,"forward")}),S),S.addEventListener("change",C=>{e.onVisibleChange({...e.visible,[f]:C.target.checked})}),ze(C=>{var L=!!h.isActiveDraggable,N=!!p.active.draggable,F=yo(h.transform);return L!==C.e&&m.classList.toggle("opacity-25",C.e=L),N!==C.t&&m.classList.toggle("transition-transform",C.t=N),C.a=Mn(m,F,C.a),C},{e:void 0,t:void 0,a:void 0}),ze(()=>S.checked=e.visible[f]),m})()};return B(Ek,{ref:f=>{var h;return(h=e.ref)==null?void 0:h.call(e,f)},get icon(){return B(xg,{size:24})},get title(){return t("connectionsSettings")},get action(){return B(hi,{class:"btn-neutral btn-sm",onClick:()=>{e.onOrderChange(_u),e.onVisibleChange(Xp)},get children(){return t("reset")}})},get children(){var f=lk(),h=f.firstChild,p=h.firstChild,m=h.nextSibling,b=m.firstChild,w=m.nextSibling,A=w.firstChild,T=A.firstChild,S=w.nextSibling;return te(h,B(wa,{withDivider:!0,get children(){return t("quickFilter")}}),p),p.$$input=_=>eT(_.target.value),te(m,B(wa,{withDivider:!0,get children(){return t("tableSize")}}),b),b.addEventListener("change",_=>FA(_.target.value)),te(b,B(Zr,{get each(){return Object.values(Hr)},children:_=>(()=>{var C=ck();return C.value=_,te(C,()=>t(_)),C})()})),te(w,B(wa,{withDivider:!0,get children(){return t("tagClientSourceIPWithName")}}),A),te(A,B(fk,{}),T),te(T,B(Zr,{get each(){return Qp()},children:({tagName:_,sourceIP:C})=>(()=>{var L=uk(),N=L.firstChild,F=N.firstChild,Y=F.nextSibling;return Y.nextSibling,te(N,_,F),te(N,C,Y),te(L,B(hi,{class:"btn-circle btn-ghost btn-xs",onClick:()=>eg(re=>re.filter(he=>he.tagName!==_)),get icon(){return B(Sg,{size:12})}}),null),L})()})),te(S,B(wa,{withDivider:!0,get children(){return t("sort")}}),null),te(S,B(cO,{onDragStart:o,onDragEnd:a,collisionDetector:aO,get children(){return[B(fO,{}),B(mO,{get ids(){return e.order},get children(){return B(Zr,{get each(){return e.order},children:_=>B(u,{key:_})})}}),B(pO,{get children(){return B(Qt,{get when(){return n()},get children(){var _=ak();return te(_,()=>t(n())),_}})}})]}}),null),ze(()=>p.value=QA()),ze(()=>b.value=NA()),f}})};Oi(["input"]);var dk=Me('<li class="tooltip tooltip-bottom">'),hk=Me('<div class="drawer drawer-end w-auto sm:ml-auto"><input id=themes type=checkbox class=drawer-toggle><div class="drawer-content flex items-center"><label for=themes class="btn btn-circle btn-primary drawer-button btn-sm"></label></div><div class="drawer-side overflow-x-hidden"><label for=themes class=drawer-overlay></label><ul class="menu gap-2 rounded-l-box bg-base-300 p-2">'),pk=Me('<li class="btn btn-xs">'),gk=Me('<div class="navbar-center hidden lg:flex"><ul class="menu menu-horizontal menu-lg gap-2 p-0">'),mk=Me('<ul class="navbar z-50 flex w-auto items-center justify-center bg-base-300 px-4 shadow-lg"><div class="navbar-start gap-4"><div class="drawer w-auto lg:hidden"><input id=navs type=checkbox class=drawer-toggle><div class="drawer-content flex w-6 items-center"><label for=navs class="btn btn-circle drawer-button btn-sm"></label></div><div class=drawer-side><label for=navs class=drawer-overlay></label><ul class="min-w-2/5 menu min-h-full gap-2 rounded-r-box bg-base-300 pt-20"></ul></div></div></div><div class=navbar-end><div class="flex items-center gap-2">'),vk=Me("<li>");const yk=({href:e,tooltip:t,children:n})=>(()=>{var i=dk();return dn(i,"data-tip",t),te(i,B(Ou,{class:"rounded-box",href:e,children:n})),i})(),bk=()=>(()=>{var e=hk(),t=e.firstChild,n=t.nextSibling,i=n.firstChild,o=n.nextSibling,a=o.firstChild,c=a.nextSibling;return te(i,B(QC,{})),te(c,B(Zr,{each:mA,children:u=>(()=>{var f=pk();return f.$$click=()=>mg(u),dn(f,"data-theme",u),te(f,u),f})()})),e})(),wk=()=>{const[e]=ol(),t=()=>[{href:zt.Overview,name:e("overview"),icon:B(YC,{})},{href:zt.Proxies,name:e("proxies"),icon:B(KC,{})},{href:zt.Rules,name:e("rules"),icon:B(eO,{})},{href:zt.Conns,name:e("connections"),icon:B(xg,{})},{href:zt.Log,name:e("logs"),icon:B(VC,{})},{href:zt.Config,name:e("config"),icon:B(tO,{})}],n=Wg(),[i,o]=J(!1);return(()=>{var a=mk(),c=a.firstChild,u=c.firstChild,f=u.firstChild,h=f.nextSibling,p=h.firstChild,m=h.nextSibling,b=m.firstChild,w=b.nextSibling,A=c.nextSibling,T=A.firstChild;return f.addEventListener("change",S=>o(S.target.checked)),te(p,B(JC,{})),te(w,B(Zr,{get each(){return t()},children:({href:S,name:_,icon:C})=>(()=>{var L=vk();return L.$$click=()=>o(!1),te(L,B(Ou,{href:S,get children(){return[C," ",_]}})),L})()})),te(c,B(Ak,{}),null),te(a,B(Qt,{get when(){return n.pathname!==zt.Setup},get children(){var S=gk(),_=S.firstChild;return te(_,B(Zr,{get each(){return t()},children:({href:C,name:L,icon:N})=>B(yk,{href:C,tooltip:L,children:N})})),S}}),A),te(T,B(bk,{})),ze(()=>f.checked=i()),a})()};Oi(["click"]);var _k=Me("<span>");const xk=e=>{const[t,n]=en(e,["class"]),{getLatencyByName:i}=al(),[o,a]=J(""),c=de(()=>i(n.proxyName||"",n.testUrl||Sr()));return Re(()=>{a(pg(c()))}),(()=>{var u=_k();return Wt(u,qe({get class(){return Cr("badge w-11 whitespace-nowrap",o(),t.class)}},n),!1,!0),te(u,()=>c()||"---"),u})()};var Sk=Me('<div class="text-md flex items-center gap-1 whitespace-nowrap font-bold uppercase sm:text-xl"><span>(</span><a class="text-primary transition-transform hover:rotate-90 hover:scale-125"href=https://github.com/metacubex/metacubexd target=_blank>xd</a><span>)');const Ak=()=>(()=>{var e=Sk(),t=e.firstChild;return te(e,B(Ou,{class:"bg-gradient-to-br from-primary to-secondary bg-clip-text text-transparent",get href(){return vo()?"/":"/setup"},children:"metacube"}),t),e})();var Tk=Me('<div class="sticky bottom-0 z-50 flex items-center justify-end bg-base-100 bg-opacity-80 p-4 backdrop-blur"><div class="flex justify-end gap-2">'),Ck=Me('<dialog class="modal modal-bottom sm:modal-middle"><div class="modal-box p-0"><div><div class="flex items-center gap-4 text-xl font-bold"><span></span></div></div><div class=p-4></div></div><form method=dialog class=modal-backdrop><button>');const Ok="sticky bottom-0 z-50 flex items-center justify-end bg-base-100 bg-opacity-80 p-4 backdrop-blur",Ek=e=>{let t;return(()=>{var n=Ck(),i=n.firstChild,o=i.firstChild,a=o.firstChild,c=a.firstChild,u=o.nextSibling;return ti(f=>{var h;return(t=f)&&((h=e.ref)==null?void 0:h.call(e,f))},n),i.$$contextmenu=f=>f.preventDefault(),te(a,()=>e.icon,c),te(c,()=>e.title),te(o,B(hi,{class:"btn-circle btn-sm",onClick:()=>t==null?void 0:t.close(),get icon(){return B(Sg,{size:20})}}),null),te(u,()=>ei(()=>e.children)()),te(i,B(Qt,{get when(){return e.action},get children(){var f=Tk(),h=f.firstChild;return te(h,()=>e.action),f}}),null),ze(()=>er(o,Cr(Ok,"top-0 justify-between"))),n})()};Oi(["contextmenu"]);var ae=e=>typeof e=="function"?e():e,kk=e=>(...t)=>{for(const n of e)n&&n(...t)},wo=(...e)=>kk(e),Zg=(...e)=>e.some(t=>!!t()),Pk=e=>de(()=>{var n;return((n=ae(e.element))==null?void 0:n.tagName.toLowerCase())??e.fallback}),Dk=Pk,qg=e=>typeof e=="function"&&e.length>0,Ik=["button","color","file","image","reset","submit"],Rk=(e,t)=>e==="button"?!0:e==="input"&&t!==void 0?Ik.indexOf(t)!==-1:!1,Ja=e=>e?"":void 0,Lk=e=>{const[t,n]=en(e,["as"]),i=de(()=>t.as??"div");return de(()=>{const a=i();switch(typeof a){case"function":return xe(()=>a(n));case"string":return B(O1,qe({component:a},n))}})},hl=Lk,Mk=e=>{const[t,n]=J(null),[i,o]=en(e,["ref","type"]),a=Dk({element:t,fallback:"button"}),c=de(()=>Rk(a(),i.type));return B(hl,qe({as:"button",ref(u){var f=wo(n,i.ref);typeof f=="function"&&f(u)},get type(){return c()?"button":void 0},get role(){return c()?void 0:"button"}},o))},$k=Mk,Da=new Map,Gg=(e,t)=>{if(Da.has(e))return Da.get(e);const n=sr(t);return Da.set(e,n),n},Vg=e=>{const t=Da.get(e);if(t)return On(t)},Nk=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Fk(e){const t={};let n;for(;n=Nk.exec(e);)t[n[1]]=n[2];return t}function Kg(e,t){return typeof t=="string"&&(t=Fk(t)),{...e,...t}}var Uk=e=>requestAnimationFrame(()=>requestAnimationFrame(e)),qi=(e,t)=>(e&&(typeof e=="function"?e(t):e[0](e[1],t)),t.defaultPrevented),cu=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},Bk=e=>de(()=>{const n=ae(e.strategy),i=ae(e.floatingState),o=i.placement.split("-")[0],a=i.placement.split("-")[1];let c;switch(i.placement){case"top":case"bottom":c=`${a||"center"} ${uu[o]}`;case"left":case"right":c=`${uu[o]} ${a||"center"}`}return{position:n,top:`${i.y}px`,left:`${i.x}px`,width:i.width!==null?`${i.width}px`:void 0,height:i.height!==null?`${i.height}px`:void 0,"max-width":i.maxWidth!==null?`${i.maxWidth}px`:void 0,"max-height":i.maxHeight!==null?`${i.maxHeight}px`:void 0,"--corvu-floating-transform-origin":c}}),uu={top:"bottom",bottom:"top",left:"right",right:"left"},zk=Me('<svg viewBox="0 0 14 8"fill=none xmlns=http://www.w3.org/2000/svg><path d="M0 0L6.24742 7.13991C6.64583 7.59524 7.35416 7.59524 7.75258 7.13991L14 0H0Z"fill=currentColor>'),Wk={top:"rotate(180deg)",bottom:"translate3d(0, 100%, 0)",left:"translate3d(0, 50%, 0) rotate(90deg) translate3d(-50%, 0, 0)",right:"translate3d(0, 50%, 0) rotate(-90deg) translate3d(50%, 0, 0)"},jk={top:"center 0px",bottom:void 0,left:"0px 0px",right:"100% 0px"},Hk=e=>{const t=qe({size:16},e),[n,i]=en(t,["as","floatingState","size","style","children"]),o=de(()=>uu[n.floatingState.placement.split("-")[0]]),a=de(()=>{const h=n.floatingState.arrowY;if(h!==null)return`${h}px`}),c=de(()=>{const h=n.floatingState.arrowX;if(h!==null)return`${h}px`}),u=ei(()=>n.children),f=()=>u.toArray().length===0;return B(hl,qe({as:"div",get style(){return Kg({position:"absolute",left:c(),top:a(),[o()]:"0px",transform:Wk[o()],"transform-origin":jk[o()],height:f()?`${n.size}px`:void 0,width:f()?`${n.size}px`:void 0,"pointer-events":"none"},n.style)}},i,{get children(){return B(Qt,{get when(){return f()},get fallback(){return u()},get children(){return zk()}})}}))},Zk=Hk,Aa=new Map,qk=e=>{Re(()=>{const t=ae(e.style)??{},n=ae(e.properties)??[],i={};for(const a in t)i[a]=e.element.style[a];const o=Aa.get(e.key);o?o.activeCount++:Aa.set(e.key,{activeCount:1,originalStyles:i,properties:n.map(a=>a.key)}),Object.assign(e.element.style,e.style);for(const a of n)e.element.style.setProperty(a.key,a.value);Xe(()=>{var c;const a=Aa.get(e.key);if(a){if(a.activeCount!==1){a.activeCount--;return}Aa.delete(e.key);for(const[u,f]of Object.entries(a.originalStyles))e.element.style[u]=f;for(const u of a.properties)e.element.style.removeProperty(u);e.element.style.length===0&&e.element.removeAttribute("style"),(c=e.cleanup)==null||c.call(e)}})})},Gk=qk,Vk=e=>{const t=qe({enabled:!0},e);Re(()=>{ae(t.enabled)&&(document.addEventListener("keydown",n),Xe(()=>{document.removeEventListener("keydown",n)}))});const n=i=>{i.key==="Escape"&&t.onEscapeKeyDown(i)}},Kk=Vk,Yk=e=>{const t=qe({enabled:!0},e);Re(()=>{const{body:n}=document;ae(t.enabled)&&Gk({key:"no-pointer-events",element:n,style:{pointerEvents:"none"}})})},Xk=Yk,Jk="dismissible.outsideFocus",Qk={bubbles:!1,cancelable:!0},eP=e=>{const t=qe({enabled:!0,ignorePointerEvents:!1},e);let n=!1;Re(()=>{if(!ae(t.enabled))return;const a=ae(t.ignorePointerEvents);document.addEventListener("focusin",i),a&&document.addEventListener("pointerdown",o),Xe(()=>{document.removeEventListener("focusin",i),a&&document.removeEventListener("pointerdown",o)})});const i=a=>{if(n){n=!1;return}const c=ae(t.element);if(c&&!cu(c,a.target)){const u=new CustomEvent(Jk,Qk);c.dispatchEvent(u),t.onFocus(u)}},o=()=>{n=!0}},tP=eP,nP=e=>{const t=qe({enabled:!0,strategy:"pointerup"},e);Re(()=>{if(!ae(t.enabled))return;const i=ae(t.strategy);document.addEventListener(i,n),Xe(()=>{document.removeEventListener(i,n)})});const n=i=>{const o=ae(t.element),a=ae(t.ignore);o&&!cu(o,i.target)&&!(a&&a.some(c=>c&&cu(c,i.target)))&&t.onPointer(i)}},rP=nP,iP=e=>{const t=qe({dismissOnEscapeKeyDown:!0,dismissOnOutsideFocus:!0,dismissOnOutsidePointer:!0,outsidePointerStrategy:"pointerup",noOutsidePointerEvents:!0},e);Kk({enabled:()=>ae(t.dismissOnEscapeKeyDown),onEscapeKeyDown:n=>{var i;(i=t.onEscapeKeyDown)==null||i.call(t,n),n.defaultPrevented||t.onDismiss("escapeKey")}}),tP({enabled:()=>ae(t.dismissOnOutsideFocus),onFocus:n=>{var i;(i=t.onOutsideFocus)==null||i.call(t,n),n.defaultPrevented||t.onDismiss("outsideFocus")},element:()=>ae(t.element),ignorePointerEvents:()=>ae(t.noOutsidePointerEvents)||ae(t.dismissOnOutsidePointer)}),rP({enabled:()=>ae(t.dismissOnOutsidePointer),strategy:()=>ae(t.outsidePointerStrategy),ignore:()=>ae(t.outsidePointerIgnore)??[],onPointer:n=>{var i;if((i=t.onOutsidePointer)==null||i.call(t,n),!n.defaultPrevented){const o=n.button===0&&n.ctrlKey===!0;if(n.button===2||o)return;t.onDismiss("outsidePointer")}},element:()=>ae(t.element)}),Xk({enabled:()=>ae(t.noOutsidePointerEvents)})},sP=iP,fu=sr(),oP=e=>{const t=qe({dismissibleId:go()},e);return de(()=>{if(On(fu))return B(np,e);const[o,a]=J([t.dismissibleId]),c=f=>{a(h=>[...h,f])},u=f=>{a(h=>h.filter(p=>p!==f))};return B(fu.Provider,{value:{layers:o,onLayerShow:c,onLayerDismiss:u},get children(){return B(np,e)}})})},[eR,jc]=J([]),np=e=>{const t=qe({enabled:!0,dismissibleId:go(),dismissOnEscapeKeyDown:!0,dismissOnOutsideFocus:!0,dismissOnOutsidePointer:!0,outsidePointerStrategy:"pointerup",noOutsidePointerEvents:!0},e),[n,i]=en(t,["enabled","children","dismissOnEscapeKeyDown","dismissOnOutsideFocus","dismissOnOutsidePointer","outsidePointerStrategy","outsidePointerIgnore","noOutsidePointerEvents","onDismiss"]),o=On(fu);Xe(()=>{o.onLayerDismiss(t.dismissibleId),jc(f=>f.filter(h=>h!==t.dismissibleId))}),Re(()=>{n.enabled?(o.onLayerShow(t.dismissibleId),jc(f=>[...f,t.dismissibleId])):(o.onLayerDismiss(t.dismissibleId),jc(f=>f.filter(h=>h!==t.dismissibleId)))});const a=()=>o.layers()[o.layers().length-1]===t.dismissibleId;sP({dismissOnEscapeKeyDown:()=>ae(n.dismissOnEscapeKeyDown)&&a()&&n.enabled,dismissOnOutsideFocus:()=>ae(n.dismissOnOutsideFocus)&&a()&&n.enabled,dismissOnOutsidePointer:()=>ae(n.dismissOnOutsidePointer)&&a()&&n.enabled,outsidePointerStrategy:n.outsidePointerStrategy,outsidePointerIgnore:n.outsidePointerIgnore,noOutsidePointerEvents:()=>ae(n.noOutsidePointerEvents)&&n.enabled,onDismiss:f=>{n.onDismiss(f)},...i});const c=de(()=>n.children),u=()=>{const f=c();return qg(f)?f({get isLastLayer(){return a()}}):f};return xe(()=>u())},aP=oP,lP=aP;function cP(e){const[t,n]=J(e.initialValue),i=()=>{var c;return((c=e.value)==null?void 0:c.call(e))!==void 0},o=()=>{var c;return i()?(c=e.value)==null?void 0:c.call(e):t()};return[o,c=>xe(()=>{var f;let u;return typeof c=="function"?u=c(o()):u=c,Object.is(u,o())||(i()||n(u),(f=e.onChange)==null||f.call(e,u)),u})]}var uP=cP;const Yg=["top","right","bottom","left"],rp=["start","end"],ip=Yg.reduce((e,t)=>e.concat(t,t+"-"+rp[0],t+"-"+rp[1]),[]),Hn=Math.min,Lt=Math.max,Qa=Math.round,Ta=Math.floor,Xr=e=>({x:e,y:e}),fP={left:"right",right:"left",bottom:"top",top:"bottom"},dP={start:"end",end:"start"};function du(e,t,n){return Lt(e,Hn(t,n))}function kr(e,t){return typeof e=="function"?e(t):e}function Cn(e){return e.split("-")[0]}function Bn(e){return e.split("-")[1]}function Xg(e){return e==="x"?"y":"x"}function Eu(e){return e==="y"?"height":"width"}function Jr(e){return["top","bottom"].includes(Cn(e))?"y":"x"}function ku(e){return Xg(Jr(e))}function Jg(e,t,n){n===void 0&&(n=!1);const i=Bn(e),o=ku(e),a=Eu(o);let c=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(c=tl(c)),[c,tl(c)]}function hP(e){const t=tl(e);return[el(e),t,el(t)]}function el(e){return e.replace(/start|end/g,t=>dP[t])}function pP(e,t,n){const i=["left","right"],o=["right","left"],a=["top","bottom"],c=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:i:t?i:o;case"left":case"right":return t?a:c;default:return[]}}function gP(e,t,n,i){const o=Bn(e);let a=pP(Cn(e),n==="start",i);return o&&(a=a.map(c=>c+"-"+o),t&&(a=a.concat(a.map(el)))),a}function tl(e){return e.replace(/left|right|bottom|top/g,t=>fP[t])}function mP(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pu(e){return typeof e!="number"?mP(e):{top:e,right:e,bottom:e,left:e}}function ps(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function sp(e,t,n){let{reference:i,floating:o}=e;const a=Jr(t),c=ku(t),u=Eu(c),f=Cn(t),h=a==="y",p=i.x+i.width/2-o.width/2,m=i.y+i.height/2-o.height/2,b=i[u]/2-o[u]/2;let w;switch(f){case"top":w={x:p,y:i.y-o.height};break;case"bottom":w={x:p,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y:m};break;case"left":w={x:i.x-o.width,y:m};break;default:w={x:i.x,y:i.y}}switch(Bn(t)){case"start":w[c]-=b*(n&&h?-1:1);break;case"end":w[c]+=b*(n&&h?-1:1);break}return w}const vP=async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:a=[],platform:c}=n,u=a.filter(Boolean),f=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=sp(h,i,f),b=i,w={},A=0;for(let T=0;T<u.length;T++){const{name:S,fn:_}=u[T],{x:C,y:L,data:N,reset:F}=await _({x:p,y:m,initialPlacement:i,placement:b,strategy:o,middlewareData:w,rects:h,platform:c,elements:{reference:e,floating:t}});p=C??p,m=L??m,w={...w,[S]:{...w[S],...N}},F&&A<=50&&(A++,typeof F=="object"&&(F.placement&&(b=F.placement),F.rects&&(h=F.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):F.rects),{x:p,y:m}=sp(h,b,f)),T=-1)}return{x:p,y:m,placement:b,strategy:o,middlewareData:w}};async function gs(e,t){var n;t===void 0&&(t={});const{x:i,y:o,platform:a,rects:c,elements:u,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:w=0}=kr(t,e),A=Pu(w),S=u[b?m==="floating"?"reference":"floating":m],_=ps(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(S)))==null||n?S:S.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:h,rootBoundary:p,strategy:f})),C=m==="floating"?{x:i,y:o,width:c.floating.width,height:c.floating.height}:c.reference,L=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),N=await(a.isElement==null?void 0:a.isElement(L))?await(a.getScale==null?void 0:a.getScale(L))||{x:1,y:1}:{x:1,y:1},F=ps(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:C,offsetParent:L,strategy:f}):C);return{top:(_.top-F.top+A.top)/N.y,bottom:(F.bottom-_.bottom+A.bottom)/N.y,left:(_.left-F.left+A.left)/N.x,right:(F.right-_.right+A.right)/N.x}}const yP=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:o,rects:a,platform:c,elements:u,middlewareData:f}=t,{element:h,padding:p=0}=kr(e,t)||{};if(h==null)return{};const m=Pu(p),b={x:n,y:i},w=ku(o),A=Eu(w),T=await c.getDimensions(h),S=w==="y",_=S?"top":"left",C=S?"bottom":"right",L=S?"clientHeight":"clientWidth",N=a.reference[A]+a.reference[w]-b[w]-a.floating[A],F=b[w]-a.reference[w],Y=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let re=Y?Y[L]:0;(!re||!await(c.isElement==null?void 0:c.isElement(Y)))&&(re=u.floating[L]||a.floating[A]);const he=N/2-F/2,oe=re/2-T[A]/2-1,X=Hn(m[_],oe),j=Hn(m[C],oe),ne=X,$e=re-T[A]-j,E=re/2-T[A]/2+he,I=du(ne,E,$e),D=!f.arrow&&Bn(o)!=null&&E!==I&&a.reference[A]/2-(E<ne?X:j)-T[A]/2<0,Z=D?E<ne?E-ne:E-$e:0;return{[w]:b[w]+Z,data:{[w]:I,centerOffset:E-I-Z,...D&&{alignmentOffset:Z}},reset:D}}});function bP(e,t,n){return(e?[...n.filter(o=>Bn(o)===e),...n.filter(o=>Bn(o)!==e)]:n.filter(o=>Cn(o)===o)).filter(o=>e?Bn(o)===e||(t?el(o)!==o:!1):!0)}const wP=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,o;const{rects:a,middlewareData:c,placement:u,platform:f,elements:h}=t,{crossAxis:p=!1,alignment:m,allowedPlacements:b=ip,autoAlignment:w=!0,...A}=kr(e,t),T=m!==void 0||b===ip?bP(m||null,w,b):b,S=await gs(t,A),_=((n=c.autoPlacement)==null?void 0:n.index)||0,C=T[_];if(C==null)return{};const L=Jg(C,a,await(f.isRTL==null?void 0:f.isRTL(h.floating)));if(u!==C)return{reset:{placement:T[0]}};const N=[S[Cn(C)],S[L[0]],S[L[1]]],F=[...((i=c.autoPlacement)==null?void 0:i.overflows)||[],{placement:C,overflows:N}],Y=T[_+1];if(Y)return{data:{index:_+1,overflows:F},reset:{placement:Y}};const re=F.map(X=>{const j=Bn(X.placement);return[X.placement,j&&p?X.overflows.slice(0,2).reduce((ne,$e)=>ne+$e,0):X.overflows[0],X.overflows]}).sort((X,j)=>X[1]-j[1]),oe=((o=re.filter(X=>X[2].slice(0,Bn(X[0])?2:3).every(j=>j<=0))[0])==null?void 0:o[0])||re[0][0];return oe!==u?{data:{index:_+1,overflows:F},reset:{placement:oe}}:{}}}},_P=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:a,rects:c,initialPlacement:u,platform:f,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:T=!0,...S}=kr(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const _=Cn(o),C=Jr(u),L=Cn(u)===u,N=await(f.isRTL==null?void 0:f.isRTL(h.floating)),F=b||(L||!T?[tl(u)]:hP(u)),Y=A!=="none";!b&&Y&&F.push(...gP(u,T,A,N));const re=[u,...F],he=await gs(t,S),oe=[];let X=((i=a.flip)==null?void 0:i.overflows)||[];if(p&&oe.push(he[_]),m){const E=Jg(o,c,N);oe.push(he[E[0]],he[E[1]])}if(X=[...X,{placement:o,overflows:oe}],!oe.every(E=>E<=0)){var j,ne;const E=(((j=a.flip)==null?void 0:j.index)||0)+1,I=re[E];if(I)return{data:{index:E,overflows:X},reset:{placement:I}};let D=(ne=X.filter(Z=>Z.overflows[0]<=0).sort((Z,M)=>Z.overflows[1]-M.overflows[1])[0])==null?void 0:ne.placement;if(!D)switch(w){case"bestFit":{var $e;const Z=($e=X.filter(M=>{if(Y){const R=Jr(M.placement);return R===C||R==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(R=>R>0).reduce((R,z)=>R+z,0)]).sort((M,R)=>M[1]-R[1])[0])==null?void 0:$e[0];Z&&(D=Z);break}case"initialPlacement":D=u;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function op(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ap(e){return Yg.some(t=>e[t]>=0)}const xP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...o}=kr(e,t);switch(i){case"referenceHidden":{const a=await gs(t,{...o,elementContext:"reference"}),c=op(a,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:ap(c)}}}case"escaped":{const a=await gs(t,{...o,altBoundary:!0}),c=op(a,n.floating);return{data:{escapedOffsets:c,escaped:ap(c)}}}default:return{}}}}};function Qg(e){const t=Hn(...e.map(a=>a.left)),n=Hn(...e.map(a=>a.top)),i=Lt(...e.map(a=>a.right)),o=Lt(...e.map(a=>a.bottom));return{x:t,y:n,width:i-t,height:o-n}}function SP(e){const t=e.slice().sort((o,a)=>o.y-a.y),n=[];let i=null;for(let o=0;o<t.length;o++){const a=t[o];!i||a.y-i.y>i.height/2?n.push([a]):n[n.length-1].push(a),i=a}return n.map(o=>ps(Qg(o)))}const AP=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:i,rects:o,platform:a,strategy:c}=t,{padding:u=2,x:f,y:h}=kr(e,t),p=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),m=SP(p),b=ps(Qg(p)),w=Pu(u);function A(){if(m.length===2&&m[0].left>m[1].right&&f!=null&&h!=null)return m.find(S=>f>S.left-w.left&&f<S.right+w.right&&h>S.top-w.top&&h<S.bottom+w.bottom)||b;if(m.length>=2){if(Jr(n)==="y"){const X=m[0],j=m[m.length-1],ne=Cn(n)==="top",$e=X.top,E=j.bottom,I=ne?X.left:j.left,D=ne?X.right:j.right,Z=D-I,M=E-$e;return{top:$e,bottom:E,left:I,right:D,width:Z,height:M,x:I,y:$e}}const S=Cn(n)==="left",_=Lt(...m.map(X=>X.right)),C=Hn(...m.map(X=>X.left)),L=m.filter(X=>S?X.left===C:X.right===_),N=L[0].top,F=L[L.length-1].bottom,Y=C,re=_,he=re-Y,oe=F-N;return{top:N,bottom:F,left:Y,right:re,width:he,height:oe,x:Y,y:N}}return b}const T=await a.getElementRects({reference:{getBoundingClientRect:A},floating:i.floating,strategy:c});return o.reference.x!==T.reference.x||o.reference.y!==T.reference.y||o.reference.width!==T.reference.width||o.reference.height!==T.reference.height?{reset:{rects:T}}:{}}}};async function TP(e,t){const{placement:n,platform:i,elements:o}=e,a=await(i.isRTL==null?void 0:i.isRTL(o.floating)),c=Cn(n),u=Bn(n),f=Jr(n)==="y",h=["left","top"].includes(c)?-1:1,p=a&&f?-1:1,m=kr(t,e);let{mainAxis:b,crossAxis:w,alignmentAxis:A}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return u&&typeof A=="number"&&(w=u==="end"?A*-1:A),f?{x:w*p,y:b*h}:{x:b*h,y:w*p}}const CP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:a,placement:c,middlewareData:u}=t,f=await TP(t,e);return c===((n=u.offset)==null?void 0:n.placement)&&(i=u.arrow)!=null&&i.alignmentOffset?{}:{x:o+f.x,y:a+f.y,data:{...f,placement:c}}}}},OP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o}=t,{mainAxis:a=!0,crossAxis:c=!1,limiter:u={fn:S=>{let{x:_,y:C}=S;return{x:_,y:C}}},...f}=kr(e,t),h={x:n,y:i},p=await gs(t,f),m=Jr(Cn(o)),b=Xg(m);let w=h[b],A=h[m];if(a){const S=b==="y"?"top":"left",_=b==="y"?"bottom":"right",C=w+p[S],L=w-p[_];w=du(C,w,L)}if(c){const S=m==="y"?"top":"left",_=m==="y"?"bottom":"right",C=A+p[S],L=A-p[_];A=du(C,A,L)}const T=u.fn({...t,[b]:w,[m]:A});return{...T,data:{x:T.x-n,y:T.y-i,enabled:{[b]:a,[m]:c}}}}}},EP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:o,rects:a,platform:c,elements:u}=t,{apply:f=()=>{},...h}=kr(e,t),p=await gs(t,h),m=Cn(o),b=Bn(o),w=Jr(o)==="y",{width:A,height:T}=a.floating;let S,_;m==="top"||m==="bottom"?(S=m,_=b===(await(c.isRTL==null?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(_=m,S=b==="end"?"top":"bottom");const C=T-p.top-p.bottom,L=A-p.left-p.right,N=Hn(T-p[S],C),F=Hn(A-p[_],L),Y=!t.middlewareData.shift;let re=N,he=F;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(he=L),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(re=C),Y&&!b){const X=Lt(p.left,0),j=Lt(p.right,0),ne=Lt(p.top,0),$e=Lt(p.bottom,0);w?he=A-2*(X!==0||j!==0?X+j:Lt(p.left,p.right)):re=T-2*(ne!==0||$e!==0?ne+$e:Lt(p.top,p.bottom))}await f({...t,availableWidth:he,availableHeight:re});const oe=await c.getDimensions(u.floating);return A!==oe.width||T!==oe.height?{reset:{rects:!0}}:{}}}};function pl(){return typeof window<"u"}function _s(e){return em(e)?(e.nodeName||"").toLowerCase():"#document"}function fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function or(e){var t;return(t=(em(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function em(e){return pl()?e instanceof Node||e instanceof fn(e).Node:!1}function Zn(e){return pl()?e instanceof Element||e instanceof fn(e).Element:!1}function ir(e){return pl()?e instanceof HTMLElement||e instanceof fn(e).HTMLElement:!1}function lp(e){return!pl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fn(e).ShadowRoot}function _o(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(o)}function kP(e){return["table","td","th"].includes(_s(e))}function gl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Du(e){const t=Iu(),n=Zn(e)?qn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function PP(e){let t=Qr(e);for(;ir(t)&&!ms(t);){if(Du(t))return t;if(gl(t))return null;t=Qr(t)}return null}function Iu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ms(e){return["html","body","#document"].includes(_s(e))}function qn(e){return fn(e).getComputedStyle(e)}function ml(e){return Zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qr(e){if(_s(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lp(e)&&e.host||or(e);return lp(t)?t.host:t}function tm(e){const t=Qr(e);return ms(t)?e.ownerDocument?e.ownerDocument.body:e.body:ir(t)&&_o(t)?t:tm(t)}function po(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=tm(e),a=o===((i=e.ownerDocument)==null?void 0:i.body),c=fn(o);if(a){const u=hu(c);return t.concat(c,c.visualViewport||[],_o(o)?o:[],u&&n?po(u):[])}return t.concat(o,po(o,[],n))}function hu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nm(e){const t=qn(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=ir(e),a=o?e.offsetWidth:n,c=o?e.offsetHeight:i,u=Qa(n)!==a||Qa(i)!==c;return u&&(n=a,i=c),{width:n,height:i,$:u}}function Ru(e){return Zn(e)?e:e.contextElement}function as(e){const t=Ru(e);if(!ir(t))return Xr(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:a}=nm(t);let c=(a?Qa(n.width):n.width)/i,u=(a?Qa(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!u||!Number.isFinite(u))&&(u=1),{x:c,y:u}}const DP=Xr(0);function rm(e){const t=fn(e);return!Iu()||!t.visualViewport?DP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function IP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fn(e)?!1:t}function Ai(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ru(e);let c=Xr(1);t&&(i?Zn(i)&&(c=as(i)):c=as(e));const u=IP(a,n,i)?rm(a):Xr(0);let f=(o.left+u.x)/c.x,h=(o.top+u.y)/c.y,p=o.width/c.x,m=o.height/c.y;if(a){const b=fn(a),w=i&&Zn(i)?fn(i):i;let A=b,T=hu(A);for(;T&&i&&w!==A;){const S=as(T),_=T.getBoundingClientRect(),C=qn(T),L=_.left+(T.clientLeft+parseFloat(C.paddingLeft))*S.x,N=_.top+(T.clientTop+parseFloat(C.paddingTop))*S.y;f*=S.x,h*=S.y,p*=S.x,m*=S.y,f+=L,h+=N,A=fn(T),T=hu(A)}}return ps({width:p,height:m,x:f,y:h})}function RP(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const a=o==="fixed",c=or(i),u=t?gl(t.floating):!1;if(i===c||u&&a)return n;let f={scrollLeft:0,scrollTop:0},h=Xr(1);const p=Xr(0),m=ir(i);if((m||!m&&!a)&&((_s(i)!=="body"||_o(c))&&(f=ml(i)),ir(i))){const b=Ai(i);h=as(i),p.x=b.x+i.clientLeft,p.y=b.y+i.clientTop}return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+p.x,y:n.y*h.y-f.scrollTop*h.y+p.y}}function LP(e){return Array.from(e.getClientRects())}function pu(e,t){const n=ml(e).scrollLeft;return t?t.left+n:Ai(or(e)).left+n}function MP(e){const t=or(e),n=ml(e),i=e.ownerDocument.body,o=Lt(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),a=Lt(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let c=-n.scrollLeft+pu(e);const u=-n.scrollTop;return qn(i).direction==="rtl"&&(c+=Lt(t.clientWidth,i.clientWidth)-o),{width:o,height:a,x:c,y:u}}function $P(e,t){const n=fn(e),i=or(e),o=n.visualViewport;let a=i.clientWidth,c=i.clientHeight,u=0,f=0;if(o){a=o.width,c=o.height;const h=Iu();(!h||h&&t==="fixed")&&(u=o.offsetLeft,f=o.offsetTop)}return{width:a,height:c,x:u,y:f}}function NP(e,t){const n=Ai(e,!0,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft,a=ir(e)?as(e):Xr(1),c=e.clientWidth*a.x,u=e.clientHeight*a.y,f=o*a.x,h=i*a.y;return{width:c,height:u,x:f,y:h}}function cp(e,t,n){let i;if(t==="viewport")i=$P(e,n);else if(t==="document")i=MP(or(e));else if(Zn(t))i=NP(t,n);else{const o=rm(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return ps(i)}function im(e,t){const n=Qr(e);return n===t||!Zn(n)||ms(n)?!1:qn(n).position==="fixed"||im(n,t)}function FP(e,t){const n=t.get(e);if(n)return n;let i=po(e,[],!1).filter(u=>Zn(u)&&_s(u)!=="body"),o=null;const a=qn(e).position==="fixed";let c=a?Qr(e):e;for(;Zn(c)&&!ms(c);){const u=qn(c),f=Du(c);!f&&u.position==="fixed"&&(o=null),(a?!f&&!o:!f&&u.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||_o(c)&&!f&&im(e,c))?i=i.filter(p=>p!==c):o=u,c=Qr(c)}return t.set(e,i),i}function UP(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const c=[...n==="clippingAncestors"?gl(t)?[]:FP(t,this._c):[].concat(n),i],u=c[0],f=c.reduce((h,p)=>{const m=cp(t,p,o);return h.top=Lt(m.top,h.top),h.right=Hn(m.right,h.right),h.bottom=Hn(m.bottom,h.bottom),h.left=Lt(m.left,h.left),h},cp(t,u,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function BP(e){const{width:t,height:n}=nm(e);return{width:t,height:n}}function zP(e,t,n){const i=ir(t),o=or(t),a=n==="fixed",c=Ai(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const f=Xr(0);if(i||!i&&!a)if((_s(t)!=="body"||_o(o))&&(u=ml(t)),i){const w=Ai(t,!0,a,t);f.x=w.x+t.clientLeft,f.y=w.y+t.clientTop}else o&&(f.x=pu(o));let h=0,p=0;if(o&&!i&&!a){const w=o.getBoundingClientRect();p=w.top+u.scrollTop,h=w.left+u.scrollLeft-pu(o,w)}const m=c.left+u.scrollLeft-f.x-h,b=c.top+u.scrollTop-f.y-p;return{x:m,y:b,width:c.width,height:c.height}}function Hc(e){return qn(e).position==="static"}function up(e,t){if(!ir(e)||qn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return or(e)===n&&(n=n.ownerDocument.body),n}function sm(e,t){const n=fn(e);if(gl(e))return n;if(!ir(e)){let o=Qr(e);for(;o&&!ms(o);){if(Zn(o)&&!Hc(o))return o;o=Qr(o)}return n}let i=up(e,t);for(;i&&kP(i)&&Hc(i);)i=up(i,t);return i&&ms(i)&&Hc(i)&&!Du(i)?n:i||PP(e)||n}const WP=async function(e){const t=this.getOffsetParent||sm,n=this.getDimensions,i=await n(e.floating);return{reference:zP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function jP(e){return qn(e).direction==="rtl"}const HP={convertOffsetParentRelativeRectToViewportRelativeRect:RP,getDocumentElement:or,getClippingRect:UP,getOffsetParent:sm,getElementRects:WP,getClientRects:LP,getDimensions:BP,getScale:as,isElement:Zn,isRTL:jP};function ZP(e,t){let n=null,i;const o=or(e);function a(){var u;clearTimeout(i),(u=n)==null||u.disconnect(),n=null}function c(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),a();const{left:h,top:p,width:m,height:b}=e.getBoundingClientRect();if(u||t(),!m||!b)return;const w=Ta(p),A=Ta(o.clientWidth-(h+m)),T=Ta(o.clientHeight-(p+b)),S=Ta(h),C={rootMargin:-w+"px "+-A+"px "+-T+"px "+-S+"px",threshold:Lt(0,Hn(1,f))||1};let L=!0;function N(F){const Y=F[0].intersectionRatio;if(Y!==f){if(!L)return c();Y?c(!1,Y):i=setTimeout(()=>{c(!1,1e-7)},1e3)}L=!1}try{n=new IntersectionObserver(N,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(N,C)}n.observe(e)}return c(!0),a}function qP(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,h=Ru(e),p=o||a?[...h?po(h):[],...po(t)]:[];p.forEach(_=>{o&&_.addEventListener("scroll",n,{passive:!0}),a&&_.addEventListener("resize",n)});const m=h&&u?ZP(h,n):null;let b=-1,w=null;c&&(w=new ResizeObserver(_=>{let[C]=_;C&&C.target===h&&w&&(w.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var L;(L=w)==null||L.observe(t)})),n()}),h&&!f&&w.observe(h),w.observe(t));let A,T=f?Ai(e):null;f&&S();function S(){const _=Ai(e);T&&(_.x!==T.x||_.y!==T.y||_.width!==T.width||_.height!==T.height)&&n(),T=_,A=requestAnimationFrame(S)}return n(),()=>{var _;p.forEach(C=>{o&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),m==null||m(),(_=w)==null||_.disconnect(),w=null,f&&cancelAnimationFrame(A)}}const GP=CP,VP=wP,KP=OP,fp=_P,YP=EP,XP=xP,JP=yP,QP=AP,eD=(e,t,n)=>{const i=new Map,o={platform:HP,...n},a={...o.platform,_c:i};return vP(e,t,{...o,platform:a})};var tD=e=>{const t=qe({enabled:!0,placement:"bottom",strategy:"absolute",options:null},e),[n,i]=J({placement:ae(t.placement),x:0,y:0,width:null,height:null,maxWidth:null,maxHeight:null,arrowX:null,arrowY:null});return Re(()=>{if(!ae(t.enabled))return;const o=ae(t.reference),a=ae(t.floating);if(!o||!a)return;const c=[],u=ae(t.options);if((u==null?void 0:u.offset)!==void 0&&c.push(GP(u.offset)),(u==null?void 0:u.shift)!==void 0&&u.shift!==!1){const b=u.shift===!0?void 0:u.shift;c.push(KP(b))}const f=ae(t.arrow);f&&c.push(JP({element:f,padding:u==null?void 0:u.arrow}));const h=(u==null?void 0:u.flip)!==void 0&&u.flip!==!1,p=typeof(u==null?void 0:u.flip)=="boolean"||u==null?void 0:u.flip;if(h&&(p==null?void 0:p.fallbackStrategy)!=="initialPlacement"&&c.push(fp(p)),u!=null&&u.size&&c.push(YP({apply:({availableWidth:b,availableHeight:w,...A})=>{const T={};u.size.matchSize===!0&&(A.placement.startsWith("top")||A.placement.startsWith("bottom")?T.width=A.rects.reference.width:T.height=A.rects.reference.height),u.size.fitViewPort===!0&&(A.placement.startsWith("top")||A.placement.startsWith("bottom")?T.maxHeight=w:T.maxWidth=b),dp(n(),T)||i(S=>({...S,...T}))},...u.size})),h&&(p==null?void 0:p.fallbackStrategy)==="bestFit"&&c.push(fp(p)),!h&&(u==null?void 0:u.autoPlacement)!==void 0&&u.autoPlacement!==!1){const b=u.autoPlacement===!0?void 0:u.autoPlacement;c.push(VP(b))}if((u==null?void 0:u.hide)!==void 0&&u.hide!==!1){const b=u.hide===!0?void 0:u.hide;c.push(XP(b))}if((u==null?void 0:u.inline)!==void 0&&u.inline!==!1){const b=u.inline===!0?void 0:u.inline;c.push(QP(b))}const m=qP(o,a,()=>{eD(o,a,{placement:ae(t.placement),strategy:ae(t.strategy),middleware:c}).then(({placement:b,x:w,y:A,middlewareData:T})=>{var _,C;const S={placement:b,x:w,y:A,arrowX:((_=T.arrow)==null?void 0:_.x)??null,arrowY:((C=T.arrow)==null?void 0:C.y)??null};dp(n(),S)||i(L=>({...L,...S}))})});Xe(m)}),n},dp=(e,t)=>(t.placement===void 0||e.placement===t.placement)&&(t.x===void 0||e.x===t.x)&&(t.y===void 0||e.y===t.y)&&(t.width===void 0||e.width===t.width)&&(t.height===void 0||e.height===t.height)&&(t.maxWidth===void 0||e.maxWidth===t.maxWidth)&&(t.maxHeight===void 0||e.maxHeight===t.maxHeight)&&(t.arrowX===void 0||e.arrowX===t.arrowX)&&(t.arrowY===void 0||e.arrowY===t.arrowY),nD=tD,rD=e=>{let t,n=!1;return()=>n?t:(n=!0,t=de(e))},iD=rD,sD=e=>{const t=de(()=>{const c=ae(e.element);if(c)return getComputedStyle(c)}),n=()=>{var c;return((c=t())==null?void 0:c.animationName)??"none"},[i,o]=J(ae(e.show)?"present":"hidden");let a="none";return Re(c=>{const u=ae(e.show);return xe(()=>{var p;if(c===u)return u;const f=a,h=n();u?o("present"):h==="none"||((p=t())==null?void 0:p.display)==="none"?o("hidden"):o(c===!0&&f!==h?"hiding":"hidden")}),u}),Re(()=>{const c=ae(e.element);if(!c)return;const u=h=>{h.target===c&&(a=n())},f=h=>{const m=n().includes(h.animationName);h.target===c&&m&&i()==="hiding"&&o("hidden")};c.addEventListener("animationstart",u),c.addEventListener("animationcancel",f),c.addEventListener("animationend",f),Xe(()=>{c.removeEventListener("animationstart",u),c.removeEventListener("animationcancel",f),c.removeEventListener("animationend",f)})}),{present:()=>i()==="present"||i()==="hiding",state:i,setState:o}},oD=sD,aD=oD,Ar=new Map,lD=(e,t,n)=>{Ar.has(e)||Ar.set(e,{skipDelay:!1,skipDelayTimeout:null,tooltips:[]}),Ar.get(e).tooltips.push({id:t,close:n})},cD=(e,t)=>{const n=Ar.get(e);if(!n)return;const i=n.tooltips.findIndex(o=>o.id===t);i!==-1&&n.tooltips.splice(i,1)},uD=(e,t)=>{const n=Ar.get(e);n&&n.tooltips.forEach(i=>{i.id!==t&&i.close()})},fD=e=>{let t=null,n=!1,i=null,o=!1,a=!1,c=null;const u=()=>{const _=ae(e.group);return _===null?a:Ar.get(_).skipDelay},f=_=>{const C=ae(e.group);if(C===null)return a=_;Ar.get(C).skipDelay=_},h=_=>{const C=ae(e.group);if(C===null)return c=_;Ar.get(C).skipDelayTimeout=_},p=()=>{const _=ae(e.group);return _===null?c:Ar.get(_).skipDelayTimeout};Re(()=>{const _=ae(e.group),C=ae(e.id);_!==null&&(lD(_,C,()=>{t=null,e.close()}),Xe(()=>{cD(_,C)}))}),Re(()=>{e.open()&&xe(()=>{const _=ae(e.group);_!==null&&uD(_,ae(e.id))})}),Re(()=>{if(!ae(e.openOnHover))return;const _=ae(e.trigger);if(!_)return;const C=F=>Uk(()=>m("hover",F)),L=F=>{n=!0,b("click",F)},N=F=>{t!=="hover"&&b("leave",F)};_.addEventListener("pointerenter",C),_.addEventListener("pointerdown",L),_.addEventListener("pointerleave",N),Xe(()=>{_.removeEventListener("pointerenter",C),_.removeEventListener("pointerdown",L),_.removeEventListener("pointerleave",N)})}),Re(()=>{if(!ae(e.openOnFocus))return;const _=ae(e.trigger);if(!_)return;const C=N=>m("focus",N),L=N=>b("blur",N);_.addEventListener("focus",C),_.addEventListener("blur",L),Xe(()=>{_.removeEventListener("focus",C),_.removeEventListener("blur",L)})}),Re(()=>{if(!ae(e.hoverableContent))return;const _=ae(e.content);if(!_)return;const C=L=>{L.pointerType!=="touch"&&t==="focus"&&(t="hover")};_.addEventListener("pointerdown",C),Xe(()=>{_.removeEventListener("pointerdown",C)})});const m=(_,C)=>{var L,N;switch(T(),_){case"focus":if(n)return;t="focus",(L=e.onFocus)==null||L.call(e,C),ae(e.closeOnScroll)&&document.addEventListener("scroll",A,{capture:!0}),document.addEventListener("pointermove",w);break;case"hover":const F=C;if(F.pointerType==="touch"||t==="focus"||t==="hover")return;const Y=ae(e.openDelay);Y<=0||u()?(t="hover",(N=e.onHover)==null||N.call(e,F),o=!0,ae(e.closeOnScroll)&&document.addEventListener("scroll",A,{capture:!0}),document.addEventListener("pointermove",w)):(t="entering",document.addEventListener("pointermove",w),i=setTimeout(()=>{var re;if(!o){t=null;return}i=null,t="hover",(re=e.onHover)==null||re.call(e,F),o=!0,ae(e.closeOnScroll)&&document.addEventListener("scroll",A,{capture:!0})},Y));break}},b=(_,C)=>{var L,N,F,Y;switch(T(),_){case"blur":if(n=!1,o){t="hover";return}t=null,(L=e.onBlur)==null||L.call(e,C);break;case"leave":if(t!=="hover")return;const re=ae(e.closeDelay);re<=0?(S(),t=null,(N=e.onLeave)==null||N.call(e,C)):i=setTimeout(()=>{var he;i=null,!o&&(S(),t=null,(he=e.onLeave)==null||he.call(e,C))},re);break;case"click":if(!ae(e.closeOnPointerDown))return;t=null,(F=e.onPointerDown)==null||F.call(e,C);break;case"scroll":t=null,(Y=e.onScroll)==null||Y.call(e,C);break}},w=_=>{const C=[],L=ae(e.trigger);if(!L)return;if(C.push(...hp(L.getBoundingClientRect())),ae(e.hoverableContent)){const F=ae(e.content);F&&C.push(...hp(F.getBoundingClientRect()))}const N=hD(C);if(t===null){document.removeEventListener("pointermove",w);return}dD({x:_.clientX,y:_.clientY},N)?o=!0:o&&t==="hover"?(o=!1,b("leave",_)):o=!1},A=_=>{const C=ae(e.trigger);if(t===null||!C){document.removeEventListener("scroll",A);return}_.target.contains(C)&&b("scroll",_)},T=()=>{i!==null&&(clearTimeout(i),i=null)},S=()=>{const _=ae(e.skipDelayDuration);if(_>0){const C=p();C!==null&&(clearTimeout(C),h(null)),f(!0),h(setTimeout(()=>{h(null),f(!1)},_))}}},hp=e=>[{x:e.left,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.top},{x:e.right,y:e.bottom}],dD=(e,t)=>{let n=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,c=t[i].y,u=t[o].x,f=t[o].y;e.y<c!=e.y<f&&e.x<a+(e.y-c)/(f-c)*(u-a)&&(n=!n)}return n},hD=e=>{if(e.sort((i,o)=>i.x<o.x?-1:i.x>o.x?1:i.y<o.y?-1:i.y>o.y?1:0),e.length<=1)return e;const t=[];for(const i of e){for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const o=e[i];for(;n.length>=2;){const a=n[n.length-1],c=n[n.length-2];if((a.x-c.x)*(o.y-c.y)>=(a.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}return n.pop(),t.length==1&&n.length==1&&t[0].x==n[0].x&&t[0].y==n[0].y?t:t.concat(n)},pD=fD,om=sr(),gD=e=>e===void 0?om:Gg(`tooltip-${e}`),mD=e=>{if(e===void 0){const n=On(om);if(!n)throw new Error("[corvu]: Tooltip context not found. Make sure to wrap Tooltip components in <Tooltip.Root>");return n}const t=Vg(`tooltip-${e}`);if(!t)throw new Error(`[corvu]: Tooltip context with id "${e}" not found. Make sure to wrap Tooltip components in <Tooltip.Root contextId="${e}">`);return t},am=sr(),vD=e=>e===void 0?am:Gg(`tooltip-internal-${e}`),xo=e=>{if(e===void 0){const n=On(am);if(!n)throw new Error("[corvu]: Tooltip context not found. Make sure to wrap Tooltip components in <Tooltip.Root>");return n}const t=Vg(`tooltip-internal-${e}`);if(!t)throw new Error(`[corvu]: Tooltip context with id "${e}" not found. Make sure to wrap Tooltip components in <Tooltip.Root contextId="${e}">`);return t},yD=e=>{const[t,n]=en(e,["contextId","ref"]),i=de(()=>xo(t.contextId));return B(hl,qe({as:"div",ref(o){var a=wo(i().setAnchorRef,t.ref);typeof a=="function"&&a(o)},"data-corvu-tooltip-anchor":""},n))},bD=yD,wD=e=>{const[t,n]=en(e,["contextId","ref"]),i=de(()=>xo(t.contextId));return B(Zk,qe({get floatingState(){return i().floatingState()},ref(o){var a=wo(i().setArrowRef,t.ref);typeof a=="function"&&a(o)},"data-corvu-tooltip-arrow":""},n))},_D=wD,xD=e=>{const[t,n]=en(e,["forceMount","contextId","ref","style"]),i=de(()=>xo(t.contextId)),o=()=>Zg(i().open,()=>t.forceMount,i().contentPresent),a=de(()=>i().open()||i().contentPresent());return B(lP,{get element(){return i().contentRef},get enabled(){return a()},get dismissibleId(){return i().tooltipId()},onDismiss:()=>i().setOpen(!1),get dismissOnEscapeKeyDown(){return i().closeOnEscapeKeyDown},dismissOnOutsideFocus:!1,dismissOnOutsidePointer:!1,noOutsidePointerEvents:!1,get onEscapeKeyDown(){return i().onEscapeKeyDown},children:c=>B(Qt,{get when(){return o()},get children(){return B(hl,qe({as:"div",ref(u){var f=wo(i().setContentRef,t.ref);typeof f=="function"&&f(u)},get style(){return Kg({...Bk({strategy:()=>i().strategy(),floatingState:()=>i().floatingState()})(),"pointer-events":c.isLastLayer?"auto":void 0},t.style)},get id(){return i().tooltipId()},role:"tooltip",get"data-closed"(){return Ja(!i().open())},get"data-open"(){return Ja(i().open())},get"data-placement"(){return i().floatingState().placement},"data-corvu-tooltip-content":""},n))}})})},SD=xD,AD=e=>{const[t,n]=en(e,["forceMount","contextId"]),i=de(()=>xo(t.contextId)),o=()=>Zg(i().open,()=>t.forceMount,i().contentPresent);return B(Qt,{get when(){return o()},get children(){return B(Ep,n)}})},TD=AD,CD=e=>{const t=qe({initialOpen:!1,placement:"bottom",strategy:"absolute",floatingOptions:{flip:!0,shift:!0},openDelay:500,closeDelay:0,skipDelayDuration:0,hoverableContent:!0,group:null,openOnFocus:!0,openOnHover:!0,closeOnEscapeKeyDown:!0,closeOnPointerDown:!0,closeOnScroll:!0,tooltipId:go()},e),[n,i]=uP({value:()=>t.open,initialValue:t.initialOpen,onChange:t.onOpenChange}),[o,a]=J(null),[c,u]=J(null),[f,h]=J(null),[p,m]=J(null),{present:b}=aD({show:n,element:f}),w=nD({enabled:b,floating:f,reference:()=>o()??c()??null,arrow:p,placement:()=>t.placement,strategy:()=>t.strategy,options:()=>t.floatingOptions});pD({id:()=>t.tooltipId,group:()=>t.group,open:n,close:()=>i(!1),trigger:c,content:f,openOnFocus:()=>t.openOnFocus,openOnHover:()=>t.openOnHover,closeOnPointerDown:()=>t.closeOnPointerDown,closeOnScroll:()=>t.closeOnScroll,hoverableContent:()=>t.hoverableContent,openDelay:()=>t.openDelay,closeDelay:()=>t.closeDelay,skipDelayDuration:()=>t.skipDelayDuration,onHover:C=>{qi(t.onHover,C)||i(!0)},onLeave:C=>{qi(t.onLeave,C)||i(!1)},onFocus:C=>{qi(t.onFocus,C)||i(!0)},onBlur:C=>{qi(t.onBlur,C)||i(!1)},onPointerDown:C=>{qi(t.onPointerDown,C)||i(!1)},onScroll:C=>{qi(t.onScroll,C)||i(!1)}});const A={get open(){return n()},setOpen:i,get placement(){return t.placement},get strategy(){return t.strategy},get floatingOptions(){return t.floatingOptions},get floatingState(){return w()},get openDelay(){return t.openDelay},get closeDelay(){return t.closeDelay},get skipDelayDuration(){return t.skipDelayDuration},get hoverableContent(){return t.hoverableContent},get group(){return t.group},get openOnFocus(){return t.openOnFocus},get openOnHover(){return t.openOnHover},get closeOnEscapeKeyDown(){return t.closeOnEscapeKeyDown},get closeOnPointerDown(){return t.closeOnPointerDown},get contentPresent(){return b()},get contentRef(){return f()},get tooltipId(){return t.tooltipId}},T=iD(()=>t.children),S=()=>{const C=T()();return qg(C)?C(A):C};return de(()=>{const C=gD(t.contextId),L=vD(t.contextId);return xe(()=>B(C.Provider,{value:{open:n,setOpen:i,placement:()=>t.placement,strategy:()=>t.strategy,floatingOptions:()=>t.floatingOptions,floatingState:w,openDelay:()=>t.openDelay,closeDelay:()=>t.closeDelay,skipDelayDuration:()=>t.skipDelayDuration,hoverableContent:()=>t.hoverableContent,group:()=>t.group,openOnFocus:()=>t.openOnFocus,openOnHover:()=>t.openOnHover,closeOnEscapeKeyDown:()=>t.closeOnEscapeKeyDown,closeOnPointerDown:()=>t.closeOnPointerDown,contentPresent:b,contentRef:f,tooltipId:()=>t.tooltipId},get children(){return B(L.Provider,{get value(){return{open:n,setOpen:i,placement:()=>t.placement,strategy:()=>t.strategy,floatingOptions:()=>t.floatingOptions,floatingState:w,openDelay:()=>t.openDelay,closeDelay:()=>t.closeDelay,skipDelayDuration:()=>t.skipDelayDuration,hoverableContent:()=>t.hoverableContent,group:()=>t.group,openOnFocus:()=>t.openOnFocus,openOnHover:()=>t.openOnHover,closeOnEscapeKeyDown:()=>t.closeOnEscapeKeyDown,closeOnPointerDown:()=>t.closeOnPointerDown,contentPresent:b,contentRef:f,tooltipId:()=>t.tooltipId,onFocus:t.onFocus,onBlur:t.onBlur,onPointerDown:t.onPointerDown,onEscapeKeyDown:t.onEscapeKeyDown,setAnchorRef:a,setTriggerRef:u,setContentRef:h,setArrowRef:m}},get children(){return xe(()=>S())}})}}))})},OD=CD,ED=e=>{const[t,n]=en(e,["contextId","ref"]),i=de(()=>xo(t.contextId));return B($k,qe({ref(o){var a=wo(i().setTriggerRef,t.ref);typeof a=="function"&&a(o)},get"aria-describedby"(){return de(()=>!!i().open())()?i().tooltipId():void 0},get"aria-expanded"(){return i().open()?"true":"false"},get"data-closed"(){return Ja(!i().open())},get"data-open"(){return Ja(i().open())},get"data-placement"(){return de(()=>!!i().open())()?i().floatingState().placement:void 0},"data-corvu-tooltip-trigger":""},n))},kD=ED,PD=Object.assign(OD,{Anchor:bD,Trigger:kD,Portal:TD,Content:SD,Arrow:_D,useContext:mD}),Gi=PD,DD=Me('<div class="card-body gap-1 space-y-1 p-2.5"><h2 class="card-title line-clamp-1 break-all text-start text-sm"></h2><div class="card-actions items-center justify-between gap-1"><div class="badge badge-secondary px-1 text-xs font-bold capitalize">'),ID=Me('<div class="flex flex-col items-center gap-2 rounded-box bg-neutral bg-gradient-to-br from-primary to-secondary p-2.5 text-primary-content shadow-lg"><h2 class="text-lg font-bold"></h2><div class="w-full text-xs uppercase"></div><ul class="timeline timeline-vertical timeline-compact timeline-snap-icon">'),pp=Me("<hr>"),RD=Me('<li><div class="timeline-start space-y-2"><time class="text-sm italic"></time><div></div></div><div class=timeline-middle>');const tR=e=>{const{proxyName:t,isSelected:n,onClick:i}=e,{proxyNodeMap:o,proxyLatencyTest:a,proxyLatencyTestingMap:c,getLatencyHistoryByName:u}=al(),f=de(()=>o()[t]),h=de(()=>{var b;return WT((b=f())==null?void 0:b.type)?`(${[f().xudp&&"xudp",f().udp&&"udp",f().tfo&&"TFO"].filter(Boolean).join(" / ")})`:null}),p=de(()=>[t,h()].filter(Boolean).join(" - ")),m=u(e.proxyName,e.testUrl);return B(Gi,{placement:"top",floatingOptions:{autoPlacement:!0,shift:!0,offset:10},get children(){return B(Gi.Anchor,{get class(){return Cr("card bg-neutral text-neutral-content",n&&"bg-gradient-to-br from-primary to-secondary text-primary-content",i&&"cursor-pointer")},get title(){return p()},get children(){return[B(Gi.Trigger,{get children(){var b=DD(),w=b.firstChild,A=w.nextSibling,T=A.firstChild;return Tp(b,"click",i,!0),te(w,t),te(T,()=>{var S;return zT((S=f())==null?void 0:S.type)}),te(A,B(xk,{get proxyName(){return e.proxyName},get testUrl(){return e.testUrl||null},get class(){return Cr(c()[t]&&"animate-pulse")},onClick:S=>{S.stopPropagation(),a(t,f().provider,e.testUrl,e.timeout)}}),null),b}}),B(Gi.Portal,{get mount(){return iT()},get children(){return B(Gi.Content,{class:"z-50",get children(){return[B(Gi.Arrow,{class:"text-neutral"}),(()=>{var b=ID(),w=b.firstChild,A=w.nextSibling,T=A.nextSibling;return te(w,t),te(A,h),te(T,B(Zr,{each:m,children:(S,_)=>(()=>{var C=RD(),L=C.firstChild,N=L.firstChild,F=N.nextSibling,Y=L.nextSibling;return te(C,B(Qt,{get when(){return _()>0},get children(){return pp()}}),L),te(N,()=>Dp(S.time).format("YYYY-MM-DD HH:mm:ss")),te(F,()=>S.delay||"---"),te(Y,B(nO,{class:"size-4"})),te(C,B(Qt,{get when(){return _()!==m.length-1},get children(){return pp()}}),null),ze(()=>er(F,Cr("badge block",pg(S.delay)))),C})()})),b})()]}})}})]}})}})};Oi(["click"]);var LD=Me('<div><div class="flex-1 overflow-y-auto p-2 sm:p-4">');const MD=()=>{const e=gg("connections");return Re(()=>tT(e())),null},$D=({children:e})=>{const t=kS();return Re(()=>{DA()&&mg(t()?MA():RA())}),(()=>{var n=LD(),i=n.firstChild;return ti(o=>sT(o),n),te(n,B(wk,{}),i),te(i,e),te(n,B(Qt,{get when(){return!!vo()},get children(){return B(MD,{})}}),null),ze(o=>{var a=Cr("relative flex h-screen flex-col overscroll-y-none subpixel-antialiased",kA()?"font-twemoji":"font-no-twemoji"),c=uC();return a!==o.e&&er(n,o.e=a),c!==o.t&&dn(n,"data-theme",o.t=c),o},{e:void 0,t:void 0}),n})()},ND=Ci(()=>Ti(()=>import("./Setup-CdphtcBj.js"),__vite__mapDeps([0,1]),import.meta.url)),gp=Ci(()=>Ti(()=>import("./Overview-B99qGorf.js"),__vite__mapDeps([2,1]),import.meta.url)),FD=Ci(()=>Ti(()=>import("./Connections-N_Z6THP_.js"),__vite__mapDeps([3,4,1,5]),import.meta.url)),UD=Ci(()=>Ti(()=>import("./Logs-uIQcQmXC.js"),__vite__mapDeps([6,4,1]),import.meta.url)),BD=Ci(()=>Ti(()=>import("./Proxies-Lk5uJ4LX.js"),__vite__mapDeps([7,1,5,8]),import.meta.url)),zD=Ci(()=>Ti(()=>import("./Rules-C4_l0aqo.js"),__vite__mapDeps([9,1,5,8]),import.meta.url)),WD=Ci(()=>Ti(()=>import("./Config-9NNS9COU.js"),__vite__mapDeps([10,1]),import.meta.url));Dp.extend(B1);m1(()=>B(UT,{get locale(){return FT()},get children(){return[B(P1,{get children(){return B(nk,{root:$D,get children(){return[B(jr,{get path(){return zt.Setup},component:ND}),B(jr,{path:"*",component:gp}),B(jr,{get path(){return zt.Overview},component:gp}),B(jr,{get path(){return zt.Proxies},component:BD}),B(jr,{get path(){return zt.Rules},component:zD}),B(jr,{get path(){return zt.Conns},component:FD}),B(jr,{get path(){return zt.Log},component:UD}),B(jr,{get path(){return zt.Config},component:WD})]}})}}),B(lS,{position:"bottom-center"})]}}),document.querySelector("#root"));export{AI as $,J as A,hi as B,gg as C,de as D,us as E,Zr as F,GD as G,Gp as H,Sg as I,rg as J,ei as K,An as L,vA as M,hn as N,xg as O,tg as P,Ek as Q,_I as R,Qt as S,it as T,Yp as U,AT as V,Dp as W,Qp as X,er as Y,Cr as Z,s1 as _,Wg as a,zI as a$,tO as a0,Tp as a1,cI as a2,aI as a3,uI as a4,lI as a5,QI as a6,gI as a7,NA as a8,dn as a9,eI as aA,JD as aB,KD as aC,Kp as aD,yI as aE,wI as aF,OA as aG,Sr as aH,Ih as aI,YD as aJ,QD as aK,SA as aL,VD as aM,vI as aN,bI as aO,o1 as aP,da as aQ,$n as aR,xk as aS,al as aT,Bp as aU,VI as aV,GI as aW,zT as aX,XI as aY,tR as aZ,BI as a_,QA as aa,VC as ab,wa as ac,dI as ad,Hr as ae,hI as af,Jp as ag,pI as ah,yA as ai,fI as aj,Dh as ak,ZA as al,xI as am,yu as an,dh as ao,be as ap,ZD as aq,xe as ar,qD as as,Zc as at,KC as au,nI as av,tI as aw,mI as ax,XD as ay,pi as az,JI as b,WI as b0,q1 as b1,vu as b2,sl as b3,FT as b4,Vx as b5,yt as b6,FI as b7,TI as b8,DI as b9,HI as bA,UI as bB,HD as bC,OI as ba,II as bb,PI as bc,$I as bd,CI as be,RI as bf,kI as bg,MI as bh,EI as bi,LI as bj,Ks as bk,kA as bl,rI as bm,qI as bn,zt as bo,DA as bp,iI as bq,sI as br,mA as bs,RA as bt,oI as bu,MA as bv,en as bw,Wt as bx,NI as by,jI as bz,zC as c,B as d,aC as e,ti as f,ze as g,SI as h,te as i,oC as j,KI as k,Oi as l,ZI as m,cn as n,vs as o,Xe as p,qe as q,Re as r,YI as s,Me as t,ol as u,jC as v,rl as w,bi as x,vo as y,Bc as z};
|