@starasia/admin 8.10.2 → 8.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -14,7 +14,7 @@ import { Dialog as dr, DialogTitle as nn, DialogBody as ur, DialogFooter as on }
14
14
  export * from "@starasia/dialog";
15
15
  import { Drawer as ln } from "@starasia/drawer";
16
16
  export * from "@starasia/drawer";
17
- import { Dropdown as Rt } from "@starasia/dropdown";
17
+ import { Dropdown as It } from "@starasia/dropdown";
18
18
  export * from "@starasia/dropdown";
19
19
  import { useMediaQuery as De, useDebounce as jn } from "@starasia/hooks";
20
20
  export * from "@starasia/hooks";
@@ -59,7 +59,7 @@ import { Skeleton as Xe } from "@starasia/skeleton";
59
59
  export * from "@starasia/skeleton";
60
60
  export * from "@starasia/progress-stepper";
61
61
  import { jsx as e, Fragment as oe, jsxs as u } from "react/jsx-runtime";
62
- import et, { createContext as Vt, useState as R, useContext as mt, useCallback as K, useMemo as pe, memo as Qe, useEffect as U, useRef as ae, useLayoutEffect as ct, forwardRef as gr, isValidElement as cr, Children as Jn, useImperativeHandle as Qn } from "react";
62
+ import et, { createContext as Vt, useState as I, useContext as mt, useCallback as K, useMemo as pe, memo as Qe, useEffect as U, useRef as ae, useLayoutEffect as ct, forwardRef as gr, isValidElement as cr, Children as Jn, useImperativeHandle as Qn } from "react";
63
63
  import { useSearchParams as Tt, useNavigate as pr, useLocation as bt, Outlet as zr, Link as Bt, useParams as an } from "react-router";
64
64
  import Yn, { createPortal as dn } from "react-dom";
65
65
  import Xn from "react-easy-crop";
@@ -72,7 +72,7 @@ const Kn = {
72
72
  setUserData: () => {
73
73
  }
74
74
  }, un = Vt(Kn), hn = () => mt(un), ei = (t) => {
75
- const [r, n] = R(
75
+ const [r, n] = I(
76
76
  (t == null ? void 0 : t.initialUserData) || null
77
77
  );
78
78
  return {
@@ -88,26 +88,26 @@ const Kn = {
88
88
  clearBadge: () => {
89
89
  }
90
90
  }), ti = ({ children: t }) => {
91
- const [r, n] = R({}), o = K(
91
+ const [r, n] = I({}), o = K(
92
92
  (c) => {
93
93
  n(
94
- (d) => typeof c == "function" ? c(d) : c
94
+ (a) => typeof c == "function" ? c(a) : c
95
95
  );
96
96
  },
97
97
  []
98
98
  ), i = K(
99
- (c, d) => {
100
- n((a) => {
101
- const m = typeof d == "function" ? d(a[c]) : d;
102
- return { ...a, [c]: m };
99
+ (c, a) => {
100
+ n((d) => {
101
+ const m = typeof a == "function" ? a(d[c]) : a;
102
+ return { ...d, [c]: m };
103
103
  });
104
104
  },
105
105
  []
106
106
  ), l = K((c) => {
107
- n((d) => {
108
- if (!(c in d)) return d;
109
- const a = { ...d };
110
- return delete a[c], a;
107
+ n((a) => {
108
+ if (!(c in a)) return a;
109
+ const d = { ...a };
110
+ return delete d[c], d;
111
111
  });
112
112
  }, []), s = pe(
113
113
  () => ({ badges: r, setBadge: i, setBadges: o, clearBadge: l }),
@@ -126,7 +126,7 @@ const Kn = {
126
126
  initialUserData: l,
127
127
  theme: s
128
128
  }) => {
129
- const c = ei({ initialUserData: l }), { theme: d } = Gn();
129
+ const c = ei({ initialUserData: l }), { theme: a } = Gn();
130
130
  return /* @__PURE__ */ e(
131
131
  un.Provider,
132
132
  {
@@ -138,7 +138,7 @@ const Kn = {
138
138
  setUserData: c.setUserData,
139
139
  menuBottom: n
140
140
  },
141
- children: /* @__PURE__ */ e(ti, { children: s ? /* @__PURE__ */ e(Br, { value: s, children: t }) : d ? /* @__PURE__ */ e(Br, { value: d, children: t }) : t })
141
+ children: /* @__PURE__ */ e(ti, { children: s ? /* @__PURE__ */ e(Br, { value: s, children: t }) : a ? /* @__PURE__ */ e(Br, { value: a, children: t }) : t })
142
142
  }
143
143
  );
144
144
  }, ic = Qe(ni);
@@ -181,7 +181,7 @@ function ii({
181
181
  }
182
182
  const yr = Vt(null);
183
183
  function oi({ children: t }) {
184
- const [r, n] = R(null), [o, i] = R(null), [l, s] = R(null), [c, d] = R(0), a = K(() => (d((m) => m + 1), () => d((m) => m - 1)), []);
184
+ const [r, n] = I(null), [o, i] = I(null), [l, s] = I(null), [c, a] = I(0), d = K(() => (a((m) => m + 1), () => a((m) => m - 1)), []);
185
185
  return /* @__PURE__ */ e(
186
186
  yr.Provider,
187
187
  {
@@ -193,7 +193,7 @@ function oi({ children: t }) {
193
193
  setAppendNode: i,
194
194
  setReplaceNode: s,
195
195
  replaceCount: c,
196
- registerReplace: a
196
+ registerReplace: d
197
197
  },
198
198
  children: t
199
199
  }
@@ -224,11 +224,11 @@ function oc({
224
224
  }
225
225
  const br = Vt(null);
226
226
  function ci({ children: t }) {
227
- const [r, n] = R({}), [o, i] = R({}), l = K((d, a) => {
228
- n((m) => m[d] === a ? m : { ...m, [d]: a });
229
- }, []), s = K((d) => (i((a) => ({ ...a, [d]: (a[d] ?? 0) + 1 })), () => i((a) => ({
230
- ...a,
231
- [d]: Math.max(0, (a[d] ?? 0) - 1)
227
+ const [r, n] = I({}), [o, i] = I({}), l = K((a, d) => {
228
+ n((m) => m[a] === d ? m : { ...m, [a]: d });
229
+ }, []), s = K((a) => (i((d) => ({ ...d, [a]: (d[a] ?? 0) + 1 })), () => i((d) => ({
230
+ ...d,
231
+ [a]: Math.max(0, (d[a] ?? 0) - 1)
232
232
  }))), []), c = pe(
233
233
  () => ({ outletNodes: r, setOutletNode: l, slotCounts: o, registerSlot: s }),
234
234
  [r, l, o, s]
@@ -275,7 +275,7 @@ function cc() {
275
275
  mn(null);
276
276
  }
277
277
  function gn() {
278
- const [t, r] = R(
278
+ const [t, r] = I(
279
279
  () => Ar()
280
280
  );
281
281
  return U(() => {
@@ -291,8 +291,8 @@ function gn() {
291
291
  mn(o), r(o);
292
292
  } };
293
293
  }
294
- let wt = 0, lt = !1, Ir = /* @__PURE__ */ new Set();
295
- const Rr = () => /* @__PURE__ */ u(
294
+ let wt = 0, lt = !1, Rr = /* @__PURE__ */ new Set();
295
+ const Ir = () => /* @__PURE__ */ u(
296
296
  "svg",
297
297
  {
298
298
  width: "100%",
@@ -335,18 +335,18 @@ function sc({
335
335
  isLoggingOut: l,
336
336
  loadingComponent: s,
337
337
  sidebarHeaderContent: c,
338
- headerActions: d,
339
- profileRole: a,
338
+ headerActions: a,
339
+ profileRole: d,
340
340
  profileMenuButtons: m,
341
341
  profileMenuItems: p,
342
342
  logoutButton: g
343
343
  }) {
344
- var Ie, tt;
345
- const [x] = Tt(), W = x.get("embed") === "true", y = hn(), { badges: k } = ri(), L = pr(), z = bt(), C = !De("md"), [H, A] = R(!1), [v, S] = R(!1), [$, O] = R(!1), [j, G] = R(!1), [ne, ge] = R(
346
- () => new Set(Ir)
347
- ), [ie, le] = R(null), { selectedGroupId: J, setSelectedGroupId: q } = gn();
344
+ var Re, tt;
345
+ const [x] = Tt(), W = x.get("embed") === "true", y = hn(), { badges: k } = ri(), L = pr(), z = bt(), C = !De("md"), [H, A] = I(!1), [v, S] = I(!1), [$, O] = I(!1), [j, G] = I(!1), [ne, ge] = I(
346
+ () => new Set(Rr)
347
+ ), [ie, le] = I(null), { selectedGroupId: J, setSelectedGroupId: q } = gn();
348
348
  U(() => {
349
- Ir = ne;
349
+ Rr = ne;
350
350
  }, [ne]);
351
351
  const he = ae(null), te = ae(null);
352
352
  U(() => {
@@ -409,7 +409,7 @@ function sc({
409
409
  return F.children && Z.push(...F.children.map((_) => _.to)), Z;
410
410
  }, Ve = [
411
411
  ...y.menus.flatMap((F) => F.items.flatMap(Ee)),
412
- ...((Ie = y.menuBottom) == null ? void 0 : Ie.flatMap(Ee)) ?? []
412
+ ...((Re = y.menuBottom) == null ? void 0 : Re.flatMap(Ee)) ?? []
413
413
  ], be = (F) => {
414
414
  if (!z.pathname.startsWith(F)) return !1;
415
415
  const Z = Ve.filter((_) => z.pathname.startsWith(_)).sort((_, B) => B.length - _.length)[0];
@@ -830,7 +830,7 @@ function sc({
830
830
  cursor: "pointer",
831
831
  flexShrink: 0
832
832
  },
833
- children: /* @__PURE__ */ e(Rr, {})
833
+ children: /* @__PURE__ */ e(Ir, {})
834
834
  }
835
835
  ),
836
836
  F && /* @__PURE__ */ e(
@@ -867,7 +867,7 @@ function sc({
867
867
  height: "1rem",
868
868
  display: "inline-flex"
869
869
  },
870
- children: /* @__PURE__ */ e(Rr, {})
870
+ children: /* @__PURE__ */ e(Ir, {})
871
871
  }
872
872
  )
873
873
  }
@@ -1053,7 +1053,7 @@ function sc({
1053
1053
  /* @__PURE__ */ e(li, { children: r })
1054
1054
  ] }),
1055
1055
  /* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
1056
- d,
1056
+ a,
1057
1057
  /* @__PURE__ */ u(Be, { position: "bottom-right", children: [
1058
1058
  /* @__PURE__ */ e(ke, { children: /* @__PURE__ */ u(
1059
1059
  "div",
@@ -1200,7 +1200,7 @@ function sc({
1200
1200
  children: (n == null ? void 0 : n.email) || "unknown"
1201
1201
  }
1202
1202
  ),
1203
- a && /* @__PURE__ */ e(
1203
+ d && /* @__PURE__ */ e(
1204
1204
  "p",
1205
1205
  {
1206
1206
  style: {
@@ -1212,7 +1212,7 @@ function sc({
1212
1212
  overflow: "hidden",
1213
1213
  textOverflow: "ellipsis"
1214
1214
  },
1215
- children: a
1215
+ children: d
1216
1216
  }
1217
1217
  )
1218
1218
  ]
@@ -1449,7 +1449,7 @@ const Nt = gr(
1449
1449
  hoverTextColor: i,
1450
1450
  hoverIconColor: l
1451
1451
  }) => {
1452
- const [s, c] = R(!1);
1452
+ const [s, c] = I(!1);
1453
1453
  return /* @__PURE__ */ u(
1454
1454
  f,
1455
1455
  {
@@ -1492,7 +1492,7 @@ const Nt = gr(
1492
1492
  iconColor: o,
1493
1493
  hoverIconColor: i
1494
1494
  }) => {
1495
- const [l, s] = R(!1), c = o ?? "var(--sa-text-subtle, #8c8f97)", d = i ?? "var(--sa-text-subtle, #8c8f97)", a = t.length > 1 ? t[0] : void 0, m = !!(a != null && a.to || a != null && a.onClick), p = /* @__PURE__ */ e(
1495
+ const [l, s] = I(!1), c = o ?? "var(--sa-text-subtle, #8c8f97)", a = i ?? "var(--sa-text-subtle, #8c8f97)", d = t.length > 1 ? t[0] : void 0, m = !!(d != null && d.to || d != null && d.onClick), p = /* @__PURE__ */ e(
1496
1496
  M,
1497
1497
  {
1498
1498
  name: n || "ChevronLeft",
@@ -1500,12 +1500,12 @@ const Nt = gr(
1500
1500
  onMouseEnter: m ? () => s(!0) : void 0,
1501
1501
  onMouseLeave: m ? () => s(!1) : void 0,
1502
1502
  style: {
1503
- color: m && l ? d : c,
1503
+ color: m && l ? a : c,
1504
1504
  transition: "color 0.15s ease",
1505
1505
  cursor: m ? "pointer" : void 0
1506
1506
  }
1507
1507
  }
1508
- ), g = a != null && a.to ? /* @__PURE__ */ e(Bt, { to: a.to, replace: !0, style: { textDecoration: "none" }, children: p }) : a != null && a.onClick ? /* @__PURE__ */ e(Nt, { onClick: a.onClick, children: p }) : p;
1508
+ ), g = d != null && d.to ? /* @__PURE__ */ e(Bt, { to: d.to, replace: !0, style: { textDecoration: "none" }, children: p }) : d != null && d.onClick ? /* @__PURE__ */ e(Nt, { onClick: d.onClick, children: p }) : p;
1509
1509
  return /* @__PURE__ */ u(f, { direction: "row", gap: "xs", align: "center", children: [
1510
1510
  g,
1511
1511
  /* @__PURE__ */ e(Nn, { separator: r, size: "md", children: t.map((x, W) => {
@@ -1611,9 +1611,9 @@ function di({
1611
1611
  selectedGroupId: o,
1612
1612
  onSelect: i
1613
1613
  }) {
1614
- const [l, s] = R(void 0), c = (a) => {
1615
- i(a), r();
1616
- }, d = Yt[0];
1614
+ const [l, s] = I(void 0), c = (d) => {
1615
+ i(d), r();
1616
+ }, a = Yt[0];
1617
1617
  return /* @__PURE__ */ e(
1618
1618
  dr,
1619
1619
  {
@@ -1642,27 +1642,27 @@ function di({
1642
1642
  onMouseLeave: () => s(void 0),
1643
1643
  style: Nr,
1644
1644
  children: [
1645
- /* @__PURE__ */ e("div", { style: Vr(o === null, l === "all", d), children: /* @__PURE__ */ e("div", { style: { color: d.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(M, { name: "Grid", size: "lg", style: { width: 32, height: 32 } }) }) }),
1645
+ /* @__PURE__ */ e("div", { style: Vr(o === null, l === "all", a), children: /* @__PURE__ */ e("div", { style: { color: a.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(M, { name: "Grid", size: "lg", style: { width: 32, height: 32 } }) }) }),
1646
1646
  /* @__PURE__ */ e("span", { style: Tr, children: "Semua" })
1647
1647
  ]
1648
1648
  }
1649
1649
  ),
1650
- n.map((a, m) => {
1650
+ n.map((d, m) => {
1651
1651
  var y;
1652
- const p = o === a.id, g = l === a.id, x = ((y = a.items[0]) == null ? void 0 : y.icon) ?? "Grid", W = Yt[(m + 1) % Yt.length];
1652
+ const p = o === d.id, g = l === d.id, x = ((y = d.items[0]) == null ? void 0 : y.icon) ?? "Grid", W = Yt[(m + 1) % Yt.length];
1653
1653
  return /* @__PURE__ */ u(
1654
1654
  "button",
1655
1655
  {
1656
- onClick: () => c(a.id),
1657
- onMouseEnter: () => s(a.id),
1656
+ onClick: () => c(d.id),
1657
+ onMouseEnter: () => s(d.id),
1658
1658
  onMouseLeave: () => s(void 0),
1659
1659
  style: Nr,
1660
1660
  children: [
1661
1661
  /* @__PURE__ */ e("div", { style: Vr(p, g, W), children: /* @__PURE__ */ e("div", { style: { color: W.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(M, { name: x, size: "lg", style: { width: 32, height: 32 } }) }) }),
1662
- /* @__PURE__ */ e("span", { style: Tr, children: a.name })
1662
+ /* @__PURE__ */ e("span", { style: Tr, children: d.name })
1663
1663
  ]
1664
1664
  },
1665
- a.id
1665
+ d.id
1666
1666
  );
1667
1667
  })
1668
1668
  ]
@@ -1675,13 +1675,13 @@ function dc({
1675
1675
  onSelect: t,
1676
1676
  "aria-label": r = "Pilih module"
1677
1677
  } = {}) {
1678
- const n = hn(), o = pr(), { selectedGroupId: i, setSelectedGroupId: l } = gn(), [s, c] = R(!1), d = (a) => {
1678
+ const n = hn(), o = pr(), { selectedGroupId: i, setSelectedGroupId: l } = gn(), [s, c] = I(!1), a = (d) => {
1679
1679
  var m;
1680
- if (l(a), a !== null) {
1681
- const p = n.menus.find((x) => x.id === a), g = (m = p == null ? void 0 : p.items[0]) == null ? void 0 : m.to;
1680
+ if (l(d), d !== null) {
1681
+ const p = n.menus.find((x) => x.id === d), g = (m = p == null ? void 0 : p.items[0]) == null ? void 0 : m.to;
1682
1682
  g && o(g);
1683
1683
  }
1684
- t == null || t(a);
1684
+ t == null || t(d);
1685
1685
  };
1686
1686
  return /* @__PURE__ */ u(oe, { children: [
1687
1687
  /* @__PURE__ */ u("div", { style: { position: "relative" }, children: [
@@ -1702,11 +1702,11 @@ function dc({
1702
1702
  cursor: "pointer"
1703
1703
  },
1704
1704
  "aria-label": r,
1705
- onMouseEnter: (a) => {
1706
- a.currentTarget.style.backgroundColor = "var(--sa-background-primary-inverse, #f8f8f8)";
1705
+ onMouseEnter: (d) => {
1706
+ d.currentTarget.style.backgroundColor = "var(--sa-background-primary-inverse, #f8f8f8)";
1707
1707
  },
1708
- onMouseLeave: (a) => {
1709
- a.currentTarget.style.backgroundColor = "transparent";
1708
+ onMouseLeave: (d) => {
1709
+ d.currentTarget.style.backgroundColor = "transparent";
1710
1710
  },
1711
1711
  children: /* @__PURE__ */ e(M, { name: "GridApplication", size: "sm" })
1712
1712
  }
@@ -1732,9 +1732,9 @@ function dc({
1732
1732
  {
1733
1733
  isShow: s,
1734
1734
  onHide: () => c(!1),
1735
- menus: n.menus.filter((a) => a.parentGroupId === void 0),
1735
+ menus: n.menus.filter((d) => d.parentGroupId === void 0),
1736
1736
  selectedGroupId: i,
1737
- onSelect: d
1737
+ onSelect: a
1738
1738
  }
1739
1739
  )
1740
1740
  ] });
@@ -1773,11 +1773,11 @@ const ui = (t, r) => {
1773
1773
  verticalAlign: l
1774
1774
  }),
1775
1775
  [i, l]
1776
- ), d = () => typeof r == "string" ? /* @__PURE__ */ e(D, { fontWeight: "medium", color: "subtlest", children: r }) : r, a = () => typeof t == "string" || typeof t == "number" ? /* @__PURE__ */ e(D, { color: "primary", fontWeight: "medium", children: t }) : t, m = () => typeof n == "string" || typeof n == "number" ? /* @__PURE__ */ e(D, { fontWeight: "medium", color: "subtlest", children: n }) : n;
1776
+ ), a = () => typeof r == "string" ? /* @__PURE__ */ e(D, { fontWeight: "medium", color: "subtlest", children: r }) : r, d = () => typeof t == "string" || typeof t == "number" ? /* @__PURE__ */ e(D, { color: "primary", fontWeight: "medium", children: t }) : t, m = () => typeof n == "string" || typeof n == "number" ? /* @__PURE__ */ e(D, { fontWeight: "medium", color: "subtlest", children: n }) : n;
1777
1777
  return /* @__PURE__ */ u(Ne, { children: [
1778
- /* @__PURE__ */ e(He, { style: s, width: o, children: d() }),
1778
+ /* @__PURE__ */ e(He, { style: s, width: o, children: a() }),
1779
1779
  n ? /* @__PURE__ */ e(He, { style: c, width: 24, children: m() }) : null,
1780
- /* @__PURE__ */ e(He, { style: s, children: a() })
1780
+ /* @__PURE__ */ e(He, { style: s, children: d() })
1781
1781
  ] });
1782
1782
  }
1783
1783
  ), fi = Qe(({ fields: t, separator: r, labelWidth: n }) => /* @__PURE__ */ e(mr, { withColumnBorder: !1, withRowBorder: !1, children: t.map((o, i) => /* @__PURE__ */ e(
@@ -1801,7 +1801,7 @@ const ui = (t, r) => {
1801
1801
  const s = pe(
1802
1802
  () => ui(o, t),
1803
1803
  [o, t]
1804
- ), c = s.length > 2, d = () => {
1804
+ ), c = s.length > 2, a = () => {
1805
1805
  switch (r) {
1806
1806
  case 1:
1807
1807
  return "width-full";
@@ -1828,18 +1828,18 @@ const ui = (t, r) => {
1828
1828
  borderWidth: l ? "border" : void 0,
1829
1829
  borderStyle: l ? "border-solid" : void 0,
1830
1830
  borderColor: l ? "border-subtle" : void 0,
1831
- children: s.map((a, m) => /* @__PURE__ */ e(
1831
+ children: s.map((d, m) => /* @__PURE__ */ e(
1832
1832
  f,
1833
1833
  {
1834
1834
  direction: "column",
1835
1835
  flex: c ? void 0 : "1",
1836
- width: c ? d() : void 0,
1836
+ width: c ? a() : void 0,
1837
1837
  marginBottom: c ? "lg" : void 0,
1838
1838
  children: /* @__PURE__ */ e(
1839
1839
  fi,
1840
1840
  {
1841
1841
  labelWidth: i,
1842
- fields: a,
1842
+ fields: d,
1843
1843
  separator: n
1844
1844
  }
1845
1845
  )
@@ -1850,7 +1850,7 @@ const ui = (t, r) => {
1850
1850
  );
1851
1851
  }
1852
1852
  ), mi = ({ backButton: t }) => {
1853
- const [r, n] = R(!1), o = (t == null ? void 0 : t.iconColor) ?? "var(--sa-text-subtle, #8c8f97)", i = (t == null ? void 0 : t.textColor) ?? "var(--sa-text-subtle, #8c8f97)", l = (t == null ? void 0 : t.hoverIconColor) ?? "var(--sa-text-subtle, #8c8f97)", s = (t == null ? void 0 : t.hoverTextColor) ?? "var(--sa-text-primary, #292a2e)";
1853
+ const [r, n] = I(!1), o = (t == null ? void 0 : t.iconColor) ?? "var(--sa-text-subtle, #8c8f97)", i = (t == null ? void 0 : t.textColor) ?? "var(--sa-text-subtle, #8c8f97)", l = (t == null ? void 0 : t.hoverIconColor) ?? "var(--sa-text-subtle, #8c8f97)", s = (t == null ? void 0 : t.hoverTextColor) ?? "var(--sa-text-primary, #292a2e)";
1854
1854
  return /* @__PURE__ */ u(
1855
1855
  f,
1856
1856
  {
@@ -1896,8 +1896,8 @@ const ui = (t, r) => {
1896
1896
  header: l = !0,
1897
1897
  headerBorder: s = !1,
1898
1898
  subHeaders: c,
1899
- action: d,
1900
- titleTagProps: a,
1899
+ action: a,
1900
+ titleTagProps: d,
1901
1901
  containerProps: m,
1902
1902
  headerProps: p
1903
1903
  }) => {
@@ -1908,9 +1908,9 @@ const ui = (t, r) => {
1908
1908
  }
1909
1909
  x(-1, { replace: !0 });
1910
1910
  }, L = () => {
1911
- if (!d) return null;
1912
- if (cr(d)) return d;
1913
- const v = d.filter(
1911
+ if (!a) return null;
1912
+ if (cr(a)) return a;
1913
+ const v = a.filter(
1914
1914
  (S) => S && (S.title || S.icon)
1915
1915
  );
1916
1916
  return v.length === 0 ? null : g ? /* @__PURE__ */ e(f, { direction: "row", gap: "md", children: v.map(({ title: S, icon: $, buttonProps: O, onClick: j }, G) => /* @__PURE__ */ e(
@@ -1964,7 +1964,7 @@ const ui = (t, r) => {
1964
1964
  }
1965
1965
  ) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(Nt, { onClick: k, children: v }) });
1966
1966
  }, w = () => {
1967
- const v = !!r, S = Array.isArray(d) && d.length > 0, $ = cr(d) ? !0 : S;
1967
+ const v = !!r, S = Array.isArray(a) && a.length > 0, $ = cr(a) ? !0 : S;
1968
1968
  if (!v && !$ && !y) return null;
1969
1969
  const j = g || !g && S;
1970
1970
  return /* @__PURE__ */ u(
@@ -2009,7 +2009,7 @@ const ui = (t, r) => {
2009
2009
  }
2010
2010
  )
2011
2011
  ] }),
2012
- o && /* @__PURE__ */ e(Tn, { border: !0, size: "lg", text: o, ...a })
2012
+ o && /* @__PURE__ */ e(Tn, { border: !0, size: "lg", text: o, ...d })
2013
2013
  ] }) : r : null,
2014
2014
  L()
2015
2015
  ]
@@ -2096,9 +2096,9 @@ const ui = (t, r) => {
2096
2096
  closeButton: l = pi,
2097
2097
  width: s,
2098
2098
  minWidth: c = "357px",
2099
- maxWidth: d = "357px"
2100
- }, a) => {
2101
- const m = $r(s ?? c), p = $r(s ?? d);
2099
+ maxWidth: a = "357px"
2100
+ }, d) => {
2101
+ const m = $r(s ?? c), p = $r(s ?? a);
2102
2102
  return /* @__PURE__ */ e(
2103
2103
  ln,
2104
2104
  {
@@ -2106,7 +2106,7 @@ const ui = (t, r) => {
2106
2106
  isShow: r,
2107
2107
  position: "right",
2108
2108
  onHide: t,
2109
- ref: a,
2109
+ ref: d,
2110
2110
  style: {
2111
2111
  minWidth: m,
2112
2112
  maxWidth: p,
@@ -2198,8 +2198,8 @@ const ui = (t, r) => {
2198
2198
  footer: l,
2199
2199
  actionContainer: s,
2200
2200
  containerProps: c,
2201
- bodyProps: d,
2202
- headerProps: a = { borderBottom: !0 },
2201
+ bodyProps: a,
2202
+ headerProps: d = { borderBottom: !0 },
2203
2203
  footerProps: m = { borderTop: !0 },
2204
2204
  variantTag: p = "info"
2205
2205
  }) => {
@@ -2243,8 +2243,8 @@ const ui = (t, r) => {
2243
2243
  ...(c == null ? void 0 : c.style) ?? {}
2244
2244
  },
2245
2245
  children: [
2246
- i !== null && y ? /* @__PURE__ */ e(pn, { ...a, children: W() }) : null,
2247
- /* @__PURE__ */ e(xi, { ...d, children: t }),
2246
+ i !== null && y ? /* @__PURE__ */ e(pn, { ...d, children: W() }) : null,
2247
+ /* @__PURE__ */ e(xi, { ...a, children: t }),
2248
2248
  l ? /* @__PURE__ */ e(yn, { ...m, children: l }) : null
2249
2249
  ]
2250
2250
  }
@@ -2281,7 +2281,7 @@ const ui = (t, r) => {
2281
2281
  id: l,
2282
2282
  hasId: !!l
2283
2283
  };
2284
- }, zi = (t) => JSON.stringify(t), Ai = (t) => JSON.stringify(t), Ii = (t) => JSON.stringify(t), Ri = (t) => JSON.stringify(t), Hi = (t) => t, Oi = (t) => JSON.stringify(t), At = ({
2284
+ }, zi = (t) => JSON.stringify(t), Ai = (t) => JSON.stringify(t), Ri = (t) => JSON.stringify(t), Ii = (t) => JSON.stringify(t), Hi = (t) => t, Oi = (t) => JSON.stringify(t), At = ({
2285
2285
  value: t,
2286
2286
  name: r,
2287
2287
  type: n,
@@ -2290,40 +2290,40 @@ const ui = (t, r) => {
2290
2290
  searchQueries: l,
2291
2291
  dropdownSearchKey: s,
2292
2292
  filterKey: c = "filter",
2293
- pageKey: d = "page"
2293
+ pageKey: a = "page"
2294
2294
  }) => {
2295
2295
  if (o) {
2296
- let a;
2296
+ let d;
2297
2297
  switch (n) {
2298
2298
  case "search":
2299
- a = Hi(t);
2299
+ d = Hi(t);
2300
2300
  break;
2301
2301
  case "dropdown":
2302
2302
  case "dropdown-multiple":
2303
- a = zi(t);
2303
+ d = zi(t);
2304
2304
  break;
2305
2305
  case "radio":
2306
- a = Ai(t);
2306
+ d = Ai(t);
2307
2307
  break;
2308
2308
  case "date-range":
2309
- a = Ii(t);
2309
+ d = Ri(t);
2310
2310
  break;
2311
2311
  case "advanced-date-range":
2312
- a = Oi(t);
2312
+ d = Oi(t);
2313
2313
  break;
2314
2314
  case "date":
2315
- a = Ri(t);
2315
+ d = Ii(t);
2316
2316
  break;
2317
2317
  default:
2318
- a = t;
2318
+ d = t;
2319
2319
  break;
2320
2320
  }
2321
- if (typeof a < "u") {
2321
+ if (typeof d < "u") {
2322
2322
  const p = {
2323
2323
  ...l[c] && typeof l[c] == "string" ? JSON.parse(l[c]) : void 0,
2324
- [r]: a
2324
+ [r]: d
2325
2325
  }, g = { ...l };
2326
- s && typeof s == "string" && delete g[s], delete g[d];
2326
+ s && typeof s == "string" && delete g[s], delete g[a];
2327
2327
  const x = {
2328
2328
  ...g,
2329
2329
  [c]: JSON.stringify(p)
@@ -2393,7 +2393,7 @@ const ui = (t, r) => {
2393
2393
  pageKey: o,
2394
2394
  filters: i
2395
2395
  }) => {
2396
- const { searchParams: l, setSearchParams: s, searchQueries: c } = Oe(), [d, a] = R({}), m = () => {
2396
+ const { searchParams: l, setSearchParams: s, searchQueries: c } = Oe(), [a, d] = I({}), m = () => {
2397
2397
  l.delete(n || "filter"), s(l);
2398
2398
  }, p = (g, x) => {
2399
2399
  switch (g.type) {
@@ -2441,8 +2441,8 @@ const ui = (t, r) => {
2441
2441
  showSearchFilter: l = !0,
2442
2442
  showStatusFilter: s = !0,
2443
2443
  filterKey: c = "filter",
2444
- pageKey: d = "page",
2445
- customWidthSearch: a,
2444
+ pageKey: a = "page",
2445
+ customWidthSearch: d,
2446
2446
  handleOnReset: m,
2447
2447
  filterConfigs: p,
2448
2448
  buttonToggleProps: g,
@@ -2450,9 +2450,9 @@ const ui = (t, r) => {
2450
2450
  titleSearchLabel: W = "Work Order",
2451
2451
  withTitleLabels: y = !1
2452
2452
  }) => {
2453
- const L = (g == null ? void 0 : g.isShowLabel) ?? !0, [z, w] = R(!1), [C, H] = R(0), A = () => {
2453
+ const L = (g == null ? void 0 : g.isShowLabel) ?? !0, [z, w] = I(!1), [C, H] = I(0), A = () => {
2454
2454
  H((q) => q + 1);
2455
- }, { searchParams: v, setSearchParams: S, getQueryParam: $ } = Oe(), O = Ht(v.toString()), j = xr(t, v, c) || "", [G, ne] = R(j), ge = $(c), le = !!(ge && !(() => {
2455
+ }, { searchParams: v, setSearchParams: S, getQueryParam: $ } = Oe(), O = Ht(v.toString()), j = xr(t, v, c) || "", [G, ne] = I(j), ge = $(c), le = !!(ge && !(() => {
2456
2456
  if (ge)
2457
2457
  try {
2458
2458
  const q = JSON.parse(ge);
@@ -2475,7 +2475,7 @@ const ui = (t, r) => {
2475
2475
  searchQueries: O,
2476
2476
  setSearchParams: S,
2477
2477
  filterKey: c,
2478
- pageKey: d
2478
+ pageKey: a
2479
2479
  });
2480
2480
  }, 350);
2481
2481
  return () => {
@@ -2488,7 +2488,7 @@ const ui = (t, r) => {
2488
2488
  O,
2489
2489
  S,
2490
2490
  c,
2491
- d
2491
+ a
2492
2492
  ]), /* @__PURE__ */ u(
2493
2493
  se,
2494
2494
  {
@@ -2557,7 +2557,7 @@ const ui = (t, r) => {
2557
2557
  children: [
2558
2558
  y && /* @__PURE__ */ e(Je.SubH3, { children: "Status" }),
2559
2559
  /* @__PURE__ */ e(
2560
- Rt,
2560
+ It,
2561
2561
  {
2562
2562
  dropdownLists: [
2563
2563
  {
@@ -2611,7 +2611,7 @@ const ui = (t, r) => {
2611
2611
  direction: "column",
2612
2612
  gap: "sm",
2613
2613
  style: {
2614
- width: a && J ? a : J ? "310px" : ""
2614
+ width: d && J ? d : J ? "310px" : ""
2615
2615
  },
2616
2616
  children: [
2617
2617
  y && /* @__PURE__ */ u(Je.SubH3, { children: [
@@ -2639,7 +2639,7 @@ const ui = (t, r) => {
2639
2639
  onClose: () => w(!1),
2640
2640
  filterKey: c,
2641
2641
  filters: p,
2642
- pageKey: d
2642
+ pageKey: a
2643
2643
  }
2644
2644
  )
2645
2645
  ]
@@ -2653,10 +2653,10 @@ function vr({
2653
2653
  pageKey: o = "page",
2654
2654
  searchKey: i = "q"
2655
2655
  }) {
2656
- const { searchParams: l, setSearchParams: s, searchQueries: c } = Oe(), d = pe(
2656
+ const { searchParams: l, setSearchParams: s, searchQueries: c } = Oe(), a = pe(
2657
2657
  () => Object.fromEntries(t.map((C) => [C.key, C])),
2658
2658
  [t]
2659
- ), a = pe(() => {
2659
+ ), d = pe(() => {
2660
2660
  const C = (l.get(n) || "").split(",").map((A) => A.trim()).filter(Boolean);
2661
2661
  let H = [];
2662
2662
  try {
@@ -2665,10 +2665,10 @@ function vr({
2665
2665
  } catch {
2666
2666
  }
2667
2667
  return t.map((A) => A.key).filter((A) => {
2668
- const v = d[A];
2668
+ const v = a[A];
2669
2669
  return (v == null ? void 0 : v.locked) || C.includes(A) || H.includes(A);
2670
2670
  });
2671
- }, [l, n, r, i, t, d]), m = K(
2671
+ }, [l, n, r, i, t, a]), m = K(
2672
2672
  (C) => {
2673
2673
  try {
2674
2674
  return C[r] ? JSON.parse(C[r]) : {};
@@ -2685,31 +2685,31 @@ function vr({
2685
2685
  [c, n, s]
2686
2686
  ), g = K(
2687
2687
  (C) => {
2688
- a.includes(C) || p([...a, C]);
2688
+ d.includes(C) || p([...d, C]);
2689
2689
  },
2690
- [a, p]
2690
+ [d, p]
2691
2691
  ), x = K(
2692
2692
  (C) => {
2693
2693
  var S;
2694
- if ((S = d[C]) != null && S.locked) return;
2695
- const H = { ...c }, A = a.filter(($) => $ !== C);
2694
+ if ((S = a[C]) != null && S.locked) return;
2695
+ const H = { ...c }, A = d.filter(($) => $ !== C);
2696
2696
  A.length ? H[n] = A.join(",") : delete H[n];
2697
2697
  const v = m(H);
2698
2698
  C in v && (delete v[C], Object.keys(v).length ? H[r] = JSON.stringify(v) : delete H[r]), delete H[o], s(H);
2699
2699
  },
2700
2700
  [
2701
2701
  c,
2702
- a,
2702
+ d,
2703
2703
  n,
2704
2704
  r,
2705
2705
  o,
2706
2706
  m,
2707
2707
  s,
2708
- d
2708
+ a
2709
2709
  ]
2710
2710
  ), W = K(
2711
- (C) => a.includes(C) ? x(C) : g(C),
2712
- [a, g, x]
2711
+ (C) => d.includes(C) ? x(C) : g(C),
2712
+ [d, g, x]
2713
2713
  ), y = K(
2714
2714
  (C) => {
2715
2715
  switch (C.type) {
@@ -2767,10 +2767,10 @@ function vr({
2767
2767
  ), z = K(() => {
2768
2768
  const C = { ...c };
2769
2769
  delete C[r], delete C[n], delete C[o], s(C);
2770
- }, [c, r, n, o, s]), w = a.length > 0;
2770
+ }, [c, r, n, o, s]), w = d.length > 0;
2771
2771
  return {
2772
- activeKeys: a,
2773
- configByKey: d,
2772
+ activeKeys: d,
2773
+ configByKey: a,
2774
2774
  hasActiveFilter: w,
2775
2775
  addFilter: g,
2776
2776
  removeFilter: x,
@@ -2813,7 +2813,7 @@ function _i({
2813
2813
  const l = pe(
2814
2814
  () => ({ order: t.map((v) => v.key), hidden: [] }),
2815
2815
  [t]
2816
- ), s = r ? xt.columns(r) : void 0, c = (v, S) => Dt({ order: v.order ?? S, hidden: v.hidden ?? [] }, t), [d, a] = R(() => {
2816
+ ), s = r ? xt.columns(r) : void 0, c = (v, S) => Dt({ order: v.order ?? S, hidden: v.hidden ?? [] }, t), [a, d] = I(() => {
2817
2817
  if (i && (i.order || i.hidden))
2818
2818
  return c(i, t.map((v) => v.key));
2819
2819
  if (s) {
@@ -2822,55 +2822,55 @@ function _i({
2822
2822
  }
2823
2823
  return l;
2824
2824
  }), m = t.map((v) => v.key).join("|");
2825
- U(() => a((v) => Dt(v, t)), [m]);
2826
- const p = ae(d);
2827
- p.current = d;
2825
+ U(() => d((v) => Dt(v, t)), [m]);
2826
+ const p = ae(a);
2827
+ p.current = a;
2828
2828
  const g = i ? `${(i.order ?? []).join("|")}~${(i.hidden ?? []).join("|")}` : null, x = ae(g);
2829
2829
  U(() => {
2830
2830
  if (g == null || x.current === g) return;
2831
2831
  x.current = g;
2832
2832
  const v = p.current, S = c(i, v.order);
2833
- S.order.join("|") === v.order.join("|") && S.hidden.join("|") === v.hidden.join("|") || (a(S), s && n.set(s, S));
2833
+ S.order.join("|") === v.order.join("|") && S.hidden.join("|") === v.hidden.join("|") || (d(S), s && n.set(s, S));
2834
2834
  }, [g, m]);
2835
2835
  const W = ae(!1);
2836
2836
  U(() => {
2837
- W.current || (W.current = !0, o == null || o(d));
2837
+ W.current || (W.current = !0, o == null || o(a));
2838
2838
  }, []);
2839
2839
  const y = K(
2840
2840
  (v) => {
2841
- a(v), s && n.set(s, v), o == null || o(v);
2841
+ d(v), s && n.set(s, v), o == null || o(v);
2842
2842
  },
2843
2843
  [s, n, o]
2844
2844
  ), k = pe(() => {
2845
2845
  const v = new Map(t.map((S) => [S.key, S]));
2846
- return d.order.filter((S) => v.has(S)).map((S) => ({ ...v.get(S), visible: !d.hidden.includes(S) }));
2847
- }, [d, t]), L = K(
2846
+ return a.order.filter((S) => v.has(S)).map((S) => ({ ...v.get(S), visible: !a.hidden.includes(S) }));
2847
+ }, [a, t]), L = K(
2848
2848
  (v) => {
2849
- const S = d.hidden.includes(v) ? d.hidden.filter(($) => $ !== v) : [...d.hidden, v];
2850
- y({ ...d, hidden: S });
2849
+ const S = a.hidden.includes(v) ? a.hidden.filter(($) => $ !== v) : [...a.hidden, v];
2850
+ y({ ...a, hidden: S });
2851
2851
  },
2852
- [d, y]
2852
+ [a, y]
2853
2853
  ), z = K(
2854
2854
  (v, S) => {
2855
2855
  if (v === S) return;
2856
- const $ = [...d.order], [O] = $.splice(v, 1);
2857
- $.splice(S, 0, O), y({ ...d, order: $ });
2856
+ const $ = [...a.order], [O] = $.splice(v, 1);
2857
+ $.splice(S, 0, O), y({ ...a, order: $ });
2858
2858
  },
2859
- [d, y]
2859
+ [a, y]
2860
2860
  ), w = K(
2861
2861
  (v) => {
2862
2862
  y({
2863
- ...d,
2863
+ ...a,
2864
2864
  hidden: v ? t.filter((S) => !S.locked).map((S) => S.key) : []
2865
2865
  });
2866
2866
  },
2867
- [d, t, y]
2867
+ [a, t, y]
2868
2868
  ), C = K(() => y(l), [y, l]), H = K(
2869
2869
  (v) => y(Dt(v, t)),
2870
2870
  [y, t]
2871
- ), A = d.hidden.length === 0;
2871
+ ), A = a.hidden.length === 0;
2872
2872
  return {
2873
- state: d,
2873
+ state: a,
2874
2874
  orderedColumns: k,
2875
2875
  allVisible: A,
2876
2876
  toggleVisibility: L,
@@ -2888,13 +2888,13 @@ function Pi({
2888
2888
  getColumns: i,
2889
2889
  applyColumns: l
2890
2890
  }) {
2891
- const { searchParams: s, setSearchParams: c } = Oe(), d = t ? xt.savedViews(t) : void 0, [a, m] = R(
2892
- () => d ? r.get(d) || [] : []
2891
+ const { searchParams: s, setSearchParams: c } = Oe(), a = t ? xt.savedViews(t) : void 0, [d, m] = I(
2892
+ () => a ? r.get(a) || [] : []
2893
2893
  ), p = K(
2894
2894
  (y) => {
2895
- m(y), d && r.set(d, y);
2895
+ m(y), a && r.set(a, y);
2896
2896
  },
2897
- [d]
2897
+ [a]
2898
2898
  // storage identity is stable (module singleton / caller-provided)
2899
2899
  ), g = K(
2900
2900
  (y) => {
@@ -2912,12 +2912,12 @@ function Pi({
2912
2912
  columns: i == null ? void 0 : i(),
2913
2913
  createdAt: Date.now()
2914
2914
  };
2915
- p([...a, z]);
2915
+ p([...d, z]);
2916
2916
  },
2917
- [n, s, i, p, a]
2917
+ [n, s, i, p, d]
2918
2918
  ), x = K(
2919
- (y) => p(a.filter((k) => k.id !== y)),
2920
- [p, a]
2919
+ (y) => p(d.filter((k) => k.id !== y)),
2920
+ [p, d]
2921
2921
  ), W = K(
2922
2922
  (y) => {
2923
2923
  const k = Object.fromEntries(s.entries());
@@ -2926,8 +2926,8 @@ function Pi({
2926
2926
  [s, n, o, c, l]
2927
2927
  );
2928
2928
  return {
2929
- enabled: !!d,
2930
- views: a,
2929
+ enabled: !!a,
2930
+ views: d,
2931
2931
  saveView: g,
2932
2932
  deleteView: x,
2933
2933
  applyView: W
@@ -2939,32 +2939,36 @@ function Zi({
2939
2939
  snapshotKeys: n,
2940
2940
  enabled: o = !0
2941
2941
  }) {
2942
- const { searchParams: i } = Oe(), l = t && o ? xt.lastState(t) : void 0, s = ae(l);
2942
+ const { searchParams: i } = Oe(), l = t && o ? xt.lastState(t) : void 0, s = ae(l), c = ae(!1);
2943
2943
  U(() => {
2944
2944
  if (!l) {
2945
2945
  s.current = l;
2946
2946
  return;
2947
2947
  }
2948
2948
  if (s.current !== l) {
2949
- s.current = l;
2949
+ s.current = l, c.current = !1;
2950
2950
  return;
2951
2951
  }
2952
- const a = {};
2953
- n.forEach((m) => {
2954
- const p = i.get(m);
2955
- p != null && (a[m] = p);
2956
- }), Object.keys(a).length !== 0 && r.set(l, a);
2952
+ const m = {};
2953
+ if (n.forEach((p) => {
2954
+ const g = i.get(p);
2955
+ g != null && (m[p] = g);
2956
+ }), Object.keys(m).length === 0) {
2957
+ c.current && r.remove(l);
2958
+ return;
2959
+ }
2960
+ c.current = !0, r.set(l, m);
2957
2961
  }, [i, l, n, r]);
2958
- const c = K(() => {
2962
+ const a = K(() => {
2959
2963
  if (!l) return null;
2960
- const a = r.get(l);
2961
- return a && Object.keys(a).length > 0 ? a : null;
2964
+ const m = r.get(l);
2965
+ return m && Object.keys(m).length > 0 ? m : null;
2962
2966
  }, [l, r]), d = K(() => {
2963
2967
  l && r.remove(l);
2964
2968
  }, [l, r]);
2965
2969
  return {
2966
2970
  enabled: !!l,
2967
- read: c,
2971
+ read: a,
2968
2972
  clear: d
2969
2973
  };
2970
2974
  }
@@ -2975,14 +2979,14 @@ function Gi({
2975
2979
  pageSizeOptions: o,
2976
2980
  enabled: i = !0
2977
2981
  }) {
2978
- const { searchParams: l } = Oe(), s = t && i ? xt.perPage(t) : void 0, c = l.toString(), d = ae(s);
2982
+ const { searchParams: l } = Oe(), s = t && i ? xt.perPage(t) : void 0, c = l.toString(), a = ae(s);
2979
2983
  U(() => {
2980
2984
  if (!s) {
2981
- d.current = s;
2985
+ a.current = s;
2982
2986
  return;
2983
2987
  }
2984
- if (d.current !== s) {
2985
- d.current = s;
2988
+ if (a.current !== s) {
2989
+ a.current = s;
2986
2990
  return;
2987
2991
  }
2988
2992
  const p = l.get(n);
@@ -2990,7 +2994,7 @@ function Gi({
2990
2994
  const g = Number(p);
2991
2995
  !Number.isFinite(g) || g <= 0 || r.set(s, g);
2992
2996
  }, [c, s, n, r]);
2993
- const a = K(() => {
2997
+ const d = K(() => {
2994
2998
  if (!s) return null;
2995
2999
  const p = r.get(s);
2996
3000
  if (p == null) return null;
@@ -3001,7 +3005,7 @@ function Gi({
3001
3005
  }, [s, r]);
3002
3006
  return {
3003
3007
  enabled: !!s,
3004
- read: a,
3008
+ read: d,
3005
3009
  clear: m
3006
3010
  };
3007
3011
  }
@@ -3022,20 +3026,20 @@ function Ui({
3022
3026
  readSnapshot: o,
3023
3027
  readPerPage: i
3024
3028
  }) {
3025
- const { searchParams: l, setSearchParams: s, location: c } = Oe(), d = ae(null);
3029
+ const { searchParams: l, setSearchParams: s, location: c } = Oe(), a = ae(null);
3026
3030
  U(() => {
3027
- if (!t || d.current === c.pathname) return;
3028
- d.current = c.pathname;
3029
- const a = {};
3031
+ if (!t || a.current === c.pathname) return;
3032
+ a.current = c.pathname;
3033
+ const d = {};
3030
3034
  if (!l.has(n)) {
3031
3035
  const m = i();
3032
- m && (a[n] = m);
3036
+ m && (d[n] = m);
3033
3037
  }
3034
3038
  if (!r.some((m) => l.has(m))) {
3035
3039
  const m = o();
3036
- m && Object.assign(a, m);
3040
+ m && Object.assign(d, m);
3037
3041
  }
3038
- Object.keys(a).length !== 0 && qi(a, s);
3042
+ Object.keys(d).length !== 0 && qi(d, s);
3039
3043
  }, [c.pathname, t]);
3040
3044
  }
3041
3045
  const Ji = ({
@@ -3149,7 +3153,7 @@ const Ji = ({
3149
3153
  day: "2-digit",
3150
3154
  month: "short",
3151
3155
  year: "numeric"
3152
- }), It = {
3156
+ }), Rt = {
3153
3157
  is: "Is",
3154
3158
  "is-before": "Is before",
3155
3159
  "is-after": "Is after",
@@ -3244,7 +3248,7 @@ const Ji = ({
3244
3248
  clearable: !0,
3245
3249
  filter: t.mode,
3246
3250
  value: r,
3247
- onChange: (d) => d == null ? o() : n(d),
3251
+ onChange: (a) => a == null ? o() : n(a),
3248
3252
  withPadding: !1
3249
3253
  }
3250
3254
  )
@@ -3258,7 +3262,7 @@ const Ji = ({
3258
3262
  case "is-after":
3259
3263
  case "is-on-or-before":
3260
3264
  case "is-on-or-after":
3261
- return t.date ? `${It[t.op]} ${Mt(new Date(t.date))}` : null;
3265
+ return t.date ? `${Rt[t.op]} ${Mt(new Date(t.date))}` : null;
3262
3266
  case "is-between":
3263
3267
  return t.from && t.to ? `${Mt(new Date(t.from))} - ${Mt(new Date(t.to))}` : null;
3264
3268
  case "is-relative-to-today": {
@@ -3270,7 +3274,7 @@ const Ji = ({
3270
3274
  }
3271
3275
  case "is-empty":
3272
3276
  case "is-not-empty":
3273
- return It[t.op];
3277
+ return Rt[t.op];
3274
3278
  default:
3275
3279
  return null;
3276
3280
  }
@@ -3281,14 +3285,14 @@ const Ji = ({
3281
3285
  onClear: o,
3282
3286
  onRemove: i
3283
3287
  }) => {
3284
- const l = (r == null ? void 0 : r.op) ?? "is", s = r ? ro(r) : null, c = !!s, d = c ? /* @__PURE__ */ u(oe, { children: [
3288
+ const l = (r == null ? void 0 : r.op) ?? "is", s = r ? ro(r) : null, c = !!s, a = c ? /* @__PURE__ */ u(oe, { children: [
3285
3289
  /* @__PURE__ */ u("span", { style: { fontWeight: 500 }, children: [
3286
3290
  t.label,
3287
3291
  ":"
3288
3292
  ] }),
3289
3293
  " ",
3290
3294
  /* @__PURE__ */ e("span", { style: { fontWeight: 400 }, children: vn(s) })
3291
- ] }) : t.label, a = (m) => {
3295
+ ] }) : t.label, d = (m) => {
3292
3296
  if (m !== l) {
3293
3297
  if (m === "is-empty" || m === "is-not-empty") {
3294
3298
  n({ op: m });
@@ -3321,7 +3325,7 @@ const Ji = ({
3321
3325
  size: "sm",
3322
3326
  iconLeft: c ? /* @__PURE__ */ e(M, { name: "Calendar", size: "sm" }) : void 0,
3323
3327
  iconRight: /* @__PURE__ */ e(M, { name: "ChevronSmallDown" }),
3324
- children: d
3328
+ children: a
3325
3329
  }
3326
3330
  ) }),
3327
3331
  /* @__PURE__ */ u(ze, { children: [
@@ -3349,7 +3353,7 @@ const Ji = ({
3349
3353
  style: { minWidth: 0 },
3350
3354
  children: [
3351
3355
  /* @__PURE__ */ e(D, { fontSize: "sm", fontWeight: "medium", color: "subtlest", children: t.label }),
3352
- /* @__PURE__ */ e(io, { op: l, onChange: a })
3356
+ /* @__PURE__ */ e(io, { op: l, onChange: d })
3353
3357
  ]
3354
3358
  }
3355
3359
  ),
@@ -3371,7 +3375,7 @@ const Ji = ({
3371
3375
  tone: "neutral",
3372
3376
  size: "xs",
3373
3377
  iconRight: /* @__PURE__ */ e(M, { name: "ChevronSmallDown" }),
3374
- children: It[t]
3378
+ children: Rt[t]
3375
3379
  }
3376
3380
  ) }),
3377
3381
  /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(Ae, { style: { width: 200 }, children: Yi.map((n) => /* @__PURE__ */ e(
@@ -3380,7 +3384,7 @@ const Ji = ({
3380
3384
  selected: t === n,
3381
3385
  onClick: () => r(n),
3382
3386
  endIcon: t === n ? /* @__PURE__ */ e(M, { name: "Check" }) : void 0,
3383
- children: It[n]
3387
+ children: Rt[n]
3384
3388
  },
3385
3389
  n
3386
3390
  )) }) })
@@ -3489,10 +3493,10 @@ const Ji = ({
3489
3493
  clearable: !1,
3490
3494
  value: o,
3491
3495
  onChange: (c) => {
3492
- const d = Number(c.target.value);
3496
+ const a = Number(c.target.value);
3493
3497
  r({
3494
3498
  direction: n,
3495
- count: Number.isFinite(d) && d > 0 ? d : 1,
3499
+ count: Number.isFinite(a) && a > 0 ? a : 1,
3496
3500
  period: i
3497
3501
  });
3498
3502
  },
@@ -3546,13 +3550,13 @@ const Ji = ({
3546
3550
  onClear: o,
3547
3551
  onRemove: i
3548
3552
  }) => {
3549
- const l = t.type === "dropdown-multiple", s = r.length, [c, d] = R(""), a = t.options, m = typeof t.onSearch == "function", p = (() => {
3550
- if (m) return a;
3553
+ const l = t.type === "dropdown-multiple", s = r.length, [c, a] = I(""), d = t.options, m = typeof t.onSearch == "function", p = (() => {
3554
+ if (m) return d;
3551
3555
  const k = c.trim().toLowerCase();
3552
- return k ? a.filter((L) => L.label.toLowerCase().includes(k)) : a;
3556
+ return k ? d.filter((L) => L.label.toLowerCase().includes(k)) : d;
3553
3557
  })(), g = (k) => r.some((L) => L.value === k.value), x = (k) => {
3554
3558
  if (!l) {
3555
- n([{ label: k.label, value: k.value }]), d("");
3559
+ n([{ label: k.label, value: k.value }]), a("");
3556
3560
  return;
3557
3561
  }
3558
3562
  n(
@@ -3560,7 +3564,7 @@ const Ji = ({
3560
3564
  );
3561
3565
  }, W = (k) => {
3562
3566
  var L;
3563
- d(k), (L = t.onSearch) == null || L.call(t, k);
3567
+ a(k), (L = t.onSearch) == null || L.call(t, k);
3564
3568
  }, y = s === 0 ? t.label : /* @__PURE__ */ u(oe, { children: [
3565
3569
  /* @__PURE__ */ u("span", { style: { fontWeight: 500 }, children: [
3566
3570
  t.label,
@@ -3601,7 +3605,7 @@ const Ji = ({
3601
3605
  ),
3602
3606
  children: /* @__PURE__ */ u(f, { direction: "column", gap: "sm", children: [
3603
3607
  /* @__PURE__ */ e(
3604
- Rt,
3608
+ It,
3605
3609
  {
3606
3610
  size: "sm",
3607
3611
  triggerInput: !0,
@@ -3659,7 +3663,7 @@ const Ji = ({
3659
3663
  onClear: o,
3660
3664
  onRemove: i
3661
3665
  }) => {
3662
- const l = new Set(r.map((g) => g.value)), s = r.length, c = t.options.length > 0 && t.options.every((g) => l.has(g.value)), d = s > 0 && !c, a = (g) => {
3666
+ const l = new Set(r.map((g) => g.value)), s = r.length, c = t.options.length > 0 && t.options.every((g) => l.has(g.value)), a = s > 0 && !c, d = (g) => {
3663
3667
  n(
3664
3668
  l.has(g.value) ? r.filter((x) => x.value !== g.value) : [...r, { label: g.label, value: g.value }]
3665
3669
  );
@@ -3715,8 +3719,8 @@ const Ji = ({
3715
3719
  startIcon: /* @__PURE__ */ e(
3716
3720
  Gr,
3717
3721
  {
3718
- checked: c || d,
3719
- indeterminate: d
3722
+ checked: c || a,
3723
+ indeterminate: a
3720
3724
  }
3721
3725
  ),
3722
3726
  children: "Select All"
@@ -3727,7 +3731,7 @@ const Ji = ({
3727
3731
  {
3728
3732
  closeOnSelect: !1,
3729
3733
  selected: l.has(g.value),
3730
- onClick: () => a(g),
3734
+ onClick: () => d(g),
3731
3735
  startIcon: /* @__PURE__ */ e(Gr, { checked: l.has(g.value) }),
3732
3736
  children: g.label
3733
3737
  },
@@ -3747,35 +3751,35 @@ const Ji = ({
3747
3751
  }) => /* @__PURE__ */ e(oe, { children: t.map((s) => {
3748
3752
  const c = r[s];
3749
3753
  if (!c) return null;
3750
- const d = n(c), a = c.locked ? void 0 : () => l(s);
3754
+ const a = n(c), d = c.locked ? void 0 : () => l(s);
3751
3755
  return c.type === "date" || c.type === "date-compact" ? /* @__PURE__ */ e(
3752
3756
  eo,
3753
3757
  {
3754
3758
  field: c,
3755
- value: d,
3759
+ value: a,
3756
3760
  onChange: (m) => o(c, m),
3757
3761
  onClear: () => i(s),
3758
- onRemove: a
3762
+ onRemove: d
3759
3763
  },
3760
3764
  s
3761
3765
  ) : c.type === "checkbox-multiple" ? /* @__PURE__ */ e(
3762
3766
  uo,
3763
3767
  {
3764
3768
  field: c,
3765
- value: d || [],
3769
+ value: a || [],
3766
3770
  onChange: (m) => o(c, m),
3767
3771
  onClear: () => i(s),
3768
- onRemove: a
3772
+ onRemove: d
3769
3773
  },
3770
3774
  s
3771
3775
  ) : /* @__PURE__ */ e(
3772
3776
  so,
3773
3777
  {
3774
3778
  field: c,
3775
- value: d || [],
3779
+ value: a || [],
3776
3780
  onChange: (m) => o(c, m),
3777
3781
  onClear: () => i(s),
3778
- onRemove: a
3782
+ onRemove: d
3779
3783
  },
3780
3784
  s
3781
3785
  );
@@ -3790,11 +3794,11 @@ const Ji = ({
3790
3794
  showPagination: c = !0
3791
3795
  }) => {
3792
3796
  var L;
3793
- const { searchQueries: d, setSearchParams: a, searchParams: m } = Oe(), p = m.get(n), g = p ? Number(p) : i, x = (z) => {
3794
- a({ ...d, [r]: String(z) });
3797
+ const { searchQueries: a, setSearchParams: d, searchParams: m } = Oe(), p = m.get(n), g = p ? Number(p) : i, x = (z) => {
3798
+ d({ ...a, [r]: String(z) });
3795
3799
  }, W = (z) => {
3796
- a({
3797
- ...d,
3800
+ d({
3801
+ ...a,
3798
3802
  [n]: z,
3799
3803
  [r]: "1"
3800
3804
  // reset to first page when page size changes
@@ -3870,17 +3874,17 @@ const mo = 240, wn = ({
3870
3874
  shortcut: i = "/",
3871
3875
  collapsible: l = !0
3872
3876
  }) => {
3873
- const { searchParams: s, setSearchParams: c, searchQueries: d } = Oe(), a = xr(t, s, r) || "", [m, p] = R(!l || !!a), [g, x] = R(l && !a), [W, y] = R(a), k = jn(W, 350), L = ae(null);
3877
+ const { searchParams: s, setSearchParams: c, searchQueries: a } = Oe(), d = xr(t, s, r) || "", [m, p] = I(!l || !!d), [g, x] = I(l && !d), [W, y] = I(d), k = jn(W, 350), L = ae(null);
3874
3878
  U(() => {
3875
- y(a), a && p(!0);
3876
- }, [a]), U(() => {
3879
+ y(d), d && p(!0);
3880
+ }, [d]), U(() => {
3877
3881
  m && x(!1);
3878
3882
  }, [m]), U(() => {
3879
- k !== a && At({
3883
+ k !== d && At({
3880
3884
  value: k,
3881
3885
  name: t,
3882
3886
  type: "search",
3883
- searchQueries: d,
3887
+ searchQueries: a,
3884
3888
  setSearchParams: c,
3885
3889
  filterKey: r,
3886
3890
  pageKey: n
@@ -3975,8 +3979,8 @@ const mo = 240, wn = ({
3975
3979
  onReorder: o,
3976
3980
  onSetAllHidden: i
3977
3981
  }) => {
3978
- const [l, s] = R(null), [c, d] = R(null), a = () => {
3979
- l !== null && c !== null && l !== c && o(l, c), s(null), d(null);
3982
+ const [l, s] = I(null), [c, a] = I(null), d = () => {
3983
+ l !== null && c !== null && l !== c && o(l, c), s(null), a(null);
3980
3984
  }, m = (p, g) => {
3981
3985
  const x = p + g;
3982
3986
  x < 0 || x >= t.length || o(p, x);
@@ -4038,10 +4042,10 @@ const mo = 240, wn = ({
4038
4042
  draggable: x,
4039
4043
  onDragStart: () => x && s(g),
4040
4044
  onDragOver: (y) => {
4041
- y.preventDefault(), d(g);
4045
+ y.preventDefault(), a(g);
4042
4046
  },
4043
- onDrop: a,
4044
- onDragEnd: a,
4047
+ onDrop: d,
4048
+ onDragEnd: d,
4045
4049
  style: {
4046
4050
  minHeight: 32,
4047
4051
  boxShadow: c === g && l !== null && l !== g ? "inset 0 2px 0 0 var(--sa-background-brand, #04254f)" : void 0
@@ -4106,7 +4110,7 @@ const mo = 240, wn = ({
4106
4110
  onDelete: n,
4107
4111
  onSave: o
4108
4112
  }) => {
4109
- const [i, l] = R(""), s = () => {
4113
+ const [i, l] = I(""), s = () => {
4110
4114
  const c = i.trim();
4111
4115
  c && (o(c), l(""));
4112
4116
  };
@@ -4148,8 +4152,8 @@ const mo = 240, wn = ({
4148
4152
  size: "sm",
4149
4153
  iconLeft: /* @__PURE__ */ e(M, { name: "Trash2" }),
4150
4154
  "aria-label": `Delete ${c.name}`,
4151
- onClick: (d) => {
4152
- d.stopPropagation(), n(c.id);
4155
+ onClick: (a) => {
4156
+ a.stopPropagation(), n(c.id);
4153
4157
  }
4154
4158
  }
4155
4159
  ),
@@ -4204,8 +4208,8 @@ const mo = 240, wn = ({
4204
4208
  hasActiveFilter: l,
4205
4209
  onToggle: s,
4206
4210
  onReset: c,
4207
- getValue: d,
4208
- setValue: a,
4211
+ getValue: a,
4212
+ setValue: d,
4209
4213
  clearValue: m,
4210
4214
  removeFilter: p
4211
4215
  }) => {
@@ -4276,8 +4280,8 @@ const mo = 240, wn = ({
4276
4280
  {
4277
4281
  activeKeys: o,
4278
4282
  configByKey: i,
4279
- getValue: d,
4280
- setValue: a,
4283
+ getValue: a,
4284
+ setValue: d,
4281
4285
  clearValue: m,
4282
4286
  removeFilter: p
4283
4287
  }
@@ -4393,7 +4397,7 @@ const mo = 240, wn = ({
4393
4397
  defaultPerPage: o = 10,
4394
4398
  showPageSize: i
4395
4399
  }) => {
4396
- const { searchQueries: l, setSearchParams: s, searchParams: c } = Oe(), d = c.get(t), a = d ? Number(d) : o, m = (p) => {
4400
+ const { searchQueries: l, setSearchParams: s, searchParams: c } = Oe(), a = c.get(t), d = a ? Number(a) : o, m = (p) => {
4397
4401
  s({
4398
4402
  ...l,
4399
4403
  [t]: p,
@@ -4416,8 +4420,8 @@ const mo = 240, wn = ({
4416
4420
  n.map((p) => /* @__PURE__ */ e(
4417
4421
  $e,
4418
4422
  {
4419
- selected: p === a,
4420
- endIcon: p === a ? /* @__PURE__ */ e(M, { name: "Check" }) : void 0,
4423
+ selected: p === d,
4424
+ endIcon: p === d ? /* @__PURE__ */ e(M, { name: "Check" }) : void 0,
4421
4425
  onClick: () => m(String(p)),
4422
4426
  children: po(p)
4423
4427
  },
@@ -4435,8 +4439,8 @@ const mo = 240, wn = ({
4435
4439
  hasActiveFilter: l,
4436
4440
  toggleFilter: s,
4437
4441
  removeFilter: c,
4438
- getValue: d,
4439
- setValue: a,
4442
+ getValue: a,
4443
+ setValue: d,
4440
4444
  clearValue: m,
4441
4445
  onReset: p,
4442
4446
  searchable: g,
@@ -4464,8 +4468,8 @@ const mo = 240, wn = ({
4464
4468
  onApplyView: q,
4465
4469
  onDeleteView: he,
4466
4470
  onSaveView: te
4467
- } = t, [ue, Fe] = R(!1), { searchQueries: Ge, setSearchParams: ye } = Oe(), Ee = (w == null ? void 0 : w.rangeStart) ?? (((w == null ? void 0 : w.currentPage) || 0) > 1 ? (((w == null ? void 0 : w.currentPage) || 0) - 1) * ((w == null ? void 0 : w.perPage) || 0) + 1 : 1), Ve = (w == null ? void 0 : w.rangeEnd) ?? ((w == null ? void 0 : w.totalCurrentPage) !== (w == null ? void 0 : w.perPage) ? w == null ? void 0 : w.totalData : ((w == null ? void 0 : w.currentPage) || 1) * ((w == null ? void 0 : w.totalCurrentPage) || 0)), be = (Ie) => {
4468
- ye({ ...Ge, [y]: String(Ie) });
4471
+ } = t, [ue, Fe] = I(!1), { searchQueries: Ge, setSearchParams: ye } = Oe(), Ee = (w == null ? void 0 : w.rangeStart) ?? (((w == null ? void 0 : w.currentPage) || 0) > 1 ? (((w == null ? void 0 : w.currentPage) || 0) - 1) * ((w == null ? void 0 : w.perPage) || 0) + 1 : 1), Ve = (w == null ? void 0 : w.rangeEnd) ?? ((w == null ? void 0 : w.totalCurrentPage) !== (w == null ? void 0 : w.perPage) ? w == null ? void 0 : w.totalData : ((w == null ? void 0 : w.currentPage) || 1) * ((w == null ? void 0 : w.totalCurrentPage) || 0)), be = (Re) => {
4472
+ ye({ ...Ge, [y]: String(Re) });
4469
4473
  }, je = S || v && !!(w != null && w.totalPage), Ye = () => {
4470
4474
  p(), Fe(!1);
4471
4475
  };
@@ -4596,8 +4600,8 @@ const mo = 240, wn = ({
4596
4600
  hasActiveFilter: l,
4597
4601
  onToggle: s,
4598
4602
  onReset: Ye,
4599
- getValue: d,
4600
- setValue: a,
4603
+ getValue: a,
4604
+ setValue: d,
4601
4605
  clearValue: m,
4602
4606
  removeFilter: c
4603
4607
  }
@@ -4614,8 +4618,8 @@ const mo = 240, wn = ({
4614
4618
  perPageKey: l = "perPage",
4615
4619
  pageSizeOptions: s = [25, 50, 100],
4616
4620
  defaultPerPage: c,
4617
- showPagination: d = !0,
4618
- showResultCount: a = !0,
4621
+ showPagination: a = !0,
4622
+ showResultCount: d = !0,
4619
4623
  showPageSize: m = !0,
4620
4624
  searchable: p = !1,
4621
4625
  searchKey: g = "q",
@@ -4776,8 +4780,8 @@ const mo = 240, wn = ({
4776
4780
  perPageKey: l,
4777
4781
  pageSizeOptions: s,
4778
4782
  defaultPerPage: ye,
4779
- showPagination: d,
4780
- showResultCount: a,
4783
+ showPagination: a,
4784
+ showResultCount: d,
4781
4785
  showPageSize: m
4782
4786
  }
4783
4787
  ),
@@ -4829,8 +4833,8 @@ const mo = 240, wn = ({
4829
4833
  perPageKey: l,
4830
4834
  pageSizeOptions: s,
4831
4835
  defaultPerPage: ye,
4832
- showPagination: d,
4833
- showResultCount: a,
4836
+ showPagination: a,
4837
+ showResultCount: d,
4834
4838
  showPageSize: m,
4835
4839
  hasColumns: z.length > 0,
4836
4840
  orderedColumns: te.orderedColumns,
@@ -4881,8 +4885,8 @@ const mo = 240, wn = ({
4881
4885
  perPageKey: l = "perPage",
4882
4886
  searchKey: s = "q",
4883
4887
  defaultPage: c = 1,
4884
- defaultPerPage: d = 10,
4885
- paramKeys: a,
4888
+ defaultPerPage: a = 10,
4889
+ paramKeys: d,
4886
4890
  serialize: m
4887
4891
  } = t, { activeKeys: p, configByKey: g, hasActiveFilter: x, getValue: W } = vr({
4888
4892
  configs: r,
@@ -4892,10 +4896,10 @@ const mo = 240, wn = ({
4892
4896
  searchKey: s
4893
4897
  }), { searchParams: y } = Oe(), k = y.toString();
4894
4898
  return pe(() => {
4895
- const z = {}, w = {}, C = Ur(y.get(i), c), H = Ur(y.get(l), d);
4896
- z[(a == null ? void 0 : a.page) ?? "page"] = C, z[(a == null ? void 0 : a.perPage) ?? "perPage"] = H;
4899
+ const z = {}, w = {}, C = Ur(y.get(i), c), H = Ur(y.get(l), a);
4900
+ z[(d == null ? void 0 : d.page) ?? "page"] = C, z[(d == null ? void 0 : d.perPage) ?? "perPage"] = H;
4897
4901
  const A = xr(s, y, n) || "";
4898
- A && (z[(a == null ? void 0 : a.search) ?? "search"] = A);
4902
+ A && (z[(d == null ? void 0 : d.search) ?? "search"] = A);
4899
4903
  let v = !1;
4900
4904
  for (const S of p) {
4901
4905
  const $ = g[S];
@@ -4905,7 +4909,7 @@ const mo = 240, wn = ({
4905
4909
  const j = m == null ? void 0 : m[S], G = j ? j(O) : Co($, O);
4906
4910
  if (G == null || Array.isArray(G) && G.length === 0)
4907
4911
  continue;
4908
- const ne = (a == null ? void 0 : a[S]) ?? S;
4912
+ const ne = (d == null ? void 0 : d[S]) ?? S;
4909
4913
  z[ne] = G, v = !0;
4910
4914
  }
4911
4915
  return {
@@ -4922,8 +4926,8 @@ const mo = 240, wn = ({
4922
4926
  l,
4923
4927
  s,
4924
4928
  c,
4925
- d,
4926
4929
  a,
4930
+ d,
4927
4931
  m,
4928
4932
  g
4929
4933
  ]);
@@ -4939,7 +4943,7 @@ const mo = 240, wn = ({
4939
4943
  pageKey: o,
4940
4944
  searchKey: i
4941
4945
  }) => {
4942
- const { configByKey: l, getValue: s, setValue: c, removeFilter: d, clearAll: a, hasActiveFilter: m } = vr({
4946
+ const { configByKey: l, getValue: s, setValue: c, removeFilter: a, clearAll: d, hasActiveFilter: m } = vr({
4943
4947
  configs: t,
4944
4948
  filterKey: r,
4945
4949
  activeFilterKey: n,
@@ -4963,7 +4967,7 @@ const mo = 240, wn = ({
4963
4967
  if (!w || !wo.includes(w.type)) return;
4964
4968
  const C = Array.isArray(z) ? z : [z];
4965
4969
  if (C.length === 0) {
4966
- d(L);
4970
+ a(L);
4967
4971
  return;
4968
4972
  }
4969
4973
  c(
@@ -4971,7 +4975,7 @@ const mo = 240, wn = ({
4971
4975
  C.map((H) => ({ label: p(w, H), value: H }))
4972
4976
  );
4973
4977
  },
4974
- [l, c, d]
4978
+ [l, c, a]
4975
4979
  ), W = K(
4976
4980
  (L, z) => {
4977
4981
  const w = g(L);
@@ -4981,8 +4985,8 @@ const mo = 240, wn = ({
4981
4985
  ), y = K(
4982
4986
  (L, z) => g(L).includes(z),
4983
4987
  [g]
4984
- ), k = K((L) => d(L), [d]);
4985
- return { set: x, toggle: W, clear: k, clearAll: a, isActive: y, values: g, hasActiveFilter: m };
4988
+ ), k = K((L) => a(L), [a]);
4989
+ return { set: x, toggle: W, clear: k, clearAll: d, isActive: y, values: g, hasActiveFilter: m };
4986
4990
  }, vc = (t, r) => {
4987
4991
  if (!t) return {};
4988
4992
  const { fromKey: n, toKey: o, opKey: i } = r, l = {};
@@ -5007,7 +5011,7 @@ const mo = 240, wn = ({
5007
5011
  return l;
5008
5012
  }
5009
5013
  }, Do = ({ children: t, borderRadius: r, height: n }) => {
5010
- const o = ae(null), [i, l] = R("100vh");
5014
+ const o = ae(null), [i, l] = I("100vh");
5011
5015
  return U(() => {
5012
5016
  if (n) return;
5013
5017
  const s = () => {
@@ -5080,14 +5084,14 @@ const mo = 240, wn = ({
5080
5084
  textWrap: "nowrap"
5081
5085
  },
5082
5086
  children: t.map(
5083
- ({ title: a, icon: m, buttonProps: p, onClick: g }, x) => !a && !m ? null : /* @__PURE__ */ e(
5087
+ ({ title: d, icon: m, buttonProps: p, onClick: g }, x) => !d && !m ? null : /* @__PURE__ */ e(
5084
5088
  T,
5085
5089
  {
5086
5090
  fullWidth: !s,
5087
5091
  iconLeft: m ? /* @__PURE__ */ e(M, { name: m }) : void 0,
5088
5092
  onClick: g,
5089
5093
  ...p,
5090
- children: a
5094
+ children: d
5091
5095
  },
5092
5096
  `action-${x}`
5093
5097
  )
@@ -5137,7 +5141,7 @@ const mo = 240, wn = ({
5137
5141
  showPagination: i = !0,
5138
5142
  totalData: l
5139
5143
  }) => {
5140
- const { searchQueries: s, setSearchParams: c, searchParams: d } = Oe(), a = d.get(n), m = (W) => {
5144
+ const { searchQueries: s, setSearchParams: c, searchParams: a } = Oe(), d = a.get(n), m = (W) => {
5141
5145
  c({ ...s, [r]: String(W) });
5142
5146
  }, p = (W) => {
5143
5147
  c({
@@ -5166,7 +5170,7 @@ const mo = 240, wn = ({
5166
5170
  /* @__PURE__ */ u(f, { style: { display: "flex", flexDirection: "row", gap: "8px", alignItems: "center", textWrap: "nowrap" }, children: [
5167
5171
  /* @__PURE__ */ e(D, { children: "Rows Per Page: " }),
5168
5172
  /* @__PURE__ */ e(
5169
- Rt,
5173
+ It,
5170
5174
  {
5171
5175
  dropdownLists: [
5172
5176
  { label: "5", value: "5" },
@@ -5178,8 +5182,8 @@ const mo = 240, wn = ({
5178
5182
  onChange: (W) => {
5179
5183
  p(W[0].value);
5180
5184
  },
5181
- value: a ? [{ label: `${a} per row`, value: a }] : [{ label: `${o} per row`, value: `${o}` }],
5182
- defaultValue: a ? [{ label: `${a} per row`, value: a }] : [{ label: `${o} per row`, value: `${o}` }]
5185
+ value: d ? [{ label: `${d} per row`, value: d }] : [{ label: `${o} per row`, value: `${o}` }],
5186
+ defaultValue: d ? [{ label: `${d} per row`, value: d }] : [{ label: `${o} per row`, value: `${o}` }]
5183
5187
  }
5184
5188
  ),
5185
5189
  /* @__PURE__ */ e(D, { children: `${g}-${x} of ${(t == null ? void 0 : t.totalData) || 0}` })
@@ -5203,7 +5207,7 @@ const mo = 240, wn = ({
5203
5207
  }
5204
5208
  );
5205
5209
  }, Eo = ({ filter: t, columnTitle: r }) => {
5206
- const [n, o] = R(!1), i = ae(null), l = ae(null), s = ae(null), [c, d] = R(""), [a, m] = R({ top: 0, left: 0 }), p = t.selectedValues, g = pe(() => c ? t.options.filter(
5210
+ const [n, o] = I(!1), i = ae(null), l = ae(null), s = ae(null), [c, a] = I(""), [d, m] = I({ top: 0, left: 0 }), p = t.selectedValues, g = pe(() => c ? t.options.filter(
5207
5211
  (y) => y.label.toLowerCase().includes(c.toLowerCase())
5208
5212
  ) : t.options, [t.options, c]);
5209
5213
  U(() => {
@@ -5217,7 +5221,7 @@ const mo = 240, wn = ({
5217
5221
  n && s.current ? setTimeout(() => {
5218
5222
  var y;
5219
5223
  return (y = s.current) == null ? void 0 : y.focus();
5220
- }, 50) : d("");
5224
+ }, 50) : a("");
5221
5225
  }, [n]), U(() => {
5222
5226
  const y = (k) => {
5223
5227
  i.current && !i.current.contains(k.target) && l.current && !l.current.contains(k.target) && o(!1);
@@ -5261,8 +5265,8 @@ const mo = 240, wn = ({
5261
5265
  ref: i,
5262
5266
  style: {
5263
5267
  position: "fixed",
5264
- top: `${a.top}px`,
5265
- ...a.left !== void 0 ? { left: `${a.left}px` } : { right: `${a.right}px` },
5268
+ top: `${d.top}px`,
5269
+ ...d.left !== void 0 ? { left: `${d.left}px` } : { right: `${d.right}px` },
5266
5270
  backgroundColor: "white",
5267
5271
  borderRadius: "4px",
5268
5272
  minWidth: "280px",
@@ -5325,7 +5329,7 @@ const mo = 240, wn = ({
5325
5329
  placeholder: `Search ${r.toLowerCase()}...`,
5326
5330
  leftIcon: /* @__PURE__ */ e(M, { name: "Search", size: "sm" }),
5327
5331
  value: c,
5328
- onChange: (y) => d(y.target.value),
5332
+ onChange: (y) => a(y.target.value),
5329
5333
  style: { fontSize: "14px" }
5330
5334
  }
5331
5335
  )
@@ -5563,8 +5567,8 @@ const mo = 240, wn = ({
5563
5567
  isLoading: l,
5564
5568
  visibleHandleDelete: s,
5565
5569
  visibleHandleUpdate: c,
5566
- visibleHandleDetail: d,
5567
- showHeadBorder: a = !1,
5570
+ visibleHandleDetail: a,
5571
+ showHeadBorder: d = !1,
5568
5572
  scrollParentRef: m,
5569
5573
  frozenCount: p = 0,
5570
5574
  onFrozenCountChange: g,
@@ -5580,7 +5584,7 @@ const mo = 240, wn = ({
5580
5584
  onSortChange: A,
5581
5585
  showActionDivider: v = !1
5582
5586
  }) => {
5583
- const S = C !== void 0, [$, O] = R(
5587
+ const S = C !== void 0, [$, O] = I(
5584
5588
  H ?? null
5585
5589
  ), j = S ? C ?? null : $, G = (B) => {
5586
5590
  if (B.sortKey) return B.sortKey;
@@ -5594,15 +5598,15 @@ const mo = 240, wn = ({
5594
5598
  if (!V) return B;
5595
5599
  if (typeof V == "function") return V(B);
5596
5600
  if (typeof V == "string") return B[V];
5597
- }, [ye, Ee] = R(!1);
5601
+ }, [ye, Ee] = I(!1);
5598
5602
  U(() => {
5599
5603
  if (!(m != null && m.current)) return;
5600
5604
  const B = m.current;
5601
5605
  Ee(B.scrollHeight > B.clientHeight);
5602
5606
  }, [r, m]);
5603
- const Ve = ae(null), [be, je] = R([]), [Ye, xe] = R(
5607
+ const Ve = ae(null), [be, je] = I([]), [Ye, xe] = I(
5604
5608
  () => L ?? {}
5605
- ), Ie = ae(null);
5609
+ ), Re = ae(null);
5606
5610
  ct(() => {
5607
5611
  if (!p || !Ve.current) {
5608
5612
  je([]);
@@ -5630,19 +5634,19 @@ const mo = 240, wn = ({
5630
5634
  const N = B.currentTarget.closest("th");
5631
5635
  if (!N) return;
5632
5636
  const P = Math.round(N.getBoundingClientRect().width);
5633
- Ie.current = { colIndex: V, startX: B.clientX, startWidth: P };
5637
+ Re.current = { colIndex: V, startX: B.clientX, startWidth: P };
5634
5638
  const X = document.body.style.userSelect, Ce = document.body.style.cursor;
5635
5639
  document.body.style.userSelect = "none", document.body.style.cursor = "col-resize";
5636
5640
  const Le = (Pe) => {
5637
5641
  var it;
5638
- const Te = Ie.current;
5642
+ const Te = Re.current;
5639
5643
  if (!Te) return;
5640
5644
  const rt = ((it = t[Te.colIndex]) == null ? void 0 : it.minWidth) ?? w, nt = Math.max(rt, Te.startWidth + (Pe.clientX - Te.startX));
5641
5645
  xe(
5642
5646
  (Ze) => Ze[Te.colIndex] === nt ? Ze : { ...Ze, [Te.colIndex]: nt }
5643
5647
  );
5644
5648
  }, _e = () => {
5645
- document.removeEventListener("mousemove", Le), document.removeEventListener("mouseup", _e), document.body.style.userSelect = X, document.body.style.cursor = Ce, Ie.current = null, z && xe((Pe) => (z(Pe), Pe));
5649
+ document.removeEventListener("mousemove", Le), document.removeEventListener("mouseup", _e), document.body.style.userSelect = X, document.body.style.cursor = Ce, Re.current = null, z && xe((Pe) => (z(Pe), Pe));
5646
5650
  };
5647
5651
  document.addEventListener("mousemove", Le), document.addEventListener("mouseup", _e);
5648
5652
  };
@@ -5704,9 +5708,9 @@ const mo = 240, wn = ({
5704
5708
  left: N ? P : void 0,
5705
5709
  zIndex: N ? 4 : 2,
5706
5710
  paddingLeft: V === 0 ? "12px" : "",
5707
- borderRight: a && !Le && !N ? he : void 0,
5708
- borderBottom: a ? he : void 0,
5709
- boxShadow: a && N ? ue : void 0,
5711
+ borderRight: d && !Le && !N ? he : void 0,
5712
+ borderBottom: d ? he : void 0,
5713
+ boxShadow: d && N ? ue : void 0,
5710
5714
  backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
5711
5715
  textAlign: B.textAlign === "text-right" ? "right" : B.textAlign === "text-center" ? "center" : "left",
5712
5716
  ...F(V, B.width)
@@ -5789,8 +5793,8 @@ const mo = 240, wn = ({
5789
5793
  top: 0,
5790
5794
  right: 0,
5791
5795
  zIndex: 3,
5792
- borderBottom: a ? he : void 0,
5793
- boxShadow: a && v ? te : void 0
5796
+ borderBottom: d ? he : void 0,
5797
+ boxShadow: d && v ? te : void 0
5794
5798
  }
5795
5799
  }
5796
5800
  ) : null
@@ -5870,7 +5874,7 @@ const mo = 240, wn = ({
5870
5874
  transition: "background-color 0.3s ease"
5871
5875
  }, children: /* @__PURE__ */ e(se, { direction: "row", align: "center", justify: "center", gap: "sm", children: W.map((N) => {
5872
5876
  const P = V === r.length - 1 ? "top" : "bottom";
5873
- return N === "detail" && n && (d == null ? void 0 : d(B)) !== !1 ? /* @__PURE__ */ e(We, { label: "Detail", position: P, children: /* @__PURE__ */ e(
5877
+ return N === "detail" && n && (a == null ? void 0 : a(B)) !== !1 ? /* @__PURE__ */ e(We, { label: "Detail", position: P, children: /* @__PURE__ */ e(
5874
5878
  T,
5875
5879
  {
5876
5880
  size: "xs",
@@ -5911,11 +5915,11 @@ const mo = 240, wn = ({
5911
5915
  footerProps: o
5912
5916
  }) => {
5913
5917
  var p;
5914
- const i = ae(null), [l, s] = R(
5918
+ const i = ae(null), [l, s] = I(
5915
5919
  (r == null ? void 0 : r.defaultFrozenCount) ?? 0
5916
- ), c = (n == null ? void 0 : n.show) ?? !0, d = ae(null), a = (p = r == null ? void 0 : r.pagination) == null ? void 0 : p.totalData;
5917
- typeof a == "number" && (d.current = a);
5918
- const m = (o == null ? void 0 : o.showFooter) ?? (a === void 0 ? d.current !== 0 : a !== 0);
5920
+ ), c = (n == null ? void 0 : n.show) ?? !0, a = ae(null), d = (p = r == null ? void 0 : r.pagination) == null ? void 0 : p.totalData;
5921
+ typeof d == "number" && (a.current = d);
5922
+ const m = (o == null ? void 0 : o.showFooter) ?? (d === void 0 ? a.current !== 0 : d !== 0);
5919
5923
  return /* @__PURE__ */ u(Do, { ...t, children: [
5920
5924
  c && /* @__PURE__ */ e(ko, { ...n }),
5921
5925
  /* @__PURE__ */ e(
@@ -5992,7 +5996,7 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
5992
5996
  ]
5993
5997
  }
5994
5998
  );
5995
- }, Io = ({
5999
+ }, Ro = ({
5996
6000
  active: t,
5997
6001
  canSort: r,
5998
6002
  canHide: n,
@@ -6001,26 +6005,26 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6001
6005
  onSort: l,
6002
6006
  onClearSort: s,
6003
6007
  onToggleFreeze: c,
6004
- onHide: d
6008
+ onHide: a
6005
6009
  }) => {
6006
- const [a, m] = R(!1), p = ae(null), g = ae(null), [x, W] = R(
6010
+ const [d, m] = I(!1), p = ae(null), g = ae(null), [x, W] = I(
6007
6011
  { top: 0, left: 0 }
6008
6012
  );
6009
6013
  U(() => {
6010
- if (a && p.current) {
6014
+ if (d && p.current) {
6011
6015
  const k = p.current.getBoundingClientRect(), L = k.left + Qr > window.innerWidth;
6012
6016
  W({
6013
6017
  top: k.bottom + 6,
6014
6018
  ...L ? { right: window.innerWidth - k.right } : { left: k.left }
6015
6019
  });
6016
6020
  }
6017
- }, [a]), U(() => {
6018
- if (!a) return;
6021
+ }, [d]), U(() => {
6022
+ if (!d) return;
6019
6023
  const k = (L) => {
6020
6024
  g.current && !g.current.contains(L.target) && p.current && !p.current.contains(L.target) && m(!1);
6021
6025
  };
6022
6026
  return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
6023
- }, [a]);
6027
+ }, [d]);
6024
6028
  const y = (k) => {
6025
6029
  k(), m(!1);
6026
6030
  };
@@ -6031,7 +6035,7 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6031
6035
  ref: p,
6032
6036
  type: "button",
6033
6037
  className: "sa-tl-menu-trigger",
6034
- "data-active": t || a ? "true" : "false",
6038
+ "data-active": t || d ? "true" : "false",
6035
6039
  onClick: (k) => {
6036
6040
  k.stopPropagation(), m((L) => !L);
6037
6041
  },
@@ -6052,7 +6056,7 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6052
6056
  children: /* @__PURE__ */ e(Ao, { sortDir: o, frozen: i })
6053
6057
  }
6054
6058
  ),
6055
- a && /* @__PURE__ */ u(
6059
+ d && /* @__PURE__ */ u(
6056
6060
  f,
6057
6061
  {
6058
6062
  ref: g,
@@ -6108,14 +6112,14 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6108
6112
  icon: "EyeClosed",
6109
6113
  label: "Hide column",
6110
6114
  danger: !0,
6111
- onClick: () => y(d)
6115
+ onClick: () => y(a)
6112
6116
  }
6113
6117
  )
6114
6118
  ]
6115
6119
  }
6116
6120
  )
6117
6121
  ] });
6118
- }, St = "1px solid var(--sa-border-subtle, #0b120e24)", Ro = "var(--sa-text-subtle, #8c8f97)", gt = "var(--sa-background-neutral, #f0f1f2)", Yr = "2px 0 4px -2px rgba(0,0,0,0.15)", Ft = {
6122
+ }, St = "1px solid var(--sa-border-subtle, #0b120e24)", Io = "var(--sa-text-subtle, #8c8f97)", gt = "var(--sa-background-neutral, #f0f1f2)", Yr = "2px 0 4px -2px rgba(0,0,0,0.15)", Ft = {
6119
6123
  display: "block",
6120
6124
  overflow: "hidden",
6121
6125
  textOverflow: "ellipsis",
@@ -6178,8 +6182,8 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6178
6182
  widthStorageKey: l,
6179
6183
  columnState: s,
6180
6184
  onColumnStateChange: c,
6181
- columnMenu: d = !1,
6182
- sort: a,
6185
+ columnMenu: a = !1,
6186
+ sort: d,
6183
6187
  defaultSort: m,
6184
6188
  onSortChange: p,
6185
6189
  height: g,
@@ -6193,7 +6197,7 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6193
6197
  rowActions: C
6194
6198
  }) => {
6195
6199
  Ho();
6196
- const A = !De(W) && x !== "scroll", v = !!(C != null && C.length), [S, $] = R(null);
6200
+ const A = !De(W) && x !== "scroll", v = !!(C != null && C.length), [S, $] = I(null);
6197
6201
  U(() => {
6198
6202
  if (!S) return;
6199
6203
  const b = () => $(null), E = setTimeout(() => document.addEventListener("click", b), 0);
@@ -6201,17 +6205,17 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6201
6205
  clearTimeout(E), document.removeEventListener("click", b);
6202
6206
  };
6203
6207
  }, [S]);
6204
- const [O, j] = R(
6208
+ const [O, j] = I(
6205
6209
  () => /* @__PURE__ */ new Set()
6206
- ), G = s !== void 0, [ne, ge] = R({}), ie = s ?? ne, le = (b) => {
6210
+ ), G = s !== void 0, [ne, ge] = I({}), ie = s ?? ne, le = (b) => {
6207
6211
  c == null || c(b), G || ge(b);
6208
- }, J = a !== void 0, [q, he] = R(
6212
+ }, J = d !== void 0, [q, he] = I(
6209
6213
  m ?? null
6210
- ), te = J ? a ?? null : q, ue = !p, Fe = (b) => {
6214
+ ), te = J ? d ?? null : q, ue = !p, Fe = (b) => {
6211
6215
  p == null || p(b), J || he(b);
6212
6216
  }, { headerGroups: Ge, leafColumns: ye, hasGroups: Ee } = pe(() => {
6213
6217
  var ve;
6214
- const b = new Set(ie.hidden ?? []), E = (ee, me) => ee.key ?? (typeof ee.accessor == "string" ? ee.accessor : `col-${me}`), I = t.map((ee, me) => {
6218
+ const b = new Set(ie.hidden ?? []), E = (ee, me) => ee.key ?? (typeof ee.accessor == "string" ? ee.accessor : `col-${me}`), R = t.map((ee, me) => {
6215
6219
  var qe;
6216
6220
  if ((qe = ee.children) != null && qe.length) {
6217
6221
  const ut = ee.children.map((ot, Ut) => ({ col: ot, key: E(ot, `${me}-${Ut}`) })).filter((ot) => !b.has(ot.key));
@@ -6224,38 +6228,38 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6224
6228
  isGroup: !1,
6225
6229
  leaves: b.has(Me.key) ? [] : [Me]
6226
6230
  };
6227
- }).filter((ee) => ee.leaves.length > 0), Q = I.some((ee) => ee.isGroup);
6228
- let fe = I.flatMap((ee) => ee.leaves);
6231
+ }).filter((ee) => ee.leaves.length > 0), Q = R.some((ee) => ee.isGroup);
6232
+ let fe = R.flatMap((ee) => ee.leaves);
6229
6233
  if (!Q && ((ve = ie.order) != null && ve.length)) {
6230
6234
  const ee = new Map(ie.order.map((me, Me) => [me, Me]));
6231
6235
  fe = [...fe].sort(
6232
6236
  (me, Me) => (ee.get(me.key) ?? 1 / 0) - (ee.get(Me.key) ?? 1 / 0)
6233
6237
  );
6234
6238
  }
6235
- return { headerGroups: I, leafColumns: fe, hasGroups: Q };
6239
+ return { headerGroups: R, leafColumns: fe, hasGroups: Q };
6236
6240
  }, [t, ie]), Ve = pe(
6237
6241
  () => new Map(ye.map((b, E) => [b.key, E])),
6238
6242
  [ye]
6239
6243
  ), be = ye.map((b) => b.key).join("|"), je = (b, E) => {
6240
- const I = b.sortKey ?? (typeof b.accessor == "string" ? b.accessor : void 0);
6241
- return I ? E[I] : void 0;
6244
+ const R = b.sortKey ?? (typeof b.accessor == "string" ? b.accessor : void 0);
6245
+ return R ? E[R] : void 0;
6242
6246
  }, Ye = (b) => b.sortable ?? (!!b.sortKey || typeof b.accessor == "string"), xe = pe(() => {
6243
6247
  if (!ue || !te) return r;
6244
- const b = ye.find((I) => I.key === te.key);
6248
+ const b = ye.find((R) => R.key === te.key);
6245
6249
  if (!b) return r;
6246
6250
  const E = te.direction === "asc" ? 1 : -1;
6247
6251
  return [...r].sort(
6248
- (I, Q) => Vo(je(b.col, I), je(b.col, Q)) * E
6252
+ (R, Q) => Vo(je(b.col, R), je(b.col, Q)) * E
6249
6253
  );
6250
- }, [r, ue, te, ye]), Ie = !Ee, tt = !!l && Ie, [F, Z] = Pn(l ?? ""), _ = tt ? F : void 0, B = ae(null), [V, N] = R();
6254
+ }, [r, ue, te, ye]), Re = !Ee, tt = !!l && Re, [F, Z] = Pn(l ?? ""), _ = tt ? F : void 0, B = ae(null), [V, N] = I();
6251
6255
  ct(() => {
6252
6256
  N(void 0);
6253
6257
  }, [be]), ct(() => {
6254
- if (!Ie || V || !B.current) return;
6258
+ if (!Re || V || !B.current) return;
6255
6259
  const b = B.current.querySelectorAll("th.sa-tl-leaf");
6256
6260
  N(Array.from(b).map((E) => E.offsetWidth));
6257
- }, [V, Ie]);
6258
- const [P, X] = R(0);
6261
+ }, [V, Re]);
6262
+ const [P, X] = I(0);
6259
6263
  ct(() => {
6260
6264
  if (!Ee || !B.current) return;
6261
6265
  const b = B.current.querySelector(":scope > tr");
@@ -6268,9 +6272,9 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6268
6272
  }, Le = (b, E) => typeof b.width == "number" ? b.width : V == null ? void 0 : V[E], _e = ie.frozenKey && !Ee ? ye.findIndex((b) => b.key === ie.frozenKey) : -1, Pe = (b) => b <= _e, Te = (b) => {
6269
6273
  if (!V) return 0;
6270
6274
  let E = 0;
6271
- for (let I = 0; I < b; I++) E += V[I] ?? 0;
6275
+ for (let R = 0; R < b; R++) E += V[R] ?? 0;
6272
6276
  return E;
6273
- }, rt = ae(null), [nt, it] = R("100vh");
6277
+ }, rt = ae(null), [nt, it] = I("100vh");
6274
6278
  ct(() => {
6275
6279
  if (g !== void 0) return;
6276
6280
  const b = () => {
@@ -6281,11 +6285,11 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6281
6285
  };
6282
6286
  return b(), window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
6283
6287
  }, [g]);
6284
- const Ze = (b, E) => n ? n(b, E) : E, st = (b, E, I) => b.render ? b.render(E, I, xe) : Oo(E, b.accessor), at = ye.length + (v ? 1 : 0), dt = ["80%", "55%", "70%", "45%", "90%", "60%"], Fn = (b, E) => dt[(b * 7 + E * 3) % dt.length], En = (b, E) => /* @__PURE__ */ e(Xe, { height: 14, width: Fn(b, E), borderRadius: "rounded-sm" }), Ln = Array.from({ length: w }, (b, E) => /* @__PURE__ */ u(Ne, { children: [
6285
- ye.map(({ col: I, key: Q }, fe) => /* @__PURE__ */ e(
6288
+ const Ze = (b, E) => n ? n(b, E) : E, st = (b, E, R) => b.render ? b.render(E, R, xe) : Oo(E, b.accessor), at = ye.length + (v ? 1 : 0), dt = ["80%", "55%", "70%", "45%", "90%", "60%"], Fn = (b, E) => dt[(b * 7 + E * 3) % dt.length], En = (b, E) => /* @__PURE__ */ e(Xe, { height: 14, width: Fn(b, E), borderRadius: "rounded-sm" }), Ln = Array.from({ length: w }, (b, E) => /* @__PURE__ */ u(Ne, { children: [
6289
+ ye.map(({ col: R, key: Q }, fe) => /* @__PURE__ */ e(
6286
6290
  He,
6287
6291
  {
6288
- style: { textAlign: Et(I.align) },
6292
+ style: { textAlign: Et(R.align) },
6289
6293
  children: En(E, fe)
6290
6294
  },
6291
6295
  `sa-tl-sk-${E}-${Q}`
@@ -6300,8 +6304,8 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6300
6304
  ...ie,
6301
6305
  frozenKey: ie.frozenKey === b ? void 0 : b
6302
6306
  }), vt = (b) => (C ?? []).filter((E) => {
6303
- var I;
6304
- return !((I = E.hidden) != null && I.call(E, b));
6307
+ var R;
6308
+ return !((R = E.hidden) != null && R.call(E, b));
6305
6309
  }), Fr = {
6306
6310
  position: "absolute",
6307
6311
  right: 0,
@@ -6313,7 +6317,7 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6313
6317
  paddingRight: 16,
6314
6318
  paddingLeft: 40,
6315
6319
  background: "linear-gradient(to right, transparent, var(--sa-background-primary-inverse, #f8f8f8) 40px)"
6316
- }, Ct = (b, E, I, Q) => {
6320
+ }, Ct = (b, E, R, Q) => {
6317
6321
  var qe;
6318
6322
  const fe = (qe = b.disabled) == null ? void 0 : qe.call(b, E), ve = (Q == null ? void 0 : Q.showLabel) ?? b.showLabel, ee = (Q == null ? void 0 : Q.size) ?? "xs", me = /* @__PURE__ */ e(
6319
6323
  T,
@@ -6322,16 +6326,16 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6322
6326
  variant: b.variant ?? "tertiary",
6323
6327
  tone: b.tone ?? "neutral",
6324
6328
  disabled: fe,
6325
- onClick: () => b.onClick(E, I),
6329
+ onClick: () => b.onClick(E, R),
6326
6330
  iconLeft: b.icon ? /* @__PURE__ */ e(M, { name: b.icon, size: "sm" }) : void 0,
6327
6331
  children: ve && b.label
6328
6332
  }
6329
6333
  ), Me = b.tooltip;
6330
6334
  return Me ? /* @__PURE__ */ e(We, { label: Me, position: "top-end", children: me }) : me;
6331
6335
  }, Bn = (b, E) => {
6332
- const I = vt(b);
6333
- if (!I.length) return null;
6334
- if (I.length > 5) {
6336
+ const R = vt(b);
6337
+ if (!R.length) return null;
6338
+ if (R.length > 5) {
6335
6339
  const fe = Ze(b, E), ve = (S == null ? void 0 : S.rowKey) === fe;
6336
6340
  return /* @__PURE__ */ e(
6337
6341
  "div",
@@ -6358,28 +6362,28 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6358
6362
  }
6359
6363
  );
6360
6364
  }
6361
- return /* @__PURE__ */ e("div", { className: "sa-tl-row-actions", style: Fr, children: I.map((fe) => /* @__PURE__ */ e(et.Fragment, { children: Ct(fe, b, E) }, fe.key)) });
6365
+ return /* @__PURE__ */ e("div", { className: "sa-tl-row-actions", style: Fr, children: R.map((fe) => /* @__PURE__ */ e(et.Fragment, { children: Ct(fe, b, E) }, fe.key)) });
6362
6366
  }, zn = (b, E) => {
6363
- const I = vt(b);
6364
- return I.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap: 6, flexWrap: "wrap", paddingTop: 8, marginTop: 8, borderTop: St }, children: I.map((Q) => /* @__PURE__ */ e(et.Fragment, { children: Ct(Q, b, E, { showLabel: !0, size: "sm" }) }, Q.key)) }) : null;
6367
+ const R = vt(b);
6368
+ return R.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap: 6, flexWrap: "wrap", paddingTop: 8, marginTop: 8, borderTop: St }, children: R.map((Q) => /* @__PURE__ */ e(et.Fragment, { children: Ct(Q, b, E, { showLabel: !0, size: "sm" }) }, Q.key)) }) : null;
6365
6369
  }, An = (b, E) => {
6366
- const I = vt(b);
6367
- return I.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap: 4, paddingRight: 8, flexShrink: 0 }, children: I.map((Q) => /* @__PURE__ */ e(et.Fragment, { children: Ct(Q, b, E, { showLabel: !1 }) }, Q.key)) }) : null;
6370
+ const R = vt(b);
6371
+ return R.length ? /* @__PURE__ */ e("div", { style: { display: "flex", gap: 4, paddingRight: 8, flexShrink: 0 }, children: R.map((Q) => /* @__PURE__ */ e(et.Fragment, { children: Ct(Q, b, E, { showLabel: !1 }) }, Q.key)) }) : null;
6368
6372
  }, _t = (b, E) => {
6369
- const { col: I, key: Q } = b, fe = Ve.get(Q) ?? 0, ve = Pe(fe), ee = ve && fe === _e, me = (te == null ? void 0 : te.key) === Q ? te.direction : null, Me = d && !I.disableMenu ? /* @__PURE__ */ e(
6370
- Io,
6373
+ const { col: R, key: Q } = b, fe = Ve.get(Q) ?? 0, ve = Pe(fe), ee = ve && fe === _e, me = (te == null ? void 0 : te.key) === Q ? te.direction : null, Me = a && !R.disableMenu ? /* @__PURE__ */ e(
6374
+ Ro,
6371
6375
  {
6372
6376
  active: !!me || ve,
6373
- canSort: Ye(I),
6374
- canHide: !I.locked,
6377
+ canSort: Ye(R),
6378
+ canHide: !R.locked,
6375
6379
  sortDir: me,
6376
6380
  frozen: ve,
6377
6381
  onSort: (Ut) => Fe({ key: Q, direction: Ut }),
6378
6382
  onClearSort: () => Fe(null),
6379
6383
  onToggleFreeze: () => Wn(Q),
6380
- onHide: () => Mn(Q, I.locked)
6384
+ onHide: () => Mn(Q, R.locked)
6381
6385
  }
6382
- ) : null, qe = I.align === "right", ut = I.align === "right" ? "flex-end" : I.align === "center" ? "center" : "flex-start", ot = /* @__PURE__ */ u(
6386
+ ) : null, qe = R.align === "right", ut = R.align === "right" ? "flex-end" : R.align === "center" ? "center" : "flex-start", ot = /* @__PURE__ */ u(
6383
6387
  "span",
6384
6388
  {
6385
6389
  style: {
@@ -6392,8 +6396,8 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6392
6396
  overflow: "hidden"
6393
6397
  },
6394
6398
  children: [
6395
- I.icon && /* @__PURE__ */ e(M, { name: I.icon, size: "sm", style: { flexShrink: 0 } }),
6396
- /* @__PURE__ */ e("span", { style: Ft, children: I.title })
6399
+ R.icon && /* @__PURE__ */ e(M, { name: R.icon, size: "sm", style: { flexShrink: 0 } }),
6400
+ /* @__PURE__ */ e("span", { style: Ft, children: R.title })
6397
6401
  ]
6398
6402
  }
6399
6403
  );
@@ -6402,12 +6406,12 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6402
6406
  {
6403
6407
  className: `sa-tl-leaf${ve ? " sa-tl-frozen" : ""}`,
6404
6408
  rowSpan: E == null ? void 0 : E.rowSpan,
6405
- minWidth: I.minWidth,
6406
- resizable: Ie ? I.resizable : !1,
6407
- defaultWidth: Le(I, fe),
6409
+ minWidth: R.minWidth,
6410
+ resizable: Re ? R.resizable : !1,
6411
+ defaultWidth: Le(R, fe),
6408
6412
  style: {
6409
- textAlign: Et(I.align),
6410
- width: Ce(I, fe),
6413
+ textAlign: Et(R.align),
6414
+ width: Ce(R, fe),
6411
6415
  position: "sticky",
6412
6416
  top: (E == null ? void 0 : E.top) ?? 0,
6413
6417
  left: ve ? Te(fe) : void 0,
@@ -6436,11 +6440,11 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6436
6440
  },
6437
6441
  `th-${Q}`
6438
6442
  );
6439
- }, Pt = ye.filter((b) => !b.col.hideOnMobile), Zt = Pt.find((b) => b.col.primary) ?? Pt[0], In = Pt.filter((b) => b !== Zt), Rn = (b) => j((E) => {
6440
- const I = new Set(E);
6441
- return I.has(b) ? I.delete(b) : I.add(b), I;
6442
- }), Er = (b, E) => In.map(({ col: I, key: Q }) => {
6443
- const fe = st(I, b, E), ve = typeof fe == "string" || typeof fe == "number" ? /* @__PURE__ */ e(
6443
+ }, Pt = ye.filter((b) => !b.col.hideOnMobile), Zt = Pt.find((b) => b.col.primary) ?? Pt[0], Rn = Pt.filter((b) => b !== Zt), In = (b) => j((E) => {
6444
+ const R = new Set(E);
6445
+ return R.has(b) ? R.delete(b) : R.add(b), R;
6446
+ }), Er = (b, E) => Rn.map(({ col: R, key: Q }) => {
6447
+ const fe = st(R, b, E), ve = typeof fe == "string" || typeof fe == "number" ? /* @__PURE__ */ e(
6444
6448
  D,
6445
6449
  {
6446
6450
  style: {
@@ -6473,23 +6477,23 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6473
6477
  alignItems: "baseline"
6474
6478
  },
6475
6479
  children: [
6476
- typeof I.title == "string" ? /* @__PURE__ */ e(
6480
+ typeof R.title == "string" ? /* @__PURE__ */ e(
6477
6481
  D,
6478
6482
  {
6479
6483
  color: "subtle",
6480
6484
  fontWeight: "medium",
6481
- style: { color: Ro, flexShrink: 0 },
6482
- children: I.title
6485
+ style: { color: Io, flexShrink: 0 },
6486
+ children: R.title
6483
6487
  }
6484
- ) : /* @__PURE__ */ e("div", { style: { flexShrink: 0 }, children: I.title }),
6488
+ ) : /* @__PURE__ */ e("div", { style: { flexShrink: 0 }, children: R.title }),
6485
6489
  ve
6486
6490
  ]
6487
6491
  },
6488
6492
  Q
6489
6493
  );
6490
6494
  }), Lr = (b, E) => {
6491
- const I = Zt ? st(Zt.col, b, E) : null;
6492
- return typeof I == "string" || typeof I == "number" ? /* @__PURE__ */ e(D, { as: "span", style: Ft, children: I }) : /* @__PURE__ */ e("span", { style: Ft, children: I });
6495
+ const R = Zt ? st(Zt.col, b, E) : null;
6496
+ return typeof R == "string" || typeof R == "number" ? /* @__PURE__ */ e(D, { as: "span", style: Ft, children: R }) : /* @__PURE__ */ e("span", { style: Ft, children: R });
6493
6497
  }, Hn = /* @__PURE__ */ e(
6494
6498
  f,
6495
6499
  {
@@ -6528,14 +6532,14 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6528
6532
  children: L == null ? void 0 : L.content
6529
6533
  }
6530
6534
  ), On = z ? Hn : xe.length === 0 ? Mr : x === "expand" ? /* @__PURE__ */ e(f, { style: { display: "flex", flexDirection: "column" }, children: xe.map((b, E) => {
6531
- const I = Ze(b, E), Q = O.has(I);
6535
+ const R = Ze(b, E), Q = O.has(R);
6532
6536
  return /* @__PURE__ */ u("div", { style: { borderBottom: St }, children: [
6533
6537
  /* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center" }, children: [
6534
6538
  /* @__PURE__ */ u(
6535
6539
  "button",
6536
6540
  {
6537
6541
  type: "button",
6538
- onClick: () => Rn(I),
6542
+ onClick: () => In(R),
6539
6543
  style: {
6540
6544
  flex: 1,
6541
6545
  minWidth: 0,
@@ -6578,7 +6582,7 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6578
6582
  children: Er(b, E)
6579
6583
  }
6580
6584
  )
6581
- ] }, I);
6585
+ ] }, R);
6582
6586
  }) }) : /* @__PURE__ */ e(
6583
6587
  f,
6584
6588
  {
@@ -6609,7 +6613,7 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6609
6613
  className: "sa-table-layout",
6610
6614
  fullWidth: !0,
6611
6615
  size: o,
6612
- resizable: i && Ie && V !== void 0,
6616
+ resizable: i && Re && V !== void 0,
6613
6617
  onWidthsChange: tt ? Z : void 0,
6614
6618
  children: [
6615
6619
  /* @__PURE__ */ e(cn, { ref: B, children: Ee ? /* @__PURE__ */ u(oe, { children: [
@@ -6671,13 +6675,13 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6671
6675
  ] }) }),
6672
6676
  /* @__PURE__ */ e(sn, { children: z ? Ln : xe.length === 0 ? /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(He, { colSpan: at, children: Mr }) }) : /* @__PURE__ */ u(oe, { children: [
6673
6677
  xe.map((b, E) => {
6674
- const I = y == null ? void 0 : y(
6678
+ const R = y == null ? void 0 : y(
6675
6679
  b,
6676
6680
  E,
6677
6681
  E > 0 ? xe[E - 1] : void 0
6678
6682
  );
6679
6683
  return /* @__PURE__ */ u(et.Fragment, { children: [
6680
- I != null && I !== !1 && /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(He, { colSpan: at, style: { backgroundColor: gt }, children: I }) }),
6684
+ R != null && R !== !1 && /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(He, { colSpan: at, style: { backgroundColor: gt }, children: R }) }),
6681
6685
  /* @__PURE__ */ u(Ne, { children: [
6682
6686
  ye.map(({ col: Q, key: fe }, ve) => {
6683
6687
  var ut;
@@ -6770,24 +6774,24 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6770
6774
  paramKeys: l,
6771
6775
  scopeId: s,
6772
6776
  storage: c = bn
6773
- } = t, { searchParams: d, setSearchParams: a, searchQueries: m } = Oe(), p = d.toString(), g = s ? xt.tableSort(s) : void 0, x = ae(!1);
6777
+ } = t, { searchParams: a, setSearchParams: d, searchQueries: m } = Oe(), p = a.toString(), g = s ? xt.tableSort(s) : void 0, x = ae(!1);
6774
6778
  U(() => {
6775
- if (x.current || (x.current = !0, !g) || d.has(r) || d.has(n))
6779
+ if (x.current || (x.current = !0, !g) || a.has(r) || a.has(n))
6776
6780
  return;
6777
6781
  const w = c.get(g);
6778
- !(w != null && w.key) || !ir(w.direction) || a({
6779
- ...Object.fromEntries(d.entries()),
6782
+ !(w != null && w.key) || !ir(w.direction) || d({
6783
+ ...Object.fromEntries(a.entries()),
6780
6784
  [r]: w.key,
6781
6785
  [n]: w.direction
6782
6786
  });
6783
6787
  }, []);
6784
6788
  const W = pe(() => {
6785
- const w = d.get(r), C = d.get(n);
6789
+ const w = a.get(r), C = a.get(n);
6786
6790
  return w && ir(C) ? { key: w, direction: C } : i;
6787
6791
  }, [p, r, n, i]);
6788
6792
  U(() => {
6789
6793
  if (!g) return;
6790
- const w = d.get(r), C = d.get(n);
6794
+ const w = a.get(r), C = a.get(n);
6791
6795
  w && ir(C) ? c.set(g, { key: w, direction: C }) : c.remove(g);
6792
6796
  }, [p, g, r, n, c]);
6793
6797
  const y = (l == null ? void 0 : l.sortBy) ?? "sortBy", k = (l == null ? void 0 : l.sortOrder) ?? "sortOrder", L = pe(() => W ? {
@@ -6796,9 +6800,9 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6796
6800
  } : {}, [W, y, k]), z = K(
6797
6801
  (w) => {
6798
6802
  const C = { ...m };
6799
- w ? (C[r] = w.key, C[n] = w.direction) : (delete C[r], delete C[n]), delete C[o], a(C);
6803
+ w ? (C[r] = w.key, C[n] = w.direction) : (delete C[r], delete C[n]), delete C[o], d(C);
6800
6804
  },
6801
- [m, r, n, o, a]
6805
+ [m, r, n, o, d]
6802
6806
  );
6803
6807
  return { sort: W, setSort: z, params: L };
6804
6808
  }, Cr = ({
@@ -6827,7 +6831,7 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6827
6831
  fullWidth: o = !1,
6828
6832
  ...i
6829
6833
  }) => {
6830
- var c, d, a;
6834
+ var c, a, d;
6831
6835
  const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
6832
6836
  return /* @__PURE__ */ u(
6833
6837
  f,
@@ -6865,8 +6869,8 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6865
6869
  /* @__PURE__ */ e(ce, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
6866
6870
  We,
6867
6871
  {
6868
- label: (d = i.tooltip) == null ? void 0 : d.label,
6869
- arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
6872
+ label: (a = i.tooltip) == null ? void 0 : a.label,
6873
+ arrowPosition: (d = i.tooltip) == null ? void 0 : d.arrowPosition,
6870
6874
  ...i.tooltip,
6871
6875
  children: /* @__PURE__ */ e(
6872
6876
  M,
@@ -6912,7 +6916,7 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6912
6916
  fullWidth: o = !1,
6913
6917
  ...i
6914
6918
  }) => {
6915
- var c, d, a;
6919
+ var c, a, d;
6916
6920
  const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
6917
6921
  return /* @__PURE__ */ u(
6918
6922
  f,
@@ -6950,8 +6954,8 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6950
6954
  /* @__PURE__ */ e(ce, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
6951
6955
  We,
6952
6956
  {
6953
- label: (d = i.tooltip) == null ? void 0 : d.label,
6954
- arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
6957
+ label: (a = i.tooltip) == null ? void 0 : a.label,
6958
+ arrowPosition: (d = i.tooltip) == null ? void 0 : d.arrowPosition,
6955
6959
  ...i.tooltip,
6956
6960
  children: /* @__PURE__ */ e(
6957
6961
  M,
@@ -6982,7 +6986,7 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6982
6986
  width: i.inputProps.fullWidth ? "100%" : r === "horizontal" && i.customWidth ? i.customWidth : r === "horizontal" ? "343px" : ""
6983
6987
  },
6984
6988
  children: /* @__PURE__ */ e(
6985
- Rt,
6989
+ It,
6986
6990
  {
6987
6991
  size: t,
6988
6992
  ...i.inputProps,
@@ -6999,14 +7003,14 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
6999
7003
  );
7000
7004
  }, $o = (t, r) => typeof t == "string" && t || r === "error" ? "var(--sa-border-danger)" : "var(--sa-border-subtle)", jo = (t) => {
7001
7005
  var c;
7002
- const [r, n] = R(!1), o = (d) => {
7003
- d.preventDefault(), d.stopPropagation();
7004
- }, i = (d) => {
7005
- d.preventDefault(), d.stopPropagation(), d.dataTransfer && t.handleOnFileChange(d.dataTransfer.files.item(0));
7006
- }, l = (d) => {
7007
- d.preventDefault(), n(!0);
7008
- }, s = (d) => {
7009
- d.preventDefault(), n(!1);
7006
+ const [r, n] = I(!1), o = (a) => {
7007
+ a.preventDefault(), a.stopPropagation();
7008
+ }, i = (a) => {
7009
+ a.preventDefault(), a.stopPropagation(), a.dataTransfer && t.handleOnFileChange(a.dataTransfer.files.item(0));
7010
+ }, l = (a) => {
7011
+ a.preventDefault(), n(!0);
7012
+ }, s = (a) => {
7013
+ a.preventDefault(), n(!1);
7010
7014
  };
7011
7015
  return /* @__PURE__ */ u(
7012
7016
  f,
@@ -7060,7 +7064,7 @@ const Cc = zo(Bo), Qr = 200, nr = "1px solid var(--sa-border-subtle, #0b120e24)"
7060
7064
  }
7061
7065
  )
7062
7066
  ] }),
7063
- /* @__PURE__ */ e(D, { fontSize: "sm", color: "gray-500", children: (c = t.fileSupports) == null ? void 0 : c.map((d) => d.toLocaleUpperCase()).join(", ") })
7067
+ /* @__PURE__ */ e(D, { fontSize: "sm", color: "gray-500", children: (c = t.fileSupports) == null ? void 0 : c.map((a) => a.toLocaleUpperCase()).join(", ") })
7064
7068
  ] })
7065
7069
  ]
7066
7070
  }
@@ -7153,10 +7157,10 @@ function zc(t, r) {
7153
7157
  function Ac(t) {
7154
7158
  return /^(?:\+62|62|0)8[1-9][0-9]{7,10}$/.test(t);
7155
7159
  }
7156
- function Ic(t) {
7160
+ function Rc(t) {
7157
7161
  return /^[A-Za-z\s]+$/.test(t);
7158
7162
  }
7159
- const Rc = (t) => {
7163
+ const Ic = (t) => {
7160
7164
  const r = /^[0-9]$/, n = [
7161
7165
  "ArrowLeft",
7162
7166
  "ArrowRight",
@@ -7338,7 +7342,7 @@ const Qo = (t) => {
7338
7342
  alignItems: "center"
7339
7343
  }, children: "Optional" }),
7340
7344
  n.required && /* @__PURE__ */ e("span", { style: { fontSize: "14px", fontWeight: 500, color: "var(--sa-text-error)" }, children: "*" })
7341
- ] }) : null, d = n.description ? /* @__PURE__ */ e(D, { style: { fontSize: "12px", fontWeight: 400, color: "var(--sa-text-subtlest, #6b6e76)", lineHeight: "18px" }, children: n.description }) : null, a = /* @__PURE__ */ u(oe, { children: [
7345
+ ] }) : null, a = n.description ? /* @__PURE__ */ e(D, { style: { fontSize: "12px", fontWeight: 400, color: "var(--sa-text-subtlest, #6b6e76)", lineHeight: "18px" }, children: n.description }) : null, d = /* @__PURE__ */ u(oe, { children: [
7342
7346
  n.helperText && /* @__PURE__ */ e(D, { style: { fontSize: "12px", fontWeight: 400, color: "var(--sa-text-subtlest, #6b6e76)", lineHeight: "18px" }, children: n.helperText }),
7343
7347
  n.errorText && t === "error" && /* @__PURE__ */ e(D, { style: { fontSize: "12px", fontWeight: 400, color: "var(--sa-text-error, #a4133c)", lineHeight: "18px" }, children: n.errorText }),
7344
7348
  n.errorMessage && !n.errorText && /* @__PURE__ */ e(D, { style: { fontSize: "12px", fontWeight: 400, color: "var(--sa-text-error, #a4133c)", lineHeight: "18px" }, children: n.errorMessage })
@@ -7395,17 +7399,17 @@ const Qo = (t) => {
7395
7399
  return r === "outside-left" ? /* @__PURE__ */ u(se, { direction: "row", align: "flex-start", gap: "sm", style: { width: "100%" }, children: [
7396
7400
  /* @__PURE__ */ u(se, { direction: "column", gap: "xs", style: { width: "40%", minWidth: "120px", paddingTop: "10px" }, children: [
7397
7401
  c,
7398
- d
7402
+ a
7399
7403
  ] }),
7400
7404
  /* @__PURE__ */ u(se, { direction: "column", gap: "sm", style: { flex: 1, minWidth: 0 }, children: [
7401
7405
  p,
7402
- a
7406
+ d
7403
7407
  ] })
7404
7408
  ] }) : /* @__PURE__ */ u(se, { direction: "column", gap: "sm", style: { width: "100%" }, children: [
7405
7409
  c,
7406
- d,
7410
+ a,
7407
7411
  p,
7408
- a
7412
+ d
7409
7413
  ] });
7410
7414
  }, Xo = ({
7411
7415
  size: t = "md",
@@ -7414,7 +7418,7 @@ const Qo = (t) => {
7414
7418
  fullWidth: o = !1,
7415
7419
  ...i
7416
7420
  }) => {
7417
- var c, d, a;
7421
+ var c, a, d;
7418
7422
  const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
7419
7423
  return /* @__PURE__ */ u(
7420
7424
  f,
@@ -7452,8 +7456,8 @@ const Qo = (t) => {
7452
7456
  /* @__PURE__ */ e(ce, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
7453
7457
  We,
7454
7458
  {
7455
- label: (d = i.tooltip) == null ? void 0 : d.label,
7456
- arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
7459
+ label: (a = i.tooltip) == null ? void 0 : a.label,
7460
+ arrowPosition: (d = i.tooltip) == null ? void 0 : d.arrowPosition,
7457
7461
  ...i.tooltip,
7458
7462
  children: /* @__PURE__ */ e(
7459
7463
  M,
@@ -7496,7 +7500,7 @@ const Qo = (t) => {
7496
7500
  required: i = !1,
7497
7501
  ...l
7498
7502
  }) => {
7499
- var d, a, m, p;
7503
+ var a, d, m, p;
7500
7504
  const s = l.hideMessageError || !1, c = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
7501
7505
  return /* @__PURE__ */ u(
7502
7506
  f,
@@ -7531,10 +7535,10 @@ const Qo = (t) => {
7531
7535
  /* @__PURE__ */ u(se, { direction: "row", gap: "xs", align: "center", children: [
7532
7536
  /* @__PURE__ */ e(de, { fontSize: t, children: l.title }),
7533
7537
  /* @__PURE__ */ e(de, { color: "error", fontSize: t, children: n }),
7534
- /* @__PURE__ */ e(ce, { condition: !!((d = l.tooltip) != null && d.label), children: /* @__PURE__ */ e(
7538
+ /* @__PURE__ */ e(ce, { condition: !!((a = l.tooltip) != null && a.label), children: /* @__PURE__ */ e(
7535
7539
  We,
7536
7540
  {
7537
- label: (a = l.tooltip) == null ? void 0 : a.label,
7541
+ label: (d = l.tooltip) == null ? void 0 : d.label,
7538
7542
  arrowPosition: (m = l.tooltip) == null ? void 0 : m.arrowPosition,
7539
7543
  ...l.tooltip,
7540
7544
  children: /* @__PURE__ */ e(
@@ -7651,7 +7655,7 @@ const Qo = (t) => {
7651
7655
  ...s,
7652
7656
  isChecked: o.radioIsChecked === s.id
7653
7657
  })),
7654
- render: ({ value: s, id: c, isChecked: d, subInput: a, label: m, description: p }) => /* @__PURE__ */ u(f, { direction: "column", gap: "xs", customMaxWidth: i, children: [
7658
+ render: ({ value: s, id: c, isChecked: a, subInput: d, label: m, description: p }) => /* @__PURE__ */ u(f, { direction: "column", gap: "xs", customMaxWidth: i, children: [
7655
7659
  /* @__PURE__ */ e(
7656
7660
  Un,
7657
7661
  {
@@ -7659,7 +7663,7 @@ const Qo = (t) => {
7659
7663
  name: o.groupName || m,
7660
7664
  label: m,
7661
7665
  value: s,
7662
- checked: d,
7666
+ checked: a,
7663
7667
  onChange: (g) => o.onChecked({
7664
7668
  id: c,
7665
7669
  label: g.target.name,
@@ -7679,7 +7683,7 @@ const Qo = (t) => {
7679
7683
  children: p
7680
7684
  }
7681
7685
  ),
7682
- a
7686
+ d
7683
7687
  ] })
7684
7688
  }
7685
7689
  )
@@ -7696,7 +7700,7 @@ const Qo = (t) => {
7696
7700
  fullWidth: o = !1,
7697
7701
  ...i
7698
7702
  }) => {
7699
- var c, d, a;
7703
+ var c, a, d;
7700
7704
  const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
7701
7705
  return /* @__PURE__ */ u(
7702
7706
  f,
@@ -7734,8 +7738,8 @@ const Qo = (t) => {
7734
7738
  /* @__PURE__ */ e(ce, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
7735
7739
  We,
7736
7740
  {
7737
- label: (d = i.tooltip) == null ? void 0 : d.label,
7738
- arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
7741
+ label: (a = i.tooltip) == null ? void 0 : a.label,
7742
+ arrowPosition: (d = i.tooltip) == null ? void 0 : d.arrowPosition,
7739
7743
  ...i.tooltip,
7740
7744
  children: /* @__PURE__ */ e(
7741
7745
  M,
@@ -7780,7 +7784,7 @@ const Qo = (t) => {
7780
7784
  fullWidth: i = !1,
7781
7785
  ...l
7782
7786
  }) => {
7783
- var c, d, a;
7787
+ var c, a, d;
7784
7788
  const s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
7785
7789
  return /* @__PURE__ */ u(
7786
7790
  f,
@@ -7818,8 +7822,8 @@ const Qo = (t) => {
7818
7822
  /* @__PURE__ */ e(ce, { condition: !!((c = l.tooltip) != null && c.label), children: /* @__PURE__ */ e(
7819
7823
  We,
7820
7824
  {
7821
- label: (d = l.tooltip) == null ? void 0 : d.label,
7822
- arrowPosition: (a = l.tooltip) == null ? void 0 : a.arrowPosition,
7825
+ label: (a = l.tooltip) == null ? void 0 : a.label,
7826
+ arrowPosition: (d = l.tooltip) == null ? void 0 : d.arrowPosition,
7823
7827
  ...l.tooltip,
7824
7828
  children: /* @__PURE__ */ e(
7825
7829
  M,
@@ -7860,16 +7864,16 @@ const Qo = (t) => {
7860
7864
  ...n
7861
7865
  }) => {
7862
7866
  const o = qn(), i = (s) => {
7863
- var d, a, m, p, g, x;
7867
+ var a, d, m, p, g, x;
7864
7868
  if (!s) return;
7865
- const c = n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (a = (d = o == null ? void 0 : o.computed) == null ? void 0 : d.red) == null ? void 0 : a[600] : t === "secondary-primary" ? (p = (m = o == null ? void 0 : o.computed) == null ? void 0 : m.blue) == null ? void 0 : p[700] : (x = (g = o == null ? void 0 : o.computed) == null ? void 0 : g.gray) == null ? void 0 : x[50];
7869
+ const c = n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (d = (a = o == null ? void 0 : o.computed) == null ? void 0 : a.red) == null ? void 0 : d[600] : t === "secondary-primary" ? (p = (m = o == null ? void 0 : o.computed) == null ? void 0 : m.blue) == null ? void 0 : p[700] : (x = (g = o == null ? void 0 : o.computed) == null ? void 0 : g.gray) == null ? void 0 : x[50];
7866
7870
  return /* @__PURE__ */ e(M, { name: s, size: r, style: { color: c } });
7867
7871
  }, l = () => {
7868
- var c, d, a, m;
7872
+ var c, a, d, m;
7869
7873
  if (t !== "secondary-danger" && t !== "secondary-primary")
7870
7874
  return n.title;
7871
7875
  const s = {
7872
- color: n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary-danger" ? (d = (c = o == null ? void 0 : o.computed) == null ? void 0 : c.red) == null ? void 0 : d[600] : (m = (a = o == null ? void 0 : o.computed) == null ? void 0 : a.blue) == null ? void 0 : m[700]
7876
+ color: n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary-danger" ? (a = (c = o == null ? void 0 : o.computed) == null ? void 0 : c.red) == null ? void 0 : a[600] : (m = (d = o == null ? void 0 : o.computed) == null ? void 0 : d.blue) == null ? void 0 : m[700]
7873
7877
  };
7874
7878
  switch (r) {
7875
7879
  case "xs":
@@ -7914,7 +7918,7 @@ const Qo = (t) => {
7914
7918
  fullWidth: o = !1,
7915
7919
  ...i
7916
7920
  }) => {
7917
- var c, d, a;
7921
+ var c, a, d;
7918
7922
  const l = i.hideMessageError || !1, s = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
7919
7923
  return /* @__PURE__ */ u(
7920
7924
  f,
@@ -7952,8 +7956,8 @@ const Qo = (t) => {
7952
7956
  /* @__PURE__ */ e(ce, { condition: !!((c = i.tooltip) != null && c.label), children: /* @__PURE__ */ e(
7953
7957
  We,
7954
7958
  {
7955
- label: (d = i.tooltip) == null ? void 0 : d.label,
7956
- arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
7959
+ label: (a = i.tooltip) == null ? void 0 : a.label,
7960
+ arrowPosition: (d = i.tooltip) == null ? void 0 : d.arrowPosition,
7957
7961
  ...i.tooltip,
7958
7962
  children: /* @__PURE__ */ e(
7959
7963
  M,
@@ -8021,8 +8025,8 @@ async function ll(t, r) {
8021
8025
  ), new Promise((l, s) => {
8022
8026
  o.toBlob((c) => {
8023
8027
  if (!c) return s("Canvas is empty");
8024
- const d = new File([c], "cropped.png", { type: "image/png" });
8025
- l(d);
8028
+ const a = new File([c], "cropped.png", { type: "image/png" });
8029
+ l(a);
8026
8030
  }, "image/png");
8027
8031
  });
8028
8032
  }
@@ -8045,10 +8049,10 @@ const Kr = {
8045
8049
  size: l = "96",
8046
8050
  aspect: s = "1:1",
8047
8051
  containerProps: c,
8048
- maxFileSize: d = 2,
8049
- onError: a
8052
+ maxFileSize: a = 2,
8053
+ onError: d
8050
8054
  }, m) => {
8051
- const p = De("md"), [g, x] = R(!1), [W, y] = R(null), [k, L] = R(!1), [z, w] = R({ x: 0, y: 0 }), [C, H] = R(1), [A, v] = R(null);
8055
+ const p = De("md"), [g, x] = I(!1), [W, y] = I(null), [k, L] = I(!1), [z, w] = I({ x: 0, y: 0 }), [C, H] = I(1), [A, v] = I(null);
8052
8056
  U(() => {
8053
8057
  r === null && i(null);
8054
8058
  }, [r]);
@@ -8069,15 +8073,15 @@ const Kr = {
8069
8073
  if (!(!W || !A))
8070
8074
  try {
8071
8075
  const J = await ll(W, A);
8072
- if (d && J.size > d * 1024 * 1024) {
8073
- a == null || a(`Ukuran file maksimal ${d}MB`);
8076
+ if (a && J.size > a * 1024 * 1024) {
8077
+ d == null || d(`Ukuran file maksimal ${a}MB`);
8074
8078
  return;
8075
8079
  }
8076
8080
  t == null || t(J);
8077
8081
  const q = URL.createObjectURL(J);
8078
8082
  i(q, J), L(!1);
8079
8083
  } catch {
8080
- a == null || a("Gagal memproses gambar");
8084
+ d == null || d("Gagal memproses gambar");
8081
8085
  }
8082
8086
  }, j = ae(null), G = () => {
8083
8087
  j.current && j.current.click();
@@ -8312,7 +8316,7 @@ const Kr = {
8312
8316
  required: i = !1,
8313
8317
  ...l
8314
8318
  }) => {
8315
- var d, a, m;
8319
+ var a, d, m;
8316
8320
  const s = l.hideMessageError || !1, c = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
8317
8321
  return /* @__PURE__ */ u(
8318
8322
  f,
@@ -8347,10 +8351,10 @@ const Kr = {
8347
8351
  /* @__PURE__ */ u(se, { direction: "row", gap: "xs", align: "center", children: [
8348
8352
  /* @__PURE__ */ e(de, { fontSize: t, children: l.title }),
8349
8353
  /* @__PURE__ */ e(de, { color: "error", fontSize: t, children: n }),
8350
- /* @__PURE__ */ e(ce, { condition: !!((d = l.tooltip) != null && d.label), children: /* @__PURE__ */ e(
8354
+ /* @__PURE__ */ e(ce, { condition: !!((a = l.tooltip) != null && a.label), children: /* @__PURE__ */ e(
8351
8355
  We,
8352
8356
  {
8353
- label: (a = l.tooltip) == null ? void 0 : a.label,
8357
+ label: (d = l.tooltip) == null ? void 0 : d.label,
8354
8358
  arrowPosition: (m = l.tooltip) == null ? void 0 : m.arrowPosition,
8355
8359
  ...l.tooltip,
8356
8360
  children: /* @__PURE__ */ e(
@@ -8387,7 +8391,7 @@ const Kr = {
8387
8391
  fullWidth: o = !1,
8388
8392
  ...i
8389
8393
  }) => {
8390
- var s, c, d;
8394
+ var s, c, a;
8391
8395
  const l = r === "horizontal" ? t === "sm" ? 342 : t === "lg" ? 400 : 342 : void 0;
8392
8396
  return /* @__PURE__ */ u(
8393
8397
  f,
@@ -8426,7 +8430,7 @@ const Kr = {
8426
8430
  We,
8427
8431
  {
8428
8432
  label: (c = i.tooltip) == null ? void 0 : c.label,
8429
- arrowPosition: (d = i.tooltip) == null ? void 0 : d.arrowPosition,
8433
+ arrowPosition: (a = i.tooltip) == null ? void 0 : a.arrowPosition,
8430
8434
  ...i.tooltip,
8431
8435
  children: /* @__PURE__ */ e(
8432
8436
  M,
@@ -8461,15 +8465,15 @@ const Kr = {
8461
8465
  disabled: l = !1
8462
8466
  }) => {
8463
8467
  var m;
8464
- const [s, c] = R([]);
8468
+ const [s, c] = I([]);
8465
8469
  U(() => {
8466
8470
  t && c([...t.map((p) => ({ id: p.id, isActive: p.isActive }))]);
8467
8471
  }, [t]);
8468
- const d = (m = s.find((p) => p.id === r)) == null ? void 0 : m.isActive, a = K(() => {
8472
+ const a = (m = s.find((p) => p.id === r)) == null ? void 0 : m.isActive, d = K(() => {
8469
8473
  c(
8470
8474
  (p) => p.map((g) => g.id === r ? { ...g, isActive: !g.isActive } : g)
8471
- ), n && n(!d);
8472
- }, [r, n, d]);
8475
+ ), n && n(!a);
8476
+ }, [r, n, a]);
8473
8477
  return /* @__PURE__ */ e(
8474
8478
  f,
8475
8479
  {
@@ -8482,9 +8486,9 @@ const Kr = {
8482
8486
  Ot,
8483
8487
  {
8484
8488
  disabled: l,
8485
- checked: d,
8486
- onChange: a,
8487
- label: d ? "Active" : "Inactive"
8489
+ checked: a,
8490
+ onChange: d,
8491
+ label: a ? "Active" : "Inactive"
8488
8492
  }
8489
8493
  )
8490
8494
  }
@@ -8503,7 +8507,7 @@ const Kr = {
8503
8507
  InputImgFile: sl,
8504
8508
  Custom: al
8505
8509
  }, dl = ({ customBottom: t }) => {
8506
- const [r, n] = R(!1), o = () => {
8510
+ const [r, n] = I(!1), o = () => {
8507
8511
  window.scrollY > window.screenY ? n(!0) : n(!1);
8508
8512
  }, i = () => {
8509
8513
  window.scrollTo({ top: 0, behavior: "smooth" });
@@ -8554,8 +8558,8 @@ const Kr = {
8554
8558
  )
8555
8559
  }
8556
8560
  );
8557
- }, Re = "sa-sidepanel-item", en = "sa-sidepanel-item-styles", ul = "inset 3.5px 0 0 0 var(--sa-border-focused, #1a4fa0)", hl = "inset -3.5px 0 0 0 var(--sa-border-focused, #1a4fa0)", fl = `
8558
- .${Re} {
8561
+ }, Ie = "sa-sidepanel-item", en = "sa-sidepanel-item-styles", ul = "inset 3.5px 0 0 0 var(--sa-border-focused, #1a4fa0)", hl = "inset -3.5px 0 0 0 var(--sa-border-focused, #1a4fa0)", fl = `
8562
+ .${Ie} {
8559
8563
  display: block;
8560
8564
  box-sizing: border-box;
8561
8565
  width: 100%;
@@ -8570,38 +8574,38 @@ const Kr = {
8570
8574
  outline: none;
8571
8575
  transition: background-color 140ms ease, box-shadow 140ms ease;
8572
8576
  }
8573
- .${Re}[data-divider="true"] {
8577
+ .${Ie}[data-divider="true"] {
8574
8578
  border-bottom: 1px solid var(--sa-border-subtle, #0b120e24);
8575
8579
  }
8576
8580
  /* The first row also gets a top line so the list is bounded on its own,
8577
8581
  without relying on a wrapping container's border. Adjacent rows still
8578
8582
  share a single 1px line (only border-bottom), never a doubled 2px one. */
8579
- .${Re}[data-divider="true"]:first-child {
8583
+ .${Ie}[data-divider="true"]:first-child {
8580
8584
  border-top: 1px solid var(--sa-border-subtle, #0b120e24);
8581
8585
  }
8582
- .${Re}:hover {
8586
+ .${Ie}:hover {
8583
8587
  background: var(--sa-background-neutral, #f0f1f2);
8584
8588
  }
8585
- .${Re}:focus-visible,
8586
- .${Re}[data-active="true"] {
8589
+ .${Ie}:focus-visible,
8590
+ .${Ie}[data-active="true"] {
8587
8591
  background: var(--sa-background-brand-subtlest, #e6edf6);
8588
8592
  }
8589
- .${Re}:focus-visible {
8593
+ .${Ie}:focus-visible {
8590
8594
  background: var(--sa-background-neutral, #f0f1f2);
8591
8595
  }
8592
8596
  /* Accent bar — sign of the offset picks the edge it hugs. */
8593
- .${Re}[data-accent="left"]:focus-visible,
8594
- .${Re}[data-accent="left"][data-active="true"] {
8597
+ .${Ie}[data-accent="left"]:focus-visible,
8598
+ .${Ie}[data-accent="left"][data-active="true"] {
8595
8599
  box-shadow: ${ul};
8596
8600
  }
8597
- .${Re}[data-accent="right"]:focus-visible,
8598
- .${Re}[data-accent="right"][data-active="true"] {
8601
+ .${Ie}[data-accent="right"]:focus-visible,
8602
+ .${Ie}[data-accent="right"][data-active="true"] {
8599
8603
  box-shadow: ${hl};
8600
8604
  }
8601
- .${Re}[data-active="true"]:hover {
8605
+ .${Ie}[data-active="true"]:hover {
8602
8606
  background: var(--sa-background-brand-subtlest, #e6edf6);
8603
8607
  }
8604
- .${Re}:disabled {
8608
+ .${Ie}:disabled {
8605
8609
  cursor: not-allowed;
8606
8610
  opacity: 0.55;
8607
8611
  }
@@ -8620,8 +8624,8 @@ const Pc = ({
8620
8624
  heading: l,
8621
8625
  meta: s,
8622
8626
  children: c,
8623
- divider: d = !0,
8624
- disabled: a,
8627
+ divider: a = !0,
8628
+ disabled: d,
8625
8629
  className: m,
8626
8630
  style: p,
8627
8631
  "aria-label": g
@@ -8629,13 +8633,13 @@ const Pc = ({
8629
8633
  "button",
8630
8634
  {
8631
8635
  type: "button",
8632
- className: [Re, m].filter(Boolean).join(" "),
8636
+ className: [Ie, m].filter(Boolean).join(" "),
8633
8637
  "data-active": t ? "true" : "false",
8634
8638
  "data-accent": r,
8635
- "data-divider": d ? "true" : "false",
8639
+ "data-divider": a ? "true" : "false",
8636
8640
  "aria-current": t ? "true" : void 0,
8637
8641
  "aria-label": g,
8638
- disabled: a,
8642
+ disabled: d,
8639
8643
  onClick: n,
8640
8644
  style: p,
8641
8645
  children: c ?? /* @__PURE__ */ u(
@@ -8704,8 +8708,8 @@ const Pc = ({
8704
8708
  width: l = 337,
8705
8709
  side: s = "left",
8706
8710
  offsetTop: c = "4rem",
8707
- height: d,
8708
- showToggle: a = !0,
8711
+ height: a,
8712
+ showToggle: d = !0,
8709
8713
  togglePosition: m = "top",
8710
8714
  toggleOffset: p = 40,
8711
8715
  toggleLabel: g,
@@ -8717,10 +8721,10 @@ const Pc = ({
8717
8721
  wrapperProps: z,
8718
8722
  contentProps: w
8719
8723
  }) => {
8720
- const C = De("md"), H = n !== void 0, [A, v] = R(o), S = H ? n : A, $ = () => {
8724
+ const C = De("md"), H = n !== void 0, [A, v] = I(o), S = H ? n : A, $ = () => {
8721
8725
  const he = !S;
8722
8726
  H || v(he), i == null || i(he);
8723
- }, O = s === "left", j = typeof c == "number" ? `${c}px` : c, G = d !== void 0 ? typeof d == "number" ? `${d}px` : d : `calc(100vh - ${j})`, ne = g ?? { collapse: "Collapse panel", expand: "Expand panel" }, ge = m === "center" ? { top: "50%", transform: "translateY(-50%)" } : m === "bottom" ? { bottom: p } : { top: p }, ie = S ? O ? "ChevronRight" : "ChevronLeft" : O ? "ChevronLeft" : "ChevronRight", le = k !== void 0 && (L === "mobile" ? !C : L), J = le ? {
8727
+ }, O = s === "left", j = typeof c == "number" ? `${c}px` : c, G = a !== void 0 ? typeof a == "number" ? `${a}px` : a : `calc(100vh - ${j})`, ne = g ?? { collapse: "Collapse panel", expand: "Expand panel" }, ge = m === "center" ? { top: "50%", transform: "translateY(-50%)" } : m === "bottom" ? { bottom: p } : { top: p }, ie = S ? O ? "ChevronRight" : "ChevronLeft" : O ? "ChevronLeft" : "ChevronRight", le = k !== void 0 && (L === "mobile" ? !C : L), J = le ? {
8724
8728
  position: "absolute",
8725
8729
  top: 0,
8726
8730
  bottom: 0,
@@ -8784,7 +8788,7 @@ const Pc = ({
8784
8788
  )
8785
8789
  }
8786
8790
  ),
8787
- a && /* @__PURE__ */ e(
8791
+ d && /* @__PURE__ */ e(
8788
8792
  Nt,
8789
8793
  {
8790
8794
  display: "inline-flex",
@@ -9112,13 +9116,13 @@ const Jc = ({
9112
9116
  leftIcon: l,
9113
9117
  showButton: s = !0,
9114
9118
  customHeight: c,
9115
- childrenButton: d,
9116
- customIcon: a
9119
+ childrenButton: a,
9120
+ customIcon: d
9117
9121
  }) => {
9118
9122
  const m = () => {
9119
9123
  switch (o) {
9120
9124
  case "primary":
9121
- return /* @__PURE__ */ e(oe, { children: l ? /* @__PURE__ */ e(T, { primary: !0, iconLeft: l, onClick: n, children: d || t }) : /* @__PURE__ */ e(T, { primary: !0, onClick: n, children: d || t }) });
9125
+ return /* @__PURE__ */ e(oe, { children: l ? /* @__PURE__ */ e(T, { primary: !0, iconLeft: l, onClick: n, children: a || t }) : /* @__PURE__ */ e(T, { primary: !0, onClick: n, children: a || t }) });
9122
9126
  case "secondary":
9123
9127
  return /* @__PURE__ */ e(oe, { children: l ? /* @__PURE__ */ e(T, { secondary: !0, iconLeft: l, onClick: n, children: i ? /* @__PURE__ */ e(
9124
9128
  D,
@@ -9127,13 +9131,13 @@ const Jc = ({
9127
9131
  fontSize: "md",
9128
9132
  fontWeight: "medium",
9129
9133
  style: { color: "var(--sa-background-success, #28ac6e)" },
9130
- children: d || t
9134
+ children: a || t
9131
9135
  }
9132
- ) : t }) : /* @__PURE__ */ e(T, { secondary: !0, onClick: n, children: d || t }) });
9136
+ ) : t }) : /* @__PURE__ */ e(T, { secondary: !0, onClick: n, children: a || t }) });
9133
9137
  case "success":
9134
- return /* @__PURE__ */ e(oe, { children: l ? /* @__PURE__ */ e(T, { success: !0, iconLeft: l, onClick: n, children: d || t }) : /* @__PURE__ */ e(T, { success: !0, onClick: n, children: d || t }) });
9138
+ return /* @__PURE__ */ e(oe, { children: l ? /* @__PURE__ */ e(T, { success: !0, iconLeft: l, onClick: n, children: a || t }) : /* @__PURE__ */ e(T, { success: !0, onClick: n, children: a || t }) });
9135
9139
  default:
9136
- return /* @__PURE__ */ e(oe, { children: l ? /* @__PURE__ */ e(T, { primary: !0, iconLeft: l, onClick: n, children: d || t }) : /* @__PURE__ */ e(T, { primary: !0, onClick: n, children: d || t }) });
9140
+ return /* @__PURE__ */ e(oe, { children: l ? /* @__PURE__ */ e(T, { primary: !0, iconLeft: l, onClick: n, children: a || t }) : /* @__PURE__ */ e(T, { primary: !0, onClick: n, children: a || t }) });
9137
9141
  }
9138
9142
  };
9139
9143
  return /* @__PURE__ */ u(
@@ -9148,7 +9152,7 @@ const Jc = ({
9148
9152
  marginBlock: "auto",
9149
9153
  customHeight: c,
9150
9154
  children: [
9151
- a || /* @__PURE__ */ e(bl, {}),
9155
+ d || /* @__PURE__ */ e(bl, {}),
9152
9156
  /* @__PURE__ */ e(f, { direction: "column", children: r.map((p, g) => /* @__PURE__ */ e(
9153
9157
  Je.Body1,
9154
9158
  {
@@ -10471,8 +10475,8 @@ const Kc = (t) => {
10471
10475
  paddingBlock: l = "spacing-0",
10472
10476
  header: s,
10473
10477
  footer: c,
10474
- title: d,
10475
- titleTag: a,
10478
+ title: a,
10479
+ titleTag: d,
10476
10480
  action: m,
10477
10481
  actionContainer: p,
10478
10482
  containerProps: g,
@@ -10481,7 +10485,7 @@ const Kc = (t) => {
10481
10485
  footerProps: y = { borderTop: !0 },
10482
10486
  variantTag: k = "info"
10483
10487
  }) => {
10484
- const L = ae(null), [z, w] = R("100vh");
10488
+ const L = ae(null), [z, w] = I("100vh");
10485
10489
  U(() => {
10486
10490
  const v = () => {
10487
10491
  if (L.current) {
@@ -10491,10 +10495,10 @@ const Kc = (t) => {
10491
10495
  };
10492
10496
  return v(), window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
10493
10497
  }, []);
10494
- const C = () => a ? /* @__PURE__ */ u(f, { direction: "row", gap: "sm", align: "center", children: [
10495
- /* @__PURE__ */ e(D, { fontWeight: "medium", children: d }),
10496
- /* @__PURE__ */ e(pt, { border: !0, text: a, variant: k })
10497
- ] }) : /* @__PURE__ */ e(D, { fontWeight: "medium", children: d }), H = () => s || /* @__PURE__ */ u(
10498
+ const C = () => d ? /* @__PURE__ */ u(f, { direction: "row", gap: "sm", align: "center", children: [
10499
+ /* @__PURE__ */ e(D, { fontWeight: "medium", children: a }),
10500
+ /* @__PURE__ */ e(pt, { border: !0, text: d, variant: k })
10501
+ ] }) : /* @__PURE__ */ e(D, { fontWeight: "medium", children: a }), H = () => s || /* @__PURE__ */ u(
10498
10502
  f,
10499
10503
  {
10500
10504
  direction: "row",
@@ -10502,11 +10506,11 @@ const Kc = (t) => {
10502
10506
  align: "flex-start",
10503
10507
  gap: "md",
10504
10508
  children: [
10505
- /* @__PURE__ */ e(f, { direction: "column", children: d ? C() : null }),
10509
+ /* @__PURE__ */ e(f, { direction: "column", children: a ? C() : null }),
10506
10510
  /* @__PURE__ */ e(f, { direction: "column", ...p, children: m ?? null })
10507
10511
  ]
10508
10512
  }
10509
- ), A = !!(s || d || m);
10513
+ ), A = !!(s || a || m);
10510
10514
  return /* @__PURE__ */ u(
10511
10515
  f,
10512
10516
  {
@@ -10549,18 +10553,18 @@ const Kc = (t) => {
10549
10553
  ), ts = et.memo(
10550
10554
  ({ value: t, options: r = [], onChange: n, multiple: o }) => {
10551
10555
  const i = (t == null ? void 0 : t.map((c) => c.value)) || [], l = (r == null ? void 0 : r.filter((c) => i.includes(c.value))) || [], s = (c) => {
10552
- const d = [...l];
10553
- let a = [];
10554
- o ? a = i.includes(c.value) ? d.filter((m) => m.value !== c.value) : [...d, c] : a = [c], n == null || n(a);
10556
+ const a = [...l];
10557
+ let d = [];
10558
+ o ? d = i.includes(c.value) ? a.filter((m) => m.value !== c.value) : [...a, c] : d = [c], n == null || n(d);
10555
10559
  };
10556
- return /* @__PURE__ */ e(f, { direction: "row", gap: "sm", flexWrap: "wrap", children: r == null ? void 0 : r.map((c, d) => /* @__PURE__ */ e(
10560
+ return /* @__PURE__ */ e(f, { direction: "row", gap: "sm", flexWrap: "wrap", children: r == null ? void 0 : r.map((c, a) => /* @__PURE__ */ e(
10557
10561
  T,
10558
10562
  {
10559
10563
  ...i.includes(c.value) ? { primary: !0 } : { secondary: !0 },
10560
10564
  onClick: () => s(c),
10561
10565
  children: c.label
10562
10566
  },
10563
- d
10567
+ a
10564
10568
  )) });
10565
10569
  }
10566
10570
  );
@@ -10674,13 +10678,13 @@ function Fl(t) {
10674
10678
  onViewModeChange: l,
10675
10679
  showViewModeToggle: s = !0,
10676
10680
  showCloseButton: c = !0,
10677
- size: d,
10678
- asideWidth: a,
10681
+ size: a,
10682
+ asideWidth: d,
10679
10683
  disableEscapeClose: m = !1,
10680
10684
  disableBackdropClose: p = !1,
10681
10685
  lockBodyScroll: g = !0,
10682
10686
  children: x
10683
- } = t, [W, y] = R(i), k = o ?? W, z = De("md") ? k : "fullscreen", w = K(
10687
+ } = t, [W, y] = I(i), k = o ?? W, z = De("md") ? k : "fullscreen", w = K(
10684
10688
  (G) => {
10685
10689
  o === void 0 && y(G), l == null || l(G);
10686
10690
  },
@@ -10718,8 +10722,8 @@ function Fl(t) {
10718
10722
  z === "fullscreen" && Se["lyd-fullscreen"],
10719
10723
  z === "sidebar" && Se["lyd-sidebar"]
10720
10724
  ].filter(Boolean).join(" "), O = {
10721
- "--lyd-max-w": Sl(d),
10722
- ...a !== void 0 && { "--lyd-aside-w": a }
10725
+ "--lyd-max-w": Sl(a),
10726
+ ...d !== void 0 && { "--lyd-aside-w": d }
10723
10727
  }, j = () => {
10724
10728
  p || n();
10725
10729
  };
@@ -10873,10 +10877,10 @@ const ns = (t) => {
10873
10877
  const { defaultTab: r = 0, paramKey: n = "tab" } = t || {}, [o, i] = Tt(), l = Ht(o.toString());
10874
10878
  return {
10875
10879
  activeTab: l[n] ? parseInt(l[n]) : r,
10876
- handleTabChange: (d) => {
10880
+ handleTabChange: (a) => {
10877
10881
  i({
10878
10882
  ...l,
10879
- [n]: d.toString()
10883
+ [n]: a.toString()
10880
10884
  });
10881
10885
  },
10882
10886
  searchQueries: l
@@ -10890,16 +10894,16 @@ function is({
10890
10894
  const o = bt();
10891
10895
  U(() => {
10892
10896
  let i = null, l = null;
10893
- for (const d of r) {
10894
- const a = d.items.find((m) => m.to ? m.to === "/" ? o.pathname === "/" : !!(m.to === o.pathname || o.pathname.startsWith(m.to + "/")) : !1);
10895
- if (a) {
10896
- i = a, l = d;
10897
+ for (const a of r) {
10898
+ const d = a.items.find((m) => m.to ? m.to === "/" ? o.pathname === "/" : !!(m.to === o.pathname || o.pathname.startsWith(m.to + "/")) : !1);
10899
+ if (d) {
10900
+ i = d, l = a;
10897
10901
  break;
10898
10902
  }
10899
10903
  }
10900
10904
  const s = [];
10901
10905
  i != null && i.title && s.push(i.title), l != null && l.name && s.push(l.name.toTitleCase());
10902
- const c = (d, a) => d.length > 0 ? `${d.join(" - ")} | ${a}` : a;
10906
+ const c = (a, d) => a.length > 0 ? `${a.join(" - ")} | ${d}` : d;
10903
10907
  document.title = (n || c)(s, t);
10904
10908
  }, [o.pathname]);
10905
10909
  }
@@ -10926,8 +10930,8 @@ function ls(t) {
10926
10930
  var o, i;
10927
10931
  const r = t.decodedAccessToken;
10928
10932
  return pe(() => {
10929
- var d, a;
10930
- const l = ((a = (d = r == null ? void 0 : r.access) == null ? void 0 : d.role) == null ? void 0 : a.code) ?? "", s = Object.keys(t.role).reduce(
10933
+ var a, d;
10934
+ const l = ((d = (a = r == null ? void 0 : r.access) == null ? void 0 : a.role) == null ? void 0 : d.code) ?? "", s = Object.keys(t.role).reduce(
10931
10935
  (m, p) => {
10932
10936
  const g = `is${p.toLowerCase().replace(/(^\w|_\w)/g, (x) => x.replace("_", "").toUpperCase())}`;
10933
10937
  return { ...m, [g]: !1 };
@@ -10956,7 +10960,7 @@ export {
10956
10960
  Gc as AsideBar,
10957
10961
  ac as BackButton,
10958
10962
  Eo as ColumnFilterDropdown,
10959
- Io as ColumnMenu,
10963
+ Ro as ColumnMenu,
10960
10964
  Kc as ConfirmationDialog,
10961
10965
  Wo as DataTable,
10962
10966
  ce as DecisionWrapper,
@@ -11026,7 +11030,7 @@ export {
11026
11030
  $c as handleOnScroll,
11027
11031
  Vc as isEmail,
11028
11032
  pc as isFilterActive,
11029
- Ic as isOnlyLettersAndSpaces,
11033
+ Rc as isOnlyLettersAndSpaces,
11030
11034
  Ac as isPhoneNumber,
11031
11035
  Tc as isSlug,
11032
11036
  bn as localStorageAdapter,
@@ -11034,10 +11038,10 @@ export {
11034
11038
  Sc as parseIndonesianDateToDate,
11035
11039
  Nc as preventNonCoordinateInput,
11036
11040
  Oc as preventNonNumberAndDecimalInput,
11037
- Rc as preventNonNumberInput,
11041
+ Ic as preventNonNumberInput,
11038
11042
  Hc as preventNumberInput,
11039
- Ii as resolveDateRangeValueToString,
11040
- Ri as resolveDateValueToString,
11043
+ Ri as resolveDateRangeValueToString,
11044
+ Ii as resolveDateValueToString,
11041
11045
  zi as resolveDropdownValueToString,
11042
11046
  Ai as resolveRadioValueToString,
11043
11047
  Qt as resolveSidebarBadge,