@moondreamsdev/dreamer-ui 1.7.10-test.53 → 1.7.10-test.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
1
  import { jsx as t, Fragment as q, jsxs as b } from "react/jsx-runtime";
2
- import H, { createContext as e, useId as P, useState as h, useEffect as g, useRef as D, useCallback as L, useMemo as E, useContext as F } from "react";
2
+ import D, { createContext as e, useId as P, useState as h, useEffect as g, useRef as H, useCallback as z, useMemo as T, useContext as F } from "react";
3
3
  import { createPortal as K } from "react-dom";
4
- import { X as V, C as X, E as Y, I as Z } from "./X-CIoyLewf.js";
5
- import { j as G } from "./join-BmgR_f4v.js";
4
+ import { X as V, C as X, E as Z, I as G } from "./X-CIoyLewf.js";
5
+ import { j as J } from "./join-BmgR_f4v.js";
6
6
  function N(...l) {
7
7
  return l.filter((r) => typeof r == "string" && r).join(" ").trim() || void 0;
8
8
  }
9
- function J({ size: l = 15, color: r = "currentColor", className: i = "inline", ...n }) {
9
+ function Q({ size: l = 15, color: r = "currentColor", className: i = "inline", ...n }) {
10
10
  return /* @__PURE__ */ t(
11
11
  "svg",
12
12
  {
@@ -93,7 +93,8 @@ e(null);
93
93
  e(null);
94
94
  e(null);
95
95
  e(null);
96
- function Q() {
96
+ e(null);
97
+ function U() {
97
98
  const [l, r] = h(0);
98
99
  return g(() => {
99
100
  const i = setInterval(() => {
@@ -111,7 +112,7 @@ function Q() {
111
112
  i
112
113
  )) });
113
114
  }
114
- const R = {
115
+ const W = {
115
116
  base: "",
116
117
  primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
117
118
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
@@ -119,7 +120,7 @@ const R = {
119
120
  outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",
120
121
  link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted",
121
122
  destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"
122
- }, U = {
123
+ }, Y = {
123
124
  stripped: "",
124
125
  fitted: "size-fit",
125
126
  sm: "px-2 py-1 text-sm",
@@ -127,7 +128,7 @@ const R = {
127
128
  lg: "px-6 py-3 text-lg",
128
129
  icon: "p-1 w-fit aspect-square",
129
130
  full: "p-2 w-full"
130
- }, W = {
131
+ }, _ = {
131
132
  none: "rounded-none",
132
133
  sm: "rounded-sm",
133
134
  md: "rounded-md",
@@ -138,7 +139,7 @@ const R = {
138
139
  size: "md",
139
140
  rounded: "md"
140
141
  };
141
- function _({
142
+ function $({
142
143
  variant: l = w.variant,
143
144
  size: r,
144
145
  rounded: i = w.rounded,
@@ -153,9 +154,9 @@ function _({
153
154
  l === "link" && !r ? c = "fitted" : c = r || w.size;
154
155
  const m = N(
155
156
  "appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
156
- R[l],
157
- U[c],
158
- W[i],
157
+ W[l],
158
+ Y[c],
159
+ _[i],
159
160
  n && "relative pointer-events-none",
160
161
  a && "relative",
161
162
  u
@@ -172,7 +173,7 @@ function _({
172
173
  type: s,
173
174
  className: m,
174
175
  children: [
175
- n && /* @__PURE__ */ t(Q, {}),
176
+ n && /* @__PURE__ */ t(U, {}),
176
177
  /* @__PURE__ */ t("span", { className: N(n && "invisible"), children: d.children }),
177
178
  a && !d.disabled && /* @__PURE__ */ t(
178
179
  "a",
@@ -188,7 +189,7 @@ function _({
188
189
  }
189
190
  );
190
191
  }
191
- function $(l) {
192
+ function R(l) {
192
193
  const [r, i] = h(!1), [n, a] = h(!1);
193
194
  return g(() => {
194
195
  l ? (a(!0), setTimeout(() => i(!0), 10)) : (i(!1), setTimeout(() => a(!1), 150));
@@ -205,7 +206,7 @@ function ee(l, r) {
205
206
  }, [l, r]);
206
207
  }
207
208
  function le(l, r) {
208
- const i = D(null), n = L(() => {
209
+ const i = H(null), n = z(() => {
209
210
  const a = document.getElementById(l);
210
211
  if (!a) return;
211
212
  const o = a.querySelectorAll('[data-modal-action="true"]');
@@ -246,11 +247,11 @@ function ne({
246
247
  ariaLabelledBy: f,
247
248
  ariaDescribedBy: p
248
249
  }) {
249
- const v = P(), k = l || `modal-${v}`, C = l ? `${l}-title` : `modal-title-${v}`, { show: z, shouldRender: y } = $(r);
250
+ const v = P(), k = l || `modal-${v}`, C = l ? `${l}-title` : `modal-title-${v}`, { show: L, shouldRender: y } = R(r);
250
251
  if (le(k, y), ee(y, i), !y) return null;
251
- const j = () => n ? H.isValidElement(n) ? /* @__PURE__ */ t("div", { className: "mb-4", children: n }) : /* @__PURE__ */ t("h2", { className: "mb-4 text-xl font-semibold", id: C, children: n }) : null, I = () => c.length === 0 ? null : /* @__PURE__ */ t("div", { className: "mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3", children: c.map((A, O) => {
252
- const { label: B, className: S, ...M } = A;
253
- return /* @__PURE__ */ t(_, { className: S, type: "button", ...M, "data-modal-action": "true", children: B }, O);
252
+ const j = () => n ? D.isValidElement(n) ? /* @__PURE__ */ t("div", { className: "mb-4", children: n }) : /* @__PURE__ */ t("h2", { className: "mb-4 text-xl font-semibold", id: C, children: n }) : null, A = () => c.length === 0 ? null : /* @__PURE__ */ t("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, O) => {
253
+ const { label: B, className: S, ...M } = I;
254
+ return /* @__PURE__ */ t($, { className: S, type: "button", ...M, "data-modal-action": "true", children: B }, O);
254
255
  }) });
255
256
  return /* @__PURE__ */ t(q, { children: K(
256
257
  /* @__PURE__ */ t(
@@ -279,7 +280,7 @@ function ne({
279
280
  tabIndex: -1,
280
281
  className: x(
281
282
  "relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75",
282
- z ? "opacity-100 scale-100" : "opacity-0 scale-90",
283
+ L ? "opacity-100 scale-100" : "opacity-0 scale-90",
283
284
  s
284
285
  ),
285
286
  children: [
@@ -290,12 +291,12 @@ function ne({
290
291
  onClick: i,
291
292
  "data-modal-close-button": "true",
292
293
  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",
293
- children: /* @__PURE__ */ t(J, { size: 18 })
294
+ children: /* @__PURE__ */ t(Q, { size: 18 })
294
295
  }
295
296
  ),
296
297
  j(),
297
298
  a,
298
- I()
299
+ A()
299
300
  ]
300
301
  }
301
302
  )
@@ -316,7 +317,7 @@ function de({
316
317
  title: u,
317
318
  ...d
318
319
  }) {
319
- const c = E(() => l === "confirm" ? {
320
+ const c = T(() => l === "confirm" ? {
320
321
  confirm: n || "Confirm",
321
322
  cancel: i || "Cancel",
322
323
  defaultTitle: u || "Confirm Action"
@@ -324,7 +325,7 @@ function de({
324
325
  confirm: n || "OK",
325
326
  cancel: null,
326
327
  defaultTitle: u || "Alert"
327
- }, [l, n, u, i]), m = E(
328
+ }, [l, n, u, i]), m = T(
328
329
  () => [
329
330
  ...c.cancel ? [
330
331
  {
@@ -361,14 +362,14 @@ const te = e(null), ue = () => {
361
362
  if (!l)
362
363
  throw new Error("Tabs components must be used within a Tabs component");
363
364
  return l;
364
- }, T = {
365
+ }, E = {
365
366
  info: {
366
367
  className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
367
- icon: /* @__PURE__ */ t(Z, { size: 20 })
368
+ icon: /* @__PURE__ */ t(G, { size: 20 })
368
369
  },
369
370
  warning: {
370
371
  className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
371
- icon: /* @__PURE__ */ t(Y, { size: 20 })
372
+ icon: /* @__PURE__ */ t(Z, { size: 20 })
372
373
  },
373
374
  error: {
374
375
  className: "bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",
@@ -386,7 +387,7 @@ function ce({
386
387
  customTypes: u,
387
388
  customComponent: d
388
389
  }) {
389
- const [c, m] = h(!1), f = L(() => {
390
+ const [c, m] = h(!1), f = z(() => {
390
391
  m(!0), setTimeout(() => {
391
392
  s == null || s(l);
392
393
  }, 150);
@@ -411,13 +412,13 @@ function ce({
411
412
  onRemove: s
412
413
  }
413
414
  );
414
- const p = (u == null ? void 0 : u[n]) || T[n] || T.info;
415
+ const p = (u == null ? void 0 : u[n]) || E[n] || E.info;
415
416
  return /* @__PURE__ */ b(
416
417
  "div",
417
418
  {
418
419
  role: n === "error" ? "alert" : "status",
419
420
  "aria-live": n === "error" ? void 0 : "polite",
420
- className: G(
421
+ className: J(
421
422
  "relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out",
422
423
  a && "pb-3",
423
424
  p.className,
@@ -456,4 +457,4 @@ export {
456
457
  N as n,
457
458
  ue as u
458
459
  };
459
- //# sourceMappingURL=Toast-Biw2psM3.js.map
460
+ //# sourceMappingURL=Toast-BZUN3DWB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast-BZUN3DWB.js","sources":["join-BmgR_f4v.js","X-CIoyLewf.js","Toast-Biw2psM3.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 t, Fragment as q, jsxs as b } from \"react/jsx-runtime\";\nimport H, { createContext as e, useId as P, useState as h, useEffect as g, useRef as D, useCallback as L, useMemo as E, useContext as F } from \"react\";\nimport { createPortal as K } from \"react-dom\";\nimport { X as V, C as X, E as Y, I as Z } from \"./X-CIoyLewf.js\";\nimport { j as G } from \"./join-BmgR_f4v.js\";\nfunction N(...l) {\n return l.filter((r) => typeof r == \"string\" && r).join(\" \").trim() || void 0;\n}\nfunction J({ size: l = 15, color: r = \"currentColor\", className: i = \"inline\", ...n }) {\n return /* @__PURE__ */ t(\n \"svg\",\n {\n ...n,\n width: l,\n height: l,\n className: i,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ t(\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: r,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction x(...l) {\n return l.filter((r) => typeof r == \"string\" && r).join(\" \").trim() || void 0;\n}\ne(void 0);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(void 0);\ne(void 0);\ne(null);\ne(void 0);\ne(void 0);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\nfunction Q() {\n const [l, r] = h(0);\n return g(() => {\n const i = setInterval(() => {\n r((n) => (n + 1) % 3);\n }, 500);\n return () => clearInterval(i);\n }, []), /* @__PURE__ */ t(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((i) => /* @__PURE__ */ t(\n \"div\",\n {\n className: N(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n l === i && \"transform -translate-y-1\"\n )\n },\n i\n )) });\n}\nconst R = {\n base: \"\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80\",\n tertiary: \"text-primary hover:text-primary-foreground disabled:text-muted\",\n outline: \"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted\",\n link: \"underline-offset-4 hover:underline disabled:underline disabled:text-muted\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground\"\n}, U = {\n stripped: \"\",\n fitted: \"size-fit\",\n sm: \"px-2 py-1 text-sm\",\n md: \"px-4 py-2 text-base\",\n lg: \"px-6 py-3 text-lg\",\n icon: \"p-1 w-fit aspect-square\",\n full: \"p-2 w-full\"\n}, W = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, w = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction _({\n variant: l = w.variant,\n size: r,\n rounded: i = w.rounded,\n loading: n,\n linkTo: a,\n linkProps: o,\n type: s = \"button\",\n className: u,\n ...d\n}) {\n let c;\n l === \"link\" && !r ? c = \"fitted\" : c = r || 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 R[l],\n U[c],\n W[i],\n n && \"relative pointer-events-none\",\n a && \"relative\",\n u\n );\n return /* @__PURE__ */ b(\n \"button\",\n {\n ...d,\n role: a ? \"link\" : d.role,\n \"aria-label\": d[\"aria-label\"] || (o == null ? void 0 : o[\"aria-label\"]),\n \"aria-description\": d[\"aria-description\"] || (o == null ? void 0 : o[\"aria-description\"]),\n \"aria-disabled\": d.disabled || n,\n \"aria-busy\": n,\n type: s,\n className: m,\n children: [\n n && /* @__PURE__ */ t(Q, {}),\n /* @__PURE__ */ t(\"span\", { className: N(n && \"invisible\"), children: d.children }),\n a && !d.disabled && /* @__PURE__ */ t(\n \"a\",\n {\n ...o,\n \"aria-hidden\": !0,\n href: a,\n rel: (o == null ? void 0 : o.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction $(l) {\n const [r, i] = h(!1), [n, a] = h(!1);\n return g(() => {\n l ? (a(!0), setTimeout(() => i(!0), 10)) : (i(!1), setTimeout(() => a(!1), 150));\n }, [l]), { show: r, shouldRender: n };\n}\nfunction ee(l, r) {\n g(() => {\n const i = (n) => {\n n.key === \"Escape\" && l && r();\n };\n return document.addEventListener(\"keydown\", i), l && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", i), document.body.style.overflow = \"auto\";\n };\n }, [l, r]);\n}\nfunction le(l, r) {\n const i = D(null), n = L(() => {\n const a = document.getElementById(l);\n if (!a) return;\n const o = a.querySelectorAll('[data-modal-action=\"true\"]');\n if (o.length > 0) {\n o[0].focus();\n return;\n }\n const s = a.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 a.focus();\n }, [l]);\n g(() => (r && (i.current = document.activeElement, n()), () => {\n document.body.style.overflow = \"auto\", i.current instanceof HTMLElement && i.current.focus();\n }), [r, n]);\n}\nfunction ne({\n id: l,\n isOpen: r,\n onClose: i,\n title: n,\n children: a,\n contentOnly: o = !1,\n className: s,\n overlayClassName: u,\n hideCloseButton: d = !1,\n actions: c = [],\n disableCloseOnOverlayClick: m = !1,\n ariaLabelledBy: f,\n ariaDescribedBy: p\n}) {\n const v = P(), k = l || `modal-${v}`, C = l ? `${l}-title` : `modal-title-${v}`, { show: z, shouldRender: y } = $(r);\n if (le(k, y), ee(y, i), !y) return null;\n const j = () => n ? H.isValidElement(n) ? /* @__PURE__ */ t(\"div\", { className: \"mb-4\", children: n }) : /* @__PURE__ */ t(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: C, children: n }) : null, I = () => c.length === 0 ? null : /* @__PURE__ */ t(\"div\", { className: \"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3\", children: c.map((A, O) => {\n const { label: B, className: S, ...M } = A;\n return /* @__PURE__ */ t(_, { className: S, type: \"button\", ...M, \"data-modal-action\": \"true\", children: B }, O);\n }) });\n return /* @__PURE__ */ t(q, { children: K(\n /* @__PURE__ */ t(\n \"div\",\n {\n \"aria-labelledby\": f ?? n ? C : void 0,\n \"aria-describedby\": p,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ b(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ t(\n \"div\",\n {\n className: x(\"fixed inset-0 bg-black/20 transition-all\", u),\n onClick: () => {\n m || i();\n }\n }\n ),\n o && /* @__PURE__ */ t(\"div\", { className: x(\"relative w-fit\", s), children: a }),\n !o && /* @__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__ */ t(\n \"button\",\n {\n type: \"button\",\n onClick: i,\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__ */ t(J, { size: 18 })\n }\n ),\n j(),\n a,\n I()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nfunction de({\n type: l,\n message: r,\n cancelText: i,\n confirmText: n,\n onConfirm: a,\n onClose: o,\n destructive: s = !1,\n title: u,\n ...d\n}) {\n const c = E(() => l === \"confirm\" ? {\n confirm: n || \"Confirm\",\n cancel: i || \"Cancel\",\n defaultTitle: u || \"Confirm Action\"\n } : {\n confirm: n || \"OK\",\n cancel: null,\n defaultTitle: u || \"Alert\"\n }, [l, n, u, i]), m = E(\n () => [\n ...c.cancel ? [\n {\n label: c.cancel,\n variant: \"secondary\",\n onClick: o\n }\n ] : [],\n {\n label: c.confirm,\n variant: s ? \"destructive\" : \"primary\",\n onClick: () => {\n a == null || a(), o();\n }\n }\n ],\n [c, s, a, o]\n );\n return /* @__PURE__ */ t(\n ne,\n {\n ...d,\n title: u || c.defaultTitle,\n onClose: o,\n actions: m,\n disableCloseOnOverlayClick: l === \"confirm\",\n hideCloseButton: l === \"confirm\",\n children: typeof r == \"string\" ? /* @__PURE__ */ t(\"p\", { className: \"text-sm\", children: r }) : r\n }\n );\n}\nconst te = e(null), ue = () => {\n const l = F(te);\n if (!l)\n throw new Error(\"Tabs components must be used within a Tabs component\");\n return l;\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__ */ t(Z, { 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__ */ t(Y, { 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__ */ t(X, { size: 20 })\n }\n};\nfunction ce({\n id: l,\n title: r,\n description: i,\n type: n = \"info\",\n action: a,\n duration: o = 5e3,\n onRemove: s,\n customTypes: u,\n customComponent: d\n}) {\n const [c, m] = h(!1), f = L(() => {\n m(!0), setTimeout(() => {\n s == null || s(l);\n }, 150);\n }, [l, s]);\n if (g(() => {\n if (o > 0) {\n const v = setTimeout(() => {\n f();\n }, o);\n return () => clearTimeout(v);\n }\n }, [o, l, s, f]), d)\n return /* @__PURE__ */ t(\n d,\n {\n id: l,\n title: r,\n description: i,\n type: n,\n action: a,\n duration: o,\n onRemove: s\n }\n );\n const p = (u == null ? void 0 : u[n]) || T[n] || T.info;\n return /* @__PURE__ */ b(\n \"div\",\n {\n role: n === \"error\" ? \"alert\" : \"status\",\n \"aria-live\": n === \"error\" ? void 0 : \"polite\",\n className: G(\n \"relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out\",\n a && \"pb-3\",\n p.className,\n c ? \"opacity-0 translate-x-full\" : \"opacity-100 translate-x-0\"\n ),\n children: [\n /* @__PURE__ */ t(\"div\", { className: \"flex-shrink-0 mr-3\", children: p.icon }),\n /* @__PURE__ */ b(\"div\", { className: \"flex-grow min-w-0\", children: [\n /* @__PURE__ */ t(\"div\", { className: \"font-medium text-sm leading-5\", children: r }),\n i && /* @__PURE__ */ t(\"div\", { className: \"mt-1 text-sm opacity-90 leading-5\", children: i }),\n a && /* @__PURE__ */ t(\"div\", { className: \"mt-1.5\", children: /* @__PURE__ */ t(\n \"button\",\n {\n onClick: a.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: a.label\n }\n ) })\n ] }),\n /* @__PURE__ */ t(\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__ */ t(V, { size: 16 })\n }\n )\n ]\n }\n );\n}\nexport {\n de as A,\n ce as T,\n te as a,\n N as n,\n ue as u\n};\n//# sourceMappingURL=Toast-Biw2psM3.js.map\n","import { jsxs as E, jsx as l, Fragment as Y } from \"react/jsx-runtime\";\nimport P, { useId as K, useState as k, createElement as ze, useEffect as A, useRef as j, useCallback as S, useMemo as q, isValidElement as Le, cloneElement as je } from \"react\";\nimport { j as w } from \"./join-BmgR_f4v.js\";\nimport { f as $e, j as Ve, c as Ae, g as Ie, h as Se, b as ve, D as Be, W as We, k as Me, i as Fe, C as Ke, a as He, l as Pe, E as _e, Q as Ge, d as Ze, e as qe } from \"./Window-uX5BuBwi.js\";\nimport { n as V, a as Ue, u as ge } from \"./Toast-Biw2psM3.js\";\nimport { A as Pr, T as _r } from \"./Toast-Biw2psM3.js\";\nimport { X as ce, E as Te, C as Xe, I as Je } from \"./X-CIoyLewf.js\";\nimport { createPortal as de } from \"react-dom\";\nimport { downloadFile as Qe, mergeRefs as Ye } from \"./utils.esm.js\";\nfunction he({\n id: a,\n title: o,\n content: r,\n children: n,\n className: e = \"\",\n disabled: t = !1,\n isOpen: s = !1,\n onToggle: i,\n triggerClassName: c = \"\",\n bodyClassName: f = \"\"\n}) {\n const u = K(), d = a || `accordion-item-${u}`, b = `${d}-header`, m = `${d}-panel`, v = () => {\n !t && i && i();\n }, p = (h) => {\n (h.key === \"Enter\" || h.key === \" \") && (h.preventDefault(), v());\n };\n return /* @__PURE__ */ E(\"div\", { className: w(\"border-b border-gray-200\", t && \"opacity-60 cursor-not-allowed\", e), children: [\n /* @__PURE__ */ E(\n \"button\",\n {\n id: b,\n type: \"button\",\n className: w(\n \"w-full text-left py-3 px-4 flex justify-between items-center focus:outline focus:outline-secondary\",\n t ? \"cursor-not-allowed\" : \"hover:bg-gray-50/10 cursor-pointer\",\n c\n ),\n \"aria-expanded\": s,\n \"aria-controls\": m,\n disabled: t,\n onClick: v,\n onKeyDown: p,\n children: [\n /* @__PURE__ */ l(\"span\", { children: o }),\n /* @__PURE__ */ l(\n \"span\",\n {\n className: w(\n \"transform transition-transform duration-300 ease-linear\",\n s ? \"rotate-180\" : \"rotate-0\"\n ),\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ l($e, { size: 18 })\n }\n )\n ]\n }\n ),\n /* @__PURE__ */ l(\n \"div\",\n {\n id: m,\n role: \"region\",\n \"aria-labelledby\": b,\n className: w(\n \"transition-all duration-300 ease-linear px-4\",\n s ? \"max-h-96 opacity-100 overflow-auto py-3\" : \"max-h-0 opacity-0 overflow-hidden\",\n f\n ),\n children: s && (n || r)\n }\n )\n ] });\n}\nfunction mr({\n id: a,\n items: o = [],\n children: r,\n className: n = \"\",\n itemClassName: e = \"\",\n allowMultiple: t = !1,\n defaultOpenItems: s = [],\n triggersClassName: i = \"\",\n bodiesClassName: c = \"\"\n}) {\n const f = K(), u = a || `accordion-group-${f}`, [d, b] = k(new Set(s)), m = (h) => {\n b((x) => {\n const g = new Set(x);\n return g.has(h) ? g.delete(h) : (t || g.clear(), g.add(h)), g;\n });\n }, v = (h) => `${f}-item-${h}`, p = (h) => d.has(h);\n return /* @__PURE__ */ E(\"div\", { id: u, className: n, children: [\n o.length > 0 && o.map((h, x) => {\n const g = h.id || v(x);\n return /* @__PURE__ */ l(\n he,\n {\n id: g,\n title: h.title,\n content: h.content,\n disabled: h.disabled,\n isOpen: p(g),\n onToggle: () => m(g),\n className: e,\n triggerClassName: i,\n bodyClassName: c\n },\n g\n );\n }),\n o.length === 0 && r && P.Children.map(r, (h, x) => {\n if (P.isValidElement(h) && h.type === he) {\n const g = h.props.id || v(x);\n return /* @__PURE__ */ ze(\n he,\n {\n ...h.props,\n key: g,\n id: g,\n className: w(e, h.props.className),\n isOpen: p(g),\n onToggle: () => m(g),\n triggerClassName: w(i, h.props.triggerClassName),\n bodyClassName: w(c, h.props.bodyClassName)\n }\n );\n }\n return null;\n })\n ] });\n}\nfunction Oe() {\n const [a, o] = k(0);\n return A(() => {\n const r = setInterval(() => {\n o((n) => (n + 1) % 3);\n }, 500);\n return () => clearInterval(r);\n }, []), /* @__PURE__ */ l(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((r) => /* @__PURE__ */ l(\n \"div\",\n {\n className: w(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n a === r && \"transform -translate-y-1\"\n )\n },\n r\n )) });\n}\nconst et = {\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}, tt = {\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}, rt = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, pe = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction nt({\n variant: a = pe.variant,\n size: o,\n rounded: r = pe.rounded,\n loading: n,\n linkTo: e,\n linkProps: t,\n type: s = \"button\",\n className: i,\n ...c\n}) {\n let f;\n a === \"link\" && !o ? f = \"fitted\" : f = o || pe.size;\n const d = w(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n et[a],\n tt[f],\n rt[r],\n n && \"relative pointer-events-none\",\n e && \"relative\",\n i\n );\n return /* @__PURE__ */ E(\n \"button\",\n {\n ...c,\n role: e ? \"link\" : c.role,\n \"aria-label\": c[\"aria-label\"] || (t == null ? void 0 : t[\"aria-label\"]),\n \"aria-description\": c[\"aria-description\"] || (t == null ? void 0 : t[\"aria-description\"]),\n \"aria-disabled\": c.disabled || n,\n \"aria-busy\": n,\n type: s,\n className: d,\n children: [\n n && /* @__PURE__ */ l(Oe, {}),\n /* @__PURE__ */ l(\"span\", { className: w(n && \"invisible\"), children: c.children }),\n e && !c.disabled && /* @__PURE__ */ l(\n \"a\",\n {\n ...t,\n \"aria-hidden\": !0,\n href: e,\n rel: (t == null ? void 0 : t.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nconst at = {\n info: {\n border: \"border-blue-600\",\n interior: \"bg-blue-800/20\",\n core: \"text-blue-400\",\n description: \"text-blue-200\"\n },\n destructive: {\n border: \"border-destructive\",\n interior: \"bg-destructive/10\",\n core: \"text-destructive\",\n description: \"text-destructive\"\n },\n success: {\n border: \"border-success\",\n interior: \"bg-success/10\",\n core: \"text-success\",\n description: \"text-success\"\n },\n warning: {\n border: \"border-yellow-700\",\n interior: \"bg-yellow-800/20\",\n core: \"text-yellow-400\",\n description: \"text-yellow-200\"\n },\n base: {\n border: \"\",\n interior: \"\",\n core: \"\",\n description: \"opacity-90\"\n }\n}, ot = {\n info: /* @__PURE__ */ l(Je, { size: 22 }),\n destructive: /* @__PURE__ */ l(Xe, { size: 22 }),\n success: /* @__PURE__ */ l(Ae, { size: 22 }),\n warning: /* @__PURE__ */ l(Te, { size: 20 }),\n base: /* @__PURE__ */ l(Ve, { size: 22 })\n};\nfunction hr({\n id: a,\n ref: o,\n variant: r = \"base\",\n icon: n,\n title: e,\n description: t,\n className: s,\n dismissible: i = !1,\n onDismiss: c\n}) {\n const f = K(), u = a || `callout-${f}`, [d, b] = k(!1), m = at[r], v = ot[r], p = () => {\n b(!0), c && c();\n };\n return d ? null : /* @__PURE__ */ E(\n \"div\",\n {\n id: u,\n ref: o,\n className: w(\"relative rounded-lg p-2 sm:p-4 border\", m.border, m.interior, s),\n \"data-variant\": r,\n role: \"note\",\n \"aria-describedby\": t ? `${u}-description` : void 0,\n \"aria-labelledby\": e ? `${u}-title` : void 0,\n children: [\n /* @__PURE__ */ E(\"div\", { className: \"flex items-start gap-x-2\", children: [\n n && /* @__PURE__ */ l(\"span\", { className: m.core, children: n === \"default\" ? v : n }),\n (e || t) && /* @__PURE__ */ E(\"div\", { className: \"flex-1\", children: [\n e && /* @__PURE__ */ l(\"div\", { id: `${u}-title`, className: w(\"font-medium\", m.core), children: e }),\n t && /* @__PURE__ */ l(\"div\", { id: `${u}-description`, className: w(\"mt-0.5 font-light\", m.description), children: t })\n ] })\n ] }),\n i && /* @__PURE__ */ l(\n \"button\",\n {\n type: \"button\",\n onClick: p,\n \"data-callout-close-button\": \"true\",\n className: w(\n m.core,\n \"rounded-md p-0.5 top-2.5 right-2.5 absolute focus:outline-none hover:ring focus:ring-2 focus:ring-current leading-0\"\n ),\n \"aria-label\": \"Close callout\",\n children: /* @__PURE__ */ l(ce, { size: 18 })\n }\n )\n ]\n }\n );\n}\nfunction st({\n totalItems: a,\n itemsToShow: o,\n infinite: r,\n autoScroll: n,\n scrollInterval: e,\n pauseScrollOnHover: t,\n currentIndex: s,\n onIndexChange: i\n}) {\n const [c, f] = k(s || 0), [u, d] = k(!1), b = j(null), m = Math.ceil(a / o), v = r || c > 0, p = r || c < m - 1, h = S(\n (y) => {\n const N = Math.max(0, Math.min(y, m - 1));\n f(N), i == null || i(N);\n },\n [m, i]\n ), x = S(() => {\n if (v) {\n const y = c === 0 && r ? m - 1 : c - 1;\n h(y);\n }\n }, [c, v, r, m, h]), g = S(() => {\n if (p) {\n const y = c === m - 1 && r ? 0 : c + 1;\n h(y);\n }\n }, [c, p, r, m, h]);\n return A(() => {\n s !== void 0 && s !== c && f(s);\n }, [s, c]), A(() => {\n if (!n) return;\n const y = () => {\n b.current = setInterval(() => {\n t && u || g();\n }, e);\n }, N = () => {\n b.current && (clearInterval(b.current), b.current = null);\n };\n return !u || !t ? y() : N(), N;\n }, [n, e, t, u, g]), A(() => {\n f(0);\n }, [o]), {\n currentSlide: c,\n canGoPrev: v,\n canGoNext: p,\n goToPrev: x,\n goToNext: g,\n goToSlide: h,\n isHovered: u,\n setIsHovered: d\n };\n}\nconst te = {\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 it() {\n const [a, o] = k(), [r, n] = k(0), e = (t) => te[t];\n return A(() => {\n const t = (i) => i >= te[\"2xl\"] ? \"2xl\" : i >= te.xl ? \"xl\" : i >= te.lg ? \"lg\" : i >= te.md ? \"md\" : i >= te.sm ? \"sm\" : \"xs\";\n o(t(window.innerWidth)), n(window.innerWidth);\n const s = () => {\n o(t(window.innerWidth)), n(window.innerWidth);\n };\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, []), { screenSize: a, screenWidth: r, getBreakpoint: e };\n}\nconst ae = {\n sm: {\n button: \"h-6 w-6 text-xs\",\n icon: \"size-3\"\n },\n md: {\n button: \"h-8 w-8 text-sm\",\n icon: \"size-4\"\n },\n lg: {\n button: \"h-10 w-10 text-lg\",\n icon: \"size-5\"\n }\n}, 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}, oe = {\n aligned: {\n prev: \"absolute top-1/2 -translate-x-1/2 -translate-y-1/2 z-10\",\n next: \"absolute right-0 top-1/2 translate-x-1/2 -translate-y-1/2 z-10\"\n },\n exterior: {\n prev: \"absolute -left-10 top-1/2 -translate-y-1/2 z-10\",\n next: \"absolute -right-10 top-1/2 -translate-y-1/2 z-10\"\n },\n interior: {\n prev: \"absolute left-2 top-1/2 -translate-y-1/2 z-10\",\n next: \"absolute right-2 top-1/2 -translate-y-1/2 z-10\"\n }\n};\nfunction pr({\n children: a,\n id: o,\n ref: r,\n className: n,\n autoScroll: e = !1,\n scrollInterval: t = 3e3,\n pauseScrollOnHover: s = !0,\n currentIndex: i,\n onIndexChange: c,\n hidePrevNext: f = !1,\n hideDots: u = !1,\n itemsToShow: d = 1,\n buttonSize: b = \"md\",\n buttonVariant: m = \"default\",\n buttonPosition: v = \"exterior\",\n infinite: p = !0,\n prevButton: h,\n nextButton: x,\n itemsClassName: g,\n containerClassName: y,\n dotsClassName: N,\n gap: C = 8\n}) {\n var W, re;\n const T = j(null), D = P.Children.toArray(a).filter(P.isValidElement), z = D.length, { screenSize: F } = it(), L = q(() => {\n if (typeof d == \"number\")\n return d;\n if (typeof d == \"object\" && d && F) {\n const Q = [\"2xl\", \"xl\", \"lg\", \"md\", \"sm\", \"xs\"], H = Q.indexOf(F);\n for (let ee = H; ee < Q.length; ee++) {\n const ne = Q[ee];\n if (d[ne] !== void 0)\n return d[ne];\n }\n }\n return 1;\n }, [d, F]), { currentSlide: _, canGoPrev: M, canGoNext: R, goToPrev: $, goToNext: B, goToSlide: G, setIsHovered: U } = st({\n totalItems: z,\n itemsToShow: L,\n infinite: p,\n autoScroll: e,\n scrollInterval: t,\n pauseScrollOnHover: s,\n currentIndex: i,\n onIndexChange: c\n }), J = S(\n (Q) => {\n if (L === 1)\n return { leftWidth: 0, rightWidth: 0, widthReduction: 0 };\n const H = C * (L - 1) / L;\n return Q % L === 0 ? { leftWidth: 0, rightWidth: C / 2, widthReduction: H } : Q % L === L - 1 ? { leftWidth: C / 2, rightWidth: 0, widthReduction: H } : { leftWidth: C / 2, rightWidth: C / 2, widthReduction: H };\n },\n [L, C]\n ), Z = () => {\n $();\n }, O = () => {\n B();\n }, ue = () => {\n s && U(!0);\n }, fe = () => {\n s && U(!1);\n }, me = -(_ * (100 / z) * L), I = w(\n \"inline-flex items-center justify-center rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring focus-visible:ring-ring disabled:pointer-events-none\",\n v === \"aligned\" ? \"disabled:opacity-90\" : \"disabled:opacity-50\"\n );\n return /* @__PURE__ */ E(\"div\", { className: w(\"relative\", n), \"data-carousel-wrapper\": \"true\", children: [\n !f && /* @__PURE__ */ l(Y, { children: h ? P.cloneElement(\n h,\n {\n onClick: Z,\n disabled: !M,\n className: w(\n ((W = h.props) == null ? void 0 : W.className) || \"\",\n oe[v].prev\n ),\n role: \"button\",\n \"aria-disabled\": !M,\n \"aria-label\": \"Previous slide\",\n \"data-carousel-prev\": \"true\"\n }\n ) : /* @__PURE__ */ l(\n \"button\",\n {\n type: \"button\",\n onClick: Z,\n disabled: !M,\n className: w(\n I,\n ae[b].button,\n xe[m],\n oe[v].prev\n ),\n \"aria-disabled\": !M,\n \"aria-label\": \"Previous slide\",\n \"data-carousel-prev\": \"true\",\n children: /* @__PURE__ */ l(Ie, { className: ae[b].icon })\n }\n ) }),\n /* @__PURE__ */ E(\n \"div\",\n {\n id: o,\n ref: r,\n className: w(\"relative overflow-hidden\", y),\n onMouseEnter: ue,\n onMouseLeave: fe,\n \"data-carousel\": \"true\",\n \"data-current-index\": _,\n \"data-items-to-show\": L,\n \"data-auto-scroll\": e,\n \"data-button-position\": v,\n children: [\n /* @__PURE__ */ l(\n \"div\",\n {\n ref: T,\n className: \"flex transition-transform duration-300 ease-in-out\",\n style: {\n transform: `translateX(${me}%)`,\n width: `${z / L * 100}%`\n },\n children: D.map((Q, H) => {\n const { leftWidth: ee, rightWidth: ne, widthReduction: Re } = J(H);\n return /* @__PURE__ */ l(\n \"div\",\n {\n className: w(\"flex-shrink-0\", g),\n style: {\n width: `calc(${100 / z}% - ${Re}px)`,\n marginRight: ne > 0 ? `${ne}px` : void 0,\n marginLeft: ee > 0 ? `${ee}px` : void 0\n },\n \"data-slide-index\": H,\n children: Q\n },\n H\n );\n })\n }\n ),\n !u && /* @__PURE__ */ l(\"div\", { className: \"absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2\", children: Array.from({ length: Math.ceil(z / L) }).map((Q, H) => /* @__PURE__ */ l(\n \"button\",\n {\n type: \"button\",\n onClick: () => G(H),\n className: w(\n \"w-2 h-2 rounded-full transition-colors duration-200\",\n H === _ ? \"bg-accent\" : \"bg-muted hover:bg-muted-foreground/50\",\n N\n ),\n \"aria-label\": `Go to slide ${H + 1}`,\n \"data-carousel-dot\": H\n },\n H\n )) })\n ]\n }\n ),\n !f && /* @__PURE__ */ l(Y, { children: x ? P.cloneElement(\n x,\n {\n onClick: O,\n disabled: !R,\n className: w(\n ((re = x.props) == null ? void 0 : re.className) || \"\",\n oe[v].next\n ),\n role: \"button\",\n \"aria-disabled\": !R,\n \"aria-label\": \"Next slide\",\n \"data-carousel-next\": \"true\"\n }\n ) : /* @__PURE__ */ l(\n \"button\",\n {\n type: \"button\",\n onClick: O,\n disabled: !R,\n className: w(\n I,\n ae[b].button,\n xe[m],\n oe[v].next\n ),\n \"aria-disabled\": !R,\n \"aria-label\": \"Next slide\",\n \"data-carousel-next\": \"true\",\n children: /* @__PURE__ */ l(Se, { className: ae[b].icon })\n }\n ) })\n ] });\n}\nfunction lt(a) {\n const [o, r] = k(\"\"), n = S((e) => {\n let t = e, s = \"\";\n for (; t && !s; ) {\n const i = window.getComputedStyle(t).backgroundColor;\n i && i !== \"transparent\" && i !== \"rgba(0, 0, 0, 0)\" && (s = i), t = t.parentElement;\n }\n return s || \"transparent\";\n }, []);\n return A(() => {\n const e = document.getElementById(a);\n if (e) {\n const t = n(e.parentElement);\n r(t);\n }\n }, [a, n]), o;\n}\nfunction br({\n ref: a,\n id: o,\n size: r = 20,\n color: n,\n filled: e = !1,\n rounded: t = !0,\n checked: s = !1,\n onCheckedChange: i,\n disabled: c,\n className: f = \"\",\n ...u\n}) {\n const d = K(), b = q(() => o || `checkbox-${d}`, [o, d]), m = lt(b), [v, p] = k(s);\n A(() => {\n p(s);\n }, [s]);\n const h = () => {\n c || (p(!v), i == null || i(!v));\n }, x = (y) => {\n y.key === \" \" && (y.preventDefault(), h());\n }, g = w(\n \"flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2\",\n t && \"rounded\",\n c && \"opacity-40 cursor-not-allowed\",\n !c && \"cursor-pointer\",\n f\n );\n return /* @__PURE__ */ l(\n \"button\",\n {\n id: b,\n type: \"button\",\n ref: a,\n tabIndex: 0,\n role: \"checkbox\",\n onClick: h,\n \"aria-checked\": v,\n \"aria-disabled\": c,\n onKeyDownCapture: x,\n style: {\n width: r,\n height: r,\n color: n,\n backgroundColor: v && e ? \"currentcolor\" : \"transparent\"\n },\n className: g,\n ...u,\n children: v && /* @__PURE__ */ l(ve, { size: r, color: e ? m : void 0 })\n }\n );\n}\nfunction vr({\n children: a,\n className: o,\n linkTo: r,\n linkProps: n,\n onButtonClick: e,\n buttonProps: t,\n ...s\n}) {\n return r && e && console.warn('Clickable: Both \"linkTo\" and \"onButtonClick\" props are provided. Only \"linkTo\" will be used.'), /* @__PURE__ */ E(\"div\", { className: w(\"relative w-fit\", o), ...s, children: [\n a,\n r && /* @__PURE__ */ l(\n \"a\",\n {\n ...n,\n rel: (n == null ? void 0 : n.rel) || \"noreferrer\",\n href: r,\n className: w(\"absolute inset-0\", n == null ? void 0 : n.className)\n }\n ),\n !r && e && /* @__PURE__ */ l(\n \"button\",\n {\n ...t,\n type: \"button\",\n onClick: e,\n className: w(\"absolute inset-0 cursor-pointer\", t == null ? void 0 : t.className)\n }\n )\n ] });\n}\nfunction ct(a) {\n const [o, r] = k(null);\n return A(() => {\n var i;\n const n = (i = document.getElementById(a)) == null ? void 0 : i.parentElement;\n if (!n) return;\n const e = () => {\n const c = window.getComputedStyle(n), f = parseFloat(c.fontSize), u = c.lineHeight === \"normal\" ? f * 1.2 : parseFloat(c.lineHeight), d = f - 2, b = d / f, m = u * b;\n r({\n fontSize: f,\n lineHeight: u,\n smallerFontSize: d,\n smallerLineHeight: m\n });\n };\n e();\n const t = new ResizeObserver(e);\n t.observe(n);\n const s = new MutationObserver(e);\n return s.observe(n, {\n attributes: !0,\n attributeFilter: [\"style\", \"class\"],\n subtree: !1\n }), () => {\n t.disconnect(), s.disconnect();\n };\n }, [a]), o;\n}\nconst dt = {\n base: \"\",\n modest: \"opacity-90 bg-muted/10\",\n accent: \"text-accent bg-muted/10\",\n current: \"text-current bg-current/10\"\n};\nfunction gr({ id: a, ref: o, content: r, variant: n = \"accent\", className: e, style: t, ...s }) {\n const i = K(), c = a || `code-${i}`, f = ct(c);\n return /* @__PURE__ */ l(\n \"code\",\n {\n id: c,\n ref: o,\n className: w(\"px-2 py-1 rounded\", dt[n], e),\n \"data-variant\": n,\n style: {\n fontSize: f ? `${f.smallerFontSize}px` : void 0,\n lineHeight: f ? `${f.smallerLineHeight}px` : void 0,\n ...t\n },\n ...s,\n children: r\n }\n );\n}\nconst ut = {\n keyword: \"text-rose-400\",\n runner: \"text-amber-400\",\n comment: \"text-gray-500/80\",\n command: \"text-gray-100\",\n variable: \"text-blue-400\",\n string: \"text-white/70\",\n option: \"text-purple-400\",\n plain: \"text-gray-200\",\n operator: \"text-pink-500\",\n substitution: \"text-green-300\"\n}, ft = {\n selector: \"text-blue-400 font-medium\",\n property: \"text-purple-400\",\n value: \"text-green-400\",\n punctuation: \"text-gray-400\",\n atRule: \"text-pink-400 font-semibold\",\n comment: \"text-gray-500 italic\",\n string: \"text-green-400\",\n number: \"text-green-400\",\n plain: \"text-gray-100\",\n function: \"text-cyan-400\"\n}, mt = {\n key: \"text-purple-400 font-semibold\",\n string: \"text-green-400\",\n number: \"text-orange-400 font-medium\",\n boolean: \"text-cyan-400 font-medium\",\n punctuation: \"text-gray-400\",\n plain: \"text-gray-100\"\n}, ht = {\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}, pt = /* @__PURE__ */ new Set([\n \"for\",\n \"in\",\n \"do\",\n \"done\",\n \"else\",\n \"if\",\n \"fi\",\n \"then\",\n \"while\",\n \"until\",\n \"case\",\n \"esac\"\n]), bt = /* @__PURE__ */ new Set([\"npm\", \"npx\", \"pnpm\", \"yarn\", \"vite\"]);\nfunction De(a) {\n const o = [];\n if (a.trim() === \"\")\n return o.push({ text: \" \", type: \"plain\" }), o;\n if (a.trim().startsWith(\"#\"))\n return o.push({ text: a, type: \"comment\" }), o;\n const r = /(\\$\\([^)]*\\)|\"[^\"]*\"|'[^']*'|\\$[\\w_]+|[a-zA-Z_]\\w*=|--?[a-zA-Z0-9][\\w-]*(?:=.*)?|>>|>|#.*|\\s+|[^\\s]+)/g, n = (t) => {\n if (/^\\$\\([^)]*\\)$/.test(t)) {\n const s = t.slice(2, -1);\n return [{ text: \"$(\", type: \"operator\" }, ...De(s), { text: \")\", type: \"operator\" }];\n }\n if (/^\".*\"$/.test(t)) {\n const s = t.slice(1, -1), i = [];\n let c = 0;\n const f = /\\$[\\w_]+/g;\n let u;\n for (; (u = f.exec(s)) !== null; )\n u.index > c && i.push({\n text: s.slice(c, u.index),\n type: \"string\"\n }), i.push({ text: u[0], type: \"variable\" }), c = u.index + u[0].length;\n return c < s.length && i.push({ text: s.slice(c), type: \"string\" }), [{ text: '\"', type: \"string\" }, ...i, { text: '\"', type: \"string\" }];\n }\n return /^'.*'$/.test(t) ? [{ text: t, type: \"string\" }] : /^\\$[\\w_]+$/.test(t) ? [{ text: t, type: \"variable\" }] : /^[a-zA-Z_]\\w*=$/.test(t) ? [{ text: t, type: \"variable\" }] : /^--?[a-zA-Z0-9][\\w-]*(=.*)?$/.test(t) ? [{ text: t, type: \"option\" }] : /^>>|>$/.test(t) ? [{ text: t, type: \"operator\" }] : /^#.*$/.test(t) ? [{ text: t, type: \"comment\" }] : /^\\s+$/.test(t) ? [{ text: t, type: \"plain\" }] : pt.has(t) ? [{ text: t, type: \"keyword\" }] : bt.has(t) ? [{ text: t, type: \"runner\" }] : [{ text: t, type: \"command\" }];\n };\n let e;\n for (; (e = r.exec(a)) !== null; )\n o.push(...n(e[0]));\n return o;\n}\nfunction vt(a, o = !1) {\n const r = [];\n let n = o;\n if (a.trim() === \"\")\n return r.push({ text: \" \", type: \"plain\" }), { tokens: r, inComment: n };\n let e = \"selector\", t = 0;\n a.match(/^\\s+/) && a.includes(\":\") && !a.includes(\"{\") && (e = \"property\", t = 1);\n const s = /(\\/\\*[\\s\\S]*?\\*\\/|\\/\\*[\\s\\S]*$|\\*\\/)|(@[a-zA-Z-]+)|(\\{|\\}|:|;|,|\\(|\\))|(\"(?:[^\"]*)\"|'(?:[^']*)')|([a-zA-Z-]+)(?=\\()|([0-9.]+(?:px|rem|em|%|vh|vw|deg|s|ms|fr)?)|(#[a-fA-F0-9]{3,8})|([a-zA-Z0-9_-]+|[.#][a-zA-Z0-9_-]+)|(\\s+)|(\\S+)/g;\n let i;\n for (; i = s.exec(a); ) {\n const [, c, f, u, d, b, m, v, p, h, x] = i;\n if (c)\n c.includes(\"/*\") && !c.includes(\"*/\") ? n = !0 : c.includes(\"*/\") && (n = !1), r.push({ text: c, type: \"comment\" });\n else if (n)\n i[0].includes(\"*/\") && (n = !1), r.push({ text: i[0], type: \"comment\" });\n else if (f)\n r.push({ text: f, type: \"atRule\" });\n else if (b)\n r.push({ text: b, type: \"function\" });\n else if (u)\n u === \"{\" ? (t++, e = \"property\") : u === \"}\" ? (t--, e = t > 0 ? \"property\" : \"selector\") : u === \":\" ? e === \"property\" && (e = \"value\") : u === \";\" ? t > 0 && (e = \"property\") : u === \",\" && t === 0 && (e = \"selector\"), r.push({ text: u, type: \"punctuation\" });\n else if (d)\n r.push({ text: d, type: \"string\" });\n else if (m)\n r.push({ text: m, type: \"number\" });\n else if (v)\n r.push({ text: v, type: \"value\" });\n else if (p) {\n let g;\n p.startsWith(\".\") || p.startsWith(\"#\") || e === \"selector\" ? g = \"selector\" : e === \"property\" ? g = \"property\" : g = \"value\", r.push({ text: p, type: g });\n } else if (h)\n r.push({ text: h.replace(/ /g, \" \"), type: \"plain\" });\n else if (x) {\n const g = e === \"value\" ? \"value\" : \"plain\";\n r.push({ text: x, type: g });\n }\n }\n return { tokens: r, inComment: n };\n}\nfunction gt(a) {\n const o = /(\"[^\"]*\")\\s*(:)|(\"[^\"]*\")|(\\d+)|(true|false|null)|(\\{|\\}|\\[|\\]|,)/g, r = [];\n let n = 0, e;\n for (; (e = o.exec(a)) !== null; )\n e.index > n && r.push({ text: a.slice(n, e.index), type: \"plain\" }), e[1] && e[2] ? (r.push({ text: e[1], type: \"key\" }), r.push({ text: e[2], type: \"punctuation\" })) : e[3] ? r.push({ text: e[3], type: \"string\" }) : e[4] ? r.push({ text: e[4], type: \"number\" }) : e[5] ? r.push({ text: e[5], type: \"boolean\" }) : e[6] && r.push({ text: e[6], type: \"punctuation\" }), n = o.lastIndex;\n return n < a.length && r.push({ text: a.slice(n), type: \"plain\" }), r;\n}\nfunction xt(a, o = !1, r = 0) {\n const n = [];\n let e = a, t = o, s = r;\n for (; e.length > 0; ) {\n const i = e.match(/^\\/\\*[\\s\\S]*?\\*\\//);\n if (i) {\n n.push({ text: i[0], type: \"comment\" }), e = e.slice(i[0].length);\n continue;\n }\n const c = e.match(/^\\/\\/.*$/m);\n if (c) {\n n.push({ text: c[0], type: \"comment\" }), e = e.slice(c[0].length);\n continue;\n }\n const f = e.match(/^(`[^`]*`|\"[^\"]*\"|'[^']*')/);\n if (f) {\n n.push({ text: f[0], type: \"string\" }), e = e.slice(f[0].length);\n continue;\n }\n const u = e.match(/^<([a-zA-Z][a-zA-Z0-9]*)/);\n if (u) {\n n.push({ text: \"<\", type: \"jsx-bracket\" }), n.push({ text: u[1], type: \"jsx-tag\" }), e = e.slice(u[0].length), t = !0;\n continue;\n }\n const d = e.match(/^<\\/([a-zA-Z][a-zA-Z0-9]*)>/);\n if (d) {\n n.push({ text: \"</\", type: \"jsx-bracket\" }), n.push({ text: d[1], type: \"jsx-tag\" }), n.push({ text: \">\", type: \"jsx-bracket\" }), e = e.slice(d[0].length), t = !1;\n continue;\n }\n if (e.match(/^\\/?>/)) {\n const T = e.match(/^(\\/?>\\s*)/);\n if (T) {\n n.push({ text: T[1].trim(), type: \"jsx-bracket\" }), e = e.slice(T[1].length), T[1].includes(\">\") && (t = !1);\n continue;\n }\n }\n const b = e.match(/^([a-zA-Z][a-zA-Z0-9]*)(\\s*)(=)/);\n if (b && t && s === 0) {\n n.push({ text: b[1], type: \"jsx-attribute\" }), b[2] && n.push({ text: b[2], type: \"plain\" }), n.push({ text: \"=\", type: \"plain\" }), e = e.slice(b[0].length);\n continue;\n }\n const m = e.match(/^[{}]/);\n if (m) {\n n.push({ text: m[0], type: \"jsx-brace\" }), m[0] === \"{\" ? s++ : m[0] === \"}\" && s--, e = e.slice(1);\n continue;\n }\n const v = e.match(/^\\s+/);\n if (v) {\n n.push({ text: v[0], type: \"plain\" }), e = e.slice(v[0].length);\n continue;\n }\n const p = e.match(/^(=>|===|!==|==|!=|<=|>=|&&|\\|\\||[+\\-*/%=<>!&|^~?:;,()[\\]{}.])/);\n if (p) {\n n.push({ text: p[0], type: \"operator\" }), e = e.slice(p[0].length);\n continue;\n }\n const h = 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 (h) {\n n.push({ text: h[0], type: \"keyword\" }), e = e.slice(h[0].length);\n continue;\n }\n const x = e.match(/^(use[A-Z][a-zA-Z]*)\\b/);\n if (x) {\n n.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 n.push({ text: g[1], type: \"function\" }), e = e.slice(g[1].length);\n continue;\n }\n const y = 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 (y) {\n n.push({ text: y[0], type: \"type\" }), e = e.slice(y[0].length);\n continue;\n }\n const N = e.match(/^(\\d+\\.?\\d*)/);\n if (N) {\n n.push({ text: N[0], type: \"number\" }), e = e.slice(N[0].length);\n continue;\n }\n const C = e.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)\\s*(?=:)/);\n if (C && !t) {\n n.push({ text: C[1], type: \"property\" }), e = e.slice(C[1].length);\n continue;\n }\n n.push({ text: e[0], type: \"plain\" }), e = e.slice(1);\n }\n return n;\n}\nfunction yt(a, o) {\n const r = {\n ...ut,\n ...o\n };\n return a.map((n, e) => {\n const t = De(n);\n return /* @__PURE__ */ l(\"div\", { className: \"leading-6\", children: t.map((s, i) => /* @__PURE__ */ l(\"span\", { className: r[s.type] || \"text-gray-100\", children: s.text }, i)) }, e);\n });\n}\nfunction wt(a, o) {\n const r = { ...ft, ...o };\n let n = !1;\n return a.map((e, t) => {\n const { tokens: s, inComment: i } = vt(e, n);\n return n = i, /* @__PURE__ */ l(\"div\", { className: \"leading-6\", children: s.map((c, f) => /* @__PURE__ */ l(\"span\", { className: r[c.type] || \"text-gray-100\", children: c.text }, f)) }, t);\n });\n}\nfunction Nt(a, o) {\n const r = { ...mt, ...o };\n return a.map((n, e) => /* @__PURE__ */ l(\"div\", { className: \"leading-6\", children: gt(n).map((t, s) => /* @__PURE__ */ l(\"span\", { className: r[t.type] || \"text-gray-100\", children: t.text }, s)) }, e));\n}\nfunction Ct(a, o) {\n const r = { ...ht, ...o };\n let n = !1, e = 0;\n return a.map((t, s) => {\n if (t.trim() === \"\")\n return /* @__PURE__ */ l(\"div\", { className: \"leading-6\", children: \" \" }, s);\n const i = xt(t, n, e);\n t.includes(\"<\") && t.match(/<[a-zA-Z]/) && (n = !0), t.includes(\">\") && !t.includes(\"<\") && (n = !1, e = 0);\n const c = (t.match(/\\{/g) || []).length, f = (t.match(/\\}/g) || []).length;\n return e += c - f, e < 0 && (e = 0), /* @__PURE__ */ l(\"div\", { className: \"leading-6\", children: i.map((u, d) => /* @__PURE__ */ l(\"span\", { className: r[u.type] || \"text-gray-100\", children: u.text }, d)) }, s);\n });\n}\nfunction Et(a) {\n const [o, r] = k(!1), n = S(async () => {\n try {\n await navigator.clipboard.writeText(a), r(!0), setTimeout(() => r(!1), 3e3);\n } catch (e) {\n console.error(\"Failed to copy code:\", e);\n }\n }, [a]);\n return { copied: o, handleCopy: n };\n}\nfunction kt(a, o) {\n const r = j(null), n = j(null);\n return A(() => {\n if (a) {\n r.current = document.activeElement, document.body.style.overflow = \"hidden\", setTimeout(() => {\n var t;\n (t = n.current) == null || t.focus();\n }, 100);\n const e = (t) => {\n t.key === \"Escape\" && o(!1);\n };\n return document.addEventListener(\"keydown\", e), () => {\n document.removeEventListener(\"keydown\", e), document.body.style.overflow = \"\";\n };\n } else r.current && (r.current.focus(), r.current = null);\n }, [a, o]), { containerRef: n };\n}\nfunction zt(a, o, r, n) {\n return { handleKeyDown: S(\n (t) => {\n t.key === \"c\" && (t.metaKey || t.ctrlKey) && a ? (t.preventDefault(), r()) : t.key === \"f\" && o && (t.preventDefault(), n());\n },\n [a, o, r, n]\n ) };\n}\nfunction $t(a) {\n switch (a) {\n case \"typescript\":\n case \"ts\":\n return \"ts\";\n case \"tsx\":\n return \"tsx\";\n case \"json\":\n return \"json\";\n case \"bash\":\n case \"sh\":\n return \"sh\";\n default:\n return \"txt\";\n }\n}\nfunction xr({\n code: a,\n language: o = \"typescript\",\n allowCopy: r = !0,\n allowDownload: n = !1,\n allowFullscreen: e = !1,\n filename: t,\n showTrafficLights: s = !0,\n showLineNumbers: i = !1,\n hideHeader: c = !1,\n hideFiletype: f = !1,\n maxHeight: u,\n tokenClasses: d,\n className: b,\n id: m,\n ref: v,\n ...p\n}) {\n const [h, x] = k(!1), { containerRef: g } = kt(h, x), { copied: y, handleCopy: N } = Et(a), C = S(() => {\n const $ = t || `code.${$t(o)}`;\n Qe(a, $);\n }, [a, t, o]), T = S(() => {\n x(($) => !$);\n }, []), { handleKeyDown: D } = zt(r, e, N, T), z = q(() => a.split(`\n`), [a]), F = S(\n ($ = !0) => /* @__PURE__ */ E(\"div\", { className: w(\"flex items-center space-x-2\", !$ && \"absolute top-2 right-2 z-10\"), children: [\n !f && /* @__PURE__ */ l(\n \"span\",\n {\n className: \"text-xs text-gray-400 uppercase tracking-wide font-medium\",\n \"aria-label\": `Code language: ${o}`,\n children: o\n }\n ),\n e && /* @__PURE__ */ l(\n \"button\",\n {\n onClick: T,\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: h ? \"Exit fullscreen\" : \"Fullscreen\",\n \"aria-label\": h ? \"Exit fullscreen mode\" : \"Enter fullscreen mode\",\n \"aria-pressed\": h,\n type: \"button\",\n children: h ? /* @__PURE__ */ l(Be, { size: 14 }) : /* @__PURE__ */ l(We, { size: 14 })\n }\n ),\n n && /* @__PURE__ */ l(\n \"button\",\n {\n onClick: C,\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__ */ l(Me, { size: 14 })\n }\n ),\n r && /* @__PURE__ */ l(\n \"button\",\n {\n onClick: N,\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: y ? \"Code copied!\" : \"Copy code\",\n \"aria-label\": y ? \"Code copied to clipboard\" : \"Copy code to clipboard\",\n \"aria-live\": \"polite\",\n type: \"button\",\n children: y ? /* @__PURE__ */ l(ve, { size: 14, className: \"text-green-400\" }) : /* @__PURE__ */ l(Fe, { size: 14 })\n }\n )\n ] }),\n [\n f,\n o,\n e,\n h,\n n,\n C,\n r,\n N,\n y,\n T\n ]\n ), L = q(() => o === \"json\" ? Nt(z, d) : o === \"tsx\" || o === \"ts\" || o === \"typescript\" ? Ct(z, d) : o === \"bash\" || o === \"sh\" ? yt(z, d) : o === \"css\" ? wt(z, d) : [\n /* @__PURE__ */ l(\"span\", { className: \"text-gray-400\", children: \"Unsupported language\" }, 0)\n ], [z, d, o]), _ = q(() => i ? z.map(($, B) => /* @__PURE__ */ l(\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: B + 1\n },\n B\n )) : null, [i, z]), M = q(\n () => ({\n maxHeight: u && !h ? `${u}px` : h ? c ? \"calc(100vh - 5px)\" : \"calc(100vh - 45px)\" : void 0,\n overflow: u || h ? \"auto\" : \"visible\"\n }),\n [u, h, c]\n ), R = /* @__PURE__ */ E(\n \"div\",\n {\n id: m,\n ref: ($) => {\n g.current = $, typeof v == \"function\" ? v($) : v && (v.current = $);\n },\n className: w(\n \"bg-gray-900 rounded-lg border border-gray-700 overflow-hidden motion-reduce:transition-none\",\n h && \"fixed inset-0 z-[9999] max-h-fit\",\n b\n ),\n \"data-language\": o,\n \"data-filename\": t,\n \"data-fullscreen\": h,\n role: \"region\",\n \"aria-label\": `Code block${t ? ` for ${t}` : \"\"} in ${o}`,\n \"aria-describedby\": i ? `${m}-description` : void 0,\n tabIndex: 0,\n onKeyDown: D,\n ...p,\n children: [\n i && /* @__PURE__ */ E(\"div\", { id: `${m}-description`, className: \"sr-only\", children: [\n \"Code block with line numbers. Use Cmd+C or Ctrl+C to copy code.\",\n e && \" Press F to toggle fullscreen.\"\n ] }),\n /* @__PURE__ */ l(\"div\", { \"aria-live\": \"polite\", \"aria-atomic\": \"true\", className: \"sr-only\", children: y && \"Code copied to clipboard\" }),\n !c && /* @__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__ */ l(\"div\", { className: \"w-3 h-3 bg-red-500 rounded-full\" }),\n /* @__PURE__ */ l(\"div\", { className: \"w-3 h-3 bg-yellow-500 rounded-full\" }),\n /* @__PURE__ */ l(\"div\", { className: \"w-3 h-3 bg-green-500 rounded-full\" })\n ] }),\n t && /* @__PURE__ */ l(\"span\", { className: \"text-sm text-gray-300 font-medium\", children: t })\n ] }),\n F(!0)\n ] }),\n /* @__PURE__ */ E(\"div\", { className: w(\"flex overflow-hidden\", c && \"relative\"), style: M, children: [\n c && F(!1),\n /* @__PURE__ */ l(\"div\", { className: \"flex-1 overflow-x-auto\", children: /* @__PURE__ */ E(\"div\", { className: \"flex\", children: [\n i && /* @__PURE__ */ l(\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: _\n }\n ),\n /* @__PURE__ */ l(\"div\", { className: \"flex-1 p-4\", children: /* @__PURE__ */ l(\n \"pre\",\n {\n className: \"text-sm font-mono focus:outline-none\",\n role: \"code\",\n \"aria-label\": `${o} code content`,\n tabIndex: -1,\n children: /* @__PURE__ */ l(\"code\", { children: L })\n }\n ) })\n ] }) })\n ] })\n ]\n }\n );\n return /* @__PURE__ */ E(Y, { children: [\n !h && R,\n h && de(\n /* @__PURE__ */ E(Y, { children: [\n /* @__PURE__ */ l(\n \"div\",\n {\n className: \"fixed inset-0 bg-black z-[9998]\",\n onClick: () => x(!1),\n \"aria-hidden\": \"true\"\n }\n ),\n R\n ] }),\n document.body\n )\n ] });\n}\nfunction yr({\n children: a,\n label: o,\n isOpen: r,\n onToggle: n,\n id: e,\n ref: t,\n disabled: s = !1,\n className: i,\n buttonClassName: c\n}) {\n const f = K(), u = e ?? f, [d, b] = k(!1), m = r !== void 0 ? r : d, v = () => {\n s || (r === void 0 && b((p) => !p), n == null || n(!m));\n };\n return A(() => {\n b(r ?? !1);\n }, [r]), /* @__PURE__ */ E(\"div\", { ref: t, id: u, \"data-open\": m, className: w(\"overflow-hidden\", i), children: [\n /* @__PURE__ */ l(\n \"button\",\n {\n id: `${u}-button`,\n type: \"button\",\n \"aria-expanded\": m,\n \"aria-controls\": `${u}-panel`,\n disabled: s,\n tabIndex: 0,\n className: w(\n \"w-full px-4 py-3 font-medium hover:bg-primary/10 disabled:opacity-50 disabled:cursor-not-allowed\",\n c\n ),\n onClick: v,\n onKeyDown: (p) => {\n (p.key === \"Enter\" || p.key === \" \") && (p.preventDefault(), v());\n },\n \"data-open\": m,\n \"data-label\": typeof o == \"string\" ? o : void 0,\n children: /* @__PURE__ */ E(\"div\", { className: \"flex items-center w-full gap-2\", children: [\n /* @__PURE__ */ l(\"span\", { className: \"flex-1 text-left\", children: o }),\n m ? /* @__PURE__ */ l(Ke, { className: \"size-5\", \"aria-hidden\": \"true\" }) : /* @__PURE__ */ l(He, { className: \"size-5\", \"aria-hidden\": \"true\" })\n ] })\n }\n ),\n /* @__PURE__ */ l(\"div\", { id: `${u}-panel`, role: \"region\", \"aria-labelledby\": u, \"aria-live\": \"polite\", hidden: !m, children: a })\n ] });\n}\nfunction le({ elementId: a, type: o, message: r }) {\n return A(() => {\n const n = document.getElementById(a);\n if (n) {\n if (!r && o === \"error\") {\n n.removeAttribute(\"data-error\");\n return;\n }\n if (!r && o === \"success\") {\n n.removeAttribute(\"data-success\");\n return;\n }\n return n.setAttribute(\"aria-describedby\", `${a}-${o}-message`), n.setAttribute(\"aria-invalid\", o === \"error\" ? \"true\" : \"false\"), o === \"error\" && n.setAttribute(\"data-error\", \"true\"), o === \"success\" && n.setAttribute(\"data-success\", \"true\"), () => {\n n.removeAttribute(\"aria-describedby\"), n.removeAttribute(\"aria-invalid\"), n.removeAttribute(\"data-error\"), n.removeAttribute(\"data-success\");\n };\n }\n }, [a, o, r]), r ? /* @__PURE__ */ E(\n \"small\",\n {\n className: w(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start\",\n o === \"error\" && \"text-destructive\",\n o === \"success\" && \"text-success\"\n ),\n role: \"status\",\n children: [\n o === \"error\" ? /* @__PURE__ */ l(Te, {}) : /* @__PURE__ */ l(Ae, {}),\n /* @__PURE__ */ l(\"span\", { id: `${a}-${o}-message`, children: r })\n ]\n }\n ) : null;\n}\nconst At = {\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}, It = {\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 wr({\n variant: a = ye.variant,\n rounded: o,\n displayOnlyMode: r = !1,\n errorMessage: n,\n successMessage: e,\n type: t = \"text\",\n className: s,\n ...i\n}) {\n const c = K(), [f, u] = k(!1);\n let d = o;\n a === \"outline\" && !o && (d = \"md\"), d = d || ye.rounded;\n const v = w(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all\",\n \"file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors\",\n !r && At[a],\n !r && It[d],\n t === \"password\" && \"pr-10\",\n !r && \"px-2 py-1\",\n r && \"pointer-events-none\",\n s\n );\n return /* @__PURE__ */ E(\"div\", { className: w(r && \"cursor-text\"), style: { height: i.height, width: i.width }, children: [\n /* @__PURE__ */ E(\"div\", { className: w(t === \"password\" && \"relative\"), children: [\n /* @__PURE__ */ l(\n \"input\",\n {\n ...i,\n id: c,\n type: t === \"password\" && f ? \"text\" : t,\n \"aria-disabled\": i.disabled,\n readOnly: r,\n \"aria-readonly\": r || i[\"aria-readonly\"],\n \"data-error\": n ? !0 : void 0,\n \"data-success\": e ? !0 : void 0,\n className: v\n }\n ),\n t === \"password\" && /* @__PURE__ */ l(\n \"button\",\n {\n onClick: () => u(!f),\n className: \"absolute inset-y-0 right-0 px-2 hover:cursor-pointer\",\n \"aria-label\": \"Toggle password visibility\",\n \"data-state\": f ? \"visible\" : \"hidden\",\n children: f ? /* @__PURE__ */ l(Pe, { size: 20 }) : /* @__PURE__ */ l(_e, { size: 20 })\n }\n )\n ] }),\n !r && /* @__PURE__ */ l(le, { elementId: c, type: \"error\", message: n }),\n !r && /* @__PURE__ */ l(le, { elementId: c, type: \"success\", message: e })\n ] });\n}\nfunction Nr({\n display: a = \"inline\",\n width: o = \"fit-content\",\n className: r = \"\",\n required: n,\n helpMessage: e,\n suffix: t,\n htmlFor: s,\n children: i,\n description: c,\n ...f\n}) {\n var p, h;\n const u = K(), d = (((p = e == null ? void 0 : e.trim()) == null ? void 0 : p.length) || 0) > 0, b = (((h = c == null ? void 0 : c.trim()) == null ? void 0 : h.length) || 0) > 0, m = d ? `${s ?? u}-help` : void 0, v = b ? `${s ?? u}-description` : void 0;\n return /* @__PURE__ */ E(\n \"div\",\n {\n style: { display: a === \"inline\" ? \"inline-block\" : \"block\", width: o },\n className: w(\"mb-0.5\", r),\n children: [\n /* @__PURE__ */ E(\"div\", { className: \"relative flex\", children: [\n /* @__PURE__ */ E(\"label\", { className: \"font-medium\", htmlFor: s, ...f, children: [\n i,\n n && /* @__PURE__ */ l(\"span\", { className: \"text-red-500 font-medium ml-1\", \"aria-label\": \"required\", children: \"*\" })\n ] }),\n d && /* @__PURE__ */ l(\n \"span\",\n {\n className: \"text-gray-500 ml-1 size-fit -translate-y-1/3\",\n \"aria-describedby\": m,\n \"aria-label\": \"Help information\",\n title: e,\n children: /* @__PURE__ */ l(Ge, {})\n }\n ),\n d && /* @__PURE__ */ l(\"div\", { id: m, className: \"sr-only\", children: e }),\n t && /* @__PURE__ */ l(\"span\", { className: \"ml-1\", children: t })\n ] }),\n b && /* @__PURE__ */ l(\"small\", { id: v, className: \"block opacity-80 mt-0.5\", role: \"note\", children: c })\n ]\n }\n );\n}\nfunction St(a) {\n const [o, r] = k(!1), [n, e] = k(!1);\n return A(() => {\n a ? (e(!0), setTimeout(() => r(!0), 10)) : (r(!1), setTimeout(() => e(!1), 150));\n }, [a]), { show: o, shouldRender: n };\n}\nfunction Tt(a, o) {\n A(() => {\n const r = (n) => {\n n.key === \"Escape\" && a && o();\n };\n return document.addEventListener(\"keydown\", r), a && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", r), document.body.style.overflow = \"auto\";\n };\n }, [a, o]);\n}\nfunction Dt(a, o) {\n const r = j(null), n = S(() => {\n const e = document.getElementById(a);\n if (!e) return;\n const t = e.querySelectorAll('[data-modal-action=\"true\"]');\n if (t.length > 0) {\n t[0].focus();\n return;\n }\n const s = e.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const i = Array.from(s).filter((c) => !(c instanceof HTMLButtonElement && c.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (i.length > 0) {\n i[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n e.focus();\n }, [a]);\n A(() => (o && (r.current = document.activeElement, n()), () => {\n document.body.style.overflow = \"auto\", r.current instanceof HTMLElement && r.current.focus();\n }), [o, n]);\n}\nfunction Cr({\n id: a,\n isOpen: o,\n onClose: r,\n title: n,\n children: e,\n contentOnly: t = !1,\n className: s,\n overlayClassName: i,\n hideCloseButton: c = !1,\n actions: f = [],\n disableCloseOnOverlayClick: u = !1,\n ariaLabelledBy: d,\n ariaDescribedBy: b\n}) {\n const m = K(), v = a || `modal-${m}`, p = a ? `${a}-title` : `modal-title-${m}`, { show: h, shouldRender: x } = St(o);\n if (Dt(v, x), Tt(x, r), !x) return null;\n const g = () => n ? P.isValidElement(n) ? /* @__PURE__ */ l(\"div\", { className: \"mb-4\", children: n }) : /* @__PURE__ */ l(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: p, children: n }) : null, y = () => f.length === 0 ? null : /* @__PURE__ */ l(\"div\", { className: \"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3\", children: f.map((N, C) => {\n const { label: T, className: D, ...z } = N;\n return /* @__PURE__ */ l(nt, { className: D, type: \"button\", ...z, \"data-modal-action\": \"true\", children: T }, C);\n }) });\n return /* @__PURE__ */ l(Y, { children: de(\n /* @__PURE__ */ l(\n \"div\",\n {\n \"aria-labelledby\": d ?? n ? p : 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__ */ l(\n \"div\",\n {\n className: V(\"fixed inset-0 bg-black/20 transition-all\", i),\n onClick: () => {\n u || r();\n }\n }\n ),\n t && /* @__PURE__ */ l(\"div\", { className: V(\"relative w-fit\", s), children: e }),\n !t && /* @__PURE__ */ E(\n \"div\",\n {\n id: v,\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 h ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n s\n ),\n children: [\n !c && /* @__PURE__ */ l(\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__ */ l(ce, { size: 18 })\n }\n ),\n g(),\n e,\n y()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nconst Rt = {\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}, Lt = {\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 Er({\n page: a,\n pageCount: o = 5,\n maxVisiblePages: r = 5,\n showFirstLast: n = !0,\n onPageChange: e,\n size: t = \"md\",\n variant: s = \"link\",\n className: i,\n ref: c,\n buttonsClassName: f,\n ...u\n}) {\n const d = o === 1 / 0, m = S(() => {\n if (d) return [];\n const N = o, C = Math.min(r, N);\n if (N <= C)\n return Array.from({ length: N }, (F, L) => L + 1);\n const T = Math.floor(C / 2);\n let D = Math.max(1, a - T), z = Math.min(N, D + C - 1);\n return z - D + 1 < C && (D = Math.max(1, z - C + 1), z = Math.min(N, D + C - 1)), Array.from({ length: z - D + 1 }, (F, L) => D + L);\n }, [d, r, a, o])(), v = a > 1, p = d || a < o, h = n && !d, x = n && !d, g = (N) => {\n N >= 1 && (d || N <= o) && e(N);\n }, y = S(() => {\n const N = V(\n \"flex items-center justify-center min-w-fit\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n Lt[t],\n \"rounded-md\"\n );\n return V(N, Rt[s], f);\n }, [s, t, f]);\n return /* @__PURE__ */ E(\n \"nav\",\n {\n ref: c,\n className: V(\"flex items-center justify-center gap-1\", i),\n role: \"navigation\",\n \"aria-label\": \"Pagination\",\n \"data-page\": a,\n \"data-page-count\": d ? \"infinite\" : o,\n ...u,\n children: [\n h && /* @__PURE__ */ E(\n \"button\",\n {\n onClick: () => g(1),\n className: y(),\n disabled: a === 1,\n \"aria-label\": \"Go to first page\",\n children: [\n /* @__PURE__ */ l(Ze, { size: t === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ l(\"span\", { className: \"ml-1\", children: \"First\" })\n ]\n }\n ),\n /* @__PURE__ */ E(\n \"button\",\n {\n onClick: () => g(a - 1),\n className: y(),\n disabled: !v,\n \"aria-label\": \"Go to previous page\",\n children: [\n /* @__PURE__ */ l(Ie, { size: t === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ l(\"span\", { className: \"ml-1\", children: \"Previous\" })\n ]\n }\n ),\n !d && m.map((N) => /* @__PURE__ */ l(\n \"button\",\n {\n onClick: () => g(N),\n className: V(y(), \"aspect-square\"),\n \"aria-label\": `Go to page ${N}`,\n \"aria-current\": N === a ? !0 : void 0,\n children: N\n },\n N\n )),\n /* @__PURE__ */ E(\n \"button\",\n {\n onClick: () => g(a + 1),\n className: y(),\n disabled: !p,\n \"aria-label\": \"Go to next page\",\n children: [\n /* @__PURE__ */ l(\"span\", { className: \"mr-1\", children: \"Next\" }),\n /* @__PURE__ */ l(Se, { size: t === \"sm\" ? 12 : 15 })\n ]\n }\n ),\n x && /* @__PURE__ */ E(\n \"button\",\n {\n onClick: () => g(o),\n className: y(),\n disabled: a === o,\n \"aria-label\": \"Go to last page\",\n children: [\n /* @__PURE__ */ l(\"span\", { className: \"mr-1\", children: \"Last\" }),\n /* @__PURE__ */ l(qe, { size: t === \"sm\" ? 12 : 15 })\n ]\n }\n )\n ]\n }\n );\n}\nfunction jt(a) {\n const [o, r] = k(!1), [n, e] = k(!1);\n return A(() => {\n a ? (e(!0), setTimeout(() => r(!0), 10)) : (r(!1), setTimeout(() => e(!1), 300));\n }, [a]), { show: o, shouldRender: n };\n}\nfunction Vt(a, o) {\n A(() => {\n const r = (n) => {\n n.key === \"Escape\" && a && o();\n };\n return document.addEventListener(\"keydown\", r), a && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", r), document.body.style.overflow = \"auto\";\n };\n }, [a, o]);\n}\nfunction Bt(a, o) {\n const r = j(null), n = S(() => {\n const e = document.getElementById(a);\n if (!e) return;\n const t = e.querySelectorAll('[data-panel-action=\"true\"]');\n if (t.length > 0) {\n t[0].focus();\n return;\n }\n const s = e.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const i = Array.from(s).filter((c) => !(c instanceof HTMLButtonElement && c.getAttribute(\"data-panel-close-button\") === \"true\"));\n if (i.length > 0) {\n i[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n e.focus();\n }, [a]);\n A(() => (o && (r.current = document.activeElement, n()), () => {\n document.body.style.overflow = \"auto\", r.current instanceof HTMLElement && r.current.focus();\n }), [o, n]);\n}\nconst Wt = {\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 kr({\n ref: a,\n id: o,\n isOpen: r,\n onClose: n,\n title: e,\n children: t,\n footer: s,\n size: i = \"md\",\n className: c,\n overlayClassName: f,\n hideCloseButton: u = !1,\n disableCloseOnOverlayClick: d = !1,\n ariaLabelledBy: b,\n ariaDescribedBy: m\n}) {\n const v = K(), p = o || `panel-${v}`, h = o ? `${o}-title` : `panel-title-${v}`, { show: x, shouldRender: g } = jt(r);\n if (Bt(p, g), Vt(g, n), !g) return null;\n const y = () => e ? P.isValidElement(e) ? /* @__PURE__ */ l(\"div\", { children: e }) : /* @__PURE__ */ l(\"h2\", { className: \"text-2xl font-semibold\", id: h, children: e }) : null, N = () => {\n if (!s) return null;\n if (P.isValidElement(s)) {\n const C = s, T = C.props.className || \"\";\n return P.cloneElement(C, { className: V(\"px-6 py-4\", T) });\n }\n return /* @__PURE__ */ l(\"div\", { className: \"px-6 py-4\", children: s });\n };\n return /* @__PURE__ */ l(Y, { children: de(\n /* @__PURE__ */ E(\n \"div\",\n {\n \"aria-labelledby\": b ?? e ? h : void 0,\n \"aria-describedby\": m,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-hidden\",\n \"data-panel-open\": r,\n children: [\n /* @__PURE__ */ l(\n \"div\",\n {\n className: V(\n \"fixed inset-0 bg-black/40 transition-opacity duration-300\",\n x ? \"opacity-100\" : \"opacity-0\",\n f\n ),\n onClick: () => {\n d || n();\n }\n }\n ),\n /* @__PURE__ */ l(\"div\", { className: \"fixed inset-y-0 right-0 flex max-w-full\", children: /* @__PURE__ */ l(\n \"div\",\n {\n id: p,\n ref: a,\n tabIndex: -1,\n className: V(\n \"relative h-full transform shadow-xl bg-popover transition-transform duration-300 ease-in-out\",\n i !== \"screen\" && \"border-l border-border\",\n Wt.size[i],\n x ? \"translate-x-0\" : \"translate-x-full\",\n c\n ),\n \"data-panel-size\": i,\n children: /* @__PURE__ */ E(\"div\", { className: \"flex h-full flex-col\", children: [\n e && /* @__PURE__ */ l(\"div\", { className: \"px-6 pt-6\", children: y() }),\n !u && /* @__PURE__ */ l(\n \"button\",\n {\n type: \"button\",\n onClick: n,\n \"data-panel-close-button\": \"true\",\n \"aria-label\": \"Close panel\",\n className: \"rounded-md p-0.5 top-3 right-3 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ l(ce, { size: 18 })\n }\n ),\n /* @__PURE__ */ l(\"div\", { className: V(\"flex-1 overflow-y-auto px-6 pb-6\", e ? \"pt-6\" : \"pt-10\"), children: t }),\n N()\n ] })\n }\n ) })\n ]\n }\n ),\n document.body\n ) });\n}\nconst Mt = {\n left: \"left-0 origin-top-left\",\n center: \"left-1/2 -translate-x-1/2 origin-top\",\n right: \"right-0 origin-top-right\"\n};\nfunction zr({\n isOpen: a,\n children: o,\n className: r,\n closeOnOverlayClick: n = !0,\n trigger: e,\n alignment: t = \"center\",\n closeOnTriggerClick: s = !0\n}) {\n const [i, c] = P.useState(a !== void 0 ? a : !1), f = j(null), u = j(null), d = j(null), b = K();\n A(() => {\n a !== void 0 && c(a);\n }, [a]), A(() => {\n if (!i) return;\n const p = (h) => {\n h.key === \"Escape\" && (h.preventDefault(), c(!1));\n };\n return document.addEventListener(\"keydown\", p), () => document.removeEventListener(\"keydown\", p);\n }, [i]), A(() => {\n if (!i || !n) return;\n const p = (x) => {\n const g = x.target;\n f.current && !f.current.contains(g) && u.current && !u.current.contains(g) && c(!1);\n }, h = (x) => {\n const g = x.target;\n f.current && !f.current.contains(g) && u.current && !u.current.contains(g) && c(!1);\n };\n return document.addEventListener(\"pointerdown\", h), document.addEventListener(\"mousedown\", p), () => {\n document.removeEventListener(\"pointerdown\", h), document.removeEventListener(\"mousedown\", p);\n };\n }, [i, n]), A(() => {\n i ? (d.current = document.activeElement, setTimeout(() => {\n f.current && f.current.focus();\n }, 0)) : d.current && (d.current.focus(), d.current = null);\n }, [i]);\n const m = e.props, v = P.cloneElement(\n e,\n {\n \"aria-expanded\": i,\n \"aria-haspopup\": \"dialog\",\n \"aria-controls\": b,\n ref: Ye(u, m.ref),\n onClick: (p) => {\n var h;\n if (m.onClick && m.onClick(p), !(!s && i) && a === void 0) {\n if (p.defaultPrevented || (h = f.current) != null && h.contains(p.target)) return;\n c((x) => !x);\n }\n }\n }\n );\n return /* @__PURE__ */ E(\"div\", { className: \"relative inline-block\", children: [\n v,\n /* @__PURE__ */ l(\n \"div\",\n {\n id: b,\n ref: f,\n className: w(\n \"bg-popover text-popover-foreground z-[90] absolute top-full mt-2 transform rounded-md shadow-lg transition-all ease-out\",\n i ? \"opacity-100 scale-100\" : \"opacity-0 scale-75 pointer-events-none\",\n Mt[t],\n r\n ),\n role: \"dialog\",\n \"aria-modal\": \"true\",\n tabIndex: -1,\n children: o\n }\n )\n ] });\n}\nfunction Ft({ itemId: a, checked: o, onChange: r, name: n, disabled: e = !1, className: t = \"\" }) {\n const s = \"relative inline-flex items-center justify-center rounded-full\", i = () => {\n e || r();\n }, c = w(\n s,\n !o && \"hover:border-current/60\",\n !e && \"border-current cursor-pointer\",\n e && \"border-muted/60 cursor-not-allowed\",\n t\n );\n return /* @__PURE__ */ l(\n \"div\",\n {\n id: a,\n role: \"radio\",\n tabIndex: -1,\n \"aria-checked\": o,\n \"aria-disabled\": e,\n \"aria-description\": `Radio button for ${n}`,\n \"aria-labelledby\": `${a}-label`,\n onClick: i,\n className: c,\n style: {\n width: \"1em\",\n height: \"1em\",\n padding: \"0.1em\",\n borderWidth: \"0.06em\"\n },\n children: o && /* @__PURE__ */ l(\n \"div\",\n {\n className: w(\"size-full aspect-square rounded-full\", e && \"bg-muted/60\", !e && \"bg-current\")\n }\n )\n }\n );\n}\nfunction be({\n value: a,\n children: o,\n className: r = \"\",\n isSelected: n = !1,\n onChange: e,\n disabled: t = !1,\n hideInput: s = !1,\n description: i,\n name: c\n}) {\n const u = `radio-${K()}-${a}`, d = () => {\n t || e == null || e(a);\n };\n return /* @__PURE__ */ E(\n \"div\",\n {\n title: i,\n className: w(\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:${t ? \"border-current/50\" : \"border-current/80\"}`,\n s && !n && `border-transparent ${t ? \"\" : \"not-focus-within:hover:border-border/60\"}`,\n s && n && \"border-border\",\n t && \"opacity-60 cursor-not-allowed\"\n ),\n style: {\n gap: \"0.5em\"\n },\n children: [\n !s && /* @__PURE__ */ l(\n Ft,\n {\n itemId: u,\n name: c || \"\",\n checked: n,\n onChange: d,\n disabled: t,\n className: w(s && \"\")\n }\n ),\n /* @__PURE__ */ l(\n \"div\",\n {\n id: s ? u : void 0,\n tabIndex: s ? -1 : void 0,\n role: s ? \"radio\" : void 0,\n onClick: s ? d : void 0,\n \"aria-checked\": s ? n ? \"true\" : \"false\" : void 0,\n \"aria-disabled\": s ? t : void 0,\n \"aria-description\": s ? i || `Radio button for ${c}` : void 0,\n \"aria-labelledby\": s ? `${u}-label` : void 0,\n className: w(s && \"size-full\", typeof o == \"object\" && \"grow focus:outline-none\"),\n children: /* @__PURE__ */ l(\n \"label\",\n {\n id: `${u}-label`,\n onClick: s ? void 0 : d,\n className: w(t && \"cursor-not-allowed\", !t && \"cursor-pointer\"),\n children: o\n }\n )\n }\n )\n ]\n }\n );\n}\nfunction Kt(a, o) {\n const [r, n] = k(o), [e, t] = k(-1), [s, i] = k(!1), c = S((m, v) => {\n var x;\n const p = m[v];\n p.hasAttribute(\"disabled\") || p.getAttribute(\"aria-disabled\") === \"true\" || ((x = m[v]) == null || x.click(), t(v));\n }, []), f = S(\n (m, v) => {\n var h;\n if (m.preventDefault(), s || !v.length) return;\n const p = o !== -1 ? o : 0;\n (h = v[p]) == null || h.focus(), n(p), o !== -1 && c(v, p);\n },\n [o, s, c]\n ), u = S(\n (m) => {\n var x;\n if (!m.shiftKey)\n return;\n m.preventDefault();\n const v = Array.from(\n document.querySelectorAll(\n 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])'\n )\n ).filter((g) => !g.hasAttribute(\"disabled\") && g.tabIndex >= 0), p = v.findIndex((g) => g.id === a), h = p > 0 ? p - 1 : v.length - 1;\n (x = v[h]) == null || x.focus();\n },\n [a]\n ), d = S(\n (m, v) => {\n var y;\n if (!v.length) return;\n const p = m.target;\n if (!v.some((N) => N.id === p.id)) return;\n const x = r !== -1 ? r : 0;\n let g = x;\n switch (m.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n m.preventDefault(), g = x > 0 ? x - 1 : v.length - 1;\n break;\n case \"ArrowDown\":\n case \"ArrowRight\":\n m.preventDefault(), g = (x + 1) % v.length;\n break;\n // Select the option when the space key is pressed\n case \" \":\n m.preventDefault(), c(v, x);\n return;\n case \"Tab\":\n u(m);\n return;\n default:\n return;\n }\n (y = v[g]) == null || y.focus(), n(g), e !== -1 && c(v, g);\n },\n [r, e, u, c]\n ), b = S(() => {\n const m = document.querySelector(`[id=\"${a}\"][role=\"radiogroup\"]`);\n return m ? Array.from(m.querySelectorAll('[role=\"radio\"]')) : [];\n }, [a]);\n A(() => {\n const m = document.querySelector(`[id=\"${a}\"][role=\"radiogroup\"]`);\n if (!m) return;\n const v = b(), p = (y) => f(y, v), h = (y) => d(y, v), x = () => i(!0), g = () => i(!1);\n return document.addEventListener(\"keydown\", h), m.addEventListener(\"focus\", p), m.addEventListener(\"mousedown\", x), document.addEventListener(\"mouseup\", g), () => {\n document.removeEventListener(\"keydown\", h), m.removeEventListener(\"focus\", p), m.removeEventListener(\"mousedown\", x), document.removeEventListener(\"mouseup\", g);\n };\n }, [a, b, f, d]);\n}\nfunction $r({\n options: a = [],\n value: o,\n onChange: r,\n id: n,\n children: e,\n className: t = \"\",\n childrenClassName: s = \"\",\n hideInputs: i = !1\n}) {\n const c = K(), f = n || `radio-group-${c}`;\n Kt(\n f,\n a.findIndex((d) => d === o)\n );\n const u = q(() => a.reduce((d, b) => (typeof b == \"string\" ? d.some((m) => m.value === b) || d.push({ label: b, value: b }) : d.push(b), d), []), [a]);\n return /* @__PURE__ */ E(\"div\", { id: f, role: \"radiogroup\", tabIndex: 0, className: w(t, \"focus:outline-none\"), children: [\n u.length > 0 && u.map((d, b) => /* @__PURE__ */ l(\n be,\n {\n value: d.value,\n isSelected: o === d.value,\n onChange: r,\n name: f,\n disabled: d.disabled,\n description: d.description,\n hideInput: i,\n className: s,\n children: d.label\n },\n `${d.value}-${b}`\n )),\n u.length === 0 && e && P.Children.map(e, (d) => P.isValidElement(d) && d.type === be ? /* @__PURE__ */ l(\n be,\n {\n ...d.props,\n className: w(s, d.props.className),\n hideInput: d.props.hideInput || i,\n isSelected: o === d.props.value,\n onChange: r,\n name: f,\n children: d.props.children\n }\n ) : null)\n ] });\n}\nfunction Ht(a) {\n const o = j(null), r = j(null), n = j(null), [e, t] = k(!1), [s, i] = k(!1), [c, f] = k({\n vertical: !1,\n horizontal: !1\n }), u = j(null), d = j(null), b = S(() => {\n const p = o.current;\n if (!p) return;\n const h = p.scrollHeight > p.clientHeight, x = p.scrollWidth > p.clientWidth;\n f({\n vertical: h,\n horizontal: x\n });\n }, []), m = S(() => {\n const p = o.current, h = r.current, x = n.current;\n if (p) {\n if (h && c.vertical) {\n const y = (c.horizontal ? p.clientHeight - a : p.clientHeight) / p.scrollHeight, N = Math.max(y * 100, 10), C = p.scrollHeight - p.clientHeight, T = C > 0 ? p.scrollTop / C : 0, D = 100 - N, z = T * D;\n h.style.height = `${N}%`, h.style.top = `${z}%`, h.style.transform = \"none\";\n }\n if (x && c.horizontal) {\n const y = (c.vertical ? p.clientWidth - a : p.clientWidth) / p.scrollWidth, N = Math.max(y * 100, 10), C = p.scrollWidth - p.clientWidth, T = C > 0 ? p.scrollLeft / C : 0, D = 100 - N, z = T * D;\n x.style.width = `${N}%`, x.style.left = `${z}%`, x.style.transform = \"none\";\n }\n }\n }, [c, a]), v = S(() => {\n u.current && clearTimeout(u.current), d.current && clearTimeout(d.current), t(!0), i(!1), m(), u.current = setTimeout(() => {\n i(!0), d.current = setTimeout(() => {\n t(!1), i(!1);\n }, 300);\n }, 1e3);\n }, [m]);\n return A(() => {\n const p = o.current;\n if (!p) return;\n b();\n const h = new ResizeObserver(b);\n h.observe(p);\n const x = new MutationObserver(b);\n return x.observe(p, {\n childList: !0,\n subtree: !0,\n attributes: !0\n }), () => {\n h.disconnect(), x.disconnect();\n };\n }, [b]), A(() => {\n m();\n }, [c, m]), A(() => () => {\n u.current && clearTimeout(u.current), d.current && clearTimeout(d.current);\n }, []), {\n viewportRef: o,\n verticalThumbRef: r,\n horizontalThumbRef: n,\n isScrolling: e,\n isFadingOut: s,\n scrollbarVisible: c,\n handleScroll: v\n };\n}\nfunction Ar({\n className: a,\n thumbClassName: o,\n viewportClassName: r,\n scrollbarClassName: n,\n scrollbarThickness: e = 10,\n children: t,\n id: s,\n ref: i,\n ...c\n}) {\n const { viewportRef: f, verticalThumbRef: u, horizontalThumbRef: d, isScrolling: b, isFadingOut: m, scrollbarVisible: v, handleScroll: p } = Ht(e), h = V(\n \"relative flex-1 rounded-full bg-slate-400/60 hover:bg-slate-400/80 active:bg-slate-400\",\n o\n );\n return /* @__PURE__ */ E(\"div\", { ref: i, id: s, className: V(\"relative overflow-hidden\", a), \"data-scroll-area-root\": \"\", ...c, children: [\n /* @__PURE__ */ l(\n \"div\",\n {\n ref: f,\n className: V(\n \"h-full w-full overflow-auto rounded-[inherit] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden\",\n r\n ),\n onScroll: p,\n \"data-scroll-area-viewport\": \"\",\n children: t\n }\n ),\n v.vertical && (b || m) && /* @__PURE__ */ l(\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 m ? \"opacity-0\" : \"opacity-100\",\n n\n ),\n \"data-scroll-area-scrollbar\": \"vertical\",\n \"data-state\": b ? \"visible\" : \"hidden\",\n style: {\n width: `${e}px`,\n height: v.horizontal ? `calc(100% - ${e}px)` : \"100%\"\n },\n children: /* @__PURE__ */ l(\n \"div\",\n {\n ref: u,\n className: V(\"absolute rounded-full\", h),\n \"data-scroll-area-thumb\": \"\",\n style: { height: \"20%\", top: \"0%\", width: \"100%\" }\n }\n )\n }\n ),\n v.horizontal && (b || m) && /* @__PURE__ */ l(\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 m ? \"opacity-0\" : \"opacity-100\",\n n\n ),\n \"data-scroll-area-scrollbar\": \"horizontal\",\n \"data-state\": b ? \"visible\" : \"hidden\",\n style: {\n height: `${e}px`,\n width: v.vertical ? `calc(100% - ${e}px)` : \"100%\"\n },\n children: /* @__PURE__ */ l(\n \"div\",\n {\n ref: d,\n className: V(\"absolute rounded-full\", h),\n \"data-scroll-area-thumb\": \"\",\n style: { width: \"20%\", left: \"0%\", height: \"100%\" }\n }\n )\n }\n ),\n v.vertical && v.horizontal && /* @__PURE__ */ l(\n \"div\",\n {\n className: V(\"bg-transparent\", \"absolute bottom-0 right-0\"),\n \"data-scroll-area-corner\": \"\",\n style: {\n height: `${e}px`,\n width: `${e}px`\n }\n }\n )\n ] });\n}\nfunction Pt(a) {\n const [o, r] = k(!1), [n, e] = k(!1);\n return A(() => {\n a ? (e(!0), setTimeout(() => r(!0), 10)) : (r(!1), setTimeout(() => e(!1), 150));\n }, [a]), { show: o, shouldRender: n };\n}\nfunction _t({\n isOpen: a,\n setIsOpen: o,\n filteredOptions: r,\n highlightedIndex: n,\n setHighlightedIndex: e,\n onSelect: t,\n triggerRef: s\n}) {\n return { handleKeyDown: S(\n (c) => {\n var f;\n switch (c.key) {\n case \"ArrowDown\":\n if (c.preventDefault(), !a)\n o(!0);\n else {\n const u = n < r.length - 1 ? n + 1 : 0;\n let d = u;\n for (let b = 0; b < r.length; b++) {\n const m = (u + b) % r.length;\n if (!r[m].disabled) {\n d = m;\n break;\n }\n }\n e(d);\n }\n break;\n case \"ArrowUp\":\n if (c.preventDefault(), !a)\n o(!0);\n else {\n const u = n > 0 ? n - 1 : r.length - 1;\n let d = u;\n for (let b = 0; b < r.length; b++) {\n const m = (u - b + r.length) % r.length;\n if (!r[m].disabled) {\n d = m;\n break;\n }\n }\n e(d);\n }\n break;\n case \"Enter\":\n case \" \":\n if (c.preventDefault(), !a)\n o(!0);\n else if (n >= 0 && n < r.length) {\n const u = r[n];\n u.disabled || t(u);\n }\n break;\n case \"Escape\":\n c.preventDefault(), a && (o(!1), (f = s.current) == null || f.focus());\n break;\n case \"Tab\":\n a && o(!1);\n break;\n }\n },\n [a, o, r, n, e, t, s]\n ) };\n}\nfunction Gt({\n isOpen: a,\n filteredOptions: o,\n selectedOption: r,\n shouldRender: n,\n optionsContainerRef: e\n}) {\n const [t, s] = k(-1), i = q(() => r ? o.findIndex((c) => c.value === r.value) : -1, [o, r]);\n return A(() => {\n a && o.length > 0 ? s(r && i >= 0 ? i : 0) : s(-1);\n }, [o, a, r, i]), A(() => {\n if (t >= 0 && e.current && n) {\n const c = () => {\n const f = e.current, u = f == null ? void 0 : f.querySelector(`[data-option-index=\"${t}\"]`);\n if (u) {\n const d = a && r && t === i ? \"auto\" : \"smooth\";\n u.scrollIntoView({\n behavior: d,\n block: \"nearest\"\n });\n }\n };\n a && n && r ? setTimeout(c, 10) : c();\n }\n }, [t, n, a, r, o, e, i]), { highlightedIndex: t, 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 Ir({\n options: a,\n value: o,\n placeholder: r = \"Select an option...\",\n searchable: n = !1,\n disabled: e = !1,\n clearable: t = !1,\n size: s = \"md\",\n className: i,\n triggerClassName: c,\n dropdownClassName: f,\n id: u,\n ref: d,\n onChange: b,\n onSearch: m,\n searchPlaceholder: v = \"Search options...\"\n}) {\n const p = K(), x = `${u ?? p}-listbox`, g = (I) => `${x}-option-${I}`, [y, N] = k(!1), [C, T] = k(\"\"), D = j(null), z = j(null), F = j(null), L = j(null), { show: _, shouldRender: M } = Pt(y), R = q(() => !n || !C ? a : a.filter(\n (I) => {\n var W;\n return I.text.toLowerCase().includes(C.toLowerCase()) || ((W = I.description) == null ? void 0 : W.toLowerCase().includes(C.toLowerCase()));\n }\n ), [a, n, C]), $ = q(() => a.find((I) => I.value === o), [a, o]), { highlightedIndex: B, setHighlightedIndex: G } = Gt({\n isOpen: y,\n filteredOptions: R,\n selectedOption: $,\n shouldRender: M,\n optionsContainerRef: L\n }), U = B >= 0 ? g(B) : void 0;\n A(() => {\n y && M && n && z.current && z.current.focus();\n }, [y, n, M]);\n const J = S(\n (I) => {\n var W;\n I.disabled || (b == null || b(I.value), N(!1), T(\"\"), (W = D.current) == null || W.focus());\n },\n [b]\n ), { handleKeyDown: Z } = _t({\n isOpen: y,\n setIsOpen: N,\n filteredOptions: R,\n highlightedIndex: B,\n setHighlightedIndex: G,\n onSelect: J,\n triggerRef: D\n });\n A(() => {\n if (!y)\n return;\n const I = (W) => {\n var re;\n F.current && !F.current.contains(W.target) && !((re = D.current) != null && re.contains(W.target)) && (N(!1), T(\"\"));\n };\n return document.addEventListener(\"mousedown\", I), () => document.removeEventListener(\"mousedown\", I);\n }, [y]);\n const O = () => {\n e || (N(!y), y || (T(\"\"), G(-1)));\n }, ue = (I) => {\n I.disabled || (b == null || b(I.value), N(!1), T(\"\"));\n }, fe = (I) => {\n const W = I.target.value;\n T(W), m == null || m(W), G(-1);\n }, me = (I) => {\n I.preventDefault(), I.stopPropagation(), b == null || b(\"\");\n };\n return /* @__PURE__ */ E(\n \"div\",\n {\n className: w(\"relative\", i),\n id: u,\n ref: d,\n \"data-select\": \"true\",\n \"data-value\": o,\n \"data-searchable\": n,\n \"data-disabled\": e,\n \"data-clearable\": t,\n children: [\n /* @__PURE__ */ E(\"div\", { className: \"relative\", children: [\n /* @__PURE__ */ E(\n \"button\",\n {\n ref: D,\n type: \"button\",\n className: w(\n \"flex items-center justify-between w-full text-left bg-inherit border border-border rounded-md transition-colors\",\n \"hover:border-primary focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary\",\n e && \"opacity-50 cursor-not-allowed hover:border-border\",\n y && \"border-primary ring-1 ring-primary\",\n we[s].trigger,\n c\n ),\n onClick: O,\n onKeyDown: Z,\n disabled: e,\n \"aria-disabled\": e,\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": y,\n \"aria-controls\": y ? x : void 0,\n \"aria-activedescendant\": y && !n ? U : void 0,\n \"aria-label\": $ ? $.text : r,\n \"data-select-trigger\": \"true\",\n children: [\n /* @__PURE__ */ l(\"span\", { className: w(\"block truncate\", !$ && \"opacity-70\"), children: $ ? $.text : r }),\n /* @__PURE__ */ l(\"div\", { className: \"flex items-center ml-2\", children: /* @__PURE__ */ l($e, { size: 16, className: w(\"transition-transform duration-200\", y && \"rotate-180\") }) })\n ]\n }\n ),\n t && $ && /* @__PURE__ */ l(\n \"button\",\n {\n type: \"button\",\n onClick: me,\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__ */ l(ce, { size: 14, className: \"opacity-70 group-hover:opacity-100 transition-opacity\" })\n }\n )\n ] }),\n M && /* @__PURE__ */ E(\n \"div\",\n {\n ref: F,\n className: w(\n \"absolute z-50 w-full mt-1 bg-popover border border-border rounded-md shadow-lg transition-all duration-150\",\n _ ? \"opacity-100 translate-y-0\" : \"opacity-0 -translate-y-2\",\n f\n ),\n id: x,\n role: \"listbox\",\n \"data-select-content\": \"true\",\n children: [\n n && /* @__PURE__ */ l(\"div\", { className: \"border-b border-border\", children: /* @__PURE__ */ l(\n \"input\",\n {\n ref: z,\n type: \"text\",\n value: C,\n onChange: fe,\n onKeyDown: Z,\n placeholder: v,\n className: \"w-full px-2 py-2 text-inherit focus:outline-none\",\n \"aria-autocomplete\": \"list\",\n \"aria-controls\": x,\n \"aria-activedescendant\": U,\n \"data-select-search\": \"true\"\n }\n ) }),\n /* @__PURE__ */ l(\"div\", { ref: L, className: \"max-h-60 overflow-auto\", children: R.length > 0 ? R.map((I, W) => /* @__PURE__ */ E(\n \"div\",\n {\n id: g(W),\n className: w(\n \"flex items-center cursor-pointer transition-colors\",\n \"hover:bg-accent/10 focus:bg-accent/10\",\n we[s].options,\n I.disabled && \"opacity-50 cursor-not-allowed\",\n W === B && \"bg-accent/20\",\n o === I.value && \"bg-accent/30\"\n ),\n onClick: () => ue(I),\n role: \"option\",\n \"aria-selected\": o === I.value,\n \"aria-disabled\": I.disabled,\n \"data-select-option\": \"true\",\n \"data-value\": I.value,\n \"data-highlighted\": W === B,\n \"data-option-index\": W,\n children: [\n /* @__PURE__ */ E(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ l(\"div\", { className: \"font-medium\", children: I.text }),\n I.description && /* @__PURE__ */ l(\"div\", { className: \"text-xs opacity-70 mt-0.5\", children: I.description })\n ] }),\n o === I.value && /* @__PURE__ */ l(ve, { size: 16, className: \"ml-2 text-primary flex-shrink-0\" })\n ]\n },\n I.value\n )) : /* @__PURE__ */ l(\"div\", { className: \"px-3 py-2 text-sm opacity-70 text-center\", children: n && C ? \"No results found\" : \"No options available\" }) })\n ]\n }\n )\n ]\n }\n );\n}\nconst Zt = {\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}, qt = {\n horizontal: \"w-full\",\n vertical: \"min-h-4 h-full\"\n};\nfunction Sr({\n orientation: a = \"horizontal\",\n decorative: o = !1,\n thickness: r = \"thin\",\n className: n,\n ...e\n}) {\n const t = w(\n \"shrink-0 bg-border\",\n qt[a],\n Zt[r][a],\n n\n );\n return /* @__PURE__ */ l(\n \"div\",\n {\n ...e,\n className: t,\n role: o ? \"presentation\" : \"separator\",\n \"aria-orientation\": o ? void 0 : a,\n \"aria-hidden\": o,\n \"data-orientation\": a,\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 Tr({\n shape: a = \"rectangle\",\n lineSpacing: o = \"sm\",\n className: r,\n lines: n = 1,\n animate: e = !0,\n ref: t,\n ...s\n}) {\n const i = w(\"bg-muted/70\", e && \"animate-pulse\", Ne.shape[a], r);\n return n > 1 ? /* @__PURE__ */ l(\n \"div\",\n {\n ref: t,\n className: Ne.lineSpacing[o],\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-container\",\n \"data-lines\": n,\n \"data-shape\": a,\n \"data-animate\": e,\n ...s,\n children: Array.from({ length: n }, (c, f) => /* @__PURE__ */ l(\n \"div\",\n {\n className: w(\n i,\n // Make last line shorter for a more natural text appearance\n f === n - 1 && \"w-3/4\"\n ),\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-line\",\n \"data-line-index\": f\n },\n f\n ))\n }\n ) : /* @__PURE__ */ l(\n \"div\",\n {\n ref: t,\n className: i,\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton\",\n \"data-shape\": a,\n \"data-animate\": e,\n ...s\n }\n );\n}\nfunction Dr({\n id: a,\n value: o,\n defaultValue: r = 0,\n onValueChange: n,\n min: e = 0,\n max: t = 100,\n step: s = 1,\n disabled: i = !1,\n trackClassName: c,\n rangeClassName: f,\n thumbClassName: u,\n className: d,\n ref: b,\n ariaLabel: m,\n ariaLabelledBy: v,\n ...p\n}) {\n const [h, x] = k(r), g = o !== void 0, y = g ? o : h, N = j(null), C = j(!1), T = j(0), D = S(\n (R) => {\n const $ = Math.max(e, Math.min(t, R)), B = Math.round($ / s) * s;\n g || x(B), n == null || n(B);\n },\n [e, t, s, g, n]\n ), z = S(\n (R, $ = !1) => {\n var J;\n const B = (J = N.current) == null ? void 0 : J.getBoundingClientRect();\n if (!B) return y;\n let G = R.clientX;\n $ && (G = G - T.current);\n const U = Math.max(0, Math.min(1, (G - B.left) / B.width));\n return e + (t - e) * U;\n },\n [e, t, y]\n ), F = S(\n (R) => {\n if (i || R.target !== R.currentTarget) return;\n const $ = z(R);\n D($);\n },\n [i, z, D]\n ), L = S(\n (R) => {\n var J;\n if (i) return;\n R.stopPropagation(), C.current = !0;\n const $ = (J = N.current) == null ? void 0 : J.getBoundingClientRect(), B = R.currentTarget.getBoundingClientRect();\n if ($ && B) {\n const Z = B.left + B.width / 2;\n T.current = R.clientX - Z;\n }\n R.currentTarget.setPointerCapture(R.pointerId);\n const G = (Z) => {\n if (!C.current) return;\n const O = z(Z, !0);\n D(O);\n }, U = (Z) => {\n if (Z.pointerId === R.pointerId) {\n C.current = !1, T.current = 0;\n try {\n R.currentTarget.releasePointerCapture(Z.pointerId);\n } catch {\n }\n document.removeEventListener(\"pointermove\", G), document.removeEventListener(\"pointerup\", U);\n }\n };\n document.addEventListener(\"pointermove\", G), document.addEventListener(\"pointerup\", U);\n },\n [i, z, D]\n ), _ = S(\n (R) => {\n if (i) return;\n let $ = y;\n switch (R.key) {\n case \"ArrowRight\":\n case \"ArrowUp\":\n $ = y + s;\n break;\n case \"ArrowLeft\":\n case \"ArrowDown\":\n $ = y - s;\n break;\n case \"Home\":\n $ = e;\n break;\n case \"End\":\n $ = t;\n break;\n case \"PageUp\":\n $ = y + s * 10;\n break;\n case \"PageDown\":\n $ = y - s * 10;\n break;\n default:\n return;\n }\n R.preventDefault(), D($);\n },\n [i, y, s, e, t, D]\n ), M = t === e ? 0 : (y - e) / (t - e) * 100;\n return /* @__PURE__ */ l(\n \"div\",\n {\n id: a,\n ref: b,\n className: V(\n \"relative flex items-center w-full touch-none select-none\",\n i && \"opacity-50 cursor-not-allowed\",\n d\n ),\n \"data-disabled\": i,\n \"data-value\": y,\n \"data-min\": e,\n \"data-max\": t,\n \"data-step\": s,\n ...p,\n children: /* @__PURE__ */ E(\n \"div\",\n {\n ref: N,\n className: V(\n \"relative h-1.5 w-full rounded-full bg-muted cursor-pointer\",\n i && \"cursor-not-allowed\",\n c\n ),\n onPointerDown: F,\n children: [\n /* @__PURE__ */ l(\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 !C.current && \"transition-all\",\n f\n ),\n style: { width: `${M}%` }\n }\n ),\n /* @__PURE__ */ l(\n \"div\",\n {\n className: V(\n \"absolute size-5 -top-2 rounded-full shadow-md cursor-grab\",\n i && \"cursor-not-allowed\",\n !i && \"cursor-grab focus:outline-none focus:ring-2\",\n C.current ? \"cursor-grabbing scale-110\" : \"transition-all\",\n u\n ),\n style: { left: `calc(${M}% - 10px)` },\n tabIndex: i ? -1 : 0,\n role: \"slider\",\n \"aria-valuemin\": e,\n \"aria-valuemax\": t,\n \"aria-valuenow\": y,\n \"aria-label\": m,\n \"aria-labelledby\": v,\n \"aria-disabled\": i,\n onKeyDown: _,\n onPointerDown: L\n }\n )\n ]\n }\n )\n }\n );\n}\nfunction Rr({ children: a, ref: o, ...r }) {\n if (Le(a)) {\n let n = { ...r };\n return a.props && (n = { ...n, ...a.props }), je(a, {\n ...n,\n ref: (e) => {\n typeof o == \"function\" ? o(e) : o && (o.current = e);\n }\n });\n }\n return ze(\"div\", { ...r, ref: o }, a);\n}\nconst Ut = ({ defaultValue: a, value: o, onValueChange: r } = {}) => {\n const [n, e] = k(a || \"\"), t = o !== void 0, s = t ? o : n, i = S((c) => {\n t || e(c), r == null || r(c);\n }, [t, r]);\n return {\n value: s,\n onValueChange: i\n };\n};\nfunction Lr({\n defaultValue: a,\n value: o,\n onValueChange: r,\n tabsWidth: n = \"fit\",\n variant: e = \"underline\",\n className: t,\n children: s,\n ref: i,\n id: c,\n triggersClassName: f,\n contentClassName: u\n}) {\n const { value: d, onValueChange: b } = Ut({\n defaultValue: a,\n value: o,\n onValueChange: r\n }), m = {\n selectedValue: d,\n onValueChange: b,\n tabsWidth: n,\n variant: e,\n triggersClassName: f,\n contentClassName: u\n };\n return /* @__PURE__ */ l(Ue.Provider, { value: m, children: /* @__PURE__ */ l(\"div\", { id: c, ref: i, className: t, \"data-tabs-width\": n, \"data-variant\": e, children: s }) });\n}\nfunction jr({ value: a, className: o, children: r, ref: n }) {\n const { selectedValue: e, contentClassName: t } = ge(), s = e === a;\n return s ? /* @__PURE__ */ l(\n \"div\",\n {\n ref: n,\n role: \"tabpanel\",\n id: `tabs-content-${a}`,\n \"aria-labelledby\": `tabs-trigger-${a}`,\n \"data-state\": s ? \"active\" : \"inactive\",\n \"data-value\": a,\n className: w(\"mt-4 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2\", t, o),\n tabIndex: 0,\n children: r\n }\n ) : null;\n}\nconst Ce = {\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}, Xt = {\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 Vr({ children: a, className: o, id: r, ref: n }) {\n const { tabsWidth: e, variant: t } = ge();\n return /* @__PURE__ */ l(\n \"div\",\n {\n id: r,\n ref: n,\n role: \"tablist\",\n className: w(\"flex\", Ce.width[e], Ce.variant[t], o),\n \"data-tabs-width\": e,\n \"data-variant\": t,\n children: a\n }\n );\n}\nfunction Br({ value: a, disabled: o = !1, className: r, children: n, onClick: e, id: t, ref: s }) {\n const { selectedValue: i, onValueChange: c, variant: f, triggersClassName: u } = ge(), d = i === a, b = (v) => {\n o || c(a), e == null || e(v);\n };\n return /* @__PURE__ */ l(\n \"button\",\n {\n id: t,\n ref: s,\n role: \"tab\",\n type: \"button\",\n \"aria-selected\": d,\n \"aria-controls\": `tabs-content-${a}`,\n \"data-state\": d ? \"active\" : \"inactive\",\n \"data-value\": a,\n disabled: o,\n className: w(\n \"inline-flex items-center justify-center whitespace-nowrap px-3 py-2 text-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n d ? \"font-medium\" : \"font-light\",\n Xt[f],\n u,\n r\n ),\n onClick: b,\n children: n\n }\n );\n}\nfunction Jt({ elementId: a, maxLength: o }) {\n const [r, n] = k(0);\n return A(() => {\n const e = document.getElementById(a);\n if (!e)\n return;\n const t = () => {\n const s = e.value.length;\n n(s);\n const i = s >= o;\n e.setAttribute(\"aria-describedby\", `${a}-character-count`), e.setAttribute(\"aria-invalid\", i ? \"true\" : \"false\"), i ? e.setAttribute(\"data-error\", \"true\") : e.removeAttribute(\"data-error\");\n };\n return t(), e.addEventListener(\"input\", t), e.setAttribute(\"maxlength\", String(o)), () => {\n e.removeEventListener(\"input\", t), e.removeAttribute(\"maxlength\"), e.removeAttribute(\"aria-describedby\"), e.removeAttribute(\"aria-invalid\"), e.removeAttribute(\"data-error\");\n };\n }, [a, o]), /* @__PURE__ */ l(\n \"small\",\n {\n className: w(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end\",\n r >= o && \"text-destructive\",\n r < o && \"text-current\"\n ),\n role: \"status\",\n children: /* @__PURE__ */ E(\"span\", { id: `${a}-character-count`, children: [\n r,\n \" / \",\n o,\n \" characters\"\n ] })\n }\n );\n}\nfunction Qt(a, o) {\n A(() => {\n const r = document.getElementById(a);\n if (!r)\n return;\n if (!o) {\n r.style.height = \"auto\";\n return;\n }\n const n = () => {\n r.style.height = \"auto\", r.style.height = `${r.scrollHeight}px`;\n };\n return n(), r.addEventListener(\"input\", n), r.addEventListener(\"resize\", n), window.addEventListener(\"resize\", n), () => {\n r.removeEventListener(\"input\", n), r.removeEventListener(\"resize\", n), window.removeEventListener(\"resize\", n);\n };\n }, [a, o]);\n}\nconst Yt = {\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}, Ot = {\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 Wr({\n variant: a = Ee.variant,\n rounded: o,\n displayOnlyMode: r = !1,\n errorMessage: n,\n successMessage: e,\n hideResizeHandle: t = !1,\n autoExpand: s = !1,\n characterLimit: i = 0,\n className: c,\n ...f\n}) {\n const u = K();\n Qt(u, s || r);\n let d = o;\n a === \"outline\" && !o && (d = \"md\"), d = d || Ee.rounded;\n let b = t;\n (r || a === \"left-line\" && !t) && (b = !0);\n const v = w(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all\",\n !r && Yt[a],\n !r && Ot[d],\n !r && \"px-2 py-1\",\n r && \"pointer-events-none\",\n b && \"no-resize-handle\",\n c\n );\n return /* @__PURE__ */ E(\"div\", { className: w(\"-space-y-1.5\", r && \"cursor-text\"), children: [\n /* @__PURE__ */ l(\n \"textarea\",\n {\n ...f,\n id: u,\n \"aria-disabled\": f.disabled,\n readOnly: r,\n \"aria-readonly\": r || f[\"aria-readonly\"],\n style: {\n resize: s ? \"none\" : void 0\n },\n className: v\n }\n ),\n i > 0 && /* @__PURE__ */ l(Jt, { elementId: u, maxLength: i }),\n !r && /* @__PURE__ */ l(le, { elementId: u, type: \"error\", message: n }),\n !r && /* @__PURE__ */ l(le, { elementId: u, type: \"success\", message: e })\n ] });\n}\nconst er = {\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}, tr = {\n default: {\n unchecked: \"bg-muted\",\n checked: \"bg-primary\"\n },\n success: {\n unchecked: \"bg-muted\",\n checked: \"bg-success\"\n },\n destructive: {\n unchecked: \"bg-muted\",\n checked: \"bg-destructive\"\n }\n}, ke = {\n variant: \"default\",\n size: \"md\"\n};\nfunction Mr({\n ref: a,\n id: o,\n size: r = ke.size,\n variant: n = ke.variant,\n checked: e,\n onCheckedChange: t,\n disabled: s = !1,\n className: i,\n thumbClassName: c,\n backgroundClassNames: f,\n ...u\n}) {\n const d = K(), b = q(() => o || `toggle-${d}`, [o, d]), [m, v] = k(e);\n A(() => {\n v(e);\n }, [e]);\n const p = () => {\n if (!s) {\n const C = !m;\n e === void 0 && v(C), t == null || t(C);\n }\n }, h = (C) => {\n (C.key === \" \" || C.key === \"Enter\") && (C.preventDefault(), p());\n }, x = er[r], g = tr[n], y = w(\n // Base styles\n \"relative inline-flex items-center rounded-full transition-all duration-200 ease-in-out\",\n \"focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2\",\n // Size\n x.container,\n // Variant and state\n m ? (f == null ? void 0 : f.checked) || g.checked : (f == null ? void 0 : f.unchecked) || g.unchecked,\n // Disabled state\n s && \"opacity-50 cursor-not-allowed\",\n !s && \"cursor-pointer\",\n i\n ), N = w(\n // Base thumb styles\n \"absolute left-0.5 top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out\",\n // Size\n x.thumb,\n // Position based on state\n m && x.translate,\n c\n );\n return /* @__PURE__ */ E(\n \"button\",\n {\n ref: a,\n id: b,\n type: \"button\",\n role: \"switch\",\n tabIndex: 0,\n \"aria-checked\": m,\n \"aria-disabled\": s,\n disabled: s,\n onClick: p,\n onKeyDown: h,\n className: y,\n ...u,\n children: [\n /* @__PURE__ */ l(\"span\", { className: N }),\n /* @__PURE__ */ l(\"span\", { className: \"sr-only\", children: m ? \"Enabled\" : \"Disabled\" })\n ]\n }\n );\n}\nconst se = 8, ie = 4, X = 6;\nfunction rr(a) {\n return { calculatePosition: S(\n (r, n) => {\n const e = r.getBoundingClientRect(), t = n.getBoundingClientRect(), s = {\n width: window.innerWidth,\n height: window.innerHeight\n }, i = (b, m, v, p) => b < 0 || m < 0 || b + v > s.width || m + p > s.height, c = {\n top: {\n x: e.left + e.width / 2 - t.width / 2,\n y: e.top - t.height - ie,\n arrow: {\n x: t.width / 2 - X,\n y: t.height\n }\n },\n bottom: {\n x: e.left + e.width / 2 - t.width / 2,\n y: e.bottom + ie,\n arrow: {\n x: t.width / 2 - X,\n y: -6\n }\n },\n left: {\n x: e.left - t.width - ie,\n y: e.top + e.height / 2 - t.height / 2,\n arrow: {\n x: t.width,\n y: t.height / 2 - X\n }\n },\n right: {\n x: e.right + ie,\n y: e.top + e.height / 2 - t.height / 2,\n arrow: {\n x: -6,\n y: t.height / 2 - X\n }\n }\n };\n let f = a, u = c[a];\n if (i(u.x, u.y, t.width, t.height)) {\n const b = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\"\n }, m = c[b[a]];\n if (!i(m.x, m.y, t.width, t.height))\n f = b[a], u = m;\n else {\n const v = [\"top\", \"bottom\", \"left\", \"right\"].filter(\n (p) => p !== a && p !== b[a]\n );\n for (const p of v) {\n const h = c[p];\n if (!i(h.x, h.y, t.width, t.height)) {\n f = p, u = h;\n break;\n }\n }\n }\n }\n u.x = Math.max(\n se,\n Math.min(u.x, s.width - t.width - se)\n ), u.y = Math.max(\n se,\n Math.min(u.y, s.height - t.height - se)\n );\n const d = {\n x: e.left + e.width / 2,\n y: e.top + e.height / 2\n };\n return f === \"top\" || f === \"bottom\" ? u.arrow.x = Math.max(\n X,\n Math.min(d.x - u.x - X, t.width - X * 2)\n ) : u.arrow.y = Math.max(\n X,\n Math.min(d.y - u.y - X, t.height - X * 2)\n ), {\n ...u,\n placement: f\n };\n },\n [a]\n ) };\n}\nfunction nr(a, o, r) {\n const n = j(null), e = j(null), t = S(() => {\n if (!n.current || !e.current) return;\n const s = a(n.current, e.current);\n r(s);\n }, [a, r]);\n return A(() => {\n if (!o) return;\n const s = () => t();\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, [o, t]), {\n triggerRef: n,\n tooltipRef: e,\n updatePosition: t\n };\n}\nfunction ar(a, o, r, n, e, t, s, i, c) {\n const f = j(null), u = S(() => {\n a || (f.current && clearTimeout(f.current), f.current = window.setTimeout(() => {\n r(!0), requestAnimationFrame(() => {\n e(), n(!0);\n });\n }, o));\n }, [a, o, r, e, n]), d = S(\n (b = !1) => {\n if (f.current && clearTimeout(f.current), b) {\n n(!1), setTimeout(() => r(!1), 150);\n return;\n }\n f.current = window.setTimeout(() => {\n n(!1), setTimeout(() => r(!1), 150);\n }, 100);\n },\n [n, r]\n );\n return A(() => {\n !t && !s && !i && c && d();\n }, [t, s, i, c, d]), A(() => () => {\n f.current && clearTimeout(f.current);\n }, []), {\n showTooltip: u,\n hideTooltip: d,\n timeoutRef: f\n };\n}\nfunction Fr({\n id: a,\n children: o,\n message: r,\n placement: n = \"top\",\n disabled: e = !1,\n delay: t = 200,\n className: s\n}) {\n const [i, c] = k(!1), [f, u] = k(!1), [d, b] = k(null), [m, v] = k(!1), [p, h] = k(!1), [x, g] = k(!1), { calculatePosition: y } = rr(n), { triggerRef: N, tooltipRef: C, updatePosition: T } = nr(y, f, b), { showTooltip: D, hideTooltip: z, timeoutRef: F } = ar(\n e,\n t,\n u,\n c,\n T,\n m,\n p,\n x,\n i\n ), L = K(), _ = a ?? L;\n return /* @__PURE__ */ E(Y, { children: [\n P.cloneElement(o, {\n ref: (M) => {\n N.current = M;\n },\n onMouseEnter: () => {\n v(!0), D();\n },\n onMouseLeave: () => {\n v(!1);\n },\n onFocus: () => {\n g(!0), D();\n },\n onBlur: () => {\n g(!1), z(!0);\n },\n onKeyDown: (M) => {\n M.key === \"Escape\" && z(!0);\n },\n \"aria-describedby\": e ? void 0 : _\n }),\n f && de(\n /* @__PURE__ */ l(\n \"div\",\n {\n ref: C,\n id: _,\n role: \"tooltip\",\n className: w(\n \"fixed z-50 px-2 py-1 text-sm rounded shadow-lg bg-popover pointer-events-auto transition-all duration-150 ease-out\",\n i ? \"opacity-100\" : \"opacity-0\",\n s\n ),\n style: d ? { left: d.x, top: d.y } : { opacity: 0 },\n onMouseEnter: () => {\n h(!0), F.current && clearTimeout(F.current);\n },\n onMouseLeave: () => {\n h(!1);\n },\n children: r\n }\n ),\n document.body\n )\n ] });\n}\nexport {\n mr as Accordion,\n he as AccordionItem,\n Pr as ActionModal,\n nt as Button,\n hr as Callout,\n pr as Carousel,\n br as Checkbox,\n vr as Clickable,\n gr as Code,\n xr as CodeBlock,\n yr as Disclosure,\n wr as Input,\n Nr as Label,\n Oe as LoadingDots,\n Cr as Modal,\n Er as Pagination,\n kr as Panel,\n zr as Popover,\n $r as RadioGroup,\n be as RadioGroupItem,\n Ft as RadioInput,\n Ar as ScrollArea,\n Ir as Select,\n Sr as Separator,\n Tr as Skeleton,\n Dr as Slider,\n Rr as Slot,\n Lr as Tabs,\n jr as TabsContent,\n Vr as TabsList,\n Br as TabsTrigger,\n Wr as Textarea,\n _r as Toast,\n Mr 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","l","i","e","N","Oe","a","o","k","A","r","w","et","tt","rt","pe","nt","c","f","d","E","St","Tt","Dt","j","S","Cr","u","b","m","K","v","p","x","g","P","y","T","D","z","Y","de","V","ce","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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