@tapflowio/relay 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RelayServer.d.ts +81 -3
- package/dist/RelayServer.d.ts.map +1 -1
- package/dist/RelayServer.js +278 -17
- package/dist/RelayServer.js.map +1 -1
- package/dist/SessionManager.d.ts +5 -3
- package/dist/SessionManager.d.ts.map +1 -1
- package/dist/SessionManager.js +3 -1
- package/dist/SessionManager.js.map +1 -1
- package/dist/api/auth.d.ts +2 -1
- package/dist/api/auth.d.ts.map +1 -1
- package/dist/api/auth.js +1 -1
- package/dist/api/auth.js.map +1 -1
- package/dist/api/passwordReset.d.ts +2 -1
- package/dist/api/passwordReset.d.ts.map +1 -1
- package/dist/api/passwordReset.js +1 -1
- package/dist/api/passwordReset.js.map +1 -1
- package/dist/api/team.d.ts +3 -2
- package/dist/api/team.d.ts.map +1 -1
- package/dist/api/team.js +2 -2
- package/dist/api/team.js.map +1 -1
- package/dist/api/tokens.d.ts +2 -1
- package/dist/api/tokens.d.ts.map +1 -1
- package/dist/api/tokens.js +1 -1
- package/dist/api/tokens.js.map +1 -1
- package/dist/lib/connectionAuth.d.ts +29 -0
- package/dist/lib/connectionAuth.d.ts.map +1 -1
- package/dist/lib/connectionAuth.js +15 -0
- package/dist/lib/connectionAuth.js.map +1 -1
- package/dist/lib/webhookTransport.d.ts +29 -0
- package/dist/lib/webhookTransport.d.ts.map +1 -0
- package/dist/lib/webhookTransport.js +86 -0
- package/dist/lib/webhookTransport.js.map +1 -0
- package/dist/lib/webhookUrl.d.ts +6 -0
- package/dist/lib/webhookUrl.d.ts.map +1 -1
- package/dist/lib/webhookUrl.js +50 -14
- package/dist/lib/webhookUrl.js.map +1 -1
- package/dist/lib/webhooks.d.ts +2 -10
- package/dist/lib/webhooks.d.ts.map +1 -1
- package/dist/lib/webhooks.js +8 -3
- package/dist/lib/webhooks.js.map +1 -1
- package/package.json +6 -6
- package/public/assets/{AppCenter-DZCsC2wa.js → AppCenter-BMdYtQbV.js} +7 -7
- package/public/assets/AppCenter-BMdYtQbV.js.br +0 -0
- package/public/assets/AppCenter-BMdYtQbV.js.gz +0 -0
- package/public/assets/Default-0DHHVGaN.js +1 -0
- package/public/assets/Default-0DHHVGaN.js.br +0 -0
- package/public/assets/Default-0DHHVGaN.js.gz +0 -0
- package/public/assets/Invite-C0ZB_HiU.js +1 -0
- package/public/assets/Invite-C0ZB_HiU.js.br +0 -0
- package/public/assets/Invite-C0ZB_HiU.js.gz +0 -0
- package/public/assets/{MacResources-B0DQ9ISE.js → MacResources-DmY5pRV2.js} +1 -1
- package/public/assets/MacResources-DmY5pRV2.js.br +0 -0
- package/public/assets/MacResources-DmY5pRV2.js.gz +0 -0
- package/public/assets/QASession-2QogWEX7.js +150 -0
- package/public/assets/QASession-2QogWEX7.js.br +0 -0
- package/public/assets/QASession-2QogWEX7.js.gz +0 -0
- package/public/assets/ResetPassword-jNRuertx.js +1 -0
- package/public/assets/ResetPassword-jNRuertx.js.br +0 -0
- package/public/assets/ResetPassword-jNRuertx.js.gz +0 -0
- package/public/assets/Setup-CF_FN9Dt.js +1 -0
- package/public/assets/Setup-CF_FN9Dt.js.br +0 -0
- package/public/assets/Setup-CF_FN9Dt.js.gz +0 -0
- package/public/assets/Team-BbiyOGau.js +6 -0
- package/public/assets/Team-BbiyOGau.js.br +0 -0
- package/public/assets/Team-BbiyOGau.js.gz +0 -0
- package/public/assets/Tokens-CZo4sPTx.js +1 -0
- package/public/assets/Tokens-CZo4sPTx.js.br +0 -0
- package/public/assets/Tokens-CZo4sPTx.js.gz +0 -0
- package/public/assets/alert-dialog-DFz8G_zu.js +1 -0
- package/public/assets/alert-dialog-DFz8G_zu.js.br +0 -0
- package/public/assets/alert-dialog-DFz8G_zu.js.gz +0 -0
- package/public/assets/badge-B3vaBVIQ.js +1 -0
- package/public/assets/badge-B3vaBVIQ.js.br +0 -0
- package/public/assets/badge-B3vaBVIQ.js.gz +0 -0
- package/public/assets/{build-format-fzt-JrUX.js → build-format-dbQPU3A4.js} +3 -3
- package/public/assets/build-format-dbQPU3A4.js.br +0 -0
- package/public/assets/build-format-dbQPU3A4.js.gz +0 -0
- package/public/assets/{dialog-DQkbaw8h.js → dialog-DeBPk-I3.js} +5 -5
- package/public/assets/dialog-DeBPk-I3.js.br +0 -0
- package/public/assets/dialog-DeBPk-I3.js.gz +0 -0
- package/public/assets/field-hint-CMKmbVpy.js +1 -0
- package/public/assets/field-hint-CMKmbVpy.js.br +0 -0
- package/public/assets/field-hint-CMKmbVpy.js.gz +0 -0
- package/public/assets/index-B4w4Lh3e.js +218 -0
- package/public/assets/index-B4w4Lh3e.js.br +0 -0
- package/public/assets/index-B4w4Lh3e.js.gz +0 -0
- package/public/assets/index-CDWu0GQL.css +1 -0
- package/public/assets/index-CDWu0GQL.css.br +0 -0
- package/public/assets/index-CDWu0GQL.css.gz +0 -0
- package/public/assets/list-view-BvINA5t4.js +1 -0
- package/public/assets/list-view-BvINA5t4.js.br +0 -0
- package/public/assets/list-view-BvINA5t4.js.gz +0 -0
- package/public/assets/{pencil-BJcOp3oN.js → pencil-CycAOoC_.js} +2 -2
- package/public/assets/pencil-CycAOoC_.js.br +0 -0
- package/public/assets/pencil-CycAOoC_.js.gz +0 -0
- package/public/assets/resource-health-C1qSG3MK.js +1 -0
- package/public/assets/resource-health-C1qSG3MK.js.br +0 -0
- package/public/assets/resource-health-C1qSG3MK.js.gz +0 -0
- package/public/assets/{trash-DhBxh6H7.js → trash-BXQnOI5U.js} +3 -3
- package/public/assets/trash-BXQnOI5U.js.br +0 -0
- package/public/assets/trash-BXQnOI5U.js.gz +0 -0
- package/public/index.html +2 -2
- package/public/index.html.br +0 -0
- package/public/index.html.gz +0 -0
- package/public/assets/AppCenter-DZCsC2wa.js.br +0 -0
- package/public/assets/AppCenter-DZCsC2wa.js.gz +0 -0
- package/public/assets/Default-xD9Fmd5X.js +0 -1
- package/public/assets/Default-xD9Fmd5X.js.br +0 -0
- package/public/assets/Default-xD9Fmd5X.js.gz +0 -0
- package/public/assets/Invite-29Erwv8j.js +0 -1
- package/public/assets/Invite-29Erwv8j.js.br +0 -0
- package/public/assets/Invite-29Erwv8j.js.gz +0 -0
- package/public/assets/MacResources-B0DQ9ISE.js.br +0 -0
- package/public/assets/MacResources-B0DQ9ISE.js.gz +0 -0
- package/public/assets/QASession-D-n6PXuD.js +0 -150
- package/public/assets/QASession-D-n6PXuD.js.br +0 -0
- package/public/assets/QASession-D-n6PXuD.js.gz +0 -0
- package/public/assets/ResetPassword-BnPIwTYH.js +0 -1
- package/public/assets/ResetPassword-BnPIwTYH.js.br +0 -0
- package/public/assets/ResetPassword-BnPIwTYH.js.gz +0 -0
- package/public/assets/Setup-DmUGFblg.js +0 -1
- package/public/assets/Setup-DmUGFblg.js.br +0 -0
- package/public/assets/Setup-DmUGFblg.js.gz +0 -0
- package/public/assets/Team-BpvRgFfZ.js +0 -6
- package/public/assets/Team-BpvRgFfZ.js.br +0 -0
- package/public/assets/Team-BpvRgFfZ.js.gz +0 -0
- package/public/assets/Tokens-x6BtCcL7.js +0 -1
- package/public/assets/Tokens-x6BtCcL7.js.br +0 -0
- package/public/assets/Tokens-x6BtCcL7.js.gz +0 -0
- package/public/assets/alert-dialog-C8wDimW-.js +0 -1
- package/public/assets/alert-dialog-C8wDimW-.js.br +0 -0
- package/public/assets/alert-dialog-C8wDimW-.js.gz +0 -0
- package/public/assets/badge-CWVbeuH3.js +0 -1
- package/public/assets/badge-CWVbeuH3.js.br +0 -0
- package/public/assets/badge-CWVbeuH3.js.gz +0 -0
- package/public/assets/build-format-fzt-JrUX.js.br +0 -0
- package/public/assets/build-format-fzt-JrUX.js.gz +0 -0
- package/public/assets/dialog-DQkbaw8h.js.br +0 -0
- package/public/assets/dialog-DQkbaw8h.js.gz +0 -0
- package/public/assets/index-C1Fo8g_c.js +0 -218
- package/public/assets/index-C1Fo8g_c.js.br +0 -0
- package/public/assets/index-C1Fo8g_c.js.gz +0 -0
- package/public/assets/index-C2F1AgwB.css +0 -1
- package/public/assets/index-C2F1AgwB.css.br +0 -0
- package/public/assets/index-C2F1AgwB.css.gz +0 -0
- package/public/assets/list-view-DxI397-H.js +0 -1
- package/public/assets/list-view-DxI397-H.js.br +0 -0
- package/public/assets/list-view-DxI397-H.js.gz +0 -0
- package/public/assets/pencil-BJcOp3oN.js.br +0 -0
- package/public/assets/pencil-BJcOp3oN.js.gz +0 -0
- package/public/assets/resource-health-Cq3gqqVd.js +0 -1
- package/public/assets/resource-health-Cq3gqqVd.js.br +0 -0
- package/public/assets/resource-health-Cq3gqqVd.js.gz +0 -0
- package/public/assets/trash-DhBxh6H7.js.br +0 -0
- package/public/assets/trash-DhBxh6H7.js.gz +0 -0
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Setup-DmUGFblg.js","assets/vendor-react-BlPSzrEe.js","assets/vendor-router-B_lVHrKl.js","assets/Invite-29Erwv8j.js","assets/pencil-BJcOp3oN.js","assets/ResetPassword-BnPIwTYH.js","assets/AppCenter-DZCsC2wa.js","assets/build-format-fzt-JrUX.js","assets/dialog-DQkbaw8h.js","assets/trash-DhBxh6H7.js","assets/badge-CWVbeuH3.js","assets/alert-dialog-C8wDimW-.js","assets/useFocusAfterSwap-BY3N9f9v.js","assets/QASession-D-n6PXuD.js","assets/resource-health-Cq3gqqVd.js","assets/publicLink-D6zKS_wu.js","assets/MacResources-B0DQ9ISE.js","assets/vendor-charts-BykzUV2D.js","assets/Default-xD9Fmd5X.js","assets/Team-BpvRgFfZ.js","assets/list-view-DxI397-H.js","assets/Tokens-x6BtCcL7.js","assets/NotFound-wHOnT2Fl.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var Za=e=>{throw TypeError(e)};var vs=(e,n,t)=>n.has(e)||Za("Cannot "+t);var x=(e,n,t)=>(vs(e,n,"read from private field"),t?t.call(e):n.get(e)),ee=(e,n,t)=>n.has(e)?Za("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),H=(e,n,t,r)=>(vs(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),ue=(e,n,t)=>(vs(e,n,"access private method"),t);var ho=(e,n,t,r)=>({set _(o){H(e,n,o,t)},get _(){return x(e,n,r)}});import{k as h,j as g,R as T,b as zh,a as _r,f as J,r as Tl,u as Fh,o as Lh,s as Vh,g as Uh,m as Zh,c as Bh,i as Kh,l as Wh,d as Hh,e as Gh}from"./vendor-react-BlPSzrEe.js";import{u as Il,b as Al,L as po,N as zi,O as qh,R as ft,a as Qh,B as Jh}from"./vendor-router-B_lVHrKl.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function t(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=t(o);fetch(o.href,s)}})();var Yh=(e,n,t,r,o,s,i,a)=>{let c=document.documentElement,u=["light","dark"];function d(p){(Array.isArray(e)?e:[e]).forEach(m=>{let v=m==="class",y=v&&s?o.map(b=>s[b]||b):o;v?(c.classList.remove(...y),c.classList.add(s&&s[p]?s[p]:p)):c.setAttribute(m,p)}),l(p)}function l(p){a&&u.includes(p)&&(c.style.colorScheme=p)}function f(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)d(r);else try{let p=localStorage.getItem(n)||t,m=i&&p==="system"?f():p;d(m)}catch{}},Ba=["light","dark"],Dl="(prefers-color-scheme: dark)",Xh=typeof window>"u",Fi=h.createContext(void 0),ep={setTheme:e=>{},themes:[]},Xo=()=>{var e;return(e=h.useContext(Fi))!=null?e:ep},tp=e=>h.useContext(Fi)?h.createElement(h.Fragment,null,e.children):h.createElement(rp,{...e}),np=["light","dark"],rp=({forcedTheme:e,disableTransitionOnChange:n=!1,enableSystem:t=!0,enableColorScheme:r=!0,storageKey:o="theme",themes:s=np,defaultTheme:i=t?"system":"light",attribute:a="data-theme",value:c,children:u,nonce:d,scriptProps:l})=>{let[f,p]=h.useState(()=>sp(o,i)),[m,v]=h.useState(()=>f==="system"?ys():f),y=c?Object.values(c):s,b=h.useCallback(E=>{let O=E;if(!O)return;E==="system"&&t&&(O=ys());let I=c?c[O]:O,A=n?ip(d):null,R=document.documentElement,$=F=>{F==="class"?(R.classList.remove(...y),I&&R.classList.add(I)):F.startsWith("data-")&&(I?R.setAttribute(F,I):R.removeAttribute(F))};if(Array.isArray(a)?a.forEach($):$(a),r){let F=Ba.includes(i)?i:null,M=Ba.includes(O)?O:F;R.style.colorScheme=M}A==null||A()},[d]),_=h.useCallback(E=>{let O=typeof E=="function"?E(f):E;p(O);try{localStorage.setItem(o,O)}catch{}},[f]),k=h.useCallback(E=>{let O=ys(E);v(O),f==="system"&&t&&!e&&b("system")},[f,e]);h.useEffect(()=>{let E=window.matchMedia(Dl);return E.addListener(k),k(E),()=>E.removeListener(k)},[k]),h.useEffect(()=>{let E=O=>{O.key===o&&(O.newValue?p(O.newValue):_(i))};return window.addEventListener("storage",E),()=>window.removeEventListener("storage",E)},[_]),h.useEffect(()=>{b(e??f)},[e,f]);let S=h.useMemo(()=>({theme:f,setTheme:_,forcedTheme:e,resolvedTheme:f==="system"?m:f,themes:t?[...s,"system"]:s,systemTheme:t?m:void 0}),[f,_,e,m,t,s]);return h.createElement(Fi.Provider,{value:S},h.createElement(op,{forcedTheme:e,storageKey:o,attribute:a,enableSystem:t,enableColorScheme:r,defaultTheme:i,value:c,themes:s,nonce:d,scriptProps:l}),u)},op=h.memo(({forcedTheme:e,storageKey:n,attribute:t,enableSystem:r,enableColorScheme:o,defaultTheme:s,value:i,themes:a,nonce:c,scriptProps:u})=>{let d=JSON.stringify([t,n,s,e,a,i,r,o]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${Yh.toString()})(${d})`}})}),sp=(e,n)=>{if(Xh)return;let t;try{t=localStorage.getItem(e)||void 0}catch{}return t||n},ip=e=>{let n=document.createElement("style");return e&&n.setAttribute("nonce",e),n.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(n),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(n)},1)}},ys=e=>(e||(e=window.matchMedia(Dl)),e.matches?"dark":"light");const ap="modulepreload",cp=function(e){return"/"+e},Ka={},Ut=function(n,t,r){let o=Promise.resolve();if(t&&t.length>0){let i=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(l=>({status:"fulfilled",value:l}),l=>({status:"rejected",reason:l}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=i(t.map(u=>{if(u=cp(u),u in Ka)return;Ka[u]=!0;const d=u.endsWith(".css"),l=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${l}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":ap,d||(f.as="script"),f.crossOrigin="",f.href=u,c&&f.setAttribute("nonce",c),document.head.appendChild(f),d)return new Promise((p,m)=>{f.addEventListener("load",p),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return o.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return n().catch(s)})},Nl=h.createContext(void 0),Li=e=>{const n=h.useContext(Nl);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},lp=({client:e,children:n})=>(h.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(Nl.Provider,{value:e,children:n})),up={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var fn,$i,wl,dp=(wl=class{constructor(){ee(this,fn,up);ee(this,$i,!1)}setTimeoutProvider(e){H(this,fn,e)}setTimeout(e,n){return x(this,fn).setTimeout(e,n)}clearTimeout(e){x(this,fn).clearTimeout(e)}setInterval(e,n){return x(this,fn).setInterval(e,n)}clearInterval(e){x(this,fn).clearInterval(e)}},fn=new WeakMap,$i=new WeakMap,wl);const Pn=new dp;function fp(e){setTimeout(e,0)}const hp=typeof window>"u"||"Deno"in globalThis;function at(){}function pp(e,n){return typeof e=="function"?e(n):e}function jl(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ml(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Pe(e,n){return typeof e=="function"?e(n):e}function Wa(e,n){const{type:t="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(n.queryHash!==Vi(i,n.options))return!1}else if(!gr(n.queryKey,i))return!1}if(t!=="all"){const c=n.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof a=="boolean"&&n.isStale()!==a||o&&o!==n.state.fetchStatus||s&&!s(n))}function Ha(e,n){const{exact:t,status:r,predicate:o,mutationKey:s}=e;if(s){if(!n.options.mutationKey)return!1;if(t){if(Zr(n.options.mutationKey)!==Zr(s))return!1}else if(!gr(n.options.mutationKey,s))return!1}return!(r&&n.state.status!==r||o&&!o(n))}function Vi(e,n){return((n==null?void 0:n.queryKeyHashFn)||Zr)(e)}function Zr(e){return JSON.stringify(e,(n,t)=>Ls(t)?Object.keys(t).sort().reduce((r,o)=>(r[o]=t[o],r),{}):t)}function gr(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(Array.isArray(e)&&Array.isArray(n)){if(n.length>e.length)return!1;for(let r=0;r<n.length;r++)if(!gr(e[r],n[r]))return!1;return!0}const t=Object.keys(n);for(const r of t)if(!gr(e[r],n[r]))return!1;return!0}return!1}const mp=Object.prototype.hasOwnProperty;function $l(e,n,t=0){if(e===n)return e;if(t>500)return n;const r=Ga(e)&&Ga(n);if(!r&&!(Ls(e)&&Ls(n)))return n;const o=(r?e:Object.keys(e)).length,s=r?n:Object.keys(n),i=s.length,a=r?new Array(i):{};let c=0;for(let u=0;u<i;u++){const d=r?u:s[u],l=e[d],f=n[d];if(l===f){a[d]=l,(r?u<o:mp.call(e,d))&&c++;continue}if(l===null||f===null||typeof l!="object"||typeof f!="object"){a[d]=f;continue}const p=$l(l,f,t+1);a[d]=p,p===l&&c++}return o===i&&c===o?e:a}function bs(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const t in e)if(e[t]!==n[t])return!1;return!0}function Ga(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ls(e){if(!qa(e))return!1;const n=Object.getPrototypeOf(e),t=n==null?void 0:n.constructor;if(t===void 0)return!0;if(typeof t!="function")return!1;const r=t.prototype;return!(!qa(r)||!r.hasOwnProperty("isPrototypeOf")||n!==Object.prototype)}function qa(e){return Object.prototype.toString.call(e)==="[object Object]"}function gp(e){return new Promise(n=>{Pn.setTimeout(n,e)})}function Vs(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?$l(e,n):n}function jC(e){return e}function vp(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function yp(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const Ui=Symbol();function zl(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===Ui?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Fl(e,n){return typeof e=="function"?e(...n):!!e}function bp(e,n,t){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=n()),r||(r=!0,o.aborted?t():o.addEventListener("abort",t,{once:!0})),o)}),e}let wp=()=>hp;const Zi=()=>wp();var to=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},On,hn,rr,_l,_p=(_l=class extends to{constructor(){super();ee(this,On);ee(this,hn);ee(this,rr);H(this,rr,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){x(this,hn)||this.setEventListener(x(this,rr))}onUnsubscribe(){var n;this.hasListeners()||((n=x(this,hn))==null||n.call(this),H(this,hn,void 0))}setEventListener(n){var t;H(this,rr,n),(t=x(this,hn))==null||t.call(this),H(this,hn,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){x(this,On)!==n&&(H(this,On,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof x(this,On)=="boolean"?x(this,On):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},On=new WeakMap,hn=new WeakMap,rr=new WeakMap,_l);const Bi=new _p,xp=fp;function Sp(){let e=[],n=0,t=a=>{a()},r=a=>{a()},o=xp;const s=a=>{n?e.push(a):o(()=>{t(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(c=>{t(c)})})})};return{batch:a=>{let c;n++;try{c=a()}finally{n--,n||i()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{t=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}const Qe=Sp();var or,pn,sr,xl,Ep=(xl=class extends to{constructor(){super();ee(this,or,!0);ee(this,pn);ee(this,sr);H(this,sr,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n(!0),r=()=>n(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){x(this,pn)||this.setEventListener(x(this,sr))}onUnsubscribe(){var n;this.hasListeners()||((n=x(this,pn))==null||n.call(this),H(this,pn,void 0))}setEventListener(n){var t;H(this,sr,n),(t=x(this,pn))==null||t.call(this),H(this,pn,n(this.setOnline.bind(this)))}setOnline(n){x(this,or)!==n&&(H(this,or,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return x(this,or)}},or=new WeakMap,pn=new WeakMap,sr=new WeakMap,xl);const Vo=new Ep;function Cp(e){return Math.min(1e3*2**e,3e4)}function Ll(e){return(e??"online")==="online"?Vo.isOnline():!0}var Us=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Vl(e){let n=!1,t=0,r,o="pending",s,i;const a=new Promise((_,k)=>{s=_,i=k});a.catch(at);const c=()=>o!=="pending",u=_=>{var k;if(!c()){const S=new Us(_);v(S),(k=e.onCancel)==null||k.call(e,S)}},d=()=>{n=!0},l=()=>{n=!1},f=()=>Bi.isFocused()&&(e.networkMode==="always"||Vo.isOnline())&&e.canRun(),p=()=>Ll(e.networkMode)&&e.canRun(),m=_=>{c()||(r==null||r(),o="resolved",s(_))},v=_=>{c()||(r==null||r(),o="rejected",i(_))},y=()=>new Promise(_=>{var k;r=S=>{(c()||f())&&_(S)},(k=e.onPause)==null||k.call(e)}).then(()=>{var _;r=void 0,c()||(_=e.onContinue)==null||_.call(e)}),b=()=>{if(c())return;let _;const k=t===0?e.initialPromise:void 0;try{_=k??e.fn()}catch(S){_=Promise.reject(S)}Promise.resolve(_).then(m).catch(S=>{var R;if(c())return;const E=e.retry??(Zi()?0:3),O=e.retryDelay??Cp,I=typeof O=="function"?O(t,S):O,A=E===!0||typeof E=="number"&&t<E||typeof E=="function"&&E(t,S);if(n||!A){v(S);return}t++,(R=e.onFail)==null||R.call(e,t,S),gp(I).then(()=>f()?void 0:y()).then(()=>{n?v(S):b()})})};return{promise:a,status:()=>o,cancel:u,continue:()=>(r==null||r(),a),cancelRetry:d,continueRetry:l,canStart:p,start:()=>(p()?b():y().then(b),a)}}var Rn,Sl,Ul=(Sl=class{constructor(){ee(this,Rn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),jl(this.gcTime)&&H(this,Rn,Pn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Zi()?1/0:3e5))}clearGcTimeout(){x(this,Rn)!==void 0&&(Pn.clearTimeout(x(this,Rn)),H(this,Rn,void 0))}},Rn=new WeakMap,Sl);function kp(e){return{onFetch:(n,t)=>{var d,l,f,p,m;const r=n.options,o=(f=(l=(d=n.fetchOptions)==null?void 0:d.meta)==null?void 0:l.fetchMore)==null?void 0:f.direction,s=((p=n.state.data)==null?void 0:p.pages)||[],i=((m=n.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const u=async()=>{let v=!1;const y=k=>{bp(k,()=>n.signal,()=>v=!0)},b=zl(n.options,n.fetchOptions),_=async(k,S,E)=>{if(v)return Promise.reject(n.signal.reason);if(S==null&&k.pages.length)return Promise.resolve(k);const I=(()=>{const F={client:n.client,queryKey:n.queryKey,pageParam:S,direction:E?"backward":"forward",meta:n.options.meta};return y(F),F})(),A=await b(I),{maxPages:R}=n.options,$=E?yp:vp;return{pages:$(k.pages,A,R),pageParams:$(k.pageParams,S,R)}};if(o&&s.length){const k=o==="backward",S=k?Pp:Qa,E={pages:s,pageParams:i};a=await _(E,S(r,E),k)}else{const k=e??s.length;do{const S=c===0?i[0]??r.initialPageParam:Qa(r,a);if(c>0&&S==null)break;a=await _(a,S),c++}while(c<k)}return a};n.options.persister?n.fetchFn=()=>{var v,y;return(y=(v=n.options).persister)==null?void 0:y.call(v,u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},t)}:n.fetchFn=u}}}function Qa(e,{pages:n,pageParams:t}){const r=n.length-1;return n.length>0?e.getNextPageParam(n[r],n,t[r],t):void 0}function Pp(e,{pages:n,pageParams:t}){var r;return n.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,n[0],n,t[0],t):void 0}var ir,Tn,ar,yt,In,Ue,Qr,An,Pt,Ht,El,Op=(El=class extends Ul{constructor(n){super();ee(this,Pt);ee(this,ir);ee(this,Tn);ee(this,ar);ee(this,yt);ee(this,In);ee(this,Ue);ee(this,Qr);ee(this,An);H(this,An,!1),H(this,Qr,n.defaultOptions),this.setOptions(n.options),this.observers=[],H(this,In,n.client),H(this,yt,x(this,In).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,H(this,Tn,Ya(this.options)),this.state=n.state??x(this,Tn),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return x(this,ir)}get promise(){var n;return(n=x(this,Ue))==null?void 0:n.promise}setOptions(n){if(this.options={...x(this,Qr),...n},n!=null&&n._type&&H(this,ir,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Ya(this.options);t.data!==void 0&&(this.setState(Ja(t.data,t.dataUpdatedAt)),H(this,Tn,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&x(this,yt).remove(this)}setData(n,t){const r=Vs(this.state.data,n,this.options);return ue(this,Pt,Ht).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){ue(this,Pt,Ht).call(this,{type:"setState",state:n})}cancel(n){var r,o;const t=(r=x(this,Ue))==null?void 0:r.promise;return(o=x(this,Ue))==null||o.cancel(n),t?t.then(at).catch(at):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return x(this,Tn)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>Pe(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ui||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Pe(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!Ml(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=x(this,Ue))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=x(this,Ue))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),x(this,yt).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){const t=this.observers.indexOf(n);t!==-1&&(this.observers.splice(t,1),this.observers.length||(x(this,Ue)&&(x(this,An)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?x(this,Ue).cancel({revert:!0}):x(this,Ue).cancelRetry()),this.scheduleGc()),x(this,yt).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ue(this,Pt,Ht).call(this,{type:"invalidate"})}async fetch(n,t){var u,d,l,f,p,m,v,y,b,_,k,S;if(this.state.fetchStatus!=="idle"&&((u=x(this,Ue))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(x(this,Ue))return x(this,Ue).continueRetry(),x(this,Ue).promise}if(n&&this.setOptions(n),!this.options.queryFn){const E=this.observers.find(O=>O.options.queryFn);E&&this.setOptions(E.options)}const r=new AbortController,o=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(H(this,An,!0),r.signal)})},s=()=>{const E=zl(this.options,t),I=(()=>{const A={client:x(this,In),queryKey:this.queryKey,meta:this.meta};return o(A),A})();return H(this,An,!1),this.options.persister?this.options.persister(E,I,this):E(I)},a=(()=>{const E={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:x(this,In),state:this.state,fetchFn:s};return o(E),E})();(d=x(this,ir)==="infinite"?kp(this.options.pages):this.options.behavior)==null||d.onFetch(a,this),H(this,ar,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&ue(this,Pt,Ht).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const c=H(this,Ue,Vl({initialPromise:t==null?void 0:t.initialPromise,fn:a.fetchFn,onCancel:E=>{E instanceof Us&&E.revert&&this.setState({...x(this,ar),fetchStatus:"idle"}),r.abort()},onFail:(E,O)=>{ue(this,Pt,Ht).call(this,{type:"failed",failureCount:E,error:O})},onPause:()=>{ue(this,Pt,Ht).call(this,{type:"pause"})},onContinue:()=>{ue(this,Pt,Ht).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const E=await c.start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(m=(p=x(this,yt).config).onSuccess)==null||m.call(p,E,this),(y=(v=x(this,yt).config).onSettled)==null||y.call(v,E,this.state.error,this),E}catch(E){if(E instanceof Us){if(E.silent)return x(this,Ue).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw ue(this,Pt,Ht).call(this,{type:"error",error:E}),(_=(b=x(this,yt).config).onError)==null||_.call(b,E,this),(S=(k=x(this,yt).config).onSettled)==null||S.call(k,this.state.data,E,this),E}finally{x(this,Ue)===c&&H(this,Ue,void 0),this.scheduleGc()}}},ir=new WeakMap,Tn=new WeakMap,ar=new WeakMap,yt=new WeakMap,In=new WeakMap,Ue=new WeakMap,Qr=new WeakMap,An=new WeakMap,Pt=new WeakSet,Ht=function(n){const t=r=>{switch(n.type){case"failed":return{...r,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Zl(r.data,this.options),fetchMeta:n.meta??null};case"success":const o={...r,...Ja(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return H(this,ar,n.manual?o:void 0),o;case"error":const s=n.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...n.state}}};this.state=t(this.state),Qe.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),x(this,yt).notify({query:this,type:"updated",action:n})})},El);function Zl(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ll(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ja(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ya(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,t=n!==void 0,r=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var nt,fe,Jr,rt,Dn,cr,qt,Yr,lr,ur,Nn,jn,mn,dr,ye,Mr,Zs,Bs,Ks,Ws,Hs,Gs,qs,Qs,Cl,Rp=(Cl=class extends to{constructor(n,t){super();ee(this,ye);ee(this,nt);ee(this,fe);ee(this,Jr);ee(this,rt);ee(this,Dn);ee(this,cr);ee(this,qt);ee(this,Yr);ee(this,lr);ee(this,ur);ee(this,Nn);ee(this,jn);ee(this,mn);ee(this,dr,new Set);this.options=t,H(this,nt,n),H(this,qt,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(x(this,fe).addObserver(this),Xa(x(this,fe),this.options)?ue(this,ye,Mr).call(this):this.updateResult(),ue(this,ye,Hs).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Js(x(this,fe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Js(x(this,fe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ue(this,ye,Gs).call(this),ue(this,ye,qs).call(this),x(this,fe).removeObserver(this)}setOptions(n){const t=this.options,r=x(this,fe);if(this.options=x(this,nt).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Pe(this.options.enabled,x(this,fe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ue(this,ye,Qs).call(this),x(this,fe).setOptions(this.options),t._defaulted&&!bs(this.options,t)&&x(this,nt).getQueryCache().notify({type:"observerOptionsUpdated",query:x(this,fe),observer:this});const o=this.hasListeners();o&&ec(x(this,fe),r,this.options,t)&&ue(this,ye,Mr).call(this),this.updateResult(),o&&(x(this,fe)!==r||Pe(this.options.enabled,x(this,fe))!==Pe(t.enabled,x(this,fe))||Pe(this.options.staleTime,x(this,fe))!==Pe(t.staleTime,x(this,fe)))&&ue(this,ye,Bs).call(this);const s=ue(this,ye,Ks).call(this);o&&(x(this,fe)!==r||Pe(this.options.enabled,x(this,fe))!==Pe(t.enabled,x(this,fe))||s!==x(this,mn))&&ue(this,ye,Ws).call(this,s)}getOptimisticResult(n){const t=x(this,nt).getQueryCache().build(x(this,nt),n),r=this.createResult(t,n);return bs(this.getCurrentResult(),r)||(H(this,rt,r),H(this,cr,this.options),H(this,Dn,x(this,fe).state)),r}getCurrentResult(){return x(this,rt)}trackResult(n,t){return new Proxy(n,{get:(r,o)=>(this.trackProp(o),t==null||t(o),Reflect.get(r,o))})}trackProp(n){x(this,dr).add(n)}getCurrentQuery(){return x(this,fe)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=x(this,nt).defaultQueryOptions(n),r=x(this,nt).getQueryCache().build(x(this,nt),t);let o=()=>{},s;const i=new Promise(a=>{s=a,o=x(this,nt).getQueryCache().subscribe(c=>{c.type==="updated"&&c.query.queryHash===r.queryHash&&r.state.data!==void 0&&(o(),a(this.createResult(r,t)))})});return Promise.race([r.fetch().then(()=>{const a=this.createResult(r,t);return s==null||s(a),a}).finally(()=>{o()}),i])}fetch(n){return ue(this,ye,Mr).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),x(this,rt)))}createResult(n,t){var O;const r=x(this,fe),o=this.options,s=x(this,rt),i=x(this,Dn),a=x(this,cr),c=n!==r?n.state:x(this,Jr),{state:u}=n;let d={...u},l=!1,f;if(t._optimisticResults){const I=this.hasListeners(),A=!I&&Xa(n,t),R=I&&ec(n,r,t,o);(A||R)&&(d={...d,...Zl(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:v}=d;f=d.data;let y=!1;if(t.placeholderData!==void 0&&f===void 0&&v==="pending"){let I;s!=null&&s.isPlaceholderData&&t.placeholderData===(a==null?void 0:a.placeholderData)?(I=s.data,y=!0):I=typeof t.placeholderData=="function"?t.placeholderData((O=x(this,ur))==null?void 0:O.state.data,x(this,ur)):t.placeholderData,I!==void 0&&(v="success",f=Vs(s==null?void 0:s.data,I,t),l=!0)}if(t.select&&f!==void 0&&!y)if(s&&f===(i==null?void 0:i.data)&&t.select===x(this,Yr))f=x(this,lr);else try{H(this,Yr,t.select),f=t.select(f),f=Vs(s==null?void 0:s.data,f,t),H(this,lr,f),H(this,qt,null)}catch(I){H(this,qt,I)}else f===void 0&&H(this,qt,null);x(this,qt)&&(p=x(this,qt),f=x(this,lr),m=Date.now(),v="error",l=!1);const b=d.fetchStatus==="fetching",_=v==="pending",k=v==="error",S=_&&b,E=f!==void 0;return{status:v,fetchStatus:d.fetchStatus,isPending:_,isSuccess:v==="success",isError:k,isInitialLoading:S,isLoading:S,data:f,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!_,isLoadingError:k&&!E,isPaused:d.fetchStatus==="paused",isPlaceholderData:l,isRefetchError:k&&E,isStale:Ki(n,t),refetch:this.refetch,isEnabled:Pe(t.enabled,n)!==!1}}updateResult(){const n=x(this,rt),t=this.createResult(x(this,fe),this.options);if(H(this,Dn,x(this,fe).state),H(this,cr,this.options),x(this,Dn).data!==void 0&&H(this,ur,x(this,fe)),bs(t,n))return;H(this,rt,t);const o=(()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!x(this,dr).size)return!0;const a=new Set(i??x(this,dr));return this.options.throwOnError&&a.add("error"),Object.keys(x(this,rt)).some(c=>{const u=c;return x(this,rt)[u]!==n[u]&&a.has(u)})})();Qe.batch(()=>{o&&this.listeners.forEach(s=>{s(x(this,rt))}),x(this,nt).getQueryCache().notify({query:x(this,fe),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ue(this,ye,Hs).call(this)}},nt=new WeakMap,fe=new WeakMap,Jr=new WeakMap,rt=new WeakMap,Dn=new WeakMap,cr=new WeakMap,qt=new WeakMap,Yr=new WeakMap,lr=new WeakMap,ur=new WeakMap,Nn=new WeakMap,jn=new WeakMap,mn=new WeakMap,dr=new WeakMap,ye=new WeakSet,Mr=function(n){ue(this,ye,Qs).call(this);let t=x(this,fe).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(at)),t},Zs=function(n){return!Zi()&&Pe(this.options.enabled,x(this,fe))!==!1&&jl(n)},Bs=function(){ue(this,ye,Gs).call(this);const n=Pe(this.options.staleTime,x(this,fe));if(x(this,rt).isStale||!ue(this,ye,Zs).call(this,n))return;const t=Ml(x(this,rt).dataUpdatedAt,n)+1;H(this,Nn,Pn.setTimeout(()=>{x(this,rt).isStale||this.updateResult()},t))},Ks=function(){return Pe(this.options.refetchInterval,x(this,fe))??!1},Ws=function(n){ue(this,ye,qs).call(this),H(this,mn,n),!(x(this,mn)===0||!ue(this,ye,Zs).call(this,x(this,mn)))&&H(this,jn,Pn.setInterval(()=>{(this.options.refetchIntervalInBackground||Bi.isFocused())&&ue(this,ye,Mr).call(this)},x(this,mn)))},Hs=function(){ue(this,ye,Bs).call(this),ue(this,ye,Ws).call(this,ue(this,ye,Ks).call(this))},Gs=function(){x(this,Nn)!==void 0&&(Pn.clearTimeout(x(this,Nn)),H(this,Nn,void 0))},qs=function(){x(this,jn)!==void 0&&(Pn.clearInterval(x(this,jn)),H(this,jn,void 0))},Qs=function(){const n=x(this,nt).getQueryCache().build(x(this,nt),this.options);if(n===x(this,fe))return;const t=x(this,fe);H(this,fe,n),H(this,Jr,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},Cl);function Tp(e,n){return Pe(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Pe(n.retryOnMount,e)===!1)}function Xa(e,n){return Tp(e,n)||e.state.data!==void 0&&Js(e,n,n.refetchOnMount)}function Js(e,n,t){if(Pe(n.enabled,e)!==!1&&Pe(n.staleTime,e)!=="static"){const r=Pe(t,e);return r==="always"||r!==!1&&Ki(e,n)}return!1}function ec(e,n,t,r){return(e!==n||Pe(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&Ki(e,t)}function Ki(e,n){return Pe(n.enabled,e)!==!1&&e.isStaleByTime(Pe(n.staleTime,e))}var Xr,$t,Xe,Mn,zt,cn,kl,Ip=(kl=class extends Ul{constructor(n){super();ee(this,zt);ee(this,Xr);ee(this,$t);ee(this,Xe);ee(this,Mn);H(this,Xr,n.client),this.mutationId=n.mutationId,H(this,Xe,n.mutationCache),H(this,$t,[]),this.state=n.state||Ap(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){x(this,$t).includes(n)||(x(this,$t).push(n),this.clearGcTimeout(),x(this,Xe).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){H(this,$t,x(this,$t).filter(t=>t!==n)),this.scheduleGc(),x(this,Xe).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){x(this,$t).length||(this.state.status==="pending"?this.scheduleGc():x(this,Xe).remove(this))}continue(){var n;return((n=x(this,Mn))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var a,c,u,d,l,f,p,m,v,y,b,_,k,S,E,O,I,A;const t=()=>{ue(this,zt,cn).call(this,{type:"continue"})},r={client:x(this,Xr),meta:this.options.meta,mutationKey:this.options.mutationKey},o=H(this,Mn,Vl({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(R,$)=>{ue(this,zt,cn).call(this,{type:"failed",failureCount:R,error:$})},onPause:()=>{ue(this,zt,cn).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>x(this,Xe).canRun(this)})),s=this.state.status==="pending",i=!o.canStart();try{if(s)t();else{ue(this,zt,cn).call(this,{type:"pending",variables:n,isPaused:i}),x(this,Xe).config.onMutate&&await x(this,Xe).config.onMutate(n,this,r);const $=await((c=(a=this.options).onMutate)==null?void 0:c.call(a,n,r));$!==this.state.context&&ue(this,zt,cn).call(this,{type:"pending",context:$,variables:n,isPaused:i})}const R=await o.start();return await((d=(u=x(this,Xe).config).onSuccess)==null?void 0:d.call(u,R,n,this.state.context,this,r)),await((f=(l=this.options).onSuccess)==null?void 0:f.call(l,R,n,this.state.context,r)),await((m=(p=x(this,Xe).config).onSettled)==null?void 0:m.call(p,R,null,this.state.variables,this.state.context,this,r)),await((y=(v=this.options).onSettled)==null?void 0:y.call(v,R,null,n,this.state.context,r)),ue(this,zt,cn).call(this,{type:"success",data:R}),R}catch(R){try{await((_=(b=x(this,Xe).config).onError)==null?void 0:_.call(b,R,n,this.state.context,this,r))}catch($){Promise.reject($)}try{await((S=(k=this.options).onError)==null?void 0:S.call(k,R,n,this.state.context,r))}catch($){Promise.reject($)}try{await((O=(E=x(this,Xe).config).onSettled)==null?void 0:O.call(E,void 0,R,this.state.variables,this.state.context,this,r))}catch($){Promise.reject($)}try{await((A=(I=this.options).onSettled)==null?void 0:A.call(I,void 0,R,n,this.state.context,r))}catch($){Promise.reject($)}throw ue(this,zt,cn).call(this,{type:"error",error:R}),R}finally{x(this,Mn)===o&&H(this,Mn,void 0),x(this,Xe).runNext(this)}}},Xr=new WeakMap,$t=new WeakMap,Xe=new WeakMap,Mn=new WeakMap,zt=new WeakSet,cn=function(n){const t=r=>{switch(n.type){case"failed":return{...r,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...r,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:n.error,failureCount:r.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Qe.batch(()=>{x(this,$t).forEach(r=>{r.onMutationUpdate(n)}),x(this,Xe).notify({mutation:this,type:"updated",action:n})})},kl);function Ap(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qt,Ot,eo,Pl,Dp=(Pl=class extends to{constructor(n={}){super();ee(this,Qt);ee(this,Ot);ee(this,eo);this.config=n,H(this,Qt,new Set),H(this,Ot,new Map),H(this,eo,0)}build(n,t,r){const o=new Ip({client:n,mutationCache:this,mutationId:++ho(this,eo)._,options:n.defaultMutationOptions(t),state:r});return this.add(o),o}add(n){x(this,Qt).add(n);const t=mo(n);if(typeof t=="string"){const r=x(this,Ot).get(t);r?r.push(n):x(this,Ot).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(x(this,Qt).delete(n)){const t=mo(n);if(typeof t=="string"){const r=x(this,Ot).get(t);if(r)if(r.length>1){const o=r.indexOf(n);o!==-1&&r.splice(o,1)}else r[0]===n&&x(this,Ot).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=mo(n);if(typeof t=="string"){const o=(r=x(this,Ot).get(t))==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===n}else return!0}runNext(n){var r,o;const t=mo(n);return typeof t=="string"?((o=(r=x(this,Ot).get(t))==null?void 0:r.find(s=>s!==n&&s.state.isPaused))==null?void 0:o.continue())??Promise.resolve():Promise.resolve()}clear(){Qe.batch(()=>{x(this,Qt).forEach(n=>{this.notify({type:"removed",mutation:n})}),x(this,Qt).clear(),x(this,Ot).clear()})}getAll(){return Array.from(x(this,Qt))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>Ha(t,r))}findAll(n={}){return this.getAll().filter(t=>Ha(n,t))}notify(n){Qe.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return Qe.batch(()=>Promise.all(n.map(t=>t.continue().catch(at))))}},Qt=new WeakMap,Ot=new WeakMap,eo=new WeakMap,Pl);function mo(e){var n;return(n=e.options.scope)==null?void 0:n.id}var Ft,Ol,Np=(Ol=class extends to{constructor(n={}){super();ee(this,Ft);this.config=n,H(this,Ft,new Map)}build(n,t,r){const o=t.queryKey,s=t.queryHash??Vi(o,t);let i=this.get(s);return i||(i=new Op({client:n,queryKey:o,queryHash:s,options:n.defaultQueryOptions(t),state:r,defaultOptions:n.getQueryDefaults(o)}),this.add(i)),i}add(n){x(this,Ft).has(n.queryHash)||(x(this,Ft).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){x(this,Ft).get(n.queryHash)===n&&(n.destroy(),x(this,Ft).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Qe.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return x(this,Ft).get(n)}getAll(){return[...x(this,Ft).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>Wa(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>Wa(n,r)):t}notify(n){Qe.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Qe.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Qe.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Ft=new WeakMap,Ol),Ae,gn,vn,fr,hr,yn,pr,mr,Rl,jp=(Rl=class{constructor(e={}){ee(this,Ae);ee(this,gn);ee(this,vn);ee(this,fr);ee(this,hr);ee(this,yn);ee(this,pr);ee(this,mr);H(this,Ae,e.queryCache||new Np),H(this,gn,e.mutationCache||new Dp),H(this,vn,e.defaultOptions||{}),H(this,fr,new Map),H(this,hr,new Map),H(this,yn,0)}mount(){ho(this,yn)._++,x(this,yn)===1&&(H(this,pr,Bi.subscribe(async e=>{e&&(await this.resumePausedMutations(),x(this,Ae).onFocus())})),H(this,mr,Vo.subscribe(async e=>{e&&(await this.resumePausedMutations(),x(this,Ae).onOnline())})))}unmount(){var e,n;ho(this,yn)._--,x(this,yn)===0&&((e=x(this,pr))==null||e.call(this),H(this,pr,void 0),(n=x(this,mr))==null||n.call(this),H(this,mr,void 0))}isFetching(e){return x(this,Ae).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return x(this,gn).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=x(this,Ae).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=x(this,Ae).build(this,n),r=t.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(Pe(n.staleTime,t))&&this.prefetchQuery(n),Promise.resolve(r))}getQueriesData(e){return x(this,Ae).findAll(e).map(({queryKey:n,state:t})=>[n,t.data])}setQueryData(e,n,t){var i;const r=this.defaultQueryOptions({queryKey:e}),o=(i=x(this,Ae).get(r.queryHash))==null?void 0:i.state.data,s=pp(n,o);if(s!==void 0)return x(this,Ae).build(this,r).setData(s,{...t,manual:!0})}setQueriesData(e,n,t){return Qe.batch(()=>x(this,Ae).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,n,t)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=x(this,Ae).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=x(this,Ae);Qe.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=x(this,Ae);return Qe.batch(()=>{const r=t.findAll(e),o=new Set(r);return r.forEach(s=>{s.reset()}),this.refetchQueries({type:"active",predicate:s=>o.has(s)},n)})}cancelQueries(e,n={}){const t={revert:!0,...n},r=Qe.batch(()=>x(this,Ae).findAll(e).map(o=>o.cancel(t)));return Promise.all(r).then(at).catch(at)}invalidateQueries(e,n={}){return Qe.batch(()=>(x(this,Ae).findAll(e).forEach(t=>{t.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const t={...n,cancelRefetch:n.cancelRefetch??!0},r=Qe.batch(()=>x(this,Ae).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,t);return t.throwOnError||(s=s.catch(at)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(at)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=x(this,Ae).build(this,n),r=t.isStaleByTime(Pe(n.staleTime,t))?await t.fetch(n):t.state.data,o=n.select;return o?o(r):r}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=x(this,Ae).build(this,n);return t.isStaleByTime(Pe(n.staleTime,t))?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(at).catch(at)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(at).catch(at)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Vo.isOnline()?x(this,gn).resumePausedMutations():Promise.resolve()}getQueryCache(){return x(this,Ae)}getMutationCache(){return x(this,gn)}getDefaultOptions(){return x(this,vn)}setDefaultOptions(e){H(this,vn,e)}setQueryDefaults(e,n){x(this,fr).set(Zr(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...x(this,fr).values()],t={};return n.forEach(r=>{gr(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){x(this,hr).set(Zr(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...x(this,hr).values()],t={};return n.forEach(r=>{gr(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...x(this,vn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Vi(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Ui&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...x(this,vn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){x(this,Ae).clear(),x(this,gn).clear()}},Ae=new WeakMap,gn=new WeakMap,vn=new WeakMap,fr=new WeakMap,hr=new WeakMap,yn=new WeakMap,pr=new WeakMap,mr=new WeakMap,Rl);const Bl=h.createContext(!1),Mp=()=>h.useContext(Bl);Bl.Provider;function $p(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const zp=h.createContext($p()),Fp=()=>h.useContext(zp),Lp=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?Fl(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},Vp=e=>{h.useEffect(()=>{e.clearReset()},[e])},Up=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:o})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Fl(t,[e.error,r])),Zp=e=>{if(e.suspense){const t=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>t(r(...o)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Bp=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,Kp=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function Wp(e,n,t){const r=Mp(),o=Fp(),s=Li(),i=s.defaultQueryOptions(e),a=s.getQueryCache().get(i.queryHash),c=e.subscribed!==!1;i._optimisticResults=r?"isRestoring":c?"optimistic":void 0,Zp(i),Lp(i,o,a),Vp(o);const[u]=h.useState(()=>new n(s,i)),d=u.getOptimisticResult(i),l=!r&&c;if(h.useSyncExternalStore(h.useCallback(f=>{const p=l?u.subscribe(Qe.batchCalls(f)):at;return u.updateResult(),p},[u,l]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),h.useEffect(()=>{u.setOptions(i)},[i,u]),Bp(i,d))throw Kp(i,u,o);if(Up({result:d,errorResetBoundary:o,throwOnError:i.throwOnError,query:a,suspense:i.suspense}))throw d.error;return i.notifyOnChangeProps?d:u.trackResult(d)}function Wi(e,n){return Wp(e,Rp)}function Hp(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",n.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const Gp=e=>{switch(e){case"success":return Jp;case"info":return Xp;case"warning":return Yp;case"error":return em;default:return null}},qp=Array(12).fill(0),Qp=({visible:e,className:n})=>T.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},T.createElement("div",{className:"sonner-spinner"},qp.map((t,r)=>T.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Jp=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},T.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Yp=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},T.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Xp=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},T.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),em=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},T.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),tm=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},T.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),T.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),nm=()=>{const[e,n]=T.useState(document.hidden);return T.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let rm=1;const om=100,tc=e=>{var n;return typeof(e==null?void 0:e.id)=="number"||(e==null||(n=e.id)==null?void 0:n.length)>0?e.id:rm++};class sm{constructor(){this.subscribe=n=>(this.subscribers.push(n),this.getActiveToasts().forEach(t=>n(t)),()=>{const t=this.subscribers.indexOf(n);this.subscribers.splice(t,1)}),this.publish=n=>{this.subscribers.forEach(t=>t(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n],this.trimHistory()},this.trimHistory=()=>{let n=this.toasts.length-om;n<=0||(this.toasts=this.toasts.filter(t=>n>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),n--,!1):!0))},this.create=n=>{const{message:t,...r}=n,o=tc(n),s=this.pendingDismissals.get(o);s!==void 0&&(cancelAnimationFrame(s),this.pendingDismissals.delete(o),this.dismissedToasts.delete(o));const i=this.dismissedToasts.has(o),a=n.dismissible===void 0?!0:n.dismissible;return i&&(this.dismissedToasts.delete(o),this.toasts=this.toasts.filter(u=>u.id!==o)),(i?void 0:this.toasts.find(u=>u.id===o))?this.toasts=this.toasts.map(u=>u.id===o?(this.publish({...u,...n,id:o,title:t}),{...u,...n,id:o,dismissible:a,title:t}):u):this.addToast({title:t,...r,dismissible:a,id:o}),o},this.dismiss=n=>{if(n==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),n;this.dismissedToasts.add(n);const t=this.pendingDismissals.get(n);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(n,requestAnimationFrame(()=>{this.pendingDismissals.delete(n),this.subscribers.forEach(r=>r({id:n,dismiss:!0}))})),n},this.message=(n,t)=>this.create({...t,message:n,type:void 0}),this.error=(n,t)=>this.create({...t,message:n,type:"error"}),this.success=(n,t)=>this.create({...t,type:"success",message:n}),this.info=(n,t)=>this.create({...t,type:"info",message:n}),this.warning=(n,t)=>this.create({...t,type:"warning",message:n}),this.loading=(n,t)=>this.create({...t,type:"loading",message:n}),this.promise=(n,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:n,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(n instanceof Function?n():n);let s=r!==void 0,i;const a=o.then(async u=>{if(i=["resolve",u],T.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(am(u)&&!u.ok){s=!1;const l=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,m=typeof l=="object"&&!T.isValidElement(l)?l:{message:l};this.create({id:r,type:"error",description:f,...m})}else if(u instanceof Error){s=!1;const l=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description,m=typeof l=="object"&&!T.isValidElement(l)?l:{message:l};this.create({id:r,type:"error",description:f,...m})}else if(t.success!==void 0){s=!1;const l=typeof t.success=="function"?await t.success(u):t.success,f=typeof t.description=="function"?await t.description(u):t.description,m=typeof l=="object"&&!T.isValidElement(l)?l:{message:l};this.create({id:r,type:"success",description:f,...m})}}).catch(async u=>{if(i=["reject",u],t.error!==void 0){s=!1;const d=typeof t.error=="function"?await t.error(u):t.error,l=typeof t.description=="function"?await t.description(u):t.description,p=typeof d=="object"&&!T.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:l,...p})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((u,d)=>a.then(()=>i[0]==="reject"?d(i[1]):u(i[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=tc(t);return this.create({...t,jsx:n(r),id:r,type:void 0}),r},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const it=new sm,im=(e,n)=>it.message(e,n),am=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",cm=im,lm=()=>it.toasts,um=()=>it.getActiveToasts(),MC=Object.assign(cm,{success:it.success,info:it.info,warning:it.warning,error:it.error,custom:it.custom,message:it.message,promise:it.promise,dismiss:it.dismiss,loading:it.loading},{getHistory:lm,getToasts:um});Hp("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function go(e){return e.label!==void 0}const dm=3,fm="24px",hm="16px",nc=4e3,pm=356,mm=14,gm=45,vm=200;function jt(...e){return e.filter(Boolean).join(" ")}function ym(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const bm=e=>{var n,t,r,o,s,i,a,c,u;const{invert:d,toast:l,unstyled:f,interacting:p,setHeights:m,visibleToasts:v,heights:y,index:b,toasts:_,expanded:k,removeToast:S,defaultRichColors:E,closeButton:O,style:I,cancelButtonStyle:A,actionButtonStyle:R,className:$="",descriptionClassName:F="",duration:M,position:V,gap:K,expandByDefault:Y,classNames:W,icons:Q,closeButtonAriaLabel:he="Close toast"}=e,[ne,G]=T.useState(null),[se,le]=T.useState(null),[Se,X]=T.useState(!1),[ce,pe]=T.useState(!1),[_e,Ie]=T.useState(!1),[de,xe]=T.useState(!1),[Ze,st]=T.useState(!1),[dt,Dt]=T.useState(0),[Bn,on]=T.useState(0),Et=T.useRef(l.duration||M||nc),Cn=T.useRef(null),Ye=T.useRef(null),Or=b===0,Kn=b+1<=v,Ne=l.type,Wn=Ne??"default",Zt=l.dismissible!==!1,Rr=l.className||"",Tr=l.descriptionClassName||"",Hn=T.useMemo(()=>y.findIndex(z=>z.toastId===l.id)||0,[y,l.id]),lo=T.useMemo(()=>{var z;return(z=l.closeButton)!=null?z:O},[l.closeButton,O]),uo=T.useMemo(()=>l.duration||M||nc,[l.duration,M]),Gn=T.useRef(0),Bt=T.useRef(0),fo=T.useRef(0),Kt=T.useRef(null),[Va,Ua]=V.split("-"),Ir=T.useMemo(()=>y.reduce((z,ie,be)=>be>=Hn?z:z+ie.height,0),[y,Hn]),w=nm(),C=T.useMemo(()=>{var z;return(z=e.swipeDirections)!=null?z:ym(V)},[e.swipeDirections,V]),P=l.invert||d,N=Ne==="loading";Bt.current=T.useMemo(()=>Hn*K+Ir,[Hn,Ir]),T.useEffect(()=>{Et.current=uo},[uo]),T.useEffect(()=>{X(!0)},[]),T.useEffect(()=>{const z=Ye.current;if(z){const ie=z.getBoundingClientRect().height;return on(ie),m(be=>[{toastId:l.id,height:ie,position:l.position},...be]),()=>m(be=>be.filter(Ee=>Ee.toastId!==l.id))}},[m,l.id]),T.useLayoutEffect(()=>{if(!Se)return;const z=Ye.current,ie=z.style.height;z.style.height="auto";const be=z.getBoundingClientRect().height;z.style.height=ie,on(be),m(Ee=>Ee.find(Ve=>Ve.toastId===l.id)?Ee.map(Ve=>Ve.toastId===l.id?{...Ve,height:be}:Ve):[{toastId:l.id,height:be,position:l.position},...Ee])},[Se,l.title,l.description,m,l.id,l.jsx,l.action,l.cancel]);const D=T.useCallback(()=>{pe(!0),Dt(Bt.current),m(z=>z.filter(ie=>ie.toastId!==l.id)),setTimeout(()=>{S(l)},vm)},[l,S,m,Bt]);T.useEffect(()=>{if(l.promise&&Ne==="loading"||l.duration===1/0||l.type==="loading")return;let z;return k||p||w?(()=>{if(fo.current<Gn.current){const Ee=new Date().getTime()-Gn.current;Et.current=Et.current-Ee}fo.current=new Date().getTime()})():(()=>{Et.current!==1/0&&(Gn.current=new Date().getTime(),z=setTimeout(()=>{l.onAutoClose==null||l.onAutoClose.call(l,l),D()},Et.current))})(),()=>clearTimeout(z)},[k,p,l,Ne,w,D]),T.useEffect(()=>{l.delete&&(D(),l.onDismiss==null||l.onDismiss.call(l,l))},[D,l.delete]);function B(){var z;if(Q!=null&&Q.loading){var ie;return T.createElement("div",{className:jt(W==null?void 0:W.loader,l==null||(ie=l.classNames)==null?void 0:ie.loader,"sonner-loader"),"data-visible":Ne==="loading"},Q.loading)}return T.createElement(Qp,{className:jt(W==null?void 0:W.loader,l==null||(z=l.classNames)==null?void 0:z.loader),visible:Ne==="loading"})}const L=l.icon||(Q==null?void 0:Q[Ne])||Gp(Ne);var Z,q;return T.createElement("li",{tabIndex:0,ref:Ye,className:jt($,Rr,W==null?void 0:W.toast,l==null||(n=l.classNames)==null?void 0:n.toast,W==null?void 0:W[Wn],l==null||(t=l.classNames)==null?void 0:t[Wn]),"data-sonner-toast":"","data-rich-colors":(Z=l.richColors)!=null?Z:E,"data-styled":!(l.jsx||l.unstyled||f),"data-mounted":Se,"data-promise":!!l.promise,"data-swiped":Ze,"data-removed":ce,"data-visible":Kn,"data-y-position":Va,"data-x-position":Ua,"data-index":b,"data-front":Or,"data-swiping":_e,"data-dismissible":Zt,"data-type":Ne,"data-invert":P,"data-swipe-out":de,"data-swipe-direction":se,"data-expanded":!!(k||Y&&Se),"data-testid":l.testId,style:{"--index":b,"--toasts-before":b,"--z-index":_.length-b,"--offset":`${ce?dt:Bt.current}px`,"--initial-height":Y?"auto":`${Bn}px`,...I,...l.style},onDragEnd:()=>{Ie(!1),G(null),Kt.current=null},onPointerDown:z=>{z.button!==2&&(N||!Zt||(Cn.current=new Date,Dt(Bt.current),z.target.setPointerCapture(z.pointerId),z.target.tagName!=="BUTTON"&&(Ie(!0),Kt.current={x:z.clientX,y:z.clientY})))},onPointerUp:()=>{var z,ie,be;if(de||!Zt)return;Kt.current=null;const Ee=Number(((z=Ye.current)==null?void 0:z.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ct=Number(((ie=Ye.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ve=new Date().getTime()-((be=Cn.current)==null?void 0:be.getTime()),Be=ne==="x"?Ee:Ct,vt=Math.abs(Be)/Ve;if((ne==="x"?C.includes(Ee>0?"right":"left"):C.includes(Ct>0?"bottom":"top"))&&(Math.abs(Be)>=gm||vt>.11)){Dt(Bt.current),l.onDismiss==null||l.onDismiss.call(l,l),le(ne==="x"?Ee>0?"right":"left":Ct>0?"down":"up"),D(),xe(!0);return}else{var Nt,gs;(Nt=Ye.current)==null||Nt.style.setProperty("--swipe-amount-x","0px"),(gs=Ye.current)==null||gs.style.setProperty("--swipe-amount-y","0px")}st(!1),Ie(!1),G(null)},onPointerMove:z=>{var ie,be,Ee;if(!Kt.current||!Zt||((ie=window.getSelection())==null?void 0:ie.toString().length)>0)return;const Ve=z.clientY-Kt.current.y,Be=z.clientX-Kt.current.x;!ne&&(Math.abs(Be)>1||Math.abs(Ve)>1)&&G(Math.abs(Be)>Math.abs(Ve)?"x":"y");let vt={x:0,y:0};const qn=Nt=>1/(1.5+Math.abs(Nt)/20);if(ne==="y"){if(C.includes("top")||C.includes("bottom"))if(C.includes("top")&&Ve<0||C.includes("bottom")&&Ve>0)vt.y=Ve;else{const Nt=Ve*qn(Ve);vt.y=Math.abs(Nt)<Math.abs(Ve)?Nt:Ve}}else if(ne==="x"&&(C.includes("left")||C.includes("right")))if(C.includes("left")&&Be<0||C.includes("right")&&Be>0)vt.x=Be;else{const Nt=Be*qn(Be);vt.x=Math.abs(Nt)<Math.abs(Be)?Nt:Be}(Math.abs(vt.x)>0||Math.abs(vt.y)>0)&&st(!0),(be=Ye.current)==null||be.style.setProperty("--swipe-amount-x",`${vt.x}px`),(Ee=Ye.current)==null||Ee.style.setProperty("--swipe-amount-y",`${vt.y}px`)}},lo&&!l.jsx&&Ne!=="loading"?T.createElement("button",{"aria-label":he,"data-disabled":N,"data-close-button":!0,onClick:N||!Zt?()=>{}:()=>{D(),l.onDismiss==null||l.onDismiss.call(l,l)},className:jt(W==null?void 0:W.closeButton,l==null||(r=l.classNames)==null?void 0:r.closeButton)},(q=Q==null?void 0:Q.close)!=null?q:tm):null,(Ne||l.icon||l.promise)&&l.icon!==null&&((Q==null?void 0:Q[Ne])!==null||l.icon)?T.createElement("div",{"data-icon":"",className:jt(W==null?void 0:W.icon,l==null||(o=l.classNames)==null?void 0:o.icon)},Ne==="loading"?l.icon||B():l.promise?B():null,Ne!=="loading"?L:null):null,T.createElement("div",{"data-content":"",className:jt(W==null?void 0:W.content,l==null||(s=l.classNames)==null?void 0:s.content)},T.createElement("div",{"data-title":"",className:jt(W==null?void 0:W.title,l==null||(i=l.classNames)==null?void 0:i.title)},l.jsx?l.jsx:typeof l.title=="function"?l.title():l.title),l.description?T.createElement("div",{"data-description":"",className:jt(F,Tr,W==null?void 0:W.description,l==null||(a=l.classNames)==null?void 0:a.description)},typeof l.description=="function"?l.description():l.description):null),T.isValidElement(l.cancel)?l.cancel:l.cancel&&go(l.cancel)?T.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||A,onClick:z=>{go(l.cancel)&&Zt&&(l.cancel.onClick==null||l.cancel.onClick.call(l.cancel,z),D())},className:jt(W==null?void 0:W.cancelButton,l==null||(c=l.classNames)==null?void 0:c.cancelButton)},l.cancel.label):null,T.isValidElement(l.action)?l.action:l.action&&go(l.action)?T.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||R,onClick:z=>{go(l.action)&&(l.action.onClick==null||l.action.onClick.call(l.action,z),!z.defaultPrevented&&D())},className:jt(W==null?void 0:W.actionButton,l==null||(u=l.classNames)==null?void 0:u.actionButton)},l.action.label):null)};function rc(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function wm(e,n){const t={};return[e,n].forEach((r,o)=>{const s=o===1,i=s?"--mobile-offset":"--offset",a=s?hm:fm;function c(u){["top","right","bottom","left"].forEach(d=>{t[`${i}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?t[`${i}-${u}`]=a:t[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(a)}),t}const _m=T.forwardRef(function(n,t){const{id:r,invert:o,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:c,className:u,offset:d,mobileOffset:l,theme:f="light",richColors:p,duration:m,style:v,visibleToasts:y=dm,toastOptions:b,dir:_=rc(),gap:k=mm,icons:S,customAriaLabel:E,containerAriaLabel:O="Notifications"}=n,[I,A]=T.useState([]),R=T.useMemo(()=>r?I.filter(X=>X.toasterId===r):I.filter(X=>!X.toasterId),[I,r]),$=T.useMemo(()=>Array.from(new Set([s].concat(R.filter(X=>X.position).map(X=>X.position)))),[R,s]),[F,M]=T.useState([]),[V,K]=T.useState(!1),[Y,W]=T.useState(!1),[Q,he]=T.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ne=T.useRef(null),G=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),se=T.useRef(null),le=T.useRef(!1),Se=T.useCallback(X=>{A(ce=>{var pe;return(pe=ce.find(_e=>_e.id===X.id))!=null&&pe.delete||it.dismiss(X.id),ce.filter(({id:_e})=>_e!==X.id)})},[]);return T.useEffect(()=>it.subscribe(X=>{if(X.dismiss){requestAnimationFrame(()=>{A(ce=>ce.map(pe=>pe.id===X.id?{...pe,delete:!0}:pe))});return}setTimeout(()=>{zh.flushSync(()=>{A(ce=>{const pe=ce.findIndex(_e=>_e.id===X.id);return pe!==-1?[...ce.slice(0,pe),{...ce[pe],...X},...ce.slice(pe+1)]:[X,...ce]})})})}),[]),T.useEffect(()=>{if(f!=="system"){he(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?he("dark"):he("light")),typeof window>"u")return;const X=window.matchMedia("(prefers-color-scheme: dark)");try{X.addEventListener("change",({matches:ce})=>{he(ce?"dark":"light")})}catch{X.addListener(({matches:pe})=>{try{he(pe?"dark":"light")}catch(_e){console.error(_e)}})}},[f]),T.useEffect(()=>{I.length<=1&&K(!1)},[I]),T.useEffect(()=>{const X=ce=>{var pe;if(i.length>0&&i.every(de=>ce[de]||ce.code===de)){var Ie;K(!0),(Ie=ne.current)==null||Ie.focus()}ce.code==="Escape"&&(document.activeElement===ne.current||(pe=ne.current)!=null&&pe.contains(document.activeElement))&&K(!1)};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[i]),T.useEffect(()=>{if(ne.current)return()=>{se.current&&(se.current.focus({preventScroll:!0}),se.current=null,le.current=!1)}},[ne.current]),T.createElement("section",{ref:t,"aria-label":E??`${O} ${G}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},$.map((X,ce)=>{var pe;const[_e,Ie]=X.split("-");return R.length?T.createElement("ol",{key:X,dir:_==="auto"?rc():_,tabIndex:-1,ref:ne,className:u,"data-sonner-toaster":!0,"data-sonner-theme":Q,"data-y-position":_e,"data-x-position":Ie,style:{"--front-toast-height":`${((pe=F[0])==null?void 0:pe.height)||0}px`,"--width":`${pm}px`,"--gap":`${k}px`,...v,...wm(d,l)},onBlur:de=>{le.current&&!de.currentTarget.contains(de.relatedTarget)&&(le.current=!1,se.current&&(se.current.focus({preventScroll:!0}),se.current=null))},onFocus:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||le.current||(le.current=!0,se.current=de.relatedTarget)},onMouseEnter:()=>K(!0),onMouseMove:()=>K(!0),onMouseLeave:()=>{Y||K(!1)},onDragEnd:()=>K(!1),onPointerDown:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},R.filter(de=>!de.position&&ce===0||de.position===X).map((de,xe)=>{var Ze,st;return T.createElement(bm,{key:de.id,icons:S,index:xe,toast:de,defaultRichColors:p,duration:(Ze=b==null?void 0:b.duration)!=null?Ze:m,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:o,visibleToasts:y,closeButton:(st=b==null?void 0:b.closeButton)!=null?st:c,interacting:Y,position:X,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:Se,toasts:R.filter(dt=>dt.position==de.position),heights:F.filter(dt=>dt.position==de.position),setHeights:M,expandByDefault:a,gap:k,expanded:V,swipeDirections:n.swipeDirections})})):null}))});var xm=Object.defineProperty,Hi=(e,n)=>xm(e,"name",{value:n,configurable:!0});function Ys(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}Hi(Ys,"setRef");function Kl(...e){return n=>{let t=!1;const r=e.map(o=>{const s=Ys(o,n);return!t&&typeof s=="function"&&(t=!0),s});if(t)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Ys(e[o],null)}}}}Hi(Kl,"composeRefs");function Re(...e){return h.useCallback(Kl(...e),e)}Hi(Re,"useComposedRefs");var Sm=Object.defineProperty,Tt=(e,n)=>Sm(e,"name",{value:n,configurable:!0});function Yt(e){const n=h.forwardRef((t,r)=>{let{children:o,...s}=t,i=null,a=!1;const c=[];Xs(o)&&typeof vo=="function"&&(o=vo(o._payload)),h.Children.forEach(o,f=>{var p;if(Ql(f)){a=!0;const m=f;let v="child"in m.props?m.props.child:m.props.children;Xs(v)&&typeof vo=="function"&&(v=vo(v._payload)),i=Em(m,v),c.push((p=i==null?void 0:i.props)==null?void 0:p.children)}else c.push(f)}),i?i=h.cloneElement(i,void 0,c):!a&&h.Children.count(o)===1&&h.isValidElement(o)&&(i=o);const u=i?ql(i):void 0,d=Re(r,u);if(!i){if(o||o===0)throw new Error(a?Pm(e):km(e));return o}const l=Gl(s,i.props??{});return i.type!==h.Fragment&&(l.ref=r?d:u),h.cloneElement(i,l)});return n.displayName=`${e}.Slot`,n}Tt(Yt,"createSlot");var xr=Yt("Slot"),Wl=Symbol.for("radix.slottable");function Hl(e){const n=Tt(t=>"child"in t?t.children(t.child):t.children,"Slottable");return n.displayName=`${e}.Slottable`,n.__radixId=Wl,n}Tt(Hl,"createSlottable");var Em=Tt((e,n)=>{if("child"in e.props){const t=e.props.child;return h.isValidElement(t)?h.cloneElement(t,void 0,e.props.children(t.props.children)):null}return h.isValidElement(n)?n:null},"getSlottableElementFromSlottable");function Gl(e,n){const t={...n};for(const r in n){const o=e[r],s=n[r];/^on[A-Z]/.test(r)?o&&s?t[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(t[r]=o):r==="style"?t[r]={...o,...s}:r==="className"&&(t[r]=[o,s].filter(Boolean).join(" "))}return{...e,...t}}Tt(Gl,"mergeProps");function ql(e){var r,o;let n=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}Tt(ql,"getElementRef");function Ql(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wl}Tt(Ql,"isSlottable");var Cm=Symbol.for("react.lazy");function Xs(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Cm&&"_payload"in e&&Jl(e._payload)}Tt(Xs,"isLazyComponent");function Jl(e){return typeof e=="object"&&e!==null&&"then"in e}Tt(Jl,"isPromiseLike");var km=Tt(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Pm=Tt(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),vo=_r[" use ".trim().toString()];function Yl(e){var n,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(t=Yl(e[n]))&&(r&&(r+=" "),r+=t)}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Xl(){for(var e,n,t=0,r="",o=arguments.length;t<o;t++)(e=arguments[t])&&(n=Yl(e))&&(r&&(r+=" "),r+=n);return r}const oc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sc=Xl,no=(e,n)=>t=>{var r;if((n==null?void 0:n.variants)==null)return sc(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:o,defaultVariants:s}=n,i=Object.keys(o).map(u=>{const d=t==null?void 0:t[u],l=s==null?void 0:s[u];if(d===null)return null;const f=oc(d)||oc(l);return o[u][f]}),a=t&&Object.entries(t).reduce((u,d)=>{let[l,f]=d;return f===void 0||(u[l]=f),u},{}),c=n==null||(r=n.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:l,className:f,...p}=d;return Object.entries(p).every(m=>{let[v,y]=m;return Array.isArray(y)?y.includes({...s,...a}[v]):{...s,...a}[v]===y})?[...u,l,f]:u},[]);return sc(e,i,c,t==null?void 0:t.class,t==null?void 0:t.className)};/**
|
|
3
|
-
* @license lucide-react v1.47.0 - ISC
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the ISC license.
|
|
6
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/const Om=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
8
|
-
* @license lucide-react v1.47.0 - ISC
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the ISC license.
|
|
11
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/function Rm(e,n,t=[]){if(n==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:Om(e),size:24,node:n,...t.length>0?{aliases:t}:{}}}/**
|
|
13
|
-
* @license lucide-react v1.47.0 - ISC
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the ISC license.
|
|
16
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/const Tm=e=>{let n="",t=!1;for(const r of e){if(r==="-"||r==="_"||r<=" "){t=n.length>0;continue}n.length===0?n+=r.toLowerCase():n+=t?r.toUpperCase():r,t=!1}return n};/**
|
|
18
|
-
* @license lucide-react v1.47.0 - ISC
|
|
19
|
-
*
|
|
20
|
-
* This source code is licensed under the ISC license.
|
|
21
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/const Im=e=>{const n=Tm(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
|
|
23
|
-
* @license lucide-react v1.47.0 - ISC
|
|
24
|
-
*
|
|
25
|
-
* This source code is licensed under the ISC license.
|
|
26
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const ei=(...e)=>e.filter((n,t,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===t).join(" ").trim();/**
|
|
28
|
-
* @license lucide-react v1.47.0 - ISC
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the ISC license.
|
|
31
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/const kn={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"};/**
|
|
33
|
-
* @license lucide-react v1.47.0 - ISC
|
|
34
|
-
*
|
|
35
|
-
* This source code is licensed under the ISC license.
|
|
36
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/function ws(e){return e!=null}function Am(e,n={}){var f,p;const t=n.attributeNames??{},r=m=>t[m]??m,o=e.size??e.width??kn.width,s=e.size??e.height??kn.height,i=((f=e.aliases)==null?void 0:f.filter(m=>typeof m=="string"&&m.trim()!=="").map(m=>`lucide-${m}`))??[],a=[...e.name?[`lucide-${e.name}`]:[],...i],c=((p=n.className)==null?void 0:p.split(" ").filter(Boolean))??[],u=n.includeDefaultClasses===!1?ei(...c):ei("lucide",...a,...c),d=n.absoluteStrokeWidth?Number(n.strokeWidth??kn["stroke-width"])*Number(e.size??e.width??kn.width)/Number(n.size??n.width??kn.width):n.strokeWidth??kn["stroke-width"];return["svg",{...Object.entries(kn).reduce((m,[v,y])=>(m[r(v)]=y,m),{}),..."color"in n&&n.color&&{[r("stroke")]:n.color},..."size"in n&&ws(n.size)&&{[r("width")]:n.size,[r("height")]:n.size},..."width"in n&&ws(n.width)&&{[r("width")]:n.width},..."height"in n&&ws(n.height)&&{[r("height")]:n.height},[r("stroke-width")]:d,...u&&{[r("class")]:u},[r("viewBox")]:`0 0 ${o} ${s}`,...n.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in n&&n.attributes},e.node.map(m=>{const[v,y,b]=m,_=n.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...y}:y;return b?[v,_,b]:[v,_]})]}/**
|
|
38
|
-
* @license lucide-react v1.47.0 - ISC
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the ISC license.
|
|
41
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/function Dm(e,n={}){return Am(e,{...n,attributeNames:{...n.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
|
|
43
|
-
* @license lucide-react v1.47.0 - ISC
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the ISC license.
|
|
46
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const Nm=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},jm=h.createContext({}),Mm=()=>h.useContext(jm),$m=h.forwardRef(({color:e,size:n,width:t,height:r,strokeWidth:o,absoluteStrokeWidth:s,nonScalingStroke:i,className:a="",children:c,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...l},f)=>{const{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:v=!1,nonScalingStroke:y=!1,color:b="currentColor",className:_=""}=Mm()??{},k=!!c||Nm(l),[S,E,O=[]]=Dm(d,{color:e??b,width:t??n??p,height:r??n??p,strokeWidth:o??m,absoluteStrokeWidth:s??v,nonScalingStroke:i??y,className:ei(_,a),hasA11yProp:k,attributes:l});return h.createElement(S,{ref:f,...E},[...O.map(([I,A])=>h.createElement(I,A)),...Array.isArray(c)?c:[c]])});/**
|
|
48
|
-
* @license lucide-react v1.47.0 - ISC
|
|
49
|
-
*
|
|
50
|
-
* This source code is licensed under the ISC license.
|
|
51
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/function ut(e,n=[],t=[]){const r=typeof e=="string"?Rm(e,n,t):e,o=h.forwardRef(({className:s,...i},a)=>h.createElement($m,{ref:a,icon:r,className:s,...i}));return r.name&&(o.displayName=Im(r.name)),o}/**
|
|
53
|
-
* @license lucide-react v1.47.0 - ISC
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the ISC license.
|
|
56
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const eu={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};eu.node;const zm=ut(eu);/**
|
|
58
|
-
* @license lucide-react v1.47.0 - ISC
|
|
59
|
-
*
|
|
60
|
-
* This source code is licensed under the ISC license.
|
|
61
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const tu={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};tu.node;const Fm=ut(tu);/**
|
|
63
|
-
* @license lucide-react v1.47.0 - ISC
|
|
64
|
-
*
|
|
65
|
-
* This source code is licensed under the ISC license.
|
|
66
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const nu={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};nu.node;const Lm=ut(nu);/**
|
|
68
|
-
* @license lucide-react v1.47.0 - ISC
|
|
69
|
-
*
|
|
70
|
-
* This source code is licensed under the ISC license.
|
|
71
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const ru={name:"circle",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]};ru.node;const Vm=ut(ru);/**
|
|
73
|
-
* @license lucide-react v1.47.0 - ISC
|
|
74
|
-
*
|
|
75
|
-
* This source code is licensed under the ISC license.
|
|
76
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const ou={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};ou.node;const Um=ut(ou);/**
|
|
78
|
-
* @license lucide-react v1.47.0 - ISC
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the ISC license.
|
|
81
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const su={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};su.node;const Zm=ut(su);/**
|
|
83
|
-
* @license lucide-react v1.47.0 - ISC
|
|
84
|
-
*
|
|
85
|
-
* This source code is licensed under the ISC license.
|
|
86
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const iu={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};iu.node;const Bm=ut(iu);/**
|
|
88
|
-
* @license lucide-react v1.47.0 - ISC
|
|
89
|
-
*
|
|
90
|
-
* This source code is licensed under the ISC license.
|
|
91
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const au={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};au.node;const Km=ut(au);/**
|
|
93
|
-
* @license lucide-react v1.47.0 - ISC
|
|
94
|
-
*
|
|
95
|
-
* This source code is licensed under the ISC license.
|
|
96
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const cu={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};cu.node;const Wm=ut(cu);/**
|
|
98
|
-
* @license lucide-react v1.47.0 - ISC
|
|
99
|
-
*
|
|
100
|
-
* This source code is licensed under the ISC license.
|
|
101
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const lu={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};lu.node;const Hm=ut(lu);/**
|
|
103
|
-
* @license lucide-react v1.47.0 - ISC
|
|
104
|
-
*
|
|
105
|
-
* This source code is licensed under the ISC license.
|
|
106
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const uu={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};uu.node;const du=ut(uu);/**
|
|
108
|
-
* @license lucide-react v1.47.0 - ISC
|
|
109
|
-
*
|
|
110
|
-
* This source code is licensed under the ISC license.
|
|
111
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const fu={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};fu.node;const Gm=ut(fu);/**
|
|
113
|
-
* @license lucide-react v1.47.0 - ISC
|
|
114
|
-
*
|
|
115
|
-
* This source code is licensed under the ISC license.
|
|
116
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const hu={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};hu.node;const qm=ut(hu);/**
|
|
118
|
-
* @license lucide-react v1.47.0 - ISC
|
|
119
|
-
*
|
|
120
|
-
* This source code is licensed under the ISC license.
|
|
121
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const pu={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};pu.node;const Qm=ut(pu),Jm=768,mu=`(max-width: ${Jm-1}px)`;function Ym(e){const n=window.matchMedia(mu);return n.addEventListener("change",e),()=>n.removeEventListener("change",e)}function Xm(){return h.useSyncExternalStore(Ym,tg,eg)}function eg(){return!1}function tg(){return window.matchMedia(mu).matches}const Gi="-",ng=e=>{const n=og(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Gi);return a[0]===""&&a.length!==1&&a.shift(),gu(a,n)||rg(i)},getConflictingClassGroupIds:(i,a)=>{const c=t[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},gu=(e,n)=>{var i;if(e.length===0)return n.classGroupId;const t=e[0],r=n.nextPart.get(t),o=r?gu(e.slice(1),r):void 0;if(o)return o;if(n.validators.length===0)return;const s=e.join(Gi);return(i=n.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},ic=/^\[(.+)\]$/,rg=e=>{if(ic.test(e)){const n=ic.exec(e)[1],t=n==null?void 0:n.substring(0,n.indexOf(":"));if(t)return"arbitrary.."+t}},og=e=>{const{theme:n,prefix:t}=e,r={nextPart:new Map,validators:[]};return ig(Object.entries(e.classGroups),t).forEach(([s,i])=>{ti(i,r,s,n)}),r},ti=(e,n,t,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?n:ac(n,o);s.classGroupId=t;return}if(typeof o=="function"){if(sg(o)){ti(o(r),n,t,r);return}n.validators.push({validator:o,classGroupId:t});return}Object.entries(o).forEach(([s,i])=>{ti(i,ac(n,s),t,r)})})},ac=(e,n)=>{let t=e;return n.split(Gi).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},sg=e=>e.isThemeGetter,ig=(e,n)=>n?e.map(([t,r])=>{const o=r.map(s=>typeof s=="string"?n+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[n+i,a])):s);return[t,o]}):e,ag=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=new Map,r=new Map;const o=(s,i)=>{t.set(s,i),n++,n>e&&(n=0,r=t,t=new Map)};return{get(s){let i=t.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){t.has(s)?t.set(s,i):o(s,i)}}},vu="!",cg=e=>{const{separator:n,experimentalParseClassName:t}=e,r=n.length===1,o=n[0],s=n.length,i=a=>{const c=[];let u=0,d=0,l;for(let y=0;y<a.length;y++){let b=a[y];if(u===0){if(b===o&&(r||a.slice(y,y+s)===n)){c.push(a.slice(d,y)),d=y+s;continue}if(b==="/"){l=y;continue}}b==="["?u++:b==="]"&&u--}const f=c.length===0?a:a.substring(d),p=f.startsWith(vu),m=p?f.substring(1):f,v=l&&l>d?l-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}};return t?a=>t({className:a,parseClassName:i}):i},lg=e=>{if(e.length<=1)return e;const n=[];let t=[];return e.forEach(r=>{r[0]==="["?(n.push(...t.sort(),r),t=[]):t.push(r)}),n.push(...t.sort()),n},ug=e=>({cache:ag(e.cacheSize),parseClassName:cg(e),...ng(e)}),dg=/\s+/,fg=(e,n)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:o}=n,s=[],i=e.trim().split(dg);let a="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:d,hasImportantModifier:l,baseClassName:f,maybePostfixModifierPosition:p}=t(u);let m=!!p,v=r(m?f.substring(0,p):f);if(!v){if(!m){a=u+(a.length>0?" "+a:a);continue}if(v=r(f),!v){a=u+(a.length>0?" "+a:a);continue}m=!1}const y=lg(d).join(":"),b=l?y+vu:y,_=b+v;if(s.includes(_))continue;s.push(_);const k=o(v,m);for(let S=0;S<k.length;++S){const E=k[S];s.push(b+E)}a=u+(a.length>0?" "+a:a)}return a};function hg(){let e=0,n,t,r="";for(;e<arguments.length;)(n=arguments[e++])&&(t=yu(n))&&(r&&(r+=" "),r+=t);return r}const yu=e=>{if(typeof e=="string")return e;let n,t="";for(let r=0;r<e.length;r++)e[r]&&(n=yu(e[r]))&&(t&&(t+=" "),t+=n);return t};function pg(e,...n){let t,r,o,s=i;function i(c){const u=n.reduce((d,l)=>l(d),e());return t=ug(u),r=t.cache.get,o=t.cache.set,s=a,a(c)}function a(c){const u=r(c);if(u)return u;const d=fg(c,t);return o(c,d),d}return function(){return s(hg.apply(null,arguments))}}const ke=e=>{const n=t=>t[e]||[];return n.isThemeGetter=!0,n},bu=/^\[(?:([a-z-]+):)?(.+)\]$/i,mg=/^\d+\/\d+$/,gg=new Set(["px","full","screen"]),vg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yg=/\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$/,bg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_g=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wt=e=>tr(e)||gg.has(e)||mg.test(e),sn=e=>Sr(e,"length",Rg),tr=e=>!!e&&!Number.isNaN(Number(e)),_s=e=>Sr(e,"number",tr),Ar=e=>!!e&&Number.isInteger(Number(e)),xg=e=>e.endsWith("%")&&tr(e.slice(0,-1)),ae=e=>bu.test(e),an=e=>vg.test(e),Sg=new Set(["length","size","percentage"]),Eg=e=>Sr(e,Sg,wu),Cg=e=>Sr(e,"position",wu),kg=new Set(["image","url"]),Pg=e=>Sr(e,kg,Ig),Og=e=>Sr(e,"",Tg),Dr=()=>!0,Sr=(e,n,t)=>{const r=bu.exec(e);return r?r[1]?typeof n=="string"?r[1]===n:n.has(r[1]):t(r[2]):!1},Rg=e=>yg.test(e)&&!bg.test(e),wu=()=>!1,Tg=e=>wg.test(e),Ig=e=>_g.test(e),Ag=()=>{const e=ke("colors"),n=ke("spacing"),t=ke("blur"),r=ke("brightness"),o=ke("borderColor"),s=ke("borderRadius"),i=ke("borderSpacing"),a=ke("borderWidth"),c=ke("contrast"),u=ke("grayscale"),d=ke("hueRotate"),l=ke("invert"),f=ke("gap"),p=ke("gradientColorStops"),m=ke("gradientColorStopPositions"),v=ke("inset"),y=ke("margin"),b=ke("opacity"),_=ke("padding"),k=ke("saturate"),S=ke("scale"),E=ke("sepia"),O=ke("skew"),I=ke("space"),A=ke("translate"),R=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",ae,n],M=()=>[ae,n],V=()=>["",Wt,sn],K=()=>["auto",tr,ae],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],he=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",ae],G=()=>["auto","avoid","all","avoid-page","page","left","right","column"],se=()=>[tr,ae];return{cacheSize:500,separator:":",theme:{colors:[Dr],spacing:[Wt,sn],blur:["none","",an,ae],brightness:se(),borderColor:[e],borderRadius:["none","","full",an,ae],borderSpacing:M(),borderWidth:V(),contrast:se(),grayscale:ne(),hueRotate:se(),invert:ne(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[xg,sn],inset:F(),margin:F(),opacity:se(),padding:M(),saturate:se(),scale:se(),sepia:ne(),skew:se(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[an]}],"break-after":[{"break-after":G()}],"break-before":[{"break-before":G()}],"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:[...Y(),ae]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ar,ae]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",Ar,ae]}],"grid-cols":[{"grid-cols":[Dr]}],"col-start-end":[{col:["auto",{span:["full",Ar,ae]},ae]}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":[Dr]}],"row-start-end":[{row:["auto",{span:[Ar,ae]},ae]}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...he()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...he(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...he(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ae,n]}],"min-w":[{"min-w":[ae,n,"min","max","fit"]}],"max-w":[{"max-w":[ae,n,"none","full","min","max","fit","prose",{screen:[an]},an]}],h:[{h:[ae,n,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,n,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,n,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,n,"auto","min","max","fit"]}],"font-size":[{text:["base",an,sn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_s]}],"font-family":[{font:[Dr]}],"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",ae]}],"line-clamp":[{"line-clamp":["none",tr,_s]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Wt,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Wt,sn]}],"underline-offset":[{"underline-offset":["auto",Wt,ae]}],"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:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae]}],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",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),Cg]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Eg]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Pg]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:W()}],"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:["",...W()]}],"outline-offset":[{"outline-offset":[Wt,ae]}],"outline-w":[{outline:[Wt,sn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Wt,sn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",an,Og]}],"shadow-color":[{shadow:[Dr]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",an,ae]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[l]}],saturate:[{saturate:[k]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[l]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:se()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:se()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Ar,ae]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ae]}],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",ae]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",ae]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Wt,sn,_s]}],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"]}}},Dg=pg(Ag);function te(...e){return Dg(Xl(e))}const Ng=no("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8","icon-sm":"h-9 w-9",icon:"h-10 w-10",pill:"h-12 px-6 rounded-pill",nav:"h-7 px-3 text-xs"}},defaultVariants:{variant:"default",size:"default"}}),es=h.forwardRef((e,n)=>{const t=J.c(15);let r,o,s,i,a;t[0]!==e?({className:r,variant:a,size:s,asChild:i,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i,t[5]=a):(r=t[1],o=t[2],s=t[3],i=t[4],a=t[5]);const u=(i===void 0?!1:i)?xr:"button";let d;t[6]!==r||t[7]!==s||t[8]!==a?(d=te(Ng({variant:a,size:s,className:r})),t[6]=r,t[7]=s,t[8]=a,t[9]=d):d=t[9];let l;return t[10]!==u||t[11]!==o||t[12]!==n||t[13]!==d?(l=g.jsx(u,{className:d,ref:n,...o}),t[10]=u,t[11]=o,t[12]=n,t[13]=d,t[14]=l):l=t[14],l});es.displayName="Button";const Uo=h.forwardRef((e,n)=>{const t=J.c(11);let r,o,s;t[0]!==e?({className:r,type:s,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);let i;t[4]!==r?(i=te("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),t[4]=r,t[5]=i):i=t[5];let a;return t[6]!==o||t[7]!==n||t[8]!==i||t[9]!==s?(a=g.jsx("input",{type:s,className:i,ref:n,...o}),t[6]=o,t[7]=n,t[8]=i,t[9]=s,t[10]=a):a=t[10],a});Uo.displayName="Input";var jg=Object.defineProperty,Mg=(e,n)=>jg(e,"name",{value:n,configurable:!0}),$g=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Me=$g.reduce((e,n)=>{const t=Yt(`Primitive.${n}`),r=h.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?t:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${n}`,{...e,[n]:r}},{});function qi(e,n){e&&Tl.flushSync(()=>e.dispatchEvent(n))}Mg(qi,"dispatchDiscreteCustomEvent");var zg=Object.defineProperty,_u=(e,n)=>zg(e,"name",{value:n,configurable:!0}),cc="horizontal",Fg=["horizontal","vertical"],Lg=h.forwardRef(_u(function(n,t){const{decorative:r,orientation:o=cc,...s}=n,i=xu(o)?o:cc,c=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return g.jsx(Me.div,{"data-orientation":i,...c,...s,ref:t})},"Separator"));function xu(e){return Fg.includes(e)}_u(xu,"isValidOrientation");var Su=Lg;const Zo=h.forwardRef((e,n)=>{const t=J.c(14);let r,o,s,i;t[0]!==e?({className:r,orientation:s,decorative:i,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i):(r=t[1],o=t[2],s=t[3],i=t[4]);const a=s===void 0?"horizontal":s,c=i===void 0?!0:i,u=a==="horizontal"?"h-[1px] w-full":"h-full w-[1px]";let d;t[5]!==r||t[6]!==u?(d=te("shrink-0 bg-border",u,r),t[5]=r,t[6]=u,t[7]=d):d=t[7];let l;return t[8]!==c||t[9]!==a||t[10]!==o||t[11]!==n||t[12]!==d?(l=g.jsx(Su,{ref:n,decorative:c,orientation:a,className:d,...o}),t[8]=c,t[9]=a,t[10]=o,t[11]=n,t[12]=d,t[13]=l):l=t[13],l});Zo.displayName=Su.displayName;var Vg=Object.defineProperty,Er=(e,n)=>Vg(e,"name",{value:n,configurable:!0}),Eu=!!(typeof window<"u"&&window.document&&window.document.createElement);function oe(e,n,{checkForDefaultPrevented:t=!0}={}){return Er(function(o){if(e==null||e(o),t===!1||!o||!o.defaultPrevented)return n==null?void 0:n(o)},"handleEvent")}Er(oe,"composeEventHandlers");function Ug(e){var n;if(!Eu)throw new Error("Cannot access window outside of the DOM");return((n=e==null?void 0:e.ownerDocument)==null?void 0:n.defaultView)??window}Er(Ug,"getOwnerWindow");function ni(e){if(!Eu)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}Er(ni,"getOwnerDocument");function Cu(e,n=!1){const{activeElement:t}=ni(e);if(!(t!=null&&t.nodeName))return null;if(ku(t)&&t.contentDocument)return Cu(t.contentDocument.body,n);if(n){const r=t.getAttribute("aria-activedescendant");if(r){const o=ni(t).getElementById(r);if(o)return o}}return t}Er(Cu,"getActiveElement");function ku(e){return e.tagName==="IFRAME"}Er(ku,"isFrame");var Zg=Object.defineProperty,bt=(e,n)=>Zg(e,"name",{value:n,configurable:!0});function Bg(e,n){const t=h.createContext(n);t.displayName=e+"Context";const r=bt(s=>{const{children:i,...a}=s,c=h.useMemo(()=>a,Object.values(a));return g.jsx(t.Provider,{value:c,children:i})},"Provider");r.displayName=e+"Provider";function o(s,i={}){const{optional:a=!1}=i,c=h.useContext(t);if(c)return c;if(n!==void 0)return n;if(!a)throw new Error(`\`${s}\` must be used within \`${e}\``)}return bt(o,"useContext"),[r,o]}bt(Bg,"createContext");function nn(e,n=[]){let t=[];function r(s,i){const a=h.createContext(i);a.displayName=s+"Context";const c=t.length;t=[...t,i];const u=bt(l=>{var b;const{scope:f,children:p,...m}=l,v=((b=f==null?void 0:f[e])==null?void 0:b[c])||a,y=h.useMemo(()=>m,Object.values(m));return g.jsx(v.Provider,{value:y,children:p})},"Provider");u.displayName=s+"Provider";function d(l,f,p={}){var b;const{optional:m=!1}=p,v=((b=f==null?void 0:f[e])==null?void 0:b[c])||a,y=h.useContext(v);if(y)return y;if(i!==void 0)return i;if(!m)throw new Error(`\`${l}\` must be used within \`${s}\``)}return bt(d,"useContext"),[u,d]}bt(r,"createContext");const o=bt(()=>{const s=t.map(i=>h.createContext(i));return bt(function(a){const c=(a==null?void 0:a[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])},"useScope")},"createScope");return o.scopeName=e,[r,Pu(o,...n)]}bt(nn,"createContextScope");function Pu(...e){const n=e[0];if(e.length===1)return n;const t=bt(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return bt(function(s){const i=r.reduce((a,{useScope:c,scopeName:u})=>{const l=c(s)[`__scope${u}`];return{...a,...l}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return t.scopeName=n.scopeName,t}bt(Pu,"composeContextScopes");var lt=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},Kg=Object.defineProperty,Wg=(e,n)=>Kg(e,"name",{value:n,configurable:!0}),Hg=_r[" useId ".trim().toString()]||(()=>{}),Gg=0;function wn(e){const[n,t]=h.useState(Hg());return lt(()=>{e||t(r=>r??String(Gg++))},[e]),e||(n?`radix-${n}`:"")}Wg(wn,"useId");var qg=Object.defineProperty,Qg=(e,n)=>qg(e,"name",{value:n,configurable:!0}),lc=_r[" useEffectEvent ".trim().toString()],uc=_r[" useInsertionEffect ".trim().toString()];function Ou(e){if(typeof lc=="function")return lc(e);const n=h.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof uc=="function"?uc(()=>{n.current=e}):lt(()=>{n.current=e}),h.useMemo(()=>((...t)=>{var r;return(r=n.current)==null?void 0:r.call(n,...t)}),[])}Qg(Ou,"useEffectEvent");var Jg=Object.defineProperty,ro=(e,n)=>Jg(e,"name",{value:n,configurable:!0}),Yg=_r[" useInsertionEffect ".trim().toString()]||lt;function oo({prop:e,defaultProp:n,onChange:t=ro(()=>{},"onChange"),caller:r}){const[o,s,i]=Ru({defaultProp:n,onChange:t}),a=e!==void 0,c=a?e:o,u=h.useCallback(d=>{var l;if(a){const f=Tu(d)?d(e):d;f!==e&&((l=i.current)==null||l.call(i,f))}else s(d)},[a,e,s,i]);return[c,u]}ro(oo,"useControllableState");function Ru({defaultProp:e,onChange:n}){const[t,r]=h.useState(e),o=h.useRef(t),s=h.useRef(n);return Yg(()=>{s.current=n},[n]),h.useEffect(()=>{var i;o.current!==t&&((i=s.current)==null||i.call(s,t),o.current=t)},[t,o]),[t,r,s]}ro(Ru,"useUncontrolledState");function Tu(e){return typeof e=="function"}ro(Tu,"isFunction");var dc=Symbol("RADIX:SYNC_STATE");function Xg(e,n,t,r){const{prop:o,defaultProp:s,onChange:i,caller:a}=n,c=o!==void 0,u=Ou(i),d=[{...t,state:s}];r&&d.push(r);const[l,f]=h.useReducer((y,b)=>{if(b.type===dc)return{...y,state:b.state};const _=e(y,b);return c&&!Object.is(_.state,y.state)&&u(_.state),_},...d),p=l.state,m=h.useRef(p);h.useEffect(()=>{m.current!==p&&(m.current=p,c||u(p))},[p,m,c]);const v=h.useMemo(()=>o!==void 0?{...l,state:o}:l,[l,o]);return h.useEffect(()=>{c&&!Object.is(o,l.state)&&f({type:dc,state:o})},[o,l.state,c]),[v,f]}ro(Xg,"useControllableStateReducer");var ev=Object.defineProperty,tv=(e,n)=>ev(e,"name",{value:n,configurable:!0});function Xt(e){const n=h.useRef(e);return h.useEffect(()=>{n.current=e}),h.useMemo(()=>((...t)=>{var r;return(r=n.current)==null?void 0:r.call(n,...t)}),[])}tv(Xt,"useCallbackRef");var nv=Object.defineProperty,We=(e,n)=>nv(e,"name",{value:n,configurable:!0}),ri="dismissableLayer.update",rv="dismissableLayer.pointerDownOutside",ov="dismissableLayer.focusOutside",fc,Iu=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Qi=h.forwardRef(We(function(n,t){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:c,onDismiss:u,...d}=n,l=h.useContext(Iu),[f,p]=h.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=h.useState({}),y=Re(t,p),b=Array.from(l.layers),[_]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),k=_?b.indexOf(_):-1,S=f?b.indexOf(f):-1,E=l.layersWithOutsidePointerEventsDisabled.size>0,O=S>=k,I=h.useRef(!1),A=Du(M=>{i==null||i(M),c==null||c(M),M.defaultPrevented||u==null||u()},{ownerDocument:m,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:I,dismissableSurfaces:l.dismissableSurfaces,shouldHandlePointerDownOutside:h.useCallback(M=>{if(!(M instanceof Node))return!1;const V=[...l.branches].some(K=>K.contains(M));return O&&!V},[l.branches,O])}),R=Nu(M=>{if(o&&I.current)return;const V=M.target;[...l.branches].some(Y=>Y.contains(V))||(a==null||a(M),c==null||c(M),M.defaultPrevented||u==null||u())},m),$=f?S===b.length-1:!1,F=Xt(M=>{M.key==="Escape"&&(s==null||s(M),!M.defaultPrevented&&u&&(M.preventDefault(),u()))});return h.useEffect(()=>{if($)return m.addEventListener("keydown",F,{capture:!0}),()=>m.removeEventListener("keydown",F,{capture:!0})},[m,$,F]),h.useEffect(()=>{if(f)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(fc=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),oi(),()=>{r&&(l.layersWithOutsidePointerEventsDisabled.delete(f),l.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=fc))}},[f,m,r,l]),h.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),oi())},[f,l]),h.useEffect(()=>{const M=We(()=>v({}),"handleUpdate");return document.addEventListener(ri,M),()=>document.removeEventListener(ri,M)},[]),g.jsx(Me.div,{...d,ref:y,style:{pointerEvents:E?O?"auto":"none":void 0,...n.style},onFocusCapture:oe(n.onFocusCapture,R.onFocusCapture),onBlurCapture:oe(n.onBlurCapture,R.onBlurCapture),onPointerDownCapture:oe(n.onPointerDownCapture,A.onPointerDownCapture)})},"DismissableLayer"));function Au(){const e=h.useContext(Iu),[n,t]=h.useState(null);return h.useEffect(()=>{if(n)return e.dismissableSurfaces.add(n),()=>{e.dismissableSurfaces.delete(n)}},[n,e.dismissableSurfaces]),t}We(Au,"useDismissableLayerSurface");var sv=We(()=>!0,"IS_TRUE");function Du(e,n){const{ownerDocument:t=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:i=sv}=n,a=Xt(e),c=h.useRef(!1),u=h.useRef(!1),d=h.useRef(new Map),l=h.useRef(()=>{});return h.useEffect(()=>{function f(){u.current=!1,o.current=!1,d.current.clear()}We(f,"resetOutsideInteraction");function p(){return Array.from(d.current.values()).some(Boolean)}We(p,"isOutsideInteractionIntercepted");function m(k){if(!u.current)return;const S=k.target;S instanceof Node&&[...s].some(O=>O.contains(S))||d.current.set(k.type,!0),k.type==="click"&&window.setTimeout(()=>{u.current&&l.current()},0)}We(m,"handleInteractionCapture");function v(k){u.current&&d.current.set(k.type,!1)}We(v,"handleInteractionBubble");const y=We(k=>{if(k.target&&!c.current){let S=function(){t.removeEventListener("click",l.current);const O=p();f(),O||Ji(rv,a,E,{discrete:!0})};if(We(S,"handleAndDispatchPointerDownOutsideEvent"),!i(k.target)){t.removeEventListener("click",l.current),f(),c.current=!1;return}const E={originalEvent:k};u.current=!0,o.current=r&&k.button===0,d.current.clear(),!r||k.button!==0?S():(t.removeEventListener("click",l.current),l.current=S,t.addEventListener("click",l.current,{once:!0}))}else t.removeEventListener("click",l.current),f();c.current=!1},"handlePointerDown"),b=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const k of b)t.addEventListener(k,m,!0),t.addEventListener(k,v);const _=window.setTimeout(()=>{t.addEventListener("pointerdown",y)},0);return()=>{window.clearTimeout(_),t.removeEventListener("pointerdown",y),t.removeEventListener("click",l.current);for(const k of b)t.removeEventListener(k,m,!0),t.removeEventListener(k,v)}},[t,a,r,o,s,i]),{onPointerDownCapture:We(()=>c.current=!0,"onPointerDownCapture")}}We(Du,"usePointerDownOutside");function Nu(e,n=globalThis==null?void 0:globalThis.document){const t=Xt(e),r=h.useRef(!1);return h.useEffect(()=>{const o=We(s=>{s.target&&!r.current&&Ji(ov,t,{originalEvent:s},{discrete:!1})},"handleFocus");return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,t]),{onFocusCapture:We(()=>r.current=!0,"onFocusCapture"),onBlurCapture:We(()=>r.current=!1,"onBlurCapture")}}We(Nu,"useFocusOutside");function oi(){const e=new CustomEvent(ri);document.dispatchEvent(e)}We(oi,"dispatchUpdate");function Ji(e,n,t,{discrete:r}){const o=t.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&o.addEventListener(e,n,{once:!0}),r?qi(o,s):o.dispatchEvent(s)}We(Ji,"handleAndDispatchCustomEvent");var iv=Object.defineProperty,ot=(e,n)=>iv(e,"name",{value:n,configurable:!0}),xs="focusScope.autoFocusOnMount",Ss="focusScope.autoFocusOnUnmount",hc={bubbles:!1,cancelable:!0},ju=h.forwardRef(ot(function(n,t){const{loop:r=!1,trapped:o=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=n,[c,u]=h.useState(null),d=Xt(s),l=Xt(i),f=h.useRef(null),p=Re(t,u),m=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(o){let y=function(S){if(m.paused||!c)return;const E=S.target;c.contains(E)?f.current=E:Gt(f.current,{select:!0})},b=function(S){if(m.paused||!c)return;const E=S.relatedTarget;E!==null&&(c.contains(E)||Gt(f.current,{select:!0}))},_=function(S){if(document.activeElement===document.body)for(const O of S)O.removedNodes.length>0&&Gt(c)};ot(y,"handleFocusIn"),ot(b,"handleFocusOut"),ot(_,"handleMutations"),document.addEventListener("focusin",y),document.addEventListener("focusout",b);const k=new MutationObserver(_);return c&&k.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),k.disconnect()}}},[o,c,m.paused]),h.useEffect(()=>{if(c){pc.add(m);const y=document.activeElement;if(!c.contains(y)){const _=new CustomEvent(xs,hc);c.addEventListener(xs,d),c.dispatchEvent(_),_.defaultPrevented||(Mu(Vu(Yi(c)),{select:!0}),document.activeElement===y&&Gt(c))}return()=>{c.removeEventListener(xs,d),setTimeout(()=>{const _=new CustomEvent(Ss,hc);c.addEventListener(Ss,l),c.dispatchEvent(_),_.defaultPrevented||Gt(y??document.body,{select:!0}),c.removeEventListener(Ss,l),pc.remove(m)},0)}}},[c,d,l,m]);const v=h.useCallback(y=>{if(!r&&!o||m.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(b&&_){const k=y.currentTarget,[S,E]=$u(k);S&&E?!y.shiftKey&&_===E?(y.preventDefault(),r&&Gt(S,{select:!0})):y.shiftKey&&_===S&&(y.preventDefault(),r&&Gt(E,{select:!0})):_===k&&y.preventDefault()}},[r,o,m.paused]);return g.jsx(Me.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})},"FocusScope"));function Mu(e,{select:n=!1}={}){const t=document.activeElement;for(const r of e)if(Gt(r,{select:n}),document.activeElement!==t)return}ot(Mu,"focusFirst");function $u(e){const n=Yi(e),t=si(n,e),r=si(n.reverse(),e);return[t,r]}ot($u,"getTabbableEdges");function Yi(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:ot(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;t.nextNode();)n.push(t.currentNode);return n}ot(Yi,"getTabbableCandidates");function si(e,n){const t=typeof n.checkVisibility=="function"&&n.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(t?!r.checkVisibility({checkVisibilityCSS:!0}):zu(r,{upTo:n})))return r}ot(si,"findVisible");function zu(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}ot(zu,"isHidden");function Fu(e){return e instanceof HTMLInputElement&&"select"in e}ot(Fu,"isSelectableInput");function Gt(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&Fu(e)&&n&&e.select()}}ot(Gt,"focus");var pc=Lu();function Lu(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=ii(e,n),e.unshift(n)},remove(n){var t;e=ii(e,n),(t=e[0])==null||t.resume()}}}ot(Lu,"createFocusScopesStack");function ii(e,n){const t=[...e],r=t.indexOf(n);return r!==-1&&t.splice(r,1),t}ot(ii,"arrayRemove");function Vu(e){return e.filter(n=>n.tagName!=="A")}ot(Vu,"removeLinks");var av=Object.defineProperty,cv=(e,n)=>av(e,"name",{value:n,configurable:!0}),Xi=h.forwardRef(cv(function(n,t){var c;const{container:r,...o}=n,[s,i]=h.useState(!1);lt(()=>i(!0),[]);const a=r||s&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return a?Tl.createPortal(g.jsx(Me.div,{...o,ref:t}),a):null},"Portal")),lv=Object.defineProperty,en=(e,n)=>lv(e,"name",{value:n,configurable:!0});function Uu(e,n){return h.useReducer((t,r)=>n[t][r]??t,e)}en(Uu,"useStateMachine");var rn=en(e=>{const{present:n,children:t}=e,r=Zu(n),o=typeof t=="function"?t({present:r.isPresent}):h.Children.only(t),s=Bu(r.ref,Ku(o));return typeof t=="function"||r.isPresent?h.cloneElement(o,{ref:s}):null},"Presence");function Zu(e){const[n,t]=h.useState(),r=h.useRef(null),o=h.useRef(e),s=h.useRef("none"),i=h.useRef(void 0),a=e?"mounted":"unmounted",[c,u]=Uu(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{c==="mounted"?(s.current=i.current??er(r.current),i.current=void 0):s.current="none"},[c]),lt(()=>{const d=r.current,l=o.current;if(l!==e){const p=s.current,m=er(d);e?(i.current=m,u("MOUNT")):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(l&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),lt(()=>{if(n){let d;const l=n.ownerDocument.defaultView??window,f=en(m=>{const y=er(r.current).includes(CSS.escape(m.animationName));if(m.target===n&&y&&(u("ANIMATION_END"),!o.current)){const b=n.style.animationFillMode;n.style.animationFillMode="forwards",d=l.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=b)})}},"handleAnimationEnd"),p=en(m=>{m.target===n&&(s.current=er(r.current))},"handleAnimationStart");return n.addEventListener("animationstart",p),n.addEventListener("animationcancel",f),n.addEventListener("animationend",f),()=>{l.clearTimeout(d),n.removeEventListener("animationstart",p),n.removeEventListener("animationcancel",f),n.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[n,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:h.useCallback(d=>{if(d){const l=getComputedStyle(d);r.current=l,i.current=er(l)}else r.current=null;t(d)},[])}}en(Zu,"usePresence");function ai(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}en(ai,"setRef");function Bu(...e){const n=h.useRef(e);return n.current=e,h.useCallback(t=>{const r=n.current;let o=!1;const s=r.map(i=>{const a=ai(i,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():ai(r[i],null)}}},[])}en(Bu,"useStableComposedRefs");function er(e){return(e==null?void 0:e.animationName)||"none"}en(er,"getAnimationName");function Ku(e){var r,o;let n=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}en(Ku,"getElementRef");var uv=Object.defineProperty,ea=(e,n)=>uv(e,"name",{value:n,configurable:!0}),yo=0,Mt=null;function dv(e){return ts(),e.children}ea(dv,"FocusGuards");function ts(){h.useEffect(()=>{Mt||(Mt={start:ci(),end:ci()});const{start:e,end:n}=Mt;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==n&&document.body.insertAdjacentElement("beforeend",n),yo++,()=>{yo===1&&(Mt==null||Mt.start.remove(),Mt==null||Mt.end.remove(),Mt=null),yo=Math.max(0,yo-1)}},[])}ea(ts,"useFocusGuards");function ci(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}ea(ci,"createFocusGuard");var Lt=function(){return Lt=Object.assign||function(n){for(var t,r=1,o=arguments.length;r<o;r++){t=arguments[r];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[s]=t[s])}return n},Lt.apply(this,arguments)};function Wu(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]]);return t}function fv(e,n,t){if(t||arguments.length===2)for(var r=0,o=n.length,s;r<o;r++)(s||!(r in n))&&(s||(s=Array.prototype.slice.call(n,0,r)),s[r]=n[r]);return e.concat(s||Array.prototype.slice.call(n))}var Ao="right-scroll-bar-position",Do="width-before-scroll-bar",hv="with-scroll-bars-hidden",pv="--removed-body-scroll-bar-size";function Es(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function mv(e,n){var t=h.useState(function(){return{value:e,callback:n,facade:{get current(){return t.value},set current(r){var o=t.value;o!==r&&(t.value=r,t.callback(r,o))}}}})[0];return t.callback=n,t.facade}var gv=typeof window<"u"?h.useLayoutEffect:h.useEffect,mc=new WeakMap;function vv(e,n){var t=mv(null,function(r){return e.forEach(function(o){return Es(o,r)})});return gv(function(){var r=mc.get(t);if(r){var o=new Set(r),s=new Set(e),i=t.current;o.forEach(function(a){s.has(a)||Es(a,null)}),s.forEach(function(a){o.has(a)||Es(a,i)})}mc.set(t,e)},[e]),t}function yv(e){return e}function bv(e,n){n===void 0&&(n=yv);var t=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(s){var i=n(s,r);return t.push(i),function(){t=t.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;t.length;){var i=t;t=[],i.forEach(s)}t={push:function(a){return s(a)},filter:function(){return t}}},assignMedium:function(s){r=!0;var i=[];if(t.length){var a=t;t=[],a.forEach(s),i=t}var c=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),t={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),t}}}};return o}function wv(e){e===void 0&&(e={});var n=bv(null);return n.options=Lt({async:!0,ssr:!1},e),n}var Hu=function(e){var n=e.sideCar,t=Wu(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=n.read();if(!r)throw new Error("Sidecar medium not found");return h.createElement(r,Lt({},t))};Hu.isSideCarExport=!0;function _v(e,n){return e.useMedium(n),Hu}var Gu=wv(),Cs=function(){},ns=h.forwardRef(function(e,n){var t=h.useRef(null),r=h.useState({onScrollCapture:Cs,onWheelCapture:Cs,onTouchMoveCapture:Cs}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,l=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,v=e.inert,y=e.allowPinchZoom,b=e.as,_=b===void 0?"div":b,k=e.gapMode,S=Wu(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=f,O=vv([t,n]),I=Lt(Lt({},S),o);return h.createElement(h.Fragment,null,d&&h.createElement(E,{sideCar:Gu,removeScrollBar:u,shards:l,noRelative:p,noIsolation:m,inert:v,setCallbacks:s,allowPinchZoom:!!y,lockRef:t,gapMode:k}),i?h.cloneElement(h.Children.only(a),Lt(Lt({},I),{ref:O})):h.createElement(_,Lt({},I,{className:c,ref:O}),a))});ns.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ns.classNames={fullWidth:Do,zeroRight:Ao};var xv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Sv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=xv();return n&&e.setAttribute("nonce",n),e}function Ev(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function Cv(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var kv=function(){var e=0,n=null;return{add:function(t){e==0&&(n=Sv())&&(Ev(n,t),Cv(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Pv=function(){var e=kv();return function(n,t){h.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&t])}},qu=function(){var e=Pv(),n=function(t){var r=t.styles,o=t.dynamic;return e(r,o),null};return n},Ov={left:0,top:0,right:0,gap:0},ks=function(e){return parseInt(e||"",10)||0},Rv=function(e){var n=window.getComputedStyle(document.body),t=n[e==="padding"?"paddingLeft":"marginLeft"],r=n[e==="padding"?"paddingTop":"marginTop"],o=n[e==="padding"?"paddingRight":"marginRight"];return[ks(t),ks(r),ks(o)]},Tv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ov;var n=Rv(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}},Iv=qu(),nr="data-scroll-locked",Av=function(e,n,t,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return t===void 0&&(t="margin"),`
|
|
123
|
-
.`.concat(hv,` {
|
|
124
|
-
overflow: hidden `).concat(r,`;
|
|
125
|
-
padding-right: `).concat(a,"px ").concat(r,`;
|
|
126
|
-
}
|
|
127
|
-
body[`).concat(nr,`] {
|
|
128
|
-
overflow: hidden `).concat(r,`;
|
|
129
|
-
overscroll-behavior: contain;
|
|
130
|
-
`).concat([n&&"position: relative ".concat(r,";"),t==="margin"&&`
|
|
131
|
-
padding-left: `.concat(o,`px;
|
|
132
|
-
padding-top: `).concat(s,`px;
|
|
133
|
-
padding-right: `).concat(i,`px;
|
|
134
|
-
margin-left:0;
|
|
135
|
-
margin-top:0;
|
|
136
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
137
|
-
`),t==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.`).concat(Ao,` {
|
|
141
|
-
right: `).concat(a,"px ").concat(r,`;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.`).concat(Do,` {
|
|
145
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.`).concat(Ao," .").concat(Ao,` {
|
|
149
|
-
right: 0 `).concat(r,`;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.`).concat(Do," .").concat(Do,` {
|
|
153
|
-
margin-right: 0 `).concat(r,`;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
body[`).concat(nr,`] {
|
|
157
|
-
`).concat(pv,": ").concat(a,`px;
|
|
158
|
-
}
|
|
159
|
-
`)},gc=function(){var e=parseInt(document.body.getAttribute(nr)||"0",10);return isFinite(e)?e:0},Dv=function(){h.useEffect(function(){return document.body.setAttribute(nr,(gc()+1).toString()),function(){var e=gc()-1;e<=0?document.body.removeAttribute(nr):document.body.setAttribute(nr,e.toString())}},[])},Nv=function(e){var n=e.noRelative,t=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Dv();var s=h.useMemo(function(){return Tv(o)},[o]);return h.createElement(Iv,{styles:Av(s,!n,o,t?"":"!important")})},li=!1;if(typeof window<"u")try{var bo=Object.defineProperty({},"passive",{get:function(){return li=!0,!0}});window.addEventListener("test",bo,bo),window.removeEventListener("test",bo,bo)}catch{li=!1}var Qn=li?{passive:!1}:!1,jv=function(e){return e.tagName==="TEXTAREA"},Qu=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!jv(e)&&t[n]==="visible")},Mv=function(e){return Qu(e,"overflowY")},$v=function(e){return Qu(e,"overflowX")},vc=function(e,n){var t=n.ownerDocument,r=n;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ju(e,r);if(o){var s=Yu(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==t.body);return!1},zv=function(e){var n=e.scrollTop,t=e.scrollHeight,r=e.clientHeight;return[n,t,r]},Fv=function(e){var n=e.scrollLeft,t=e.scrollWidth,r=e.clientWidth;return[n,t,r]},Ju=function(e,n){return e==="v"?Mv(n):$v(n)},Yu=function(e,n){return e==="v"?zv(n):Fv(n)},Lv=function(e,n){return e==="h"&&n==="rtl"?-1:1},Vv=function(e,n,t,r,o){var s=Lv(e,window.getComputedStyle(n).direction),i=s*r,a=t.target,c=n.contains(a),u=!1,d=i>0,l=0,f=0;do{if(!a)break;var p=Yu(e,a),m=p[0],v=p[1],y=p[2],b=v-y-s*m;(m||b)&&Ju(e,a)&&(l+=b,f+=m);var _=a.parentNode;a=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!c&&a!==document.body||c&&(n.contains(a)||n===a));return(d&&Math.abs(l)<1||!d&&Math.abs(f)<1)&&(u=!0),u},wo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yc=function(e){return[e.deltaX,e.deltaY]},bc=function(e){return e&&"current"in e?e.current:e},Uv=function(e,n){return e[0]===n[0]&&e[1]===n[1]},Zv=function(e){return`
|
|
160
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
161
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
162
|
-
`)},Bv=0,Jn=[];function Kv(e){var n=h.useRef([]),t=h.useRef([0,0]),r=h.useRef(),o=h.useState(Bv++)[0],s=h.useState(qu)[0],i=h.useRef(e);h.useEffect(function(){i.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=fv([e.lockRef.current],(e.shards||[]).map(bc),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=h.useCallback(function(v,y){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var b=wo(v),_=t.current,k="deltaX"in v?v.deltaX:_[0]-b[0],S="deltaY"in v?v.deltaY:_[1]-b[1],E,O=v.target,I=Math.abs(k)>Math.abs(S)?"h":"v";if("touches"in v&&I==="h"&&O.type==="range")return!1;var A=window.getSelection(),R=A&&A.anchorNode,$=R?R===O||R.contains(O):!1;if($)return!1;var F=vc(I,O);if(!F)return!0;if(F?E=I:(E=I==="v"?"h":"v",F=vc(I,O)),!F)return!1;if(!r.current&&"changedTouches"in v&&(k||S)&&(r.current=E),!E)return!0;var M=r.current||E;return Vv(M,y,v,M==="h"?k:S)},[]),c=h.useCallback(function(v){var y=v;if(!(!Jn.length||Jn[Jn.length-1]!==s)){var b="deltaY"in y?yc(y):wo(y),_=n.current.filter(function(E){return E.name===y.type&&(E.target===y.target||y.target===E.shadowParent)&&Uv(E.delta,b)})[0];if(_&&_.should){y.cancelable&&y.preventDefault();return}if(!_){var k=(i.current.shards||[]).map(bc).filter(Boolean).filter(function(E){return E.contains(y.target)}),S=k.length>0?a(y,k[0]):!i.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),u=h.useCallback(function(v,y,b,_){var k={name:v,delta:y,target:b,should:_,shadowParent:Wv(b)};n.current.push(k),setTimeout(function(){n.current=n.current.filter(function(S){return S!==k})},1)},[]),d=h.useCallback(function(v){t.current=wo(v),r.current=void 0},[]),l=h.useCallback(function(v){u(v.type,yc(v),v.target,a(v,e.lockRef.current))},[]),f=h.useCallback(function(v){u(v.type,wo(v),v.target,a(v,e.lockRef.current))},[]);h.useEffect(function(){return Jn.push(s),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Qn),document.addEventListener("touchmove",c,Qn),document.addEventListener("touchstart",d,Qn),function(){Jn=Jn.filter(function(v){return v!==s}),document.removeEventListener("wheel",c,Qn),document.removeEventListener("touchmove",c,Qn),document.removeEventListener("touchstart",d,Qn)}},[]);var p=e.removeScrollBar,m=e.inert;return h.createElement(h.Fragment,null,m?h.createElement(s,{styles:Zv(o)}):null,p?h.createElement(Nv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Wv(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const Hv=_v(Gu,Kv);var ta=h.forwardRef(function(e,n){return h.createElement(ns,Lt({},e,{ref:n,sideCar:Hv}))});ta.classNames=ns.classNames;var Gv=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Yn=new WeakMap,_o=new WeakMap,xo={},Ps=0,Xu=function(e){return e&&(e.host||Xu(e.parentNode))},qv=function(e,n){return n.map(function(t){if(e.contains(t))return t;var r=Xu(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},Qv=function(e,n,t,r){var o=qv(n,Array.isArray(e)?e:[e]);xo[t]||(xo[t]=new WeakMap);var s=xo[t],i=[],a=new Set,c=new Set(o),u=function(l){!l||a.has(l)||(a.add(l),u(l.parentNode))};o.forEach(u);var d=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(f){if(a.has(f))d(f);else try{var p=f.getAttribute(r),m=p!==null&&p!=="false",v=(Yn.get(f)||0)+1,y=(s.get(f)||0)+1;Yn.set(f,v),s.set(f,y),i.push(f),v===1&&m&&_o.set(f,!0),y===1&&f.setAttribute(t,"true"),m||f.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",f,b)}})};return d(n),a.clear(),Ps++,function(){i.forEach(function(l){var f=Yn.get(l)-1,p=s.get(l)-1;Yn.set(l,f),s.set(l,p),f||(_o.has(l)||l.removeAttribute(r),_o.delete(l)),p||l.removeAttribute(t)}),Ps--,Ps||(Yn=new WeakMap,Yn=new WeakMap,_o=new WeakMap,xo={})}},ed=function(e,n,t){t===void 0&&(t="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Gv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Qv(r,o,t,"aria-hidden")):function(){return null}},Jv=Object.defineProperty,gt=(e,n)=>Jv(e,"name",{value:n,configurable:!0}),na="Dialog",[td,$C]=nn(na),[Yv,It]=td(na),Xv=gt(e=>{const{__scopeDialog:n,children:t,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=h.useRef(null),c=h.useRef(null),[u,d]=oo({prop:r,defaultProp:o??!1,onChange:s,caller:na}),[l,f]=h.useState(0),[p,m]=h.useState(0);return g.jsx(Yv,{scope:n,triggerRef:a,contentRef:c,contentId:wn(),titleId:wn(),descriptionId:wn(),titlePresent:l>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:u,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(v=>!v),[d]),modal:i,children:t})},"Dialog"),ey="DialogTrigger",zC=h.forwardRef(gt(function(n,t){const{__scopeDialog:r,...o}=n,s=It(ey,r),i=Re(t,s.triggerRef);return g.jsx(Me.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":rs(s.open),...o,ref:i,onClick:oe(n.onClick,s.onOpenToggle)})},"DialogTrigger")),nd="DialogPortal",[ty,rd]=td(nd,{forceMount:void 0}),ny=gt(e=>{const{__scopeDialog:n,forceMount:t,children:r,container:o}=e,s=It(nd,n);return g.jsx(ty,{scope:n,forceMount:t,children:h.Children.map(r,i=>g.jsx(rn,{present:t||s.open,children:g.jsx(Xi,{asChild:!0,container:o,children:i})}))})},"DialogPortal"),ui="DialogOverlay",od=h.forwardRef(gt(function(n,t){const r=rd(ui,n.__scopeDialog),{forceMount:o=r.forceMount,...s}=n,i=It(ui,n.__scopeDialog);return i.modal?g.jsx(rn,{present:o||i.open,children:g.jsx(oy,{...s,ref:t})}):null},"DialogOverlay")),ry=Yt("DialogOverlay.RemoveScroll"),oy=h.forwardRef(gt(function(n,t){const{__scopeDialog:r,...o}=n,s=It(ui,r),i=Au(),a=Re(t,i);return g.jsx(ta,{as:ry,allowPinchZoom:!0,shards:[s.contentRef],children:g.jsx(Me.div,{"data-state":rs(s.open),...o,ref:a,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),Br="DialogContent",sd=h.forwardRef(gt(function(n,t){const r=rd(Br,n.__scopeDialog),{forceMount:o=r.forceMount,...s}=n,i=It(Br,n.__scopeDialog);return g.jsx(rn,{present:o||i.open,children:i.modal?g.jsx(sy,{...s,ref:t}):g.jsx(iy,{...s,ref:t})})},"DialogContent")),sy=h.forwardRef(gt(function(n,t){const r=It(Br,n.__scopeDialog),o=h.useRef(null),s=Re(t,r.contentRef,o);return h.useEffect(()=>{const i=o.current;if(i)return ed(i)},[]),g.jsx(id,{...n,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:oe(n.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:oe(n.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&i.preventDefault()}),onFocusOutside:oe(n.onFocusOutside,i=>i.preventDefault())})},"DialogContentModal")),iy=h.forwardRef(gt(function(n,t){const r=It(Br,n.__scopeDialog),o=h.useRef(!1),s=h.useRef(!1);return g.jsx(id,{...n,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,c;(a=n.onCloseAutoFocus)==null||a.call(n,i),i.defaultPrevented||(o.current||(c=r.triggerRef.current)==null||c.focus(),i.preventDefault()),o.current=!1,s.current=!1},onInteractOutside:i=>{var u,d;(u=n.onInteractOutside)==null||u.call(n,i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((d=r.triggerRef.current)==null?void 0:d.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})},"DialogContentNonModal")),id=h.forwardRef(gt(function(n,t){const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=n,c=It(Br,r);return ts(),g.jsx(g.Fragment,{children:g.jsx(ju,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:s,onUnmountAutoFocus:i,children:g.jsx(Qi,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionPresent?c.descriptionId:void 0,"aria-labelledby":c.titlePresent?c.titleId:void 0,"data-state":rs(c.open),...a,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})},"DialogContentImpl")),ay="DialogTitle",ad=h.forwardRef(gt(function(n,t){const{__scopeDialog:r,...o}=n,s=It(ay,r),{setTitleCount:i}=s;return lt(()=>(i(a=>a+1),()=>i(a=>a-1)),[i]),g.jsx(Me.h2,{id:s.titleId,...o,ref:t})},"DialogTitle")),cy="DialogDescription",cd=h.forwardRef(gt(function(n,t){const{__scopeDialog:r,...o}=n,s=It(cy,r),{setDescriptionCount:i}=s;return lt(()=>(i(a=>a+1),()=>i(a=>a-1)),[i]),g.jsx(Me.p,{id:s.descriptionId,...o,ref:t})},"DialogDescription")),ly="DialogClose",uy=h.forwardRef(gt(function(n,t){const{__scopeDialog:r,...o}=n,s=It(ly,r);return g.jsx(Me.button,{type:"button",...o,ref:t,onClick:oe(n.onClick,()=>s.onOpenChange(!1))})},"DialogClose"));function rs(e){return e?"open":"closed"}gt(rs,"getState");const dy=Xv,fy=ny,ld=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(od,{className:s,...o,ref:n}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});ld.displayName=od.displayName;const hy=no("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ud=h.forwardRef((e,n)=>{const t=J.c(15);let r,o,s,i;t[0]!==e?({side:i,className:o,children:r,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i):(r=t[1],o=t[2],s=t[3],i=t[4]);const a=i===void 0?"right":i;let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=g.jsx(ld,{}),t[5]=c):c=t[5];let u;t[6]!==o||t[7]!==a?(u=te(hy({side:a}),o),t[6]=o,t[7]=a,t[8]=u):u=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsxs(uy,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[g.jsx(Qm,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]}),t[9]=d):d=t[9];let l;return t[10]!==r||t[11]!==s||t[12]!==n||t[13]!==u?(l=g.jsxs(fy,{children:[c,g.jsxs(sd,{ref:n,className:u,...s,children:[r,d]})]}),t[10]=r,t[11]=s,t[12]=n,t[13]=u,t[14]=l):l=t[14],l});ud.displayName=sd.displayName;const dd=e=>{const n=J.c(8);let t,r;n[0]!==e?({className:t,...r}=e,n[0]=e,n[1]=t,n[2]=r):(t=n[1],r=n[2]);let o;n[3]!==t?(o=te("flex flex-col space-y-2 text-center sm:text-left",t),n[3]=t,n[4]=o):o=n[4];let s;return n[5]!==r||n[6]!==o?(s=g.jsx("div",{className:o,...r}),n[5]=r,n[6]=o,n[7]=s):s=n[7],s};dd.displayName="SheetHeader";const fd=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("text-lg font-semibold text-foreground",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(ad,{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});fd.displayName=ad.displayName;const hd=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("text-sm text-muted-foreground",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(cd,{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});hd.displayName=cd.displayName;function wc(e){const n=J.c(8);let t,r;n[0]!==e?({className:t,...r}=e,n[0]=e,n[1]=t,n[2]=r):(t=n[1],r=n[2]);let o;n[3]!==t?(o=te("animate-pulse rounded-md bg-muted",t),n[3]=t,n[4]=o):o=n[4];let s;return n[5]!==r||n[6]!==o?(s=g.jsx("div",{className:o,...r}),n[5]=r,n[6]=o,n[7]=s):s=n[7],s}var py=Object.defineProperty,my=(e,n)=>py(e,"name",{value:n,configurable:!0});function pd(e){const[n,t]=h.useState(void 0);return lt(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;t({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else t(void 0)},[e]),n}my(pd,"useSize");var gy=Object.defineProperty,_n=(e,n)=>gy(e,"name",{value:n,configurable:!0}),md="Popper",[gd,os]=nn(md),[vy,vd]=gd(md),yy=_n(e=>{const{__scopePopper:n,children:t}=e,[r,o]=h.useState(null),[s,i]=h.useState(void 0);return g.jsx(vy,{scope:n,anchor:r,onAnchorChange:o,placementState:s,setPlacementState:i,children:t})},"Popper"),by="PopperAnchor",wy=h.forwardRef(_n(function(n,t){const{__scopePopper:r,virtualRef:o,...s}=n,i=vd(by,r),a=h.useRef(null),c=i.onAnchorChange,u=h.useCallback(v=>{a.current=v,v&&c(v)},[c]),d=Re(t,u),l=h.useRef(null);h.useEffect(()=>{if(!o)return;const v=l.current;l.current=o.current,v!==l.current&&c(l.current)});const f=i.placementState&&ss(i.placementState),p=f==null?void 0:f[0],m=f==null?void 0:f[1];return o?null:g.jsx(Me.div,{"data-radix-popper-side":p,"data-radix-popper-align":m,...s,ref:d})},"PopperAnchor")),yd="PopperContent",[_y,FC]=gd(yd),xy=h.forwardRef(_n(function(n,t){var de,xe,Ze,st,dt,Dt,Bn;const{__scopePopper:r,side:o="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:l=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:v,...y}=n,b=vd(yd,r),[_,k]=h.useState(null),S=Re(t,k),[E,O]=h.useState(null),I=pd(E),A=(I==null?void 0:I.width)??0,R=(I==null?void 0:I.height)??0,$=o+(i!=="center"?"-"+i:""),F=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},M=Array.isArray(d)?d:[d],V=M.length>0,K={padding:F,boundary:M.filter(bd),altBoundary:V},{refs:Y,floatingStyles:W,placement:Q,isPositioned:he,middlewareData:ne}=Fh({strategy:"fixed",placement:$,whileElementsMounted:_n((...on)=>Hh(...on,{animationFrame:m==="always"}),"whileElementsMounted"),elements:{reference:b.anchor},middleware:[Lh({mainAxis:s+R,alignmentAxis:a}),u&&Vh({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Wh():void 0,...K}),u&&Uh({...K}),Zh({...K,apply:_n(({elements:on,rects:Et,availableWidth:Cn,availableHeight:Ye})=>{const{width:Or,height:Kn}=Et.reference,Ne=on.floating.style;Ne.setProperty("--radix-popper-available-width",`${Cn}px`),Ne.setProperty("--radix-popper-available-height",`${Ye}px`),Ne.setProperty("--radix-popper-anchor-width",`${Or}px`),Ne.setProperty("--radix-popper-anchor-height",`${Kn}px`)},"apply")}),E&&Bh({element:E,padding:c}),Sy({arrowWidth:A,arrowHeight:R}),p&&Kh({strategy:"referenceHidden",...K,boundary:V?K.boundary:void 0})]}),G=b.setPlacementState;lt(()=>(G(Q),()=>{G(void 0)}),[Q,G]);const[se,le]=ss(Q),Se=Xt(v);lt(()=>{he&&(Se==null||Se())},[he,Se]);const X=(de=ne.arrow)==null?void 0:de.x,ce=(xe=ne.arrow)==null?void 0:xe.y,pe=((Ze=ne.arrow)==null?void 0:Ze.centerOffset)!==0,[_e,Ie]=h.useState();return lt(()=>{_&&Ie(window.getComputedStyle(_).zIndex)},[_]),g.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:he?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_e,"--radix-popper-transform-origin":[(st=ne.transformOrigin)==null?void 0:st.x,(dt=ne.transformOrigin)==null?void 0:dt.y].join(" "),...((Dt=ne.hide)==null?void 0:Dt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:g.jsx(_y,{scope:r,placedSide:se,placedAlign:le,onArrowChange:O,arrowX:X,arrowY:ce,shouldHideArrow:pe,children:g.jsx(Me.div,{"data-side":se,"data-align":le,...y,ref:S,style:{...y.style,animation:he?(Bn=y.style)==null?void 0:Bn.animation:"none"}})})})},"PopperContent"));function bd(e){return e!==null}_n(bd,"isNotNull");var Sy=_n(e=>({name:"transformOrigin",options:e,fn(n){var y,b,_;const{placement:t,rects:r,middlewareData:o}=n,i=((y=o.arrow)==null?void 0:y.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=ss(t),l={start:"0%",center:"50%",end:"100%"}[d],f=(((b=o.arrow)==null?void 0:b.x)??0)+a/2,p=(((_=o.arrow)==null?void 0:_.y)??0)+c/2;let m="",v="";return u==="bottom"?(m=i?l:`${f}px`,v=`${-c}px`):u==="top"?(m=i?l:`${f}px`,v=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,v=i?l:`${p}px`):u==="left"&&(m=`${r.floating.width+c}px`,v=i?l:`${p}px`),{data:{x:m,y:v}}}}),"transformOrigin");function ss(e){const[n,t="center"]=e.split("-");return[n,t]}_n(ss,"getSideAndAlignFromPlacement");var wd=yy,_d=wy,xd=xy,Ey=Object.defineProperty,Cy=(e,n)=>Ey(e,"name",{value:n,configurable:!0}),ky=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Py=h.forwardRef(Cy(function(n,t){return g.jsx(Me.span,{...n,ref:t,style:{...ky,...n.style}})},"VisuallyHidden")),Oy=Py,Ry=Object.defineProperty,qe=(e,n)=>Ry(e,"name",{value:n,configurable:!0}),[ra,LC]=nn("Tooltip",[os]),oa=os(),Ty="TooltipProvider",Iy=700,di="tooltip.open",[Ay,sa]=ra(Ty),Dy=qe(e=>{const{__scopeTooltip:n,delayDuration:t=Iy,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=h.useRef(!0),a=h.useRef(!1),c=h.useRef(0);return h.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),g.jsx(Ay,{scope:n,isOpenDelayedRef:i,delayDuration:t,onOpen:h.useCallback(()=>{r<=0||(window.clearTimeout(c.current),i.current=!1)},[r]),onClose:h.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r))},[r]),isPointerInTransitRef:a,onPointerInTransitChange:h.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:s})},"TooltipProvider"),fi="Tooltip",[Ny,so]=ra(fi),jy=qe(e=>{const{__scopeTooltip:n,children:t,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=sa(fi,e.__scopeTooltip),u=oa(n),[d,l]=h.useState(null),[f,p]=h.useState(void 0),m=wn(),v=h.useRef(0),y=i??c.disableHoverableContent,b=a??c.delayDuration,_=h.useRef(!1),[k,S]=oo({prop:r,defaultProp:o??!1,onChange:qe($=>{$?(c.onOpen(),document.dispatchEvent(new CustomEvent(di))):c.onClose(),s==null||s($)},"onChange"),caller:fi}),E=h.useMemo(()=>k?_.current?"delayed-open":"instant-open":"closed",[k]),O=h.useCallback(()=>{window.clearTimeout(v.current),v.current=0,_.current=!1,S(!0)},[S]),I=h.useCallback(()=>{window.clearTimeout(v.current),v.current=0,S(!1)},[S]),A=h.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{_.current=!0,S(!0),v.current=0},b)},[b,S]);h.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]);const R=f??m;return g.jsx(wd,{...u,children:g.jsx(Ny,{scope:n,contentId:R,setContentId:p,open:k,stateAttribute:E,trigger:d,onTriggerChange:l,onTriggerEnter:h.useCallback(()=>{c.isOpenDelayedRef.current?A():O()},[c.isOpenDelayedRef,A,O]),onTriggerLeave:h.useCallback(()=>{y?I():(window.clearTimeout(v.current),v.current=0)},[I,y]),onOpen:O,onClose:I,disableHoverableContent:y,children:t})})},"Tooltip"),_c="TooltipTrigger",My=h.forwardRef(qe(function(n,t){const{__scopeTooltip:r,...o}=n,s=so(_c,r),i=sa(_c,r),a=oa(r),c=h.useRef(null),u=Re(t,c,s.onTriggerChange),d=h.useRef(!1),l=h.useRef(!1),f=h.useCallback(()=>d.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),g.jsx(_d,{asChild:!0,...a,children:g.jsx(Me.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...o,ref:u,onPointerMove:oe(n.onPointerMove,p=>{p.pointerType!=="touch"&&!l.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),l.current=!0)}),onPointerLeave:oe(n.onPointerLeave,()=>{s.onTriggerLeave(),l.current=!1}),onPointerDown:oe(n.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:oe(n.onFocus,()=>{d.current||s.onOpen()}),onBlur:oe(n.onBlur,s.onClose),onClick:oe(n.onClick,s.onClose)})})},"TooltipTrigger")),Sd="TooltipPortal",[$y,zy]=ra(Sd,{forceMount:void 0}),Fy=qe(e=>{const{__scopeTooltip:n,forceMount:t,children:r,container:o}=e,s=so(Sd,n);return g.jsx($y,{scope:n,forceMount:t,children:g.jsx(rn,{present:t||s.open,children:g.jsx(Xi,{asChild:!0,container:o,children:r})})})},"TooltipPortal"),Kr="TooltipContent",Ly=h.forwardRef(qe(function(n,t){const r=zy(Kr,n.__scopeTooltip),{forceMount:o=r.forceMount,side:s="top",...i}=n,a=so(Kr,n.__scopeTooltip);return g.jsx(rn,{present:o||a.open,children:a.disableHoverableContent?g.jsx(Ed,{side:s,...i,ref:t}):g.jsx(Vy,{side:s,...i,ref:t})})},"TooltipContent")),Vy=h.forwardRef(qe(function(n,t){const r=so(Kr,n.__scopeTooltip),o=sa(Kr,n.__scopeTooltip),s=h.useRef(null),i=Re(t,s),[a,c]=h.useState(null),{trigger:u,onClose:d}=r,l=s.current,{onPointerInTransitChange:f}=o,p=h.useCallback(()=>{c(null),f(!1)},[f]),m=h.useCallback((v,y)=>{const b=v.currentTarget,_={x:v.clientX,y:v.clientY},k=Cd(_,b.getBoundingClientRect()),S=kd(_,k),E=Pd(y.getBoundingClientRect()),O=Rd([...S,...E]);c(O),f(!0)},[f]);return h.useEffect(()=>()=>p(),[p]),h.useEffect(()=>{if(u&&l){const v=qe(b=>m(b,l),"handleTriggerLeave"),y=qe(b=>m(b,u),"handleContentLeave");return u.addEventListener("pointerleave",v),l.addEventListener("pointerleave",y),()=>{u.removeEventListener("pointerleave",v),l.removeEventListener("pointerleave",y)}}},[u,l,m,p]),h.useEffect(()=>{if(a){const v=qe(y=>{const b=y.target,_={x:y.clientX,y:y.clientY},k=(u==null?void 0:u.contains(b))||(l==null?void 0:l.contains(b)),S=!Od(_,a);k?p():S&&(p(),d())},"handleTrackPointerGrace");return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,l,a,d,p]),g.jsx(Ed,{...n,ref:i})},"TooltipContentHoverable")),Uy=Hl("TooltipContent"),Ed=h.forwardRef(qe(function(n,t){const{__scopeTooltip:r,children:o,"aria-label":s,id:i,onEscapeKeyDown:a,onPointerDownOutside:c,...u}=n,d=so(Kr,r),l=oa(r),{onClose:f}=d;h.useEffect(()=>(document.addEventListener(di,f),()=>document.removeEventListener(di,f)),[f]),h.useEffect(()=>{if(d.trigger){const m=qe(v=>{v.target instanceof Node&&v.target.contains(d.trigger)&&f()},"handleScroll");return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,f]);const{setContentId:p}=d;return lt(()=>(p(i),()=>{p(void 0)}),[i,p]),g.jsx(Qi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:g.jsxs(xd,{"data-state":d.stateAttribute,role:s?void 0:"tooltip",id:s?void 0:d.contentId,...l,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(Uy,{children:o}),s?g.jsx(Oy,{id:d.contentId,role:"tooltip",children:s}):null]})})},"TooltipContentImpl"));function Cd(e,n){const t=Math.abs(n.top-e.y),r=Math.abs(n.bottom-e.y),o=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(t,r,o,s)){case s:return"left";case o:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}qe(Cd,"getExitSideFromRect");function kd(e,n,t=5){const r=[];switch(n){case"top":r.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":r.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":r.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":r.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return r}qe(kd,"getPaddedExitPoints");function Pd(e){const{top:n,right:t,bottom:r,left:o}=e;return[{x:o,y:n},{x:t,y:n},{x:t,y:r},{x:o,y:r}]}qe(Pd,"getPointsFromRect");function Od(e,n){const{x:t,y:r}=e;let o=!1;for(let s=0,i=n.length-1;s<n.length;i=s++){const a=n[s],c=n[i],u=a.x,d=a.y,l=c.x,f=c.y;d>r!=f>r&&t<(l-u)*(r-d)/(f-d)+u&&(o=!o)}return o}qe(Od,"isPointInPolygon");function Rd(e){const n=e.slice();return n.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Td(n)}qe(Rd,"getHull");function Td(e){if(e.length<=1)return e.slice();const n=[];for(let r=0;r<e.length;r++){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}n.pop();const t=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}return t.pop(),n.length===1&&t.length===1&&n[0].x===t[0].x&&n[0].y===t[0].y?n:n.concat(t)}qe(Td,"getHullPresorted");var Zy=Dy,By=jy,Ky=My,Wy=Fy,Id=Ly;const Hy=Zy,Gy=By,qy=Ky,Ad=h.forwardRef((e,n)=>{const t=J.c(11);let r,o,s;t[0]!==e?({className:r,sideOffset:s,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const i=s===void 0?4:s;let a;t[4]!==r?(a=te("z-[50] overflow-hidden rounded-lg bg-foreground/85 px-[7px] py-1.5 text-[11px] text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",r),t[4]=r,t[5]=a):a=t[5];let c;return t[6]!==o||t[7]!==n||t[8]!==i||t[9]!==a?(c=g.jsx(Wy,{children:g.jsx(Id,{ref:n,sideOffset:i,"data-slot":"tooltip-content",className:a,...o})}),t[6]=o,t[7]=n,t[8]=i,t[9]=a,t[10]=c):c=t[10],c});Ad.displayName=Id.displayName;const Qy="sidebar_state",Jy=3600*24*7,Yy="16rem",Xy="18rem",eb="3rem",tb="b",Dd=h.createContext(null);function is(){const e=h.useContext(Dd);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Nd=h.forwardRef((e,n)=>{const t=J.c(37);let r,o,s,i,a,c,u;t[0]!==e?({defaultOpen:u,open:s,onOpenChange:a,className:o,style:c,children:r,...i}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i,t[5]=a,t[6]=c,t[7]=u):(r=t[1],o=t[2],s=t[3],i=t[4],a=t[5],c=t[6],u=t[7]);const d=u===void 0?!0:u,l=Xm(),[f,p]=h.useState(!1),[m,v]=h.useState(d),y=s??m;let b;t[8]!==y||t[9]!==a?(b=Y=>{const W=typeof Y=="function"?Y(y):Y;a?a(W):v(W),document.cookie=`${Qy}=${W}; path=/; max-age=${Jy}`},t[8]=y,t[9]=a,t[10]=b):b=t[10];const _=b;let k;t[11]!==l||t[12]!==_?(k=()=>l?p(hb):_(pb),t[11]=l,t[12]=_,t[13]=k):k=t[13];const S=k;let E,O;t[14]!==S?(E=()=>{const Y=W=>{W.key===tb&&(W.metaKey||W.ctrlKey)&&(W.preventDefault(),S())};return window.addEventListener("keydown",Y),()=>window.removeEventListener("keydown",Y)},O=[S],t[14]=S,t[15]=E,t[16]=O):(E=t[15],O=t[16]),h.useEffect(E,O);const I=y?"expanded":"collapsed";let A;t[17]!==l||t[18]!==y||t[19]!==f||t[20]!==_||t[21]!==I||t[22]!==S?(A={state:I,open:y,setOpen:_,isMobile:l,openMobile:f,setOpenMobile:p,toggleSidebar:S},t[17]=l,t[18]=y,t[19]=f,t[20]=_,t[21]=I,t[22]=S,t[23]=A):A=t[23];const R=A;let $;t[24]!==c?($={"--sidebar-width":Yy,"--sidebar-width-icon":eb,...c},t[24]=c,t[25]=$):$=t[25];const F=$;let M;t[26]!==o?(M=te("group/sidebar-wrapper flex h-svh w-full has-[[data-variant=inset]]:bg-sidebar",o),t[26]=o,t[27]=M):M=t[27];let V;t[28]!==r||t[29]!==i||t[30]!==n||t[31]!==F||t[32]!==M?(V=g.jsx(Hy,{delayDuration:0,children:g.jsx("div",{style:F,className:M,ref:n,...i,children:r})}),t[28]=r,t[29]=i,t[30]=n,t[31]=F,t[32]=M,t[33]=V):V=t[33];let K;return t[34]!==R||t[35]!==V?(K=g.jsx(Dd.Provider,{value:R,children:V}),t[34]=R,t[35]=V,t[36]=K):K=t[36],K});Nd.displayName="SidebarProvider";const jd=h.forwardRef((e,n)=>{const t=J.c(48);let r,o,s,i,a,c;t[0]!==e?({side:i,variant:a,collapsible:c,className:o,children:r,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i,t[5]=a,t[6]=c):(r=t[1],o=t[2],s=t[3],i=t[4],a=t[5],c=t[6]);const u=i===void 0?"left":i,d=a===void 0?"sidebar":a,l=c===void 0?"offcanvas":c,{isMobile:f,state:p,openMobile:m,setOpenMobile:v}=is();if(l==="none"){let $;t[7]!==o?($=te("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),t[7]=o,t[8]=$):$=t[8];let F;return t[9]!==r||t[10]!==s||t[11]!==n||t[12]!==$?(F=g.jsx("div",{className:$,ref:n,...s,children:r}),t[9]=r,t[10]=s,t[11]=n,t[12]=$,t[13]=F):F=t[13],F}if(f){let $;t[14]===Symbol.for("react.memo_cache_sentinel")?($={"--sidebar-width":Xy},t[14]=$):$=t[14];let F;t[15]===Symbol.for("react.memo_cache_sentinel")?(F=g.jsxs(dd,{className:"sr-only",children:[g.jsx(fd,{children:"Sidebar"}),g.jsx(hd,{children:"Displays the mobile sidebar."})]}),t[15]=F):F=t[15];let M;t[16]!==r?(M=g.jsx("div",{className:"flex h-full w-full flex-col",children:r}),t[16]=r,t[17]=M):M=t[17];let V;t[18]!==u||t[19]!==M?(V=g.jsxs(ud,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:$,side:u,children:[F,M]}),t[18]=u,t[19]=M,t[20]=V):V=t[20];let K;return t[21]!==m||t[22]!==s||t[23]!==v||t[24]!==V?(K=g.jsx(dy,{open:m,onOpenChange:v,...s,children:V}),t[21]=m,t[22]=s,t[23]=v,t[24]=V,t[25]=K):K=t[25],K}const y=p==="collapsed"?l:"",b=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]";let _;t[26]!==b?(_=te("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",b),t[26]=b,t[27]=_):_=t[27];let k;t[28]!==_?(k=g.jsx("div",{className:_}),t[28]=_,t[29]=k):k=t[29];const S=u==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",E=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l";let O;t[30]!==o||t[31]!==S||t[32]!==E?(O=te("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",S,E,o),t[30]=o,t[31]=S,t[32]=E,t[33]=O):O=t[33];let I;t[34]!==r?(I=g.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:r}),t[34]=r,t[35]=I):I=t[35];let A;t[36]!==s||t[37]!==O||t[38]!==I?(A=g.jsx("div",{className:O,...s,children:I}),t[36]=s,t[37]=O,t[38]=I,t[39]=A):A=t[39];let R;return t[40]!==n||t[41]!==u||t[42]!==p||t[43]!==A||t[44]!==y||t[45]!==k||t[46]!==d?(R=g.jsxs("div",{ref:n,className:"group peer hidden text-sidebar-foreground md:block","data-state":p,"data-collapsible":y,"data-variant":d,"data-side":u,children:[k,A]}),t[40]=n,t[41]=u,t[42]=p,t[43]=A,t[44]=y,t[45]=k,t[46]=d,t[47]=R):R=t[47],R});jd.displayName="Sidebar";const Md=h.forwardRef((e,n)=>{const t=J.c(16);let r,o,s;t[0]!==e?({className:r,onClick:o,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const{toggleSidebar:i}=is();let a;t[4]!==r?(a=te("h-7 w-7",r),t[4]=r,t[5]=a):a=t[5];let c;t[6]!==o||t[7]!==i?(c=f=>{o==null||o(f),i()},t[6]=o,t[7]=i,t[8]=c):c=t[8];let u,d;t[9]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(Hm,{}),d=g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),t[9]=u,t[10]=d):(u=t[9],d=t[10]);let l;return t[11]!==s||t[12]!==n||t[13]!==a||t[14]!==c?(l=g.jsxs(es,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:a,onClick:c,...s,children:[u,d]}),t[11]=s,t[12]=n,t[13]=a,t[14]=c,t[15]=l):l=t[15],l});Md.displayName="SidebarTrigger";const nb=h.forwardRef((e,n)=>{const t=J.c(10);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);const{toggleSidebar:s}=is();let i;t[3]!==r?(i=te("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",r),t[3]=r,t[4]=i):i=t[4];let a;return t[5]!==o||t[6]!==n||t[7]!==i||t[8]!==s?(a=g.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:s,title:"Toggle Sidebar",className:i,...o}),t[5]=o,t[6]=n,t[7]=i,t[8]=s,t[9]=a):a=t[9],a});nb.displayName="SidebarRail";const $d=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("main",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});$d.displayName="SidebarInset";const rb=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(Uo,{ref:n,"data-sidebar":"input",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});rb.displayName="SidebarInput";const zd=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("flex flex-col gap-2 p-2",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,"data-sidebar":"header",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});zd.displayName="SidebarHeader";const Fd=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("flex flex-col gap-2 p-2",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,"data-sidebar":"footer",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Fd.displayName="SidebarFooter";const ob=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("mx-2 w-auto bg-sidebar-border",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(Zo,{ref:n,"data-sidebar":"separator",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});ob.displayName="SidebarSeparator";const Ld=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,"data-sidebar":"content",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Ld.displayName="SidebarContent";const No=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("relative flex w-full min-w-0 flex-col p-2",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,"data-sidebar":"group",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});No.displayName="SidebarGroup";const hi=h.forwardRef((e,n)=>{const t=J.c(11);let r,o,s;t[0]!==e?({className:r,asChild:s,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const a=(s===void 0?!1:s)?xr:"div";let c;t[4]!==r?(c=te("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",r),t[4]=r,t[5]=c):c=t[5];let u;return t[6]!==a||t[7]!==o||t[8]!==n||t[9]!==c?(u=g.jsx(a,{ref:n,"data-sidebar":"group-label",className:c,...o}),t[6]=a,t[7]=o,t[8]=n,t[9]=c,t[10]=u):u=t[10],u});hi.displayName="SidebarGroupLabel";const sb=h.forwardRef((e,n)=>{const t=J.c(11);let r,o,s;t[0]!==e?({className:r,asChild:s,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const a=(s===void 0?!1:s)?xr:"button";let c;t[4]!==r?(c=te("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",r),t[4]=r,t[5]=c):c=t[5];let u;return t[6]!==a||t[7]!==o||t[8]!==n||t[9]!==c?(u=g.jsx(a,{ref:n,"data-sidebar":"group-action",className:c,...o}),t[6]=a,t[7]=o,t[8]=n,t[9]=c,t[10]=u):u=t[10],u});sb.displayName="SidebarGroupAction";const jo=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("w-full text-sm",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,"data-sidebar":"group-content",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});jo.displayName="SidebarGroupContent";const Mo=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("flex w-full min-w-0 flex-col gap-1",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("ul",{ref:n,"data-sidebar":"menu",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Mo.displayName="SidebarMenu";const Bo=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("group/menu-item relative",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("li",{ref:n,"data-sidebar":"menu-item",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Bo.displayName="SidebarMenuItem";const ib=no("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Ko=h.forwardRef((e,n)=>{const t=J.c(29);let r,o,s,i,a,c,u;t[0]!==e?({asChild:s,isActive:i,variant:a,size:c,tooltip:u,className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i,t[5]=a,t[6]=c,t[7]=u):(r=t[1],o=t[2],s=t[3],i=t[4],a=t[5],c=t[6],u=t[7]);const d=s===void 0?!1:s,l=i===void 0?!1:i,f=a===void 0?"default":a,p=c===void 0?"default":c,m=d?xr:"button",{isMobile:v,state:y}=is();let b;t[8]!==r||t[9]!==p||t[10]!==f?(b=te(ib({variant:f,size:p}),r),t[8]=r,t[9]=p,t[10]=f,t[11]=b):b=t[11];let _;t[12]!==m||t[13]!==l||t[14]!==o||t[15]!==n||t[16]!==p||t[17]!==b?(_=g.jsx(m,{ref:n,"data-sidebar":"menu-button","data-size":p,"data-active":l,className:b,...o}),t[12]=m,t[13]=l,t[14]=o,t[15]=n,t[16]=p,t[17]=b,t[18]=_):_=t[18];const k=_;if(!u)return k;if(typeof u=="string"){let A;t[19]!==u?(A={children:u},t[19]=u,t[20]=A):A=t[20],u=A}let S;t[21]!==k?(S=g.jsx(qy,{asChild:!0,children:k}),t[21]=k,t[22]=S):S=t[22];const E=y!=="collapsed"||v;let O;t[23]!==E||t[24]!==u?(O=g.jsx(Ad,{side:"right",align:"center",hidden:E,...u}),t[23]=E,t[24]=u,t[25]=O):O=t[25];let I;return t[26]!==S||t[27]!==O?(I=g.jsxs(Gy,{children:[S,O]}),t[26]=S,t[27]=O,t[28]=I):I=t[28],I});Ko.displayName="SidebarMenuButton";const ab=h.forwardRef((e,n)=>{const t=J.c(13);let r,o,s,i;t[0]!==e?({className:r,asChild:s,showOnHover:i,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i):(r=t[1],o=t[2],s=t[3],i=t[4]);const a=s===void 0?!1:s,c=i===void 0?!1:i,u=a?xr:"button",d=c&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0";let l;t[5]!==r||t[6]!==d?(l=te("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",d,r),t[5]=r,t[6]=d,t[7]=l):l=t[7];let f;return t[8]!==u||t[9]!==o||t[10]!==n||t[11]!==l?(f=g.jsx(u,{ref:n,"data-sidebar":"menu-action",className:l,...o}),t[8]=u,t[9]=o,t[10]=n,t[11]=l,t[12]=f):f=t[12],f});ab.displayName="SidebarMenuAction";const cb=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});cb.displayName="SidebarMenuBadge";const lb=h.forwardRef((e,n)=>{const t=J.c(15);let r,o,s;t[0]!==e?({className:r,showIcon:s,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const i=s===void 0?!1:s,a=`${Math.floor(Math.random()*40)+50}%`;let c;t[4]!==r?(c=te("flex h-8 items-center gap-2 rounded-md px-2",r),t[4]=r,t[5]=c):c=t[5];let u;t[6]!==i?(u=i&&g.jsx(wc,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),t[6]=i,t[7]=u):u=t[7];let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d={"--skeleton-width":a},t[8]=d):d=t[8];let l;t[9]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsx(wc,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:d}),t[9]=l):l=t[9];let f;return t[10]!==o||t[11]!==n||t[12]!==c||t[13]!==u?(f=g.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:c,...o,children:[u,l]}),t[10]=o,t[11]=n,t[12]=c,t[13]=u,t[14]=f):f=t[14],f});lb.displayName="SidebarMenuSkeleton";const ub=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});ub.displayName="SidebarMenuSub";const db=h.forwardRef((e,n)=>{const t=J.c(5);let r;t[0]!==e?({...r}=e,t[0]=e,t[1]=r):r=t[1];let o;return t[2]!==r||t[3]!==n?(o=g.jsx("li",{ref:n,...r}),t[2]=r,t[3]=n,t[4]=o):o=t[4],o});db.displayName="SidebarMenuSubItem";const fb=h.forwardRef((e,n)=>{const t=J.c(17);let r,o,s,i,a;t[0]!==e?({asChild:i,size:a,isActive:o,className:r,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i,t[5]=a):(r=t[1],o=t[2],s=t[3],i=t[4],a=t[5]);const c=i===void 0?!1:i,u=a===void 0?"md":a,d=c?xr:"a",l=u==="sm"&&"text-xs",f=u==="md"&&"text-sm";let p;t[6]!==r||t[7]!==l||t[8]!==f?(p=te("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",l,f,"group-data-[collapsible=icon]:hidden",r),t[6]=r,t[7]=l,t[8]=f,t[9]=p):p=t[9];let m;return t[10]!==d||t[11]!==o||t[12]!==s||t[13]!==n||t[14]!==u||t[15]!==p?(m=g.jsx(d,{ref:n,"data-sidebar":"menu-sub-button","data-size":u,"data-active":o,className:p,...s}),t[10]=d,t[11]=o,t[12]=s,t[13]=n,t[14]=u,t[15]=p,t[16]=m):m=t[16],m});fb.displayName="SidebarMenuSubButton";function hb(e){return!e}function pb(e){return!e}var mb=Object.defineProperty,Ge=(e,n)=>mb(e,"name",{value:n,configurable:!0});function ia(e){const n=e+"CollectionProvider",[t,r]=nn(n),[o,s]=t(n,{collectionRef:{current:null},itemMap:new Map}),i=Ge(v=>{const{scope:y,children:b}=v,_=h.useRef(null),k=h.useRef(new Map).current;return g.jsx(o,{scope:y,itemMap:k,collectionRef:_,children:b})},"CollectionProvider");i.displayName=n;const a=e+"CollectionSlot",c=Yt(a),u=h.forwardRef((v,y)=>{const{scope:b,children:_}=v,k=s(a,b),S=Re(y,k.collectionRef);return g.jsx(c,{ref:S,children:_})});u.displayName=a;const d=e+"CollectionItemSlot",l="data-radix-collection-item",f=Yt(d),p=h.forwardRef((v,y)=>{const{scope:b,children:_,...k}=v,S=h.useRef(null),E=Re(y,S),O=s(d,b);return h.useEffect(()=>(O.itemMap.set(S,{ref:S,...k}),()=>void O.itemMap.delete(S))),g.jsx(f,{[l]:"",ref:E,children:_})});p.displayName=d;function m(v){const y=s(e+"CollectionConsumer",v);return h.useCallback(()=>{const _=y.collectionRef.current;if(!_)return[];const k=Array.from(_.querySelectorAll(`[${l}]`));return Array.from(y.itemMap.values()).sort((O,I)=>k.indexOf(O.ref.current)-k.indexOf(I.ref.current))},[y.collectionRef,y.itemMap])}return Ge(m,"useCollection"),[{Provider:i,Slot:u,ItemSlot:p},m,r]}Ge(ia,"createCollection");var xc=new WeakMap,ze,ht,Os=(ht=class extends Map{constructor(t){super(t);ee(this,ze);H(this,ze,[...super.keys()]),xc.set(this,!0)}set(t,r){return xc.get(this)&&(this.has(t)?x(this,ze)[x(this,ze).indexOf(t)]=t:x(this,ze).push(t)),super.set(t,r),this}insert(t,r,o){const s=this.has(r),i=x(this,ze).length,a=aa(t);let c=a>=0?a:i+a;const u=c<0||c>=i?-1:c;if(u===this.size||s&&u===this.size-1||u===-1)return this.set(r,o),this;const d=this.size+(s?0:1);a<0&&c++;const l=[...x(this,ze)];let f,p=!1;for(let m=c;m<d;m++)if(c===m){let v=l[m];l[m]===r&&(v=l[m+1]),s&&this.delete(r),f=this.get(v),this.set(r,o)}else{!p&&l[m-1]===r&&(p=!0);const v=l[p?m:m-1],y=f;f=this.get(v),this.delete(v),this.set(v,y)}return this}with(t,r,o){const s=new ht(this);return s.insert(t,r,o),s}before(t){const r=x(this,ze).indexOf(t)-1;if(!(r<0))return this.entryAt(r)}setBefore(t,r,o){const s=x(this,ze).indexOf(t);return s===-1?this:this.insert(s,r,o)}after(t){let r=x(this,ze).indexOf(t);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(t,r,o){const s=x(this,ze).indexOf(t);return s===-1?this:this.insert(s+1,r,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return H(this,ze,[]),super.clear()}delete(t){const r=super.delete(t);return r&&x(this,ze).splice(x(this,ze).indexOf(t),1),r}deleteAt(t){const r=this.keyAt(t);return r!==void 0?this.delete(r):!1}at(t){const r=$o(x(this,ze),t);if(r!==void 0)return this.get(r)}entryAt(t){const r=$o(x(this,ze),t);if(r!==void 0)return[r,this.get(r)]}indexOf(t){return x(this,ze).indexOf(t)}keyAt(t){return $o(x(this,ze),t)}from(t,r){const o=this.indexOf(t);if(o===-1)return;let s=o+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(t,r){const o=this.indexOf(t);if(o===-1)return;let s=o+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(t,r){let o=0;for(const s of this){if(Reflect.apply(t,r,[s,o,this]))return s;o++}}findIndex(t,r){let o=0;for(const s of this){if(Reflect.apply(t,r,[s,o,this]))return o;o++}return-1}filter(t,r){const o=[];let s=0;for(const i of this)Reflect.apply(t,r,[i,s,this])&&o.push(i),s++;return new ht(o)}map(t,r){const o=[];let s=0;for(const i of this)o.push([i[0],Reflect.apply(t,r,[i,s,this])]),s++;return new ht(o)}reduce(...t){const[r,o]=t;let s=0,i=o??this.at(0);for(const a of this)s===0&&t.length===1?i=a:i=Reflect.apply(r,this,[i,a,s,this]),s++;return i}reduceRight(...t){const[r,o]=t;let s=o??this.at(-1);for(let i=this.size-1;i>=0;i--){const a=this.at(i);i===this.size-1&&t.length===1?s=a:s=Reflect.apply(r,this,[s,a,i,this])}return s}toSorted(t){const r=[...this.entries()].sort(t);return new ht(r)}toReversed(){const t=new ht;for(let r=this.size-1;r>=0;r--){const o=this.keyAt(r),s=this.get(o);t.set(o,s)}return t}toSpliced(...t){const r=[...this.entries()];return r.splice(...t),new ht(r)}slice(t,r){const o=new ht;let s=this.size-1;if(t===void 0)return o;t<0&&(t=t+this.size),r!==void 0&&r>0&&(s=r-1);for(let i=t;i<=s;i++){const a=this.keyAt(i),c=this.get(a);o.set(a,c)}return o}every(t,r){let o=0;for(const s of this){if(!Reflect.apply(t,r,[s,o,this]))return!1;o++}return!0}some(t,r){let o=0;for(const s of this){if(Reflect.apply(t,r,[s,o,this]))return!0;o++}return!1}},ze=new WeakMap,Ge(ht,"OrderedDict"),ht);function $o(e,n){if("at"in Array.prototype)return Array.prototype.at.call(e,n);const t=Vd(e,n);return t===-1?void 0:e[t]}Ge($o,"at");function Vd(e,n){const t=e.length,r=aa(n),o=r>=0?r:t+r;return o<0||o>=t?-1:o}Ge(Vd,"toSafeIndex");function aa(e){return e!==e||e===0?0:Math.trunc(e)}Ge(aa,"toSafeInteger");function gb(e){const n=e+"CollectionProvider",[t,r]=nn(n),[o,s]=t(n,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Os,setItemMap:Ge(()=>{},"setItemMap")}),i=Ge(({state:k,...S})=>k?g.jsx(c,{...S,state:k}):g.jsx(a,{...S}),"CollectionProvider");i.displayName=n;const a=Ge(k=>{const S=y();return g.jsx(c,{...k,state:S})},"CollectionInit");a.displayName=n+"Init";const c=Ge(k=>{const{scope:S,children:E,state:O}=k,I=h.useRef(null),[A,R]=h.useState(null),$=Re(I,R),[F,M]=O;return h.useEffect(()=>{if(!A)return;const V=Bd(()=>{});return V.observe(A,{childList:!0,subtree:!0}),()=>{V.disconnect()}},[A]),g.jsx(o,{scope:S,itemMap:F,setItemMap:M,collectionRef:$,collectionRefObject:I,collectionElement:A,children:E})},"CollectionProviderImpl");c.displayName=n+"Impl";const u=e+"CollectionSlot",d=Yt(u),l=h.forwardRef((k,S)=>{const{scope:E,children:O}=k,I=s(u,E),A=Re(S,I.collectionRef);return g.jsx(d,{ref:A,children:O})});l.displayName=u;const f=e+"CollectionItemSlot",p="data-radix-collection-item",m=Yt(f),v=h.forwardRef((k,S)=>{const{scope:E,children:O,...I}=k,A=h.useRef(null),[R,$]=h.useState(null),F=Re(S,A,$),M=s(f,E),{setItemMap:V}=M,K=h.useRef(I);Ud(K.current,I)||(K.current=I);const Y=K.current;return h.useEffect(()=>{const W=Y;return V(Q=>R?Q.has(R)?Q.set(R,{...W,element:R}).toSorted(pi):(Q.set(R,{...W,element:R}),Q.toSorted(pi)):Q),()=>{V(Q=>!R||!Q.has(R)?Q:(Q.delete(R),new Os(Q)))}},[R,Y,V]),g.jsx(m,{[p]:"",ref:F,children:O})});v.displayName=f;function y(){return h.useState(new Os)}Ge(y,"useInitCollection");function b(k){const{itemMap:S}=s(e+"CollectionConsumer",k);return S}return Ge(b,"useCollection"),[{Provider:i,Slot:l,ItemSlot:v},{createCollectionScope:r,useCollection:b,useInitCollection:y}]}Ge(gb,"createCollection");function Ud(e,n){if(e===n)return!0;if(typeof e!="object"||typeof n!="object"||e==null||n==null)return!1;const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(const o of t)if(!Object.prototype.hasOwnProperty.call(n,o)||e[o]!==n[o])return!1;return!0}Ge(Ud,"shallowEqual");function Zd(e,n){return!!(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Ge(Zd,"isElementPreceding");function pi(e,n){return!e[1].element||!n[1].element?0:Zd(e[1].element,n[1].element)?-1:1}Ge(pi,"sortByDocumentPosition");function Bd(e){return new MutationObserver(t=>{for(const r of t)if(r.type==="childList"){e();return}})}Ge(Bd,"getChildListObserver");var vb=Object.defineProperty,yb=(e,n)=>vb(e,"name",{value:n,configurable:!0}),bb=h.createContext(void 0);function ca(e){const n=h.useContext(bb);return e||n||"ltr"}yb(ca,"useDirection");var wb=Object.defineProperty,la=(e,n)=>wb(e,"name",{value:n,configurable:!0}),Rs=!1;function Kd(){const[e,n]=h.useState(Rs);return h.useEffect(()=>{Rs||(Rs=!0,n(!0))},[]),e}la(Kd,"useIsHydrated");var Wd=_r[" useSyncExternalStore ".trim().toString()];function Hd(){return()=>{}}la(Hd,"subscribe");function Gd(){return Wd(Hd,()=>!0,()=>!1)}la(Gd,"useIsHydratedModern");var _b=typeof Wd=="function"?Gd:Kd,xb=Object.defineProperty,Ln=(e,n)=>xb(e,"name",{value:n,configurable:!0}),Ts="rovingFocusGroup.onEntryFocus",Sb={bubbles:!1,cancelable:!0},as="RovingFocusGroup",[mi,qd,Eb]=ia(as),[Cb,Qd]=nn(as,[Eb]),[kb,Pb]=Cb(as),Ob=h.forwardRef(Ln(function(n,t){return g.jsx(mi.Provider,{scope:n.__scopeRovingFocusGroup,children:g.jsx(mi.Slot,{scope:n.__scopeRovingFocusGroup,children:g.jsx(Rb,{...n,ref:t})})})},"RovingFocusGroup")),Rb=h.forwardRef(Ln(function(n,t){const{__scopeRovingFocusGroup:r,orientation:o,loop:s=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:l=!1,...f}=n,p=h.useRef(null),m=Re(t,p),v=ca(i),[y,b]=oo({prop:a,defaultProp:c??null,onChange:u,caller:as}),[_,k]=h.useState(!1),S=Xt(d),E=qd(r),O=h.useRef(!1),[I,A]=h.useState(0);return h.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(Ts,S),()=>R.removeEventListener(Ts,S)},[S]),g.jsx(kb,{scope:r,orientation:o,dir:v,loop:s,currentTabStopId:y,onItemFocus:h.useCallback(R=>b(R),[b]),onItemShiftTab:h.useCallback(()=>k(!0),[]),onFocusableItemAdd:h.useCallback(()=>A(R=>R+1),[]),onFocusableItemRemove:h.useCallback(()=>A(R=>R-1),[]),children:g.jsx(Me.div,{tabIndex:_||I===0?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...n.style},onMouseDown:oe(n.onMouseDown,()=>{O.current=!0}),onFocus:oe(n.onFocus,R=>{const $=!O.current;if(R.target===R.currentTarget&&$&&!_){const F=new CustomEvent(Ts,Sb);if(R.currentTarget.dispatchEvent(F),!F.defaultPrevented){const M=E().filter(Q=>Q.focusable),V=M.find(Q=>Q.active),K=M.find(Q=>Q.id===y),W=[V,K,...M].filter(Boolean).map(Q=>Q.ref.current);ua(W,l)}}O.current=!1}),onBlur:oe(n.onBlur,()=>k(!1))})})},"RovingFocusGroupImpl")),Tb="RovingFocusGroupItem",Ib=h.forwardRef(Ln(function(n,t){const{__scopeRovingFocusGroup:r,focusable:o=!0,active:s=!1,tabStopId:i,children:a,...c}=n,u=wn(),d=i||u,l=Pb(Tb,r),f=l.currentTabStopId===d,p=qd(r),{onFocusableItemAdd:m,onFocusableItemRemove:v,currentTabStopId:y}=l,b=_b();return lt(()=>{if(!(!b||!o))return m(),()=>v()},[b,o,m,v]),h.useEffect(()=>{if(!(b||!o))return m(),()=>v()},[b,o,m,v]),g.jsx(mi.ItemSlot,{scope:r,id:d,focusable:o,active:s,children:g.jsx(Me.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...c,ref:t,onMouseDown:oe(n.onMouseDown,_=>{o?l.onItemFocus(d):_.preventDefault()}),onFocus:oe(n.onFocus,()=>l.onItemFocus(d)),onKeyDown:oe(n.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){l.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const k=Yd(_,l.orientation,l.dir);if(k!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let E=p().filter(O=>O.focusable).map(O=>O.ref.current);if(k==="last")E.reverse();else if(k==="prev"||k==="next"){k==="prev"&&E.reverse();const O=E.indexOf(_.currentTarget);E=l.loop?Xd(E,O+1):E.slice(O+1)}setTimeout(()=>ua(E))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:y!=null}):a})})},"RovingFocusGroupItem")),Ab={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Jd(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Ln(Jd,"getDirectionAwareKey");function Yd(e,n,t){const r=Jd(e.key,t);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ab[r]}Ln(Yd,"getFocusIntent");function ua(e,n=!1){const t=document.activeElement;for(const r of e)if(r===t||(r.focus({preventScroll:n}),document.activeElement!==t))return}Ln(ua,"focusFirst");function Xd(e,n){return e.map((t,r)=>e[(n+r)%e.length])}Ln(Xd,"wrapArray");var Db=Ob,Nb=Ib,jb=Object.defineProperty,ge=(e,n)=>jb(e,"name",{value:n,configurable:!0}),gi=["Enter"," "],Mb=["ArrowDown","PageUp","Home"],ef=["ArrowUp","PageDown","End"],$b=[...Mb,...ef],zb={ltr:[...gi,"ArrowRight"],rtl:[...gi,"ArrowLeft"]},Fb={ltr:["ArrowLeft"],rtl:["ArrowRight"]},cs="Menu",[Wr,Lb,Vb]=ia(cs),[Vn,tf]=nn(cs,[Vb,os,Qd]),da=os(),nf=Qd(),[Ub,Un]=Vn(cs),[Zb,io]=Vn(cs),Bb=ge(e=>{const{__scopeMenu:n,open:t=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=da(n),[c,u]=h.useState(null),d=h.useRef(!1),l=Xt(s),f=ca(o);return h.useEffect(()=>{const p=ge(()=>{d.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},"handleKeyDown"),m=ge(()=>d.current=!1,"handlePointer");return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),h.useEffect(()=>{if(!t)return;const p=ge(()=>l(!1),"handleBlur");return window.addEventListener("blur",p),()=>window.removeEventListener("blur",p)},[t,l]),g.jsx(wd,{...a,children:g.jsx(Ub,{scope:n,open:t,onOpenChange:l,content:c,onContentChange:u,children:g.jsx(Zb,{scope:n,onClose:h.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:d,dir:f,modal:i,children:r})})})},"Menu"),rf=h.forwardRef(ge(function(n,t){const{__scopeMenu:r,...o}=n,s=da(r);return g.jsx(_d,{...s,...o,ref:t})},"MenuAnchor")),of="MenuPortal",[Kb,sf]=Vn(of,{forceMount:void 0}),Wb=ge(e=>{const{__scopeMenu:n,forceMount:t,children:r,container:o}=e,s=Un(of,n);return g.jsx(Kb,{scope:n,forceMount:t,children:g.jsx(rn,{present:t||s.open,children:g.jsx(Xi,{asChild:!0,container:o,children:r})})})},"MenuPortal"),Rt="MenuContent",[Hb,fa]=Vn(Rt),Gb=h.forwardRef(ge(function(n,t){const r=sf(Rt,n.__scopeMenu),{forceMount:o=r.forceMount,...s}=n,i=Un(Rt,n.__scopeMenu),a=io(Rt,n.__scopeMenu);return g.jsx(Wr.Provider,{scope:n.__scopeMenu,children:g.jsx(rn,{present:o||i.open,children:g.jsx(Wr.Slot,{scope:n.__scopeMenu,children:a.modal?g.jsx(qb,{...s,ref:t}):g.jsx(Qb,{...s,ref:t})})})})},"MenuContent")),qb=h.forwardRef(ge(function(n,t){const r=Un(Rt,n.__scopeMenu),o=h.useRef(null),s=Re(t,o);return h.useEffect(()=>{const i=o.current;if(i)return ed(i)},[]),g.jsx(ha,{...n,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:oe(n.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentModal")),Qb=h.forwardRef(ge(function(n,t){const r=Un(Rt,n.__scopeMenu);return g.jsx(ha,{...n,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentNonModal")),Jb=Yt("MenuContent.ScrollLock"),ha=h.forwardRef(ge(function(n,t){const{__scopeMenu:r,loop:o=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...y}=n,b=Un(Rt,r),_=io(Rt,r),k=da(r),S=nf(r),E=Lb(r),[O,I]=h.useState(null),A=h.useRef(null),R=Re(t,A,b.onContentChange),$=h.useRef(0),F=h.useRef(""),M=h.useRef(0),V=h.useRef(null),K=h.useRef("right"),Y=h.useRef(0),W=v?ta:h.Fragment,Q=v?{as:Jb,allowPinchZoom:!0}:void 0,he=ge(G=>{var Ie,de;const se=F.current+G,le=E().filter(xe=>!xe.disabled),Se=document.activeElement,X=(Ie=le.find(xe=>xe.ref.current===Se))==null?void 0:Ie.textValue,ce=le.map(xe=>xe.textValue),pe=hf(ce,se,X),_e=(de=le.find(xe=>xe.textValue===pe))==null?void 0:de.ref.current;ge((function xe(Ze){F.current=Ze,window.clearTimeout($.current),Ze!==""&&($.current=window.setTimeout(()=>xe(""),1e3))}),"updateSearch")(se),_e&&setTimeout(()=>_e.focus())},"handleTypeaheadSearch");h.useEffect(()=>()=>window.clearTimeout($.current),[]),ts();const ne=h.useCallback(G=>{var le,Se;return K.current===((le=V.current)==null?void 0:le.side)&&mf(G,(Se=V.current)==null?void 0:Se.area)},[]);return g.jsx(Hb,{scope:r,searchRef:F,onItemEnter:h.useCallback(G=>{ne(G)&&G.preventDefault()},[ne]),onItemLeave:h.useCallback(G=>{var se;ne(G)||((se=A.current)==null||se.focus(),I(null))},[ne]),onTriggerLeave:h.useCallback(G=>{ne(G)&&G.preventDefault()},[ne]),pointerGraceTimerRef:M,onPointerGraceIntentChange:h.useCallback(G=>{V.current=G},[]),children:g.jsx(W,{...Q,children:g.jsx(ju,{asChild:!0,trapped:s,onMountAutoFocus:oe(i,G=>{var se;G.preventDefault(),(se=A.current)==null||se.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:g.jsx(Qi,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:g.jsx(Db,{asChild:!0,...S,dir:_.dir,orientation:"vertical",loop:o,currentTabStopId:O,onCurrentTabStopIdChange:I,onEntryFocus:oe(u,G=>{_.isUsingKeyboardRef.current||G.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(xd,{role:"menu","aria-orientation":"vertical","data-state":ma(b.open),"data-radix-menu-content":"",dir:_.dir,...k,...y,ref:R,style:{outline:"none",...y.style},onKeyDown:oe(y.onKeyDown,G=>{const le=G.target.closest("[data-radix-menu-content]")===G.currentTarget,Se=G.ctrlKey||G.altKey||G.metaKey,X=G.key.length===1;le&&(G.key==="Tab"&&G.preventDefault(),!Se&&X&&he(G.key));const ce=A.current;if(G.target!==ce||!$b.includes(G.key))return;G.preventDefault();const _e=E().filter(Ie=>!Ie.disabled).map(Ie=>Ie.ref.current);ef.includes(G.key)&&_e.reverse(),df(_e)}),onBlur:oe(n.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout($.current),F.current="")}),onPointerMove:oe(n.onPointerMove,vr(G=>{const se=G.target,le=Y.current!==G.clientX;if(G.currentTarget.contains(se)&&le){const Se=G.clientX>Y.current?"right":"left";K.current=Se,Y.current=G.clientX}}))})})})})})})},"MenuContentImpl")),Yb=h.forwardRef(ge(function(n,t){const{__scopeMenu:r,...o}=n;return g.jsx(Me.div,{...o,ref:t})},"MenuLabel")),vi="MenuItem",Sc="menu.itemSelect",pa=h.forwardRef(ge(function(n,t){const{disabled:r=!1,onSelect:o,...s}=n,i=h.useRef(null),a=io(vi,n.__scopeMenu),c=fa(vi,n.__scopeMenu),u=Re(t,i),d=h.useRef(!1),l=ge(()=>{const f=i.current;if(!r&&f){const p=new CustomEvent(Sc,{bubbles:!0,cancelable:!0});f.addEventListener(Sc,m=>o==null?void 0:o(m),{once:!0}),qi(f,p),p.defaultPrevented?d.current=!1:a.onClose()}},"handleSelect");return g.jsx(af,{...s,ref:u,disabled:r,onClick:oe(n.onClick,l),onPointerDown:f=>{var p;(p=n.onPointerDown)==null||p.call(n,f),d.current=!0},onPointerUp:oe(n.onPointerUp,f=>{var p;d.current||(p=f.currentTarget)==null||p.click()}),onKeyDown:oe(n.onKeyDown,f=>{r||f.target!==f.currentTarget||c.searchRef.current!==""&&f.key===" "||gi.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})},"MenuItem")),af=h.forwardRef(ge(function(n,t){const{__scopeMenu:r,disabled:o=!1,textValue:s,...i}=n,a=fa(vi,r),c=nf(r),u=h.useRef(null),d=Re(t,u),[l,f]=h.useState(!1),[p,m]=h.useState("");return h.useEffect(()=>{const v=u.current;v&&m((v.textContent??"").trim())},[i.children]),g.jsx(Wr.ItemSlot,{scope:r,disabled:o,textValue:s??p,children:g.jsx(Nb,{asChild:!0,...c,focusable:!o,children:g.jsx(Me.div,{role:"menuitem","data-highlighted":l?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...i,ref:d,onPointerMove:oe(n.onPointerMove,vr(v=>{o?a.onItemLeave(v):(a.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:oe(n.onPointerLeave,vr(v=>a.onItemLeave(v))),onFocus:oe(n.onFocus,()=>f(!0)),onBlur:oe(n.onBlur,()=>f(!1))})})})},"MenuItemImpl")),Xb=h.forwardRef(ge(function(n,t){const{checked:r=!1,onCheckedChange:o,...s}=n;return g.jsx(lf,{scope:n.__scopeMenu,checked:r,children:g.jsx(pa,{role:"menuitemcheckbox","aria-checked":Hr(r)?"mixed":r,...s,ref:t,"data-state":ls(r),onSelect:oe(s.onSelect,()=>o==null?void 0:o(Hr(r)?!0:!r),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),ew="MenuRadioGroup",[VC,tw]=Vn(ew,{value:void 0,onValueChange:ge(()=>{},"onValueChange")}),nw="MenuRadioItem",rw=h.forwardRef(ge(function(n,t){const{value:r,...o}=n,s=tw(nw,n.__scopeMenu),i=r===s.value;return g.jsx(lf,{scope:n.__scopeMenu,checked:i,children:g.jsx(pa,{role:"menuitemradio","aria-checked":i,...o,ref:t,"data-state":ls(i),onSelect:oe(o.onSelect,()=>{var a;return(a=s.onValueChange)==null?void 0:a.call(s,r)},{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),cf="MenuItemIndicator",[lf,ow]=Vn(cf,{checked:!1}),sw=h.forwardRef(ge(function(n,t){const{__scopeMenu:r,forceMount:o,...s}=n,i=ow(cf,r);return g.jsx(rn,{present:o||Hr(i.checked)||i.checked===!0,children:g.jsx(Me.span,{...s,ref:t,"data-state":ls(i.checked)})})},"MenuItemIndicator")),iw=h.forwardRef(ge(function(n,t){const{__scopeMenu:r,...o}=n;return g.jsx(Me.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})},"MenuSeparator")),aw="MenuSub",[UC,uf]=Vn(aw),So="MenuSubTrigger",cw=h.forwardRef(ge(function(n,t){const r=Un(So,n.__scopeMenu),o=io(So,n.__scopeMenu),s=uf(So,n.__scopeMenu),i=fa(So,n.__scopeMenu),a=h.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=i,d={__scopeMenu:n.__scopeMenu},l=h.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);h.useEffect(()=>l,[l]),h.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),u(null)}},[c,u]);const f=Re(t,s.onTriggerChange);return g.jsx(rf,{asChild:!0,...d,children:g.jsx(af,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":r.open?s.contentId:void 0,"data-state":ma(r.open),...n,ref:f,onClick:p=>{var m;(m=n.onClick)==null||m.call(n,p),!(n.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:oe(n.onPointerMove,vr(p=>{i.onItemEnter(p),!p.defaultPrevented&&!n.disabled&&!r.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),l()},100))})),onPointerLeave:oe(n.onPointerLeave,vr(p=>{var v,y;l();const m=(v=r.content)==null?void 0:v.getBoundingClientRect();if(m){const b=(y=r.content)==null?void 0:y.dataset.side,_=b==="right",k=_?-5:5,S=m[_?"left":"right"],E=m[_?"right":"left"];i.onPointerGraceIntentChange({area:[{x:p.clientX+k,y:p.clientY},{x:S,y:m.top},{x:E,y:m.top},{x:E,y:m.bottom},{x:S,y:m.bottom}],side:b}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(p),p.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:oe(n.onKeyDown,p=>{var v;n.disabled||p.target!==p.currentTarget||i.searchRef.current!==""&&p.key===" "||zb[o.dir].includes(p.key)&&(r.onOpenChange(!0),(v=r.content)==null||v.focus(),p.preventDefault())})})})},"MenuSubTrigger")),lw="MenuSubContent",uw=h.forwardRef(ge(function(n,t){const r=sf(Rt,n.__scopeMenu),{forceMount:o=r.forceMount,align:s="start",...i}=n,a=Un(Rt,n.__scopeMenu),c=io(Rt,n.__scopeMenu),u=uf(lw,n.__scopeMenu),d=h.useRef(null),l=Re(t,d);return g.jsx(Wr.Provider,{scope:n.__scopeMenu,children:g.jsx(rn,{present:o||a.open,children:g.jsx(Wr.Slot,{scope:n.__scopeMenu,children:g.jsx(ha,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:l,align:s,side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;c.isUsingKeyboardRef.current&&((p=d.current)==null||p.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:oe(n.onFocusOutside,f=>{f.target!==u.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:oe(n.onEscapeKeyDown,f=>{c.onClose(),f.preventDefault()}),onKeyDown:oe(n.onKeyDown,f=>{var v;const p=f.currentTarget.contains(f.target),m=Fb[c.dir].includes(f.key);p&&m&&(a.onOpenChange(!1),(v=u.trigger)==null||v.focus(),f.preventDefault())})})})})})},"MenuSubContent"));function ma(e){return e?"open":"closed"}ge(ma,"getOpenState");function Hr(e){return e==="indeterminate"}ge(Hr,"isIndeterminate");function ls(e){return Hr(e)?"indeterminate":e?"checked":"unchecked"}ge(ls,"getCheckedState");function df(e){const n=document.activeElement;for(const t of e)if(t===n||(t.focus(),document.activeElement!==n))return}ge(df,"focusFirst");function ff(e,n){return e.map((t,r)=>e[(n+r)%e.length])}ge(ff,"wrapArray");function hf(e,n,t){const o=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,s=t?e.indexOf(t):-1;let i=ff(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==t));const c=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==t?c:void 0}ge(hf,"getNextMatch");function pf(e,n){const{x:t,y:r}=e;let o=!1;for(let s=0,i=n.length-1;s<n.length;i=s++){const a=n[s],c=n[i],u=a.x,d=a.y,l=c.x,f=c.y;d>r!=f>r&&t<(l-u)*(r-d)/(f-d)+u&&(o=!o)}return o}ge(pf,"isPointInPolygon");function mf(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return pf(t,n)}ge(mf,"isPointerInGraceArea");function vr(e){return n=>n.pointerType==="mouse"?e(n):void 0}ge(vr,"whenMouse");var dw=Bb,fw=rf,hw=Wb,pw=Gb,mw=Yb,gw=pa,vw=Xb,yw=rw,bw=sw,ww=iw,_w=cw,xw=uw,Sw=Object.defineProperty,_t=(e,n)=>Sw(e,"name",{value:n,configurable:!0}),ga="DropdownMenu",[Ew,ZC]=nn(ga,[tf]),xt=tf(),[Cw,gf]=Ew(ga),kw=_t(e=>{const{__scopeDropdownMenu:n,children:t,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=xt(n),u=h.useRef(null),[d,l]=oo({prop:o,defaultProp:s??!1,onChange:i,caller:ga});return g.jsx(Cw,{scope:n,triggerId:wn(),triggerRef:u,contentId:wn(),open:d,onOpenChange:l,onOpenToggle:h.useCallback(()=>l(f=>!f),[l]),modal:a,children:g.jsx(dw,{...c,open:d,onOpenChange:l,dir:r,modal:a,children:t})})},"DropdownMenu"),Pw="DropdownMenuTrigger",Ow=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,disabled:o=!1,...s}=n,i=gf(Pw,r),a=xt(r),c=Re(t,i.triggerRef);return g.jsx(fw,{asChild:!0,...a,children:g.jsx(Me.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...s,ref:c,onPointerDown:oe(n.onPointerDown,u=>{!o&&u.button===0&&u.ctrlKey===!1&&(i.onOpenToggle(),i.open||u.preventDefault())}),onKeyDown:oe(n.onKeyDown,u=>{o||(["Enter"," "].includes(u.key)&&i.onOpenToggle(),u.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})},"DropdownMenuTrigger")),Rw=_t(e=>{const{__scopeDropdownMenu:n,...t}=e,r=xt(n);return g.jsx(hw,{...r,...t})},"DropdownMenuPortal"),Tw="DropdownMenuContent",Iw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=gf(Tw,r),i=xt(r),a=h.useRef(!1);return g.jsx(pw,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...o,ref:t,onCloseAutoFocus:oe(n.onCloseAutoFocus,c=>{var u;a.current||(u=s.triggerRef.current)==null||u.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:oe(n.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,l=u.button===2||d;(!s.modal||l)&&(a.current=!0)}),style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),Aw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return g.jsx(mw,{...s,...o,ref:t})},"DropdownMenuLabel")),Dw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return g.jsx(gw,{...s,...o,ref:t})},"DropdownMenuItem")),Nw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return g.jsx(vw,{...s,...o,ref:t})},"DropdownMenuCheckboxItem")),jw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return g.jsx(yw,{...s,...o,ref:t})},"DropdownMenuRadioItem")),Mw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return g.jsx(bw,{...s,...o,ref:t})},"DropdownMenuItemIndicator")),$w=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return g.jsx(ww,{...s,...o,ref:t})},"DropdownMenuSeparator")),zw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return g.jsx(_w,{...s,...o,ref:t})},"DropdownMenuSubTrigger")),Fw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return g.jsx(xw,{...s,...o,ref:t,style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent")),Lw=kw,Vw=Ow,Uw=Rw,vf=Iw,yf=Aw,bf=Dw,wf=Nw,_f=jw,xf=Mw,Sf=$w,Ef=zw,Cf=Fw;const Zw=Lw,Bw=Vw,Kw=h.forwardRef((e,n)=>{const t=J.c(14);let r,o,s,i;t[0]!==e?({className:o,inset:s,children:r,...i}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i):(r=t[1],o=t[2],s=t[3],i=t[4]);const a=s&&"pl-8";let c;t[5]!==o||t[6]!==a?(c=te("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",a,o),t[5]=o,t[6]=a,t[7]=c):c=t[7];let u;t[8]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(Lm,{className:"ml-auto"}),t[8]=u):u=t[8];let d;return t[9]!==r||t[10]!==i||t[11]!==n||t[12]!==c?(d=g.jsxs(Ef,{ref:n,className:c,...i,children:[r,u]}),t[9]=r,t[10]=i,t[11]=n,t[12]=c,t[13]=d):d=t[13],d});Kw.displayName=Ef.displayName;const Ww=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(Cf,{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Ww.displayName=Cf.displayName;const kf=h.forwardRef((e,n)=>{const t=J.c(11);let r,o,s;t[0]!==e?({className:r,sideOffset:s,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const i=s===void 0?4:s;let a;t[4]!==r?(a=te("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",r),t[4]=r,t[5]=a):a=t[5];let c;return t[6]!==o||t[7]!==n||t[8]!==i||t[9]!==a?(c=g.jsx(Uw,{children:g.jsx(vf,{ref:n,sideOffset:i,className:a,...o})}),t[6]=o,t[7]=n,t[8]=i,t[9]=a,t[10]=c):c=t[10],c});kf.displayName=vf.displayName;const yi=h.forwardRef((e,n)=>{const t=J.c(11);let r,o,s;t[0]!==e?({className:r,inset:o,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const i=o&&"pl-8";let a;t[4]!==r||t[5]!==i?(a=te("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",i,r),t[4]=r,t[5]=i,t[6]=a):a=t[6];let c;return t[7]!==s||t[8]!==n||t[9]!==a?(c=g.jsx(bf,{ref:n,className:a,...s}),t[7]=s,t[8]=n,t[9]=a,t[10]=c):c=t[10],c});yi.displayName=bf.displayName;const Hw=h.forwardRef((e,n)=>{const t=J.c(14);let r,o,s,i;t[0]!==e?({className:s,children:o,checked:r,...i}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i):(r=t[1],o=t[2],s=t[3],i=t[4]);let a;t[5]!==s?(a=te("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),t[5]=s,t[6]=a):a=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(xf,{children:g.jsx(Fm,{className:"h-4 w-4"})})}),t[7]=c):c=t[7];let u;return t[8]!==r||t[9]!==o||t[10]!==i||t[11]!==n||t[12]!==a?(u=g.jsxs(wf,{ref:n,className:a,checked:r,...i,children:[c,o]}),t[8]=r,t[9]=o,t[10]=i,t[11]=n,t[12]=a,t[13]=u):u=t[13],u});Hw.displayName=wf.displayName;const Gw=h.forwardRef((e,n)=>{const t=J.c(12);let r,o,s;t[0]!==e?({className:o,children:r,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);let i;t[4]!==o?(i=te("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),t[4]=o,t[5]=i):i=t[5];let a;t[6]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(xf,{children:g.jsx(Vm,{className:"h-2 w-2 fill-current"})})}),t[6]=a):a=t[6];let c;return t[7]!==r||t[8]!==s||t[9]!==n||t[10]!==i?(c=g.jsxs(_f,{ref:n,className:i,...s,children:[a,r]}),t[7]=r,t[8]=s,t[9]=n,t[10]=i,t[11]=c):c=t[11],c});Gw.displayName=_f.displayName;const qw=h.forwardRef((e,n)=>{const t=J.c(11);let r,o,s;t[0]!==e?({className:r,inset:o,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const i=o&&"pl-8";let a;t[4]!==r||t[5]!==i?(a=te("px-2 py-1.5 text-sm font-semibold",i,r),t[4]=r,t[5]=i,t[6]=a):a=t[6];let c;return t[7]!==s||t[8]!==n||t[9]!==a?(c=g.jsx(yf,{ref:n,className:a,...s}),t[7]=s,t[8]=n,t[9]=a,t[10]=c):c=t[10],c});qw.displayName=yf.displayName;const Pf=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("-mx-1 my-1 h-px bg-muted",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(Sf,{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Pf.displayName=Sf.displayName;const bi="";async function Eo(e,n,t,r){const o=await fetch(`${bi}${n}`,{method:e,credentials:"include",headers:{"Content-Type":"application/json",...r},body:t!=null?JSON.stringify(t):void 0});if(o.status===204)return{data:null,status:204};const s=await o.json().catch(()=>null);return o.ok?{data:s,status:o.status}:{data:null,status:o.status,error:(s==null?void 0:s.error)??"Request failed"}}const Of={get:e=>Eo("GET",e),post:(e,n)=>Eo("POST",e,n),patch:(e,n)=>Eo("PATCH",e,n),delete:e=>Eo("DELETE",e),upload:async(e,n)=>{const t=await fetch(`${bi}${e}`,{method:"POST",credentials:"include",body:n});if(t.status===204)return{data:null,status:204};const r=await t.json().catch(()=>null);return t.ok?{data:r,status:t.status}:{data:null,status:t.status,error:(r==null?void 0:r.error)??"Upload failed"}},uploadPatch:async(e,n)=>{const t=await fetch(`${bi}${e}`,{method:"PATCH",credentials:"include",body:n});if(t.status===204)return{data:null,status:204};const r=await t.json().catch(()=>null);return t.ok?{data:r,status:t.status}:{data:null,status:t.status,error:(r==null?void 0:r.error)??"Upload failed"}}},va={authStatus:["auth","status"],me:["auth","me"],inviteToken:e=>["invitations","verify",e],resetToken:e=>["auth","reset-password",e],apps:["apps"],settings:["settings"],tokens:["tokens"],teamMembers:["team","members"],comments:e=>["comments",e],allRecordings:["recordings"],recordings:e=>["recordings",e],agents:["agents"],resourceHistory:(e,n)=>["agents",e,"resources",n]};async function Qw(){const e=await fetch("/api/v1/auth/status");if(!e.ok)throw new Error(`GET /api/v1/auth/status failed with ${e.status}`);return e.json()}async function Jw(){const{data:e,status:n}=await Of.get("/api/v1/auth/me");if(n===401)return null;if(!e)throw new Error(`GET /api/v1/auth/me failed with ${n}`);return e}async function BC(e){const n=await fetch(`/api/v1/invitations/verify?token=${e}`);if(!n.ok)throw new Error(`invitation refused with ${n.status}`);return n.json()}async function Cr(e){const n=await fetch(e,{credentials:"include"});if(!n.ok)throw new Error(`GET ${e} failed with ${n.status}`);return n.json()}const Yw=()=>Cr("/api/v1/settings"),KC=()=>Cr("/api/v1/tokens"),WC=()=>Cr("/api/v1/team/members"),HC=e=>Cr(`/api/v1/comments?build_id=${e}`),GC=e=>Cr(`/api/v1/recordings?buildId=${e}`),qC=()=>Cr("/api/v1/agents");async function QC(e,n,t){const r=await fetch(`/api/v1/agents/${encodeURIComponent(e)}/resources?range=${n}`,{credentials:"include",signal:t});if(!r.ok)throw new Error(`HTTP ${r.status}`);return r.json()}async function JC(e){const n=await fetch(`/api/v1/auth/reset-password/verify?token=${e}`);if(!n.ok)throw new Error(`reset token refused with ${n.status}`);return!0}async function YC(){const e=await fetch("/api/v1/apps",{credentials:"include"});if(!e.ok)throw new Error(`GET /api/v1/apps failed with ${e.status}`);return(await e.json()).items}async function XC({appId:e,search:n,statusFilter:t}){const r=new URLSearchParams({app_id:String(e),limit:"100",sort:"uploaded_at",dir:"desc"});n&&r.set("q",n),t&&t!=="all"&&r.set("status",t);const o=await fetch(`/api/v1/builds?${r}`,{credentials:"include"});if(!o.ok)throw new Error(`GET /api/v1/builds failed with ${o.status}`);return(await o.json()).items}async function e2(e){const n=await fetch("/api/v1/apps",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return n.status===409?{error:"App with this bundle ID and platform already exists"}:n.ok?n.json():null}class Xw extends Error{}async function ya(e){if(e.status!==403)return;const n=await e.json().catch(()=>null);throw new Xw((n==null?void 0:n.error)??"You do not have permission to do this")}async function t2(e,n){const t=await fetch(`/api/v1/builds/${e}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({status_label:n})});if(await ya(t),!t.ok)throw new Error(`PATCH /api/v1/builds/${e} failed with ${t.status}`)}async function n2(e){const n=await fetch(`/api/v1/builds/${e}/schedule-deletion`,{method:"POST",credentials:"include"});if(await ya(n),!n.ok)throw new Error(`Failed to schedule deletion (${n.status})`);return(await n.json()).delete_after}async function r2(e){const n=await fetch(`/api/v1/builds/${e}/schedule-deletion`,{method:"DELETE",credentials:"include"});if(await ya(n),!n.ok)throw new Error(`Failed to cancel scheduled deletion (${n.status})`)}async function o2(e){const n=await fetch(`/api/v1/builds/${e}`,{credentials:"include"});return n.ok?n.json():null}function s2(e){const n=new Map;for(const t of e){const r=t.version_name??"Unversioned";n.has(r)||n.set(r,[]),n.get(r).push(t)}return Array.from(n.entries()).map(([t,r])=>({versionName:t,builds:r}))}function Rf(){const e=J.c(4);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={queryKey:va.me,queryFn:Jw},e[0]=n):n=e[0];const t=Wi(n),r=t.data??null,o=t.data===void 0;let s;return e[1]!==r||e[2]!==o?(s={user:r,loading:o},e[1]=r,e[2]=o,e[3]=s):s=e[3],s}const e0={"/settings/team":["Admin"],"/settings/tokens":["Admin","Developer","QA"]};function Tf(e,n){const t=Object.entries(e0).find(([r])=>e.startsWith(r));return!t||n!==void 0&&t[1].includes(n)}const t0=6;function n0(e){let n=0;for(const t of e)n=n*31+t.charCodeAt(0)&4294967295;return Math.abs(n)}function r0(e){const n=n0(e)%t0+1;return{bg:`hsl(var(--avatar-${n}-bg))`,fg:`hsl(var(--avatar-${n}-fg))`}}function o0(e){const n=J.c(20),{name:t,avatarUrl:r,size:o}=e,s=o===void 0?28:o,i=(t==null?void 0:t[0])??"?";let a;n[0]!==i?(a=i.toUpperCase(),n[0]=i,n[1]=a):a=n[1];const c=a;let u;n[2]!==s?(u={width:s,height:s,borderRadius:"50%",flexShrink:0},n[2]=s,n[3]=u):u=n[3];const d=u;if(r){let b;n[4]!==d?(b={...d,objectFit:"cover"},n[4]=d,n[5]=b):b=n[5];let _;return n[6]!==r||n[7]!==t||n[8]!==b?(_=g.jsx("img",{src:r,alt:t,style:b}),n[6]=r,n[7]=t,n[8]=b,n[9]=_):_=n[9],_}let l;n[10]!==t?(l=r0(t),n[10]=t,n[11]=l):l=n[11];const{bg:f,fg:p}=l,m=s*.42;let v;n[12]!==f||n[13]!==p||n[14]!==d||n[15]!==m?(v={...d,background:f,display:"inline-flex",alignItems:"center",justifyContent:"center",color:p,fontSize:m,fontWeight:600,userSelect:"none"},n[12]=f,n[13]=p,n[14]=d,n[15]=m,n[16]=v):v=n[16];let y;return n[17]!==c||n[18]!==v?(y=g.jsx("span",{style:v,children:c}),n[17]=c,n[18]=v,n[19]=y):y=n[19],y}const s0=[{label:"App Center",href:"/app-center",icon:Zm},{label:"Mac Resources",href:"/mac-resources",icon:Km}],i0=[{label:"Default",href:"/settings/default",icon:du},{label:"Team",href:"/settings/team",icon:qm},{label:"Tokens",href:"/settings/tokens",icon:Um}],a0=[{label:"Docs",href:"https://www.tapflow.dev/get-started/teammates",icon:zm}];function c0(){const e=J.c(37),{pathname:n}=Il(),t=Al(),{user:r}=Rf(),{resolvedTheme:o}=Xo(),s=o==="dark"?"/logo-dark.svg":"/logo.svg";let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={queryKey:va.settings,queryFn:Yw},e[0]=i):i=e[0];const a=Wi(i).data,c=(a==null?void 0:a.logo_url)??null,u=(a==null?void 0:a.team_name)||"tapflow",d=Li();let l;e[1]!==t||e[2]!==d?(l=async function(){await fetch("/api/v1/auth/logout",{method:"POST",credentials:"include"}),d.clear(),t("/login",{replace:!0})},e[1]=t,e[2]=d,e[3]=l):l=e[3];const f=l,p=c??s;let m;e[4]!==p?(m=g.jsx("img",{src:p,alt:"tapflow",className:"w-6 h-6 min-w-6 shrink-0"}),e[4]=p,e[5]=m):m=e[5];let v;e[6]!==u?(v=g.jsx("span",{className:"text-base font-semibold tracking-tight truncate text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden",children:u}),e[6]=u,e[7]=v):v=e[7];let y;e[8]!==m||e[9]!==v?(y=g.jsx(zd,{className:"p-2",children:g.jsxs(po,{to:"/app-center",className:"flex items-center gap-2 p-1",children:[m,v]})}),e[8]=m,e[9]=v,e[10]=y):y=e[10];let b;e[11]!==n?(b=s0.map(F=>g.jsx(Bo,{children:g.jsx(Ko,{asChild:!0,isActive:n.startsWith(F.href),tooltip:F.label,children:g.jsxs(po,{to:F.href,children:[g.jsx(F.icon,{}),g.jsx("span",{children:F.label})]})})},F.href)),e[11]=n,e[12]=b):b=e[12];let _;e[13]!==b?(_=g.jsx(No,{children:g.jsx(jo,{children:g.jsx(Mo,{children:b})})}),e[13]=b,e[14]=_):_=e[14];let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k=g.jsx(hi,{children:"Settings"}),e[15]=k):k=e[15];let S;if(e[16]!==n||e[17]!==(r==null?void 0:r.role)){let F;e[19]!==(r==null?void 0:r.role)?(F=V=>Tf(V.href,r==null?void 0:r.role),e[19]=r==null?void 0:r.role,e[20]=F):F=e[20];let M;e[21]!==n?(M=V=>g.jsx(Bo,{children:g.jsx(Ko,{asChild:!0,isActive:n===V.href,tooltip:V.label,children:g.jsxs(po,{to:V.href,children:[g.jsx(V.icon,{}),g.jsx("span",{children:V.label})]})})},V.href),e[21]=n,e[22]=M):M=e[22],S=i0.filter(F).map(M),e[16]=n,e[17]=r==null?void 0:r.role,e[18]=S}else S=e[18];let E;e[23]!==S?(E=g.jsxs(No,{children:[k,g.jsx(jo,{children:g.jsx(Mo,{children:S})})]}),e[23]=S,e[24]=E):E=e[24];let O;e[25]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsx(hi,{children:"Reference"}),e[25]=O):O=e[25];let I;e[26]===Symbol.for("react.memo_cache_sentinel")?(I=g.jsxs(No,{children:[O,g.jsx(jo,{children:g.jsx(Mo,{children:a0.map(l0)})})]}),e[26]=I):I=e[26];let A;e[27]!==E||e[28]!==_?(A=g.jsxs(Ld,{children:[_,E,I]}),e[27]=E,e[28]=_,e[29]=A):A=e[29];let R;e[30]!==f||e[31]!==r?(R=r&&g.jsx(Fd,{className:"px-3 py-3",children:g.jsxs(Zw,{children:[g.jsx(Bw,{asChild:!0,children:g.jsxs("button",{className:"flex w-full items-center gap-2.5 rounded-md px-1 py-1 text-left hover:bg-sidebar-accent transition-colors group-data-[collapsible=icon]:justify-center",children:[g.jsx(o0,{name:r.displayName??"",avatarUrl:r.avatarUrl,size:28}),g.jsxs("div",{className:"flex flex-col min-w-0 flex-1 group-data-[collapsible=icon]:hidden",children:[g.jsx("span",{className:"text-sm font-medium truncate",children:r.displayName}),g.jsx("span",{className:"text-xs text-muted-foreground truncate",children:r.email})]})]})}),g.jsxs(kf,{side:"top",align:"start",className:"w-56",children:[g.jsx(yi,{asChild:!0,children:g.jsxs(po,{to:"/settings/default",children:[g.jsx(du,{className:"mr-2 h-4 w-4"}),"Settings"]})}),g.jsx(Pf,{}),g.jsxs(yi,{onClick:f,className:"text-destructive focus:text-destructive",children:[g.jsx(Bm,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})}),e[30]=f,e[31]=r,e[32]=R):R=e[32];let $;return e[33]!==A||e[34]!==R||e[35]!==y?($=g.jsxs(jd,{collapsible:"icon",children:[y,A,R]}),e[33]=A,e[34]=R,e[35]=y,e[36]=$):$=e[36],$}function l0(e){return g.jsx(Bo,{children:g.jsx(Ko,{asChild:!0,tooltip:e.label,children:g.jsxs("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",children:[g.jsx(e.icon,{}),g.jsx("span",{children:e.label})]})})},e.href)}function u0(){const e=J.c(7),{theme:n,setTheme:t}=Xo();let r;e[0]!==t||e[1]!==n?(r=()=>t(n==="dark"?"light":"dark"),e[0]=t,e[1]=n,e[2]=r):r=e[2];let o,s;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(Gm,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),s=g.jsx(Wm,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),e[3]=o,e[4]=s):(o=e[3],s=e[4]);let i;return e[5]!==r?(i=g.jsxs(es,{variant:"ghost",size:"icon",onClick:r,"aria-label":"Toggle theme",children:[o,s]}),e[5]=r,e[6]=i):i=e[6],i}const If=h.createContext({node:null,setNode:()=>{}});function d0(e){const n=J.c(5),{children:t}=e,[r,o]=h.useState(null);let s;n[0]!==r?(s={node:r,setNode:o},n[0]=r,n[1]=s):s=n[1];const i=s;let a;return n[2]!==t||n[3]!==i?(a=g.jsx(If.Provider,{value:i,children:t}),n[2]=t,n[3]=i,n[4]=a):a=n[4],a}function f0(){return h.useContext(If)}function h0(){const e=J.c(8),{node:n}=f0();let t,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=g.jsx(Md,{className:"-ml-1"}),r=g.jsx(Zo,{orientation:"vertical",className:"h-4"}),e[0]=t,e[1]=r):(t=e[0],r=e[1]);let o,s,i;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx("div",{className:"flex-1"}),s=g.jsx(u0,{}),i=g.jsx(Zo,{orientation:"vertical",className:"h-4"}),e[2]=o,e[3]=s,e[4]=i):(o=e[2],s=e[3],i=e[4]);let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx("a",{href:"https://github.com/jo-duchan/tapflow",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center w-8 h-8 rounded-md hover:bg-accent transition-colors","aria-label":"GitHub",children:g.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4 fill-current","aria-hidden":"true",children:g.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})}),e[5]=a):a=e[5];let c;return e[6]!==n?(c=g.jsxs("header",{className:"flex h-16 items-center gap-2 border-b px-4",children:[t,r,n,o,s,i,a]}),e[6]=n,e[7]=c):c=e[7],c}function p0(){const e=J.c(5),{user:n,loading:t}=Rf(),r=Il();if(t)return null;if(!n){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(zi,{to:"/login",replace:!0}),e[0]=a):a=e[0],a}if(!Tf(r.pathname,n.role)){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx("div",{className:"flex h-screen items-center justify-center",children:g.jsxs("div",{className:"text-center space-y-2",children:[g.jsx("p",{className:"text-lg font-semibold",children:"Access Denied"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Your role does not have access to this page."})]})}),e[1]=a):a=e[1],a}let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(c0,{}),e[2]=o):o=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=g.jsx(h0,{}),e[3]=s):s=e[3];let i;return e[4]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsx(d0,{children:g.jsxs(Nd,{children:[o,g.jsxs($d,{children:[s,g.jsx("main",{className:"flex-1 min-h-0 overflow-auto",children:g.jsx(h.Suspense,{fallback:g.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"Loading…"}),children:g.jsx(qh,{})})})]})]})}),e[4]=i):i=e[4],i}var ao=e=>e.type==="checkbox",us=e=>e.type==="file",bn=e=>e instanceof Date,Ke=e=>e==null;const ba=e=>typeof e=="object";var Oe=e=>!Ke(e)&&!Array.isArray(e)&&ba(e)&&!bn(e),wi=e=>Oe(e)&&e.target?ao(e.target)?e.target.checked:us(e.target)?e.target.files:e.target.value:e;const m0=/[.[\]'"]/;var zn=e=>e.split(m0).filter(Boolean);function g0(e,n){const t=zn(n);let r=e._formValues,o=e._defaultValues;for(let s=0;s<t.length-1;s++){const i=t[s];if(r=r==null?r:r[i],o=o==null?o:o[i],r===null||o===null)return null}}var Af=(e,n)=>n.split(".").some((t,r,o)=>!isNaN(Number(t))&&e.has(o.slice(0,r).join("."))),ds=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ce(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);const n=typeof Blob<"u"&&e instanceof Blob,t=typeof FileList<"u"&&e instanceof FileList;if(ds&&(n||t))return e;const r=Array.isArray(e);if(!r&&e.constructor!==Object)return e;const o=r?[]:Object.create(Object.getPrototypeOf(e));for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(o[s]=Ce(e[s]));return o}const dn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},wt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},kt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Df="root",wa=["__proto__","constructor","prototype"],v0=/^\w*$/;var yr=e=>v0.test(e),me=e=>e===void 0,U=(e,n,t)=>{if(!n||!Oe(e))return t;const r=yr(n)?[n]:zn(n);if(r.some(s=>wa.includes(s)))return t;const o=r.reduce((s,i)=>Ke(s)?void 0:s[i],e);return me(o)||o===e?me(e[n])?t:e[n]:o},pt=e=>typeof e=="boolean",et=e=>typeof e=="function",ve=(e,n,t)=>{let r=-1;const o=yr(n)?[n]:zn(n),s=o.length,i=s-1;for(;++r<s;){const a=o[r];let c=t;if(r!==i){const u=e[a];c=Oe(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}if(wa.includes(a))return;e[a]=c,e=e[a]}};const Nf=T.createContext(null);Nf.displayName="HookFormControlContext";const _a=()=>T.useContext(Nf);var jf=(e,n,t,r=!0)=>{const o={};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return n._proxyFormState[i]!==wt.all&&(n._proxyFormState[i]=!r||wt.all),t&&(t[i]=!0),e[i]}});return o};const xa=ds?T.useLayoutEffect:T.useEffect;var y0=e=>{const n=e.constructor&&e.constructor.prototype;return Oe(n)&&n.hasOwnProperty("isPrototypeOf")},_i=e=>Ke(e)||!ba(e);const Ec=(e,n)=>n.length===0&&!Array.isArray(e)&&!y0(e);function ct(e,n,t=new WeakMap){if(e===n)return!0;if(_i(e)||_i(n))return Object.is(e,n);if(bn(e)&&bn(n))return Object.is(e.getTime(),n.getTime());const r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;if(Ec(e,r)||Ec(n,o))return Object.is(e,n);if(!r.length&&Array.isArray(e)!==Array.isArray(n))return!1;const s=t.get(e);if(s&&s.has(n))return!0;if(s)s.add(n);else{const i=new WeakSet;i.add(n),t.set(e,i)}for(const i of r){const a=e[i];if(!(i in n))return!1;if(i!=="ref"){const c=n[i];if(bn(a)&&bn(c)||(Oe(a)||Array.isArray(a))&&(Oe(c)||Array.isArray(c))?!ct(a,c,t):!Object.is(a,c))return!1}}return!0}function Sa(e){const n=T.useRef(!1),t=T.useRef(!1),r=T.useRef(void 0),o=T.useRef(0);o.current++,!t.current&&e&&(t.current=!0,r.current=Ce(e()));const s=T.useCallback((a,c,u)=>{if(a&&(n.current||t.current&&o.current>1)){const d=c();ct(r.current,d)||u(d)}n.current=!0},[]),i=T.useCallback((a,c)=>{a&&(r.current=Ce(c()))},[]);return{resyncIfNeeded:s,snapshot:i}}function b0(e){const n=_a(),{control:t=n,disabled:r,name:o,exact:s}=e||{},i=()=>({...t._formState,defaultValues:t._defaultValues}),[a,c]=T.useState(i),u=T.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),{resyncIfNeeded:d,snapshot:l}=Sa(i);return xa(()=>{d(!r,i,c);const f=t._subscribe({name:o,formState:u.current,exact:s,callback:p=>{!r&&c({...t._formState,...p,defaultValues:t._defaultValues})}});return()=>{f(),l(!r,i)}},[t,o,r,s,d,l]),T.useEffect(()=>{u.current.isValid&&t._setValid(!0)},[t]),T.useMemo(()=>jf(a,t,u.current,!1),[a,t])}var He=e=>typeof e=="string",xi=(e,n,t,r,o)=>He(e)?(r&&n.watch.add(e),U(t,e,o)):Array.isArray(e)?e.map(s=>(r&&n.watch.add(s),U(t,s,U(o,s)))):(r&&(n.watchAll=!0),t);function w0(e){const n=_a(),{control:t=n,name:r,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},c=T.useRef(o),u=T.useRef(a),d=T.useRef(t),l=T.useRef(r);u.current=a;const f=()=>{const R=t._getWatch(r,c.current);return u.current?u.current(R):R},[p,m]=T.useState(f),v=T.useRef(p),y=T.useCallback(R=>{const $=xi(r,t._names,R||t._formValues,!1,c.current);return u.current?u.current($):$},[t._formValues,t._names,r]),b=T.useCallback(R=>{if(!s){const $=xi(r,t._names,R||t._formValues,!1,c.current);if(u.current){const F=u.current($);ct(F,v.current)||(m(F),v.current=F)}else m($)}},[t._formValues,t._names,s,r]),{resyncIfNeeded:_,snapshot:k}=Sa(f),S=T.useRef(b);S.current=b;const E=T.useRef(y);E.current=y,xa(()=>{d.current!==t||!ct(l.current,r)?(d.current=t,l.current=r,S.current()):_(!s,()=>E.current(),$=>{m($),v.current=$});const R=t._subscribe({name:r,formState:{values:!0},exact:i,callback:$=>{S.current($.values)}});return()=>{R(),k(!s,()=>E.current())}},[t,i,r,s,_,k]),T.useEffect(()=>t._removeUnmounted());const O=d.current!==t,I=l.current;return T.useMemo(()=>{if(s)return!1;const R=!O&&!ct(I,r);return O||R},[s,O,r,I])?y():p}function _0(e){const n=_a(),{name:t,disabled:r,control:o=n,shouldUnregister:s,defaultValue:i,exact:a=!0}=e,c=Af(o._names.array,t),u=T.useMemo(()=>{const S=U(o._formValues,t,U(o._defaultValues,t,i));return me(S)?g0(o,t):S},[o,t,i]),d=w0({control:o,name:t,defaultValue:u,exact:a}),l=b0({control:o,name:t,exact:a}),f=T.useRef(e),p=T.useRef(null),m=T.useRef(o.register(t,{...e.rules,value:d,...pt(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const v=T.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!U(l.errors,t)},isDirty:{enumerable:!0,get:()=>!!U(l.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!U(l.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!U(l.validatingFields,t)},error:{enumerable:!0,get:()=>U(l.errors,t)}}),[l,t]),y=T.useCallback(S=>{const E=wi(S);return U(o._fields,t)||(m.current=o.register(t,{...f.current.rules,value:E})),m.current.onChange({target:{value:wi(S),name:t},type:dn.CHANGE})},[t,o]),b=T.useCallback(()=>m.current.onBlur({target:{value:U(o._formValues,t),name:t},type:dn.BLUR}),[t,o._formValues]),_=T.useCallback(S=>{S&&(p.current={focus:()=>et(S.focus)&&S.focus(),select:()=>et(S.select)&&S.select(),setCustomValidity:O=>et(S.setCustomValidity)&&S.setCustomValidity(O),reportValidity:()=>et(S.reportValidity)&&S.reportValidity()});const E=U(o._fields,t);E&&E._f&&S&&(E._f.ref=p.current)},[o._fields,t]),k=T.useMemo(()=>({name:t,value:d,...pt(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:y,onBlur:b,ref:_}),[t,r,l.disabled,y,b,_,d]);return T.useEffect(()=>{const S=o._options.shouldUnregister||s;m.current=o.register(t,{...f.current.rules,...pt(f.current.disabled)?{disabled:f.current.disabled}:{}});const E=(O,I)=>{const A=U(o._fields,O);A&&A._f&&(A._f.mount=I)};if(E(t,!0),S){const O=Ce(U(s?o._defaultValues:o._options.values||o._defaultValues,t,U(o._options.defaultValues,t,f.current.defaultValue)));ve(o._defaultValues,t,O),me(U(o._formValues,t))&&ve(o._formValues,t,O)}if(!c&&o.register(t),p.current){const O=U(o._fields,t);O&&O._f&&(O._f.ref=p.current)}return()=>{(c?S&&!o._state.action:S)?o.unregister(t):E(t,!1)}},[t,o,c,s]),T.useEffect(()=>{o._setDisabledField({disabled:r,name:t})},[r,t,o]),T.useMemo(()=>({field:k,formState:l,fieldState:v}),[k,l,v])}const i2=e=>e.render(_0(e));var Co=e=>({isOnSubmit:!e||e===wt.onSubmit,isOnBlur:e===wt.onBlur,isOnChange:e===wt.onChange,isOnAll:e===wt.all,isOnTouch:e===wt.onTouched}),Is=(e,n,t)=>{if(t)return!1;if(n.watchAll||n.watch.has(e))return!0;for(const r of n.watch)if(e.startsWith(r)&&e.charAt(r.length)===".")return!0;return!1};const Fr=(e,n,t)=>{for(const r of t||Object.keys(e)){if(r==="_f")continue;const o=t?U(e,r):e[r];if(o){const{_f:s}=o;if(s){if(s.refs&&s.refs[0]&&n(s.refs[0],s.name))return!0;if(s.ref&&n(s.ref,s.name))return!0;if(Fr(o,n))return!0}else if((Oe(o)||Array.isArray(o))&&Fr(o,n))return!0}}};var Cc=(e,n,t)=>{const r=U(e,t),o=Array.isArray(r)?r:[];return ve(o,Df,n[t]),ve(e,t,o),e},$e=e=>Oe(e)&&!Object.keys(e).length,Wo=e=>{if(!ds)return!1;const n=e?e.ownerDocument:0;return e instanceof(n&&n.defaultView?n.defaultView.HTMLElement:HTMLElement)},Ea=e=>e.type==="radio",Ho=e=>e instanceof RegExp,Ca=(e,n,t,r,o)=>n?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[r]:o||!0}}:{};const kc={value:!1,isValid:!1},Pc={value:!0,isValid:!0};var Mf=e=>{if(!Array.isArray(e))return kc;if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}const n=e[0];return!n||!n.checked||n.disabled?kc:!n.attributes||!("value"in n.attributes)||me(n.value)||n.value===""?Pc:{value:n.value,isValid:!0}};const Oc={isValid:!1,value:null};var $f=e=>Array.isArray(e)?e.reduce((n,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:n,Oc):Oc;function Rc(e,n,t="validate"){if(He(e)||Array.isArray(e)&&e.every(He)||pt(e)&&!e)return{type:t,message:He(e)?e:"",ref:n}}var Xn=e=>Oe(e)&&!Ho(e)?e:{value:e,message:""},Tc=async(e,n,t,r,o,s)=>{const{ref:i,refs:a,required:c,maxLength:u,minLength:d,min:l,max:f,pattern:p,validate:m,name:v,valueAsNumber:y,mount:b}=e._f,_=U(t,v);if(!b||n.has(v))return{};const k=a?a[0]:i,S=V=>{if(o&&k.reportValidity){const K=pt(V)?"":V||"";a?a.forEach(Y=>Y.setCustomValidity(K)):k.setCustomValidity(K),k.reportValidity()}},E={},O=Ea(i),I=ao(i),A=O||I,R=(y||us(i))&&me(i.value)&&me(_)||Wo(i)&&i.value===""||_===""||Array.isArray(_)&&!_.length,$=Ca.bind(null,v,r,E),F=(V,K,Y,W=kt.maxLength,Q=kt.minLength)=>{const he=V?K:Y;E[v]={type:V?W:Q,message:he,ref:i,...$(V?W:Q,he)}};if(s?!Array.isArray(_)||!_.length:c&&(!A&&(R||Ke(_))||pt(_)&&!_||I&&!Mf(a).isValid||O&&!$f(a).isValid)){const{value:V,message:K}=He(c)?{value:!!c,message:c}:Xn(c);if(V&&(E[v]={type:kt.required,message:K,ref:k,...$(kt.required,K)},!r))return S(K),E}if(!R&&(!Ke(l)||!Ke(f))){let V,K;const Y=Xn(f),W=Xn(l);if(!Ke(_)&&!bn(_)&&!isNaN(_)){const Q=i.valueAsNumber||_&&+_;Ke(Y.value)||(V=Q>Y.value),Ke(W.value)||(K=Q<W.value)}else{const Q=i.valueAsDate||new Date(_),he=se=>new Date(new Date().toDateString()+" "+se),ne=i.type=="time",G=i.type=="week";He(Y.value)&&_&&(V=ne?he(_)>he(Y.value):G?_>Y.value:Q>new Date(Y.value)),He(W.value)&&_&&(K=ne?he(_)<he(W.value):G?_<W.value:Q<new Date(W.value))}if((V||K)&&(F(!!V,Y.message,W.message,kt.max,kt.min),!r))return S(E[v].message),E}if((u||d)&&!R&&(He(_)||s&&Array.isArray(_))){const V=Xn(u),K=Xn(d),Y=!Ke(V.value)&&_.length>+V.value,W=!Ke(K.value)&&_.length<+K.value;if((Y||W)&&(F(Y,V.message,K.message),!r))return S(E[v].message),E}if(p&&!R&&He(_)){const{value:V,message:K}=Xn(p);if(Ho(V)&&!_.match(V)&&(E[v]={type:kt.pattern,message:K,ref:i,...$(kt.pattern,K)},!r))return S(K),E}if(m){if(et(m)){const V=await m(_,t),K=Rc(V,k);if(K&&(E[v]={...K,...$(kt.validate,K.message)},!r))return S(K.message),E}else if(Oe(m)){let V={};for(const K in m){if(!$e(V)&&!r)break;const Y=Rc(await m[K](_,t),k,K);Y&&(V={...Y,...$(K,Y.message)},r||S(Y.message),r&&(E[v]=V))}if(!$e(V)&&(E[v]={ref:k,...V},!r))return E}}const M=E[v];return S(M?M.message:!0),E},zo=e=>Array.isArray(e)?e:[e],zf=e=>Array.isArray(e)?e.filter(Boolean):[];function x0(e,n){const t=n.length-1;let r=0;for(;r<t;){if(Ke(e)){e=void 0;break}e=e[n[r]],r++}return e}function S0(e){for(const n in e)if(e.hasOwnProperty(n)&&!me(e[n]))return!1;return!0}function je(e,n){if(He(n)&&Object.prototype.hasOwnProperty.call(e,n))return delete e[n],e;const t=Array.isArray(n)?n:yr(n)?[n]:zn(n);if(t.some(i=>wa.includes(String(i))))return e;const r=t.length===1?e:x0(e,t),o=t.length-1,s=t[o];return r&&delete r[s],o!==0&&(Oe(r)&&$e(r)||Array.isArray(r)&&S0(r))&&je(e,t.slice(0,-1)),e}const E0=T.createContext(null);E0.displayName="HookFormContext";var Ic=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function Ff(e,n){const t={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],s=n[r];if(o&&Oe(o)&&s){const i=Ff(o,s);Oe(i)&&(t[r]=i)}else e[r]&&(t[r]=s)}return t}const Ac=(e,n)=>e!==null&&ba(e)&&Object.prototype.hasOwnProperty.call(e,n);var C0=(e,n)=>{if(!n)return!1;let t=e;for(const r of yr(n)?[n]:zn(n)){if(!Ac(t,r))return Ac(e,n);t=t[r]}return!0},Lf=e=>e.type==="select-multiple",k0=e=>Ea(e)||ao(e),As=e=>Wo(e)&&e.isConnected;function Dc(e){return Array.isArray(e)||Oe(e)}function Vf(e,n,t="",r=[]){for(const o in e){const s=t?`${t}.${o}`:o,i=e[o];Dc(i)&&Dc(U(n,s))?Vf(i,n,s,r):r.push(s)}return r}var P0=e=>{for(const n in e)if(et(e[n]))return!0;return!1};function Uf(e){return Array.isArray(e)||Oe(e)&&!P0(e)}function Zf(e){return!!(e&&"_f"in e)}function Bf(e){return Array.isArray(e)?!e.some(n=>!me(n)):!Object.keys(e).length}function Si(e,n){Array.isArray(e)?e[n]=void 0:delete e[n]}function Ei(e,n={},t){for(const r in e){const o=e[r],s=t&&t[r];Uf(o)&&(!Array.isArray(o)||!Zf(s))?(n[r]=Array.isArray(o)?[]:{},Ei(o,n[r],s),Bf(n[r])&&Si(n,r)):me(o)||(n[r]=!0)}return n}function ln(e,n,t,r){t||(t=Ei(n,{},r));for(const o in e){const s=e[o],i=r&&r[o];Uf(s)&&(!Array.isArray(s)||!Zf(i))?(me(n)||_i(t[o])?t[o]=Ei(s,Array.isArray(s)?[]:{},i):ln(s,Ke(n)?{}:n[o],t[o],i),Bf(t[o])&&Si(t,o)):ct(s,n[o])?Si(t,o):t[o]=!0}return t}var O0=(e,n)=>{const t=n.split("."),r=[];let o=t[0];for(let s=1;s<t.length;o+="."+t[s++])!isNaN(+t[s])&&e.has(o)&&r.push(`${o}.${t[s]}`);return r},Ci=(e,{valueAsNumber:n,valueAsDate:t,setValueAs:r})=>me(e)?e:n?e===""?NaN:e&&+e:t&&He(e)?new Date(e):r?r(e):e;function Nc(e){const n=e.ref;return us(n)?n.files:Ea(n)?$f(e.refs).value:Lf(n)?[...n.selectedOptions].map(({value:t})=>t):ao(n)?Mf(e.refs).value:Ci(n.value,e)}var R0=(e,n,t,r)=>{const o={};for(const s of e){const i=U(n,s);i&&ve(o,s,i._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:r}},Nr=e=>me(e)?e:Ho(e)?e.source:Oe(e)?Ho(e.value)?e.value.source:e.value:e;const jc="AsyncFunction";var T0=e=>{if(!e||!e.validate)return!1;if(et(e.validate))return e.validate.constructor.name===jc;if(Oe(e.validate)){for(const n in e.validate)if(e.validate[n].constructor.name===jc)return!0}return!1},I0=e=>e.mount&&(e.required||!me(e.required)&&e.required!==!1||!me(e.min)||!me(e.max)||!me(e.maxLength)||!me(e.minLength)||e.pattern||e.validate);function Mc(e,n,t){const r=U(e,t);if(r!=null&&r.type||r!=null&&r.message||Array.isArray(r))return{error:r,name:t};const o=t.split(".");for(;o.length;){const s=o.join("."),i=U(n,s),a=U(e,s);if(i&&!Array.isArray(i)&&t!==s)return{name:t};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};o.pop()}return{name:t}}var A0=(e,n,t,r)=>{t(e);const o=Object.keys(e).filter(s=>s!=="name");return!o.length||r&&o.length>=Object.keys(n).length||o.find(s=>n[s]===(!r||wt.all))},D0=(e,n,t)=>!e||!n||e===n||zo(e).some(r=>r&&(t?r===n||r.startsWith(n+"."):r.startsWith(n)||n.startsWith(r))),N0=(e,n,t,r,o)=>o.isOnAll?!1:!t&&o.isOnTouch?!(n||e):(t?r.isOnBlur:o.isOnBlur)?!e:(t?r.isOnChange:o.isOnChange)?e:!0,j0=(e,n)=>{const t=U(e,n);!zf(t).length&&!(t!=null&&t.root)&&je(e,n)};const M0={mode:wt.onSubmit,reValidateMode:wt.onChange,shouldFocusError:!0},Ds="form",$0=(e,n)=>{for(const t in e)t in n||delete e[t];Object.assign(e,n)},Kf={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function z0(e={}){let n={...M0,...e},t={...Ce(Kf),isLoading:et(n.defaultValues),errors:n.errors||{},disabled:n.disabled||!1},r={},o=Oe(n.defaultValues)||Oe(n.values)?Ce(n.defaultValues||n.values)||{}:{},s=n.shouldUnregister?{}:Ce(o),i={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set};const c={},u={};let d=0,l=Co(n.mode),f=Co(n.reValidateMode);const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={...p};let v={...m};const y=(...w)=>w.some(C=>m[C]||v[C]),b={array:Ic(),state:Ic()};let _=0,k=0,S=n.criteriaMode===wt.all;const E=(w,C)=>P=>{clearTimeout(u[w]),u[w]=setTimeout(C,P)},O=w=>{clearTimeout(u[w]),delete u[w],delete c[w]},I=w=>{O(w);const C=`${w}.`;for(const P of Object.keys(c))P.startsWith(C)&&O(P)},A=async w=>{if(!i.keepIsValid&&!n.disabled&&(y("isValid")||w)){const C=++_;let P;n.resolver?(P=$e((await ne()).errors),C===_&&R()):P=await le({fields:r,onlyCheckValid:!0,eventType:dn.VALID}),C===_&&P!==t.isValid&&b.state.next({isValid:P})}},R=(w,C)=>{!n.disabled&&y("isValidating","validatingFields")&&((w||a.mount).forEach(P=>{P&&(C?ve(t.validatingFields,P,C):je(t.validatingFields,P))}),b.state.next({validatingFields:t.validatingFields,isValidating:!$e(t.validatingFields)}))},$=()=>{t.dirtyFields=ln(o,s,void 0,r)},F=(w,C=[],P,N,D=!0,B=!0)=>{if(N&&P&&!n.disabled){i.action=!0;const L=U(r,w);if(i.actionArrayLengths.has(w)||i.actionArrayLengths.set(w,Array.isArray(L)?L.length:0),B&&Array.isArray(L)){const z=P(L,N.argA,N.argB);D&&ve(r,w,z)}const Z=U(t.errors,w);if(B&&Array.isArray(Z)){const z=Z.root,ie=P(Z,N.argA,N.argB)||Z;z&&(ie.root=z),D&&ve(t.errors,w,ie),j0(t.errors,w)}const q=U(t.touchedFields,w);if(y("touchedFields")&&B&&Array.isArray(q)){const z=P(q,N.argA,N.argB);D&&ve(t.touchedFields,w,z)}y("dirtyFields")&&$(),b.state.next({name:w,isDirty:X(w,C),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else ve(s,w,C)},M=(w,C)=>{ve(t.errors,w,C),t.errors={...t.errors},b.state.next({errors:t.errors})},V=w=>{Object.keys(c).forEach(O),t.errors=w,b.state.next({errors:t.errors,isValid:!1})},K=w=>{const C=yr(w)?[w]:zn(w);let P=s,N=o;for(let D=0;D<C.length-1;D++){const B=C[D];if(P=Ke(P)?P:P[B],N=Ke(N)?N:N[B],P===null&&N!==null)return!0}return!1},Y=w=>{if(!i.actionArrayLengths.size)return!1;const C=yr(w)?[w]:zn(w);let P=s,N="",D=-1,B=0;for(let L=0;L<C.length;L++){if(Ke(P))return!1;const Z=C[L];if(N=N?`${N}.${Z}`:Z,Array.isArray(P)&&+Z>=P.length)return D===-1?!1:L===D?+Z<B:!0;if(i.actionArrayLengths.has(N)&&(D=L+1,B=i.actionArrayLengths.get(N)),P=P[Z],me(P)&&D!==-1&&L>D&&+C[D]<B)return!0}return!1},W=(w,C,P,N)=>{const D=U(r,w);if(D){if(K(w)||Y(w))return;const B=me(U(s,w)),L=U(s,w,me(P)?U(o,w):P);me(L)||N&&N.defaultChecked||C?ve(s,w,C?L:Nc(D._f)):_e(w,L),i.mount&&!i.action&&(A(),B&&t.isDirty&&y("isDirty")&&(X()||(t.isDirty=!1,b.state.next({...t}))),e.shouldUnregister&&B&&!me(U(s,w))&&Is(w,a)&&(i.watch=!0))}},Q=(w,C,P,N,D)=>{let B=!1,L=!1;const Z={name:w};if(!n.disabled||N===!0){if(!P||N){const q=ct(U(o,w),C);y("isDirty")&&(L=t.isDirty,t.isDirty=Z.isDirty=!q||X(),B=L!==Z.isDirty),L=!!U(t.dirtyFields,w),q!==t.isDirty?$0(t.dirtyFields,ln(o,s,void 0,r)):q?je(t.dirtyFields,w):ve(t.dirtyFields,w,!0),Z.dirtyFields=t.dirtyFields,B=B||y("dirtyFields")&&L!==!q}if(P){const q=U(t.touchedFields,w);q||(ve(t.touchedFields,w,P),Z.touchedFields=t.touchedFields,B=B||y("touchedFields")&&q!==P)}B&&D&&b.state.next(Z)}return B?Z:{}},he=(w,C,P,N)=>{const D=U(t.errors,w),B=y("isValid")&&pt(C)&&t.isValid!==C;if(n.delayError&&P?(c[w]=E(w,()=>M(w,P)),c[w](n.delayError)):(O(w),P?ve(t.errors,w,P):je(t.errors,w),t.errors={...t.errors}),(P?!ct(D,P):D)||!$e(N)||B){const L={...N,...B&&pt(C)?{isValid:C}:{},errors:t.errors,name:w};b.state.next(L)}},ne=async w=>(R(w,!0),await n.resolver(s,n.context,R0(w||a.mount,r,n.criteriaMode,n.shouldUseNativeValidation))),G=async w=>{const C=k,{errors:P}=await ne(w);if(C!==k)return P;if(R(w),w){for(const N of w){const D=U(P,N);O(N);const B=a.array.has(N)&&Oe(D)&&!Object.keys(D).some(q=>!Number.isNaN(Number(q))),L=U(r,N),Z=Oe(L)&&Object.keys(L).some(q=>q!=="_f");B?Cc(t.errors,{[N]:D},N):D!=null&&D.type||D!=null&&D.message||Array.isArray(D)||Oe(D)&&Z?ve(t.errors,N,D):je(t.errors,N)}t.errors={...t.errors}}else Object.keys(c).forEach(O),t.errors=P;return P},se=async({name:w,eventType:C})=>{if(e.validate){const P=await e.validate({formValues:s,formState:t,name:w,eventType:C});if(Oe(P))for(const N in P){const D=P[N];D&&Ye(`${Ds}.${N}`,{message:He(D.message)?D.message:"",type:D.type||kt.validate})}else He(P)||!P?Ye(Ds,{message:P||"",type:kt.validate}):Cn(Ds);return P}return!0},le=async({fields:w,onlyCheckValid:C,name:P,eventType:N,context:D={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(D.runRootValidation=!0,!await se({name:P,eventType:N})&&(D.valid=!1,C)))return D.valid;for(const B in w){const L=w[B];if(L){const{_f:Z,...q}=L;if(Z){const z=a.array.has(Z.name),ie=L._f&&T0(L._f),be=y("isValidating","validatingFields");ie&&be&&R([Z.name],!0);const Ee=await Tc(L,a.disabled,s,S,n.shouldUseNativeValidation&&!C,z);if(ie&&be&&R([Z.name]),Ee[Z.name]&&(D.valid=!1,C)||(C||(O(Z.name),U(Ee,Z.name)?z?Cc(t.errors,Ee,Z.name):ve(t.errors,Z.name,Ee[Z.name]):je(t.errors,Z.name)),e.shouldUseNativeValidation&&Ee[Z.name]))break}!$e(q)&&await le({context:D,onlyCheckValid:C,fields:q,name:B,eventType:N})}}return D.valid},Se=()=>{for(const w of a.unMount){const C=U(r,w);C&&(C._f.refs?C._f.refs.every(P=>!As(P)):!As(C._f.ref))&&Wn(w)}a.unMount=new Set},X=(w,C)=>(w&&C&&ve(s,w,C),!ct(i.mount?s:o,o)),ce=(w,C,P)=>xi(w,a,{...i.mount?s:me(C)||He(w)?o:C},P,C),pe=w=>zf(U(i.mount?s:o,w,n.shouldUnregister?U(o,w,[]):[])),_e=(w,C,P={},N=!1,D=!1,B=!1)=>{const L=U(r,w);let Z=C;if(L){const q=L._f;q&&(!q.disabled&&ve(s,w,Ci(C,q)),Z=Wo(q.ref)&&Ke(C)?"":C,Lf(q.ref)?[...q.ref.options].forEach(z=>z.selected=Z.includes(z.value)):q.refs?ao(q.ref)?q.refs.forEach(z=>{(!z.defaultChecked||!z.disabled)&&(Array.isArray(Z)?z.checked=!!Z.find(ie=>ie===z.value):z.checked=Z===z.value||!!Z)}):q.refs.forEach(z=>z.checked=z.value===Z):us(q.ref)?q.ref.value="":(q.ref.value=Z,!q.ref.type&&!D&&!B&&b.state.next({name:w,values:N?s:Ce(s)})))}(P.shouldDirty||P.shouldTouch)&&Q(w,L&&L._f&&!L._f.disabled&&(L._f.valueAsNumber||L._f.valueAsDate||L._f.setValueAs)?Ci(C,L._f):Z,P.shouldTouch,P.shouldDirty,!D),P.shouldValidate&&Dt(w,{delayError:P.delayError})},Ie=(w,C,P,N=!1,D=!1,B=!1)=>{a.array.has(w)&&b.array.next({name:w,values:N?s:Ce(s)});for(const L in C){if(!C.hasOwnProperty(L))continue;const Z=C[L],q=w+"."+L,z=U(r,q);(a.array.has(w)||Oe(Z)||z&&!z._f)&&!bn(Z)?Ie(q,Z,P,N,D,B):_e(q,Z,P,N,D,B)}},de=(w,C,P,N,D=!1)=>{const B=U(r,w),L=a.array.has(w),Z=N?C:Ce(C),q=U(s,w),z=ct(q,Z);if(z||ve(s,w,Z),L)b.array.next({name:w,values:N?s:Ce(s)}),y("isDirty","dirtyFields")&&P.shouldDirty&&($(),D||b.state.next({name:w,dirtyFields:t.dirtyFields,isDirty:X(w,Z)}));else{const ie=Array.isArray(Z)&&!Z.length||$e(Z),be=!z&&!D;!B||B._f||Ke(Z)||ie?_e(w,Z,P,N,D,be):Ie(w,Z,P,N,D,be)}if(!z&&!D){const ie=Is(w,a),be=N?s:Ce(s);if(b.state.next({...ie&&t,name:i.mount||ie?w:void 0,values:be}),!L)for(const Ee of O0(a.array,w))b.state.next({name:Ee,values:be})}},xe=(w,C,P={})=>de(w,C,P,!1),Ze=(w,C={})=>{const P=et(w)?w(s):w;if(!ct(s,P)){s={...s,...P};for(const N of a.mount)C0(P,N)&&de(N,U(P,N),C,!0,!0);b.state.next({...t,name:void 0,type:void 0,...d?{values:s}:{}}),C.shouldValidate&&A()}},st=async w=>{i.mount=!0;const C=w.target;let P=C.name,N=!0;const D=U(r,P),B=L=>{N=Number.isNaN(L)||bn(L)&&isNaN(L.getTime())||ct(L,U(s,P,L))};if(D){let L,Z;const q=C.type?Nc(D._f):wi(w),z=w.type===dn.BLUR||w.type===dn.FOCUS_OUT,ie=!I0(D._f)&&!e.validate&&!n.resolver&&!U(t.errors,P)&&!D._f.deps,be=ie||N0(z,U(t.touchedFields,P),t.isSubmitted,f,l),Ee=Is(P,a,z);if(ve(s,P,Ce(q)),z){if(!C||!C.readOnly){D._f.onBlur&&D._f.onBlur(w);const Be=c[P];Be&&Be(0)}}else D._f.onChange&&D._f.onChange(w);const Ct=Q(P,q,z),Ve=!$e(Ct)||Ee;if(!z&&b.state.next({name:P,type:w.type,...d?{values:Ce(s)}:{}}),be)return(!ie||!t.isValid)&&y("isValid")&&(n.mode==="onBlur"?z&&A():z||A()),Ve&&b.state.next({name:P,...Ee?{}:Ct});if(!n.resolver&&e.validate&&await se({name:P,eventType:w.type}),!z&&Ee&&b.state.next({...t}),n.resolver){const{errors:Be}=await ne([P]);if(R([P]),B(q),!N){!$e(Ct)&&b.state.next(Ct);return}const vt=Mc(t.errors,r,P),qn=Mc(Be,r,vt.name||P);L=qn.error,P=qn.name,Z=$e(Be)}else R([P],!0),L=(await Tc(D,a.disabled,s,S,n.shouldUseNativeValidation))[P],R([P]),B(q),N&&(L?Z=!1:y("isValid")&&(Z=await le({fields:r,onlyCheckValid:!0,name:P,eventType:w.type})));N&&(D._f.deps&&(!Array.isArray(D._f.deps)||D._f.deps.length>0)&&Dt(D._f.deps),he(P,Z,L,Ct))}},dt=(w,C)=>{if(U(t.errors,C)&&w.focus)return w.focus(),1},Dt=async(w,C={})=>{let P,N;const D=zo(w);if(n.resolver){const B=k,L=await G(me(w)?w:D);if(P=$e(L),N=w?!D.some(Z=>U(L,Z)):P,B!==k)return N}else w?(N=(await Promise.all(D.map(async B=>{const L=U(r,B);return await le({fields:L&&L._f?{[B]:L}:L,eventType:dn.TRIGGER})}))).every(Boolean),!(!N&&!t.isValid)&&A()):N=P=await le({fields:r,name:w,eventType:dn.TRIGGER});if(C.delayError&&n.delayError&&He(w)){const B=U(t.errors,w);B?(je(t.errors,w),c[w]=E(w,()=>M(w,B)),c[w](n.delayError)):O(w)}if(C.shouldTouch)for(const B of w?D:a.mount)!a.array.has(B)&&ve(t.touchedFields,B,!0);return b.state.next({...!He(w)||y("isValid")&&P!==t.isValid?{}:{name:w},...n.resolver||!w?{isValid:P}:{},...C.shouldTouch&&y("touchedFields")?{touchedFields:t.touchedFields}:{},errors:t.errors}),C.shouldFocus&&!N&&Fr(r,dt,w?D:a.mount),N},Bn=(w,C)=>{let P={...i.mount?s:o};return C&&(P=Ff(C.dirtyFields?t.dirtyFields:t.touchedFields,P)),me(w)?P:He(w)?U(P,w):w.map(N=>U(P,N))},on=w=>me(w)?{...t.errors}:He(w)?U(t.errors,w):w.map(C=>U(t.errors,C)),Et=(w,C)=>{const P=C||t,N=U(P.errors,w);return{invalid:!!N,isDirty:!!U(P.dirtyFields,w),error:N,isValidating:!!U(P.validatingFields,w),isTouched:!!U(P.touchedFields,w)}},Cn=w=>{const C=w?zo(w):void 0;C?C.forEach(P=>{I(P),je(t.errors,P),b.state.next({name:P,errors:t.errors})}):(Object.keys(c).forEach(O),t.errors={},b.state.next({errors:t.errors}))},Ye=(w,C,P)=>{O(w);const N=(U(r,w,{_f:{}})._f||{}).ref,D=U(t.errors,w)||{},{ref:B,message:L,type:Z,types:q,...z}=D;ve(t.errors,w,{...z,...C,ref:N}),b.state.next({name:w,errors:t.errors,isValid:!1}),P&&P.shouldFocus&&N&&N.focus&&N.focus()},Or=(w,C)=>{if(et(w)){d++;const{unsubscribe:P}=b.state.subscribe({next:D=>"values"in D&&w(D.values||ce(void 0,C),D)});let N=!1;return{unsubscribe:()=>{N||(N=!0,d--,P())}}}return ce(w,C,!0)},Kn=w=>{var C;const P=!!(!((C=w.formState)===null||C===void 0)&&C.values);P&&d++;const{unsubscribe:N}=b.state.subscribe({next:B=>{if(D0(w.name,B.name,w.exact)&&A0(B,w.formState||m,Kt,w.reRenderRoot)){const L={...s};w.callback({values:L,...t,...B,defaultValues:o})}}});if(!P)return N;let D=!1;return()=>{D||(D=!0,d--,N())}},Ne=w=>(i.mount=!0,v={...v,...w.formState},Kn({...w,formState:{...p,...w.formState}})),Wn=(w,C={})=>{for(const P of w?zo(w):a.mount)a.mount.delete(P),a.array.delete(P),a.disabled.delete(P),C.keepValue||(je(r,P),je(s,P)),C.keepError||(I(P),je(t.errors,P)),!C.keepDirty&&je(t.dirtyFields,P),!C.keepTouched&&je(t.touchedFields,P),!C.keepIsValidating&&je(t.validatingFields,P),!n.shouldUnregister&&!C.keepDefaultValue&&je(o,P);d&&b.state.next({values:Ce(s)}),b.state.next({...t,...C.keepDirty?{}:{isDirty:X()},...C.keepIsValidating?{}:{isValidating:!$e(t.validatingFields)}}),!C.keepIsValid&&A()},Zt=({disabled:w,name:C})=>{if(pt(w)&&i.mount||w||a.disabled.has(C)){const D=a.disabled.has(C)!==!!w;w?a.disabled.add(C):a.disabled.delete(C),D&&i.mount&&!i.action&&A()}},Rr=(w,C={})=>{let P=U(r,w);const N=pt(C.disabled)||pt(n.disabled),D=!a.registerName.has(w)&&P&&P._f&&!P._f.mount;return ve(r,w,{...P||{},_f:{...P&&P._f?P._f:{ref:{name:w}},name:w,mount:!0,...C}}),a.mount.add(w),P&&!D?Zt({disabled:pt(C.disabled)?C.disabled:n.disabled,name:w}):W(w,!0,C.value),{...N?{disabled:C.disabled||n.disabled}:{},...n.progressive?{required:!!C.required,min:Nr(C.min),max:Nr(C.max),minLength:Nr(C.minLength),maxLength:Nr(C.maxLength),pattern:Nr(C.pattern)}:{},name:w,onChange:st,onBlur:st,ref:B=>{if(B){a.registerName.add(w),Rr(w,C),a.registerName.delete(w),P=U(r,w);const L=me(B.value)&&B.querySelectorAll&&B.querySelectorAll("input,select,textarea")[0]||B,Z=k0(L),q=P._f.refs||[];if(Z?q.find(ie=>ie===L):L===P._f.ref)return;const z={...P._f};Z?(z.refs=[...q.filter(As),L,...Array.isArray(U(o,w))?[{}]:[]],z.ref={type:L.type,name:w}):(z.ref=L,delete z.refs),ve(r,w,{_f:z}),W(w,!1,void 0,L)}else P=U(r,w,{}),P._f&&(P._f.mount=!1),(n.shouldUnregister||C.shouldUnregister)&&!(Af(a.array,w)&&i.action)&&a.unMount.add(w)}}},Tr=()=>n.shouldFocusError&&!n.shouldUseNativeValidation&&Fr(r,dt,a.mount),Hn=w=>{pt(w)&&(b.state.next({disabled:w}),Fr(r,(C,P)=>{const N=U(r,P);N&&(C.disabled=N._f.disabled||w,Array.isArray(N._f.refs)&&N._f.refs.forEach(D=>{D.disabled=N._f.disabled||w}))},0))},lo=(w,C)=>async P=>{let N,D;P&&(P.preventDefault&&P.preventDefault(),P.persist&&P.persist());let B=Ce(s);if(b.state.next({isSubmitting:!0}),n.resolver){const L=k,{errors:Z,values:q}=await ne();if(L!==k)return;R(),Object.keys(c).forEach(O),t.errors=Z,B=Ce(q)}else await le({fields:r,eventType:dn.SUBMIT}),je(t.errors,Df);if(a.disabled.size)for(const L of a.disabled)je(B,L);if($e(t.errors)){b.state.next({errors:{}});try{N=await w(B,P)}catch(L){D=L}}else C&&await C({...t.errors},P),Tr(),setTimeout(Tr);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:$e(t.errors)&&!D,submitCount:t.submitCount+1,errors:t.errors}),D)throw D;return N},uo=(w,C={})=>{U(r,w)&&(je(t.validatingFields,w),me(C.defaultValue)?xe(w,Ce(U(o,w))):(xe(w,C.defaultValue),ve(o,w,Ce(C.defaultValue))),C.keepTouched||je(t.touchedFields,w),C.keepDirty||(je(t.dirtyFields,w),t.isDirty=C.defaultValue?X(w,Ce(U(o,w))):X()),C.keepError||(O(w),je(t.errors,w),A()),b.state.next({...t,isValidating:!$e(t.validatingFields)}))},Gn=(w,C={})=>{k++;const P=w?Ce(w):o,N=Ce(P),D=$e(w),B=N,L=r;if(Object.keys(c).forEach(O),C.keepDefaultValues||(o=P),!C.keepValues){if(C.keepDirtyValues){const Z=new Set([...a.mount,...Vf(ln(o,s,void 0,L),t.dirtyFields)]);for(const q of Z){const z=U(t.dirtyFields,q),ie=U(s,q),be=U(B,q);z&&!me(ie)?ve(B,q,ie):!z&&!me(be)&&xe(q,be)}}else{if(ds&&me(w))for(const Z of a.mount){const q=U(r,Z);if(q&&q._f){const z=Array.isArray(q._f.refs)?q._f.refs[0]:q._f.ref;if(Wo(z)){const ie=z.closest("form");if(ie){ie.reset();break}}}}if(C.keepFieldsRef)for(const Z of a.mount)xe(Z,U(B,Z));else r={}}if(n.shouldUnregister){if(s=C.keepDefaultValues?Ce(o):{},C.keepFieldsRef)for(const Z of a.mount)ve(s,Z,U(B,Z))}else s=Ce(B);b.array.next({values:{...B}}),b.state.next({name:void 0,type:void 0,values:{...B}})}a={mount:C.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!m.isValid||!!C.keepIsValid||!!C.keepDirtyValues||!n.shouldUnregister&&!$e(B),i.watch=!!n.shouldUnregister,i.keepIsValid=!!C.keepIsValid,i.action=!1,i.actionArrayLengths.clear(),C.keepErrors||(t.errors={}),b.state.next({submitCount:C.keepSubmitCount?t.submitCount:0,isDirty:D?!1:C.keepDirty?t.isDirty:C.keepValues?X():!!(C.keepDefaultValues&&!ct(w,o)),isSubmitted:C.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:D?{}:C.keepDirtyValues?C.keepDefaultValues&&s?ln(o,s,void 0,L):t.dirtyFields:C.keepDefaultValues&&w?ln(o,w,void 0,L):C.keepDirty?t.dirtyFields:C.keepValues?ln(o,s,void 0,L):{},touchedFields:C.keepTouched?t.touchedFields:{},...!C.keepIsValidating&&(t.isValidating||!$e(t.validatingFields))?{validatingFields:{},isValidating:!1}:null,errors:C.keepErrors?t.errors:{},isSubmitSuccessful:C.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Bt=(w,C)=>Gn(et(w)?w(s):w,{...n.resetOptions,...C}),fo=(w,C={})=>{const P=U(r,w),N=P&&P._f;if(N){const D=N.refs?N.refs[0]:N.ref;D.focus&&setTimeout(()=>{D.focus(),C.shouldSelect&&et(D.select)&&D.select()})}},Kt=w=>{const{name:C,type:P,values:N,...D}=w;t={...t,...D}};b.state.subscribe({next:Kt});const Ir={control:{register:Rr,unregister:Wn,getFieldState:Et,handleSubmit:lo,setError:Ye,_subscribe:Kn,_runSchema:ne,_updateIsValidating:R,_focusError:Tr,_getWatch:ce,_getDirty:X,_setValid:A,_setFieldArray:F,_setDisabledField:Zt,_setErrors:V,_getFieldArray:pe,_reset:Gn,_resetDefaultValues:()=>et(n.defaultValues)&&n.defaultValues().then(w=>{Bt(w,n.resetOptions),b.state.next({isLoading:!1})}),_removeUnmounted:Se,_disableForm:Hn,_subjects:b,_proxyFormState:m,get _fields(){return r},get _formValues(){return s},get _state(){return i},set _state(w){i=w},get _defaultValues(){return o},get _names(){return a},set _names(w){a=w},get _formState(){return t},get _options(){return n},set _options(w){n={...n,...w},l=Co(n.mode),f=Co(n.reValidateMode),S=n.criteriaMode===wt.all}},subscribe:Ne,trigger:Dt,register:Rr,handleSubmit:lo,watch:Or,setValue:xe,setValues:Ze,getValues:Bn,getErrors:on,reset:Bt,resetField:uo,resetDefaultValues:(w,C={})=>{if(o=Ce(w),!C.keepDirty){const P=ln(o,s,void 0,r);t.dirtyFields=P,t.isDirty=!$e(P)}C.keepIsValid||A(),b.state.next({...t,defaultValues:o})},clearErrors:Cn,unregister:Wn,setError:Ye,setFocus:fo,getFieldState:Et};return{...Ir,formControl:Ir}}function F0(e={}){const n=T.useRef(void 0),t=T.useRef(void 0),r=T.useRef(e.formControl),[o,s]=T.useState(()=>({...Ce(Kf),isLoading:et(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:et(e.defaultValues)?void 0:e.defaultValues}));if(!n.current||e.formControl&&r.current!==e.formControl)if(r.current=e.formControl,e.formControl)n.current={...e.formControl,formState:o},e.defaultValues&&!et(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:d,...l}=z0(e);n.current={...l,formState:o}}const i=n.current.control;i._options=e;const a=()=>({...i._formState,defaultValues:i._defaultValues}),{resyncIfNeeded:c,snapshot:u}=Sa(a);return xa(()=>{c(!0,a,s);const d=i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState,defaultValues:i._defaultValues}),reRenderRoot:!0});return s(l=>({...l,isReady:!0})),i._formState.isReady=!0,()=>{d(),u(!0,a)}},[i,c,u]),T.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),T.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),T.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),T.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),T.useEffect(()=>{if(i._proxyFormState.isDirty){const d=i._getDirty();d!==o.isDirty&&i._subjects.state.next({isDirty:d})}},[i,o.isDirty]),T.useEffect(()=>{var d;e.values&&!ct(e.values,t.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((d=i._options.resetOptions)===null||d===void 0)&&d.keepIsValid||i._setValid(),t.current=e.values,s(l=>({...l}))):i._resetDefaultValues()},[i,e.values]),T.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),n.current.formState=T.useMemo(()=>jf(o,i),[i,o]),n.current}const $c=(e,n,t)=>{if(e&&"reportValidity"in e){const r=U(t,n);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},ki=(e,n)=>{for(const t in n.fields){const r=n.fields[t];r&&r.ref&&"reportValidity"in r.ref?$c(r.ref,t,e):r&&r.refs&&r.refs.forEach(o=>$c(o,t,e))}},zc=(e,n)=>{n.shouldUseNativeValidation&&ki(e,n);const t={};for(const r in e){const o=U(n.fields,r),s=Object.assign(e[r]||{},{ref:o&&o.refs?o.refs[0]:o&&o.ref});if(L0(n.names||Object.keys(e),r)){const i=Object.assign({},U(t,r));ve(i,"root",s),ve(t,r,i)}else ve(t,r,s)}return t},L0=(e,n)=>{const t=Fc(n).replace(/[.*+?^${}()|\\]/g,"\\$&");return e.some(r=>Fc(r).match(`^${t}\\.\\d+`))};function Fc(e){return e.replace(/\[(\d+)]/g,".$1").replace(/[[\]]/g,"")}function Pi(){return Pi=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Pi.apply(null,arguments)}function Lc(e,n){try{var t=e()}catch(r){return n(r)}return t&&t.then?t.then(void 0,n):t}function V0(e,n){for(var t=Object.create(null);e.length;){var r=e[0],o=r.code,s=r.message,i=r.path.join(".");if(!t[i])if("unionErrors"in r){var a,c,u=r.unionErrors.reduce(function(f,p){return p.errors.length<f.errors.length?p:f}).errors[0];t[i]={message:(a=u==null?void 0:u.message)!=null?a:s,type:(c=u==null?void 0:u.code)!=null?c:o}}else t[i]={message:s,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(f){return f.errors.forEach(function(p){return e.push(p)})}),n){var d=t[i].types,l=d&&d[r.code];t[i]=Ca(i,n,t,o,l?[].concat(l,r.message):r.message)}e.shift()}return t}function U0(e,n){for(var t=Object.create(null),r=function(){var o=e[0],s=o.code,i=o.message,a=o.path.join(".");if(!t[a])if(o.code==="invalid_union"&&o.errors.length>0){var c,u,d=o.errors.reduce(function(p,m){return m.length<p.length?m:p})[0];t[a]={message:(c=d==null?void 0:d.message)!=null?c:i,type:(u=d==null?void 0:d.code)!=null?u:s}}else t[a]={message:i,type:s};if(o.code==="invalid_union"&&o.errors.forEach(function(p){return p.forEach(function(m){return e.push(Pi({},m,{path:[].concat(o.path,m.path)}))})}),n){var l=t[a].types,f=l&&l[o.code];t[a]=Ca(a,n,t,s,f?[].concat(f,o.message):o.message)}e.shift()};e.length;)r();return t}function Z0(e,n,t){if(t===void 0&&(t={}),(function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,s){try{return Promise.resolve(Lc(function(){function i(c){return s.shouldUseNativeValidation&&ki({},s),{errors:{},values:t.raw?Object.assign({},r):c}}var a=e;return t.mode==="sync"?i(a.parse(r,n)):Promise.resolve(a.parseAsync(r,n)).then(i)},function(i){if((function(a){var c;return!(a==null||(c=a._zod)==null||(c=c.traits)==null||!c.has("$ZodError"))})(i))return{values:{},errors:zc(U0(i.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};if((function(r){return"_def"in r&&typeof r._def=="object"})(e))return function(r,o,s){try{return Promise.resolve(Lc(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](r,n)).then(function(i){return s.shouldUseNativeValidation&&ki({},s),{errors:{},values:t.raw?Object.assign({},r):i}})},function(i){if((function(a){return Array.isArray(a==null?void 0:a.issues)})(i))return{values:{},errors:zc(V0(i.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}function Oi(e){const n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>n.indexOf(+r)===-1).map(([r,o])=>o)}function Vc(e,n="|"){return e.map(t=>Jf(t)).join(n)}function Ri(e,n){return typeof n=="bigint"?n.toString():n}class B0{constructor(n){this._getter=n,this._value=void 0}get value(){const n=this._getter;return n!==void 0&&(this._value=n(),this._getter=void 0),this._value}}function ka(e){return new B0(e)}function K0(e){return e==null}function Pa(e){const n=e.startsWith("^")?1:0,t=e.endsWith("$")?e.length-1:e.length;return e.slice(n,t)}function Zn(e,n,t){Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})}function Wf(e){const n=Object.getOwnPropertyDescriptor(e,"shape");return n!=null&&n.get?n.get.raw:n==null?void 0:n.value}function tn(e){return Wf(e._zod.def)??e._zod.def.shape}function Hf(e,n,t){Object.defineProperty(e,n,{get(){const r=t();return Zn(this,n,r),r},enumerable:!0,configurable:!0})}function Gf(e,n,t){n in e?Zn(e,n,t):e[n]=t}function Fn(e,n,t,r){const o=tn(n);for(const s of t){const i=Object.getOwnPropertyDescriptor(o,s);i.enumerable&&(i.get?Hf(e,s,()=>{const a=n._zod.def.shape[s];return r?r(a,s):a}):Gf(e,s,r?r(i.value,s):i.value))}}function W0(e,n){for(const t of Reflect.ownKeys(n)){const r=Object.getOwnPropertyDescriptor(n,t);r.enumerable&&(r.get?Hf(e,t,()=>n[t]):Gf(e,t,r.value))}}function mt(...e){const n={};for(const t of e){const r=Object.getOwnPropertyDescriptors(t);Object.assign(n,r)}return Object.defineProperties({},n)}function H0(e){return JSON.stringify(e)}function G0(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const qf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Go(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const q0=ka(()=>{var e;if(Vt.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const n=Function;return new n(""),!0}catch{return!1}});function Gr(e){if(Go(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const t=n.prototype;return!(Go(t)===!1||Object.prototype.hasOwnProperty.call(t,"isPrototypeOf")===!1)}function Qf(e){return Gr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Q0=new Set(["string","number","symbol"]);function fs(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Sn(e,n,t){const r=new e._zod.constr(n??e._zod.def);return(!n||t!=null&&t.parent)&&(r._zod.parent=e),r}function re(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if((n==null?void 0:n.message)!==void 0){if((n==null?void 0:n.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function Jf(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function J0(e){return Object.keys(e).filter(n=>e[n]._zod.optin!==void 0&&e[n]._zod.optout==="optional")}const Y0={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},X0={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function e_(e,n){const t=e._zod.def,r=t.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s={};return Fn(s,e,hs(e,n)),Sn(e,mt(t,{shape:s,checks:[]}))}function hs(e,n){var o;const t=tn(e),r=[];for(const s of Reflect.ownKeys(n)){if(!((o=Object.getOwnPropertyDescriptor(t,s))!=null&&o.enumerable))throw new Error(`Unrecognized key: "${String(s)}"`);n[s]&&r.push(s)}return r}function t_(e,n){const t=e._zod.def,r=t.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=new Set(hs(e,n)),i={};return Fn(i,e,Reflect.ownKeys(tn(e)).filter(a=>!s.has(a))),Sn(e,mt(t,{shape:i,checks:[]}))}function n_(e,n){if(!Gr(n))throw new Error("Invalid input to extend: expected a plain object");const t=e._zod.def.checks;if(t&&t.length>0){const o=tn(e);for(const s of Reflect.ownKeys(n))if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Sn(e,mt(e._zod.def,{shape:Yf(e,n)}))}function Yf(e,n){const t={};return Fn(t,e,Reflect.ownKeys(tn(e))),W0(t,n),t}function r_(e,n){if(!Gr(n))throw new Error("Invalid input to safeExtend: expected a plain object");return Sn(e,mt(e._zod.def,{shape:Yf(e,n)}))}function o_(e,n){var o,s;if(!((o=n==null?void 0:n._zod)!=null&&o.def))throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if((s=e._zod.def.checks)!=null&&s.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const t={};Fn(t,e,Reflect.ownKeys(tn(e))),Fn(t,n,Reflect.ownKeys(tn(n)));const r=mt(e._zod.def,{shape:t,get catchall(){return n._zod.def.catchall},checks:n._zod.def.checks??[]});return Sn(e,r)}function Uc(e,n,t,r="partial"){const s=n._zod.def.checks;if(s&&s.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const a=t?new Set(hs(n,t)):void 0,c={};return Fn(c,n,Reflect.ownKeys(tn(n)),e&&((u,d)=>a&&!a.has(d)?u:new e({type:"optional",innerType:u}))),Sn(n,mt(n._zod.def,{shape:c,checks:[]}))}function s_(e,n,t){const r=t?new Set(hs(n,t)):void 0,o={};return Fn(o,n,Reflect.ownKeys(tn(n)),(s,i)=>r&&!r.has(i)?s:new e({type:"nonoptional",innerType:s})),Sn(n,mt(n._zod.def,{shape:o}))}function Jt(e,n=0){var t;if(e.aborted===!0)return!0;for(let r=n;r<e.issues.length;r++)if(((t=e.issues[r])==null?void 0:t.continue)!==!0)return!0;return!1}function i_(e,n=0){var t;if(e.aborted===!0)return!0;for(let r=n;r<e.issues.length;r++)if(((t=e.issues[r])==null?void 0:t.continue)===!1)return!0;return!1}function Oa(e,n){return n.map(t=>{var r;return(r=t).path??(r.path=[]),t.path.unshift(e),t})}function jr(e){return typeof e=="string"?e:e==null?void 0:e.message}function Zc(e,n,t){var r;for(let o=n;o<e.length;o++)(r=e[o]).schema??(r.schema=t)}function kr(e,n,t){var c,u,d,l,f,p,m,v,y,b;var r;const o=(u=(c=e.inst)==null?void 0:c._zod)==null?void 0:u.traits;o!=null&&o.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const s=e.schema!==e.inst?(l=(d=e.schema)==null?void 0:d._zod.def)==null?void 0:l.error:void 0,i=e.message?e.message:jr((m=(p=(f=e.inst)==null?void 0:f._zod.def)==null?void 0:p.error)==null?void 0:m.call(p,e))??jr(s==null?void 0:s(e))??jr((v=n==null?void 0:n.error)==null?void 0:v.call(n,e))??jr((y=t.customError)==null?void 0:y.call(t,e))??jr((b=t.localeError)==null?void 0:b.call(t,e))??"Invalid input",a={};for(const _ of Object.keys(e))_==="inst"||_==="schema"||_==="continue"||_==="input"||_==="__proto__"||(a[_]=e[_]);return a.path??(a.path=[]),a.message=i,n!=null&&n.reportInput&&(a.input=e.input),a}const a_=/[\uD800-\uDBFF]/;function Ra(e){const n=e.length;if(!a_.test(e))return n;let t=n;for(let r=0;r<n-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(t--,r++);return t}function Ta(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function c_(e){const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return n}function qr(...e){const[n,t,r]=e;return typeof n=="string"?{message:n,code:"custom",input:t,inst:r}:{...n}}function l_(e,n){for(const t in n){const r=Object.getOwnPropertyDescriptor(n,t);r.get?Object.defineProperty(e,t,{...r,enumerable:!1}):d_(e,t,r.value)}}function xn(e,n,t,r=!0){return Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:r,value:t}),t}function Ia(e,n,t){return xn(e,n,t,!1)}function u_(e,n){for(const t in e){const r=e[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get(){return xn(this,t,r(this))},set(o){xn(this,t,o)}})}return n}function d_(e,n,t){Object.defineProperty(e,n,{configurable:!0,get(){return this==null?t:xn(this,n,t.bind(this))},set(r){xn(this,n,r)}})}function f_(e,n){const t=Object.getPrototypeOf(e);return n in t?void 0:t}let Ns,un=!1;const h_={configurable:!0,get(){un=!0}};function we(e,n,t){const r=Object.getPrototypeOf(e._zod);if(n in r&&Ns!==e._zod){Ns=void 0;return}Ns=e._zod,Object.defineProperty(r,n,{configurable:!0,get(){Object.defineProperty(this,n,h_);const o=un;un=!1;try{const s=t(this);return un?delete this[n]:Object.defineProperty(this,n,{configurable:!0,writable:!0,value:s}),un=un||o,s}catch(s){throw delete this[n],un=un||o,s}},set(o){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:o})}})}function p_(e,n,t,r){const o=f_(e,n);o&&Object.defineProperty(o,n,{configurable:!0,get(){const s={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,n,s),s.value=t(this),Object.defineProperty(this,n,s),s.value},set(s){Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:r,value:s})}})}const m_="~constantCatch";function g_(e){const n=()=>e;return n[m_]=!0,n}var Bc;const js={value:void 0,enumerable:!1};let Kc="captureStackTrace"in Error?Error:null;function v_(e){const n=Kc;if(n){const t=n.stackTraceLimit;if(typeof t=="number"){try{n.stackTraceLimit=0}catch{return Kc=null,new e}try{return new e}finally{n.stackTraceLimit=t}}}return new e}function j(e,n,t,r){const o={};function s(f){this.def=f,this.constr=l,this.traits=new Set}s.prototype=o;const i=t,a=i&&new WeakSet;function c(f,p){if(f._zod){if(f._zod.traits.has(e))return}else{js.value=new s(p);try{Object.defineProperty(f,"_zod",js)}finally{js.value=void 0}}if(f._zod.traits.add(e),n(f,p),a){const v=Object.getPrototypeOf(f),y=f._zod.constr.prototype;let b=v;for(;b&&b!==y;)b=Object.getPrototypeOf(b);const _=b??v;a.has(_)||(a.add(_),l_(_,i))}const m=l.prototype;for(const v in m)Object.prototype.hasOwnProperty.call(m,v)&&(v in f||(f[v]=m[v].bind(f)))}const u=(r==null?void 0:r.Parent)??Object;class d extends u{}Object.defineProperty(d,"name",{value:e});function l(f){var y;const p=r!=null&&r.Parent?v_(d):this;c(p,f);const m=p._zod.deferred;if(m){for(const b of m)b();p._zod.deferred=void 0}const v=(y=globalThis.__zod_globalConfig)==null?void 0:y.postProcessor;return v&&v(p),p}return Object.defineProperty(l,"init",{value:c}),Object.defineProperty(l,Symbol.hasInstance,{value:f=>{var p,m;return r!=null&&r.Parent&&f instanceof r.Parent?!0:(m=(p=f==null?void 0:f._zod)==null?void 0:p.traits)==null?void 0:m.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class $n extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Xf extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}(Bc=globalThis).__zod_globalConfig??(Bc.__zod_globalConfig={});const Vt=globalThis.__zod_globalConfig;function En(e){return e&&Object.assign(Vt,e),Vt}function y_(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Ri,2)),e.message}function b_(e){this._zod.message=e}const w_={get:y_,set:b_,enumerable:!0,configurable:!0},Ms={value:void 0,enumerable:!1},Wc=new WeakSet([Object.prototype,Error.prototype]),__=(e,n)=>{e.name="$ZodError",Ms.value=n,Object.defineProperty(e,"issues",Ms),Ms.value=void 0,Object.defineProperty(e,"message",w_);const t=Object.getPrototypeOf(e);Wc.has(t)||(Wc.add(t),Object.defineProperty(t,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},x_=j("$ZodError",__);function S_(e,n,t){return Object.prototype.hasOwnProperty.call(e,n)||(n==="__proto__"?Object.defineProperty(e,n,{value:t(),writable:!0,enumerable:!0,configurable:!0}):e[n]=t()),e[n]}function E_(e,n=t=>t.message){const t={},r=[];for(const o of e.issues)o.path.length>0?S_(t,o.path[0],()=>[]).push(n(o)):r.push(n(o));return{formErrors:r,fieldErrors:t}}function C_(e,n=t=>t.message){const t={_errors:[]},r=(o,s=[])=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>r({issues:a},[...s,...i.path]));else if(i.code==="invalid_key")r({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")r({issues:i.issues},[...s,...i.path]);else{const a=[...s,...i.path];if(a.length===0)t._errors.push(n(i));else{let c=t,u=0;for(;u<a.length;){const d=a[u],l=u===a.length-1;if(d==="_errors"){l&&c._errors.push(n(i)),u++;continue}Object.prototype.hasOwnProperty.call(c,d)||Object.defineProperty(c,d,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const f=c[d];l&&f._errors.push(n(i)),c=f,u++}}}};return r(e),t}function ps(e,n){return{callee:(n==null?void 0:n.callee)??e,Err:n==null?void 0:n.Err}}const Aa=e=>{const n=(t,r,o,s)=>{const i=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new $n;if(a.issues.length){const c=new((s==null?void 0:s.Err)??e)(a.issues.map(u=>kr(u,i,En())));throw qf(c,(s==null?void 0:s.callee)??n),c}return a.value};return n},Da=e=>{const n=async(t,r,o,s)=>{const i=o?{...o,async:!0}:{async:!0};let a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const c=new((s==null?void 0:s.Err)??e)(a.issues.map(u=>kr(u,i,En())));throw qf(c,(s==null?void 0:s.callee)??n),c}return a.value};return n},Na=e=>(n,t,r)=>{const o=r?{...r,async:!1}:{async:!1},s=n._zod.run({value:t,issues:[]},o);if(s instanceof Promise)throw new $n;return s.issues.length?eh(e,s.issues,o):{success:!0,data:s.value}};function eh(e,n,t){let r;return{success:!1,get error(){return r||(r=new e(n.map(o=>kr(o,t,En()))),n=void 0,t=void 0),r},set error(o){r=o,n=void 0,t=void 0}}}const ja=e=>async(n,t,r)=>{const o=r?{...r,async:!0}:{async:!0};let s=n._zod.run({value:t,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?eh(e,s.issues,o):{success:!0,data:s.value}},k_=Symbol.for("zod.compile.invalid"),P_=Symbol.for("zod.compile.fallback"),O_=((e,n,t)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(n)!==k_)return!0;if(r.definite===!0&&t===void 0)return!1}return R_(e,n,t)});function R_(e,n,t){const r=t?{...t,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let s;if(o?(r[P_]=!0,s=o({value:n,issues:[]},r)):s=e._zod.run({value:n,issues:[]},r),s instanceof Promise)throw new $n;return s.issues.length===0}const T_=async(e,n,t)=>{const r=t?{...t,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},I_=e=>{const n=Aa(e),t=(r,o,s,i)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return n(r,o,a,ps(t,i))};return t},A_=e=>{const n=Aa(e),t=(r,o,s,i)=>n(r,o,s,ps(t,i));return t},D_=e=>{const n=Da(e),t=async(r,o,s,i)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return await n(r,o,a,ps(t,i))};return t},N_=e=>{const n=Da(e),t=async(r,o,s,i)=>await n(r,o,s,ps(t,i));return t},j_=e=>(n,t,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Na(e)(n,t,o)},M_=e=>(n,t,r)=>Na(e)(n,t,r),$_=e=>async(n,t,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return ja(e)(n,t,o)},z_=e=>async(n,t,r)=>ja(e)(n,t,r),F_=/^[cC][0-9a-z]{6,}$/,L_=/^[0-9a-z]+$/,V_=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,U_=/^[0-9a-vA-V]{20}$/,Z_=/^[A-Za-z0-9]{27}$/,B_=/^[a-zA-Z0-9_-]{21}$/;function K_(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const W_=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,H_=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Hc=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,G_=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,q_="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Q_(){return new RegExp(q_,"u")}const J_=/^(?:(?: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])$/,Y_=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,X_=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,ex=/^(([0-9a-fA-F]{1,4}:){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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tx=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,nx=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,rx=/^https?$/,ox=/^\+[1-9]\d{6,14}$/,th="(?:(?:\\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])))";function sx(e){return new RegExp(`^${e}$`)}const ix=sx(th);function Ti(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${n}:[0-5]\\d(?:\\.\\d+)?`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ax(e){return new RegExp(`^${Ti(e)}$`)}function cx(e){const n=["Z"];e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const t=`${Ti({precision:e.precision,seconds:!0})}(?:${n.join("|")})`,r=e.local?`${t}|${Ti({precision:e.precision})}`:t;return new RegExp(`^${th}T(?:${r})$`)}const lx=/^[\s\S]{0,}$/,ux=/^(?:true|false)$/i,dx=/^[^A-Z]*$/,fx=/^[^a-z]*$/,At=j("$ZodCheck",(e,n)=>{var t;e._zod??(e._zod={}),e._zod.def=n,(t=e._zod).onattach??(t.onattach=[])}),Ma=e=>{const n=e.value;return!K0(n)&&n.length!==void 0},hx=j("$ZodCheckMaxLength",(e,n)=>{var t;At.init(e,n),(t=e._zod.def).when??(t.when=Ma),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>n.maximum?Ra(o):s)<=n.maximum)return;const a=Ta(o);r.issues.push({origin:a,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),px=j("$ZodCheckMinLength",(e,n)=>{var t;At.init(e,n),(t=e._zod.def).when??(t.when=Ma),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>=n.minimum&&s<n.minimum*2?Ra(o):s)>=n.minimum)return;const a=Ta(o);r.issues.push({origin:a,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),mx=j("$ZodCheckLengthEquals",(e,n)=>{var t;At.init(e,n),(t=e._zod.def).when??(t.when=Ma),e._zod.check=r=>{const o=r.value,s=o.length,i=typeof o=="string"&&s>=n.length&&s<=n.length*2?Ra(o):s;if(i===n.length)return;const a=Ta(o),c=i>n.length;r.issues.push({origin:a,...c?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),ms=j("$ZodCheckStringFormat",(e,n)=>{var t,r;At.init(e,n),n.pattern?(t=e._zod).check??(t.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(r=e._zod).check??(r.check=()=>{})}),gx=j("$ZodCheckRegex",(e,n)=>{ms.init(e,n),e._zod.check=t=>{n.pattern.lastIndex=0,!n.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),vx=j("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=dx),ms.init(e,n)}),yx=j("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=fx),ms.init(e,n)}),bx=j("$ZodCheckIncludes",(e,n)=>{At.init(e,n);const t=fs(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position},}${t}`:t);n.pattern=r,e._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:e,continue:!n.abort})}}),wx=j("$ZodCheckStartsWith",(e,n)=>{At.init(e,n);const t=new RegExp(`^${fs(n.prefix)}.*`);n.pattern??(n.pattern=t),e._zod.check=r=>{r.value.startsWith(n.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:r.value,inst:e,continue:!n.abort})}}),_x=j("$ZodCheckEndsWith",(e,n)=>{At.init(e,n);const t=new RegExp(`.*${fs(n.suffix)}$`);n.pattern??(n.pattern=t),e._zod.check=r=>{r.value.endsWith(n.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:r.value,inst:e,continue:!n.abort})}});function Gc(e,n,t){e.issues.length&&n.issues.push(...Oa(t,e.issues))}const xx=j("$ZodCheckProperties",(e,n)=>{At.init(e,n),Ia(e,Symbol.iterator,function*(){yield e});let t;e._zod.check=r=>{if(r.value==null){r.issues.push({expected:"object",code:"invalid_type",input:r.value,inst:e});return}t??(t=Reflect.ownKeys(n.shape).map(i=>[i,n.shape[i]]));const o=r.value;let s;for(const[i,a]of t){const c=a._zod.run({value:o[i],issues:[]},{});c instanceof Promise?(s??(s=[]),s.push(c.then(u=>Gc(u,r,i)))):Gc(c,r,i)}if(s)return Promise.all(s).then(()=>{})}}),Sx=j("$ZodCheckOverwrite",(e,n)=>{At.init(e,n),e._zod.check=t=>{t.value=n.tx(t.value)}});class Ex{constructor(n=[],t={}){this.content=[],this.indent=0,this.args=n,this.closed=t}indented(n){this.indent+=1;try{n(this)}finally{this.indent-=1}}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const r=n.split(`
|
|
163
|
-
`).filter(i=>i),o=Math.min(...r.map(i=>i.length-i.trimStart().length)),s=r.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const n=Function,t=(this==null?void 0:this.content)??[""];return new n(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
164
|
-
${t.join(`
|
|
165
|
-
`)}
|
|
166
|
-
};`)(...Object.values(this.closed))}}const Cx={major:4,minor:6,patch:5},Fe=j("$ZodType",(e,n)=>{var s;var t;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=Cx;const r=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r!=null&&r.length?[...r]:[];for(const i of o)for(const a of i._zod.onattach)a(e);if(o.length===0)(t=e._zod).deferred??(t.deferred=[]),(s=e._zod.deferred)==null||s.push(()=>{e._zod.run=e._zod.parse});else{const i=(c,u,d)=>{if(c.memo)return c;let l=Jt(c),f;for(const p of u){if(p._zod.def.when){if(i_(c)||!p._zod.def.when(c))continue}else if(l)continue;const m=c.issues.length,v=p._zod.check(c);if(v instanceof Promise&&(d==null?void 0:d.async)===!1)throw new $n;if(f||v instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await v,c.issues.length!==m&&(Zc(c.issues,m,e),l||(l=Jt(c,m)))});else{if(c.issues.length===m)continue;Zc(c.issues,m,e),l||(l=Jt(c,m))}}return f?f.then(()=>c):c},a=(c,u,d)=>{if(Jt(c))return c.aborted=!0,c;const l=i(u,o,d);if(l instanceof Promise){if(d.async===!1)throw new $n;return l.then(f=>e._zod.parse(f,d))}return e._zod.parse(l,d)};e._zod.run=(c,u)=>{if(u.skipChecks)return e._zod.parse(c,u);if(u.direction==="backward"){const l=e._zod.parse({value:c.value,issues:[]},{...u,skipChecks:!0});return l instanceof Promise?l.then(f=>a(f,c,u)):a(l,c,u)}const d=e._zod.parse(c,u);if(d instanceof Promise){if(u.async===!1)throw new $n;return d.then(l=>i(l,o,u))}return i(d,o,u)}}},{get"~standard"(){return Ia(this,"~standard",rh(this))},set"~standard"(e){xn(this,"~standard",e)}}),nh=(e,n)=>e.issues.length?{issues:e.issues.map(t=>kr(t,n,En()))}:{value:e.value};async function kx(e,n){const t={async:!0};return nh(await e._zod.run({value:n,issues:[]},t),t)}function rh(e){return{validate:n=>{const t={async:!1};try{const r=e._zod.run({value:n,issues:[]},t);if(!(r instanceof Promise))return nh(r,t)}catch{}return kx(e,n)},vendor:"zod",version:1}}const $a=j("$ZodString",(e,n)=>{Fe.init(e,n),e._zod.pattern=n.pattern??lx,e._zod.parse=(t,r)=>{if(n.coerce)try{t.value=String(t.value)}catch{}return typeof t.value=="string"||t.issues.push({expected:"string",code:"invalid_type",input:t.value,inst:e}),t}}),Te=j("$ZodStringFormat",(e,n)=>{ms.init(e,n),$a.init(e,n)}),Px=j("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=H_),Te.init(e,n)}),Ox=j("$ZodUUID",(e,n)=>{if(n.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(r===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=Hc(r))}else n.pattern??(n.pattern=Hc());Te.init(e,n)}),Rx=j("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=G_),Te.init(e,n)}),oh=1,qo=2;function sh(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Tx(e,n){return!("normalize"in n)&&!("hostname"in n)&&!("protocol"in n)?sh(e)||qo:Ix(e,n)}function Ix(e,n){var t;if(!n.normalize&&((t=n.protocol)==null?void 0:t.source)===rx.source&&!/^https?:\/\//i.test(e))return oh;try{if(typeof URL<"u"){const r=URL;if(typeof r.parse=="function")return r.parse(e)??qo}return new URL(e)}catch{return qo}}const Ax=/[\t\n\r]/g;function qc(e){return e.replace(Ax,"")}function Dx(e,n){return n.lastIndex=0,n.test(e.hostname)}function Nx(e,n){return n.lastIndex=0,n.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const jx=j("$ZodURL",(e,n)=>{Te.init(e,n),e._zod.check=t=>{try{const r=t.value.trim(),o=Tx(r,n);if(o===oh){t.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:t.value,inst:e,continue:!n.abort});return}if(o===qo){t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:e,continue:!n.abort});return}if(o===!0){t.value=qc(r);return}n.hostname&&!Dx(o,n.hostname)&&t.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:t.value,inst:e,continue:!n.abort}),n.protocol&&!Nx(o,n.protocol)&&t.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:t.value,inst:e,continue:!n.abort}),t.value=n.normalize?o.href:qc(r);return}catch{t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:e,continue:!n.abort})}}}),Mx=j("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=Q_()),Te.init(e,n)}),$x=j("$ZodNanoID",(e,n)=>{if(n.length!==void 0&&(!Number.isInteger(n.length)||n.length<1))throw new Error(`Invalid nanoid length: ${n.length}`);n.pattern??(n.pattern=n.length===void 0?B_:K_(n.length)),Te.init(e,n)}),zx=j("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=F_),Te.init(e,n)}),Fx=j("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=L_),Te.init(e,n)}),Lx=j("$ZodULID",(e,n)=>{n.pattern??(n.pattern=V_),Te.init(e,n)}),Vx=j("$ZodXID",(e,n)=>{n.pattern??(n.pattern=U_),Te.init(e,n)}),Ux=j("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=Z_),Te.init(e,n)}),Zx=j("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=cx(n)),Te.init(e,n)}),Bx=j("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=ix),Te.init(e,n)}),Kx=j("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=ax(n)),Te.init(e,n)}),Wx=j("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=W_),Te.init(e,n)}),Hx=j("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=J_),Te.init(e,n)}),Gx=/^[0-9a-fA-F:.]+$/;function ih(e){return Gx.test(e)?sh(`http://[${e}]`):!1}const qx=j("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=Y_),Te.init(e,n),e._zod.check=t=>{ih(t.value)||t.issues.push({code:"invalid_format",format:"ipv6",input:t.value,inst:e,continue:!n.abort})}}),Qx=j("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=X_),Te.init(e,n)});function Jx(e){const n=e.split("/");if(n.length!==2)return!1;const[t,r]=n;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:ih(t)}const Yx=j("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=ex),Te.init(e,n),e._zod.check=t=>{Jx(t.value)||t.issues.push({code:"invalid_format",format:"cidrv6",input:t.value,inst:e,continue:!n.abort})}});function ah(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const ch=/^[0-9a-zA-Z+/]*={0,2}$/,Xx=j("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=ch),Te.init(e,n),e._zod.check=t=>{ah(t.value)||t.issues.push({code:"invalid_format",format:"base64",input:t.value,inst:e,continue:!n.abort})}}),za=/^[A-Za-z0-9_-]*$/;function e1(e){if(!za.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),t=n.padEnd(Math.ceil(n.length/4)*4,"=");return ah(t)}const t1=j("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=za),Te.init(e,n),e._zod.check=t=>{e1(t.value)||t.issues.push({code:"invalid_format",format:"base64url",input:t.value,inst:e,continue:!n.abort})}}),n1=j("$ZodE164",(e,n)=>{n.pattern??(n.pattern=ox),Te.init(e,n)});function r1(e,n=null){try{const t=e.split(".");if(t.length!==3)return!1;const[r]=t;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||n&&(!("alg"in o)||o.alg!==n))}catch{return!1}}const o1=j("$ZodJWT",(e,n)=>{Te.init(e,n),e._zod.check=t=>{r1(t.value,n.alg)||t.issues.push({code:"invalid_format",format:"jwt",input:t.value,inst:e,continue:!n.abort})}}),s1=j("$ZodBoolean",(e,n)=>{Fe.init(e,n),e._zod.pattern=ux,e._zod.parse=(t,r)=>{if(n.coerce)try{t.value=!!t.value}catch{}const o=t.value;return typeof o=="boolean"||t.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),t}}),i1=j("$ZodUnknown",(e,n)=>{Fe.init(e,n),e._zod.parse=t=>t}),a1=j("$ZodNever",(e,n)=>{Fe.init(e,n),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Qc(e,n,t){e.issues.length&&n.issues.push(...Oa(t,e.issues)),n.value[t]=e.value}const c1=j("$ZodArray",(e,n)=>{Fe.init(e,n);const t=Vt.memoizer;t==null||t.attach(e),e._zod.parse=(r,o)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),r;r.value=t?t.alloc(e,r,Array(s.length),o):Array(s.length);const i=[],a=o==null?void 0:o.abortEarly;for(let c=0;c<s.length;c++){const u=s[c],d=n.element._zod.run({value:u,issues:[]},o);if(d instanceof Promise)i.push(d.then(l=>Qc(l,r,c)));else if(Qc(d,r,c),a&&d.issues.length!==0&&Jt(d))break}return i.length?Promise.all(i).then(()=>r):r}});function Qo(e,n,t,r,o,s){const i=t in r,a=s==="optional";if(!(!i&&a&&o==="optional")){if(e.issues.length){if(o!==void 0&&a&&!i)return;n.issues.push(...Oa(t,e.issues))}if(!i&&o===void 0){e.issues.length||n.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[t]});return}e.value===void 0?(i||o==="defaulted"&&!a)&&(n.value[t]=void 0):n.value[t]=e.value}}const l1=[];function lh(e){var i,a,c,u;const n=Object.keys(e.shape),t=Object.getOwnPropertySymbols(e.shape),r=t.length?t:l1,o=r.length?[...n,...r]:n;for(const d of o)if(!((u=(c=(a=(i=e.shape)==null?void 0:i[d])==null?void 0:a._zod)==null?void 0:c.traits)!=null&&u.has("$ZodType")))throw new Error(`Invalid element at key "${String(d)}": expected a Zod schema`);const s=J0(e.shape);return{...e,allKeys:o,symbolKeys:r,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(s)}}function uh(e,n,t,r,o,s,i){const a=[],c=o.keySet,u=o.catchall._zod,d=u.def.type,l=u.optin,f=u.optout;let p=0;for(const m in n){if(i&&t.issues.length!==p){if(Jt(t,p))break;p=t.issues.length}if(c.has(m))continue;if(m==="__proto__"){d==="never"&&a.push(m);continue}if(d==="never"){a.push(m);continue}const v=u.run({value:n[m],issues:[]},r);v instanceof Promise?e.push(v.then(y=>Qo(y,t,m,n,l,f))):Qo(v,t,m,n,l,f)}return a.length&&t.issues.push({code:"unrecognized_keys",keys:a,input:n,inst:s,continue:!0}),e.length?Promise.all(e).then(()=>t):t}const u1=j("$ZodObject",(e,n)=>{Fe.init(e,n);const t=Object.getOwnPropertyDescriptor(n,"shape"),r=t!=null&&t.get?t.get.raw:n.shape??{};if(r){const u=()=>{const d={...r};return Object.defineProperty(n,"shape",{value:d}),u.raw=d,d};u.raw=r,Object.defineProperty(n,"shape",{get:u})}const o=ka(()=>lh(n));we(e,"propValues",u=>{const d=u.def.shape,l={};for(const f in d){const p=d[f]._zod;if(p.values){Object.prototype.hasOwnProperty.call(l,f)||Zn(l,f,new Set);for(const m of p.values)l[f].add(m);p.optin!==void 0&&l[f].add(void 0)}}return l});const s=Go,i=n.catchall;let a;const c=Vt.memoizer;c==null||c.attach(e),e._zod.parse=(u,d)=>{a??(a=o.value);const l=u.value;if(!s(l))return u.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),u;u.value=c?c.alloc(e,u,{},d):{};const f=[],p=a.shape,m=d==null?void 0:d.abortEarly;let v=u.issues.length;for(const y of a.allKeys){if(m&&u.issues.length!==v){if(Jt(u,v))break;v=u.issues.length}if(y==="__proto__")continue;const b=p[y],_=b._zod.optin,k=b._zod.optout,S=b._zod.run({value:l[y],issues:[]},d);S instanceof Promise?f.push(S.then(E=>Qo(E,u,y,l,_,k))):Qo(S,u,y,l,_,k)}return i?uh(f,l,u,d,o.value,e,m===!0):f.length?Promise.all(f).then(()=>u):u}}),d1=j("$ZodObjectJIT",(e,n)=>{u1.init(e,n);const t=e._zod.parse,r=ka(()=>lh(n)),o=Vt.memoizer,s=p=>{var E,O;const m=r.value,v=m.symbolKeys,y=new Ex(["payload","ctx"],{shape:p,inst:e,memo:o,syms:v}),b=I=>`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`,_=(I,A)=>`
|
|
167
|
-
let ${I}_ab = false;
|
|
168
|
-
for (let i = 0; i < ${I}.issues.length; i++) {
|
|
169
|
-
const iss = ${I}.issues[i];
|
|
170
|
-
iss.path = iss.path ? [${A}, ...iss.path] : [${A}];
|
|
171
|
-
payload.issues.push(iss);
|
|
172
|
-
if (iss.continue !== true) ${I}_ab = true;
|
|
173
|
-
}
|
|
174
|
-
if (${I}_ab && ctx && ctx.abortEarly) {
|
|
175
|
-
payload.value = newResult;
|
|
176
|
-
return payload;
|
|
177
|
-
}`;y.write("const input = payload.value;");const k=Object.create(null);let S=0;for(const I of m.allKeys)k[I]=`key_${S++}`;y.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const I of m.allKeys){if(I==="__proto__")continue;const A=k[I],R=typeof I=="symbol"?`syms[${v.indexOf(I)}]`:H0(I),$=`${R} in input`,F=p[I],M=(E=F==null?void 0:F._zod)==null?void 0:E.optin,V=M!==void 0,K=((O=F==null?void 0:F._zod)==null?void 0:O.optout)==="optional";if(y.write(`const ${A} = ${b(R)};`),V&&K){const Y=M==="optional"?`${A}_present`:`${A}.value !== undefined || ${A}_present`;y.write(`
|
|
178
|
-
const ${A}_present = ${$};
|
|
179
|
-
if (!${A}.issues.length || ${A}_present) {
|
|
180
|
-
if (${A}.issues.length) {${_(A,R)}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
if (${Y}) {
|
|
184
|
-
newResult[${R}] = ${A}.value;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
`)}else V?(y.write(`
|
|
189
|
-
if (${A}.issues.length) {${_(A,R)}
|
|
190
|
-
}
|
|
191
|
-
`),M==="defaulted"?y.write(`newResult[${R}] = ${A}.value;`):y.write(`
|
|
192
|
-
if (${A}.value !== undefined || ${$}) {
|
|
193
|
-
newResult[${R}] = ${A}.value;
|
|
194
|
-
}
|
|
195
|
-
`)):y.write(`
|
|
196
|
-
const ${A}_present = ${$};
|
|
197
|
-
if (${A}.issues.length) {${_(A,R)}
|
|
198
|
-
}
|
|
199
|
-
if (!${A}_present && !${A}.issues.length) {
|
|
200
|
-
payload.issues.push({
|
|
201
|
-
code: "invalid_type",
|
|
202
|
-
expected: "nonoptional",
|
|
203
|
-
input: undefined,
|
|
204
|
-
path: [${R}]
|
|
205
|
-
});
|
|
206
|
-
if (ctx && ctx.abortEarly) {
|
|
207
|
-
payload.value = newResult;
|
|
208
|
-
return payload;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
if (${A}_present) {
|
|
213
|
-
newResult[${R}] = ${A}.value;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
`)}return y.write("payload.value = newResult;"),y.write("return payload;"),y.compile()};let i;const a=Go,c=!Vt.jitless,d=c&&q0.value,l=n.catchall;let f;e._zod.parse=(p,m)=>{f??(f=r.value);const v=p.value;return a(v)?c&&d&&(m==null?void 0:m.async)===!1&&m.jitless!==!0?(i||(i=s(n.shape)),p=i(p,m),l?uh([],v,p,m,f,e,(m==null?void 0:m.abortEarly)===!0):p):t(p,m):(p.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),p)}});function Jc(e,n,t,r){for(const s of e)if(s.issues.length===0)return n.value=s.value,n;const o=e.filter(s=>!Jt(s));return o.length===1?(n.value=o[0].value,o[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:t,errors:e.map(s=>s.issues.map(i=>kr(i,r,En())))}),n)}const f1=j("$ZodUnion",(e,n)=>{Fe.init(e,n),we(e,"optin",r=>r.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":r.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),we(e,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),we(e,"values",r=>{if(r.def.options.every(o=>o._zod.values))return new Set(r.def.options.flatMap(o=>Array.from(o._zod.values)))}),we(e,"pattern",r=>{if(r.def.options.every(o=>o._zod.pattern)){const o=r.def.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Pa(s.source)).join("|")})$`)}});const t=n.options.length===1?n.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(t)return t(r,o);let s=!1;const i=[];for(const a of n.options){const c=a._zod.run({value:r.value,issues:[]},o);if(c instanceof Promise)i.push(c),s=!0;else{if(c.issues.length===0)return c;i.push(c)}}return s?Promise.all(i).then(a=>Jc(a,r,e,o)):Jc(i,r,e,o)}}),h1=j("$ZodIntersection",(e,n)=>{Fe.init(e,n),e._zod.parse=(t,r)=>{const o=t.value,s=n.left._zod.run({value:o,issues:[]},r),i=n.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([c,u])=>Yc(t,c,u)):Yc(t,s,i)}});function Ii(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(Gr(e)&&Gr(n)){const t=Object.keys(n),r=Object.keys(e).filter(s=>t.indexOf(s)!==-1),o={...e,...n};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const s of r){if(s==="__proto__")continue;const i=Ii(e[s],n[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const t=[];for(let r=0;r<e.length;r++){const o=e[r],s=n[r],i=Ii(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};t.push(i.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function Yc(e,n,t){const r=new Map;let o;const s=new Map,i=(u,d)=>{var f,p;let l;if(u.code==="unrecognized_keys"&&!((f=u.path)!=null&&f.length))o??(o=u),l=u.keys;else if(u.code==="invalid_key"&&u.origin==="record"&&((p=u.path)==null?void 0:p.length)===1){const m=String(u.path[0]);s.has(m)||s.set(m,u),l=[m]}else return!1;for(const m of l)r.has(m)||r.set(m,{}),r.get(m)[d]=!0;return!0};for(const u of n.issues)i(u,"l")||e.issues.push(u);for(const u of t.issues)i(u,"r")||e.issues.push(u);const a=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(a.length){const u=o?a.filter(d=>o.keys.includes(d)):[];u.length&&e.issues.push({...o,keys:u});for(const d of a)!u.includes(d)&&s.has(d)&&e.issues.push(s.get(d))}const c=Ii(n.value,t.value);if(!c.valid){if(Jt(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}const p1=j("$ZodEnum",(e,n)=>{Fe.init(e,n);const t=Oi(n.entries),r=new Set(t);e._zod.values=r,we(e,"pattern",o=>{const s=Oi(o.def.entries).filter(i=>Q0.has(typeof i));return new RegExp(s.length?`^(${s.map(i=>fs(i.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,s)=>{const i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t,input:i,inst:e}),o}}),m1=j("$ZodTransform",(e,n)=>{var t;Fe.init(e,n),e._zod.optin="optional",(t=Vt.memoizer)==null||t.guard(e),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Xf(e.constructor.name);const s=n.transform(r.value,r);if(o.async)return(s instanceof Promise?s:Promise.resolve(s)).then(a=>(r.value=a,r));if(s instanceof Promise)throw new $n;return r.value=s,r}});function Xc(e,n){return e.value=n.issues.length?void 0:n.value,e}const dh=j("$ZodOptional",(e,n)=>{Fe.init(e,n),we(e,"optin",t=>t.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",we(e,"values",t=>{const r=t.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),we(e,"pattern",t=>{const r=t.def.innerType._zod.pattern;return r?new RegExp(`^(${Pa(r.source)})?$`):void 0}),e._zod.parse=(t,r)=>{if(t.value===void 0){if(n.innerType._zod.optin!=="defaulted")return t;const o=n.innerType._zod.run({value:t.value,issues:[]},r);return o instanceof Promise?o.then(s=>Xc(t,s)):Xc(t,o)}return n.innerType._zod.run(t,r)}}),g1=j("$ZodExactOptional",(e,n)=>{dh.init(e,n),we(e,"values",t=>t.def.innerType._zod.values),we(e,"pattern",t=>t.def.innerType._zod.pattern),e._zod.parse=(t,r)=>n.innerType._zod.run(t,r)}),v1=j("$ZodNullable",(e,n)=>{Fe.init(e,n),we(e,"optin",t=>t.def.innerType._zod.optin),we(e,"optout",t=>t.def.innerType._zod.optout),we(e,"pattern",t=>{const r=t.def.innerType._zod.pattern;return r?new RegExp(`^(${Pa(r.source)}|null)$`):void 0}),we(e,"values",t=>t.def.innerType._zod.values?new Set([...t.def.innerType._zod.values,null]):void 0),e._zod.parse=(t,r)=>t.value===null?t:n.innerType._zod.run(t,r)}),y1=j("$ZodDefault",(e,n)=>{Fe.init(e,n),e._zod.optin="defaulted",we(e,"values",t=>t.def.innerType._zod.values),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);if(t.value===void 0)return t.value=n.defaultValue,t;const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(s=>el(s,n)):el(o,n)}});function el(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const b1=j("$ZodPrefault",(e,n)=>{Fe.init(e,n),e._zod.optin="defaulted",we(e,"values",t=>t.def.innerType._zod.values),e._zod.parse=(t,r)=>(r.direction==="backward"||t.value===void 0&&(t.value=n.defaultValue),n.innerType._zod.run(t,r))}),w1=j("$ZodNonOptional",(e,n)=>{Fe.init(e,n),we(e,"values",t=>{const r=t.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(t,r)=>{const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(s=>tl(s,e)):tl(o,e)}});function tl(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}function nl(e,n,t,r){return n.issues.length?(e.value=t.catchValue({...n,value:e.value,error:{issues:n.issues.map(o=>kr(o,r,En()))},input:e.value}),e):(e.value=n.value,n.memo&&(e.memo=!0),e)}const _1=j("$ZodCatch",(e,n)=>{Fe.init(e,n),we(e,"optin",t=>t.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),we(e,"optout",t=>t.def.innerType._zod.optout),we(e,"values",t=>t.def.innerType._zod.values),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);const o=n.innerType._zod.run({value:t.value,issues:[]},r);return o instanceof Promise?o.then(s=>nl(t,s,n,r)):nl(t,o,n,r)}}),x1=j("$ZodPipe",(e,n)=>{Fe.init(e,n),we(e,"values",t=>t.def.in._zod.values),we(e,"optin",t=>t.def.in._zod.optin),we(e,"optout",t=>t.def.out._zod.optout),we(e,"propValues",t=>t.def.in._zod.propValues),e._zod.parse=(t,r)=>{if(r.direction==="backward"){const s=n.out._zod.run(t,r);return s instanceof Promise?s.then(i=>ko(i,n.in,r)):ko(s,n.in,r)}const o=n.in._zod.run(t,r);return o instanceof Promise?o.then(s=>ko(s,n.out,r)):ko(o,n.out,r)}});function ko(e,n,t){return e.issues.some(r=>r.code!=="unrecognized_keys")?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},t)}const S1=j("$ZodReadonly",(e,n)=>{Fe.init(e,n),we(e,"propValues",t=>t.def.innerType._zod.propValues),we(e,"values",t=>t.def.innerType._zod.values),we(e,"optin",t=>{var r,o;return(o=(r=t.def.innerType)==null?void 0:r._zod)==null?void 0:o.optin}),we(e,"optout",t=>{var r,o;return(o=(r=t.def.innerType)==null?void 0:r._zod)==null?void 0:o.optout}),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(rl):rl(o)}});function rl(e){return e.memo||(e.value=Object.freeze(e.value)),e}const E1=j("$ZodCustom",(e,n)=>{At.init(e,n),Fe.init(e,n),e._zod.parse=(t,r)=>t,e._zod.check=t=>{const r=t.value,o=n.fn(r);if(o instanceof Promise)return o.then(s=>ol(s,t,r,e));ol(o,t,r,e)}});function ol(e,n,t,r){if(!e){const o={code:"custom",input:t,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),n.issues.push(qr(o))}}class C1 extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Ai="~memo",sl=[];function fh(e){return e!==null&&typeof e=="object"}function $s(e){return e.map(n=>n.path?{...n,path:n.path.slice()}:{...n})}const hh=new WeakMap,$r=0,Fo=1,Lr=2;function Lo(e,n,t){const r=hh.get(e);if(r!==void 0)return r?Lr:$r;if(n.has(e))return Lr;n.add(e);let o=$r;const s=d=>{if(o!==Lr&&(d!=null&&d._zod)){const l=Lo(d,n);l>o&&(o=l)}},i=(d,l)=>{var p;let f=$r;for(const m of Reflect.ownKeys(d)){const v=Object.getOwnPropertyDescriptor(d,m);if(!v.enumerable)continue;const y=v.get?Fo:(p=v.value)!=null&&p._zod?Lo(v.value,n):$r;y>f&&(f=y)}return f},a=d=>{d>o&&(o=d)},c=e._zod.def;switch(c.type){case"object":{const d=Wf(c);a(d?i(d):Fo),s(c.catchall);break}case"array":s(c.element);break;case"tuple":for(const d of c.items)s(d);s(c.rest);break;case"record":case"map":s(c.keyType),s(c.valueType);break;case"set":s(c.valueType);break;case"union":for(const d of c.options)s(d);break;case"intersection":s(c.left),s(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":s(c.innerType);break;case"pipe":s(c.in),s(c.out);break;case"function":s(c.input),s(c.output);break;case"lazy":{const d=c._cachedInner??void 0;a(d?Lo(d,n):Fo);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const d in c){const l=Object.getOwnPropertyDescriptor(c,d);if(!l||l.get)continue;const f=l.value;if(!(!f||typeof f!="object")){if(f._zod)s(f);else if(Array.isArray(f))for(const p of f)s(p)}}}return n.delete(e),k1(e,o)}function k1(e,n){return n!==Fo&&hh.set(e,n===Lr),n}function P1(e,n){let t=e.buckets.get(n);return t||(t=new WeakMap,e.buckets.set(n,t)),t}let Po;const Oo=[],O1={alloc(e,n,t){const r=Po;if(!r)return t;Po=void 0;const o={value:t,issues:null};return r.set(n.value,o),Oo.push(o),t},guard(e){var n;(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred.push(()=>{const t=e._zod.parse,r=(o,s)=>{if(s.direction!=="backward"&&T1(s,o.value))throw new C1;return t(o,s)};e._zod.parse=r,e._zod.run===t&&(e._zod.run=r)})},attach(e){var n;let t,r=!1,o,s;(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred.push(()=>{const i=e._zod.parse,a=(c,u)=>{if(t===void 0){const b=Lo(e,new Set);if(b===$r)return e._zod.parse=i,e._zod.run===a&&(e._zod.run=i),i(c,u);b===Lr||r?t=!0:r=!0}const d=c.value;if(!fh(d))return i(c,u);let l=u[Ai];l||(l={buckets:new WeakMap,backEdges:void 0},u[Ai]=l);let f;o===u?f=s:(f=P1(l,e),o=u,s=f);const p=f.get(d);if(p)return c.value=p.value,p.issues?p.issues.length&&c.issues.push(...$s(p.issues)):(c.memo=!0,l.backEdges??(l.backEdges=new WeakSet),l.backEdges.add(p.value)),c;Po=f;const m=Oo.length,v=i(c,u);Po=void 0;const y=Oo.length>m?Oo.pop():void 0;return v instanceof Promise?v.then(b=>(y&&(y.issues=b.issues.length?$s(b.issues):sl),b)):(y&&(y.issues=v.issues.length?$s(v.issues):sl),v)};e._zod.parse=a,e._zod.run===i&&(e._zod.run=a)})}};function R1(){return O1}function T1(e,n){var r;const t=(r=e[Ai])==null?void 0:r.backEdges;return t!==void 0&&fh(n)&&t.has(n)}const I1=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function n(s){return e[s]??null}const t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function o(s,i){return s==="number"&&typeof i=="number"&&!Number.isFinite(i)?String(i):r[s]??s}return s=>{switch(s.code){case"invalid_type":{const i=o(s.expected),a=c_(s.input),c=o(a,s.input);return`Invalid input: expected ${i}, received ${c}`}case"invalid_value":return s.values.length===1?`Invalid input: expected ${Jf(s.values[0])}`:`Invalid option: expected one of ${Vc(s.values,"|")}`;case"too_big":{const i=s.exact?"exactly ":s.inclusive?"<=":"<",a=n(s.origin);return a?`Too big: expected ${s.origin??"value"} to have ${i}${s.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${s.origin??"value"} to be ${i}${s.maximum.toString()}`}case"too_small":{const i=s.exact?"exactly ":s.inclusive?">=":">",a=n(s.origin);return a?`Too small: expected ${s.origin} to have ${i}${s.minimum.toString()} ${a.unit}`:`Too small: expected ${s.origin} to be ${i}${s.minimum.toString()}`}case"invalid_format":{const i=s;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${t[i.format]??s.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${s.divisor}`;case"unrecognized_keys":return`Unrecognized key${s.keys.length>1?"s":""}: ${Vc(s.keys,", ")}`;case"invalid_key":return`Invalid key in ${s.origin}`;case"invalid_union":return s.options&&Array.isArray(s.options)&&s.options.length>0?`Invalid discriminator value. Expected ${s.options.map(a=>`'${a}'`).join(" | ")}`:s.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${s.origin}`;default:return"Invalid input"}}};function A1(){return{localeError:I1()}}var il;class D1{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...t){const r=t[0];return this._map.set(n,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const t=this._map.get(n);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(n),this}get(n){const t=n._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const o={...r,...this._map.get(n)};return Object.keys(o).length?o:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function N1(){return new D1}(il=globalThis).__zod_globalRegistry??(il.__zod_globalRegistry=N1());const zr=globalThis.__zod_globalRegistry;function j1(e){return e.checks&&(e.checks=[...e.checks]),e}function M1(e,n){return new e(j1({type:"string",...re(n)}))}function $1(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...re(n)})}function z1(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...re(n)})}function F1(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...re(n)})}function L1(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...re(n)})}function V1(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...re(n)})}function U1(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...re(n)})}function Z1(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...re(n)})}function B1(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...re(n)})}function K1(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...re(n)})}function W1(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...re(n)})}function H1(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...re(n)})}function G1(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...re(n)})}function q1(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...re(n)})}function Q1(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...re(n)})}function J1(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...re(n)})}function Y1(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...re(n)})}function X1(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...re(n)})}function eS(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...re(n)})}function tS(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...re(n)})}function nS(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...re(n)})}function rS(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...re(n)})}function oS(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...re(n)})}function sS(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...re(n)})}function iS(e,n){return new e({type:"string",format:"date",check:"string_format",...re(n)})}function aS(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...re(n)})}function cS(e,n){return new e({type:"string",format:"duration",check:"string_format",...re(n)})}function lS(e,n){return new e({type:"boolean",...re(n)})}function uS(e){return new e({type:"unknown"})}function dS(e,n){return new e({type:"never",...re(n)})}function ph(e,n){return new hx({check:"max_length",...re(n),maximum:e})}function Jo(e,n){return new px({check:"min_length",...re(n),minimum:e})}function mh(e,n){return new mx({check:"length_equals",...re(n),length:e})}function fS(e,n){return new gx({check:"string_format",format:"regex",...re(n),pattern:e})}function hS(e){return new vx({check:"string_format",format:"lowercase",...re(e)})}function pS(e){return new yx({check:"string_format",format:"uppercase",...re(e)})}function mS(e,n){return new bx({check:"string_format",format:"includes",...re(n),includes:e})}function gS(e,n){return new wx({check:"string_format",format:"starts_with",...re(n),prefix:e})}function vS(e,n){return new _x({check:"string_format",format:"ends_with",...re(n),suffix:e})}function yS(e,n){return new xx({check:"properties",shape:e,...re(n)})}function Pr(e){return new Sx({check:"overwrite",tx:e})}function bS(e){return Pr(n=>n.normalize(e))}function wS(){return Pr(e=>e.trim())}function _S(){return Pr(e=>e.toLowerCase())}function xS(){return Pr(e=>e.toUpperCase())}function SS(){return Pr(e=>G0(e))}function ES(e,n,t){return new e({type:"array",element:n,...re(t)})}function CS(e,n,t){return new e({type:"custom",check:"custom",fn:n,...re(t)})}function kS(e,n){const t=PS(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(qr(o,r.value,t._zod.def));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),r.issues.push(qr(s))}},e(r.value,r)),n);return t}function PS(e,n){const t=new At({check:"custom",...re(n)});return t._zod.check=e,t}function Vr(e,...n){for(const t of n)for(const r of Reflect.ownKeys(t))Object.prototype.propertyIsEnumerable.call(t,r)&&Zn(e,r,t[r]);return e}function gh(e){let n=(e==null?void 0:e.target)??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??zr,target:n,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",intersections:[],deferred:[],external:(e==null?void 0:e.external)??void 0}}function co(e,n,t,r,o){const s=typeof n.unrepresentable=="function"?n.unrepresentable({zodSchema:e,path:r.path,message:o}):n.unrepresentable;if(s==="any")return!1;if(s===void 0||s==="throw")throw new Error(o);return Object.assign(t,s),!0}function Je(e,n,t={path:[],schemaPath:[]}){var d,l;var r;const o=e._zod.def,s=n.seen.get(e);if(s)return s.count++,t.schemaPath.includes(e)&&(s.cycle=t.path),s.schema;const i={schema:{},count:1,cycle:void 0,path:t.path};n.seen.set(e,i),n.sharedDefsExtractedFor=void 0,n.sharedEmitDoneFor=void 0;const a=(l=(d=e._zod).toJSONSchema)==null?void 0:l.call(d);if(a)i.schema=a;else{const f={...t,schemaPath:[...t.schemaPath,e],path:t.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,i.schema,f);else{const m=i.schema,v=n.processors[o.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);v(e,n,m,f)}const p=e._zod.parent;p&&(i.ref||(i.ref=p),Je(p,n,f),n.seen.get(p).isParent=!0)}const c=n.metadataRegistry.get(e);return c&&Vr(i.schema,c),n.io==="input"&&tt(e)&&(delete i.schema.examples,delete i.schema.default),n.io==="input"&&"_prefault"in i.schema&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,n.seen.get(e).schema}function al(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function vh(e,n){var i,a,c,u;const t=e.seen.get(n);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=new Map;for(const d of e.seen.entries()){const l=(i=e.metadataRegistry.get(d[0]))==null?void 0:i.id;if(l){const f=r.get(l);if(f&&f!==d[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(l,d[0])}}const o=d=>{var v;const l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=(v=e.external.registry.get(d[0]))==null?void 0:v.id,b=e.external.uri??(k=>k);if(y)return{ref:b(y)};const _=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=_,{defId:_,ref:`${b("__shared")}#/${l}/${al(_)}`}}const f="#",p=`${f}/${l}/`;if(d[1]===t&&!d[1].schema.id)return{ref:f};const m=d[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:p+al(m)}},s=d=>{if(d[1].schema.$ref)return;const l=d[1],{ref:f,defId:p}=o(d);l.def={...l.schema},p&&(l.defId=p);const m=l.schema;for(const v in m)delete m[v];m.$ref=f};if(e.cycles==="throw")for(const d of e.seen.entries()){const l=d[1];if(l.cycle)throw new Error(`Cycle detected: #/${(a=l.cycle)==null?void 0:a.join("/")}/<root>
|
|
217
|
-
|
|
218
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of e.seen.entries()){const l=d[1];if(n===d[0]){s(d);continue}if(e.external){const p=(c=e.external.registry.get(d[0]))==null?void 0:c.id;if(n!==d[0]&&p){s(d);continue}}if((u=e.metadataRegistry.get(d[0]))==null?void 0:u.id){s(d);continue}if(l.cycle){s(d);continue}l.count>1&&e.reused==="ref"&&s(d)}e.external&&(e.sharedDefsExtractedFor=e.external)}function yh(e){const n=e.anyOf;if(!Array.isArray(n)||n.length===0||e.type!==void 0)return;const t=[];for(const r of n){if(!r||typeof r!="object")return;yh(r);const o=Object.keys(r);if(o.length!==1||o[0]!=="type")return;const s=r.type;for(const i of Array.isArray(s)?s:[s]){if(typeof i!="string")return;t.includes(i)||t.push(i)}}delete e.anyOf,e.type=t.length===1?t[0]:t}const bh=new Set(["type","properties","required","additionalProperties"]),cl=["oneOf","anyOf"];function ll(e){const n=e.additionalProperties;return n===void 0||n===!1||typeof n!="object"||n===null?null:Object.keys(n).length?n:null}function Di(e){var s;const n=[];for(const i of e){if(typeof i!="object"||i.type!=="object")return null;for(const a in i)if(!bh.has(a))return null;n.push(i)}const t={},r=new Set;for(const i of n){for(const a in i.properties){if(Object.prototype.hasOwnProperty.call(t,a))continue;const c=[];for(const d of n){const l=((s=d.properties)==null?void 0:s[a])??ll(d);l!=null&&(c.some(f=>JSON.stringify(f)===JSON.stringify(l))||c.push(l))}const u=c.length===1?c[0]:Di(c)??{allOf:c};Zn(t,a,u)}for(const a of i.required??[])r.add(a)}const o={type:"object",properties:t};if(r.size&&(o.required=[...r]),n.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{const i=[];for(const a of n){const c=ll(a);c&&!i.some(u=>JSON.stringify(u)===JSON.stringify(c))&&i.push(c)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function OS(e){const n=e.allOf;if(!Array.isArray(n)||n.length<2)return;for(const o of bh)if(o in e)return;const t=n.filter(o=>cl.some(s=>Array.isArray(o[s])));let r=null;if(!t.length)r=Di(n);else{const o=t[0],s=cl.find(c=>Array.isArray(o[c]));if(Object.keys(o).length!==1)return;const i=n.filter(c=>c!==o),a=o[s].map(c=>Di([...i,c]));if(a.some(c=>!c))return;r={[s]:a}}r&&(delete e.allOf,Vr(e,r))}function wh(e,n){var a,c,u,d;const t=e.seen.get(n);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const f=e.seen.get(l);if(f.ref===null)return;const p=f.def??f.schema,m={...p},v=f.ref;if(f.ref=null,v){r(v);const b=e.seen.get(v),_=b.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(_)):Vr(p,_),Vr(p,m),l._zod.parent===v)for(const S in p)S==="$ref"||S==="allOf"||S in m||delete p[S];if(_.$ref&&b.def)for(const S in p)S==="$ref"||S==="allOf"||S in b.def&&JSON.stringify(p[S])===JSON.stringify(b.def[S])&&delete p[S]}const y=l._zod.parent;if(y&&y!==v){r(y);const b=e.seen.get(y);if(b!=null&&b.schema.$ref&&(p.$ref=b.schema.$ref,b.def))for(const _ in p)_==="$ref"||_==="allOf"||_ in b.def&&JSON.stringify(p[_])===JSON.stringify(b.def[_])&&delete p[_]}e.override({zodSchema:l,jsonSchema:p,path:f.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const l of[...e.seen.entries()].reverse())r(l[0]);if(e.target!=="openapi-3.0")for(const l of e.seen.entries())yh(l[1].def??l[1].schema);for(const l of e.deferred)l();if(e.intersections.length){const l=new Map;for(const f of e.seen.values())for(const p of[f.schema,f.def]){const m=p==null?void 0:p.allOf;if(!Array.isArray(m))continue;const v=l.get(m);v?v.push(p):l.set(m,[p])}for(const f of e.intersections)for(const p of l.get(f)??[])OS(p)}}const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const l=(c=e.external.registry.get(n))==null?void 0:c.id;if(!l)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(l)}Vr(o,t.defId?t.schema:t.def??t.schema);const s=(u=e.metadataRegistry.get(n))==null?void 0:u.id;s!==void 0&&o.id===s&&delete o.id;const i=((d=e.external)==null?void 0:d.defs)??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const l of e.seen.entries()){const f=l[1];f.def&&f.defId&&(f.def.id===f.defId&&delete f.def.id,Zn(i,f.defId,f.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const l=JSON.parse(JSON.stringify(o));return Object.defineProperty(l,"~standard",{value:{...n["~standard"],jsonSchema:{input:Yo(n,"input",e.processors),output:Yo(n,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function tt(e,n){const t=n??{seen:new Set};if(t.seen.has(e))return!1;t.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return tt(r.element,t);if(r.type==="set")return tt(r.valueType,t);if(r.type==="lazy")return tt(r.getter(),t);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return tt(r.innerType,t);if(r.type==="intersection")return tt(r.left,t)||tt(r.right,t);if(r.type==="record"||r.type==="map")return tt(r.keyType,t)||tt(r.valueType,t);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:tt(r.in,t)||tt(r.out,t);if(r.type==="object"){for(const o in r.shape)if(tt(r.shape[o],t))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(tt(o,t))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(tt(o,t))return!0;return!!(r.rest&&tt(r.rest,t))}return!1}const RS=(e,n={})=>t=>{const r=gh({...t,processors:n});return Je(e,r),vh(r,e),wh(r,e)},Yo=(e,n,t={})=>r=>{const{libraryOptions:o,target:s}=r??{},i=gh({...o??{},target:s,io:n,processors:t});return Je(e,i),vh(i,e),wh(i,e)},br=(e,n,t)=>{(e[n]===void 0||t>e[n])&&(e[n]=t)},wr=(e,n,t)=>{(e[n]===void 0||t<e[n])&&(e[n]=t)},ul=(e,n)=>{br(e,"minimum",n),wr(e,"maximum",n)},_h=(e,n)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(n)||e.multipleOf.push(n)},xh=(e,n)=>{e.patterns??(e.patterns=new Set),e.patterns.add(n)},Sh=(e,n)=>{e.mime=e.mime?e.mime.filter(t=>n.includes(t)):[...n]},Eh=(e,n)=>{e.format=n,n.includes("int")&&(e.isInt=!0)},dl=(e,n)=>br(e,"minimum",n.minimum),fl=(e,n)=>wr(e,"maximum",n.maximum),hl=e=>(n,t)=>{Eh(n,t.format);const[r,o]=e[t.format];br(n,"minimum",r),wr(n,"maximum",o)},zs={greater_than:(e,n)=>br(e,n.inclusive?"minimum":"exclusiveMinimum",n.value),less_than:(e,n)=>wr(e,n.inclusive?"maximum":"exclusiveMaximum",n.value),multiple_of:(e,n)=>_h(e,n.value),number_format:hl(Y0),bigint_format:hl(X0),min_length:dl,max_length:fl,length_equals:(e,n)=>ul(e,n.length),min_size:dl,max_size:fl,size_equals:(e,n)=>ul(e,n.size),string_format:(e,n)=>{Eh(e,n.format),n.pattern&&xh(e,n.pattern),(n.format==="base64"||n.format==="base64url")&&(e.contentEncoding=n.format),(n.local||n.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,n)=>Sh(e,n.mime)};function Ur(e){var s;const n={},t=e._zod.def,r=e._zod.traits.has("$ZodCheck")?[e,...t.checks??[]]:t.checks??[];for(const i of r)(s=zs[i._zod.def.check])==null||s.call(zs,n,i._zod.def);const o=e._zod.bag;o.minimum!==void 0&&br(n,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&br(n,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&wr(n,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&wr(n,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&_h(n,o.multipleOf),o.format!==void 0&&(n.format??(n.format=o.format),o.format.includes("int")&&(n.isInt=!0)),o.mime&&Sh(n,o.mime);for(const i of o.patterns??[])xh(n,i);return n}const TS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},IS=new Map([[ch,tx],[za,nx]]),AS=e=>IS.get(e)??e,DS=(e,n,t,r)=>{const o=t;o.type="string";const{minimum:s,maximum:i,format:a,patterns:c,contentEncoding:u,laxFormat:d}=Ur(e);if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),a&&(o.format=TS[a]??a,o.format===""&&delete o.format,(a==="time"||d)&&delete o.format),u&&(o.contentEncoding=u),c&&c.size>0){const l=[...c].map(AS);l.length===1?o.pattern=l[0].source:l.length>1&&(o.allOf=[...l.map(f=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},NS=(e,n,t,r)=>{t.type="boolean"},jS=(e,n,t,r)=>{t.not={}},MS=(e,n,t,r)=>{},$S=(e,n,t,r)=>{const o=e._zod.def,s=Oi(o.entries);if(s.length===0){t.not={};return}s.every(i=>typeof i=="number")&&(t.type="number"),s.every(i=>typeof i=="string")&&(t.type="string"),t.enum=s},zS=(e,n,t,r)=>{co(e,n,t,r,"Custom types cannot be represented in JSON Schema")},FS=(e,n,t,r)=>{co(e,n,t,r,"Transforms cannot be represented in JSON Schema")},LS=(e,n,t,r)=>{const o=t,s=e._zod.def,{minimum:i,maximum:a}=Ur(e);typeof i=="number"&&(o.minItems=i),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=Je(s.element,n,{...r,path:[...r.path,"items"]})};function Ni(e){const n=e._zod.def;return n.type==="pipe"&&n.in._zod.traits.has("$ZodTransform")?Ni(n.out):n.type==="catch"?Ni(n.innerType):e._zod.optin}const VS=(e,n,t,r)=>{var u;const o=t,s=e._zod.def,i=s.shape;if(Object.getOwnPropertySymbols(i).length&&co(e,n,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const d in i)Zn(o.properties,d,Je(i[d],n,{...r,path:[...r.path,"properties",d]}));const c=[];for(const d of Object.keys(i)){const l=s.shape[d];(n.io==="input"?Ni(l)===void 0:l._zod.optout===void 0)&&c.push(d)}c.length>0&&(o.required=c),((u=s.catchall)==null?void 0:u._zod.def.type)==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=Je(s.catchall,n,{...r,path:[...r.path,"additionalProperties"]})):n.io==="output"&&(o.additionalProperties=!1)},US=(e,n,t,r)=>{const o=e._zod.def,s=o.inclusive===!1,i=o.options.map((a,c)=>Je(a,n,{...r,path:[...r.path,s?"oneOf":"anyOf",c]}));s?t.oneOf=i:t.anyOf=i},ZS=(e,n,t,r)=>{const o=e._zod.def,s=Je(o.left,n,{...r,path:[...r.path,"allOf",0]}),i=Je(o.right,n,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(s)?s.allOf:[s],...a(i)?i.allOf:[i]];t.allOf=c,n.intersections.push(c)},BS=(e,n,t,r)=>{const o=e._zod.def,s=Je(o.innerType,n,r),i=n.seen.get(e);n.target==="openapi-3.0"?(i.ref=o.innerType,t.nullable=!0):t.anyOf=[s,{type:"null"}]},KS=(e,n,t,r)=>{const o=e._zod.def;Je(o.innerType,n,r);const s=n.seen.get(e);s.ref=o.innerType},Fa=Symbol();function Ch(e,n,t,r,o){let s=!1;const i=JSON.stringify(e,(a,c)=>typeof c!="bigint"?c:(s=!0,null));return s?(co(n,t,r,o,"BigInt defaults cannot be represented in JSON Schema"),Fa):JSON.parse(i)}const WS=(e,n,t,r)=>{const o=e._zod.def;Je(o.innerType,n,r);const s=n.seen.get(e);s.ref=o.innerType;const i=Ch(o.defaultValue,e,n,t,r);i!==Fa&&(t.default=i)},HS=(e,n,t,r)=>{const o=e._zod.def;Je(o.innerType,n,r);const s=n.seen.get(e);if(s.ref=o.innerType,n.io!=="input")return;const i=Ch(o.defaultValue,e,n,t,r);i!==Fa&&(t._prefault=i)},GS=(e,n,t,r)=>{const o=e._zod.def;Je(o.innerType,n,r);const s=n.seen.get(e);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{co(e,n,t,r,"Dynamic catch values are not supported in JSON Schema");return}t.default=i},qS=(e,n,t,r)=>{const o=e._zod.def,s=o.in._zod.traits.has("$ZodTransform"),i=n.io==="input"?s?o.out:o.in:o.out;Je(i,n,r);const a=n.seen.get(e);a.ref=i},QS=(e,n,t,r)=>{const o=e._zod.def;Je(o.innerType,n,r);const s=n.seen.get(e);s.ref=o.innerType,t.readOnly=!0},kh=(e,n,t,r)=>{const o=e._zod.def;Je(o.innerType,n,r);const s=n.seen.get(e);s.ref=o.innerType},pl=new WeakSet([Object.prototype,Error.prototype]);function Ro(e,n,t){Object.defineProperty(e,n,{configurable:!0,enumerable:!1,get(){const r=t(this);return Object.defineProperty(this,n,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,n,{value:r,configurable:!0,writable:!0})}})}const JS=(e,n)=>{x_.init(e,n),e.name="ZodError";const t=Object.getPrototypeOf(e);pl.has(t)||(pl.add(t),Ro(t,"format",r=>o=>C_(r,o)),Ro(t,"flatten",r=>o=>E_(r,o)),Ro(t,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,Ri,2)}),Ro(t,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,Ri,2)}),Object.defineProperty(t,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},St=j("ZodError",JS,void 0,{Parent:Error}),YS=Aa(St),XS=Da(St),eE=Na(St),tE=ja(St),nE=I_(St),rE=A_(St),oE=D_(St),sE=N_(St),iE=j_(St),aE=M_(St),cE=$_(St),lE=z_(St);function uE(){Vt.localeError||En(A1())}function La(){Vt.memoizer||En({memoizer:R1()})}const Le=j("ZodType",(e,n)=>(uE(),Fe.init(e,n),e.def=n,e.type=n.type,e),{check(...e){const n=this.def;return this.clone(mt(n,{checks:[...n.checks??[],...e.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,n){return Sn(this,e,n)},brand(){return this},register(e,n){return e.add(this,n),this},refine(e,n){return this.check(aC(e,n))},superRefine(e,n){return this.check(cC(e,n))},overwrite(e){return this.check(Pr(e))},optional(){return vl(this)},exactOptional(){return qE(this)},nullable(){return yl(this)},nullish(){return vl(yl(this))},nonoptional(e){return tC(this,e)},array(){return FE(this)},or(e){return ZE([this,e])},and(e){return KE(this,e)},transform(e){return bl(this,GE(e))},default(e){return YE(this,e)},prefault(e){return eC(this,e)},catch(e){return rC(this,e)},pipe(e){return bl(this,e)},readonly(){return iC(this)},describe(e){const n=this.clone();return zr.add(n,{description:e}),n},meta(...e){if(e.length===0)return zr.get(this);const n=this.clone();return zr.add(n,e[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...n){return n.length===0?e(this):e(this,...n)},get"~standard"(){return Ia(this,"~standard",{...rh(this),jsonSchema:{input:Yo(this,"input"),output:Yo(this,"output")}})},set"~standard"(e){xn(this,"~standard",e)},parse:function e(n,t){return YS(this,n,t,{callee:e})},parseAsync:async function e(n,t){return await XS(this,n,t,{callee:e})},safeParse(e,n){return eE(this,e,n)},async safeParseAsync(e,n){return tE(this,e,n)},get spa(){return this==null?void 0:this.safeParseAsync},set spa(e){xn(this,"spa",e)},validate(e,n){return O_(this,e,n)},validateAsync(e,n){return T_(this,e,n)},encode:function e(n,t){return nE(this,n,t,{callee:e})},decode:function e(n,t){return rE(this,n,t,{callee:e})},encodeAsync:async function e(n,t){return await oE(this,n,t,{callee:e})},decodeAsync:async function e(n,t){return await sE(this,n,t,{callee:e})},safeEncode(e,n){return iE(this,e,n)},safeDecode(e,n){return aE(this,e,n)},async safeEncodeAsync(e,n){return cE(this,e,n)},async safeDecodeAsync(e,n){return lE(this,e,n)},toJSONSchema(e){return RS(this,{})(e)},get description(){var e;return(e=zr.get(this))==null?void 0:e.description},get _def(){return this._zod.def}}),Ph=j("_ZodString",(e,n)=>{$a.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>DS(e,t,r)},u_({format:e=>Ur(e).format??null,minLength:e=>Ur(e).minimum??null,maxLength:e=>Ur(e).maximum??null},{regex(...e){return this.check(fS(...e))},includes(...e){return this.check(mS(...e))},startsWith(...e){return this.check(gS(...e))},endsWith(...e){return this.check(vS(...e))},min(...e){return this.check(Jo(...e))},max(...e){return this.check(ph(...e))},length(...e){return this.check(mh(...e))},nonempty(...e){return this.check(Jo(1,...e))},lowercase(e){return this.check(hS(e))},uppercase(e){return this.check(pS(e))},trim(){return this.check(wS())},normalize(...e){return this.check(bS(...e))},toLowerCase(){return this.check(_S())},toUpperCase(){return this.check(xS())},slugify(){return this.check(SS())}})),dE=j("ZodString",(e,n)=>{$a.init(e,n),Ph.init(e,n)},{email(e){return this.check($1(gE,e))},url(e){return this.check(Z1(yE,e))},jwt(e){return this.check(oS(DE,e))},emoji(e){return this.check(B1(bE,e))},guid(e){return this.check(z1(vE,e))},uuid(e){return this.check(F1(To,e))},uuidv4(e){return this.check(L1(To,e))},uuidv6(e){return this.check(V1(To,e))},uuidv7(e){return this.check(U1(To,e))},nanoid(e){return this.check(K1(wE,e))},cuid(e){return this.check(W1(_E,e))},cuid2(e){return this.check(H1(xE,e))},ulid(e){return this.check(G1(SE,e))},base64(e){return this.check(tS(TE,e))},base64url(e){return this.check(nS(IE,e))},xid(e){return this.check(q1(EE,e))},ksuid(e){return this.check(Q1(CE,e))},ipv4(e){return this.check(J1(kE,e))},ipv6(e){return this.check(Y1(PE,e))},cidrv4(e){return this.check(X1(OE,e))},cidrv6(e){return this.check(eS(RE,e))},e164(e){return this.check(rS(AE,e))},datetime(e){return this.check(sS(fE,e))},date(e){return this.check(iS(hE,e))},time(e){return this.check(aS(pE,e))},duration(e){return this.check(cS(mE,e))}});function ml(e){return M1(dE,e)}const De=j("ZodStringFormat",(e,n)=>{Te.init(e,n),Ph.init(e,n)}),fE=j("ZodISODateTime",(e,n)=>{Zx.init(e,n),De.init(e,n)}),hE=j("ZodISODate",(e,n)=>{Bx.init(e,n),De.init(e,n)}),pE=j("ZodISOTime",(e,n)=>{Kx.init(e,n),De.init(e,n)}),mE=j("ZodISODuration",(e,n)=>{Wx.init(e,n),De.init(e,n)}),gE=j("ZodEmail",(e,n)=>{Rx.init(e,n),De.init(e,n)}),vE=j("ZodGUID",(e,n)=>{Px.init(e,n),De.init(e,n)}),To=j("ZodUUID",(e,n)=>{Ox.init(e,n),De.init(e,n)}),yE=j("ZodURL",(e,n)=>{jx.init(e,n),De.init(e,n)}),bE=j("ZodEmoji",(e,n)=>{Mx.init(e,n),De.init(e,n)}),wE=j("ZodNanoID",(e,n)=>{$x.init(e,n),De.init(e,n)}),_E=j("ZodCUID",(e,n)=>{zx.init(e,n),De.init(e,n)}),xE=j("ZodCUID2",(e,n)=>{Fx.init(e,n),De.init(e,n)}),SE=j("ZodULID",(e,n)=>{Lx.init(e,n),De.init(e,n)}),EE=j("ZodXID",(e,n)=>{Vx.init(e,n),De.init(e,n)}),CE=j("ZodKSUID",(e,n)=>{Ux.init(e,n),De.init(e,n)}),kE=j("ZodIPv4",(e,n)=>{Hx.init(e,n),De.init(e,n)}),PE=j("ZodIPv6",(e,n)=>{qx.init(e,n),De.init(e,n)}),OE=j("ZodCIDRv4",(e,n)=>{Qx.init(e,n),De.init(e,n)}),RE=j("ZodCIDRv6",(e,n)=>{Yx.init(e,n),De.init(e,n)}),TE=j("ZodBase64",(e,n)=>{Xx.init(e,n),De.init(e,n)}),IE=j("ZodBase64URL",(e,n)=>{t1.init(e,n),De.init(e,n)}),AE=j("ZodE164",(e,n)=>{n1.init(e,n),De.init(e,n)}),DE=j("ZodJWT",(e,n)=>{o1.init(e,n),De.init(e,n)}),NE=j("ZodBoolean",(e,n)=>{s1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>NS(e,t,r)});function a2(e){return lS(NE,e)}const jE=j("ZodUnknown",(e,n)=>{i1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>MS()});function gl(){return uS(jE)}const ME=j("ZodNever",(e,n)=>{a1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>jS(e,t,r)});function $E(e){return dS(ME,e)}const zE=j("ZodArray",(e,n)=>{La(),c1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>LS(e,t,r,o),e.element=n.element},{min(e,n){return this.check(Jo(e,n))},nonempty(e){return this.check(Jo(1,e))},max(e,n){return this.check(ph(e,n))},length(e,n){return this.check(mh(e,n))},unwrap(){return this.element}});function FE(e,n){return ES(zE,e,n)}const LE=j("ZodObject",(e,n)=>{La(),d1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>VS(e,t,r,o),p_(e,"shape",t=>t._zod.def.shape,!1)},{keyof(){return WE(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(mt(this._zod.def,{catchall:e}))},passthrough(){return this.clone(mt(this._zod.def,{catchall:gl()}))},loose(){return this.clone(mt(this._zod.def,{catchall:gl()}))},strict(){return this.clone(mt(this._zod.def,{catchall:$E()}))},strip(){return this.clone(mt(this._zod.def,{catchall:void 0}))},extend(e){return n_(this,e)},safeExtend(e){return r_(this,e)},merge(e){return o_(this,e)},pick(e){return e_(this,e)},omit(e){return t_(this,e)},partial(...e){return Uc(Oh,this,e[0])},exactPartial(...e){return Uc(Rh,this,e[0],"exactPartial")},required(...e){return s_(Th,this,e[0])}});function VE(e,n){const t={type:"object",shape:e??{},...re(n)};return new LE(t)}const UE=j("ZodUnion",(e,n)=>{f1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>US(e,t,r,o),e.options=n.options});function ZE(e,n){return new UE({type:"union",options:e,...re(n)})}const BE=j("ZodIntersection",(e,n)=>{h1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>ZS(e,t,r,o)});function KE(e,n){return new BE({type:"intersection",left:e,right:n})}const ji=j("ZodEnum",(e,n)=>{p1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(r,o,s)=>$S(e,r,o),e.enum=n.entries,e.options=[...e._zod.values];const t=new Set(Object.keys(n.entries));e.extract=(r,o)=>{const s={};for(const i of r)if(t.has(i))s[i]=n.entries[i];else throw new Error(`Key ${i} not found in enum`);return new ji({...n,checks:[],...re(o),entries:s})},e.exclude=(r,o)=>{const s={...n.entries};for(const i of r)if(t.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new ji({...n,checks:[],...re(o),entries:s})}});function WE(e,n){const t=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new ji({type:"enum",entries:t,...re(n)})}const HE=j("ZodTransform",(e,n)=>{La(),m1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>FS(e,t,r,o),e._zod.parse=(t,r)=>{if(r.direction==="backward")throw new Xf(e.constructor.name);t.addIssue=s=>{if(typeof s=="string")t.issues.push(qr(s,t.value,n));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=t.value),i.inst??(i.inst=e),t.issues.push(qr(i))}};const o=n.transform(t.value,t);return o instanceof Promise?o.then(s=>(t.value=s,t)):(t.value=o,t)}});function GE(e){return new HE({type:"transform",transform:e})}const Oh=j("ZodOptional",(e,n)=>{dh.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>kh(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function vl(e){return new Oh({type:"optional",innerType:e})}const Rh=j("ZodExactOptional",(e,n)=>{g1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>kh(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function qE(e){return new Rh({type:"optional",innerType:e})}const QE=j("ZodNullable",(e,n)=>{v1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>BS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function yl(e){return new QE({type:"nullable",innerType:e})}const JE=j("ZodDefault",(e,n)=>{y1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>WS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function YE(e,n){return new JE({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Qf(n)}})}const XE=j("ZodPrefault",(e,n)=>{b1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>HS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function eC(e,n){return new XE({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Qf(n)}})}const Th=j("ZodNonOptional",(e,n)=>{w1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>KS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function tC(e,n){return new Th({type:"nonoptional",innerType:e,...re(n)})}const nC=j("ZodCatch",(e,n)=>{_1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>GS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function rC(e,n){return new nC({type:"catch",innerType:e,catchValue:typeof n=="function"?n:g_(n)})}const oC=j("ZodPipe",(e,n)=>{x1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>qS(e,t,r,o),e.in=n.in,e.out=n.out});function bl(e,n){return new oC({type:"pipe",in:e,out:n})}const sC=j("ZodReadonly",(e,n)=>{S1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>QS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function iC(e){return new sC({type:"readonly",innerType:e})}const Ih=j("ZodCustom",(e,n)=>{E1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>zS(e,t,r,o)});function aC(e,n={}){return CS(Ih,e,n)}function cC(e,n){return kS(e,n)}const lC=j("ZodInstanceOf",(e,n)=>{Ih.init(e,n)},{properties(e,n){return this.check(yS(e,n))}});function c2(e,n={}){const t=new lC({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...re(n)});return t._zod.bag.Class=e,t._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:t,path:[...t._zod.def.path??[]]})},t}var uC=Object.defineProperty,dC=(e,n)=>uC(e,"name",{value:n,configurable:!0}),fC=h.forwardRef(dC(function(n,t){return g.jsx(Me.label,{...n,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=n.onMouseDown)==null||s.call(n,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}})},"Label")),Ah=fC;const hC=no("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Mi=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te(hC(),r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(Ah,{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Mi.displayName=Ah.displayName;function Fs(e){const n=J.c(10),{id:t,message:r,className:o,assertive:s}=e;let i;n[0]!==s?(i=s?{role:"alert"}:{"aria-live":"polite"},n[0]=s,n[1]=i):i=n[1];const a=!r&&"absolute";let c;n[2]!==o||n[3]!==a?(c=te("text-sm text-destructive",a,o),n[2]=o,n[3]=a,n[4]=c):c=n[4];const u=r??"";let d;return n[5]!==t||n[6]!==i||n[7]!==c||n[8]!==u?(d=g.jsx("p",{id:t,...i,className:c,children:u}),n[5]=t,n[6]=i,n[7]=c,n[8]=u,n[9]=d):d=n[9],d}const pC=no("rounded-lg bg-card text-card-foreground",{variants:{level:{0:"",1:"shadow-card-1",2:"shadow-card-2",3:"shadow-card-3",4:"shadow-card-4"}},defaultVariants:{level:2}}),Dh=h.forwardRef((e,n)=>{const t=J.c(11);let r,o,s;t[0]!==e?({className:r,level:o,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);let i;t[4]!==r||t[5]!==o?(i=te(pC({level:o}),r),t[4]=r,t[5]=o,t[6]=i):i=t[6];let a;return t[7]!==s||t[8]!==n||t[9]!==i?(a=g.jsx("div",{ref:n,className:i,...s}),t[7]=s,t[8]=n,t[9]=i,t[10]=a):a=t[10],a});Dh.displayName="Card";const Nh=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("flex flex-col space-y-1.5 p-6",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Nh.displayName="CardHeader";const jh=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("text-2xl font-semibold leading-none tracking-tight",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});jh.displayName="CardTitle";const Mh=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("text-sm text-muted-foreground",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Mh.displayName="CardDescription";const $h=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("p-6 pt-0",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});$h.displayName="CardContent";const mC=h.forwardRef((e,n)=>{const t=J.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=te("flex items-center p-6 pt-0",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});mC.displayName="CardFooter";const gC=VE({email:ml().email("Enter a valid email"),password:ml().min(8,"Password must be at least 8 characters")});function vC(){var _e,Ie,de,xe;const e=J.c(54),n=Al(),{resolvedTheme:t}=Xo(),r=t==="dark"?"/logo-dark.svg":"/logo.svg";let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:va.authStatus,queryFn:Qw,staleTime:1/0},e[0]=o):o=e[0];const s=Wi(o),i=Li();let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={resolver:Z0(gC)},e[1]=a):a=e[1];const{register:c,handleSubmit:u,setError:d,formState:l}=F0(a),{errors:f,isSubmitting:p}=l;let m;e[2]!==n||e[3]!==i||e[4]!==d?(m=async function(st){try{const{status:dt}=await Of.post("/api/v1/auth/login",{email:st.email,password:st.password});if(dt!==200){d("root",{message:"Invalid email or password"});return}i.clear(),n("/app-center",{replace:!0})}catch{d("root",{message:"Network error. Please try again."})}},e[2]=n,e[3]=i,e[4]=d,e[5]=m):m=e[5];const v=m;if(((_e=s.data)==null?void 0:_e.initialized)===!1){let Ze;return e[6]===Symbol.for("react.memo_cache_sentinel")?(Ze=g.jsx(zi,{to:"/setup",replace:!0}),e[6]=Ze):Ze=e[6],Ze}let y;e[7]!==r?(y=g.jsx("img",{src:r,alt:"tapflow",className:"w-6 h-6"}),e[7]=r,e[8]=y):y=e[8];let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=g.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"}),e[9]=b):b=e[9];let _;e[10]!==y?(_=g.jsxs("div",{className:"flex items-center gap-2",children:[y,b]}),e[10]=y,e[11]=_):_=e[11];let k;e[12]===Symbol.for("react.memo_cache_sentinel")?(k=g.jsxs(Nh,{className:"text-center",children:[g.jsx(jh,{className:"text-2xl tracking-display-md",children:"Welcome back"}),g.jsx(Mh,{children:"Sign in to your team workspace"})]}),e[12]=k):k=e[12];let S;e[13]!==u||e[14]!==v?(S=u(v),e[13]=u,e[14]=v,e[15]=S):S=e[15];let E;e[16]===Symbol.for("react.memo_cache_sentinel")?(E=g.jsx(Mi,{htmlFor:"email",children:"Email"}),e[16]=E):E=e[16];const O=!!f.email,I=f.email?"email-error":void 0;let A;e[17]!==c?(A=c("email"),e[17]=c,e[18]=A):A=e[18];let R;e[19]!==O||e[20]!==I||e[21]!==A?(R=g.jsx(Uo,{id:"email",type:"email",placeholder:"you@company.com",autoComplete:"email","aria-required":"true","aria-invalid":O,"aria-describedby":I,...A}),e[19]=O,e[20]=I,e[21]=A,e[22]=R):R=e[22];const $=(Ie=f.email)==null?void 0:Ie.message;let F;e[23]!==$?(F=g.jsx(Fs,{id:"email-error",message:$}),e[23]=$,e[24]=F):F=e[24];let M;e[25]!==R||e[26]!==F?(M=g.jsxs("div",{className:"grid gap-2",children:[E,R,F]}),e[25]=R,e[26]=F,e[27]=M):M=e[27];let V;e[28]===Symbol.for("react.memo_cache_sentinel")?(V=g.jsx(Mi,{htmlFor:"password",children:"Password"}),e[28]=V):V=e[28];const K=!!f.password,Y=f.password?"password-error":void 0;let W;e[29]!==c?(W=c("password"),e[29]=c,e[30]=W):W=e[30];let Q;e[31]!==K||e[32]!==Y||e[33]!==W?(Q=g.jsx(Uo,{id:"password",type:"password",autoComplete:"current-password","aria-required":"true","aria-invalid":K,"aria-describedby":Y,...W}),e[31]=K,e[32]=Y,e[33]=W,e[34]=Q):Q=e[34];const he=(de=f.password)==null?void 0:de.message;let ne;e[35]!==he?(ne=g.jsx(Fs,{id:"password-error",message:he}),e[35]=he,e[36]=ne):ne=e[36];let G;e[37]!==Q||e[38]!==ne?(G=g.jsxs("div",{className:"grid gap-2",children:[V,Q,ne]}),e[37]=Q,e[38]=ne,e[39]=G):G=e[39];const se=(xe=f.root)==null?void 0:xe.message;let le;e[40]!==se?(le=g.jsx(Fs,{assertive:!0,id:"login-error",message:se}),e[40]=se,e[41]=le):le=e[41];const Se=p?"Signing in…":"Sign in";let X;e[42]!==p||e[43]!==Se?(X=g.jsx(es,{type:"submit",size:"lg",disabled:p,className:"w-full mt-1",children:Se}),e[42]=p,e[43]=Se,e[44]=X):X=e[44];let ce;e[45]!==M||e[46]!==G||e[47]!==le||e[48]!==X||e[49]!==S?(ce=g.jsxs(Dh,{level:4,className:"w-full",children:[k,g.jsx($h,{children:g.jsxs("form",{onSubmit:S,className:"flex flex-col gap-4",children:[M,G,le,X]})})]}),e[45]=M,e[46]=G,e[47]=le,e[48]=X,e[49]=S,e[50]=ce):ce=e[50];let pe;return e[51]!==ce||e[52]!==_?(pe=g.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:g.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-sm",children:[_,ce]})}),e[51]=ce,e[52]=_,e[53]=pe):pe=e[53],pe}function yC(){return new jp({defaultOptions:{queries:{retry:0,refetchOnWindowFocus:!0,networkMode:"always"}}})}const bC=h.lazy(()=>Ut(()=>import("./Setup-DmUGFblg.js"),__vite__mapDeps([0,1,2])).then(e=>({default:e.Setup}))),wC=h.lazy(()=>Ut(()=>import("./Invite-29Erwv8j.js"),__vite__mapDeps([3,1,2,4])).then(e=>({default:e.Invite}))),_C=h.lazy(()=>Ut(()=>import("./ResetPassword-BnPIwTYH.js"),__vite__mapDeps([5,1,2])).then(e=>({default:e.ResetPassword}))),xC=h.lazy(()=>Ut(()=>import("./AppCenter-DZCsC2wa.js"),__vite__mapDeps([6,1,7,8,9,10,11,12,2])).then(e=>({default:e.AppCenter}))),SC=h.lazy(()=>Ut(()=>import("./QASession-D-n6PXuD.js"),__vite__mapDeps([13,1,14,2,11,8,7,15,10])).then(e=>({default:e.QASession}))),EC=h.lazy(()=>Ut(()=>import("./MacResources-B0DQ9ISE.js"),__vite__mapDeps([16,1,14,17,2])).then(e=>({default:e.MacResources}))),CC=h.lazy(()=>Ut(()=>import("./Default-xD9Fmd5X.js"),__vite__mapDeps([18,1,10,11,4,2])).then(e=>({default:e.DefaultSettings}))),kC=h.lazy(()=>Ut(()=>import("./Team-BpvRgFfZ.js"),__vite__mapDeps([19,1,8,11,20,15,12,2])).then(e=>({default:e.TeamSettings}))),PC=h.lazy(()=>Ut(()=>import("./Tokens-x6BtCcL7.js"),__vite__mapDeps([21,1,10,11,8,20,15,12,9,2])).then(e=>({default:e.TokenSettings}))),OC=h.lazy(()=>Ut(()=>import("./NotFound-wHOnT2Fl.js"),__vite__mapDeps([22,1])).then(e=>({default:e.NotFound}))),RC=g.jsx("div",{className:"flex h-screen w-full items-center justify-center text-sm text-muted-foreground",children:"Loading…"}),Io=e=>g.jsx(h.Suspense,{fallback:RC,children:e}),TC=yC();function IC(){const e=J.c(15),{resolvedTheme:n}=Xo();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=g.jsx(ft,{path:"/login",element:g.jsx(vC,{})}),e[0]=t):t=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=g.jsx(ft,{path:"/setup",element:Io(g.jsx(bC,{}))}),e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(ft,{path:"/invite",element:Io(g.jsx(wC,{}))}),e[2]=o):o=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=g.jsx(ft,{path:"/reset-password",element:Io(g.jsx(_C,{}))}),e[3]=s):s=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsx(p0,{}),e[4]=i):i=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(ft,{index:!0,element:g.jsx(zi,{to:"/app-center",replace:!0})}),e[5]=a):a=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=g.jsx(ft,{path:"/app-center",element:g.jsx(xC,{})}),e[6]=c):c=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(ft,{path:"/app-center/build",element:g.jsx(SC,{})}),e[7]=u):u=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(ft,{path:"/mac-resources",element:g.jsx(EC,{})}),e[8]=d):d=e[8];let l;e[9]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsx(ft,{path:"/settings/default",element:g.jsx(CC,{})}),e[9]=l):l=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=g.jsx(ft,{path:"/settings/team",element:g.jsx(kC,{})}),e[10]=f):f=e[10];let p;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=g.jsxs(ft,{element:i,children:[a,c,u,d,l,f,g.jsx(ft,{path:"/settings/tokens",element:g.jsx(PC,{})})]}),e[11]=p):p=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=g.jsxs(Qh,{children:[t,r,o,s,p,g.jsx(ft,{path:"*",element:Io(g.jsx(OC,{}))})]}),e[12]=m):m=e[12];const v=n;let y;return e[13]!==v?(y=g.jsx(lp,{client:TC,children:g.jsxs(Jh,{children:[m,g.jsx(_m,{position:"bottom-right",richColors:!0,theme:v})]})}),e[13]=v,e[14]=y):y=e[14],y}Gh.createRoot(document.getElementById("root")).render(g.jsx(h.StrictMode,{children:g.jsx(tp,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,children:g.jsx(IC,{})})}));export{ia as $,_d as A,es as B,Dh as C,Xv as D,Ad as E,Fs as F,Hy as G,qy as H,Uo as I,c2 as J,r0 as K,Mi as L,Km as M,a2 as N,Ng as O,Xi as P,r2 as Q,ta as R,Zo as S,Gy as T,o0 as U,ky as V,te as W,Qm as X,oe as Y,e2 as Z,WE as _,$h as a,nn as a0,$C as a1,ut as a2,os as a3,Qd as a4,Yt as a5,no as a6,YC as a7,Qw as a8,o2 as a9,Xt as aA,Re as aB,oo as aC,ca as aD,ts as aE,F0 as aF,wn as aG,lt as aH,Wi as aI,Li as aJ,pd as aK,w0 as aL,BC as aM,JC as aN,Xo as aO,XC as aa,HC as ab,Ap as ac,qC as ad,GC as ae,QC as af,Yw as ag,WC as ah,KC as ai,s2 as aj,Zr as ak,ed as al,jC as am,at as an,Qe as ao,VE as ap,va as aq,n2 as ar,bs as as,Fl as at,ml as au,MC as av,Z0 as aw,t2 as ax,Rf as ay,f0 as az,Mh as b,Nh as c,jh as d,Fm as e,Lm as f,xd as g,i2 as h,uy as i,sd as j,cd as k,od as l,ny as m,ad as n,zC as o,Qi as p,ju as q,Xw as r,Nb as s,Zm as t,rn as u,Me as v,Db as w,wd as x,xr as y,to as z};
|