@moondreamsdev/dreamer-ui 1.7.8 → 1.7.10-test.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +8 -8
  2. package/dist/Toast-Bsb2dJ2y.cjs +2 -0
  3. package/dist/Toast-Bsb2dJ2y.cjs.map +1 -0
  4. package/dist/{Toast-B83cGTb3.js → Toast-wfHk-Wd8.js} +46 -45
  5. package/dist/Toast-wfHk-Wd8.js.map +1 -0
  6. package/dist/{QuestionMarkCircled-CY81euqP.js → Window-CT479Oxr.js} +98 -6
  7. package/dist/Window-CT479Oxr.js.map +1 -0
  8. package/dist/Window-oF6fyFBX.cjs +2 -0
  9. package/dist/Window-oF6fyFBX.cjs.map +1 -0
  10. package/dist/components.cjs.js +2 -1
  11. package/dist/components.cjs.js.map +1 -1
  12. package/dist/components.esm.js +1753 -1410
  13. package/dist/components.esm.js.map +1 -1
  14. package/dist/hooks.cjs.js +1 -1
  15. package/dist/hooks.esm.js +6 -3
  16. package/dist/hooks.esm.js.map +1 -1
  17. package/dist/providers.cjs.js +1 -1
  18. package/dist/providers.esm.js +1 -1
  19. package/dist/src/components/accordion/AccordionItem.d.ts +0 -1
  20. package/dist/src/components/carousel/hooks.d.ts +0 -1
  21. package/dist/src/components/clickable/Clickable.d.ts +0 -1
  22. package/dist/src/components/code-block/CodeBlock.d.ts +34 -0
  23. package/dist/src/components/code-block/hooks.d.ts +64 -0
  24. package/dist/src/components/code-block/index.d.ts +2 -0
  25. package/dist/src/components/index.d.ts +1 -0
  26. package/dist/src/components/radiogroup/RadioGroupItem.d.ts +0 -1
  27. package/dist/src/components/scroll-area/hooks.d.ts +0 -1
  28. package/dist/src/components/tabs/TabsContent.d.ts +0 -1
  29. package/dist/src/components/tabs/TabsContext.d.ts +0 -1
  30. package/dist/src/components/tabs/TabsList.d.ts +0 -1
  31. package/dist/src/components/tabs/TabsTrigger.d.ts +0 -1
  32. package/dist/src/components/tooltip/hooks.d.ts +0 -1
  33. package/dist/src/hooks/index.d.ts +2 -0
  34. package/dist/src/hooks/useActionModal.d.ts +0 -1
  35. package/dist/src/hooks/useCopyToClipboard.d.ts +9 -0
  36. package/dist/src/hooks/useDownloadFile.d.ts +6 -0
  37. package/dist/src/hooks/useToast.d.ts +0 -1
  38. package/dist/src/symbols/Copy.d.ts +2 -0
  39. package/dist/src/symbols/Dash.d.ts +2 -0
  40. package/dist/src/symbols/Download.d.ts +2 -0
  41. package/dist/src/symbols/Window.d.ts +2 -0
  42. package/dist/src/symbols/index.d.ts +4 -0
  43. package/dist/src/symbols/props.d.ts +0 -1
  44. package/dist/symbols.cjs.js +1 -1
  45. package/dist/symbols.esm.js +15 -11
  46. package/dist/useDownloadFile-D7aXoP4p.cjs +2 -0
  47. package/dist/useDownloadFile-D7aXoP4p.cjs.map +1 -0
  48. package/dist/useDownloadFile-fw_TsfK6.js +22 -0
  49. package/dist/useDownloadFile-fw_TsfK6.js.map +1 -0
  50. package/package.json +1 -1
  51. package/dist/QuestionMarkCircled-CY81euqP.js.map +0 -1
  52. package/dist/QuestionMarkCircled-D3gPieJ7.cjs +0 -2
  53. package/dist/QuestionMarkCircled-D3gPieJ7.cjs.map +0 -1
  54. package/dist/Toast-B83cGTb3.js.map +0 -1
  55. package/dist/Toast-BDQ9mOuz.cjs +0 -2
  56. package/dist/Toast-BDQ9mOuz.cjs.map +0 -1
package/README.md CHANGED
@@ -29,7 +29,7 @@ or, if the above command fails:
29
29
  And, finally, install the stylesheets in main CSS file (recommended):
30
30
 
31
31
  ```css
32
- @import "@moondreamsdev/dreamer-ui/styles"; /* non-TailwindCSS styles */
32
+ @import '@moondreamsdev/dreamer-ui/styles'; /* non-TailwindCSS styles */
33
33
  @import './dreamer-ui.css'; /* customizable, theme styles */
34
34
 
35
35
  /* other styles */
@@ -40,17 +40,17 @@ And, finally, install the stylesheets in main CSS file (recommended):
40
40
 
41
41
  ### Tailwind Class Name Auto-Detection
42
42
 
43
- To enable Tailwind CSS IntelliSense for component classnames like `targetClassName`, add the following to your VS Code settings.json:
43
+ To enable Tailwind CSS IntelliSense for component classnames like `targetClassName` and when using `join()`, add the following to your VS Code settings.json:
44
44
 
45
45
  ```json
46
46
  {
47
- "tailwindCSS.classAttributes": ["class", "className", ".*ClassName"]
47
+ "tailwindCSS.classAttributes": ["class", "className", ".*ClassName"],
48
+ "tailwindCSS.classFunctions": ["join"]
48
49
  }
49
50
  ```
50
51
 
51
52
  This configuration allows the Tailwind CSS extension to provide autocomplete and validation for any attribute that contains "className" in its name, including custom props like `targetClassName`, `containerClassName`, etc.
52
53
 
53
-
54
54
  ## Usage
55
55
 
56
56
  ```tsx
@@ -59,9 +59,9 @@ import { Button, Input, Textarea } from 'dreamer-ui';
59
59
  function App() {
60
60
  return (
61
61
  <div>
62
- <Button variant="primary">Click me</Button>
63
- <Input placeholder="Enter text" />
64
- <Textarea placeholder="Enter message" />
62
+ <Button variant='primary'>Click me</Button>
63
+ <Input placeholder='Enter text' />
64
+ <Textarea placeholder='Enter message' />
65
65
  </div>
66
66
  );
67
67
  }
@@ -87,4 +87,4 @@ Contributions are welcome! Please read our contributing guidelines.
87
87
 
88
88
  ## License
89
89
 
90
- MIT
90
+ MIT
@@ -0,0 +1,2 @@
1
+ "use strict";const t=require("react/jsx-runtime"),r=require("react"),I=require("react-dom"),g=require("./X-CgjeP2OI.cjs"),M=require("./utils.cjs.js");function h(...e){return e.filter(l=>typeof l=="string"&&l).join(" ").trim()||void 0}function O({size:e=15,color:l="currentColor",className:s="inline",...n}){return t.jsx("svg",{...n,width:e,height:e,className:s,viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:l,fillRule:"evenodd",clipRule:"evenodd"})})}function y(...e){return e.filter(l=>typeof l=="string"&&l).join(" ").trim()||void 0}r.createContext(void 0);r.createContext(null);r.createContext(null);r.createContext(null);r.createContext(null);r.createContext(null);r.createContext(null);r.createContext(null);r.createContext(null);r.createContext(null);r.createContext(null);r.createContext(null);r.createContext(null);r.createContext(null);r.createContext(null);function B(){const[e,l]=r.useState(0);return r.useEffect(()=>{const s=setInterval(()=>{l(n=>(n+1)%3)},500);return()=>clearInterval(s)},[]),t.jsx("div",{className:"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle",children:[0,1,2].map(s=>t.jsx("div",{className:h("rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",e===s&&"transform -translate-y-1")},s))})}const H={base:"",primary:"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",tertiary:"text-primary hover:text-primary-foreground disabled:text-muted",outline:"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",link:"underline-offset-4 hover:underline disabled:underline disabled:text-muted",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"},P={stripped:"",fitted:"size-fit",sm:"px-2 py-1 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg",icon:"p-1 w-fit aspect-square",full:"p-2 w-full"},D={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},p={variant:"primary",size:"md",rounded:"md"};function G({variant:e=p.variant,size:l,rounded:s=p.rounded,loading:n,linkTo:a,linkProps:i,type:o="button",className:c,...d}){let u;e==="link"&&!l?u="fitted":u=l||p.size;const m=h("appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",H[e],P[u],D[s],n&&"relative pointer-events-none",a&&"relative",c);return t.jsxs("button",{...d,role:a?"link":d.role,"aria-label":d["aria-label"]||(i==null?void 0:i["aria-label"]),"aria-description":d["aria-description"]||(i==null?void 0:i["aria-description"]),"aria-disabled":d.disabled||n,"aria-busy":n,type:o,className:m,children:[n&&t.jsx(B,{}),t.jsx("span",{className:h(n&&"invisible"),children:d.children}),a&&!d.disabled&&t.jsx("a",{...i,"aria-hidden":!0,href:a,rel:(i==null?void 0:i.rel)||"noreferrer",className:"absolute inset-0"})]})}function K(e){const[l,s]=r.useState(!1),[n,a]=r.useState(!1);return r.useEffect(()=>{e?(a(!0),setTimeout(()=>s(!0),10)):(s(!1),setTimeout(()=>a(!1),150))},[e]),{show:l,shouldRender:n}}function X(e,l){r.useEffect(()=>{const s=n=>{n.key==="Escape"&&e&&l()};return document.addEventListener("keydown",s),e&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",s),document.body.style.overflow="auto"}},[e,l])}function F(e,l){const s=r.useRef(null),n=r.useCallback(()=>{const a=document.getElementById(e);if(!a)return;const i=a.querySelectorAll('[data-modal-action="true"]');if(i.length>0){i[0].focus();return}const o=a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(o.length>0){const c=Array.from(o).filter(d=>!(d instanceof HTMLButtonElement&&d.getAttribute("data-modal-close-button")==="true"));if(c.length>0){c[0].focus();return}o[0].focus();return}a.focus()},[e]);r.useEffect(()=>(l&&(s.current=document.activeElement,n()),()=>{document.body.style.overflow="auto",s.current instanceof HTMLElement&&s.current.focus()}),[l,n])}function J({id:e,isOpen:l,onClose:s,title:n,children:a,contentOnly:i=!1,className:o,overlayClassName:c,hideCloseButton:d=!1,actions:u=[],disableCloseOnOverlayClick:m=!1,ariaLabelledBy:f,ariaDescribedBy:x}){const b=r.useId(),C=e||`modal-${b}`,j=e?`${e}-title`:`modal-title-${b}`,{show:k,shouldRender:v}=K(l);if(F(C,v),X(v,s),!v)return null;const E=()=>n?r.isValidElement(n)?t.jsx("div",{className:"mb-4",children:n}):t.jsx("h2",{className:"mb-4 text-xl font-semibold",id:j,children:n}):null,T=()=>u.length===0?null:t.jsx("div",{className:"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3",children:u.map((L,z)=>{const{label:q,className:S,...A}=L;return t.jsx(G,{className:S,type:"button",...A,"data-modal-action":"true",children:q},z)})});return t.jsx(t.Fragment,{children:I.createPortal(t.jsx("div",{"aria-labelledby":f??n?j:void 0,"aria-describedby":x,role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[100] overflow-y-auto",children:t.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4",children:[t.jsx("div",{className:y("fixed inset-0 bg-black/20 transition-all",c),onClick:()=>{m||s()}}),i&&t.jsx("div",{className:y("relative w-fit",o),children:a}),!i&&t.jsxs("div",{id:C,tabIndex:-1,className:y("relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75",k?"opacity-100 scale-100":"opacity-0 scale-90",o),children:[!d&&t.jsx("button",{type:"button",onClick:s,"data-modal-close-button":"true",className:"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",children:t.jsx(O,{size:18})}),E(),a,T()]})]})}),document.body)})}function V({type:e,message:l,cancelText:s,confirmText:n,onConfirm:a,onClose:i,destructive:o=!1,title:c,...d}){const u=r.useMemo(()=>e==="confirm"?{confirm:n||"Confirm",cancel:s||"Cancel",defaultTitle:c||"Confirm Action"}:{confirm:n||"OK",cancel:null,defaultTitle:c||"Alert"},[e,n,c,s]),m=r.useMemo(()=>[...u.cancel?[{label:u.cancel,variant:"secondary",onClick:i}]:[],{label:u.confirm,variant:o?"destructive":"primary",onClick:()=>{a==null||a(),i()}}],[u,o,a,i]);return t.jsx(J,{...d,title:c||u.defaultTitle,onClose:i,actions:m,disableCloseOnOverlayClick:e==="confirm",hideCloseButton:e==="confirm",children:typeof l=="string"?t.jsx("p",{className:"text-sm",children:l}):l})}const N=r.createContext(null),Y=()=>{const e=r.useContext(N);if(!e)throw new Error("Tabs components must be used within a Tabs component");return e},w={info:{className:"bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",icon:t.jsx(g.InfoCircled,{size:20})},warning:{className:"bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",icon:t.jsx(g.ExclamationTriangle,{size:20})},error:{className:"bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",icon:t.jsx(g.CrossCircled,{size:20})}};function Z({id:e,title:l,description:s,type:n="info",action:a,duration:i=5e3,onRemove:o,customTypes:c,customComponent:d}){const[u,m]=r.useState(!1),f=r.useCallback(()=>{m(!0),setTimeout(()=>{o==null||o(e)},150)},[e,o]);if(r.useEffect(()=>{if(i>0){const b=setTimeout(()=>{f()},i);return()=>clearTimeout(b)}},[i,e,o,f]),d)return t.jsx(d,{id:e,title:l,description:s,type:n,action:a,duration:i,onRemove:o});const x=(c==null?void 0:c[n])||w[n]||w.info;return t.jsxs("div",{role:n==="error"?"alert":"status","aria-live":n==="error"?void 0:"polite",className:M.join("relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out",a&&"pb-3",x.className,u?"opacity-0 translate-x-full":"opacity-100 translate-x-0"),children:[t.jsx("div",{className:"flex-shrink-0 mr-3",children:x.icon}),t.jsxs("div",{className:"flex-grow min-w-0",children:[t.jsx("div",{className:"font-medium text-sm leading-5",children:l}),s&&t.jsx("div",{className:"mt-1 text-sm opacity-90 leading-5",children:s}),a&&t.jsx("div",{className:"mt-1.5",children:t.jsx("button",{onClick:a.onClick,className:"text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer",children:a.label})})]}),t.jsx("button",{onClick:f,className:"flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0",children:t.jsx(g.X,{size:16})})]})}exports.ActionModal=V;exports.TabsContext=N;exports.Toast=Z;exports.n=h;exports.useTabsContext=Y;
2
+ //# sourceMappingURL=Toast-Bsb2dJ2y.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast-Bsb2dJ2y.cjs","sources":["utils.esm.js","X-CIoyLewf.js","Toast-B83cGTb3.js","components.esm.js","../src/components/actionmodal/ActionModal.tsx","../src/components/tabs/TabsContext.tsx","../src/components/toast/Toast.tsx"],"sourcesContent":["function n(...t) {\n return t.filter((s) => typeof s == \"string\" && s).join(\" \").trim() || void 0;\n}\nexport {\n n as join\n};\n//# sourceMappingURL=utils.esm.js.map\n","import { jsx as e } from \"react/jsx-runtime\";\nfunction t({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction o({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction d({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction h({ size: C = 15, color: l = \"currentColor\", className: n = \"inline\", ...i }) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nexport {\n t as C,\n o as E,\n d as I,\n h as X\n};\n//# sourceMappingURL=X-CIoyLewf.js.map\n","import { jsx as r, Fragment as q, jsxs as b } from \"react/jsx-runtime\";\nimport F, { createContext as u, useId as H, useState as v, useEffect as g, useRef as P, useCallback as T, useMemo as E, useContext as K } from \"react\";\nimport { createPortal as D } from \"react-dom\";\nimport { X as J, C as V, E as X, I as Y } from \"./X-CIoyLewf.js\";\nimport { join as Z } from \"./utils.esm.js\";\nfunction N(...e) {\n return e.filter((l) => typeof l == \"string\" && l).join(\" \").trim() || void 0;\n}\nfunction $({ size: e = 15, color: l = \"currentColor\", className: n = \"inline\", ...t }) {\n return /* @__PURE__ */ r(\n \"svg\",\n {\n ...t,\n width: e,\n height: e,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ r(\n \"path\",\n {\n d: \"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction x(...e) {\n return e.filter((l) => typeof l == \"string\" && l).join(\" \").trim() || void 0;\n}\nu(void 0);\nu(null);\nu(null);\nu(null);\nu(null);\nu(null);\nu(null);\nu(null);\nu(null);\nu(null);\nu(null);\nu(null);\nu(null);\nu(null);\nfunction G() {\n const [e, l] = v(0);\n return g(() => {\n const n = setInterval(() => {\n l((t) => (t + 1) % 3);\n }, 500);\n return () => clearInterval(n);\n }, []), /* @__PURE__ */ r(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((n) => /* @__PURE__ */ r(\n \"div\",\n {\n className: N(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n e === n && \"transform -translate-y-1\"\n )\n },\n n\n )) });\n}\nconst Q = {\n base: \"\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80\",\n tertiary: \"text-primary hover:text-primary-foreground disabled:text-muted\",\n outline: \"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted\",\n link: \"underline-offset-4 hover:underline disabled:underline disabled:text-muted\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground\"\n}, U = {\n stripped: \"\",\n fitted: \"size-fit\",\n sm: \"px-2 py-1 text-sm\",\n md: \"px-4 py-2 text-base\",\n lg: \"px-6 py-3 text-lg\",\n icon: \"p-1 w-fit aspect-square\",\n full: \"p-2 w-full\"\n}, W = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, w = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction _({\n variant: e = w.variant,\n size: l,\n rounded: n = w.rounded,\n loading: t,\n linkTo: i,\n linkProps: a,\n type: o = \"button\",\n className: d,\n ...s\n}) {\n let c;\n e === \"link\" && !l ? c = \"fitted\" : c = l || w.size;\n const m = N(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n Q[e],\n U[c],\n W[n],\n t && \"relative pointer-events-none\",\n i && \"relative\",\n d\n );\n return /* @__PURE__ */ b(\n \"button\",\n {\n ...s,\n role: i ? \"link\" : s.role,\n \"aria-label\": s[\"aria-label\"] || (a == null ? void 0 : a[\"aria-label\"]),\n \"aria-description\": s[\"aria-description\"] || (a == null ? void 0 : a[\"aria-description\"]),\n \"aria-disabled\": s.disabled || t,\n \"aria-busy\": t,\n type: o,\n className: m,\n children: [\n t && /* @__PURE__ */ r(G, {}),\n /* @__PURE__ */ r(\"span\", { className: N(t && \"invisible\"), children: s.children }),\n i && !s.disabled && /* @__PURE__ */ r(\n \"a\",\n {\n ...a,\n \"aria-hidden\": !0,\n href: i,\n rel: (a == null ? void 0 : a.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction R(e) {\n const [l, n] = v(!1), [t, i] = v(!1);\n return g(() => {\n e ? (i(!0), setTimeout(() => n(!0), 10)) : (n(!1), setTimeout(() => i(!1), 150));\n }, [e]), { show: l, shouldRender: t };\n}\nfunction ee(e, l) {\n g(() => {\n const n = (t) => {\n t.key === \"Escape\" && e && l();\n };\n return document.addEventListener(\"keydown\", n), e && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", n), document.body.style.overflow = \"auto\";\n };\n }, [e, l]);\n}\nfunction te(e, l) {\n const n = P(null), t = T(() => {\n const i = document.getElementById(e);\n if (!i) return;\n const a = i.querySelectorAll('[data-modal-action=\"true\"]');\n if (a.length > 0) {\n a[0].focus();\n return;\n }\n const o = i.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (o.length > 0) {\n const d = Array.from(o).filter((s) => !(s instanceof HTMLButtonElement && s.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (d.length > 0) {\n d[0].focus();\n return;\n }\n o[0].focus();\n return;\n }\n i.focus();\n }, [e]);\n g(() => (l && (n.current = document.activeElement, t()), () => {\n document.body.style.overflow = \"auto\", n.current instanceof HTMLElement && n.current.focus();\n }), [l, t]);\n}\nfunction re({\n id: e,\n isOpen: l,\n onClose: n,\n title: t,\n children: i,\n contentOnly: a = !1,\n className: o,\n overlayClassName: d,\n hideCloseButton: s = !1,\n actions: c = [],\n disableCloseOnOverlayClick: m = !1,\n ariaLabelledBy: f,\n ariaDescribedBy: h\n}) {\n const p = H(), k = e || `modal-${p}`, C = e ? `${e}-title` : `modal-title-${p}`, { show: z, shouldRender: y } = R(l);\n if (te(k, y), ee(y, n), !y) return null;\n const I = () => t ? F.isValidElement(t) ? /* @__PURE__ */ r(\"div\", { className: \"mb-4\", children: t }) : /* @__PURE__ */ r(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: C, children: t }) : null, j = () => c.length === 0 ? null : /* @__PURE__ */ r(\"div\", { className: \"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3\", children: c.map((A, O) => {\n const { label: B, className: M, ...S } = A;\n return /* @__PURE__ */ r(_, { className: M, type: \"button\", ...S, \"data-modal-action\": \"true\", children: B }, O);\n }) });\n return /* @__PURE__ */ r(q, { children: D(\n /* @__PURE__ */ r(\n \"div\",\n {\n \"aria-labelledby\": f ?? t ? C : void 0,\n \"aria-describedby\": h,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ b(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ r(\n \"div\",\n {\n className: x(\"fixed inset-0 bg-black/20 transition-all\", d),\n onClick: () => {\n m || n();\n }\n }\n ),\n a && /* @__PURE__ */ r(\"div\", { className: x(\"relative w-fit\", o), children: i }),\n !a && /* @__PURE__ */ b(\n \"div\",\n {\n id: k,\n tabIndex: -1,\n className: x(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75\",\n z ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n o\n ),\n children: [\n !s && /* @__PURE__ */ r(\n \"button\",\n {\n type: \"button\",\n onClick: n,\n \"data-modal-close-button\": \"true\",\n className: \"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ r($, { size: 18 })\n }\n ),\n I(),\n i,\n j()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nfunction de({\n type: e,\n message: l,\n cancelText: n,\n confirmText: t,\n onConfirm: i,\n onClose: a,\n destructive: o = !1,\n title: d,\n ...s\n}) {\n const c = E(() => e === \"confirm\" ? {\n confirm: t || \"Confirm\",\n cancel: n || \"Cancel\",\n defaultTitle: d || \"Confirm Action\"\n } : {\n confirm: t || \"OK\",\n cancel: null,\n defaultTitle: d || \"Alert\"\n }, [e, t, d, n]), m = E(\n () => [\n ...c.cancel ? [\n {\n label: c.cancel,\n variant: \"secondary\",\n onClick: a\n }\n ] : [],\n {\n label: c.confirm,\n variant: o ? \"destructive\" : \"primary\",\n onClick: () => {\n i == null || i(), a();\n }\n }\n ],\n [c, o, i, a]\n );\n return /* @__PURE__ */ r(\n re,\n {\n ...s,\n title: d || c.defaultTitle,\n onClose: a,\n actions: m,\n disableCloseOnOverlayClick: e === \"confirm\",\n hideCloseButton: e === \"confirm\",\n children: typeof l == \"string\" ? /* @__PURE__ */ r(\"p\", { className: \"text-sm\", children: l }) : l\n }\n );\n}\nconst le = u(null), ue = () => {\n const e = K(le);\n if (!e)\n throw new Error(\"Tabs components must be used within a Tabs component\");\n return e;\n}, L = {\n info: {\n className: \"bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100\",\n icon: /* @__PURE__ */ r(Y, { size: 20 })\n },\n warning: {\n className: \"bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100\",\n icon: /* @__PURE__ */ r(X, { size: 20 })\n },\n error: {\n className: \"bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100\",\n icon: /* @__PURE__ */ r(V, { size: 20 })\n }\n};\nfunction ce({\n id: e,\n title: l,\n description: n,\n type: t = \"info\",\n action: i,\n duration: a = 5e3,\n onRemove: o,\n customTypes: d,\n customComponent: s\n}) {\n const [c, m] = v(!1), f = T(() => {\n m(!0), setTimeout(() => {\n o == null || o(e);\n }, 150);\n }, [e, o]);\n if (g(() => {\n if (a > 0) {\n const p = setTimeout(() => {\n f();\n }, a);\n return () => clearTimeout(p);\n }\n }, [a, e, o, f]), s)\n return /* @__PURE__ */ r(\n s,\n {\n id: e,\n title: l,\n description: n,\n type: t,\n action: i,\n duration: a,\n onRemove: o\n }\n );\n const h = (d == null ? void 0 : d[t]) || L[t] || L.info;\n return /* @__PURE__ */ b(\n \"div\",\n {\n role: t === \"error\" ? \"alert\" : \"status\",\n \"aria-live\": t === \"error\" ? void 0 : \"polite\",\n className: Z(\n \"relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out\",\n i && \"pb-3\",\n h.className,\n c ? \"opacity-0 translate-x-full\" : \"opacity-100 translate-x-0\"\n ),\n children: [\n /* @__PURE__ */ r(\"div\", { className: \"flex-shrink-0 mr-3\", children: h.icon }),\n /* @__PURE__ */ b(\"div\", { className: \"flex-grow min-w-0\", children: [\n /* @__PURE__ */ r(\"div\", { className: \"font-medium text-sm leading-5\", children: l }),\n n && /* @__PURE__ */ r(\"div\", { className: \"mt-1 text-sm opacity-90 leading-5\", children: n }),\n i && /* @__PURE__ */ r(\"div\", { className: \"mt-1.5\", children: /* @__PURE__ */ r(\n \"button\",\n {\n onClick: i.onClick,\n className: \"text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer\",\n children: i.label\n }\n ) })\n ] }),\n /* @__PURE__ */ r(\n \"button\",\n {\n onClick: f,\n className: \"flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0\",\n children: /* @__PURE__ */ r(J, { size: 16 })\n }\n )\n ]\n }\n );\n}\nexport {\n de as A,\n ce as T,\n le as a,\n N as n,\n ue as u\n};\n//# sourceMappingURL=Toast-B83cGTb3.js.map\n","import { jsxs as k, jsx as c, Fragment as ne } from \"react/jsx-runtime\";\nimport G, { useId as P, useState as A, createElement as Te, useEffect as C, useRef as B, useCallback as z, useMemo as J, isValidElement as De, cloneElement as Re } from \"react\";\nimport { join as w } from \"./utils.esm.js\";\nimport { d as Ae, e as Ie, f as ze, C as Ce, a as Se, g as Le, E as Ve, Q as We, b as Be, c as He } from \"./QuestionMarkCircled-CY81euqP.js\";\nimport { n as V, a as je, u as he } from \"./Toast-B83cGTb3.js\";\nimport { A as nr, T as ar } from \"./Toast-B83cGTb3.js\";\nimport { E as Fe, X as ve } from \"./X-CIoyLewf.js\";\nimport { createPortal as pe } from \"react-dom\";\nfunction fe({\n id: r,\n title: o,\n content: t,\n children: n,\n className: e = \"\",\n disabled: a = !1,\n isOpen: s = !1,\n onToggle: i,\n triggerClassName: d = \"\",\n bodyClassName: f = \"\"\n}) {\n const m = P(), l = r || `accordion-item-${m}`, b = `${l}-header`, u = `${l}-panel`, h = () => {\n !a && i && i();\n }, v = (p) => {\n (p.key === \"Enter\" || p.key === \" \") && (p.preventDefault(), h());\n };\n return /* @__PURE__ */ k(\"div\", { className: w(\"border-b border-gray-200\", a && \"opacity-60 cursor-not-allowed\", e), children: [\n /* @__PURE__ */ k(\n \"button\",\n {\n id: b,\n type: \"button\",\n className: w(\n \"w-full text-left py-3 px-4 flex justify-between items-center focus:outline focus:outline-secondary\",\n a ? \"cursor-not-allowed\" : \"hover:bg-gray-50/10 cursor-pointer\",\n d\n ),\n \"aria-expanded\": s,\n \"aria-controls\": u,\n disabled: a,\n onClick: h,\n onKeyDown: v,\n children: [\n /* @__PURE__ */ c(\"span\", { children: o }),\n /* @__PURE__ */ c(\n \"span\",\n {\n className: w(\n \"transform transition-transform duration-300 ease-linear\",\n s ? \"rotate-180\" : \"rotate-0\"\n ),\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ c(Ae, { size: 18 })\n }\n )\n ]\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n id: u,\n role: \"region\",\n \"aria-labelledby\": b,\n className: w(\n \"transition-all duration-300 ease-linear px-4\",\n s ? \"max-h-96 opacity-100 overflow-auto py-3\" : \"max-h-0 opacity-0 overflow-hidden\",\n f\n ),\n children: s && (n || t)\n }\n )\n ] });\n}\nfunction Rt({\n id: r,\n items: o = [],\n children: t,\n className: n = \"\",\n itemClassName: e = \"\",\n allowMultiple: a = !1,\n defaultOpenItems: s = [],\n triggersClassName: i = \"\",\n bodiesClassName: d = \"\"\n}) {\n const f = P(), m = r || `accordion-group-${f}`, [l, b] = A(new Set(s)), u = (p) => {\n b((y) => {\n const g = new Set(y);\n return g.has(p) ? g.delete(p) : (a || g.clear(), g.add(p)), g;\n });\n }, h = (p) => `${f}-item-${p}`, v = (p) => l.has(p);\n return /* @__PURE__ */ k(\"div\", { id: m, className: n, children: [\n o.length > 0 && o.map((p, y) => {\n const g = p.id || h(y);\n return /* @__PURE__ */ c(\n fe,\n {\n id: g,\n title: p.title,\n content: p.content,\n disabled: p.disabled,\n isOpen: v(g),\n onToggle: () => u(g),\n className: e,\n triggerClassName: i,\n bodyClassName: d\n },\n g\n );\n }),\n o.length === 0 && t && G.Children.map(t, (p, y) => {\n if (G.isValidElement(p) && p.type === fe) {\n const g = p.props.id || h(y);\n return /* @__PURE__ */ Te(\n fe,\n {\n ...p.props,\n key: g,\n id: g,\n className: w(e, p.props.className),\n isOpen: v(g),\n onToggle: () => u(g),\n triggerClassName: w(i, p.props.triggerClassName),\n bodyClassName: w(d, p.props.bodyClassName)\n }\n );\n }\n return null;\n })\n ] });\n}\nfunction Me() {\n const [r, o] = A(0);\n return C(() => {\n const t = setInterval(() => {\n o((n) => (n + 1) % 3);\n }, 500);\n return () => clearInterval(t);\n }, []), /* @__PURE__ */ c(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((t) => /* @__PURE__ */ c(\n \"div\",\n {\n className: w(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n r === t && \"transform -translate-y-1\"\n )\n },\n t\n )) });\n}\nconst Ge = {\n base: \"\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80\",\n tertiary: \"text-primary hover:text-primary-foreground disabled:text-muted\",\n outline: \"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted\",\n link: \"underline-offset-4 hover:underline disabled:underline disabled:text-muted\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground\"\n}, Pe = {\n stripped: \"\",\n fitted: \"size-fit\",\n sm: \"px-2 py-1 text-sm\",\n md: \"px-4 py-2 text-base\",\n lg: \"px-6 py-3 text-lg\",\n icon: \"p-1 w-fit aspect-square\",\n full: \"p-2 w-full\"\n}, Ke = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, me = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction qe({\n variant: r = me.variant,\n size: o,\n rounded: t = me.rounded,\n loading: n,\n linkTo: e,\n linkProps: a,\n type: s = \"button\",\n className: i,\n ...d\n}) {\n let f;\n r === \"link\" && !o ? f = \"fitted\" : f = o || me.size;\n const l = w(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n Ge[r],\n Pe[f],\n Ke[t],\n n && \"relative pointer-events-none\",\n e && \"relative\",\n i\n );\n return /* @__PURE__ */ k(\n \"button\",\n {\n ...d,\n role: e ? \"link\" : d.role,\n \"aria-label\": d[\"aria-label\"] || (a == null ? void 0 : a[\"aria-label\"]),\n \"aria-description\": d[\"aria-description\"] || (a == null ? void 0 : a[\"aria-description\"]),\n \"aria-disabled\": d.disabled || n,\n \"aria-busy\": n,\n type: s,\n className: l,\n children: [\n n && /* @__PURE__ */ c(Me, {}),\n /* @__PURE__ */ c(\"span\", { className: w(n && \"invisible\"), children: d.children }),\n e && !d.disabled && /* @__PURE__ */ c(\n \"a\",\n {\n ...a,\n \"aria-hidden\": !0,\n href: e,\n rel: (a == null ? void 0 : a.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction Ue({\n totalItems: r,\n itemsToShow: o,\n infinite: t,\n autoScroll: n,\n scrollInterval: e,\n pauseScrollOnHover: a,\n currentIndex: s,\n onIndexChange: i\n}) {\n const [d, f] = A(s || 0), [m, l] = A(!1), b = B(null), u = Math.ceil(r / o), h = t || d > 0, v = t || d < u - 1, p = z(\n (x) => {\n const N = Math.max(0, Math.min(x, u - 1));\n f(N), i == null || i(N);\n },\n [u, i]\n ), y = z(() => {\n if (h) {\n const x = d === 0 && t ? u - 1 : d - 1;\n p(x);\n }\n }, [d, h, t, u, p]), g = z(() => {\n if (v) {\n const x = d === u - 1 && t ? 0 : d + 1;\n p(x);\n }\n }, [d, v, t, u, p]);\n return C(() => {\n s !== void 0 && s !== d && f(s);\n }, [s, d]), C(() => {\n if (!n) return;\n const x = () => {\n b.current = setInterval(() => {\n a && m || g();\n }, e);\n }, N = () => {\n b.current && (clearInterval(b.current), b.current = null);\n };\n return !m || !a ? x() : N(), N;\n }, [n, e, a, m, g]), C(() => {\n f(0);\n }, [o]), {\n currentSlide: d,\n canGoPrev: h,\n canGoNext: v,\n goToPrev: y,\n goToNext: g,\n goToSlide: p,\n isHovered: m,\n setIsHovered: l\n };\n}\nconst ee = {\n xs: 0,\n // Smaller than `sm`\n sm: 640,\n // Tailwind's `sm` breakpoint: `@media (min-width: 640px)`\n md: 768,\n // Tailwind's `md` breakpoint: `@media (min-width: 768px)`\n lg: 1024,\n // Tailwind's `lg` breakpoint: `@media (min-width: 1024px)`\n xl: 1280,\n // Tailwind's `xl` breakpoint: `@media (min-width: 1280px)`\n \"2xl\": 1536\n // Tailwind's `2xl` breakpoint: `@media (min-width: 1536px)`\n};\nfunction _e() {\n const [r, o] = A(), [t, n] = A(0), e = (a) => ee[a];\n return C(() => {\n const a = (i) => i >= ee[\"2xl\"] ? \"2xl\" : i >= ee.xl ? \"xl\" : i >= ee.lg ? \"lg\" : i >= ee.md ? \"md\" : i >= ee.sm ? \"sm\" : \"xs\";\n o(a(window.innerWidth)), n(window.innerWidth);\n const s = () => {\n o(a(window.innerWidth)), n(window.innerWidth);\n };\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, []), { screenSize: r, screenWidth: t, getBreakpoint: e };\n}\nconst ae = {\n sm: {\n button: \"h-6 w-6 text-xs\",\n icon: \"size-3\"\n },\n md: {\n button: \"h-8 w-8 text-sm\",\n icon: \"size-4\"\n },\n lg: {\n button: \"h-10 w-10 text-lg\",\n icon: \"size-5\"\n }\n}, ge = {\n default: \"bg-accent text-accent-foreground hover:bg-accent-foreground hover:text-accent\",\n outline: \"border border-border bg-background hover:bg-accent hover:text-accent-foreground hover:border-accent\",\n ghost: \"hover:text-accent\"\n}, oe = {\n aligned: {\n prev: \"absolute top-1/2 -translate-x-1/2 -translate-y-1/2 z-10\",\n next: \"absolute right-0 top-1/2 translate-x-1/2 -translate-y-1/2 z-10\"\n },\n exterior: {\n prev: \"absolute -left-10 top-1/2 -translate-y-1/2 z-10\",\n next: \"absolute -right-10 top-1/2 -translate-y-1/2 z-10\"\n },\n interior: {\n prev: \"absolute left-2 top-1/2 -translate-y-1/2 z-10\",\n next: \"absolute right-2 top-1/2 -translate-y-1/2 z-10\"\n }\n};\nfunction St({\n children: r,\n id: o,\n ref: t,\n className: n,\n autoScroll: e = !1,\n scrollInterval: a = 3e3,\n pauseScrollOnHover: s = !0,\n currentIndex: i,\n onIndexChange: d,\n hidePrevNext: f = !1,\n hideDots: m = !1,\n itemsToShow: l = 1,\n buttonSize: b = \"md\",\n buttonVariant: u = \"default\",\n buttonPosition: h = \"exterior\",\n infinite: v = !0,\n prevButton: p,\n nextButton: y,\n itemsClassName: g,\n containerClassName: x,\n dotsClassName: N,\n gap: E = 8\n}) {\n var W, te;\n const S = B(null), I = G.Children.toArray(r).filter(G.isValidElement), $ = I.length, { screenSize: M } = _e(), L = J(() => {\n if (typeof l == \"number\")\n return l;\n if (typeof l == \"object\" && l && M) {\n const Z = [\"2xl\", \"xl\", \"lg\", \"md\", \"sm\", \"xs\"], F = Z.indexOf(M);\n for (let O = F; O < Z.length; O++) {\n const re = Z[O];\n if (l[re] !== void 0)\n return l[re];\n }\n }\n return 1;\n }, [l, M]), { currentSlide: U, canGoPrev: j, canGoNext: D, goToPrev: R, goToNext: H, goToSlide: K, setIsHovered: _ } = Ue({\n totalItems: $,\n itemsToShow: L,\n infinite: v,\n autoScroll: e,\n scrollInterval: a,\n pauseScrollOnHover: s,\n currentIndex: i,\n onIndexChange: d\n }), Q = z(\n (Z) => {\n if (L === 1)\n return { leftWidth: 0, rightWidth: 0, widthReduction: 0 };\n const F = E * (L - 1) / L;\n return Z % L === 0 ? { leftWidth: 0, rightWidth: E / 2, widthReduction: F } : Z % L === L - 1 ? { leftWidth: E / 2, rightWidth: 0, widthReduction: F } : { leftWidth: E / 2, rightWidth: E / 2, widthReduction: F };\n },\n [L, E]\n ), q = () => {\n R();\n }, Y = () => {\n H();\n }, ce = () => {\n s && _(!0);\n }, de = () => {\n s && _(!1);\n }, ue = -(U * (100 / $) * L), T = w(\n \"inline-flex items-center justify-center rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring focus-visible:ring-ring disabled:pointer-events-none\",\n h === \"aligned\" ? \"disabled:opacity-90\" : \"disabled:opacity-50\"\n );\n return /* @__PURE__ */ k(\"div\", { className: w(\"relative\", n), \"data-carousel-wrapper\": \"true\", children: [\n !f && /* @__PURE__ */ c(ne, { children: p ? G.cloneElement(\n p,\n {\n onClick: q,\n disabled: !j,\n className: w(\n ((W = p.props) == null ? void 0 : W.className) || \"\",\n oe[h].prev\n ),\n role: \"button\",\n \"aria-disabled\": !j,\n \"aria-label\": \"Previous slide\",\n \"data-carousel-prev\": \"true\"\n }\n ) : /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: q,\n disabled: !j,\n className: w(\n T,\n ae[b].button,\n ge[u],\n oe[h].prev\n ),\n \"aria-disabled\": !j,\n \"aria-label\": \"Previous slide\",\n \"data-carousel-prev\": \"true\",\n children: /* @__PURE__ */ c(Ie, { className: ae[b].icon })\n }\n ) }),\n /* @__PURE__ */ k(\n \"div\",\n {\n id: o,\n ref: t,\n className: w(\"relative overflow-hidden\", x),\n onMouseEnter: ce,\n onMouseLeave: de,\n \"data-carousel\": \"true\",\n \"data-current-index\": U,\n \"data-items-to-show\": L,\n \"data-auto-scroll\": e,\n \"data-button-position\": h,\n children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n ref: S,\n className: \"flex transition-transform duration-300 ease-in-out\",\n style: {\n transform: `translateX(${ue}%)`,\n width: `${$ / L * 100}%`\n },\n children: I.map((Z, F) => {\n const { leftWidth: O, rightWidth: re, widthReduction: $e } = Q(F);\n return /* @__PURE__ */ c(\n \"div\",\n {\n className: w(\"flex-shrink-0\", g),\n style: {\n width: `calc(${100 / $}% - ${$e}px)`,\n marginRight: re > 0 ? `${re}px` : void 0,\n marginLeft: O > 0 ? `${O}px` : void 0\n },\n \"data-slide-index\": F,\n children: Z\n },\n F\n );\n })\n }\n ),\n !m && /* @__PURE__ */ c(\"div\", { className: \"absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2\", children: Array.from({ length: Math.ceil($ / L) }).map((Z, F) => /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: () => K(F),\n className: w(\n \"w-2 h-2 rounded-full transition-colors duration-200\",\n F === U ? \"bg-accent\" : \"bg-muted hover:bg-muted-foreground/50\",\n N\n ),\n \"aria-label\": `Go to slide ${F + 1}`,\n \"data-carousel-dot\": F\n },\n F\n )) })\n ]\n }\n ),\n !f && /* @__PURE__ */ c(ne, { children: y ? G.cloneElement(\n y,\n {\n onClick: Y,\n disabled: !D,\n className: w(\n ((te = y.props) == null ? void 0 : te.className) || \"\",\n oe[h].next\n ),\n role: \"button\",\n \"aria-disabled\": !D,\n \"aria-label\": \"Next slide\",\n \"data-carousel-next\": \"true\"\n }\n ) : /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: Y,\n disabled: !D,\n className: w(\n T,\n ae[b].button,\n ge[u],\n oe[h].next\n ),\n \"aria-disabled\": !D,\n \"aria-label\": \"Next slide\",\n \"data-carousel-next\": \"true\",\n children: /* @__PURE__ */ c(ze, { className: ae[b].icon })\n }\n ) })\n ] });\n}\nfunction Xe(r) {\n const [o, t] = A(\"\"), n = z((e) => {\n let a = e, s = \"\";\n for (; a && !s; ) {\n const i = window.getComputedStyle(a).backgroundColor;\n i && i !== \"transparent\" && i !== \"rgba(0, 0, 0, 0)\" && (s = i), a = a.parentElement;\n }\n return s || \"transparent\";\n }, []);\n return C(() => {\n const e = document.getElementById(r);\n if (e) {\n const a = n(e.parentElement);\n t(a);\n }\n }, [r, n]), o;\n}\nfunction Lt({\n ref: r,\n id: o,\n size: t = 20,\n color: n,\n filled: e = !1,\n rounded: a = !0,\n checked: s = !1,\n onCheckedChange: i,\n disabled: d,\n className: f = \"\",\n ...m\n}) {\n const l = P(), b = J(() => o || `checkbox-${l}`, [o, l]), u = Xe(b), [h, v] = A(s);\n C(() => {\n v(s);\n }, [s]);\n const p = () => {\n d || (v(!h), i == null || i(!h));\n }, y = (x) => {\n x.key === \" \" && (x.preventDefault(), p());\n }, g = w(\n \"flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2\",\n a && \"rounded\",\n d && \"opacity-40 cursor-not-allowed\",\n !d && \"cursor-pointer\",\n f\n );\n return /* @__PURE__ */ c(\n \"button\",\n {\n id: b,\n type: \"button\",\n ref: r,\n tabIndex: 0,\n role: \"checkbox\",\n onClick: p,\n \"aria-checked\": h,\n \"aria-disabled\": d,\n onKeyDownCapture: y,\n style: {\n width: t,\n height: t,\n color: n,\n backgroundColor: h && e ? \"currentcolor\" : \"transparent\"\n },\n className: g,\n ...m,\n children: h && /* @__PURE__ */ c(Ce, { size: t, color: e ? u : void 0 })\n }\n );\n}\nfunction Vt({\n children: r,\n className: o,\n linkTo: t,\n linkProps: n,\n onButtonClick: e,\n buttonProps: a,\n ...s\n}) {\n return t && e && console.warn('Clickable: Both \"linkTo\" and \"onButtonClick\" props are provided. Only \"linkTo\" will be used.'), /* @__PURE__ */ k(\"div\", { className: w(\"relative w-fit\", o), ...s, children: [\n r,\n t && /* @__PURE__ */ c(\n \"a\",\n {\n ...n,\n rel: (n == null ? void 0 : n.rel) || \"noreferrer\",\n href: t,\n className: w(\"absolute inset-0\", n == null ? void 0 : n.className)\n }\n ),\n !t && e && /* @__PURE__ */ c(\n \"button\",\n {\n ...a,\n type: \"button\",\n onClick: e,\n className: w(\"absolute inset-0 cursor-pointer\", a == null ? void 0 : a.className)\n }\n )\n ] });\n}\nfunction le({ elementId: r, type: o, message: t }) {\n return C(() => {\n const n = document.getElementById(r);\n if (n) {\n if (!t && o === \"error\") {\n n.removeAttribute(\"data-error\");\n return;\n }\n if (!t && o === \"success\") {\n n.removeAttribute(\"data-success\");\n return;\n }\n return n.setAttribute(\"aria-describedby\", `${r}-${o}-message`), n.setAttribute(\"aria-invalid\", o === \"error\" ? \"true\" : \"false\"), o === \"error\" && n.setAttribute(\"data-error\", \"true\"), o === \"success\" && n.setAttribute(\"data-success\", \"true\"), () => {\n n.removeAttribute(\"aria-describedby\"), n.removeAttribute(\"aria-invalid\"), n.removeAttribute(\"data-error\"), n.removeAttribute(\"data-success\");\n };\n }\n }, [r, o, t]), t ? /* @__PURE__ */ k(\n \"small\",\n {\n className: w(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start\",\n o === \"error\" && \"text-destructive\",\n o === \"success\" && \"text-success\"\n ),\n role: \"status\",\n children: [\n o === \"error\" ? /* @__PURE__ */ c(Fe, {}) : /* @__PURE__ */ c(Se, {}),\n /* @__PURE__ */ c(\"span\", { id: `${r}-${o}-message`, children: t })\n ]\n }\n ) : null;\n}\nconst Qe = {\n base: \"\",\n default: \"ring ring-transparent focus:ring-primary-foreground not-disabled:data-error:ring-destructive not-disabled:data-success:ring-success\",\n underline: \"border-b border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\",\n outline: \"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\"\n}, Ze = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, xe = {\n variant: \"default\",\n rounded: \"none\"\n};\nfunction Wt({\n variant: r = xe.variant,\n rounded: o,\n displayOnlyMode: t = !1,\n errorMessage: n,\n successMessage: e,\n type: a = \"text\",\n className: s,\n ...i\n}) {\n const d = P(), [f, m] = A(!1);\n let l = o;\n r === \"outline\" && !o && (l = \"md\"), l = l || xe.rounded;\n const h = w(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all\",\n \"file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors\",\n !t && Qe[r],\n !t && Ze[l],\n a === \"password\" && \"pr-10\",\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n s\n );\n return /* @__PURE__ */ k(\"div\", { className: w(t && \"cursor-text\"), style: { height: i.height, width: i.width }, children: [\n /* @__PURE__ */ k(\"div\", { className: w(a === \"password\" && \"relative\"), children: [\n /* @__PURE__ */ c(\n \"input\",\n {\n ...i,\n id: d,\n type: a === \"password\" && f ? \"text\" : a,\n \"aria-disabled\": i.disabled,\n readOnly: t,\n \"aria-readonly\": t || i[\"aria-readonly\"],\n \"data-error\": n ? !0 : void 0,\n \"data-success\": e ? !0 : void 0,\n className: h\n }\n ),\n a === \"password\" && /* @__PURE__ */ c(\n \"button\",\n {\n onClick: () => m(!f),\n className: \"absolute inset-y-0 right-0 px-2 hover:cursor-pointer\",\n \"aria-label\": \"Toggle password visibility\",\n \"data-state\": f ? \"visible\" : \"hidden\",\n children: f ? /* @__PURE__ */ c(Le, { size: 20 }) : /* @__PURE__ */ c(Ve, { size: 20 })\n }\n )\n ] }),\n !t && /* @__PURE__ */ c(le, { elementId: d, type: \"error\", message: n }),\n !t && /* @__PURE__ */ c(le, { elementId: d, type: \"success\", message: e })\n ] });\n}\nfunction Bt({\n display: r = \"inline\",\n width: o = \"fit-content\",\n className: t = \"\",\n required: n,\n helpMessage: e,\n suffix: a,\n htmlFor: s,\n children: i,\n description: d,\n ...f\n}) {\n var v, p;\n const m = P(), l = (((v = e == null ? void 0 : e.trim()) == null ? void 0 : v.length) || 0) > 0, b = (((p = d == null ? void 0 : d.trim()) == null ? void 0 : p.length) || 0) > 0, u = l ? `${s ?? m}-help` : void 0, h = b ? `${s ?? m}-description` : void 0;\n return /* @__PURE__ */ k(\n \"div\",\n {\n style: { display: r === \"inline\" ? \"inline-block\" : \"block\", width: o },\n className: w(\"mb-0.5\", t),\n children: [\n /* @__PURE__ */ k(\"div\", { className: \"relative flex\", children: [\n /* @__PURE__ */ k(\"label\", { className: \"font-medium\", htmlFor: s, ...f, children: [\n i,\n n && /* @__PURE__ */ c(\"span\", { className: \"text-red-500 font-medium ml-1\", \"aria-label\": \"required\", children: \"*\" })\n ] }),\n l && /* @__PURE__ */ c(\n \"span\",\n {\n className: \"text-gray-500 ml-1 size-fit -translate-y-1/3\",\n \"aria-describedby\": u,\n \"aria-label\": \"Help information\",\n title: e,\n children: /* @__PURE__ */ c(We, {})\n }\n ),\n l && /* @__PURE__ */ c(\"div\", { id: u, className: \"sr-only\", children: e }),\n a && /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: a })\n ] }),\n b && /* @__PURE__ */ c(\"small\", { id: h, className: \"block opacity-80 mt-0.5\", role: \"note\", children: d })\n ]\n }\n );\n}\nfunction Je(r) {\n const [o, t] = A(!1), [n, e] = A(!1);\n return C(() => {\n r ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 150));\n }, [r]), { show: o, shouldRender: n };\n}\nfunction Ye(r, o) {\n C(() => {\n const t = (n) => {\n n.key === \"Escape\" && r && o();\n };\n return document.addEventListener(\"keydown\", t), r && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", t), document.body.style.overflow = \"auto\";\n };\n }, [r, o]);\n}\nfunction Oe(r, o) {\n const t = B(null), n = z(() => {\n const e = document.getElementById(r);\n if (!e) return;\n const a = e.querySelectorAll('[data-modal-action=\"true\"]');\n if (a.length > 0) {\n a[0].focus();\n return;\n }\n const s = e.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const i = Array.from(s).filter((d) => !(d instanceof HTMLButtonElement && d.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (i.length > 0) {\n i[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n e.focus();\n }, [r]);\n C(() => (o && (t.current = document.activeElement, n()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [o, n]);\n}\nfunction Ht({\n id: r,\n isOpen: o,\n onClose: t,\n title: n,\n children: e,\n contentOnly: a = !1,\n className: s,\n overlayClassName: i,\n hideCloseButton: d = !1,\n actions: f = [],\n disableCloseOnOverlayClick: m = !1,\n ariaLabelledBy: l,\n ariaDescribedBy: b\n}) {\n const u = P(), h = r || `modal-${u}`, v = r ? `${r}-title` : `modal-title-${u}`, { show: p, shouldRender: y } = Je(o);\n if (Oe(h, y), Ye(y, t), !y) return null;\n const g = () => n ? G.isValidElement(n) ? /* @__PURE__ */ c(\"div\", { className: \"mb-4\", children: n }) : /* @__PURE__ */ c(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: v, children: n }) : null, x = () => f.length === 0 ? null : /* @__PURE__ */ c(\"div\", { className: \"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3\", children: f.map((N, E) => {\n const { label: S, className: I, ...$ } = N;\n return /* @__PURE__ */ c(qe, { className: I, type: \"button\", ...$, \"data-modal-action\": \"true\", children: S }, E);\n }) });\n return /* @__PURE__ */ c(ne, { children: pe(\n /* @__PURE__ */ c(\n \"div\",\n {\n \"aria-labelledby\": l ?? n ? v : void 0,\n \"aria-describedby\": b,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ k(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: V(\"fixed inset-0 bg-black/20 transition-all\", i),\n onClick: () => {\n m || t();\n }\n }\n ),\n a && /* @__PURE__ */ c(\"div\", { className: V(\"relative w-fit\", s), children: e }),\n !a && /* @__PURE__ */ k(\n \"div\",\n {\n id: h,\n tabIndex: -1,\n className: V(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75\",\n p ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n s\n ),\n children: [\n !d && /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: t,\n \"data-modal-close-button\": \"true\",\n className: \"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ c(ve, { size: 18 })\n }\n ),\n g(),\n e,\n x()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nconst et = {\n link: \"text-primary hover:text-primary-foreground hover:bg-primary/10 aria-current:text-primary-foreground aria-current:bg-primary\",\n outline: \"border border-primary text-primary hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground aria-current:border-primary\",\n filled: \"bg-secondary text-secondary-foreground hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground\"\n}, tt = {\n sm: \"px-2 py-1 text-sm min-w-[32px] min-h-8\",\n md: \"px-2 py-1 text-base min-w-[40px] min-h-10\"\n};\nfunction jt({\n page: r,\n pageCount: o = 5,\n maxVisiblePages: t = 5,\n showFirstLast: n = !0,\n onPageChange: e,\n size: a = \"md\",\n variant: s = \"link\",\n className: i,\n ref: d,\n buttonsClassName: f,\n ...m\n}) {\n const l = o === 1 / 0, u = z(() => {\n if (l) return [];\n const N = o, E = Math.min(t, N);\n if (N <= E)\n return Array.from({ length: N }, (M, L) => L + 1);\n const S = Math.floor(E / 2);\n let I = Math.max(1, r - S), $ = Math.min(N, I + E - 1);\n return $ - I + 1 < E && (I = Math.max(1, $ - E + 1), $ = Math.min(N, I + E - 1)), Array.from({ length: $ - I + 1 }, (M, L) => I + L);\n }, [l, t, r, o])(), h = r > 1, v = l || r < o, p = n && !l, y = n && !l, g = (N) => {\n N >= 1 && (l || N <= o) && e(N);\n }, x = z(() => {\n const N = V(\n \"flex items-center justify-center min-w-fit\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n tt[a],\n \"rounded-md\"\n );\n return V(N, et[s], f);\n }, [s, a, f]);\n return /* @__PURE__ */ k(\n \"nav\",\n {\n ref: d,\n className: V(\"flex items-center justify-center gap-1\", i),\n role: \"navigation\",\n \"aria-label\": \"Pagination\",\n \"data-page\": r,\n \"data-page-count\": l ? \"infinite\" : o,\n ...m,\n children: [\n p && /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(1),\n className: x(),\n disabled: r === 1,\n \"aria-label\": \"Go to first page\",\n children: [\n /* @__PURE__ */ c(Be, { size: a === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: \"First\" })\n ]\n }\n ),\n /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(r - 1),\n className: x(),\n disabled: !h,\n \"aria-label\": \"Go to previous page\",\n children: [\n /* @__PURE__ */ c(Ie, { size: a === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: \"Previous\" })\n ]\n }\n ),\n !l && u.map((N) => /* @__PURE__ */ c(\n \"button\",\n {\n onClick: () => g(N),\n className: V(x(), \"aspect-square\"),\n \"aria-label\": `Go to page ${N}`,\n \"aria-current\": N === r ? !0 : void 0,\n children: N\n },\n N\n )),\n /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(r + 1),\n className: x(),\n disabled: !v,\n \"aria-label\": \"Go to next page\",\n children: [\n /* @__PURE__ */ c(\"span\", { className: \"mr-1\", children: \"Next\" }),\n /* @__PURE__ */ c(ze, { size: a === \"sm\" ? 12 : 15 })\n ]\n }\n ),\n y && /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(o),\n className: x(),\n disabled: r === o,\n \"aria-label\": \"Go to last page\",\n children: [\n /* @__PURE__ */ c(\"span\", { className: \"mr-1\", children: \"Last\" }),\n /* @__PURE__ */ c(He, { size: a === \"sm\" ? 12 : 15 })\n ]\n }\n )\n ]\n }\n );\n}\nfunction rt(r) {\n const [o, t] = A(!1), [n, e] = A(!1);\n return C(() => {\n r ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 300));\n }, [r]), { show: o, shouldRender: n };\n}\nfunction nt(r, o) {\n C(() => {\n const t = (n) => {\n n.key === \"Escape\" && r && o();\n };\n return document.addEventListener(\"keydown\", t), r && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", t), document.body.style.overflow = \"auto\";\n };\n }, [r, o]);\n}\nfunction at(r, o) {\n const t = B(null), n = z(() => {\n const e = document.getElementById(r);\n if (!e) return;\n const a = e.querySelectorAll('[data-panel-action=\"true\"]');\n if (a.length > 0) {\n a[0].focus();\n return;\n }\n const s = e.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const i = Array.from(s).filter((d) => !(d instanceof HTMLButtonElement && d.getAttribute(\"data-panel-close-button\") === \"true\"));\n if (i.length > 0) {\n i[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n e.focus();\n }, [r]);\n C(() => (o && (t.current = document.activeElement, n()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [o, n]);\n}\nconst ot = {\n size: {\n sm: \"max-w-sm\",\n md: \"max-w-md\",\n lg: \"max-w-lg\",\n xl: \"max-w-xl\",\n \"2xl\": \"max-w-2xl\",\n full: \"w-full\",\n screen: \"w-screen\"\n }\n};\nfunction Ft({\n ref: r,\n id: o,\n isOpen: t,\n onClose: n,\n title: e,\n children: a,\n footer: s,\n size: i = \"md\",\n className: d,\n overlayClassName: f,\n hideCloseButton: m = !1,\n disableCloseOnOverlayClick: l = !1,\n ariaLabelledBy: b,\n ariaDescribedBy: u\n}) {\n const h = P(), v = o || `panel-${h}`, p = o ? `${o}-title` : `panel-title-${h}`, { show: y, shouldRender: g } = rt(t);\n if (at(v, g), nt(g, n), !g) return null;\n const x = () => e ? G.isValidElement(e) ? /* @__PURE__ */ c(\"div\", { children: e }) : /* @__PURE__ */ c(\"h2\", { className: \"text-2xl font-semibold\", id: p, children: e }) : null, N = () => {\n if (!s) return null;\n if (G.isValidElement(s)) {\n const E = s, S = E.props.className || \"\";\n return G.cloneElement(E, { className: V(\"px-6 py-4\", S) });\n }\n return /* @__PURE__ */ c(\"div\", { className: \"px-6 py-4\", children: s });\n };\n return /* @__PURE__ */ c(ne, { children: pe(\n /* @__PURE__ */ k(\n \"div\",\n {\n \"aria-labelledby\": b ?? e ? p : void 0,\n \"aria-describedby\": u,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-hidden\",\n \"data-panel-open\": t,\n children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: V(\n \"fixed inset-0 bg-black/40 transition-opacity duration-300\",\n y ? \"opacity-100\" : \"opacity-0\",\n f\n ),\n onClick: () => {\n l || n();\n }\n }\n ),\n /* @__PURE__ */ c(\"div\", { className: \"fixed inset-y-0 right-0 flex max-w-full\", children: /* @__PURE__ */ c(\n \"div\",\n {\n id: v,\n ref: r,\n tabIndex: -1,\n className: V(\n \"relative h-full transform shadow-xl bg-popover transition-transform duration-300 ease-in-out\",\n i !== \"screen\" && \"border-l border-border\",\n ot.size[i],\n y ? \"translate-x-0\" : \"translate-x-full\",\n d\n ),\n \"data-panel-size\": i,\n children: /* @__PURE__ */ k(\"div\", { className: \"flex h-full flex-col\", children: [\n e && /* @__PURE__ */ c(\"div\", { className: \"px-6 pt-6\", children: x() }),\n !m && /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: n,\n \"data-panel-close-button\": \"true\",\n \"aria-label\": \"Close panel\",\n className: \"rounded-md p-0.5 top-3 right-3 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ c(ve, { size: 18 })\n }\n ),\n /* @__PURE__ */ c(\"div\", { className: V(\"flex-1 overflow-y-auto px-6 pb-6\", e ? \"pt-6\" : \"pt-10\"), children: a }),\n N()\n ] })\n }\n ) })\n ]\n }\n ),\n document.body\n ) });\n}\nfunction st({ itemId: r, checked: o, onChange: t, name: n, disabled: e = !1, className: a = \"\" }) {\n const s = \"relative inline-flex items-center justify-center rounded-full\", i = () => {\n e || t();\n }, d = w(\n s,\n !o && \"hover:border-current/60\",\n !e && \"border-current cursor-pointer\",\n e && \"border-muted/60 cursor-not-allowed\",\n a\n );\n return /* @__PURE__ */ c(\n \"div\",\n {\n id: r,\n role: \"radio\",\n tabIndex: -1,\n \"aria-checked\": o,\n \"aria-disabled\": e,\n \"aria-description\": `Radio button for ${n}`,\n \"aria-labelledby\": `${r}-label`,\n onClick: i,\n className: d,\n style: {\n width: \"1em\",\n height: \"1em\",\n padding: \"0.1em\",\n borderWidth: \"0.06em\"\n },\n children: o && /* @__PURE__ */ c(\n \"div\",\n {\n className: w(\"size-full aspect-square rounded-full\", e && \"bg-muted/60\", !e && \"bg-current\")\n }\n )\n }\n );\n}\nfunction be({\n value: r,\n children: o,\n className: t = \"\",\n isSelected: n = !1,\n onChange: e,\n disabled: a = !1,\n hideInput: s = !1,\n description: i,\n name: d\n}) {\n const m = `radio-${P()}-${r}`, l = () => {\n a || e == null || e(r);\n };\n return /* @__PURE__ */ k(\n \"div\",\n {\n title: i,\n className: w(\n \"relative flex items-center\",\n t,\n // Uses text color for borders\n s && `p-2 border-2 focus-within:border-dashed focus-within:${a ? \"border-current/50\" : \"border-current/80\"}`,\n s && !n && `border-transparent ${a ? \"\" : \"not-focus-within:hover:border-border/60\"}`,\n s && n && \"border-border\",\n a && \"opacity-60 cursor-not-allowed\"\n ),\n style: {\n gap: \"0.5em\"\n },\n children: [\n !s && /* @__PURE__ */ c(\n st,\n {\n itemId: m,\n name: d || \"\",\n checked: n,\n onChange: l,\n disabled: a,\n className: w(s && \"\")\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n id: s ? m : void 0,\n tabIndex: s ? -1 : void 0,\n role: s ? \"radio\" : void 0,\n onClick: s ? l : void 0,\n \"aria-checked\": s ? n ? \"true\" : \"false\" : void 0,\n \"aria-disabled\": s ? a : void 0,\n \"aria-description\": s ? i || `Radio button for ${d}` : void 0,\n \"aria-labelledby\": s ? `${m}-label` : void 0,\n className: w(s && \"size-full\", typeof o == \"object\" && \"grow focus:outline-none\"),\n children: /* @__PURE__ */ c(\n \"label\",\n {\n id: `${m}-label`,\n onClick: s ? void 0 : l,\n className: w(a && \"cursor-not-allowed\", !a && \"cursor-pointer\"),\n children: o\n }\n )\n }\n )\n ]\n }\n );\n}\nfunction it(r, o) {\n const [t, n] = A(o), [e, a] = A(-1), [s, i] = A(!1), d = z((u, h) => {\n var y;\n const v = u[h];\n v.hasAttribute(\"disabled\") || v.getAttribute(\"aria-disabled\") === \"true\" || ((y = u[h]) == null || y.click(), a(h));\n }, []), f = z(\n (u, h) => {\n var p;\n if (u.preventDefault(), s || !h.length) return;\n const v = o !== -1 ? o : 0;\n (p = h[v]) == null || p.focus(), n(v), o !== -1 && d(h, v);\n },\n [o, s, d]\n ), m = z(\n (u) => {\n var y;\n if (!u.shiftKey)\n return;\n u.preventDefault();\n const h = Array.from(\n document.querySelectorAll(\n 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])'\n )\n ).filter((g) => !g.hasAttribute(\"disabled\") && g.tabIndex >= 0), v = h.findIndex((g) => g.id === r), p = v > 0 ? v - 1 : h.length - 1;\n (y = h[p]) == null || y.focus();\n },\n [r]\n ), l = z(\n (u, h) => {\n var x;\n if (!h.length) return;\n const v = u.target;\n if (!h.some((N) => N.id === v.id)) return;\n const y = t !== -1 ? t : 0;\n let g = y;\n switch (u.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n u.preventDefault(), g = y > 0 ? y - 1 : h.length - 1;\n break;\n case \"ArrowDown\":\n case \"ArrowRight\":\n u.preventDefault(), g = (y + 1) % h.length;\n break;\n // Select the option when the space key is pressed\n case \" \":\n u.preventDefault(), d(h, y);\n return;\n case \"Tab\":\n m(u);\n return;\n default:\n return;\n }\n (x = h[g]) == null || x.focus(), n(g), e !== -1 && d(h, g);\n },\n [t, e, m, d]\n ), b = z(() => {\n const u = document.querySelector(`[id=\"${r}\"][role=\"radiogroup\"]`);\n return u ? Array.from(u.querySelectorAll('[role=\"radio\"]')) : [];\n }, [r]);\n C(() => {\n const u = document.querySelector(`[id=\"${r}\"][role=\"radiogroup\"]`);\n if (!u) return;\n const h = b(), v = (x) => f(x, h), p = (x) => l(x, h), y = () => i(!0), g = () => i(!1);\n return document.addEventListener(\"keydown\", p), u.addEventListener(\"focus\", v), u.addEventListener(\"mousedown\", y), document.addEventListener(\"mouseup\", g), () => {\n document.removeEventListener(\"keydown\", p), u.removeEventListener(\"focus\", v), u.removeEventListener(\"mousedown\", y), document.removeEventListener(\"mouseup\", g);\n };\n }, [r, b, f, l]);\n}\nfunction Mt({\n options: r = [],\n value: o,\n onChange: t,\n id: n,\n children: e,\n className: a = \"\",\n childrenClassName: s = \"\",\n hideInputs: i = !1\n}) {\n const d = P(), f = n || `radio-group-${d}`;\n it(\n f,\n r.findIndex((l) => l === o)\n );\n const m = J(() => r.reduce((l, b) => (typeof b == \"string\" ? l.some((u) => u.value === b) || l.push({ label: b, value: b }) : l.push(b), l), []), [r]);\n return /* @__PURE__ */ k(\"div\", { id: f, role: \"radiogroup\", tabIndex: 0, className: w(a, \"focus:outline-none\"), children: [\n m.length > 0 && m.map((l, b) => /* @__PURE__ */ c(\n be,\n {\n value: l.value,\n isSelected: o === l.value,\n onChange: t,\n name: f,\n disabled: l.disabled,\n description: l.description,\n hideInput: i,\n className: s,\n children: l.label\n },\n `${l.value}-${b}`\n )),\n m.length === 0 && e && G.Children.map(e, (l) => G.isValidElement(l) && l.type === be ? /* @__PURE__ */ c(\n be,\n {\n ...l.props,\n className: w(s, l.props.className),\n hideInput: l.props.hideInput || i,\n isSelected: o === l.props.value,\n onChange: t,\n name: f,\n children: l.props.children\n }\n ) : null)\n ] });\n}\nfunction lt(r) {\n const o = B(null), t = B(null), n = B(null), [e, a] = A(!1), [s, i] = A(!1), [d, f] = A({\n vertical: !1,\n horizontal: !1\n }), m = B(null), l = B(null), b = z(() => {\n const v = o.current;\n if (!v) return;\n const p = v.scrollHeight > v.clientHeight, y = v.scrollWidth > v.clientWidth;\n f({\n vertical: p,\n horizontal: y\n });\n }, []), u = z(() => {\n const v = o.current, p = t.current, y = n.current;\n if (v) {\n if (p && d.vertical) {\n const x = (d.horizontal ? v.clientHeight - r : v.clientHeight) / v.scrollHeight, N = Math.max(x * 100, 10), E = v.scrollHeight - v.clientHeight, S = E > 0 ? v.scrollTop / E : 0, I = 100 - N, $ = S * I;\n p.style.height = `${N}%`, p.style.top = `${$}%`, p.style.transform = \"none\";\n }\n if (y && d.horizontal) {\n const x = (d.vertical ? v.clientWidth - r : v.clientWidth) / v.scrollWidth, N = Math.max(x * 100, 10), E = v.scrollWidth - v.clientWidth, S = E > 0 ? v.scrollLeft / E : 0, I = 100 - N, $ = S * I;\n y.style.width = `${N}%`, y.style.left = `${$}%`, y.style.transform = \"none\";\n }\n }\n }, [d, r]), h = z(() => {\n m.current && clearTimeout(m.current), l.current && clearTimeout(l.current), a(!0), i(!1), u(), m.current = setTimeout(() => {\n i(!0), l.current = setTimeout(() => {\n a(!1), i(!1);\n }, 300);\n }, 1e3);\n }, [u]);\n return C(() => {\n const v = o.current;\n if (!v) return;\n b();\n const p = new ResizeObserver(b);\n p.observe(v);\n const y = new MutationObserver(b);\n return y.observe(v, {\n childList: !0,\n subtree: !0,\n attributes: !0\n }), () => {\n p.disconnect(), y.disconnect();\n };\n }, [b]), C(() => {\n u();\n }, [d, u]), C(() => () => {\n m.current && clearTimeout(m.current), l.current && clearTimeout(l.current);\n }, []), {\n viewportRef: o,\n verticalThumbRef: t,\n horizontalThumbRef: n,\n isScrolling: e,\n isFadingOut: s,\n scrollbarVisible: d,\n handleScroll: h\n };\n}\nfunction Gt({\n className: r,\n thumbClassName: o,\n viewportClassName: t,\n scrollbarClassName: n,\n scrollbarThickness: e = 10,\n children: a,\n id: s,\n ref: i,\n ...d\n}) {\n const { viewportRef: f, verticalThumbRef: m, horizontalThumbRef: l, isScrolling: b, isFadingOut: u, scrollbarVisible: h, handleScroll: v } = lt(e), p = V(\n \"relative flex-1 rounded-full bg-slate-400/60 hover:bg-slate-400/80 active:bg-slate-400\",\n o\n );\n return /* @__PURE__ */ k(\"div\", { ref: i, id: s, className: V(\"relative overflow-hidden\", r), \"data-scroll-area-root\": \"\", ...d, children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n ref: f,\n className: V(\n \"h-full w-full overflow-auto rounded-[inherit] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden\",\n t\n ),\n onScroll: v,\n \"data-scroll-area-viewport\": \"\",\n children: a\n }\n ),\n h.vertical && (b || u) && /* @__PURE__ */ c(\n \"div\",\n {\n className: V(\n \"touch-none select-none transition-all duration-300\",\n \"p-[1px]\",\n \"absolute right-0 top-0\",\n u ? \"opacity-0\" : \"opacity-100\",\n n\n ),\n \"data-scroll-area-scrollbar\": \"vertical\",\n \"data-state\": b ? \"visible\" : \"hidden\",\n style: {\n width: `${e}px`,\n height: h.horizontal ? `calc(100% - ${e}px)` : \"100%\"\n },\n children: /* @__PURE__ */ c(\n \"div\",\n {\n ref: m,\n className: V(\"absolute rounded-full\", p),\n \"data-scroll-area-thumb\": \"\",\n style: { height: \"20%\", top: \"0%\", width: \"100%\" }\n }\n )\n }\n ),\n h.horizontal && (b || u) && /* @__PURE__ */ c(\n \"div\",\n {\n className: V(\n \"touch-none select-none transition-all duration-300\",\n \"p-[1px]\",\n \"absolute bottom-0 left-0\",\n u ? \"opacity-0\" : \"opacity-100\",\n n\n ),\n \"data-scroll-area-scrollbar\": \"horizontal\",\n \"data-state\": b ? \"visible\" : \"hidden\",\n style: {\n height: `${e}px`,\n width: h.vertical ? `calc(100% - ${e}px)` : \"100%\"\n },\n children: /* @__PURE__ */ c(\n \"div\",\n {\n ref: l,\n className: V(\"absolute rounded-full\", p),\n \"data-scroll-area-thumb\": \"\",\n style: { width: \"20%\", left: \"0%\", height: \"100%\" }\n }\n )\n }\n ),\n h.vertical && h.horizontal && /* @__PURE__ */ c(\n \"div\",\n {\n className: V(\"bg-transparent\", \"absolute bottom-0 right-0\"),\n \"data-scroll-area-corner\": \"\",\n style: {\n height: `${e}px`,\n width: `${e}px`\n }\n }\n )\n ] });\n}\nfunction ct(r) {\n const [o, t] = A(!1), [n, e] = A(!1);\n return C(() => {\n r ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 150));\n }, [r]), { show: o, shouldRender: n };\n}\nfunction dt({\n isOpen: r,\n setIsOpen: o,\n filteredOptions: t,\n highlightedIndex: n,\n setHighlightedIndex: e,\n onSelect: a,\n triggerRef: s\n}) {\n return { handleKeyDown: z(\n (d) => {\n var f;\n switch (d.key) {\n case \"ArrowDown\":\n if (d.preventDefault(), !r)\n o(!0);\n else {\n const m = n < t.length - 1 ? n + 1 : 0;\n let l = m;\n for (let b = 0; b < t.length; b++) {\n const u = (m + b) % t.length;\n if (!t[u].disabled) {\n l = u;\n break;\n }\n }\n e(l);\n }\n break;\n case \"ArrowUp\":\n if (d.preventDefault(), !r)\n o(!0);\n else {\n const m = n > 0 ? n - 1 : t.length - 1;\n let l = m;\n for (let b = 0; b < t.length; b++) {\n const u = (m - b + t.length) % t.length;\n if (!t[u].disabled) {\n l = u;\n break;\n }\n }\n e(l);\n }\n break;\n case \"Enter\":\n case \" \":\n if (d.preventDefault(), !r)\n o(!0);\n else if (n >= 0 && n < t.length) {\n const m = t[n];\n m.disabled || a(m);\n }\n break;\n case \"Escape\":\n d.preventDefault(), r && (o(!1), (f = s.current) == null || f.focus());\n break;\n case \"Tab\":\n r && o(!1);\n break;\n }\n },\n [r, o, t, n, e, a, s]\n ) };\n}\nfunction ut({\n isOpen: r,\n filteredOptions: o,\n selectedOption: t,\n shouldRender: n,\n optionsContainerRef: e\n}) {\n const [a, s] = A(-1), i = J(() => t ? o.findIndex((d) => d.value === t.value) : -1, [o, t]);\n return C(() => {\n r && o.length > 0 ? s(t && i >= 0 ? i : 0) : s(-1);\n }, [o, r, t, i]), C(() => {\n if (a >= 0 && e.current && n) {\n const d = () => {\n const f = e.current, m = f == null ? void 0 : f.querySelector(`[data-option-index=\"${a}\"]`);\n if (m) {\n const l = r && t && a === i ? \"auto\" : \"smooth\";\n m.scrollIntoView({\n behavior: l,\n block: \"nearest\"\n });\n }\n };\n r && n && t ? setTimeout(d, 10) : d();\n }\n }, [a, n, r, t, o, e, i]), { highlightedIndex: a, setHighlightedIndex: s };\n}\nconst ye = {\n sm: {\n trigger: \"px-2 py-1 text-sm\",\n options: \"px-2 py-2 text-xs\"\n },\n md: {\n trigger: \"px-3 py-2 text-base\",\n options: \"px-3 py-2.5 text-sm\"\n },\n lg: {\n trigger: \"px-4 py-3 text-lg\",\n options: \"px-4 py-3 text-base\"\n }\n};\nfunction Pt({\n options: r,\n value: o,\n placeholder: t = \"Select an option...\",\n searchable: n = !1,\n disabled: e = !1,\n clearable: a = !1,\n size: s = \"md\",\n className: i,\n triggerClassName: d,\n dropdownClassName: f,\n id: m,\n ref: l,\n onChange: b,\n onSearch: u,\n searchPlaceholder: h = \"Search options...\"\n}) {\n const v = P(), y = `${m ?? v}-listbox`, g = (T) => `${y}-option-${T}`, [x, N] = A(!1), [E, S] = A(\"\"), I = B(null), $ = B(null), M = B(null), L = B(null), { show: U, shouldRender: j } = ct(x), D = J(() => !n || !E ? r : r.filter(\n (T) => {\n var W;\n return T.text.toLowerCase().includes(E.toLowerCase()) || ((W = T.description) == null ? void 0 : W.toLowerCase().includes(E.toLowerCase()));\n }\n ), [r, n, E]), R = J(() => r.find((T) => T.value === o), [r, o]), { highlightedIndex: H, setHighlightedIndex: K } = ut({\n isOpen: x,\n filteredOptions: D,\n selectedOption: R,\n shouldRender: j,\n optionsContainerRef: L\n }), _ = H >= 0 ? g(H) : void 0;\n C(() => {\n x && j && n && $.current && $.current.focus();\n }, [x, n, j]);\n const Q = z(\n (T) => {\n var W;\n T.disabled || (b == null || b(T.value), N(!1), S(\"\"), (W = I.current) == null || W.focus());\n },\n [b]\n ), { handleKeyDown: q } = dt({\n isOpen: x,\n setIsOpen: N,\n filteredOptions: D,\n highlightedIndex: H,\n setHighlightedIndex: K,\n onSelect: Q,\n triggerRef: I\n });\n C(() => {\n if (!x)\n return;\n const T = (W) => {\n var te;\n M.current && !M.current.contains(W.target) && !((te = I.current) != null && te.contains(W.target)) && (N(!1), S(\"\"));\n };\n return document.addEventListener(\"mousedown\", T), () => document.removeEventListener(\"mousedown\", T);\n }, [x]);\n const Y = () => {\n e || (N(!x), x || (S(\"\"), K(-1)));\n }, ce = (T) => {\n T.disabled || (b == null || b(T.value), N(!1), S(\"\"));\n }, de = (T) => {\n const W = T.target.value;\n S(W), u == null || u(W), K(-1);\n }, ue = (T) => {\n T.preventDefault(), T.stopPropagation(), b == null || b(\"\");\n };\n return /* @__PURE__ */ k(\n \"div\",\n {\n className: w(\"relative\", i),\n id: m,\n ref: l,\n \"data-select\": \"true\",\n \"data-value\": o,\n \"data-searchable\": n,\n \"data-disabled\": e,\n \"data-clearable\": a,\n children: [\n /* @__PURE__ */ k(\"div\", { className: \"relative\", children: [\n /* @__PURE__ */ k(\n \"button\",\n {\n ref: I,\n type: \"button\",\n className: w(\n \"flex items-center justify-between w-full text-left bg-inherit border border-border rounded-md transition-colors\",\n \"hover:border-primary focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary\",\n e && \"opacity-50 cursor-not-allowed hover:border-border\",\n x && \"border-primary ring-1 ring-primary\",\n ye[s].trigger,\n d\n ),\n onClick: Y,\n onKeyDown: q,\n disabled: e,\n \"aria-disabled\": e,\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": x,\n \"aria-controls\": x ? y : void 0,\n \"aria-activedescendant\": x && !n ? _ : void 0,\n \"aria-label\": R ? R.text : t,\n \"data-select-trigger\": \"true\",\n children: [\n /* @__PURE__ */ c(\"span\", { className: w(\"block truncate\", !R && \"opacity-70\"), children: R ? R.text : t }),\n /* @__PURE__ */ c(\"div\", { className: \"flex items-center ml-2\", children: /* @__PURE__ */ c(Ae, { size: 16, className: w(\"transition-transform duration-200\", x && \"rotate-180\") }) })\n ]\n }\n ),\n a && R && /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: ue,\n className: \"absolute right-8 top-1/2 -translate-y-1/2 p-0.5 rounded hover:bg-accent/20 transition-colors group z-10\",\n \"aria-label\": \"Clear selection\",\n \"data-select-clear\": \"true\",\n children: /* @__PURE__ */ c(ve, { size: 14, className: \"opacity-70 group-hover:opacity-100 transition-opacity\" })\n }\n )\n ] }),\n j && /* @__PURE__ */ k(\n \"div\",\n {\n ref: M,\n className: w(\n \"absolute z-50 w-full mt-1 bg-popover border border-border rounded-md shadow-lg transition-all duration-150\",\n U ? \"opacity-100 translate-y-0\" : \"opacity-0 -translate-y-2\",\n f\n ),\n id: y,\n role: \"listbox\",\n \"data-select-content\": \"true\",\n children: [\n n && /* @__PURE__ */ c(\"div\", { className: \"border-b border-border\", children: /* @__PURE__ */ c(\n \"input\",\n {\n ref: $,\n type: \"text\",\n value: E,\n onChange: de,\n onKeyDown: q,\n placeholder: h,\n className: \"w-full px-2 py-2 text-inherit focus:outline-none\",\n \"aria-autocomplete\": \"list\",\n \"aria-controls\": y,\n \"aria-activedescendant\": _,\n \"data-select-search\": \"true\"\n }\n ) }),\n /* @__PURE__ */ c(\"div\", { ref: L, className: \"max-h-60 overflow-auto\", children: D.length > 0 ? D.map((T, W) => /* @__PURE__ */ k(\n \"div\",\n {\n id: g(W),\n className: w(\n \"flex items-center cursor-pointer transition-colors\",\n \"hover:bg-accent/10 focus:bg-accent/10\",\n ye[s].options,\n T.disabled && \"opacity-50 cursor-not-allowed\",\n W === H && \"bg-accent/20\",\n o === T.value && \"bg-accent/30\"\n ),\n onClick: () => ce(T),\n role: \"option\",\n \"aria-selected\": o === T.value,\n \"aria-disabled\": T.disabled,\n \"data-select-option\": \"true\",\n \"data-value\": T.value,\n \"data-highlighted\": W === H,\n \"data-option-index\": W,\n children: [\n /* @__PURE__ */ k(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ c(\"div\", { className: \"font-medium\", children: T.text }),\n T.description && /* @__PURE__ */ c(\"div\", { className: \"text-xs opacity-70 mt-0.5\", children: T.description })\n ] }),\n o === T.value && /* @__PURE__ */ c(Ce, { size: 16, className: \"ml-2 text-primary flex-shrink-0\" })\n ]\n },\n T.value\n )) : /* @__PURE__ */ c(\"div\", { className: \"px-3 py-2 text-sm opacity-70 text-center\", children: n && E ? \"No results found\" : \"No options available\" }) })\n ]\n }\n )\n ]\n }\n );\n}\nconst ft = {\n thin: {\n horizontal: \"h-px\",\n vertical: \"w-px\"\n },\n medium: {\n horizontal: \"h-0.5\",\n vertical: \"w-0.5\"\n },\n thick: {\n horizontal: \"h-1\",\n vertical: \"w-1\"\n },\n \"extra-thick\": {\n horizontal: \"h-2\",\n vertical: \"w-2\"\n }\n}, mt = {\n horizontal: \"w-full\",\n vertical: \"min-h-4 h-full\"\n};\nfunction Kt({\n orientation: r = \"horizontal\",\n decorative: o = !1,\n thickness: t = \"thin\",\n className: n,\n ...e\n}) {\n const a = w(\n \"shrink-0 bg-border\",\n mt[r],\n ft[t][r],\n n\n );\n return /* @__PURE__ */ c(\n \"div\",\n {\n ...e,\n className: a,\n role: o ? \"presentation\" : \"separator\",\n \"aria-orientation\": o ? void 0 : r,\n \"aria-hidden\": o,\n \"data-orientation\": r,\n \"data-thickness\": t\n }\n );\n}\nconst we = {\n shape: {\n rectangle: \"rounded-md min-h-1\",\n circle: \"rounded-full aspect-square min-h-1\",\n text: \"rounded-sm min-h-1 h-4\"\n },\n lineSpacing: {\n xs: \"space-y-1\",\n sm: \"space-y-2\",\n md: \"space-y-3\",\n lg: \"space-y-4\",\n xl: \"space-y-6\"\n }\n};\nfunction qt({\n shape: r = \"rectangle\",\n lineSpacing: o = \"sm\",\n className: t,\n lines: n = 1,\n animate: e = !0,\n ref: a,\n ...s\n}) {\n const i = w(\"bg-muted/70\", e && \"animate-pulse\", we.shape[r], t);\n return n > 1 ? /* @__PURE__ */ c(\n \"div\",\n {\n ref: a,\n className: we.lineSpacing[o],\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-container\",\n \"data-lines\": n,\n \"data-shape\": r,\n \"data-animate\": e,\n ...s,\n children: Array.from({ length: n }, (d, f) => /* @__PURE__ */ c(\n \"div\",\n {\n className: w(\n i,\n // Make last line shorter for a more natural text appearance\n f === n - 1 && \"w-3/4\"\n ),\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-line\",\n \"data-line-index\": f\n },\n f\n ))\n }\n ) : /* @__PURE__ */ c(\n \"div\",\n {\n ref: a,\n className: i,\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton\",\n \"data-shape\": r,\n \"data-animate\": e,\n ...s\n }\n );\n}\nfunction Ut({\n id: r,\n value: o,\n defaultValue: t = 0,\n onValueChange: n,\n min: e = 0,\n max: a = 100,\n step: s = 1,\n disabled: i = !1,\n trackClassName: d,\n rangeClassName: f,\n thumbClassName: m,\n className: l,\n ref: b,\n ariaLabel: u,\n ariaLabelledBy: h,\n ...v\n}) {\n const [p, y] = A(t), g = o !== void 0, x = g ? o : p, N = B(null), E = B(!1), S = B(0), I = z(\n (D) => {\n const R = Math.max(e, Math.min(a, D)), H = Math.round(R / s) * s;\n g || y(H), n == null || n(H);\n },\n [e, a, s, g, n]\n ), $ = z(\n (D, R = !1) => {\n var Q;\n const H = (Q = N.current) == null ? void 0 : Q.getBoundingClientRect();\n if (!H) return x;\n let K = D.clientX;\n R && (K = K - S.current);\n const _ = Math.max(0, Math.min(1, (K - H.left) / H.width));\n return e + (a - e) * _;\n },\n [e, a, x]\n ), M = z(\n (D) => {\n if (i || D.target !== D.currentTarget) return;\n const R = $(D);\n I(R);\n },\n [i, $, I]\n ), L = z(\n (D) => {\n var Q;\n if (i) return;\n D.stopPropagation(), E.current = !0;\n const R = (Q = N.current) == null ? void 0 : Q.getBoundingClientRect(), H = D.currentTarget.getBoundingClientRect();\n if (R && H) {\n const q = H.left + H.width / 2;\n S.current = D.clientX - q;\n }\n D.currentTarget.setPointerCapture(D.pointerId);\n const K = (q) => {\n if (!E.current) return;\n const Y = $(q, !0);\n I(Y);\n }, _ = (q) => {\n if (q.pointerId === D.pointerId) {\n E.current = !1, S.current = 0;\n try {\n D.currentTarget.releasePointerCapture(q.pointerId);\n } catch {\n }\n document.removeEventListener(\"pointermove\", K), document.removeEventListener(\"pointerup\", _);\n }\n };\n document.addEventListener(\"pointermove\", K), document.addEventListener(\"pointerup\", _);\n },\n [i, $, I]\n ), U = z(\n (D) => {\n if (i) return;\n let R = x;\n switch (D.key) {\n case \"ArrowRight\":\n case \"ArrowUp\":\n R = x + s;\n break;\n case \"ArrowLeft\":\n case \"ArrowDown\":\n R = x - s;\n break;\n case \"Home\":\n R = e;\n break;\n case \"End\":\n R = a;\n break;\n case \"PageUp\":\n R = x + s * 10;\n break;\n case \"PageDown\":\n R = x - s * 10;\n break;\n default:\n return;\n }\n D.preventDefault(), I(R);\n },\n [i, x, s, e, a, I]\n ), j = a === e ? 0 : (x - e) / (a - e) * 100;\n return /* @__PURE__ */ c(\n \"div\",\n {\n id: r,\n ref: b,\n className: V(\n \"relative flex items-center w-full touch-none select-none\",\n i && \"opacity-50 cursor-not-allowed\",\n l\n ),\n \"data-disabled\": i,\n \"data-value\": x,\n \"data-min\": e,\n \"data-max\": a,\n \"data-step\": s,\n ...v,\n children: /* @__PURE__ */ k(\n \"div\",\n {\n ref: N,\n className: V(\n \"relative h-1.5 w-full rounded-full bg-muted cursor-pointer\",\n i && \"cursor-not-allowed\",\n d\n ),\n onPointerDown: M,\n children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: V(\n \"absolute h-full rounded-full pointer-events-none\",\n // pointer-events are disabled so that user interactions are handled by the track element, enabling correct slider behavior\n !E.current && \"transition-all\",\n f\n ),\n style: { width: `${j}%` }\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n className: V(\n \"absolute size-5 -top-2 rounded-full shadow-md cursor-grab\",\n i && \"cursor-not-allowed\",\n !i && \"cursor-grab focus:outline-none focus:ring-2\",\n E.current ? \"cursor-grabbing scale-110\" : \"transition-all\",\n m\n ),\n style: { left: `calc(${j}% - 10px)` },\n tabIndex: i ? -1 : 0,\n role: \"slider\",\n \"aria-valuemin\": e,\n \"aria-valuemax\": a,\n \"aria-valuenow\": x,\n \"aria-label\": u,\n \"aria-labelledby\": h,\n \"aria-disabled\": i,\n onKeyDown: U,\n onPointerDown: L\n }\n )\n ]\n }\n )\n }\n );\n}\nfunction _t({ children: r, ref: o, ...t }) {\n if (De(r)) {\n let n = { ...t };\n return r.props && (n = { ...n, ...r.props }), Re(r, {\n ...n,\n ref: (e) => {\n typeof o == \"function\" ? o(e) : o && (o.current = e);\n }\n });\n }\n return Te(\"div\", { ...t, ref: o }, r);\n}\nconst bt = ({ defaultValue: r, value: o, onValueChange: t } = {}) => {\n const [n, e] = A(r || \"\"), a = o !== void 0, s = a ? o : n, i = z((d) => {\n a || e(d), t == null || t(d);\n }, [a, t]);\n return {\n value: s,\n onValueChange: i\n };\n};\nfunction Xt({\n defaultValue: r,\n value: o,\n onValueChange: t,\n tabsWidth: n = \"fit\",\n variant: e = \"underline\",\n className: a,\n children: s,\n ref: i,\n id: d,\n triggersClassName: f,\n contentClassName: m\n}) {\n const { value: l, onValueChange: b } = bt({\n defaultValue: r,\n value: o,\n onValueChange: t\n }), u = {\n selectedValue: l,\n onValueChange: b,\n tabsWidth: n,\n variant: e,\n triggersClassName: f,\n contentClassName: m\n };\n return /* @__PURE__ */ c(je.Provider, { value: u, children: /* @__PURE__ */ c(\"div\", { id: d, ref: i, className: a, \"data-tabs-width\": n, \"data-variant\": e, children: s }) });\n}\nfunction Qt({ value: r, className: o, children: t, ref: n }) {\n const { selectedValue: e, contentClassName: a } = he(), s = e === r;\n return s ? /* @__PURE__ */ c(\n \"div\",\n {\n ref: n,\n role: \"tabpanel\",\n id: `tabs-content-${r}`,\n \"aria-labelledby\": `tabs-trigger-${r}`,\n \"data-state\": s ? \"active\" : \"inactive\",\n \"data-value\": r,\n className: w(\"mt-4 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2\", a, o),\n tabIndex: 0,\n children: t\n }\n ) : null;\n}\nconst Ne = {\n width: {\n fit: \"w-fit\",\n full: \"w-full *:flex-1\"\n },\n variant: {\n underline: \"border-b border-border\",\n pills: \"\",\n bordered: \"border border-border rounded-lg p-1\"\n }\n}, ht = {\n underline: \"border-b-2 border-transparent data-[state=active]:border-accent data-[state=active]:text-accent hover:text-accent-foreground\",\n pills: \"rounded-md data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30\",\n bordered: \"rounded data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30\"\n};\nfunction Zt({ children: r, className: o, id: t, ref: n }) {\n const { tabsWidth: e, variant: a } = he();\n return /* @__PURE__ */ c(\n \"div\",\n {\n id: t,\n ref: n,\n role: \"tablist\",\n className: w(\"flex\", Ne.width[e], Ne.variant[a], o),\n \"data-tabs-width\": e,\n \"data-variant\": a,\n children: r\n }\n );\n}\nfunction Jt({ value: r, disabled: o = !1, className: t, children: n, onClick: e, id: a, ref: s }) {\n const { selectedValue: i, onValueChange: d, variant: f, triggersClassName: m } = he(), l = i === r, b = (h) => {\n o || d(r), e == null || e(h);\n };\n return /* @__PURE__ */ c(\n \"button\",\n {\n id: a,\n ref: s,\n role: \"tab\",\n type: \"button\",\n \"aria-selected\": l,\n \"aria-controls\": `tabs-content-${r}`,\n \"data-state\": l ? \"active\" : \"inactive\",\n \"data-value\": r,\n disabled: o,\n className: w(\n \"inline-flex items-center justify-center whitespace-nowrap px-3 py-2 text-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n l ? \"font-medium\" : \"font-light\",\n ht[f],\n m,\n t\n ),\n onClick: b,\n children: n\n }\n );\n}\nfunction vt({ elementId: r, maxLength: o }) {\n const [t, n] = A(0);\n return C(() => {\n const e = document.getElementById(r);\n if (!e)\n return;\n const a = () => {\n const s = e.value.length;\n n(s);\n const i = s >= o;\n e.setAttribute(\"aria-describedby\", `${r}-character-count`), e.setAttribute(\"aria-invalid\", i ? \"true\" : \"false\"), i ? e.setAttribute(\"data-error\", \"true\") : e.removeAttribute(\"data-error\");\n };\n return a(), e.addEventListener(\"input\", a), e.setAttribute(\"maxlength\", String(o)), () => {\n e.removeEventListener(\"input\", a), e.removeAttribute(\"maxlength\"), e.removeAttribute(\"aria-describedby\"), e.removeAttribute(\"aria-invalid\"), e.removeAttribute(\"data-error\");\n };\n }, [r, o]), /* @__PURE__ */ c(\n \"small\",\n {\n className: w(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end\",\n t >= o && \"text-destructive\",\n t < o && \"text-current\"\n ),\n role: \"status\",\n children: /* @__PURE__ */ k(\"span\", { id: `${r}-character-count`, children: [\n t,\n \" / \",\n o,\n \" characters\"\n ] })\n }\n );\n}\nfunction pt(r, o) {\n C(() => {\n const t = document.getElementById(r);\n if (!t)\n return;\n if (!o) {\n t.style.height = \"auto\";\n return;\n }\n const n = () => {\n t.style.height = \"auto\", t.style.height = `${t.scrollHeight}px`;\n };\n return n(), t.addEventListener(\"input\", n), t.addEventListener(\"resize\", n), window.addEventListener(\"resize\", n), () => {\n t.removeEventListener(\"input\", n), t.removeEventListener(\"resize\", n), window.removeEventListener(\"resize\", n);\n };\n }, [r, o]);\n}\nconst gt = {\n base: \"\",\n \"left-line\": \"border-l border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\",\n outline: \"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\"\n}, xt = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, Ee = {\n variant: \"outline\",\n rounded: \"none\"\n};\nfunction Yt({\n variant: r = Ee.variant,\n rounded: o,\n displayOnlyMode: t = !1,\n errorMessage: n,\n successMessage: e,\n hideResizeHandle: a = !1,\n autoExpand: s = !1,\n characterLimit: i = 0,\n className: d,\n ...f\n}) {\n const m = P();\n pt(m, s || t);\n let l = o;\n r === \"outline\" && !o && (l = \"md\"), l = l || Ee.rounded;\n let b = a;\n (t || r === \"left-line\" && !a) && (b = !0);\n const h = w(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all\",\n !t && gt[r],\n !t && xt[l],\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n b && \"no-resize-handle\",\n d\n );\n return /* @__PURE__ */ k(\"div\", { className: w(\"-space-y-1.5\", t && \"cursor-text\"), children: [\n /* @__PURE__ */ c(\n \"textarea\",\n {\n ...f,\n id: m,\n \"aria-disabled\": f.disabled,\n readOnly: t,\n \"aria-readonly\": t || f[\"aria-readonly\"],\n style: {\n resize: s ? \"none\" : void 0\n },\n className: h\n }\n ),\n i > 0 && /* @__PURE__ */ c(vt, { elementId: m, maxLength: i }),\n !t && /* @__PURE__ */ c(le, { elementId: m, type: \"error\", message: n }),\n !t && /* @__PURE__ */ c(le, { elementId: m, type: \"success\", message: e })\n ] });\n}\nconst yt = {\n sm: {\n container: \"h-5 min-w-9 w-9\",\n thumb: \"h-4 w-4\",\n translate: \"translate-x-4\"\n },\n md: {\n container: \"h-6 min-w-11 w-11\",\n thumb: \"h-5 w-5\",\n translate: \"translate-x-5\"\n },\n lg: {\n container: \"h-7 min-w-13 w-13\",\n thumb: \"h-6 w-6\",\n translate: \"translate-x-6\"\n }\n}, wt = {\n default: {\n unchecked: \"bg-muted\",\n checked: \"bg-primary\"\n },\n success: {\n unchecked: \"bg-muted\",\n checked: \"bg-success\"\n },\n destructive: {\n unchecked: \"bg-muted\",\n checked: \"bg-destructive\"\n }\n}, ke = {\n variant: \"default\",\n size: \"md\"\n};\nfunction Ot({\n ref: r,\n id: o,\n size: t = ke.size,\n variant: n = ke.variant,\n checked: e,\n onCheckedChange: a,\n disabled: s = !1,\n className: i,\n thumbClassName: d,\n backgroundClassNames: f,\n ...m\n}) {\n const l = P(), b = J(() => o || `toggle-${l}`, [o, l]), [u, h] = A(e);\n C(() => {\n h(e);\n }, [e]);\n const v = () => {\n if (!s) {\n const E = !u;\n e === void 0 && h(E), a == null || a(E);\n }\n }, p = (E) => {\n (E.key === \" \" || E.key === \"Enter\") && (E.preventDefault(), v());\n }, y = yt[t], g = wt[n], x = w(\n // Base styles\n \"relative inline-flex items-center rounded-full transition-all duration-200 ease-in-out\",\n \"focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2\",\n // Size\n y.container,\n // Variant and state\n u ? (f == null ? void 0 : f.checked) || g.checked : (f == null ? void 0 : f.unchecked) || g.unchecked,\n // Disabled state\n s && \"opacity-50 cursor-not-allowed\",\n !s && \"cursor-pointer\",\n i\n ), N = w(\n // Base thumb styles\n \"absolute left-0.5 top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out\",\n // Size\n y.thumb,\n // Position based on state\n u && y.translate,\n d\n );\n return /* @__PURE__ */ k(\n \"button\",\n {\n ref: r,\n id: b,\n type: \"button\",\n role: \"switch\",\n tabIndex: 0,\n \"aria-checked\": u,\n \"aria-disabled\": s,\n disabled: s,\n onClick: v,\n onKeyDown: p,\n className: x,\n ...m,\n children: [\n /* @__PURE__ */ c(\"span\", { className: N }),\n /* @__PURE__ */ c(\"span\", { className: \"sr-only\", children: u ? \"Enabled\" : \"Disabled\" })\n ]\n }\n );\n}\nconst se = 8, ie = 4, X = 6;\nfunction Nt(r) {\n return { calculatePosition: z(\n (t, n) => {\n const e = t.getBoundingClientRect(), a = n.getBoundingClientRect(), s = {\n width: window.innerWidth,\n height: window.innerHeight\n }, i = (b, u, h, v) => b < 0 || u < 0 || b + h > s.width || u + v > s.height, d = {\n top: {\n x: e.left + e.width / 2 - a.width / 2,\n y: e.top - a.height - ie,\n arrow: {\n x: a.width / 2 - X,\n y: a.height\n }\n },\n bottom: {\n x: e.left + e.width / 2 - a.width / 2,\n y: e.bottom + ie,\n arrow: {\n x: a.width / 2 - X,\n y: -6\n }\n },\n left: {\n x: e.left - a.width - ie,\n y: e.top + e.height / 2 - a.height / 2,\n arrow: {\n x: a.width,\n y: a.height / 2 - X\n }\n },\n right: {\n x: e.right + ie,\n y: e.top + e.height / 2 - a.height / 2,\n arrow: {\n x: -6,\n y: a.height / 2 - X\n }\n }\n };\n let f = r, m = d[r];\n if (i(m.x, m.y, a.width, a.height)) {\n const b = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\"\n }, u = d[b[r]];\n if (!i(u.x, u.y, a.width, a.height))\n f = b[r], m = u;\n else {\n const h = [\"top\", \"bottom\", \"left\", \"right\"].filter(\n (v) => v !== r && v !== b[r]\n );\n for (const v of h) {\n const p = d[v];\n if (!i(p.x, p.y, a.width, a.height)) {\n f = v, m = p;\n break;\n }\n }\n }\n }\n m.x = Math.max(\n se,\n Math.min(m.x, s.width - a.width - se)\n ), m.y = Math.max(\n se,\n Math.min(m.y, s.height - a.height - se)\n );\n const l = {\n x: e.left + e.width / 2,\n y: e.top + e.height / 2\n };\n return f === \"top\" || f === \"bottom\" ? m.arrow.x = Math.max(\n X,\n Math.min(l.x - m.x - X, a.width - X * 2)\n ) : m.arrow.y = Math.max(\n X,\n Math.min(l.y - m.y - X, a.height - X * 2)\n ), {\n ...m,\n placement: f\n };\n },\n [r]\n ) };\n}\nfunction Et(r, o, t) {\n const n = B(null), e = B(null), a = z(() => {\n if (!n.current || !e.current) return;\n const s = r(n.current, e.current);\n t(s);\n }, [r, t]);\n return C(() => {\n if (!o) return;\n const s = () => a();\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, [o, a]), {\n triggerRef: n,\n tooltipRef: e,\n updatePosition: a\n };\n}\nfunction kt(r, o, t, n, e, a, s, i, d) {\n const f = B(null), m = z(() => {\n r || (f.current && clearTimeout(f.current), f.current = window.setTimeout(() => {\n t(!0), requestAnimationFrame(() => {\n e(), n(!0);\n });\n }, o));\n }, [r, o, t, e, n]), l = z(\n (b = !1) => {\n if (f.current && clearTimeout(f.current), b) {\n n(!1), setTimeout(() => t(!1), 150);\n return;\n }\n f.current = window.setTimeout(() => {\n n(!1), setTimeout(() => t(!1), 150);\n }, 100);\n },\n [n, t]\n );\n return C(() => {\n !a && !s && !i && d && l();\n }, [a, s, i, d, l]), C(() => () => {\n f.current && clearTimeout(f.current);\n }, []), {\n showTooltip: m,\n hideTooltip: l,\n timeoutRef: f\n };\n}\nfunction er({\n id: r,\n children: o,\n message: t,\n placement: n = \"top\",\n disabled: e = !1,\n delay: a = 200,\n className: s\n}) {\n const [i, d] = A(!1), [f, m] = A(!1), [l, b] = A(null), [u, h] = A(!1), [v, p] = A(!1), [y, g] = A(!1), { calculatePosition: x } = Nt(n), { triggerRef: N, tooltipRef: E, updatePosition: S } = Et(x, f, b), { showTooltip: I, hideTooltip: $, timeoutRef: M } = kt(\n e,\n a,\n m,\n d,\n S,\n u,\n v,\n y,\n i\n ), L = P(), U = r ?? L;\n return /* @__PURE__ */ k(ne, { children: [\n G.cloneElement(o, {\n ref: (j) => {\n N.current = j;\n },\n onMouseEnter: () => {\n h(!0), I();\n },\n onMouseLeave: () => {\n h(!1);\n },\n onFocus: () => {\n g(!0), I();\n },\n onBlur: () => {\n g(!1), $(!0);\n },\n onKeyDown: (j) => {\n j.key === \"Escape\" && $(!0);\n },\n \"aria-describedby\": e ? void 0 : U\n }),\n f && pe(\n /* @__PURE__ */ c(\n \"div\",\n {\n ref: E,\n id: U,\n role: \"tooltip\",\n className: w(\n \"fixed z-50 px-2 py-1 text-sm rounded shadow-lg bg-popover pointer-events-auto transition-all duration-150 ease-out\",\n i ? \"opacity-100\" : \"opacity-0\",\n s\n ),\n style: l ? { left: l.x, top: l.y } : { opacity: 0 },\n onMouseEnter: () => {\n p(!0), M.current && clearTimeout(M.current);\n },\n onMouseLeave: () => {\n p(!1);\n },\n children: t\n }\n ),\n document.body\n )\n ] });\n}\nexport {\n Rt as Accordion,\n fe as AccordionItem,\n nr as ActionModal,\n qe as Button,\n St as Carousel,\n Lt as Checkbox,\n Vt as Clickable,\n Wt as Input,\n Bt as Label,\n Me as LoadingDots,\n Ht as Modal,\n jt as Pagination,\n Ft as Panel,\n Mt as RadioGroup,\n be as RadioGroupItem,\n st as RadioInput,\n Gt as ScrollArea,\n Pt as Select,\n Kt as Separator,\n qt as Skeleton,\n Ut as Slider,\n _t as Slot,\n Xt as Tabs,\n Qt as TabsContent,\n Zt as TabsList,\n Jt as TabsTrigger,\n Yt as Textarea,\n ar as Toast,\n Ot as Toggle,\n er as Tooltip\n};\n//# sourceMappingURL=components.esm.js.map\n","import { Modal, ModalProps } from '@moondreamsdev/dreamer-ui/components';\nimport React, { useMemo } from 'react';\n\ninterface BaseActionModalProps extends Omit<ModalProps, 'children' | 'actions'> {\n message: React.ReactNode;\n destructive?: boolean;\n}\n\ninterface AlertModalProps extends BaseActionModalProps {\n type: 'alert';\n confirmText?: string;\n onConfirm?: () => void;\n // Cancel-related props are not allowed for alerts\n cancelText?: never;\n}\n\ninterface ConfirmModalProps extends BaseActionModalProps {\n type: 'confirm';\n confirmText?: string;\n cancelText?: string;\n onConfirm?: () => void;\n}\n\nexport type ActionModalProps = AlertModalProps | ConfirmModalProps;\n\nexport function ActionModal({\n type,\n message,\n cancelText,\n confirmText,\n onConfirm,\n onClose,\n destructive = false,\n title,\n ...modalProps\n}: ActionModalProps) {\n const defaultTexts = useMemo(() => {\n if (type === 'confirm') {\n return {\n confirm: confirmText || 'Confirm',\n cancel: cancelText || 'Cancel',\n defaultTitle: title || 'Confirm Action',\n };\n }\n return {\n confirm: confirmText || 'OK',\n cancel: null,\n defaultTitle: title || 'Alert',\n };\n }, [type, confirmText, title, cancelText]);\n\n const actions: ModalProps['actions'] = useMemo(\n () => [\n ...(defaultTexts.cancel\n ? [\n {\n label: defaultTexts.cancel,\n variant: 'secondary' as const,\n onClick: onClose,\n },\n ]\n : []),\n {\n label: defaultTexts.confirm,\n variant: destructive ? 'destructive' : 'primary',\n onClick: () => {\n onConfirm?.();\n onClose();\n },\n },\n ],\n [defaultTexts, destructive, onConfirm, onClose]\n );\n\n return (\n <Modal\n {...modalProps}\n title={title || defaultTexts.defaultTitle}\n onClose={onClose}\n actions={actions}\n disableCloseOnOverlayClick={type === 'confirm'}\n hideCloseButton={type === 'confirm'}\n >\n {typeof message === 'string' ? <p className='text-sm'>{message}</p> : message}\n </Modal>\n );\n}\n","import { createContext, useContext } from 'react';\nimport { TabsVariant, TabsWidth } from './variants';\n\nexport interface TabsContextValue {\n selectedValue: string;\n onValueChange: (value: string) => void;\n tabsWidth: TabsWidth;\n variant: TabsVariant;\n triggersClassName?: string;\n contentClassName?: string;\n}\n\nexport const TabsContext = createContext<TabsContextValue | null>(null);\n\nexport const useTabsContext = () => {\n const context = useContext(TabsContext);\n if (!context) {\n throw new Error('Tabs components must be used within a Tabs component');\n }\n return context;\n};\n","import { ReactNode, useCallback, useEffect, useState } from 'react';\nimport { CrossCircled, ExclamationTriangle, InfoCircled, X } from '../../symbols';\nimport { join } from '../../utils';\nexport type ToastType = 'info' | 'warning' | 'error';\n\nexport interface ToastAction {\n label: string;\n onClick: () => void;\n}\n\n/** Data for a toast notification */\nexport interface ToastData {\n id: string;\n title: string;\n description?: string;\n type?: ToastType;\n action?: ToastAction;\n duration?: number;\n onRemove?: (id: string) => void;\n}\n\ninterface ToastProps extends ToastData {\n customTypes?: Record<string, { className: string; icon?: ReactNode }>;\n customComponent?: React.ComponentType<ToastData>;\n}\n\nconst defaultTypeStyles: Record<ToastType, { className: string; icon: ReactNode }> = {\n info: {\n className: 'bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100',\n icon: <InfoCircled size={20} />,\n },\n warning: {\n className:\n 'bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100',\n icon: <ExclamationTriangle size={20} />,\n },\n error: {\n className: 'bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100',\n icon: <CrossCircled size={20} />,\n },\n};\n\nexport function Toast({\n id,\n title,\n description,\n type = 'info',\n action,\n duration = 5000,\n onRemove,\n customTypes,\n customComponent: CustomComponent,\n}: ToastProps) {\n const [isExiting, setIsExiting] = useState(false);\n\n const handleRemove = useCallback(() => {\n setIsExiting(true);\n setTimeout(() => {\n onRemove?.(id);\n }, 150); // Match animation duration\n }, [id, onRemove]);\n\n useEffect(() => {\n if (duration > 0) {\n const timer = setTimeout(() => {\n handleRemove();\n }, duration);\n\n return () => clearTimeout(timer);\n }\n }, [duration, id, onRemove, handleRemove]);\n\n if (CustomComponent) {\n return (\n <CustomComponent\n id={id}\n title={title}\n description={description}\n type={type}\n action={action}\n duration={duration}\n onRemove={onRemove}\n />\n );\n }\n\n // Check custom types first, then fall back to default\n const typeStyle = customTypes?.[type] || defaultTypeStyles[type as ToastType] || defaultTypeStyles.info;\n\n return (\n <div\n role={type === 'error' ? 'alert' : 'status'}\n aria-live={type === 'error' ? undefined : 'polite'}\n className={join(\n 'relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out',\n action && 'pb-3',\n typeStyle.className,\n isExiting ? 'opacity-0 translate-x-full' : 'opacity-100 translate-x-0'\n )}\n >\n {/* Icon */}\n <div className='flex-shrink-0 mr-3'>{typeStyle.icon}</div>\n\n {/* Content */}\n <div className='flex-grow min-w-0'>\n <div className='font-medium text-sm leading-5'>{title}</div>\n {description && <div className='mt-1 text-sm opacity-90 leading-5'>{description}</div>}\n {action && (\n <div className='mt-1.5'>\n <button\n onClick={action.onClick}\n className='text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer'\n >\n {action.label}\n </button>\n </div>\n )}\n </div>\n\n {/* Close button */}\n <button\n onClick={handleRemove}\n className='flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0'\n >\n <X size={16} />\n </button>\n </div>\n );\n}\n"],"names":["n","t","s","h","C","i","e","N","u","Me","r","o","A","c","w","Ge","Pe","Ke","me","qe","a","f","l","k","Je","Ye","Oe","B","z","Ht","b","P","v","p","y","g","G","x","E","S","I","$","ne","pe","V","ve","ActionModal","type","message","cancelText","confirmText","onConfirm","onClose","destructive","title","modalProps","defaultTexts","useMemo","actions","jsx","Modal","TabsContext","createContext","useTabsContext","context","useContext","defaultTypeStyles","InfoCircled","ExclamationTriangle","CrossCircled","Toast","id","description","action","duration","onRemove","customTypes","CustomComponent","isExiting","setIsExiting","useState","handleRemove","useCallback","useEffect","timer","typeStyle","jsxs","join","X"],"mappings":"sJAAA,SAASA,KAAKC,EAAG,CACf,OAAOA,EAAE,OAAQC,GAAM,OAAOA,GAAK,UAAYA,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM,GAAI,MACxE,CCgFA,SAASC,EAAE,CAAE,KAAMC,EAAI,GAAI,MAAO,EAAI,eAAgB,UAAWJ,EAAI,SAA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