unifyedx-storybook-new 0.2.27 → 0.2.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { jsxs as n, jsx as e, Fragment as te } from "react/jsx-runtime";
2
- import re, { useState as L, useMemo as ue, useId as Qe, Fragment as Q, useEffect as Z, useCallback as ae, useRef as xe } from "react";
2
+ import se, { useState as M, useMemo as ue, useId as Qe, Fragment as Q, useEffect as Z, useCallback as ae, useRef as xe } from "react";
3
3
  import { a as H, U as mt, X as ge, P as c, L as Ua, C as ve, b as tt, f as Ze, d as yt, D as Yt, F as qa, e as Ga, h as Ya, T as Ke, u as Wa, i as zt, I as Wt, j as Jt, k as Ja, l as Xa, m as Ha, n as Xt, S as vt, o as Ht, M as Qa, p as Za, q as wt, r as Ka, A as er, E as Qt, s as tr, t as ar, v as rr, w as nr, x as Zt, y as sr, z as Kt, B as ea, G as lr, H as ir, J as or, K as et, N as ut, O as ht, Q as cr, R as dr, V as ta, W as mr, Y as Nt, Z as ur, _ as hr, $ as Me, a0 as pr, a1 as gr, a2 as br, a3 as fr, a4 as xr, a5 as yr, a6 as St, a7 as vr, a8 as wr, a9 as Nr, aa as kr, ab as Cr, ac as zr, ad as Sr, ae as Dr, af as $r, ag as Fe, ah as aa, ai as Tr, aj as Ar, ak as Fr, al as Er, am as Rr, an as ra, ao as Ir, ap as Or, aq as na, ar as Pr, as as pt, at as sa, au as Lr } from "./vendor-wRQnjUYv.js";
4
- import { Popover as Mr, PopoverButton as Br, PopoverPanel as jr, Transition as he, Dialog as ye, TransitionChild as Ne, DialogPanel as Ee, DialogTitle as at, TabGroup as Vr, TabList as _r, Tab as se, TabPanels as Ur, RadioGroup as qe, Listbox as K, ListboxButton as qr, ListboxOptions as Gr, ListboxOption as Yr, SwitchGroup as Wr, Switch as ot, Menu as Jr, MenuButton as Xr, Portal as Hr, MenuItems as Qr, MenuItem as Zr, DialogBackdrop as Kr } from "@headlessui/react";
4
+ import { Popover as Mr, PopoverButton as Br, PopoverPanel as jr, Transition as he, Dialog as ye, TransitionChild as Ne, DialogPanel as Ee, DialogTitle as at, TabGroup as Vr, TabList as _r, Tab as ne, TabPanels as Ur, RadioGroup as qe, Listbox as K, ListboxButton as qr, ListboxOptions as Gr, ListboxOption as Yr, SwitchGroup as Wr, Switch as ot, Menu as Jr, MenuButton as Xr, Portal as Hr, MenuItems as Qr, MenuItem as Zr, DialogBackdrop as Kr } from "@headlessui/react";
5
5
  import { motion as le, AnimatePresence as Ce } from "framer-motion";
6
6
  import { d as en } from "./vendor-lodash-C6Pmit-j.js";
7
7
  import { useFloating as la, offset as ia, flip as oa, shift as ca, autoUpdate as da, useClick as tn, useDismiss as an, useInteractions as rn, FloatingPortal as nn } from "@floating-ui/react";
@@ -29,14 +29,14 @@ const kn = (t) => {
29
29
  className: m,
30
30
  ...o
31
31
  }) => {
32
- const [u, p] = L(!1), b = ue(() => Cn(a), []), f = t && !u, r = !f && a, w = !f && !a, d = H(
32
+ const [u, p] = M(!1), b = ue(() => Cn(a), []), f = t && !u, r = !f && a, y = !f && !a, d = H(
33
33
  "avatar-container",
34
34
  `avatar--size-${s}`,
35
35
  m
36
- ), h = f ? "transparent" : i || b.bg, z = l || b.text;
36
+ ), h = f ? "transparent" : i || b.bg, $ = l || b.text;
37
37
  return /* @__PURE__ */ n("div", { className: d, style: {
38
38
  backgroundColor: h,
39
- color: z
39
+ color: $
40
40
  }, ...o, children: [
41
41
  f && /* @__PURE__ */ e(
42
42
  "img",
@@ -48,10 +48,10 @@ const kn = (t) => {
48
48
  }
49
49
  ),
50
50
  r && /* @__PURE__ */ e("span", { className: "avatar-initials", "aria-label": a, children: zn(a) }),
51
- w && /* @__PURE__ */ e("span", { className: "avatar-icon", children: /* @__PURE__ */ e(mt, {}) })
51
+ y && /* @__PURE__ */ e("span", { className: "avatar-icon", children: /* @__PURE__ */ e(mt, {}) })
52
52
  ] });
53
53
  }, Sn = ({ children: t, max: a = 4, truncatedMessage: s = "Members", ...i }) => {
54
- const l = re.Children.toArray(t), m = l.slice(0, a), o = l.length - a;
54
+ const l = se.Children.toArray(t), m = l.slice(0, a), o = l.length - a;
55
55
  return /* @__PURE__ */ n("div", { className: "avatar-group-container", ...i, children: [
56
56
  m,
57
57
  o > 0 && /* @__PURE__ */ n("div", { className: "avatar-container avatar--size-medium avatar-excess", children: [
@@ -153,16 +153,16 @@ const $n = {
153
153
  label: f,
154
154
  children: r,
155
155
  // ✅ Add children to the props list
156
- onClick: w,
156
+ onClick: y,
157
157
  ...d
158
158
  }) => {
159
- const h = p || m, z = u && !f, $ = H(
159
+ const h = p || m, $ = u && !f, T = H(
160
160
  "btn-base",
161
161
  $n[b],
162
162
  Tn[o],
163
163
  {
164
164
  "is-loading": m,
165
- "btn-icon-only": z
165
+ "btn-icon-only": $
166
166
  },
167
167
  l
168
168
  );
@@ -171,11 +171,11 @@ const $n = {
171
171
  {
172
172
  "data-testid": t,
173
173
  type: s,
174
- className: $,
174
+ className: T,
175
175
  disabled: h,
176
- onClick: w,
177
- title: a || z && i || (typeof f == "string" ? f : void 0),
178
- "aria-label": i || z && a || (typeof f == "string" ? f : void 0),
176
+ onClick: y,
177
+ title: a || $ && i || (typeof f == "string" ? f : void 0),
178
+ "aria-label": i || $ && a || (typeof f == "string" ? f : void 0),
179
179
  ...d,
180
180
  children: m ? /* @__PURE__ */ e(Ua, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(te, { children: [
181
181
  u && /* @__PURE__ */ e(u, { size: b === "large" ? 20 : 16 }),
@@ -321,7 +321,7 @@ const $n = {
321
321
  }) => {
322
322
  const b = t?.from, f = t?.to, r = (d) => {
323
323
  d.stopPropagation(), d.preventDefault(), s?.();
324
- }, w = b && f ? /* @__PURE__ */ n(te, { children: [
324
+ }, y = b && f ? /* @__PURE__ */ n(te, { children: [
325
325
  Ze(b, "MMM d, y"),
326
326
  " - ",
327
327
  Ze(f, "MMM d, y")
@@ -340,10 +340,10 @@ const $n = {
340
340
  "datepicker-trigger--disabled": o
341
341
  }),
342
342
  disabled: o,
343
- "aria-label": b && f ? `Selected range is ${w}` : i,
343
+ "aria-label": b && f ? `Selected range is ${y}` : i,
344
344
  children: [
345
345
  /* @__PURE__ */ e(yt, { className: "datepicker-icon" }),
346
- /* @__PURE__ */ e("span", { className: "datepicker-value", children: w })
346
+ /* @__PURE__ */ e("span", { className: "datepicker-value", children: y })
347
347
  ]
348
348
  }
349
349
  ),
@@ -630,12 +630,12 @@ const $n = {
630
630
  handleRemoveRejectedFile: b,
631
631
  handleSubmit: f,
632
632
  isSubmitting: r,
633
- formErrors: w,
633
+ formErrors: y,
634
634
  // --- UI Text ---
635
635
  title: d = "Upload Files",
636
636
  subHeading: h = "Supports PNG, JPG, PDF. Max size: 50MB."
637
637
  }) => {
638
- const z = o.length > 0 || u.length > 0;
638
+ const $ = o.length > 0 || u.length > 0;
639
639
  return /* @__PURE__ */ e(he, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(
640
640
  ye,
641
641
  {
@@ -671,7 +671,7 @@ const $n = {
671
671
  Ee,
672
672
  {
673
673
  className: "dialog-panel",
674
- onClick: ($) => $.stopPropagation(),
674
+ onClick: (T) => T.stopPropagation(),
675
675
  children: [
676
676
  /* @__PURE__ */ e("input", { ...i() }),
677
677
  /* @__PURE__ */ n("form", { onSubmit: f, className: "form-wrapper", children: [
@@ -710,11 +710,11 @@ const $n = {
710
710
  ]
711
711
  }
712
712
  ),
713
- w.filesToUpload && /* @__PURE__ */ e("p", { className: "form-error-message", children: w.filesToUpload.message }),
714
- z && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
713
+ y.filesToUpload && /* @__PURE__ */ e("p", { className: "form-error-message", children: y.filesToUpload.message }),
714
+ $ && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
715
715
  /* @__PURE__ */ e("h3", { children: "Upload Queue" }),
716
716
  /* @__PURE__ */ n("ul", { className: "file-list", children: [
717
- o.map(($, A) => /* @__PURE__ */ n(
717
+ o.map((T, A) => /* @__PURE__ */ n(
718
718
  "li",
719
719
  {
720
720
  className: "file-item",
@@ -723,12 +723,12 @@ const $n = {
723
723
  /* @__PURE__ */ e(
724
724
  Tt,
725
725
  {
726
- extension: $.name.split(".").pop()
726
+ extension: T.name.split(".").pop()
727
727
  }
728
728
  ),
729
729
  /* @__PURE__ */ n("div", { children: [
730
- /* @__PURE__ */ e("p", { className: "file-item-name", children: $.name }),
731
- /* @__PURE__ */ e("p", { className: "file-item-size", children: At($.size) })
730
+ /* @__PURE__ */ e("p", { className: "file-item-name", children: T.name }),
731
+ /* @__PURE__ */ e("p", { className: "file-item-size", children: At(T.size) })
732
732
  ] })
733
733
  ] }),
734
734
  /* @__PURE__ */ e(
@@ -742,9 +742,9 @@ const $n = {
742
742
  )
743
743
  ]
744
744
  },
745
- `${$.name}-${A}`
745
+ `${T.name}-${A}`
746
746
  )),
747
- u.map(({ file: $, message: A }, E) => /* @__PURE__ */ n(
747
+ u.map(({ file: T, message: A }, E) => /* @__PURE__ */ n(
748
748
  "li",
749
749
  {
750
750
  className: "file-item file-item--rejected",
@@ -753,12 +753,12 @@ const $n = {
753
753
  /* @__PURE__ */ e(
754
754
  Tt,
755
755
  {
756
- extension: $.name.split(".").pop()
756
+ extension: T.name.split(".").pop()
757
757
  }
758
758
  ),
759
759
  /* @__PURE__ */ n("div", { children: [
760
- /* @__PURE__ */ e("p", { className: "file-item-name", children: $.name }),
761
- /* @__PURE__ */ e("p", { className: "file-item-size", children: At($.size) }),
760
+ /* @__PURE__ */ e("p", { className: "file-item-name", children: T.name }),
761
+ /* @__PURE__ */ e("p", { className: "file-item-size", children: At(T.size) }),
762
762
  /* @__PURE__ */ e("p", { className: "rejection-reason", children: A })
763
763
  ] })
764
764
  ] }),
@@ -773,7 +773,7 @@ const $n = {
773
773
  )
774
774
  ]
775
775
  },
776
- `${$.name}-${E}`
776
+ `${T.name}-${E}`
777
777
  ))
778
778
  ] })
779
779
  ] })
@@ -858,75 +858,75 @@ const $n = {
858
858
  fetchCreatedOrUpdatedByUsers: u = async () => []
859
859
  // Mockable fetcher
860
860
  }) => {
861
- const [p, b] = L({
861
+ const [p, b] = M({
862
862
  createdBy: [],
863
863
  updatedBy: []
864
- }), [f, r] = L({
864
+ }), [f, r] = M({
865
865
  createdBy: !1,
866
866
  updatedBy: !1
867
- }), [w, d] = L({
867
+ }), [y, d] = M({
868
868
  startDate: null
869
- }), [h, z] = L({
869
+ }), [h, $] = M({
870
870
  endDate: null
871
- }), $ = Wa({
871
+ }), T = Wa({
872
872
  initialValues: JSON.parse(JSON.stringify(m)),
873
873
  // Deep copy
874
- onSubmit: (T) => {
875
- const v = {};
876
- Object.keys(T).forEach((g) => {
877
- v[g] = {
878
- operator: T[g].operator || "in",
879
- values: Array.isArray(T[g].values) ? T[g].values : [],
880
- range: T[g].range || null
874
+ onSubmit: (C) => {
875
+ const g = {};
876
+ Object.keys(C).forEach((v) => {
877
+ g[v] = {
878
+ operator: C[v].operator || "in",
879
+ values: Array.isArray(C[v].values) ? C[v].values : [],
880
+ range: C[v].range || null
881
881
  };
882
- }), console.log("[storybook filter] Applied Filters:", v), typeof s == "function" && s({
883
- filters: v,
882
+ }), console.log("[storybook filter] Applied Filters:", g), typeof s == "function" && s({
883
+ filters: g,
884
884
  activeCount: E
885
885
  }), a();
886
886
  },
887
887
  enableReinitialize: !0
888
- }), A = ue(() => l.reduce((T, v) => {
889
- const g = v.key, x = $.values[g];
890
- let C = !1;
891
- if (x)
892
- switch (v.type) {
888
+ }), A = ue(() => l.reduce((C, g) => {
889
+ const v = g.key, w = T.values[v];
890
+ let z = !1;
891
+ if (w)
892
+ switch (g.type) {
893
893
  case "multiselect":
894
894
  case "multiselect-users":
895
- C = Array.isArray(x.values) && x.values.length > 0;
895
+ z = Array.isArray(w.values) && w.values.length > 0;
896
896
  break;
897
897
  case "date":
898
- (x.range && x.range !== "" || Array.isArray(x.values) && x.values.length > 0) && (C = !0);
898
+ (w.range && w.range !== "" || Array.isArray(w.values) && w.values.length > 0) && (z = !0);
899
899
  break;
900
900
  }
901
- return T[g] = C, T;
902
- }, {}), [l, $.values]), E = Object.values(A).filter(Boolean).length, I = ue(() => l.some((T) => {
903
- if (T.type !== "date") return !1;
904
- const v = $.values?.[T.key]?.values;
905
- if (!Array.isArray(v) || v.length < 2) return !1;
906
- const [g, x] = v;
907
- if (!g || !x) return !1;
908
- const C = g instanceof Date ? g : new Date(g), N = x instanceof Date ? x : new Date(x);
909
- return C > N;
910
- }), [l, $.values]), j = async (T, v) => {
901
+ return C[v] = z, C;
902
+ }, {}), [l, T.values]), E = Object.values(A).filter(Boolean).length, I = ue(() => l.some((C) => {
903
+ if (C.type !== "date") return !1;
904
+ const g = T.values?.[C.key]?.values;
905
+ if (!Array.isArray(g) || g.length < 2) return !1;
906
+ const [v, w] = g;
907
+ if (!v || !w) return !1;
908
+ const z = v instanceof Date ? v : new Date(v), N = w instanceof Date ? w : new Date(w);
909
+ return z > N;
910
+ }), [l, T.values]), j = async (C, g) => {
911
911
  try {
912
- r((x) => ({ ...x, [T]: !0 }));
913
- const g = await u(T, v);
914
- b((x) => ({ ...x, [T]: g }));
915
- } catch (g) {
916
- console.error(`Error fetching ${T} users:`, g);
912
+ r((w) => ({ ...w, [C]: !0 }));
913
+ const v = await u(C, g);
914
+ b((w) => ({ ...w, [C]: v }));
915
+ } catch (v) {
916
+ console.error(`Error fetching ${C} users:`, v);
917
917
  } finally {
918
- r((g) => ({ ...g, [T]: !1 }));
918
+ r((v) => ({ ...v, [C]: !1 }));
919
919
  }
920
- }, V = (T) => {
921
- const v = l[T].key, g = l[T].url;
922
- l[T].type === "multiselect-users" && p[v].length === 0 && !f[v] && j(v, g);
920
+ }, _ = (C) => {
921
+ const g = l[C].key, v = l[C].url;
922
+ l[C].type === "multiselect-users" && p[g].length === 0 && !f[g] && j(g, v);
923
923
  }, G = () => {
924
- $.resetForm(), b({ createdBy: [], updatedBy: [] }), i();
925
- }, q = (T) => {
926
- const v = l.find((C) => C.key === T);
927
- if (!v) return null;
928
- const g = $.values[T] || m[T], x = Array.isArray(g.values) ? g.values : [];
929
- switch (v.type) {
924
+ T.resetForm(), b({ createdBy: [], updatedBy: [] }), i();
925
+ }, q = (C) => {
926
+ const g = l.find((z) => z.key === C);
927
+ if (!g) return null;
928
+ const v = T.values[C] || m[C], w = Array.isArray(v.values) ? v.values : [];
929
+ switch (g.type) {
930
930
  case "multiselect":
931
931
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
932
932
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
@@ -934,10 +934,10 @@ const $n = {
934
934
  /* @__PURE__ */ e(
935
935
  "select",
936
936
  {
937
- value: g.operator || "in",
938
- onChange: (R) => $.setFieldValue(`${T}.operator`, R.target.value),
937
+ value: v.operator || "in",
938
+ onChange: (R) => T.setFieldValue(`${C}.operator`, R.target.value),
939
939
  className: "filter-select",
940
- children: v.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Includes" : "Excludes" }, R))
940
+ children: g.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Includes" : "Excludes" }, R))
941
941
  }
942
942
  )
943
943
  ] }),
@@ -947,42 +947,42 @@ const $n = {
947
947
  "input",
948
948
  {
949
949
  type: "checkbox",
950
- id: `select-all-${T}`,
950
+ id: `select-all-${C}`,
951
951
  className: "filter-checkbox-input",
952
- checked: v.options.length > 0 && x.length === v.options.length,
952
+ checked: g.options.length > 0 && w.length === g.options.length,
953
953
  onChange: (R) => {
954
- const Y = R.target.checked ? v.options.map((W) => W.value) : [];
955
- $.setFieldValue(`${T}.values`, Y);
954
+ const Y = R.target.checked ? g.options.map((W) => W.value) : [];
955
+ T.setFieldValue(`${C}.values`, Y);
956
956
  }
957
957
  }
958
958
  ),
959
959
  /* @__PURE__ */ e(
960
960
  "label",
961
961
  {
962
- htmlFor: `select-all-${T}`,
962
+ htmlFor: `select-all-${C}`,
963
963
  className: "filter-checkbox-label",
964
964
  children: "Select All"
965
965
  }
966
966
  )
967
967
  ] }),
968
- v.options.map((R) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
968
+ g.options.map((R) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
969
969
  /* @__PURE__ */ e(
970
970
  "input",
971
971
  {
972
972
  type: "checkbox",
973
- id: `${T}-${R.value}`,
973
+ id: `${C}-${R.value}`,
974
974
  className: "filter-checkbox-input",
975
- checked: x.includes(R.value),
975
+ checked: w.includes(R.value),
976
976
  onChange: (Y) => {
977
- const W = Y.target.checked ? [...x, R.value] : x.filter((pe) => pe !== R.value);
978
- $.setFieldValue(`${T}.values`, W);
977
+ const W = Y.target.checked ? [...w, R.value] : w.filter((pe) => pe !== R.value);
978
+ T.setFieldValue(`${C}.values`, W);
979
979
  }
980
980
  }
981
981
  ),
982
982
  /* @__PURE__ */ e(
983
983
  "label",
984
984
  {
985
- htmlFor: `${T}-${R.value}`,
985
+ htmlFor: `${C}-${R.value}`,
986
986
  className: "filter-checkbox-label",
987
987
  children: R.label
988
988
  }
@@ -991,33 +991,33 @@ const $n = {
991
991
  ] })
992
992
  ] });
993
993
  case "multiselect-users":
994
- const C = p[T] || [], N = f[T];
994
+ const z = p[C] || [], N = f[C];
995
995
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
996
996
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
997
997
  /* @__PURE__ */ e("label", { className: "filter-label", children: "Operator:" }),
998
998
  /* @__PURE__ */ e(
999
999
  "select",
1000
1000
  {
1001
- value: g.operator || "in",
1002
- onChange: (R) => $.setFieldValue(`${T}.operator`, R.target.value),
1001
+ value: v.operator || "in",
1002
+ onChange: (R) => T.setFieldValue(`${C}.operator`, R.target.value),
1003
1003
  className: "filter-select",
1004
- children: v.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Includes" : "Excludes" }, R))
1004
+ children: g.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Includes" : "Excludes" }, R))
1005
1005
  }
1006
1006
  )
1007
1007
  ] }),
1008
- N ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: C.length > 0 ? /* @__PURE__ */ n(te, { children: [
1008
+ N ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: z.length > 0 ? /* @__PURE__ */ n(te, { children: [
1009
1009
  /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
1010
1010
  /* @__PURE__ */ e(
1011
1011
  "input",
1012
1012
  {
1013
1013
  type: "checkbox",
1014
- id: `select-all-users-${T}`,
1014
+ id: `select-all-users-${C}`,
1015
1015
  className: "filter-checkbox-input",
1016
- checked: C.length > 0 && x.length === C.length,
1016
+ checked: z.length > 0 && w.length === z.length,
1017
1017
  onChange: (R) => {
1018
- const Y = R.target.checked ? C.map((W) => W.email) : [];
1019
- $.setFieldValue(
1020
- `${T}.values`,
1018
+ const Y = R.target.checked ? z.map((W) => W.email) : [];
1019
+ T.setFieldValue(
1020
+ `${C}.values`,
1021
1021
  Y
1022
1022
  );
1023
1023
  }
@@ -1026,24 +1026,24 @@ const $n = {
1026
1026
  /* @__PURE__ */ e(
1027
1027
  "label",
1028
1028
  {
1029
- htmlFor: `select-all-users-${T}`,
1029
+ htmlFor: `select-all-users-${C}`,
1030
1030
  className: "filter-checkbox-label",
1031
1031
  children: "Select All Users"
1032
1032
  }
1033
1033
  )
1034
1034
  ] }),
1035
- C.map((R) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
1035
+ z.map((R) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
1036
1036
  /* @__PURE__ */ e(
1037
1037
  "input",
1038
1038
  {
1039
1039
  type: "checkbox",
1040
- id: `${T}-${R.email}`,
1040
+ id: `${C}-${R.email}`,
1041
1041
  className: "filter-checkbox-input",
1042
- checked: x.includes(R.email),
1042
+ checked: w.includes(R.email),
1043
1043
  onChange: (Y) => {
1044
- const W = Y.target.checked ? [...x, R.email] : x.filter((pe) => pe !== R.email);
1045
- $.setFieldValue(
1046
- `${T}.values`,
1044
+ const W = Y.target.checked ? [...w, R.email] : w.filter((pe) => pe !== R.email);
1045
+ T.setFieldValue(
1046
+ `${C}.values`,
1047
1047
  W
1048
1048
  );
1049
1049
  }
@@ -1052,7 +1052,7 @@ const $n = {
1052
1052
  /* @__PURE__ */ n(
1053
1053
  "label",
1054
1054
  {
1055
- htmlFor: `${T}-${R.email}`,
1055
+ htmlFor: `${C}-${R.email}`,
1056
1056
  className: "filter-checkbox-label",
1057
1057
  children: [
1058
1058
  /* @__PURE__ */ e("span", { className: "user-label-name", children: R.name }),
@@ -1064,7 +1064,7 @@ const $n = {
1064
1064
  ] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
1065
1065
  ] });
1066
1066
  case "date":
1067
- const y = g.values || [], [k, F] = y, M = k && F, U = y[0] || null, S = y[1] || null, O = {
1067
+ const x = v.values || [], [k, F] = x, L = k && F, U = x[0] || null, S = x[1] || null, O = {
1068
1068
  startDate: U instanceof Date ? U.toISOString().slice(0, 10) : null,
1069
1069
  endDate: U instanceof Date ? U.toISOString().slice(0, 10) : null
1070
1070
  }, D = {
@@ -1078,17 +1078,17 @@ const $n = {
1078
1078
  { key: "this_month", label: "This Month" },
1079
1079
  { key: "last_month", label: "Last Month" },
1080
1080
  { key: "custom", label: "Custom" }
1081
- ], _ = (R) => {
1081
+ ], V = (R) => {
1082
1082
  if (R === "anytime") {
1083
- $.setFieldValue(`${T}.values`, []), $.setFieldValue(`${T}.range`, "anytime");
1083
+ T.setFieldValue(`${C}.values`, []), T.setFieldValue(`${C}.range`, "anytime");
1084
1084
  return;
1085
1085
  }
1086
1086
  if (R === "custom") {
1087
- $.setFieldValue(`${T}.range`, "custom");
1087
+ T.setFieldValue(`${C}.range`, "custom");
1088
1088
  return;
1089
1089
  }
1090
1090
  const [Y, W] = On(R);
1091
- $.setFieldValue(`${T}.values`, Y && W ? [Y, W] : []), $.setFieldValue(`${T}.range`, R);
1091
+ T.setFieldValue(`${C}.values`, Y && W ? [Y, W] : []), T.setFieldValue(`${C}.range`, R);
1092
1092
  };
1093
1093
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
1094
1094
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
@@ -1096,20 +1096,20 @@ const $n = {
1096
1096
  /* @__PURE__ */ e(
1097
1097
  "select",
1098
1098
  {
1099
- value: g.operator,
1100
- onChange: (R) => $.setFieldValue(`${T}.operator`, R.target.value),
1099
+ value: v.operator,
1100
+ onChange: (R) => T.setFieldValue(`${C}.operator`, R.target.value),
1101
1101
  className: "filter-select",
1102
- children: v.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Is" : "Is not" }, R))
1102
+ children: g.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Is" : "Is not" }, R))
1103
1103
  }
1104
1104
  ),
1105
- M && /* @__PURE__ */ e(
1105
+ L && /* @__PURE__ */ e(
1106
1106
  "button",
1107
1107
  {
1108
1108
  type: "button",
1109
1109
  onClick: () => {
1110
- $.setFieldValue(
1111
- T,
1112
- m[T]
1110
+ T.setFieldValue(
1111
+ C,
1112
+ m[C]
1113
1113
  );
1114
1114
  },
1115
1115
  className: "filter-clear-selection-button",
@@ -1118,7 +1118,7 @@ const $n = {
1118
1118
  )
1119
1119
  ] }),
1120
1120
  /* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: P.map((R) => {
1121
- const Y = g.range === R.key || R.key === "anytime" && (!Array.isArray(g.values) || g.values.length === 0);
1121
+ const Y = v.range === R.key || R.key === "anytime" && (!Array.isArray(v.values) || v.values.length === 0);
1122
1122
  return /* @__PURE__ */ n(
1123
1123
  "label",
1124
1124
  {
@@ -1128,9 +1128,9 @@ const $n = {
1128
1128
  "input",
1129
1129
  {
1130
1130
  type: "radio",
1131
- name: `preset-${T}`,
1131
+ name: `preset-${C}`,
1132
1132
  checked: Y,
1133
- onChange: () => _(R.key),
1133
+ onChange: () => V(R.key),
1134
1134
  className: "h-4 w-4"
1135
1135
  }
1136
1136
  ),
@@ -1152,8 +1152,8 @@ const $n = {
1152
1152
  useRange: !1,
1153
1153
  value: O,
1154
1154
  onChange: (R) => {
1155
- const Y = R?.startDate ? Be(new Date(R.startDate)) : null, W = y[1] || null;
1156
- Y && ($.setFieldValue(`${T}.values`, [Y, W]), $.setFieldValue(`${T}.range`, "custom"));
1155
+ const Y = R?.startDate ? Be(new Date(R.startDate)) : null, W = x[1] || null;
1156
+ Y && (T.setFieldValue(`${C}.values`, [Y, W]), T.setFieldValue(`${C}.range`, "custom"));
1157
1157
  },
1158
1158
  inputClassName: "w-full rounded-xl border border-[#767676] px-4 py-2 text-sm font-normal text-[#101112] focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500",
1159
1159
  primaryColor: "violet",
@@ -1176,8 +1176,8 @@ const $n = {
1176
1176
  useRange: !1,
1177
1177
  value: D,
1178
1178
  onChange: (R) => {
1179
- const Y = R?.startDate ? je(new Date(R.startDate)) : null, W = y[0] || null;
1180
- Y && ($.setFieldValue(`${T}.values`, [W, Y]), $.setFieldValue(`${T}.range`, "custom"));
1179
+ const Y = R?.startDate ? je(new Date(R.startDate)) : null, W = x[0] || null;
1180
+ Y && (T.setFieldValue(`${C}.values`, [W, Y]), T.setFieldValue(`${C}.range`, "custom"));
1181
1181
  },
1182
1182
  inputClassName: "w-full rounded-xl border border-[#767676] px-4 py-2 text-sm font-normal text-[#101112] focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500",
1183
1183
  primaryColor: "violet",
@@ -1234,22 +1234,22 @@ const $n = {
1234
1234
  }
1235
1235
  )
1236
1236
  ] }),
1237
- /* @__PURE__ */ n("form", { onSubmit: $.handleSubmit, className: "filter-form", children: [
1237
+ /* @__PURE__ */ n("form", { onSubmit: T.handleSubmit, className: "filter-form", children: [
1238
1238
  /* @__PURE__ */ e("div", { className: "filter-content-wrapper", children: /* @__PURE__ */ n(
1239
1239
  Vr,
1240
1240
  {
1241
1241
  vertical: !0,
1242
- onChange: V,
1242
+ onChange: _,
1243
1243
  style: {
1244
1244
  display: "flex",
1245
1245
  flexGrow: 1
1246
1246
  },
1247
1247
  children: [
1248
- /* @__PURE__ */ e(_r, { className: "filter-tabs-list", children: l.map((T) => /* @__PURE__ */ n(se, { className: "filter-tab-item", children: [
1248
+ /* @__PURE__ */ e(_r, { className: "filter-tabs-list", children: l.map((C) => /* @__PURE__ */ n(ne, { className: "filter-tab-item", children: [
1249
1249
  /* @__PURE__ */ e("div", { className: "filter-selection-horizontal-indicator" }),
1250
1250
  /* @__PURE__ */ n("div", { className: "filter-lbl-indicator-wrapper", children: [
1251
- T.label,
1252
- A[T.key] && /* @__PURE__ */ e(
1251
+ C.label,
1252
+ A[C.key] && /* @__PURE__ */ e(
1253
1253
  "span",
1254
1254
  {
1255
1255
  className: "filter-active-indicator",
@@ -1257,9 +1257,9 @@ const $n = {
1257
1257
  }
1258
1258
  )
1259
1259
  ] })
1260
- ] }, T.key)) }),
1261
- /* @__PURE__ */ e(Ur, { className: "filter-tabs-panels", children: l.map((T) => /* @__PURE__ */ e(
1262
- se.Panel,
1260
+ ] }, C.key)) }),
1261
+ /* @__PURE__ */ e(Ur, { className: "filter-tabs-panels", children: l.map((C) => /* @__PURE__ */ e(
1262
+ ne.Panel,
1263
1263
  {
1264
1264
  className: "filter-tab-panel",
1265
1265
  children: /* @__PURE__ */ e(
@@ -1269,12 +1269,12 @@ const $n = {
1269
1269
  animate: { opacity: 1, x: 0 },
1270
1270
  transition: { duration: 0.3 },
1271
1271
  className: "h-full",
1272
- children: q(T.key)
1272
+ children: q(C.key)
1273
1273
  },
1274
- T.key
1274
+ C.key
1275
1275
  )
1276
1276
  },
1277
- T.key
1277
+ C.key
1278
1278
  )) })
1279
1279
  ]
1280
1280
  }
@@ -1293,7 +1293,7 @@ const $n = {
1293
1293
  "button",
1294
1294
  {
1295
1295
  type: "submit",
1296
- disabled: !$.dirty || I,
1296
+ disabled: !T.dirty || I,
1297
1297
  className: "filter-button apply",
1298
1298
  children: [
1299
1299
  "Apply Filters",
@@ -1375,7 +1375,7 @@ const $n = {
1375
1375
  size: b
1376
1376
  // Add size prop
1377
1377
  }) => {
1378
- const f = Rt[o] || Rt.info, r = f.icon, w = () => {
1378
+ const f = Rt[o] || Rt.info, r = f.icon, y = () => {
1379
1379
  a({ primary: !0, secondary: !1 });
1380
1380
  }, d = () => {
1381
1381
  a({ primary: !1, secondary: !0 });
@@ -1424,7 +1424,7 @@ const $n = {
1424
1424
  l && /* @__PURE__ */ e(
1425
1425
  ee,
1426
1426
  {
1427
- onClick: w,
1427
+ onClick: y,
1428
1428
  label: l,
1429
1429
  ...p
1430
1430
  }
@@ -1442,12 +1442,12 @@ const $n = {
1442
1442
  onItemsPerPageChange: l,
1443
1443
  itemsPerPageOptions: m = [10, 15, 20]
1444
1444
  }) => {
1445
- const o = Math.ceil(a / s), [u, p] = L(t);
1445
+ const o = Math.ceil(a / s), [u, p] = M(t);
1446
1446
  Z(() => {
1447
1447
  p(t);
1448
1448
  }, [t]);
1449
- const b = Math.min((t - 1) * s + 1, a), f = Math.min(t * s, a), r = (w) => {
1450
- w.preventDefault();
1449
+ const b = Math.min((t - 1) * s + 1, a), f = Math.min(t * s, a), r = (y) => {
1450
+ y.preventDefault();
1451
1451
  let d = parseInt(u, 10);
1452
1452
  isNaN(d) || d < 1 ? d = 1 : d > o && (d = o), p(d), d !== t && i(d);
1453
1453
  };
@@ -1460,8 +1460,8 @@ const $n = {
1460
1460
  id: "items-per-page",
1461
1461
  className: "pagination-select",
1462
1462
  value: s,
1463
- onChange: (w) => l(Number(w.target.value)),
1464
- children: m.map((w) => /* @__PURE__ */ e("option", { value: w, children: w }, w))
1463
+ onChange: (y) => l(Number(y.target.value)),
1464
+ children: m.map((y) => /* @__PURE__ */ e("option", { value: y, children: y }, y))
1465
1465
  }
1466
1466
  ),
1467
1467
  /* @__PURE__ */ n("span", { className: "pagination-info", children: [
@@ -1500,7 +1500,7 @@ const $n = {
1500
1500
  type: "number",
1501
1501
  className: "page-input",
1502
1502
  value: u,
1503
- onChange: (w) => p(w.target.value),
1503
+ onChange: (y) => p(y.target.value),
1504
1504
  onBlur: r,
1505
1505
  "aria-label": `Current page, Page ${t}`
1506
1506
  }
@@ -1586,7 +1586,7 @@ const $n = {
1586
1586
  customClass: m = "",
1587
1587
  ...o
1588
1588
  }) => {
1589
- const [u, p] = L(t);
1589
+ const [u, p] = M(t);
1590
1590
  Z(() => {
1591
1591
  p(t);
1592
1592
  }, [t]);
@@ -1633,9 +1633,9 @@ const $n = {
1633
1633
  // From RHF's <Controller>
1634
1634
  showSearch: p = !0
1635
1635
  }) => {
1636
- const [b, f] = L(""), r = b === "" ? i : i.filter(
1636
+ const [b, f] = M(""), r = b === "" ? i : i.filter(
1637
1637
  (d) => d.label.toLowerCase().includes(b.toLowerCase())
1638
- ), w = i.find((d) => a?.id ? d.id === a.id : d.id === a || d.value === a);
1638
+ ), y = i.find((d) => a?.id ? d.id === a.id : d.id === a || d.value === a);
1639
1639
  return /* @__PURE__ */ e(K, { value: a, onChange: s, disabled: m, children: /* @__PURE__ */ n("div", { className: "select-wrapper", ref: u, children: [
1640
1640
  t && /* @__PURE__ */ e("label", { className: "select-label", children: t }),
1641
1641
  /* @__PURE__ */ n("div", { className: "select-button-container", children: [
@@ -1646,7 +1646,7 @@ const $n = {
1646
1646
  "select-button--error": !!o
1647
1647
  }),
1648
1648
  children: [
1649
- /* @__PURE__ */ e("span", { className: "select-value-display", children: w ? w.label : /* @__PURE__ */ e("span", { className: "placeholder", children: l }) }),
1649
+ /* @__PURE__ */ e("span", { className: "select-value-display", children: y ? y.label : /* @__PURE__ */ e("span", { className: "placeholder", children: l }) }),
1650
1650
  /* @__PURE__ */ e(Ht, { className: "select-chevron", "aria-hidden": "true" })
1651
1651
  ]
1652
1652
  }
@@ -1700,7 +1700,7 @@ const $n = {
1700
1700
  o && /* @__PURE__ */ e("p", { className: "select-error-message", children: o })
1701
1701
  ] }) });
1702
1702
  }, Ln = () => {
1703
- const [t, a] = L(window.location.pathname);
1703
+ const [t, a] = M(window.location.pathname);
1704
1704
  return Z(() => {
1705
1705
  const s = () => {
1706
1706
  a(window.location.pathname);
@@ -1715,7 +1715,7 @@ const $n = {
1715
1715
  return s;
1716
1716
  return null;
1717
1717
  }, fa = ({ item: t, isCollapsed: a, level: s = 0 }) => {
1718
- const { pathname: i } = Ln(), l = t.href || t.url || t.path, [m, o] = L(!1), u = t.icon;
1718
+ const { pathname: i } = Ln(), l = t.href || t.url || t.path, [m, o] = M(!1), u = t.icon;
1719
1719
  Z(() => {
1720
1720
  xt([t], i) && o(!0);
1721
1721
  }, [t, i]);
@@ -1905,16 +1905,16 @@ const $n = {
1905
1905
  // ✅ New prop to control visibility
1906
1906
  ...u
1907
1907
  }) => {
1908
- const p = a || u.name, [b, f] = L(
1908
+ const p = a || u.name, [b, f] = M(
1909
1909
  u.value?.length || u.defaultValue?.length || 0
1910
1910
  ), r = (d) => {
1911
1911
  f(d.target.value.length), u.onChange && u.onChange(d);
1912
- }, w = m - b;
1912
+ }, y = m - b;
1913
1913
  return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${i || ""}`, children: [
1914
1914
  /* @__PURE__ */ n("div", { className: "textarea-header", children: [
1915
1915
  t && /* @__PURE__ */ e("label", { htmlFor: p, className: "textarea-label", children: t }),
1916
1916
  o && m && /* @__PURE__ */ n("span", { className: "char-counter", children: [
1917
- w,
1917
+ y,
1918
1918
  " characters remaining"
1919
1919
  ] })
1920
1920
  ] }),
@@ -1972,9 +1972,9 @@ const $n = {
1972
1972
  // For external styling of the tooltip itself
1973
1973
  ...o
1974
1974
  }) => {
1975
- const u = re.useId();
1975
+ const u = se.useId();
1976
1976
  return /* @__PURE__ */ n(te, { children: [
1977
- re.cloneElement(t, { "data-tooltip-id": u }),
1977
+ se.cloneElement(t, { "data-tooltip-id": u }),
1978
1978
  /* @__PURE__ */ e(
1979
1979
  Ka,
1980
1980
  {
@@ -2012,7 +2012,7 @@ const $n = {
2012
2012
  showProgress: p = !0,
2013
2013
  closeOnOverlayClick: b = !0
2014
2014
  }) => {
2015
- const f = s[i], r = Object.keys(s), w = r.indexOf(i), d = (w + 1) / r.length * 100, h = w > 0 && m.onBack;
2015
+ const f = s[i], r = Object.keys(s), y = r.indexOf(i), d = (y + 1) / r.length * 100, h = y > 0 && m.onBack;
2016
2016
  return /* @__PURE__ */ e(he, { show: t, as: Q, children: /* @__PURE__ */ n(
2017
2017
  ye,
2018
2018
  {
@@ -2134,7 +2134,7 @@ const $n = {
2134
2134
  children: f,
2135
2135
  // ✅ Add children to the props list
2136
2136
  onClick: r,
2137
- ...w
2137
+ ...y
2138
2138
  }) => {
2139
2139
  const d = u, h = H(
2140
2140
  "btn-base",
@@ -2153,7 +2153,7 @@ const $n = {
2153
2153
  onClick: r,
2154
2154
  title: i,
2155
2155
  "aria-label": i,
2156
- ...w,
2156
+ ...y,
2157
2157
  children: o && /* @__PURE__ */ e(o, { size: p === "large" ? 20 : 16 })
2158
2158
  }
2159
2159
  );
@@ -2478,31 +2478,31 @@ function Hn({
2478
2478
  );
2479
2479
  function i({ open: b = !1, customHeader: f = {} } = {}) {
2480
2480
  if (b) {
2481
- const { Authorization: r, ...w } = It();
2481
+ const { Authorization: r, ...y } = It();
2482
2482
  return {
2483
- headers: { ...w, ...a, ...f }
2483
+ headers: { ...y, ...a, ...f }
2484
2484
  };
2485
2485
  }
2486
2486
  return { headers: { ...It(), ...f } };
2487
2487
  }
2488
- async function l(b, f, r = !1, w = {}) {
2488
+ async function l(b, f, r = !1, y = {}) {
2489
2489
  return s.get(b, {
2490
2490
  params: f,
2491
- ...i({ open: r, customHeader: w })
2491
+ ...i({ open: r, customHeader: y })
2492
2492
  });
2493
2493
  }
2494
- async function m(b, f, r = !1, w = {}) {
2495
- const d = { ...i({ open: r, customHeader: w }) };
2494
+ async function m(b, f, r = !1, y = {}) {
2495
+ const d = { ...i({ open: r, customHeader: y }) };
2496
2496
  return f !== void 0 && (d.data = f), s.delete(b, d);
2497
2497
  }
2498
- async function o(b, f = {}, r = !1, w = {}) {
2499
- return s.post(b, f, i({ open: r, customHeader: w }));
2498
+ async function o(b, f = {}, r = !1, y = {}) {
2499
+ return s.post(b, f, i({ open: r, customHeader: y }));
2500
2500
  }
2501
- async function u(b, f = {}, r = !1, w = {}) {
2502
- return s.put(b, f, i({ open: r, customHeader: w }));
2501
+ async function u(b, f = {}, r = !1, y = {}) {
2502
+ return s.put(b, f, i({ open: r, customHeader: y }));
2503
2503
  }
2504
- async function p(b, f = {}, r = !1, w = {}) {
2505
- return s.patch(b, f, i({ open: r, customHeader: w }));
2504
+ async function p(b, f = {}, r = !1, y = {}) {
2505
+ return s.patch(b, f, i({ open: r, customHeader: y }));
2506
2506
  }
2507
2507
  return {
2508
2508
  instance: s,
@@ -2600,7 +2600,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2600
2600
  return es(i);
2601
2601
  }
2602
2602
  }, Ct = (t, a) => {
2603
- const [s, i] = L(t);
2603
+ const [s, i] = M(t);
2604
2604
  return Z(
2605
2605
  () => {
2606
2606
  const l = sn(() => {
@@ -2672,35 +2672,35 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2672
2672
  },
2673
2673
  isChanged: u = !1
2674
2674
  }) => {
2675
- const [p, b] = L(Pt[0]), [f, r] = L(""), w = Ct(f, 400), [d, h] = L([]), [z, $] = L(/* @__PURE__ */ new Set()), [A, E] = L(!1), [I, j] = L(Lt[0]), {
2676
- control: V,
2675
+ const [p, b] = M(Pt[0]), [f, r] = M(""), y = Ct(f, 400), [d, h] = M([]), [$, T] = M(/* @__PURE__ */ new Set()), [A, E] = M(!1), [I, j] = M(Lt[0]), {
2676
+ control: _,
2677
2677
  handleSubmit: G,
2678
2678
  watch: q,
2679
- formState: { errors: T, isSubmitting: v }
2679
+ formState: { errors: C, isSubmitting: g }
2680
2680
  } = lr({
2681
2681
  defaultValues: { pendingInvites: [] },
2682
2682
  resolver: cr(as)
2683
- }), { fields: g, append: x, remove: C, update: N } = ir({
2684
- control: V,
2683
+ }), { fields: v, append: w, remove: z, update: N } = ir({
2684
+ control: _,
2685
2685
  name: "pendingInvites"
2686
- }), y = q("pendingInvites");
2686
+ }), x = q("pendingInvites");
2687
2687
  Z(() => {
2688
- w.length > 1 ? (E(!0), Kn(p.name, w).then((D) => {
2688
+ y.length > 1 ? (E(!0), Kn(p.name, y).then((D) => {
2689
2689
  h(D);
2690
- }).catch((D) => console.error("Search failed:", D)).finally(() => E(!1))) : (h([]), $(/* @__PURE__ */ new Set()));
2691
- }, [w, p]);
2690
+ }).catch((D) => console.error("Search failed:", D)).finally(() => E(!1))) : (h([]), T(/* @__PURE__ */ new Set()));
2691
+ }, [y, p]);
2692
2692
  const k = (D) => {
2693
- $((P) => {
2694
- const _ = new Set(P);
2695
- return _.has(D) ? _.delete(D) : _.add(D), _;
2693
+ T((P) => {
2694
+ const V = new Set(P);
2695
+ return V.has(D) ? V.delete(D) : V.add(D), V;
2696
2696
  });
2697
2697
  }, F = () => {
2698
- d.filter((D) => z.has(D.id)).forEach((D) => {
2699
- g.find((P) => P.id === D.id) || x({ ...D, permission: I.name });
2700
- }), $(/* @__PURE__ */ new Set()), r("");
2701
- }, M = (D) => {
2702
- j(D), g.forEach(
2703
- (P, _) => N(_, { ...g[_], permission: D.name })
2698
+ d.filter((D) => $.has(D.id)).forEach((D) => {
2699
+ v.find((P) => P.id === D.id) || w({ ...D, permission: I.name });
2700
+ }), T(/* @__PURE__ */ new Set()), r("");
2701
+ }, L = (D) => {
2702
+ j(D), v.forEach(
2703
+ (P, V) => N(V, { ...v[V], permission: D.name })
2704
2704
  );
2705
2705
  }, U = async (D) => {
2706
2706
  try {
@@ -2717,13 +2717,13 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2717
2717
  // Always send updated existing shares
2718
2718
  }, i);
2719
2719
  } else if (l === de.INTEREST) {
2720
- const P = D.pendingInvites.map((_) => ({
2721
- identity: _.id,
2722
- type: _.type.toLowerCase(),
2720
+ const P = D.pendingInvites.map((V) => ({
2721
+ identity: V.id,
2722
+ type: V.type.toLowerCase(),
2723
2723
  opt: !0,
2724
2724
  lock: !1,
2725
2725
  moderator: !1,
2726
- userName: _.name,
2726
+ userName: V.name,
2727
2727
  interestId: t?.data?.id
2728
2728
  }));
2729
2729
  o(P, i);
@@ -2747,7 +2747,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2747
2747
  throw console.error("Failed to submit invites:", P), P;
2748
2748
  }
2749
2749
  }, S = (D) => {
2750
- const P = i[p.code].find((_) => _.name === D.name && _.permission !== "remove") || y.find((_) => _.name === D.name);
2750
+ const P = i[p.code].find((V) => V.name === D.name && V.permission !== "remove") || x.find((V) => V.name === D.name);
2751
2751
  return P ? `${P.permission}` : "";
2752
2752
  }, O = () => {
2753
2753
  switch (l) {
@@ -2761,7 +2761,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2761
2761
  return "Add User, Groups or Roles test";
2762
2762
  }
2763
2763
  };
2764
- return ue(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:", y.length), y.length === 0 && !u), [y.length, u]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
2764
+ return ue(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:", x.length), x.length === 0 && !u), [x.length, u]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
2765
2765
  /* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
2766
2766
  /* @__PURE__ */ e(ye.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: O() }),
2767
2767
  /* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
@@ -2863,7 +2863,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2863
2863
  "input",
2864
2864
  {
2865
2865
  type: "checkbox",
2866
- checked: z.has(D.id),
2866
+ checked: $.has(D.id),
2867
2867
  readOnly: !0,
2868
2868
  className: "h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500",
2869
2869
  disabled: !!P
@@ -2900,7 +2900,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2900
2900
  "button",
2901
2901
  {
2902
2902
  onClick: F,
2903
- disabled: z.size === 0,
2903
+ disabled: $.size === 0,
2904
2904
  className: "px-3 py-1 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:bg-blue-300 disabled:cursor-not-allowed hover:cursor-pointer",
2905
2905
  children: "Add"
2906
2906
  }
@@ -2910,7 +2910,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2910
2910
  }
2911
2911
  ) })
2912
2912
  ] }),
2913
- /* @__PURE__ */ e(Ce, { children: g.length > 0 && /* @__PURE__ */ n(
2913
+ /* @__PURE__ */ e(Ce, { children: v.length > 0 && /* @__PURE__ */ n(
2914
2914
  le.div,
2915
2915
  {
2916
2916
  initial: { opacity: 0, y: 20 },
@@ -2920,14 +2920,14 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2920
2920
  /* @__PURE__ */ n("div", { className: "flex justify-between items-center", children: [
2921
2921
  /* @__PURE__ */ n("div", { className: "font-semibold text-gray-800", children: [
2922
2922
  "Pending Invites (",
2923
- g.length,
2923
+ v.length,
2924
2924
  ")"
2925
2925
  ] }),
2926
2926
  l === de.DRIVE && /* @__PURE__ */ e(
2927
2927
  K,
2928
2928
  {
2929
2929
  value: I,
2930
- onChange: M,
2930
+ onChange: L,
2931
2931
  children: /* @__PURE__ */ n("div", { className: "relative", children: [
2932
2932
  /* @__PURE__ */ n(K.Button, { className: "relative w-full border border-gray-300 bg-white rounded-md shadow-sm pl-3 pr-10 py-2 text-left hover:cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm", children: [
2933
2933
  /* @__PURE__ */ n("span", { className: "flex items-center", children: [
@@ -2951,7 +2951,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2951
2951
  {
2952
2952
  value: D,
2953
2953
  className: ({ active: P }) => `${P ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2954
- children: ({ selected: P, active: _ }) => /* @__PURE__ */ n(te, { children: [
2954
+ children: ({ selected: P, active: V }) => /* @__PURE__ */ n(te, { children: [
2955
2955
  /* @__PURE__ */ n(
2956
2956
  "span",
2957
2957
  {
@@ -2960,7 +2960,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2960
2960
  /* @__PURE__ */ e(
2961
2961
  D.icon,
2962
2962
  {
2963
- className: `h-5 w-5 mr-2 ${_ ? "text-white" : "text-gray-400"}`
2963
+ className: `h-5 w-5 mr-2 ${V ? "text-white" : "text-gray-400"}`
2964
2964
  }
2965
2965
  ),
2966
2966
  "Can ",
@@ -2985,7 +2985,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2985
2985
  }
2986
2986
  )
2987
2987
  ] }),
2988
- /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(Ce, { children: g.map((D, P) => /* @__PURE__ */ n(
2988
+ /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(Ce, { children: v.map((D, P) => /* @__PURE__ */ n(
2989
2989
  le.div,
2990
2990
  {
2991
2991
  layout: !0,
@@ -3013,7 +3013,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3013
3013
  /* @__PURE__ */ e(
3014
3014
  "button",
3015
3015
  {
3016
- onClick: () => C(P),
3016
+ onClick: () => z(P),
3017
3017
  className: "text-gray-400 hover:text-red-500 hover:cursor-pointer",
3018
3018
  children: /* @__PURE__ */ e(et, { className: "h-5 w-5" })
3019
3019
  }
@@ -3029,9 +3029,9 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3029
3029
  ] }),
3030
3030
  /* @__PURE__ */ e("footer", { className: "p-4 border-t border-gray-300 flex-shrink-0", children: /* @__PURE__ */ n("div", { className: "flex justify-between items-center", children: [
3031
3031
  /* @__PURE__ */ n("p", { className: "text-sm text-gray-600", children: [
3032
- y.length,
3032
+ x.length,
3033
3033
  " invitation",
3034
- y.length !== 1 ? "s" : "",
3034
+ x.length !== 1 ? "s" : "",
3035
3035
  " selected"
3036
3036
  ] }),
3037
3037
  /* @__PURE__ */ n("div", { className: "flex gap-2", children: [
@@ -3047,9 +3047,9 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3047
3047
  "button",
3048
3048
  {
3049
3049
  onClick: () => G(U)(),
3050
- disabled: v || y.length === 0 && !u,
3050
+ disabled: g || x.length === 0 && !u,
3051
3051
  className: "px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md shadow-sm hover:bg-blue-700 hover:cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:bg-blue-300 disabled:cursor-not-allowed",
3052
- children: v ? "Inviting..." : l === de.DRIVE ? "Send Invites" : "Add"
3052
+ children: g ? "Inviting..." : l === de.DRIVE ? "Send Invites" : "Add"
3053
3053
  }
3054
3054
  )
3055
3055
  ] })
@@ -3060,7 +3060,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3060
3060
  { name: "Can manage", icon: ea, value: "edit" },
3061
3061
  { name: "Remove", icon: dr, isDestructive: !0, value: "remove" }
3062
3062
  ], ns = ({ item: t, allowedPermissions: a, onPermissionChange: s }) => {
3063
- const [i, l] = L(!1), { refs: m, floatingStyles: o, context: u } = la({
3063
+ const [i, l] = M(!1), { refs: m, floatingStyles: o, context: u } = la({
3064
3064
  open: i,
3065
3065
  onOpenChange: l,
3066
3066
  middleware: [ia(8), oa(), ca({ padding: 8 })],
@@ -3069,11 +3069,11 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3069
3069
  }), p = tn(u), b = an(u), { getReferenceProps: f, getFloatingProps: r } = rn([
3070
3070
  p,
3071
3071
  b
3072
- ]), w = dt.find((h) => h.name === t.permission || h.value === t.permission) || dt[0];
3072
+ ]), y = dt.find((h) => h.name === t.permission || h.value === t.permission) || dt[0];
3073
3073
  return (
3074
3074
  // FIX: The <Listbox> component now wraps both the button and the portal.
3075
3075
  // This provides the necessary context for both children.
3076
- /* @__PURE__ */ n(K, { value: w, onChange: (h) => {
3076
+ /* @__PURE__ */ n(K, { value: y, onChange: (h) => {
3077
3077
  s(h), l(!1);
3078
3078
  }, children: [
3079
3079
  /* @__PURE__ */ n(
@@ -3111,24 +3111,24 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3111
3111
  K.Option,
3112
3112
  {
3113
3113
  className: ({
3114
- active: z
3114
+ active: $
3115
3115
  }) => `relative select-none py-2 pl-10 pr-4 hover:cursor-pointer
3116
- ${z ? "bg-blue-100 text-blue-900" : "text-gray-900"}
3117
- ${h.isDestructive && z ? "bg-red-100 text-red-900" : ""}
3118
- ${h.isDestructive && !z ? "text-red-600" : ""}`,
3116
+ ${$ ? "bg-blue-100 text-blue-900" : "text-gray-900"}
3117
+ ${h.isDestructive && $ ? "bg-red-100 text-red-900" : ""}
3118
+ ${h.isDestructive && !$ ? "text-red-600" : ""}`,
3119
3119
  value: h,
3120
- children: ({ selected: z }) => /* @__PURE__ */ n(te, { children: [
3120
+ children: ({ selected: $ }) => /* @__PURE__ */ n(te, { children: [
3121
3121
  /* @__PURE__ */ n(
3122
3122
  "span",
3123
3123
  {
3124
- className: `flex items-center gap-2 truncate ${z ? "font-medium" : "font-normal"}`,
3124
+ className: `flex items-center gap-2 truncate ${$ ? "font-medium" : "font-normal"}`,
3125
3125
  children: [
3126
3126
  /* @__PURE__ */ e(h.icon, { className: "h-5 w-5", "aria-hidden": "true" }),
3127
3127
  h.name
3128
3128
  ]
3129
3129
  }
3130
3130
  ),
3131
- z && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(ht, { className: "h-5 w-5", "aria-hidden": "true" }) })
3131
+ $ && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(ht, { className: "h-5 w-5", "aria-hidden": "true" }) })
3132
3132
  ] })
3133
3133
  },
3134
3134
  h.name
@@ -3148,32 +3148,32 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3148
3148
  existingShares: l,
3149
3149
  allowedPermissions: m
3150
3150
  }) => {
3151
- const [o, u] = L(l), [p, b] = L(0), [f, r] = L(""), w = Ct(f, 300), d = {
3151
+ const [o, u] = M(l), [p, b] = M(0), [f, r] = M(""), y = Ct(f, 300), d = {
3152
3152
  users: o.users.filter(
3153
- (E) => E.name.toLowerCase().includes(w.toLowerCase())
3153
+ (E) => E.name.toLowerCase().includes(y.toLowerCase())
3154
3154
  ),
3155
3155
  groups: o.groups.filter(
3156
- (E) => E.name.toLowerCase().includes(w.toLowerCase())
3156
+ (E) => E.name.toLowerCase().includes(y.toLowerCase())
3157
3157
  ),
3158
3158
  roles: o.roles.filter(
3159
- (E) => E.name.toLowerCase().includes(w.toLowerCase())
3159
+ (E) => E.name.toLowerCase().includes(y.toLowerCase())
3160
3160
  )
3161
- }, h = async (E, I, j, V) => {
3161
+ }, h = async (E, I, j, _) => {
3162
3162
  const G = I.value;
3163
3163
  u((q) => ({
3164
3164
  ...q,
3165
3165
  [j]: q[j].map(
3166
- (T) => T.id === E.id ? { ...T, permission: G } : T
3166
+ (C) => C.id === E.id ? { ...C, permission: G } : C
3167
3167
  )
3168
3168
  }));
3169
- }, z = () => {
3169
+ }, $ = () => {
3170
3170
  const E = {
3171
3171
  users: o.users.filter((I) => I.permission !== "remove"),
3172
3172
  groups: o.groups.filter((I) => I.permission !== "remove"),
3173
3173
  roles: o.roles.filter((I) => I.permission !== "remove")
3174
3174
  };
3175
3175
  a(E);
3176
- }, $ = ["users", "groups", "roles"], A = ["Users", "Groups", "Roles"];
3176
+ }, T = ["users", "groups", "roles"], A = ["Users", "Groups", "Roles"];
3177
3177
  return (
3178
3178
  // The main structure remains the same...
3179
3179
  /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-gray-50", children: [
@@ -3200,10 +3200,10 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3200
3200
  )
3201
3201
  ] }),
3202
3202
  /* @__PURE__ */ n("div", { className: "flex flex-col flex-grow", children: [
3203
- /* @__PURE__ */ n(se.Group, { selectedIndex: p, onChange: b, children: [
3203
+ /* @__PURE__ */ n(ne.Group, { selectedIndex: p, onChange: b, children: [
3204
3204
  /* @__PURE__ */ n("div", { className: "p-4 bg-white border-b border-gray-300", children: [
3205
- /* @__PURE__ */ e(se.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: A.map((E) => /* @__PURE__ */ e(
3206
- se,
3205
+ /* @__PURE__ */ e(ne.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: A.map((E) => /* @__PURE__ */ e(
3206
+ ne,
3207
3207
  {
3208
3208
  className: ({
3209
3209
  selected: I
@@ -3230,8 +3230,8 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3230
3230
  animate: { y: 0, opacity: 1 },
3231
3231
  exit: { y: -10, opacity: 0 },
3232
3232
  transition: { duration: 0.2 },
3233
- children: /* @__PURE__ */ e(se.Panels, { as: Q, children: $.map((E) => /* @__PURE__ */ e(
3234
- se.Panel,
3233
+ children: /* @__PURE__ */ e(ne.Panels, { as: Q, children: T.map((E) => /* @__PURE__ */ e(
3234
+ ne.Panel,
3235
3235
  {
3236
3236
  className: "space-y-3 focus:outline-none",
3237
3237
  children: /* @__PURE__ */ e(Ce, { children: d[E].length > 0 ? d[E].map((I) => /* @__PURE__ */ n(
@@ -3317,7 +3317,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3317
3317
  /* @__PURE__ */ e("div", { className: "p-4 bg-white border-t border-gray-300 flex justify-end", children: /* @__PURE__ */ e(
3318
3318
  "button",
3319
3319
  {
3320
- onClick: z,
3320
+ onClick: $,
3321
3321
  className: "px-4 py-2 bg-blue-600 text-white rounded-md shadow hover:bg-blue-700",
3322
3322
  children: "Update"
3323
3323
  }
@@ -3338,7 +3338,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3338
3338
  onClose: s,
3339
3339
  members: i
3340
3340
  }) => {
3341
- const [l, m] = L(!0), [o, u] = L(""), p = Ct(o, 300), b = i.filter(
3341
+ const [l, m] = M(!0), [o, u] = M(""), p = Ct(o, 300), b = i.filter(
3342
3342
  (d) => d.name.toLowerCase().includes(p.toLowerCase())
3343
3343
  ), f = {
3344
3344
  hidden: { opacity: 0 },
@@ -3352,7 +3352,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3352
3352
  hidden: { y: 20, opacity: 0 },
3353
3353
  visible: { y: 0, opacity: 1 },
3354
3354
  exit: { opacity: 0, x: -20 }
3355
- }, w = () => l ? (
3355
+ }, y = () => l ? (
3356
3356
  // Show 5 skeleton items while loading
3357
3357
  /* @__PURE__ */ e("div", { children: Array.from({ length: 5 }).map((d, h) => /* @__PURE__ */ e(ls, {}, h)) })
3358
3358
  ) : b.length === 0 ? /* @__PURE__ */ n(
@@ -3436,7 +3436,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3436
3436
  placeholder: "Search members..."
3437
3437
  }
3438
3438
  ) }),
3439
- /* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto", children: w() })
3439
+ /* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto", children: y() })
3440
3440
  ] });
3441
3441
  }, fe = {
3442
3442
  INVITE: "invite",
@@ -3459,28 +3459,28 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3459
3459
  allowedPermissions: u = [],
3460
3460
  ...p
3461
3461
  }) => {
3462
- const [b, f] = L(fe.INVITE), [r, w] = L(t), [d, h] = L(null), [z, $] = L(!1), [A, E] = L([]), [I, j] = L(fe.MANAGE), V = () => {
3462
+ const [b, f] = M(fe.INVITE), [r, y] = M(t), [d, h] = M(null), [$, T] = M(!1), [A, E] = M([]), [I, j] = M(fe.MANAGE), _ = () => {
3463
3463
  f(fe.INVITE), h(null), m();
3464
3464
  }, G = () => {
3465
3465
  f(fe.MANAGE);
3466
- }, q = async ({ id: g, name: x, type: C }) => {
3467
- if (C === "groups") {
3466
+ }, q = async ({ id: v, name: w, type: z }) => {
3467
+ if (z === "groups") {
3468
3468
  try {
3469
- const N = await Ve(`${Xe.getMembersForGroup(x)}`);
3469
+ const N = await Ve(`${Xe.getMembersForGroup(w)}`);
3470
3470
  } catch (N) {
3471
3471
  console.log("Error searching entities:", N);
3472
3472
  }
3473
3473
  E(resp);
3474
3474
  }
3475
- h({ id: g, type: C, name: x }), j(b), f(fe.MEMBERS);
3476
- }, T = (g) => {
3477
- console.log("changedExistingShares", g), w(g);
3478
- const x = ct.mapValues(t, (y) => y.map((k) => ({ id: k.id, permission: k.permission })).sort((k, F) => k.id - F.id)), C = ct.mapValues(g, (y) => y.map((k) => ({ id: k.id, permission: k.permission })).sort((k, F) => k.id - F.id));
3479
- console.log("Existing data:", x), console.log("Changed data:", C);
3480
- const N = !ct.isEqual(x, C);
3481
- console.log("hasPermissionChanged:", N), $(N), f(b === fe.MEMBERS ? I : fe.INVITE);
3475
+ h({ id: v, type: z, name: w }), j(b), f(fe.MEMBERS);
3476
+ }, C = (v) => {
3477
+ console.log("changedExistingShares", v), y(v);
3478
+ const w = ct.mapValues(t, (x) => x.map((k) => ({ id: k.id, permission: k.permission })).sort((k, F) => k.id - F.id)), z = ct.mapValues(v, (x) => x.map((k) => ({ id: k.id, permission: k.permission })).sort((k, F) => k.id - F.id));
3479
+ console.log("Existing data:", w), console.log("Changed data:", z);
3480
+ const N = !ct.isEqual(w, z);
3481
+ console.log("hasPermissionChanged:", N), T(N), f(b === fe.MEMBERS ? I : fe.INVITE);
3482
3482
  };
3483
- return /* @__PURE__ */ e(he, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose: V, children: [
3483
+ return /* @__PURE__ */ e(he, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose: _, children: [
3484
3484
  /* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
3485
3485
  /* @__PURE__ */ e("div", { className: "filter-modal-container", children: /* @__PURE__ */ e("div", { className: "filter-modal-positioner", children: /* @__PURE__ */ e(Ee, { className: "filter-modal-panel", style: { background: "white" }, children: (() => {
3486
3486
  switch (b) {
@@ -3497,8 +3497,8 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3497
3497
  ss,
3498
3498
  {
3499
3499
  entity: i,
3500
- onBack: T,
3501
- onClose: V,
3500
+ onBack: C,
3501
+ onClose: _,
3502
3502
  onOpenMembers: q,
3503
3503
  existingShares: r,
3504
3504
  calledBy: l,
@@ -3521,8 +3521,8 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3521
3521
  is,
3522
3522
  {
3523
3523
  entity: d,
3524
- onBack: T,
3525
- onClose: V,
3524
+ onBack: C,
3525
+ onClose: _,
3526
3526
  calledBy: l,
3527
3527
  existingShares: r,
3528
3528
  members: A
@@ -3545,14 +3545,14 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3545
3545
  {
3546
3546
  entity: i,
3547
3547
  onManage: G,
3548
- onClose: V,
3548
+ onClose: _,
3549
3549
  existingShares: r,
3550
3550
  calledBy: l,
3551
3551
  showExistingShares: o,
3552
- onFinalSubmit: (g) => {
3553
- s(g, r);
3552
+ onFinalSubmit: (v) => {
3553
+ s(v, r);
3554
3554
  },
3555
- isChanged: z
3555
+ isChanged: $
3556
3556
  }
3557
3557
  )
3558
3558
  },
@@ -3583,51 +3583,51 @@ function nt({
3583
3583
  onSearch: f,
3584
3584
  // (query: string) => void (required if searchMode==="server")
3585
3585
  serverLoading: r = !1,
3586
- minSearchChars: w = 2,
3586
+ minSearchChars: y = 2,
3587
3587
  // NEW: mappers (id/label keys)
3588
- getOptionId: d = (z) => String(z.id),
3589
- getOptionLabel: h = (z) => z.name
3588
+ getOptionId: d = ($) => String($.id),
3589
+ getOptionLabel: h = ($) => $.name
3590
3590
  }) {
3591
- const z = Qe(), $ = Qe(), [A, E] = L(""), I = xe(""), j = ue(() => {
3592
- const g = /* @__PURE__ */ new Map();
3593
- for (const x of a) g.set(d(x), x);
3594
- return g;
3595
- }, [a, d]), V = ue(() => Array.isArray(s) ? s.map((g) => g && typeof g == "object" ? j.get(d(g)) || null : j.get(String(g))).filter(Boolean) : [], [s, j, d]), G = ue(() => {
3591
+ const $ = Qe(), T = Qe(), [A, E] = M(""), I = xe(""), j = ue(() => {
3592
+ const v = /* @__PURE__ */ new Map();
3593
+ for (const w of a) v.set(d(w), w);
3594
+ return v;
3595
+ }, [a, d]), _ = ue(() => Array.isArray(s) ? s.map((v) => v && typeof v == "object" ? j.get(d(v)) || null : j.get(String(v))).filter(Boolean) : [], [s, j, d]), G = ue(() => {
3596
3596
  if (!A) return a;
3597
- const g = A.toLowerCase();
3598
- return a.filter((x) => h(x).toLowerCase().includes(g));
3597
+ const v = A.toLowerCase();
3598
+ return a.filter((w) => h(w).toLowerCase().includes(v));
3599
3599
  }, [a, A, h]);
3600
3600
  Z(() => {
3601
- b === "server" && A.length >= w && A !== I.current && (I.current = A, f && f(A));
3602
- }, [A, b, w, f]);
3603
- const q = b === "client" ? G : a, T = () => {
3604
- if (!V.length)
3601
+ b === "server" && A.length >= y && A !== I.current && (I.current = A, f && f(A));
3602
+ }, [A, b, y, f]);
3603
+ const q = b === "client" ? G : a, C = () => {
3604
+ if (!_.length)
3605
3605
  return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
3606
- const g = V.slice(0, u), x = V.length - u;
3606
+ const v = _.slice(0, u), w = _.length - u;
3607
3607
  return /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2", children: [
3608
- g.map((C) => /* @__PURE__ */ e(
3608
+ v.map((z) => /* @__PURE__ */ e(
3609
3609
  "span",
3610
3610
  {
3611
3611
  className: "px-2 py-1 text-xs font-medium text-white bg-gray-800 rounded-full",
3612
- children: h(C)
3612
+ children: h(z)
3613
3613
  },
3614
- d(C)
3614
+ d(z)
3615
3615
  )),
3616
- x > 0 && /* @__PURE__ */ n("span", { className: "px-2 py-1 text-xs font-medium text-gray-600 bg-gray-200 rounded-full", children: [
3616
+ w > 0 && /* @__PURE__ */ n("span", { className: "px-2 py-1 text-xs font-medium text-gray-600 bg-gray-200 rounded-full", children: [
3617
3617
  "+",
3618
- x,
3618
+ w,
3619
3619
  " more"
3620
3620
  ] })
3621
3621
  ] });
3622
3622
  };
3623
- return /* @__PURE__ */ e(K, { value: V, onChange: (g) => {
3624
- const x = Array.from(new Set(g.map((C) => d(C))));
3625
- p !== -1 && x.length > p || i(x);
3626
- }, multiple: !0, by: "id", children: ({ open: g }) => /* @__PURE__ */ n("div", { children: [
3623
+ return /* @__PURE__ */ e(K, { value: _, onChange: (v) => {
3624
+ const w = Array.from(new Set(v.map((z) => d(z))));
3625
+ p !== -1 && w.length > p || i(w);
3626
+ }, multiple: !0, by: "id", children: ({ open: v }) => /* @__PURE__ */ n("div", { children: [
3627
3627
  /* @__PURE__ */ e(
3628
3628
  K.Label,
3629
3629
  {
3630
- id: z,
3630
+ id: $,
3631
3631
  className: "block text-sm font-medium leading-6 text-gray-900",
3632
3632
  children: t
3633
3633
  }
@@ -3636,16 +3636,16 @@ function nt({
3636
3636
  /* @__PURE__ */ n(
3637
3637
  K.Button,
3638
3638
  {
3639
- "aria-labelledby": z,
3639
+ "aria-labelledby": $,
3640
3640
  "aria-invalid": !!o,
3641
- "aria-describedby": o ? $ : void 0,
3641
+ "aria-describedby": o ? T : void 0,
3642
3642
  onBlur: l,
3643
3643
  className: Ge(
3644
3644
  "relative w-full min-h-[38px] cursor-default rounded-md bg-white py-1.5 pl-3 pr-10 text-left text-gray-900 shadow-sm ring-1 ring-inset focus:outline-none focus:ring-2 focus:ring-gray-600 sm:text-sm sm:leading-6",
3645
3645
  o ? "ring-red-500" : "ring-gray-300"
3646
3646
  ),
3647
3647
  children: [
3648
- /* @__PURE__ */ e("span", { className: "block truncate", children: T() }),
3648
+ /* @__PURE__ */ e("span", { className: "block truncate", children: C() }),
3649
3649
  /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(Ht, { className: "w-5 h-5 text-gray-400", "aria-hidden": "true" }) })
3650
3650
  ]
3651
3651
  }
@@ -3654,7 +3654,7 @@ function nt({
3654
3654
  he,
3655
3655
  {
3656
3656
  as: Q,
3657
- show: g,
3657
+ show: v,
3658
3658
  leave: "transition ease-in duration-100",
3659
3659
  leaveFrom: "opacity-100",
3660
3660
  leaveTo: "opacity-0",
@@ -3664,22 +3664,22 @@ function nt({
3664
3664
  {
3665
3665
  value: A,
3666
3666
  onDebouncedChange: E,
3667
- placeholder: b === "server" ? `Search (min ${w})…` : "Search options…"
3667
+ placeholder: b === "server" ? `Search (min ${y})…` : "Search options…"
3668
3668
  }
3669
3669
  ) }),
3670
3670
  b === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
3671
- q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: b === "server" ? A.length < w ? `Type at least ${w} characters to search.` : "No results." : "No options found." }) : q.map((x) => {
3672
- const C = d(x), N = h(x), y = V.some((F) => d(F) === C), k = p !== -1 && V.length >= p && !y;
3671
+ q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: b === "server" ? A.length < y ? `Type at least ${y} characters to search.` : "No results." : "No options found." }) : q.map((w) => {
3672
+ const z = d(w), N = h(w), x = _.some((F) => d(F) === z), k = p !== -1 && _.length >= p && !x;
3673
3673
  return /* @__PURE__ */ e(
3674
3674
  K.Option,
3675
3675
  {
3676
- value: x,
3676
+ value: w,
3677
3677
  disabled: k,
3678
3678
  className: ({ active: F }) => Ge(
3679
3679
  k ? " text-gray-400 bg-white cursor-not-allowed" : F ? " bg-gray-200 text-gray-900" : " text-gray-900",
3680
3680
  " relative cursor-default select-none py-2 pl-3 pr-9"
3681
3681
  ),
3682
- children: ({ selected: F, active: M }) => /* @__PURE__ */ n(te, { children: [
3682
+ children: ({ selected: F, active: L }) => /* @__PURE__ */ n(te, { children: [
3683
3683
  /* @__PURE__ */ e(
3684
3684
  "span",
3685
3685
  {
@@ -3694,7 +3694,7 @@ function nt({
3694
3694
  "span",
3695
3695
  {
3696
3696
  className: Ge(
3697
- M ? " text-gray-900" : " text-gray-600",
3697
+ L ? " text-gray-900" : " text-gray-600",
3698
3698
  " absolute inset-y-0 right-0 flex items-center pr-4"
3699
3699
  ),
3700
3700
  children: /* @__PURE__ */ e(tt, { className: "w-5 h-5", "aria-hidden": "true" })
@@ -3702,13 +3702,13 @@ function nt({
3702
3702
  )
3703
3703
  ] })
3704
3704
  },
3705
- C
3705
+ z
3706
3706
  );
3707
3707
  })
3708
3708
  ] })
3709
3709
  }
3710
3710
  ),
3711
- o && /* @__PURE__ */ e("p", { id: $, className: "mt-1 text-sm text-red-600", children: o })
3711
+ o && /* @__PURE__ */ e("p", { id: T, className: "mt-1 text-sm text-red-600", children: o })
3712
3712
  ] })
3713
3713
  ] }) });
3714
3714
  }
@@ -3866,10 +3866,10 @@ function ds({
3866
3866
  dropId: f,
3867
3867
  indent: r = 24
3868
3868
  }) {
3869
- const { setNodeRef: w, isOver: d } = ur({ id: f }), { attributes: h, listeners: z, setNodeRef: $, transform: A, isDragging: E } = hr({ id: b }), I = A ? { transform: `translate3d(${Math.round(A.x)}px, ${Math.round(A.y)}px, 0)` } : void 0, [j, V] = L(!1), [G, q] = L(t.name), T = () => {
3870
- const g = G.trim();
3871
- V(!1), g && g !== t.name ? o?.(t, g) : q(t.name);
3872
- }, v = ue(() => /* @__PURE__ */ e(
3869
+ const { setNodeRef: y, isOver: d } = ur({ id: f }), { attributes: h, listeners: $, setNodeRef: T, transform: A, isDragging: E } = hr({ id: b }), I = A ? { transform: `translate3d(${Math.round(A.x)}px, ${Math.round(A.y)}px, 0)` } : void 0, [j, _] = M(!1), [G, q] = M(t.name), C = () => {
3870
+ const v = G.trim();
3871
+ _(!1), v && v !== t.name ? o?.(t, v) : q(t.name);
3872
+ }, g = ue(() => /* @__PURE__ */ e(
3873
3873
  _n,
3874
3874
  {
3875
3875
  options: [
@@ -3877,42 +3877,42 @@ function ds({
3877
3877
  { action: "rename", label: "Rename" },
3878
3878
  { action: "delete", label: "Delete" }
3879
3879
  ],
3880
- onSelect: (x) => {
3881
- x.action === "create" ? m?.(t) : x.action === "rename" ? V(!0) : x.action === "delete" && u?.(t);
3880
+ onSelect: (w) => {
3881
+ w.action === "create" ? m?.(t) : w.action === "rename" ? _(!0) : w.action === "delete" && u?.(t);
3882
3882
  }
3883
3883
  }
3884
3884
  ), [t, m, u]);
3885
3885
  return /* @__PURE__ */ n(
3886
3886
  "div",
3887
3887
  {
3888
- ref: w,
3888
+ ref: y,
3889
3889
  className: `tv-row ${d ? "tv-drop-over" : ""} ${E ? "dragging" : ""}`,
3890
3890
  style: { ...I, paddingLeft: 8 + a * r },
3891
- onClick: (g) => {
3892
- g.target.closest(".tv-toggle") || g.target.tagName === "INPUT" || l?.(t);
3891
+ onClick: (v) => {
3892
+ v.target.closest(".tv-toggle") || v.target.tagName === "INPUT" || l?.(t);
3893
3893
  },
3894
3894
  children: [
3895
3895
  /* @__PURE__ */ e("button", { className: "tv-toggle", onClick: i, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(wt, { size: 16 }) : /* @__PURE__ */ e(ve, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
3896
3896
  /* @__PURE__ */ e(Me, { size: 16, className: "tv-folder-ic" }),
3897
- /* @__PURE__ */ e("div", { className: "tv-name", ref: $, children: j ? /* @__PURE__ */ e(
3897
+ /* @__PURE__ */ e("div", { className: "tv-name", ref: T, children: j ? /* @__PURE__ */ e(
3898
3898
  "input",
3899
3899
  {
3900
3900
  className: "tv-input",
3901
3901
  value: G,
3902
- onChange: (g) => q(g.target.value),
3903
- onBlur: T,
3904
- onKeyDown: (g) => {
3905
- g.key === "Enter" && T(), g.key === "Escape" && (V(!1), q(t.name));
3902
+ onChange: (v) => q(v.target.value),
3903
+ onBlur: C,
3904
+ onKeyDown: (v) => {
3905
+ v.key === "Enter" && C(), v.key === "Escape" && (_(!1), q(t.name));
3906
3906
  },
3907
3907
  autoFocus: !0
3908
3908
  }
3909
- ) : /* @__PURE__ */ e("span", { onDoubleClick: () => V(!0), children: t.name }) }),
3910
- /* @__PURE__ */ e(cs, { listeners: z, attributes: h }),
3909
+ ) : /* @__PURE__ */ e("span", { onDoubleClick: () => _(!0), children: t.name }) }),
3910
+ /* @__PURE__ */ e(cs, { listeners: $, attributes: h }),
3911
3911
  /* @__PURE__ */ e("div", { className: "tv-actions", children: p ? p(t, {
3912
3912
  onCreateChild: () => m?.(t),
3913
- onRename: () => V(!0),
3913
+ onRename: () => _(!0),
3914
3914
  onDelete: () => u?.(t)
3915
- }) : v })
3915
+ }) : g })
3916
3916
  ]
3917
3917
  }
3918
3918
  );
@@ -4003,43 +4003,43 @@ function Jl({
4003
4003
  onRename: b,
4004
4004
  onDelete: f,
4005
4005
  onMove: r,
4006
- renderActions: w,
4006
+ renderActions: y,
4007
4007
  disableMoveToRoot: d = !1,
4008
4008
  // ← allow root moves by default now
4009
4009
  indentUnit: h = 24
4010
4010
  }) {
4011
- const { roots: z } = ue(() => ps(t) ? bs(t, { rootId: a, getId: i, getName: m }) : gs(
4011
+ const { roots: $ } = ue(() => ps(t) ? bs(t, { rootId: a, getId: i, getName: m }) : gs(
4012
4012
  t.map((k) => ({ ...k })),
4013
4013
  { rootId: a, getId: i, getParent: l, getName: m }
4014
- ), [t, a, i, l, m]), [$, A] = L({}), E = ae((k) => {
4014
+ ), [t, a, i, l, m]), [T, A] = M({}), E = ae((k) => {
4015
4015
  const F = {};
4016
- return (function M(U) {
4016
+ return (function L(U) {
4017
4017
  U.forEach((S) => {
4018
- F[S.id] = !0, S.children?.length && M(S.children);
4018
+ F[S.id] = !0, S.children?.length && L(S.children);
4019
4019
  });
4020
4020
  })(k), F;
4021
4021
  }, []);
4022
- re.useEffect(() => {
4023
- A(E(z));
4024
- }, [z, E]);
4022
+ se.useEffect(() => {
4023
+ A(E($));
4024
+ }, [$, E]);
4025
4025
  const I = ae(
4026
4026
  (k) => A((F) => ({ ...F, [k]: !F[k] })),
4027
4027
  []
4028
- ), [j, V] = L(() => Le(z));
4029
- re.useEffect(() => V(Le(z)), [z]);
4028
+ ), [j, _] = M(() => Le($));
4029
+ se.useEffect(() => _(Le($)), [$]);
4030
4030
  const G = pr(
4031
4031
  gr(yr, { activationConstraint: { delay: 250, tolerance: 5 } })
4032
- ), q = xe(null), [T, v] = L(null), g = xe(0), x = () => {
4033
- }, C = ({ delta: k }) => {
4034
- g.current = k?.x ?? 0;
4032
+ ), q = xe(null), [C, g] = M(null), v = xe(0), w = () => {
4033
+ }, z = ({ delta: k }) => {
4034
+ v.current = k?.x ?? 0;
4035
4035
  }, N = ae(
4036
4036
  ({ active: k, over: F }) => {
4037
- const M = g.current;
4038
- if (g.current = 0, v(null), !k || !F) return;
4037
+ const L = v.current;
4038
+ if (v.current = 0, g(null), !k || !F) return;
4039
4039
  const U = String(k.id).replace(/^drag-/, ""), S = String(F.id).replace(/^drop-/, "");
4040
4040
  if (!U || !S || U === S) return;
4041
4041
  let O = S;
4042
- const D = Math.max(0, Math.floor(-M / h));
4042
+ const D = Math.max(0, Math.floor(-L / h));
4043
4043
  if (D > 0) {
4044
4044
  let W = S;
4045
4045
  for (let pe = 0; pe < D; pe++) {
@@ -4053,43 +4053,43 @@ function Jl({
4053
4053
  }
4054
4054
  }
4055
4055
  if (d && O === a) {
4056
- V(Le(z));
4056
+ _(Le($));
4057
4057
  return;
4058
4058
  }
4059
- const P = Le(j), { newRoots: _, removed: R } = fs(P, U);
4059
+ const P = Le(j), { newRoots: V, removed: R } = fs(P, U);
4060
4060
  if (!R) return;
4061
- const Y = xs(_, O, R);
4062
- V(Y), r?.({ sourceId: U, destParentId: O, newTree: Y });
4061
+ const Y = xs(V, O, R);
4062
+ _(Y), r?.({ sourceId: U, destParentId: O, newTree: Y });
4063
4063
  },
4064
- [j, z, a, d, h, r]
4065
- ), y = ae(
4066
- (k, F = 0) => k.map((M) => /* @__PURE__ */ n(re.Fragment, { children: [
4064
+ [j, $, a, d, h, r]
4065
+ ), x = ae(
4066
+ (k, F = 0) => k.map((L) => /* @__PURE__ */ n(se.Fragment, { children: [
4067
4067
  /* @__PURE__ */ e(
4068
4068
  ds,
4069
4069
  {
4070
- node: M,
4070
+ node: L,
4071
4071
  depth: F,
4072
- expanded: !!$[M.id],
4073
- onToggle: () => I(M.id),
4072
+ expanded: !!T[L.id],
4073
+ onToggle: () => I(L.id),
4074
4074
  onSelect: o,
4075
4075
  onCreateChild: p,
4076
4076
  onRename: b,
4077
4077
  onDelete: f,
4078
- renderActions: w,
4079
- dragId: `drag-${M.id}`,
4080
- dropId: `drop-${M.id}`,
4078
+ renderActions: y,
4079
+ dragId: `drag-${L.id}`,
4080
+ dropId: `drop-${L.id}`,
4081
4081
  indent: h
4082
4082
  }
4083
4083
  ),
4084
- $[M.id] && M.children?.length > 0 ? y(M.children, F + 1) : null
4085
- ] }, M.id)),
4086
- [$, h, p, f, b, o, w, I]
4084
+ T[L.id] && L.children?.length > 0 ? x(L.children, F + 1) : null
4085
+ ] }, L.id)),
4086
+ [T, h, p, f, b, o, y, I]
4087
4087
  );
4088
- return re.useMemo(() => {
4089
- if (!T) return null;
4090
- const k = String(T).replace(/^drag-/, "");
4091
- function F(M) {
4092
- for (const U of M) {
4088
+ return se.useMemo(() => {
4089
+ if (!C) return null;
4090
+ const k = String(C).replace(/^drag-/, "");
4091
+ function F(L) {
4092
+ for (const U of L) {
4093
4093
  if (U.id === k) return U;
4094
4094
  const S = U.children?.length ? F(U.children) : null;
4095
4095
  if (S) return S;
@@ -4097,7 +4097,7 @@ function Jl({
4097
4097
  return null;
4098
4098
  }
4099
4099
  return F(j);
4100
- }, [T, j]), /* @__PURE__ */ n("div", { className: "tv", children: [
4100
+ }, [C, j]), /* @__PURE__ */ n("div", { className: "tv", children: [
4101
4101
  s !== !1 && /* @__PURE__ */ n("div", { className: "tv-header", children: [
4102
4102
  /* @__PURE__ */ e("div", { className: "tv-title", children: s }),
4103
4103
  /* @__PURE__ */ e("button", { className: "tv-btn", onClick: u, children: "+ New folder" })
@@ -4112,11 +4112,11 @@ function Jl({
4112
4112
  {
4113
4113
  collisionDetection: xr,
4114
4114
  sensors: G,
4115
- onDragStart: x,
4116
- onDragMove: C,
4115
+ onDragStart: w,
4116
+ onDragMove: z,
4117
4117
  onDragEnd: N,
4118
4118
  modifiers: [fr],
4119
- children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: y(j, 0) })
4119
+ children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: x(j, 0) })
4120
4120
  }
4121
4121
  )
4122
4122
  ] });
@@ -4135,21 +4135,21 @@ const Xl = ({
4135
4135
  ...u
4136
4136
  // Pass remaining props to Tab.Group
4137
4137
  }) => {
4138
- const p = s === "vertical", b = (w) => ke(
4138
+ const p = s === "vertical", b = (y) => ke(
4139
4139
  "py-2 -mb-px text-sm font-medium focus:outline-none border-b-2",
4140
- w ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
4141
- ), f = (w) => ke(
4140
+ y ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
4141
+ ), f = (y) => ke(
4142
4142
  "text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
4143
- w ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
4144
- ), r = ({ selected: w }) => o ? typeof o == "function" ? o(w) : o : p ? f(w) : b(w);
4145
- return /* @__PURE__ */ e(se.Group, { vertical: p, ...u, children: p ? /* @__PURE__ */ n("div", { className: ke("flex gap-4", i), children: [
4146
- /* @__PURE__ */ e(se.List, { className: ke("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((w) => /* @__PURE__ */ e(se, { className: r, children: w.label }, w.key)) }),
4147
- /* @__PURE__ */ e(se.Panels, { unmount: !a, className: ke("flex-1", m), children: t.map((w) => /* @__PURE__ */ e(se.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: w.content }) }, w.key)) })
4143
+ y ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
4144
+ ), r = ({ selected: y }) => o ? typeof o == "function" ? o(y) : o : p ? f(y) : b(y);
4145
+ return /* @__PURE__ */ e(ne.Group, { vertical: p, ...u, children: p ? /* @__PURE__ */ n("div", { className: ke("flex gap-4", i), children: [
4146
+ /* @__PURE__ */ e(ne.List, { className: ke("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((y) => /* @__PURE__ */ e(ne, { className: r, children: y.label }, y.key)) }),
4147
+ /* @__PURE__ */ e(ne.Panels, { unmount: !a, className: ke("flex-1", m), children: t.map((y) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: y.content }) }, y.key)) })
4148
4148
  ] }) : (
4149
4149
  // mostly this part is used : horizontal
4150
4150
  /* @__PURE__ */ n(te, { children: [
4151
- /* @__PURE__ */ e(se.List, { className: ke("flex gap-6 border rounded-t-2xl px-1.5 border-gray-300 mb-3 ", l), children: t.map((w) => /* @__PURE__ */ e(se, { className: r, children: w.label }, w.key)) }),
4152
- /* @__PURE__ */ e(se.Panels, { unmount: !a, className: ke("mt-2", m), children: t.map((w) => /* @__PURE__ */ e(se.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: w.content }) }, w.key)) })
4151
+ /* @__PURE__ */ e(ne.List, { className: ke("flex gap-6 border rounded-t-2xl px-1.5 border-gray-300 mb-3 ", l), children: t.map((y) => /* @__PURE__ */ e(ne, { className: r, children: y.label }, y.key)) }),
4152
+ /* @__PURE__ */ e(ne.Panels, { unmount: !a, className: ke("mt-2", m), children: t.map((y) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: y.content }) }, y.key)) })
4153
4153
  ] })
4154
4154
  ) });
4155
4155
  };
@@ -4159,7 +4159,7 @@ function Hl(t, a = "YYYY-MM-DD HH:mm:ss") {
4159
4159
  c.string;
4160
4160
  function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4161
4161
  console.log(t);
4162
- const [l, m] = re.useState(t), [o, u] = re.useState(() => {
4162
+ const [l, m] = se.useState(t), [o, u] = se.useState(() => {
4163
4163
  const r = a && a[t.key] || {};
4164
4164
  return console.log("Initial Section data for", t.key, r), r;
4165
4165
  }), p = xe(a);
@@ -4176,24 +4176,24 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4176
4176
  }, [l.key, o, s]);
4177
4177
  const f = (r) => {
4178
4178
  if (!r.dependsOn) return !0;
4179
- const { field: w, value: d, operator: h = "equals" } = r.dependsOn, z = o[w];
4179
+ const { field: y, value: d, operator: h = "equals" } = r.dependsOn, $ = o[y];
4180
4180
  switch (h) {
4181
4181
  case "equals":
4182
- return z === d;
4182
+ return $ === d;
4183
4183
  case "notEquals":
4184
- return z !== d;
4184
+ return $ !== d;
4185
4185
  case "contains":
4186
- return Array.isArray(z) && z.includes(d);
4186
+ return Array.isArray($) && $.includes(d);
4187
4187
  case "notContains":
4188
- return !Array.isArray(z) || !z.includes(d);
4188
+ return !Array.isArray($) || !$.includes(d);
4189
4189
  case "greaterThan":
4190
- return Number(z) > Number(d);
4190
+ return Number($) > Number(d);
4191
4191
  case "lessThan":
4192
- return Number(z) < Number(d);
4192
+ return Number($) < Number(d);
4193
4193
  case "isEmpty":
4194
- return !z || Array.isArray(z) && z.length === 0;
4194
+ return !$ || Array.isArray($) && $.length === 0;
4195
4195
  case "isNotEmpty":
4196
- return z && (!Array.isArray(z) || z.length > 0);
4196
+ return $ && (!Array.isArray($) || $.length > 0);
4197
4197
  default:
4198
4198
  return !0;
4199
4199
  }
@@ -4211,7 +4211,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4211
4211
  }
4212
4212
  ),
4213
4213
  /* @__PURE__ */ e("p", { style: { fontSize: "14px", marginBottom: "10px" }, children: l.description }),
4214
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: l.fields.map((r, w) => f(r) && /* @__PURE__ */ n("div", { style: { marginBottom: "10px" }, children: [
4214
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: l.fields.map((r, y) => f(r) && /* @__PURE__ */ n("div", { style: { marginBottom: "10px" }, children: [
4215
4215
  /* @__PURE__ */ n(
4216
4216
  "label",
4217
4217
  {
@@ -4411,7 +4411,6 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4411
4411
  const h = { ...o, [r.key]: d };
4412
4412
  u(h), s && s(l.key, h);
4413
4413
  },
4414
- label: r.placeholder || r.label,
4415
4414
  disabled: r.disabled ? r.disabled : !1
4416
4415
  }
4417
4416
  ),
@@ -4474,8 +4473,8 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4474
4473
  value: d.value,
4475
4474
  checked: o[r.key] === d.value,
4476
4475
  onChange: (h) => {
4477
- const z = { ...o, [r.key]: h.target.value };
4478
- u(z), s && s(l.key, z);
4476
+ const $ = { ...o, [r.key]: h.target.value };
4477
+ u($), s && s(l.key, $);
4479
4478
  },
4480
4479
  disabled: r.disabled
4481
4480
  }
@@ -4592,8 +4591,8 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4592
4591
  type: "file",
4593
4592
  name: r.key,
4594
4593
  onChange: (d) => {
4595
- const h = d.target.files[0], z = { ...o, [r.key]: h ? h.name : "" };
4596
- u(z), s && s(l.key, z);
4594
+ const h = d.target.files[0], $ = { ...o, [r.key]: h ? h.name : "" };
4595
+ u($), s && s(l.key, $);
4597
4596
  },
4598
4597
  accept: r.accept,
4599
4598
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4632,23 +4631,23 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4632
4631
  children: r.info
4633
4632
  }
4634
4633
  )
4635
- ] }, w)) })
4634
+ ] }, y)) })
4636
4635
  ] }) });
4637
4636
  }
4638
4637
  const vs = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
4639
4638
  function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4640
4639
  console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
4641
- const [l, m] = L(t), [o, u] = L(null), [p, b] = L(null);
4640
+ const [l, m] = M(t), [o, u] = M(null), [p, b] = M(null);
4642
4641
  console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
4643
- const [f, r] = L(() => {
4644
- const v = a && a[l.key] || [], g = v.length > 0 ? v : [{ id: 0 }];
4645
- return console.log(`[DataTableRenderer] ${l.key} - Initial data:`, g), g;
4646
- }), w = xe(a);
4642
+ const [f, r] = M(() => {
4643
+ const g = a && a[l.key] || [], v = g.length > 0 ? g : [{ id: 0 }];
4644
+ return console.log(`[DataTableRenderer] ${l.key} - Initial data:`, v), v;
4645
+ }), y = xe(a);
4647
4646
  Z(() => {
4648
- if (console.log(`[DataTableRenderer] ${l.key} - Checking for initialData changes`), console.log(`[DataTableRenderer] ${l.key} - Previous:`, w.current), console.log(`[DataTableRenderer] ${l.key} - Current:`, a), w.current !== a) {
4649
- w.current = a;
4650
- const v = a && a[l.key] || [], g = v.length > 0 ? v : [{ id: 0 }];
4651
- console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, g), r(g);
4647
+ if (console.log(`[DataTableRenderer] ${l.key} - Checking for initialData changes`), console.log(`[DataTableRenderer] ${l.key} - Previous:`, y.current), console.log(`[DataTableRenderer] ${l.key} - Current:`, a), y.current !== a) {
4648
+ y.current = a;
4649
+ const g = a && a[l.key] || [], v = g.length > 0 ? g : [{ id: 0 }];
4650
+ console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, v), r(v);
4652
4651
  }
4653
4652
  }, [a, l.key]);
4654
4653
  const d = xe(f), h = xe(null);
@@ -4659,257 +4658,257 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4659
4658
  }, [l.key, f, s]), Z(() => () => {
4660
4659
  h.current && clearTimeout(h.current);
4661
4660
  }, []);
4662
- const z = (v) => {
4663
- const g = (N, y) => {
4664
- console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: N, value: y, type: typeof y }), r((k) => {
4661
+ const $ = (g) => {
4662
+ const v = (N, x) => {
4663
+ console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: N, value: x, type: typeof x }), r((k) => {
4665
4664
  const F = [...k];
4666
- return F[N][v.key] = y, F;
4665
+ return F[N][g.key] = x, F;
4667
4666
  });
4668
- }, x = (N) => i[l.key]?.[N]?.[v.key], C = (N) => {
4669
- const y = x(N);
4670
- return y ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: y }) : null;
4667
+ }, w = (N) => i[l.key]?.[N]?.[g.key], z = (N) => {
4668
+ const x = w(N);
4669
+ return x ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: x }) : null;
4671
4670
  };
4672
- switch (v.fieldtype) {
4671
+ switch (g.fieldtype) {
4673
4672
  case "text":
4674
- return (N, y) => /* @__PURE__ */ n("div", { children: [
4673
+ return (N, x) => /* @__PURE__ */ n("div", { children: [
4675
4674
  /* @__PURE__ */ e(
4676
4675
  X,
4677
4676
  {
4678
- value: N[v.key] || "",
4679
- onChange: (k) => g(y, k.target.value),
4680
- placeholder: v.placeholder || `Enter ${v.label}`,
4681
- required: v.required,
4682
- className: `w-full ${x(y) ? "border-red-500" : ""}`
4677
+ value: N[g.key] || "",
4678
+ onChange: (k) => v(x, k.target.value),
4679
+ placeholder: g.placeholder || `Enter ${g.label}`,
4680
+ required: g.required,
4681
+ className: `w-full ${w(x) ? "border-red-500" : ""}`
4683
4682
  }
4684
4683
  ),
4685
- C(y)
4684
+ z(x)
4686
4685
  ] });
4687
4686
  case "textarea":
4688
- return (N, y) => /* @__PURE__ */ n("div", { children: [
4687
+ return (N, x) => /* @__PURE__ */ n("div", { children: [
4689
4688
  /* @__PURE__ */ e(
4690
4689
  ya,
4691
4690
  {
4692
- value: N[v.key] || "",
4693
- onChange: (k) => g(y, k.target.value),
4694
- placeholder: v.placeholder || `Enter ${v.label}`,
4695
- required: v.required,
4696
- className: `w-full ${x(y) ? "border-red-500" : ""}`,
4691
+ value: N[g.key] || "",
4692
+ onChange: (k) => v(x, k.target.value),
4693
+ placeholder: g.placeholder || `Enter ${g.label}`,
4694
+ required: g.required,
4695
+ className: `w-full ${w(x) ? "border-red-500" : ""}`,
4697
4696
  rows: 3
4698
4697
  }
4699
4698
  ),
4700
- C(y)
4699
+ z(x)
4701
4700
  ] });
4702
4701
  case "number":
4703
- return (N, y) => /* @__PURE__ */ n("div", { children: [
4702
+ return (N, x) => /* @__PURE__ */ n("div", { children: [
4704
4703
  /* @__PURE__ */ e(
4705
4704
  X,
4706
4705
  {
4707
4706
  type: "number",
4708
- value: N[v.key] || "",
4709
- onChange: (k) => g(y, k.target.value),
4710
- placeholder: v.placeholder || `Enter ${v.label}`,
4711
- required: v.required,
4712
- className: `w-full ${x(y) ? "border-red-500" : ""}`
4707
+ value: N[g.key] || "",
4708
+ onChange: (k) => v(x, k.target.value),
4709
+ placeholder: g.placeholder || `Enter ${g.label}`,
4710
+ required: g.required,
4711
+ className: `w-full ${w(x) ? "border-red-500" : ""}`
4713
4712
  }
4714
4713
  ),
4715
- C(y)
4714
+ z(x)
4716
4715
  ] });
4717
4716
  case "email":
4718
- return (N, y) => /* @__PURE__ */ n("div", { children: [
4717
+ return (N, x) => /* @__PURE__ */ n("div", { children: [
4719
4718
  /* @__PURE__ */ e(
4720
4719
  X,
4721
4720
  {
4722
4721
  type: "email",
4723
- value: N[v.key] || "",
4724
- onChange: (k) => g(y, k.target.value),
4725
- placeholder: v.placeholder || "Enter email address",
4726
- required: v.required,
4727
- className: `w-full ${x(y) ? "border-red-500" : ""}`
4722
+ value: N[g.key] || "",
4723
+ onChange: (k) => v(x, k.target.value),
4724
+ placeholder: g.placeholder || "Enter email address",
4725
+ required: g.required,
4726
+ className: `w-full ${w(x) ? "border-red-500" : ""}`
4728
4727
  }
4729
4728
  ),
4730
- C(y)
4729
+ z(x)
4731
4730
  ] });
4732
4731
  case "url":
4733
- return (N, y) => /* @__PURE__ */ n("div", { children: [
4732
+ return (N, x) => /* @__PURE__ */ n("div", { children: [
4734
4733
  /* @__PURE__ */ e(
4735
4734
  X,
4736
4735
  {
4737
4736
  type: "url",
4738
- value: N[v.key] || "",
4739
- onChange: (k) => g(y, k.target.value),
4740
- placeholder: v.placeholder || "Enter URL",
4741
- required: v.required,
4742
- className: `w-full ${x(y) ? "border-red-500" : ""}`
4737
+ value: N[g.key] || "",
4738
+ onChange: (k) => v(x, k.target.value),
4739
+ placeholder: g.placeholder || "Enter URL",
4740
+ required: g.required,
4741
+ className: `w-full ${w(x) ? "border-red-500" : ""}`
4743
4742
  }
4744
4743
  ),
4745
- C(y)
4744
+ z(x)
4746
4745
  ] });
4747
4746
  case "password":
4748
- return (N, y) => /* @__PURE__ */ n("div", { children: [
4747
+ return (N, x) => /* @__PURE__ */ n("div", { children: [
4749
4748
  /* @__PURE__ */ e(
4750
4749
  X,
4751
4750
  {
4752
4751
  type: "password",
4753
- value: N[v.key] || "",
4754
- onChange: (k) => g(y, k.target.value),
4755
- placeholder: v.placeholder || "Enter password",
4756
- required: v.required,
4757
- className: `w-full ${x(y) ? "border-red-500" : ""}`
4752
+ value: N[g.key] || "",
4753
+ onChange: (k) => v(x, k.target.value),
4754
+ placeholder: g.placeholder || "Enter password",
4755
+ required: g.required,
4756
+ className: `w-full ${w(x) ? "border-red-500" : ""}`
4758
4757
  }
4759
4758
  ),
4760
- C(y)
4759
+ z(x)
4761
4760
  ] });
4762
4761
  case "select":
4763
4762
  case "dropdown":
4764
- return (N, y) => /* @__PURE__ */ n("div", { children: [
4763
+ return (N, x) => /* @__PURE__ */ n("div", { children: [
4765
4764
  /* @__PURE__ */ e(
4766
4765
  ft,
4767
4766
  {
4768
- value: N[v.key] || "",
4769
- onChange: (k) => g(y, k),
4770
- options: v.options || [],
4771
- placeholder: v.placeholder || `Select ${v.label}`,
4772
- required: v.required,
4773
- className: `w-full ${x(y) ? "border-red-500" : ""}`
4767
+ value: N[g.key] || "",
4768
+ onChange: (k) => v(x, k),
4769
+ options: g.options || [],
4770
+ placeholder: g.placeholder || `Select ${g.label}`,
4771
+ required: g.required,
4772
+ className: `w-full ${w(x) ? "border-red-500" : ""}`
4774
4773
  }
4775
4774
  ),
4776
- C(y)
4775
+ z(x)
4777
4776
  ] });
4778
4777
  case "selectDynamic":
4779
- return (N, y) => {
4778
+ return (N, x) => {
4780
4779
  const k = () => {
4781
- if (v.optionsFrom && a) {
4782
- const { config: F, valueField: M, labelField: U } = v.optionsFrom, S = a[F] || [];
4780
+ if (g.optionsFrom && a) {
4781
+ const { config: F, valueField: L, labelField: U } = g.optionsFrom, S = a[F] || [];
4783
4782
  if (Array.isArray(S))
4784
4783
  return S.map((O) => ({
4785
- id: O[M] || "",
4786
- value: O[M] || "",
4784
+ id: O[L] || "",
4785
+ value: O[L] || "",
4787
4786
  label: O[U] || ""
4788
4787
  }));
4789
4788
  }
4790
- return v.options || [];
4789
+ return g.options || [];
4791
4790
  };
4792
4791
  return /* @__PURE__ */ n("div", { children: [
4793
4792
  /* @__PURE__ */ e(
4794
4793
  ft,
4795
4794
  {
4796
- index: y,
4797
- value: N[v.key] || "",
4798
- onChange: (F) => g(y, F),
4795
+ index: x,
4796
+ value: N[g.key] || "",
4797
+ onChange: (F) => v(x, F),
4799
4798
  options: k(),
4800
- placeholder: v.placeholder || `Select ${v.label}`,
4801
- required: v.required,
4802
- className: `w-full ${x(y) ? "border-red-500" : ""}`
4799
+ placeholder: g.placeholder || `Select ${g.label}`,
4800
+ required: g.required,
4801
+ className: `w-full ${w(x) ? "border-red-500" : ""}`
4803
4802
  },
4804
4803
  Math.random()
4805
4804
  ),
4806
- C(y)
4805
+ z(x)
4807
4806
  ] });
4808
4807
  };
4809
4808
  case "multiselect":
4810
- return (N, y) => {
4811
- const k = N[v.key] || [];
4809
+ return (N, x) => {
4810
+ const k = N[g.key] || [];
4812
4811
  return /* @__PURE__ */ e(
4813
4812
  nt,
4814
4813
  {
4815
4814
  selectedItems: k,
4816
- onSelectionChange: (F) => g(y, F),
4817
- options: v.options || [],
4818
- placeholder: v.placeholder || `Select ${v.label}`,
4815
+ onSelectionChange: (F) => v(x, F),
4816
+ options: g.options || [],
4817
+ placeholder: g.placeholder || `Select ${g.label}`,
4819
4818
  className: "w-full"
4820
4819
  }
4821
4820
  );
4822
4821
  };
4823
4822
  case "checkbox":
4824
4823
  case "boolean":
4825
- return (N, y) => /* @__PURE__ */ e(
4824
+ return (N, x) => /* @__PURE__ */ e(
4826
4825
  ma,
4827
4826
  {
4828
- checked: !!N[v.key],
4829
- onChange: (k) => g(y, k),
4830
- label: v.placeholder || v.label,
4827
+ checked: !!N[g.key],
4828
+ onChange: (k) => v(x, k),
4829
+ label: g.placeholder || g.label,
4831
4830
  className: "w-full"
4832
4831
  }
4833
4832
  );
4834
4833
  case "toggle":
4835
4834
  case "switch":
4836
- return (N, y) => /* @__PURE__ */ e(
4835
+ return (N, x) => /* @__PURE__ */ e(
4837
4836
  va,
4838
4837
  {
4839
- isOn: !!N[v.key],
4840
- onToggle: (k) => g(y, k),
4841
- label: v.placeholder || v.label,
4838
+ isOn: !!N[g.key],
4839
+ onToggle: (k) => v(x, k),
4840
+ label: g.placeholder || g.label,
4842
4841
  className: "w-full"
4843
4842
  }
4844
4843
  );
4845
4844
  case "date":
4846
- return (N, y) => /* @__PURE__ */ e(
4845
+ return (N, x) => /* @__PURE__ */ e(
4847
4846
  ga,
4848
4847
  {
4849
- selectedDate: N[v.key] ? new Date(N[v.key]) : null,
4850
- onDateChange: (k) => g(y, k ? k.toISOString().split("T")[0] : ""),
4851
- placeholder: v.placeholder || "Select date",
4848
+ selectedDate: N[g.key] ? new Date(N[g.key]) : null,
4849
+ onDateChange: (k) => v(x, k ? k.toISOString().split("T")[0] : ""),
4850
+ placeholder: g.placeholder || "Select date",
4852
4851
  className: "w-full"
4853
4852
  }
4854
4853
  );
4855
4854
  case "datetime":
4856
- return (N, y) => /* @__PURE__ */ e(
4855
+ return (N, x) => /* @__PURE__ */ e(
4857
4856
  X,
4858
4857
  {
4859
4858
  type: "datetime-local",
4860
- value: N[v.key] || "",
4861
- onChange: (k) => g(y, k.target.value),
4862
- placeholder: v.placeholder || "Select date and time",
4863
- required: v.required,
4859
+ value: N[g.key] || "",
4860
+ onChange: (k) => v(x, k.target.value),
4861
+ placeholder: g.placeholder || "Select date and time",
4862
+ required: g.required,
4864
4863
  className: "w-full"
4865
4864
  }
4866
4865
  );
4867
4866
  case "time":
4868
- return (N, y) => /* @__PURE__ */ e(
4867
+ return (N, x) => /* @__PURE__ */ e(
4869
4868
  X,
4870
4869
  {
4871
4870
  type: "time",
4872
- value: N[v.key] || "",
4873
- onChange: (k) => g(y, k.target.value),
4874
- placeholder: v.placeholder || "Select time",
4875
- required: v.required,
4871
+ value: N[g.key] || "",
4872
+ onChange: (k) => v(x, k.target.value),
4873
+ placeholder: g.placeholder || "Select time",
4874
+ required: g.required,
4876
4875
  className: "w-full"
4877
4876
  }
4878
4877
  );
4879
4878
  case "radio":
4880
- return (N, y) => /* @__PURE__ */ e(
4879
+ return (N, x) => /* @__PURE__ */ e(
4881
4880
  ba,
4882
4881
  {
4883
- selectedValue: N[v.key] || "",
4884
- onValueChange: (k) => g(y, k),
4885
- options: v.options || [],
4882
+ selectedValue: N[g.key] || "",
4883
+ onValueChange: (k) => v(x, k),
4884
+ options: g.options || [],
4886
4885
  className: "w-full"
4887
4886
  }
4888
4887
  );
4889
4888
  case "search":
4890
- return (N, y) => /* @__PURE__ */ e(
4889
+ return (N, x) => /* @__PURE__ */ e(
4891
4890
  be,
4892
4891
  {
4893
- value: N[v.key] || "",
4894
- onChange: (k) => g(y, k),
4895
- placeholder: v.placeholder || `Search ${v.label}`,
4892
+ value: N[g.key] || "",
4893
+ onChange: (k) => v(x, k),
4894
+ placeholder: g.placeholder || `Search ${g.label}`,
4896
4895
  className: "w-full"
4897
4896
  }
4898
4897
  );
4899
4898
  case "audience":
4900
- return (N, y) => {
4901
- const k = N[v.key] || { users: [], groups: [], roles: [] }, F = [
4899
+ return (N, x) => {
4900
+ const k = N[g.key] || { users: [], groups: [], roles: [] }, F = [
4902
4901
  ...k.users || [],
4903
4902
  ...k.groups || [],
4904
4903
  ...k.roles || []
4905
4904
  ];
4906
4905
  return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
4907
- /* @__PURE__ */ e(vs, { children: F.length > 0 ? F.slice(0, 3).map((M, U) => /* @__PURE__ */ e(
4906
+ /* @__PURE__ */ e(vs, { children: F.length > 0 ? F.slice(0, 3).map((L, U) => /* @__PURE__ */ e(
4908
4907
  ze,
4909
4908
  {
4910
4909
  size: "small",
4911
- name: M.name || M.displayName || M.id,
4912
- src: M.avatarUrl
4910
+ name: L.name || L.displayName || L.id,
4911
+ src: L.avatarUrl
4913
4912
  },
4914
4913
  U
4915
4914
  )) : null }),
@@ -4918,7 +4917,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4918
4917
  {
4919
4918
  className: "text-blue-600 font-semibold hover:text-blue-800",
4920
4919
  onClick: () => {
4921
- b(v.key), u(y);
4920
+ b(g.key), u(x);
4922
4921
  },
4923
4922
  children: F.length > 0 ? "Edit" : "Assign"
4924
4923
  }
@@ -4926,112 +4925,112 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4926
4925
  ] });
4927
4926
  };
4928
4927
  case "color":
4929
- return (N, y) => /* @__PURE__ */ e(
4928
+ return (N, x) => /* @__PURE__ */ e(
4930
4929
  X,
4931
4930
  {
4932
4931
  type: "color",
4933
- value: N[v.key] || "#000000",
4934
- onChange: (k) => g(y, k.target.value),
4932
+ value: N[g.key] || "#000000",
4933
+ onChange: (k) => v(x, k.target.value),
4935
4934
  className: "w-full h-10"
4936
4935
  }
4937
4936
  );
4938
4937
  case "range":
4939
- return (N, y) => /* @__PURE__ */ n("div", { className: "w-full", children: [
4938
+ return (N, x) => /* @__PURE__ */ n("div", { className: "w-full", children: [
4940
4939
  /* @__PURE__ */ e(
4941
4940
  X,
4942
4941
  {
4943
4942
  type: "range",
4944
- value: N[v.key] || v.min || 0,
4945
- onChange: (k) => g(y, k.target.value),
4946
- min: v.min || 0,
4947
- max: v.max || 100,
4948
- step: v.step || 1,
4943
+ value: N[g.key] || g.min || 0,
4944
+ onChange: (k) => v(x, k.target.value),
4945
+ min: g.min || 0,
4946
+ max: g.max || 100,
4947
+ step: g.step || 1,
4949
4948
  className: "w-full"
4950
4949
  }
4951
4950
  ),
4952
- /* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: N[v.key] || v.min || 0 })
4951
+ /* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: N[g.key] || g.min || 0 })
4953
4952
  ] });
4954
4953
  case "file":
4955
- return (N, y) => /* @__PURE__ */ e(
4954
+ return (N, x) => /* @__PURE__ */ e(
4956
4955
  X,
4957
4956
  {
4958
4957
  type: "file",
4959
4958
  onChange: (k) => {
4960
4959
  const F = k.target.files[0];
4961
- g(y, F ? F.name : "");
4960
+ v(x, F ? F.name : "");
4962
4961
  },
4963
- accept: v.accept,
4962
+ accept: g.accept,
4964
4963
  className: "w-full"
4965
4964
  }
4966
4965
  );
4967
4966
  case "hidden":
4968
- return (N, y) => /* @__PURE__ */ e(
4967
+ return (N, x) => /* @__PURE__ */ e(
4969
4968
  X,
4970
4969
  {
4971
4970
  type: "hidden",
4972
- value: N[v.key] || "",
4973
- onChange: (k) => g(y, k.target.value)
4971
+ value: N[g.key] || "",
4972
+ onChange: (k) => v(x, k.target.value)
4974
4973
  }
4975
4974
  );
4976
4975
  // Default fallback for unknown field types
4977
4976
  default:
4978
- return (N, y) => /* @__PURE__ */ n("div", { children: [
4977
+ return (N, x) => /* @__PURE__ */ n("div", { children: [
4979
4978
  /* @__PURE__ */ e(
4980
4979
  X,
4981
4980
  {
4982
- value: N[v.key] || "",
4983
- onChange: (k) => g(y, k.target.value),
4984
- placeholder: v.placeholder || `Enter ${v.label}`,
4985
- required: v.required,
4986
- className: `w-full ${x(y) ? "border-red-500" : ""}`
4981
+ value: N[g.key] || "",
4982
+ onChange: (k) => v(x, k.target.value),
4983
+ placeholder: g.placeholder || `Enter ${g.label}`,
4984
+ required: g.required,
4985
+ className: `w-full ${w(x) ? "border-red-500" : ""}`
4987
4986
  }
4988
4987
  ),
4989
- C(y)
4988
+ z(x)
4990
4989
  ] });
4991
4990
  }
4992
- }, $ = ae(() => {
4993
- console.log("[DataTableRenderer] Adding blank row"), r((v) => {
4994
- console.log("[DataTableRenderer] Current data before add:", v);
4995
- const g = {
4996
- id: v.length
4991
+ }, T = ae(() => {
4992
+ console.log("[DataTableRenderer] Adding blank row"), r((g) => {
4993
+ console.log("[DataTableRenderer] Current data before add:", g);
4994
+ const v = {
4995
+ id: g.length
4997
4996
  // Assign next available ID
4998
4997
  };
4999
- l.fields.forEach((C) => {
5000
- C.fieldtype === "audience" ? g[C.key] = { users: [], groups: [], roles: [] } : g[C.key] = C.default || "";
5001
- }), console.log("[DataTableRenderer] New blank row:", g);
5002
- const x = [...v, g];
5003
- return console.log("[DataTableRenderer] Updated data:", x), x;
4998
+ l.fields.forEach((z) => {
4999
+ z.fieldtype === "audience" ? v[z.key] = { users: [], groups: [], roles: [] } : v[z.key] = z.default || "";
5000
+ }), console.log("[DataTableRenderer] New blank row:", v);
5001
+ const w = [...g, v];
5002
+ return console.log("[DataTableRenderer] Updated data:", w), w;
5004
5003
  });
5005
- }, [l.fields]), A = ae((v) => {
5006
- r((g) => {
5007
- if (g.length <= 1)
5008
- return g;
5009
- const x = [...g];
5010
- return x.splice(v, 1), x;
5004
+ }, [l.fields]), A = ae((g) => {
5005
+ r((v) => {
5006
+ if (v.length <= 1)
5007
+ return v;
5008
+ const w = [...v];
5009
+ return w.splice(g, 1), w;
5011
5010
  });
5012
- }, []), [E, I] = L(null), j = ae((v, g) => {
5013
- I(g), v.dataTransfer.effectAllowed = "move", v.dataTransfer.setData("text/html", "");
5014
- }, []), V = ae((v) => {
5015
- v.preventDefault(), v.dataTransfer.dropEffect = "move";
5016
- }, []), G = ae((v, g) => {
5017
- v.preventDefault(), !(E === null || E === g) && (r((x) => {
5018
- const C = [...x], N = C[E];
5019
- return C.splice(E, 1), C.splice(g, 0, N), C;
5011
+ }, []), [E, I] = M(null), j = ae((g, v) => {
5012
+ I(v), g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("text/html", "");
5013
+ }, []), _ = ae((g) => {
5014
+ g.preventDefault(), g.dataTransfer.dropEffect = "move";
5015
+ }, []), G = ae((g, v) => {
5016
+ g.preventDefault(), !(E === null || E === v) && (r((w) => {
5017
+ const z = [...w], N = z[E];
5018
+ return z.splice(E, 1), z.splice(v, 0, N), z;
5020
5019
  }), I(null));
5021
5020
  }, [E]), q = ae(() => {
5022
5021
  I(null);
5023
- }, []), T = ae((v) => {
5024
- console.log("[DataTableRenderer] handleAddAudience called with:", v), r((g) => {
5025
- const x = [...g];
5026
- if (o !== null && p && x[o]) {
5027
- const C = v.pendingInvites || [], N = C.filter((F) => F.type === "User"), y = C.filter((F) => F.type === "Group"), k = C.filter((F) => F.type === "Role");
5028
- x[o][p] = {
5029
- users: [...x[o][p]?.users || [], ...N],
5030
- groups: [...x[o][p]?.groups || [], ...y],
5031
- roles: [...x[o][p]?.roles || [], ...k]
5032
- }, console.log("[DataTableRenderer] Updated audience data:", x[o][p]);
5022
+ }, []), C = ae((g) => {
5023
+ console.log("[DataTableRenderer] handleAddAudience called with:", g), r((v) => {
5024
+ const w = [...v];
5025
+ if (o !== null && p && w[o]) {
5026
+ const z = g.pendingInvites || [], N = z.filter((F) => F.type === "User"), x = z.filter((F) => F.type === "Group"), k = z.filter((F) => F.type === "Role");
5027
+ w[o][p] = {
5028
+ users: [...w[o][p]?.users || [], ...N],
5029
+ groups: [...w[o][p]?.groups || [], ...x],
5030
+ roles: [...w[o][p]?.roles || [], ...k]
5031
+ }, console.log("[DataTableRenderer] Updated audience data:", w[o][p]);
5033
5032
  }
5034
- return x;
5033
+ return w;
5035
5034
  }), u(null), b(null);
5036
5035
  }, [o, p]);
5037
5036
  return /* @__PURE__ */ n("div", { children: [
@@ -5042,7 +5041,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5042
5041
  "button",
5043
5042
  {
5044
5043
  className: "btn btn-primary text-white px-6 py-2 rounded-2xl cursor-pointer hover:bg-gray-800",
5045
- onClick: $,
5044
+ onClick: T,
5046
5045
  children: "Add"
5047
5046
  }
5048
5047
  )
@@ -5052,32 +5051,32 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5052
5051
  /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ n("table", { className: "min-w-full bg-white border border-gray-300", style: { marginBottom: "20px" }, children: [
5053
5052
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { className: "bg-gray-50", children: [
5054
5053
  /* @__PURE__ */ e("th", { className: "px-4 py-2 w-10" }),
5055
- l.fields.map((v, g) => /* @__PURE__ */ e(
5054
+ l.fields.map((g, v) => /* @__PURE__ */ e(
5056
5055
  "th",
5057
5056
  {
5058
5057
  className: "px-4 py-2 text-left text-sm font-medium text-gray-700",
5059
- children: v.label || v.key
5058
+ children: g.label || g.key
5060
5059
  },
5061
- g
5060
+ v
5062
5061
  )),
5063
5062
  /* @__PURE__ */ e("th", { className: "px-4 py-2 w-16" })
5064
5063
  ] }) }),
5065
- /* @__PURE__ */ e("tbody", { children: f.map((v, g) => /* @__PURE__ */ n(
5064
+ /* @__PURE__ */ e("tbody", { children: f.map((g, v) => /* @__PURE__ */ n(
5066
5065
  "tr",
5067
5066
  {
5068
- className: `hover:bg-gray-50 ${E === g ? "opacity-50" : ""}`,
5067
+ className: `hover:bg-gray-50 ${E === v ? "opacity-50" : ""}`,
5069
5068
  draggable: !0,
5070
- onDragStart: (x) => j(x, g),
5071
- onDragOver: V,
5072
- onDrop: (x) => G(x, g),
5069
+ onDragStart: (w) => j(w, v),
5070
+ onDragOver: _,
5071
+ onDrop: (w) => G(w, v),
5073
5072
  onDragEnd: q,
5074
5073
  children: [
5075
5074
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e("div", { className: "cursor-move text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ e(Nt, { size: 16 }) }) }),
5076
- l.fields.map((x, C) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: z(x)(v, g) }, C)),
5075
+ l.fields.map((w, z) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: $(w)(g, v) }, z)),
5077
5076
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
5078
5077
  "button",
5079
5078
  {
5080
- onClick: () => A(g),
5079
+ onClick: () => A(v),
5081
5080
  className: "text-red-500 hover:text-red-700",
5082
5081
  title: "Delete row",
5083
5082
  children: /* @__PURE__ */ e(vr, { size: 16 })
@@ -5085,24 +5084,24 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5085
5084
  ) })
5086
5085
  ]
5087
5086
  },
5088
- g
5087
+ v
5089
5088
  )) })
5090
5089
  ] }) }),
5091
5090
  o !== null && (() => {
5092
- const v = f[o] && f[o][p] ? {
5091
+ const g = f[o] && f[o][p] ? {
5093
5092
  users: f[o][p].users || [],
5094
5093
  groups: f[o][p].groups || [],
5095
5094
  roles: f[o][p].roles || []
5096
5095
  } : { users: [], groups: [], roles: [] };
5097
- return console.log("[DataTableRenderer] Opening modal with existing data:", v), console.log("[DataTableRenderer] Row data:", f[o]), console.log("[DataTableRenderer] Field name:", p), /* @__PURE__ */ e(
5096
+ return console.log("[DataTableRenderer] Opening modal with existing data:", g), console.log("[DataTableRenderer] Row data:", f[o]), console.log("[DataTableRenderer] Field name:", p), /* @__PURE__ */ e(
5098
5097
  os,
5099
5098
  {
5100
5099
  isOpen: !0,
5101
5100
  onClose: () => {
5102
5101
  u(null), b(null);
5103
5102
  },
5104
- onFinalSubmit: T,
5105
- existingShares: v,
5103
+ onFinalSubmit: C,
5104
+ existingShares: g,
5106
5105
  allowedPermissions: ["view", "remove"]
5107
5106
  }
5108
5107
  );
@@ -5176,7 +5175,7 @@ const Mt = () => {
5176
5175
  initialData: p = null
5177
5176
  // Add prop for initial demo data
5178
5177
  }) => {
5179
- const [b, f] = L(null), [r, w] = L(""), [d, h] = L(() => Array.isArray(p) ? p : []), [z, $] = L(null), [A, E] = L(null), [I, j] = L(""), V = async () => {
5178
+ const [b, f] = M(null), [r, y] = M(""), [d, h] = M(() => Array.isArray(p) ? p : []), [$, T] = M(null), [A, E] = M(null), [I, j] = M(""), _ = async () => {
5180
5179
  try {
5181
5180
  const S = await Ve(t.collectionList);
5182
5181
  if (S) {
@@ -5191,12 +5190,12 @@ const Mt = () => {
5191
5190
  }
5192
5191
  };
5193
5192
  Z(() => {
5194
- (!p || p.length === 0) && V();
5193
+ (!p || p.length === 0) && _();
5195
5194
  }, [p]), Z(() => {
5196
5195
  Array.isArray(p) && h(p);
5197
5196
  }, [p]);
5198
5197
  const G = (S) => {
5199
- m && (f(S.id), w(S.categoryName || ""));
5198
+ m && (f(S.id), y(S.categoryName || ""));
5200
5199
  }, q = () => {
5201
5200
  if (!l || b !== null) return;
5202
5201
  const S = `temp-${Date.now()}`;
@@ -5209,13 +5208,13 @@ const Mt = () => {
5209
5208
  order: (O.at(-1)?.order ?? 0) + 1,
5210
5209
  _temp: !0
5211
5210
  }
5212
- ]), f(S), w("");
5213
- }, T = () => {
5211
+ ]), f(S), y("");
5212
+ }, C = () => {
5214
5213
  b != null && (h((S) => {
5215
5214
  const O = S.find((P) => P.id === b), D = O && O._temp ? S.filter((P) => P.id !== b) : S;
5216
5215
  return s?.(D), D;
5217
- }), f(null), w(""));
5218
- }, v = async () => {
5216
+ }), f(null), y(""));
5217
+ }, g = async () => {
5219
5218
  if (b == null || !r.trim()) return;
5220
5219
  const S = typeof b == "string" && b.startsWith("temp-");
5221
5220
  try {
@@ -5225,7 +5224,7 @@ const Mt = () => {
5225
5224
  order: (Array.isArray(d) && d.length > 0 ? d.at(-1)?.order ?? 0 : 0) + 1
5226
5225
  });
5227
5226
  O && (h((D) => {
5228
- const P = D.map((_) => _.id === b ? O : _);
5227
+ const P = D.map((V) => V.id === b ? O : V);
5229
5228
  return s?.(P), P;
5230
5229
  }), De.success("Collection created successfully"));
5231
5230
  } else {
@@ -5234,29 +5233,29 @@ const Mt = () => {
5234
5233
  );
5235
5234
  h((D) => {
5236
5235
  const P = D.map(
5237
- (_) => _.id === b ? O && O.id ? { ..._, ...O } : { ..._, categoryName: r.trim() } : _
5236
+ (V) => V.id === b ? O && O.id ? { ...V, ...O } : { ...V, categoryName: r.trim() } : V
5238
5237
  );
5239
5238
  return s?.(P), P;
5240
5239
  }), me.success("Collection updated successfully");
5241
5240
  }
5242
- f(null), w("");
5241
+ f(null), y("");
5243
5242
  } catch (O) {
5244
5243
  console.log(O), me.error("Failed to save collection");
5245
5244
  }
5246
- }, g = async (S) => {
5245
+ }, v = async (S) => {
5247
5246
  if (o)
5248
5247
  try {
5249
- await Qn(`${t.collectionUpdate}/${S.id}`) && (me.success("Deleted successfully", { autoClose: 3e3 }), V());
5248
+ await Qn(`${t.collectionUpdate}/${S.id}`) && (me.success("Deleted successfully", { autoClose: 3e3 }), _());
5250
5249
  } catch (O) {
5251
5250
  console.log(O), me.error("Failed to delete collection");
5252
5251
  }
5253
- }, x = (S, O, D) => {
5252
+ }, w = (S, O, D) => {
5254
5253
  if (!u || !O || !D || O === D) return S;
5255
- const P = S.findIndex((W) => W.id === O), _ = S.findIndex((W) => W.id === D);
5256
- if (P === -1 || _ === -1) return S;
5254
+ const P = S.findIndex((W) => W.id === O), V = S.findIndex((W) => W.id === D);
5255
+ if (P === -1 || V === -1) return S;
5257
5256
  const R = [...S], [Y] = R.splice(P, 1);
5258
- return R.splice(_, 0, Y), R.map((W, pe) => ({ ...W, order: pe + 1 }));
5259
- }, C = async (S) => {
5257
+ return R.splice(V, 0, Y), R.map((W, pe) => ({ ...W, order: pe + 1 }));
5258
+ }, z = async (S) => {
5260
5259
  const O = S.map((D) => ({
5261
5260
  id: D.id,
5262
5261
  order: D.order,
@@ -5268,20 +5267,20 @@ const Mt = () => {
5268
5267
  console.log(D), me.error("Failed to save order", { autoClose: 2500 });
5269
5268
  }
5270
5269
  }, N = (S, O) => {
5271
- u && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", String(O)), $(O));
5272
- }, y = (S) => {
5273
- z && S !== A && E(S);
5270
+ u && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", String(O)), T(O));
5271
+ }, x = (S) => {
5272
+ $ && S !== A && E(S);
5274
5273
  }, k = (S) => {
5275
5274
  S.preventDefault();
5276
5275
  }, F = async (S, O) => {
5277
5276
  S.preventDefault();
5278
5277
  const D = S.dataTransfer.getData("text/plain");
5279
5278
  D && (h((P) => {
5280
- const _ = x(P, D, O);
5281
- return console.log("Reordered", _), C(_), s?.(_), _;
5282
- }), $(null), E(null));
5283
- }, M = () => {
5284
- $(null), E(null);
5279
+ const V = w(P, D, O);
5280
+ return console.log("Reordered", V), z(V), s?.(V), V;
5281
+ }), T(null), E(null));
5282
+ }, L = () => {
5283
+ T(null), E(null);
5285
5284
  }, U = Array.isArray(d) ? d.filter(
5286
5285
  (S) => S.categoryName?.toLowerCase().includes(I.toLowerCase())
5287
5286
  ) : [];
@@ -5310,18 +5309,18 @@ const Mt = () => {
5310
5309
  )
5311
5310
  ] }) }),
5312
5311
  /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: U.map((S) => {
5313
- const O = b === S.id, D = S?.links?.length ?? 0, P = z === S.id, _ = A === S.id && z !== S.id;
5312
+ const O = b === S.id, D = S?.links?.length ?? 0, P = $ === S.id, V = A === S.id && $ !== S.id;
5314
5313
  return /* @__PURE__ */ e(
5315
5314
  "div",
5316
5315
  {
5317
- onDragEnter: () => y(S.id),
5316
+ onDragEnter: () => x(S.id),
5318
5317
  onDragOver: k,
5319
5318
  onDrop: (R) => F(R, S.id),
5320
- onDragEnd: M,
5319
+ onDragEnd: L,
5321
5320
  className: [
5322
5321
  "flex items-center justify-between p-3 border rounded-2xl mb-3",
5323
5322
  "border-gray-300",
5324
- _ ? "ring-2 ring-gray-800/20" : "",
5323
+ V ? "ring-2 ring-gray-800/20" : "",
5325
5324
  P ? "opacity-60" : ""
5326
5325
  ].join(" "),
5327
5326
  children: O ? /* @__PURE__ */ n(te, { children: [
@@ -5332,9 +5331,9 @@ const Mt = () => {
5332
5331
  className: "flex-1 h-10 px-3 max-w-[200px] border border-gray-300 rounded-2xl outline-none focus:ring-2 focus:ring-gray-800/20",
5333
5332
  value: r,
5334
5333
  placeholder: S._temp ? "New collection name" : "Edit collection name",
5335
- onChange: (R) => w(R.target.value),
5334
+ onChange: (R) => y(R.target.value),
5336
5335
  onKeyDown: (R) => {
5337
- R.key === "Enter" && v(), R.key === "Escape" && T();
5336
+ R.key === "Enter" && g(), R.key === "Escape" && C();
5338
5337
  },
5339
5338
  autoFocus: !0
5340
5339
  }
@@ -5344,7 +5343,7 @@ const Mt = () => {
5344
5343
  "button",
5345
5344
  {
5346
5345
  className: "cursor-pointer border border-gray-300 p-2 rounded-2xl",
5347
- onClick: T,
5346
+ onClick: C,
5348
5347
  "aria-label": "Cancel edit",
5349
5348
  children: /* @__PURE__ */ e(ge, { color: "#767676" })
5350
5349
  }
@@ -5356,7 +5355,7 @@ const Mt = () => {
5356
5355
  "border p-2 rounded-2xl",
5357
5356
  r.trim() ? "cursor-pointer border-gray-300" : "cursor-not-allowed border-gray-200"
5358
5357
  ].join(" "),
5359
- onClick: v,
5358
+ onClick: g,
5360
5359
  "aria-label": "Save",
5361
5360
  disabled: !r.trim(),
5362
5361
  title: r.trim() ? "Save" : "Name required",
@@ -5395,7 +5394,7 @@ const Mt = () => {
5395
5394
  {
5396
5395
  className: D === 0 && !S.protected ? "cursor-pointer" : "cursor-not-allowed",
5397
5396
  title: D === 0 && !S.protected ? "Delete" : "Cannot delete this collection",
5398
- onClick: D === 0 ? () => g(S) : null,
5397
+ onClick: D === 0 ? () => v(S) : null,
5399
5398
  children: /* @__PURE__ */ e(Ke, { color: D === 0 ? "#767676" : "#C2C2C2" })
5400
5399
  }
5401
5400
  )
@@ -5417,7 +5416,7 @@ const Mt = () => {
5417
5416
  allowEdit: b = !0,
5418
5417
  allowDelete: f = !0,
5419
5418
  allowReorder: r = !0,
5420
- className: w = ""
5419
+ className: y = ""
5421
5420
  } = t, d = a?.[t.key] || o || [], h = Array.isArray(d) ? d : [];
5422
5421
  return /* @__PURE__ */ n("div", { className: "dynamic-config-manage-collection-list", children: [
5423
5422
  (i || l) && /* @__PURE__ */ n("div", { className: "mb-4", children: [
@@ -5429,9 +5428,9 @@ const Mt = () => {
5429
5428
  {
5430
5429
  endpoints: m,
5431
5430
  initialData: h,
5432
- className: w,
5433
- onCollectionChange: ($) => {
5434
- s && s(t.key, $);
5431
+ className: y,
5432
+ onCollectionChange: (T) => {
5433
+ s && s(t.key, T);
5435
5434
  },
5436
5435
  showSearch: u,
5437
5436
  allowAdd: p,
@@ -5464,53 +5463,53 @@ function Ss({
5464
5463
  onCancel: i,
5465
5464
  onSave: l
5466
5465
  }) {
5467
- const [m, o] = re.useState(a), [u, p] = re.useState(null), [b, f] = L(!1), [r, w] = L(!1), [d, h] = L({}), z = `${Se()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, $ = z, [A, E] = L(1), I = (x) => {
5466
+ const [m, o] = se.useState(a), [u, p] = se.useState(null), [b, f] = M(!1), [r, y] = M(!1), [d, h] = M({}), $ = `${Se()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, T = $, [A, E] = M(1), I = (w) => {
5468
5467
  if (!a || !a.configuration)
5469
- return x;
5470
- const C = {}, N = x?.configuration || {};
5471
- return a.configuration.forEach((y) => {
5472
- if (y.key && y.type === "datatable") {
5473
- const F = (N[y.key] || []).map((M, U) => {
5474
- const S = { id: M.id || 0 };
5475
- return y.fields && y.fields.forEach((O) => {
5468
+ return w;
5469
+ const z = {}, N = w?.configuration || {};
5470
+ return a.configuration.forEach((x) => {
5471
+ if (x.key && x.type === "datatable") {
5472
+ const F = (N[x.key] || []).map((L, U) => {
5473
+ const S = { id: L.id || 0 };
5474
+ return x.fields && x.fields.forEach((O) => {
5476
5475
  if (O.fieldtype === "audience") {
5477
5476
  let D = { users: [], groups: [], roles: [] };
5478
- M[O.key] && (Array.isArray(M[O.key]) ? D = { users: [], groups: [], roles: [] } : typeof M[O.key] == "object" && (D = {
5479
- users: M[O.key].users || [],
5480
- groups: M[O.key].groups || [],
5481
- roles: M[O.key].roles || []
5477
+ L[O.key] && (Array.isArray(L[O.key]) ? D = { users: [], groups: [], roles: [] } : typeof L[O.key] == "object" && (D = {
5478
+ users: L[O.key].users || [],
5479
+ groups: L[O.key].groups || [],
5480
+ roles: L[O.key].roles || []
5482
5481
  })), S[O.key] = D;
5483
5482
  } else
5484
- S[O.key] = M[O.key] || O.default || "";
5483
+ S[O.key] = L[O.key] || O.default || "";
5485
5484
  }), S;
5486
5485
  });
5487
5486
  if (F.length === 0) {
5488
- const M = { id: 0 };
5489
- y.fields && y.fields.forEach((U) => {
5490
- U.fieldtype === "audience" ? M[U.key] = { users: [], groups: [], roles: [] } : M[U.key] = U.default || "";
5491
- }), F.push(M);
5487
+ const L = { id: 0 };
5488
+ x.fields && x.fields.forEach((U) => {
5489
+ U.fieldtype === "audience" ? L[U.key] = { users: [], groups: [], roles: [] } : L[U.key] = U.default || "";
5490
+ }), F.push(L);
5492
5491
  }
5493
- C[y.key] = F;
5494
- } else y.key && (C[y.key] = N[y.key] || {});
5495
- }), C;
5492
+ z[x.key] = F;
5493
+ } else x.key && (z[x.key] = N[x.key] || {});
5494
+ }), z;
5496
5495
  }, j = () => {
5497
5496
  if (a && a.configuration) {
5498
- const x = {};
5499
- a.configuration.forEach((C) => {
5500
- if (C.key)
5501
- if (C.type === "datatable") {
5497
+ const w = {};
5498
+ a.configuration.forEach((z) => {
5499
+ if (z.key)
5500
+ if (z.type === "datatable") {
5502
5501
  const N = { id: 0 };
5503
- C.fields && C.fields.forEach((y) => {
5504
- y.fieldtype === "audience" ? N[y.key] = { users: [], groups: [], roles: [] } : N[y.key] = y.default || "";
5505
- }), x[C.key] = [N];
5506
- } else if (C.type === "section") {
5502
+ z.fields && z.fields.forEach((x) => {
5503
+ x.fieldtype === "audience" ? N[x.key] = { users: [], groups: [], roles: [] } : N[x.key] = x.default || "";
5504
+ }), w[z.key] = [N];
5505
+ } else if (z.type === "section") {
5507
5506
  const N = {};
5508
- C.fields && Array.isArray(C.fields) && C.fields.forEach((y) => {
5509
- y.key && (N[y.key] = y.default || "");
5510
- }), x[C.key] = N;
5507
+ z.fields && Array.isArray(z.fields) && z.fields.forEach((x) => {
5508
+ x.key && (N[x.key] = x.default || "");
5509
+ }), w[z.key] = N;
5511
5510
  } else
5512
- x[C.key] = {};
5513
- }), p(x);
5511
+ w[z.key] = {};
5512
+ }), p(w);
5514
5513
  }
5515
5514
  };
5516
5515
  Z(() => {
@@ -5518,120 +5517,120 @@ function Ss({
5518
5517
  f(!1);
5519
5518
  return;
5520
5519
  }
5521
- const x = async () => {
5520
+ const w = async () => {
5522
5521
  try {
5523
5522
  f(!0);
5524
- let C = await Ve(z);
5525
- if (C) {
5526
- const N = I(C);
5523
+ let z = await Ve($);
5524
+ if (z) {
5525
+ const N = I(z);
5527
5526
  p(N);
5528
5527
  } else
5529
5528
  j();
5530
- } catch (C) {
5531
- console.error("Error fetching configuration:", C);
5529
+ } catch (z) {
5530
+ console.error("Error fetching configuration:", z);
5532
5531
  let N = "Failed to load configuration";
5533
- if (C.response) {
5534
- const y = C.response.status, k = C.response.data?.message || C.response.data?.error;
5535
- y === 400 ? N = k || "Invalid request. Please check the application ID." : y === 401 ? N = "You are not authorized to access this configuration." : y === 403 ? N = "Access denied. You don't have permission to view this configuration." : y === 404 ? N = "Configuration not found. It may not exist yet or the application ID is incorrect." : y >= 500 ? N = k || "Server error. Please try again later." : N = k || `Failed to load configuration (Error ${y})`;
5536
- } else C.request ? N = "Network error. Please check your connection and try again." : N = C.message || "An unexpected error occurred while loading configuration.";
5532
+ if (z.response) {
5533
+ const x = z.response.status, k = z.response.data?.message || z.response.data?.error;
5534
+ x === 400 ? N = k || "Invalid request. Please check the application ID." : x === 401 ? N = "You are not authorized to access this configuration." : x === 403 ? N = "Access denied. You don't have permission to view this configuration." : x === 404 ? N = "Configuration not found. It may not exist yet or the application ID is incorrect." : x >= 500 ? N = k || "Server error. Please try again later." : N = k || `Failed to load configuration (Error ${x})`;
5535
+ } else z.request ? N = "Network error. Please check your connection and try again." : N = z.message || "An unexpected error occurred while loading configuration.";
5537
5536
  De.error(N), j();
5538
5537
  } finally {
5539
5538
  f(!1);
5540
5539
  }
5541
5540
  };
5542
- a && (o(a), t ? x() : j());
5541
+ a && (o(a), t ? w() : j());
5543
5542
  }, [a, A, t, s]);
5544
- const V = (x, C) => {
5543
+ const _ = (w, z) => {
5545
5544
  p((N) => ({
5546
5545
  ...N,
5547
- [x]: C
5546
+ [w]: z
5548
5547
  })), h((N) => {
5549
- const y = { ...N };
5550
- return y[x] && delete y[x], y;
5548
+ const x = { ...N };
5549
+ return x[w] && delete x[w], x;
5551
5550
  });
5552
5551
  }, G = () => {
5553
- const x = {};
5554
- return !m || !u || m.configuration.forEach((C) => {
5555
- if (C.type === "section")
5556
- C.fields.forEach((N) => {
5552
+ const w = {};
5553
+ return !m || !u || m.configuration.forEach((z) => {
5554
+ if (z.type === "section")
5555
+ z.fields.forEach((N) => {
5557
5556
  if (N.required) {
5558
- const y = u[C.key]?.[N.key];
5559
- (!y || typeof y == "string" && y.trim() === "") && (x[C.key] || (x[C.key] = {}), x[C.key][N.key] = `${N.label} is required`);
5557
+ const x = u[z.key]?.[N.key];
5558
+ (!x || typeof x == "string" && x.trim() === "") && (w[z.key] || (w[z.key] = {}), w[z.key][N.key] = `${N.label} is required`);
5560
5559
  }
5561
5560
  });
5562
- else if (C.type === "datatable") {
5563
- const N = u[C.key];
5564
- Array.isArray(N) && N.forEach((y, k) => {
5565
- C.fields.forEach((F) => {
5561
+ else if (z.type === "datatable") {
5562
+ const N = u[z.key];
5563
+ Array.isArray(N) && N.forEach((x, k) => {
5564
+ z.fields.forEach((F) => {
5566
5565
  if (F.required) {
5567
- const M = y[F.key];
5568
- (!M || typeof M == "string" && M.trim() === "") && (x[C.key] || (x[C.key] = {}), x[C.key][k] || (x[C.key][k] = {}), x[C.key][k][F.key] = `${F.label} is required`);
5566
+ const L = x[F.key];
5567
+ (!L || typeof L == "string" && L.trim() === "") && (w[z.key] || (w[z.key] = {}), w[z.key][k] || (w[z.key][k] = {}), w[z.key][k][F.key] = `${F.label} is required`);
5569
5568
  }
5570
5569
  });
5571
5570
  });
5572
5571
  }
5573
- }), x;
5574
- }, q = (x) => Object.keys(x).length > 0, T = () => {
5575
- const x = G();
5576
- if (h(x), q(x)) {
5572
+ }), w;
5573
+ }, q = (w) => Object.keys(w).length > 0, C = () => {
5574
+ const w = G();
5575
+ if (h(w), q(w)) {
5577
5576
  let N = [];
5578
- Object.keys(x).forEach((y) => {
5579
- typeof x[y] == "object" && Object.keys(x[y]).forEach((k) => {
5580
- typeof x[y][k] == "object" ? Object.keys(x[y][k]).forEach((F) => {
5581
- N.push(`${y} row ${parseInt(k) + 1}: ${x[y][k][F]}`);
5582
- }) : N.push(`${y}: ${x[y][k]}`);
5577
+ Object.keys(w).forEach((x) => {
5578
+ typeof w[x] == "object" && Object.keys(w[x]).forEach((k) => {
5579
+ typeof w[x][k] == "object" ? Object.keys(w[x][k]).forEach((F) => {
5580
+ N.push(`${x} row ${parseInt(k) + 1}: ${w[x][k][F]}`);
5581
+ }) : N.push(`${x}: ${w[x][k]}`);
5583
5582
  });
5584
5583
  });
5585
5584
  return;
5586
5585
  }
5587
5586
  (async () => {
5588
5587
  try {
5589
- w(!0);
5588
+ y(!0);
5590
5589
  const N = {};
5591
5590
  u && Object.keys(u).forEach((k) => {
5592
5591
  const F = a?.configuration?.find(
5593
- (M) => M.key === k && M.type === "datatable"
5592
+ (L) => L.key === k && L.type === "datatable"
5594
5593
  );
5595
- F && Array.isArray(u[k]) ? N[k] = u[k].map((M) => {
5596
- const U = { id: M.id || 0 };
5594
+ F && Array.isArray(u[k]) ? N[k] = u[k].map((L) => {
5595
+ const U = { id: L.id || 0 };
5597
5596
  return F.fields && F.fields.forEach((S) => {
5598
5597
  if (S.fieldtype === "audience") {
5599
5598
  let O = { users: [], groups: [], roles: [] };
5600
- M[S.key] && typeof M[S.key] == "object" && !Array.isArray(M[S.key]) && (O = {
5601
- users: M[S.key].users || [],
5602
- groups: M[S.key].groups || [],
5603
- roles: M[S.key].roles || []
5599
+ L[S.key] && typeof L[S.key] == "object" && !Array.isArray(L[S.key]) && (O = {
5600
+ users: L[S.key].users || [],
5601
+ groups: L[S.key].groups || [],
5602
+ roles: L[S.key].roles || []
5604
5603
  }), U[S.key] = O;
5605
5604
  } else
5606
- U[S.key] = M[S.key] || "";
5605
+ U[S.key] = L[S.key] || "";
5607
5606
  }), U;
5608
5607
  }) : N[k] = u[k];
5609
5608
  });
5610
- let y = await _e($, N);
5611
- if (console.log(), y && y.status != "fail") {
5609
+ let x = await _e(T, N);
5610
+ if (console.log(), x && x.status != "fail") {
5612
5611
  h({});
5613
- const k = y.message || "Configuration has been saved successfully";
5612
+ const k = x.message || "Configuration has been saved successfully";
5614
5613
  De.success(k), l && typeof l == "function" && l(u);
5615
5614
  } else
5616
- throw De.error(y?.message || "Failed to save configuration"), new Error("No response received from server");
5615
+ throw De.error(x?.message || "Failed to save configuration"), new Error("No response received from server");
5617
5616
  } catch (N) {
5618
5617
  console.error("Error saving configuration:", N), De.error(N?.message || "Failed to save configuration");
5619
5618
  } finally {
5620
- w(!1);
5619
+ y(!1);
5621
5620
  }
5622
5621
  })();
5623
- }, v = () => {
5622
+ }, g = () => {
5624
5623
  if (i) {
5625
5624
  i();
5626
5625
  return;
5627
5626
  }
5628
5627
  d && Object.keys(d).length > 0 && !window.confirm(
5629
5628
  "You have validation errors that will be lost. Are you sure you want to cancel?"
5630
- ) || (h({}), p(null), E((C) => C + 1), De.info("Configuration changes cancelled"));
5629
+ ) || (h({}), p(null), E((z) => z + 1), De.info("Configuration changes cancelled"));
5631
5630
  };
5632
5631
  if (!m?.configuration && !a?.configuration)
5633
5632
  return /* @__PURE__ */ e("div", { className: "min-h-screen flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "text-gray-500", children: "No configuration available" }) });
5634
- const g = a?.configuration || m?.configuration;
5633
+ const v = a?.configuration || m?.configuration;
5635
5634
  return Z(() => {
5636
5635
  s && a ? (!u || Object.keys(u).length === 0) && j() : s && !a && j();
5637
5636
  }, [s, a]), /* @__PURE__ */ n("div", { children: [
@@ -5642,18 +5641,18 @@ function Ss({
5642
5641
  style: { padding: "0px 20px 0px 0px" },
5643
5642
  children: [
5644
5643
  b && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(xa, { size: "large" }) }),
5645
- !b && g?.map((x, C) => {
5646
- const N = zs(x.type);
5644
+ !b && v?.map((w, z) => {
5645
+ const N = zs(w.type);
5647
5646
  if (N && N !== "UnknownType")
5648
5647
  return /* @__PURE__ */ e(
5649
5648
  N,
5650
5649
  {
5651
- item: x,
5650
+ item: w,
5652
5651
  data: u,
5653
- updateHandler: V,
5652
+ updateHandler: _,
5654
5653
  validationErrors: d
5655
5654
  },
5656
- C
5655
+ z
5657
5656
  );
5658
5657
  })
5659
5658
  ]
@@ -5664,7 +5663,7 @@ function Ss({
5664
5663
  ee,
5665
5664
  {
5666
5665
  category: "secondary",
5667
- onClick: v,
5666
+ onClick: g,
5668
5667
  label: "Cancel",
5669
5668
  disabled: r
5670
5669
  }
@@ -5673,7 +5672,7 @@ function Ss({
5673
5672
  ee,
5674
5673
  {
5675
5674
  category: "primary",
5676
- onClick: T,
5675
+ onClick: C,
5677
5676
  disabled: r,
5678
5677
  label: r ? "Saving..." : "Apply",
5679
5678
  type: "submit"
@@ -5687,32 +5686,32 @@ const Ql = ({
5687
5686
  appid: a = "Configuration-Page",
5688
5687
  disableApi: s = !1
5689
5688
  }) => {
5690
- const [i, l] = L(0), [m, o] = L(!1), [u, p] = L(a), {
5691
- pageHeader: b = {},
5692
- appletHeader: f = {},
5693
- breadcrumb: r = [],
5694
- overview: w = {},
5695
- configuration: d = []
5696
- } = t, h = d.map((g) => {
5697
- if (g.type === "section" && g.fields) {
5698
- const x = [...g.fields], C = x.findIndex((N) => N.key === "appkey");
5699
- if (C !== -1) {
5700
- const N = x[C];
5701
- if (x[C] = {
5702
- ...N,
5689
+ const [i, l] = M(0), [m, o] = M(!1), {
5690
+ pageHeader: u = {},
5691
+ appletHeader: p = {},
5692
+ breadcrumb: b = [],
5693
+ overview: f = {},
5694
+ configuration: r = []
5695
+ } = t, y = r.map((C) => {
5696
+ if (C.type === "section" && C.fields) {
5697
+ const g = [...C.fields], v = g.findIndex((w) => w.key === "appkey");
5698
+ if (v !== -1) {
5699
+ const w = g[v];
5700
+ if (g[v] = {
5701
+ ...w,
5703
5702
  default: a,
5704
5703
  value: a,
5705
5704
  disabled: !0,
5706
5705
  placeholder: a
5707
- }, x.some((k) => k.key === "displayname")) {
5708
- const k = x.findIndex((F) => F.key === "displayname");
5709
- x[k] = {
5710
- ...x[k],
5711
- default: a,
5712
- value: a
5706
+ }, g.some((N) => N.key === "displayname")) {
5707
+ const N = g.findIndex((k) => k.key === "displayname"), x = g[N] || {};
5708
+ g[N] = {
5709
+ ...x,
5710
+ default: x.default || x.value || a,
5711
+ placeholder: x.placeholder || "Enter display name"
5713
5712
  };
5714
5713
  } else {
5715
- const k = {
5714
+ const N = {
5716
5715
  key: "displayname",
5717
5716
  label: "Display Name",
5718
5717
  fieldtype: "text",
@@ -5721,52 +5720,46 @@ const Ql = ({
5721
5720
  placeholder: "Enter display name",
5722
5721
  required: !1
5723
5722
  };
5724
- x.splice(C + 1, 0, k);
5723
+ g.splice(v + 1, 0, N);
5725
5724
  }
5726
5725
  }
5727
5726
  return {
5728
- ...g,
5729
- fields: x
5727
+ ...C,
5728
+ fields: g
5730
5729
  };
5731
5730
  }
5732
- return g;
5733
- }), z = {
5731
+ return C;
5732
+ }), d = {
5734
5733
  heading: "App Details",
5735
5734
  subHeading: "View app details and customize configurations to align with institutional requirements.",
5736
5735
  isLeftArrow: !0,
5737
5736
  onBackClick: () => window.history.back(),
5738
- ...b
5739
- }, $ = r.map((g) => ({
5740
- label: g.text,
5741
- href: g.href || "#"
5742
- })), A = ae(() => {
5737
+ ...u
5738
+ }, h = b.map((C) => ({
5739
+ label: C.text,
5740
+ href: C.href || "#"
5741
+ })), $ = ae(() => {
5743
5742
  console.log("handleCancelRequest called - showing modal"), o(!0);
5744
- }, []), E = ae((g) => {
5745
- o(!1), g.primary ? (console.log("User confirmed cancel - navigating back"), window.history.back()) : console.log("User cancelled the cancel action - modal closed, data preserved");
5746
- }, []), I = () => {
5747
- for (const g of h)
5748
- if (g.type === "section" && g.fields) {
5749
- const x = g.fields.find((C) => C.key === "displayname");
5750
- if (x)
5751
- return x.default || x.value || a;
5752
- }
5753
- return a;
5754
- };
5755
- re.useEffect(() => {
5756
- p(I());
5757
- }, [h]);
5758
- const j = ae((g) => {
5759
- console.log("Config saved with data:", g), Object.keys(g).forEach((x) => {
5760
- const C = g[x];
5761
- console.log(`Checking section ${x}:`, C), C && C.displayname && (console.log("Found displayname:", C.displayname), p(C.displayname));
5762
- });
5763
- }, []), V = {
5743
+ }, []), T = ae((C) => {
5744
+ o(!1), C.primary ? (console.log("User confirmed cancel - navigating back"), window.history.back()) : console.log("User cancelled the cancel action - modal closed, data preserved");
5745
+ }, []), A = ae((C) => {
5746
+ console.log("Configuration changed:", C);
5747
+ }, []), E = (() => {
5748
+ if (Array.isArray(r)) {
5749
+ for (const C of r)
5750
+ if (C && C.fields) {
5751
+ const g = C.fields.find((v) => v && v.key === "displayname");
5752
+ if (g) return g.default ?? g.value ?? a;
5753
+ }
5754
+ }
5755
+ return p.heading || a;
5756
+ })(), I = {
5764
5757
  subHeading: "Application configuration and details",
5765
5758
  tags: [],
5766
- ...f,
5767
- heading: u
5768
- // Ensure displayname always overrides config heading
5769
- }, G = {
5759
+ ...p,
5760
+ heading: E
5761
+ // Use resolvedDisplayName only
5762
+ }, j = {
5770
5763
  about: "This application provides comprehensive functionality for your organization.",
5771
5764
  images: {
5772
5765
  desktop: "https://via.placeholder.com/600x400?text=Desktop+View",
@@ -5783,25 +5776,25 @@ const Ql = ({
5783
5776
  description: "Description of feature 2"
5784
5777
  }
5785
5778
  ],
5786
- ...w
5787
- }, q = [
5788
- { label: "Overview", content: v(G) },
5789
- { label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: { configuration: h }, disableApi: s, onCancel: A, onSave: j }) }
5779
+ ...f
5780
+ }, _ = [
5781
+ { label: "Overview", content: q(j) },
5782
+ { label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: { configuration: y }, disableApi: s, onCancel: $, onSave: A }) }
5790
5783
  ];
5791
- function T(g) {
5792
- return g ? g.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: g } }) : g : "📱";
5784
+ function G(C) {
5785
+ return C ? C.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: C } }) : C : "📱";
5793
5786
  }
5794
- function v(g) {
5787
+ function q(C) {
5795
5788
  return /* @__PURE__ */ n("div", { className: "bg-white rounded-2xl p-1", children: [
5796
5789
  /* @__PURE__ */ n("section", { className: "mb-8", children: [
5797
5790
  /* @__PURE__ */ e("h2", { className: "text-xl font-semibold mb-2", children: "About" }),
5798
- /* @__PURE__ */ e("p", { className: "text-gray-700 text-base", children: g.about })
5791
+ /* @__PURE__ */ e("p", { className: "text-gray-700 text-base", children: C.about })
5799
5792
  ] }),
5800
5793
  /* @__PURE__ */ n("section", { className: "flex flex-row gap-6 justify-center items-center mb-8", children: [
5801
5794
  /* @__PURE__ */ e(
5802
5795
  "img",
5803
5796
  {
5804
- src: g.images.desktop,
5797
+ src: C.images.desktop,
5805
5798
  alt: "Desktop View",
5806
5799
  className: "rounded-xl border border-gray-200 w-[340px] h-[220px] object-cover"
5807
5800
  }
@@ -5809,7 +5802,7 @@ const Ql = ({
5809
5802
  /* @__PURE__ */ e(
5810
5803
  "img",
5811
5804
  {
5812
- src: g.images.mobile1,
5805
+ src: C.images.mobile1,
5813
5806
  alt: "Mobile View 1",
5814
5807
  className: "rounded-2xl border border-gray-200 w-[120px] h-[220px] object-cover"
5815
5808
  }
@@ -5817,7 +5810,7 @@ const Ql = ({
5817
5810
  /* @__PURE__ */ e(
5818
5811
  "img",
5819
5812
  {
5820
- src: g.images.mobile2,
5813
+ src: C.images.mobile2,
5821
5814
  alt: "Mobile View 2",
5822
5815
  className: "rounded-2xl border border-gray-200 w-[120px] h-[220px] object-cover"
5823
5816
  }
@@ -5825,11 +5818,11 @@ const Ql = ({
5825
5818
  ] }),
5826
5819
  /* @__PURE__ */ n("section", { children: [
5827
5820
  /* @__PURE__ */ e("h3", { className: "text-lg font-semibold mb-4", children: "Key Features" }),
5828
- /* @__PURE__ */ e("ul", { className: "space-y-3", children: g.features.map((x, C) => /* @__PURE__ */ n("li", { children: [
5829
- /* @__PURE__ */ e("span", { className: "font-semibold", children: x.title }),
5821
+ /* @__PURE__ */ e("ul", { className: "space-y-3", children: C.features.map((g, v) => /* @__PURE__ */ n("li", { children: [
5822
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: g.title }),
5830
5823
  /* @__PURE__ */ e("br", {}),
5831
- /* @__PURE__ */ e("span", { className: "text-gray-700", children: x.description })
5832
- ] }, C)) })
5824
+ /* @__PURE__ */ e("span", { className: "text-gray-700", children: g.description })
5825
+ ] }, v)) })
5833
5826
  ] })
5834
5827
  ] });
5835
5828
  }
@@ -5837,45 +5830,45 @@ const Ql = ({
5837
5830
  /* @__PURE__ */ e(
5838
5831
  Vn,
5839
5832
  {
5840
- heading: z.heading,
5841
- subHeading: $.length > 0 ? void 0 : z.subHeading,
5842
- breadcrumbItems: $,
5843
- isLeftArrow: z.isLeftArrow,
5844
- onBackClick: z.onBackClick
5833
+ heading: d.heading,
5834
+ subHeading: h.length > 0 ? void 0 : d.subHeading,
5835
+ breadcrumbItems: h,
5836
+ isLeftArrow: d.isLeftArrow,
5837
+ onBackClick: d.onBackClick
5845
5838
  }
5846
5839
  ),
5847
5840
  /* @__PURE__ */ n("div", { className: "bg-[#ffffff] border border-[#eef2f6] rounded-[12px] px-6 py-5 flex gap-4 items-start mb-4 shadow-sm", children: [
5848
- /* @__PURE__ */ e("div", { className: "icon w-[72px] h-[72px] rounded-full flex items-center justify-center bg-[#F5F5F6] text-[#1C274C] font-bold text-[18px]", children: T(V.icon) }),
5841
+ /* @__PURE__ */ e("div", { className: "icon w-[72px] h-[72px] rounded-full flex items-center justify-center bg-[#F5F5F6] text-[#1C274C] font-bold text-[18px]", children: G(I.icon) }),
5849
5842
  /* @__PURE__ */ n("div", { className: "flex flex-col min-w-0", children: [
5850
- /* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: V.heading }),
5851
- /* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: V.subHeading }),
5852
- /* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: V.tags && V.tags.map((g, x) => /* @__PURE__ */ e(
5843
+ /* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: I.heading }),
5844
+ /* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: I.subHeading }),
5845
+ /* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: I.tags && I.tags.map((C, g) => /* @__PURE__ */ e(
5853
5846
  "span",
5854
5847
  {
5855
5848
  className: "pill inline-block px-[10px] py-[6px] rounded-[14px] text-[11px] border border-[#e6e9ee] text-[#767676] font-semibold mt-1",
5856
- children: g
5849
+ children: C
5857
5850
  },
5858
- x
5851
+ g
5859
5852
  )) })
5860
5853
  ] })
5861
5854
  ] }),
5862
5855
  /* @__PURE__ */ n("div", { className: "bg-white border border-gray-300 rounded-2xl w-full mt-5 ", children: [
5863
- /* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: q.map((g, x) => /* @__PURE__ */ e(
5856
+ /* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: _.map((C, g) => /* @__PURE__ */ e(
5864
5857
  "button",
5865
5858
  {
5866
- onClick: () => l(x),
5867
- className: `${i === x ? "border-black text-black" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"} whitespace-nowrap py-3 px-6 border-b-2 font-medium text-sm transition-colors duration-200`,
5868
- children: g.label
5859
+ onClick: () => l(g),
5860
+ className: `${i === g ? "border-black text-black" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"} whitespace-nowrap py-3 px-6 border-b-2 font-medium text-sm transition-colors duration-200`,
5861
+ children: C.label
5869
5862
  },
5870
- x
5863
+ g
5871
5864
  )) }) }),
5872
- /* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: q[i].content })
5865
+ /* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: _[i].content })
5873
5866
  ] }),
5874
5867
  /* @__PURE__ */ e(
5875
5868
  Pn,
5876
5869
  {
5877
5870
  isOpen: m,
5878
- onClose: E,
5871
+ onClose: T,
5879
5872
  variant: "warning",
5880
5873
  title: "Are you sure you want to cancel?",
5881
5874
  primaryButtonText: "Proceed",
@@ -5927,12 +5920,12 @@ const Kl = ({
5927
5920
  showColumnChooser: b = !0,
5928
5921
  showFilter: f = !1,
5929
5922
  showPrint: r = !1,
5930
- showExcel: w = !1,
5923
+ showExcel: y = !1,
5931
5924
  showPdf: d = !1,
5932
5925
  showRefresh: h = !1,
5933
- showAdd: z = !1,
5926
+ showAdd: $ = !1,
5934
5927
  // Additional props
5935
- searchPlaceholder: $ = "Search...",
5928
+ searchPlaceholder: T = "Search...",
5936
5929
  handleRefreshClick: A = () => {
5937
5930
  },
5938
5931
  handleSearchChange: E = () => {
@@ -5941,19 +5934,19 @@ const Kl = ({
5941
5934
  excelFileName: I,
5942
5935
  pdfFileName: j
5943
5936
  }) => {
5944
- const V = () => l?.current || i?.current, [G, q] = re.useState(""), T = (t || "export").toString().trim() || "export", v = `${I || T}.xlsx`, g = `${j || T}.pdf`, x = (y, k, F) => Math.max(k, Math.min(y, F)), C = ae(
5945
- (y) => {
5946
- const k = V();
5937
+ const _ = () => l?.current || i?.current, [G, q] = se.useState(""), C = (t || "export").toString().trim() || "export", g = `${I || C}.xlsx`, v = `${j || C}.pdf`, w = (x, k, F) => Math.max(k, Math.min(x, F)), z = ae(
5938
+ (x) => {
5939
+ const k = _();
5947
5940
  if (console.log("openColumnChooserNear", k), !!k?.openColumnChooser) {
5948
- if (typeof window > "u" || !y?.currentTarget) {
5941
+ if (typeof window > "u" || !x?.currentTarget) {
5949
5942
  k.openColumnChooser();
5950
5943
  return;
5951
5944
  }
5952
5945
  try {
5953
- const F = y.currentTarget.getBoundingClientRect(), M = F.left + window.scrollX, U = F.bottom + window.scrollY;
5954
- let S = M - 120, O = U - 120;
5946
+ const F = x.currentTarget.getBoundingClientRect(), L = F.left + window.scrollX, U = F.bottom + window.scrollY;
5947
+ let S = L - 120, O = U - 120;
5955
5948
  const D = window.innerWidth, P = window.innerHeight;
5956
- S = x(S, window.scrollX + 8, window.scrollX + D - 340), O = x(O, window.scrollY, window.scrollY + P - 120), console.log("openColumnChooserNear", S, O), k.openColumnChooser(S, O);
5949
+ S = w(S, window.scrollX + 8, window.scrollX + D - 340), O = w(O, window.scrollY, window.scrollY + P - 120), console.log("openColumnChooserNear", S, O), k.openColumnChooser(S, O);
5957
5950
  } catch (F) {
5958
5951
  console.log("coloumn choose error", F);
5959
5952
  }
@@ -5962,28 +5955,28 @@ const Kl = ({
5962
5955
  []
5963
5956
  // no external deps; reads ref at call time
5964
5957
  ), N = ae(
5965
- (y, k) => {
5966
- const F = V();
5958
+ (x, k) => {
5959
+ const F = _();
5967
5960
  if (F)
5968
- switch (y) {
5961
+ switch (x) {
5969
5962
  case "ColumnChooser":
5970
- b && (console.log("openColumnChooser", k), k ? C(k) : F.openColumnChooser?.()), console.log("openColumnChooser out", k);
5963
+ b && (console.log("openColumnChooser", k), k ? z(k) : F.openColumnChooser?.()), console.log("openColumnChooser out", k);
5971
5964
  break;
5972
5965
  case "Print":
5973
5966
  r && F.print?.();
5974
5967
  break;
5975
5968
  case "Excel":
5976
- w && F.excelExport?.({ fileName: v });
5969
+ y && F.excelExport?.({ fileName: g });
5977
5970
  break;
5978
5971
  case "Pdf":
5979
- d && F.pdfExport?.({ fileName: g });
5972
+ d && F.pdfExport?.({ fileName: v });
5980
5973
  break;
5981
5974
  case "Refresh":
5982
5975
  h && A();
5983
5976
  break;
5984
5977
  }
5985
5978
  },
5986
- [b, r, w, d, h, v, g, A, C]
5979
+ [b, r, y, d, h, g, v, A, z]
5987
5980
  );
5988
5981
  return /* @__PURE__ */ n("div", { className: "flex items-center flex-wrap justify-between w-full px-4 py-2 bg-white border border-gray-200 rounded-t-2xl mb-0", children: [
5989
5982
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
@@ -5998,10 +5991,10 @@ const Kl = ({
5998
5991
  p && /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
5999
5992
  be,
6000
5993
  {
6001
- placeholder: $,
5994
+ placeholder: T,
6002
5995
  value: G,
6003
- onDebouncedChange: (y) => {
6004
- q(y), E(y);
5996
+ onDebouncedChange: (x) => {
5997
+ q(x), E(x);
6005
5998
  }
6006
5999
  }
6007
6000
  ) }),
@@ -6011,7 +6004,7 @@ const Kl = ({
6011
6004
  ee,
6012
6005
  {
6013
6006
  icon: Nr,
6014
- onClick: (y) => N("ColumnChooser", y),
6007
+ onClick: (x) => N("ColumnChooser", x),
6015
6008
  size: "small",
6016
6009
  ariaLabel: "Column Chooser",
6017
6010
  category: "secondary",
@@ -6040,7 +6033,7 @@ const Kl = ({
6040
6033
  title: "Print Grid"
6041
6034
  }
6042
6035
  ),
6043
- w && /* @__PURE__ */ e(
6036
+ y && /* @__PURE__ */ e(
6044
6037
  ee,
6045
6038
  {
6046
6039
  icon: zr,
@@ -6048,7 +6041,7 @@ const Kl = ({
6048
6041
  ariaLabel: "Excel Download",
6049
6042
  size: "small",
6050
6043
  category: "secondary",
6051
- title: `Export Excel (${v})`
6044
+ title: `Export Excel (${g})`
6052
6045
  }
6053
6046
  ),
6054
6047
  d && /* @__PURE__ */ e(
@@ -6059,7 +6052,7 @@ const Kl = ({
6059
6052
  ariaLabel: "PDF Download",
6060
6053
  size: "small",
6061
6054
  category: "secondary",
6062
- title: `Export PDF (${g})`
6055
+ title: `Export PDF (${v})`
6063
6056
  }
6064
6057
  ),
6065
6058
  h && /* @__PURE__ */ e(
@@ -6074,7 +6067,7 @@ const Kl = ({
6074
6067
  }
6075
6068
  )
6076
6069
  ] }),
6077
- z && m && /* @__PURE__ */ e(
6070
+ $ && m && /* @__PURE__ */ e(
6078
6071
  ee,
6079
6072
  {
6080
6073
  label: u,
@@ -6104,28 +6097,28 @@ function ei(t) {
6104
6097
  allowReordering: b = !0,
6105
6098
  allowResizing: f = !0,
6106
6099
  allowExcelExport: r = !1,
6107
- allowPdfExport: w = !1,
6100
+ allowPdfExport: y = !1,
6108
6101
  showColumnChooser: d = !1,
6109
6102
  enableSearchApi: h = !1,
6110
- height: z = "600",
6111
- selectionSettings: $ = { type: "Multiple", mode: "Row" },
6103
+ height: $ = "600",
6104
+ selectionSettings: T = { type: "Multiple", mode: "Row" },
6112
6105
  enableCheckbox: A = !1,
6113
6106
  columns: E = [],
6114
6107
  onGridStateChange: I,
6115
6108
  onRowSelected: j,
6116
- onRowDeselected: V,
6109
+ onRowDeselected: _,
6117
6110
  onRowDoubleClick: G,
6118
6111
  apiRef: q,
6119
- gridProps: T = {}
6120
- } = t, v = xe(null), {
6121
- pageSettings: g,
6122
- sortSettings: x,
6123
- ...C
6124
- } = T || {}, [N, y] = re.useState(g?.page || 1), [k, F] = re.useState(x?.pageSize || 20), [M, U] = re.useState(x?.sortKey || "updatedDate"), [S, O] = re.useState(x?.direction || "Descending"), D = ue(() => {
6112
+ gridProps: C = {}
6113
+ } = t, g = xe(null), {
6114
+ pageSettings: v,
6115
+ sortSettings: w,
6116
+ ...z
6117
+ } = C || {}, [N, x] = se.useState(v?.page || 1), [k, F] = se.useState(w?.pageSize || 20), [L, U] = se.useState(w?.sortKey || "updatedDate"), [S, O] = se.useState(w?.direction || "Descending"), D = ue(() => {
6125
6118
  const B = [cn];
6126
- return o && B.push(dn), u && B.push(mn), p && B.push(un), h && B.push(hn), r && B.push(pn), w && B.push(gn), d && B.push(bn), f && B.push(fn), b && B.push(xn), B.push(yn), B;
6127
- }, [o, u, p, h, r, w, d, f, b]), P = ue(() => {
6128
- const B = () => v.current, ne = (J, we) => {
6119
+ return o && B.push(dn), u && B.push(mn), p && B.push(un), h && B.push(hn), r && B.push(pn), y && B.push(gn), d && B.push(bn), f && B.push(fn), b && B.push(xn), B.push(yn), B;
6120
+ }, [o, u, p, h, r, y, d, f, b]), P = ue(() => {
6121
+ const B = () => g.current, re = (J, we) => {
6129
6122
  !we && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${J} requested but related service/feature is disabled.`);
6130
6123
  };
6131
6124
  return {
@@ -6136,17 +6129,17 @@ function ei(t) {
6136
6129
  selectRow: (J) => B()?.selectRow?.(J),
6137
6130
  selectRows: (J) => B()?.selectRows?.(J),
6138
6131
  search: (J) => {
6139
- ne("search()", h), B()?.search?.(J);
6132
+ re("search()", h), B()?.search?.(J);
6140
6133
  },
6141
6134
  print: () => B()?.print?.(),
6142
6135
  excelExport: (J) => {
6143
- ne("excelExport()", r), B()?.excelExport?.(J);
6136
+ re("excelExport()", r), B()?.excelExport?.(J);
6144
6137
  },
6145
6138
  pdfExport: (J) => {
6146
- ne("pdfExport()", w), B()?.pdfExport?.(J);
6139
+ re("pdfExport()", y), B()?.pdfExport?.(J);
6147
6140
  },
6148
6141
  openColumnChooser: (J, we) => {
6149
- ne("openColumnChooser()", d), B()?.columnChooserModule?.openColumnChooser?.(J, we);
6142
+ re("openColumnChooser()", d), B()?.columnChooserModule?.openColumnChooser?.(J, we);
6150
6143
  }
6151
6144
  };
6152
6145
  }, []);
@@ -6155,14 +6148,14 @@ function ei(t) {
6155
6148
  }, [q, P]), Z(() => () => {
6156
6149
  q && (q.current = null);
6157
6150
  }, []);
6158
- const _ = (B) => {
6159
- const ne = String(B || "");
6160
- return ne === "Ascending" || ne === "Descending" ? ne : ne.toLowerCase() === "ascending" ? "Ascending" : "Descending";
6151
+ const V = (B) => {
6152
+ const re = String(B || "");
6153
+ return re === "Ascending" || re === "Descending" ? re : re.toLowerCase() === "ascending" ? "Ascending" : "Descending";
6161
6154
  }, R = (B) => {
6162
- const ne = v.current, J = B?.requestType, we = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Ie = B?.pageSize ?? ne?.pageSettings?.pageSize ?? k, Ue = B?.currentPage ?? ne?.pageSettings?.currentPage ?? l, st = B?.columnName && B?.direction ? [{ field: B.columnName, dir: _(B.direction) }] : (ne?.sortSettings?.columns || []).map((Oe) => ({
6155
+ const re = g.current, J = B?.requestType, we = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Ie = B?.pageSize ?? re?.pageSettings?.pageSize ?? k, Ue = B?.currentPage ?? re?.pageSettings?.currentPage ?? l, st = B?.columnName && B?.direction ? [{ field: B.columnName, dir: V(B.direction) }] : (re?.sortSettings?.columns || []).map((Oe) => ({
6163
6156
  field: Oe.field,
6164
- dir: _(Oe.direction ?? Oe.dir)
6165
- })), lt = B?.searchString ?? "", it = B?.columns ?? ne?.filterSettings?.columns ?? [];
6157
+ dir: V(Oe.direction ?? Oe.dir)
6158
+ })), lt = B?.searchString ?? "", it = B?.columns ?? re?.filterSettings?.columns ?? [];
6166
6159
  return {
6167
6160
  reason: we,
6168
6161
  page: { index: Ue, size: Ie, skip: (Ue - 1) * Ie, take: Ie },
@@ -6174,13 +6167,13 @@ function ei(t) {
6174
6167
  };
6175
6168
  }, Y = (B) => {
6176
6169
  setTimeout(() => {
6177
- v?.current?.hideSpinner();
6178
- }, 1e3), B.requestType === "paging" && (y(B.currentPage), F(B.pageSize)), B.requestType === "sorting" && (U(B.columnName || "updatedDate"), O(B.direction === "Ascending" ? "ASC" : "DESC")), I && I(R(B), B);
6170
+ g?.current?.hideSpinner();
6171
+ }, 1e3), B.requestType === "paging" && (x(B.currentPage), F(B.pageSize)), B.requestType === "sorting" && (U(B.columnName || "updatedDate"), O(B.direction === "Ascending" ? "ASC" : "DESC")), I && I(R(B), B);
6179
6172
  }, W = (B) => {
6180
6173
  typeof G == "function" && G(B?.rowData, B);
6181
6174
  }, pe = () => {
6182
6175
  const B = [];
6183
- return A && B.push(/* @__PURE__ */ e(Dt, { type: "checkbox", width: "50" }, "__checkbox__")), E.forEach((ne, J) => {
6176
+ return A && B.push(/* @__PURE__ */ e(Dt, { type: "checkbox", width: "50" }, "__checkbox__")), E.forEach((re, J) => {
6184
6177
  const {
6185
6178
  field: we,
6186
6179
  headerText: Ie,
@@ -6198,7 +6191,7 @@ function ei(t) {
6198
6191
  maxWidth: ja,
6199
6192
  customAttributes: Va,
6200
6193
  ..._a
6201
- } = ne || {};
6194
+ } = re || {};
6202
6195
  B.push(
6203
6196
  /* @__PURE__ */ e(
6204
6197
  Dt,
@@ -6229,12 +6222,12 @@ function ei(t) {
6229
6222
  vn,
6230
6223
  {
6231
6224
  id: i,
6232
- ref: v,
6225
+ ref: g,
6233
6226
  dataSource: {
6234
6227
  result: a,
6235
6228
  count: s
6236
6229
  },
6237
- height: z,
6230
+ height: $,
6238
6231
  allowPaging: m,
6239
6232
  allowSorting: o,
6240
6233
  allowFiltering: u,
@@ -6242,17 +6235,17 @@ function ei(t) {
6242
6235
  allowReordering: b,
6243
6236
  allowResizing: f,
6244
6237
  showColumnChooser: d,
6245
- selectionSettings: $,
6246
- pageSettings: { pageSize: 10, pageSizes: g?.pageSizes ?? [20, 40, 60, 80, 100] },
6247
- sortSettings: x ?? {
6248
- columns: [{ field: M, direction: _(S) }],
6238
+ selectionSettings: T,
6239
+ pageSettings: { pageSize: 10, pageSizes: v?.pageSizes ?? [20, 40, 60, 80, 100] },
6240
+ sortSettings: w ?? {
6241
+ columns: [{ field: L, direction: V(S) }],
6249
6242
  allowUnsort: !1
6250
6243
  },
6251
6244
  actionBegin: Y,
6252
6245
  rowSelected: j,
6253
- rowDeselected: V,
6246
+ rowDeselected: _,
6254
6247
  recordDoubleClick: W,
6255
- ...C,
6248
+ ...z,
6256
6249
  children: [
6257
6250
  /* @__PURE__ */ e(wn, { children: pe() }),
6258
6251
  /* @__PURE__ */ e(Nn, { services: D })
@@ -6294,10 +6287,10 @@ function ie({
6294
6287
  details: o = {},
6295
6288
  ...u
6296
6289
  }) {
6297
- const p = Qe(), b = Ds(u, m), f = (w) => {
6290
+ const p = Qe(), b = Ds(u, m), f = (y) => {
6298
6291
  l?.({
6299
6292
  key: b,
6300
- checked: w.target.checked,
6293
+ checked: y.target.checked,
6301
6294
  details: o,
6302
6295
  props: u
6303
6296
  });
@@ -6345,7 +6338,7 @@ function $s({
6345
6338
  imageUrl: f = "https://images.unsplash.com/photo-1469980098053-382eb10ba017?q=80&w=1200&auto=format&fit=crop",
6346
6339
  description: r = "Columbia University is a prestigious Ivy League institution located in the heart of New York City.",
6347
6340
  // spread remaining props (_id, instanceId, etc.)
6348
- ...w
6341
+ ...y
6349
6342
  }) {
6350
6343
  const d = oe(t), h = ce[d];
6351
6344
  return /* @__PURE__ */ n(
@@ -6357,7 +6350,7 @@ function $s({
6357
6350
  onSelect: i,
6358
6351
  identity: l,
6359
6352
  details: { type: "activity", title: m, group: o, author: p },
6360
- ...w,
6353
+ ...y,
6361
6354
  children: [
6362
6355
  /* @__PURE__ */ e("div", { className: "flex items-start justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${h.title} ml-3`, children: m }) }),
6363
6356
  /* @__PURE__ */ n("div", { className: `text-zinc-500 dark:text-zinc-400 ${h.meta}`, children: [
@@ -6466,7 +6459,7 @@ function Rs({
6466
6459
  // spread for identity (_id/instanceId/etc)
6467
6460
  ...p
6468
6461
  }) {
6469
- const b = oe(t), f = ce[b], r = Es[b], w = (d) => `px-1 pb-2 text-sm font-medium ${d === o ? "text-zinc-900 dark:text-zinc-100 border-b-2" : "text-zinc-500 dark:text-zinc-400"}`;
6462
+ const b = oe(t), f = ce[b], r = Es[b], y = (d) => `px-1 pb-2 text-sm font-medium ${d === o ? "text-zinc-900 dark:text-zinc-100 border-b-2" : "text-zinc-500 dark:text-zinc-400"}`;
6470
6463
  return /* @__PURE__ */ n(
6471
6464
  ie,
6472
6465
  {
@@ -6493,14 +6486,14 @@ function Rs({
6493
6486
  /* @__PURE__ */ e(
6494
6487
  "span",
6495
6488
  {
6496
- className: `${w("joined")} ${o === "joined" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
6489
+ className: `${y("joined")} ${o === "joined" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
6497
6490
  children: "Joined"
6498
6491
  }
6499
6492
  ),
6500
6493
  /* @__PURE__ */ e(
6501
6494
  "span",
6502
6495
  {
6503
- className: `${w("suggested")} ${o === "suggested" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
6496
+ className: `${y("suggested")} ${o === "suggested" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
6504
6497
  children: "Suggested"
6505
6498
  }
6506
6499
  )
@@ -6770,25 +6763,25 @@ function Vs({
6770
6763
  zoom: f = 12,
6771
6764
  mapUrl: r,
6772
6765
  // optional full embed URL override
6773
- ...w
6766
+ ...y
6774
6767
  }) {
6775
- const d = oe(t), h = ce[d], z = Ms[d], $ = r || js(b, f);
6768
+ const d = oe(t), h = ce[d], $ = Ms[d], T = r || js(b, f);
6776
6769
  return /* @__PURE__ */ e(
6777
6770
  ie,
6778
6771
  {
6779
- className: `flex flex-col ${h.card} ${z.wrap}`,
6772
+ className: `flex flex-col ${h.card} ${$.wrap}`,
6780
6773
  showCheckbox: a,
6781
6774
  checkboxPosition: s,
6782
6775
  onSelect: i,
6783
6776
  identity: l,
6784
6777
  details: { type: "campus-map", title: m, campusName: o, activeFilter: p, mapQuery: b, zoom: f },
6785
- ...w,
6786
- children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${z.mapH}`, children: [
6778
+ ...y,
6779
+ children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${$.mapH}`, children: [
6787
6780
  /* @__PURE__ */ e(
6788
6781
  "iframe",
6789
6782
  {
6790
6783
  title: "Google Map",
6791
- src: $,
6784
+ src: T,
6792
6785
  className: "h-full w-full",
6793
6786
  style: { border: 0 },
6794
6787
  loading: "lazy",
@@ -6797,7 +6790,7 @@ function Vs({
6797
6790
  }
6798
6791
  ),
6799
6792
  /* @__PURE__ */ n("div", { className: "absolute left-4 right-4 top-3 flex items-center justify-between pointer-events-none", children: [
6800
- /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${z.campusPill}`, children: [
6793
+ /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${$.campusPill}`, children: [
6801
6794
  /* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children: o }),
6802
6795
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-400", children: "▾" })
6803
6796
  ] }),
@@ -6806,8 +6799,8 @@ function Vs({
6806
6799
  /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
6807
6800
  ] })
6808
6801
  ] }),
6809
- /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${z.chipGap} overflow-x-auto scrollbar-none`, children: u.map((A) => /* @__PURE__ */ e(Bs, { label: A, active: A === p, size: d }, A)) }) }),
6810
- /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-28 md:top-24 pointer-events-none", children: /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 px-4 ${z.searchH}`, children: [
6802
+ /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${$.chipGap} overflow-x-auto scrollbar-none`, children: u.map((A) => /* @__PURE__ */ e(Bs, { label: A, active: A === p, size: d }, A)) }) }),
6803
+ /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-28 md:top-24 pointer-events-none", children: /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 px-4 ${$.searchH}`, children: [
6811
6804
  /* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", "aria-hidden": "true", className: "opacity-60", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M15.5 14h-.79l-.28-.27a6.471 6.471 0 001.48-4.23C15.91 6.01 13.4 3.5 10.45 3.5S5 6.01 5 9.5 7.5 15.5 10.45 15.5c1.61 0 3.09-.59 4.23-1.48l.27.28v.79l4.25 4.25c.41.41 1.07.41 1.48 0s.41-1.07 0-1.48L15.5 14Zm-5.05 0C8.01 14 6 11.99 6 9.5S8.01 5 10.45 5s4.45 2.01 4.45 4.5-2.01 4.5-4.45 4.5Z" }) }),
6812
6805
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
6813
6806
  ] }) })
@@ -6978,13 +6971,13 @@ function Ys({
6978
6971
  selectedIndex: u = 0,
6979
6972
  ...p
6980
6973
  }) {
6981
- const [b, f] = L(u), r = oe(t), w = ce[r], d = Us[r], h = o[b] || o[0], z = (A, E) => {
6974
+ const [b, f] = M(u), r = oe(t), y = ce[r], d = Us[r], h = o[b] || o[0], $ = (A, E) => {
6982
6975
  f(E), i?.(A);
6983
- }, $ = r === "lg";
6976
+ }, T = r === "lg";
6984
6977
  return /* @__PURE__ */ n(
6985
6978
  ie,
6986
6979
  {
6987
- className: `flex flex-col ${w.card} ${d.wrap}`,
6980
+ className: `flex flex-col ${y.card} ${d.wrap}`,
6988
6981
  showCheckbox: a,
6989
6982
  checkboxPosition: s,
6990
6983
  onSelect: i,
@@ -6993,10 +6986,10 @@ function Ys({
6993
6986
  ...p,
6994
6987
  children: [
6995
6988
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between mb-4", children: [
6996
- /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${w.title}`, children: m }),
6989
+ /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${y.title}`, children: m }),
6997
6990
  /* @__PURE__ */ e("button", { className: "text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" })
6998
6991
  ] }),
6999
- $ ? (
6992
+ T ? (
7000
6993
  // Large: Two-column layout
7001
6994
  /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
7002
6995
  /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((A, E) => /* @__PURE__ */ e(
@@ -7005,7 +6998,7 @@ function Ys({
7005
6998
  ev: A,
7006
6999
  sizeMeta: d,
7007
7000
  isSelected: E === b,
7008
- onClick: (I) => z(I, E)
7001
+ onClick: (I) => $(I, E)
7009
7002
  },
7010
7003
  A._id || A.id || E
7011
7004
  )) }),
@@ -7019,12 +7012,12 @@ function Ys({
7019
7012
  ev: A,
7020
7013
  sizeMeta: d,
7021
7014
  isSelected: E === b,
7022
- onClick: (I) => z(I, E)
7015
+ onClick: (I) => $(I, E)
7023
7016
  },
7024
7017
  A._id || A.id || E
7025
7018
  )) })
7026
7019
  ),
7027
- !$ && /* @__PURE__ */ e("div", { className: "mt-4 pt-3 border-t border-zinc-200 dark:border-zinc-800", children: /* @__PURE__ */ e("button", { className: "w-full text-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" }) })
7020
+ !T && /* @__PURE__ */ e("div", { className: "mt-4 pt-3 border-t border-zinc-200 dark:border-zinc-800", children: /* @__PURE__ */ e("button", { className: "w-full text-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" }) })
7028
7021
  ]
7029
7022
  }
7030
7023
  );
@@ -7195,8 +7188,8 @@ function Hs({
7195
7188
  onPin: b,
7196
7189
  ...f
7197
7190
  }) {
7198
- const [r, w] = L(u), d = oe(t), h = ce[d], z = Js[d], $ = (I, j) => {
7199
- w(j), i?.(I);
7191
+ const [r, y] = M(u), d = oe(t), h = ce[d], $ = Js[d], T = (I, j) => {
7192
+ y(j), i?.(I);
7200
7193
  }, A = (I) => {
7201
7194
  const j = { ...I, starred: !I.starred };
7202
7195
  p?.(j);
@@ -7207,7 +7200,7 @@ function Hs({
7207
7200
  return /* @__PURE__ */ n(
7208
7201
  ie,
7209
7202
  {
7210
- className: `flex flex-col ${h.card} ${z.wrap}`,
7203
+ className: `flex flex-col ${h.card} ${$.wrap}`,
7211
7204
  showCheckbox: a,
7212
7205
  checkboxPosition: s,
7213
7206
  onSelect: i,
@@ -7221,9 +7214,9 @@ function Hs({
7221
7214
  Xs,
7222
7215
  {
7223
7216
  email: I,
7224
- sizeMeta: z,
7217
+ sizeMeta: $,
7225
7218
  isSelected: j === r,
7226
- onClick: (V) => $(V, j),
7219
+ onClick: (_) => T(_, j),
7227
7220
  onStar: A,
7228
7221
  onPin: E
7229
7222
  },
@@ -7447,13 +7440,13 @@ function tl({
7447
7440
  selectedIndex: u = 0,
7448
7441
  ...p
7449
7442
  }) {
7450
- const [b, f] = L(u), r = oe(t), w = ce[r], d = Zs[r], h = (A, E) => {
7443
+ const [b, f] = M(u), r = oe(t), y = ce[r], d = Zs[r], h = (A, E) => {
7451
7444
  f(E), i?.(A);
7452
- }, z = o[b] || o[0], $ = d.layout === "split";
7445
+ }, $ = o[b] || o[0], T = d.layout === "split";
7453
7446
  return /* @__PURE__ */ n(
7454
7447
  ie,
7455
7448
  {
7456
- className: `flex flex-col ${w.card} ${d.wrap}`,
7449
+ className: `flex flex-col ${y.card} ${d.wrap}`,
7457
7450
  showCheckbox: a,
7458
7451
  checkboxPosition: s,
7459
7452
  onSelect: i,
@@ -7461,9 +7454,9 @@ function tl({
7461
7454
  details: { type: "directory", title: m, count: o?.length ?? 0 },
7462
7455
  ...p,
7463
7456
  children: [
7464
- /* @__PURE__ */ e("div", { className: "flex items-center justify-between mb-4", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${w.title}`, children: m }) }),
7457
+ /* @__PURE__ */ e("div", { className: "flex items-center justify-between mb-4", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${y.title}`, children: m }) }),
7465
7458
  /* @__PURE__ */ e(el, { sizeMeta: d }),
7466
- $ ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
7459
+ T ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
7467
7460
  /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((A, E) => /* @__PURE__ */ e(
7468
7461
  _t,
7469
7462
  {
@@ -7477,7 +7470,7 @@ function tl({
7477
7470
  /* @__PURE__ */ e(
7478
7471
  Ks,
7479
7472
  {
7480
- contact: z,
7473
+ contact: $,
7481
7474
  sizeMeta: d
7482
7475
  }
7483
7476
  )
@@ -7599,7 +7592,7 @@ function nl({
7599
7592
  ],
7600
7593
  ...r
7601
7594
  }) {
7602
- const w = oe(t), d = ce[w], h = rl[w];
7595
+ const y = oe(t), d = ce[y], h = rl[y];
7603
7596
  return /* @__PURE__ */ n(
7604
7597
  ie,
7605
7598
  {
@@ -7644,16 +7637,16 @@ function nl({
7644
7637
  /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: $e(b) })
7645
7638
  ] })
7646
7639
  ] }),
7647
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: f.slice(0, 2).map((z, $) => /* @__PURE__ */ e(
7640
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: f.slice(0, 2).map(($, T) => /* @__PURE__ */ e(
7648
7641
  al,
7649
7642
  {
7650
- side: $ === 0 ? "left" : "right",
7651
- date: z.date,
7652
- title: z.title,
7653
- amount: z.amount,
7654
- kind: z.kind
7643
+ side: T === 0 ? "left" : "right",
7644
+ date: $.date,
7645
+ title: $.title,
7646
+ amount: $.amount,
7647
+ kind: $.kind
7655
7648
  },
7656
- z.id || $
7649
+ $.id || T
7657
7650
  )) })
7658
7651
  ] })
7659
7652
  ] }),
@@ -7772,7 +7765,7 @@ function ll({
7772
7765
  term: o = "Fall 2025",
7773
7766
  ...u
7774
7767
  }) {
7775
- const [p, b] = L("vacation"), [f, r] = L(!1), w = oe(t), d = ce[w], h = sl[w], z = We.find(($) => $.id === p) || We[0];
7768
+ const [p, b] = M("vacation"), [f, r] = M(!1), y = oe(t), d = ce[y], h = sl[y], $ = We.find((T) => T.id === p) || We[0];
7776
7769
  return /* @__PURE__ */ n(
7777
7770
  ie,
7778
7771
  {
@@ -7808,28 +7801,28 @@ function ll({
7808
7801
  ] })
7809
7802
  ] })
7810
7803
  ] }),
7811
- h.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: We.map(($) => /* @__PURE__ */ e(
7804
+ h.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: We.map((T) => /* @__PURE__ */ e(
7812
7805
  "button",
7813
7806
  {
7814
- className: `flex-1 py-2 px-4 text-center ${h.tab} font-medium border-b-2 transition-colors duration-200 ${p === $.id ? "border-blue-500 text-blue-600 dark:text-blue-400" : "border-transparent text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100"}`,
7815
- onClick: () => b($.id),
7816
- children: $.name.split(" ")[0]
7807
+ className: `flex-1 py-2 px-4 text-center ${h.tab} font-medium border-b-2 transition-colors duration-200 ${p === T.id ? "border-blue-500 text-blue-600 dark:text-blue-400" : "border-transparent text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100"}`,
7808
+ onClick: () => b(T.id),
7809
+ children: T.name.split(" ")[0]
7817
7810
  },
7818
- $.id
7811
+ T.id
7819
7812
  )) }),
7820
7813
  /* @__PURE__ */ e("div", { className: "space-y-4 mb-6", children: h.showAllLeave ? (
7821
7814
  // LG: Show all leave types
7822
- We.map(($) => /* @__PURE__ */ e(Ut, { leave: $, sizeMeta: h }, $.id))
7815
+ We.map((T) => /* @__PURE__ */ e(Ut, { leave: T, sizeMeta: h }, T.id))
7823
7816
  ) : h.showSingleLeave ? (
7824
7817
  // MD: Show active tab leave type
7825
- /* @__PURE__ */ e(Ut, { leave: z, sizeMeta: h })
7818
+ /* @__PURE__ */ e(Ut, { leave: $, sizeMeta: h })
7826
7819
  ) : (
7827
7820
  // SM: Show only available hours
7828
7821
  /* @__PURE__ */ e("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 p-4", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-3 mb-3", children: [
7829
7822
  /* @__PURE__ */ e(Fe, { className: "h-5 w-5 text-blue-600 dark:text-blue-400" }),
7830
7823
  /* @__PURE__ */ n("div", { children: [
7831
7824
  /* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${h.table}`, children: "Available Leave" }),
7832
- /* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${h.table}`, children: z.available })
7825
+ /* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${h.table}`, children: $.available })
7833
7826
  ] })
7834
7827
  ] }) })
7835
7828
  ) }),
@@ -7963,11 +7956,11 @@ function dl({
7963
7956
  subtitle: o = "Drive Shared",
7964
7957
  ...u
7965
7958
  }) {
7966
- const [p, b] = L(!1), f = oe(t), r = ce[f], w = cl[f];
7959
+ const [p, b] = M(!1), f = oe(t), r = ce[f], y = cl[f];
7967
7960
  return /* @__PURE__ */ n(
7968
7961
  ie,
7969
7962
  {
7970
- className: `flex flex-col ${r.card} ${w.wrap}`,
7963
+ className: `flex flex-col ${r.card} ${y.wrap}`,
7971
7964
  showCheckbox: a,
7972
7965
  checkboxPosition: s,
7973
7966
  onSelect: i,
@@ -7977,7 +7970,7 @@ function dl({
7977
7970
  children: [
7978
7971
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
7979
7972
  /* @__PURE__ */ n("div", { children: [
7980
- /* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${w.title} mb-1`, children: m }),
7973
+ /* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${y.title} mb-1`, children: m }),
7981
7974
  /* @__PURE__ */ e("div", { className: "text-zinc-600 dark:text-zinc-400 text-sm", children: o })
7982
7975
  ] }),
7983
7976
  /* @__PURE__ */ n("div", { className: "relative", children: [
@@ -8001,21 +7994,21 @@ function dl({
8001
7994
  ] })
8002
7995
  ] })
8003
7996
  ] }),
8004
- /* @__PURE__ */ e("div", { className: `grid ${w.gridCols} gap-3 `, children: il.map((d) => /* @__PURE__ */ e(
7997
+ /* @__PURE__ */ e("div", { className: `grid ${y.gridCols} gap-3 `, children: il.map((d) => /* @__PURE__ */ e(
8005
7998
  qt,
8006
7999
  {
8007
8000
  item: d,
8008
- sizeMeta: w
8001
+ sizeMeta: y
8009
8002
  },
8010
8003
  d.id
8011
8004
  )) }),
8012
- w.showRecent && /* @__PURE__ */ n("div", { className: "", children: [
8013
- /* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${w.item}`, children: "Recent Files" }),
8005
+ y.showRecent && /* @__PURE__ */ n("div", { className: "", children: [
8006
+ /* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${y.item}`, children: "Recent Files" }),
8014
8007
  /* @__PURE__ */ e("div", { className: "space-y-2", children: ol.map((d) => /* @__PURE__ */ e(
8015
8008
  qt,
8016
8009
  {
8017
8010
  item: d,
8018
- sizeMeta: w,
8011
+ sizeMeta: y,
8019
8012
  showDate: !0
8020
8013
  },
8021
8014
  d.id
@@ -8155,7 +8148,7 @@ const ml = [
8155
8148
  }
8156
8149
  };
8157
8150
  function pl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
8158
- const [l, m] = L(!1), o = Ra(t.type), u = hl(t.type);
8151
+ const [l, m] = M(!1), o = Ra(t.type), u = hl(t.type);
8159
8152
  return l ? null : /* @__PURE__ */ n("div", { className: `relative rounded-lg border-l-4 p-4 transition-all duration-200 ${o.bg} ${o.border} ${t.read ? "border-l-2 opacity-80" : "border-l-4"}`, style: { borderLeftColor: o.accent }, children: [
8160
8153
  /* @__PURE__ */ e(
8161
8154
  "button",
@@ -8179,7 +8172,7 @@ function pl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
8179
8172
  ] });
8180
8173
  }
8181
8174
  function gl({ alert: t, onDismiss: a }) {
8182
- const [s, i] = L(!1), l = Ra("banner"), m = () => {
8175
+ const [s, i] = M(!1), l = Ra("banner"), m = () => {
8183
8176
  i(!0), a?.(t);
8184
8177
  };
8185
8178
  return s ? null : /* @__PURE__ */ e("div", { className: `rounded-lg border p-4 ${l.bg} ${l.border} relative`, children: /* @__PURE__ */ n("div", { className: "flex items-start gap-3", children: [
@@ -8209,13 +8202,13 @@ function bl({
8209
8202
  showBanner: u = !0,
8210
8203
  ...p
8211
8204
  }) {
8212
- const [b, f] = L(o), r = oe(t), w = ce[r], d = ul[r], h = (A) => {
8205
+ const [b, f] = M(o), r = oe(t), y = ce[r], d = ul[r], h = (A) => {
8213
8206
  f((E) => E.filter((I) => I.id !== A.id));
8214
- }, z = b.find((A) => A.type === "banner"), $ = b.filter((A) => A.type !== "banner");
8207
+ }, $ = b.find((A) => A.type === "banner"), T = b.filter((A) => A.type !== "banner");
8215
8208
  return /* @__PURE__ */ n(
8216
8209
  ie,
8217
8210
  {
8218
- className: `flex flex-col ${w.card} ${d.wrap}`,
8211
+ className: `flex flex-col ${y.card} ${d.wrap}`,
8219
8212
  showCheckbox: a,
8220
8213
  checkboxPosition: s,
8221
8214
  onSelect: i,
@@ -8223,15 +8216,15 @@ function bl({
8223
8216
  details: { type: "alerts", title: m, count: b.length },
8224
8217
  ...p,
8225
8218
  children: [
8226
- /* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${w.title}`, children: m }) }),
8227
- u && z && t !== "sm" && /* @__PURE__ */ e(
8219
+ /* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${y.title}`, children: m }) }),
8220
+ u && $ && t !== "sm" && /* @__PURE__ */ e(
8228
8221
  gl,
8229
8222
  {
8230
- alert: z,
8223
+ alert: $,
8231
8224
  onDismiss: h
8232
8225
  }
8233
8226
  ),
8234
- /* @__PURE__ */ e("div", { className: "space-y-0.5", children: $.slice(0, 3).map((A) => /* @__PURE__ */ e(
8227
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: T.slice(0, 3).map((A) => /* @__PURE__ */ e(
8235
8228
  pl,
8236
8229
  {
8237
8230
  alert: A,
@@ -8343,7 +8336,7 @@ const fl = [
8343
8336
  }
8344
8337
  };
8345
8338
  function yl({ video: t, sizeMeta: a }) {
8346
- const [s, i] = L(!1);
8339
+ const [s, i] = M(!1);
8347
8340
  return /* @__PURE__ */ n("div", { className: "group cursor-pointer", children: [
8348
8341
  /* @__PURE__ */ n("div", { className: `relative ${a.thumbnailHeight} rounded-lg overflow-hidden bg-zinc-200 dark:bg-zinc-800`, children: [
8349
8342
  /* @__PURE__ */ e(
@@ -8385,11 +8378,11 @@ function vl({
8385
8378
  videos: o = fl,
8386
8379
  ...u
8387
8380
  }) {
8388
- const [p, b] = L(!1), f = oe(t), r = ce[f], w = xl[f];
8381
+ const [p, b] = M(!1), f = oe(t), r = ce[f], y = xl[f];
8389
8382
  return /* @__PURE__ */ n(
8390
8383
  ie,
8391
8384
  {
8392
- className: `flex flex-col ${r.card} ${w.wrap}`,
8385
+ className: `flex flex-col ${r.card} ${y.wrap}`,
8393
8386
  showCheckbox: a,
8394
8387
  checkboxPosition: s,
8395
8388
  onSelect: i,
@@ -8419,11 +8412,11 @@ function vl({
8419
8412
  ] })
8420
8413
  ] })
8421
8414
  ] }),
8422
- /* @__PURE__ */ e("div", { className: `grid ${w.gridCols} gap-4 `, children: o.slice(0, w.gridCols === "grid-cols-3" ? 6 : 4).map((d) => /* @__PURE__ */ e(
8415
+ /* @__PURE__ */ e("div", { className: `grid ${y.gridCols} gap-4 `, children: o.slice(0, y.gridCols === "grid-cols-3" ? 6 : 4).map((d) => /* @__PURE__ */ e(
8423
8416
  yl,
8424
8417
  {
8425
8418
  video: d,
8426
- sizeMeta: w
8419
+ sizeMeta: y
8427
8420
  },
8428
8421
  d.id
8429
8422
  )) }),