unifyedx-storybook-new 0.2.60 → 0.2.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
1
  import { jsxs as n, jsx as e, Fragment as ee } from "react/jsx-runtime";
2
- import ae, { useState as L, useMemo as se, useId as Xe, Fragment as Q, useEffect as te, useCallback as K, useRef as ge } from "react";
2
+ import ae, { useState as B, useMemo as se, useId as Xe, Fragment as Q, useEffect as te, useCallback as K, useRef as ge } from "react";
3
3
  import { a as H, U as ot, X as ye, P as c, L as Ma, C as fe, b as Ke, D as ct, f as zt, d as Yt, F as La, e as Ba, h as Va, T as Me, u as ja, I as Wt, i as Jt, j as _a, k as Ua, l as Ga, m as Xt, S as xt, n as Ht, M as qa, o as Ya, p as vt, q as Wa, A as Ja, E as Qt, r as Xa, s as Ha, t as Qa, v as Za, w as Zt, x as Ka, y as Kt, z as ea, B as er, G as tr, H as ar, J as He, K as dt, N as mt, O as rr, Q as nr, R as ta, V as sr, W as Nt, Y as lr, Z as ir, _ as Le, $ as or, a0 as cr, a1 as dr, a2 as mr, a3 as ur, a4 as hr, a5 as St, a6 as pr, a7 as gr, a8 as br, a9 as fr, aa as yr, ab as xr, ac as vr, ad as Nr, ae as wr, af as Te, ag as aa, ah as kr, ai as Cr, aj as zr, ak as Sr, al as Dr, am as ra, an as $r, ao as Tr, ap as na, aq as Ar, ar as ut, as as sa, at as Fr } from "./vendor-yf0QH1Io.js";
4
- import { Popover as Er, PopoverButton as Rr, PopoverPanel as Or, Transition as ue, Dialog as be, TransitionChild as Ne, DialogPanel as Ae, DialogTitle as et, TabGroup as Ir, TabList as Pr, Tab as ne, TabPanels as Mr, RadioGroup as _e, Listbox as Z, ListboxButton as Lr, ListboxOptions as Br, ListboxOption as Vr, SwitchGroup as jr, Switch as st, Menu as _r, MenuButton as Ur, Portal as Gr, MenuItems as qr, MenuItem as Yr, DialogBackdrop as Wr } from "@headlessui/react";
4
+ import { Popover as Er, PopoverButton as Rr, PopoverPanel as Ir, Transition as ue, Dialog as be, TransitionChild as Ne, DialogPanel as Ae, DialogTitle as et, TabGroup as Or, TabList as Pr, Tab as ne, TabPanels as Mr, RadioGroup as _e, Listbox as Z, ListboxButton as Lr, ListboxOptions as Br, ListboxOption as Vr, SwitchGroup as jr, Switch as st, Menu as _r, MenuButton as Ur, Portal as Gr, MenuItems as qr, MenuItem as Yr, DialogBackdrop as Wr } from "@headlessui/react";
5
5
  import { motion as le, AnimatePresence as Ce } from "framer-motion";
6
6
  import { d as Jr } from "./vendor-lodash-Dkzj2D3U.js";
7
7
  import { useFloating as la, offset as ia, flip as oa, shift as ca, autoUpdate as da, useClick as Xr, useDismiss as Hr, useInteractions as Qr, FloatingPortal as Zr } from "@floating-ui/react";
8
8
  import lt, { debounce as Kr } from "lodash";
9
- import { ToastContainer as en, Slide as tn, toast as Oe } from "react-toastify";
9
+ import { ToastContainer as en, Slide as tn, toast as Ie } from "react-toastify";
10
10
  import "react-toastify/dist/ReactToastify.css";
11
11
  import { P as an, S as rn, F as nn, G as sn, a as ln, E as on, b as cn, C as dn, R as mn, c as un, d as hn, e as pn, f as gn, I as bn, g as Dt } from "./vendor-syncfusion-v-M3ddHK.js";
12
12
  const fn = (t) => {
@@ -15,8 +15,8 @@ const fn = (t) => {
15
15
  a ^= t.charCodeAt(s), a += (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24);
16
16
  return a >>> 0;
17
17
  }, yn = (t) => {
18
- const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = fn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, h = 86 + (i >>> 24) % 8, u = `hsl(${l}, ${m}%, ${h}%)`, N = `hsl(${l}, ${m}%, ${o}%)`;
19
- return { bg: u, text: N };
18
+ const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = fn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, u = 86 + (i >>> 24) % 8, h = `hsl(${l}, ${m}%, ${u}%)`, N = `hsl(${l}, ${m}%, ${o}%)`;
19
+ return { bg: h, text: N };
20
20
  }, xn = (t = "") => t.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase(), ze = ({
21
21
  src: t,
22
22
  name: a,
@@ -29,7 +29,7 @@ const fn = (t) => {
29
29
  className: m,
30
30
  ...o
31
31
  }) => {
32
- const [h, u] = L(!1), N = se(() => yn(a), []), y = t && !h, r = !y && a, v = !y && !a, d = H(
32
+ const [u, h] = B(!1), N = se(() => yn(a), []), y = t && !u, r = !y && a, v = !y && !a, d = H(
33
33
  "avatar-container",
34
34
  `avatar--size-${s}`,
35
35
  m
@@ -44,7 +44,7 @@ const fn = (t) => {
44
44
  src: t,
45
45
  alt: a || "User avatar",
46
46
  className: "avatar-image",
47
- onError: () => u(!0)
47
+ onError: () => h(!0)
48
48
  }
49
49
  ),
50
50
  r && /* @__PURE__ */ e("span", { className: "avatar-initials", "aria-label": a, children: xn(a) }),
@@ -71,21 +71,21 @@ const fn = (t) => {
71
71
  onRemove: l,
72
72
  bgColor: m,
73
73
  textColor: o,
74
- className: h,
75
- ...u
74
+ className: u,
75
+ ...h
76
76
  }) => {
77
77
  const N = H(
78
78
  "badge",
79
79
  `badge--variant-${a}`,
80
80
  `badge--size-${s}`,
81
81
  { "badge--with-remove": !!l },
82
- h
82
+ u
83
83
  );
84
84
  return /* @__PURE__ */ n("span", { className: N, style: m && o ? {
85
85
  backgroundColor: m,
86
86
  color: o,
87
87
  borderColor: "#ff0000"
88
- } : {}, ...u, children: [
88
+ } : {}, ...h, children: [
89
89
  i && /* @__PURE__ */ e(i, { className: "badge-icon" }),
90
90
  /* @__PURE__ */ e("span", { className: "badge-label", children: t }),
91
91
  l && /* @__PURE__ */ e(
@@ -146,9 +146,9 @@ const wn = {
146
146
  // ✅ Default is now empty
147
147
  loader: m = !1,
148
148
  category: o = "primary",
149
- icon: h,
149
+ icon: u,
150
150
  // Renamed for clarity, expecting a component type e.g., CheckCircle
151
- disabled: u = !1,
151
+ disabled: h = !1,
152
152
  size: N = "medium",
153
153
  label: y,
154
154
  children: r,
@@ -156,7 +156,7 @@ const wn = {
156
156
  onClick: v,
157
157
  ...d
158
158
  }) => {
159
- const g = u || m, z = h && !y, A = H(
159
+ const g = h || m, z = u && !y, A = H(
160
160
  "btn-base",
161
161
  wn[N],
162
162
  kn[o],
@@ -178,7 +178,7 @@ const wn = {
178
178
  "aria-label": i || z && a || (typeof y == "string" ? y : void 0),
179
179
  ...d,
180
180
  children: m ? /* @__PURE__ */ e(Ma, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(ee, { children: [
181
- h && /* @__PURE__ */ e(h, { size: N === "large" ? 20 : 16 }),
181
+ u && /* @__PURE__ */ e(u, { size: N === "large" ? 20 : 16 }),
182
182
  y,
183
183
  r,
184
184
  " "
@@ -216,9 +216,9 @@ const wn = {
216
216
  ref: l,
217
217
  checked: m,
218
218
  onChange: o,
219
- ...h
219
+ ...u
220
220
  }) => {
221
- const u = Xe(), N = a || u;
221
+ const h = Xe(), N = a || h;
222
222
  return /* @__PURE__ */ n("div", { className: `checkbox-container ${i || ""}`, children: [
223
223
  /* @__PURE__ */ n("label", { htmlFor: N, className: "checkbox-wrapper", children: [
224
224
  /* @__PURE__ */ e(
@@ -230,7 +230,7 @@ const wn = {
230
230
  className: "checkbox-input",
231
231
  checked: m,
232
232
  onChange: o,
233
- ...h
233
+ ...u
234
234
  }
235
235
  ),
236
236
  /* @__PURE__ */ e(
@@ -248,7 +248,7 @@ const wn = {
248
248
  ] }),
249
249
  s && /* @__PURE__ */ e("p", { className: "checkbox-error-message", children: s })
250
250
  ] });
251
- }, zn = ({ children: t }) => /* @__PURE__ */ e(Er, { className: "popover-container", children: t }), Sn = ({ children: t }) => /* @__PURE__ */ e(Rr, { as: "div", children: t }), Dn = ({ children: t, className: a }) => /* @__PURE__ */ e(Or, { className: `popover-panel ${a || ""}`, children: t }), ma = ct, ua = ({
251
+ }, zn = ({ children: t }) => /* @__PURE__ */ e(Er, { className: "popover-container", children: t }), Sn = ({ children: t }) => /* @__PURE__ */ e(Rr, { as: "div", children: t }), Dn = ({ children: t, className: a }) => /* @__PURE__ */ e(Ir, { className: `popover-panel ${a || ""}`, children: t }), ma = ct, ua = ({
252
252
  value: t,
253
253
  onChange: a,
254
254
  onClear: s,
@@ -256,9 +256,9 @@ const wn = {
256
256
  label: l,
257
257
  error: m,
258
258
  disabled: o = !1,
259
- className: h,
260
- ...u
261
- }) => /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", h), children: [
259
+ className: u,
260
+ ...h
261
+ }) => /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
262
262
  l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "datepicker-input", children: l }),
263
263
  /* @__PURE__ */ e(
264
264
  ma,
@@ -284,8 +284,8 @@ const wn = {
284
284
  label: l,
285
285
  error: m,
286
286
  disabled: o = !1,
287
- className: h,
288
- ...u
287
+ className: u,
288
+ ...h
289
289
  }) => {
290
290
  const N = t?.from, y = t?.to, r = (d) => {
291
291
  d.stopPropagation(), d.preventDefault(), s?.();
@@ -294,7 +294,7 @@ const wn = {
294
294
  " - ",
295
295
  zt(y, "MMM d, y")
296
296
  ] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: i });
297
- return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", h), children: [
297
+ return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
298
298
  l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "daterangepicker-input", children: l }),
299
299
  /* @__PURE__ */ n(zn, { children: [
300
300
  /* @__PURE__ */ e(Sn, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "datepicker-input-container", children: [
@@ -595,8 +595,8 @@ const wn = {
595
595
  open: m,
596
596
  // --- Form and File State ---
597
597
  validFiles: o = [],
598
- rejectedFiles: h = [],
599
- handleRemoveValidFile: u,
598
+ rejectedFiles: u = [],
599
+ handleRemoveValidFile: h,
600
600
  handleRemoveRejectedFile: N,
601
601
  handleSubmit: y,
602
602
  isSubmitting: r,
@@ -605,7 +605,7 @@ const wn = {
605
605
  title: d = "Upload Files",
606
606
  subHeading: g = "Supports PNG, JPG, PDF. Max size: 50MB."
607
607
  }) => {
608
- const z = o.length > 0 || h.length > 0;
608
+ const z = o.length > 0 || u.length > 0;
609
609
  return /* @__PURE__ */ e(ue, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(
610
610
  be,
611
611
  {
@@ -705,7 +705,7 @@ const wn = {
705
705
  "button",
706
706
  {
707
707
  type: "button",
708
- onClick: () => u(E),
708
+ onClick: () => h(E),
709
709
  className: "remove-file-button",
710
710
  children: /* @__PURE__ */ e(Me, { size: 16 })
711
711
  }
@@ -714,7 +714,7 @@ const wn = {
714
714
  },
715
715
  `${A.name}-${E}`
716
716
  )),
717
- h.map(({ file: A, message: E }, O) => /* @__PURE__ */ n(
717
+ u.map(({ file: A, message: E }, I) => /* @__PURE__ */ n(
718
718
  "li",
719
719
  {
720
720
  className: "file-item file-item--rejected",
@@ -736,14 +736,14 @@ const wn = {
736
736
  "button",
737
737
  {
738
738
  type: "button",
739
- onClick: () => N(O),
739
+ onClick: () => N(I),
740
740
  className: "remove-file-button",
741
741
  children: /* @__PURE__ */ e(Me, { size: 16 })
742
742
  }
743
743
  )
744
744
  ]
745
745
  },
746
- `${A.name}-${O}`
746
+ `${A.name}-${I}`
747
747
  ))
748
748
  ] })
749
749
  ] })
@@ -825,18 +825,18 @@ const wn = {
825
825
  filterConfig: l = [],
826
826
  initialFormikValues: m,
827
827
  customStyles: o = "",
828
- fetchCreatedOrUpdatedByUsers: h = async () => []
828
+ fetchCreatedOrUpdatedByUsers: u = async () => []
829
829
  // Mockable fetcher
830
830
  }) => {
831
- const [u, N] = L({
831
+ const [h, N] = B({
832
832
  createdBy: [],
833
833
  updatedBy: []
834
- }), [y, r] = L({
834
+ }), [y, r] = B({
835
835
  createdBy: !1,
836
836
  updatedBy: !1
837
- }), [v, d] = L({
837
+ }), [v, d] = B({
838
838
  startDate: null
839
- }), [g, z] = L({
839
+ }), [g, z] = B({
840
840
  endDate: null
841
841
  }), A = ja({
842
842
  initialValues: JSON.parse(JSON.stringify(m)),
@@ -851,36 +851,36 @@ const wn = {
851
851
  };
852
852
  }), console.log("[storybook filter] Applied Filters:", x), typeof s == "function" && s({
853
853
  filters: x,
854
- activeCount: O
854
+ activeCount: I
855
855
  }), a();
856
856
  },
857
857
  enableReinitialize: !0
858
858
  }), E = se(() => l.reduce((T, x) => {
859
859
  const f = x.key, C = A.values[f];
860
- let I = !1;
860
+ let O = !1;
861
861
  if (C)
862
862
  switch (x.type) {
863
863
  case "multiselect":
864
864
  case "multiselect-users":
865
- I = Array.isArray(C.values) && C.values.length > 0;
865
+ O = Array.isArray(C.values) && C.values.length > 0;
866
866
  break;
867
867
  case "date":
868
- (C.range && C.range !== "" || Array.isArray(C.values) && C.values.length > 0) && (I = !0);
868
+ (C.range && C.range !== "" || Array.isArray(C.values) && C.values.length > 0) && (O = !0);
869
869
  break;
870
870
  }
871
- return T[f] = I, T;
872
- }, {}), [l, A.values]), O = Object.values(E).filter(Boolean).length, M = se(() => l.some((T) => {
871
+ return T[f] = O, T;
872
+ }, {}), [l, A.values]), I = Object.values(E).filter(Boolean).length, M = se(() => l.some((T) => {
873
873
  if (T.type !== "date") return !1;
874
874
  const x = A.values?.[T.key]?.values;
875
875
  if (!Array.isArray(x) || x.length < 2) return !1;
876
876
  const [f, C] = x;
877
877
  if (!f || !C) return !1;
878
- const I = f instanceof Date ? f : new Date(f), R = C instanceof Date ? C : new Date(C);
879
- return I > R;
878
+ const O = f instanceof Date ? f : new Date(f), R = C instanceof Date ? C : new Date(C);
879
+ return O > R;
880
880
  }), [l, A.values]), _ = async (T, x) => {
881
881
  try {
882
882
  r((C) => ({ ...C, [T]: !0 }));
883
- const f = await h(T, x);
883
+ const f = await u(T, x);
884
884
  N((C) => ({ ...C, [T]: f }));
885
885
  } catch (f) {
886
886
  console.error(`Error fetching ${T} users:`, f);
@@ -889,11 +889,11 @@ const wn = {
889
889
  }
890
890
  }, U = (T) => {
891
891
  const x = l[T].key, f = l[T].url;
892
- l[T].type === "multiselect-users" && u[x].length === 0 && !y[x] && _(x, f);
892
+ l[T].type === "multiselect-users" && h[x].length === 0 && !y[x] && _(x, f);
893
893
  }, Y = () => {
894
894
  A.resetForm(), N({ createdBy: [], updatedBy: [] }), i();
895
- }, G = (T) => {
896
- const x = l.find((I) => I.key === T);
895
+ }, q = (T) => {
896
+ const x = l.find((O) => O.key === T);
897
897
  if (!x) return null;
898
898
  const f = A.values[T] || m[T], C = Array.isArray(f.values) ? f.values : [];
899
899
  switch (x.type) {
@@ -921,8 +921,8 @@ const wn = {
921
921
  className: "filter-checkbox-input",
922
922
  checked: x.options.length > 0 && C.length === x.options.length,
923
923
  onChange: (F) => {
924
- const q = F.target.checked ? x.options.map((X) => X.value) : [];
925
- A.setFieldValue(`${T}.values`, q);
924
+ const G = F.target.checked ? x.options.map((W) => W.value) : [];
925
+ A.setFieldValue(`${T}.values`, G);
926
926
  }
927
927
  }
928
928
  ),
@@ -943,9 +943,9 @@ const wn = {
943
943
  id: `${T}-${F.value}`,
944
944
  className: "filter-checkbox-input",
945
945
  checked: C.includes(F.value),
946
- onChange: (q) => {
947
- const X = q.target.checked ? [...C, F.value] : C.filter((xe) => xe !== F.value);
948
- A.setFieldValue(`${T}.values`, X);
946
+ onChange: (G) => {
947
+ const W = G.target.checked ? [...C, F.value] : C.filter((xe) => xe !== F.value);
948
+ A.setFieldValue(`${T}.values`, W);
949
949
  }
950
950
  }
951
951
  ),
@@ -961,7 +961,7 @@ const wn = {
961
961
  ] })
962
962
  ] });
963
963
  case "multiselect-users":
964
- const I = u[T] || [], R = y[T];
964
+ const O = h[T] || [], R = y[T];
965
965
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
966
966
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
967
967
  /* @__PURE__ */ e("label", { className: "filter-label", children: "Operator:" }),
@@ -975,7 +975,7 @@ const wn = {
975
975
  }
976
976
  )
977
977
  ] }),
978
- R ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: I.length > 0 ? /* @__PURE__ */ n(ee, { children: [
978
+ R ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: O.length > 0 ? /* @__PURE__ */ n(ee, { children: [
979
979
  /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
980
980
  /* @__PURE__ */ e(
981
981
  "input",
@@ -983,12 +983,12 @@ const wn = {
983
983
  type: "checkbox",
984
984
  id: `select-all-users-${T}`,
985
985
  className: "filter-checkbox-input",
986
- checked: I.length > 0 && C.length === I.length,
986
+ checked: O.length > 0 && C.length === O.length,
987
987
  onChange: (F) => {
988
- const q = F.target.checked ? I.map((X) => X.email) : [];
988
+ const G = F.target.checked ? O.map((W) => W.email) : [];
989
989
  A.setFieldValue(
990
990
  `${T}.values`,
991
- q
991
+ G
992
992
  );
993
993
  }
994
994
  }
@@ -1002,7 +1002,7 @@ const wn = {
1002
1002
  }
1003
1003
  )
1004
1004
  ] }),
1005
- I.map((F) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
1005
+ O.map((F) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
1006
1006
  /* @__PURE__ */ e(
1007
1007
  "input",
1008
1008
  {
@@ -1010,11 +1010,11 @@ const wn = {
1010
1010
  id: `${T}-${F.email}`,
1011
1011
  className: "filter-checkbox-input",
1012
1012
  checked: C.includes(F.email),
1013
- onChange: (q) => {
1014
- const X = q.target.checked ? [...C, F.email] : C.filter((xe) => xe !== F.email);
1013
+ onChange: (G) => {
1014
+ const W = G.target.checked ? [...C, F.email] : C.filter((xe) => xe !== F.email);
1015
1015
  A.setFieldValue(
1016
1016
  `${T}.values`,
1017
- X
1017
+ W
1018
1018
  );
1019
1019
  }
1020
1020
  }
@@ -1040,7 +1040,7 @@ const wn = {
1040
1040
  }, S = {
1041
1041
  startDate: $ instanceof Date ? $.toISOString().slice(0, 10) : null,
1042
1042
  endDate: $ instanceof Date ? $.toISOString().slice(0, 10) : null
1043
- }, B = [
1043
+ }, L = [
1044
1044
  { key: "anytime", label: "Anytime" },
1045
1045
  { key: "today", label: "Today" },
1046
1046
  { key: "this_week", label: "This Week" },
@@ -1057,8 +1057,8 @@ const wn = {
1057
1057
  A.setFieldValue(`${T}.range`, "custom");
1058
1058
  return;
1059
1059
  }
1060
- const [q, X] = En(F);
1061
- A.setFieldValue(`${T}.values`, q && X ? [q, X] : []), A.setFieldValue(`${T}.range`, F);
1060
+ const [G, W] = En(F);
1061
+ A.setFieldValue(`${T}.values`, G && W ? [G, W] : []), A.setFieldValue(`${T}.range`, F);
1062
1062
  };
1063
1063
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
1064
1064
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
@@ -1087,8 +1087,8 @@ const wn = {
1087
1087
  }
1088
1088
  )
1089
1089
  ] }),
1090
- /* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: B.map((F) => {
1091
- const q = f.range === F.key || F.key === "anytime" && (!Array.isArray(f.values) || f.values.length === 0);
1090
+ /* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: L.map((F) => {
1091
+ const G = f.range === F.key || F.key === "anytime" && (!Array.isArray(f.values) || f.values.length === 0);
1092
1092
  return /* @__PURE__ */ n(
1093
1093
  "label",
1094
1094
  {
@@ -1099,13 +1099,13 @@ const wn = {
1099
1099
  {
1100
1100
  type: "radio",
1101
1101
  name: `preset-${T}`,
1102
- checked: q,
1102
+ checked: G,
1103
1103
  onChange: () => j(F.key),
1104
1104
  className: "h-4 w-4"
1105
1105
  }
1106
1106
  ),
1107
1107
  /* @__PURE__ */ e("span", { className: "text-sm text-[#222]", children: F.label }),
1108
- F.key === "anytime" && q && /* @__PURE__ */ e("span", { className: "ml-2 text-xs bg-yellow-100 text-yellow-800 px-2 py-0.5 rounded", children: "Default" })
1108
+ F.key === "anytime" && G && /* @__PURE__ */ e("span", { className: "ml-2 text-xs bg-yellow-100 text-yellow-800 px-2 py-0.5 rounded", children: "Default" })
1109
1109
  ]
1110
1110
  },
1111
1111
  F.key
@@ -1122,8 +1122,8 @@ const wn = {
1122
1122
  useRange: !1,
1123
1123
  value: P,
1124
1124
  onChange: (F) => {
1125
- const q = F?.startDate ? Be(new Date(F.startDate)) : null, X = D[1] || null;
1126
- q && (A.setFieldValue(`${T}.values`, [q, X]), A.setFieldValue(`${T}.range`, "custom"));
1125
+ const G = F?.startDate ? Be(new Date(F.startDate)) : null, W = D[1] || null;
1126
+ G && (A.setFieldValue(`${T}.values`, [G, W]), A.setFieldValue(`${T}.range`, "custom"));
1127
1127
  },
1128
1128
  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",
1129
1129
  primaryColor: "violet",
@@ -1146,8 +1146,8 @@ const wn = {
1146
1146
  useRange: !1,
1147
1147
  value: S,
1148
1148
  onChange: (F) => {
1149
- const q = F?.startDate ? Ve(new Date(F.startDate)) : null, X = D[0] || null;
1150
- q && (A.setFieldValue(`${T}.values`, [X, q]), A.setFieldValue(`${T}.range`, "custom"));
1149
+ const G = F?.startDate ? Ve(new Date(F.startDate)) : null, W = D[0] || null;
1150
+ G && (A.setFieldValue(`${T}.values`, [W, G]), A.setFieldValue(`${T}.range`, "custom"));
1151
1151
  },
1152
1152
  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",
1153
1153
  primaryColor: "violet",
@@ -1206,7 +1206,7 @@ const wn = {
1206
1206
  ] }),
1207
1207
  /* @__PURE__ */ n("form", { onSubmit: A.handleSubmit, className: "filter-form", children: [
1208
1208
  /* @__PURE__ */ e("div", { className: "filter-content-wrapper", children: /* @__PURE__ */ n(
1209
- Ir,
1209
+ Or,
1210
1210
  {
1211
1211
  vertical: !0,
1212
1212
  onChange: U,
@@ -1239,7 +1239,7 @@ const wn = {
1239
1239
  animate: { opacity: 1, x: 0 },
1240
1240
  transition: { duration: 0.3 },
1241
1241
  className: "h-full",
1242
- children: G(T.key)
1242
+ children: q(T.key)
1243
1243
  },
1244
1244
  T.key
1245
1245
  )
@@ -1268,7 +1268,7 @@ const wn = {
1268
1268
  children: [
1269
1269
  "Apply Filters",
1270
1270
  " ",
1271
- O > 0 ? `(${O})` : ""
1271
+ I > 0 ? `(${I})` : ""
1272
1272
  ]
1273
1273
  }
1274
1274
  )
@@ -1278,7 +1278,7 @@ const wn = {
1278
1278
  }
1279
1279
  ) }) })
1280
1280
  ] }) });
1281
- }, J = ({
1281
+ }, X = ({
1282
1282
  label: t,
1283
1283
  id: a,
1284
1284
  type: s = "text",
@@ -1287,24 +1287,24 @@ const wn = {
1287
1287
  className: m,
1288
1288
  ref: o,
1289
1289
  // ✅ 'ref' is now received directly as a prop
1290
- ...h
1290
+ ...u
1291
1291
  }) => {
1292
- const u = a || h.name;
1292
+ const h = a || u.name;
1293
1293
  return /* @__PURE__ */ n("div", { className: `input-wrapper ${m || ""}`, children: [
1294
- t && /* @__PURE__ */ e("label", { htmlFor: u, className: "input-label", children: t }),
1294
+ t && /* @__PURE__ */ e("label", { htmlFor: h, className: "input-label", children: t }),
1295
1295
  /* @__PURE__ */ n("div", { className: "input-field-container", children: [
1296
1296
  i && /* @__PURE__ */ e(i, { className: "input-icon", size: 20 }),
1297
1297
  /* @__PURE__ */ e(
1298
1298
  "input",
1299
1299
  {
1300
- id: u,
1300
+ id: h,
1301
1301
  type: s,
1302
1302
  ref: o,
1303
1303
  className: H("input-field", {
1304
1304
  "input-field--error": !!l,
1305
1305
  "input-field--with-icon": !!i
1306
1306
  }),
1307
- ...h
1307
+ ...u
1308
1308
  }
1309
1309
  )
1310
1310
  ] }),
@@ -1340,8 +1340,8 @@ const wn = {
1340
1340
  // No default
1341
1341
  variant: o = "info",
1342
1342
  // 'info', 'warning', 'delete'
1343
- loading: h = !1,
1344
- buttonProps: u = {},
1343
+ loading: u = !1,
1344
+ buttonProps: h = {},
1345
1345
  size: N
1346
1346
  // Add size prop
1347
1347
  }) => {
@@ -1398,7 +1398,7 @@ const wn = {
1398
1398
  type: "button",
1399
1399
  onClick: v,
1400
1400
  label: l,
1401
- ...u
1401
+ ...h
1402
1402
  }
1403
1403
  )
1404
1404
  ] })
@@ -1414,14 +1414,14 @@ const wn = {
1414
1414
  onItemsPerPageChange: l,
1415
1415
  itemsPerPageOptions: m = [10, 15, 20]
1416
1416
  }) => {
1417
- const o = Math.ceil(a / s), [h, u] = L(t);
1417
+ const o = Math.ceil(a / s), [u, h] = B(t);
1418
1418
  te(() => {
1419
- u(t);
1419
+ h(t);
1420
1420
  }, [t]);
1421
1421
  const N = Math.min((t - 1) * s + 1, a), y = Math.min(t * s, a), r = (v) => {
1422
1422
  v.preventDefault();
1423
- let d = parseInt(h, 10);
1424
- isNaN(d) || d < 1 ? d = 1 : d > o && (d = o), u(d), d !== t && i(d);
1423
+ let d = parseInt(u, 10);
1424
+ isNaN(d) || d < 1 ? d = 1 : d > o && (d = o), h(d), d !== t && i(d);
1425
1425
  };
1426
1426
  return /* @__PURE__ */ n("div", { className: "pagination-container", children: [
1427
1427
  /* @__PURE__ */ n("div", { className: "pagination-left", children: [
@@ -1471,8 +1471,8 @@ const wn = {
1471
1471
  {
1472
1472
  type: "number",
1473
1473
  className: "page-input",
1474
- value: h,
1475
- onChange: (v) => u(v.target.value),
1474
+ value: u,
1475
+ onChange: (v) => h(v.target.value),
1476
1476
  onBlur: r,
1477
1477
  "aria-label": `Current page, Page ${t}`
1478
1478
  }
@@ -1523,12 +1523,12 @@ const wn = {
1523
1523
  _e.Option,
1524
1524
  {
1525
1525
  value: o.value,
1526
- className: ({ active: h, checked: u }) => H("radiogroup-option", {
1527
- "radiogroup-option--active": h,
1528
- "radiogroup-option--checked": u,
1526
+ className: ({ active: u, checked: h }) => H("radiogroup-option", {
1527
+ "radiogroup-option--active": u,
1528
+ "radiogroup-option--checked": h,
1529
1529
  "radiogroup-option--error": !!l
1530
1530
  }),
1531
- children: ({ checked: h }) => /* @__PURE__ */ n(ee, { children: [
1531
+ children: ({ checked: u }) => /* @__PURE__ */ n(ee, { children: [
1532
1532
  /* @__PURE__ */ n("div", { className: "radiogroup-option-content", children: [
1533
1533
  /* @__PURE__ */ e(_e.Label, { as: "p", className: "option-label", children: o.label }),
1534
1534
  o.description && /* @__PURE__ */ e(
@@ -1540,7 +1540,7 @@ const wn = {
1540
1540
  }
1541
1541
  )
1542
1542
  ] }),
1543
- h && /* @__PURE__ */ e("div", { className: "option-checkmark", children: /* @__PURE__ */ e(Xt, { size: 20 }) })
1543
+ u && /* @__PURE__ */ e("div", { className: "option-checkmark", children: /* @__PURE__ */ e(Xt, { size: 20 }) })
1544
1544
  ] })
1545
1545
  },
1546
1546
  o.value
@@ -1557,12 +1557,12 @@ const wn = {
1557
1557
  // Added a default label for accessibility
1558
1558
  customClass: m = "",
1559
1559
  inputStyle: o = {},
1560
- placeholderClass: h = "",
1561
- searchIconSize: u = 16,
1560
+ placeholderClass: u = "",
1561
+ searchIconSize: h = 16,
1562
1562
  searchIconClass: N = "",
1563
1563
  ...y
1564
1564
  }) => {
1565
- const [r, v] = L(t);
1565
+ const [r, v] = B(t);
1566
1566
  te(() => {
1567
1567
  v(t);
1568
1568
  }, [t]);
@@ -1580,12 +1580,12 @@ const wn = {
1580
1580
  };
1581
1581
  return /* @__PURE__ */ n("div", { className: `search-bar-wrapper ${m}`, children: [
1582
1582
  l && /* @__PURE__ */ e("label", { htmlFor: "search-field", className: "sr-only", children: l }),
1583
- /* @__PURE__ */ e("div", { className: "search-bar-icon-wrapper", children: /* @__PURE__ */ e(xt, { size: u || 16, className: `search-bar-icon ${N}`, "aria-hidden": "true" }) }),
1583
+ /* @__PURE__ */ e("div", { className: "search-bar-icon-wrapper", children: /* @__PURE__ */ e(xt, { size: h || 16, className: `search-bar-icon ${N}`, "aria-hidden": "true" }) }),
1584
1584
  /* @__PURE__ */ e(
1585
1585
  "input",
1586
1586
  {
1587
1587
  id: "search-field",
1588
- className: `search-bar-input ${h}`,
1588
+ className: `search-bar-input ${u}`,
1589
1589
  placeholder: i,
1590
1590
  type: "search",
1591
1591
  name: "search",
@@ -1606,11 +1606,11 @@ const wn = {
1606
1606
  placeholder: l = "Select an option...",
1607
1607
  disabled: m = !1,
1608
1608
  error: o,
1609
- ref: h,
1609
+ ref: u,
1610
1610
  // From RHF's <Controller>
1611
- showSearch: u = !0
1611
+ showSearch: h = !0
1612
1612
  }) => {
1613
- const [N, y] = L("");
1613
+ const [N, y] = B("");
1614
1614
  console.log("Select component - value:", a, "type:", typeof a), console.log("Select component - options:", i);
1615
1615
  const r = N === "" ? i : i.filter(
1616
1616
  (d) => d.label.toLowerCase().includes(N.toLowerCase())
@@ -1623,7 +1623,7 @@ const wn = {
1623
1623
  }
1624
1624
  return d.id === a || d.value === a || d.label === a;
1625
1625
  });
1626
- return /* @__PURE__ */ e(Z, { value: a, onChange: s, disabled: m, children: /* @__PURE__ */ n("div", { className: "select-wrapper", ref: h, children: [
1626
+ return /* @__PURE__ */ e(Z, { value: a, onChange: s, disabled: m, children: /* @__PURE__ */ n("div", { className: "select-wrapper", ref: u, children: [
1627
1627
  t && /* @__PURE__ */ e("label", { className: "select-label", children: t }),
1628
1628
  /* @__PURE__ */ n("div", { className: "select-button-container", children: [
1629
1629
  /* @__PURE__ */ n(
@@ -1645,7 +1645,7 @@ const wn = {
1645
1645
  leaveFrom: "opacity-100",
1646
1646
  leaveTo: "opacity-0",
1647
1647
  children: /* @__PURE__ */ n(Br, { className: "select-options", children: [
1648
- u && /* @__PURE__ */ e("div", { className: "search-input-wrapper", children: /* @__PURE__ */ e(
1648
+ h && /* @__PURE__ */ e("div", { className: "search-input-wrapper", children: /* @__PURE__ */ e(
1649
1649
  he,
1650
1650
  {
1651
1651
  value: N,
@@ -1686,8 +1686,8 @@ const wn = {
1686
1686
  ] }),
1687
1687
  o && /* @__PURE__ */ e("p", { className: "select-error-message", children: o })
1688
1688
  ] }) });
1689
- }, On = () => {
1690
- const [t, a] = L(window.location.pathname);
1689
+ }, In = () => {
1690
+ const [t, a] = B(window.location.pathname);
1691
1691
  return te(() => {
1692
1692
  const s = () => {
1693
1693
  a(window.location.pathname);
@@ -1702,11 +1702,11 @@ const wn = {
1702
1702
  return s;
1703
1703
  return null;
1704
1704
  }, pa = ({ item: t, isCollapsed: a, level: s = 0 }) => {
1705
- const { pathname: i } = On(), l = t.href || t.url || t.path, [m, o] = L(!1), h = t.icon;
1705
+ const { pathname: i } = In(), l = t.href || t.url || t.path, [m, o] = B(!1), u = t.icon;
1706
1706
  te(() => {
1707
1707
  ft([t], i) && o(!0);
1708
1708
  }, [t, i]);
1709
- const u = i === l, N = !u && !!ft([t], i), y = (r) => {
1709
+ const h = i === l, N = !h && !!ft([t], i), y = (r) => {
1710
1710
  r.preventDefault(), o(!m);
1711
1711
  };
1712
1712
  return /* @__PURE__ */ n(
@@ -1724,12 +1724,12 @@ const wn = {
1724
1724
  target: t.target,
1725
1725
  rel: t.target === "_blank" ? "noopener noreferrer" : void 0,
1726
1726
  className: H("nav-item", {
1727
- "nav-item--active": u,
1727
+ "nav-item--active": h,
1728
1728
  "nav-item--collapsed": a
1729
1729
  }),
1730
- "aria-current": u ? "page" : void 0,
1730
+ "aria-current": h ? "page" : void 0,
1731
1731
  children: [
1732
- h && /* @__PURE__ */ e(h, { className: "nav-icon", "aria-hidden": "true" }),
1732
+ u && /* @__PURE__ */ e(u, { className: "nav-icon", "aria-hidden": "true" }),
1733
1733
  /* @__PURE__ */ e("span", { className: "nav-label", children: t.label || t.name }),
1734
1734
  t.children && /* @__PURE__ */ e(
1735
1735
  "button",
@@ -1781,7 +1781,7 @@ const wn = {
1781
1781
  onToggleMobile: l,
1782
1782
  logoSmall: m,
1783
1783
  logoLarge: o,
1784
- user: h = { name: "", email: "" }
1784
+ user: u = { name: "", email: "" }
1785
1785
  }) => /* @__PURE__ */ n(ee, { children: [
1786
1786
  i && /* @__PURE__ */ e(
1787
1787
  "div",
@@ -1824,12 +1824,12 @@ const wn = {
1824
1824
  }
1825
1825
  )
1826
1826
  ] }),
1827
- /* @__PURE__ */ e("nav", { className: "sidebar-nav", "aria-label": "Primary", children: /* @__PURE__ */ e("ul", { className: "sidebar-nav-list", children: t.map((u) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(pa, { item: u, isCollapsed: a }) }, u.label || u.name)) }) }),
1827
+ /* @__PURE__ */ e("nav", { className: "sidebar-nav", "aria-label": "Primary", children: /* @__PURE__ */ e("ul", { className: "sidebar-nav-list", children: t.map((h) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(pa, { item: h, isCollapsed: a }) }, h.label || h.name)) }) }),
1828
1828
  /* @__PURE__ */ n("div", { className: "sidebar-footer", children: [
1829
- /* @__PURE__ */ e(ze, { src: h.avatar, name: h.name, size: "medium" }),
1829
+ /* @__PURE__ */ e(ze, { src: u.avatar, name: u.name, size: "medium" }),
1830
1830
  /* @__PURE__ */ n("div", { className: "user-info", children: [
1831
- /* @__PURE__ */ e("span", { className: "user-name", children: h.name }),
1832
- /* @__PURE__ */ e("span", { className: "user-email", children: h.email })
1831
+ /* @__PURE__ */ e("span", { className: "user-name", children: u.name }),
1832
+ /* @__PURE__ */ e("span", { className: "user-email", children: u.email })
1833
1833
  ] }),
1834
1834
  /* @__PURE__ */ e(
1835
1835
  "button",
@@ -1890,16 +1890,16 @@ const wn = {
1890
1890
  // ✅ New prop for max length
1891
1891
  showCharCount: o = !1,
1892
1892
  // ✅ New prop to control visibility
1893
- ...h
1893
+ ...u
1894
1894
  }) => {
1895
- const u = a || h.name, [N, y] = L(
1896
- h.value?.length || h.defaultValue?.length || 0
1895
+ const h = a || u.name, [N, y] = B(
1896
+ u.value?.length || u.defaultValue?.length || 0
1897
1897
  ), r = (d) => {
1898
- y(d.target.value.length), h.onChange && h.onChange(d);
1898
+ y(d.target.value.length), u.onChange && u.onChange(d);
1899
1899
  }, v = m - N;
1900
1900
  return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${i || ""}`, children: [
1901
1901
  /* @__PURE__ */ n("div", { className: "textarea-header", children: [
1902
- t && /* @__PURE__ */ e("label", { htmlFor: u, className: "textarea-label", children: t }),
1902
+ t && /* @__PURE__ */ e("label", { htmlFor: h, className: "textarea-label", children: t }),
1903
1903
  o && m && /* @__PURE__ */ n("span", { className: "char-counter", children: [
1904
1904
  v,
1905
1905
  " characters remaining"
@@ -1908,14 +1908,14 @@ const wn = {
1908
1908
  /* @__PURE__ */ e(
1909
1909
  "textarea",
1910
1910
  {
1911
- id: u,
1911
+ id: h,
1912
1912
  ref: l,
1913
1913
  className: H("textarea-field", {
1914
1914
  "textarea-field--error": !!s
1915
1915
  }),
1916
1916
  maxLength: m,
1917
1917
  onChange: r,
1918
- ...h
1918
+ ...u
1919
1919
  }
1920
1920
  ),
1921
1921
  s && /* @__PURE__ */ e("p", { className: "textarea-error-message", children: s })
@@ -1946,7 +1946,7 @@ const wn = {
1946
1946
  t && i === "right" && /* @__PURE__ */ e(st.Label, { className: "switch-label", passive: !0, children: t })
1947
1947
  ] }),
1948
1948
  l && /* @__PURE__ */ e("p", { className: "switch-error-message", children: l })
1949
- ] }), Ol = ({
1949
+ ] }), Il = ({
1950
1950
  children: t,
1951
1951
  content: a,
1952
1952
  variant: s = "dark",
@@ -1959,13 +1959,13 @@ const wn = {
1959
1959
  // For external styling of the tooltip itself
1960
1960
  ...o
1961
1961
  }) => {
1962
- const h = ae.useId();
1962
+ const u = ae.useId();
1963
1963
  return /* @__PURE__ */ n(ee, { children: [
1964
- ae.cloneElement(t, { "data-tooltip-id": h }),
1964
+ ae.cloneElement(t, { "data-tooltip-id": u }),
1965
1965
  /* @__PURE__ */ e(
1966
1966
  Wa,
1967
1967
  {
1968
- id: h,
1968
+ id: u,
1969
1969
  content: a,
1970
1970
  place: l,
1971
1971
  variant: s,
@@ -1974,7 +1974,7 @@ const wn = {
1974
1974
  }
1975
1975
  )
1976
1976
  ] });
1977
- }, In = {
1977
+ }, On = {
1978
1978
  enter: (t) => ({
1979
1979
  x: t > 0 ? "100%" : "-100%",
1980
1980
  opacity: 0
@@ -1987,7 +1987,7 @@ const wn = {
1987
1987
  x: t < 0 ? "100%" : "-100%",
1988
1988
  opacity: 0
1989
1989
  })
1990
- }, Il = ({
1990
+ }, Ol = ({
1991
1991
  isOpen: t,
1992
1992
  onClose: a,
1993
1993
  steps: s = {},
@@ -1995,8 +1995,8 @@ const wn = {
1995
1995
  direction: l = 1,
1996
1996
  stepProps: m = {},
1997
1997
  title: o,
1998
- description: h,
1999
- showProgress: u = !0,
1998
+ description: u,
1999
+ showProgress: h = !0,
2000
2000
  closeOnOverlayClick: N = !0
2001
2001
  }) => {
2002
2002
  const y = s[i], r = Object.keys(s), v = r.indexOf(i), d = (v + 1) / r.length * 100, g = v > 0 && m.onBack;
@@ -2045,7 +2045,7 @@ const wn = {
2045
2045
  ),
2046
2046
  /* @__PURE__ */ n("div", { className: "wizard-header-text", children: [
2047
2047
  /* @__PURE__ */ e(be.Title, { as: "h3", className: "wizard-title", children: o }),
2048
- h && /* @__PURE__ */ e(be.Description, { className: "wizard-description", children: h })
2048
+ u && /* @__PURE__ */ e(be.Description, { className: "wizard-description", children: u })
2049
2049
  ] })
2050
2050
  ] }),
2051
2051
  /* @__PURE__ */ e(
@@ -2058,7 +2058,7 @@ const wn = {
2058
2058
  }
2059
2059
  )
2060
2060
  ] }),
2061
- u && /* @__PURE__ */ e("div", { className: "wizard-progress-container", children: /* @__PURE__ */ e(
2061
+ h && /* @__PURE__ */ e("div", { className: "wizard-progress-container", children: /* @__PURE__ */ e(
2062
2062
  "div",
2063
2063
  {
2064
2064
  className: "wizard-progress-bar",
@@ -2075,7 +2075,7 @@ const wn = {
2075
2075
  le.div,
2076
2076
  {
2077
2077
  custom: l,
2078
- variants: In,
2078
+ variants: On,
2079
2079
  initial: "enter",
2080
2080
  animate: "center",
2081
2081
  exit: "exit",
@@ -2115,18 +2115,18 @@ const wn = {
2115
2115
  category: m = "secondary",
2116
2116
  icon: o,
2117
2117
  // Renamed for clarity, expecting a component type e.g., CheckCircle
2118
- disabled: h = !1,
2119
- size: u = "small",
2118
+ disabled: u = !1,
2119
+ size: h = "small",
2120
2120
  label: N,
2121
2121
  children: y,
2122
2122
  // ✅ Add children to the props list
2123
2123
  onClick: r,
2124
2124
  ...v
2125
2125
  }) => {
2126
- const d = h, g = H(
2126
+ const d = u, g = H(
2127
2127
  "btn-base-icon",
2128
2128
  "btn-icon-only",
2129
- Pn[u],
2129
+ Pn[h],
2130
2130
  Mn[m],
2131
2131
  l
2132
2132
  );
@@ -2141,7 +2141,7 @@ const wn = {
2141
2141
  title: i,
2142
2142
  "aria-label": i,
2143
2143
  ...v,
2144
- children: o && /* @__PURE__ */ e(o, { size: u === "large" ? 20 : 16 })
2144
+ children: o && /* @__PURE__ */ e(o, { size: h === "large" ? 20 : 16 })
2145
2145
  }
2146
2146
  );
2147
2147
  }, Pl = ({
@@ -2153,17 +2153,17 @@ const wn = {
2153
2153
  tertiary: m,
2154
2154
  fullHeight: o = !1,
2155
2155
  // A clearer prop name
2156
- ...h
2156
+ ...u
2157
2157
  }) => {
2158
- const u = H(
2158
+ const h = H(
2159
2159
  "page-layout",
2160
2160
  {
2161
2161
  "page-layout--with-footer": a,
2162
2162
  "page-layout--full-height": o
2163
2163
  },
2164
- h.className
2164
+ u.className
2165
2165
  );
2166
- return /* @__PURE__ */ n("div", { className: u, ...h, children: [
2166
+ return /* @__PURE__ */ n("div", { className: h, ...u, children: [
2167
2167
  /* @__PURE__ */ e("div", { className: "page-layout-content", children: t }),
2168
2168
  a && /* @__PURE__ */ e("footer", { className: "page-layout-footer", children: s || /* @__PURE__ */ n("div", { className: "footer-actions", children: [
2169
2169
  m?.show && /* @__PURE__ */ e(
@@ -2404,7 +2404,7 @@ function Yn(t) {
2404
2404
  return console.log("Error reading JSON from localStorage"), null;
2405
2405
  }
2406
2406
  }
2407
- function Ot() {
2407
+ function It() {
2408
2408
  const t = Yn("userProfile") || {}, a = localStorage.getItem("access_token") || t.accessToken || "", s = localStorage.getItem("siteId") || t.siteId || "", i = t.tenant || "", l = t.tenantdomain || "", m = t.username || t.displayName || "", o = t.email || "";
2409
2409
  return {
2410
2410
  Authorization: a ? `Bearer ${a}` : void 0,
@@ -2418,13 +2418,13 @@ function Ot() {
2418
2418
  }
2419
2419
  function Wn(t) {
2420
2420
  if (t && t.isAxiosError) {
2421
- const { response: a, config: s, message: i } = t, l = a?.status ?? null, m = a?.statusText ?? null, o = a?.data ?? null, h = typeof o == "string" && o || o?.message || o?.msg || o?.error || o?.errors?.[0]?.message || null;
2421
+ const { response: a, config: s, message: i } = t, l = a?.status ?? null, m = a?.statusText ?? null, o = a?.data ?? null, u = typeof o == "string" && o || o?.message || o?.msg || o?.error || o?.errors?.[0]?.message || null;
2422
2422
  return {
2423
2423
  ok: !1,
2424
2424
  status: l,
2425
2425
  statusText: m,
2426
2426
  code: o?.code || null,
2427
- message: h || i || "Request failed",
2427
+ message: u || i || "Request failed",
2428
2428
  details: o || null,
2429
2429
  request: {
2430
2430
  url: s?.url || null,
@@ -2465,12 +2465,12 @@ function Jn({
2465
2465
  );
2466
2466
  function i({ open: N = !1, customHeader: y = {} } = {}) {
2467
2467
  if (N) {
2468
- const { Authorization: r, ...v } = Ot();
2468
+ const { Authorization: r, ...v } = It();
2469
2469
  return {
2470
2470
  headers: { ...v, ...a, ...y }
2471
2471
  };
2472
2472
  }
2473
- return { headers: { ...Ot(), ...y } };
2473
+ return { headers: { ...It(), ...y } };
2474
2474
  }
2475
2475
  async function l(N, y, r = !1, v = {}) {
2476
2476
  return s.get(N, {
@@ -2485,10 +2485,10 @@ function Jn({
2485
2485
  async function o(N, y = {}, r = !1, v = {}) {
2486
2486
  return s.post(N, y, i({ open: r, customHeader: v }));
2487
2487
  }
2488
- async function h(N, y = {}, r = !1, v = {}) {
2488
+ async function u(N, y = {}, r = !1, v = {}) {
2489
2489
  return s.put(N, y, i({ open: r, customHeader: v }));
2490
2490
  }
2491
- async function u(N, y = {}, r = !1, v = {}) {
2491
+ async function h(N, y = {}, r = !1, v = {}) {
2492
2492
  return s.patch(N, y, i({ open: r, customHeader: v }));
2493
2493
  }
2494
2494
  return {
@@ -2497,8 +2497,8 @@ function Jn({
2497
2497
  axiosGet: l,
2498
2498
  axiosDelete: m,
2499
2499
  axiosPost: o,
2500
- axiosPut: h,
2501
- axiosPatch: u
2500
+ axiosPut: u,
2501
+ axiosPatch: h
2502
2502
  };
2503
2503
  }
2504
2504
  const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl = Fe.axiosPut, _l = Fe.axiosPatch, Ul = Fe.instance, Xn = async (t, a) => {
@@ -2528,7 +2528,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2528
2528
  type: "User",
2529
2529
  avatarUrl: a?.profileImage || Ye(l)
2530
2530
  };
2531
- }), It = (t) => {
2531
+ }), Ot = (t) => {
2532
2532
  try {
2533
2533
  const a = JSON.parse(t);
2534
2534
  return Array.isArray(a) ? a : [];
@@ -2579,15 +2579,15 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2579
2579
  if (Array.isArray(s))
2580
2580
  i = s;
2581
2581
  else if (typeof s == "string")
2582
- i = It(s.trim());
2582
+ i = Ot(s.trim());
2583
2583
  else if (s && typeof s == "object") {
2584
2584
  const l = s.data;
2585
- Array.isArray(l) ? i = l : typeof l == "string" && (i = It(l.trim()));
2585
+ Array.isArray(l) ? i = l : typeof l == "string" && (i = Ot(l.trim()));
2586
2586
  }
2587
2587
  return Hn(i);
2588
2588
  }
2589
2589
  }, Ct = (t, a) => {
2590
- const [s, i] = L(t);
2590
+ const [s, i] = B(t);
2591
2591
  return te(
2592
2592
  () => {
2593
2593
  const l = Kr(() => {
@@ -2608,9 +2608,9 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2608
2608
  }) => {
2609
2609
  const l = t.slice(0, 2), m = [];
2610
2610
  t.length > 0 && m.push(t[0].name), a.length > 0 && m.push(a[0].name), s.length > 0 && m.length < 2 && m.push(s[0].name);
2611
- const o = t.length + a.length + s.length, h = o - m.length;
2612
- let u = m.join(", ");
2613
- return h > 0 && (u += ` and ${h} others`), o === 0 ? /* @__PURE__ */ e(
2611
+ const o = t.length + a.length + s.length, u = o - m.length;
2612
+ let h = m.join(", ");
2613
+ return u > 0 && (h += ` and ${u} others`), o === 0 ? /* @__PURE__ */ e(
2614
2614
  "div",
2615
2615
  {
2616
2616
  className: "flex items-center justify-between p-3 border border-dashed border-gray-400 rounded-lg hover:bg-gray-50",
@@ -2633,7 +2633,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2633
2633
  },
2634
2634
  N.id || y
2635
2635
  )) }),
2636
- /* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-800 truncate", children: u })
2636
+ /* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-800 truncate", children: h })
2637
2637
  ] }),
2638
2638
  /* @__PURE__ */ e(fe, { size: 20 })
2639
2639
  ]
@@ -2657,54 +2657,54 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2657
2657
  showExistingShares: m = !1,
2658
2658
  onFinalSubmit: o = () => {
2659
2659
  },
2660
- isChanged: h = !1
2660
+ isChanged: u = !1
2661
2661
  }) => {
2662
- const [u, N] = L(Pt[0]), [y, r] = L(""), v = Ct(y, 400), [d, g] = L([]), [z, A] = L(/* @__PURE__ */ new Set()), [E, O] = L(!1), [M, _] = L(Mt[0]), {
2662
+ const [h, N] = B(Pt[0]), [y, r] = B(""), v = Ct(y, 400), [d, g] = B([]), [z, A] = B(/* @__PURE__ */ new Set()), [E, I] = B(!1), [M, _] = B(Mt[0]), {
2663
2663
  control: U,
2664
2664
  handleSubmit: Y,
2665
- watch: G,
2665
+ watch: q,
2666
2666
  formState: { errors: T, isSubmitting: x }
2667
2667
  } = er({
2668
2668
  defaultValues: { pendingInvites: [] },
2669
2669
  resolver: rr(Zn)
2670
- }), { fields: f, append: C, remove: I, update: R } = tr({
2670
+ }), { fields: f, append: C, remove: O, update: R } = tr({
2671
2671
  control: U,
2672
2672
  name: "pendingInvites"
2673
- }), D = G("pendingInvites");
2673
+ }), D = q("pendingInvites");
2674
2674
  te(() => {
2675
- v.length > 1 ? (O(!0), Xn(u.name, v).then((S) => {
2675
+ v.length > 1 ? (I(!0), Xn(h.name, v).then((S) => {
2676
2676
  g(S);
2677
- }).catch((S) => console.error("Search failed:", S)).finally(() => O(!1))) : (g([]), A(/* @__PURE__ */ new Set()));
2678
- }, [v, u]);
2677
+ }).catch((S) => console.error("Search failed:", S)).finally(() => I(!1))) : (g([]), A(/* @__PURE__ */ new Set()));
2678
+ }, [v, h]);
2679
2679
  const b = (S) => {
2680
- A((B) => {
2681
- const j = new Set(B);
2680
+ A((L) => {
2681
+ const j = new Set(L);
2682
2682
  return j.has(S) ? j.delete(S) : j.add(S), j;
2683
2683
  });
2684
2684
  }, p = () => {
2685
2685
  d.filter((S) => z.has(S.id)).forEach((S) => {
2686
- f.find((B) => B.id === S.id) || C({ ...S, permission: M.name });
2686
+ f.find((L) => L.id === S.id) || C({ ...S, permission: M.name });
2687
2687
  }), A(/* @__PURE__ */ new Set()), r("");
2688
2688
  }, k = (S) => {
2689
2689
  _(S), f.forEach(
2690
- (B, j) => R(j, { ...f[j], permission: S.name })
2690
+ (L, j) => R(j, { ...f[j], permission: S.name })
2691
2691
  );
2692
2692
  }, w = async (S) => {
2693
2693
  try {
2694
2694
  if (l === me.DRIVE) {
2695
- const B = S.pendingInvites.map((F) => ({
2695
+ const L = S.pendingInvites.map((F) => ({
2696
2696
  id: F.id,
2697
2697
  permission: F.permission,
2698
2698
  type: F.type.toLowerCase()
2699
2699
  }));
2700
2700
  o({
2701
2701
  entity: t,
2702
- userGroupRolesObj: B,
2702
+ userGroupRolesObj: L,
2703
2703
  existingShares: i
2704
2704
  // Always send updated existing shares
2705
2705
  }, i);
2706
2706
  } else if (l === me.INTEREST) {
2707
- const B = S.pendingInvites.map((j) => ({
2707
+ const L = S.pendingInvites.map((j) => ({
2708
2708
  identity: j.id,
2709
2709
  type: j.type.toLowerCase(),
2710
2710
  opt: !0,
@@ -2713,16 +2713,16 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2713
2713
  userName: j.name,
2714
2714
  interestId: t?.data?.id
2715
2715
  }));
2716
- o(B, i);
2716
+ o(L, i);
2717
2717
  } else if (l === me.ARTICLE) {
2718
- const B = S.pendingInvites.map((F) => ({
2718
+ const L = S.pendingInvites.map((F) => ({
2719
2719
  id: F.id,
2720
2720
  permission: F.permission,
2721
2721
  type: F.type.toLowerCase()
2722
2722
  }));
2723
2723
  o({
2724
2724
  entity: t,
2725
- userGroupRolesObj: B,
2725
+ userGroupRolesObj: L,
2726
2726
  existingShares: i
2727
2727
  }, i);
2728
2728
  } else
@@ -2730,12 +2730,12 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2730
2730
  setTimeout(() => {
2731
2731
  s();
2732
2732
  }, 1e3);
2733
- } catch (B) {
2734
- throw console.error("Failed to submit invites:", B), B;
2733
+ } catch (L) {
2734
+ throw console.error("Failed to submit invites:", L), L;
2735
2735
  }
2736
2736
  }, $ = (S) => {
2737
- const B = i[u.code].find((j) => j.name === S.name && j.permission !== "remove") || D.find((j) => j.name === S.name);
2738
- return B ? `${B.permission}` : "";
2737
+ const L = i[h.code].find((j) => j.name === S.name && j.permission !== "remove") || D.find((j) => j.name === S.name);
2738
+ return L ? `${L.permission}` : "";
2739
2739
  }, P = () => {
2740
2740
  switch (l) {
2741
2741
  case me.DRIVE:
@@ -2748,7 +2748,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2748
2748
  return "Add User, Groups or Roles test";
2749
2749
  }
2750
2750
  };
2751
- return se(() => (console.log("InviteFlow - isChanged:", h, "pendingInvites.length:", D.length), D.length === 0 && !h), [D.length, h]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
2751
+ return se(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:", D.length), D.length === 0 && !u), [D.length, u]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
2752
2752
  /* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
2753
2753
  /* @__PURE__ */ e(be.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: P() }),
2754
2754
  /* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
@@ -2777,11 +2777,11 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2777
2777
  }
2778
2778
  ),
2779
2779
  /* @__PURE__ */ n("div", { className: "relative grid grid-cols-3 gap-2 items-start", children: [
2780
- /* @__PURE__ */ e("div", { className: "col-span-1", children: /* @__PURE__ */ e(Z, { value: u, onChange: N, children: /* @__PURE__ */ n("div", { className: "relative", children: [
2780
+ /* @__PURE__ */ e("div", { className: "col-span-1", children: /* @__PURE__ */ e(Z, { value: h, onChange: N, children: /* @__PURE__ */ n("div", { className: "relative", children: [
2781
2781
  /* @__PURE__ */ n(Z.Button, { className: "relative w-full border border-gray-300 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: [
2782
2782
  /* @__PURE__ */ n("span", { className: "flex items-center", children: [
2783
- /* @__PURE__ */ e(u.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
2784
- /* @__PURE__ */ e("span", { className: "truncate", children: u.name })
2783
+ /* @__PURE__ */ e(h.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
2784
+ /* @__PURE__ */ e("span", { className: "truncate", children: h.name })
2785
2785
  ] }),
2786
2786
  /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(dt, { className: "h-5 w-5 text-gray-400" }) })
2787
2787
  ] }),
@@ -2796,24 +2796,24 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2796
2796
  Z.Option,
2797
2797
  {
2798
2798
  value: S,
2799
- className: ({ active: B }) => `${B ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2800
- children: ({ selected: B }) => /* @__PURE__ */ n(ee, { children: [
2799
+ className: ({ active: L }) => `${L ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2800
+ children: ({ selected: L }) => /* @__PURE__ */ n(ee, { children: [
2801
2801
  /* @__PURE__ */ n(
2802
2802
  "span",
2803
2803
  {
2804
- className: `${B ? "font-medium" : "font-normal"} flex items-center`,
2804
+ className: `${L ? "font-medium" : "font-normal"} flex items-center`,
2805
2805
  children: [
2806
2806
  /* @__PURE__ */ e(
2807
2807
  S.icon,
2808
2808
  {
2809
- className: `h-5 w-5 mr-2 ${B ? "text-white" : "text-gray-400"}`
2809
+ className: `h-5 w-5 mr-2 ${L ? "text-white" : "text-gray-400"}`
2810
2810
  }
2811
2811
  ),
2812
2812
  S.name
2813
2813
  ]
2814
2814
  }
2815
2815
  ),
2816
- B && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-white", children: /* @__PURE__ */ e(mt, { className: "h-5 w-5" }) })
2816
+ L && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-white", children: /* @__PURE__ */ e(mt, { className: "h-5 w-5" }) })
2817
2817
  ] })
2818
2818
  },
2819
2819
  S.id
@@ -2824,7 +2824,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2824
2824
  /* @__PURE__ */ e("div", { className: "col-span-2", children: /* @__PURE__ */ e(
2825
2825
  he,
2826
2826
  {
2827
- placeholder: `Search by ${u.name.toLowerCase()}...`,
2827
+ placeholder: `Search by ${h.name.toLowerCase()}...`,
2828
2828
  onDebouncedChange: (S) => r(S),
2829
2829
  value: y
2830
2830
  }
@@ -2839,12 +2839,12 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2839
2839
  className: "absolute top-full mt-2 w-full col-span-3 bg-white border border-gray-300 rounded-lg shadow-lg z-10",
2840
2840
  children: E ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500", children: "Loading..." }) : /* @__PURE__ */ n(ee, { children: [
2841
2841
  /* @__PURE__ */ e("div", { className: "max-h-60 overflow-y-auto p-2 space-y-1", children: d.map((S) => {
2842
- const B = $(S);
2842
+ const L = $(S);
2843
2843
  return /* @__PURE__ */ n(
2844
2844
  "div",
2845
2845
  {
2846
- onClick: () => B ? null : b(S.id),
2847
- className: `flex items-center gap-3 p-2 rounded-md hover:bg-blue-50 ${B ? " hover:cursor-not-allowed" : "hover:cursor-pointer"}`,
2846
+ onClick: () => L ? null : b(S.id),
2847
+ className: `flex items-center gap-3 p-2 rounded-md hover:bg-blue-50 ${L ? " hover:cursor-not-allowed" : "hover:cursor-pointer"}`,
2848
2848
  children: [
2849
2849
  /* @__PURE__ */ e(
2850
2850
  "input",
@@ -2853,7 +2853,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2853
2853
  checked: z.has(S.id),
2854
2854
  readOnly: !0,
2855
2855
  className: "h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500",
2856
- disabled: !!B
2856
+ disabled: !!L
2857
2857
  }
2858
2858
  ),
2859
2859
  /* @__PURE__ */ e(
@@ -2865,8 +2865,8 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2865
2865
  }
2866
2866
  ),
2867
2867
  /* @__PURE__ */ e("span", { className: "text-md font-medium text-gray-800 truncate", children: S.name }),
2868
- B ? /* @__PURE__ */ n(ee, { children: [
2869
- /* @__PURE__ */ e("span", { className: "text-sm px-[12px] py-[2px] border border-dashed rounded-xl bg-teal-100 text-teal-700", children: B }),
2868
+ L ? /* @__PURE__ */ n(ee, { children: [
2869
+ /* @__PURE__ */ e("span", { className: "text-sm px-[12px] py-[2px] border border-dashed rounded-xl bg-teal-100 text-teal-700", children: L }),
2870
2870
  /* @__PURE__ */ e("span", { className: "text-sm text-gray-400", children: "Already added" })
2871
2871
  ] }) : ""
2872
2872
  ]
@@ -2937,12 +2937,12 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2937
2937
  Z.Option,
2938
2938
  {
2939
2939
  value: S,
2940
- className: ({ active: B }) => `${B ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2941
- children: ({ selected: B, active: j }) => /* @__PURE__ */ n(ee, { children: [
2940
+ className: ({ active: L }) => `${L ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2941
+ children: ({ selected: L, active: j }) => /* @__PURE__ */ n(ee, { children: [
2942
2942
  /* @__PURE__ */ n(
2943
2943
  "span",
2944
2944
  {
2945
- className: `${B ? "font-medium" : "font-normal"} flex items-center`,
2945
+ className: `${L ? "font-medium" : "font-normal"} flex items-center`,
2946
2946
  children: [
2947
2947
  /* @__PURE__ */ e(
2948
2948
  S.icon,
@@ -2955,7 +2955,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2955
2955
  ]
2956
2956
  }
2957
2957
  ),
2958
- B && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(
2958
+ L && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(
2959
2959
  mt,
2960
2960
  {
2961
2961
  className: "h-5 w-5",
@@ -2972,7 +2972,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2972
2972
  }
2973
2973
  )
2974
2974
  ] }),
2975
- /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(Ce, { children: f.map((S, B) => /* @__PURE__ */ n(
2975
+ /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(Ce, { children: f.map((S, L) => /* @__PURE__ */ n(
2976
2976
  le.div,
2977
2977
  {
2978
2978
  layout: !0,
@@ -3000,7 +3000,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3000
3000
  /* @__PURE__ */ e(
3001
3001
  "button",
3002
3002
  {
3003
- onClick: () => I(B),
3003
+ onClick: () => O(L),
3004
3004
  className: "text-gray-400 hover:text-red-500 hover:cursor-pointer",
3005
3005
  children: /* @__PURE__ */ e(He, { className: "h-5 w-5" })
3006
3006
  }
@@ -3034,7 +3034,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3034
3034
  "button",
3035
3035
  {
3036
3036
  onClick: () => Y(w)(),
3037
- disabled: x || D.length === 0 && !h,
3037
+ disabled: x || D.length === 0 && !u,
3038
3038
  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",
3039
3039
  children: x ? "Inviting..." : l === me.DRIVE ? "Send Invites" : "Add"
3040
3040
  }
@@ -3047,14 +3047,14 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3047
3047
  { name: "Can manage", icon: ea, value: "edit" },
3048
3048
  { name: "Remove", icon: nr, isDestructive: !0, value: "remove" }
3049
3049
  ], es = ({ item: t, allowedPermissions: a, onPermissionChange: s }) => {
3050
- const [i, l] = L(!1), { refs: m, floatingStyles: o, context: h } = la({
3050
+ const [i, l] = B(!1), { refs: m, floatingStyles: o, context: u } = la({
3051
3051
  open: i,
3052
3052
  onOpenChange: l,
3053
3053
  middleware: [ia(8), oa(), ca({ padding: 8 })],
3054
3054
  whileElementsMounted: da,
3055
3055
  placement: "bottom-end"
3056
- }), u = Xr(h), N = Hr(h), { getReferenceProps: y, getFloatingProps: r } = Qr([
3057
- u,
3056
+ }), h = Xr(u), N = Hr(u), { getReferenceProps: y, getFloatingProps: r } = Qr([
3057
+ h,
3058
3058
  N
3059
3059
  ]), v = it.find((g) => g.name === t.permission || g.value === t.permission) || it[0];
3060
3060
  return (
@@ -3135,31 +3135,31 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3135
3135
  existingShares: l,
3136
3136
  allowedPermissions: m
3137
3137
  }) => {
3138
- const [o, h] = L(l), [u, N] = L(0), [y, r] = L(""), v = Ct(y, 300), d = {
3138
+ const [o, u] = B(l), [h, N] = B(0), [y, r] = B(""), v = Ct(y, 300), d = {
3139
3139
  users: o.users.filter(
3140
- (O) => O.name.toLowerCase().includes(v.toLowerCase())
3140
+ (I) => I.name.toLowerCase().includes(v.toLowerCase())
3141
3141
  ),
3142
3142
  groups: o.groups.filter(
3143
- (O) => O.name.toLowerCase().includes(v.toLowerCase())
3143
+ (I) => I.name.toLowerCase().includes(v.toLowerCase())
3144
3144
  ),
3145
3145
  roles: o.roles.filter(
3146
- (O) => O.name.toLowerCase().includes(v.toLowerCase())
3146
+ (I) => I.name.toLowerCase().includes(v.toLowerCase())
3147
3147
  )
3148
- }, g = async (O, M, _, U) => {
3148
+ }, g = async (I, M, _, U) => {
3149
3149
  const Y = M.value;
3150
- h((G) => ({
3151
- ...G,
3152
- [_]: G[_].map(
3153
- (T) => T.id === O.id ? { ...T, permission: Y } : T
3150
+ u((q) => ({
3151
+ ...q,
3152
+ [_]: q[_].map(
3153
+ (T) => T.id === I.id ? { ...T, permission: Y } : T
3154
3154
  )
3155
3155
  }));
3156
3156
  }, z = () => {
3157
- const O = {
3157
+ const I = {
3158
3158
  users: o.users.filter((M) => M.permission !== "remove"),
3159
3159
  groups: o.groups.filter((M) => M.permission !== "remove"),
3160
3160
  roles: o.roles.filter((M) => M.permission !== "remove")
3161
3161
  };
3162
- a(O);
3162
+ a(I);
3163
3163
  }, A = ["users", "groups", "roles"], E = ["Users", "Groups", "Roles"];
3164
3164
  return (
3165
3165
  // The main structure remains the same...
@@ -3187,9 +3187,9 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3187
3187
  )
3188
3188
  ] }),
3189
3189
  /* @__PURE__ */ n("div", { className: "flex flex-col flex-grow", children: [
3190
- /* @__PURE__ */ n(ne.Group, { selectedIndex: u, onChange: N, children: [
3190
+ /* @__PURE__ */ n(ne.Group, { selectedIndex: h, onChange: N, children: [
3191
3191
  /* @__PURE__ */ n("div", { className: "p-4 bg-white border-b border-gray-300", children: [
3192
- /* @__PURE__ */ e(ne.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: E.map((O) => /* @__PURE__ */ e(
3192
+ /* @__PURE__ */ e(ne.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: E.map((I) => /* @__PURE__ */ e(
3193
3193
  ne,
3194
3194
  {
3195
3195
  className: ({
@@ -3197,16 +3197,16 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3197
3197
  }) => `w-full py-2 text-sm font-medium leading-5 rounded-md
3198
3198
  focus:outline-none focus:ring-2 ring-offset-2 ring-offset-blue-400 ring-white ring-opacity-60
3199
3199
  ${M ? "bg-white shadow text-blue-700" : "text-gray-600 hover:bg-white/[0.6]"}`,
3200
- children: O
3200
+ children: I
3201
3201
  },
3202
- O
3202
+ I
3203
3203
  )) }),
3204
3204
  /* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ e(
3205
3205
  he,
3206
3206
  {
3207
3207
  onDebouncedChange: r,
3208
3208
  value: y,
3209
- placeholder: `Search in ${E[u]}...`
3209
+ placeholder: `Search in ${E[h]}...`
3210
3210
  }
3211
3211
  ) })
3212
3212
  ] }),
@@ -3217,11 +3217,11 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3217
3217
  animate: { y: 0, opacity: 1 },
3218
3218
  exit: { y: -10, opacity: 0 },
3219
3219
  transition: { duration: 0.2 },
3220
- children: /* @__PURE__ */ e(ne.Panels, { as: Q, children: A.map((O) => /* @__PURE__ */ e(
3220
+ children: /* @__PURE__ */ e(ne.Panels, { as: Q, children: A.map((I) => /* @__PURE__ */ e(
3221
3221
  ne.Panel,
3222
3222
  {
3223
3223
  className: "space-y-3 focus:outline-none",
3224
- children: /* @__PURE__ */ e(Ce, { children: d[O].length > 0 ? d[O].map((M) => /* @__PURE__ */ n(
3224
+ children: /* @__PURE__ */ e(Ce, { children: d[I].length > 0 ? d[I].map((M) => /* @__PURE__ */ n(
3225
3225
  le.div,
3226
3226
  {
3227
3227
  layout: !0,
@@ -3245,12 +3245,12 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3245
3245
  ),
3246
3246
  /* @__PURE__ */ n("div", { className: "overflow-hidden", children: [
3247
3247
  /* @__PURE__ */ e("p", { className: "font-medium text-gray-900 truncate", children: M.name }),
3248
- O !== "users" && /* @__PURE__ */ e(
3248
+ I !== "users" && /* @__PURE__ */ e(
3249
3249
  "button",
3250
3250
  {
3251
3251
  onClick: () => i({
3252
3252
  id: M.id,
3253
- type: O,
3253
+ type: I,
3254
3254
  name: M.name
3255
3255
  }),
3256
3256
  className: "text-sm text-blue-600 hover:underline hover:cursor-pointer",
@@ -3267,7 +3267,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3267
3267
  onPermissionChange: (_) => g(
3268
3268
  M,
3269
3269
  _,
3270
- O
3270
+ I
3271
3271
  )
3272
3272
  }
3273
3273
  )
@@ -3286,19 +3286,19 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3286
3286
  /* @__PURE__ */ e(Zt, { className: "h-12 w-12 text-gray-400" }),
3287
3287
  /* @__PURE__ */ n("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: [
3288
3288
  "No ",
3289
- E[u],
3289
+ E[h],
3290
3290
  " Found"
3291
3291
  ] }),
3292
- /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: y ? `No results for "${y}"` : `There are no ${E[u].toLowerCase()} with access.` })
3292
+ /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: y ? `No results for "${y}"` : `There are no ${E[h].toLowerCase()} with access.` })
3293
3293
  ]
3294
3294
  }
3295
3295
  )
3296
3296
  ) })
3297
3297
  },
3298
- O
3298
+ I
3299
3299
  )) })
3300
3300
  },
3301
- u
3301
+ h
3302
3302
  ) }) })
3303
3303
  ] }),
3304
3304
  /* @__PURE__ */ e("div", { className: "p-4 bg-white border-t border-gray-300 flex justify-end", children: /* @__PURE__ */ e(
@@ -3325,8 +3325,8 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3325
3325
  onClose: s,
3326
3326
  members: i
3327
3327
  }) => {
3328
- const [l, m] = L(!0), [o, h] = L(""), u = Ct(o, 300), N = i.filter(
3329
- (d) => d.name.toLowerCase().includes(u.toLowerCase())
3328
+ const [l, m] = B(!0), [o, u] = B(""), h = Ct(o, 300), N = i.filter(
3329
+ (d) => d.name.toLowerCase().includes(h.toLowerCase())
3330
3330
  ), y = {
3331
3331
  hidden: { opacity: 0 },
3332
3332
  visible: {
@@ -3351,7 +3351,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3351
3351
  children: [
3352
3352
  /* @__PURE__ */ e(sr, { className: "h-12 w-12 text-gray-400" }),
3353
3353
  /* @__PURE__ */ e("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: "No Users Found" }),
3354
- /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: u ? `No one found matching "${u}"` : `There are no users in this ${t.type}.` })
3354
+ /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: h ? `No one found matching "${h}"` : `There are no users in this ${t.type}.` })
3355
3355
  ]
3356
3356
  }
3357
3357
  ) : /* @__PURE__ */ e(
@@ -3418,7 +3418,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3418
3418
  /* @__PURE__ */ e("div", { className: "p-4 border-b border-gray-200 flex-shrink-0", children: /* @__PURE__ */ e(
3419
3419
  he,
3420
3420
  {
3421
- onDebouncedChange: h,
3421
+ onDebouncedChange: u,
3422
3422
  value: o,
3423
3423
  placeholder: "Search members..."
3424
3424
  }
@@ -3443,28 +3443,28 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3443
3443
  onClose: m = () => {
3444
3444
  },
3445
3445
  showExistingShares: o = !0,
3446
- allowedPermissions: h = [],
3447
- ...u
3446
+ allowedPermissions: u = [],
3447
+ ...h
3448
3448
  }) => {
3449
- const [N, y] = L(pe.INVITE), [r, v] = L(t), [d, g] = L(null), [z, A] = L(!1), [E, O] = L([]), [M, _] = L(pe.MANAGE), U = () => {
3449
+ const [N, y] = B(pe.INVITE), [r, v] = B(t), [d, g] = B(null), [z, A] = B(!1), [E, I] = B([]), [M, _] = B(pe.MANAGE), U = () => {
3450
3450
  y(pe.INVITE), g(null), m();
3451
3451
  }, Y = () => {
3452
3452
  y(pe.MANAGE);
3453
- }, G = async ({ id: f, name: C, type: I }) => {
3454
- if (I === "groups") {
3453
+ }, q = async ({ id: f, name: C, type: O }) => {
3454
+ if (O === "groups") {
3455
3455
  try {
3456
3456
  const R = await Qe(`${We.getMembersForGroup(C)}`);
3457
3457
  } catch (R) {
3458
3458
  console.log("Error searching entities:", R);
3459
3459
  }
3460
- O(resp);
3460
+ I(resp);
3461
3461
  }
3462
- g({ id: f, type: I, name: C }), _(N), y(pe.MEMBERS);
3462
+ g({ id: f, type: O, name: C }), _(N), y(pe.MEMBERS);
3463
3463
  }, T = (f) => {
3464
3464
  console.log("changedExistingShares", f), v(f);
3465
- const C = lt.mapValues(t, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id)), I = lt.mapValues(f, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id));
3466
- console.log("Existing data:", C), console.log("Changed data:", I);
3467
- const R = !lt.isEqual(C, I);
3465
+ const C = lt.mapValues(t, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id)), O = lt.mapValues(f, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id));
3466
+ console.log("Existing data:", C), console.log("Changed data:", O);
3467
+ const R = !lt.isEqual(C, O);
3468
3468
  console.log("hasPermissionChanged:", R), A(R), y(N === pe.MEMBERS ? M : pe.INVITE);
3469
3469
  };
3470
3470
  return /* @__PURE__ */ e(ue, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(be, { as: "div", className: "relative z-50", onClose: U, children: [
@@ -3486,10 +3486,10 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3486
3486
  entity: i,
3487
3487
  onBack: T,
3488
3488
  onClose: U,
3489
- onOpenMembers: G,
3489
+ onOpenMembers: q,
3490
3490
  existingShares: r,
3491
3491
  calledBy: l,
3492
- allowedPermissions: h
3492
+ allowedPermissions: u
3493
3493
  }
3494
3494
  )
3495
3495
  },
@@ -3562,8 +3562,8 @@ function tt({
3562
3562
  },
3563
3563
  placeholder: m = "Select options",
3564
3564
  error: o = null,
3565
- displayLimit: h = 3,
3566
- selectionLimit: u = -1,
3565
+ displayLimit: u = 3,
3566
+ selectionLimit: h = -1,
3567
3567
  // NEW: search behavior
3568
3568
  searchMode: N = "client",
3569
3569
  // "client" | "server"
@@ -3575,7 +3575,7 @@ function tt({
3575
3575
  getOptionId: d = (z) => String(z.id),
3576
3576
  getOptionLabel: g = (z) => z.name
3577
3577
  }) {
3578
- const z = Xe(), A = Xe(), [E, O] = L(""), M = ge(""), _ = se(() => {
3578
+ const z = Xe(), A = Xe(), [E, I] = B(""), M = ge(""), _ = se(() => {
3579
3579
  const f = /* @__PURE__ */ new Map();
3580
3580
  for (const C of a) f.set(d(C), C);
3581
3581
  return f;
@@ -3587,18 +3587,18 @@ function tt({
3587
3587
  te(() => {
3588
3588
  N === "server" && E.length >= v && E !== M.current && (M.current = E, y && y(E));
3589
3589
  }, [E, N, v, y]);
3590
- const G = N === "client" ? Y : a, T = () => {
3590
+ const q = N === "client" ? Y : a, T = () => {
3591
3591
  if (!U.length)
3592
3592
  return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
3593
- const f = U.slice(0, h), C = U.length - h;
3593
+ const f = U.slice(0, u), C = U.length - u;
3594
3594
  return /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2", children: [
3595
- f.map((I) => /* @__PURE__ */ e(
3595
+ f.map((O) => /* @__PURE__ */ e(
3596
3596
  "span",
3597
3597
  {
3598
3598
  className: "px-2 py-1 text-xs font-medium text-white bg-gray-800 rounded-full",
3599
- children: g(I)
3599
+ children: g(O)
3600
3600
  },
3601
- d(I)
3601
+ d(O)
3602
3602
  )),
3603
3603
  C > 0 && /* @__PURE__ */ n("span", { className: "px-2 py-1 text-xs font-medium text-gray-600 bg-gray-200 rounded-full", children: [
3604
3604
  "+",
@@ -3608,8 +3608,8 @@ function tt({
3608
3608
  ] });
3609
3609
  };
3610
3610
  return /* @__PURE__ */ e(Z, { value: U, onChange: (f) => {
3611
- const C = Array.from(new Set(f.map((I) => d(I))));
3612
- u !== -1 && C.length > u || i(C);
3611
+ const C = Array.from(new Set(f.map((O) => d(O))));
3612
+ h !== -1 && C.length > h || i(C);
3613
3613
  }, multiple: !0, by: "id", children: ({ open: f }) => /* @__PURE__ */ n("div", { children: [
3614
3614
  /* @__PURE__ */ e(
3615
3615
  Z.Label,
@@ -3650,13 +3650,13 @@ function tt({
3650
3650
  he,
3651
3651
  {
3652
3652
  value: E,
3653
- onDebouncedChange: O,
3653
+ onDebouncedChange: I,
3654
3654
  placeholder: N === "server" ? `Search (min ${v})…` : "Search options…"
3655
3655
  }
3656
3656
  ) }),
3657
3657
  N === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
3658
- G.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: N === "server" ? E.length < v ? `Type at least ${v} characters to search.` : "No results." : "No options found." }) : G.map((C) => {
3659
- const I = d(C), R = g(C), D = U.some((p) => d(p) === I), b = u !== -1 && U.length >= u && !D;
3658
+ q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: N === "server" ? E.length < v ? `Type at least ${v} characters to search.` : "No results." : "No options found." }) : q.map((C) => {
3659
+ const O = d(C), R = g(C), D = U.some((p) => d(p) === O), b = h !== -1 && U.length >= h && !D;
3660
3660
  return /* @__PURE__ */ e(
3661
3661
  Z.Option,
3662
3662
  {
@@ -3689,7 +3689,7 @@ function tt({
3689
3689
  )
3690
3690
  ] })
3691
3691
  },
3692
- I
3692
+ O
3693
3693
  );
3694
3694
  })
3695
3695
  ] })
@@ -3749,9 +3749,9 @@ const Gl = ({
3749
3749
  footer: l = { show: !0, customFooter: null },
3750
3750
  primaryAction: m = { onSubmit: null, label: "Save", loader: !1, disabled: !1 },
3751
3751
  secondaryAction: o = { onCancel: null, label: "Cancel" },
3752
- dialogPanelClass: h = ""
3752
+ dialogPanelClass: u = ""
3753
3753
  }) => {
3754
- const u = (y) => {
3754
+ const h = (y) => {
3755
3755
  y.target === y.currentTarget && a(!1);
3756
3756
  }, N = (y) => {
3757
3757
  y.stopPropagation();
@@ -3767,13 +3767,13 @@ const Gl = ({
3767
3767
  Wr,
3768
3768
  {
3769
3769
  className: "fixed inset-0 bg-black/30",
3770
- onClick: u
3770
+ onClick: h
3771
3771
  }
3772
3772
  ),
3773
3773
  /* @__PURE__ */ e("div", { className: "fixed inset-0 overflow-y-auto", children: /* @__PURE__ */ e("div", { className: "flex min-h-full items-center justify-center p-4", children: /* @__PURE__ */ n(
3774
3774
  Ae,
3775
3775
  {
3776
- className: `${h} relative bg-white align-middle w-full lg:w-[36rem] mx-5 lg:mx-0 transform overflow-hidden rounded-2xl text-left shadow-xl lg:min-w-[36rem] md:min-w-96 transition-all`,
3776
+ className: `${u} relative bg-white align-middle w-full lg:w-[36rem] mx-5 lg:mx-0 transform overflow-hidden rounded-2xl text-left shadow-xl lg:min-w-[36rem] md:min-w-96 transition-all`,
3777
3777
  onClick: N,
3778
3778
  children: [
3779
3779
  /* @__PURE__ */ n("div", { className: "flex justify-between items-center border-b border-gray-200 p-6 flex-shrink-0", children: [
@@ -3846,16 +3846,16 @@ function ls({
3846
3846
  onSelect: l,
3847
3847
  onCreateChild: m,
3848
3848
  onRename: o,
3849
- onDelete: h,
3850
- renderActions: u,
3849
+ onDelete: u,
3850
+ renderActions: h,
3851
3851
  // optional override
3852
3852
  dragId: N,
3853
3853
  dropId: y,
3854
3854
  indent: r = 24
3855
3855
  }) {
3856
- const { setNodeRef: v, isOver: d } = lr({ id: y }), { attributes: g, listeners: z, setNodeRef: A, transform: E, isDragging: O } = ir({ id: N }), M = E ? { transform: `translate3d(${Math.round(E.x)}px, ${Math.round(E.y)}px, 0)` } : void 0, [_, U] = L(!1), [Y, G] = L(t.name), T = () => {
3856
+ const { setNodeRef: v, isOver: d } = lr({ id: y }), { attributes: g, listeners: z, setNodeRef: A, transform: E, isDragging: I } = ir({ id: N }), M = E ? { transform: `translate3d(${Math.round(E.x)}px, ${Math.round(E.y)}px, 0)` } : void 0, [_, U] = B(!1), [Y, q] = B(t.name), T = () => {
3857
3857
  const f = Y.trim();
3858
- U(!1), f && f !== t.name ? o?.(t, f) : G(t.name);
3858
+ U(!1), f && f !== t.name ? o?.(t, f) : q(t.name);
3859
3859
  }, x = se(() => /* @__PURE__ */ e(
3860
3860
  Bn,
3861
3861
  {
@@ -3865,15 +3865,15 @@ function ls({
3865
3865
  { action: "delete", label: "Delete" }
3866
3866
  ],
3867
3867
  onSelect: (C) => {
3868
- C.action === "create" ? m?.(t) : C.action === "rename" ? U(!0) : C.action === "delete" && h?.(t);
3868
+ C.action === "create" ? m?.(t) : C.action === "rename" ? U(!0) : C.action === "delete" && u?.(t);
3869
3869
  }
3870
3870
  }
3871
- ), [t, m, h]);
3871
+ ), [t, m, u]);
3872
3872
  return /* @__PURE__ */ n(
3873
3873
  "div",
3874
3874
  {
3875
3875
  ref: v,
3876
- className: `tv-row ${d ? "tv-drop-over" : ""} ${O ? "dragging" : ""}`,
3876
+ className: `tv-row ${d ? "tv-drop-over" : ""} ${I ? "dragging" : ""}`,
3877
3877
  style: { ...M, paddingLeft: 8 + a * r },
3878
3878
  onClick: (f) => {
3879
3879
  f.target.closest(".tv-toggle") || f.target.tagName === "INPUT" || l?.(t);
@@ -3886,19 +3886,19 @@ function ls({
3886
3886
  {
3887
3887
  className: "tv-input",
3888
3888
  value: Y,
3889
- onChange: (f) => G(f.target.value),
3889
+ onChange: (f) => q(f.target.value),
3890
3890
  onBlur: T,
3891
3891
  onKeyDown: (f) => {
3892
- f.key === "Enter" && T(), f.key === "Escape" && (U(!1), G(t.name));
3892
+ f.key === "Enter" && T(), f.key === "Escape" && (U(!1), q(t.name));
3893
3893
  },
3894
3894
  autoFocus: !0
3895
3895
  }
3896
3896
  ) : /* @__PURE__ */ e("span", { onDoubleClick: () => U(!0), children: t.name }) }),
3897
3897
  /* @__PURE__ */ e(ss, { listeners: z, attributes: g }),
3898
- /* @__PURE__ */ e("div", { className: "tv-actions", children: u ? u(t, {
3898
+ /* @__PURE__ */ e("div", { className: "tv-actions", children: h ? h(t, {
3899
3899
  onCreateChild: () => m?.(t),
3900
3900
  onRename: () => U(!0),
3901
- onDelete: () => h?.(t)
3901
+ onDelete: () => u?.(t)
3902
3902
  }) : x })
3903
3903
  ]
3904
3904
  }
@@ -3907,35 +3907,35 @@ function ls({
3907
3907
  const is = (t) => String(t.id ?? t._id), os = (t) => t.parent !== void 0 ? String(t.parent) : t.parentId != null ? String(t.parentId) : "root", cs = (t) => t.name ?? t.label ?? "", ds = (t) => Array.isArray(t) && t.some((a) => Array.isArray(a.children));
3908
3908
  function ms(t, { rootId: a, getId: s, getParent: i, getName: l }) {
3909
3909
  const m = /* @__PURE__ */ new Map();
3910
- t.forEach((h) => {
3911
- const u = s(h);
3912
- m.set(u, {
3913
- ...h,
3914
- id: u,
3915
- name: l(h),
3916
- parentId: i(h) || a,
3910
+ t.forEach((u) => {
3911
+ const h = s(u);
3912
+ m.set(h, {
3913
+ ...u,
3914
+ id: h,
3915
+ name: l(u),
3916
+ parentId: i(u) || a,
3917
3917
  children: []
3918
3918
  });
3919
3919
  });
3920
3920
  const o = [];
3921
- return m.forEach((h) => {
3922
- const u = h.parentId || a;
3923
- u !== a && m.has(u) ? m.get(u).children.push(h) : o.push(h);
3921
+ return m.forEach((u) => {
3922
+ const h = u.parentId || a;
3923
+ h !== a && m.has(h) ? m.get(h).children.push(u) : o.push(u);
3924
3924
  }), { roots: o, byId: m };
3925
3925
  }
3926
3926
  function us(t, { rootId: a, getId: s, getName: i }) {
3927
3927
  const l = /* @__PURE__ */ new Map();
3928
- function m(h, u) {
3929
- const N = s(h), y = {
3930
- ...h,
3928
+ function m(u, h) {
3929
+ const N = s(u), y = {
3930
+ ...u,
3931
3931
  id: N,
3932
- name: i(h),
3933
- parentId: u || a,
3934
- children: (h.children || []).map((r) => m(r, N))
3932
+ name: i(u),
3933
+ parentId: h || a,
3934
+ children: (u.children || []).map((r) => m(r, N))
3935
3935
  };
3936
3936
  return l.set(N, y), y;
3937
3937
  }
3938
- return { roots: t.map((h) => m(h, null)), byId: l };
3938
+ return { roots: t.map((u) => m(u, null)), byId: l };
3939
3939
  }
3940
3940
  const Pe = (t) => t.map((a) => ({ ...a, children: Pe(a.children || []) }));
3941
3941
  function hs(t, a) {
@@ -3945,8 +3945,8 @@ function hs(t, a) {
3945
3945
  if (o.id === a)
3946
3946
  return s = o, null;
3947
3947
  if (o.children?.length) {
3948
- const h = i(o.children);
3949
- if (h !== o.children) return { ...o, children: h };
3948
+ const u = i(o.children);
3949
+ if (u !== o.children) return { ...o, children: u };
3950
3950
  }
3951
3951
  return o;
3952
3952
  }).filter(Boolean);
@@ -3985,8 +3985,8 @@ function ql({
3985
3985
  getParent: l = os,
3986
3986
  getName: m = cs,
3987
3987
  onSelect: o,
3988
- onCreateRoot: h,
3989
- onCreateChild: u,
3988
+ onCreateRoot: u,
3989
+ onCreateChild: h,
3990
3990
  onRename: N,
3991
3991
  onDelete: y,
3992
3992
  onMove: r,
@@ -3998,7 +3998,7 @@ function ql({
3998
3998
  const { roots: z } = se(() => ds(t) ? us(t, { rootId: a, getId: i, getName: m }) : ms(
3999
3999
  t.map((b) => ({ ...b })),
4000
4000
  { rootId: a, getId: i, getParent: l, getName: m }
4001
- ), [t, a, i, l, m]), [A, E] = L({}), O = K((b) => {
4001
+ ), [t, a, i, l, m]), [A, E] = B({}), I = K((b) => {
4002
4002
  const p = {};
4003
4003
  return (function k(w) {
4004
4004
  w.forEach(($) => {
@@ -4007,17 +4007,17 @@ function ql({
4007
4007
  })(b), p;
4008
4008
  }, []);
4009
4009
  ae.useEffect(() => {
4010
- E(O(z));
4011
- }, [z, O]);
4010
+ E(I(z));
4011
+ }, [z, I]);
4012
4012
  const M = K(
4013
4013
  (b) => E((p) => ({ ...p, [b]: !p[b] })),
4014
4014
  []
4015
- ), [_, U] = L(() => Pe(z));
4015
+ ), [_, U] = B(() => Pe(z));
4016
4016
  ae.useEffect(() => U(Pe(z)), [z]);
4017
4017
  const Y = or(
4018
4018
  cr(hr, { activationConstraint: { delay: 250, tolerance: 5 } })
4019
- ), G = ge(null), [T, x] = L(null), f = ge(0), C = () => {
4020
- }, I = ({ delta: b }) => {
4019
+ ), q = ge(null), [T, x] = B(null), f = ge(0), C = () => {
4020
+ }, O = ({ delta: b }) => {
4021
4021
  f.current = b?.x ?? 0;
4022
4022
  }, R = K(
4023
4023
  ({ active: b, over: p }) => {
@@ -4028,25 +4028,25 @@ function ql({
4028
4028
  let P = $;
4029
4029
  const S = Math.max(0, Math.floor(-k / g));
4030
4030
  if (S > 0) {
4031
- let X = $;
4031
+ let W = $;
4032
4032
  for (let xe = 0; xe < S; xe++) {
4033
- const V = za(_, X, null);
4033
+ const V = za(_, W, null);
4034
4034
  if (!V) break;
4035
4035
  if (!V.parentId) {
4036
4036
  P = a;
4037
4037
  break;
4038
4038
  }
4039
- P = V.parentId, X = V.parentId;
4039
+ P = V.parentId, W = V.parentId;
4040
4040
  }
4041
4041
  }
4042
4042
  if (d && P === a) {
4043
4043
  U(Pe(z));
4044
4044
  return;
4045
4045
  }
4046
- const B = Pe(_), { newRoots: j, removed: F } = hs(B, w);
4046
+ const L = Pe(_), { newRoots: j, removed: F } = hs(L, w);
4047
4047
  if (!F) return;
4048
- const q = ps(j, P, F);
4049
- U(q), r?.({ sourceId: w, destParentId: P, newTree: q });
4048
+ const G = ps(j, P, F);
4049
+ U(G), r?.({ sourceId: w, destParentId: P, newTree: G });
4050
4050
  },
4051
4051
  [_, z, a, d, g, r]
4052
4052
  ), D = K(
@@ -4059,7 +4059,7 @@ function ql({
4059
4059
  expanded: !!A[k.id],
4060
4060
  onToggle: () => M(k.id),
4061
4061
  onSelect: o,
4062
- onCreateChild: u,
4062
+ onCreateChild: h,
4063
4063
  onRename: N,
4064
4064
  onDelete: y,
4065
4065
  renderActions: v,
@@ -4070,7 +4070,7 @@ function ql({
4070
4070
  ),
4071
4071
  A[k.id] && k.children?.length > 0 ? D(k.children, p + 1) : null
4072
4072
  ] }, k.id)),
4073
- [A, g, u, y, N, o, v, M]
4073
+ [A, g, h, y, N, o, v, M]
4074
4074
  );
4075
4075
  return ae.useMemo(() => {
4076
4076
  if (!T) return null;
@@ -4087,12 +4087,12 @@ function ql({
4087
4087
  }, [T, _]), /* @__PURE__ */ n("div", { className: "tv", children: [
4088
4088
  s !== !1 && /* @__PURE__ */ n("div", { className: "tv-header", children: [
4089
4089
  /* @__PURE__ */ e("div", { className: "tv-title", children: s }),
4090
- /* @__PURE__ */ e("button", { className: "tv-btn", onClick: h, children: "+ New folder" })
4090
+ /* @__PURE__ */ e("button", { className: "tv-btn", onClick: u, children: "+ New folder" })
4091
4091
  ] }),
4092
4092
  /* @__PURE__ */ n("div", { className: "tv-root-row", children: [
4093
4093
  /* @__PURE__ */ e(Le, { size: 16, className: "tv-folder-ic" }),
4094
4094
  /* @__PURE__ */ e("strong", { children: "ROOT" }),
4095
- /* @__PURE__ */ e("button", { className: "tv-icon", title: "Create top-level", onClick: h, children: "+" })
4095
+ /* @__PURE__ */ e("button", { className: "tv-icon", title: "Create top-level", onClick: u, children: "+" })
4096
4096
  ] }),
4097
4097
  /* @__PURE__ */ e(
4098
4098
  dr,
@@ -4100,10 +4100,10 @@ function ql({
4100
4100
  collisionDetection: ur,
4101
4101
  sensors: Y,
4102
4102
  onDragStart: C,
4103
- onDragMove: I,
4103
+ onDragMove: O,
4104
4104
  onDragEnd: R,
4105
4105
  modifiers: [mr],
4106
- children: /* @__PURE__ */ e("div", { ref: G, className: "tv-list", children: D(_, 0) })
4106
+ children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: D(_, 0) })
4107
4107
  }
4108
4108
  )
4109
4109
  ] });
@@ -4119,17 +4119,17 @@ const Yl = ({
4119
4119
  listClassName: l = "",
4120
4120
  panelClassName: m = "",
4121
4121
  tabClassName: o,
4122
- ...h
4122
+ ...u
4123
4123
  // Pass remaining props to Tab.Group
4124
4124
  }) => {
4125
- const u = s === "vertical", N = (v) => ke(
4125
+ const h = s === "vertical", N = (v) => ke(
4126
4126
  "py-2 -mb-px text-sm font-medium focus:outline-none border-b-2",
4127
4127
  v ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
4128
4128
  ), y = (v) => ke(
4129
4129
  "text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
4130
4130
  v ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
4131
- ), r = ({ selected: v }) => o ? typeof o == "function" ? o(v) : o : u ? y(v) : N(v);
4132
- return /* @__PURE__ */ e(ne.Group, { vertical: u, ...h, children: u ? /* @__PURE__ */ n("div", { className: ke("flex gap-4", i), children: [
4131
+ ), r = ({ selected: v }) => o ? typeof o == "function" ? o(v) : o : h ? y(v) : N(v);
4132
+ return /* @__PURE__ */ e(ne.Group, { vertical: h, ...u, children: h ? /* @__PURE__ */ n("div", { className: ke("flex gap-4", i), children: [
4133
4133
  /* @__PURE__ */ e(ne.List, { className: ke("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((v) => /* @__PURE__ */ e(ne, { className: r, children: v.label }, v.key)) }),
4134
4134
  /* @__PURE__ */ e(ne.Panels, { unmount: !a, className: ke("flex-1", m), children: t.map((v) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: v.content }) }, v.key)) })
4135
4135
  ] }) : (
@@ -4146,15 +4146,15 @@ function Wl(t, a = "YYYY-MM-DD HH:mm:ss") {
4146
4146
  c.string;
4147
4147
  function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4148
4148
  console.log(t);
4149
- const [l, m] = ae.useState(t), [o, h] = ae.useState(() => {
4149
+ const [l, m] = ae.useState(t), [o, u] = ae.useState(() => {
4150
4150
  const r = a && a[t.key] || {};
4151
4151
  return console.log("Initial Section data for", t.key, r), r;
4152
- }), u = ge(a);
4152
+ }), h = ge(a);
4153
4153
  te(() => {
4154
- if (u.current !== a) {
4155
- u.current = a;
4154
+ if (h.current !== a) {
4155
+ h.current = a;
4156
4156
  const r = a && a[t.key] || {};
4157
- console.log("Updated Section data for", t.key, r), h(r);
4157
+ console.log("Updated Section data for", t.key, r), u(r);
4158
4158
  }
4159
4159
  }, [a, t.key]), console.log("Section data", o);
4160
4160
  const N = ge(o);
@@ -4207,7 +4207,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4207
4207
  checked: !!(o[r.key] || r.default),
4208
4208
  onChange: (d) => {
4209
4209
  const g = d.target ? d.target.checked : d, z = { ...o, [r.key]: g };
4210
- h(z), s && s(l.key, z);
4210
+ u(z), s && s(l.key, z);
4211
4211
  },
4212
4212
  label: r.label,
4213
4213
  disabled: r.disabled ? r.disabled : !1
@@ -4253,7 +4253,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4253
4253
  ),
4254
4254
  r.fieldtype === "text" && /* @__PURE__ */ n("div", { children: [
4255
4255
  /* @__PURE__ */ e(
4256
- J,
4256
+ X,
4257
4257
  {
4258
4258
  type: "text",
4259
4259
  name: r.key,
@@ -4262,7 +4262,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4262
4262
  value: o[r.key] || "",
4263
4263
  onChange: (d) => {
4264
4264
  const g = { ...o, [r.key]: d.target.value };
4265
- h(g), s && s(l.key, g);
4265
+ u(g), s && s(l.key, g);
4266
4266
  },
4267
4267
  required: r.required,
4268
4268
  disabled: r.disabled ? r.disabled : !1,
@@ -4282,7 +4282,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4282
4282
  value: o[r.key] || "",
4283
4283
  onChange: (d) => {
4284
4284
  const g = { ...o, [r.key]: d.target.value };
4285
- h(g), s && s(l.key, g);
4285
+ u(g), s && s(l.key, g);
4286
4286
  },
4287
4287
  rows: 3,
4288
4288
  required: r.required,
@@ -4295,7 +4295,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4295
4295
  ] }),
4296
4296
  r.fieldtype === "number" && /* @__PURE__ */ n("div", { children: [
4297
4297
  /* @__PURE__ */ e(
4298
- J,
4298
+ X,
4299
4299
  {
4300
4300
  type: "number",
4301
4301
  name: r.key,
@@ -4307,7 +4307,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4307
4307
  step: r.step,
4308
4308
  onChange: (d) => {
4309
4309
  const g = d.target.value, z = { ...o, [r.key]: g };
4310
- h(z), s && s(l.key, z);
4310
+ u(z), s && s(l.key, z);
4311
4311
  },
4312
4312
  onBlur: (d) => {
4313
4313
  const g = d.target.value;
@@ -4339,7 +4339,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4339
4339
  checked: !!(o[r.key] || r.default),
4340
4340
  onChange: (d) => {
4341
4341
  const g = d.target ? d.target.checked : d, z = { ...o, [r.key]: g };
4342
- h(z), s && s(l.key, z);
4342
+ u(z), s && s(l.key, z);
4343
4343
  },
4344
4344
  label: r.placeholder || r.label,
4345
4345
  disabled: r.disabled ? r.disabled : !1,
@@ -4357,7 +4357,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4357
4357
  value: o[r.key] || "",
4358
4358
  onChange: (d) => {
4359
4359
  const g = { ...o, [r.key]: d };
4360
- h(g);
4360
+ u(g);
4361
4361
  },
4362
4362
  options: r.options || [],
4363
4363
  placeholder: r.placeholder || `Select ${r.label}`,
@@ -4370,7 +4370,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4370
4370
  ] }),
4371
4371
  r.fieldtype === "email" && /* @__PURE__ */ n("div", { children: [
4372
4372
  /* @__PURE__ */ e(
4373
- J,
4373
+ X,
4374
4374
  {
4375
4375
  type: "email",
4376
4376
  name: r.key,
@@ -4379,7 +4379,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4379
4379
  value: o[r.key] || "",
4380
4380
  onChange: (d) => {
4381
4381
  const g = { ...o, [r.key]: d.target.value };
4382
- h(g), s && s(l.key, g);
4382
+ u(g), s && s(l.key, g);
4383
4383
  },
4384
4384
  required: r.required,
4385
4385
  disabled: r.disabled ? r.disabled : !1,
@@ -4390,7 +4390,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4390
4390
  ] }),
4391
4391
  r.fieldtype === "url" && /* @__PURE__ */ n("div", { children: [
4392
4392
  /* @__PURE__ */ e(
4393
- J,
4393
+ X,
4394
4394
  {
4395
4395
  type: "url",
4396
4396
  name: r.key,
@@ -4399,7 +4399,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4399
4399
  value: o[r.key] || "",
4400
4400
  onChange: (d) => {
4401
4401
  const g = { ...o, [r.key]: d.target.value };
4402
- h(g), s && s(l.key, g);
4402
+ u(g), s && s(l.key, g);
4403
4403
  },
4404
4404
  required: r.required,
4405
4405
  disabled: r.disabled ? r.disabled : !1,
@@ -4410,7 +4410,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4410
4410
  ] }),
4411
4411
  r.fieldtype === "password" && /* @__PURE__ */ n("div", { children: [
4412
4412
  /* @__PURE__ */ e(
4413
- J,
4413
+ X,
4414
4414
  {
4415
4415
  type: "password",
4416
4416
  name: r.key,
@@ -4419,7 +4419,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4419
4419
  value: o[r.key] || "",
4420
4420
  onChange: (d) => {
4421
4421
  const g = { ...o, [r.key]: d.target.value };
4422
- h(g), s && s(l.key, g);
4422
+ u(g), s && s(l.key, g);
4423
4423
  },
4424
4424
  required: r.required,
4425
4425
  disabled: r.disabled ? r.disabled : !1,
@@ -4435,7 +4435,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4435
4435
  selectedItems: o[r.key] || [],
4436
4436
  onSelectionChange: (d) => {
4437
4437
  const g = { ...o, [r.key]: d };
4438
- h(g), s && s(l.key, g);
4438
+ u(g), s && s(l.key, g);
4439
4439
  },
4440
4440
  options: r.options || [],
4441
4441
  placeholder: r.placeholder || `Select ${r.label}`,
@@ -4453,7 +4453,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4453
4453
  onChange: (d) => {
4454
4454
  console.log("Toggle changed:", r.key, d);
4455
4455
  const g = { ...o, [r.key]: d };
4456
- h(g), s && s(l.key, g);
4456
+ u(g), s && s(l.key, g);
4457
4457
  },
4458
4458
  disabled: r.disabled ? r.disabled : !1
4459
4459
  }
@@ -4467,7 +4467,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4467
4467
  value: o[r.key] ? new Date(o[r.key]) : null,
4468
4468
  onChange: (d) => {
4469
4469
  const g = { ...o, [r.key]: d ? d.toISOString().split("T")[0] : "" };
4470
- h(g), s && s(l.key, g);
4470
+ u(g), s && s(l.key, g);
4471
4471
  },
4472
4472
  placeholder: r.placeholder || "Select date",
4473
4473
  disabled: r.disabled ? r.disabled : !1,
@@ -4482,7 +4482,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4482
4482
  value: o[r.key] || { from: null, to: null },
4483
4483
  onChange: (d) => {
4484
4484
  const g = { ...o, [r.key]: d };
4485
- h(g), s && s(l.key, g);
4485
+ u(g), s && s(l.key, g);
4486
4486
  },
4487
4487
  placeholder: r.placeholder || "Select date range",
4488
4488
  disabled: r.disabled ? r.disabled : !1,
@@ -4497,7 +4497,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4497
4497
  selectedValue: typeof o[r.key] < "u" ? o[r.key] : r.default || "",
4498
4498
  onValueChange: (d) => {
4499
4499
  const g = { ...o, [r.key]: d };
4500
- h(g), s && s(l.key, g);
4500
+ u(g), s && s(l.key, g);
4501
4501
  },
4502
4502
  options: r.options || [],
4503
4503
  disabled: r.disabled ? r.disabled : !1,
@@ -4518,7 +4518,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4518
4518
  checked: o[r.key] === d.value,
4519
4519
  onChange: (g) => {
4520
4520
  const z = { ...o, [r.key]: g.target.value };
4521
- h(z), s && s(l.key, z);
4521
+ u(z), s && s(l.key, z);
4522
4522
  },
4523
4523
  disabled: r.disabled
4524
4524
  }
@@ -4537,7 +4537,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4537
4537
  value: o[r.key] || "",
4538
4538
  onChange: (d) => {
4539
4539
  const g = { ...o, [r.key]: d };
4540
- h(g), s && s(l.key, g);
4540
+ u(g), s && s(l.key, g);
4541
4541
  },
4542
4542
  placeholder: r.placeholder || `Search ${r.label}`,
4543
4543
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4547,7 +4547,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4547
4547
  ] }),
4548
4548
  (r.fieldtype === "datetime" || r.fieldtype === "datetime-local") && /* @__PURE__ */ n("div", { children: [
4549
4549
  /* @__PURE__ */ e(
4550
- J,
4550
+ X,
4551
4551
  {
4552
4552
  type: "datetime-local",
4553
4553
  name: r.key,
@@ -4556,7 +4556,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4556
4556
  value: o[r.key] || "",
4557
4557
  onChange: (d) => {
4558
4558
  const g = { ...o, [r.key]: d.target.value };
4559
- h(g), s && s(l.key, g);
4559
+ u(g), s && s(l.key, g);
4560
4560
  },
4561
4561
  required: r.required,
4562
4562
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4566,7 +4566,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4566
4566
  ] }),
4567
4567
  r.fieldtype === "time" && /* @__PURE__ */ n("div", { children: [
4568
4568
  /* @__PURE__ */ e(
4569
- J,
4569
+ X,
4570
4570
  {
4571
4571
  type: "time",
4572
4572
  name: r.key,
@@ -4575,7 +4575,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4575
4575
  value: o[r.key] || "",
4576
4576
  onChange: (d) => {
4577
4577
  const g = { ...o, [r.key]: d.target.value };
4578
- h(g), s && s(l.key, g);
4578
+ u(g), s && s(l.key, g);
4579
4579
  },
4580
4580
  required: r.required,
4581
4581
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4585,7 +4585,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4585
4585
  ] }),
4586
4586
  r.fieldtype === "color" && /* @__PURE__ */ n("div", { children: [
4587
4587
  /* @__PURE__ */ e(
4588
- J,
4588
+ X,
4589
4589
  {
4590
4590
  type: "color",
4591
4591
  name: r.key,
@@ -4593,7 +4593,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4593
4593
  value: o[r.key] || "#000000",
4594
4594
  onChange: (d) => {
4595
4595
  const g = { ...o, [r.key]: d.target.value };
4596
- h(g), s && s(l.key, g);
4596
+ u(g), s && s(l.key, g);
4597
4597
  },
4598
4598
  className: `w-full h-10 ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4599
4599
  }
@@ -4602,7 +4602,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4602
4602
  ] }),
4603
4603
  r.fieldtype === "range" && /* @__PURE__ */ n("div", { children: [
4604
4604
  /* @__PURE__ */ e(
4605
- J,
4605
+ X,
4606
4606
  {
4607
4607
  type: "range",
4608
4608
  name: r.key,
@@ -4610,7 +4610,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4610
4610
  value: o[r.key] || r.min || 0,
4611
4611
  onChange: (d) => {
4612
4612
  const g = { ...o, [r.key]: d.target.value };
4613
- h(g), s && s(l.key, g);
4613
+ u(g), s && s(l.key, g);
4614
4614
  },
4615
4615
  min: r.min || 0,
4616
4616
  max: r.max || 100,
@@ -4630,13 +4630,13 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4630
4630
  ] }),
4631
4631
  r.fieldtype === "file" && /* @__PURE__ */ n("div", { children: [
4632
4632
  /* @__PURE__ */ e(
4633
- J,
4633
+ X,
4634
4634
  {
4635
4635
  type: "file",
4636
4636
  name: r.key,
4637
4637
  onChange: (d) => {
4638
4638
  const g = d.target.files[0], z = { ...o, [r.key]: g ? g.name : "" };
4639
- h(z), s && s(l.key, z);
4639
+ u(z), s && s(l.key, z);
4640
4640
  },
4641
4641
  accept: r.accept,
4642
4642
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4653,7 +4653,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4653
4653
  className: r.className || "",
4654
4654
  onCollectionChange: (d) => {
4655
4655
  const g = { ...o, [r.key]: d };
4656
- h(g), s && s(l.key, g);
4656
+ u(g), s && s(l.key, g);
4657
4657
  },
4658
4658
  showSearch: r.showSearch !== !1,
4659
4659
  allowAdd: r.allowAdd !== !1,
@@ -4681,9 +4681,9 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4681
4681
  const bs = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
4682
4682
  function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4683
4683
  console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
4684
- const [l, m] = L(t), [o, h] = L(null), [u, N] = L(null);
4684
+ const [l, m] = B(t), [o, u] = B(null), [h, N] = B(null);
4685
4685
  console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
4686
- const [y, r] = L(() => {
4686
+ const [y, r] = B(() => {
4687
4687
  const x = a && a[l.key] || [], f = x.length > 0 ? x : [{ id: 0 }];
4688
4688
  return console.log(`[DataTableRenderer] ${l.key} - Initial data:`, f), f;
4689
4689
  }), v = ge(a);
@@ -4708,7 +4708,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4708
4708
  const p = [...b];
4709
4709
  return p[R][x.key] = D, p;
4710
4710
  });
4711
- }, C = (R) => i[l.key]?.[R]?.[x.key], I = (R) => {
4711
+ }, C = (R) => i[l.key]?.[R]?.[x.key], O = (R) => {
4712
4712
  const D = C(R);
4713
4713
  return D ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: D }) : null;
4714
4714
  };
@@ -4716,7 +4716,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4716
4716
  case "text":
4717
4717
  return (R, D) => /* @__PURE__ */ n("div", { children: [
4718
4718
  /* @__PURE__ */ e(
4719
- J,
4719
+ X,
4720
4720
  {
4721
4721
  value: R[x.key] || "",
4722
4722
  onChange: (b) => f(D, b.target.value),
@@ -4725,7 +4725,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4725
4725
  className: `w-full ${C(D) ? "border-red-500" : ""}`
4726
4726
  }
4727
4727
  ),
4728
- I(D)
4728
+ O(D)
4729
4729
  ] });
4730
4730
  case "textarea":
4731
4731
  return (R, D) => /* @__PURE__ */ n("div", { children: [
@@ -4740,12 +4740,12 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4740
4740
  rows: 3
4741
4741
  }
4742
4742
  ),
4743
- I(D)
4743
+ O(D)
4744
4744
  ] });
4745
4745
  case "number":
4746
4746
  return (R, D) => /* @__PURE__ */ n("div", { children: [
4747
4747
  /* @__PURE__ */ e(
4748
- J,
4748
+ X,
4749
4749
  {
4750
4750
  type: "number",
4751
4751
  value: R[x.key] || "",
@@ -4773,12 +4773,12 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4773
4773
  "Max: ",
4774
4774
  x.max
4775
4775
  ] }),
4776
- I(D)
4776
+ O(D)
4777
4777
  ] });
4778
4778
  case "email":
4779
4779
  return (R, D) => /* @__PURE__ */ n("div", { children: [
4780
4780
  /* @__PURE__ */ e(
4781
- J,
4781
+ X,
4782
4782
  {
4783
4783
  type: "email",
4784
4784
  value: R[x.key] || "",
@@ -4788,12 +4788,12 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4788
4788
  className: `w-full ${C(D) ? "border-red-500" : ""}`
4789
4789
  }
4790
4790
  ),
4791
- I(D)
4791
+ O(D)
4792
4792
  ] });
4793
4793
  case "url":
4794
4794
  return (R, D) => /* @__PURE__ */ n("div", { children: [
4795
4795
  /* @__PURE__ */ e(
4796
- J,
4796
+ X,
4797
4797
  {
4798
4798
  type: "url",
4799
4799
  value: R[x.key] || "",
@@ -4803,12 +4803,12 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4803
4803
  className: `w-full ${C(D) ? "border-red-500" : ""}`
4804
4804
  }
4805
4805
  ),
4806
- I(D)
4806
+ O(D)
4807
4807
  ] });
4808
4808
  case "password":
4809
4809
  return (R, D) => /* @__PURE__ */ n("div", { children: [
4810
4810
  /* @__PURE__ */ e(
4811
- J,
4811
+ X,
4812
4812
  {
4813
4813
  type: "password",
4814
4814
  value: R[x.key] || "",
@@ -4818,7 +4818,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4818
4818
  className: `w-full ${C(D) ? "border-red-500" : ""}`
4819
4819
  }
4820
4820
  ),
4821
- I(D)
4821
+ O(D)
4822
4822
  ] });
4823
4823
  case "select":
4824
4824
  case "dropdown":
@@ -4834,7 +4834,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4834
4834
  className: `w-full ${C(D) ? "border-red-500" : ""}`
4835
4835
  }
4836
4836
  ),
4837
- I(D)
4837
+ O(D)
4838
4838
  ] });
4839
4839
  case "selectDynamic":
4840
4840
  return (R, D) => {
@@ -4864,7 +4864,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4864
4864
  },
4865
4865
  Math.random()
4866
4866
  ),
4867
- I(D)
4867
+ O(D)
4868
4868
  ] });
4869
4869
  };
4870
4870
  case "multiselect":
@@ -4915,7 +4915,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4915
4915
  );
4916
4916
  case "datetime":
4917
4917
  return (R, D) => /* @__PURE__ */ e(
4918
- J,
4918
+ X,
4919
4919
  {
4920
4920
  type: "datetime-local",
4921
4921
  value: R[x.key] || "",
@@ -4927,7 +4927,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4927
4927
  );
4928
4928
  case "time":
4929
4929
  return (R, D) => /* @__PURE__ */ e(
4930
- J,
4930
+ X,
4931
4931
  {
4932
4932
  type: "time",
4933
4933
  value: R[x.key] || "",
@@ -4979,7 +4979,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4979
4979
  {
4980
4980
  className: "text-blue-600 font-semibold hover:text-blue-800",
4981
4981
  onClick: () => {
4982
- N(x.key), h(D);
4982
+ N(x.key), u(D);
4983
4983
  },
4984
4984
  children: p.length > 0 ? "Edit" : "Assign"
4985
4985
  }
@@ -4988,7 +4988,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4988
4988
  };
4989
4989
  case "color":
4990
4990
  return (R, D) => /* @__PURE__ */ e(
4991
- J,
4991
+ X,
4992
4992
  {
4993
4993
  type: "color",
4994
4994
  value: R[x.key] || "#000000",
@@ -4999,7 +4999,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4999
4999
  case "range":
5000
5000
  return (R, D) => /* @__PURE__ */ n("div", { className: "w-full", children: [
5001
5001
  /* @__PURE__ */ e(
5002
- J,
5002
+ X,
5003
5003
  {
5004
5004
  type: "range",
5005
5005
  value: R[x.key] || x.min || 0,
@@ -5014,7 +5014,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5014
5014
  ] });
5015
5015
  case "file":
5016
5016
  return (R, D) => /* @__PURE__ */ e(
5017
- J,
5017
+ X,
5018
5018
  {
5019
5019
  type: "file",
5020
5020
  onChange: (b) => {
@@ -5027,7 +5027,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5027
5027
  );
5028
5028
  case "hidden":
5029
5029
  return (R, D) => /* @__PURE__ */ e(
5030
- J,
5030
+ X,
5031
5031
  {
5032
5032
  type: "hidden",
5033
5033
  value: R[x.key] || "",
@@ -5038,7 +5038,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5038
5038
  default:
5039
5039
  return (R, D) => /* @__PURE__ */ n("div", { children: [
5040
5040
  /* @__PURE__ */ e(
5041
- J,
5041
+ X,
5042
5042
  {
5043
5043
  value: R[x.key] || "",
5044
5044
  onChange: (b) => f(D, b.target.value),
@@ -5047,7 +5047,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5047
5047
  className: `w-full ${C(D) ? "border-red-500" : ""}`
5048
5048
  }
5049
5049
  ),
5050
- I(D)
5050
+ O(D)
5051
5051
  ] });
5052
5052
  }
5053
5053
  }, A = K(() => {
@@ -5057,8 +5057,8 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5057
5057
  id: x.length
5058
5058
  // Assign next available ID
5059
5059
  };
5060
- l.fields.forEach((I) => {
5061
- I.fieldtype === "audience" ? f[I.key] = { users: [], groups: [], roles: [] } : f[I.key] = I.default || "";
5060
+ l.fields.forEach((O) => {
5061
+ O.fieldtype === "audience" ? f[O.key] = { users: [], groups: [], roles: [] } : f[O.key] = O.default || "";
5062
5062
  }), console.log("[DataTableRenderer] New blank row:", f);
5063
5063
  const C = [...x, f];
5064
5064
  return console.log("[DataTableRenderer] Updated data:", C), C;
@@ -5070,31 +5070,31 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5070
5070
  const C = [...f];
5071
5071
  return C.splice(x, 1), C;
5072
5072
  });
5073
- }, []), [O, M] = L(null), _ = K((x, f) => {
5073
+ }, []), [I, M] = B(null), _ = K((x, f) => {
5074
5074
  M(f), x.dataTransfer.effectAllowed = "move", x.dataTransfer.setData("text/html", "");
5075
5075
  }, []), U = K((x) => {
5076
5076
  x.preventDefault(), x.dataTransfer.dropEffect = "move";
5077
5077
  }, []), Y = K((x, f) => {
5078
- x.preventDefault(), !(O === null || O === f) && (r((C) => {
5079
- const I = [...C], R = I[O];
5080
- return I.splice(O, 1), I.splice(f, 0, R), I;
5078
+ x.preventDefault(), !(I === null || I === f) && (r((C) => {
5079
+ const O = [...C], R = O[I];
5080
+ return O.splice(I, 1), O.splice(f, 0, R), O;
5081
5081
  }), M(null));
5082
- }, [O]), G = K(() => {
5082
+ }, [I]), q = K(() => {
5083
5083
  M(null);
5084
5084
  }, []), T = K((x) => {
5085
5085
  console.log("[DataTableRenderer] handleAddAudience called with:", x), r((f) => {
5086
5086
  const C = [...f];
5087
- if (o !== null && u && C[o]) {
5088
- const I = x.pendingInvites || [], R = I.filter((p) => p.type === "User"), D = I.filter((p) => p.type === "Group"), b = I.filter((p) => p.type === "Role");
5089
- C[o][u] = {
5090
- users: [...C[o][u]?.users || [], ...R],
5091
- groups: [...C[o][u]?.groups || [], ...D],
5092
- roles: [...C[o][u]?.roles || [], ...b]
5093
- }, console.log("[DataTableRenderer] Updated audience data:", C[o][u]);
5087
+ if (o !== null && h && C[o]) {
5088
+ const O = x.pendingInvites || [], R = O.filter((p) => p.type === "User"), D = O.filter((p) => p.type === "Group"), b = O.filter((p) => p.type === "Role");
5089
+ C[o][h] = {
5090
+ users: [...C[o][h]?.users || [], ...R],
5091
+ groups: [...C[o][h]?.groups || [], ...D],
5092
+ roles: [...C[o][h]?.roles || [], ...b]
5093
+ }, console.log("[DataTableRenderer] Updated audience data:", C[o][h]);
5094
5094
  }
5095
5095
  return C;
5096
- }), h(null), N(null);
5097
- }, [o, u]);
5096
+ }), u(null), N(null);
5097
+ }, [o, h]);
5098
5098
  return /* @__PURE__ */ n("div", { children: [
5099
5099
  /* @__PURE__ */ n("div", { style: { marginBottom: "20px" }, children: [
5100
5100
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
@@ -5126,15 +5126,15 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5126
5126
  /* @__PURE__ */ e("tbody", { children: y.map((x, f) => /* @__PURE__ */ n(
5127
5127
  "tr",
5128
5128
  {
5129
- className: `hover:bg-gray-50 ${O === f ? "opacity-50" : ""}`,
5129
+ className: `hover:bg-gray-50 ${I === f ? "opacity-50" : ""}`,
5130
5130
  draggable: !0,
5131
5131
  onDragStart: (C) => _(C, f),
5132
5132
  onDragOver: U,
5133
5133
  onDrop: (C) => Y(C, f),
5134
- onDragEnd: G,
5134
+ onDragEnd: q,
5135
5135
  children: [
5136
5136
  /* @__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 }) }) }),
5137
- l.fields.map((C, I) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: z(C)(x, f) }, I)),
5137
+ l.fields.map((C, O) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: z(C)(x, f) }, O)),
5138
5138
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
5139
5139
  "button",
5140
5140
  {
@@ -5150,17 +5150,17 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5150
5150
  )) })
5151
5151
  ] }) }),
5152
5152
  o !== null && (() => {
5153
- const x = y[o] && y[o][u] ? {
5154
- users: y[o][u].users || [],
5155
- groups: y[o][u].groups || [],
5156
- roles: y[o][u].roles || []
5153
+ const x = y[o] && y[o][h] ? {
5154
+ users: y[o][h].users || [],
5155
+ groups: y[o][h].groups || [],
5156
+ roles: y[o][h].roles || []
5157
5157
  } : { users: [], groups: [], roles: [] };
5158
- return console.log("[DataTableRenderer] Opening modal with existing data:", x), console.log("[DataTableRenderer] Row data:", y[o]), console.log("[DataTableRenderer] Field name:", u), /* @__PURE__ */ e(
5158
+ return console.log("[DataTableRenderer] Opening modal with existing data:", x), console.log("[DataTableRenderer] Row data:", y[o]), console.log("[DataTableRenderer] Field name:", h), /* @__PURE__ */ e(
5159
5159
  ns,
5160
5160
  {
5161
5161
  isOpen: !0,
5162
5162
  onClose: () => {
5163
- h(null), N(null);
5163
+ u(null), N(null);
5164
5164
  },
5165
5165
  onFinalSubmit: T,
5166
5166
  existingShares: x,
@@ -5192,9 +5192,9 @@ function Ns({
5192
5192
  onShowCancelModal: l,
5193
5193
  onCancel: m
5194
5194
  }) {
5195
- const [o, h] = ae.useState(a), [u, N] = ae.useState(null), [y, r] = ae.useState(null), [v, d] = L(!1), [g, z] = L(!1), [A, E] = L({}), O = `${Se()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, M = O, [_, U] = L(1), Y = () => {
5196
- if (!y || !u)
5197
- return console.log("[DynamicConfig] hasUnsavedChanges: false (no data)", { originalData: y, data: u }), !1;
5195
+ const [o, u] = ae.useState(a), [h, N] = ae.useState(null), [y, r] = ae.useState(null), [v, d] = B(!1), [g, z] = B(!1), [A, E] = B({}), I = `${Se()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, M = I, [_, U] = B(1), Y = () => {
5196
+ if (!y || !h)
5197
+ return console.log("[DynamicConfig] hasUnsavedChanges: false (no data)", { originalData: y, data: h }), !1;
5198
5198
  const b = ($) => {
5199
5199
  if ($ == null || typeof $ != "object") return $;
5200
5200
  if (Array.isArray($)) return $.map(b);
@@ -5202,37 +5202,37 @@ function Ns({
5202
5202
  return Object.keys($).sort().forEach((S) => {
5203
5203
  P[S] = b($[S]);
5204
5204
  }), P;
5205
- }, p = b(y), k = b(u), w = JSON.stringify(p) !== JSON.stringify(k);
5205
+ }, p = b(y), k = b(h), w = JSON.stringify(p) !== JSON.stringify(k);
5206
5206
  return console.log("[DynamicConfig] hasUnsavedChanges:", w, {
5207
5207
  originalData: p,
5208
5208
  currentData: k,
5209
5209
  originalRaw: y,
5210
- currentRaw: u
5210
+ currentRaw: h
5211
5211
  }), w;
5212
- }, G = (b) => {
5212
+ }, q = (b) => {
5213
5213
  if (!a || !a.configuration)
5214
5214
  return b;
5215
5215
  const p = {}, k = b?.configuration || {};
5216
5216
  return a.configuration.forEach((w) => {
5217
5217
  if (w.key && w.type === "datatable") {
5218
- const P = (k[w.key] || []).map((S, B) => {
5218
+ const P = (k[w.key] || []).map((S, L) => {
5219
5219
  const j = { id: S.id || 0 };
5220
5220
  return w.fields && w.fields.forEach((F) => {
5221
5221
  if (F.fieldtype === "audience") {
5222
- let q = { users: [], groups: [], roles: [] };
5223
- S[F.key] && (Array.isArray(S[F.key]) ? q = { users: [], groups: [], roles: [] } : typeof S[F.key] == "object" && (q = {
5222
+ let G = { users: [], groups: [], roles: [] };
5223
+ S[F.key] && (Array.isArray(S[F.key]) ? G = { users: [], groups: [], roles: [] } : typeof S[F.key] == "object" && (G = {
5224
5224
  users: S[F.key].users || [],
5225
5225
  groups: S[F.key].groups || [],
5226
5226
  roles: S[F.key].roles || []
5227
- })), j[F.key] = q;
5227
+ })), j[F.key] = G;
5228
5228
  } else
5229
5229
  j[F.key] = S[F.key] || F.default || "";
5230
5230
  }), j;
5231
5231
  });
5232
5232
  if (P.length === 0) {
5233
5233
  const S = { id: 0 };
5234
- w.fields && w.fields.forEach((B) => {
5235
- B.fieldtype === "audience" ? S[B.key] = { users: [], groups: [], roles: [] } : S[B.key] = B.default || "";
5234
+ w.fields && w.fields.forEach((L) => {
5235
+ L.fieldtype === "audience" ? S[L.key] = { users: [], groups: [], roles: [] } : S[L.key] = L.default || "";
5236
5236
  }), P.push(S);
5237
5237
  }
5238
5238
  p[w.key] = P;
@@ -5271,9 +5271,9 @@ function Ns({
5271
5271
  const b = async () => {
5272
5272
  try {
5273
5273
  d(!0);
5274
- let p = await Qe(O);
5274
+ let p = await Qe(I);
5275
5275
  if (p) {
5276
- const k = G(p);
5276
+ const k = q(p);
5277
5277
  N(k), r(k);
5278
5278
  } else
5279
5279
  T();
@@ -5289,7 +5289,7 @@ function Ns({
5289
5289
  d(!1);
5290
5290
  }
5291
5291
  };
5292
- a && (h(a), t ? b() : T());
5292
+ a && (u(a), t ? b() : T());
5293
5293
  }, [a, _, t, s]);
5294
5294
  const x = (b, p) => {
5295
5295
  console.log(`[DynamicConfig] handleSectionChange called for ${b}:`, p), N((k) => {
@@ -5304,10 +5304,10 @@ function Ns({
5304
5304
  });
5305
5305
  }, f = () => {
5306
5306
  const b = {};
5307
- return !o || !u || o.configuration.forEach((p) => {
5307
+ return !o || !h || o.configuration.forEach((p) => {
5308
5308
  if (p.type === "section")
5309
5309
  p.fields.forEach((k) => {
5310
- const w = u[p.key]?.[k.key];
5310
+ const w = h[p.key]?.[k.key];
5311
5311
  if (k.required && (!w || typeof w == "string" && w.trim() === "")) {
5312
5312
  b[p.key] || (b[p.key] = {}), b[p.key][k.key] = `${k.label} is required`;
5313
5313
  return;
@@ -5318,7 +5318,7 @@ function Ns({
5318
5318
  }
5319
5319
  });
5320
5320
  else if (p.type === "datatable") {
5321
- const k = u[p.key];
5321
+ const k = h[p.key];
5322
5322
  Array.isArray(k) && k.forEach((w, $) => {
5323
5323
  p.fields.forEach((P) => {
5324
5324
  const S = w[P.key];
@@ -5327,14 +5327,14 @@ function Ns({
5327
5327
  return;
5328
5328
  }
5329
5329
  if (P.fieldtype === "number" && S !== "" && S !== null && S !== void 0) {
5330
- const B = Number(S);
5331
- isNaN(B) ? (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][P.key] = `${P.label} must be a valid number`) : (P.min !== void 0 && B < P.min && (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][P.key] = `${P.label} must be at least ${P.min}`), P.max !== void 0 && B > P.max && (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][P.key] = `${P.label} must not exceed ${P.max}`));
5330
+ const L = Number(S);
5331
+ isNaN(L) ? (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][P.key] = `${P.label} must be a valid number`) : (P.min !== void 0 && L < P.min && (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][P.key] = `${P.label} must be at least ${P.min}`), P.max !== void 0 && L > P.max && (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][P.key] = `${P.label} must not exceed ${P.max}`));
5332
5332
  }
5333
5333
  });
5334
5334
  });
5335
5335
  }
5336
5336
  }), b;
5337
- }, C = (b) => Object.keys(b).length > 0, I = () => {
5337
+ }, C = (b) => Object.keys(b).length > 0, O = () => {
5338
5338
  if (g) {
5339
5339
  console.log("[handleSave] Already saving, ignoring duplicate call");
5340
5340
  return;
@@ -5356,12 +5356,12 @@ function Ns({
5356
5356
  try {
5357
5357
  z(!0);
5358
5358
  const k = {};
5359
- u && Object.keys(u).forEach(($) => {
5359
+ h && Object.keys(h).forEach(($) => {
5360
5360
  const P = a?.configuration?.find(
5361
5361
  (S) => S.key === $ && S.type === "datatable"
5362
5362
  );
5363
- P && Array.isArray(u[$]) ? k[$] = u[$].map((S) => {
5364
- const B = { id: S.id || 0 };
5363
+ P && Array.isArray(h[$]) ? k[$] = h[$].map((S) => {
5364
+ const L = { id: S.id || 0 };
5365
5365
  return P.fields && P.fields.forEach((j) => {
5366
5366
  if (j.fieldtype === "audience") {
5367
5367
  let F = { users: [], groups: [], roles: [] };
@@ -5369,17 +5369,17 @@ function Ns({
5369
5369
  users: S[j.key].users || [],
5370
5370
  groups: S[j.key].groups || [],
5371
5371
  roles: S[j.key].roles || []
5372
- }), B[j.key] = F;
5372
+ }), L[j.key] = F;
5373
5373
  } else
5374
- B[j.key] = S[j.key] || "";
5375
- }), B;
5376
- }) : k[$] = u[$];
5374
+ L[j.key] = S[j.key] || "";
5375
+ }), L;
5376
+ }) : k[$] = h[$];
5377
5377
  }), (!k.appkey || k.appkey === "") && (k.appkey = t);
5378
5378
  let w = await yt(M, k);
5379
5379
  if (w && w.status != "fail") {
5380
- E({}), r(JSON.parse(JSON.stringify(u)));
5380
+ E({}), r(JSON.parse(JSON.stringify(h)));
5381
5381
  const $ = w.message || "Configuration has been saved successfully";
5382
- Ge.success($), i && typeof i == "function" && i(u);
5382
+ Ge.success($), i && typeof i == "function" && i(h);
5383
5383
  } else
5384
5384
  throw Ge.error(w?.message || "Failed to save configuration"), new Error("No response received from server");
5385
5385
  } catch (k) {
@@ -5395,7 +5395,7 @@ function Ns({
5395
5395
  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" }) });
5396
5396
  const D = a?.configuration || o?.configuration;
5397
5397
  return te(() => {
5398
- s && a ? (!u || Object.keys(u).length === 0) && T() : s && !a && T();
5398
+ s && a ? (!h || Object.keys(h).length === 0) && T() : s && !a && T();
5399
5399
  }, [s, a]), /* @__PURE__ */ n("div", { children: [
5400
5400
  /* @__PURE__ */ n(
5401
5401
  "div",
@@ -5411,7 +5411,7 @@ function Ns({
5411
5411
  k,
5412
5412
  {
5413
5413
  item: b,
5414
- data: u,
5414
+ data: h,
5415
5415
  updateHandler: x,
5416
5416
  validationErrors: A
5417
5417
  },
@@ -5436,7 +5436,7 @@ function Ns({
5436
5436
  oe,
5437
5437
  {
5438
5438
  category: "primary",
5439
- onClick: I,
5439
+ onClick: O,
5440
5440
  disabled: g,
5441
5441
  label: g ? "Saving..." : "Save",
5442
5442
  type: "submit"
@@ -5450,18 +5450,18 @@ const Jl = ({
5450
5450
  appid: a = "Configuration-Page",
5451
5451
  disableApi: s = !1
5452
5452
  }) => {
5453
- const [i, l] = L(0), [m, o] = L(!1), {
5454
- pageHeader: h = {},
5455
- appletHeader: u = {},
5453
+ const [i, l] = B(0), [m, o] = B(!1), {
5454
+ pageHeader: u = {},
5455
+ appletHeader: h = {},
5456
5456
  breadcrumb: N = [],
5457
5457
  overview: y = {},
5458
5458
  configuration: r = []
5459
5459
  } = t, v = se(() => r.map((f) => {
5460
5460
  if (f.type === "section" && f.fields) {
5461
- const C = [...f.fields], I = C.findIndex((R) => R && R.key === "appkey");
5462
- if (I !== -1) {
5463
- const R = C[I];
5464
- if (C[I] = {
5461
+ const C = [...f.fields], O = C.findIndex((R) => R && R.key === "appkey");
5462
+ if (O !== -1) {
5463
+ const R = C[O];
5464
+ if (C[O] = {
5465
5465
  ...R,
5466
5466
  default: a,
5467
5467
  value: a,
@@ -5485,7 +5485,7 @@ const Jl = ({
5485
5485
  placeholder: "Enter display name",
5486
5486
  required: !1
5487
5487
  };
5488
- C.splice(I + 1, 0, b);
5488
+ C.splice(O + 1, 0, b);
5489
5489
  }
5490
5490
  }
5491
5491
  return {
@@ -5499,7 +5499,7 @@ const Jl = ({
5499
5499
  subHeading: "View app details and customize configurations to align with institutional requirements.",
5500
5500
  isLeftArrow: !0,
5501
5501
  onBackClick: () => window.history.back(),
5502
- ...h
5502
+ ...u
5503
5503
  }, g = N.map((f) => ({
5504
5504
  label: f.text,
5505
5505
  href: f.href || "#"
@@ -5509,29 +5509,29 @@ const Jl = ({
5509
5509
  o(!1), f.primary && window.location.reload();
5510
5510
  }, []), E = K((f) => {
5511
5511
  console.log("Configuration changed:", f);
5512
- }, []), O = K(() => {
5512
+ }, []), I = K(() => {
5513
5513
  window.history.back();
5514
5514
  }, []), M = (() => {
5515
- if (u.headingKey && Array.isArray(r)) {
5516
- const f = u.headingKey.split("."), C = f[0], I = f[1], R = r.find((D) => D && D.key === C);
5515
+ if (h.headingKey && Array.isArray(r)) {
5516
+ const f = h.headingKey.split("."), C = f[0], O = f[1], R = r.find((D) => D && D.key === C);
5517
5517
  if (R && R.fields) {
5518
- const D = R.fields.find((b) => b && b.key === I);
5518
+ const D = R.fields.find((b) => b && b.key === O);
5519
5519
  if (D)
5520
- return D.default ?? D.value ?? u.heading ?? a;
5520
+ return D.default ?? D.value ?? h.heading ?? a;
5521
5521
  }
5522
5522
  }
5523
5523
  if (Array.isArray(r)) {
5524
5524
  for (const f of r)
5525
5525
  if (f && f.fields) {
5526
- const C = f.fields.find((I) => I && I.key === "displayname");
5526
+ const C = f.fields.find((O) => O && O.key === "displayname");
5527
5527
  if (C) return C.default ?? C.value ?? a;
5528
5528
  }
5529
5529
  }
5530
- return u.heading || a;
5530
+ return h.heading || a;
5531
5531
  })(), _ = {
5532
5532
  subHeading: "Application configuration and details",
5533
5533
  tags: [],
5534
- ...u,
5534
+ ...h,
5535
5535
  heading: M
5536
5536
  // Use resolvedDisplayName only
5537
5537
  }, U = {
@@ -5554,10 +5554,10 @@ const Jl = ({
5554
5554
  ...y
5555
5555
  }, Y = se(() => ({
5556
5556
  configuration: v
5557
- }), [v]), G = se(() => [
5557
+ }), [v]), q = se(() => [
5558
5558
  { label: "Overview", content: x(U) },
5559
- { label: "Configuration", content: /* @__PURE__ */ e(Ns, { appid: a, configdata: Y, disableApi: s, onSave: E, onShowCancelModal: z, onCancel: O }) }
5560
- ], [a, Y, s, E, z, O, U]);
5559
+ { label: "Configuration", content: /* @__PURE__ */ e(Ns, { appid: a, configdata: Y, disableApi: s, onSave: E, onShowCancelModal: z, onCancel: I }) }
5560
+ ], [a, Y, s, E, z, I, U]);
5561
5561
  function T(f) {
5562
5562
  return f ? f.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: f } }) : f : "📱";
5563
5563
  }
@@ -5587,11 +5587,11 @@ const Jl = ({
5587
5587
  ] }),
5588
5588
  /* @__PURE__ */ n("section", { children: [
5589
5589
  /* @__PURE__ */ e("h3", { className: "text-lg font-semibold mb-4", children: "Key Features" }),
5590
- /* @__PURE__ */ e("ul", { className: "space-y-3", children: f.features.map((C, I) => /* @__PURE__ */ n("li", { children: [
5590
+ /* @__PURE__ */ e("ul", { className: "space-y-3", children: f.features.map((C, O) => /* @__PURE__ */ n("li", { children: [
5591
5591
  /* @__PURE__ */ e("span", { className: "font-semibold", children: C.title }),
5592
5592
  /* @__PURE__ */ e("br", {}),
5593
5593
  /* @__PURE__ */ e("span", { className: "text-gray-700", children: C.description })
5594
- ] }, I)) })
5594
+ ] }, O)) })
5595
5595
  ] })
5596
5596
  ] });
5597
5597
  }
@@ -5622,7 +5622,7 @@ const Jl = ({
5622
5622
  ] })
5623
5623
  ] }),
5624
5624
  /* @__PURE__ */ n("div", { className: "bg-white border border-gray-300 rounded-2xl w-full mt-5 ", children: [
5625
- /* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: G.map((f, C) => /* @__PURE__ */ e(
5625
+ /* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: q.map((f, C) => /* @__PURE__ */ e(
5626
5626
  "button",
5627
5627
  {
5628
5628
  onClick: () => l(C),
@@ -5631,7 +5631,7 @@ const Jl = ({
5631
5631
  },
5632
5632
  C
5633
5633
  )) }) }),
5634
- /* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: G[i].content })
5634
+ /* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: q[i].content })
5635
5635
  ] }),
5636
5636
  /* @__PURE__ */ e(
5637
5637
  Rn,
@@ -5654,17 +5654,17 @@ const Jl = ({
5654
5654
  allowEdit: l = !0,
5655
5655
  allowDelete: m = !0,
5656
5656
  allowReorder: o = !0,
5657
- initialData: h = null
5657
+ initialData: u = null
5658
5658
  }) => {
5659
- const [u, N] = L(null), [y, r] = L(""), [v, d] = L(() => Array.isArray(h) ? h : []), [g, z] = L(null), [A, E] = L(null), [O, M] = L("");
5659
+ const [h, N] = B(null), [y, r] = B(""), [v, d] = B(() => Array.isArray(u) ? u : []), [g, z] = B(null), [A, E] = B(null), [I, M] = B("");
5660
5660
  te(() => {
5661
- Array.isArray(h) && d(h);
5662
- }, [h]);
5661
+ Array.isArray(u) && d(u);
5662
+ }, [u]);
5663
5663
  const _ = (p) => {
5664
5664
  l && (N(p._id), r(p.categoryName || ""));
5665
5665
  }, U = () => {
5666
- if (!i || u !== null) return;
5667
- const k = (v.length > 0 ? Math.max(...v.map((w) => w._id ?? 0)) : 0) + 1;
5666
+ if (!i || h !== null) return;
5667
+ const k = (v.length > 0 ? Math.max(...v.map((w) => typeof w._id == "number" ? w._id : 0)) : 0) + 1;
5668
5668
  d((w) => [
5669
5669
  ...w,
5670
5670
  {
@@ -5677,13 +5677,13 @@ const Jl = ({
5677
5677
  }
5678
5678
  ]), N(k), r("");
5679
5679
  }, Y = () => {
5680
- u != null && (d((p) => {
5681
- const w = !p.some(($) => $._id !== void 0 && $._id === u && $.categoryName) ? p.filter(($) => $._id !== u) : p;
5680
+ h != null && (d((p) => {
5681
+ const w = !Array.isArray(u) || !u.some(($) => $._id === h) ? p.filter(($) => $._id !== h) : p;
5682
5682
  return a?.(w), w;
5683
5683
  }), N(null), r(""));
5684
- }, G = () => {
5685
- u == null || !y.trim() || (d((p) => {
5686
- const k = p.map((w) => w._id === u ? {
5684
+ }, q = () => {
5685
+ h == null || !y.trim() || (d((p) => {
5686
+ const k = p.map((w) => w._id === h ? {
5687
5687
  ...w,
5688
5688
  categoryName: y.trim()
5689
5689
  } : w);
@@ -5695,35 +5695,36 @@ const Jl = ({
5695
5695
  return a?.(w), w;
5696
5696
  });
5697
5697
  }, x = (p, k, w) => {
5698
- if (!o || !k || !w || k === w) return p;
5699
- const $ = p.findIndex((j) => j.id === k), P = p.findIndex((j) => j.id === w);
5700
- if ($ === -1 || P === -1) return p;
5701
- const S = [...p], [B] = S.splice($, 1);
5702
- return S.splice(P, 0, B), S.map((j, F) => ({ ...j, order: F + 1 }));
5698
+ const $ = Number(k), P = Number(w);
5699
+ if (!o || $ === P) return p;
5700
+ const S = p.findIndex((G) => Number(G._id) === $), L = p.findIndex((G) => Number(G._id) === P);
5701
+ if (S === -1 || L === -1) return p;
5702
+ const j = [...p], [F] = j.splice(S, 1);
5703
+ return j.splice(L, 0, F), j.map((G, W) => ({ ...G, order: W + 1 }));
5703
5704
  }, f = (p, k) => {
5704
- o && (p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", String(k)), z(k));
5705
+ o && (p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", String(k)), z(Number(k)));
5705
5706
  }, C = (p) => {
5706
5707
  g && p !== A && E(p);
5707
- }, I = (p) => {
5708
+ }, O = (p) => {
5708
5709
  p.preventDefault();
5709
5710
  }, R = (p, k) => {
5710
5711
  p.preventDefault();
5711
- const w = p.dataTransfer.getData("text/plain");
5712
- w && (d(($) => {
5713
- const P = x($, w, k);
5714
- return console.log("Reordered", P), a?.(P), P;
5712
+ const w = p.dataTransfer.getData("text/plain"), $ = w === "0" ? 0 : Number(w), P = k === "0" ? 0 : Number(k);
5713
+ $ === void 0 || P === void 0 || (d((S) => {
5714
+ const L = x(S, $, P);
5715
+ return a?.(L), L;
5715
5716
  }), z(null), E(null));
5716
5717
  }, D = () => {
5717
5718
  z(null), E(null);
5718
5719
  }, b = Array.isArray(v) ? v.filter(
5719
- (p) => p.categoryName?.toLowerCase().includes(O.toLowerCase())
5720
+ (p) => p.categoryName?.toLowerCase().includes(I.toLowerCase())
5720
5721
  ) : [];
5721
5722
  return /* @__PURE__ */ n("div", { className: `manage-collection-list ${t}`, children: [
5722
5723
  /* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ n("div", { className: "w-1/2 flex justify-end", children: [
5723
5724
  s && /* @__PURE__ */ e(
5724
5725
  he,
5725
5726
  {
5726
- value: O,
5727
+ value: I,
5727
5728
  onDebouncedChange: M,
5728
5729
  placeholder: "Search Collection",
5729
5730
  customClass: "mr-4 searchmanagecollection"
@@ -5734,22 +5735,23 @@ const Jl = ({
5734
5735
  {
5735
5736
  className: [
5736
5737
  "px-4 py-3 bg-black text-white rounded-2xl ml-4",
5737
- u !== null ? "opacity-60 cursor-not-allowed" : "cursor-pointer"
5738
+ h !== null ? "opacity-60 cursor-not-allowed" : "cursor-pointer"
5738
5739
  ].join(" "),
5739
5740
  onClick: U,
5740
- disabled: u !== null,
5741
+ disabled: h !== null,
5741
5742
  children: "Add a Collection"
5742
5743
  }
5743
5744
  )
5744
5745
  ] }) }),
5745
5746
  /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: b.map((p) => {
5746
- const k = u === p._id, w = p?.links?.length ?? 0, $ = g === p._id, P = A === p._id && g !== p._id;
5747
+ const k = h === p._id, w = p?.links?.length ?? 0, $ = g === p._id, P = A === p._id && g !== p._id;
5747
5748
  return /* @__PURE__ */ e(
5748
5749
  "div",
5749
5750
  {
5750
5751
  onDragEnter: () => C(p._id),
5751
- onDragOver: I,
5752
+ onDragOver: O,
5752
5753
  onDrop: (S) => R(S, p._id),
5754
+ onDragEnd: D,
5753
5755
  className: [
5754
5756
  "flex items-center justify-between p-3 border rounded-2xl mb-3",
5755
5757
  "border-gray-300",
@@ -5763,10 +5765,10 @@ const Jl = ({
5763
5765
  type: "text",
5764
5766
  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",
5765
5767
  value: y,
5766
- placeholder: v.some((S) => S._id === p._id && S.categoryName) ? "Edit collection name" : "New collection name",
5768
+ placeholder: !Array.isArray(u) || !u.some((S) => S._id === p._id) ? "New collection name" : "Edit collection name",
5767
5769
  onChange: (S) => r(S.target.value),
5768
5770
  onKeyDown: (S) => {
5769
- S.key === "Enter" && G(), S.key === "Escape" && Y();
5771
+ S.key === "Enter" && q(), S.key === "Escape" && Y();
5770
5772
  },
5771
5773
  autoFocus: !0
5772
5774
  }
@@ -5788,7 +5790,7 @@ const Jl = ({
5788
5790
  "border p-2 rounded-2xl",
5789
5791
  y.trim() ? "cursor-pointer border-gray-300" : "cursor-not-allowed border-gray-200"
5790
5792
  ].join(" "),
5791
- onClick: G,
5793
+ onClick: q,
5792
5794
  "aria-label": "Save",
5793
5795
  disabled: !y.trim(),
5794
5796
  title: y.trim() ? "Save" : "Name required",
@@ -5805,8 +5807,7 @@ const Jl = ({
5805
5807
  "aria-label": "Drag to reorder",
5806
5808
  className: "cursor-grab active:cursor-grabbing p-1 -m-1 rounded-md hover:bg-gray-50",
5807
5809
  draggable: !0,
5808
- onDragStart: (S) => f(S, p.id),
5809
- onDragEnd: D,
5810
+ onDragStart: (S) => f(S, p._id),
5810
5811
  children: /* @__PURE__ */ e(Nt, {})
5811
5812
  }
5812
5813
  ),
@@ -5865,7 +5866,7 @@ function Xl({ children: t }) {
5865
5866
  /* @__PURE__ */ e("div", { id: "ui-toast-backdrop", "aria-hidden": "true" })
5866
5867
  ] });
5867
5868
  }
5868
- const Ie = {
5869
+ const Oe = {
5869
5870
  containerId: "ui-toast",
5870
5871
  position: "bottom-right",
5871
5872
  autoClose: 3500,
@@ -5879,12 +5880,12 @@ const Lt = () => {
5879
5880
  }, Bt = () => {
5880
5881
  typeof document > "u" || (Je = Math.max(0, Je - 1), Je === 0 && document.body.classList.remove("toast-backdrop"));
5881
5882
  }, Ge = {
5882
- success: (t, a) => Oe.success(t, { ...Ie, ...a }),
5883
- info: (t, a) => Oe.info(t, { ...Ie, ...a }),
5884
- warn: (t, a) => Oe.warn(t, { ...Ie, ...a }),
5883
+ success: (t, a) => Ie.success(t, { ...Oe, ...a }),
5884
+ info: (t, a) => Ie.info(t, { ...Oe, ...a }),
5885
+ warn: (t, a) => Ie.warn(t, { ...Oe, ...a }),
5885
5886
  // Error: no autoClose + modal-like behavior via backdrop
5886
- error: (t, a) => Oe.error(t, {
5887
- ...Ie,
5887
+ error: (t, a) => Ie.error(t, {
5888
+ ...Oe,
5888
5889
  autoClose: !1,
5889
5890
  closeOnClick: !1,
5890
5891
  draggable: !1,
@@ -5893,7 +5894,7 @@ const Lt = () => {
5893
5894
  ...a
5894
5895
  }),
5895
5896
  // Promise helper (error branch inherits the modal behavior)
5896
- promise: (t, a, s) => Oe.promise(
5897
+ promise: (t, a, s) => Ie.promise(
5897
5898
  t,
5898
5899
  {
5899
5900
  pending: a?.pending,
@@ -5907,7 +5908,7 @@ const Lt = () => {
5907
5908
  onClose: Bt
5908
5909
  }
5909
5910
  },
5910
- { ...Ie, ...s }
5911
+ { ...Oe, ...s }
5911
5912
  )
5912
5913
  }, Hl = ({
5913
5914
  heading: t = "Data Grid",
@@ -5920,9 +5921,9 @@ const Lt = () => {
5920
5921
  // preferred
5921
5922
  onAdd: m,
5922
5923
  onFilterOpen: o,
5923
- addBtnText: h = "Add",
5924
+ addBtnText: u = "Add",
5924
5925
  // Feature toggles
5925
- showSearch: u = !0,
5926
+ showSearch: h = !0,
5926
5927
  showDelete: N = !0,
5927
5928
  showColumnChooser: y = !0,
5928
5929
  showFilter: r = !1,
@@ -5933,7 +5934,7 @@ const Lt = () => {
5933
5934
  showAdd: A = !1,
5934
5935
  // Additional props
5935
5936
  searchPlaceholder: E = "Search...",
5936
- handleRefreshClick: O = () => {
5937
+ handleRefreshClick: I = () => {
5937
5938
  },
5938
5939
  handleSearchChange: M = () => {
5939
5940
  },
@@ -5941,10 +5942,10 @@ const Lt = () => {
5941
5942
  excelFileName: _,
5942
5943
  pdfFileName: U,
5943
5944
  searchIconSize: Y,
5944
- searchIconClass: G,
5945
+ searchIconClass: q,
5945
5946
  inputStyle: T
5946
5947
  }) => {
5947
- const x = () => l?.current || i?.current, [f, C] = ae.useState(""), I = (t || "export").toString().trim() || "export", R = `${_ || I}.xlsx`, D = `${U || I}.pdf`, b = (w, $, P) => Math.max($, Math.min(w, P)), p = K(
5948
+ const x = () => l?.current || i?.current, [f, C] = ae.useState(""), O = (t || "export").toString().trim() || "export", R = `${_ || O}.xlsx`, D = `${U || O}.pdf`, b = (w, $, P) => Math.max($, Math.min(w, P)), p = K(
5948
5949
  (w) => {
5949
5950
  const $ = x();
5950
5951
  if ($?.openColumnChooser) {
@@ -5953,10 +5954,10 @@ const Lt = () => {
5953
5954
  return;
5954
5955
  }
5955
5956
  try {
5956
- const P = w.currentTarget.getBoundingClientRect(), S = P.left + window.scrollX, B = P.bottom + window.scrollY;
5957
- let j = S - 120, F = B - 120;
5958
- const q = window.innerWidth, X = window.innerHeight;
5959
- j = b(j, window.scrollX + 8, window.scrollX + q - 340), F = b(F, window.scrollY, window.scrollY + X - 120), $.openColumnChooser(j, F);
5957
+ const P = w.currentTarget.getBoundingClientRect(), S = P.left + window.scrollX, L = P.bottom + window.scrollY;
5958
+ let j = S - 120, F = L - 120;
5959
+ const G = window.innerWidth, W = window.innerHeight;
5960
+ j = b(j, window.scrollX + 8, window.scrollX + G - 340), F = b(F, window.scrollY, window.scrollY + W - 120), $.openColumnChooser(j, F);
5960
5961
  } catch (P) {
5961
5962
  console.log("coloumn choose error", P);
5962
5963
  }
@@ -5985,11 +5986,11 @@ const Lt = () => {
5985
5986
  g && P.pdfExport?.({ fileName: D });
5986
5987
  break;
5987
5988
  case "Refresh":
5988
- z && O();
5989
+ z && I();
5989
5990
  break;
5990
5991
  }
5991
5992
  },
5992
- [y, v, d, g, z, R, D, O, p]
5993
+ [y, v, d, g, z, R, D, I, p]
5993
5994
  );
5994
5995
  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: [
5995
5996
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
@@ -6001,7 +6002,7 @@ const Lt = () => {
6001
6002
  a ? /* @__PURE__ */ e("div", { className: "text-sm text-gray-500", children: a }) : null
6002
6003
  ] }),
6003
6004
  /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
6004
- u && /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
6005
+ h && /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
6005
6006
  he,
6006
6007
  {
6007
6008
  placeholder: E,
@@ -6010,7 +6011,7 @@ const Lt = () => {
6010
6011
  C(w), M(w);
6011
6012
  },
6012
6013
  searchIconSize: Y || 16,
6013
- searchIconClass: G || "",
6014
+ searchIconClass: q || "",
6014
6015
  inputStyle: T || { paddingTop: "4px", paddingBottom: "4px" }
6015
6016
  }
6016
6017
  ) }),
@@ -6076,12 +6077,12 @@ const Lt = () => {
6076
6077
  A && m && /* @__PURE__ */ e(
6077
6078
  oe,
6078
6079
  {
6079
- label: h,
6080
+ label: u,
6080
6081
  icon: wr,
6081
6082
  onClick: m,
6082
6083
  size: "small",
6083
6084
  ariaLabel: "Add New",
6084
- title: h
6085
+ title: u
6085
6086
  }
6086
6087
  )
6087
6088
  ] })
@@ -6098,8 +6099,8 @@ function Ql(t) {
6098
6099
  // pageSize = 10,
6099
6100
  allowPaging: m = !0,
6100
6101
  allowSorting: o = !0,
6101
- allowFiltering: h = !1,
6102
- allowGrouping: u = !1,
6102
+ allowFiltering: u = !1,
6103
+ allowGrouping: h = !1,
6103
6104
  allowReordering: N = !0,
6104
6105
  allowResizing: y = !0,
6105
6106
  allowExcelExport: r = !1,
@@ -6109,56 +6110,56 @@ function Ql(t) {
6109
6110
  height: z = "600",
6110
6111
  selectionSettings: A = { type: "Multiple", mode: "Row" },
6111
6112
  enableCheckbox: E = !1,
6112
- columns: O = [],
6113
+ columns: I = [],
6113
6114
  onGridStateChange: M,
6114
6115
  onRowSelected: _,
6115
6116
  onRowDeselected: U,
6116
6117
  onRowDoubleClick: Y,
6117
- apiRef: G,
6118
+ apiRef: q,
6118
6119
  gridProps: T = {}
6119
6120
  } = t, x = ge(null), {
6120
6121
  pageSettings: f,
6121
6122
  sortSettings: C,
6122
- ...I
6123
+ ...O
6123
6124
  } = T || {}, [R, D] = ae.useState(f?.page || 1), [b, p] = ae.useState(C?.pageSize || 20), [k, w] = ae.useState(C?.sortKey || "updatedDate"), [$, P] = ae.useState(C?.direction || "Descending"), S = se(() => {
6124
6125
  const V = [an];
6125
- return o && V.push(rn), h && V.push(nn), u && V.push(sn), g && V.push(ln), r && V.push(on), v && V.push(cn), d && V.push(dn), y && V.push(mn), N && V.push(un), V.push(hn), V;
6126
- }, [o, h, u, g, r, v, d, y, N]), B = se(() => {
6127
- const V = () => x.current, re = (W, ve) => {
6128
- !ve && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${W} requested but related service/feature is disabled.`);
6126
+ return o && V.push(rn), u && V.push(nn), h && V.push(sn), g && V.push(ln), r && V.push(on), v && V.push(cn), d && V.push(dn), y && V.push(mn), N && V.push(un), V.push(hn), V;
6127
+ }, [o, u, h, g, r, v, d, y, N]), L = se(() => {
6128
+ const V = () => x.current, re = (J, ve) => {
6129
+ !ve && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${J} requested but related service/feature is disabled.`);
6129
6130
  };
6130
6131
  return {
6131
6132
  getInstance: () => V(),
6132
6133
  refresh: () => V()?.refresh?.(),
6133
6134
  getSelectedRecords: () => V()?.getSelectedRecords?.() ?? [],
6134
6135
  clearSelection: () => V()?.clearSelection?.(),
6135
- selectRow: (W) => V()?.selectRow?.(W),
6136
- selectRows: (W) => V()?.selectRows?.(W),
6137
- search: (W) => {
6138
- re("search()", g), V()?.search?.(W);
6136
+ selectRow: (J) => V()?.selectRow?.(J),
6137
+ selectRows: (J) => V()?.selectRows?.(J),
6138
+ search: (J) => {
6139
+ re("search()", g), V()?.search?.(J);
6139
6140
  },
6140
6141
  print: () => V()?.print?.(),
6141
- excelExport: (W) => {
6142
- re("excelExport()", r), V()?.excelExport?.(W);
6142
+ excelExport: (J) => {
6143
+ re("excelExport()", r), V()?.excelExport?.(J);
6143
6144
  },
6144
- pdfExport: (W) => {
6145
- re("pdfExport()", v), V()?.pdfExport?.(W);
6145
+ pdfExport: (J) => {
6146
+ re("pdfExport()", v), V()?.pdfExport?.(J);
6146
6147
  },
6147
- openColumnChooser: (W, ve) => {
6148
- re("openColumnChooser()", d), V()?.columnChooserModule?.openColumnChooser?.(W, ve);
6148
+ openColumnChooser: (J, ve) => {
6149
+ re("openColumnChooser()", d), V()?.columnChooserModule?.openColumnChooser?.(J, ve);
6149
6150
  }
6150
6151
  };
6151
6152
  }, []);
6152
6153
  te(() => {
6153
- G && (G.current = B);
6154
- }, [G, B]), te(() => () => {
6155
- G && (G.current = null);
6154
+ q && (q.current = L);
6155
+ }, [q, L]), te(() => () => {
6156
+ q && (q.current = null);
6156
6157
  }, []);
6157
6158
  const j = (V) => {
6158
6159
  const re = String(V || "");
6159
6160
  return re === "Ascending" || re === "Descending" ? re : re.toLowerCase() === "ascending" ? "Ascending" : "Descending";
6160
6161
  }, F = (V) => {
6161
- const re = x.current, W = V?.requestType, ve = W === "paging" ? "paging" : W === "sorting" ? "sorting" : W === "searching" ? "searching" : W === "filtering" ? "filtering" : W === "grouping" ? "grouping" : W === "reorder" ? "reorder" : W === "columnstate" ? "columnstate" : "other", Ee = V?.pageSize ?? re?.pageSettings?.pageSize ?? b, je = V?.currentPage ?? re?.pageSettings?.currentPage ?? l, at = V?.columnName && V?.direction ? [{ field: V.columnName, dir: j(V.direction) }] : (re?.sortSettings?.columns || []).map((Re) => ({
6162
+ const re = x.current, J = V?.requestType, ve = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Ee = V?.pageSize ?? re?.pageSettings?.pageSize ?? b, je = V?.currentPage ?? re?.pageSettings?.currentPage ?? l, at = V?.columnName && V?.direction ? [{ field: V.columnName, dir: j(V.direction) }] : (re?.sortSettings?.columns || []).map((Re) => ({
6162
6163
  field: Re.field,
6163
6164
  dir: j(Re.direction ?? Re.dir)
6164
6165
  })), rt = V?.searchString ?? "", nt = V?.columns ?? re?.filterSettings?.columns ?? [];
@@ -6171,15 +6172,15 @@ function Ql(t) {
6171
6172
  filters: nt,
6172
6173
  rawEvent: V
6173
6174
  };
6174
- }, q = (V) => {
6175
+ }, G = (V) => {
6175
6176
  setTimeout(() => {
6176
6177
  x?.current?.hideSpinner();
6177
6178
  }, 1e3), V.requestType === "paging" && (D(V.currentPage), p(V.pageSize)), V.requestType === "sorting" && (w(V.columnName || "updatedDate"), P(V.direction === "Ascending" ? "ASC" : "DESC")), M && M(F(V), V);
6178
- }, X = (V) => {
6179
+ }, W = (V) => {
6179
6180
  typeof Y == "function" && Y(V?.rowData, V);
6180
6181
  }, xe = () => {
6181
6182
  const V = [];
6182
- return E && V.push(/* @__PURE__ */ e(Dt, { type: "checkbox", width: "50" }, "__checkbox__")), O.forEach((re, W) => {
6183
+ return E && V.push(/* @__PURE__ */ e(Dt, { type: "checkbox", width: "50" }, "__checkbox__")), I.forEach((re, J) => {
6183
6184
  const {
6184
6185
  field: ve,
6185
6186
  headerText: Ee,
@@ -6194,8 +6195,8 @@ function Ql(t) {
6194
6195
  format: Fa,
6195
6196
  visible: Ea = !0,
6196
6197
  minWidth: Ra,
6197
- maxWidth: Oa,
6198
- customAttributes: Ia,
6198
+ maxWidth: Ia,
6199
+ customAttributes: Oa,
6199
6200
  ...Pa
6200
6201
  } = re || {};
6201
6202
  V.push(
@@ -6215,11 +6216,11 @@ function Ql(t) {
6215
6216
  format: Fa,
6216
6217
  visible: Ea,
6217
6218
  minWidth: Ra,
6218
- maxWidth: Oa,
6219
- customAttributes: Ia,
6219
+ maxWidth: Ia,
6220
+ customAttributes: Oa,
6220
6221
  ...Pa
6221
6222
  },
6222
- ve || `col-${W}`
6223
+ ve || `col-${J}`
6223
6224
  )
6224
6225
  );
6225
6226
  }), V;
@@ -6236,8 +6237,8 @@ function Ql(t) {
6236
6237
  height: z,
6237
6238
  allowPaging: m,
6238
6239
  allowSorting: o,
6239
- allowFiltering: h,
6240
- allowGrouping: u,
6240
+ allowFiltering: u,
6241
+ allowGrouping: h,
6241
6242
  allowReordering: N,
6242
6243
  allowResizing: y,
6243
6244
  showColumnChooser: d,
@@ -6247,11 +6248,11 @@ function Ql(t) {
6247
6248
  columns: [{ field: k, direction: j($) }],
6248
6249
  allowUnsort: !1
6249
6250
  },
6250
- actionBegin: q,
6251
+ actionBegin: G,
6251
6252
  rowSelected: _,
6252
6253
  rowDeselected: U,
6253
- recordDoubleClick: X,
6254
- ...I,
6254
+ recordDoubleClick: W,
6255
+ ...O,
6255
6256
  children: [
6256
6257
  /* @__PURE__ */ e(gn, { children: xe() }),
6257
6258
  /* @__PURE__ */ e(bn, { services: S })
@@ -6291,14 +6292,14 @@ function ie({
6291
6292
  onSelect: l,
6292
6293
  identity: m = "_id",
6293
6294
  details: o = {},
6294
- ...h
6295
+ ...u
6295
6296
  }) {
6296
- const u = Xe(), N = ks(h, m), y = (v) => {
6297
+ const h = Xe(), N = ks(u, m), y = (v) => {
6297
6298
  l?.({
6298
6299
  key: N,
6299
6300
  checked: v.target.checked,
6300
6301
  details: o,
6301
- props: h
6302
+ props: u
6302
6303
  });
6303
6304
  }, r = i === "top-right" ? "top-3 right-3" : "top-3 left-3";
6304
6305
  return /* @__PURE__ */ n(
@@ -6310,7 +6311,7 @@ function ie({
6310
6311
  s && /* @__PURE__ */ e("div", { className: `absolute ${r} z-10`, children: /* @__PURE__ */ e(
6311
6312
  "input",
6312
6313
  {
6313
- id: u,
6314
+ id: h,
6314
6315
  type: "checkbox",
6315
6316
  className: "h-4 w-4 rounded border-zinc-300 focus:ring-[var(--primaryColor)]",
6316
6317
  onChange: y,
@@ -6338,8 +6339,8 @@ function Cs({
6338
6339
  // content
6339
6340
  title: m = "Activity",
6340
6341
  group: o = "Global",
6341
- moreGroupsLabel: h = "+ 5 more",
6342
- author: u = "Judith Black",
6342
+ moreGroupsLabel: u = "+ 5 more",
6343
+ author: h = "Judith Black",
6343
6344
  timeLabel: N = "Just now",
6344
6345
  imageUrl: y = "https://images.unsplash.com/photo-1469980098053-382eb10ba017?q=80&w=1200&auto=format&fit=crop",
6345
6346
  description: r = "Columbia University is a prestigious Ivy League institution located in the heart of New York City.",
@@ -6355,21 +6356,21 @@ function Cs({
6355
6356
  checkboxPosition: s,
6356
6357
  onSelect: i,
6357
6358
  identity: l,
6358
- details: { type: "activity", title: m, group: o, author: u },
6359
+ details: { type: "activity", title: m, group: o, author: h },
6359
6360
  ...v,
6360
6361
  children: [
6361
6362
  /* @__PURE__ */ e("div", { className: "flex items-start justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${g.title} ml-3`, children: m }) }),
6362
6363
  /* @__PURE__ */ n("div", { className: `text-zinc-500 dark:text-zinc-400 ${g.meta}`, children: [
6363
6364
  "Posted in ",
6364
6365
  /* @__PURE__ */ e("span", { className: "font-medium", children: "Global" }),
6365
- h ? /* @__PURE__ */ n(ee, { children: [
6366
+ u ? /* @__PURE__ */ n(ee, { children: [
6366
6367
  ",",
6367
6368
  " ",
6368
6369
  /* @__PURE__ */ e(
6369
6370
  "span",
6370
6371
  {
6371
6372
  className: "font-medium text-indigo-700",
6372
- children: h
6373
+ children: u
6373
6374
  }
6374
6375
  )
6375
6376
  ] }) : null,
@@ -6379,7 +6380,7 @@ function Cs({
6379
6380
  /* @__PURE__ */ n("div", { className: "mt-2 flex items-center gap-3", children: [
6380
6381
  /* @__PURE__ */ e(ze, { name: "John", size: "medium" }),
6381
6382
  /* @__PURE__ */ n("div", { className: "leading-tight", children: [
6382
- /* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-800 dark:text-zinc-100", children: u }),
6383
+ /* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-800 dark:text-zinc-100", children: h }),
6383
6384
  /* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${g.meta}`, children: N })
6384
6385
  ] })
6385
6386
  ] }),
@@ -6461,9 +6462,9 @@ function Ts({
6461
6462
  title: m = "Communities",
6462
6463
  activeTab: o = "joined",
6463
6464
  // "joined" | "suggested"
6464
- items: h = Ds,
6465
+ items: u = Ds,
6465
6466
  // spread for identity (_id/instanceId/etc)
6466
- ...u
6467
+ ...h
6467
6468
  }) {
6468
6469
  const N = ce(t), y = de[N], r = $s[N], v = (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"}`;
6469
6470
  return /* @__PURE__ */ n(
@@ -6474,8 +6475,8 @@ function Ts({
6474
6475
  checkboxPosition: s,
6475
6476
  onSelect: i,
6476
6477
  identity: l,
6477
- details: { type: "communities", title: m, activeTab: o, count: h?.length ?? 0 },
6478
- ...u,
6478
+ details: { type: "communities", title: m, activeTab: o, count: u?.length ?? 0 },
6479
+ ...h,
6479
6480
  children: [
6480
6481
  /* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
6481
6482
  /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${y.title}`, children: m }),
@@ -6504,7 +6505,7 @@ function Ts({
6504
6505
  }
6505
6506
  )
6506
6507
  ] }),
6507
- /* @__PURE__ */ e("div", { className: "grid gap-4 md:gap-5", children: h.map((d) => /* @__PURE__ */ e(
6508
+ /* @__PURE__ */ e("div", { className: "grid gap-4 md:gap-5", children: u.map((d) => /* @__PURE__ */ e(
6508
6509
  "div",
6509
6510
  {
6510
6511
  className: "rounded-2xl border border-zinc-200 dark:border-zinc-800 p-3 md:p-4",
@@ -6647,9 +6648,9 @@ function Es({
6647
6648
  title: m = "News",
6648
6649
  items: o = As,
6649
6650
  // spread for identity fields: _id / id / instanceId etc.
6650
- ...h
6651
+ ...u
6651
6652
  }) {
6652
- const u = ce(t), N = de[u], y = Fs[u];
6653
+ const h = ce(t), N = de[h], y = Fs[h];
6653
6654
  return /* @__PURE__ */ n(
6654
6655
  ie,
6655
6656
  {
@@ -6659,13 +6660,13 @@ function Es({
6659
6660
  onSelect: i,
6660
6661
  identity: l,
6661
6662
  details: { type: "news", title: m, count: o?.length ?? 0 },
6662
- ...h,
6663
+ ...u,
6663
6664
  children: [
6664
6665
  /* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
6665
6666
  /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${N.title}`, children: m }),
6666
6667
  /* @__PURE__ */ e("span", { className: "text-sm text-indigo-700 cursor-default select-none", children: "View All" })
6667
6668
  ] }),
6668
- u === "lg" ? (
6669
+ h === "lg" ? (
6669
6670
  // Large: 3-up grid of image cards
6670
6671
  /* @__PURE__ */ e("div", { className: `mt-4 ${y.grid}`, children: o.slice(0, 3).map((r) => /* @__PURE__ */ n("article", { children: [
6671
6672
  /* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: y.cardImg }),
@@ -6724,7 +6725,7 @@ Es.propTypes = {
6724
6725
  })
6725
6726
  )
6726
6727
  };
6727
- const Rs = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Os = {
6728
+ const Rs = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Is = {
6728
6729
  sm: {
6729
6730
  wrap: "max-w-md w-full md:w-auto flex-none justify-self-start",
6730
6731
  mapH: "h-48",
@@ -6746,7 +6747,7 @@ const Rs = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Os = {
6746
6747
  searchH: "h-11 text-base",
6747
6748
  chipGap: "gap-3.5"
6748
6749
  }
6749
- }, Is = ({ label: t, active: a = !1, size: s = "md", className: i = "" }) => {
6750
+ }, Os = ({ label: t, active: a = !1, size: s = "md", className: i = "" }) => {
6750
6751
  const l = "inline-flex items-center justify-center whitespace-nowrap rounded-full border transition-colors duration-150 shadow-[0_0.5px_0_rgba(0,0,0,0.04)]", m = {
6751
6752
  sm: "h-8 px-3 text-[11px] font-semibold",
6752
6753
  md: "h-9 px-3.5 text-[13px] font-semibold",
@@ -6762,8 +6763,8 @@ function Ms({
6762
6763
  identity: l = "_id",
6763
6764
  title: m = "Campus Map",
6764
6765
  campusName: o = "Morningside Heights Campus",
6765
- filters: h = Rs,
6766
- activeFilter: u = "All",
6766
+ filters: u = Rs,
6767
+ activeFilter: h = "All",
6767
6768
  // NEW: iframe controls
6768
6769
  mapQuery: N = "Florida",
6769
6770
  zoom: y = 12,
@@ -6771,7 +6772,7 @@ function Ms({
6771
6772
  // optional full embed URL override
6772
6773
  ...v
6773
6774
  }) {
6774
- const d = ce(t), g = de[d], z = Os[d], A = r || Ps(N, y);
6775
+ const d = ce(t), g = de[d], z = Is[d], A = r || Ps(N, y);
6775
6776
  return /* @__PURE__ */ e(
6776
6777
  ie,
6777
6778
  {
@@ -6780,7 +6781,7 @@ function Ms({
6780
6781
  checkboxPosition: s,
6781
6782
  onSelect: i,
6782
6783
  identity: l,
6783
- details: { type: "campus-map", title: m, campusName: o, activeFilter: u, mapQuery: N, zoom: y },
6784
+ details: { type: "campus-map", title: m, campusName: o, activeFilter: h, mapQuery: N, zoom: y },
6784
6785
  ...v,
6785
6786
  children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${z.mapH}`, children: [
6786
6787
  /* @__PURE__ */ e(
@@ -6805,7 +6806,7 @@ function Ms({
6805
6806
  /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
6806
6807
  ] })
6807
6808
  ] }),
6808
- /* @__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: h.map((E) => /* @__PURE__ */ e(Is, { label: E, active: E === u, size: d }, E)) }) }),
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((E) => /* @__PURE__ */ e(Os, { label: E, active: E === h, size: d }, E)) }) }),
6809
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: [
6810
6811
  /* @__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" }) }),
6811
6812
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
@@ -6974,11 +6975,11 @@ function _s({
6974
6975
  identity: l = "_id",
6975
6976
  title: m = "Upcoming Events",
6976
6977
  events: o = Ls,
6977
- selectedIndex: h = 0,
6978
- ...u
6978
+ selectedIndex: u = 0,
6979
+ ...h
6979
6980
  }) {
6980
- const [N, y] = L(h), r = ce(t), v = de[r], d = Bs[r], g = o[N] || o[0], z = (E, O) => {
6981
- y(O), i?.(E);
6981
+ const [N, y] = B(u), r = ce(t), v = de[r], d = Bs[r], g = o[N] || o[0], z = (E, I) => {
6982
+ y(I), i?.(E);
6982
6983
  }, A = r === "lg";
6983
6984
  return /* @__PURE__ */ n(
6984
6985
  ie,
@@ -6989,7 +6990,7 @@ function _s({
6989
6990
  onSelect: i,
6990
6991
  identity: l,
6991
6992
  details: { type: "events", title: m, count: o?.length ?? 0 },
6992
- ...u,
6993
+ ...h,
6993
6994
  children: [
6994
6995
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between mb-4", children: [
6995
6996
  /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }),
@@ -6998,29 +6999,29 @@ function _s({
6998
6999
  A ? (
6999
7000
  // Large: Two-column layout
7000
7001
  /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
7001
- /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((E, O) => /* @__PURE__ */ e(
7002
+ /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((E, I) => /* @__PURE__ */ e(
7002
7003
  jt,
7003
7004
  {
7004
7005
  ev: E,
7005
7006
  sizeMeta: d,
7006
- isSelected: O === N,
7007
- onClick: (M) => z(M, O)
7007
+ isSelected: I === N,
7008
+ onClick: (M) => z(M, I)
7008
7009
  },
7009
- E._id || E.id || O
7010
+ E._id || E.id || I
7010
7011
  )) }),
7011
7012
  /* @__PURE__ */ e(js, { ev: g, sizeMeta: d })
7012
7013
  ] })
7013
7014
  ) : (
7014
7015
  // Small/Medium: Simple list only
7015
- /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((E, O) => /* @__PURE__ */ e(
7016
+ /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((E, I) => /* @__PURE__ */ e(
7016
7017
  jt,
7017
7018
  {
7018
7019
  ev: E,
7019
7020
  sizeMeta: d,
7020
- isSelected: O === N,
7021
- onClick: (M) => z(M, O)
7021
+ isSelected: I === N,
7022
+ onClick: (M) => z(M, I)
7022
7023
  },
7023
- E._id || E.id || O
7024
+ E._id || E.id || I
7024
7025
  )) })
7025
7026
  ),
7026
7027
  !A && /* @__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" }) })
@@ -7133,10 +7134,10 @@ const Us = [
7133
7134
  }
7134
7135
  };
7135
7136
  function qs({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin: m }) {
7136
- const o = (u) => {
7137
- u.stopPropagation(), l?.(t);
7138
- }, h = (u) => {
7139
- u.stopPropagation(), m?.(t);
7137
+ const o = (h) => {
7138
+ h.stopPropagation(), l?.(t);
7139
+ }, u = (h) => {
7140
+ h.stopPropagation(), m?.(t);
7140
7141
  };
7141
7142
  return /* @__PURE__ */ n(
7142
7143
  "div",
@@ -7156,7 +7157,7 @@ function qs({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin
7156
7157
  /* @__PURE__ */ e(
7157
7158
  "button",
7158
7159
  {
7159
- onClick: h,
7160
+ onClick: u,
7160
7161
  className: "p-1 rounded hover:bg-zinc-200 dark:hover:bg-zinc-700 transition-colors duration-200",
7161
7162
  children: t.pinned ? /* @__PURE__ */ e(Sr, { className: "h-4 w-4 fill-blue-500 text-blue-500" }) : /* @__PURE__ */ e(Dr, { className: "h-4 w-4 text-zinc-400 group-hover:text-blue-500" })
7162
7163
  }
@@ -7189,17 +7190,17 @@ function Ys({
7189
7190
  identity: l = "_id",
7190
7191
  title: m = "0365 Mails",
7191
7192
  emails: o = Us,
7192
- selectedIndex: h = 0,
7193
- onStar: u,
7193
+ selectedIndex: u = 0,
7194
+ onStar: h,
7194
7195
  onPin: N,
7195
7196
  ...y
7196
7197
  }) {
7197
- const [r, v] = L(h), d = ce(t), g = de[d], z = Gs[d], A = (M, _) => {
7198
+ const [r, v] = B(u), d = ce(t), g = de[d], z = Gs[d], A = (M, _) => {
7198
7199
  v(_), i?.(M);
7199
7200
  }, E = (M) => {
7200
7201
  const _ = { ...M, starred: !M.starred };
7201
- u?.(_);
7202
- }, O = (M) => {
7202
+ h?.(_);
7203
+ }, I = (M) => {
7203
7204
  const _ = { ...M, pinned: !M.pinned };
7204
7205
  N?.(_);
7205
7206
  };
@@ -7224,7 +7225,7 @@ function Ys({
7224
7225
  isSelected: _ === r,
7225
7226
  onClick: (U) => A(U, _),
7226
7227
  onStar: E,
7227
- onPin: O
7228
+ onPin: I
7228
7229
  },
7229
7230
  M._id || M.id || _
7230
7231
  )) }),
@@ -7443,11 +7444,11 @@ function Qs({
7443
7444
  identity: l = "_id",
7444
7445
  title: m = "Directory",
7445
7446
  contacts: o = Ws,
7446
- selectedIndex: h = 0,
7447
- ...u
7447
+ selectedIndex: u = 0,
7448
+ ...h
7448
7449
  }) {
7449
- const [N, y] = L(h), r = ce(t), v = de[r], d = Js[r], g = (E, O) => {
7450
- y(O), i?.(E);
7450
+ const [N, y] = B(u), r = ce(t), v = de[r], d = Js[r], g = (E, I) => {
7451
+ y(I), i?.(E);
7451
7452
  }, z = o[N] || o[0], A = d.layout === "split";
7452
7453
  return /* @__PURE__ */ n(
7453
7454
  ie,
@@ -7458,20 +7459,20 @@ function Qs({
7458
7459
  onSelect: i,
7459
7460
  identity: l,
7460
7461
  details: { type: "directory", title: m, count: o?.length ?? 0 },
7461
- ...u,
7462
+ ...h,
7462
7463
  children: [
7463
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 ${v.title}`, children: m }) }),
7464
7465
  /* @__PURE__ */ e(Hs, { sizeMeta: d }),
7465
7466
  A ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
7466
- /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((E, O) => /* @__PURE__ */ e(
7467
+ /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((E, I) => /* @__PURE__ */ e(
7467
7468
  _t,
7468
7469
  {
7469
7470
  contact: E,
7470
7471
  sizeMeta: d,
7471
- isSelected: O === N,
7472
- onClick: (M) => g(M, O)
7472
+ isSelected: I === N,
7473
+ onClick: (M) => g(M, I)
7473
7474
  },
7474
- E._id || E.id || O
7475
+ E._id || E.id || I
7475
7476
  )) }),
7476
7477
  /* @__PURE__ */ e(
7477
7478
  Xs,
@@ -7482,15 +7483,15 @@ function Qs({
7482
7483
  )
7483
7484
  ] }) : (
7484
7485
  // Single column layout for small screens
7485
- /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((E, O) => /* @__PURE__ */ e(
7486
+ /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((E, I) => /* @__PURE__ */ e(
7486
7487
  _t,
7487
7488
  {
7488
7489
  contact: E,
7489
7490
  sizeMeta: d,
7490
- isSelected: O === N,
7491
- onClick: (M) => g(M, O)
7491
+ isSelected: I === N,
7492
+ onClick: (M) => g(M, I)
7492
7493
  },
7493
- E._id || E.id || O
7494
+ E._id || E.id || I
7494
7495
  )) })
7495
7496
  ),
7496
7497
  /* @__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" }) })
@@ -7577,8 +7578,8 @@ function el({
7577
7578
  // content
7578
7579
  title: m = "Account Summary",
7579
7580
  termLabel: o = "Spring 2024",
7580
- balance: h = 3e3,
7581
- totalCharges: u = 4440,
7581
+ balance: u = 3e3,
7582
+ totalCharges: h = 4440,
7582
7583
  totalPayments: N = 1568,
7583
7584
  transactions: y = [
7584
7585
  {
@@ -7607,7 +7608,7 @@ function el({
7607
7608
  checkboxPosition: s,
7608
7609
  onSelect: i,
7609
7610
  identity: l,
7610
- details: { type: "account-summary", termLabel: o, balance: h, totalCharges: u, totalPayments: N },
7611
+ details: { type: "account-summary", termLabel: o, balance: u, totalCharges: h, totalPayments: N },
7611
7612
  ...r,
7612
7613
  children: [
7613
7614
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
@@ -7620,11 +7621,11 @@ function el({
7620
7621
  /* @__PURE__ */ n("div", { className: g.topGrid || g.grid, children: [
7621
7622
  /* @__PURE__ */ n("div", { className: "space-y-4", children: [
7622
7623
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Account Balance" }),
7623
- /* @__PURE__ */ e("div", { className: g.balance, children: De(h) }),
7624
+ /* @__PURE__ */ e("div", { className: g.balance, children: De(u) }),
7624
7625
  !g.showTxns && /* @__PURE__ */ n("div", { className: g.totalsRow, children: [
7625
7626
  /* @__PURE__ */ n("div", { children: [
7626
7627
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Charges" }),
7627
- /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-rose-600", children: De(u) })
7628
+ /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-rose-600", children: De(h) })
7628
7629
  ] }),
7629
7630
  /* @__PURE__ */ n("div", { children: [
7630
7631
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Payments" }),
@@ -7636,7 +7637,7 @@ function el({
7636
7637
  /* @__PURE__ */ n("div", { className: g.totalsRow, children: [
7637
7638
  /* @__PURE__ */ n("div", { children: [
7638
7639
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Charges" }),
7639
- /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-rose-600", children: De(u) })
7640
+ /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-rose-600", children: De(h) })
7640
7641
  ] }),
7641
7642
  /* @__PURE__ */ n("div", { children: [
7642
7643
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Payments" }),
@@ -7769,9 +7770,9 @@ function al({
7769
7770
  identity: l = "_id",
7770
7771
  title: m = "Pay Stub and Leave Balance",
7771
7772
  term: o = "Fall 2025",
7772
- ...h
7773
+ ...u
7773
7774
  }) {
7774
- const [u, N] = L("vacation"), [y, r] = L(!1), v = ce(t), d = de[v], g = tl[v], z = qe.find((A) => A.id === u) || qe[0];
7775
+ const [h, N] = B("vacation"), [y, r] = B(!1), v = ce(t), d = de[v], g = tl[v], z = qe.find((A) => A.id === h) || qe[0];
7775
7776
  return /* @__PURE__ */ n(
7776
7777
  ie,
7777
7778
  {
@@ -7781,7 +7782,7 @@ function al({
7781
7782
  onSelect: i,
7782
7783
  identity: l,
7783
7784
  details: { type: "leave-balance", title: m },
7784
- ...h,
7785
+ ...u,
7785
7786
  children: [
7786
7787
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
7787
7788
  /* @__PURE__ */ n("div", { children: [
@@ -7810,7 +7811,7 @@ function al({
7810
7811
  g.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: qe.map((A) => /* @__PURE__ */ e(
7811
7812
  "button",
7812
7813
  {
7813
- className: `flex-1 py-2 px-4 text-center ${g.tab} font-medium border-b-2 transition-colors duration-200 ${u === A.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"}`,
7814
+ className: `flex-1 py-2 px-4 text-center ${g.tab} font-medium border-b-2 transition-colors duration-200 ${h === A.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"}`,
7814
7815
  onClick: () => N(A.id),
7815
7816
  children: A.name.split(" ")[0]
7816
7817
  },
@@ -7960,9 +7961,9 @@ function ll({
7960
7961
  identity: l = "_id",
7961
7962
  title: m = "Drive",
7962
7963
  subtitle: o = "Drive Shared",
7963
- ...h
7964
+ ...u
7964
7965
  }) {
7965
- const [u, N] = L(!1), y = ce(t), r = de[y], v = sl[y];
7966
+ const [h, N] = B(!1), y = ce(t), r = de[y], v = sl[y];
7966
7967
  return /* @__PURE__ */ n(
7967
7968
  ie,
7968
7969
  {
@@ -7972,7 +7973,7 @@ function ll({
7972
7973
  onSelect: i,
7973
7974
  identity: l,
7974
7975
  details: { type: "drive", title: m },
7975
- ...h,
7976
+ ...u,
7976
7977
  children: [
7977
7978
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
7978
7979
  /* @__PURE__ */ n("div", { children: [
@@ -7984,11 +7985,11 @@ function ll({
7984
7985
  "button",
7985
7986
  {
7986
7987
  className: "flex items-center gap-1 p-2 text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors duration-200",
7987
- onClick: () => N(!u),
7988
+ onClick: () => N(!h),
7988
7989
  children: /* @__PURE__ */ e(Qt, { className: "h-4 w-4" })
7989
7990
  }
7990
7991
  ),
7991
- u && /* @__PURE__ */ n("div", { className: "absolute right-0 top-full mt-1 w-48 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md shadow-lg z-10 py-1", children: [
7992
+ h && /* @__PURE__ */ n("div", { className: "absolute right-0 top-full mt-1 w-48 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md shadow-lg z-10 py-1", children: [
7992
7993
  /* @__PURE__ */ n("button", { className: "w-full px-4 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left flex items-center gap-2", children: [
7993
7994
  /* @__PURE__ */ e(na, { className: "h-4 w-4" }),
7994
7995
  "Download All"
@@ -8154,7 +8155,7 @@ const il = [
8154
8155
  }
8155
8156
  };
8156
8157
  function dl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
8157
- const [l, m] = L(!1), o = Da(t.type), h = cl(t.type);
8158
+ const [l, m] = B(!1), o = Da(t.type), u = cl(t.type);
8158
8159
  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: [
8159
8160
  /* @__PURE__ */ e(
8160
8161
  "button",
@@ -8164,7 +8165,7 @@ function dl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
8164
8165
  }
8165
8166
  ),
8166
8167
  /* @__PURE__ */ n("div", { className: "flex gap-3 pr-6", children: [
8167
- /* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(h, { className: `h-4 w-4 ${o.icon}` }) }),
8168
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(u, { className: `h-4 w-4 ${o.icon}` }) }),
8168
8169
  /* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
8169
8170
  /* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-1 ${t.read ? "font-medium" : "font-semibold"}`, children: qt(t.title, a.maxTitleWords) }),
8170
8171
  a.showMessage && t.message && /* @__PURE__ */ e("div", { className: `${a.message} text-zinc-600 dark:text-zinc-400 mb-2 leading-relaxed`, children: qt(t.message, a.maxMessageWords) }),
@@ -8178,7 +8179,7 @@ function dl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
8178
8179
  ] });
8179
8180
  }
8180
8181
  function ml({ alert: t, onDismiss: a }) {
8181
- const [s, i] = L(!1), l = Da("banner"), m = () => {
8182
+ const [s, i] = B(!1), l = Da("banner"), m = () => {
8182
8183
  i(!0), a?.(t);
8183
8184
  };
8184
8185
  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: [
@@ -8205,11 +8206,11 @@ function ul({
8205
8206
  identity: l = "_id",
8206
8207
  title: m = "Alerts",
8207
8208
  alerts: o = il,
8208
- showBanner: h = !0,
8209
- ...u
8209
+ showBanner: u = !0,
8210
+ ...h
8210
8211
  }) {
8211
- const [N, y] = L(o), r = ce(t), v = de[r], d = ol[r], g = (E) => {
8212
- y((O) => O.filter((M) => M.id !== E.id));
8212
+ const [N, y] = B(o), r = ce(t), v = de[r], d = ol[r], g = (E) => {
8213
+ y((I) => I.filter((M) => M.id !== E.id));
8213
8214
  }, z = N.find((E) => E.type === "banner"), A = N.filter((E) => E.type !== "banner");
8214
8215
  return /* @__PURE__ */ n(
8215
8216
  ie,
@@ -8220,10 +8221,10 @@ function ul({
8220
8221
  onSelect: i,
8221
8222
  identity: l,
8222
8223
  details: { type: "alerts", title: m, count: N.length },
8223
- ...u,
8224
+ ...h,
8224
8225
  children: [
8225
8226
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }) }),
8226
- h && z && t !== "sm" && /* @__PURE__ */ e(
8227
+ u && z && t !== "sm" && /* @__PURE__ */ e(
8227
8228
  ml,
8228
8229
  {
8229
8230
  alert: z,
@@ -8342,7 +8343,7 @@ const hl = [
8342
8343
  }
8343
8344
  };
8344
8345
  function gl({ video: t, sizeMeta: a }) {
8345
- const [s, i] = L(!1);
8346
+ const [s, i] = B(!1);
8346
8347
  return /* @__PURE__ */ n("div", { className: "group cursor-pointer", children: [
8347
8348
  /* @__PURE__ */ n("div", { className: `relative ${a.thumbnailHeight} rounded-lg overflow-hidden bg-zinc-200 dark:bg-zinc-800`, children: [
8348
8349
  /* @__PURE__ */ e(
@@ -8382,9 +8383,9 @@ function bl({
8382
8383
  identity: l = "_id",
8383
8384
  title: m = "Videos",
8384
8385
  videos: o = hl,
8385
- ...h
8386
+ ...u
8386
8387
  }) {
8387
- const [u, N] = L(!1), y = ce(t), r = de[y], v = pl[y];
8388
+ const [h, N] = B(!1), y = ce(t), r = de[y], v = pl[y];
8388
8389
  return /* @__PURE__ */ n(
8389
8390
  ie,
8390
8391
  {
@@ -8394,7 +8395,7 @@ function bl({
8394
8395
  onSelect: i,
8395
8396
  identity: l,
8396
8397
  details: { type: "videos", title: m, count: o.length },
8397
- ...h,
8398
+ ...u,
8398
8399
  children: [
8399
8400
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between ", children: [
8400
8401
  /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${r.title}`, children: m }),
@@ -8403,14 +8404,14 @@ function bl({
8403
8404
  "button",
8404
8405
  {
8405
8406
  className: "flex items-center gap-1 px-3 py-1.5 text-sm text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 border border-zinc-300 dark:border-zinc-600 rounded-md transition-colors duration-200",
8406
- onClick: () => N(!u),
8407
+ onClick: () => N(!h),
8407
8408
  children: [
8408
8409
  "Filter",
8409
8410
  /* @__PURE__ */ e(fe, { className: "h-4 w-4 transform rotate-90" })
8410
8411
  ]
8411
8412
  }
8412
8413
  ),
8413
- u && /* @__PURE__ */ n("div", { className: "absolute right-0 top-full mt-1 w-48 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md shadow-lg z-10 py-1", children: [
8414
+ h && /* @__PURE__ */ n("div", { className: "absolute right-0 top-full mt-1 w-48 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md shadow-lg z-10 py-1", children: [
8414
8415
  /* @__PURE__ */ e("button", { className: "w-full px-4 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left", children: "All Videos" }),
8415
8416
  /* @__PURE__ */ e("button", { className: "w-full px-4 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left", children: "Campus Life" }),
8416
8417
  /* @__PURE__ */ e("button", { className: "w-full px-4 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left", children: "Academic" }),
@@ -8480,7 +8481,7 @@ export {
8480
8481
  Rl as FullScreenLoader,
8481
8482
  Al as GenericFilter,
8482
8483
  we as IconButton,
8483
- J as Input,
8484
+ X as Input,
8484
8485
  al as LeaveBalanceMock,
8485
8486
  ws as ManageCollectionList,
8486
8487
  Rn as Modal,
@@ -8500,11 +8501,11 @@ export {
8500
8501
  ba as Textarea,
8501
8502
  Xl as ToastProvider,
8502
8503
  fa as ToggleSwitch,
8503
- Ol as Tooltip,
8504
+ Il as Tooltip,
8504
8505
  ql as TreeView,
8505
8506
  oe as UnifyedCoreButton,
8506
8507
  bl as VideosMock,
8507
- Il as WizardModal,
8508
+ Ol as WizardModal,
8508
8509
  Na as adGroupsListSearchApi,
8509
8510
  Vl as axiosDelete,
8510
8511
  Qe as axiosGet,