@opencxh/ui-kit 3.158.0 → 3.160.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { clsx as ut } from "clsx";
2
- import ce, { useState as j, useLayoutEffect as mt, useRef as ae, useEffect as G, forwardRef as be, useMemo as pe, useCallback as xe, createContext as Xe, useId as ft, useContext as ht, Component as xt } from "react";
3
- import { jsxs as c, jsx as e, Fragment as ke } from "react/jsx-runtime";
2
+ import ce, { useState as F, useLayoutEffect as mt, useRef as te, useEffect as Y, forwardRef as be, useMemo as ge, useCallback as xe, createContext as Xe, useId as ft, useContext as ht, Component as xt } from "react";
3
+ import { jsxs as c, jsx as e, Fragment as Ce } from "react/jsx-runtime";
4
4
  import * as bt from "lucide-react";
5
- import { VideoOff as gt, User as pt, MicOff as vt, Mic as yt, X as we, ChevronDown as $e, ExternalLink as Nt, Calendar as wt, ChevronLeft as Ce, ChevronRight as De, ChevronDownIcon as kt, Loader2 as Ct, Search as Ae, Check as He, ChevronUp as St, Ellipsis as Et, FileText as Pe, HardDrive as qe, ArrowLeft as zt, FolderPlus as Mt, Upload as Tt, Folder as Ve, Trash2 as _t, Plus as $t, Sparkles as Dt, ImageOff as At, Pencil as Lt, ArrowUpRight as It } from "lucide-react";
5
+ import { VideoOff as gt, User as pt, MicOff as vt, Mic as yt, X as ke, ChevronDown as $e, ExternalLink as Nt, Calendar as wt, ChevronLeft as Se, ChevronRight as De, ChevronDownIcon as kt, Loader2 as Ct, Search as Ae, Check as He, ChevronUp as St, Ellipsis as Et, FileText as Pe, HardDrive as qe, ArrowLeft as zt, FolderPlus as Mt, Upload as Tt, Folder as Ve, Trash2 as _t, Plus as $t, Sparkles as Dt, ImageOff as At, Pencil as Lt, ArrowUpRight as It } from "lucide-react";
6
6
  import Pt from "dompurify";
7
7
  import Ot from "react-markdown";
8
8
  import jt from "remark-gfm";
@@ -16,17 +16,17 @@ function Un(t) {
16
16
  return (r) => t[r] || "";
17
17
  }
18
18
  function Le(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
19
- const [l, o] = j({});
19
+ const [l, o] = F({});
20
20
  return mt(() => {
21
21
  if (!t) return;
22
- const m = () => {
22
+ const u = () => {
23
23
  const d = r.current;
24
24
  if (!d) return;
25
- const v = d.getBoundingClientRect(), h = window.innerHeight - v.bottom, u = v.top, b = a.startsWith("top"), g = b ? u < 200 && h > u : h < 200 && u > h, w = b !== g, p = { position: "fixed" };
26
- w ? (p.bottom = window.innerHeight - v.top + n, p.maxHeight = Math.max(120, u - n * 2)) : (p.top = v.bottom + n, p.maxHeight = Math.max(120, h - n * 2)), a.endsWith("end") ? p.right = window.innerWidth - v.right : p.left = v.left, s && (p.width = v.width), o(p);
25
+ const v = d.getBoundingClientRect(), h = window.innerHeight - v.bottom, m = v.top, b = a.startsWith("top"), g = b ? m < 200 && h > m : h < 200 && m > h, w = b !== g, p = { position: "fixed" };
26
+ w ? (p.bottom = window.innerHeight - v.top + n, p.maxHeight = Math.max(120, m - n * 2)) : (p.top = v.bottom + n, p.maxHeight = Math.max(120, h - n * 2)), a.endsWith("end") ? p.right = window.innerWidth - v.right : p.left = v.left, s && (p.width = v.width), o(p);
27
27
  };
28
- return m(), window.addEventListener("scroll", m, !0), window.addEventListener("resize", m), () => {
29
- window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", m);
28
+ return u(), window.addEventListener("scroll", u, !0), window.addEventListener("resize", u), () => {
29
+ window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
30
30
  };
31
31
  }, [t, r, n, s, a]), l;
32
32
  }
@@ -66,7 +66,7 @@ function Kn(t) {
66
66
  for (let n = 0; n < t.length; n++) r = r * 31 + t.charCodeAt(n) >>> 0;
67
67
  return Ue[r % Ue.length];
68
68
  }
69
- const Me = (t) => t == null ? "" : String(t), qt = (t) => Me(t).trim().toLowerCase();
69
+ const Te = (t) => t == null ? "" : String(t), qt = (t) => Te(t).trim().toLowerCase();
70
70
  function Gn({ tiles: t, pinned: r, className: n }) {
71
71
  if (r)
72
72
  return /* @__PURE__ */ c("div", { className: i("flex flex-col md:flex-row gap-2 h-full min-h-0", n), children: [
@@ -84,14 +84,14 @@ function Jn({
84
84
  hasVideo: a,
85
85
  videoSlot: l,
86
86
  className: o,
87
- fill: m
87
+ fill: u
88
88
  }) {
89
89
  return /* @__PURE__ */ c(
90
90
  "div",
91
91
  {
92
92
  className: i(
93
93
  "relative rounded-lg overflow-hidden bg-video-surface flex items-center justify-center",
94
- m ? "h-full w-full" : "aspect-video",
94
+ u ? "h-full w-full" : "aspect-video",
95
95
  s && "ring-2 ring-speaking",
96
96
  o
97
97
  ),
@@ -106,8 +106,8 @@ function Jn({
106
106
  );
107
107
  }
108
108
  function Yn({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
109
- const a = ae(null);
110
- return G(() => {
109
+ const a = te(null);
110
+ return Y(() => {
111
111
  if (!r || !a.current) return;
112
112
  const l = t(a.current);
113
113
  return () => {
@@ -154,7 +154,7 @@ const Vt = {
154
154
  xl: "h-control-xl w-10",
155
155
  "2xl": "h-control-2xl w-12",
156
156
  full: "h-control-md w-8"
157
- }, te = be(
157
+ }, ne = be(
158
158
  ({
159
159
  variant: t = "primary",
160
160
  size: r = "md",
@@ -163,11 +163,11 @@ const Vt = {
163
163
  leftIcon: a,
164
164
  rightIcon: l,
165
165
  iconOnly: o = !1,
166
- shape: m = "default",
166
+ shape: u = "default",
167
167
  className: d,
168
168
  children: v,
169
169
  disabled: h,
170
- ...u
170
+ ...m
171
171
  }, b) => {
172
172
  const g = h || s;
173
173
  return /* @__PURE__ */ c(
@@ -180,7 +180,7 @@ const Vt = {
180
180
  // the same weight as an emphasised nav item, and 600 at 12–13px
181
181
  // reads as a heavier control than the surrounding chrome.
182
182
  "inline-flex shrink-0 items-center justify-center gap-2 cursor-pointer font-medium",
183
- m === "circle" ? "rounded-full" : "rounded-md",
183
+ u === "circle" ? "rounded-full" : "rounded-md",
184
184
  "transition-colors duration-fast ease-out",
185
185
  "focus-visible:outline-none focus-visible:focus-ring",
186
186
  "disabled:cursor-not-allowed disabled:border-border-subtle",
@@ -193,7 +193,7 @@ const Vt = {
193
193
  ),
194
194
  disabled: g,
195
195
  "aria-busy": s || void 0,
196
- ...u,
196
+ ...m,
197
197
  children: [
198
198
  s && /* @__PURE__ */ e(
199
199
  "span",
@@ -211,7 +211,7 @@ const Vt = {
211
211
  );
212
212
  }
213
213
  );
214
- te.displayName = "Button";
214
+ ne.displayName = "Button";
215
215
  const Xn = ({
216
216
  children: t,
217
217
  size: r = "md",
@@ -266,7 +266,7 @@ const Kt = {
266
266
  onClick: a,
267
267
  className: l,
268
268
  "aria-label": o,
269
- ...m
269
+ ...u
270
270
  }) => {
271
271
  const d = typeof r == "number" ? r : Gt(r), v = i(
272
272
  "inline-block shrink-0",
@@ -285,10 +285,10 @@ const Kt = {
285
285
  "aria-hidden": o ? void 0 : !0,
286
286
  role: s ? "button" : void 0,
287
287
  tabIndex: s ? 0 : void 0,
288
- onKeyDown: s ? (u) => {
289
- (u.key === "Enter" || u.key === " ") && (u.preventDefault(), a?.());
288
+ onKeyDown: s ? (m) => {
289
+ (m.key === "Enter" || m.key === " ") && (m.preventDefault(), a?.());
290
290
  } : void 0,
291
- ...m
291
+ ...u
292
292
  };
293
293
  return /* @__PURE__ */ e(t, { ...h });
294
294
  };
@@ -309,15 +309,15 @@ const et = ({
309
309
  rootClassName: a,
310
310
  triggerClassName: l,
311
311
  disabled: o = !1,
312
- triggerLabel: m
312
+ triggerLabel: u
313
313
  }) => {
314
- const [d, v] = j(!1), h = ae(null), u = ae(null), b = Le(d, u, { placement: n });
315
- G(() => {
314
+ const [d, v] = F(!1), h = te(null), m = te(null), b = Le(d, m, { placement: n });
315
+ Y(() => {
316
316
  if (!d) return;
317
- const p = (S) => {
318
- h.current && !h.current.contains(S.target) && v(!1);
319
- }, x = (S) => {
320
- S.key === "Escape" && v(!1);
317
+ const p = (C) => {
318
+ h.current && !h.current.contains(C.target) && v(!1);
319
+ }, x = (C) => {
320
+ C.key === "Escape" && v(!1);
321
321
  };
322
322
  return document.addEventListener("mousedown", p), document.addEventListener("keydown", x), () => {
323
323
  document.removeEventListener("mousedown", p), document.removeEventListener("keydown", x);
@@ -330,11 +330,11 @@ const et = ({
330
330
  /* @__PURE__ */ e(
331
331
  "button",
332
332
  {
333
- ref: u,
333
+ ref: m,
334
334
  type: "button",
335
335
  onClick: g,
336
336
  disabled: o,
337
- "aria-label": m,
337
+ "aria-label": u,
338
338
  "aria-expanded": d,
339
339
  className: i(
340
340
  "inline-flex items-center",
@@ -388,44 +388,44 @@ function Zt({
388
388
  size: a = "md",
389
389
  active: l = !1,
390
390
  caret: o = !1,
391
- menu: m,
391
+ menu: u,
392
392
  menuClassName: d,
393
393
  onClear: v,
394
394
  clearLabel: h = "Filter wissen",
395
- onClick: u,
395
+ onClick: m,
396
396
  title: b,
397
397
  className: g
398
398
  }) {
399
- const w = l && !!v, p = s === "pill" ? "rounded-full" : "rounded-md", x = Yt({ active: l, tone: n, shape: s, size: a, className: g }), S = /* @__PURE__ */ c(ke, { children: [
399
+ const w = l && !!v, p = s === "pill" ? "rounded-full" : "rounded-md", x = Yt({ active: l, tone: n, shape: s, size: a, className: g }), C = /* @__PURE__ */ c(Ce, { children: [
400
400
  r,
401
401
  t,
402
402
  o && /* @__PURE__ */ e(Z, { icon: $e, size: "xs" })
403
- ] }), _ = Xt({ shape: s, withClear: w }), B = w && /* @__PURE__ */ e(
403
+ ] }), E = Xt({ shape: s, withClear: w }), j = w && /* @__PURE__ */ e(
404
404
  "button",
405
405
  {
406
406
  type: "button",
407
407
  "aria-label": h,
408
408
  onClick: v,
409
409
  className: i("inline-flex h-full items-center pr-3 focus-visible:outline-none focus-visible:focus-ring", p),
410
- children: /* @__PURE__ */ e(Z, { icon: we, size: "xs" })
410
+ children: /* @__PURE__ */ e(Z, { icon: ke, size: "xs" })
411
411
  }
412
412
  );
413
- return m ? /* @__PURE__ */ c("span", { className: x, title: b, children: [
413
+ return u ? /* @__PURE__ */ c("span", { className: x, title: b, children: [
414
414
  /* @__PURE__ */ e(
415
415
  et,
416
416
  {
417
- trigger: S,
417
+ trigger: C,
418
418
  rootClassName: "h-full",
419
- triggerClassName: i(_, "h-full"),
419
+ triggerClassName: i(E, "h-full"),
420
420
  className: i("min-w-menu p-1.5", d),
421
- children: m
421
+ children: u
422
422
  }
423
423
  ),
424
- B
424
+ j
425
425
  ] }) : w ? /* @__PURE__ */ c("span", { className: x, title: b, children: [
426
- /* @__PURE__ */ e("button", { type: "button", onClick: u, className: _, children: S }),
427
- B
428
- ] }) : /* @__PURE__ */ e("button", { type: "button", title: b, onClick: u, className: i(x, _), children: S });
426
+ /* @__PURE__ */ e("button", { type: "button", onClick: m, className: E, children: C }),
427
+ j
428
+ ] }) : /* @__PURE__ */ e("button", { type: "button", title: b, onClick: m, className: i(x, E), children: C });
429
429
  }
430
430
  const Qt = {
431
431
  xs: "text-xs",
@@ -459,12 +459,12 @@ const Qt = {
459
459
  external: a = !1,
460
460
  className: l,
461
461
  children: o,
462
- href: m,
462
+ href: u,
463
463
  target: d,
464
464
  rel: v,
465
465
  ...h
466
466
  }) => {
467
- const u = a || m && (m.startsWith("http") || m.startsWith("mailto:")), b = i(
467
+ const m = a || u && (u.startsWith("http") || u.startsWith("mailto:")), b = i(
468
468
  "inline-flex items-center gap-1 underline-offset-2",
469
469
  "transition-colors duration-fast ease-out",
470
470
  "focus-visible:outline-none focus-visible:focus-ring",
@@ -480,14 +480,14 @@ const Qt = {
480
480
  l
481
481
  ), g = {
482
482
  ...h,
483
- href: s ? void 0 : m,
484
- target: u ? "_blank" : d,
485
- rel: u ? "noopener noreferrer" : v,
483
+ href: s ? void 0 : u,
484
+ target: m ? "_blank" : d,
485
+ rel: m ? "noopener noreferrer" : v,
486
486
  "aria-disabled": s || void 0
487
487
  };
488
488
  return /* @__PURE__ */ c("a", { className: b, ...g, children: [
489
489
  o,
490
- u && /* @__PURE__ */ e(Nt, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
490
+ m && /* @__PURE__ */ e(Nt, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
491
491
  ] });
492
492
  }, rr = {
493
493
  sm: "h-control-sm px-3 text-sm",
@@ -501,13 +501,13 @@ function nr({
501
501
  tone: a = "sunk",
502
502
  fullWidth: l = !1,
503
503
  className: o,
504
- "aria-label": m
504
+ "aria-label": u
505
505
  }) {
506
506
  return /* @__PURE__ */ e(
507
507
  "div",
508
508
  {
509
509
  role: "tablist",
510
- "aria-label": m,
510
+ "aria-label": u,
511
511
  className: i(
512
512
  "gap-0.5 rounded-md p-0.5",
513
513
  a === "track" ? "bg-surface-track" : "bg-surface-sunk",
@@ -557,11 +557,11 @@ function tt({
557
557
  icon: a,
558
558
  options: l,
559
559
  disabled: o = !1,
560
- loading: m = !1,
560
+ loading: u = !1,
561
561
  menuPlacement: d = "bottom-end",
562
562
  menuLabel: v = "More options"
563
563
  }) {
564
- const h = o || m, u = l.length > 0;
564
+ const h = o || u, m = l.length > 0;
565
565
  return (
566
566
  // De scheiding tussen beide helften is een kier in de vulling, niet een
567
567
  // lijn: bij een ink-gevulde knop leest 2px als een spleet. 1px is genoeg
@@ -569,19 +569,19 @@ function tt({
569
569
  // eigen randen al en houden de helften tegen elkaar.
570
570
  /* @__PURE__ */ c("div", { className: i("inline-flex items-center", n === "primary" && "gap-px"), children: [
571
571
  /* @__PURE__ */ e(
572
- te,
572
+ ne,
573
573
  {
574
574
  variant: n,
575
575
  size: s,
576
576
  onClick: r,
577
577
  disabled: o,
578
- loading: m,
578
+ loading: u,
579
579
  leftIcon: a,
580
- className: i(u && "rounded-r-none"),
580
+ className: i(m && "rounded-r-none"),
581
581
  children: t
582
582
  }
583
583
  ),
584
- u && /* @__PURE__ */ e(
584
+ m && /* @__PURE__ */ e(
585
585
  et,
586
586
  {
587
587
  placement: d,
@@ -602,7 +602,7 @@ function tt({
602
602
  children: /* @__PURE__ */ e($e, { className: "size-icon-md" })
603
603
  }
604
604
  ),
605
- children: (b) => /* @__PURE__ */ e(ke, { children: l.map((g) => /* @__PURE__ */ c(
605
+ children: (b) => /* @__PURE__ */ e(Ce, { children: l.map((g) => /* @__PURE__ */ c(
606
606
  "button",
607
607
  {
608
608
  type: "button",
@@ -651,11 +651,11 @@ const lr = {
651
651
  indeterminate: a = !1,
652
652
  containerClassName: l,
653
653
  labelClassName: o,
654
- className: m,
654
+ className: u,
655
655
  id: d,
656
656
  ...v
657
657
  }, h) => {
658
- const u = ce.useId(), b = d || `checkbox-${u}`, g = !!n, w = ce.useRef(null), p = ce.useCallback(
658
+ const m = ce.useId(), b = d || `checkbox-${m}`, g = !!n, w = ce.useRef(null), p = ce.useCallback(
659
659
  (x) => {
660
660
  w.current = x, typeof h == "function" ? h(x) : h && typeof h == "object" && (h.current = x);
661
661
  },
@@ -683,7 +683,7 @@ const lr = {
683
683
  "disabled:cursor-not-allowed disabled:bg-surface-hover",
684
684
  lr[s],
685
685
  g ? "border-danger-border" : "border-border-strong",
686
- m
686
+ u
687
687
  ),
688
688
  ...v
689
689
  }
@@ -750,14 +750,14 @@ const ir = {
750
750
  align: a = "left",
751
751
  truncate: l = !1,
752
752
  italic: o = !1,
753
- underline: m = !1,
753
+ underline: u = !1,
754
754
  lineHeight: d = "normal",
755
755
  as: v,
756
756
  className: h,
757
- children: u,
757
+ children: m,
758
758
  ...b
759
759
  }) => {
760
- const g = v || hr(t), w = t === "caption", p = t === "label", x = t === "code", S = i(
760
+ const g = v || hr(t), w = t === "caption", p = t === "label", x = t === "code", C = i(
761
761
  "font-sans",
762
762
  // Variant — caption and label pin their own size/weight
763
763
  w && "text-xs text-text-subtle",
@@ -772,11 +772,11 @@ const ir = {
772
772
  // Line height only overrides the body variant
773
773
  t === "body" && fr[d],
774
774
  o && "italic",
775
- m && "underline",
775
+ u && "underline",
776
776
  l && "truncate",
777
777
  h
778
778
  );
779
- return /* @__PURE__ */ e(g, { className: S, ...b, children: u });
779
+ return /* @__PURE__ */ e(g, { className: C, ...b, children: m });
780
780
  };
781
781
  function hr(t) {
782
782
  return {
@@ -794,21 +794,21 @@ function es({
794
794
  maxBytes: a,
795
795
  aspect: l = "square",
796
796
  helperText: o,
797
- disabled: m,
797
+ disabled: u,
798
798
  className: d,
799
799
  chooseLabel: v = "Choose",
800
800
  removeLabel: h = "Remove",
801
- tooLargeLabel: u = "That image is too large."
801
+ tooLargeLabel: m = "That image is too large."
802
802
  }) {
803
- const b = ae(null), [g, w] = j(null), p = async (x) => {
803
+ const b = te(null), [g, w] = F(null), p = async (x) => {
804
804
  if (!x) return;
805
805
  w(null);
806
- const S = await br(x, s);
807
- if (a && xr(S) > a) {
808
- w(u);
806
+ const C = await br(x, s);
807
+ if (a && xr(C) > a) {
808
+ w(m);
809
809
  return;
810
810
  }
811
- n(S);
811
+ n(C);
812
812
  };
813
813
  return /* @__PURE__ */ c("div", { className: i("flex flex-col gap-1.5", d), children: [
814
814
  t && /* @__PURE__ */ e("span", { className: "text-sm font-medium text-text", children: t }),
@@ -826,21 +826,21 @@ function es({
826
826
  /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
827
827
  /* @__PURE__ */ c("div", { className: "flex gap-2", children: [
828
828
  /* @__PURE__ */ e(
829
- te,
829
+ ne,
830
830
  {
831
831
  type: "button",
832
832
  variant: "secondary",
833
- disabled: m,
833
+ disabled: u,
834
834
  onClick: () => b.current?.click(),
835
835
  children: v
836
836
  }
837
837
  ),
838
838
  r && /* @__PURE__ */ e(
839
- te,
839
+ ne,
840
840
  {
841
841
  type: "button",
842
842
  variant: "ghost",
843
- disabled: m,
843
+ disabled: u,
844
844
  onClick: () => {
845
845
  w(null), n(void 0);
846
846
  },
@@ -873,19 +873,19 @@ function br(t, r) {
873
873
  a.onload = () => {
874
874
  const l = new Image();
875
875
  l.onload = () => {
876
- const o = Math.min(1, r / Math.max(l.width, l.height)), m = Math.round(l.width * o), d = Math.round(l.height * o), v = document.createElement("canvas");
877
- v.width = m, v.height = d;
876
+ const o = Math.min(1, r / Math.max(l.width, l.height)), u = Math.round(l.width * o), d = Math.round(l.height * o), v = document.createElement("canvas");
877
+ v.width = u, v.height = d;
878
878
  const h = v.getContext("2d");
879
879
  if (!h) {
880
880
  n(a.result);
881
881
  return;
882
882
  }
883
- h.drawImage(l, 0, 0, m, d), n(v.toDataURL("image/png"));
883
+ h.drawImage(l, 0, 0, u, d), n(v.toDataURL("image/png"));
884
884
  }, l.onerror = s, l.src = a.result;
885
885
  }, a.onerror = s, a.readAsDataURL(t);
886
886
  });
887
887
  }
888
- const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }), pr = () => /* @__PURE__ */ e(Z, { icon: Ce, size: "md", color: "current" }), vr = () => /* @__PURE__ */ e(Z, { icon: De, size: "md", color: "current" }), Fe = be(({
888
+ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }), pr = () => /* @__PURE__ */ e(Z, { icon: Se, size: "md", color: "current" }), vr = () => /* @__PURE__ */ e(Z, { icon: De, size: "md", color: "current" }), Fe = be(({
889
889
  value: t,
890
890
  onChange: r,
891
891
  placeholder: n = "Select date",
@@ -893,38 +893,38 @@ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }
893
893
  required: a = !1,
894
894
  size: l = "md",
895
895
  className: o,
896
- minDate: m,
896
+ minDate: u,
897
897
  maxDate: d,
898
898
  format: v = "MM/dd/yyyy",
899
899
  withTime: h = !1
900
- }, u) => {
901
- const [b, g] = j(!1), [w, p] = j(() => t || /* @__PURE__ */ new Date()), x = ae(null), S = ae(null), _ = Le(b, S);
902
- G(() => {
903
- const f = (z) => {
904
- x.current && !x.current.contains(z.target) && g(!1);
900
+ }, m) => {
901
+ const [b, g] = F(!1), [w, p] = F(() => t || /* @__PURE__ */ new Date()), x = te(null), C = te(null), E = Le(b, C);
902
+ Y(() => {
903
+ const f = (M) => {
904
+ x.current && !x.current.contains(M.target) && g(!1);
905
905
  };
906
906
  return b && document.addEventListener("mousedown", f), () => {
907
907
  document.removeEventListener("mousedown", f);
908
908
  };
909
909
  }, [b]);
910
- const B = (f) => {
910
+ const j = (f) => {
911
911
  if (!f) return "";
912
- const z = f.getDate().toString().padStart(2, "0"), y = (f.getMonth() + 1).toString().padStart(2, "0"), $ = f.getFullYear(), N = v === "dd/MM/yyyy" ? `${z}/${y}/${$}` : v === "yyyy-MM-dd" ? `${$}-${y}-${z}` : `${y}/${z}/${$}`;
912
+ const M = f.getDate().toString().padStart(2, "0"), y = (f.getMonth() + 1).toString().padStart(2, "0"), $ = f.getFullYear(), N = v === "dd/MM/yyyy" ? `${M}/${y}/${$}` : v === "yyyy-MM-dd" ? `${$}-${y}-${M}` : `${y}/${M}/${$}`;
913
913
  return h ? `${N} ${D(f)}` : N;
914
- }, D = (f) => `${f.getHours().toString().padStart(2, "0")}:${f.getMinutes().toString().padStart(2, "0")}`, J = (f) => {
915
- const [z, y] = f.split(":").map(Number);
916
- if (Number.isNaN(z) || Number.isNaN(y)) return;
914
+ }, D = (f) => `${f.getHours().toString().padStart(2, "0")}:${f.getMinutes().toString().padStart(2, "0")}`, U = (f) => {
915
+ const [M, y] = f.split(":").map(Number);
916
+ if (Number.isNaN(M) || Number.isNaN(y)) return;
917
917
  const $ = t ? new Date(t) : /* @__PURE__ */ new Date();
918
- $.setHours(z, y, 0, 0), r?.($);
919
- }, V = () => {
920
- const f = w.getFullYear(), z = w.getMonth(), y = new Date(f, z, 1), $ = new Date(y);
918
+ $.setHours(M, y, 0, 0), r?.($);
919
+ }, q = () => {
920
+ const f = w.getFullYear(), M = w.getMonth(), y = new Date(f, M, 1), $ = new Date(y);
921
921
  $.setDate($.getDate() - y.getDay());
922
- const N = [], K = new Date($);
923
- for (let ne = 0; ne < 42; ne++)
924
- N.push(new Date(K)), K.setDate(K.getDate() + 1);
922
+ const N = [], J = new Date($);
923
+ for (let se = 0; se < 42; se++)
924
+ N.push(new Date(J)), J.setDate(J.getDate() + 1);
925
925
  return N;
926
- }, P = (f) => {
927
- if (f.getMonth() === w.getMonth() && !(m && f < m) && !(d && f > d)) {
926
+ }, A = (f) => {
927
+ if (f.getMonth() === w.getMonth() && !(u && f < u) && !(d && f > d)) {
928
928
  if (h) {
929
929
  const y = new Date(f);
930
930
  y.setHours(t?.getHours() ?? 0, t?.getMinutes() ?? 0, 0, 0), r?.(y);
@@ -932,13 +932,13 @@ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }
932
932
  }
933
933
  r?.(f), g(!1);
934
934
  }
935
- }, q = () => {
935
+ }, R = () => {
936
936
  p(new Date(w.getFullYear(), w.getMonth() - 1, 1));
937
- }, re = () => {
937
+ }, ee = () => {
938
938
  p(new Date(w.getFullYear(), w.getMonth() + 1, 1));
939
- }, Y = () => {
939
+ }, K = () => {
940
940
  r?.(null), g(!1);
941
- }, W = i(
941
+ }, G = i(
942
942
  "w-full border border-border-strong rounded-tile transition-colors duration-fast",
943
943
  "bg-surface text-text",
944
944
  "placeholder:text-text-muted",
@@ -951,7 +951,7 @@ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }
951
951
  "h-control-md w-full px-3 text-base": l === "full"
952
952
  },
953
953
  o
954
- ), ie = V(), k = [
954
+ ), ie = q(), k = [
955
955
  "January",
956
956
  "February",
957
957
  "March",
@@ -966,19 +966,19 @@ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }
966
966
  "December"
967
967
  ];
968
968
  return /* @__PURE__ */ c("div", { ref: x, className: "relative", children: [
969
- /* @__PURE__ */ c("div", { ref: S, className: "relative", children: [
969
+ /* @__PURE__ */ c("div", { ref: C, className: "relative", children: [
970
970
  /* @__PURE__ */ e(
971
971
  "input",
972
972
  {
973
- ref: u,
973
+ ref: m,
974
974
  type: "text",
975
- value: B(t ?? null),
975
+ value: j(t ?? null),
976
976
  placeholder: n,
977
977
  disabled: s,
978
978
  required: a,
979
979
  readOnly: !0,
980
980
  onClick: () => !s && g(!b),
981
- className: i(W, "pr-10 cursor-pointer")
981
+ className: i(G, "pr-10 cursor-pointer")
982
982
  }
983
983
  ),
984
984
  /* @__PURE__ */ e(
@@ -992,12 +992,12 @@ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }
992
992
  }
993
993
  )
994
994
  ] }),
995
- b && /* @__PURE__ */ c("div", { style: _, className: "fixed z-overlay overflow-auto rounded-lg border border-border bg-surface p-4 shadow-overlay min-w-panel", children: [
995
+ b && /* @__PURE__ */ c("div", { style: E, className: "fixed z-overlay overflow-auto rounded-lg border border-border bg-surface p-4 shadow-overlay min-w-panel", children: [
996
996
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between mb-4", children: [
997
997
  /* @__PURE__ */ e(
998
998
  "button",
999
999
  {
1000
- onClick: q,
1000
+ onClick: R,
1001
1001
  className: "p-1 hover:bg-surface-hover rounded",
1002
1002
  children: /* @__PURE__ */ e(pr, {})
1003
1003
  }
@@ -1010,32 +1010,32 @@ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }
1010
1010
  /* @__PURE__ */ e(
1011
1011
  "button",
1012
1012
  {
1013
- onClick: re,
1013
+ onClick: ee,
1014
1014
  className: "p-1 hover:bg-surface-hover rounded",
1015
1015
  children: /* @__PURE__ */ e(vr, {})
1016
1016
  }
1017
1017
  )
1018
1018
  ] }),
1019
1019
  /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((f) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: f }, f)) }),
1020
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: ie.map((f, z) => {
1021
- const y = f.getMonth() === w.getMonth(), $ = t && f.toDateString() === t.toDateString(), N = f.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), K = !y || m && f < m || d && f > d;
1020
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: ie.map((f, M) => {
1021
+ const y = f.getMonth() === w.getMonth(), $ = t && f.toDateString() === t.toDateString(), N = f.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), J = !y || u && f < u || d && f > d;
1022
1022
  return /* @__PURE__ */ e(
1023
1023
  "button",
1024
1024
  {
1025
- onClick: () => !K && P(f),
1026
- disabled: K,
1025
+ onClick: () => !J && A(f),
1026
+ disabled: J,
1027
1027
  className: i(
1028
1028
  "w-8 h-8 text-sm rounded transition-colors duration-fast",
1029
1029
  {
1030
- "text-text hover:bg-surface-hover": y && !$ && !K,
1030
+ "text-text hover:bg-surface-hover": y && !$ && !J,
1031
1031
  "bg-accent text-accent-fg": $,
1032
1032
  "bg-surface-hover text-text": N && !$,
1033
- "text-text-muted cursor-not-allowed": K
1033
+ "text-text-muted cursor-not-allowed": J
1034
1034
  }
1035
1035
  ),
1036
1036
  children: f.getDate()
1037
1037
  },
1038
- z
1038
+ M
1039
1039
  );
1040
1040
  }) }),
1041
1041
  h && /* @__PURE__ */ c("div", { className: "mt-3 flex items-center gap-2 border-t border-border pt-3", children: [
@@ -1046,7 +1046,7 @@ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }
1046
1046
  id: "datepicker-time",
1047
1047
  type: "time",
1048
1048
  value: t ? D(t) : "",
1049
- onChange: (f) => J(f.target.value),
1049
+ onChange: (f) => U(f.target.value),
1050
1050
  className: "h-control-sm rounded-md border border-border bg-surface-input px-2 text-sm text-text focus-visible:outline-none focus-visible:focus-ring"
1051
1051
  }
1052
1052
  )
@@ -1055,7 +1055,7 @@ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }
1055
1055
  /* @__PURE__ */ e(
1056
1056
  "button",
1057
1057
  {
1058
- onClick: Y,
1058
+ onClick: K,
1059
1059
  className: "text-sm text-text-muted hover:text-text",
1060
1060
  children: "Clear"
1061
1061
  }
@@ -1076,7 +1076,7 @@ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }
1076
1076
  md: "h-control-md px-3 text-sm",
1077
1077
  lg: "h-control-lg px-3 text-base",
1078
1078
  full: "h-control-md w-full px-3 text-sm"
1079
- }, Se = qt, Te = be(
1079
+ }, Ee = qt, _e = be(
1080
1080
  ({
1081
1081
  label: t,
1082
1082
  helperText: r,
@@ -1085,94 +1085,94 @@ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }
1085
1085
  fullWidth: a = !1,
1086
1086
  disabled: l = !1,
1087
1087
  options: o,
1088
- placeholder: m,
1088
+ placeholder: u,
1089
1089
  containerClassName: d,
1090
1090
  labelClassName: v,
1091
1091
  className: h,
1092
- id: u,
1092
+ id: m,
1093
1093
  searchable: b,
1094
1094
  multiple: g,
1095
1095
  value: w,
1096
1096
  onChange: p,
1097
1097
  allowCreate: x,
1098
- onCreateOption: S,
1099
- ..._
1100
- }, B) => {
1101
- const D = u || `select-${Math.random().toString(36).substr(2, 9)}`, J = !!n, [V, P] = ce.useState(!1), [q, re] = ce.useState(""), Y = ce.useRef(null), W = ce.useRef(null), ie = Le(V, W, { matchWidth: !0 }), [k, f] = ce.useState(o);
1102
- ce.useImperativeHandle(B, () => Y.current), ce.useEffect(() => {
1103
- const M = (C) => {
1104
- Y.current && !Y.current.contains(C.target) && P(!1);
1098
+ onCreateOption: C,
1099
+ ...E
1100
+ }, j) => {
1101
+ const D = m || `select-${Math.random().toString(36).substr(2, 9)}`, U = !!n, [q, A] = ce.useState(!1), [R, ee] = ce.useState(""), K = ce.useRef(null), G = ce.useRef(null), ie = Le(q, G, { matchWidth: !0 }), [k, f] = ce.useState(o);
1102
+ ce.useImperativeHandle(j, () => K.current), ce.useEffect(() => {
1103
+ const T = (S) => {
1104
+ K.current && !K.current.contains(S.target) && A(!1);
1105
1105
  };
1106
- return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
1106
+ return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
1107
1107
  }, []);
1108
- const z = ce.useCallback(
1109
- (M, C) => M.some(
1110
- (A) => Se(A.value) === Se(C) || Se(A.label) === Se(C)
1108
+ const M = ce.useCallback(
1109
+ (T, S) => T.some(
1110
+ (L) => Ee(L.value) === Ee(S) || Ee(L.label) === Ee(S)
1111
1111
  ),
1112
1112
  []
1113
1113
  ), y = ce.useCallback(
1114
- (M, C) => {
1115
- const A = [...M], O = (H) => {
1116
- const T = Me(H).trim();
1117
- T && (z(A, T) || A.push({ value: T, label: T }));
1114
+ (T, S) => {
1115
+ const L = [...T], O = (V) => {
1116
+ const _ = Te(V).trim();
1117
+ _ && (M(L, _) || L.push({ value: _, label: _ }));
1118
1118
  };
1119
- return Array.isArray(C) ? C.forEach(O) : O(C), A;
1119
+ return Array.isArray(S) ? S.forEach(O) : O(S), L;
1120
1120
  },
1121
- [z]
1121
+ [M]
1122
1122
  );
1123
1123
  ce.useEffect(() => {
1124
- f((M) => {
1125
- const C = [...o];
1126
- return M.forEach((A) => {
1127
- !z(C, A.value) && !z(C, A.label) && C.push(A);
1128
- }), y(C, w);
1124
+ f((T) => {
1125
+ const S = [...o];
1126
+ return T.forEach((L) => {
1127
+ !M(S, L.value) && !M(S, L.label) && S.push(L);
1128
+ }), y(S, w);
1129
1129
  });
1130
- }, [o, w, y, z]);
1130
+ }, [o, w, y, M]);
1131
1131
  const $ = ce.useMemo(
1132
- () => Array.isArray(w) ? w.map(Me) : w == null ? void 0 : Me(w),
1132
+ () => Array.isArray(w) ? w.map(Te) : w == null ? void 0 : Te(w),
1133
1133
  [w]
1134
- ), N = (M) => {
1134
+ ), N = (T) => {
1135
1135
  if (g) {
1136
- const C = Array.isArray($) ? $ : [], A = C.includes(M) ? C.filter((O) => O !== M) : [...C, M];
1137
- p?.(A);
1136
+ const S = Array.isArray($) ? $ : [], L = S.includes(T) ? S.filter((O) => O !== T) : [...S, T];
1137
+ p?.(L);
1138
1138
  } else
1139
- p?.(M), P(!1), re("");
1140
- }, K = g ? null : k.find((M) => M.value === $), ne = g ? k.filter(
1141
- (M) => Array.isArray($) && $.includes(M.value)
1142
- ) : [], ee = b && q ? k.filter(
1143
- (M) => M.label.toLowerCase().includes(q.toLowerCase())
1144
- ) : k, X = !!x && !!b && !!q.trim() && !z(k, q), I = (M) => {
1145
- const C = M.trim();
1146
- if (!C) return;
1147
- const A = S?.(C) ?? {
1148
- value: C,
1149
- label: C
1139
+ p?.(T), A(!1), ee("");
1140
+ }, J = g ? null : k.find((T) => T.value === $), se = g ? k.filter(
1141
+ (T) => Array.isArray($) && $.includes(T.value)
1142
+ ) : [], re = b && R ? k.filter(
1143
+ (T) => T.label.toLowerCase().includes(R.toLowerCase())
1144
+ ) : k, X = !!x && !!b && !!R.trim() && !M(k, R), P = (T) => {
1145
+ const S = T.trim();
1146
+ if (!S) return;
1147
+ const L = C?.(S) ?? {
1148
+ value: S,
1149
+ label: S
1150
1150
  };
1151
- if (z(k, A.value) || z(k, A.label)) {
1152
- N(A.value), re(""), g || P(!1);
1151
+ if (M(k, L.value) || M(k, L.label)) {
1152
+ N(L.value), ee(""), g || A(!1);
1153
1153
  return;
1154
1154
  }
1155
- f((O) => [...O, A]), N(A.value), re(""), g || P(!1);
1156
- }, R = () => g ? ne.length > 0 ? ne.map((M) => M.label).join(", ") : m || "Select options" : K?.label || m || "Select an option";
1155
+ f((O) => [...O, L]), N(L.value), ee(""), g || A(!1);
1156
+ }, H = () => g ? se.length > 0 ? se.map((T) => T.label).join(", ") : u || "Select options" : J?.label || u || "Select an option";
1157
1157
  return /* @__PURE__ */ c(
1158
1158
  "div",
1159
1159
  {
1160
- ref: Y,
1160
+ ref: K,
1161
1161
  className: i(
1162
1162
  "relative flex flex-col",
1163
1163
  a && "w-full",
1164
1164
  d
1165
1165
  ),
1166
- ..._,
1166
+ ...E,
1167
1167
  children: [
1168
1168
  t && /* @__PURE__ */ e(
1169
1169
  "label",
1170
1170
  {
1171
1171
  htmlFor: D,
1172
- onClick: () => P(!V),
1172
+ onClick: () => A(!q),
1173
1173
  className: i(
1174
1174
  "block text-xs font-semibold uppercase tracking-label mb-1.5",
1175
- J ? "text-danger-fg" : "text-text-muted",
1175
+ U ? "text-danger-fg" : "text-text-muted",
1176
1176
  v
1177
1177
  ),
1178
1178
  children: t
@@ -1182,45 +1182,45 @@ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }
1182
1182
  /* @__PURE__ */ c(
1183
1183
  "button",
1184
1184
  {
1185
- ref: W,
1185
+ ref: G,
1186
1186
  type: "button",
1187
1187
  id: D,
1188
1188
  disabled: l,
1189
- onClick: () => P(!V),
1189
+ onClick: () => A(!q),
1190
1190
  className: i(
1191
1191
  "flex w-full items-center justify-between gap-2 rounded-tile border transition-colors duration-fast text-left",
1192
1192
  "focus-visible:outline-none focus-visible:focus-ring",
1193
1193
  "disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
1194
1194
  "bg-surface",
1195
1195
  yr[s],
1196
- J ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
1196
+ U ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
1197
1197
  h
1198
1198
  ),
1199
1199
  children: [
1200
- /* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children: R() }),
1200
+ /* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children: H() }),
1201
1201
  /* @__PURE__ */ e(
1202
1202
  kt,
1203
1203
  {
1204
1204
  size: 16,
1205
1205
  className: i(
1206
1206
  "shrink-0 opacity-60 transition-transform duration-fast",
1207
- V && "rotate-180"
1207
+ q && "rotate-180"
1208
1208
  )
1209
1209
  }
1210
1210
  )
1211
1211
  ]
1212
1212
  }
1213
1213
  ),
1214
- V && /* @__PURE__ */ c("div", { style: ie, className: "fixed z-overlay flex flex-col overflow-hidden rounded-lg border border-border bg-surface shadow-overlay", children: [
1214
+ q && /* @__PURE__ */ c("div", { style: ie, className: "fixed z-overlay flex flex-col overflow-hidden rounded-lg border border-border bg-surface shadow-overlay", children: [
1215
1215
  b && /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e(
1216
1216
  "input",
1217
1217
  {
1218
1218
  type: "text",
1219
1219
  placeholder: "Search...",
1220
- value: q,
1221
- onChange: (M) => re(M.target.value),
1222
- onKeyDown: (M) => {
1223
- M.key === "Enter" && X && (M.preventDefault(), I(q));
1220
+ value: R,
1221
+ onChange: (T) => ee(T.target.value),
1222
+ onKeyDown: (T) => {
1223
+ T.key === "Enter" && X && (T.preventDefault(), P(R));
1224
1224
  },
1225
1225
  className: i(
1226
1226
  "w-full px-3 py-2 text-sm rounded-md border",
@@ -1235,51 +1235,51 @@ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }
1235
1235
  "cursor-pointer px-3 py-1.5 text-sm",
1236
1236
  "text-info-fg hover:bg-surface-hover"
1237
1237
  ),
1238
- onClick: () => I(q),
1238
+ onClick: () => P(R),
1239
1239
  children: [
1240
1240
  "+: “",
1241
- q.trim(),
1241
+ R.trim(),
1242
1242
  "”"
1243
1243
  ]
1244
1244
  }
1245
1245
  ),
1246
1246
  /* @__PURE__ */ c("ul", { className: "min-h-0 flex-1 overflow-auto py-1", children: [
1247
- m && !g && /* @__PURE__ */ e(
1247
+ u && !g && /* @__PURE__ */ e(
1248
1248
  "li",
1249
1249
  {
1250
1250
  className: "cursor-pointer px-3 py-1.5 text-sm text-text-muted hover:bg-surface-hover",
1251
1251
  onClick: () => {
1252
- p?.(""), P(!1);
1252
+ p?.(""), A(!1);
1253
1253
  },
1254
- children: m
1254
+ children: u
1255
1255
  }
1256
1256
  ),
1257
- ee.map((M) => {
1258
- const C = g ? Array.isArray($) && $.includes(M.value) : $ === M.value;
1257
+ re.map((T) => {
1258
+ const S = g ? Array.isArray($) && $.includes(T.value) : $ === T.value;
1259
1259
  return /* @__PURE__ */ e(
1260
1260
  "li",
1261
1261
  {
1262
- onClick: () => !M.disabled && N(M.value),
1262
+ onClick: () => !T.disabled && N(T.value),
1263
1263
  className: i(
1264
1264
  "cursor-pointer px-3 py-1.5 text-sm",
1265
1265
  "text-text",
1266
- M.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface-hover",
1267
- C && "bg-accent-soft text-accent font-semibold"
1266
+ T.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface-hover",
1267
+ S && "bg-accent-soft text-accent font-semibold"
1268
1268
  ),
1269
1269
  children: /* @__PURE__ */ c("div", { className: "flex items-center", children: [
1270
1270
  g && /* @__PURE__ */ e(
1271
1271
  "input",
1272
1272
  {
1273
1273
  type: "checkbox",
1274
- checked: C,
1274
+ checked: S,
1275
1275
  readOnly: !0,
1276
1276
  className: "mr-3 h-4 w-4 rounded border-border [&:not(:checked)]:bg-surface-input text-accent "
1277
1277
  }
1278
1278
  ),
1279
- /* @__PURE__ */ e("span", { children: M.label })
1279
+ /* @__PURE__ */ e("span", { children: T.label })
1280
1280
  ] })
1281
1281
  },
1282
- M.value
1282
+ T.value
1283
1283
  );
1284
1284
  })
1285
1285
  ] })
@@ -1290,7 +1290,7 @@ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }
1290
1290
  {
1291
1291
  className: i(
1292
1292
  "mt-1 text-xs",
1293
- J ? "text-danger-fg" : "text-text-muted"
1293
+ U ? "text-danger-fg" : "text-text-muted"
1294
1294
  ),
1295
1295
  children: n || r
1296
1296
  }
@@ -1300,13 +1300,13 @@ const gr = () => /* @__PURE__ */ e(Z, { icon: wt, size: "md", color: "current" }
1300
1300
  );
1301
1301
  }
1302
1302
  );
1303
- Te.displayName = "Select";
1303
+ _e.displayName = "Select";
1304
1304
  const Nr = {
1305
1305
  sm: "h-control-sm px-3 text-sm",
1306
1306
  md: "h-control-md px-3 text-base",
1307
1307
  lg: "h-control-lg px-3 text-base",
1308
1308
  full: "h-control-md px-3 text-base"
1309
- }, rt = "mb-1.5 block text-sm font-medium", nt = "block w-full rounded-tile border bg-surface-input text-text transition-colors duration-fast ease-out placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled", st = (t) => t ? "border-danger-border bg-danger-soft" : "border-border-strong", Ne = be(
1309
+ }, rt = "mb-1.5 block text-sm font-medium", nt = "block w-full rounded-tile border bg-surface-input text-text transition-colors duration-fast ease-out placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled", st = (t) => t ? "border-danger-border bg-danger-soft" : "border-border-strong", we = be(
1310
1310
  ({
1311
1311
  label: t,
1312
1312
  helperText: r,
@@ -1315,14 +1315,14 @@ const Nr = {
1315
1315
  fullWidth: a = !1,
1316
1316
  startIcon: l,
1317
1317
  endIcon: o,
1318
- loading: m = !1,
1318
+ loading: u = !1,
1319
1319
  containerClassName: d,
1320
1320
  labelClassName: v,
1321
1321
  className: h,
1322
- id: u,
1322
+ id: m,
1323
1323
  ...b
1324
1324
  }, g) => {
1325
- const w = ce.useId(), p = u || `textfield-${w}`, x = !!n, S = n || r ? `${p}-description` : void 0;
1325
+ const w = ce.useId(), p = m || `textfield-${w}`, x = !!n, C = n || r ? `${p}-description` : void 0;
1326
1326
  return /* @__PURE__ */ c("div", { className: i("flex flex-col", a && "w-full", d), children: [
1327
1327
  t && /* @__PURE__ */ e(
1328
1328
  "label",
@@ -1344,19 +1344,19 @@ const Nr = {
1344
1344
  ref: g,
1345
1345
  id: p,
1346
1346
  "aria-invalid": x || void 0,
1347
- "aria-describedby": S,
1347
+ "aria-describedby": C,
1348
1348
  className: i(
1349
1349
  nt,
1350
1350
  Nr[s],
1351
1351
  l && "pl-9",
1352
- (o || m) && "pr-9",
1352
+ (o || u) && "pr-9",
1353
1353
  st(x),
1354
1354
  h
1355
1355
  ),
1356
1356
  ...b
1357
1357
  }
1358
1358
  ),
1359
- (o || m) && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted", children: m ? /* @__PURE__ */ e(
1359
+ (o || u) && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted", children: u ? /* @__PURE__ */ e(
1360
1360
  "span",
1361
1361
  {
1362
1362
  "aria-hidden": !0,
@@ -1367,7 +1367,7 @@ const Nr = {
1367
1367
  (n || r) && /* @__PURE__ */ e(
1368
1368
  "p",
1369
1369
  {
1370
- id: S,
1370
+ id: C,
1371
1371
  className: i("mt-1 text-xs", x ? "text-danger-fg" : "text-text-subtle"),
1372
1372
  children: n || r
1373
1373
  }
@@ -1375,7 +1375,7 @@ const Nr = {
1375
1375
  ] });
1376
1376
  }
1377
1377
  );
1378
- Ne.displayName = "TextField";
1378
+ we.displayName = "TextField";
1379
1379
  function wr({
1380
1380
  value: t,
1381
1381
  onChange: r,
@@ -1384,39 +1384,39 @@ function wr({
1384
1384
  size: a = "md",
1385
1385
  placeholder: l,
1386
1386
  templatePlaceholder: o,
1387
- showTemplate: m = !0
1387
+ showTemplate: u = !0
1388
1388
  }) {
1389
- const [d, v] = j([]);
1390
- G(() => {
1391
- let u = !0;
1389
+ const [d, v] = F([]);
1390
+ Y(() => {
1391
+ let m = !0;
1392
1392
  return Promise.resolve(n?.()).then((b) => {
1393
- u && b && v(b.data ?? []);
1393
+ m && b && v(b.data ?? []);
1394
1394
  }).catch(() => {
1395
1395
  }), () => {
1396
- u = !1;
1396
+ m = !1;
1397
1397
  };
1398
1398
  }, []);
1399
1399
  const h = t ?? {};
1400
1400
  return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
1401
1401
  /* @__PURE__ */ e(
1402
- Te,
1402
+ _e,
1403
1403
  {
1404
1404
  size: a,
1405
1405
  fullWidth: !0,
1406
1406
  value: h.folderId ?? "",
1407
- options: d.map((u) => ({ value: u.id, label: u.name })),
1407
+ options: d.map((m) => ({ value: m.id, label: m.name })),
1408
1408
  placeholder: l ?? "Select a folder",
1409
- onChange: (u) => r?.({ ...h, folderId: u })
1409
+ onChange: (m) => r?.({ ...h, folderId: m })
1410
1410
  }
1411
1411
  ),
1412
- m && /* @__PURE__ */ e(
1413
- Ne,
1412
+ u && /* @__PURE__ */ e(
1413
+ we,
1414
1414
  {
1415
1415
  size: a,
1416
1416
  disabled: s ?? !1,
1417
1417
  value: h.pathTemplate ?? "",
1418
1418
  placeholder: o ?? "Sub-path e.g. {yyyy}/{mm}/{dd} (optional)",
1419
- onChange: (u) => r?.({ ...h, pathTemplate: u.target.value })
1419
+ onChange: (m) => r?.({ ...h, pathTemplate: m.target.value })
1420
1420
  }
1421
1421
  )
1422
1422
  ] });
@@ -1440,72 +1440,72 @@ const ve = (...t) => t.filter(Boolean).join(" "), kr = (t) => /* @__PURE__ */ e(
1440
1440
  fullWidth: a = !1,
1441
1441
  startIcon: l = /* @__PURE__ */ e(kr, {}),
1442
1442
  loading: o = !1,
1443
- containerClassName: m,
1443
+ containerClassName: u,
1444
1444
  labelClassName: d,
1445
1445
  className: v,
1446
1446
  id: h,
1447
- options: u,
1447
+ options: m,
1448
1448
  onRemoteSearch: b,
1449
1449
  onSelect: g,
1450
1450
  debounceTime: w = 500,
1451
1451
  showAllOnOpen: p = !1,
1452
1452
  value: x,
1453
- onChange: S,
1454
- ..._
1455
- }, B) => {
1456
- const D = h || `searchfield-${Math.random().toString(36).substr(2, 9)}`, J = !!n, V = ae(null), P = ae(null), [q, re] = j(x || ""), [Y, W] = j(!1), [ie, k] = j(!1), [f, z] = j(!1);
1457
- G(() => {
1458
- x !== void 0 && re(x);
1453
+ onChange: C,
1454
+ ...E
1455
+ }, j) => {
1456
+ const D = h || `searchfield-${Math.random().toString(36).substr(2, 9)}`, U = !!n, q = te(null), A = te(null), [R, ee] = F(x || ""), [K, G] = F(!1), [ie, k] = F(!1), [f, M] = F(!1);
1457
+ Y(() => {
1458
+ x !== void 0 && ee(x);
1459
1459
  }, [x]);
1460
- const y = pe(() => {
1461
- if (p && !f || !q) return u;
1462
- const I = String(q).toLowerCase();
1463
- return u.filter(
1464
- (R) => String(R.label).toLowerCase().includes(I)
1460
+ const y = ge(() => {
1461
+ if (p && !f || !R) return m;
1462
+ const P = String(R).toLowerCase();
1463
+ return m.filter(
1464
+ (H) => String(H.label).toLowerCase().includes(P)
1465
1465
  );
1466
- }, [q, u, p, f]);
1467
- G(() => {
1468
- if (!b || !q) {
1466
+ }, [R, m, p, f]);
1467
+ Y(() => {
1468
+ if (!b || !R) {
1469
1469
  k(!1);
1470
1470
  return;
1471
1471
  }
1472
- const I = setTimeout(async () => {
1472
+ const P = setTimeout(async () => {
1473
1473
  k(!0);
1474
1474
  try {
1475
- await b(String(q));
1476
- } catch (R) {
1477
- console.error("Remote search failed:", R);
1475
+ await b(String(R));
1476
+ } catch (H) {
1477
+ console.error("Remote search failed:", H);
1478
1478
  } finally {
1479
1479
  k(!1);
1480
1480
  }
1481
1481
  }, w);
1482
1482
  return () => {
1483
- clearTimeout(I), k(!1);
1483
+ clearTimeout(P), k(!1);
1484
1484
  };
1485
- }, [q, w, b]), G(() => {
1486
- const I = (R) => {
1487
- V.current && !V.current.contains(R.target) && W(!1);
1485
+ }, [R, w, b]), Y(() => {
1486
+ const P = (H) => {
1487
+ q.current && !q.current.contains(H.target) && G(!1);
1488
1488
  };
1489
- return document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
1489
+ return document.addEventListener("mousedown", P), () => document.removeEventListener("mousedown", P);
1490
1490
  }, []);
1491
- const $ = (I) => {
1492
- const R = I.target.value;
1493
- re(R), W(!0), z(!0), S && S(I);
1494
- }, N = (I) => {
1495
- re(I.label), W(!1), z(!1), g && g(I.value);
1496
- }, K = () => {
1497
- (u.length > 0 || b) && (W(!0), z(!1));
1498
- }, ne = o || ie, ee = Y && (y.length > 0 || ne), X = pe(() => B || P, [B]);
1491
+ const $ = (P) => {
1492
+ const H = P.target.value;
1493
+ ee(H), G(!0), M(!0), C && C(P);
1494
+ }, N = (P) => {
1495
+ ee(P.label), G(!1), M(!1), g && g(P.value);
1496
+ }, J = () => {
1497
+ (m.length > 0 || b) && (G(!0), M(!1));
1498
+ }, se = o || ie, re = K && (y.length > 0 || se), X = ge(() => j || A, [j]);
1499
1499
  return /* @__PURE__ */ c(
1500
1500
  "div",
1501
1501
  {
1502
1502
  className: ve(
1503
1503
  "flex flex-col",
1504
1504
  a ? "w-full" : "",
1505
- m || "",
1505
+ u || "",
1506
1506
  "relative"
1507
1507
  ),
1508
- ref: V,
1508
+ ref: q,
1509
1509
  children: [
1510
1510
  t && /* @__PURE__ */ e(
1511
1511
  "label",
@@ -1513,7 +1513,7 @@ const ve = (...t) => t.filter(Boolean).join(" "), kr = (t) => /* @__PURE__ */ e(
1513
1513
  htmlFor: D,
1514
1514
  className: ve(
1515
1515
  "block text-sm font-medium mb-1",
1516
- J ? "text-danger-fg" : "text-text",
1516
+ U ? "text-danger-fg" : "text-text",
1517
1517
  d || ""
1518
1518
  ),
1519
1519
  children: t
@@ -1526,9 +1526,9 @@ const ve = (...t) => t.filter(Boolean).join(" "), kr = (t) => /* @__PURE__ */ e(
1526
1526
  {
1527
1527
  ref: X,
1528
1528
  id: D,
1529
- value: q,
1529
+ value: R,
1530
1530
  onChange: $,
1531
- onFocus: K,
1531
+ onFocus: J,
1532
1532
  className: ve(
1533
1533
  // Base styles
1534
1534
  "block w-full rounded-tile border bg-surface-input transition-colors duration-fast ease-out",
@@ -1541,13 +1541,13 @@ const ve = (...t) => t.filter(Boolean).join(" "), kr = (t) => /* @__PURE__ */ e(
1541
1541
  "pr-10",
1542
1542
  // Altijd padding rechts voor de dropdown/loading icon
1543
1543
  // State styles
1544
- J ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
1544
+ U ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
1545
1545
  v || ""
1546
1546
  ),
1547
- ..._
1547
+ ...E
1548
1548
  }
1549
1549
  ),
1550
- /* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: ne || o ? (
1550
+ /* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: se || o ? (
1551
1551
  // Loading Spinner
1552
1552
  /* @__PURE__ */ e(
1553
1553
  Ct,
@@ -1564,31 +1564,31 @@ const ve = (...t) => t.filter(Boolean).join(" "), kr = (t) => /* @__PURE__ */ e(
1564
1564
  className: ve(
1565
1565
  "text-text-muted cursor-pointer transition-transform",
1566
1566
  Oe[s],
1567
- Y ? "rotate-180" : "rotate-0"
1567
+ K ? "rotate-180" : "rotate-0"
1568
1568
  ),
1569
1569
  onClick: () => {
1570
- W((I) => (I || z(!1), !I));
1570
+ G((P) => (P || M(!1), !P));
1571
1571
  }
1572
1572
  }
1573
1573
  )
1574
1574
  ) })
1575
1575
  ] }),
1576
- ee && /* @__PURE__ */ e(
1576
+ re && /* @__PURE__ */ e(
1577
1577
  "ul",
1578
1578
  {
1579
1579
  className: "absolute z-10 mt-1 w-full bg-surface border border-border rounded-lg shadow-lg max-h-60 overflow-auto top-full",
1580
1580
  role: "listbox",
1581
- children: y.length > 0 ? y.map((I) => /* @__PURE__ */ e(
1581
+ children: y.length > 0 ? y.map((P) => /* @__PURE__ */ e(
1582
1582
  "li",
1583
1583
  {
1584
1584
  className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
1585
- onClick: () => N(I),
1585
+ onClick: () => N(P),
1586
1586
  role: "option",
1587
- "aria-selected": q === I.label,
1588
- children: I.label
1587
+ "aria-selected": R === P.label,
1588
+ children: P.label
1589
1589
  },
1590
- I.value
1591
- )) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-text-muted", children: ne || o ? "Zoeken op afstand..." : "Geen resultaten gevonden." })
1590
+ P.value
1591
+ )) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-text-muted", children: se || o ? "Zoeken op afstand..." : "Geen resultaten gevonden." })
1592
1592
  }
1593
1593
  ),
1594
1594
  (n || r) && /* @__PURE__ */ e(
@@ -1596,14 +1596,14 @@ const ve = (...t) => t.filter(Boolean).join(" "), kr = (t) => /* @__PURE__ */ e(
1596
1596
  {
1597
1597
  className: ve(
1598
1598
  "mt-1 text-xs",
1599
- J ? "text-danger-fg" : "text-text-muted"
1599
+ U ? "text-danger-fg" : "text-text-muted"
1600
1600
  ),
1601
1601
  children: n || r
1602
1602
  }
1603
1603
  ),
1604
1604
  b && /* @__PURE__ */ c("p", { className: "mt-2 text-xs text-success-fg", children: [
1605
1605
  "Huidige zoekterm (niet-gedebounced): ",
1606
- String(q)
1606
+ String(R)
1607
1607
  ] })
1608
1608
  ]
1609
1609
  }
@@ -1620,7 +1620,7 @@ const at = be(
1620
1620
  clearLabel: a = "Clear search",
1621
1621
  containerClassName: l,
1622
1622
  className: o,
1623
- disabled: m,
1623
+ disabled: u,
1624
1624
  ...d
1625
1625
  }, v) => /* @__PURE__ */ c(
1626
1626
  "div",
@@ -1632,7 +1632,7 @@ const at = be(
1632
1632
  "flex items-center gap-2 rounded-md bg-surface-sunk px-2.5 text-text-muted",
1633
1633
  "transition-colors duration-fast ease-out",
1634
1634
  s === "sm" ? "h-control-sm" : "h-control-md",
1635
- m && "opacity-60",
1635
+ u && "opacity-60",
1636
1636
  l
1637
1637
  ),
1638
1638
  children: [
@@ -1643,7 +1643,7 @@ const at = be(
1643
1643
  ref: v,
1644
1644
  type: "search",
1645
1645
  value: t,
1646
- disabled: m,
1646
+ disabled: u,
1647
1647
  onChange: (h) => r(h.target.value),
1648
1648
  className: i(
1649
1649
  // The forms base layer hands every input a white fill, a 1px border
@@ -1668,7 +1668,7 @@ const at = be(
1668
1668
  "aria-label": a,
1669
1669
  onClick: () => r(""),
1670
1670
  className: "grid size-4 shrink-0 cursor-pointer place-items-center rounded-xs text-text-subtle transition-colors duration-fast ease-out hover:text-text focus-visible:outline-none focus-visible:focus-ring",
1671
- children: /* @__PURE__ */ e(Z, { icon: we, size: "sm", color: "current" })
1671
+ children: /* @__PURE__ */ e(Z, { icon: ke, size: "sm", color: "current" })
1672
1672
  }
1673
1673
  ) : n && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: n })
1674
1674
  ]
@@ -1678,7 +1678,7 @@ const at = be(
1678
1678
  at.displayName = "SearchField";
1679
1679
  const zr = be(
1680
1680
  ({ checked: t, onChange: r, label: n, disabled: s = !1, className: a, ...l }, o) => {
1681
- const m = /* @__PURE__ */ e(
1681
+ const u = /* @__PURE__ */ e(
1682
1682
  "span",
1683
1683
  {
1684
1684
  "aria-hidden": !0,
@@ -1722,7 +1722,7 @@ const zr = be(
1722
1722
  ...l
1723
1723
  }
1724
1724
  ),
1725
- /* @__PURE__ */ e("span", { className: "inline-flex rounded-full peer-focus-visible:focus-ring", children: m }),
1725
+ /* @__PURE__ */ e("span", { className: "inline-flex rounded-full peer-focus-visible:focus-ring", children: u }),
1726
1726
  n && /* @__PURE__ */ e("span", { className: "text-sm text-text", children: n })
1727
1727
  ]
1728
1728
  }
@@ -1738,65 +1738,65 @@ const Mr = ({
1738
1738
  placement: a = "bottom-start",
1739
1739
  disabled: l = !1,
1740
1740
  className: o,
1741
- showCheck: m = !0,
1741
+ showCheck: u = !0,
1742
1742
  header: d
1743
1743
  }) => {
1744
- const [v, h] = j(!1), [u, b] = j(null), [g, w] = j({ top: 0, left: 0 }), p = ae(null), x = ae(null), S = ae(null), _ = ae(null), B = Le(v, x, { placement: a }), D = ae(null), J = () => Array.from(
1745
- _.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
1744
+ const [v, h] = F(!1), [m, b] = F(null), [g, w] = F({ top: 0, left: 0 }), p = te(null), x = te(null), C = te(null), E = te(null), j = Le(v, x, { placement: a }), D = te(null), U = () => Array.from(
1745
+ E.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
1746
1746
  );
1747
- G(() => {
1748
- v && J()[0]?.focus();
1747
+ Y(() => {
1748
+ v && U()[0]?.focus();
1749
1749
  }, [v]);
1750
- const V = (f) => {
1750
+ const q = (f) => {
1751
1751
  if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(f.key)) return;
1752
- const y = J();
1752
+ const y = U();
1753
1753
  if (y.length === 0) return;
1754
1754
  f.preventDefault();
1755
1755
  const $ = y.indexOf(document.activeElement), N = f.key === "Home" ? 0 : f.key === "End" ? y.length - 1 : f.key === "ArrowDown" ? ($ + 1) % y.length : ($ - 1 + y.length) % y.length;
1756
1756
  y[N]?.focus();
1757
1757
  };
1758
- G(() => {
1759
- const f = (z) => {
1760
- p.current && (!p.current.contains(z.target) || S.current && !S.current.contains(z.target)) && (h(!1), b(null), D.current && (clearTimeout(D.current), D.current = null));
1758
+ Y(() => {
1759
+ const f = (M) => {
1760
+ p.current && (!p.current.contains(M.target) || C.current && !C.current.contains(M.target)) && (h(!1), b(null), D.current && (clearTimeout(D.current), D.current = null));
1761
1761
  };
1762
1762
  return v && document.addEventListener("mousedown", f), () => {
1763
1763
  document.removeEventListener("mousedown", f);
1764
1764
  };
1765
- }, [v]), G(() => {
1766
- const f = (z) => {
1767
- z.key === "Escape" && (h(!1), b(null), x.current?.focus(), D.current && (clearTimeout(D.current), D.current = null));
1765
+ }, [v]), Y(() => {
1766
+ const f = (M) => {
1767
+ M.key === "Escape" && (h(!1), b(null), x.current?.focus(), D.current && (clearTimeout(D.current), D.current = null));
1768
1768
  };
1769
1769
  return v && document.addEventListener("keydown", f), () => {
1770
1770
  document.removeEventListener("keydown", f);
1771
1771
  };
1772
- }, [v]), G(() => {
1773
- if (u && p.current) {
1772
+ }, [v]), Y(() => {
1773
+ if (m && p.current) {
1774
1774
  const f = p.current.querySelector(
1775
- `[data-option-value="${u}"]`
1775
+ `[data-option-value="${m}"]`
1776
1776
  );
1777
1777
  if (f) {
1778
- const z = f.getBoundingClientRect();
1778
+ const M = f.getBoundingClientRect();
1779
1779
  w({
1780
- top: z.top,
1781
- left: z.right + 8
1780
+ top: M.top,
1781
+ left: M.right + 8
1782
1782
  });
1783
1783
  }
1784
1784
  }
1785
- }, [u]), G(() => () => {
1785
+ }, [m]), Y(() => () => {
1786
1786
  D.current && clearTimeout(D.current);
1787
1787
  }, []);
1788
- const P = (f) => {
1788
+ const A = (f) => {
1789
1789
  f.stopPropagation(), !l && (h(!v), b(null), D.current && (clearTimeout(D.current), D.current = null));
1790
- }, q = (f, z, y) => {
1791
- f.stopPropagation(), !z.disabled && !z.divider && (!z.children || z.children.length === 0) && (s?.(z.value, y), h(!1), b(null));
1792
- }, re = (f) => {
1790
+ }, R = (f, M, y) => {
1791
+ f.stopPropagation(), !M.disabled && !M.divider && (!M.children || M.children.length === 0) && (s?.(M.value, y), h(!1), b(null));
1792
+ }, ee = (f) => {
1793
1793
  D.current && (clearTimeout(D.current), D.current = null), f.children && f.children.length > 0 ? b(f.value) : b(null);
1794
- }, Y = (f) => {
1794
+ }, K = (f) => {
1795
1795
  f.children && f.children.length > 0 ? D.current = setTimeout(() => {
1796
1796
  b(null);
1797
1797
  }, 150) : b(null);
1798
- }, W = (f, z, y) => {
1799
- f.stopPropagation(), !z.disabled && !z.divider && (s?.(z.value, y), h(!1), b(null));
1798
+ }, G = (f, M, y) => {
1799
+ f.stopPropagation(), !M.disabled && !M.divider && (s?.(M.value, y), h(!1), b(null));
1800
1800
  }, ie = i(
1801
1801
  "fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
1802
1802
  "max-h-60 overflow-auto"
@@ -1817,7 +1817,7 @@ const Mr = ({
1817
1817
  "button",
1818
1818
  {
1819
1819
  ref: x,
1820
- onClick: P,
1820
+ onClick: A,
1821
1821
  disabled: l,
1822
1822
  "aria-haspopup": "menu",
1823
1823
  "aria-expanded": v,
@@ -1827,18 +1827,18 @@ const Mr = ({
1827
1827
  children: t
1828
1828
  }
1829
1829
  ),
1830
- v && /* @__PURE__ */ e("div", { ref: _, className: ie, style: B, onKeyDown: V, children: /* @__PURE__ */ c("div", { className: "p-2", role: "menu", children: [
1830
+ v && /* @__PURE__ */ e("div", { ref: E, className: ie, style: j, onKeyDown: q, children: /* @__PURE__ */ c("div", { className: "p-2", role: "menu", children: [
1831
1831
  d && (typeof d == "string" ? /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted uppercase tracking-label px-3 py-2", children: d }) : d),
1832
- r.map((f, z) => {
1832
+ r.map((f, M) => {
1833
1833
  if (f.divider)
1834
1834
  return /* @__PURE__ */ e(
1835
1835
  "div",
1836
1836
  {
1837
1837
  className: "border-t border-border my-2"
1838
1838
  },
1839
- `divider-${z}`
1839
+ `divider-${M}`
1840
1840
  );
1841
- const y = f.children && f.children.length > 0, $ = u === f.value;
1841
+ const y = f.children && f.children.length > 0, $ = m === f.value;
1842
1842
  return /* @__PURE__ */ c("div", { className: "relative group", children: [
1843
1843
  /* @__PURE__ */ c(
1844
1844
  "button",
@@ -1846,9 +1846,9 @@ const Mr = ({
1846
1846
  "data-option-value": f.value,
1847
1847
  role: "menuitem",
1848
1848
  "aria-haspopup": y ? "menu" : void 0,
1849
- onClick: (N) => q(N, f),
1850
- onMouseEnter: () => re(f),
1851
- onMouseLeave: () => Y(f),
1849
+ onClick: (N) => R(N, f),
1850
+ onMouseEnter: () => ee(f),
1851
+ onMouseLeave: () => K(f),
1852
1852
  disabled: f.disabled,
1853
1853
  className: i(
1854
1854
  "flex w-full items-center justify-between rounded-md px-3 py-1.5 text-sm text-text transition-colors duration-fast ease-out hover:bg-surface-hover focus-visible:outline-none focus-visible:focus-ring",
@@ -1866,7 +1866,7 @@ const Mr = ({
1866
1866
  ] })
1867
1867
  ] }),
1868
1868
  /* @__PURE__ */ c("div", { className: "flex items-center space-x-2", children: [
1869
- m && n === f.value && /* @__PURE__ */ e(He, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 }),
1869
+ u && n === f.value && /* @__PURE__ */ e(He, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 }),
1870
1870
  y && /* @__PURE__ */ e("span", { className: "text-text-muted text-xs", children: "▶" })
1871
1871
  ] })
1872
1872
  ]
@@ -1875,7 +1875,7 @@ const Mr = ({
1875
1875
  y && $ && /* @__PURE__ */ e(
1876
1876
  "div",
1877
1877
  {
1878
- ref: S,
1878
+ ref: C,
1879
1879
  className: k,
1880
1880
  style: {
1881
1881
  top: `${g.top}px`,
@@ -1889,23 +1889,23 @@ const Mr = ({
1889
1889
  b(null);
1890
1890
  }, 150);
1891
1891
  },
1892
- children: /* @__PURE__ */ e("div", { className: "p-2", children: f.children.map((N, K) => {
1892
+ children: /* @__PURE__ */ e("div", { className: "p-2", children: f.children.map((N, J) => {
1893
1893
  if (N.divider)
1894
1894
  return /* @__PURE__ */ e(
1895
1895
  "div",
1896
1896
  {
1897
1897
  className: "border-t border-border my-2"
1898
1898
  },
1899
- `divider-${K}`
1899
+ `divider-${J}`
1900
1900
  );
1901
- const ne = typeof n == "object" && n[f.value] && n[f.value].includes(
1901
+ const se = typeof n == "object" && n[f.value] && n[f.value].includes(
1902
1902
  N.value
1903
1903
  ) || n === N.value;
1904
1904
  return /* @__PURE__ */ c(
1905
1905
  "button",
1906
1906
  {
1907
- onClick: (ee) => W(
1908
- ee,
1907
+ onClick: (re) => G(
1908
+ re,
1909
1909
  N,
1910
1910
  f.value
1911
1911
  ),
@@ -1924,7 +1924,7 @@ const Mr = ({
1924
1924
  N.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: N.description })
1925
1925
  ] })
1926
1926
  ] }),
1927
- m && ne && /* @__PURE__ */ e(He, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 })
1927
+ u && se && /* @__PURE__ */ e(He, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 })
1928
1928
  ]
1929
1929
  },
1930
1930
  N.value
@@ -1935,10 +1935,10 @@ const Mr = ({
1935
1935
  ] }, f.value);
1936
1936
  }),
1937
1937
  (() => {
1938
- const f = r.reduce((z, y) => {
1939
- if (y.divider) return z;
1938
+ const f = r.reduce((M, y) => {
1939
+ if (y.divider) return M;
1940
1940
  const $ = y.children ? y.children.filter((N) => !N.divider).length : 0;
1941
- return z + 1 + $;
1941
+ return M + 1 + $;
1942
1942
  }, 0);
1943
1943
  return f > 1 && /* @__PURE__ */ e("div", { className: "border-t border-border mt-2 pt-2", children: /* @__PURE__ */ c("div", { className: "text-xs text-text-muted px-3 py-1", children: [
1944
1944
  f,
@@ -1949,7 +1949,7 @@ const Mr = ({
1949
1949
  ]
1950
1950
  }
1951
1951
  );
1952
- }, _e = ({
1952
+ }, Ne = ({
1953
1953
  actions: t,
1954
1954
  defaultVariant: r = "secondary",
1955
1955
  className: n
@@ -1966,7 +1966,7 @@ const Mr = ({
1966
1966
  },
1967
1967
  s.id
1968
1968
  ) : /* @__PURE__ */ e(
1969
- te,
1969
+ ne,
1970
1970
  {
1971
1971
  variant: s.variant ?? r,
1972
1972
  onClick: (a) => {
@@ -1992,17 +1992,17 @@ const Mr = ({
1992
1992
  children: l
1993
1993
  }) => /* @__PURE__ */ c("div", { className: i("flex items-center gap-2", Tr[a], s), children: [
1994
1994
  r && /* @__PURE__ */ e(
1995
- te,
1995
+ ne,
1996
1996
  {
1997
1997
  variant: "secondary",
1998
1998
  onClick: r,
1999
1999
  "aria-label": n,
2000
- leftIcon: /* @__PURE__ */ e(Z, { icon: Ce, size: "sm" }),
2000
+ leftIcon: /* @__PURE__ */ e(Z, { icon: Se, size: "sm" }),
2001
2001
  iconOnly: !0
2002
2002
  }
2003
2003
  ),
2004
2004
  l && /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: l }),
2005
- /* @__PURE__ */ e(_e, { actions: t, className: i(!l && "ml-auto") })
2005
+ /* @__PURE__ */ e(Ne, { actions: t, className: i(!l && "ml-auto") })
2006
2006
  ] }), rs = (t) => (r) => t(r instanceof Date ? r : null), ns = (t) => (r) => t(typeof r == "string" ? r : ""), _r = {
2007
2007
  none: "px-0",
2008
2008
  sm: "px-2",
@@ -2028,17 +2028,17 @@ const Lr = (t) => {
2028
2028
  Fe,
2029
2029
  {
2030
2030
  value: t.value,
2031
- onChange: (m) => t.onChange(m),
2031
+ onChange: (u) => t.onChange(u),
2032
2032
  placeholder: t.placeholder || t.label,
2033
2033
  className: i("min-w-40", o && "bg-info-soft text-info-fg")
2034
2034
  }
2035
2035
  );
2036
2036
  }
2037
- const n = (o) => t.options?.find((m) => m.value === o)?.label ?? String(o), s = (o) => Array.isArray(t.value) ? t.value.includes(o) : t.value === o, a = (o) => {
2037
+ const n = (o) => t.options?.find((u) => u.value === o)?.label ?? String(o), s = (o) => Array.isArray(t.value) ? t.value.includes(o) : t.value === o, a = (o) => {
2038
2038
  if (!t.multiSelect) return t.onChange(o);
2039
- const m = Array.isArray(t.value) ? t.value : [];
2039
+ const u = Array.isArray(t.value) ? t.value : [];
2040
2040
  t.onChange(
2041
- m.includes(o) ? m.filter((d) => d !== o) : [...m, o]
2041
+ u.includes(o) ? u.filter((d) => d !== o) : [...u, o]
2042
2042
  );
2043
2043
  }, l = r.length > 0;
2044
2044
  return /* @__PURE__ */ e(
@@ -2051,24 +2051,24 @@ const Lr = (t) => {
2051
2051
  label: l ? `${t.label}: ${r.map(n).join(", ")}` : t.label,
2052
2052
  title: t.label,
2053
2053
  onClear: () => t.onChange(t.multiSelect ? [] : "all"),
2054
- menu: (o) => /* @__PURE__ */ e("div", { role: "listbox", className: "flex flex-col", children: t.options?.map((m) => /* @__PURE__ */ e(
2054
+ menu: (o) => /* @__PURE__ */ e("div", { role: "listbox", className: "flex flex-col", children: t.options?.map((u) => /* @__PURE__ */ e(
2055
2055
  "button",
2056
2056
  {
2057
2057
  type: "button",
2058
2058
  role: "option",
2059
- "aria-selected": s(m.value),
2059
+ "aria-selected": s(u.value),
2060
2060
  onClick: () => {
2061
- a(m.value), t.multiSelect || o();
2061
+ a(u.value), t.multiSelect || o();
2062
2062
  },
2063
2063
  className: i(
2064
2064
  "flex cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-sm",
2065
2065
  "transition-colors duration-fast ease-out hover:bg-surface-hover",
2066
2066
  "focus-visible:outline-none focus-visible:focus-ring",
2067
- s(m.value) ? "font-medium text-text" : "text-text-muted"
2067
+ s(u.value) ? "font-medium text-text" : "text-text-muted"
2068
2068
  ),
2069
- children: m.label
2069
+ children: u.label
2070
2070
  },
2071
- m.value
2071
+ u.value
2072
2072
  )) })
2073
2073
  }
2074
2074
  );
@@ -2080,102 +2080,102 @@ const Lr = (t) => {
2080
2080
  searchPlaceholder: a = "Search...",
2081
2081
  searchValue: l,
2082
2082
  onSearchChange: o,
2083
- filters: m = [],
2083
+ filters: u = [],
2084
2084
  toolbarActions: d = [],
2085
2085
  paginated: v = !1,
2086
2086
  defaultPageSize: h = 10,
2087
- actions: u = [],
2087
+ actions: m = [],
2088
2088
  onRowClick: b,
2089
2089
  selectable: g = !1,
2090
2090
  selectedRows: w = [],
2091
2091
  onSelectionChange: p,
2092
- getRowKey: x = (re, Y) => Y,
2093
- emptyContent: S,
2094
- footerSummary: _,
2095
- size: B = "md",
2092
+ getRowKey: x = (ee, K) => K,
2093
+ emptyContent: C,
2094
+ footerSummary: E,
2095
+ size: j = "md",
2096
2096
  hoverable: D = !0,
2097
- padding: J = "md",
2098
- className: V,
2099
- rowClassName: P,
2100
- headerBackground: q = !0
2097
+ padding: U = "md",
2098
+ className: q,
2099
+ rowClassName: A,
2100
+ headerBackground: R = !0
2101
2101
  }) => {
2102
- const [re, Y] = j(""), W = l !== void 0, ie = W ? l : re, k = o ?? Y, [f, z] = j({
2102
+ const [ee, K] = F(""), G = l !== void 0, ie = G ? l : ee, k = o ?? K, [f, M] = F({
2103
2103
  column: null,
2104
2104
  direction: null
2105
- }), [y, $] = j({
2105
+ }), [y, $] = F({
2106
2106
  page: 0,
2107
2107
  pageSize: h
2108
- }), N = ae(null), K = pe(() => {
2109
- let E = t;
2110
- if (s && !W && ie.trim()) {
2111
- const U = r.filter(
2108
+ }), N = te(null), J = ge(() => {
2109
+ let z = t;
2110
+ if (s && !G && ie.trim()) {
2111
+ const W = r.filter(
2112
2112
  (oe) => oe.searchable !== !1
2113
- ), se = ie.toLowerCase();
2114
- E = E.filter((oe) => U.some((F) => {
2115
- const ue = typeof F.accessor == "function" ? F.accessor(oe) : oe[F.accessor];
2116
- return String(ue || "").toLowerCase().includes(se);
2113
+ ), ae = ie.toLowerCase();
2114
+ z = z.filter((oe) => W.some((B) => {
2115
+ const ue = typeof B.accessor == "function" ? B.accessor(oe) : oe[B.accessor];
2116
+ return String(ue || "").toLowerCase().includes(ae);
2117
2117
  }));
2118
2118
  }
2119
- return m.forEach((U) => {
2120
- U.value && U.value !== "all" && (E = E.filter((se) => {
2121
- const oe = r.find((ue) => ue.id === U.id);
2119
+ return u.forEach((W) => {
2120
+ W.value && W.value !== "all" && (z = z.filter((ae) => {
2121
+ const oe = r.find((ue) => ue.id === W.id);
2122
2122
  if (!oe) return !0;
2123
- const F = typeof oe.accessor == "function" ? oe.accessor(se) : se[oe.accessor];
2124
- return String(F || "") === U.value;
2123
+ const B = typeof oe.accessor == "function" ? oe.accessor(ae) : ae[oe.accessor];
2124
+ return String(B || "") === W.value;
2125
2125
  }));
2126
- }), E;
2127
- }, [t, ie, W, r, s, m]), ne = pe(() => {
2128
- if (!f.column || !f.direction) return K;
2129
- const E = r.find((U) => U.id === f.column);
2130
- return E ? [...K].sort((U, se) => {
2131
- const oe = typeof E.accessor == "function" ? E.accessor(U) : U[E.accessor], F = typeof E.accessor == "function" ? E.accessor(se) : se[E.accessor];
2126
+ }), z;
2127
+ }, [t, ie, G, r, s, u]), se = ge(() => {
2128
+ if (!f.column || !f.direction) return J;
2129
+ const z = r.find((W) => W.id === f.column);
2130
+ return z ? [...J].sort((W, ae) => {
2131
+ const oe = typeof z.accessor == "function" ? z.accessor(W) : W[z.accessor], B = typeof z.accessor == "function" ? z.accessor(ae) : ae[z.accessor];
2132
2132
  let ue = 0;
2133
- return oe < F ? ue = -1 : oe > F && (ue = 1), f.direction === "desc" ? -ue : ue;
2134
- }) : K;
2135
- }, [K, f, r]), ee = pe(() => {
2136
- if (!v) return ne;
2137
- const E = y.page * y.pageSize, U = E + y.pageSize;
2138
- return ne.slice(E, U);
2139
- }, [ne, y, v]), X = xe(
2140
- (E) => {
2141
- r.find((se) => se.id === E)?.sortable && z((se) => se.column !== E ? { column: E, direction: "asc" } : se.direction === "asc" ? { column: E, direction: "desc" } : { column: null, direction: null });
2133
+ return oe < B ? ue = -1 : oe > B && (ue = 1), f.direction === "desc" ? -ue : ue;
2134
+ }) : J;
2135
+ }, [J, f, r]), re = ge(() => {
2136
+ if (!v) return se;
2137
+ const z = y.page * y.pageSize, W = z + y.pageSize;
2138
+ return se.slice(z, W);
2139
+ }, [se, y, v]), X = xe(
2140
+ (z) => {
2141
+ r.find((ae) => ae.id === z)?.sortable && M((ae) => ae.column !== z ? { column: z, direction: "asc" } : ae.direction === "asc" ? { column: z, direction: "desc" } : { column: null, direction: null });
2142
2142
  },
2143
2143
  [r]
2144
- ), I = xe((E) => {
2145
- $((U) => ({ ...U, page: E }));
2146
- }, []), R = xe(
2147
- (E, U) => {
2144
+ ), P = xe((z) => {
2145
+ $((W) => ({ ...W, page: z }));
2146
+ }, []), H = xe(
2147
+ (z, W) => {
2148
2148
  if (!p) return;
2149
- const se = x(E, 0);
2150
- p(U ? [...w, E] : w.filter(
2151
- (oe, F) => x(w[F], F) !== se
2149
+ const ae = x(z, 0);
2150
+ p(W ? [...w, z] : w.filter(
2151
+ (oe, B) => x(w[B], B) !== ae
2152
2152
  ));
2153
2153
  },
2154
2154
  [w, p, x]
2155
- ), M = xe(
2156
- (E) => {
2157
- p && p(E ? [...ee] : []);
2155
+ ), T = xe(
2156
+ (z) => {
2157
+ p && p(z ? [...re] : []);
2158
2158
  },
2159
- [ee, p]
2159
+ [re, p]
2160
2160
  );
2161
- G(() => {
2162
- $((E) => ({ ...E, page: 0 }));
2163
- }, [ie, f]), G(() => {
2164
- $((E) => ({ ...E, page: 0 }));
2165
- }, [m.map((E) => E.value).join(",")]);
2166
- const C = ne.length, A = Math.ceil(C / y.pageSize), O = y.page * y.pageSize + 1, H = Math.min(O + y.pageSize - 1, C), T = ee.length > 0 && ee.every((E) => {
2167
- const U = x(E, 0);
2161
+ Y(() => {
2162
+ $((z) => ({ ...z, page: 0 }));
2163
+ }, [ie, f]), Y(() => {
2164
+ $((z) => ({ ...z, page: 0 }));
2165
+ }, [u.map((z) => z.value).join(",")]);
2166
+ const S = se.length, L = Math.ceil(S / y.pageSize), O = y.page * y.pageSize + 1, V = Math.min(O + y.pageSize - 1, S), _ = re.length > 0 && re.every((z) => {
2167
+ const W = x(z, 0);
2168
2168
  return w.some(
2169
- (se, oe) => x(se, oe) === U
2169
+ (ae, oe) => x(ae, oe) === W
2170
2170
  );
2171
- }), L = ee.some((E) => {
2172
- const U = x(E, 0);
2171
+ }), I = re.some((z) => {
2172
+ const W = x(z, 0);
2173
2173
  return w.some(
2174
- (se, oe) => x(se, oe) === U
2174
+ (ae, oe) => x(ae, oe) === W
2175
2175
  );
2176
- }), Q = _r[J], le = q ? "bg-surface-sunk" : "bg-surface", de = i("text-text", Q), ge = s || m.length > 0 || d.length > 0, he = v && C > 0, Ie = he || _ !== void 0;
2177
- return /* @__PURE__ */ c("div", { className: i("flex min-w-0 flex-col", V), children: [
2178
- ge && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-2 pb-3", children: [
2176
+ }), Q = _r[U], le = R ? "bg-surface-sunk" : "bg-surface", de = i("text-text", Q), pe = s || u.length > 0 || d.length > 0, he = v && S > 0, Ie = he || E !== void 0;
2177
+ return /* @__PURE__ */ c("div", { className: i("flex min-w-0 flex-col", q), children: [
2178
+ pe && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-2 pb-3", children: [
2179
2179
  s && /* @__PURE__ */ e(
2180
2180
  at,
2181
2181
  {
@@ -2185,8 +2185,8 @@ const Lr = (t) => {
2185
2185
  containerClassName: "w-full sm:w-66"
2186
2186
  }
2187
2187
  ),
2188
- m.map((E) => /* @__PURE__ */ e(Lr, { ...E }, E.id)),
2189
- d.length > 0 && /* @__PURE__ */ e(_e, { actions: d, className: "ml-auto" })
2188
+ u.map((z) => /* @__PURE__ */ e(Lr, { ...z }, z.id)),
2189
+ d.length > 0 && /* @__PURE__ */ e(Ne, { actions: d, className: "ml-auto" })
2190
2190
  ] }),
2191
2191
  /* @__PURE__ */ e("div", { className: "relative w-full overflow-x-auto rounded-lg ring-1 ring-border", children: /* @__PURE__ */ c("table", { ref: N, className: "min-w-full border-collapse text-base text-text", children: [
2192
2192
  /* @__PURE__ */ e("thead", { className: i(le, "h-control-lg"), children: /* @__PURE__ */ c("tr", { children: [
@@ -2194,13 +2194,13 @@ const Lr = (t) => {
2194
2194
  ye,
2195
2195
  {
2196
2196
  size: "sm",
2197
- checked: T,
2198
- indeterminate: L && !T,
2199
- onChange: (E) => M(E.target.checked),
2197
+ checked: _,
2198
+ indeterminate: I && !_,
2199
+ onChange: (z) => T(z.target.checked),
2200
2200
  "aria-label": "Select all rows"
2201
2201
  }
2202
2202
  ) }),
2203
- r.map((E) => /* @__PURE__ */ e(
2203
+ r.map((z) => /* @__PURE__ */ e(
2204
2204
  "th",
2205
2205
  {
2206
2206
  className: i(
@@ -2208,74 +2208,74 @@ const Lr = (t) => {
2208
2208
  "text-xs font-semibold uppercase tracking-label text-text-muted",
2209
2209
  "group",
2210
2210
  {
2211
- "text-left": E.align === "left" || !E.align,
2212
- "text-center": E.align === "center",
2213
- "text-right": E.align === "right",
2214
- "cursor-pointer select-none": E.sortable,
2215
- [`sticky left-0 ${le}`]: E.sticky === "left",
2216
- [`sticky right-0 ${le}`]: E.sticky === "right"
2211
+ "text-left": z.align === "left" || !z.align,
2212
+ "text-center": z.align === "center",
2213
+ "text-right": z.align === "right",
2214
+ "cursor-pointer select-none": z.sortable,
2215
+ [`sticky left-0 ${le}`]: z.sticky === "left",
2216
+ [`sticky right-0 ${le}`]: z.sticky === "right"
2217
2217
  }
2218
2218
  ),
2219
- style: { width: E.width },
2220
- onClick: () => E.sortable && X(E.id),
2219
+ style: { width: z.width },
2220
+ onClick: () => z.sortable && X(z.id),
2221
2221
  children: /* @__PURE__ */ c("div", { className: "flex items-center gap-1.5", children: [
2222
- E.headerCell ? E.headerCell() : E.header,
2223
- E.sortable && /* @__PURE__ */ e(
2222
+ z.headerCell ? z.headerCell() : z.header,
2223
+ z.sortable && /* @__PURE__ */ e(
2224
2224
  Z,
2225
2225
  {
2226
- icon: f.column === E.id && f.direction === "desc" ? $e : St,
2226
+ icon: f.column === z.id && f.direction === "desc" ? $e : St,
2227
2227
  size: "xs",
2228
2228
  className: i(
2229
2229
  "transition-opacity duration-fast ease-out",
2230
- f.column === E.id ? "text-text opacity-100" : "text-text-subtle opacity-0 group-hover:opacity-100"
2230
+ f.column === z.id ? "text-text opacity-100" : "text-text-subtle opacity-0 group-hover:opacity-100"
2231
2231
  )
2232
2232
  }
2233
2233
  )
2234
2234
  ] })
2235
2235
  },
2236
- E.id
2236
+ z.id
2237
2237
  )),
2238
- u.length > 0 && /* @__PURE__ */ e("th", { className: i(de, "w-10"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
2238
+ m.length > 0 && /* @__PURE__ */ e("th", { className: i(de, "w-10"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
2239
2239
  ] }) }),
2240
- /* @__PURE__ */ e("tbody", { children: n ? Array.from({ length: Dr }).map((E, U) => /* @__PURE__ */ c("tr", { className: "animate-pulse border-t border-border-subtle", "aria-hidden": !0, children: [
2240
+ /* @__PURE__ */ e("tbody", { children: n ? Array.from({ length: Dr }).map((z, W) => /* @__PURE__ */ c("tr", { className: "animate-pulse border-t border-border-subtle", "aria-hidden": !0, children: [
2241
2241
  g && /* @__PURE__ */ e("td", { className: i(de, "h-row-lg"), children: /* @__PURE__ */ e("span", { className: "block size-4 rounded-xs bg-surface-hover" }) }),
2242
- r.map((se, oe) => /* @__PURE__ */ e("td", { className: i(de, "h-row-lg"), style: { width: se.width }, children: /* @__PURE__ */ e(
2242
+ r.map((ae, oe) => /* @__PURE__ */ e("td", { className: i(de, "h-row-lg"), style: { width: ae.width }, children: /* @__PURE__ */ e(
2243
2243
  "span",
2244
2244
  {
2245
2245
  className: "block h-3 rounded-xs bg-surface-hover",
2246
- style: { width: We[(U + oe) % We.length] }
2246
+ style: { width: We[(W + oe) % We.length] }
2247
2247
  }
2248
- ) }, se.id)),
2249
- u.length > 0 && /* @__PURE__ */ e("td", { className: i(de, "h-row-lg") })
2250
- ] }, `skeleton-${U}`)) : ee.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
2248
+ ) }, ae.id)),
2249
+ m.length > 0 && /* @__PURE__ */ e("td", { className: i(de, "h-row-lg") })
2250
+ ] }, `skeleton-${W}`)) : re.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
2251
2251
  "td",
2252
2252
  {
2253
- colSpan: r.length + (g ? 1 : 0) + (u.length > 0 ? 1 : 0),
2253
+ colSpan: r.length + (g ? 1 : 0) + (m.length > 0 ? 1 : 0),
2254
2254
  className: i(
2255
2255
  de,
2256
2256
  "border-t border-border-subtle py-10 text-center text-text-muted"
2257
2257
  ),
2258
- children: S || "No data available"
2258
+ children: C || "No data available"
2259
2259
  }
2260
- ) }) : ee.map((E, U) => {
2261
- const se = x(E, U), oe = w.some(
2262
- (F, ue) => x(F, ue) === se
2260
+ ) }) : re.map((z, W) => {
2261
+ const ae = x(z, W), oe = w.some(
2262
+ (B, ue) => x(B, ue) === ae
2263
2263
  );
2264
2264
  return /* @__PURE__ */ c(
2265
2265
  "tr",
2266
2266
  {
2267
2267
  className: i(
2268
- $r[B],
2268
+ $r[j],
2269
2269
  // Hairline above every row, including the first: it is
2270
2270
  // what separates the body from the column strip.
2271
2271
  "border-t border-border-subtle",
2272
2272
  D && "transition-colors duration-fast ease-out hover:bg-surface-hover",
2273
2273
  b && "cursor-pointer",
2274
2274
  oe && "bg-accent-soft",
2275
- P?.(E, U)
2275
+ A?.(z, W)
2276
2276
  ),
2277
- onClick: (F) => {
2278
- F.stopPropagation(), b?.(E, U);
2277
+ onClick: (B) => {
2278
+ B.stopPropagation(), b?.(z, W);
2279
2279
  },
2280
2280
  children: [
2281
2281
  g && /* @__PURE__ */ e("td", { className: de, children: /* @__PURE__ */ e(
@@ -2283,98 +2283,98 @@ const Lr = (t) => {
2283
2283
  {
2284
2284
  size: "sm",
2285
2285
  checked: oe,
2286
- onClick: (F) => F.stopPropagation(),
2287
- onChange: (F) => {
2288
- F.stopPropagation(), R(E, F.target.checked);
2286
+ onClick: (B) => B.stopPropagation(),
2287
+ onChange: (B) => {
2288
+ B.stopPropagation(), H(z, B.target.checked);
2289
2289
  },
2290
2290
  "aria-label": "Select row"
2291
2291
  }
2292
2292
  ) }),
2293
- r.map((F) => {
2294
- const ue = typeof F.accessor == "function" ? F.accessor(E) : E[F.accessor];
2293
+ r.map((B) => {
2294
+ const ue = typeof B.accessor == "function" ? B.accessor(z) : z[B.accessor];
2295
2295
  return /* @__PURE__ */ e(
2296
2296
  "td",
2297
2297
  {
2298
2298
  className: i(de, {
2299
- "text-left": F.align === "left" || !F.align,
2300
- "text-center": F.align === "center",
2301
- "text-right": F.align === "right",
2302
- "sticky left-0 bg-surface": F.sticky === "left",
2303
- "sticky right-0 bg-surface": F.sticky === "right"
2299
+ "text-left": B.align === "left" || !B.align,
2300
+ "text-center": B.align === "center",
2301
+ "text-right": B.align === "right",
2302
+ "sticky left-0 bg-surface": B.sticky === "left",
2303
+ "sticky right-0 bg-surface": B.sticky === "right"
2304
2304
  }),
2305
- children: F.cell ? F.cell(ue, E, U) : String(ue || "")
2305
+ children: B.cell ? B.cell(ue, z, W) : String(ue || "")
2306
2306
  },
2307
- F.id
2307
+ B.id
2308
2308
  );
2309
2309
  }),
2310
- u.length > 0 && /* @__PURE__ */ e("td", { className: de, children: /* @__PURE__ */ e(
2310
+ m.length > 0 && /* @__PURE__ */ e("td", { className: de, children: /* @__PURE__ */ e(
2311
2311
  Mr,
2312
2312
  {
2313
2313
  className: "rounded-md",
2314
2314
  trigger: /* @__PURE__ */ e("span", { className: "grid size-7 place-items-center text-text-subtle", children: /* @__PURE__ */ e(Z, { icon: Et, size: "md", color: "current" }) }),
2315
- options: u.map((F) => ({
2316
- value: F.id,
2317
- label: F.label,
2318
- icon: F.icon,
2319
- disabled: F.disabled?.(E)
2315
+ options: m.map((B) => ({
2316
+ value: B.id,
2317
+ label: B.label,
2318
+ icon: B.icon,
2319
+ disabled: B.disabled?.(z)
2320
2320
  })),
2321
- onSelect: (F) => {
2322
- const ue = u.find(
2323
- (dt) => dt.id === F
2321
+ onSelect: (B) => {
2322
+ const ue = m.find(
2323
+ (dt) => dt.id === B
2324
2324
  );
2325
- ue && ue.onClick(E, U);
2325
+ ue && ue.onClick(z, W);
2326
2326
  },
2327
2327
  placement: "bottom-end"
2328
2328
  }
2329
2329
  ) })
2330
2330
  ]
2331
2331
  },
2332
- se
2332
+ ae
2333
2333
  );
2334
2334
  }) })
2335
2335
  ] }) }),
2336
2336
  Ie && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-3 px-1 pt-3 text-xs text-text-muted", children: [
2337
- /* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: _ ?? `Showing ${O}–${H} of ${C}` }),
2337
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: E ?? `Showing ${O}–${V} of ${S}` }),
2338
2338
  he && /* @__PURE__ */ c("div", { className: "flex items-center gap-0.5", children: [
2339
2339
  /* @__PURE__ */ e(
2340
- te,
2340
+ ne,
2341
2341
  {
2342
2342
  size: "xs",
2343
2343
  variant: "ghost",
2344
2344
  iconOnly: !0,
2345
2345
  "aria-label": "Previous page",
2346
- onClick: () => I(y.page - 1),
2346
+ onClick: () => P(y.page - 1),
2347
2347
  disabled: y.page === 0,
2348
- children: /* @__PURE__ */ e(Z, { icon: Ce, size: "md", color: "current" })
2348
+ children: /* @__PURE__ */ e(Z, { icon: Se, size: "md", color: "current" })
2349
2349
  }
2350
2350
  ),
2351
- Ar(y.page, A).map(
2352
- (E, U) => E === "gap" ? /* @__PURE__ */ e("span", { className: "px-1 text-text-subtle", children: "…" }, `gap-${U}`) : /* @__PURE__ */ e(
2351
+ Ar(y.page, L).map(
2352
+ (z, W) => z === "gap" ? /* @__PURE__ */ e("span", { className: "px-1 text-text-subtle", children: "…" }, `gap-${W}`) : /* @__PURE__ */ e(
2353
2353
  "button",
2354
2354
  {
2355
2355
  type: "button",
2356
- "aria-current": E === y.page ? "page" : void 0,
2357
- onClick: () => I(E),
2356
+ "aria-current": z === y.page ? "page" : void 0,
2357
+ onClick: () => P(z),
2358
2358
  className: i(
2359
2359
  "h-control-xs min-w-6 cursor-pointer rounded-sm px-1.5 tabular-nums",
2360
2360
  "transition-colors duration-fast ease-out",
2361
2361
  "focus-visible:outline-none focus-visible:focus-ring",
2362
- E === y.page ? "bg-surface-sunk font-semibold text-text" : "text-text-muted hover:bg-surface-hover hover:text-text"
2362
+ z === y.page ? "bg-surface-sunk font-semibold text-text" : "text-text-muted hover:bg-surface-hover hover:text-text"
2363
2363
  ),
2364
- children: E + 1
2364
+ children: z + 1
2365
2365
  },
2366
- E
2366
+ z
2367
2367
  )
2368
2368
  ),
2369
2369
  /* @__PURE__ */ e(
2370
- te,
2370
+ ne,
2371
2371
  {
2372
2372
  size: "xs",
2373
2373
  variant: "ghost",
2374
2374
  iconOnly: !0,
2375
2375
  "aria-label": "Next page",
2376
- onClick: () => I(y.page + 1),
2377
- disabled: y.page >= A - 1,
2376
+ onClick: () => P(y.page + 1),
2377
+ disabled: y.page >= L - 1,
2378
2378
  children: /* @__PURE__ */ e(Z, { icon: De, size: "md", color: "current" })
2379
2379
  }
2380
2380
  )
@@ -2387,13 +2387,13 @@ const Lr = (t) => {
2387
2387
  onTabChange: n,
2388
2388
  className: s
2389
2389
  }) => {
2390
- const [a, l] = j(t[0]?.id || ""), o = r || a, m = (d) => {
2390
+ const [a, l] = F(t[0]?.id || ""), o = r || a, u = (d) => {
2391
2391
  n ? n(d) : l(d);
2392
2392
  };
2393
2393
  return /* @__PURE__ */ e("div", { className: i("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((d) => /* @__PURE__ */ e(
2394
2394
  "button",
2395
2395
  {
2396
- onClick: () => !d.disabled && m(d.id),
2396
+ onClick: () => !d.disabled && u(d.id),
2397
2397
  disabled: d.disabled,
2398
2398
  className: i(
2399
2399
  "border-b-2 py-2 px-1 text-sm font-medium transition-colors duration-fast",
@@ -2422,11 +2422,11 @@ const Lr = (t) => {
2422
2422
  size: l = "md",
2423
2423
  className: o
2424
2424
  }) => {
2425
- const [m, d] = j(
2425
+ const [u, d] = F(
2426
2426
  r || n || t[0]?.id || ""
2427
- ), v = n || m, h = (p) => {
2427
+ ), v = n || u, h = (p) => {
2428
2428
  s ? s(p) : d(p);
2429
- }, u = {
2429
+ }, m = {
2430
2430
  activeTab: v,
2431
2431
  setActiveTab: h
2432
2432
  }, b = t.find((p) => p.id === v), g = i(
@@ -2439,11 +2439,11 @@ const Lr = (t) => {
2439
2439
  },
2440
2440
  o
2441
2441
  ), w = (p, x) => {
2442
- const S = "transition-colors duration-fast font-medium", _ = {
2442
+ const C = "transition-colors duration-fast font-medium", E = {
2443
2443
  "text-xs px-2 py-1": l === "sm",
2444
2444
  "text-sm px-3 py-2": l === "md",
2445
2445
  "text-base px-4 py-3": l === "lg"
2446
- }, B = {
2446
+ }, j = {
2447
2447
  // Default variant
2448
2448
  "border-b-2 -mb-px": a === "default",
2449
2449
  // Pills variant
@@ -2453,17 +2453,17 @@ const Lr = (t) => {
2453
2453
  }, D = {
2454
2454
  "opacity-50 cursor-not-allowed": p.disabled,
2455
2455
  "cursor-pointer": !p.disabled
2456
- }, J = x ? {
2456
+ }, U = x ? {
2457
2457
  "border-accent-border text-text": a === "default" || a === "underline",
2458
2458
  "bg-surface text-text shadow-none": a === "pills"
2459
- } : {}, V = !x && !p.disabled ? {
2459
+ } : {}, q = !x && !p.disabled ? {
2460
2460
  "border-transparent text-text-muted hover:text-text": a === "default",
2461
2461
  "text-text-muted hover:text-text": a === "pills",
2462
2462
  "border-transparent text-text-muted hover:text-text hover:border-border": a === "underline"
2463
2463
  } : {};
2464
- return i(S, _, B, D, J, V);
2464
+ return i(C, E, j, D, U, q);
2465
2465
  };
2466
- return /* @__PURE__ */ e(Ir.Provider, { value: u, children: /* @__PURE__ */ c("div", { children: [
2466
+ return /* @__PURE__ */ e(Ir.Provider, { value: m, children: /* @__PURE__ */ c("div", { children: [
2467
2467
  /* @__PURE__ */ e("div", { className: g, role: "tablist", children: t.map((p) => /* @__PURE__ */ e(
2468
2468
  "button",
2469
2469
  {
@@ -2507,19 +2507,19 @@ function lt({
2507
2507
  closeOnBackdropClick: a = !0,
2508
2508
  closeOnEscape: l = !0,
2509
2509
  className: o,
2510
- backdropClassName: m,
2510
+ backdropClassName: u,
2511
2511
  children: d,
2512
2512
  footer: v,
2513
2513
  showCloseButton: h = !0
2514
2514
  }) {
2515
- const u = ae(null), b = ae(null);
2516
- G(() => {
2515
+ const m = te(null), b = te(null);
2516
+ Y(() => {
2517
2517
  if (!t || !l) return;
2518
2518
  const w = (p) => {
2519
2519
  p.key === "Escape" && r();
2520
2520
  };
2521
2521
  return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
2522
- }, [t, l, r]), G(() => (t ? (b.current = document.activeElement, u.current && u.current.focus(), document.body.style.overflow = "hidden") : (b.current && b.current.focus(), document.body.style.overflow = ""), () => {
2522
+ }, [t, l, r]), Y(() => (t ? (b.current = document.activeElement, m.current && m.current.focus(), document.body.style.overflow = "hidden") : (b.current && b.current.focus(), document.body.style.overflow = ""), () => {
2523
2523
  document.body.style.overflow = "";
2524
2524
  }), [t]);
2525
2525
  const g = (w) => {
@@ -2532,13 +2532,13 @@ function lt({
2532
2532
  "fixed inset-0 z-modal flex items-center justify-center p-4",
2533
2533
  "bg-scrim",
2534
2534
  // 'animate-fade-in',
2535
- m
2535
+ u
2536
2536
  ),
2537
2537
  onClick: g,
2538
2538
  children: /* @__PURE__ */ c(
2539
2539
  "div",
2540
2540
  {
2541
- ref: u,
2541
+ ref: m,
2542
2542
  className: i(
2543
2543
  "relative w-full bg-surface rounded-lg shadow-modal",
2544
2544
  // 'animate-scale-in',
@@ -2566,7 +2566,7 @@ function lt({
2566
2566
  onClick: r,
2567
2567
  className: "p-1 text-text-muted hover:text-text transition-colors",
2568
2568
  "aria-label": "Close modal",
2569
- children: /* @__PURE__ */ e(Z, { icon: we, size: "lg", color: "current" })
2569
+ children: /* @__PURE__ */ e(Z, { icon: ke, size: "lg", color: "current" })
2570
2570
  }
2571
2571
  )
2572
2572
  ] }),
@@ -2586,202 +2586,202 @@ const jr = ({
2586
2586
  error: a,
2587
2587
  disabled: l,
2588
2588
  accept: o,
2589
- onListFiles: m,
2589
+ onListFiles: u,
2590
2590
  onListMounts: d,
2591
2591
  onUploadFile: v,
2592
2592
  onDownloadFile: h,
2593
- onRegisterFile: u
2593
+ onRegisterFile: m
2594
2594
  }) => {
2595
- const [b, g] = j(!1), [w, p] = j([]), [x, S] = j(null), [_, B] = j("/"), [D, J] = j([]), [V, P] = j(!1), [q, re] = j(""), [Y, W] = j(
2595
+ const [b, g] = F(!1), [w, p] = F([]), [x, C] = F(null), [E, j] = F("/"), [D, U] = F([]), [q, A] = F(!1), [R, ee] = F(""), [K, G] = F(
2596
2596
  typeof t == "object" ? t : null
2597
- ), [ie, k] = j(!1), [f, z] = j(""), y = ae(null);
2598
- G(() => {
2597
+ ), [ie, k] = F(!1), [f, M] = F(""), y = te(null);
2598
+ Y(() => {
2599
2599
  b && $();
2600
- }, [b]), G(() => {
2600
+ }, [b]), Y(() => {
2601
2601
  b && x && N();
2602
- }, [b, x, _, q]);
2602
+ }, [b, x, E, R]);
2603
2603
  const $ = async () => {
2604
- P(!0);
2604
+ A(!0);
2605
2605
  try {
2606
- const T = await d?.();
2607
- T?.data && p(T.data);
2608
- } catch (T) {
2609
- console.error("Failed to load mounts", T);
2606
+ const _ = await d?.();
2607
+ _?.data && p(_.data);
2608
+ } catch (_) {
2609
+ console.error("Failed to load mounts", _);
2610
2610
  } finally {
2611
- P(!1);
2611
+ A(!1);
2612
2612
  }
2613
2613
  }, N = async () => {
2614
2614
  if (x) {
2615
- P(!0);
2615
+ A(!0);
2616
2616
  try {
2617
- const T = await m?.({ mountId: x.id, name: q, path: _ });
2618
- T?.data && J(T.data);
2619
- } catch (T) {
2620
- console.error("Failed to load files", T);
2617
+ const _ = await u?.({ mountId: x.id, name: R, path: E });
2618
+ _?.data && U(_.data);
2619
+ } catch (_) {
2620
+ console.error("Failed to load files", _);
2621
2621
  } finally {
2622
- P(!1);
2622
+ A(!1);
2623
2623
  }
2624
2624
  }
2625
- }, K = async (T) => {
2626
- const L = T.target.files?.[0];
2627
- if (L) {
2628
- P(!0);
2625
+ }, J = async (_) => {
2626
+ const I = _.target.files?.[0];
2627
+ if (I) {
2628
+ A(!0);
2629
2629
  try {
2630
- const Q = await L.arrayBuffer(), le = new Uint8Array(Q), de = {
2630
+ const Q = await I.arrayBuffer(), le = new Uint8Array(Q), de = {
2631
2631
  id: `local-${Date.now()}`,
2632
- name: L.name,
2632
+ name: I.name,
2633
2633
  type: "file",
2634
2634
  path: "/",
2635
- mimeType: L.type || "application/octet-stream",
2636
- size: L.size,
2635
+ mimeType: I.type || "application/octet-stream",
2636
+ size: I.size,
2637
2637
  mountId: "local",
2638
- providerKey: L.name,
2638
+ providerKey: I.name,
2639
2639
  ownerId: "me"
2640
2640
  };
2641
- W(de), r(de, le), g(!1);
2641
+ G(de), r(de, le), g(!1);
2642
2642
  } catch (Q) {
2643
2643
  console.error("Local file selection failed", Q);
2644
2644
  } finally {
2645
- P(!1);
2645
+ A(!1);
2646
2646
  }
2647
2647
  }
2648
- }, ne = async (T) => {
2649
- const L = T.target.files?.[0];
2650
- if (!(!L || !x)) {
2651
- P(!0);
2648
+ }, se = async (_) => {
2649
+ const I = _.target.files?.[0];
2650
+ if (!(!I || !x)) {
2651
+ A(!0);
2652
2652
  try {
2653
- const Q = await L.arrayBuffer(), le = await v?.({
2653
+ const Q = await I.arrayBuffer(), le = await v?.({
2654
2654
  file: new Uint8Array(Q),
2655
- filename: L.name,
2656
- mimeType: L.type || "application/octet-stream",
2655
+ filename: I.name,
2656
+ mimeType: I.type || "application/octet-stream",
2657
2657
  mountId: x.id,
2658
- path: _
2658
+ path: E
2659
2659
  });
2660
2660
  if (le?.data) {
2661
2661
  const de = le.data;
2662
- W(de), r(de, new Uint8Array(Q)), g(!1);
2662
+ G(de), r(de, new Uint8Array(Q)), g(!1);
2663
2663
  }
2664
2664
  } catch (Q) {
2665
2665
  console.error("Upload failed", Q);
2666
2666
  } finally {
2667
- P(!1);
2667
+ A(!1);
2668
2668
  }
2669
2669
  }
2670
- }, ee = async () => {
2670
+ }, re = async () => {
2671
2671
  if (!(!f || !x)) {
2672
- P(!0);
2672
+ A(!0);
2673
2673
  try {
2674
- const T = `${_}${f}/`;
2675
- u && (await u({
2674
+ const _ = `${E}${f}/`;
2675
+ m && (await m({
2676
2676
  name: f,
2677
2677
  type: "folder",
2678
- path: _,
2678
+ path: E,
2679
2679
  mimeType: "application/x-directory",
2680
2680
  size: 0,
2681
2681
  mountId: x.id,
2682
- providerKey: T,
2682
+ providerKey: _,
2683
2683
  ownerId: "me"
2684
- }), await N()), k(!1), z("");
2685
- } catch (T) {
2686
- console.error("Failed to create folder", T);
2684
+ }), await N()), k(!1), M("");
2685
+ } catch (_) {
2686
+ console.error("Failed to create folder", _);
2687
2687
  } finally {
2688
- P(!1);
2688
+ A(!1);
2689
2689
  }
2690
2690
  }
2691
- }, X = async (T) => {
2692
- P(!0);
2691
+ }, X = async (_) => {
2692
+ A(!0);
2693
2693
  try {
2694
- const L = await h?.(T.id);
2695
- W(T), r(T, L), g(!1);
2696
- } catch (L) {
2697
- console.error("Failed to download file", L);
2694
+ const I = await h?.(_.id);
2695
+ G(_), r(_, I), g(!1);
2696
+ } catch (I) {
2697
+ console.error("Failed to download file", I);
2698
2698
  } finally {
2699
- P(!1);
2699
+ A(!1);
2700
2700
  }
2701
- }, I = (T) => {
2702
- T.stopPropagation(), W(null), r(null);
2703
- }, R = pe(() => {
2704
- const T = /* @__PURE__ */ new Set(), L = [];
2701
+ }, P = (_) => {
2702
+ _.stopPropagation(), G(null), r(null);
2703
+ }, H = ge(() => {
2704
+ const _ = /* @__PURE__ */ new Set(), I = [];
2705
2705
  return D.forEach((Q) => {
2706
2706
  if (Q.type === "folder") {
2707
- Q.path === _ && T.add(Q.name);
2707
+ Q.path === E && _.add(Q.name);
2708
2708
  return;
2709
2709
  }
2710
- const le = Q.providerKey || Q.name, ge = (_ ? le.substring(_.length) : le).split("/").filter((he) => he !== "");
2711
- ge.length > 1 ? T.add(ge[0]) : ge.length === 1 && L.push(Q);
2710
+ const le = Q.providerKey || Q.name, pe = (E ? le.substring(E.length) : le).split("/").filter((he) => he !== "");
2711
+ pe.length > 1 ? _.add(pe[0]) : pe.length === 1 && I.push(Q);
2712
2712
  }), {
2713
- folders: Array.from(T).sort(),
2714
- files: L.sort((Q, le) => Q.name.localeCompare(le.name))
2713
+ folders: Array.from(_).sort(),
2714
+ files: I.sort((Q, le) => Q.name.localeCompare(le.name))
2715
2715
  };
2716
- }, [D, _]), M = (T) => {
2717
- B((L) => `${L}${T}/`);
2718
- }, C = () => {
2719
- const T = _.split("/").filter((L) => L !== "");
2720
- T.pop(), T.length === 0 ? B("/") : B(`${T.join("/")}/`);
2721
- }, A = pe(() => {
2722
- const T = R.folders.map((L) => ({
2723
- id: `folder-${L}`,
2724
- name: L,
2716
+ }, [D, E]), T = (_) => {
2717
+ j((I) => `${I}${_}/`);
2718
+ }, S = () => {
2719
+ const _ = E.split("/").filter((I) => I !== "");
2720
+ _.pop(), _.length === 0 ? j("/") : j(`${_.join("/")}/`);
2721
+ }, L = ge(() => {
2722
+ const _ = H.folders.map((I) => ({
2723
+ id: `folder-${I}`,
2724
+ name: I,
2725
2725
  type: "folder"
2726
2726
  }));
2727
- return R.files.forEach((L) => {
2728
- T.push({
2729
- ...L,
2727
+ return H.files.forEach((I) => {
2728
+ _.push({
2729
+ ...I,
2730
2730
  type: "file"
2731
2731
  });
2732
- }), T;
2733
- }, [R]), O = [
2732
+ }), _;
2733
+ }, [H]), O = [
2734
2734
  {
2735
2735
  id: "name",
2736
2736
  header: "Name",
2737
2737
  accessor: "name",
2738
- cell: (T, L) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
2738
+ cell: (_, I) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
2739
2739
  /* @__PURE__ */ e(
2740
2740
  Z,
2741
2741
  {
2742
- icon: L.type === "folder" ? Ve : Pe,
2742
+ icon: I.type === "folder" ? Ve : Pe,
2743
2743
  size: "sm",
2744
- color: L.type === "folder" ? "warning" : "secondary"
2744
+ color: I.type === "folder" ? "warning" : "secondary"
2745
2745
  }
2746
2746
  ),
2747
- /* @__PURE__ */ e("span", { className: i(L.type === "folder" && "font-medium"), children: T })
2747
+ /* @__PURE__ */ e("span", { className: i(I.type === "folder" && "font-medium"), children: _ })
2748
2748
  ] })
2749
2749
  },
2750
2750
  {
2751
2751
  id: "type",
2752
2752
  header: "Type",
2753
- accessor: (T) => T.type === "folder" ? "Folder" : T.mimeType
2753
+ accessor: (_) => _.type === "folder" ? "Folder" : _.mimeType
2754
2754
  },
2755
2755
  {
2756
2756
  id: "size",
2757
2757
  header: "Size",
2758
- accessor: (T) => T.type === "file" ? `${(T.size / 1024).toFixed(1)} KB` : "-"
2758
+ accessor: (_) => _.type === "file" ? `${(_.size / 1024).toFixed(1)} KB` : "-"
2759
2759
  },
2760
2760
  {
2761
2761
  id: "actions",
2762
2762
  header: "",
2763
2763
  accessor: "id",
2764
2764
  align: "right",
2765
- cell: (T, L) => /* @__PURE__ */ e(
2766
- te,
2765
+ cell: (_, I) => /* @__PURE__ */ e(
2766
+ ne,
2767
2767
  {
2768
2768
  variant: "outline",
2769
2769
  onClick: (Q) => {
2770
- Q.stopPropagation(), L.type === "folder" ? M(L.name) : X(L);
2770
+ Q.stopPropagation(), I.type === "folder" ? T(I.name) : X(I);
2771
2771
  },
2772
- loading: V && L.type === "file" && Y?.id === L.id,
2773
- children: L.type === "folder" ? "Open" : "Select"
2772
+ loading: q && I.type === "file" && K?.id === I.id,
2773
+ children: I.type === "folder" ? "Open" : "Select"
2774
2774
  }
2775
2775
  )
2776
2776
  }
2777
- ], H = [
2777
+ ], V = [
2778
2778
  {
2779
2779
  id: "name",
2780
2780
  header: "Mount Name",
2781
2781
  accessor: "name",
2782
- cell: (T) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2 font-medium", children: [
2782
+ cell: (_) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2 font-medium", children: [
2783
2783
  /* @__PURE__ */ e(Z, { icon: qe, size: "sm", color: "primary" }),
2784
- /* @__PURE__ */ e("span", { children: T })
2784
+ /* @__PURE__ */ e("span", { children: _ })
2785
2785
  ] })
2786
2786
  },
2787
2787
  {
@@ -2789,7 +2789,7 @@ const jr = ({
2789
2789
  header: "",
2790
2790
  accessor: "id",
2791
2791
  align: "right",
2792
- cell: (T, L) => /* @__PURE__ */ e(te, { variant: "outline", onClick: () => S(L), children: "Open" })
2792
+ cell: (_, I) => /* @__PURE__ */ e(ne, { variant: "outline", onClick: () => C(I), children: "Open" })
2793
2793
  }
2794
2794
  ];
2795
2795
  return /* @__PURE__ */ c("div", { className: "space-y-1", children: [
@@ -2805,14 +2805,14 @@ const jr = ({
2805
2805
  l && "opacity-50 cursor-not-allowed bg-surface-sunk"
2806
2806
  ),
2807
2807
  children: [
2808
- /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Z, { icon: Y ? Pe : qe, color: Y ? "primary" : "secondary" }) }),
2809
- /* @__PURE__ */ e("div", { className: "flex-grow truncate", children: Y ? /* @__PURE__ */ e("span", { className: "text-sm text-text font-medium", children: Y.name }) : /* @__PURE__ */ e("span", { className: "text-sm text-text-muted", children: s }) }),
2810
- Y && !l && /* @__PURE__ */ e(
2808
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Z, { icon: K ? Pe : qe, color: K ? "primary" : "secondary" }) }),
2809
+ /* @__PURE__ */ e("div", { className: "flex-grow truncate", children: K ? /* @__PURE__ */ e("span", { className: "text-sm text-text font-medium", children: K.name }) : /* @__PURE__ */ e("span", { className: "text-sm text-text-muted", children: s }) }),
2810
+ K && !l && /* @__PURE__ */ e(
2811
2811
  "button",
2812
2812
  {
2813
- onClick: I,
2813
+ onClick: P,
2814
2814
  className: "p-1 hover:bg-surface-hover rounded",
2815
- children: /* @__PURE__ */ e(Z, { icon: we, size: "xs" })
2815
+ children: /* @__PURE__ */ e(Z, { icon: ke, size: "xs" })
2816
2816
  }
2817
2817
  )
2818
2818
  ]
@@ -2824,7 +2824,7 @@ const jr = ({
2824
2824
  {
2825
2825
  open: b,
2826
2826
  onClose: () => {
2827
- g(!1), S(null), B("/"), k(!1);
2827
+ g(!1), C(null), j("/"), k(!1);
2828
2828
  },
2829
2829
  title: x ? `Explorer: ${x.name}` : "Select Storage Mount",
2830
2830
  size: "lg",
@@ -2836,33 +2836,33 @@ const jr = ({
2836
2836
  {
2837
2837
  id: "remote",
2838
2838
  label: "Platform Storage",
2839
- content: /* @__PURE__ */ e("div", { className: "space-y-4", children: x ? /* @__PURE__ */ c(ke, { children: [
2839
+ content: /* @__PURE__ */ e("div", { className: "space-y-4", children: x ? /* @__PURE__ */ c(Ce, { children: [
2840
2840
  /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-2", children: [
2841
2841
  /* @__PURE__ */ e(
2842
- te,
2842
+ ne,
2843
2843
  {
2844
2844
  variant: "ghost",
2845
2845
  onClick: () => {
2846
- _ && _ !== "/" ? C() : S(null);
2846
+ E && E !== "/" ? S() : C(null);
2847
2847
  },
2848
2848
  leftIcon: /* @__PURE__ */ e(Z, { icon: zt, size: "xs" }),
2849
- children: _ ? "Back" : "Back to Mounts"
2849
+ children: E ? "Back" : "Back to Mounts"
2850
2850
  }
2851
2851
  ),
2852
- /* @__PURE__ */ e("div", { className: "flex items-center gap-1 text-xs text-text-muted overflow-hidden bg-surface-hover px-2 py-1 rounded", children: /* @__PURE__ */ e("span", { className: "truncate", children: _ }) }),
2852
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-1 text-xs text-text-muted overflow-hidden bg-surface-hover px-2 py-1 rounded", children: /* @__PURE__ */ e("span", { className: "truncate", children: E }) }),
2853
2853
  /* @__PURE__ */ e("div", { className: "flex-grow min-w-40", children: /* @__PURE__ */ e(
2854
- Ne,
2854
+ we,
2855
2855
  {
2856
2856
  placeholder: "Search...",
2857
- value: q,
2858
- onChange: (T) => re(T.target.value),
2857
+ value: R,
2858
+ onChange: (_) => ee(_.target.value),
2859
2859
  startIcon: /* @__PURE__ */ e(Ae, { size: 14 }),
2860
2860
  fullWidth: !0
2861
2861
  }
2862
2862
  ) }),
2863
2863
  /* @__PURE__ */ c("div", { className: "flex items-center gap-1", children: [
2864
2864
  /* @__PURE__ */ e(
2865
- te,
2865
+ ne,
2866
2866
  {
2867
2867
  variant: "outline",
2868
2868
  onClick: () => k(!0),
@@ -2871,12 +2871,12 @@ const jr = ({
2871
2871
  }
2872
2872
  ),
2873
2873
  /* @__PURE__ */ e(
2874
- te,
2874
+ ne,
2875
2875
  {
2876
2876
  variant: "primary",
2877
2877
  onClick: () => y.current?.click(),
2878
2878
  leftIcon: /* @__PURE__ */ e(Z, { icon: Tt, size: "xs" }),
2879
- loading: V,
2879
+ loading: q,
2880
2880
  children: "Upload"
2881
2881
  }
2882
2882
  ),
@@ -2886,7 +2886,7 @@ const jr = ({
2886
2886
  type: "file",
2887
2887
  className: "hidden",
2888
2888
  ref: y,
2889
- onChange: ne,
2889
+ onChange: se,
2890
2890
  accept: o
2891
2891
  }
2892
2892
  )
@@ -2895,35 +2895,35 @@ const jr = ({
2895
2895
  ie && /* @__PURE__ */ c("div", { className: "flex items-center gap-2 p-3 bg-surface-sunk rounded-lg border border-border", children: [
2896
2896
  /* @__PURE__ */ e(Z, { icon: Ve, size: "sm", color: "warning" }),
2897
2897
  /* @__PURE__ */ e(
2898
- Ne,
2898
+ we,
2899
2899
  {
2900
2900
  placeholder: "Folder name",
2901
2901
  value: f,
2902
- onChange: (T) => z(T.target.value),
2902
+ onChange: (_) => M(_.target.value),
2903
2903
  autoFocus: !0
2904
2904
  }
2905
2905
  ),
2906
- /* @__PURE__ */ e(te, { onClick: ee, loading: V, children: "Create" }),
2907
- /* @__PURE__ */ e(te, { variant: "ghost", onClick: () => k(!1), children: "Cancel" })
2906
+ /* @__PURE__ */ e(ne, { onClick: re, loading: q, children: "Create" }),
2907
+ /* @__PURE__ */ e(ne, { variant: "ghost", onClick: () => k(!1), children: "Cancel" })
2908
2908
  ] }),
2909
2909
  /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
2910
2910
  Ke,
2911
2911
  {
2912
- data: A,
2912
+ data: L,
2913
2913
  columns: O,
2914
- loading: V,
2914
+ loading: q,
2915
2915
  emptyContent: "This folder is empty",
2916
- onRowClick: (T) => T.type === "folder" ? M(T.name) : X(T)
2916
+ onRowClick: (_) => _.type === "folder" ? T(_.name) : X(_)
2917
2917
  }
2918
2918
  ) })
2919
2919
  ] }) : /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
2920
2920
  Ke,
2921
2921
  {
2922
2922
  data: w,
2923
- columns: H,
2924
- loading: V,
2923
+ columns: V,
2924
+ loading: q,
2925
2925
  emptyContent: "No storage mounts configured",
2926
- onRowClick: (T) => S(T)
2926
+ onRowClick: (_) => C(_)
2927
2927
  }
2928
2928
  ) }) })
2929
2929
  },
@@ -2939,15 +2939,15 @@ const jr = ({
2939
2939
  " be uploaded to platform storage."
2940
2940
  ] }),
2941
2941
  /* @__PURE__ */ c("label", { className: "cursor-pointer", children: [
2942
- /* @__PURE__ */ e(te, { variant: "primary", size: "lg", loading: V, className: "pointer-events-none", children: "Browse Local File" }),
2942
+ /* @__PURE__ */ e(ne, { variant: "primary", size: "lg", loading: q, className: "pointer-events-none", children: "Browse Local File" }),
2943
2943
  /* @__PURE__ */ e(
2944
2944
  "input",
2945
2945
  {
2946
2946
  type: "file",
2947
2947
  className: "hidden",
2948
- onChange: K,
2948
+ onChange: J,
2949
2949
  accept: o,
2950
- disabled: V
2950
+ disabled: q
2951
2951
  }
2952
2952
  )
2953
2953
  ] })
@@ -2973,11 +2973,11 @@ const jr = ({
2973
2973
  fullWidth: a = !1,
2974
2974
  loading: l = !1,
2975
2975
  containerClassName: o,
2976
- labelClassName: m,
2976
+ labelClassName: u,
2977
2977
  className: d,
2978
2978
  id: v,
2979
2979
  rows: h = 4,
2980
- ...u
2980
+ ...m
2981
2981
  }, b) => {
2982
2982
  const g = ce.useId(), w = v || `textarea-${g}`, p = !!n, x = n || r ? `${w}-description` : void 0;
2983
2983
  return /* @__PURE__ */ c("div", { className: i("flex flex-col", a && "w-full", o), children: [
@@ -2988,7 +2988,7 @@ const jr = ({
2988
2988
  className: i(
2989
2989
  rt,
2990
2990
  p ? "text-danger-fg" : "text-text-muted",
2991
- m
2991
+ u
2992
2992
  ),
2993
2993
  children: t
2994
2994
  }
@@ -3009,7 +3009,7 @@ const jr = ({
3009
3009
  st(p),
3010
3010
  d
3011
3011
  ),
3012
- ...u
3012
+ ...m
3013
3013
  }
3014
3014
  ),
3015
3015
  l && /* @__PURE__ */ e(
@@ -3089,8 +3089,8 @@ function Rr(t, r, n) {
3089
3089
  const s = r.split("."), a = Array.isArray(t) ? [...t] : { ...t };
3090
3090
  let l = a;
3091
3091
  for (let o = 0; o < s.length - 1; o++) {
3092
- const m = s[o], d = l[m];
3093
- l[m] = d && typeof d == "object" ? Array.isArray(d) ? [...d] : { ...d } : {}, l = l[m];
3092
+ const u = s[o], d = l[u];
3093
+ l[u] = d && typeof d == "object" ? Array.isArray(d) ? [...d] : { ...d } : {}, l = l[u];
3094
3094
  }
3095
3095
  return l[s[s.length - 1]] = n, a;
3096
3096
  }
@@ -3126,22 +3126,22 @@ const as = ({
3126
3126
  onChange: a,
3127
3127
  transform: l,
3128
3128
  validate: o,
3129
- submitButton: m = { label: "Submit", variant: "primary" },
3129
+ submitButton: u = { label: "Submit", variant: "primary" },
3130
3130
  cancelButton: d = { label: "Cancel", variant: "outline" },
3131
3131
  showButtons: v = !0,
3132
3132
  layout: h = "vertical",
3133
- size: u = "md",
3133
+ size: m = "md",
3134
3134
  loading: b = !1,
3135
3135
  className: g,
3136
3136
  ref: w,
3137
3137
  sdk: p
3138
3138
  }) => {
3139
- const [x, S] = j(r || {}), [_, B] = j({}), [D, J] = j({});
3140
- G(() => {
3141
- r && S({ ...r });
3139
+ const [x, C] = F(r || {}), [E, j] = F({}), [D, U] = F({});
3140
+ Y(() => {
3141
+ r && C({ ...r });
3142
3142
  }, [r]);
3143
- const V = xe(
3144
- (k, f, z) => {
3143
+ const q = xe(
3144
+ (k, f, M) => {
3145
3145
  const y = t.flatMap(($) => $.items).find(($) => $.name === k);
3146
3146
  if (!y) return null;
3147
3147
  if (y.required && (f == null || f === ""))
@@ -3154,48 +3154,48 @@ const as = ({
3154
3154
  if (Array.isArray(f) && y.arrayFields) {
3155
3155
  const $ = [];
3156
3156
  let N = !1;
3157
- if (f.forEach((K, ne) => {
3158
- const ee = {};
3157
+ if (f.forEach((J, se) => {
3158
+ const re = {};
3159
3159
  for (const X of y.arrayFields) {
3160
- const I = K?.[X.name];
3161
- if (X.required && (I == null || I === ""))
3162
- ee[X.name] = `${X.label} is required`, N = !0;
3160
+ const P = J?.[X.name];
3161
+ if (X.required && (P == null || P === ""))
3162
+ re[X.name] = `${X.label} is required`, N = !0;
3163
3163
  else if (X.validator) {
3164
- const R = X.validator(I, K);
3165
- R && (ee[X.name] = R, N = !0);
3164
+ const H = X.validator(P, J);
3165
+ H && (re[X.name] = H, N = !0);
3166
3166
  }
3167
3167
  }
3168
- $[ne] = ee;
3168
+ $[se] = re;
3169
3169
  }), N)
3170
3170
  return JSON.stringify($);
3171
3171
  }
3172
3172
  }
3173
- return y.validator ? y.validator(f, z) : null;
3173
+ return y.validator ? y.validator(f, M) : null;
3174
3174
  },
3175
3175
  [t]
3176
- ), P = xe(
3176
+ ), A = xe(
3177
3177
  (k, f) => {
3178
- let z = Rr(
3178
+ let M = Rr(
3179
3179
  x,
3180
3180
  k,
3181
3181
  f
3182
3182
  );
3183
- t.flatMap((N) => N.items).find((N) => N.name === k)?.removeIfEmpty && (f == null || f === "") && (z = Hr(z, k)), S(z), J((N) => ({ ...N, [k]: !0 }));
3184
- const $ = V(k, f, z);
3185
- B((N) => ({
3183
+ t.flatMap((N) => N.items).find((N) => N.name === k)?.removeIfEmpty && (f == null || f === "") && (M = Hr(M, k)), C(M), U((N) => ({ ...N, [k]: !0 }));
3184
+ const $ = q(k, f, M);
3185
+ j((N) => ({
3186
3186
  ...N,
3187
3187
  [k]: $ || ""
3188
- })), a?.(z, k);
3188
+ })), a?.(M, k);
3189
3189
  },
3190
- [x, t, V, a]
3191
- ), q = xe(
3190
+ [x, t, q, a]
3191
+ ), R = xe(
3192
3192
  async (k) => {
3193
3193
  if (k.preventDefault(), b) return;
3194
- const f = {}, z = t.flatMap(($) => $.items);
3195
- for (const $ of z) {
3194
+ const f = {}, M = t.flatMap(($) => $.items);
3195
+ for (const $ of M) {
3196
3196
  if ($.hidden || $.conditional && !$.conditional(x))
3197
3197
  continue;
3198
- const N = V(
3198
+ const N = q(
3199
3199
  $.name,
3200
3200
  Je(x, $.name),
3201
3201
  x
@@ -3206,15 +3206,15 @@ const as = ({
3206
3206
  const $ = o(x);
3207
3207
  $ && Object.assign(f, $);
3208
3208
  }
3209
- if (B(f), Object.keys(f).some(($) => f[$]))
3209
+ if (j(f), Object.keys(f).some(($) => f[$]))
3210
3210
  return;
3211
3211
  const y = l ? l(x) : x;
3212
3212
  await n?.(x, y);
3213
3213
  },
3214
- [x, t, V, o, l, n, b]
3215
- ), re = xe(
3214
+ [x, t, q, o, l, n, b]
3215
+ ), ee = xe(
3216
3216
  (k) => {
3217
- const f = Je(x, k.name), z = D[k.name] ? _[k.name] : void 0, y = k.disabled || b, $ = {
3217
+ const f = Je(x, k.name), M = D[k.name] ? E[k.name] : void 0, y = k.disabled || b, $ = {
3218
3218
  value: f || "",
3219
3219
  disabled: y,
3220
3220
  required: k.required,
@@ -3230,14 +3230,14 @@ const as = ({
3230
3230
  case "url":
3231
3231
  case "color":
3232
3232
  return /* @__PURE__ */ e(
3233
- Ne,
3233
+ we,
3234
3234
  {
3235
3235
  ...$,
3236
- onChange: (N) => P(k.name, N.target.value),
3236
+ onChange: (N) => A(k.name, N.target.value),
3237
3237
  type: k.textType || k.type,
3238
3238
  ...Ge(k.autocomplete),
3239
- error: z,
3240
- size: u
3239
+ error: M,
3240
+ size: m
3241
3241
  }
3242
3242
  );
3243
3243
  case "textarea":
@@ -3245,18 +3245,18 @@ const as = ({
3245
3245
  Be,
3246
3246
  {
3247
3247
  ...$,
3248
- onChange: (N) => P(k.name, N.target.value),
3248
+ onChange: (N) => A(k.name, N.target.value),
3249
3249
  rows: k.rows ?? 4,
3250
- error: z,
3251
- size: u
3250
+ error: M,
3251
+ size: m
3252
3252
  }
3253
3253
  );
3254
3254
  case "select":
3255
3255
  return /* @__PURE__ */ e(
3256
- Te,
3256
+ _e,
3257
3257
  {
3258
3258
  ...$,
3259
- onChange: (N) => P(k.name, N),
3259
+ onChange: (N) => A(k.name, N),
3260
3260
  options: (k.options || []).map((N) => ({
3261
3261
  ...N,
3262
3262
  value: String(N.value)
@@ -3264,8 +3264,8 @@ const as = ({
3264
3264
  searchable: k.searchable,
3265
3265
  multiple: k.multiple,
3266
3266
  allowCreate: k.allowCreate,
3267
- error: z,
3268
- size: u
3267
+ error: M,
3268
+ size: m
3269
3269
  }
3270
3270
  );
3271
3271
  // A short, fixed set of mutually exclusive values — priority, a scope,
@@ -3277,12 +3277,12 @@ const as = ({
3277
3277
  {
3278
3278
  "aria-label": k.label,
3279
3279
  value: f == null ? "" : String(f),
3280
- onChange: (N) => P(k.name, N),
3280
+ onChange: (N) => A(k.name, N),
3281
3281
  options: (k.options || []).map((N) => ({
3282
3282
  value: String(N.value),
3283
3283
  label: N.label
3284
3284
  })),
3285
- size: u === "sm" ? "sm" : "md",
3285
+ size: m === "sm" ? "sm" : "md",
3286
3286
  className: k.disabled ? "pointer-events-none opacity-50" : void 0
3287
3287
  }
3288
3288
  );
@@ -3293,8 +3293,8 @@ const as = ({
3293
3293
  ...$,
3294
3294
  label: k.label,
3295
3295
  checked: !!f,
3296
- onChange: (N) => P(k.name, N.target.checked),
3297
- size: u
3296
+ onChange: (N) => A(k.name, N.target.checked),
3297
+ size: m
3298
3298
  }
3299
3299
  );
3300
3300
  case "radio":
@@ -3310,7 +3310,7 @@ const as = ({
3310
3310
  name: k.name,
3311
3311
  value: N.value,
3312
3312
  checked: f === N.value,
3313
- onChange: () => P(k.name, N.value),
3313
+ onChange: () => A(k.name, N.value),
3314
3314
  disabled: y || N.disabled,
3315
3315
  className: "size-checkbox shrink-0 rounded-xs border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
3316
3316
  }
@@ -3326,8 +3326,8 @@ const as = ({
3326
3326
  {
3327
3327
  ...$,
3328
3328
  value: f ? new Date(f) : null,
3329
- onChange: (N) => P(k.name, N),
3330
- size: u
3329
+ onChange: (N) => A(k.name, N),
3330
+ size: m
3331
3331
  }
3332
3332
  );
3333
3333
  case "file":
@@ -3336,8 +3336,8 @@ const as = ({
3336
3336
  {
3337
3337
  ...$,
3338
3338
  value: f,
3339
- onChange: (N) => P(k.name, N),
3340
- error: z,
3339
+ onChange: (N) => A(k.name, N),
3340
+ error: M,
3341
3341
  onListFiles: (N) => p?.http.invoke({
3342
3342
  method: "POST",
3343
3343
  action: "storage.file.list",
@@ -3368,67 +3368,67 @@ const as = ({
3368
3368
  wr,
3369
3369
  {
3370
3370
  value: f || {},
3371
- onChange: (N) => P(k.name, N),
3371
+ onChange: (N) => A(k.name, N),
3372
3372
  onListFolders: () => p?.http.invoke({
3373
3373
  method: "GET",
3374
3374
  action: "storage.mount"
3375
3375
  }),
3376
3376
  disabled: y,
3377
- size: u,
3377
+ size: m,
3378
3378
  placeholder: k.placeholder
3379
3379
  }
3380
3380
  );
3381
3381
  case "custom":
3382
3382
  return k.customComponent?.({
3383
3383
  value: f,
3384
- onChange: (N) => P(k.name, N),
3385
- error: z,
3384
+ onChange: (N) => A(k.name, N),
3385
+ error: M,
3386
3386
  disabled: y
3387
3387
  });
3388
3388
  case "array": {
3389
3389
  const N = f || [];
3390
- let K = [];
3391
- if (typeof z == "string" && z.startsWith("["))
3390
+ let J = [];
3391
+ if (typeof M == "string" && M.startsWith("["))
3392
3392
  try {
3393
- K = JSON.parse(z);
3393
+ J = JSON.parse(M);
3394
3394
  } catch {
3395
3395
  }
3396
- const ne = () => {
3397
- P(k.name, [...N, {}]);
3398
- }, ee = (I) => {
3399
- P(
3396
+ const se = () => {
3397
+ A(k.name, [...N, {}]);
3398
+ }, re = (P) => {
3399
+ A(
3400
3400
  k.name,
3401
- N.filter((R, M) => M !== I)
3401
+ N.filter((H, T) => T !== P)
3402
3402
  );
3403
- }, X = (I, R, M) => {
3404
- const C = [...N];
3405
- C[I] = {
3406
- ...C[I],
3407
- [R]: M
3408
- }, P(k.name, C);
3403
+ }, X = (P, H, T) => {
3404
+ const S = [...N];
3405
+ S[P] = {
3406
+ ...S[P],
3407
+ [H]: T
3408
+ }, A(k.name, S);
3409
3409
  };
3410
3410
  return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
3411
- N.map((I, R) => /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
3412
- /* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: k.arrayFields?.map((M) => {
3413
- const C = K?.[R]?.[M.name];
3411
+ N.map((P, H) => /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
3412
+ /* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: k.arrayFields?.map((T) => {
3413
+ const S = J?.[H]?.[T.name];
3414
3414
  return /* @__PURE__ */ c(
3415
3415
  "div",
3416
3416
  {
3417
3417
  className: "flex flex-col gap-1",
3418
3418
  children: [
3419
- R === 0 && /* @__PURE__ */ c("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
3420
- M.label,
3421
- M.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
3419
+ H === 0 && /* @__PURE__ */ c("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
3420
+ T.label,
3421
+ T.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
3422
3422
  ] }),
3423
3423
  (() => {
3424
- const A = {
3425
- value: I?.[M.name] || "",
3424
+ const L = {
3425
+ value: P?.[T.name] || "",
3426
3426
  disabled: y,
3427
- required: M.required,
3428
- placeholder: M.placeholder,
3429
- ...M.fieldProps
3427
+ required: T.required,
3428
+ placeholder: T.placeholder,
3429
+ ...T.fieldProps
3430
3430
  };
3431
- switch (M.type) {
3431
+ switch (T.type) {
3432
3432
  case "text":
3433
3433
  case "email":
3434
3434
  case "password":
@@ -3436,74 +3436,74 @@ const as = ({
3436
3436
  case "tel":
3437
3437
  case "url":
3438
3438
  return /* @__PURE__ */ e(
3439
- Ne,
3439
+ we,
3440
3440
  {
3441
- ...A,
3441
+ ...L,
3442
3442
  onChange: (O) => X(
3443
- R,
3444
- M.name,
3443
+ H,
3444
+ T.name,
3445
3445
  O.target.value
3446
3446
  ),
3447
- type: M.textType || M.type,
3448
- ...Ge(M.autocomplete),
3449
- error: C,
3450
- size: u
3447
+ type: T.textType || T.type,
3448
+ ...Ge(T.autocomplete),
3449
+ error: S,
3450
+ size: m
3451
3451
  }
3452
3452
  );
3453
3453
  case "textarea":
3454
3454
  return /* @__PURE__ */ e(
3455
3455
  Be,
3456
3456
  {
3457
- ...A,
3457
+ ...L,
3458
3458
  onChange: (O) => X(
3459
- R,
3460
- M.name,
3459
+ H,
3460
+ T.name,
3461
3461
  O.target.value
3462
3462
  ),
3463
- rows: M.rows ?? 4,
3464
- error: C,
3465
- size: u
3463
+ rows: T.rows ?? 4,
3464
+ error: S,
3465
+ size: m
3466
3466
  }
3467
3467
  );
3468
3468
  case "select":
3469
3469
  return /* @__PURE__ */ e(
3470
- Te,
3470
+ _e,
3471
3471
  {
3472
- ...A,
3472
+ ...L,
3473
3473
  onChange: (O) => X(
3474
- R,
3475
- M.name,
3474
+ H,
3475
+ T.name,
3476
3476
  O
3477
3477
  ),
3478
- options: (M.options || []).map(
3478
+ options: (T.options || []).map(
3479
3479
  (O) => ({
3480
3480
  ...O,
3481
3481
  value: String(O.value)
3482
3482
  })
3483
3483
  ),
3484
- searchable: M.searchable,
3485
- multiple: M.multiple,
3486
- allowCreate: M.allowCreate,
3487
- error: C,
3488
- size: u
3484
+ searchable: T.searchable,
3485
+ multiple: T.multiple,
3486
+ allowCreate: T.allowCreate,
3487
+ error: S,
3488
+ size: m
3489
3489
  }
3490
3490
  );
3491
3491
  case "checkbox":
3492
3492
  return /* @__PURE__ */ e(
3493
3493
  ye,
3494
3494
  {
3495
- ...A,
3496
- checked: !!I?.[M.name],
3495
+ ...L,
3496
+ checked: !!P?.[T.name],
3497
3497
  onChange: (O) => X(
3498
- R,
3499
- M.name,
3498
+ H,
3499
+ T.name,
3500
3500
  O.target.checked
3501
3501
  ),
3502
- size: u
3502
+ size: m
3503
3503
  }
3504
3504
  );
3505
3505
  case "radio":
3506
- return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: M.options?.map((O) => /* @__PURE__ */ c(
3506
+ return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: T.options?.map((O) => /* @__PURE__ */ c(
3507
3507
  "label",
3508
3508
  {
3509
3509
  className: "flex cursor-pointer items-center gap-2 text-base text-text",
@@ -3512,12 +3512,12 @@ const as = ({
3512
3512
  "input",
3513
3513
  {
3514
3514
  type: "radio",
3515
- name: `${k.name}.${R}.${M.name}`,
3515
+ name: `${k.name}.${H}.${T.name}`,
3516
3516
  value: O.value,
3517
- checked: I?.[M.name] === O.value,
3517
+ checked: P?.[T.name] === O.value,
3518
3518
  onChange: () => X(
3519
- R,
3520
- M.name,
3519
+ H,
3520
+ T.name,
3521
3521
  O.value
3522
3522
  ),
3523
3523
  disabled: y || O.disabled,
@@ -3530,30 +3530,30 @@ const as = ({
3530
3530
  O.value
3531
3531
  )) });
3532
3532
  case "date": {
3533
- const O = I?.[M.name];
3533
+ const O = P?.[T.name];
3534
3534
  return /* @__PURE__ */ e(
3535
3535
  Fe,
3536
3536
  {
3537
- ...A,
3537
+ ...L,
3538
3538
  value: O ? new Date(O) : null,
3539
- onChange: (H) => X(
3540
- R,
3541
- M.name,
3542
- H
3539
+ onChange: (V) => X(
3540
+ H,
3541
+ T.name,
3542
+ V
3543
3543
  ),
3544
- size: u
3544
+ size: m
3545
3545
  }
3546
3546
  );
3547
3547
  }
3548
3548
  case "custom":
3549
- return M.customComponent?.({
3550
- value: I?.[M.name],
3549
+ return T.customComponent?.({
3550
+ value: P?.[T.name],
3551
3551
  onChange: (O) => X(
3552
- R,
3553
- M.name,
3552
+ H,
3553
+ T.name,
3554
3554
  O
3555
3555
  ),
3556
- error: C,
3556
+ error: S,
3557
3557
  disabled: y
3558
3558
  });
3559
3559
  // Add other field types here as needed
@@ -3561,38 +3561,38 @@ const as = ({
3561
3561
  return /* @__PURE__ */ c("p", { children: [
3562
3562
  "Unsupported field type in array:",
3563
3563
  " ",
3564
- M.type
3564
+ T.type
3565
3565
  ] });
3566
3566
  }
3567
3567
  })(),
3568
- C && /* @__PURE__ */ e("p", { className: "text-xs text-danger-fg", children: C })
3568
+ S && /* @__PURE__ */ e("p", { className: "text-xs text-danger-fg", children: S })
3569
3569
  ]
3570
3570
  },
3571
- M.name
3571
+ T.name
3572
3572
  );
3573
3573
  }) }),
3574
3574
  /* @__PURE__ */ e(
3575
- te,
3575
+ ne,
3576
3576
  {
3577
3577
  type: "button",
3578
3578
  iconOnly: !0,
3579
3579
  variant: "ghost",
3580
3580
  size: "md",
3581
3581
  "aria-label": `${k.label} verwijderen`,
3582
- onClick: () => ee(R),
3582
+ onClick: () => re(H),
3583
3583
  disabled: y,
3584
- className: i("shrink-0", R === 0 && "mt-5"),
3584
+ className: i("shrink-0", H === 0 && "mt-5"),
3585
3585
  children: /* @__PURE__ */ e(_t, { className: "size-icon-md" })
3586
3586
  }
3587
3587
  )
3588
- ] }, R)),
3588
+ ] }, H)),
3589
3589
  /* @__PURE__ */ c(
3590
- te,
3590
+ ne,
3591
3591
  {
3592
3592
  type: "button",
3593
3593
  variant: "secondary",
3594
3594
  leftIcon: /* @__PURE__ */ e($t, { className: "size-icon-sm" }),
3595
- onClick: ne,
3595
+ onClick: se,
3596
3596
  disabled: y,
3597
3597
  children: [
3598
3598
  k.label,
@@ -3606,14 +3606,14 @@ const as = ({
3606
3606
  return null;
3607
3607
  }
3608
3608
  },
3609
- [x, D, _, b, u, P]
3610
- ), Y = xe(
3609
+ [x, D, E, b, m, A]
3610
+ ), K = xe(
3611
3611
  (k) => {
3612
3612
  if (k.conditional && !k.conditional(x))
3613
3613
  return null;
3614
3614
  const f = k.items.filter((y) => !(y.hidden || y.conditional && !y.conditional(x)));
3615
3615
  if (f.length === 0) return null;
3616
- const z = i(
3616
+ const M = i(
3617
3617
  k.layout === "flex" ? "flex flex-wrap gap-3.5" : "grid gap-3.5",
3618
3618
  k.layout !== "flex" && {
3619
3619
  "grid-cols-1": !k.columns || k.columns === 1,
@@ -3633,8 +3633,8 @@ const as = ({
3633
3633
  title: k.title,
3634
3634
  description: k.description,
3635
3635
  className: "not-last:border-b not-last:border-border-subtle",
3636
- children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: z, children: f.map((y) => {
3637
- const $ = D[y.name] ? _[y.name] : void 0;
3636
+ children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: M, children: f.map((y) => {
3637
+ const $ = D[y.name] ? E[y.name] : void 0;
3638
3638
  return /* @__PURE__ */ c(
3639
3639
  "div",
3640
3640
  {
@@ -3651,7 +3651,7 @@ const as = ({
3651
3651
  y.label,
3652
3652
  y.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
3653
3653
  ] }),
3654
- re(y),
3654
+ ee(y),
3655
3655
  y.help && !$ && /* @__PURE__ */ e("p", { className: "text-xs leading-4 text-text-subtle", children: y.help })
3656
3656
  ]
3657
3657
  },
@@ -3663,23 +3663,23 @@ const as = ({
3663
3663
  )
3664
3664
  );
3665
3665
  },
3666
- [x, D, _, re]
3667
- ), W = i(
3666
+ [x, D, E, ee]
3667
+ ), G = i(
3668
3668
  {
3669
- "max-w-settings": u === "sm",
3670
- "max-w-form": u === "md",
3671
- "max-w-6xl": u === "lg",
3672
- "max-w-full": u === "full"
3669
+ "max-w-settings": m === "sm",
3670
+ "max-w-form": m === "md",
3671
+ "max-w-6xl": m === "lg",
3672
+ "max-w-full": m === "full"
3673
3673
  },
3674
3674
  g
3675
- ), ie = u === "full" ? "md" : u;
3676
- return /* @__PURE__ */ c("form", { ref: w, onSubmit: q, className: W, children: [
3675
+ ), ie = m === "full" ? "md" : m;
3676
+ return /* @__PURE__ */ c("form", { ref: w, onSubmit: R, className: G, children: [
3677
3677
  !v && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
3678
- /* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(Y) }),
3679
- v && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: /* @__PURE__ */ c(ke, { children: [
3678
+ /* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(K) }),
3679
+ v && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: /* @__PURE__ */ c(Ce, { children: [
3680
3680
  /* @__PURE__ */ e("div", { className: "ml-auto" }),
3681
3681
  s && /* @__PURE__ */ e(
3682
- te,
3682
+ ne,
3683
3683
  {
3684
3684
  type: "button",
3685
3685
  variant: d.variant ?? "ghost",
@@ -3691,15 +3691,15 @@ const as = ({
3691
3691
  }
3692
3692
  ),
3693
3693
  /* @__PURE__ */ e(
3694
- te,
3694
+ ne,
3695
3695
  {
3696
3696
  type: "submit",
3697
- variant: m.variant,
3698
- size: m.size || ie,
3699
- disabled: m.disabled || b,
3697
+ variant: u.variant,
3698
+ size: u.size || ie,
3699
+ disabled: u.disabled || b,
3700
3700
  loading: b,
3701
- className: m.className,
3702
- children: m.label
3701
+ className: u.className,
3702
+ children: u.label
3703
3703
  }
3704
3704
  )
3705
3705
  ] }) })
@@ -3713,7 +3713,7 @@ function ls({
3713
3713
  cancelLabel: a = "Annuleren",
3714
3714
  tone: l = "default",
3715
3715
  loading: o = !1,
3716
- onConfirm: m,
3716
+ onConfirm: u,
3717
3717
  onCancel: d
3718
3718
  }) {
3719
3719
  return /* @__PURE__ */ e(
@@ -3724,12 +3724,12 @@ function ls({
3724
3724
  title: r,
3725
3725
  size: "sm",
3726
3726
  footer: /* @__PURE__ */ c("div", { className: "flex w-full items-center justify-end gap-2", children: [
3727
- /* @__PURE__ */ e(te, { variant: "ghost", onClick: d, disabled: o, children: a }),
3727
+ /* @__PURE__ */ e(ne, { variant: "ghost", onClick: d, disabled: o, children: a }),
3728
3728
  /* @__PURE__ */ e(
3729
- te,
3729
+ ne,
3730
3730
  {
3731
3731
  variant: l === "danger" ? "destructive" : "primary",
3732
- onClick: m,
3732
+ onClick: u,
3733
3733
  loading: o,
3734
3734
  children: s
3735
3735
  }
@@ -3771,7 +3771,7 @@ function Kr({
3771
3771
  dismissible: a = !1,
3772
3772
  onDismiss: l,
3773
3773
  className: o,
3774
- children: m,
3774
+ children: u,
3775
3775
  ...d
3776
3776
  }) {
3777
3777
  return /* @__PURE__ */ c(
@@ -3797,15 +3797,15 @@ function Kr({
3797
3797
  )
3798
3798
  }
3799
3799
  ),
3800
- s && /* @__PURE__ */ e("span", { className: i("flex-shrink-0", m && "mr-1"), children: s }),
3801
- m,
3800
+ s && /* @__PURE__ */ e("span", { className: i("flex-shrink-0", u && "mr-1"), children: s }),
3801
+ u,
3802
3802
  a && l && /* @__PURE__ */ e(
3803
3803
  "button",
3804
3804
  {
3805
3805
  onClick: l,
3806
3806
  className: "ml-1.5 flex-shrink-0 hover:opacity-70 transition-opacity",
3807
3807
  "aria-label": "Remove badge",
3808
- children: /* @__PURE__ */ e(Z, { icon: we, size: "xs", color: "current" })
3808
+ children: /* @__PURE__ */ e(Z, { icon: ke, size: "xs", color: "current" })
3809
3809
  }
3810
3810
  )
3811
3811
  ]
@@ -3893,10 +3893,10 @@ function Re({
3893
3893
  children: a,
3894
3894
  className: l,
3895
3895
  showTableSkeleton: o = !1,
3896
- tableColumns: m,
3896
+ tableColumns: u,
3897
3897
  tableRows: d
3898
3898
  }) {
3899
- const v = r ?? (o ? "table" : "text"), h = n ?? d ?? Jr[v], u = s ?? m ?? (v === "cards" ? 3 : 6), b = /* @__PURE__ */ e("div", { className: i("w-full animate-pulse", l), "aria-hidden": !0, children: a ?? /* @__PURE__ */ e(Gr, { shape: v, rows: h, columns: u }) });
3899
+ const v = r ?? (o ? "table" : "text"), h = n ?? d ?? Jr[v], m = s ?? u ?? (v === "cards" ? 3 : 6), b = /* @__PURE__ */ e("div", { className: i("w-full animate-pulse", l), "aria-hidden": !0, children: a ?? /* @__PURE__ */ e(Gr, { shape: v, rows: h, columns: m }) });
3900
3900
  return t === "inline" ? b : /* @__PURE__ */ e("main", { className: "flex-1 bg-surface p-6", children: b });
3901
3901
  }
3902
3902
  const Yr = {
@@ -3911,7 +3911,7 @@ function os({
3911
3911
  actions: a,
3912
3912
  card: l = !1,
3913
3913
  className: o,
3914
- ...m
3914
+ ...u
3915
3915
  }) {
3916
3916
  return /* @__PURE__ */ c(
3917
3917
  "div",
@@ -3921,7 +3921,7 @@ function os({
3921
3921
  l && "rounded-lg border border-border bg-surface px-11 py-9 shadow-overlay",
3922
3922
  o
3923
3923
  ),
3924
- ...m,
3924
+ ...u,
3925
3925
  children: [
3926
3926
  t != null && /* @__PURE__ */ e("span", { className: i("flex size-disc items-center justify-center rounded-full text-2xl", Yr[r]), children: t }),
3927
3927
  /* @__PURE__ */ e("div", { className: "text-lg font-semibold text-text", children: n }),
@@ -4103,7 +4103,7 @@ function ms({
4103
4103
  className: a
4104
4104
  }) {
4105
4105
  const l = t.indexOf(r), o = { role: s ? "group" : void 0, "aria-label": s, "aria-hidden": s ? void 0 : !0 };
4106
- return n === "dots" ? /* @__PURE__ */ e("div", { ...o, className: i("flex items-center gap-1.5", a), children: t.map((m, d) => /* @__PURE__ */ e(
4106
+ return n === "dots" ? /* @__PURE__ */ e("div", { ...o, className: i("flex items-center gap-1.5", a), children: t.map((u, d) => /* @__PURE__ */ e(
4107
4107
  "span",
4108
4108
  {
4109
4109
  className: i(
@@ -4113,8 +4113,8 @@ function ms({
4113
4113
  d > l && "bg-border"
4114
4114
  )
4115
4115
  },
4116
- m
4117
- )) }) : /* @__PURE__ */ e("div", { ...o, className: i("flex items-center gap-2", a), children: t.map((m, d) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4116
+ u
4117
+ )) }) : /* @__PURE__ */ e("div", { ...o, className: i("flex items-center gap-2", a), children: t.map((u, d) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4118
4118
  /* @__PURE__ */ e(
4119
4119
  "span",
4120
4120
  {
@@ -4129,7 +4129,7 @@ function ms({
4129
4129
  }
4130
4130
  ),
4131
4131
  d < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
4132
- ] }, m)) });
4132
+ ] }, u)) });
4133
4133
  }
4134
4134
  const nn = /<[a-z][\s\S]*>/i, sn = [
4135
4135
  "[&_p]:my-1.5 [&_p:first-child]:mt-0 [&_p:last-child]:mb-0 [&_p]:leading-relaxed",
@@ -4169,7 +4169,7 @@ const nn = /<[a-z][\s\S]*>/i, sn = [
4169
4169
  th: (t) => /* @__PURE__ */ e("th", { className: "border border-border px-2 py-1 text-left font-semibold", ...t }),
4170
4170
  td: (t) => /* @__PURE__ */ e("td", { className: "border border-border px-2 py-1", ...t })
4171
4171
  };
4172
- function Ee({ text: t, className: r, as: n }) {
4172
+ function ze({ text: t, className: r, as: n }) {
4173
4173
  const s = t ?? "";
4174
4174
  return (n ? n === "html" : nn.test(s)) ? /* @__PURE__ */ e(
4175
4175
  "div",
@@ -4200,9 +4200,9 @@ function dn({ block: t }) {
4200
4200
  case "heading":
4201
4201
  return t.level === 1 ? /* @__PURE__ */ e("h1", { className: "text-2xl font-semibold tracking-tight text-text", children: t.text }) : t.level === 2 ? /* @__PURE__ */ e("h2", { className: "pt-2 text-base font-semibold tracking-tight text-text", children: t.text }) : /* @__PURE__ */ e("h3", { className: "pt-1 text-sm font-semibold text-text", children: t.text });
4202
4202
  case "paragraph":
4203
- return /* @__PURE__ */ e(Ee, { as: "markdown", text: t.text, className: "text-sm text-text" });
4203
+ return /* @__PURE__ */ e(ze, { as: "markdown", text: t.text, className: "text-sm text-text" });
4204
4204
  case "quote":
4205
- return /* @__PURE__ */ e("blockquote", { className: "border-l-2 border-border pl-3.5", children: /* @__PURE__ */ e(Ee, { as: "markdown", text: t.text, className: "text-sm text-text-muted" }) });
4205
+ return /* @__PURE__ */ e("blockquote", { className: "border-l-2 border-border pl-3.5", children: /* @__PURE__ */ e(ze, { as: "markdown", text: t.text, className: "text-sm text-text-muted" }) });
4206
4206
  case "code":
4207
4207
  return /* @__PURE__ */ e("pre", { className: "overflow-x-auto rounded-lg bg-surface-sunk p-3 text-xs", children: /* @__PURE__ */ e("code", { className: "font-mono", children: t.text }) });
4208
4208
  case "divider":
@@ -4221,7 +4221,7 @@ function dn({ block: t }) {
4221
4221
  n.lead,
4222
4222
  " "
4223
4223
  ] }),
4224
- /* @__PURE__ */ e(Ee, { as: "markdown", text: n.text, className: "inline" })
4224
+ /* @__PURE__ */ e(ze, { as: "markdown", text: n.text, className: "inline" })
4225
4225
  ] }, s))
4226
4226
  }
4227
4227
  );
@@ -4271,7 +4271,7 @@ function dn({ block: t }) {
4271
4271
  case "callout":
4272
4272
  return /* @__PURE__ */ c("div", { className: i("rounded-lg border px-4 py-3", on[t.tone]), children: [
4273
4273
  t.title && /* @__PURE__ */ e("div", { className: "pb-0.5 text-sm font-semibold text-text", children: t.title }),
4274
- /* @__PURE__ */ e(Ee, { as: "markdown", text: t.text, className: "text-sm text-text" })
4274
+ /* @__PURE__ */ e(ze, { as: "markdown", text: t.text, className: "text-sm text-text" })
4275
4275
  ] });
4276
4276
  default:
4277
4277
  return null;
@@ -4325,7 +4325,7 @@ function fn(t) {
4325
4325
  return r.length >= 2 ? (r[0][0] + r[1][0]).toUpperCase() : r.length === 1 ? r[0].slice(0, 2).toUpperCase() : "?";
4326
4326
  }
4327
4327
  const hn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a, title: l }) => {
4328
- const [o, m] = ce.useState(!1), d = i(
4328
+ const [o, u] = ce.useState(!1), d = i(
4329
4329
  // Its own token and not `surface-hover`: at 0.972 the plate was within a few
4330
4330
  // percent of every surface it sits on, so the monogram floated instead of
4331
4331
  // sitting in a disc.
@@ -4343,14 +4343,14 @@ const hn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
4343
4343
  alt: t ?? "",
4344
4344
  title: l ?? t,
4345
4345
  className: i(d, "object-cover"),
4346
- onError: () => m(!0)
4346
+ onError: () => u(!0)
4347
4347
  }
4348
4348
  ) : /* @__PURE__ */ e("span", { className: d, title: l ?? t, "aria-label": t, children: fn(t) });
4349
4349
  }, Ye = "ring-surface", xn = "ring-surface-accent", xs = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
4350
4350
  if (t.length === 0) return null;
4351
4351
  const a = t.slice(0, r), l = t.length - a.length;
4352
4352
  return /* @__PURE__ */ c("span", { className: i("inline-flex items-center", s), children: [
4353
- a.map((o, m) => /* @__PURE__ */ e(
4353
+ a.map((o, u) => /* @__PURE__ */ e(
4354
4354
  hn,
4355
4355
  {
4356
4356
  name: o.name,
@@ -4358,12 +4358,12 @@ const hn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
4358
4358
  size: n,
4359
4359
  title: o.name ? o.seen === !1 ? `${o.name} — nog niet gelezen` : o.name : void 0,
4360
4360
  className: i(
4361
- m > 0 && "-ml-2",
4361
+ u > 0 && "-ml-2",
4362
4362
  o.owner ? xn : Ye,
4363
4363
  o.seen === !1 && "opacity-40"
4364
4364
  )
4365
4365
  },
4366
- o.id ?? `${o.name}-${m}`
4366
+ o.id ?? `${o.name}-${u}`
4367
4367
  )),
4368
4368
  l > 0 && /* @__PURE__ */ c(
4369
4369
  "span",
@@ -4382,7 +4382,7 @@ const hn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
4382
4382
  }
4383
4383
  )
4384
4384
  ] });
4385
- }, ze = {
4385
+ }, Me = {
4386
4386
  mail: { fg: "text-channel-mail-fg", bg: "bg-channel-mail-soft" },
4387
4387
  wa: { fg: "text-channel-whatsapp-fg", bg: "bg-channel-whatsapp-soft" },
4388
4388
  chat: { fg: "text-channel-chat-fg", bg: "bg-channel-chat-soft" },
@@ -4394,7 +4394,7 @@ const hn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
4394
4394
  lg: "size-avatar-lg rounded-md text-base"
4395
4395
  };
4396
4396
  function bs({ channel: t, children: r, size: n = "md", className: s, title: a }) {
4397
- const l = t in ze ? ze[t] : void 0;
4397
+ const l = t in Me ? Me[t] : void 0;
4398
4398
  return /* @__PURE__ */ e(
4399
4399
  "span",
4400
4400
  {
@@ -4405,7 +4405,7 @@ function bs({ channel: t, children: r, size: n = "md", className: s, title: a })
4405
4405
  // An undeclared channel used to collapse onto the neutral "note" tone,
4406
4406
  // which is also what a real internal note looks like. Deriving from the
4407
4407
  // key keeps it distinguishable and keeps `note` meaning `note`.
4408
- l ? i(l.fg, l.bg) : t ? Qe(t) : i(ze.note.fg, ze.note.bg),
4408
+ l ? i(l.fg, l.bg) : t ? Qe(t) : i(Me.note.fg, Me.note.bg),
4409
4409
  s
4410
4410
  ),
4411
4411
  children: r
@@ -4420,23 +4420,23 @@ const gs = ({
4420
4420
  radius: a = "md",
4421
4421
  showLoading: l = !0,
4422
4422
  showError: o = !0,
4423
- fallback: m,
4423
+ fallback: u,
4424
4424
  loadingContent: d,
4425
4425
  errorContent: v,
4426
4426
  className: h,
4427
- onLoad: u,
4427
+ onLoad: m,
4428
4428
  onError: b,
4429
4429
  ...g
4430
4430
  }) => {
4431
- const [w, p] = j(!0), [x, S] = j(!1), [_, B] = j(t), D = (W) => {
4432
- p(!1), S(!1), u?.(W);
4433
- }, J = (W) => {
4434
- if (p(!1), S(!0), m && _ !== m) {
4435
- B(m), S(!1), p(!0);
4431
+ const [w, p] = F(!0), [x, C] = F(!1), [E, j] = F(t), D = (G) => {
4432
+ p(!1), C(!1), m?.(G);
4433
+ }, U = (G) => {
4434
+ if (p(!1), C(!0), u && E !== u) {
4435
+ j(u), C(!1), p(!0);
4436
4436
  return;
4437
4437
  }
4438
- b?.(W);
4439
- }, V = i(
4438
+ b?.(G);
4439
+ }, q = i(
4440
4440
  "relative overflow-hidden bg-surface-hover",
4441
4441
  // Size variants
4442
4442
  {
@@ -4464,33 +4464,33 @@ const gs = ({
4464
4464
  "rounded-full": a === "full"
4465
4465
  },
4466
4466
  h
4467
- ), P = i(
4467
+ ), A = i(
4468
4468
  "w-full h-full object-cover transition-opacity duration-fast",
4469
4469
  {
4470
4470
  "opacity-0": w || x,
4471
4471
  "opacity-100": !w && !x
4472
4472
  }
4473
- ), q = i(
4473
+ ), R = i(
4474
4474
  "absolute inset-0 flex items-center justify-center",
4475
4475
  "text-text-muted"
4476
- ), re = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), Y = /* @__PURE__ */ c("div", { className: "text-center", children: [
4476
+ ), ee = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), K = /* @__PURE__ */ c("div", { className: "text-center", children: [
4477
4477
  /* @__PURE__ */ e(Z, { icon: At, size: "lg", className: "mx-auto mb-1" }),
4478
4478
  /* @__PURE__ */ e("span", { className: "text-xs", children: "Failed to load" })
4479
4479
  ] });
4480
- return /* @__PURE__ */ c("div", { className: V, children: [
4480
+ return /* @__PURE__ */ c("div", { className: q, children: [
4481
4481
  /* @__PURE__ */ e(
4482
4482
  "img",
4483
4483
  {
4484
4484
  ...g,
4485
- src: _,
4485
+ src: E,
4486
4486
  alt: r,
4487
- className: P,
4487
+ className: A,
4488
4488
  onLoad: D,
4489
- onError: J
4489
+ onError: U
4490
4490
  }
4491
4491
  ),
4492
- w && l && /* @__PURE__ */ e("div", { className: q, children: d || re }),
4493
- x && o && /* @__PURE__ */ e("div", { className: q, children: v || Y })
4492
+ w && l && /* @__PURE__ */ e("div", { className: R, children: d || ee }),
4493
+ x && o && /* @__PURE__ */ e("div", { className: R, children: v || K })
4494
4494
  ] });
4495
4495
  };
4496
4496
  function ps({
@@ -4524,47 +4524,47 @@ function vs({
4524
4524
  renderItem: a,
4525
4525
  trailing: l,
4526
4526
  onSelect: o,
4527
- onActiveIndexChange: m,
4527
+ onActiveIndexChange: u,
4528
4528
  isActive: d,
4529
4529
  unread: v,
4530
4530
  dimmed: h,
4531
- groupBy: u,
4531
+ groupBy: m,
4532
4532
  groups: b,
4533
4533
  renderGroupHeader: g,
4534
4534
  stickyGroupHeaders: w = !1,
4535
4535
  collapsibleGroups: p = !1,
4536
4536
  hideGroupCount: x = !1,
4537
- selectable: S = !1,
4538
- selectedItems: _ = [],
4539
- onSelectionChange: B,
4537
+ selectable: C = !1,
4538
+ selectedItems: E = [],
4539
+ onSelectionChange: j,
4540
4540
  bulkActions: D,
4541
- header: J,
4542
- stickyHeader: V = !1,
4543
- bordered: P = !1,
4544
- emptyContent: q,
4545
- loading: re = !1,
4546
- loadingRows: Y = 4,
4547
- className: W,
4541
+ header: U,
4542
+ stickyHeader: q = !1,
4543
+ bordered: A = !1,
4544
+ emptyContent: R,
4545
+ loading: ee = !1,
4546
+ loadingRows: K = 4,
4547
+ className: G,
4548
4548
  "aria-label": ie
4549
4549
  }) {
4550
4550
  const [k, f] = ce.useState(
4551
4551
  () => Object.fromEntries(
4552
- (b ?? []).filter((C) => C.defaultCollapsed).map((C) => [C.id, !0])
4552
+ (b ?? []).filter((S) => S.defaultCollapsed).map((S) => [S.id, !0])
4553
4553
  )
4554
- ), z = ce.useRef(null), y = (C) => {
4555
- if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(C.key)) return;
4554
+ ), M = ce.useRef(null), y = (S) => {
4555
+ if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(S.key)) return;
4556
4556
  const O = Array.from(
4557
- z.current?.querySelectorAll("li[data-list-row]") ?? []
4557
+ M.current?.querySelectorAll("li[data-list-row]") ?? []
4558
4558
  );
4559
4559
  if (O.length === 0) return;
4560
- C.preventDefault();
4561
- const H = O.indexOf(document.activeElement), T = C.key === "Home" ? 0 : C.key === "End" ? O.length - 1 : C.key === "ArrowDown" ? (H + 1) % O.length : (H - 1 + O.length) % O.length;
4562
- O[T]?.focus();
4563
- }, $ = (C, A) => r ? r(C, A) : A, N = (C) => _.includes(C), K = (C, A) => {
4564
- B && B(
4565
- A ? [..._, C] : _.filter((O) => O !== C)
4560
+ S.preventDefault();
4561
+ const V = O.indexOf(document.activeElement), _ = S.key === "Home" ? 0 : S.key === "End" ? O.length - 1 : S.key === "ArrowDown" ? (V + 1) % O.length : (V - 1 + O.length) % O.length;
4562
+ O[_]?.focus();
4563
+ }, $ = (S, L) => r ? r(S, L) : L, N = (S) => E.includes(S), J = (S, L) => {
4564
+ j && j(
4565
+ L ? [...E, S] : E.filter((O) => O !== S)
4566
4566
  );
4567
- }, ne = (C) => B?.(C ? [...t] : []), ee = i(
4567
+ }, se = (S) => j?.(S ? [...t] : []), re = i(
4568
4568
  "flex flex-col",
4569
4569
  // With a selection open the list has a dock at its foot. Sticky can only
4570
4570
  // park at the bottom of its own box, so on a list shorter than the window
@@ -4572,17 +4572,17 @@ function vs({
4572
4572
  // screen. Growing the box to the height of its parent puts it where it
4573
4573
  // belongs — and only while a selection exists, so an ordinary short list
4574
4574
  // keeps its natural height.
4575
- S && _.length > 0 && "min-h-full",
4576
- P && "overflow-hidden rounded-lg border border-border-subtle",
4577
- W
4575
+ C && E.length > 0 && "min-h-full",
4576
+ A && "overflow-hidden rounded-lg border border-border-subtle",
4577
+ G
4578
4578
  );
4579
- if (re)
4580
- return /* @__PURE__ */ e("div", { className: ee, children: Array.from({ length: Y }).map((C, A) => /* @__PURE__ */ c(
4579
+ if (ee)
4580
+ return /* @__PURE__ */ e("div", { className: re, children: Array.from({ length: K }).map((S, L) => /* @__PURE__ */ c(
4581
4581
  "div",
4582
4582
  {
4583
4583
  className: i(
4584
4584
  "flex animate-pulse items-center gap-3 px-4 py-2",
4585
- n === "divided" && A > 0 && "border-t border-border-subtle"
4585
+ n === "divided" && L > 0 && "border-t border-border-subtle"
4586
4586
  ),
4587
4587
  children: [
4588
4588
  /* @__PURE__ */ e("span", { className: "size-tile-sm shrink-0 rounded-md bg-surface-hover" }),
@@ -4591,12 +4591,12 @@ function vs({
4591
4591
  /* @__PURE__ */ e("span", { className: "h-3 w-8 shrink-0 rounded-sm bg-surface-hover" })
4592
4592
  ]
4593
4593
  },
4594
- `skeleton-${A}`
4594
+ `skeleton-${L}`
4595
4595
  )) });
4596
- if (t.length === 0 && q)
4597
- return /* @__PURE__ */ e("div", { className: ee, children: q });
4598
- const X = t.length > 0 && _.length === t.length, I = _.length > 0 && !X, R = (C, A, O) => {
4599
- const H = d?.(C, A) ?? !1, T = v?.(C, A) ?? !1, L = h?.(C, A) ?? !1, Q = S && N(C);
4596
+ if (t.length === 0 && R)
4597
+ return /* @__PURE__ */ e("div", { className: re, children: R });
4598
+ const X = t.length > 0 && E.length === t.length, P = E.length > 0 && !X, H = (S, L, O) => {
4599
+ const V = d?.(S, L) ?? !1, _ = v?.(S, L) ?? !1, I = h?.(S, L) ?? !1, Q = C && N(S);
4600
4600
  return /* @__PURE__ */ c(
4601
4601
  "li",
4602
4602
  {
@@ -4604,11 +4604,11 @@ function vs({
4604
4604
  role: "button",
4605
4605
  tabIndex: 0,
4606
4606
  "data-list-row": "",
4607
- "aria-current": H || void 0,
4608
- onClick: () => o(C, A),
4609
- onFocus: () => m?.(A),
4607
+ "aria-current": V || void 0,
4608
+ onClick: () => o(S, L),
4609
+ onFocus: () => u?.(L),
4610
4610
  onKeyDown: (le) => {
4611
- le.key !== "Enter" && le.key !== " " || (le.preventDefault(), o(C, A));
4611
+ le.key !== "Enter" && le.key !== " " || (le.preventDefault(), o(S, L));
4612
4612
  }
4613
4613
  } : {},
4614
4614
  className: i(
@@ -4620,18 +4620,18 @@ function vs({
4620
4620
  // An unread row is tinted, not bolded: at five columns a bold row
4621
4621
  // shouts across all of them, while the tint marks the row and leaves
4622
4622
  // the consumer free to weight only the sender and the subject.
4623
- H || Q ? "bg-accent-soft text-text" : T ? i("bg-surface-unread", o && "hover:bg-surface-unread-hover") : o && "hover:bg-surface-hover",
4623
+ V || Q ? "bg-accent-soft text-text" : _ ? i("bg-surface-unread", o && "hover:bg-surface-unread-hover") : o && "hover:bg-surface-hover",
4624
4624
  // Read rows stay at full opacity — fading them also fades the avatars
4625
4625
  // and team dots, which is exactly the identity you scan by. They read
4626
4626
  // as secondary through weight and text colour instead.
4627
- L && "text-text-muted"
4627
+ I && "text-text-muted"
4628
4628
  ),
4629
4629
  children: [
4630
- S && /* @__PURE__ */ e("span", { onClick: (le) => le.stopPropagation(), children: /* @__PURE__ */ e(
4630
+ C && /* @__PURE__ */ e("span", { onClick: (le) => le.stopPropagation(), children: /* @__PURE__ */ e(
4631
4631
  ye,
4632
4632
  {
4633
- checked: N(C),
4634
- onChange: (le) => K(C, le.target.checked),
4633
+ checked: N(S),
4634
+ onChange: (le) => J(S, le.target.checked),
4635
4635
  "aria-label": "Rij selecteren"
4636
4636
  }
4637
4637
  ) }),
@@ -4642,43 +4642,43 @@ function vs({
4642
4642
  className: "mt-2 size-1.5 shrink-0 self-start rounded-full bg-border-strong"
4643
4643
  }
4644
4644
  ),
4645
- s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(C, A) }),
4646
- /* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(C, A) : String(C) }),
4647
- l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(C, A) })
4645
+ s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(S, L) }),
4646
+ /* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(S, L) : String(S) }),
4647
+ l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(S, L) })
4648
4648
  ]
4649
4649
  },
4650
- $(C, A)
4650
+ $(S, L)
4651
4651
  );
4652
- }, M = (() => {
4653
- if (!u)
4654
- return t.map((H, T) => R(H, T, T === 0));
4655
- const C = /* @__PURE__ */ new Map();
4656
- t.forEach((H, T) => {
4657
- const L = u(H, T);
4658
- C.has(L) || C.set(L, []), C.get(L).push({ item: H, index: T });
4652
+ }, T = (() => {
4653
+ if (!m)
4654
+ return t.map((V, _) => H(V, _, _ === 0));
4655
+ const S = /* @__PURE__ */ new Map();
4656
+ t.forEach((V, _) => {
4657
+ const I = m(V, _);
4658
+ S.has(I) || S.set(I, []), S.get(I).push({ item: V, index: _ });
4659
4659
  });
4660
- const A = b ?? [];
4660
+ const L = b ?? [];
4661
4661
  return [
4662
- ...A.filter((H) => C.has(H.id)),
4663
- ...[...C.keys()].filter((H) => !A.some((T) => T.id === H)).map((H) => ({ id: H }))
4664
- ].flatMap((H, T) => {
4665
- const L = C.get(H.id) ?? [], Q = p && k[H.id], le = H.title ?? H.id, de = H.count ?? L.length, ge = /* @__PURE__ */ e(
4662
+ ...L.filter((V) => S.has(V.id)),
4663
+ ...[...S.keys()].filter((V) => !L.some((_) => _.id === V)).map((V) => ({ id: V }))
4664
+ ].flatMap((V, _) => {
4665
+ const I = S.get(V.id) ?? [], Q = p && k[V.id], le = V.title ?? V.id, de = V.count ?? I.length, pe = /* @__PURE__ */ e(
4666
4666
  "li",
4667
4667
  {
4668
- onClick: p ? () => f((he) => ({ ...he, [H.id]: !he[H.id] })) : void 0,
4668
+ onClick: p ? () => f((he) => ({ ...he, [V.id]: !he[V.id] })) : void 0,
4669
4669
  className: i(
4670
4670
  // A caption over its rows, not a band across the table: same
4671
4671
  // surface as the rows, no rules, and the count as a quiet pill.
4672
4672
  // The old grey uppercase strip read as a second column header.
4673
4673
  "flex items-center gap-2.5 bg-surface px-5 pb-1.5 text-base font-semibold",
4674
- T > 0 ? "pt-5" : "pt-3",
4675
- H.tone === "danger" ? "text-danger-fg" : H.tone === "muted" ? "text-text-subtle" : "text-text",
4674
+ _ > 0 ? "pt-5" : "pt-3",
4675
+ V.tone === "danger" ? "text-danger-fg" : V.tone === "muted" ? "text-text-subtle" : "text-text",
4676
4676
  w && "sticky z-10",
4677
4677
  p && "cursor-pointer select-none"
4678
4678
  ),
4679
4679
  "aria-expanded": p ? !Q : void 0,
4680
- style: w ? { top: V ? 28 : 0 } : void 0,
4681
- children: g ? g(H, L.map((he) => he.item)) : /* @__PURE__ */ c(ke, { children: [
4680
+ style: w ? { top: q ? 28 : 0 } : void 0,
4681
+ children: g ? g(V, I.map((he) => he.item)) : /* @__PURE__ */ c(Ce, { children: [
4682
4682
  p && /* @__PURE__ */ e(
4683
4683
  De,
4684
4684
  {
@@ -4695,25 +4695,25 @@ function vs({
4695
4695
  {
4696
4696
  className: i(
4697
4697
  "rounded-full px-2 text-xs font-normal tabular-nums",
4698
- H.tone === "danger" ? "bg-danger-soft text-danger-fg" : "bg-surface-sunk text-text-subtle"
4698
+ V.tone === "danger" ? "bg-danger-soft text-danger-fg" : "bg-surface-sunk text-text-subtle"
4699
4699
  ),
4700
4700
  children: de
4701
4701
  }
4702
4702
  )
4703
4703
  ] })
4704
4704
  },
4705
- `group-${H.id}`
4705
+ `group-${V.id}`
4706
4706
  );
4707
- return Q ? [ge] : [
4708
- ge,
4709
- ...L.map(
4710
- ({ item: he, index: Ie }, E) => R(he, Ie, E === 0)
4707
+ return Q ? [pe] : [
4708
+ pe,
4709
+ ...I.map(
4710
+ ({ item: he, index: Ie }, z) => H(he, Ie, z === 0)
4711
4711
  )
4712
4712
  ];
4713
4713
  });
4714
4714
  })();
4715
- return /* @__PURE__ */ c("div", { ref: z, className: ee, onKeyDown: o ? y : void 0, children: [
4716
- J && /* @__PURE__ */ c(
4715
+ return /* @__PURE__ */ c("div", { ref: M, className: re, onKeyDown: o ? y : void 0, children: [
4716
+ U && /* @__PURE__ */ c(
4717
4717
  "div",
4718
4718
  {
4719
4719
  className: i(
@@ -4721,26 +4721,26 @@ function vs({
4721
4721
  // sticky group headers park against.
4722
4722
  "flex h-row-sm items-end gap-3 border-b border-border bg-surface px-5 pb-2",
4723
4723
  "text-xs font-semibold uppercase tracking-wider text-text-disabled",
4724
- V && "sticky top-0 z-20"
4724
+ q && "sticky top-0 z-20"
4725
4725
  ),
4726
4726
  children: [
4727
- S && /* @__PURE__ */ e("span", { className: "flex items-center", children: /* @__PURE__ */ e(
4727
+ C && /* @__PURE__ */ e("span", { className: "flex items-center", children: /* @__PURE__ */ e(
4728
4728
  ye,
4729
4729
  {
4730
4730
  checked: X,
4731
- indeterminate: I,
4732
- onChange: (C) => ne(C.target.checked),
4731
+ indeterminate: P,
4732
+ onChange: (S) => se(S.target.checked),
4733
4733
  "aria-label": "Alles selecteren"
4734
4734
  }
4735
4735
  ) }),
4736
- J
4736
+ U
4737
4737
  ]
4738
4738
  }
4739
4739
  ),
4740
- /* @__PURE__ */ e("ul", { "aria-label": ie, className: "flex flex-col", children: M }),
4741
- S && _.length > 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none sticky bottom-0 z-10 flex justify-center px-5 pb-4", children: /* @__PURE__ */ c("div", { className: "pointer-events-auto flex items-center gap-1.5 rounded-lg bg-accent py-1.5 pl-3.5 pr-1.5 text-accent-fg shadow-overlay", children: [
4740
+ /* @__PURE__ */ e("ul", { "aria-label": ie, className: "flex flex-col", children: T }),
4741
+ C && E.length > 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none sticky bottom-0 z-10 flex justify-center px-5 pb-4", children: /* @__PURE__ */ c("div", { className: "pointer-events-auto flex items-center gap-1.5 rounded-lg bg-accent py-1.5 pl-3.5 pr-1.5 text-accent-fg shadow-overlay", children: [
4742
4742
  /* @__PURE__ */ c("span", { className: "text-sm font-medium", children: [
4743
- _.length,
4743
+ E.length,
4744
4744
  " geselecteerd"
4745
4745
  ] }),
4746
4746
  /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "mx-1.5 h-4 w-px bg-current opacity-25" }),
@@ -4750,10 +4750,10 @@ function vs({
4750
4750
  "button",
4751
4751
  {
4752
4752
  type: "button",
4753
- onClick: () => B?.([]),
4753
+ onClick: () => j?.([]),
4754
4754
  "aria-label": "Selectie wissen",
4755
4755
  className: "grid size-tile-md shrink-0 cursor-pointer place-items-center rounded-md transition-colors duration-fast ease-out hover:bg-white/15 focus-visible:outline-none focus-visible:focus-ring",
4756
- children: /* @__PURE__ */ e(we, { className: "size-icon-lg" })
4756
+ children: /* @__PURE__ */ e(ke, { className: "size-icon-lg" })
4757
4757
  }
4758
4758
  )
4759
4759
  ] }) })
@@ -4815,23 +4815,23 @@ const pn = ({
4815
4815
  actions: a = [],
4816
4816
  children: l,
4817
4817
  className: o,
4818
- backLabel: m = "Back",
4818
+ backLabel: u = "Back",
4819
4819
  backClassName: d,
4820
4820
  onBack: v,
4821
4821
  editable: h = !1,
4822
- onTitleChange: u
4822
+ onTitleChange: m
4823
4823
  }) => {
4824
- const [b, g] = j(!1), [w, p] = j(r), x = ae(null);
4825
- G(() => {
4824
+ const [b, g] = F(!1), [w, p] = F(r), x = te(null);
4825
+ Y(() => {
4826
4826
  p(r);
4827
- }, [r]), G(() => {
4827
+ }, [r]), Y(() => {
4828
4828
  b && x.current && (x.current.focus(), x.current.select());
4829
4829
  }, [b]);
4830
- const S = () => {
4830
+ const C = () => {
4831
4831
  h && g(!0);
4832
- }, _ = () => {
4833
- g(!1), w.trim() !== "" && w !== r && u ? u(w.trim()) : p(r);
4834
- }, B = (D) => {
4832
+ }, E = () => {
4833
+ g(!1), w.trim() !== "" && w !== r && m ? m(w.trim()) : p(r);
4834
+ }, j = (D) => {
4835
4835
  D.key === "Enter" ? x.current?.blur() : D.key === "Escape" && (p(r), g(!1));
4836
4836
  };
4837
4837
  return /* @__PURE__ */ c(
@@ -4851,7 +4851,7 @@ const pn = ({
4851
4851
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ c("div", { className: "flex items-start gap-4 text-text", children: [
4852
4852
  v && // Ghost: a framed box around a back chevron makes the way out of a
4853
4853
  // page look like the page's primary control.
4854
- /* @__PURE__ */ e(te, { variant: "ghost", onClick: v, leftIcon: /* @__PURE__ */ e(Z, { icon: Ce, size: "md" }), iconOnly: !0 }),
4854
+ /* @__PURE__ */ e(ne, { variant: "ghost", onClick: v, leftIcon: /* @__PURE__ */ e(Z, { icon: Se, size: "md" }), iconOnly: !0 }),
4855
4855
  /* @__PURE__ */ c("div", { className: "min-w-0 flex-1", children: [
4856
4856
  b ? /* @__PURE__ */ e(
4857
4857
  "input",
@@ -4860,15 +4860,15 @@ const pn = ({
4860
4860
  type: "text",
4861
4861
  value: w,
4862
4862
  onChange: (D) => p(D.target.value),
4863
- onBlur: _,
4864
- onKeyDown: B,
4863
+ onBlur: E,
4864
+ onKeyDown: j,
4865
4865
  className: "text-1xl font-semibold bg-transparent border-b-1 border-border rounded-lg outline-none focus:border-none px-1 -mx-1 min-w-0 w-full"
4866
4866
  }
4867
4867
  ) : /* @__PURE__ */ c("div", { className: "group flex items-baseline gap-2.5 min-w-0", children: [
4868
4868
  /* @__PURE__ */ e(
4869
4869
  "h2",
4870
4870
  {
4871
- onClick: S,
4871
+ onClick: C,
4872
4872
  className: i(
4873
4873
  "text-lg font-semibold tracking-title truncate",
4874
4874
  h && "cursor-pointer"
@@ -4882,7 +4882,7 @@ const pn = ({
4882
4882
  Lt,
4883
4883
  {
4884
4884
  size: 15,
4885
- onClick: S,
4885
+ onClick: C,
4886
4886
  className: "shrink-0 cursor-pointer text-text-muted opacity-0 group-hover:opacity-100 transition-opacity"
4887
4887
  }
4888
4888
  )
@@ -4916,11 +4916,11 @@ const pn = ({
4916
4916
  },
4917
4917
  D.id
4918
4918
  ) : /* @__PURE__ */ e(
4919
- te,
4919
+ ne,
4920
4920
  {
4921
4921
  variant: D.variant ?? "secondary",
4922
- onClick: (J) => {
4923
- J.stopPropagation(), J.target.blur(), D.onClick();
4922
+ onClick: (U) => {
4923
+ U.stopPropagation(), U.target.blur(), D.onClick();
4924
4924
  },
4925
4925
  disabled: D.disabled,
4926
4926
  leftIcon: D.icon,
@@ -4946,18 +4946,18 @@ const pn = ({
4946
4946
  onBack: a,
4947
4947
  editable: l,
4948
4948
  onTitleChange: o,
4949
- surface: m = !1,
4949
+ surface: u = !1,
4950
4950
  headerContent: d,
4951
4951
  loading: v = !1,
4952
4952
  loadingShape: h = "table",
4953
- empty: u,
4953
+ empty: m,
4954
4954
  padding: b = "md",
4955
4955
  scroll: g = !0,
4956
4956
  className: w,
4957
4957
  contentClassName: p,
4958
4958
  children: x
4959
4959
  }) => {
4960
- const S = v ? /* @__PURE__ */ e(Re, { variant: "inline", shape: h }) : u ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-12", children: u }) : x;
4960
+ const C = v ? /* @__PURE__ */ e(Re, { variant: "inline", shape: h }) : m ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-12", children: m }) : x;
4961
4961
  return /* @__PURE__ */ c(
4962
4962
  "div",
4963
4963
  {
@@ -4973,7 +4973,7 @@ const pn = ({
4973
4973
  /* @__PURE__ */ e(
4974
4974
  pn,
4975
4975
  {
4976
- surface: m,
4976
+ surface: u,
4977
4977
  title: t,
4978
4978
  subtitle: r,
4979
4979
  meta: n,
@@ -4993,7 +4993,7 @@ const pn = ({
4993
4993
  vn[b],
4994
4994
  p
4995
4995
  ),
4996
- children: S
4996
+ children: C
4997
4997
  }
4998
4998
  )
4999
4999
  ]
@@ -5018,7 +5018,7 @@ function yn() {
5018
5018
  return ht(ot);
5019
5019
  }
5020
5020
  function Es() {
5021
- const [t, r] = j(null), n = pe(
5021
+ const [t, r] = F(null), n = ge(
5022
5022
  () => ({
5023
5023
  setTrail: (s, a) => r((l) => a ? { ownerId: s, entry: a } : l && l.ownerId !== s ? l : null)
5024
5024
  }),
@@ -5036,26 +5036,47 @@ const Nn = {
5036
5036
  children: t,
5037
5037
  actions: r = [],
5038
5038
  secondaryActions: n = [],
5039
- onBack: s,
5040
- backLabel: a = "Back",
5041
- title: l,
5042
- loading: o = !1,
5043
- loadingShape: m = "form",
5044
- padding: d = "md",
5045
- className: v,
5046
- contentClassName: h
5039
+ actionsPlacement: s = "header",
5040
+ onBack: a,
5041
+ backLabel: l = "Back",
5042
+ title: o,
5043
+ loading: u = !1,
5044
+ loadingShape: d = "form",
5045
+ padding: v = "md",
5046
+ className: h,
5047
+ contentClassName: m
5047
5048
  }) => {
5048
- const u = yn(), b = ft(), g = ae(s);
5049
- g.current = s;
5050
- const w = !!s;
5051
- G(() => {
5052
- if (u && !(!w && !l))
5053
- return u.setTrail(b, {
5054
- title: l,
5055
- onBack: w ? () => g.current?.() : void 0
5056
- }), () => u.setTrail(b, null);
5057
- }, [u, b, l, w]);
5058
- const p = r.length > 0 || n.length > 0;
5049
+ const b = yn(), g = ft(), w = te(a);
5050
+ w.current = a;
5051
+ const p = !!a, x = te(r);
5052
+ x.current = r;
5053
+ const C = te(n);
5054
+ C.current = n;
5055
+ const E = s === "header", j = E && (r.length > 0 || n.length > 0), D = j ? JSON.stringify(
5056
+ [...n, ...r].map((A) => [A.id, A.label, A.variant, A.disabled])
5057
+ ) : "", U = ge(() => {
5058
+ if (!j) return;
5059
+ const A = (R) => (ee, K) => ({
5060
+ ...ee,
5061
+ onClick: () => {
5062
+ (R === "primary" ? x.current : C.current)[K]?.onClick();
5063
+ }
5064
+ });
5065
+ return {
5066
+ actions: x.current.map(A("primary")),
5067
+ secondaryActions: C.current.map(A("secondary"))
5068
+ };
5069
+ }, [j, D]);
5070
+ Y(() => {
5071
+ if (b && !(!p && !o && !U))
5072
+ return b.setTrail(g, {
5073
+ title: o,
5074
+ onBack: p ? () => w.current?.() : void 0,
5075
+ actions: U?.actions,
5076
+ secondaryActions: U?.secondaryActions
5077
+ }), () => b.setTrail(g, null);
5078
+ }, [b, g, o, p, U]);
5079
+ const q = !E && (r.length > 0 || n.length > 0);
5059
5080
  return (
5060
5081
  /**
5061
5082
  * `min-h-full` + a sticky footer, rather than a nested scroll container.
@@ -5063,24 +5084,28 @@ const Nn = {
5063
5084
  * panel that has not been migrated yet. This way a short page still drops
5064
5085
  * its footer to the bottom, and a long one keeps it pinned while scrolling.
5065
5086
  */
5066
- /* @__PURE__ */ c("div", { className: i("flex min-h-full flex-col", v), children: [
5067
- !u && (w || l) && /* @__PURE__ */ c("div", { className: "flex shrink-0 items-center gap-2 px-5 pt-4", children: [
5068
- w && /* @__PURE__ */ e(
5069
- te,
5087
+ /* @__PURE__ */ c("div", { className: i("flex min-h-full flex-col", h), children: [
5088
+ !b && (p || o || j) && /* @__PURE__ */ c("div", { className: "flex shrink-0 items-center gap-2 px-5 pt-4", children: [
5089
+ p && /* @__PURE__ */ e(
5090
+ ne,
5070
5091
  {
5071
5092
  variant: "ghost",
5072
- onClick: () => g.current?.(),
5073
- "aria-label": a,
5074
- leftIcon: /* @__PURE__ */ e(Z, { icon: Ce, size: "sm" }),
5093
+ onClick: () => w.current?.(),
5094
+ "aria-label": l,
5095
+ leftIcon: /* @__PURE__ */ e(Z, { icon: Se, size: "sm" }),
5075
5096
  iconOnly: !0
5076
5097
  }
5077
5098
  ),
5078
- l && /* @__PURE__ */ e("h2", { className: "min-w-0 truncate text-md font-semibold tracking-title text-text", children: l })
5099
+ o && /* @__PURE__ */ e("h2", { className: "min-w-0 truncate text-md font-semibold tracking-title text-text", children: o }),
5100
+ E && /* @__PURE__ */ c("div", { className: "ml-auto flex items-center gap-2", children: [
5101
+ n.length > 0 && /* @__PURE__ */ e(Ne, { actions: n, defaultVariant: "ghost" }),
5102
+ r.length > 0 && /* @__PURE__ */ e(Ne, { actions: r })
5103
+ ] })
5079
5104
  ] }),
5080
- /* @__PURE__ */ e("div", { className: i("flex-1", Nn[d], h), children: o ? /* @__PURE__ */ e(Re, { variant: "inline", shape: m }) : t }),
5081
- p && /* @__PURE__ */ c("div", { className: "sticky bottom-0 z-10 flex shrink-0 items-center gap-2 border-t border-border bg-surface px-5 py-3", children: [
5082
- n.length > 0 && /* @__PURE__ */ e(_e, { actions: n, defaultVariant: "ghost" }),
5083
- r.length > 0 && /* @__PURE__ */ e(_e, { actions: r, className: "ml-auto" })
5105
+ /* @__PURE__ */ e("div", { className: i("flex-1", Nn[v], m), children: u ? /* @__PURE__ */ e(Re, { variant: "inline", shape: d }) : t }),
5106
+ q && /* @__PURE__ */ c("div", { className: "sticky bottom-0 z-10 flex shrink-0 items-center gap-2 border-t border-border bg-surface px-5 py-3", children: [
5107
+ n.length > 0 && /* @__PURE__ */ e(Ne, { actions: n, defaultVariant: "ghost" }),
5108
+ r.length > 0 && /* @__PURE__ */ e(Ne, { actions: r, className: "ml-auto" })
5084
5109
  ] })
5085
5110
  ] })
5086
5111
  );
@@ -5151,16 +5176,16 @@ function _s({ label: t, dotColor: r, onClick: n, className: s }) {
5151
5176
  );
5152
5177
  }
5153
5178
  function wn(t) {
5154
- const { id: r, header: n, accessor: s, label: a, tone: l, visible: o, width: m, sortable: d, align: v } = t;
5179
+ const { id: r, header: n, accessor: s, label: a, tone: l, visible: o, width: u, sortable: d, align: v } = t;
5155
5180
  return {
5156
5181
  id: r,
5157
5182
  header: n,
5158
5183
  accessor: (h) => a(s(h), h),
5159
- cell: (h, u) => {
5160
- const b = s(u);
5161
- return o && !o(b, u) ? null : /* @__PURE__ */ e(Kr, { variant: l ? l(b, u) : "default", size: "sm", children: a(b, u) });
5184
+ cell: (h, m) => {
5185
+ const b = s(m);
5186
+ return o && !o(b, m) ? null : /* @__PURE__ */ e(Kr, { variant: l ? l(b, m) : "default", size: "sm", children: a(b, m) });
5162
5187
  },
5163
- width: m,
5188
+ width: u,
5164
5189
  sortable: d,
5165
5190
  align: v
5166
5191
  };
@@ -5173,7 +5198,7 @@ function $s(t) {
5173
5198
  onLabel: a,
5174
5199
  offLabel: l,
5175
5200
  onTone: o = "success",
5176
- offTone: m = "secondary",
5201
+ offTone: u = "secondary",
5177
5202
  width: d,
5178
5203
  sortable: v
5179
5204
  } = t;
@@ -5182,7 +5207,7 @@ function $s(t) {
5182
5207
  header: n,
5183
5208
  accessor: (h) => !!s(h),
5184
5209
  label: (h) => h ? a : l,
5185
- tone: (h) => h ? o : m,
5210
+ tone: (h) => h ? o : u,
5186
5211
  width: d,
5187
5212
  sortable: v
5188
5213
  });
@@ -5195,7 +5220,7 @@ function Ds(t) {
5195
5220
  label: a,
5196
5221
  empty: l = "—",
5197
5222
  separator: o = ", ",
5198
- width: m,
5223
+ width: u,
5199
5224
  searchable: d,
5200
5225
  sortable: v
5201
5226
  } = t;
@@ -5203,10 +5228,10 @@ function Ds(t) {
5203
5228
  id: r,
5204
5229
  header: n,
5205
5230
  accessor: (h) => {
5206
- const u = s(h), g = (u == null ? [] : Array.isArray(u) ? u : [u]).filter(Boolean).map((w) => a(w) ?? w);
5231
+ const m = s(h), g = (m == null ? [] : Array.isArray(m) ? m : [m]).filter(Boolean).map((w) => a(w) ?? w);
5207
5232
  return g.length ? g.join(o) : l;
5208
5233
  },
5209
- width: m,
5234
+ width: u,
5210
5235
  searchable: d,
5211
5236
  sortable: v
5212
5237
  };
@@ -5234,15 +5259,15 @@ const As = ({
5234
5259
  } catch {
5235
5260
  return String(h);
5236
5261
  }
5237
- }, l = (h) => h ? "Ja" : "Nee", o = (h, u) => {
5238
- if (!u) return String(h || "-");
5239
- const b = u.find((g) => g.value === h);
5262
+ }, l = (h) => h ? "Ja" : "Nee", o = (h, m) => {
5263
+ if (!m) return String(h || "-");
5264
+ const b = m.find((g) => g.value === h);
5240
5265
  return b ? b.label : String(h || "-");
5241
- }, m = xe(
5266
+ }, u = xe(
5242
5267
  (h) => {
5243
- const u = kn(r, h.name);
5268
+ const m = kn(r, h.name);
5244
5269
  if (h.type === "array") {
5245
- const g = u;
5270
+ const g = m;
5246
5271
  return !g || g.length === 0 ? /* @__PURE__ */ e(
5247
5272
  me,
5248
5273
  {
@@ -5271,8 +5296,8 @@ const As = ({
5271
5296
  }
5272
5297
  ) }),
5273
5298
  /* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: h.arrayFields?.map((x) => {
5274
- const S = w?.[x.name];
5275
- let _ = "-";
5299
+ const C = w?.[x.name];
5300
+ let E = "-";
5276
5301
  switch (x.type) {
5277
5302
  case "text":
5278
5303
  case "email":
@@ -5280,30 +5305,30 @@ const As = ({
5280
5305
  case "tel":
5281
5306
  case "url":
5282
5307
  case "textarea":
5283
- _ = S || "-";
5308
+ E = C || "-";
5284
5309
  break;
5285
5310
  case "select":
5286
5311
  case "radio":
5287
- _ = o(
5288
- S,
5312
+ E = o(
5313
+ C,
5289
5314
  x.options
5290
5315
  );
5291
5316
  break;
5292
5317
  case "checkbox":
5293
- _ = l(S);
5318
+ E = l(C);
5294
5319
  break;
5295
5320
  case "date":
5296
- _ = a(S);
5321
+ E = a(C);
5297
5322
  break;
5298
5323
  case "custom":
5299
- _ = x.customComponent?.({
5300
- value: S
5324
+ E = x.customComponent?.({
5325
+ value: C
5301
5326
  });
5302
5327
  break;
5303
5328
  default:
5304
- _ = String(S || "-");
5329
+ E = String(C || "-");
5305
5330
  }
5306
- return x.format && (_ = x.format(S, w)), /* @__PURE__ */ c("div", { className: "space-y-1", children: [
5331
+ return x.format && (E = x.format(C, w)), /* @__PURE__ */ c("div", { className: "space-y-1", children: [
5307
5332
  /* @__PURE__ */ e(
5308
5333
  me,
5309
5334
  {
@@ -5319,7 +5344,7 @@ const As = ({
5319
5344
  variant: "body",
5320
5345
  size: "sm",
5321
5346
  className: "text-text",
5322
- children: _
5347
+ children: E
5323
5348
  }
5324
5349
  )
5325
5350
  ] }, x.name);
@@ -5330,9 +5355,9 @@ const As = ({
5330
5355
  )) });
5331
5356
  }
5332
5357
  if (h.type === "custom" && h.customComponent)
5333
- return h.customComponent({ value: u });
5358
+ return h.customComponent({ value: m });
5334
5359
  if (h.format) {
5335
- const g = h.format(u, r);
5360
+ const g = h.format(m, r);
5336
5361
  return /* @__PURE__ */ e(
5337
5362
  me,
5338
5363
  {
@@ -5351,23 +5376,23 @@ const As = ({
5351
5376
  case "number":
5352
5377
  case "tel":
5353
5378
  case "url":
5354
- b = u ? String(u) : "-";
5379
+ b = m ? String(m) : "-";
5355
5380
  break;
5356
5381
  case "textarea":
5357
- b = u ? /* @__PURE__ */ e("div", { className: "whitespace-pre-wrap", children: String(u || "-") }) : "-";
5382
+ b = m ? /* @__PURE__ */ e("div", { className: "whitespace-pre-wrap", children: String(m || "-") }) : "-";
5358
5383
  break;
5359
5384
  case "select":
5360
5385
  case "radio":
5361
- b = o(u, h.options);
5386
+ b = o(m, h.options);
5362
5387
  break;
5363
5388
  case "checkbox":
5364
- b = l(u);
5389
+ b = l(m);
5365
5390
  break;
5366
5391
  case "date":
5367
- b = a(u);
5392
+ b = a(m);
5368
5393
  break;
5369
5394
  default:
5370
- b = u ? String(u) : "-";
5395
+ b = m ? String(m) : "-";
5371
5396
  }
5372
5397
  return /* @__PURE__ */ e(
5373
5398
  me,
@@ -5384,8 +5409,8 @@ const As = ({
5384
5409
  (h) => {
5385
5410
  if (h.conditional && !h.conditional(r))
5386
5411
  return null;
5387
- const u = h.items.filter((g) => !(g.hidden || g.conditional && !g.conditional(r)));
5388
- if (u.length === 0) return null;
5412
+ const m = h.items.filter((g) => !(g.hidden || g.conditional && !g.conditional(r)));
5413
+ if (m.length === 0) return null;
5389
5414
  const b = i(
5390
5415
  "space-y-4",
5391
5416
  {
@@ -5426,7 +5451,7 @@ const As = ({
5426
5451
  }
5427
5452
  )
5428
5453
  ] }),
5429
- /* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: b, children: u.map((g) => /* @__PURE__ */ c(
5454
+ /* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: b, children: m.map((g) => /* @__PURE__ */ c(
5430
5455
  "div",
5431
5456
  {
5432
5457
  className: "space-y-1",
@@ -5444,7 +5469,7 @@ const As = ({
5444
5469
  children: g.label
5445
5470
  }
5446
5471
  ),
5447
- m(g)
5472
+ u(g)
5448
5473
  ]
5449
5474
  },
5450
5475
  g.name
@@ -5454,7 +5479,7 @@ const As = ({
5454
5479
  h.id
5455
5480
  );
5456
5481
  },
5457
- [r, m]
5482
+ [r, u]
5458
5483
  ), v = i(
5459
5484
  "space-y-6",
5460
5485
  {
@@ -5493,7 +5518,7 @@ const As = ({
5493
5518
  v
5494
5519
  )) })
5495
5520
  ] });
5496
- const o = t.action, m = o?.visibility !== "always";
5521
+ const o = t.action, u = o?.visibility !== "always";
5497
5522
  return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ c(
5498
5523
  "div",
5499
5524
  {
@@ -5530,11 +5555,21 @@ const As = ({
5530
5555
  className: i(
5531
5556
  "shrink-0 text-xs tabular-nums",
5532
5557
  l ? "rounded-full bg-accent px-1.5 font-semibold text-accent-fg" : "text-text-subtle",
5533
- o && m && "group-hover/item:hidden group-focus-within/item:hidden"
5558
+ o && u && "group-hover/item:hidden group-focus-within/item:hidden"
5534
5559
  ),
5535
5560
  children: t.count
5536
5561
  }
5537
5562
  ),
5563
+ t.count === void 0 && t.meta !== void 0 && /* @__PURE__ */ e(
5564
+ "span",
5565
+ {
5566
+ className: i(
5567
+ "shrink-0 text-xs text-text-subtle",
5568
+ o && u && "group-hover/item:hidden group-focus-within/item:hidden"
5569
+ ),
5570
+ children: t.meta
5571
+ }
5572
+ ),
5538
5573
  o && /* @__PURE__ */ e(
5539
5574
  "button",
5540
5575
  {
@@ -5550,7 +5585,7 @@ const As = ({
5550
5585
  "text-text-subtle transition-colors duration-fast ease-out",
5551
5586
  "hover:bg-page-hover hover:text-text",
5552
5587
  "focus-visible:outline-none focus-visible:focus-ring",
5553
- m && "opacity-0 group-hover/item:opacity-100 focus-visible:opacity-100"
5588
+ u && "opacity-0 group-hover/item:opacity-100 focus-visible:opacity-100"
5554
5589
  ),
5555
5590
  children: o.icon
5556
5591
  }
@@ -5617,7 +5652,7 @@ const As = ({
5617
5652
  align: a = "left",
5618
5653
  truncate: l = !1,
5619
5654
  className: o,
5620
- children: m,
5655
+ children: u,
5621
5656
  ...d
5622
5657
  }) => {
5623
5658
  const v = `h${t}`, h = i(
@@ -5629,7 +5664,7 @@ const As = ({
5629
5664
  l && "truncate",
5630
5665
  o
5631
5666
  );
5632
- return /* @__PURE__ */ e(v, { className: h, ...d, children: m });
5667
+ return /* @__PURE__ */ e(v, { className: h, ...d, children: u });
5633
5668
  };
5634
5669
  function Tn(t) {
5635
5670
  return {
@@ -5649,37 +5684,37 @@ const Ps = ({
5649
5684
  initialCommandPath: a,
5650
5685
  initialActiveIndex: l
5651
5686
  }) => {
5652
- const [o, m] = j(""), [d, v] = j(a || []), [h, u] = j(l || 0), b = ae(null), g = ae(null), p = (d.length ? t.find((x) => x.id === d[0])?.subCommands || [] : t).filter(
5687
+ const [o, u] = F(""), [d, v] = F(a || []), [h, m] = F(l || 0), b = te(null), g = te(null), p = (d.length ? t.find((x) => x.id === d[0])?.subCommands || [] : t).filter(
5653
5688
  (x) => x.label.toLowerCase().includes(o.toLowerCase())
5654
5689
  );
5655
- return G(() => {
5656
- r || (m(""), v(a || []), u(l || 0));
5657
- }, [r]), G(() => {
5658
- const x = (S) => {
5690
+ return Y(() => {
5691
+ r || (u(""), v(a || []), m(l || 0));
5692
+ }, [r]), Y(() => {
5693
+ const x = (C) => {
5659
5694
  if (r) {
5660
- if (S.key === "Escape")
5695
+ if (C.key === "Escape")
5661
5696
  n();
5662
- else if (S.key === "ArrowUp")
5663
- u(
5664
- (_) => _ > 0 ? _ - 1 : p.length - 1
5697
+ else if (C.key === "ArrowUp")
5698
+ m(
5699
+ (E) => E > 0 ? E - 1 : p.length - 1
5665
5700
  );
5666
- else if (S.key === "ArrowDown")
5667
- u(
5668
- (_) => _ < p.length - 1 ? _ + 1 : 0
5701
+ else if (C.key === "ArrowDown")
5702
+ m(
5703
+ (E) => E < p.length - 1 ? E + 1 : 0
5669
5704
  );
5670
- else if (S.key === "Enter") {
5671
- const _ = p[h];
5672
- _ && (_.subCommands ? (v([...d, _.id]), u(0)) : _.action && (_.action(), n()));
5705
+ else if (C.key === "Enter") {
5706
+ const E = p[h];
5707
+ E && (E.subCommands ? (v([...d, E.id]), m(0)) : E.action && (E.action(), n()));
5673
5708
  }
5674
5709
  }
5675
5710
  };
5676
5711
  return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
5677
- }, [r, n, p, h, d]), G(() => {
5678
- const x = (S) => {
5679
- b.current && !b.current.contains(S.target) && n();
5712
+ }, [r, n, p, h, d]), Y(() => {
5713
+ const x = (C) => {
5714
+ b.current && !b.current.contains(C.target) && n();
5680
5715
  };
5681
5716
  return r && document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
5682
- }, [r, n]), G(() => {
5717
+ }, [r, n]), Y(() => {
5683
5718
  if (!r) return;
5684
5719
  g.current?.querySelector(`[data-index="${h}"]`)?.scrollIntoView({ block: "nearest" });
5685
5720
  }, [h, r]), r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim", children: /* @__PURE__ */ c(
@@ -5697,7 +5732,7 @@ const Ps = ({
5697
5732
  autoFocus: !0,
5698
5733
  placeholder: s?.searchPlaceholder || "Search commands...",
5699
5734
  value: o,
5700
- onChange: (x) => m(x.target.value),
5735
+ onChange: (x) => u(x.target.value),
5701
5736
  className: "w-full border-0 bg-transparent py-2 text-text focus:outline-none"
5702
5737
  }
5703
5738
  )
@@ -5709,15 +5744,15 @@ const Ps = ({
5709
5744
  className: "mt-2 pt-2 text-sm border-t border-border max-h-dialog-list overflow-y-auto",
5710
5745
  children: [
5711
5746
  p.length === 0 && /* @__PURE__ */ e("div", { className: "text-text-muted text-center text-sm", children: s?.noCommandsFound || "No commands found" }),
5712
- p.map((x, S) => /* @__PURE__ */ c(
5747
+ p.map((x, C) => /* @__PURE__ */ c(
5713
5748
  "div",
5714
5749
  {
5715
- "data-index": S,
5716
- className: `flex items-center p-2 cursor-pointer rounded-md ${S === h ? "bg-accent-soft text-accent" : "text-text"}`,
5750
+ "data-index": C,
5751
+ className: `flex items-center p-2 cursor-pointer rounded-md ${C === h ? "bg-accent-soft text-accent" : "text-text"}`,
5717
5752
  onClick: () => {
5718
- x.subCommands ? (v([...d, x.id]), u(0)) : x.action && (x.action(), n());
5753
+ x.subCommands ? (v([...d, x.id]), m(0)) : x.action && (x.action(), n());
5719
5754
  },
5720
- onMouseEnter: () => u(S),
5755
+ onMouseEnter: () => m(C),
5721
5756
  children: [
5722
5757
  x.icon && /* @__PURE__ */ e("span", { className: "mr-3", children: x.icon }),
5723
5758
  /* @__PURE__ */ e("span", { className: "flex-grow", children: x.label }),
@@ -5816,7 +5851,7 @@ const Ps = ({
5816
5851
  shadow: a,
5817
5852
  border: l,
5818
5853
  borderColor: o,
5819
- className: m,
5854
+ className: u,
5820
5855
  children: d,
5821
5856
  ...v
5822
5857
  }, h) => /* @__PURE__ */ e(
@@ -5831,7 +5866,7 @@ const Ps = ({
5831
5866
  a && Ln[a],
5832
5867
  l && In[l],
5833
5868
  o && Pn[o],
5834
- m
5869
+ u
5835
5870
  ),
5836
5871
  ...v,
5837
5872
  children: d
@@ -5863,41 +5898,41 @@ function js({
5863
5898
  componentProps: l,
5864
5899
  className: o
5865
5900
  }) {
5866
- const m = ae(null), [d, v] = j(null), [, h] = j(0), u = ae(null), b = ae(r);
5867
- b.current = r, G(() => {
5901
+ const u = te(null), [d, v] = F(null), [, h] = F(0), m = te(null), b = te(r);
5902
+ b.current = r, Y(() => {
5868
5903
  if (je.has(t)) return;
5869
- let S = !0;
5904
+ let C = !0;
5870
5905
  return (async () => {
5871
5906
  try {
5872
- const B = await b.current();
5873
- if (!S) return;
5874
- je.set(t, B), h((D) => D + 1);
5875
- } catch (B) {
5876
- console.error(`[FederatedResource] Load failed: ${t}`, B), S && v(t);
5907
+ const j = await b.current();
5908
+ if (!C) return;
5909
+ je.set(t, j), h((D) => D + 1);
5910
+ } catch (j) {
5911
+ console.error(`[FederatedResource] Load failed: ${t}`, j), C && v(t);
5877
5912
  }
5878
5913
  })(), () => {
5879
- S = !1;
5914
+ C = !1;
5880
5915
  };
5881
5916
  }, [t]);
5882
5917
  const g = je.get(t) ?? null, w = !g && d === t, p = !g && !w, x = g ? n === "react" && (g.component || g.default) || g : null;
5883
- return G(() => {
5918
+ return Y(() => {
5884
5919
  if (!x || n === "react") return;
5885
- const S = m.current;
5886
- if (S) {
5920
+ const C = u.current;
5921
+ if (C) {
5887
5922
  if (n === "svelte") {
5888
- const _ = x.default || x, B = new _({ target: S, props: l || {} });
5889
- return u.current = B, () => B.$destroy();
5923
+ const E = x.default || x, j = new E({ target: C, props: l || {} });
5924
+ return m.current = j, () => j.$destroy();
5890
5925
  }
5891
5926
  if (x.mount) {
5892
- const _ = x.mount({ container: S, props: l || {} });
5927
+ const E = x.mount({ container: C, props: l || {} });
5893
5928
  return () => {
5894
- typeof _ == "function" ? _() : x.unmount?.(S);
5929
+ typeof E == "function" ? E() : x.unmount?.(C);
5895
5930
  };
5896
5931
  }
5897
5932
  }
5898
- }, [x, n]), G(() => {
5899
- n === "svelte" && u.current && u.current.$set?.(l);
5900
- }, [l, n]), /* @__PURE__ */ c("div", { ref: m, className: o, style: { display: "contents" }, children: [
5933
+ }, [x, n]), Y(() => {
5934
+ n === "svelte" && m.current && m.current.$set?.(l);
5935
+ }, [l, n]), /* @__PURE__ */ c("div", { ref: u, className: o, style: { display: "contents" }, children: [
5901
5936
  p && s,
5902
5937
  w && a,
5903
5938
  n === "react" && x && /* @__PURE__ */ e(x, { ...l })
@@ -5938,7 +5973,7 @@ export {
5938
5973
  xs as AvatarStack,
5939
5974
  Kr as Badge,
5940
5975
  it as Box,
5941
- te as Button,
5976
+ ne as Button,
5942
5977
  Xn as ButtonGroup,
5943
5978
  Os as Card,
5944
5979
  bs as ChannelBadge,
@@ -5971,17 +6006,17 @@ export {
5971
6006
  ws as Page,
5972
6007
  pn as PageHeader,
5973
6008
  ts as PageToolbar,
5974
- _e as PageToolbarActions,
6009
+ Ne as PageToolbarActions,
5975
6010
  Jn as ParticipantTile,
5976
6011
  et as Popover,
5977
6012
  is as ProgressBar,
5978
- Ee as RichText,
6013
+ ze as RichText,
5979
6014
  at as SearchField,
5980
6015
  Er as SearchableTextField,
5981
6016
  ks as SectionCaption,
5982
6017
  Cs as SectionDivider,
5983
6018
  nr as SegmentedToggle,
5984
- Te as Select,
6019
+ _e as Select,
5985
6020
  Ss as SettingsFrameProvider,
5986
6021
  zs as SettingsPage,
5987
6022
  Ms as SettingsRow,
@@ -5999,7 +6034,7 @@ export {
5999
6034
  Pr as Tabs,
6000
6035
  me as Text,
6001
6036
  Be as TextArea,
6002
- Ne as TextField,
6037
+ we as TextField,
6003
6038
  Yn as VideoSurface,
6004
6039
  As as View,
6005
6040
  Ge as autofillProps,
@@ -6017,7 +6052,7 @@ export {
6017
6052
  qt as normalizeText,
6018
6053
  Zn as resolveLucideIcon,
6019
6054
  ns as selectFilterHandler,
6020
- Me as text,
6055
+ Te as text,
6021
6056
  Le as useAnchoredPosition,
6022
6057
  yn as useSettingsFrame,
6023
6058
  Es as useSettingsFrameHost