@moondreamsdev/dreamer-ui 1.7.19-test.21 → 1.7.19-test.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- {"version":3,"file":"Toast-Bdi3ohxP.js","sources":["join-BmgR_f4v.js","X-CIoyLewf.js","Toast-B5-TSrGE.js","useTheme-CYIEopvl.js","components.esm.js","../src/components/actionmodal/ActionModal.tsx","../src/components/dropdown-menu/DropdownContext.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 j\n};\n//# sourceMappingURL=join-BmgR_f4v.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 o, Fragment as q, jsxs as b } from \"react/jsx-runtime\";\nimport g, { createContext as l, useId as F, useState as x, useEffect as p, useRef as H, useCallback as j, useMemo as z, useContext as A } from \"react\";\nimport { createPortal as Z } from \"react-dom\";\nimport { X as V, C as K, E as P, I as Q } from \"./X-CIoyLewf.js\";\nimport { j as X } from \"./join-BmgR_f4v.js\";\nfunction y(...n) {\n return n.filter((i) => typeof i == \"string\" && i).join(\" \").trim() || void 0;\n}\nfunction Y({ size: n = 15, color: i = \"currentColor\", className: u = \"inline\", ...e }) {\n return /* @__PURE__ */ o(\n \"svg\",\n {\n ...e,\n width: n,\n height: n,\n className: u,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ o(\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: i,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction h(...n) {\n return n.filter((i) => typeof i == \"string\" && i).join(\" \").trim() || void 0;\n}\nl(void 0);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nl(null);\nl(null);\nl(void 0);\nl(void 0);\nl(void 0);\nfunction _() {\n const [n, i] = x(0);\n return p(() => {\n const u = setInterval(() => {\n i((e) => (e + 1) % 3);\n }, 500);\n return () => clearInterval(u);\n }, []), /* @__PURE__ */ o(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((u) => /* @__PURE__ */ o(\n \"div\",\n {\n className: y(\n \"rounded-full transition-all ease-in-out size-[0.35em] bg-current\",\n n === u && \"transform -translate-y-1\"\n )\n },\n u\n )) });\n}\nconst G = {\n base: \"\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/80 focus:outline-primary outline-offset-2 disabled:bg-muted disabled:text-muted-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80 focus:outline-secondary outline-offset-2 disabled:bg-muted/80 disabled:text-muted-foreground/80\",\n tertiary: \"text-primary hover:text-primary/80 disabled:text-muted-foreground focus:outline-primary\",\n outline: \"border border-primary text-primary hover:border-primary/80 hover:text-primary/80 focus:outline-primary outline-offset-2 disabled:border-muted-foreground disabled:text-muted-foreground\",\n link: \"underline-offset-4 hover:underline disabled:underline disabled:text-muted-foreground focus:outline-current\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/80 focus:outline-destructive outline-offset-2 disabled:bg-muted disabled:text-muted-foreground\"\n}, J = {\n stripped: \"\",\n fitted: \"size-fit leading-0\",\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}, U = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, k = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction W({\n variant: n = k.variant,\n size: i,\n rounded: u = k.rounded,\n loading: e,\n className: t,\n ...d\n}) {\n let a;\n n === \"link\" && !i ? a = \"fitted\" : a = i || k.size;\n const s = y(\n \"appearance-none not-disabled:hover:cursor-pointer outline outline-transparent disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n G[n],\n J[a],\n U[u],\n e && \"relative pointer-events-none\",\n t\n );\n if (d.href && !d.disabled)\n return /* @__PURE__ */ o(\n \"a\",\n {\n ...d,\n rel: d.rel ? d.rel : d.target === \"_blank\" ? \"noopener noreferrer\" : void 0,\n \"aria-label\": d[\"aria-label\"],\n \"aria-description\": d[\"aria-description\"],\n href: d.href,\n className: s,\n children: d.children\n }\n );\n const r = d, v = () => r.children ? typeof r.children == \"string\" || typeof r.children == \"number\" || typeof r.children == \"boolean\" ? /* @__PURE__ */ o(\"span\", { className: y(e && \"invisible\"), children: r.children }) : g.Children.map(r.children, (c, f) => {\n if (g.isValidElement(c)) {\n const m = c.props;\n return g.cloneElement(c, {\n key: f,\n className: y(e && \"invisible\", m.className)\n });\n }\n return c;\n }) : null;\n return /* @__PURE__ */ b(\n \"button\",\n {\n ...r,\n \"aria-label\": r[\"aria-label\"],\n \"aria-description\": r[\"aria-description\"],\n \"aria-disabled\": r.disabled || e,\n \"aria-busy\": e,\n type: r.type ?? \"button\",\n className: s,\n children: [\n e && /* @__PURE__ */ o(_, {}),\n v()\n ]\n }\n );\n}\nfunction R(n) {\n const [i, u] = x(!1), [e, t] = x(!1);\n return p(() => {\n n ? (t(!0), setTimeout(() => u(!0), 10)) : (u(!1), setTimeout(() => t(!1), 150));\n }, [n]), { show: i, shouldRender: e };\n}\nfunction ll(n, i) {\n p(() => {\n const u = (e) => {\n e.key === \"Escape\" && n && i();\n };\n return document.addEventListener(\"keydown\", u), n && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", u), document.body.style.overflow = \"auto\";\n };\n }, [n, i]);\n}\nfunction nl(n, i) {\n const u = H(null), e = j(() => {\n const t = document.getElementById(n);\n if (!t) return;\n const d = t.querySelectorAll('[data-modal-action=\"true\"]');\n if (d.length > 0) {\n d[0].focus();\n return;\n }\n const a = t.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (a.length > 0) {\n const s = Array.from(a).filter((r) => !(r instanceof HTMLButtonElement && r.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (s.length > 0) {\n s[0].focus();\n return;\n }\n a[0].focus();\n return;\n }\n t.focus();\n }, [n]);\n p(() => (i && (u.current = document.activeElement, e()), () => {\n document.body.style.overflow = \"auto\", u.current instanceof HTMLElement && u.current.focus();\n }), [i, e]);\n}\nfunction el({\n id: n,\n isOpen: i,\n onClose: u,\n title: e,\n children: t,\n contentOnly: d = !1,\n className: a,\n overlayClassName: s,\n containerClassName: r,\n hideCloseButton: v = !1,\n actions: c = [],\n disableCloseOnOverlayClick: f = !1,\n ariaLabelledBy: m,\n ariaDescribedBy: w\n}) {\n const C = F(), E = n || `modal-${C}`, L = n ? `${n}-title` : `modal-title-${C}`, { show: M, shouldRender: N } = R(i);\n if (nl(E, N), ll(N, u), !N) return null;\n const I = () => e ? g.isValidElement(e) ? /* @__PURE__ */ o(\"div\", { className: \"mb-4\", children: e }) : /* @__PURE__ */ o(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: L, children: e }) : null, B = () => c.length === 0 ? null : /* @__PURE__ */ o(\"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((D, O) => {\n const { label: S, ...$ } = D;\n return /* @__PURE__ */ o(W, { ...$, \"data-modal-action\": \"true\", children: S }, O);\n }) });\n return /* @__PURE__ */ o(q, { children: Z(\n /* @__PURE__ */ o(\n \"div\",\n {\n \"aria-labelledby\": m ?? e ? L : void 0,\n \"aria-describedby\": w,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ b(\"div\", { className: h(\"flex min-h-screen items-center justify-center p-4\", r), children: [\n /* @__PURE__ */ o(\n \"div\",\n {\n className: h(\"fixed inset-0 bg-black/20 transition-all\", s),\n onClick: () => {\n f || u();\n }\n }\n ),\n d && /* @__PURE__ */ o(\"div\", { className: h(\"relative w-fit\", a), children: t }),\n !d && /* @__PURE__ */ b(\n \"div\",\n {\n id: E,\n tabIndex: -1,\n className: h(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover text-popover-foreground transition-all p-6 focus:ring ease-in\",\n M ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n a\n ),\n children: [\n !v && /* @__PURE__ */ o(\n \"button\",\n {\n type: \"button\",\n onClick: u,\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__ */ o(Y, { size: 18 })\n }\n ),\n I(),\n t,\n B()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nfunction sl({\n type: n,\n message: i,\n cancelText: u,\n confirmText: e,\n onConfirm: t,\n onClose: d,\n destructive: a = !1,\n title: s,\n ...r\n}) {\n const v = z(() => n === \"confirm\" ? {\n confirm: e || \"Confirm\",\n cancel: u || \"Cancel\",\n defaultTitle: s || \"Confirm Action\"\n } : {\n confirm: e || \"OK\",\n cancel: null,\n defaultTitle: s || \"Alert\"\n }, [n, e, s, u]), c = z(\n () => [\n ...v.cancel ? [\n {\n label: v.cancel,\n variant: \"secondary\",\n onClick: d\n }\n ] : [],\n {\n label: v.confirm,\n variant: a ? \"destructive\" : \"primary\",\n onClick: () => {\n t == null || t(), d();\n }\n }\n ],\n [v, a, t, d]\n );\n return /* @__PURE__ */ o(\n el,\n {\n ...r,\n title: s || v.defaultTitle,\n onClose: d,\n actions: c,\n disableCloseOnOverlayClick: n === \"confirm\",\n hideCloseButton: n === \"confirm\",\n children: typeof i == \"string\" ? /* @__PURE__ */ o(\"p\", { className: \"text-sm\", children: i }) : i\n }\n );\n}\nconst ol = l(null), vl = () => {\n const n = A(ol);\n if (!n)\n throw new Error(\"DropdownMenu components must be used within a DropdownMenu component\");\n return n;\n}, il = l(null), cl = () => {\n const n = A(il);\n if (!n)\n throw new Error(\"Tabs components must be used within a Tabs component\");\n return n;\n}, T = {\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__ */ o(Q, { 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__ */ o(P, { 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__ */ o(K, { size: 20 })\n }\n};\nfunction fl({\n id: n,\n title: i,\n description: u,\n type: e = \"info\",\n action: t,\n duration: d = 5e3,\n onRemove: a,\n customTypes: s,\n customComponent: r\n}) {\n const [v, c] = x(!1), f = j(() => {\n c(!0), setTimeout(() => {\n a == null || a(n);\n }, 150);\n }, [n, a]);\n if (p(() => {\n if (d > 0) {\n const w = setTimeout(() => {\n f();\n }, d);\n return () => clearTimeout(w);\n }\n }, [d, n, a, f]), r)\n return /* @__PURE__ */ o(\n r,\n {\n id: n,\n title: i,\n description: u,\n type: e,\n action: t,\n duration: d,\n onRemove: a\n }\n );\n const m = (s == null ? void 0 : s[e]) || T[e] || T.info;\n return /* @__PURE__ */ b(\n \"div\",\n {\n role: e === \"error\" ? \"alert\" : \"status\",\n \"aria-live\": e === \"error\" ? void 0 : \"polite\",\n className: X(\n \"relative flex items-start p-4 rounded-lg border shadow-lg transition-all ease-in-out\",\n t && \"pb-3\",\n m.className,\n v ? \"opacity-0 translate-x-full\" : \"opacity-100 translate-x-0\"\n ),\n children: [\n /* @__PURE__ */ o(\"div\", { className: \"flex-shrink-0 mr-3\", children: m.icon }),\n /* @__PURE__ */ b(\"div\", { className: \"flex-grow min-w-0\", children: [\n /* @__PURE__ */ o(\"div\", { className: \"font-medium text-sm leading-5\", children: i }),\n u && /* @__PURE__ */ o(\"div\", { className: \"mt-1 text-sm opacity-90 leading-5\", children: u }),\n t && /* @__PURE__ */ o(\"div\", { className: \"mt-1.5\", children: /* @__PURE__ */ o(\n \"button\",\n {\n onClick: t.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: t.label\n }\n ) })\n ] }),\n /* @__PURE__ */ o(\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__ */ o(V, { size: 16 })\n }\n )\n ]\n }\n );\n}\nexport {\n sl as A,\n ol as D,\n fl as T,\n cl as a,\n il as b,\n y as n,\n vl as u\n};\n//# sourceMappingURL=Toast-B5-TSrGE.js.map\n","import { createContext as o, useContext as e } from \"react\";\nconst n = o(void 0);\nfunction u() {\n const t = e(n);\n if (!t)\n throw new Error(\"useActionModal must be used within an ActionModalProvider\");\n return t;\n}\nconst s = o(void 0);\nfunction a() {\n const t = e(s);\n if (!t)\n throw new Error(\"useToast must be used within a ToastProvider\");\n return t;\n}\nconst r = o(void 0);\nfunction c() {\n const t = e(r);\n if (!t)\n throw new Error(\"useTheme must be used within a ThemeProvider\");\n return t;\n}\nexport {\n n as A,\n r as T,\n a,\n c as b,\n s as c,\n u\n};\n//# sourceMappingURL=useTheme-CYIEopvl.js.map\n","var et = Object.defineProperty;\nvar tt = (r, o, t) => o in r ? et(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t;\nvar Re = (r, o, t) => tt(r, typeof o != \"symbol\" ? o + \"\" : o, t);\nimport { jsxs as w, jsx as e, Fragment as te } from \"react/jsx-runtime\";\nimport Y, { useId as J, useState as R, createElement as rt, useEffect as V, useCallback as $, useMemo as ne, useRef as q, Component as nt, isValidElement as at, cloneElement as ot } from \"react\";\nimport { j as k } from \"./join-BmgR_f4v.js\";\nimport { f as Ne, g as ye, h as he, k as st, c as Ye, D as Qe, b as ze, W as lt, l as it, j as ct, C as dt, a as ut, G as ft, i as Ue, T as mt, P as pt, Q as ht, m as bt, E as gt, I as xt, d as yt, e as vt } from \"./Window-bavT8vOT.js\";\nimport { u as Me, D as wt, n as Z, a as Te, b as kt } from \"./Toast-B5-TSrGE.js\";\nimport { A as Ma, T as Ta } from \"./Toast-B5-TSrGE.js\";\nimport { X as be, E as ve, C as Nt, I as Be } from \"./X-CIoyLewf.js\";\nimport \"./useTheme-CYIEopvl.js\";\nimport { u as Dt } from \"./useScreenSize-DiuQZBHb.js\";\nimport { createPortal as De } from \"react-dom\";\nimport { downloadFile as Ct, mergeRefs as Et } from \"./utils.esm.js\";\nfunction Ce({\n id: r,\n title: o,\n content: t,\n children: s,\n className: n = \"\",\n disabled: a = !1,\n isOpen: l = !1,\n onToggle: d,\n triggerClassName: i = \"\",\n bodyClassName: f = \"\"\n}) {\n const u = J(), c = r || `accordion-item-${u}`, m = `${c}-header`, p = `${c}-panel`, x = () => {\n !a && d && d();\n }, y = (b) => {\n (b.key === \"Enter\" || b.key === \" \") && (b.preventDefault(), x());\n };\n return /* @__PURE__ */ w(\"div\", { className: k(\"border-b border-gray-200\", a && \"opacity-60 cursor-not-allowed\", n), children: [\n /* @__PURE__ */ w(\n \"button\",\n {\n id: m,\n type: \"button\",\n className: k(\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 i\n ),\n \"aria-expanded\": l,\n \"aria-controls\": p,\n disabled: a,\n onClick: x,\n onKeyDown: y,\n children: [\n /* @__PURE__ */ e(\"span\", { children: o }),\n /* @__PURE__ */ e(\n \"span\",\n {\n className: k(\n \"transform transition-transform ease-linear\",\n l ? \"rotate-180\" : \"rotate-0\"\n ),\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ e(Ne, { size: 18 })\n }\n )\n ]\n }\n ),\n /* @__PURE__ */ e(\n \"div\",\n {\n id: p,\n role: \"region\",\n \"aria-labelledby\": m,\n className: k(\n \"transition-all ease-linear px-4\",\n l ? \"max-h-96 opacity-100 overflow-auto py-3\" : \"max-h-0 opacity-0 overflow-hidden\",\n f\n ),\n children: l && (s || t)\n }\n )\n ] });\n}\nfunction ra({\n id: r,\n items: o = [],\n children: t,\n className: s = \"\",\n itemClassName: n = \"\",\n allowMultiple: a = !1,\n defaultOpenItems: l = [],\n triggersClassName: d = \"\",\n bodiesClassName: i = \"\"\n}) {\n const f = J(), u = r || `accordion-group-${f}`, [c, m] = R(new Set(l)), p = (b) => {\n m((D) => {\n const h = new Set(D);\n return h.has(b) ? h.delete(b) : (a || h.clear(), h.add(b)), h;\n });\n }, x = (b) => `${f}-item-${b}`, y = (b) => c.has(b);\n return /* @__PURE__ */ w(\"div\", { id: u, className: s, children: [\n o.length > 0 && o.map((b, D) => {\n const h = b.id || x(D);\n return /* @__PURE__ */ e(\n Ce,\n {\n id: h,\n title: b.title,\n content: b.content,\n disabled: b.disabled,\n isOpen: y(h),\n onToggle: () => p(h),\n className: n,\n triggerClassName: d,\n bodyClassName: i\n },\n h\n );\n }),\n o.length === 0 && t && Y.Children.map(t, (b, D) => {\n if (Y.isValidElement(b) && b.type === Ce) {\n const h = b.props.id || x(D);\n return /* @__PURE__ */ rt(\n Ce,\n {\n ...b.props,\n key: h,\n id: h,\n className: k(n, b.props.className),\n isOpen: y(h),\n onToggle: () => p(h),\n triggerClassName: k(d, b.props.triggerClassName),\n bodyClassName: k(i, b.props.bodyClassName)\n }\n );\n }\n return null;\n })\n ] });\n}\nfunction Ft({ size: r }) {\n return /* @__PURE__ */ w(\"svg\", { width: r, height: r, viewBox: \"0 0 100 100\", fill: \"none\", children: [\n /* @__PURE__ */ e(\"circle\", { cx: \"50\", cy: \"40\", r: \"32\", fill: \"url(#astronautHelmet)\", stroke: \"#4F46E5\", strokeWidth: \"2\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"50\", cy: \"40\", r: \"24\", fill: \"#FED7AA\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"43\", cy: \"36\", r: \"3\", fill: \"#1F2937\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"57\", cy: \"36\", r: \"3\", fill: \"#1F2937\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M46 46 Q50 50 54 46\", stroke: \"#1F2937\", strokeWidth: \"2\", fill: \"none\" }),\n /* @__PURE__ */ e(\"rect\", { x: \"38\", y: \"65\", width: \"24\", height: \"30\", rx: \"12\", fill: \"#E5E7EB\" }),\n /* @__PURE__ */ e(\"rect\", { x: \"44\", y: \"70\", width: \"12\", height: \"8\", rx: \"2\", fill: \"#6366F1\" }),\n /* @__PURE__ */ e(\"defs\", { children: /* @__PURE__ */ w(\"radialGradient\", { id: \"astronautHelmet\", cx: \"50%\", cy: \"30%\", r: \"70%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#DBEAFE\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"#93C5FD\" })\n ] }) })\n ] });\n}\nfunction St({ size: r }) {\n return /* @__PURE__ */ w(\"svg\", { width: r, height: r, viewBox: \"0 0 100 100\", fill: \"none\", children: [\n /* @__PURE__ */ e(\"circle\", { cx: \"50\", cy: \"50\", r: \"40\", fill: \"url(#moonGradient)\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"38\", cy: \"35\", r: \"4\", fill: \"#D1D5DB\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"65\", cy: \"42\", r: \"3\", fill: \"#D1D5DB\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"42\", cy: \"65\", r: \"5\", fill: \"#D1D5DB\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"45\", cy: \"45\", r: \"2.5\", fill: \"#1F2937\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"58\", cy: \"45\", r: \"2.5\", fill: \"#1F2937\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M47 55 Q52 60 57 55\", stroke: \"#1F2937\", strokeWidth: \"2\", fill: \"none\" }),\n /* @__PURE__ */ e(\"defs\", { children: /* @__PURE__ */ w(\"radialGradient\", { id: \"moonGradient\", cx: \"30%\", cy: \"30%\", r: \"80%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#F9FAFB\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"#E5E7EB\" })\n ] }) })\n ] });\n}\nfunction At({ size: r }) {\n return /* @__PURE__ */ w(\"svg\", { width: r, height: r, viewBox: \"0 0 100 100\", fill: \"none\", children: [\n /* @__PURE__ */ e(\"path\", { d: \"M50 15 L58 38 L82 38 L64 52 L72 75 L50 61 L28 75 L36 52 L18 38 L42 38 Z\", fill: \"url(#starGradient)\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"44\", cy: \"42\", r: \"2\", fill: \"#1F2937\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"56\", cy: \"42\", r: \"2\", fill: \"#1F2937\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M46 50 Q50 54 54 50\", stroke: \"#1F2937\", strokeWidth: \"2\", fill: \"none\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"65\", cy: \"25\", r: \"1.5\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"35\", cy: \"30\", r: \"1\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"defs\", { children: /* @__PURE__ */ w(\"radialGradient\", { id: \"starGradient\", cx: \"50%\", cy: \"40%\", r: \"60%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#FEF3C7\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"#FCD34D\" })\n ] }) })\n ] });\n}\nfunction It({ size: r }) {\n return /* @__PURE__ */ w(\"svg\", { width: r, height: r, viewBox: \"0 0 100 100\", fill: \"none\", children: [\n /* @__PURE__ */ e(\"circle\", { cx: \"50\", cy: \"50\", r: \"38\", fill: \"url(#galaxyGradient)\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M20 50 Q35 30 50 50 Q65 70 80 50\", stroke: \"#8B5CF6\", strokeWidth: \"3\", opacity: \"0.7\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M50 20 Q70 35 50 50 Q30 65 50 80\", stroke: \"#A78BFA\", strokeWidth: \"2\", opacity: \"0.5\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"50\", cy: \"50\", r: \"12\", fill: \"#1E1B4B\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"46\", cy: \"47\", r: \"1.5\", fill: \"#E0E7FF\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"54\", cy: \"47\", r: \"1.5\", fill: \"#E0E7FF\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M47 53 Q50 56 53 53\", stroke: \"#E0E7FF\", strokeWidth: \"1.5\", fill: \"none\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"30\", cy: \"25\", r: \"1\", fill: \"#FFF\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"75\", cy: \"70\", r: \"1.5\", fill: \"#FFF\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"25\", cy: \"75\", r: \"1\", fill: \"#FFF\" }),\n /* @__PURE__ */ e(\"defs\", { children: /* @__PURE__ */ w(\"radialGradient\", { id: \"galaxyGradient\", cx: \"50%\", cy: \"50%\", r: \"70%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#4C1D95\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"0.5\", stopColor: \"#7C3AED\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"#1E1B4B\" })\n ] }) })\n ] });\n}\nfunction $t({ size: r }) {\n return /* @__PURE__ */ w(\"svg\", { width: r, height: r, viewBox: \"0 0 100 100\", fill: \"none\", children: [\n /* @__PURE__ */ e(\"ellipse\", { cx: \"50\", cy: \"50\", rx: \"35\", ry: \"30\", fill: \"url(#nebulaGradient)\", opacity: \"0.8\" }),\n /* @__PURE__ */ e(\"ellipse\", { cx: \"40\", cy: \"45\", rx: \"20\", ry: \"25\", fill: \"url(#nebulaPink)\", opacity: \"0.6\" }),\n /* @__PURE__ */ e(\"ellipse\", { cx: \"60\", cy: \"55\", rx: \"25\", ry: \"20\", fill: \"url(#nebulaBlue)\", opacity: \"0.6\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"50\", cy: \"50\", r: \"15\", fill: \"#312E81\", opacity: \"0.9\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"46\", cy: \"47\", r: \"2\", fill: \"#E0E7FF\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"54\", cy: \"47\", r: \"2\", fill: \"#E0E7FF\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M47 53 Q50 56 53 53\", stroke: \"#E0E7FF\", strokeWidth: \"1.5\", fill: \"none\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"25\", cy: \"30\", r: \"1\", fill: \"#FFF\", opacity: \"0.9\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"75\", cy: \"25\", r: \"1.5\", fill: \"#FFF\", opacity: \"0.8\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"30\", cy: \"75\", r: \"1\", fill: \"#FFF\", opacity: \"0.9\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"70\", cy: \"75\", r: \"1.5\", fill: \"#FFF\", opacity: \"0.7\" }),\n /* @__PURE__ */ w(\"defs\", { children: [\n /* @__PURE__ */ w(\"radialGradient\", { id: \"nebulaGradient\", cx: \"50%\", cy: \"50%\", r: \"70%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#7C3AED\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"#312E81\" })\n ] }),\n /* @__PURE__ */ w(\"radialGradient\", { id: \"nebulaPink\", cx: \"50%\", cy: \"50%\", r: \"70%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#F472B6\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"#BE185D\" })\n ] }),\n /* @__PURE__ */ w(\"radialGradient\", { id: \"nebulaBlue\", cx: \"50%\", cy: \"50%\", r: \"70%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#3B82F6\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"#1E40AF\" })\n ] })\n ] })\n ] });\n}\nfunction zt({ size: r }) {\n return /* @__PURE__ */ w(\"svg\", { width: r, height: r, viewBox: \"0 0 100 100\", fill: \"none\", children: [\n /* @__PURE__ */ e(\"circle\", { cx: \"50\", cy: \"50\", r: \"32\", fill: \"url(#planetGradient)\" }),\n /* @__PURE__ */ e(\"ellipse\", { cx: \"50\", cy: \"50\", rx: \"45\", ry: \"8\", fill: \"none\", stroke: \"#A78BFA\", strokeWidth: \"2\", opacity: \"0.7\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"38\", cy: \"40\", r: \"5\", fill: \"#065F46\", opacity: \"0.6\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"62\", cy: \"45\", r: \"4\", fill: \"#065F46\", opacity: \"0.6\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"45\", cy: \"62\", r: \"3\", fill: \"#065F46\", opacity: \"0.6\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"46\", cy: \"48\", r: \"2.5\", fill: \"#1F2937\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"54\", cy: \"48\", r: \"2.5\", fill: \"#1F2937\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M47 55 Q50 58 53 55\", stroke: \"#1F2937\", strokeWidth: \"2\", fill: \"none\" }),\n /* @__PURE__ */ e(\"defs\", { children: /* @__PURE__ */ w(\"radialGradient\", { id: \"planetGradient\", cx: \"30%\", cy: \"30%\", r: \"80%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#A7F3D0\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"0.6\", stopColor: \"#34D399\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"#059669\" })\n ] }) })\n ] });\n}\nfunction Mt({ size: r }) {\n return /* @__PURE__ */ w(\"svg\", { width: r, height: r, viewBox: \"0 0 100 100\", fill: \"none\", children: [\n /* @__PURE__ */ e(\"circle\", { cx: \"50\", cy: \"55\", r: \"28\", fill: \"url(#catGradient)\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M28 40 L38 25 L42 45 Z\", fill: \"#6366F1\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M58 45 L62 25 L72 40 Z\", fill: \"#6366F1\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M32 38 L36 30 L38 40 Z\", fill: \"#EC4899\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M62 40 L64 30 L68 38 Z\", fill: \"#EC4899\" }),\n /* @__PURE__ */ e(\"ellipse\", { cx: \"43\", cy: \"50\", rx: \"4\", ry: \"6\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"ellipse\", { cx: \"57\", cy: \"50\", rx: \"4\", ry: \"6\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"ellipse\", { cx: \"43\", cy: \"52\", rx: \"1.5\", ry: \"4\", fill: \"#1F2937\" }),\n /* @__PURE__ */ e(\"ellipse\", { cx: \"57\", cy: \"52\", rx: \"1.5\", ry: \"4\", fill: \"#1F2937\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M48 58 L50 60 L52 58 Z\", fill: \"#EC4899\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M50 60 Q46 64 42 62\", stroke: \"#1F2937\", strokeWidth: \"1.5\", fill: \"none\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M50 60 Q54 64 58 62\", stroke: \"#1F2937\", strokeWidth: \"1.5\", fill: \"none\" }),\n /* @__PURE__ */ e(\"line\", { x1: \"25\", y1: \"55\", x2: \"35\", y2: \"57\", stroke: \"#1F2937\", strokeWidth: \"1\" }),\n /* @__PURE__ */ e(\"line\", { x1: \"65\", y1: \"57\", x2: \"75\", y2: \"55\", stroke: \"#1F2937\", strokeWidth: \"1\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"20\", cy: \"25\", r: \"1.5\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"80\", cy: \"30\", r: \"1\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"15\", cy: \"70\", r: \"1\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"defs\", { children: /* @__PURE__ */ w(\"radialGradient\", { id: \"catGradient\", cx: \"50%\", cy: \"40%\", r: \"70%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#A78BFA\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"#6366F1\" })\n ] }) })\n ] });\n}\nfunction Tt({ size: r }) {\n return /* @__PURE__ */ w(\"svg\", { width: r, height: r, viewBox: \"0 0 100 100\", fill: \"none\", children: [\n /* @__PURE__ */ e(\"circle\", { cx: \"35\", cy: \"55\", r: \"18\", fill: \"url(#cloudGradient)\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"55\", cy: \"50\", r: \"22\", fill: \"url(#cloudGradient)\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"45\", cy: \"65\", r: \"15\", fill: \"url(#cloudGradient)\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"65\", cy: \"60\", r: \"16\", fill: \"url(#cloudGradient)\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"48\", cy: \"52\", r: \"2.5\", fill: \"#6366F1\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"56\", cy: \"52\", r: \"2.5\", fill: \"#6366F1\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M49 58 Q52 62 55 58\", stroke: \"#6366F1\", strokeWidth: \"2\", fill: \"none\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"70\", cy: \"35\", r: \"3\", fill: \"rgba(167, 139, 250, 0.3)\", stroke: \"#A78BFA\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"78\", cy: \"28\", r: \"2\", fill: \"rgba(167, 139, 250, 0.3)\", stroke: \"#A78BFA\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"83\", cy: \"20\", r: \"1.5\", fill: \"rgba(167, 139, 250, 0.3)\", stroke: \"#A78BFA\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"70\", cy: \"35\", r: \"0.5\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"78\", cy: \"28\", r: \"0.5\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"defs\", { children: /* @__PURE__ */ w(\"radialGradient\", { id: \"cloudGradient\", cx: \"50%\", cy: \"40%\", r: \"70%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#F8FAFC\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"#E2E8F0\" })\n ] }) })\n ] });\n}\nfunction Bt({ size: r }) {\n return /* @__PURE__ */ w(\"svg\", { width: r, height: r, viewBox: \"0 0 100 100\", fill: \"none\", children: [\n /* @__PURE__ */ e(\"ellipse\", { cx: \"50\", cy: \"45\", rx: \"15\", ry: \"30\", fill: \"url(#rocketGradient)\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M35 20 L50 10 L65 20 L50 25 Z\", fill: \"#EF4444\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"50\", cy: \"35\", r: \"8\", fill: \"#DBEAFE\", stroke: \"#2563EB\", strokeWidth: \"2\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"47\", cy: \"33\", r: \"1.5\", fill: \"#1F2937\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"53\", cy: \"33\", r: \"1.5\", fill: \"#1F2937\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M48 37 Q50 39 52 37\", stroke: \"#1F2937\", strokeWidth: \"1\", fill: \"none\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M35 60 L25 70 L35 75 Z\", fill: \"#6B7280\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M65 60 L75 70 L65 75 Z\", fill: \"#6B7280\" }),\n /* @__PURE__ */ e(\"ellipse\", { cx: \"50\", cy: \"80\", rx: \"8\", ry: \"12\", fill: \"#F59E0B\" }),\n /* @__PURE__ */ e(\"ellipse\", { cx: \"50\", cy: \"82\", rx: \"5\", ry: \"8\", fill: \"#EF4444\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"25\", cy: \"20\", r: \"1\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"75\", cy: \"25\", r: \"1.5\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"defs\", { children: /* @__PURE__ */ w(\"radialGradient\", { id: \"rocketGradient\", cx: \"30%\", cy: \"30%\", r: \"80%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#E5E7EB\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"#9CA3AF\" })\n ] }) })\n ] });\n}\nfunction Rt({ size: r }) {\n return /* @__PURE__ */ w(\"svg\", { width: r, height: r, viewBox: \"0 0 100 100\", fill: \"none\", children: [\n /* @__PURE__ */ e(\"circle\", { cx: \"50\", cy: \"50\", r: \"38\", fill: \"url(#constellationBg)\", opacity: \"0.8\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"35\", cy: \"25\", r: \"2\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"50\", cy: \"30\", r: \"2.5\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"65\", cy: \"35\", r: \"2\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"30\", cy: \"50\", r: \"1.5\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"70\", cy: \"50\", r: \"2\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"40\", cy: \"70\", r: \"2.5\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"60\", cy: \"75\", r: \"1.5\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"line\", { x1: \"35\", y1: \"25\", x2: \"50\", y2: \"30\", stroke: \"#A78BFA\", strokeWidth: \"1\", opacity: \"0.7\" }),\n /* @__PURE__ */ e(\"line\", { x1: \"50\", y1: \"30\", x2: \"65\", y2: \"35\", stroke: \"#A78BFA\", strokeWidth: \"1\", opacity: \"0.7\" }),\n /* @__PURE__ */ e(\"line\", { x1: \"30\", y1: \"50\", x2: \"50\", y2: \"30\", stroke: \"#A78BFA\", strokeWidth: \"1\", opacity: \"0.7\" }),\n /* @__PURE__ */ e(\"line\", { x1: \"50\", y1: \"30\", x2: \"70\", y2: \"50\", stroke: \"#A78BFA\", strokeWidth: \"1\", opacity: \"0.7\" }),\n /* @__PURE__ */ e(\"line\", { x1: \"30\", y1: \"50\", x2: \"40\", y2: \"70\", stroke: \"#A78BFA\", strokeWidth: \"1\", opacity: \"0.7\" }),\n /* @__PURE__ */ e(\"line\", { x1: \"70\", y1: \"50\", x2: \"60\", y2: \"75\", stroke: \"#A78BFA\", strokeWidth: \"1\", opacity: \"0.7\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"48\", cy: \"48\", r: \"2\", fill: \"#E0E7FF\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"52\", cy: \"48\", r: \"2\", fill: \"#E0E7FF\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M48 54 Q50 56 52 54\", stroke: \"#E0E7FF\", strokeWidth: \"1.5\", fill: \"none\" }),\n /* @__PURE__ */ e(\"defs\", { children: /* @__PURE__ */ w(\"radialGradient\", { id: \"constellationBg\", cx: \"50%\", cy: \"50%\", r: \"70%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#1E1B4B\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"#0F0D2A\" })\n ] }) })\n ] });\n}\nfunction Lt({ size: r }) {\n return /* @__PURE__ */ w(\"svg\", { width: r, height: r, viewBox: \"0 0 100 100\", fill: \"none\", children: [\n /* @__PURE__ */ e(\"circle\", { cx: \"35\", cy: \"35\", r: \"18\", fill: \"url(#cometGradient)\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"31\", cy: \"31\", r: \"2\", fill: \"#1F2937\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"39\", cy: \"31\", r: \"2\", fill: \"#1F2937\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M32 38 Q35 41 38 38\", stroke: \"#1F2937\", strokeWidth: \"1.5\", fill: \"none\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M50 50 Q65 65 85 85\", stroke: \"url(#tailGradient1)\", strokeWidth: \"8\", opacity: \"0.7\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M48 52 Q60 68 75 88\", stroke: \"url(#tailGradient2)\", strokeWidth: \"6\", opacity: \"0.5\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M52 48 Q70 62 90 82\", stroke: \"url(#tailGradient3)\", strokeWidth: \"4\", opacity: \"0.3\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"60\", cy: \"60\", r: \"1.5\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"70\", cy: \"70\", r: \"1\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"80\", cy: \"80\", r: \"0.8\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ w(\"defs\", { children: [\n /* @__PURE__ */ w(\"radialGradient\", { id: \"cometGradient\", cx: \"30%\", cy: \"30%\", r: \"80%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#FEF3C7\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"#F59E0B\" })\n ] }),\n /* @__PURE__ */ w(\"linearGradient\", { id: \"tailGradient1\", x1: \"50%\", y1: \"50%\", x2: \"85%\", y2: \"85%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"transparent\" })\n ] }),\n /* @__PURE__ */ w(\"linearGradient\", { id: \"tailGradient2\", x1: \"48%\", y1: \"52%\", x2: \"75%\", y2: \"88%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#F472B6\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"transparent\" })\n ] }),\n /* @__PURE__ */ w(\"linearGradient\", { id: \"tailGradient3\", x1: \"52%\", y1: \"48%\", x2: \"90%\", y2: \"82%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#A78BFA\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"transparent\" })\n ] })\n ] })\n ] });\n}\nfunction Vt({ size: r }) {\n return /* @__PURE__ */ w(\"svg\", { width: r, height: r, viewBox: \"0 0 100 100\", fill: \"none\", children: [\n /* @__PURE__ */ e(\"circle\", { cx: \"50\", cy: \"50\", r: \"40\", fill: \"url(#twilightGradient)\" }),\n /* @__PURE__ */ e(\"ellipse\", { cx: \"50\", cy: \"65\", rx: \"25\", ry: \"15\", fill: \"#1F2937\", opacity: \"0.8\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"30\", cy: \"25\", r: \"1.5\", fill: \"#FFF\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"70\", cy: \"30\", r: \"1\", fill: \"#FFF\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"40\", cy: \"35\", r: \"1.2\", fill: \"#FFF\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"60\", cy: \"25\", r: \"0.8\", fill: \"#FFF\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M20 40 Q15 35 20 30 Q25 35 20 40\", fill: \"#FCD34D\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"47\", cy: \"62\", r: \"1.5\", fill: \"#E0E7FF\" }),\n /* @__PURE__ */ e(\"circle\", { cx: \"53\", cy: \"62\", r: \"1.5\", fill: \"#E0E7FF\" }),\n /* @__PURE__ */ e(\"path\", { d: \"M48 67 Q50 69 52 67\", stroke: \"#E0E7FF\", strokeWidth: \"1\", fill: \"none\" }),\n /* @__PURE__ */ e(\"defs\", { children: /* @__PURE__ */ w(\"radialGradient\", { id: \"twilightGradient\", cx: \"50%\", cy: \"30%\", r: \"80%\", children: [\n /* @__PURE__ */ e(\"stop\", { stopColor: \"#7C3AED\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"0.7\", stopColor: \"#3730A3\" }),\n /* @__PURE__ */ e(\"stop\", { offset: \"1\", stopColor: \"#1E1B4B\" })\n ] }) })\n ] });\n}\nconst Gt = {\n astronaut: Ft,\n moon: St,\n star: At,\n galaxy: It,\n nebula: $t,\n planet: zt,\n \"cosmic-cat\": Mt,\n \"dream-cloud\": Tt,\n rocket: Bt,\n constellation: Rt,\n comet: Lt,\n twilight: Vt\n}, jt = {\n xs: { size: \"w-8 h-8\", iconSize: \"24\" },\n sm: { size: \"w-10 h-10\", iconSize: \"32\" },\n md: { size: \"w-12 h-12\", iconSize: \"40\" },\n lg: { size: \"w-16 h-16\", iconSize: \"56\" },\n xl: { size: \"w-20 h-20\", iconSize: \"72\" },\n \"2xl\": { size: \"w-24 h-24\", iconSize: \"88\" }\n}, Wt = {\n circle: \"rounded-full\",\n square: \"rounded-lg\"\n};\nfunction na({\n id: r,\n ref: o,\n size: t = \"md\",\n shape: s = \"circle\",\n preset: n,\n alt: a,\n className: l,\n src: d,\n initials: i,\n ...f\n}) {\n const u = jt[t], c = Wt[s], m = n ? Gt[n] : null;\n return /* @__PURE__ */ e(\n \"div\",\n {\n id: r,\n ref: o,\n className: k(\n \"relative inline-flex items-center justify-center overflow-hidden bg-gray-100 border-2 border-border\",\n u.size,\n c,\n l\n ),\n \"data-size\": t,\n \"data-shape\": s,\n \"data-preset\": n,\n role: \"img\",\n \"aria-label\": a || `Avatar ${n ? `of ${n}` : \"\"}`,\n ...f,\n children: d ? /* @__PURE__ */ e(\"img\", { src: d, alt: a || \"User avatar\", className: \"w-full h-full object-cover\" }) : m ? /* @__PURE__ */ e(m, { size: u.iconSize }) : i ? /* @__PURE__ */ e(\"span\", { className: \"text-gray-600 font-medium text-sm\", children: i.slice(0, 2).toUpperCase() }) : /* @__PURE__ */ e(\"div\", { className: \"w-full h-full bg-gradient-to-br from-gray-300 to-gray-400\" })\n }\n );\n}\nconst _t = {\n decorative: { \"aria-hidden\": !0 },\n status: { role: \"status\" },\n alert: { role: \"alert\" }\n}, Kt = {\n base: \"\",\n primary: \"bg-primary text-primary-foreground\",\n secondary: \"bg-secondary text-secondary-foreground\",\n accent: \"bg-accent text-accent-foreground\",\n destructive: \"bg-destructive text-destructive-foreground\",\n success: \"bg-success text-success-foreground\",\n warning: \"bg-warning text-warning-foreground\",\n muted: \"bg-muted text-muted-foreground\"\n}, Pt = {\n base: \"\",\n primary: \"border border-primary bg-transparent text-primary\",\n secondary: \"border border-secondary bg-transparent text-secondary\",\n accent: \"border border-accent bg-transparent text-accent\",\n destructive: \"border border-destructive bg-transparent text-destructive\",\n success: \"border border-success bg-transparent text-success\",\n warning: \"border border-warning bg-transparent text-warning\",\n muted: \"border border-muted-foreground bg-transparent text-muted-foreground\"\n}, Ee = {\n xs: {\n text: \"text-xs\",\n aspectSquare: \"p-1\",\n aspectVideo: \"px-2 py-0.5\"\n },\n sm: {\n text: \"text-sm\",\n aspectSquare: \"p-1.5\",\n aspectVideo: \"px-2.5 py-1\"\n },\n md: {\n text: \"text-base\",\n aspectSquare: \"p-2\",\n aspectVideo: \"px-3 py-1.5\"\n }\n};\nfunction aa({\n id: r,\n ref: o,\n variant: t = \"muted\",\n outline: s = !1,\n children: n,\n className: a,\n aspect: l = \"video\",\n use: d = \"decorative\",\n size: i = \"xs\",\n ...f\n}) {\n return /* @__PURE__ */ e(\n \"span\",\n {\n id: r,\n ref: o,\n className: k(\n \"font-medium rounded-full inline-flex select-none\",\n Ee[i].text,\n l === \"square\" && Ee[i].aspectSquare,\n l === \"video\" && Ee[i].aspectVideo,\n s ? Pt[t] : Kt[t],\n a\n ),\n \"data-variant\": t,\n \"data-outline\": s,\n \"data-aspect\": l,\n \"data-use\": d,\n \"data-size\": i,\n ..._t[d],\n ...f,\n children: n\n }\n );\n}\nfunction qt() {\n const [r, o] = R(0);\n return V(() => {\n const t = setInterval(() => {\n o((s) => (s + 1) % 3);\n }, 500);\n return () => clearInterval(t);\n }, []), /* @__PURE__ */ e(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((t) => /* @__PURE__ */ e(\n \"div\",\n {\n className: k(\n \"rounded-full transition-all ease-in-out size-[0.35em] bg-current\",\n r === t && \"transform -translate-y-1\"\n )\n },\n t\n )) });\n}\nconst Ht = {\n base: \"focus:outline-current\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/80 focus:outline-primary outline-offset-2 disabled:bg-muted disabled:text-muted-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80 focus:outline-secondary outline-offset-2 disabled:bg-muted/80 disabled:text-muted-foreground/80\",\n tertiary: \"text-primary hover:text-primary/80 disabled:text-muted-foreground focus:outline-primary\",\n outline: \"border border-primary text-primary hover:border-primary/80 hover:text-primary/80 focus:outline-primary outline-offset-2 disabled:border-muted-foreground disabled:text-muted-foreground\",\n link: \"underline-offset-4 hover:underline disabled:underline disabled:text-muted-foreground focus:outline-current\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/80 focus:outline-destructive outline-offset-2 disabled:bg-muted disabled:text-muted-foreground\"\n}, Zt = {\n stripped: \"\",\n fitted: \"size-fit leading-0\",\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}, Yt = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, Fe = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction Qt({\n variant: r = Fe.variant,\n size: o,\n rounded: t = Fe.rounded,\n loading: s,\n className: n,\n ...a\n}) {\n let l;\n r === \"link\" && !o ? l = \"fitted\" : l = o || Fe.size;\n const i = k(\n \"appearance-none not-disabled:hover:cursor-pointer outline outline-transparent disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n Ht[r],\n Zt[l],\n Yt[t],\n s && \"relative pointer-events-none\",\n n\n );\n if (a.href && !a.disabled)\n return /* @__PURE__ */ e(\n \"a\",\n {\n ...a,\n rel: a.rel ? a.rel : a.target === \"_blank\" ? \"noopener noreferrer\" : void 0,\n \"aria-label\": a[\"aria-label\"],\n \"aria-description\": a[\"aria-description\"],\n href: a.href,\n className: i,\n children: a.children\n }\n );\n const f = a, u = () => f.children ? typeof f.children == \"string\" || typeof f.children == \"number\" || typeof f.children == \"boolean\" ? /* @__PURE__ */ e(\"span\", { className: k(s && \"invisible\"), children: f.children }) : Y.Children.map(f.children, (m, p) => {\n if (Y.isValidElement(m)) {\n const x = m.props;\n return Y.cloneElement(m, {\n key: p,\n className: k(s && \"invisible\", x.className)\n });\n }\n return m;\n }) : null;\n return /* @__PURE__ */ w(\n \"button\",\n {\n ...f,\n \"aria-label\": f[\"aria-label\"],\n \"aria-description\": f[\"aria-description\"],\n \"aria-disabled\": f.disabled || s,\n \"aria-busy\": s,\n type: f.type ?? \"button\",\n className: i,\n children: [\n s && /* @__PURE__ */ e(qt, {}),\n u()\n ]\n }\n );\n}\nfunction Ut(r = {}) {\n const {\n initialDate: o = /* @__PURE__ */ new Date(),\n mode: t = \"single\",\n minDate: s,\n maxDate: n,\n view: a = \"month\",\n onDateSelect: l,\n onRangeSelect: d\n } = r, [i, f] = R({\n currentDate: o,\n selectedDate: t === \"single\" ? o : null,\n selectedRange: null,\n view: a\n }), u = $(\n (E) => !!(s && E < s || n && E > n),\n [s, n]\n ), c = $(\n (E) => {\n u(E) || (t === \"single\" ? (f((C) => ({ ...C, selectedDate: E })), l == null || l(E)) : t === \"range\" && f((C) => {\n const { selectedRange: z } = C;\n if (!(z != null && z.start) || z.start && z.end) {\n const T = { start: E, end: null };\n return d == null || d(T), { ...C, selectedRange: T };\n } else {\n const T = z.start, M = E, I = {\n start: T < M ? T : M,\n end: T < M ? M : T\n };\n return d == null || d(I), { ...C, selectedRange: I };\n }\n }));\n },\n [t, u, l, d]\n ), m = $((E) => {\n f((C) => {\n const z = new Date(C.currentDate);\n return E === \"prev\" ? z.setMonth(z.getMonth() - 1) : z.setMonth(z.getMonth() + 1), { ...C, currentDate: z };\n });\n }, []), p = $((E) => {\n f((C) => {\n const z = new Date(C.currentDate), T = E === \"prev\" ? -7 : 7;\n return z.setDate(z.getDate() + T), { ...C, currentDate: z };\n });\n }, []), x = $((E) => {\n f((C) => {\n const z = new Date(C.currentDate), T = E === \"prev\" ? -1 : 1;\n return z.setDate(z.getDate() + T), { ...C, currentDate: z };\n });\n }, []), y = $(\n (E) => {\n i.view === \"month\" ? m(E) : i.view === \"week\" ? p(E) : x(E);\n },\n [i.view, m, p, x]\n ), b = $((E) => {\n f((C) => ({ ...C, view: E }));\n }, []), D = $((E) => {\n f((C) => ({ ...C, currentDate: E }));\n }, []), h = $((E) => {\n f((C) => {\n const z = new Date(C.currentDate);\n return z.setMonth(E), { ...C, currentDate: z };\n });\n }, []), g = $((E) => {\n f((C) => {\n const z = new Date(C.currentDate);\n return z.setFullYear(E), { ...C, currentDate: z };\n });\n }, []), v = ne(() => {\n const { currentDate: E, view: C } = i, z = [];\n if (C === \"month\") {\n const T = new Date(E.getFullYear(), E.getMonth(), 1), M = new Date(T);\n M.setDate(M.getDate() - T.getDay());\n for (let I = 0; I < 42; I++) {\n const G = new Date(M);\n G.setDate(G.getDate() + I), z.push(G);\n }\n } else if (C === \"week\") {\n const T = new Date(E);\n T.setDate(E.getDate() - E.getDay());\n for (let M = 0; M < 7; M++) {\n const I = new Date(T);\n I.setDate(I.getDate() + M), z.push(I);\n }\n } else\n z.push(new Date(E));\n return z;\n }, [i]), F = $(\n (E) => {\n if (t === \"single\")\n return i.selectedDate && E.toDateString() === i.selectedDate.toDateString();\n if (t === \"range\" && i.selectedRange) {\n const { start: C, end: z } = i.selectedRange;\n if (C && z)\n return E >= C && E <= z;\n if (C)\n return E.toDateString() === C.toDateString();\n }\n return !1;\n },\n [t, i.selectedDate, i.selectedRange]\n ), B = $(\n (E) => {\n var C, z;\n if (t === \"range\" && ((C = i.selectedRange) != null && C.start) && ((z = i.selectedRange) != null && z.end)) {\n const { start: T, end: M } = i.selectedRange;\n return E > T && E < M;\n }\n return !1;\n },\n [t, i.selectedRange]\n ), N = $(\n (E) => {\n var C;\n return t === \"range\" && ((C = i.selectedRange) != null && C.start) ? E.toDateString() === i.selectedRange.start.toDateString() : !1;\n },\n [t, i.selectedRange]\n ), A = $(\n (E) => {\n var C;\n return t === \"range\" && ((C = i.selectedRange) != null && C.end) ? E.toDateString() === i.selectedRange.end.toDateString() : !1;\n },\n [t, i.selectedRange]\n );\n return {\n // State\n currentDate: i.currentDate,\n selectedDate: i.selectedDate,\n selectedRange: i.selectedRange,\n view: i.view,\n // Data\n daysInView: v,\n // Actions\n selectDate: c,\n navigate: y,\n changeView: b,\n goToDate: D,\n changeMonth: h,\n changeYear: g,\n // Checkers\n isDateSelected: F,\n isDateDisabled: u,\n isDateInRange: B,\n isDateRangeStart: N,\n isDateRangeEnd: A\n };\n}\nconst Jt = {\n small: {\n container: \"text-xs\",\n cell: \"w-7 h-7 text-xs\",\n header: \"text-sm px-2 py-1\",\n navigation: \"p-1\",\n weekdays: \"text-xs px-1 py-1\"\n },\n medium: {\n container: \"text-sm\",\n cell: \"w-9 h-9 text-sm\",\n header: \"text-base px-3 py-2\",\n navigation: \"p-2\",\n weekdays: \"text-sm px-2 py-2\"\n },\n large: {\n container: \"text-base\",\n cell: \"w-12 h-12 text-base\",\n header: \"text-lg px-4 py-3\",\n navigation: \"p-3\",\n weekdays: \"text-base px-3 py-2\"\n },\n auto: {\n container: \"w-full h-full\",\n cell: \"flex-1 min-h-[2rem] text-sm\",\n header: \"text-base px-3 py-2\",\n navigation: \"p-2\",\n weekdays: \"text-sm px-2 py-2\"\n }\n}, Xt = {\n month: \"grid-cols-7\",\n week: \"grid-cols-7\",\n day: \"grid-cols-1\"\n}, Le = {\n size: \"medium\",\n view: \"month\"\n}, Ot = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"], me = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n], Ve = 100;\nfunction oa({\n id: r,\n ref: o,\n className: t,\n size: s = Le.size,\n customStyles: n = {},\n view: a = Le.view,\n mode: l = \"single\",\n initialDate: d,\n minDate: i,\n maxDate: f,\n renderCell: u,\n showViewSelector: c = !1,\n showNavigation: m = !0,\n navigationLayout: p = \"around\",\n useMonthYearSelector: x = !1,\n showTodayButton: y = !1,\n onDateSelect: b,\n onRangeSelect: D,\n ...h\n}) {\n const g = Ut({\n initialDate: d,\n mode: l,\n minDate: i,\n maxDate: f,\n view: a,\n onDateSelect: b,\n onRangeSelect: D\n }), v = Jt[s], F = Xt[g.view], B = (S) => {\n const j = /* @__PURE__ */ new Date();\n return S.toDateString() === j.toDateString();\n }, N = (S) => S.getMonth() === g.currentDate.getMonth() && S.getFullYear() === g.currentDate.getFullYear(), A = () => {\n g.goToDate(/* @__PURE__ */ new Date());\n }, E = () => {\n const { currentDate: S, view: j } = g, X = me[S.getMonth()], U = S.getFullYear();\n if (j === \"month\")\n return `${X} ${U}`;\n if (j === \"week\") {\n const P = new Date(S);\n P.setDate(S.getDate() - S.getDay());\n const O = new Date(P);\n return O.setDate(O.getDate() + 6), P.getMonth() === O.getMonth() ? `${X} ${P.getDate()}-${O.getDate()}, ${U}` : `${me[P.getMonth()]} ${P.getDate()} - ${me[O.getMonth()]} ${O.getDate()}, ${U}`;\n }\n return `${X} ${S.getDate()}, ${U}`;\n }, C = () => c ? /* @__PURE__ */ e(\"div\", { className: K, children: [\"month\", \"week\", \"day\"].map((S) => /* @__PURE__ */ e(\n \"button\",\n {\n onClick: () => g.changeView(S),\n className: k(\n \"px-2 py-1 rounded capitalize transition-colors\",\n g.view === S ? \"bg-accent text-accent-foreground\" : \"hover:bg-accent/20\"\n ),\n children: S\n },\n S\n )) }) : null, z = () => {\n if (!x) return null;\n const S = g.currentDate.getMonth(), j = g.currentDate.getFullYear(), X = j - Ve, U = j + Ve, P = [];\n for (let H = X; H <= U; H++)\n P.push(H);\n const O = k(\n \"border border-border rounded px-2 py-1 text-sm focus:outline-none focus:border-accent focus:ring-2 focus:ring-accent/50\",\n n.monthYearSelectorsClassName\n );\n return /* @__PURE__ */ w(\"div\", { className: \"flex items-center gap-2\", children: [\n /* @__PURE__ */ e(\n \"select\",\n {\n value: S,\n onChange: (H) => g.changeMonth(parseInt(H.target.value)),\n className: O,\n children: me.map((H, ce) => /* @__PURE__ */ e(\"option\", { value: ce, children: H }, H))\n }\n ),\n /* @__PURE__ */ e(\n \"select\",\n {\n value: j,\n onChange: (H) => g.changeYear(parseInt(H.target.value)),\n className: O,\n children: P.map((H) => /* @__PURE__ */ e(\"option\", { value: H, children: H }, H))\n }\n )\n ] });\n }, T = () => {\n if (!y) return null;\n const S = k(\n \"px-3 py-1 text-xs rounded border border-border hover:bg-accent/20 transition-colors focus:outline-none focus:ring focus:ring-accent/50\",\n n.todayButtonClassName\n );\n return /* @__PURE__ */ e(\"button\", { onClick: A, className: S, \"aria-label\": \"Go to today\", children: \"Today\" });\n }, M = (S) => {\n const j = g.isDateSelected(S), X = g.isDateDisabled(S), U = B(S), P = g.isDateInRange(S), O = g.isDateRangeStart(S), H = g.isDateRangeEnd(S), ce = N(S), de = k(\n \"w-full flex items-center justify-center transition-colors cursor-pointer\",\n \"focus:outline-none\",\n v.cell\n ), _ = k(\n !P && \"rounded-md\",\n !j && \"hover:bg-accent/20 focus:bg-accent/20\",\n de,\n n.cellClassName,\n // Selection states\n j && k(\"bg-accent text-accent-foreground\", n.selectedCellClassName),\n // Range states\n P && k(\"bg-accent/30\", n.rangeCellClassName),\n O && k(\"bg-accent text-accent-foreground rounded-r-none\", n.rangeStartCellClassName),\n H && k(\"bg-accent text-accent-foreground rounded-l-none\", n.rangeEndCellClassName),\n // Today\n U && !j && k(\"border border-accent\", n.todayCellClassName),\n // Disabled\n X && k(\"opacity-50 cursor-not-allowed hover:bg-transparent\", n.disabledCellClassName),\n // Month view: dim dates from other months\n g.view === \"month\" && !ce && \"text-muted-foreground/50\"\n ), ee = u ? u(S, !!j, X, U) : S.getDate();\n return /* @__PURE__ */ e(\n \"button\",\n {\n onClick: () => g.selectDate(S),\n disabled: X,\n className: _,\n \"data-date\": S.toISOString().split(\"T\")[0],\n \"data-selected\": !!j,\n \"data-disabled\": X,\n \"data-today\": U,\n \"aria-label\": `${S.getDate()} ${me[S.getMonth()]} ${S.getFullYear()}`,\n \"aria-selected\": !!j,\n \"aria-disabled\": X,\n children: ee\n },\n S.toISOString()\n );\n }, I = k(\n \"bg-background border rounded-lg\",\n v.container,\n n.containerClassName,\n t\n ), G = k(\n \"flex items-center border-b px-4 py-2\",\n \"justify-between\",\n v.header,\n n.headerClassName\n ), W = k(\"flex items-center gap-1\", n.navigationClassName), Q = k(\n \"p-1 rounded hover:bg-accent/20 transition-colors\",\n v.navigation,\n n.prevButtonClassName\n ), re = k(\n \"p-1 rounded hover:bg-accent/20 transition-colors\",\n v.navigation,\n n.nextButtonClassName\n ), L = k(\"font-semibold text-foreground\", n.titleClassName), K = k(\"flex gap-1 text-xs\", n.viewSelectorClassName), ae = k(\n \"grid grid-cols-7 border-b text-muted-foreground font-medium\",\n v.weekdays,\n n.weekdaysClassName\n ), le = k(\"text-center\", n.weekdayClassName), ie = k(\n \"grid gap-y-1 p-2\",\n g.view === \"month\" && F,\n g.view === \"week\" && k(F, n.weekGridClassName),\n g.view === \"day\" && k(F, n.dayGridClassName),\n g.view === \"month\" && n.monthGridClassName\n );\n return /* @__PURE__ */ w(\n \"div\",\n {\n id: r,\n ref: o,\n className: I,\n \"data-size\": s,\n \"data-view\": g.view,\n \"data-mode\": l,\n role: \"application\",\n \"aria-label\": \"Calendar\",\n ...h,\n children: [\n /* @__PURE__ */ w(\"div\", { className: G, children: [\n p === \"adjacent\" && /* @__PURE__ */ w(te, { children: [\n /* @__PURE__ */ w(\"div\", { className: \"flex items-center gap-4\", children: [\n m && /* @__PURE__ */ w(\"div\", { className: W, children: [\n /* @__PURE__ */ e(\"button\", { onClick: () => g.navigate(\"prev\"), className: Q, \"aria-label\": \"Previous\", children: /* @__PURE__ */ e(ye, { className: \"w-4 h-4\" }) }),\n /* @__PURE__ */ e(\"button\", { onClick: () => g.navigate(\"next\"), className: re, \"aria-label\": \"Next\", children: /* @__PURE__ */ e(he, { className: \"w-4 h-4\" }) })\n ] }),\n /* @__PURE__ */ w(\"div\", { className: \"flex items-center gap-3\", children: [\n !x && /* @__PURE__ */ e(\"h2\", { className: L, children: E() }),\n z()\n ] })\n ] }),\n /* @__PURE__ */ w(\"div\", { className: \"flex items-center gap-2\", children: [\n C(),\n T()\n ] })\n ] }),\n p === \"around\" && /* @__PURE__ */ w(te, { children: [\n m && /* @__PURE__ */ e(\"button\", { onClick: () => g.navigate(\"prev\"), className: Q, \"aria-label\": \"Previous\", children: /* @__PURE__ */ e(ye, { className: \"w-4 h-4\" }) }),\n /* @__PURE__ */ w(\"div\", { className: \"flex flex-col items-center gap-2\", children: [\n /* @__PURE__ */ w(\"div\", { className: \"flex items-center gap-3\", children: [\n !x && /* @__PURE__ */ e(\"h2\", { className: L, children: E() }),\n z()\n ] }),\n /* @__PURE__ */ w(\"div\", { className: \"flex items-center gap-2\", children: [\n C(),\n T()\n ] })\n ] }),\n m && /* @__PURE__ */ e(\"button\", { onClick: () => g.navigate(\"next\"), className: re, \"aria-label\": \"Next\", children: /* @__PURE__ */ e(he, { className: \"w-4 h-4\" }) })\n ] })\n ] }),\n (g.view === \"month\" || g.view === \"week\") && /* @__PURE__ */ e(\"div\", { className: ae, children: Ot.map((S) => /* @__PURE__ */ e(\"div\", { className: le, children: S }, S)) }),\n /* @__PURE__ */ e(\n \"div\",\n {\n className: ie,\n children: g.daysInView.map((S) => M(S))\n },\n `${g.currentDate.getFullYear()}-${g.currentDate.getMonth()}-${g.view}`\n )\n ]\n }\n );\n}\nconst er = {\n info: {\n border: \"border-blue-600\",\n interior: \"bg-blue-800/20\",\n core: \"text-blue-400\",\n description: \"text-blue-200\"\n },\n destructive: {\n border: \"border-destructive\",\n interior: \"bg-destructive/10\",\n core: \"text-destructive\",\n description: \"text-destructive\"\n },\n success: {\n border: \"border-success\",\n interior: \"bg-success/10\",\n core: \"text-success\",\n description: \"text-success\"\n },\n warning: {\n border: \"border-yellow-700\",\n interior: \"bg-yellow-800/20\",\n core: \"text-yellow-400\",\n description: \"text-yellow-200\"\n },\n base: {\n border: \"\",\n interior: \"\",\n core: \"\",\n description: \"opacity-90\"\n }\n}, tr = {\n info: /* @__PURE__ */ e(Be, { size: 22 }),\n destructive: /* @__PURE__ */ e(Nt, { size: 22 }),\n success: /* @__PURE__ */ e(Ye, { size: 22 }),\n warning: /* @__PURE__ */ e(ve, { size: 20 }),\n base: /* @__PURE__ */ e(st, { size: 22 })\n};\nfunction sa({\n id: r,\n ref: o,\n variant: t = \"base\",\n icon: s,\n title: n,\n description: a,\n className: l,\n dismissible: d = !1,\n onDismiss: i\n}) {\n const f = J(), u = r || `callout-${f}`, [c, m] = R(!1), p = er[t], x = tr[t], y = () => {\n m(!0), i && i();\n };\n return c ? null : /* @__PURE__ */ w(\n \"div\",\n {\n id: u,\n ref: o,\n className: k(\"relative rounded-lg p-2 sm:p-4 border\", p.border, p.interior, l),\n \"data-variant\": t,\n role: \"note\",\n \"aria-describedby\": a ? `${u}-description` : void 0,\n \"aria-labelledby\": n ? `${u}-title` : void 0,\n children: [\n /* @__PURE__ */ w(\"div\", { className: \"flex items-start gap-x-2\", children: [\n s !== null && /* @__PURE__ */ e(\"span\", { className: p.core, children: s === void 0 ? x : s }),\n (n || a) && /* @__PURE__ */ w(\"div\", { className: \"flex-1\", children: [\n n && /* @__PURE__ */ e(\"div\", { id: `${u}-title`, className: k(\"font-medium\", p.core), children: n }),\n a && /* @__PURE__ */ e(\"div\", { id: `${u}-description`, className: k(\"mt-0.5 font-light\", p.description), children: a })\n ] })\n ] }),\n d && /* @__PURE__ */ e(\n \"button\",\n {\n type: \"button\",\n onClick: y,\n \"data-callout-close-button\": \"true\",\n className: k(\n p.core,\n \"rounded-md p-0.5 top-2.5 right-2.5 absolute focus:outline-none hover:ring focus:ring-2 focus:ring-current leading-0\"\n ),\n \"aria-label\": \"Close callout\",\n children: /* @__PURE__ */ e(be, { size: 18 })\n }\n )\n ]\n }\n );\n}\nconst rr = {\n sm: {\n container: \"text-sm\",\n header: \"text-base font-medium\",\n content: \"text-sm leading-relaxed\",\n footer: \"text-xs\",\n paddingMulti: 1 / 3\n },\n md: {\n container: \"text-base\",\n header: \"text-lg font-semibold\",\n content: \"text-base leading-relaxed\",\n footer: \"text-sm\",\n paddingMulti: 1 / 2\n },\n lg: {\n container: \"text-lg\",\n header: \"text-xl font-bold\",\n content: \"text-lg leading-relaxed\",\n footer: \"text-base\",\n paddingMulti: 1\n }\n};\nfunction la({\n id: r,\n className: o,\n ref: t,\n size: s = \"md\",\n padding: n = 16,\n header: a,\n footer: l,\n children: d,\n imageSrc: i,\n imageAlt: f,\n imageComponent: u,\n imageToEdge: c = !0,\n ...m\n}) {\n const p = rr[s], x = i || u;\n return /* @__PURE__ */ w(\n \"div\",\n {\n id: r,\n ref: t,\n \"data-testid\": \"card\",\n \"data-size\": s,\n \"data-padding\": n,\n className: k(\n // Base styles\n \"border border-border rounded-lg shadow-sm\",\n // Responsive design\n \"w-full max-w-full\",\n // Size-specific styles\n p.container,\n o\n ),\n ...m,\n children: [\n x && /* @__PURE__ */ e(\n \"div\",\n {\n style: c ? void 0 : { padding: n, paddingBottom: 0 },\n className: \"w-full overflow-hidden\",\n children: u || /* @__PURE__ */ e(\"img\", { src: i, alt: f || \"\", className: \"w-full h-auto object-cover rounded-xs\", loading: \"lazy\" })\n }\n ),\n /* @__PURE__ */ w(\"div\", { style: { padding: n, rowGap: n * p.paddingMulti }, className: \"flex flex-col\", children: [\n a && /* @__PURE__ */ e(\"div\", { className: p.header, children: a }),\n d && /* @__PURE__ */ e(\"div\", { className: p.content, children: d }),\n l && /* @__PURE__ */ e(\"div\", { className: p.footer, children: l })\n ] })\n ]\n }\n );\n}\nfunction nr({\n totalItems: r,\n itemsToShow: o,\n infinite: t,\n autoScroll: s,\n scrollInterval: n,\n pauseScrollOnHover: a,\n currentIndex: l,\n onIndexChange: d\n}) {\n const [i, f] = R(l || 0), [u, c] = R(!1), m = q(null), p = Math.ceil(r / o), x = t || i > 0, y = t || i < p - 1, b = $(\n (g) => {\n const v = Math.max(0, Math.min(g, p - 1));\n f(v), d == null || d(v);\n },\n [p, d]\n ), D = $(() => {\n if (x) {\n const g = i === 0 && t ? p - 1 : i - 1;\n b(g);\n }\n }, [i, x, t, p, b]), h = $(() => {\n if (y) {\n const g = i === p - 1 && t ? 0 : i + 1;\n b(g);\n }\n }, [i, y, t, p, b]);\n return V(() => {\n l !== void 0 && l !== i && f(l);\n }, [l, i]), V(() => {\n if (!s) return;\n const g = () => {\n m.current = setInterval(() => {\n a && u || h();\n }, n);\n }, v = () => {\n m.current && (clearInterval(m.current), m.current = null);\n };\n return !u || !a ? g() : v(), v;\n }, [s, n, a, u, h]), V(() => {\n f(0);\n }, [o]), {\n currentSlide: i,\n canGoPrev: x,\n canGoNext: y,\n goToPrev: D,\n goToNext: h,\n goToSlide: b,\n isHovered: u,\n setIsHovered: c\n };\n}\nconst ge = {\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}, xe = {\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 ia({\n children: r,\n id: o,\n ref: t,\n className: s,\n autoScroll: n = !1,\n scrollInterval: a = 3e3,\n pauseScrollOnHover: l = !0,\n currentIndex: d,\n onIndexChange: i,\n hidePrevNext: f = !1,\n hideDots: u = !1,\n itemsToShow: c = 1,\n buttonSize: m = \"md\",\n buttonVariant: p = \"default\",\n buttonPosition: x = \"exterior\",\n infinite: y = !0,\n prevButton: b,\n nextButton: D,\n itemsClassName: h,\n containerClassName: g,\n dotsClassName: v,\n gap: F = 8\n}) {\n var j, X;\n const B = q(null), N = Y.Children.toArray(r).filter(Y.isValidElement), A = N.length, { screenSize: E } = Dt(), C = ne(() => {\n if (typeof c == \"number\")\n return c;\n if (typeof c == \"object\" && c && E) {\n const U = [\"2xl\", \"xl\", \"lg\", \"md\", \"sm\", \"xs\"], P = U.indexOf(E);\n for (let O = P; O < U.length; O++) {\n const H = U[O];\n if (c[H] !== void 0)\n return c[H];\n }\n }\n return 1;\n }, [c, E]), { currentSlide: z, canGoPrev: T, canGoNext: M, goToPrev: I, goToNext: G, goToSlide: W, setIsHovered: Q } = nr({\n totalItems: A,\n itemsToShow: C,\n infinite: y,\n autoScroll: n,\n scrollInterval: a,\n pauseScrollOnHover: l,\n currentIndex: d,\n onIndexChange: i\n }), re = $(\n (U) => {\n if (C === 1)\n return { leftWidth: 0, rightWidth: 0, widthReduction: 0 };\n const P = F * (C - 1) / C;\n return U % C === 0 ? { leftWidth: 0, rightWidth: F / 2, widthReduction: P } : U % C === C - 1 ? { leftWidth: F / 2, rightWidth: 0, widthReduction: P } : { leftWidth: F / 2, rightWidth: F / 2, widthReduction: P };\n },\n [C, F]\n ), L = () => {\n I();\n }, K = () => {\n G();\n }, ae = () => {\n l && Q(!0);\n }, le = () => {\n l && Q(!1);\n }, ie = -(z * (100 / A) * C), S = k(\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 x === \"aligned\" ? \"disabled:opacity-90\" : \"disabled:opacity-50\"\n );\n return /* @__PURE__ */ w(\"div\", { className: k(\"relative\", s), \"data-carousel-wrapper\": \"true\", children: [\n !f && /* @__PURE__ */ e(te, { children: b ? Y.cloneElement(\n b,\n {\n onClick: L,\n disabled: !T,\n className: k(\n ((j = b.props) == null ? void 0 : j.className) || \"\",\n xe[x].prev\n ),\n role: \"button\",\n \"aria-disabled\": !T,\n \"aria-label\": \"Previous slide\",\n \"data-carousel-prev\": \"true\"\n }\n ) : /* @__PURE__ */ e(\n \"button\",\n {\n type: \"button\",\n onClick: L,\n disabled: !T,\n className: k(\n S,\n ge[m].button,\n Ge[p],\n xe[x].prev\n ),\n \"aria-disabled\": !T,\n \"aria-label\": \"Previous slide\",\n \"data-carousel-prev\": \"true\",\n children: /* @__PURE__ */ e(ye, { className: ge[m].icon })\n }\n ) }),\n /* @__PURE__ */ w(\n \"div\",\n {\n id: o,\n ref: t,\n className: k(\"relative overflow-hidden\", g),\n onMouseEnter: ae,\n onMouseLeave: le,\n \"data-carousel\": \"true\",\n \"data-current-index\": z,\n \"data-items-to-show\": C,\n \"data-auto-scroll\": n,\n \"data-button-position\": x,\n children: [\n /* @__PURE__ */ e(\n \"div\",\n {\n ref: B,\n className: \"flex transition-transform ease-in-out\",\n style: {\n transform: `translateX(${ie}%)`,\n width: `${A / C * 100}%`\n },\n children: N.map((U, P) => {\n const { leftWidth: O, rightWidth: H, widthReduction: ce } = re(P);\n return /* @__PURE__ */ e(\n \"div\",\n {\n className: k(\"flex-shrink-0\", h),\n style: {\n width: `calc(${100 / A}% - ${ce}px)`,\n marginRight: H > 0 ? `${H}px` : void 0,\n marginLeft: O > 0 ? `${O}px` : void 0\n },\n \"data-slide-index\": P,\n children: U\n },\n P\n );\n })\n }\n ),\n !u && /* @__PURE__ */ e(\"div\", { className: \"absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2\", children: Array.from({ length: Math.ceil(A / C) }).map((U, P) => /* @__PURE__ */ e(\n \"button\",\n {\n type: \"button\",\n onClick: () => W(P),\n className: k(\n \"w-2 h-2 rounded-full transition-colors\",\n P === z ? \"bg-accent\" : \"bg-muted-foreground/60 hover:bg-muted-foreground/100\",\n v\n ),\n \"aria-label\": `Go to slide ${P + 1}`,\n \"data-carousel-dot\": P\n },\n P\n )) })\n ]\n }\n ),\n !f && /* @__PURE__ */ e(te, { children: D ? Y.cloneElement(\n D,\n {\n onClick: K,\n disabled: !M,\n className: k(\n ((X = D.props) == null ? void 0 : X.className) || \"\",\n xe[x].next\n ),\n role: \"button\",\n \"aria-disabled\": !M,\n \"aria-label\": \"Next slide\",\n \"data-carousel-next\": \"true\"\n }\n ) : /* @__PURE__ */ e(\n \"button\",\n {\n type: \"button\",\n onClick: K,\n disabled: !M,\n className: k(\n S,\n ge[m].button,\n Ge[p],\n xe[x].next\n ),\n \"aria-disabled\": !M,\n \"aria-label\": \"Next slide\",\n \"data-carousel-next\": \"true\",\n children: /* @__PURE__ */ e(he, { className: ge[m].icon })\n }\n ) })\n ] });\n}\nfunction ar(r) {\n const [o, t] = R(\"\"), s = $((n) => {\n let a = n, l = \"\";\n for (; a && !l; ) {\n const d = window.getComputedStyle(a).backgroundColor;\n d && d !== \"transparent\" && d !== \"rgba(0, 0, 0, 0)\" && (l = d), a = a.parentElement;\n }\n return l || \"transparent\";\n }, []);\n return V(() => {\n const n = document.getElementById(r);\n if (n) {\n const a = s(n.parentElement);\n t(a);\n }\n }, [r, s]), o;\n}\nfunction $e({\n ref: r,\n id: o,\n size: t = 20,\n color: s,\n filled: n = !1,\n rounded: a = !0,\n checked: l = !1,\n indeterminate: d = !1,\n onCheckedChange: i,\n disabled: f,\n className: u = \"\",\n display: c = \"inline\",\n ...m\n}) {\n const p = J(), x = ne(() => o || `checkbox-${p}`, [o, p]), y = ar(x), [b, D] = R(l), [h, g] = R(d);\n V(() => {\n D(l);\n }, [l]), V(() => {\n g(d);\n }, [d]);\n const v = () => {\n if (!f) {\n const N = h ? !0 : !b;\n D(N), g(!1), i == null || i(N);\n }\n }, F = (N) => {\n N.key === \" \" && (N.preventDefault(), v());\n }, B = k(\n \"items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2\",\n c === \"inline\" ? \"inline-flex\" : \"flex\",\n a && \"rounded\",\n f && \"opacity-40 cursor-not-allowed\",\n !f && \"cursor-pointer\",\n u\n );\n return /* @__PURE__ */ e(\n \"button\",\n {\n id: x,\n type: \"button\",\n ref: r,\n tabIndex: 0,\n role: \"checkbox\",\n onClick: v,\n \"aria-checked\": h ? \"mixed\" : b,\n \"aria-disabled\": f,\n onKeyDownCapture: F,\n style: {\n width: t,\n height: t,\n color: s,\n backgroundColor: (b || h) && n ? \"currentcolor\" : \"transparent\"\n },\n className: B,\n ...m,\n children: h ? /* @__PURE__ */ e(Qe, { size: t, color: n ? y : void 0 }) : /* @__PURE__ */ e(\n ze,\n {\n size: t,\n color: n ? y : void 0,\n className: b ? \"opacity-100\" : \"opacity-0\"\n }\n )\n }\n );\n}\nfunction ca({\n children: r,\n className: o,\n linkTo: t,\n linkProps: s,\n onButtonClick: n,\n buttonProps: a,\n ...l\n}) {\n return t && n && console.warn('Clickable: Both \"linkTo\" and \"onButtonClick\" props are provided. Only \"linkTo\" will be used.'), /* @__PURE__ */ w(\"div\", { className: k(\"relative w-fit\", o), ...l, children: [\n r,\n t && /* @__PURE__ */ e(\n \"a\",\n {\n ...s,\n rel: (s == null ? void 0 : s.rel) || \"noreferrer\",\n href: t,\n className: k(\"absolute inset-0\", s == null ? void 0 : s.className)\n }\n ),\n !t && n && /* @__PURE__ */ e(\n \"button\",\n {\n ...a,\n type: \"button\",\n onClick: n,\n className: k(\"absolute inset-0 cursor-pointer\", a == null ? void 0 : a.className)\n }\n )\n ] });\n}\nfunction or(r) {\n const [o, t] = R(null);\n return V(() => {\n var d;\n const s = (d = document.getElementById(r)) == null ? void 0 : d.parentElement;\n if (!s) return;\n const n = () => {\n const i = window.getComputedStyle(s), f = parseFloat(i.fontSize), u = i.lineHeight === \"normal\" ? f * 1.2 : parseFloat(i.lineHeight), c = f - 2, m = c / f, p = u * m;\n t({\n fontSize: f,\n lineHeight: u,\n smallerFontSize: c,\n smallerLineHeight: p\n });\n };\n n();\n const a = new ResizeObserver(n);\n a.observe(s);\n const l = new MutationObserver(n);\n return l.observe(s, {\n attributes: !0,\n attributeFilter: [\"style\", \"class\"],\n subtree: !1\n }), () => {\n a.disconnect(), l.disconnect();\n };\n }, [r]), o;\n}\nconst sr = {\n base: \"\",\n modest: \"opacity-90 bg-muted/10\",\n accent: \"text-accent bg-muted/10\",\n current: \"text-current bg-current/10\"\n};\nfunction da({ id: r, ref: o, content: t, variant: s = \"accent\", className: n, style: a, ...l }) {\n const d = J(), i = r || `code-${d}`, f = or(i);\n return /* @__PURE__ */ e(\n \"code\",\n {\n id: i,\n ref: o,\n className: k(\"px-2 py-1 rounded\", sr[s], n),\n \"data-variant\": s,\n style: {\n fontSize: f ? `${f.smallerFontSize}px` : void 0,\n lineHeight: f ? `${f.smallerLineHeight}px` : void 0,\n ...a\n },\n ...l,\n children: t\n }\n );\n}\nconst lr = {\n keyword: \"text-rose-400\",\n runner: \"text-amber-400\",\n comment: \"text-gray-500/80\",\n command: \"text-gray-100\",\n variable: \"text-blue-400\",\n string: \"text-white/70\",\n option: \"text-purple-400\",\n plain: \"text-gray-200\",\n operator: \"text-pink-500\",\n substitution: \"text-green-300\"\n}, ir = {\n selector: \"text-blue-400 font-medium\",\n property: \"text-purple-400\",\n value: \"text-green-400\",\n punctuation: \"text-gray-400\",\n atRule: \"text-pink-400 font-semibold\",\n comment: \"text-gray-500 italic\",\n string: \"text-green-400\",\n number: \"text-green-400\",\n plain: \"text-gray-100\",\n function: \"text-cyan-400\"\n}, cr = {\n key: \"text-purple-400 font-semibold\",\n string: \"text-green-400\",\n number: \"text-orange-400 font-medium\",\n boolean: \"text-cyan-400 font-medium\",\n punctuation: \"text-gray-400\",\n plain: \"text-gray-100\"\n}, dr = {\n heading: \"text-blue-400 font-bold\",\n \"heading-hash\": \"text-gray-500\",\n bold: \"text-white font-bold\",\n italic: \"text-white italic\",\n \"bold-marker\": \"text-gray-400\",\n \"italic-marker\": \"text-gray-400\",\n link: \"text-blue-400 underline\",\n \"link-text\": \"text-blue-400\",\n \"link-url\": \"text-green-400\",\n \"link-bracket\": \"text-gray-400\",\n \"link-paren\": \"text-gray-400\",\n code: \"text-pink-400 bg-gray-800 px-1 rounded text-sm\",\n \"code-marker\": \"text-gray-500\",\n \"code-block\": \"text-green-400\",\n \"code-block-marker\": \"text-gray-500\",\n \"list-marker\": \"text-orange-400 font-medium\",\n \"list-item\": \"text-gray-200\",\n blockquote: \"text-gray-300 italic\",\n \"blockquote-marker\": \"text-gray-500\",\n plain: \"text-gray-200\"\n}, ur = {\n keyword: \"text-purple-400 font-semibold\",\n type: \"text-cyan-400 font-medium\",\n string: \"text-green-400\",\n \"jsx-bracket\": \"text-gray-400\",\n \"jsx-tag\": \"text-blue-400 font-medium\",\n \"jsx-attribute\": \"text-amber-400\",\n \"jsx-brace\": \"text-yellow-400\",\n jsx: \"text-blue-400 font-medium\",\n // fallback for old jsx type\n property: \"text-amber-400\",\n number: \"text-orange-400 font-medium\",\n comment: \"text-gray-500 italic\",\n function: \"text-rose-400 font-semibold\",\n hook: \"text-rose-400 font-semibold\",\n operator: \"text-gray-300\",\n plain: \"text-gray-100\"\n}, fr = /* @__PURE__ */ new Set([\n \"for\",\n \"in\",\n \"do\",\n \"done\",\n \"else\",\n \"if\",\n \"fi\",\n \"then\",\n \"while\",\n \"until\",\n \"case\",\n \"esac\"\n]), mr = /* @__PURE__ */ new Set([\"npm\", \"npx\", \"pnpm\", \"yarn\", \"vite\"]);\nfunction pr(r) {\n const o = [];\n let t = 0;\n for (o.push({ text: \"`\", type: \"string\" }), t = 1; t < r.length; ) {\n const s = r[t];\n if (s === \"`\") {\n o.push({ text: \"`\", type: \"string\" }), t++;\n break;\n }\n if (s === \"$\" && t + 1 < r.length && r[t + 1] === \"{\") {\n o.push({ text: \"${\", type: \"string\" }), t += 2;\n let a = 1;\n const l = t;\n for (; t < r.length && a > 0; )\n r[t] === \"{\" ? a++ : r[t] === \"}\" && a--, a > 0 && t++;\n if (a === 0) {\n const d = r.slice(l, t);\n if (d.trim().length > 0) {\n const i = we(d, !1, 0);\n o.push(...i);\n }\n o.push({ text: \"}\", type: \"string\" }), t++;\n } else\n o.push({ text: r.slice(l, t), type: \"string\" });\n continue;\n }\n const n = t;\n for (; t < r.length && r[t] !== \"`\" && !(r[t] === \"$\" && t + 1 < r.length && r[t + 1] === \"{\"); )\n t++;\n t > n && o.push({ text: r.slice(n, t), type: \"string\" });\n }\n return { tokens: o, consumed: t };\n}\nfunction hr(r) {\n const o = [];\n let t = 0;\n for (; t < r.length; ) {\n const s = r[t];\n if (s === \"`\") {\n if (o.push({ text: \"`\", type: \"string\" }), t++, t < r.length) {\n const a = we(r.slice(t), !1, 0, !1);\n o.push(...a);\n }\n break;\n }\n if (s === \"$\" && t + 1 < r.length && r[t + 1] === \"{\") {\n o.push({ text: \"${\", type: \"string\" }), t += 2;\n let a = 1;\n const l = t;\n for (; t < r.length && a > 0; )\n r[t] === \"{\" ? a++ : r[t] === \"}\" && a--, a > 0 && t++;\n if (a === 0) {\n const d = r.slice(l, t);\n if (d.trim().length > 0) {\n const i = we(d, !1, 0, !1);\n o.push(...i);\n }\n o.push({ text: \"}\", type: \"string\" }), t++;\n } else {\n o.push({ text: r.slice(l), type: \"string\" });\n break;\n }\n continue;\n }\n const n = t;\n for (; t < r.length && r[t] !== \"`\" && !(r[t] === \"$\" && t + 1 < r.length && r[t + 1] === \"{\"); )\n t++;\n t > n && o.push({ text: r.slice(n, t), type: \"string\" });\n }\n return { tokens: o };\n}\nfunction Je(r) {\n const o = [];\n if (r.trim() === \"\")\n return o.push({ text: \" \", type: \"plain\" }), o;\n if (r.trim().startsWith(\"#\"))\n return o.push({ text: r, type: \"comment\" }), o;\n const t = /(\\$\\([^)]*\\)|\"[^\"]*\"|'[^']*'|\\$[\\w_]+|[a-zA-Z_]\\w*=|--?[a-zA-Z0-9][\\w-]*(?:=.*)?|>>|>|#.*|\\s+|[^\\s]+)/g, s = (a) => {\n if (/^\\$\\([^)]*\\)$/.test(a)) {\n const l = a.slice(2, -1);\n return [{ text: \"$(\", type: \"operator\" }, ...Je(l), { text: \")\", type: \"operator\" }];\n }\n if (/^\".*\"$/.test(a)) {\n const l = a.slice(1, -1), d = [];\n let i = 0;\n const f = /\\$[\\w_]+/g;\n let u;\n for (; (u = f.exec(l)) !== null; )\n u.index > i && d.push({\n text: l.slice(i, u.index),\n type: \"string\"\n }), d.push({ text: u[0], type: \"variable\" }), i = u.index + u[0].length;\n return i < l.length && d.push({ text: l.slice(i), type: \"string\" }), [{ text: '\"', type: \"string\" }, ...d, { text: '\"', type: \"string\" }];\n }\n return /^'.*'$/.test(a) ? [{ text: a, type: \"string\" }] : /^\\$[\\w_]+$/.test(a) ? [{ text: a, type: \"variable\" }] : /^[a-zA-Z_]\\w*=$/.test(a) ? [{ text: a, type: \"variable\" }] : /^--?[a-zA-Z0-9][\\w-]*(=.*)?$/.test(a) ? [{ text: a, type: \"option\" }] : /^>>|>$/.test(a) ? [{ text: a, type: \"operator\" }] : /^#.*$/.test(a) ? [{ text: a, type: \"comment\" }] : /^\\s+$/.test(a) ? [{ text: a, type: \"plain\" }] : fr.has(a) ? [{ text: a, type: \"keyword\" }] : mr.has(a) ? [{ text: a, type: \"runner\" }] : [{ text: a, type: \"command\" }];\n };\n let n;\n for (; (n = t.exec(r)) !== null; )\n o.push(...s(n[0]));\n return o;\n}\nfunction br(r, o = !1) {\n const t = [];\n let s = o;\n if (r.trim() === \"\")\n return t.push({ text: \" \", type: \"plain\" }), { tokens: t, inComment: s };\n let n = \"selector\", a = 0;\n r.match(/^\\s+/) && r.includes(\":\") && !r.includes(\"{\") && (n = \"property\", a = 1);\n const l = /(\\/\\*[\\s\\S]*?\\*\\/|\\/\\*[\\s\\S]*$|\\*\\/)|(@[a-zA-Z-]+)|(\\{|\\}|:|;|,|\\(|\\))|(\"(?:[^\"]*)\"|'(?:[^']*)')|([a-zA-Z-]+)(?=\\()|([0-9.]+(?:px|rem|em|%|vh|vw|deg|s|ms|fr)?)|(#[a-fA-F0-9]{3,8})|([a-zA-Z0-9_-]+|[.#][a-zA-Z0-9_-]+)|(\\s+)|(\\S+)/g;\n let d;\n for (; d = l.exec(r); ) {\n const [, i, f, u, c, m, p, x, y, b, D] = d;\n if (i)\n i.includes(\"/*\") && !i.includes(\"*/\") ? s = !0 : i.includes(\"*/\") && (s = !1), t.push({ text: i, type: \"comment\" });\n else if (s)\n d[0].includes(\"*/\") && (s = !1), t.push({ text: d[0], type: \"comment\" });\n else if (f)\n t.push({ text: f, type: \"atRule\" });\n else if (m)\n t.push({ text: m, type: \"function\" });\n else if (u)\n u === \"{\" ? (a++, n = \"property\") : u === \"}\" ? (a--, n = a > 0 ? \"property\" : \"selector\") : u === \":\" ? n === \"property\" && (n = \"value\") : u === \";\" ? a > 0 && (n = \"property\") : u === \",\" && a === 0 && (n = \"selector\"), t.push({ text: u, type: \"punctuation\" });\n else if (c)\n t.push({ text: c, type: \"string\" });\n else if (p)\n t.push({ text: p, type: \"number\" });\n else if (x)\n t.push({ text: x, type: \"value\" });\n else if (y) {\n let h;\n y.startsWith(\".\") || y.startsWith(\"#\") || n === \"selector\" ? h = \"selector\" : n === \"property\" ? h = \"property\" : h = \"value\", t.push({ text: y, type: h });\n } else if (b)\n t.push({ text: b.replace(/ /g, \" \"), type: \"plain\" });\n else if (D) {\n const h = n === \"value\" ? \"value\" : \"plain\";\n t.push({ text: D, type: h });\n }\n }\n return { tokens: t, inComment: s };\n}\nfunction gr(r) {\n const o = /(\"[^\"]*\")\\s*(:)|(\"[^\"]*\")|(\\d+)|(true|false|null)|(\\{|\\}|\\[|\\]|,)/g, t = [];\n let s = 0, n;\n for (; (n = o.exec(r)) !== null; )\n n.index > s && t.push({ text: r.slice(s, n.index), type: \"plain\" }), n[1] && n[2] ? (t.push({ text: n[1], type: \"key\" }), t.push({ text: n[2], type: \"punctuation\" })) : n[3] ? t.push({ text: n[3], type: \"string\" }) : n[4] ? t.push({ text: n[4], type: \"number\" }) : n[5] ? t.push({ text: n[5], type: \"boolean\" }) : n[6] && t.push({ text: n[6], type: \"punctuation\" }), s = o.lastIndex;\n return s < r.length && t.push({ text: r.slice(s), type: \"plain\" }), t;\n}\nfunction we(r, o = !1, t = 0, s = !1) {\n const n = [];\n let a = r, l = o, d = t;\n if (s) {\n const i = hr(a);\n return n.push(...i.tokens), n;\n }\n for (; a.length > 0; ) {\n const i = a.match(/^\\/\\*[\\s\\S]*?\\*\\//);\n if (i) {\n n.push({ text: i[0], type: \"comment\" }), a = a.slice(i[0].length);\n continue;\n }\n const f = a.match(/^\\/\\/.*$/m);\n if (f) {\n n.push({ text: f[0], type: \"comment\" }), a = a.slice(f[0].length);\n continue;\n }\n if (a.match(/^`/)) {\n const A = pr(a);\n n.push(...A.tokens), a = a.slice(A.consumed);\n continue;\n }\n const c = a.match(/^(\"[^\"]*\"|'[^']*')/);\n if (c) {\n n.push({ text: c[0], type: \"string\" }), a = a.slice(c[0].length);\n continue;\n }\n const m = a.match(/^<([a-zA-Z][a-zA-Z0-9]*)/);\n if (m) {\n n.push({ text: \"<\", type: \"jsx-bracket\" }), n.push({ text: m[1], type: \"jsx-tag\" }), a = a.slice(m[0].length), l = !0;\n continue;\n }\n const p = a.match(/^<\\/([a-zA-Z][a-zA-Z0-9]*)>/);\n if (p) {\n n.push({ text: \"</\", type: \"jsx-bracket\" }), n.push({ text: p[1], type: \"jsx-tag\" }), n.push({ text: \">\", type: \"jsx-bracket\" }), a = a.slice(p[0].length), l = !1;\n continue;\n }\n if (a.match(/^\\/?>/)) {\n const A = a.match(/^(\\/?>\\s*)/);\n if (A) {\n n.push({ text: A[1].trim(), type: \"jsx-bracket\" }), a = a.slice(A[1].length), A[1].includes(\">\") && (l = !1);\n continue;\n }\n }\n const x = a.match(/^([a-zA-Z][a-zA-Z0-9]*)(\\s*)(=)/);\n if (x && l && d === 0) {\n n.push({ text: x[1], type: \"jsx-attribute\" }), x[2] && n.push({ text: x[2], type: \"plain\" }), n.push({ text: \"=\", type: \"plain\" }), a = a.slice(x[0].length);\n continue;\n }\n const y = a.match(/^[{}]/);\n if (y) {\n n.push({ text: y[0], type: \"jsx-brace\" }), y[0] === \"{\" ? d++ : y[0] === \"}\" && d--, a = a.slice(1);\n continue;\n }\n const b = a.match(/^\\s+/);\n if (b) {\n n.push({ text: b[0], type: \"plain\" }), a = a.slice(b[0].length);\n continue;\n }\n const D = a.match(/^(=>|===|!==|==|!=|<=|>=|&&|\\|\\||[+\\-*/%=<>!&|^~?:;,()[\\]{}.])/);\n if (D) {\n n.push({ text: D[0], type: \"operator\" }), a = a.slice(D[0].length);\n continue;\n }\n const h = a.match(\n /^(const|let|var|function|if|else|for|while|return|import|export|class|extends|interface|type|enum|async|await|public|private|protected|static|from|as|default|new|this|super|try|catch|finally|throw|break|continue|switch|case|typeof|instanceof)\\b/\n );\n if (h) {\n n.push({ text: h[0], type: \"keyword\" }), a = a.slice(h[0].length);\n continue;\n }\n const g = a.match(/^(use[A-Z][a-zA-Z]*)\\b/);\n if (g) {\n n.push({ text: g[0], type: \"hook\" }), a = a.slice(g[0].length);\n continue;\n }\n const v = a.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)\\s*(?=(\\?\\.)?\\()/);\n if (v) {\n n.push({ text: v[1], type: \"function\" }), a = a.slice(v[1].length);\n continue;\n }\n const F = a.match(\n /^(string|number|boolean|object|any|void|never|unknown|null|undefined|Promise|Array|React\\.FC|FC|JSX\\.Element|HTMLElement|Event|MouseEvent|KeyboardEvent|ChangeEvent)\\b/\n );\n if (F) {\n n.push({ text: F[0], type: \"type\" }), a = a.slice(F[0].length);\n continue;\n }\n const B = a.match(/^(\\d+\\.?\\d*)/);\n if (B) {\n n.push({ text: B[0], type: \"number\" }), a = a.slice(B[0].length);\n continue;\n }\n const N = a.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)\\s*(?=:)/);\n if (N && !l) {\n n.push({ text: N[1], type: \"property\" }), a = a.slice(N[1].length);\n continue;\n }\n n.push({ text: a[0], type: \"plain\" }), a = a.slice(1);\n }\n return n;\n}\nfunction xr(r) {\n const o = [];\n if (r.trim() === \"\")\n return o.push({ text: \" \", type: \"plain\" }), o;\n const t = r, s = t.match(/^(#{1,6})\\s*(.*)$/);\n if (s)\n return o.push({ text: s[1], type: \"heading-hash\" }), s[2] && (o.push({ text: \" \", type: \"plain\" }), o.push({ text: s[2], type: \"heading\" })), o;\n const n = t.match(/^(>\\s*)(.*)$/);\n if (n)\n return o.push({ text: n[1], type: \"blockquote-marker\" }), n[2] && o.push({ text: n[2], type: \"blockquote\" }), o;\n const a = t.match(/^(\\s*)([-*+]|\\d+\\.)\\s*(.*)$/);\n if (a)\n return a[1] && o.push({ text: a[1], type: \"plain\" }), o.push({ text: a[2], type: \"list-marker\" }), o.push({ text: \" \", type: \"plain\" }), a[3] && je(a[3], o), o;\n const l = t.match(/^(```)\\s*(.*)$/);\n return l ? (o.push({ text: l[1], type: \"code-block-marker\" }), l[2] && (o.push({ text: \" \", type: \"plain\" }), o.push({ text: l[2], type: \"code-block\" })), o) : (je(t, o), o);\n}\nfunction je(r, o) {\n let t = r;\n for (; t.length > 0; ) {\n const s = t.match(/^(\\[)([^\\]]*?)(\\])(\\()([^)]*?)(\\))/);\n if (s) {\n o.push({ text: s[1], type: \"link-bracket\" }), o.push({ text: s[2], type: \"link-text\" }), o.push({ text: s[3], type: \"link-bracket\" }), o.push({ text: s[4], type: \"link-paren\" }), o.push({ text: s[5], type: \"link-url\" }), o.push({ text: s[6], type: \"link-paren\" }), t = t.slice(s[0].length);\n continue;\n }\n const n = t.match(/^(`+)([^`]*?)\\1/);\n if (n) {\n o.push({ text: n[1], type: \"code-marker\" }), o.push({ text: n[2], type: \"code\" }), o.push({ text: n[1], type: \"code-marker\" }), t = t.slice(n[0].length);\n continue;\n }\n const a = t.match(/^(\\*\\*|__)([^*_]*?)\\1/);\n if (a) {\n o.push({ text: a[1], type: \"bold-marker\" }), o.push({ text: a[2], type: \"bold\" }), o.push({ text: a[1], type: \"bold-marker\" }), t = t.slice(a[0].length);\n continue;\n }\n const l = t.match(/^(\\*|_)([^*_]*?)\\1/);\n if (l) {\n o.push({ text: l[1], type: \"italic-marker\" }), o.push({ text: l[2], type: \"italic\" }), o.push({ text: l[1], type: \"italic-marker\" }), t = t.slice(l[0].length);\n continue;\n }\n o.push({ text: t[0], type: \"plain\" }), t = t.slice(1);\n }\n}\nfunction yr(r, o) {\n const t = {\n ...lr,\n ...o\n };\n return r.map((s, n) => {\n const a = Je(s);\n return /* @__PURE__ */ e(\"div\", { className: \"leading-6\", children: a.map((l, d) => /* @__PURE__ */ e(\"span\", { className: t[l.type] || \"text-gray-100\", children: l.text }, d)) }, n);\n });\n}\nfunction vr(r, o) {\n const t = { ...ir, ...o };\n let s = !1;\n return r.map((n, a) => {\n const { tokens: l, inComment: d } = br(n, s);\n return s = d, /* @__PURE__ */ e(\"div\", { className: \"leading-6\", children: l.map((i, f) => /* @__PURE__ */ e(\"span\", { className: t[i.type] || \"text-gray-100\", children: i.text }, f)) }, a);\n });\n}\nfunction wr(r, o) {\n const t = { ...cr, ...o };\n return r.map((s, n) => /* @__PURE__ */ e(\"div\", { className: \"leading-6\", children: gr(s).map((a, l) => /* @__PURE__ */ e(\"span\", { className: t[a.type] || \"text-gray-100\", children: a.text }, l)) }, n));\n}\nfunction kr(r, o) {\n const t = { ...ur, ...o };\n let s = !1, n = 0, a = !1;\n return r.map((l, d) => {\n if (l.trim() === \"\")\n return /* @__PURE__ */ e(\"div\", { className: \"leading-6\", children: \" \" }, d);\n const i = we(l, s, n, a);\n (l.match(/`/g) || []).length % 2 === 1 && (a = !a), l.includes(\"<\") && l.match(/<[a-zA-Z]/) && (s = !0), l.includes(\">\") && !l.includes(\"<\") && (s = !1, n = 0);\n const u = (l.match(/\\{/g) || []).length, c = (l.match(/\\}/g) || []).length;\n return n += u - c, n < 0 && (n = 0), /* @__PURE__ */ e(\"div\", { className: \"leading-6\", children: i.map((m, p) => /* @__PURE__ */ e(\n \"span\",\n {\n className: t[m.type] || \"text-gray-100\",\n children: m.text\n },\n p\n )) }, d);\n });\n}\nfunction Nr(r, o) {\n const t = { ...dr, ...o };\n return r.map((s, n) => /* @__PURE__ */ e(\"div\", { className: \"leading-6\", children: xr(s).map((a, l) => /* @__PURE__ */ e(\"span\", { className: t[a.type] || \"text-gray-100\", children: a.text }, l)) }, n));\n}\nfunction Dr(r) {\n const [o, t] = R(!1), s = $(async () => {\n try {\n await navigator.clipboard.writeText(r), t(!0), setTimeout(() => t(!1), 3e3);\n } catch (n) {\n console.error(\"Failed to copy code:\", n);\n }\n }, [r]);\n return { copied: o, handleCopy: s };\n}\nfunction Cr(r, o) {\n const t = q(null), s = q(null);\n return V(() => {\n if (r) {\n t.current = document.activeElement, document.body.style.overflow = \"hidden\", setTimeout(() => {\n var a;\n (a = s.current) == null || a.focus();\n }, 100);\n const n = (a) => {\n a.key === \"Escape\" && o(!1);\n };\n return document.addEventListener(\"keydown\", n), () => {\n document.removeEventListener(\"keydown\", n), document.body.style.overflow = \"\";\n };\n } else t.current && (t.current.focus(), t.current = null);\n }, [r, o]), { containerRef: s };\n}\nfunction Er(r, o, t, s) {\n return { handleKeyDown: $(\n (a) => {\n a.key === \"c\" && (a.metaKey || a.ctrlKey) && r ? (a.preventDefault(), t()) : a.key === \"f\" && o && (a.preventDefault(), s());\n },\n [r, o, t, s]\n ) };\n}\nfunction Fr(r) {\n switch (r) {\n case \"typescript\":\n case \"ts\":\n return \"ts\";\n case \"tsx\":\n return \"tsx\";\n case \"json\":\n return \"json\";\n case \"bash\":\n case \"sh\":\n return \"sh\";\n case \"css\":\n return \"css\";\n case \"markdown\":\n case \"md\":\n return \"md\";\n default:\n return \"txt\";\n }\n}\nfunction ua({\n code: r,\n language: o = \"typescript\",\n allowCopy: t = !0,\n allowDownload: s = !1,\n allowFullscreen: n = !1,\n filename: a,\n showTrafficLights: l = !0,\n showLineNumbers: d = !1,\n hideHeader: i = !1,\n hideFiletype: f = !1,\n maxHeight: u,\n tokenClasses: c,\n className: m,\n id: p,\n ref: x,\n ...y\n}) {\n const [b, D] = R(!1), { containerRef: h } = Cr(b, D), { copied: g, handleCopy: v } = Dr(r), F = $(() => {\n const I = a || `code.${Fr(o)}`;\n Ct(r, I);\n }, [r, a, o]), B = $(() => {\n D((I) => !I);\n }, []), { handleKeyDown: N } = Er(t, n, v, B), A = ne(() => r.split(`\n`), [r]), E = $(\n (I = !0) => /* @__PURE__ */ w(\"div\", { className: k(\"flex items-center space-x-2\", !I && \"absolute top-2 right-2 z-10\"), children: [\n !f && /* @__PURE__ */ e(\n \"span\",\n {\n className: \"text-xs text-gray-400 uppercase tracking-wide font-medium\",\n \"aria-label\": `Code language: ${o}`,\n children: o\n }\n ),\n n && /* @__PURE__ */ e(\n \"button\",\n {\n onClick: B,\n className: \"p-1.5 leading-0 text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors motion-reduce:transition-none min-h-[44px] min-w-[44px] flex items-center justify-center md:min-h-auto md:min-w-auto md:p-1.5\",\n title: b ? \"Exit fullscreen\" : \"Fullscreen\",\n \"aria-label\": b ? \"Exit fullscreen mode\" : \"Enter fullscreen mode\",\n \"aria-pressed\": b,\n type: \"button\",\n children: b ? /* @__PURE__ */ e(Qe, { size: 14 }) : /* @__PURE__ */ e(lt, { size: 14 })\n }\n ),\n s && /* @__PURE__ */ e(\n \"button\",\n {\n onClick: F,\n className: \"p-1.5 leading-0 text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors motion-reduce:transition-none min-h-[44px] min-w-[44px] flex items-center justify-center md:min-h-auto md:min-w-auto md:p-1.5\",\n title: \"Download code\",\n \"aria-label\": \"Download code as file\",\n type: \"button\",\n children: /* @__PURE__ */ e(it, { size: 14 })\n }\n ),\n t && /* @__PURE__ */ e(\n \"button\",\n {\n onClick: v,\n className: \"p-1.5 leading-0 text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors motion-reduce:transition-none min-h-[44px] min-w-[44px] flex items-center justify-center md:min-h-auto md:min-w-auto md:p-1.5\",\n title: g ? \"Code copied!\" : \"Copy code\",\n \"aria-label\": g ? \"Code copied to clipboard\" : \"Copy code to clipboard\",\n \"aria-live\": \"polite\",\n type: \"button\",\n children: g ? /* @__PURE__ */ e(ze, { size: 14, className: \"text-green-400\" }) : /* @__PURE__ */ e(ct, { size: 14 })\n }\n )\n ] }),\n [\n f,\n o,\n n,\n b,\n s,\n F,\n t,\n v,\n g,\n B\n ]\n ), C = ne(() => o === \"json\" ? wr(A, c) : o === \"tsx\" || o === \"ts\" || o === \"typescript\" ? kr(A, c) : o === \"bash\" || o === \"sh\" ? yr(A, c) : o === \"css\" ? vr(A, c) : o === \"markdown\" || o === \"md\" ? Nr(A, c) : [\n /* @__PURE__ */ e(\"span\", { className: \"text-gray-400\", children: \"Unsupported language\" }, 0)\n ], [A, c, o]), z = ne(() => d ? A.map((I, G) => /* @__PURE__ */ e(\n \"div\",\n {\n className: \"text-gray-500 text-right pl-3 pr-1 select-none min-w-8 text-sm font-mono leading-6\",\n \"aria-hidden\": \"true\",\n role: \"presentation\",\n children: G + 1\n },\n G\n )) : null, [d, A]), T = ne(\n () => ({\n maxHeight: u && !b ? `${u}px` : b ? i ? \"calc(100vh - 5px)\" : \"calc(100vh - 45px)\" : void 0,\n overflow: u || b ? \"auto\" : \"visible\"\n }),\n [u, b, i]\n ), M = /* @__PURE__ */ w(\n \"div\",\n {\n id: p,\n ref: (I) => {\n h.current = I, typeof x == \"function\" ? x(I) : x && (x.current = I);\n },\n className: k(\n \"bg-gray-900 rounded-lg border border-gray-700 overflow-hidden motion-reduce:transition-none\",\n b && \"fixed inset-0 z-[9999] max-h-fit\",\n m\n ),\n \"data-language\": o,\n \"data-filename\": a,\n \"data-fullscreen\": b,\n role: \"region\",\n \"aria-label\": `Code block${a ? ` for ${a}` : \"\"} in ${o}`,\n \"aria-describedby\": d ? `${p}-description` : void 0,\n tabIndex: 0,\n onKeyDown: N,\n ...y,\n children: [\n d && /* @__PURE__ */ w(\"div\", { id: `${p}-description`, className: \"sr-only\", children: [\n \"Code block with line numbers. Use Cmd+C or Ctrl+C to copy code.\",\n n && \" Press F to toggle fullscreen.\"\n ] }),\n /* @__PURE__ */ e(\"div\", { \"aria-live\": \"polite\", \"aria-atomic\": \"true\", className: \"sr-only\", children: g && \"Code copied to clipboard\" }),\n !i && /* @__PURE__ */ w(\"div\", { className: \"flex items-center justify-between px-4 py-2 bg-gray-800 border-b border-gray-700\", children: [\n /* @__PURE__ */ w(\"div\", { className: \"flex items-center space-x-3\", children: [\n l && /* @__PURE__ */ w(\"div\", { className: \"flex space-x-2\", children: [\n /* @__PURE__ */ e(\"div\", { className: \"w-3 h-3 bg-red-500 rounded-full\" }),\n /* @__PURE__ */ e(\"div\", { className: \"w-3 h-3 bg-yellow-500 rounded-full\" }),\n /* @__PURE__ */ e(\"div\", { className: \"w-3 h-3 bg-green-500 rounded-full\" })\n ] }),\n a && /* @__PURE__ */ e(\"span\", { className: \"text-sm text-gray-300 font-medium\", children: a })\n ] }),\n E(!0)\n ] }),\n /* @__PURE__ */ w(\"div\", { className: k(\"flex overflow-hidden\", i && \"relative\"), style: T, children: [\n i && E(!1),\n /* @__PURE__ */ e(\"div\", { className: \"flex-1 overflow-x-auto\", children: /* @__PURE__ */ w(\"div\", { className: \"flex\", children: [\n d && /* @__PURE__ */ e(\n \"div\",\n {\n className: \"bg-gray-800 py-4 border-r border-gray-700 flex flex-col flex-shrink-0\",\n \"aria-hidden\": \"true\",\n role: \"presentation\",\n children: z\n }\n ),\n /* @__PURE__ */ e(\"div\", { className: \"flex-1 p-4\", children: /* @__PURE__ */ e(\n \"pre\",\n {\n className: \"text-sm font-mono focus:outline-none\",\n role: \"code\",\n \"aria-label\": `${o} code content`,\n tabIndex: -1,\n children: /* @__PURE__ */ e(\"code\", { children: C })\n }\n ) })\n ] }) })\n ] })\n ]\n }\n );\n return /* @__PURE__ */ w(te, { children: [\n !b && M,\n b && De(\n /* @__PURE__ */ w(te, { children: [\n /* @__PURE__ */ e(\n \"div\",\n {\n className: \"fixed inset-0 bg-black z-[9998]\",\n onClick: () => D(!1),\n \"aria-hidden\": \"true\"\n }\n ),\n M\n ] }),\n document.body\n )\n ] });\n}\nfunction fa({\n children: r,\n label: o,\n isOpen: t,\n onToggle: s,\n id: n,\n ref: a,\n disabled: l = !1,\n className: d,\n buttonClassName: i\n}) {\n const f = J(), u = n ?? f, [c, m] = R(!1), p = t !== void 0 ? t : c, x = () => {\n l || (t === void 0 && m((y) => !y), s == null || s(!p));\n };\n return V(() => {\n m(t ?? !1);\n }, [t]), /* @__PURE__ */ w(\"div\", { ref: a, id: u, \"data-open\": p, className: k(\"overflow-hidden\", d), children: [\n /* @__PURE__ */ e(\n \"button\",\n {\n id: `${u}-button`,\n type: \"button\",\n \"aria-expanded\": p,\n \"aria-controls\": `${u}-panel`,\n disabled: l,\n tabIndex: 0,\n className: k(\n \"w-full px-4 py-3 font-medium hover:bg-primary/10 disabled:opacity-50 disabled:cursor-not-allowed\",\n i\n ),\n onClick: x,\n onKeyDown: (y) => {\n (y.key === \"Enter\" || y.key === \" \") && (y.preventDefault(), x());\n },\n \"data-open\": p,\n \"data-label\": typeof o == \"string\" ? o : void 0,\n children: /* @__PURE__ */ w(\"div\", { className: \"flex items-center w-full gap-2\", children: [\n /* @__PURE__ */ e(\"span\", { className: \"flex-1 text-left\", children: o }),\n p ? /* @__PURE__ */ e(dt, { className: \"size-5\", \"aria-hidden\": \"true\" }) : /* @__PURE__ */ e(ut, { className: \"size-5\", \"aria-hidden\": \"true\" })\n ] })\n }\n ),\n /* @__PURE__ */ e(\"div\", { id: `${u}-panel`, role: \"region\", \"aria-labelledby\": u, \"aria-live\": \"polite\", hidden: !p, children: r })\n ] });\n}\nfunction Sr(r) {\n const [o, t] = R(!1), [s, n] = R(!1);\n return V(() => {\n if (r) {\n n(!0);\n const a = setTimeout(() => t(!0), 10);\n return () => clearTimeout(a);\n } else {\n t(!1);\n const a = setTimeout(() => n(!1), 300);\n return () => clearTimeout(a);\n }\n }, [r]), { show: o, shouldRender: s };\n}\nfunction Ar({\n isOpen: r,\n onClose: o,\n enabled: t = !0\n}) {\n const [s, n] = R(!1), [a, l] = R(0), [d, i] = R(0), f = $((v) => {\n !t || !r || (n(!0), i(v), document.body.style.userSelect = \"none\");\n }, [t, r]), u = $((v) => {\n if (!s || !t) return;\n const F = v - d, B = Math.max(0, F);\n l(B);\n }, [s, t, d]), c = $(() => {\n if (!s || !t) return;\n n(!1), document.body.style.userSelect = \"\", a > 100 && o(), l(0);\n }, [s, t, a, o]), m = $((v) => {\n v.preventDefault(), f(v.clientY);\n }, [f]), p = $((v) => {\n u(v.clientY);\n }, [u]), x = $(() => {\n c();\n }, [c]), y = $((v) => {\n v.preventDefault(), f(v.touches[0].clientY);\n }, [f]), b = $((v) => {\n v.preventDefault(), u(v.touches[0].clientY);\n }, [u]), D = $(() => {\n c();\n }, [c]);\n V(() => {\n if (s)\n return document.addEventListener(\"mousemove\", p), document.addEventListener(\"mouseup\", x), document.addEventListener(\"touchmove\", b, { passive: !1 }), document.addEventListener(\"touchend\", D), () => {\n document.removeEventListener(\"mousemove\", p), document.removeEventListener(\"mouseup\", x), document.removeEventListener(\"touchmove\", b), document.removeEventListener(\"touchend\", D);\n };\n }, [s, p, x, b, D]);\n const h = $((v) => {\n t && (v.key === \"ArrowDown\" || v.key === \"Escape\") && (v.preventDefault(), o());\n }, [t, o]);\n return {\n dragHandlers: t ? {\n onMouseDown: m,\n onTouchStart: y,\n onKeyDown: h\n } : {},\n translateY: a,\n isDragging: s\n };\n}\nfunction Ir(r, o) {\n const t = q(null);\n V(() => {\n if (!o) return;\n t.current = document.activeElement;\n const s = document.getElementById(r);\n s && s.focus();\n const n = (a) => {\n if (a.key !== \"Tab\") return;\n const l = document.getElementById(r);\n if (!l) return;\n const d = l.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n ), i = d[0], f = d[d.length - 1];\n a.shiftKey && document.activeElement === i ? (a.preventDefault(), f == null || f.focus()) : !a.shiftKey && document.activeElement === f && (a.preventDefault(), i == null || i.focus());\n };\n return document.addEventListener(\"keydown\", n), () => {\n document.removeEventListener(\"keydown\", n), t.current && typeof t.current.focus == \"function\" && t.current.focus();\n };\n }, [r, o]);\n}\nfunction $r(r, o) {\n V(() => {\n if (!r) return;\n const t = window.getComputedStyle(document.body).overflow;\n document.body.style.overflow = \"hidden\";\n const s = (n) => {\n n.key === \"Escape\" && o();\n };\n return document.addEventListener(\"keydown\", s), () => {\n document.body.style.overflow = t, document.removeEventListener(\"keydown\", s);\n };\n }, [r, o]);\n}\nfunction ma({\n ref: r,\n id: o,\n isOpen: t,\n onClose: s,\n title: n,\n children: a,\n footer: l,\n className: d,\n overlayClassName: i,\n showCloseButton: f = !1,\n disableCloseOnOverlayClick: u = !1,\n enableDragGestures: c = !0,\n ariaLabelledBy: m,\n ariaDescribedBy: p\n}) {\n const x = J(), y = o || `drawer-${x}`, b = `${x}-title`, { show: D, shouldRender: h } = Sr(t), { dragHandlers: g, translateY: v, isDragging: F } = Ar({\n isOpen: t,\n onClose: s,\n enabled: c\n });\n if (Ir(y, h), $r(h, s), !h) return null;\n const B = () => n ? Y.isValidElement(n) ? /* @__PURE__ */ e(\"div\", { children: n }) : /* @__PURE__ */ e(\"h2\", { className: \"text-2xl font-semibold\", id: b, children: n }) : null, N = () => {\n if (!l) return null;\n if (Y.isValidElement(l)) {\n const A = l, E = A.props.className || \"\";\n return Y.cloneElement(A, { className: k(\"px-6 py-4\", E) });\n }\n return /* @__PURE__ */ e(\"div\", { className: \"px-6 py-4\", children: l });\n };\n return /* @__PURE__ */ e(te, { children: De(\n /* @__PURE__ */ w(\n \"div\",\n {\n \"aria-labelledby\": m ?? n ? b : void 0,\n \"aria-describedby\": p,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-hidden\",\n \"data-drawer-open\": t,\n children: [\n /* @__PURE__ */ e(\n \"div\",\n {\n className: k(\n \"fixed inset-0 bg-black/40 transition-opacity\",\n D ? \"opacity-100\" : \"opacity-0\",\n i\n ),\n onClick: () => {\n u || s();\n }\n }\n ),\n /* @__PURE__ */ e(\"div\", { className: \"fixed inset-x-0 bottom-0 flex max-h-full\", children: /* @__PURE__ */ e(\n \"div\",\n {\n id: y,\n ref: r,\n tabIndex: -1,\n className: k(\n \"relative w-screen transform shadow-xl bg-popover text-popover-foreground transition-transform ease-in-out border-t border-border rounded-t-lg\",\n D ? \"translate-y-0\" : \"translate-y-full\",\n d\n ),\n style: {\n transform: c && v !== 0 ? `translateY(${v}px)` : void 0,\n transition: v !== 0 ? \"none\" : void 0\n },\n children: /* @__PURE__ */ w(\"div\", { className: \"flex h-full flex-col\", children: [\n c && /* @__PURE__ */ e(\n \"div\",\n {\n className: k(\n \"flex justify-center pt-3 pb-2 cursor-grab active:cursor-grabbing\",\n c && \"select-none\"\n ),\n ...g,\n role: c ? \"button\" : void 0,\n tabIndex: c ? 0 : void 0,\n \"aria-label\": c ? \"Drag to resize drawer\" : void 0,\n children: /* @__PURE__ */ e(\n \"div\",\n {\n className: k(\n \"w-12 h-1.5 bg-popover-foreground/25 rounded-full transition-colors\",\n c && \"hover:bg-popover-foreground/50\",\n F && \"bg-popover-foreground/50\"\n )\n }\n )\n }\n ),\n n && /* @__PURE__ */ e(\"div\", { className: \"px-6 pt-4\", children: B() }),\n f && /* @__PURE__ */ e(\n \"button\",\n {\n type: \"button\",\n onClick: s,\n \"data-drawer-close-button\": \"true\",\n \"aria-label\": \"Close drawer\",\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__ */ e(be, { size: 18 })\n }\n ),\n /* @__PURE__ */ e(\"div\", { className: k(\"flex-1 overflow-y-auto px-6 pb-6\", n ? \"pt-6\" : \"pt-4\"), children: a }),\n N()\n ] })\n }\n ) })\n ]\n }\n ),\n document.body\n ) });\n}\nfunction zr(r) {\n switch (r) {\n case \"top\":\n return \"bottom\";\n case \"bottom\":\n return \"top\";\n case \"left\":\n return \"right\";\n case \"right\":\n return \"left\";\n }\n}\nfunction Mr({\n internalIsOpen: r,\n autoSwitchPlacement: o,\n placement: t,\n offset: s,\n triggerRef: n,\n popoverRef: a\n}) {\n const [l, d] = R(t);\n return V(() => {\n if (!r || !o) return;\n const i = () => {\n if (!n.current || !a.current) return;\n const c = n.current.getBoundingClientRect(), m = a.current.getBoundingClientRect(), p = window.innerWidth, x = window.innerHeight;\n let y = t;\n const b = zr(t);\n if (t === \"top\" || t === \"bottom\") {\n const D = t === \"top\" ? c.top >= m.height + s : x - c.bottom >= m.height + s, h = b === \"top\" ? c.top >= m.height + s : x - c.bottom >= m.height + s;\n !D && h && (y = b);\n } else {\n const D = t === \"left\" ? c.left >= m.width + s : p - c.right >= m.width + s, h = b === \"left\" ? c.left >= m.width + s : p - c.right >= m.width + s;\n !D && h && (y = b);\n }\n d(y);\n };\n i();\n const f = () => i();\n window.addEventListener(\"scroll\", f, !0), window.addEventListener(\"resize\", f);\n const u = new ResizeObserver(i);\n return n.current && u.observe(n.current), a.current && u.observe(a.current), () => {\n window.removeEventListener(\"scroll\", f, !0), window.removeEventListener(\"resize\", f), u.disconnect();\n };\n }, [r, t, s, o, n, a]), l;\n}\nconst Tr = {\n bottom: {\n start: \"top-full left-0 origin-top-left\",\n center: \"top-full left-1/2 -translate-x-1/2 origin-top\",\n end: \"top-full right-0 origin-top-right\"\n },\n top: {\n start: \"bottom-full left-0 origin-bottom-left\",\n center: \"bottom-full left-1/2 -translate-x-1/2 origin-bottom\",\n end: \"bottom-full right-0 origin-bottom-right\"\n },\n left: {\n start: \"right-full top-0 origin-top-right\",\n center: \"right-full top-1/2 -translate-y-1/2 origin-right\",\n end: \"right-full bottom-0 origin-bottom-right\"\n },\n right: {\n start: \"left-full top-0 origin-top-left\",\n center: \"left-full top-1/2 -translate-y-1/2 origin-left\",\n end: \"left-full bottom-0 origin-bottom-left\"\n }\n};\nfunction Br(r, o) {\n switch (r) {\n case \"top\":\n return { marginBottom: `${o}px` };\n case \"bottom\":\n return { marginTop: `${o}px` };\n case \"left\":\n return { marginRight: `${o}px` };\n case \"right\":\n return { marginLeft: `${o}px` };\n default:\n return {};\n }\n}\nfunction Rr({\n id: r,\n ref: o,\n isOpen: t,\n onOpenChange: s,\n children: n,\n className: a,\n closeOnOverlayClick: l = !0,\n trigger: d,\n placement: i = \"bottom\",\n alignment: f = \"center\",\n closeOnTriggerClick: u = !0,\n offset: c = 8,\n autoSwitchPlacement: m = !0,\n hoverable: p = !1\n}) {\n const [x, y] = R(t ?? !1), b = q(null), D = q(null), h = q(null), g = J(), v = q(null), F = Mr({\n internalIsOpen: x,\n autoSwitchPlacement: m,\n placement: i,\n offset: c,\n triggerRef: D,\n popoverRef: b\n }), B = $(\n (T) => {\n s && s(T), t === void 0 && y(T);\n },\n [t, s]\n ), N = $(() => {\n v.current && (clearTimeout(v.current), v.current = null);\n }, []), A = $(() => {\n p && (N(), B(!0));\n }, [p, N, B]), E = $(() => {\n p && (N(), v.current = setTimeout(() => {\n B(!1);\n }, 200));\n }, [p, N, B]);\n V(() => {\n t !== void 0 && y(t);\n }, [t]), V(() => () => {\n v.current && clearTimeout(v.current);\n }, []), V(() => {\n if (!x) return;\n const T = (M) => {\n M.key === \"Escape\" && B(!1);\n };\n return document.addEventListener(\"keydown\", T), () => document.removeEventListener(\"keydown\", T);\n }, [x, B]), V(() => {\n if (!x || !l) return;\n const T = (M) => {\n const I = M.target;\n b.current && !b.current.contains(I) && D.current && !D.current.contains(I) && B(!1);\n };\n return document.addEventListener(\"mousedown\", T), () => document.removeEventListener(\"mousedown\", T);\n }, [x, l, B]), V(() => {\n var T, M;\n x ? (h.current = document.activeElement, (T = b.current) == null || T.focus()) : ((M = h.current) == null || M.focus(), h.current = null);\n }, [x]);\n const C = d.props, z = Y.cloneElement(d, {\n \"aria-expanded\": x,\n \"aria-haspopup\": \"dialog\",\n \"aria-controls\": g,\n ref: Et(D, C.ref),\n onClick: (T) => {\n var M, I;\n if ((M = C.onClick) == null || M.call(C, T), !p && !(!u && x) && t === void 0) {\n if (T.defaultPrevented || (I = b.current) != null && I.contains(T.target)) return;\n B(!x);\n }\n },\n onMouseEnter: (T) => {\n var M;\n (M = C.onMouseEnter) == null || M.call(C, T), A();\n },\n onMouseLeave: (T) => {\n var M;\n (M = C.onMouseLeave) == null || M.call(C, T), E();\n }\n });\n return /* @__PURE__ */ w(\"div\", { id: r, ref: o, className: \"relative inline-block\", children: [\n z,\n /* @__PURE__ */ e(\n \"div\",\n {\n id: g,\n ref: b,\n className: k(\n \"absolute z-[90] transform rounded-md shadow-lg bg-popover text-popover-foreground transition-all ease-out\",\n x ? \"opacity-100 scale-100\" : \"opacity-0 scale-75 pointer-events-none\",\n Tr[F][f],\n a\n ),\n style: Br(F, c),\n role: \"dialog\",\n \"aria-modal\": \"true\",\n tabIndex: -1,\n inert: x ? void 0 : !0,\n \"aria-hidden\": x ? void 0 : !0,\n onMouseEnter: p ? A : void 0,\n onMouseLeave: p ? E : void 0,\n children: n\n }\n )\n ] });\n}\nfunction Xe({ option: r, ...o }) {\n const { onItemSelect: t } = Me(), s = () => {\n r.onClick && r.onClick(), r.value && t(r.value);\n }, n = r.subItems && r.subItems.length > 0, a = r.href && !r.disabled;\n return /* @__PURE__ */ w(\n a ? \"a\" : \"div\",\n {\n href: a ? r.href : void 0,\n className: k(\n \"relative flex items-center gap-2 px-3 py-2 text-sm focus:outline-none focus:bg-popover-foreground/10\",\n r.disabled ? \"opacity-50 cursor-default\" : \"cursor-pointer\"\n ),\n onClick: r.disabled ? void 0 : s,\n ...o,\n children: [\n r.icon && /* @__PURE__ */ e(\"span\", { className: \"size-4\", children: r.icon }),\n /* @__PURE__ */ w(\"div\", { className: \"flex-1\", children: [\n /* @__PURE__ */ e(\"div\", { children: r.label }),\n r.description && /* @__PURE__ */ e(\"div\", { className: \"text-xs text-popover-foreground/60\", children: r.description })\n ] }),\n r.keyboardShortcut && /* @__PURE__ */ e(\"div\", { className: \"text-xs text-popover-foreground/60\", children: r.keyboardShortcut }),\n n && /* @__PURE__ */ e(he, { className: \"size-4\" })\n ]\n }\n );\n}\nfunction Lr({ option: r, level: o, index: t }) {\n const { focus: s, setFocus: n } = Me(), [a, l] = R(!1), [d, i] = R(!1), f = q(null), u = q(void 0), c = J(), m = () => {\n r.disabled || (n({ level: o, index: t }), x());\n }, p = () => {\n n(null), y();\n }, x = () => {\n l(!0);\n }, y = () => {\n l(!1);\n }, b = (g) => {\n if (g.key === \"ArrowRight\") {\n if (g.preventDefault(), r.disabled) return;\n i(!1);\n }\n };\n V(() => {\n const g = s == null ? void 0 : s.level, v = u.current, F = o + 1;\n g && v && v === F && g === v - 1 ? i(!0) : i(!1), u.current = g;\n }, [s, o]);\n const D = r.subItems !== void 0 && r.subItems.length > 0, h = a && !d && D;\n return /* @__PURE__ */ w(\n \"div\",\n {\n ref: f,\n className: \"relative focus:outline-none focus:bg-popover-foreground/10\",\n onMouseEnter: m,\n onMouseLeave: p,\n onFocus: x,\n onBlur: y,\n onKeyDown: b,\n tabIndex: 0,\n \"data-menu-item\": r.value,\n \"data-level\": o,\n \"data-index\": t,\n \"aria-haspopup\": D ? \"true\" : void 0,\n \"aria-expanded\": h ? \"true\" : \"false\",\n \"aria-disabled\": r.disabled ? \"true\" : void 0,\n \"aria-label\": r.label,\n \"aria-controls\": h ? c : void 0,\n children: [\n /* @__PURE__ */ e(Xe, { option: r }),\n h && /* @__PURE__ */ e(\"div\", { className: \"absolute left-full top-0 z-30\", children: /* @__PURE__ */ e(Oe, { items: r.subItems ?? [], level: o + 1, id: c }) })\n ]\n }\n );\n}\nfunction Oe({ items: r, level: o, id: t }) {\n const { setFocus: s, className: n = \"\" } = Me();\n let a = 0;\n const l = (d, i) => {\n switch (d.__type) {\n case \"option\":\n return d.subItems && d.subItems.length > 0 ? /* @__PURE__ */ e(Lr, { option: d, level: o, index: a++ }, i) : /* @__PURE__ */ e(\n Xe,\n {\n option: d,\n \"data-menu-item\": d.value,\n \"data-level\": o,\n \"data-index\": a++,\n tabIndex: -1,\n \"aria-disabled\": d.disabled ? \"true\" : void 0,\n onMouseEnter: (f) => {\n if (f.preventDefault(), d.disabled) return;\n const u = Number(f.currentTarget.getAttribute(\"data-index\"));\n s({ level: o, index: u });\n },\n onMouseLeave: (f) => {\n f.preventDefault(), s(null);\n }\n },\n i\n );\n case \"group\":\n return /* @__PURE__ */ w(\"div\", { children: [\n d.title && /* @__PURE__ */ e(\"div\", { className: \"px-3 py-2 text-xs font-semibold text-popover-foreground/50 uppercase\", children: d.title }),\n d.items.map((f, u) => l(f, `${i}-${u}`))\n ] }, i);\n case \"separator\":\n return /* @__PURE__ */ e(\"div\", { \"aria-hidden\": !0, className: \"my-1 mx-2 border-t border-popover-foreground/20\" }, i);\n case \"custom\":\n return /* @__PURE__ */ e(\"div\", { children: d.render() }, i);\n default:\n return null;\n }\n };\n return /* @__PURE__ */ e(\n \"div\",\n {\n id: t,\n className: k(\n \"border py-1 border-popover-foreground/20 rounded-md min-w-52 shadow-lg bg-popover text-popover-foreground\",\n n\n ),\n tabIndex: 0,\n \"data-level\": o,\n \"data-menu\": !0,\n role: \"menu\",\n \"aria-label\": `Dropdown menu level ${o}`,\n children: r.map((d, i) => l(d, String(i)))\n }\n );\n}\nfunction Vr(r, o) {\n return Array.from(r.querySelectorAll(`[data-menu-item][data-level=\"${o}\"]`));\n}\nfunction Gr(r, o) {\n const t = o === null ? 0 : (o + 1) % r.length;\n for (let s = 0; s < r.length; s++) {\n const n = (t + s) % r.length;\n if (!r[n].hasAttribute(\"aria-disabled\"))\n return n;\n }\n return -1;\n}\nfunction jr(r, o) {\n const t = o === null ? r.length - 1 : (o - 1 + r.length) % r.length;\n for (let s = 0; s < r.length; s++) {\n const n = (t - s + r.length) % r.length;\n if (!r[n].hasAttribute(\"aria-disabled\"))\n return n;\n }\n return -1;\n}\nfunction Wr({ dropdownId: r, focus: o, setFocus: t, isOpen: s, onClose: n }) {\n const a = $(\n (l) => {\n var c;\n if (!s) return;\n const { level: d, index: i } = o || { level: 1, index: null }, f = document.querySelector(`#${r} [data-menu][data-level=\"${d}\"]`);\n if (!f) return;\n const u = Vr(f, d);\n if (u.length !== 0)\n switch (l.key) {\n case \"ArrowDown\": {\n l.preventDefault();\n const m = Gr(u, i);\n if (m === -1) return;\n t({ level: d, index: m });\n break;\n }\n case \"ArrowUp\": {\n l.preventDefault();\n const m = jr(u, i);\n if (m === -1) return;\n t({ level: d, index: m });\n break;\n }\n case \"ArrowRight\": {\n if (l.preventDefault(), i !== null) {\n const p = u[i].querySelector(\"[data-menu]\");\n p && p.querySelector(\"[data-menu-item]\") && t({ level: d + 1, index: 0 });\n }\n break;\n }\n case \"ArrowLeft\": {\n l.preventDefault();\n const m = (c = f.parentElement) == null ? void 0 : c.closest(\"[data-menu-item]\");\n if (!m) {\n console.error(`No parent menu found leaving menu level ${d}`);\n return;\n }\n const p = m.getAttribute(\"data-index\") ? Number(m.getAttribute(\"data-index\")) : -1;\n m && t({ level: d - 1, index: p === -1 ? 0 : p });\n break;\n }\n case \"Enter\": {\n if (l.preventDefault(), i !== null) {\n const m = u[i];\n m == null || m.click(), t(null);\n }\n break;\n }\n case \"Escape\": {\n l.preventDefault(), n == null || n(), t(null);\n break;\n }\n case \"Tab\": {\n n();\n break;\n }\n }\n },\n [s, o, t, n, r]\n );\n return V(() => {\n if (s)\n return document.addEventListener(\"keydown\", a), () => {\n document.removeEventListener(\"keydown\", a);\n };\n }, [a, s]), { handleKeyDown: a };\n}\nfunction _r(r, o, t) {\n return document.querySelector(\n `#${r} [data-menu-item][data-level=\"${o}\"][data-index=\"${t}\"]`\n );\n}\nfunction pa({\n id: r,\n items: o,\n onItemSelect: t,\n trigger: s,\n isOpen: n,\n placement: a = \"bottom\",\n alignment: l = \"start\",\n onOpenChange: d,\n className: i = \"\",\n ...f\n}) {\n const u = J(), c = r || `dropdown-menu-${u}`, [m, p] = R(null), [x, y] = R(!1), b = n === void 0, D = b ? x : n, h = $(() => {\n p(null), y(!1);\n }, []), g = $(\n (N) => {\n t && t(N), h();\n },\n [t, h]\n ), v = $(\n (N) => {\n b && y(N), d && d(N);\n },\n [b, d]\n ), F = ne(\n () => ({\n id: c,\n focus: m,\n setFocus: p,\n isOpen: D,\n onItemSelect: g,\n onClose: h,\n className: i\n }),\n [m, p, g, h, i, D, c]\n );\n Wr({\n dropdownId: c,\n focus: m,\n setFocus: p,\n isOpen: D,\n onClose: h\n });\n const B = ne(() => Y.cloneElement(s, {\n onClick: (N) => {\n b && y((E) => !E);\n const A = s.props;\n A.onClick && A.onClick(N);\n }\n }), [b, y, s]);\n return V(() => {\n if (m) {\n const N = _r(c, m.level, m.index);\n N == null || N.focus();\n }\n }, [m, c]), /* @__PURE__ */ e(\n Rr,\n {\n id: c,\n isOpen: b ? x : D,\n trigger: B,\n placement: a,\n alignment: l,\n onOpenChange: v,\n className: k(\"min-w-52\", i),\n ...f,\n children: /* @__PURE__ */ e(wt.Provider, { value: F, children: /* @__PURE__ */ e(Oe, { items: o, level: 1 }) })\n }\n );\n}\nconst Kr = (r) => ({\n __type: \"option\",\n ...r\n}), Pr = (r, o) => ({\n __type: \"group\",\n title: o,\n items: r\n}), qr = () => ({\n __type: \"separator\"\n}), Hr = (r) => ({\n __type: \"custom\",\n render: r\n}), ha = {\n option: Kr,\n group: Pr,\n separator: qr,\n custom: Hr\n};\nfunction Zr(r = []) {\n const [o, t] = R(r), [s, n] = R(null), [a, l] = R(null), d = q(null), i = $((h, g) => {\n const v = {\n ...g,\n id: `item-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,\n content: h\n };\n return t((F) => [...F, v]), v;\n }, []), f = $((h) => {\n t((g) => g.filter((v) => v.id !== h));\n }, []), u = $((h, g) => {\n h !== g && t((v) => {\n const F = [...v], [B] = F.splice(h, 1);\n return F.splice(g, 0, B), F;\n });\n }, []), c = $((h) => {\n h > 0 && u(h, h - 1);\n }, [u]), m = $((h) => {\n h < o.length - 1 && u(h, h + 1);\n }, [u, o.length]), p = $((h, g) => {\n n(h), d.current = g, l(g);\n }, []), x = $((h, g) => {\n h.preventDefault(), l(g);\n }, []), y = $(() => {\n if (s && a !== null && d.current !== null) {\n const h = d.current, g = a;\n h !== g && u(h, g);\n }\n n(null), l(null), d.current = null;\n }, [s, a, u]), b = $((h) => {\n h.preventDefault(), y();\n }, [y]), D = $(() => {\n if (!s || a === null || d.current === null)\n return o;\n const h = d.current, g = a;\n if (h === g)\n return o;\n const v = [...o], [F] = v.splice(h, 1);\n return v.splice(g, 0, F), v;\n }, [o, s, a, d]);\n return {\n items: o,\n visualItems: D(),\n addItem: i,\n deleteItem: f,\n moveItem: u,\n moveItemUp: c,\n moveItemDown: m,\n draggedItem: s,\n draggedOverIndex: a,\n handleDragStart: p,\n handleDragOver: x,\n handleDragEnd: y,\n handleDrop: b\n };\n}\nconst Yr = {\n sm: \"text-sm\",\n md: \"text-base\",\n lg: \"text-lg\"\n}, Qr = {\n sm: \"text-sm gap-2\",\n md: \"text-base gap-3\",\n lg: \"text-lg gap-4\"\n}, Ur = {\n sm: 14,\n md: 15,\n lg: 16\n};\nfunction We({ size: r = 8, className: o = \"\" }) {\n return /* @__PURE__ */ e(\n \"div\",\n {\n className: `rounded-full flex-shrink-0 bg-current ${o}`,\n style: {\n width: r,\n height: r\n }\n }\n );\n}\nfunction Jr({ size: r = 12, className: o = \"\" }) {\n return /* @__PURE__ */ e(\n \"div\",\n {\n className: `flex-shrink-0 bg-current ${o}`,\n style: {\n width: r,\n height: 2\n }\n }\n );\n}\nfunction ba({\n items: r = [],\n size: o = \"md\",\n id: t,\n className: s = \"\",\n ref: n,\n allowAdd: a = !0,\n allowDelete: l = !0,\n allowReorder: d = !0,\n addPlaceholder: i = \"Add new item...\",\n onItemsChange: f,\n renderItem: u,\n marker: c,\n itemRenderer: m,\n showDividers: p = !0,\n showReorderButtons: x = !0,\n title: y,\n truncateText: b = !1\n}) {\n const [D, h] = R(\"\"), [g, v] = R(null), F = q(null), B = J(), N = q(!1), A = q(r), E = t || `dynamic-list-${B}`, C = `${E}-title`, {\n items: z,\n visualItems: T,\n addItem: M,\n deleteItem: I,\n moveItemUp: G,\n moveItemDown: W,\n draggedItem: Q,\n draggedOverIndex: re,\n handleDragStart: L,\n handleDragOver: K,\n handleDragEnd: ae,\n handleDrop: le\n } = Zr(r), ie = m || u;\n V(() => {\n if (!N.current) {\n N.current = !0;\n return;\n }\n A.current !== z && (A.current = z, f == null || f(z));\n }, [z, f]);\n const S = (_) => (\n // must escape special characters in ID for querySelector\n document.querySelector(`#${E} #${CSS.escape(_)}`)\n ), j = () => {\n var _;\n D.trim() && (M(D.trim()), h(\"\"), (_ = F.current) == null || _.focus());\n }, X = (_, ee) => {\n var fe;\n if (!l)\n return;\n _.preventDefault();\n const oe = ee < z.length - 1 ? ee + 1 : ee - 1, ue = z[oe];\n I(z[ee].id), oe >= 0 && ue ? setTimeout(() => {\n const se = S(ue.id);\n se == null || se.focus();\n }, 0) : ((fe = F.current) == null || fe.focus(), v(null));\n }, U = (_) => {\n _.key === \"Enter\" && j();\n }, P = (_, ee) => {\n switch (_.key) {\n case \"ArrowUp\":\n if (!d) return;\n _.preventDefault(), G(ee), ee > 0 && v(ee - 1);\n break;\n case \"ArrowDown\":\n if (!d) return;\n _.preventDefault(), W(ee), ee < z.length - 1 && v(ee + 1);\n break;\n case \"Backspace\":\n case \"Delete\":\n X(_, ee);\n break;\n }\n }, O = () => {\n if (!y) return null;\n const _ = k(\"font-medium opacity-60\", Yr[o]);\n if (typeof y == \"string\")\n return /* @__PURE__ */ e(\"h4\", { id: C, className: _, children: y });\n const ee = y.props;\n return Y.cloneElement(y, { id: C, className: k(_, ee.className) });\n }, H = (_) => {\n if (!c) return null;\n if (Y.isValidElement(c))\n return c;\n switch (c) {\n case \"disc\":\n return /* @__PURE__ */ e(We, { className: \"text-muted-foreground\" });\n case \"dash\":\n return /* @__PURE__ */ e(Jr, { className: \"text-muted-foreground\" });\n case \"decimal\":\n return /* @__PURE__ */ w(\"span\", { className: \"text-sm font-medium text-muted-foreground flex-shrink-0 min-w-4 text-right\", children: [\n _ + 1,\n \".\"\n ] });\n default:\n return /* @__PURE__ */ e(We, { className: \"text-muted-foreground\" });\n }\n }, ce = Qr[o], de = Ur[o];\n return /* @__PURE__ */ w(\n \"div\",\n {\n ref: n,\n id: E,\n className: s,\n \"data-size\": o,\n \"data-allow-add\": a,\n \"data-allow-delete\": l,\n \"data-allow-reorder\": d,\n \"data-marker\": typeof c == \"string\" ? c : \"custom\",\n children: [\n O(),\n /* @__PURE__ */ w(\"ul\", { className: ce, role: \"list\", \"aria-labelledby\": y ? C : void 0, children: [\n T.map((_, ee) => {\n const oe = z.findIndex((se) => se.id === _.id), ue = (Q == null ? void 0 : Q.id) === _.id, fe = g === oe;\n return /* @__PURE__ */ w(\"div\", { children: [\n /* @__PURE__ */ w(\n \"li\",\n {\n id: _.id,\n title: b ? _.content : void 0,\n className: k(\n \"flex items-center group relative transition-all\",\n ue && \"opacity-30\",\n // Drag feedback styling\n Q && re === ee && !ue ? \"border-t-2 border-primary\" : \"\"\n ),\n draggable: d,\n onDragStart: (se) => {\n se.dataTransfer.effectAllowed = \"move\", L(_, oe);\n },\n onDragOver: (se) => K(se, ee),\n onDragEnd: ae,\n onDrop: le,\n onMouseEnter: () => v(oe),\n onMouseLeave: () => v(null),\n onFocus: (se) => {\n se.currentTarget === se.target && v(oe);\n },\n tabIndex: 0,\n role: \"listitem\",\n \"aria-label\": `List item ${oe + 1}: ${_.content}`,\n onKeyDown: (se) => P(se, oe),\n \"aria-description\": `${d ? \"Use up/down arrow keys to reorder. \" : \"\"}${l ? \"Press Backspace/Delete to remove this item.\" : \"\"}`,\n children: [\n d && /* @__PURE__ */ e(\"div\", { className: k(\"absolute -translate-x-full flex-shrink-0 pl-2 pr-1 py-2 cursor-move transition-opacity opacity-0\", (ue || fe && !Q) && \"opacity-100\"), children: /* @__PURE__ */ e(ft, { size: de + 2 }) }),\n c && /* @__PURE__ */ e(\"div\", { className: k(\"flex-shrink-0 flex items-center justify-center py-2 pr-2\"), children: H(oe) }),\n /* @__PURE__ */ w(\"div\", { className: k(\"flex-1 flex min-w-0\"), children: [\n /* @__PURE__ */ e(\"div\", { className: k(\"flex-1 min-w-0 py-2 pr-2\"), children: ie ? ie(_, oe) : /* @__PURE__ */ e(\"span\", { className: k(\"block\", b && \"truncate\"), children: _.content }) }),\n !Q && /* @__PURE__ */ w(\n \"div\",\n {\n className: k(\n \"flex-shrink-0 flex items-center gap-1 pr-2 opacity-0 transition-opacity\",\n fe && \"opacity-100\"\n ),\n children: [\n d && x && /* @__PURE__ */ w(te, { children: [\n /* @__PURE__ */ e(\n \"button\",\n {\n type: \"button\",\n onClick: () => G(oe),\n disabled: oe === 0,\n className: \"p-0.5 opacity-50 leading-0 hover:opacity-80 disabled:opacity-30 disabled:cursor-not-allowed rounded transition-colors\",\n \"aria-hidden\": !0,\n tabIndex: -1,\n children: /* @__PURE__ */ e(Ue, { size: de })\n }\n ),\n /* @__PURE__ */ e(\n \"button\",\n {\n type: \"button\",\n onClick: () => W(oe),\n disabled: oe === z.length - 1,\n className: \"p-0.5 opacity-50 leading-0 hover:opacity-80 disabled:opacity-30 disabled:cursor-not-allowed rounded transition-colors\",\n \"aria-hidden\": !0,\n tabIndex: -1,\n children: /* @__PURE__ */ e(Ne, { size: de })\n }\n )\n ] }),\n l && /* @__PURE__ */ e(\n \"button\",\n {\n tabIndex: fe ? 0 : -1,\n type: \"button\",\n onClick: (se) => X(se, oe),\n className: \"p-0.5 text-destructive opacity-70 h-fit hover:opacity-90 rounded transition-colors focus:outline-none focus:ring-2 focus:ring-destructive\",\n \"aria-label\": \"Delete item\",\n children: /* @__PURE__ */ e(mt, { size: de })\n }\n )\n ]\n }\n )\n ] })\n ]\n }\n ),\n p && ee < z.length - 1 && /* @__PURE__ */ e(\"hr\", { className: \"border-border/50\" })\n ] }, _.id);\n }),\n z.length === 0 && /* @__PURE__ */ w(\"li\", { className: k(\"text-center text-muted-foreground py-8\", ce), children: [\n \"No items yet. \",\n a && \"Add an item below to get started.\"\n ] })\n ] }),\n a && /* @__PURE__ */ w(\"div\", { className: k(\"border-t border-border/50 flex items-center gap-2\", ce), children: [\n /* @__PURE__ */ e(\n \"input\",\n {\n id: `${E}-new-item-input`,\n ref: F,\n type: \"text\",\n value: D,\n onChange: (_) => h(_.target.value),\n onKeyDown: U,\n placeholder: i,\n className: \"flex-1 bg-transparent border-none outline-none placeholder-muted-foreground pt-1\",\n \"aria-label\": \"Add new list item\"\n }\n ),\n /* @__PURE__ */ e(\n \"button\",\n {\n type: \"button\",\n onClick: j,\n disabled: !D.trim(),\n className: \"flex-shrink-0 p-1.5 text-muted-foreground opacity-70 enabled:hover:opacity-100 disabled:opacity-30 disabled:cursor-not-allowed rounded transition-opacity\",\n \"aria-label\": \"Add item\",\n children: /* @__PURE__ */ e(pt, { size: 16 })\n }\n )\n ] })\n ]\n }\n );\n}\nconst Xr = {\n danger: {\n container: \"border-destructive bg-destructive/10\",\n icon: \"text-destructive\",\n title: \"text-destructive\",\n description: \"text-destructive/80\",\n button: \"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus:ring-destructive\",\n details: \"bg-destructive/5 border-destructive/20 text-destructive\"\n },\n warning: {\n container: \"border-yellow-600 bg-yellow-600/10\",\n icon: \"text-yellow-600\",\n title: \"text-yellow-600\",\n description: \"text-yellow-600/80\",\n button: \"bg-yellow-600 text-white hover:bg-yellow-600/90 focus:ring-yellow-600\",\n details: \"bg-yellow-600/5 border-yellow-600/20 text-yellow-600\"\n },\n info: {\n container: \"border-blue-600 bg-blue-600/10\",\n icon: \"text-blue-600\",\n title: \"text-blue-600\",\n description: \"text-blue-600/80\",\n button: \"bg-blue-600 text-white hover:bg-blue-600/90 focus:ring-blue-600\",\n details: \"bg-blue-600/5 border-blue-600/20 text-blue-600\"\n }\n}, Or = {\n danger: /* @__PURE__ */ e(ve, { size: 24 }),\n warning: /* @__PURE__ */ e(ve, { size: 24 }),\n info: /* @__PURE__ */ e(Be, { size: 24 })\n};\nfunction ga({\n id: r,\n variant: o = \"danger\",\n showRetry: t = !0,\n fallbackMessage: s,\n fallback: n,\n onRetry: a,\n onError: l,\n className: d,\n children: i,\n inDevEnv: f = !1\n}) {\n return /* @__PURE__ */ e(\n en,\n {\n id: r,\n variant: o,\n showRetry: t,\n fallbackMessage: s,\n fallback: n,\n onRetry: a,\n onError: l,\n className: d,\n inDevEnv: f,\n children: i\n }\n );\n}\nclass en extends nt {\n constructor(t) {\n super(t);\n Re(this, \"handleRetry\", () => {\n var t, s;\n this.setState({ hasError: !1, error: void 0, errorInfo: void 0 }), (s = (t = this.props).onRetry) == null || s.call(t);\n });\n this.state = { hasError: !1 };\n }\n static getDerivedStateFromError(t) {\n return { hasError: !0, error: t };\n }\n componentDidCatch(t, s) {\n var n, a;\n this.setState({ error: t, errorInfo: s }), (a = (n = this.props).onError) == null || a.call(n, t, s), this.props.inDevEnv && (console.error(\"ErrorBoundary caught an error:\", t), console.error(\"Error info:\", s));\n }\n render() {\n var f;\n const {\n id: t,\n variant: s = \"danger\",\n showRetry: n = !0,\n fallbackMessage: a = \"Something went wrong\",\n fallback: l,\n className: d,\n inDevEnv: i\n } = this.props;\n if (this.state.hasError) {\n if (l)\n return l;\n const u = Xr[s], c = Or[s];\n return /* @__PURE__ */ w(\n \"div\",\n {\n id: t,\n \"data-variant\": s,\n \"data-has-error\": this.state.hasError,\n className: k(\n \"rounded-lg border p-6 text-center\",\n u.container,\n d\n ),\n role: \"alert\",\n \"aria-live\": \"assertive\",\n children: [\n /* @__PURE__ */ e(\"div\", { className: k(\"mb-4 flex justify-center\", u.icon), children: c }),\n /* @__PURE__ */ e(\"h3\", { className: k(\"text-lg font-semibold mb-2\", u.title), children: \"Oops! Something went wrong\" }),\n /* @__PURE__ */ e(\"p\", { className: k(\"text-sm mb-4\", u.description), children: a }),\n i && this.state.error && /* @__PURE__ */ w(\"details\", { className: \"mt-4 text-left\", children: [\n /* @__PURE__ */ e(\"summary\", { className: \"cursor-pointer text-sm font-medium mb-2\", children: \"Error Details (Development Only)\" }),\n /* @__PURE__ */ w(\"div\", { className: k(\n \"rounded border p-3 text-xs font-mono whitespace-pre-wrap overflow-auto max-h-40\",\n u.details\n ), children: [\n /* @__PURE__ */ e(\"div\", { className: \"font-bold mb-1\", children: \"Error:\" }),\n /* @__PURE__ */ e(\"div\", { className: \"mb-2\", children: this.state.error.toString() }),\n ((f = this.state.errorInfo) == null ? void 0 : f.componentStack) && /* @__PURE__ */ w(te, { children: [\n /* @__PURE__ */ e(\"div\", { className: \"font-bold mb-1\", children: \"Component Stack:\" }),\n /* @__PURE__ */ e(\"div\", { children: this.state.errorInfo.componentStack })\n ] })\n ] })\n ] }),\n n && /* @__PURE__ */ e(\n \"button\",\n {\n type: \"button\",\n onClick: this.handleRetry,\n className: k(\n \"inline-flex items-center gap-2 px-4 py-2 rounded-md font-medium transition-colors\",\n \"focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-transparent\",\n u.button\n ),\n \"aria-label\": \"Try again\",\n children: \"Try Again\"\n }\n )\n ]\n }\n );\n }\n return this.props.children;\n }\n}\nconst tn = (r) => ({\n __type: \"input\",\n ...r\n}), rn = (r) => ({\n __type: \"textarea\",\n ...r\n}), nn = (r) => ({\n __type: \"select\",\n ...r\n}), an = (r) => ({\n __type: \"checkbox\",\n ...r\n}), on = (r) => ({\n __type: \"radio\",\n ...r\n}), xa = {\n input: tn,\n textarea: rn,\n select: nn,\n checkbox: an,\n radio: on\n};\nfunction sn(r, o) {\n const [t, s] = R({}), n = $((u, c) => {\n if (u.required && (!c || typeof c == \"string\" && c.trim() === \"\"))\n return `${u.label} is required`;\n if (u.isValid && c) {\n const m = u.isValid, p = m(c);\n if (!p.valid)\n return p.message || `${u.label} is invalid`;\n }\n return null;\n }, []), a = $((u = o) => {\n const c = {};\n return r.forEach((m) => {\n const p = n(m, u[m.name]);\n p && (c[m.name] = p);\n }), s(c), Object.keys(c).length === 0;\n }, [r, o, n]), l = $((u, c) => {\n const m = r.find((x) => x.name === u);\n if (!m) return;\n const p = n(m, c);\n return s((x) => {\n const y = { ...x };\n return p ? y[u] = p : delete y[u], y;\n }), !p;\n }, [r, n]), d = $(() => {\n s({});\n }, []), i = ne(() => Object.values(t).some((u) => u), [t]), f = ne(() => r.every((u) => {\n const c = o[u.name];\n if (u.required && (!c || typeof c == \"string\" && c.trim() === \"\"))\n return !1;\n if (u.isValid && c) {\n const m = u.isValid;\n return m(c).valid;\n }\n return !0;\n }) && !i, [r, o, i]);\n return {\n errors: t,\n hasErrors: i,\n isFormValid: f,\n validateForm: a,\n validateSingleField: l,\n clearErrors: d\n };\n}\nconst Se = {\n spacing: {\n tight: \"gap-3\",\n normal: \"gap-4\",\n loose: \"gap-6\"\n },\n columns: {\n 1: \"grid-cols-1\",\n 2: \"grid-cols-1 md:grid-cols-2\",\n 3: \"grid-cols-1 md:grid-cols-2 lg:grid-cols-3\",\n 4: \"grid-cols-1 md:grid-cols-2 lg:grid-cols-4\"\n },\n colSpan: {\n 1: \"col-span-1\",\n 2: \"col-span-1 md:col-span-2\",\n 3: \"col-span-1 md:col-span-2 lg:col-span-3\",\n 4: \"col-span-1 md:col-span-2 lg:col-span-4\",\n full: \"col-span-full\"\n }\n}, Ae = {\n spacing: \"normal\",\n columns: 1,\n responsive: !0\n};\nfunction pe({\n display: r = \"inline\",\n width: o = \"fit-content\",\n className: t = \"\",\n required: s,\n helpMessage: n,\n suffix: a,\n htmlFor: l,\n children: d,\n description: i,\n ...f\n}) {\n var y, b;\n const u = J(), c = (((y = n == null ? void 0 : n.trim()) == null ? void 0 : y.length) || 0) > 0, m = (((b = i == null ? void 0 : i.trim()) == null ? void 0 : b.length) || 0) > 0, p = c ? `${l ?? u}-help` : void 0, x = m ? `${l ?? u}-description` : void 0;\n return /* @__PURE__ */ w(\n \"div\",\n {\n style: { display: r === \"inline\" ? \"inline-block\" : \"block\", width: o },\n className: k(\"mb-0.5\", t),\n children: [\n /* @__PURE__ */ w(\"div\", { className: \"relative flex\", children: [\n /* @__PURE__ */ w(\"label\", { className: \"font-medium\", htmlFor: l, ...f, children: [\n d,\n s && /* @__PURE__ */ e(\"span\", { className: \"text-red-500 font-medium ml-1\", \"aria-label\": \"required\", children: \"*\" })\n ] }),\n c && /* @__PURE__ */ e(\n \"span\",\n {\n className: \"text-gray-500 ml-1 size-fit -translate-y-1/3\",\n \"aria-describedby\": p,\n \"aria-label\": \"Help information\",\n title: n,\n children: /* @__PURE__ */ e(ht, {})\n }\n ),\n c && /* @__PURE__ */ e(\"div\", { id: p, className: \"sr-only\", children: n }),\n a && /* @__PURE__ */ e(\"span\", { className: \"ml-1\", children: a })\n ] }),\n m && /* @__PURE__ */ e(\"small\", { id: x, className: \"block opacity-80 mt-0.5\", role: \"note\", children: i })\n ]\n }\n );\n}\nfunction ke({ elementId: r, type: o, message: t }) {\n return V(() => {\n const s = document.getElementById(r);\n if (s) {\n if (!t && o === \"error\") {\n s.removeAttribute(\"data-error\");\n return;\n }\n if (!t && o === \"success\") {\n s.removeAttribute(\"data-success\");\n return;\n }\n return s.setAttribute(\"aria-describedby\", `${r}-${o}-message`), s.setAttribute(\"aria-invalid\", o === \"error\" ? \"true\" : \"false\"), o === \"error\" && s.setAttribute(\"data-error\", \"true\"), o === \"success\" && s.setAttribute(\"data-success\", \"true\"), () => {\n s.removeAttribute(\"aria-describedby\"), s.removeAttribute(\"aria-invalid\"), s.removeAttribute(\"data-error\"), s.removeAttribute(\"data-success\");\n };\n }\n }, [r, o, t]), t ? /* @__PURE__ */ w(\n \"small\",\n {\n className: k(\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__ */ e(ve, {}) : /* @__PURE__ */ e(Ye, {}),\n /* @__PURE__ */ e(\"span\", { id: `${r}-${o}-message`, children: t })\n ]\n }\n ) : null;\n}\nconst ln = {\n base: \"\",\n default: \"ring ring-transparent focus:ring-primary-foreground/60 not-disabled:data-error:ring-destructive not-disabled:data-success:ring-success\",\n underline: \"border-b border-border focus:border-current/60 disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\",\n outline: \"border border-border focus:border-current/60 disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\",\n solid: \"bg-muted/50 focus:bg-muted/70 not-disabled:data-error:border-destructive/70 not-disabled:data-success:border-success/70\"\n}, cn = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, _e = {\n variant: \"default\",\n rounded: \"none\"\n};\nfunction dn({\n variant: r = _e.variant,\n rounded: o,\n displayOnlyMode: t = !1,\n errorMessage: s,\n successMessage: n,\n type: a = \"text\",\n className: l,\n ...d\n}) {\n const i = J(), [f, u] = R(!1);\n let c = o;\n r === \"outline\" && !o && (c = \"md\"), c = c || _e.rounded;\n const x = k(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted-foreground/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 && ln[r],\n !t && cn[c],\n a === \"password\" && \"pr-10\",\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n l\n );\n return /* @__PURE__ */ w(\"div\", { className: k(t && \"cursor-text\"), style: { height: d.height, width: d.width }, children: [\n /* @__PURE__ */ w(\"div\", { className: k(a === \"password\" && \"relative\"), children: [\n /* @__PURE__ */ e(\n \"input\",\n {\n ...d,\n id: i,\n type: a === \"password\" && f ? \"text\" : a,\n \"aria-disabled\": d.disabled,\n readOnly: t,\n \"aria-readonly\": t || d[\"aria-readonly\"],\n \"data-error\": s ? !0 : void 0,\n \"data-success\": n ? !0 : void 0,\n className: x\n }\n ),\n a === \"password\" && /* @__PURE__ */ e(\n \"button\",\n {\n onClick: () => u(!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__ */ e(bt, { size: 20 }) : /* @__PURE__ */ e(gt, { size: 20 })\n }\n )\n ] }),\n !t && /* @__PURE__ */ e(ke, { elementId: i, type: \"error\", message: s }),\n !t && /* @__PURE__ */ e(ke, { elementId: i, type: \"success\", message: n })\n ] });\n}\nfunction un({ elementId: r, maxLength: o }) {\n const [t, s] = R(0);\n return V(() => {\n const n = document.getElementById(r);\n if (!n)\n return;\n const a = () => {\n const l = n.value.length;\n s(l);\n const d = l >= o;\n n.setAttribute(\"aria-describedby\", `${r}-character-count`), n.setAttribute(\"aria-invalid\", d ? \"true\" : \"false\"), d ? n.setAttribute(\"data-error\", \"true\") : n.removeAttribute(\"data-error\");\n };\n return a(), n.addEventListener(\"input\", a), n.setAttribute(\"maxlength\", String(o)), () => {\n n.removeEventListener(\"input\", a), n.removeAttribute(\"maxlength\"), n.removeAttribute(\"aria-describedby\"), n.removeAttribute(\"aria-invalid\"), n.removeAttribute(\"data-error\");\n };\n }, [r, o]), /* @__PURE__ */ e(\n \"small\",\n {\n className: k(\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__ */ w(\"span\", { id: `${r}-character-count`, children: [\n t,\n \" / \",\n o,\n \" characters\"\n ] })\n }\n );\n}\nfunction fn(r, o) {\n V(() => {\n const t = document.getElementById(r);\n if (!t)\n return;\n if (!o) {\n t.style.height = \"auto\";\n return;\n }\n const s = () => {\n t.style.height = \"auto\", t.style.height = `${t.scrollHeight}px`;\n };\n return s(), t.addEventListener(\"input\", s), t.addEventListener(\"resize\", s), window.addEventListener(\"resize\", s), () => {\n t.removeEventListener(\"input\", s), t.removeEventListener(\"resize\", s), window.removeEventListener(\"resize\", s);\n };\n }, [r, o]);\n}\nconst mn = {\n base: \"\",\n \"left-line\": \"border-l border-border focus:border-current/60 disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\",\n outline: \"border border-border focus:border-current/60 disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\",\n solid: \"bg-muted/50 focus:bg-muted/70 not-disabled:data-error:border-destructive/70 not-disabled:data-success:border-success/70\"\n}, pn = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, Ke = {\n variant: \"outline\",\n rounded: \"none\"\n};\nfunction hn({\n variant: r = Ke.variant,\n rounded: o,\n displayOnlyMode: t = !1,\n errorMessage: s,\n successMessage: n,\n hideResizeHandle: a = !1,\n autoExpand: l = !1,\n characterLimit: d = 0,\n className: i,\n ...f\n}) {\n const u = J();\n fn(u, l || t);\n let c = o;\n r === \"outline\" && !o && (c = \"md\"), c = c || Ke.rounded;\n let m = a;\n (t || r === \"left-line\" && !a) && (m = !0);\n const x = k(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted-foreground/70 hide-number-input-arrows transition-all\",\n !t && mn[r],\n !t && pn[c],\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n m && \"no-resize-handle\",\n i\n );\n return /* @__PURE__ */ w(\"div\", { className: k(\"-space-y-1.5\", t && \"cursor-text\"), children: [\n /* @__PURE__ */ e(\n \"textarea\",\n {\n ...f,\n id: u,\n \"aria-disabled\": f.disabled,\n readOnly: t,\n \"aria-readonly\": t || f[\"aria-readonly\"],\n style: {\n resize: l ? \"none\" : void 0\n },\n className: x\n }\n ),\n d > 0 && /* @__PURE__ */ e(un, { elementId: u, maxLength: d }),\n !t && /* @__PURE__ */ e(ke, { elementId: u, type: \"error\", message: s }),\n !t && /* @__PURE__ */ e(ke, { elementId: u, type: \"success\", message: n })\n ] });\n}\nfunction bn(r) {\n const [o, t] = R(!1), [s, n] = R(!1);\n return V(() => {\n r ? (n(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => n(!1), 150));\n }, [r]), { show: o, shouldRender: s };\n}\nfunction gn({\n isOpen: r,\n setIsOpen: o,\n filteredOptions: t,\n highlightedIndex: s,\n setHighlightedIndex: n,\n onSelect: a,\n triggerRef: l\n}) {\n return { handleKeyDown: $(\n (i) => {\n var f;\n switch (i.key) {\n case \"ArrowDown\":\n if (i.preventDefault(), !r)\n o(!0);\n else {\n const u = s < t.length - 1 ? s + 1 : 0;\n let c = u;\n for (let m = 0; m < t.length; m++) {\n const p = (u + m) % t.length;\n if (!t[p].disabled) {\n c = p;\n break;\n }\n }\n n(c);\n }\n break;\n case \"ArrowUp\":\n if (i.preventDefault(), !r)\n o(!0);\n else {\n const u = s > 0 ? s - 1 : t.length - 1;\n let c = u;\n for (let m = 0; m < t.length; m++) {\n const p = (u - m + t.length) % t.length;\n if (!t[p].disabled) {\n c = p;\n break;\n }\n }\n n(c);\n }\n break;\n case \"Enter\":\n case \" \":\n if (i.preventDefault(), !r)\n o(!0);\n else if (s >= 0 && s < t.length) {\n const u = t[s];\n u.disabled || a(u);\n }\n break;\n case \"Escape\":\n i.preventDefault(), r && (o(!1), (f = l.current) == null || f.focus());\n break;\n case \"Tab\":\n r && o(!1);\n break;\n }\n },\n [r, o, t, s, n, a, l]\n ) };\n}\nfunction xn({\n isOpen: r,\n filteredOptions: o,\n selectedOption: t,\n shouldRender: s,\n optionsContainerRef: n\n}) {\n const [a, l] = R(-1), d = ne(() => t ? o.findIndex((i) => i.value === t.value) : -1, [o, t]);\n return V(() => {\n r && o.length > 0 ? l(t && d >= 0 ? d : 0) : l(-1);\n }, [o, r, t, d]), V(() => {\n if (a >= 0 && n.current && s) {\n const i = () => {\n const f = n.current, u = f == null ? void 0 : f.querySelector(`[data-option-index=\"${a}\"]`);\n if (u) {\n const c = r && t && a === d ? \"auto\" : \"smooth\";\n u.scrollIntoView({\n behavior: c,\n block: \"nearest\"\n });\n }\n };\n r && s && t ? setTimeout(i, 10) : i();\n }\n }, [a, s, r, t, o, n, d]), { highlightedIndex: a, setHighlightedIndex: l };\n}\nconst Pe = {\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 yn(r) {\n const o = q(null), t = q(null), s = q(null), [n, a] = R(!1), [l, d] = R(!1), [i, f] = R({\n vertical: !1,\n horizontal: !1\n }), u = q(null), c = q(null), m = $(() => {\n const y = o.current;\n if (!y) return;\n const b = y.scrollHeight > y.clientHeight, D = y.scrollWidth > y.clientWidth;\n f({\n vertical: b,\n horizontal: D\n });\n }, []), p = $(() => {\n const y = o.current, b = t.current, D = s.current;\n if (y) {\n if (b && i.vertical) {\n const g = (i.horizontal ? y.clientHeight - r : y.clientHeight) / y.scrollHeight, v = Math.max(g * 100, 10), F = y.scrollHeight - y.clientHeight, B = F > 0 ? y.scrollTop / F : 0, N = 100 - v, A = B * N;\n b.style.height = `${v}%`, b.style.top = `${A}%`, b.style.transform = \"none\";\n }\n if (D && i.horizontal) {\n const g = (i.vertical ? y.clientWidth - r : y.clientWidth) / y.scrollWidth, v = Math.max(g * 100, 10), F = y.scrollWidth - y.clientWidth, B = F > 0 ? y.scrollLeft / F : 0, N = 100 - v, A = B * N;\n D.style.width = `${v}%`, D.style.left = `${A}%`, D.style.transform = \"none\";\n }\n }\n }, [i, r]), x = $(() => {\n u.current && clearTimeout(u.current), c.current && clearTimeout(c.current), a(!0), d(!1), p(), u.current = setTimeout(() => {\n d(!0), c.current = setTimeout(() => {\n a(!1), d(!1);\n }, 300);\n }, 1e3);\n }, [p]);\n return V(() => {\n const y = o.current;\n if (!y) return;\n m();\n const b = new ResizeObserver(m);\n b.observe(y);\n const D = new MutationObserver(m);\n return D.observe(y, {\n childList: !0,\n subtree: !0,\n attributes: !0\n }), () => {\n b.disconnect(), D.disconnect();\n };\n }, [m]), V(() => {\n p();\n }, [i, p]), V(() => () => {\n u.current && clearTimeout(u.current), c.current && clearTimeout(c.current);\n }, []), {\n viewportRef: o,\n verticalThumbRef: t,\n horizontalThumbRef: s,\n isScrolling: n,\n isFadingOut: l,\n scrollbarVisible: i,\n handleScroll: x\n };\n}\nfunction vn({\n className: r,\n thumbClassName: o,\n viewportClassName: t,\n scrollbarClassName: s,\n scrollbarThickness: n = 8,\n children: a,\n id: l,\n ref: d,\n ...i\n}) {\n const { viewportRef: f, verticalThumbRef: u, horizontalThumbRef: c, isScrolling: m, isFadingOut: p, scrollbarVisible: x, handleScroll: y } = yn(n), b = Z(\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__ */ w(\"div\", { ref: d, id: l, className: Z(\"relative overflow-hidden\", r), \"data-scroll-area-root\": \"\", ...i, children: [\n /* @__PURE__ */ e(\n \"div\",\n {\n ref: f,\n className: Z(\n \"h-full w-full overflow-auto rounded-[inherit] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden\",\n t\n ),\n onScroll: y,\n \"data-scroll-area-viewport\": \"\",\n children: a\n }\n ),\n x.vertical && (m || p) && /* @__PURE__ */ e(\n \"div\",\n {\n className: Z(\n \"touch-none select-none transition-all\",\n \"p-[1px]\",\n \"absolute right-0 top-0\",\n p ? \"opacity-0\" : \"opacity-100\",\n s\n ),\n \"data-scroll-area-scrollbar\": \"vertical\",\n \"data-state\": m ? \"visible\" : \"hidden\",\n style: {\n width: `${n}px`,\n height: x.horizontal ? `calc(100% - ${n}px)` : \"100%\"\n },\n children: /* @__PURE__ */ e(\n \"div\",\n {\n ref: u,\n className: Z(\"absolute rounded-full\", b),\n \"data-scroll-area-thumb\": \"\",\n style: { height: \"20%\", top: \"0%\", width: \"100%\" }\n }\n )\n }\n ),\n x.horizontal && (m || p) && /* @__PURE__ */ e(\n \"div\",\n {\n className: Z(\n \"touch-none select-none transition-all\",\n \"p-[1px]\",\n \"absolute bottom-0 left-0\",\n p ? \"opacity-0\" : \"opacity-100\",\n s\n ),\n \"data-scroll-area-scrollbar\": \"horizontal\",\n \"data-state\": m ? \"visible\" : \"hidden\",\n style: {\n height: `${n}px`,\n width: x.vertical ? `calc(100% - ${n}px)` : \"100%\"\n },\n children: /* @__PURE__ */ e(\n \"div\",\n {\n ref: c,\n className: Z(\"absolute rounded-full\", b),\n \"data-scroll-area-thumb\": \"\",\n style: { width: \"20%\", left: \"0%\", height: \"100%\" }\n }\n )\n }\n ),\n x.vertical && x.horizontal && /* @__PURE__ */ e(\n \"div\",\n {\n className: Z(\"bg-transparent\", \"absolute bottom-0 right-0\"),\n \"data-scroll-area-corner\": \"\",\n style: {\n height: `${n}px`,\n width: `${n}px`\n }\n }\n )\n ] });\n}\nfunction wn({\n options: r,\n value: o,\n placeholder: t = \"Select an option...\",\n searchable: s = !1,\n disabled: n = !1,\n clearable: a = !1,\n size: l = \"md\",\n className: d,\n triggerClassName: i,\n dropdownClassName: f,\n id: u,\n ref: c,\n onChange: m,\n onSearch: p,\n searchPlaceholder: x = \"Search options...\"\n}) {\n const y = J(), D = `${u ?? y}-listbox`, h = (S) => `${D}-option-${S}`, [g, v] = R(!1), [F, B] = R(\"\"), N = q(null), A = q(null), E = q(null), C = q(null), { show: z, shouldRender: T } = bn(g), M = ne(() => !s || !F ? r : r.filter(\n (S) => {\n var j;\n return S.text.toLowerCase().includes(F.toLowerCase()) || ((j = S.description) == null ? void 0 : j.toLowerCase().includes(F.toLowerCase()));\n }\n ), [r, s, F]), I = ne(() => r.find((S) => S.value === o), [r, o]), { highlightedIndex: G, setHighlightedIndex: W } = xn({\n isOpen: g,\n filteredOptions: M,\n selectedOption: I,\n shouldRender: T,\n optionsContainerRef: C\n }), Q = G >= 0 ? h(G) : void 0;\n V(() => {\n g && T && s && A.current && A.current.focus();\n }, [g, s, T]);\n const re = $(\n (S) => {\n var j;\n S.disabled || (m == null || m(S.value), v(!1), B(\"\"), (j = N.current) == null || j.focus());\n },\n [m]\n ), { handleKeyDown: L } = gn({\n isOpen: g,\n setIsOpen: v,\n filteredOptions: M,\n highlightedIndex: G,\n setHighlightedIndex: W,\n onSelect: re,\n triggerRef: N\n });\n V(() => {\n if (!g)\n return;\n const S = (j) => {\n var X;\n E.current && !E.current.contains(j.target) && !((X = N.current) != null && X.contains(j.target)) && (v(!1), B(\"\"));\n };\n return document.addEventListener(\"mousedown\", S), () => document.removeEventListener(\"mousedown\", S);\n }, [g]);\n const K = () => {\n n || (v(!g), g || (B(\"\"), W(-1)));\n }, ae = (S) => {\n S.disabled || (m == null || m(S.value), v(!1), B(\"\"));\n }, le = (S) => {\n const j = S.target.value;\n B(j), p == null || p(j), W(-1);\n }, ie = (S) => {\n S.preventDefault(), S.stopPropagation(), m == null || m(\"\");\n };\n return /* @__PURE__ */ w(\n \"div\",\n {\n className: k(\"relative\", d),\n id: u,\n ref: c,\n \"data-select\": \"true\",\n \"data-value\": o,\n \"data-searchable\": s,\n \"data-disabled\": n,\n \"data-clearable\": a,\n children: [\n /* @__PURE__ */ w(\"div\", { className: \"relative\", children: [\n /* @__PURE__ */ w(\n \"button\",\n {\n ref: N,\n type: \"button\",\n className: k(\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 n && \"opacity-50 cursor-not-allowed hover:border-border\",\n g && \"border-primary ring-1 ring-primary\",\n Pe[l].trigger,\n i\n ),\n onClick: K,\n onKeyDown: L,\n disabled: n,\n \"aria-disabled\": n,\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": g,\n \"aria-controls\": g ? D : void 0,\n \"aria-activedescendant\": g && !s ? Q : void 0,\n \"aria-label\": I ? I.text : t,\n \"data-select-trigger\": \"true\",\n children: [\n /* @__PURE__ */ e(\"span\", { className: k(\"block truncate\", !I && \"opacity-70\"), children: I ? I.text : t }),\n /* @__PURE__ */ e(\"div\", { className: \"flex items-center ml-2\", children: /* @__PURE__ */ e(Ne, { size: 16, className: k(\"transition-transform\", g && \"rotate-180\") }) })\n ]\n }\n ),\n a && I && /* @__PURE__ */ e(\n \"button\",\n {\n type: \"button\",\n onClick: ie,\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__ */ e(be, { size: 14, className: \"opacity-70 group-hover:opacity-100 transition-opacity\" })\n }\n )\n ] }),\n T && /* @__PURE__ */ w(\n \"div\",\n {\n ref: E,\n className: k(\n \"absolute z-50 w-full mt-1 bg-popover text-popover-foreground border border-border rounded-md shadow-lg transition-all\",\n z ? \"opacity-100 translate-y-0\" : \"opacity-0 -translate-y-2\",\n f\n ),\n id: D,\n role: \"listbox\",\n \"data-select-content\": \"true\",\n children: [\n s && /* @__PURE__ */ e(\"div\", { className: \"border-b border-border\", children: /* @__PURE__ */ e(\n \"input\",\n {\n ref: A,\n type: \"text\",\n value: F,\n onChange: le,\n onKeyDown: L,\n placeholder: x,\n className: \"w-full px-2 py-2 text-inherit focus:outline-none\",\n \"aria-autocomplete\": \"list\",\n \"aria-controls\": D,\n \"aria-activedescendant\": Q,\n \"data-select-search\": \"true\"\n }\n ) }),\n /* @__PURE__ */ e(vn, { ref: C, viewportClassName: \"max-h-60\", children: M.length > 0 ? M.map((S, j) => /* @__PURE__ */ w(\n \"div\",\n {\n id: h(j),\n className: k(\n \"flex items-center cursor-pointer transition-colors\",\n \"hover:bg-accent/10 focus:bg-accent/10\",\n Pe[l].options,\n S.disabled && \"opacity-50 cursor-not-allowed\",\n j === G && \"bg-accent/20\",\n o === S.value && \"bg-accent/30\"\n ),\n onClick: () => ae(S),\n role: \"option\",\n \"aria-selected\": o === S.value,\n \"aria-disabled\": S.disabled,\n \"data-select-option\": \"true\",\n \"data-value\": S.value,\n \"data-highlighted\": j === G,\n \"data-option-index\": j,\n children: [\n /* @__PURE__ */ w(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ e(\"div\", { className: \"font-medium\", children: S.text }),\n S.description && /* @__PURE__ */ e(\"div\", { className: \"text-xs opacity-70 mt-0.5\", children: S.description })\n ] }),\n o === S.value && /* @__PURE__ */ e(ze, { size: 16, className: \"ml-2 text-primary flex-shrink-0\" })\n ]\n },\n S.value\n )) : /* @__PURE__ */ e(\"div\", { className: \"px-3 py-2 text-sm opacity-70 text-center\", children: s && F ? \"No results found\" : \"No options available\" }) })\n ]\n }\n )\n ]\n }\n );\n}\nfunction kn({ itemId: r, checked: o, onChange: t, name: s, disabled: n = !1, className: a = \"\" }) {\n const l = \"relative inline-flex items-center justify-center rounded-full\", d = () => {\n n || t();\n }, i = k(\n l,\n !o && \"hover:border-current/60\",\n !n && \"border-current cursor-pointer\",\n n && \"border-muted/60 cursor-not-allowed\",\n a\n );\n return /* @__PURE__ */ e(\n \"div\",\n {\n id: r,\n role: \"radio\",\n tabIndex: -1,\n \"aria-checked\": o,\n \"aria-disabled\": n,\n \"aria-description\": `Radio button for ${s}`,\n \"aria-labelledby\": `${r}-label`,\n onClick: d,\n className: i,\n style: {\n width: \"1em\",\n height: \"1em\",\n padding: \"0.1em\",\n borderWidth: \"0.06em\"\n },\n children: o && /* @__PURE__ */ e(\n \"div\",\n {\n className: k(\"size-full aspect-square rounded-full\", n && \"bg-muted/60\", !n && \"bg-current\")\n }\n )\n }\n );\n}\nfunction Ie({\n value: r,\n children: o,\n className: t = \"\",\n isSelected: s = !1,\n onChange: n,\n disabled: a = !1,\n hideInput: l = !1,\n description: d,\n name: i\n}) {\n const u = `radio-${J()}-${r}`, c = () => {\n a || n == null || n(r);\n };\n return /* @__PURE__ */ w(\n \"div\",\n {\n title: d,\n className: k(\n \"relative flex items-center\",\n t,\n // Uses text color for borders\n l && `p-2 border-2 focus-within:border-dashed focus-within:${a ? \"border-current/50\" : \"border-current/80\"}`,\n l && !s && `border-transparent ${a ? \"\" : \"not-focus-within:hover:border-border/60\"}`,\n l && s && \"border-border\",\n a && \"opacity-60 cursor-not-allowed\"\n ),\n style: {\n gap: \"0.5em\"\n },\n children: [\n !l && /* @__PURE__ */ e(\n kn,\n {\n itemId: u,\n name: i || \"\",\n checked: s,\n onChange: c,\n disabled: a,\n className: k(l && \"\")\n }\n ),\n /* @__PURE__ */ e(\n \"div\",\n {\n id: l ? u : void 0,\n tabIndex: l ? -1 : void 0,\n role: l ? \"radio\" : void 0,\n onClick: l ? c : void 0,\n \"aria-checked\": l ? s ? \"true\" : \"false\" : void 0,\n \"aria-disabled\": l ? a : void 0,\n \"aria-description\": l ? d || `Radio button for ${i}` : void 0,\n \"aria-labelledby\": l ? `${u}-label` : void 0,\n className: k(l && \"size-full\", typeof o == \"object\" && \"grow focus:outline-none\"),\n children: /* @__PURE__ */ e(\n \"label\",\n {\n id: `${u}-label`,\n onClick: l ? void 0 : c,\n className: k(a && \"cursor-not-allowed\", !a && \"cursor-pointer\"),\n children: o\n }\n )\n }\n )\n ]\n }\n );\n}\nfunction Nn(r, o) {\n const [t, s] = R(o), [n, a] = R(-1), [l, d] = R(!1), i = $((p, x) => {\n var D;\n const y = p[x];\n y.hasAttribute(\"disabled\") || y.getAttribute(\"aria-disabled\") === \"true\" || ((D = p[x]) == null || D.click(), a(x));\n }, []), f = $(\n (p, x) => {\n var b;\n if (p.preventDefault(), l || !x.length) return;\n const y = o !== -1 ? o : 0;\n (b = x[y]) == null || b.focus(), s(y), o !== -1 && i(x, y);\n },\n [o, l, i]\n ), u = $(\n (p) => {\n var D;\n if (!p.shiftKey)\n return;\n p.preventDefault();\n const x = Array.from(\n document.querySelectorAll(\n 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])'\n )\n ).filter((h) => !h.hasAttribute(\"disabled\") && h.tabIndex >= 0), y = x.findIndex((h) => h.id === r), b = y > 0 ? y - 1 : x.length - 1;\n (D = x[b]) == null || D.focus();\n },\n [r]\n ), c = $(\n (p, x) => {\n var g;\n if (!x.length) return;\n const y = p.target;\n if (!x.some((v) => v.id === y.id)) return;\n const D = t !== -1 ? t : 0;\n let h = D;\n switch (p.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n p.preventDefault(), h = D > 0 ? D - 1 : x.length - 1;\n break;\n case \"ArrowDown\":\n case \"ArrowRight\":\n p.preventDefault(), h = (D + 1) % x.length;\n break;\n // Select the option when the space key is pressed\n case \" \":\n p.preventDefault(), i(x, D);\n return;\n case \"Tab\":\n u(p);\n return;\n default:\n return;\n }\n (g = x[h]) == null || g.focus(), s(h), n !== -1 && i(x, h);\n },\n [t, n, u, i]\n ), m = $(() => {\n const p = document.querySelector(`[id=\"${r}\"][role=\"radiogroup\"]`);\n return p ? Array.from(p.querySelectorAll('[role=\"radio\"]')) : [];\n }, [r]);\n V(() => {\n const p = document.querySelector(`[id=\"${r}\"][role=\"radiogroup\"]`);\n if (!p) return;\n const x = m(), y = (g) => f(g, x), b = (g) => c(g, x), D = () => d(!0), h = () => d(!1);\n return document.addEventListener(\"keydown\", b), p.addEventListener(\"focus\", y), p.addEventListener(\"mousedown\", D), document.addEventListener(\"mouseup\", h), () => {\n document.removeEventListener(\"keydown\", b), p.removeEventListener(\"focus\", y), p.removeEventListener(\"mousedown\", D), document.removeEventListener(\"mouseup\", h);\n };\n }, [r, m, f, c]);\n}\nfunction Dn({\n options: r = [],\n value: o,\n onChange: t,\n id: s,\n children: n,\n className: a = \"\",\n childrenClassName: l = \"\",\n hideInputs: d = !1\n}) {\n const i = J(), f = s || `radio-group-${i}`;\n Nn(\n f,\n r.findIndex((c) => c === o)\n );\n const u = ne(() => r.reduce((c, m) => (typeof m == \"string\" ? c.some((p) => p.value === m) || c.push({ label: m, value: m }) : c.push(m), c), []), [r]);\n return /* @__PURE__ */ w(\"div\", { id: f, role: \"radiogroup\", tabIndex: 0, className: k(a, \"focus:outline-none\"), children: [\n u.length > 0 && u.map((c, m) => /* @__PURE__ */ e(\n Ie,\n {\n value: c.value,\n isSelected: o === c.value,\n onChange: t,\n name: f,\n disabled: c.disabled,\n description: c.description,\n hideInput: d,\n className: l,\n children: c.label\n },\n `${c.value}-${m}`\n )),\n u.length === 0 && n && Y.Children.map(n, (c) => Y.isValidElement(c) && c.type === Ie ? /* @__PURE__ */ e(\n Ie,\n {\n ...c.props,\n className: k(l, c.props.className),\n hideInput: c.props.hideInput || d,\n isSelected: o === c.props.value,\n onChange: t,\n name: f,\n children: c.props.children\n }\n ) : null)\n ] });\n}\nfunction ya({\n form: r,\n initialData: o = {},\n onDataChange: t,\n onSubmit: s,\n submitButton: n,\n columns: a = Ae.columns,\n responsive: l = Ae.responsive,\n spacing: d = Ae.spacing,\n className: i,\n id: f,\n ref: u\n}) {\n const [c, m] = R(o), { errors: p, validateForm: x, validateSingleField: y, isFormValid: b } = sn(r, c), D = $(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (N, A) => {\n const E = { ...c, [N]: A };\n m(E), t == null || t(E), y(N, A);\n },\n [c, t, y]\n ), h = $(\n (N) => {\n N.preventDefault(), x(c) && s && s(c);\n },\n [c, x, s]\n ), g = (N) => {\n const A = [], E = {};\n return N.colSpan && a > 1 && A.push(Se.colSpan[N.colSpan]), {\n className: k(A.join(\" \"), N.className),\n style: E\n };\n }, v = (N) => {\n const A = c[N.name], E = p[N.name], C = f ? `${f}-${N.name}` : N.name, { className: z, style: T } = g(N);\n return /* @__PURE__ */ e(\"div\", { className: z, style: T, children: (() => {\n switch (N.__type) {\n case \"input\": {\n const I = N;\n return /* @__PURE__ */ w(te, { children: [\n /* @__PURE__ */ e(pe, { htmlFor: C, required: N.required, description: N.description, children: N.label }),\n /* @__PURE__ */ e(\n dn,\n {\n id: C,\n type: I.type || \"text\",\n placeholder: I.placeholder,\n value: A || \"\",\n onChange: (G) => D(N.name, G.target.value),\n disabled: N.disabled,\n variant: I.variant,\n rounded: I.rounded,\n errorMessage: E,\n \"data-field-name\": N.name,\n \"data-field-type\": N.__type\n }\n )\n ] });\n }\n case \"textarea\": {\n const I = N;\n return /* @__PURE__ */ w(te, { children: [\n /* @__PURE__ */ e(pe, { htmlFor: C, required: N.required, description: N.description, children: N.label }),\n /* @__PURE__ */ e(\n hn,\n {\n id: C,\n placeholder: I.placeholder,\n value: A || \"\",\n onChange: (G) => D(N.name, G.target.value),\n disabled: N.disabled,\n variant: I.variant,\n rounded: I.rounded,\n rows: I.rows,\n autoExpand: I.autoExpand,\n characterLimit: I.characterLimit,\n errorMessage: E,\n \"data-field-name\": N.name,\n \"data-field-type\": N.__type\n }\n )\n ] });\n }\n case \"select\": {\n const I = N, G = I.options.map((W) => ({\n text: W.label,\n value: W.value,\n disabled: W.disabled\n }));\n return /* @__PURE__ */ w(te, { children: [\n /* @__PURE__ */ e(pe, { htmlFor: C, required: N.required, description: N.description, children: N.label }),\n /* @__PURE__ */ e(\n wn,\n {\n id: C,\n options: G,\n value: A || \"\",\n onChange: (W) => D(N.name, W),\n placeholder: I.placeholder,\n disabled: N.disabled,\n searchable: I.searchable,\n clearable: I.clearable,\n \"data-field-name\": N.name,\n \"data-field-type\": N.__type\n }\n ),\n E && /* @__PURE__ */ e(\"p\", { className: \"text-sm text-destructive mt-1\", role: \"alert\", children: E })\n ] });\n }\n case \"checkbox\": {\n const I = N, G = 16;\n return /* @__PURE__ */ w(\"div\", { className: \"space-x-2\", children: [\n /* @__PURE__ */ e(\n $e,\n {\n id: C,\n checked: A || !1,\n onCheckedChange: (W) => D(N.name, W),\n disabled: N.disabled,\n \"data-field-name\": N.name,\n \"data-field-type\": N.__type,\n size: G\n }\n ),\n /* @__PURE__ */ w(\"div\", { className: \"inline-block\", style: { maxWidth: `calc(100% - ${G + 10}px)` }, children: [\n \" \",\n /* @__PURE__ */ e(pe, { htmlFor: C, className: \"cursor-pointer\", children: I.text || N.label }),\n N.description && /* @__PURE__ */ e(\"p\", { className: \"text-sm opacity-80 mt-1\", children: N.description }),\n E && /* @__PURE__ */ e(\"p\", { className: \"text-sm text-destructive mt-1\", role: \"alert\", children: E })\n ] })\n ] });\n }\n case \"radio\": {\n const G = N.options.map((W) => ({\n label: W.label,\n value: W.value,\n disabled: W.disabled\n }));\n return /* @__PURE__ */ w(te, { children: [\n /* @__PURE__ */ e(pe, { required: N.required, children: N.label }),\n N.description && /* @__PURE__ */ e(\"p\", { className: \"text-sm opacity-80 mb-2\", children: N.description }),\n /* @__PURE__ */ e(\n Dn,\n {\n options: G,\n value: A || \"\",\n onChange: (W) => D(N.name, W),\n id: C,\n \"data-field-name\": N.name,\n \"data-field-type\": N.__type\n }\n ),\n E && /* @__PURE__ */ e(\"p\", { className: \"text-sm text-destructive mt-1\", role: \"alert\", children: E })\n ] });\n }\n default:\n return null;\n }\n })() }, N.name);\n }, F = k(\n \"grid\",\n a && a > 1 ? Se.columns[a] : \"grid-cols-1\",\n Se.spacing[d],\n i\n ), B = () => n ? at(n) ? ot(n, {\n disabled: !b,\n \"aria-disabled\": !b,\n ...n.props ?? {}\n }) : /* @__PURE__ */ e(\"div\", { className: \"col-span-full\", children: n }) : null;\n return /* @__PURE__ */ w(\n \"form\",\n {\n ref: u,\n id: f,\n onSubmit: h,\n className: F,\n \"data-form-fields\": r.length,\n \"data-form-columns\": a,\n \"data-form-responsive\": l,\n \"data-form-valid\": b,\n children: [\n r.map(v),\n B()\n ]\n }\n );\n}\nfunction Cn({\n id: r,\n children: o,\n message: t,\n placement: s = \"top\",\n disabled: n = !1,\n delay: a = 100,\n showArrow: l = !0,\n className: d\n}) {\n const [i, f] = R(!1), [u, c] = R(!1), [m, p] = R(!1), [x, y] = R(!1), b = q(null), D = J(), h = r ?? D, g = $(() => {\n n || (b.current && clearTimeout(b.current), b.current = window.setTimeout(() => {\n f(!0);\n }, a));\n }, [n, a]), v = $((A = !1) => {\n if (b.current && clearTimeout(b.current), A) {\n f(!1);\n return;\n }\n b.current = window.setTimeout(() => {\n f(!1);\n }, 100);\n }, []);\n V(() => {\n !u && !m && !x && i && v();\n }, [u, m, x, i, v]), V(() => {\n if (!i) return;\n const A = () => {\n v(!0);\n };\n return window.addEventListener(\"scroll\", A, !0), () => {\n window.removeEventListener(\"scroll\", A, !0);\n };\n }, [i, v]), V(() => () => {\n b.current && clearTimeout(b.current);\n }, []);\n const F = () => {\n const A = \"absolute z-50 px-2 py-1 text-sm rounded shadow-lg bg-tooltip text-tooltip-foreground pointer-events-auto transition-all ease-out w-max max-w-xs\", E = i ? \"opacity-100 scale-100\" : \"opacity-0 scale-95 pointer-events-none\", C = {\n top: \"bottom-full left-1/2 -translate-x-1/2 mb-2\",\n bottom: \"top-full left-1/2 -translate-x-1/2 mt-2\",\n left: \"right-full top-1/2 -translate-y-1/2 mr-2\",\n right: \"left-full top-1/2 -translate-y-1/2 ml-2\"\n }, z = {\n top: \"origin-bottom\",\n bottom: \"origin-top\",\n left: \"origin-right\",\n right: \"origin-left\"\n };\n return k(A, C[s], z[s], E, d);\n }, B = () => l ? k(\"absolute w-0 h-0 pointer-events-none\", {\n top: \"top-full left-1/2 -translate-x-1/2 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-tooltip\",\n bottom: \"bottom-full left-1/2 -translate-x-1/2 border-l-[6px] border-r-[6px] border-b-[6px] border-l-transparent border-r-transparent border-b-tooltip\",\n left: \"left-full top-1/2 -translate-y-1/2 border-t-[6px] border-b-[6px] border-l-[6px] border-t-transparent border-b-transparent border-l-tooltip\",\n right: \"right-full top-1/2 -translate-y-1/2 border-t-[6px] border-b-[6px] border-r-[6px] border-t-transparent border-b-transparent border-r-tooltip\"\n }[s]) : \"\", N = o.props;\n return /* @__PURE__ */ e(te, { children: Y.cloneElement(o, {\n style: {\n ...N.style,\n position: \"relative\"\n },\n onMouseEnter: () => {\n c(!0), g();\n },\n onMouseLeave: () => {\n c(!1);\n },\n onFocus: () => {\n y(!0), g();\n },\n onBlur: () => {\n y(!1), v(!0);\n },\n onKeyDown: (A) => {\n A.key === \"Escape\" && v(!0);\n },\n \"aria-describedby\": n ? void 0 : h,\n children: /* @__PURE__ */ w(te, { children: [\n N.children,\n !n && /* @__PURE__ */ w(\n \"div\",\n {\n id: h,\n role: \"tooltip\",\n className: F(),\n \"aria-hidden\": !i,\n \"aria-live\": i ? \"polite\" : void 0,\n onMouseEnter: () => {\n p(!0), b.current && clearTimeout(b.current);\n },\n onMouseLeave: () => {\n p(!1);\n },\n children: [\n t,\n l && /* @__PURE__ */ e(\"div\", { className: B(), \"aria-hidden\": !0 })\n ]\n }\n )\n ] })\n }) });\n}\nfunction va({ id: r, ref: o, design: t = \"filled\", iconSize: s = 14, className: n, ...a }) {\n const l = t === \"filled\" ? xt : Be;\n return /* @__PURE__ */ e(Cn, { ...a, children: /* @__PURE__ */ e(\n \"div\",\n {\n id: r,\n ref: o,\n className: k(\n \"inline-block cursor-help text-muted-foreground transition-colors align-top\",\n n\n ),\n \"data-help-icon\": \"true\",\n \"data-design\": t,\n \"data-size\": s,\n children: /* @__PURE__ */ e(l, { size: s, className: \"fill-current\" })\n }\n ) });\n}\nfunction En(r) {\n const [o, t] = R(!1), [s, n] = R(!1);\n return V(() => {\n r ? (n(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => n(!1), 150));\n }, [r]), { show: o, shouldRender: s };\n}\nfunction Fn(r, o) {\n V(() => {\n const t = (s) => {\n s.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 Sn(r, o) {\n const t = q(null), s = $(() => {\n const n = document.getElementById(r);\n if (!n) return;\n const a = n.querySelectorAll('[data-modal-action=\"true\"]');\n if (a.length > 0) {\n a[0].focus();\n return;\n }\n const l = n.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (l.length > 0) {\n const d = Array.from(l).filter((i) => !(i instanceof HTMLButtonElement && i.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (d.length > 0) {\n d[0].focus();\n return;\n }\n l[0].focus();\n return;\n }\n n.focus();\n }, [r]);\n V(() => (o && (t.current = document.activeElement, s()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [o, s]);\n}\nfunction wa({\n id: r,\n isOpen: o,\n onClose: t,\n title: s,\n children: n,\n contentOnly: a = !1,\n className: l,\n overlayClassName: d,\n containerClassName: i,\n hideCloseButton: f = !1,\n actions: u = [],\n disableCloseOnOverlayClick: c = !1,\n ariaLabelledBy: m,\n ariaDescribedBy: p\n}) {\n const x = J(), y = r || `modal-${x}`, b = r ? `${r}-title` : `modal-title-${x}`, { show: D, shouldRender: h } = En(o);\n if (Sn(y, h), Fn(h, t), !h) return null;\n const g = () => s ? Y.isValidElement(s) ? /* @__PURE__ */ e(\"div\", { className: \"mb-4\", children: s }) : /* @__PURE__ */ e(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: b, children: s }) : null, v = () => u.length === 0 ? null : /* @__PURE__ */ e(\"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((F, B) => {\n const { label: N, ...A } = F;\n return /* @__PURE__ */ e(Qt, { ...A, \"data-modal-action\": \"true\", children: N }, B);\n }) });\n return /* @__PURE__ */ e(te, { children: De(\n /* @__PURE__ */ e(\n \"div\",\n {\n \"aria-labelledby\": m ?? s ? b : void 0,\n \"aria-describedby\": p,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ w(\"div\", { className: Z(\"flex min-h-screen items-center justify-center p-4\", i), children: [\n /* @__PURE__ */ e(\n \"div\",\n {\n className: Z(\"fixed inset-0 bg-black/20 transition-all\", d),\n onClick: () => {\n c || t();\n }\n }\n ),\n a && /* @__PURE__ */ e(\"div\", { className: Z(\"relative w-fit\", l), children: n }),\n !a && /* @__PURE__ */ w(\n \"div\",\n {\n id: y,\n tabIndex: -1,\n className: Z(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover text-popover-foreground transition-all p-6 focus:ring ease-in\",\n D ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n l\n ),\n children: [\n !f && /* @__PURE__ */ e(\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__ */ e(be, { size: 18 })\n }\n ),\n g(),\n n,\n v()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nconst An = {\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}, In = {\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 ka({\n page: r,\n pageCount: o = 5,\n maxVisiblePages: t = 5,\n showFirstLast: s = !0,\n onPageChange: n,\n size: a = \"md\",\n variant: l = \"link\",\n className: d,\n ref: i,\n buttonsClassName: f,\n ...u\n}) {\n const c = o === 1 / 0, p = $(() => {\n if (c) return [];\n const v = o, F = Math.min(t, v);\n if (v <= F)\n return Array.from({ length: v }, (E, C) => C + 1);\n const B = Math.floor(F / 2);\n let N = Math.max(1, r - B), A = Math.min(v, N + F - 1);\n return A - N + 1 < F && (N = Math.max(1, A - F + 1), A = Math.min(v, N + F - 1)), Array.from({ length: A - N + 1 }, (E, C) => N + C);\n }, [c, t, r, o])(), x = r > 1, y = c || r < o, b = s && !c, D = s && !c, h = (v) => {\n v >= 1 && (c || v <= o) && n(v);\n }, g = $(() => {\n const v = Z(\n \"flex items-center justify-center min-w-fit\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n In[a],\n \"rounded-md\"\n );\n return Z(v, An[l], f);\n }, [l, a, f]);\n return /* @__PURE__ */ w(\n \"nav\",\n {\n ref: i,\n className: Z(\"flex items-center justify-center gap-1\", d),\n role: \"navigation\",\n \"aria-label\": \"Pagination\",\n \"data-page\": r,\n \"data-page-count\": c ? \"infinite\" : o,\n ...u,\n children: [\n b && /* @__PURE__ */ w(\n \"button\",\n {\n onClick: () => h(1),\n className: g(),\n disabled: r === 1,\n \"aria-label\": \"Go to first page\",\n children: [\n /* @__PURE__ */ e(yt, { size: a === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ e(\"span\", { className: \"ml-1\", children: \"First\" })\n ]\n }\n ),\n /* @__PURE__ */ w(\n \"button\",\n {\n onClick: () => h(r - 1),\n className: g(),\n disabled: !x,\n \"aria-label\": \"Go to previous page\",\n children: [\n /* @__PURE__ */ e(ye, { size: a === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ e(\"span\", { className: \"ml-1\", children: \"Previous\" })\n ]\n }\n ),\n !c && p.map((v) => /* @__PURE__ */ e(\n \"button\",\n {\n onClick: () => h(v),\n className: Z(g(), \"aspect-square\"),\n \"aria-label\": `Go to page ${v}`,\n \"aria-current\": v === r ? !0 : void 0,\n children: v\n },\n v\n )),\n /* @__PURE__ */ w(\n \"button\",\n {\n onClick: () => h(r + 1),\n className: g(),\n disabled: !y,\n \"aria-label\": \"Go to next page\",\n children: [\n /* @__PURE__ */ e(\"span\", { className: \"mr-1\", children: \"Next\" }),\n /* @__PURE__ */ e(he, { size: a === \"sm\" ? 12 : 15 })\n ]\n }\n ),\n D && /* @__PURE__ */ w(\n \"button\",\n {\n onClick: () => h(o),\n className: g(),\n disabled: r === o,\n \"aria-label\": \"Go to last page\",\n children: [\n /* @__PURE__ */ e(\"span\", { className: \"mr-1\", children: \"Last\" }),\n /* @__PURE__ */ e(vt, { size: a === \"sm\" ? 12 : 15 })\n ]\n }\n )\n ]\n }\n );\n}\nfunction $n(r) {\n const [o, t] = R(!1), [s, n] = R(!1);\n return V(() => {\n r ? (n(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => n(!1), 300));\n }, [r]), { show: o, shouldRender: s };\n}\nfunction zn(r, o) {\n V(() => {\n const t = (s) => {\n s.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 Mn(r, o) {\n const t = q(null), s = $(() => {\n const n = document.getElementById(r);\n if (!n) return;\n const a = n.querySelectorAll('[data-panel-action=\"true\"]');\n if (a.length > 0) {\n a[0].focus();\n return;\n }\n const l = n.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (l.length > 0) {\n const d = Array.from(l).filter((i) => !(i instanceof HTMLButtonElement && i.getAttribute(\"data-panel-close-button\") === \"true\"));\n if (d.length > 0) {\n d[0].focus();\n return;\n }\n l[0].focus();\n return;\n }\n n.focus();\n }, [r]);\n V(() => (o && (t.current = document.activeElement, s()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [o, s]);\n}\nfunction Na({\n ref: r,\n id: o,\n isOpen: t,\n onClose: s,\n title: n,\n children: a,\n footer: l,\n className: d,\n overlayClassName: i,\n hideCloseButton: f = !1,\n disableCloseOnOverlayClick: u = !1,\n ariaLabelledBy: c,\n ariaDescribedBy: m\n}) {\n const p = J(), x = o || `panel-${p}`, y = o ? `${o}-title` : `panel-title-${p}`, { show: b, shouldRender: D } = $n(t);\n if (Mn(x, D), zn(D, s), !D) return null;\n const h = () => n ? Y.isValidElement(n) ? /* @__PURE__ */ e(\"div\", { children: n }) : /* @__PURE__ */ e(\"h2\", { className: \"text-2xl font-semibold\", id: y, children: n }) : null, g = () => {\n if (!l) return null;\n if (Y.isValidElement(l)) {\n const v = l, F = v.props.className || \"\";\n return Y.cloneElement(v, { className: Z(\"px-6 py-4\", F) });\n }\n return /* @__PURE__ */ e(\"div\", { className: \"px-6 py-4\", children: l });\n };\n return /* @__PURE__ */ e(te, { children: De(\n /* @__PURE__ */ w(\n \"div\",\n {\n \"aria-labelledby\": c ?? n ? y : void 0,\n \"aria-describedby\": m,\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__ */ e(\n \"div\",\n {\n className: Z(\n \"fixed inset-0 bg-black/40 transition-opacity\",\n b ? \"opacity-100\" : \"opacity-0\",\n i\n ),\n onClick: () => {\n u || s();\n }\n }\n ),\n /* @__PURE__ */ e(\"div\", { className: \"fixed inset-y-0 right-0 flex max-w-full\", children: /* @__PURE__ */ e(\n \"div\",\n {\n id: x,\n ref: r,\n tabIndex: -1,\n className: Z(\n \"relative h-full max-w-md transform shadow-xl bg-popover text-popover-foreground transition-transform ease-in-out border-l border-border\",\n b ? \"translate-x-0\" : \"translate-x-full\",\n d\n ),\n children: /* @__PURE__ */ w(\"div\", { className: \"flex h-full flex-col\", children: [\n n && /* @__PURE__ */ e(\"div\", { className: \"px-6 pt-6\", children: h() }),\n !f && /* @__PURE__ */ e(\n \"button\",\n {\n type: \"button\",\n onClick: s,\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__ */ e(be, { size: 18 })\n }\n ),\n /* @__PURE__ */ e(\"div\", { className: Z(\"flex-1 overflow-y-auto px-6 pb-6\", n ? \"pt-6\" : \"pt-10\"), children: a }),\n g()\n ] })\n }\n ) })\n ]\n }\n ),\n document.body\n ) });\n}\nconst Tn = {\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}, Bn = {\n horizontal: \"w-full\",\n vertical: \"min-h-4 h-full\"\n};\nfunction Da({\n orientation: r = \"horizontal\",\n decorative: o = !1,\n thickness: t = \"thin\",\n className: s,\n ...n\n}) {\n const a = k(\n \"shrink-0 bg-border\",\n Bn[r],\n Tn[t][r],\n s\n );\n return /* @__PURE__ */ e(\n \"div\",\n {\n ...n,\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 qe = {\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 Ca({\n shape: r = \"rectangle\",\n lineSpacing: o = \"sm\",\n className: t,\n lines: s = 1,\n animate: n = !0,\n ref: a,\n ...l\n}) {\n const d = k(\"bg-muted/70\", n && \"animate-pulse\", qe.shape[r], t);\n return s > 1 ? /* @__PURE__ */ e(\n \"div\",\n {\n ref: a,\n className: qe.lineSpacing[o],\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-container\",\n \"data-lines\": s,\n \"data-shape\": r,\n \"data-animate\": n,\n ...l,\n children: Array.from({ length: s }, (i, f) => /* @__PURE__ */ e(\n \"div\",\n {\n className: k(\n d,\n // Make last line shorter for a more natural text appearance\n f === s - 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__ */ e(\n \"div\",\n {\n ref: a,\n className: d,\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton\",\n \"data-shape\": r,\n \"data-animate\": n,\n ...l\n }\n );\n}\nfunction Ea({\n id: r,\n value: o,\n defaultValue: t = 0,\n onValueChange: s,\n min: n = 0,\n max: a = 100,\n step: l = 1,\n disabled: d = !1,\n trackClassName: i,\n rangeClassName: f,\n thumbClassName: u,\n className: c,\n ref: m,\n ariaLabel: p,\n ariaLabelledBy: x,\n ...y\n}) {\n const [b, D] = R(t), h = o !== void 0, g = h ? o : b, v = q(null), F = q(!1), B = q(0), N = $(\n (M) => {\n const I = Math.max(n, Math.min(a, M)), G = Math.round(I / l) * l;\n h || D(G), s == null || s(G);\n },\n [n, a, l, h, s]\n ), A = $(\n (M, I = !1) => {\n var re;\n const G = (re = v.current) == null ? void 0 : re.getBoundingClientRect();\n if (!G) return g;\n let W = M.clientX;\n I && (W = W - B.current);\n const Q = Math.max(0, Math.min(1, (W - G.left) / G.width));\n return n + (a - n) * Q;\n },\n [n, a, g]\n ), E = $(\n (M) => {\n if (d || M.target !== M.currentTarget) return;\n const I = A(M);\n N(I);\n },\n [d, A, N]\n ), C = $(\n (M) => {\n var re;\n if (d) return;\n M.stopPropagation(), F.current = !0;\n const I = (re = v.current) == null ? void 0 : re.getBoundingClientRect(), G = M.currentTarget.getBoundingClientRect();\n if (I && G) {\n const L = G.left + G.width / 2;\n B.current = M.clientX - L;\n }\n M.currentTarget.setPointerCapture(M.pointerId);\n const W = (L) => {\n if (!F.current) return;\n const K = A(L, !0);\n N(K);\n }, Q = (L) => {\n if (L.pointerId === M.pointerId) {\n F.current = !1, B.current = 0;\n try {\n M.currentTarget.releasePointerCapture(L.pointerId);\n } catch {\n }\n document.removeEventListener(\"pointermove\", W), document.removeEventListener(\"pointerup\", Q);\n }\n };\n document.addEventListener(\"pointermove\", W), document.addEventListener(\"pointerup\", Q);\n },\n [d, A, N]\n ), z = $(\n (M) => {\n if (d) return;\n let I = g;\n switch (M.key) {\n case \"ArrowRight\":\n case \"ArrowUp\":\n I = g + l;\n break;\n case \"ArrowLeft\":\n case \"ArrowDown\":\n I = g - l;\n break;\n case \"Home\":\n I = n;\n break;\n case \"End\":\n I = a;\n break;\n case \"PageUp\":\n I = g + l * 10;\n break;\n case \"PageDown\":\n I = g - l * 10;\n break;\n default:\n return;\n }\n M.preventDefault(), N(I);\n },\n [d, g, l, n, a, N]\n ), T = a === n ? 0 : (g - n) / (a - n) * 100;\n return /* @__PURE__ */ e(\n \"div\",\n {\n id: r,\n ref: m,\n className: Z(\n \"relative flex items-center w-full touch-none select-none\",\n d && \"opacity-50 cursor-not-allowed\",\n c\n ),\n \"data-disabled\": d,\n \"data-value\": g,\n \"data-min\": n,\n \"data-max\": a,\n \"data-step\": l,\n ...y,\n children: /* @__PURE__ */ w(\n \"div\",\n {\n ref: v,\n className: Z(\n \"relative h-1.5 w-full rounded-full bg-muted-foreground cursor-pointer\",\n d && \"cursor-not-allowed\",\n i\n ),\n onPointerDown: E,\n children: [\n /* @__PURE__ */ e(\n \"div\",\n {\n className: Z(\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 !F.current && \"transition-all\",\n f\n ),\n style: { width: `${T}%` }\n }\n ),\n /* @__PURE__ */ e(\n \"div\",\n {\n className: Z(\n \"absolute size-5 -top-2 rounded-full shadow-md cursor-grab\",\n d && \"cursor-not-allowed\",\n !d && \"cursor-grab focus:outline-none focus:ring-2\",\n F.current ? \"cursor-grabbing scale-110\" : \"transition-all\",\n u\n ),\n style: { left: `calc(${T}% - 10px)` },\n tabIndex: d ? -1 : 0,\n role: \"slider\",\n \"aria-valuemin\": n,\n \"aria-valuemax\": a,\n \"aria-valuenow\": g,\n \"aria-label\": p,\n \"aria-labelledby\": x,\n \"aria-disabled\": d,\n onKeyDown: z,\n onPointerDown: C\n }\n )\n ]\n }\n )\n }\n );\n}\nfunction Rn({\n data: r,\n initialSort: o = { key: null, direction: null }\n}) {\n const [t, s] = R(o), [n, a] = R();\n return { sortedData: ne(() => !t.key || !t.direction ? r : [...r].sort((i, f) => {\n if (n) {\n const p = n(i, f);\n return t.direction === \"desc\" ? -p : p;\n }\n const u = i[t.key], c = f[t.key];\n if (u === c) return 0;\n let m = 0;\n return typeof u == \"string\" && typeof c == \"string\" ? m = u.localeCompare(c) : typeof u == \"number\" && typeof c == \"number\" ? m = u - c : u instanceof Date && c instanceof Date ? m = u.getTime() - c.getTime() : m = String(u).localeCompare(String(c)), t.direction === \"desc\" ? -m : m;\n }), [r, t, n]), sortConfig: t, handleSort: (i, f) => {\n a(() => f), s((u) => {\n if (u.key === i) {\n const c = u.direction === \"asc\" ? \"desc\" : u.direction === \"desc\" ? null : \"asc\";\n return { key: c ? i : null, direction: c };\n } else\n return { key: i, direction: \"asc\" };\n });\n } };\n}\nfunction Ln({ initialSelected: r = [] } = {}) {\n const [o, t] = R(new Set(r));\n return {\n selectedRows: o,\n isRowSelected: (u) => o.has(u),\n selectRow: (u) => {\n t((c) => /* @__PURE__ */ new Set([...c, u]));\n },\n deselectRow: (u) => {\n t((c) => {\n const m = new Set(c);\n return m.delete(u), m;\n });\n },\n selectAll: (u) => {\n t(new Set(u));\n },\n deselectAll: () => {\n t(/* @__PURE__ */ new Set());\n },\n isAllSelected: (u) => u.length > 0 && u.every((c) => o.has(c)),\n isPartiallySelected: (u) => {\n const c = u.filter((m) => o.has(m)).length;\n return c > 0 && c < u.length;\n }\n };\n}\nconst Vn = {\n sm: {\n container: \"text-sm\",\n table: \"w-full border-collapse\",\n header: \"border-b border-border\",\n headerCell: \"px-3 py-2.5 font-medium\",\n sortButton: \"inline-flex items-center gap-1 hover:text-accent transition-colors\",\n cell: \"px-3 py-2 text-sm\",\n selectedRow: \"bg-accent/10 hover:bg-accent/20\",\n checkbox: \"pl-5 pr-2 text-left w-3\",\n checkboxSize: 12\n },\n md: {\n container: \"text-base\",\n table: \"w-full border-collapse\",\n header: \"border-b-2 border-border\",\n headerCell: \"px-4 py-3 font-semibold\",\n sortButton: \"inline-flex items-center gap-2 hover:text-accent transition-colors\",\n cell: \"px-4 py-3\",\n selectedRow: \"bg-accent/10 hover:bg-accent/20\",\n checkbox: \"pl-6 pr-3 py-3 text-left w-6\",\n checkboxSize: 16\n },\n lg: {\n container: \"text-lg\",\n table: \"w-full border-collapse\",\n header: \"border-b-2 border-border\",\n headerCell: \"px-6 py-4 font-bold\",\n sortButton: \"inline-flex items-center gap-2 hover:text-accent transition-colors\",\n cell: \"px-6 py-4\",\n selectedRow: \"bg-accent/10 hover:bg-accent/20\",\n checkbox: \"pl-6 pr-3 py-4 text-left w-8\",\n checkboxSize: 18\n }\n};\nfunction Fa({\n id: r,\n className: o,\n ref: t,\n size: s = \"md\",\n data: n,\n columns: a,\n selectable: l = !1,\n getRowId: d = (h, g) => g,\n initialSelected: i = [],\n onSelectionChange: f,\n showHeader: u = !0,\n striped: c = !1,\n hoverable: m = !0,\n emptyState: p,\n loading: x = !1,\n loadingContent: y,\n caption: b,\n ...D\n}) {\n const h = Vn[s], { sortedData: g, sortConfig: v, handleSort: F } = Rn({\n data: n,\n initialSort: { key: null, direction: null }\n }), {\n selectedRows: B,\n isRowSelected: N,\n selectRow: A,\n deselectRow: E,\n selectAll: C,\n deselectAll: z,\n isAllSelected: T,\n isPartiallySelected: M\n } = Ln({ initialSelected: i }), I = n.map((L, K) => d(L, K));\n Y.useEffect(() => {\n f && f(Array.from(B));\n }, [B, f]);\n const G = () => {\n T(I) ? z() : C(I);\n }, W = (L, K) => K.accessor ? typeof K.accessor == \"function\" ? K.accessor(L) : L[K.accessor] : L[K.key], Q = (L, K) => {\n const ae = W(L, K);\n return K.cell ? K.cell(L, ae) : /* @__PURE__ */ e(te, { children: ae });\n }, re = (L) => {\n switch (L) {\n case \"center\":\n return \"text-center\";\n case \"right\":\n return \"text-right\";\n default:\n return \"text-left\";\n }\n };\n return x ? /* @__PURE__ */ e(\n \"div\",\n {\n id: r,\n ref: t,\n className: k(\"flex items-center justify-center p-8\", h.container, o),\n ...D,\n children: y || /* @__PURE__ */ e(\"div\", { children: \"Loading...\" })\n }\n ) : n.length === 0 ? /* @__PURE__ */ e(\n \"div\",\n {\n id: r,\n ref: t,\n className: k(\"flex items-center justify-center p-8\", h.container, o),\n ...D,\n children: p || /* @__PURE__ */ e(\"div\", { className: \"text-muted-foreground\", children: \"No data available\" })\n }\n ) : /* @__PURE__ */ e(\n \"div\",\n {\n id: r,\n ref: t,\n className: k(\"overflow-x-auto border border-border rounded-lg\", h.container, o),\n \"data-testid\": \"table-container\",\n \"data-size\": s,\n \"data-selectable\": l,\n ...D,\n children: /* @__PURE__ */ w(\"table\", { className: h.table, role: \"table\", children: [\n b && /* @__PURE__ */ e(\"caption\", { className: \"sr-only\", children: b }),\n /* @__PURE__ */ w(\"colgroup\", { children: [\n l && /* @__PURE__ */ e(\"col\", { style: { width: \"1%\" } }),\n a.map((L) => /* @__PURE__ */ e(\"col\", { style: L.width ? { width: L.width } : {}, className: L.columnClassName }, L.key))\n ] }),\n u && /* @__PURE__ */ e(\"thead\", { className: h.header, role: \"rowgroup\", children: /* @__PURE__ */ w(\"tr\", { role: \"row\", children: [\n l && /* @__PURE__ */ e(\"th\", { className: h.checkbox, role: \"columnheader\", \"aria-label\": \"Select all rows\", children: /* @__PURE__ */ e(\n $e,\n {\n size: h.checkboxSize,\n checked: T(I),\n indeterminate: M(I),\n onCheckedChange: G,\n \"aria-label\": \"Select all rows\",\n className: \"align-middle\"\n }\n ) }),\n a.map((L) => {\n const K = v.key === L.key ? v.direction : null;\n return /* @__PURE__ */ e(\n \"th\",\n {\n className: k(h.headerCell, re(L.align), L.headerClassName),\n role: \"columnheader\",\n \"aria-sort\": v.key === L.key ? v.direction === \"asc\" ? \"ascending\" : v.direction === \"desc\" ? \"descending\" : \"none\" : L.sortable ? \"none\" : void 0,\n children: L.sortable ? /* @__PURE__ */ w(\n \"button\",\n {\n className: h.sortButton,\n onClick: () => F(L.key, L.sortFunction),\n \"aria-label\": `Sort by ${L.header}`,\n children: [\n L.header,\n /* @__PURE__ */ w(\"div\", { className: \"flex flex-col items-center -space-y-1\", children: [\n /* @__PURE__ */ e(\n Ue,\n {\n size: h.checkboxSize - 4,\n className: K === \"asc\" ? \"text-accent\" : \"opacity-40\"\n }\n ),\n /* @__PURE__ */ e(\n Ne,\n {\n size: h.checkboxSize - 4,\n className: K === \"desc\" ? \"text-accent\" : \"opacity-40\"\n }\n )\n ] })\n ]\n }\n ) : L.header\n },\n L.key\n );\n })\n ] }) }),\n /* @__PURE__ */ e(\"tbody\", { role: \"rowgroup\", children: g.map((L, K) => {\n const ae = d(L, K), le = N(ae), ie = K === g.length - 1;\n return /* @__PURE__ */ w(\n \"tr\",\n {\n className: k(\n \"transition-all\",\n !ie && \"border-b border-border\",\n m && \"hover:bg-accent/15\",\n c && K % 2 === 1 && \"bg-accent/25\",\n le && h.selectedRow\n ),\n role: \"row\",\n \"aria-selected\": l ? le : void 0,\n \"data-testid\": \"table-row\",\n \"data-row-id\": ae,\n \"data-selected\": le,\n children: [\n l && /* @__PURE__ */ e(\"td\", { className: h.checkbox, role: \"cell\", children: /* @__PURE__ */ e(\n $e,\n {\n size: h.checkboxSize,\n checked: le,\n onCheckedChange: (S) => {\n S ? A(ae) : E(ae);\n },\n \"aria-label\": `Select row ${K + 1}`\n }\n ) }),\n a.map((S) => /* @__PURE__ */ e(\n \"td\",\n {\n className: k(h.cell, re(S.align), S.cellClassName),\n role: \"cell\",\n children: Q(L, S)\n },\n S.key\n ))\n ]\n },\n ae\n );\n }) })\n ] })\n }\n );\n}\nconst Gn = ({ defaultValue: r, value: o, onValueChange: t } = {}) => {\n const [s, n] = R(r || \"\"), a = o !== void 0, l = a ? o : s, d = $((i) => {\n a || n(i), t == null || t(i);\n }, [a, t]);\n return {\n value: l,\n onValueChange: d\n };\n}, He = {\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}, jn = {\n underline: \"border-b-2 border-transparent data-[state=active]:border-accent data-[state=active]:text-accent hover:text-accent/80\",\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 Wn({ children: r, className: o, id: t, ref: s }) {\n const { tabsWidth: n, variant: a } = Te();\n return /* @__PURE__ */ e(\n \"div\",\n {\n id: t,\n ref: s,\n role: \"tablist\",\n className: k(\"flex\", He.width[n], He.variant[a], o),\n \"data-tabs-width\": n,\n \"data-variant\": a,\n children: r\n }\n );\n}\nfunction _n({ value: r, disabled: o = !1, className: t, children: s, onClick: n, id: a, ref: l }) {\n const { selectedValue: d, onValueChange: i, variant: f, triggersClassName: u } = Te(), c = d === r, m = (x) => {\n o || i(r), n == null || n(x);\n };\n return /* @__PURE__ */ e(\n \"button\",\n {\n id: a,\n ref: l,\n role: \"tab\",\n type: \"button\",\n \"aria-selected\": c,\n \"aria-controls\": `tabs-content-${r}`,\n \"data-state\": c ? \"active\" : \"inactive\",\n \"data-value\": r,\n disabled: o,\n className: k(\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 c ? \"font-medium\" : \"font-light\",\n jn[f],\n u,\n t\n ),\n onClick: m,\n children: s\n }\n );\n}\nfunction Sa({\n defaultValue: r,\n value: o,\n onValueChange: t,\n tabsWidth: s = \"fit\",\n variant: n = \"underline\",\n className: a,\n tabsList: l,\n children: d,\n ref: i,\n id: f,\n triggersClassName: u,\n contentClassName: c\n}) {\n const { value: m, onValueChange: p } = Gn({\n defaultValue: r,\n value: o,\n onValueChange: t\n }), x = {\n selectedValue: m,\n onValueChange: p,\n tabsWidth: s,\n variant: n,\n triggersClassName: u,\n contentClassName: c\n };\n return /* @__PURE__ */ e(kt.Provider, { value: x, children: /* @__PURE__ */ w(\"div\", { id: f, ref: i, className: a, \"data-tabs-width\": s, \"data-variant\": n, children: [\n l && /* @__PURE__ */ e(Wn, { children: l.map((y) => /* @__PURE__ */ e(_n, { value: y.value, children: y.label }, y.value)) }),\n d\n ] }) });\n}\nfunction Aa({ value: r, className: o, children: t, ref: s }) {\n const { selectedValue: n, contentClassName: a } = Te(), l = n === r;\n return l ? /* @__PURE__ */ e(\n \"div\",\n {\n ref: s,\n role: \"tabpanel\",\n id: `tabs-content-${r}`,\n \"aria-labelledby\": `tabs-trigger-${r}`,\n \"data-state\": l ? \"active\" : \"inactive\",\n \"data-value\": r,\n className: k(\"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 Kn = {\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}, Pn = {\n default: {\n unchecked: \"bg-muted-foreground\",\n checked: \"bg-primary\"\n },\n success: {\n unchecked: \"bg-muted-foreground\",\n checked: \"bg-success\"\n },\n destructive: {\n unchecked: \"bg-muted-foreground\",\n checked: \"bg-destructive\"\n }\n}, Ze = {\n variant: \"default\",\n size: \"md\"\n};\nfunction Ia({\n ref: r,\n id: o,\n size: t = Ze.size,\n variant: s = Ze.variant,\n checked: n,\n onCheckedChange: a,\n disabled: l = !1,\n className: d,\n thumbClassName: i,\n backgroundClassNames: f,\n ...u\n}) {\n const c = J(), m = ne(() => o || `toggle-${c}`, [o, c]), [p, x] = R(n);\n V(() => {\n x(n);\n }, [n]);\n const y = () => {\n if (!l) {\n const F = !p;\n n === void 0 && x(F), a == null || a(F);\n }\n }, b = (F) => {\n (F.key === \" \" || F.key === \"Enter\") && (F.preventDefault(), y());\n }, D = Kn[t], h = Pn[s], g = k(\n // Base styles\n \"relative inline-flex items-center rounded-full transition-all ease-in-out\",\n \"focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2\",\n // Size\n D.container,\n // Variant and state\n p ? (f == null ? void 0 : f.checked) || h.checked : (f == null ? void 0 : f.unchecked) || h.unchecked,\n // Disabled state\n l && \"opacity-50 cursor-not-allowed\",\n !l && \"cursor-pointer\",\n d\n ), v = k(\n // Base thumb styles\n \"absolute left-0.5 top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm transition-transform ease-in-out\",\n // Size\n D.thumb,\n // Position based on state\n p && D.translate,\n i\n );\n return /* @__PURE__ */ w(\n \"button\",\n {\n ref: r,\n id: m,\n type: \"button\",\n role: \"switch\",\n tabIndex: 0,\n \"aria-checked\": p,\n \"aria-disabled\": l,\n disabled: l,\n onClick: y,\n onKeyDown: b,\n className: g,\n ...u,\n children: [\n /* @__PURE__ */ e(\"span\", { className: v }),\n /* @__PURE__ */ e(\"span\", { className: \"sr-only\", children: p ? \"Enabled\" : \"Disabled\" })\n ]\n }\n );\n}\nexport {\n ra as Accordion,\n Ce as AccordionItem,\n Ma as ActionModal,\n na as Avatar,\n aa as Badge,\n Qt as Button,\n oa as Calendar,\n sa as Callout,\n la as Card,\n ia as Carousel,\n $e as Checkbox,\n ca as Clickable,\n da as Code,\n ua as CodeBlock,\n fa as Disclosure,\n ma as Drawer,\n pa as DropdownMenu,\n ha as DropdownMenuFactories,\n ba as DynamicList,\n ga as ErrorBoundary,\n ya as Form,\n xa as FormFactories,\n va as HelpIcon,\n dn as Input,\n pe as Label,\n qt as LoadingDots,\n wa as Modal,\n ka as Pagination,\n Na as Panel,\n Rr as Popover,\n Dn as RadioGroup,\n Ie as RadioGroupItem,\n kn as RadioInput,\n vn as ScrollArea,\n wn as Select,\n Da as Separator,\n Ca as Skeleton,\n Ea as Slider,\n Fa as Table,\n Sa as Tabs,\n Aa as TabsContent,\n Wn as TabsList,\n _n as TabsTrigger,\n hn as Textarea,\n Ta as Toast,\n Ia as Toggle,\n Cn 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 /** The main content/message to display in the modal. */\n message: React.ReactNode;\n /** Whether to style the confirm button with destructive/danger styling. */\n destructive?: boolean;\n}\n\ninterface AlertModalProps extends BaseActionModalProps {\n /** The type of action modal - alert shows only OK, confirm shows OK and Cancel. */\n type: 'alert';\n /** Custom text for the confirm/OK button. */\n confirmText?: string;\n /** Callback fired when the confirm/OK button is clicked. */\n onConfirm?: () => void;\n // Cancel-related props are not allowed for alerts\n cancelText?: never;\n}\n\ninterface ConfirmModalProps extends BaseActionModalProps {\n /** The type of action modal - alert shows only OK, confirm shows OK and Cancel. */\n type: 'confirm';\n /** Custom text for the confirm/OK button. */\n confirmText?: string;\n /** Custom text for the cancel button (only for confirm type). */\n cancelText?: string;\n /** Callback fired when the confirm/OK button is clicked. */\n onConfirm?: () => void;\n}\n\nexport type ActionModalProps = AlertModalProps | ConfirmModalProps;\n\n/**\n * A modal dialog for user confirmation or alerts with predefined action buttons.\n * Supports both alert (single OK button) and confirm (OK + Cancel buttons) modes.\n * \n * @example\n * ```tsx\n * // Alert modal\n * <ActionModal\n * type=\"alert\"\n * message=\"Operation completed successfully!\"\n * onClose={() => setShowModal(false)}\n * isOpen={showModal}\n * />\n * \n * // Confirmation modal\n * <ActionModal\n * type=\"confirm\"\n * message=\"Are you sure you want to delete this item?\"\n * destructive\n * onConfirm={() => deleteItem()}\n * onClose={() => setShowModal(false)}\n * isOpen={showModal}\n * />\n * ```\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';\n\nexport interface DropdownMenuContextFocus {\n level: number;\n index: number;\n}\n\nexport interface DropdownMenuContextValue {\n id: string;\n focus: DropdownMenuContextFocus | null;\n setFocus: (focus: DropdownMenuContextFocus | null) => void;\n isOpen: boolean;\n onItemSelect: (value: string) => void;\n onClose: () => void;\n className?: string;\n}\n\nexport const DropdownMenuContext = createContext<DropdownMenuContextValue | null>(null);\n\nexport const useDropdownMenuContext = () => {\n const context = useContext(DropdownMenuContext);\n if (!context) {\n throw new Error('DropdownMenu components must be used within a DropdownMenu component');\n }\n return context;\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 /** Unique identifier for the toast */\n id: string;\n /** The main message text for the toast */\n title: string;\n /** Optional secondary message text */\n description?: string;\n /** The type of toast which determines styling and icon. Can be extended with customTypes */\n type?: ToastType;\n /** Optional action button configuration */\n action?: ToastAction;\n /** Duration in milliseconds before auto-dismiss. Set to 0 to disable auto-dismiss */\n duration?: number;\n /** Callback fired when the toast is removed */\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\n/**\n * A notification toast component for displaying temporary messages to users.\n * Supports different types, actions, and auto-dismissal with customizable styling.\n * \n * @example\n * ```tsx\n * // Basic toast\n * <Toast\n * id=\"notification-1\"\n * title=\"Success!\"\n * description=\"Your changes have been saved.\"\n * type=\"info\"\n * />\n * \n * // Toast with action button\n * <Toast\n * id=\"undo-toast\"\n * title=\"Item deleted\"\n * action={{ label: \"Undo\", onClick: restoreItem }}\n * duration={5000}\n * />\n * \n * // Warning toast with custom duration\n * <Toast\n * id=\"warning-toast\"\n * title=\"Connection lost\"\n * description=\"Trying to reconnect...\"\n * type=\"warning\"\n * duration={0}\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 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","l","i","e","y","o","qt","r","R","V","k","Ht","Zt","Yt","Fe","Qt","a","f","u","Y","m","p","x","w","En","Fn","Sn","q","$","d","wa","c","J","b","D","g","v","F","B","N","A","te","De","Z","be","ActionModal","type","message","cancelText","confirmText","onConfirm","onClose","destructive","title","modalProps","defaultTexts","useMemo","actions","jsx","Modal","DropdownMenuContext","createContext","useDropdownMenuContext","context","useContext","TabsContext","useTabsContext","defaultTypeStyles","InfoCircled","ExclamationTriangle","CrossCircled","Toast","id","description","action","duration","onRemove","customTypes","CustomComponent","isExiting","setIsExiting","useState","handleRemove","useCallback","useEffect","timer","typeStyle","jsxs","join","X"],"mappings":";;;;;AAAA,SAASA,KAAKC,GAAG;AACf,SAAOA,EAAE,OAAO,CAACC,MAAM,OAAOA,KAAK,YAAYA,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM,KAAI;AACxE;ACgFA,SAASC,EAAE,EAAE,MAAMC,IAAI,IAAI,OAAOC,IAAI,gBAAgB,WAAWL,IAAI,UAAU,GAAGM,EAAC,GAAI;AACrF,SAAuBC,gBAAAA;AAAAA,IACrB;AAAA,IACA;AAAA,MACE,GAAGD;AAAA,MACH,OAAOF;AAAA,MACP,QAAQA;AAAA,MACR,WAAWJ;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,MACP,UAA0BO,gBAAAA;AAAAA,QACxB;AAAA,QACA;AAAA,UACE,GAAG;AAAA,UACH,MAAMF;AAAA,UACN,UAAU;AAAA,UACV,UAAU;AAAA,QACpB;AAAA,MACA;AAAA,IACA;AAAA,EACG;AACH;AClGA,SAASG,KAAK,GAAG;AACf,SAAO,EAAE,OAAO,CAAC,MAAM,OAAO,KAAK,YAAY,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM,KAAI;AACxE;AA0BAH,EAAE,MAAM;AACRA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAA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