@re-venue/ui-core-react 0.2.1 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +21 -1
- package/dist/ui-core-react.css +1 -1
- package/dist/ui-core-react.js +3268 -3128
- package/dist/ui-core-react.umd.cjs +24 -24
- package/package.json +1 -1
- package/src/components/AppShell.tsx +265 -43
- package/src/styles/shell.css +340 -1
- package/src/types.ts +11 -0
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
(function(E,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],c):(E=typeof globalThis<"u"?globalThis:E||self,c(E.ReVenueUiCoreReact={},E.jsxRuntime,E.React,E.ReactDOM))})(this,(function(E,c,C,Xt){"use strict";function Jn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const l=Jn(C),lt=Jn(Xt);function ea({open:e,title:t="Are you sure?",message:o="This action cannot be undone.",confirmLabel:r="Confirm",loading:n=!1,onConfirm:a,onCancel:s}){const[i,d]=C.useState(!1),[u,f]=C.useState(!1),h=C.useRef(`rv-confirm-${Math.random().toString(36).slice(2)}`).current;return C.useEffect(()=>{if(e)f(!0),requestAnimationFrame(()=>d(!0));else{d(!1);const m=setTimeout(()=>f(!1),200);return()=>clearTimeout(m)}},[e]),u?Xt.createPortal(c.jsx("div",{className:`rv-modal-backdrop${i?" rv-modal-visible":""}`,onClick:m=>{m.target===m.currentTarget&&s()},children:c.jsxs("div",{className:"rv-modal-dialog",role:"dialog","aria-modal":"true","aria-labelledby":h,children:[c.jsx("h2",{id:h,className:"rv-modal-title",children:t}),c.jsx("p",{className:"rv-modal-body",children:o}),c.jsxs("div",{className:"rv-modal-actions",children:[c.jsx("button",{className:"rv-modal-btn rv-modal-btn-ghost",onClick:s,disabled:n,children:"Cancel"}),c.jsx("button",{className:"rv-modal-btn rv-modal-btn-danger",onClick:a,disabled:n,children:r})]})]})}),document.body):null}function ta({value:e,venues:t,onChange:o}){const[r,n]=C.useState(!1),a=C.useRef(null),s=C.useMemo(()=>t.find(f=>f.id===e),[t,e]),i=C.useMemo(()=>{const f=new Map;for(const h of t){const m=h.workspace?.id??"__none__",p=h.workspace?.name??"";f.has(m)||f.set(m,{workspaceName:p,venues:[]}),f.get(m).venues.push(h)}return[...f.values()]},[t]),d=i.length>1;C.useEffect(()=>{if(!r)return;function f(h){a.current&&!a.current.contains(h.target)&&n(!1)}return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[r]);function u(f){o(f),n(!1)}return c.jsxs("div",{ref:a,className:"rv-venue-switcher",children:[c.jsxs("button",{className:`rv-vs-trigger${r?" rv-open":""}`,onClick:()=>n(f=>!f),children:[c.jsxs("span",{className:"rv-vs-label",children:[c.jsx("span",{className:"rv-vs-venue",children:s?.name??"Select venue"}),s?.workspace&&d&&c.jsx("span",{className:"rv-vs-workspace",children:s.workspace.name})]}),c.jsx("svg",{className:"rv-vs-chevron",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),r&&c.jsx("div",{className:"rv-vs-dropdown",children:i.map(f=>c.jsxs("div",{children:[d&&c.jsx("div",{className:"rv-vs-workspace-header",children:f.workspaceName}),f.venues.map(h=>c.jsx("button",{className:`rv-vs-venue-option${h.id===e?" rv-active":""}`,onClick:()=>u(h.id),children:h.name},h.id))]},f.workspaceName))})]})}const oa="rv-theme";function rd(){return document.cookie.split("; ").find(o=>o.startsWith(`${oa}=`))?.split("=")[1]==="dark"?"dark":"light"}function nd(e){const t=[`${oa}=${e}`,"path=/","max-age=31536000","SameSite=Lax"];document.cookie=t.join("; ")}function ad(e){document.documentElement.setAttribute("data-theme",e)}function Xo(){const[e,t]=C.useState(()=>rd());C.useEffect(()=>{ad(e)},[e]);const o=C.useCallback(()=>{t(r=>{const n=r==="light"?"dark":"light";return nd(n),n})},[]);return{theme:e,toggleTheme:o}}function sd(){const e=window;if(e.__rvHistoryPatched)return;e.__rvHistoryPatched=!0;const t=history.pushState.bind(history);history.pushState=(...r)=>{t(...r),window.dispatchEvent(new Event("locationchange"))};const o=history.replaceState.bind(history);history.replaceState=(...r)=>{o(...r),window.dispatchEvent(new Event("locationchange"))}}const ra="rv_sidebar_collapsed",id=3600*24*365;function ld(){const e=`${ra}=`;for(const t of document.cookie.split(";")){const o=t.trim();if(o.startsWith(e))return decodeURIComponent(o.slice(e.length))==="true"}return!1}function cd(e,t){const o=t?`; Domain=${t}`:"";document.cookie=`${ra}=${e}; Path=/; Max-Age=${id}; SameSite=Lax${o}`}function dd({user:e,isAdmin:t,venues:o,activeVenueId:r,navItems:n,cookieDomain:a,onSwitchVenue:s,onLogout:i,accountSettingsUrl:d,headerSlot:u,sidebarPanel:f,scrollable:h=!0,children:m}){const{theme:p,toggleTheme:w}=Xo(),[g,v]=C.useState(()=>ld()),[y,b]=C.useState(!1),[x,S]=C.useState(()=>window.location.href);C.useEffect(()=>{sd();function N(){S(window.location.href)}return window.addEventListener("popstate",N),window.addEventListener("locationchange",N),()=>{window.removeEventListener("popstate",N),window.removeEventListener("locationchange",N)}},[]);function T(){const N=!g;v(N),cd(N,a)}const P=C.useMemo(()=>o.find(N=>N.id===r),[o,r]),A=P?.workspace?.name??"",B=C.useMemo(()=>e?.email?e.email.slice(0,2).toUpperCase():"?",[e?.email]),k=C.useMemo(()=>{const N=P?.workspace?.id;return n.filter(V=>V.hidden?!1:!!(!V.permission||t||e?.globalPermissions.includes(V.permission)||N&&e?.workspacePermissions?.[N]?.includes(V.permission)||r&&e?.venuePermissions?.[r]?.includes(V.permission)))},[n,t,e,P,r]),M=C.useMemo(()=>k.filter(N=>!N.pinned),[k]),L=C.useMemo(()=>k.filter(N=>N.pinned),[k]),O=C.useMemo(()=>n.filter(V=>V.url&&x.startsWith(V.url)).sort((V,R)=>R.url.length-V.url.length)[0]?.url??null,[n,x]),Y=o.length>0||u!==void 0;return c.jsxs("div",{className:"rv-app-shell",children:[c.jsxs("aside",{className:`rv-sidebar${g?" rv-collapsed":""}`,children:[c.jsxs("div",{className:"rv-sidebar-top",children:[!g&&c.jsxs("div",{className:"rv-sidebar-brand",children:[c.jsxs("svg",{className:"rv-sidebar-logo",viewBox:"0 0 429 50",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Re-venue",children:[c.jsxs("g",{clipPath:"url(#rv-logo-clip)",children:[c.jsx("path",{d:"M24.946 0.60506C24.6367 1.30638 24.2289 3.01155 24.2289 7.32948V8.73212L23.5117 9.22717C22.3867 8.12706 20.2212 7.61826 18.4775 7.61826C11.9105 7.61826 8.0013 13.6414 8.0013 21.3696V35.0247C8.0013 41.0479 8.09974 45.6683 8.4091 48.9824C6.86228 48.6799 5.54045 48.4736 4.303 48.4736C2.96711 48.4736 1.63122 48.6799 -0.0140381 48.9824C0.295326 46.2734 0.39376 42.9593 0.39376 38.2426V15.8691C0.407822 11.5512 0.309388 4.0154 2.39182e-05 1.00385C1.95464 1.40264 3.0796 1.4989 4.31706 1.4989C5.55452 1.4989 6.89041 1.29263 8.42316 1.00385L8.01537 6.0231C7.91693 7.12321 7.91693 8.73212 7.91693 10.7398L8.12786 10.8361C12.1215 3.61661 16.8322 0 21.768 0C23.0055 0 23.7226 0.206271 24.946 0.60506Z",fill:"currentColor"}),c.jsx("path",{d:"M74.7396 20.5858V22.291L74.5287 24.3949C68.3695 24.2987 61.6901 24.0924 54.4059 24.0924C49.4842 24.0924 44.3376 24.2987 39.1065 24.3949C39.0081 24.9037 39.0081 26.3064 39.0081 26.6089C39.0081 39.0539 46.4047 45.7921 56.6699 45.7921C61.901 45.7921 68.1727 42.9868 72.1663 38.6689L72.6866 38.9714L72.0678 43.8944C66.7243 47.9098 60.2557 50.0137 54.8137 50.0137C40.5408 50.0137 29.9662 40.0715 29.9662 26.3201C29.9802 9.84598 38.6003 0 53.4919 0C66.6399 0 74.7396 8.12706 74.7396 20.5858ZM52.6623 20.8883C56.2621 20.8883 62.3088 20.5858 66.3165 20.5858C66.218 9.03465 61.9994 3.21782 53.6888 3.21782C45.3781 3.21782 40.4424 9.74972 39.3174 20.5858C43.3251 20.5858 51.017 20.8883 52.6623 20.8883Z",fill:"currentColor"}),c.jsx("path",{d:"M164.989 22.9923V27.709H82.8533V22.9923H164.989Z",fill:"currentColor"}),c.jsx("path",{d:"M172.274 1.51265C173.82 1.51265 175.142 1.30638 176.788 1.0176C180.992 14.1639 185.928 26.8152 192.087 40.1815C195.687 32.852 198.148 26.8289 207.794 1.0176C208.821 1.32013 209.847 1.51265 210.972 1.51265C212.21 1.51265 213.025 1.30638 214.15 1.0176L203.477 24.615C199.779 32.9483 196.502 40.9791 193.521 49.0099C192.495 48.7074 191.468 48.5011 190.343 48.5011C189.106 48.5011 188.6 48.5974 187.053 49.0099C180.486 32.5495 174.636 17.1755 167.141 1.0176C169.292 1.41639 170.741 1.51265 172.274 1.51265Z",fill:"currentColor"}),c.jsx("path",{d:"M263.452 20.5858V22.291L263.241 24.3949C257.082 24.2987 250.402 24.0924 243.118 24.0924C238.196 24.0924 233.05 24.2987 227.819 24.3949C227.72 24.9037 227.72 26.3064 227.72 26.6089C227.72 39.0539 235.117 45.7921 245.382 45.7921C250.613 45.7921 256.885 42.9868 260.878 38.6689L261.399 38.9714L260.78 43.8944C255.436 47.9098 248.968 50.0138 243.526 50.0138C229.253 50.0138 218.678 40.0715 218.678 26.3201C218.678 9.85973 227.298 0.0137513 242.19 0.0137513C255.338 0.0137513 263.438 8.14081 263.438 20.5996L263.452 20.5858ZM241.374 20.8883C244.974 20.8883 251.021 20.5858 255.029 20.5858C254.93 9.03465 250.711 3.21782 242.401 3.21782C234.09 3.21782 229.154 9.74972 228.029 20.5858C232.037 20.5858 239.729 20.8883 241.374 20.8883Z",fill:"currentColor"}),c.jsx("path",{d:"M315.706 17.7668C315.706 23.0886 315.298 28.9054 315.298 36.5374C315.298 45.3795 315.509 47.181 315.509 48.9824C313.765 48.5836 312.528 48.4736 311.192 48.4736C309.856 48.4736 308.619 48.5699 306.988 48.9824C306.988 43.2618 307.705 34.2272 307.705 27.6953V19.967C307.705 11.6337 303.908 5.21177 296.413 5.21177C287.371 5.21177 282.66 10.8361 282.66 21.2734V33.3196C282.66 37.6375 282.97 44.4582 283.476 48.9824C281.831 48.6799 280.396 48.4736 278.85 48.4736C277.303 48.4736 275.868 48.6799 274.223 48.9824C275.039 42.6568 275.039 35.3273 275.039 31.3119V17.753C275.039 11.7299 274.729 6.20187 274.223 0.990099C275.967 1.38889 277.514 1.48515 278.85 1.48515C279.876 1.48515 281.212 1.27888 282.956 0.990099C282.857 2.69527 282.646 6.61441 282.646 9.0209H282.857C286.654 3.30033 291.787 -0.0137513 299.183 -0.0137513C309.448 -0.0137513 315.72 5.70682 315.72 17.753L315.706 17.7668Z",fill:"currentColor"}),c.jsx("path",{d:"M331.413 1.00385C333.157 1.30638 334.591 1.4989 335.73 1.4989C336.968 1.4989 338.304 1.29263 339.935 1.00385C339.218 9.43344 338.908 19.6782 338.908 28.9191C338.908 31.4356 338.908 37.6513 341.889 40.7728C343.844 43.0831 346.924 44.7882 350.931 44.7882C356.584 44.7882 359.861 42.3817 361.815 39.2602C364.276 35.2448 364.487 32.2332 364.487 21.3834C364.487 11.2486 364.389 3.10781 364.276 1.00385C366.02 1.40264 367.257 1.4989 368.593 1.4989C370.14 1.4989 371.265 1.40264 372.798 1.00385C372.39 7.42574 372.081 17.368 372.081 31.1194C372.081 38.8476 372.179 44.2657 372.488 48.9961C370.942 48.6936 369.62 48.4873 368.481 48.4873C367.342 48.4873 366.02 48.6936 364.473 48.9961C364.571 47.6898 364.684 45.4758 364.684 43.9769V40.3603H364.473C360.873 46.7822 355.023 50 348.456 50C337.783 50 331.315 44.3757 331.315 33.1271C331.315 29.0154 331.624 19.7745 331.624 16.5567C331.624 11.3311 331.526 6.21562 331.413 0.990099V1.00385Z",fill:"currentColor"}),c.jsx("path",{d:"M428.947 20.5858V22.291L428.736 24.3949C422.577 24.2987 415.898 24.0924 408.614 24.0924C403.692 24.0924 398.545 24.2987 393.314 24.3949C393.216 24.9037 393.216 26.3064 393.216 26.6089C393.216 39.0539 400.612 45.7921 410.878 45.7921C416.109 45.7921 422.38 42.9868 426.374 38.6689L426.894 38.9714L426.276 43.8944C420.932 47.9098 414.463 50.0138 409.021 50.0138C394.749 50.0138 384.174 40.0715 384.174 26.3201C384.174 9.85973 392.794 0.0137513 407.686 0.0137513C420.834 0.0137513 428.933 8.14081 428.933 20.5996L428.947 20.5858ZM406.87 20.8883C410.47 20.8883 416.517 20.5858 420.524 20.5858C420.426 9.03465 416.207 3.21782 407.897 3.21782C399.586 3.21782 394.65 9.74972 393.525 20.5858C397.533 20.5858 405.225 20.8883 406.87 20.8883Z",fill:"currentColor"})]}),c.jsx("defs",{children:c.jsx("clipPath",{id:"rv-logo-clip",children:c.jsx("rect",{width:"428.947",height:"50",fill:"white"})})})]}),A&&c.jsx("span",{className:"rv-sidebar-workspace",children:A})]}),c.jsx("button",{className:"rv-collapse-toggle",title:g?"Expand sidebar":"Collapse sidebar",onClick:T,children:g?c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("polyline",{points:"13 17 18 12 13 7"}),c.jsx("polyline",{points:"6 17 11 12 6 7"})]}):c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("polyline",{points:"11 17 6 12 11 7"}),c.jsx("polyline",{points:"18 17 13 12 18 7"})]})})]}),f&&c.jsx("div",{className:"rv-sidebar-panel",children:f}),c.jsx("nav",{className:"rv-sidebar-nav",children:M.map(N=>c.jsxs("a",{href:N.url,className:`rv-nav-item${N.url===O?" rv-active":""}`,title:g?N.label:void 0,children:[c.jsx("span",{className:"rv-nav-icon",dangerouslySetInnerHTML:{__html:N.icon}}),!g&&c.jsx("span",{className:"rv-nav-label",children:N.label})]},N.url))}),L.length>0&&c.jsx("nav",{className:"rv-sidebar-pinned",children:L.map(N=>c.jsxs("a",{href:N.url,className:`rv-nav-item${N.url===O?" rv-active":""}`,title:g?N.label:void 0,children:[c.jsx("span",{className:"rv-nav-icon",dangerouslySetInnerHTML:{__html:N.icon}}),!g&&c.jsx("span",{className:"rv-nav-label",children:N.label})]},N.url))}),c.jsxs("div",{className:"rv-sidebar-user",children:[c.jsx("div",{className:"rv-user-avatar",children:B}),!g&&c.jsx("div",{className:"rv-user-info",children:c.jsx("span",{className:"rv-user-email",title:e?.email??"",children:e?.email})}),!1,d&&c.jsx("a",{className:"rv-account-settings-btn",href:d,title:"Account settings",children:c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),c.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}),c.jsx("button",{className:"rv-logout-btn",title:"Sign out",onClick:()=>b(!0),children:c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),c.jsx("polyline",{points:"16 17 21 12 16 7"}),c.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]})})]})]}),c.jsxs("div",{className:"rv-shell-body",children:[Y&&c.jsx("header",{className:"rv-shell-header",children:u!==void 0?u:c.jsx(ta,{value:r??"",venues:o,onChange:s??(()=>{})})}),c.jsx("main",{className:`rv-shell-content${h?" rv-shell-content--scroll":" rv-shell-content--fill"}`,children:m})]}),c.jsx(ea,{open:y,title:"Sign out",message:"Are you sure you want to sign out?",confirmLabel:"Sign out",onConfirm:i,onCancel:()=>b(!1)})]})}function pe(e,t=[]){let o=[];function r(a,s){const i=l.createContext(s);i.displayName=a+"Context";const d=o.length;o=[...o,s];const u=h=>{const{scope:m,children:p,...w}=h,g=m?.[e]?.[d]||i,v=l.useMemo(()=>w,Object.values(w));return c.jsx(g.Provider,{value:v,children:p})};u.displayName=a+"Provider";function f(h,m){const p=m?.[e]?.[d]||i,w=l.useContext(p);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[u,f]}const n=()=>{const a=o.map(s=>l.createContext(s));return function(i){const d=i?.[e]||a;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return n.scopeName=e,[r,ud(n,...t)]}function ud(...e){const t=e[0];if(e.length===1)return t;const o=()=>{const r=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){const s=r.reduce((i,{useScope:d,scopeName:u})=>{const h=d(a)[`__scope${u}`];return{...i,...h}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return o.scopeName=t.scopeName,o}function na(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fd(...e){return t=>{let o=!1;const r=e.map(n=>{const a=na(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){const a=r[n];typeof a=="function"?a():na(e[n],null)}}}}function K(...e){return l.useCallback(fd(...e),e)}function F(e,t,{checkForDefaultPrevented:o=!0}={}){return function(n){if(e?.(n),o===!1||!n.defaultPrevented)return t?.(n)}}var se=globalThis?.document?l.useLayoutEffect:()=>{},pd=l[" useId ".trim().toString()]||(()=>{}),hd=0;function Be(e){const[t,o]=l.useState(pd());return se(()=>{o(r=>r??String(hd++))},[e]),t?`radix-${t}`:""}var gd=l[" useInsertionEffect ".trim().toString()]||se;function Re({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){const[n,a,s]=md({defaultProp:t,onChange:o}),i=e!==void 0,d=i?e:n;{const f=l.useRef(e!==void 0);l.useEffect(()=>{const h=f.current;h!==i&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,r])}const u=l.useCallback(f=>{if(i){const h=vd(f)?f(e):f;h!==e&&s.current?.(h)}else a(f)},[i,e,a,s]);return[d,u]}function md({defaultProp:e,onChange:t}){const[o,r]=l.useState(e),n=l.useRef(o),a=l.useRef(t);return gd(()=>{a.current=t},[t]),l.useEffect(()=>{n.current!==o&&(a.current?.(o),n.current=o)},[o,n]),[o,r,a]}function vd(e){return typeof e=="function"}function et(e){const t=l.forwardRef((o,r)=>{let{children:n,...a}=o,s=null,i=!1;const d=[];sa(n)&&typeof qt=="function"&&(n=qt(n._payload)),l.Children.forEach(n,m=>{if(Sd(m)){i=!0;const p=m;let w="child"in p.props?p.props.child:p.props.children;sa(w)&&typeof qt=="function"&&(w=qt(w._payload)),s=yd(p,w),d.push(s?.props?.children)}else d.push(m)}),s?s=l.cloneElement(s,void 0,d):!i&&l.Children.count(n)===1&&l.isValidElement(n)&&(s=n);const u=s?Cd(s):void 0,f=K(r,u);if(!s){if(n||n===0)throw new Error(i?Pd(e):Nd(e));return n}const h=xd(a,s.props??{});return s.type!==l.Fragment&&(h.ref=r?f:u),l.cloneElement(s,h)});return t.displayName=`${e}.Slot`,t}var bd=et("Slot"),aa=Symbol.for("radix.slottable");function wd(e){const t=o=>"child"in o?o.children(o.child):o.children;return t.displayName=`${e}.Slottable`,t.__radixId=aa,t}var yd=(e,t)=>{if("child"in e.props){const o=e.props.child;return l.isValidElement(o)?l.cloneElement(o,void 0,e.props.children(o.props.children)):null}return l.isValidElement(t)?t:null};function xd(e,t){const o={...t};for(const r in t){const n=e[r],a=t[r];/^on[A-Z]/.test(r)?n&&a?o[r]=(...i)=>{const d=a(...i);return n(...i),d}:n&&(o[r]=n):r==="style"?o[r]={...n,...a}:r==="className"&&(o[r]=[n,a].filter(Boolean).join(" "))}return{...e,...o}}function Cd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function Sd(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===aa}var Ed=Symbol.for("react.lazy");function sa(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Ed&&"_payload"in e&&Td(e._payload)}function Td(e){return typeof e=="object"&&e!==null&&"then"in e}var Nd=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Pd=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,qt=l[" use ".trim().toString()],Ad=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=Ad.reduce((e,t)=>{const o=et(`Primitive.${t}`),r=l.forwardRef((n,a)=>{const{asChild:s,...i}=n,d=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ia(e,t){e&<.flushSync(()=>e.dispatchEvent(t))}function le(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>((...o)=>t.current?.(...o)),[])}function kd(e,t=globalThis?.document){const o=le(e);l.useEffect(()=>{const r=n=>{n.key==="Escape"&&o(n)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[o,t])}var Dd="DismissableLayer",qo="dismissableLayer.update",Od="dismissableLayer.pointerDownOutside",_d="dismissableLayer.focusOutside",la,Zo=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),ct=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:i,onDismiss:d,...u}=e,f=l.useContext(Zo),[h,m]=l.useState(null),p=h?.ownerDocument??globalThis?.document,[,w]=l.useState({}),g=K(t,k=>m(k)),v=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=h?v.indexOf(h):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,T=x>=b,P=l.useRef(!1),A=Ld(k=>{const M=k.target;if(!(M instanceof Node))return;const L=[...f.branches].some(O=>O.contains(M));!T||L||(a?.(k),i?.(k),k.defaultPrevented||d?.())},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:P,dismissableSurfaces:f.dismissableSurfaces}),B=$d(k=>{if(r&&P.current)return;const M=k.target;[...f.branches].some(O=>O.contains(M))||(s?.(k),i?.(k),k.defaultPrevented||d?.())},p);return kd(k=>{x===f.layers.size-1&&(n?.(k),!k.defaultPrevented&&d&&(k.preventDefault(),d()))},p),l.useEffect(()=>{if(h)return o&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(la=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),da(),()=>{o&&(f.layersWithOutsidePointerEventsDisabled.delete(h),f.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=la))}},[h,p,o,f]),l.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),da())},[h,f]),l.useEffect(()=>{const k=()=>w({});return document.addEventListener(qo,k),()=>document.removeEventListener(qo,k)},[]),c.jsx(H.div,{...u,ref:g,style:{pointerEvents:S?T?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,B.onFocusCapture),onBlurCapture:F(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,A.onPointerDownCapture)})});ct.displayName=Dd;var Id="DismissableLayerBranch",ca=l.forwardRef((e,t)=>{const o=l.useContext(Zo),r=l.useRef(null),n=K(t,r);return l.useEffect(()=>{const a=r.current;if(a)return o.branches.add(a),()=>{o.branches.delete(a)}},[o.branches]),c.jsx(H.div,{...e,ref:n})});ca.displayName=Id;function Md(){const e=l.useContext(Zo),[t,o]=l.useState(null);return l.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),o}function Ld(e,t){const{ownerDocument:o=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:n,dismissableSurfaces:a}=t,s=le(e),i=l.useRef(!1),d=l.useRef(!1),u=l.useRef(new Map),f=l.useRef(()=>{});return l.useEffect(()=>{function h(){d.current=!1,n.current=!1,u.current.clear()}function m(){return Array.from(u.current.values()).some(Boolean)}function p(b){if(!d.current)return;const x=b.target;x instanceof Node&&[...a].some(T=>T.contains(x))||u.current.set(b.type,!0),b.type==="click"&&window.setTimeout(()=>{d.current&&f.current()},0)}function w(b){d.current&&u.current.set(b.type,!1)}const g=b=>{if(b.target&&!i.current){let x=function(){o.removeEventListener("click",f.current);const T=m();h(),T||ua(Od,s,S,{discrete:!0})};const S={originalEvent:b};d.current=!0,n.current=r&&b.button===0,u.current.clear(),!r||b.button!==0?x():(o.removeEventListener("click",f.current),f.current=x,o.addEventListener("click",f.current,{once:!0}))}else o.removeEventListener("click",f.current),h();i.current=!1},v=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const b of v)o.addEventListener(b,p,!0),o.addEventListener(b,w);const y=window.setTimeout(()=>{o.addEventListener("pointerdown",g)},0);return()=>{window.clearTimeout(y),o.removeEventListener("pointerdown",g),o.removeEventListener("click",f.current);for(const b of v)o.removeEventListener(b,p,!0),o.removeEventListener(b,w)}},[o,s,r,n,a]),{onPointerDownCapture:()=>i.current=!0}}function $d(e,t=globalThis?.document){const o=le(e),r=l.useRef(!1);return l.useEffect(()=>{const n=a=>{a.target&&!r.current&&ua(_d,o,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function da(){const e=new CustomEvent(qo);document.dispatchEvent(e)}function ua(e,t,o,{discrete:r}){const n=o.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),r?ia(n,a):n.dispatchEvent(a)}var Fd=ct,Bd=ca,Qo="focusScope.autoFocusOnMount",Jo="focusScope.autoFocusOnUnmount",fa={bubbles:!1,cancelable:!0},Rd="FocusScope",Zt=l.forwardRef((e,t)=>{const{loop:o=!1,trapped:r=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...s}=e,[i,d]=l.useState(null),u=le(n),f=le(a),h=l.useRef(null),m=K(t,g=>d(g)),p=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let g=function(x){if(p.paused||!i)return;const S=x.target;i.contains(S)?h.current=S:He(h.current,{select:!0})},v=function(x){if(p.paused||!i)return;const S=x.relatedTarget;S!==null&&(i.contains(S)||He(h.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const T of x)T.removedNodes.length>0&&He(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const b=new MutationObserver(y);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),b.disconnect()}}},[r,i,p.paused]),l.useEffect(()=>{if(i){ga.add(p);const g=document.activeElement;if(!i.contains(g)){const y=new CustomEvent(Qo,fa);i.addEventListener(Qo,u),i.dispatchEvent(y),y.defaultPrevented||(Hd(jd(pa(i)),{select:!0}),document.activeElement===g&&He(i))}return()=>{i.removeEventListener(Qo,u),setTimeout(()=>{const y=new CustomEvent(Jo,fa);i.addEventListener(Jo,f),i.dispatchEvent(y),y.defaultPrevented||He(g??document.body,{select:!0}),i.removeEventListener(Jo,f),ga.remove(p)},0)}}},[i,u,f,p]);const w=l.useCallback(g=>{if(!o&&!r||p.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(v&&y){const b=g.currentTarget,[x,S]=Vd(b);x&&S?!g.shiftKey&&y===S?(g.preventDefault(),o&&He(x,{select:!0})):g.shiftKey&&y===x&&(g.preventDefault(),o&&He(S,{select:!0})):y===b&&g.preventDefault()}},[o,r,p.paused]);return c.jsx(H.div,{tabIndex:-1,...s,ref:m,onKeyDown:w})});Zt.displayName=Rd;function Hd(e,{select:t=!1}={}){const o=document.activeElement;for(const r of e)if(He(r,{select:t}),document.activeElement!==o)return}function Vd(e){const t=pa(e),o=ha(t,e),r=ha(t.reverse(),e);return[o,r]}function pa(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function ha(e,t){for(const o of e)if(!zd(o,{upTo:t}))return o}function zd(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Wd(e){return e instanceof HTMLInputElement&&"select"in e}function He(e,{select:t=!1}={}){if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&Wd(e)&&t&&e.select()}}var ga=Ud();function Ud(){let e=[];return{add(t){const o=e[0];t!==o&&o?.pause(),e=ma(e,t),e.unshift(t)},remove(t){e=ma(e,t),e[0]?.resume()}}}function ma(e,t){const o=[...e],r=o.indexOf(t);return r!==-1&&o.splice(r,1),o}function jd(e){return e.filter(t=>t.tagName!=="A")}var Yd="Portal",Mt=l.forwardRef((e,t)=>{const{container:o,...r}=e,[n,a]=l.useState(!1);se(()=>a(!0),[]);const s=o||n&&globalThis?.document?.body;return s?lt.createPortal(c.jsx(H.div,{...r,ref:t}),s):null});Mt.displayName=Yd;function Kd(e,t){return l.useReducer((o,r)=>t[o][r]??o,e)}var ce=e=>{const{present:t,children:o}=e,r=Gd(t),n=typeof o=="function"?o({present:r.isPresent}):l.Children.only(o),a=Xd(r.ref,qd(n));return typeof o=="function"||r.isPresent?l.cloneElement(n,{ref:a}):null};ce.displayName="Presence";function Gd(e){const[t,o]=l.useState(),r=l.useRef(null),n=l.useRef(e),a=l.useRef("none"),s=e?"mounted":"unmounted",[i,d]=Kd(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Qt(r.current);a.current=i==="mounted"?u:"none"},[i]),se(()=>{const u=r.current,f=n.current;if(f!==e){const m=a.current,p=Qt(u);e?d("MOUNT"):p==="none"||u?.display==="none"?d("UNMOUNT"):d(f&&m!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,d]),se(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,h=p=>{const g=Qt(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&g&&(d("ANIMATION_END"),!n.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},m=p=>{p.target===t&&(a.current=Qt(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,o(u)},[])}}function va(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Xd(...e){const t=l.useRef(e);return t.current=e,l.useCallback(o=>{const r=t.current;let n=!1;const a=r.map(s=>{const i=va(s,o);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<a.length;s++){const i=a[s];typeof i=="function"?i():va(r[s],null)}}},[])}function Qt(e){return e?.animationName||"none"}function qd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Jt=0,dt=null;function er(){l.useEffect(()=>{dt||(dt={start:ba(),end:ba()});const{start:e,end:t}=dt;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Jt++,()=>{Jt===1&&(dt?.start.remove(),dt?.end.remove(),dt=null),Jt=Math.max(0,Jt-1)}},[])}function ba(){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}var Pe=function(){return Pe=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},Pe.apply(this,arguments)};function wa(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]]);return o}function Zd(e,t,o){if(o||arguments.length===2)for(var r=0,n=t.length,a;r<n;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var eo="right-scroll-bar-position",to="width-before-scroll-bar",Qd="with-scroll-bars-hidden",Jd="--removed-body-scroll-bar-size";function tr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function eu(e,t){var o=C.useState(function(){return{value:e,callback:t,facade:{get current(){return o.value},set current(r){var n=o.value;n!==r&&(o.value=r,o.callback(r,n))}}}})[0];return o.callback=t,o.facade}var tu=typeof window<"u"?l.useLayoutEffect:l.useEffect,ya=new WeakMap;function ou(e,t){var o=eu(null,function(r){return e.forEach(function(n){return tr(n,r)})});return tu(function(){var r=ya.get(o);if(r){var n=new Set(r),a=new Set(e),s=o.current;n.forEach(function(i){a.has(i)||tr(i,null)}),a.forEach(function(i){n.has(i)||tr(i,s)})}ya.set(o,e)},[e]),o}function ru(e){return e}function nu(e,t){t===void 0&&(t=ru);var o=[],r=!1,n={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:e},useMedium:function(a){var s=t(a,r);return o.push(s),function(){o=o.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;o.length;){var s=o;o=[],s.forEach(a)}o={push:function(i){return a(i)},filter:function(){return o}}},assignMedium:function(a){r=!0;var s=[];if(o.length){var i=o;o=[],i.forEach(a),s=o}var d=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(d)};u(),o={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),o}}}};return n}function au(e){e===void 0&&(e={});var t=nu(null);return t.options=Pe({async:!0,ssr:!1},e),t}var xa=function(e){var t=e.sideCar,o=wa(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,Pe({},o))};xa.isSideCarExport=!0;function su(e,t){return e.useMedium(t),xa}var Ca=au(),or=function(){},oo=l.forwardRef(function(e,t){var o=l.useRef(null),r=l.useState({onScrollCapture:or,onWheelCapture:or,onTouchMoveCapture:or}),n=r[0],a=r[1],s=e.forwardProps,i=e.children,d=e.className,u=e.removeScrollBar,f=e.enabled,h=e.shards,m=e.sideCar,p=e.noRelative,w=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,x=e.gapMode,S=wa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=m,P=ou([o,t]),A=Pe(Pe({},S),n);return l.createElement(l.Fragment,null,f&&l.createElement(T,{sideCar:Ca,removeScrollBar:u,shards:h,noRelative:p,noIsolation:w,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:o,gapMode:x}),s?l.cloneElement(l.Children.only(i),Pe(Pe({},A),{ref:P})):l.createElement(b,Pe({},A,{className:d,ref:P}),i))});oo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},oo.classNames={fullWidth:to,zeroRight:eo};var iu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=iu();return t&&e.setAttribute("nonce",t),e}function cu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function du(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var uu=function(){var e=0,t=null;return{add:function(o){e==0&&(t=lu())&&(cu(t,o),du(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fu=function(){var e=uu();return function(t,o){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&o])}},Sa=function(){var e=fu(),t=function(o){var r=o.styles,n=o.dynamic;return e(r,n),null};return t},pu={left:0,top:0,right:0,gap:0},rr=function(e){return parseInt(e||"",10)||0},hu=function(e){var t=window.getComputedStyle(document.body),o=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[rr(o),rr(r),rr(n)]},gu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pu;var t=hu(e),o=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-o+t[2]-t[0])}},mu=Sa(),ut="data-scroll-locked",vu=function(e,t,o,r){var n=e.left,a=e.top,s=e.right,i=e.gap;return o===void 0&&(o="margin"),`
|
|
2
|
-
.`.concat(
|
|
3
|
-
overflow: hidden `).concat(
|
|
4
|
-
padding-right: `).concat(i,"px ").concat(
|
|
1
|
+
(function(N,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],l):(N=typeof globalThis<"u"?globalThis:N||self,l(N.ReVenueUiCoreReact={},N.jsxRuntime,N.React,N.ReactDOM))})(this,(function(N,l,C,Jt){"use strict";function aa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=aa(C),ht=aa(Jt);function sa({open:e,title:t="Are you sure?",message:r="This action cannot be undone.",confirmLabel:o="Confirm",loading:n=!1,onConfirm:a,onCancel:s}){const[i,d]=C.useState(!1),[u,f]=C.useState(!1),h=C.useRef(`rv-confirm-${Math.random().toString(36).slice(2)}`).current;return C.useEffect(()=>{if(e)f(!0),requestAnimationFrame(()=>d(!0));else{d(!1);const m=setTimeout(()=>f(!1),200);return()=>clearTimeout(m)}},[e]),u?Jt.createPortal(l.jsx("div",{className:`rv-modal-backdrop${i?" rv-modal-visible":""}`,onClick:m=>{m.target===m.currentTarget&&s()},children:l.jsxs("div",{className:"rv-modal-dialog",role:"dialog","aria-modal":"true","aria-labelledby":h,children:[l.jsx("h2",{id:h,className:"rv-modal-title",children:t}),l.jsx("p",{className:"rv-modal-body",children:r}),l.jsxs("div",{className:"rv-modal-actions",children:[l.jsx("button",{className:"rv-modal-btn rv-modal-btn-ghost",onClick:s,disabled:n,children:"Cancel"}),l.jsx("button",{className:"rv-modal-btn rv-modal-btn-danger",onClick:a,disabled:n,children:o})]})]})}),document.body):null}const ia="rv-theme";function sd(){return document.cookie.split("; ").find(r=>r.startsWith(`${ia}=`))?.split("=")[1]==="dark"?"dark":"light"}function id(e){const t=[`${ia}=${e}`,"path=/","max-age=31536000","SameSite=Lax"];document.cookie=t.join("; ")}function ld(e){document.documentElement.setAttribute("data-theme",e)}function Jr(){const[e,t]=C.useState(()=>sd());C.useEffect(()=>{ld(e)},[e]);const r=C.useCallback(()=>{t(o=>{const n=o==="light"?"dark":"light";return id(n),n})},[]);return{theme:e,toggleTheme:r}}function cd(){const e=window;if(e.__rvHistoryPatched)return;e.__rvHistoryPatched=!0;const t=history.pushState.bind(history);history.pushState=(...o)=>{t(...o),window.dispatchEvent(new Event("locationchange"))};const r=history.replaceState.bind(history);history.replaceState=(...o)=>{r(...o),window.dispatchEvent(new Event("locationchange"))}}const la="rv_sidebar_collapsed",dd=3600*24*365;function ud(){const e=`${la}=`;for(const t of document.cookie.split(";")){const r=t.trim();if(r.startsWith(e))return decodeURIComponent(r.slice(e.length))==="true"}return!1}function fd(e,t){const r=t?`; Domain=${t}`:"";document.cookie=`${la}=${e}; Path=/; Max-Age=${dd}; SameSite=Lax${r}`}const gt=e=>e.placement??"header";function pd({user:e,isAdmin:t,venues:r,activeVenueId:o,navItems:n,cookieDomain:a,onSwitchVenue:s,onSwitchWorkspace:i,onLogout:d,accountSettingsUrl:u,headerSlot:f,headerActions:h,sidebarPanel:m,scrollable:p=!0,inlineVenueSwitch:w,children:g}){const{theme:v,toggleTheme:y}=Jr(),[b,x]=C.useState(()=>ud()),[S,E]=C.useState(!1),[T,A]=C.useState(()=>window.location.href),[V,D]=C.useState(()=>new Set),[F,$]=C.useState(!1),P=b&&!F,Y=C.useRef(null),k=C.useRef(),R=C.useRef();C.useEffect(()=>{cd();function O(){A(window.location.href)}return window.addEventListener("popstate",O),window.addEventListener("locationchange",O),()=>{window.removeEventListener("popstate",O),window.removeEventListener("locationchange",O)}},[]);function B(){k.current&&clearTimeout(k.current),R.current&&clearTimeout(R.current),k.current=void 0,R.current=void 0}C.useEffect(()=>B,[]);const z=150;function L(){b&&(B(),k.current=setTimeout(()=>$(!0),z))}function M(){B(),R.current=setTimeout(()=>$(!1),z)}function G(){B(),$(!1)}function te(){b&&(B(),$(!0))}function U(){te()}function X(O){const re=O.relatedTarget;re&&Y.current?.contains(re)||G()}function Q(){const O=!b;x(O),fd(O,a),G()}const oe=C.useMemo(()=>r.find(O=>O.id===o),[r,o]),fe=oe?.workspace?.id??"";C.useEffect(()=>{fe&&D(O=>O.has(fe)?O:new Set(O).add(fe))},[fe]);const I=C.useMemo(()=>e?.email?e.email.slice(0,2).toUpperCase():"?",[e?.email]),Z=C.useMemo(()=>{const O=oe?.workspace?.id;return n.filter(re=>re.hidden?!1:!!(!re.permission||t||e?.globalPermissions.includes(re.permission)||O&&e?.workspacePermissions?.[O]?.includes(re.permission)||o&&e?.venuePermissions?.[o]?.includes(re.permission)))},[n,t,e,oe,o]),ie=C.useMemo(()=>Z.filter(O=>gt(O)==="sidebar"),[Z]),J=C.useMemo(()=>Z.filter(O=>gt(O)==="header"),[Z]),ee=C.useMemo(()=>Z.filter(O=>gt(O)==="settings"),[Z]),ae=C.useMemo(()=>Z.find(O=>gt(O)==="workspace"),[Z]),me=J[0],pe=C.useMemo(()=>{const O=[];for(const re of r){const le=re.workspace;if(!le?.id)continue;let Re=O.find(ra=>ra.id===le.id);Re||(Re={id:le.id,name:le.name,venues:[]},O.push(Re)),Re.venues.push(re)}return O},[r]),Pe=C.useMemo(()=>n.filter(re=>re.url&&T.startsWith(re.url)).sort((re,le)=>le.url.length-re.url.length)[0]??null,[n,T]),$e=Pe?.url??null;function ot(O){D(re=>{const le=new Set(re);return le.has(O)?le.delete(O):le.add(O),le})}function Qt(O){i?.(O);const re=ae?.url;re?window.location.assign(re):V.has(O)||ot(O)}function ta(O){const le=!!Pe&&(gt(Pe)==="header"||gt(Pe)==="settings")?Pe.url:me?.url,Re=le?T.startsWith(le):!1;O===o&&Re||(O!==o&&s?.(O),!(w&&Re)&&le&&window.location.assign(le))}const Zr=J.length>0||ee.length>0||h!==void 0||f!==void 0||b&&!!oe;return l.jsxs("div",{className:"rv-app-shell",children:[b&&l.jsx("div",{className:"rv-sidebar-rail-spacer"}),l.jsxs("aside",{ref:Y,className:`rv-sidebar${P?" rv-collapsed":""}${b?" rv-floating":""}${b&&F?" rv-flyout":""}`,onMouseLeave:M,onFocus:U,onBlur:X,onKeyDown:O=>{O.key==="Escape"&&G()},children:[l.jsxs("div",{className:"rv-sidebar-top",children:[!P&&l.jsx("div",{className:"rv-sidebar-brand",children:l.jsxs("svg",{className:"rv-sidebar-logo",viewBox:"0 0 429 50",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Re-venue",children:[l.jsxs("g",{clipPath:"url(#rv-logo-clip)",children:[l.jsx("path",{d:"M24.946 0.60506C24.6367 1.30638 24.2289 3.01155 24.2289 7.32948V8.73212L23.5117 9.22717C22.3867 8.12706 20.2212 7.61826 18.4775 7.61826C11.9105 7.61826 8.0013 13.6414 8.0013 21.3696V35.0247C8.0013 41.0479 8.09974 45.6683 8.4091 48.9824C6.86228 48.6799 5.54045 48.4736 4.303 48.4736C2.96711 48.4736 1.63122 48.6799 -0.0140381 48.9824C0.295326 46.2734 0.39376 42.9593 0.39376 38.2426V15.8691C0.407822 11.5512 0.309388 4.0154 2.39182e-05 1.00385C1.95464 1.40264 3.0796 1.4989 4.31706 1.4989C5.55452 1.4989 6.89041 1.29263 8.42316 1.00385L8.01537 6.0231C7.91693 7.12321 7.91693 8.73212 7.91693 10.7398L8.12786 10.8361C12.1215 3.61661 16.8322 0 21.768 0C23.0055 0 23.7226 0.206271 24.946 0.60506Z",fill:"currentColor"}),l.jsx("path",{d:"M74.7396 20.5858V22.291L74.5287 24.3949C68.3695 24.2987 61.6901 24.0924 54.4059 24.0924C49.4842 24.0924 44.3376 24.2987 39.1065 24.3949C39.0081 24.9037 39.0081 26.3064 39.0081 26.6089C39.0081 39.0539 46.4047 45.7921 56.6699 45.7921C61.901 45.7921 68.1727 42.9868 72.1663 38.6689L72.6866 38.9714L72.0678 43.8944C66.7243 47.9098 60.2557 50.0137 54.8137 50.0137C40.5408 50.0137 29.9662 40.0715 29.9662 26.3201C29.9802 9.84598 38.6003 0 53.4919 0C66.6399 0 74.7396 8.12706 74.7396 20.5858ZM52.6623 20.8883C56.2621 20.8883 62.3088 20.5858 66.3165 20.5858C66.218 9.03465 61.9994 3.21782 53.6888 3.21782C45.3781 3.21782 40.4424 9.74972 39.3174 20.5858C43.3251 20.5858 51.017 20.8883 52.6623 20.8883Z",fill:"currentColor"}),l.jsx("path",{d:"M164.989 22.9923V27.709H82.8533V22.9923H164.989Z",fill:"currentColor"}),l.jsx("path",{d:"M172.274 1.51265C173.82 1.51265 175.142 1.30638 176.788 1.0176C180.992 14.1639 185.928 26.8152 192.087 40.1815C195.687 32.852 198.148 26.8289 207.794 1.0176C208.821 1.32013 209.847 1.51265 210.972 1.51265C212.21 1.51265 213.025 1.30638 214.15 1.0176L203.477 24.615C199.779 32.9483 196.502 40.9791 193.521 49.0099C192.495 48.7074 191.468 48.5011 190.343 48.5011C189.106 48.5011 188.6 48.5974 187.053 49.0099C180.486 32.5495 174.636 17.1755 167.141 1.0176C169.292 1.41639 170.741 1.51265 172.274 1.51265Z",fill:"currentColor"}),l.jsx("path",{d:"M263.452 20.5858V22.291L263.241 24.3949C257.082 24.2987 250.402 24.0924 243.118 24.0924C238.196 24.0924 233.05 24.2987 227.819 24.3949C227.72 24.9037 227.72 26.3064 227.72 26.6089C227.72 39.0539 235.117 45.7921 245.382 45.7921C250.613 45.7921 256.885 42.9868 260.878 38.6689L261.399 38.9714L260.78 43.8944C255.436 47.9098 248.968 50.0138 243.526 50.0138C229.253 50.0138 218.678 40.0715 218.678 26.3201C218.678 9.85973 227.298 0.0137513 242.19 0.0137513C255.338 0.0137513 263.438 8.14081 263.438 20.5996L263.452 20.5858ZM241.374 20.8883C244.974 20.8883 251.021 20.5858 255.029 20.5858C254.93 9.03465 250.711 3.21782 242.401 3.21782C234.09 3.21782 229.154 9.74972 228.029 20.5858C232.037 20.5858 239.729 20.8883 241.374 20.8883Z",fill:"currentColor"}),l.jsx("path",{d:"M315.706 17.7668C315.706 23.0886 315.298 28.9054 315.298 36.5374C315.298 45.3795 315.509 47.181 315.509 48.9824C313.765 48.5836 312.528 48.4736 311.192 48.4736C309.856 48.4736 308.619 48.5699 306.988 48.9824C306.988 43.2618 307.705 34.2272 307.705 27.6953V19.967C307.705 11.6337 303.908 5.21177 296.413 5.21177C287.371 5.21177 282.66 10.8361 282.66 21.2734V33.3196C282.66 37.6375 282.97 44.4582 283.476 48.9824C281.831 48.6799 280.396 48.4736 278.85 48.4736C277.303 48.4736 275.868 48.6799 274.223 48.9824C275.039 42.6568 275.039 35.3273 275.039 31.3119V17.753C275.039 11.7299 274.729 6.20187 274.223 0.990099C275.967 1.38889 277.514 1.48515 278.85 1.48515C279.876 1.48515 281.212 1.27888 282.956 0.990099C282.857 2.69527 282.646 6.61441 282.646 9.0209H282.857C286.654 3.30033 291.787 -0.0137513 299.183 -0.0137513C309.448 -0.0137513 315.72 5.70682 315.72 17.753L315.706 17.7668Z",fill:"currentColor"}),l.jsx("path",{d:"M331.413 1.00385C333.157 1.30638 334.591 1.4989 335.73 1.4989C336.968 1.4989 338.304 1.29263 339.935 1.00385C339.218 9.43344 338.908 19.6782 338.908 28.9191C338.908 31.4356 338.908 37.6513 341.889 40.7728C343.844 43.0831 346.924 44.7882 350.931 44.7882C356.584 44.7882 359.861 42.3817 361.815 39.2602C364.276 35.2448 364.487 32.2332 364.487 21.3834C364.487 11.2486 364.389 3.10781 364.276 1.00385C366.02 1.40264 367.257 1.4989 368.593 1.4989C370.14 1.4989 371.265 1.40264 372.798 1.00385C372.39 7.42574 372.081 17.368 372.081 31.1194C372.081 38.8476 372.179 44.2657 372.488 48.9961C370.942 48.6936 369.62 48.4873 368.481 48.4873C367.342 48.4873 366.02 48.6936 364.473 48.9961C364.571 47.6898 364.684 45.4758 364.684 43.9769V40.3603H364.473C360.873 46.7822 355.023 50 348.456 50C337.783 50 331.315 44.3757 331.315 33.1271C331.315 29.0154 331.624 19.7745 331.624 16.5567C331.624 11.3311 331.526 6.21562 331.413 0.990099V1.00385Z",fill:"currentColor"}),l.jsx("path",{d:"M428.947 20.5858V22.291L428.736 24.3949C422.577 24.2987 415.898 24.0924 408.614 24.0924C403.692 24.0924 398.545 24.2987 393.314 24.3949C393.216 24.9037 393.216 26.3064 393.216 26.6089C393.216 39.0539 400.612 45.7921 410.878 45.7921C416.109 45.7921 422.38 42.9868 426.374 38.6689L426.894 38.9714L426.276 43.8944C420.932 47.9098 414.463 50.0138 409.021 50.0138C394.749 50.0138 384.174 40.0715 384.174 26.3201C384.174 9.85973 392.794 0.0137513 407.686 0.0137513C420.834 0.0137513 428.933 8.14081 428.933 20.5996L428.947 20.5858ZM406.87 20.8883C410.47 20.8883 416.517 20.5858 420.524 20.5858C420.426 9.03465 416.207 3.21782 407.897 3.21782C399.586 3.21782 394.65 9.74972 393.525 20.5858C397.533 20.5858 405.225 20.8883 406.87 20.8883Z",fill:"currentColor"})]}),l.jsx("defs",{children:l.jsx("clipPath",{id:"rv-logo-clip",children:l.jsx("rect",{width:"428.947",height:"50",fill:"white"})})})]})}),l.jsx("button",{className:"rv-collapse-toggle",title:b?"Expand sidebar":"Collapse sidebar",onClick:Q,children:b?l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("polyline",{points:"13 17 18 12 13 7"}),l.jsx("polyline",{points:"6 17 11 12 6 7"})]}):l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("polyline",{points:"11 17 6 12 11 7"}),l.jsx("polyline",{points:"18 17 13 12 18 7"})]})})]}),m&&l.jsx("div",{className:"rv-sidebar-panel",onMouseEnter:L,children:m}),ie.length>0&&l.jsx("nav",{className:"rv-sidebar-top-nav",onMouseEnter:L,children:ie.map(O=>l.jsxs("a",{href:O.url,className:`rv-nav-item${O.url===$e?" rv-active":""}`,title:P?O.label:void 0,children:[l.jsx("span",{className:"rv-nav-icon",dangerouslySetInnerHTML:{__html:O.icon}}),!P&&l.jsx("span",{className:"rv-nav-label",children:O.label})]},O.url))}),l.jsx("div",{className:"rv-sidebar-tree",onMouseEnter:L,children:P?pe.length>0&&l.jsx("div",{className:"rv-tree-ws",children:l.jsx("button",{className:"rv-tree-ws-title",title:"Workspaces & venues","aria-label":"Show workspaces and venues",onClick:te,children:l.jsxs("svg",{className:"rv-tree-ws-icon",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M3 21h18"}),l.jsx("path",{d:"M5 21V7l7-4 7 4v14"}),l.jsx("path",{d:"M9 9h.01M15 9h.01M9 13h.01M15 13h.01M9 17h.01M15 17h.01"})]})})}):l.jsxs(l.Fragment,{children:[pe.length>0&&l.jsx("div",{className:"rv-tree-section-label",children:"Workspaces & venues"}),pe.map(O=>l.jsxs("div",{className:"rv-tree-group",children:[l.jsxs("div",{className:"rv-tree-ws",children:[l.jsx("button",{className:`rv-tree-disclosure${V.has(O.id)?" rv-open":""}`,"aria-label":V.has(O.id)?"Collapse workspace":"Expand workspace",onClick:re=>{re.stopPropagation(),ot(O.id)},children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("polyline",{points:"6 9 12 15 18 9"})})}),l.jsxs("button",{className:"rv-tree-ws-title",onClick:()=>Qt(O.id),children:[l.jsxs("svg",{className:"rv-tree-ws-icon",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M3 21h18"}),l.jsx("path",{d:"M5 21V7l7-4 7 4v14"}),l.jsx("path",{d:"M9 9h.01M15 9h.01M9 13h.01M15 13h.01M9 17h.01M15 17h.01"})]}),l.jsx("span",{className:"rv-tree-ws-name",children:O.name})]})]}),V.has(O.id)&&l.jsx("div",{className:"rv-tree-venues",children:O.venues.map(re=>l.jsxs("button",{className:`rv-tree-venue${re.id===o?" rv-active":""}`,onClick:()=>ta(re.id),children:[l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),l.jsx("circle",{cx:"12",cy:"10",r:"3"})]}),l.jsx("span",{className:"rv-tree-venue-name",children:re.name})]},re.id))})]},O.id))]})}),l.jsxs("div",{className:"rv-sidebar-user",onMouseEnter:L,children:[l.jsx("div",{className:"rv-user-avatar",children:I}),!P&&l.jsx("div",{className:"rv-user-info",children:l.jsx("span",{className:"rv-user-email",title:e?.email??"",children:e?.email})}),!1,u&&!P&&l.jsx("a",{className:"rv-account-settings-btn",href:u,title:"Account settings",children:l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),l.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}),!P&&l.jsx("button",{className:"rv-logout-btn",title:"Sign out",onClick:()=>E(!0),children:l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),l.jsx("polyline",{points:"16 17 21 12 16 7"}),l.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]})})]})]}),l.jsxs("div",{className:"rv-shell-body",children:[Zr&&l.jsxs("header",{className:"rv-shell-header",children:[b&&oe&&l.jsxs("div",{className:"rv-header-venue",title:oe.name,children:[l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),l.jsx("circle",{cx:"12",cy:"10",r:"3"})]}),l.jsx("span",{className:"rv-header-venue-name",children:oe.name})]}),J.length>0&&l.jsx("nav",{className:"rv-header-nav",children:J.map(O=>l.jsxs("a",{href:O.url,className:`rv-header-nav-item${O.url===$e?" rv-active":""}`,children:[l.jsx("span",{className:"rv-nav-icon",dangerouslySetInnerHTML:{__html:O.icon}}),l.jsx("span",{className:"rv-nav-label",children:O.label})]},O.url))}),f,(h||ee.length>0)&&l.jsxs("div",{className:"rv-header-right",children:[h,ee.length>0&&l.jsx("div",{className:"rv-header-settings",children:ee.map(O=>l.jsxs("a",{href:O.url,className:`rv-header-action${O.url===$e?" rv-active":""}`,children:[l.jsx("span",{className:"rv-header-action-icon",dangerouslySetInnerHTML:{__html:O.icon}}),l.jsx("span",{className:"rv-header-action-label",children:O.label})]},O.url))})]})]}),l.jsx("main",{className:`rv-shell-content${p?" rv-shell-content--scroll":" rv-shell-content--fill"}`,children:g})]}),l.jsx(sa,{open:S,title:"Sign out",message:"Are you sure you want to sign out?",confirmLabel:"Sign out",onConfirm:d,onCancel:()=>E(!1)})]})}function hd({value:e,venues:t,onChange:r}){const[o,n]=C.useState(!1),a=C.useRef(null),s=C.useMemo(()=>t.find(f=>f.id===e),[t,e]),i=C.useMemo(()=>{const f=new Map;for(const h of t){const m=h.workspace?.id??"__none__",p=h.workspace?.name??"";f.has(m)||f.set(m,{workspaceName:p,venues:[]}),f.get(m).venues.push(h)}return[...f.values()]},[t]),d=i.length>1;C.useEffect(()=>{if(!o)return;function f(h){a.current&&!a.current.contains(h.target)&&n(!1)}return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[o]);function u(f){r(f),n(!1)}return l.jsxs("div",{ref:a,className:"rv-venue-switcher",children:[l.jsxs("button",{className:`rv-vs-trigger${o?" rv-open":""}`,onClick:()=>n(f=>!f),children:[l.jsxs("span",{className:"rv-vs-label",children:[l.jsx("span",{className:"rv-vs-venue",children:s?.name??"Select venue"}),s?.workspace&&d&&l.jsx("span",{className:"rv-vs-workspace",children:s.workspace.name})]}),l.jsx("svg",{className:"rv-vs-chevron",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),o&&l.jsx("div",{className:"rv-vs-dropdown",children:i.map(f=>l.jsxs("div",{children:[d&&l.jsx("div",{className:"rv-vs-workspace-header",children:f.workspaceName}),f.venues.map(h=>l.jsx("button",{className:`rv-vs-venue-option${h.id===e?" rv-active":""}`,onClick:()=>u(h.id),children:h.name},h.id))]},f.workspaceName))})]})}function ve(e,t=[]){let r=[];function o(a,s){const i=c.createContext(s);i.displayName=a+"Context";const d=r.length;r=[...r,s];const u=h=>{const{scope:m,children:p,...w}=h,g=m?.[e]?.[d]||i,v=c.useMemo(()=>w,Object.values(w));return l.jsx(g.Provider,{value:v,children:p})};u.displayName=a+"Provider";function f(h,m){const p=m?.[e]?.[d]||i,w=c.useContext(p);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[u,f]}const n=()=>{const a=r.map(s=>c.createContext(s));return function(i){const d=i?.[e]||a;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return n.scopeName=e,[o,gd(n,...t)]}function gd(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){const s=o.reduce((i,{useScope:d,scopeName:u})=>{const h=d(a)[`__scope${u}`];return{...i,...h}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function ca(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function md(...e){return t=>{let r=!1;const o=e.map(n=>{const a=ca(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){const a=o[n];typeof a=="function"?a():ca(e[n],null)}}}}function q(...e){return c.useCallback(md(...e),e)}function H(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}var de=globalThis?.document?c.useLayoutEffect:()=>{},vd=c[" useId ".trim().toString()]||(()=>{}),bd=0;function Ue(e){const[t,r]=c.useState(vd());return de(()=>{r(o=>o??String(bd++))},[e]),t?`radix-${t}`:""}var wd=c[" useInsertionEffect ".trim().toString()]||de;function je({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[n,a,s]=yd({defaultProp:t,onChange:r}),i=e!==void 0,d=i?e:n;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const h=f.current;h!==i&&console.warn(`${o} is changing from ${h?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,o])}const u=c.useCallback(f=>{if(i){const h=xd(f)?f(e):f;h!==e&&s.current?.(h)}else a(f)},[i,e,a,s]);return[d,u]}function yd({defaultProp:e,onChange:t}){const[r,o]=c.useState(e),n=c.useRef(r),a=c.useRef(t);return wd(()=>{a.current=t},[t]),c.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}function xd(e){return typeof e=="function"}function it(e){const t=c.forwardRef((r,o)=>{let{children:n,...a}=r,s=null,i=!1;const d=[];ua(n)&&typeof er=="function"&&(n=er(n._payload)),c.Children.forEach(n,m=>{if(Pd(m)){i=!0;const p=m;let w="child"in p.props?p.props.child:p.props.children;ua(w)&&typeof er=="function"&&(w=er(w._payload)),s=Ed(p,w),d.push(s?.props?.children)}else d.push(m)}),s?s=c.cloneElement(s,void 0,d):!i&&c.Children.count(n)===1&&c.isValidElement(n)&&(s=n);const u=s?Td(s):void 0,f=q(o,u);if(!s){if(n||n===0)throw new Error(i?Od(e):Dd(e));return n}const h=Nd(a,s.props??{});return s.type!==c.Fragment&&(h.ref=o?f:u),c.cloneElement(s,h)});return t.displayName=`${e}.Slot`,t}var Cd=it("Slot"),da=Symbol.for("radix.slottable");function Sd(e){const t=r=>"child"in r?r.children(r.child):r.children;return t.displayName=`${e}.Slottable`,t.__radixId=da,t}var Ed=(e,t)=>{if("child"in e.props){const r=e.props.child;return c.isValidElement(r)?c.cloneElement(r,void 0,e.props.children(r.props.children)):null}return c.isValidElement(t)?t:null};function Nd(e,t){const r={...t};for(const o in t){const n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...i)=>{const d=a(...i);return n(...i),d}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function Td(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Pd(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===da}var Ad=Symbol.for("react.lazy");function ua(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Ad&&"_payload"in e&&kd(e._payload)}function kd(e){return typeof e=="object"&&e!==null&&"then"in e}var Dd=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Od=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,er=c[" use ".trim().toString()],_d=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],W=_d.reduce((e,t)=>{const r=it(`Primitive.${t}`),o=c.forwardRef((n,a)=>{const{asChild:s,...i}=n,d=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(d,{...i,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function fa(e,t){e&&ht.flushSync(()=>e.dispatchEvent(t))}function ue(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>((...r)=>t.current?.(...r)),[])}function Md(e,t=globalThis?.document){const r=ue(e);c.useEffect(()=>{const o=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var Id="DismissableLayer",eo="dismissableLayer.update",Ld="dismissableLayer.pointerDownOutside",$d="dismissableLayer.focusOutside",pa,to=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),mt=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:i,onDismiss:d,...u}=e,f=c.useContext(to),[h,m]=c.useState(null),p=h?.ownerDocument??globalThis?.document,[,w]=c.useState({}),g=q(t,D=>m(D)),v=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=h?v.indexOf(h):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,E=x>=b,T=c.useRef(!1),A=Hd(D=>{const F=D.target;if(!(F instanceof Node))return;const $=[...f.branches].some(P=>P.contains(F));!E||$||(a?.(D),i?.(D),D.defaultPrevented||d?.())},{ownerDocument:p,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:f.dismissableSurfaces}),V=Vd(D=>{if(o&&T.current)return;const F=D.target;[...f.branches].some(P=>P.contains(F))||(s?.(D),i?.(D),D.defaultPrevented||d?.())},p);return Md(D=>{x===f.layers.size-1&&(n?.(D),!D.defaultPrevented&&d&&(D.preventDefault(),d()))},p),c.useEffect(()=>{if(h)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(pa=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),ga(),()=>{r&&(f.layersWithOutsidePointerEventsDisabled.delete(h),f.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=pa))}},[h,p,r,f]),c.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),ga())},[h,f]),c.useEffect(()=>{const D=()=>w({});return document.addEventListener(eo,D),()=>document.removeEventListener(eo,D)},[]),l.jsx(W.div,{...u,ref:g,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:H(e.onFocusCapture,V.onFocusCapture),onBlurCapture:H(e.onBlurCapture,V.onBlurCapture),onPointerDownCapture:H(e.onPointerDownCapture,A.onPointerDownCapture)})});mt.displayName=Id;var Fd="DismissableLayerBranch",ha=c.forwardRef((e,t)=>{const r=c.useContext(to),o=c.useRef(null),n=q(t,o);return c.useEffect(()=>{const a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),l.jsx(W.div,{...e,ref:n})});ha.displayName=Fd;function Bd(){const e=c.useContext(to),[t,r]=c.useState(null);return c.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function Hd(e,t){const{ownerDocument:r=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:n,dismissableSurfaces:a}=t,s=ue(e),i=c.useRef(!1),d=c.useRef(!1),u=c.useRef(new Map),f=c.useRef(()=>{});return c.useEffect(()=>{function h(){d.current=!1,n.current=!1,u.current.clear()}function m(){return Array.from(u.current.values()).some(Boolean)}function p(b){if(!d.current)return;const x=b.target;x instanceof Node&&[...a].some(E=>E.contains(x))||u.current.set(b.type,!0),b.type==="click"&&window.setTimeout(()=>{d.current&&f.current()},0)}function w(b){d.current&&u.current.set(b.type,!1)}const g=b=>{if(b.target&&!i.current){let x=function(){r.removeEventListener("click",f.current);const E=m();h(),E||ma(Ld,s,S,{discrete:!0})};const S={originalEvent:b};d.current=!0,n.current=o&&b.button===0,u.current.clear(),!o||b.button!==0?x():(r.removeEventListener("click",f.current),f.current=x,r.addEventListener("click",f.current,{once:!0}))}else r.removeEventListener("click",f.current),h();i.current=!1},v=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const b of v)r.addEventListener(b,p,!0),r.addEventListener(b,w);const y=window.setTimeout(()=>{r.addEventListener("pointerdown",g)},0);return()=>{window.clearTimeout(y),r.removeEventListener("pointerdown",g),r.removeEventListener("click",f.current);for(const b of v)r.removeEventListener(b,p,!0),r.removeEventListener(b,w)}},[r,s,o,n,a]),{onPointerDownCapture:()=>i.current=!0}}function Vd(e,t=globalThis?.document){const r=ue(e),o=c.useRef(!1);return c.useEffect(()=>{const n=a=>{a.target&&!o.current&&ma($d,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function ga(){const e=new CustomEvent(eo);document.dispatchEvent(e)}function ma(e,t,r,{discrete:o}){const n=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?fa(n,a):n.dispatchEvent(a)}var Wd=mt,zd=ha,ro="focusScope.autoFocusOnMount",oo="focusScope.autoFocusOnUnmount",va={bubbles:!1,cancelable:!0},Rd="FocusScope",tr=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...s}=e,[i,d]=c.useState(null),u=ue(n),f=ue(a),h=c.useRef(null),m=q(t,g=>d(g)),p=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let g=function(x){if(p.paused||!i)return;const S=x.target;i.contains(S)?h.current=S:Ye(h.current,{select:!0})},v=function(x){if(p.paused||!i)return;const S=x.relatedTarget;S!==null&&(i.contains(S)||Ye(h.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&Ye(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const b=new MutationObserver(y);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),b.disconnect()}}},[o,i,p.paused]),c.useEffect(()=>{if(i){ya.add(p);const g=document.activeElement;if(!i.contains(g)){const y=new CustomEvent(ro,va);i.addEventListener(ro,u),i.dispatchEvent(y),y.defaultPrevented||(Ud(Xd(ba(i)),{select:!0}),document.activeElement===g&&Ye(i))}return()=>{i.removeEventListener(ro,u),setTimeout(()=>{const y=new CustomEvent(oo,va);i.addEventListener(oo,f),i.dispatchEvent(y),y.defaultPrevented||Ye(g??document.body,{select:!0}),i.removeEventListener(oo,f),ya.remove(p)},0)}}},[i,u,f,p]);const w=c.useCallback(g=>{if(!r&&!o||p.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(v&&y){const b=g.currentTarget,[x,S]=jd(b);x&&S?!g.shiftKey&&y===S?(g.preventDefault(),r&&Ye(x,{select:!0})):g.shiftKey&&y===x&&(g.preventDefault(),r&&Ye(S,{select:!0})):y===b&&g.preventDefault()}},[r,o,p.paused]);return l.jsx(W.div,{tabIndex:-1,...s,ref:m,onKeyDown:w})});tr.displayName=Rd;function Ud(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(Ye(o,{select:t}),document.activeElement!==r)return}function jd(e){const t=ba(e),r=wa(t,e),o=wa(t.reverse(),e);return[r,o]}function ba(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function wa(e,t){for(const r of e)if(!Yd(r,{upTo:t}))return r}function Yd(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Kd(e){return e instanceof HTMLInputElement&&"select"in e}function Ye(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Kd(e)&&t&&e.select()}}var ya=Gd();function Gd(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=xa(e,t),e.unshift(t)},remove(t){e=xa(e,t),e[0]?.resume()}}}function xa(e,t){const r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function Xd(e){return e.filter(t=>t.tagName!=="A")}var qd="Portal",Vt=c.forwardRef((e,t)=>{const{container:r,...o}=e,[n,a]=c.useState(!1);de(()=>a(!0),[]);const s=r||n&&globalThis?.document?.body;return s?ht.createPortal(l.jsx(W.div,{...o,ref:t}),s):null});Vt.displayName=qd;function Zd(e,t){return c.useReducer((r,o)=>t[r][o]??r,e)}var he=e=>{const{present:t,children:r}=e,o=Qd(t),n=typeof r=="function"?r({present:o.isPresent}):c.Children.only(r),a=Jd(o.ref,eu(n));return typeof r=="function"||o.isPresent?c.cloneElement(n,{ref:a}):null};he.displayName="Presence";function Qd(e){const[t,r]=c.useState(),o=c.useRef(null),n=c.useRef(e),a=c.useRef("none"),s=e?"mounted":"unmounted",[i,d]=Zd(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=rr(o.current);a.current=i==="mounted"?u:"none"},[i]),de(()=>{const u=o.current,f=n.current;if(f!==e){const m=a.current,p=rr(u);e?d("MOUNT"):p==="none"||u?.display==="none"?d("UNMOUNT"):d(f&&m!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,d]),de(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,h=p=>{const g=rr(o.current).includes(CSS.escape(p.animationName));if(p.target===t&&g&&(d("ANIMATION_END"),!n.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},m=p=>{p.target===t&&(a.current=rr(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function Ca(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Jd(...e){const t=c.useRef(e);return t.current=e,c.useCallback(r=>{const o=t.current;let n=!1;const a=o.map(s=>{const i=Ca(s,r);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<a.length;s++){const i=a[s];typeof i=="function"?i():Ca(o[s],null)}}},[])}function rr(e){return e?.animationName||"none"}function eu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var or=0,vt=null;function no(){c.useEffect(()=>{vt||(vt={start:Sa(),end:Sa()});const{start:e,end:t}=vt;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),or++,()=>{or===1&&(vt?.start.remove(),vt?.end.remove(),vt=null),or=Math.max(0,or-1)}},[])}function Sa(){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}var Oe=function(){return Oe=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Oe.apply(this,arguments)};function Ea(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function tu(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,a;o<n;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var nr="right-scroll-bar-position",ar="width-before-scroll-bar",ru="with-scroll-bars-hidden",ou="--removed-body-scroll-bar-size";function ao(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function nu(e,t){var r=C.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n))}}}})[0];return r.callback=t,r.facade}var au=typeof window<"u"?c.useLayoutEffect:c.useEffect,Na=new WeakMap;function su(e,t){var r=nu(null,function(o){return e.forEach(function(n){return ao(n,o)})});return au(function(){var o=Na.get(r);if(o){var n=new Set(o),a=new Set(e),s=r.current;n.forEach(function(i){a.has(i)||ao(i,null)}),a.forEach(function(i){n.has(i)||ao(i,s)})}Na.set(r,e)},[e]),r}function iu(e){return e}function lu(e,t){t===void 0&&(t=iu);var r=[],o=!1,n={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,o);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(o=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){o=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var d=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(d)};u(),r={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),r}}}};return n}function cu(e){e===void 0&&(e={});var t=lu(null);return t.options=Oe({async:!0,ssr:!1},e),t}var Ta=function(e){var t=e.sideCar,r=Ea(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return c.createElement(o,Oe({},r))};Ta.isSideCarExport=!0;function du(e,t){return e.useMedium(t),Ta}var Pa=cu(),so=function(){},sr=c.forwardRef(function(e,t){var r=c.useRef(null),o=c.useState({onScrollCapture:so,onWheelCapture:so,onTouchMoveCapture:so}),n=o[0],a=o[1],s=e.forwardProps,i=e.children,d=e.className,u=e.removeScrollBar,f=e.enabled,h=e.shards,m=e.sideCar,p=e.noRelative,w=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,x=e.gapMode,S=Ea(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,T=su([r,t]),A=Oe(Oe({},S),n);return c.createElement(c.Fragment,null,f&&c.createElement(E,{sideCar:Pa,removeScrollBar:u,shards:h,noRelative:p,noIsolation:w,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:x}),s?c.cloneElement(c.Children.only(i),Oe(Oe({},A),{ref:T})):c.createElement(b,Oe({},A,{className:d,ref:T}),i))});sr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},sr.classNames={fullWidth:ar,zeroRight:nr};var uu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=uu();return t&&e.setAttribute("nonce",t),e}function pu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var gu=function(){var e=0,t=null;return{add:function(r){e==0&&(t=fu())&&(pu(t,r),hu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mu=function(){var e=gu();return function(t,r){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Aa=function(){var e=mu(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t},vu={left:0,top:0,right:0,gap:0},io=function(e){return parseInt(e||"",10)||0},bu=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[io(r),io(o),io(n)]},wu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vu;var t=bu(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}},yu=Aa(),bt="data-scroll-locked",xu=function(e,t,r,o){var n=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
2
|
+
.`.concat(ru,` {
|
|
3
|
+
overflow: hidden `).concat(o,`;
|
|
4
|
+
padding-right: `).concat(i,"px ").concat(o,`;
|
|
5
5
|
}
|
|
6
|
-
body[`).concat(
|
|
7
|
-
overflow: hidden `).concat(
|
|
6
|
+
body[`).concat(bt,`] {
|
|
7
|
+
overflow: hidden `).concat(o,`;
|
|
8
8
|
overscroll-behavior: contain;
|
|
9
|
-
`).concat([t&&"position: relative ".concat(
|
|
9
|
+
`).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
|
|
10
10
|
padding-left: `.concat(n,`px;
|
|
11
11
|
padding-top: `).concat(a,`px;
|
|
12
12
|
padding-right: `).concat(s,`px;
|
|
13
13
|
margin-left:0;
|
|
14
14
|
margin-top:0;
|
|
15
|
-
margin-right: `).concat(i,"px ").concat(
|
|
16
|
-
`),
|
|
15
|
+
margin-right: `).concat(i,"px ").concat(o,`;
|
|
16
|
+
`),r==="padding"&&"padding-right: ".concat(i,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.`).concat(
|
|
20
|
-
right: `).concat(i,"px ").concat(
|
|
19
|
+
.`).concat(nr,` {
|
|
20
|
+
right: `).concat(i,"px ").concat(o,`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.`).concat(
|
|
24
|
-
margin-right: `).concat(i,"px ").concat(
|
|
23
|
+
.`).concat(ar,` {
|
|
24
|
+
margin-right: `).concat(i,"px ").concat(o,`;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.`).concat(
|
|
28
|
-
right: 0 `).concat(
|
|
27
|
+
.`).concat(nr," .").concat(nr,` {
|
|
28
|
+
right: 0 `).concat(o,`;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.`).concat(
|
|
32
|
-
margin-right: 0 `).concat(
|
|
31
|
+
.`).concat(ar," .").concat(ar,` {
|
|
32
|
+
margin-right: 0 `).concat(o,`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
body[`).concat(
|
|
36
|
-
`).concat(
|
|
35
|
+
body[`).concat(bt,`] {
|
|
36
|
+
`).concat(ou,": ").concat(i,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
38
|
+
`)},ka=function(){var e=parseInt(document.body.getAttribute(bt)||"0",10);return isFinite(e)?e:0},Cu=function(){c.useEffect(function(){return document.body.setAttribute(bt,(ka()+1).toString()),function(){var e=ka()-1;e<=0?document.body.removeAttribute(bt):document.body.setAttribute(bt,e.toString())}},[])},Su=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,n=o===void 0?"margin":o;Cu();var a=c.useMemo(function(){return wu(n)},[n]);return c.createElement(yu,{styles:xu(a,!t,n,r?"":"!important")})},lo=!1;if(typeof window<"u")try{var ir=Object.defineProperty({},"passive",{get:function(){return lo=!0,!0}});window.addEventListener("test",ir,ir),window.removeEventListener("test",ir,ir)}catch{lo=!1}var wt=lo?{passive:!1}:!1,Eu=function(e){return e.tagName==="TEXTAREA"},Da=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Eu(e)&&r[t]==="visible")},Nu=function(e){return Da(e,"overflowY")},Tu=function(e){return Da(e,"overflowX")},Oa=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=_a(e,o);if(n){var a=Ma(e,o),s=a[1],i=a[2];if(s>i)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},Pu=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},Au=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},_a=function(e,t){return e==="v"?Nu(t):Tu(t)},Ma=function(e,t){return e==="v"?Pu(t):Au(t)},ku=function(e,t){return e==="h"&&t==="rtl"?-1:1},Du=function(e,t,r,o,n){var a=ku(e,window.getComputedStyle(t).direction),s=a*o,i=r.target,d=t.contains(i),u=!1,f=s>0,h=0,m=0;do{if(!i)break;var p=Ma(e,i),w=p[0],g=p[1],v=p[2],y=g-v-a*w;(w||y)&&_a(e,i)&&(h+=y,m+=w);var b=i.parentNode;i=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!d&&i!==document.body||d&&(t.contains(i)||t===i));return(f&&Math.abs(h)<1||!f&&Math.abs(m)<1)&&(u=!0),u},lr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ia=function(e){return[e.deltaX,e.deltaY]},La=function(e){return e&&"current"in e?e.current:e},Ou=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_u=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},ku=0,pt=[];function Du(e){var t=l.useRef([]),o=l.useRef([0,0]),r=l.useRef(),n=l.useState(ku++)[0],a=l.useState(Sa)[0],s=l.useRef(e);l.useEffect(function(){s.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var g=Zd([e.lockRef.current],(e.shards||[]).map(Da),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var i=l.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var y=no(g),b=o.current,x="deltaX"in g?g.deltaX:b[0]-y[0],S="deltaY"in g?g.deltaY:b[1]-y[1],T,P=g.target,A=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&A==="h"&&P.type==="range")return!1;var B=window.getSelection(),k=B&&B.anchorNode,M=k?k===P||k.contains(P):!1;if(M)return!1;var L=Na(A,P);if(!L)return!0;if(L?T=A:(T=A==="v"?"h":"v",L=Na(A,P)),!L)return!1;if(!r.current&&"changedTouches"in g&&(x||S)&&(r.current=T),!T)return!0;var O=r.current||T;return Nu(O,v,g,O==="h"?x:S)},[]),d=l.useCallback(function(g){var v=g;if(!(!pt.length||pt[pt.length-1]!==a)){var y="deltaY"in v?ka(v):no(v),b=t.current.filter(function(T){return T.name===v.type&&(T.target===v.target||v.target===T.shadowParent)&&Pu(T.delta,y)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var x=(s.current.shards||[]).map(Da).filter(Boolean).filter(function(T){return T.contains(v.target)}),S=x.length>0?i(v,x[0]):!s.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),u=l.useCallback(function(g,v,y,b){var x={name:g,delta:v,target:y,should:b,shadowParent:Ou(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),f=l.useCallback(function(g){o.current=no(g),r.current=void 0},[]),h=l.useCallback(function(g){u(g.type,ka(g),g.target,i(g,e.lockRef.current))},[]),m=l.useCallback(function(g){u(g.type,no(g),g.target,i(g,e.lockRef.current))},[]);l.useEffect(function(){return pt.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",d,ft),document.addEventListener("touchmove",d,ft),document.addEventListener("touchstart",f,ft),function(){pt=pt.filter(function(g){return g!==a}),document.removeEventListener("wheel",d,ft),document.removeEventListener("touchmove",d,ft),document.removeEventListener("touchstart",f,ft)}},[]);var p=e.removeScrollBar,w=e.inert;return l.createElement(l.Fragment,null,w?l.createElement(a,{styles:Au(n)}):null,p?l.createElement(wu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ou(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const _u=su(Ca,Du);var ao=l.forwardRef(function(e,t){return l.createElement(oo,Pe({},e,{ref:t,sideCar:_u}))});ao.classNames=oo.classNames;var Iu=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ht=new WeakMap,so=new WeakMap,io={},ar=0,Oa=function(e){return e&&(e.host||Oa(e.parentNode))},Mu=function(e,t){return t.map(function(o){if(e.contains(o))return o;var r=Oa(o);return r&&e.contains(r)?r:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},Lu=function(e,t,o,r){var n=Mu(t,Array.isArray(e)?e:[e]);io[o]||(io[o]=new WeakMap);var a=io[o],s=[],i=new Set,d=new Set(n),u=function(h){!h||i.has(h)||(i.add(h),u(h.parentNode))};n.forEach(u);var f=function(h){!h||d.has(h)||Array.prototype.forEach.call(h.children,function(m){if(i.has(m))f(m);else try{var p=m.getAttribute(r),w=p!==null&&p!=="false",g=(ht.get(m)||0)+1,v=(a.get(m)||0)+1;ht.set(m,g),a.set(m,v),s.push(m),g===1&&w&&so.set(m,!0),v===1&&m.setAttribute(o,"true"),w||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return f(t),i.clear(),ar++,function(){s.forEach(function(h){var m=ht.get(h)-1,p=a.get(h)-1;ht.set(h,m),a.set(h,p),m||(so.has(h)||h.removeAttribute(r),so.delete(h)),p||h.removeAttribute(o)}),ar--,ar||(ht=new WeakMap,ht=new WeakMap,so=new WeakMap,io={})}},sr=function(e,t,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),n=Iu(e);return n?(r.push.apply(r,Array.from(n.querySelectorAll("[aria-live], script"))),Lu(r,n,o,"aria-hidden")):function(){return null}},lo="Dialog",[_a,Ia]=pe(lo),[$u,we]=_a(lo),co=e=>{const{__scopeDialog:t,children:o,open:r,defaultOpen:n,onOpenChange:a,modal:s=!0}=e,i=l.useRef(null),d=l.useRef(null),[u,f]=Re({prop:r,defaultProp:n??!1,onChange:a,caller:lo});return c.jsx($u,{scope:t,triggerRef:i,contentRef:d,contentId:Be(),titleId:Be(),descriptionId:Be(),open:u,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(h=>!h),[f]),modal:s,children:o})};co.displayName=lo;var Ma="DialogTrigger",uo=l.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=we(Ma,o),a=K(t,n.triggerRef);return c.jsx(H.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.open?n.contentId:void 0,"data-state":lr(n.open),...r,ref:a,onClick:F(e.onClick,n.onOpenToggle)})});uo.displayName=Ma;var ir="DialogPortal",[Fu,La]=_a(ir,{forceMount:void 0}),fo=e=>{const{__scopeDialog:t,forceMount:o,children:r,container:n}=e,a=we(ir,t);return c.jsx(Fu,{scope:t,forceMount:o,children:l.Children.map(r,s=>c.jsx(ce,{present:o||a.open,children:c.jsx(Mt,{asChild:!0,container:n,children:s})}))})};fo.displayName=ir;var po="DialogOverlay",gt=l.forwardRef((e,t)=>{const o=La(po,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,a=we(po,e.__scopeDialog);return a.modal?c.jsx(ce,{present:r||a.open,children:c.jsx(Ru,{...n,ref:t})}):null});gt.displayName=po;var Bu=et("DialogOverlay.RemoveScroll"),Ru=l.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=we(po,o),a=Md(),s=K(t,a);return c.jsx(ao,{as:Bu,allowPinchZoom:!0,shards:[n.contentRef],children:c.jsx(H.div,{"data-state":lr(n.open),...r,ref:s,style:{pointerEvents:"auto",...r.style}})})}),mt="DialogContent",vt=l.forwardRef((e,t)=>{const o=La(mt,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,a=we(mt,e.__scopeDialog);return c.jsx(ce,{present:r||a.open,children:a.modal?c.jsx(Hu,{...n,ref:t}):c.jsx(Vu,{...n,ref:t})})});vt.displayName=mt;var Hu=l.forwardRef((e,t)=>{const o=we(mt,e.__scopeDialog),r=l.useRef(null),n=K(t,o.contentRef,r);return l.useEffect(()=>{const a=r.current;if(a)return sr(a)},[]),c.jsx($a,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:F(e.onCloseAutoFocus,a=>{a.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:F(e.onFocusOutside,a=>a.preventDefault())})}),Vu=l.forwardRef((e,t)=>{const o=we(mt,e.__scopeDialog),r=l.useRef(!1),n=l.useRef(!1);return c.jsx($a,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||o.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const s=a.target;o.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),$a=l.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,...s}=e,i=we(mt,o);return er(),c.jsx(c.Fragment,{children:c.jsx(Zt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:c.jsx(ct,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":lr(i.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>i.onOpenChange(!1)})})})}),Fa="DialogTitle",bt=l.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=we(Fa,o);return c.jsx(H.h2,{id:n.titleId,...r,ref:t})});bt.displayName=Fa;var Ba="DialogDescription",wt=l.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=we(Ba,o);return c.jsx(H.p,{id:n.descriptionId,...r,ref:t})});wt.displayName=Ba;var Ra="DialogClose",tt=l.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=we(Ra,o);return c.jsx(H.button,{type:"button",...r,ref:t,onClick:F(e.onClick,()=>n.onOpenChange(!1))})});tt.displayName=Ra;function lr(e){return e?"open":"closed"}var Ha="AlertDialog",[zu]=pe(Ha,[Ia]),_e=Ia(),Va=e=>{const{__scopeAlertDialog:t,...o}=e,r=_e(t);return c.jsx(co,{...r,...o,modal:!0})};Va.displayName=Ha;var Wu="AlertDialogTrigger",za=l.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,n=_e(o);return c.jsx(uo,{...n,...r,ref:t})});za.displayName=Wu;var Uu="AlertDialogPortal",Wa=e=>{const{__scopeAlertDialog:t,...o}=e,r=_e(t);return c.jsx(fo,{...r,...o})};Wa.displayName=Uu;var ju="AlertDialogOverlay",Ua=l.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,n=_e(o);return c.jsx(gt,{...n,...r,ref:t})});Ua.displayName=ju;var ja="AlertDialogContent",[Yu,Ku]=zu(ja),Ya=l.forwardRef((e,t)=>{const{__scopeAlertDialog:o,children:r,...n}=e,a=_e(o),s=l.useRef(null),i=K(t,s),d=l.useRef(null);return c.jsx(Yu,{scope:o,cancelRef:d,children:c.jsx(vt,{role:"alertdialog",...a,...n,ref:i,onOpenAutoFocus:F(n.onOpenAutoFocus,u=>{u.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:r})})});Ya.displayName=ja;var Gu="AlertDialogTitle",Ka=l.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,n=_e(o);return c.jsx(bt,{...n,...r,ref:t})});Ka.displayName=Gu;var Xu="AlertDialogDescription",Ga=l.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,n=_e(o);return c.jsx(wt,{...n,...r,ref:t})});Ga.displayName=Xu;var qu="AlertDialogAction",Xa=l.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,n=_e(o);return c.jsx(tt,{...n,...r,ref:t})});Xa.displayName=qu;var qa="AlertDialogCancel",Za=l.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,{cancelRef:n}=Ku(qa,o),a=_e(o),s=K(t,n);return c.jsx(tt,{...a,...r,ref:s})});Za.displayName=qa;var Zu=Va,Qu=za,Ju=Wa,Qa=Ua,Ja=Ya,es=Xa,ts=Za,os=Ka,rs=Ga;function ns(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=ns(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function as(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=ns(e))&&(r&&(r+=" "),r+=t);return r}const cr="-",ef=e=>{const t=of(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(cr);return i[0]===""&&i.length!==1&&i.shift(),ss(i,t)||tf(s)},getConflictingClassGroupIds:(s,i)=>{const d=o[s]||[];return i&&r[s]?[...d,...r[s]]:d}}},ss=(e,t)=>{if(e.length===0)return t.classGroupId;const o=e[0],r=t.nextPart.get(o),n=r?ss(e.slice(1),r):void 0;if(n)return n;if(t.validators.length===0)return;const a=e.join(cr);return t.validators.find(({validator:s})=>s(a))?.classGroupId},is=/^\[(.+)\]$/,tf=e=>{if(is.test(e)){const t=is.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},of=e=>{const{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return nf(Object.entries(e.classGroups),o).forEach(([a,s])=>{dr(s,r,a,t)}),r},dr=(e,t,o,r)=>{e.forEach(n=>{if(typeof n=="string"){const a=n===""?t:ls(t,n);a.classGroupId=o;return}if(typeof n=="function"){if(rf(n)){dr(n(r),t,o,r);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([a,s])=>{dr(s,ls(t,a),o,r)})})},ls=(e,t)=>{let o=e;return t.split(cr).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},rf=e=>e.isThemeGetter,nf=(e,t)=>t?e.map(([o,r])=>{const n=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[o,n]}):e,af=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map;const n=(a,s)=>{o.set(a,s),t++,t>e&&(t=0,r=o,o=new Map)};return{get(a){let s=o.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return n(a,s),s},set(a,s){o.has(a)?o.set(a,s):n(a,s)}}},cs="!",sf=e=>{const{separator:t,experimentalParseClassName:o}=e,r=t.length===1,n=t[0],a=t.length,s=i=>{const d=[];let u=0,f=0,h;for(let v=0;v<i.length;v++){let y=i[v];if(u===0){if(y===n&&(r||i.slice(v,v+a)===t)){d.push(i.slice(f,v)),f=v+a;continue}if(y==="/"){h=v;continue}}y==="["?u++:y==="]"&&u--}const m=d.length===0?i:i.substring(f),p=m.startsWith(cs),w=p?m.substring(1):m,g=h&&h>f?h-f:void 0;return{modifiers:d,hasImportantModifier:p,baseClassName:w,maybePostfixModifierPosition:g}};return o?i=>o({className:i,parseClassName:s}):s},lf=e=>{if(e.length<=1)return e;const t=[];let o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},cf=e=>({cache:af(e.cacheSize),parseClassName:sf(e),...ef(e)}),df=/\s+/,uf=(e,t)=>{const{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n}=t,a=[],s=e.trim().split(df);let i="";for(let d=s.length-1;d>=0;d-=1){const u=s[d],{modifiers:f,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=o(u);let w=!!p,g=r(w?m.substring(0,p):m);if(!g){if(!w){i=u+(i.length>0?" "+i:i);continue}if(g=r(m),!g){i=u+(i.length>0?" "+i:i);continue}w=!1}const v=lf(f).join(":"),y=h?v+cs:v,b=y+g;if(a.includes(b))continue;a.push(b);const x=n(g,w);for(let S=0;S<x.length;++S){const T=x[S];a.push(y+T)}i=u+(i.length>0?" "+i:i)}return i};function ff(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=ds(t))&&(r&&(r+=" "),r+=o);return r}const ds=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=ds(e[r]))&&(o&&(o+=" "),o+=t);return o};function pf(e,...t){let o,r,n,a=s;function s(d){const u=t.reduce((f,h)=>h(f),e());return o=cf(u),r=o.cache.get,n=o.cache.set,a=i,i(d)}function i(d){const u=r(d);if(u)return u;const f=uf(d,o);return n(d,f),f}return function(){return a(ff.apply(null,arguments))}}const oe=e=>{const t=o=>o[e]||[];return t.isThemeGetter=!0,t},us=/^\[(?:([a-z-]+):)?(.+)\]$/i,hf=/^\d+\/\d+$/,gf=new Set(["px","full","screen"]),mf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vf=/\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$/,bf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ie=e=>yt(e)||gf.has(e)||hf.test(e),Ve=e=>xt(e,"length",Af),yt=e=>!!e&&!Number.isNaN(Number(e)),ur=e=>xt(e,"number",yt),Lt=e=>!!e&&Number.isInteger(Number(e)),xf=e=>e.endsWith("%")&&yt(e.slice(0,-1)),j=e=>us.test(e),ze=e=>mf.test(e),Cf=new Set(["length","size","percentage"]),Sf=e=>xt(e,Cf,fs),Ef=e=>xt(e,"position",fs),Tf=new Set(["image","url"]),Nf=e=>xt(e,Tf,Df),Pf=e=>xt(e,"",kf),$t=()=>!0,xt=(e,t,o)=>{const r=us.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},Af=e=>vf.test(e)&&!bf.test(e),fs=()=>!1,kf=e=>wf.test(e),Df=e=>yf.test(e),Of=pf(()=>{const e=oe("colors"),t=oe("spacing"),o=oe("blur"),r=oe("brightness"),n=oe("borderColor"),a=oe("borderRadius"),s=oe("borderSpacing"),i=oe("borderWidth"),d=oe("contrast"),u=oe("grayscale"),f=oe("hueRotate"),h=oe("invert"),m=oe("gap"),p=oe("gradientColorStops"),w=oe("gradientColorStopPositions"),g=oe("inset"),v=oe("margin"),y=oe("opacity"),b=oe("padding"),x=oe("saturate"),S=oe("scale"),T=oe("sepia"),P=oe("skew"),A=oe("space"),B=oe("translate"),k=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",j,t],O=()=>[j,t],Y=()=>["",Ie,Ve],N=()=>["auto",yt,j],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],R=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",j],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[yt,j];return{cacheSize:500,separator:":",theme:{colors:[$t],spacing:[Ie,Ve],blur:["none","",ze,j],brightness:J(),borderColor:[e],borderRadius:["none","","full",ze,j],borderSpacing:O(),borderWidth:Y(),contrast:J(),grayscale:_(),hueRotate:J(),invert:_(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[xf,Ve],inset:L(),margin:L(),opacity:J(),padding:O(),saturate:J(),scale:J(),sepia:_(),skew:J(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",j]}],container:["container"],columns:[{columns:[ze]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"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:[...V(),j]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Lt,j]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",j]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",Lt,j]}],"grid-cols":[{"grid-cols":[$t]}],"col-start-end":[{col:["auto",{span:["full",Lt,j]},j]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[$t]}],"row-start-end":[{row:["auto",{span:[Lt,j]},j]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",j]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",j]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...$()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",j,t]}],"min-w":[{"min-w":[j,t,"min","max","fit"]}],"max-w":[{"max-w":[j,t,"none","full","min","max","fit","prose",{screen:[ze]},ze]}],h:[{h:[j,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[j,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ze,Ve]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ur]}],"font-family":[{font:[$t]}],"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",j]}],"line-clamp":[{"line-clamp":["none",yt,ur]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ie,j]}],"list-image":[{"list-image":["none",j]}],"list-style-type":[{list:["none","disc","decimal",j]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ie,Ve]}],"underline-offset":[{"underline-offset":["auto",Ie,j]}],"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:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j]}],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",j]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),Ef]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Sf]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Nf]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...R(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:R()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...R()]}],"outline-offset":[{"outline-offset":[Ie,j]}],"outline-w":[{outline:[Ie,Ve]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Ie,Ve]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ze,Pf]}],"shadow-color":[{shadow:[$t]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",ze,j]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[h]}],saturate:[{saturate:[x]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",j]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",j]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",j]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Lt,j]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",j]}],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",j]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",j]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ie,Ve,ur]}],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"]}}});function D(...e){return Of(as(e))}const ps=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hs=as,Ft=(e,t)=>o=>{var r;if(t?.variants==null)return hs(e,o?.class,o?.className);const{variants:n,defaultVariants:a}=t,s=Object.keys(n).map(u=>{const f=o?.[u],h=a?.[u];if(f===null)return null;const m=ps(f)||ps(h);return n[u][m]}),i=o&&Object.entries(o).reduce((u,f)=>{let[h,m]=f;return m===void 0||(u[h]=m),u},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:h,className:m,...p}=f;return Object.entries(p).every(w=>{let[g,v]=w;return Array.isArray(v)?v.includes({...a,...i}[g]):{...a,...i}[g]===v})?[...u,h,m]:u},[]);return hs(e,s,d,o?.class,o?.className)},ho=Ft("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all duration-200 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 active:scale-95",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 hover:shadow-md hover:-translate-y-0.5",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 hover:shadow-md",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground hover:border-primary/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 hover:shadow-sm",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:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),We=l.forwardRef(({className:e,variant:t,size:o,asChild:r=!1,...n},a)=>{const s=r?bd:"button";return c.jsx(s,{className:D(ho({variant:t,size:o,className:e})),ref:a,...n})});We.displayName="Button";const gs=Zu,_f=Qu,ms=Ju,fr=l.forwardRef(({className:e,...t},o)=>c.jsx(Qa,{className:D("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",e),...t,ref:o}));fr.displayName=Qa.displayName;const pr=l.forwardRef(({className:e,...t},o)=>c.jsxs(ms,{children:[c.jsx(fr,{}),c.jsx(Ja,{ref:o,className:D("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));pr.displayName=Ja.displayName;const hr=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col space-y-2 text-center sm:text-left",e),...t});hr.displayName="AlertDialogHeader";const gr=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});gr.displayName="AlertDialogFooter";const mr=l.forwardRef(({className:e,...t},o)=>c.jsx(os,{ref:o,className:D("text-lg font-semibold",e),...t}));mr.displayName=os.displayName;const vr=l.forwardRef(({className:e,...t},o)=>c.jsx(rs,{ref:o,className:D("text-sm text-muted-foreground",e),...t}));vr.displayName=rs.displayName;const br=l.forwardRef(({className:e,...t},o)=>c.jsx(es,{ref:o,className:D(ho(),e),...t}));br.displayName=es.displayName;const wr=l.forwardRef(({className:e,...t},o)=>c.jsx(ts,{ref:o,className:D(ho({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));wr.displayName=ts.displayName;var yr="Avatar",[If]=pe(yr),Mf=[0,()=>{}],[Lf,vs]=If(yr),xr=l.forwardRef((e,t)=>{const{__scopeAvatar:o,...r}=e,[n,a]=l.useState("idle"),[s,i]=Ff();return c.jsx(Lf,{scope:o,imageLoadingStatus:n,setImageLoadingStatus:a,imageCount:s,setImageCount:i,children:c.jsx(H.span,{...r,ref:t})})});xr.displayName=yr;var bs="AvatarImage",Cr=l.forwardRef((e,t)=>{const{__scopeAvatar:o,src:r,onLoadingStatusChange:n,...a}=e,s=vs(bs,o);Bf(s.setImageCount);const i=$f(r,{referrerPolicy:a.referrerPolicy,crossOrigin:a.crossOrigin,loadingStatus:s.imageLoadingStatus,setLoadingStatus:s.setImageLoadingStatus}),d=le(f=>{n?.(f)}),u=l.useRef(i);return se(()=>{const f=u.current;u.current=i,i!==f&&d(i)},[i,d]),i==="loaded"?c.jsx(H.img,{...a,ref:t,src:r}):null});Cr.displayName=bs;var ws="AvatarFallback",Sr=l.forwardRef((e,t)=>{const{__scopeAvatar:o,delayMs:r,...n}=e,a=vs(ws,o),[s,i]=l.useState(r===void 0);return l.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(d)}},[r]),s&&a.imageLoadingStatus!=="loaded"?c.jsx(H.span,{...n,ref:t}):null});Sr.displayName=ws;function $f(e,{loadingStatus:t,setLoadingStatus:o,referrerPolicy:r,crossOrigin:n}){return se(()=>{if(!e){o("error");return}const a=new window.Image,s=d=>{const u=d.currentTarget;o(ys(u))},i=()=>o("error");return a.addEventListener("load",s),a.addEventListener("error",i),r&&(a.referrerPolicy=r),a.crossOrigin=n??null,a.src=e,o(ys(a)),()=>{a.removeEventListener("load",s),a.removeEventListener("error",i),o("idle")}},[e,n,r,o]),t}function ys(e){return e.complete?e.naturalWidth>0?"loaded":"error":"loading"}function Ff(){let e=Mf;{e=l.useState(0);const[t]=e,o=l.useRef(!1);l.useEffect(()=>{t>1&&!o.current&&(o.current=!0,console.warn("Avatar: Only one `Avatar.Image` component should be rendered per `Avatar.Root`, but multiple were detected. This will lead to unexpected behavior."))},[t])}return e}function Bf(e){l.useEffect(()=>(e(t=>t+1),()=>{e(t=>t-1)}),[e])}const xs=l.forwardRef(({className:e,...t},o)=>c.jsx(xr,{ref:o,className:D("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));xs.displayName=xr.displayName;const Cs=l.forwardRef(({className:e,...t},o)=>c.jsx(Cr,{ref:o,className:D("aspect-square h-full w-full",e),...t}));Cs.displayName=Cr.displayName;const Ss=l.forwardRef(({className:e,...t},o)=>c.jsx(Sr,{ref:o,className:D("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ss.displayName=Sr.displayName;const Es=Ft("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),Ts=l.forwardRef(({className:e,variant:t,...o},r)=>c.jsx("div",{ref:r,className:D(Es({variant:t}),e),...o})),Ns=l.forwardRef(({className:e,...t},o)=>c.jsx("div",{ref:o,className:D("rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200",e),...t}));Ns.displayName="Card";const Ps=l.forwardRef(({className:e,...t},o)=>c.jsx("div",{ref:o,className:D("flex flex-col space-y-1.5 p-6",e),...t}));Ps.displayName="CardHeader";const As=l.forwardRef(({className:e,...t},o)=>c.jsx("h3",{ref:o,className:D("text-2xl font-semibold leading-none tracking-tight",e),...t}));As.displayName="CardTitle";const ks=l.forwardRef(({className:e,...t},o)=>c.jsx("p",{ref:o,className:D("text-sm text-muted-foreground",e),...t}));ks.displayName="CardDescription";const Ds=l.forwardRef(({className:e,...t},o)=>c.jsx("div",{ref:o,className:D("p-6 pt-0",e),...t}));Ds.displayName="CardContent";const Os=l.forwardRef(({className:e,...t},o)=>c.jsx("div",{ref:o,className:D("flex items-center p-6 pt-0",e),...t}));Os.displayName="CardFooter";function Er(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Tr(e){const[t,o]=l.useState(void 0);return se(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const a=n[0];let s,i;if("borderBoxSize"in a){const d=a.borderBoxSize,u=Array.isArray(d)?d[0]:d;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;o({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else o(void 0)},[e]),t}var go="Checkbox",[Rf]=pe(go),[Hf,Nr]=Rf(go);function Vf(e){const{__scopeCheckbox:t,checked:o,children:r,defaultChecked:n,disabled:a,form:s,name:i,onCheckedChange:d,required:u,value:f="on",internal_do_not_use_render:h}=e,[m,p]=Re({prop:o,defaultProp:n??!1,onChange:d,caller:go}),[w,g]=l.useState(null),[v,y]=l.useState(null),b=l.useRef(!1),x=w?!!s||!!w.closest("form"):!0,S={checked:m,disabled:a,setChecked:p,control:w,setControl:g,name:i,form:s,value:f,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:Ue(n)?!1:n,isFormControl:x,bubbleInput:v,setBubbleInput:y};return c.jsx(Hf,{scope:t,...S,children:zf(h)?h(S):r})}var _s="CheckboxTrigger",Is=l.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...r},n)=>{const{control:a,value:s,disabled:i,checked:d,required:u,setControl:f,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:p,bubbleInput:w}=Nr(_s,e),g=K(n,f),v=l.useRef(d);return l.useEffect(()=>{const y=a?.form;if(y){const b=()=>h(v.current);return y.addEventListener("reset",b),()=>y.removeEventListener("reset",b)}},[a,h]),c.jsx(H.button,{type:"button",role:"checkbox","aria-checked":Ue(d)?"mixed":d,"aria-required":u,"data-state":Bs(d),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:g,onKeyDown:F(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:F(o,y=>{h(b=>Ue(b)?!0:!b),w&&p&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})})});Is.displayName=_s;var Pr=l.forwardRef((e,t)=>{const{__scopeCheckbox:o,name:r,checked:n,defaultChecked:a,required:s,disabled:i,value:d,onCheckedChange:u,form:f,...h}=e;return c.jsx(Vf,{__scopeCheckbox:o,checked:n,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:r,form:f,value:d,internal_do_not_use_render:({isFormControl:m})=>c.jsxs(c.Fragment,{children:[c.jsx(Is,{...h,ref:t,__scopeCheckbox:o}),m&&c.jsx(Fs,{__scopeCheckbox:o})]})})});Pr.displayName=go;var Ms="CheckboxIndicator",Ls=l.forwardRef((e,t)=>{const{__scopeCheckbox:o,forceMount:r,...n}=e,a=Nr(Ms,o);return c.jsx(ce,{present:r||Ue(a.checked)||a.checked===!0,children:c.jsx(H.span,{"data-state":Bs(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});Ls.displayName=Ms;var $s="CheckboxBubbleInput",Fs=l.forwardRef(({__scopeCheckbox:e,...t},o)=>{const{control:r,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:s,required:i,disabled:d,name:u,value:f,form:h,bubbleInput:m,setBubbleInput:p}=Nr($s,e),w=K(o,p),g=Er(a),v=Tr(r);l.useEffect(()=>{const b=m;if(!b)return;const x=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(x,"checked").set,P=!n.current;if(g!==a&&T){const A=new Event("click",{bubbles:P});b.indeterminate=Ue(a),T.call(b,Ue(a)?!1:a),b.dispatchEvent(A)}},[m,g,a,n]);const y=l.useRef(Ue(a)?!1:a);return c.jsx(H.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??y.current,required:i,disabled:d,name:u,value:f,form:h,...t,tabIndex:-1,ref:w,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Fs.displayName=$s;function zf(e){return typeof e=="function"}function Ue(e){return e==="indeterminate"}function Bs(e){return Ue(e)?"indeterminate":e?"checked":"unchecked"}const Wf=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rs=(...e)=>e.filter((t,o,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===o).join(" ").trim();var Uf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const jf=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:n="",children:a,iconNode:s,...i},d)=>C.createElement("svg",{ref:d,...Uf,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:Rs("lucide",n),...i},[...s.map(([u,f])=>C.createElement(u,f)),...Array.isArray(a)?a:[a]]));const Me=(e,t)=>{const o=C.forwardRef(({className:r,...n},a)=>C.createElement(jf,{ref:a,iconNode:t,className:Rs(`lucide-${Wf(e)}`,r),...n}));return o.displayName=`${e}`,o};const Ar=Me("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const kr=Me("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Yf=Me("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Kf=Me("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Hs=Me("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const Gf=Me("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const Xf=Me("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);const qf=Me("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);const Bt=Me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Dr=l.forwardRef(({className:e,...t},o)=>c.jsx(Pr,{ref:o,className:D("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-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",e),...t,children:c.jsx(Ls,{className:D("flex items-center justify-center text-current"),children:c.jsx(Ar,{className:"h-4 w-4"})})}));Dr.displayName=Pr.displayName;const Vs=co,Zf=uo,zs=fo,Qf=tt,Or=l.forwardRef(({className:e,...t},o)=>c.jsx(gt,{ref:o,className:D("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",e),...t}));Or.displayName=gt.displayName;const _r=l.forwardRef(({className:e,children:t,...o},r)=>c.jsxs(zs,{children:[c.jsx(Or,{}),c.jsxs(vt,{ref:r,className:D("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,c.jsxs(tt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(Bt,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));_r.displayName=vt.displayName;const Ir=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ir.displayName="DialogHeader";const Mr=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Mr.displayName="DialogFooter";const Lr=l.forwardRef(({className:e,...t},o)=>c.jsx(bt,{ref:o,className:D("text-lg font-semibold leading-none tracking-tight",e),...t}));Lr.displayName=bt.displayName;const $r=l.forwardRef(({className:e,...t},o)=>c.jsx(wt,{ref:o,className:D("text-sm text-muted-foreground",e),...t}));$r.displayName=wt.displayName;const Fr=l.forwardRef(({className:e,type:t,...o},r)=>c.jsx("input",{type:t,className:D("flex h-10 w-full rounded-md border border-input bg-white px-3 py-2 text-base ring-offset-background transition-all duration-200 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 focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...o}));Fr.displayName="Input";var Jf="Label",Ws=l.forwardRef((e,t)=>c.jsx(H.label,{...e,ref:t,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(e.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));Ws.displayName=Jf;var Us=Ws;const ep=Ft("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),js=l.forwardRef(({className:e,...t},o)=>c.jsx(Us,{ref:o,className:D(ep(),e),...t}));js.displayName=Us.displayName;const tp=["top","right","bottom","left"],je=Math.min,he=Math.max,mo=Math.round,vo=Math.floor,Ae=e=>({x:e,y:e}),op={left:"right",right:"left",bottom:"top",top:"bottom"};function Br(e,t,o){return he(e,je(t,o))}function Le(e,t){return typeof e=="function"?e(t):e}function $e(e){return e.split("-")[0]}function Ct(e){return e.split("-")[1]}function Rr(e){return e==="x"?"y":"x"}function Hr(e){return e==="y"?"height":"width"}function ke(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Vr(e){return Rr(ke(e))}function rp(e,t,o){o===void 0&&(o=!1);const r=Ct(e),n=Vr(e),a=Hr(n);let s=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=bo(s)),[s,bo(s)]}function np(e){const t=bo(e);return[zr(e),t,zr(t)]}function zr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ys=["left","right"],Ks=["right","left"],ap=["top","bottom"],sp=["bottom","top"];function ip(e,t,o){switch(e){case"top":case"bottom":return o?t?Ks:Ys:t?Ys:Ks;case"left":case"right":return t?ap:sp;default:return[]}}function lp(e,t,o,r){const n=Ct(e);let a=ip($e(e),o==="start",r);return n&&(a=a.map(s=>s+"-"+n),t&&(a=a.concat(a.map(zr)))),a}function bo(e){const t=$e(e);return op[t]+e.slice(t.length)}function cp(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gs(e){return typeof e!="number"?cp(e):{top:e,right:e,bottom:e,left:e}}function wo(e){const{x:t,y:o,width:r,height:n}=e;return{width:r,height:n,top:o,left:t,right:t+r,bottom:o+n,x:t,y:o}}function Xs(e,t,o){let{reference:r,floating:n}=e;const a=ke(t),s=Vr(t),i=Hr(s),d=$e(t),u=a==="y",f=r.x+r.width/2-n.width/2,h=r.y+r.height/2-n.height/2,m=r[i]/2-n[i]/2;let p;switch(d){case"top":p={x:f,y:r.y-n.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-n.width,y:h};break;default:p={x:r.x,y:r.y}}switch(Ct(t)){case"start":p[s]-=m*(o&&u?-1:1);break;case"end":p[s]+=m*(o&&u?-1:1);break}return p}async function dp(e,t){var o;t===void 0&&(t={});const{x:r,y:n,platform:a,rects:s,elements:i,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:p=0}=Le(t,e),w=Gs(p),v=i[m?h==="floating"?"reference":"floating":h],y=wo(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(v)))==null||o?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:d})),b=h==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),S=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},T=wo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:x,strategy:d}):b);return{top:(y.top-T.top+w.top)/S.y,bottom:(T.bottom-y.bottom+w.bottom)/S.y,left:(y.left-T.left+w.left)/S.x,right:(T.right-y.right+w.right)/S.x}}const up=50,fp=async(e,t,o)=>{const{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=o,i=s.detectOverflow?s:{...s,detectOverflow:dp},d=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:f,y:h}=Xs(u,r,d),m=r,p=0;const w={};for(let g=0;g<a.length;g++){const v=a[g];if(!v)continue;const{name:y,fn:b}=v,{x,y:S,data:T,reset:P}=await b({x:f,y:h,initialPlacement:r,placement:m,strategy:n,middlewareData:w,rects:u,platform:i,elements:{reference:e,floating:t}});f=x??f,h=S??h,w[y]={...w[y],...T},P&&p<up&&(p++,typeof P=="object"&&(P.placement&&(m=P.placement),P.rects&&(u=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):P.rects),{x:f,y:h}=Xs(u,m,d)),g=-1)}return{x:f,y:h,placement:m,strategy:n,middlewareData:w}},pp=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:r,placement:n,rects:a,platform:s,elements:i,middlewareData:d}=t,{element:u,padding:f=0}=Le(e,t)||{};if(u==null)return{};const h=Gs(f),m={x:o,y:r},p=Vr(n),w=Hr(p),g=await s.getDimensions(u),v=p==="y",y=v?"top":"left",b=v?"bottom":"right",x=v?"clientHeight":"clientWidth",S=a.reference[w]+a.reference[p]-m[p]-a.floating[w],T=m[p]-a.reference[p],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let A=P?P[x]:0;(!A||!await(s.isElement==null?void 0:s.isElement(P)))&&(A=i.floating[x]||a.floating[w]);const B=S/2-T/2,k=A/2-g[w]/2-1,M=je(h[y],k),L=je(h[b],k),O=M,Y=A-g[w]-L,N=A/2-g[w]/2+B,V=Br(O,N,Y),R=!d.arrow&&Ct(n)!=null&&N!==V&&a.reference[w]/2-(N<O?M:L)-g[w]/2<0,z=R?N<O?N-O:N-Y:0;return{[p]:m[p]+z,data:{[p]:V,centerOffset:N-V-z,...R&&{alignmentOffset:z}},reset:R}}}),hp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;const{placement:n,middlewareData:a,rects:s,initialPlacement:i,platform:d,elements:u}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:g=!0,...v}=Le(e,t);if((o=a.arrow)!=null&&o.alignmentOffset)return{};const y=$e(n),b=ke(i),x=$e(i)===i,S=await(d.isRTL==null?void 0:d.isRTL(u.floating)),T=m||(x||!g?[bo(i)]:np(i)),P=w!=="none";!m&&P&&T.push(...lp(i,g,w,S));const A=[i,...T],B=await d.detectOverflow(t,v),k=[];let M=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&k.push(B[y]),h){const N=rp(n,s,S);k.push(B[N[0]],B[N[1]])}if(M=[...M,{placement:n,overflows:k}],!k.every(N=>N<=0)){var L,O;const N=(((L=a.flip)==null?void 0:L.index)||0)+1,V=A[N];if(V&&(!(h==="alignment"?b!==ke(V):!1)||M.every($=>ke($.placement)===b?$.overflows[0]>0:!0)))return{data:{index:N,overflows:M},reset:{placement:V}};let R=(O=M.filter(z=>z.overflows[0]<=0).sort((z,$)=>z.overflows[1]-$.overflows[1])[0])==null?void 0:O.placement;if(!R)switch(p){case"bestFit":{var Y;const z=(Y=M.filter($=>{if(P){const _=ke($.placement);return _===b||_==="y"}return!0}).map($=>[$.placement,$.overflows.filter(_=>_>0).reduce((_,X)=>_+X,0)]).sort(($,_)=>$[1]-_[1])[0])==null?void 0:Y[0];z&&(R=z);break}case"initialPlacement":R=i;break}if(n!==R)return{reset:{placement:R}}}return{}}}};function qs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Zs(e){return tp.some(t=>e[t]>=0)}const gp=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o,platform:r}=t,{strategy:n="referenceHidden",...a}=Le(e,t);switch(n){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),i=qs(s,o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Zs(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=qs(s,o.floating);return{data:{escapedOffsets:i,escaped:Zs(i)}}}default:return{}}}}},Qs=new Set(["left","top"]);async function mp(e,t){const{placement:o,platform:r,elements:n}=e,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=$e(o),i=Ct(o),d=ke(o)==="y",u=Qs.has(s)?-1:1,f=a&&d?-1:1,h=Le(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return i&&typeof w=="number"&&(p=i==="end"?w*-1:w),d?{x:p*f,y:m*u}:{x:m*u,y:p*f}}const vp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;const{x:n,y:a,placement:s,middlewareData:i}=t,d=await mp(t,e);return s===((o=i.offset)==null?void 0:o.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:n+d.x,y:a+d.y,data:{...d,placement:s}}}}},bp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:r,placement:n,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:d={fn:y=>{let{x:b,y:x}=y;return{x:b,y:x}}},...u}=Le(e,t),f={x:o,y:r},h=await a.detectOverflow(t,u),m=ke($e(n)),p=Rr(m);let w=f[p],g=f[m];if(s){const y=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=w+h[y],S=w-h[b];w=Br(x,w,S)}if(i){const y=m==="y"?"top":"left",b=m==="y"?"bottom":"right",x=g+h[y],S=g-h[b];g=Br(x,g,S)}const v=d.fn({...t,[p]:w,[m]:g});return{...v,data:{x:v.x-o,y:v.y-r,enabled:{[p]:s,[m]:i}}}}}},wp=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:o,y:r,placement:n,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:d=!0,crossAxis:u=!0}=Le(e,t),f={x:o,y:r},h=ke(n),m=Rr(h);let p=f[m],w=f[h];const g=Le(i,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(d){const x=m==="y"?"height":"width",S=a.reference[m]-a.floating[x]+v.mainAxis,T=a.reference[m]+a.reference[x]-v.mainAxis;p<S?p=S:p>T&&(p=T)}if(u){var y,b;const x=m==="y"?"width":"height",S=Qs.has($e(n)),T=a.reference[h]-a.floating[x]+(S&&((y=s.offset)==null?void 0:y[h])||0)+(S?0:v.crossAxis),P=a.reference[h]+a.reference[x]+(S?0:((b=s.offset)==null?void 0:b[h])||0)-(S?v.crossAxis:0);w<T?w=T:w>P&&(w=P)}return{[m]:p,[h]:w}}}},yp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,r;const{placement:n,rects:a,platform:s,elements:i}=t,{apply:d=()=>{},...u}=Le(e,t),f=await s.detectOverflow(t,u),h=$e(n),m=Ct(n),p=ke(n)==="y",{width:w,height:g}=a.floating;let v,y;h==="top"||h==="bottom"?(v=h,y=m===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=h,v=m==="end"?"top":"bottom");const b=g-f.top-f.bottom,x=w-f.left-f.right,S=je(g-f[v],b),T=je(w-f[y],x),P=!t.middlewareData.shift;let A=S,B=T;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(B=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=b),P&&!m){const M=he(f.left,0),L=he(f.right,0),O=he(f.top,0),Y=he(f.bottom,0);p?B=w-2*(M!==0||L!==0?M+L:he(f.left,f.right)):A=g-2*(O!==0||Y!==0?O+Y:he(f.top,f.bottom))}await d({...t,availableWidth:B,availableHeight:A});const k=await s.getDimensions(i.floating);return w!==k.width||g!==k.height?{reset:{rects:!0}}:{}}}};function yo(){return typeof window<"u"}function St(e){return Js(e)?(e.nodeName||"").toLowerCase():"#document"}function ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function De(e){var t;return(t=(Js(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Js(e){return yo()?e instanceof Node||e instanceof ge(e).Node:!1}function ye(e){return yo()?e instanceof Element||e instanceof ge(e).Element:!1}function Fe(e){return yo()?e instanceof HTMLElement||e instanceof ge(e).HTMLElement:!1}function ei(e){return!yo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ge(e).ShadowRoot}function Rt(e){const{overflow:t,overflowX:o,overflowY:r,display:n}=xe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&n!=="inline"&&n!=="contents"}function xp(e){return/^(table|td|th)$/.test(St(e))}function xo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Cp=/transform|translate|scale|rotate|perspective|filter/,Sp=/paint|layout|strict|content/,ot=e=>!!e&&e!=="none";let Wr;function Ur(e){const t=ye(e)?xe(e):e;return ot(t.transform)||ot(t.translate)||ot(t.scale)||ot(t.rotate)||ot(t.perspective)||!jr()&&(ot(t.backdropFilter)||ot(t.filter))||Cp.test(t.willChange||"")||Sp.test(t.contain||"")}function Ep(e){let t=Ye(e);for(;Fe(t)&&!Et(t);){if(Ur(t))return t;if(xo(t))return null;t=Ye(t)}return null}function jr(){return Wr==null&&(Wr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Wr}function Et(e){return/^(html|body|#document)$/.test(St(e))}function xe(e){return ge(e).getComputedStyle(e)}function Co(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ye(e){if(St(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ei(e)&&e.host||De(e);return ei(t)?t.host:t}function ti(e){const t=Ye(e);return Et(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fe(t)&&Rt(t)?t:ti(t)}function Ht(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);const n=ti(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),s=ge(n);if(a){const i=Yr(s);return t.concat(s,s.visualViewport||[],Rt(n)?n:[],i&&o?Ht(i):[])}else return t.concat(n,Ht(n,[],o))}function Yr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oi(e){const t=xe(e);let o=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const n=Fe(e),a=n?e.offsetWidth:o,s=n?e.offsetHeight:r,i=mo(o)!==a||mo(r)!==s;return i&&(o=a,r=s),{width:o,height:r,$:i}}function Kr(e){return ye(e)?e:e.contextElement}function Tt(e){const t=Kr(e);if(!Fe(t))return Ae(1);const o=t.getBoundingClientRect(),{width:r,height:n,$:a}=oi(t);let s=(a?mo(o.width):o.width)/r,i=(a?mo(o.height):o.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Tp=Ae(0);function ri(e){const t=ge(e);return!jr()||!t.visualViewport?Tp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Np(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ge(e)?!1:t}function rt(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);const n=e.getBoundingClientRect(),a=Kr(e);let s=Ae(1);t&&(r?ye(r)&&(s=Tt(r)):s=Tt(e));const i=Np(a,o,r)?ri(a):Ae(0);let d=(n.left+i.x)/s.x,u=(n.top+i.y)/s.y,f=n.width/s.x,h=n.height/s.y;if(a){const m=ge(a),p=r&&ye(r)?ge(r):r;let w=m,g=Yr(w);for(;g&&r&&p!==w;){const v=Tt(g),y=g.getBoundingClientRect(),b=xe(g),x=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*v.x,S=y.top+(g.clientTop+parseFloat(b.paddingTop))*v.y;d*=v.x,u*=v.y,f*=v.x,h*=v.y,d+=x,u+=S,w=ge(g),g=Yr(w)}}return wo({width:f,height:h,x:d,y:u})}function So(e,t){const o=Co(e).scrollLeft;return t?t.left+o:rt(De(e)).left+o}function ni(e,t){const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-So(e,o),n=o.top+t.scrollTop;return{x:r,y:n}}function Pp(e){let{elements:t,rect:o,offsetParent:r,strategy:n}=e;const a=n==="fixed",s=De(r),i=t?xo(t.floating):!1;if(r===s||i&&a)return o;let d={scrollLeft:0,scrollTop:0},u=Ae(1);const f=Ae(0),h=Fe(r);if((h||!h&&!a)&&((St(r)!=="body"||Rt(s))&&(d=Co(r)),h)){const p=rt(r);u=Tt(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const m=s&&!h&&!a?ni(s,d):Ae(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-d.scrollLeft*u.x+f.x+m.x,y:o.y*u.y-d.scrollTop*u.y+f.y+m.y}}function Ap(e){return Array.from(e.getClientRects())}function kp(e){const t=De(e),o=Co(e),r=e.ownerDocument.body,n=he(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=he(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-o.scrollLeft+So(e);const i=-o.scrollTop;return xe(r).direction==="rtl"&&(s+=he(t.clientWidth,r.clientWidth)-n),{width:n,height:a,x:s,y:i}}const ai=25;function Dp(e,t){const o=ge(e),r=De(e),n=o.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,d=0;if(n){a=n.width,s=n.height;const f=jr();(!f||f&&t==="fixed")&&(i=n.offsetLeft,d=n.offsetTop)}const u=So(r);if(u<=0){const f=r.ownerDocument,h=f.body,m=getComputedStyle(h),p=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,w=Math.abs(r.clientWidth-h.clientWidth-p);w<=ai&&(a-=w)}else u<=ai&&(a+=u);return{width:a,height:s,x:i,y:d}}function Op(e,t){const o=rt(e,!0,t==="fixed"),r=o.top+e.clientTop,n=o.left+e.clientLeft,a=Fe(e)?Tt(e):Ae(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,d=n*a.x,u=r*a.y;return{width:s,height:i,x:d,y:u}}function si(e,t,o){let r;if(t==="viewport")r=Dp(e,o);else if(t==="document")r=kp(De(e));else if(ye(t))r=Op(t,o);else{const n=ri(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return wo(r)}function ii(e,t){const o=Ye(e);return o===t||!ye(o)||Et(o)?!1:xe(o).position==="fixed"||ii(o,t)}function _p(e,t){const o=t.get(e);if(o)return o;let r=Ht(e,[],!1).filter(i=>ye(i)&&St(i)!=="body"),n=null;const a=xe(e).position==="fixed";let s=a?Ye(e):e;for(;ye(s)&&!Et(s);){const i=xe(s),d=Ur(s);!d&&i.position==="fixed"&&(n=null),(a?!d&&!n:!d&&i.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Rt(s)&&!d&&ii(e,s))?r=r.filter(f=>f!==s):n=i,s=Ye(s)}return t.set(e,r),r}function Ip(e){let{element:t,boundary:o,rootBoundary:r,strategy:n}=e;const s=[...o==="clippingAncestors"?xo(t)?[]:_p(t,this._c):[].concat(o),r],i=si(t,s[0],n);let d=i.top,u=i.right,f=i.bottom,h=i.left;for(let m=1;m<s.length;m++){const p=si(t,s[m],n);d=he(p.top,d),u=je(p.right,u),f=je(p.bottom,f),h=he(p.left,h)}return{width:u-h,height:f-d,x:h,y:d}}function Mp(e){const{width:t,height:o}=oi(e);return{width:t,height:o}}function Lp(e,t,o){const r=Fe(t),n=De(t),a=o==="fixed",s=rt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const d=Ae(0);function u(){d.x=So(n)}if(r||!r&&!a)if((St(t)!=="body"||Rt(n))&&(i=Co(t)),r){const p=rt(t,!0,a,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else n&&u();a&&!r&&n&&u();const f=n&&!r&&!a?ni(n,i):Ae(0),h=s.left+i.scrollLeft-d.x-f.x,m=s.top+i.scrollTop-d.y-f.y;return{x:h,y:m,width:s.width,height:s.height}}function Gr(e){return xe(e).position==="static"}function li(e,t){if(!Fe(e)||xe(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return De(e)===o&&(o=o.ownerDocument.body),o}function ci(e,t){const o=ge(e);if(xo(e))return o;if(!Fe(e)){let n=Ye(e);for(;n&&!Et(n);){if(ye(n)&&!Gr(n))return n;n=Ye(n)}return o}let r=li(e,t);for(;r&&xp(r)&&Gr(r);)r=li(r,t);return r&&Et(r)&&Gr(r)&&!Ur(r)?o:r||Ep(e)||o}const $p=async function(e){const t=this.getOffsetParent||ci,o=this.getDimensions,r=await o(e.floating);return{reference:Lp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Fp(e){return xe(e).direction==="rtl"}const Bp={convertOffsetParentRelativeRectToViewportRelativeRect:Pp,getDocumentElement:De,getClippingRect:Ip,getOffsetParent:ci,getElementRects:$p,getClientRects:Ap,getDimensions:Mp,getScale:Tt,isElement:ye,isRTL:Fp};function di(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Rp(e,t){let o=null,r;const n=De(e);function a(){var i;clearTimeout(r),(i=o)==null||i.disconnect(),o=null}function s(i,d){i===void 0&&(i=!1),d===void 0&&(d=1),a();const u=e.getBoundingClientRect(),{left:f,top:h,width:m,height:p}=u;if(i||t(),!m||!p)return;const w=vo(h),g=vo(n.clientWidth-(f+m)),v=vo(n.clientHeight-(h+p)),y=vo(f),x={rootMargin:-w+"px "+-g+"px "+-v+"px "+-y+"px",threshold:he(0,je(1,d))||1};let S=!0;function T(P){const A=P[0].intersectionRatio;if(A!==d){if(!S)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}A===1&&!di(u,e.getBoundingClientRect())&&s(),S=!1}try{o=new IntersectionObserver(T,{...x,root:n.ownerDocument})}catch{o=new IntersectionObserver(T,x)}o.observe(e)}return s(!0),a}function Hp(e,t,o,r){r===void 0&&(r={});const{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,u=Kr(e),f=n||a?[...u?Ht(u):[],...t?Ht(t):[]]:[];f.forEach(y=>{n&&y.addEventListener("scroll",o,{passive:!0}),a&&y.addEventListener("resize",o)});const h=u&&i?Rp(u,o):null;let m=-1,p=null;s&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),o()}),u&&!d&&p.observe(u),t&&p.observe(t));let w,g=d?rt(e):null;d&&v();function v(){const y=rt(e);g&&!di(g,y)&&o(),g=y,w=requestAnimationFrame(v)}return o(),()=>{var y;f.forEach(b=>{n&&b.removeEventListener("scroll",o),a&&b.removeEventListener("resize",o)}),h?.(),(y=p)==null||y.disconnect(),p=null,d&&cancelAnimationFrame(w)}}const Vp=vp,zp=bp,Wp=hp,Up=yp,jp=gp,ui=pp,Yp=wp,Kp=(e,t,o)=>{const r=new Map,n={platform:Bp,...o},a={...n.platform,_c:r};return fp(e,t,{...n,platform:a})};var Gp=typeof document<"u",Xp=function(){},Eo=Gp?C.useLayoutEffect:Xp;function To(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,r,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!To(e[r],t[r]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,n[r]))return!1;for(r=o;r--!==0;){const a=n[r];if(!(a==="_owner"&&e.$$typeof)&&!To(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function fi(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pi(e,t){const o=fi(e);return Math.round(t*o)/o}function Xr(e){const t=l.useRef(e);return Eo(()=>{t.current=e}),t}function qp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:n,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:d,open:u}=e,[f,h]=l.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=l.useState(r);To(m,r)||p(r);const[w,g]=l.useState(null),[v,y]=l.useState(null),b=l.useCallback($=>{$!==P.current&&(P.current=$,g($))},[]),x=l.useCallback($=>{$!==A.current&&(A.current=$,y($))},[]),S=a||w,T=s||v,P=l.useRef(null),A=l.useRef(null),B=l.useRef(f),k=d!=null,M=Xr(d),L=Xr(n),O=Xr(u),Y=l.useCallback(()=>{if(!P.current||!A.current)return;const $={placement:t,strategy:o,middleware:m};L.current&&($.platform=L.current),Kp(P.current,A.current,$).then(_=>{const X={..._,isPositioned:O.current!==!1};N.current&&!To(B.current,X)&&(B.current=X,lt.flushSync(()=>{h(X)}))})},[m,t,o,L,O]);Eo(()=>{u===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,h($=>({...$,isPositioned:!1})))},[u]);const N=l.useRef(!1);Eo(()=>(N.current=!0,()=>{N.current=!1}),[]),Eo(()=>{if(S&&(P.current=S),T&&(A.current=T),S&&T){if(M.current)return M.current(S,T,Y);Y()}},[S,T,Y,M,k]);const V=l.useMemo(()=>({reference:P,floating:A,setReference:b,setFloating:x}),[b,x]),R=l.useMemo(()=>({reference:S,floating:T}),[S,T]),z=l.useMemo(()=>{const $={position:o,left:0,top:0};if(!R.floating)return $;const _=pi(R.floating,f.x),X=pi(R.floating,f.y);return i?{...$,transform:"translate("+_+"px, "+X+"px)",...fi(R.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:_,top:X}},[o,i,R.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:Y,refs:V,elements:R,floatingStyles:z}),[f,Y,V,R,z])}const Zp=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:r,padding:n}=typeof e=="function"?e(o):e;return r&&t(r)?r.current!=null?ui({element:r.current,padding:n}).fn(o):{}:r?ui({element:r,padding:n}).fn(o):{}}}},Qp=(e,t)=>{const o=Vp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Jp=(e,t)=>{const o=zp(e);return{name:o.name,fn:o.fn,options:[e,t]}},eh=(e,t)=>({fn:Yp(e).fn,options:[e,t]}),th=(e,t)=>{const o=Wp(e);return{name:o.name,fn:o.fn,options:[e,t]}},oh=(e,t)=>{const o=Up(e);return{name:o.name,fn:o.fn,options:[e,t]}},rh=(e,t)=>{const o=jp(e);return{name:o.name,fn:o.fn,options:[e,t]}},nh=(e,t)=>{const o=Zp(e);return{name:o.name,fn:o.fn,options:[e,t]}};var ah="Arrow",hi=l.forwardRef((e,t)=>{const{children:o,width:r=10,height:n=5,...a}=e;return c.jsx(H.svg,{...a,ref:t,width:r,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});hi.displayName=ah;var sh=hi,qr="Popper",[gi,Nt]=pe(qr),[ih,mi]=gi(qr),vi=e=>{const{__scopePopper:t,children:o}=e,[r,n]=l.useState(null),[a,s]=l.useState(void 0);return c.jsx(ih,{scope:t,anchor:r,onAnchorChange:n,placementState:a,setPlacementState:s,children:o})};vi.displayName=qr;var bi="PopperAnchor",wi=l.forwardRef((e,t)=>{const{__scopePopper:o,virtualRef:r,...n}=e,a=mi(bi,o),s=l.useRef(null),i=a.onAnchorChange,d=l.useCallback(w=>{s.current=w,w&&i(w)},[i]),u=K(t,d),f=l.useRef(null);l.useEffect(()=>{if(!r)return;const w=f.current;f.current=r.current,w!==f.current&&i(f.current)});const h=a.placementState&&Qr(a.placementState),m=h?.[0],p=h?.[1];return r?null:c.jsx(H.div,{"data-radix-popper-side":m,"data-radix-popper-align":p,...n,ref:u})});wi.displayName=bi;var Zr="PopperContent",[lh,ch]=gi(Zr),yi=l.forwardRef((e,t)=>{const{__scopePopper:o,side:r="bottom",sideOffset:n=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:w,...g}=e,v=mi(Zr,o),[y,b]=l.useState(null),x=K(t,ee=>b(ee)),[S,T]=l.useState(null),P=Tr(S),A=P?.width??0,B=P?.height??0,k=r+(a!=="center"?"-"+a:""),M=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(u)?u:[u],O=L.length>0,Y={padding:M,boundary:L.filter(uh),altBoundary:O},{refs:N,floatingStyles:V,placement:R,isPositioned:z,middlewareData:$}=qp({strategy:"fixed",placement:k,whileElementsMounted:(...ee)=>Hp(...ee,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[Qp({mainAxis:n+B,alignmentAxis:s}),d&&Jp({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?eh():void 0,...Y}),d&&th({...Y}),oh({...Y,apply:({elements:ee,rects:ae,availableWidth:Z,availableHeight:Q})=>{const{width:re,height:ve}=ae.reference,fe=ee.floating.style;fe.setProperty("--radix-popper-available-width",`${Z}px`),fe.setProperty("--radix-popper-available-height",`${Q}px`),fe.setProperty("--radix-popper-anchor-width",`${re}px`),fe.setProperty("--radix-popper-anchor-height",`${ve}px`)}}),S&&nh({element:S,padding:i}),fh({arrowWidth:A,arrowHeight:B}),m&&rh({strategy:"referenceHidden",...Y,boundary:O?Y.boundary:void 0})]}),_=v.setPlacementState;se(()=>(_(R),()=>{_(void 0)}),[R,_]);const[X,J]=Qr(R),U=le(w);se(()=>{z&&U?.()},[z,U]);const G=$.arrow?.x,q=$.arrow?.y,ie=$.arrow?.centerOffset!==0,[ue,I]=l.useState();return se(()=>{y&&I(window.getComputedStyle(y).zIndex)},[y]),c.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:z?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(lh,{scope:o,placedSide:X,placedAlign:J,onArrowChange:T,arrowX:G,arrowY:q,shouldHideArrow:ie,children:c.jsx(H.div,{"data-side":X,"data-align":J,...g,ref:x,style:{...g.style,animation:z?void 0:"none"}})})})});yi.displayName=Zr;var xi="PopperArrow",dh={top:"bottom",right:"left",bottom:"top",left:"right"},Ci=l.forwardRef(function(t,o){const{__scopePopper:r,...n}=t,a=ch(xi,r),s=dh[a.placedSide];return c.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:c.jsx(sh,{...n,ref:o,style:{...n.style,display:"block"}})})});Ci.displayName=xi;function uh(e){return e!==null}var fh=e=>({name:"transformOrigin",options:e,fn(t){const{placement:o,rects:r,middlewareData:n}=t,s=n.arrow?.centerOffset!==0,i=s?0:e.arrowWidth,d=s?0:e.arrowHeight,[u,f]=Qr(o),h={start:"0%",center:"50%",end:"100%"}[f],m=(n.arrow?.x??0)+i/2,p=(n.arrow?.y??0)+d/2;let w="",g="";return u==="bottom"?(w=s?h:`${m}px`,g=`${-d}px`):u==="top"?(w=s?h:`${m}px`,g=`${r.floating.height+d}px`):u==="right"?(w=`${-d}px`,g=s?h:`${p}px`):u==="left"&&(w=`${r.floating.width+d}px`,g=s?h:`${p}px`),{data:{x:w,y:g}}}});function Qr(e){const[t,o="center"]=e.split("-");return[t,o]}var Jr=vi,No=wi,en=yi,tn=Ci,Po="Popover",[Si]=pe(Po,[Nt]),Vt=Nt(),[ph,Ke]=Si(Po),Ei=e=>{const{__scopePopover:t,children:o,open:r,defaultOpen:n,onOpenChange:a,modal:s=!1}=e,i=Vt(t),d=l.useRef(null),[u,f]=l.useState(!1),[h,m]=Re({prop:r,defaultProp:n??!1,onChange:a,caller:Po});return c.jsx(Jr,{...i,children:c.jsx(ph,{scope:t,contentId:Be(),triggerRef:d,open:h,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(p=>!p),[m]),hasCustomAnchor:u,onCustomAnchorAdd:l.useCallback(()=>f(!0),[]),onCustomAnchorRemove:l.useCallback(()=>f(!1),[]),modal:s,children:o})})};Ei.displayName=Po;var Ti="PopoverAnchor",hh=l.forwardRef((e,t)=>{const{__scopePopover:o,...r}=e,n=Ke(Ti,o),a=Vt(o),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=n;return l.useEffect(()=>(s(),()=>i()),[s,i]),c.jsx(No,{...a,...r,ref:t})});hh.displayName=Ti;var Ni="PopoverTrigger",Pi=l.forwardRef((e,t)=>{const{__scopePopover:o,...r}=e,n=Ke(Ni,o),a=Vt(o),s=K(t,n.triggerRef),i=c.jsx(H.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.open?n.contentId:void 0,"data-state":_i(n.open),...r,ref:s,onClick:F(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?i:c.jsx(No,{asChild:!0,...a,children:i})});Pi.displayName=Ni;var on="PopoverPortal",[gh,mh]=Si(on,{forceMount:void 0}),Ai=e=>{const{__scopePopover:t,forceMount:o,children:r,container:n}=e,a=Ke(on,t);return c.jsx(gh,{scope:t,forceMount:o,children:c.jsx(ce,{present:o||a.open,children:c.jsx(Mt,{asChild:!0,container:n,children:r})})})};Ai.displayName=on;var Pt="PopoverContent",ki=l.forwardRef((e,t)=>{const o=mh(Pt,e.__scopePopover),{forceMount:r=o.forceMount,...n}=e,a=Ke(Pt,e.__scopePopover);return c.jsx(ce,{present:r||a.open,children:a.modal?c.jsx(bh,{...n,ref:t}):c.jsx(wh,{...n,ref:t})})});ki.displayName=Pt;var vh=et("PopoverContent.RemoveScroll"),bh=l.forwardRef((e,t)=>{const o=Ke(Pt,e.__scopePopover),r=l.useRef(null),n=K(t,r),a=l.useRef(!1);return l.useEffect(()=>{const s=r.current;if(s)return sr(s)},[]),c.jsx(ao,{as:vh,allowPinchZoom:!0,children:c.jsx(Di,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,s=>{s.preventDefault(),a.current||o.triggerRef.current?.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,d=i.button===0&&i.ctrlKey===!0,u=i.button===2||d;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:F(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),wh=l.forwardRef((e,t)=>{const o=Ke(Pt,e.__scopePopover),r=l.useRef(!1),n=l.useRef(!1);return c.jsx(Di,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||o.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const s=a.target;o.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),Di=l.forwardRef((e,t)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:f,...h}=e,m=Ke(Pt,o),p=Vt(o);return er(),c.jsx(Zt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:c.jsx(ct,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:u,onDismiss:()=>m.onOpenChange(!1),deferPointerDownOutside:!0,children:c.jsx(en,{"data-state":_i(m.open),role:"dialog",id:m.contentId,...p,...h,ref:t,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Oi="PopoverClose",yh=l.forwardRef((e,t)=>{const{__scopePopover:o,...r}=e,n=Ke(Oi,o);return c.jsx(H.button,{type:"button",...r,ref:t,onClick:F(e.onClick,()=>n.onOpenChange(!1))})});yh.displayName=Oi;var xh="PopoverArrow",Ch=l.forwardRef((e,t)=>{const{__scopePopover:o,...r}=e,n=Vt(o);return c.jsx(tn,{...n,...r,ref:t})});Ch.displayName=xh;function _i(e){return e?"open":"closed"}var Sh=Ei,Eh=Pi,Th=Ai,Ii=ki;const Mi=Sh,Li=Eh,rn=l.forwardRef(({className:e,align:t="start",sideOffset:o=4,...r},n)=>c.jsx(Th,{children:c.jsx(Ii,{ref:n,align:t,sideOffset:o,className:D("z-50 w-[var(--radix-popover-trigger-width)] rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none 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",e),...r})}));rn.displayName=Ii.displayName;function Nh({options:e,value:t,onValueChange:o,placeholder:r="Select options"}){const[n,a]=C.useState(!1),s=e.filter(u=>t.includes(u.value)),i=u=>{t.includes(u)?o(t.filter(f=>f!==u)):o([...t,u])},d=(u,f)=>{f.stopPropagation(),o(t.filter(h=>h!==u))};return c.jsxs(Mi,{open:n,onOpenChange:a,children:[c.jsx(Li,{asChild:!0,children:c.jsxs("button",{type:"button",className:D("flex min-h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background transition-all duration-200 hover:border-primary/50 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:border-primary disabled:cursor-not-allowed disabled:opacity-50",!s.length&&"text-muted-foreground"),children:[c.jsx("div",{className:"flex flex-wrap gap-1 flex-1",children:s.length>0?s.map(u=>c.jsxs(Ts,{variant:"secondary",className:"gap-1 pr-1",children:[u.label,c.jsx("span",{role:"button",tabIndex:0,className:"rounded-full hover:bg-muted-foreground/20 p-0.5",onClick:f=>d(u.value,f),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&d(u.value,f)},children:c.jsx(Bt,{className:"h-3 w-3"})})]},u.value)):c.jsx("span",{children:r})}),c.jsx(kr,{className:"h-4 w-4 shrink-0 opacity-50 ml-2"})]})}),c.jsx(rn,{className:"max-h-60 overflow-y-auto p-1",children:e.length===0?c.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:"No options available"}):e.map(u=>{const f=t.includes(u.value);return c.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-all duration-150 hover:bg-accent/50 focus:bg-accent focus:text-accent-foreground",onClick:()=>i(u.value),children:[c.jsx(Dr,{checked:f,tabIndex:-1}),u.label]},u.value)})})]})}var nn="Progress",an=100,[Ph]=pe(nn),[Ah,kh]=Ph(nn),$i=l.forwardRef((e,t)=>{const{__scopeProgress:o,value:r=null,max:n,getValueLabel:a=Dh,...s}=e;(n||n===0)&&!Hi(n)&&console.error(Oh(`${n}`,"Progress"));const i=Hi(n)?n:an;r!==null&&!Vi(r,i)&&console.error(_h(`${r}`,"Progress"));const d=Vi(r,i)?r:null,u=Ao(d)?a(d,i):void 0;return c.jsx(Ah,{scope:o,value:d,max:i,children:c.jsx(H.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Ao(d)?d:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ri(d,i),"data-value":d??void 0,"data-max":i,...s,ref:t})})});$i.displayName=nn;var Fi="ProgressIndicator",Bi=l.forwardRef((e,t)=>{const{__scopeProgress:o,...r}=e,n=kh(Fi,o);return c.jsx(H.div,{"data-state":Ri(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...r,ref:t})});Bi.displayName=Fi;function Dh(e,t){return`${Math.round(e/t*100)}%`}function Ri(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Ao(e){return typeof e=="number"}function Hi(e){return Ao(e)&&!isNaN(e)&&e>0}function Vi(e,t){return Ao(e)&&!isNaN(e)&&e<=t&&e>=0}function Oh(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${an}\`.`}function _h(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
41
|
+
`)},Mu=0,yt=[];function Iu(e){var t=c.useRef([]),r=c.useRef([0,0]),o=c.useRef(),n=c.useState(Mu++)[0],a=c.useState(Aa)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var g=tu([e.lockRef.current],(e.shards||[]).map(La),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var y=lr(g),b=r.current,x="deltaX"in g?g.deltaX:b[0]-y[0],S="deltaY"in g?g.deltaY:b[1]-y[1],E,T=g.target,A=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&A==="h"&&T.type==="range")return!1;var V=window.getSelection(),D=V&&V.anchorNode,F=D?D===T||D.contains(T):!1;if(F)return!1;var $=Oa(A,T);if(!$)return!0;if($?E=A:(E=A==="v"?"h":"v",$=Oa(A,T)),!$)return!1;if(!o.current&&"changedTouches"in g&&(x||S)&&(o.current=E),!E)return!0;var P=o.current||E;return Du(P,v,g,P==="h"?x:S)},[]),d=c.useCallback(function(g){var v=g;if(!(!yt.length||yt[yt.length-1]!==a)){var y="deltaY"in v?Ia(v):lr(v),b=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&Ou(E.delta,y)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var x=(s.current.shards||[]).map(La).filter(Boolean).filter(function(E){return E.contains(v.target)}),S=x.length>0?i(v,x[0]):!s.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),u=c.useCallback(function(g,v,y,b){var x={name:g,delta:v,target:y,should:b,shadowParent:Lu(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),f=c.useCallback(function(g){r.current=lr(g),o.current=void 0},[]),h=c.useCallback(function(g){u(g.type,Ia(g),g.target,i(g,e.lockRef.current))},[]),m=c.useCallback(function(g){u(g.type,lr(g),g.target,i(g,e.lockRef.current))},[]);c.useEffect(function(){return yt.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",d,wt),document.addEventListener("touchmove",d,wt),document.addEventListener("touchstart",f,wt),function(){yt=yt.filter(function(g){return g!==a}),document.removeEventListener("wheel",d,wt),document.removeEventListener("touchmove",d,wt),document.removeEventListener("touchstart",f,wt)}},[]);var p=e.removeScrollBar,w=e.inert;return c.createElement(c.Fragment,null,w?c.createElement(a,{styles:_u(n)}):null,p?c.createElement(Su,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Lu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $u=du(Pa,Iu);var cr=c.forwardRef(function(e,t){return c.createElement(sr,Oe({},e,{ref:t,sideCar:$u}))});cr.classNames=sr.classNames;var Fu=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xt=new WeakMap,dr=new WeakMap,ur={},co=0,$a=function(e){return e&&(e.host||$a(e.parentNode))},Bu=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=$a(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Hu=function(e,t,r,o){var n=Bu(t,Array.isArray(e)?e:[e]);ur[r]||(ur[r]=new WeakMap);var a=ur[r],s=[],i=new Set,d=new Set(n),u=function(h){!h||i.has(h)||(i.add(h),u(h.parentNode))};n.forEach(u);var f=function(h){!h||d.has(h)||Array.prototype.forEach.call(h.children,function(m){if(i.has(m))f(m);else try{var p=m.getAttribute(o),w=p!==null&&p!=="false",g=(xt.get(m)||0)+1,v=(a.get(m)||0)+1;xt.set(m,g),a.set(m,v),s.push(m),g===1&&w&&dr.set(m,!0),v===1&&m.setAttribute(r,"true"),w||m.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return f(t),i.clear(),co++,function(){s.forEach(function(h){var m=xt.get(h)-1,p=a.get(h)-1;xt.set(h,m),a.set(h,p),m||(dr.has(h)||h.removeAttribute(o),dr.delete(h)),p||h.removeAttribute(r)}),co--,co||(xt=new WeakMap,xt=new WeakMap,dr=new WeakMap,ur={})}},uo=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=Fu(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),Hu(o,n,r,"aria-hidden")):function(){return null}},fr="Dialog",[Fa,Ba]=ve(fr),[Vu,Ce]=Fa(fr),pr=e=>{const{__scopeDialog:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:s=!0}=e,i=c.useRef(null),d=c.useRef(null),[u,f]=je({prop:o,defaultProp:n??!1,onChange:a,caller:fr});return l.jsx(Vu,{scope:t,triggerRef:i,contentRef:d,contentId:Ue(),titleId:Ue(),descriptionId:Ue(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(h=>!h),[f]),modal:s,children:r})};pr.displayName=fr;var Ha="DialogTrigger",hr=c.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,n=Ce(Ha,r),a=q(t,n.triggerRef);return l.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.open?n.contentId:void 0,"data-state":po(n.open),...o,ref:a,onClick:H(e.onClick,n.onOpenToggle)})});hr.displayName=Ha;var fo="DialogPortal",[Wu,Va]=Fa(fo,{forceMount:void 0}),gr=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:n}=e,a=Ce(fo,t);return l.jsx(Wu,{scope:t,forceMount:r,children:c.Children.map(o,s=>l.jsx(he,{present:r||a.open,children:l.jsx(Vt,{asChild:!0,container:n,children:s})}))})};gr.displayName=fo;var mr="DialogOverlay",Ct=c.forwardRef((e,t)=>{const r=Va(mr,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Ce(mr,e.__scopeDialog);return a.modal?l.jsx(he,{present:o||a.open,children:l.jsx(Ru,{...n,ref:t})}):null});Ct.displayName=mr;var zu=it("DialogOverlay.RemoveScroll"),Ru=c.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,n=Ce(mr,r),a=Bd(),s=q(t,a);return l.jsx(cr,{as:zu,allowPinchZoom:!0,shards:[n.contentRef],children:l.jsx(W.div,{"data-state":po(n.open),...o,ref:s,style:{pointerEvents:"auto",...o.style}})})}),St="DialogContent",Et=c.forwardRef((e,t)=>{const r=Va(St,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Ce(St,e.__scopeDialog);return l.jsx(he,{present:o||a.open,children:a.modal?l.jsx(Uu,{...n,ref:t}):l.jsx(ju,{...n,ref:t})})});Et.displayName=St;var Uu=c.forwardRef((e,t)=>{const r=Ce(St,e.__scopeDialog),o=c.useRef(null),n=q(t,r.contentRef,o);return c.useEffect(()=>{const a=o.current;if(a)return uo(a)},[]),l.jsx(Wa,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:H(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:H(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:H(e.onFocusOutside,a=>a.preventDefault())})}),ju=c.forwardRef((e,t)=>{const r=Ce(St,e.__scopeDialog),o=c.useRef(!1),n=c.useRef(!1);return l.jsx(Wa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||r.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const s=a.target;r.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),Wa=c.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,...s}=e,i=Ce(St,r);return no(),l.jsx(l.Fragment,{children:l.jsx(tr,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:l.jsx(mt,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":po(i.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>i.onOpenChange(!1)})})})}),za="DialogTitle",Nt=c.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,n=Ce(za,r);return l.jsx(W.h2,{id:n.titleId,...o,ref:t})});Nt.displayName=za;var Ra="DialogDescription",Tt=c.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,n=Ce(Ra,r);return l.jsx(W.p,{id:n.descriptionId,...o,ref:t})});Tt.displayName=Ra;var Ua="DialogClose",lt=c.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,n=Ce(Ua,r);return l.jsx(W.button,{type:"button",...o,ref:t,onClick:H(e.onClick,()=>n.onOpenChange(!1))})});lt.displayName=Ua;function po(e){return e?"open":"closed"}var ja="AlertDialog",[Yu]=ve(ja,[Ba]),Fe=Ba(),Ya=e=>{const{__scopeAlertDialog:t,...r}=e,o=Fe(t);return l.jsx(pr,{...o,...r,modal:!0})};Ya.displayName=ja;var Ku="AlertDialogTrigger",Ka=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,n=Fe(r);return l.jsx(hr,{...n,...o,ref:t})});Ka.displayName=Ku;var Gu="AlertDialogPortal",Ga=e=>{const{__scopeAlertDialog:t,...r}=e,o=Fe(t);return l.jsx(gr,{...o,...r})};Ga.displayName=Gu;var Xu="AlertDialogOverlay",Xa=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,n=Fe(r);return l.jsx(Ct,{...n,...o,ref:t})});Xa.displayName=Xu;var qa="AlertDialogContent",[qu,Zu]=Yu(qa),Za=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:o,...n}=e,a=Fe(r),s=c.useRef(null),i=q(t,s),d=c.useRef(null);return l.jsx(qu,{scope:r,cancelRef:d,children:l.jsx(Et,{role:"alertdialog",...a,...n,ref:i,onOpenAutoFocus:H(n.onOpenAutoFocus,u=>{u.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:o})})});Za.displayName=qa;var Qu="AlertDialogTitle",Qa=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,n=Fe(r);return l.jsx(Nt,{...n,...o,ref:t})});Qa.displayName=Qu;var Ju="AlertDialogDescription",Ja=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,n=Fe(r);return l.jsx(Tt,{...n,...o,ref:t})});Ja.displayName=Ju;var ef="AlertDialogAction",es=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,n=Fe(r);return l.jsx(lt,{...n,...o,ref:t})});es.displayName=ef;var ts="AlertDialogCancel",rs=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,{cancelRef:n}=Zu(ts,r),a=Fe(r),s=q(t,n);return l.jsx(lt,{...a,...o,ref:s})});rs.displayName=ts;var tf=Ya,rf=Ka,of=Ga,os=Xa,ns=Za,as=es,ss=rs,is=Qa,ls=Ja;function cs(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=cs(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function ds(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=cs(e))&&(o&&(o+=" "),o+=t);return o}const ho="-",nf=e=>{const t=sf(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{const i=s.split(ho);return i[0]===""&&i.length!==1&&i.shift(),us(i,t)||af(s)},getConflictingClassGroupIds:(s,i)=>{const d=r[s]||[];return i&&o[s]?[...d,...o[s]]:d}}},us=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?us(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;const a=e.join(ho);return t.validators.find(({validator:s})=>s(a))?.classGroupId},fs=/^\[(.+)\]$/,af=e=>{if(fs.test(e)){const t=fs.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},sf=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return cf(Object.entries(e.classGroups),r).forEach(([a,s])=>{go(s,o,a,t)}),o},go=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){const a=n===""?t:ps(t,n);a.classGroupId=r;return}if(typeof n=="function"){if(lf(n)){go(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([a,s])=>{go(s,ps(t,a),r,o)})})},ps=(e,t)=>{let r=e;return t.split(ho).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},lf=e=>e.isThemeGetter,cf=(e,t)=>t?e.map(([r,o])=>{const n=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[r,n]}):e,df=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const n=(a,s)=>{r.set(a,s),t++,t>e&&(t=0,o=r,r=new Map)};return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=o.get(a))!==void 0)return n(a,s),s},set(a,s){r.has(a)?r.set(a,s):n(a,s)}}},hs="!",uf=e=>{const{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],a=t.length,s=i=>{const d=[];let u=0,f=0,h;for(let v=0;v<i.length;v++){let y=i[v];if(u===0){if(y===n&&(o||i.slice(v,v+a)===t)){d.push(i.slice(f,v)),f=v+a;continue}if(y==="/"){h=v;continue}}y==="["?u++:y==="]"&&u--}const m=d.length===0?i:i.substring(f),p=m.startsWith(hs),w=p?m.substring(1):m,g=h&&h>f?h-f:void 0;return{modifiers:d,hasImportantModifier:p,baseClassName:w,maybePostfixModifierPosition:g}};return r?i=>r({className:i,parseClassName:s}):s},ff=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},pf=e=>({cache:df(e.cacheSize),parseClassName:uf(e),...nf(e)}),hf=/\s+/,gf=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,a=[],s=e.trim().split(hf);let i="";for(let d=s.length-1;d>=0;d-=1){const u=s[d],{modifiers:f,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=r(u);let w=!!p,g=o(w?m.substring(0,p):m);if(!g){if(!w){i=u+(i.length>0?" "+i:i);continue}if(g=o(m),!g){i=u+(i.length>0?" "+i:i);continue}w=!1}const v=ff(f).join(":"),y=h?v+hs:v,b=y+g;if(a.includes(b))continue;a.push(b);const x=n(g,w);for(let S=0;S<x.length;++S){const E=x[S];a.push(y+E)}i=u+(i.length>0?" "+i:i)}return i};function mf(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=gs(t))&&(o&&(o+=" "),o+=r);return o}const gs=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=gs(e[o]))&&(r&&(r+=" "),r+=t);return r};function vf(e,...t){let r,o,n,a=s;function s(d){const u=t.reduce((f,h)=>h(f),e());return r=pf(u),o=r.cache.get,n=r.cache.set,a=i,i(d)}function i(d){const u=o(d);if(u)return u;const f=gf(d,r);return n(d,f),f}return function(){return a(mf.apply(null,arguments))}}const se=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},ms=/^\[(?:([a-z-]+):)?(.+)\]$/i,bf=/^\d+\/\d+$/,wf=new Set(["px","full","screen"]),yf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xf=/\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$/,Cf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ef=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Be=e=>Pt(e)||wf.has(e)||bf.test(e),Ke=e=>At(e,"length",_f),Pt=e=>!!e&&!Number.isNaN(Number(e)),mo=e=>At(e,"number",Pt),Wt=e=>!!e&&Number.isInteger(Number(e)),Nf=e=>e.endsWith("%")&&Pt(e.slice(0,-1)),K=e=>ms.test(e),Ge=e=>yf.test(e),Tf=new Set(["length","size","percentage"]),Pf=e=>At(e,Tf,vs),Af=e=>At(e,"position",vs),kf=new Set(["image","url"]),Df=e=>At(e,kf,If),Of=e=>At(e,"",Mf),zt=()=>!0,At=(e,t,r)=>{const o=ms.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},_f=e=>xf.test(e)&&!Cf.test(e),vs=()=>!1,Mf=e=>Sf.test(e),If=e=>Ef.test(e),Lf=vf(()=>{const e=se("colors"),t=se("spacing"),r=se("blur"),o=se("brightness"),n=se("borderColor"),a=se("borderRadius"),s=se("borderSpacing"),i=se("borderWidth"),d=se("contrast"),u=se("grayscale"),f=se("hueRotate"),h=se("invert"),m=se("gap"),p=se("gradientColorStops"),w=se("gradientColorStopPositions"),g=se("inset"),v=se("margin"),y=se("opacity"),b=se("padding"),x=se("saturate"),S=se("scale"),E=se("sepia"),T=se("skew"),A=se("space"),V=se("translate"),D=()=>["auto","contain","none"],F=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",K,t],P=()=>[K,t],Y=()=>["",Be,Ke],k=()=>["auto",Pt,K],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",K],G=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[Pt,K];return{cacheSize:500,separator:":",theme:{colors:[zt],spacing:[Be,Ke],blur:["none","",Ge,K],brightness:te(),borderColor:[e],borderRadius:["none","","full",Ge,K],borderSpacing:P(),borderWidth:Y(),contrast:te(),grayscale:M(),hueRotate:te(),invert:M(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[Nf,Ke],inset:$(),margin:$(),opacity:te(),padding:P(),saturate:te(),scale:te(),sepia:M(),skew:te(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",K]}],container:["container"],columns:[{columns:[Ge]}],"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:[...R(),K]}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Wt,K]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",K]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",Wt,K]}],"grid-cols":[{"grid-cols":[zt]}],"col-start-end":[{col:["auto",{span:["full",Wt,K]},K]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[zt]}],"row-start-end":[{row:["auto",{span:[Wt,K]},K]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",K]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",K]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",K,t]}],"min-w":[{"min-w":[K,t,"min","max","fit"]}],"max-w":[{"max-w":[K,t,"none","full","min","max","fit","prose",{screen:[Ge]},Ge]}],h:[{h:[K,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[K,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ge,Ke]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",mo]}],"font-family":[{font:[zt]}],"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",K]}],"line-clamp":[{"line-clamp":["none",Pt,mo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Be,K]}],"list-image":[{"list-image":["none",K]}],"list-style-type":[{list:["none","disc","decimal",K]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Be,Ke]}],"underline-offset":[{"underline-offset":["auto",Be,K]}],"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:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K]}],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",K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...R(),Af]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Pf]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Df]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:B()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[Be,K]}],"outline-w":[{outline:[Be,Ke]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Be,Ke]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ge,Of]}],"shadow-color":[{shadow:[zt]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Ge,K]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[h]}],saturate:[{saturate:[x]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",K]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",K]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",K]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Wt,K]}],"translate-x":[{"translate-x":[V]}],"translate-y":[{"translate-y":[V]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",K]}],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",K]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",K]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Be,Ke,mo]}],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"]}}});function _(...e){return Lf(ds(e))}const bs=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ws=ds,Rt=(e,t)=>r=>{var o;if(t?.variants==null)return ws(e,r?.class,r?.className);const{variants:n,defaultVariants:a}=t,s=Object.keys(n).map(u=>{const f=r?.[u],h=a?.[u];if(f===null)return null;const m=bs(f)||bs(h);return n[u][m]}),i=r&&Object.entries(r).reduce((u,f)=>{let[h,m]=f;return m===void 0||(u[h]=m),u},{}),d=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,f)=>{let{class:h,className:m,...p}=f;return Object.entries(p).every(w=>{let[g,v]=w;return Array.isArray(v)?v.includes({...a,...i}[g]):{...a,...i}[g]===v})?[...u,h,m]:u},[]);return ws(e,s,d,r?.class,r?.className)},vr=Rt("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all duration-200 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 active:scale-95",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 hover:shadow-md hover:-translate-y-0.5",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 hover:shadow-md",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground hover:border-primary/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 hover:shadow-sm",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:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Xe=c.forwardRef(({className:e,variant:t,size:r,asChild:o=!1,...n},a)=>{const s=o?Cd:"button";return l.jsx(s,{className:_(vr({variant:t,size:r,className:e})),ref:a,...n})});Xe.displayName="Button";const ys=tf,$f=rf,xs=of,vo=c.forwardRef(({className:e,...t},r)=>l.jsx(os,{className:_("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",e),...t,ref:r}));vo.displayName=os.displayName;const bo=c.forwardRef(({className:e,...t},r)=>l.jsxs(xs,{children:[l.jsx(vo,{}),l.jsx(ns,{ref:r,className:_("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));bo.displayName=ns.displayName;const wo=({className:e,...t})=>l.jsx("div",{className:_("flex flex-col space-y-2 text-center sm:text-left",e),...t});wo.displayName="AlertDialogHeader";const yo=({className:e,...t})=>l.jsx("div",{className:_("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});yo.displayName="AlertDialogFooter";const xo=c.forwardRef(({className:e,...t},r)=>l.jsx(is,{ref:r,className:_("text-lg font-semibold",e),...t}));xo.displayName=is.displayName;const Co=c.forwardRef(({className:e,...t},r)=>l.jsx(ls,{ref:r,className:_("text-sm text-muted-foreground",e),...t}));Co.displayName=ls.displayName;const So=c.forwardRef(({className:e,...t},r)=>l.jsx(as,{ref:r,className:_(vr(),e),...t}));So.displayName=as.displayName;const Eo=c.forwardRef(({className:e,...t},r)=>l.jsx(ss,{ref:r,className:_(vr({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Eo.displayName=ss.displayName;var No="Avatar",[Ff]=ve(No),Bf=[0,()=>{}],[Hf,Cs]=Ff(No),To=c.forwardRef((e,t)=>{const{__scopeAvatar:r,...o}=e,[n,a]=c.useState("idle"),[s,i]=Wf();return l.jsx(Hf,{scope:r,imageLoadingStatus:n,setImageLoadingStatus:a,imageCount:s,setImageCount:i,children:l.jsx(W.span,{...o,ref:t})})});To.displayName=No;var Ss="AvatarImage",Po=c.forwardRef((e,t)=>{const{__scopeAvatar:r,src:o,onLoadingStatusChange:n,...a}=e,s=Cs(Ss,r);zf(s.setImageCount);const i=Vf(o,{referrerPolicy:a.referrerPolicy,crossOrigin:a.crossOrigin,loadingStatus:s.imageLoadingStatus,setLoadingStatus:s.setImageLoadingStatus}),d=ue(f=>{n?.(f)}),u=c.useRef(i);return de(()=>{const f=u.current;u.current=i,i!==f&&d(i)},[i,d]),i==="loaded"?l.jsx(W.img,{...a,ref:t,src:o}):null});Po.displayName=Ss;var Es="AvatarFallback",Ao=c.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:o,...n}=e,a=Cs(Es,r),[s,i]=c.useState(o===void 0);return c.useEffect(()=>{if(o!==void 0){const d=window.setTimeout(()=>i(!0),o);return()=>window.clearTimeout(d)}},[o]),s&&a.imageLoadingStatus!=="loaded"?l.jsx(W.span,{...n,ref:t}):null});Ao.displayName=Es;function Vf(e,{loadingStatus:t,setLoadingStatus:r,referrerPolicy:o,crossOrigin:n}){return de(()=>{if(!e){r("error");return}const a=new window.Image,s=d=>{const u=d.currentTarget;r(Ns(u))},i=()=>r("error");return a.addEventListener("load",s),a.addEventListener("error",i),o&&(a.referrerPolicy=o),a.crossOrigin=n??null,a.src=e,r(Ns(a)),()=>{a.removeEventListener("load",s),a.removeEventListener("error",i),r("idle")}},[e,n,o,r]),t}function Ns(e){return e.complete?e.naturalWidth>0?"loaded":"error":"loading"}function Wf(){let e=Bf;{e=c.useState(0);const[t]=e,r=c.useRef(!1);c.useEffect(()=>{t>1&&!r.current&&(r.current=!0,console.warn("Avatar: Only one `Avatar.Image` component should be rendered per `Avatar.Root`, but multiple were detected. This will lead to unexpected behavior."))},[t])}return e}function zf(e){c.useEffect(()=>(e(t=>t+1),()=>{e(t=>t-1)}),[e])}const Ts=c.forwardRef(({className:e,...t},r)=>l.jsx(To,{ref:r,className:_("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ts.displayName=To.displayName;const Ps=c.forwardRef(({className:e,...t},r)=>l.jsx(Po,{ref:r,className:_("aspect-square h-full w-full",e),...t}));Ps.displayName=Po.displayName;const As=c.forwardRef(({className:e,...t},r)=>l.jsx(Ao,{ref:r,className:_("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));As.displayName=Ao.displayName;const ks=Rt("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),Ds=c.forwardRef(({className:e,variant:t,...r},o)=>l.jsx("div",{ref:o,className:_(ks({variant:t}),e),...r})),Os=c.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:_("rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200",e),...t}));Os.displayName="Card";const _s=c.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:_("flex flex-col space-y-1.5 p-6",e),...t}));_s.displayName="CardHeader";const Ms=c.forwardRef(({className:e,...t},r)=>l.jsx("h3",{ref:r,className:_("text-2xl font-semibold leading-none tracking-tight",e),...t}));Ms.displayName="CardTitle";const Is=c.forwardRef(({className:e,...t},r)=>l.jsx("p",{ref:r,className:_("text-sm text-muted-foreground",e),...t}));Is.displayName="CardDescription";const Ls=c.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:_("p-6 pt-0",e),...t}));Ls.displayName="CardContent";const $s=c.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:_("flex items-center p-6 pt-0",e),...t}));$s.displayName="CardFooter";function ko(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Do(e){const[t,r]=c.useState(void 0);return de(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const a=n[0];let s,i;if("borderBoxSize"in a){const d=a.borderBoxSize,u=Array.isArray(d)?d[0]:d;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),t}var br="Checkbox",[Rf]=ve(br),[Uf,Oo]=Rf(br);function jf(e){const{__scopeCheckbox:t,checked:r,children:o,defaultChecked:n,disabled:a,form:s,name:i,onCheckedChange:d,required:u,value:f="on",internal_do_not_use_render:h}=e,[m,p]=je({prop:r,defaultProp:n??!1,onChange:d,caller:br}),[w,g]=c.useState(null),[v,y]=c.useState(null),b=c.useRef(!1),x=w?!!s||!!w.closest("form"):!0,S={checked:m,disabled:a,setChecked:p,control:w,setControl:g,name:i,form:s,value:f,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:qe(n)?!1:n,isFormControl:x,bubbleInput:v,setBubbleInput:y};return l.jsx(Uf,{scope:t,...S,children:Yf(h)?h(S):o})}var Fs="CheckboxTrigger",Bs=c.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...o},n)=>{const{control:a,value:s,disabled:i,checked:d,required:u,setControl:f,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:p,bubbleInput:w}=Oo(Fs,e),g=q(n,f),v=c.useRef(d);return c.useEffect(()=>{const y=a?.form;if(y){const b=()=>h(v.current);return y.addEventListener("reset",b),()=>y.removeEventListener("reset",b)}},[a,h]),l.jsx(W.button,{type:"button",role:"checkbox","aria-checked":qe(d)?"mixed":d,"aria-required":u,"data-state":Rs(d),"data-disabled":i?"":void 0,disabled:i,value:s,...o,ref:g,onKeyDown:H(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:H(r,y=>{h(b=>qe(b)?!0:!b),w&&p&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})})});Bs.displayName=Fs;var _o=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:o,checked:n,defaultChecked:a,required:s,disabled:i,value:d,onCheckedChange:u,form:f,...h}=e;return l.jsx(jf,{__scopeCheckbox:r,checked:n,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:o,form:f,value:d,internal_do_not_use_render:({isFormControl:m})=>l.jsxs(l.Fragment,{children:[l.jsx(Bs,{...h,ref:t,__scopeCheckbox:r}),m&&l.jsx(zs,{__scopeCheckbox:r})]})})});_o.displayName=br;var Hs="CheckboxIndicator",Vs=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:o,...n}=e,a=Oo(Hs,r);return l.jsx(he,{present:o||qe(a.checked)||a.checked===!0,children:l.jsx(W.span,{"data-state":Rs(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});Vs.displayName=Hs;var Ws="CheckboxBubbleInput",zs=c.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:o,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:s,required:i,disabled:d,name:u,value:f,form:h,bubbleInput:m,setBubbleInput:p}=Oo(Ws,e),w=q(r,p),g=ko(a),v=Do(o);c.useEffect(()=>{const b=m;if(!b)return;const x=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(x,"checked").set,T=!n.current;if(g!==a&&E){const A=new Event("click",{bubbles:T});b.indeterminate=qe(a),E.call(b,qe(a)?!1:a),b.dispatchEvent(A)}},[m,g,a,n]);const y=c.useRef(qe(a)?!1:a);return l.jsx(W.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??y.current,required:i,disabled:d,name:u,value:f,form:h,...t,tabIndex:-1,ref:w,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});zs.displayName=Ws;function Yf(e){return typeof e=="function"}function qe(e){return e==="indeterminate"}function Rs(e){return qe(e)?"indeterminate":e?"checked":"unchecked"}const Kf=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Us=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim();var Gf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Xf=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:s,...i},d)=>C.createElement("svg",{ref:d,...Gf,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:Us("lucide",n),...i},[...s.map(([u,f])=>C.createElement(u,f)),...Array.isArray(a)?a:[a]]));const He=(e,t)=>{const r=C.forwardRef(({className:o,...n},a)=>C.createElement(Xf,{ref:a,iconNode:t,className:Us(`lucide-${Kf(e)}`,o),...n}));return r.displayName=`${e}`,r};const Mo=He("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Io=He("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const qf=He("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Zf=He("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const js=He("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const Qf=He("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const Jf=He("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);const ep=He("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);const Ut=He("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Lo=c.forwardRef(({className:e,...t},r)=>l.jsx(_o,{ref:r,className:_("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-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",e),...t,children:l.jsx(Vs,{className:_("flex items-center justify-center text-current"),children:l.jsx(Mo,{className:"h-4 w-4"})})}));Lo.displayName=_o.displayName;const Ys=pr,tp=hr,Ks=gr,rp=lt,$o=c.forwardRef(({className:e,...t},r)=>l.jsx(Ct,{ref:r,className:_("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",e),...t}));$o.displayName=Ct.displayName;const Fo=c.forwardRef(({className:e,children:t,...r},o)=>l.jsxs(Ks,{children:[l.jsx($o,{}),l.jsxs(Et,{ref:o,className:_("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,l.jsxs(lt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[l.jsx(Ut,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Fo.displayName=Et.displayName;const Bo=({className:e,...t})=>l.jsx("div",{className:_("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Bo.displayName="DialogHeader";const Ho=({className:e,...t})=>l.jsx("div",{className:_("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ho.displayName="DialogFooter";const Vo=c.forwardRef(({className:e,...t},r)=>l.jsx(Nt,{ref:r,className:_("text-lg font-semibold leading-none tracking-tight",e),...t}));Vo.displayName=Nt.displayName;const Wo=c.forwardRef(({className:e,...t},r)=>l.jsx(Tt,{ref:r,className:_("text-sm text-muted-foreground",e),...t}));Wo.displayName=Tt.displayName;const zo=c.forwardRef(({className:e,type:t,...r},o)=>l.jsx("input",{type:t,className:_("flex h-10 w-full rounded-md border border-input bg-white px-3 py-2 text-base ring-offset-background transition-all duration-200 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 focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:o,...r}));zo.displayName="Input";var op="Label",Gs=c.forwardRef((e,t)=>l.jsx(W.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Gs.displayName=op;var Xs=Gs;const np=Rt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),qs=c.forwardRef(({className:e,...t},r)=>l.jsx(Xs,{ref:r,className:_(np(),e),...t}));qs.displayName=Xs.displayName;const ap=["top","right","bottom","left"],Ze=Math.min,be=Math.max,wr=Math.round,yr=Math.floor,_e=e=>({x:e,y:e}),sp={left:"right",right:"left",bottom:"top",top:"bottom"};function Ro(e,t,r){return be(e,Ze(t,r))}function Ve(e,t){return typeof e=="function"?e(t):e}function We(e){return e.split("-")[0]}function kt(e){return e.split("-")[1]}function Uo(e){return e==="x"?"y":"x"}function jo(e){return e==="y"?"height":"width"}function Me(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Yo(e){return Uo(Me(e))}function ip(e,t,r){r===void 0&&(r=!1);const o=kt(e),n=Yo(e),a=jo(n);let s=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=xr(s)),[s,xr(s)]}function lp(e){const t=xr(e);return[Ko(e),t,Ko(t)]}function Ko(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Zs=["left","right"],Qs=["right","left"],cp=["top","bottom"],dp=["bottom","top"];function up(e,t,r){switch(e){case"top":case"bottom":return r?t?Qs:Zs:t?Zs:Qs;case"left":case"right":return t?cp:dp;default:return[]}}function fp(e,t,r,o){const n=kt(e);let a=up(We(e),r==="start",o);return n&&(a=a.map(s=>s+"-"+n),t&&(a=a.concat(a.map(Ko)))),a}function xr(e){const t=We(e);return sp[t]+e.slice(t.length)}function pp(e){return{top:0,right:0,bottom:0,left:0,...e}}function Js(e){return typeof e!="number"?pp(e):{top:e,right:e,bottom:e,left:e}}function Cr(e){const{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function ei(e,t,r){let{reference:o,floating:n}=e;const a=Me(t),s=Yo(t),i=jo(s),d=We(t),u=a==="y",f=o.x+o.width/2-n.width/2,h=o.y+o.height/2-n.height/2,m=o[i]/2-n[i]/2;let p;switch(d){case"top":p={x:f,y:o.y-n.height};break;case"bottom":p={x:f,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:h};break;case"left":p={x:o.x-n.width,y:h};break;default:p={x:o.x,y:o.y}}switch(kt(t)){case"start":p[s]-=m*(r&&u?-1:1);break;case"end":p[s]+=m*(r&&u?-1:1);break}return p}async function hp(e,t){var r;t===void 0&&(t={});const{x:o,y:n,platform:a,rects:s,elements:i,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:p=0}=Ve(t,e),w=Js(p),v=i[m?h==="floating"?"reference":"floating":h],y=Cr(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(v)))==null||r?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:d})),b=h==="floating"?{x:o,y:n,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),S=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Cr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:x,strategy:d}):b);return{top:(y.top-E.top+w.top)/S.y,bottom:(E.bottom-y.bottom+w.bottom)/S.y,left:(y.left-E.left+w.left)/S.x,right:(E.right-y.right+w.right)/S.x}}const gp=50,mp=async(e,t,r)=>{const{placement:o="bottom",strategy:n="absolute",middleware:a=[],platform:s}=r,i=s.detectOverflow?s:{...s,detectOverflow:hp},d=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:f,y:h}=ei(u,o,d),m=o,p=0;const w={};for(let g=0;g<a.length;g++){const v=a[g];if(!v)continue;const{name:y,fn:b}=v,{x,y:S,data:E,reset:T}=await b({x:f,y:h,initialPlacement:o,placement:m,strategy:n,middlewareData:w,rects:u,platform:i,elements:{reference:e,floating:t}});f=x??f,h=S??h,w[y]={...w[y],...E},T&&p<gp&&(p++,typeof T=="object"&&(T.placement&&(m=T.placement),T.rects&&(u=T.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):T.rects),{x:f,y:h}=ei(u,m,d)),g=-1)}return{x:f,y:h,placement:m,strategy:n,middlewareData:w}},vp=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:o,placement:n,rects:a,platform:s,elements:i,middlewareData:d}=t,{element:u,padding:f=0}=Ve(e,t)||{};if(u==null)return{};const h=Js(f),m={x:r,y:o},p=Yo(n),w=jo(p),g=await s.getDimensions(u),v=p==="y",y=v?"top":"left",b=v?"bottom":"right",x=v?"clientHeight":"clientWidth",S=a.reference[w]+a.reference[p]-m[p]-a.floating[w],E=m[p]-a.reference[p],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let A=T?T[x]:0;(!A||!await(s.isElement==null?void 0:s.isElement(T)))&&(A=i.floating[x]||a.floating[w]);const V=S/2-E/2,D=A/2-g[w]/2-1,F=Ze(h[y],D),$=Ze(h[b],D),P=F,Y=A-g[w]-$,k=A/2-g[w]/2+V,R=Ro(P,k,Y),B=!d.arrow&&kt(n)!=null&&k!==R&&a.reference[w]/2-(k<P?F:$)-g[w]/2<0,z=B?k<P?k-P:k-Y:0;return{[p]:m[p]+z,data:{[p]:R,centerOffset:k-R-z,...B&&{alignmentOffset:z}},reset:B}}}),bp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:n,middlewareData:a,rects:s,initialPlacement:i,platform:d,elements:u}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:g=!0,...v}=Ve(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=We(n),b=Me(i),x=We(i)===i,S=await(d.isRTL==null?void 0:d.isRTL(u.floating)),E=m||(x||!g?[xr(i)]:lp(i)),T=w!=="none";!m&&T&&E.push(...fp(i,g,w,S));const A=[i,...E],V=await d.detectOverflow(t,v),D=[];let F=((o=a.flip)==null?void 0:o.overflows)||[];if(f&&D.push(V[y]),h){const k=ip(n,s,S);D.push(V[k[0]],V[k[1]])}if(F=[...F,{placement:n,overflows:D}],!D.every(k=>k<=0)){var $,P;const k=((($=a.flip)==null?void 0:$.index)||0)+1,R=A[k];if(R&&(!(h==="alignment"?b!==Me(R):!1)||F.every(L=>Me(L.placement)===b?L.overflows[0]>0:!0)))return{data:{index:k,overflows:F},reset:{placement:R}};let B=(P=F.filter(z=>z.overflows[0]<=0).sort((z,L)=>z.overflows[1]-L.overflows[1])[0])==null?void 0:P.placement;if(!B)switch(p){case"bestFit":{var Y;const z=(Y=F.filter(L=>{if(T){const M=Me(L.placement);return M===b||M==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(M=>M>0).reduce((M,G)=>M+G,0)]).sort((L,M)=>L[1]-M[1])[0])==null?void 0:Y[0];z&&(B=z);break}case"initialPlacement":B=i;break}if(n!==B)return{reset:{placement:B}}}return{}}}};function ti(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ri(e){return ap.some(t=>e[t]>=0)}const wp=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:o}=t,{strategy:n="referenceHidden",...a}=Ve(e,t);switch(n){case"referenceHidden":{const s=await o.detectOverflow(t,{...a,elementContext:"reference"}),i=ti(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ri(i)}}}case"escaped":{const s=await o.detectOverflow(t,{...a,altBoundary:!0}),i=ti(s,r.floating);return{data:{escapedOffsets:i,escaped:ri(i)}}}default:return{}}}}},oi=new Set(["left","top"]);async function yp(e,t){const{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),s=We(r),i=kt(r),d=Me(r)==="y",u=oi.has(s)?-1:1,f=a&&d?-1:1,h=Ve(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return i&&typeof w=="number"&&(p=i==="end"?w*-1:w),d?{x:p*f,y:m*u}:{x:m*u,y:p*f}}const xp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;const{x:n,y:a,placement:s,middlewareData:i}=t,d=await yp(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(o=i.arrow)!=null&&o.alignmentOffset?{}:{x:n+d.x,y:a+d.y,data:{...d,placement:s}}}}},Cp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:n,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:d={fn:y=>{let{x:b,y:x}=y;return{x:b,y:x}}},...u}=Ve(e,t),f={x:r,y:o},h=await a.detectOverflow(t,u),m=Me(We(n)),p=Uo(m);let w=f[p],g=f[m];if(s){const y=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=w+h[y],S=w-h[b];w=Ro(x,w,S)}if(i){const y=m==="y"?"top":"left",b=m==="y"?"bottom":"right",x=g+h[y],S=g-h[b];g=Ro(x,g,S)}const v=d.fn({...t,[p]:w,[m]:g});return{...v,data:{x:v.x-r,y:v.y-o,enabled:{[p]:s,[m]:i}}}}}},Sp=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:o,placement:n,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:d=!0,crossAxis:u=!0}=Ve(e,t),f={x:r,y:o},h=Me(n),m=Uo(h);let p=f[m],w=f[h];const g=Ve(i,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(d){const x=m==="y"?"height":"width",S=a.reference[m]-a.floating[x]+v.mainAxis,E=a.reference[m]+a.reference[x]-v.mainAxis;p<S?p=S:p>E&&(p=E)}if(u){var y,b;const x=m==="y"?"width":"height",S=oi.has(We(n)),E=a.reference[h]-a.floating[x]+(S&&((y=s.offset)==null?void 0:y[h])||0)+(S?0:v.crossAxis),T=a.reference[h]+a.reference[x]+(S?0:((b=s.offset)==null?void 0:b[h])||0)-(S?v.crossAxis:0);w<E?w=E:w>T&&(w=T)}return{[m]:p,[h]:w}}}},Ep=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;const{placement:n,rects:a,platform:s,elements:i}=t,{apply:d=()=>{},...u}=Ve(e,t),f=await s.detectOverflow(t,u),h=We(n),m=kt(n),p=Me(n)==="y",{width:w,height:g}=a.floating;let v,y;h==="top"||h==="bottom"?(v=h,y=m===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=h,v=m==="end"?"top":"bottom");const b=g-f.top-f.bottom,x=w-f.left-f.right,S=Ze(g-f[v],b),E=Ze(w-f[y],x),T=!t.middlewareData.shift;let A=S,V=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(V=x),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(A=b),T&&!m){const F=be(f.left,0),$=be(f.right,0),P=be(f.top,0),Y=be(f.bottom,0);p?V=w-2*(F!==0||$!==0?F+$:be(f.left,f.right)):A=g-2*(P!==0||Y!==0?P+Y:be(f.top,f.bottom))}await d({...t,availableWidth:V,availableHeight:A});const D=await s.getDimensions(i.floating);return w!==D.width||g!==D.height?{reset:{rects:!0}}:{}}}};function Sr(){return typeof window<"u"}function Dt(e){return ni(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ie(e){var t;return(t=(ni(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ni(e){return Sr()?e instanceof Node||e instanceof we(e).Node:!1}function Se(e){return Sr()?e instanceof Element||e instanceof we(e).Element:!1}function ze(e){return Sr()?e instanceof HTMLElement||e instanceof we(e).HTMLElement:!1}function ai(e){return!Sr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}function jt(e){const{overflow:t,overflowX:r,overflowY:o,display:n}=Ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&n!=="inline"&&n!=="contents"}function Np(e){return/^(table|td|th)$/.test(Dt(e))}function Er(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Tp=/transform|translate|scale|rotate|perspective|filter/,Pp=/paint|layout|strict|content/,ct=e=>!!e&&e!=="none";let Go;function Xo(e){const t=Se(e)?Ee(e):e;return ct(t.transform)||ct(t.translate)||ct(t.scale)||ct(t.rotate)||ct(t.perspective)||!qo()&&(ct(t.backdropFilter)||ct(t.filter))||Tp.test(t.willChange||"")||Pp.test(t.contain||"")}function Ap(e){let t=Qe(e);for(;ze(t)&&!Ot(t);){if(Xo(t))return t;if(Er(t))return null;t=Qe(t)}return null}function qo(){return Go==null&&(Go=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Go}function Ot(e){return/^(html|body|#document)$/.test(Dt(e))}function Ee(e){return we(e).getComputedStyle(e)}function Nr(e){return Se(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qe(e){if(Dt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ai(e)&&e.host||Ie(e);return ai(t)?t.host:t}function si(e){const t=Qe(e);return Ot(t)?e.ownerDocument?e.ownerDocument.body:e.body:ze(t)&&jt(t)?t:si(t)}function Yt(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);const n=si(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),s=we(n);if(a){const i=Zo(s);return t.concat(s,s.visualViewport||[],jt(n)?n:[],i&&r?Yt(i):[])}else return t.concat(n,Yt(n,[],r))}function Zo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ii(e){const t=Ee(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const n=ze(e),a=n?e.offsetWidth:r,s=n?e.offsetHeight:o,i=wr(r)!==a||wr(o)!==s;return i&&(r=a,o=s),{width:r,height:o,$:i}}function Qo(e){return Se(e)?e:e.contextElement}function _t(e){const t=Qo(e);if(!ze(t))return _e(1);const r=t.getBoundingClientRect(),{width:o,height:n,$:a}=ii(t);let s=(a?wr(r.width):r.width)/o,i=(a?wr(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const kp=_e(0);function li(e){const t=we(e);return!qo()||!t.visualViewport?kp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Dp(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==we(e)?!1:t}function dt(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=Qo(e);let s=_e(1);t&&(o?Se(o)&&(s=_t(o)):s=_t(e));const i=Dp(a,r,o)?li(a):_e(0);let d=(n.left+i.x)/s.x,u=(n.top+i.y)/s.y,f=n.width/s.x,h=n.height/s.y;if(a){const m=we(a),p=o&&Se(o)?we(o):o;let w=m,g=Zo(w);for(;g&&o&&p!==w;){const v=_t(g),y=g.getBoundingClientRect(),b=Ee(g),x=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*v.x,S=y.top+(g.clientTop+parseFloat(b.paddingTop))*v.y;d*=v.x,u*=v.y,f*=v.x,h*=v.y,d+=x,u+=S,w=we(g),g=Zo(w)}}return Cr({width:f,height:h,x:d,y:u})}function Tr(e,t){const r=Nr(e).scrollLeft;return t?t.left+r:dt(Ie(e)).left+r}function ci(e,t){const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-Tr(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function Op(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e;const a=n==="fixed",s=Ie(o),i=t?Er(t.floating):!1;if(o===s||i&&a)return r;let d={scrollLeft:0,scrollTop:0},u=_e(1);const f=_e(0),h=ze(o);if((h||!h&&!a)&&((Dt(o)!=="body"||jt(s))&&(d=Nr(o)),h)){const p=dt(o);u=_t(o),f.x=p.x+o.clientLeft,f.y=p.y+o.clientTop}const m=s&&!h&&!a?ci(s,d):_e(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-d.scrollLeft*u.x+f.x+m.x,y:r.y*u.y-d.scrollTop*u.y+f.y+m.y}}function _p(e){return Array.from(e.getClientRects())}function Mp(e){const t=Ie(e),r=Nr(e),o=e.ownerDocument.body,n=be(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=be(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-r.scrollLeft+Tr(e);const i=-r.scrollTop;return Ee(o).direction==="rtl"&&(s+=be(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:s,y:i}}const di=25;function Ip(e,t){const r=we(e),o=Ie(e),n=r.visualViewport;let a=o.clientWidth,s=o.clientHeight,i=0,d=0;if(n){a=n.width,s=n.height;const f=qo();(!f||f&&t==="fixed")&&(i=n.offsetLeft,d=n.offsetTop)}const u=Tr(o);if(u<=0){const f=o.ownerDocument,h=f.body,m=getComputedStyle(h),p=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,w=Math.abs(o.clientWidth-h.clientWidth-p);w<=di&&(a-=w)}else u<=di&&(a+=u);return{width:a,height:s,x:i,y:d}}function Lp(e,t){const r=dt(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=ze(e)?_t(e):_e(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,d=n*a.x,u=o*a.y;return{width:s,height:i,x:d,y:u}}function ui(e,t,r){let o;if(t==="viewport")o=Ip(e,r);else if(t==="document")o=Mp(Ie(e));else if(Se(t))o=Lp(t,r);else{const n=li(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Cr(o)}function fi(e,t){const r=Qe(e);return r===t||!Se(r)||Ot(r)?!1:Ee(r).position==="fixed"||fi(r,t)}function $p(e,t){const r=t.get(e);if(r)return r;let o=Yt(e,[],!1).filter(i=>Se(i)&&Dt(i)!=="body"),n=null;const a=Ee(e).position==="fixed";let s=a?Qe(e):e;for(;Se(s)&&!Ot(s);){const i=Ee(s),d=Xo(s);!d&&i.position==="fixed"&&(n=null),(a?!d&&!n:!d&&i.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||jt(s)&&!d&&fi(e,s))?o=o.filter(f=>f!==s):n=i,s=Qe(s)}return t.set(e,o),o}function Fp(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e;const s=[...r==="clippingAncestors"?Er(t)?[]:$p(t,this._c):[].concat(r),o],i=ui(t,s[0],n);let d=i.top,u=i.right,f=i.bottom,h=i.left;for(let m=1;m<s.length;m++){const p=ui(t,s[m],n);d=be(p.top,d),u=Ze(p.right,u),f=Ze(p.bottom,f),h=be(p.left,h)}return{width:u-h,height:f-d,x:h,y:d}}function Bp(e){const{width:t,height:r}=ii(e);return{width:t,height:r}}function Hp(e,t,r){const o=ze(t),n=Ie(t),a=r==="fixed",s=dt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const d=_e(0);function u(){d.x=Tr(n)}if(o||!o&&!a)if((Dt(t)!=="body"||jt(n))&&(i=Nr(t)),o){const p=dt(t,!0,a,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else n&&u();a&&!o&&n&&u();const f=n&&!o&&!a?ci(n,i):_e(0),h=s.left+i.scrollLeft-d.x-f.x,m=s.top+i.scrollTop-d.y-f.y;return{x:h,y:m,width:s.width,height:s.height}}function Jo(e){return Ee(e).position==="static"}function pi(e,t){if(!ze(e)||Ee(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ie(e)===r&&(r=r.ownerDocument.body),r}function hi(e,t){const r=we(e);if(Er(e))return r;if(!ze(e)){let n=Qe(e);for(;n&&!Ot(n);){if(Se(n)&&!Jo(n))return n;n=Qe(n)}return r}let o=pi(e,t);for(;o&&Np(o)&&Jo(o);)o=pi(o,t);return o&&Ot(o)&&Jo(o)&&!Xo(o)?r:o||Ap(e)||r}const Vp=async function(e){const t=this.getOffsetParent||hi,r=this.getDimensions,o=await r(e.floating);return{reference:Hp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Wp(e){return Ee(e).direction==="rtl"}const zp={convertOffsetParentRelativeRectToViewportRelativeRect:Op,getDocumentElement:Ie,getClippingRect:Fp,getOffsetParent:hi,getElementRects:Vp,getClientRects:_p,getDimensions:Bp,getScale:_t,isElement:Se,isRTL:Wp};function gi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Rp(e,t){let r=null,o;const n=Ie(e);function a(){var i;clearTimeout(o),(i=r)==null||i.disconnect(),r=null}function s(i,d){i===void 0&&(i=!1),d===void 0&&(d=1),a();const u=e.getBoundingClientRect(),{left:f,top:h,width:m,height:p}=u;if(i||t(),!m||!p)return;const w=yr(h),g=yr(n.clientWidth-(f+m)),v=yr(n.clientHeight-(h+p)),y=yr(f),x={rootMargin:-w+"px "+-g+"px "+-v+"px "+-y+"px",threshold:be(0,Ze(1,d))||1};let S=!0;function E(T){const A=T[0].intersectionRatio;if(A!==d){if(!S)return s();A?s(!1,A):o=setTimeout(()=>{s(!1,1e-7)},1e3)}A===1&&!gi(u,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(E,{...x,root:n.ownerDocument})}catch{r=new IntersectionObserver(E,x)}r.observe(e)}return s(!0),a}function Up(e,t,r,o){o===void 0&&(o={});const{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,u=Qo(e),f=n||a?[...u?Yt(u):[],...t?Yt(t):[]]:[];f.forEach(y=>{n&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const h=u&&i?Rp(u,r):null;let m=-1,p=null;s&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),r()}),u&&!d&&p.observe(u),t&&p.observe(t));let w,g=d?dt(e):null;d&&v();function v(){const y=dt(e);g&&!gi(g,y)&&r(),g=y,w=requestAnimationFrame(v)}return r(),()=>{var y;f.forEach(b=>{n&&b.removeEventListener("scroll",r),a&&b.removeEventListener("resize",r)}),h?.(),(y=p)==null||y.disconnect(),p=null,d&&cancelAnimationFrame(w)}}const jp=xp,Yp=Cp,Kp=bp,Gp=Ep,Xp=wp,mi=vp,qp=Sp,Zp=(e,t,r)=>{const o=new Map,n={platform:zp,...r},a={...n.platform,_c:o};return mp(e,t,{...n,platform:a})};var Qp=typeof document<"u",Jp=function(){},Pr=Qp?C.useLayoutEffect:Jp;function Ar(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!Ar(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;o--!==0;){const a=n[o];if(!(a==="_owner"&&e.$$typeof)&&!Ar(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function vi(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bi(e,t){const r=vi(e);return Math.round(t*r)/r}function en(e){const t=c.useRef(e);return Pr(()=>{t.current=e}),t}function eh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:d,open:u}=e,[f,h]=c.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=c.useState(o);Ar(m,o)||p(o);const[w,g]=c.useState(null),[v,y]=c.useState(null),b=c.useCallback(L=>{L!==T.current&&(T.current=L,g(L))},[]),x=c.useCallback(L=>{L!==A.current&&(A.current=L,y(L))},[]),S=a||w,E=s||v,T=c.useRef(null),A=c.useRef(null),V=c.useRef(f),D=d!=null,F=en(d),$=en(n),P=en(u),Y=c.useCallback(()=>{if(!T.current||!A.current)return;const L={placement:t,strategy:r,middleware:m};$.current&&(L.platform=$.current),Zp(T.current,A.current,L).then(M=>{const G={...M,isPositioned:P.current!==!1};k.current&&!Ar(V.current,G)&&(V.current=G,ht.flushSync(()=>{h(G)}))})},[m,t,r,$,P]);Pr(()=>{u===!1&&V.current.isPositioned&&(V.current.isPositioned=!1,h(L=>({...L,isPositioned:!1})))},[u]);const k=c.useRef(!1);Pr(()=>(k.current=!0,()=>{k.current=!1}),[]),Pr(()=>{if(S&&(T.current=S),E&&(A.current=E),S&&E){if(F.current)return F.current(S,E,Y);Y()}},[S,E,Y,F,D]);const R=c.useMemo(()=>({reference:T,floating:A,setReference:b,setFloating:x}),[b,x]),B=c.useMemo(()=>({reference:S,floating:E}),[S,E]),z=c.useMemo(()=>{const L={position:r,left:0,top:0};if(!B.floating)return L;const M=bi(B.floating,f.x),G=bi(B.floating,f.y);return i?{...L,transform:"translate("+M+"px, "+G+"px)",...vi(B.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:G}},[r,i,B.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:Y,refs:R,elements:B,floatingStyles:z}),[f,Y,R,B,z])}const th=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:o,padding:n}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?mi({element:o.current,padding:n}).fn(r):{}:o?mi({element:o,padding:n}).fn(r):{}}}},rh=(e,t)=>{const r=jp(e);return{name:r.name,fn:r.fn,options:[e,t]}},oh=(e,t)=>{const r=Yp(e);return{name:r.name,fn:r.fn,options:[e,t]}},nh=(e,t)=>({fn:qp(e).fn,options:[e,t]}),ah=(e,t)=>{const r=Kp(e);return{name:r.name,fn:r.fn,options:[e,t]}},sh=(e,t)=>{const r=Gp(e);return{name:r.name,fn:r.fn,options:[e,t]}},ih=(e,t)=>{const r=Xp(e);return{name:r.name,fn:r.fn,options:[e,t]}},lh=(e,t)=>{const r=th(e);return{name:r.name,fn:r.fn,options:[e,t]}};var ch="Arrow",wi=c.forwardRef((e,t)=>{const{children:r,width:o=10,height:n=5,...a}=e;return l.jsx(W.svg,{...a,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});wi.displayName=ch;var dh=wi,tn="Popper",[yi,Mt]=ve(tn),[uh,xi]=yi(tn),Ci=e=>{const{__scopePopper:t,children:r}=e,[o,n]=c.useState(null),[a,s]=c.useState(void 0);return l.jsx(uh,{scope:t,anchor:o,onAnchorChange:n,placementState:a,setPlacementState:s,children:r})};Ci.displayName=tn;var Si="PopperAnchor",Ei=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:o,...n}=e,a=xi(Si,r),s=c.useRef(null),i=a.onAnchorChange,d=c.useCallback(w=>{s.current=w,w&&i(w)},[i]),u=q(t,d),f=c.useRef(null);c.useEffect(()=>{if(!o)return;const w=f.current;f.current=o.current,w!==f.current&&i(f.current)});const h=a.placementState&&on(a.placementState),m=h?.[0],p=h?.[1];return o?null:l.jsx(W.div,{"data-radix-popper-side":m,"data-radix-popper-align":p,...n,ref:u})});Ei.displayName=Si;var rn="PopperContent",[fh,ph]=yi(rn),Ni=c.forwardRef((e,t)=>{const{__scopePopper:r,side:o="bottom",sideOffset:n=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:w,...g}=e,v=xi(rn,r),[y,b]=c.useState(null),x=q(t,Z=>b(Z)),[S,E]=c.useState(null),T=Do(S),A=T?.width??0,V=T?.height??0,D=o+(a!=="center"?"-"+a:""),F=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(u)?u:[u],P=$.length>0,Y={padding:F,boundary:$.filter(gh),altBoundary:P},{refs:k,floatingStyles:R,placement:B,isPositioned:z,middlewareData:L}=eh({strategy:"fixed",placement:D,whileElementsMounted:(...Z)=>Up(...Z,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[rh({mainAxis:n+V,alignmentAxis:s}),d&&oh({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?nh():void 0,...Y}),d&&ah({...Y}),sh({...Y,apply:({elements:Z,rects:ie,availableWidth:J,availableHeight:ee})=>{const{width:ae,height:me}=ie.reference,pe=Z.floating.style;pe.setProperty("--radix-popper-available-width",`${J}px`),pe.setProperty("--radix-popper-available-height",`${ee}px`),pe.setProperty("--radix-popper-anchor-width",`${ae}px`),pe.setProperty("--radix-popper-anchor-height",`${me}px`)}}),S&&lh({element:S,padding:i}),mh({arrowWidth:A,arrowHeight:V}),m&&ih({strategy:"referenceHidden",...Y,boundary:P?Y.boundary:void 0})]}),M=v.setPlacementState;de(()=>(M(B),()=>{M(void 0)}),[B,M]);const[G,te]=on(B),U=ue(w);de(()=>{z&&U?.()},[z,U]);const X=L.arrow?.x,Q=L.arrow?.y,oe=L.arrow?.centerOffset!==0,[fe,I]=c.useState();return de(()=>{y&&I(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:z?R.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(fh,{scope:r,placedSide:G,placedAlign:te,onArrowChange:E,arrowX:X,arrowY:Q,shouldHideArrow:oe,children:l.jsx(W.div,{"data-side":G,"data-align":te,...g,ref:x,style:{...g.style,animation:z?void 0:"none"}})})})});Ni.displayName=rn;var Ti="PopperArrow",hh={top:"bottom",right:"left",bottom:"top",left:"right"},Pi=c.forwardRef(function(t,r){const{__scopePopper:o,...n}=t,a=ph(Ti,o),s=hh[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(dh,{...n,ref:r,style:{...n.style,display:"block"}})})});Pi.displayName=Ti;function gh(e){return e!==null}var mh=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:o,middlewareData:n}=t,s=n.arrow?.centerOffset!==0,i=s?0:e.arrowWidth,d=s?0:e.arrowHeight,[u,f]=on(r),h={start:"0%",center:"50%",end:"100%"}[f],m=(n.arrow?.x??0)+i/2,p=(n.arrow?.y??0)+d/2;let w="",g="";return u==="bottom"?(w=s?h:`${m}px`,g=`${-d}px`):u==="top"?(w=s?h:`${m}px`,g=`${o.floating.height+d}px`):u==="right"?(w=`${-d}px`,g=s?h:`${p}px`):u==="left"&&(w=`${o.floating.width+d}px`,g=s?h:`${p}px`),{data:{x:w,y:g}}}});function on(e){const[t,r="center"]=e.split("-");return[t,r]}var nn=Ci,kr=Ei,an=Ni,sn=Pi,Dr="Popover",[Ai]=ve(Dr,[Mt]),Kt=Mt(),[vh,Je]=Ai(Dr),ki=e=>{const{__scopePopover:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:s=!1}=e,i=Kt(t),d=c.useRef(null),[u,f]=c.useState(!1),[h,m]=je({prop:o,defaultProp:n??!1,onChange:a,caller:Dr});return l.jsx(nn,{...i,children:l.jsx(vh,{scope:t,contentId:Ue(),triggerRef:d,open:h,onOpenChange:m,onOpenToggle:c.useCallback(()=>m(p=>!p),[m]),hasCustomAnchor:u,onCustomAnchorAdd:c.useCallback(()=>f(!0),[]),onCustomAnchorRemove:c.useCallback(()=>f(!1),[]),modal:s,children:r})})};ki.displayName=Dr;var Di="PopoverAnchor",bh=c.forwardRef((e,t)=>{const{__scopePopover:r,...o}=e,n=Je(Di,r),a=Kt(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=n;return c.useEffect(()=>(s(),()=>i()),[s,i]),l.jsx(kr,{...a,...o,ref:t})});bh.displayName=Di;var Oi="PopoverTrigger",_i=c.forwardRef((e,t)=>{const{__scopePopover:r,...o}=e,n=Je(Oi,r),a=Kt(r),s=q(t,n.triggerRef),i=l.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.open?n.contentId:void 0,"data-state":Fi(n.open),...o,ref:s,onClick:H(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?i:l.jsx(kr,{asChild:!0,...a,children:i})});_i.displayName=Oi;var ln="PopoverPortal",[wh,yh]=Ai(ln,{forceMount:void 0}),Mi=e=>{const{__scopePopover:t,forceMount:r,children:o,container:n}=e,a=Je(ln,t);return l.jsx(wh,{scope:t,forceMount:r,children:l.jsx(he,{present:r||a.open,children:l.jsx(Vt,{asChild:!0,container:n,children:o})})})};Mi.displayName=ln;var It="PopoverContent",Ii=c.forwardRef((e,t)=>{const r=yh(It,e.__scopePopover),{forceMount:o=r.forceMount,...n}=e,a=Je(It,e.__scopePopover);return l.jsx(he,{present:o||a.open,children:a.modal?l.jsx(Ch,{...n,ref:t}):l.jsx(Sh,{...n,ref:t})})});Ii.displayName=It;var xh=it("PopoverContent.RemoveScroll"),Ch=c.forwardRef((e,t)=>{const r=Je(It,e.__scopePopover),o=c.useRef(null),n=q(t,o),a=c.useRef(!1);return c.useEffect(()=>{const s=o.current;if(s)return uo(s)},[]),l.jsx(cr,{as:xh,allowPinchZoom:!0,children:l.jsx(Li,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:H(e.onCloseAutoFocus,s=>{s.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:H(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,d=i.button===0&&i.ctrlKey===!0,u=i.button===2||d;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:H(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Sh=c.forwardRef((e,t)=>{const r=Je(It,e.__scopePopover),o=c.useRef(!1),n=c.useRef(!1);return l.jsx(Li,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||r.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const s=a.target;r.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),Li=c.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:f,...h}=e,m=Je(It,r),p=Kt(r);return no(),l.jsx(tr,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:l.jsx(mt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:u,onDismiss:()=>m.onOpenChange(!1),deferPointerDownOutside:!0,children:l.jsx(an,{"data-state":Fi(m.open),role:"dialog",id:m.contentId,...p,...h,ref:t,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),$i="PopoverClose",Eh=c.forwardRef((e,t)=>{const{__scopePopover:r,...o}=e,n=Je($i,r);return l.jsx(W.button,{type:"button",...o,ref:t,onClick:H(e.onClick,()=>n.onOpenChange(!1))})});Eh.displayName=$i;var Nh="PopoverArrow",Th=c.forwardRef((e,t)=>{const{__scopePopover:r,...o}=e,n=Kt(r);return l.jsx(sn,{...n,...o,ref:t})});Th.displayName=Nh;function Fi(e){return e?"open":"closed"}var Ph=ki,Ah=_i,kh=Mi,Bi=Ii;const Hi=Ph,Vi=Ah,cn=c.forwardRef(({className:e,align:t="start",sideOffset:r=4,...o},n)=>l.jsx(kh,{children:l.jsx(Bi,{ref:n,align:t,sideOffset:r,className:_("z-50 w-[var(--radix-popover-trigger-width)] rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none 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",e),...o})}));cn.displayName=Bi.displayName;function Dh({options:e,value:t,onValueChange:r,placeholder:o="Select options"}){const[n,a]=C.useState(!1),s=e.filter(u=>t.includes(u.value)),i=u=>{t.includes(u)?r(t.filter(f=>f!==u)):r([...t,u])},d=(u,f)=>{f.stopPropagation(),r(t.filter(h=>h!==u))};return l.jsxs(Hi,{open:n,onOpenChange:a,children:[l.jsx(Vi,{asChild:!0,children:l.jsxs("button",{type:"button",className:_("flex min-h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background transition-all duration-200 hover:border-primary/50 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:border-primary disabled:cursor-not-allowed disabled:opacity-50",!s.length&&"text-muted-foreground"),children:[l.jsx("div",{className:"flex flex-wrap gap-1 flex-1",children:s.length>0?s.map(u=>l.jsxs(Ds,{variant:"secondary",className:"gap-1 pr-1",children:[u.label,l.jsx("span",{role:"button",tabIndex:0,className:"rounded-full hover:bg-muted-foreground/20 p-0.5",onClick:f=>d(u.value,f),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&d(u.value,f)},children:l.jsx(Ut,{className:"h-3 w-3"})})]},u.value)):l.jsx("span",{children:o})}),l.jsx(Io,{className:"h-4 w-4 shrink-0 opacity-50 ml-2"})]})}),l.jsx(cn,{className:"max-h-60 overflow-y-auto p-1",children:e.length===0?l.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:"No options available"}):e.map(u=>{const f=t.includes(u.value);return l.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-all duration-150 hover:bg-accent/50 focus:bg-accent focus:text-accent-foreground",onClick:()=>i(u.value),children:[l.jsx(Lo,{checked:f,tabIndex:-1}),u.label]},u.value)})})]})}var dn="Progress",un=100,[Oh]=ve(dn),[_h,Mh]=Oh(dn),Wi=c.forwardRef((e,t)=>{const{__scopeProgress:r,value:o=null,max:n,getValueLabel:a=Ih,...s}=e;(n||n===0)&&!ji(n)&&console.error(Lh(`${n}`,"Progress"));const i=ji(n)?n:un;o!==null&&!Yi(o,i)&&console.error($h(`${o}`,"Progress"));const d=Yi(o,i)?o:null,u=Or(d)?a(d,i):void 0;return l.jsx(_h,{scope:r,value:d,max:i,children:l.jsx(W.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Or(d)?d:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ui(d,i),"data-value":d??void 0,"data-max":i,...s,ref:t})})});Wi.displayName=dn;var zi="ProgressIndicator",Ri=c.forwardRef((e,t)=>{const{__scopeProgress:r,...o}=e,n=Mh(zi,r);return l.jsx(W.div,{"data-state":Ui(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...o,ref:t})});Ri.displayName=zi;function Ih(e,t){return`${Math.round(e/t*100)}%`}function Ui(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Or(e){return typeof e=="number"}function ji(e){return Or(e)&&!isNaN(e)&&e>0}function Yi(e,t){return Or(e)&&!isNaN(e)&&e<=t&&e>=0}function Lh(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${un}\`.`}function $h(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
42
42
|
- a positive number
|
|
43
|
-
- less than the value passed to \`max\` (or ${
|
|
43
|
+
- less than the value passed to \`max\` (or ${un} if no \`max\` prop is set)
|
|
44
44
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
45
45
|
|
|
46
|
-
Defaulting to \`null\`.`}var zi=$i,Ih=Bi;const Wi=l.forwardRef(({className:e,value:t,...o},r)=>c.jsx(zi,{ref:r,className:D("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...o,children:c.jsx(Ih,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Wi.displayName=zi.displayName;var Mh=l.createContext(void 0);function Ui(e){const t=l.useContext(Mh);return e||t||"ltr"}function sn(e,[t,o]){return Math.min(o,Math.max(t,e))}function Lh(e,t){return l.useReducer((o,r)=>t[o][r]??o,e)}var ln="ScrollArea",[ji]=pe(ln),[$h,me]=ji(ln),Yi=l.forwardRef((e,t)=>{const{__scopeScrollArea:o,type:r="hover",dir:n,scrollHideDelay:a=600,...s}=e,[i,d]=l.useState(null),[u,f]=l.useState(null),[h,m]=l.useState(null),[p,w]=l.useState(null),[g,v]=l.useState(null),[y,b]=l.useState(0),[x,S]=l.useState(0),[T,P]=l.useState(!1),[A,B]=l.useState(!1),k=K(t,L=>d(L)),M=Ui(n);return c.jsx($h,{scope:o,type:r,dir:M,scrollHideDelay:a,scrollArea:i,viewport:u,onViewportChange:f,content:h,onContentChange:m,scrollbarX:p,onScrollbarXChange:w,scrollbarXEnabled:T,onScrollbarXEnabledChange:P,scrollbarY:g,onScrollbarYChange:v,scrollbarYEnabled:A,onScrollbarYEnabledChange:B,onCornerWidthChange:b,onCornerHeightChange:S,children:c.jsx(H.div,{dir:M,...s,ref:k,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});Yi.displayName=ln;var Ki="ScrollAreaViewport",Gi=l.forwardRef((e,t)=>{const{__scopeScrollArea:o,children:r,nonce:n,...a}=e,s=me(Ki,o),i=l.useRef(null),d=K(t,i,s.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx(Fh,{nonce:n}),c.jsx(H.div,{"data-radix-scroll-area-viewport":"",...a,ref:d,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Gi.displayName=Ki;var Fh=l.memo(({nonce:e})=>c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e}),(e,t)=>e.nonce===t.nonce),Oe="ScrollAreaScrollbar",cn=l.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=me(Oe,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=n,i=e.orientation==="horizontal";return l.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),n.type==="hover"?c.jsx(Bh,{...r,ref:t,forceMount:o}):n.type==="scroll"?c.jsx(Rh,{...r,ref:t,forceMount:o}):n.type==="auto"?c.jsx(Xi,{...r,ref:t,forceMount:o}):n.type==="always"?c.jsx(dn,{...r,ref:t,"data-state":"visible"}):null});cn.displayName=Oe;var Bh=l.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=me(Oe,e.__scopeScrollArea),[a,s]=l.useState(!1);return l.useEffect(()=>{const i=n.scrollArea;let d=0;if(i){const u=()=>{window.clearTimeout(d),s(!0)},f=()=>{d=window.setTimeout(()=>s(!1),n.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(d),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",f)}}},[n.scrollArea,n.scrollHideDelay]),c.jsx(ce,{present:o||a,children:c.jsx(Xi,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Rh=l.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=me(Oe,e.__scopeScrollArea),a=e.orientation==="horizontal",s=_o(()=>d("SCROLL_END"),100),[i,d]=Lh("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return l.useEffect(()=>{if(i==="idle"){const u=window.setTimeout(()=>d("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,n.scrollHideDelay,d]),l.useEffect(()=>{const u=n.viewport,f=a?"scrollLeft":"scrollTop";if(u){let h=u[f];const m=()=>{const p=u[f];h!==p&&(d("SCROLL"),s()),h=p};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[n.viewport,a,d,s]),c.jsx(ce,{present:o||i!=="hidden",children:c.jsx(dn,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:F(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:F(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),Xi=l.forwardRef((e,t)=>{const o=me(Oe,e.__scopeScrollArea),{forceMount:r,...n}=e,[a,s]=l.useState(!1),i=e.orientation==="horizontal",d=_o(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,f=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:f)}},10);return At(o.viewport,d),At(o.content,d),c.jsx(ce,{present:r||a,children:c.jsx(dn,{"data-state":a?"visible":"hidden",...n,ref:t})})}),dn=l.forwardRef((e,t)=>{const{orientation:o="vertical",...r}=e,n=me(Oe,e.__scopeScrollArea),a=l.useRef(null),s=l.useRef(0),[i,d]=l.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=el(i.viewport,i.content),f={...r,sizes:i,onSizesChange:d,hasThumb:u>0&&u<1,onThumbChange:m=>a.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function h(m,p){return jh(m,s.current,i,p)}return o==="horizontal"?c.jsx(Hh,{...f,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const m=n.viewport.scrollLeft,p=tl(m,i,n.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:m=>{n.viewport&&(n.viewport.scrollLeft=m)},onDragScroll:m=>{n.viewport&&(n.viewport.scrollLeft=h(m,n.dir))}}):o==="vertical"?c.jsx(Vh,{...f,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const m=n.viewport.scrollTop,p=tl(m,i);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:m=>{n.viewport&&(n.viewport.scrollTop=m)},onDragScroll:m=>{n.viewport&&(n.viewport.scrollTop=h(m))}}):null}),Hh=l.forwardRef((e,t)=>{const{sizes:o,onSizesChange:r,...n}=e,a=me(Oe,e.__scopeScrollArea),[s,i]=l.useState(),d=l.useRef(null),u=K(t,d,a.onScrollbarXChange);return l.useEffect(()=>{d.current&&i(getComputedStyle(d.current))},[d]),c.jsx(Zi,{"data-orientation":"horizontal",...n,ref:u,sizes:o,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Oo(o)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,h)=>{if(a.viewport){const m=a.viewport.scrollLeft+f.deltaX;e.onWheelScroll(m),rl(m,h)&&f.preventDefault()}},onResize:()=>{d.current&&a.viewport&&s&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Do(s.paddingLeft),paddingEnd:Do(s.paddingRight)}})}})}),Vh=l.forwardRef((e,t)=>{const{sizes:o,onSizesChange:r,...n}=e,a=me(Oe,e.__scopeScrollArea),[s,i]=l.useState(),d=l.useRef(null),u=K(t,d,a.onScrollbarYChange);return l.useEffect(()=>{d.current&&i(getComputedStyle(d.current))},[d]),c.jsx(Zi,{"data-orientation":"vertical",...n,ref:u,sizes:o,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Oo(o)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,h)=>{if(a.viewport){const m=a.viewport.scrollTop+f.deltaY;e.onWheelScroll(m),rl(m,h)&&f.preventDefault()}},onResize:()=>{d.current&&a.viewport&&s&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Do(s.paddingTop),paddingEnd:Do(s.paddingBottom)}})}})}),[zh,qi]=ji(Oe),Zi=l.forwardRef((e,t)=>{const{__scopeScrollArea:o,sizes:r,hasThumb:n,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:d,onDragScroll:u,onWheelScroll:f,onResize:h,...m}=e,p=me(Oe,o),[w,g]=l.useState(null),v=K(t,k=>g(k)),y=l.useRef(null),b=l.useRef(""),x=p.viewport,S=r.content-r.viewport,T=le(f),P=le(d),A=_o(h,10);function B(k){if(y.current){const M=k.clientX-y.current.left,L=k.clientY-y.current.top;u({x:M,y:L})}}return l.useEffect(()=>{const k=M=>{const L=M.target;w?.contains(L)&&T(M,S)};return document.addEventListener("wheel",k,{passive:!1}),()=>document.removeEventListener("wheel",k,{passive:!1})},[x,w,S,T]),l.useEffect(P,[r,P]),At(w,A),At(p.content,A),c.jsx(zh,{scope:o,scrollbar:w,hasThumb:n,onThumbChange:le(a),onThumbPointerUp:le(s),onThumbPositionChange:P,onThumbPointerDown:le(i),children:c.jsx(H.div,{...m,ref:v,style:{position:"absolute",...m.style},onPointerDown:F(e.onPointerDown,k=>{k.button===0&&(k.target.setPointerCapture(k.pointerId),y.current=w.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),B(k))}),onPointerMove:F(e.onPointerMove,B),onPointerUp:F(e.onPointerUp,k=>{const M=k.target;M.hasPointerCapture(k.pointerId)&&M.releasePointerCapture(k.pointerId),document.body.style.webkitUserSelect=b.current,p.viewport&&(p.viewport.style.scrollBehavior=""),y.current=null})})})}),ko="ScrollAreaThumb",Qi=l.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=qi(ko,e.__scopeScrollArea);return c.jsx(ce,{present:o||n.hasThumb,children:c.jsx(Wh,{ref:t,...r})})}),Wh=l.forwardRef((e,t)=>{const{__scopeScrollArea:o,style:r,...n}=e,a=me(ko,o),s=qi(ko,o),{onThumbPositionChange:i}=s,d=K(t,h=>s.onThumbChange(h)),u=l.useRef(void 0),f=_o(()=>{u.current&&(u.current(),u.current=void 0)},100);return l.useEffect(()=>{const h=a.viewport;if(h){const m=()=>{if(f(),!u.current){const p=Yh(h,i);u.current=p,i()}};return i(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[a.viewport,f,i]),c.jsx(H.div,{"data-state":s.hasThumb?"visible":"hidden",...n,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:F(e.onPointerDownCapture,h=>{const p=h.target.getBoundingClientRect(),w=h.clientX-p.left,g=h.clientY-p.top;s.onThumbPointerDown({x:w,y:g})}),onPointerUp:F(e.onPointerUp,s.onThumbPointerUp)})});Qi.displayName=ko;var un="ScrollAreaCorner",Ji=l.forwardRef((e,t)=>{const o=me(un,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?c.jsx(Uh,{...e,ref:t}):null});Ji.displayName=un;var Uh=l.forwardRef((e,t)=>{const{__scopeScrollArea:o,...r}=e,n=me(un,o),[a,s]=l.useState(0),[i,d]=l.useState(0),u=!!(a&&i);return At(n.scrollbarX,()=>{const f=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(f),d(f)}),At(n.scrollbarY,()=>{const f=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(f),s(f)}),u?c.jsx(H.div,{...r,ref:t,style:{width:a,height:i,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Do(e){return e?parseInt(e,10):0}function el(e,t){const o=e/t;return isNaN(o)?0:o}function Oo(e){const t=el(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function jh(e,t,o,r="ltr"){const n=Oo(o),a=n/2,s=t||a,i=n-s,d=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-i,f=o.content-o.viewport,h=r==="ltr"?[0,f]:[f*-1,0];return ol([d,u],h)(e)}function tl(e,t,o="ltr"){const r=Oo(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,s=t.content-t.viewport,i=a-r,d=o==="ltr"?[0,s]:[s*-1,0],u=sn(e,d);return ol([0,s],[0,i])(u)}function ol(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(o-e[0])}}function rl(e,t){return e>0&&e<t}var Yh=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},r=0;return(function n(){const a={left:e.scrollLeft,top:e.scrollTop},s=o.left!==a.left,i=o.top!==a.top;(s||i)&&t(),o=a,r=window.requestAnimationFrame(n)})(),()=>window.cancelAnimationFrame(r)};function _o(e,t){const o=le(e),r=l.useRef(0);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),l.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function At(e,t){const o=le(t);se(()=>{let r=0;if(e){const n=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(o)});return n.observe(e),()=>{window.cancelAnimationFrame(r),n.unobserve(e)}}},[e,o])}var nl=Yi,Kh=Gi,Gh=Ji;const al=l.forwardRef(({className:e,children:t,...o},r)=>c.jsxs(nl,{ref:r,className:D("relative overflow-hidden",e),...o,children:[c.jsx(Kh,{className:"h-full w-full rounded-[inherit]",children:t}),c.jsx(fn,{}),c.jsx(Gh,{})]}));al.displayName=nl.displayName;const fn=l.forwardRef(({className:e,orientation:t="vertical",...o},r)=>c.jsx(cn,{ref:r,orientation:t,className:D("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:c.jsx(Qi,{className:"relative flex-1 rounded-full bg-border"})}));fn.displayName=cn.displayName;function sl(e){const t=e+"CollectionProvider",[o,r]=pe(t),[n,a]=o(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:v,children:y}=g,b=l.useRef(null),x=l.useRef(new Map).current;return c.jsx(n,{scope:v,itemMap:x,collectionRef:b,children:y})};s.displayName=t;const i=e+"CollectionSlot",d=et(i),u=l.forwardRef((g,v)=>{const{scope:y,children:b}=g,x=a(i,y),S=K(v,x.collectionRef);return c.jsx(d,{ref:S,children:b})});u.displayName=i;const f=e+"CollectionItemSlot",h="data-radix-collection-item",m=et(f),p=l.forwardRef((g,v)=>{const{scope:y,children:b,...x}=g,S=l.useRef(null),T=K(v,S),P=a(f,y);return l.useEffect(()=>(P.itemMap.set(S,{ref:S,...x}),()=>{P.itemMap.delete(S)})),c.jsx(m,{[h]:"",ref:T,children:b})});p.displayName=f;function w(g){const v=a(e+"CollectionConsumer",g);return l.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((P,A)=>x.indexOf(P.ref.current)-x.indexOf(A.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},w,r]}var il=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"}),Xh="VisuallyHidden",Io=l.forwardRef((e,t)=>c.jsx(H.span,{...e,ref:t,style:{...il,...e.style}}));Io.displayName=Xh;var qh=Io,Zh=[" ","Enter","ArrowUp","ArrowDown"],Qh=[" ","Enter"],nt="Select",[Mo,Lo,Jh]=sl(nt),[at]=pe(nt,[Jh,Nt]),$o=Nt(),[eg,Ge]=at(nt),[tg,og]=at(nt),rg="SelectProvider";function ll(e){const{__scopeSelect:t,children:o,open:r,defaultOpen:n,onOpenChange:a,value:s,defaultValue:i,onValueChange:d,dir:u,name:f,autoComplete:h,disabled:m,required:p,form:w,internal_do_not_use_render:g}=e,v=$o(t),[y,b]=l.useState(null),[x,S]=l.useState(null),[T,P]=l.useState(!1),A=Ui(u),[B,k]=Re({prop:r,defaultProp:n??!1,onChange:a,caller:nt}),[M,L]=Re({prop:s,defaultProp:i,onChange:d,caller:nt}),O=l.useRef(null),Y=y?!!w||!!y.closest("form"):!0,[N,V]=l.useState(new Set),R=Be(),z=Array.from(N).map(J=>J.props.value).join(";"),$=l.useCallback(J=>{V(U=>new Set(U).add(J))},[]),_=l.useCallback(J=>{V(U=>{const G=new Set(U);return G.delete(J),G})},[]),X={required:p,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:T,onValueNodeHasChildrenChange:P,contentId:R,value:M,onValueChange:L,open:B,onOpenChange:k,dir:A,triggerPointerDownPosRef:O,disabled:m,name:f,autoComplete:h,form:w,nativeOptions:N,nativeSelectKey:z,isFormControl:Y};return c.jsx(Jr,{...v,children:c.jsx(eg,{scope:t,...X,children:c.jsx(Mo.Provider,{scope:t,children:c.jsx(tg,{scope:t,onNativeOptionAdd:$,onNativeOptionRemove:_,children:vg(g)?g(X):o})})})})}ll.displayName=rg;var cl=e=>{const{__scopeSelect:t,children:o,...r}=e;return c.jsx(ll,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:n})=>c.jsxs(c.Fragment,{children:[o,n?c.jsx(Ol,{__scopeSelect:t}):null]})})};cl.displayName=nt;var dl="SelectTrigger",pn=l.forwardRef((e,t)=>{const{__scopeSelect:o,disabled:r=!1,...n}=e,a=$o(o),s=Ge(dl,o),i=s.disabled||r,d=K(t,s.onTriggerChange),u=Lo(o),f=l.useRef("touch"),[h,m,p]=_l(g=>{const v=u().filter(x=>!x.disabled),y=v.find(x=>x.value===s.value),b=Il(v,g,y);b!==void 0&&s.onValueChange(b.value)}),w=g=>{i||(s.onOpenChange(!0),p()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return c.jsx(No,{asChild:!0,...a,children:c.jsx(H.button,{type:"button",role:"combobox","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Bo(s.value)?"":void 0,...n,ref:d,onClick:F(n.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&w(g)}),onPointerDown:F(n.onPointerDown,g=>{f.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(w(g),g.preventDefault())}),onKeyDown:F(n.onKeyDown,g=>{const v=h.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&m(g.key),!(v&&g.key===" ")&&Zh.includes(g.key)&&(w(),g.preventDefault())})})})});pn.displayName=dl;var ul="SelectValue",fl=l.forwardRef((e,t)=>{const{__scopeSelect:o,className:r,style:n,children:a,placeholder:s="",...i}=e,d=Ge(ul,o),{onValueNodeHasChildrenChange:u}=d,f=a!==void 0,h=K(t,d.onValueNodeChange);se(()=>{u(f)},[u,f]);const m=Bo(d.value);return c.jsx(H.span,{...i,asChild:m?!1:i.asChild,ref:h,style:{pointerEvents:"none"},children:c.jsx(l.Fragment,{children:m?s:a},m?"placeholder":"value")})});fl.displayName=ul;var ng="SelectIcon",pl=l.forwardRef((e,t)=>{const{__scopeSelect:o,children:r,...n}=e;return c.jsx(H.span,{"aria-hidden":!0,...n,ref:t,children:r||"▼"})});pl.displayName=ng;var hl="SelectPortal",[ag,sg]=at(hl,{forceMount:void 0}),gl=e=>{const{__scopeSelect:t,forceMount:o,...r}=e;return c.jsx(ag,{scope:e.__scopeSelect,forceMount:o,children:c.jsx(Mt,{asChild:!0,...r})})};gl.displayName=hl;var Xe="SelectContent",hn=l.forwardRef((e,t)=>{const o=sg(Xe,e.__scopeSelect),{forceMount:r=o.forceMount,...n}=e,a=Ge(Xe,e.__scopeSelect),[s,i]=l.useState();return se(()=>{i(new DocumentFragment)},[]),c.jsx(ce,{present:r||a.open,children:({present:d})=>d?c.jsx(bl,{...n,ref:t}):c.jsx(ml,{...n,fragment:s})})});hn.displayName=Xe;var ml=l.forwardRef((e,t)=>{const{__scopeSelect:o,children:r,fragment:n}=e;return n?lt.createPortal(c.jsx(vl,{scope:o,children:c.jsx(Mo.Slot,{scope:o,children:c.jsx("div",{ref:t,children:r})})}),n):null});ml.displayName="SelectContentFragment";var Ce=10,[vl,qe]=at(Xe),ig="SelectContentImpl",lg=et("SelectContent.RemoveScroll"),bl=l.forwardRef((e,t)=>{const{__scopeSelect:o}=e,{position:r="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:d,align:u,alignOffset:f,arrowPadding:h,collisionBoundary:m,collisionPadding:p,sticky:w,hideWhenDetached:g,avoidCollisions:v,...y}=e,b=Ge(Xe,o),[x,S]=l.useState(null),[T,P]=l.useState(null),A=K(t,I=>S(I)),[B,k]=l.useState(null),[M,L]=l.useState(null),O=Lo(o),[Y,N]=l.useState(!1),V=l.useRef(!1);l.useEffect(()=>{if(x)return sr(x)},[x]),er();const R=l.useCallback(I=>{const[ee,...ae]=O().map(re=>re.ref.current),[Z]=ae.slice(-1),Q=document.activeElement;for(const re of I)if(re===Q||(re?.scrollIntoView({block:"nearest"}),re===ee&&T&&(T.scrollTop=0),re===Z&&T&&(T.scrollTop=T.scrollHeight),re?.focus(),document.activeElement!==Q))return},[O,T]),z=l.useCallback(()=>R([B,x]),[R,B,x]);l.useEffect(()=>{Y&&z()},[Y,z]);const{onOpenChange:$,triggerPointerDownPosRef:_}=b;l.useEffect(()=>{if(x){let I={x:0,y:0};const ee=Z=>{I={x:Math.abs(Math.round(Z.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(Z.pageY)-(_.current?.y??0))}},ae=Z=>{I.x<=10&&I.y<=10?Z.preventDefault():Z.composedPath().includes(x)||$(!1),document.removeEventListener("pointermove",ee),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",ee),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ee),document.removeEventListener("pointerup",ae,{capture:!0})}}},[x,$,_]),l.useEffect(()=>{const I=()=>$(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[$]);const[X,J]=_l(I=>{const ee=O().filter(Q=>!Q.disabled),ae=ee.find(Q=>Q.ref.current===document.activeElement),Z=Il(ee,I,ae);Z&&setTimeout(()=>Z.ref.current?.focus())}),U=l.useCallback((I,ee,ae)=>{const Z=!V.current&&!ae;(b.value!==void 0&&b.value===ee||Z)&&(k(I),Z&&(V.current=!0))},[b.value]),G=l.useCallback(()=>x?.focus(),[x]),q=l.useCallback((I,ee,ae)=>{const Z=!V.current&&!ae;(b.value!==void 0&&b.value===ee||Z)&&L(I)},[b.value]),ie=r==="popper"?gn:wl,ue=ie===gn?{side:i,sideOffset:d,align:u,alignOffset:f,arrowPadding:h,collisionBoundary:m,collisionPadding:p,sticky:w,hideWhenDetached:g,avoidCollisions:v}:{};return c.jsx(vl,{scope:o,content:x,viewport:T,onViewportChange:P,itemRefCallback:U,selectedItem:B,onItemLeave:G,itemTextRefCallback:q,focusSelectedItem:z,selectedItemText:M,position:r,isPositioned:Y,searchRef:X,children:c.jsx(ao,{as:lg,allowPinchZoom:!0,children:c.jsx(Zt,{asChild:!0,trapped:b.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:F(n,I=>{b.trigger?.focus({preventScroll:!0}),I.preventDefault()}),children:c.jsx(ct,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:c.jsx(ie,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:I=>I.preventDefault(),...y,...ue,onPlaced:()=>N(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:F(y.onKeyDown,I=>{const ee=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!ee&&I.key.length===1&&J(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let Z=O().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(I.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const Q=I.target,re=Z.indexOf(Q);Z=Z.slice(re+1)}setTimeout(()=>R(Z)),I.preventDefault()}})})})})})})});bl.displayName=ig;var cg="SelectItemAlignedPosition",wl=l.forwardRef((e,t)=>{const{__scopeSelect:o,onPlaced:r,...n}=e,a=Ge(Xe,o),s=qe(Xe,o),[i,d]=l.useState(null),[u,f]=l.useState(null),h=K(t,A=>f(A)),m=Lo(o),p=l.useRef(!1),w=l.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=s,x=l.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&g&&v&&y){const A=a.trigger.getBoundingClientRect(),B=u.getBoundingClientRect(),k=a.valueNode.getBoundingClientRect(),M=y.getBoundingClientRect();if(a.dir!=="rtl"){const Q=M.left-B.left,re=k.left-Q,ve=A.left-re,fe=A.width+ve,Yt=Math.max(fe,B.width),Dt=window.innerWidth-Ce,Kt=sn(re,[Ce,Math.max(Ce,Dt-Yt)]);i.style.minWidth=fe+"px",i.style.left=Kt+"px"}else{const Q=B.right-M.right,re=window.innerWidth-k.right-Q,ve=window.innerWidth-A.right-re,fe=A.width+ve,Yt=Math.max(fe,B.width),Dt=window.innerWidth-Ce,Kt=sn(re,[Ce,Math.max(Ce,Dt-Yt)]);i.style.minWidth=fe+"px",i.style.right=Kt+"px"}const L=m(),O=window.innerHeight-Ce*2,Y=g.scrollHeight,N=window.getComputedStyle(u),V=parseInt(N.borderTopWidth,10),R=parseInt(N.paddingTop,10),z=parseInt(N.borderBottomWidth,10),$=parseInt(N.paddingBottom,10),_=V+R+Y+$+z,X=Math.min(v.offsetHeight*5,_),J=window.getComputedStyle(g),U=parseInt(J.paddingTop,10),G=parseInt(J.paddingBottom,10),q=A.top+A.height/2-Ce,ie=O-q,ue=v.offsetHeight/2,I=v.offsetTop+ue,ee=V+R+I,ae=_-ee;if(ee<=q){const Q=L.length>0&&v===L[L.length-1].ref.current;i.style.bottom="0px";const re=u.clientHeight-g.offsetTop-g.offsetHeight,ve=Math.max(ie,ue+(Q?G:0)+re+z),fe=ee+ve;i.style.height=fe+"px"}else{const Q=L.length>0&&v===L[0].ref.current;i.style.top="0px";const ve=Math.max(q,V+g.offsetTop+(Q?U:0)+ue)+ae;i.style.height=ve+"px",g.scrollTop=ee-q+g.offsetTop}i.style.margin=`${Ce}px 0`,i.style.minHeight=X+"px",i.style.maxHeight=O+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[m,a.trigger,a.valueNode,i,u,g,v,y,a.dir,r]);se(()=>x(),[x]);const[S,T]=l.useState();se(()=>{u&&T(window.getComputedStyle(u).zIndex)},[u]);const P=l.useCallback(A=>{A&&w.current===!0&&(x(),b?.(),w.current=!1)},[x,b]);return c.jsx(ug,{scope:o,contentWrapper:i,shouldExpandOnScrollRef:p,onScrollButtonChange:P,children:c.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:c.jsx(H.div,{...n,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});wl.displayName=cg;var dg="SelectPopperPosition",gn=l.forwardRef((e,t)=>{const{__scopeSelect:o,align:r="start",collisionPadding:n=Ce,...a}=e,s=$o(o);return c.jsx(en,{...s,...a,ref:t,align:r,collisionPadding:n,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});gn.displayName=dg;var[ug,mn]=at(Xe,{}),vn="SelectViewport",yl=l.forwardRef((e,t)=>{const{__scopeSelect:o,nonce:r,...n}=e,a=qe(vn,o),s=mn(vn,o),i=K(t,a.onViewportChange),d=l.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),c.jsx(Mo.Slot,{scope:o,children:c.jsx(H.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:F(n.onScroll,u=>{const f=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=s;if(m?.current&&h){const p=Math.abs(d.current-f.scrollTop);if(p>0){const w=window.innerHeight-Ce*2,g=parseFloat(h.style.minHeight),v=parseFloat(h.style.height),y=Math.max(g,v);if(y<w){const b=y+p,x=Math.min(w,b),S=b-x;h.style.height=x+"px",h.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,h.style.justifyContent="flex-end")}}}d.current=f.scrollTop})})})]})});yl.displayName=vn;var xl="SelectGroup",[fg,pg]=at(xl),Cl=l.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=Be();return c.jsx(fg,{scope:o,id:n,children:c.jsx(H.div,{role:"group","aria-labelledby":n,...r,ref:t})})});Cl.displayName=xl;var Sl="SelectLabel",bn=l.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=pg(Sl,o);return c.jsx(H.div,{id:n.id,...r,ref:t})});bn.displayName=Sl;var Fo="SelectItem",[hg,El]=at(Fo),wn=l.forwardRef((e,t)=>{const{__scopeSelect:o,value:r,disabled:n=!1,textValue:a,...s}=e,i=Ge(Fo,o),d=qe(Fo,o),u=i.value===r,[f,h]=l.useState(a??""),[m,p]=l.useState(!1),w=K(t,b=>d.itemRefCallback?.(b,r,n)),g=Be(),v=l.useRef("touch"),y=()=>{n||(i.onValueChange(r),i.onOpenChange(!1))};return c.jsx(hg,{scope:o,value:r,disabled:n,textId:g,isSelected:u,onItemTextChange:l.useCallback(b=>{h(x=>x||(b?.textContent??"").trim())},[]),children:c.jsx(Mo.ItemSlot,{scope:o,value:r,disabled:n,textValue:f,children:c.jsx(H.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:w,onFocus:F(s.onFocus,()=>p(!0)),onBlur:F(s.onBlur,()=>p(!1)),onClick:F(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:F(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:F(s.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:F(s.onPointerMove,b=>{v.current=b.pointerType,n?d.onItemLeave?.():v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:F(s.onPointerLeave,b=>{b.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:F(s.onKeyDown,b=>{d.searchRef?.current!==""&&b.key===" "||(Qh.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});wn.displayName=Fo;var zt="SelectItemText",Tl=l.forwardRef((e,t)=>{const{__scopeSelect:o,className:r,style:n,...a}=e,s=Ge(zt,o),i=qe(zt,o),d=El(zt,o),u=og(zt,o),[f,h]=l.useState(null),m=K(t,y=>h(y),d.onItemTextChange,y=>i.itemTextRefCallback?.(y,d.value,d.disabled)),p=f?.textContent,w=l.useMemo(()=>c.jsx("option",{value:d.value,disabled:d.disabled,children:p},d.value),[d.disabled,d.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return se(()=>(g(w),()=>v(w)),[g,v,w]),c.jsxs(c.Fragment,{children:[c.jsx(H.span,{id:d.textId,...a,ref:m}),d.isSelected&&s.valueNode&&!s.valueNodeHasChildren&&!Bo(s.value)?lt.createPortal(a.children,s.valueNode):null]})});Tl.displayName=zt;var Nl="SelectItemIndicator",Pl=l.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e;return El(Nl,o).isSelected?c.jsx(H.span,{"aria-hidden":!0,...r,ref:t}):null});Pl.displayName=Nl;var yn="SelectScrollUpButton",xn=l.forwardRef((e,t)=>{const o=qe(yn,e.__scopeSelect),r=mn(yn,e.__scopeSelect),[n,a]=l.useState(!1),s=K(t,r.onScrollButtonChange);return se(()=>{if(o.viewport&&o.isPositioned){let i=function(){const u=d.scrollTop>0;a(u)};const d=o.viewport;return i(),d.addEventListener("scroll",i),()=>d.removeEventListener("scroll",i)}},[o.viewport,o.isPositioned]),n?c.jsx(Al,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:d}=o;i&&d&&(i.scrollTop=i.scrollTop-d.offsetHeight)}}):null});xn.displayName=yn;var Cn="SelectScrollDownButton",Sn=l.forwardRef((e,t)=>{const o=qe(Cn,e.__scopeSelect),r=mn(Cn,e.__scopeSelect),[n,a]=l.useState(!1),s=K(t,r.onScrollButtonChange);return se(()=>{if(o.viewport&&o.isPositioned){let i=function(){const u=d.scrollHeight-d.clientHeight,f=Math.ceil(d.scrollTop)<u;a(f)};const d=o.viewport;return i(),d.addEventListener("scroll",i),()=>d.removeEventListener("scroll",i)}},[o.viewport,o.isPositioned]),n?c.jsx(Al,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:d}=o;i&&d&&(i.scrollTop=i.scrollTop+d.offsetHeight)}}):null});Sn.displayName=Cn;var Al=l.forwardRef((e,t)=>{const{__scopeSelect:o,onAutoScroll:r,...n}=e,a=qe("SelectScrollButton",o),s=l.useRef(null),i=Lo(o),d=l.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return l.useEffect(()=>()=>d(),[d]),se(()=>{i().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),c.jsx(H.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:F(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:F(n.onPointerMove,()=>{a.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:F(n.onPointerLeave,()=>{d()})})}),gg="SelectSeparator",En=l.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e;return c.jsx(H.div,{"aria-hidden":!0,...r,ref:t})});En.displayName=gg;var kl="SelectArrow",mg=l.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=$o(o);return qe(kl,o).position==="popper"?c.jsx(tn,{...n,...r,ref:t}):null});mg.displayName=kl;var Dl="SelectBubbleInput",Ol=l.forwardRef(({__scopeSelect:e,...t},o)=>{const r=Ge(Dl,e),{value:n,onValueChange:a,required:s,disabled:i,name:d,autoComplete:u,form:f}=r,{nativeOptions:h,nativeSelectKey:m}=r,p=l.useRef(null),w=K(o,p),g=n??"",v=Er(g),y=Array.from(h).some(b=>(b.props.value??"")==="");return l.useEffect(()=>{const b=p.current;if(!b)return;const x=window.HTMLSelectElement.prototype,T=Object.getOwnPropertyDescriptor(x,"value").set;if(v!==g&&T){const P=new Event("change",{bubbles:!0});T.call(b,g),b.dispatchEvent(P)}},[v,g]),c.jsxs(H.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:d,autoComplete:u,disabled:i,form:f,onChange:b=>a(b.target.value),...t,style:{...il,...t.style},ref:w,defaultValue:g,children:[Bo(n)&&!y?c.jsx("option",{value:""}):null,Array.from(h)]},m)});Ol.displayName=Dl;function vg(e){return typeof e=="function"}function Bo(e){return e===""||e===void 0}function _l(e){const t=le(e),o=l.useRef(""),r=l.useRef(0),n=l.useCallback(s=>{const i=o.current+s;t(i),(function d(u){o.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(i)},[t]),a=l.useCallback(()=>{o.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[o,n,a]}function Il(e,t,o){const n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1;let s=bg(e,Math.max(a,0));n.length===1&&(s=s.filter(u=>u!==o));const d=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return d!==o?d:void 0}function bg(e,t){return e.map((o,r)=>e[(t+r)%e.length])}const wg=cl,yg=Cl,xg=fl,Ml=l.forwardRef(({className:e,children:t,...o},r)=>c.jsxs(pn,{ref:r,className:D("flex h-10 w-full items-center justify-between rounded-md border border-input bg-white px-3 py-2 text-sm ring-offset-background transition-all duration-200 placeholder:text-muted-foreground hover:border-primary/50 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:border-primary disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...o,children:[t,c.jsx(pl,{asChild:!0,children:c.jsx(kr,{className:"h-4 w-4 opacity-50"})})]}));Ml.displayName=pn.displayName;const Tn=l.forwardRef(({className:e,...t},o)=>c.jsx(xn,{ref:o,className:D("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Kf,{className:"h-4 w-4"})}));Tn.displayName=xn.displayName;const Nn=l.forwardRef(({className:e,...t},o)=>c.jsx(Sn,{ref:o,className:D("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(kr,{className:"h-4 w-4"})}));Nn.displayName=Sn.displayName;const Ll=l.forwardRef(({className:e,children:t,position:o="popper",...r},n)=>c.jsx(gl,{children:c.jsxs(hn,{ref:n,className:D("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...r,children:[c.jsx(Tn,{}),c.jsx(yl,{className:D("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(Nn,{})]})}));Ll.displayName=hn.displayName;const $l=l.forwardRef(({className:e,...t},o)=>c.jsx(bn,{ref:o,className:D("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));$l.displayName=bn.displayName;const Fl=l.forwardRef(({className:e,children:t,...o},r)=>c.jsxs(wn,{ref:r,className:D("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-all duration-150 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground hover:bg-accent/50",e),...o,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Pl,{children:c.jsx(Ar,{className:"h-4 w-4"})})}),c.jsx(Tl,{children:t})]}));Fl.displayName=wn.displayName;const Bl=l.forwardRef(({className:e,...t},o)=>c.jsx(En,{ref:o,className:D("-mx-1 my-1 h-px bg-muted",e),...t}));Bl.displayName=En.displayName;var Cg="Separator",Rl="horizontal",Sg=["horizontal","vertical"],Hl=l.forwardRef((e,t)=>{const{decorative:o,orientation:r=Rl,...n}=e,a=Eg(r)?r:Rl,i=o?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return c.jsx(H.div,{"data-orientation":a,...i,...n,ref:t})});Hl.displayName=Cg;function Eg(e){return Sg.includes(e)}var Vl=Hl;const zl=l.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...r},n)=>c.jsx(Vl,{ref:n,decorative:o,orientation:t,className:D("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));zl.displayName=Vl.displayName;const Wl=co,Tg=uo,Ng=tt,Ul=fo,Pn=l.forwardRef(({className:e,...t},o)=>c.jsx(gt,{className:D("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",e),...t,ref:o}));Pn.displayName=gt.displayName;const Pg=Ft("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"}}),An=l.forwardRef(({side:e="right",className:t,children:o,...r},n)=>c.jsxs(Ul,{children:[c.jsx(Pn,{}),c.jsxs(vt,{ref:n,className:D(Pg({side:e}),t),...r,children:[o,c.jsxs(tt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(Bt,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));An.displayName=vt.displayName;const jl=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col space-y-2 text-center sm:text-left",e),...t});jl.displayName="SheetHeader";const Yl=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Yl.displayName="SheetFooter";const Kl=l.forwardRef(({className:e,...t},o)=>c.jsx(bt,{ref:o,className:D("text-lg font-semibold text-foreground",e),...t}));Kl.displayName=bt.displayName;const Gl=l.forwardRef(({className:e,...t},o)=>c.jsx(wt,{ref:o,className:D("text-sm text-muted-foreground",e),...t}));Gl.displayName=wt.displayName;function Ag({className:e,...t}){return c.jsx("div",{className:D("animate-pulse rounded-md bg-muted",e),...t})}var kg=e=>{switch(e){case"success":return _g;case"info":return Mg;case"warning":return Ig;case"error":return Lg;default:return null}},Dg=Array(12).fill(0),Og=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},Dg.map((o,r)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),_g=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),Ig=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.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"})),Mg=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),Lg=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),$g=C.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"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Fg=()=>{let[e,t]=C.useState(document.hidden);return C.useEffect(()=>{let o=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),e},kn=1,Bg=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:o,...r}=e,n=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:kn++,a=this.toasts.find(i=>i.id===n),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),a?this.toasts=this.toasts.map(i=>i.id===n?(this.publish({...i,...e,id:n,title:o}),{...i,...e,id:n,dismissible:s,title:o}):i):this.addToast({title:o,...r,dismissible:s,id:n}),n},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(o=>o({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let o;t.loading!==void 0&&(o=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),n=o!==void 0,a,s=r.then(async d=>{if(a=["resolve",d],C.isValidElement(d))n=!1,this.create({id:o,type:"default",message:d});else if(Hg(d)&&!d.ok){n=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description;this.create({id:o,type:"error",message:u,description:f})}else if(t.success!==void 0){n=!1;let u=typeof t.success=="function"?await t.success(d):t.success,f=typeof t.description=="function"?await t.description(d):t.description;this.create({id:o,type:"success",message:u,description:f})}}).catch(async d=>{if(a=["reject",d],t.error!==void 0){n=!1;let u=typeof t.error=="function"?await t.error(d):t.error,f=typeof t.description=="function"?await t.description(d):t.description;this.create({id:o,type:"error",message:u,description:f})}}).finally(()=>{var d;n&&(this.dismiss(o),o=void 0),(d=t.finally)==null||d.call(t)}),i=()=>new Promise((d,u)=>s.then(()=>a[0]==="reject"?u(a[1]):d(a[1])).catch(u));return typeof o!="string"&&typeof o!="number"?{unwrap:i}:Object.assign(o,{unwrap:i})},this.custom=(e,t)=>{let o=t?.id||kn++;return this.create({jsx:e(o),id:o,...t}),o},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},de=new Bg,Rg=(e,t)=>{let o=t?.id||kn++;return de.addToast({title:e,...t,id:o}),o},Hg=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Vg=Rg,zg=()=>de.toasts,Wg=()=>de.getActiveToasts(),Ug=Object.assign(Vg,{success:de.success,info:de.info,warning:de.warning,error:de.error,custom:de.custom,message:de.message,promise:de.promise,dismiss:de.dismiss,loading:de.loading},{getHistory:zg,getToasts:Wg});function jg(e,{insertAt:t}={}){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}jg(`:where(html[dir="ltr"]),:where([data-sonner-toaster][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%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][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%)}:where([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:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([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);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([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 #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([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)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[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;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([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(--gray12);border:1px solid var(--gray4);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-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([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}:where([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}:where([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, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--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-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-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--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-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-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],[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],[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],[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],[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:nth-child(1){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)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{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%)}
|
|
47
|
-
`);function Ro(e){return e.label!==void 0}var Yg=3,Kg="32px",Gg="16px",Xl=4e3,Xg=356,qg=14,Zg=20,Qg=200;function Se(...e){return e.filter(Boolean).join(" ")}function Jg(e){let[t,o]=e.split("-"),r=[];return t&&r.push(t),o&&r.push(o),r}var em=e=>{var t,o,r,n,a,s,i,d,u,f,h;let{invert:m,toast:p,unstyled:w,interacting:g,setHeights:v,visibleToasts:y,heights:b,index:x,toasts:S,expanded:T,removeToast:P,defaultRichColors:A,closeButton:B,style:k,cancelButtonStyle:M,actionButtonStyle:L,className:O="",descriptionClassName:Y="",duration:N,position:V,gap:R,loadingIcon:z,expandByDefault:$,classNames:_,icons:X,closeButtonAriaLabel:J="Close toast",pauseWhenPageIsHidden:U}=e,[G,q]=C.useState(null),[ie,ue]=C.useState(null),[I,ee]=C.useState(!1),[ae,Z]=C.useState(!1),[Q,re]=C.useState(!1),[ve,fe]=C.useState(!1),[Yt,Dt]=C.useState(!1),[Kt,qn]=C.useState(0),[dv,Zc]=C.useState(0),Gt=C.useRef(p.duration||N||Xl),Qc=C.useRef(null),st=C.useRef(null),uv=x===0,fv=x+1<=y,be=p.type,Ot=p.dismissible!==!1,pv=p.className||"",hv=p.descriptionClassName||"",Go=C.useMemo(()=>b.findIndex(W=>W.toastId===p.id)||0,[b,p.id]),gv=C.useMemo(()=>{var W;return(W=p.closeButton)!=null?W:B},[p.closeButton,B]),Jc=C.useMemo(()=>p.duration||N||Xl,[p.duration,N]),Zn=C.useRef(0),_t=C.useRef(0),ed=C.useRef(0),It=C.useRef(null),[mv,vv]=V.split("-"),td=C.useMemo(()=>b.reduce((W,te,ne)=>ne>=Go?W:W+te.height,0),[b,Go]),od=Fg(),bv=p.invert||m,Qn=be==="loading";_t.current=C.useMemo(()=>Go*R+td,[Go,td]),C.useEffect(()=>{Gt.current=Jc},[Jc]),C.useEffect(()=>{ee(!0)},[]),C.useEffect(()=>{let W=st.current;if(W){let te=W.getBoundingClientRect().height;return Zc(te),v(ne=>[{toastId:p.id,height:te,position:p.position},...ne]),()=>v(ne=>ne.filter(Ee=>Ee.toastId!==p.id))}},[v,p.id]),C.useLayoutEffect(()=>{if(!I)return;let W=st.current,te=W.style.height;W.style.height="auto";let ne=W.getBoundingClientRect().height;W.style.height=te,Zc(ne),v(Ee=>Ee.find(Te=>Te.toastId===p.id)?Ee.map(Te=>Te.toastId===p.id?{...Te,height:ne}:Te):[{toastId:p.id,height:ne,position:p.position},...Ee])},[I,p.title,p.description,v,p.id]);let Ze=C.useCallback(()=>{Z(!0),qn(_t.current),v(W=>W.filter(te=>te.toastId!==p.id)),setTimeout(()=>{P(p)},Qg)},[p,P,v,_t]);C.useEffect(()=>{if(p.promise&&be==="loading"||p.duration===1/0||p.type==="loading")return;let W;return T||g||U&&od?(()=>{if(ed.current<Zn.current){let te=new Date().getTime()-Zn.current;Gt.current=Gt.current-te}ed.current=new Date().getTime()})():Gt.current!==1/0&&(Zn.current=new Date().getTime(),W=setTimeout(()=>{var te;(te=p.onAutoClose)==null||te.call(p,p),Ze()},Gt.current)),()=>clearTimeout(W)},[T,g,p,be,U,od,Ze]),C.useEffect(()=>{p.delete&&Ze()},[Ze,p.delete]);function wv(){var W,te,ne;return X!=null&&X.loading?C.createElement("div",{className:Se(_?.loader,(W=p?.classNames)==null?void 0:W.loader,"sonner-loader"),"data-visible":be==="loading"},X.loading):z?C.createElement("div",{className:Se(_?.loader,(te=p?.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":be==="loading"},z):C.createElement(Og,{className:Se(_?.loader,(ne=p?.classNames)==null?void 0:ne.loader),visible:be==="loading"})}return C.createElement("li",{tabIndex:0,ref:st,className:Se(O,pv,_?.toast,(t=p?.classNames)==null?void 0:t.toast,_?.default,_?.[be],(o=p?.classNames)==null?void 0:o[be]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:A,"data-styled":!(p.jsx||p.unstyled||w),"data-mounted":I,"data-promise":!!p.promise,"data-swiped":Yt,"data-removed":ae,"data-visible":fv,"data-y-position":mv,"data-x-position":vv,"data-index":x,"data-front":uv,"data-swiping":Q,"data-dismissible":Ot,"data-type":be,"data-invert":bv,"data-swipe-out":ve,"data-swipe-direction":ie,"data-expanded":!!(T||$&&I),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${ae?Kt:_t.current}px`,"--initial-height":$?"auto":`${dv}px`,...k,...p.style},onDragEnd:()=>{re(!1),q(null),It.current=null},onPointerDown:W=>{Qn||!Ot||(Qc.current=new Date,qn(_t.current),W.target.setPointerCapture(W.pointerId),W.target.tagName!=="BUTTON"&&(re(!0),It.current={x:W.clientX,y:W.clientY}))},onPointerUp:()=>{var W,te,ne,Ee;if(ve||!Ot)return;It.current=null;let Te=Number(((W=st.current)==null?void 0:W.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Qe=Number(((te=st.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),it=new Date().getTime()-((ne=Qc.current)==null?void 0:ne.getTime()),Ne=G==="x"?Te:Qe,Je=Math.abs(Ne)/it;if(Math.abs(Ne)>=Zg||Je>.11){qn(_t.current),(Ee=p.onDismiss)==null||Ee.call(p,p),ue(G==="x"?Te>0?"right":"left":Qe>0?"down":"up"),Ze(),fe(!0),Dt(!1);return}re(!1),q(null)},onPointerMove:W=>{var te,ne,Ee,Te;if(!It.current||!Ot||((te=window.getSelection())==null?void 0:te.toString().length)>0)return;let Qe=W.clientY-It.current.y,it=W.clientX-It.current.x,Ne=(ne=e.swipeDirections)!=null?ne:Jg(V);!G&&(Math.abs(it)>1||Math.abs(Qe)>1)&&q(Math.abs(it)>Math.abs(Qe)?"x":"y");let Je={x:0,y:0};G==="y"?(Ne.includes("top")||Ne.includes("bottom"))&&(Ne.includes("top")&&Qe<0||Ne.includes("bottom")&&Qe>0)&&(Je.y=Qe):G==="x"&&(Ne.includes("left")||Ne.includes("right"))&&(Ne.includes("left")&&it<0||Ne.includes("right")&&it>0)&&(Je.x=it),(Math.abs(Je.x)>0||Math.abs(Je.y)>0)&&Dt(!0),(Ee=st.current)==null||Ee.style.setProperty("--swipe-amount-x",`${Je.x}px`),(Te=st.current)==null||Te.style.setProperty("--swipe-amount-y",`${Je.y}px`)}},gv&&!p.jsx?C.createElement("button",{"aria-label":J,"data-disabled":Qn,"data-close-button":!0,onClick:Qn||!Ot?()=>{}:()=>{var W;Ze(),(W=p.onDismiss)==null||W.call(p,p)},className:Se(_?.closeButton,(n=p?.classNames)==null?void 0:n.closeButton)},(a=X?.close)!=null?a:$g):null,p.jsx||C.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:C.createElement(C.Fragment,null,be||p.icon||p.promise?C.createElement("div",{"data-icon":"",className:Se(_?.icon,(s=p?.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||wv():null,p.type!=="loading"?p.icon||X?.[be]||kg(be):null):null,C.createElement("div",{"data-content":"",className:Se(_?.content,(i=p?.classNames)==null?void 0:i.content)},C.createElement("div",{"data-title":"",className:Se(_?.title,(d=p?.classNames)==null?void 0:d.title)},typeof p.title=="function"?p.title():p.title),p.description?C.createElement("div",{"data-description":"",className:Se(Y,hv,_?.description,(u=p?.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),C.isValidElement(p.cancel)?p.cancel:p.cancel&&Ro(p.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||M,onClick:W=>{var te,ne;Ro(p.cancel)&&Ot&&((ne=(te=p.cancel).onClick)==null||ne.call(te,W),Ze())},className:Se(_?.cancelButton,(f=p?.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,C.isValidElement(p.action)?p.action:p.action&&Ro(p.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||L,onClick:W=>{var te,ne;Ro(p.action)&&((ne=(te=p.action).onClick)==null||ne.call(te,W),!W.defaultPrevented&&Ze())},className:Se(_?.actionButton,(h=p?.classNames)==null?void 0:h.actionButton)},p.action.label):null))};function ql(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function tm(e,t){let o={};return[e,t].forEach((r,n)=>{let a=n===1,s=a?"--mobile-offset":"--offset",i=a?Gg:Kg;function d(u){["top","right","bottom","left"].forEach(f=>{o[`${s}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?o[`${s}-${u}`]=i:o[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):d(i)}),o}var om=C.forwardRef(function(e,t){let{invert:o,position:r="bottom-right",hotkey:n=["altKey","KeyT"],expand:a,closeButton:s,className:i,offset:d,mobileOffset:u,theme:f="light",richColors:h,duration:m,style:p,visibleToasts:w=Yg,toastOptions:g,dir:v=ql(),gap:y=qg,loadingIcon:b,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:T}=e,[P,A]=C.useState([]),B=C.useMemo(()=>Array.from(new Set([r].concat(P.filter(U=>U.position).map(U=>U.position)))),[P,r]),[k,M]=C.useState([]),[L,O]=C.useState(!1),[Y,N]=C.useState(!1),[V,R]=C.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=C.useRef(null),$=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=C.useRef(null),X=C.useRef(!1),J=C.useCallback(U=>{A(G=>{var q;return(q=G.find(ie=>ie.id===U.id))!=null&&q.delete||de.dismiss(U.id),G.filter(({id:ie})=>ie!==U.id)})},[]);return C.useEffect(()=>de.subscribe(U=>{if(U.dismiss){A(G=>G.map(q=>q.id===U.id?{...q,delete:!0}:q));return}setTimeout(()=>{Xt.flushSync(()=>{A(G=>{let q=G.findIndex(ie=>ie.id===U.id);return q!==-1?[...G.slice(0,q),{...G[q],...U},...G.slice(q+1)]:[U,...G]})})})}),[]),C.useEffect(()=>{if(f!=="system"){R(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?R("dark"):R("light")),typeof window>"u")return;let U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:G})=>{R(G?"dark":"light")})}catch{U.addListener(({matches:q})=>{try{R(q?"dark":"light")}catch(ie){console.error(ie)}})}},[f]),C.useEffect(()=>{P.length<=1&&O(!1)},[P]),C.useEffect(()=>{let U=G=>{var q,ie;n.every(ue=>G[ue]||G.code===ue)&&(O(!0),(q=z.current)==null||q.focus()),G.code==="Escape"&&(document.activeElement===z.current||(ie=z.current)!=null&&ie.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[n]),C.useEffect(()=>{if(z.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,X.current=!1)}},[z.current]),C.createElement("section",{ref:t,"aria-label":`${S} ${$}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},B.map((U,G)=>{var q;let[ie,ue]=U.split("-");return P.length?C.createElement("ol",{key:U,dir:v==="auto"?ql():v,tabIndex:-1,ref:z,className:i,"data-sonner-toaster":!0,"data-theme":V,"data-y-position":ie,"data-lifted":L&&P.length>1&&!a,"data-x-position":ue,style:{"--front-toast-height":`${((q=k[0])==null?void 0:q.height)||0}px`,"--width":`${Xg}px`,"--gap":`${y}px`,...p,...tm(d,u)},onBlur:I=>{X.current&&!I.currentTarget.contains(I.relatedTarget)&&(X.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:I=>{I.target instanceof HTMLElement&&I.target.dataset.dismissible==="false"||X.current||(X.current=!0,_.current=I.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{Y||O(!1)},onDragEnd:()=>O(!1),onPointerDown:I=>{I.target instanceof HTMLElement&&I.target.dataset.dismissible==="false"||N(!0)},onPointerUp:()=>N(!1)},P.filter(I=>!I.position&&G===0||I.position===U).map((I,ee)=>{var ae,Z;return C.createElement(em,{key:I.id,icons:x,index:ee,toast:I,defaultRichColors:h,duration:(ae=g?.duration)!=null?ae:m,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:o,visibleToasts:w,closeButton:(Z=g?.closeButton)!=null?Z:s,interacting:Y,position:U,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,removeToast:J,toasts:P.filter(Q=>Q.position==I.position),heights:k.filter(Q=>Q.position==I.position),setHeights:M,expandByDefault:a,gap:y,loadingIcon:b,expanded:L,pauseWhenPageIsHidden:T,swipeDirections:e.swipeDirections})})):null}))});const rm=({...e})=>{const{theme:t="system"}=Xo();return c.jsx(om,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var Ho="Switch",[nm]=pe(Ho),[am,Dn]=nm(Ho);function sm(e){const{__scopeSwitch:t,checked:o,children:r,defaultChecked:n,disabled:a,form:s,name:i,onCheckedChange:d,required:u,value:f="on",internal_do_not_use_render:h}=e,[m,p]=Re({prop:o,defaultProp:n??!1,onChange:d,caller:Ho}),[w,g]=l.useState(null),[v,y]=l.useState(null),b=l.useRef(!1),x=w?!!s||!!w.closest("form"):!0,S={checked:m,setChecked:p,disabled:a,control:w,setControl:g,name:i,form:s,value:f,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:n,isFormControl:x,bubbleInput:v,setBubbleInput:y};return c.jsx(am,{scope:t,...S,children:im(h)?h(S):r})}var Zl="SwitchTrigger",Ql=l.forwardRef(({__scopeSwitch:e,onClick:t,...o},r)=>{const{value:n,disabled:a,checked:s,required:i,setControl:d,setChecked:u,hasConsumerStoppedPropagationRef:f,isFormControl:h,bubbleInput:m}=Dn(Zl,e),p=K(r,d);return c.jsx(H.button,{type:"button",role:"switch","aria-checked":s,"aria-required":i,"data-state":rc(s),"data-disabled":a?"":void 0,disabled:a,value:n,...o,ref:p,onClick:F(t,w=>{u(g=>!g),m&&h&&(f.current=w.isPropagationStopped(),f.current||w.stopPropagation())})})});Ql.displayName=Zl;var On=l.forwardRef((e,t)=>{const{__scopeSwitch:o,name:r,checked:n,defaultChecked:a,required:s,disabled:i,value:d,onCheckedChange:u,form:f,...h}=e;return c.jsx(sm,{__scopeSwitch:o,checked:n,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:r,form:f,value:d,internal_do_not_use_render:({isFormControl:m})=>c.jsxs(c.Fragment,{children:[c.jsx(Ql,{...h,ref:t,__scopeSwitch:o}),m&&c.jsx(oc,{__scopeSwitch:o})]})})});On.displayName=Ho;var Jl="SwitchThumb",ec=l.forwardRef((e,t)=>{const{__scopeSwitch:o,...r}=e,n=Dn(Jl,o);return c.jsx(H.span,{"data-state":rc(n.checked),"data-disabled":n.disabled?"":void 0,...r,ref:t})});ec.displayName=Jl;var tc="SwitchBubbleInput",oc=l.forwardRef(({__scopeSwitch:e,...t},o)=>{const{control:r,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:s,required:i,disabled:d,name:u,value:f,form:h,bubbleInput:m,setBubbleInput:p}=Dn(tc,e),w=K(o,p),g=Er(a),v=Tr(r);l.useEffect(()=>{const b=m;if(!b)return;const x=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(x,"checked").set,P=!n.current;if(g!==a&&T){const A=new Event("click",{bubbles:P});T.call(b,a),b.dispatchEvent(A)}},[m,g,a,n]);const y=l.useRef(a);return c.jsx(H.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??y.current,required:i,disabled:d,name:u,value:f,form:h,...t,tabIndex:-1,ref:w,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});oc.displayName=tc;function im(e){return typeof e=="function"}function rc(e){return e?"checked":"unchecked"}const nc=l.forwardRef(({className:e,...t},o)=>c.jsx(On,{className:D("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:o,children:c.jsx(ec,{className:D("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));nc.displayName=On.displayName;const ac=l.forwardRef(({className:e,...t},o)=>c.jsx("div",{className:"relative w-full overflow-auto rounded-lg border border-border",children:c.jsx("table",{ref:o,className:D("w-full caption-bottom text-sm",e),...t})}));ac.displayName="Table";const sc=l.forwardRef(({className:e,...t},o)=>c.jsx("thead",{ref:o,className:D("bg-muted [&_tr]:border-b",e),...t}));sc.displayName="TableHeader";const ic=l.forwardRef(({className:e,...t},o)=>c.jsx("tbody",{ref:o,className:D("[&_tr:last-child]:border-0",e),...t}));ic.displayName="TableBody";const lc=l.forwardRef(({className:e,...t},o)=>c.jsx("tfoot",{ref:o,className:D("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));lc.displayName="TableFooter";const cc=l.forwardRef(({className:e,...t},o)=>c.jsx("tr",{ref:o,className:D("border-b bg-white transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));cc.displayName="TableRow";const dc=l.forwardRef(({className:e,...t},o)=>c.jsx("th",{ref:o,className:D("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));dc.displayName="TableHead";const uc=l.forwardRef(({className:e,...t},o)=>c.jsx("td",{ref:o,className:D("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));uc.displayName="TableCell";const fc=l.forwardRef(({className:e,...t},o)=>c.jsx("caption",{ref:o,className:D("mt-4 text-sm text-muted-foreground",e),...t}));fc.displayName="TableCaption";var _n="ToastProvider",[In,lm,cm]=sl("Toast"),[pc]=pe("Toast",[cm]),[dm,Vo]=pc(_n),hc=e=>{const{__scopeToast:t,label:o="Notification",duration:r=5e3,swipeDirection:n="right",swipeThreshold:a=50,announcerContainer:s,children:i}=e,[d,u]=l.useState(null),[f,h]=l.useState(0),m=l.useRef(!1),p=l.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${_n}\`. Expected non-empty \`string\`.`),c.jsx(In.Provider,{scope:t,children:c.jsx(dm,{scope:t,label:o,duration:r,swipeDirection:n,swipeThreshold:a,toastCount:f,viewport:d,onViewportChange:u,onToastAdd:l.useCallback(()=>h(w=>w+1),[]),onToastRemove:l.useCallback(()=>h(w=>w-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:p,announcerContainer:s,children:i})})};hc.displayName=_n;var gc="ToastViewport",um=["F8"],Mn="toast.viewportPause",Ln="toast.viewportResume",mc=l.forwardRef((e,t)=>{const{__scopeToast:o,hotkey:r=um,label:n="Notifications ({hotkey})",...a}=e,s=Vo(gc,o),i=lm(o),d=l.useRef(null),u=l.useRef(null),f=l.useRef(null),h=l.useRef(null),m=K(t,h,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=s.toastCount>0;l.useEffect(()=>{const v=y=>{r.length!==0&&r.every(x=>y[x]||y.code===x)&&h.current?.focus()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),l.useEffect(()=>{const v=d.current,y=h.current;if(w&&v&&y){const b=()=>{if(!s.isClosePausedRef.current){const P=new CustomEvent(Mn);y.dispatchEvent(P),s.isClosePausedRef.current=!0}},x=()=>{if(s.isClosePausedRef.current){const P=new CustomEvent(Ln);y.dispatchEvent(P),s.isClosePausedRef.current=!1}},S=P=>{!v.contains(P.relatedTarget)&&x()},T=()=>{v.contains(document.activeElement)||x()};return v.addEventListener("focusin",b),v.addEventListener("focusout",S),v.addEventListener("pointermove",b),v.addEventListener("pointerleave",T),window.addEventListener("blur",b),window.addEventListener("focus",x),()=>{v.removeEventListener("focusin",b),v.removeEventListener("focusout",S),v.removeEventListener("pointermove",b),v.removeEventListener("pointerleave",T),window.removeEventListener("blur",b),window.removeEventListener("focus",x)}}},[w,s.isClosePausedRef]);const g=l.useCallback(({tabbingDirection:v})=>{const b=i().map(x=>{const S=x.ref.current,T=[S,...Em(S)];return v==="forwards"?T:T.reverse()});return(v==="forwards"?b.reverse():b).flat()},[i]);return l.useEffect(()=>{const v=h.current;if(v){const y=b=>{const x=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!x){const T=document.activeElement,P=b.shiftKey;if(b.target===v&&P){u.current?.focus();return}const k=g({tabbingDirection:P?"backwards":"forwards"}),M=k.findIndex(L=>L===T);Bn(k.slice(M+1))?b.preventDefault():P?u.current?.focus():f.current?.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[i,g]),c.jsxs(Bd,{ref:d,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&c.jsx($n,{ref:u,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"forwards"});Bn(v)}}),c.jsx(In.Slot,{scope:o,children:c.jsx(H.ol,{tabIndex:-1,...a,ref:m})}),w&&c.jsx($n,{ref:f,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"backwards"});Bn(v)}})]})});mc.displayName=gc;var vc="ToastFocusProxy",$n=l.forwardRef((e,t)=>{const{__scopeToast:o,onFocusFromOutsideViewport:r,...n}=e,a=Vo(vc,o);return c.jsx(Io,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:s=>{const i=s.relatedTarget;!a.viewport?.contains(i)&&r()}})});$n.displayName=vc;var Wt="Toast",fm="toast.swipeStart",pm="toast.swipeMove",hm="toast.swipeCancel",gm="toast.swipeEnd",bc=l.forwardRef((e,t)=>{const{forceMount:o,open:r,defaultOpen:n,onOpenChange:a,...s}=e,[i,d]=Re({prop:r,defaultProp:n??!0,onChange:a,caller:Wt});return c.jsx(ce,{present:o||i,children:c.jsx(bm,{open:i,...s,ref:t,onClose:()=>d(!1),onPause:le(e.onPause),onResume:le(e.onResume),onSwipeStart:F(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:F(e.onSwipeMove,u=>{const{x:f,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:F(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:F(e.onSwipeEnd,u=>{const{x:f,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),d(!1)})})})});bc.displayName=Wt;var[mm,vm]=pc(Wt,{onClose(){}}),bm=l.forwardRef((e,t)=>{const{__scopeToast:o,type:r="foreground",duration:n,open:a,onClose:s,onEscapeKeyDown:i,onPause:d,onResume:u,onSwipeStart:f,onSwipeMove:h,onSwipeCancel:m,onSwipeEnd:p,...w}=e,g=Vo(Wt,o),[v,y]=l.useState(null),b=K(t,N=>y(N)),x=l.useRef(null),S=l.useRef(null),T=n||g.duration,P=l.useRef(0),A=l.useRef(T),B=l.useRef(0),{onToastAdd:k,onToastRemove:M}=g,L=le(()=>{v?.contains(document.activeElement)&&g.viewport?.focus(),s()}),O=l.useCallback(N=>{!N||N===1/0||(window.clearTimeout(B.current),P.current=new Date().getTime(),B.current=window.setTimeout(L,N))},[L]);l.useEffect(()=>{const N=g.viewport;if(N){const V=()=>{O(A.current),u?.()},R=()=>{const z=new Date().getTime()-P.current;A.current=A.current-z,window.clearTimeout(B.current),d?.()};return N.addEventListener(Mn,R),N.addEventListener(Ln,V),()=>{N.removeEventListener(Mn,R),N.removeEventListener(Ln,V)}}},[g.viewport,T,d,u,O]),l.useEffect(()=>{a&&!g.isClosePausedRef.current&&O(T)},[a,T,g.isClosePausedRef,O]),l.useEffect(()=>(k(),()=>M()),[k,M]);const Y=l.useMemo(()=>v?Tc(v):null,[v]);return g.viewport?c.jsxs(c.Fragment,{children:[Y&&c.jsx(wm,{__scopeToast:o,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:Y}),c.jsx(mm,{scope:o,onClose:L,children:lt.createPortal(c.jsx(In.ItemSlot,{scope:o,children:c.jsx(Fd,{asChild:!0,onEscapeKeyDown:F(i,()=>{g.isFocusedToastEscapeKeyDownRef.current||L(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(H.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":g.swipeDirection,...w,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:F(e.onKeyDown,N=>{N.key==="Escape"&&(i?.(N.nativeEvent),N.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:F(e.onPointerDown,N=>{N.button===0&&(x.current={x:N.clientX,y:N.clientY})}),onPointerMove:F(e.onPointerMove,N=>{if(!x.current)return;const V=N.clientX-x.current.x,R=N.clientY-x.current.y,z=!!S.current,$=["left","right"].includes(g.swipeDirection),_=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,X=$?_(0,V):0,J=$?0:_(0,R),U=N.pointerType==="touch"?10:2,G={x:X,y:J},q={originalEvent:N,delta:G};z?(S.current=G,zo(pm,h,q,{discrete:!1})):Nc(G,g.swipeDirection,U)?(S.current=G,zo(fm,f,q,{discrete:!1}),N.target.setPointerCapture(N.pointerId)):(Math.abs(V)>U||Math.abs(R)>U)&&(x.current=null)}),onPointerUp:F(e.onPointerUp,N=>{const V=S.current,R=N.target;if(R.hasPointerCapture(N.pointerId)&&R.releasePointerCapture(N.pointerId),S.current=null,x.current=null,V){const z=N.currentTarget,$={originalEvent:N,delta:V};Nc(V,g.swipeDirection,g.swipeThreshold)?zo(gm,p,$,{discrete:!0}):zo(hm,m,$,{discrete:!0}),z.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),wm=e=>{const{__scopeToast:t,children:o,...r}=e,n=Vo(Wt,t),[a,s]=l.useState(!1),[i,d]=l.useState(!1);return Cm(()=>s(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(u)},[]),i?null:c.jsx(Mt,{asChild:!0,container:n.announcerContainer||void 0,children:c.jsx(Io,{...r,children:a&&c.jsxs(c.Fragment,{children:[n.label," ",o]})})})},ym="ToastTitle",wc=l.forwardRef((e,t)=>{const{__scopeToast:o,...r}=e;return c.jsx(H.div,{...r,ref:t})});wc.displayName=ym;var xm="ToastDescription",yc=l.forwardRef((e,t)=>{const{__scopeToast:o,...r}=e;return c.jsx(H.div,{...r,ref:t})});yc.displayName=xm;var xc="ToastAction",Cc=l.forwardRef((e,t)=>{const{altText:o,...r}=e;return o.trim()?c.jsx(Ec,{altText:o,asChild:!0,children:c.jsx(Fn,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${xc}\`. Expected non-empty \`string\`.`),null)});Cc.displayName=xc;var Sc="ToastClose",Fn=l.forwardRef((e,t)=>{const{__scopeToast:o,...r}=e,n=vm(Sc,o);return c.jsx(Ec,{asChild:!0,children:c.jsx(H.button,{type:"button",...r,ref:t,onClick:F(e.onClick,n.onClose)})})});Fn.displayName=Sc;var Ec=l.forwardRef((e,t)=>{const{__scopeToast:o,altText:r,...n}=e;return c.jsx(H.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...n,ref:t})});function Tc(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Sm(r)){const n=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!n)if(a){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...Tc(r))}}),t}function zo(e,t,o,{discrete:r}){const n=o.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),r?ia(n,a):n.dispatchEvent(a)}var Nc=(e,t,o=0)=>{const r=Math.abs(e.x),n=Math.abs(e.y),a=r>n;return t==="left"||t==="right"?a&&r>o:!a&&n>o};function Cm(e=()=>{}){const t=le(e);se(()=>{let o=0,r=0;return o=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(r)}},[t])}function Sm(e){return e.nodeType===e.ELEMENT_NODE}function Em(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function Bn(e){const t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var Tm=hc,Pc=mc,Ac=bc,kc=wc,Dc=yc,Oc=Cc,_c=Fn;const Ic=Tm,Rn=l.forwardRef(({className:e,...t},o)=>c.jsx(Pc,{ref:o,className:D("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Rn.displayName=Pc.displayName;const Nm=Ft("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Hn=l.forwardRef(({className:e,variant:t,...o},r)=>c.jsx(Ac,{ref:r,className:D(Nm({variant:t}),e),...o}));Hn.displayName=Ac.displayName;const Mc=l.forwardRef(({className:e,...t},o)=>c.jsx(Oc,{ref:o,className:D("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));Mc.displayName=Oc.displayName;const Vn=l.forwardRef(({className:e,...t},o)=>c.jsx(_c,{ref:o,className:D("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(Bt,{className:"h-4 w-4"})}));Vn.displayName=_c.displayName;const zn=l.forwardRef(({className:e,...t},o)=>c.jsx(kc,{ref:o,className:D("text-sm font-semibold",e),...t}));zn.displayName=kc.displayName;const Wn=l.forwardRef(({className:e,...t},o)=>c.jsx(Dc,{ref:o,className:D("text-sm opacity-90",e),...t}));Wn.displayName=Dc.displayName;const Pm=1,Am=1e6;let Un=0;function km(){return Un=(Un+1)%Number.MAX_SAFE_INTEGER,Un.toString()}const jn=new Map,Lc=e=>{if(jn.has(e))return;const t=setTimeout(()=>{jn.delete(e),Ut({type:"REMOVE_TOAST",toastId:e})},Am);jn.set(e,t)},Dm=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Pm)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=t;return o?Lc(o):e.toasts.forEach(r=>{Lc(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===o||o===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)}}},Wo=[];let Uo={toasts:[]};function Ut(e){Uo=Dm(Uo,e),Wo.forEach(t=>{t(Uo)})}function $c({...e}){const t=km(),o=n=>Ut({type:"UPDATE_TOAST",toast:{...n,id:t}}),r=()=>Ut({type:"DISMISS_TOAST",toastId:t});return Ut({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||r()}}}),{id:t,dismiss:r,update:o}}function Fc(){const[e,t]=l.useState(Uo);return l.useEffect(()=>(Wo.push(t),()=>{const o=Wo.indexOf(t);o>-1&&Wo.splice(o,1)}),[e]),{...e,toast:$c,dismiss:o=>Ut({type:"DISMISS_TOAST",toastId:o})}}function Om(){const{toasts:e}=Fc();return c.jsxs(Ic,{children:[e.map(function({id:t,title:o,description:r,action:n,...a}){return c.jsxs(Hn,{...a,children:[c.jsxs("div",{className:"grid gap-1",children:[o&&c.jsx(zn,{children:o}),r&&c.jsx(Wn,{children:r})]}),n,c.jsx(Vn,{})]},t)}),c.jsx(Rn,{})]})}var[jo]=pe("Tooltip",[Nt]),Yo=Nt(),Bc="TooltipProvider",_m=700,Yn="tooltip.open",[Im,Kn]=jo(Bc),Rc=e=>{const{__scopeTooltip:t,delayDuration:o=_m,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:a}=e,s=l.useRef(!0),i=l.useRef(!1),d=l.useRef(0);return l.useEffect(()=>{const u=d.current;return()=>window.clearTimeout(u)},[]),c.jsx(Im,{scope:t,isOpenDelayedRef:s,delayDuration:o,onOpen:l.useCallback(()=>{r<=0||(window.clearTimeout(d.current),s.current=!1)},[r]),onClose:l.useCallback(()=>{r<=0||(window.clearTimeout(d.current),d.current=window.setTimeout(()=>s.current=!0,r))},[r]),isPointerInTransitRef:i,onPointerInTransitChange:l.useCallback(u=>{i.current=u},[]),disableHoverableContent:n,children:a})};Rc.displayName=Bc;var jt="Tooltip",[Mm,Ko]=jo(jt),Hc=e=>{const{__scopeTooltip:t,children:o,open:r,defaultOpen:n,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,d=Kn(jt,e.__scopeTooltip),u=Yo(t),[f,h]=l.useState(null),m=Be(),p=l.useRef(0),w=s??d.disableHoverableContent,g=i??d.delayDuration,v=l.useRef(!1),[y,b]=Re({prop:r,defaultProp:n??!1,onChange:A=>{A?(d.onOpen(),document.dispatchEvent(new CustomEvent(Yn))):d.onClose(),a?.(A)},caller:jt}),x=l.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),S=l.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,b(!0)},[b]),T=l.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b(!1)},[b]),P=l.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,b(!0),p.current=0},g)},[g,b]);return l.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),c.jsx(Jr,{...u,children:c.jsx(Mm,{scope:t,contentId:m,open:y,stateAttribute:x,trigger:f,onTriggerChange:h,onTriggerEnter:l.useCallback(()=>{d.isOpenDelayedRef.current?P():S()},[d.isOpenDelayedRef,P,S]),onTriggerLeave:l.useCallback(()=>{w?T():(window.clearTimeout(p.current),p.current=0)},[T,w]),onOpen:S,onClose:T,disableHoverableContent:w,children:o})})};Hc.displayName=jt;var Gn="TooltipTrigger",Vc=l.forwardRef((e,t)=>{const{__scopeTooltip:o,...r}=e,n=Ko(Gn,o),a=Kn(Gn,o),s=Yo(o),i=l.useRef(null),d=K(t,i,n.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),h=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),c.jsx(No,{asChild:!0,...s,children:c.jsx(H.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:d,onPointerMove:F(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),f.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{n.onTriggerLeave(),f.current=!1}),onPointerDown:F(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:F(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:F(e.onBlur,n.onClose),onClick:F(e.onClick,n.onClose)})})});Vc.displayName=Gn;var Lm="TooltipPortal",[xv,$m]=jo(Lm,{forceMount:void 0}),kt="TooltipContent",zc=l.forwardRef((e,t)=>{const o=$m(kt,e.__scopeTooltip),{forceMount:r=o.forceMount,side:n="top",...a}=e,s=Ko(kt,e.__scopeTooltip);return c.jsx(ce,{present:r||s.open,children:s.disableHoverableContent?c.jsx(Wc,{side:n,...a,ref:t}):c.jsx(Fm,{side:n,...a,ref:t})})}),Fm=l.forwardRef((e,t)=>{const o=Ko(kt,e.__scopeTooltip),r=Kn(kt,e.__scopeTooltip),n=l.useRef(null),a=K(t,n),[s,i]=l.useState(null),{trigger:d,onClose:u}=o,f=n.current,{onPointerInTransitChange:h}=r,m=l.useCallback(()=>{i(null),h(!1)},[h]),p=l.useCallback((w,g)=>{const v=w.currentTarget,y={x:w.clientX,y:w.clientY},b=zm(y,v.getBoundingClientRect()),x=Wm(y,b),S=Um(g.getBoundingClientRect()),T=Ym([...x,...S]);i(T),h(!0)},[h]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(d&&f){const w=v=>p(v,f),g=v=>p(v,d);return d.addEventListener("pointerleave",w),f.addEventListener("pointerleave",g),()=>{d.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",g)}}},[d,f,p,m]),l.useEffect(()=>{if(s){const w=g=>{const v=g.target,y={x:g.clientX,y:g.clientY},b=d?.contains(v)||f?.contains(v),x=!jm(y,s);b?m():x&&(m(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,f,s,u,m]),c.jsx(Wc,{...e,ref:a})}),[Bm,Rm]=jo(jt,{isInside:!1}),Hm=wd("TooltipContent"),Wc=l.forwardRef((e,t)=>{const{__scopeTooltip:o,children:r,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,d=Ko(kt,o),u=Yo(o),{onClose:f}=d;return l.useEffect(()=>(document.addEventListener(Yn,f),()=>document.removeEventListener(Yn,f)),[f]),l.useEffect(()=>{if(d.trigger){const h=m=>{m.target instanceof Node&&m.target.contains(d.trigger)&&f()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[d.trigger,f]),c.jsx(ct,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:f,children:c.jsxs(en,{"data-state":d.stateAttribute,...u,...i,ref:t,style:{...i.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:[c.jsx(Hm,{children:r}),c.jsx(Bm,{scope:o,isInside:!0,children:c.jsx(qh,{id:d.contentId,role:"tooltip",children:n||r})})]})})});zc.displayName=kt;var Uc="TooltipArrow",Vm=l.forwardRef((e,t)=>{const{__scopeTooltip:o,...r}=e,n=Yo(o);return Rm(Uc,o).isInside?null:c.jsx(tn,{...n,...r,ref:t})});Vm.displayName=Uc;function zm(e,t){const o=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(o,r,n,a)){case a:return"left";case n:return"right";case o:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Wm(e,t,o=5){const r=[];switch(t){case"top":r.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":r.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":r.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":r.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return r}function Um(e){const{top:t,right:o,bottom:r,left:n}=e;return[{x:n,y:t},{x:o,y:t},{x:o,y:r},{x:n,y:r}]}function jm(e,t){const{x:o,y:r}=e;let n=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],d=t[s],u=i.x,f=i.y,h=d.x,m=d.y;f>r!=m>r&&o<(h-u)*(r-f)/(m-f)+u&&(n=!n)}return n}function Ym(e){const t=e.slice();return t.sort((o,r)=>o.x<r.x?-1:o.x>r.x?1:o.y<r.y?-1:o.y>r.y?1:0),Km(t)}function Km(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))t.pop();else break}t.push(n)}t.pop();const o=[];for(let r=e.length-1;r>=0;r--){const n=e[r];for(;o.length>=2;){const a=o[o.length-1],s=o[o.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))o.pop();else break}o.push(n)}return o.pop(),t.length===1&&o.length===1&&t[0].x===o[0].x&&t[0].y===o[0].y?t:t.concat(o)}var Gm=Rc,Xm=Hc,qm=Vc,jc=zc;const Zm=Gm,Qm=Xm,Jm=qm,Yc=l.forwardRef(({className:e,sideOffset:t=4,...o},r)=>c.jsx(jc,{ref:r,sideOffset:t,className:D("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o}));Yc.displayName=jc.displayName;function ev({children:e,className:t}){return c.jsx("main",{className:D("p-6 space-y-6 pb-24",t),children:e})}function tv({title:e="No users found",description:t="Try adjusting your filters or invite a new user.",showCTA:o=!0,onCTA:r,ctaLabel:n="Invite"}){return c.jsxs("div",{className:"flex flex-col items-center justify-center py-16 px-4",children:[c.jsx("div",{className:"w-16 h-16 rounded-full bg-muted flex items-center justify-center mb-4",children:c.jsx(qf,{className:"h-8 w-8 text-muted-foreground"})}),c.jsx("h3",{className:"text-lg font-semibold text-foreground mb-1",children:e}),c.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-sm mb-6",children:t}),o&&r&&c.jsxs(We,{onClick:r,className:"gap-2",children:[c.jsx(Xf,{className:"h-4 w-4"}),n]})]})}function ov({open:e,onOpenChange:t,title:o,description:r,submitLabel:n="Create",isSubmitting:a=!1,onSubmit:s,children:i}){return c.jsx(Vs,{open:e,onOpenChange:t,children:c.jsxs(_r,{className:"sm:max-w-[425px]",children:[c.jsxs(Ir,{children:[c.jsx(Lr,{children:o}),r&&c.jsx($r,{children:r})]}),i,c.jsxs(Mr,{children:[c.jsx(We,{variant:"ghost",onClick:()=>t(!1),disabled:a,children:"Cancel"}),c.jsx(We,{onClick:s,disabled:a,children:a?c.jsxs(c.Fragment,{children:[c.jsx(Hs,{className:"h-4 w-4 mr-2 animate-spin"}),"Submitting..."]}):n})]})]})})}function Kc({open:e,onOpenChange:t,title:o,description:r,confirmLabel:n="Confirm",cancelLabel:a="Cancel",variant:s="default",isLoading:i=!1,onConfirm:d}){const u=()=>{d()};return c.jsx(gs,{open:e,onOpenChange:t,children:c.jsxs(pr,{children:[c.jsxs(hr,{children:[c.jsx(mr,{children:o}),c.jsx(vr,{children:r})]}),c.jsxs(gr,{children:[c.jsx(wr,{disabled:i,children:a}),c.jsx(br,{onClick:u,disabled:i,className:s==="destructive"?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"",children:i?"Processing...":n})]})]})})}const Xn=C.createContext(null),Gc=C.forwardRef(({onClose:e,children:t},o)=>{const[r,n]=C.useState([]),[a,s]=C.useState(null),i=C.useRef(!1),d=C.useRef([]),u=r.length>0;r.length>0&&(d.current=r);const f=u?r:d.current;!u&&a===null&&(i.current=!1);const h=C.useCallback(g=>{n(v=>[...v,g])},[]),m=C.useCallback(()=>{n(g=>{const v=g.slice(0,-1);return v.length===0&&(i.current=!0,e()),v})},[e]);C.useImperativeHandle(o,()=>({push:h,pop:m}),[h,m]);const p=C.useCallback(g=>{g||(i.current=!0,n([]),e())},[e]),w=C.useMemo(()=>({displayStack:f,portalTarget:a,isDismissingRef:i}),[f,a]);return c.jsxs(Xn.Provider,{value:w,children:[t,c.jsx(Wl,{open:u,onOpenChange:p,children:c.jsx(An,{className:"w-full sm:max-w-md !p-0",children:c.jsx("div",{ref:s,className:"relative h-full overflow-hidden isolate"})})})]})});Gc.displayName="DetailSheet";function Xc(){const e=C.useContext(Xn);if(!e)throw new Error("useDetailSheet must be used within a DetailSheet");return e}function qc(e){const{displayStack:t,portalTarget:o,isDismissingRef:r}=Xc(),n=t.includes(e),a=t.length>0&&t[t.length-1]===e,s=t.indexOf(e);return{isActive:n,isTopPanel:a,depth:s,portalTarget:o,isDismissingRef:r}}function rv({panelKey:e,children:t}){const{isActive:o,isTopPanel:r,depth:n,portalTarget:a,isDismissingRef:s}=qc(e),i=C.useRef(null),[d,u]=C.useState(!1),[f,h]=C.useState(!1),m=C.useRef(!1),p=m.current;m.current=o,o&&!s.current&&(i.current=t),C.useEffect(()=>{a||(m.current=!1,h(!1),u(!1))},[a]),C.useEffect(()=>{p&&!o&&(s.current||h(!0)),!p&&o&&(h(!1),u(n===0))},[o,p,n,s]);const w=o||f||p&&!o&&!s.current,g=C.useCallback(S=>{S.animationName==="enter"&&u(!0)},[]),v=C.useCallback(S=>{f&&S.target===S.currentTarget&&S.propertyName==="transform"&&h(!1)},[f]);if(!w||!a)return null;const y=o&&!s.current?t:i.current,b=o&&!r&&!f,x=!d&&!f&&o;return Xt.createPortal(c.jsx("div",{className:D("absolute inset-0 overflow-y-auto p-6 pt-10",x&&"animate-in slide-in-from-right duration-300",d&&"transition-[transform,opacity] duration-300 ease-in-out",d&&r&&!f&&"translate-x-0 opacity-100",b&&"-translate-x-8 scale-[0.97] opacity-0",f&&"transition-[transform,opacity] duration-300 ease-in-out translate-x-full opacity-0"),style:{zIndex:Math.max(n,0)},onAnimationEnd:g,onTransitionEnd:v,children:y}),a)}function nv({value:e,onSave:t,className:o,readOnly:r}){const[n,a]=C.useState(!1),[s,i]=C.useState(e),[d,u]=C.useState(!1),f=C.useRef(null),h=s.trim().length>0&&s.trim()!==e,m=C.useCallback(()=>{i(e),a(!0)},[e]),p=C.useCallback(()=>{a(!1),i(e)},[e]),w=C.useCallback(async()=>{if(h){u(!0);try{await t(s.trim()),a(!1)}catch(y){console.error("Failed to save:",y)}finally{u(!1)}}},[h,s,t]),g=C.useCallback(y=>{y.key==="Escape"?p():y.key==="Enter"&&h&&w()},[p,w,h]),v=C.useCallback(y=>{f.current?.contains(y.relatedTarget)||p()},[p]);return r?c.jsx("h2",{className:D("text-lg font-semibold truncate",o),children:e}):n?c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Fr,{value:s,onChange:y=>i(y.target.value),onKeyDown:g,onBlur:v,autoFocus:!0,disabled:d,className:D("h-8 text-lg font-semibold",o)}),c.jsx(We,{ref:f,size:"icon",onClick:h?w:p,disabled:d,className:D("h-8 w-8 shrink-0 text-white hover:translate-y-0 hover:shadow-none disabled:opacity-40",h?"bg-green-500 hover:bg-green-600 disabled:bg-green-500":"bg-red-500 hover:bg-red-600"),children:c.jsxs("div",{className:"relative h-4 w-4",children:[c.jsx(Hs,{className:D("h-4 w-4 absolute transition-opacity duration-200 animate-spin",d?"opacity-100":"opacity-0")}),c.jsx(Ar,{className:D("h-4 w-4 absolute transition-opacity duration-200",!d&&h?"opacity-100":"opacity-0")}),c.jsx(Bt,{className:D("h-4 w-4 absolute transition-opacity duration-200",!d&&!h?"opacity-100":"opacity-0")})]})})]}):c.jsxs("div",{className:"group flex items-center gap-2",children:[c.jsx("h2",{onClick:m,className:D("text-lg font-semibold truncate cursor-text transition-colors group-hover:text-primary/80",o),children:e}),c.jsx(We,{size:"icon",variant:"ghost",onClick:m,className:"h-8 w-8 shrink-0 text-muted-foreground hover:bg-transparent hover:text-muted-foreground group-hover:bg-accent group-hover:text-foreground",children:c.jsx(Gf,{className:"h-3.5 w-3.5"})})]})}function av({buttonLabel:e,confirmLabel:t="Confirm",modalTitle:o,modalDescription:r,isLoading:n,onConfirm:a}){const[s,i]=C.useState(!1);return c.jsxs(c.Fragment,{children:[c.jsx(We,{variant:"outline",size:"sm",className:"border-destructive text-destructive hover:bg-destructive hover:text-destructive-foreground w-full",onClick:()=>i(!0),children:e}),c.jsx(Kc,{open:s,onOpenChange:i,title:o,description:r,confirmLabel:t,variant:"destructive",isLoading:n,onConfirm:a})]})}function sv({actions:e}){return c.jsxs("div",{className:"space-y-2",children:[c.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Danger Zone"}),e.map((t,o)=>c.jsx(av,{...t},o))]})}function iv({icon:e,label:t,badge:o,onClick:r}){return c.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-2 p-2 bg-muted/30 rounded-lg w-full text-left hover:bg-muted/50 transition-colors cursor-pointer",children:[c.jsx("span",{className:"text-muted-foreground [&>svg]:h-4 [&>svg]:w-4",children:e}),c.jsx("span",{className:"text-sm text-foreground flex-1",children:t}),o,c.jsx(Yf,{className:"h-4 w-4 text-muted-foreground"})]})}function lv({icon:e,message:t}){return c.jsxs("div",{className:"p-4 bg-muted/30 rounded-lg text-center",children:[c.jsx("div",{className:"h-8 w-8 text-muted-foreground mx-auto mb-2 [&>svg]:h-8 [&>svg]:w-8 [&>svg]:mx-auto",children:e}),c.jsx("p",{className:"text-sm text-muted-foreground",children:t})]})}function cv(){const e=C.useRef(null),t=C.useCallback(r=>{e.current?.push(r)},[]),o=C.useCallback(()=>{e.current?.pop()},[]);return{ref:e,push:t,pop:o}}E.AlertDialog=gs,E.AlertDialogAction=br,E.AlertDialogCancel=wr,E.AlertDialogContent=pr,E.AlertDialogDescription=vr,E.AlertDialogFooter=gr,E.AlertDialogHeader=hr,E.AlertDialogOverlay=fr,E.AlertDialogPortal=ms,E.AlertDialogTitle=mr,E.AlertDialogTrigger=_f,E.AppShell=dd,E.Avatar=xs,E.AvatarFallback=Ss,E.AvatarImage=Cs,E.Badge=Ts,E.Button=We,E.Card=Ns,E.CardContent=Ds,E.CardDescription=ks,E.CardFooter=Os,E.CardHeader=Ps,E.CardTitle=As,E.Checkbox=Dr,E.ConfirmModal=ea,E.ConfirmationModal=Kc,E.Container=ev,E.DangerZoneSection=sv,E.DetailPanel=rv,E.DetailSheet=Gc,E.DetailSheetContext=Xn,E.Dialog=Vs,E.DialogClose=Qf,E.DialogContent=_r,E.DialogDescription=$r,E.DialogFooter=Mr,E.DialogHeader=Ir,E.DialogOverlay=Or,E.DialogPortal=zs,E.DialogTitle=Lr,E.DialogTrigger=Zf,E.EditableTitle=nv,E.EmptyState=tv,E.FormModal=ov,E.Input=Fr,E.Label=js,E.MultiSelect=Nh,E.NavigationListItem=iv,E.PanelEmptyState=lv,E.Popover=Mi,E.PopoverContent=rn,E.PopoverTrigger=Li,E.Progress=Wi,E.RadixToaster=Om,E.ScrollArea=al,E.ScrollBar=fn,E.Select=wg,E.SelectContent=Ll,E.SelectGroup=yg,E.SelectItem=Fl,E.SelectLabel=$l,E.SelectScrollDownButton=Nn,E.SelectScrollUpButton=Tn,E.SelectSeparator=Bl,E.SelectTrigger=Ml,E.SelectValue=xg,E.Separator=zl,E.Sheet=Wl,E.SheetClose=Ng,E.SheetContent=An,E.SheetDescription=Gl,E.SheetFooter=Yl,E.SheetHeader=jl,E.SheetOverlay=Pn,E.SheetPortal=Ul,E.SheetTitle=Kl,E.SheetTrigger=Tg,E.Skeleton=Ag,E.SonnerToaster=rm,E.Switch=nc,E.Table=ac,E.TableBody=ic,E.TableCaption=fc,E.TableCell=uc,E.TableFooter=lc,E.TableHead=dc,E.TableHeader=sc,E.TableRow=cc,E.Toast=Hn,E.ToastAction=Mc,E.ToastClose=Vn,E.ToastDescription=Wn,E.ToastProvider=Ic,E.ToastTitle=zn,E.ToastViewport=Rn,E.Tooltip=Qm,E.TooltipContent=Yc,E.TooltipProvider=Zm,E.TooltipTrigger=Jm,E.VenueSwitcher=ta,E.badgeVariants=Es,E.buttonVariants=ho,E.cn=D,E.sonnerToast=Ug,E.toast=$c,E.useDetailPanel=qc,E.useDetailSheet=Xc,E.useDetailSheetControls=cv,E.useTheme=Xo,E.useToast=Fc,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
|
|
46
|
+
Defaulting to \`null\`.`}var Ki=Wi,Fh=Ri;const Gi=c.forwardRef(({className:e,value:t,...r},o)=>l.jsx(Ki,{ref:o,className:_("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:l.jsx(Fh,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Gi.displayName=Ki.displayName;var Bh=c.createContext(void 0);function Xi(e){const t=c.useContext(Bh);return e||t||"ltr"}function fn(e,[t,r]){return Math.min(r,Math.max(t,e))}function Hh(e,t){return c.useReducer((r,o)=>t[r][o]??r,e)}var pn="ScrollArea",[qi]=ve(pn),[Vh,ye]=qi(pn),Zi=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:o="hover",dir:n,scrollHideDelay:a=600,...s}=e,[i,d]=c.useState(null),[u,f]=c.useState(null),[h,m]=c.useState(null),[p,w]=c.useState(null),[g,v]=c.useState(null),[y,b]=c.useState(0),[x,S]=c.useState(0),[E,T]=c.useState(!1),[A,V]=c.useState(!1),D=q(t,$=>d($)),F=Xi(n);return l.jsx(Vh,{scope:r,type:o,dir:F,scrollHideDelay:a,scrollArea:i,viewport:u,onViewportChange:f,content:h,onContentChange:m,scrollbarX:p,onScrollbarXChange:w,scrollbarXEnabled:E,onScrollbarXEnabledChange:T,scrollbarY:g,onScrollbarYChange:v,scrollbarYEnabled:A,onScrollbarYEnabledChange:V,onCornerWidthChange:b,onCornerHeightChange:S,children:l.jsx(W.div,{dir:F,...s,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});Zi.displayName=pn;var Qi="ScrollAreaViewport",Ji=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:o,nonce:n,...a}=e,s=ye(Qi,r),i=c.useRef(null),d=q(t,i,s.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx(Wh,{nonce:n}),l.jsx(W.div,{"data-radix-scroll-area-viewport":"",...a,ref:d,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});Ji.displayName=Qi;var Wh=c.memo(({nonce:e})=>l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e}),(e,t)=>e.nonce===t.nonce),Le="ScrollAreaScrollbar",hn=c.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=ye(Le,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=n,i=e.orientation==="horizontal";return c.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),n.type==="hover"?l.jsx(zh,{...o,ref:t,forceMount:r}):n.type==="scroll"?l.jsx(Rh,{...o,ref:t,forceMount:r}):n.type==="auto"?l.jsx(el,{...o,ref:t,forceMount:r}):n.type==="always"?l.jsx(gn,{...o,ref:t,"data-state":"visible"}):null});hn.displayName=Le;var zh=c.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=ye(Le,e.__scopeScrollArea),[a,s]=c.useState(!1);return c.useEffect(()=>{const i=n.scrollArea;let d=0;if(i){const u=()=>{window.clearTimeout(d),s(!0)},f=()=>{d=window.setTimeout(()=>s(!1),n.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(d),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",f)}}},[n.scrollArea,n.scrollHideDelay]),l.jsx(he,{present:r||a,children:l.jsx(el,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Rh=c.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=ye(Le,e.__scopeScrollArea),a=e.orientation==="horizontal",s=Lr(()=>d("SCROLL_END"),100),[i,d]=Hh("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return c.useEffect(()=>{if(i==="idle"){const u=window.setTimeout(()=>d("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,n.scrollHideDelay,d]),c.useEffect(()=>{const u=n.viewport,f=a?"scrollLeft":"scrollTop";if(u){let h=u[f];const m=()=>{const p=u[f];h!==p&&(d("SCROLL"),s()),h=p};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[n.viewport,a,d,s]),l.jsx(he,{present:r||i!=="hidden",children:l.jsx(gn,{"data-state":i==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:H(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:H(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),el=c.forwardRef((e,t)=>{const r=ye(Le,e.__scopeScrollArea),{forceMount:o,...n}=e,[a,s]=c.useState(!1),i=e.orientation==="horizontal",d=Lr(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,f=r.viewport.offsetHeight<r.viewport.scrollHeight;s(i?u:f)}},10);return Lt(r.viewport,d),Lt(r.content,d),l.jsx(he,{present:o||a,children:l.jsx(gn,{"data-state":a?"visible":"hidden",...n,ref:t})})}),gn=c.forwardRef((e,t)=>{const{orientation:r="vertical",...o}=e,n=ye(Le,e.__scopeScrollArea),a=c.useRef(null),s=c.useRef(0),[i,d]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=al(i.viewport,i.content),f={...o,sizes:i,onSizesChange:d,hasThumb:u>0&&u<1,onThumbChange:m=>a.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function h(m,p){return Xh(m,s.current,i,p)}return r==="horizontal"?l.jsx(Uh,{...f,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const m=n.viewport.scrollLeft,p=sl(m,i,n.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:m=>{n.viewport&&(n.viewport.scrollLeft=m)},onDragScroll:m=>{n.viewport&&(n.viewport.scrollLeft=h(m,n.dir))}}):r==="vertical"?l.jsx(jh,{...f,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const m=n.viewport.scrollTop,p=sl(m,i);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:m=>{n.viewport&&(n.viewport.scrollTop=m)},onDragScroll:m=>{n.viewport&&(n.viewport.scrollTop=h(m))}}):null}),Uh=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:o,...n}=e,a=ye(Le,e.__scopeScrollArea),[s,i]=c.useState(),d=c.useRef(null),u=q(t,d,a.onScrollbarXChange);return c.useEffect(()=>{d.current&&i(getComputedStyle(d.current))},[d]),l.jsx(rl,{"data-orientation":"horizontal",...n,ref:u,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Ir(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,h)=>{if(a.viewport){const m=a.viewport.scrollLeft+f.deltaX;e.onWheelScroll(m),ll(m,h)&&f.preventDefault()}},onResize:()=>{d.current&&a.viewport&&s&&o({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Mr(s.paddingLeft),paddingEnd:Mr(s.paddingRight)}})}})}),jh=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:o,...n}=e,a=ye(Le,e.__scopeScrollArea),[s,i]=c.useState(),d=c.useRef(null),u=q(t,d,a.onScrollbarYChange);return c.useEffect(()=>{d.current&&i(getComputedStyle(d.current))},[d]),l.jsx(rl,{"data-orientation":"vertical",...n,ref:u,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Ir(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,h)=>{if(a.viewport){const m=a.viewport.scrollTop+f.deltaY;e.onWheelScroll(m),ll(m,h)&&f.preventDefault()}},onResize:()=>{d.current&&a.viewport&&s&&o({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Mr(s.paddingTop),paddingEnd:Mr(s.paddingBottom)}})}})}),[Yh,tl]=qi(Le),rl=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:o,hasThumb:n,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:d,onDragScroll:u,onWheelScroll:f,onResize:h,...m}=e,p=ye(Le,r),[w,g]=c.useState(null),v=q(t,D=>g(D)),y=c.useRef(null),b=c.useRef(""),x=p.viewport,S=o.content-o.viewport,E=ue(f),T=ue(d),A=Lr(h,10);function V(D){if(y.current){const F=D.clientX-y.current.left,$=D.clientY-y.current.top;u({x:F,y:$})}}return c.useEffect(()=>{const D=F=>{const $=F.target;w?.contains($)&&E(F,S)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[x,w,S,E]),c.useEffect(T,[o,T]),Lt(w,A),Lt(p.content,A),l.jsx(Yh,{scope:r,scrollbar:w,hasThumb:n,onThumbChange:ue(a),onThumbPointerUp:ue(s),onThumbPositionChange:T,onThumbPointerDown:ue(i),children:l.jsx(W.div,{...m,ref:v,style:{position:"absolute",...m.style},onPointerDown:H(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),y.current=w.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),V(D))}),onPointerMove:H(e.onPointerMove,V),onPointerUp:H(e.onPointerUp,D=>{const F=D.target;F.hasPointerCapture(D.pointerId)&&F.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=b.current,p.viewport&&(p.viewport.style.scrollBehavior=""),y.current=null})})})}),_r="ScrollAreaThumb",ol=c.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=tl(_r,e.__scopeScrollArea);return l.jsx(he,{present:r||n.hasThumb,children:l.jsx(Kh,{ref:t,...o})})}),Kh=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:o,...n}=e,a=ye(_r,r),s=tl(_r,r),{onThumbPositionChange:i}=s,d=q(t,h=>s.onThumbChange(h)),u=c.useRef(void 0),f=Lr(()=>{u.current&&(u.current(),u.current=void 0)},100);return c.useEffect(()=>{const h=a.viewport;if(h){const m=()=>{if(f(),!u.current){const p=qh(h,i);u.current=p,i()}};return i(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[a.viewport,f,i]),l.jsx(W.div,{"data-state":s.hasThumb?"visible":"hidden",...n,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:H(e.onPointerDownCapture,h=>{const p=h.target.getBoundingClientRect(),w=h.clientX-p.left,g=h.clientY-p.top;s.onThumbPointerDown({x:w,y:g})}),onPointerUp:H(e.onPointerUp,s.onThumbPointerUp)})});ol.displayName=_r;var mn="ScrollAreaCorner",nl=c.forwardRef((e,t)=>{const r=ye(mn,e.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?l.jsx(Gh,{...e,ref:t}):null});nl.displayName=mn;var Gh=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,...o}=e,n=ye(mn,r),[a,s]=c.useState(0),[i,d]=c.useState(0),u=!!(a&&i);return Lt(n.scrollbarX,()=>{const f=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(f),d(f)}),Lt(n.scrollbarY,()=>{const f=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(f),s(f)}),u?l.jsx(W.div,{...o,ref:t,style:{width:a,height:i,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Mr(e){return e?parseInt(e,10):0}function al(e,t){const r=e/t;return isNaN(r)?0:r}function Ir(e){const t=al(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-r)*t;return Math.max(o,18)}function Xh(e,t,r,o="ltr"){const n=Ir(r),a=n/2,s=t||a,i=n-s,d=r.scrollbar.paddingStart+s,u=r.scrollbar.size-r.scrollbar.paddingEnd-i,f=r.content-r.viewport,h=o==="ltr"?[0,f]:[f*-1,0];return il([d,u],h)(e)}function sl(e,t,r="ltr"){const o=Ir(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,s=t.content-t.viewport,i=a-o,d=r==="ltr"?[0,s]:[s*-1,0],u=fn(e,d);return il([0,s],[0,i])(u)}function il(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(r-e[0])}}function ll(e,t){return e>0&&e<t}var qh=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},o=0;return(function n(){const a={left:e.scrollLeft,top:e.scrollTop},s=r.left!==a.left,i=r.top!==a.top;(s||i)&&t(),r=a,o=window.requestAnimationFrame(n)})(),()=>window.cancelAnimationFrame(o)};function Lr(e,t){const r=ue(e),o=c.useRef(0);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),c.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,t)},[r,t])}function Lt(e,t){const r=ue(t);de(()=>{let o=0;if(e){const n=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(o),n.unobserve(e)}}},[e,r])}var cl=Zi,Zh=Ji,Qh=nl;const dl=c.forwardRef(({className:e,children:t,...r},o)=>l.jsxs(cl,{ref:o,className:_("relative overflow-hidden",e),...r,children:[l.jsx(Zh,{className:"h-full w-full rounded-[inherit]",children:t}),l.jsx(vn,{}),l.jsx(Qh,{})]}));dl.displayName=cl.displayName;const vn=c.forwardRef(({className:e,orientation:t="vertical",...r},o)=>l.jsx(hn,{ref:o,orientation:t,className:_("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:l.jsx(ol,{className:"relative flex-1 rounded-full bg-border"})}));vn.displayName=hn.displayName;function ul(e){const t=e+"CollectionProvider",[r,o]=ve(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:v,children:y}=g,b=c.useRef(null),x=c.useRef(new Map).current;return l.jsx(n,{scope:v,itemMap:x,collectionRef:b,children:y})};s.displayName=t;const i=e+"CollectionSlot",d=it(i),u=c.forwardRef((g,v)=>{const{scope:y,children:b}=g,x=a(i,y),S=q(v,x.collectionRef);return l.jsx(d,{ref:S,children:b})});u.displayName=i;const f=e+"CollectionItemSlot",h="data-radix-collection-item",m=it(f),p=c.forwardRef((g,v)=>{const{scope:y,children:b,...x}=g,S=c.useRef(null),E=q(v,S),T=a(f,y);return c.useEffect(()=>(T.itemMap.set(S,{ref:S,...x}),()=>{T.itemMap.delete(S)})),l.jsx(m,{[h]:"",ref:E,children:b})});p.displayName=f;function w(g){const v=a(e+"CollectionConsumer",g);return c.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((T,A)=>x.indexOf(T.ref.current)-x.indexOf(A.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},w,o]}var fl=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"}),Jh="VisuallyHidden",$r=c.forwardRef((e,t)=>l.jsx(W.span,{...e,ref:t,style:{...fl,...e.style}}));$r.displayName=Jh;var eg=$r,tg=[" ","Enter","ArrowUp","ArrowDown"],rg=[" ","Enter"],ut="Select",[Fr,Br,og]=ul(ut),[ft]=ve(ut,[og,Mt]),Hr=Mt(),[ng,et]=ft(ut),[ag,sg]=ft(ut),ig="SelectProvider";function pl(e){const{__scopeSelect:t,children:r,open:o,defaultOpen:n,onOpenChange:a,value:s,defaultValue:i,onValueChange:d,dir:u,name:f,autoComplete:h,disabled:m,required:p,form:w,internal_do_not_use_render:g}=e,v=Hr(t),[y,b]=c.useState(null),[x,S]=c.useState(null),[E,T]=c.useState(!1),A=Xi(u),[V,D]=je({prop:o,defaultProp:n??!1,onChange:a,caller:ut}),[F,$]=je({prop:s,defaultProp:i,onChange:d,caller:ut}),P=c.useRef(null),Y=y?!!w||!!y.closest("form"):!0,[k,R]=c.useState(new Set),B=Ue(),z=Array.from(k).map(te=>te.props.value).join(";"),L=c.useCallback(te=>{R(U=>new Set(U).add(te))},[]),M=c.useCallback(te=>{R(U=>{const X=new Set(U);return X.delete(te),X})},[]),G={required:p,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:E,onValueNodeHasChildrenChange:T,contentId:B,value:F,onValueChange:$,open:V,onOpenChange:D,dir:A,triggerPointerDownPosRef:P,disabled:m,name:f,autoComplete:h,form:w,nativeOptions:k,nativeSelectKey:z,isFormControl:Y};return l.jsx(nn,{...v,children:l.jsx(ng,{scope:t,...G,children:l.jsx(Fr.Provider,{scope:t,children:l.jsx(ag,{scope:t,onNativeOptionAdd:L,onNativeOptionRemove:M,children:xg(g)?g(G):r})})})})}pl.displayName=ig;var hl=e=>{const{__scopeSelect:t,children:r,...o}=e;return l.jsx(pl,{__scopeSelect:t,...o,internal_do_not_use_render:({isFormControl:n})=>l.jsxs(l.Fragment,{children:[r,n?l.jsx($l,{__scopeSelect:t}):null]})})};hl.displayName=ut;var gl="SelectTrigger",bn=c.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:o=!1,...n}=e,a=Hr(r),s=et(gl,r),i=s.disabled||o,d=q(t,s.onTriggerChange),u=Br(r),f=c.useRef("touch"),[h,m,p]=Fl(g=>{const v=u().filter(x=>!x.disabled),y=v.find(x=>x.value===s.value),b=Bl(v,g,y);b!==void 0&&s.onValueChange(b.value)}),w=g=>{i||(s.onOpenChange(!0),p()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return l.jsx(kr,{asChild:!0,...a,children:l.jsx(W.button,{type:"button",role:"combobox","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Wr(s.value)?"":void 0,...n,ref:d,onClick:H(n.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&w(g)}),onPointerDown:H(n.onPointerDown,g=>{f.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(w(g),g.preventDefault())}),onKeyDown:H(n.onKeyDown,g=>{const v=h.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&m(g.key),!(v&&g.key===" ")&&tg.includes(g.key)&&(w(),g.preventDefault())})})})});bn.displayName=gl;var ml="SelectValue",vl=c.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:n,children:a,placeholder:s="",...i}=e,d=et(ml,r),{onValueNodeHasChildrenChange:u}=d,f=a!==void 0,h=q(t,d.onValueNodeChange);de(()=>{u(f)},[u,f]);const m=Wr(d.value);return l.jsx(W.span,{...i,asChild:m?!1:i.asChild,ref:h,style:{pointerEvents:"none"},children:l.jsx(c.Fragment,{children:m?s:a},m?"placeholder":"value")})});vl.displayName=ml;var lg="SelectIcon",bl=c.forwardRef((e,t)=>{const{__scopeSelect:r,children:o,...n}=e;return l.jsx(W.span,{"aria-hidden":!0,...n,ref:t,children:o||"▼"})});bl.displayName=lg;var wl="SelectPortal",[cg,dg]=ft(wl,{forceMount:void 0}),yl=e=>{const{__scopeSelect:t,forceMount:r,...o}=e;return l.jsx(cg,{scope:e.__scopeSelect,forceMount:r,children:l.jsx(Vt,{asChild:!0,...o})})};yl.displayName=wl;var tt="SelectContent",wn=c.forwardRef((e,t)=>{const r=dg(tt,e.__scopeSelect),{forceMount:o=r.forceMount,...n}=e,a=et(tt,e.__scopeSelect),[s,i]=c.useState();return de(()=>{i(new DocumentFragment)},[]),l.jsx(he,{present:o||a.open,children:({present:d})=>d?l.jsx(Sl,{...n,ref:t}):l.jsx(xl,{...n,fragment:s})})});wn.displayName=tt;var xl=c.forwardRef((e,t)=>{const{__scopeSelect:r,children:o,fragment:n}=e;return n?ht.createPortal(l.jsx(Cl,{scope:r,children:l.jsx(Fr.Slot,{scope:r,children:l.jsx("div",{ref:t,children:o})})}),n):null});xl.displayName="SelectContentFragment";var Ne=10,[Cl,rt]=ft(tt),ug="SelectContentImpl",fg=it("SelectContent.RemoveScroll"),Sl=c.forwardRef((e,t)=>{const{__scopeSelect:r}=e,{position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:d,align:u,alignOffset:f,arrowPadding:h,collisionBoundary:m,collisionPadding:p,sticky:w,hideWhenDetached:g,avoidCollisions:v,...y}=e,b=et(tt,r),[x,S]=c.useState(null),[E,T]=c.useState(null),A=q(t,I=>S(I)),[V,D]=c.useState(null),[F,$]=c.useState(null),P=Br(r),[Y,k]=c.useState(!1),R=c.useRef(!1);c.useEffect(()=>{if(x)return uo(x)},[x]),no();const B=c.useCallback(I=>{const[Z,...ie]=P().map(ae=>ae.ref.current),[J]=ie.slice(-1),ee=document.activeElement;for(const ae of I)if(ae===ee||(ae?.scrollIntoView({block:"nearest"}),ae===Z&&E&&(E.scrollTop=0),ae===J&&E&&(E.scrollTop=E.scrollHeight),ae?.focus(),document.activeElement!==ee))return},[P,E]),z=c.useCallback(()=>B([V,x]),[B,V,x]);c.useEffect(()=>{Y&&z()},[Y,z]);const{onOpenChange:L,triggerPointerDownPosRef:M}=b;c.useEffect(()=>{if(x){let I={x:0,y:0};const Z=J=>{I={x:Math.abs(Math.round(J.pageX)-(M.current?.x??0)),y:Math.abs(Math.round(J.pageY)-(M.current?.y??0))}},ie=J=>{I.x<=10&&I.y<=10?J.preventDefault():J.composedPath().includes(x)||L(!1),document.removeEventListener("pointermove",Z),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",ie,{capture:!0})}}},[x,L,M]),c.useEffect(()=>{const I=()=>L(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[L]);const[G,te]=Fl(I=>{const Z=P().filter(ee=>!ee.disabled),ie=Z.find(ee=>ee.ref.current===document.activeElement),J=Bl(Z,I,ie);J&&setTimeout(()=>J.ref.current?.focus())}),U=c.useCallback((I,Z,ie)=>{const J=!R.current&&!ie;(b.value!==void 0&&b.value===Z||J)&&(D(I),J&&(R.current=!0))},[b.value]),X=c.useCallback(()=>x?.focus(),[x]),Q=c.useCallback((I,Z,ie)=>{const J=!R.current&&!ie;(b.value!==void 0&&b.value===Z||J)&&$(I)},[b.value]),oe=o==="popper"?yn:El,fe=oe===yn?{side:i,sideOffset:d,align:u,alignOffset:f,arrowPadding:h,collisionBoundary:m,collisionPadding:p,sticky:w,hideWhenDetached:g,avoidCollisions:v}:{};return l.jsx(Cl,{scope:r,content:x,viewport:E,onViewportChange:T,itemRefCallback:U,selectedItem:V,onItemLeave:X,itemTextRefCallback:Q,focusSelectedItem:z,selectedItemText:F,position:o,isPositioned:Y,searchRef:G,children:l.jsx(cr,{as:fg,allowPinchZoom:!0,children:l.jsx(tr,{asChild:!0,trapped:b.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:H(n,I=>{b.trigger?.focus({preventScroll:!0}),I.preventDefault()}),children:l.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:l.jsx(oe,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:I=>I.preventDefault(),...y,...fe,onPlaced:()=>k(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:H(y.onKeyDown,I=>{const Z=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!Z&&I.key.length===1&&te(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let J=P().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);if(["ArrowUp","End"].includes(I.key)&&(J=J.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const ee=I.target,ae=J.indexOf(ee);J=J.slice(ae+1)}setTimeout(()=>B(J)),I.preventDefault()}})})})})})})});Sl.displayName=ug;var pg="SelectItemAlignedPosition",El=c.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:o,...n}=e,a=et(tt,r),s=rt(tt,r),[i,d]=c.useState(null),[u,f]=c.useState(null),h=q(t,A=>f(A)),m=Br(r),p=c.useRef(!1),w=c.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=s,x=c.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&g&&v&&y){const A=a.trigger.getBoundingClientRect(),V=u.getBoundingClientRect(),D=a.valueNode.getBoundingClientRect(),F=y.getBoundingClientRect();if(a.dir!=="rtl"){const ee=F.left-V.left,ae=D.left-ee,me=A.left-ae,pe=A.width+me,Pe=Math.max(pe,V.width),$e=window.innerWidth-Ne,ot=fn(ae,[Ne,Math.max(Ne,$e-Pe)]);i.style.minWidth=pe+"px",i.style.left=ot+"px"}else{const ee=V.right-F.right,ae=window.innerWidth-D.right-ee,me=window.innerWidth-A.right-ae,pe=A.width+me,Pe=Math.max(pe,V.width),$e=window.innerWidth-Ne,ot=fn(ae,[Ne,Math.max(Ne,$e-Pe)]);i.style.minWidth=pe+"px",i.style.right=ot+"px"}const $=m(),P=window.innerHeight-Ne*2,Y=g.scrollHeight,k=window.getComputedStyle(u),R=parseInt(k.borderTopWidth,10),B=parseInt(k.paddingTop,10),z=parseInt(k.borderBottomWidth,10),L=parseInt(k.paddingBottom,10),M=R+B+Y+L+z,G=Math.min(v.offsetHeight*5,M),te=window.getComputedStyle(g),U=parseInt(te.paddingTop,10),X=parseInt(te.paddingBottom,10),Q=A.top+A.height/2-Ne,oe=P-Q,fe=v.offsetHeight/2,I=v.offsetTop+fe,Z=R+B+I,ie=M-Z;if(Z<=Q){const ee=$.length>0&&v===$[$.length-1].ref.current;i.style.bottom="0px";const ae=u.clientHeight-g.offsetTop-g.offsetHeight,me=Math.max(oe,fe+(ee?X:0)+ae+z),pe=Z+me;i.style.height=pe+"px"}else{const ee=$.length>0&&v===$[0].ref.current;i.style.top="0px";const me=Math.max(Q,R+g.offsetTop+(ee?U:0)+fe)+ie;i.style.height=me+"px",g.scrollTop=Z-Q+g.offsetTop}i.style.margin=`${Ne}px 0`,i.style.minHeight=G+"px",i.style.maxHeight=P+"px",o?.(),requestAnimationFrame(()=>p.current=!0)}},[m,a.trigger,a.valueNode,i,u,g,v,y,a.dir,o]);de(()=>x(),[x]);const[S,E]=c.useState();de(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const T=c.useCallback(A=>{A&&w.current===!0&&(x(),b?.(),w.current=!1)},[x,b]);return l.jsx(gg,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:p,onScrollButtonChange:T,children:l.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:l.jsx(W.div,{...n,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});El.displayName=pg;var hg="SelectPopperPosition",yn=c.forwardRef((e,t)=>{const{__scopeSelect:r,align:o="start",collisionPadding:n=Ne,...a}=e,s=Hr(r);return l.jsx(an,{...s,...a,ref:t,align:o,collisionPadding:n,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});yn.displayName=hg;var[gg,xn]=ft(tt,{}),Cn="SelectViewport",Nl=c.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:o,...n}=e,a=rt(Cn,r),s=xn(Cn,r),i=q(t,a.onViewportChange),d=c.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),l.jsx(Fr.Slot,{scope:r,children:l.jsx(W.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:H(n.onScroll,u=>{const f=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=s;if(m?.current&&h){const p=Math.abs(d.current-f.scrollTop);if(p>0){const w=window.innerHeight-Ne*2,g=parseFloat(h.style.minHeight),v=parseFloat(h.style.height),y=Math.max(g,v);if(y<w){const b=y+p,x=Math.min(w,b),S=b-x;h.style.height=x+"px",h.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,h.style.justifyContent="flex-end")}}}d.current=f.scrollTop})})})]})});Nl.displayName=Cn;var Tl="SelectGroup",[mg,vg]=ft(Tl),Pl=c.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=Ue();return l.jsx(mg,{scope:r,id:n,children:l.jsx(W.div,{role:"group","aria-labelledby":n,...o,ref:t})})});Pl.displayName=Tl;var Al="SelectLabel",Sn=c.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=vg(Al,r);return l.jsx(W.div,{id:n.id,...o,ref:t})});Sn.displayName=Al;var Vr="SelectItem",[bg,kl]=ft(Vr),En=c.forwardRef((e,t)=>{const{__scopeSelect:r,value:o,disabled:n=!1,textValue:a,...s}=e,i=et(Vr,r),d=rt(Vr,r),u=i.value===o,[f,h]=c.useState(a??""),[m,p]=c.useState(!1),w=q(t,b=>d.itemRefCallback?.(b,o,n)),g=Ue(),v=c.useRef("touch"),y=()=>{n||(i.onValueChange(o),i.onOpenChange(!1))};return l.jsx(bg,{scope:r,value:o,disabled:n,textId:g,isSelected:u,onItemTextChange:c.useCallback(b=>{h(x=>x||(b?.textContent??"").trim())},[]),children:l.jsx(Fr.ItemSlot,{scope:r,value:o,disabled:n,textValue:f,children:l.jsx(W.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:w,onFocus:H(s.onFocus,()=>p(!0)),onBlur:H(s.onBlur,()=>p(!1)),onClick:H(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:H(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:H(s.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:H(s.onPointerMove,b=>{v.current=b.pointerType,n?d.onItemLeave?.():v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:H(s.onPointerLeave,b=>{b.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:H(s.onKeyDown,b=>{d.searchRef?.current!==""&&b.key===" "||(rg.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});En.displayName=Vr;var Gt="SelectItemText",Dl=c.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:n,...a}=e,s=et(Gt,r),i=rt(Gt,r),d=kl(Gt,r),u=sg(Gt,r),[f,h]=c.useState(null),m=q(t,y=>h(y),d.onItemTextChange,y=>i.itemTextRefCallback?.(y,d.value,d.disabled)),p=f?.textContent,w=c.useMemo(()=>l.jsx("option",{value:d.value,disabled:d.disabled,children:p},d.value),[d.disabled,d.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return de(()=>(g(w),()=>v(w)),[g,v,w]),l.jsxs(l.Fragment,{children:[l.jsx(W.span,{id:d.textId,...a,ref:m}),d.isSelected&&s.valueNode&&!s.valueNodeHasChildren&&!Wr(s.value)?ht.createPortal(a.children,s.valueNode):null]})});Dl.displayName=Gt;var Ol="SelectItemIndicator",_l=c.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return kl(Ol,r).isSelected?l.jsx(W.span,{"aria-hidden":!0,...o,ref:t}):null});_l.displayName=Ol;var Nn="SelectScrollUpButton",Tn=c.forwardRef((e,t)=>{const r=rt(Nn,e.__scopeSelect),o=xn(Nn,e.__scopeSelect),[n,a]=c.useState(!1),s=q(t,o.onScrollButtonChange);return de(()=>{if(r.viewport&&r.isPositioned){let i=function(){const u=d.scrollTop>0;a(u)};const d=r.viewport;return i(),d.addEventListener("scroll",i),()=>d.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),n?l.jsx(Ml,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:d}=r;i&&d&&(i.scrollTop=i.scrollTop-d.offsetHeight)}}):null});Tn.displayName=Nn;var Pn="SelectScrollDownButton",An=c.forwardRef((e,t)=>{const r=rt(Pn,e.__scopeSelect),o=xn(Pn,e.__scopeSelect),[n,a]=c.useState(!1),s=q(t,o.onScrollButtonChange);return de(()=>{if(r.viewport&&r.isPositioned){let i=function(){const u=d.scrollHeight-d.clientHeight,f=Math.ceil(d.scrollTop)<u;a(f)};const d=r.viewport;return i(),d.addEventListener("scroll",i),()=>d.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),n?l.jsx(Ml,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:d}=r;i&&d&&(i.scrollTop=i.scrollTop+d.offsetHeight)}}):null});An.displayName=Pn;var Ml=c.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:o,...n}=e,a=rt("SelectScrollButton",r),s=c.useRef(null),i=Br(r),d=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>d(),[d]),de(()=>{i().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),l.jsx(W.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:H(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:H(n.onPointerMove,()=>{a.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:H(n.onPointerLeave,()=>{d()})})}),wg="SelectSeparator",kn=c.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return l.jsx(W.div,{"aria-hidden":!0,...o,ref:t})});kn.displayName=wg;var Il="SelectArrow",yg=c.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=Hr(r);return rt(Il,r).position==="popper"?l.jsx(sn,{...n,...o,ref:t}):null});yg.displayName=Il;var Ll="SelectBubbleInput",$l=c.forwardRef(({__scopeSelect:e,...t},r)=>{const o=et(Ll,e),{value:n,onValueChange:a,required:s,disabled:i,name:d,autoComplete:u,form:f}=o,{nativeOptions:h,nativeSelectKey:m}=o,p=c.useRef(null),w=q(r,p),g=n??"",v=ko(g),y=Array.from(h).some(b=>(b.props.value??"")==="");return c.useEffect(()=>{const b=p.current;if(!b)return;const x=window.HTMLSelectElement.prototype,E=Object.getOwnPropertyDescriptor(x,"value").set;if(v!==g&&E){const T=new Event("change",{bubbles:!0});E.call(b,g),b.dispatchEvent(T)}},[v,g]),l.jsxs(W.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:d,autoComplete:u,disabled:i,form:f,onChange:b=>a(b.target.value),...t,style:{...fl,...t.style},ref:w,defaultValue:g,children:[Wr(n)&&!y?l.jsx("option",{value:""}):null,Array.from(h)]},m)});$l.displayName=Ll;function xg(e){return typeof e=="function"}function Wr(e){return e===""||e===void 0}function Fl(e){const t=ue(e),r=c.useRef(""),o=c.useRef(0),n=c.useCallback(s=>{const i=r.current+s;t(i),(function d(u){r.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>d(""),1e3))})(i)},[t]),a=c.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,n,a]}function Bl(e,t,r){const n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let s=Cg(e,Math.max(a,0));n.length===1&&(s=s.filter(u=>u!==r));const d=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return d!==r?d:void 0}function Cg(e,t){return e.map((r,o)=>e[(t+o)%e.length])}const Sg=hl,Eg=Pl,Ng=vl,Hl=c.forwardRef(({className:e,children:t,...r},o)=>l.jsxs(bn,{ref:o,className:_("flex h-10 w-full items-center justify-between rounded-md border border-input bg-white px-3 py-2 text-sm ring-offset-background transition-all duration-200 placeholder:text-muted-foreground hover:border-primary/50 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:border-primary disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,l.jsx(bl,{asChild:!0,children:l.jsx(Io,{className:"h-4 w-4 opacity-50"})})]}));Hl.displayName=bn.displayName;const Dn=c.forwardRef(({className:e,...t},r)=>l.jsx(Tn,{ref:r,className:_("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(Zf,{className:"h-4 w-4"})}));Dn.displayName=Tn.displayName;const On=c.forwardRef(({className:e,...t},r)=>l.jsx(An,{ref:r,className:_("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(Io,{className:"h-4 w-4"})}));On.displayName=An.displayName;const Vl=c.forwardRef(({className:e,children:t,position:r="popper",...o},n)=>l.jsx(yl,{children:l.jsxs(wn,{ref:n,className:_("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o,children:[l.jsx(Dn,{}),l.jsx(Nl,{className:_("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(On,{})]})}));Vl.displayName=wn.displayName;const Wl=c.forwardRef(({className:e,...t},r)=>l.jsx(Sn,{ref:r,className:_("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Wl.displayName=Sn.displayName;const zl=c.forwardRef(({className:e,children:t,...r},o)=>l.jsxs(En,{ref:o,className:_("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-all duration-150 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground hover:bg-accent/50",e),...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(_l,{children:l.jsx(Mo,{className:"h-4 w-4"})})}),l.jsx(Dl,{children:t})]}));zl.displayName=En.displayName;const Rl=c.forwardRef(({className:e,...t},r)=>l.jsx(kn,{ref:r,className:_("-mx-1 my-1 h-px bg-muted",e),...t}));Rl.displayName=kn.displayName;var Tg="Separator",Ul="horizontal",Pg=["horizontal","vertical"],jl=c.forwardRef((e,t)=>{const{decorative:r,orientation:o=Ul,...n}=e,a=Ag(o)?o:Ul,i=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return l.jsx(W.div,{"data-orientation":a,...i,...n,ref:t})});jl.displayName=Tg;function Ag(e){return Pg.includes(e)}var Yl=jl;const Kl=c.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...o},n)=>l.jsx(Yl,{ref:n,decorative:r,orientation:t,className:_("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Kl.displayName=Yl.displayName;const Gl=pr,kg=hr,Dg=lt,Xl=gr,_n=c.forwardRef(({className:e,...t},r)=>l.jsx(Ct,{className:_("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",e),...t,ref:r}));_n.displayName=Ct.displayName;const Og=Rt("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"}}),Mn=c.forwardRef(({side:e="right",className:t,children:r,...o},n)=>l.jsxs(Xl,{children:[l.jsx(_n,{}),l.jsxs(Et,{ref:n,className:_(Og({side:e}),t),...o,children:[r,l.jsxs(lt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[l.jsx(Ut,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Mn.displayName=Et.displayName;const ql=({className:e,...t})=>l.jsx("div",{className:_("flex flex-col space-y-2 text-center sm:text-left",e),...t});ql.displayName="SheetHeader";const Zl=({className:e,...t})=>l.jsx("div",{className:_("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Zl.displayName="SheetFooter";const Ql=c.forwardRef(({className:e,...t},r)=>l.jsx(Nt,{ref:r,className:_("text-lg font-semibold text-foreground",e),...t}));Ql.displayName=Nt.displayName;const Jl=c.forwardRef(({className:e,...t},r)=>l.jsx(Tt,{ref:r,className:_("text-sm text-muted-foreground",e),...t}));Jl.displayName=Tt.displayName;function _g({className:e,...t}){return l.jsx("div",{className:_("animate-pulse rounded-md bg-muted",e),...t})}var Mg=e=>{switch(e){case"success":return $g;case"info":return Bg;case"warning":return Fg;case"error":return Hg;default:return null}},Ig=Array(12).fill(0),Lg=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},Ig.map((r,o)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),$g=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),Fg=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.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"})),Bg=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),Hg=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),Vg=C.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"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Wg=()=>{let[e,t]=C.useState(document.hidden);return C.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},In=1,zg=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...o}=e,n=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:In++,a=this.toasts.find(i=>i.id===n),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),a?this.toasts=this.toasts.map(i=>i.id===n?(this.publish({...i,...e,id:n,title:r}),{...i,...e,id:n,dismissible:s,title:r}):i):this.addToast({title:r,...o,dismissible:s,id:n}),n},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let o=e instanceof Promise?e:e(),n=r!==void 0,a,s=o.then(async d=>{if(a=["resolve",d],C.isValidElement(d))n=!1,this.create({id:r,type:"default",message:d});else if(Ug(d)&&!d.ok){n=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description;this.create({id:r,type:"error",message:u,description:f})}else if(t.success!==void 0){n=!1;let u=typeof t.success=="function"?await t.success(d):t.success,f=typeof t.description=="function"?await t.description(d):t.description;this.create({id:r,type:"success",message:u,description:f})}}).catch(async d=>{if(a=["reject",d],t.error!==void 0){n=!1;let u=typeof t.error=="function"?await t.error(d):t.error,f=typeof t.description=="function"?await t.description(d):t.description;this.create({id:r,type:"error",message:u,description:f})}}).finally(()=>{var d;n&&(this.dismiss(r),r=void 0),(d=t.finally)==null||d.call(t)}),i=()=>new Promise((d,u)=>s.then(()=>a[0]==="reject"?u(a[1]):d(a[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:i}:Object.assign(r,{unwrap:i})},this.custom=(e,t)=>{let r=t?.id||In++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ge=new zg,Rg=(e,t)=>{let r=t?.id||In++;return ge.addToast({title:e,...t,id:r}),r},Ug=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",jg=Rg,Yg=()=>ge.toasts,Kg=()=>ge.getActiveToasts(),Gg=Object.assign(jg,{success:ge.success,info:ge.info,warning:ge.warning,error:ge.error,custom:ge.custom,message:ge.message,promise:ge.promise,dismiss:ge.dismiss,loading:ge.loading},{getHistory:Yg,getToasts:Kg});function Xg(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",t==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}Xg(`:where(html[dir="ltr"]),:where([data-sonner-toaster][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%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][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%)}:where([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:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([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);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([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 #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([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)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[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;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([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(--gray12);border:1px solid var(--gray4);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-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([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}:where([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}:where([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, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--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-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-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--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-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-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],[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],[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],[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],[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:nth-child(1){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)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{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%)}
|
|
47
|
+
`);function zr(e){return e.label!==void 0}var qg=3,Zg="32px",Qg="16px",ec=4e3,Jg=356,em=14,tm=20,rm=200;function Te(...e){return e.filter(Boolean).join(" ")}function om(e){let[t,r]=e.split("-"),o=[];return t&&o.push(t),r&&o.push(r),o}var nm=e=>{var t,r,o,n,a,s,i,d,u,f,h;let{invert:m,toast:p,unstyled:w,interacting:g,setHeights:v,visibleToasts:y,heights:b,index:x,toasts:S,expanded:E,removeToast:T,defaultRichColors:A,closeButton:V,style:D,cancelButtonStyle:F,actionButtonStyle:$,className:P="",descriptionClassName:Y="",duration:k,position:R,gap:B,loadingIcon:z,expandByDefault:L,classNames:M,icons:G,closeButtonAriaLabel:te="Close toast",pauseWhenPageIsHidden:U}=e,[X,Q]=C.useState(null),[oe,fe]=C.useState(null),[I,Z]=C.useState(!1),[ie,J]=C.useState(!1),[ee,ae]=C.useState(!1),[me,pe]=C.useState(!1),[Pe,$e]=C.useState(!1),[ot,Qt]=C.useState(0),[ta,Zr]=C.useState(0),O=C.useRef(p.duration||k||ec),re=C.useRef(null),le=C.useRef(null),Re=x===0,ra=x+1<=y,xe=p.type,Ft=p.dismissible!==!1,hv=p.className||"",gv=p.descriptionClassName||"",Qr=C.useMemo(()=>b.findIndex(j=>j.toastId===p.id)||0,[b,p.id]),mv=C.useMemo(()=>{var j;return(j=p.closeButton)!=null?j:V},[p.closeButton,V]),rd=C.useMemo(()=>p.duration||k||ec,[p.duration,k]),oa=C.useRef(0),Bt=C.useRef(0),od=C.useRef(0),Ht=C.useRef(null),[vv,bv]=R.split("-"),nd=C.useMemo(()=>b.reduce((j,ne,ce)=>ce>=Qr?j:j+ne.height,0),[b,Qr]),ad=Wg(),wv=p.invert||m,na=xe==="loading";Bt.current=C.useMemo(()=>Qr*B+nd,[Qr,nd]),C.useEffect(()=>{O.current=rd},[rd]),C.useEffect(()=>{Z(!0)},[]),C.useEffect(()=>{let j=le.current;if(j){let ne=j.getBoundingClientRect().height;return Zr(ne),v(ce=>[{toastId:p.id,height:ne,position:p.position},...ce]),()=>v(ce=>ce.filter(Ae=>Ae.toastId!==p.id))}},[v,p.id]),C.useLayoutEffect(()=>{if(!I)return;let j=le.current,ne=j.style.height;j.style.height="auto";let ce=j.getBoundingClientRect().height;j.style.height=ne,Zr(ce),v(Ae=>Ae.find(ke=>ke.toastId===p.id)?Ae.map(ke=>ke.toastId===p.id?{...ke,height:ce}:ke):[{toastId:p.id,height:ce,position:p.position},...Ae])},[I,p.title,p.description,v,p.id]);let nt=C.useCallback(()=>{J(!0),Qt(Bt.current),v(j=>j.filter(ne=>ne.toastId!==p.id)),setTimeout(()=>{T(p)},rm)},[p,T,v,Bt]);C.useEffect(()=>{if(p.promise&&xe==="loading"||p.duration===1/0||p.type==="loading")return;let j;return E||g||U&&ad?(()=>{if(od.current<oa.current){let ne=new Date().getTime()-oa.current;O.current=O.current-ne}od.current=new Date().getTime()})():O.current!==1/0&&(oa.current=new Date().getTime(),j=setTimeout(()=>{var ne;(ne=p.onAutoClose)==null||ne.call(p,p),nt()},O.current)),()=>clearTimeout(j)},[E,g,p,xe,U,ad,nt]),C.useEffect(()=>{p.delete&&nt()},[nt,p.delete]);function yv(){var j,ne,ce;return G!=null&&G.loading?C.createElement("div",{className:Te(M?.loader,(j=p?.classNames)==null?void 0:j.loader,"sonner-loader"),"data-visible":xe==="loading"},G.loading):z?C.createElement("div",{className:Te(M?.loader,(ne=p?.classNames)==null?void 0:ne.loader,"sonner-loader"),"data-visible":xe==="loading"},z):C.createElement(Lg,{className:Te(M?.loader,(ce=p?.classNames)==null?void 0:ce.loader),visible:xe==="loading"})}return C.createElement("li",{tabIndex:0,ref:le,className:Te(P,hv,M?.toast,(t=p?.classNames)==null?void 0:t.toast,M?.default,M?.[xe],(r=p?.classNames)==null?void 0:r[xe]),"data-sonner-toast":"","data-rich-colors":(o=p.richColors)!=null?o:A,"data-styled":!(p.jsx||p.unstyled||w),"data-mounted":I,"data-promise":!!p.promise,"data-swiped":Pe,"data-removed":ie,"data-visible":ra,"data-y-position":vv,"data-x-position":bv,"data-index":x,"data-front":Re,"data-swiping":ee,"data-dismissible":Ft,"data-type":xe,"data-invert":wv,"data-swipe-out":me,"data-swipe-direction":oe,"data-expanded":!!(E||L&&I),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${ie?ot:Bt.current}px`,"--initial-height":L?"auto":`${ta}px`,...D,...p.style},onDragEnd:()=>{ae(!1),Q(null),Ht.current=null},onPointerDown:j=>{na||!Ft||(re.current=new Date,Qt(Bt.current),j.target.setPointerCapture(j.pointerId),j.target.tagName!=="BUTTON"&&(ae(!0),Ht.current={x:j.clientX,y:j.clientY}))},onPointerUp:()=>{var j,ne,ce,Ae;if(me||!Ft)return;Ht.current=null;let ke=Number(((j=le.current)==null?void 0:j.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),at=Number(((ne=le.current)==null?void 0:ne.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),pt=new Date().getTime()-((ce=re.current)==null?void 0:ce.getTime()),De=X==="x"?ke:at,st=Math.abs(De)/pt;if(Math.abs(De)>=tm||st>.11){Qt(Bt.current),(Ae=p.onDismiss)==null||Ae.call(p,p),fe(X==="x"?ke>0?"right":"left":at>0?"down":"up"),nt(),pe(!0),$e(!1);return}ae(!1),Q(null)},onPointerMove:j=>{var ne,ce,Ae,ke;if(!Ht.current||!Ft||((ne=window.getSelection())==null?void 0:ne.toString().length)>0)return;let at=j.clientY-Ht.current.y,pt=j.clientX-Ht.current.x,De=(ce=e.swipeDirections)!=null?ce:om(R);!X&&(Math.abs(pt)>1||Math.abs(at)>1)&&Q(Math.abs(pt)>Math.abs(at)?"x":"y");let st={x:0,y:0};X==="y"?(De.includes("top")||De.includes("bottom"))&&(De.includes("top")&&at<0||De.includes("bottom")&&at>0)&&(st.y=at):X==="x"&&(De.includes("left")||De.includes("right"))&&(De.includes("left")&&pt<0||De.includes("right")&&pt>0)&&(st.x=pt),(Math.abs(st.x)>0||Math.abs(st.y)>0)&&$e(!0),(Ae=le.current)==null||Ae.style.setProperty("--swipe-amount-x",`${st.x}px`),(ke=le.current)==null||ke.style.setProperty("--swipe-amount-y",`${st.y}px`)}},mv&&!p.jsx?C.createElement("button",{"aria-label":te,"data-disabled":na,"data-close-button":!0,onClick:na||!Ft?()=>{}:()=>{var j;nt(),(j=p.onDismiss)==null||j.call(p,p)},className:Te(M?.closeButton,(n=p?.classNames)==null?void 0:n.closeButton)},(a=G?.close)!=null?a:Vg):null,p.jsx||C.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:C.createElement(C.Fragment,null,xe||p.icon||p.promise?C.createElement("div",{"data-icon":"",className:Te(M?.icon,(s=p?.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||yv():null,p.type!=="loading"?p.icon||G?.[xe]||Mg(xe):null):null,C.createElement("div",{"data-content":"",className:Te(M?.content,(i=p?.classNames)==null?void 0:i.content)},C.createElement("div",{"data-title":"",className:Te(M?.title,(d=p?.classNames)==null?void 0:d.title)},typeof p.title=="function"?p.title():p.title),p.description?C.createElement("div",{"data-description":"",className:Te(Y,gv,M?.description,(u=p?.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),C.isValidElement(p.cancel)?p.cancel:p.cancel&&zr(p.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||F,onClick:j=>{var ne,ce;zr(p.cancel)&&Ft&&((ce=(ne=p.cancel).onClick)==null||ce.call(ne,j),nt())},className:Te(M?.cancelButton,(f=p?.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,C.isValidElement(p.action)?p.action:p.action&&zr(p.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||$,onClick:j=>{var ne,ce;zr(p.action)&&((ce=(ne=p.action).onClick)==null||ce.call(ne,j),!j.defaultPrevented&&nt())},className:Te(M?.actionButton,(h=p?.classNames)==null?void 0:h.actionButton)},p.action.label):null))};function tc(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function am(e,t){let r={};return[e,t].forEach((o,n)=>{let a=n===1,s=a?"--mobile-offset":"--offset",i=a?Qg:Zg;function d(u){["top","right","bottom","left"].forEach(f=>{r[`${s}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?d(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?r[`${s}-${u}`]=i:r[`${s}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):d(i)}),r}var sm=C.forwardRef(function(e,t){let{invert:r,position:o="bottom-right",hotkey:n=["altKey","KeyT"],expand:a,closeButton:s,className:i,offset:d,mobileOffset:u,theme:f="light",richColors:h,duration:m,style:p,visibleToasts:w=qg,toastOptions:g,dir:v=tc(),gap:y=em,loadingIcon:b,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:E}=e,[T,A]=C.useState([]),V=C.useMemo(()=>Array.from(new Set([o].concat(T.filter(U=>U.position).map(U=>U.position)))),[T,o]),[D,F]=C.useState([]),[$,P]=C.useState(!1),[Y,k]=C.useState(!1),[R,B]=C.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=C.useRef(null),L=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=C.useRef(null),G=C.useRef(!1),te=C.useCallback(U=>{A(X=>{var Q;return(Q=X.find(oe=>oe.id===U.id))!=null&&Q.delete||ge.dismiss(U.id),X.filter(({id:oe})=>oe!==U.id)})},[]);return C.useEffect(()=>ge.subscribe(U=>{if(U.dismiss){A(X=>X.map(Q=>Q.id===U.id?{...Q,delete:!0}:Q));return}setTimeout(()=>{Jt.flushSync(()=>{A(X=>{let Q=X.findIndex(oe=>oe.id===U.id);return Q!==-1?[...X.slice(0,Q),{...X[Q],...U},...X.slice(Q+1)]:[U,...X]})})})}),[]),C.useEffect(()=>{if(f!=="system"){B(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?B("dark"):B("light")),typeof window>"u")return;let U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:X})=>{B(X?"dark":"light")})}catch{U.addListener(({matches:Q})=>{try{B(Q?"dark":"light")}catch(oe){console.error(oe)}})}},[f]),C.useEffect(()=>{T.length<=1&&P(!1)},[T]),C.useEffect(()=>{let U=X=>{var Q,oe;n.every(fe=>X[fe]||X.code===fe)&&(P(!0),(Q=z.current)==null||Q.focus()),X.code==="Escape"&&(document.activeElement===z.current||(oe=z.current)!=null&&oe.contains(document.activeElement))&&P(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[n]),C.useEffect(()=>{if(z.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,G.current=!1)}},[z.current]),C.createElement("section",{ref:t,"aria-label":`${S} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},V.map((U,X)=>{var Q;let[oe,fe]=U.split("-");return T.length?C.createElement("ol",{key:U,dir:v==="auto"?tc():v,tabIndex:-1,ref:z,className:i,"data-sonner-toaster":!0,"data-theme":R,"data-y-position":oe,"data-lifted":$&&T.length>1&&!a,"data-x-position":fe,style:{"--front-toast-height":`${((Q=D[0])==null?void 0:Q.height)||0}px`,"--width":`${Jg}px`,"--gap":`${y}px`,...p,...am(d,u)},onBlur:I=>{G.current&&!I.currentTarget.contains(I.relatedTarget)&&(G.current=!1,M.current&&(M.current.focus({preventScroll:!0}),M.current=null))},onFocus:I=>{I.target instanceof HTMLElement&&I.target.dataset.dismissible==="false"||G.current||(G.current=!0,M.current=I.relatedTarget)},onMouseEnter:()=>P(!0),onMouseMove:()=>P(!0),onMouseLeave:()=>{Y||P(!1)},onDragEnd:()=>P(!1),onPointerDown:I=>{I.target instanceof HTMLElement&&I.target.dataset.dismissible==="false"||k(!0)},onPointerUp:()=>k(!1)},T.filter(I=>!I.position&&X===0||I.position===U).map((I,Z)=>{var ie,J;return C.createElement(nm,{key:I.id,icons:x,index:Z,toast:I,defaultRichColors:h,duration:(ie=g?.duration)!=null?ie:m,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:w,closeButton:(J=g?.closeButton)!=null?J:s,interacting:Y,position:U,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,removeToast:te,toasts:T.filter(ee=>ee.position==I.position),heights:D.filter(ee=>ee.position==I.position),setHeights:F,expandByDefault:a,gap:y,loadingIcon:b,expanded:$,pauseWhenPageIsHidden:E,swipeDirections:e.swipeDirections})})):null}))});const im=({...e})=>{const{theme:t="system"}=Jr();return l.jsx(sm,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var Rr="Switch",[lm]=ve(Rr),[cm,Ln]=lm(Rr);function dm(e){const{__scopeSwitch:t,checked:r,children:o,defaultChecked:n,disabled:a,form:s,name:i,onCheckedChange:d,required:u,value:f="on",internal_do_not_use_render:h}=e,[m,p]=je({prop:r,defaultProp:n??!1,onChange:d,caller:Rr}),[w,g]=c.useState(null),[v,y]=c.useState(null),b=c.useRef(!1),x=w?!!s||!!w.closest("form"):!0,S={checked:m,setChecked:p,disabled:a,control:w,setControl:g,name:i,form:s,value:f,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:n,isFormControl:x,bubbleInput:v,setBubbleInput:y};return l.jsx(cm,{scope:t,...S,children:um(h)?h(S):o})}var rc="SwitchTrigger",oc=c.forwardRef(({__scopeSwitch:e,onClick:t,...r},o)=>{const{value:n,disabled:a,checked:s,required:i,setControl:d,setChecked:u,hasConsumerStoppedPropagationRef:f,isFormControl:h,bubbleInput:m}=Ln(rc,e),p=q(o,d);return l.jsx(W.button,{type:"button",role:"switch","aria-checked":s,"aria-required":i,"data-state":lc(s),"data-disabled":a?"":void 0,disabled:a,value:n,...r,ref:p,onClick:H(t,w=>{u(g=>!g),m&&h&&(f.current=w.isPropagationStopped(),f.current||w.stopPropagation())})})});oc.displayName=rc;var $n=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:o,checked:n,defaultChecked:a,required:s,disabled:i,value:d,onCheckedChange:u,form:f,...h}=e;return l.jsx(dm,{__scopeSwitch:r,checked:n,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:o,form:f,value:d,internal_do_not_use_render:({isFormControl:m})=>l.jsxs(l.Fragment,{children:[l.jsx(oc,{...h,ref:t,__scopeSwitch:r}),m&&l.jsx(ic,{__scopeSwitch:r})]})})});$n.displayName=Rr;var nc="SwitchThumb",ac=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...o}=e,n=Ln(nc,r);return l.jsx(W.span,{"data-state":lc(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});ac.displayName=nc;var sc="SwitchBubbleInput",ic=c.forwardRef(({__scopeSwitch:e,...t},r)=>{const{control:o,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:s,required:i,disabled:d,name:u,value:f,form:h,bubbleInput:m,setBubbleInput:p}=Ln(sc,e),w=q(r,p),g=ko(a),v=Do(o);c.useEffect(()=>{const b=m;if(!b)return;const x=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(x,"checked").set,T=!n.current;if(g!==a&&E){const A=new Event("click",{bubbles:T});E.call(b,a),b.dispatchEvent(A)}},[m,g,a,n]);const y=c.useRef(a);return l.jsx(W.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??y.current,required:i,disabled:d,name:u,value:f,form:h,...t,tabIndex:-1,ref:w,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ic.displayName=sc;function um(e){return typeof e=="function"}function lc(e){return e?"checked":"unchecked"}const cc=c.forwardRef(({className:e,...t},r)=>l.jsx($n,{className:_("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:r,children:l.jsx(ac,{className:_("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));cc.displayName=$n.displayName;const dc=c.forwardRef(({className:e,...t},r)=>l.jsx("div",{className:"relative w-full overflow-auto rounded-lg border border-border",children:l.jsx("table",{ref:r,className:_("w-full caption-bottom text-sm",e),...t})}));dc.displayName="Table";const uc=c.forwardRef(({className:e,...t},r)=>l.jsx("thead",{ref:r,className:_("bg-muted [&_tr]:border-b",e),...t}));uc.displayName="TableHeader";const fc=c.forwardRef(({className:e,...t},r)=>l.jsx("tbody",{ref:r,className:_("[&_tr:last-child]:border-0",e),...t}));fc.displayName="TableBody";const pc=c.forwardRef(({className:e,...t},r)=>l.jsx("tfoot",{ref:r,className:_("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));pc.displayName="TableFooter";const hc=c.forwardRef(({className:e,...t},r)=>l.jsx("tr",{ref:r,className:_("border-b bg-white transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));hc.displayName="TableRow";const gc=c.forwardRef(({className:e,...t},r)=>l.jsx("th",{ref:r,className:_("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));gc.displayName="TableHead";const mc=c.forwardRef(({className:e,...t},r)=>l.jsx("td",{ref:r,className:_("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));mc.displayName="TableCell";const vc=c.forwardRef(({className:e,...t},r)=>l.jsx("caption",{ref:r,className:_("mt-4 text-sm text-muted-foreground",e),...t}));vc.displayName="TableCaption";var Fn="ToastProvider",[Bn,fm,pm]=ul("Toast"),[bc]=ve("Toast",[pm]),[hm,Ur]=bc(Fn),wc=e=>{const{__scopeToast:t,label:r="Notification",duration:o=5e3,swipeDirection:n="right",swipeThreshold:a=50,announcerContainer:s,children:i}=e,[d,u]=c.useState(null),[f,h]=c.useState(0),m=c.useRef(!1),p=c.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Fn}\`. Expected non-empty \`string\`.`),l.jsx(Bn.Provider,{scope:t,children:l.jsx(hm,{scope:t,label:r,duration:o,swipeDirection:n,swipeThreshold:a,toastCount:f,viewport:d,onViewportChange:u,onToastAdd:c.useCallback(()=>h(w=>w+1),[]),onToastRemove:c.useCallback(()=>h(w=>w-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:p,announcerContainer:s,children:i})})};wc.displayName=Fn;var yc="ToastViewport",gm=["F8"],Hn="toast.viewportPause",Vn="toast.viewportResume",xc=c.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:o=gm,label:n="Notifications ({hotkey})",...a}=e,s=Ur(yc,r),i=fm(r),d=c.useRef(null),u=c.useRef(null),f=c.useRef(null),h=c.useRef(null),m=q(t,h,s.onViewportChange),p=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=s.toastCount>0;c.useEffect(()=>{const v=y=>{o.length!==0&&o.every(x=>y[x]||y.code===x)&&h.current?.focus()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[o]),c.useEffect(()=>{const v=d.current,y=h.current;if(w&&v&&y){const b=()=>{if(!s.isClosePausedRef.current){const T=new CustomEvent(Hn);y.dispatchEvent(T),s.isClosePausedRef.current=!0}},x=()=>{if(s.isClosePausedRef.current){const T=new CustomEvent(Vn);y.dispatchEvent(T),s.isClosePausedRef.current=!1}},S=T=>{!v.contains(T.relatedTarget)&&x()},E=()=>{v.contains(document.activeElement)||x()};return v.addEventListener("focusin",b),v.addEventListener("focusout",S),v.addEventListener("pointermove",b),v.addEventListener("pointerleave",E),window.addEventListener("blur",b),window.addEventListener("focus",x),()=>{v.removeEventListener("focusin",b),v.removeEventListener("focusout",S),v.removeEventListener("pointermove",b),v.removeEventListener("pointerleave",E),window.removeEventListener("blur",b),window.removeEventListener("focus",x)}}},[w,s.isClosePausedRef]);const g=c.useCallback(({tabbingDirection:v})=>{const b=i().map(x=>{const S=x.ref.current,E=[S,...Am(S)];return v==="forwards"?E:E.reverse()});return(v==="forwards"?b.reverse():b).flat()},[i]);return c.useEffect(()=>{const v=h.current;if(v){const y=b=>{const x=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!x){const E=document.activeElement,T=b.shiftKey;if(b.target===v&&T){u.current?.focus();return}const D=g({tabbingDirection:T?"backwards":"forwards"}),F=D.findIndex($=>$===E);Rn(D.slice(F+1))?b.preventDefault():T?u.current?.focus():f.current?.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[i,g]),l.jsxs(zd,{ref:d,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&l.jsx(Wn,{ref:u,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"forwards"});Rn(v)}}),l.jsx(Bn.Slot,{scope:r,children:l.jsx(W.ol,{tabIndex:-1,...a,ref:m})}),w&&l.jsx(Wn,{ref:f,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"backwards"});Rn(v)}})]})});xc.displayName=yc;var Cc="ToastFocusProxy",Wn=c.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:o,...n}=e,a=Ur(Cc,r);return l.jsx($r,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:s=>{const i=s.relatedTarget;!a.viewport?.contains(i)&&o()}})});Wn.displayName=Cc;var Xt="Toast",mm="toast.swipeStart",vm="toast.swipeMove",bm="toast.swipeCancel",wm="toast.swipeEnd",Sc=c.forwardRef((e,t)=>{const{forceMount:r,open:o,defaultOpen:n,onOpenChange:a,...s}=e,[i,d]=je({prop:o,defaultProp:n??!0,onChange:a,caller:Xt});return l.jsx(he,{present:r||i,children:l.jsx(Cm,{open:i,...s,ref:t,onClose:()=>d(!1),onPause:ue(e.onPause),onResume:ue(e.onResume),onSwipeStart:H(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:H(e.onSwipeMove,u=>{const{x:f,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:H(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:H(e.onSwipeEnd,u=>{const{x:f,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),d(!1)})})})});Sc.displayName=Xt;var[ym,xm]=bc(Xt,{onClose(){}}),Cm=c.forwardRef((e,t)=>{const{__scopeToast:r,type:o="foreground",duration:n,open:a,onClose:s,onEscapeKeyDown:i,onPause:d,onResume:u,onSwipeStart:f,onSwipeMove:h,onSwipeCancel:m,onSwipeEnd:p,...w}=e,g=Ur(Xt,r),[v,y]=c.useState(null),b=q(t,k=>y(k)),x=c.useRef(null),S=c.useRef(null),E=n||g.duration,T=c.useRef(0),A=c.useRef(E),V=c.useRef(0),{onToastAdd:D,onToastRemove:F}=g,$=ue(()=>{v?.contains(document.activeElement)&&g.viewport?.focus(),s()}),P=c.useCallback(k=>{!k||k===1/0||(window.clearTimeout(V.current),T.current=new Date().getTime(),V.current=window.setTimeout($,k))},[$]);c.useEffect(()=>{const k=g.viewport;if(k){const R=()=>{P(A.current),u?.()},B=()=>{const z=new Date().getTime()-T.current;A.current=A.current-z,window.clearTimeout(V.current),d?.()};return k.addEventListener(Hn,B),k.addEventListener(Vn,R),()=>{k.removeEventListener(Hn,B),k.removeEventListener(Vn,R)}}},[g.viewport,E,d,u,P]),c.useEffect(()=>{a&&!g.isClosePausedRef.current&&P(E)},[a,E,g.isClosePausedRef,P]),c.useEffect(()=>(D(),()=>F()),[D,F]);const Y=c.useMemo(()=>v?Dc(v):null,[v]);return g.viewport?l.jsxs(l.Fragment,{children:[Y&&l.jsx(Sm,{__scopeToast:r,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:Y}),l.jsx(ym,{scope:r,onClose:$,children:ht.createPortal(l.jsx(Bn.ItemSlot,{scope:r,children:l.jsx(Wd,{asChild:!0,onEscapeKeyDown:H(i,()=>{g.isFocusedToastEscapeKeyDownRef.current||$(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(W.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":g.swipeDirection,...w,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:H(e.onKeyDown,k=>{k.key==="Escape"&&(i?.(k.nativeEvent),k.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:H(e.onPointerDown,k=>{k.button===0&&(x.current={x:k.clientX,y:k.clientY})}),onPointerMove:H(e.onPointerMove,k=>{if(!x.current)return;const R=k.clientX-x.current.x,B=k.clientY-x.current.y,z=!!S.current,L=["left","right"].includes(g.swipeDirection),M=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,G=L?M(0,R):0,te=L?0:M(0,B),U=k.pointerType==="touch"?10:2,X={x:G,y:te},Q={originalEvent:k,delta:X};z?(S.current=X,jr(vm,h,Q,{discrete:!1})):Oc(X,g.swipeDirection,U)?(S.current=X,jr(mm,f,Q,{discrete:!1}),k.target.setPointerCapture(k.pointerId)):(Math.abs(R)>U||Math.abs(B)>U)&&(x.current=null)}),onPointerUp:H(e.onPointerUp,k=>{const R=S.current,B=k.target;if(B.hasPointerCapture(k.pointerId)&&B.releasePointerCapture(k.pointerId),S.current=null,x.current=null,R){const z=k.currentTarget,L={originalEvent:k,delta:R};Oc(R,g.swipeDirection,g.swipeThreshold)?jr(wm,p,L,{discrete:!0}):jr(bm,m,L,{discrete:!0}),z.addEventListener("click",M=>M.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),Sm=e=>{const{__scopeToast:t,children:r,...o}=e,n=Ur(Xt,t),[a,s]=c.useState(!1),[i,d]=c.useState(!1);return Tm(()=>s(!0)),c.useEffect(()=>{const u=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(u)},[]),i?null:l.jsx(Vt,{asChild:!0,container:n.announcerContainer||void 0,children:l.jsx($r,{...o,children:a&&l.jsxs(l.Fragment,{children:[n.label," ",r]})})})},Em="ToastTitle",Ec=c.forwardRef((e,t)=>{const{__scopeToast:r,...o}=e;return l.jsx(W.div,{...o,ref:t})});Ec.displayName=Em;var Nm="ToastDescription",Nc=c.forwardRef((e,t)=>{const{__scopeToast:r,...o}=e;return l.jsx(W.div,{...o,ref:t})});Nc.displayName=Nm;var Tc="ToastAction",Pc=c.forwardRef((e,t)=>{const{altText:r,...o}=e;return r.trim()?l.jsx(kc,{altText:r,asChild:!0,children:l.jsx(zn,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Tc}\`. Expected non-empty \`string\`.`),null)});Pc.displayName=Tc;var Ac="ToastClose",zn=c.forwardRef((e,t)=>{const{__scopeToast:r,...o}=e,n=xm(Ac,r);return l.jsx(kc,{asChild:!0,children:l.jsx(W.button,{type:"button",...o,ref:t,onClick:H(e.onClick,n.onClose)})})});zn.displayName=Ac;var kc=c.forwardRef((e,t)=>{const{__scopeToast:r,altText:o,...n}=e;return l.jsx(W.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...n,ref:t})});function Dc(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),Pm(o)){const n=o.ariaHidden||o.hidden||o.style.display==="none",a=o.dataset.radixToastAnnounceExclude==="";if(!n)if(a){const s=o.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...Dc(o))}}),t}function jr(e,t,r,{discrete:o}){const n=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?fa(n,a):n.dispatchEvent(a)}var Oc=(e,t,r=0)=>{const o=Math.abs(e.x),n=Math.abs(e.y),a=o>n;return t==="left"||t==="right"?a&&o>r:!a&&n>r};function Tm(e=()=>{}){const t=ue(e);de(()=>{let r=0,o=0;return r=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(o)}},[t])}function Pm(e){return e.nodeType===e.ELEMENT_NODE}function Am(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Rn(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var km=wc,_c=xc,Mc=Sc,Ic=Ec,Lc=Nc,$c=Pc,Fc=zn;const Bc=km,Un=c.forwardRef(({className:e,...t},r)=>l.jsx(_c,{ref:r,className:_("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Un.displayName=_c.displayName;const Dm=Rt("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),jn=c.forwardRef(({className:e,variant:t,...r},o)=>l.jsx(Mc,{ref:o,className:_(Dm({variant:t}),e),...r}));jn.displayName=Mc.displayName;const Hc=c.forwardRef(({className:e,...t},r)=>l.jsx($c,{ref:r,className:_("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));Hc.displayName=$c.displayName;const Yn=c.forwardRef(({className:e,...t},r)=>l.jsx(Fc,{ref:r,className:_("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:l.jsx(Ut,{className:"h-4 w-4"})}));Yn.displayName=Fc.displayName;const Kn=c.forwardRef(({className:e,...t},r)=>l.jsx(Ic,{ref:r,className:_("text-sm font-semibold",e),...t}));Kn.displayName=Ic.displayName;const Gn=c.forwardRef(({className:e,...t},r)=>l.jsx(Lc,{ref:r,className:_("text-sm opacity-90",e),...t}));Gn.displayName=Lc.displayName;const Om=1,_m=1e6;let Xn=0;function Mm(){return Xn=(Xn+1)%Number.MAX_SAFE_INTEGER,Xn.toString()}const qn=new Map,Vc=e=>{if(qn.has(e))return;const t=setTimeout(()=>{qn.delete(e),qt({type:"REMOVE_TOAST",toastId:e})},_m);qn.set(e,t)},Im=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Om)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?Vc(r):e.toasts.forEach(o=>{Vc(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Yr=[];let Kr={toasts:[]};function qt(e){Kr=Im(Kr,e),Yr.forEach(t=>{t(Kr)})}function Wc({...e}){const t=Mm(),r=n=>qt({type:"UPDATE_TOAST",toast:{...n,id:t}}),o=()=>qt({type:"DISMISS_TOAST",toastId:t});return qt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||o()}}}),{id:t,dismiss:o,update:r}}function zc(){const[e,t]=c.useState(Kr);return c.useEffect(()=>(Yr.push(t),()=>{const r=Yr.indexOf(t);r>-1&&Yr.splice(r,1)}),[e]),{...e,toast:Wc,dismiss:r=>qt({type:"DISMISS_TOAST",toastId:r})}}function Lm(){const{toasts:e}=zc();return l.jsxs(Bc,{children:[e.map(function({id:t,title:r,description:o,action:n,...a}){return l.jsxs(jn,{...a,children:[l.jsxs("div",{className:"grid gap-1",children:[r&&l.jsx(Kn,{children:r}),o&&l.jsx(Gn,{children:o})]}),n,l.jsx(Yn,{})]},t)}),l.jsx(Un,{})]})}var[Gr]=ve("Tooltip",[Mt]),Xr=Mt(),Rc="TooltipProvider",$m=700,Zn="tooltip.open",[Fm,Qn]=Gr(Rc),Uc=e=>{const{__scopeTooltip:t,delayDuration:r=$m,skipDelayDuration:o=300,disableHoverableContent:n=!1,children:a}=e,s=c.useRef(!0),i=c.useRef(!1),d=c.useRef(0);return c.useEffect(()=>{const u=d.current;return()=>window.clearTimeout(u)},[]),l.jsx(Fm,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:c.useCallback(()=>{o<=0||(window.clearTimeout(d.current),s.current=!1)},[o]),onClose:c.useCallback(()=>{o<=0||(window.clearTimeout(d.current),d.current=window.setTimeout(()=>s.current=!0,o))},[o]),isPointerInTransitRef:i,onPointerInTransitChange:c.useCallback(u=>{i.current=u},[]),disableHoverableContent:n,children:a})};Uc.displayName=Rc;var Zt="Tooltip",[Bm,qr]=Gr(Zt),jc=e=>{const{__scopeTooltip:t,children:r,open:o,defaultOpen:n,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,d=Qn(Zt,e.__scopeTooltip),u=Xr(t),[f,h]=c.useState(null),m=Ue(),p=c.useRef(0),w=s??d.disableHoverableContent,g=i??d.delayDuration,v=c.useRef(!1),[y,b]=je({prop:o,defaultProp:n??!1,onChange:A=>{A?(d.onOpen(),document.dispatchEvent(new CustomEvent(Zn))):d.onClose(),a?.(A)},caller:Zt}),x=c.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),S=c.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,b(!0)},[b]),E=c.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b(!1)},[b]),T=c.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,b(!0),p.current=0},g)},[g,b]);return c.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),l.jsx(nn,{...u,children:l.jsx(Bm,{scope:t,contentId:m,open:y,stateAttribute:x,trigger:f,onTriggerChange:h,onTriggerEnter:c.useCallback(()=>{d.isOpenDelayedRef.current?T():S()},[d.isOpenDelayedRef,T,S]),onTriggerLeave:c.useCallback(()=>{w?E():(window.clearTimeout(p.current),p.current=0)},[E,w]),onOpen:S,onClose:E,disableHoverableContent:w,children:r})})};jc.displayName=Zt;var Jn="TooltipTrigger",Yc=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...o}=e,n=qr(Jn,r),a=Qn(Jn,r),s=Xr(r),i=c.useRef(null),d=q(t,i,n.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),h=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),l.jsx(kr,{asChild:!0,...s,children:l.jsx(W.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...o,ref:d,onPointerMove:H(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),f.current=!0)}),onPointerLeave:H(e.onPointerLeave,()=>{n.onTriggerLeave(),f.current=!1}),onPointerDown:H(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:H(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:H(e.onBlur,n.onClose),onClick:H(e.onClick,n.onClose)})})});Yc.displayName=Jn;var Hm="TooltipPortal",[Cv,Vm]=Gr(Hm,{forceMount:void 0}),$t="TooltipContent",Kc=c.forwardRef((e,t)=>{const r=Vm($t,e.__scopeTooltip),{forceMount:o=r.forceMount,side:n="top",...a}=e,s=qr($t,e.__scopeTooltip);return l.jsx(he,{present:o||s.open,children:s.disableHoverableContent?l.jsx(Gc,{side:n,...a,ref:t}):l.jsx(Wm,{side:n,...a,ref:t})})}),Wm=c.forwardRef((e,t)=>{const r=qr($t,e.__scopeTooltip),o=Qn($t,e.__scopeTooltip),n=c.useRef(null),a=q(t,n),[s,i]=c.useState(null),{trigger:d,onClose:u}=r,f=n.current,{onPointerInTransitChange:h}=o,m=c.useCallback(()=>{i(null),h(!1)},[h]),p=c.useCallback((w,g)=>{const v=w.currentTarget,y={x:w.clientX,y:w.clientY},b=Ym(y,v.getBoundingClientRect()),x=Km(y,b),S=Gm(g.getBoundingClientRect()),E=qm([...x,...S]);i(E),h(!0)},[h]);return c.useEffect(()=>()=>m(),[m]),c.useEffect(()=>{if(d&&f){const w=v=>p(v,f),g=v=>p(v,d);return d.addEventListener("pointerleave",w),f.addEventListener("pointerleave",g),()=>{d.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",g)}}},[d,f,p,m]),c.useEffect(()=>{if(s){const w=g=>{const v=g.target,y={x:g.clientX,y:g.clientY},b=d?.contains(v)||f?.contains(v),x=!Xm(y,s);b?m():x&&(m(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,f,s,u,m]),l.jsx(Gc,{...e,ref:a})}),[zm,Rm]=Gr(Zt,{isInside:!1}),Um=Sd("TooltipContent"),Gc=c.forwardRef((e,t)=>{const{__scopeTooltip:r,children:o,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,d=qr($t,r),u=Xr(r),{onClose:f}=d;return c.useEffect(()=>(document.addEventListener(Zn,f),()=>document.removeEventListener(Zn,f)),[f]),c.useEffect(()=>{if(d.trigger){const h=m=>{m.target instanceof Node&&m.target.contains(d.trigger)&&f()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[d.trigger,f]),l.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:f,children:l.jsxs(an,{"data-state":d.stateAttribute,...u,...i,ref:t,style:{...i.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:[l.jsx(Um,{children:o}),l.jsx(zm,{scope:r,isInside:!0,children:l.jsx(eg,{id:d.contentId,role:"tooltip",children:n||o})})]})})});Kc.displayName=$t;var Xc="TooltipArrow",jm=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...o}=e,n=Xr(r);return Rm(Xc,r).isInside?null:l.jsx(sn,{...n,...o,ref:t})});jm.displayName=Xc;function Ym(e,t){const r=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,o,n,a)){case a:return"left";case n:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Km(e,t,r=5){const o=[];switch(t){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}function Gm(e){const{top:t,right:r,bottom:o,left:n}=e;return[{x:n,y:t},{x:r,y:t},{x:r,y:o},{x:n,y:o}]}function Xm(e,t){const{x:r,y:o}=e;let n=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],d=t[s],u=i.x,f=i.y,h=d.x,m=d.y;f>o!=m>o&&r<(h-u)*(o-f)/(m-f)+u&&(n=!n)}return n}function qm(e){const t=e.slice();return t.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),Zm(t)}function Zm(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const n=e[o];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))t.pop();else break}t.push(n)}t.pop();const r=[];for(let o=e.length-1;o>=0;o--){const n=e[o];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))r.pop();else break}r.push(n)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Qm=Uc,Jm=jc,ev=Yc,qc=Kc;const tv=Qm,rv=Jm,ov=ev,Zc=c.forwardRef(({className:e,sideOffset:t=4,...r},o)=>l.jsx(qc,{ref:o,sideOffset:t,className:_("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));Zc.displayName=qc.displayName;function nv({children:e,className:t}){return l.jsx("main",{className:_("p-6 space-y-6 pb-24",t),children:e})}function av({title:e="No users found",description:t="Try adjusting your filters or invite a new user.",showCTA:r=!0,onCTA:o,ctaLabel:n="Invite"}){return l.jsxs("div",{className:"flex flex-col items-center justify-center py-16 px-4",children:[l.jsx("div",{className:"w-16 h-16 rounded-full bg-muted flex items-center justify-center mb-4",children:l.jsx(ep,{className:"h-8 w-8 text-muted-foreground"})}),l.jsx("h3",{className:"text-lg font-semibold text-foreground mb-1",children:e}),l.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-sm mb-6",children:t}),r&&o&&l.jsxs(Xe,{onClick:o,className:"gap-2",children:[l.jsx(Jf,{className:"h-4 w-4"}),n]})]})}function sv({open:e,onOpenChange:t,title:r,description:o,submitLabel:n="Create",isSubmitting:a=!1,onSubmit:s,children:i}){return l.jsx(Ys,{open:e,onOpenChange:t,children:l.jsxs(Fo,{className:"sm:max-w-[425px]",children:[l.jsxs(Bo,{children:[l.jsx(Vo,{children:r}),o&&l.jsx(Wo,{children:o})]}),i,l.jsxs(Ho,{children:[l.jsx(Xe,{variant:"ghost",onClick:()=>t(!1),disabled:a,children:"Cancel"}),l.jsx(Xe,{onClick:s,disabled:a,children:a?l.jsxs(l.Fragment,{children:[l.jsx(js,{className:"h-4 w-4 mr-2 animate-spin"}),"Submitting..."]}):n})]})]})})}function Qc({open:e,onOpenChange:t,title:r,description:o,confirmLabel:n="Confirm",cancelLabel:a="Cancel",variant:s="default",isLoading:i=!1,onConfirm:d}){const u=()=>{d()};return l.jsx(ys,{open:e,onOpenChange:t,children:l.jsxs(bo,{children:[l.jsxs(wo,{children:[l.jsx(xo,{children:r}),l.jsx(Co,{children:o})]}),l.jsxs(yo,{children:[l.jsx(Eo,{disabled:i,children:a}),l.jsx(So,{onClick:u,disabled:i,className:s==="destructive"?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"",children:i?"Processing...":n})]})]})})}const ea=C.createContext(null),Jc=C.forwardRef(({onClose:e,children:t},r)=>{const[o,n]=C.useState([]),[a,s]=C.useState(null),i=C.useRef(!1),d=C.useRef([]),u=o.length>0;o.length>0&&(d.current=o);const f=u?o:d.current;!u&&a===null&&(i.current=!1);const h=C.useCallback(g=>{n(v=>[...v,g])},[]),m=C.useCallback(()=>{n(g=>{const v=g.slice(0,-1);return v.length===0&&(i.current=!0,e()),v})},[e]);C.useImperativeHandle(r,()=>({push:h,pop:m}),[h,m]);const p=C.useCallback(g=>{g||(i.current=!0,n([]),e())},[e]),w=C.useMemo(()=>({displayStack:f,portalTarget:a,isDismissingRef:i}),[f,a]);return l.jsxs(ea.Provider,{value:w,children:[t,l.jsx(Gl,{open:u,onOpenChange:p,children:l.jsx(Mn,{className:"w-full sm:max-w-md !p-0",children:l.jsx("div",{ref:s,className:"relative h-full overflow-hidden isolate"})})})]})});Jc.displayName="DetailSheet";function ed(){const e=C.useContext(ea);if(!e)throw new Error("useDetailSheet must be used within a DetailSheet");return e}function td(e){const{displayStack:t,portalTarget:r,isDismissingRef:o}=ed(),n=t.includes(e),a=t.length>0&&t[t.length-1]===e,s=t.indexOf(e);return{isActive:n,isTopPanel:a,depth:s,portalTarget:r,isDismissingRef:o}}function iv({panelKey:e,children:t}){const{isActive:r,isTopPanel:o,depth:n,portalTarget:a,isDismissingRef:s}=td(e),i=C.useRef(null),[d,u]=C.useState(!1),[f,h]=C.useState(!1),m=C.useRef(!1),p=m.current;m.current=r,r&&!s.current&&(i.current=t),C.useEffect(()=>{a||(m.current=!1,h(!1),u(!1))},[a]),C.useEffect(()=>{p&&!r&&(s.current||h(!0)),!p&&r&&(h(!1),u(n===0))},[r,p,n,s]);const w=r||f||p&&!r&&!s.current,g=C.useCallback(S=>{S.animationName==="enter"&&u(!0)},[]),v=C.useCallback(S=>{f&&S.target===S.currentTarget&&S.propertyName==="transform"&&h(!1)},[f]);if(!w||!a)return null;const y=r&&!s.current?t:i.current,b=r&&!o&&!f,x=!d&&!f&&r;return Jt.createPortal(l.jsx("div",{className:_("absolute inset-0 overflow-y-auto p-6 pt-10",x&&"animate-in slide-in-from-right duration-300",d&&"transition-[transform,opacity] duration-300 ease-in-out",d&&o&&!f&&"translate-x-0 opacity-100",b&&"-translate-x-8 scale-[0.97] opacity-0",f&&"transition-[transform,opacity] duration-300 ease-in-out translate-x-full opacity-0"),style:{zIndex:Math.max(n,0)},onAnimationEnd:g,onTransitionEnd:v,children:y}),a)}function lv({value:e,onSave:t,className:r,readOnly:o}){const[n,a]=C.useState(!1),[s,i]=C.useState(e),[d,u]=C.useState(!1),f=C.useRef(null),h=s.trim().length>0&&s.trim()!==e,m=C.useCallback(()=>{i(e),a(!0)},[e]),p=C.useCallback(()=>{a(!1),i(e)},[e]),w=C.useCallback(async()=>{if(h){u(!0);try{await t(s.trim()),a(!1)}catch(y){console.error("Failed to save:",y)}finally{u(!1)}}},[h,s,t]),g=C.useCallback(y=>{y.key==="Escape"?p():y.key==="Enter"&&h&&w()},[p,w,h]),v=C.useCallback(y=>{f.current?.contains(y.relatedTarget)||p()},[p]);return o?l.jsx("h2",{className:_("text-lg font-semibold truncate",r),children:e}):n?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(zo,{value:s,onChange:y=>i(y.target.value),onKeyDown:g,onBlur:v,autoFocus:!0,disabled:d,className:_("h-8 text-lg font-semibold",r)}),l.jsx(Xe,{ref:f,size:"icon",onClick:h?w:p,disabled:d,className:_("h-8 w-8 shrink-0 text-white hover:translate-y-0 hover:shadow-none disabled:opacity-40",h?"bg-green-500 hover:bg-green-600 disabled:bg-green-500":"bg-red-500 hover:bg-red-600"),children:l.jsxs("div",{className:"relative h-4 w-4",children:[l.jsx(js,{className:_("h-4 w-4 absolute transition-opacity duration-200 animate-spin",d?"opacity-100":"opacity-0")}),l.jsx(Mo,{className:_("h-4 w-4 absolute transition-opacity duration-200",!d&&h?"opacity-100":"opacity-0")}),l.jsx(Ut,{className:_("h-4 w-4 absolute transition-opacity duration-200",!d&&!h?"opacity-100":"opacity-0")})]})})]}):l.jsxs("div",{className:"group flex items-center gap-2",children:[l.jsx("h2",{onClick:m,className:_("text-lg font-semibold truncate cursor-text transition-colors group-hover:text-primary/80",r),children:e}),l.jsx(Xe,{size:"icon",variant:"ghost",onClick:m,className:"h-8 w-8 shrink-0 text-muted-foreground hover:bg-transparent hover:text-muted-foreground group-hover:bg-accent group-hover:text-foreground",children:l.jsx(Qf,{className:"h-3.5 w-3.5"})})]})}function cv({buttonLabel:e,confirmLabel:t="Confirm",modalTitle:r,modalDescription:o,isLoading:n,onConfirm:a}){const[s,i]=C.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(Xe,{variant:"outline",size:"sm",className:"border-destructive text-destructive hover:bg-destructive hover:text-destructive-foreground w-full",onClick:()=>i(!0),children:e}),l.jsx(Qc,{open:s,onOpenChange:i,title:r,description:o,confirmLabel:t,variant:"destructive",isLoading:n,onConfirm:a})]})}function dv({actions:e}){return l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Danger Zone"}),e.map((t,r)=>l.jsx(cv,{...t},r))]})}function uv({icon:e,label:t,badge:r,onClick:o}){return l.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-2 p-2 bg-muted/30 rounded-lg w-full text-left hover:bg-muted/50 transition-colors cursor-pointer",children:[l.jsx("span",{className:"text-muted-foreground [&>svg]:h-4 [&>svg]:w-4",children:e}),l.jsx("span",{className:"text-sm text-foreground flex-1",children:t}),r,l.jsx(qf,{className:"h-4 w-4 text-muted-foreground"})]})}function fv({icon:e,message:t}){return l.jsxs("div",{className:"p-4 bg-muted/30 rounded-lg text-center",children:[l.jsx("div",{className:"h-8 w-8 text-muted-foreground mx-auto mb-2 [&>svg]:h-8 [&>svg]:w-8 [&>svg]:mx-auto",children:e}),l.jsx("p",{className:"text-sm text-muted-foreground",children:t})]})}function pv(){const e=C.useRef(null),t=C.useCallback(o=>{e.current?.push(o)},[]),r=C.useCallback(()=>{e.current?.pop()},[]);return{ref:e,push:t,pop:r}}N.AlertDialog=ys,N.AlertDialogAction=So,N.AlertDialogCancel=Eo,N.AlertDialogContent=bo,N.AlertDialogDescription=Co,N.AlertDialogFooter=yo,N.AlertDialogHeader=wo,N.AlertDialogOverlay=vo,N.AlertDialogPortal=xs,N.AlertDialogTitle=xo,N.AlertDialogTrigger=$f,N.AppShell=pd,N.Avatar=Ts,N.AvatarFallback=As,N.AvatarImage=Ps,N.Badge=Ds,N.Button=Xe,N.Card=Os,N.CardContent=Ls,N.CardDescription=Is,N.CardFooter=$s,N.CardHeader=_s,N.CardTitle=Ms,N.Checkbox=Lo,N.ConfirmModal=sa,N.ConfirmationModal=Qc,N.Container=nv,N.DangerZoneSection=dv,N.DetailPanel=iv,N.DetailSheet=Jc,N.DetailSheetContext=ea,N.Dialog=Ys,N.DialogClose=rp,N.DialogContent=Fo,N.DialogDescription=Wo,N.DialogFooter=Ho,N.DialogHeader=Bo,N.DialogOverlay=$o,N.DialogPortal=Ks,N.DialogTitle=Vo,N.DialogTrigger=tp,N.EditableTitle=lv,N.EmptyState=av,N.FormModal=sv,N.Input=zo,N.Label=qs,N.MultiSelect=Dh,N.NavigationListItem=uv,N.PanelEmptyState=fv,N.Popover=Hi,N.PopoverContent=cn,N.PopoverTrigger=Vi,N.Progress=Gi,N.RadixToaster=Lm,N.ScrollArea=dl,N.ScrollBar=vn,N.Select=Sg,N.SelectContent=Vl,N.SelectGroup=Eg,N.SelectItem=zl,N.SelectLabel=Wl,N.SelectScrollDownButton=On,N.SelectScrollUpButton=Dn,N.SelectSeparator=Rl,N.SelectTrigger=Hl,N.SelectValue=Ng,N.Separator=Kl,N.Sheet=Gl,N.SheetClose=Dg,N.SheetContent=Mn,N.SheetDescription=Jl,N.SheetFooter=Zl,N.SheetHeader=ql,N.SheetOverlay=_n,N.SheetPortal=Xl,N.SheetTitle=Ql,N.SheetTrigger=kg,N.Skeleton=_g,N.SonnerToaster=im,N.Switch=cc,N.Table=dc,N.TableBody=fc,N.TableCaption=vc,N.TableCell=mc,N.TableFooter=pc,N.TableHead=gc,N.TableHeader=uc,N.TableRow=hc,N.Toast=jn,N.ToastAction=Hc,N.ToastClose=Yn,N.ToastDescription=Gn,N.ToastProvider=Bc,N.ToastTitle=Kn,N.ToastViewport=Un,N.Tooltip=rv,N.TooltipContent=Zc,N.TooltipProvider=tv,N.TooltipTrigger=ov,N.VenueSwitcher=hd,N.badgeVariants=ks,N.buttonVariants=vr,N.cn=_,N.sonnerToast=Gg,N.toast=Wc,N.useDetailPanel=td,N.useDetailSheet=ed,N.useDetailSheetControls=pv,N.useTheme=Jr,N.useToast=zc,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})}));
|