@re-venue/ui-core-react 0.3.1 → 0.3.3

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.
@@ -1,9 +1,9 @@
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,` {
1
+ (function(E,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):(E=typeof globalThis<"u"?globalThis:E||self,l(E.ReVenueUiCoreReact={},E.jsxRuntime,E.React,E.ReactDOM))})(this,(function(E,l,C,tr){"use strict";function ia(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=ia(C),mt=ia(tr);function la({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?tr.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 ca="rv-theme";function ld(){return document.cookie.split("; ").find(r=>r.startsWith(`${ca}=`))?.split("=")[1]==="dark"?"dark":"light"}function cd(e){const t=[`${ca}=${e}`,"path=/","max-age=31536000","SameSite=Lax"];document.cookie=t.join("; ")}function dd(e){document.documentElement.setAttribute("data-theme",e)}function to(){const[e,t]=C.useState(()=>ld());C.useEffect(()=>{dd(e)},[e]);const r=C.useCallback(()=>{t(o=>{const n=o==="light"?"dark":"light";return cd(n),n})},[]);return{theme:e,toggleTheme:r}}function ud(){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 da="rv_sidebar_collapsed",fd=3600*24*365;function pd(){const e=`${da}=`;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 hd(e,t){const r=t?`; Domain=${t}`:"";document.cookie=`${da}=${e}; Path=/; Max-Age=${fd}; SameSite=Lax${r}`}const vt=e=>e.placement??"header";function gd({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,onBeforeNavigate:g,children:v}){const{theme:y,toggleTheme:b}=to(),[x,S]=C.useState(()=>pd()),[T,N]=C.useState(!1),[A,V]=C.useState(()=>window.location.href),[k,L]=C.useState(()=>new Set),[F,O]=C.useState(!1),U=x&&!F,D=C.useRef(null),j=C.useRef(),H=C.useRef();C.useEffect(()=>{ud();function P(){V(window.location.href)}return window.addEventListener("popstate",P),window.addEventListener("locationchange",P),()=>{window.removeEventListener("popstate",P),window.removeEventListener("locationchange",P)}},[]);function z(){j.current&&clearTimeout(j.current),H.current&&clearTimeout(H.current),j.current=void 0,H.current=void 0}C.useEffect(()=>z,[]);const $=150;function _(){x&&(z(),j.current=setTimeout(()=>O(!0),$))}function Z(){z(),H.current=setTimeout(()=>O(!1),$)}function ee(){z(),O(!1)}function Y(){x&&(z(),O(!0))}function X(){Y()}function Q(P){const R=P.relatedTarget;R&&D.current?.contains(R)||ee()}function ce(){const P=!x;S(P),hd(P,a),ee()}const de=C.useMemo(()=>r.find(P=>P.id===o),[r,o]),I=de?.workspace?.id??"";C.useEffect(()=>{I&&L(P=>P.has(I)?P:new Set(P).add(I))},[I]);const re=C.useMemo(()=>e?.email?e.email.slice(0,2).toUpperCase():"?",[e?.email]),oe=C.useMemo(()=>{const P=de?.workspace?.id;return n.filter(R=>R.hidden?!1:!!(!R.permission||t||e?.globalPermissions.includes(R.permission)||P&&e?.workspacePermissions?.[P]?.includes(R.permission)||o&&e?.venuePermissions?.[o]?.includes(R.permission)))},[n,t,e,de,o]),te=C.useMemo(()=>oe.filter(P=>vt(P)==="sidebar"),[oe]),J=C.useMemo(()=>oe.filter(P=>vt(P)==="header"),[oe]),ne=C.useMemo(()=>oe.filter(P=>vt(P)==="settings"),[oe]),me=C.useMemo(()=>oe.find(P=>vt(P)==="workspace"),[oe]),pe=J[0],We=C.useMemo(()=>{const P=[];for(const R of r){const ie=R.workspace;if(!ie?.id)continue;let Ue=P.find(na=>na.id===ie.id);Ue||(Ue={id:ie.id,name:ie.name,venues:[]},P.push(Ue)),Ue.venues.push(R)}return P},[r]),xe=C.useMemo(()=>n.filter(R=>R.url&&A.startsWith(R.url)).sort((R,ie)=>ie.url.length-R.url.length)[0]??null,[n,A]),ze=xe?.url??null;function Ht(P){L(R=>{const ie=new Set(R);return ie.has(P)?ie.delete(P):ie.add(P),ie})}function er(P){if(g){g(P);return}P()}function pt(P,R){!g||P.button!==0||P.metaKey||P.ctrlKey||P.shiftKey||P.altKey||P.currentTarget.target||(P.preventDefault(),g(()=>window.location.assign(R)))}function ht(){N(!1),er(d)}function Jr(P){const R=me?.url;er(()=>{if(i?.(P),!(!R&&k.has(P))){if(!R){Ht(P);return}window.location.assign(R)}})}function Re(P){const ie=!!xe&&(vt(xe)==="header"||vt(xe)==="settings")?xe.url:pe?.url,Ue=ie?A.startsWith(ie):!1;P===o&&Ue||er(()=>{P!==o&&s?.(P),!(w&&Ue)&&ie&&window.location.assign(ie)})}const oa=J.length>0||ne.length>0||h!==void 0||f!==void 0||x&&!!de;return l.jsxs("div",{className:"rv-app-shell",children:[x&&l.jsx("div",{className:"rv-sidebar-rail-spacer"}),l.jsxs("aside",{ref:D,className:`rv-sidebar${U?" rv-collapsed":""}${x?" rv-floating":""}${x&&F?" rv-flyout":""}`,onMouseLeave:Z,onFocus:X,onBlur:Q,onKeyDown:P=>{P.key==="Escape"&&ee()},children:[l.jsxs("div",{className:"rv-sidebar-top",children:[!U&&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:x?"Expand sidebar":"Collapse sidebar",onClick:ce,children:x?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:_,children:m}),te.length>0&&l.jsx("nav",{className:"rv-sidebar-top-nav",onMouseEnter:_,children:te.map(P=>l.jsxs("a",{href:P.url,onClick:R=>pt(R,P.url),className:`rv-nav-item${P.url===ze?" rv-active":""}`,title:U?P.label:void 0,children:[l.jsx("span",{className:"rv-nav-icon",dangerouslySetInnerHTML:{__html:P.icon}}),!U&&l.jsx("span",{className:"rv-nav-label",children:P.label})]},P.url))}),l.jsx("div",{className:"rv-sidebar-tree",onMouseEnter:_,children:U?We.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:Y,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:[We.length>0&&l.jsx("div",{className:"rv-tree-section-label",children:"Workspaces & venues"}),We.map(P=>l.jsxs("div",{className:"rv-tree-group",children:[l.jsxs("div",{className:"rv-tree-ws",children:[l.jsx("button",{className:`rv-tree-disclosure${k.has(P.id)?" rv-open":""}`,"aria-label":k.has(P.id)?"Collapse workspace":"Expand workspace",onClick:R=>{R.stopPropagation(),Ht(P.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:()=>Jr(P.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:P.name})]})]}),k.has(P.id)&&l.jsx("div",{className:"rv-tree-venues",children:P.venues.map(R=>l.jsxs("button",{className:`rv-tree-venue${R.id===o?" rv-active":""}`,onClick:()=>Re(R.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:R.name})]},R.id))})]},P.id))]})}),l.jsxs("div",{className:"rv-sidebar-user",onMouseEnter:_,children:[l.jsx("div",{className:"rv-user-avatar",children:re}),!U&&l.jsx("div",{className:"rv-user-info",children:l.jsx("span",{className:"rv-user-email",title:e?.email??"",children:e?.email})}),!1,u&&!U&&l.jsx("a",{className:"rv-account-settings-btn",href:u,onClick:P=>pt(P,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"})]})}),!U&&l.jsx("button",{className:"rv-logout-btn",title:"Sign out",onClick:()=>N(!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:[oa&&l.jsxs("header",{className:"rv-shell-header",children:[x&&de&&l.jsxs("div",{className:"rv-header-venue",title:de.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:de.name})]}),J.length>0&&l.jsx("nav",{className:"rv-header-nav",children:J.map(P=>l.jsxs("a",{href:P.url,onClick:R=>pt(R,P.url),className:`rv-header-nav-item${P.url===ze?" rv-active":""}`,children:[l.jsx("span",{className:"rv-nav-icon",dangerouslySetInnerHTML:{__html:P.icon}}),l.jsx("span",{className:"rv-nav-label",children:P.label})]},P.url))}),f,(h||ne.length>0)&&l.jsxs("div",{className:"rv-header-right",children:[h,ne.length>0&&l.jsx("div",{className:"rv-header-settings",children:ne.map(P=>l.jsxs("a",{href:P.url,onClick:R=>pt(R,P.url),className:`rv-header-action${P.url===ze?" rv-active":""}`,children:[l.jsx("span",{className:"rv-header-action-icon",dangerouslySetInnerHTML:{__html:P.icon}}),l.jsx("span",{className:"rv-header-action-label",children:P.label})]},P.url))})]})]}),l.jsx("main",{className:`rv-shell-content${p?" rv-shell-content--scroll":" rv-shell-content--fill"}`,children:v})]}),l.jsx(la,{open:T,title:"Sign out",message:"Are you sure you want to sign out?",confirmLabel:"Sign out",onConfirm:g?ht:d,onCancel:()=>N(!1)})]})}function md({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,vd(n,...t)]}function vd(...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 ua(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bd(...e){return t=>{let r=!1;const o=e.map(n=>{const a=ua(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():ua(e[n],null)}}}}function q(...e){return c.useCallback(bd(...e),e)}function B(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}var ue=globalThis?.document?c.useLayoutEffect:()=>{},wd=c[" useId ".trim().toString()]||(()=>{}),yd=0;function je(e){const[t,r]=c.useState(wd());return ue(()=>{r(o=>o??String(yd++))},[e]),t?`radix-${t}`:""}var xd=c[" useInsertionEffect ".trim().toString()]||ue;function Ye({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[n,a,s]=Cd({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=Sd(f)?f(e):f;h!==e&&s.current?.(h)}else a(f)},[i,e,a,s]);return[d,u]}function Cd({defaultProp:e,onChange:t}){const[r,o]=c.useState(e),n=c.useRef(r),a=c.useRef(t);return xd(()=>{a.current=t},[t]),c.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}function Sd(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=[];pa(n)&&typeof rr=="function"&&(n=rr(n._payload)),c.Children.forEach(n,m=>{if(kd(m)){i=!0;const p=m;let w="child"in p.props?p.props.child:p.props.children;pa(w)&&typeof rr=="function"&&(w=rr(w._payload)),s=Nd(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?Ad(s):void 0,f=q(o,u);if(!s){if(n||n===0)throw new Error(i?Md(e):_d(e));return n}const h=Pd(a,s.props??{});return s.type!==c.Fragment&&(h.ref=o?f:u),c.cloneElement(s,h)});return t.displayName=`${e}.Slot`,t}var Ed=it("Slot"),fa=Symbol.for("radix.slottable");function Td(e){const t=r=>"child"in r?r.children(r.child):r.children;return t.displayName=`${e}.Slottable`,t.__radixId=fa,t}var Nd=(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 Pd(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 Ad(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 kd(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fa}var Dd=Symbol.for("react.lazy");function pa(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Dd&&"_payload"in e&&Od(e._payload)}function Od(e){return typeof e=="object"&&e!==null&&"then"in e}var _d=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Md=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,rr=c[" use ".trim().toString()],Id=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],W=Id.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 ha(e,t){e&&mt.flushSync(()=>e.dispatchEvent(t))}function fe(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>((...r)=>t.current?.(...r)),[])}function Ld(e,t=globalThis?.document){const r=fe(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 $d="DismissableLayer",ro="dismissableLayer.update",Fd="dismissableLayer.pointerDownOutside",Bd="dismissableLayer.focusOutside",ga,oo=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),bt=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(oo),[h,m]=c.useState(null),p=h?.ownerDocument??globalThis?.document,[,w]=c.useState({}),g=q(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,N=c.useRef(!1),A=Wd(k=>{const L=k.target;if(!(L instanceof Node))return;const F=[...f.branches].some(O=>O.contains(L));!T||F||(a?.(k),i?.(k),k.defaultPrevented||d?.())},{ownerDocument:p,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:N,dismissableSurfaces:f.dismissableSurfaces}),V=zd(k=>{if(o&&N.current)return;const L=k.target;[...f.branches].some(O=>O.contains(L))||(s?.(k),i?.(k),k.defaultPrevented||d?.())},p);return Ld(k=>{x===f.layers.size-1&&(n?.(k),!k.defaultPrevented&&d&&(k.preventDefault(),d()))},p),c.useEffect(()=>{if(h)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(ga=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),va(),()=>{r&&(f.layersWithOutsidePointerEventsDisabled.delete(h),f.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=ga))}},[h,p,r,f]),c.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),va())},[h,f]),c.useEffect(()=>{const k=()=>w({});return document.addEventListener(ro,k),()=>document.removeEventListener(ro,k)},[]),l.jsx(W.div,{...u,ref:g,style:{pointerEvents:S?T?"auto":"none":void 0,...e.style},onFocusCapture:B(e.onFocusCapture,V.onFocusCapture),onBlurCapture:B(e.onBlurCapture,V.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,A.onPointerDownCapture)})});bt.displayName=$d;var Hd="DismissableLayerBranch",ma=c.forwardRef((e,t)=>{const r=c.useContext(oo),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})});ma.displayName=Hd;function Vd(){const e=c.useContext(oo),[t,r]=c.useState(null);return c.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function Wd(e,t){const{ownerDocument:r=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:n,dismissableSurfaces:a}=t,s=fe(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(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(){r.removeEventListener("click",f.current);const T=m();h(),T||ba(Fd,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 zd(e,t=globalThis?.document){const r=fe(e),o=c.useRef(!1);return c.useEffect(()=>{const n=a=>{a.target&&!o.current&&ba(Bd,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 va(){const e=new CustomEvent(ro);document.dispatchEvent(e)}function ba(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?ha(n,a):n.dispatchEvent(a)}var Rd=bt,Ud=ma,no="focusScope.autoFocusOnMount",ao="focusScope.autoFocusOnUnmount",wa={bubbles:!1,cancelable:!0},jd="FocusScope",or=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...s}=e,[i,d]=c.useState(null),u=fe(n),f=fe(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:Ke(h.current,{select:!0})},v=function(x){if(p.paused||!i)return;const S=x.relatedTarget;S!==null&&(i.contains(S)||Ke(h.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const T of x)T.removedNodes.length>0&&Ke(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){Ca.add(p);const g=document.activeElement;if(!i.contains(g)){const y=new CustomEvent(no,wa);i.addEventListener(no,u),i.dispatchEvent(y),y.defaultPrevented||(Yd(Zd(ya(i)),{select:!0}),document.activeElement===g&&Ke(i))}return()=>{i.removeEventListener(no,u),setTimeout(()=>{const y=new CustomEvent(ao,wa);i.addEventListener(ao,f),i.dispatchEvent(y),y.defaultPrevented||Ke(g??document.body,{select:!0}),i.removeEventListener(ao,f),Ca.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]=Kd(b);x&&S?!g.shiftKey&&y===S?(g.preventDefault(),r&&Ke(x,{select:!0})):g.shiftKey&&y===x&&(g.preventDefault(),r&&Ke(S,{select:!0})):y===b&&g.preventDefault()}},[r,o,p.paused]);return l.jsx(W.div,{tabIndex:-1,...s,ref:m,onKeyDown:w})});or.displayName=jd;function Yd(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(Ke(o,{select:t}),document.activeElement!==r)return}function Kd(e){const t=ya(e),r=xa(t,e),o=xa(t.reverse(),e);return[r,o]}function ya(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 xa(e,t){for(const r of e)if(!Gd(r,{upTo:t}))return r}function Gd(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 Xd(e){return e instanceof HTMLInputElement&&"select"in e}function Ke(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Xd(e)&&t&&e.select()}}var Ca=qd();function qd(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Sa(e,t),e.unshift(t)},remove(t){e=Sa(e,t),e[0]?.resume()}}}function Sa(e,t){const r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function Zd(e){return e.filter(t=>t.tagName!=="A")}var Qd="Portal",zt=c.forwardRef((e,t)=>{const{container:r,...o}=e,[n,a]=c.useState(!1);ue(()=>a(!0),[]);const s=r||n&&globalThis?.document?.body;return s?mt.createPortal(l.jsx(W.div,{...o,ref:t}),s):null});zt.displayName=Qd;function Jd(e,t){return c.useReducer((r,o)=>t[r][o]??r,e)}var he=e=>{const{present:t,children:r}=e,o=eu(t),n=typeof r=="function"?r({present:o.isPresent}):c.Children.only(r),a=tu(o.ref,ru(n));return typeof r=="function"||o.isPresent?c.cloneElement(n,{ref:a}):null};he.displayName="Presence";function eu(e){const[t,r]=c.useState(),o=c.useRef(null),n=c.useRef(e),a=c.useRef("none"),s=e?"mounted":"unmounted",[i,d]=Jd(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=nr(o.current);a.current=i==="mounted"?u:"none"},[i]),ue(()=>{const u=o.current,f=n.current;if(f!==e){const m=a.current,p=nr(u);e?d("MOUNT"):p==="none"||u?.display==="none"?d("UNMOUNT"):d(f&&m!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,d]),ue(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,h=p=>{const g=nr(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=nr(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 Ea(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tu(...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=Ea(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():Ea(o[s],null)}}},[])}function nr(e){return e?.animationName||"none"}function ru(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 ar=0,wt=null;function so(){c.useEffect(()=>{wt||(wt={start:Ta(),end:Ta()});const{start:e,end:t}=wt;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),ar++,()=>{ar===1&&(wt?.start.remove(),wt?.end.remove(),wt=null),ar=Math.max(0,ar-1)}},[])}function Ta(){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 De=function(){return De=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},De.apply(this,arguments)};function Na(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 ou(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 sr="right-scroll-bar-position",ir="width-before-scroll-bar",nu="with-scroll-bars-hidden",au="--removed-body-scroll-bar-size";function io(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function su(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 iu=typeof window<"u"?c.useLayoutEffect:c.useEffect,Pa=new WeakMap;function lu(e,t){var r=su(null,function(o){return e.forEach(function(n){return io(n,o)})});return iu(function(){var o=Pa.get(r);if(o){var n=new Set(o),a=new Set(e),s=r.current;n.forEach(function(i){a.has(i)||io(i,null)}),a.forEach(function(i){n.has(i)||io(i,s)})}Pa.set(r,e)},[e]),r}function cu(e){return e}function du(e,t){t===void 0&&(t=cu);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 uu(e){e===void 0&&(e={});var t=du(null);return t.options=De({async:!0,ssr:!1},e),t}var Aa=function(e){var t=e.sideCar,r=Na(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,De({},r))};Aa.isSideCarExport=!0;function fu(e,t){return e.useMedium(t),Aa}var ka=uu(),lo=function(){},lr=c.forwardRef(function(e,t){var r=c.useRef(null),o=c.useState({onScrollCapture:lo,onWheelCapture:lo,onTouchMoveCapture:lo}),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=Na(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=m,N=lu([r,t]),A=De(De({},S),n);return c.createElement(c.Fragment,null,f&&c.createElement(T,{sideCar:ka,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),De(De({},A),{ref:N})):c.createElement(b,De({},A,{className:d,ref:N}),i))});lr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},lr.classNames={fullWidth:ir,zeroRight:sr};var pu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=pu();return t&&e.setAttribute("nonce",t),e}function gu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vu=function(){var e=0,t=null;return{add:function(r){e==0&&(t=hu())&&(gu(t,r),mu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bu=function(){var e=vu();return function(t,r){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Da=function(){var e=bu(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t},wu={left:0,top:0,right:0,gap:0},co=function(e){return parseInt(e||"",10)||0},yu=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[co(r),co(o),co(n)]},xu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return wu;var t=yu(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])}},Cu=Da(),yt="data-scroll-locked",Su=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(nu,` {
3
3
  overflow: hidden `).concat(o,`;
4
4
  padding-right: `).concat(i,"px ").concat(o,`;
5
5
  }
6
- body[`).concat(bt,`] {
6
+ body[`).concat(yt,`] {
7
7
  overflow: hidden `).concat(o,`;
8
8
  overscroll-behavior: contain;
9
9
  `).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
@@ -16,32 +16,32 @@
16
16
  `),r==="padding"&&"padding-right: ".concat(i,"px ").concat(o,";")].filter(Boolean).join(""),`
17
17
  }
18
18
 
19
- .`).concat(nr,` {
19
+ .`).concat(sr,` {
20
20
  right: `).concat(i,"px ").concat(o,`;
21
21
  }
22
22
 
23
- .`).concat(ar,` {
23
+ .`).concat(ir,` {
24
24
  margin-right: `).concat(i,"px ").concat(o,`;
25
25
  }
26
26
 
27
- .`).concat(nr," .").concat(nr,` {
27
+ .`).concat(sr," .").concat(sr,` {
28
28
  right: 0 `).concat(o,`;
29
29
  }
30
30
 
31
- .`).concat(ar," .").concat(ar,` {
31
+ .`).concat(ir," .").concat(ir,` {
32
32
  margin-right: 0 `).concat(o,`;
33
33
  }
34
34
 
35
- body[`).concat(bt,`] {
36
- `).concat(ou,": ").concat(i,`px;
35
+ body[`).concat(yt,`] {
36
+ `).concat(au,": ").concat(i,`px;
37
37
  }
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`
38
+ `)},Oa=function(){var e=parseInt(document.body.getAttribute(yt)||"0",10);return isFinite(e)?e:0},Eu=function(){c.useEffect(function(){return document.body.setAttribute(yt,(Oa()+1).toString()),function(){var e=Oa()-1;e<=0?document.body.removeAttribute(yt):document.body.setAttribute(yt,e.toString())}},[])},Tu=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,n=o===void 0?"margin":o;Eu();var a=c.useMemo(function(){return xu(n)},[n]);return c.createElement(Cu,{styles:Su(a,!t,n,r?"":"!important")})},uo=!1;if(typeof window<"u")try{var cr=Object.defineProperty({},"passive",{get:function(){return uo=!0,!0}});window.addEventListener("test",cr,cr),window.removeEventListener("test",cr,cr)}catch{uo=!1}var xt=uo?{passive:!1}:!1,Nu=function(e){return e.tagName==="TEXTAREA"},_a=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Nu(e)&&r[t]==="visible")},Pu=function(e){return _a(e,"overflowY")},Au=function(e){return _a(e,"overflowX")},Ma=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=Ia(e,o);if(n){var a=La(e,o),s=a[1],i=a[2];if(s>i)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},ku=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},Du=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},Ia=function(e,t){return e==="v"?Pu(t):Au(t)},La=function(e,t){return e==="v"?ku(t):Du(t)},Ou=function(e,t){return e==="h"&&t==="rtl"?-1:1},_u=function(e,t,r,o,n){var a=Ou(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=La(e,i),w=p[0],g=p[1],v=p[2],y=g-v-a*w;(w||y)&&Ia(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},dr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$a=function(e){return[e.deltaX,e.deltaY]},Fa=function(e){return e&&"current"in e?e.current:e},Mu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Iu=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
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:
41
+ `)},Lu=0,Ct=[];function $u(e){var t=c.useRef([]),r=c.useRef([0,0]),o=c.useRef(),n=c.useState(Lu++)[0],a=c.useState(Da)[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=ou([e.lockRef.current],(e.shards||[]).map(Fa),!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=dr(g),b=r.current,x="deltaX"in g?g.deltaX:b[0]-y[0],S="deltaY"in g?g.deltaY:b[1]-y[1],T,N=g.target,A=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&A==="h"&&N.type==="range")return!1;var V=window.getSelection(),k=V&&V.anchorNode,L=k?k===N||k.contains(N):!1;if(L)return!1;var F=Ma(A,N);if(!F)return!0;if(F?T=A:(T=A==="v"?"h":"v",F=Ma(A,N)),!F)return!1;if(!o.current&&"changedTouches"in g&&(x||S)&&(o.current=T),!T)return!0;var O=o.current||T;return _u(O,v,g,O==="h"?x:S)},[]),d=c.useCallback(function(g){var v=g;if(!(!Ct.length||Ct[Ct.length-1]!==a)){var y="deltaY"in v?$a(v):dr(v),b=t.current.filter(function(T){return T.name===v.type&&(T.target===v.target||v.target===T.shadowParent)&&Mu(T.delta,y)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var x=(s.current.shards||[]).map(Fa).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=c.useCallback(function(g,v,y,b){var x={name:g,delta:v,target:y,should:b,shadowParent:Fu(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=dr(g),o.current=void 0},[]),h=c.useCallback(function(g){u(g.type,$a(g),g.target,i(g,e.lockRef.current))},[]),m=c.useCallback(function(g){u(g.type,dr(g),g.target,i(g,e.lockRef.current))},[]);c.useEffect(function(){return Ct.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",d,xt),document.addEventListener("touchmove",d,xt),document.addEventListener("touchstart",f,xt),function(){Ct=Ct.filter(function(g){return g!==a}),document.removeEventListener("wheel",d,xt),document.removeEventListener("touchmove",d,xt),document.removeEventListener("touchstart",f,xt)}},[]);var p=e.removeScrollBar,w=e.inert;return c.createElement(c.Fragment,null,w?c.createElement(a,{styles:Iu(n)}):null,p?c.createElement(Tu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Fu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Bu=fu(ka,$u);var ur=c.forwardRef(function(e,t){return c.createElement(lr,De({},e,{ref:t,sideCar:Bu}))});ur.classNames=lr.classNames;var Hu=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},St=new WeakMap,fr=new WeakMap,pr={},fo=0,Ba=function(e){return e&&(e.host||Ba(e.parentNode))},Vu=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=Ba(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})},Wu=function(e,t,r,o){var n=Vu(t,Array.isArray(e)?e:[e]);pr[r]||(pr[r]=new WeakMap);var a=pr[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=(St.get(m)||0)+1,v=(a.get(m)||0)+1;St.set(m,g),a.set(m,v),s.push(m),g===1&&w&&fr.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(),fo++,function(){s.forEach(function(h){var m=St.get(h)-1,p=a.get(h)-1;St.set(h,m),a.set(h,p),m||(fr.has(h)||h.removeAttribute(o),fr.delete(h)),p||h.removeAttribute(r)}),fo--,fo||(St=new WeakMap,St=new WeakMap,fr=new WeakMap,pr={})}},po=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=Hu(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),Wu(o,n,r,"aria-hidden")):function(){return null}},hr="Dialog",[Ha,Va]=ve(hr),[zu,Ce]=Ha(hr),gr=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]=Ye({prop:o,defaultProp:n??!1,onChange:a,caller:hr});return l.jsx(zu,{scope:t,triggerRef:i,contentRef:d,contentId:je(),titleId:je(),descriptionId:je(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(h=>!h),[f]),modal:s,children:r})};gr.displayName=hr;var Wa="DialogTrigger",mr=c.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,n=Ce(Wa,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":go(n.open),...o,ref:a,onClick:B(e.onClick,n.onOpenToggle)})});mr.displayName=Wa;var ho="DialogPortal",[Ru,za]=Ha(ho,{forceMount:void 0}),vr=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:n}=e,a=Ce(ho,t);return l.jsx(Ru,{scope:t,forceMount:r,children:c.Children.map(o,s=>l.jsx(he,{present:r||a.open,children:l.jsx(zt,{asChild:!0,container:n,children:s})}))})};vr.displayName=ho;var br="DialogOverlay",Et=c.forwardRef((e,t)=>{const r=za(br,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Ce(br,e.__scopeDialog);return a.modal?l.jsx(he,{present:o||a.open,children:l.jsx(ju,{...n,ref:t})}):null});Et.displayName=br;var Uu=it("DialogOverlay.RemoveScroll"),ju=c.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,n=Ce(br,r),a=Vd(),s=q(t,a);return l.jsx(ur,{as:Uu,allowPinchZoom:!0,shards:[n.contentRef],children:l.jsx(W.div,{"data-state":go(n.open),...o,ref:s,style:{pointerEvents:"auto",...o.style}})})}),Tt="DialogContent",Nt=c.forwardRef((e,t)=>{const r=za(Tt,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Ce(Tt,e.__scopeDialog);return l.jsx(he,{present:o||a.open,children:a.modal?l.jsx(Yu,{...n,ref:t}):l.jsx(Ku,{...n,ref:t})})});Nt.displayName=Tt;var Yu=c.forwardRef((e,t)=>{const r=Ce(Tt,e.__scopeDialog),o=c.useRef(null),n=q(t,r.contentRef,o);return c.useEffect(()=>{const a=o.current;if(a)return po(a)},[]),l.jsx(Ra,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:B(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:B(e.onFocusOutside,a=>a.preventDefault())})}),Ku=c.forwardRef((e,t)=>{const r=Ce(Tt,e.__scopeDialog),o=c.useRef(!1),n=c.useRef(!1);return l.jsx(Ra,{...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()}})}),Ra=c.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,...s}=e,i=Ce(Tt,r);return so(),l.jsx(l.Fragment,{children:l.jsx(or,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:l.jsx(bt,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":go(i.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>i.onOpenChange(!1)})})})}),Ua="DialogTitle",Pt=c.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,n=Ce(Ua,r);return l.jsx(W.h2,{id:n.titleId,...o,ref:t})});Pt.displayName=Ua;var ja="DialogDescription",At=c.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,n=Ce(ja,r);return l.jsx(W.p,{id:n.descriptionId,...o,ref:t})});At.displayName=ja;var Ya="DialogClose",lt=c.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,n=Ce(Ya,r);return l.jsx(W.button,{type:"button",...o,ref:t,onClick:B(e.onClick,()=>n.onOpenChange(!1))})});lt.displayName=Ya;function go(e){return e?"open":"closed"}var Ka="AlertDialog",[Gu]=ve(Ka,[Va]),Le=Va(),Ga=e=>{const{__scopeAlertDialog:t,...r}=e,o=Le(t);return l.jsx(gr,{...o,...r,modal:!0})};Ga.displayName=Ka;var Xu="AlertDialogTrigger",Xa=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,n=Le(r);return l.jsx(mr,{...n,...o,ref:t})});Xa.displayName=Xu;var qu="AlertDialogPortal",qa=e=>{const{__scopeAlertDialog:t,...r}=e,o=Le(t);return l.jsx(vr,{...o,...r})};qa.displayName=qu;var Zu="AlertDialogOverlay",Za=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,n=Le(r);return l.jsx(Et,{...n,...o,ref:t})});Za.displayName=Zu;var Qa="AlertDialogContent",[Qu,Ju]=Gu(Qa),Ja=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:o,...n}=e,a=Le(r),s=c.useRef(null),i=q(t,s),d=c.useRef(null);return l.jsx(Qu,{scope:r,cancelRef:d,children:l.jsx(Nt,{role:"alertdialog",...a,...n,ref:i,onOpenAutoFocus:B(n.onOpenAutoFocus,u=>{u.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:o})})});Ja.displayName=Qa;var ef="AlertDialogTitle",es=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,n=Le(r);return l.jsx(Pt,{...n,...o,ref:t})});es.displayName=ef;var tf="AlertDialogDescription",ts=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,n=Le(r);return l.jsx(At,{...n,...o,ref:t})});ts.displayName=tf;var rf="AlertDialogAction",rs=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,n=Le(r);return l.jsx(lt,{...n,...o,ref:t})});rs.displayName=rf;var os="AlertDialogCancel",ns=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...o}=e,{cancelRef:n}=Ju(os,r),a=Le(r),s=q(t,n);return l.jsx(lt,{...a,...o,ref:s})});ns.displayName=os;var of=Ga,nf=Xa,af=qa,as=Za,ss=Ja,is=rs,ls=ns,cs=es,ds=ts;function us(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=us(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function fs(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=us(e))&&(o&&(o+=" "),o+=t);return o}const mo="-",sf=e=>{const t=cf(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{const i=s.split(mo);return i[0]===""&&i.length!==1&&i.shift(),ps(i,t)||lf(s)},getConflictingClassGroupIds:(s,i)=>{const d=r[s]||[];return i&&o[s]?[...d,...o[s]]:d}}},ps=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?ps(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;const a=e.join(mo);return t.validators.find(({validator:s})=>s(a))?.classGroupId},hs=/^\[(.+)\]$/,lf=e=>{if(hs.test(e)){const t=hs.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},cf=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return uf(Object.entries(e.classGroups),r).forEach(([a,s])=>{vo(s,o,a,t)}),o},vo=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){const a=n===""?t:gs(t,n);a.classGroupId=r;return}if(typeof n=="function"){if(df(n)){vo(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([a,s])=>{vo(s,gs(t,a),r,o)})})},gs=(e,t)=>{let r=e;return t.split(mo).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},df=e=>e.isThemeGetter,uf=(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,ff=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)}}},ms="!",pf=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(ms),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},hf=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},gf=e=>({cache:ff(e.cacheSize),parseClassName:pf(e),...sf(e)}),mf=/\s+/,vf=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,a=[],s=e.trim().split(mf);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=hf(f).join(":"),y=h?v+ms: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 bf(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=vs(t))&&(o&&(o+=" "),o+=r);return o}const vs=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=vs(e[o]))&&(r&&(r+=" "),r+=t);return r};function wf(e,...t){let r,o,n,a=s;function s(d){const u=t.reduce((f,h)=>h(f),e());return r=gf(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=vf(d,r);return n(d,f),f}return function(){return a(bf.apply(null,arguments))}}const se=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},bs=/^\[(?:([a-z-]+):)?(.+)\]$/i,yf=/^\d+\/\d+$/,xf=new Set(["px","full","screen"]),Cf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sf=/\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$/,Ef=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Tf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$e=e=>kt(e)||xf.has(e)||yf.test(e),Ge=e=>Dt(e,"length",If),kt=e=>!!e&&!Number.isNaN(Number(e)),bo=e=>Dt(e,"number",kt),Rt=e=>!!e&&Number.isInteger(Number(e)),Pf=e=>e.endsWith("%")&&kt(e.slice(0,-1)),G=e=>bs.test(e),Xe=e=>Cf.test(e),Af=new Set(["length","size","percentage"]),kf=e=>Dt(e,Af,ws),Df=e=>Dt(e,"position",ws),Of=new Set(["image","url"]),_f=e=>Dt(e,Of,$f),Mf=e=>Dt(e,"",Lf),Ut=()=>!0,Dt=(e,t,r)=>{const o=bs.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},If=e=>Sf.test(e)&&!Ef.test(e),ws=()=>!1,Lf=e=>Tf.test(e),$f=e=>Nf.test(e),Ff=wf(()=>{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"),T=se("sepia"),N=se("skew"),A=se("space"),V=se("translate"),k=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",G,t],O=()=>[G,t],U=()=>["",$e,Ge],D=()=>["auto",kt,G],j=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["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",G],Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ee=()=>[kt,G];return{cacheSize:500,separator:":",theme:{colors:[Ut],spacing:[$e,Ge],blur:["none","",Xe,G],brightness:ee(),borderColor:[e],borderRadius:["none","","full",Xe,G],borderSpacing:O(),borderWidth:U(),contrast:ee(),grayscale:_(),hueRotate:ee(),invert:_(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Pf,Ge],inset:F(),margin:F(),opacity:ee(),padding:O(),saturate:ee(),scale:ee(),sepia:_(),skew:ee(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",G]}],container:["container"],columns:[{columns:[Xe]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...j(),G]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],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",Rt,G]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",G]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",Rt,G]}],"grid-cols":[{"grid-cols":[Ut]}],"col-start-end":[{col:["auto",{span:["full",Rt,G]},G]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[Ut]}],"row-start-end":[{row:["auto",{span:[Rt,G]},G]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",G]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",G]}],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",G,t]}],"min-w":[{"min-w":[G,t,"min","max","fit"]}],"max-w":[{"max-w":[G,t,"none","full","min","max","fit","prose",{screen:[Xe]},Xe]}],h:[{h:[G,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[G,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Xe,Ge]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",bo]}],"font-family":[{font:[Ut]}],"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",G]}],"line-clamp":[{"line-clamp":["none",kt,bo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$e,G]}],"list-image":[{"list-image":["none",G]}],"list-style-type":[{list:["none","disc","decimal",G]}],"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:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$e,Ge]}],"underline-offset":[{"underline-offset":["auto",$e,G]}],"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",G]}],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",G]}],"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:[...j(),Df]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kf]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_f]}],"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:[...H(),"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:H()}],"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:["",...H()]}],"outline-offset":[{"outline-offset":[$e,G]}],"outline-w":[{outline:[$e,Ge]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[$e,Ge]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xe,Mf]}],"shadow-color":[{shadow:[Ut]}],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",Xe,G]}],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":[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":[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",G]}],duration:[{duration:ee()}],ease:[{ease:["linear","in","out","in-out",G]}],delay:[{delay:ee()}],animate:[{animate:["none","spin","ping","pulse","bounce",G]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Rt,G]}],"translate-x":[{"translate-x":[V]}],"translate-y":[{"translate-y":[V]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",G]}],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",G]}],"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",G]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$e,Ge,bo]}],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 M(...e){return Ff(fs(e))}const ys=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xs=fs,jt=(e,t)=>r=>{var o;if(t?.variants==null)return xs(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=ys(f)||ys(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 xs(e,s,d,r?.class,r?.className)},wr=jt("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"}}),qe=c.forwardRef(({className:e,variant:t,size:r,asChild:o=!1,...n},a)=>{const s=o?Ed:"button";return l.jsx(s,{className:M(wr({variant:t,size:r,className:e})),ref:a,...n})});qe.displayName="Button";const Cs=of,Bf=nf,Ss=af,wo=c.forwardRef(({className:e,...t},r)=>l.jsx(as,{className:M("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}));wo.displayName=as.displayName;const yo=c.forwardRef(({className:e,...t},r)=>l.jsxs(Ss,{children:[l.jsx(wo,{}),l.jsx(ss,{ref:r,className:M("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})]}));yo.displayName=ss.displayName;const xo=({className:e,...t})=>l.jsx("div",{className:M("flex flex-col space-y-2 text-center sm:text-left",e),...t});xo.displayName="AlertDialogHeader";const Co=({className:e,...t})=>l.jsx("div",{className:M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Co.displayName="AlertDialogFooter";const So=c.forwardRef(({className:e,...t},r)=>l.jsx(cs,{ref:r,className:M("text-lg font-semibold",e),...t}));So.displayName=cs.displayName;const Eo=c.forwardRef(({className:e,...t},r)=>l.jsx(ds,{ref:r,className:M("text-sm text-muted-foreground",e),...t}));Eo.displayName=ds.displayName;const To=c.forwardRef(({className:e,...t},r)=>l.jsx(is,{ref:r,className:M(wr(),e),...t}));To.displayName=is.displayName;const No=c.forwardRef(({className:e,...t},r)=>l.jsx(ls,{ref:r,className:M(wr({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));No.displayName=ls.displayName;var Po="Avatar",[Hf]=ve(Po),Vf=[0,()=>{}],[Wf,Es]=Hf(Po),Ao=c.forwardRef((e,t)=>{const{__scopeAvatar:r,...o}=e,[n,a]=c.useState("idle"),[s,i]=Rf();return l.jsx(Wf,{scope:r,imageLoadingStatus:n,setImageLoadingStatus:a,imageCount:s,setImageCount:i,children:l.jsx(W.span,{...o,ref:t})})});Ao.displayName=Po;var Ts="AvatarImage",ko=c.forwardRef((e,t)=>{const{__scopeAvatar:r,src:o,onLoadingStatusChange:n,...a}=e,s=Es(Ts,r);Uf(s.setImageCount);const i=zf(o,{referrerPolicy:a.referrerPolicy,crossOrigin:a.crossOrigin,loadingStatus:s.imageLoadingStatus,setLoadingStatus:s.setImageLoadingStatus}),d=fe(f=>{n?.(f)}),u=c.useRef(i);return ue(()=>{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});ko.displayName=Ts;var Ns="AvatarFallback",Do=c.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:o,...n}=e,a=Es(Ns,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});Do.displayName=Ns;function zf(e,{loadingStatus:t,setLoadingStatus:r,referrerPolicy:o,crossOrigin:n}){return ue(()=>{if(!e){r("error");return}const a=new window.Image,s=d=>{const u=d.currentTarget;r(Ps(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(Ps(a)),()=>{a.removeEventListener("load",s),a.removeEventListener("error",i),r("idle")}},[e,n,o,r]),t}function Ps(e){return e.complete?e.naturalWidth>0?"loaded":"error":"loading"}function Rf(){let e=Vf;{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 Uf(e){c.useEffect(()=>(e(t=>t+1),()=>{e(t=>t-1)}),[e])}const As=c.forwardRef(({className:e,...t},r)=>l.jsx(Ao,{ref:r,className:M("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));As.displayName=Ao.displayName;const ks=c.forwardRef(({className:e,...t},r)=>l.jsx(ko,{ref:r,className:M("aspect-square h-full w-full",e),...t}));ks.displayName=ko.displayName;const Ds=c.forwardRef(({className:e,...t},r)=>l.jsx(Do,{ref:r,className:M("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ds.displayName=Do.displayName;const Os=jt("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"}}),_s=c.forwardRef(({className:e,variant:t,...r},o)=>l.jsx("div",{ref:o,className:M(Os({variant:t}),e),...r})),Ms=c.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:M("rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200",e),...t}));Ms.displayName="Card";const Is=c.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:M("flex flex-col space-y-1.5 p-6",e),...t}));Is.displayName="CardHeader";const Ls=c.forwardRef(({className:e,...t},r)=>l.jsx("h3",{ref:r,className:M("text-2xl font-semibold leading-none tracking-tight",e),...t}));Ls.displayName="CardTitle";const $s=c.forwardRef(({className:e,...t},r)=>l.jsx("p",{ref:r,className:M("text-sm text-muted-foreground",e),...t}));$s.displayName="CardDescription";const Fs=c.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:M("p-6 pt-0",e),...t}));Fs.displayName="CardContent";const Bs=c.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:M("flex items-center p-6 pt-0",e),...t}));Bs.displayName="CardFooter";function Oo(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 _o(e){const[t,r]=c.useState(void 0);return ue(()=>{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 yr="Checkbox",[jf]=ve(yr),[Yf,Mo]=jf(yr);function Kf(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]=Ye({prop:r,defaultProp:n??!1,onChange:d,caller:yr}),[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:Ze(n)?!1:n,isFormControl:x,bubbleInput:v,setBubbleInput:y};return l.jsx(Yf,{scope:t,...S,children:Gf(h)?h(S):o})}var Hs="CheckboxTrigger",Vs=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}=Mo(Hs,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":Ze(d)?"mixed":d,"aria-required":u,"data-state":js(d),"data-disabled":i?"":void 0,disabled:i,value:s,...o,ref:g,onKeyDown:B(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:B(r,y=>{h(b=>Ze(b)?!0:!b),w&&p&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})})});Vs.displayName=Hs;var Io=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(Kf,{__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(Vs,{...h,ref:t,__scopeCheckbox:r}),m&&l.jsx(Us,{__scopeCheckbox:r})]})})});Io.displayName=yr;var Ws="CheckboxIndicator",zs=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:o,...n}=e,a=Mo(Ws,r);return l.jsx(he,{present:o||Ze(a.checked)||a.checked===!0,children:l.jsx(W.span,{"data-state":js(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});zs.displayName=Ws;var Rs="CheckboxBubbleInput",Us=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}=Mo(Rs,e),w=q(r,p),g=Oo(a),v=_o(o);c.useEffect(()=>{const b=m;if(!b)return;const x=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(x,"checked").set,N=!n.current;if(g!==a&&T){const A=new Event("click",{bubbles:N});b.indeterminate=Ze(a),T.call(b,Ze(a)?!1:a),b.dispatchEvent(A)}},[m,g,a,n]);const y=c.useRef(Ze(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%)"}})});Us.displayName=Rs;function Gf(e){return typeof e=="function"}function Ze(e){return e==="indeterminate"}function js(e){return Ze(e)?"indeterminate":e?"checked":"unchecked"}const Xf=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ys=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim();var qf={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 Zf=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,...qf,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:Ys("lucide",n),...i},[...s.map(([u,f])=>C.createElement(u,f)),...Array.isArray(a)?a:[a]]));const Fe=(e,t)=>{const r=C.forwardRef(({className:o,...n},a)=>C.createElement(Zf,{ref:a,iconNode:t,className:Ys(`lucide-${Xf(e)}`,o),...n}));return r.displayName=`${e}`,r};const Lo=Fe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const $o=Fe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Qf=Fe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Jf=Fe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Ks=Fe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const ep=Fe("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 tp=Fe("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 rp=Fe("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 Yt=Fe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Fo=c.forwardRef(({className:e,...t},r)=>l.jsx(Io,{ref:r,className:M("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(zs,{className:M("flex items-center justify-center text-current"),children:l.jsx(Lo,{className:"h-4 w-4"})})}));Fo.displayName=Io.displayName;const Gs=gr,op=mr,Xs=vr,np=lt,Bo=c.forwardRef(({className:e,...t},r)=>l.jsx(Et,{ref:r,className:M("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}));Bo.displayName=Et.displayName;const Ho=c.forwardRef(({className:e,children:t,...r},o)=>l.jsxs(Xs,{children:[l.jsx(Bo,{}),l.jsxs(Nt,{ref:o,className:M("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(Yt,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ho.displayName=Nt.displayName;const Vo=({className:e,...t})=>l.jsx("div",{className:M("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Vo.displayName="DialogHeader";const Wo=({className:e,...t})=>l.jsx("div",{className:M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Wo.displayName="DialogFooter";const zo=c.forwardRef(({className:e,...t},r)=>l.jsx(Pt,{ref:r,className:M("text-lg font-semibold leading-none tracking-tight",e),...t}));zo.displayName=Pt.displayName;const Ro=c.forwardRef(({className:e,...t},r)=>l.jsx(At,{ref:r,className:M("text-sm text-muted-foreground",e),...t}));Ro.displayName=At.displayName;const Uo=c.forwardRef(({className:e,type:t,...r},o)=>l.jsx("input",{type:t,className:M("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}));Uo.displayName="Input";var ap="Label",qs=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())}}));qs.displayName=ap;var Zs=qs;const sp=jt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Qs=c.forwardRef(({className:e,...t},r)=>l.jsx(Zs,{ref:r,className:M(sp(),e),...t}));Qs.displayName=Zs.displayName;const ip=["top","right","bottom","left"],Qe=Math.min,be=Math.max,xr=Math.round,Cr=Math.floor,Oe=e=>({x:e,y:e}),lp={left:"right",right:"left",bottom:"top",top:"bottom"};function jo(e,t,r){return be(e,Qe(t,r))}function Be(e,t){return typeof e=="function"?e(t):e}function He(e){return e.split("-")[0]}function Ot(e){return e.split("-")[1]}function Yo(e){return e==="x"?"y":"x"}function Ko(e){return e==="y"?"height":"width"}function _e(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Go(e){return Yo(_e(e))}function cp(e,t,r){r===void 0&&(r=!1);const o=Ot(e),n=Go(e),a=Ko(n);let s=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Sr(s)),[s,Sr(s)]}function dp(e){const t=Sr(e);return[Xo(e),t,Xo(t)]}function Xo(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Js=["left","right"],ei=["right","left"],up=["top","bottom"],fp=["bottom","top"];function pp(e,t,r){switch(e){case"top":case"bottom":return r?t?ei:Js:t?Js:ei;case"left":case"right":return t?up:fp;default:return[]}}function hp(e,t,r,o){const n=Ot(e);let a=pp(He(e),r==="start",o);return n&&(a=a.map(s=>s+"-"+n),t&&(a=a.concat(a.map(Xo)))),a}function Sr(e){const t=He(e);return lp[t]+e.slice(t.length)}function gp(e){return{top:0,right:0,bottom:0,left:0,...e}}function ti(e){return typeof e!="number"?gp(e):{top:e,right:e,bottom:e,left:e}}function Er(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 ri(e,t,r){let{reference:o,floating:n}=e;const a=_e(t),s=Go(t),i=Ko(s),d=He(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(Ot(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 mp(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}=Be(t,e),w=ti(p),v=i[m?h==="floating"?"reference":"floating":h],y=Er(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},T=Er(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 vp=50,bp=async(e,t,r)=>{const{placement:o="bottom",strategy:n="absolute",middleware:a=[],platform:s}=r,i=s.detectOverflow?s:{...s,detectOverflow:mp},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}=ri(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:T,reset:N}=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],...T},N&&p<vp&&(p++,typeof N=="object"&&(N.placement&&(m=N.placement),N.rects&&(u=N.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):N.rects),{x:f,y:h}=ri(u,m,d)),g=-1)}return{x:f,y:h,placement:m,strategy:n,middlewareData:w}},wp=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}=Be(e,t)||{};if(u==null)return{};const h=ti(f),m={x:r,y:o},p=Go(n),w=Ko(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],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let A=N?N[x]:0;(!A||!await(s.isElement==null?void 0:s.isElement(N)))&&(A=i.floating[x]||a.floating[w]);const V=S/2-T/2,k=A/2-g[w]/2-1,L=Qe(h[y],k),F=Qe(h[b],k),O=L,U=A-g[w]-F,D=A/2-g[w]/2+V,j=jo(O,D,U),H=!d.arrow&&Ot(n)!=null&&D!==j&&a.reference[w]/2-(D<O?L:F)-g[w]/2<0,z=H?D<O?D-O:D-U:0;return{[p]:m[p]+z,data:{[p]:j,centerOffset:D-j-z,...H&&{alignmentOffset:z}},reset:H}}}),yp=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}=Be(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=He(n),b=_e(i),x=He(i)===i,S=await(d.isRTL==null?void 0:d.isRTL(u.floating)),T=m||(x||!g?[Sr(i)]:dp(i)),N=w!=="none";!m&&N&&T.push(...hp(i,g,w,S));const A=[i,...T],V=await d.detectOverflow(t,v),k=[];let L=((o=a.flip)==null?void 0:o.overflows)||[];if(f&&k.push(V[y]),h){const D=cp(n,s,S);k.push(V[D[0]],V[D[1]])}if(L=[...L,{placement:n,overflows:k}],!k.every(D=>D<=0)){var F,O;const D=(((F=a.flip)==null?void 0:F.index)||0)+1,j=A[D];if(j&&(!(h==="alignment"?b!==_e(j):!1)||L.every($=>_e($.placement)===b?$.overflows[0]>0:!0)))return{data:{index:D,overflows:L},reset:{placement:j}};let H=(O=L.filter(z=>z.overflows[0]<=0).sort((z,$)=>z.overflows[1]-$.overflows[1])[0])==null?void 0:O.placement;if(!H)switch(p){case"bestFit":{var U;const z=(U=L.filter($=>{if(N){const _=_e($.placement);return _===b||_==="y"}return!0}).map($=>[$.placement,$.overflows.filter(_=>_>0).reduce((_,Z)=>_+Z,0)]).sort(($,_)=>$[1]-_[1])[0])==null?void 0:U[0];z&&(H=z);break}case"initialPlacement":H=i;break}if(n!==H)return{reset:{placement:H}}}return{}}}};function oi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ni(e){return ip.some(t=>e[t]>=0)}const xp=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:o}=t,{strategy:n="referenceHidden",...a}=Be(e,t);switch(n){case"referenceHidden":{const s=await o.detectOverflow(t,{...a,elementContext:"reference"}),i=oi(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ni(i)}}}case"escaped":{const s=await o.detectOverflow(t,{...a,altBoundary:!0}),i=oi(s,r.floating);return{data:{escapedOffsets:i,escaped:ni(i)}}}default:return{}}}}},ai=new Set(["left","top"]);async function Cp(e,t){const{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),s=He(r),i=Ot(r),d=_e(r)==="y",u=ai.has(s)?-1:1,f=a&&d?-1:1,h=Be(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 Sp=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 Cp(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}}}}},Ep=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}=Be(e,t),f={x:r,y:o},h=await a.detectOverflow(t,u),m=_e(He(n)),p=Yo(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=jo(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=jo(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}}}}}},Tp=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}=Be(e,t),f={x:r,y:o},h=_e(n),m=Yo(h);let p=f[m],w=f[h];const g=Be(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=ai.has(He(n)),T=a.reference[h]-a.floating[x]+(S&&((y=s.offset)==null?void 0:y[h])||0)+(S?0:v.crossAxis),N=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>N&&(w=N)}return{[m]:p,[h]:w}}}},Np=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}=Be(e,t),f=await s.detectOverflow(t,u),h=He(n),m=Ot(n),p=_e(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=Qe(g-f[v],b),T=Qe(w-f[y],x),N=!t.middlewareData.shift;let A=S,V=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(V=x),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(A=b),N&&!m){const L=be(f.left,0),F=be(f.right,0),O=be(f.top,0),U=be(f.bottom,0);p?V=w-2*(L!==0||F!==0?L+F:be(f.left,f.right)):A=g-2*(O!==0||U!==0?O+U:be(f.top,f.bottom))}await d({...t,availableWidth:V,availableHeight:A});const k=await s.getDimensions(i.floating);return w!==k.width||g!==k.height?{reset:{rects:!0}}:{}}}};function Tr(){return typeof window<"u"}function _t(e){return si(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Me(e){var t;return(t=(si(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function si(e){return Tr()?e instanceof Node||e instanceof we(e).Node:!1}function Se(e){return Tr()?e instanceof Element||e instanceof we(e).Element:!1}function Ve(e){return Tr()?e instanceof HTMLElement||e instanceof we(e).HTMLElement:!1}function ii(e){return!Tr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}function Kt(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 Pp(e){return/^(table|td|th)$/.test(_t(e))}function Nr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Ap=/transform|translate|scale|rotate|perspective|filter/,kp=/paint|layout|strict|content/,ct=e=>!!e&&e!=="none";let qo;function Zo(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))||Ap.test(t.willChange||"")||kp.test(t.contain||"")}function Dp(e){let t=Je(e);for(;Ve(t)&&!Mt(t);){if(Zo(t))return t;if(Nr(t))return null;t=Je(t)}return null}function Qo(){return qo==null&&(qo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),qo}function Mt(e){return/^(html|body|#document)$/.test(_t(e))}function Ee(e){return we(e).getComputedStyle(e)}function Pr(e){return Se(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Je(e){if(_t(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ii(e)&&e.host||Me(e);return ii(t)?t.host:t}function li(e){const t=Je(e);return Mt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ve(t)&&Kt(t)?t:li(t)}function Gt(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);const n=li(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),s=we(n);if(a){const i=Jo(s);return t.concat(s,s.visualViewport||[],Kt(n)?n:[],i&&r?Gt(i):[])}else return t.concat(n,Gt(n,[],r))}function Jo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ci(e){const t=Ee(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const n=Ve(e),a=n?e.offsetWidth:r,s=n?e.offsetHeight:o,i=xr(r)!==a||xr(o)!==s;return i&&(r=a,o=s),{width:r,height:o,$:i}}function en(e){return Se(e)?e:e.contextElement}function It(e){const t=en(e);if(!Ve(t))return Oe(1);const r=t.getBoundingClientRect(),{width:o,height:n,$:a}=ci(t);let s=(a?xr(r.width):r.width)/o,i=(a?xr(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Op=Oe(0);function di(e){const t=we(e);return!Qo()||!t.visualViewport?Op:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _p(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=en(e);let s=Oe(1);t&&(o?Se(o)&&(s=It(o)):s=It(e));const i=_p(a,r,o)?di(a):Oe(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=Jo(w);for(;g&&o&&p!==w;){const v=It(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=Jo(w)}}return Er({width:f,height:h,x:d,y:u})}function Ar(e,t){const r=Pr(e).scrollLeft;return t?t.left+r:dt(Me(e)).left+r}function ui(e,t){const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-Ar(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function Mp(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e;const a=n==="fixed",s=Me(o),i=t?Nr(t.floating):!1;if(o===s||i&&a)return r;let d={scrollLeft:0,scrollTop:0},u=Oe(1);const f=Oe(0),h=Ve(o);if((h||!h&&!a)&&((_t(o)!=="body"||Kt(s))&&(d=Pr(o)),h)){const p=dt(o);u=It(o),f.x=p.x+o.clientLeft,f.y=p.y+o.clientTop}const m=s&&!h&&!a?ui(s,d):Oe(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 Ip(e){return Array.from(e.getClientRects())}function Lp(e){const t=Me(e),r=Pr(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+Ar(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 fi=25;function $p(e,t){const r=we(e),o=Me(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=Ar(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<=fi&&(a-=w)}else u<=fi&&(a+=u);return{width:a,height:s,x:i,y:d}}function Fp(e,t){const r=dt(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=Ve(e)?It(e):Oe(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 pi(e,t,r){let o;if(t==="viewport")o=$p(e,r);else if(t==="document")o=Lp(Me(e));else if(Se(t))o=Fp(t,r);else{const n=di(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Er(o)}function hi(e,t){const r=Je(e);return r===t||!Se(r)||Mt(r)?!1:Ee(r).position==="fixed"||hi(r,t)}function Bp(e,t){const r=t.get(e);if(r)return r;let o=Gt(e,[],!1).filter(i=>Se(i)&&_t(i)!=="body"),n=null;const a=Ee(e).position==="fixed";let s=a?Je(e):e;for(;Se(s)&&!Mt(s);){const i=Ee(s),d=Zo(s);!d&&i.position==="fixed"&&(n=null),(a?!d&&!n:!d&&i.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Kt(s)&&!d&&hi(e,s))?o=o.filter(f=>f!==s):n=i,s=Je(s)}return t.set(e,o),o}function Hp(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e;const s=[...r==="clippingAncestors"?Nr(t)?[]:Bp(t,this._c):[].concat(r),o],i=pi(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=pi(t,s[m],n);d=be(p.top,d),u=Qe(p.right,u),f=Qe(p.bottom,f),h=be(p.left,h)}return{width:u-h,height:f-d,x:h,y:d}}function Vp(e){const{width:t,height:r}=ci(e);return{width:t,height:r}}function Wp(e,t,r){const o=Ve(t),n=Me(t),a=r==="fixed",s=dt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const d=Oe(0);function u(){d.x=Ar(n)}if(o||!o&&!a)if((_t(t)!=="body"||Kt(n))&&(i=Pr(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?ui(n,i):Oe(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 tn(e){return Ee(e).position==="static"}function gi(e,t){if(!Ve(e)||Ee(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Me(e)===r&&(r=r.ownerDocument.body),r}function mi(e,t){const r=we(e);if(Nr(e))return r;if(!Ve(e)){let n=Je(e);for(;n&&!Mt(n);){if(Se(n)&&!tn(n))return n;n=Je(n)}return r}let o=gi(e,t);for(;o&&Pp(o)&&tn(o);)o=gi(o,t);return o&&Mt(o)&&tn(o)&&!Zo(o)?r:o||Dp(e)||r}const zp=async function(e){const t=this.getOffsetParent||mi,r=this.getDimensions,o=await r(e.floating);return{reference:Wp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Rp(e){return Ee(e).direction==="rtl"}const Up={convertOffsetParentRelativeRectToViewportRelativeRect:Mp,getDocumentElement:Me,getClippingRect:Hp,getOffsetParent:mi,getElementRects:zp,getClientRects:Ip,getDimensions:Vp,getScale:It,isElement:Se,isRTL:Rp};function vi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jp(e,t){let r=null,o;const n=Me(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=Cr(h),g=Cr(n.clientWidth-(f+m)),v=Cr(n.clientHeight-(h+p)),y=Cr(f),x={rootMargin:-w+"px "+-g+"px "+-v+"px "+-y+"px",threshold:be(0,Qe(1,d))||1};let S=!0;function T(N){const A=N[0].intersectionRatio;if(A!==d){if(!S)return s();A?s(!1,A):o=setTimeout(()=>{s(!1,1e-7)},1e3)}A===1&&!vi(u,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(T,{...x,root:n.ownerDocument})}catch{r=new IntersectionObserver(T,x)}r.observe(e)}return s(!0),a}function Yp(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=en(e),f=n||a?[...u?Gt(u):[],...t?Gt(t):[]]:[];f.forEach(y=>{n&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const h=u&&i?jp(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&&!vi(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 Kp=Sp,Gp=Ep,Xp=yp,qp=Np,Zp=xp,bi=wp,Qp=Tp,Jp=(e,t,r)=>{const o=new Map,n={platform:Up,...r},a={...n.platform,_c:o};return bp(e,t,{...n,platform:a})};var eh=typeof document<"u",th=function(){},kr=eh?C.useLayoutEffect:th;function Dr(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(!Dr(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)&&!Dr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function wi(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yi(e,t){const r=wi(e);return Math.round(t*r)/r}function rn(e){const t=c.useRef(e);return kr(()=>{t.current=e}),t}function rh(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);Dr(m,o)||p(o);const[w,g]=c.useState(null),[v,y]=c.useState(null),b=c.useCallback($=>{$!==N.current&&(N.current=$,g($))},[]),x=c.useCallback($=>{$!==A.current&&(A.current=$,y($))},[]),S=a||w,T=s||v,N=c.useRef(null),A=c.useRef(null),V=c.useRef(f),k=d!=null,L=rn(d),F=rn(n),O=rn(u),U=c.useCallback(()=>{if(!N.current||!A.current)return;const $={placement:t,strategy:r,middleware:m};F.current&&($.platform=F.current),Jp(N.current,A.current,$).then(_=>{const Z={..._,isPositioned:O.current!==!1};D.current&&!Dr(V.current,Z)&&(V.current=Z,mt.flushSync(()=>{h(Z)}))})},[m,t,r,F,O]);kr(()=>{u===!1&&V.current.isPositioned&&(V.current.isPositioned=!1,h($=>({...$,isPositioned:!1})))},[u]);const D=c.useRef(!1);kr(()=>(D.current=!0,()=>{D.current=!1}),[]),kr(()=>{if(S&&(N.current=S),T&&(A.current=T),S&&T){if(L.current)return L.current(S,T,U);U()}},[S,T,U,L,k]);const j=c.useMemo(()=>({reference:N,floating:A,setReference:b,setFloating:x}),[b,x]),H=c.useMemo(()=>({reference:S,floating:T}),[S,T]),z=c.useMemo(()=>{const $={position:r,left:0,top:0};if(!H.floating)return $;const _=yi(H.floating,f.x),Z=yi(H.floating,f.y);return i?{...$,transform:"translate("+_+"px, "+Z+"px)",...wi(H.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:_,top:Z}},[r,i,H.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:U,refs:j,elements:H,floatingStyles:z}),[f,U,j,H,z])}const oh=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?bi({element:o.current,padding:n}).fn(r):{}:o?bi({element:o,padding:n}).fn(r):{}}}},nh=(e,t)=>{const r=Kp(e);return{name:r.name,fn:r.fn,options:[e,t]}},ah=(e,t)=>{const r=Gp(e);return{name:r.name,fn:r.fn,options:[e,t]}},sh=(e,t)=>({fn:Qp(e).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=qp(e);return{name:r.name,fn:r.fn,options:[e,t]}},ch=(e,t)=>{const r=Zp(e);return{name:r.name,fn:r.fn,options:[e,t]}},dh=(e,t)=>{const r=oh(e);return{name:r.name,fn:r.fn,options:[e,t]}};var uh="Arrow",xi=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"})})});xi.displayName=uh;var fh=xi,on="Popper",[Ci,Lt]=ve(on),[ph,Si]=Ci(on),Ei=e=>{const{__scopePopper:t,children:r}=e,[o,n]=c.useState(null),[a,s]=c.useState(void 0);return l.jsx(ph,{scope:t,anchor:o,onAnchorChange:n,placementState:a,setPlacementState:s,children:r})};Ei.displayName=on;var Ti="PopperAnchor",Ni=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:o,...n}=e,a=Si(Ti,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&&an(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})});Ni.displayName=Ti;var nn="PopperContent",[hh,gh]=Ci(nn),Pi=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=Si(nn,r),[y,b]=c.useState(null),x=q(t,re=>b(re)),[S,T]=c.useState(null),N=_o(S),A=N?.width??0,V=N?.height??0,k=o+(a!=="center"?"-"+a:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},F=Array.isArray(u)?u:[u],O=F.length>0,U={padding:L,boundary:F.filter(vh),altBoundary:O},{refs:D,floatingStyles:j,placement:H,isPositioned:z,middlewareData:$}=rh({strategy:"fixed",placement:k,whileElementsMounted:(...re)=>Yp(...re,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[nh({mainAxis:n+V,alignmentAxis:s}),d&&ah({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?sh():void 0,...U}),d&&ih({...U}),lh({...U,apply:({elements:re,rects:oe,availableWidth:te,availableHeight:J})=>{const{width:ne,height:me}=oe.reference,pe=re.floating.style;pe.setProperty("--radix-popper-available-width",`${te}px`),pe.setProperty("--radix-popper-available-height",`${J}px`),pe.setProperty("--radix-popper-anchor-width",`${ne}px`),pe.setProperty("--radix-popper-anchor-height",`${me}px`)}}),S&&dh({element:S,padding:i}),bh({arrowWidth:A,arrowHeight:V}),m&&ch({strategy:"referenceHidden",...U,boundary:O?U.boundary:void 0})]}),_=v.setPlacementState;ue(()=>(_(H),()=>{_(void 0)}),[H,_]);const[Z,ee]=an(H),Y=fe(w);ue(()=>{z&&Y?.()},[z,Y]);const X=$.arrow?.x,Q=$.arrow?.y,ce=$.arrow?.centerOffset!==0,[de,I]=c.useState();return ue(()=>{y&&I(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:z?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(hh,{scope:r,placedSide:Z,placedAlign:ee,onArrowChange:T,arrowX:X,arrowY:Q,shouldHideArrow:ce,children:l.jsx(W.div,{"data-side":Z,"data-align":ee,...g,ref:x,style:{...g.style,animation:z?void 0:"none"}})})})});Pi.displayName=nn;var Ai="PopperArrow",mh={top:"bottom",right:"left",bottom:"top",left:"right"},ki=c.forwardRef(function(t,r){const{__scopePopper:o,...n}=t,a=gh(Ai,o),s=mh[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(fh,{...n,ref:r,style:{...n.style,display:"block"}})})});ki.displayName=Ai;function vh(e){return e!==null}var bh=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]=an(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 an(e){const[t,r="center"]=e.split("-");return[t,r]}var sn=Ei,Or=Ni,ln=Pi,cn=ki,_r="Popover",[Di]=ve(_r,[Lt]),Xt=Lt(),[wh,et]=Di(_r),Oi=e=>{const{__scopePopover:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:s=!1}=e,i=Xt(t),d=c.useRef(null),[u,f]=c.useState(!1),[h,m]=Ye({prop:o,defaultProp:n??!1,onChange:a,caller:_r});return l.jsx(sn,{...i,children:l.jsx(wh,{scope:t,contentId:je(),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})})};Oi.displayName=_r;var _i="PopoverAnchor",yh=c.forwardRef((e,t)=>{const{__scopePopover:r,...o}=e,n=et(_i,r),a=Xt(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=n;return c.useEffect(()=>(s(),()=>i()),[s,i]),l.jsx(Or,{...a,...o,ref:t})});yh.displayName=_i;var Mi="PopoverTrigger",Ii=c.forwardRef((e,t)=>{const{__scopePopover:r,...o}=e,n=et(Mi,r),a=Xt(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":Hi(n.open),...o,ref:s,onClick:B(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?i:l.jsx(Or,{asChild:!0,...a,children:i})});Ii.displayName=Mi;var dn="PopoverPortal",[xh,Ch]=Di(dn,{forceMount:void 0}),Li=e=>{const{__scopePopover:t,forceMount:r,children:o,container:n}=e,a=et(dn,t);return l.jsx(xh,{scope:t,forceMount:r,children:l.jsx(he,{present:r||a.open,children:l.jsx(zt,{asChild:!0,container:n,children:o})})})};Li.displayName=dn;var $t="PopoverContent",$i=c.forwardRef((e,t)=>{const r=Ch($t,e.__scopePopover),{forceMount:o=r.forceMount,...n}=e,a=et($t,e.__scopePopover);return l.jsx(he,{present:o||a.open,children:a.modal?l.jsx(Eh,{...n,ref:t}):l.jsx(Th,{...n,ref:t})})});$i.displayName=$t;var Sh=it("PopoverContent.RemoveScroll"),Eh=c.forwardRef((e,t)=>{const r=et($t,e.__scopePopover),o=c.useRef(null),n=q(t,o),a=c.useRef(!1);return c.useEffect(()=>{const s=o.current;if(s)return po(s)},[]),l.jsx(ur,{as:Sh,allowPinchZoom:!0,children:l.jsx(Fi,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,s=>{s.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:B(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:B(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Th=c.forwardRef((e,t)=>{const r=et($t,e.__scopePopover),o=c.useRef(!1),n=c.useRef(!1);return l.jsx(Fi,{...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()}})}),Fi=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=et($t,r),p=Xt(r);return so(),l.jsx(or,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:l.jsx(bt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:u,onDismiss:()=>m.onOpenChange(!1),deferPointerDownOutside:!0,children:l.jsx(ln,{"data-state":Hi(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)"}})})})}),Bi="PopoverClose",Nh=c.forwardRef((e,t)=>{const{__scopePopover:r,...o}=e,n=et(Bi,r);return l.jsx(W.button,{type:"button",...o,ref:t,onClick:B(e.onClick,()=>n.onOpenChange(!1))})});Nh.displayName=Bi;var Ph="PopoverArrow",Ah=c.forwardRef((e,t)=>{const{__scopePopover:r,...o}=e,n=Xt(r);return l.jsx(cn,{...n,...o,ref:t})});Ah.displayName=Ph;function Hi(e){return e?"open":"closed"}var kh=Oi,Dh=Ii,Oh=Li,Vi=$i;const Wi=kh,zi=Dh,un=c.forwardRef(({className:e,align:t="start",sideOffset:r=4,...o},n)=>l.jsx(Oh,{children:l.jsx(Vi,{ref:n,align:t,sideOffset:r,className:M("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})}));un.displayName=Vi.displayName;function _h({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(Wi,{open:n,onOpenChange:a,children:[l.jsx(zi,{asChild:!0,children:l.jsxs("button",{type:"button",className:M("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(_s,{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(Yt,{className:"h-3 w-3"})})]},u.value)):l.jsx("span",{children:o})}),l.jsx($o,{className:"h-4 w-4 shrink-0 opacity-50 ml-2"})]})}),l.jsx(un,{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(Fo,{checked:f,tabIndex:-1}),u.label]},u.value)})})]})}var fn="Progress",pn=100,[Mh]=ve(fn),[Ih,Lh]=Mh(fn),Ri=c.forwardRef((e,t)=>{const{__scopeProgress:r,value:o=null,max:n,getValueLabel:a=$h,...s}=e;(n||n===0)&&!Ki(n)&&console.error(Fh(`${n}`,"Progress"));const i=Ki(n)?n:pn;o!==null&&!Gi(o,i)&&console.error(Bh(`${o}`,"Progress"));const d=Gi(o,i)?o:null,u=Mr(d)?a(d,i):void 0;return l.jsx(Ih,{scope:r,value:d,max:i,children:l.jsx(W.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Mr(d)?d:void 0,"aria-valuetext":u,role:"progressbar","data-state":Yi(d,i),"data-value":d??void 0,"data-max":i,...s,ref:t})})});Ri.displayName=fn;var Ui="ProgressIndicator",ji=c.forwardRef((e,t)=>{const{__scopeProgress:r,...o}=e,n=Lh(Ui,r);return l.jsx(W.div,{"data-state":Yi(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...o,ref:t})});ji.displayName=Ui;function $h(e,t){return`${Math.round(e/t*100)}%`}function Yi(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Mr(e){return typeof e=="number"}function Ki(e){return Mr(e)&&!isNaN(e)&&e>0}function Gi(e,t){return Mr(e)&&!isNaN(e)&&e<=t&&e>=0}function Fh(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${pn}\`.`}function Bh(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 ${un} if no \`max\` prop is set)
43
+ - less than the value passed to \`max\` (or ${pn} if no \`max\` prop is set)
44
44
  - \`null\` or \`undefined\` if the progress is indeterminate.
45
45
 
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"})}));
46
+ Defaulting to \`null\`.`}var Xi=Ri,Hh=ji;const qi=c.forwardRef(({className:e,value:t,...r},o)=>l.jsx(Xi,{ref:o,className:M("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:l.jsx(Hh,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));qi.displayName=Xi.displayName;var Vh=c.createContext(void 0);function Zi(e){const t=c.useContext(Vh);return e||t||"ltr"}function hn(e,[t,r]){return Math.min(r,Math.max(t,e))}function Wh(e,t){return c.useReducer((r,o)=>t[r][o]??r,e)}var gn="ScrollArea",[Qi]=ve(gn),[zh,ye]=Qi(gn),Ji=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),[T,N]=c.useState(!1),[A,V]=c.useState(!1),k=q(t,F=>d(F)),L=Zi(n);return l.jsx(zh,{scope:r,type:o,dir:L,scrollHideDelay:a,scrollArea:i,viewport:u,onViewportChange:f,content:h,onContentChange:m,scrollbarX:p,onScrollbarXChange:w,scrollbarXEnabled:T,onScrollbarXEnabledChange:N,scrollbarY:g,onScrollbarYChange:v,scrollbarYEnabled:A,onScrollbarYEnabledChange:V,onCornerWidthChange:b,onCornerHeightChange:S,children:l.jsx(W.div,{dir:L,...s,ref:k,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});Ji.displayName=gn;var el="ScrollAreaViewport",tl=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:o,nonce:n,...a}=e,s=ye(el,r),i=c.useRef(null),d=q(t,i,s.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx(Rh,{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})})]})});tl.displayName=el;var Rh=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),Ie="ScrollAreaScrollbar",mn=c.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=ye(Ie,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(Uh,{...o,ref:t,forceMount:r}):n.type==="scroll"?l.jsx(jh,{...o,ref:t,forceMount:r}):n.type==="auto"?l.jsx(rl,{...o,ref:t,forceMount:r}):n.type==="always"?l.jsx(vn,{...o,ref:t,"data-state":"visible"}):null});mn.displayName=Ie;var Uh=c.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=ye(Ie,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(rl,{"data-state":a?"visible":"hidden",...o,ref:t})})}),jh=c.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=ye(Ie,e.__scopeScrollArea),a=e.orientation==="horizontal",s=Fr(()=>d("SCROLL_END"),100),[i,d]=Wh("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(vn,{"data-state":i==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:B(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:B(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),rl=c.forwardRef((e,t)=>{const r=ye(Ie,e.__scopeScrollArea),{forceMount:o,...n}=e,[a,s]=c.useState(!1),i=e.orientation==="horizontal",d=Fr(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,f=r.viewport.offsetHeight<r.viewport.scrollHeight;s(i?u:f)}},10);return Ft(r.viewport,d),Ft(r.content,d),l.jsx(he,{present:o||a,children:l.jsx(vn,{"data-state":a?"visible":"hidden",...n,ref:t})})}),vn=c.forwardRef((e,t)=>{const{orientation:r="vertical",...o}=e,n=ye(Ie,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=il(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 Zh(m,s.current,i,p)}return r==="horizontal"?l.jsx(Yh,{...f,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const m=n.viewport.scrollLeft,p=ll(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(Kh,{...f,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const m=n.viewport.scrollTop,p=ll(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}),Yh=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:o,...n}=e,a=ye(Ie,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(nl,{"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":$r(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),dl(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:Lr(s.paddingLeft),paddingEnd:Lr(s.paddingRight)}})}})}),Kh=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:o,...n}=e,a=ye(Ie,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(nl,{"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":$r(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),dl(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:Lr(s.paddingTop),paddingEnd:Lr(s.paddingBottom)}})}})}),[Gh,ol]=Qi(Ie),nl=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(Ie,r),[w,g]=c.useState(null),v=q(t,k=>g(k)),y=c.useRef(null),b=c.useRef(""),x=p.viewport,S=o.content-o.viewport,T=fe(f),N=fe(d),A=Fr(h,10);function V(k){if(y.current){const L=k.clientX-y.current.left,F=k.clientY-y.current.top;u({x:L,y:F})}}return c.useEffect(()=>{const k=L=>{const F=L.target;w?.contains(F)&&T(L,S)};return document.addEventListener("wheel",k,{passive:!1}),()=>document.removeEventListener("wheel",k,{passive:!1})},[x,w,S,T]),c.useEffect(N,[o,N]),Ft(w,A),Ft(p.content,A),l.jsx(Gh,{scope:r,scrollbar:w,hasThumb:n,onThumbChange:fe(a),onThumbPointerUp:fe(s),onThumbPositionChange:N,onThumbPointerDown:fe(i),children:l.jsx(W.div,{...m,ref:v,style:{position:"absolute",...m.style},onPointerDown:B(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"),V(k))}),onPointerMove:B(e.onPointerMove,V),onPointerUp:B(e.onPointerUp,k=>{const L=k.target;L.hasPointerCapture(k.pointerId)&&L.releasePointerCapture(k.pointerId),document.body.style.webkitUserSelect=b.current,p.viewport&&(p.viewport.style.scrollBehavior=""),y.current=null})})})}),Ir="ScrollAreaThumb",al=c.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=ol(Ir,e.__scopeScrollArea);return l.jsx(he,{present:r||n.hasThumb,children:l.jsx(Xh,{ref:t,...o})})}),Xh=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:o,...n}=e,a=ye(Ir,r),s=ol(Ir,r),{onThumbPositionChange:i}=s,d=q(t,h=>s.onThumbChange(h)),u=c.useRef(void 0),f=Fr(()=>{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:B(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:B(e.onPointerUp,s.onThumbPointerUp)})});al.displayName=Ir;var bn="ScrollAreaCorner",sl=c.forwardRef((e,t)=>{const r=ye(bn,e.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?l.jsx(qh,{...e,ref:t}):null});sl.displayName=bn;var qh=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,...o}=e,n=ye(bn,r),[a,s]=c.useState(0),[i,d]=c.useState(0),u=!!(a&&i);return Ft(n.scrollbarX,()=>{const f=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(f),d(f)}),Ft(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 Lr(e){return e?parseInt(e,10):0}function il(e,t){const r=e/t;return isNaN(r)?0:r}function $r(e){const t=il(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-r)*t;return Math.max(o,18)}function Zh(e,t,r,o="ltr"){const n=$r(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 cl([d,u],h)(e)}function ll(e,t,r="ltr"){const o=$r(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=hn(e,d);return cl([0,s],[0,i])(u)}function cl(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 dl(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 Fr(e,t){const r=fe(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 Ft(e,t){const r=fe(t);ue(()=>{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 ul=Ji,Jh=tl,eg=sl;const fl=c.forwardRef(({className:e,children:t,...r},o)=>l.jsxs(ul,{ref:o,className:M("relative overflow-hidden",e),...r,children:[l.jsx(Jh,{className:"h-full w-full rounded-[inherit]",children:t}),l.jsx(wn,{}),l.jsx(eg,{})]}));fl.displayName=ul.displayName;const wn=c.forwardRef(({className:e,orientation:t="vertical",...r},o)=>l.jsx(mn,{ref:o,orientation:t,className:M("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(al,{className:"relative flex-1 rounded-full bg-border"})}));wn.displayName=mn.displayName;function pl(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),T=q(v,S),N=a(f,y);return c.useEffect(()=>(N.itemMap.set(S,{ref:S,...x}),()=>{N.itemMap.delete(S)})),l.jsx(m,{[h]:"",ref:T,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((N,A)=>x.indexOf(N.ref.current)-x.indexOf(A.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},w,o]}var hl=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"}),tg="VisuallyHidden",Br=c.forwardRef((e,t)=>l.jsx(W.span,{...e,ref:t,style:{...hl,...e.style}}));Br.displayName=tg;var rg=Br,og=[" ","Enter","ArrowUp","ArrowDown"],ng=[" ","Enter"],ut="Select",[Hr,Vr,ag]=pl(ut),[ft]=ve(ut,[ag,Lt]),Wr=Lt(),[sg,tt]=ft(ut),[ig,lg]=ft(ut),cg="SelectProvider";function gl(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=Wr(t),[y,b]=c.useState(null),[x,S]=c.useState(null),[T,N]=c.useState(!1),A=Zi(u),[V,k]=Ye({prop:o,defaultProp:n??!1,onChange:a,caller:ut}),[L,F]=Ye({prop:s,defaultProp:i,onChange:d,caller:ut}),O=c.useRef(null),U=y?!!w||!!y.closest("form"):!0,[D,j]=c.useState(new Set),H=je(),z=Array.from(D).map(ee=>ee.props.value).join(";"),$=c.useCallback(ee=>{j(Y=>new Set(Y).add(ee))},[]),_=c.useCallback(ee=>{j(Y=>{const X=new Set(Y);return X.delete(ee),X})},[]),Z={required:p,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:T,onValueNodeHasChildrenChange:N,contentId:H,value:L,onValueChange:F,open:V,onOpenChange:k,dir:A,triggerPointerDownPosRef:O,disabled:m,name:f,autoComplete:h,form:w,nativeOptions:D,nativeSelectKey:z,isFormControl:U};return l.jsx(sn,{...v,children:l.jsx(sg,{scope:t,...Z,children:l.jsx(Hr.Provider,{scope:t,children:l.jsx(ig,{scope:t,onNativeOptionAdd:$,onNativeOptionRemove:_,children:Sg(g)?g(Z):r})})})})}gl.displayName=cg;var ml=e=>{const{__scopeSelect:t,children:r,...o}=e;return l.jsx(gl,{__scopeSelect:t,...o,internal_do_not_use_render:({isFormControl:n})=>l.jsxs(l.Fragment,{children:[r,n?l.jsx(Bl,{__scopeSelect:t}):null]})})};ml.displayName=ut;var vl="SelectTrigger",yn=c.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:o=!1,...n}=e,a=Wr(r),s=tt(vl,r),i=s.disabled||o,d=q(t,s.onTriggerChange),u=Vr(r),f=c.useRef("touch"),[h,m,p]=Hl(g=>{const v=u().filter(x=>!x.disabled),y=v.find(x=>x.value===s.value),b=Vl(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(Or,{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":Rr(s.value)?"":void 0,...n,ref:d,onClick:B(n.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&w(g)}),onPointerDown:B(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:B(n.onKeyDown,g=>{const v=h.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&m(g.key),!(v&&g.key===" ")&&og.includes(g.key)&&(w(),g.preventDefault())})})})});yn.displayName=vl;var bl="SelectValue",wl=c.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:n,children:a,placeholder:s="",...i}=e,d=tt(bl,r),{onValueNodeHasChildrenChange:u}=d,f=a!==void 0,h=q(t,d.onValueNodeChange);ue(()=>{u(f)},[u,f]);const m=Rr(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")})});wl.displayName=bl;var dg="SelectIcon",yl=c.forwardRef((e,t)=>{const{__scopeSelect:r,children:o,...n}=e;return l.jsx(W.span,{"aria-hidden":!0,...n,ref:t,children:o||"▼"})});yl.displayName=dg;var xl="SelectPortal",[ug,fg]=ft(xl,{forceMount:void 0}),Cl=e=>{const{__scopeSelect:t,forceMount:r,...o}=e;return l.jsx(ug,{scope:e.__scopeSelect,forceMount:r,children:l.jsx(zt,{asChild:!0,...o})})};Cl.displayName=xl;var rt="SelectContent",xn=c.forwardRef((e,t)=>{const r=fg(rt,e.__scopeSelect),{forceMount:o=r.forceMount,...n}=e,a=tt(rt,e.__scopeSelect),[s,i]=c.useState();return ue(()=>{i(new DocumentFragment)},[]),l.jsx(he,{present:o||a.open,children:({present:d})=>d?l.jsx(Tl,{...n,ref:t}):l.jsx(Sl,{...n,fragment:s})})});xn.displayName=rt;var Sl=c.forwardRef((e,t)=>{const{__scopeSelect:r,children:o,fragment:n}=e;return n?mt.createPortal(l.jsx(El,{scope:r,children:l.jsx(Hr.Slot,{scope:r,children:l.jsx("div",{ref:t,children:o})})}),n):null});Sl.displayName="SelectContentFragment";var Te=10,[El,ot]=ft(rt),pg="SelectContentImpl",hg=it("SelectContent.RemoveScroll"),Tl=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=tt(rt,r),[x,S]=c.useState(null),[T,N]=c.useState(null),A=q(t,I=>S(I)),[V,k]=c.useState(null),[L,F]=c.useState(null),O=Vr(r),[U,D]=c.useState(!1),j=c.useRef(!1);c.useEffect(()=>{if(x)return po(x)},[x]),so();const H=c.useCallback(I=>{const[re,...oe]=O().map(ne=>ne.ref.current),[te]=oe.slice(-1),J=document.activeElement;for(const ne of I)if(ne===J||(ne?.scrollIntoView({block:"nearest"}),ne===re&&T&&(T.scrollTop=0),ne===te&&T&&(T.scrollTop=T.scrollHeight),ne?.focus(),document.activeElement!==J))return},[O,T]),z=c.useCallback(()=>H([V,x]),[H,V,x]);c.useEffect(()=>{U&&z()},[U,z]);const{onOpenChange:$,triggerPointerDownPosRef:_}=b;c.useEffect(()=>{if(x){let I={x:0,y:0};const re=te=>{I={x:Math.abs(Math.round(te.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(te.pageY)-(_.current?.y??0))}},oe=te=>{I.x<=10&&I.y<=10?te.preventDefault():te.composedPath().includes(x)||$(!1),document.removeEventListener("pointermove",re),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",re),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",re),document.removeEventListener("pointerup",oe,{capture:!0})}}},[x,$,_]),c.useEffect(()=>{const I=()=>$(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[$]);const[Z,ee]=Hl(I=>{const re=O().filter(J=>!J.disabled),oe=re.find(J=>J.ref.current===document.activeElement),te=Vl(re,I,oe);te&&setTimeout(()=>te.ref.current?.focus())}),Y=c.useCallback((I,re,oe)=>{const te=!j.current&&!oe;(b.value!==void 0&&b.value===re||te)&&(k(I),te&&(j.current=!0))},[b.value]),X=c.useCallback(()=>x?.focus(),[x]),Q=c.useCallback((I,re,oe)=>{const te=!j.current&&!oe;(b.value!==void 0&&b.value===re||te)&&F(I)},[b.value]),ce=o==="popper"?Cn:Nl,de=ce===Cn?{side:i,sideOffset:d,align:u,alignOffset:f,arrowPadding:h,collisionBoundary:m,collisionPadding:p,sticky:w,hideWhenDetached:g,avoidCollisions:v}:{};return l.jsx(El,{scope:r,content:x,viewport:T,onViewportChange:N,itemRefCallback:Y,selectedItem:V,onItemLeave:X,itemTextRefCallback:Q,focusSelectedItem:z,selectedItemText:L,position:o,isPositioned:U,searchRef:Z,children:l.jsx(ur,{as:hg,allowPinchZoom:!0,children:l.jsx(or,{asChild:!0,trapped:b.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:B(n,I=>{b.trigger?.focus({preventScroll:!0}),I.preventDefault()}),children:l.jsx(bt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:l.jsx(ce,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:I=>I.preventDefault(),...y,...de,onPlaced:()=>D(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:B(y.onKeyDown,I=>{const re=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!re&&I.key.length===1&&ee(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let te=O().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(I.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const J=I.target,ne=te.indexOf(J);te=te.slice(ne+1)}setTimeout(()=>H(te)),I.preventDefault()}})})})})})})});Tl.displayName=pg;var gg="SelectItemAlignedPosition",Nl=c.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:o,...n}=e,a=tt(rt,r),s=ot(rt,r),[i,d]=c.useState(null),[u,f]=c.useState(null),h=q(t,A=>f(A)),m=Vr(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(),k=a.valueNode.getBoundingClientRect(),L=y.getBoundingClientRect();if(a.dir!=="rtl"){const J=L.left-V.left,ne=k.left-J,me=A.left-ne,pe=A.width+me,We=Math.max(pe,V.width),xe=window.innerWidth-Te,ze=hn(ne,[Te,Math.max(Te,xe-We)]);i.style.minWidth=pe+"px",i.style.left=ze+"px"}else{const J=V.right-L.right,ne=window.innerWidth-k.right-J,me=window.innerWidth-A.right-ne,pe=A.width+me,We=Math.max(pe,V.width),xe=window.innerWidth-Te,ze=hn(ne,[Te,Math.max(Te,xe-We)]);i.style.minWidth=pe+"px",i.style.right=ze+"px"}const F=m(),O=window.innerHeight-Te*2,U=g.scrollHeight,D=window.getComputedStyle(u),j=parseInt(D.borderTopWidth,10),H=parseInt(D.paddingTop,10),z=parseInt(D.borderBottomWidth,10),$=parseInt(D.paddingBottom,10),_=j+H+U+$+z,Z=Math.min(v.offsetHeight*5,_),ee=window.getComputedStyle(g),Y=parseInt(ee.paddingTop,10),X=parseInt(ee.paddingBottom,10),Q=A.top+A.height/2-Te,ce=O-Q,de=v.offsetHeight/2,I=v.offsetTop+de,re=j+H+I,oe=_-re;if(re<=Q){const J=F.length>0&&v===F[F.length-1].ref.current;i.style.bottom="0px";const ne=u.clientHeight-g.offsetTop-g.offsetHeight,me=Math.max(ce,de+(J?X:0)+ne+z),pe=re+me;i.style.height=pe+"px"}else{const J=F.length>0&&v===F[0].ref.current;i.style.top="0px";const me=Math.max(Q,j+g.offsetTop+(J?Y:0)+de)+oe;i.style.height=me+"px",g.scrollTop=re-Q+g.offsetTop}i.style.margin=`${Te}px 0`,i.style.minHeight=Z+"px",i.style.maxHeight=O+"px",o?.(),requestAnimationFrame(()=>p.current=!0)}},[m,a.trigger,a.valueNode,i,u,g,v,y,a.dir,o]);ue(()=>x(),[x]);const[S,T]=c.useState();ue(()=>{u&&T(window.getComputedStyle(u).zIndex)},[u]);const N=c.useCallback(A=>{A&&w.current===!0&&(x(),b?.(),w.current=!1)},[x,b]);return l.jsx(vg,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:p,onScrollButtonChange:N,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}})})})});Nl.displayName=gg;var mg="SelectPopperPosition",Cn=c.forwardRef((e,t)=>{const{__scopeSelect:r,align:o="start",collisionPadding:n=Te,...a}=e,s=Wr(r);return l.jsx(ln,{...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)"}})});Cn.displayName=mg;var[vg,Sn]=ft(rt,{}),En="SelectViewport",Pl=c.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:o,...n}=e,a=ot(En,r),s=Sn(En,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(Hr.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:B(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-Te*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})})})]})});Pl.displayName=En;var Al="SelectGroup",[bg,wg]=ft(Al),kl=c.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=je();return l.jsx(bg,{scope:r,id:n,children:l.jsx(W.div,{role:"group","aria-labelledby":n,...o,ref:t})})});kl.displayName=Al;var Dl="SelectLabel",Tn=c.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=wg(Dl,r);return l.jsx(W.div,{id:n.id,...o,ref:t})});Tn.displayName=Dl;var zr="SelectItem",[yg,Ol]=ft(zr),Nn=c.forwardRef((e,t)=>{const{__scopeSelect:r,value:o,disabled:n=!1,textValue:a,...s}=e,i=tt(zr,r),d=ot(zr,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=je(),v=c.useRef("touch"),y=()=>{n||(i.onValueChange(o),i.onOpenChange(!1))};return l.jsx(yg,{scope:r,value:o,disabled:n,textId:g,isSelected:u,onItemTextChange:c.useCallback(b=>{h(x=>x||(b?.textContent??"").trim())},[]),children:l.jsx(Hr.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:B(s.onFocus,()=>p(!0)),onBlur:B(s.onBlur,()=>p(!1)),onClick:B(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:B(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:B(s.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:B(s.onPointerMove,b=>{v.current=b.pointerType,n?d.onItemLeave?.():v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:B(s.onPointerLeave,b=>{b.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:B(s.onKeyDown,b=>{d.searchRef?.current!==""&&b.key===" "||(ng.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});Nn.displayName=zr;var qt="SelectItemText",_l=c.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:n,...a}=e,s=tt(qt,r),i=ot(qt,r),d=Ol(qt,r),u=lg(qt,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 ue(()=>(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&&!Rr(s.value)?mt.createPortal(a.children,s.valueNode):null]})});_l.displayName=qt;var Ml="SelectItemIndicator",Il=c.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return Ol(Ml,r).isSelected?l.jsx(W.span,{"aria-hidden":!0,...o,ref:t}):null});Il.displayName=Ml;var Pn="SelectScrollUpButton",An=c.forwardRef((e,t)=>{const r=ot(Pn,e.__scopeSelect),o=Sn(Pn,e.__scopeSelect),[n,a]=c.useState(!1),s=q(t,o.onScrollButtonChange);return ue(()=>{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(Ll,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:d}=r;i&&d&&(i.scrollTop=i.scrollTop-d.offsetHeight)}}):null});An.displayName=Pn;var kn="SelectScrollDownButton",Dn=c.forwardRef((e,t)=>{const r=ot(kn,e.__scopeSelect),o=Sn(kn,e.__scopeSelect),[n,a]=c.useState(!1),s=q(t,o.onScrollButtonChange);return ue(()=>{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(Ll,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:d}=r;i&&d&&(i.scrollTop=i.scrollTop+d.offsetHeight)}}):null});Dn.displayName=kn;var Ll=c.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:o,...n}=e,a=ot("SelectScrollButton",r),s=c.useRef(null),i=Vr(r),d=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>d(),[d]),ue(()=>{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:B(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:B(n.onPointerMove,()=>{a.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:B(n.onPointerLeave,()=>{d()})})}),xg="SelectSeparator",On=c.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return l.jsx(W.div,{"aria-hidden":!0,...o,ref:t})});On.displayName=xg;var $l="SelectArrow",Cg=c.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=Wr(r);return ot($l,r).position==="popper"?l.jsx(cn,{...n,...o,ref:t}):null});Cg.displayName=$l;var Fl="SelectBubbleInput",Bl=c.forwardRef(({__scopeSelect:e,...t},r)=>{const o=tt(Fl,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=Oo(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,T=Object.getOwnPropertyDescriptor(x,"value").set;if(v!==g&&T){const N=new Event("change",{bubbles:!0});T.call(b,g),b.dispatchEvent(N)}},[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:{...hl,...t.style},ref:w,defaultValue:g,children:[Rr(n)&&!y?l.jsx("option",{value:""}):null,Array.from(h)]},m)});Bl.displayName=Fl;function Sg(e){return typeof e=="function"}function Rr(e){return e===""||e===void 0}function Hl(e){const t=fe(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 Vl(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=Eg(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 Eg(e,t){return e.map((r,o)=>e[(t+o)%e.length])}const Tg=ml,Ng=kl,Pg=wl,Wl=c.forwardRef(({className:e,children:t,...r},o)=>l.jsxs(yn,{ref:o,className:M("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(yl,{asChild:!0,children:l.jsx($o,{className:"h-4 w-4 opacity-50"})})]}));Wl.displayName=yn.displayName;const _n=c.forwardRef(({className:e,...t},r)=>l.jsx(An,{ref:r,className:M("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(Jf,{className:"h-4 w-4"})}));_n.displayName=An.displayName;const Mn=c.forwardRef(({className:e,...t},r)=>l.jsx(Dn,{ref:r,className:M("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx($o,{className:"h-4 w-4"})}));Mn.displayName=Dn.displayName;const zl=c.forwardRef(({className:e,children:t,position:r="popper",...o},n)=>l.jsx(Cl,{children:l.jsxs(xn,{ref:n,className:M("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(_n,{}),l.jsx(Pl,{className:M("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(Mn,{})]})}));zl.displayName=xn.displayName;const Rl=c.forwardRef(({className:e,...t},r)=>l.jsx(Tn,{ref:r,className:M("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Rl.displayName=Tn.displayName;const Ul=c.forwardRef(({className:e,children:t,...r},o)=>l.jsxs(Nn,{ref:o,className:M("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(Il,{children:l.jsx(Lo,{className:"h-4 w-4"})})}),l.jsx(_l,{children:t})]}));Ul.displayName=Nn.displayName;const jl=c.forwardRef(({className:e,...t},r)=>l.jsx(On,{ref:r,className:M("-mx-1 my-1 h-px bg-muted",e),...t}));jl.displayName=On.displayName;var Ag="Separator",Yl="horizontal",kg=["horizontal","vertical"],Kl=c.forwardRef((e,t)=>{const{decorative:r,orientation:o=Yl,...n}=e,a=Dg(o)?o:Yl,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})});Kl.displayName=Ag;function Dg(e){return kg.includes(e)}var Gl=Kl;const Xl=c.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...o},n)=>l.jsx(Gl,{ref:n,decorative:r,orientation:t,className:M("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Xl.displayName=Gl.displayName;const ql=gr,Og=mr,_g=lt,Zl=vr,In=c.forwardRef(({className:e,...t},r)=>l.jsx(Et,{className:M("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}));In.displayName=Et.displayName;const Mg=jt("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"}}),Ln=c.forwardRef(({side:e="right",className:t,children:r,...o},n)=>l.jsxs(Zl,{children:[l.jsx(In,{}),l.jsxs(Nt,{ref:n,className:M(Mg({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(Yt,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ln.displayName=Nt.displayName;const Ql=({className:e,...t})=>l.jsx("div",{className:M("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ql.displayName="SheetHeader";const Jl=({className:e,...t})=>l.jsx("div",{className:M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Jl.displayName="SheetFooter";const ec=c.forwardRef(({className:e,...t},r)=>l.jsx(Pt,{ref:r,className:M("text-lg font-semibold text-foreground",e),...t}));ec.displayName=Pt.displayName;const tc=c.forwardRef(({className:e,...t},r)=>l.jsx(At,{ref:r,className:M("text-sm text-muted-foreground",e),...t}));tc.displayName=At.displayName;function Ig({className:e,...t}){return l.jsx("div",{className:M("animate-pulse rounded-md bg-muted",e),...t})}var Lg=e=>{switch(e){case"success":return Bg;case"info":return Vg;case"warning":return Hg;case"error":return Wg;default:return null}},$g=Array(12).fill(0),Fg=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},$g.map((r,o)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),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:"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"})),Hg=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"})),Vg=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"})),Wg=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"})),zg=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"})),Rg=()=>{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},$n=1,Ug=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:$n++,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(Yg(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||$n++;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 Ug,jg=(e,t)=>{let r=t?.id||$n++;return ge.addToast({title:e,...t,id:r}),r},Yg=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Kg=jg,Gg=()=>ge.toasts,Xg=()=>ge.getActiveToasts(),qg=Object.assign(Kg,{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:Gg,getToasts:Xg});function Zg(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))}Zg(`: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 Ur(e){return e.label!==void 0}var Qg=3,Jg="32px",em="16px",rc=4e3,tm=356,rm=14,om=20,nm=200;function Ne(...e){return e.filter(Boolean).join(" ")}function am(e){let[t,r]=e.split("-"),o=[];return t&&o.push(t),r&&o.push(r),o}var sm=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:T,removeToast:N,defaultRichColors:A,closeButton:V,style:k,cancelButtonStyle:L,actionButtonStyle:F,className:O="",descriptionClassName:U="",duration:D,position:j,gap:H,loadingIcon:z,expandByDefault:$,classNames:_,icons:Z,closeButtonAriaLabel:ee="Close toast",pauseWhenPageIsHidden:Y}=e,[X,Q]=C.useState(null),[ce,de]=C.useState(null),[I,re]=C.useState(!1),[oe,te]=C.useState(!1),[J,ne]=C.useState(!1),[me,pe]=C.useState(!1),[We,xe]=C.useState(!1),[ze,Ht]=C.useState(0),[er,pt]=C.useState(0),ht=C.useRef(p.duration||D||rc),Jr=C.useRef(null),Re=C.useRef(null),oa=x===0,P=x+1<=y,R=p.type,ie=p.dismissible!==!1,Ue=p.className||"",na=p.descriptionClassName||"",eo=C.useMemo(()=>b.findIndex(K=>K.toastId===p.id)||0,[b,p.id]),mv=C.useMemo(()=>{var K;return(K=p.closeButton)!=null?K:V},[p.closeButton,V]),nd=C.useMemo(()=>p.duration||D||rc,[p.duration,D]),aa=C.useRef(0),Vt=C.useRef(0),ad=C.useRef(0),Wt=C.useRef(null),[vv,bv]=j.split("-"),sd=C.useMemo(()=>b.reduce((K,ae,le)=>le>=eo?K:K+ae.height,0),[b,eo]),id=Rg(),wv=p.invert||m,sa=R==="loading";Vt.current=C.useMemo(()=>eo*H+sd,[eo,sd]),C.useEffect(()=>{ht.current=nd},[nd]),C.useEffect(()=>{re(!0)},[]),C.useEffect(()=>{let K=Re.current;if(K){let ae=K.getBoundingClientRect().height;return pt(ae),v(le=>[{toastId:p.id,height:ae,position:p.position},...le]),()=>v(le=>le.filter(Pe=>Pe.toastId!==p.id))}},[v,p.id]),C.useLayoutEffect(()=>{if(!I)return;let K=Re.current,ae=K.style.height;K.style.height="auto";let le=K.getBoundingClientRect().height;K.style.height=ae,pt(le),v(Pe=>Pe.find(Ae=>Ae.toastId===p.id)?Pe.map(Ae=>Ae.toastId===p.id?{...Ae,height:le}:Ae):[{toastId:p.id,height:le,position:p.position},...Pe])},[I,p.title,p.description,v,p.id]);let nt=C.useCallback(()=>{te(!0),Ht(Vt.current),v(K=>K.filter(ae=>ae.toastId!==p.id)),setTimeout(()=>{N(p)},nm)},[p,N,v,Vt]);C.useEffect(()=>{if(p.promise&&R==="loading"||p.duration===1/0||p.type==="loading")return;let K;return T||g||Y&&id?(()=>{if(ad.current<aa.current){let ae=new Date().getTime()-aa.current;ht.current=ht.current-ae}ad.current=new Date().getTime()})():ht.current!==1/0&&(aa.current=new Date().getTime(),K=setTimeout(()=>{var ae;(ae=p.onAutoClose)==null||ae.call(p,p),nt()},ht.current)),()=>clearTimeout(K)},[T,g,p,R,Y,id,nt]),C.useEffect(()=>{p.delete&&nt()},[nt,p.delete]);function yv(){var K,ae,le;return Z!=null&&Z.loading?C.createElement("div",{className:Ne(_?.loader,(K=p?.classNames)==null?void 0:K.loader,"sonner-loader"),"data-visible":R==="loading"},Z.loading):z?C.createElement("div",{className:Ne(_?.loader,(ae=p?.classNames)==null?void 0:ae.loader,"sonner-loader"),"data-visible":R==="loading"},z):C.createElement(Fg,{className:Ne(_?.loader,(le=p?.classNames)==null?void 0:le.loader),visible:R==="loading"})}return C.createElement("li",{tabIndex:0,ref:Re,className:Ne(O,Ue,_?.toast,(t=p?.classNames)==null?void 0:t.toast,_?.default,_?.[R],(r=p?.classNames)==null?void 0:r[R]),"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":We,"data-removed":oe,"data-visible":P,"data-y-position":vv,"data-x-position":bv,"data-index":x,"data-front":oa,"data-swiping":J,"data-dismissible":ie,"data-type":R,"data-invert":wv,"data-swipe-out":me,"data-swipe-direction":ce,"data-expanded":!!(T||$&&I),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${oe?ze:Vt.current}px`,"--initial-height":$?"auto":`${er}px`,...k,...p.style},onDragEnd:()=>{ne(!1),Q(null),Wt.current=null},onPointerDown:K=>{sa||!ie||(Jr.current=new Date,Ht(Vt.current),K.target.setPointerCapture(K.pointerId),K.target.tagName!=="BUTTON"&&(ne(!0),Wt.current={x:K.clientX,y:K.clientY}))},onPointerUp:()=>{var K,ae,le,Pe;if(me||!ie)return;Wt.current=null;let Ae=Number(((K=Re.current)==null?void 0:K.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),at=Number(((ae=Re.current)==null?void 0:ae.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),gt=new Date().getTime()-((le=Jr.current)==null?void 0:le.getTime()),ke=X==="x"?Ae:at,st=Math.abs(ke)/gt;if(Math.abs(ke)>=om||st>.11){Ht(Vt.current),(Pe=p.onDismiss)==null||Pe.call(p,p),de(X==="x"?Ae>0?"right":"left":at>0?"down":"up"),nt(),pe(!0),xe(!1);return}ne(!1),Q(null)},onPointerMove:K=>{var ae,le,Pe,Ae;if(!Wt.current||!ie||((ae=window.getSelection())==null?void 0:ae.toString().length)>0)return;let at=K.clientY-Wt.current.y,gt=K.clientX-Wt.current.x,ke=(le=e.swipeDirections)!=null?le:am(j);!X&&(Math.abs(gt)>1||Math.abs(at)>1)&&Q(Math.abs(gt)>Math.abs(at)?"x":"y");let st={x:0,y:0};X==="y"?(ke.includes("top")||ke.includes("bottom"))&&(ke.includes("top")&&at<0||ke.includes("bottom")&&at>0)&&(st.y=at):X==="x"&&(ke.includes("left")||ke.includes("right"))&&(ke.includes("left")&&gt<0||ke.includes("right")&&gt>0)&&(st.x=gt),(Math.abs(st.x)>0||Math.abs(st.y)>0)&&xe(!0),(Pe=Re.current)==null||Pe.style.setProperty("--swipe-amount-x",`${st.x}px`),(Ae=Re.current)==null||Ae.style.setProperty("--swipe-amount-y",`${st.y}px`)}},mv&&!p.jsx?C.createElement("button",{"aria-label":ee,"data-disabled":sa,"data-close-button":!0,onClick:sa||!ie?()=>{}:()=>{var K;nt(),(K=p.onDismiss)==null||K.call(p,p)},className:Ne(_?.closeButton,(n=p?.classNames)==null?void 0:n.closeButton)},(a=Z?.close)!=null?a:zg):null,p.jsx||C.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:C.createElement(C.Fragment,null,R||p.icon||p.promise?C.createElement("div",{"data-icon":"",className:Ne(_?.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||Z?.[R]||Lg(R):null):null,C.createElement("div",{"data-content":"",className:Ne(_?.content,(i=p?.classNames)==null?void 0:i.content)},C.createElement("div",{"data-title":"",className:Ne(_?.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:Ne(U,na,_?.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&&Ur(p.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||L,onClick:K=>{var ae,le;Ur(p.cancel)&&ie&&((le=(ae=p.cancel).onClick)==null||le.call(ae,K),nt())},className:Ne(_?.cancelButton,(f=p?.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,C.isValidElement(p.action)?p.action:p.action&&Ur(p.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||F,onClick:K=>{var ae,le;Ur(p.action)&&((le=(ae=p.action).onClick)==null||le.call(ae,K),!K.defaultPrevented&&nt())},className:Ne(_?.actionButton,(h=p?.classNames)==null?void 0:h.actionButton)},p.action.label):null))};function oc(){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 im(e,t){let r={};return[e,t].forEach((o,n)=>{let a=n===1,s=a?"--mobile-offset":"--offset",i=a?em:Jg;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 lm=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=oc(),gap:y=rm,loadingIcon:b,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:T}=e,[N,A]=C.useState([]),V=C.useMemo(()=>Array.from(new Set([o].concat(N.filter(Y=>Y.position).map(Y=>Y.position)))),[N,o]),[k,L]=C.useState([]),[F,O]=C.useState(!1),[U,D]=C.useState(!1),[j,H]=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),Z=C.useRef(!1),ee=C.useCallback(Y=>{A(X=>{var Q;return(Q=X.find(ce=>ce.id===Y.id))!=null&&Q.delete||ge.dismiss(Y.id),X.filter(({id:ce})=>ce!==Y.id)})},[]);return C.useEffect(()=>ge.subscribe(Y=>{if(Y.dismiss){A(X=>X.map(Q=>Q.id===Y.id?{...Q,delete:!0}:Q));return}setTimeout(()=>{tr.flushSync(()=>{A(X=>{let Q=X.findIndex(ce=>ce.id===Y.id);return Q!==-1?[...X.slice(0,Q),{...X[Q],...Y},...X.slice(Q+1)]:[Y,...X]})})})}),[]),C.useEffect(()=>{if(f!=="system"){H(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;let Y=window.matchMedia("(prefers-color-scheme: dark)");try{Y.addEventListener("change",({matches:X})=>{H(X?"dark":"light")})}catch{Y.addListener(({matches:Q})=>{try{H(Q?"dark":"light")}catch(ce){console.error(ce)}})}},[f]),C.useEffect(()=>{N.length<=1&&O(!1)},[N]),C.useEffect(()=>{let Y=X=>{var Q,ce;n.every(de=>X[de]||X.code===de)&&(O(!0),(Q=z.current)==null||Q.focus()),X.code==="Escape"&&(document.activeElement===z.current||(ce=z.current)!=null&&ce.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[n]),C.useEffect(()=>{if(z.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,Z.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},V.map((Y,X)=>{var Q;let[ce,de]=Y.split("-");return N.length?C.createElement("ol",{key:Y,dir:v==="auto"?oc():v,tabIndex:-1,ref:z,className:i,"data-sonner-toaster":!0,"data-theme":j,"data-y-position":ce,"data-lifted":F&&N.length>1&&!a,"data-x-position":de,style:{"--front-toast-height":`${((Q=k[0])==null?void 0:Q.height)||0}px`,"--width":`${tm}px`,"--gap":`${y}px`,...p,...im(d,u)},onBlur:I=>{Z.current&&!I.currentTarget.contains(I.relatedTarget)&&(Z.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:I=>{I.target instanceof HTMLElement&&I.target.dataset.dismissible==="false"||Z.current||(Z.current=!0,_.current=I.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{U||O(!1)},onDragEnd:()=>O(!1),onPointerDown:I=>{I.target instanceof HTMLElement&&I.target.dataset.dismissible==="false"||D(!0)},onPointerUp:()=>D(!1)},N.filter(I=>!I.position&&X===0||I.position===Y).map((I,re)=>{var oe,te;return C.createElement(sm,{key:I.id,icons:x,index:re,toast:I,defaultRichColors:h,duration:(oe=g?.duration)!=null?oe:m,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:w,closeButton:(te=g?.closeButton)!=null?te:s,interacting:U,position:Y,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,removeToast:ee,toasts:N.filter(J=>J.position==I.position),heights:k.filter(J=>J.position==I.position),setHeights:L,expandByDefault:a,gap:y,loadingIcon:b,expanded:F,pauseWhenPageIsHidden:T,swipeDirections:e.swipeDirections})})):null}))});const cm=({...e})=>{const{theme:t="system"}=to();return l.jsx(lm,{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 jr="Switch",[dm]=ve(jr),[um,Fn]=dm(jr);function fm(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]=Ye({prop:r,defaultProp:n??!1,onChange:d,caller:jr}),[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(um,{scope:t,...S,children:pm(h)?h(S):o})}var nc="SwitchTrigger",ac=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}=Fn(nc,e),p=q(o,d);return l.jsx(W.button,{type:"button",role:"switch","aria-checked":s,"aria-required":i,"data-state":dc(s),"data-disabled":a?"":void 0,disabled:a,value:n,...r,ref:p,onClick:B(t,w=>{u(g=>!g),m&&h&&(f.current=w.isPropagationStopped(),f.current||w.stopPropagation())})})});ac.displayName=nc;var Bn=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(fm,{__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(ac,{...h,ref:t,__scopeSwitch:r}),m&&l.jsx(cc,{__scopeSwitch:r})]})})});Bn.displayName=jr;var sc="SwitchThumb",ic=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...o}=e,n=Fn(sc,r);return l.jsx(W.span,{"data-state":dc(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});ic.displayName=sc;var lc="SwitchBubbleInput",cc=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}=Fn(lc,e),w=q(r,p),g=Oo(a),v=_o(o);c.useEffect(()=>{const b=m;if(!b)return;const x=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(x,"checked").set,N=!n.current;if(g!==a&&T){const A=new Event("click",{bubbles:N});T.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%)"}})});cc.displayName=lc;function pm(e){return typeof e=="function"}function dc(e){return e?"checked":"unchecked"}const uc=c.forwardRef(({className:e,...t},r)=>l.jsx(Bn,{className:M("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(ic,{className:M("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")})}));uc.displayName=Bn.displayName;const fc=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:M("w-full caption-bottom text-sm",e),...t})}));fc.displayName="Table";const pc=c.forwardRef(({className:e,...t},r)=>l.jsx("thead",{ref:r,className:M("bg-muted [&_tr]:border-b",e),...t}));pc.displayName="TableHeader";const hc=c.forwardRef(({className:e,...t},r)=>l.jsx("tbody",{ref:r,className:M("[&_tr:last-child]:border-0",e),...t}));hc.displayName="TableBody";const gc=c.forwardRef(({className:e,...t},r)=>l.jsx("tfoot",{ref:r,className:M("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));gc.displayName="TableFooter";const mc=c.forwardRef(({className:e,...t},r)=>l.jsx("tr",{ref:r,className:M("border-b bg-white transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));mc.displayName="TableRow";const vc=c.forwardRef(({className:e,...t},r)=>l.jsx("th",{ref:r,className:M("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));vc.displayName="TableHead";const bc=c.forwardRef(({className:e,...t},r)=>l.jsx("td",{ref:r,className:M("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));bc.displayName="TableCell";const wc=c.forwardRef(({className:e,...t},r)=>l.jsx("caption",{ref:r,className:M("mt-4 text-sm text-muted-foreground",e),...t}));wc.displayName="TableCaption";var Hn="ToastProvider",[Vn,hm,gm]=pl("Toast"),[yc]=ve("Toast",[gm]),[mm,Yr]=yc(Hn),xc=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 \`${Hn}\`. Expected non-empty \`string\`.`),l.jsx(Vn.Provider,{scope:t,children:l.jsx(mm,{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})})};xc.displayName=Hn;var Cc="ToastViewport",vm=["F8"],Wn="toast.viewportPause",zn="toast.viewportResume",Sc=c.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:o=vm,label:n="Notifications ({hotkey})",...a}=e,s=Yr(Cc,r),i=hm(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 N=new CustomEvent(Wn);y.dispatchEvent(N),s.isClosePausedRef.current=!0}},x=()=>{if(s.isClosePausedRef.current){const N=new CustomEvent(zn);y.dispatchEvent(N),s.isClosePausedRef.current=!1}},S=N=>{!v.contains(N.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=c.useCallback(({tabbingDirection:v})=>{const b=i().map(x=>{const S=x.ref.current,T=[S,...Dm(S)];return v==="forwards"?T:T.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 T=document.activeElement,N=b.shiftKey;if(b.target===v&&N){u.current?.focus();return}const k=g({tabbingDirection:N?"backwards":"forwards"}),L=k.findIndex(F=>F===T);jn(k.slice(L+1))?b.preventDefault():N?u.current?.focus():f.current?.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[i,g]),l.jsxs(Ud,{ref:d,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&l.jsx(Rn,{ref:u,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"forwards"});jn(v)}}),l.jsx(Vn.Slot,{scope:r,children:l.jsx(W.ol,{tabIndex:-1,...a,ref:m})}),w&&l.jsx(Rn,{ref:f,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"backwards"});jn(v)}})]})});Sc.displayName=Cc;var Ec="ToastFocusProxy",Rn=c.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:o,...n}=e,a=Yr(Ec,r);return l.jsx(Br,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:s=>{const i=s.relatedTarget;!a.viewport?.contains(i)&&o()}})});Rn.displayName=Ec;var Zt="Toast",bm="toast.swipeStart",wm="toast.swipeMove",ym="toast.swipeCancel",xm="toast.swipeEnd",Tc=c.forwardRef((e,t)=>{const{forceMount:r,open:o,defaultOpen:n,onOpenChange:a,...s}=e,[i,d]=Ye({prop:o,defaultProp:n??!0,onChange:a,caller:Zt});return l.jsx(he,{present:r||i,children:l.jsx(Em,{open:i,...s,ref:t,onClose:()=>d(!1),onPause:fe(e.onPause),onResume:fe(e.onResume),onSwipeStart:B(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:B(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:B(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:B(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)})})})});Tc.displayName=Zt;var[Cm,Sm]=yc(Zt,{onClose(){}}),Em=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=Yr(Zt,r),[v,y]=c.useState(null),b=q(t,D=>y(D)),x=c.useRef(null),S=c.useRef(null),T=n||g.duration,N=c.useRef(0),A=c.useRef(T),V=c.useRef(0),{onToastAdd:k,onToastRemove:L}=g,F=fe(()=>{v?.contains(document.activeElement)&&g.viewport?.focus(),s()}),O=c.useCallback(D=>{!D||D===1/0||(window.clearTimeout(V.current),N.current=new Date().getTime(),V.current=window.setTimeout(F,D))},[F]);c.useEffect(()=>{const D=g.viewport;if(D){const j=()=>{O(A.current),u?.()},H=()=>{const z=new Date().getTime()-N.current;A.current=A.current-z,window.clearTimeout(V.current),d?.()};return D.addEventListener(Wn,H),D.addEventListener(zn,j),()=>{D.removeEventListener(Wn,H),D.removeEventListener(zn,j)}}},[g.viewport,T,d,u,O]),c.useEffect(()=>{a&&!g.isClosePausedRef.current&&O(T)},[a,T,g.isClosePausedRef,O]),c.useEffect(()=>(k(),()=>L()),[k,L]);const U=c.useMemo(()=>v?_c(v):null,[v]);return g.viewport?l.jsxs(l.Fragment,{children:[U&&l.jsx(Tm,{__scopeToast:r,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:U}),l.jsx(Cm,{scope:r,onClose:F,children:mt.createPortal(l.jsx(Vn.ItemSlot,{scope:r,children:l.jsx(Rd,{asChild:!0,onEscapeKeyDown:B(i,()=>{g.isFocusedToastEscapeKeyDownRef.current||F(),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:B(e.onKeyDown,D=>{D.key==="Escape"&&(i?.(D.nativeEvent),D.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:B(e.onPointerDown,D=>{D.button===0&&(x.current={x:D.clientX,y:D.clientY})}),onPointerMove:B(e.onPointerMove,D=>{if(!x.current)return;const j=D.clientX-x.current.x,H=D.clientY-x.current.y,z=!!S.current,$=["left","right"].includes(g.swipeDirection),_=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,Z=$?_(0,j):0,ee=$?0:_(0,H),Y=D.pointerType==="touch"?10:2,X={x:Z,y:ee},Q={originalEvent:D,delta:X};z?(S.current=X,Kr(wm,h,Q,{discrete:!1})):Mc(X,g.swipeDirection,Y)?(S.current=X,Kr(bm,f,Q,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(j)>Y||Math.abs(H)>Y)&&(x.current=null)}),onPointerUp:B(e.onPointerUp,D=>{const j=S.current,H=D.target;if(H.hasPointerCapture(D.pointerId)&&H.releasePointerCapture(D.pointerId),S.current=null,x.current=null,j){const z=D.currentTarget,$={originalEvent:D,delta:j};Mc(j,g.swipeDirection,g.swipeThreshold)?Kr(xm,p,$,{discrete:!0}):Kr(ym,m,$,{discrete:!0}),z.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),Tm=e=>{const{__scopeToast:t,children:r,...o}=e,n=Yr(Zt,t),[a,s]=c.useState(!1),[i,d]=c.useState(!1);return Am(()=>s(!0)),c.useEffect(()=>{const u=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(u)},[]),i?null:l.jsx(zt,{asChild:!0,container:n.announcerContainer||void 0,children:l.jsx(Br,{...o,children:a&&l.jsxs(l.Fragment,{children:[n.label," ",r]})})})},Nm="ToastTitle",Nc=c.forwardRef((e,t)=>{const{__scopeToast:r,...o}=e;return l.jsx(W.div,{...o,ref:t})});Nc.displayName=Nm;var Pm="ToastDescription",Pc=c.forwardRef((e,t)=>{const{__scopeToast:r,...o}=e;return l.jsx(W.div,{...o,ref:t})});Pc.displayName=Pm;var Ac="ToastAction",kc=c.forwardRef((e,t)=>{const{altText:r,...o}=e;return r.trim()?l.jsx(Oc,{altText:r,asChild:!0,children:l.jsx(Un,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ac}\`. Expected non-empty \`string\`.`),null)});kc.displayName=Ac;var Dc="ToastClose",Un=c.forwardRef((e,t)=>{const{__scopeToast:r,...o}=e,n=Sm(Dc,r);return l.jsx(Oc,{asChild:!0,children:l.jsx(W.button,{type:"button",...o,ref:t,onClick:B(e.onClick,n.onClose)})})});Un.displayName=Dc;var Oc=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 _c(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),km(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(..._c(o))}}),t}function Kr(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?ha(n,a):n.dispatchEvent(a)}var Mc=(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 Am(e=()=>{}){const t=fe(e);ue(()=>{let r=0,o=0;return r=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(o)}},[t])}function km(e){return e.nodeType===e.ELEMENT_NODE}function Dm(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 jn(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Om=xc,Ic=Sc,Lc=Tc,$c=Nc,Fc=Pc,Bc=kc,Hc=Un;const Vc=Om,Yn=c.forwardRef(({className:e,...t},r)=>l.jsx(Ic,{ref:r,className:M("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}));Yn.displayName=Ic.displayName;const _m=jt("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"}}),Kn=c.forwardRef(({className:e,variant:t,...r},o)=>l.jsx(Lc,{ref:o,className:M(_m({variant:t}),e),...r}));Kn.displayName=Lc.displayName;const Wc=c.forwardRef(({className:e,...t},r)=>l.jsx(Bc,{ref:r,className:M("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}));Wc.displayName=Bc.displayName;const Gn=c.forwardRef(({className:e,...t},r)=>l.jsx(Hc,{ref:r,className:M("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(Yt,{className:"h-4 w-4"})}));Gn.displayName=Hc.displayName;const Xn=c.forwardRef(({className:e,...t},r)=>l.jsx($c,{ref:r,className:M("text-sm font-semibold",e),...t}));Xn.displayName=$c.displayName;const qn=c.forwardRef(({className:e,...t},r)=>l.jsx(Fc,{ref:r,className:M("text-sm opacity-90",e),...t}));qn.displayName=Fc.displayName;const Mm=1,Im=1e6;let Zn=0;function Lm(){return Zn=(Zn+1)%Number.MAX_SAFE_INTEGER,Zn.toString()}const Qn=new Map,zc=e=>{if(Qn.has(e))return;const t=setTimeout(()=>{Qn.delete(e),Qt({type:"REMOVE_TOAST",toastId:e})},Im);Qn.set(e,t)},$m=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Mm)};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?zc(r):e.toasts.forEach(o=>{zc(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)}}},Gr=[];let Xr={toasts:[]};function Qt(e){Xr=$m(Xr,e),Gr.forEach(t=>{t(Xr)})}function Rc({...e}){const t=Lm(),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 Uc(){const[e,t]=c.useState(Xr);return c.useEffect(()=>(Gr.push(t),()=>{const r=Gr.indexOf(t);r>-1&&Gr.splice(r,1)}),[e]),{...e,toast:Rc,dismiss:r=>Qt({type:"DISMISS_TOAST",toastId:r})}}function Fm(){const{toasts:e}=Uc();return l.jsxs(Vc,{children:[e.map(function({id:t,title:r,description:o,action:n,...a}){return l.jsxs(Kn,{...a,children:[l.jsxs("div",{className:"grid gap-1",children:[r&&l.jsx(Xn,{children:r}),o&&l.jsx(qn,{children:o})]}),n,l.jsx(Gn,{})]},t)}),l.jsx(Yn,{})]})}var[qr]=ve("Tooltip",[Lt]),Zr=Lt(),jc="TooltipProvider",Bm=700,Jn="tooltip.open",[Hm,ea]=qr(jc),Yc=e=>{const{__scopeTooltip:t,delayDuration:r=Bm,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(Hm,{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})};Yc.displayName=jc;var Jt="Tooltip",[Vm,Qr]=qr(Jt),Kc=e=>{const{__scopeTooltip:t,children:r,open:o,defaultOpen:n,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,d=ea(Jt,e.__scopeTooltip),u=Zr(t),[f,h]=c.useState(null),m=je(),p=c.useRef(0),w=s??d.disableHoverableContent,g=i??d.delayDuration,v=c.useRef(!1),[y,b]=Ye({prop:o,defaultProp:n??!1,onChange:A=>{A?(d.onOpen(),document.dispatchEvent(new CustomEvent(Jn))):d.onClose(),a?.(A)},caller:Jt}),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]),T=c.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b(!1)},[b]),N=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(sn,{...u,children:l.jsx(Vm,{scope:t,contentId:m,open:y,stateAttribute:x,trigger:f,onTriggerChange:h,onTriggerEnter:c.useCallback(()=>{d.isOpenDelayedRef.current?N():S()},[d.isOpenDelayedRef,N,S]),onTriggerLeave:c.useCallback(()=>{w?T():(window.clearTimeout(p.current),p.current=0)},[T,w]),onOpen:S,onClose:T,disableHoverableContent:w,children:r})})};Kc.displayName=Jt;var ta="TooltipTrigger",Gc=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...o}=e,n=Qr(ta,r),a=ea(ta,r),s=Zr(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(Or,{asChild:!0,...s,children:l.jsx(W.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...o,ref:d,onPointerMove:B(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),f.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{n.onTriggerLeave(),f.current=!1}),onPointerDown:B(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:B(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:B(e.onBlur,n.onClose),onClick:B(e.onClick,n.onClose)})})});Gc.displayName=ta;var Wm="TooltipPortal",[Cv,zm]=qr(Wm,{forceMount:void 0}),Bt="TooltipContent",Xc=c.forwardRef((e,t)=>{const r=zm(Bt,e.__scopeTooltip),{forceMount:o=r.forceMount,side:n="top",...a}=e,s=Qr(Bt,e.__scopeTooltip);return l.jsx(he,{present:o||s.open,children:s.disableHoverableContent?l.jsx(qc,{side:n,...a,ref:t}):l.jsx(Rm,{side:n,...a,ref:t})})}),Rm=c.forwardRef((e,t)=>{const r=Qr(Bt,e.__scopeTooltip),o=ea(Bt,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=Gm(y,v.getBoundingClientRect()),x=Xm(y,b),S=qm(g.getBoundingClientRect()),T=Qm([...x,...S]);i(T),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=!Zm(y,s);b?m():x&&(m(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,f,s,u,m]),l.jsx(qc,{...e,ref:a})}),[Um,jm]=qr(Jt,{isInside:!1}),Ym=Td("TooltipContent"),qc=c.forwardRef((e,t)=>{const{__scopeTooltip:r,children:o,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,d=Qr(Bt,r),u=Zr(r),{onClose:f}=d;return c.useEffect(()=>(document.addEventListener(Jn,f),()=>document.removeEventListener(Jn,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(bt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:f,children:l.jsxs(ln,{"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(Ym,{children:o}),l.jsx(Um,{scope:r,isInside:!0,children:l.jsx(rg,{id:d.contentId,role:"tooltip",children:n||o})})]})})});Xc.displayName=Bt;var Zc="TooltipArrow",Km=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...o}=e,n=Zr(r);return jm(Zc,r).isInside?null:l.jsx(cn,{...n,...o,ref:t})});Km.displayName=Zc;function Gm(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 Xm(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 qm(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 Zm(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),Jm(t)}function Jm(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 ev=Yc,tv=Kc,rv=Gc,Qc=Xc;const ov=ev,nv=tv,av=rv,Jc=c.forwardRef(({className:e,sideOffset:t=4,...r},o)=>l.jsx(Qc,{ref:o,sideOffset:t,className:M("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}));Jc.displayName=Qc.displayName;function sv({children:e,className:t}){return l.jsx("main",{className:M("p-6 space-y-6 pb-24",t),children:e})}function iv({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(rp,{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(qe,{onClick:o,className:"gap-2",children:[l.jsx(tp,{className:"h-4 w-4"}),n]})]})}function lv({open:e,onOpenChange:t,title:r,description:o,submitLabel:n="Create",isSubmitting:a=!1,onSubmit:s,children:i}){return l.jsx(Gs,{open:e,onOpenChange:t,children:l.jsxs(Ho,{className:"sm:max-w-[425px]",children:[l.jsxs(Vo,{children:[l.jsx(zo,{children:r}),o&&l.jsx(Ro,{children:o})]}),i,l.jsxs(Wo,{children:[l.jsx(qe,{variant:"ghost",onClick:()=>t(!1),disabled:a,children:"Cancel"}),l.jsx(qe,{onClick:s,disabled:a,children:a?l.jsxs(l.Fragment,{children:[l.jsx(Ks,{className:"h-4 w-4 mr-2 animate-spin"}),"Submitting..."]}):n})]})]})})}function ed({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(Cs,{open:e,onOpenChange:t,children:l.jsxs(yo,{children:[l.jsxs(xo,{children:[l.jsx(So,{children:r}),l.jsx(Eo,{children:o})]}),l.jsxs(Co,{children:[l.jsx(No,{disabled:i,children:a}),l.jsx(To,{onClick:u,disabled:i,className:s==="destructive"?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"",children:i?"Processing...":n})]})]})})}const ra=C.createContext(null),td=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(ra.Provider,{value:w,children:[t,l.jsx(ql,{open:u,onOpenChange:p,children:l.jsx(Ln,{className:"w-full sm:max-w-md !p-0",children:l.jsx("div",{ref:s,className:"relative h-full overflow-hidden isolate"})})})]})});td.displayName="DetailSheet";function rd(){const e=C.useContext(ra);if(!e)throw new Error("useDetailSheet must be used within a DetailSheet");return e}function od(e){const{displayStack:t,portalTarget:r,isDismissingRef:o}=rd(),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 cv({panelKey:e,children:t}){const{isActive:r,isTopPanel:o,depth:n,portalTarget:a,isDismissingRef:s}=od(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 tr.createPortal(l.jsx("div",{className:M("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 dv({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:M("text-lg font-semibold truncate",r),children:e}):n?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Uo,{value:s,onChange:y=>i(y.target.value),onKeyDown:g,onBlur:v,autoFocus:!0,disabled:d,className:M("h-8 text-lg font-semibold",r)}),l.jsx(qe,{ref:f,size:"icon",onClick:h?w:p,disabled:d,className:M("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(Ks,{className:M("h-4 w-4 absolute transition-opacity duration-200 animate-spin",d?"opacity-100":"opacity-0")}),l.jsx(Lo,{className:M("h-4 w-4 absolute transition-opacity duration-200",!d&&h?"opacity-100":"opacity-0")}),l.jsx(Yt,{className:M("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:M("text-lg font-semibold truncate cursor-text transition-colors group-hover:text-primary/80",r),children:e}),l.jsx(qe,{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(ep,{className:"h-3.5 w-3.5"})})]})}function uv({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(qe,{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(ed,{open:s,onOpenChange:i,title:r,description:o,confirmLabel:t,variant:"destructive",isLoading:n,onConfirm:a})]})}function fv({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(uv,{...t},r))]})}function pv({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 hv({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 gv(){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}}E.AlertDialog=Cs,E.AlertDialogAction=To,E.AlertDialogCancel=No,E.AlertDialogContent=yo,E.AlertDialogDescription=Eo,E.AlertDialogFooter=Co,E.AlertDialogHeader=xo,E.AlertDialogOverlay=wo,E.AlertDialogPortal=Ss,E.AlertDialogTitle=So,E.AlertDialogTrigger=Bf,E.AppShell=gd,E.Avatar=As,E.AvatarFallback=Ds,E.AvatarImage=ks,E.Badge=_s,E.Button=qe,E.Card=Ms,E.CardContent=Fs,E.CardDescription=$s,E.CardFooter=Bs,E.CardHeader=Is,E.CardTitle=Ls,E.Checkbox=Fo,E.ConfirmModal=la,E.ConfirmationModal=ed,E.Container=sv,E.DangerZoneSection=fv,E.DetailPanel=cv,E.DetailSheet=td,E.DetailSheetContext=ra,E.Dialog=Gs,E.DialogClose=np,E.DialogContent=Ho,E.DialogDescription=Ro,E.DialogFooter=Wo,E.DialogHeader=Vo,E.DialogOverlay=Bo,E.DialogPortal=Xs,E.DialogTitle=zo,E.DialogTrigger=op,E.EditableTitle=dv,E.EmptyState=iv,E.FormModal=lv,E.Input=Uo,E.Label=Qs,E.MultiSelect=_h,E.NavigationListItem=pv,E.PanelEmptyState=hv,E.Popover=Wi,E.PopoverContent=un,E.PopoverTrigger=zi,E.Progress=qi,E.RadixToaster=Fm,E.ScrollArea=fl,E.ScrollBar=wn,E.Select=Tg,E.SelectContent=zl,E.SelectGroup=Ng,E.SelectItem=Ul,E.SelectLabel=Rl,E.SelectScrollDownButton=Mn,E.SelectScrollUpButton=_n,E.SelectSeparator=jl,E.SelectTrigger=Wl,E.SelectValue=Pg,E.Separator=Xl,E.Sheet=ql,E.SheetClose=_g,E.SheetContent=Ln,E.SheetDescription=tc,E.SheetFooter=Jl,E.SheetHeader=Ql,E.SheetOverlay=In,E.SheetPortal=Zl,E.SheetTitle=ec,E.SheetTrigger=Og,E.Skeleton=Ig,E.SonnerToaster=cm,E.Switch=uc,E.Table=fc,E.TableBody=hc,E.TableCaption=wc,E.TableCell=bc,E.TableFooter=gc,E.TableHead=vc,E.TableHeader=pc,E.TableRow=mc,E.Toast=Kn,E.ToastAction=Wc,E.ToastClose=Gn,E.ToastDescription=qn,E.ToastProvider=Vc,E.ToastTitle=Xn,E.ToastViewport=Yn,E.Tooltip=nv,E.TooltipContent=Jc,E.TooltipProvider=ov,E.TooltipTrigger=av,E.VenueSwitcher=md,E.badgeVariants=Os,E.buttonVariants=wr,E.cn=M,E.sonnerToast=qg,E.toast=Rc,E.useDetailPanel=od,E.useDetailSheet=rd,E.useDetailSheetControls=gv,E.useTheme=to,E.useToast=Uc,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));