@moondreamsdev/dreamer-ui 1.7.10-test.3 → 1.7.10-test.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Toast-BSraKTG9.js → Toast-DbWm-K8v.js} +23 -22
- package/dist/Toast-DbWm-K8v.js.map +1 -0
- package/dist/Toast-yniIAykN.cjs +2 -0
- package/dist/Toast-yniIAykN.cjs.map +1 -0
- package/dist/components.cjs.js +2 -2
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +246 -246
- package/dist/components.esm.js.map +1 -1
- package/dist/providers.cjs.js +1 -1
- package/dist/providers.esm.js +1 -1
- package/package.json +1 -1
- package/dist/Toast-BSraKTG9.js.map +0 -1
- package/dist/Toast-OM0b2tzD.cjs +0 -2
- package/dist/Toast-OM0b2tzD.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as r, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { X, C as
|
|
1
|
+
import { jsx as r, Fragment as $, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import q, { createContext as o, useId as H, useState as p, useEffect as g, useRef as J, useCallback as T, useMemo as E, useContext as P } from "react";
|
|
3
|
+
import { createPortal as X } from "react-dom";
|
|
4
|
+
import { X as Z, C as _, E as D, I as F } from "./X-CIoyLewf.js";
|
|
5
5
|
import { j as K } from "./join-BmgR_f4v.js";
|
|
6
6
|
function N(...e) {
|
|
7
7
|
return e.filter((l) => typeof l == "string" && l).join(" ").trim() || void 0;
|
|
@@ -52,6 +52,7 @@ o(void 0);
|
|
|
52
52
|
o(null);
|
|
53
53
|
o(void 0);
|
|
54
54
|
o(void 0);
|
|
55
|
+
o(null);
|
|
55
56
|
function V() {
|
|
56
57
|
const [e, l] = p(0);
|
|
57
58
|
return g(() => {
|
|
@@ -70,7 +71,7 @@ function V() {
|
|
|
70
71
|
n
|
|
71
72
|
)) });
|
|
72
73
|
}
|
|
73
|
-
const
|
|
74
|
+
const G = {
|
|
74
75
|
base: "",
|
|
75
76
|
primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
|
|
76
77
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
|
|
@@ -78,7 +79,7 @@ const _ = {
|
|
|
78
79
|
outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",
|
|
79
80
|
link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted",
|
|
80
81
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"
|
|
81
|
-
},
|
|
82
|
+
}, Q = {
|
|
82
83
|
stripped: "",
|
|
83
84
|
fitted: "size-fit",
|
|
84
85
|
sm: "px-2 py-1 text-sm",
|
|
@@ -112,8 +113,8 @@ function Y({
|
|
|
112
113
|
e === "link" && !l ? c = "fitted" : c = l || w.size;
|
|
113
114
|
const m = N(
|
|
114
115
|
"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
G[e],
|
|
117
|
+
Q[c],
|
|
117
118
|
W[n],
|
|
118
119
|
t && "relative pointer-events-none",
|
|
119
120
|
i && "relative",
|
|
@@ -164,7 +165,7 @@ function ee(e, l) {
|
|
|
164
165
|
}, [e, l]);
|
|
165
166
|
}
|
|
166
167
|
function te(e, l) {
|
|
167
|
-
const n =
|
|
168
|
+
const n = J(null), t = T(() => {
|
|
168
169
|
const i = document.getElementById(e);
|
|
169
170
|
if (!i) return;
|
|
170
171
|
const a = i.querySelectorAll('[data-modal-action="true"]');
|
|
@@ -205,13 +206,13 @@ function re({
|
|
|
205
206
|
ariaLabelledBy: f,
|
|
206
207
|
ariaDescribedBy: v
|
|
207
208
|
}) {
|
|
208
|
-
const h =
|
|
209
|
+
const h = H(), k = e || `modal-${h}`, C = e ? `${e}-title` : `modal-title-${h}`, { show: z, shouldRender: y } = R(l);
|
|
209
210
|
if (te(k, y), ee(y, n), !y) return null;
|
|
210
|
-
const j = () => t ?
|
|
211
|
-
const { label: O, className: M, ...S } =
|
|
211
|
+
const j = () => t ? q.isValidElement(t) ? /* @__PURE__ */ r("div", { className: "mb-4", children: t }) : /* @__PURE__ */ r("h2", { className: "mb-4 text-xl font-semibold", id: C, children: t }) : null, I = () => c.length === 0 ? null : /* @__PURE__ */ r("div", { className: "mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3", children: c.map((A, B) => {
|
|
212
|
+
const { label: O, className: M, ...S } = A;
|
|
212
213
|
return /* @__PURE__ */ r(Y, { className: M, type: "button", ...S, "data-modal-action": "true", children: O }, B);
|
|
213
214
|
}) });
|
|
214
|
-
return /* @__PURE__ */ r(
|
|
215
|
+
return /* @__PURE__ */ r($, { children: X(
|
|
215
216
|
/* @__PURE__ */ r(
|
|
216
217
|
"div",
|
|
217
218
|
{
|
|
@@ -254,7 +255,7 @@ function re({
|
|
|
254
255
|
),
|
|
255
256
|
j(),
|
|
256
257
|
i,
|
|
257
|
-
|
|
258
|
+
I()
|
|
258
259
|
]
|
|
259
260
|
}
|
|
260
261
|
)
|
|
@@ -320,18 +321,18 @@ const le = o(null), ue = () => {
|
|
|
320
321
|
if (!e)
|
|
321
322
|
throw new Error("Tabs components must be used within a Tabs component");
|
|
322
323
|
return e;
|
|
323
|
-
},
|
|
324
|
+
}, L = {
|
|
324
325
|
info: {
|
|
325
326
|
className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
|
|
326
|
-
icon: /* @__PURE__ */ r(
|
|
327
|
+
icon: /* @__PURE__ */ r(F, { size: 20 })
|
|
327
328
|
},
|
|
328
329
|
warning: {
|
|
329
330
|
className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
|
|
330
|
-
icon: /* @__PURE__ */ r(
|
|
331
|
+
icon: /* @__PURE__ */ r(D, { size: 20 })
|
|
331
332
|
},
|
|
332
333
|
error: {
|
|
333
334
|
className: "bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",
|
|
334
|
-
icon: /* @__PURE__ */ r(
|
|
335
|
+
icon: /* @__PURE__ */ r(_, { size: 20 })
|
|
335
336
|
}
|
|
336
337
|
};
|
|
337
338
|
function ce({
|
|
@@ -345,7 +346,7 @@ function ce({
|
|
|
345
346
|
customTypes: u,
|
|
346
347
|
customComponent: d
|
|
347
348
|
}) {
|
|
348
|
-
const [c, m] = p(!1), f =
|
|
349
|
+
const [c, m] = p(!1), f = T(() => {
|
|
349
350
|
m(!0), setTimeout(() => {
|
|
350
351
|
s == null || s(e);
|
|
351
352
|
}, 150);
|
|
@@ -370,7 +371,7 @@ function ce({
|
|
|
370
371
|
onRemove: s
|
|
371
372
|
}
|
|
372
373
|
);
|
|
373
|
-
const v = (u == null ? void 0 : u[t]) ||
|
|
374
|
+
const v = (u == null ? void 0 : u[t]) || L[t] || L.info;
|
|
374
375
|
return /* @__PURE__ */ b(
|
|
375
376
|
"div",
|
|
376
377
|
{
|
|
@@ -401,7 +402,7 @@ function ce({
|
|
|
401
402
|
{
|
|
402
403
|
onClick: f,
|
|
403
404
|
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",
|
|
404
|
-
children: /* @__PURE__ */ r(
|
|
405
|
+
children: /* @__PURE__ */ r(Z, { size: 16 })
|
|
405
406
|
}
|
|
406
407
|
)
|
|
407
408
|
]
|
|
@@ -415,4 +416,4 @@ export {
|
|
|
415
416
|
N as n,
|
|
416
417
|
ue as u
|
|
417
418
|
};
|
|
418
|
-
//# sourceMappingURL=Toast-
|
|
419
|
+
//# sourceMappingURL=Toast-DbWm-K8v.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast-DbWm-K8v.js","sources":["join-BmgR_f4v.js","X-CIoyLewf.js","Toast-BSraKTG9.js","components.esm.js","../src/components/actionmodal/ActionModal.tsx","../src/components/tabs/TabsContext.tsx","../src/components/toast/Toast.tsx"],"sourcesContent":["function n(...t) {\n return t.filter((s) => typeof s == \"string\" && s).join(\" \").trim() || void 0;\n}\nexport {\n n as 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 r, Fragment as q, jsxs as b } from \"react/jsx-runtime\";\nimport $, { createContext as o, useId as D, useState as p, useEffect as g, useRef as H, useCallback as L, useMemo as E, useContext as P } from \"react\";\nimport { createPortal as Q } from \"react-dom\";\nimport { X, C as Z, E as F, I as J } from \"./X-CIoyLewf.js\";\nimport { j as K } from \"./join-BmgR_f4v.js\";\nfunction N(...e) {\n return e.filter((l) => typeof l == \"string\" && l).join(\" \").trim() || void 0;\n}\nfunction U({ size: e = 15, color: l = \"currentColor\", className: n = \"inline\", ...t }) {\n return /* @__PURE__ */ r(\n \"svg\",\n {\n ...t,\n width: e,\n height: e,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ r(\n \"path\",\n {\n d: \"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction x(...e) {\n return e.filter((l) => typeof l == \"string\" && l).join(\" \").trim() || void 0;\n}\no(void 0);\no(null);\no(null);\no(null);\no(null);\no(null);\no(null);\no(null);\no(null);\no(null);\no(null);\no(null);\no(null);\no(null);\no(null);\no(null);\no(void 0);\no(void 0);\no(null);\no(void 0);\no(void 0);\nfunction V() {\n const [e, l] = p(0);\n return g(() => {\n const n = setInterval(() => {\n l((t) => (t + 1) % 3);\n }, 500);\n return () => clearInterval(n);\n }, []), /* @__PURE__ */ r(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((n) => /* @__PURE__ */ r(\n \"div\",\n {\n className: N(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n e === n && \"transform -translate-y-1\"\n )\n },\n n\n )) });\n}\nconst _ = {\n base: \"\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80\",\n tertiary: \"text-primary hover:text-primary-foreground disabled:text-muted\",\n outline: \"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted\",\n link: \"underline-offset-4 hover:underline disabled:underline disabled:text-muted\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground\"\n}, G = {\n stripped: \"\",\n fitted: \"size-fit\",\n sm: \"px-2 py-1 text-sm\",\n md: \"px-4 py-2 text-base\",\n lg: \"px-6 py-3 text-lg\",\n icon: \"p-1 w-fit aspect-square\",\n full: \"p-2 w-full\"\n}, W = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, w = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction Y({\n variant: e = w.variant,\n size: l,\n rounded: n = w.rounded,\n loading: t,\n linkTo: i,\n linkProps: a,\n type: s = \"button\",\n className: u,\n ...d\n}) {\n let c;\n e === \"link\" && !l ? c = \"fitted\" : c = l || w.size;\n const m = N(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n _[e],\n G[c],\n W[n],\n t && \"relative pointer-events-none\",\n i && \"relative\",\n u\n );\n return /* @__PURE__ */ b(\n \"button\",\n {\n ...d,\n role: i ? \"link\" : d.role,\n \"aria-label\": d[\"aria-label\"] || (a == null ? void 0 : a[\"aria-label\"]),\n \"aria-description\": d[\"aria-description\"] || (a == null ? void 0 : a[\"aria-description\"]),\n \"aria-disabled\": d.disabled || t,\n \"aria-busy\": t,\n type: s,\n className: m,\n children: [\n t && /* @__PURE__ */ r(V, {}),\n /* @__PURE__ */ r(\"span\", { className: N(t && \"invisible\"), children: d.children }),\n i && !d.disabled && /* @__PURE__ */ r(\n \"a\",\n {\n ...a,\n \"aria-hidden\": !0,\n href: i,\n rel: (a == null ? void 0 : a.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction R(e) {\n const [l, n] = p(!1), [t, i] = p(!1);\n return g(() => {\n e ? (i(!0), setTimeout(() => n(!0), 10)) : (n(!1), setTimeout(() => i(!1), 150));\n }, [e]), { show: l, shouldRender: t };\n}\nfunction ee(e, l) {\n g(() => {\n const n = (t) => {\n t.key === \"Escape\" && e && l();\n };\n return document.addEventListener(\"keydown\", n), e && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", n), document.body.style.overflow = \"auto\";\n };\n }, [e, l]);\n}\nfunction te(e, l) {\n const n = H(null), t = L(() => {\n const i = document.getElementById(e);\n if (!i) return;\n const a = i.querySelectorAll('[data-modal-action=\"true\"]');\n if (a.length > 0) {\n a[0].focus();\n return;\n }\n const s = i.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const u = Array.from(s).filter((d) => !(d instanceof HTMLButtonElement && d.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (u.length > 0) {\n u[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n i.focus();\n }, [e]);\n g(() => (l && (n.current = document.activeElement, t()), () => {\n document.body.style.overflow = \"auto\", n.current instanceof HTMLElement && n.current.focus();\n }), [l, t]);\n}\nfunction re({\n id: e,\n isOpen: l,\n onClose: n,\n title: t,\n children: i,\n contentOnly: a = !1,\n className: s,\n overlayClassName: u,\n hideCloseButton: d = !1,\n actions: c = [],\n disableCloseOnOverlayClick: m = !1,\n ariaLabelledBy: f,\n ariaDescribedBy: v\n}) {\n const h = D(), k = e || `modal-${h}`, C = e ? `${e}-title` : `modal-title-${h}`, { show: z, shouldRender: y } = R(l);\n if (te(k, y), ee(y, n), !y) return null;\n const j = () => t ? $.isValidElement(t) ? /* @__PURE__ */ r(\"div\", { className: \"mb-4\", children: t }) : /* @__PURE__ */ r(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: C, children: t }) : null, A = () => c.length === 0 ? null : /* @__PURE__ */ r(\"div\", { className: \"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3\", children: c.map((I, B) => {\n const { label: O, className: M, ...S } = I;\n return /* @__PURE__ */ r(Y, { className: M, type: \"button\", ...S, \"data-modal-action\": \"true\", children: O }, B);\n }) });\n return /* @__PURE__ */ r(q, { children: Q(\n /* @__PURE__ */ r(\n \"div\",\n {\n \"aria-labelledby\": f ?? t ? C : void 0,\n \"aria-describedby\": v,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ b(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ r(\n \"div\",\n {\n className: x(\"fixed inset-0 bg-black/20 transition-all\", u),\n onClick: () => {\n m || n();\n }\n }\n ),\n a && /* @__PURE__ */ r(\"div\", { className: x(\"relative w-fit\", s), children: i }),\n !a && /* @__PURE__ */ b(\n \"div\",\n {\n id: k,\n tabIndex: -1,\n className: x(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75\",\n z ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n s\n ),\n children: [\n !d && /* @__PURE__ */ r(\n \"button\",\n {\n type: \"button\",\n onClick: n,\n \"data-modal-close-button\": \"true\",\n className: \"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ r(U, { size: 18 })\n }\n ),\n j(),\n i,\n A()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nfunction de({\n type: e,\n message: l,\n cancelText: n,\n confirmText: t,\n onConfirm: i,\n onClose: a,\n destructive: s = !1,\n title: u,\n ...d\n}) {\n const c = E(() => e === \"confirm\" ? {\n confirm: t || \"Confirm\",\n cancel: n || \"Cancel\",\n defaultTitle: u || \"Confirm Action\"\n } : {\n confirm: t || \"OK\",\n cancel: null,\n defaultTitle: u || \"Alert\"\n }, [e, t, u, n]), m = E(\n () => [\n ...c.cancel ? [\n {\n label: c.cancel,\n variant: \"secondary\",\n onClick: a\n }\n ] : [],\n {\n label: c.confirm,\n variant: s ? \"destructive\" : \"primary\",\n onClick: () => {\n i == null || i(), a();\n }\n }\n ],\n [c, s, i, a]\n );\n return /* @__PURE__ */ r(\n re,\n {\n ...d,\n title: u || c.defaultTitle,\n onClose: a,\n actions: m,\n disableCloseOnOverlayClick: e === \"confirm\",\n hideCloseButton: e === \"confirm\",\n children: typeof l == \"string\" ? /* @__PURE__ */ r(\"p\", { className: \"text-sm\", children: l }) : l\n }\n );\n}\nconst le = o(null), ue = () => {\n const e = P(le);\n if (!e)\n throw new Error(\"Tabs components must be used within a Tabs component\");\n return e;\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__ */ r(J, { size: 20 })\n },\n warning: {\n className: \"bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100\",\n icon: /* @__PURE__ */ r(F, { size: 20 })\n },\n error: {\n className: \"bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100\",\n icon: /* @__PURE__ */ r(Z, { size: 20 })\n }\n};\nfunction ce({\n id: e,\n title: l,\n description: n,\n type: t = \"info\",\n action: i,\n duration: a = 5e3,\n onRemove: s,\n customTypes: u,\n customComponent: d\n}) {\n const [c, m] = p(!1), f = L(() => {\n m(!0), setTimeout(() => {\n s == null || s(e);\n }, 150);\n }, [e, s]);\n if (g(() => {\n if (a > 0) {\n const h = setTimeout(() => {\n f();\n }, a);\n return () => clearTimeout(h);\n }\n }, [a, e, s, f]), d)\n return /* @__PURE__ */ r(\n d,\n {\n id: e,\n title: l,\n description: n,\n type: t,\n action: i,\n duration: a,\n onRemove: s\n }\n );\n const v = (u == null ? void 0 : u[t]) || T[t] || T.info;\n return /* @__PURE__ */ b(\n \"div\",\n {\n role: t === \"error\" ? \"alert\" : \"status\",\n \"aria-live\": t === \"error\" ? void 0 : \"polite\",\n className: K(\n \"relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out\",\n i && \"pb-3\",\n v.className,\n c ? \"opacity-0 translate-x-full\" : \"opacity-100 translate-x-0\"\n ),\n children: [\n /* @__PURE__ */ r(\"div\", { className: \"flex-shrink-0 mr-3\", children: v.icon }),\n /* @__PURE__ */ b(\"div\", { className: \"flex-grow min-w-0\", children: [\n /* @__PURE__ */ r(\"div\", { className: \"font-medium text-sm leading-5\", children: l }),\n n && /* @__PURE__ */ r(\"div\", { className: \"mt-1 text-sm opacity-90 leading-5\", children: n }),\n i && /* @__PURE__ */ r(\"div\", { className: \"mt-1.5\", children: /* @__PURE__ */ r(\n \"button\",\n {\n onClick: i.onClick,\n className: \"text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer\",\n children: i.label\n }\n ) })\n ] }),\n /* @__PURE__ */ r(\n \"button\",\n {\n onClick: f,\n className: \"flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0\",\n children: /* @__PURE__ */ r(X, { size: 16 })\n }\n )\n ]\n }\n );\n}\nexport {\n de as A,\n ce as T,\n le as a,\n N as n,\n ue as u\n};\n//# sourceMappingURL=Toast-BSraKTG9.js.map\n","import { jsxs as E, jsx as i, Fragment as O } from \"react/jsx-runtime\";\nimport _, { useId as X, useState as T, createElement as ze, useEffect as S, useRef as W, useCallback as A, useMemo as U, isValidElement as De, cloneElement as Se } from \"react\";\nimport { j as N } from \"./join-BmgR_f4v.js\";\nimport { d as Te, e as Ae, f as $e, C as pe, D as Re, W as Le, h as je, g as Ve, a as Be, i as We, E as Ke, Q as Me, b as Fe, c as He } from \"./Window-CT479Oxr.js\";\nimport { n as V, a as Pe, u as ve } from \"./Toast-BSraKTG9.js\";\nimport { A as br, T as pr } from \"./Toast-BSraKTG9.js\";\nimport { createPortal as fe } from \"react-dom\";\nimport { downloadFile as Ge } from \"./utils.esm.js\";\nimport { E as qe, X as ge } from \"./X-CIoyLewf.js\";\nfunction me({\n id: n,\n title: a,\n content: r,\n children: o,\n className: t = \"\",\n disabled: e = !1,\n isOpen: s = !1,\n onToggle: l,\n triggerClassName: d = \"\",\n bodyClassName: m = \"\"\n}) {\n const h = X(), c = n || `accordion-item-${h}`, b = `${c}-header`, u = `${c}-panel`, p = () => {\n !e && l && l();\n }, v = (f) => {\n (f.key === \"Enter\" || f.key === \" \") && (f.preventDefault(), p());\n };\n return /* @__PURE__ */ E(\"div\", { className: N(\"border-b border-gray-200\", e && \"opacity-60 cursor-not-allowed\", t), children: [\n /* @__PURE__ */ E(\n \"button\",\n {\n id: b,\n type: \"button\",\n className: N(\n \"w-full text-left py-3 px-4 flex justify-between items-center focus:outline focus:outline-secondary\",\n e ? \"cursor-not-allowed\" : \"hover:bg-gray-50/10 cursor-pointer\",\n d\n ),\n \"aria-expanded\": s,\n \"aria-controls\": u,\n disabled: e,\n onClick: p,\n onKeyDown: v,\n children: [\n /* @__PURE__ */ i(\"span\", { children: a }),\n /* @__PURE__ */ i(\n \"span\",\n {\n className: N(\n \"transform transition-transform duration-300 ease-linear\",\n s ? \"rotate-180\" : \"rotate-0\"\n ),\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ i(Te, { size: 18 })\n }\n )\n ]\n }\n ),\n /* @__PURE__ */ i(\n \"div\",\n {\n id: u,\n role: \"region\",\n \"aria-labelledby\": b,\n className: N(\n \"transition-all duration-300 ease-linear px-4\",\n s ? \"max-h-96 opacity-100 overflow-auto py-3\" : \"max-h-0 opacity-0 overflow-hidden\",\n m\n ),\n children: s && (o || r)\n }\n )\n ] });\n}\nfunction Pt({\n id: n,\n items: a = [],\n children: r,\n className: o = \"\",\n itemClassName: t = \"\",\n allowMultiple: e = !1,\n defaultOpenItems: s = [],\n triggersClassName: l = \"\",\n bodiesClassName: d = \"\"\n}) {\n const m = X(), h = n || `accordion-group-${m}`, [c, b] = T(new Set(s)), u = (f) => {\n b((y) => {\n const x = new Set(y);\n return x.has(f) ? x.delete(f) : (e || x.clear(), x.add(f)), x;\n });\n }, p = (f) => `${m}-item-${f}`, v = (f) => c.has(f);\n return /* @__PURE__ */ E(\"div\", { id: h, className: o, children: [\n a.length > 0 && a.map((f, y) => {\n const x = f.id || p(y);\n return /* @__PURE__ */ i(\n me,\n {\n id: x,\n title: f.title,\n content: f.content,\n disabled: f.disabled,\n isOpen: v(x),\n onToggle: () => u(x),\n className: t,\n triggerClassName: l,\n bodyClassName: d\n },\n x\n );\n }),\n a.length === 0 && r && _.Children.map(r, (f, y) => {\n if (_.isValidElement(f) && f.type === me) {\n const x = f.props.id || p(y);\n return /* @__PURE__ */ ze(\n me,\n {\n ...f.props,\n key: x,\n id: x,\n className: N(t, f.props.className),\n isOpen: v(x),\n onToggle: () => u(x),\n triggerClassName: N(l, f.props.triggerClassName),\n bodyClassName: N(d, f.props.bodyClassName)\n }\n );\n }\n return null;\n })\n ] });\n}\nfunction Ze() {\n const [n, a] = T(0);\n return S(() => {\n const r = setInterval(() => {\n a((o) => (o + 1) % 3);\n }, 500);\n return () => clearInterval(r);\n }, []), /* @__PURE__ */ i(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((r) => /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n n === r && \"transform -translate-y-1\"\n )\n },\n r\n )) });\n}\nconst _e = {\n base: \"\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80\",\n tertiary: \"text-primary hover:text-primary-foreground disabled:text-muted\",\n outline: \"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted\",\n link: \"underline-offset-4 hover:underline disabled:underline disabled:text-muted\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground\"\n}, Xe = {\n stripped: \"\",\n fitted: \"size-fit\",\n sm: \"px-2 py-1 text-sm\",\n md: \"px-4 py-2 text-base\",\n lg: \"px-6 py-3 text-lg\",\n icon: \"p-1 w-fit aspect-square\",\n full: \"p-2 w-full\"\n}, Ue = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, he = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction Je({\n variant: n = he.variant,\n size: a,\n rounded: r = he.rounded,\n loading: o,\n linkTo: t,\n linkProps: e,\n type: s = \"button\",\n className: l,\n ...d\n}) {\n let m;\n n === \"link\" && !a ? m = \"fitted\" : m = a || he.size;\n const c = N(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n _e[n],\n Xe[m],\n Ue[r],\n o && \"relative pointer-events-none\",\n t && \"relative\",\n l\n );\n return /* @__PURE__ */ E(\n \"button\",\n {\n ...d,\n role: t ? \"link\" : d.role,\n \"aria-label\": d[\"aria-label\"] || (e == null ? void 0 : e[\"aria-label\"]),\n \"aria-description\": d[\"aria-description\"] || (e == null ? void 0 : e[\"aria-description\"]),\n \"aria-disabled\": d.disabled || o,\n \"aria-busy\": o,\n type: s,\n className: c,\n children: [\n o && /* @__PURE__ */ i(Ze, {}),\n /* @__PURE__ */ i(\"span\", { className: N(o && \"invisible\"), children: d.children }),\n t && !d.disabled && /* @__PURE__ */ i(\n \"a\",\n {\n ...e,\n \"aria-hidden\": !0,\n href: t,\n rel: (e == null ? void 0 : e.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction Qe({\n totalItems: n,\n itemsToShow: a,\n infinite: r,\n autoScroll: o,\n scrollInterval: t,\n pauseScrollOnHover: e,\n currentIndex: s,\n onIndexChange: l\n}) {\n const [d, m] = T(s || 0), [h, c] = T(!1), b = W(null), u = Math.ceil(n / a), p = r || d > 0, v = r || d < u - 1, f = A(\n (g) => {\n const w = Math.max(0, Math.min(g, u - 1));\n m(w), l == null || l(w);\n },\n [u, l]\n ), y = A(() => {\n if (p) {\n const g = d === 0 && r ? u - 1 : d - 1;\n f(g);\n }\n }, [d, p, r, u, f]), x = A(() => {\n if (v) {\n const g = d === u - 1 && r ? 0 : d + 1;\n f(g);\n }\n }, [d, v, r, u, f]);\n return S(() => {\n s !== void 0 && s !== d && m(s);\n }, [s, d]), S(() => {\n if (!o) return;\n const g = () => {\n b.current = setInterval(() => {\n e && h || x();\n }, t);\n }, w = () => {\n b.current && (clearInterval(b.current), b.current = null);\n };\n return !h || !e ? g() : w(), w;\n }, [o, t, e, h, x]), S(() => {\n m(0);\n }, [a]), {\n currentSlide: d,\n canGoPrev: p,\n canGoNext: v,\n goToPrev: y,\n goToNext: x,\n goToSlide: f,\n isHovered: h,\n setIsHovered: c\n };\n}\nconst re = {\n xs: 0,\n // Smaller than `sm`\n sm: 640,\n // Tailwind's `sm` breakpoint: `@media (min-width: 640px)`\n md: 768,\n // Tailwind's `md` breakpoint: `@media (min-width: 768px)`\n lg: 1024,\n // Tailwind's `lg` breakpoint: `@media (min-width: 1024px)`\n xl: 1280,\n // Tailwind's `xl` breakpoint: `@media (min-width: 1280px)`\n \"2xl\": 1536\n // Tailwind's `2xl` breakpoint: `@media (min-width: 1536px)`\n};\nfunction Ye() {\n const [n, a] = T(), [r, o] = T(0), t = (e) => re[e];\n return S(() => {\n const e = (l) => l >= re[\"2xl\"] ? \"2xl\" : l >= re.xl ? \"xl\" : l >= re.lg ? \"lg\" : l >= re.md ? \"md\" : l >= re.sm ? \"sm\" : \"xs\";\n a(e(window.innerWidth)), o(window.innerWidth);\n const s = () => {\n a(e(window.innerWidth)), o(window.innerWidth);\n };\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, []), { screenSize: n, screenWidth: r, getBreakpoint: t };\n}\nconst ie = {\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}, xe = {\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}, le = {\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 Gt({\n children: n,\n id: a,\n ref: r,\n className: o,\n autoScroll: t = !1,\n scrollInterval: e = 3e3,\n pauseScrollOnHover: s = !0,\n currentIndex: l,\n onIndexChange: d,\n hidePrevNext: m = !1,\n hideDots: h = !1,\n itemsToShow: c = 1,\n buttonSize: b = \"md\",\n buttonVariant: u = \"default\",\n buttonPosition: p = \"exterior\",\n infinite: v = !0,\n prevButton: f,\n nextButton: y,\n itemsClassName: x,\n containerClassName: g,\n dotsClassName: w,\n gap: k = 8\n}) {\n var M, oe;\n const I = W(null), C = _.Children.toArray(n).filter(_.isValidElement), $ = C.length, { screenSize: P } = Ye(), j = U(() => {\n if (typeof c == \"number\")\n return c;\n if (typeof c == \"object\" && c && P) {\n const Q = [\"2xl\", \"xl\", \"lg\", \"md\", \"sm\", \"xs\"], q = Q.indexOf(P);\n for (let te = q; te < Q.length; te++) {\n const se = Q[te];\n if (c[se] !== void 0)\n return c[se];\n }\n }\n return 1;\n }, [c, P]), { currentSlide: Z, canGoPrev: F, canGoNext: D, goToPrev: R, goToNext: B, goToSlide: L, setIsHovered: K } = Qe({\n totalItems: $,\n itemsToShow: j,\n infinite: v,\n autoScroll: t,\n scrollInterval: e,\n pauseScrollOnHover: s,\n currentIndex: l,\n onIndexChange: d\n }), H = A(\n (Q) => {\n if (j === 1)\n return { leftWidth: 0, rightWidth: 0, widthReduction: 0 };\n const q = k * (j - 1) / j;\n return Q % j === 0 ? { leftWidth: 0, rightWidth: k / 2, widthReduction: q } : Q % j === j - 1 ? { leftWidth: k / 2, rightWidth: 0, widthReduction: q } : { leftWidth: k / 2, rightWidth: k / 2, widthReduction: q };\n },\n [j, k]\n ), G = () => {\n R();\n }, Y = () => {\n B();\n }, ne = () => {\n s && K(!0);\n }, ae = () => {\n s && K(!1);\n }, ee = -(Z * (100 / $) * j), z = N(\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 p === \"aligned\" ? \"disabled:opacity-90\" : \"disabled:opacity-50\"\n );\n return /* @__PURE__ */ E(\"div\", { className: N(\"relative\", o), \"data-carousel-wrapper\": \"true\", children: [\n !m && /* @__PURE__ */ i(O, { children: f ? _.cloneElement(\n f,\n {\n onClick: G,\n disabled: !F,\n className: N(\n ((M = f.props) == null ? void 0 : M.className) || \"\",\n le[p].prev\n ),\n role: \"button\",\n \"aria-disabled\": !F,\n \"aria-label\": \"Previous slide\",\n \"data-carousel-prev\": \"true\"\n }\n ) : /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: G,\n disabled: !F,\n className: N(\n z,\n ie[b].button,\n xe[u],\n le[p].prev\n ),\n \"aria-disabled\": !F,\n \"aria-label\": \"Previous slide\",\n \"data-carousel-prev\": \"true\",\n children: /* @__PURE__ */ i(Ae, { className: ie[b].icon })\n }\n ) }),\n /* @__PURE__ */ E(\n \"div\",\n {\n id: a,\n ref: r,\n className: N(\"relative overflow-hidden\", g),\n onMouseEnter: ne,\n onMouseLeave: ae,\n \"data-carousel\": \"true\",\n \"data-current-index\": Z,\n \"data-items-to-show\": j,\n \"data-auto-scroll\": t,\n \"data-button-position\": p,\n children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n ref: I,\n className: \"flex transition-transform duration-300 ease-in-out\",\n style: {\n transform: `translateX(${ee}%)`,\n width: `${$ / j * 100}%`\n },\n children: C.map((Q, q) => {\n const { leftWidth: te, rightWidth: se, widthReduction: Ie } = H(q);\n return /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\"flex-shrink-0\", x),\n style: {\n width: `calc(${100 / $}% - ${Ie}px)`,\n marginRight: se > 0 ? `${se}px` : void 0,\n marginLeft: te > 0 ? `${te}px` : void 0\n },\n \"data-slide-index\": q,\n children: Q\n },\n q\n );\n })\n }\n ),\n !h && /* @__PURE__ */ i(\"div\", { className: \"absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2\", children: Array.from({ length: Math.ceil($ / j) }).map((Q, q) => /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: () => L(q),\n className: N(\n \"w-2 h-2 rounded-full transition-colors duration-200\",\n q === Z ? \"bg-accent\" : \"bg-muted hover:bg-muted-foreground/50\",\n w\n ),\n \"aria-label\": `Go to slide ${q + 1}`,\n \"data-carousel-dot\": q\n },\n q\n )) })\n ]\n }\n ),\n !m && /* @__PURE__ */ i(O, { children: y ? _.cloneElement(\n y,\n {\n onClick: Y,\n disabled: !D,\n className: N(\n ((oe = y.props) == null ? void 0 : oe.className) || \"\",\n le[p].next\n ),\n role: \"button\",\n \"aria-disabled\": !D,\n \"aria-label\": \"Next slide\",\n \"data-carousel-next\": \"true\"\n }\n ) : /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: Y,\n disabled: !D,\n className: N(\n z,\n ie[b].button,\n xe[u],\n le[p].next\n ),\n \"aria-disabled\": !D,\n \"aria-label\": \"Next slide\",\n \"data-carousel-next\": \"true\",\n children: /* @__PURE__ */ i($e, { className: ie[b].icon })\n }\n ) })\n ] });\n}\nfunction Oe(n) {\n const [a, r] = T(\"\"), o = A((t) => {\n let e = t, s = \"\";\n for (; e && !s; ) {\n const l = window.getComputedStyle(e).backgroundColor;\n l && l !== \"transparent\" && l !== \"rgba(0, 0, 0, 0)\" && (s = l), e = e.parentElement;\n }\n return s || \"transparent\";\n }, []);\n return S(() => {\n const t = document.getElementById(n);\n if (t) {\n const e = o(t.parentElement);\n r(e);\n }\n }, [n, o]), a;\n}\nfunction qt({\n ref: n,\n id: a,\n size: r = 20,\n color: o,\n filled: t = !1,\n rounded: e = !0,\n checked: s = !1,\n onCheckedChange: l,\n disabled: d,\n className: m = \"\",\n ...h\n}) {\n const c = X(), b = U(() => a || `checkbox-${c}`, [a, c]), u = Oe(b), [p, v] = T(s);\n S(() => {\n v(s);\n }, [s]);\n const f = () => {\n d || (v(!p), l == null || l(!p));\n }, y = (g) => {\n g.key === \" \" && (g.preventDefault(), f());\n }, x = N(\n \"flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2\",\n e && \"rounded\",\n d && \"opacity-40 cursor-not-allowed\",\n !d && \"cursor-pointer\",\n m\n );\n return /* @__PURE__ */ i(\n \"button\",\n {\n id: b,\n type: \"button\",\n ref: n,\n tabIndex: 0,\n role: \"checkbox\",\n onClick: f,\n \"aria-checked\": p,\n \"aria-disabled\": d,\n onKeyDownCapture: y,\n style: {\n width: r,\n height: r,\n color: o,\n backgroundColor: p && t ? \"currentcolor\" : \"transparent\"\n },\n className: x,\n ...h,\n children: p && /* @__PURE__ */ i(pe, { size: r, color: t ? u : void 0 })\n }\n );\n}\nfunction Zt({\n children: n,\n className: a,\n linkTo: r,\n linkProps: o,\n onButtonClick: t,\n buttonProps: e,\n ...s\n}) {\n return r && t && console.warn('Clickable: Both \"linkTo\" and \"onButtonClick\" props are provided. Only \"linkTo\" will be used.'), /* @__PURE__ */ E(\"div\", { className: N(\"relative w-fit\", a), ...s, children: [\n n,\n r && /* @__PURE__ */ i(\n \"a\",\n {\n ...o,\n rel: (o == null ? void 0 : o.rel) || \"noreferrer\",\n href: r,\n className: N(\"absolute inset-0\", o == null ? void 0 : o.className)\n }\n ),\n !r && t && /* @__PURE__ */ i(\n \"button\",\n {\n ...e,\n type: \"button\",\n onClick: t,\n className: N(\"absolute inset-0 cursor-pointer\", e == null ? void 0 : e.className)\n }\n )\n ] });\n}\nfunction et(n) {\n const [a, r] = T(!1), o = A(async () => {\n try {\n await navigator.clipboard.writeText(n), r(!0), setTimeout(() => r(!1), 3e3);\n } catch (t) {\n console.error(\"Failed to copy code:\", t);\n }\n }, [n]);\n return { copied: a, handleCopy: o };\n}\nfunction tt(n, a) {\n const r = W(null), o = W(null);\n return S(() => {\n if (n) {\n r.current = document.activeElement, document.body.style.overflow = \"hidden\", setTimeout(() => {\n var e;\n (e = o.current) == null || e.focus();\n }, 100);\n const t = (e) => {\n e.key === \"Escape\" && a(!1);\n };\n return document.addEventListener(\"keydown\", t), () => {\n document.removeEventListener(\"keydown\", t), document.body.style.overflow = \"\";\n };\n } else r.current && (r.current.focus(), r.current = null);\n }, [n, a]), { containerRef: o };\n}\nfunction rt(n, a, r, o) {\n return { handleKeyDown: A(\n (e) => {\n e.key === \"c\" && (e.metaKey || e.ctrlKey) && n ? (e.preventDefault(), r()) : e.key === \"f\" && a && (e.preventDefault(), o());\n },\n [n, a, r, o]\n ) };\n}\nfunction nt() {\n return { tokenizeTypeScript: A(\n (a, r = !1, o = 0) => {\n const t = [];\n let e = a, s = r, l = o;\n for (; e.length > 0; ) {\n const d = e.match(/^\\/\\*[\\s\\S]*?\\*\\//);\n if (d) {\n t.push({ text: d[0], type: \"comment\" }), e = e.slice(d[0].length);\n continue;\n }\n const m = e.match(/^\\/\\/.*$/m);\n if (m) {\n t.push({ text: m[0], type: \"comment\" }), e = e.slice(m[0].length);\n continue;\n }\n const h = e.match(/^(`[^`]*`|\"[^\"]*\"|'[^']*')/);\n if (h) {\n t.push({ text: h[0], type: \"string\" }), e = e.slice(h[0].length);\n continue;\n }\n const c = e.match(/^<([a-zA-Z][a-zA-Z0-9]*)/);\n if (c) {\n t.push({ text: \"<\", type: \"jsx-bracket\" }), t.push({ text: c[1], type: \"jsx-tag\" }), e = e.slice(c[0].length), s = !0;\n continue;\n }\n const b = e.match(/^<\\/([a-zA-Z][a-zA-Z0-9]*)>/);\n if (b) {\n t.push({ text: \"</\", type: \"jsx-bracket\" }), t.push({ text: b[1], type: \"jsx-tag\" }), t.push({ text: \">\", type: \"jsx-bracket\" }), e = e.slice(b[0].length), s = !1;\n continue;\n }\n if (e.match(/^\\/?>/)) {\n const C = e.match(/^(\\/?>\\s*)/);\n if (C) {\n t.push({ text: C[1].trim(), type: \"jsx-bracket\" }), e = e.slice(C[1].length), C[1].includes(\">\") && (s = !1);\n continue;\n }\n }\n const u = e.match(/^([a-zA-Z][a-zA-Z0-9]*)(\\s*)(=)/);\n if (u && s && l === 0) {\n t.push({ text: u[1], type: \"jsx-attribute\" }), u[2] && t.push({ text: u[2], type: \"plain\" }), t.push({ text: \"=\", type: \"plain\" }), e = e.slice(u[0].length);\n continue;\n }\n const p = e.match(/^[{}]/);\n if (p) {\n t.push({ text: p[0], type: \"jsx-brace\" }), p[0] === \"{\" ? l++ : p[0] === \"}\" && l--, e = e.slice(1);\n continue;\n }\n const v = e.match(/^\\s+/);\n if (v) {\n t.push({ text: v[0], type: \"plain\" }), e = e.slice(v[0].length);\n continue;\n }\n const f = e.match(/^(=>|===|!==|==|!=|<=|>=|&&|\\|\\||[+\\-*/%=<>!&|^~?:;,()[\\]{}.])/);\n if (f) {\n t.push({ text: f[0], type: \"operator\" }), e = e.slice(f[0].length);\n continue;\n }\n const y = e.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 (y) {\n t.push({ text: y[0], type: \"keyword\" }), e = e.slice(y[0].length);\n continue;\n }\n const x = e.match(/^(use[A-Z][a-zA-Z]*)\\b/);\n if (x) {\n t.push({ text: x[0], type: \"hook\" }), e = e.slice(x[0].length);\n continue;\n }\n const g = e.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)\\s*(?=(\\?\\.)?\\()/);\n if (g) {\n t.push({ text: g[1], type: \"function\" }), e = e.slice(g[1].length);\n continue;\n }\n const w = e.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 (w) {\n t.push({ text: w[0], type: \"type\" }), e = e.slice(w[0].length);\n continue;\n }\n const k = e.match(/^(\\d+\\.?\\d*)/);\n if (k) {\n t.push({ text: k[0], type: \"number\" }), e = e.slice(k[0].length);\n continue;\n }\n const I = e.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)\\s*(?=:)/);\n if (I && !s) {\n t.push({ text: I[1], type: \"property\" }), e = e.slice(I[1].length);\n continue;\n }\n t.push({ text: e[0], type: \"plain\" }), e = e.slice(1);\n }\n return t;\n },\n []\n ) };\n}\nfunction at(n) {\n return { mergedTokenClasses: U(() => ({ ...{\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 }, ...n }), [n]) };\n}\nfunction _t({\n code: n,\n language: a = \"typescript\",\n allowCopy: r = !0,\n allowDownload: o = !1,\n allowFullscreen: t = !1,\n filename: e,\n showTrafficLights: s = !0,\n showLineNumbers: l = !1,\n hideHeader: d = !1,\n hideFiletype: m = !1,\n maxHeight: h,\n tokenClasses: c,\n className: b,\n id: u,\n ref: p,\n ...v\n}) {\n const [f, y] = T(!1), { containerRef: x } = tt(f, y), { copied: g, handleCopy: w } = et(n), { mergedTokenClasses: k } = at(c), { tokenizeTypeScript: I } = nt(), C = U(() => n.split(`\n`), [n]), $ = A(() => {\n const L = e || `code.${j(a)}`;\n Ge(n, L);\n }, [n, e, a]), { handleKeyDown: P } = rt(\n r,\n t,\n w,\n () => y(!f)\n ), j = (L) => ({\n typescript: \"ts\",\n tsx: \"tsx\",\n ts: \"ts\"\n })[L] || \"ts\", Z = A(\n (L = !0) => /* @__PURE__ */ E(\"div\", { className: N(\"flex items-center space-x-2\", !L && \"absolute top-2 right-2 z-10\"), children: [\n !m && /* @__PURE__ */ i(\n \"span\",\n {\n className: \"text-xs text-gray-400 uppercase tracking-wide font-medium\",\n \"aria-label\": `Code language: ${a}`,\n children: a\n }\n ),\n t && /* @__PURE__ */ i(\n \"button\",\n {\n onClick: () => y(!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: f ? \"Exit fullscreen\" : \"Fullscreen\",\n \"aria-label\": f ? \"Exit fullscreen mode\" : \"Enter fullscreen mode\",\n \"aria-pressed\": f,\n type: \"button\",\n children: f ? /* @__PURE__ */ i(Re, { size: 14 }) : /* @__PURE__ */ i(Le, { size: 14 })\n }\n ),\n o && /* @__PURE__ */ i(\n \"button\",\n {\n onClick: $,\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__ */ i(je, { size: 14 })\n }\n ),\n r && /* @__PURE__ */ i(\n \"button\",\n {\n onClick: w,\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__ */ i(pe, { size: 14, className: \"text-green-400\" }) : /* @__PURE__ */ i(Ve, { size: 14 })\n }\n )\n ] }),\n [\n m,\n a,\n t,\n f,\n o,\n $,\n r,\n w,\n g\n ]\n ), F = U(() => {\n let L = !1, K = 0;\n return C.map((H, G) => {\n if (H.trim() === \"\")\n return /* @__PURE__ */ i(\"div\", { className: \"leading-6\", children: \" \" }, G);\n const Y = I(H, L, K);\n H.includes(\"<\") && H.match(/<[a-zA-Z]/) && (L = !0), H.includes(\">\") && !H.includes(\"<\") && (L = !1, K = 0);\n const ne = (H.match(/\\{/g) || []).length, ae = (H.match(/\\}/g) || []).length;\n return K += ne - ae, K < 0 && (K = 0), /* @__PURE__ */ i(\"div\", { className: \"leading-6\", children: Y.map((ee, z) => /* @__PURE__ */ i(\"span\", { className: k[ee.type] || \"text-gray-100\", children: ee.text }, z)) }, G);\n });\n }, [C, k, I]), D = U(() => l ? C.map((L, K) => /* @__PURE__ */ i(\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: K + 1\n },\n K\n )) : null, [l, C]), R = U(\n () => ({\n maxHeight: h && !f ? `${h}px` : f ? \"fit-content\" : void 0,\n overflow: h || f ? \"auto\" : \"visible\"\n }),\n [h, f]\n ), B = /* @__PURE__ */ E(\n \"div\",\n {\n id: u,\n ref: (L) => {\n x.current = L, typeof p == \"function\" ? p(L) : p && (p.current = L);\n },\n className: N(\n \"bg-gray-900 rounded-lg border border-gray-700 overflow-hidden motion-reduce:transition-none\",\n f && \"fixed inset-0 z-[9999] max-h-fit\",\n b\n ),\n \"data-language\": a,\n \"data-filename\": e,\n \"data-fullscreen\": f,\n role: \"region\",\n \"aria-label\": `Code block${e ? ` for ${e}` : \"\"} in ${a}`,\n \"aria-describedby\": l ? `${u}-description` : void 0,\n tabIndex: 0,\n onKeyDown: P,\n ...v,\n children: [\n l && /* @__PURE__ */ E(\"div\", { id: `${u}-description`, className: \"sr-only\", children: [\n \"Code block with line numbers. Use Cmd+C or Ctrl+C to copy code.\",\n t && \" Press F to toggle fullscreen.\"\n ] }),\n /* @__PURE__ */ i(\"div\", { \"aria-live\": \"polite\", \"aria-atomic\": \"true\", className: \"sr-only\", children: g && \"Code copied to clipboard\" }),\n !d && /* @__PURE__ */ E(\"div\", { className: \"flex items-center justify-between px-4 py-2 bg-gray-800 border-b border-gray-700\", children: [\n /* @__PURE__ */ E(\"div\", { className: \"flex items-center space-x-3\", children: [\n s && /* @__PURE__ */ E(\"div\", { className: \"flex space-x-2\", children: [\n /* @__PURE__ */ i(\"div\", { className: \"w-3 h-3 bg-red-500 rounded-full\" }),\n /* @__PURE__ */ i(\"div\", { className: \"w-3 h-3 bg-yellow-500 rounded-full\" }),\n /* @__PURE__ */ i(\"div\", { className: \"w-3 h-3 bg-green-500 rounded-full\" })\n ] }),\n e && /* @__PURE__ */ i(\"span\", { className: \"text-sm text-gray-300 font-medium\", children: e })\n ] }),\n Z(!0)\n ] }),\n /* @__PURE__ */ E(\"div\", { className: N(\"flex overflow-hidden\", d && \"relative\"), style: R, children: [\n d && Z(!1),\n /* @__PURE__ */ i(\"div\", { className: \"flex-1 overflow-x-auto\", children: /* @__PURE__ */ E(\"div\", { className: \"flex\", children: [\n l && /* @__PURE__ */ i(\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: D\n }\n ),\n /* @__PURE__ */ i(\"div\", { className: \"flex-1 p-4\", children: /* @__PURE__ */ i(\n \"pre\",\n {\n className: \"text-sm font-mono focus:outline-none\",\n role: \"code\",\n \"aria-label\": `${a} code content`,\n tabIndex: -1,\n children: /* @__PURE__ */ i(\"code\", { children: F })\n }\n ) })\n ] }) })\n ] })\n ]\n }\n );\n return /* @__PURE__ */ E(O, { children: [\n !f && B,\n f && fe(\n /* @__PURE__ */ E(O, { children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n className: \"fixed inset-0 bg-black z-[9998]\",\n onClick: () => y(!1),\n \"aria-hidden\": \"true\"\n }\n ),\n B\n ] }),\n document.body\n )\n ] });\n}\nfunction ue({ elementId: n, type: a, message: r }) {\n return S(() => {\n const o = document.getElementById(n);\n if (o) {\n if (!r && a === \"error\") {\n o.removeAttribute(\"data-error\");\n return;\n }\n if (!r && a === \"success\") {\n o.removeAttribute(\"data-success\");\n return;\n }\n return o.setAttribute(\"aria-describedby\", `${n}-${a}-message`), o.setAttribute(\"aria-invalid\", a === \"error\" ? \"true\" : \"false\"), a === \"error\" && o.setAttribute(\"data-error\", \"true\"), a === \"success\" && o.setAttribute(\"data-success\", \"true\"), () => {\n o.removeAttribute(\"aria-describedby\"), o.removeAttribute(\"aria-invalid\"), o.removeAttribute(\"data-error\"), o.removeAttribute(\"data-success\");\n };\n }\n }, [n, a, r]), r ? /* @__PURE__ */ E(\n \"small\",\n {\n className: N(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start\",\n a === \"error\" && \"text-destructive\",\n a === \"success\" && \"text-success\"\n ),\n role: \"status\",\n children: [\n a === \"error\" ? /* @__PURE__ */ i(qe, {}) : /* @__PURE__ */ i(Be, {}),\n /* @__PURE__ */ i(\"span\", { id: `${n}-${a}-message`, children: r })\n ]\n }\n ) : null;\n}\nconst ot = {\n base: \"\",\n default: \"ring ring-transparent focus:ring-primary-foreground not-disabled:data-error:ring-destructive not-disabled:data-success:ring-success\",\n underline: \"border-b border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\",\n outline: \"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\"\n}, st = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, ye = {\n variant: \"default\",\n rounded: \"none\"\n};\nfunction Xt({\n variant: n = ye.variant,\n rounded: a,\n displayOnlyMode: r = !1,\n errorMessage: o,\n successMessage: t,\n type: e = \"text\",\n className: s,\n ...l\n}) {\n const d = X(), [m, h] = T(!1);\n let c = a;\n n === \"outline\" && !a && (c = \"md\"), c = c || ye.rounded;\n const p = N(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all\",\n \"file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors\",\n !r && ot[n],\n !r && st[c],\n e === \"password\" && \"pr-10\",\n !r && \"px-2 py-1\",\n r && \"pointer-events-none\",\n s\n );\n return /* @__PURE__ */ E(\"div\", { className: N(r && \"cursor-text\"), style: { height: l.height, width: l.width }, children: [\n /* @__PURE__ */ E(\"div\", { className: N(e === \"password\" && \"relative\"), children: [\n /* @__PURE__ */ i(\n \"input\",\n {\n ...l,\n id: d,\n type: e === \"password\" && m ? \"text\" : e,\n \"aria-disabled\": l.disabled,\n readOnly: r,\n \"aria-readonly\": r || l[\"aria-readonly\"],\n \"data-error\": o ? !0 : void 0,\n \"data-success\": t ? !0 : void 0,\n className: p\n }\n ),\n e === \"password\" && /* @__PURE__ */ i(\n \"button\",\n {\n onClick: () => h(!m),\n className: \"absolute inset-y-0 right-0 px-2 hover:cursor-pointer\",\n \"aria-label\": \"Toggle password visibility\",\n \"data-state\": m ? \"visible\" : \"hidden\",\n children: m ? /* @__PURE__ */ i(We, { size: 20 }) : /* @__PURE__ */ i(Ke, { size: 20 })\n }\n )\n ] }),\n !r && /* @__PURE__ */ i(ue, { elementId: d, type: \"error\", message: o }),\n !r && /* @__PURE__ */ i(ue, { elementId: d, type: \"success\", message: t })\n ] });\n}\nfunction Ut({\n display: n = \"inline\",\n width: a = \"fit-content\",\n className: r = \"\",\n required: o,\n helpMessage: t,\n suffix: e,\n htmlFor: s,\n children: l,\n description: d,\n ...m\n}) {\n var v, f;\n const h = X(), c = (((v = t == null ? void 0 : t.trim()) == null ? void 0 : v.length) || 0) > 0, b = (((f = d == null ? void 0 : d.trim()) == null ? void 0 : f.length) || 0) > 0, u = c ? `${s ?? h}-help` : void 0, p = b ? `${s ?? h}-description` : void 0;\n return /* @__PURE__ */ E(\n \"div\",\n {\n style: { display: n === \"inline\" ? \"inline-block\" : \"block\", width: a },\n className: N(\"mb-0.5\", r),\n children: [\n /* @__PURE__ */ E(\"div\", { className: \"relative flex\", children: [\n /* @__PURE__ */ E(\"label\", { className: \"font-medium\", htmlFor: s, ...m, children: [\n l,\n o && /* @__PURE__ */ i(\"span\", { className: \"text-red-500 font-medium ml-1\", \"aria-label\": \"required\", children: \"*\" })\n ] }),\n c && /* @__PURE__ */ i(\n \"span\",\n {\n className: \"text-gray-500 ml-1 size-fit -translate-y-1/3\",\n \"aria-describedby\": u,\n \"aria-label\": \"Help information\",\n title: t,\n children: /* @__PURE__ */ i(Me, {})\n }\n ),\n c && /* @__PURE__ */ i(\"div\", { id: u, className: \"sr-only\", children: t }),\n e && /* @__PURE__ */ i(\"span\", { className: \"ml-1\", children: e })\n ] }),\n b && /* @__PURE__ */ i(\"small\", { id: p, className: \"block opacity-80 mt-0.5\", role: \"note\", children: d })\n ]\n }\n );\n}\nfunction it(n) {\n const [a, r] = T(!1), [o, t] = T(!1);\n return S(() => {\n n ? (t(!0), setTimeout(() => r(!0), 10)) : (r(!1), setTimeout(() => t(!1), 150));\n }, [n]), { show: a, shouldRender: o };\n}\nfunction lt(n, a) {\n S(() => {\n const r = (o) => {\n o.key === \"Escape\" && n && a();\n };\n return document.addEventListener(\"keydown\", r), n && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", r), document.body.style.overflow = \"auto\";\n };\n }, [n, a]);\n}\nfunction ct(n, a) {\n const r = W(null), o = A(() => {\n const t = document.getElementById(n);\n if (!t) return;\n const e = t.querySelectorAll('[data-modal-action=\"true\"]');\n if (e.length > 0) {\n e[0].focus();\n return;\n }\n const s = t.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const l = Array.from(s).filter((d) => !(d instanceof HTMLButtonElement && d.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (l.length > 0) {\n l[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n t.focus();\n }, [n]);\n S(() => (a && (r.current = document.activeElement, o()), () => {\n document.body.style.overflow = \"auto\", r.current instanceof HTMLElement && r.current.focus();\n }), [a, o]);\n}\nfunction Jt({\n id: n,\n isOpen: a,\n onClose: r,\n title: o,\n children: t,\n contentOnly: e = !1,\n className: s,\n overlayClassName: l,\n hideCloseButton: d = !1,\n actions: m = [],\n disableCloseOnOverlayClick: h = !1,\n ariaLabelledBy: c,\n ariaDescribedBy: b\n}) {\n const u = X(), p = n || `modal-${u}`, v = n ? `${n}-title` : `modal-title-${u}`, { show: f, shouldRender: y } = it(a);\n if (ct(p, y), lt(y, r), !y) return null;\n const x = () => o ? _.isValidElement(o) ? /* @__PURE__ */ i(\"div\", { className: \"mb-4\", children: o }) : /* @__PURE__ */ i(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: v, children: o }) : null, g = () => m.length === 0 ? null : /* @__PURE__ */ i(\"div\", { className: \"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3\", children: m.map((w, k) => {\n const { label: I, className: C, ...$ } = w;\n return /* @__PURE__ */ i(Je, { className: C, type: \"button\", ...$, \"data-modal-action\": \"true\", children: I }, k);\n }) });\n return /* @__PURE__ */ i(O, { children: fe(\n /* @__PURE__ */ i(\n \"div\",\n {\n \"aria-labelledby\": c ?? o ? v : void 0,\n \"aria-describedby\": b,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ E(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n className: V(\"fixed inset-0 bg-black/20 transition-all\", l),\n onClick: () => {\n h || r();\n }\n }\n ),\n e && /* @__PURE__ */ i(\"div\", { className: V(\"relative w-fit\", s), children: t }),\n !e && /* @__PURE__ */ E(\n \"div\",\n {\n id: p,\n tabIndex: -1,\n className: V(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75\",\n f ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n s\n ),\n children: [\n !d && /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: r,\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__ */ i(ge, { size: 18 })\n }\n ),\n x(),\n t,\n g()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nconst dt = {\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}, ut = {\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 Qt({\n page: n,\n pageCount: a = 5,\n maxVisiblePages: r = 5,\n showFirstLast: o = !0,\n onPageChange: t,\n size: e = \"md\",\n variant: s = \"link\",\n className: l,\n ref: d,\n buttonsClassName: m,\n ...h\n}) {\n const c = a === 1 / 0, u = A(() => {\n if (c) return [];\n const w = a, k = Math.min(r, w);\n if (w <= k)\n return Array.from({ length: w }, (P, j) => j + 1);\n const I = Math.floor(k / 2);\n let C = Math.max(1, n - I), $ = Math.min(w, C + k - 1);\n return $ - C + 1 < k && (C = Math.max(1, $ - k + 1), $ = Math.min(w, C + k - 1)), Array.from({ length: $ - C + 1 }, (P, j) => C + j);\n }, [c, r, n, a])(), p = n > 1, v = c || n < a, f = o && !c, y = o && !c, x = (w) => {\n w >= 1 && (c || w <= a) && t(w);\n }, g = A(() => {\n const w = V(\n \"flex items-center justify-center min-w-fit\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n ut[e],\n \"rounded-md\"\n );\n return V(w, dt[s], m);\n }, [s, e, m]);\n return /* @__PURE__ */ E(\n \"nav\",\n {\n ref: d,\n className: V(\"flex items-center justify-center gap-1\", l),\n role: \"navigation\",\n \"aria-label\": \"Pagination\",\n \"data-page\": n,\n \"data-page-count\": c ? \"infinite\" : a,\n ...h,\n children: [\n f && /* @__PURE__ */ E(\n \"button\",\n {\n onClick: () => x(1),\n className: g(),\n disabled: n === 1,\n \"aria-label\": \"Go to first page\",\n children: [\n /* @__PURE__ */ i(Fe, { size: e === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ i(\"span\", { className: \"ml-1\", children: \"First\" })\n ]\n }\n ),\n /* @__PURE__ */ E(\n \"button\",\n {\n onClick: () => x(n - 1),\n className: g(),\n disabled: !p,\n \"aria-label\": \"Go to previous page\",\n children: [\n /* @__PURE__ */ i(Ae, { size: e === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ i(\"span\", { className: \"ml-1\", children: \"Previous\" })\n ]\n }\n ),\n !c && u.map((w) => /* @__PURE__ */ i(\n \"button\",\n {\n onClick: () => x(w),\n className: V(g(), \"aspect-square\"),\n \"aria-label\": `Go to page ${w}`,\n \"aria-current\": w === n ? !0 : void 0,\n children: w\n },\n w\n )),\n /* @__PURE__ */ E(\n \"button\",\n {\n onClick: () => x(n + 1),\n className: g(),\n disabled: !v,\n \"aria-label\": \"Go to next page\",\n children: [\n /* @__PURE__ */ i(\"span\", { className: \"mr-1\", children: \"Next\" }),\n /* @__PURE__ */ i($e, { size: e === \"sm\" ? 12 : 15 })\n ]\n }\n ),\n y && /* @__PURE__ */ E(\n \"button\",\n {\n onClick: () => x(a),\n className: g(),\n disabled: n === a,\n \"aria-label\": \"Go to last page\",\n children: [\n /* @__PURE__ */ i(\"span\", { className: \"mr-1\", children: \"Last\" }),\n /* @__PURE__ */ i(He, { size: e === \"sm\" ? 12 : 15 })\n ]\n }\n )\n ]\n }\n );\n}\nfunction ft(n) {\n const [a, r] = T(!1), [o, t] = T(!1);\n return S(() => {\n n ? (t(!0), setTimeout(() => r(!0), 10)) : (r(!1), setTimeout(() => t(!1), 300));\n }, [n]), { show: a, shouldRender: o };\n}\nfunction mt(n, a) {\n S(() => {\n const r = (o) => {\n o.key === \"Escape\" && n && a();\n };\n return document.addEventListener(\"keydown\", r), n && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", r), document.body.style.overflow = \"auto\";\n };\n }, [n, a]);\n}\nfunction ht(n, a) {\n const r = W(null), o = A(() => {\n const t = document.getElementById(n);\n if (!t) return;\n const e = t.querySelectorAll('[data-panel-action=\"true\"]');\n if (e.length > 0) {\n e[0].focus();\n return;\n }\n const s = t.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const l = Array.from(s).filter((d) => !(d instanceof HTMLButtonElement && d.getAttribute(\"data-panel-close-button\") === \"true\"));\n if (l.length > 0) {\n l[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n t.focus();\n }, [n]);\n S(() => (a && (r.current = document.activeElement, o()), () => {\n document.body.style.overflow = \"auto\", r.current instanceof HTMLElement && r.current.focus();\n }), [a, o]);\n}\nconst bt = {\n size: {\n sm: \"max-w-sm\",\n md: \"max-w-md\",\n lg: \"max-w-lg\",\n xl: \"max-w-xl\",\n \"2xl\": \"max-w-2xl\",\n full: \"w-full\",\n screen: \"w-screen\"\n }\n};\nfunction Yt({\n ref: n,\n id: a,\n isOpen: r,\n onClose: o,\n title: t,\n children: e,\n footer: s,\n size: l = \"md\",\n className: d,\n overlayClassName: m,\n hideCloseButton: h = !1,\n disableCloseOnOverlayClick: c = !1,\n ariaLabelledBy: b,\n ariaDescribedBy: u\n}) {\n const p = X(), v = a || `panel-${p}`, f = a ? `${a}-title` : `panel-title-${p}`, { show: y, shouldRender: x } = ft(r);\n if (ht(v, x), mt(x, o), !x) return null;\n const g = () => t ? _.isValidElement(t) ? /* @__PURE__ */ i(\"div\", { children: t }) : /* @__PURE__ */ i(\"h2\", { className: \"text-2xl font-semibold\", id: f, children: t }) : null, w = () => {\n if (!s) return null;\n if (_.isValidElement(s)) {\n const k = s, I = k.props.className || \"\";\n return _.cloneElement(k, { className: V(\"px-6 py-4\", I) });\n }\n return /* @__PURE__ */ i(\"div\", { className: \"px-6 py-4\", children: s });\n };\n return /* @__PURE__ */ i(O, { children: fe(\n /* @__PURE__ */ E(\n \"div\",\n {\n \"aria-labelledby\": b ?? t ? f : void 0,\n \"aria-describedby\": u,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-hidden\",\n \"data-panel-open\": r,\n children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n className: V(\n \"fixed inset-0 bg-black/40 transition-opacity duration-300\",\n y ? \"opacity-100\" : \"opacity-0\",\n m\n ),\n onClick: () => {\n c || o();\n }\n }\n ),\n /* @__PURE__ */ i(\"div\", { className: \"fixed inset-y-0 right-0 flex max-w-full\", children: /* @__PURE__ */ i(\n \"div\",\n {\n id: v,\n ref: n,\n tabIndex: -1,\n className: V(\n \"relative h-full transform shadow-xl bg-popover transition-transform duration-300 ease-in-out\",\n l !== \"screen\" && \"border-l border-border\",\n bt.size[l],\n y ? \"translate-x-0\" : \"translate-x-full\",\n d\n ),\n \"data-panel-size\": l,\n children: /* @__PURE__ */ E(\"div\", { className: \"flex h-full flex-col\", children: [\n t && /* @__PURE__ */ i(\"div\", { className: \"px-6 pt-6\", children: g() }),\n !h && /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: o,\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__ */ i(ge, { size: 18 })\n }\n ),\n /* @__PURE__ */ i(\"div\", { className: V(\"flex-1 overflow-y-auto px-6 pb-6\", t ? \"pt-6\" : \"pt-10\"), children: e }),\n w()\n ] })\n }\n ) })\n ]\n }\n ),\n document.body\n ) });\n}\nfunction pt({ itemId: n, checked: a, onChange: r, name: o, disabled: t = !1, className: e = \"\" }) {\n const s = \"relative inline-flex items-center justify-center rounded-full\", l = () => {\n t || r();\n }, d = N(\n s,\n !a && \"hover:border-current/60\",\n !t && \"border-current cursor-pointer\",\n t && \"border-muted/60 cursor-not-allowed\",\n e\n );\n return /* @__PURE__ */ i(\n \"div\",\n {\n id: n,\n role: \"radio\",\n tabIndex: -1,\n \"aria-checked\": a,\n \"aria-disabled\": t,\n \"aria-description\": `Radio button for ${o}`,\n \"aria-labelledby\": `${n}-label`,\n onClick: l,\n className: d,\n style: {\n width: \"1em\",\n height: \"1em\",\n padding: \"0.1em\",\n borderWidth: \"0.06em\"\n },\n children: a && /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\"size-full aspect-square rounded-full\", t && \"bg-muted/60\", !t && \"bg-current\")\n }\n )\n }\n );\n}\nfunction be({\n value: n,\n children: a,\n className: r = \"\",\n isSelected: o = !1,\n onChange: t,\n disabled: e = !1,\n hideInput: s = !1,\n description: l,\n name: d\n}) {\n const h = `radio-${X()}-${n}`, c = () => {\n e || t == null || t(n);\n };\n return /* @__PURE__ */ E(\n \"div\",\n {\n title: l,\n className: N(\n \"relative flex items-center\",\n r,\n // Uses text color for borders\n s && `p-2 border-2 focus-within:border-dashed focus-within:${e ? \"border-current/50\" : \"border-current/80\"}`,\n s && !o && `border-transparent ${e ? \"\" : \"not-focus-within:hover:border-border/60\"}`,\n s && o && \"border-border\",\n e && \"opacity-60 cursor-not-allowed\"\n ),\n style: {\n gap: \"0.5em\"\n },\n children: [\n !s && /* @__PURE__ */ i(\n pt,\n {\n itemId: h,\n name: d || \"\",\n checked: o,\n onChange: c,\n disabled: e,\n className: N(s && \"\")\n }\n ),\n /* @__PURE__ */ i(\n \"div\",\n {\n id: s ? h : void 0,\n tabIndex: s ? -1 : void 0,\n role: s ? \"radio\" : void 0,\n onClick: s ? c : void 0,\n \"aria-checked\": s ? o ? \"true\" : \"false\" : void 0,\n \"aria-disabled\": s ? e : void 0,\n \"aria-description\": s ? l || `Radio button for ${d}` : void 0,\n \"aria-labelledby\": s ? `${h}-label` : void 0,\n className: N(s && \"size-full\", typeof a == \"object\" && \"grow focus:outline-none\"),\n children: /* @__PURE__ */ i(\n \"label\",\n {\n id: `${h}-label`,\n onClick: s ? void 0 : c,\n className: N(e && \"cursor-not-allowed\", !e && \"cursor-pointer\"),\n children: a\n }\n )\n }\n )\n ]\n }\n );\n}\nfunction vt(n, a) {\n const [r, o] = T(a), [t, e] = T(-1), [s, l] = T(!1), d = A((u, p) => {\n var y;\n const v = u[p];\n v.hasAttribute(\"disabled\") || v.getAttribute(\"aria-disabled\") === \"true\" || ((y = u[p]) == null || y.click(), e(p));\n }, []), m = A(\n (u, p) => {\n var f;\n if (u.preventDefault(), s || !p.length) return;\n const v = a !== -1 ? a : 0;\n (f = p[v]) == null || f.focus(), o(v), a !== -1 && d(p, v);\n },\n [a, s, d]\n ), h = A(\n (u) => {\n var y;\n if (!u.shiftKey)\n return;\n u.preventDefault();\n const p = Array.from(\n document.querySelectorAll(\n 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])'\n )\n ).filter((x) => !x.hasAttribute(\"disabled\") && x.tabIndex >= 0), v = p.findIndex((x) => x.id === n), f = v > 0 ? v - 1 : p.length - 1;\n (y = p[f]) == null || y.focus();\n },\n [n]\n ), c = A(\n (u, p) => {\n var g;\n if (!p.length) return;\n const v = u.target;\n if (!p.some((w) => w.id === v.id)) return;\n const y = r !== -1 ? r : 0;\n let x = y;\n switch (u.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n u.preventDefault(), x = y > 0 ? y - 1 : p.length - 1;\n break;\n case \"ArrowDown\":\n case \"ArrowRight\":\n u.preventDefault(), x = (y + 1) % p.length;\n break;\n // Select the option when the space key is pressed\n case \" \":\n u.preventDefault(), d(p, y);\n return;\n case \"Tab\":\n h(u);\n return;\n default:\n return;\n }\n (g = p[x]) == null || g.focus(), o(x), t !== -1 && d(p, x);\n },\n [r, t, h, d]\n ), b = A(() => {\n const u = document.querySelector(`[id=\"${n}\"][role=\"radiogroup\"]`);\n return u ? Array.from(u.querySelectorAll('[role=\"radio\"]')) : [];\n }, [n]);\n S(() => {\n const u = document.querySelector(`[id=\"${n}\"][role=\"radiogroup\"]`);\n if (!u) return;\n const p = b(), v = (g) => m(g, p), f = (g) => c(g, p), y = () => l(!0), x = () => l(!1);\n return document.addEventListener(\"keydown\", f), u.addEventListener(\"focus\", v), u.addEventListener(\"mousedown\", y), document.addEventListener(\"mouseup\", x), () => {\n document.removeEventListener(\"keydown\", f), u.removeEventListener(\"focus\", v), u.removeEventListener(\"mousedown\", y), document.removeEventListener(\"mouseup\", x);\n };\n }, [n, b, m, c]);\n}\nfunction Ot({\n options: n = [],\n value: a,\n onChange: r,\n id: o,\n children: t,\n className: e = \"\",\n childrenClassName: s = \"\",\n hideInputs: l = !1\n}) {\n const d = X(), m = o || `radio-group-${d}`;\n vt(\n m,\n n.findIndex((c) => c === a)\n );\n const h = U(() => n.reduce((c, b) => (typeof b == \"string\" ? c.some((u) => u.value === b) || c.push({ label: b, value: b }) : c.push(b), c), []), [n]);\n return /* @__PURE__ */ E(\"div\", { id: m, role: \"radiogroup\", tabIndex: 0, className: N(e, \"focus:outline-none\"), children: [\n h.length > 0 && h.map((c, b) => /* @__PURE__ */ i(\n be,\n {\n value: c.value,\n isSelected: a === c.value,\n onChange: r,\n name: m,\n disabled: c.disabled,\n description: c.description,\n hideInput: l,\n className: s,\n children: c.label\n },\n `${c.value}-${b}`\n )),\n h.length === 0 && t && _.Children.map(t, (c) => _.isValidElement(c) && c.type === be ? /* @__PURE__ */ i(\n be,\n {\n ...c.props,\n className: N(s, c.props.className),\n hideInput: c.props.hideInput || l,\n isSelected: a === c.props.value,\n onChange: r,\n name: m,\n children: c.props.children\n }\n ) : null)\n ] });\n}\nfunction gt(n) {\n const a = W(null), r = W(null), o = W(null), [t, e] = T(!1), [s, l] = T(!1), [d, m] = T({\n vertical: !1,\n horizontal: !1\n }), h = W(null), c = W(null), b = A(() => {\n const v = a.current;\n if (!v) return;\n const f = v.scrollHeight > v.clientHeight, y = v.scrollWidth > v.clientWidth;\n m({\n vertical: f,\n horizontal: y\n });\n }, []), u = A(() => {\n const v = a.current, f = r.current, y = o.current;\n if (v) {\n if (f && d.vertical) {\n const g = (d.horizontal ? v.clientHeight - n : v.clientHeight) / v.scrollHeight, w = Math.max(g * 100, 10), k = v.scrollHeight - v.clientHeight, I = k > 0 ? v.scrollTop / k : 0, C = 100 - w, $ = I * C;\n f.style.height = `${w}%`, f.style.top = `${$}%`, f.style.transform = \"none\";\n }\n if (y && d.horizontal) {\n const g = (d.vertical ? v.clientWidth - n : v.clientWidth) / v.scrollWidth, w = Math.max(g * 100, 10), k = v.scrollWidth - v.clientWidth, I = k > 0 ? v.scrollLeft / k : 0, C = 100 - w, $ = I * C;\n y.style.width = `${w}%`, y.style.left = `${$}%`, y.style.transform = \"none\";\n }\n }\n }, [d, n]), p = A(() => {\n h.current && clearTimeout(h.current), c.current && clearTimeout(c.current), e(!0), l(!1), u(), h.current = setTimeout(() => {\n l(!0), c.current = setTimeout(() => {\n e(!1), l(!1);\n }, 300);\n }, 1e3);\n }, [u]);\n return S(() => {\n const v = a.current;\n if (!v) return;\n b();\n const f = new ResizeObserver(b);\n f.observe(v);\n const y = new MutationObserver(b);\n return y.observe(v, {\n childList: !0,\n subtree: !0,\n attributes: !0\n }), () => {\n f.disconnect(), y.disconnect();\n };\n }, [b]), S(() => {\n u();\n }, [d, u]), S(() => () => {\n h.current && clearTimeout(h.current), c.current && clearTimeout(c.current);\n }, []), {\n viewportRef: a,\n verticalThumbRef: r,\n horizontalThumbRef: o,\n isScrolling: t,\n isFadingOut: s,\n scrollbarVisible: d,\n handleScroll: p\n };\n}\nfunction er({\n className: n,\n thumbClassName: a,\n viewportClassName: r,\n scrollbarClassName: o,\n scrollbarThickness: t = 10,\n children: e,\n id: s,\n ref: l,\n ...d\n}) {\n const { viewportRef: m, verticalThumbRef: h, horizontalThumbRef: c, isScrolling: b, isFadingOut: u, scrollbarVisible: p, handleScroll: v } = gt(t), f = V(\n \"relative flex-1 rounded-full bg-slate-400/60 hover:bg-slate-400/80 active:bg-slate-400\",\n a\n );\n return /* @__PURE__ */ E(\"div\", { ref: l, id: s, className: V(\"relative overflow-hidden\", n), \"data-scroll-area-root\": \"\", ...d, children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n ref: m,\n className: V(\n \"h-full w-full overflow-auto rounded-[inherit] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden\",\n r\n ),\n onScroll: v,\n \"data-scroll-area-viewport\": \"\",\n children: e\n }\n ),\n p.vertical && (b || u) && /* @__PURE__ */ i(\n \"div\",\n {\n className: V(\n \"touch-none select-none transition-all duration-300\",\n \"p-[1px]\",\n \"absolute right-0 top-0\",\n u ? \"opacity-0\" : \"opacity-100\",\n o\n ),\n \"data-scroll-area-scrollbar\": \"vertical\",\n \"data-state\": b ? \"visible\" : \"hidden\",\n style: {\n width: `${t}px`,\n height: p.horizontal ? `calc(100% - ${t}px)` : \"100%\"\n },\n children: /* @__PURE__ */ i(\n \"div\",\n {\n ref: h,\n className: V(\"absolute rounded-full\", f),\n \"data-scroll-area-thumb\": \"\",\n style: { height: \"20%\", top: \"0%\", width: \"100%\" }\n }\n )\n }\n ),\n p.horizontal && (b || u) && /* @__PURE__ */ i(\n \"div\",\n {\n className: V(\n \"touch-none select-none transition-all duration-300\",\n \"p-[1px]\",\n \"absolute bottom-0 left-0\",\n u ? \"opacity-0\" : \"opacity-100\",\n o\n ),\n \"data-scroll-area-scrollbar\": \"horizontal\",\n \"data-state\": b ? \"visible\" : \"hidden\",\n style: {\n height: `${t}px`,\n width: p.vertical ? `calc(100% - ${t}px)` : \"100%\"\n },\n children: /* @__PURE__ */ i(\n \"div\",\n {\n ref: c,\n className: V(\"absolute rounded-full\", f),\n \"data-scroll-area-thumb\": \"\",\n style: { width: \"20%\", left: \"0%\", height: \"100%\" }\n }\n )\n }\n ),\n p.vertical && p.horizontal && /* @__PURE__ */ i(\n \"div\",\n {\n className: V(\"bg-transparent\", \"absolute bottom-0 right-0\"),\n \"data-scroll-area-corner\": \"\",\n style: {\n height: `${t}px`,\n width: `${t}px`\n }\n }\n )\n ] });\n}\nfunction xt(n) {\n const [a, r] = T(!1), [o, t] = T(!1);\n return S(() => {\n n ? (t(!0), setTimeout(() => r(!0), 10)) : (r(!1), setTimeout(() => t(!1), 150));\n }, [n]), { show: a, shouldRender: o };\n}\nfunction yt({\n isOpen: n,\n setIsOpen: a,\n filteredOptions: r,\n highlightedIndex: o,\n setHighlightedIndex: t,\n onSelect: e,\n triggerRef: s\n}) {\n return { handleKeyDown: A(\n (d) => {\n var m;\n switch (d.key) {\n case \"ArrowDown\":\n if (d.preventDefault(), !n)\n a(!0);\n else {\n const h = o < r.length - 1 ? o + 1 : 0;\n let c = h;\n for (let b = 0; b < r.length; b++) {\n const u = (h + b) % r.length;\n if (!r[u].disabled) {\n c = u;\n break;\n }\n }\n t(c);\n }\n break;\n case \"ArrowUp\":\n if (d.preventDefault(), !n)\n a(!0);\n else {\n const h = o > 0 ? o - 1 : r.length - 1;\n let c = h;\n for (let b = 0; b < r.length; b++) {\n const u = (h - b + r.length) % r.length;\n if (!r[u].disabled) {\n c = u;\n break;\n }\n }\n t(c);\n }\n break;\n case \"Enter\":\n case \" \":\n if (d.preventDefault(), !n)\n a(!0);\n else if (o >= 0 && o < r.length) {\n const h = r[o];\n h.disabled || e(h);\n }\n break;\n case \"Escape\":\n d.preventDefault(), n && (a(!1), (m = s.current) == null || m.focus());\n break;\n case \"Tab\":\n n && a(!1);\n break;\n }\n },\n [n, a, r, o, t, e, s]\n ) };\n}\nfunction wt({\n isOpen: n,\n filteredOptions: a,\n selectedOption: r,\n shouldRender: o,\n optionsContainerRef: t\n}) {\n const [e, s] = T(-1), l = U(() => r ? a.findIndex((d) => d.value === r.value) : -1, [a, r]);\n return S(() => {\n n && a.length > 0 ? s(r && l >= 0 ? l : 0) : s(-1);\n }, [a, n, r, l]), S(() => {\n if (e >= 0 && t.current && o) {\n const d = () => {\n const m = t.current, h = m == null ? void 0 : m.querySelector(`[data-option-index=\"${e}\"]`);\n if (h) {\n const c = n && r && e === l ? \"auto\" : \"smooth\";\n h.scrollIntoView({\n behavior: c,\n block: \"nearest\"\n });\n }\n };\n n && o && r ? setTimeout(d, 10) : d();\n }\n }, [e, o, n, r, a, t, l]), { highlightedIndex: e, setHighlightedIndex: s };\n}\nconst we = {\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 tr({\n options: n,\n value: a,\n placeholder: r = \"Select an option...\",\n searchable: o = !1,\n disabled: t = !1,\n clearable: e = !1,\n size: s = \"md\",\n className: l,\n triggerClassName: d,\n dropdownClassName: m,\n id: h,\n ref: c,\n onChange: b,\n onSearch: u,\n searchPlaceholder: p = \"Search options...\"\n}) {\n const v = X(), y = `${h ?? v}-listbox`, x = (z) => `${y}-option-${z}`, [g, w] = T(!1), [k, I] = T(\"\"), C = W(null), $ = W(null), P = W(null), j = W(null), { show: Z, shouldRender: F } = xt(g), D = U(() => !o || !k ? n : n.filter(\n (z) => {\n var M;\n return z.text.toLowerCase().includes(k.toLowerCase()) || ((M = z.description) == null ? void 0 : M.toLowerCase().includes(k.toLowerCase()));\n }\n ), [n, o, k]), R = U(() => n.find((z) => z.value === a), [n, a]), { highlightedIndex: B, setHighlightedIndex: L } = wt({\n isOpen: g,\n filteredOptions: D,\n selectedOption: R,\n shouldRender: F,\n optionsContainerRef: j\n }), K = B >= 0 ? x(B) : void 0;\n S(() => {\n g && F && o && $.current && $.current.focus();\n }, [g, o, F]);\n const H = A(\n (z) => {\n var M;\n z.disabled || (b == null || b(z.value), w(!1), I(\"\"), (M = C.current) == null || M.focus());\n },\n [b]\n ), { handleKeyDown: G } = yt({\n isOpen: g,\n setIsOpen: w,\n filteredOptions: D,\n highlightedIndex: B,\n setHighlightedIndex: L,\n onSelect: H,\n triggerRef: C\n });\n S(() => {\n if (!g)\n return;\n const z = (M) => {\n var oe;\n P.current && !P.current.contains(M.target) && !((oe = C.current) != null && oe.contains(M.target)) && (w(!1), I(\"\"));\n };\n return document.addEventListener(\"mousedown\", z), () => document.removeEventListener(\"mousedown\", z);\n }, [g]);\n const Y = () => {\n t || (w(!g), g || (I(\"\"), L(-1)));\n }, ne = (z) => {\n z.disabled || (b == null || b(z.value), w(!1), I(\"\"));\n }, ae = (z) => {\n const M = z.target.value;\n I(M), u == null || u(M), L(-1);\n }, ee = (z) => {\n z.preventDefault(), z.stopPropagation(), b == null || b(\"\");\n };\n return /* @__PURE__ */ E(\n \"div\",\n {\n className: N(\"relative\", l),\n id: h,\n ref: c,\n \"data-select\": \"true\",\n \"data-value\": a,\n \"data-searchable\": o,\n \"data-disabled\": t,\n \"data-clearable\": e,\n children: [\n /* @__PURE__ */ E(\"div\", { className: \"relative\", children: [\n /* @__PURE__ */ E(\n \"button\",\n {\n ref: C,\n type: \"button\",\n className: N(\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 t && \"opacity-50 cursor-not-allowed hover:border-border\",\n g && \"border-primary ring-1 ring-primary\",\n we[s].trigger,\n d\n ),\n onClick: Y,\n onKeyDown: G,\n disabled: t,\n \"aria-disabled\": t,\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": g,\n \"aria-controls\": g ? y : void 0,\n \"aria-activedescendant\": g && !o ? K : void 0,\n \"aria-label\": R ? R.text : r,\n \"data-select-trigger\": \"true\",\n children: [\n /* @__PURE__ */ i(\"span\", { className: N(\"block truncate\", !R && \"opacity-70\"), children: R ? R.text : r }),\n /* @__PURE__ */ i(\"div\", { className: \"flex items-center ml-2\", children: /* @__PURE__ */ i(Te, { size: 16, className: N(\"transition-transform duration-200\", g && \"rotate-180\") }) })\n ]\n }\n ),\n e && R && /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: ee,\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__ */ i(ge, { size: 14, className: \"opacity-70 group-hover:opacity-100 transition-opacity\" })\n }\n )\n ] }),\n F && /* @__PURE__ */ E(\n \"div\",\n {\n ref: P,\n className: N(\n \"absolute z-50 w-full mt-1 bg-popover border border-border rounded-md shadow-lg transition-all duration-150\",\n Z ? \"opacity-100 translate-y-0\" : \"opacity-0 -translate-y-2\",\n m\n ),\n id: y,\n role: \"listbox\",\n \"data-select-content\": \"true\",\n children: [\n o && /* @__PURE__ */ i(\"div\", { className: \"border-b border-border\", children: /* @__PURE__ */ i(\n \"input\",\n {\n ref: $,\n type: \"text\",\n value: k,\n onChange: ae,\n onKeyDown: G,\n placeholder: p,\n className: \"w-full px-2 py-2 text-inherit focus:outline-none\",\n \"aria-autocomplete\": \"list\",\n \"aria-controls\": y,\n \"aria-activedescendant\": K,\n \"data-select-search\": \"true\"\n }\n ) }),\n /* @__PURE__ */ i(\"div\", { ref: j, className: \"max-h-60 overflow-auto\", children: D.length > 0 ? D.map((z, M) => /* @__PURE__ */ E(\n \"div\",\n {\n id: x(M),\n className: N(\n \"flex items-center cursor-pointer transition-colors\",\n \"hover:bg-accent/10 focus:bg-accent/10\",\n we[s].options,\n z.disabled && \"opacity-50 cursor-not-allowed\",\n M === B && \"bg-accent/20\",\n a === z.value && \"bg-accent/30\"\n ),\n onClick: () => ne(z),\n role: \"option\",\n \"aria-selected\": a === z.value,\n \"aria-disabled\": z.disabled,\n \"data-select-option\": \"true\",\n \"data-value\": z.value,\n \"data-highlighted\": M === B,\n \"data-option-index\": M,\n children: [\n /* @__PURE__ */ E(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ i(\"div\", { className: \"font-medium\", children: z.text }),\n z.description && /* @__PURE__ */ i(\"div\", { className: \"text-xs opacity-70 mt-0.5\", children: z.description })\n ] }),\n a === z.value && /* @__PURE__ */ i(pe, { size: 16, className: \"ml-2 text-primary flex-shrink-0\" })\n ]\n },\n z.value\n )) : /* @__PURE__ */ i(\"div\", { className: \"px-3 py-2 text-sm opacity-70 text-center\", children: o && k ? \"No results found\" : \"No options available\" }) })\n ]\n }\n )\n ]\n }\n );\n}\nconst Nt = {\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}, kt = {\n horizontal: \"w-full\",\n vertical: \"min-h-4 h-full\"\n};\nfunction rr({\n orientation: n = \"horizontal\",\n decorative: a = !1,\n thickness: r = \"thin\",\n className: o,\n ...t\n}) {\n const e = N(\n \"shrink-0 bg-border\",\n kt[n],\n Nt[r][n],\n o\n );\n return /* @__PURE__ */ i(\n \"div\",\n {\n ...t,\n className: e,\n role: a ? \"presentation\" : \"separator\",\n \"aria-orientation\": a ? void 0 : n,\n \"aria-hidden\": a,\n \"data-orientation\": n,\n \"data-thickness\": r\n }\n );\n}\nconst Ne = {\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 nr({\n shape: n = \"rectangle\",\n lineSpacing: a = \"sm\",\n className: r,\n lines: o = 1,\n animate: t = !0,\n ref: e,\n ...s\n}) {\n const l = N(\"bg-muted/70\", t && \"animate-pulse\", Ne.shape[n], r);\n return o > 1 ? /* @__PURE__ */ i(\n \"div\",\n {\n ref: e,\n className: Ne.lineSpacing[a],\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-container\",\n \"data-lines\": o,\n \"data-shape\": n,\n \"data-animate\": t,\n ...s,\n children: Array.from({ length: o }, (d, m) => /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\n l,\n // Make last line shorter for a more natural text appearance\n m === o - 1 && \"w-3/4\"\n ),\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-line\",\n \"data-line-index\": m\n },\n m\n ))\n }\n ) : /* @__PURE__ */ i(\n \"div\",\n {\n ref: e,\n className: l,\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton\",\n \"data-shape\": n,\n \"data-animate\": t,\n ...s\n }\n );\n}\nfunction ar({\n id: n,\n value: a,\n defaultValue: r = 0,\n onValueChange: o,\n min: t = 0,\n max: e = 100,\n step: s = 1,\n disabled: l = !1,\n trackClassName: d,\n rangeClassName: m,\n thumbClassName: h,\n className: c,\n ref: b,\n ariaLabel: u,\n ariaLabelledBy: p,\n ...v\n}) {\n const [f, y] = T(r), x = a !== void 0, g = x ? a : f, w = W(null), k = W(!1), I = W(0), C = A(\n (D) => {\n const R = Math.max(t, Math.min(e, D)), B = Math.round(R / s) * s;\n x || y(B), o == null || o(B);\n },\n [t, e, s, x, o]\n ), $ = A(\n (D, R = !1) => {\n var H;\n const B = (H = w.current) == null ? void 0 : H.getBoundingClientRect();\n if (!B) return g;\n let L = D.clientX;\n R && (L = L - I.current);\n const K = Math.max(0, Math.min(1, (L - B.left) / B.width));\n return t + (e - t) * K;\n },\n [t, e, g]\n ), P = A(\n (D) => {\n if (l || D.target !== D.currentTarget) return;\n const R = $(D);\n C(R);\n },\n [l, $, C]\n ), j = A(\n (D) => {\n var H;\n if (l) return;\n D.stopPropagation(), k.current = !0;\n const R = (H = w.current) == null ? void 0 : H.getBoundingClientRect(), B = D.currentTarget.getBoundingClientRect();\n if (R && B) {\n const G = B.left + B.width / 2;\n I.current = D.clientX - G;\n }\n D.currentTarget.setPointerCapture(D.pointerId);\n const L = (G) => {\n if (!k.current) return;\n const Y = $(G, !0);\n C(Y);\n }, K = (G) => {\n if (G.pointerId === D.pointerId) {\n k.current = !1, I.current = 0;\n try {\n D.currentTarget.releasePointerCapture(G.pointerId);\n } catch {\n }\n document.removeEventListener(\"pointermove\", L), document.removeEventListener(\"pointerup\", K);\n }\n };\n document.addEventListener(\"pointermove\", L), document.addEventListener(\"pointerup\", K);\n },\n [l, $, C]\n ), Z = A(\n (D) => {\n if (l) return;\n let R = g;\n switch (D.key) {\n case \"ArrowRight\":\n case \"ArrowUp\":\n R = g + s;\n break;\n case \"ArrowLeft\":\n case \"ArrowDown\":\n R = g - s;\n break;\n case \"Home\":\n R = t;\n break;\n case \"End\":\n R = e;\n break;\n case \"PageUp\":\n R = g + s * 10;\n break;\n case \"PageDown\":\n R = g - s * 10;\n break;\n default:\n return;\n }\n D.preventDefault(), C(R);\n },\n [l, g, s, t, e, C]\n ), F = e === t ? 0 : (g - t) / (e - t) * 100;\n return /* @__PURE__ */ i(\n \"div\",\n {\n id: n,\n ref: b,\n className: V(\n \"relative flex items-center w-full touch-none select-none\",\n l && \"opacity-50 cursor-not-allowed\",\n c\n ),\n \"data-disabled\": l,\n \"data-value\": g,\n \"data-min\": t,\n \"data-max\": e,\n \"data-step\": s,\n ...v,\n children: /* @__PURE__ */ E(\n \"div\",\n {\n ref: w,\n className: V(\n \"relative h-1.5 w-full rounded-full bg-muted cursor-pointer\",\n l && \"cursor-not-allowed\",\n d\n ),\n onPointerDown: P,\n children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n className: V(\n \"absolute h-full rounded-full pointer-events-none\",\n // pointer-events are disabled so that user interactions are handled by the track element, enabling correct slider behavior\n !k.current && \"transition-all\",\n m\n ),\n style: { width: `${F}%` }\n }\n ),\n /* @__PURE__ */ i(\n \"div\",\n {\n className: V(\n \"absolute size-5 -top-2 rounded-full shadow-md cursor-grab\",\n l && \"cursor-not-allowed\",\n !l && \"cursor-grab focus:outline-none focus:ring-2\",\n k.current ? \"cursor-grabbing scale-110\" : \"transition-all\",\n h\n ),\n style: { left: `calc(${F}% - 10px)` },\n tabIndex: l ? -1 : 0,\n role: \"slider\",\n \"aria-valuemin\": t,\n \"aria-valuemax\": e,\n \"aria-valuenow\": g,\n \"aria-label\": u,\n \"aria-labelledby\": p,\n \"aria-disabled\": l,\n onKeyDown: Z,\n onPointerDown: j\n }\n )\n ]\n }\n )\n }\n );\n}\nfunction or({ children: n, ref: a, ...r }) {\n if (De(n)) {\n let o = { ...r };\n return n.props && (o = { ...o, ...n.props }), Se(n, {\n ...o,\n ref: (t) => {\n typeof a == \"function\" ? a(t) : a && (a.current = t);\n }\n });\n }\n return ze(\"div\", { ...r, ref: a }, n);\n}\nconst Et = ({ defaultValue: n, value: a, onValueChange: r } = {}) => {\n const [o, t] = T(n || \"\"), e = a !== void 0, s = e ? a : o, l = A((d) => {\n e || t(d), r == null || r(d);\n }, [e, r]);\n return {\n value: s,\n onValueChange: l\n };\n};\nfunction sr({\n defaultValue: n,\n value: a,\n onValueChange: r,\n tabsWidth: o = \"fit\",\n variant: t = \"underline\",\n className: e,\n children: s,\n ref: l,\n id: d,\n triggersClassName: m,\n contentClassName: h\n}) {\n const { value: c, onValueChange: b } = Et({\n defaultValue: n,\n value: a,\n onValueChange: r\n }), u = {\n selectedValue: c,\n onValueChange: b,\n tabsWidth: o,\n variant: t,\n triggersClassName: m,\n contentClassName: h\n };\n return /* @__PURE__ */ i(Pe.Provider, { value: u, children: /* @__PURE__ */ i(\"div\", { id: d, ref: l, className: e, \"data-tabs-width\": o, \"data-variant\": t, children: s }) });\n}\nfunction ir({ value: n, className: a, children: r, ref: o }) {\n const { selectedValue: t, contentClassName: e } = ve(), s = t === n;\n return s ? /* @__PURE__ */ i(\n \"div\",\n {\n ref: o,\n role: \"tabpanel\",\n id: `tabs-content-${n}`,\n \"aria-labelledby\": `tabs-trigger-${n}`,\n \"data-state\": s ? \"active\" : \"inactive\",\n \"data-value\": n,\n className: N(\"mt-4 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2\", e, a),\n tabIndex: 0,\n children: r\n }\n ) : null;\n}\nconst ke = {\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}, Ct = {\n underline: \"border-b-2 border-transparent data-[state=active]:border-accent data-[state=active]:text-accent hover:text-accent-foreground\",\n pills: \"rounded-md data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30\",\n bordered: \"rounded data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30\"\n};\nfunction lr({ children: n, className: a, id: r, ref: o }) {\n const { tabsWidth: t, variant: e } = ve();\n return /* @__PURE__ */ i(\n \"div\",\n {\n id: r,\n ref: o,\n role: \"tablist\",\n className: N(\"flex\", ke.width[t], ke.variant[e], a),\n \"data-tabs-width\": t,\n \"data-variant\": e,\n children: n\n }\n );\n}\nfunction cr({ value: n, disabled: a = !1, className: r, children: o, onClick: t, id: e, ref: s }) {\n const { selectedValue: l, onValueChange: d, variant: m, triggersClassName: h } = ve(), c = l === n, b = (p) => {\n a || d(n), t == null || t(p);\n };\n return /* @__PURE__ */ i(\n \"button\",\n {\n id: e,\n ref: s,\n role: \"tab\",\n type: \"button\",\n \"aria-selected\": c,\n \"aria-controls\": `tabs-content-${n}`,\n \"data-state\": c ? \"active\" : \"inactive\",\n \"data-value\": n,\n disabled: a,\n className: N(\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 Ct[m],\n h,\n r\n ),\n onClick: b,\n children: o\n }\n );\n}\nfunction zt({ elementId: n, maxLength: a }) {\n const [r, o] = T(0);\n return S(() => {\n const t = document.getElementById(n);\n if (!t)\n return;\n const e = () => {\n const s = t.value.length;\n o(s);\n const l = s >= a;\n t.setAttribute(\"aria-describedby\", `${n}-character-count`), t.setAttribute(\"aria-invalid\", l ? \"true\" : \"false\"), l ? t.setAttribute(\"data-error\", \"true\") : t.removeAttribute(\"data-error\");\n };\n return e(), t.addEventListener(\"input\", e), t.setAttribute(\"maxlength\", String(a)), () => {\n t.removeEventListener(\"input\", e), t.removeAttribute(\"maxlength\"), t.removeAttribute(\"aria-describedby\"), t.removeAttribute(\"aria-invalid\"), t.removeAttribute(\"data-error\");\n };\n }, [n, a]), /* @__PURE__ */ i(\n \"small\",\n {\n className: N(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end\",\n r >= a && \"text-destructive\",\n r < a && \"text-current\"\n ),\n role: \"status\",\n children: /* @__PURE__ */ E(\"span\", { id: `${n}-character-count`, children: [\n r,\n \" / \",\n a,\n \" characters\"\n ] })\n }\n );\n}\nfunction Tt(n, a) {\n S(() => {\n const r = document.getElementById(n);\n if (!r)\n return;\n if (!a) {\n r.style.height = \"auto\";\n return;\n }\n const o = () => {\n r.style.height = \"auto\", r.style.height = `${r.scrollHeight}px`;\n };\n return o(), r.addEventListener(\"input\", o), r.addEventListener(\"resize\", o), window.addEventListener(\"resize\", o), () => {\n r.removeEventListener(\"input\", o), r.removeEventListener(\"resize\", o), window.removeEventListener(\"resize\", o);\n };\n }, [n, a]);\n}\nconst At = {\n base: \"\",\n \"left-line\": \"border-l border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\",\n outline: \"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\"\n}, $t = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, Ee = {\n variant: \"outline\",\n rounded: \"none\"\n};\nfunction dr({\n variant: n = Ee.variant,\n rounded: a,\n displayOnlyMode: r = !1,\n errorMessage: o,\n successMessage: t,\n hideResizeHandle: e = !1,\n autoExpand: s = !1,\n characterLimit: l = 0,\n className: d,\n ...m\n}) {\n const h = X();\n Tt(h, s || r);\n let c = a;\n n === \"outline\" && !a && (c = \"md\"), c = c || Ee.rounded;\n let b = e;\n (r || n === \"left-line\" && !e) && (b = !0);\n const p = N(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all\",\n !r && At[n],\n !r && $t[c],\n !r && \"px-2 py-1\",\n r && \"pointer-events-none\",\n b && \"no-resize-handle\",\n d\n );\n return /* @__PURE__ */ E(\"div\", { className: N(\"-space-y-1.5\", r && \"cursor-text\"), children: [\n /* @__PURE__ */ i(\n \"textarea\",\n {\n ...m,\n id: h,\n \"aria-disabled\": m.disabled,\n readOnly: r,\n \"aria-readonly\": r || m[\"aria-readonly\"],\n style: {\n resize: s ? \"none\" : void 0\n },\n className: p\n }\n ),\n l > 0 && /* @__PURE__ */ i(zt, { elementId: h, maxLength: l }),\n !r && /* @__PURE__ */ i(ue, { elementId: h, type: \"error\", message: o }),\n !r && /* @__PURE__ */ i(ue, { elementId: h, type: \"success\", message: t })\n ] });\n}\nconst It = {\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}, Dt = {\n default: {\n unchecked: \"bg-muted\",\n checked: \"bg-primary\"\n },\n success: {\n unchecked: \"bg-muted\",\n checked: \"bg-success\"\n },\n destructive: {\n unchecked: \"bg-muted\",\n checked: \"bg-destructive\"\n }\n}, Ce = {\n variant: \"default\",\n size: \"md\"\n};\nfunction ur({\n ref: n,\n id: a,\n size: r = Ce.size,\n variant: o = Ce.variant,\n checked: t,\n onCheckedChange: e,\n disabled: s = !1,\n className: l,\n thumbClassName: d,\n backgroundClassNames: m,\n ...h\n}) {\n const c = X(), b = U(() => a || `toggle-${c}`, [a, c]), [u, p] = T(t);\n S(() => {\n p(t);\n }, [t]);\n const v = () => {\n if (!s) {\n const k = !u;\n t === void 0 && p(k), e == null || e(k);\n }\n }, f = (k) => {\n (k.key === \" \" || k.key === \"Enter\") && (k.preventDefault(), v());\n }, y = It[r], x = Dt[o], g = N(\n // Base styles\n \"relative inline-flex items-center rounded-full transition-all duration-200 ease-in-out\",\n \"focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2\",\n // Size\n y.container,\n // Variant and state\n u ? (m == null ? void 0 : m.checked) || x.checked : (m == null ? void 0 : m.unchecked) || x.unchecked,\n // Disabled state\n s && \"opacity-50 cursor-not-allowed\",\n !s && \"cursor-pointer\",\n l\n ), w = N(\n // Base thumb styles\n \"absolute left-0.5 top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out\",\n // Size\n y.thumb,\n // Position based on state\n u && y.translate,\n d\n );\n return /* @__PURE__ */ E(\n \"button\",\n {\n ref: n,\n id: b,\n type: \"button\",\n role: \"switch\",\n tabIndex: 0,\n \"aria-checked\": u,\n \"aria-disabled\": s,\n disabled: s,\n onClick: v,\n onKeyDown: f,\n className: g,\n ...h,\n children: [\n /* @__PURE__ */ i(\"span\", { className: w }),\n /* @__PURE__ */ i(\"span\", { className: \"sr-only\", children: u ? \"Enabled\" : \"Disabled\" })\n ]\n }\n );\n}\nconst ce = 8, de = 4, J = 6;\nfunction St(n) {\n return { calculatePosition: A(\n (r, o) => {\n const t = r.getBoundingClientRect(), e = o.getBoundingClientRect(), s = {\n width: window.innerWidth,\n height: window.innerHeight\n }, l = (b, u, p, v) => b < 0 || u < 0 || b + p > s.width || u + v > s.height, d = {\n top: {\n x: t.left + t.width / 2 - e.width / 2,\n y: t.top - e.height - de,\n arrow: {\n x: e.width / 2 - J,\n y: e.height\n }\n },\n bottom: {\n x: t.left + t.width / 2 - e.width / 2,\n y: t.bottom + de,\n arrow: {\n x: e.width / 2 - J,\n y: -6\n }\n },\n left: {\n x: t.left - e.width - de,\n y: t.top + t.height / 2 - e.height / 2,\n arrow: {\n x: e.width,\n y: e.height / 2 - J\n }\n },\n right: {\n x: t.right + de,\n y: t.top + t.height / 2 - e.height / 2,\n arrow: {\n x: -6,\n y: e.height / 2 - J\n }\n }\n };\n let m = n, h = d[n];\n if (l(h.x, h.y, e.width, e.height)) {\n const b = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\"\n }, u = d[b[n]];\n if (!l(u.x, u.y, e.width, e.height))\n m = b[n], h = u;\n else {\n const p = [\"top\", \"bottom\", \"left\", \"right\"].filter(\n (v) => v !== n && v !== b[n]\n );\n for (const v of p) {\n const f = d[v];\n if (!l(f.x, f.y, e.width, e.height)) {\n m = v, h = f;\n break;\n }\n }\n }\n }\n h.x = Math.max(\n ce,\n Math.min(h.x, s.width - e.width - ce)\n ), h.y = Math.max(\n ce,\n Math.min(h.y, s.height - e.height - ce)\n );\n const c = {\n x: t.left + t.width / 2,\n y: t.top + t.height / 2\n };\n return m === \"top\" || m === \"bottom\" ? h.arrow.x = Math.max(\n J,\n Math.min(c.x - h.x - J, e.width - J * 2)\n ) : h.arrow.y = Math.max(\n J,\n Math.min(c.y - h.y - J, e.height - J * 2)\n ), {\n ...h,\n placement: m\n };\n },\n [n]\n ) };\n}\nfunction Rt(n, a, r) {\n const o = W(null), t = W(null), e = A(() => {\n if (!o.current || !t.current) return;\n const s = n(o.current, t.current);\n r(s);\n }, [n, r]);\n return S(() => {\n if (!a) return;\n const s = () => e();\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, [a, e]), {\n triggerRef: o,\n tooltipRef: t,\n updatePosition: e\n };\n}\nfunction Lt(n, a, r, o, t, e, s, l, d) {\n const m = W(null), h = A(() => {\n n || (m.current && clearTimeout(m.current), m.current = window.setTimeout(() => {\n r(!0), requestAnimationFrame(() => {\n t(), o(!0);\n });\n }, a));\n }, [n, a, r, t, o]), c = A(\n (b = !1) => {\n if (m.current && clearTimeout(m.current), b) {\n o(!1), setTimeout(() => r(!1), 150);\n return;\n }\n m.current = window.setTimeout(() => {\n o(!1), setTimeout(() => r(!1), 150);\n }, 100);\n },\n [o, r]\n );\n return S(() => {\n !e && !s && !l && d && c();\n }, [e, s, l, d, c]), S(() => () => {\n m.current && clearTimeout(m.current);\n }, []), {\n showTooltip: h,\n hideTooltip: c,\n timeoutRef: m\n };\n}\nfunction fr({\n id: n,\n children: a,\n message: r,\n placement: o = \"top\",\n disabled: t = !1,\n delay: e = 200,\n className: s\n}) {\n const [l, d] = T(!1), [m, h] = T(!1), [c, b] = T(null), [u, p] = T(!1), [v, f] = T(!1), [y, x] = T(!1), { calculatePosition: g } = St(o), { triggerRef: w, tooltipRef: k, updatePosition: I } = Rt(g, m, b), { showTooltip: C, hideTooltip: $, timeoutRef: P } = Lt(\n t,\n e,\n h,\n d,\n I,\n u,\n v,\n y,\n l\n ), j = X(), Z = n ?? j;\n return /* @__PURE__ */ E(O, { children: [\n _.cloneElement(a, {\n ref: (F) => {\n w.current = F;\n },\n onMouseEnter: () => {\n p(!0), C();\n },\n onMouseLeave: () => {\n p(!1);\n },\n onFocus: () => {\n x(!0), C();\n },\n onBlur: () => {\n x(!1), $(!0);\n },\n onKeyDown: (F) => {\n F.key === \"Escape\" && $(!0);\n },\n \"aria-describedby\": t ? void 0 : Z\n }),\n m && fe(\n /* @__PURE__ */ i(\n \"div\",\n {\n ref: k,\n id: Z,\n role: \"tooltip\",\n className: N(\n \"fixed z-50 px-2 py-1 text-sm rounded shadow-lg bg-popover pointer-events-auto transition-all duration-150 ease-out\",\n l ? \"opacity-100\" : \"opacity-0\",\n s\n ),\n style: c ? { left: c.x, top: c.y } : { opacity: 0 },\n onMouseEnter: () => {\n f(!0), P.current && clearTimeout(P.current);\n },\n onMouseLeave: () => {\n f(!1);\n },\n children: r\n }\n ),\n document.body\n )\n ] });\n}\nexport {\n Pt as Accordion,\n me as AccordionItem,\n br as ActionModal,\n Je as Button,\n Gt as Carousel,\n qt as Checkbox,\n Zt as Clickable,\n _t as CodeBlock,\n Xt as Input,\n Ut as Label,\n Ze as LoadingDots,\n Jt as Modal,\n Qt as Pagination,\n Yt as Panel,\n Ot as RadioGroup,\n be as RadioGroupItem,\n pt as RadioInput,\n er as ScrollArea,\n tr as Select,\n rr as Separator,\n nr as Skeleton,\n ar as Slider,\n or as Slot,\n sr as Tabs,\n ir as TabsContent,\n lr as TabsList,\n cr as TabsTrigger,\n dr as Textarea,\n pr as Toast,\n ur as Toggle,\n fr as Tooltip\n};\n//# sourceMappingURL=components.esm.js.map\n","import { Modal, ModalProps } from '@moondreamsdev/dreamer-ui/components';\nimport React, { useMemo } from 'react';\n\ninterface BaseActionModalProps extends Omit<ModalProps, 'children' | 'actions'> {\n message: React.ReactNode;\n destructive?: boolean;\n}\n\ninterface AlertModalProps extends BaseActionModalProps {\n type: 'alert';\n confirmText?: string;\n onConfirm?: () => void;\n // Cancel-related props are not allowed for alerts\n cancelText?: never;\n}\n\ninterface ConfirmModalProps extends BaseActionModalProps {\n type: 'confirm';\n confirmText?: string;\n cancelText?: string;\n onConfirm?: () => void;\n}\n\nexport type ActionModalProps = AlertModalProps | ConfirmModalProps;\n\nexport function ActionModal({\n type,\n message,\n cancelText,\n confirmText,\n onConfirm,\n onClose,\n destructive = false,\n title,\n ...modalProps\n}: ActionModalProps) {\n const defaultTexts = useMemo(() => {\n if (type === 'confirm') {\n return {\n confirm: confirmText || 'Confirm',\n cancel: cancelText || 'Cancel',\n defaultTitle: title || 'Confirm Action',\n };\n }\n return {\n confirm: confirmText || 'OK',\n cancel: null,\n defaultTitle: title || 'Alert',\n };\n }, [type, confirmText, title, cancelText]);\n\n const actions: ModalProps['actions'] = useMemo(\n () => [\n ...(defaultTexts.cancel\n ? [\n {\n label: defaultTexts.cancel,\n variant: 'secondary' as const,\n onClick: onClose,\n },\n ]\n : []),\n {\n label: defaultTexts.confirm,\n variant: destructive ? 'destructive' : 'primary',\n onClick: () => {\n onConfirm?.();\n onClose();\n },\n },\n ],\n [defaultTexts, destructive, onConfirm, onClose]\n );\n\n return (\n <Modal\n {...modalProps}\n title={title || defaultTexts.defaultTitle}\n onClose={onClose}\n actions={actions}\n disableCloseOnOverlayClick={type === 'confirm'}\n hideCloseButton={type === 'confirm'}\n >\n {typeof message === 'string' ? <p className='text-sm'>{message}</p> : message}\n </Modal>\n );\n}\n","import { createContext, useContext } from 'react';\nimport { TabsVariant, TabsWidth } from './variants';\n\nexport interface TabsContextValue {\n selectedValue: string;\n onValueChange: (value: string) => void;\n tabsWidth: TabsWidth;\n variant: TabsVariant;\n triggersClassName?: string;\n contentClassName?: string;\n}\n\nexport const TabsContext = createContext<TabsContextValue | null>(null);\n\nexport const useTabsContext = () => {\n const context = useContext(TabsContext);\n if (!context) {\n throw new Error('Tabs components must be used within a Tabs component');\n }\n return context;\n};\n","import { ReactNode, useCallback, useEffect, useState } from 'react';\nimport { CrossCircled, ExclamationTriangle, InfoCircled, X } from '../../symbols';\nimport { join } from '../../utils';\nexport type ToastType = 'info' | 'warning' | 'error';\n\nexport interface ToastAction {\n label: string;\n onClick: () => void;\n}\n\n/** Data for a toast notification */\nexport interface ToastData {\n id: string;\n title: string;\n description?: string;\n type?: ToastType;\n action?: ToastAction;\n duration?: number;\n onRemove?: (id: string) => void;\n}\n\ninterface ToastProps extends ToastData {\n customTypes?: Record<string, { className: string; icon?: ReactNode }>;\n customComponent?: React.ComponentType<ToastData>;\n}\n\nconst defaultTypeStyles: Record<ToastType, { className: string; icon: ReactNode }> = {\n info: {\n className: 'bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100',\n icon: <InfoCircled size={20} />,\n },\n warning: {\n className:\n 'bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100',\n icon: <ExclamationTriangle size={20} />,\n },\n error: {\n className: 'bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100',\n icon: <CrossCircled size={20} />,\n },\n};\n\nexport function Toast({\n id,\n title,\n description,\n type = 'info',\n action,\n duration = 5000,\n onRemove,\n customTypes,\n customComponent: CustomComponent,\n}: ToastProps) {\n const [isExiting, setIsExiting] = useState(false);\n\n const handleRemove = useCallback(() => {\n setIsExiting(true);\n setTimeout(() => {\n onRemove?.(id);\n }, 150); // Match animation duration\n }, [id, onRemove]);\n\n useEffect(() => {\n if (duration > 0) {\n const timer = setTimeout(() => {\n handleRemove();\n }, duration);\n\n return () => clearTimeout(timer);\n }\n }, [duration, id, onRemove, handleRemove]);\n\n if (CustomComponent) {\n return (\n <CustomComponent\n id={id}\n title={title}\n description={description}\n type={type}\n action={action}\n duration={duration}\n onRemove={onRemove}\n />\n );\n }\n\n // Check custom types first, then fall back to default\n const typeStyle = customTypes?.[type] || defaultTypeStyles[type as ToastType] || defaultTypeStyles.info;\n\n return (\n <div\n role={type === 'error' ? 'alert' : 'status'}\n aria-live={type === 'error' ? undefined : 'polite'}\n className={join(\n 'relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out',\n action && 'pb-3',\n typeStyle.className,\n isExiting ? 'opacity-0 translate-x-full' : 'opacity-100 translate-x-0'\n )}\n >\n {/* Icon */}\n <div className='flex-shrink-0 mr-3'>{typeStyle.icon}</div>\n\n {/* Content */}\n <div className='flex-grow min-w-0'>\n <div className='font-medium text-sm leading-5'>{title}</div>\n {description && <div className='mt-1 text-sm opacity-90 leading-5'>{description}</div>}\n {action && (\n <div className='mt-1.5'>\n <button\n onClick={action.onClick}\n className='text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer'\n >\n {action.label}\n </button>\n </div>\n )}\n </div>\n\n {/* Close button */}\n <button\n onClick={handleRemove}\n className='flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0'\n >\n <X size={16} />\n </button>\n </div>\n );\n}\n"],"names":["n","t","s","h","C","i","e","N","o","Ze","a","T","S","r","_e","Xe","Ue","he","Je","l","m","c","E","it","lt","ct","W","A","Jt","b","u","X","p","v","f","x","_","g","w","k","I","$","O","fe","V","ge","ActionModal","type","message","cancelText","confirmText","onConfirm","onClose","destructive","title","modalProps","defaultTexts","useMemo","actions","jsx","Modal","TabsContext","createContext","useTabsContext","context","useContext","defaultTypeStyles","InfoCircled","ExclamationTriangle","CrossCircled","Toast","id","description","action","duration","onRemove","customTypes","CustomComponent","isExiting","setIsExiting","useState","handleRemove","useCallback","useEffect","timer","typeStyle","jsxs","join"],"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,OAAO,IAAI,gBAAgB,WAAW,IAAI,UAAU,GAAGC,EAAC,GAAI;AACrF,SAAuBC,gBAAAA;AAAAA,IACrB;AAAA,IACA;AAAA,MACE,GAA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C,gBAAA3B,EAAA,OAAA,EAAI,WAAU,iCAAiC,UAAML,GAAA;AAAA,UACrDkB,KAAe,gBAAAb,EAAC,OAAI,EAAA,WAAU,qCAAqC,UAAYa,GAAA;AAAA,UAC/EC,KACC,gBAAAd,EAAC,OAAI,EAAA,WAAU,UACb,UAAA,gBAAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAASc,EAAO;AAAA,cAChB,WAAU;AAAA,cAET,UAAOA,EAAA;AAAA,YAAA;AAAA,UAAA,EAEZ,CAAA;AAAA,QAAA,GAEJ;AAAA,QAGA,gBAAAd;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,SAASsB;AAAA,YACT,WAAU;AAAA,YAEV,UAAA,gBAAAtB,EAAC5B,GAAE,EAAA,MAAM,GAAI,CAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACf;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),e=require("react"),S=require("react-dom"),g=require("./X-CgjeP2OI.cjs"),B=require("./join-BVMUUvyP.cjs");function v(...t){return t.filter(l=>typeof l=="string"&&l).join(" ").trim()||void 0}function M({size:t=15,color:l="currentColor",className:a="inline",...n}){return r.jsx("svg",{...n,width:t,height:t,className:a,viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:l,fillRule:"evenodd",clipRule:"evenodd"})})}function y(...t){return t.filter(l=>typeof l=="string"&&l).join(" ").trim()||void 0}e.createContext(void 0);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(void 0);e.createContext(void 0);e.createContext(null);e.createContext(void 0);e.createContext(void 0);e.createContext(null);function O(){const[t,l]=e.useState(0);return e.useEffect(()=>{const a=setInterval(()=>{l(n=>(n+1)%3)},500);return()=>clearInterval(a)},[]),r.jsx("div",{className:"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle",children:[0,1,2].map(a=>r.jsx("div",{className:v("rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",t===a&&"transform -translate-y-1")},a))})}const $={base:"",primary:"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",tertiary:"text-primary hover:text-primary-foreground disabled:text-muted",outline:"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",link:"underline-offset-4 hover:underline disabled:underline disabled:text-muted",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"},X={stripped:"",fitted:"size-fit",sm:"px-2 py-1 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg",icon:"p-1 w-fit aspect-square",full:"p-2 w-full"},D={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},p={variant:"primary",size:"md",rounded:"md"};function H({variant:t=p.variant,size:l,rounded:a=p.rounded,loading:n,linkTo:s,linkProps:i,type:o="button",className:c,...d}){let u;t==="link"&&!l?u="fitted":u=l||p.size;const m=v("appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",$[t],X[u],D[a],n&&"relative pointer-events-none",s&&"relative",c);return r.jsxs("button",{...d,role:s?"link":d.role,"aria-label":d["aria-label"]||(i==null?void 0:i["aria-label"]),"aria-description":d["aria-description"]||(i==null?void 0:i["aria-description"]),"aria-disabled":d.disabled||n,"aria-busy":n,type:o,className:m,children:[n&&r.jsx(O,{}),r.jsx("span",{className:v(n&&"invisible"),children:d.children}),s&&!d.disabled&&r.jsx("a",{...i,"aria-hidden":!0,href:s,rel:(i==null?void 0:i.rel)||"noreferrer",className:"absolute inset-0"})]})}function J(t){const[l,a]=e.useState(!1),[n,s]=e.useState(!1);return e.useEffect(()=>{t?(s(!0),setTimeout(()=>a(!0),10)):(a(!1),setTimeout(()=>s(!1),150))},[t]),{show:l,shouldRender:n}}function P(t,l){e.useEffect(()=>{const a=n=>{n.key==="Escape"&&t&&l()};return document.addEventListener("keydown",a),t&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",a),document.body.style.overflow="auto"}},[t,l])}function Z(t,l){const a=e.useRef(null),n=e.useCallback(()=>{const s=document.getElementById(t);if(!s)return;const i=s.querySelectorAll('[data-modal-action="true"]');if(i.length>0){i[0].focus();return}const o=s.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(o.length>0){const c=Array.from(o).filter(d=>!(d instanceof HTMLButtonElement&&d.getAttribute("data-modal-close-button")==="true"));if(c.length>0){c[0].focus();return}o[0].focus();return}s.focus()},[t]);e.useEffect(()=>(l&&(a.current=document.activeElement,n()),()=>{document.body.style.overflow="auto",a.current instanceof HTMLElement&&a.current.focus()}),[l,n])}function _({id:t,isOpen:l,onClose:a,title:n,children:s,contentOnly:i=!1,className:o,overlayClassName:c,hideCloseButton:d=!1,actions:u=[],disableCloseOnOverlayClick:m=!1,ariaLabelledBy:f,ariaDescribedBy:x}){const b=e.useId(),C=t||`modal-${b}`,j=t?`${t}-title`:`modal-title-${b}`,{show:k,shouldRender:h}=J(l);if(Z(C,h),P(h,a),!h)return null;const E=()=>n?e.isValidElement(n)?r.jsx("div",{className:"mb-4",children:n}):r.jsx("h2",{className:"mb-4 text-xl font-semibold",id:j,children:n}):null,T=()=>u.length===0?null:r.jsx("div",{className:"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3",children:u.map((L,z)=>{const{label:q,className:A,...I}=L;return r.jsx(H,{className:A,type:"button",...I,"data-modal-action":"true",children:q},z)})});return r.jsx(r.Fragment,{children:S.createPortal(r.jsx("div",{"aria-labelledby":f??n?j:void 0,"aria-describedby":x,role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[100] overflow-y-auto",children:r.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4",children:[r.jsx("div",{className:y("fixed inset-0 bg-black/20 transition-all",c),onClick:()=>{m||a()}}),i&&r.jsx("div",{className:y("relative w-fit",o),children:s}),!i&&r.jsxs("div",{id:C,tabIndex:-1,className:y("relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75",k?"opacity-100 scale-100":"opacity-0 scale-90",o),children:[!d&&r.jsx("button",{type:"button",onClick:a,"data-modal-close-button":"true",className:"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",children:r.jsx(M,{size:18})}),E(),s,T()]})]})}),document.body)})}function F({type:t,message:l,cancelText:a,confirmText:n,onConfirm:s,onClose:i,destructive:o=!1,title:c,...d}){const u=e.useMemo(()=>t==="confirm"?{confirm:n||"Confirm",cancel:a||"Cancel",defaultTitle:c||"Confirm Action"}:{confirm:n||"OK",cancel:null,defaultTitle:c||"Alert"},[t,n,c,a]),m=e.useMemo(()=>[...u.cancel?[{label:u.cancel,variant:"secondary",onClick:i}]:[],{label:u.confirm,variant:o?"destructive":"primary",onClick:()=>{s==null||s(),i()}}],[u,o,s,i]);return r.jsx(_,{...d,title:c||u.defaultTitle,onClose:i,actions:m,disableCloseOnOverlayClick:t==="confirm",hideCloseButton:t==="confirm",children:typeof l=="string"?r.jsx("p",{className:"text-sm",children:l}):l})}const N=e.createContext(null),K=()=>{const t=e.useContext(N);if(!t)throw new Error("Tabs components must be used within a Tabs component");return t},w={info:{className:"bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",icon:r.jsx(g.InfoCircled,{size:20})},warning:{className:"bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",icon:r.jsx(g.ExclamationTriangle,{size:20})},error:{className:"bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",icon:r.jsx(g.CrossCircled,{size:20})}};function U({id:t,title:l,description:a,type:n="info",action:s,duration:i=5e3,onRemove:o,customTypes:c,customComponent:d}){const[u,m]=e.useState(!1),f=e.useCallback(()=>{m(!0),setTimeout(()=>{o==null||o(t)},150)},[t,o]);if(e.useEffect(()=>{if(i>0){const b=setTimeout(()=>{f()},i);return()=>clearTimeout(b)}},[i,t,o,f]),d)return r.jsx(d,{id:t,title:l,description:a,type:n,action:s,duration:i,onRemove:o});const x=(c==null?void 0:c[n])||w[n]||w.info;return r.jsxs("div",{role:n==="error"?"alert":"status","aria-live":n==="error"?void 0:"polite",className:B.join("relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out",s&&"pb-3",x.className,u?"opacity-0 translate-x-full":"opacity-100 translate-x-0"),children:[r.jsx("div",{className:"flex-shrink-0 mr-3",children:x.icon}),r.jsxs("div",{className:"flex-grow min-w-0",children:[r.jsx("div",{className:"font-medium text-sm leading-5",children:l}),a&&r.jsx("div",{className:"mt-1 text-sm opacity-90 leading-5",children:a}),s&&r.jsx("div",{className:"mt-1.5",children:r.jsx("button",{onClick:s.onClick,className:"text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer",children:s.label})})]}),r.jsx("button",{onClick:f,className:"flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0",children:r.jsx(g.X,{size:16})})]})}exports.ActionModal=F;exports.TabsContext=N;exports.Toast=U;exports.n=v;exports.useTabsContext=K;
|
|
2
|
+
//# sourceMappingURL=Toast-yniIAykN.cjs.map
|