@framework-m/desk 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
5
5
  import E from "ajv";
6
6
  import { JSONSchemaBridge as D } from "uniforms-bridge-json-schema";
7
7
  import { BaseForm as O, connectField as k, filterDOMProps as A, useForm as j } from "uniforms";
8
- import { Avatar as M, Button as N, Card as P, DatePicker as F, Drawer as I, Heading as L, Icon as R, Input as z, LocaleSwitcher as B, MProvider as V, MStack as H, MText as U, Modal as ee, Paragraph as W, Popover as te, Select as G, Separator as ne, Skeleton as K, ThemeProvider as re, XStack as q, YStack as J, useTheme as Y } from "@framework-m/ui";
8
+ import { Avatar as M, Button as N, Card as P, DatePicker as F, Drawer as I, Heading as L, Icon as R, Input as z, LocaleSwitcher as B, MProvider as V, MStack as H, MText as U, Modal as ee, Paragraph as W, Popover as te, Select as ne, Separator as G, Skeleton as K, ThemeProvider as re, XStack as q, YStack as J, useTheme as Y } from "@framework-m/ui";
9
9
  import { Authenticated as ie, QS_PARSE_DEPTH as ae, Refine as oe, ResourceContext as se, matchResourceFromRoute as ce, useBreadcrumb as le, useCreate as ue, useDelete as de, useDeleteMany as fe, useGetIdentity as pe, useGo as me, useInvalidate as he, useList as ge, useLogin as _e, useLogout as ve, useMenu as ye, useOne as be, useUpdate as xe, useUpdateMany as Se } from "@refinedev/core";
10
10
  import { Link as Ce, NavLink as X, Navigate as we, Outlet as Te, Route as Z, RouterProvider as Ee, Routes as De, createBrowserRouter as Oe, matchPath as ke, useBlocker as Ae, useLocation as je, useNavigate as Me, useParams as Ne, useSearchParams as Pe } from "react-router";
11
11
  import { I18nextProvider as Fe, initReactI18next as Ie, useTranslation as Le } from "react-i18next";
@@ -913,32 +913,67 @@ function en({ doctype: e, id: t } = {}) {
913
913
  resource: r,
914
914
  id: i ?? "",
915
915
  queryOptions: { enabled: l }
916
- }), d = ue(), f = xe(), { state: m } = Qt(r, i, { enabled: l }), [_, y] = v({}), [b, x] = v([]), [S] = v([]), [C, w] = v(null);
916
+ }), d = ue(), f = xe(), { state: m } = Qt(r, i, { enabled: l }), [y] = Pe(), b = y.get("form"), x = _(b), S = _(i), C = _(r), [w, T] = v(() => {
917
+ if (!l && b) try {
918
+ return JSON.parse(b);
919
+ } catch (e) {
920
+ console.error("Failed to parse form query parameter:", e);
921
+ }
922
+ return {};
923
+ }), [E, D] = v([]), [O] = v([]), [k, A] = v(null);
917
924
  h(() => {
918
- y({}), x([]), w(null);
919
- }, [i, r]);
920
- let T = u?.result ?? u?.query?.data?.data, E = Object.keys(_).length > 0 || !u?.query?.isSuccess ? _ : T ?? {}, D = d.mutation.isPending || f.mutation.isPending, O = Number(E.docstatus), k = O === 1 || O === 2, A = Me(), j = $t("resolveListRoute"), M = p(async (e) => {
925
+ let e = S.current !== i || C.current !== r, t = b !== x.current;
926
+ if (e || t) {
927
+ S.current = i, C.current = r, x.current = b;
928
+ let e = {};
929
+ if (!l && b) try {
930
+ e = JSON.parse(b);
931
+ } catch (e) {
932
+ console.error("Failed to parse form query parameter:", e);
933
+ }
934
+ T(e), D([]), A(null);
935
+ }
936
+ }, [
937
+ i,
938
+ r,
939
+ l,
940
+ b
941
+ ]);
942
+ let j = u?.result ?? u?.query?.data?.data, M = Object.keys(w).length > 0 || !u?.query?.isSuccess ? w : j ?? {}, N = d.mutation.isPending || f.mutation.isPending, P = Number(M.docstatus), F = P === 1 || P === 2, I = Me(), L = $t("resolveListRoute"), R = $t("resolveEditRoute"), z = $t("resolveDetailRoute"), B = p(async (e) => {
921
943
  try {
922
- let { _is_new: t, ...n } = E || {}, a = {
923
- onSuccess: () => {
924
- y({});
925
- let t = i === "singleton" || c?.is_singleton;
926
- if (!e?.preventNavigation && !t) {
944
+ let { _is_new: t, ...n } = M || {}, a = {
945
+ onSuccess: (t) => {
946
+ T({});
947
+ let n = i === "singleton" || c?.is_singleton;
948
+ if (!l && !n) {
949
+ let n = t, i = n?.data?.id ?? n?.id;
950
+ if (i && e?.preventNavigation) {
951
+ let e = R ? R(r, i) : z ? z(r, i) : null;
952
+ I(typeof e == "string" ? e : `/app/${r}/edit/${i}`, { replace: !0 });
953
+ } else {
954
+ if (typeof window < "u" && window.location.hash === "#_editing") {
955
+ let e = window.location.pathname + window.location.search;
956
+ window.history.replaceState(null, "", e);
957
+ }
958
+ let e = L ? L(r) : null;
959
+ I(typeof e == "string" ? e : `/app/${r}/list`);
960
+ }
961
+ } else if (!e?.preventNavigation && !n) {
927
962
  if (typeof window < "u" && window.location.hash === "#_editing") {
928
963
  let e = window.location.pathname + window.location.search;
929
964
  window.history.replaceState(null, "", e);
930
965
  }
931
- let e = j ? j(r) : null;
932
- A(typeof e == "string" ? e : `/app/${r}/list`);
966
+ let e = L ? L(r) : null;
967
+ I(typeof e == "string" ? e : `/app/${r}/list`);
933
968
  }
934
969
  },
935
970
  onError: (e) => {
936
971
  let t = e?.validation_errors || e?.response?.data?.validation_errors || e?.response?.validation_errors;
937
- t && typeof t == "object" ? (w({ details: Object.entries(t).map(([e, t]) => ({
972
+ t && typeof t == "object" ? (A({ details: Object.entries(t).map(([e, t]) => ({
938
973
  dataPath: e === "base" ? "" : `.${e}`,
939
974
  message: String(t),
940
975
  keyword: "custom"
941
- })) }), x([])) : (w(null), x([e?.message || "An error occurred during save."]));
976
+ })) }), D([])) : (A(null), D([e?.message || "An error occurred during save."]));
942
977
  }
943
978
  };
944
979
  l ? f.mutate({
@@ -950,77 +985,77 @@ function en({ doctype: e, id: t } = {}) {
950
985
  values: n
951
986
  }, a);
952
987
  } catch (e) {
953
- x([e.message]);
988
+ D([e.message]);
954
989
  }
955
990
  }, [
956
991
  r,
957
992
  i,
958
993
  l,
959
- E,
960
- A,
961
- j,
994
+ M,
995
+ I,
996
+ L,
962
997
  f,
963
998
  d,
964
999
  c?.is_singleton
965
- ]), N = p(() => {
1000
+ ]), V = p(() => {
966
1001
  if (typeof window < "u" && window.location.hash === "#_editing") {
967
1002
  let e = window.location.pathname + window.location.search;
968
1003
  window.history.replaceState(null, "", e);
969
1004
  }
970
1005
  if (i === "singleton" || c?.is_singleton) {
971
- A("/app/dashboard");
1006
+ I("/app/dashboard");
972
1007
  return;
973
1008
  }
974
- let e = j ? j(r) : null;
975
- A(typeof e == "string" ? e : `/app/${r}/list`);
1009
+ let e = L ? L(r) : null;
1010
+ I(typeof e == "string" ? e : `/app/${r}/list`);
976
1011
  }, [
977
- A,
1012
+ I,
978
1013
  r,
979
- j,
1014
+ L,
980
1015
  i,
981
1016
  c?.is_singleton
982
- ]), P = p(async () => {
1017
+ ]), H = p(async () => {
983
1018
  await u?.query?.refetch?.();
984
1019
  }, [u]);
985
1020
  return {
986
1021
  doctype: r,
987
1022
  id: i,
988
1023
  frm: g(() => ({
989
- doc: E,
1024
+ doc: M,
990
1025
  setDoc: (e) => {
991
- y(typeof e == "function" ? (t) => e(t) : (t) => ({
1026
+ T(typeof e == "function" ? (t) => e(t) : (t) => ({
992
1027
  ...t,
993
1028
  ...e
994
- })), x([]), w(null);
1029
+ })), D([]), A(null);
995
1030
  },
996
- save: M,
997
- cancel: N,
1031
+ save: B,
1032
+ cancel: V,
998
1033
  isEditing: l,
999
- isSaving: D,
1000
- isLocked: k,
1001
- errors: b,
1002
- validationError: C,
1003
- notices: S,
1034
+ isSaving: N,
1035
+ isLocked: F,
1036
+ errors: E,
1037
+ validationError: k,
1038
+ notices: O,
1004
1039
  workflow: m,
1005
- refetch: P
1040
+ refetch: H
1006
1041
  }), [
1007
- E,
1008
1042
  M,
1009
- N,
1043
+ B,
1044
+ V,
1010
1045
  l,
1011
- D,
1046
+ N,
1047
+ F,
1048
+ E,
1012
1049
  k,
1013
- b,
1014
- C,
1015
- S,
1050
+ O,
1016
1051
  m,
1017
- P
1052
+ H
1018
1053
  ]),
1019
1054
  schema: a,
1020
1055
  metaLoading: o || l && u?.query?.isLoading,
1021
1056
  metaError: s,
1022
1057
  docError: u?.query?.error,
1023
- record: T
1058
+ record: j
1024
1059
  };
1025
1060
  }
1026
1061
  //#endregion
@@ -1754,7 +1789,7 @@ function En({ meta: e, uiMeta: t, frm: n, id: r }) {
1754
1789
  collapsible: t.collapsible,
1755
1790
  defaultCollapsed: t.collapsed_by_default,
1756
1791
  columns: t.columns ?? 1,
1757
- children: /* @__PURE__ */ w(Qn, {
1792
+ children: /* @__PURE__ */ w($n, {
1758
1793
  schema: a,
1759
1794
  formData: n.doc,
1760
1795
  onChange: (e) => n.setDoc(e),
@@ -1775,7 +1810,7 @@ function En({ meta: e, uiMeta: t, frm: n, id: r }) {
1775
1810
  collapsible: t.collapsible,
1776
1811
  defaultCollapsed: t.collapsed_by_default,
1777
1812
  columns: t.columns ?? 1,
1778
- children: /* @__PURE__ */ w(Qn, {
1813
+ children: /* @__PURE__ */ w($n, {
1779
1814
  schema: a,
1780
1815
  formData: n.doc,
1781
1816
  onChange: (e) => n.setDoc(e),
@@ -1786,7 +1821,7 @@ function En({ meta: e, uiMeta: t, frm: n, id: r }) {
1786
1821
  }, `${r}-${t.label}-${i}`)
1787
1822
  }, t.label || i);
1788
1823
  })
1789
- }) : /* @__PURE__ */ w(Qn, {
1824
+ }) : /* @__PURE__ */ w($n, {
1790
1825
  schema: Tn(e),
1791
1826
  formData: n.doc,
1792
1827
  onChange: (e) => n.setDoc(e),
@@ -1900,77 +1935,96 @@ var On = (e) => {
1900
1935
  ]), F = g(() => {
1901
1936
  let t = e?.link_filters || b?.link_filters || b?.ui_meta?.link_filters;
1902
1937
  return typeof t == "object" && t ? t : null;
1903
- }, [e, b]), [L, B] = v(i ?? ""), V = _(null);
1904
- h(() => {
1905
- i == null ? B("") : i !== V.current && B(String(i));
1906
- }, [i]);
1907
- let [H, ee] = v([]), [te, G] = v(!1), [ne, K] = v(!1), [re, Y] = v(!1), ie = _(null), ae = _(O), oe = Nt(L, 300), se = Mt(), ce = me(), [le, ue] = v(!1), de = p(async (e) => {
1938
+ }, [e, b]), L = Mt(), B = me(), [V, H] = v(!1), [ee, te] = v(""), [ne, G] = v(""), K = _(null), re = p(async (e) => {
1908
1939
  if (e && (e.preventDefault(), e.stopPropagation()), !(!i || !O)) {
1909
- ue(!0);
1940
+ H(!0);
1910
1941
  try {
1911
- let e = await se(`${rt}/${O}/${i}`, { credentials: "include" });
1942
+ let e = await L(`${rt}/${O}/${i}`, { credentials: "include" });
1912
1943
  if (e.ok) {
1913
1944
  let t = await e.json();
1914
- B(t?.title || t?.name || t?.id || String(i)), V.current = i;
1945
+ G(t?.title || t?.name || t?.id || String(i)), K.current = i;
1915
1946
  }
1916
- } catch {} finally {
1917
- ue(!1);
1947
+ } catch {
1948
+ G(String(i));
1949
+ } finally {
1950
+ H(!1);
1918
1951
  }
1919
1952
  }
1920
1953
  }, [
1921
1954
  i,
1922
1955
  O,
1923
- se
1924
- ]), fe = p(async (e) => {
1956
+ L
1957
+ ]);
1958
+ h(() => {
1959
+ i && O ? i !== K.current && (te(""), G(""), V || re()) : i || (te(""), G(""), K.current = null);
1960
+ }, [
1961
+ i,
1962
+ O,
1963
+ re,
1964
+ V
1965
+ ]), h(() => {
1966
+ i && O && !V && !K.current && re();
1967
+ }, [
1968
+ i,
1969
+ O,
1970
+ V,
1971
+ re
1972
+ ]);
1973
+ let Y = g(() => ee || ne || (i && !V ? String(i) : ""), [
1974
+ ee,
1975
+ ne,
1976
+ i,
1977
+ V
1978
+ ]), [ie, ae] = v([]), [oe, se] = v(!1), [ce, le] = v(!1), [ue, de] = v(!1), fe = _(null), pe = _(O), he = Nt(ee, 300), ge = p(async (e) => {
1925
1979
  if (!O) {
1926
- ee([]);
1980
+ ae([]);
1927
1981
  return;
1928
1982
  }
1929
- K(!0);
1983
+ le(!0);
1930
1984
  try {
1931
1985
  let t = new URLSearchParams();
1932
1986
  e && t.set("q", e), t.set("limit", "10"), F && Object.entries(F).forEach(([e, n]) => {
1933
1987
  t.append(e, String(n));
1934
1988
  });
1935
- let n = await se(`${rt}/${O}?${t}`, { credentials: "include" });
1989
+ let n = await L(`${rt}/${O}?${t}`, { credentials: "include" });
1936
1990
  if (n.ok) {
1937
1991
  let e = await n.json(), t = e?.data || e?.items || e;
1938
- ee((Array.isArray(t) ? t : []).map((e) => ({
1992
+ ae((Array.isArray(t) ? t : []).map((e) => ({
1939
1993
  value: String(e.id),
1940
1994
  label: e.title || e.name || e.id
1941
1995
  })));
1942
1996
  }
1943
1997
  } catch {
1944
- ee([]);
1998
+ ae([]);
1945
1999
  } finally {
1946
- K(!1);
2000
+ le(!1);
1947
2001
  }
1948
2002
  }, [O]);
1949
2003
  h(() => {
1950
- te && fe(oe);
2004
+ oe && ge(he);
1951
2005
  }, [
2006
+ he,
1952
2007
  oe,
1953
- te,
1954
- fe
2008
+ ge
1955
2009
  ]), h(() => {
1956
2010
  if (typeof window > "u") return;
1957
2011
  function e(e) {
1958
- !ie.current || !(ie.current instanceof Element) || ie.current && !ie.current.contains(e.target) && G(!1);
2012
+ !fe.current || !(fe.current instanceof Element) || fe.current && !fe.current.contains(e.target) && se(!1);
1959
2013
  }
1960
2014
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1961
2015
  }, []), h(() => {
1962
- let e = ae.current;
1963
- e && e !== O && i && (o(void 0), B(""), ee([]), G(!1)), ae.current = O;
2016
+ let e = pe.current;
2017
+ e && e !== O && i && (o(void 0), te(""), ae([]), se(!1)), pe.current = O;
1964
2018
  }, [
1965
2019
  O,
1966
2020
  o,
1967
2021
  i
1968
2022
  ]);
1969
- let pe = (e) => {
1970
- V.current = e.value, B(e.label), o(e.value), G(!1);
1971
- }, he = p((e, t) => {
1972
- V.current = e, B(t), o(e), Y(!1);
1973
- }, [o]);
2023
+ let _e = (e) => {
2024
+ K.current = e.value, te(e.label), G(e.label), o(e.value), se(!1);
2025
+ }, ve = p((e, t) => {
2026
+ K.current = e, te(t), G(t), o(e), de(!1);
2027
+ }, [o]), ye = a || D && !O;
1974
2028
  return /* @__PURE__ */ T(J, {
1975
2029
  gap: "$1",
1976
2030
  marginBottom: m ? 0 : "$3",
@@ -2004,17 +2058,17 @@ var On = (e) => {
2004
2058
  children: [
2005
2059
  /* @__PURE__ */ w(z, {
2006
2060
  id: n,
2007
- value: L,
2008
- disabled: a || D && !O,
2061
+ value: Y,
2062
+ disabled: ye,
2009
2063
  placeholder: k,
2010
2064
  onChangeText: (e) => {
2011
- B(e), !(D && !O) && (G(!0), e || o(void 0));
2065
+ te(e), G(""), !(D && !O) && (se(!0), e || o(void 0));
2012
2066
  },
2013
2067
  onFocus: () => {
2014
- D && !O || (G(!0), fe(L));
2068
+ D && !O || (se(!0), ge(ee));
2015
2069
  },
2016
2070
  flex: 1,
2017
- error: !!u,
2071
+ error: !!u || V && !i,
2018
2072
  paddingRight: i ? 88 : 35,
2019
2073
  size: m ? "sm" : "md",
2020
2074
  backgroundColor: m ? "transparent" : "$background",
@@ -2059,13 +2113,13 @@ var On = (e) => {
2059
2113
  padding: 0,
2060
2114
  width: 24,
2061
2115
  height: 24,
2062
- onPress: de,
2063
- disabled: le,
2116
+ onPress: re,
2117
+ disabled: V || ye,
2064
2118
  title: "Fetch record name",
2065
2119
  children: /* @__PURE__ */ w(R, {
2066
2120
  name: "refresh-cw",
2067
2121
  size: 14,
2068
- color: le ? "$primary" : "$colorMuted"
2122
+ color: V ? "$primary" : "$colorMuted"
2069
2123
  })
2070
2124
  }),
2071
2125
  !a && /* @__PURE__ */ w(N, {
@@ -2076,7 +2130,7 @@ var On = (e) => {
2076
2130
  width: 24,
2077
2131
  height: 24,
2078
2132
  onPress: (e) => {
2079
- e.preventDefault(), e.stopPropagation(), ce({ to: `/app/${O}/detail/${i}` });
2133
+ e.preventDefault(), e.stopPropagation(), B({ to: `/app/${O}/detail/${i}` });
2080
2134
  },
2081
2135
  title: `Open ${O}`,
2082
2136
  children: /* @__PURE__ */ w(R, {
@@ -2093,7 +2147,7 @@ var On = (e) => {
2093
2147
  width: 24,
2094
2148
  height: 24,
2095
2149
  onPress: () => {
2096
- B(""), o(void 0);
2150
+ te(""), o(void 0);
2097
2151
  },
2098
2152
  children: "✕"
2099
2153
  })
@@ -2103,7 +2157,7 @@ var On = (e) => {
2103
2157
  }), O && M && !a && !m && /* @__PURE__ */ w(N, {
2104
2158
  variant: "ghost",
2105
2159
  size: "sm",
2106
- onPress: () => Y(!0),
2160
+ onPress: () => de(!0),
2107
2161
  title: `Create new ${O}`,
2108
2162
  borderWidth: 1,
2109
2163
  borderColor: "$borderColorMuted",
@@ -2126,8 +2180,8 @@ var On = (e) => {
2126
2180
  t("first to load link options.")
2127
2181
  ]
2128
2182
  }),
2129
- te && /* @__PURE__ */ w(J, {
2130
- ref: ie,
2183
+ oe && /* @__PURE__ */ w(J, {
2184
+ ref: fe,
2131
2185
  position: "absolute",
2132
2186
  top: "100%",
2133
2187
  left: 0,
@@ -2138,16 +2192,16 @@ var On = (e) => {
2138
2192
  backgroundColor: "$background",
2139
2193
  marginTop: "$1",
2140
2194
  padding: "$2",
2141
- children: [ne ? /* @__PURE__ */ w(W, {
2195
+ children: [ce ? /* @__PURE__ */ w(W, {
2142
2196
  size: "sm",
2143
2197
  padding: "$2",
2144
2198
  children: t("Loading...")
2145
- }) : H.length === 0 ? /* @__PURE__ */ w(W, {
2199
+ }) : ie.length === 0 ? /* @__PURE__ */ w(W, {
2146
2200
  size: "sm",
2147
2201
  padding: "$2",
2148
2202
  children: t("No results found")
2149
- }) : H.map((e) => /* @__PURE__ */ w(N, {
2150
- onPress: () => pe(e),
2203
+ }) : ie.map((e) => /* @__PURE__ */ w(N, {
2204
+ onPress: () => _e(e),
2151
2205
  variant: "ghost",
2152
2206
  size: "sm",
2153
2207
  justifyContent: "flex-start",
@@ -2157,21 +2211,21 @@ var On = (e) => {
2157
2211
  children: e.label
2158
2212
  }, e.value)), /* @__PURE__ */ w(N, {
2159
2213
  size: "sm",
2160
- onPress: () => G(!1),
2214
+ onPress: () => se(!1),
2161
2215
  marginTop: "$2",
2162
2216
  children: t("Close")
2163
2217
  })]
2164
2218
  })
2165
2219
  }),
2166
2220
  O && M && /* @__PURE__ */ w(I, {
2167
- isOpen: re,
2168
- onClose: () => Y(!1),
2221
+ isOpen: ue,
2222
+ onClose: () => de(!1),
2169
2223
  title: `New ${O}`,
2170
2224
  width: 480,
2171
2225
  children: /* @__PURE__ */ w(Dn, {
2172
2226
  linkedDoctype: O,
2173
- onCreated: he,
2174
- onClose: () => Y(!1)
2227
+ onCreated: ve,
2228
+ onClose: () => de(!1)
2175
2229
  })
2176
2230
  })
2177
2231
  ]
@@ -2318,7 +2372,21 @@ k(Mn);
2318
2372
  //#endregion
2319
2373
  //#region src/components/form/fields/SelectField.tsx
2320
2374
  var Nn = (e) => {
2321
- let { id: t, label: n, onChange: r, value: i, disabled: a, error: o, showInlineError: s, placeholder: c, required: l, compact: u, options: d, allowedValues: f } = e, p = e.field ?? {}, m = Array.isArray(p.ui_meta?.options) ? p.ui_meta.options : void 0, h = g(() => m && m.length > 0 ? m.map((e) => ({
2375
+ let { id: t, label: n, onChange: r, value: i, disabled: a, error: o, showInlineError: s, placeholder: c, required: l, compact: u, options: d, allowedValues: f } = e, p = e.field ?? {}, m = p.ui_meta, _ = Mt(), y = Array.isArray(m?.options) ? m.options : void 0, [b, x] = v([]);
2376
+ h(() => {
2377
+ let e = m?.source_url;
2378
+ e && _(e).then((e) => e.json()).then((e) => {
2379
+ let t = m?.source_map?.value || "items";
2380
+ x((e?.[t] ?? []).map((e) => {
2381
+ let t = typeof e == "string" ? e : e.value || e.id || e.name || String(e), n = typeof e == "string" ? e : e.label || e.name || t;
2382
+ return {
2383
+ value: String(t),
2384
+ label: String(n)
2385
+ };
2386
+ }));
2387
+ }).catch((e) => console.warn("[SelectField] Failed to load remote options", e));
2388
+ }, [m?.source_url, m?.source_map?.value]);
2389
+ let S = g(() => b.length > 0 ? b : y && y.length > 0 ? y.map((e) => ({
2322
2390
  label: e.label || e.value,
2323
2391
  value: String(e.value)
2324
2392
  })) : d && d.length > 0 ? d.map((e) => ({
@@ -2328,10 +2396,11 @@ var Nn = (e) => {
2328
2396
  label: String(e).replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()),
2329
2397
  value: String(e)
2330
2398
  })) : [], [
2331
- m,
2399
+ b,
2400
+ y,
2332
2401
  d,
2333
2402
  f
2334
- ]), _ = c ?? p.ui_meta?.placeholder ?? "Select...";
2403
+ ]), C = c ?? p.ui_meta?.placeholder ?? "Select...";
2335
2404
  return /* @__PURE__ */ T(J, {
2336
2405
  gap: "$1",
2337
2406
  marginBottom: u ? 0 : "$2",
@@ -2350,11 +2419,11 @@ var Nn = (e) => {
2350
2419
  })
2351
2420
  ]
2352
2421
  }),
2353
- /* @__PURE__ */ w(G, {
2422
+ /* @__PURE__ */ w(ne, {
2354
2423
  id: t,
2355
2424
  value: String(i ?? ""),
2356
- options: h,
2357
- placeholder: _,
2425
+ options: S,
2426
+ placeholder: C,
2358
2427
  disabled: a,
2359
2428
  onChange: (e) => {
2360
2429
  r(typeof e == "string" ? e : e?.target?.value ?? "");
@@ -2459,7 +2528,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
2459
2528
  flex: 1,
2460
2529
  flexBasis: 0,
2461
2530
  minWidth: 120
2462
- }, [S]), G = g(() => V.reduce((e, t) => e + (I(t) === "boolean" ? 80 : 150), 160), [V, S]);
2531
+ }, [S]), ne = g(() => V.reduce((e, t) => e + (I(t) === "boolean" ? 80 : 150), 160), [V, S]);
2463
2532
  return /* @__PURE__ */ T(J, {
2464
2533
  gap: "$2",
2465
2534
  marginTop: "$4",
@@ -2505,7 +2574,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
2505
2574
  borderBottomWidth: 1,
2506
2575
  borderBottomColor: "$borderColor",
2507
2576
  minHeight: 60,
2508
- children: /* @__PURE__ */ w(Jn, {
2577
+ children: /* @__PURE__ */ w(Yn, {
2509
2578
  name: `${b}.${e}`,
2510
2579
  disabled: c
2511
2580
  })
@@ -2551,7 +2620,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
2551
2620
  backgroundColor: "$backgroundStrong",
2552
2621
  borderBottomWidth: 1,
2553
2622
  borderBottomColor: "$borderColor",
2554
- minWidth: G,
2623
+ minWidth: ne,
2555
2624
  children: [
2556
2625
  /* @__PURE__ */ w(q, {
2557
2626
  width: 40,
@@ -2615,7 +2684,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
2615
2684
  hoverStyle: { backgroundColor: "$backgroundHover" },
2616
2685
  alignItems: "center",
2617
2686
  minHeight: Vn,
2618
- minWidth: G,
2687
+ minWidth: ne,
2619
2688
  children: [
2620
2689
  /* @__PURE__ */ w(q, {
2621
2690
  width: 40,
@@ -2642,7 +2711,7 @@ var Rn = 10, zn = 14, Bn = 10, Vn = 42, Hn = (e) => {
2642
2711
  borderRightWidth: 1,
2643
2712
  borderRightColor: "$borderColor",
2644
2713
  alignItems: "center",
2645
- children: /* @__PURE__ */ w(Jn, {
2714
+ children: /* @__PURE__ */ w(Yn, {
2646
2715
  name: `${n}.${e}`,
2647
2716
  label: null,
2648
2717
  compact: !0,
@@ -2780,27 +2849,28 @@ var Wn = (e) => {
2780
2849
  return null;
2781
2850
  }).filter((e) => !!e) : [];
2782
2851
  }, Gn = (e) => Array.isArray(e) ? e.map((e) => e == null ? "" : String(e)).filter((e) => e.length > 0) : [], Kn = (e) => {
2783
- let { t } = $("desk"), { id: n, value: r, onChange: i, disabled: a, error: o, showInlineError: s, placeholder: c, compact: l } = e, [u, d] = v(""), [f, p] = v([]), m = e?.schema?.ui_meta || e?.field?.ui_meta || e?.ui_meta;
2852
+ let { t } = $("desk"), { id: n, value: r, onChange: i, disabled: a, error: o, showInlineError: s, placeholder: c, compact: l } = e, [u, d] = v(""), [f, p] = v([]), m = Mt(), _ = e?.schema?.ui_meta || e?.field?.ui_meta || e?.ui_meta;
2784
2853
  h(() => {
2785
- let e = m?.source_url;
2786
- e && fetch(e).then((e) => e.json()).then((e) => {
2787
- p((e?.items ?? []).map((e) => {
2788
- let t = typeof e == "string" ? e : e.value || e.id || String(e);
2854
+ let e = _?.source_url;
2855
+ e && m(e).then((e) => e.json()).then((e) => {
2856
+ let t = _?.source_map?.value || "items";
2857
+ p((e?.[t] ?? []).map((e) => {
2858
+ let t = typeof e == "string" ? e : e.value || e.id || e.name || String(e);
2789
2859
  return {
2790
2860
  value: t,
2791
2861
  label: typeof e == "string" ? e : e.label || e.name || t
2792
2862
  };
2793
2863
  }));
2794
2864
  }).catch((e) => console.warn("[MultiSelect] Failed to load remote options", e));
2795
- }, [m?.source_url]);
2796
- let _ = g(() => Wn(e), [e]), y = g(() => f.length > 0 ? f : _, [_, f]), b = Gn(r), x = g(() => new Set(b), [b]), { model: S } = j(), { data: C } = pe(), E = m?.guard?.prevent_self_remove ?? [], D = (e) => E.includes(e) && !!C?.id && !!S?.id && C.id === S.id, O = g(() => {
2865
+ }, [_?.source_url]);
2866
+ let y = g(() => Wn(e), [e]), b = g(() => f.length > 0 ? f : y, [y, f]), x = Gn(r), S = g(() => new Set(x), [x]), { model: C } = j(), { data: E } = pe(), D = _?.guard?.prevent_self_remove ?? [], O = (e) => D.includes(e) && !!E?.id && !!C?.id && E.id === C.id, k = g(() => {
2797
2867
  let e = u.trim().toLowerCase();
2798
- return e ? y.filter((t) => t.label.toLowerCase().includes(e) || t.value.toLowerCase().includes(e)) : y;
2799
- }, [y, u]), k = (e) => {
2868
+ return e ? b.filter((t) => t.label.toLowerCase().includes(e) || t.value.toLowerCase().includes(e)) : b;
2869
+ }, [b, u]), A = (e) => {
2800
2870
  if (a) return;
2801
- let t = x.has(e);
2802
- t && D(e) || i(t ? b.filter((t) => t !== e) : [...b, e]);
2803
- }, A = O.filter((e) => !x.has(e.value));
2871
+ let t = S.has(e);
2872
+ t && O(e) || i(t ? x.filter((t) => t !== e) : [...x, e]);
2873
+ }, M = k.filter((e) => !S.has(e.value));
2804
2874
  return /* @__PURE__ */ T(J, {
2805
2875
  gap: "$3",
2806
2876
  marginBottom: l ? 0 : "$4",
@@ -2814,7 +2884,7 @@ var Wn = (e) => {
2814
2884
  size: "sm",
2815
2885
  error: !!o
2816
2886
  }),
2817
- b.length > 0 && /* @__PURE__ */ T(J, {
2887
+ x.length > 0 && /* @__PURE__ */ T(J, {
2818
2888
  gap: "$2",
2819
2889
  style: {
2820
2890
  marginTop: 12,
@@ -2827,8 +2897,8 @@ var Wn = (e) => {
2827
2897
  children: t("Assigned")
2828
2898
  }), /* @__PURE__ */ w(q, {
2829
2899
  flexWrap: "wrap",
2830
- children: b.map((e) => {
2831
- let t = y.find((t) => t.value === e)?.label ?? e, n = D(e);
2900
+ children: x.map((e) => {
2901
+ let t = b.find((t) => t.value === e)?.label ?? e, n = O(e);
2832
2902
  return /* @__PURE__ */ T(N, {
2833
2903
  variant: "primary",
2834
2904
  size: "sm",
@@ -2837,7 +2907,7 @@ var Wn = (e) => {
2837
2907
  marginBottom: 8,
2838
2908
  marginTop: 8
2839
2909
  },
2840
- onPress: () => k(e),
2910
+ onPress: () => A(e),
2841
2911
  disabled: a || n,
2842
2912
  children: [
2843
2913
  t,
@@ -2848,7 +2918,7 @@ var Wn = (e) => {
2848
2918
  })
2849
2919
  })]
2850
2920
  }),
2851
- A.length > 0 && /* @__PURE__ */ T(J, {
2921
+ M.length > 0 && /* @__PURE__ */ T(J, {
2852
2922
  gap: "$2",
2853
2923
  style: { marginBottom: 8 },
2854
2924
  children: [/* @__PURE__ */ w(U, {
@@ -2858,7 +2928,7 @@ var Wn = (e) => {
2858
2928
  children: t("Available")
2859
2929
  }), /* @__PURE__ */ w(q, {
2860
2930
  flexWrap: "wrap",
2861
- children: A.map((e) => /* @__PURE__ */ w(N, {
2931
+ children: M.map((e) => /* @__PURE__ */ w(N, {
2862
2932
  variant: "default",
2863
2933
  size: "sm",
2864
2934
  style: {
@@ -2866,13 +2936,13 @@ var Wn = (e) => {
2866
2936
  marginBottom: 8,
2867
2937
  marginTop: 8
2868
2938
  },
2869
- onPress: () => k(e.value),
2939
+ onPress: () => A(e.value),
2870
2940
  disabled: a,
2871
2941
  children: e.label
2872
2942
  }, e.value))
2873
2943
  })]
2874
2944
  }),
2875
- O.length === 0 && /* @__PURE__ */ w(W, {
2945
+ k.length === 0 && /* @__PURE__ */ w(W, {
2876
2946
  size: "sm",
2877
2947
  color: "$colorMuted",
2878
2948
  children: u ? `No roles matching "${u}"` : "No roles available"
@@ -2886,7 +2956,150 @@ var Wn = (e) => {
2886
2956
  });
2887
2957
  };
2888
2958
  k(Kn);
2889
- var qn = new class {
2959
+ //#endregion
2960
+ //#region src/components/form/fields/TagInputField.tsx
2961
+ function qn(e) {
2962
+ let { name: t, placeholder: n, label: r, value: i = [], onChange: a, field: o, compact: s, required: c, error: l, showInlineError: u, valueKey: d } = e, [f, m] = v(""), h = p((e) => d && typeof e == "object" && e && e[d] !== void 0 ? String(e[d]) : String(e), [d]), g = p((e) => d ? { [d]: e } : e, [d]), _ = p((e, t) => d && typeof e == "object" && e && e[d] !== void 0 ? String(e[d]) === t : String(e) === t, [d]), y = p(() => {
2963
+ let e = f.trim();
2964
+ if (e) {
2965
+ if (!i.some((t) => _(t, e))) {
2966
+ let t = g(e);
2967
+ a([...i, t]);
2968
+ }
2969
+ m("");
2970
+ }
2971
+ }, [
2972
+ f,
2973
+ i,
2974
+ a,
2975
+ g,
2976
+ _
2977
+ ]), b = p((e) => {
2978
+ a(i.filter((t) => !_(t, e)));
2979
+ }, [
2980
+ i,
2981
+ a,
2982
+ _
2983
+ ]), x = o ?? {}, S = x.ui_meta ?? {}, C = r ?? S.label ?? x.label ?? t, E = n ?? S.placeholder ?? `Add ${C}`, D = S.hint, O = p((e) => {
2984
+ e.key === "Enter" || e.key === "Tab" ? (e.preventDefault(), y()) : e.key === "Backspace" && f === "" && i.length > 0 && b(h(i[i.length - 1]));
2985
+ }, [
2986
+ y,
2987
+ b,
2988
+ f,
2989
+ i,
2990
+ h
2991
+ ]);
2992
+ return /* @__PURE__ */ T(J, {
2993
+ gap: "$1",
2994
+ marginBottom: s ? 0 : "$2",
2995
+ flex: s ? 1 : void 0,
2996
+ minWidth: s ? 50 : "100%",
2997
+ alignSelf: "stretch",
2998
+ role: "group",
2999
+ "aria-labelledby": `${t}-label`,
3000
+ children: [
3001
+ C && !s && /* @__PURE__ */ T(U, {
3002
+ id: `${t}-label`,
3003
+ fontWeight: "600",
3004
+ size: "sm",
3005
+ color: "$colorMuted",
3006
+ children: [
3007
+ C,
3008
+ " ",
3009
+ c && /* @__PURE__ */ w(U, {
3010
+ color: "$error",
3011
+ children: "*"
3012
+ })
3013
+ ]
3014
+ }),
3015
+ /* @__PURE__ */ w(q, {
3016
+ flexWrap: "wrap",
3017
+ gap: "$2",
3018
+ children: i.map((e, t) => {
3019
+ let n = h(e);
3020
+ return /* @__PURE__ */ T(N, {
3021
+ size: "sm",
3022
+ variant: "default",
3023
+ borderRadius: "$6",
3024
+ paddingHorizontal: "$3",
3025
+ paddingVertical: "$1",
3026
+ backgroundColor: "$blue1",
3027
+ borderColor: "$blue8",
3028
+ color: "$blue10",
3029
+ onPress: () => b(n),
3030
+ "aria-label": `Remove ${n}`,
3031
+ children: [/* @__PURE__ */ w(U, {
3032
+ fontSize: "$3",
3033
+ color: "$blue10",
3034
+ children: n
3035
+ }), /* @__PURE__ */ w(R, {
3036
+ name: "x",
3037
+ size: 12,
3038
+ color: "$blue10",
3039
+ marginLeft: "$1"
3040
+ })]
3041
+ }, `${n}-${t}`);
3042
+ })
3043
+ }),
3044
+ /* @__PURE__ */ T(q, {
3045
+ gap: "$2",
3046
+ alignItems: "center",
3047
+ children: [
3048
+ " ",
3049
+ /* @__PURE__ */ w(z, {
3050
+ flex: 1,
3051
+ value: f,
3052
+ onChangeText: m,
3053
+ onKeyPress: O,
3054
+ onBlur: y,
3055
+ placeholder: E,
3056
+ "aria-label": `Add new ${C}`,
3057
+ error: !!l,
3058
+ size: "sm",
3059
+ backgroundColor: s ? "transparent" : "$background",
3060
+ borderWidth: +!s,
3061
+ borderRadius: s ? 0 : "$round",
3062
+ borderColor: "$borderColor",
3063
+ opacity: 1,
3064
+ hoverStyle: s ? { backgroundColor: "$backgroundHover" } : void 0,
3065
+ focusStyle: s ? {
3066
+ backgroundColor: "$background",
3067
+ borderWidth: 0,
3068
+ outlineWidth: 0
3069
+ } : { borderColor: "$primary" },
3070
+ minHeight: s ? 40 : 32,
3071
+ paddingHorizontal: s ? 14 : "$md"
3072
+ }),
3073
+ /* @__PURE__ */ w(N, {
3074
+ onPress: y,
3075
+ disabled: !f.trim(),
3076
+ size: "sm",
3077
+ variant: "ghost",
3078
+ "aria-label": `Add ${C}`,
3079
+ children: /* @__PURE__ */ w(R, {
3080
+ name: "plus",
3081
+ size: 16
3082
+ })
3083
+ })
3084
+ ]
3085
+ }),
3086
+ D && !s && /* @__PURE__ */ w(U, {
3087
+ fontSize: "$xs",
3088
+ color: "$colorMuted",
3089
+ paddingTop: "$1",
3090
+ role: "note",
3091
+ children: D
3092
+ }),
3093
+ u && l && /* @__PURE__ */ w(W, {
3094
+ color: "$error",
3095
+ size: "sm",
3096
+ marginTop: "$1",
3097
+ children: typeof l == "string" ? l : l?.message
3098
+ })
3099
+ ]
3100
+ });
3101
+ }
3102
+ var Jn = new class {
2890
3103
  fields = /* @__PURE__ */ new Map();
2891
3104
  register(e, t) {
2892
3105
  this.fields.set(e, t);
@@ -2897,10 +3110,15 @@ var qn = new class {
2897
3110
  clear() {
2898
3111
  this.fields.clear();
2899
3112
  }
2900
- }(), Jn = k((e) => {
2901
- let t = String(e.name ?? "").toLowerCase(), n = e.field ?? {}, r = n.format, i = n.ui_widget || n.ui_meta?.ui_widget || n.ui_meta?.widget, a = typeof e.fieldType == "string" ? e.fieldType : n.ui_meta?.widget, o = typeof a == "string" ? qn.get(a) : void 0;
3113
+ }(), Yn = k((e) => {
3114
+ let t = String(e.name ?? "").toLowerCase(), n = e.field ?? {}, r = n.format, i = n.ui_widget || n.ui_meta?.ui_widget || n.ui_meta?.widget, a = typeof e.fieldType == "string" ? e.fieldType : n.ui_meta?.widget, o = typeof a == "string" ? Jn.get(a) : void 0;
2902
3115
  if (o) return /* @__PURE__ */ w(o, { ...e });
2903
3116
  if (e.fieldType === Array) {
3117
+ if (n.ui_meta?.input_widget === "tag_input") return /* @__PURE__ */ w(qn, {
3118
+ ...e,
3119
+ placeholder: n.ui_meta?.placeholder,
3120
+ valueKey: n.ui_meta?.value_key
3121
+ });
2904
3122
  if (i === "multiselect") {
2905
3123
  let t = n.ui_meta?.hide_label === !0;
2906
3124
  return /* @__PURE__ */ w(Kn, {
@@ -2923,7 +3141,7 @@ var qn = new class {
2923
3141
  link: u
2924
3142
  });
2925
3143
  let d = Array.isArray(e.options) && e.options.length > 0 ? e.options : void 0, f = Array.isArray(n.ui_meta?.options) && n.ui_meta.options.length > 0 ? n.ui_meta.options : void 0;
2926
- if (d || f) return /* @__PURE__ */ w(Nn, { ...f ? {
3144
+ if (i === "select" || d || f) return /* @__PURE__ */ w(Nn, { ...f ? {
2927
3145
  ...e,
2928
3146
  options: f
2929
3147
  } : e });
@@ -2946,7 +3164,7 @@ var qn = new class {
2946
3164
  });
2947
3165
  }
2948
3166
  return /* @__PURE__ */ w(jn, { ...e });
2949
- }), Yn = () => {
3167
+ }), Xn = () => {
2950
3168
  let { t: e } = $("desk"), { error: t } = j();
2951
3169
  if (!t) return null;
2952
3170
  let n = t.details || [];
@@ -2973,7 +3191,7 @@ var qn = new class {
2973
3191
  //#endregion
2974
3192
  //#region src/components/form/fields/SubmitField.tsx
2975
3193
  A.register("submitText");
2976
- var Xn = ({ value: e, ...t }) => {
3194
+ var Zn = ({ value: e, ...t }) => {
2977
3195
  let { state: n } = j();
2978
3196
  return /* @__PURE__ */ w(N, {
2979
3197
  type: "submit",
@@ -2983,20 +3201,20 @@ var Xn = ({ value: e, ...t }) => {
2983
3201
  ...A(t),
2984
3202
  children: e || "Submit"
2985
3203
  });
2986
- }, Zn = new E({
3204
+ }, Qn = new E({
2987
3205
  allErrors: !0,
2988
3206
  useDefaults: !1,
2989
3207
  strict: !1
2990
3208
  });
2991
- Zn.addKeyword({ keyword: "ui:widget" }), Zn.addKeyword({ keyword: "ui:options" });
2992
- function Qn({ schema: e, formData: t, onChange: n, onSubmit: r, error: i, readonly: a = !1, disabled: o = !1, hideSubmitButton: s = !1, submitText: c = "Submit", columns: l = 1, children: u }) {
3209
+ Qn.addKeyword({ keyword: "ui:widget" }), Qn.addKeyword({ keyword: "ui:options" });
3210
+ function $n({ schema: e, formData: t, onChange: n, onSubmit: r, error: i, readonly: a = !1, disabled: o = !1, hideSubmitButton: s = !1, submitText: c = "Submit", columns: l = 1, children: u }) {
2993
3211
  return /* @__PURE__ */ w(O, {
2994
3212
  schema: g(() => new D({
2995
3213
  schema: e,
2996
3214
  validator: (t) => {
2997
- if (Zn.validate(e, t), Zn.errors) return { details: Zn.errors };
3215
+ if (Qn.validate(e, t), Qn.errors) return { details: Qn.errors };
2998
3216
  }
2999
- }), [e, Zn]),
3217
+ }), [e, Qn]),
3000
3218
  model: t,
3001
3219
  error: i,
3002
3220
  onChange: (e, r) => {
@@ -3021,43 +3239,43 @@ function Qn({ schema: e, formData: t, onChange: n, onSubmit: r, error: i, readon
3021
3239
  children: /* @__PURE__ */ T(J, {
3022
3240
  gap: "$1",
3023
3241
  children: [
3024
- /* @__PURE__ */ w(Yn, {}),
3242
+ /* @__PURE__ */ w(Xn, {}),
3025
3243
  l > 1 ? /* @__PURE__ */ w(q, {
3026
3244
  flexWrap: "wrap",
3027
3245
  marginHorizontal: "$-1.5",
3028
3246
  children: Object.keys(e.properties || {}).map((e) => /* @__PURE__ */ w(J, {
3029
3247
  flexBasis: `${100 / l}%`,
3030
3248
  paddingHorizontal: "$1.5",
3031
- children: /* @__PURE__ */ w(Jn, { name: e })
3249
+ children: /* @__PURE__ */ w(Yn, { name: e })
3032
3250
  }, e))
3033
- }) : Object.keys(e.properties || {}).map((e) => /* @__PURE__ */ w(Jn, { name: e }, e)),
3251
+ }) : Object.keys(e.properties || {}).map((e) => /* @__PURE__ */ w(Yn, { name: e }, e)),
3034
3252
  u,
3035
- !s && /* @__PURE__ */ w(Xn, { value: c })
3253
+ !s && /* @__PURE__ */ w(Zn, { value: c })
3036
3254
  ]
3037
3255
  })
3038
3256
  });
3039
3257
  }
3040
3258
  //#endregion
3041
3259
  //#region src/components/table/AutoTable.tsx
3042
- function $n(e, t, n) {
3260
+ function er(e, t, n) {
3043
3261
  return JSON.stringify({
3044
3262
  resource: e,
3045
3263
  filters: t ?? null,
3046
3264
  sorting: n
3047
3265
  });
3048
3266
  }
3049
- function er(e, t, n) {
3267
+ function tr(e, t, n) {
3050
3268
  return Math.max(t, Math.min(n, e));
3051
3269
  }
3052
- function tr(e) {
3270
+ function nr(e) {
3053
3271
  let t = e.type;
3054
3272
  return Array.isArray(t) ? t.find((e) => e !== "null") ?? "" : typeof t == "string" ? t : "";
3055
3273
  }
3056
- function nr(e, t, n) {
3057
- let r = Math.ceil(t.length * 8.5) + 58, i = tr(n), a = n.format === "date" || n.format === "date-time";
3058
- return e === "name" ? er(Math.max(r, 220), 180, 320) : /(amount|total|rate|qty|quantity|debit|credit|balance)$/i.test(e) ? er(Math.max(r, 136), 120, 220) : /(date|status)$/i.test(e) || a || i === "boolean" ? er(Math.max(r, 132), 118, 220) : er(Math.max(r, 180), 140, 300);
3274
+ function rr(e, t, n) {
3275
+ let r = Math.ceil(t.length * 8.5) + 58, i = nr(n), a = n.format === "date" || n.format === "date-time";
3276
+ return e === "name" ? tr(Math.max(r, 220), 180, 320) : /(amount|total|rate|qty|quantity|debit|credit|balance)$/i.test(e) ? tr(Math.max(r, 136), 120, 220) : /(date|status)$/i.test(e) || a || i === "boolean" ? tr(Math.max(r, 132), 118, 220) : tr(Math.max(r, 180), 140, 300);
3059
3277
  }
3060
- function rr(e, t) {
3278
+ function ir(e, t) {
3061
3279
  let n = [];
3062
3280
  for (let [t, r] of Object.entries(e.properties)) {
3063
3281
  let e = r;
@@ -3074,7 +3292,7 @@ function rr(e, t) {
3074
3292
  enableSorting: !0,
3075
3293
  minSize: 96,
3076
3294
  maxSize: 560,
3077
- size: nr(t, i, e)
3295
+ size: rr(t, i, e)
3078
3296
  });
3079
3297
  }
3080
3298
  return n.push({
@@ -3117,7 +3335,7 @@ function rr(e, t) {
3117
3335
  enableSorting: !0
3118
3336
  }), n;
3119
3337
  }
3120
- function ir({ resource: e, schema: t, filters: n, columns: r, enableSelection: i = !1, onSelectionChange: a, selectedRows: o, onRowClick: s, className: c }) {
3338
+ function ar({ resource: e, schema: t, filters: n, columns: r, enableSelection: i = !1, onSelectionChange: a, selectedRows: o, onRowClick: s, className: c }) {
3121
3339
  let { t: l } = $(), [u, d] = v(() => t?.properties?.modified && !t.properties.modified["x-hidden"] ? [{
3122
3340
  id: "modified",
3123
3341
  desc: !0
@@ -3145,7 +3363,7 @@ function ir({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
3145
3363
  filters: n,
3146
3364
  sorters: C,
3147
3365
  queryOptions: { placeholderData: (e) => e }
3148
- }), O = E?.data ?? [], k = E?.total ?? 0, A = D?.isLoading ?? !1, j = D?.isFetching ?? !1, M = D?.error, F = g(() => $n(e, n, u), [
3366
+ }), O = E?.data ?? [], k = E?.total ?? 0, A = D?.isLoading ?? !1, j = D?.isFetching ?? !1, M = D?.error, F = g(() => er(e, n, u), [
3149
3367
  e,
3150
3368
  n,
3151
3369
  u
@@ -3160,7 +3378,7 @@ function ir({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
3160
3378
  pageIndex: 0
3161
3379
  }));
3162
3380
  }, [F]);
3163
- let L = g(() => r || (t ? rr(t, l) : []), [
3381
+ let L = g(() => r || (t ? ir(t, l) : []), [
3164
3382
  r,
3165
3383
  t,
3166
3384
  l
@@ -3443,7 +3661,7 @@ function ir({ resource: e, schema: t, filters: n, columns: r, enableSelection: i
3443
3661
  }
3444
3662
  //#endregion
3445
3663
  //#region src/components/table/EditableCell.tsx
3446
- function ar({ resource: e, id: t, field: n, value: r, type: i = "text", options: a, disabled: o = !1, onSaveSuccess: s, renderValue: c }) {
3664
+ function or({ resource: e, id: t, field: n, value: r, type: i = "text", options: a, disabled: o = !1, onSaveSuccess: s, renderValue: c }) {
3447
3665
  let [l, u] = v(!1), [d, f] = v(r), [m, g] = v(null), y = _(null), b = xe();
3448
3666
  h(() => {
3449
3667
  l && y.current && (y.current.focus(), y.current instanceof HTMLInputElement && y.current.select());
@@ -3487,7 +3705,7 @@ function ar({ resource: e, id: t, field: n, value: r, type: i = "text", options:
3487
3705
  return l ? /* @__PURE__ */ T(J, {
3488
3706
  position: "relative",
3489
3707
  children: [
3490
- i === "select" ? /* @__PURE__ */ w(G, {
3708
+ i === "select" ? /* @__PURE__ */ w(ne, {
3491
3709
  value: String(d ?? ""),
3492
3710
  onChange: D,
3493
3711
  onBlur: C,
@@ -3561,7 +3779,7 @@ function ar({ resource: e, id: t, field: n, value: r, type: i = "text", options:
3561
3779
  }
3562
3780
  //#endregion
3563
3781
  //#region src/components/feedback/ConfirmDialog.tsx
3564
- function or({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancelLabel: i = "Cancel", destructive: a = !1, onConfirm: o, onCancel: s }) {
3782
+ function sr({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancelLabel: i = "Cancel", destructive: a = !1, onConfirm: o, onCancel: s }) {
3565
3783
  let c = g(() => `confirm-dialog-title-${t.toLowerCase().replaceAll(" ", "-")}`, [t]);
3566
3784
  return h(() => {
3567
3785
  if (!e) return;
@@ -3618,7 +3836,7 @@ function or({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
3618
3836
  }
3619
3837
  //#endregion
3620
3838
  //#region src/components/feedback/AlertBanner.tsx
3621
- var sr = {
3839
+ var cr = {
3622
3840
  info: {
3623
3841
  bg: "$backgroundSecondary",
3624
3842
  border: "$borderColor",
@@ -3635,8 +3853,8 @@ var sr = {
3635
3853
  text: "white"
3636
3854
  }
3637
3855
  };
3638
- function cr({ message: e, variant: t = "info", onDismiss: n }) {
3639
- let r = sr[t];
3856
+ function lr({ message: e, variant: t = "info", onDismiss: n }) {
3857
+ let r = cr[t];
3640
3858
  return /* @__PURE__ */ w(P, {
3641
3859
  role: t === "error" ? "alert" : "status",
3642
3860
  backgroundColor: r.bg,
@@ -3669,7 +3887,7 @@ function cr({ message: e, variant: t = "info", onDismiss: n }) {
3669
3887
  }
3670
3888
  //#endregion
3671
3889
  //#region src/components/feedback/SubmittedBanner.tsx
3672
- function lr({ docstatus: e }) {
3890
+ function ur({ docstatus: e }) {
3673
3891
  let { t } = $("desk");
3674
3892
  return e === 1 ? /* @__PURE__ */ w(P, {
3675
3893
  role: "alert",
@@ -3697,7 +3915,7 @@ function lr({ docstatus: e }) {
3697
3915
  }
3698
3916
  //#endregion
3699
3917
  //#region src/components/table/BulkActionsBar.tsx
3700
- function ur({ selectedCount: e, isLoading: t = !1, onDelete: n, onExportJson: r, onExportCsv: i, onBulkUpdate: a, updateFields: o = [], onClear: s }) {
3918
+ function dr({ selectedCount: e, isLoading: t = !1, onDelete: n, onExportJson: r, onExportCsv: i, onBulkUpdate: a, updateFields: o = [], onClear: s }) {
3701
3919
  let { t: c } = $("desk"), [l, u] = v(!1), [d, f] = v(""), [m, h] = v(""), [g, _] = v(!1), y = p(() => {
3702
3920
  d && a && (a(d, m), u(!1), f(""), h(""));
3703
3921
  }, [
@@ -3784,7 +4002,7 @@ function ur({ selectedCount: e, isLoading: t = !1, onDelete: n, onExportJson: r,
3784
4002
  fontSize: "$xs",
3785
4003
  color: "$colorMuted",
3786
4004
  children: c("Select Field")
3787
- }), /* @__PURE__ */ w(G, {
4005
+ }), /* @__PURE__ */ w(ne, {
3788
4006
  size: "sm",
3789
4007
  value: d,
3790
4008
  onChange: (e) => f(e.target.value),
@@ -3801,7 +4019,7 @@ function ur({ selectedCount: e, isLoading: t = !1, onDelete: n, onExportJson: r,
3801
4019
  fontSize: "$xs",
3802
4020
  color: "$colorMuted",
3803
4021
  children: c("New Value")
3804
- }), o.find((e) => e.name === d)?.options ? /* @__PURE__ */ w(G, {
4022
+ }), o.find((e) => e.name === d)?.options ? /* @__PURE__ */ w(ne, {
3805
4023
  size: "sm",
3806
4024
  value: String(m),
3807
4025
  onChange: (e) => h(e.target.value),
@@ -3842,7 +4060,7 @@ function ur({ selectedCount: e, isLoading: t = !1, onDelete: n, onExportJson: r,
3842
4060
  })
3843
4061
  ]
3844
4062
  }),
3845
- /* @__PURE__ */ w(or, {
4063
+ /* @__PURE__ */ w(sr, {
3846
4064
  open: g,
3847
4065
  title: "Confirm bulk delete",
3848
4066
  message: `Are you sure you want to delete ${e} selected document(s)? This action cannot be undone.`,
@@ -3859,7 +4077,7 @@ function ur({ selectedCount: e, isLoading: t = !1, onDelete: n, onExportJson: r,
3859
4077
  }
3860
4078
  //#endregion
3861
4079
  //#region src/components/workflow/StateBadge.tsx
3862
- var dr = {
4080
+ var fr = {
3863
4081
  draft: {
3864
4082
  bg: "#e0e0e0",
3865
4083
  text: "#333"
@@ -3897,13 +4115,13 @@ var dr = {
3897
4115
  text: "#495057"
3898
4116
  }
3899
4117
  };
3900
- function fr(e) {
3901
- return e ? dr[e.toLowerCase().replace(/\s+/g, "_")] ?? dr.default : dr.default;
4118
+ function pr(e) {
4119
+ return e ? fr[e.toLowerCase().replace(/\s+/g, "_")] ?? fr.default : fr.default;
3902
4120
  }
3903
- function pr({ state: e, docstatus: t, className: n, style: r }) {
4121
+ function mr({ state: e, docstatus: t, className: n, style: r }) {
3904
4122
  let i = e ?? (t === 0 ? "Draft" : t === 1 ? "Submitted" : t === 2 ? "Cancelled" : void 0);
3905
4123
  if (!i) return null;
3906
- let a = fr(i);
4124
+ let a = pr(i);
3907
4125
  return /* @__PURE__ */ w(q, {
3908
4126
  className: n,
3909
4127
  alignSelf: "flex-start",
@@ -3923,7 +4141,7 @@ function pr({ state: e, docstatus: t, className: n, style: r }) {
3923
4141
  }
3924
4142
  //#endregion
3925
4143
  //#region src/components/workflow/WorkflowActions.tsx
3926
- var mr = {
4144
+ var hr = {
3927
4145
  submit: {
3928
4146
  bg: "#007bff",
3929
4147
  text: "white",
@@ -3955,11 +4173,11 @@ var mr = {
3955
4173
  hover: "#545b62"
3956
4174
  }
3957
4175
  };
3958
- function hr(e) {
4176
+ function gr(e) {
3959
4177
  let t = e.toLowerCase();
3960
- return t.includes("submit") ? mr.submit : t.includes("approve") ? mr.approve : t.includes("reject") ? mr.reject : t.includes("cancel") ? mr.cancel : t.includes("hold") ? mr.hold : mr.default;
4178
+ return t.includes("submit") ? hr.submit : t.includes("approve") ? hr.approve : t.includes("reject") ? hr.reject : t.includes("cancel") ? hr.cancel : t.includes("hold") ? hr.hold : hr.default;
3961
4179
  }
3962
- function gr({ doctype: e, id: t, showState: n = !0, onActionComplete: r, className: i, style: a }) {
4180
+ function _r({ doctype: e, id: t, showState: n = !0, onActionComplete: r, className: i, style: a }) {
3963
4181
  let { t: o } = $("desk"), { state: s, actions: c, isLoading: l, executeAction: u, isExecuting: d } = Qt(e, t), f = async (e) => {
3964
4182
  try {
3965
4183
  await u(e.name), r?.(e.name);
@@ -3979,12 +4197,12 @@ function gr({ doctype: e, id: t, showState: n = !0, onActionComplete: r, classNa
3979
4197
  gap: "$md",
3980
4198
  style: a,
3981
4199
  children: [
3982
- n && /* @__PURE__ */ w(pr, {
4200
+ n && /* @__PURE__ */ w(mr, {
3983
4201
  state: s.current_state,
3984
4202
  docstatus: s.docstatus
3985
4203
  }),
3986
4204
  p.map((e) => {
3987
- let t = hr(e.name);
4205
+ let t = gr(e.name);
3988
4206
  return /* @__PURE__ */ w(N, {
3989
4207
  onPress: () => f(e),
3990
4208
  disabled: d,
@@ -4006,7 +4224,7 @@ function gr({ doctype: e, id: t, showState: n = !0, onActionComplete: r, classNa
4006
4224
  }
4007
4225
  //#endregion
4008
4226
  //#region src/plugins/registry.ts
4009
- var _r = {
4227
+ var vr = {
4010
4228
  plugins: /* @__PURE__ */ new Map(),
4011
4229
  fields: /* @__PURE__ */ new Map(),
4012
4230
  slots: /* @__PURE__ */ new Map(),
@@ -4014,27 +4232,27 @@ var _r = {
4014
4232
  resources: [],
4015
4233
  theme: void 0
4016
4234
  };
4017
- function vr(e, t, n) {
4018
- let r = _r.slots.get(e) ?? [];
4235
+ function yr(e, t, n) {
4236
+ let r = vr.slots.get(e) ?? [];
4019
4237
  if (r.some((e) => e.component === t && JSON.stringify(e.doctypes) === JSON.stringify(n?.doctypes))) return;
4020
4238
  let i = {
4021
4239
  slot: e,
4022
4240
  component: t,
4023
4241
  ...n
4024
4242
  };
4025
- r.push(i), r.sort((e, t) => (t.priority ?? 0) - (e.priority ?? 0)), _r.slots.set(e, r);
4243
+ r.push(i), r.sort((e, t) => (t.priority ?? 0) - (e.priority ?? 0)), vr.slots.set(e, r);
4026
4244
  }
4027
- function yr(e, t) {
4028
- let n = _r.slots.get(e) ?? [];
4245
+ function br(e, t) {
4246
+ let n = vr.slots.get(e) ?? [];
4029
4247
  return t ? n.filter((e) => !e.doctypes || e.doctypes.includes(t)) : n;
4030
4248
  }
4031
- function br() {
4032
- return _r.resources;
4249
+ function xr() {
4250
+ return vr.resources;
4033
4251
  }
4034
4252
  //#endregion
4035
4253
  //#region src/plugins/Slot.tsx
4036
- function xr({ name: e, doctype: t, data: n, id: r, children: i }) {
4037
- let a = yr(e, t);
4254
+ function Sr({ name: e, doctype: t, data: n, id: r, children: i }) {
4255
+ let a = br(e, t);
4038
4256
  return a.length === 0 ? /* @__PURE__ */ w(C, { children: i }) : /* @__PURE__ */ w(C, { children: a.map((i, a) => {
4039
4257
  let o = i.component;
4040
4258
  return /* @__PURE__ */ w(o, {
@@ -4046,7 +4264,7 @@ function xr({ name: e, doctype: t, data: n, id: r, children: i }) {
4046
4264
  }
4047
4265
  //#endregion
4048
4266
  //#region src/components/audit/DiffViewer.tsx
4049
- function Sr(e) {
4267
+ function Cr(e) {
4050
4268
  if (e === null) return "null";
4051
4269
  if (e === void 0) return "undefined";
4052
4270
  if (typeof e == "object") try {
@@ -4056,7 +4274,7 @@ function Sr(e) {
4056
4274
  }
4057
4275
  return typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? `${e}` : typeof e == "symbol" ? e.description ? `Symbol(${e.description})` : "Symbol" : typeof e == "function" ? "[function]" : "[unknown]";
4058
4276
  }
4059
- function Cr({ diff: e }) {
4277
+ function wr({ diff: e }) {
4060
4278
  let { t } = $("desk"), n = e ? Object.entries(e) : [];
4061
4279
  return n.length === 0 ? null : /* @__PURE__ */ T(H, {
4062
4280
  marginTop: "$xs",
@@ -4087,7 +4305,7 @@ function Cr({ diff: e }) {
4087
4305
  })
4088
4306
  ]
4089
4307
  }), n.map(([e, t]) => {
4090
- let n = Sr(t.old), r = Sr(t.new);
4308
+ let n = Cr(t.old), r = Cr(t.new);
4091
4309
  return /* @__PURE__ */ T(q, {
4092
4310
  paddingVertical: "$xs",
4093
4311
  alignItems: "flex-start",
@@ -4114,7 +4332,7 @@ function Cr({ diff: e }) {
4114
4332
  }
4115
4333
  //#endregion
4116
4334
  //#region src/components/audit/AuditTimeline.tsx
4117
- function wr(e) {
4335
+ function Tr(e) {
4118
4336
  if (e.action === "create") return "Document created";
4119
4337
  if (e.action === "submit") return "Document submitted";
4120
4338
  if (e.action === "amend") {
@@ -4123,7 +4341,7 @@ function wr(e) {
4123
4341
  }
4124
4342
  return e.action === "update" ? "Document updated" : e.action === "restore" ? "Document restored" : e.action === "cancel" ? "Document cancelled" : e.action === "in_place_edit" ? "Document edited in place" : e.action;
4125
4343
  }
4126
- function Tr({ doctype: e, id: t }) {
4344
+ function Er({ doctype: e, id: t }) {
4127
4345
  let { t: n } = $("desk"), { entries: r, isLoading: i, error: a } = dn(e, t);
4128
4346
  return /* @__PURE__ */ T(H, {
4129
4347
  marginTop: "$md",
@@ -4159,7 +4377,7 @@ function Tr({ doctype: e, id: t }) {
4159
4377
  flexWrap: "wrap",
4160
4378
  children: [/* @__PURE__ */ w(U, {
4161
4379
  fontWeight: "700",
4162
- children: wr(e)
4380
+ children: Tr(e)
4163
4381
  }), /* @__PURE__ */ w(U, {
4164
4382
  size: "$xs",
4165
4383
  color: "$colorMuted",
@@ -4170,7 +4388,7 @@ function Tr({ doctype: e, id: t }) {
4170
4388
  size: "$xs",
4171
4389
  children: e.user_id
4172
4390
  }),
4173
- e.action === "update" && /* @__PURE__ */ w(Cr, { diff: e.diff })
4391
+ e.action === "update" && /* @__PURE__ */ w(wr, { diff: e.diff })
4174
4392
  ]
4175
4393
  })
4176
4394
  }, e.id))
@@ -4179,8 +4397,8 @@ function Tr({ doctype: e, id: t }) {
4179
4397
  }
4180
4398
  //#endregion
4181
4399
  //#region src/components/list/AsOfDatePicker.tsx
4182
- var Er = "Time travel not available for this DocType";
4183
- function Dr(e) {
4400
+ var Dr = "Time travel not available for this DocType";
4401
+ function Or(e) {
4184
4402
  let t = e.trim();
4185
4403
  if (!t) return;
4186
4404
  let n = t.match(/^(\d{4}-\d{2}-\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/);
@@ -4188,12 +4406,12 @@ function Dr(e) {
4188
4406
  let [, r, i, a, o] = n;
4189
4407
  return `${r}T${i}:${a}:${o ?? "00"}Z`;
4190
4408
  }
4191
- function Or(e) {
4409
+ function kr(e) {
4192
4410
  if (!e) return "";
4193
4411
  let t = e.match(/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2})/);
4194
4412
  return t ? t[1] : "";
4195
4413
  }
4196
- function kr(e) {
4414
+ function Ar(e) {
4197
4415
  if (!e || typeof e != "object") return !1;
4198
4416
  let t = e.metadata;
4199
4417
  if (t && typeof t == "object") {
@@ -4203,10 +4421,10 @@ function kr(e) {
4203
4421
  let n = e.versioning_enabled;
4204
4422
  return typeof n == "boolean" ? n : !1;
4205
4423
  }
4206
- function Ar({ doctype: e, asOf: t, onAsOfChange: n, onError: r }) {
4207
- let { t: i } = $("desk"), { meta: a } = Lt(e ?? ""), [o, s] = v(!1), [c, l] = v(""), u = g(() => kr(a), [a]);
4424
+ function jr({ doctype: e, asOf: t, onAsOfChange: n, onError: r }) {
4425
+ let { t: i } = $("desk"), { meta: a } = Lt(e ?? ""), [o, s] = v(!1), [c, l] = v(""), u = g(() => Ar(a), [a]);
4208
4426
  return h(() => {
4209
- l(Or(t));
4427
+ l(kr(t));
4210
4428
  }, [t]), e ? /* @__PURE__ */ T(q, {
4211
4429
  gap: "$sm",
4212
4430
  alignItems: "center",
@@ -4229,24 +4447,24 @@ function Ar({ doctype: e, asOf: t, onAsOfChange: n, onError: r }) {
4229
4447
  return;
4230
4448
  }
4231
4449
  if (!u) {
4232
- r?.(Er);
4450
+ r?.(Dr);
4233
4451
  return;
4234
4452
  }
4235
- let i = Dr(t);
4453
+ let i = Or(t);
4236
4454
  i && (r?.(null), n?.(i));
4237
4455
  },
4238
4456
  size: "sm"
4239
4457
  }), !u && /* @__PURE__ */ w(U, {
4240
4458
  color: "$error",
4241
4459
  role: "alert",
4242
- children: Er
4460
+ children: Dr
4243
4461
  })]
4244
4462
  })]
4245
4463
  }) : null;
4246
4464
  }
4247
4465
  //#endregion
4248
4466
  //#region src/components/layout/ShellSkeleton.tsx
4249
- var jr = () => /* @__PURE__ */ w(q, {
4467
+ var Mr = () => /* @__PURE__ */ w(q, {
4250
4468
  flex: 1,
4251
4469
  backgroundColor: "$background",
4252
4470
  children: /* @__PURE__ */ T(J, {
@@ -4289,7 +4507,7 @@ var jr = () => /* @__PURE__ */ w(q, {
4289
4507
  }, e))
4290
4508
  })]
4291
4509
  })
4292
- }), Mr = () => /* @__PURE__ */ T(J, {
4510
+ }), Nr = () => /* @__PURE__ */ T(J, {
4293
4511
  padding: "$lg",
4294
4512
  gap: "$md",
4295
4513
  backgroundColor: "$background",
@@ -4334,7 +4552,7 @@ var jr = () => /* @__PURE__ */ w(q, {
4334
4552
  ]
4335
4553
  }, e))
4336
4554
  })]
4337
- }), Nr = () => /* @__PURE__ */ T(q, {
4555
+ }), Pr = () => /* @__PURE__ */ T(q, {
4338
4556
  className: "skeleton-layout",
4339
4557
  height: "100vh",
4340
4558
  width: "100%",
@@ -4444,34 +4662,34 @@ var jr = () => /* @__PURE__ */ w(q, {
4444
4662
  width: "40%",
4445
4663
  height: 24
4446
4664
  })
4447
- }), /* @__PURE__ */ w(jr, {})]
4665
+ }), /* @__PURE__ */ w(Mr, {})]
4448
4666
  })
4449
4667
  ]
4450
- }), Pr = /* @__PURE__ */ new Map(), Fr = /* @__PURE__ */ new Map();
4451
- function Ir(e) {
4452
- Pr.set(e.type, e);
4453
- }
4668
+ }), Fr = /* @__PURE__ */ new Map(), Ir = /* @__PURE__ */ new Map();
4454
4669
  function Lr(e) {
4455
- return Pr.get(e)?.component;
4670
+ Fr.set(e.type, e);
4456
4671
  }
4457
- function Rr() {
4458
- return Array.from(Pr.values());
4672
+ function Rr(e) {
4673
+ return Fr.get(e)?.component;
4459
4674
  }
4460
- function zr(e) {
4461
- return Pr.get(e);
4675
+ function zr() {
4676
+ return Array.from(Fr.values());
4462
4677
  }
4463
- function Br(e, t) {
4464
- Fr.set(e, t);
4678
+ function Br(e) {
4679
+ return Fr.get(e);
4465
4680
  }
4466
- function Vr(e) {
4467
- return Fr.get(e) ?? ["list"];
4681
+ function Vr(e, t) {
4682
+ Ir.set(e, t);
4468
4683
  }
4469
- function Hr(e, t) {
4470
- return Vr(e).includes(t);
4684
+ function Hr(e) {
4685
+ return Ir.get(e) ?? ["list"];
4686
+ }
4687
+ function Ur(e, t) {
4688
+ return Hr(e).includes(t);
4471
4689
  }
4472
4690
  //#endregion
4473
4691
  //#region src/components/feedback/QuickEditModal.tsx
4474
- function Ur({ item: e, resource: t, titleField: n, descField: r, groupField: i, columns: a, onClose: o, onSaved: s }) {
4692
+ function Wr({ item: e, resource: t, titleField: n, descField: r, groupField: i, columns: a, onClose: o, onSaved: s }) {
4475
4693
  let { t: c } = $("desk"), [l, u] = v(String(e[n] ?? e.name)), [d, f] = v(r ? String(e[r] ?? "") : ""), [m, h] = v(String(e[i] ?? a[0]?.id ?? "")), [g, _] = v(!1), { mutate: y } = xe(), b = p(() => {
4476
4694
  _(!0);
4477
4695
  let a = {
@@ -4556,7 +4774,7 @@ function Ur({ item: e, resource: t, titleField: n, descField: r, groupField: i,
4556
4774
  marginBottom: "$xs",
4557
4775
  children: i
4558
4776
  }),
4559
- /* @__PURE__ */ w(G, {
4777
+ /* @__PURE__ */ w(ne, {
4560
4778
  value: m,
4561
4779
  onValueChange: h,
4562
4780
  options: a.map((e) => ({
@@ -4599,16 +4817,16 @@ function Ur({ item: e, resource: t, titleField: n, descField: r, groupField: i,
4599
4817
  }
4600
4818
  //#endregion
4601
4819
  //#region src/views/utils.ts
4602
- function Wr(e) {
4820
+ function Gr(e) {
4603
4821
  return e?.groupField ?? "status";
4604
4822
  }
4605
- function Gr(e) {
4823
+ function Kr(e) {
4606
4824
  return e?.titleField ?? "name";
4607
4825
  }
4608
- function Kr(e) {
4826
+ function qr(e) {
4609
4827
  return e?.descriptionField;
4610
4828
  }
4611
- function qr(e, t, n) {
4829
+ function Jr(e, t, n) {
4612
4830
  if (e?.columns && e.columns.length > 0) return e.columns;
4613
4831
  let r = /* @__PURE__ */ new Set(), i = [], a = [
4614
4832
  "#e0e0e0",
@@ -4651,15 +4869,15 @@ function qr(e, t, n) {
4651
4869
  }
4652
4870
  //#endregion
4653
4871
  //#region src/views/KanbanView.tsx
4654
- function Jr(e) {
4655
- return w(an(e.resource, "KanbanView") || Yr, { ...e });
4872
+ function Yr(e) {
4873
+ return w(an(e.resource, "KanbanView") || Xr, { ...e });
4656
4874
  }
4657
- function Yr({ resource: e, config: t, filters: n }) {
4658
- let { t: r } = $("desk"), i = Wr(t), a = Gr(t), o = Kr(t), [s, c] = v(null), [l, u] = v(null), [d, f] = v(null), { result: m, query: h } = ge({
4875
+ function Xr({ resource: e, config: t, filters: n }) {
4876
+ let { t: r } = $("desk"), i = Gr(t), a = Kr(t), o = qr(t), [s, c] = v(null), [l, u] = v(null), [d, f] = v(null), { result: m, query: h } = ge({
4659
4877
  resource: e,
4660
4878
  pagination: { pageSize: 200 },
4661
4879
  filters: n
4662
- }), _ = m?.data ?? [], y = h?.isLoading ?? !1, { mutate: b } = xe(), x = g(() => qr(t, _, i), [
4880
+ }), _ = m?.data ?? [], y = h?.isLoading ?? !1, { mutate: b } = xe(), x = g(() => Jr(t, _, i), [
4663
4881
  t,
4664
4882
  _,
4665
4883
  i
@@ -4724,7 +4942,7 @@ function Yr({ resource: e, config: t, filters: n }) {
4724
4942
  }, e))
4725
4943
  }, e))
4726
4944
  })]
4727
- }) : /* @__PURE__ */ T(C, { children: [d && /* @__PURE__ */ w(Ur, {
4945
+ }) : /* @__PURE__ */ T(C, { children: [d && /* @__PURE__ */ w(Wr, {
4728
4946
  item: d,
4729
4947
  resource: e,
4730
4948
  titleField: a,
@@ -4843,13 +5061,13 @@ function Yr({ resource: e, config: t, filters: n }) {
4843
5061
  }
4844
5062
  //#endregion
4845
5063
  //#region src/views/CalendarView.tsx
4846
- function Xr(e) {
5064
+ function Zr(e) {
4847
5065
  return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
4848
5066
  }
4849
- function Zr(e) {
4850
- return w(an(e.resource, "CalendarView") || Qr, { ...e });
5067
+ function Qr(e) {
5068
+ return w(an(e.resource, "CalendarView") || $r, { ...e });
4851
5069
  }
4852
- function Qr({ resource: e, config: t, filters: n }) {
5070
+ function $r({ resource: e, config: t, filters: n }) {
4853
5071
  let { t: r } = $("desk"), i = t.startField, a = t.titleField, o = me(), s = $t("resolveDetailRoute"), [c, l] = v("month"), [u, d] = v(/* @__PURE__ */ new Date()), f = u.getFullYear(), p = u.getMonth(), m = u.getDate(), h = u.getDay(), { startDate: _, endDate: y } = g(() => {
4854
5072
  let e, t;
4855
5073
  return c === "month" ? (e = new Date(f, p, 1), t = new Date(f, p + 1, 0)) : c === "week" ? (e = new Date(f, p, m - h), t = new Date(f, p, m + (6 - h))) : (e = new Date(f, p, m), t = new Date(f, p, m)), e.setHours(0, 0, 0, 0), t.setHours(23, 59, 59, 999), {
@@ -4889,7 +5107,7 @@ function Qr({ resource: e, config: t, filters: n }) {
4889
5107
  if (b?.data) for (let t of b.data) {
4890
5108
  let n = t[i];
4891
5109
  if (!n) continue;
4892
- let r = new Date(String(n)), a = isNaN(r.getTime()) ? String(n).split("T")[0] : Xr(r);
5110
+ let r = new Date(String(n)), a = isNaN(r.getTime()) ? String(n).split("T")[0] : Zr(r);
4893
5111
  a && (e[a] || (e[a] = []), e[a].push(t));
4894
5112
  }
4895
5113
  return e;
@@ -5031,7 +5249,7 @@ function Qr({ resource: e, config: t, filters: n }) {
5031
5249
  minHeight: 80
5032
5250
  }, `empty-${t}`)),
5033
5251
  S.map((t) => {
5034
- let n = Xr(t), i = C[n] ?? [], l = n === Xr(/* @__PURE__ */ new Date());
5252
+ let n = Zr(t), i = C[n] ?? [], l = n === Zr(/* @__PURE__ */ new Date());
5035
5253
  return /* @__PURE__ */ T(J, {
5036
5254
  width: M,
5037
5255
  backgroundColor: "$background",
@@ -5083,7 +5301,7 @@ function Qr({ resource: e, config: t, filters: n }) {
5083
5301
  }
5084
5302
  //#endregion
5085
5303
  //#region src/views/GanttView.tsx
5086
- function $r(e, t, n) {
5304
+ function ei(e, t, n) {
5087
5305
  let r = /* @__PURE__ */ new Date(), i = new Date(r.getFullYear(), r.getMonth(), r.getDate()), a = new Date(r.getFullYear(), r.getMonth(), r.getDate());
5088
5306
  for (let r of e) {
5089
5307
  let e = new Date(String(r[t] ?? "")), o = new Date(String(r[n] ?? ""));
@@ -5101,14 +5319,14 @@ function $r(e, t, n) {
5101
5319
  maxDate: a
5102
5320
  };
5103
5321
  }
5104
- function ei(e, t) {
5322
+ function ti(e, t) {
5105
5323
  let n = new Date(e.getFullYear(), e.getMonth(), e.getDate()), r = new Date(t.getFullYear(), t.getMonth(), t.getDate());
5106
5324
  return Math.round((r.getTime() - n.getTime()) / (1e3 * 60 * 60 * 24));
5107
5325
  }
5108
- function ti(e) {
5109
- return w(an(e.resource, "GanttView") || ni, { ...e });
5326
+ function ni(e) {
5327
+ return w(an(e.resource, "GanttView") || ri, { ...e });
5110
5328
  }
5111
- function ni({ resource: e, config: t, filters: n }) {
5329
+ function ri({ resource: e, config: t, filters: n }) {
5112
5330
  let { t: r } = $("desk"), i = t.nameField ?? "name", a = t.startField, o = t.endField, s = t.progressField, c = me(), l = $t("resolveDetailRoute"), { result: u, query: d } = ge({
5113
5331
  resource: e,
5114
5332
  pagination: { pageSize: 100 },
@@ -5125,12 +5343,12 @@ function ni({ resource: e, config: t, filters: n }) {
5125
5343
  maxDate: /* @__PURE__ */ new Date(),
5126
5344
  totalDays: 30
5127
5345
  };
5128
- let { minDate: t, maxDate: n } = $r(e, a, o);
5346
+ let { minDate: t, maxDate: n } = ei(e, a, o);
5129
5347
  return {
5130
5348
  tasks: e,
5131
5349
  minDate: t,
5132
5350
  maxDate: n,
5133
- totalDays: ei(t, n)
5351
+ totalDays: ti(t, n)
5134
5352
  };
5135
5353
  }, [
5136
5354
  u,
@@ -5262,7 +5480,7 @@ function ni({ resource: e, config: t, filters: n }) {
5262
5480
  }, t))
5263
5481
  }),
5264
5482
  f.map((e) => {
5265
- let t = new Date(String(e[a] ?? "")), n = new Date(String(e[o] ?? "")), r = ei(p, t), i = ei(t, n), c = s ? Number(e[s] ?? 0) : 0;
5483
+ let t = new Date(String(e[a] ?? "")), n = new Date(String(e[o] ?? "")), r = ti(p, t), i = ti(t, n), c = s ? Number(e[s] ?? 0) : 0;
5266
5484
  return /* @__PURE__ */ T(J, {
5267
5485
  height: 36,
5268
5486
  position: "relative",
@@ -5304,7 +5522,7 @@ function ni({ resource: e, config: t, filters: n }) {
5304
5522
  }
5305
5523
  //#endregion
5306
5524
  //#region src/views/TreeView.tsx
5307
- function ri({ initialValue: e, onConfirm: t, onCancel: n }) {
5525
+ function ii({ initialValue: e, onConfirm: t, onCancel: n }) {
5308
5526
  let { t: r } = $("desk"), [i, a] = v(e), o = _(null);
5309
5527
  return h(() => {
5310
5528
  o.current?.focus(), o.current?.select();
@@ -5321,7 +5539,7 @@ function ri({ initialValue: e, onConfirm: t, onCancel: n }) {
5321
5539
  "aria-label": r("Rename node")
5322
5540
  });
5323
5541
  }
5324
- function ii({ node: e, depth: t, onRename: n, onAddChild: r, dragNodeId: i, onDragStart: a, onDrop: o, onNodeClick: s }) {
5542
+ function ai({ node: e, depth: t, onRename: n, onAddChild: r, dragNodeId: i, onDragStart: a, onDrop: o, onNodeClick: s }) {
5325
5543
  let { t: c } = $("desk"), [l, u] = v(!1), [d, f] = v(!1), [m, h] = v(!1), g = i === e.id, _ = p((t) => {
5326
5544
  f(!1), t !== e.label && n(e, t);
5327
5545
  }, [e, n]), y = e.children.length > 0, b = "•";
@@ -5380,7 +5598,7 @@ function ii({ node: e, depth: t, onRename: n, onAddChild: r, dragNodeId: i, onDr
5380
5598
  children: b
5381
5599
  })
5382
5600
  }),
5383
- d ? /* @__PURE__ */ w(ri, {
5601
+ d ? /* @__PURE__ */ w(ii, {
5384
5602
  initialValue: e.label,
5385
5603
  onConfirm: _,
5386
5604
  onCancel: () => f(!1)
@@ -5427,7 +5645,7 @@ function ii({ node: e, depth: t, onRename: n, onAddChild: r, dragNodeId: i, onDr
5427
5645
  ]
5428
5646
  }), !l && y && /* @__PURE__ */ w(J, {
5429
5647
  role: "group",
5430
- children: e.children.map((e) => /* @__PURE__ */ w(ii, {
5648
+ children: e.children.map((e) => /* @__PURE__ */ w(ai, {
5431
5649
  node: e,
5432
5650
  depth: t + 1,
5433
5651
  onRename: n,
@@ -5440,10 +5658,10 @@ function ii({ node: e, depth: t, onRename: n, onAddChild: r, dragNodeId: i, onDr
5440
5658
  })]
5441
5659
  });
5442
5660
  }
5443
- function ai(e) {
5444
- return w(an(e.resource, "TreeView") || oi, { ...e });
5661
+ function oi(e) {
5662
+ return w(an(e.resource, "TreeView") || si, { ...e });
5445
5663
  }
5446
- function oi({ resource: e, config: t, filters: n, onNodeClick: r }) {
5664
+ function si({ resource: e, config: t, filters: n, onNodeClick: r }) {
5447
5665
  let { t: i } = $("desk"), a = t?.titleField || "title", o = t?.parentField || "parent_value", [s, c] = v(null), [l, u] = v(!1), d = me(), { result: f, query: m } = ge({
5448
5666
  resource: e,
5449
5667
  pagination: { pageSize: 1e3 },
@@ -5507,7 +5725,10 @@ function oi({ resource: e, config: t, filters: n, onNodeClick: r }) {
5507
5725
  b
5508
5726
  ]), k = p((t) => {
5509
5727
  let n = JSON.stringify({ [o]: t.id });
5510
- d({ to: `/app/${e}/new?form=${encodeURIComponent(n)}` });
5728
+ d({
5729
+ to: `/app/${e}/new`,
5730
+ query: { form: n }
5731
+ });
5511
5732
  }, [
5512
5733
  d,
5513
5734
  e,
@@ -5563,7 +5784,7 @@ function oi({ resource: e, config: t, filters: n, onNodeClick: r }) {
5563
5784
  }),
5564
5785
  l && /* @__PURE__ */ w(J, {
5565
5786
  marginBottom: "$sm",
5566
- children: /* @__PURE__ */ w(ri, {
5787
+ children: /* @__PURE__ */ w(ii, {
5567
5788
  initialValue: "",
5568
5789
  onConfirm: D,
5569
5790
  onCancel: () => u(!1)
@@ -5601,7 +5822,7 @@ function oi({ resource: e, config: t, filters: n, onNodeClick: r }) {
5601
5822
  }) : /* @__PURE__ */ w(J, {
5602
5823
  role: "tree",
5603
5824
  "aria-label": `${e} tree`,
5604
- children: C.map((e) => /* @__PURE__ */ w(ii, {
5825
+ children: C.map((e) => /* @__PURE__ */ w(ai, {
5605
5826
  node: e,
5606
5827
  depth: 0,
5607
5828
  onRename: O,
@@ -5618,7 +5839,7 @@ function oi({ resource: e, config: t, filters: n, onNodeClick: r }) {
5618
5839
  }
5619
5840
  //#endregion
5620
5841
  //#region src/components/list/ListBodyLayout.tsx
5621
- var si = [
5842
+ var ci = [
5622
5843
  {
5623
5844
  label: "Equals",
5624
5845
  value: "eq"
@@ -5640,7 +5861,7 @@ var si = [
5640
5861
  value: "like"
5641
5862
  }
5642
5863
  ];
5643
- function ci(e) {
5864
+ function li(e) {
5644
5865
  switch (e) {
5645
5866
  case "number": return [
5646
5867
  "eq",
@@ -5663,23 +5884,23 @@ function ci(e) {
5663
5884
  ];
5664
5885
  }
5665
5886
  }
5666
- function li(e) {
5887
+ function ui(e) {
5667
5888
  if (e) return String(typeof e == "object" ? e?.target?.value ?? e?.value ?? e : e);
5668
5889
  }
5669
- var ui = {
5890
+ var di = {
5670
5891
  eq: "=",
5671
5892
  gt: ">",
5672
5893
  lt: "<",
5673
5894
  in: "in",
5674
5895
  like: "contains"
5675
5896
  };
5676
- function di(e) {
5897
+ function fi(e) {
5677
5898
  return typeof e.value == "string" && e.value.trim().length > 0;
5678
5899
  }
5679
- function fi(e, t) {
5900
+ function pi(e, t) {
5680
5901
  return t[e.field]?.label ?? e.field;
5681
5902
  }
5682
- function pi(e, t) {
5903
+ function mi(e, t) {
5683
5904
  let n = t[e.field];
5684
5905
  if (n?.type === "boolean") {
5685
5906
  if (e.value === "true") return "True";
@@ -5687,10 +5908,10 @@ function pi(e, t) {
5687
5908
  }
5688
5909
  return n?.options?.find((t) => t.value === e.value)?.label || (e.operator === "in" ? e.value.split(",").map((e) => e.trim()).filter(Boolean).join(", ") : e.value);
5689
5910
  }
5690
- function mi(e, t) {
5691
- return `${fi(e, t)} ${ui[e.operator]} ${pi(e, t)}`;
5911
+ function hi(e, t) {
5912
+ return `${pi(e, t)} ${di[e.operator]} ${mi(e, t)}`;
5692
5913
  }
5693
- function hi(e) {
5914
+ function gi(e) {
5694
5915
  switch (e?.type) {
5695
5916
  case "number": return "number";
5696
5917
  case "date": return "date";
@@ -5698,8 +5919,8 @@ function hi(e) {
5698
5919
  default: return "text";
5699
5920
  }
5700
5921
  }
5701
- function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows: i, setSelectedRows: a, searchQuery: o, setSearchQuery: s, appliedSearchQuery: c, applySearch: l, clearSearch: u, hasPendingSearchChanges: d, filterRows: f, appliedFilterRows: p, filterableFields: m, filterFieldMap: h, addFilterRow: _, removeFilterRow: y, removeAppliedFilterRow: b, clearFilterRows: x, clearAppliedFilters: S, applyFilters: E, hasPendingFilterChanges: D, updateFilterRow: O, listFilterSlotData: k, uiError: A, timeTravelError: j, isDeleteConfirmOpen: M, setIsDeleteConfirmOpen: F, isColumnsMenuOpen: I, setIsColumnsMenuOpen: B, isMobile: V, columnPreferences: W, toggleColumnVisibility: ne, activeView: K, setActiveView: re, handleRowClick: Y, canKanban: ie, canTree: ae, canGantt: oe, title: se, listColumns: ce, tableColumns: le, tableFilters: ue, kanbanGroupField: de, kanbanColumns: fe, kanbanTitleField: pe, kanbanDescriptionField: me, detectedParentField: he, detectedLabelField: ge, ganttConfig: _e, canCalendar: ve, calendarConfig: ye, confirmBulkDelete: be, handleBulkDelete: xe, hasLockedSelection: Se, handleNew: Ce }) {
5702
- let { t: X } = $("desk"), we = A ?? j, [Te, Z] = v(!1), [Ee, De] = v(!1), Oe = o.trim().length > 0, ke = c.trim().length > 0, Ae = g(() => p.filter((e) => di(e)), [p]), je = Ae.slice(0, 3), Me = Ae.slice(3), Ne = [
5922
+ function _i({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows: i, setSelectedRows: a, searchQuery: o, setSearchQuery: s, appliedSearchQuery: c, applySearch: l, clearSearch: u, hasPendingSearchChanges: d, filterRows: f, appliedFilterRows: p, filterableFields: m, filterFieldMap: h, addFilterRow: _, removeFilterRow: y, removeAppliedFilterRow: b, clearFilterRows: x, clearAppliedFilters: S, applyFilters: E, hasPendingFilterChanges: D, updateFilterRow: O, listFilterSlotData: k, uiError: A, timeTravelError: j, isDeleteConfirmOpen: M, setIsDeleteConfirmOpen: F, isColumnsMenuOpen: I, setIsColumnsMenuOpen: B, isMobile: V, columnPreferences: W, toggleColumnVisibility: G, activeView: K, setActiveView: re, handleRowClick: Y, canKanban: ie, canTree: ae, canGantt: oe, title: se, listColumns: ce, tableColumns: le, tableFilters: ue, kanbanGroupField: de, kanbanColumns: fe, kanbanTitleField: pe, kanbanDescriptionField: me, detectedParentField: he, detectedLabelField: ge, ganttConfig: _e, canCalendar: ve, calendarConfig: ye, confirmBulkDelete: be, handleBulkDelete: xe, hasLockedSelection: Se, handleNew: Ce }) {
5923
+ let { t: X } = $("desk"), we = A ?? j, [Te, Z] = v(!1), [Ee, De] = v(!1), Oe = o.trim().length > 0, ke = c.trim().length > 0, Ae = g(() => p.filter((e) => fi(e)), [p]), je = Ae.slice(0, 3), Me = Ae.slice(3), Ne = [
5703
5924
  {
5704
5925
  key: "list",
5705
5926
  label: X("List"),
@@ -5725,7 +5946,7 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
5725
5946
  label: X("Calendar"),
5726
5947
  enabled: ve
5727
5948
  }
5728
- ].filter((e) => e.enabled), Pe = /* @__PURE__ */ T(C, { children: [Ne.length > 1 && /* @__PURE__ */ w(G, {
5949
+ ].filter((e) => e.enabled), Pe = /* @__PURE__ */ T(C, { children: [Ne.length > 1 && /* @__PURE__ */ w(ne, {
5729
5950
  value: K,
5730
5951
  onValueChange: (e) => re(e),
5731
5952
  options: Ne.map((e) => ({
@@ -5748,7 +5969,7 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
5748
5969
  strokeWidth: 2.4
5749
5970
  }), X("New")]
5750
5971
  })] });
5751
- return t ? /* @__PURE__ */ w(Mr, {}) : n ? /* @__PURE__ */ w(H, {
5972
+ return t ? /* @__PURE__ */ w(Nr, {}) : n ? /* @__PURE__ */ w(H, {
5752
5973
  padding: "$xl",
5753
5974
  backgroundColor: "$background",
5754
5975
  minHeight: "100vh",
@@ -5808,7 +6029,7 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
5808
6029
  flexWrap: "wrap",
5809
6030
  justifyContent: V ? "flex-start" : "flex-end",
5810
6031
  width: V ? "100%" : void 0,
5811
- children: [/* @__PURE__ */ w(xr, {
6032
+ children: [/* @__PURE__ */ w(Sr, {
5812
6033
  name: "list-header-actions",
5813
6034
  doctype: e
5814
6035
  }), !V && Pe]
@@ -5986,7 +6207,7 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
5986
6207
  cursor: "pointer",
5987
6208
  accentColor: "#8b5cf6"
5988
6209
  },
5989
- onChange: () => ne(e.field)
6210
+ onChange: () => G(e.field)
5990
6211
  }), /* @__PURE__ */ w(U, {
5991
6212
  fontWeight: "600",
5992
6213
  fontSize: "$sm",
@@ -6014,7 +6235,7 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
6014
6235
  color: "$colorMuted"
6015
6236
  }), !V && X("Reset")]
6016
6237
  }),
6017
- /* @__PURE__ */ w(xr, {
6238
+ /* @__PURE__ */ w(Sr, {
6018
6239
  name: "list-filters",
6019
6240
  doctype: e,
6020
6241
  data: k
@@ -6061,7 +6282,7 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
6061
6282
  ] : [{
6062
6283
  label: X("Choose value"),
6063
6284
  value: ""
6064
- }, ...n?.options ?? []], i = ci(n?.type), a = si.filter((e) => i.includes(e.value));
6285
+ }, ...n?.options ?? []], i = li(n?.type), a = ci.filter((e) => i.includes(e.value));
6065
6286
  return /* @__PURE__ */ T(q, {
6066
6287
  gap: "$sm",
6067
6288
  alignItems: "center",
@@ -6069,13 +6290,13 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
6069
6290
  flexWrap: V ? "wrap" : "nowrap",
6070
6291
  width: "100%",
6071
6292
  children: [
6072
- /* @__PURE__ */ w(G, {
6293
+ /* @__PURE__ */ w(ne, {
6073
6294
  "aria-label": `Filter field ${t + 1}`,
6074
6295
  value: e.field,
6075
6296
  options: m,
6076
6297
  width: V ? "100%" : 160,
6077
6298
  onChange: (t) => {
6078
- let r = li(t) || e.field, i = h[r]?.type, a = ci(i), o = a.includes(e.operator) ? e.operator : a[0];
6299
+ let r = ui(t) || e.field, i = h[r]?.type, a = li(i), o = a.includes(e.operator) ? e.operator : a[0];
6079
6300
  O(e.id, {
6080
6301
  field: r,
6081
6302
  operator: o,
@@ -6083,26 +6304,26 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
6083
6304
  });
6084
6305
  }
6085
6306
  }),
6086
- /* @__PURE__ */ w(G, {
6307
+ /* @__PURE__ */ w(ne, {
6087
6308
  "aria-label": `Filter operator ${t + 1}`,
6088
6309
  value: e.operator,
6089
6310
  options: a,
6090
6311
  width: V ? "100%" : 130,
6091
6312
  onChange: (t) => {
6092
- let n = li(t);
6313
+ let n = ui(t);
6093
6314
  O(e.id, { operator: n || e.operator });
6094
6315
  }
6095
6316
  }),
6096
- n?.type === "select" || n?.type === "boolean" ? /* @__PURE__ */ w(G, {
6317
+ n?.type === "select" || n?.type === "boolean" ? /* @__PURE__ */ w(ne, {
6097
6318
  "aria-label": `Filter value ${t + 1}`,
6098
6319
  value: e.value,
6099
6320
  options: r,
6100
6321
  width: V ? "100%" : 180,
6101
- onChange: (t) => O(e.id, { value: li(t) ?? "" })
6322
+ onChange: (t) => O(e.id, { value: ui(t) ?? "" })
6102
6323
  }) : /* @__PURE__ */ w(z, {
6103
6324
  "aria-label": `Filter value ${t + 1}`,
6104
6325
  placeholder: X("Value"),
6105
- type: hi(n),
6326
+ type: gi(n),
6106
6327
  value: e.value,
6107
6328
  onChangeText: (t) => O(e.id, { value: t }),
6108
6329
  width: V ? "100%" : 180
@@ -6208,12 +6429,12 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
6208
6429
  alignItems: "center",
6209
6430
  children: [/* @__PURE__ */ w(U, {
6210
6431
  fontSize: "$sm",
6211
- children: mi(e, h)
6432
+ children: hi(e, h)
6212
6433
  }), /* @__PURE__ */ w(N, {
6213
6434
  variant: "ghost",
6214
6435
  size: "sm",
6215
6436
  onPress: () => b(e.id),
6216
- "aria-label": `Remove ${fi(e, h)} filter`,
6437
+ "aria-label": `Remove ${pi(e, h)} filter`,
6217
6438
  children: "✕"
6218
6439
  })]
6219
6440
  })
@@ -6237,7 +6458,7 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
6237
6458
  })
6238
6459
  }),
6239
6460
  K === "list" && /* @__PURE__ */ T(C, { children: [
6240
- /* @__PURE__ */ w(xr, {
6461
+ /* @__PURE__ */ w(Sr, {
6241
6462
  name: "list-above-table",
6242
6463
  doctype: e
6243
6464
  }),
@@ -6297,7 +6518,7 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
6297
6518
  flex: 1,
6298
6519
  alignItems: "stretch",
6299
6520
  overflow: "hidden",
6300
- children: /* @__PURE__ */ w(ir, {
6521
+ children: /* @__PURE__ */ w(ar, {
6301
6522
  resource: e,
6302
6523
  schema: r,
6303
6524
  columns: le,
@@ -6310,7 +6531,7 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
6310
6531
  })]
6311
6532
  })
6312
6533
  }),
6313
- /* @__PURE__ */ w(xr, {
6534
+ /* @__PURE__ */ w(Sr, {
6314
6535
  name: "list-below-table",
6315
6536
  doctype: e
6316
6537
  })
@@ -6344,18 +6565,18 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
6344
6565
  justifyContent: "space-between",
6345
6566
  alignItems: "center",
6346
6567
  gap: "$sm",
6347
- children: [/* @__PURE__ */ w(U, { children: mi(e, h) }), /* @__PURE__ */ w(N, {
6568
+ children: [/* @__PURE__ */ w(U, { children: hi(e, h) }), /* @__PURE__ */ w(N, {
6348
6569
  variant: "ghost",
6349
6570
  size: "sm",
6350
6571
  onPress: () => b(e.id),
6351
- "aria-label": `Remove ${fi(e, h)} filter`,
6572
+ "aria-label": `Remove ${pi(e, h)} filter`,
6352
6573
  children: "✕"
6353
6574
  })]
6354
6575
  })
6355
6576
  }, `overflow-filter-${e.id}`))
6356
6577
  })
6357
6578
  }),
6358
- K === "kanban" && ie && de && /* @__PURE__ */ w(Jr, {
6579
+ K === "kanban" && ie && de && /* @__PURE__ */ w(Yr, {
6359
6580
  resource: e,
6360
6581
  config: {
6361
6582
  groupField: de,
@@ -6365,7 +6586,7 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
6365
6586
  },
6366
6587
  filters: ue
6367
6588
  }),
6368
- K === "tree" && ae && he && /* @__PURE__ */ w(ai, {
6589
+ K === "tree" && ae && he && /* @__PURE__ */ w(oi, {
6369
6590
  resource: e,
6370
6591
  config: {
6371
6592
  parentField: he,
@@ -6377,17 +6598,17 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
6377
6598
  filters: ue,
6378
6599
  onNodeClick: Y
6379
6600
  }),
6380
- K === "gantt" && oe && _e && /* @__PURE__ */ w(ti, {
6601
+ K === "gantt" && oe && _e && /* @__PURE__ */ w(ni, {
6381
6602
  resource: e,
6382
6603
  config: _e,
6383
6604
  filters: ue
6384
6605
  }),
6385
- K === "calendar" && ve && ye && /* @__PURE__ */ w(Zr, {
6606
+ K === "calendar" && ve && ye && /* @__PURE__ */ w(Qr, {
6386
6607
  resource: e,
6387
6608
  config: ye,
6388
6609
  filters: ue
6389
6610
  }),
6390
- /* @__PURE__ */ w(or, {
6611
+ /* @__PURE__ */ w(sr, {
6391
6612
  open: M,
6392
6613
  title: "Confirm bulk delete",
6393
6614
  message: `Delete ${i.length} selected item(s)? This cannot be undone.`,
@@ -6404,8 +6625,8 @@ function gi({ doctype: e, metaLoading: t, metaError: n, schema: r, selectedRows:
6404
6625
  }
6405
6626
  //#endregion
6406
6627
  //#region src/components/correction/CorrectionWizard.tsx
6407
- var _i = 10;
6408
- function vi({ doctype: e, id: t, isOpen: n, onClose: r, onSuccess: i, supportsInPlaceEdit: a }) {
6628
+ var vi = 10;
6629
+ function yi({ doctype: e, id: t, isOpen: n, onClose: r, onSuccess: i, supportsInPlaceEdit: a }) {
6409
6630
  let { t: o } = $("desk"), [s, c] = v("amend"), [l, u] = v(""), [d, f] = v(null), { execute: m, isLoading: _, error: y } = cn(e, t);
6410
6631
  h(() => {
6411
6632
  !a && s === "in_place_edit" && c("amend");
@@ -6425,8 +6646,8 @@ function vi({ doctype: e, id: t, isOpen: n, onClose: r, onSuccess: i, supportsIn
6425
6646
  f("Reason is required");
6426
6647
  return;
6427
6648
  }
6428
- if (e.length < _i) {
6429
- f(`Reason must be at least ${_i} characters`);
6649
+ if (e.length < vi) {
6650
+ f(`Reason must be at least ${vi} characters`);
6430
6651
  return;
6431
6652
  }
6432
6653
  f(null);
@@ -6536,7 +6757,7 @@ function vi({ doctype: e, id: t, isOpen: n, onClose: r, onSuccess: i, supportsIn
6536
6757
  }
6537
6758
  //#endregion
6538
6759
  //#region src/components/correction/CorrectButton.tsx
6539
- function yi({ doctype: e, id: t, docstatus: n, supportsInPlaceEdit: r }) {
6760
+ function bi({ doctype: e, id: t, docstatus: n, supportsInPlaceEdit: r }) {
6540
6761
  let { t: i } = $("desk"), [a, o] = v(!1), s = Me(), c = p((t) => {
6541
6762
  let n = t.id;
6542
6763
  (typeof n == "string" || typeof n == "number") && s(`/app/${e}/detail/${n}`), o(!1);
@@ -6545,7 +6766,7 @@ function yi({ doctype: e, id: t, docstatus: n, supportsInPlaceEdit: r }) {
6545
6766
  variant: "ghost",
6546
6767
  onPress: () => o(!0),
6547
6768
  children: i("Correct")
6548
- }), /* @__PURE__ */ w(vi, {
6769
+ }), /* @__PURE__ */ w(yi, {
6549
6770
  doctype: e,
6550
6771
  id: t,
6551
6772
  isOpen: a,
@@ -6556,11 +6777,11 @@ function yi({ doctype: e, id: t, docstatus: n, supportsInPlaceEdit: r }) {
6556
6777
  }
6557
6778
  //#endregion
6558
6779
  //#region src/components/sibling/SiblingPanel.tsx
6559
- function bi(e) {
6780
+ function xi(e) {
6560
6781
  return e && typeof e == "object" && !Array.isArray(e) ? e : {};
6561
6782
  }
6562
- function xi({ sibling: e, parentId: t, onSaved: n }) {
6563
- let { t: r } = $("desk"), i = ue(), a = xe(), { schema: o } = Lt(e.doctype), [s, c] = v(() => bi(e.initial_data));
6783
+ function Si({ sibling: e, parentId: t, onSaved: n }) {
6784
+ let { t: r } = $("desk"), i = ue(), a = xe(), { schema: o } = Lt(e.doctype), [s, c] = v(() => xi(e.initial_data));
6564
6785
  return /* @__PURE__ */ T(P, {
6565
6786
  padding: "$md",
6566
6787
  borderWidth: 1,
@@ -6569,12 +6790,12 @@ function xi({ sibling: e, parentId: t, onSaved: n }) {
6569
6790
  size: "$xs",
6570
6791
  marginBottom: "$sm",
6571
6792
  children: e.label
6572
- }), o ? /* @__PURE__ */ w(Qn, {
6793
+ }), o ? /* @__PURE__ */ w($n, {
6573
6794
  schema: o,
6574
6795
  formData: s,
6575
- onChange: (e) => c(bi(e)),
6796
+ onChange: (e) => c(xi(e)),
6576
6797
  onSubmit: (r) => {
6577
- let o = bi(r), s = o.id, c = typeof s == "string" || typeof s == "number" ? String(s) : void 0;
6798
+ let o = xi(r), s = o.id, c = typeof s == "string" || typeof s == "number" ? String(s) : void 0;
6578
6799
  if (c) {
6579
6800
  a.mutate({
6580
6801
  resource: e.doctype,
@@ -6599,7 +6820,7 @@ function xi({ sibling: e, parentId: t, onSaved: n }) {
6599
6820
  })]
6600
6821
  });
6601
6822
  }
6602
- function Si({ doctype: e, id: t }) {
6823
+ function Ci({ doctype: e, id: t }) {
6603
6824
  let { t: n } = $("desk"), { siblings: r, isLoading: i, error: a, refetch: o } = pn(e);
6604
6825
  if (i) return /* @__PURE__ */ w(H, {
6605
6826
  marginTop: "$md",
@@ -6632,7 +6853,7 @@ function Si({ doctype: e, id: t }) {
6632
6853
  children: [/* @__PURE__ */ w(U, {
6633
6854
  color: "$colorMuted",
6634
6855
  children: n("Right-side metadata overlay")
6635
- }), s.map((e) => /* @__PURE__ */ w(xi, {
6856
+ }), s.map((e) => /* @__PURE__ */ w(Si, {
6636
6857
  sibling: e,
6637
6858
  parentId: t,
6638
6859
  onSaved: o
@@ -6644,7 +6865,7 @@ function Si({ doctype: e, id: t }) {
6644
6865
  children: [/* @__PURE__ */ w(U, {
6645
6866
  color: "$colorMuted",
6646
6867
  children: n("Sibling tabs")
6647
- }), c.map((e) => /* @__PURE__ */ w(xi, {
6868
+ }), c.map((e) => /* @__PURE__ */ w(Si, {
6648
6869
  sibling: e,
6649
6870
  parentId: t,
6650
6871
  onSaved: o
@@ -6655,7 +6876,7 @@ function Si({ doctype: e, id: t }) {
6655
6876
  }
6656
6877
  //#endregion
6657
6878
  //#region src/components/CommandPalette.tsx
6658
- var Ci = [
6879
+ var wi = [
6659
6880
  {
6660
6881
  id: "cmd-dashboard",
6661
6882
  type: "command",
@@ -6678,7 +6899,7 @@ var Ci = [
6678
6899
  description: "Sign out of your account"
6679
6900
  }
6680
6901
  ];
6681
- function wi({ open: e, onClose: t }) {
6902
+ function Ti({ open: e, onClose: t }) {
6682
6903
  let { t: n } = $("desk"), [r, i] = v(""), [a, o] = v(0), [s, c] = v([]), l = _(null), u = me(), d = Mt();
6683
6904
  h(() => {
6684
6905
  async function t() {
@@ -6693,7 +6914,7 @@ function wi({ open: e, onClose: t }) {
6693
6914
  doctype: e.name
6694
6915
  })));
6695
6916
  } catch {
6696
- c(br().map((e) => ({
6917
+ c(xr().map((e) => ({
6697
6918
  id: `doctype-${e.name}`,
6698
6919
  type: "doctype",
6699
6920
  label: e.label ?? e.name,
@@ -6743,7 +6964,7 @@ function wi({ open: e, onClose: t }) {
6743
6964
  ...y,
6744
6965
  ...s.filter((t) => t.label.toLowerCase().includes(e) || t.doctype?.toLowerCase().includes(e)),
6745
6966
  ...m,
6746
- ...Ci.filter((t) => t.label.toLowerCase().includes(e))
6967
+ ...wi.filter((t) => t.label.toLowerCase().includes(e))
6747
6968
  ].slice(0, 10);
6748
6969
  }, [
6749
6970
  s,
@@ -6886,7 +7107,7 @@ function wi({ open: e, onClose: t }) {
6886
7107
  }
6887
7108
  //#endregion
6888
7109
  //#region src/components/menu/index.tsx
6889
- var Ti = () => {
7110
+ var Ei = () => {
6890
7111
  let { t: e } = $("desk"), { mutate: t } = ve(), { menuItems: n } = ye();
6891
7112
  return /* @__PURE__ */ T(J, {
6892
7113
  tag: "nav",
@@ -6924,7 +7145,7 @@ var Ti = () => {
6924
7145
  children: e("Logout")
6925
7146
  })]
6926
7147
  });
6927
- }, Ei = () => {
7148
+ }, Di = () => {
6928
7149
  let { breadcrumbs: e } = le();
6929
7150
  return !e || e.length === 0 ? null : /* @__PURE__ */ w(q, {
6930
7151
  alignItems: "center",
@@ -6954,31 +7175,31 @@ var Ti = () => {
6954
7175
  }, `breadcrumb-${t.label}`);
6955
7176
  })
6956
7177
  });
6957
- }, Di = {
7178
+ }, Oi = {
6958
7179
  "1/3": 1,
6959
7180
  "2/3": 2,
6960
7181
  "1/2": 1,
6961
7182
  auto: 1
6962
- }, Oi = {
7183
+ }, ki = {
6963
7184
  "1/3": "28%",
6964
7185
  "2/3": "60%",
6965
7186
  "1/2": "45%",
6966
7187
  auto: "0"
6967
7188
  };
6968
- function ki({ width: e, children: t }) {
7189
+ function Ai({ width: e, children: t }) {
6969
7190
  return /* @__PURE__ */ w(H, {
6970
- flex: e ? Di[e] : 1,
6971
- minWidth: e ? Oi[e] : "0",
7191
+ flex: e ? Oi[e] : 1,
7192
+ minWidth: e ? ki[e] : "0",
6972
7193
  gap: "$sm",
6973
7194
  children: t
6974
7195
  });
6975
7196
  }
6976
- function Ai({ columns: e, equalColumns: t = 1, children: n }) {
7197
+ function ji({ columns: e, equalColumns: t = 1, children: n }) {
6977
7198
  return e && e.length > 0 ? /* @__PURE__ */ w(q, {
6978
7199
  gap: "$md",
6979
7200
  flexWrap: "wrap",
6980
7201
  flex: 1,
6981
- children: e.map((e, t) => /* @__PURE__ */ w(ki, {
7202
+ children: e.map((e, t) => /* @__PURE__ */ w(Ai, {
6982
7203
  width: e.width,
6983
7204
  children: e.children
6984
7205
  }, t))
@@ -6997,7 +7218,7 @@ function Ai({ columns: e, equalColumns: t = 1, children: n }) {
6997
7218
  }
6998
7219
  //#endregion
6999
7220
  //#region src/components/layout/PageHeader.tsx
7000
- function ji({ title: e, breadcrumb: t, extra: n, children: r, isMobile: i }) {
7221
+ function Mi({ title: e, breadcrumb: t, extra: n, children: r, isMobile: i }) {
7001
7222
  return /* @__PURE__ */ T(J, {
7002
7223
  marginBottom: "$lg",
7003
7224
  gap: "$sm",
@@ -7040,7 +7261,7 @@ function ji({ title: e, breadcrumb: t, extra: n, children: r, isMobile: i }) {
7040
7261
  }
7041
7262
  //#endregion
7042
7263
  //#region src/components/layout/index.tsx
7043
- var Mi = ({ sidebar: e, navbar: t, children: n, isMobile: r = !1 }) => /* @__PURE__ */ T(q, {
7264
+ var Ni = ({ sidebar: e, navbar: t, children: n, isMobile: r = !1 }) => /* @__PURE__ */ T(q, {
7044
7265
  className: "shell-layout",
7045
7266
  flexDirection: r ? "column-reverse" : "row",
7046
7267
  height: "100vh",
@@ -7065,7 +7286,7 @@ var Mi = ({ sidebar: e, navbar: t, children: n, isMobile: r = !1 }) => /* @__PUR
7065
7286
  });
7066
7287
  //#endregion
7067
7288
  //#region src/workspace/WorkspaceSection.tsx
7068
- function Ni({ workspace: e, collapsed: t = !1 }) {
7289
+ function Pi({ workspace: e, collapsed: t = !1 }) {
7069
7290
  let [n, r] = v(!0), i = me(), a = (e) => {
7070
7291
  e.type === "shortcut" ? i({ to: `/app/${e.doctype}/list` }) : e.type === "link" && (e.newTab ? window.open(e.url, "_blank") : e.url.startsWith("/") ? i({ to: e.url }) : window.location.href = e.url);
7071
7292
  };
@@ -7140,16 +7361,16 @@ function Ni({ workspace: e, collapsed: t = !1 }) {
7140
7361
  }
7141
7362
  //#endregion
7142
7363
  //#region src/pages/ListView.tsx
7143
- var Pi = new Set(Pn.filter((e) => e !== "name"));
7144
- function Fi(e) {
7364
+ var Fi = new Set(Pn.filter((e) => e !== "name"));
7365
+ function Ii(e) {
7145
7366
  if (!e || typeof e != "object") return {};
7146
7367
  let t = e.properties;
7147
7368
  return !t || typeof t != "object" ? {} : t;
7148
7369
  }
7149
- function Ii(e) {
7370
+ function Li(e) {
7150
7371
  return !e?.enum || !Array.isArray(e.enum) ? [] : e.enum.filter((e) => typeof e == "string");
7151
7372
  }
7152
- function Li(e) {
7373
+ function Ri(e) {
7153
7374
  if (!e) return !1;
7154
7375
  if (Array.isArray(e.enum) && e.enum.length > 0) return !0;
7155
7376
  let t = String(e.format ?? "").toLowerCase();
@@ -7157,7 +7378,7 @@ function Li(e) {
7157
7378
  let n = typeof e["x-fieldtype"] == "string" ? e["x-fieldtype"].toLowerCase() : "";
7158
7379
  return n === "link" || n === "select";
7159
7380
  }
7160
- function Ri(e) {
7381
+ function zi(e) {
7161
7382
  if (!e) return "text";
7162
7383
  if (Array.isArray(e.enum) && e.enum.length > 0) return "select";
7163
7384
  let t = Array.isArray(e.type) ? e.type[0] : e.type;
@@ -7166,16 +7387,16 @@ function Ri(e) {
7166
7387
  let n = String(e.format ?? "").toLowerCase();
7167
7388
  return n === "date" ? "date" : n === "date-time" ? "datetime" : "text";
7168
7389
  }
7169
- function zi(...e) {
7390
+ function Bi(...e) {
7170
7391
  for (let t of e) if (typeof t == "string" && t.trim()) return t;
7171
7392
  }
7172
- function Bi(e) {
7393
+ function Vi(e) {
7173
7394
  return e.replaceAll("_", " ").split(" ").map((e) => e ? e.charAt(0).toUpperCase() + e.slice(1) : "").join(" ");
7174
7395
  }
7175
- function Vi(e) {
7396
+ function Hi(e) {
7176
7397
  return e ? e["x-hidden"] === !0 || e.ui_meta?.hidden === !0 || e.type === "object" || e.type === "array" : !1;
7177
7398
  }
7178
- function Hi(e, t) {
7399
+ function Ui(e, t) {
7179
7400
  if (t == null || t === "") return "-";
7180
7401
  if (typeof t == "boolean") return t ? "Yes" : "No";
7181
7402
  let n = String(e?.format ?? "").toLowerCase();
@@ -7185,13 +7406,13 @@ function Hi(e, t) {
7185
7406
  }
7186
7407
  return String(t);
7187
7408
  }
7188
- function Ui({ doctype: e, view: t }) {
7189
- let n = Ne(), r = Me(), i = e ?? n.doctype ?? "Task", { data: a } = pe(), o = !!a, s = l(), { schema: c, permissions: u, isLoading: d, error: f } = Lt(i), { uiMeta: m } = Vt(i), [h, _] = v(null), [y, b] = v(null), [x, S] = v([]), C = g(() => Fi(c), [c]), T = g(() => {
7190
- let e = Object.entries(C).filter(([e, t]) => !Pi.has(e) && !Vi(t)).map(([e, t]) => ({
7191
- label: typeof t.title == "string" && t.title.trim() ? t.title : Bi(e),
7409
+ function Wi({ doctype: e, view: t }) {
7410
+ let n = Ne(), r = Me(), i = e ?? n.doctype ?? "Task", { data: a } = pe(), o = !!a, s = l(), { schema: c, permissions: u, isLoading: d, error: f } = Lt(i), { uiMeta: m } = Vt(i), [h, _] = v(null), [y, b] = v(null), [x, S] = v([]), C = g(() => Ii(c), [c]), T = g(() => {
7411
+ let e = Object.entries(C).filter(([e, t]) => !Fi.has(e) && !Hi(t)).map(([e, t]) => ({
7412
+ label: typeof t.title == "string" && t.title.trim() ? t.title : Vi(e),
7192
7413
  value: e,
7193
- type: Ri(t),
7194
- options: Ii(t).map((e) => ({
7414
+ type: zi(t),
7415
+ options: Li(t).map((e) => ({
7195
7416
  label: e,
7196
7417
  value: e
7197
7418
  }))
@@ -7204,17 +7425,17 @@ function Ui({ doctype: e, view: t }) {
7204
7425
  }, [C]), E = g(() => T.reduce((e, t) => (e[t.value] = t, e), {}), [T]), { searchQuery: D, setSearchQuery: O, appliedSearchQuery: k, applySearch: A, clearSearch: j, hasPendingSearchChanges: M, filterRows: N, appliedFilterRows: P, asOfFilter: F, setAsOfFilter: I, tableFilters: L, hasPendingFilterChanges: R, addFilterRow: z, applyFilters: B, updateFilterRow: V, removeFilterRow: H, removeAppliedFilterRow: U, clearFilterRows: ee, clearAppliedFilters: W } = vn(T), te = g(() => {
7205
7426
  let e = m?.additional_views?.tree;
7206
7427
  return e?.parentField ? e.parentField : C.parent_doctype ? "parent_doctype" : C.parent ? "parent" : Object.keys(C).find((e) => e.startsWith("parent_") || e.endsWith("_parent"));
7207
- }, [m, C]), G = g(() => Object.entries(C).filter(([, e]) => Li(e)).map(([e]) => e), [C]), ne = m?.additional_views?.kanban, K = m?.additional_views?.gantt, re = m?.additional_views?.calendar, q = g(() => zi(ne?.groupByField, C.status ? "status" : void 0, C.workflow_state ? "workflow_state" : void 0, G[0]), [
7208
- ne,
7428
+ }, [m, C]), ne = g(() => Object.entries(C).filter(([, e]) => Ri(e)).map(([e]) => e), [C]), G = m?.additional_views?.kanban, K = m?.additional_views?.gantt, re = m?.additional_views?.calendar, q = g(() => Bi(G?.groupByField, C.status ? "status" : void 0, C.workflow_state ? "workflow_state" : void 0, ne[0]), [
7429
+ G,
7209
7430
  C,
7210
- G
7211
- ]), J = !!q, Y = !!te, ie = g(() => zi(K?.startField, C.start_date ? "start_date" : void 0, C.start ? "start" : void 0), [K, C]), ae = g(() => zi(K?.endField, C.due_date ? "due_date" : void 0, C.end_date ? "end_date" : void 0, C.end ? "end" : void 0), [K, C]), oe = g(() => {
7431
+ ne
7432
+ ]), J = !!q, Y = !!te, ie = g(() => Bi(K?.startField, C.start_date ? "start_date" : void 0, C.start ? "start" : void 0), [K, C]), ae = g(() => Bi(K?.endField, C.due_date ? "due_date" : void 0, C.end_date ? "end_date" : void 0, C.end ? "end" : void 0), [K, C]), oe = g(() => {
7212
7433
  if (!(!ie || !ae)) return {
7213
- nameField: zi(K?.nameField, C.title ? "title" : void 0, C.subject ? "subject" : void 0, C.name ? "name" : void 0) ?? "name",
7434
+ nameField: Bi(K?.nameField, C.title ? "title" : void 0, C.subject ? "subject" : void 0, C.name ? "name" : void 0) ?? "name",
7214
7435
  startField: ie,
7215
7436
  endField: ae,
7216
- progressField: zi(K?.progressField, C.progress ? "progress" : void 0),
7217
- parentField: zi(K?.parentField, te)
7437
+ progressField: Bi(K?.progressField, C.progress ? "progress" : void 0),
7438
+ parentField: Bi(K?.parentField, te)
7218
7439
  };
7219
7440
  }, [
7220
7441
  K,
@@ -7222,10 +7443,10 @@ function Ui({ doctype: e, view: t }) {
7222
7443
  ie,
7223
7444
  ae,
7224
7445
  te
7225
- ]), se = !!oe, ce = g(() => zi(re?.startField, C.date ? "date" : void 0, C.start_date ? "start_date" : void 0), [re, C]), le = g(() => {
7446
+ ]), se = !!oe, ce = g(() => Bi(re?.startField, C.date ? "date" : void 0, C.start_date ? "start_date" : void 0), [re, C]), le = g(() => {
7226
7447
  if (ce) return {
7227
7448
  startField: ce,
7228
- titleField: zi(re?.titleField, C.title ? "title" : void 0, C.name ? "name" : void 0) ?? "name"
7449
+ titleField: Bi(re?.titleField, C.title ? "title" : void 0, C.name ? "name" : void 0) ?? "name"
7229
7450
  };
7230
7451
  }, [
7231
7452
  re,
@@ -7235,14 +7456,14 @@ function Ui({ doctype: e, view: t }) {
7235
7456
  let e = m?.list?.columns || m?.list_columns;
7236
7457
  return Array.isArray(e) && e.length > 0 ? e.map((e) => ({
7237
7458
  field: typeof e == "string" ? e : String(e.field ?? ""),
7238
- label: typeof e == "string" ? Bi(e) : String(e.label ?? e.field ?? ""),
7459
+ label: typeof e == "string" ? Vi(e) : String(e.label ?? e.field ?? ""),
7239
7460
  width: typeof e == "object" && e && Number(e.width) || void 0,
7240
7461
  sortable: typeof e == "object" && e ? e.sortable !== !1 : !0
7241
- })).filter((e) => e.field) : Object.keys(C).filter((e) => !Pi.has(e) && !Vi(C[e])).sort((e, t) => e === "name" ? -1 : +(t === "name")).slice(0, 4).map((e) => {
7462
+ })).filter((e) => e.field) : Object.keys(C).filter((e) => !Fi.has(e) && !Hi(C[e])).sort((e, t) => e === "name" ? -1 : +(t === "name")).slice(0, 4).map((e) => {
7242
7463
  let t = C[e];
7243
7464
  return {
7244
7465
  field: e,
7245
- label: typeof t?.title == "string" && t.title || Bi(e),
7466
+ label: typeof t?.title == "string" && t.title || Vi(e),
7246
7467
  width: void 0,
7247
7468
  sortable: !0
7248
7469
  };
@@ -7261,14 +7482,14 @@ function Ui({ doctype: e, view: t }) {
7261
7482
  header: e.label,
7262
7483
  size: e.width,
7263
7484
  enableSorting: e.sortable ?? !0,
7264
- cell: ({ getValue: t }) => Hi(C[e.field], t())
7485
+ cell: ({ getValue: t }) => Ui(C[e.field], t())
7265
7486
  })), [we, C]), Z = g(() => {
7266
7487
  let e = m?.additional_views?.tree;
7267
- return zi(e?.labelField, C.title ? "title" : void 0, C.subject ? "subject" : void 0, C.label ? "label" : void 0, C.name ? "name" : void 0) ?? "name";
7268
- }, [m, C]), Ee = g(() => q ? Ii(C[q]).map((e) => ({
7488
+ return Bi(e?.labelField, C.title ? "title" : void 0, C.subject ? "subject" : void 0, C.label ? "label" : void 0, C.name ? "name" : void 0) ?? "name";
7489
+ }, [m, C]), Ee = g(() => q ? Li(C[q]).map((e) => ({
7269
7490
  id: e,
7270
7491
  title: e.charAt(0).toUpperCase() + e.slice(1).replaceAll("_", " ")
7271
- })) : [], [q, C]), De = zi(ne?.cardTitleField, C.title ? "title" : void 0, C.subject ? "subject" : void 0, C.name ? "name" : void 0, "name"), Oe = zi(ne?.cardSubtitleField, C.description ? "description" : void 0, C.notes ? "notes" : void 0), ke = p(() => {
7492
+ })) : [], [q, C]), De = Bi(G?.cardTitleField, C.title ? "title" : void 0, C.subject ? "subject" : void 0, C.name ? "name" : void 0, "name"), Oe = Bi(G?.cardSubtitleField, C.description ? "description" : void 0, C.notes ? "notes" : void 0), ke = p(() => {
7272
7493
  if (!o) {
7273
7494
  _("Authentication required. Please login first."), r("/login");
7274
7495
  return;
@@ -7302,7 +7523,7 @@ function Ui({ doctype: e, view: t }) {
7302
7523
  Ae,
7303
7524
  i,
7304
7525
  je
7305
- ]), Ie = g(() => Bi(i), [i]), Le = g(() => {
7526
+ ]), Ie = g(() => Vi(i), [i]), Le = g(() => {
7306
7527
  let e = s;
7307
7528
  for (let t of e || []) if (t.resources?.some((e) => e.name === i)) return t.label || t.app_id || "App";
7308
7529
  return "App";
@@ -7310,7 +7531,7 @@ function Ui({ doctype: e, view: t }) {
7310
7531
  let t = Number(e.docstatus);
7311
7532
  return t === 1 || t === 2;
7312
7533
  }), [x]);
7313
- return /* @__PURE__ */ w(gi, {
7534
+ return /* @__PURE__ */ w(_i, {
7314
7535
  doctype: i,
7315
7536
  metaLoading: d,
7316
7537
  metaError: f,
@@ -7384,7 +7605,7 @@ function Ui({ doctype: e, view: t }) {
7384
7605
  }
7385
7606
  //#endregion
7386
7607
  //#region src/components/form/FormToolbar.tsx
7387
- function Wi({ frm: e, submitLabel: t, docstatus: n }) {
7608
+ function Gi({ frm: e, submitLabel: t, docstatus: n }) {
7388
7609
  let { t: r } = $("desk"), i = e.isLocked;
7389
7610
  return /* @__PURE__ */ w(P, {
7390
7611
  style: {
@@ -7440,17 +7661,17 @@ function Wi({ frm: e, submitLabel: t, docstatus: n }) {
7440
7661
  }
7441
7662
  //#endregion
7442
7663
  //#region src/shell/context.ts
7443
- var Gi = f(null);
7664
+ var Ki = f(null);
7444
7665
  //#endregion
7445
7666
  //#region src/hooks/useShell.ts
7446
- function Ki() {
7447
- let e = m(Gi);
7667
+ function qi() {
7668
+ let e = m(Ki);
7448
7669
  if (!e) throw Error("useShell must be used within a ShellProvider");
7449
7670
  return e;
7450
7671
  }
7451
7672
  //#endregion
7452
7673
  //#region src/components/form/FormViewHeader.tsx
7453
- var qi = ({ appName: e, isSingleton: t, doctype: n, id: r, isEditing: i, displayName: a, title: o, frm: s, submitLabel: c, onSave: l, onDiscard: u, isSaving: d, isLocked: f, docstatus: p, showSystemInfo: m, setShowSystemInfo: h, openPrintPreview: g, downloadPrintPdf: _, isMobile: v = !1, onDelete: y }) => {
7674
+ var Ji = ({ appName: e, isSingleton: t, doctype: n, id: r, isEditing: i, displayName: a, title: o, frm: s, submitLabel: c, onSave: l, onDiscard: u, isSaving: d, isLocked: f, docstatus: p, showSystemInfo: m, setShowSystemInfo: h, openPrintPreview: g, downloadPrintPdf: _, isMobile: v = !1, onDelete: y }) => {
7454
7675
  let { t: b } = $("desk");
7455
7676
  return /* @__PURE__ */ T(H, {
7456
7677
  marginBottom: "$lg",
@@ -7540,7 +7761,7 @@ var qi = ({ appName: e, isSingleton: t, doctype: n, id: r, isEditing: i, display
7540
7761
  children: c
7541
7762
  })] })
7542
7763
  }),
7543
- i && s.workflow && /* @__PURE__ */ w(gr, {
7764
+ i && s.workflow && /* @__PURE__ */ w(_r, {
7544
7765
  doctype: n,
7545
7766
  id: r,
7546
7767
  showState: !0,
@@ -7644,21 +7865,21 @@ var qi = ({ appName: e, isSingleton: t, doctype: n, id: r, isEditing: i, display
7644
7865
  s.notices && s.notices.length > 0 && /* @__PURE__ */ w(H, {
7645
7866
  marginBottom: "$md",
7646
7867
  gap: "$sm",
7647
- children: s.notices.map((e, t) => /* @__PURE__ */ w(cr, {
7868
+ children: s.notices.map((e, t) => /* @__PURE__ */ w(lr, {
7648
7869
  message: e,
7649
7870
  variant: "info"
7650
7871
  }, `${e}-${t}`))
7651
7872
  }),
7652
7873
  s.isLocked && /* @__PURE__ */ w(H, {
7653
7874
  marginBottom: "$md",
7654
- children: /* @__PURE__ */ w(lr, { docstatus: Number(s.doc?.docstatus) === 2 ? 2 : 1 })
7875
+ children: /* @__PURE__ */ w(ur, { docstatus: Number(s.doc?.docstatus) === 2 ? 2 : 1 })
7655
7876
  })
7656
7877
  ]
7657
7878
  });
7658
7879
  };
7659
7880
  //#endregion
7660
7881
  //#region src/pages/FormView.tsx
7661
- function Ji({ doctype: e, id: t }) {
7882
+ function Yi({ doctype: e, id: t }) {
7662
7883
  let { doctype: n, id: r, frm: i, schema: a, metaLoading: o, metaError: s, docError: c, record: l } = en({
7663
7884
  doctype: e,
7664
7885
  id: t
@@ -7674,17 +7895,17 @@ function Ji({ doctype: e, id: t }) {
7674
7895
  };
7675
7896
  return u ? /* @__PURE__ */ w(u, {
7676
7897
  ...d,
7677
- children: /* @__PURE__ */ w(Yi, { ...d })
7678
- }) : /* @__PURE__ */ w(Yi, { ...d });
7898
+ children: /* @__PURE__ */ w(Xi, { ...d })
7899
+ }) : /* @__PURE__ */ w(Xi, { ...d });
7679
7900
  }
7680
- function Yi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a, docError: o, record: s }) {
7901
+ function Xi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a, docError: o, record: s }) {
7681
7902
  let { t: c, changeLanguage: u, language: d } = $("desk"), f = {
7682
7903
  isMobile: !1,
7683
7904
  rightSidebarOpen: !1,
7684
7905
  setRightSidebarOpen: () => {}
7685
7906
  };
7686
7907
  try {
7687
- f = Ki();
7908
+ f = qi();
7688
7909
  } catch {}
7689
7910
  let p = [];
7690
7911
  try {
@@ -7698,64 +7919,45 @@ function Yi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
7698
7919
  frm: n,
7699
7920
  shell: f,
7700
7921
  apps: p
7701
- }), { mutateAsync: W } = de(), te = Me(), [G] = Pe(), ne = _(!1), K = _(null), re = _(null), [J, Y] = v(!1), ie = _(!1);
7922
+ }), { mutateAsync: W } = de(), te = Me(), [ne] = Pe(), G = _(null), K = _(null), [re, J] = v(!1), Y = _(!1);
7702
7923
  h(() => {
7924
+ G.current = null, K.current = null;
7925
+ }, [
7926
+ t,
7927
+ e,
7928
+ ne.get("form")
7929
+ ]), h(() => {
7703
7930
  if (s) {
7704
7931
  let e = JSON.stringify(s);
7705
- re.current !== e && (re.current = e, K.current = e);
7706
- } else if (n.doc && K.current === null) {
7707
- let e = setTimeout(() => {
7708
- K.current = JSON.stringify(n.doc);
7709
- }, 500);
7710
- return () => clearTimeout(e);
7711
- }
7932
+ K.current !== e && (K.current = e, G.current = e);
7933
+ } else n.doc && G.current === null && (G.current = JSON.stringify(n.doc));
7712
7934
  }, [s, n.doc]), h(() => {
7713
- K.current && n.doc && !n.isSaving && Y(JSON.stringify(n.doc) !== K.current);
7935
+ G.current && n.doc && !n.isSaving && J(JSON.stringify(n.doc) !== G.current);
7714
7936
  }, [n.doc, n.isSaving]), h(() => {
7715
- let e = G.get("lng");
7937
+ let e = ne.get("lng");
7716
7938
  e && u && d !== e && u(e).catch(() => void 0);
7717
- let t;
7718
- if (!I && !ne.current && n.doc) {
7719
- let e = !1, r = { ...n.doc }, i = G.get("form");
7720
- if (i) try {
7721
- let t = JSON.parse(i);
7722
- Object.entries(t).forEach(([t, n]) => {
7723
- (r[t] === void 0 || r[t] === null || r[t] === "") && (r[t] = n, e = !0);
7724
- });
7725
- } catch (e) {
7726
- console.error("Failed to parse form query parameter:", e);
7727
- }
7728
- e && (t = setTimeout(() => {
7729
- n.setDoc(r);
7730
- }, 50)), ne.current = !0;
7731
- }
7732
- return () => {
7733
- t && clearTimeout(t);
7734
- };
7735
7939
  }, [
7736
- I,
7737
- n,
7738
- G,
7940
+ ne,
7739
7941
  u,
7740
7942
  d
7741
7943
  ]), h(() => {
7742
- if (!J || n.isSaving || typeof window > "u" || !window.addEventListener) return;
7944
+ if (!re || n.isSaving || typeof window > "u" || !window.addEventListener) return;
7743
7945
  let e = (e) => {
7744
7946
  e.preventDefault(), e.returnValue = "";
7745
7947
  };
7746
7948
  return window.addEventListener("beforeunload", e), () => window.removeEventListener("beforeunload", e);
7747
- }, [J, n.isSaving]);
7748
- let ae = Ae(({ currentLocation: e, nextLocation: t }) => ie.current || t.state?.bypassBlocker ? !1 : J && !n.isSaving && e.pathname !== t.pathname);
7949
+ }, [re, n.isSaving]);
7950
+ let ie = Ae(({ currentLocation: e, nextLocation: t }) => Y.current || t.state?.bypassBlocker ? !1 : re && !n.isSaving && e.pathname !== t.pathname);
7749
7951
  h(() => {
7750
- ae.state === "blocked" && E(!0);
7751
- }, [ae.state]), h(() => {
7952
+ ie.state === "blocked" && E(!0);
7953
+ }, [ie.state]), h(() => {
7752
7954
  if (typeof window > "u" || !window.addEventListener) return;
7753
7955
  let e = (e) => {
7754
7956
  (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "s" && (e.preventDefault(), !n.isLocked && !n.isSaving && n.save({ preventNavigation: !!k?.auto_save }));
7755
7957
  };
7756
7958
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
7757
7959
  }, [n, k?.auto_save]), h(() => {
7758
- if (k?.auto_save && I && J && !n.isSaving && !n.isLocked && (!s || s.docstatus === 0 || s.docstatus === void 0)) {
7960
+ if (k?.auto_save && I && re && !n.isSaving && !n.isLocked && (!s || s.docstatus === 0 || s.docstatus === void 0)) {
7759
7961
  let e = setTimeout(() => {
7760
7962
  n.save({ preventNavigation: !0 });
7761
7963
  }, 1500);
@@ -7764,27 +7966,27 @@ function Yi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
7764
7966
  }, [
7765
7967
  k?.auto_save,
7766
7968
  I,
7767
- J,
7969
+ re,
7768
7970
  n.doc,
7769
7971
  n.isSaving,
7770
7972
  n.isLocked,
7771
7973
  s?.docstatus,
7772
7974
  n
7773
7975
  ]);
7774
- let oe = async () => {
7976
+ let ae = async () => {
7775
7977
  if (t) {
7776
- ie.current = !0, Y(!1);
7978
+ Y.current = !0, J(!1);
7777
7979
  try {
7778
7980
  await W({
7779
7981
  resource: e,
7780
7982
  id: t
7781
7983
  }), x(!1), te(`/app/${e}/list`, { state: { bypassBlocker: !0 } });
7782
7984
  } catch (t) {
7783
- ie.current = !1, x(!1), O(t.message || `Failed to delete ${e}.`);
7985
+ Y.current = !1, x(!1), O(t.message || `Failed to delete ${e}.`);
7784
7986
  }
7785
7987
  }
7786
7988
  };
7787
- return i ? /* @__PURE__ */ w(jr, {}) : a ? /* @__PURE__ */ w(H, {
7989
+ return i ? /* @__PURE__ */ w(Mr, {}) : a ? /* @__PURE__ */ w(H, {
7788
7990
  padding: "$xl",
7789
7991
  backgroundColor: "$background",
7790
7992
  minHeight: "100%",
@@ -7819,7 +8021,7 @@ function Yi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
7819
8021
  onTouchEnd: f.isMobile ? (e) => j(e) : void 0,
7820
8022
  paddingBottom: "$0",
7821
8023
  children: [
7822
- /* @__PURE__ */ w(qi, {
8024
+ /* @__PURE__ */ w(Ji, {
7823
8025
  appName: V,
7824
8026
  isSingleton: L,
7825
8027
  doctype: e,
@@ -7831,11 +8033,11 @@ function Yi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
7831
8033
  submitLabel: ee,
7832
8034
  onSave: () => n.save({ preventNavigation: !!k?.auto_save }),
7833
8035
  onDiscard: () => {
7834
- if (J) {
8036
+ if (re) {
7835
8037
  E(!0);
7836
8038
  return;
7837
8039
  }
7838
- ie.current = !0, Y(!1), n.cancel();
8040
+ Y.current = !0, J(!1), n.cancel();
7839
8041
  },
7840
8042
  isSaving: n.isSaving,
7841
8043
  isLocked: n.isLocked,
@@ -7863,7 +8065,7 @@ function Yi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
7863
8065
  fontSize: "$xs",
7864
8066
  color: "$colorMuted",
7865
8067
  fontWeight: "500",
7866
- children: n.isSaving ? c("Auto-saving...") : c(J ? "Unsaved changes" : "Saved")
8068
+ children: n.isSaving ? c("Auto-saving...") : c(re ? "Unsaved changes" : "Saved")
7867
8069
  })
7868
8070
  }),
7869
8071
  D && /* @__PURE__ */ w(P, {
@@ -7878,7 +8080,7 @@ function Yi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
7878
8080
  children: D
7879
8081
  })
7880
8082
  }),
7881
- /* @__PURE__ */ w(xr, {
8083
+ /* @__PURE__ */ w(Sr, {
7882
8084
  name: "form-header",
7883
8085
  doctype: e,
7884
8086
  data: n.doc,
@@ -7899,7 +8101,7 @@ function Yi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
7899
8101
  uiMeta: k,
7900
8102
  frm: n,
7901
8103
  id: t
7902
- }), /* @__PURE__ */ w(xr, {
8104
+ }), /* @__PURE__ */ w(Sr, {
7903
8105
  name: "form-footer",
7904
8106
  doctype: e,
7905
8107
  data: n.doc,
@@ -7930,6 +8132,7 @@ function Yi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
7930
8132
  flex: 1,
7931
8133
  children: c("System Info")
7932
8134
  }), /* @__PURE__ */ w(N, {
8135
+ "aria-label": "Close system info",
7933
8136
  size: "sm",
7934
8137
  variant: "ghost",
7935
8138
  onPress: () => y(!1),
@@ -7945,17 +8148,17 @@ function Yi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
7945
8148
  })]
7946
8149
  })]
7947
8150
  }),
7948
- f.isMobile && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Wi, {
8151
+ f.isMobile && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Gi, {
7949
8152
  frm: n,
7950
8153
  submitLabel: ee,
7951
8154
  docstatus: s?.docstatus
7952
- }), /* @__PURE__ */ w(xr, {
8155
+ }), /* @__PURE__ */ w(Sr, {
7953
8156
  name: "form-actions",
7954
8157
  doctype: e,
7955
8158
  data: n.doc,
7956
8159
  id: t
7957
8160
  })] }),
7958
- /* @__PURE__ */ w(or, {
8161
+ /* @__PURE__ */ w(sr, {
7959
8162
  open: b,
7960
8163
  title: c("Confirm Delete"),
7961
8164
  message: c("Are you sure you want to delete this document? This action cannot be undone."),
@@ -7963,11 +8166,11 @@ function Yi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
7963
8166
  cancelLabel: c("Cancel"),
7964
8167
  destructive: !0,
7965
8168
  onConfirm: () => {
7966
- oe().catch(() => void 0);
8169
+ ae().catch(() => void 0);
7967
8170
  },
7968
8171
  onCancel: () => x(!1)
7969
8172
  }),
7970
- /* @__PURE__ */ w(or, {
8173
+ /* @__PURE__ */ w(sr, {
7971
8174
  open: S,
7972
8175
  title: c("Unsaved Changes"),
7973
8176
  message: c("You have unsaved changes. Are you sure you want to discard them?"),
@@ -7975,10 +8178,10 @@ function Yi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
7975
8178
  cancelLabel: c("Cancel"),
7976
8179
  destructive: !0,
7977
8180
  onConfirm: () => {
7978
- E(!1), ie.current = !0, Y(!1), ae.state === "blocked" ? ae.proceed() : n.cancel();
8181
+ E(!1), Y.current = !0, J(!1), ie.state === "blocked" ? ie.proceed() : n.cancel();
7979
8182
  },
7980
8183
  onCancel: () => {
7981
- E(!1), ae.state === "blocked" && ae.reset();
8184
+ E(!1), ie.state === "blocked" && ie.reset();
7982
8185
  }
7983
8186
  })
7984
8187
  ]
@@ -7986,7 +8189,7 @@ function Yi({ doctype: e, id: t, frm: n, meta: r, metaLoading: i, metaError: a,
7986
8189
  }
7987
8190
  //#endregion
7988
8191
  //#region src/pages/loginUtils.ts
7989
- var Xi = {
8192
+ var Zi = {
7990
8193
  google: {
7991
8194
  label: "Continue with Google",
7992
8195
  icon: "G"
@@ -8004,7 +8207,7 @@ var Xi = {
8004
8207
  icon: "RA"
8005
8208
  }
8006
8209
  };
8007
- function Zi() {
8210
+ function Qi() {
8008
8211
  let e = globalThis, t = e.__FRAMEWORK_OAUTH_PROVIDERS__;
8009
8212
  if (Array.isArray(t)) return t;
8010
8213
  let n = e.__FRAMEWORK_CONFIG__?.auth?.oauth?.providers;
@@ -8012,7 +8215,7 @@ function Zi() {
8012
8215
  }
8013
8216
  //#endregion
8014
8217
  //#region src/pages/LoginLogo.tsx
8015
- function Qi({ logo: e }) {
8218
+ function $i({ logo: e }) {
8016
8219
  let { t } = $("desk");
8017
8220
  return e ? typeof e == "string" ? /* @__PURE__ */ w("img", {
8018
8221
  src: e,
@@ -8034,11 +8237,11 @@ function Qi({ logo: e }) {
8034
8237
  }
8035
8238
  //#endregion
8036
8239
  //#region src/pages/LoginPage.tsx
8037
- function $i({ ...e }) {
8038
- return w(on("LoginPage") || ea, { ...e });
8240
+ function ea({ ...e }) {
8241
+ return w(on("LoginPage") || ta, { ...e });
8039
8242
  }
8040
- function ea({ title: e = "Welcome back", logo: t, redirectTo: n }) {
8041
- let { t: r } = $("desk"), [i] = Pe(), a = n ?? i.get("to") ?? void 0, { mutate: o, status: s } = _e(), [c, l] = v(null), [u, d] = v(null), [f, p] = v(""), [m, g] = v(""), [_, y] = v(!1), [b, x] = v(!1), [S, C] = v(!1), { theme: E, toggleTheme: D } = Y(), O = Mt(), k = s === "pending", A = k || S, [j, M] = v(Zi()), F = b ? r("Reset Password") : e === "Welcome back" ? r("Welcome back") : e, I = r(b ? "Enter your email to receive a reset link" : "Sign in to your account");
8243
+ function ta({ title: e = "Welcome back", logo: t, redirectTo: n }) {
8244
+ let { t: r } = $("desk"), [i] = Pe(), a = n ?? i.get("to") ?? void 0, { mutate: o, status: s } = _e(), [c, l] = v(null), [u, d] = v(null), [f, p] = v(""), [m, g] = v(""), [_, y] = v(!1), [b, x] = v(!1), [S, C] = v(!1), { theme: E, toggleTheme: D } = Y(), O = Mt(), k = s === "pending", A = k || S, [j, M] = v(Qi()), F = b ? r("Reset Password") : e === "Welcome back" ? r("Welcome back") : e, I = r(b ? "Enter your email to receive a reset link" : "Sign in to your account");
8042
8245
  h(() => {
8043
8246
  (async () => {
8044
8247
  try {
@@ -8141,7 +8344,7 @@ function ea({ title: e = "Welcome back", logo: t, redirectTo: n }) {
8141
8344
  alignItems: "center",
8142
8345
  marginBottom: "$xl",
8143
8346
  gap: "$md",
8144
- children: [/* @__PURE__ */ w(Qi, { logo: t }), /* @__PURE__ */ T(J, {
8347
+ children: [/* @__PURE__ */ w($i, { logo: t }), /* @__PURE__ */ T(J, {
8145
8348
  alignItems: "center",
8146
8349
  gap: "$xs",
8147
8350
  children: [/* @__PURE__ */ w(L, {
@@ -8168,10 +8371,10 @@ function ea({ title: e = "Welcome back", logo: t, redirectTo: n }) {
8168
8371
  children: [/* @__PURE__ */ w(L, {
8169
8372
  fontSize: "$sm",
8170
8373
  opacity: .7,
8171
- children: Xi[e]?.icon || "ID"
8374
+ children: Zi[e]?.icon || "ID"
8172
8375
  }), /* @__PURE__ */ w(W, {
8173
8376
  fontSize: "$sm",
8174
- children: Xi[e]?.label || r("Continue with {{provider}}", { provider: e })
8377
+ children: Zi[e]?.label || r("Continue with {{provider}}", { provider: e })
8175
8378
  })]
8176
8379
  })
8177
8380
  }, e)), /* @__PURE__ */ T(q, {
@@ -8328,7 +8531,7 @@ function ea({ title: e = "Welcome back", logo: t, redirectTo: n }) {
8328
8531
  }
8329
8532
  //#endregion
8330
8533
  //#region src/shell/adapters/localRealtimeAdapter.ts
8331
- function ta() {
8534
+ function na() {
8332
8535
  let e = "frameworkm-realtime";
8333
8536
  return {
8334
8537
  connect: (t) => {
@@ -8349,7 +8552,7 @@ function ta() {
8349
8552
  }
8350
8553
  //#endregion
8351
8554
  //#region src/shell/hooks/useRealtime.ts
8352
- function na(e, t, n) {
8555
+ function ra(e, t, n) {
8353
8556
  let r = [...e[t] ?? []].filter((e) => e !== n);
8354
8557
  if (r.length > 0) return {
8355
8558
  ...e,
@@ -8358,15 +8561,15 @@ function na(e, t, n) {
8358
8561
  let i = { ...e };
8359
8562
  return delete i[t], i;
8360
8563
  }
8361
- function ra(e) {
8362
- let t = _(e ?? ta()), n = _(null), r = _({}), i = p((e) => {
8564
+ function ia(e) {
8565
+ let t = _(e ?? na()), n = _(null), r = _({}), i = p((e) => {
8363
8566
  let t = r.current, n = t[e.room] ?? [], i = t["*"] ?? [], a = [...n, ...i];
8364
8567
  for (let t of a) t(e);
8365
8568
  }, []);
8366
8569
  return {
8367
8570
  setRealtimeAdapter: p(async (e) => {
8368
8571
  n.current && n.current();
8369
- let r = e ?? ta();
8572
+ let r = e ?? na();
8370
8573
  n.current = await r.connect(i) ?? null, t.current = r;
8371
8574
  }, [i]),
8372
8575
  subscribeRealtime: p((e, t) => {
@@ -8375,7 +8578,7 @@ function ra(e) {
8375
8578
  ...n,
8376
8579
  [e]: [...n[e] ?? [], t]
8377
8580
  }, () => {
8378
- r.current = na(r.current, e, t);
8581
+ r.current = ra(r.current, e, t);
8379
8582
  };
8380
8583
  }, []),
8381
8584
  publishRealtime: p(async (e, n, r) => {
@@ -8391,14 +8594,14 @@ function ra(e) {
8391
8594
  }
8392
8595
  //#endregion
8393
8596
  //#region src/shell/hooks/useOmniSearch.ts
8394
- function ia(e, t) {
8597
+ function aa(e, t) {
8395
8598
  return e.filter((e) => e !== t);
8396
8599
  }
8397
- function aa() {
8600
+ function oa() {
8398
8601
  let [e, t] = v([]);
8399
8602
  return {
8400
8603
  registerOmniSearchProvider: p((e) => (t((t) => [...t, e]), () => {
8401
- t((t) => ia(t, e));
8604
+ t((t) => aa(t, e));
8402
8605
  }), []),
8403
8606
  searchOmni: p(async (t) => {
8404
8607
  let n = t.trim();
@@ -8411,19 +8614,19 @@ function aa() {
8411
8614
  }
8412
8615
  //#endregion
8413
8616
  //#region src/shell/hooks/useSidebarSections.ts
8414
- function oa(e, t) {
8617
+ function sa(e, t) {
8415
8618
  let n = [];
8416
8619
  for (let r of e) r.id !== t.id && n.push(r);
8417
8620
  return n.push(t), n;
8418
8621
  }
8419
- function sa(e, t) {
8622
+ function ca(e, t) {
8420
8623
  let n = [];
8421
8624
  for (let r of e) r.id !== t && n.push(r);
8422
8625
  return n;
8423
8626
  }
8424
- function ca(e = [], t = !1) {
8425
- let [n, r] = v([]), [i, a] = v(t), [o, s] = v(!1), c = Mt(), l = p((e) => (r((t) => oa(t, e)), () => {
8426
- r((t) => sa(t, e.id));
8627
+ function la(e = [], t = !1) {
8628
+ let [n, r] = v([]), [i, a] = v(t), [o, s] = v(!1), c = Mt(), l = p((e) => (r((t) => sa(t, e)), () => {
8629
+ r((t) => ca(t, e.id));
8427
8630
  }), []), u = p((e) => n.filter((t) => t.slot === e).sort((e, t) => (e.order ?? 999) - (t.order ?? 999)), [n]);
8428
8631
  return h(() => {
8429
8632
  s(!1);
@@ -8498,8 +8701,8 @@ function ca(e = [], t = !1) {
8498
8701
  }
8499
8702
  //#endregion
8500
8703
  //#region src/shell/ShellProvider.tsx
8501
- function la({ children: e, isMobile: t = !1, isGuest: n = !1, rightSidebarOpen: r = !1, setRightSidebarOpen: i = () => {}, focusMode: a, setFocusMode: o, realtimeAdapter: s, initialPlugins: c = [] }) {
8502
- let { setRealtimeAdapter: l, subscribeRealtime: u, publishRealtime: d } = ra(s), { registerOmniSearchProvider: f, searchOmni: p } = aa(), { internalIsGuest: m, registerSection: h, getSections: _ } = ca(c, n), v = g(() => ({
8704
+ function ua({ children: e, isMobile: t = !1, isGuest: n = !1, rightSidebarOpen: r = !1, setRightSidebarOpen: i = () => {}, focusMode: a, setFocusMode: o, realtimeAdapter: s, initialPlugins: c = [] }) {
8705
+ let { setRealtimeAdapter: l, subscribeRealtime: u, publishRealtime: d } = ia(s), { registerOmniSearchProvider: f, searchOmni: p } = oa(), { internalIsGuest: m, registerSection: h, getSections: _ } = la(c, n), v = g(() => ({
8503
8706
  isMobile: t,
8504
8707
  isGuest: m,
8505
8708
  rightSidebarOpen: r,
@@ -8529,14 +8732,14 @@ function la({ children: e, isMobile: t = !1, isGuest: n = !1, rightSidebarOpen:
8529
8732
  u,
8530
8733
  d
8531
8734
  ]);
8532
- return /* @__PURE__ */ w(Gi.Provider, {
8735
+ return /* @__PURE__ */ w(Ki.Provider, {
8533
8736
  value: v,
8534
8737
  children: e
8535
8738
  });
8536
8739
  }
8537
8740
  //#endregion
8538
8741
  //#region src/shell/realtime.ts
8539
- function ua(e) {
8742
+ function da(e) {
8540
8743
  let t = null;
8541
8744
  return {
8542
8745
  connect: (n) => {
@@ -8558,11 +8761,11 @@ function ua(e) {
8558
8761
  }
8559
8762
  //#endregion
8560
8763
  //#region ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js
8561
- var da = /* @__PURE__ */ Q(((e, t) => {
8764
+ var fa = /* @__PURE__ */ Q(((e, t) => {
8562
8765
  t.exports = TypeError;
8563
- })), fa = /* @__PURE__ */ Q(((e, t) => {
8564
- t.exports = {};
8565
8766
  })), pa = /* @__PURE__ */ Q(((e, t) => {
8767
+ t.exports = {};
8768
+ })), ma = /* @__PURE__ */ Q(((e, t) => {
8566
8769
  var n = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, i = n && r && typeof r.get == "function" ? r.get : null, a = n && Map.prototype.forEach, o = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && o ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, c = o && s && typeof s.get == "function" ? s.get : null, l = o && Set.prototype.forEach, u = typeof WeakMap == "function" && WeakMap.prototype ? WeakMap.prototype.has : null, d = typeof WeakSet == "function" && WeakSet.prototype ? WeakSet.prototype.has : null, f = typeof WeakRef == "function" && WeakRef.prototype ? WeakRef.prototype.deref : null, p = Boolean.prototype.valueOf, m = Object.prototype.toString, h = Function.prototype.toString, g = String.prototype.match, _ = String.prototype.slice, v = String.prototype.replace, y = String.prototype.toUpperCase, b = String.prototype.toLowerCase, x = RegExp.prototype.test, S = Array.prototype.concat, C = Array.prototype.join, w = Array.prototype.slice, T = Math.floor, E = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, D = Object.getOwnPropertySymbols, O = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, k = typeof Symbol == "function" && typeof Symbol.iterator == "object", A = typeof Symbol == "function" && Symbol.toStringTag ? Symbol.toStringTag : null, j = Object.prototype.propertyIsEnumerable, M = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(e) {
8567
8770
  return e.__proto__;
8568
8771
  } : null);
@@ -8578,7 +8781,7 @@ var da = /* @__PURE__ */ Q(((e, t) => {
8578
8781
  }
8579
8782
  return v.call(t, n, "$&_");
8580
8783
  }
8581
- var P = fa(), F = P.custom, I = K(F) ? F : null, L = {
8784
+ var P = pa(), F = P.custom, I = K(F) ? F : null, L = {
8582
8785
  __proto__: null,
8583
8786
  double: "\"",
8584
8787
  single: "'"
@@ -8661,9 +8864,9 @@ var da = /* @__PURE__ */ Q(((e, t) => {
8661
8864
  if (se(t)) return he("WeakMap");
8662
8865
  if (ue(t)) return he("WeakSet");
8663
8866
  if (ce(t)) return he("WeakRef");
8664
- if (G(t)) return me(y(Number(t)));
8867
+ if (ne(t)) return me(y(Number(t)));
8665
8868
  if (re(t)) return me(y(E.call(t)));
8666
- if (ne(t)) return me(p.call(t));
8869
+ if (G(t)) return me(p.call(t));
8667
8870
  if (te(t)) return me(y(String(t)));
8668
8871
  if (typeof window < "u" && t === window) return "{ [object Window] }";
8669
8872
  if (typeof globalThis < "u" && t === globalThis || typeof global < "u" && t === global) return "{ [object globalThis] }";
@@ -8698,10 +8901,10 @@ var da = /* @__PURE__ */ Q(((e, t) => {
8698
8901
  function te(e) {
8699
8902
  return Y(e) === "[object String]" && V(e);
8700
8903
  }
8701
- function G(e) {
8904
+ function ne(e) {
8702
8905
  return Y(e) === "[object Number]" && V(e);
8703
8906
  }
8704
- function ne(e) {
8907
+ function G(e) {
8705
8908
  return Y(e) === "[object Boolean]" && V(e);
8706
8909
  }
8707
8910
  function K(e) {
@@ -8863,8 +9066,8 @@ var da = /* @__PURE__ */ Q(((e, t) => {
8863
9066
  if (typeof D == "function") for (var l = 0; l < a.length; l++) j.call(e, a[l]) && r.push("[" + t(a[l]) + "]: " + t(e[a[l]], e));
8864
9067
  return r;
8865
9068
  }
8866
- })), ma = /* @__PURE__ */ Q(((e, t) => {
8867
- var n = pa(), r = da(), i = function(e, t, n) {
9069
+ })), ha = /* @__PURE__ */ Q(((e, t) => {
9070
+ var n = ma(), r = fa(), i = function(e, t, n) {
8868
9071
  for (var r = e, i; (i = r.next) != null; r = i) if (i.key === t) return r.next = i.next, n || (i.next = e.next, e.next = i), i;
8869
9072
  }, a = function(e, t) {
8870
9073
  if (e) {
@@ -8904,52 +9107,52 @@ var da = /* @__PURE__ */ Q(((e, t) => {
8904
9107
  };
8905
9108
  return t;
8906
9109
  };
8907
- })), ha = /* @__PURE__ */ Q(((e, t) => {
8908
- t.exports = Object;
8909
9110
  })), ga = /* @__PURE__ */ Q(((e, t) => {
8910
- t.exports = Error;
9111
+ t.exports = Object;
8911
9112
  })), _a = /* @__PURE__ */ Q(((e, t) => {
8912
- t.exports = EvalError;
9113
+ t.exports = Error;
8913
9114
  })), va = /* @__PURE__ */ Q(((e, t) => {
8914
- t.exports = RangeError;
9115
+ t.exports = EvalError;
8915
9116
  })), ya = /* @__PURE__ */ Q(((e, t) => {
8916
- t.exports = ReferenceError;
9117
+ t.exports = RangeError;
8917
9118
  })), ba = /* @__PURE__ */ Q(((e, t) => {
8918
- t.exports = SyntaxError;
9119
+ t.exports = ReferenceError;
8919
9120
  })), xa = /* @__PURE__ */ Q(((e, t) => {
8920
- t.exports = URIError;
9121
+ t.exports = SyntaxError;
8921
9122
  })), Sa = /* @__PURE__ */ Q(((e, t) => {
8922
- t.exports = Math.abs;
9123
+ t.exports = URIError;
8923
9124
  })), Ca = /* @__PURE__ */ Q(((e, t) => {
8924
- t.exports = Math.floor;
9125
+ t.exports = Math.abs;
8925
9126
  })), wa = /* @__PURE__ */ Q(((e, t) => {
8926
- t.exports = Math.max;
9127
+ t.exports = Math.floor;
8927
9128
  })), Ta = /* @__PURE__ */ Q(((e, t) => {
8928
- t.exports = Math.min;
9129
+ t.exports = Math.max;
8929
9130
  })), Ea = /* @__PURE__ */ Q(((e, t) => {
8930
- t.exports = Math.pow;
9131
+ t.exports = Math.min;
8931
9132
  })), Da = /* @__PURE__ */ Q(((e, t) => {
8932
- t.exports = Math.round;
9133
+ t.exports = Math.pow;
8933
9134
  })), Oa = /* @__PURE__ */ Q(((e, t) => {
9135
+ t.exports = Math.round;
9136
+ })), ka = /* @__PURE__ */ Q(((e, t) => {
8934
9137
  t.exports = Number.isNaN || function(e) {
8935
9138
  return e !== e;
8936
9139
  };
8937
- })), ka = /* @__PURE__ */ Q(((e, t) => {
8938
- var n = Oa();
9140
+ })), Aa = /* @__PURE__ */ Q(((e, t) => {
9141
+ var n = ka();
8939
9142
  t.exports = function(e) {
8940
9143
  return n(e) || e === 0 ? e : e < 0 ? -1 : 1;
8941
9144
  };
8942
- })), Aa = /* @__PURE__ */ Q(((e, t) => {
8943
- t.exports = Object.getOwnPropertyDescriptor;
8944
9145
  })), ja = /* @__PURE__ */ Q(((e, t) => {
8945
- var n = Aa();
9146
+ t.exports = Object.getOwnPropertyDescriptor;
9147
+ })), Ma = /* @__PURE__ */ Q(((e, t) => {
9148
+ var n = ja();
8946
9149
  if (n) try {
8947
9150
  n([], "length");
8948
9151
  } catch {
8949
9152
  n = null;
8950
9153
  }
8951
9154
  t.exports = n;
8952
- })), Ma = /* @__PURE__ */ Q(((e, t) => {
9155
+ })), Na = /* @__PURE__ */ Q(((e, t) => {
8953
9156
  var n = Object.defineProperty || !1;
8954
9157
  if (n) try {
8955
9158
  n({}, "a", { value: 1 });
@@ -8957,7 +9160,7 @@ var da = /* @__PURE__ */ Q(((e, t) => {
8957
9160
  n = !1;
8958
9161
  }
8959
9162
  t.exports = n;
8960
- })), Na = /* @__PURE__ */ Q(((e, t) => {
9163
+ })), Pa = /* @__PURE__ */ Q(((e, t) => {
8961
9164
  t.exports = function() {
8962
9165
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1;
8963
9166
  if (typeof Symbol.iterator == "symbol") return !0;
@@ -8974,16 +9177,16 @@ var da = /* @__PURE__ */ Q(((e, t) => {
8974
9177
  }
8975
9178
  return !0;
8976
9179
  };
8977
- })), Pa = /* @__PURE__ */ Q(((e, t) => {
8978
- var n = typeof Symbol < "u" && Symbol, r = Na();
9180
+ })), Fa = /* @__PURE__ */ Q(((e, t) => {
9181
+ var n = typeof Symbol < "u" && Symbol, r = Pa();
8979
9182
  t.exports = function() {
8980
9183
  return typeof n != "function" || typeof Symbol != "function" || typeof n("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r();
8981
9184
  };
8982
- })), Fa = /* @__PURE__ */ Q(((e, t) => {
8983
- t.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
8984
9185
  })), Ia = /* @__PURE__ */ Q(((e, t) => {
8985
- t.exports = ha().getPrototypeOf || null;
9186
+ t.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
8986
9187
  })), La = /* @__PURE__ */ Q(((e, t) => {
9188
+ t.exports = ga().getPrototypeOf || null;
9189
+ })), Ra = /* @__PURE__ */ Q(((e, t) => {
8987
9190
  var n = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, i = Math.max, a = "[object Function]", o = function(e, t) {
8988
9191
  for (var n = [], r = 0; r < e.length; r += 1) n[r] = e[r];
8989
9192
  for (var i = 0; i < t.length; i += 1) n[i + e.length] = t[i];
@@ -9011,26 +9214,26 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9011
9214
  }
9012
9215
  return u;
9013
9216
  };
9014
- })), Ra = /* @__PURE__ */ Q(((e, t) => {
9015
- var n = La();
9016
- t.exports = Function.prototype.bind || n;
9017
9217
  })), za = /* @__PURE__ */ Q(((e, t) => {
9018
- t.exports = Function.prototype.call;
9218
+ var n = Ra();
9219
+ t.exports = Function.prototype.bind || n;
9019
9220
  })), Ba = /* @__PURE__ */ Q(((e, t) => {
9020
- t.exports = Function.prototype.apply;
9221
+ t.exports = Function.prototype.call;
9021
9222
  })), Va = /* @__PURE__ */ Q(((e, t) => {
9022
- t.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
9223
+ t.exports = Function.prototype.apply;
9023
9224
  })), Ha = /* @__PURE__ */ Q(((e, t) => {
9024
- var n = Ra(), r = Ba(), i = za();
9025
- t.exports = Va() || n.call(i, r);
9225
+ t.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
9026
9226
  })), Ua = /* @__PURE__ */ Q(((e, t) => {
9027
- var n = Ra(), r = da(), i = za(), a = Ha();
9227
+ var n = za(), r = Va(), i = Ba();
9228
+ t.exports = Ha() || n.call(i, r);
9229
+ })), Wa = /* @__PURE__ */ Q(((e, t) => {
9230
+ var n = za(), r = fa(), i = Ba(), a = Ua();
9028
9231
  t.exports = function(e) {
9029
9232
  if (e.length < 1 || typeof e[0] != "function") throw new r("a function is required");
9030
9233
  return a(n, i, e);
9031
9234
  };
9032
- })), Wa = /* @__PURE__ */ Q(((e, t) => {
9033
- var n = Ua(), r = ja(), i;
9235
+ })), Ga = /* @__PURE__ */ Q(((e, t) => {
9236
+ var n = Wa(), r = Ma(), i;
9034
9237
  try {
9035
9238
  i = [].__proto__ === Array.prototype;
9036
9239
  } catch (e) {
@@ -9040,8 +9243,8 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9040
9243
  t.exports = a && typeof a.get == "function" ? n([a.get]) : typeof s == "function" ? function(e) {
9041
9244
  return s(e == null ? e : o(e));
9042
9245
  } : !1;
9043
- })), Ga = /* @__PURE__ */ Q(((e, t) => {
9044
- var n = Fa(), r = Ia(), i = Wa();
9246
+ })), Ka = /* @__PURE__ */ Q(((e, t) => {
9247
+ var n = Ia(), r = La(), i = Ga();
9045
9248
  t.exports = n ? function(e) {
9046
9249
  return n(e);
9047
9250
  } : r ? function(e) {
@@ -9050,15 +9253,15 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9050
9253
  } : i ? function(e) {
9051
9254
  return i(e);
9052
9255
  } : null;
9053
- })), Ka = /* @__PURE__ */ Q(((e, t) => {
9054
- var n = Function.prototype.call, r = Object.prototype.hasOwnProperty;
9055
- t.exports = Ra().call(n, r);
9056
9256
  })), qa = /* @__PURE__ */ Q(((e, t) => {
9057
- var n, r = ha(), i = ga(), a = _a(), o = va(), s = ya(), c = ba(), l = da(), u = xa(), d = Sa(), f = Ca(), p = wa(), m = Ta(), h = Ea(), g = Da(), _ = ka(), v = Function, y = function(e) {
9257
+ var n = Function.prototype.call, r = Object.prototype.hasOwnProperty;
9258
+ t.exports = za().call(n, r);
9259
+ })), Ja = /* @__PURE__ */ Q(((e, t) => {
9260
+ var n, r = ga(), i = _a(), a = va(), o = ya(), s = ba(), c = xa(), l = fa(), u = Sa(), d = Ca(), f = wa(), p = Ta(), m = Ea(), h = Da(), g = Oa(), _ = Aa(), v = Function, y = function(e) {
9058
9261
  try {
9059
9262
  return v("\"use strict\"; return (" + e + ").constructor;")();
9060
9263
  } catch {}
9061
- }, b = ja(), x = Ma(), S = function() {
9264
+ }, b = Ma(), x = Na(), S = function() {
9062
9265
  throw new l();
9063
9266
  }, C = b ? function() {
9064
9267
  try {
@@ -9070,7 +9273,7 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9070
9273
  return S;
9071
9274
  }
9072
9275
  }
9073
- }() : S, w = Pa()(), T = Ga(), E = Ia(), D = Fa(), O = Ba(), k = za(), A = {}, j = typeof Uint8Array > "u" || !T ? n : T(Uint8Array), M = {
9276
+ }() : S, w = Fa()(), T = Ka(), E = La(), D = Ia(), O = Va(), k = Ba(), A = {}, j = typeof Uint8Array > "u" || !T ? n : T(Uint8Array), M = {
9074
9277
  __proto__: null,
9075
9278
  "%AggregateError%": typeof AggregateError > "u" ? n : AggregateError,
9076
9279
  "%Array%": Array,
@@ -9260,7 +9463,7 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9260
9463
  "%URIErrorPrototype%": ["URIError", "prototype"],
9261
9464
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
9262
9465
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
9263
- }, F = Ra(), I = Ka(), L = F.call(k, Array.prototype.concat), R = F.call(O, Array.prototype.splice), z = F.call(k, String.prototype.replace), B = F.call(k, String.prototype.slice), V = F.call(k, RegExp.prototype.exec), H = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, U = /\\(\\)?/g, ee = function(e) {
9466
+ }, F = za(), I = qa(), L = F.call(k, Array.prototype.concat), R = F.call(O, Array.prototype.splice), z = F.call(k, String.prototype.replace), B = F.call(k, String.prototype.slice), V = F.call(k, RegExp.prototype.exec), H = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, U = /\\(\\)?/g, ee = function(e) {
9264
9467
  var t = B(e, 0, 1), n = B(e, -1);
9265
9468
  if (t === "%" && n !== "%") throw new c("invalid intrinsic syntax, expected closing `%`");
9266
9469
  if (n === "%" && t !== "%") throw new c("invalid intrinsic syntax, expected opening `%`");
@@ -9305,14 +9508,14 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9305
9508
  }
9306
9509
  return o;
9307
9510
  };
9308
- })), Ja = /* @__PURE__ */ Q(((e, t) => {
9309
- var n = qa(), r = Ua(), i = r([n("%String.prototype.indexOf%")]);
9511
+ })), Ya = /* @__PURE__ */ Q(((e, t) => {
9512
+ var n = Ja(), r = Wa(), i = r([n("%String.prototype.indexOf%")]);
9310
9513
  t.exports = function(e, t) {
9311
9514
  var a = n(e, !!t);
9312
9515
  return typeof a == "function" && i(e, ".prototype.") > -1 ? r([a]) : a;
9313
9516
  };
9314
- })), Ya = /* @__PURE__ */ Q(((e, t) => {
9315
- var n = qa(), r = Ja(), i = pa(), a = da(), o = n("%Map%", !0), s = r("Map.prototype.get", !0), c = r("Map.prototype.set", !0), l = r("Map.prototype.has", !0), u = r("Map.prototype.delete", !0), d = r("Map.prototype.size", !0);
9517
+ })), Xa = /* @__PURE__ */ Q(((e, t) => {
9518
+ var n = Ja(), r = Ya(), i = ma(), a = fa(), o = n("%Map%", !0), s = r("Map.prototype.get", !0), c = r("Map.prototype.set", !0), l = r("Map.prototype.has", !0), u = r("Map.prototype.delete", !0), d = r("Map.prototype.size", !0);
9316
9519
  t.exports = !!o && function() {
9317
9520
  var e, t = {
9318
9521
  assert: function(e) {
@@ -9337,8 +9540,8 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9337
9540
  };
9338
9541
  return t;
9339
9542
  };
9340
- })), Xa = /* @__PURE__ */ Q(((e, t) => {
9341
- var n = qa(), r = Ja(), i = pa(), a = Ya(), o = da(), s = n("%WeakMap%", !0), c = r("WeakMap.prototype.get", !0), l = r("WeakMap.prototype.set", !0), u = r("WeakMap.prototype.has", !0), d = r("WeakMap.prototype.delete", !0);
9543
+ })), Za = /* @__PURE__ */ Q(((e, t) => {
9544
+ var n = Ja(), r = Ya(), i = ma(), a = Xa(), o = fa(), s = n("%WeakMap%", !0), c = r("WeakMap.prototype.get", !0), l = r("WeakMap.prototype.set", !0), u = r("WeakMap.prototype.has", !0), d = r("WeakMap.prototype.delete", !0);
9342
9545
  t.exports = s ? function() {
9343
9546
  var e, t, n = {
9344
9547
  assert: function(e) {
@@ -9362,8 +9565,8 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9362
9565
  };
9363
9566
  return n;
9364
9567
  } : a;
9365
- })), Za = /* @__PURE__ */ Q(((e, t) => {
9366
- var n = da(), r = pa(), i = ma(), a = Ya(), o = Xa() || a || i;
9568
+ })), Qa = /* @__PURE__ */ Q(((e, t) => {
9569
+ var n = fa(), r = ma(), i = ha(), a = Xa(), o = Za() || a || i;
9367
9570
  t.exports = function() {
9368
9571
  var e, t = {
9369
9572
  assert: function(e) {
@@ -9384,7 +9587,7 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9384
9587
  };
9385
9588
  return t;
9386
9589
  };
9387
- })), Qa = /* @__PURE__ */ Q(((e, t) => {
9590
+ })), $a = /* @__PURE__ */ Q(((e, t) => {
9388
9591
  var n = String.prototype.replace, r = /%20/g, i = {
9389
9592
  RFC1738: "RFC1738",
9390
9593
  RFC3986: "RFC3986"
@@ -9402,8 +9605,8 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9402
9605
  RFC1738: i.RFC1738,
9403
9606
  RFC3986: i.RFC3986
9404
9607
  };
9405
- })), $a = /* @__PURE__ */ Q(((e, t) => {
9406
- var n = Qa(), r = Za(), i = Object.prototype.hasOwnProperty, a = Array.isArray, o = r(), s = function(e, t) {
9608
+ })), eo = /* @__PURE__ */ Q(((e, t) => {
9609
+ var n = $a(), r = Qa(), i = Object.prototype.hasOwnProperty, a = Array.isArray, o = r(), s = function(e, t) {
9407
9610
  return o.set(e, t), e;
9408
9611
  }, c = function(e) {
9409
9612
  return o.has(e);
@@ -9554,8 +9757,8 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9554
9757
  },
9555
9758
  merge: m
9556
9759
  };
9557
- })), eo = /* @__PURE__ */ Q(((e, t) => {
9558
- var n = Za(), r = $a(), i = Qa(), a = Object.prototype.hasOwnProperty, o = {
9760
+ })), to = /* @__PURE__ */ Q(((e, t) => {
9761
+ var n = Qa(), r = eo(), i = $a(), a = Object.prototype.hasOwnProperty, o = {
9559
9762
  brackets: function(e) {
9560
9763
  return e + "[]";
9561
9764
  },
@@ -9687,8 +9890,8 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9687
9890
  var y = u.join(i.delimiter), b = i.addQueryPrefix === !0 ? "?" : "";
9688
9891
  return i.charsetSentinel && (i.charset === "iso-8859-1" ? b += "utf8=%26%2310003%3B" + i.delimiter : b += "utf8=%E2%9C%93" + i.delimiter), y.length > 0 ? b + y : "";
9689
9892
  };
9690
- })), to = /* @__PURE__ */ Q(((e, t) => {
9691
- var n = $a(), r = Object.prototype.hasOwnProperty, i = Array.isArray, a = {
9893
+ })), no = /* @__PURE__ */ Q(((e, t) => {
9894
+ var n = eo(), r = Object.prototype.hasOwnProperty, i = Array.isArray, a = {
9692
9895
  allowDots: !1,
9693
9896
  allowEmptyArrays: !1,
9694
9897
  allowPrototypes: !1,
@@ -9831,36 +10034,36 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9831
10034
  }
9832
10035
  return r.allowSparse === !0 ? a : n.compact(a);
9833
10036
  };
9834
- })), no = /* @__PURE__ */ $e((/* @__PURE__ */ Q(((e, t) => {
9835
- var n = eo(), r = to();
10037
+ })), ro = /* @__PURE__ */ $e((/* @__PURE__ */ Q(((e, t) => {
10038
+ var n = to(), r = no();
9836
10039
  t.exports = {
9837
- formats: Qa(),
10040
+ formats: $a(),
9838
10041
  parse: r,
9839
10042
  stringify: n
9840
10043
  };
9841
- })))(), 1), ro = (e) => {
10044
+ })))(), 1), io = (e) => {
9842
10045
  if (e === void 0) return e;
9843
10046
  let t = Number(e);
9844
10047
  return `${t}` === e ? t : e;
9845
- }, io = {
10048
+ }, ao = {
9846
10049
  addQueryPrefix: !0,
9847
10050
  skipNulls: !0,
9848
10051
  arrayFormat: "indices",
9849
10052
  encode: !1,
9850
10053
  encodeValuesOnly: !0
9851
- }, ao = {
10054
+ }, oo = {
9852
10055
  go: () => {
9853
10056
  let { search: e, hash: t } = je(), n = Me();
9854
10057
  return p(({ to: r, type: i, query: a, hash: o, options: { keepQuery: s, keepHash: c } = {} }) => {
9855
10058
  let l = {
9856
- ...s && e && no.default.parse(e, {
10059
+ ...s && e && ro.default.parse(e, {
9857
10060
  ignoreQueryPrefix: !0,
9858
10061
  depth: ae
9859
10062
  }),
9860
10063
  ...a
9861
10064
  };
9862
10065
  l.to &&= encodeURIComponent(`${l.to}`);
9863
- let u = Object.keys(l).length > 0, d = `#${(o || c && t || "").replace(/^#/, "")}`, f = d.length > 1, p = `${r || ""}${u ? no.default.stringify(l, io) : ""}${f ? d : ""}`;
10066
+ let u = Object.keys(l).length > 0, d = `#${(o || c && t || "").replace(/^#/, "")}`, f = d.length > 1, p = `${r || ""}${u ? ro.default.stringify(l, ao) : ""}${f ? d : ""}`;
9864
10067
  if (i === "path") return p;
9865
10068
  n(p, { replace: i === "replace" });
9866
10069
  }, [
@@ -9878,7 +10081,7 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9878
10081
  parse: () => {
9879
10082
  let e = Ne(), { pathname: t, search: n } = je(), { resources: r } = m(se), { resource: i, action: a, matchedRoute: o } = u.useMemo(() => ce(t, r), [r, t]);
9880
10083
  return Object.entries(e).length === 0 && o && (e = ke(o, t)?.params || {}), p(() => {
9881
- let r = no.default.parse(n, {
10084
+ let r = ro.default.parse(n, {
9882
10085
  ignoreQueryPrefix: !0,
9883
10086
  depth: ae
9884
10087
  }), o = {
@@ -9892,8 +10095,8 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9892
10095
  pathname: t,
9893
10096
  params: {
9894
10097
  ...o,
9895
- currentPage: ro(o.currentPage),
9896
- pageSize: ro(o.pageSize),
10098
+ currentPage: io(o.currentPage),
10099
+ pageSize: io(o.pageSize),
9897
10100
  to: o.to ? decodeURIComponent(o.to) : void 0
9898
10101
  }
9899
10102
  };
@@ -9915,7 +10118,7 @@ var da = /* @__PURE__ */ Q(((e, t) => {
9915
10118
  };
9916
10119
  //#endregion
9917
10120
  //#region src/components/layout/Navigation/PrimaryRail.tsx
9918
- function oo({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
10121
+ function so({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
9919
10122
  let { t: i, language: a, changeLanguage: o } = $("desk"), { data: s } = pe(), { mutate: c } = ve(), { theme: l, setTheme: u } = Y(), { supportedLocales: d } = jt(), f = (e) => {
9920
10123
  let t = {
9921
10124
  en: "English",
@@ -9987,7 +10190,7 @@ function oo({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
9987
10190
  children: s?.email || "Not signed in"
9988
10191
  })]
9989
10192
  }),
9990
- /* @__PURE__ */ w(ne, {}),
10193
+ /* @__PURE__ */ w(G, {}),
9991
10194
  /* @__PURE__ */ T(J, {
9992
10195
  padding: "$sm",
9993
10196
  gap: "$sm",
@@ -10009,7 +10212,7 @@ function oo({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
10009
10212
  placement: v ? "top-start" : "top-end"
10010
10213
  })]
10011
10214
  }),
10012
- /* @__PURE__ */ w(ne, {}),
10215
+ /* @__PURE__ */ w(G, {}),
10013
10216
  /* @__PURE__ */ T(N, {
10014
10217
  variant: "ghost",
10015
10218
  size: "sm",
@@ -10134,7 +10337,7 @@ function oo({ apps: e, activeAppId: t, onAppSelect: n, isMobile: r = !1 }) {
10134
10337
  }
10135
10338
  //#endregion
10136
10339
  //#region src/components/layout/Navigation/ContextualDrawer.tsx
10137
- function so({ app: e, collapsed: t = !1, onNavigate: n, isMobile: r, onClose: i }) {
10340
+ function co({ app: e, collapsed: t = !1, onNavigate: n, isMobile: r, onClose: i }) {
10138
10341
  let [a, o] = v({});
10139
10342
  if (!e || t) return /* @__PURE__ */ w(J, {
10140
10343
  width: 0,
@@ -10287,7 +10490,7 @@ function so({ app: e, collapsed: t = !1, onNavigate: n, isMobile: r, onClose: i
10287
10490
  }
10288
10491
  //#endregion
10289
10492
  //#region src/components/layout/Navigation/NavigationShell.tsx
10290
- function co({ apps: e, defaultAppId: t, collapsed: n = !1, onNavigate: r, isMobile: i, isGuest: a = !1 }) {
10493
+ function lo({ apps: e, defaultAppId: t, collapsed: n = !1, onNavigate: r, isMobile: i, isGuest: a = !1 }) {
10291
10494
  if (a) return null;
10292
10495
  let [o, s] = v(t || e[0]?.app_id), [c, l] = v(!1), [u, d] = v(n);
10293
10496
  h(() => {
@@ -10298,14 +10501,14 @@ function co({ apps: e, defaultAppId: t, collapsed: n = !1, onNavigate: r, isMobi
10298
10501
  height: i ? "auto" : "100%",
10299
10502
  flexDirection: i ? "column-reverse" : "row",
10300
10503
  overflow: "visible",
10301
- children: [/* @__PURE__ */ w(oo, {
10504
+ children: [/* @__PURE__ */ w(so, {
10302
10505
  apps: e,
10303
10506
  activeAppId: o || "",
10304
10507
  isMobile: i,
10305
10508
  onAppSelect: (e) => {
10306
10509
  i ? (s(e), l(!0)) : e === o ? d(!u) : (s(e), d(!1));
10307
10510
  }
10308
- }), /* @__PURE__ */ w(so, {
10511
+ }), /* @__PURE__ */ w(co, {
10309
10512
  app: f,
10310
10513
  collapsed: i ? !c : u,
10311
10514
  isMobile: i,
@@ -10318,7 +10521,7 @@ function co({ apps: e, defaultAppId: t, collapsed: n = !1, onNavigate: r, isMobi
10318
10521
  }
10319
10522
  //#endregion
10320
10523
  //#region src/components/layout/DefaultLandingPage.tsx
10321
- function lo({ title: e = "Welcome" }) {
10524
+ function uo({ title: e = "Welcome" }) {
10322
10525
  let t = Me(), { theme: n, toggleTheme: r } = Y(), { t: i } = Le("desk");
10323
10526
  return /* @__PURE__ */ T(J, {
10324
10527
  minHeight: "100vh",
@@ -10399,7 +10602,10 @@ Ue.isInitialized || Ue.use(We).use(Ge).use(Ie).init({
10399
10602
  caches: ["localStorage"],
10400
10603
  lookupLocalStorage: "i18nextLng"
10401
10604
  },
10402
- backend: { loadPath: "/locales/{{lng}}/{{ns}}.json" },
10605
+ backend: { loadPath: (() => {
10606
+ let e = globalThis.__FRAMEWORK_CONFIG__;
10607
+ return `${e?.basename ? e.basename.replace(/\/$/, "") : ""}/locales/{{lng}}/{{ns}}.json`;
10608
+ })() },
10403
10609
  nsSeparator: !1,
10404
10610
  interpolation: { escapeValue: !1 },
10405
10611
  react: { useSuspense: !0 }
@@ -10414,10 +10620,10 @@ Ue.isInitialized || Ue.use(We).use(Ge).use(Ie).init({
10414
10620
  ].includes(e.split("-")[0]);
10415
10621
  document.documentElement.dir = t ? "rtl" : "ltr";
10416
10622
  });
10417
- var uo = Ue, fo = ({ isMobile: e }) => {
10623
+ var fo = Ue, po = ({ isMobile: e }) => {
10418
10624
  let t = Me(), { data: n } = pe(), r = l(n?.roles ?? []), i = _(!1);
10419
10625
  u.useEffect(() => {
10420
- n?.locale && !i.current && (i.current = !0, uo.language !== n.locale && uo.changeLanguage(n.locale));
10626
+ n?.locale && !i.current && (i.current = !0, fo.language !== n.locale && fo.changeLanguage(n.locale));
10421
10627
  }, [n]);
10422
10628
  let a = g(() => {
10423
10629
  let e = process.env.INSTALLED_APPS || "", t = e.split(",").map((e) => e.trim()), n = ["core"], i = e ? r.filter((e) => n.includes(e.app_id) || t.includes(e.app_id)) : r;
@@ -10435,7 +10641,7 @@ var uo = Ue, fo = ({ isMobile: e }) => {
10435
10641
  paddingVertical: "$lg",
10436
10642
  backgroundColor: "$background",
10437
10643
  children: /* @__PURE__ */ w(Te, {})
10438
- }), s = /* @__PURE__ */ w(co, {
10644
+ }), s = /* @__PURE__ */ w(lo, {
10439
10645
  apps: a,
10440
10646
  isMobile: e,
10441
10647
  onNavigate: (e) => t(e)
@@ -10451,31 +10657,31 @@ var uo = Ue, fo = ({ isMobile: e }) => {
10451
10657
  overflow: "hidden",
10452
10658
  children: [s, o]
10453
10659
  });
10454
- }, po = () => {
10660
+ }, mo = () => {
10455
10661
  let { pathname: e, search: t } = je(), n = encodeURIComponent(`${e}${t}`);
10456
- return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Nr, {}), /* @__PURE__ */ w(we, {
10662
+ return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Pr, {}), /* @__PURE__ */ w(we, {
10457
10663
  to: `/login?to=${n}`,
10458
10664
  replace: !0
10459
10665
  })] });
10460
- }, mo = [], ho = u.createContext(null), go = () => {
10461
- let e = u.useContext(ho);
10666
+ }, ho = [], go = u.createContext(null), _o = () => {
10667
+ let e = u.useContext(go);
10462
10668
  if (!e) return null;
10463
10669
  let { title: t, loginPage: n, children: r, isMobile: i, publicPluginRoutes: a, authenticatedPluginRoutes: o, hasPluginRootRoute: s } = e;
10464
10670
  return /* @__PURE__ */ T(De, { children: [
10465
10671
  a,
10466
10672
  !s && /* @__PURE__ */ w(Z, {
10467
10673
  path: "/",
10468
- element: /* @__PURE__ */ w(lo, { title: t })
10674
+ element: /* @__PURE__ */ w(uo, { title: t })
10469
10675
  }),
10470
10676
  /* @__PURE__ */ w(Z, {
10471
10677
  path: "/login",
10472
- element: n ?? /* @__PURE__ */ w($i, { title: t })
10678
+ element: n ?? /* @__PURE__ */ w(ea, { title: t })
10473
10679
  }),
10474
10680
  /* @__PURE__ */ T(Z, {
10475
10681
  element: /* @__PURE__ */ w(ie, {
10476
- fallback: /* @__PURE__ */ w(po, {}),
10477
- loading: /* @__PURE__ */ w(Nr, {}),
10478
- children: /* @__PURE__ */ w(fo, { isMobile: i })
10682
+ fallback: /* @__PURE__ */ w(mo, {}),
10683
+ loading: /* @__PURE__ */ w(Pr, {}),
10684
+ children: /* @__PURE__ */ w(po, { isMobile: i })
10479
10685
  }, "authenticated-routes"),
10480
10686
  children: [o, /* @__PURE__ */ T(Z, {
10481
10687
  path: "/app",
@@ -10497,35 +10703,35 @@ var uo = Ue, fo = ({ isMobile: e }) => {
10497
10703
  }),
10498
10704
  /* @__PURE__ */ w(Z, {
10499
10705
  path: "list",
10500
- element: /* @__PURE__ */ w(Ui, {})
10706
+ element: /* @__PURE__ */ w(Wi, {})
10501
10707
  }),
10502
10708
  /* @__PURE__ */ w(Z, {
10503
10709
  path: "kanban",
10504
- element: /* @__PURE__ */ w(Ui, { view: "kanban" })
10710
+ element: /* @__PURE__ */ w(Wi, { view: "kanban" })
10505
10711
  }),
10506
10712
  /* @__PURE__ */ w(Z, {
10507
10713
  path: "tree",
10508
- element: /* @__PURE__ */ w(Ui, { view: "tree" })
10714
+ element: /* @__PURE__ */ w(Wi, { view: "tree" })
10509
10715
  }),
10510
10716
  /* @__PURE__ */ w(Z, {
10511
10717
  path: "gantt",
10512
- element: /* @__PURE__ */ w(Ui, { view: "gantt" })
10718
+ element: /* @__PURE__ */ w(Wi, { view: "gantt" })
10513
10719
  }),
10514
10720
  /* @__PURE__ */ w(Z, {
10515
10721
  path: "calendar",
10516
- element: /* @__PURE__ */ w(Ui, { view: "calendar" })
10722
+ element: /* @__PURE__ */ w(Wi, { view: "calendar" })
10517
10723
  }),
10518
10724
  /* @__PURE__ */ w(Z, {
10519
10725
  path: "new",
10520
- element: /* @__PURE__ */ w(Ji, {})
10726
+ element: /* @__PURE__ */ w(Yi, {})
10521
10727
  }),
10522
10728
  /* @__PURE__ */ w(Z, {
10523
10729
  path: "detail/:id",
10524
- element: /* @__PURE__ */ w(Ji, {})
10730
+ element: /* @__PURE__ */ w(Yi, {})
10525
10731
  }),
10526
10732
  /* @__PURE__ */ w(Z, {
10527
10733
  path: "edit/:id",
10528
- element: /* @__PURE__ */ w(Ji, {})
10734
+ element: /* @__PURE__ */ w(Yi, {})
10529
10735
  })
10530
10736
  ]
10531
10737
  })
@@ -10537,17 +10743,17 @@ var uo = Ue, fo = ({ isMobile: e }) => {
10537
10743
  element: /* @__PURE__ */ w(we, { to: "/" })
10538
10744
  })
10539
10745
  ] });
10540
- }, _o = () => /* @__PURE__ */ w(oe, {
10746
+ }, vo = () => /* @__PURE__ */ w(oe, {
10541
10747
  dataProvider: _t,
10542
10748
  authProvider: yt,
10543
- routerProvider: ao,
10749
+ routerProvider: oo,
10544
10750
  liveProvider: Tt,
10545
10751
  options: {
10546
10752
  syncWithLocation: !0,
10547
10753
  warnWhenUnsavedChanges: !1
10548
10754
  },
10549
- children: /* @__PURE__ */ w(At, { children: /* @__PURE__ */ w(go, {}) })
10550
- }), vo = ({ title: n, children: c, initialPlugins: l = mo, defaultFocusMode: d = !1, serviceName: f = "core", loginPage: p }) => {
10755
+ children: /* @__PURE__ */ w(At, { children: /* @__PURE__ */ w(_o, {}) })
10756
+ }), yo = ({ title: n, children: c, initialPlugins: l = ho, defaultFocusMode: d = !1, serviceName: f = "core", loginPage: p }) => {
10551
10757
  let m = g(() => new y({ defaultOptions: { queries: { refetchOnWindowFocus: !1 } } }), []), [h, x] = v(d), [S, C] = v(globalThis.window?.innerWidth ? globalThis.window.innerWidth < 1024 : !1), [T, E] = v(!1);
10552
10758
  u.useEffect(() => {
10553
10759
  let e = () => {
@@ -10653,9 +10859,9 @@ var uo = Ue, fo = ({ isMobile: e }) => {
10653
10859
  };
10654
10860
  }, [D, O]), P = `${globalThis.location?.protocol === "https:" ? "wss:" : "ws:"}//${globalThis.location?.host}/api/v1/stream`, F = g(() => Oe([{
10655
10861
  path: "*",
10656
- element: /* @__PURE__ */ w(_o, {})
10862
+ element: /* @__PURE__ */ w(vo, {})
10657
10863
  }], { basename: et }), []);
10658
- return /* @__PURE__ */ w(ho.Provider, {
10864
+ return /* @__PURE__ */ w(go.Provider, {
10659
10865
  value: {
10660
10866
  title: n,
10661
10867
  loginPage: p,
@@ -10666,18 +10872,18 @@ var uo = Ue, fo = ({ isMobile: e }) => {
10666
10872
  hasPluginRootRoute: N
10667
10873
  },
10668
10874
  children: /* @__PURE__ */ w(Fe, {
10669
- i18n: uo,
10875
+ i18n: fo,
10670
10876
  children: /* @__PURE__ */ w(r, {
10671
10877
  registry: D,
10672
10878
  children: /* @__PURE__ */ w(re, { children: /* @__PURE__ */ w(V, { children: /* @__PURE__ */ w(u.Suspense, {
10673
- fallback: /* @__PURE__ */ w(Nr, {}),
10879
+ fallback: /* @__PURE__ */ w(Pr, {}),
10674
10880
  children: /* @__PURE__ */ w(b, {
10675
10881
  client: m,
10676
- children: /* @__PURE__ */ w(la, {
10882
+ children: /* @__PURE__ */ w(ua, {
10677
10883
  isMobile: S,
10678
10884
  rightSidebarOpen: T,
10679
10885
  setRightSidebarOpen: E,
10680
- realtimeAdapter: ua(P),
10886
+ realtimeAdapter: da(P),
10681
10887
  initialPlugins: l,
10682
10888
  focusMode: h,
10683
10889
  setFocusMode: x,
@@ -10690,6 +10896,6 @@ var uo = Ue, fo = ({ isMobile: e }) => {
10690
10896
  });
10691
10897
  };
10692
10898
  //#endregion
10693
- export { rt as API_URL, cr as AlertBanner, Ar as AsOfDatePicker, Tr as AuditTimeline, Qn as AutoForm, ir as AutoTable, Ei as Breadcrumb, ur as BulkActionsBar, Zr as CalendarView, Ai as ColumnGrid, wi as CommandPalette, or as ConfirmDialog, yi as CorrectButton, vi as CorrectionWizard, Cr as DiffViewer, ar as EditableCell, qn as FieldRegistry, Ji as FormView, vo as FrameworkMShell, ti as GanttView, Jr as KanbanView, Mi as Layout, kn as LinkField, Ui as ListView, $i as LoginPage, it as META_URL, Ti as Menu, ji as PageHeader, qt as SectionField, Gi as ShellContext, la as ShellProvider, Nr as ShellSkeleton, Si as SiblingPanel, xr as Slot, pr as StateBadge, lr as SubmittedBanner, At as SystemConfigProvider, Kt as TabContainer, ai as TreeView, ot as WS_URL, gr as WorkflowActions, Ni as WorkspaceSection, yt as authProvider, Et as closeAllConnections, ua as createWebSocketRealtimeAdapter, _t as frameworkMDataProvider, vt as getAuthConfig, Vr as getDocTypeViews, Rr as getRegisteredViews, Lr as getViewComponent, zr as getViewRegistration, Hr as isViewAvailable, Tt as liveProvider, vr as registerSlot, Ir as registerView, Br as setDocTypeViews, dn as useAuditTimeline, nn as useBulkActions, rn as useCommandPalette, cn as useCorrectionAction, Lt as useDocTypeMeta, Yt as useDocTypes, tn as useInlineEdit, Rt as usePrefetchDocTypeMeta, Ki as useShell, pn as useSiblingDocTypes, jt as useSystemConfig, $ as useTranslation, Qt as useWorkflowActions };
10899
+ export { rt as API_URL, lr as AlertBanner, jr as AsOfDatePicker, Er as AuditTimeline, $n as AutoForm, ar as AutoTable, Di as Breadcrumb, dr as BulkActionsBar, Qr as CalendarView, ji as ColumnGrid, Ti as CommandPalette, sr as ConfirmDialog, bi as CorrectButton, yi as CorrectionWizard, wr as DiffViewer, or as EditableCell, Jn as FieldRegistry, Yi as FormView, yo as FrameworkMShell, ni as GanttView, Yr as KanbanView, Ni as Layout, kn as LinkField, Wi as ListView, ea as LoginPage, it as META_URL, Ei as Menu, Mi as PageHeader, qt as SectionField, Ki as ShellContext, ua as ShellProvider, Pr as ShellSkeleton, Ci as SiblingPanel, Sr as Slot, mr as StateBadge, ur as SubmittedBanner, At as SystemConfigProvider, Kt as TabContainer, oi as TreeView, ot as WS_URL, _r as WorkflowActions, Pi as WorkspaceSection, yt as authProvider, Et as closeAllConnections, da as createWebSocketRealtimeAdapter, _t as frameworkMDataProvider, vt as getAuthConfig, Hr as getDocTypeViews, zr as getRegisteredViews, Rr as getViewComponent, Br as getViewRegistration, Ur as isViewAvailable, Tt as liveProvider, yr as registerSlot, Lr as registerView, Vr as setDocTypeViews, dn as useAuditTimeline, nn as useBulkActions, rn as useCommandPalette, cn as useCorrectionAction, Lt as useDocTypeMeta, Yt as useDocTypes, tn as useInlineEdit, Rt as usePrefetchDocTypeMeta, qi as useShell, pn as useSiblingDocTypes, jt as useSystemConfig, $ as useTranslation, Qt as useWorkflowActions };
10694
10900
 
10695
10901
  //# sourceMappingURL=index.js.map