@tapflowio/relay 0.23.0 → 0.24.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.
Files changed (171) hide show
  1. package/dist/RelayServer.d.ts.map +1 -1
  2. package/dist/RelayServer.js +18 -8
  3. package/dist/RelayServer.js.map +1 -1
  4. package/dist/api/auth.d.ts +1 -1
  5. package/dist/api/auth.d.ts.map +1 -1
  6. package/dist/api/auth.js +11 -3
  7. package/dist/api/auth.js.map +1 -1
  8. package/dist/api/builds.d.ts +1 -1
  9. package/dist/api/builds.d.ts.map +1 -1
  10. package/dist/api/builds.js +8 -2
  11. package/dist/api/builds.js.map +1 -1
  12. package/dist/index.d.ts +3 -1
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +2 -1
  15. package/dist/index.js.map +1 -1
  16. package/dist/lib/buildFiles.d.ts +23 -0
  17. package/dist/lib/buildFiles.d.ts.map +1 -0
  18. package/dist/lib/buildFiles.js +39 -0
  19. package/dist/lib/buildFiles.js.map +1 -0
  20. package/dist/lib/config.d.ts +26 -1
  21. package/dist/lib/config.d.ts.map +1 -1
  22. package/dist/lib/config.js +81 -17
  23. package/dist/lib/config.js.map +1 -1
  24. package/dist/lib/dataDir.d.ts +48 -1
  25. package/dist/lib/dataDir.d.ts.map +1 -1
  26. package/dist/lib/dataDir.js +108 -12
  27. package/dist/lib/dataDir.js.map +1 -1
  28. package/dist/middleware/auth.js +3 -3
  29. package/dist/middleware/auth.js.map +1 -1
  30. package/dist/server.js +2 -1
  31. package/dist/server.js.map +1 -1
  32. package/package.json +4 -4
  33. package/public/assets/AppCenter-BHz6vh5p.js +26 -0
  34. package/public/assets/AppCenter-BHz6vh5p.js.br +0 -0
  35. package/public/assets/AppCenter-BHz6vh5p.js.gz +0 -0
  36. package/public/assets/Default-bCqU0Qz9.js +1 -0
  37. package/public/assets/Default-bCqU0Qz9.js.br +0 -0
  38. package/public/assets/Default-bCqU0Qz9.js.gz +0 -0
  39. package/public/assets/Invite-EVMTsuNz.js +1 -0
  40. package/public/assets/Invite-EVMTsuNz.js.br +0 -0
  41. package/public/assets/Invite-EVMTsuNz.js.gz +0 -0
  42. package/public/assets/MacResources-fCn40Tf5.js +1 -0
  43. package/public/assets/MacResources-fCn40Tf5.js.br +0 -0
  44. package/public/assets/MacResources-fCn40Tf5.js.gz +0 -0
  45. package/public/assets/NotFound-wHOnT2Fl.js +1 -0
  46. package/public/assets/NotFound-wHOnT2Fl.js.br +0 -0
  47. package/public/assets/NotFound-wHOnT2Fl.js.gz +0 -0
  48. package/public/assets/QASession-CL-eyFxG.js +150 -0
  49. package/public/assets/QASession-CL-eyFxG.js.br +0 -0
  50. package/public/assets/QASession-CL-eyFxG.js.gz +0 -0
  51. package/public/assets/ResetPassword-D-SFg4ap.js +1 -0
  52. package/public/assets/ResetPassword-D-SFg4ap.js.br +0 -0
  53. package/public/assets/ResetPassword-D-SFg4ap.js.gz +0 -0
  54. package/public/assets/Setup-ULjvIfAi.js +1 -0
  55. package/public/assets/Setup-ULjvIfAi.js.br +0 -0
  56. package/public/assets/Setup-ULjvIfAi.js.gz +0 -0
  57. package/public/assets/Team-DH91GD4w.js +6 -0
  58. package/public/assets/Team-DH91GD4w.js.br +0 -0
  59. package/public/assets/Team-DH91GD4w.js.gz +0 -0
  60. package/public/assets/Tokens-DImLpOVZ.js +1 -0
  61. package/public/assets/Tokens-DImLpOVZ.js.br +0 -0
  62. package/public/assets/Tokens-DImLpOVZ.js.gz +0 -0
  63. package/public/assets/alert-dialog-CwcUyDZQ.js +1 -0
  64. package/public/assets/alert-dialog-CwcUyDZQ.js.br +0 -0
  65. package/public/assets/alert-dialog-CwcUyDZQ.js.gz +0 -0
  66. package/public/assets/badge-B4QAWrzA.js +1 -0
  67. package/public/assets/badge-B4QAWrzA.js.br +0 -0
  68. package/public/assets/badge-B4QAWrzA.js.gz +0 -0
  69. package/public/assets/build-format-CtmRXihN.js +11 -0
  70. package/public/assets/build-format-CtmRXihN.js.br +0 -0
  71. package/public/assets/build-format-CtmRXihN.js.gz +0 -0
  72. package/public/assets/dialog-BAFN_ONP.js +11 -0
  73. package/public/assets/dialog-BAFN_ONP.js.br +0 -0
  74. package/public/assets/dialog-BAFN_ONP.js.gz +0 -0
  75. package/public/assets/index-COOWQXpW.js +218 -0
  76. package/public/assets/index-COOWQXpW.js.br +0 -0
  77. package/public/assets/index-COOWQXpW.js.gz +0 -0
  78. package/public/assets/index-ozCdBYxk.css +1 -0
  79. package/public/assets/index-ozCdBYxk.css.br +0 -0
  80. package/public/assets/index-ozCdBYxk.css.gz +0 -0
  81. package/public/assets/list-view-Rrqp8TkG.js +1 -0
  82. package/public/assets/list-view-Rrqp8TkG.js.br +0 -0
  83. package/public/assets/list-view-Rrqp8TkG.js.gz +0 -0
  84. package/public/assets/{pencil-CPaoEKFm.js → pencil-CAHyK7Qf.js} +2 -2
  85. package/public/assets/pencil-CAHyK7Qf.js.br +0 -0
  86. package/public/assets/pencil-CAHyK7Qf.js.gz +0 -0
  87. package/public/assets/resource-health-BRpSwarg.js +1 -0
  88. package/public/assets/resource-health-BRpSwarg.js.br +0 -0
  89. package/public/assets/resource-health-BRpSwarg.js.gz +0 -0
  90. package/public/assets/{trash-CD9Y9G-i.js → trash-CkO-5TRA.js} +3 -3
  91. package/public/assets/trash-CkO-5TRA.js.br +0 -0
  92. package/public/assets/trash-CkO-5TRA.js.gz +0 -0
  93. package/public/assets/useFocusAfterSwap-BY3N9f9v.js +1 -0
  94. package/public/assets/useFocusAfterSwap-BY3N9f9v.js.br +0 -0
  95. package/public/assets/useFocusAfterSwap-BY3N9f9v.js.gz +0 -0
  96. package/public/assets/{vendor-charts-YPhPkjLw.js → vendor-charts-BykzUV2D.js} +1 -1
  97. package/public/assets/vendor-charts-BykzUV2D.js.br +0 -0
  98. package/public/assets/vendor-charts-BykzUV2D.js.gz +0 -0
  99. package/public/assets/{vendor-react-C5H_1fOn.js → vendor-react-BlPSzrEe.js} +18 -10
  100. package/public/assets/vendor-react-BlPSzrEe.js.br +0 -0
  101. package/public/assets/vendor-react-BlPSzrEe.js.gz +0 -0
  102. package/public/assets/{vendor-router-CnmrRwJF.js → vendor-router-B_lVHrKl.js} +3 -3
  103. package/public/assets/vendor-router-B_lVHrKl.js.br +0 -0
  104. package/public/assets/vendor-router-B_lVHrKl.js.gz +0 -0
  105. package/public/index.html +4 -4
  106. package/public/index.html.br +0 -0
  107. package/public/index.html.gz +0 -0
  108. package/public/assets/AppCenter-OTDuqwSf.js +0 -21
  109. package/public/assets/AppCenter-OTDuqwSf.js.br +0 -0
  110. package/public/assets/AppCenter-OTDuqwSf.js.gz +0 -0
  111. package/public/assets/Default-D9GLpWlN.js +0 -1
  112. package/public/assets/Default-D9GLpWlN.js.br +0 -0
  113. package/public/assets/Default-D9GLpWlN.js.gz +0 -0
  114. package/public/assets/Invite-Bhiam8En.js +0 -1
  115. package/public/assets/Invite-Bhiam8En.js.br +0 -0
  116. package/public/assets/Invite-Bhiam8En.js.gz +0 -0
  117. package/public/assets/MacResources-DObzVJxQ.js +0 -3
  118. package/public/assets/MacResources-DObzVJxQ.js.br +0 -0
  119. package/public/assets/MacResources-DObzVJxQ.js.gz +0 -0
  120. package/public/assets/NotFound-Dz_k_Mzf.js +0 -1
  121. package/public/assets/NotFound-Dz_k_Mzf.js.br +0 -0
  122. package/public/assets/NotFound-Dz_k_Mzf.js.gz +0 -0
  123. package/public/assets/QASession-2crubOLY.js +0 -150
  124. package/public/assets/QASession-2crubOLY.js.br +0 -0
  125. package/public/assets/QASession-2crubOLY.js.gz +0 -0
  126. package/public/assets/ResetPassword-EUm12ojo.js +0 -1
  127. package/public/assets/ResetPassword-EUm12ojo.js.br +0 -0
  128. package/public/assets/ResetPassword-EUm12ojo.js.gz +0 -0
  129. package/public/assets/Setup-Fc_0RW0a.js +0 -1
  130. package/public/assets/Setup-Fc_0RW0a.js.br +0 -0
  131. package/public/assets/Setup-Fc_0RW0a.js.gz +0 -0
  132. package/public/assets/Team-Ac5aOGgx.js +0 -6
  133. package/public/assets/Team-Ac5aOGgx.js.br +0 -0
  134. package/public/assets/Team-Ac5aOGgx.js.gz +0 -0
  135. package/public/assets/Tokens-pEnCy-7l.js +0 -1
  136. package/public/assets/Tokens-pEnCy-7l.js.br +0 -0
  137. package/public/assets/Tokens-pEnCy-7l.js.gz +0 -0
  138. package/public/assets/alert-dialog-DhOTocMh.js +0 -1
  139. package/public/assets/alert-dialog-DhOTocMh.js.br +0 -0
  140. package/public/assets/alert-dialog-DhOTocMh.js.gz +0 -0
  141. package/public/assets/badge-B4gbViMs.js +0 -1
  142. package/public/assets/badge-B4gbViMs.js.br +0 -0
  143. package/public/assets/badge-B4gbViMs.js.gz +0 -0
  144. package/public/assets/build-format-DKGajT96.js +0 -11
  145. package/public/assets/build-format-DKGajT96.js.br +0 -0
  146. package/public/assets/build-format-DKGajT96.js.gz +0 -0
  147. package/public/assets/dialog-DEL1xxKJ.js +0 -11
  148. package/public/assets/dialog-DEL1xxKJ.js.br +0 -0
  149. package/public/assets/dialog-DEL1xxKJ.js.gz +0 -0
  150. package/public/assets/index-Bxs7CdEi.css +0 -1
  151. package/public/assets/index-Bxs7CdEi.css.br +0 -0
  152. package/public/assets/index-Bxs7CdEi.css.gz +0 -0
  153. package/public/assets/index-COIlCLCW.js +0 -218
  154. package/public/assets/index-COIlCLCW.js.br +0 -0
  155. package/public/assets/index-COIlCLCW.js.gz +0 -0
  156. package/public/assets/pencil-CPaoEKFm.js.br +0 -0
  157. package/public/assets/pencil-CPaoEKFm.js.gz +0 -0
  158. package/public/assets/resource-health-Ca4-5Rde.js +0 -1
  159. package/public/assets/resource-health-Ca4-5Rde.js.br +0 -0
  160. package/public/assets/resource-health-Ca4-5Rde.js.gz +0 -0
  161. package/public/assets/table-CSeGVnii.js +0 -1
  162. package/public/assets/table-CSeGVnii.js.br +0 -0
  163. package/public/assets/table-CSeGVnii.js.gz +0 -0
  164. package/public/assets/trash-CD9Y9G-i.js.br +0 -0
  165. package/public/assets/trash-CD9Y9G-i.js.gz +0 -0
  166. package/public/assets/vendor-charts-YPhPkjLw.js.br +0 -0
  167. package/public/assets/vendor-charts-YPhPkjLw.js.gz +0 -0
  168. package/public/assets/vendor-react-C5H_1fOn.js.br +0 -0
  169. package/public/assets/vendor-react-C5H_1fOn.js.gz +0 -0
  170. package/public/assets/vendor-router-CnmrRwJF.js.br +0 -0
  171. package/public/assets/vendor-router-CnmrRwJF.js.gz +0 -0
@@ -0,0 +1,218 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Setup-ULjvIfAi.js","assets/vendor-react-BlPSzrEe.js","assets/vendor-router-B_lVHrKl.js","assets/Invite-EVMTsuNz.js","assets/pencil-CAHyK7Qf.js","assets/ResetPassword-D-SFg4ap.js","assets/AppCenter-BHz6vh5p.js","assets/build-format-CtmRXihN.js","assets/dialog-BAFN_ONP.js","assets/trash-CkO-5TRA.js","assets/badge-B4QAWrzA.js","assets/alert-dialog-CwcUyDZQ.js","assets/useFocusAfterSwap-BY3N9f9v.js","assets/QASession-CL-eyFxG.js","assets/resource-health-BRpSwarg.js","assets/publicLink-D6zKS_wu.js","assets/MacResources-fCn40Tf5.js","assets/vendor-charts-BykzUV2D.js","assets/Default-bCqU0Qz9.js","assets/Team-DH91GD4w.js","assets/list-view-Rrqp8TkG.js","assets/Tokens-DImLpOVZ.js","assets/NotFound-wHOnT2Fl.js"])))=>i.map(i=>d[i]);
2
+ var Ua=e=>{throw TypeError(e)};var vs=(e,n,t)=>n.has(e)||Ua("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)?Ua("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 m,R as T,b as Mh,a as _r,f as J,r as Rl,u as $h,o as zh,s as Fh,g as Lh,m as Vh,c as Uh,i as Zh,l as Bh,d as Kh,e as Wh}from"./vendor-react-BlPSzrEe.js";import{u as Tl,b as Il,L as po,N as zi,O as Hh,R as ft,a as Gh,B as qh}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 Qh=(e,n,t,r,o,s,i,a)=>{let c=document.documentElement,u=["light","dark"];function d(p){(Array.isArray(e)?e:[e]).forEach(g=>{let v=g==="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(g,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,g=i&&p==="system"?f():p;d(g)}catch{}},Za=["light","dark"],Al="(prefers-color-scheme: dark)",Jh=typeof window>"u",Fi=h.createContext(void 0),Yh={setTheme:e=>{},themes:[]},Xo=()=>{var e;return(e=h.useContext(Fi))!=null?e:Yh},Xh=e=>h.useContext(Fi)?h.createElement(h.Fragment,null,e.children):h.createElement(tp,{...e}),ep=["light","dark"],tp=({forcedTheme:e,disableTransitionOnChange:n=!1,enableSystem:t=!0,enableColorScheme:r=!0,storageKey:o="theme",themes:s=ep,defaultTheme:i=t?"system":"light",attribute:a="data-theme",value:c,children:u,nonce:d,scriptProps:l})=>{let[f,p]=h.useState(()=>rp(o,i)),[g,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?op(d):null,R=document.documentElement,$=B=>{B==="class"?(R.classList.remove(...y),I&&R.classList.add(I)):B.startsWith("data-")&&(I?R.setAttribute(B,I):R.removeAttribute(B))};if(Array.isArray(a)?a.forEach($):$(a),r){let B=Za.includes(i)?i:null,N=Za.includes(O)?O:B;R.style.colorScheme=N}A==null||A()},[d]),_=h.useCallback(E=>{let O=typeof E=="function"?E(f):E;p(O);try{localStorage.setItem(o,O)}catch{}},[f]),C=h.useCallback(E=>{let O=ys(E);v(O),f==="system"&&t&&!e&&b("system")},[f,e]);h.useEffect(()=>{let E=window.matchMedia(Al);return E.addListener(C),C(E),()=>E.removeListener(C)},[C]),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"?g:f,themes:t?[...s,"system"]:s,systemTheme:t?g:void 0}),[f,_,e,g,t,s]);return h.createElement(Fi.Provider,{value:S},h.createElement(np,{forcedTheme:e,storageKey:o,attribute:a,enableSystem:t,enableColorScheme:r,defaultTheme:i,value:c,themes:s,nonce:d,scriptProps:l}),u)},np=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:`(${Qh.toString()})(${d})`}})}),rp=(e,n)=>{if(Jh)return;let t;try{t=localStorage.getItem(e)||void 0}catch{}return t||n},op=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(Al)),e.matches?"dark":"light");const sp="modulepreload",ip=function(e){return"/"+e},Ba={},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=ip(u),u in Ba)return;Ba[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":sp,d||(f.as="script"),f.crossOrigin="",f.href=u,c&&f.setAttribute("nonce",c),document.head.appendChild(f),d)return new Promise((p,g)=>{f.addEventListener("load",p),f.addEventListener("error",()=>g(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)})},Dl=h.createContext(void 0),Li=e=>{const n=h.useContext(Dl);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},ap=({client:e,children:n})=>(h.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(Dl.Provider,{value:e,children:n})),cp={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var fn,$i,bl,lp=(bl=class{constructor(){ee(this,fn,cp);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,bl);const Pn=new lp;function up(e){setTimeout(e,0)}const dp=typeof window>"u"||"Deno"in globalThis;function at(){}function fp(e,n){return typeof e=="function"?e(n):e}function Nl(e){return typeof e=="number"&&e>=0&&e!==1/0}function jl(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Pe(e,n){return typeof e=="function"?e(n):e}function Ka(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 Wa(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 hp=Object.prototype.hasOwnProperty;function Ml(e,n,t=0){if(e===n)return e;if(t>500)return n;const r=Ha(e)&&Ha(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:hp.call(e,d))&&c++;continue}if(l===null||f===null||typeof l!="object"||typeof f!="object"){a[d]=f;continue}const p=Ml(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 Ha(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ls(e){if(!Ga(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!(!Ga(r)||!r.hasOwnProperty("isPrototypeOf")||n!==Object.prototype)}function Ga(e){return Object.prototype.toString.call(e)==="[object Object]"}function pp(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?Ml(e,n):n}function IC(e){return e}function mp(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function gp(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const Ui=Symbol();function $l(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 zl(e,n){return typeof e=="function"?e(...n):!!e}function vp(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 yp=()=>dp;const Zi=()=>yp();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,wl,bp=(wl=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,wl);const Bi=new bp,wp=up;function _p(){let e=[],n=0,t=a=>{a()},r=a=>{a()},o=wp;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=_p();var or,pn,sr,_l,xp=(_l=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,_l);const Vo=new xp;function Sp(e){return Math.min(1e3*2**e,3e4)}function Fl(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 Ll(e){let n=!1,t=0,r,o="pending",s,i;const a=new Promise((_,C)=>{s=_,i=C});a.catch(at);const c=()=>o!=="pending",u=_=>{var C;if(!c()){const S=new Us(_);v(S),(C=e.onCancel)==null||C.call(e,S)}},d=()=>{n=!0},l=()=>{n=!1},f=()=>Bi.isFocused()&&(e.networkMode==="always"||Vo.isOnline())&&e.canRun(),p=()=>Fl(e.networkMode)&&e.canRun(),g=_=>{c()||(r==null||r(),o="resolved",s(_))},v=_=>{c()||(r==null||r(),o="rejected",i(_))},y=()=>new Promise(_=>{var C;r=S=>{(c()||f())&&_(S)},(C=e.onPause)==null||C.call(e)}).then(()=>{var _;r=void 0,c()||(_=e.onContinue)==null||_.call(e)}),b=()=>{if(c())return;let _;const C=t===0?e.initialPromise:void 0;try{_=C??e.fn()}catch(S){_=Promise.reject(S)}Promise.resolve(_).then(g).catch(S=>{var R;if(c())return;const E=e.retry??(Zi()?0:3),O=e.retryDelay??Sp,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),pp(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,xl,Vl=(xl=class{constructor(){ee(this,Rn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Nl(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,xl);function Ep(e){return{onFetch:(n,t)=>{var d,l,f,p,g;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=((g=n.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const u=async()=>{let v=!1;const y=C=>{vp(C,()=>n.signal,()=>v=!0)},b=$l(n.options,n.fetchOptions),_=async(C,S,E)=>{if(v)return Promise.reject(n.signal.reason);if(S==null&&C.pages.length)return Promise.resolve(C);const I=(()=>{const B={client:n.client,queryKey:n.queryKey,pageParam:S,direction:E?"backward":"forward",meta:n.options.meta};return y(B),B})(),A=await b(I),{maxPages:R}=n.options,$=E?gp:mp;return{pages:$(C.pages,A,R),pageParams:$(C.pageParams,S,R)}};if(o&&s.length){const C=o==="backward",S=C?Cp:qa,E={pages:s,pageParams:i};a=await _(E,S(r,E),C)}else{const C=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<C)}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 Cp(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,Sl,kp=(Sl=class extends Vl{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,Ja(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=Ja(this.options);t.data!==void 0&&(this.setState(Qa(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:!jl(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,g,v,y,b,_,C,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=$l(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"?Ep(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,Ll({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),(g=(p=x(this,yt).config).onSuccess)==null||g.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=(C=x(this,yt).config).onSettled)==null||S.call(C,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,...Ul(r.data,this.options),fetchMeta:n.meta??null};case"success":const o={...r,...Qa(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})})},Sl);function Ul(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Fl(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Qa(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ja(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,El,Pp=(El=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),Ya(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&&Xa(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&&Ya(n,t),R=I&&Xa(n,r,t,o);(A||R)&&(d={...d,...Ul(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:g,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),g=Date.now(),v="error",l=!1);const b=d.fetchStatus==="fetching",_=v==="pending",C=v==="error",S=_&&b,E=f!==void 0;return{status:v,fetchStatus:d.fetchStatus,isPending:_,isSuccess:v==="success",isError:C,isInitialLoading:S,isLoading:S,data:f,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:g,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:C&&!E,isPaused:d.fetchStatus==="paused",isPlaceholderData:l,isRefetchError:C&&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&&Nl(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=jl(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))},El);function Op(e,n){return Pe(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Pe(n.retryOnMount,e)===!1)}function Ya(e,n){return Op(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 Xa(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,Cl,Rp=(Cl=class extends Vl{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||Tp(),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,g,v,y,b,_,C,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,Ll({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((g=(p=x(this,Xe).config).onSettled)==null?void 0:g.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=(C=this.options).onError)==null?void 0:S.call(C,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})})},Cl);function Tp(){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,kl,Ip=(kl=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 Rp({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=>Wa(t,r))}findAll(n={}){return this.getAll().filter(t=>Wa(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,kl);function mo(e){var n;return(n=e.options.scope)==null?void 0:n.id}var Ft,Pl,Ap=(Pl=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 kp({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=>Ka(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>Ka(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,Pl),Ae,gn,vn,fr,hr,yn,pr,mr,Ol,Dp=(Ol=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 Ap),H(this,gn,e.mutationCache||new Ip),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=fp(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,Ol);const Zl=h.createContext(!1),Np=()=>h.useContext(Zl);Zl.Provider;function jp(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Mp=h.createContext(jp()),$p=()=>h.useContext(Mp),zp=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?zl(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},Fp=e=>{h.useEffect(()=>{e.clearReset()},[e])},Lp=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:o})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||zl(t,[e.error,r])),Vp=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))}},Up=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,Zp=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function Bp(e,n,t){const r=Np(),o=$p(),s=Li(),i=s.defaultQueryOptions(e),a=s.getQueryCache().get(i.queryHash),c=e.subscribed!==!1;i._optimisticResults=r?"isRestoring":c?"optimistic":void 0,Vp(i),zp(i,o,a),Fp(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]),Up(i,d))throw Zp(i,u,o);if(Lp({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 Bp(e,Pp)}function Kp(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 Wp=e=>{switch(e){case"success":return qp;case"info":return Jp;case"warning":return Qp;case"error":return Yp;default:return null}},Hp=Array(12).fill(0),Gp=({visible:e,className:n})=>T.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},T.createElement("div",{className:"sonner-spinner"},Hp.map((t,r)=>T.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),qp=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"})),Qp=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"})),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:"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"})),Yp=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"})),Xp=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"})),em=()=>{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 tm=1;const nm=100,ec=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:tm++};class rm{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-nm;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=ec(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(sm(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,g=typeof l=="object"&&!T.isValidElement(l)?l:{message:l};this.create({id:r,type:"error",description:f,...g})}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,g=typeof l=="object"&&!T.isValidElement(l)?l:{message:l};this.create({id:r,type:"error",description:f,...g})}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,g=typeof l=="object"&&!T.isValidElement(l)?l:{message:l};this.create({id:r,type:"success",description:f,...g})}}).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=ec(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 rm,om=(e,n)=>it.message(e,n),sm=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",im=om,am=()=>it.toasts,cm=()=>it.getActiveToasts(),AC=Object.assign(im,{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:am,getToasts:cm});Kp("[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 lm=3,um="24px",dm="16px",tc=4e3,fm=356,hm=14,pm=45,mm=200;function jt(...e){return e.filter(Boolean).join(" ")}function gm(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const vm=e=>{var n,t,r,o,s,i,a,c,u;const{invert:d,toast:l,unstyled:f,interacting:p,setHeights:g,visibleToasts:v,heights:y,index:b,toasts:_,expanded:C,removeToast:S,defaultRichColors:E,closeButton:O,style:I,cancelButtonStyle:A,actionButtonStyle:R,className:$="",descriptionClassName:B="",duration:N,position:V,gap:L,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||N||tc),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||N||tc,[l.duration,N]),Gn=T.useRef(0),Bt=T.useRef(0),fo=T.useRef(0),Kt=T.useRef(null),[La,Va]=V.split("-"),Ir=T.useMemo(()=>y.reduce((z,ie,be)=>be>=Hn?z:z+ie.height,0),[y,Hn]),w=em(),k=T.useMemo(()=>{var z;return(z=e.swipeDirections)!=null?z:gm(V)},[e.swipeDirections,V]),P=l.invert||d,j=Ne==="loading";Bt.current=T.useMemo(()=>Hn*L+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),g(be=>[{toastId:l.id,height:ie,position:l.position},...be]),()=>g(be=>be.filter(Ee=>Ee.toastId!==l.id))}},[g,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),g(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,g,l.id,l.jsx,l.action,l.cancel]);const D=T.useCallback(()=>{pe(!0),Dt(Bt.current),g(z=>z.filter(ie=>ie.toastId!==l.id)),setTimeout(()=>{S(l)},mm)},[l,S,g,Bt]);T.useEffect(()=>{if(l.promise&&Ne==="loading"||l.duration===1/0||l.type==="loading")return;let z;return C||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)},[C,p,l,Ne,w,D]),T.useEffect(()=>{l.delete&&(D(),l.onDismiss==null||l.onDismiss.call(l,l))},[D,l.delete]);function K(){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(Gp,{className:jt(W==null?void 0:W.loader,l==null||(z=l.classNames)==null?void 0:z.loader),visible:Ne==="loading"})}const F=l.icon||(Q==null?void 0:Q[Ne])||Wp(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":La,"data-x-position":Va,"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":!!(C||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&&(j||!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"?k.includes(Ee>0?"right":"left"):k.includes(Ct>0?"bottom":"top"))&&(Math.abs(Be)>=pm||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(k.includes("top")||k.includes("bottom"))if(k.includes("top")&&Ve<0||k.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"&&(k.includes("left")||k.includes("right")))if(k.includes("left")&&Be<0||k.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":j,"data-close-button":!0,onClick:j||!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:Xp):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||K():l.promise?K():null,Ne!=="loading"?F: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(B,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 nc(){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 ym(e,n){const t={};return[e,n].forEach((r,o)=>{const s=o===1,i=s?"--mobile-offset":"--offset",a=s?dm:um;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 bm=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:g,style:v,visibleToasts:y=lm,toastOptions:b,dir:_=nc(),gap:C=hm,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]),[B,N]=T.useState([]),[V,L]=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(()=>{Mh.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&&L(!1)},[I]),T.useEffect(()=>{const X=ce=>{var pe;if(i.length>0&&i.every(de=>ce[de]||ce.code===de)){var Ie;L(!0),(Ie=ne.current)==null||Ie.focus()}ce.code==="Escape"&&(document.activeElement===ne.current||(pe=ne.current)!=null&&pe.contains(document.activeElement))&&L(!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"?nc():_,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=B[0])==null?void 0:pe.height)||0}px`,"--width":`${fm}px`,"--gap":`${C}px`,...v,...ym(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:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{Y||L(!1)},onDragEnd:()=>L(!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(vm,{key:de.id,icons:S,index:xe,toast:de,defaultRichColors:p,duration:(Ze=b==null?void 0:b.duration)!=null?Ze:g,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:B.filter(dt=>dt.position==de.position),setHeights:N,expandByDefault:a,gap:C,expanded:V,swipeDirections:n.swipeDirections})})):null}))});var wm=Object.defineProperty,Hi=(e,n)=>wm(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 Bl(...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(Bl,"composeRefs");function Re(...e){return h.useCallback(Bl(...e),e)}Hi(Re,"useComposedRefs");var _m=Object.defineProperty,Tt=(e,n)=>_m(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 g=f;let v="child"in g.props?g.props.child:g.props.children;Xs(v)&&typeof vo=="function"&&(v=vo(v._payload)),i=xm(g,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?Gl(i):void 0,d=Re(r,u);if(!i){if(o||o===0)throw new Error(a?Cm(e):Em(e));return o}const l=Hl(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"),Kl=Symbol.for("radix.slottable");function Wl(e){const n=Tt(t=>"child"in t?t.children(t.child):t.children,"Slottable");return n.displayName=`${e}.Slottable`,n.__radixId=Kl,n}Tt(Wl,"createSlottable");var xm=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 Hl(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(Hl,"mergeProps");function Gl(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(Gl,"getElementRef");function ql(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kl}Tt(ql,"isSlottable");var Sm=Symbol.for("react.lazy");function Xs(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Sm&&"_payload"in e&&Ql(e._payload)}Tt(Xs,"isLazyComponent");function Ql(e){return typeof e=="object"&&e!==null&&"then"in e}Tt(Ql,"isPromiseLike");var Em=Tt(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Cm=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 Jl(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=Jl(e[n]))&&(r&&(r+=" "),r+=t)}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Yl(){for(var e,n,t=0,r="",o=arguments.length;t<o;t++)(e=arguments[t])&&(n=Jl(e))&&(r&&(r+=" "),r+=n);return r}const rc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,oc=Yl,no=(e,n)=>t=>{var r;if((n==null?void 0:n.variants)==null)return oc(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=rc(d)||rc(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(g=>{let[v,y]=g;return Array.isArray(y)?y.includes({...s,...a}[v]):{...s,...a}[v]===y})?[...u,l,f]:u},[]);return oc(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 km=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 Pm(e,n,t=[]){if(n==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:km(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 Om=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 Rm=e=>{const n=Om(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 Tm(e,n={}){var f,p;const t=n.attributeNames??{},r=g=>t[g]??g,o=e.size??e.width??kn.width,s=e.size??e.height??kn.height,i=((f=e.aliases)==null?void 0:f.filter(g=>typeof g=="string"&&g.trim()!=="").map(g=>`lucide-${g}`))??[],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((g,[v,y])=>(g[r(v)]=y,g),{}),..."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(g=>{const[v,y,b]=g,_=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 Im(e,n={}){return Tm(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 Am=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},Dm=h.createContext({}),Nm=()=>h.useContext(Dm),jm=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:g=2,absoluteStrokeWidth:v=!1,nonScalingStroke:y=!1,color:b="currentColor",className:_=""}=Nm()??{},C=!!c||Am(l),[S,E,O=[]]=Im(d,{color:e??b,width:t??n??p,height:r??n??p,strokeWidth:o??g,absoluteStrokeWidth:s??v,nonScalingStroke:i??y,className:ei(_,a),hasA11yProp:C,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"?Pm(e,n,t):e,o=h.forwardRef(({className:s,...i},a)=>h.createElement(jm,{ref:a,icon:r,className:s,...i}));return r.name&&(o.displayName=Rm(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 Xl={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"}]]};Xl.node;const Mm=ut(Xl);/**
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 eu={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};eu.node;const $m=ut(eu);/**
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 tu={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};tu.node;const zm=ut(tu);/**
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 nu={name:"circle",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]};nu.node;const Fm=ut(nu);/**
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 ru={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"}]]};ru.node;const Lm=ut(ru);/**
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 ou={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"}]]};ou.node;const Vm=ut(ou);/**
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 su={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"}]]};su.node;const Um=ut(su);/**
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 iu={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"}]]};iu.node;const Zm=ut(iu);/**
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 au={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"}]]};au.node;const Bm=ut(au);/**
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 cu={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"]};cu.node;const Km=ut(cu);/**
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 lu={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"}]]};lu.node;const uu=ut(lu);/**
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 du={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"}]]};du.node;const Wm=ut(du);/**
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 fu={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"}]]};fu.node;const Hm=ut(fu);/**
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 hu={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};hu.node;const Gm=ut(hu),qm=768,pu=`(max-width: ${qm-1}px)`;function Qm(e){const n=window.matchMedia(pu);return n.addEventListener("change",e),()=>n.removeEventListener("change",e)}function Jm(){return h.useSyncExternalStore(Qm,Xm,Ym)}function Ym(){return!1}function Xm(){return window.matchMedia(pu).matches}const Gi="-",eg=e=>{const n=ng(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Gi);return a[0]===""&&a.length!==1&&a.shift(),mu(a,n)||tg(i)},getConflictingClassGroupIds:(i,a)=>{const c=t[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},mu=(e,n)=>{var i;if(e.length===0)return n.classGroupId;const t=e[0],r=n.nextPart.get(t),o=r?mu(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},sc=/^\[(.+)\]$/,tg=e=>{if(sc.test(e)){const n=sc.exec(e)[1],t=n==null?void 0:n.substring(0,n.indexOf(":"));if(t)return"arbitrary.."+t}},ng=e=>{const{theme:n,prefix:t}=e,r={nextPart:new Map,validators:[]};return og(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:ic(n,o);s.classGroupId=t;return}if(typeof o=="function"){if(rg(o)){ti(o(r),n,t,r);return}n.validators.push({validator:o,classGroupId:t});return}Object.entries(o).forEach(([s,i])=>{ti(i,ic(n,s),t,r)})})},ic=(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},rg=e=>e.isThemeGetter,og=(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,sg=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)}}},gu="!",ig=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(gu),g=p?f.substring(1):f,v=l&&l>d?l-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:v}};return t?a=>t({className:a,parseClassName:i}):i},ag=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},cg=e=>({cache:sg(e.cacheSize),parseClassName:ig(e),...eg(e)}),lg=/\s+/,ug=(e,n)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:o}=n,s=[],i=e.trim().split(lg);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 g=!!p,v=r(g?f.substring(0,p):f);if(!v){if(!g){a=u+(a.length>0?" "+a:a);continue}if(v=r(f),!v){a=u+(a.length>0?" "+a:a);continue}g=!1}const y=ag(d).join(":"),b=l?y+gu:y,_=b+v;if(s.includes(_))continue;s.push(_);const C=o(v,g);for(let S=0;S<C.length;++S){const E=C[S];s.push(b+E)}a=u+(a.length>0?" "+a:a)}return a};function dg(){let e=0,n,t,r="";for(;e<arguments.length;)(n=arguments[e++])&&(t=vu(n))&&(r&&(r+=" "),r+=t);return r}const vu=e=>{if(typeof e=="string")return e;let n,t="";for(let r=0;r<e.length;r++)e[r]&&(n=vu(e[r]))&&(t&&(t+=" "),t+=n);return t};function fg(e,...n){let t,r,o,s=i;function i(c){const u=n.reduce((d,l)=>l(d),e());return t=cg(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=ug(c,t);return o(c,d),d}return function(){return s(dg.apply(null,arguments))}}const ke=e=>{const n=t=>t[e]||[];return n.isThemeGetter=!0,n},yu=/^\[(?:([a-z-]+):)?(.+)\]$/i,hg=/^\d+\/\d+$/,pg=new Set(["px","full","screen"]),mg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gg=/\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$/,vg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wt=e=>tr(e)||pg.has(e)||hg.test(e),sn=e=>Sr(e,"length",Pg),tr=e=>!!e&&!Number.isNaN(Number(e)),_s=e=>Sr(e,"number",tr),Ar=e=>!!e&&Number.isInteger(Number(e)),wg=e=>e.endsWith("%")&&tr(e.slice(0,-1)),ae=e=>yu.test(e),an=e=>mg.test(e),_g=new Set(["length","size","percentage"]),xg=e=>Sr(e,_g,bu),Sg=e=>Sr(e,"position",bu),Eg=new Set(["image","url"]),Cg=e=>Sr(e,Eg,Rg),kg=e=>Sr(e,"",Og),Dr=()=>!0,Sr=(e,n,t)=>{const r=yu.exec(e);return r?r[1]?typeof n=="string"?r[1]===n:n.has(r[1]):t(r[2]):!1},Pg=e=>gg.test(e)&&!vg.test(e),bu=()=>!1,Og=e=>yg.test(e),Rg=e=>bg.test(e),Tg=()=>{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"),g=ke("gradientColorStopPositions"),v=ke("inset"),y=ke("margin"),b=ke("opacity"),_=ke("padding"),C=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"],B=()=>["auto",ae,n],N=()=>[ae,n],V=()=>["",Wt,sn],L=()=>["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:N(),borderWidth:V(),contrast:se(),grayscale:ne(),hueRotate:se(),invert:ne(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[wg,sn],inset:B(),margin:B(),opacity:se(),padding:N(),saturate:se(),scale:se(),sepia:ne(),skew:se(),space:N(),translate:N()},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:B()}],"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":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[Dr]}],"row-start-end":[{row:["auto",{span:[Ar,ae]},ae]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"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:N()}],"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(),Sg]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",xg]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Cg]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"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,kg]}],"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:[C]}],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":[C]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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"]}}},Ig=fg(Tg);function te(...e){return Ig(Yl(e))}const Ag=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(Ag({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=m.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=m.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 Dg=Object.defineProperty,Ng=(e,n)=>Dg(e,"name",{value:n,configurable:!0}),jg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Me=jg.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),m.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${n}`,{...e,[n]:r}},{});function qi(e,n){e&&Rl.flushSync(()=>e.dispatchEvent(n))}Ng(qi,"dispatchDiscreteCustomEvent");var Mg=Object.defineProperty,wu=(e,n)=>Mg(e,"name",{value:n,configurable:!0}),ac="horizontal",$g=["horizontal","vertical"],zg=h.forwardRef(wu(function(n,t){const{decorative:r,orientation:o=ac,...s}=n,i=_u(o)?o:ac,c=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return m.jsx(Me.div,{"data-orientation":i,...c,...s,ref:t})},"Separator"));function _u(e){return $g.includes(e)}wu(_u,"isValidOrientation");var xu=zg;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=m.jsx(xu,{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=xu.displayName;var Fg=Object.defineProperty,Er=(e,n)=>Fg(e,"name",{value:n,configurable:!0}),Su=!!(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 Lg(e){var n;if(!Su)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(Lg,"getOwnerWindow");function ni(e){if(!Su)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}Er(ni,"getOwnerDocument");function Eu(e,n=!1){const{activeElement:t}=ni(e);if(!(t!=null&&t.nodeName))return null;if(Cu(t)&&t.contentDocument)return Eu(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(Eu,"getActiveElement");function Cu(e){return e.tagName==="IFRAME"}Er(Cu,"isFrame");var Vg=Object.defineProperty,bt=(e,n)=>Vg(e,"name",{value:n,configurable:!0});function Ug(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 m.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(Ug,"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,...g}=l,v=((b=f==null?void 0:f[e])==null?void 0:b[c])||a,y=h.useMemo(()=>g,Object.values(g));return m.jsx(v.Provider,{value:y,children:p})},"Provider");u.displayName=s+"Provider";function d(l,f,p={}){var b;const{optional:g=!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(!g)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,ku(o,...n)]}bt(nn,"createContextScope");function ku(...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(ku,"composeContextScopes");var lt=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},Zg=Object.defineProperty,Bg=(e,n)=>Zg(e,"name",{value:n,configurable:!0}),Kg=_r[" useId ".trim().toString()]||(()=>{}),Wg=0;function wn(e){const[n,t]=h.useState(Kg());return lt(()=>{e||t(r=>r??String(Wg++))},[e]),e||(n?`radix-${n}`:"")}Bg(wn,"useId");var Hg=Object.defineProperty,Gg=(e,n)=>Hg(e,"name",{value:n,configurable:!0}),cc=_r[" useEffectEvent ".trim().toString()],lc=_r[" useInsertionEffect ".trim().toString()];function Pu(e){if(typeof cc=="function")return cc(e);const n=h.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof lc=="function"?lc(()=>{n.current=e}):lt(()=>{n.current=e}),h.useMemo(()=>((...t)=>{var r;return(r=n.current)==null?void 0:r.call(n,...t)}),[])}Gg(Pu,"useEffectEvent");var qg=Object.defineProperty,ro=(e,n)=>qg(e,"name",{value:n,configurable:!0}),Qg=_r[" useInsertionEffect ".trim().toString()]||lt;function oo({prop:e,defaultProp:n,onChange:t=ro(()=>{},"onChange"),caller:r}){const[o,s,i]=Ou({defaultProp:n,onChange:t}),a=e!==void 0,c=a?e:o,u=h.useCallback(d=>{var l;if(a){const f=Ru(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 Ou({defaultProp:e,onChange:n}){const[t,r]=h.useState(e),o=h.useRef(t),s=h.useRef(n);return Qg(()=>{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(Ou,"useUncontrolledState");function Ru(e){return typeof e=="function"}ro(Ru,"isFunction");var uc=Symbol("RADIX:SYNC_STATE");function Jg(e,n,t,r){const{prop:o,defaultProp:s,onChange:i,caller:a}=n,c=o!==void 0,u=Pu(i),d=[{...t,state:s}];r&&d.push(r);const[l,f]=h.useReducer((y,b)=>{if(b.type===uc)return{...y,state:b.state};const _=e(y,b);return c&&!Object.is(_.state,y.state)&&u(_.state),_},...d),p=l.state,g=h.useRef(p);h.useEffect(()=>{g.current!==p&&(g.current=p,c||u(p))},[p,g,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:uc,state:o})},[o,l.state,c]),[v,f]}ro(Jg,"useControllableStateReducer");var Yg=Object.defineProperty,Xg=(e,n)=>Yg(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)}),[])}Xg(Xt,"useCallbackRef");var ev=Object.defineProperty,We=(e,n)=>ev(e,"name",{value:n,configurable:!0}),ri="dismissableLayer.update",tv="dismissableLayer.pointerDownOutside",nv="dismissableLayer.focusOutside",dc,Tu=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(Tu),[f,p]=h.useState(null),g=(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),C=_?b.indexOf(_):-1,S=f?b.indexOf(f):-1,E=l.layersWithOutsidePointerEventsDisabled.size>0,O=S>=C,I=h.useRef(!1),A=Au(N=>{i==null||i(N),c==null||c(N),N.defaultPrevented||u==null||u()},{ownerDocument:g,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:I,dismissableSurfaces:l.dismissableSurfaces,shouldHandlePointerDownOutside:h.useCallback(N=>{if(!(N instanceof Node))return!1;const V=[...l.branches].some(L=>L.contains(N));return O&&!V},[l.branches,O])}),R=Du(N=>{if(o&&I.current)return;const V=N.target;[...l.branches].some(Y=>Y.contains(V))||(a==null||a(N),c==null||c(N),N.defaultPrevented||u==null||u())},g),$=f?S===b.length-1:!1,B=Xt(N=>{N.key==="Escape"&&(s==null||s(N),!N.defaultPrevented&&u&&(N.preventDefault(),u()))});return h.useEffect(()=>{if($)return g.addEventListener("keydown",B,{capture:!0}),()=>g.removeEventListener("keydown",B,{capture:!0})},[g,$,B]),h.useEffect(()=>{if(f)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(dc=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),oi(),()=>{r&&(l.layersWithOutsidePointerEventsDisabled.delete(f),l.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=dc))}},[f,g,r,l]),h.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),oi())},[f,l]),h.useEffect(()=>{const N=We(()=>v({}),"handleUpdate");return document.addEventListener(ri,N),()=>document.removeEventListener(ri,N)},[]),m.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 Iu(){const e=h.useContext(Tu),[n,t]=h.useState(null);return h.useEffect(()=>{if(n)return e.dismissableSurfaces.add(n),()=>{e.dismissableSurfaces.delete(n)}},[n,e.dismissableSurfaces]),t}We(Iu,"useDismissableLayerSurface");var rv=We(()=>!0,"IS_TRUE");function Au(e,n){const{ownerDocument:t=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:i=rv}=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 g(C){if(!u.current)return;const S=C.target;S instanceof Node&&[...s].some(O=>O.contains(S))||d.current.set(C.type,!0),C.type==="click"&&window.setTimeout(()=>{u.current&&l.current()},0)}We(g,"handleInteractionCapture");function v(C){u.current&&d.current.set(C.type,!1)}We(v,"handleInteractionBubble");const y=We(C=>{if(C.target&&!c.current){let S=function(){t.removeEventListener("click",l.current);const O=p();f(),O||Ji(tv,a,E,{discrete:!0})};if(We(S,"handleAndDispatchPointerDownOutsideEvent"),!i(C.target)){t.removeEventListener("click",l.current),f(),c.current=!1;return}const E={originalEvent:C};u.current=!0,o.current=r&&C.button===0,d.current.clear(),!r||C.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 C of b)t.addEventListener(C,g,!0),t.addEventListener(C,v);const _=window.setTimeout(()=>{t.addEventListener("pointerdown",y)},0);return()=>{window.clearTimeout(_),t.removeEventListener("pointerdown",y),t.removeEventListener("click",l.current);for(const C of b)t.removeEventListener(C,g,!0),t.removeEventListener(C,v)}},[t,a,r,o,s,i]),{onPointerDownCapture:We(()=>c.current=!0,"onPointerDownCapture")}}We(Au,"usePointerDownOutside");function Du(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(nv,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(Du,"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 ov=Object.defineProperty,ot=(e,n)=>ov(e,"name",{value:n,configurable:!0}),xs="focusScope.autoFocusOnMount",Ss="focusScope.autoFocusOnUnmount",fc={bubbles:!1,cancelable:!0},Nu=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),g=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(o){let y=function(S){if(g.paused||!c)return;const E=S.target;c.contains(E)?f.current=E:Gt(f.current,{select:!0})},b=function(S){if(g.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 C=new MutationObserver(_);return c&&C.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),C.disconnect()}}},[o,c,g.paused]),h.useEffect(()=>{if(c){hc.add(g);const y=document.activeElement;if(!c.contains(y)){const _=new CustomEvent(xs,fc);c.addEventListener(xs,d),c.dispatchEvent(_),_.defaultPrevented||(ju(Lu(Yi(c)),{select:!0}),document.activeElement===y&&Gt(c))}return()=>{c.removeEventListener(xs,d),setTimeout(()=>{const _=new CustomEvent(Ss,fc);c.addEventListener(Ss,l),c.dispatchEvent(_),_.defaultPrevented||Gt(y??document.body,{select:!0}),c.removeEventListener(Ss,l),hc.remove(g)},0)}}},[c,d,l,g]);const v=h.useCallback(y=>{if(!r&&!o||g.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(b&&_){const C=y.currentTarget,[S,E]=Mu(C);S&&E?!y.shiftKey&&_===E?(y.preventDefault(),r&&Gt(S,{select:!0})):y.shiftKey&&_===S&&(y.preventDefault(),r&&Gt(E,{select:!0})):_===C&&y.preventDefault()}},[r,o,g.paused]);return m.jsx(Me.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})},"FocusScope"));function ju(e,{select:n=!1}={}){const t=document.activeElement;for(const r of e)if(Gt(r,{select:n}),document.activeElement!==t)return}ot(ju,"focusFirst");function Mu(e){const n=Yi(e),t=si(n,e),r=si(n.reverse(),e);return[t,r]}ot(Mu,"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}):$u(r,{upTo:n})))return r}ot(si,"findVisible");function $u(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($u,"isHidden");function zu(e){return e instanceof HTMLInputElement&&"select"in e}ot(zu,"isSelectableInput");function Gt(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&zu(e)&&n&&e.select()}}ot(Gt,"focus");var hc=Fu();function Fu(){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(Fu,"createFocusScopesStack");function ii(e,n){const t=[...e],r=t.indexOf(n);return r!==-1&&t.splice(r,1),t}ot(ii,"arrayRemove");function Lu(e){return e.filter(n=>n.tagName!=="A")}ot(Lu,"removeLinks");var sv=Object.defineProperty,iv=(e,n)=>sv(e,"name",{value:n,configurable:!0}),Xi=h.forwardRef(iv(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?Rl.createPortal(m.jsx(Me.div,{...o,ref:t}),a):null},"Portal")),av=Object.defineProperty,en=(e,n)=>av(e,"name",{value:n,configurable:!0});function Vu(e,n){return h.useReducer((t,r)=>n[t][r]??t,e)}en(Vu,"useStateMachine");var rn=en(e=>{const{present:n,children:t}=e,r=Uu(n),o=typeof t=="function"?t({present:r.isPresent}):h.Children.only(t),s=Zu(r.ref,Bu(o));return typeof t=="function"||r.isPresent?h.cloneElement(o,{ref:s}):null},"Presence");function Uu(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]=Vu(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,g=er(d);e?(i.current=g,u("MOUNT")):g==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(l&&p!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),lt(()=>{if(n){let d;const l=n.ownerDocument.defaultView??window,f=en(g=>{const y=er(r.current).includes(CSS.escape(g.animationName));if(g.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(g=>{g.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(Uu,"usePresence");function ai(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}en(ai,"setRef");function Zu(...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(Zu,"useStableComposedRefs");function er(e){return(e==null?void 0:e.animationName)||"none"}en(er,"getAnimationName");function Bu(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(Bu,"getElementRef");var cv=Object.defineProperty,ea=(e,n)=>cv(e,"name",{value:n,configurable:!0}),yo=0,Mt=null;function lv(e){return ts(),e.children}ea(lv,"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 Ku(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 uv(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",dv="with-scroll-bars-hidden",fv="--removed-body-scroll-bar-size";function Es(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function hv(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 pv=typeof window<"u"?h.useLayoutEffect:h.useEffect,pc=new WeakMap;function mv(e,n){var t=hv(null,function(r){return e.forEach(function(o){return Es(o,r)})});return pv(function(){var r=pc.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)})}pc.set(t,e)},[e]),t}function gv(e){return e}function vv(e,n){n===void 0&&(n=gv);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 yv(e){e===void 0&&(e={});var n=vv(null);return n.options=Lt({async:!0,ssr:!1},e),n}var Wu=function(e){var n=e.sideCar,t=Ku(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))};Wu.isSideCarExport=!0;function bv(e,n){return e.useMedium(n),Wu}var Hu=yv(),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,g=e.noIsolation,v=e.inert,y=e.allowPinchZoom,b=e.as,_=b===void 0?"div":b,C=e.gapMode,S=Ku(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=f,O=mv([t,n]),I=Lt(Lt({},S),o);return h.createElement(h.Fragment,null,d&&h.createElement(E,{sideCar:Hu,removeScrollBar:u,shards:l,noRelative:p,noIsolation:g,inert:v,setCallbacks:s,allowPinchZoom:!!y,lockRef:t,gapMode:C}),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 wv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _v(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=wv();return n&&e.setAttribute("nonce",n),e}function xv(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function Sv(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var Ev=function(){var e=0,n=null;return{add:function(t){e==0&&(n=_v())&&(xv(n,t),Sv(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Cv=function(){var e=Ev();return function(n,t){h.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&t])}},Gu=function(){var e=Cv(),n=function(t){var r=t.styles,o=t.dynamic;return e(r,o),null};return n},kv={left:0,top:0,right:0,gap:0},ks=function(e){return parseInt(e||"",10)||0},Pv=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)]},Ov=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return kv;var n=Pv(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])}},Rv=Gu(),nr="data-scroll-locked",Tv=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(dv,` {
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(fv,": ").concat(a,`px;
158
+ }
159
+ `)},mc=function(){var e=parseInt(document.body.getAttribute(nr)||"0",10);return isFinite(e)?e:0},Iv=function(){h.useEffect(function(){return document.body.setAttribute(nr,(mc()+1).toString()),function(){var e=mc()-1;e<=0?document.body.removeAttribute(nr):document.body.setAttribute(nr,e.toString())}},[])},Av=function(e){var n=e.noRelative,t=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Iv();var s=h.useMemo(function(){return Ov(o)},[o]);return h.createElement(Rv,{styles:Tv(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,Dv=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&&!Dv(e)&&t[n]==="visible")},Nv=function(e){return qu(e,"overflowY")},jv=function(e){return qu(e,"overflowX")},gc=function(e,n){var t=n.ownerDocument,r=n;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Qu(e,r);if(o){var s=Ju(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==t.body);return!1},Mv=function(e){var n=e.scrollTop,t=e.scrollHeight,r=e.clientHeight;return[n,t,r]},$v=function(e){var n=e.scrollLeft,t=e.scrollWidth,r=e.clientWidth;return[n,t,r]},Qu=function(e,n){return e==="v"?Nv(n):jv(n)},Ju=function(e,n){return e==="v"?Mv(n):$v(n)},zv=function(e,n){return e==="h"&&n==="rtl"?-1:1},Fv=function(e,n,t,r,o){var s=zv(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=Ju(e,a),g=p[0],v=p[1],y=p[2],b=v-y-s*g;(g||b)&&Qu(e,a)&&(l+=b,f+=g);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]},vc=function(e){return[e.deltaX,e.deltaY]},yc=function(e){return e&&"current"in e?e.current:e},Lv=function(e,n){return e[0]===n[0]&&e[1]===n[1]},Vv=function(e){return`
160
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
161
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
162
+ `)},Uv=0,Jn=[];function Zv(e){var n=h.useRef([]),t=h.useRef([0,0]),r=h.useRef(),o=h.useState(Uv++)[0],s=h.useState(Gu)[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=uv([e.lockRef.current],(e.shards||[]).map(yc),!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,C="deltaX"in v?v.deltaX:_[0]-b[0],S="deltaY"in v?v.deltaY:_[1]-b[1],E,O=v.target,I=Math.abs(C)>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 B=gc(I,O);if(!B)return!0;if(B?E=I:(E=I==="v"?"h":"v",B=gc(I,O)),!B)return!1;if(!r.current&&"changedTouches"in v&&(C||S)&&(r.current=E),!E)return!0;var N=r.current||E;return Fv(N,y,v,N==="h"?C:S)},[]),c=h.useCallback(function(v){var y=v;if(!(!Jn.length||Jn[Jn.length-1]!==s)){var b="deltaY"in y?vc(y):wo(y),_=n.current.filter(function(E){return E.name===y.type&&(E.target===y.target||y.target===E.shadowParent)&&Lv(E.delta,b)})[0];if(_&&_.should){y.cancelable&&y.preventDefault();return}if(!_){var C=(i.current.shards||[]).map(yc).filter(Boolean).filter(function(E){return E.contains(y.target)}),S=C.length>0?a(y,C[0]):!i.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),u=h.useCallback(function(v,y,b,_){var C={name:v,delta:y,target:b,should:_,shadowParent:Bv(b)};n.current.push(C),setTimeout(function(){n.current=n.current.filter(function(S){return S!==C})},1)},[]),d=h.useCallback(function(v){t.current=wo(v),r.current=void 0},[]),l=h.useCallback(function(v){u(v.type,vc(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,g=e.inert;return h.createElement(h.Fragment,null,g?h.createElement(s,{styles:Vv(o)}):null,p?h.createElement(Av,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Bv(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const Kv=bv(Hu,Zv);var ta=h.forwardRef(function(e,n){return h.createElement(ns,Lt({},e,{ref:n,sideCar:Kv}))});ta.classNames=ns.classNames;var Wv=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,Yu=function(e){return e&&(e.host||Yu(e.parentNode))},Hv=function(e,n){return n.map(function(t){if(e.contains(t))return t;var r=Yu(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})},Gv=function(e,n,t,r){var o=Hv(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),g=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&&g&&_o.set(f,!0),y===1&&f.setAttribute(t,"true"),g||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={})}},Xu=function(e,n,t){t===void 0&&(t="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Wv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Gv(r,o,t,"aria-hidden")):function(){return null}},qv=Object.defineProperty,gt=(e,n)=>qv(e,"name",{value:n,configurable:!0}),na="Dialog",[ed,DC]=nn(na),[Qv,It]=ed(na),Jv=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,g]=h.useState(0);return m.jsx(Qv,{scope:n,triggerRef:a,contentRef:c,contentId:wn(),titleId:wn(),descriptionId:wn(),titlePresent:l>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:g,open:u,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(v=>!v),[d]),modal:i,children:t})},"Dialog"),Yv="DialogTrigger",NC=h.forwardRef(gt(function(n,t){const{__scopeDialog:r,...o}=n,s=It(Yv,r),i=Re(t,s.triggerRef);return m.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")),td="DialogPortal",[Xv,nd]=ed(td,{forceMount:void 0}),ey=gt(e=>{const{__scopeDialog:n,forceMount:t,children:r,container:o}=e,s=It(td,n);return m.jsx(Xv,{scope:n,forceMount:t,children:h.Children.map(r,i=>m.jsx(rn,{present:t||s.open,children:m.jsx(Xi,{asChild:!0,container:o,children:i})}))})},"DialogPortal"),ui="DialogOverlay",rd=h.forwardRef(gt(function(n,t){const r=nd(ui,n.__scopeDialog),{forceMount:o=r.forceMount,...s}=n,i=It(ui,n.__scopeDialog);return i.modal?m.jsx(rn,{present:o||i.open,children:m.jsx(ny,{...s,ref:t})}):null},"DialogOverlay")),ty=Yt("DialogOverlay.RemoveScroll"),ny=h.forwardRef(gt(function(n,t){const{__scopeDialog:r,...o}=n,s=It(ui,r),i=Iu(),a=Re(t,i);return m.jsx(ta,{as:ty,allowPinchZoom:!0,shards:[s.contentRef],children:m.jsx(Me.div,{"data-state":rs(s.open),...o,ref:a,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),Br="DialogContent",od=h.forwardRef(gt(function(n,t){const r=nd(Br,n.__scopeDialog),{forceMount:o=r.forceMount,...s}=n,i=It(Br,n.__scopeDialog);return m.jsx(rn,{present:o||i.open,children:i.modal?m.jsx(ry,{...s,ref:t}):m.jsx(oy,{...s,ref:t})})},"DialogContent")),ry=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 Xu(i)},[]),m.jsx(sd,{...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")),oy=h.forwardRef(gt(function(n,t){const r=It(Br,n.__scopeDialog),o=h.useRef(!1),s=h.useRef(!1);return m.jsx(sd,{...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")),sd=h.forwardRef(gt(function(n,t){const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=n,c=It(Br,r);return ts(),m.jsx(m.Fragment,{children:m.jsx(Nu,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:s,onUnmountAutoFocus:i,children:m.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")),sy="DialogTitle",id=h.forwardRef(gt(function(n,t){const{__scopeDialog:r,...o}=n,s=It(sy,r),{setTitleCount:i}=s;return lt(()=>(i(a=>a+1),()=>i(a=>a-1)),[i]),m.jsx(Me.h2,{id:s.titleId,...o,ref:t})},"DialogTitle")),iy="DialogDescription",ad=h.forwardRef(gt(function(n,t){const{__scopeDialog:r,...o}=n,s=It(iy,r),{setDescriptionCount:i}=s;return lt(()=>(i(a=>a+1),()=>i(a=>a-1)),[i]),m.jsx(Me.p,{id:s.descriptionId,...o,ref:t})},"DialogDescription")),ay="DialogClose",cy=h.forwardRef(gt(function(n,t){const{__scopeDialog:r,...o}=n,s=It(ay,r);return m.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 ly=Jv,uy=ey,cd=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=m.jsx(rd,{className:s,...o,ref:n}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});cd.displayName=rd.displayName;const dy=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"}}),ld=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=m.jsx(cd,{}),t[5]=c):c=t[5];let u;t[6]!==o||t[7]!==a?(u=te(dy({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=m.jsxs(cy,{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:[m.jsx(Gm,{className:"h-4 w-4"}),m.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=m.jsxs(uy,{children:[c,m.jsxs(od,{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});ld.displayName=od.displayName;const ud=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=m.jsx("div",{className:o,...r}),n[5]=r,n[6]=o,n[7]=s):s=n[7],s};ud.displayName="SheetHeader";const dd=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=m.jsx(id,{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});dd.displayName=id.displayName;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-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=m.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;function bc(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=m.jsx("div",{className:o,...r}),n[5]=r,n[6]=o,n[7]=s):s=n[7],s}var fy=Object.defineProperty,hy=(e,n)=>fy(e,"name",{value:n,configurable:!0});function hd(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}hy(hd,"useSize");var py=Object.defineProperty,_n=(e,n)=>py(e,"name",{value:n,configurable:!0}),pd="Popper",[md,os]=nn(pd),[my,gd]=md(pd),gy=_n(e=>{const{__scopePopper:n,children:t}=e,[r,o]=h.useState(null),[s,i]=h.useState(void 0);return m.jsx(my,{scope:n,anchor:r,onAnchorChange:o,placementState:s,setPlacementState:i,children:t})},"Popper"),vy="PopperAnchor",yy=h.forwardRef(_n(function(n,t){const{__scopePopper:r,virtualRef:o,...s}=n,i=gd(vy,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],g=f==null?void 0:f[1];return o?null:m.jsx(Me.div,{"data-radix-popper-side":p,"data-radix-popper-align":g,...s,ref:d})},"PopperAnchor")),vd="PopperContent",[by,jC]=md(vd),wy=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:g="optimized",onPlaced:v,...y}=n,b=gd(vd,r),[_,C]=h.useState(null),S=Re(t,C),[E,O]=h.useState(null),I=hd(E),A=(I==null?void 0:I.width)??0,R=(I==null?void 0:I.height)??0,$=o+(i!=="center"?"-"+i:""),B=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},N=Array.isArray(d)?d:[d],V=N.length>0,L={padding:B,boundary:N.filter(yd),altBoundary:V},{refs:Y,floatingStyles:W,placement:Q,isPositioned:he,middlewareData:ne}=$h({strategy:"fixed",placement:$,whileElementsMounted:_n((...on)=>Kh(...on,{animationFrame:g==="always"}),"whileElementsMounted"),elements:{reference:b.anchor},middleware:[zh({mainAxis:s+R,alignmentAxis:a}),u&&Fh({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Bh():void 0,...L}),u&&Lh({...L}),Vh({...L,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&&Uh({element:E,padding:c}),_y({arrowWidth:A,arrowHeight:R}),p&&Zh({strategy:"referenceHidden",...L,boundary:V?L.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)},[_]),m.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:m.jsx(by,{scope:r,placedSide:se,placedAlign:le,onArrowChange:O,arrowX:X,arrowY:ce,shouldHideArrow:pe,children:m.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 yd(e){return e!==null}_n(yd,"isNotNull");var _y=_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 g="",v="";return u==="bottom"?(g=i?l:`${f}px`,v=`${-c}px`):u==="top"?(g=i?l:`${f}px`,v=`${r.floating.height+c}px`):u==="right"?(g=`${-c}px`,v=i?l:`${p}px`):u==="left"&&(g=`${r.floating.width+c}px`,v=i?l:`${p}px`),{data:{x:g,y:v}}}}),"transformOrigin");function ss(e){const[n,t="center"]=e.split("-");return[n,t]}_n(ss,"getSideAndAlignFromPlacement");var bd=gy,wd=yy,_d=wy,xy=Object.defineProperty,Sy=(e,n)=>xy(e,"name",{value:n,configurable:!0}),Ey=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"}),Cy=h.forwardRef(Sy(function(n,t){return m.jsx(Me.span,{...n,ref:t,style:{...Ey,...n.style}})},"VisuallyHidden")),ky=Cy,Py=Object.defineProperty,qe=(e,n)=>Py(e,"name",{value:n,configurable:!0}),[ra,MC]=nn("Tooltip",[os]),oa=os(),Oy="TooltipProvider",Ry=700,di="tooltip.open",[Ty,sa]=ra(Oy),Iy=qe(e=>{const{__scopeTooltip:n,delayDuration:t=Ry,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)},[]),m.jsx(Ty,{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",[Ay,so]=ra(fi),Dy=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),g=wn(),v=h.useRef(0),y=i??c.disableHoverableContent,b=a??c.delayDuration,_=h.useRef(!1),[C,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(()=>C?_.current?"delayed-open":"instant-open":"closed",[C]),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??g;return m.jsx(bd,{...u,children:m.jsx(Ay,{scope:n,contentId:R,setContentId:p,open:C,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"),wc="TooltipTrigger",Ny=h.forwardRef(qe(function(n,t){const{__scopeTooltip:r,...o}=n,s=so(wc,r),i=sa(wc,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]),m.jsx(wd,{asChild:!0,...a,children:m.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")),xd="TooltipPortal",[jy,My]=ra(xd,{forceMount:void 0}),$y=qe(e=>{const{__scopeTooltip:n,forceMount:t,children:r,container:o}=e,s=so(xd,n);return m.jsx(jy,{scope:n,forceMount:t,children:m.jsx(rn,{present:t||s.open,children:m.jsx(Xi,{asChild:!0,container:o,children:r})})})},"TooltipPortal"),Kr="TooltipContent",zy=h.forwardRef(qe(function(n,t){const r=My(Kr,n.__scopeTooltip),{forceMount:o=r.forceMount,side:s="top",...i}=n,a=so(Kr,n.__scopeTooltip);return m.jsx(rn,{present:o||a.open,children:a.disableHoverableContent?m.jsx(Sd,{side:s,...i,ref:t}):m.jsx(Fy,{side:s,...i,ref:t})})},"TooltipContent")),Fy=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]),g=h.useCallback((v,y)=>{const b=v.currentTarget,_={x:v.clientX,y:v.clientY},C=Ed(_,b.getBoundingClientRect()),S=Cd(_,C),E=kd(y.getBoundingClientRect()),O=Od([...S,...E]);c(O),f(!0)},[f]);return h.useEffect(()=>()=>p(),[p]),h.useEffect(()=>{if(u&&l){const v=qe(b=>g(b,l),"handleTriggerLeave"),y=qe(b=>g(b,u),"handleContentLeave");return u.addEventListener("pointerleave",v),l.addEventListener("pointerleave",y),()=>{u.removeEventListener("pointerleave",v),l.removeEventListener("pointerleave",y)}}},[u,l,g,p]),h.useEffect(()=>{if(a){const v=qe(y=>{const b=y.target,_={x:y.clientX,y:y.clientY},C=(u==null?void 0:u.contains(b))||(l==null?void 0:l.contains(b)),S=!Pd(_,a);C?p():S&&(p(),d())},"handleTrackPointerGrace");return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,l,a,d,p]),m.jsx(Sd,{...n,ref:i})},"TooltipContentHoverable")),Ly=Wl("TooltipContent"),Sd=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 g=qe(v=>{v.target instanceof Node&&v.target.contains(d.trigger)&&f()},"handleScroll");return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[d.trigger,f]);const{setContentId:p}=d;return lt(()=>(p(i),()=>{p(void 0)}),[i,p]),m.jsx(Qi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:g=>g.preventDefault(),onDismiss:f,children:m.jsxs(_d,{"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:[m.jsx(Ly,{children:o}),s?m.jsx(ky,{id:d.contentId,role:"tooltip",children:s}):null]})})},"TooltipContentImpl"));function Ed(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(Ed,"getExitSideFromRect");function Cd(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(Cd,"getPaddedExitPoints");function kd(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(kd,"getPointsFromRect");function Pd(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(Pd,"isPointInPolygon");function Od(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),Rd(n)}qe(Od,"getHull");function Rd(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(Rd,"getHullPresorted");var Vy=Iy,Uy=Dy,Zy=Ny,By=$y,Td=zy;const Ky=Vy,Wy=Uy,Hy=Zy,Id=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=m.jsx(By,{children:m.jsx(Td,{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});Id.displayName=Td.displayName;const Gy="sidebar_state",qy=3600*24*7,Qy="16rem",Jy="18rem",Yy="3rem",Xy="b",Ad=h.createContext(null);function is(){const e=h.useContext(Ad);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Dd=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=Jm(),[f,p]=h.useState(!1),[g,v]=h.useState(d),y=s??g;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=`${Gy}=${W}; path=/; max-age=${qy}`},t[8]=y,t[9]=a,t[10]=b):b=t[10];const _=b;let C;t[11]!==l||t[12]!==_?(C=()=>l?p(db):_(fb),t[11]=l,t[12]=_,t[13]=C):C=t[13];const S=C;let E,O;t[14]!==S?(E=()=>{const Y=W=>{W.key===Xy&&(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":Qy,"--sidebar-width-icon":Yy,...c},t[24]=c,t[25]=$):$=t[25];const B=$;let N;t[26]!==o?(N=te("group/sidebar-wrapper flex h-svh w-full has-[[data-variant=inset]]:bg-sidebar",o),t[26]=o,t[27]=N):N=t[27];let V;t[28]!==r||t[29]!==i||t[30]!==n||t[31]!==B||t[32]!==N?(V=m.jsx(Ky,{delayDuration:0,children:m.jsx("div",{style:B,className:N,ref:n,...i,children:r})}),t[28]=r,t[29]=i,t[30]=n,t[31]=B,t[32]=N,t[33]=V):V=t[33];let L;return t[34]!==R||t[35]!==V?(L=m.jsx(Ad.Provider,{value:R,children:V}),t[34]=R,t[35]=V,t[36]=L):L=t[36],L});Dd.displayName="SidebarProvider";const Nd=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:g,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 B;return t[9]!==r||t[10]!==s||t[11]!==n||t[12]!==$?(B=m.jsx("div",{className:$,ref:n,...s,children:r}),t[9]=r,t[10]=s,t[11]=n,t[12]=$,t[13]=B):B=t[13],B}if(f){let $;t[14]===Symbol.for("react.memo_cache_sentinel")?($={"--sidebar-width":Jy},t[14]=$):$=t[14];let B;t[15]===Symbol.for("react.memo_cache_sentinel")?(B=m.jsxs(ud,{className:"sr-only",children:[m.jsx(dd,{children:"Sidebar"}),m.jsx(fd,{children:"Displays the mobile sidebar."})]}),t[15]=B):B=t[15];let N;t[16]!==r?(N=m.jsx("div",{className:"flex h-full w-full flex-col",children:r}),t[16]=r,t[17]=N):N=t[17];let V;t[18]!==u||t[19]!==N?(V=m.jsxs(ld,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:$,side:u,children:[B,N]}),t[18]=u,t[19]=N,t[20]=V):V=t[20];let L;return t[21]!==g||t[22]!==s||t[23]!==v||t[24]!==V?(L=m.jsx(ly,{open:g,onOpenChange:v,...s,children:V}),t[21]=g,t[22]=s,t[23]=v,t[24]=V,t[25]=L):L=t[25],L}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 C;t[28]!==_?(C=m.jsx("div",{className:_}),t[28]=_,t[29]=C):C=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=m.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=m.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]!==C||t[46]!==d?(R=m.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:[C,A]}),t[40]=n,t[41]=u,t[42]=p,t[43]=A,t[44]=y,t[45]=C,t[46]=d,t[47]=R):R=t[47],R});Nd.displayName="Sidebar";const jd=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=m.jsx(Km,{}),d=m.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=m.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});jd.displayName="SidebarTrigger";const eb=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=m.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});eb.displayName="SidebarRail";const Md=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=m.jsx("main",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Md.displayName="SidebarInset";const tb=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=m.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});tb.displayName="SidebarInput";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("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=m.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});$d.displayName="SidebarHeader";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=m.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});zd.displayName="SidebarFooter";const nb=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=m.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});nb.displayName="SidebarSeparator";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 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=m.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});Fd.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=m.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=m.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 rb=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=m.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});rb.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=m.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=m.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=m.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 ob=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,g=d?xr:"button",{isMobile:v,state:y}=is();let b;t[8]!==r||t[9]!==p||t[10]!==f?(b=te(ob({variant:f,size:p}),r),t[8]=r,t[9]=p,t[10]=f,t[11]=b):b=t[11];let _;t[12]!==g||t[13]!==l||t[14]!==o||t[15]!==n||t[16]!==p||t[17]!==b?(_=m.jsx(g,{ref:n,"data-sidebar":"menu-button","data-size":p,"data-active":l,className:b,...o}),t[12]=g,t[13]=l,t[14]=o,t[15]=n,t[16]=p,t[17]=b,t[18]=_):_=t[18];const C=_;if(!u)return C;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]!==C?(S=m.jsx(Hy,{asChild:!0,children:C}),t[21]=C,t[22]=S):S=t[22];const E=y!=="collapsed"||v;let O;t[23]!==E||t[24]!==u?(O=m.jsx(Id,{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=m.jsxs(Wy,{children:[S,O]}),t[26]=S,t[27]=O,t[28]=I):I=t[28],I});Ko.displayName="SidebarMenuButton";const sb=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=m.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});sb.displayName="SidebarMenuAction";const ib=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=m.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});ib.displayName="SidebarMenuBadge";const ab=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&&m.jsx(bc,{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=m.jsx(bc,{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=m.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});ab.displayName="SidebarMenuSkeleton";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("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=m.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});cb.displayName="SidebarMenuSub";const lb=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=m.jsx("li",{ref:n,...r}),t[2]=r,t[3]=n,t[4]=o):o=t[4],o});lb.displayName="SidebarMenuSubItem";const ub=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 g;return t[10]!==d||t[11]!==o||t[12]!==s||t[13]!==n||t[14]!==u||t[15]!==p?(g=m.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]=g):g=t[16],g});ub.displayName="SidebarMenuSubButton";function db(e){return!e}function fb(e){return!e}var hb=Object.defineProperty,Ge=(e,n)=>hb(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),C=h.useRef(new Map).current;return m.jsx(o,{scope:y,itemMap:C,collectionRef:_,children:b})},"CollectionProvider");i.displayName=n;const a=e+"CollectionSlot",c=Yt(a),u=h.forwardRef((v,y)=>{const{scope:b,children:_}=v,C=s(a,b),S=Re(y,C.collectionRef);return m.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:_,...C}=v,S=h.useRef(null),E=Re(y,S),O=s(d,b);return h.useEffect(()=>(O.itemMap.set(S,{ref:S,...C}),()=>void O.itemMap.delete(S))),m.jsx(f,{[l]:"",ref:E,children:_})});p.displayName=d;function g(v){const y=s(e+"CollectionConsumer",v);return h.useCallback(()=>{const _=y.collectionRef.current;if(!_)return[];const C=Array.from(_.querySelectorAll(`[${l}]`));return Array.from(y.itemMap.values()).sort((O,I)=>C.indexOf(O.ref.current)-C.indexOf(I.ref.current))},[y.collectionRef,y.itemMap])}return Ge(g,"useCollection"),[{Provider:i,Slot:u,ItemSlot:p},g,r]}Ge(ia,"createCollection");var _c=new WeakMap,ze,ht,Os=(ht=class extends Map{constructor(t){super(t);ee(this,ze);H(this,ze,[...super.keys()]),_c.set(this,!0)}set(t,r){return _c.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 g=c;g<d;g++)if(c===g){let v=l[g];l[g]===r&&(v=l[g+1]),s&&this.delete(r),f=this.get(v),this.set(r,o)}else{!p&&l[g-1]===r&&(p=!0);const v=l[p?g:g-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=Ld(e,n);return t===-1?void 0:e[t]}Ge($o,"at");function Ld(e,n){const t=e.length,r=aa(n),o=r>=0?r:t+r;return o<0||o>=t?-1:o}Ge(Ld,"toSafeIndex");function aa(e){return e!==e||e===0?0:Math.trunc(e)}Ge(aa,"toSafeInteger");function pb(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:C,...S})=>C?m.jsx(c,{...S,state:C}):m.jsx(a,{...S}),"CollectionProvider");i.displayName=n;const a=Ge(C=>{const S=y();return m.jsx(c,{...C,state:S})},"CollectionInit");a.displayName=n+"Init";const c=Ge(C=>{const{scope:S,children:E,state:O}=C,I=h.useRef(null),[A,R]=h.useState(null),$=Re(I,R),[B,N]=O;return h.useEffect(()=>{if(!A)return;const V=Zd(()=>{});return V.observe(A,{childList:!0,subtree:!0}),()=>{V.disconnect()}},[A]),m.jsx(o,{scope:S,itemMap:B,setItemMap:N,collectionRef:$,collectionRefObject:I,collectionElement:A,children:E})},"CollectionProviderImpl");c.displayName=n+"Impl";const u=e+"CollectionSlot",d=Yt(u),l=h.forwardRef((C,S)=>{const{scope:E,children:O}=C,I=s(u,E),A=Re(S,I.collectionRef);return m.jsx(d,{ref:A,children:O})});l.displayName=u;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=Yt(f),v=h.forwardRef((C,S)=>{const{scope:E,children:O,...I}=C,A=h.useRef(null),[R,$]=h.useState(null),B=Re(S,A,$),N=s(f,E),{setItemMap:V}=N,L=h.useRef(I);Vd(L.current,I)||(L.current=I);const Y=L.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]),m.jsx(g,{[p]:"",ref:B,children:O})});v.displayName=f;function y(){return h.useState(new Os)}Ge(y,"useInitCollection");function b(C){const{itemMap:S}=s(e+"CollectionConsumer",C);return S}return Ge(b,"useCollection"),[{Provider:i,Slot:l,ItemSlot:v},{createCollectionScope:r,useCollection:b,useInitCollection:y}]}Ge(pb,"createCollection");function Vd(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(Vd,"shallowEqual");function Ud(e,n){return!!(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Ge(Ud,"isElementPreceding");function pi(e,n){return!e[1].element||!n[1].element?0:Ud(e[1].element,n[1].element)?-1:1}Ge(pi,"sortByDocumentPosition");function Zd(e){return new MutationObserver(t=>{for(const r of t)if(r.type==="childList"){e();return}})}Ge(Zd,"getChildListObserver");var mb=Object.defineProperty,gb=(e,n)=>mb(e,"name",{value:n,configurable:!0}),vb=h.createContext(void 0);function ca(e){const n=h.useContext(vb);return e||n||"ltr"}gb(ca,"useDirection");var yb=Object.defineProperty,la=(e,n)=>yb(e,"name",{value:n,configurable:!0}),Rs=!1;function Bd(){const[e,n]=h.useState(Rs);return h.useEffect(()=>{Rs||(Rs=!0,n(!0))},[]),e}la(Bd,"useIsHydrated");var Kd=_r[" useSyncExternalStore ".trim().toString()];function Wd(){return()=>{}}la(Wd,"subscribe");function Hd(){return Kd(Wd,()=>!0,()=>!1)}la(Hd,"useIsHydratedModern");var bb=typeof Kd=="function"?Hd:Bd,wb=Object.defineProperty,Ln=(e,n)=>wb(e,"name",{value:n,configurable:!0}),Ts="rovingFocusGroup.onEntryFocus",_b={bubbles:!1,cancelable:!0},as="RovingFocusGroup",[mi,Gd,xb]=ia(as),[Sb,qd]=nn(as,[xb]),[Eb,Cb]=Sb(as),kb=h.forwardRef(Ln(function(n,t){return m.jsx(mi.Provider,{scope:n.__scopeRovingFocusGroup,children:m.jsx(mi.Slot,{scope:n.__scopeRovingFocusGroup,children:m.jsx(Pb,{...n,ref:t})})})},"RovingFocusGroup")),Pb=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),g=Re(t,p),v=ca(i),[y,b]=oo({prop:a,defaultProp:c??null,onChange:u,caller:as}),[_,C]=h.useState(!1),S=Xt(d),E=Gd(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]),m.jsx(Eb,{scope:r,orientation:o,dir:v,loop:s,currentTabStopId:y,onItemFocus:h.useCallback(R=>b(R),[b]),onItemShiftTab:h.useCallback(()=>C(!0),[]),onFocusableItemAdd:h.useCallback(()=>A(R=>R+1),[]),onFocusableItemRemove:h.useCallback(()=>A(R=>R-1),[]),children:m.jsx(Me.div,{tabIndex:_||I===0?-1:0,"data-orientation":o,...f,ref:g,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 B=new CustomEvent(Ts,_b);if(R.currentTarget.dispatchEvent(B),!B.defaultPrevented){const N=E().filter(Q=>Q.focusable),V=N.find(Q=>Q.active),L=N.find(Q=>Q.id===y),W=[V,L,...N].filter(Boolean).map(Q=>Q.ref.current);ua(W,l)}}O.current=!1}),onBlur:oe(n.onBlur,()=>C(!1))})})},"RovingFocusGroupImpl")),Ob="RovingFocusGroupItem",Rb=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=Cb(Ob,r),f=l.currentTabStopId===d,p=Gd(r),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:y}=l,b=bb();return lt(()=>{if(!(!b||!o))return g(),()=>v()},[b,o,g,v]),h.useEffect(()=>{if(!(b||!o))return g(),()=>v()},[b,o,g,v]),m.jsx(mi.ItemSlot,{scope:r,id:d,focusable:o,active:s,children:m.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 C=Jd(_,l.orientation,l.dir);if(C!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let E=p().filter(O=>O.focusable).map(O=>O.ref.current);if(C==="last")E.reverse();else if(C==="prev"||C==="next"){C==="prev"&&E.reverse();const O=E.indexOf(_.currentTarget);E=l.loop?Yd(E,O+1):E.slice(O+1)}setTimeout(()=>ua(E))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:y!=null}):a})})},"RovingFocusGroupItem")),Tb={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Qd(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Ln(Qd,"getDirectionAwareKey");function Jd(e,n,t){const r=Qd(e.key,t);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Tb[r]}Ln(Jd,"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 Yd(e,n){return e.map((t,r)=>e[(n+r)%e.length])}Ln(Yd,"wrapArray");var Ib=kb,Ab=Rb,Db=Object.defineProperty,ge=(e,n)=>Db(e,"name",{value:n,configurable:!0}),gi=["Enter"," "],Nb=["ArrowDown","PageUp","Home"],Xd=["ArrowUp","PageDown","End"],jb=[...Nb,...Xd],Mb={ltr:[...gi,"ArrowRight"],rtl:[...gi,"ArrowLeft"]},$b={ltr:["ArrowLeft"],rtl:["ArrowRight"]},cs="Menu",[Wr,zb,Fb]=ia(cs),[Vn,ef]=nn(cs,[Fb,os,qd]),da=os(),tf=qd(),[Lb,Un]=Vn(cs),[Vb,io]=Vn(cs),Ub=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",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},"handleKeyDown"),g=ge(()=>d.current=!1,"handlePointer");return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),h.useEffect(()=>{if(!t)return;const p=ge(()=>l(!1),"handleBlur");return window.addEventListener("blur",p),()=>window.removeEventListener("blur",p)},[t,l]),m.jsx(bd,{...a,children:m.jsx(Lb,{scope:n,open:t,onOpenChange:l,content:c,onContentChange:u,children:m.jsx(Vb,{scope:n,onClose:h.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:d,dir:f,modal:i,children:r})})})},"Menu"),nf=h.forwardRef(ge(function(n,t){const{__scopeMenu:r,...o}=n,s=da(r);return m.jsx(wd,{...s,...o,ref:t})},"MenuAnchor")),rf="MenuPortal",[Zb,of]=Vn(rf,{forceMount:void 0}),Bb=ge(e=>{const{__scopeMenu:n,forceMount:t,children:r,container:o}=e,s=Un(rf,n);return m.jsx(Zb,{scope:n,forceMount:t,children:m.jsx(rn,{present:t||s.open,children:m.jsx(Xi,{asChild:!0,container:o,children:r})})})},"MenuPortal"),Rt="MenuContent",[Kb,fa]=Vn(Rt),Wb=h.forwardRef(ge(function(n,t){const r=of(Rt,n.__scopeMenu),{forceMount:o=r.forceMount,...s}=n,i=Un(Rt,n.__scopeMenu),a=io(Rt,n.__scopeMenu);return m.jsx(Wr.Provider,{scope:n.__scopeMenu,children:m.jsx(rn,{present:o||i.open,children:m.jsx(Wr.Slot,{scope:n.__scopeMenu,children:a.modal?m.jsx(Hb,{...s,ref:t}):m.jsx(Gb,{...s,ref:t})})})})},"MenuContent")),Hb=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 Xu(i)},[]),m.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")),Gb=h.forwardRef(ge(function(n,t){const r=Un(Rt,n.__scopeMenu);return m.jsx(ha,{...n,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentNonModal")),qb=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:g,disableOutsideScroll:v,...y}=n,b=Un(Rt,r),_=io(Rt,r),C=da(r),S=tf(r),E=zb(r),[O,I]=h.useState(null),A=h.useRef(null),R=Re(t,A,b.onContentChange),$=h.useRef(0),B=h.useRef(""),N=h.useRef(0),V=h.useRef(null),L=h.useRef("right"),Y=h.useRef(0),W=v?ta:h.Fragment,Q=v?{as:qb,allowPinchZoom:!0}:void 0,he=ge(G=>{var Ie,de;const se=B.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=ff(ce,se,X),_e=(de=le.find(xe=>xe.textValue===pe))==null?void 0:de.ref.current;ge((function xe(Ze){B.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 L.current===((le=V.current)==null?void 0:le.side)&&pf(G,(Se=V.current)==null?void 0:Se.area)},[]);return m.jsx(Kb,{scope:r,searchRef:B,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:N,onPointerGraceIntentChange:h.useCallback(G=>{V.current=G},[]),children:m.jsx(W,{...Q,children:m.jsx(Nu,{asChild:!0,trapped:s,onMountAutoFocus:oe(i,G=>{var se;G.preventDefault(),(se=A.current)==null||se.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:m.jsx(Qi,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:p,onDismiss:g,children:m.jsx(Ib,{asChild:!0,...S,dir:_.dir,orientation:"vertical",loop:o,currentTabStopId:O,onCurrentTabStopIdChange:I,onEntryFocus:oe(u,G=>{_.isUsingKeyboardRef.current||G.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(_d,{role:"menu","aria-orientation":"vertical","data-state":ma(b.open),"data-radix-menu-content":"",dir:_.dir,...C,...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||!jb.includes(G.key))return;G.preventDefault();const _e=E().filter(Ie=>!Ie.disabled).map(Ie=>Ie.ref.current);Xd.includes(G.key)&&_e.reverse(),uf(_e)}),onBlur:oe(n.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout($.current),B.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";L.current=Se,Y.current=G.clientX}}))})})})})})})},"MenuContentImpl")),Qb=h.forwardRef(ge(function(n,t){const{__scopeMenu:r,...o}=n;return m.jsx(Me.div,{...o,ref:t})},"MenuLabel")),vi="MenuItem",xc="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(xc,{bubbles:!0,cancelable:!0});f.addEventListener(xc,g=>o==null?void 0:o(g),{once:!0}),qi(f,p),p.defaultPrevented?d.current=!1:a.onClose()}},"handleSelect");return m.jsx(sf,{...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")),sf=h.forwardRef(ge(function(n,t){const{__scopeMenu:r,disabled:o=!1,textValue:s,...i}=n,a=fa(vi,r),c=tf(r),u=h.useRef(null),d=Re(t,u),[l,f]=h.useState(!1),[p,g]=h.useState("");return h.useEffect(()=>{const v=u.current;v&&g((v.textContent??"").trim())},[i.children]),m.jsx(Wr.ItemSlot,{scope:r,disabled:o,textValue:s??p,children:m.jsx(Ab,{asChild:!0,...c,focusable:!o,children:m.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")),Jb=h.forwardRef(ge(function(n,t){const{checked:r=!1,onCheckedChange:o,...s}=n;return m.jsx(cf,{scope:n.__scopeMenu,checked:r,children:m.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")),Yb="MenuRadioGroup",[$C,Xb]=Vn(Yb,{value:void 0,onValueChange:ge(()=>{},"onValueChange")}),ew="MenuRadioItem",tw=h.forwardRef(ge(function(n,t){const{value:r,...o}=n,s=Xb(ew,n.__scopeMenu),i=r===s.value;return m.jsx(cf,{scope:n.__scopeMenu,checked:i,children:m.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")),af="MenuItemIndicator",[cf,nw]=Vn(af,{checked:!1}),rw=h.forwardRef(ge(function(n,t){const{__scopeMenu:r,forceMount:o,...s}=n,i=nw(af,r);return m.jsx(rn,{present:o||Hr(i.checked)||i.checked===!0,children:m.jsx(Me.span,{...s,ref:t,"data-state":ls(i.checked)})})},"MenuItemIndicator")),ow=h.forwardRef(ge(function(n,t){const{__scopeMenu:r,...o}=n;return m.jsx(Me.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})},"MenuSeparator")),sw="MenuSub",[zC,lf]=Vn(sw),So="MenuSubTrigger",iw=h.forwardRef(ge(function(n,t){const r=Un(So,n.__scopeMenu),o=io(So,n.__scopeMenu),s=lf(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 m.jsx(nf,{asChild:!0,...d,children:m.jsx(sf,{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 g;(g=n.onClick)==null||g.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 g=(v=r.content)==null?void 0:v.getBoundingClientRect();if(g){const b=(y=r.content)==null?void 0:y.dataset.side,_=b==="right",C=_?-5:5,S=g[_?"left":"right"],E=g[_?"right":"left"];i.onPointerGraceIntentChange({area:[{x:p.clientX+C,y:p.clientY},{x:S,y:g.top},{x:E,y:g.top},{x:E,y:g.bottom},{x:S,y:g.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===" "||Mb[o.dir].includes(p.key)&&(r.onOpenChange(!0),(v=r.content)==null||v.focus(),p.preventDefault())})})})},"MenuSubTrigger")),aw="MenuSubContent",cw=h.forwardRef(ge(function(n,t){const r=of(Rt,n.__scopeMenu),{forceMount:o=r.forceMount,align:s="start",...i}=n,a=Un(Rt,n.__scopeMenu),c=io(Rt,n.__scopeMenu),u=lf(aw,n.__scopeMenu),d=h.useRef(null),l=Re(t,d);return m.jsx(Wr.Provider,{scope:n.__scopeMenu,children:m.jsx(rn,{present:o||a.open,children:m.jsx(Wr.Slot,{scope:n.__scopeMenu,children:m.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),g=$b[c.dir].includes(f.key);p&&g&&(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 uf(e){const n=document.activeElement;for(const t of e)if(t===n||(t.focus(),document.activeElement!==n))return}ge(uf,"focusFirst");function df(e,n){return e.map((t,r)=>e[(n+r)%e.length])}ge(df,"wrapArray");function ff(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=df(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(ff,"getNextMatch");function hf(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(hf,"isPointInPolygon");function pf(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return hf(t,n)}ge(pf,"isPointerInGraceArea");function vr(e){return n=>n.pointerType==="mouse"?e(n):void 0}ge(vr,"whenMouse");var lw=Ub,uw=nf,dw=Bb,fw=Wb,hw=Qb,pw=pa,mw=Jb,gw=tw,vw=rw,yw=ow,bw=iw,ww=cw,_w=Object.defineProperty,_t=(e,n)=>_w(e,"name",{value:n,configurable:!0}),ga="DropdownMenu",[xw,FC]=nn(ga,[ef]),xt=ef(),[Sw,mf]=xw(ga),Ew=_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 m.jsx(Sw,{scope:n,triggerId:wn(),triggerRef:u,contentId:wn(),open:d,onOpenChange:l,onOpenToggle:h.useCallback(()=>l(f=>!f),[l]),modal:a,children:m.jsx(lw,{...c,open:d,onOpenChange:l,dir:r,modal:a,children:t})})},"DropdownMenu"),Cw="DropdownMenuTrigger",kw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,disabled:o=!1,...s}=n,i=mf(Cw,r),a=xt(r),c=Re(t,i.triggerRef);return m.jsx(uw,{asChild:!0,...a,children:m.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")),Pw=_t(e=>{const{__scopeDropdownMenu:n,...t}=e,r=xt(n);return m.jsx(dw,{...r,...t})},"DropdownMenuPortal"),Ow="DropdownMenuContent",Rw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=mf(Ow,r),i=xt(r),a=h.useRef(!1);return m.jsx(fw,{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")),Tw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return m.jsx(hw,{...s,...o,ref:t})},"DropdownMenuLabel")),Iw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return m.jsx(pw,{...s,...o,ref:t})},"DropdownMenuItem")),Aw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return m.jsx(mw,{...s,...o,ref:t})},"DropdownMenuCheckboxItem")),Dw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return m.jsx(gw,{...s,...o,ref:t})},"DropdownMenuRadioItem")),Nw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return m.jsx(vw,{...s,...o,ref:t})},"DropdownMenuItemIndicator")),jw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return m.jsx(yw,{...s,...o,ref:t})},"DropdownMenuSeparator")),Mw=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return m.jsx(bw,{...s,...o,ref:t})},"DropdownMenuSubTrigger")),$w=h.forwardRef(_t(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=xt(r);return m.jsx(ww,{...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")),zw=Ew,Fw=kw,Lw=Pw,gf=Rw,vf=Tw,yf=Iw,bf=Aw,wf=Dw,_f=Nw,xf=jw,Sf=Mw,Ef=$w;const Vw=zw,Uw=Fw,Zw=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=m.jsx(zm,{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=m.jsxs(Sf,{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});Zw.displayName=Sf.displayName;const Bw=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=m.jsx(Ef,{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Bw.displayName=Ef.displayName;const Cf=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=m.jsx(Lw,{children:m.jsx(gf,{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});Cf.displayName=gf.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=m.jsx(yf,{ref:n,className:a,...s}),t[7]=s,t[8]=n,t[9]=a,t[10]=c):c=t[10],c});yi.displayName=yf.displayName;const Kw=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=m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(_f,{children:m.jsx($m,{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=m.jsxs(bf,{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});Kw.displayName=bf.displayName;const Ww=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=m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(_f,{children:m.jsx(Fm,{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=m.jsxs(wf,{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});Ww.displayName=wf.displayName;const Hw=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=m.jsx(vf,{ref:n,className:a,...s}),t[7]=s,t[8]=n,t[9]=a,t[10]=c):c=t[10],c});Hw.displayName=vf.displayName;const kf=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=m.jsx(xf,{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});kf.displayName=xf.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 Pf={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 Gw(){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 qw(){const{data:e,status:n}=await Pf.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 LC(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 Qw=()=>Cr("/api/v1/settings"),VC=()=>Cr("/api/v1/tokens"),UC=()=>Cr("/api/v1/team/members"),ZC=e=>Cr(`/api/v1/comments?build_id=${e}`),BC=e=>Cr(`/api/v1/recordings?buildId=${e}`),KC=()=>Cr("/api/v1/agents");async function WC(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 HC(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 GC(){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 qC({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 QC(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}async function JC(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(!t.ok)throw new Error(`PATCH /api/v1/builds/${e} failed with ${t.status}`)}async function YC(e){const n=await fetch(`/api/v1/builds/${e}/schedule-deletion`,{method:"POST",credentials:"include"});if(!n.ok)throw new Error(`Failed to schedule deletion (${n.status})`);return(await n.json()).delete_after}async function XC(e){const n=await fetch(`/api/v1/builds/${e}/schedule-deletion`,{method:"DELETE",credentials:"include"});if(!n.ok)throw new Error(`Failed to cancel scheduled deletion (${n.status})`)}async function e2(e){const n=await fetch(`/api/v1/builds/${e}`,{credentials:"include"});return n.ok?n.json():null}function t2(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 Of(){const e=J.c(4);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={queryKey:va.me,queryFn:qw},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 Jw=6;function Yw(e){let n=0;for(const t of e)n=n*31+t.charCodeAt(0)&4294967295;return Math.abs(n)}function Xw(e){const n=Yw(e)%Jw+1;return{bg:`hsl(var(--avatar-${n}-bg))`,fg:`hsl(var(--avatar-${n}-fg))`}}function e0(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?(_=m.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=Xw(t),n[10]=t,n[11]=l):l=n[11];const{bg:f,fg:p}=l,g=s*.42;let v;n[12]!==f||n[13]!==p||n[14]!==d||n[15]!==g?(v={...d,background:f,display:"inline-flex",alignItems:"center",justifyContent:"center",color:p,fontSize:g,fontWeight:600,userSelect:"none"},n[12]=f,n[13]=p,n[14]=d,n[15]=g,n[16]=v):v=n[16];let y;return n[17]!==c||n[18]!==v?(y=m.jsx("span",{style:v,children:c}),n[17]=c,n[18]=v,n[19]=y):y=n[19],y}const t0=[{label:"App Center",href:"/app-center",icon:Vm},{label:"Mac Resources",href:"/mac-resources",icon:Zm}],n0=[{label:"Default",href:"/settings/default",icon:uu,adminOnly:!1},{label:"Team",href:"/settings/team",icon:Hm,adminOnly:!0},{label:"Tokens",href:"/settings/tokens",icon:Lm,adminOnly:!0}],r0=[{label:"Docs",href:"https://www.tapflow.dev",icon:Mm}];function o0(){const e=J.c(37),{pathname:n}=Tl(),t=Il(),{user:r}=Of(),o=(r==null?void 0:r.role)==="Admin",{resolvedTheme:s}=Xo(),i=s==="dark"?"/logo-dark.svg":"/logo.svg";let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={queryKey:va.settings,queryFn:Qw},e[0]=a):a=e[0];const c=Wi(a).data,u=(c==null?void 0:c.logo_url)??null,d=(c==null?void 0:c.team_name)||"tapflow",l=Li();let f;e[1]!==t||e[2]!==l?(f=async function(){await fetch("/api/v1/auth/logout",{method:"POST",credentials:"include"}),l.clear(),t("/login",{replace:!0})},e[1]=t,e[2]=l,e[3]=f):f=e[3];const p=f,g=u??i;let v;e[4]!==g?(v=m.jsx("img",{src:g,alt:"tapflow",className:"w-6 h-6 min-w-6 shrink-0"}),e[4]=g,e[5]=v):v=e[5];let y;e[6]!==d?(y=m.jsx("span",{className:"text-base font-semibold tracking-tight truncate text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden",children:d}),e[6]=d,e[7]=y):y=e[7];let b;e[8]!==v||e[9]!==y?(b=m.jsx($d,{className:"p-2",children:m.jsxs(po,{to:"/app-center",className:"flex items-center gap-2 p-1",children:[v,y]})}),e[8]=v,e[9]=y,e[10]=b):b=e[10];let _;e[11]!==n?(_=t0.map(N=>m.jsx(Bo,{children:m.jsx(Ko,{asChild:!0,isActive:n.startsWith(N.href),tooltip:N.label,children:m.jsxs(po,{to:N.href,children:[m.jsx(N.icon,{}),m.jsx("span",{children:N.label})]})})},N.href)),e[11]=n,e[12]=_):_=e[12];let C;e[13]!==_?(C=m.jsx(No,{children:m.jsx(jo,{children:m.jsx(Mo,{children:_})})}),e[13]=_,e[14]=C):C=e[14];let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=m.jsx(hi,{children:"Settings"}),e[15]=S):S=e[15];let E;if(e[16]!==o||e[17]!==n){let N;e[19]!==o?(N=L=>!L.adminOnly||o,e[19]=o,e[20]=N):N=e[20];let V;e[21]!==n?(V=L=>m.jsx(Bo,{children:m.jsx(Ko,{asChild:!0,isActive:n===L.href,tooltip:L.label,children:m.jsxs(po,{to:L.href,children:[m.jsx(L.icon,{}),m.jsx("span",{children:L.label})]})})},L.href),e[21]=n,e[22]=V):V=e[22],E=n0.filter(N).map(V),e[16]=o,e[17]=n,e[18]=E}else E=e[18];let O;e[23]!==E?(O=m.jsxs(No,{children:[S,m.jsx(jo,{children:m.jsx(Mo,{children:E})})]}),e[23]=E,e[24]=O):O=e[24];let I;e[25]===Symbol.for("react.memo_cache_sentinel")?(I=m.jsx(hi,{children:"Reference"}),e[25]=I):I=e[25];let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=m.jsxs(No,{children:[I,m.jsx(jo,{children:m.jsx(Mo,{children:r0.map(s0)})})]}),e[26]=A):A=e[26];let R;e[27]!==O||e[28]!==C?(R=m.jsxs(Fd,{children:[C,O,A]}),e[27]=O,e[28]=C,e[29]=R):R=e[29];let $;e[30]!==p||e[31]!==r?($=r&&m.jsx(zd,{className:"px-3 py-3",children:m.jsxs(Vw,{children:[m.jsx(Uw,{asChild:!0,children:m.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:[m.jsx(e0,{name:r.displayName??"",avatarUrl:r.avatarUrl,size:28}),m.jsxs("div",{className:"flex flex-col min-w-0 flex-1 group-data-[collapsible=icon]:hidden",children:[m.jsx("span",{className:"text-sm font-medium truncate",children:r.displayName}),m.jsx("span",{className:"text-xs text-muted-foreground truncate",children:r.email})]})]})}),m.jsxs(Cf,{side:"top",align:"start",className:"w-56",children:[m.jsx(yi,{asChild:!0,children:m.jsxs(po,{to:"/settings/default",children:[m.jsx(uu,{className:"mr-2 h-4 w-4"}),"Settings"]})}),m.jsx(kf,{}),m.jsxs(yi,{onClick:p,className:"text-destructive focus:text-destructive",children:[m.jsx(Um,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})}),e[30]=p,e[31]=r,e[32]=$):$=e[32];let B;return e[33]!==R||e[34]!==$||e[35]!==b?(B=m.jsxs(Nd,{collapsible:"icon",children:[b,R,$]}),e[33]=R,e[34]=$,e[35]=b,e[36]=B):B=e[36],B}function s0(e){return m.jsx(Bo,{children:m.jsx(Ko,{asChild:!0,tooltip:e.label,children:m.jsxs("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",children:[m.jsx(e.icon,{}),m.jsx("span",{children:e.label})]})})},e.href)}function i0(){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=m.jsx(Wm,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),s=m.jsx(Bm,{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=m.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 Rf=h.createContext({node:null,setNode:()=>{}});function a0(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=m.jsx(Rf.Provider,{value:i,children:t}),n[2]=t,n[3]=i,n[4]=a):a=n[4],a}function c0(){return h.useContext(Rf)}function l0(){const e=J.c(8),{node:n}=c0();let t,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=m.jsx(jd,{className:"-ml-1"}),r=m.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=m.jsx("div",{className:"flex-1"}),s=m.jsx(i0,{}),i=m.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=m.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:m.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4 fill-current","aria-hidden":"true",children:m.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=m.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 u0(){const e=J.c(5),{user:n,loading:t}=Of(),r=Tl();if(t)return null;if(!n){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=m.jsx(zi,{to:"/login",replace:!0}),e[0]=c):c=e[0],c}if(["/settings/team","/settings/tokens"].some(c=>r.pathname.startsWith(c))&&n.role!=="Admin"){let c;return e[1]===Symbol.for("react.memo_cache_sentinel")?(c=m.jsx("div",{className:"flex h-screen items-center justify-center",children:m.jsxs("div",{className:"text-center space-y-2",children:[m.jsx("p",{className:"text-lg font-semibold",children:"Access Denied"}),m.jsx("p",{className:"text-sm text-muted-foreground",children:"This page is only accessible to Admins."})]})}),e[1]=c):c=e[1],c}let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=m.jsx(o0,{}),e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=m.jsx(l0,{}),e[3]=i):i=e[3];let a;return e[4]===Symbol.for("react.memo_cache_sentinel")?(a=m.jsx(a0,{children:m.jsxs(Dd,{children:[s,m.jsxs(Md,{children:[i,m.jsx("main",{className:"flex-1 min-h-0 overflow-auto",children:m.jsx(h.Suspense,{fallback:m.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"Loading…"}),children:m.jsx(Hh,{})})})]})]})}),e[4]=a):a=e[4],a}var ao=e=>e.type==="checkbox",us=e=>e.type==="file",bn=e=>e instanceof Date,Ke=e=>e==null;const ya=e=>typeof e=="object";var Oe=e=>!Ke(e)&&!Array.isArray(e)&&ya(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 d0=/[.[\]'"]/;var zn=e=>e.split(d0).filter(Boolean);function f0(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 Tf=(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"},If="root",ba=["__proto__","constructor","prototype"],h0=/^\w*$/;var yr=e=>h0.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=>ba.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(ba.includes(a))return;e[a]=c,e=e[a]}};const Af=T.createContext(null);Af.displayName="HookFormControlContext";const wa=()=>T.useContext(Af);var Df=(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 _a=ds?T.useLayoutEffect:T.useEffect;var p0=e=>{const n=e.constructor&&e.constructor.prototype;return Oe(n)&&n.hasOwnProperty("isPrototypeOf")},_i=e=>Ke(e)||!ya(e);const Sc=(e,n)=>n.length===0&&!Array.isArray(e)&&!p0(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(Sc(e,r)||Sc(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 xa(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 m0(e){const n=wa(),{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}=xa(i);return _a(()=>{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(()=>Df(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 g0(e){const n=wa(),{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,g]=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 B=u.current($);ct(B,v.current)||(g(B),v.current=B)}else g($)}},[t._formValues,t._names,s,r]),{resyncIfNeeded:_,snapshot:C}=xa(f),S=T.useRef(b);S.current=b;const E=T.useRef(y);E.current=y,_a(()=>{d.current!==t||!ct(l.current,r)?(d.current=t,l.current=r,S.current()):_(!s,()=>E.current(),$=>{g($),v.current=$});const R=t._subscribe({name:r,formState:{values:!0},exact:i,callback:$=>{S.current($.values)}});return()=>{R(),C(!s,()=>E.current())}},[t,i,r,s,_,C]),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 v0(e){const n=wa(),{name:t,disabled:r,control:o=n,shouldUnregister:s,defaultValue:i,exact:a=!0}=e,c=Tf(o._names.array,t),u=T.useMemo(()=>{const S=U(o._formValues,t,U(o._defaultValues,t,i));return me(S)?f0(o,t):S},[o,t,i]),d=g0({control:o,name:t,defaultValue:u,exact:a}),l=m0({control:o,name:t,exact:a}),f=T.useRef(e),p=T.useRef(null),g=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)||(g.current=o.register(t,{...f.current.rules,value:E})),g.current.onChange({target:{value:wi(S),name:t},type:dn.CHANGE})},[t,o]),b=T.useCallback(()=>g.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]),C=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;g.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:C,formState:l,fieldState:v}),[C,l,v])}const n2=e=>e.render(v0(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 Ec=(e,n,t)=>{const r=U(e,t),o=Array.isArray(r)?r:[];return ve(o,If,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)},Sa=e=>e.type==="radio",Ho=e=>e instanceof RegExp,Ea=(e,n,t,r,o)=>n?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[r]:o||!0}}:{};const Cc={value:!1,isValid:!1},kc={value:!0,isValid:!0};var Nf=e=>{if(!Array.isArray(e))return Cc;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?Cc:!n.attributes||!("value"in n.attributes)||me(n.value)||n.value===""?kc:{value:n.value,isValid:!0}};const Pc={isValid:!1,value:null};var jf=e=>Array.isArray(e)?e.reduce((n,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:n,Pc):Pc;function Oc(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:""},Rc=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:g,name:v,valueAsNumber:y,mount:b}=e._f,_=U(t,v);if(!b||n.has(v))return{};const C=a?a[0]:i,S=V=>{if(o&&C.reportValidity){const L=pt(V)?"":V||"";a?a.forEach(Y=>Y.setCustomValidity(L)):C.setCustomValidity(L),C.reportValidity()}},E={},O=Sa(i),I=ao(i),A=O||I,R=(y||us(i))&&me(i.value)&&me(_)||Wo(i)&&i.value===""||_===""||Array.isArray(_)&&!_.length,$=Ea.bind(null,v,r,E),B=(V,L,Y,W=kt.maxLength,Q=kt.minLength)=>{const he=V?L: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&&!Nf(a).isValid||O&&!jf(a).isValid)){const{value:V,message:L}=He(c)?{value:!!c,message:c}:Xn(c);if(V&&(E[v]={type:kt.required,message:L,ref:C,...$(kt.required,L)},!r))return S(L),E}if(!R&&(!Ke(l)||!Ke(f))){let V,L;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)||(L=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)&&_&&(L=ne?he(_)<he(W.value):G?_<W.value:Q<new Date(W.value))}if((V||L)&&(B(!!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),L=Xn(d),Y=!Ke(V.value)&&_.length>+V.value,W=!Ke(L.value)&&_.length<+L.value;if((Y||W)&&(B(Y,V.message,L.message),!r))return S(E[v].message),E}if(p&&!R&&He(_)){const{value:V,message:L}=Xn(p);if(Ho(V)&&!_.match(V)&&(E[v]={type:kt.pattern,message:L,ref:i,...$(kt.pattern,L)},!r))return S(L),E}if(g){if(et(g)){const V=await g(_,t),L=Oc(V,C);if(L&&(E[v]={...L,...$(kt.validate,L.message)},!r))return S(L.message),E}else if(Oe(g)){let V={};for(const L in g){if(!$e(V)&&!r)break;const Y=Oc(await g[L](_,t),C,L);Y&&(V={...Y,...$(L,Y.message)},r||S(Y.message),r&&(E[v]=V))}if(!$e(V)&&(E[v]={ref:C,...V},!r))return E}}const N=E[v];return S(N?N.message:!0),E},zo=e=>Array.isArray(e)?e:[e],Mf=e=>Array.isArray(e)?e.filter(Boolean):[];function y0(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 b0(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=>ba.includes(String(i))))return e;const r=t.length===1?e:y0(e,t),o=t.length-1,s=t[o];return r&&delete r[s],o!==0&&(Oe(r)&&$e(r)||Array.isArray(r)&&b0(r))&&je(e,t.slice(0,-1)),e}const w0=T.createContext(null);w0.displayName="HookFormContext";var Tc=()=>{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 $f(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=$f(o,s);Oe(i)&&(t[r]=i)}else e[r]&&(t[r]=s)}return t}const Ic=(e,n)=>e!==null&&ya(e)&&Object.prototype.hasOwnProperty.call(e,n);var _0=(e,n)=>{if(!n)return!1;let t=e;for(const r of yr(n)?[n]:zn(n)){if(!Ic(t,r))return Ic(e,n);t=t[r]}return!0},zf=e=>e.type==="select-multiple",x0=e=>Sa(e)||ao(e),As=e=>Wo(e)&&e.isConnected;function Ac(e){return Array.isArray(e)||Oe(e)}function Ff(e,n,t="",r=[]){for(const o in e){const s=t?`${t}.${o}`:o,i=e[o];Ac(i)&&Ac(U(n,s))?Ff(i,n,s,r):r.push(s)}return r}var S0=e=>{for(const n in e)if(et(e[n]))return!0;return!1};function Lf(e){return Array.isArray(e)||Oe(e)&&!S0(e)}function Vf(e){return!!(e&&"_f"in e)}function Uf(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];Lf(o)&&(!Array.isArray(o)||!Vf(s))?(n[r]=Array.isArray(o)?[]:{},Ei(o,n[r],s),Uf(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];Lf(s)&&(!Array.isArray(s)||!Vf(i))?(me(n)||_i(t[o])?t[o]=Ei(s,Array.isArray(s)?[]:{},i):ln(s,Ke(n)?{}:n[o],t[o],i),Uf(t[o])&&Si(t,o)):ct(s,n[o])?Si(t,o):t[o]=!0}return t}var E0=(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 Dc(e){const n=e.ref;return us(n)?n.files:Sa(n)?jf(e.refs).value:zf(n)?[...n.selectedOptions].map(({value:t})=>t):ao(n)?Nf(e.refs).value:Ci(n.value,e)}var C0=(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 Nc="AsyncFunction";var k0=e=>{if(!e||!e.validate)return!1;if(et(e.validate))return e.validate.constructor.name===Nc;if(Oe(e.validate)){for(const n in e.validate)if(e.validate[n].constructor.name===Nc)return!0}return!1},P0=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 jc(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 O0=(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))},R0=(e,n,t)=>!e||!n||e===n||zo(e).some(r=>r&&(t?r===n||r.startsWith(n+"."):r.startsWith(n)||n.startsWith(r))),T0=(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,I0=(e,n)=>{const t=U(e,n);!Mf(t).length&&!(t!=null&&t.root)&&je(e,n)};const A0={mode:wt.onSubmit,reValidateMode:wt.onChange,shouldFocusError:!0},Ds="form",D0=(e,n)=>{for(const t in e)t in n||delete e[t];Object.assign(e,n)},Zf={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function N0(e={}){let n={...A0,...e},t={...Ce(Zf),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},g={...p};let v={...g};const y=(...w)=>w.some(k=>g[k]||v[k]),b={array:Tc(),state:Tc()};let _=0,C=0,S=n.criteriaMode===wt.all;const E=(w,k)=>P=>{clearTimeout(u[w]),u[w]=setTimeout(k,P)},O=w=>{clearTimeout(u[w]),delete u[w],delete c[w]},I=w=>{O(w);const k=`${w}.`;for(const P of Object.keys(c))P.startsWith(k)&&O(P)},A=async w=>{if(!i.keepIsValid&&!n.disabled&&(y("isValid")||w)){const k=++_;let P;n.resolver?(P=$e((await ne()).errors),k===_&&R()):P=await le({fields:r,onlyCheckValid:!0,eventType:dn.VALID}),k===_&&P!==t.isValid&&b.state.next({isValid:P})}},R=(w,k)=>{!n.disabled&&y("isValidating","validatingFields")&&((w||a.mount).forEach(P=>{P&&(k?ve(t.validatingFields,P,k):je(t.validatingFields,P))}),b.state.next({validatingFields:t.validatingFields,isValidating:!$e(t.validatingFields)}))},$=()=>{t.dirtyFields=ln(o,s,void 0,r)},B=(w,k=[],P,j,D=!0,K=!0)=>{if(j&&P&&!n.disabled){i.action=!0;const F=U(r,w);if(i.actionArrayLengths.has(w)||i.actionArrayLengths.set(w,Array.isArray(F)?F.length:0),K&&Array.isArray(F)){const z=P(F,j.argA,j.argB);D&&ve(r,w,z)}const Z=U(t.errors,w);if(K&&Array.isArray(Z)){const z=Z.root,ie=P(Z,j.argA,j.argB)||Z;z&&(ie.root=z),D&&ve(t.errors,w,ie),I0(t.errors,w)}const q=U(t.touchedFields,w);if(y("touchedFields")&&K&&Array.isArray(q)){const z=P(q,j.argA,j.argB);D&&ve(t.touchedFields,w,z)}y("dirtyFields")&&$(),b.state.next({name:w,isDirty:X(w,k),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else ve(s,w,k)},N=(w,k)=>{ve(t.errors,w,k),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})},L=w=>{const k=yr(w)?[w]:zn(w);let P=s,j=o;for(let D=0;D<k.length-1;D++){const K=k[D];if(P=Ke(P)?P:P[K],j=Ke(j)?j:j[K],P===null&&j!==null)return!0}return!1},Y=w=>{if(!i.actionArrayLengths.size)return!1;const k=yr(w)?[w]:zn(w);let P=s,j="",D=-1,K=0;for(let F=0;F<k.length;F++){if(Ke(P))return!1;const Z=k[F];if(j=j?`${j}.${Z}`:Z,Array.isArray(P)&&+Z>=P.length)return D===-1?!1:F===D?+Z<K:!0;if(i.actionArrayLengths.has(j)&&(D=F+1,K=i.actionArrayLengths.get(j)),P=P[Z],me(P)&&D!==-1&&F>D&&+k[D]<K)return!0}return!1},W=(w,k,P,j)=>{const D=U(r,w);if(D){if(L(w)||Y(w))return;const K=me(U(s,w)),F=U(s,w,me(P)?U(o,w):P);me(F)||j&&j.defaultChecked||k?ve(s,w,k?F:Dc(D._f)):_e(w,F),i.mount&&!i.action&&(A(),K&&t.isDirty&&y("isDirty")&&(X()||(t.isDirty=!1,b.state.next({...t}))),e.shouldUnregister&&K&&!me(U(s,w))&&Is(w,a)&&(i.watch=!0))}},Q=(w,k,P,j,D)=>{let K=!1,F=!1;const Z={name:w};if(!n.disabled||j===!0){if(!P||j){const q=ct(U(o,w),k);y("isDirty")&&(F=t.isDirty,t.isDirty=Z.isDirty=!q||X(),K=F!==Z.isDirty),F=!!U(t.dirtyFields,w),q!==t.isDirty?D0(t.dirtyFields,ln(o,s,void 0,r)):q?je(t.dirtyFields,w):ve(t.dirtyFields,w,!0),Z.dirtyFields=t.dirtyFields,K=K||y("dirtyFields")&&F!==!q}if(P){const q=U(t.touchedFields,w);q||(ve(t.touchedFields,w,P),Z.touchedFields=t.touchedFields,K=K||y("touchedFields")&&q!==P)}K&&D&&b.state.next(Z)}return K?Z:{}},he=(w,k,P,j)=>{const D=U(t.errors,w),K=y("isValid")&&pt(k)&&t.isValid!==k;if(n.delayError&&P?(c[w]=E(w,()=>N(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(j)||K){const F={...j,...K&&pt(k)?{isValid:k}:{},errors:t.errors,name:w};b.state.next(F)}},ne=async w=>(R(w,!0),await n.resolver(s,n.context,C0(w||a.mount,r,n.criteriaMode,n.shouldUseNativeValidation))),G=async w=>{const k=C,{errors:P}=await ne(w);if(k!==C)return P;if(R(w),w){for(const j of w){const D=U(P,j);O(j);const K=a.array.has(j)&&Oe(D)&&!Object.keys(D).some(q=>!Number.isNaN(Number(q))),F=U(r,j),Z=Oe(F)&&Object.keys(F).some(q=>q!=="_f");K?Ec(t.errors,{[j]:D},j):D!=null&&D.type||D!=null&&D.message||Array.isArray(D)||Oe(D)&&Z?ve(t.errors,j,D):je(t.errors,j)}t.errors={...t.errors}}else Object.keys(c).forEach(O),t.errors=P;return P},se=async({name:w,eventType:k})=>{if(e.validate){const P=await e.validate({formValues:s,formState:t,name:w,eventType:k});if(Oe(P))for(const j in P){const D=P[j];D&&Ye(`${Ds}.${j}`,{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:k,name:P,eventType:j,context:D={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(D.runRootValidation=!0,!await se({name:P,eventType:j})&&(D.valid=!1,k)))return D.valid;for(const K in w){const F=w[K];if(F){const{_f:Z,...q}=F;if(Z){const z=a.array.has(Z.name),ie=F._f&&k0(F._f),be=y("isValidating","validatingFields");ie&&be&&R([Z.name],!0);const Ee=await Rc(F,a.disabled,s,S,n.shouldUseNativeValidation&&!k,z);if(ie&&be&&R([Z.name]),Ee[Z.name]&&(D.valid=!1,k)||(k||(O(Z.name),U(Ee,Z.name)?z?Ec(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:k,fields:q,name:K,eventType:j})}}return D.valid},Se=()=>{for(const w of a.unMount){const k=U(r,w);k&&(k._f.refs?k._f.refs.every(P=>!As(P)):!As(k._f.ref))&&Wn(w)}a.unMount=new Set},X=(w,k)=>(w&&k&&ve(s,w,k),!ct(i.mount?s:o,o)),ce=(w,k,P)=>xi(w,a,{...i.mount?s:me(k)||He(w)?o:k},P,k),pe=w=>Mf(U(i.mount?s:o,w,n.shouldUnregister?U(o,w,[]):[])),_e=(w,k,P={},j=!1,D=!1,K=!1)=>{const F=U(r,w);let Z=k;if(F){const q=F._f;q&&(!q.disabled&&ve(s,w,Ci(k,q)),Z=Wo(q.ref)&&Ke(k)?"":k,zf(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&&!K&&b.state.next({name:w,values:j?s:Ce(s)})))}(P.shouldDirty||P.shouldTouch)&&Q(w,F&&F._f&&!F._f.disabled&&(F._f.valueAsNumber||F._f.valueAsDate||F._f.setValueAs)?Ci(k,F._f):Z,P.shouldTouch,P.shouldDirty,!D),P.shouldValidate&&Dt(w,{delayError:P.delayError})},Ie=(w,k,P,j=!1,D=!1,K=!1)=>{a.array.has(w)&&b.array.next({name:w,values:j?s:Ce(s)});for(const F in k){if(!k.hasOwnProperty(F))continue;const Z=k[F],q=w+"."+F,z=U(r,q);(a.array.has(w)||Oe(Z)||z&&!z._f)&&!bn(Z)?Ie(q,Z,P,j,D,K):_e(q,Z,P,j,D,K)}},de=(w,k,P,j,D=!1)=>{const K=U(r,w),F=a.array.has(w),Z=j?k:Ce(k),q=U(s,w),z=ct(q,Z);if(z||ve(s,w,Z),F)b.array.next({name:w,values:j?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;!K||K._f||Ke(Z)||ie?_e(w,Z,P,j,D,be):Ie(w,Z,P,j,D,be)}if(!z&&!D){const ie=Is(w,a),be=j?s:Ce(s);if(b.state.next({...ie&&t,name:i.mount||ie?w:void 0,values:be}),!F)for(const Ee of E0(a.array,w))b.state.next({name:Ee,values:be})}},xe=(w,k,P={})=>de(w,k,P,!1),Ze=(w,k={})=>{const P=et(w)?w(s):w;if(!ct(s,P)){s={...s,...P};for(const j of a.mount)_0(P,j)&&de(j,U(P,j),k,!0,!0);b.state.next({...t,name:void 0,type:void 0,...d?{values:s}:{}}),k.shouldValidate&&A()}},st=async w=>{i.mount=!0;const k=w.target;let P=k.name,j=!0;const D=U(r,P),K=F=>{j=Number.isNaN(F)||bn(F)&&isNaN(F.getTime())||ct(F,U(s,P,F))};if(D){let F,Z;const q=k.type?Dc(D._f):wi(w),z=w.type===dn.BLUR||w.type===dn.FOCUS_OUT,ie=!P0(D._f)&&!e.validate&&!n.resolver&&!U(t.errors,P)&&!D._f.deps,be=ie||T0(z,U(t.touchedFields,P),t.isSubmitted,f,l),Ee=Is(P,a,z);if(ve(s,P,Ce(q)),z){if(!k||!k.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]),K(q),!j){!$e(Ct)&&b.state.next(Ct);return}const vt=jc(t.errors,r,P),qn=jc(Be,r,vt.name||P);F=qn.error,P=qn.name,Z=$e(Be)}else R([P],!0),F=(await Rc(D,a.disabled,s,S,n.shouldUseNativeValidation))[P],R([P]),K(q),j&&(F?Z=!1:y("isValid")&&(Z=await le({fields:r,onlyCheckValid:!0,name:P,eventType:w.type})));j&&(D._f.deps&&(!Array.isArray(D._f.deps)||D._f.deps.length>0)&&Dt(D._f.deps),he(P,Z,F,Ct))}},dt=(w,k)=>{if(U(t.errors,k)&&w.focus)return w.focus(),1},Dt=async(w,k={})=>{let P,j;const D=zo(w);if(n.resolver){const K=C,F=await G(me(w)?w:D);if(P=$e(F),j=w?!D.some(Z=>U(F,Z)):P,K!==C)return j}else w?(j=(await Promise.all(D.map(async K=>{const F=U(r,K);return await le({fields:F&&F._f?{[K]:F}:F,eventType:dn.TRIGGER})}))).every(Boolean),!(!j&&!t.isValid)&&A()):j=P=await le({fields:r,name:w,eventType:dn.TRIGGER});if(k.delayError&&n.delayError&&He(w)){const K=U(t.errors,w);K?(je(t.errors,w),c[w]=E(w,()=>N(w,K)),c[w](n.delayError)):O(w)}if(k.shouldTouch)for(const K of w?D:a.mount)!a.array.has(K)&&ve(t.touchedFields,K,!0);return b.state.next({...!He(w)||y("isValid")&&P!==t.isValid?{}:{name:w},...n.resolver||!w?{isValid:P}:{},...k.shouldTouch&&y("touchedFields")?{touchedFields:t.touchedFields}:{},errors:t.errors}),k.shouldFocus&&!j&&Fr(r,dt,w?D:a.mount),j},Bn=(w,k)=>{let P={...i.mount?s:o};return k&&(P=$f(k.dirtyFields?t.dirtyFields:t.touchedFields,P)),me(w)?P:He(w)?U(P,w):w.map(j=>U(P,j))},on=w=>me(w)?{...t.errors}:He(w)?U(t.errors,w):w.map(k=>U(t.errors,k)),Et=(w,k)=>{const P=k||t,j=U(P.errors,w);return{invalid:!!j,isDirty:!!U(P.dirtyFields,w),error:j,isValidating:!!U(P.validatingFields,w),isTouched:!!U(P.touchedFields,w)}},Cn=w=>{const k=w?zo(w):void 0;k?k.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,k,P)=>{O(w);const j=(U(r,w,{_f:{}})._f||{}).ref,D=U(t.errors,w)||{},{ref:K,message:F,type:Z,types:q,...z}=D;ve(t.errors,w,{...z,...k,ref:j}),b.state.next({name:w,errors:t.errors,isValid:!1}),P&&P.shouldFocus&&j&&j.focus&&j.focus()},Or=(w,k)=>{if(et(w)){d++;const{unsubscribe:P}=b.state.subscribe({next:D=>"values"in D&&w(D.values||ce(void 0,k),D)});let j=!1;return{unsubscribe:()=>{j||(j=!0,d--,P())}}}return ce(w,k,!0)},Kn=w=>{var k;const P=!!(!((k=w.formState)===null||k===void 0)&&k.values);P&&d++;const{unsubscribe:j}=b.state.subscribe({next:K=>{if(R0(w.name,K.name,w.exact)&&O0(K,w.formState||g,Kt,w.reRenderRoot)){const F={...s};w.callback({values:F,...t,...K,defaultValues:o})}}});if(!P)return j;let D=!1;return()=>{D||(D=!0,d--,j())}},Ne=w=>(i.mount=!0,v={...v,...w.formState},Kn({...w,formState:{...p,...w.formState}})),Wn=(w,k={})=>{for(const P of w?zo(w):a.mount)a.mount.delete(P),a.array.delete(P),a.disabled.delete(P),k.keepValue||(je(r,P),je(s,P)),k.keepError||(I(P),je(t.errors,P)),!k.keepDirty&&je(t.dirtyFields,P),!k.keepTouched&&je(t.touchedFields,P),!k.keepIsValidating&&je(t.validatingFields,P),!n.shouldUnregister&&!k.keepDefaultValue&&je(o,P);d&&b.state.next({values:Ce(s)}),b.state.next({...t,...k.keepDirty?{}:{isDirty:X()},...k.keepIsValidating?{}:{isValidating:!$e(t.validatingFields)}}),!k.keepIsValid&&A()},Zt=({disabled:w,name:k})=>{if(pt(w)&&i.mount||w||a.disabled.has(k)){const D=a.disabled.has(k)!==!!w;w?a.disabled.add(k):a.disabled.delete(k),D&&i.mount&&!i.action&&A()}},Rr=(w,k={})=>{let P=U(r,w);const j=pt(k.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,...k}}),a.mount.add(w),P&&!D?Zt({disabled:pt(k.disabled)?k.disabled:n.disabled,name:w}):W(w,!0,k.value),{...j?{disabled:k.disabled||n.disabled}:{},...n.progressive?{required:!!k.required,min:Nr(k.min),max:Nr(k.max),minLength:Nr(k.minLength),maxLength:Nr(k.maxLength),pattern:Nr(k.pattern)}:{},name:w,onChange:st,onBlur:st,ref:K=>{if(K){a.registerName.add(w),Rr(w,k),a.registerName.delete(w),P=U(r,w);const F=me(K.value)&&K.querySelectorAll&&K.querySelectorAll("input,select,textarea")[0]||K,Z=x0(F),q=P._f.refs||[];if(Z?q.find(ie=>ie===F):F===P._f.ref)return;const z={...P._f};Z?(z.refs=[...q.filter(As),F,...Array.isArray(U(o,w))?[{}]:[]],z.ref={type:F.type,name:w}):(z.ref=F,delete z.refs),ve(r,w,{_f:z}),W(w,!1,void 0,F)}else P=U(r,w,{}),P._f&&(P._f.mount=!1),(n.shouldUnregister||k.shouldUnregister)&&!(Tf(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,(k,P)=>{const j=U(r,P);j&&(k.disabled=j._f.disabled||w,Array.isArray(j._f.refs)&&j._f.refs.forEach(D=>{D.disabled=j._f.disabled||w}))},0))},lo=(w,k)=>async P=>{let j,D;P&&(P.preventDefault&&P.preventDefault(),P.persist&&P.persist());let K=Ce(s);if(b.state.next({isSubmitting:!0}),n.resolver){const F=C,{errors:Z,values:q}=await ne();if(F!==C)return;R(),Object.keys(c).forEach(O),t.errors=Z,K=Ce(q)}else await le({fields:r,eventType:dn.SUBMIT}),je(t.errors,If);if(a.disabled.size)for(const F of a.disabled)je(K,F);if($e(t.errors)){b.state.next({errors:{}});try{j=await w(K,P)}catch(F){D=F}}else k&&await k({...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 j},uo=(w,k={})=>{U(r,w)&&(je(t.validatingFields,w),me(k.defaultValue)?xe(w,Ce(U(o,w))):(xe(w,k.defaultValue),ve(o,w,Ce(k.defaultValue))),k.keepTouched||je(t.touchedFields,w),k.keepDirty||(je(t.dirtyFields,w),t.isDirty=k.defaultValue?X(w,Ce(U(o,w))):X()),k.keepError||(O(w),je(t.errors,w),A()),b.state.next({...t,isValidating:!$e(t.validatingFields)}))},Gn=(w,k={})=>{C++;const P=w?Ce(w):o,j=Ce(P),D=$e(w),K=j,F=r;if(Object.keys(c).forEach(O),k.keepDefaultValues||(o=P),!k.keepValues){if(k.keepDirtyValues){const Z=new Set([...a.mount,...Ff(ln(o,s,void 0,F),t.dirtyFields)]);for(const q of Z){const z=U(t.dirtyFields,q),ie=U(s,q),be=U(K,q);z&&!me(ie)?ve(K,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(k.keepFieldsRef)for(const Z of a.mount)xe(Z,U(K,Z));else r={}}if(n.shouldUnregister){if(s=k.keepDefaultValues?Ce(o):{},k.keepFieldsRef)for(const Z of a.mount)ve(s,Z,U(K,Z))}else s=Ce(K);b.array.next({values:{...K}}),b.state.next({name:void 0,type:void 0,values:{...K}})}a={mount:k.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=!g.isValid||!!k.keepIsValid||!!k.keepDirtyValues||!n.shouldUnregister&&!$e(K),i.watch=!!n.shouldUnregister,i.keepIsValid=!!k.keepIsValid,i.action=!1,i.actionArrayLengths.clear(),k.keepErrors||(t.errors={}),b.state.next({submitCount:k.keepSubmitCount?t.submitCount:0,isDirty:D?!1:k.keepDirty?t.isDirty:k.keepValues?X():!!(k.keepDefaultValues&&!ct(w,o)),isSubmitted:k.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:D?{}:k.keepDirtyValues?k.keepDefaultValues&&s?ln(o,s,void 0,F):t.dirtyFields:k.keepDefaultValues&&w?ln(o,w,void 0,F):k.keepDirty?t.dirtyFields:k.keepValues?ln(o,s,void 0,F):{},touchedFields:k.keepTouched?t.touchedFields:{},...!k.keepIsValidating&&(t.isValidating||!$e(t.validatingFields))?{validatingFields:{},isValidating:!1}:null,errors:k.keepErrors?t.errors:{},isSubmitSuccessful:k.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Bt=(w,k)=>Gn(et(w)?w(s):w,{...n.resetOptions,...k}),fo=(w,k={})=>{const P=U(r,w),j=P&&P._f;if(j){const D=j.refs?j.refs[0]:j.ref;D.focus&&setTimeout(()=>{D.focus(),k.shouldSelect&&et(D.select)&&D.select()})}},Kt=w=>{const{name:k,type:P,values:j,...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:B,_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:g,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,k={})=>{if(o=Ce(w),!k.keepDirty){const P=ln(o,s,void 0,r);t.dirtyFields=P,t.isDirty=!$e(P)}k.keepIsValid||A(),b.state.next({...t,defaultValues:o})},clearErrors:Cn,unregister:Wn,setError:Ye,setFocus:fo,getFieldState:Et};return{...Ir,formControl:Ir}}function j0(e={}){const n=T.useRef(void 0),t=T.useRef(void 0),r=T.useRef(e.formControl),[o,s]=T.useState(()=>({...Ce(Zf),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}=N0(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}=xa(a);return _a(()=>{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(()=>Df(o,i),[i,o]),n.current}const Mc=(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?Mc(r.ref,t,e):r&&r.refs&&r.refs.forEach(o=>Mc(o,t,e))}},$c=(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(M0(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},M0=(e,n)=>{const t=zc(n).replace(/[.*+?^${}()|\\]/g,"\\$&");return e.some(r=>zc(r).match(`^${t}\\.\\d+`))};function zc(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 Fc(e,n){try{var t=e()}catch(r){return n(r)}return t&&t.then?t.then(void 0,n):t}function $0(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]=Ea(i,n,t,o,l?[].concat(l,r.message):r.message)}e.shift()}return t}function z0(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,g){return g.length<p.length?g: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(g){return e.push(Pi({},g,{path:[].concat(o.path,g.path)}))})}),n){var l=t[a].types,f=l&&l[o.code];t[a]=Ea(a,n,t,s,f?[].concat(f,o.message):o.message)}e.shift()};e.length;)r();return t}function F0(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(Fc(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:$c(z0(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(Fc(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:$c($0(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 Lc(e,n="|"){return e.map(t=>qf(t)).join(n)}function Ri(e,n){return typeof n=="bigint"?n.toString():n}class L0{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 Ca(e){return new L0(e)}function V0(e){return e==null}function ka(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 Bf(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 Bf(e._zod.def)??e._zod.def.shape}function Kf(e,n,t){Object.defineProperty(e,n,{get(){const r=t();return Zn(this,n,r),r},enumerable:!0,configurable:!0})}function Wf(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?Kf(e,s,()=>{const a=n._zod.def.shape[s];return r?r(a,s):a}):Wf(e,s,r?r(i.value,s):i.value))}}function U0(e,n){for(const t of Reflect.ownKeys(n)){const r=Object.getOwnPropertyDescriptor(n,t);r.enumerable&&(r.get?Kf(e,t,()=>n[t]):Wf(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 Z0(e){return JSON.stringify(e)}function B0(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Hf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Go(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const K0=Ca(()=>{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 Gf(e){return Gr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const W0=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 qf(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function H0(e){return Object.keys(e).filter(n=>e[n]._zod.optin!==void 0&&e[n]._zod.optout==="optional")}const G0={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]},q0={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Q0(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 J0(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 Y0(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:Qf(e,n)}))}function Qf(e,n){const t={};return Fn(t,e,Reflect.ownKeys(tn(e))),U0(t,n),t}function X0(e,n){if(!Gr(n))throw new Error("Invalid input to safeExtend: expected a plain object");return Sn(e,mt(e._zod.def,{shape:Qf(e,n)}))}function e_(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 Vc(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 t_(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 n_(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 Pa(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 Uc(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,g,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((g=(p=(f=e.inst)==null?void 0:f._zod.def)==null?void 0:p.error)==null?void 0:g.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 r_=/[\uD800-\uDBFF]/;function Oa(e){const n=e.length;if(!r_.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 Ra(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function o_(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 s_(e,n){for(const t in n){const r=Object.getOwnPropertyDescriptor(n,t);r.get?Object.defineProperty(e,t,{...r,enumerable:!1}):a_(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 Ta(e,n,t){return xn(e,n,t,!1)}function i_(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 a_(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 c_(e,n){const t=Object.getPrototypeOf(e);return n in t?void 0:t}let Ns,un=!1;const l_={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,l_);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 u_(e,n,t,r){const o=c_(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 d_="~constantCatch";function f_(e){const n=()=>e;return n[d_]=!0,n}var Zc;const js={value:void 0,enumerable:!1};let Bc="captureStackTrace"in Error?Error:null;function h_(e){const n=Bc;if(n){const t=n.stackTraceLimit;if(typeof t=="number"){try{n.stackTraceLimit=0}catch{return Bc=null,new e}try{return new e}finally{n.stackTraceLimit=t}}}return new e}function M(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(_),s_(_,i))}const g=l.prototype;for(const v in g)Object.prototype.hasOwnProperty.call(g,v)&&(v in f||(f[v]=g[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?h_(d):this;c(p,f);const g=p._zod.deferred;if(g){for(const b of g)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,g;return r!=null&&r.Parent&&f instanceof r.Parent?!0:(g=(p=f==null?void 0:f._zod)==null?void 0:p.traits)==null?void 0:g.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class $n extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Jf extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}(Zc=globalThis).__zod_globalConfig??(Zc.__zod_globalConfig={});const Vt=globalThis.__zod_globalConfig;function En(e){return e&&Object.assign(Vt,e),Vt}function p_(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Ri,2)),e.message}function m_(e){this._zod.message=e}const g_={get:p_,set:m_,enumerable:!0,configurable:!0},Ms={value:void 0,enumerable:!1},Kc=new WeakSet([Object.prototype,Error.prototype]),v_=(e,n)=>{e.name="$ZodError",Ms.value=n,Object.defineProperty(e,"issues",Ms),Ms.value=void 0,Object.defineProperty(e,"message",g_);const t=Object.getPrototypeOf(e);Kc.has(t)||(Kc.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})}}))},y_=M("$ZodError",v_);function b_(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 w_(e,n=t=>t.message){const t={},r=[];for(const o of e.issues)o.path.length>0?b_(t,o.path[0],()=>[]).push(n(o)):r.push(n(o));return{formErrors:r,fieldErrors:t}}function __(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 Ia=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 Hf(c,(s==null?void 0:s.callee)??n),c}return a.value};return n},Aa=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 Hf(c,(s==null?void 0:s.callee)??n),c}return a.value};return n},Da=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?Yf(e,s.issues,o):{success:!0,data:s.value}};function Yf(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 Na=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?Yf(e,s.issues,o):{success:!0,data:s.value}},x_=Symbol.for("zod.compile.invalid"),S_=Symbol.for("zod.compile.fallback"),E_=((e,n,t)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(n)!==x_)return!0;if(r.definite===!0&&t===void 0)return!1}return C_(e,n,t)});function C_(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[S_]=!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 k_=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},P_=e=>{const n=Ia(e),t=(r,o,s,i)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return n(r,o,a,ps(t,i))};return t},O_=e=>{const n=Ia(e),t=(r,o,s,i)=>n(r,o,s,ps(t,i));return t},R_=e=>{const n=Aa(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},T_=e=>{const n=Aa(e),t=async(r,o,s,i)=>await n(r,o,s,ps(t,i));return t},I_=e=>(n,t,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Da(e)(n,t,o)},A_=e=>(n,t,r)=>Da(e)(n,t,r),D_=e=>async(n,t,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Na(e)(n,t,o)},N_=e=>async(n,t,r)=>Na(e)(n,t,r),j_=/^[cC][0-9a-z]{6,}$/,M_=/^[0-9a-z]+$/,$_=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,z_=/^[0-9a-vA-V]{20}$/,F_=/^[A-Za-z0-9]{27}$/,L_=/^[a-zA-Z0-9_-]{21}$/;function V_(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const U_=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Z_=/^([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})$/,Wc=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)$/,B_=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,K_="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function W_(){return new RegExp(K_,"u")}const H_=/^(?:(?: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])$/,G_=/^(([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}|:))$/,q_=/^((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])$/,Q_=/^(([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])$/,J_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Y_=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,X_=/^https?$/,ex=/^\+[1-9]\d{6,14}$/,Xf="(?:(?:\\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 tx(e){return new RegExp(`^${e}$`)}const nx=tx(Xf);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 rx(e){return new RegExp(`^${Ti(e)}$`)}function ox(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(`^${Xf}T(?:${r})$`)}const sx=/^[\s\S]{0,}$/,ix=/^(?:true|false)$/i,ax=/^[^A-Z]*$/,cx=/^[^a-z]*$/,At=M("$ZodCheck",(e,n)=>{var t;e._zod??(e._zod={}),e._zod.def=n,(t=e._zod).onattach??(t.onattach=[])}),ja=e=>{const n=e.value;return!V0(n)&&n.length!==void 0},lx=M("$ZodCheckMaxLength",(e,n)=>{var t;At.init(e,n),(t=e._zod.def).when??(t.when=ja),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>n.maximum?Oa(o):s)<=n.maximum)return;const a=Ra(o);r.issues.push({origin:a,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),ux=M("$ZodCheckMinLength",(e,n)=>{var t;At.init(e,n),(t=e._zod.def).when??(t.when=ja),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>=n.minimum&&s<n.minimum*2?Oa(o):s)>=n.minimum)return;const a=Ra(o);r.issues.push({origin:a,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),dx=M("$ZodCheckLengthEquals",(e,n)=>{var t;At.init(e,n),(t=e._zod.def).when??(t.when=ja),e._zod.check=r=>{const o=r.value,s=o.length,i=typeof o=="string"&&s>=n.length&&s<=n.length*2?Oa(o):s;if(i===n.length)return;const a=Ra(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=M("$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=()=>{})}),fx=M("$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})}}),hx=M("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=ax),ms.init(e,n)}),px=M("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=cx),ms.init(e,n)}),mx=M("$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})}}),gx=M("$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})}}),vx=M("$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 Hc(e,n,t){e.issues.length&&n.issues.push(...Pa(t,e.issues))}const yx=M("$ZodCheckProperties",(e,n)=>{At.init(e,n),Ta(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=>Hc(u,r,i)))):Hc(c,r,i)}if(s)return Promise.all(s).then(()=>{})}}),bx=M("$ZodCheckOverwrite",(e,n)=>{At.init(e,n),e._zod.check=t=>{t.value=n.tx(t.value)}});class wx{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 _x={major:4,minor:6,patch:5},Fe=M("$ZodType",(e,n)=>{var s;var t;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=_x;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(n_(c)||!p._zod.def.when(c))continue}else if(l)continue;const g=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!==g&&(Uc(c.issues,g,e),l||(l=Jt(c,g)))});else{if(c.issues.length===g)continue;Uc(c.issues,g,e),l||(l=Jt(c,g))}}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 Ta(this,"~standard",th(this))},set"~standard"(e){xn(this,"~standard",e)}}),eh=(e,n)=>e.issues.length?{issues:e.issues.map(t=>kr(t,n,En()))}:{value:e.value};async function xx(e,n){const t={async:!0};return eh(await e._zod.run({value:n,issues:[]},t),t)}function th(e){return{validate:n=>{const t={async:!1};try{const r=e._zod.run({value:n,issues:[]},t);if(!(r instanceof Promise))return eh(r,t)}catch{}return xx(e,n)},vendor:"zod",version:1}}const Ma=M("$ZodString",(e,n)=>{Fe.init(e,n),e._zod.pattern=n.pattern??sx,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=M("$ZodStringFormat",(e,n)=>{ms.init(e,n),Ma.init(e,n)}),Sx=M("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=Z_),Te.init(e,n)}),Ex=M("$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=Wc(r))}else n.pattern??(n.pattern=Wc());Te.init(e,n)}),Cx=M("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=B_),Te.init(e,n)}),nh=1,qo=2;function rh(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function kx(e,n){return!("normalize"in n)&&!("hostname"in n)&&!("protocol"in n)?rh(e)||qo:Px(e,n)}function Px(e,n){var t;if(!n.normalize&&((t=n.protocol)==null?void 0:t.source)===X_.source&&!/^https?:\/\//i.test(e))return nh;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 Ox=/[\t\n\r]/g;function Gc(e){return e.replace(Ox,"")}function Rx(e,n){return n.lastIndex=0,n.test(e.hostname)}function Tx(e,n){return n.lastIndex=0,n.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const Ix=M("$ZodURL",(e,n)=>{Te.init(e,n),e._zod.check=t=>{try{const r=t.value.trim(),o=kx(r,n);if(o===nh){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=Gc(r);return}n.hostname&&!Rx(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&&!Tx(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:Gc(r);return}catch{t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:e,continue:!n.abort})}}}),Ax=M("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=W_()),Te.init(e,n)}),Dx=M("$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?L_:V_(n.length)),Te.init(e,n)}),Nx=M("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=j_),Te.init(e,n)}),jx=M("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=M_),Te.init(e,n)}),Mx=M("$ZodULID",(e,n)=>{n.pattern??(n.pattern=$_),Te.init(e,n)}),$x=M("$ZodXID",(e,n)=>{n.pattern??(n.pattern=z_),Te.init(e,n)}),zx=M("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=F_),Te.init(e,n)}),Fx=M("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=ox(n)),Te.init(e,n)}),Lx=M("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=nx),Te.init(e,n)}),Vx=M("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=rx(n)),Te.init(e,n)}),Ux=M("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=U_),Te.init(e,n)}),Zx=M("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=H_),Te.init(e,n)}),Bx=/^[0-9a-fA-F:.]+$/;function oh(e){return Bx.test(e)?rh(`http://[${e}]`):!1}const Kx=M("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=G_),Te.init(e,n),e._zod.check=t=>{oh(t.value)||t.issues.push({code:"invalid_format",format:"ipv6",input:t.value,inst:e,continue:!n.abort})}}),Wx=M("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=q_),Te.init(e,n)});function Hx(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:oh(t)}const Gx=M("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=Q_),Te.init(e,n),e._zod.check=t=>{Hx(t.value)||t.issues.push({code:"invalid_format",format:"cidrv6",input:t.value,inst:e,continue:!n.abort})}});function sh(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const ih=/^[0-9a-zA-Z+/]*={0,2}$/,qx=M("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=ih),Te.init(e,n),e._zod.check=t=>{sh(t.value)||t.issues.push({code:"invalid_format",format:"base64",input:t.value,inst:e,continue:!n.abort})}}),$a=/^[A-Za-z0-9_-]*$/;function Qx(e){if(!$a.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),t=n.padEnd(Math.ceil(n.length/4)*4,"=");return sh(t)}const Jx=M("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=$a),Te.init(e,n),e._zod.check=t=>{Qx(t.value)||t.issues.push({code:"invalid_format",format:"base64url",input:t.value,inst:e,continue:!n.abort})}}),Yx=M("$ZodE164",(e,n)=>{n.pattern??(n.pattern=ex),Te.init(e,n)});function Xx(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 e1=M("$ZodJWT",(e,n)=>{Te.init(e,n),e._zod.check=t=>{Xx(t.value,n.alg)||t.issues.push({code:"invalid_format",format:"jwt",input:t.value,inst:e,continue:!n.abort})}}),t1=M("$ZodBoolean",(e,n)=>{Fe.init(e,n),e._zod.pattern=ix,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}}),n1=M("$ZodUnknown",(e,n)=>{Fe.init(e,n),e._zod.parse=t=>t}),r1=M("$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(...Pa(t,e.issues)),n.value[t]=e.value}const o1=M("$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(...Pa(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 s1=[];function ah(e){var i,a,c,u;const n=Object.keys(e.shape),t=Object.getOwnPropertySymbols(e.shape),r=t.length?t:s1,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=H0(e.shape);return{...e,allKeys:o,symbolKeys:r,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(s)}}function ch(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 g in n){if(i&&t.issues.length!==p){if(Jt(t,p))break;p=t.issues.length}if(c.has(g))continue;if(g==="__proto__"){d==="never"&&a.push(g);continue}if(d==="never"){a.push(g);continue}const v=u.run({value:n[g],issues:[]},r);v instanceof Promise?e.push(v.then(y=>Qo(y,t,g,n,l,f))):Qo(v,t,g,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 i1=M("$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=Ca(()=>ah(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 g of p.values)l[f].add(g);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,g=d==null?void 0:d.abortEarly;let v=u.issues.length;for(const y of a.allKeys){if(g&&u.issues.length!==v){if(Jt(u,v))break;v=u.issues.length}if(y==="__proto__")continue;const b=p[y],_=b._zod.optin,C=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,_,C))):Qo(S,u,y,l,_,C)}return i?ch(f,l,u,d,o.value,e,g===!0):f.length?Promise.all(f).then(()=>u):u}}),a1=M("$ZodObjectJIT",(e,n)=>{i1.init(e,n);const t=e._zod.parse,r=Ca(()=>ah(n)),o=Vt.memoizer,s=p=>{var E,O;const g=r.value,v=g.symbolKeys,y=new wx(["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 C=Object.create(null);let S=0;for(const I of g.allKeys)C[I]=`key_${S++}`;y.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const I of g.allKeys){if(I==="__proto__")continue;const A=C[I],R=typeof I=="symbol"?`syms[${v.indexOf(I)}]`:Z0(I),$=`${R} in input`,B=p[I],N=(E=B==null?void 0:B._zod)==null?void 0:E.optin,V=N!==void 0,L=((O=B==null?void 0:B._zod)==null?void 0:O.optout)==="optional";if(y.write(`const ${A} = ${b(R)};`),V&&L){const Y=N==="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
+ `),N==="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&&K0.value,l=n.catchall;let f;e._zod.parse=(p,g)=>{f??(f=r.value);const v=p.value;return a(v)?c&&d&&(g==null?void 0:g.async)===!1&&g.jitless!==!0?(i||(i=s(n.shape)),p=i(p,g),l?ch([],v,p,g,f,e,(g==null?void 0:g.abortEarly)===!0):p):t(p,g):(p.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),p)}});function Qc(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 c1=M("$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=>ka(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=>Qc(a,r,e,o)):Qc(i,r,e,o)}}),l1=M("$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])=>Jc(t,c,u)):Jc(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 Jc(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 g=String(u.path[0]);s.has(g)||s.set(g,u),l=[g]}else return!1;for(const g of l)r.has(g)||r.set(g,{}),r.get(g)[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 u1=M("$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=>W0.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}}),d1=M("$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 Jf(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 Yc(e,n){return e.value=n.issues.length?void 0:n.value,e}const lh=M("$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(`^(${ka(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=>Yc(t,s)):Yc(t,o)}return n.innerType._zod.run(t,r)}}),f1=M("$ZodExactOptional",(e,n)=>{lh.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)}),h1=M("$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(`^(${ka(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)}),p1=M("$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=>Xc(s,n)):Xc(o,n)}});function Xc(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const m1=M("$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))}),g1=M("$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=>el(s,e)):el(o,e)}});function el(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 tl(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 v1=M("$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=>tl(t,s,n,r)):tl(t,o,n,r)}}),y1=M("$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 b1=M("$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(nl):nl(o)}});function nl(e){return e.memo||(e.value=Object.freeze(e.value)),e}const w1=M("$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=>rl(s,t,r,e));rl(o,t,r,e)}});function rl(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 _1 extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Ai="~memo",ol=[];function uh(e){return e!==null&&typeof e=="object"}function $s(e){return e.map(n=>n.path?{...n,path:n.path.slice()}:{...n})}const dh=new WeakMap,$r=0,Fo=1,Lr=2;function Lo(e,n,t){const r=dh.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 g of Reflect.ownKeys(d)){const v=Object.getOwnPropertyDescriptor(d,g);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=Bf(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),x1(e,o)}function x1(e,n){return n!==Fo&&dh.set(e,n===Lr),n}function S1(e,n){let t=e.buckets.get(n);return t||(t=new WeakMap,e.buckets.set(n,t)),t}let Po;const Oo=[],E1={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"&&k1(s,o.value))throw new _1;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(!uh(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=S1(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 g=Oo.length,v=i(c,u);Po=void 0;const y=Oo.length>g?Oo.pop():void 0;return v instanceof Promise?v.then(b=>(y&&(y.issues=b.issues.length?$s(b.issues):ol),b)):(y&&(y.issues=v.issues.length?$s(v.issues):ol),v)};e._zod.parse=a,e._zod.run===i&&(e._zod.run=a)})}};function C1(){return E1}function k1(e,n){var r;const t=(r=e[Ai])==null?void 0:r.backEdges;return t!==void 0&&uh(n)&&t.has(n)}const P1=()=>{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=o_(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 ${qf(s.values[0])}`:`Invalid option: expected one of ${Lc(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":""}: ${Lc(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 O1(){return{localeError:P1()}}var sl;class R1{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 T1(){return new R1}(sl=globalThis).__zod_globalRegistry??(sl.__zod_globalRegistry=T1());const zr=globalThis.__zod_globalRegistry;function I1(e){return e.checks&&(e.checks=[...e.checks]),e}function A1(e,n){return new e(I1({type:"string",...re(n)}))}function D1(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...re(n)})}function N1(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...re(n)})}function j1(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...re(n)})}function M1(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...re(n)})}function $1(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...re(n)})}function z1(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...re(n)})}function F1(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...re(n)})}function L1(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...re(n)})}function V1(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...re(n)})}function U1(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...re(n)})}function Z1(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...re(n)})}function B1(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...re(n)})}function K1(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...re(n)})}function W1(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...re(n)})}function H1(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...re(n)})}function G1(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...re(n)})}function q1(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...re(n)})}function Q1(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...re(n)})}function J1(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...re(n)})}function Y1(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...re(n)})}function X1(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...re(n)})}function eS(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...re(n)})}function tS(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...re(n)})}function nS(e,n){return new e({type:"string",format:"date",check:"string_format",...re(n)})}function rS(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...re(n)})}function oS(e,n){return new e({type:"string",format:"duration",check:"string_format",...re(n)})}function sS(e,n){return new e({type:"boolean",...re(n)})}function iS(e){return new e({type:"unknown"})}function aS(e,n){return new e({type:"never",...re(n)})}function fh(e,n){return new lx({check:"max_length",...re(n),maximum:e})}function Jo(e,n){return new ux({check:"min_length",...re(n),minimum:e})}function hh(e,n){return new dx({check:"length_equals",...re(n),length:e})}function cS(e,n){return new fx({check:"string_format",format:"regex",...re(n),pattern:e})}function lS(e){return new hx({check:"string_format",format:"lowercase",...re(e)})}function uS(e){return new px({check:"string_format",format:"uppercase",...re(e)})}function dS(e,n){return new mx({check:"string_format",format:"includes",...re(n),includes:e})}function fS(e,n){return new gx({check:"string_format",format:"starts_with",...re(n),prefix:e})}function hS(e,n){return new vx({check:"string_format",format:"ends_with",...re(n),suffix:e})}function pS(e,n){return new yx({check:"properties",shape:e,...re(n)})}function Pr(e){return new bx({check:"overwrite",tx:e})}function mS(e){return Pr(n=>n.normalize(e))}function gS(){return Pr(e=>e.trim())}function vS(){return Pr(e=>e.toLowerCase())}function yS(){return Pr(e=>e.toUpperCase())}function bS(){return Pr(e=>B0(e))}function wS(e,n,t){return new e({type:"array",element:n,...re(t)})}function _S(e,n,t){return new e({type:"custom",check:"custom",fn:n,...re(t)})}function xS(e,n){const t=SS(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 SS(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 ph(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 g=i.schema,v=n.processors[o.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);v(e,n,g,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 il(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function mh(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??(C=>C);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}/${il(_)}`}}const f="#",p=`${f}/${l}/`;if(d[1]===t&&!d[1].schema.id)return{ref:f};const g=d[1].schema.id??`__schema${e.counter++}`;return{defId:g,ref:p+il(g)}},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 g=l.schema;for(const v in g)delete g[v];g.$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 gh(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;gh(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 vh=new Set(["type","properties","required","additionalProperties"]),al=["oneOf","anyOf"];function cl(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(!vh.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])??cl(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=cl(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 ES(e){const n=e.allOf;if(!Array.isArray(n)||n.length<2)return;for(const o of vh)if(o in e)return;const t=n.filter(o=>al.some(s=>Array.isArray(o[s])));let r=null;if(!t.length)r=Di(n);else{const o=t[0],s=al.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 yh(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,g={...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,g),l._zod.parent===v)for(const S in p)S==="$ref"||S==="allOf"||S in g||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())gh(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 g=p==null?void 0:p.allOf;if(!Array.isArray(g))continue;const v=l.get(g);v?v.push(p):l.set(g,[p])}for(const f of e.intersections)for(const p of l.get(f)??[])ES(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 CS=(e,n={})=>t=>{const r=ph({...t,processors:n});return Je(e,r),mh(r,e),yh(r,e)},Yo=(e,n,t={})=>r=>{const{libraryOptions:o,target:s}=r??{},i=ph({...o??{},target:s,io:n,processors:t});return Je(e,i),mh(i,e),yh(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)},ll=(e,n)=>{br(e,"minimum",n),wr(e,"maximum",n)},bh=(e,n)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(n)||e.multipleOf.push(n)},wh=(e,n)=>{e.patterns??(e.patterns=new Set),e.patterns.add(n)},_h=(e,n)=>{e.mime=e.mime?e.mime.filter(t=>n.includes(t)):[...n]},xh=(e,n)=>{e.format=n,n.includes("int")&&(e.isInt=!0)},ul=(e,n)=>br(e,"minimum",n.minimum),dl=(e,n)=>wr(e,"maximum",n.maximum),fl=e=>(n,t)=>{xh(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)=>bh(e,n.value),number_format:fl(G0),bigint_format:fl(q0),min_length:ul,max_length:dl,length_equals:(e,n)=>ll(e,n.length),min_size:ul,max_size:dl,size_equals:(e,n)=>ll(e,n.size),string_format:(e,n)=>{xh(e,n.format),n.pattern&&wh(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)=>_h(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&&bh(n,o.multipleOf),o.format!==void 0&&(n.format??(n.format=o.format),o.format.includes("int")&&(n.isInt=!0)),o.mime&&_h(n,o.mime);for(const i of o.patterns??[])wh(n,i);return n}const kS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},PS=new Map([[ih,J_],[$a,Y_]]),OS=e=>PS.get(e)??e,RS=(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=kS[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(OS);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}))])}},TS=(e,n,t,r)=>{t.type="boolean"},IS=(e,n,t,r)=>{t.not={}},AS=(e,n,t,r)=>{},DS=(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},NS=(e,n,t,r)=>{co(e,n,t,r,"Custom types cannot be represented in JSON Schema")},jS=(e,n,t,r)=>{co(e,n,t,r,"Transforms cannot be represented in JSON Schema")},MS=(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 $S=(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)},zS=(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},FS=(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)},LS=(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"}]},VS=(e,n,t,r)=>{const o=e._zod.def;Je(o.innerType,n,r);const s=n.seen.get(e);s.ref=o.innerType},za=Symbol();function Sh(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"),za):JSON.parse(i)}const US=(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=Sh(o.defaultValue,e,n,t,r);i!==za&&(t.default=i)},ZS=(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=Sh(o.defaultValue,e,n,t,r);i!==za&&(t._prefault=i)},BS=(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},KS=(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},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,t.readOnly=!0},Eh=(e,n,t,r)=>{const o=e._zod.def;Je(o.innerType,n,r);const s=n.seen.get(e);s.ref=o.innerType},hl=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 HS=(e,n)=>{y_.init(e,n),e.name="ZodError";const t=Object.getPrototypeOf(e);hl.has(t)||(hl.add(t),Ro(t,"format",r=>o=>__(r,o)),Ro(t,"flatten",r=>o=>w_(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=M("ZodError",HS,void 0,{Parent:Error}),GS=Ia(St),qS=Aa(St),QS=Da(St),JS=Na(St),YS=P_(St),XS=O_(St),eE=R_(St),tE=T_(St),nE=I_(St),rE=A_(St),oE=D_(St),sE=N_(St);function iE(){Vt.localeError||En(O1())}function Fa(){Vt.memoizer||En({memoizer:C1()})}const Le=M("ZodType",(e,n)=>(iE(),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(rC(e,n))},superRefine(e,n){return this.check(oC(e,n))},overwrite(e){return this.check(Pr(e))},optional(){return gl(this)},exactOptional(){return KE(this)},nullable(){return vl(this)},nullish(){return gl(vl(this))},nonoptional(e){return JE(this,e)},array(){return jE(this)},or(e){return FE([this,e])},and(e){return VE(this,e)},transform(e){return yl(this,BE(e))},default(e){return GE(this,e)},prefault(e){return QE(this,e)},catch(e){return XE(this,e)},pipe(e){return yl(this,e)},readonly(){return nC(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 Ta(this,"~standard",{...th(this),jsonSchema:{input:Yo(this,"input"),output:Yo(this,"output")}})},set"~standard"(e){xn(this,"~standard",e)},parse:function e(n,t){return GS(this,n,t,{callee:e})},parseAsync:async function e(n,t){return await qS(this,n,t,{callee:e})},safeParse(e,n){return QS(this,e,n)},async safeParseAsync(e,n){return JS(this,e,n)},get spa(){return this==null?void 0:this.safeParseAsync},set spa(e){xn(this,"spa",e)},validate(e,n){return E_(this,e,n)},validateAsync(e,n){return k_(this,e,n)},encode:function e(n,t){return YS(this,n,t,{callee:e})},decode:function e(n,t){return XS(this,n,t,{callee:e})},encodeAsync:async function e(n,t){return await eE(this,n,t,{callee:e})},decodeAsync:async function e(n,t){return await tE(this,n,t,{callee:e})},safeEncode(e,n){return nE(this,e,n)},safeDecode(e,n){return rE(this,e,n)},async safeEncodeAsync(e,n){return oE(this,e,n)},async safeDecodeAsync(e,n){return sE(this,e,n)},toJSONSchema(e){return CS(this,{})(e)},get description(){var e;return(e=zr.get(this))==null?void 0:e.description},get _def(){return this._zod.def}}),Ch=M("_ZodString",(e,n)=>{Ma.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>RS(e,t,r)},i_({format:e=>Ur(e).format??null,minLength:e=>Ur(e).minimum??null,maxLength:e=>Ur(e).maximum??null},{regex(...e){return this.check(cS(...e))},includes(...e){return this.check(dS(...e))},startsWith(...e){return this.check(fS(...e))},endsWith(...e){return this.check(hS(...e))},min(...e){return this.check(Jo(...e))},max(...e){return this.check(fh(...e))},length(...e){return this.check(hh(...e))},nonempty(...e){return this.check(Jo(1,...e))},lowercase(e){return this.check(lS(e))},uppercase(e){return this.check(uS(e))},trim(){return this.check(gS())},normalize(...e){return this.check(mS(...e))},toLowerCase(){return this.check(vS())},toUpperCase(){return this.check(yS())},slugify(){return this.check(bS())}})),aE=M("ZodString",(e,n)=>{Ma.init(e,n),Ch.init(e,n)},{email(e){return this.check(D1(fE,e))},url(e){return this.check(F1(pE,e))},jwt(e){return this.check(eS(RE,e))},emoji(e){return this.check(L1(mE,e))},guid(e){return this.check(N1(hE,e))},uuid(e){return this.check(j1(To,e))},uuidv4(e){return this.check(M1(To,e))},uuidv6(e){return this.check($1(To,e))},uuidv7(e){return this.check(z1(To,e))},nanoid(e){return this.check(V1(gE,e))},cuid(e){return this.check(U1(vE,e))},cuid2(e){return this.check(Z1(yE,e))},ulid(e){return this.check(B1(bE,e))},base64(e){return this.check(J1(kE,e))},base64url(e){return this.check(Y1(PE,e))},xid(e){return this.check(K1(wE,e))},ksuid(e){return this.check(W1(_E,e))},ipv4(e){return this.check(H1(xE,e))},ipv6(e){return this.check(G1(SE,e))},cidrv4(e){return this.check(q1(EE,e))},cidrv6(e){return this.check(Q1(CE,e))},e164(e){return this.check(X1(OE,e))},datetime(e){return this.check(tS(cE,e))},date(e){return this.check(nS(lE,e))},time(e){return this.check(rS(uE,e))},duration(e){return this.check(oS(dE,e))}});function pl(e){return A1(aE,e)}const De=M("ZodStringFormat",(e,n)=>{Te.init(e,n),Ch.init(e,n)}),cE=M("ZodISODateTime",(e,n)=>{Fx.init(e,n),De.init(e,n)}),lE=M("ZodISODate",(e,n)=>{Lx.init(e,n),De.init(e,n)}),uE=M("ZodISOTime",(e,n)=>{Vx.init(e,n),De.init(e,n)}),dE=M("ZodISODuration",(e,n)=>{Ux.init(e,n),De.init(e,n)}),fE=M("ZodEmail",(e,n)=>{Cx.init(e,n),De.init(e,n)}),hE=M("ZodGUID",(e,n)=>{Sx.init(e,n),De.init(e,n)}),To=M("ZodUUID",(e,n)=>{Ex.init(e,n),De.init(e,n)}),pE=M("ZodURL",(e,n)=>{Ix.init(e,n),De.init(e,n)}),mE=M("ZodEmoji",(e,n)=>{Ax.init(e,n),De.init(e,n)}),gE=M("ZodNanoID",(e,n)=>{Dx.init(e,n),De.init(e,n)}),vE=M("ZodCUID",(e,n)=>{Nx.init(e,n),De.init(e,n)}),yE=M("ZodCUID2",(e,n)=>{jx.init(e,n),De.init(e,n)}),bE=M("ZodULID",(e,n)=>{Mx.init(e,n),De.init(e,n)}),wE=M("ZodXID",(e,n)=>{$x.init(e,n),De.init(e,n)}),_E=M("ZodKSUID",(e,n)=>{zx.init(e,n),De.init(e,n)}),xE=M("ZodIPv4",(e,n)=>{Zx.init(e,n),De.init(e,n)}),SE=M("ZodIPv6",(e,n)=>{Kx.init(e,n),De.init(e,n)}),EE=M("ZodCIDRv4",(e,n)=>{Wx.init(e,n),De.init(e,n)}),CE=M("ZodCIDRv6",(e,n)=>{Gx.init(e,n),De.init(e,n)}),kE=M("ZodBase64",(e,n)=>{qx.init(e,n),De.init(e,n)}),PE=M("ZodBase64URL",(e,n)=>{Jx.init(e,n),De.init(e,n)}),OE=M("ZodE164",(e,n)=>{Yx.init(e,n),De.init(e,n)}),RE=M("ZodJWT",(e,n)=>{e1.init(e,n),De.init(e,n)}),TE=M("ZodBoolean",(e,n)=>{t1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>TS(e,t,r)});function r2(e){return sS(TE,e)}const IE=M("ZodUnknown",(e,n)=>{n1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>AS()});function ml(){return iS(IE)}const AE=M("ZodNever",(e,n)=>{r1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>IS(e,t,r)});function DE(e){return aS(AE,e)}const NE=M("ZodArray",(e,n)=>{Fa(),o1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>MS(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(fh(e,n))},length(e,n){return this.check(hh(e,n))},unwrap(){return this.element}});function jE(e,n){return wS(NE,e,n)}const ME=M("ZodObject",(e,n)=>{Fa(),a1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>$S(e,t,r,o),u_(e,"shape",t=>t._zod.def.shape,!1)},{keyof(){return UE(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:ml()}))},loose(){return this.clone(mt(this._zod.def,{catchall:ml()}))},strict(){return this.clone(mt(this._zod.def,{catchall:DE()}))},strip(){return this.clone(mt(this._zod.def,{catchall:void 0}))},extend(e){return Y0(this,e)},safeExtend(e){return X0(this,e)},merge(e){return e_(this,e)},pick(e){return Q0(this,e)},omit(e){return J0(this,e)},partial(...e){return Vc(kh,this,e[0])},exactPartial(...e){return Vc(Ph,this,e[0],"exactPartial")},required(...e){return t_(Oh,this,e[0])}});function $E(e,n){const t={type:"object",shape:e??{},...re(n)};return new ME(t)}const zE=M("ZodUnion",(e,n)=>{c1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>zS(e,t,r,o),e.options=n.options});function FE(e,n){return new zE({type:"union",options:e,...re(n)})}const LE=M("ZodIntersection",(e,n)=>{l1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>FS(e,t,r,o)});function VE(e,n){return new LE({type:"intersection",left:e,right:n})}const ji=M("ZodEnum",(e,n)=>{u1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(r,o,s)=>DS(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 UE(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 ZE=M("ZodTransform",(e,n)=>{Fa(),d1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>jS(e,t,r,o),e._zod.parse=(t,r)=>{if(r.direction==="backward")throw new Jf(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 BE(e){return new ZE({type:"transform",transform:e})}const kh=M("ZodOptional",(e,n)=>{lh.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>Eh(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function gl(e){return new kh({type:"optional",innerType:e})}const Ph=M("ZodExactOptional",(e,n)=>{f1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>Eh(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function KE(e){return new Ph({type:"optional",innerType:e})}const WE=M("ZodNullable",(e,n)=>{h1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>LS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function vl(e){return new WE({type:"nullable",innerType:e})}const HE=M("ZodDefault",(e,n)=>{p1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>US(e,t,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function GE(e,n){return new HE({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Gf(n)}})}const qE=M("ZodPrefault",(e,n)=>{m1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>ZS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function QE(e,n){return new qE({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Gf(n)}})}const Oh=M("ZodNonOptional",(e,n)=>{g1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>VS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function JE(e,n){return new Oh({type:"nonoptional",innerType:e,...re(n)})}const YE=M("ZodCatch",(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,e.removeCatch=e.unwrap});function XE(e,n){return new YE({type:"catch",innerType:e,catchValue:typeof n=="function"?n:f_(n)})}const eC=M("ZodPipe",(e,n)=>{y1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>KS(e,t,r,o),e.in=n.in,e.out=n.out});function yl(e,n){return new eC({type:"pipe",in:e,out:n})}const tC=M("ZodReadonly",(e,n)=>{b1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>WS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function nC(e){return new tC({type:"readonly",innerType:e})}const Rh=M("ZodCustom",(e,n)=>{w1.init(e,n),Le.init(e,n),e._zod.processJSONSchema=(t,r,o)=>NS(e,t,r,o)});function rC(e,n={}){return _S(Rh,e,n)}function oC(e,n){return xS(e,n)}const sC=M("ZodInstanceOf",(e,n)=>{Rh.init(e,n)},{properties(e,n){return this.check(pS(e,n))}});function o2(e,n={}){const t=new sC({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 iC=Object.defineProperty,aC=(e,n)=>iC(e,"name",{value:n,configurable:!0}),cC=h.forwardRef(aC(function(n,t){return m.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")),Th=cC;const lC=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(lC(),r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=m.jsx(Th,{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Mi.displayName=Th.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=m.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 uC=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}}),Ih=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(uC({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=m.jsx("div",{ref:n,className:i,...s}),t[7]=s,t[8]=n,t[9]=i,t[10]=a):a=t[10],a});Ih.displayName="Card";const Ah=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=m.jsx("div",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Ah.displayName="CardHeader";const Dh=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=m.jsx("div",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Dh.displayName="CardTitle";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("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=m.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="CardDescription";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("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=m.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="CardContent";const dC=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=m.jsx("div",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});dC.displayName="CardFooter";const fC=$E({email:pl().email("Enter a valid email"),password:pl().min(8,"Password must be at least 8 characters")});function hC(){var _e,Ie,de,xe;const e=J.c(54),n=Il(),{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:Gw,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:F0(fC)},e[1]=a):a=e[1];const{register:c,handleSubmit:u,setError:d,formState:l}=j0(a),{errors:f,isSubmitting:p}=l;let g;e[2]!==n||e[3]!==i||e[4]!==d?(g=async function(st){try{const{status:dt}=await Pf.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]=g):g=e[5];const v=g;if(((_e=s.data)==null?void 0:_e.initialized)===!1){let Ze;return e[6]===Symbol.for("react.memo_cache_sentinel")?(Ze=m.jsx(zi,{to:"/setup",replace:!0}),e[6]=Ze):Ze=e[6],Ze}let y;e[7]!==r?(y=m.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=m.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"}),e[9]=b):b=e[9];let _;e[10]!==y?(_=m.jsxs("div",{className:"flex items-center gap-2",children:[y,b]}),e[10]=y,e[11]=_):_=e[11];let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=m.jsxs(Ah,{className:"text-center",children:[m.jsx(Dh,{className:"text-2xl tracking-display-md",children:"Welcome back"}),m.jsx(Nh,{children:"Sign in to your team workspace"})]}),e[12]=C):C=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=m.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=m.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 B;e[23]!==$?(B=m.jsx(Fs,{id:"email-error",message:$}),e[23]=$,e[24]=B):B=e[24];let N;e[25]!==R||e[26]!==B?(N=m.jsxs("div",{className:"grid gap-2",children:[E,R,B]}),e[25]=R,e[26]=B,e[27]=N):N=e[27];let V;e[28]===Symbol.for("react.memo_cache_sentinel")?(V=m.jsx(Mi,{htmlFor:"password",children:"Password"}),e[28]=V):V=e[28];const L=!!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]!==L||e[32]!==Y||e[33]!==W?(Q=m.jsx(Uo,{id:"password",type:"password",autoComplete:"current-password","aria-required":"true","aria-invalid":L,"aria-describedby":Y,...W}),e[31]=L,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=m.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=m.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=m.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=m.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]!==N||e[46]!==G||e[47]!==le||e[48]!==X||e[49]!==S?(ce=m.jsxs(Ih,{level:4,className:"w-full",children:[C,m.jsx(jh,{children:m.jsxs("form",{onSubmit:S,className:"flex flex-col gap-4",children:[N,G,le,X]})})]}),e[45]=N,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=m.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:m.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 pC(){return new Dp({defaultOptions:{queries:{retry:0,refetchOnWindowFocus:!0,networkMode:"always"}}})}const mC=h.lazy(()=>Ut(()=>import("./Setup-ULjvIfAi.js"),__vite__mapDeps([0,1,2])).then(e=>({default:e.Setup}))),gC=h.lazy(()=>Ut(()=>import("./Invite-EVMTsuNz.js"),__vite__mapDeps([3,1,2,4])).then(e=>({default:e.Invite}))),vC=h.lazy(()=>Ut(()=>import("./ResetPassword-D-SFg4ap.js"),__vite__mapDeps([5,1,2])).then(e=>({default:e.ResetPassword}))),yC=h.lazy(()=>Ut(()=>import("./AppCenter-BHz6vh5p.js"),__vite__mapDeps([6,1,7,8,9,10,11,12,2])).then(e=>({default:e.AppCenter}))),bC=h.lazy(()=>Ut(()=>import("./QASession-CL-eyFxG.js"),__vite__mapDeps([13,1,14,2,11,8,7,15,10])).then(e=>({default:e.QASession}))),wC=h.lazy(()=>Ut(()=>import("./MacResources-fCn40Tf5.js"),__vite__mapDeps([16,1,14,17,2])).then(e=>({default:e.MacResources}))),_C=h.lazy(()=>Ut(()=>import("./Default-bCqU0Qz9.js"),__vite__mapDeps([18,1,10,11,4,2])).then(e=>({default:e.DefaultSettings}))),xC=h.lazy(()=>Ut(()=>import("./Team-DH91GD4w.js"),__vite__mapDeps([19,1,8,11,20,15,12,2])).then(e=>({default:e.TeamSettings}))),SC=h.lazy(()=>Ut(()=>import("./Tokens-DImLpOVZ.js"),__vite__mapDeps([21,1,10,11,8,20,15,12,9,2])).then(e=>({default:e.TokenSettings}))),EC=h.lazy(()=>Ut(()=>import("./NotFound-wHOnT2Fl.js"),__vite__mapDeps([22,1])).then(e=>({default:e.NotFound}))),CC=m.jsx("div",{className:"flex h-screen w-full items-center justify-center text-sm text-muted-foreground",children:"Loading…"}),Io=e=>m.jsx(h.Suspense,{fallback:CC,children:e}),kC=pC();function PC(){const e=J.c(15),{resolvedTheme:n}=Xo();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=m.jsx(ft,{path:"/login",element:m.jsx(hC,{})}),e[0]=t):t=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=m.jsx(ft,{path:"/setup",element:Io(m.jsx(mC,{}))}),e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=m.jsx(ft,{path:"/invite",element:Io(m.jsx(gC,{}))}),e[2]=o):o=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=m.jsx(ft,{path:"/reset-password",element:Io(m.jsx(vC,{}))}),e[3]=s):s=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=m.jsx(u0,{}),e[4]=i):i=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=m.jsx(ft,{index:!0,element:m.jsx(zi,{to:"/app-center",replace:!0})}),e[5]=a):a=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=m.jsx(ft,{path:"/app-center",element:m.jsx(yC,{})}),e[6]=c):c=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=m.jsx(ft,{path:"/app-center/build",element:m.jsx(bC,{})}),e[7]=u):u=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=m.jsx(ft,{path:"/mac-resources",element:m.jsx(wC,{})}),e[8]=d):d=e[8];let l;e[9]===Symbol.for("react.memo_cache_sentinel")?(l=m.jsx(ft,{path:"/settings/default",element:m.jsx(_C,{})}),e[9]=l):l=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=m.jsx(ft,{path:"/settings/team",element:m.jsx(xC,{})}),e[10]=f):f=e[10];let p;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=m.jsxs(ft,{element:i,children:[a,c,u,d,l,f,m.jsx(ft,{path:"/settings/tokens",element:m.jsx(SC,{})})]}),e[11]=p):p=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=m.jsxs(Gh,{children:[t,r,o,s,p,m.jsx(ft,{path:"*",element:Io(m.jsx(EC,{}))})]}),e[12]=g):g=e[12];const v=n;let y;return e[13]!==v?(y=m.jsx(ap,{client:kC,children:m.jsxs(qh,{children:[g,m.jsx(bm,{position:"bottom-right",richColors:!0,theme:v})]})}),e[13]=v,e[14]=y):y=e[14],y}Wh.createRoot(document.getElementById("root")).render(m.jsx(h.StrictMode,{children:m.jsx(Xh,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,children:m.jsx(PC,{})})}));export{DC as $,wd as A,es as B,Ih as C,Jv as D,Ky as E,Fs as F,Hy as G,Xw as H,Uo as I,r2 as J,Ag as K,Mi as L,Zm as M,XC as N,te as O,Xi as P,oe as Q,ta as R,Zo as S,Wy as T,e0 as U,Ey as V,QC as W,Gm as X,ia as Y,nn as Z,o2 as _,jh as a,ut as a0,os as a1,qd as a2,Yt as a3,no as a4,GC as a5,Gw as a6,e2 as a7,qC as a8,ZC as a9,oo as aA,ca as aB,ts as aC,j0 as aD,wn as aE,lt as aF,Wi as aG,Li as aH,hd as aI,g0 as aJ,LC as aK,HC as aL,Xo as aM,Tp as aa,KC as ab,BC as ac,WC as ad,Qw as ae,UC as af,VC as ag,t2 as ah,Zr as ai,Xu as aj,IC as ak,at as al,Qe as am,$E as an,va as ao,YC as ap,bs as aq,zl as ar,pl as as,AC as at,F0 as au,JC as av,Of as aw,c0 as ax,Xt as ay,Re as az,Nh as b,Ah as c,Dh as d,$m as e,zm as f,_d as g,n2 as h,cy as i,od as j,ad as k,rd as l,ey as m,id as n,NC as o,Qi as p,Nu as q,Ab as r,Vm as s,rn as t,Me as u,Ib as v,bd as w,xr as x,to as y,Id as z};