ding-react-admin 2.1.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,41 +1,41 @@
1
1
  import { Children as e, createContext as t, createElement as n, forwardRef as r, isValidElement as i, useCallback as a, useContext as o, useEffect as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
2
2
  import { Link as f, Navigate as p, Outlet as m, RouterProvider as h, createBrowserRouter as g, useLocation as _, useNavigate as v, useParams as y, useSearchParams as b } from "react-router-dom";
3
- import { Alert as x, App as S, Avatar as C, Button as w, Card as T, Col as E, ConfigProvider as D, DatePicker as O, Drawer as k, Dropdown as ee, Flex as A, Form as j, Grid as te, Image as M, Input as N, InputNumber as P, Layout as F, Menu as ne, Modal as I, Pagination as re, Popover as ie, Row as ae, Segmented as L, Select as R, Space as z, Spin as B, Steps as oe, Switch as V, Table as se, Tabs as ce, TimePicker as H, Tooltip as U, Typography as W, theme as G } from "antd";
3
+ import { Alert as x, App as S, Avatar as C, Button as w, Card as T, Col as E, ConfigProvider as D, DatePicker as O, Drawer as k, Dropdown as A, Flex as j, Form as M, Grid as ee, Image as N, Input as P, InputNumber as F, Layout as I, List as te, Menu as L, Modal as ne, Pagination as re, Popover as ie, Row as R, Segmented as ae, Select as z, Space as B, Spin as oe, Steps as V, Switch as se, Table as ce, Tabs as H, TimePicker as le, Tooltip as U, Typography as W, theme as G } from "antd";
4
4
  import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
5
- import { AppstoreOutlined as le, ArrowLeftOutlined as ue, CaretDownOutlined as de, CaretUpOutlined as fe, ColumnHeightOutlined as pe, DeleteOutlined as me, DesktopOutlined as he, EditOutlined as ge, LayoutOutlined as _e, LogoutOutlined as ve, MenuOutlined as ye, MoonOutlined as be, PaperClipOutlined as xe, PlusOutlined as Se, SearchOutlined as Ce, SettingOutlined as we, SunOutlined as Y, UploadOutlined as Te, UserOutlined as Ee } from "@ant-design/icons";
6
- import { Controller as De, FormProvider as Oe, useFieldArray as ke, useForm as Ae, useFormContext as je, useFormState as Me, useWatch as Ne } from "react-hook-form";
7
- import Pe from "dayjs";
5
+ import { AppstoreOutlined as ue, ArrowLeftOutlined as de, CaretDownOutlined as fe, CaretUpOutlined as pe, ColumnHeightOutlined as me, DeleteOutlined as he, DesktopOutlined as ge, EditOutlined as _e, LayoutOutlined as ve, LogoutOutlined as ye, MenuOutlined as be, MoonOutlined as xe, PaperClipOutlined as Se, PlusOutlined as Ce, SearchOutlined as we, SettingOutlined as Y, SunOutlined as Te, UploadOutlined as Ee, UserOutlined as De } from "@ant-design/icons";
6
+ import { Controller as Oe, FormProvider as ke, useFieldArray as Ae, useForm as je, useFormContext as Me, useFormState as Ne, useWatch as Pe } from "react-hook-form";
7
+ import Fe from "dayjs";
8
8
  import './index.css';//#region \0rolldown/runtime.js
9
- var Fe = Object.create, Ie = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, Re = Object.getOwnPropertyNames, ze = Object.getPrototypeOf, Be = Object.prototype.hasOwnProperty, Ve = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), He = (e, t, n, r) => {
10
- if (t && typeof t == "object" || typeof t == "function") for (var i = Re(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !Be.call(e, s) && s !== n && Ie(e, s, {
9
+ var Ie = Object.create, Le = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, ze = Object.getOwnPropertyNames, Be = Object.getPrototypeOf, Ve = Object.prototype.hasOwnProperty, He = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), Ue = (e, t, n, r) => {
10
+ if (t && typeof t == "object" || typeof t == "function") for (var i = ze(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !Ve.call(e, s) && s !== n && Le(e, s, {
11
11
  get: ((e) => t[e]).bind(null, s),
12
- enumerable: !(r = Le(t, s)) || r.enumerable
12
+ enumerable: !(r = Re(t, s)) || r.enumerable
13
13
  });
14
14
  return e;
15
- }, Ue = (e, t, n) => (n = e == null ? {} : Fe(ze(e)), He(t || !e || !e.__esModule ? Ie(n, "default", {
15
+ }, We = (e, t, n) => (n = e == null ? {} : Ie(Be(e)), Ue(t || !e || !e.__esModule ? Le(n, "default", {
16
16
  value: e,
17
17
  enumerable: !0
18
- }) : n, e)), We = t(null);
19
- function Ge(e) {
18
+ }) : n, e)), Ge = t(null);
19
+ function Ke(e) {
20
20
  try {
21
21
  let t = localStorage.getItem(e);
22
22
  if (t === "light" || t === "dark" || t === "system") return t;
23
23
  } catch {}
24
24
  return "system";
25
25
  }
26
- function Ke() {
26
+ function qe() {
27
27
  return window.matchMedia("(prefers-color-scheme: dark)").matches;
28
28
  }
29
- function qe(e) {
29
+ function Je(e) {
30
30
  try {
31
31
  let t = localStorage.getItem(e);
32
32
  if (t === "comfortable" || t === "compact") return t;
33
33
  } catch {}
34
34
  return "compact";
35
35
  }
36
- var Je = "ding-react-admin-theme-mode", Ye = "ding-react-admin-theme-density";
37
- function Xe({ children: e, modeStorageKey: t = Je, densityStorageKey: n = Ye }) {
38
- let [r, i] = d(() => Ge(t)), [a, o] = d(() => qe(n)), [c, u] = d(Ke);
36
+ var Ye = "ding-react-admin-theme-mode", Xe = "ding-react-admin-theme-density";
37
+ function Ze({ children: e, modeStorageKey: t = Ye, densityStorageKey: n = Xe }) {
38
+ let [r, i] = d(() => Ke(t)), [a, o] = d(() => Je(n)), [c, u] = d(qe);
39
39
  s(() => {
40
40
  if (r !== "system") return;
41
41
  let e = window.matchMedia("(prefers-color-scheme: dark)"), t = () => u(e.matches);
@@ -67,7 +67,7 @@ function Xe({ children: e, modeStorageKey: t = Je, densityStorageKey: n = Ye })
67
67
  f,
68
68
  p
69
69
  ]);
70
- return /* @__PURE__ */ q(We.Provider, {
70
+ return /* @__PURE__ */ q(Ge.Provider, {
71
71
  value: g,
72
72
  children: /* @__PURE__ */ q(D, {
73
73
  theme: h,
@@ -75,86 +75,86 @@ function Xe({ children: e, modeStorageKey: t = Je, densityStorageKey: n = Ye })
75
75
  })
76
76
  });
77
77
  }
78
- function Ze() {
79
- let e = o(We);
78
+ function Qe() {
79
+ let e = o(Ge);
80
80
  if (!e) throw Error("useThemeMode must be used within AppThemeProvider");
81
81
  return e;
82
82
  }
83
83
  //#endregion
84
84
  //#region src/components/DensitySwitch.tsx
85
- var Qe = [{
85
+ var $e = [{
86
86
  label: "Comfortable",
87
87
  value: "comfortable",
88
- icon: /* @__PURE__ */ q(_e, {})
88
+ icon: /* @__PURE__ */ q(ve, {})
89
89
  }, {
90
90
  label: "Compact",
91
91
  value: "compact",
92
- icon: /* @__PURE__ */ q(pe, {})
92
+ icon: /* @__PURE__ */ q(me, {})
93
93
  }];
94
- function $e() {
95
- let { density: e, setDensity: t } = Ze();
96
- return /* @__PURE__ */ q(L, {
94
+ function et() {
95
+ let { density: e, setDensity: t } = Qe();
96
+ return /* @__PURE__ */ q(ae, {
97
97
  size: "small",
98
98
  value: e,
99
- options: Qe,
99
+ options: $e,
100
100
  onChange: (e) => t(e)
101
101
  });
102
102
  }
103
103
  //#endregion
104
104
  //#region src/components/ThemeSwitch.tsx
105
- var et = [
105
+ var tt = [
106
106
  {
107
107
  label: "Light",
108
108
  value: "light",
109
- icon: /* @__PURE__ */ q(Y, {})
109
+ icon: /* @__PURE__ */ q(Te, {})
110
110
  },
111
111
  {
112
112
  label: "Dark",
113
113
  value: "dark",
114
- icon: /* @__PURE__ */ q(be, {})
114
+ icon: /* @__PURE__ */ q(xe, {})
115
115
  },
116
116
  {
117
117
  label: "Auto",
118
118
  value: "system",
119
- icon: /* @__PURE__ */ q(he, {})
119
+ icon: /* @__PURE__ */ q(ge, {})
120
120
  }
121
121
  ];
122
- function tt() {
123
- let { mode: e, setMode: t } = Ze();
124
- return /* @__PURE__ */ q(L, {
122
+ function nt() {
123
+ let { mode: e, setMode: t } = Qe();
124
+ return /* @__PURE__ */ q(ae, {
125
125
  size: "small",
126
126
  value: e,
127
- options: et,
127
+ options: tt,
128
128
  onChange: (e) => t(e)
129
129
  });
130
130
  }
131
131
  //#endregion
132
132
  //#region src/components/ThemeToolbar.tsx
133
- function nt() {
133
+ function rt() {
134
134
  let { token: e } = G.useToken();
135
135
  return /* @__PURE__ */ q(ie, {
136
- placement: te.useBreakpoint().lg ? "bottomRight" : "bottom",
136
+ placement: ee.useBreakpoint().lg ? "bottomRight" : "bottom",
137
137
  trigger: "click",
138
- content: /* @__PURE__ */ J(z, {
138
+ content: /* @__PURE__ */ J(B, {
139
139
  orientation: "vertical",
140
140
  size: "middle",
141
141
  style: {
142
142
  minWidth: 240,
143
143
  maxWidth: "min(92vw, 320px)"
144
144
  },
145
- children: [/* @__PURE__ */ q(tt, {}), /* @__PURE__ */ q($e, {})]
145
+ children: [/* @__PURE__ */ q(nt, {}), /* @__PURE__ */ q(et, {})]
146
146
  }),
147
147
  styles: { content: { padding: e.paddingSM } },
148
148
  children: /* @__PURE__ */ q(w, {
149
149
  type: "default",
150
- icon: /* @__PURE__ */ q(we, {}),
150
+ icon: /* @__PURE__ */ q(Y, {}),
151
151
  "aria-label": "Display and theme settings"
152
152
  })
153
153
  });
154
154
  }
155
155
  //#endregion
156
156
  //#region src/components/NavMenuSearch.tsx
157
- function rt({ value: e, onChange: t, placeholder: n = "Search menu…", variant: r = "on-dark" }) {
157
+ function it({ value: e, onChange: t, placeholder: n = "Search menu…", variant: r = "on-dark" }) {
158
158
  let { token: i } = G.useToken(), a = r === "on-dark";
159
159
  return /* @__PURE__ */ q("div", {
160
160
  style: {
@@ -164,7 +164,7 @@ function rt({ value: e, onChange: t, placeholder: n = "Search menu…", variant:
164
164
  },
165
165
  children: /* @__PURE__ */ q(D, {
166
166
  theme: a ? { token: { colorTextPlaceholder: "rgba(255, 255, 255, 0.45)" } } : void 0,
167
- children: /* @__PURE__ */ q(N, {
167
+ children: /* @__PURE__ */ q(P, {
168
168
  allowClear: !0,
169
169
  size: "small",
170
170
  value: e,
@@ -172,7 +172,7 @@ function rt({ value: e, onChange: t, placeholder: n = "Search menu…", variant:
172
172
  t(e.target.value);
173
173
  },
174
174
  placeholder: n,
175
- prefix: /* @__PURE__ */ q(Ce, { style: { color: a ? "rgba(255, 255, 255, 0.45)" : i.colorTextDescription } }),
175
+ prefix: /* @__PURE__ */ q(we, { style: { color: a ? "rgba(255, 255, 255, 0.45)" : i.colorTextDescription } }),
176
176
  "aria-label": n,
177
177
  styles: {
178
178
  input: a ? { color: "rgba(255, 255, 255, 0.88)" } : void 0,
@@ -189,7 +189,7 @@ function rt({ value: e, onChange: t, placeholder: n = "Search menu…", variant:
189
189
  }
190
190
  //#endregion
191
191
  //#region src/components/ScrollableArea.tsx
192
- var it = r(function({ children: e, className: t, style: n, variant: r = "default" }, i) {
192
+ var at = r(function({ children: e, className: t, style: n, variant: r = "default" }, i) {
193
193
  let { token: a } = G.useToken(), o = r === "on-dark" ? "rgba(255, 255, 255, 0.22)" : a.colorTextQuaternary, s = r === "on-dark" ? "rgba(255, 255, 255, 0.38)" : a.colorTextTertiary;
194
194
  return /* @__PURE__ */ q("div", {
195
195
  ref: i,
@@ -202,15 +202,15 @@ var it = r(function({ children: e, className: t, style: n, variant: r = "default
202
202
  },
203
203
  children: e
204
204
  });
205
- }), at = t(null), ot = "User";
206
- function st(e) {
207
- return e.getUserLabel?.() ?? ot;
205
+ }), ot = t(null), st = "User";
206
+ function ct(e) {
207
+ return e.getUserLabel?.() ?? st;
208
208
  }
209
- function ct({ children: e, adapter: t }) {
210
- let [n, r] = d(() => t.getToken()), [i, o] = d(() => st(t)), s = a(async (e) => {
211
- await t.login(e), r(t.getToken()), o(st(t));
209
+ function lt({ children: e, adapter: t }) {
210
+ let [n, r] = d(() => t.getToken()), [i, o] = d(() => ct(t)), s = a(async (e) => {
211
+ await t.login(e), r(t.getToken()), o(ct(t));
212
212
  }, [t]), c = a(() => {
213
- t.logout(), r(t.getToken()), o(st(t));
213
+ t.logout(), r(t.getToken()), o(ct(t));
214
214
  }, [t]), u = l(() => ({
215
215
  isAuthenticated: !!n,
216
216
  userLabel: i,
@@ -222,18 +222,18 @@ function ct({ children: e, adapter: t }) {
222
222
  s,
223
223
  c
224
224
  ]);
225
- return /* @__PURE__ */ q(at.Provider, {
225
+ return /* @__PURE__ */ q(ot.Provider, {
226
226
  value: u,
227
227
  children: e
228
228
  });
229
229
  }
230
- function lt() {
231
- let e = o(at);
230
+ function ut() {
231
+ let e = o(ot);
232
232
  if (!e) throw Error("useAuth must be used within AuthProvider");
233
233
  return e;
234
234
  }
235
- var ut = "ding-react-admin-auth";
236
- function dt(e = ut) {
235
+ var dt = "ding-react-admin-auth";
236
+ function ft(e = dt) {
237
237
  return {
238
238
  async login({ username: t, password: n }) {
239
239
  if (!t.trim() || !n) throw Error("Invalid credentials");
@@ -249,39 +249,39 @@ function dt(e = ut) {
249
249
  }
250
250
  //#endregion
251
251
  //#region src/context/PermissionsProvider.tsx
252
- var ft = t(null);
253
- function pt({ children: e, can: t }) {
252
+ var pt = t(null);
253
+ function mt({ children: e, can: t }) {
254
254
  let n = l(() => t, [t]);
255
- return /* @__PURE__ */ q(ft.Provider, {
255
+ return /* @__PURE__ */ q(pt.Provider, {
256
256
  value: n,
257
257
  children: e
258
258
  });
259
259
  }
260
260
  function X() {
261
- let e = o(ft);
261
+ let e = o(pt);
262
262
  if (!e) throw Error("usePermissions must be used within PermissionsProvider");
263
263
  return e;
264
264
  }
265
- function mt(e) {
265
+ function ht(e) {
266
266
  return (t) => e()?.includes(t) ?? !1;
267
267
  }
268
- function ht(e) {
268
+ function gt(e) {
269
269
  let t = X();
270
270
  return a(() => t(e), [t, e]);
271
271
  }
272
272
  //#endregion
273
273
  //#region src/layouts/navFilter.ts
274
- function gt(e) {
274
+ function _t(e) {
275
275
  let { label: t } = e;
276
276
  return typeof t == "string" ? t : typeof t == "number" ? String(t) : "";
277
277
  }
278
- function _t(e, t) {
278
+ function vt(e, t) {
279
279
  let n = t.trim().toLowerCase();
280
280
  if (!n) return e;
281
281
  function r(e) {
282
282
  let t = [];
283
283
  for (let i of e) {
284
- let e = gt(i).toLowerCase().includes(n);
284
+ let e = _t(i).toLowerCase().includes(n);
285
285
  if (i.children?.length) {
286
286
  let n = r(i.children);
287
287
  e ? t.push(i) : n.length > 0 && t.push({
@@ -294,7 +294,26 @@ function _t(e, t) {
294
294
  }
295
295
  return r(e);
296
296
  }
297
- function vt(e) {
297
+ function yt(e, t) {
298
+ let n = t?.group, r = [];
299
+ function i(e) {
300
+ for (let t of e) t.children?.length ? i(t.children) : r.push({
301
+ path: t.path,
302
+ label: t.label,
303
+ Icon: t.Icon,
304
+ group: n
305
+ });
306
+ }
307
+ return i(e), r;
308
+ }
309
+ function bt(e, t) {
310
+ let n = t.trim().toLowerCase();
311
+ return n ? e.filter((e) => {
312
+ let t = _t(e).toLowerCase(), r = (e.group ?? "").toLowerCase();
313
+ return t.includes(n) || r.includes(n);
314
+ }) : [];
315
+ }
316
+ function xt(e) {
298
317
  let t = [];
299
318
  function n(e) {
300
319
  for (let r of e) r.children?.length && (t.push(r.path), n(r.children));
@@ -303,7 +322,7 @@ function vt(e) {
303
322
  }
304
323
  //#endregion
305
324
  //#region src/components/NavMenuLabel.tsx
306
- function yt({ label: e, title: t }) {
325
+ function St({ label: e, title: t }) {
307
326
  return t ? /* @__PURE__ */ q(U, {
308
327
  title: t,
309
328
  placement: "right",
@@ -320,13 +339,13 @@ function yt({ label: e, title: t }) {
320
339
  }
321
340
  //#endregion
322
341
  //#region src/layouts/navMenuItems.tsx
323
- function bt(e, t) {
342
+ function Ct(e, t) {
324
343
  let n = t?.showLabelTooltip !== !1, r = t?.wrapLabels === !0, i = t?.collapsed === !0;
325
344
  return e.map((e) => {
326
- let a = e.Icon, o = a ? /* @__PURE__ */ q(a, {}) : void 0, s = gt(e), c = s && n ? /* @__PURE__ */ q(yt, {
345
+ let a = e.Icon, o = a ? /* @__PURE__ */ q(a, {}) : void 0, s = _t(e), c = s && n ? /* @__PURE__ */ q(St, {
327
346
  label: e.label,
328
347
  title: s
329
- }) : r ? /* @__PURE__ */ q(yt, {
348
+ }) : r ? /* @__PURE__ */ q(St, {
330
349
  label: e.label,
331
350
  title: ""
332
351
  }) : e.label, l = i && s ? { title: s } : {};
@@ -335,7 +354,7 @@ function bt(e, t) {
335
354
  icon: o,
336
355
  label: c,
337
356
  ...l,
338
- children: bt(e.children, t)
357
+ children: Ct(e.children, t)
339
358
  } : {
340
359
  key: e.path,
341
360
  icon: o,
@@ -351,10 +370,10 @@ function Z(e, t, n) {
351
370
  let r = t[n];
352
371
  return n === "read" && !r && (r = t.list), r ? e(r) : !1;
353
372
  }
354
- function xt(e, t) {
373
+ function wt(e, t) {
355
374
  return e.map((e) => {
356
375
  if (e.children?.length) {
357
- let n = xt(e.children, t);
376
+ let n = wt(e.children, t);
358
377
  return n.length === 0 ? null : {
359
378
  ...e,
360
379
  children: n
@@ -365,25 +384,25 @@ function xt(e, t) {
365
384
  }
366
385
  //#endregion
367
386
  //#region src/layouts/AdminLayout.tsx
368
- var St = "#001529", Ct = "ding-react-admin-sider-collapsed";
369
- function wt(e) {
387
+ var Tt = "#001529", Et = "ding-react-admin-sider-collapsed";
388
+ function Dt(e) {
370
389
  try {
371
390
  return localStorage.getItem(e) === "1";
372
391
  } catch {
373
392
  return !1;
374
393
  }
375
394
  }
376
- function Tt() {
377
- return te.useBreakpoint().lg !== !0;
395
+ function Ot() {
396
+ return ee.useBreakpoint().lg !== !0;
378
397
  }
379
- function Et(e) {
398
+ function kt(e) {
380
399
  let t = /* @__PURE__ */ new Set();
381
400
  function n(e) {
382
401
  for (let r of e) r.children?.length ? n(r.children) : t.add(r.path);
383
402
  }
384
403
  return n(e), t;
385
404
  }
386
- function Dt(e, t) {
405
+ function At(e, t) {
387
406
  function n(e) {
388
407
  for (let r of e) if (r.children?.length) {
389
408
  let e = n(r.children);
@@ -393,17 +412,17 @@ function Dt(e, t) {
393
412
  }
394
413
  return n(e) ?? [];
395
414
  }
396
- function Ot({ wrapLabels: e, itemDivider: t = "none" }) {
415
+ function jt({ wrapLabels: e, itemDivider: t = "none" }) {
397
416
  let n = ["ding-admin-nav-menu"];
398
417
  return e && n.push("ding-admin-nav-menu--wrap-labels"), t === "full" ? n.push("ding-admin-nav-menu--item-divider-full") : t === "inset" && n.push("ding-admin-nav-menu--item-divider-inset"), n.join(" ");
399
418
  }
400
- function kt({ menuItems: e, selectedKeys: t, inlineCollapsed: n, openKeys: r, onOpenChange: i, onNavigate: a, navQuery: o, onNavQueryChange: s, showNavSearch: c, navSearchPlaceholder: l, scrollVariant: u, searchVariant: d, wrapLabels: f, itemDivider: p }) {
401
- return /* @__PURE__ */ J(K, { children: [c && !n ? /* @__PURE__ */ q(rt, {
419
+ function Mt({ menuItems: e, selectedKeys: t, inlineCollapsed: n, openKeys: r, onOpenChange: i, onNavigate: a, navQuery: o, onNavQueryChange: s, showNavSearch: c, navSearchPlaceholder: l, scrollVariant: u, searchVariant: d, wrapLabels: f, itemDivider: p }) {
420
+ return /* @__PURE__ */ J(K, { children: [c && !n ? /* @__PURE__ */ q(it, {
402
421
  value: o,
403
422
  onChange: s,
404
423
  placeholder: l,
405
424
  variant: d
406
- }) : null, /* @__PURE__ */ q(it, {
425
+ }) : null, /* @__PURE__ */ q(at, {
407
426
  variant: u,
408
427
  style: {
409
428
  flex: 1,
@@ -411,7 +430,7 @@ function kt({ menuItems: e, selectedKeys: t, inlineCollapsed: n, openKeys: r, on
411
430
  overflowY: "auto",
412
431
  overflowX: "hidden"
413
432
  },
414
- children: /* @__PURE__ */ q(At, {
433
+ children: /* @__PURE__ */ q(Nt, {
415
434
  menuItems: e,
416
435
  selectedKeys: t,
417
436
  inlineCollapsed: n,
@@ -423,9 +442,9 @@ function kt({ menuItems: e, selectedKeys: t, inlineCollapsed: n, openKeys: r, on
423
442
  })
424
443
  })] });
425
444
  }
426
- function At({ menuItems: e, selectedKeys: t, inlineCollapsed: n, openKeys: r, onOpenChange: i, onNavigate: a, wrapLabels: o, itemDivider: s }) {
427
- return /* @__PURE__ */ q(ne, {
428
- className: Ot({
445
+ function Nt({ menuItems: e, selectedKeys: t, inlineCollapsed: n, openKeys: r, onOpenChange: i, onNavigate: a, wrapLabels: o, itemDivider: s }) {
446
+ return /* @__PURE__ */ q(L, {
447
+ className: jt({
429
448
  wrapLabels: o,
430
449
  itemDivider: s
431
450
  }),
@@ -449,79 +468,79 @@ function At({ menuItems: e, selectedKeys: t, inlineCollapsed: n, openKeys: r, on
449
468
  }
450
469
  });
451
470
  }
452
- function jt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDrawerTitle: r, headerExtras: i, userMenuItems: o, onUserMenuClick: c, loginPath: f = "/login", siderCollapsedStorageKey: p = Ct, navSearch: h = !0, navMenu: g, hideSider: y = !1 }) {
453
- let b = v(), x = _(), { resolved: S } = Ze(), T = S === "dark", { logout: E, userLabel: D } = lt(), O = X(), [A, j] = d(() => wt(p)), [te, M] = d(!1), N = Tt(), { token: P } = G.useToken(), ne = u(null), [I, re] = d(""), ie = h !== !1, ae = typeof h == "object" ? h.placeholder : void 0, L = g?.wrapLabels !== !1, R = g?.itemDivider ?? "inset", z = r ?? t, B = () => {
471
+ function Pt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDrawerTitle: r, headerExtras: i, userMenuItems: o, onUserMenuClick: c, loginPath: f = "/login", siderCollapsedStorageKey: p = Et, navSearch: h = !0, navMenu: g, hideSider: y = !1 }) {
472
+ let b = v(), x = _(), { resolved: S } = Qe(), T = S === "dark", { logout: E, userLabel: D } = ut(), O = X(), [j, M] = d(() => Dt(p)), [ee, N] = d(!1), P = Ot(), { token: F } = G.useToken(), te = u(null), [L, ne] = d(""), re = h !== !1, ie = typeof h == "object" ? h.placeholder : void 0, R = g?.wrapLabels !== !1, ae = g?.itemDivider ?? "inset", z = r ?? t, B = () => {
454
473
  E(), b(f, { replace: !0 });
455
474
  }, oe = a((e) => {
456
- j(e);
475
+ M(e);
457
476
  try {
458
477
  localStorage.setItem(p, e ? "1" : "0");
459
478
  } catch {}
460
479
  }, [p]);
461
480
  s(() => {
462
- N || M(!1);
463
- }, [N]), s(() => {
464
- M(!1);
481
+ P || N(!1);
482
+ }, [P]), s(() => {
483
+ N(!1);
465
484
  }, [x.pathname]), s(() => {
466
- ne.current?.scrollTo({
485
+ te.current?.scrollTo({
467
486
  top: 0,
468
487
  left: 0
469
488
  });
470
489
  }, [x.pathname]), s(() => {
471
- A && re("");
472
- }, [A]);
473
- let V = l(() => xt(e, O), [e, O]), se = I.trim(), ce = se.length > 0, H = l(() => ce ? _t(V, se) : V, [
490
+ j && ne("");
491
+ }, [j]);
492
+ let V = l(() => wt(e, O), [e, O]), se = L.trim(), ce = se.length > 0, H = l(() => ce ? vt(V, se) : V, [
474
493
  V,
475
494
  se,
476
495
  ce
477
- ]), U = l(() => Et(H), [H]), K = l(() => bt(H, {
478
- showLabelTooltip: !A && !L,
479
- wrapLabels: L && !A,
480
- collapsed: A
496
+ ]), le = l(() => kt(H), [H]), U = l(() => Ct(H, {
497
+ showLabelTooltip: !j && !R,
498
+ wrapLabels: R && !j,
499
+ collapsed: j
481
500
  }), [
482
501
  H,
483
- A,
484
- L
485
- ]), le = l(() => vt(H), [H]), ue = l(() => Dt(V, x.pathname), [V, x.pathname]), [de, fe] = d(() => Dt(V, x.pathname));
502
+ j,
503
+ R
504
+ ]), K = l(() => xt(H), [H]), ue = l(() => At(V, x.pathname), [V, x.pathname]), [de, fe] = d(() => At(V, x.pathname));
486
505
  s(() => {
487
506
  fe((e) => [...new Set([...e, ...ue])]);
488
507
  }, [ue]);
489
508
  let pe = a((e) => {
490
509
  fe(e);
491
- }, []), me = ce ? le : de, he = a((e) => {
492
- re(e);
510
+ }, []), me = ce ? K : de, he = a((e) => {
511
+ ne(e);
493
512
  }, []), ge = l(() => [{
494
513
  key: "logout",
495
- icon: /* @__PURE__ */ q(ve, {}),
514
+ icon: /* @__PURE__ */ q(ye, {}),
496
515
  label: "Log out",
497
516
  danger: !0
498
- }], []), _e = o ?? ge, be = (e) => {
517
+ }], []), _e = o ?? ge, ve = (e) => {
499
518
  if (c) {
500
519
  c(e);
501
520
  return;
502
521
  }
503
522
  e.key === "logout" && B();
504
- }, xe = T ? P.colorBgContainer : St, Se = T ? "default" : "on-dark", Ce = T ? "app" : "on-dark", we = [x.pathname], Y = (e) => {
505
- U.has(e) && (b(e), N && M(!1));
523
+ }, xe = T ? F.colorBgContainer : Tt, Se = T ? "default" : "on-dark", Ce = T ? "app" : "on-dark", we = [x.pathname], Y = (e) => {
524
+ le.has(e) && (b(e), P && N(!1));
506
525
  };
507
- return /* @__PURE__ */ J(F, {
526
+ return /* @__PURE__ */ J(I, {
508
527
  style: {
509
528
  height: "100vh",
510
529
  width: "100%",
511
530
  overflow: "hidden",
512
- background: P.colorBgLayout
531
+ background: F.colorBgLayout
513
532
  },
514
533
  children: [
515
- !y && !N && /* @__PURE__ */ q(F.Sider, {
534
+ !y && !P && /* @__PURE__ */ q(I.Sider, {
516
535
  collapsible: !0,
517
- collapsed: A,
536
+ collapsed: j,
518
537
  onCollapse: oe,
519
538
  collapsedWidth: 64,
520
539
  style: {
521
540
  background: xe,
522
541
  height: "100vh",
523
542
  overflow: "hidden",
524
- borderInlineEnd: T ? `1px solid ${P.colorSplit}` : void 0
543
+ borderInlineEnd: T ? `1px solid ${F.colorSplit}` : void 0
525
544
  },
526
545
  children: /* @__PURE__ */ J("div", {
527
546
  style: {
@@ -541,41 +560,41 @@ function jt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDr
541
560
  },
542
561
  children: /* @__PURE__ */ q(W.Text, {
543
562
  strong: !0,
544
- style: { color: P.colorTextLightSolid },
545
- children: A ? n : t
563
+ style: { color: F.colorTextLightSolid },
564
+ children: j ? n : t
546
565
  })
547
- }), /* @__PURE__ */ q(kt, {
548
- menuItems: K,
566
+ }), /* @__PURE__ */ q(Mt, {
567
+ menuItems: U,
549
568
  selectedKeys: we,
550
- inlineCollapsed: A,
569
+ inlineCollapsed: j,
551
570
  openKeys: me,
552
571
  onOpenChange: pe,
553
572
  onNavigate: Y,
554
- navQuery: I,
573
+ navQuery: L,
555
574
  onNavQueryChange: he,
556
- showNavSearch: ie,
557
- navSearchPlaceholder: ae,
575
+ showNavSearch: re,
576
+ navSearchPlaceholder: ie,
558
577
  scrollVariant: Se,
559
578
  searchVariant: Ce,
560
- wrapLabels: L,
561
- itemDivider: R
579
+ wrapLabels: R,
580
+ itemDivider: ae
562
581
  })]
563
582
  })
564
583
  }),
565
- !y && N && /* @__PURE__ */ q(k, {
584
+ !y && P && /* @__PURE__ */ q(k, {
566
585
  title: /* @__PURE__ */ q(W.Text, {
567
586
  strong: !0,
568
- style: { color: P.colorTextLightSolid },
587
+ style: { color: F.colorTextLightSolid },
569
588
  children: z
570
589
  }),
571
590
  placement: "left",
572
591
  size: 280,
573
- onClose: () => M(!1),
574
- open: te,
592
+ onClose: () => N(!1),
593
+ open: ee,
575
594
  styles: {
576
595
  header: {
577
596
  background: xe,
578
- borderBottom: `1px solid ${P.colorSplit}`
597
+ borderBottom: `1px solid ${F.colorSplit}`
579
598
  },
580
599
  body: {
581
600
  padding: 0,
@@ -590,25 +609,25 @@ function jt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDr
590
609
  height: "100%",
591
610
  overflow: "hidden"
592
611
  },
593
- children: /* @__PURE__ */ q(kt, {
594
- menuItems: K,
612
+ children: /* @__PURE__ */ q(Mt, {
613
+ menuItems: U,
595
614
  selectedKeys: we,
596
615
  inlineCollapsed: !1,
597
616
  openKeys: me,
598
617
  onOpenChange: pe,
599
618
  onNavigate: Y,
600
- navQuery: I,
619
+ navQuery: L,
601
620
  onNavQueryChange: he,
602
- showNavSearch: ie,
603
- navSearchPlaceholder: ae,
621
+ showNavSearch: re,
622
+ navSearchPlaceholder: ie,
604
623
  scrollVariant: Se,
605
624
  searchVariant: Ce,
606
- wrapLabels: L,
607
- itemDivider: R
625
+ wrapLabels: R,
626
+ itemDivider: ae
608
627
  })
609
628
  })
610
629
  }),
611
- /* @__PURE__ */ J(F, {
630
+ /* @__PURE__ */ J(I, {
612
631
  style: {
613
632
  minWidth: 0,
614
633
  flex: 1,
@@ -617,21 +636,21 @@ function jt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDr
617
636
  display: "flex",
618
637
  flexDirection: "column"
619
638
  },
620
- children: [/* @__PURE__ */ J(F.Header, {
639
+ children: [/* @__PURE__ */ J(I.Header, {
621
640
  style: {
622
- background: P.colorBgContainer,
623
- paddingInline: P.paddingLG,
641
+ background: F.colorBgContainer,
642
+ paddingInline: F.paddingLG,
624
643
  display: "flex",
625
644
  alignItems: "center",
626
- gap: P.marginSM,
645
+ gap: F.marginSM,
627
646
  lineHeight: "normal",
628
647
  flexShrink: 0
629
648
  },
630
649
  children: [
631
- !y && N && /* @__PURE__ */ q(w, {
650
+ !y && P && /* @__PURE__ */ q(w, {
632
651
  type: "text",
633
- icon: /* @__PURE__ */ q(ye, {}),
634
- onClick: () => M(!0),
652
+ icon: /* @__PURE__ */ q(be, {}),
653
+ onClick: () => N(!0),
635
654
  "aria-label": "Open navigation"
636
655
  }),
637
656
  /* @__PURE__ */ q("div", { style: {
@@ -639,11 +658,11 @@ function jt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDr
639
658
  minWidth: 0
640
659
  } }),
641
660
  i,
642
- /* @__PURE__ */ q(nt, {}),
643
- /* @__PURE__ */ q(ee, {
661
+ /* @__PURE__ */ q(rt, {}),
662
+ /* @__PURE__ */ q(A, {
644
663
  menu: {
645
664
  items: _e,
646
- onClick: be
665
+ onClick: ve
647
666
  },
648
667
  trigger: ["click"],
649
668
  children: /* @__PURE__ */ J(w, {
@@ -651,15 +670,15 @@ function jt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDr
651
670
  style: {
652
671
  display: "inline-flex",
653
672
  alignItems: "center",
654
- gap: P.marginXS,
655
- maxWidth: N ? 44 : void 0,
656
- paddingInline: N ? P.paddingXS : void 0
673
+ gap: F.marginXS,
674
+ maxWidth: P ? 44 : void 0,
675
+ paddingInline: P ? F.paddingXS : void 0
657
676
  },
658
677
  "aria-label": "Account menu",
659
678
  children: [/* @__PURE__ */ q(C, {
660
679
  size: "small",
661
- icon: /* @__PURE__ */ q(Ee, {})
662
- }), !N && /* @__PURE__ */ q(W.Text, {
680
+ icon: /* @__PURE__ */ q(De, {})
681
+ }), !P && /* @__PURE__ */ q(W.Text, {
663
682
  type: "secondary",
664
683
  ellipsis: !0,
665
684
  style: { maxWidth: 160 },
@@ -668,7 +687,7 @@ function jt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDr
668
687
  })
669
688
  })
670
689
  ]
671
- }), /* @__PURE__ */ q(F.Content, {
690
+ }), /* @__PURE__ */ q(I.Content, {
672
691
  style: {
673
692
  minWidth: 0,
674
693
  flex: 1,
@@ -676,10 +695,10 @@ function jt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDr
676
695
  display: "flex",
677
696
  flexDirection: "column"
678
697
  },
679
- children: /* @__PURE__ */ q(it, {
680
- ref: ne,
698
+ children: /* @__PURE__ */ q(at, {
699
+ ref: te,
681
700
  style: {
682
- margin: N ? P.marginSM : P.marginLG,
701
+ margin: P ? F.marginSM : F.marginLG,
683
702
  flex: 1,
684
703
  minHeight: 0,
685
704
  overflow: "auto"
@@ -693,30 +712,30 @@ function jt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDr
693
712
  }
694
713
  //#endregion
695
714
  //#region src/router/guards.tsx
696
- function Mt({ when: e, redirect: t, children: n }) {
715
+ function Ft({ when: e, redirect: t, children: n }) {
697
716
  return e ? n : /* @__PURE__ */ q(p, {
698
717
  to: t,
699
718
  replace: !0
700
719
  });
701
720
  }
702
- function Nt({ children: e, redirectTo: t = "/login" }) {
703
- let { isAuthenticated: n } = lt();
704
- return /* @__PURE__ */ q(Mt, {
721
+ function It({ children: e, redirectTo: t = "/login" }) {
722
+ let { isAuthenticated: n } = ut();
723
+ return /* @__PURE__ */ q(Ft, {
705
724
  when: n,
706
725
  redirect: t,
707
726
  children: e
708
727
  });
709
728
  }
710
- function Pt({ children: e, redirectTo: t = "/" }) {
711
- let { isAuthenticated: n } = lt();
712
- return /* @__PURE__ */ q(Mt, {
729
+ function Lt({ children: e, redirectTo: t = "/" }) {
730
+ let { isAuthenticated: n } = ut();
731
+ return /* @__PURE__ */ q(Ft, {
713
732
  when: !n,
714
733
  redirect: t,
715
734
  children: e
716
735
  });
717
736
  }
718
- function Ft({ permission: e, redirect: t, children: n }) {
719
- return /* @__PURE__ */ q(Mt, {
737
+ function Rt({ permission: e, redirect: t, children: n }) {
738
+ return /* @__PURE__ */ q(Ft, {
720
739
  when: X()(e),
721
740
  redirect: t,
722
741
  children: n
@@ -724,13 +743,13 @@ function Ft({ permission: e, redirect: t, children: n }) {
724
743
  }
725
744
  //#endregion
726
745
  //#region src/router/routeAccess.ts
727
- function It(e) {
746
+ function zt(e) {
728
747
  return e.access ?? "protected";
729
748
  }
730
- function Lt(e) {
749
+ function Bt(e) {
731
750
  let t = [], n = [], r = [];
732
751
  for (let i of e) {
733
- let e = It(i);
752
+ let e = zt(i);
734
753
  e === "guest" ? t.push(i) : e === "public" ? n.push(i) : r.push(i);
735
754
  }
736
755
  return {
@@ -739,24 +758,24 @@ function Lt(e) {
739
758
  protected: r
740
759
  };
741
760
  }
742
- function Rt(e) {
761
+ function Vt(e) {
743
762
  return e.replace(/^\/+/, "");
744
763
  }
745
- function zt(e) {
746
- return `/${Rt(e)}`;
764
+ function Ht(e) {
765
+ return `/${Vt(e)}`;
747
766
  }
748
- function Bt(e, t) {
749
- let { guest: n, protected: r } = Lt(e), i = n.find((e) => "path" in e && e.path), a = r.find((e) => "index" in e && e.index), o = r.find((e) => "path" in e && e.path), s = t?.unauthenticated;
750
- !s && i && "path" in i && i.path && (s = zt(i.path));
767
+ function Ut(e, t) {
768
+ let { guest: n, protected: r } = Bt(e), i = n.find((e) => "path" in e && e.path), a = r.find((e) => "index" in e && e.index), o = r.find((e) => "path" in e && e.path), s = t?.unauthenticated;
769
+ !s && i && "path" in i && i.path && (s = Ht(i.path));
751
770
  let c = t?.afterLogin;
752
- if (c || (a ? c = "/" : o && "path" in o && o.path && (c = zt(o.path))), r.length > 0 && !s) throw Error("createAdminRouter: protected routes require redirects.unauthenticated or a guest route (access: \"guest\").");
771
+ if (c || (a ? c = "/" : o && "path" in o && o.path && (c = Ht(o.path))), r.length > 0 && !s) throw Error("createAdminRouter: protected routes require redirects.unauthenticated or a guest route (access: \"guest\").");
753
772
  if (n.length > 0 && !c) throw Error("createAdminRouter: guest routes require redirects.afterLogin or a protected route (index or path).");
754
773
  return {
755
774
  loginPath: s ?? "/",
756
775
  homePath: c ?? "/"
757
776
  };
758
777
  }
759
- function Vt(e) {
778
+ function Wt(e) {
760
779
  return "index" in e && e.index ? {
761
780
  index: !0,
762
781
  element: e.element
@@ -767,30 +786,30 @@ function Vt(e) {
767
786
  }
768
787
  //#endregion
769
788
  //#region src/router/createAdminRouter.tsx
770
- function Ht({ navItems: e, children: t, layoutProps: n, redirects: r }) {
771
- let { loginPath: i, homePath: a } = Bt(t, r), { guest: o, public: s, protected: c } = Lt(t), l = [];
789
+ function Gt({ navItems: e, children: t, layoutProps: n, redirects: r }) {
790
+ let { loginPath: i, homePath: a } = Ut(t, r), { guest: o, public: s, protected: c } = Bt(t), l = [];
772
791
  for (let e of o) !("path" in e) || !e.path || l.push({
773
- path: Rt(e.path),
774
- element: /* @__PURE__ */ q(Pt, {
792
+ path: Vt(e.path),
793
+ element: /* @__PURE__ */ q(Lt, {
775
794
  redirectTo: a,
776
795
  children: e.element
777
796
  })
778
797
  });
779
798
  for (let e of s) !("path" in e) || !e.path || l.push({
780
- path: Rt(e.path),
799
+ path: Vt(e.path),
781
800
  element: e.element
782
801
  });
783
802
  return c.length > 0 && l.push({
784
803
  path: "/",
785
- element: /* @__PURE__ */ q(Nt, {
804
+ element: /* @__PURE__ */ q(It, {
786
805
  redirectTo: i,
787
- children: /* @__PURE__ */ q(jt, {
806
+ children: /* @__PURE__ */ q(Pt, {
788
807
  navItems: e,
789
808
  loginPath: i,
790
809
  ...n
791
810
  })
792
811
  }),
793
- children: c.map(Vt)
812
+ children: c.map(Wt)
794
813
  }), l.push({
795
814
  path: "*",
796
815
  element: /* @__PURE__ */ q(p, {
@@ -801,8 +820,8 @@ function Ht({ navItems: e, children: t, layoutProps: n, redirects: r }) {
801
820
  }
802
821
  //#endregion
803
822
  //#region src/app/AdminApp.tsx
804
- function Ut({ navItems: e, routes: t, authRedirects: n, layoutProps: r, theme: i }) {
805
- let a = l(() => Ht({
823
+ function Kt({ navItems: e, routes: t, authRedirects: n, layoutProps: r, theme: i }) {
824
+ let a = l(() => Gt({
806
825
  navItems: e,
807
826
  children: t,
808
827
  layoutProps: r,
@@ -813,74 +832,74 @@ function Ut({ navItems: e, routes: t, authRedirects: n, layoutProps: r, theme: i
813
832
  r,
814
833
  n
815
834
  ]);
816
- return /* @__PURE__ */ q(Xe, {
835
+ return /* @__PURE__ */ q(Ze, {
817
836
  ...i,
818
837
  children: /* @__PURE__ */ q(h, { router: a })
819
838
  });
820
839
  }
821
840
  //#endregion
822
841
  //#region src/context/DataProvider.tsx
823
- var Wt = t(null);
824
- function Gt({ children: e, value: t }) {
842
+ var qt = t(null);
843
+ function Jt({ children: e, value: t }) {
825
844
  let n = l(() => t, [t]);
826
- return /* @__PURE__ */ q(Wt.Provider, {
845
+ return /* @__PURE__ */ q(qt.Provider, {
827
846
  value: n,
828
847
  children: e
829
848
  });
830
849
  }
831
- function Kt() {
832
- let e = o(Wt);
850
+ function Yt() {
851
+ let e = o(qt);
833
852
  if (!e) throw Error("useDataProvider must be used within DataProvider");
834
853
  return e;
835
854
  }
836
855
  //#endregion
837
856
  //#region src/data/resourceHandlers.ts
838
- function qt(e) {
857
+ function Xt(e) {
839
858
  return "handlers" in e ? e : { handlers: e };
840
859
  }
841
- function Jt(e, t, n) {
860
+ function Zt(e, t, n) {
842
861
  if (!(!e || !t) && !Z(e, t, n)) throw Error("Forbidden");
843
862
  }
844
- function Yt(e, t) {
863
+ function Qt(e, t) {
845
864
  let { can: n, guard: r, parseFormError: i } = t ?? {}, a = (t) => {
846
865
  let n = e[t];
847
866
  if (!n) throw Error(`Unknown resource: ${t}`);
848
- return qt(n);
867
+ return Xt(n);
849
868
  };
850
869
  return {
851
870
  async getList(e, t) {
852
871
  let { handlers: i, permissions: o } = a(e);
853
- return r?.(e, "list"), Jt(n, o, "list"), i.getList(t);
872
+ return r?.(e, "list"), Zt(n, o, "list"), i.getList(t);
854
873
  },
855
874
  async getOne(e, t, i) {
856
875
  let { handlers: o, permissions: s } = a(e);
857
- return r?.(e, "read"), Jt(n, s, "read"), o.getOne(t, i);
876
+ return r?.(e, "read"), Zt(n, s, "read"), o.getOne(t, i);
858
877
  },
859
878
  async create(e, t) {
860
879
  let { handlers: i, permissions: o } = a(e);
861
- return r?.(e, "add"), Jt(n, o, "add"), i.create(t);
880
+ return r?.(e, "add"), Zt(n, o, "add"), i.create(t);
862
881
  },
863
882
  async update(e, t) {
864
883
  let { handlers: i, permissions: o } = a(e);
865
- return r?.(e, "change"), Jt(n, o, "change"), i.update(t);
884
+ return r?.(e, "change"), Zt(n, o, "change"), i.update(t);
866
885
  },
867
886
  async delete(e, t) {
868
887
  let { handlers: i, permissions: o } = a(e);
869
- return r?.(e, "delete"), Jt(n, o, "delete"), i.delete(t);
888
+ return r?.(e, "delete"), Zt(n, o, "delete"), i.delete(t);
870
889
  },
871
890
  parseFormError: i
872
891
  };
873
892
  }
874
893
  //#endregion
875
894
  //#region src/data/abortError.ts
876
- function Xt(e) {
895
+ function $t(e) {
877
896
  if (typeof e != "object" || !e) return !1;
878
897
  let t = e;
879
898
  return t.name === "AbortError" || t.name === "CanceledError" || t.code === "ERR_CANCELED";
880
899
  }
881
900
  //#endregion
882
901
  //#region src/data/parseFormErrorHelpers.ts
883
- var Zt = "Expected HTTP 400 with a JSON object such as `{ \"field_name\": [\"message\"] }` or `{ \"non_field_errors\": [\"message\"] }`.", Qt = 300;
902
+ var en = "Expected HTTP 400 with a JSON object such as `{ \"field_name\": [\"message\"] }` or `{ \"non_field_errors\": [\"message\"] }`.", tn = 300;
884
903
  function Q(e) {
885
904
  if (typeof e == "string") return [e];
886
905
  if (Array.isArray(e)) {
@@ -889,136 +908,136 @@ function Q(e) {
889
908
  }
890
909
  return [];
891
910
  }
892
- function $t(e) {
911
+ function nn(e) {
893
912
  return e.length === 1 ? e[0] : e;
894
913
  }
895
- function en(e) {
914
+ function rn(e) {
896
915
  return typeof e == "object" && !!e && !Array.isArray(e);
897
916
  }
898
- function tn(e) {
917
+ function an(e) {
899
918
  return typeof Response < "u" && e instanceof Response ? !0 : typeof e == "object" && !!e && typeof e.json == "function" && typeof e.status == "number" && e.headers != null;
900
919
  }
901
- function nn(e, t) {
920
+ function on(e, t) {
902
921
  if (t) return t;
903
922
  if (e === null) return "(no JSON body)";
904
923
  try {
905
924
  let t = JSON.stringify(e);
906
- return t.length > Qt ? `${t.slice(0, Qt)}…` : t;
925
+ return t.length > tn ? `${t.slice(0, tn)}…` : t;
907
926
  } catch {
908
927
  return String(e);
909
928
  }
910
929
  }
911
- function rn(e, t) {
912
- return `Non-standard validation response. ${Zt} Received: ${nn(e, t?.hint)}`;
930
+ function sn(e, t) {
931
+ return `Non-standard validation response. ${en} Received: ${on(e, t?.hint)}`;
913
932
  }
914
- function an(e) {
933
+ function cn(e) {
915
934
  if (!e || typeof e != "object") return null;
916
935
  let t = e.response;
917
936
  if (!t || typeof t != "object") return null;
918
937
  let n = t.status;
919
938
  return typeof n == "number" && (n === 400 || n === 422) ? n : null;
920
939
  }
921
- function on(e) {
940
+ function ln(e) {
922
941
  if (!e || typeof e != "object") return null;
923
942
  let t = e.response;
924
- return tn(t) ? t.headers.get("content-type") : null;
943
+ return an(t) ? t.headers.get("content-type") : null;
925
944
  }
926
- function sn(e) {
945
+ function un(e) {
927
946
  if (!e || typeof e != "object") return null;
928
947
  let t = e;
929
- if (en(t.body)) return t.body;
930
- if (en(t.data)) return t.data;
948
+ if (rn(t.body)) return t.body;
949
+ if (rn(t.data)) return t.data;
931
950
  let n = t.response;
932
951
  if (n && typeof n == "object" && !Array.isArray(n)) {
933
952
  let e = n.data;
934
- if (en(e)) return e;
953
+ if (rn(e)) return e;
935
954
  }
936
955
  return null;
937
956
  }
938
- function cn(e) {
939
- if (en(e)) return e;
957
+ function dn(e) {
958
+ if (rn(e)) return e;
940
959
  if (Array.isArray(e)) {
941
960
  let t = Q(e);
942
- return t.length ? { non_field_errors: $t(t) } : null;
961
+ return t.length ? { non_field_errors: nn(t) } : null;
943
962
  }
944
963
  return null;
945
964
  }
946
- async function ln(e) {
947
- let t = sn(e);
965
+ async function fn(e) {
966
+ let t = un(e);
948
967
  if (t) return t;
949
968
  if (!e || typeof e != "object") return null;
950
969
  let n = e.response;
951
- if (!tn(n)) return null;
970
+ if (!an(n)) return null;
952
971
  let r = n.headers.get("content-type");
953
972
  if (!r || !/application\/json/i.test(r)) return null;
954
973
  try {
955
- return cn(await n.clone().json());
974
+ return dn(await n.clone().json());
956
975
  } catch {
957
976
  return null;
958
977
  }
959
978
  }
960
- function un(e) {
979
+ function pn(e) {
961
980
  return Array.isArray(e) ? e.some((e) => e && typeof e == "object" && !Array.isArray(e) && Object.values(e).some((e) => Q(e).length > 0)) : !1;
962
981
  }
963
- function dn(e, t, n) {
982
+ function mn(e, t, n) {
964
983
  t.forEach((t, r) => {
965
984
  if (!(!t || typeof t != "object" || Array.isArray(t))) for (let [i, a] of Object.entries(t)) {
966
985
  let t = Q(a);
967
- t.length && (n[`${e}.${r}.${i}`] = $t(t));
986
+ t.length && (n[`${e}.${r}.${i}`] = nn(t));
968
987
  }
969
988
  });
970
989
  }
971
- function fn(e, t) {
990
+ function hn(e, t) {
972
991
  return {
973
992
  fields: Object.keys(e).length ? e : void 0,
974
993
  global: t.length ? t : void 0
975
994
  };
976
995
  }
977
- var pn = new Set(["non_field_errors", "detail"]);
978
- function mn(e) {
996
+ var gn = new Set(["non_field_errors", "detail"]);
997
+ function _n(e) {
979
998
  let t = {}, n = [];
980
999
  for (let [r, i] of Object.entries(e)) {
981
- if (pn.has(r)) {
1000
+ if (gn.has(r)) {
982
1001
  n.push(...Q(i));
983
1002
  continue;
984
1003
  }
985
- if (un(i)) {
986
- dn(r, i, t);
1004
+ if (pn(i)) {
1005
+ mn(r, i, t);
987
1006
  continue;
988
1007
  }
989
1008
  let e = Q(i);
990
- e.length && (t[r] = $t(e));
1009
+ e.length && (t[r] = nn(e));
991
1010
  }
992
- return !Object.keys(t).length && !n.length ? null : fn(t, n);
1011
+ return !Object.keys(t).length && !n.length ? null : hn(t, n);
993
1012
  }
994
- function hn(e, t) {
995
- let n = sn(e);
996
- return n ? mn(n) : null;
1013
+ function vn(e, t) {
1014
+ let n = un(e);
1015
+ return n ? _n(n) : null;
997
1016
  }
998
- function gn(e, t, n) {
999
- let r = sn(e);
1017
+ function yn(e, t, n) {
1018
+ let r = un(e);
1000
1019
  if (!r) return null;
1001
1020
  let i = n?.camelCase ?? !0, a = n?.fieldMap, o = {}, s = [];
1002
1021
  n?.includeSummary && (s.push(...Q(r.title)), s.push(...Q(r.message)));
1003
1022
  let c = r.errors;
1004
1023
  if (c && typeof c == "object" && !Array.isArray(c)) for (let [e, t] of Object.entries(c)) {
1005
- let n = a?.[e] ?? (i ? yn(e) : e), r = Q(t);
1006
- r.length && (o[n] = $t(r));
1024
+ let n = a?.[e] ?? (i ? Sn(e) : e), r = Q(t);
1025
+ r.length && (o[n] = nn(r));
1007
1026
  }
1008
- return !Object.keys(o).length && !s.length ? null : fn(o, s);
1027
+ return !Object.keys(o).length && !s.length ? null : hn(o, s);
1009
1028
  }
1010
- function _n(e, t, n) {
1011
- let r = sn(e);
1029
+ function bn(e, t, n) {
1030
+ let r = un(e);
1012
1031
  if (!r) return null;
1013
1032
  let i = {}, a = [], o = n?.fieldMap, s = r.errors;
1014
1033
  if (Array.isArray(s)) for (let e of s) {
1015
1034
  if (!e || typeof e != "object") continue;
1016
1035
  let t = e, n = typeof t.path == "string" && t.path || typeof t.param == "string" && t.param || typeof t.field == "string" && t.field, r = Q(t.msg)[0] ?? Q(t.message)[0];
1017
- r && (n ? vn(i, o?.[n] ?? n, r) : a.push(r));
1036
+ r && (n ? xn(i, o?.[n] ?? n, r) : a.push(r));
1018
1037
  }
1019
1038
  else if (s && typeof s == "object") for (let [e, t] of Object.entries(s)) {
1020
1039
  let n = o?.[e] ?? e, r = Q(t);
1021
- r.length && (i[n] = $t(r));
1040
+ r.length && (i[n] = nn(r));
1022
1041
  }
1023
1042
  let c = r.details;
1024
1043
  if (Array.isArray(c)) for (let e of c) {
@@ -1029,9 +1048,9 @@ function _n(e, t, n) {
1029
1048
  i[e] = r;
1030
1049
  } else a.push(r);
1031
1050
  }
1032
- return a.push(...Q(r.error)), !Object.keys(i).length && !a.length ? null : fn(i, a);
1051
+ return a.push(...Q(r.error)), !Object.keys(i).length && !a.length ? null : hn(i, a);
1033
1052
  }
1034
- function vn(e, t, n) {
1053
+ function xn(e, t, n) {
1035
1054
  let r = e[t];
1036
1055
  if (!r) {
1037
1056
  e[t] = n;
@@ -1039,20 +1058,20 @@ function vn(e, t, n) {
1039
1058
  }
1040
1059
  e[t] = Array.isArray(r) ? [...r, n] : [r, n];
1041
1060
  }
1042
- function yn(e) {
1061
+ function Sn(e) {
1043
1062
  return e && e.charAt(0).toLowerCase() + e.slice(1);
1044
1063
  }
1045
1064
  //#endregion
1046
1065
  //#region src/data/inMemoryList.ts
1047
- function bn(e, t) {
1066
+ function Cn(e, t) {
1048
1067
  return e === t || String(e) === String(t);
1049
1068
  }
1050
- function xn(e, t) {
1051
- let n = e.find((e) => bn(e.id, t));
1069
+ function wn(e, t) {
1070
+ let n = e.find((e) => Cn(e.id, t));
1052
1071
  if (!n) throw Error("Not found");
1053
1072
  return n;
1054
1073
  }
1055
- function Sn(e, t) {
1074
+ function Tn(e, t) {
1056
1075
  if (t.length === 0) return e;
1057
1076
  let n = (e) => e === "DESC" ? -1 : 1;
1058
1077
  return [...e].sort((e, r) => {
@@ -1068,33 +1087,33 @@ function Sn(e, t) {
1068
1087
  return 0;
1069
1088
  });
1070
1089
  }
1071
- function Cn(e, t) {
1090
+ function En(e, t) {
1072
1091
  return t == null || t === "" ? !0 : Array.isArray(t) ? t.length === 0 ? !0 : Array.isArray(e) ? t.some((t) => e.includes(t)) : t.includes(e) : Array.isArray(e) ? e.includes(t) : typeof t == "string" && typeof e == "string" ? e.toLowerCase().includes(t.toLowerCase()) : e === t;
1073
1092
  }
1074
- function wn(e, t) {
1075
- return t ? e.filter((e) => Object.entries(t).every(([t, n]) => Cn(e[t], n))) : e;
1093
+ function Dn(e, t) {
1094
+ return t ? e.filter((e) => Object.entries(t).every(([t, n]) => En(e[t], n))) : e;
1076
1095
  }
1077
- function Tn(e, t, n) {
1096
+ function On(e, t, n) {
1078
1097
  let r = (t - 1) * n;
1079
1098
  return {
1080
1099
  data: e.slice(r, r + n),
1081
1100
  total: e.length
1082
1101
  };
1083
1102
  }
1084
- function En(e, t) {
1085
- let { pagination: n, sort: r, filter: i } = t, a = wn(e, i);
1103
+ function kn(e, t) {
1104
+ let { pagination: n, sort: r, filter: i } = t, a = Dn(e, i);
1086
1105
  if (r) {
1087
1106
  let e = Array.isArray(r) ? r : [r];
1088
- e.length > 0 && e[0]?.field && (a = Sn(a, e));
1107
+ e.length > 0 && e[0]?.field && (a = Tn(a, e));
1089
1108
  }
1090
- return n ? Tn(a, n.page, n.perPage) : {
1109
+ return n ? On(a, n.page, n.perPage) : {
1091
1110
  data: a,
1092
1111
  total: a.length
1093
1112
  };
1094
1113
  }
1095
1114
  //#endregion
1096
1115
  //#region src/data/createMemoryResourceHandlers.ts
1097
- function Dn(e) {
1116
+ function An(e) {
1098
1117
  let t = (e) => e, n = e.mapCreate ?? ((e, t) => ({
1099
1118
  ...e,
1100
1119
  id: t
@@ -1105,21 +1124,21 @@ function Dn(e) {
1105
1124
  }));
1106
1125
  return {
1107
1126
  async getList(n) {
1108
- return En(t(e.scopeList ? e.scopeList(e.getRows(), n) : e.getRows()), n);
1127
+ return kn(t(e.scopeList ? e.scopeList(e.getRows(), n) : e.getRows()), n);
1109
1128
  },
1110
1129
  async getOne(t, n) {
1111
- return { data: xn(e.getRows(), t) };
1130
+ return { data: wn(e.getRows(), t) };
1112
1131
  },
1113
1132
  async create(t) {
1114
1133
  let r = n(t, e.nextId());
1115
1134
  return e.getRows().push(r), { data: r };
1116
1135
  },
1117
1136
  async update({ id: t, data: n }) {
1118
- let i = xn(e.getRows(), t), a = r(i, n);
1137
+ let i = wn(e.getRows(), t), a = r(i, n);
1119
1138
  return Object.assign(i, a), { data: i };
1120
1139
  },
1121
1140
  async delete(t) {
1122
- let n = e.getRows(), r = n.findIndex((e) => bn(e.id, t));
1141
+ let n = e.getRows(), r = n.findIndex((e) => Cn(e.id, t));
1123
1142
  if (r < 0) return { data: null };
1124
1143
  let [i] = n.splice(r, 1);
1125
1144
  return e.afterDelete?.(i), { data: i };
@@ -1128,7 +1147,7 @@ function Dn(e) {
1128
1147
  }
1129
1148
  //#endregion
1130
1149
  //#region src/data/createRestResourceHandlers.ts
1131
- function On(e) {
1150
+ function jn(e) {
1132
1151
  return {
1133
1152
  async getList(t) {
1134
1153
  return e.list(t);
@@ -1151,24 +1170,24 @@ function On(e) {
1151
1170
  }
1152
1171
  //#endregion
1153
1172
  //#region src/data/sortHelpers.ts
1154
- function kn(e) {
1173
+ function Mn(e) {
1155
1174
  return e ? Array.isArray(e) ? e : [e] : [];
1156
1175
  }
1157
- function An(e) {
1158
- let t = kn(e);
1176
+ function Nn(e) {
1177
+ let t = Mn(e);
1159
1178
  if (t.length !== 0) return t.map((e) => e.order === "DESC" ? `-${e.field}` : e.field).join(",");
1160
1179
  }
1161
- function jn(e) {
1162
- let t = kn(e);
1180
+ function Pn(e) {
1181
+ let t = Mn(e);
1163
1182
  if (t.length !== 0) return t.map((e) => `${e.field} ${e.order === "DESC" ? "desc" : "asc"}`).join(",");
1164
1183
  }
1165
- function Mn(e) {
1166
- let t = kn(e);
1184
+ function Fn(e) {
1185
+ let t = Mn(e);
1167
1186
  if (t.length !== 0) return t.map((e) => e.order === "DESC" ? `-${e.field}` : e.field).join(",");
1168
1187
  }
1169
1188
  //#endregion
1170
1189
  //#region src/components/AuthAlternateLink.tsx
1171
- function Nn({ prompt: e, linkText: t, to: n }) {
1190
+ function In({ prompt: e, linkText: t, to: n }) {
1172
1191
  return /* @__PURE__ */ J(W.Paragraph, {
1173
1192
  type: "secondary",
1174
1193
  style: {
@@ -1187,9 +1206,9 @@ function Nn({ prompt: e, linkText: t, to: n }) {
1187
1206
  }
1188
1207
  //#endregion
1189
1208
  //#region src/layouts/AuthPageLayout.tsx
1190
- function Pn({ children: e, brand: t, footer: n, showThemeToolbar: r = !0 }) {
1209
+ function Ln({ children: e, brand: t, footer: n, showThemeToolbar: r = !0 }) {
1191
1210
  let { token: i } = G.useToken();
1192
- return /* @__PURE__ */ J(A, {
1211
+ return /* @__PURE__ */ J(j, {
1193
1212
  vertical: !0,
1194
1213
  align: "stretch",
1195
1214
  style: {
@@ -1200,7 +1219,7 @@ function Pn({ children: e, brand: t, footer: n, showThemeToolbar: r = !0 }) {
1200
1219
  background: i.colorBgLayout
1201
1220
  },
1202
1221
  children: [
1203
- r ? /* @__PURE__ */ q(A, {
1222
+ r ? /* @__PURE__ */ q(j, {
1204
1223
  justify: "flex-end",
1205
1224
  style: {
1206
1225
  flexShrink: 0,
@@ -1208,7 +1227,7 @@ function Pn({ children: e, brand: t, footer: n, showThemeToolbar: r = !0 }) {
1208
1227
  padding: 16,
1209
1228
  background: i.colorBgLayout
1210
1229
  },
1211
- children: /* @__PURE__ */ q(nt, {})
1230
+ children: /* @__PURE__ */ q(rt, {})
1212
1231
  }) : null,
1213
1232
  t ? /* @__PURE__ */ q("div", {
1214
1233
  style: {
@@ -1218,14 +1237,14 @@ function Pn({ children: e, brand: t, footer: n, showThemeToolbar: r = !0 }) {
1218
1237
  },
1219
1238
  children: t
1220
1239
  }) : null,
1221
- /* @__PURE__ */ q(it, {
1240
+ /* @__PURE__ */ q(at, {
1222
1241
  style: {
1223
1242
  flex: 1,
1224
1243
  minHeight: 0,
1225
1244
  width: "100%",
1226
1245
  background: i.colorBgLayout
1227
1246
  },
1228
- children: /* @__PURE__ */ J(A, {
1247
+ children: /* @__PURE__ */ J(j, {
1229
1248
  vertical: !0,
1230
1249
  align: "center",
1231
1250
  justify: "flex-start",
@@ -1249,11 +1268,11 @@ function Pn({ children: e, brand: t, footer: n, showThemeToolbar: r = !0 }) {
1249
1268
  }
1250
1269
  //#endregion
1251
1270
  //#region src/pages/LoginPage.tsx
1252
- function Fn({ title: e = "Sign in", description: t = "Use any username and password to continue.", logo: n, brand: r, extraFields: i, showThemeToolbar: a = !0, afterLoginPath: o = "/", alternateAuth: s, footer: c }) {
1253
- let { login: l } = lt(), u = v();
1254
- return /* @__PURE__ */ q(Pn, {
1271
+ function Rn({ title: e = "Sign in", description: t = "Use any username and password to continue.", logo: n, brand: r, extraFields: i, showThemeToolbar: a = !0, afterLoginPath: o = "/", alternateAuth: s, footer: c }) {
1272
+ let { login: l } = ut(), u = v();
1273
+ return /* @__PURE__ */ q(Ln, {
1255
1274
  brand: r ?? n,
1256
- footer: c ?? (s ? /* @__PURE__ */ q(Nn, {
1275
+ footer: c ?? (s ? /* @__PURE__ */ q(In, {
1257
1276
  prompt: s.prompt ?? "Don't have an account?",
1258
1277
  linkText: s.linkText,
1259
1278
  to: s.to
@@ -1269,7 +1288,7 @@ function Fn({ title: e = "Sign in", description: t = "Use any username and passw
1269
1288
  type: "secondary",
1270
1289
  style: { marginTop: 0 },
1271
1290
  children: t
1272
- }) : null, /* @__PURE__ */ J(j, {
1291
+ }) : null, /* @__PURE__ */ J(M, {
1273
1292
  layout: "vertical",
1274
1293
  onFinish: async (e) => {
1275
1294
  await l({
@@ -1279,26 +1298,26 @@ function Fn({ title: e = "Sign in", description: t = "Use any username and passw
1279
1298
  }), u(o, { replace: !0 });
1280
1299
  },
1281
1300
  children: [
1282
- /* @__PURE__ */ q(j.Item, {
1301
+ /* @__PURE__ */ q(M.Item, {
1283
1302
  name: "username",
1284
1303
  label: "Username",
1285
1304
  rules: [{
1286
1305
  required: !0,
1287
1306
  message: "Required"
1288
1307
  }],
1289
- children: /* @__PURE__ */ q(N, { autoComplete: "username" })
1308
+ children: /* @__PURE__ */ q(P, { autoComplete: "username" })
1290
1309
  }),
1291
- /* @__PURE__ */ q(j.Item, {
1310
+ /* @__PURE__ */ q(M.Item, {
1292
1311
  name: "password",
1293
1312
  label: "Password",
1294
1313
  rules: [{
1295
1314
  required: !0,
1296
1315
  message: "Required"
1297
1316
  }],
1298
- children: /* @__PURE__ */ q(N.Password, { autoComplete: "current-password" })
1317
+ children: /* @__PURE__ */ q(P.Password, { autoComplete: "current-password" })
1299
1318
  }),
1300
1319
  i,
1301
- /* @__PURE__ */ q(j.Item, {
1320
+ /* @__PURE__ */ q(M.Item, {
1302
1321
  style: { marginBottom: 0 },
1303
1322
  children: /* @__PURE__ */ q(w, {
1304
1323
  type: "primary",
@@ -1314,7 +1333,7 @@ function Fn({ title: e = "Sign in", description: t = "Use any username and passw
1314
1333
  }
1315
1334
  //#endregion
1316
1335
  //#region src/pages/PlaceholderPage.tsx
1317
- function In({ title: e }) {
1336
+ function zn({ title: e }) {
1318
1337
  return /* @__PURE__ */ q(W.Title, {
1319
1338
  level: 3,
1320
1339
  style: { marginTop: 0 },
@@ -1323,54 +1342,117 @@ function In({ title: e }) {
1323
1342
  }
1324
1343
  //#endregion
1325
1344
  //#region src/components/AppHub.tsx
1326
- function Ln({ apps: e, onAppClick: t, className: n }) {
1327
- let r = v(), i = (e) => {
1328
- if (t) {
1329
- t(e);
1345
+ function Bn({ apps: e, menuItems: t, onAppClick: n, onMenuClick: r, menuSearchPlaceholder: i = "Search menus across apps…", className: a, maxWidth: o = 960, loading: s = !1 }) {
1346
+ let c = v(), { token: u } = G.useToken(), [f, p] = d(""), m = (e) => {
1347
+ if (n) {
1348
+ n(e);
1330
1349
  return;
1331
1350
  }
1332
- r(e.path);
1333
- };
1334
- return /* @__PURE__ */ q(ae, {
1335
- gutter: [16, 16],
1336
- className: n,
1337
- children: e.map((e) => {
1338
- let t = e.Icon;
1339
- return /* @__PURE__ */ q(E, {
1340
- xs: 12,
1341
- sm: 8,
1342
- md: 6,
1343
- lg: 4,
1344
- children: /* @__PURE__ */ q(T, {
1345
- hoverable: !0,
1346
- onClick: () => i(e),
1347
- styles: { body: { textAlign: "center" } },
1348
- children: /* @__PURE__ */ J(z, {
1349
- orientation: "vertical",
1350
- size: "small",
1351
- children: [t ? /* @__PURE__ */ q("span", {
1351
+ c(e.path);
1352
+ }, h = (e) => {
1353
+ if (r) {
1354
+ r(e);
1355
+ return;
1356
+ }
1357
+ c(e.path);
1358
+ }, g = f.trim(), _ = l(() => t && g ? bt(t, g) : [], [t, g]), y = !!(t && g);
1359
+ return /* @__PURE__ */ J("div", {
1360
+ className: a,
1361
+ style: {
1362
+ width: "100%",
1363
+ maxWidth: o,
1364
+ marginInline: "auto",
1365
+ paddingInline: u.paddingMD
1366
+ },
1367
+ children: [t?.length && !s ? /* @__PURE__ */ q("div", {
1368
+ style: {
1369
+ maxWidth: 480,
1370
+ margin: "0 auto 24px"
1371
+ },
1372
+ children: /* @__PURE__ */ q(it, {
1373
+ value: f,
1374
+ onChange: p,
1375
+ placeholder: i,
1376
+ variant: "app"
1377
+ })
1378
+ }) : null, s ? /* @__PURE__ */ q("div", {
1379
+ style: {
1380
+ display: "flex",
1381
+ justifyContent: "center",
1382
+ padding: u.paddingXL
1383
+ },
1384
+ children: /* @__PURE__ */ q(oe, { size: "large" })
1385
+ }) : y ? /* @__PURE__ */ q(te, {
1386
+ bordered: !0,
1387
+ dataSource: _,
1388
+ locale: { emptyText: "No menus match your search." },
1389
+ style: {
1390
+ background: u.colorBgContainer,
1391
+ borderRadius: u.borderRadiusLG
1392
+ },
1393
+ renderItem: (e) => {
1394
+ let t = e.Icon;
1395
+ return /* @__PURE__ */ q(te.Item, {
1396
+ style: { cursor: "pointer" },
1397
+ onClick: () => h(e),
1398
+ children: /* @__PURE__ */ q(te.Item.Meta, {
1399
+ avatar: t ? /* @__PURE__ */ q("span", {
1352
1400
  style: {
1353
- fontSize: 32,
1401
+ fontSize: 20,
1354
1402
  lineHeight: 1
1355
1403
  },
1356
1404
  children: /* @__PURE__ */ q(t, {})
1357
- }) : null, /* @__PURE__ */ q(W.Text, {
1358
- strong: !0,
1359
- children: e.label
1360
- })]
1405
+ }) : void 0,
1406
+ title: _t(e),
1407
+ description: e.group
1361
1408
  })
1362
- })
1363
- }, e.path);
1364
- })
1409
+ });
1410
+ }
1411
+ }) : /* @__PURE__ */ q(R, {
1412
+ gutter: [16, 16],
1413
+ justify: "center",
1414
+ children: e.map((e) => {
1415
+ let t = e.Icon;
1416
+ return /* @__PURE__ */ q(E, {
1417
+ xs: 12,
1418
+ sm: 8,
1419
+ md: 6,
1420
+ lg: 4,
1421
+ style: { maxWidth: 200 },
1422
+ children: /* @__PURE__ */ q(T, {
1423
+ hoverable: !0,
1424
+ onClick: () => m(e),
1425
+ styles: { body: {
1426
+ textAlign: "center",
1427
+ padding: u.paddingLG
1428
+ } },
1429
+ children: /* @__PURE__ */ J(B, {
1430
+ orientation: "vertical",
1431
+ size: "middle",
1432
+ children: [t ? /* @__PURE__ */ q("span", {
1433
+ style: {
1434
+ fontSize: 40,
1435
+ lineHeight: 1
1436
+ },
1437
+ children: /* @__PURE__ */ q(t, {})
1438
+ }) : null, /* @__PURE__ */ q(W.Text, {
1439
+ strong: !0,
1440
+ children: e.label
1441
+ })]
1442
+ })
1443
+ })
1444
+ }, e.path);
1445
+ })
1446
+ })]
1365
1447
  });
1366
1448
  }
1367
1449
  //#endregion
1368
1450
  //#region src/components/AppLauncherButton.tsx
1369
- function Rn({ hubPath: e = "/", label: t = "Apps", onClick: n }) {
1451
+ function Vn({ hubPath: e = "/", label: t = "Apps", onClick: n }) {
1370
1452
  let r = v();
1371
1453
  return /* @__PURE__ */ q(w, {
1372
1454
  type: "text",
1373
- icon: /* @__PURE__ */ q(le, {}),
1455
+ icon: /* @__PURE__ */ q(ue, {}),
1374
1456
  onClick: () => {
1375
1457
  if (n) {
1376
1458
  n();
@@ -1383,7 +1465,7 @@ function Rn({ hubPath: e = "/", label: t = "Apps", onClick: n }) {
1383
1465
  }
1384
1466
  //#endregion
1385
1467
  //#region src/crud/utils/sortQueryParam.ts
1386
- function zn(e) {
1468
+ function Hn(e) {
1387
1469
  if (!e) return [];
1388
1470
  let t = [];
1389
1471
  for (let n of e.split(",").map((e) => e.trim()).filter(Boolean)) {
@@ -1407,17 +1489,17 @@ function zn(e) {
1407
1489
  }
1408
1490
  return t;
1409
1491
  }
1410
- function Bn(e) {
1492
+ function Un(e) {
1411
1493
  return e.length === 0 ? null : e.map((e) => e.order === "DESC" ? `-${e.field}` : e.field).join(",");
1412
1494
  }
1413
- function Vn(e) {
1495
+ function Wn(e) {
1414
1496
  return new Map(e.map((e, t) => [e.field, t + 1]));
1415
1497
  }
1416
1498
  //#endregion
1417
1499
  //#region src/crud/context/ListContext.tsx
1418
- var Hn = t(null);
1419
- function Un({ children: e, toggleSort: t, sort: n }) {
1420
- let [r, i] = d([]), o = l(() => new Set(n.map((e) => e.field)), [n]), s = l(() => new Map(n.map((e) => [e.field, e.order])), [n]), c = l(() => Vn(n), [n]), u = a((e) => (i((t) => {
1500
+ var Gn = t(null);
1501
+ function Kn({ children: e, toggleSort: t, sort: n }) {
1502
+ let [r, i] = d([]), o = l(() => new Set(n.map((e) => e.field)), [n]), s = l(() => new Map(n.map((e) => [e.field, e.order])), [n]), c = l(() => Wn(n), [n]), u = a((e) => (i((t) => {
1421
1503
  let n = t.findIndex((t) => t.key === e.key);
1422
1504
  if (n < 0) return [...t, e];
1423
1505
  if (t[n] === e) return t;
@@ -1440,23 +1522,23 @@ function Un({ children: e, toggleSort: t, sort: n }) {
1440
1522
  c,
1441
1523
  u
1442
1524
  ]);
1443
- return /* @__PURE__ */ q(Hn.Provider, {
1525
+ return /* @__PURE__ */ q(Gn.Provider, {
1444
1526
  value: f,
1445
1527
  children: e
1446
1528
  });
1447
1529
  }
1448
- function Wn() {
1449
- let e = o(Hn);
1530
+ function qn() {
1531
+ let e = o(Gn);
1450
1532
  if (!e) throw Error("Column components must be used within ResourceList");
1451
1533
  return e;
1452
1534
  }
1453
- function Gn(e) {
1454
- let { registerColumn: t } = Wn();
1535
+ function Jn(e) {
1536
+ let { registerColumn: t } = qn();
1455
1537
  s(() => t(e), [t, e]);
1456
1538
  }
1457
1539
  //#endregion
1458
1540
  //#region src/crud/utils/useDebouncedValue.ts
1459
- function Kn(e, t) {
1541
+ function Yn(e, t) {
1460
1542
  let [n, r] = d(e);
1461
1543
  return s(() => {
1462
1544
  if (t <= 0) {
@@ -1469,42 +1551,42 @@ function Kn(e, t) {
1469
1551
  }
1470
1552
  //#endregion
1471
1553
  //#region src/crud/filters/TextFilter.tsx
1472
- var qn = 300;
1473
- function Jn(e) {
1554
+ var Xn = 300;
1555
+ function Zn(e) {
1474
1556
  if (!(e == null || e === "")) return String(e);
1475
1557
  }
1476
- function Yn({ value: e, onChange: t, placeholder: n, debounceMs: r }) {
1477
- let [i, a] = d(() => e ?? ""), o = Kn(i, r);
1558
+ function Qn({ value: e, onChange: t, placeholder: n, debounceMs: r }) {
1559
+ let [i, a] = d(() => e ?? ""), o = Yn(i, r);
1478
1560
  return s(() => {
1479
1561
  a(e ?? "");
1480
1562
  }, [e]), s(() => {
1481
1563
  if (r <= 0 || o !== i) return;
1482
- let n = Jn(o);
1483
- n !== Jn(e) && t(n);
1564
+ let n = Zn(o);
1565
+ n !== Zn(e) && t(n);
1484
1566
  }, [
1485
1567
  o,
1486
1568
  i,
1487
1569
  r,
1488
1570
  t,
1489
1571
  e
1490
- ]), /* @__PURE__ */ q(N, {
1572
+ ]), /* @__PURE__ */ q(P, {
1491
1573
  allowClear: !0,
1492
1574
  placeholder: n,
1493
1575
  value: i,
1494
1576
  onChange: (e) => {
1495
1577
  let n = e.target.value;
1496
- a(n), (r <= 0 || n === "") && t(Jn(n));
1578
+ a(n), (r <= 0 || n === "") && t(Zn(n));
1497
1579
  },
1498
1580
  style: { minWidth: 160 }
1499
1581
  });
1500
1582
  }
1501
- function Xn({ source: e, label: t, placeholder: n, debounceMs: r }) {
1502
- let i = $n(), a = r ?? i?.textFilterDebounceMs ?? 300;
1503
- return er(l(() => ({
1583
+ function $n({ source: e, label: t, placeholder: n, debounceMs: r }) {
1584
+ let i = nr(), a = r ?? i?.textFilterDebounceMs ?? 300;
1585
+ return rr(l(() => ({
1504
1586
  key: e,
1505
1587
  source: e,
1506
1588
  label: t,
1507
- render: ({ value: r, onChange: i }) => /* @__PURE__ */ q(Yn, {
1589
+ render: ({ value: r, onChange: i }) => /* @__PURE__ */ q(Qn, {
1508
1590
  value: r,
1509
1591
  onChange: i,
1510
1592
  placeholder: n ?? t ?? e,
@@ -1519,8 +1601,8 @@ function Xn({ source: e, label: t, placeholder: n, debounceMs: r }) {
1519
1601
  }
1520
1602
  //#endregion
1521
1603
  //#region src/crud/context/FilterContext.tsx
1522
- var Zn = t(null);
1523
- function Qn({ children: e, values: t, setFilterValue: n, textFilterDebounceMs: r = 300 }) {
1604
+ var er = t(null);
1605
+ function tr({ children: e, values: t, setFilterValue: n, textFilterDebounceMs: r = 300 }) {
1524
1606
  let [i, o] = d([]), s = a((e) => (o((t) => {
1525
1607
  let n = t.findIndex((t) => t.key === e.key);
1526
1608
  if (n < 0) return [...t, e];
@@ -1542,25 +1624,25 @@ function Qn({ children: e, values: t, setFilterValue: n, textFilterDebounceMs: r
1542
1624
  s,
1543
1625
  r
1544
1626
  ]);
1545
- return /* @__PURE__ */ q(Zn.Provider, {
1627
+ return /* @__PURE__ */ q(er.Provider, {
1546
1628
  value: c,
1547
1629
  children: e
1548
1630
  });
1549
1631
  }
1550
- function $n() {
1551
- return o(Zn);
1632
+ function nr() {
1633
+ return o(er);
1552
1634
  }
1553
- function er(e) {
1554
- let t = $n()?.registerFilter;
1635
+ function rr(e) {
1636
+ let t = nr()?.registerFilter;
1555
1637
  s(() => {
1556
1638
  if (t) return t(e);
1557
1639
  }, [t, e]);
1558
1640
  }
1559
1641
  //#endregion
1560
1642
  //#region src/crud/context/FormContext.tsx
1561
- var tr = t(null);
1562
- function nr({ children: e, resource: t, isNew: n, disabled: r }) {
1563
- return /* @__PURE__ */ q(tr.Provider, {
1643
+ var ir = t(null);
1644
+ function ar({ children: e, resource: t, isNew: n, disabled: r }) {
1645
+ return /* @__PURE__ */ q(ir.Provider, {
1564
1646
  value: {
1565
1647
  resource: t,
1566
1648
  isNew: n,
@@ -1569,35 +1651,35 @@ function nr({ children: e, resource: t, isNew: n, disabled: r }) {
1569
1651
  children: e
1570
1652
  });
1571
1653
  }
1572
- function rr() {
1573
- return o(tr);
1654
+ function or() {
1655
+ return o(ir);
1574
1656
  }
1575
1657
  //#endregion
1576
1658
  //#region src/crud/context/FormSectionContext.tsx
1577
- var ir = t(null);
1578
- function ar({ sourcesRef: e, children: t }) {
1579
- return /* @__PURE__ */ q(ir.Provider, {
1659
+ var sr = t(null);
1660
+ function cr({ sourcesRef: e, children: t }) {
1661
+ return /* @__PURE__ */ q(sr.Provider, {
1580
1662
  value: e,
1581
1663
  children: t
1582
1664
  });
1583
1665
  }
1584
- function or() {
1585
- return o(ir);
1666
+ function lr() {
1667
+ return o(sr);
1586
1668
  }
1587
1669
  //#endregion
1588
1670
  //#region src/crud/context/PayloadFieldsContext.tsx
1589
- var sr = t(null);
1590
- function cr({ children: e, fieldsRef: t }) {
1591
- return /* @__PURE__ */ q(sr.Provider, {
1671
+ var ur = t(null);
1672
+ function dr({ children: e, fieldsRef: t }) {
1673
+ return /* @__PURE__ */ q(ur.Provider, {
1592
1674
  value: t,
1593
1675
  children: e
1594
1676
  });
1595
1677
  }
1596
- function lr() {
1597
- return o(sr);
1678
+ function fr() {
1679
+ return o(ur);
1598
1680
  }
1599
- function ur(e, t = !0) {
1600
- let n = lr();
1681
+ function pr(e, t = !0) {
1682
+ let n = fr();
1601
1683
  s(() => {
1602
1684
  if (!(!t || !n)) return n.current.add(e), () => {
1603
1685
  n.current.delete(e);
@@ -1608,8 +1690,8 @@ function ur(e, t = !0) {
1608
1690
  t
1609
1691
  ]);
1610
1692
  }
1611
- function dr(e, t = !0) {
1612
- let n = or();
1693
+ function mr(e, t = !0) {
1694
+ let n = lr();
1613
1695
  s(() => {
1614
1696
  if (!(!t || !n)) return n.current.add(e), () => {
1615
1697
  n.current.delete(e);
@@ -1622,18 +1704,18 @@ function dr(e, t = !0) {
1622
1704
  }
1623
1705
  //#endregion
1624
1706
  //#region src/crud/context/InlineFieldsRegistry.tsx
1625
- var fr = t(null);
1626
- function pr({ children: e, registryRef: t }) {
1627
- return /* @__PURE__ */ q(fr.Provider, {
1707
+ var hr = t(null);
1708
+ function gr({ children: e, registryRef: t }) {
1709
+ return /* @__PURE__ */ q(hr.Provider, {
1628
1710
  value: t,
1629
1711
  children: e
1630
1712
  });
1631
1713
  }
1632
- function mr() {
1633
- return o(fr);
1714
+ function _r() {
1715
+ return o(hr);
1634
1716
  }
1635
- function hr(e, t, n, r, i = !0) {
1636
- let a = mr();
1717
+ function vr(e, t, n, r, i = !0) {
1718
+ let a = _r();
1637
1719
  s(() => {
1638
1720
  if (!(!i || !a)) return a.current.set(e, {
1639
1721
  field: e,
@@ -1654,7 +1736,7 @@ function hr(e, t, n, r, i = !0) {
1654
1736
  }
1655
1737
  //#endregion
1656
1738
  //#region src/crud/FormGlobalErrorsAlert.tsx
1657
- function gr({ errors: e }) {
1739
+ function yr({ errors: e }) {
1658
1740
  return e.length ? e.length === 1 ? /* @__PURE__ */ q(x, {
1659
1741
  type: "error",
1660
1742
  title: e[0],
@@ -1676,7 +1758,7 @@ function gr({ errors: e }) {
1676
1758
  }
1677
1759
  //#endregion
1678
1760
  //#region src/crud/utils/getFormValue.ts
1679
- function _r(e, t) {
1761
+ function br(e, t) {
1680
1762
  let n = t.split("."), r = e;
1681
1763
  for (let e of n) {
1682
1764
  if (typeof r != "object" || !r) return;
@@ -1686,7 +1768,7 @@ function _r(e, t) {
1686
1768
  }
1687
1769
  //#endregion
1688
1770
  //#region src/crud/utils/setFormValue.ts
1689
- function vr(e, t, n) {
1771
+ function xr(e, t, n) {
1690
1772
  let r = t.split("."), i = e;
1691
1773
  for (let e = 0; e < r.length - 1; e++) {
1692
1774
  let t = r[e], n = i[t];
@@ -1696,18 +1778,18 @@ function vr(e, t, n) {
1696
1778
  }
1697
1779
  //#endregion
1698
1780
  //#region src/crud/utils/buildFormPayload.ts
1699
- function yr(e, t) {
1781
+ function Sr(e, t) {
1700
1782
  if (t.length === 0) return { ...e };
1701
1783
  let n = {};
1702
1784
  for (let r of t) {
1703
- let t = _r(e, r);
1704
- t !== void 0 && vr(n, r, t);
1785
+ let t = br(e, r);
1786
+ t !== void 0 && xr(n, r, t);
1705
1787
  }
1706
1788
  return n;
1707
1789
  }
1708
1790
  //#endregion
1709
1791
  //#region src/crud/utils/buildInlineRowsPayload.ts
1710
- function br(e, t, n) {
1792
+ function Cr(e, t, n) {
1711
1793
  if (!Array.isArray(e)) return [];
1712
1794
  let r = e.map((e) => {
1713
1795
  if (!e || typeof e != "object") return {};
@@ -1723,34 +1805,34 @@ function br(e, t, n) {
1723
1805
  }
1724
1806
  //#endregion
1725
1807
  //#region src/crud/utils/hasUploadValues.ts
1726
- function xr(e) {
1727
- return e instanceof Blob ? !0 : Array.isArray(e) ? e.some(xr) : e && typeof e == "object" ? Object.values(e).some(xr) : !1;
1808
+ function wr(e) {
1809
+ return e instanceof Blob ? !0 : Array.isArray(e) ? e.some(wr) : e && typeof e == "object" ? Object.values(e).some(wr) : !1;
1728
1810
  }
1729
1811
  //#endregion
1730
1812
  //#region src/crud/utils/uploadReferenceUtils.ts
1731
- function Sr(e) {
1813
+ function Tr(e) {
1732
1814
  return /^https?:\/\//i.test(e) || e.startsWith("/media/");
1733
1815
  }
1734
- function Cr(e, t) {
1816
+ function Er(e, t) {
1735
1817
  if (!t) return e;
1736
- if (typeof e == "string") return Sr(e) ? void 0 : e;
1737
- if (Array.isArray(e)) return e.map((e) => Cr(e, t)).filter((e) => e !== void 0);
1818
+ if (typeof e == "string") return Tr(e) ? void 0 : e;
1819
+ if (Array.isArray(e)) return e.map((e) => Er(e, t)).filter((e) => e !== void 0);
1738
1820
  if (e && typeof e == "object" && !(e instanceof Blob)) {
1739
1821
  let n = {};
1740
1822
  for (let [r, i] of Object.entries(e)) {
1741
- let e = Cr(i, t);
1823
+ let e = Er(i, t);
1742
1824
  e !== void 0 && (n[r] = e);
1743
1825
  }
1744
1826
  return n;
1745
1827
  }
1746
1828
  return e;
1747
1829
  }
1748
- function wr(e, t = !0) {
1749
- return Cr(e, t);
1830
+ function Dr(e, t = !0) {
1831
+ return Er(e, t);
1750
1832
  }
1751
1833
  //#endregion
1752
1834
  //#region src/crud/utils/toFormData.ts
1753
- function Tr(e, t, n, r) {
1835
+ function Or(e, t, n, r) {
1754
1836
  if (n !== void 0) {
1755
1837
  if (n === null) {
1756
1838
  e.append(t, "");
@@ -1765,106 +1847,106 @@ function Tr(e, t, n, r) {
1765
1847
  return;
1766
1848
  }
1767
1849
  if (typeof n == "string") {
1768
- if (r.skipExistingUploadUrls && Sr(n)) return;
1850
+ if (r.skipExistingUploadUrls && Tr(n)) return;
1769
1851
  e.append(t, n);
1770
1852
  return;
1771
1853
  }
1772
1854
  if (Array.isArray(n)) {
1773
1855
  n.forEach((n, i) => {
1774
- Tr(e, `${t}[${i}]`, n, r);
1856
+ Or(e, `${t}[${i}]`, n, r);
1775
1857
  });
1776
1858
  return;
1777
1859
  }
1778
1860
  if (typeof n == "object") {
1779
- for (let [i, a] of Object.entries(n)) Tr(e, `${t}[${i}]`, a, r);
1861
+ for (let [i, a] of Object.entries(n)) Or(e, `${t}[${i}]`, a, r);
1780
1862
  return;
1781
1863
  }
1782
1864
  e.append(t, String(n));
1783
1865
  }
1784
1866
  }
1785
- function Er(e, t) {
1867
+ function kr(e, t) {
1786
1868
  let n = { skipExistingUploadUrls: t?.skipExistingUploadUrls ?? !0 }, r = new FormData();
1787
- for (let [t, i] of Object.entries(e)) Tr(r, t, i, n);
1869
+ for (let [t, i] of Object.entries(e)) Or(r, t, i, n);
1788
1870
  return r;
1789
1871
  }
1790
1872
  //#endregion
1791
1873
  //#region src/crud/utils/prepareFormSubmitBody.ts
1792
- function Dr(e, t) {
1874
+ function Ar(e, t) {
1793
1875
  let n = t?.skipExistingUploadUrls ?? !0;
1794
- return xr(e) ? Er(e, t) : wr(e, n);
1876
+ return wr(e) ? kr(e, t) : Dr(e, n);
1795
1877
  }
1796
1878
  //#endregion
1797
1879
  //#region src/crud/utils/buildResourceFormSubmitBody.ts
1798
- function Or(e, t, n, r) {
1799
- let i = yr(e, t);
1880
+ function jr(e, t, n, r) {
1881
+ let i = Sr(e, t);
1800
1882
  if (n) for (let t of n) {
1801
1883
  let n = e[t.field], r = t.payloadKey ?? t.field;
1802
- i[r] = br(n, t.sources, { transformRows: t.transformRows });
1884
+ i[r] = Cr(n, t.sources, { transformRows: t.transformRows });
1803
1885
  }
1804
- return Dr(i, r);
1886
+ return Ar(i, r);
1805
1887
  }
1806
1888
  //#endregion
1807
1889
  //#region src/crud/utils/formErrors.ts
1808
- function kr(e) {
1890
+ function Mr(e) {
1809
1891
  return e ? Array.isArray(e) ? e : [e] : [];
1810
1892
  }
1811
- function Ar(e) {
1893
+ function Nr(e) {
1812
1894
  return Array.isArray(e) ? e.join(", ") : e;
1813
1895
  }
1814
- function jr(e, t, n) {
1896
+ function Pr(e, t, n) {
1815
1897
  if (t.has(e)) return !0;
1816
1898
  let r = e.match(/^([^.]+)\.(\d+)\.([^.]+)$/);
1817
1899
  if (!r) return !1;
1818
1900
  let [, i, , a] = r;
1819
1901
  return n.get(i)?.sources.includes(a) ?? !1;
1820
1902
  }
1821
- function Mr(e, t, n) {
1822
- let r = {}, i = [...kr(e.global)];
1823
- for (let [a, o] of Object.entries(e.fields ?? {})) jr(a, t, n) ? r[a] = o : i.push(Ar(o));
1903
+ function Fr(e, t, n) {
1904
+ let r = {}, i = [...Mr(e.global)];
1905
+ for (let [a, o] of Object.entries(e.fields ?? {})) Pr(a, t, n) ? r[a] = o : i.push(Nr(o));
1824
1906
  return {
1825
1907
  fieldErrors: r,
1826
1908
  globalErrors: i
1827
1909
  };
1828
1910
  }
1829
- function Nr(e, t) {
1911
+ function Ir(e, t) {
1830
1912
  for (let [n, r] of Object.entries(t)) e.setError(n, {
1831
1913
  type: "server",
1832
- message: Ar(r)
1914
+ message: Nr(r)
1833
1915
  });
1834
1916
  }
1835
- function Pr(e) {
1836
- let t = on(e);
1917
+ function Lr(e) {
1918
+ let t = ln(e);
1837
1919
  if (t && !/application\/json/i.test(t)) return `non-JSON response (Content-Type: ${t})`;
1838
1920
  }
1839
- async function Fr(e, t, n, r, i) {
1840
- let a = await ln(n);
1921
+ async function Rr(e, t, n, r, i) {
1922
+ let a = await fn(n);
1841
1923
  if (a != null) {
1842
1924
  let n = e.parseFormError?.({ body: a }, r);
1843
1925
  if (n) {
1844
1926
  let e = new Set(i.payloadFields), r = /* @__PURE__ */ new Map();
1845
1927
  for (let e of i.inlineRegistry) r.set(e.field, e);
1846
- let { fieldErrors: a, globalErrors: o } = Mr(n, e, r);
1847
- if (Object.keys(a).length || o.length) return Nr(t, a), {
1928
+ let { fieldErrors: a, globalErrors: o } = Fr(n, e, r);
1929
+ if (Object.keys(a).length || o.length) return Ir(t, a), {
1848
1930
  handled: !0,
1849
1931
  globalErrors: o
1850
1932
  };
1851
1933
  }
1852
1934
  return {
1853
1935
  handled: !0,
1854
- globalErrors: [rn(a)]
1936
+ globalErrors: [sn(a)]
1855
1937
  };
1856
1938
  }
1857
- return an(n) == null ? {
1939
+ return cn(n) == null ? {
1858
1940
  handled: !1,
1859
1941
  globalErrors: []
1860
1942
  } : {
1861
1943
  handled: !0,
1862
- globalErrors: [rn(null, { hint: Pr(n) })]
1944
+ globalErrors: [sn(null, { hint: Lr(n) })]
1863
1945
  };
1864
1946
  }
1865
1947
  //#endregion
1866
1948
  //#region src/crud/utils/useAbortableEffect.ts
1867
- function Ir(e, t) {
1949
+ function zr(e, t) {
1868
1950
  s(() => {
1869
1951
  let t = new AbortController();
1870
1952
  return e(t.signal), () => t.abort();
@@ -1872,7 +1954,7 @@ function Ir(e, t) {
1872
1954
  }
1873
1955
  //#endregion
1874
1956
  //#region src/crud/utils/useFormRecord.ts
1875
- function Lr({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, defaultValues: s, enabled: c = !0 }) {
1957
+ function Br({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, defaultValues: s, enabled: c = !0 }) {
1876
1958
  let [l, u] = d(!r), [f, p] = d(0), m = a(async (a) => {
1877
1959
  if (r || !n) {
1878
1960
  s ? i.reset({ ...s }) : i.reset({}), u(!1);
@@ -1884,7 +1966,7 @@ function Lr({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, defaultV
1884
1966
  if (a?.aborted) return;
1885
1967
  i.reset(r.data), p((e) => e + 1);
1886
1968
  } catch (e) {
1887
- Xt(e) || o.error(e instanceof Error ? e.message : "Load failed");
1969
+ $t(e) || o.error(e instanceof Error ? e.message : "Load failed");
1888
1970
  } finally {
1889
1971
  a?.aborted || u(!1);
1890
1972
  }
@@ -1897,20 +1979,20 @@ function Lr({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, defaultV
1897
1979
  o,
1898
1980
  s
1899
1981
  ]);
1900
- return Ir((e) => {
1982
+ return zr((e) => {
1901
1983
  if (c) return m(e);
1902
1984
  }, [c, m]), {
1903
1985
  loading: l,
1904
1986
  formVersion: f
1905
1987
  };
1906
1988
  }
1907
- function Rr({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, payloadFieldsRef: s, inlineRegistryRef: c, setGlobalErrors: l, onSuccess: u }) {
1989
+ function Vr({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, payloadFieldsRef: s, inlineRegistryRef: c, setGlobalErrors: l, onSuccess: u }) {
1908
1990
  let [f, p] = d(!1);
1909
1991
  return {
1910
1992
  onSubmit: a(async (a) => {
1911
1993
  l([]), p(!0);
1912
1994
  try {
1913
- let i = Or(a, Array.from(s.current), c.current.values()), l;
1995
+ let i = jr(a, Array.from(s.current), c.current.values()), l;
1914
1996
  if (r) l = (await e.create(t, i)).data, o.success("Created");
1915
1997
  else if (n) l = (await e.update(t, {
1916
1998
  id: n,
@@ -1919,7 +2001,7 @@ function Rr({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, payloadF
1919
2001
  else return;
1920
2002
  u?.(l);
1921
2003
  } catch (n) {
1922
- let { handled: a, globalErrors: u } = await Fr(e, i, n, {
2004
+ let { handled: a, globalErrors: u } = await Rr(e, i, n, {
1923
2005
  resource: t,
1924
2006
  mutation: r ? "create" : "update",
1925
2007
  inlineFieldPaths: Array.from(c.current.keys())
@@ -1948,8 +2030,8 @@ function Rr({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, payloadF
1948
2030
  }
1949
2031
  //#endregion
1950
2032
  //#region src/crud/ResourceRecordForm.tsx
1951
- function zr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0, canSave: o = !0, onCancel: s, cancelHref: c, onSuccess: l, loadingMode: p = "overlay" }) {
1952
- let m = t === "new" || !t, h = m ? void 0 : t, g = Kt(), { message: _ } = S.useApp(), v = u(/* @__PURE__ */ new Set()), y = u(/* @__PURE__ */ new Map()), [b, x] = d([]), C = Ae({ defaultValues: i }), { loading: T, formVersion: E } = Lr({
2033
+ function Hr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0, canSave: o = !0, onCancel: s, cancelHref: c, onSuccess: l, loadingMode: p = "overlay" }) {
2034
+ let m = t === "new" || !t, h = m ? void 0 : t, g = Yt(), { message: _ } = S.useApp(), v = u(/* @__PURE__ */ new Set()), y = u(/* @__PURE__ */ new Map()), [b, x] = d([]), C = je({ defaultValues: i }), { loading: T, formVersion: E } = Br({
1953
2035
  dp: g,
1954
2036
  resource: e,
1955
2037
  id: h,
@@ -1958,7 +2040,7 @@ function zr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0
1958
2040
  message: _,
1959
2041
  defaultValues: i,
1960
2042
  enabled: a
1961
- }), { onSubmit: D, saving: O } = Rr({
2043
+ }), { onSubmit: D, saving: O } = Vr({
1962
2044
  dp: g,
1963
2045
  resource: e,
1964
2046
  id: h,
@@ -1969,20 +2051,20 @@ function zr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0
1969
2051
  inlineRegistryRef: y,
1970
2052
  setGlobalErrors: x,
1971
2053
  onSuccess: l
1972
- }), k = T || O, ee = () => {
2054
+ }), k = T || O, A = () => {
1973
2055
  C.handleSubmit(D, () => {
1974
2056
  _.warning("Please fix the errors below.");
1975
2057
  })();
1976
- }, A = /* @__PURE__ */ q(w, {
2058
+ }, j = /* @__PURE__ */ q(w, {
1977
2059
  disabled: k,
1978
2060
  onClick: c ? void 0 : s,
1979
2061
  children: "Cancel"
1980
- }), te = /* @__PURE__ */ q(nr, {
2062
+ }), ee = /* @__PURE__ */ q(ar, {
1981
2063
  resource: e,
1982
2064
  isNew: m,
1983
- children: /* @__PURE__ */ q(cr, {
2065
+ children: /* @__PURE__ */ q(dr, {
1984
2066
  fieldsRef: v,
1985
- children: /* @__PURE__ */ q(pr, {
2067
+ children: /* @__PURE__ */ q(gr, {
1986
2068
  registryRef: y,
1987
2069
  children: /* @__PURE__ */ J("div", {
1988
2070
  style: { position: "relative" },
@@ -1995,26 +2077,26 @@ function zr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0
1995
2077
  justifyContent: "center",
1996
2078
  zIndex: 1
1997
2079
  },
1998
- children: /* @__PURE__ */ q(B, {})
1999
- }) : null, /* @__PURE__ */ n(Oe, {
2080
+ children: /* @__PURE__ */ q(oe, {})
2081
+ }) : null, /* @__PURE__ */ n(ke, {
2000
2082
  ...C,
2001
2083
  key: E
2002
- }, /* @__PURE__ */ J(j, {
2084
+ }, /* @__PURE__ */ J(M, {
2003
2085
  layout: "vertical",
2004
- onFinish: ee,
2086
+ onFinish: A,
2005
2087
  style: p === "overlay" ? {
2006
2088
  opacity: k ? .4 : 1,
2007
2089
  pointerEvents: k ? "none" : void 0
2008
2090
  } : void 0,
2009
2091
  children: [
2010
- /* @__PURE__ */ q(gr, { errors: b }),
2092
+ /* @__PURE__ */ q(yr, { errors: b }),
2011
2093
  r,
2012
- /* @__PURE__ */ q(j.Item, {
2094
+ /* @__PURE__ */ q(M.Item, {
2013
2095
  style: {
2014
2096
  marginTop: 16,
2015
2097
  marginBottom: 0
2016
2098
  },
2017
- children: /* @__PURE__ */ J(z, { children: [/* @__PURE__ */ q(w, {
2099
+ children: /* @__PURE__ */ J(B, { children: [/* @__PURE__ */ q(w, {
2018
2100
  type: "primary",
2019
2101
  htmlType: "submit",
2020
2102
  loading: O,
@@ -2022,8 +2104,8 @@ function zr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0
2022
2104
  children: "Save"
2023
2105
  }), c ? /* @__PURE__ */ q(f, {
2024
2106
  to: c,
2025
- children: A
2026
- }) : A] })
2107
+ children: j
2108
+ }) : j] })
2027
2109
  })
2028
2110
  ]
2029
2111
  }))]
@@ -2031,13 +2113,13 @@ function zr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0
2031
2113
  })
2032
2114
  })
2033
2115
  });
2034
- return T && !O && p === "replace" ? /* @__PURE__ */ q(B, {}) : te;
2116
+ return T && !O && p === "replace" ? /* @__PURE__ */ q(oe, {}) : ee;
2035
2117
  }
2036
2118
  //#endregion
2037
2119
  //#region src/crud/ResourceFormModal.tsx
2038
- function Br({ resource: e, editId: t, onClose: n, children: r, title: i, permissions: a, defaultValues: o, width: s = 560, onSuccess: c }) {
2120
+ function Ur({ resource: e, editId: t, onClose: n, children: r, title: i, permissions: a, defaultValues: o, width: s = 560, onSuccess: c }) {
2039
2121
  let l = t === "new", u = t != null, d = X(), f = i ?? (l ? `New ${e}` : `Edit ${e}`), p = a ? Z(d, a, l ? "add" : "change") : !0;
2040
- return /* @__PURE__ */ q(I, {
2122
+ return /* @__PURE__ */ q(ne, {
2041
2123
  open: u,
2042
2124
  title: f,
2043
2125
  onCancel: n,
@@ -2045,7 +2127,7 @@ function Br({ resource: e, editId: t, onClose: n, children: r, title: i, permiss
2045
2127
  destroyOnHidden: !0,
2046
2128
  width: s,
2047
2129
  maskClosable: !1,
2048
- children: /* @__PURE__ */ q(S, { children: /* @__PURE__ */ q(zr, {
2130
+ children: /* @__PURE__ */ q(S, { children: /* @__PURE__ */ q(Hr, {
2049
2131
  resource: e,
2050
2132
  id: t ?? void 0,
2051
2133
  enabled: u,
@@ -2062,7 +2144,7 @@ function Br({ resource: e, editId: t, onClose: n, children: r, title: i, permiss
2062
2144
  }
2063
2145
  //#endregion
2064
2146
  //#region src/crud/ListActionsBar.tsx
2065
- function Vr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelected: r, onSelectAllMatching: i, onClearSelection: o, actions: s, onExecute: c, selectedIds: u, running: f = !1 }) {
2147
+ function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelected: r, onSelectAllMatching: i, onClearSelection: o, actions: s, onExecute: c, selectedIds: u, running: f = !1 }) {
2066
2148
  let [p, m] = d(), h = l(() => s.map((e) => ({
2067
2149
  value: e.key,
2068
2150
  label: e.label
@@ -2076,7 +2158,7 @@ function Vr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2076
2158
  e,
2077
2159
  u
2078
2160
  ]), _ = n && !r && t > e;
2079
- return /* @__PURE__ */ J(z, {
2161
+ return /* @__PURE__ */ J(B, {
2080
2162
  wrap: !0,
2081
2163
  style: {
2082
2164
  marginBottom: 16,
@@ -2125,7 +2207,7 @@ function Vr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2125
2207
  " items selected"
2126
2208
  ]
2127
2209
  })] }) : null,
2128
- /* @__PURE__ */ q(R, {
2210
+ /* @__PURE__ */ q(z, {
2129
2211
  placeholder: "Action",
2130
2212
  style: { minWidth: 200 },
2131
2213
  options: h,
@@ -2146,14 +2228,14 @@ function Vr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2146
2228
  }
2147
2229
  //#endregion
2148
2230
  //#region src/crud/types.ts
2149
- var Hr = new Set([
2231
+ var Gr = new Set([
2150
2232
  "page",
2151
2233
  "perPage",
2152
2234
  "sort",
2153
2235
  "create",
2154
2236
  "edit"
2155
- ]), Ur = 1, Wr = 10;
2156
- function Gr(e) {
2237
+ ]), Kr = 1, qr = 10;
2238
+ function Jr(e) {
2157
2239
  if (e.includes(",")) {
2158
2240
  let t = e.split(",").map((e) => e.trim()), n = t.map(Number);
2159
2241
  return n.every((e) => Number.isFinite(e)) ? n : t;
@@ -2161,16 +2243,16 @@ function Gr(e) {
2161
2243
  let t = Number(e);
2162
2244
  return e !== "" && Number.isFinite(t) && String(t) === e ? t : e === "true" ? !0 : e === "false" ? !1 : e;
2163
2245
  }
2164
- function Kr(e) {
2246
+ function Yr(e) {
2165
2247
  return e == null || e === "" ? null : Array.isArray(e) ? e.length === 0 ? null : e.map(String).join(",") : String(e);
2166
2248
  }
2167
- function qr(e) {
2249
+ function Xr(e) {
2168
2250
  let [t, n] = b(), r = l(() => {
2169
- let n = t.get("page"), r = t.get("perPage"), i = n ? Math.max(1, Number(n) || Ur) : Ur, a = r ? Math.max(1, Number(r) || Wr) : Wr, o = t.getAll("sort"), s = o.length > 0 ? o.flatMap((e) => zn(e)) : zn(t.get("sort")), c = { ...e };
2251
+ let n = t.get("page"), r = t.get("perPage"), i = n ? Math.max(1, Number(n) || Kr) : Kr, a = r ? Math.max(1, Number(r) || qr) : qr, o = t.getAll("sort"), s = o.length > 0 ? o.flatMap((e) => Hn(e)) : Hn(t.get("sort")), c = { ...e };
2170
2252
  return t.forEach((e, n) => {
2171
- if (Hr.has(n)) return;
2253
+ if (Gr.has(n)) return;
2172
2254
  let r = c[n];
2173
- r === void 0 ? t.getAll(n).length > 1 ? c[n] = t.getAll(n).map(Gr) : c[n] = Gr(e) : c[n] = [...Array.isArray(r) ? r : [r], Gr(e)];
2255
+ r === void 0 ? t.getAll(n).length > 1 ? c[n] = t.getAll(n).map(Jr) : c[n] = Jr(e) : c[n] = [...Array.isArray(r) ? r : [r], Jr(e)];
2174
2256
  }), {
2175
2257
  page: i,
2176
2258
  perPage: a,
@@ -2193,19 +2275,19 @@ function qr(e) {
2193
2275
  },
2194
2276
  setPerPage: (e) => {
2195
2277
  i((t) => {
2196
- e === Wr ? t.delete("perPage") : t.set("perPage", String(e)), t.delete("page");
2278
+ e === qr ? t.delete("perPage") : t.set("perPage", String(e)), t.delete("page");
2197
2279
  });
2198
2280
  },
2199
2281
  setSort: (e) => {
2200
2282
  i((t) => {
2201
2283
  t.delete("sort");
2202
- let n = Bn(e);
2284
+ let n = Un(e);
2203
2285
  n && t.set("sort", n);
2204
2286
  });
2205
2287
  },
2206
2288
  toggleSort: (e) => {
2207
2289
  i((t) => {
2208
- let n = t.getAll("sort").flatMap((e) => zn(e)), r = n.findIndex((t) => t.field === e), i;
2290
+ let n = t.getAll("sort").flatMap((e) => Hn(e)), r = n.findIndex((t) => t.field === e), i;
2209
2291
  i = r < 0 ? [...n, {
2210
2292
  field: e,
2211
2293
  order: "ASC"
@@ -2213,22 +2295,22 @@ function qr(e) {
2213
2295
  ...e,
2214
2296
  order: "DESC"
2215
2297
  } : e) : n.filter((e, t) => t !== r), t.delete("sort");
2216
- let a = Bn(i);
2298
+ let a = Un(i);
2217
2299
  a && t.set("sort", a);
2218
2300
  });
2219
2301
  },
2220
2302
  setFilter: (e, t) => {
2221
2303
  i((n) => {
2222
2304
  n.delete(e);
2223
- let r = Kr(t);
2305
+ let r = Yr(t);
2224
2306
  r != null && n.set(e, r), n.delete("page");
2225
2307
  });
2226
2308
  },
2227
2309
  setFilters: (e) => {
2228
2310
  i((t) => {
2229
- for (let e of [...t.keys()]) Hr.has(e) || t.delete(e);
2311
+ for (let e of [...t.keys()]) Gr.has(e) || t.delete(e);
2230
2312
  for (let [n, r] of Object.entries(e)) {
2231
- let e = Kr(r);
2313
+ let e = Yr(r);
2232
2314
  e != null && t.set(n, e);
2233
2315
  }
2234
2316
  t.delete("page");
@@ -2253,20 +2335,20 @@ function qr(e) {
2253
2335
  }
2254
2336
  //#endregion
2255
2337
  //#region src/crud/ResourceList.tsx
2256
- var Jr = t(null);
2257
- function Yr() {
2258
- return o(Jr);
2338
+ var Zr = t(null);
2339
+ function Qr() {
2340
+ return o(Zr);
2259
2341
  }
2260
- function Xr(e) {
2342
+ function $r(e) {
2261
2343
  return e == null || e === "" ? "—" : String(e);
2262
2344
  }
2263
- function Zr(e, t) {
2345
+ function ei(e, t) {
2264
2346
  if (e.length === 0 || !t.showEdit && !t.showQuickEdit) return e;
2265
2347
  let [n, ...r] = e, i = n.render;
2266
2348
  return [{
2267
2349
  ...n,
2268
2350
  render: (e, n, r) => {
2269
- let a = i ? i(e, n, r) : Xr(e);
2351
+ let a = i ? i(e, n, r) : $r(e);
2270
2352
  return t.showEdit ? /* @__PURE__ */ q(f, {
2271
2353
  to: `${t.pathPrefix}/${String(n.id)}`,
2272
2354
  className: "ding-admin-row-edit-link",
@@ -2286,9 +2368,9 @@ function Zr(e, t) {
2286
2368
  }
2287
2369
  }, ...r];
2288
2370
  }
2289
- function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "page", formChildren: o, actions: s, rowActions: p, headerExtra: m, bulkActions: h, bulkDelete: g = !0, bulkActionsEnabled: _ = !0, permissions: v, queryState: y, queryActions: b }) {
2290
- let x = Kt(), C = X(), { message: E, modal: D } = S.useApp(), { token: O } = G.useToken(), { columns: k, sortOrders: ee, sortPriorities: A } = Wn(), j = u(null), [te, M] = d(), [N, P] = d(!1), [F, ne] = d([]), [I, ie] = d(0), [ae, L] = d(() => /* @__PURE__ */ new Set()), [R, B] = d(!1), oe = r ?? `${n}/new`, V = Z(C, v, "add"), ce = Z(C, v, "change"), H = Z(C, v, "delete"), U = ce && (i === "page" || i === "both") && s?.edit !== !1, le = ce && (i === "modal" || i === "both") && s?.quickEdit !== !1, ue = H && s?.delete !== !1, pe = U || le || ue || p, me = a(() => {
2291
- L(/* @__PURE__ */ new Set());
2371
+ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "page", formChildren: o, actions: s, rowActions: p, headerExtra: m, bulkActions: h, bulkDelete: g = !0, bulkActionsEnabled: _ = !0, permissions: v, queryState: y, queryActions: b }) {
2372
+ let x = Yt(), C = X(), { message: E, modal: D } = S.useApp(), { token: O } = G.useToken(), { columns: k, sortOrders: A, sortPriorities: j } = qn(), M = u(null), [ee, N] = d(), [P, F] = d(!1), [I, te] = d([]), [L, ne] = d(0), [ie, R] = d(() => /* @__PURE__ */ new Set()), [ae, z] = d(!1), oe = r ?? `${n}/new`, V = Z(C, v, "add"), se = Z(C, v, "change"), H = Z(C, v, "delete"), le = se && (i === "page" || i === "both") && s?.edit !== !1, U = se && (i === "modal" || i === "both") && s?.quickEdit !== !1, ue = H && s?.delete !== !1, de = le || U || ue || p, me = a(() => {
2373
+ R(/* @__PURE__ */ new Set());
2292
2374
  }, []), he = l(() => {
2293
2375
  if (!_) return [];
2294
2376
  let t = [];
@@ -2308,16 +2390,16 @@ function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2308
2390
  x,
2309
2391
  e,
2310
2392
  E
2311
- ]), ge = he.length > 0, _e = ae.size;
2393
+ ]), ge = he.length > 0, _e = ie.size;
2312
2394
  c(() => {
2313
- let e = j.current;
2395
+ let e = M.current;
2314
2396
  if (!e) return;
2315
2397
  let t = e.closest(".ding-admin-scroll");
2316
2398
  t?.classList.add("ding-admin-resource-list-scroll");
2317
2399
  let n = () => {
2318
2400
  if (e.clientHeight <= 0) return;
2319
2401
  let t = e.querySelector(".ding-admin-resource-list-pagination"), n = e.querySelector(".ant-table-header"), r = t?.offsetHeight ?? 0, i = t ? parseFloat(getComputedStyle(t).marginTop) + parseFloat(getComputedStyle(t).marginBottom) : 0, a = n?.offsetHeight ?? 0, o = e.querySelector(".ant-table-body"), s = o && o.scrollWidth > o.clientWidth ? o.offsetHeight - o.clientHeight : 0, c = Math.max(120, Math.floor(e.clientHeight - a - r - i - s - 8));
2320
- M((e) => e === c ? e : c);
2402
+ N((e) => e === c ? e : c);
2321
2403
  };
2322
2404
  n();
2323
2405
  let r = new ResizeObserver(() => n());
@@ -2327,39 +2409,39 @@ function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2327
2409
  }, [
2328
2410
  ge,
2329
2411
  _e,
2330
- I,
2331
- N
2412
+ L,
2413
+ P
2332
2414
  ]);
2333
- let ve = F.length > 0 && F.every((e) => ae.has(e.id)), ye = I > 0 && _e >= I, be = l(() => F.filter((e) => ae.has(e.id)).map((e) => e.id), [F, ae]), xe = a((e) => {
2334
- L((t) => {
2335
- let n = new Set(t), r = F.map((e) => e.id);
2415
+ let ve = I.length > 0 && I.every((e) => ie.has(e.id)), ye = L > 0 && _e >= L, be = l(() => I.filter((e) => ie.has(e.id)).map((e) => e.id), [I, ie]), xe = a((e) => {
2416
+ R((t) => {
2417
+ let n = new Set(t), r = I.map((e) => e.id);
2336
2418
  for (let t of r) e.includes(t) || n.delete(t);
2337
2419
  for (let t of e) n.add(t);
2338
2420
  return n;
2339
2421
  });
2340
- }, [F]), Se = a(async () => {
2341
- if (!(I <= 0)) {
2342
- B(!0);
2422
+ }, [I]), Se = a(async () => {
2423
+ if (!(L <= 0)) {
2424
+ z(!0);
2343
2425
  try {
2344
2426
  let t = y.sort.length === 0 ? void 0 : y.sort.length === 1 ? y.sort[0] : y.sort, n = await x.getList(e, {
2345
2427
  pagination: {
2346
2428
  page: 1,
2347
- perPage: I
2429
+ perPage: L
2348
2430
  },
2349
2431
  sort: t,
2350
2432
  filter: y.filter
2351
2433
  });
2352
- L(new Set(n.data.map((e) => e.id)));
2434
+ R(new Set(n.data.map((e) => e.id)));
2353
2435
  } catch (e) {
2354
2436
  E.error(e instanceof Error ? e.message : "Load failed");
2355
2437
  } finally {
2356
- B(!1);
2438
+ z(!1);
2357
2439
  }
2358
2440
  }
2359
2441
  }, [
2360
2442
  x,
2361
2443
  e,
2362
- I,
2444
+ L,
2363
2445
  y.sort,
2364
2446
  y.filter,
2365
2447
  E
@@ -2395,18 +2477,18 @@ function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2395
2477
  filter: y.filter
2396
2478
  };
2397
2479
  }, [y]), Y = a(async (t) => {
2398
- P(!0);
2480
+ F(!0);
2399
2481
  try {
2400
2482
  let n = await x.getList(e, {
2401
2483
  ...we,
2402
2484
  signal: t
2403
2485
  });
2404
2486
  if (t?.aborted) return;
2405
- ne(n.data), ie(n.total);
2487
+ te(n.data), ne(n.total);
2406
2488
  } catch (e) {
2407
- Xt(e) || E.error(e instanceof Error ? e.message : "Load failed");
2489
+ $t(e) || E.error(e instanceof Error ? e.message : "Load failed");
2408
2490
  } finally {
2409
- t?.aborted || P(!1);
2491
+ t?.aborted || F(!1);
2410
2492
  }
2411
2493
  }, [
2412
2494
  x,
@@ -2414,7 +2496,7 @@ function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2414
2496
  we,
2415
2497
  E
2416
2498
  ]);
2417
- Ir((e) => Y(e), [Y]);
2499
+ zr((e) => Y(e), [Y]);
2418
2500
  let Te = l(() => ({
2419
2501
  reload: () => void Y(),
2420
2502
  clearSelection: me
@@ -2430,13 +2512,13 @@ function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2430
2512
  });
2431
2513
  })) return;
2432
2514
  }
2433
- B(!0);
2515
+ z(!0);
2434
2516
  try {
2435
2517
  await e.execute(t, Te);
2436
2518
  } catch (e) {
2437
2519
  E.error(e instanceof Error ? e.message : "Action failed");
2438
2520
  } finally {
2439
- B(!1);
2521
+ z(!1);
2440
2522
  }
2441
2523
  }, [
2442
2524
  Te,
@@ -2458,7 +2540,7 @@ function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2458
2540
  let e = k.map((e) => {
2459
2541
  let t = e.buildColumn();
2460
2542
  if (e.sortable) {
2461
- let n = ee.get(e.source), r = A.get(e.source), i = n === "ASC" ? "ascend" : n === "DESC" ? "descend" : void 0, a = i == null ? void 0 : /* @__PURE__ */ J("span", {
2543
+ let n = A.get(e.source), r = j.get(e.source), i = n === "ASC" ? "ascend" : n === "DESC" ? "descend" : void 0, a = i == null ? void 0 : /* @__PURE__ */ J("span", {
2462
2544
  style: {
2463
2545
  display: "inline-flex",
2464
2546
  alignItems: "center",
@@ -2475,7 +2557,7 @@ function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2475
2557
  textAlign: "center"
2476
2558
  },
2477
2559
  children: r
2478
- }), q(i === "ascend" ? fe : de, { style: { fontSize: 11 } })]
2560
+ }), q(i === "ascend" ? pe : fe, { style: { fontSize: 11 } })]
2479
2561
  });
2480
2562
  return {
2481
2563
  ...t,
@@ -2486,9 +2568,9 @@ function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2486
2568
  }
2487
2569
  return t;
2488
2570
  });
2489
- if (!pe) return Zr(e, {
2490
- showEdit: U,
2491
- showQuickEdit: le,
2571
+ if (!de) return ei(e, {
2572
+ showEdit: le,
2573
+ showQuickEdit: U,
2492
2574
  pathPrefix: n,
2493
2575
  openEditModal: b.openEditModal
2494
2576
  });
@@ -2499,15 +2581,15 @@ function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2499
2581
  title: "Actions",
2500
2582
  key: "__actions",
2501
2583
  width: i === "both" ? 200 : 160,
2502
- render: (e, r) => /* @__PURE__ */ J(z, {
2584
+ render: (e, r) => /* @__PURE__ */ J(B, {
2503
2585
  size: "small",
2504
2586
  wrap: !0,
2505
2587
  children: [
2506
- U ? /* @__PURE__ */ q(f, {
2588
+ le ? /* @__PURE__ */ q(f, {
2507
2589
  to: `${n}/${String(r.id)}`,
2508
2590
  children: "Edit"
2509
2591
  }) : null,
2510
- le ? /* @__PURE__ */ q(w, {
2592
+ U ? /* @__PURE__ */ q(w, {
2511
2593
  type: "link",
2512
2594
  size: "small",
2513
2595
  style: { padding: 0 },
@@ -2526,23 +2608,23 @@ function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2526
2608
  ]
2527
2609
  })
2528
2610
  };
2529
- return Zr([...e, r], {
2530
- showEdit: U,
2531
- showQuickEdit: le,
2611
+ return ei([...e, r], {
2612
+ showEdit: le,
2613
+ showQuickEdit: U,
2532
2614
  pathPrefix: n,
2533
2615
  openEditModal: b.openEditModal
2534
2616
  });
2535
2617
  }, [
2536
2618
  k,
2537
- pe,
2538
- U,
2619
+ de,
2539
2620
  le,
2621
+ U,
2540
2622
  ue,
2541
2623
  i,
2542
2624
  n,
2543
2625
  De,
2544
- ee,
2545
2626
  A,
2627
+ j,
2546
2628
  b,
2547
2629
  p,
2548
2630
  Y
@@ -2563,7 +2645,7 @@ function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2563
2645
  style: { margin: 0 },
2564
2646
  children: t
2565
2647
  }),
2566
- extra: m || V ? /* @__PURE__ */ J(z, { children: [m, V ? i === "modal" || i === "both" ? /* @__PURE__ */ J(K, { children: [i === "both" ? /* @__PURE__ */ q(f, {
2648
+ extra: m || V ? /* @__PURE__ */ J(B, { children: [m, V ? i === "modal" || i === "both" ? /* @__PURE__ */ J(K, { children: [i === "both" ? /* @__PURE__ */ q(f, {
2567
2649
  to: oe,
2568
2650
  children: /* @__PURE__ */ q(w, { children: "New page" })
2569
2651
  }) : null, /* @__PURE__ */ q(w, {
@@ -2577,32 +2659,32 @@ function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2577
2659
  children: "New"
2578
2660
  })
2579
2661
  }) : null] }) : null,
2580
- children: [ge ? /* @__PURE__ */ q(Vr, {
2662
+ children: [ge ? /* @__PURE__ */ q(Wr, {
2581
2663
  selectedCount: _e,
2582
- total: I,
2664
+ total: L,
2583
2665
  allPageSelected: ve,
2584
2666
  allMatchingSelected: ye,
2585
2667
  onSelectAllMatching: () => void Se(),
2586
2668
  onClearSelection: me,
2587
2669
  actions: he,
2588
2670
  onExecute: Ee,
2589
- selectedIds: [...ae],
2590
- running: R || N
2671
+ selectedIds: [...ie],
2672
+ running: ae || P
2591
2673
  }) : null, /* @__PURE__ */ J("div", {
2592
- ref: j,
2674
+ ref: M,
2593
2675
  className: "ding-admin-resource-list-table",
2594
2676
  style: {
2595
2677
  "--ding-scroll-thumb": O.colorTextQuaternary,
2596
2678
  "--ding-scroll-thumb-hover": O.colorTextTertiary
2597
2679
  },
2598
- children: [/* @__PURE__ */ q(se, {
2680
+ children: [/* @__PURE__ */ q(ce, {
2599
2681
  rowKey: "id",
2600
- loading: N,
2682
+ loading: P,
2601
2683
  columns: Oe,
2602
- dataSource: F,
2684
+ dataSource: I,
2603
2685
  scroll: {
2604
2686
  x: "max-content",
2605
- ...te ? { y: te } : {}
2687
+ ...ee ? { y: ee } : {}
2606
2688
  },
2607
2689
  rowSelection: ge ? {
2608
2690
  selectedRowKeys: be,
@@ -2618,13 +2700,13 @@ function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2618
2700
  children: /* @__PURE__ */ q(re, {
2619
2701
  current: y.page,
2620
2702
  pageSize: y.perPage,
2621
- total: I,
2703
+ total: L,
2622
2704
  showSizeChanger: !0,
2623
2705
  onChange: ke
2624
2706
  })
2625
2707
  })]
2626
2708
  })]
2627
- }), Ae ? /* @__PURE__ */ q(Br, {
2709
+ }), Ae ? /* @__PURE__ */ q(Ur, {
2628
2710
  resource: e,
2629
2711
  editId: y.createModal ? "new" : y.editId,
2630
2712
  onClose: () => {
@@ -2633,8 +2715,8 @@ function Qr({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2633
2715
  children: o
2634
2716
  }) : null] });
2635
2717
  }
2636
- function $r({ resource: e, title: t, pathPrefix: n, newPath: r, staticFilter: i, textFilterDebounceMs: o, editMode: s = "page", syncQueryParams: c = !0, children: u, formChildren: d, actions: f, rowActions: p, headerExtra: m, bulkActions: h, bulkDelete: g, bulkActionsEnabled: _, permissions: v }) {
2637
- let [y, b] = qr(i), x = l(() => {
2718
+ function ni({ resource: e, title: t, pathPrefix: n, newPath: r, staticFilter: i, textFilterDebounceMs: o, editMode: s = "page", syncQueryParams: c = !0, children: u, formChildren: d, actions: f, rowActions: p, headerExtra: m, bulkActions: h, bulkDelete: g, bulkActionsEnabled: _, permissions: v }) {
2719
+ let [y, b] = Xr(i), x = l(() => {
2638
2720
  if (!c) return i ?? {};
2639
2721
  let e = {};
2640
2722
  for (let [t, n] of Object.entries(y.filter)) i && t in i || (e[t] = n);
@@ -2649,18 +2731,18 @@ function $r({ resource: e, title: t, pathPrefix: n, newPath: r, staticFilter: i,
2649
2731
  filterValues: x,
2650
2732
  setFilterValue: S
2651
2733
  }), [x, S]);
2652
- return /* @__PURE__ */ q(Jr.Provider, {
2734
+ return /* @__PURE__ */ q(Zr.Provider, {
2653
2735
  value: C,
2654
- children: /* @__PURE__ */ q(Qn, {
2736
+ children: /* @__PURE__ */ q(tr, {
2655
2737
  values: x,
2656
2738
  setFilterValue: S,
2657
2739
  textFilterDebounceMs: o,
2658
- children: /* @__PURE__ */ q(Un, {
2740
+ children: /* @__PURE__ */ q(Kn, {
2659
2741
  toggleSort: b.toggleSort,
2660
2742
  sort: y.sort,
2661
2743
  children: /* @__PURE__ */ J("div", {
2662
2744
  className: "ding-admin-resource-list-root",
2663
- children: [u, /* @__PURE__ */ q(Qr, {
2745
+ children: [u, /* @__PURE__ */ q(ti, {
2664
2746
  resource: e,
2665
2747
  title: t,
2666
2748
  pathPrefix: n,
@@ -2684,13 +2766,13 @@ function $r({ resource: e, title: t, pathPrefix: n, newPath: r, staticFilter: i,
2684
2766
  }
2685
2767
  //#endregion
2686
2768
  //#region src/crud/FilterBar.tsx
2687
- function ei() {
2688
- let e = $n();
2689
- return !e || e.filters.length === 0 ? null : /* @__PURE__ */ q(z, {
2769
+ function ri() {
2770
+ let e = nr();
2771
+ return !e || e.filters.length === 0 ? null : /* @__PURE__ */ q(B, {
2690
2772
  wrap: !0,
2691
2773
  size: "middle",
2692
2774
  style: { marginBottom: 16 },
2693
- children: e.filters.map((t) => /* @__PURE__ */ J(z, {
2775
+ children: e.filters.map((t) => /* @__PURE__ */ J(B, {
2694
2776
  orientation: "vertical",
2695
2777
  size: 2,
2696
2778
  children: [t.label ? /* @__PURE__ */ q(W.Text, {
@@ -2704,12 +2786,12 @@ function ei() {
2704
2786
  }, t.key))
2705
2787
  });
2706
2788
  }
2707
- function ti({ children: e }) {
2708
- return /* @__PURE__ */ J(K, { children: [e, /* @__PURE__ */ q(ei, {})] });
2789
+ function ii({ children: e }) {
2790
+ return /* @__PURE__ */ J(K, { children: [e, /* @__PURE__ */ q(ri, {})] });
2709
2791
  }
2710
2792
  //#endregion
2711
2793
  //#region src/crud/ResourceForm.tsx
2712
- function ni({ resource: e, title: t, listPath: n, children: r, defaultValues: i, onSaved: a, stayOnPage: o, permissions: c }) {
2794
+ function ai({ resource: e, title: t, listPath: n, children: r, defaultValues: i, onSaved: a, stayOnPage: o, permissions: c }) {
2713
2795
  let { id: l } = y(), u = l === "new" || !l, d = X(), p = v(), { token: m } = G.useToken();
2714
2796
  s(() => {
2715
2797
  c && (Z(d, c, u ? "add" : "change") || p(n, { replace: !0 }));
@@ -2722,16 +2804,16 @@ function ni({ resource: e, title: t, listPath: n, children: r, defaultValues: i,
2722
2804
  ]);
2723
2805
  let h = c ? Z(d, c, u ? "add" : "change") : !0;
2724
2806
  return /* @__PURE__ */ q(T, {
2725
- title: /* @__PURE__ */ J(z, { children: [/* @__PURE__ */ J(f, {
2807
+ title: /* @__PURE__ */ J(B, { children: [/* @__PURE__ */ J(f, {
2726
2808
  to: n,
2727
2809
  style: { color: m.colorText },
2728
- children: [/* @__PURE__ */ q(ue, {}), " Back"]
2810
+ children: [/* @__PURE__ */ q(de, {}), " Back"]
2729
2811
  }), /* @__PURE__ */ q(W.Title, {
2730
2812
  level: 5,
2731
2813
  style: { margin: 0 },
2732
2814
  children: t
2733
2815
  })] }),
2734
- children: /* @__PURE__ */ q(zr, {
2816
+ children: /* @__PURE__ */ q(Hr, {
2735
2817
  resource: e,
2736
2818
  id: l,
2737
2819
  defaultValues: i,
@@ -2747,18 +2829,18 @@ function ni({ resource: e, title: t, listPath: n, children: r, defaultValues: i,
2747
2829
  }
2748
2830
  //#endregion
2749
2831
  //#region src/crud/utils/nestedFieldPath.ts
2750
- function ri(e, t, n) {
2832
+ function oi(e, t, n) {
2751
2833
  return `${e}.${t}.${n}`;
2752
2834
  }
2753
2835
  //#endregion
2754
2836
  //#region src/crud/InlineFormSet.tsx
2755
- function ii(e, t) {
2837
+ function si(e, t) {
2756
2838
  let n = {};
2757
2839
  for (let r of e) n[r] = t?.[r] ?? void 0;
2758
2840
  return n;
2759
2841
  }
2760
- function ai(e, t, n) {
2761
- let { control: r } = je(), { fields: i, append: a, remove: o } = ke({
2842
+ function ci(e, t, n) {
2843
+ let { control: r } = Me(), { fields: i, append: a, remove: o } = Ae({
2762
2844
  control: r,
2763
2845
  name: e,
2764
2846
  keyName: "rowKey"
@@ -2766,12 +2848,12 @@ function ai(e, t, n) {
2766
2848
  return {
2767
2849
  fields: i,
2768
2850
  remove: o,
2769
- appendEmpty: () => a(ii(t, n))
2851
+ appendEmpty: () => a(si(t, n))
2770
2852
  };
2771
2853
  }
2772
- function oi({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, defaultRow: a }) {
2773
- let o = l(() => i.map((e) => e.source), [i]), { fields: s, remove: c, appendEmpty: u } = ai(e, o, a);
2774
- ur(e), hr(e, o, n, r);
2854
+ function li({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, defaultRow: a }) {
2855
+ let o = l(() => i.map((e) => e.source), [i]), { fields: s, remove: c, appendEmpty: u } = ci(e, o, a);
2856
+ pr(e), vr(e, o, n, r);
2775
2857
  let d = l(() => i.map((t) => ({
2776
2858
  title: t.label ?? t.source,
2777
2859
  key: t.source,
@@ -2779,7 +2861,7 @@ function oi({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, d
2779
2861
  onHeaderCell: () => t.minWidth == null ? {} : { style: { minWidth: t.minWidth } },
2780
2862
  onCell: () => t.minWidth == null ? {} : { style: { minWidth: t.minWidth } },
2781
2863
  render: (n, r, i) => t.cell({
2782
- name: ri(e, i, t.source),
2864
+ name: oi(e, i, t.source),
2783
2865
  index: i,
2784
2866
  field: e
2785
2867
  })
@@ -2791,7 +2873,7 @@ function oi({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, d
2791
2873
  level: 5,
2792
2874
  children: t ?? "Related items"
2793
2875
  }),
2794
- /* @__PURE__ */ q(se, {
2876
+ /* @__PURE__ */ q(ce, {
2795
2877
  size: "small",
2796
2878
  pagination: !1,
2797
2879
  scroll: { x: "max-content" },
@@ -2821,16 +2903,16 @@ function oi({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, d
2821
2903
  ]
2822
2904
  });
2823
2905
  }
2824
- function si({ field: e, label: t, payloadKey: n, transformRows: r, sources: i, renderRow: a, getCardTitle: o, footer: s, defaultRow: c }) {
2825
- let { fields: l, remove: u, appendEmpty: d } = ai(e, i, c);
2826
- return ur(e), hr(e, i, n, r), /* @__PURE__ */ J("div", {
2906
+ function ui({ field: e, label: t, payloadKey: n, transformRows: r, sources: i, renderRow: a, getCardTitle: o, footer: s, defaultRow: c }) {
2907
+ let { fields: l, remove: u, appendEmpty: d } = ci(e, i, c);
2908
+ return pr(e), vr(e, i, n, r), /* @__PURE__ */ J("div", {
2827
2909
  style: { marginTop: 24 },
2828
2910
  children: [
2829
2911
  /* @__PURE__ */ q(W.Title, {
2830
2912
  level: 5,
2831
2913
  children: t ?? "Related items"
2832
2914
  }),
2833
- /* @__PURE__ */ q(z, {
2915
+ /* @__PURE__ */ q(B, {
2834
2916
  orientation: "vertical",
2835
2917
  size: "middle",
2836
2918
  style: { width: "100%" },
@@ -2838,7 +2920,7 @@ function si({ field: e, label: t, payloadKey: n, transformRows: r, sources: i, r
2838
2920
  let r = {
2839
2921
  field: e,
2840
2922
  index: n,
2841
- name: (t) => ri(e, n, t)
2923
+ name: (t) => oi(e, n, t)
2842
2924
  };
2843
2925
  return /* @__PURE__ */ q(T, {
2844
2926
  size: "small",
@@ -2866,22 +2948,22 @@ function si({ field: e, label: t, payloadKey: n, transformRows: r, sources: i, r
2866
2948
  }
2867
2949
  //#endregion
2868
2950
  //#region src/crud/utils/formSectionErrors.ts
2869
- function ci(e, t, n) {
2951
+ function di(e, t, n) {
2870
2952
  for (let r of e) if (t(r, n).invalid) return !0;
2871
2953
  return !1;
2872
2954
  }
2873
- function li(e) {
2955
+ function fi(e) {
2874
2956
  let t = u([]);
2875
2957
  for (; t.current.length < e;) t.current.push({ current: /* @__PURE__ */ new Set() });
2876
2958
  return t.current.length > e && (t.current.length = e), t.current;
2877
2959
  }
2878
- function ui(e, t) {
2879
- let { control: n, getFieldState: r, setFocus: i } = je(), a = Me({ control: n }), o = u(0), c = u(0);
2960
+ function pi(e, t) {
2961
+ let { control: n, getFieldState: r, setFocus: i } = Me(), a = Ne({ control: n }), o = u(0), c = u(0);
2880
2962
  s(() => {
2881
2963
  if (a.submitCount === 0) return;
2882
2964
  let n = Object.keys(a.errors).length, s = a.submitCount !== o.current, l = !s && n > 0 && c.current === 0;
2883
2965
  if (o.current = a.submitCount, c.current = n, !s && !l || n === 0) return;
2884
- let u = e.findIndex((e) => ci(e.current, r, a));
2966
+ let u = e.findIndex((e) => di(e.current, r, a));
2885
2967
  if (u < 0) return;
2886
2968
  t(u);
2887
2969
  let d = [...e[u].current].find((e) => r(e, a).invalid);
@@ -2900,30 +2982,30 @@ function ui(e, t) {
2900
2982
  }
2901
2983
  //#endregion
2902
2984
  //#region src/crud/FormTabs.tsx
2903
- function di(e) {
2985
+ function mi(e) {
2904
2986
  return null;
2905
2987
  }
2906
- function fi(e) {
2907
- return i(e) && e.type === di;
2988
+ function hi(e) {
2989
+ return i(e) && e.type === mi;
2908
2990
  }
2909
- function pi({ children: t, defaultActiveKey: n, activeKey: r, onChange: i, ...o }) {
2910
- let { token: s } = G.useToken(), c = l(() => e.toArray(t).filter(fi).map((e, t) => ({
2991
+ function gi({ children: t, defaultActiveKey: n, activeKey: r, onChange: i, ...o }) {
2992
+ let { token: s } = G.useToken(), c = l(() => e.toArray(t).filter(hi).map((e, t) => ({
2911
2993
  key: e.key ?? String(t),
2912
2994
  label: e.props.label,
2913
2995
  disabled: e.props.disabled,
2914
2996
  children: e.props.children
2915
- })), [t]), u = li(c.length), f = r !== void 0, [p, m] = d(() => n ?? c[0]?.key ?? "0"), h = f ? r : p, g = a((e) => {
2997
+ })), [t]), u = fi(c.length), f = r !== void 0, [p, m] = d(() => n ?? c[0]?.key ?? "0"), h = f ? r : p, g = a((e) => {
2916
2998
  f || m(e), i?.(e);
2917
2999
  }, [f, i]);
2918
- ui(u, a((e) => {
3000
+ pi(u, a((e) => {
2919
3001
  let t = c[e]?.key;
2920
3002
  t != null && g(t);
2921
3003
  }, [g, c]));
2922
- let { control: _, getFieldState: v } = je(), y = Me({ control: _ });
2923
- return /* @__PURE__ */ q(ce, {
3004
+ let { control: _, getFieldState: v } = Me(), y = Ne({ control: _ });
3005
+ return /* @__PURE__ */ q(H, {
2924
3006
  destroyOnHidden: !1,
2925
3007
  items: l(() => c.map((e, t) => {
2926
- let n = ci(u[t].current, v, y);
3008
+ let n = di(u[t].current, v, y);
2927
3009
  return {
2928
3010
  key: e.key,
2929
3011
  label: n ? /* @__PURE__ */ q("span", {
@@ -2931,7 +3013,7 @@ function pi({ children: t, defaultActiveKey: n, activeKey: r, onChange: i, ...o
2931
3013
  children: e.label
2932
3014
  }) : e.label,
2933
3015
  disabled: e.disabled,
2934
- children: /* @__PURE__ */ q(ar, {
3016
+ children: /* @__PURE__ */ q(cr, {
2935
3017
  sourcesRef: u[t],
2936
3018
  children: e.children
2937
3019
  })
@@ -2950,17 +3032,17 @@ function pi({ children: t, defaultActiveKey: n, activeKey: r, onChange: i, ...o
2950
3032
  }
2951
3033
  //#endregion
2952
3034
  //#region src/crud/FormSteps.tsx
2953
- function mi(e) {
3035
+ function _i(e) {
2954
3036
  return null;
2955
3037
  }
2956
- function hi(e) {
2957
- return i(e) && e.type === mi;
3038
+ function vi(e) {
3039
+ return i(e) && e.type === _i;
2958
3040
  }
2959
- function gi({ children: t, initialStep: n = 0, showNavigation: r = !0, allowStepSelect: i = !1, stepsStyle: o, navigationStyle: s, size: c, direction: u, type: f, status: p }) {
2960
- let m = l(() => e.toArray(t).filter(hi), [t]), h = li(m.length), [g, _] = d(n), v = m.length - 1;
2961
- ui(h, _);
2962
- let { control: y, getFieldState: b } = je(), x = Me({ control: y }), S = l(() => m.map((e, t) => {
2963
- let n = ci(h[t].current, b, x);
3041
+ function yi({ children: t, initialStep: n = 0, showNavigation: r = !0, allowStepSelect: i = !1, stepsStyle: o, navigationStyle: s, size: c, direction: u, type: f, status: p }) {
3042
+ let m = l(() => e.toArray(t).filter(vi), [t]), h = fi(m.length), [g, _] = d(n), v = m.length - 1;
3043
+ pi(h, _);
3044
+ let { control: y, getFieldState: b } = Me(), x = Ne({ control: y }), S = l(() => m.map((e, t) => {
3045
+ let n = di(h[t].current, b, x);
2964
3046
  return {
2965
3047
  title: e.props.title,
2966
3048
  description: e.props.description,
@@ -2975,7 +3057,7 @@ function gi({ children: t, initialStep: n = 0, showNavigation: r = !0, allowStep
2975
3057
  _(e);
2976
3058
  }, []);
2977
3059
  return /* @__PURE__ */ J(K, { children: [
2978
- /* @__PURE__ */ q(oe, {
3060
+ /* @__PURE__ */ q(V, {
2979
3061
  current: g,
2980
3062
  items: S,
2981
3063
  style: {
@@ -2990,12 +3072,12 @@ function gi({ children: t, initialStep: n = 0, showNavigation: r = !0, allowStep
2990
3072
  }),
2991
3073
  m.map((e, t) => /* @__PURE__ */ q("div", {
2992
3074
  style: { display: g === t ? void 0 : "none" },
2993
- children: /* @__PURE__ */ q(ar, {
3075
+ children: /* @__PURE__ */ q(cr, {
2994
3076
  sourcesRef: h[t],
2995
3077
  children: e.props.children
2996
3078
  })
2997
3079
  }, e.key ?? String(t))),
2998
- r && m.length > 1 ? /* @__PURE__ */ J(z, {
3080
+ r && m.length > 1 ? /* @__PURE__ */ J(B, {
2999
3081
  style: {
3000
3082
  marginTop: 16,
3001
3083
  ...s
@@ -3016,15 +3098,15 @@ function gi({ children: t, initialStep: n = 0, showNavigation: r = !0, allowStep
3016
3098
  //#endregion
3017
3099
  //#region src/crud/fields/FieldWrapper.tsx
3018
3100
  function $({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, children: o }) {
3019
- let s = t ?? e, c = !s.includes("."), { control: l } = je(), u = rr(), d = a ? void 0 : n ?? e, f = n ?? e;
3020
- return ur(e, c), dr(e, c), /* @__PURE__ */ q(De, {
3101
+ let s = t ?? e, c = !s.includes("."), { control: l } = Me(), u = or(), d = a ? void 0 : n ?? e, f = n ?? e;
3102
+ return pr(e, c), mr(e, c), /* @__PURE__ */ q(Oe, {
3021
3103
  name: s,
3022
3104
  control: l,
3023
3105
  rules: {
3024
3106
  required: r ? `${f} is required` : !1,
3025
3107
  ...i
3026
3108
  },
3027
- render: ({ field: e, fieldState: t }) => /* @__PURE__ */ q(j.Item, {
3109
+ render: ({ field: e, fieldState: t }) => /* @__PURE__ */ q(M.Item, {
3028
3110
  label: d,
3029
3111
  validateStatus: t.error ? "error" : void 0,
3030
3112
  help: t.error?.message,
@@ -3042,7 +3124,7 @@ function $({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
3042
3124
  }
3043
3125
  //#endregion
3044
3126
  //#region src/crud/fields/TextField.tsx
3045
- function _i({ source: e, name: t, label: n, required: r, rules: i, placeholder: a, inputStyle: o, hideLabel: s }) {
3127
+ function bi({ source: e, name: t, label: n, required: r, rules: i, placeholder: a, inputStyle: o, hideLabel: s }) {
3046
3128
  return /* @__PURE__ */ q($, {
3047
3129
  source: e,
3048
3130
  name: t,
@@ -3050,7 +3132,7 @@ function _i({ source: e, name: t, label: n, required: r, rules: i, placeholder:
3050
3132
  required: r,
3051
3133
  rules: i,
3052
3134
  hideLabel: s,
3053
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(N, {
3135
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(P, {
3054
3136
  value: e,
3055
3137
  onChange: (e) => t(e.target.value),
3056
3138
  onBlur: n,
@@ -3062,7 +3144,7 @@ function _i({ source: e, name: t, label: n, required: r, rules: i, placeholder:
3062
3144
  }
3063
3145
  //#endregion
3064
3146
  //#region src/crud/fields/TextAreaField.tsx
3065
- function vi({ source: e, name: t, label: n, required: r, rules: i, placeholder: a, inputStyle: o, hideLabel: s, rows: c = 4, maxLength: l, showCount: u, autoSize: d }) {
3147
+ function xi({ source: e, name: t, label: n, required: r, rules: i, placeholder: a, inputStyle: o, hideLabel: s, rows: c = 4, maxLength: l, showCount: u, autoSize: d }) {
3066
3148
  return /* @__PURE__ */ q($, {
3067
3149
  source: e,
3068
3150
  name: t,
@@ -3070,7 +3152,7 @@ function vi({ source: e, name: t, label: n, required: r, rules: i, placeholder:
3070
3152
  required: r,
3071
3153
  rules: i,
3072
3154
  hideLabel: s,
3073
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(N.TextArea, {
3155
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(P.TextArea, {
3074
3156
  value: e,
3075
3157
  onChange: (e) => t(e.target.value),
3076
3158
  onBlur: n,
@@ -3086,7 +3168,7 @@ function vi({ source: e, name: t, label: n, required: r, rules: i, placeholder:
3086
3168
  }
3087
3169
  //#endregion
3088
3170
  //#region src/crud/fields/NumberField.tsx
3089
- function yi({ source: e, name: t, label: n, required: r, rules: i, min: a, max: o, step: s, inputStyle: c, hideLabel: l }) {
3171
+ function Si({ source: e, name: t, label: n, required: r, rules: i, min: a, max: o, step: s, inputStyle: c, hideLabel: l }) {
3090
3172
  return /* @__PURE__ */ q($, {
3091
3173
  source: e,
3092
3174
  name: t,
@@ -3094,7 +3176,7 @@ function yi({ source: e, name: t, label: n, required: r, rules: i, min: a, max:
3094
3176
  required: r,
3095
3177
  rules: i,
3096
3178
  hideLabel: l,
3097
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(P, {
3179
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(F, {
3098
3180
  value: e,
3099
3181
  onChange: (e) => t(e),
3100
3182
  onBlur: n,
@@ -3111,7 +3193,7 @@ function yi({ source: e, name: t, label: n, required: r, rules: i, min: a, max:
3111
3193
  }
3112
3194
  //#endregion
3113
3195
  //#region src/crud/fields/BooleanField.tsx
3114
- function bi({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, disabled: o }) {
3196
+ function Ci({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, disabled: o }) {
3115
3197
  return /* @__PURE__ */ q($, {
3116
3198
  source: e,
3117
3199
  name: t,
@@ -3119,7 +3201,7 @@ function bi({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
3119
3201
  required: r,
3120
3202
  rules: i,
3121
3203
  hideLabel: a,
3122
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(V, {
3204
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(se, {
3123
3205
  checked: !!e,
3124
3206
  onChange: t,
3125
3207
  disabled: n || o
@@ -3128,7 +3210,7 @@ function bi({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
3128
3210
  }
3129
3211
  //#endregion
3130
3212
  //#region src/crud/utils/parseDayjsValue.ts
3131
- var xi = /* @__PURE__ */ Ue((/* @__PURE__ */ Ve(((e, t) => {
3213
+ var wi = /* @__PURE__ */ We((/* @__PURE__ */ He(((e, t) => {
3132
3214
  (function(n, r) {
3133
3215
  typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_customParseFormat = r();
3134
3216
  })(e, (function() {
@@ -3285,22 +3367,22 @@ var xi = /* @__PURE__ */ Ue((/* @__PURE__ */ Ve(((e, t) => {
3285
3367
  };
3286
3368
  }));
3287
3369
  })))(), 1);
3288
- Pe.extend(xi.default);
3289
- function Si(e, t) {
3370
+ Fe.extend(wi.default);
3371
+ function Ti(e, t) {
3290
3372
  if (e == null || e === "") return null;
3291
- if (Pe.isDayjs(e)) return e;
3292
- let n = Pe(String(e), t, !0);
3293
- return n.isValid() ? n : Pe(String(e)).isValid() ? Pe(String(e)) : null;
3373
+ if (Fe.isDayjs(e)) return e;
3374
+ let n = Fe(String(e), t, !0);
3375
+ return n.isValid() ? n : Fe(String(e)).isValid() ? Fe(String(e)) : null;
3294
3376
  }
3295
3377
  //#endregion
3296
3378
  //#region src/crud/fields/DateField.tsx
3297
- var Ci = "YYYY-MM-DD", wi = `${Ci} HH:mm:ss`, Ti = [
3298
- Ci,
3299
- wi,
3379
+ var Ei = "YYYY-MM-DD", Di = `${Ei} HH:mm:ss`, Oi = [
3380
+ Ei,
3381
+ Di,
3300
3382
  "YYYY-MM-DDTHH:mm:ss",
3301
3383
  "YYYY-MM-DDTHH:mm:ssZ"
3302
3384
  ];
3303
- function Ei({ source: e, name: t, label: n, required: r, rules: i, showTime: a, hideLabel: o }) {
3385
+ function ki({ source: e, name: t, label: n, required: r, rules: i, showTime: a, hideLabel: o }) {
3304
3386
  return /* @__PURE__ */ q($, {
3305
3387
  source: e,
3306
3388
  name: t,
@@ -3309,33 +3391,33 @@ function Ei({ source: e, name: t, label: n, required: r, rules: i, showTime: a,
3309
3391
  rules: i,
3310
3392
  hideLabel: o,
3311
3393
  children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(O, {
3312
- value: Si(e, a ? [...Ti, wi] : Ti),
3313
- onChange: (e) => t(e ? e.format(a ? wi : Ci) : null),
3394
+ value: Ti(e, a ? [...Oi, Di] : Oi),
3395
+ onChange: (e) => t(e ? e.format(a ? Di : Ei) : null),
3314
3396
  onBlur: n,
3315
3397
  showTime: a,
3316
3398
  disabled: r,
3317
- format: a ? wi : Ci,
3399
+ format: a ? Di : Ei,
3318
3400
  style: { width: "100%" }
3319
3401
  })
3320
3402
  });
3321
3403
  }
3322
3404
  //#endregion
3323
3405
  //#region src/crud/fields/DateTimeField.tsx
3324
- function Di(e) {
3325
- return /* @__PURE__ */ q(Ei, {
3406
+ function Ai(e) {
3407
+ return /* @__PURE__ */ q(ki, {
3326
3408
  showTime: !0,
3327
3409
  ...e
3328
3410
  });
3329
3411
  }
3330
3412
  //#endregion
3331
3413
  //#region src/crud/fields/TimeField.tsx
3332
- var Oi = "HH:mm:ss", ki = [
3333
- Oi,
3414
+ var ji = "HH:mm:ss", Mi = [
3415
+ ji,
3334
3416
  "HH:mm",
3335
3417
  "H:mm:ss",
3336
3418
  "H:mm"
3337
3419
  ];
3338
- function Ai({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, format: o = Oi }) {
3420
+ function Ni({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, format: o = ji }) {
3339
3421
  return /* @__PURE__ */ q($, {
3340
3422
  source: e,
3341
3423
  name: t,
@@ -3343,8 +3425,8 @@ function Ai({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
3343
3425
  required: r,
3344
3426
  rules: i,
3345
3427
  hideLabel: a,
3346
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(H, {
3347
- value: Si(e, ki),
3428
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(le, {
3429
+ value: Ti(e, Mi),
3348
3430
  onChange: (e) => t(e ? e.format(o) : null),
3349
3431
  onBlur: n,
3350
3432
  disabled: r,
@@ -3355,7 +3437,7 @@ function Ai({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
3355
3437
  }
3356
3438
  //#endregion
3357
3439
  //#region src/crud/fields/SelectField.tsx
3358
- function ji({ source: e, name: t, label: n, required: r, rules: i, choices: a, mode: o, allowClear: s, hideLabel: c }) {
3440
+ function Pi({ source: e, name: t, label: n, required: r, rules: i, choices: a, mode: o, allowClear: s, hideLabel: c }) {
3359
3441
  return /* @__PURE__ */ q($, {
3360
3442
  source: e,
3361
3443
  name: t,
@@ -3363,7 +3445,7 @@ function ji({ source: e, name: t, label: n, required: r, rules: i, choices: a, m
3363
3445
  required: r,
3364
3446
  rules: i,
3365
3447
  hideLabel: c,
3366
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(R, {
3448
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(z, {
3367
3449
  value: e,
3368
3450
  onChange: t,
3369
3451
  options: a,
@@ -3376,7 +3458,7 @@ function ji({ source: e, name: t, label: n, required: r, rules: i, choices: a, m
3376
3458
  }
3377
3459
  //#endregion
3378
3460
  //#region src/crud/fields/PasswordField.tsx
3379
- function Mi({ source: e, name: t, label: n, required: r, rules: i, autoComplete: a, hideLabel: o }) {
3461
+ function Fi({ source: e, name: t, label: n, required: r, rules: i, autoComplete: a, hideLabel: o }) {
3380
3462
  return /* @__PURE__ */ q($, {
3381
3463
  source: e,
3382
3464
  name: t,
@@ -3384,7 +3466,7 @@ function Mi({ source: e, name: t, label: n, required: r, rules: i, autoComplete:
3384
3466
  required: r,
3385
3467
  rules: i,
3386
3468
  hideLabel: o,
3387
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(N.Password, {
3469
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(P.Password, {
3388
3470
  value: e,
3389
3471
  onChange: (e) => t(e.target.value),
3390
3472
  onBlur: n,
@@ -3393,12 +3475,12 @@ function Mi({ source: e, name: t, label: n, required: r, rules: i, autoComplete:
3393
3475
  })
3394
3476
  });
3395
3477
  }
3396
- function Ni({ source: e, name: t, label: n, required: r, rules: i, confirmSource: a, confirmLabel: o = "Confirm password", autoComplete: s = "new-password", hideLabel: c }) {
3397
- let l = Ne({
3478
+ function Ii({ source: e, name: t, label: n, required: r, rules: i, confirmSource: a, confirmLabel: o = "Confirm password", autoComplete: s = "new-password", hideLabel: c }) {
3479
+ let l = Pe({
3398
3480
  name: t ?? e,
3399
3481
  disabled: !a
3400
3482
  });
3401
- return a ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Mi, {
3483
+ return a ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Fi, {
3402
3484
  source: e,
3403
3485
  name: t,
3404
3486
  label: n,
@@ -3406,14 +3488,14 @@ function Ni({ source: e, name: t, label: n, required: r, rules: i, confirmSource
3406
3488
  rules: i,
3407
3489
  autoComplete: s,
3408
3490
  hideLabel: c
3409
- }), /* @__PURE__ */ q(Mi, {
3491
+ }), /* @__PURE__ */ q(Fi, {
3410
3492
  source: a,
3411
3493
  label: o,
3412
3494
  required: r,
3413
3495
  autoComplete: s,
3414
3496
  hideLabel: c,
3415
3497
  rules: { validate: (e) => !l || e === l || "Passwords do not match" }
3416
- })] }) : /* @__PURE__ */ q(Mi, {
3498
+ })] }) : /* @__PURE__ */ q(Fi, {
3417
3499
  source: e,
3418
3500
  name: t,
3419
3501
  label: n,
@@ -3425,48 +3507,48 @@ function Ni({ source: e, name: t, label: n, required: r, rules: i, confirmSource
3425
3507
  }
3426
3508
  //#endregion
3427
3509
  //#region src/crud/utils/choiceSelectionUtils.ts
3428
- function Pi(e, t) {
3510
+ function Li(e, t) {
3429
3511
  return typeof e == "object" && !!e && !Array.isArray(e) && t in e;
3430
3512
  }
3431
- function Fi(e, t) {
3513
+ function Ri(e, t) {
3432
3514
  if (!(e == null || e === "")) {
3433
- if (Pi(e, t)) {
3515
+ if (Li(e, t)) {
3434
3516
  let n = e[t];
3435
3517
  return typeof n == "string" || typeof n == "number" ? n : void 0;
3436
3518
  }
3437
3519
  if (typeof e == "string" || typeof e == "number") return e;
3438
3520
  }
3439
3521
  }
3440
- function Ii(e, t) {
3441
- return Array.isArray(e) ? e.map((e) => Fi(e, t)).filter((e) => e != null) : [];
3522
+ function zi(e, t) {
3523
+ return Array.isArray(e) ? e.map((e) => Ri(e, t)).filter((e) => e != null) : [];
3442
3524
  }
3443
- function Li(e, t) {
3444
- return e == null ? [] : (Array.isArray(e) ? e : [e]).filter((e) => e != null && e !== "").map((e) => Pi(e, t) ? e[t] : e);
3525
+ function Bi(e, t) {
3526
+ return e == null ? [] : (Array.isArray(e) ? e : [e]).filter((e) => e != null && e !== "").map((e) => Li(e, t) ? e[t] : e);
3445
3527
  }
3446
- function Ri(e, t, n) {
3528
+ function Vi(e, t, n) {
3447
3529
  let r = [];
3448
- if (t != null && (Array.isArray(t) ? r.push(...t.filter((e) => Pi(e, n))) : Pi(t, n) && r.push(t)), e == null) return r;
3530
+ if (t != null && (Array.isArray(t) ? r.push(...t.filter((e) => Li(e, n))) : Li(t, n) && r.push(t)), e == null) return r;
3449
3531
  let i = Array.isArray(e) ? e : [e];
3450
- for (let e of i) Pi(e, n) && r.push(e);
3532
+ for (let e of i) Li(e, n) && r.push(e);
3451
3533
  return r;
3452
3534
  }
3453
- function zi(e, t) {
3535
+ function Hi(e, t) {
3454
3536
  return typeof t == "function" ? t(e) : String(e[t] ?? "");
3455
3537
  }
3456
- function Bi(e, t, n) {
3538
+ function Ui(e, t, n) {
3457
3539
  return e.map((e) => ({
3458
- label: zi(e, t),
3540
+ label: Hi(e, t),
3459
3541
  value: e[n],
3460
3542
  record: e
3461
3543
  }));
3462
3544
  }
3463
- function Vi(e, t) {
3545
+ function Wi(e, t) {
3464
3546
  let n = /* @__PURE__ */ new Map();
3465
3547
  for (let t of e) n.set(t.value, t);
3466
3548
  for (let e of t) n.set(e.value, e);
3467
3549
  return Array.from(n.values());
3468
3550
  }
3469
- function Hi(e = {}) {
3551
+ function Gi(e = {}) {
3470
3552
  let t = e.popupMatchSelectWidth ?? !1;
3471
3553
  return t === !1 ? {
3472
3554
  popupMatchSelectWidth: !1,
@@ -3475,16 +3557,16 @@ function Hi(e = {}) {
3475
3557
  }
3476
3558
  //#endregion
3477
3559
  //#region src/crud/utils/referenceSelectNotFoundContent.tsx
3478
- function Ui(e) {
3479
- return e ? /* @__PURE__ */ q(B, { size: "small" }) : void 0;
3560
+ function Ki(e) {
3561
+ return e ? /* @__PURE__ */ q(oe, { size: "small" }) : void 0;
3480
3562
  }
3481
3563
  //#endregion
3482
3564
  //#region src/crud/utils/useChoices.ts
3483
- var Wi = /* @__PURE__ */ new Map(), Gi = /* @__PURE__ */ new Map();
3484
- function Ki(e, t) {
3565
+ var qi = /* @__PURE__ */ new Map(), Ji = /* @__PURE__ */ new Map();
3566
+ function Yi(e, t) {
3485
3567
  return typeof e == "function" ? `fn:${t ?? ""}` : Array.isArray(e) ? `static:${e.length}` : `res:${e.resource}:${JSON.stringify(e.filter ?? {})}:${t ?? ""}`;
3486
3568
  }
3487
- async function qi(e, t, n, r, i) {
3569
+ async function Xi(e, t, n, r, i) {
3488
3570
  return typeof e == "function" ? e({
3489
3571
  dataProvider: t,
3490
3572
  search: i
@@ -3498,26 +3580,26 @@ async function qi(e, t, n, r, i) {
3498
3580
  perPage: 500
3499
3581
  }
3500
3582
  })).data.map((e) => ({
3501
- label: zi(e, n),
3583
+ label: Hi(e, n),
3502
3584
  value: e[r],
3503
3585
  record: e
3504
3586
  }));
3505
3587
  }
3506
- function Ji(e, t, n, r, i, a) {
3507
- let o = Ki(e, i);
3588
+ function Zi(e, t, n, r, i, a) {
3589
+ let o = Yi(e, i);
3508
3590
  if (a) {
3509
- let e = Wi.get(o);
3591
+ let e = qi.get(o);
3510
3592
  if (e && !i) return Promise.resolve(e);
3511
3593
  }
3512
- let s = Gi.get(o);
3594
+ let s = Ji.get(o);
3513
3595
  if (s) return s;
3514
- let c = qi(e, t, n, r, i).then((e) => (a && !i && Wi.set(o, e), e)).finally(() => {
3515
- Gi.delete(o);
3596
+ let c = Xi(e, t, n, r, i).then((e) => (a && !i && qi.set(o, e), e)).finally(() => {
3597
+ Ji.delete(o);
3516
3598
  });
3517
- return Gi.set(o, c), c;
3599
+ return Ji.set(o, c), c;
3518
3600
  }
3519
- function Yi(e, t, n = "name", r = "id", i, o = {}) {
3520
- let { lazy: c = !1, active: u = !1, selectedValues: f, selectedRecords: p, fetchSelected: m = !0, cache: h } = o, g = h ?? !c, _ = Kt(), v = l(() => {
3601
+ function Qi(e, t, n = "name", r = "id", i, o = {}) {
3602
+ let { lazy: c = !1, active: u = !1, selectedValues: f, selectedRecords: p, fetchSelected: m = !0, cache: h } = o, g = h ?? !c, _ = Yt(), v = l(() => {
3521
3603
  if (e) return e;
3522
3604
  if (t) return {
3523
3605
  resource: t,
@@ -3527,14 +3609,14 @@ function Yi(e, t, n = "name", r = "id", i, o = {}) {
3527
3609
  e,
3528
3610
  t,
3529
3611
  i
3530
- ]), y = v ? Ki(v, i) : void 0, b = l(() => Li(f, r), [f, r]), x = l(() => Bi(Ri(f, p, r), n, r), [
3612
+ ]), y = v ? Yi(v, i) : void 0, b = l(() => Bi(f, r), [f, r]), x = l(() => Ui(Vi(f, p, r), n, r), [
3531
3613
  f,
3532
3614
  p,
3533
3615
  n,
3534
3616
  r
3535
- ]), S = !!(v && (!c || u || Array.isArray(v))), [C, w] = d(() => x.length ? x : !y || i || c || !g ? [] : Wi.get(y) ?? []), [T, E] = d(() => S ? !g || !y || i ? !!v : !Wi.has(y) : !1);
3617
+ ]), S = !!(v && (!c || u || Array.isArray(v))), [C, w] = d(() => x.length ? x : !y || i || c || !g ? [] : qi.get(y) ?? []), [T, E] = d(() => S ? !g || !y || i ? !!v : !qi.has(y) : !1);
3536
3618
  s(() => {
3537
- x.length && w((e) => Vi(e, x));
3619
+ x.length && w((e) => Wi(e, x));
3538
3620
  }, [x]);
3539
3621
  let D = a(async () => {
3540
3622
  if (!v || !S) {
@@ -3542,15 +3624,15 @@ function Yi(e, t, n = "name", r = "id", i, o = {}) {
3542
3624
  return;
3543
3625
  }
3544
3626
  if (g) {
3545
- let e = Ki(v, i), t = Wi.get(e);
3627
+ let e = Yi(v, i), t = qi.get(e);
3546
3628
  if (t && !i) {
3547
- w(Vi(x, t)), E(!1);
3629
+ w(Wi(x, t)), E(!1);
3548
3630
  return;
3549
3631
  }
3550
3632
  }
3551
3633
  E(!0), c && w(x);
3552
3634
  try {
3553
- w(Vi(x, await Ji(v, _, n, r, i, g)));
3635
+ w(Wi(x, await Zi(v, _, n, r, i, g)));
3554
3636
  } catch {
3555
3637
  !b.length && !x.length ? w([]) : c && w(x);
3556
3638
  } finally {
@@ -3587,7 +3669,7 @@ function Yi(e, t, n = "name", r = "id", i, o = {}) {
3587
3669
  for (let i of e) try {
3588
3670
  let e = (await _.getOne(t, i)).data;
3589
3671
  a.push({
3590
- label: zi(e, n),
3672
+ label: Hi(e, n),
3591
3673
  value: e[r],
3592
3674
  record: e
3593
3675
  });
@@ -3599,7 +3681,7 @@ function Yi(e, t, n = "name", r = "id", i, o = {}) {
3599
3681
  }
3600
3682
  i || !a.length || w((e) => {
3601
3683
  let t = a.filter((t) => !e.some((e) => e.value === t.value));
3602
- return t.length ? Vi(e, t) : e;
3684
+ return t.length ? Wi(e, t) : e;
3603
3685
  });
3604
3686
  })(), () => {
3605
3687
  i = !0;
@@ -3625,15 +3707,15 @@ function Yi(e, t, n = "name", r = "id", i, o = {}) {
3625
3707
  }
3626
3708
  //#endregion
3627
3709
  //#region src/crud/fields/ReferenceInputActions.tsx
3628
- function Xi({ reference: e, referenceForm: t, referencePermissions: n, referenceTitle: r, referenceDefaultValues: i, referenceModalWidth: a, selectedId: o, disabled: s, onCreated: c, onUpdated: l }) {
3710
+ function $i({ reference: e, referenceForm: t, referencePermissions: n, referenceTitle: r, referenceDefaultValues: i, referenceModalWidth: a, selectedId: o, disabled: s, onCreated: c, onUpdated: l }) {
3629
3711
  let u = X(), f = r ?? e, p = !!(e && t) && Z(u, n, "add"), m = !!(e && t && o != null && o !== "") && Z(u, n, "change"), [h, g] = d(null);
3630
- return !p && !m ? null : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J(z, {
3712
+ return !p && !m ? null : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J(B, {
3631
3713
  size: 4,
3632
3714
  children: [p ? /* @__PURE__ */ q(U, {
3633
3715
  title: `Add ${f ?? "record"}`,
3634
3716
  children: /* @__PURE__ */ q(w, {
3635
3717
  type: "default",
3636
- icon: /* @__PURE__ */ q(Se, {}),
3718
+ icon: /* @__PURE__ */ q(Ce, {}),
3637
3719
  disabled: s,
3638
3720
  "aria-label": `Add ${f ?? "record"}`,
3639
3721
  onClick: () => g("new")
@@ -3642,13 +3724,13 @@ function Xi({ reference: e, referenceForm: t, referencePermissions: n, reference
3642
3724
  title: `Edit ${f ?? "record"}`,
3643
3725
  children: /* @__PURE__ */ q(w, {
3644
3726
  type: "default",
3645
- icon: /* @__PURE__ */ q(ge, {}),
3727
+ icon: /* @__PURE__ */ q(_e, {}),
3646
3728
  disabled: s,
3647
3729
  "aria-label": `Edit ${f ?? "record"}`,
3648
3730
  onClick: () => g(String(o))
3649
3731
  })
3650
3732
  }) : null]
3651
- }), e && t && h != null ? /* @__PURE__ */ q(Br, {
3733
+ }), e && t && h != null ? /* @__PURE__ */ q(Ur, {
3652
3734
  resource: e,
3653
3735
  editId: h,
3654
3736
  onClose: () => g(null),
@@ -3665,35 +3747,35 @@ function Xi({ reference: e, referenceForm: t, referencePermissions: n, reference
3665
3747
  }
3666
3748
  //#endregion
3667
3749
  //#region src/crud/fields/ReferenceField.tsx
3668
- function Zi({ reference: e, choices: t, optionLabel: n = "name", optionValue: r = "id", search: i, allowClear: a, disabled: o, inputStyle: s, onValueChange: c, lazy: u = !0, fetchSelected: f = !0, value: p, onChange: m, fieldName: h, selectedRecords: g, referenceForm: _, referencePermissions: v, referenceTitle: y, referenceDefaultValues: b, referenceModalWidth: x, referenceActions: S = !0, popupMatchSelectWidth: C, popupMinWidth: w }) {
3669
- let [T, E] = d(), [D, O] = d(!1), k = D || !!T, ee = Fi(p, r), { options: A, loading: j, optionForValue: te, reload: M } = Yi(t, e, n, r, i ? T : void 0, {
3750
+ function ea({ reference: e, choices: t, optionLabel: n = "name", optionValue: r = "id", search: i, allowClear: a, disabled: o, inputStyle: s, onValueChange: c, lazy: u = !0, fetchSelected: f = !0, value: p, onChange: m, fieldName: h, selectedRecords: g, referenceForm: _, referencePermissions: v, referenceTitle: y, referenceDefaultValues: b, referenceModalWidth: x, referenceActions: S = !0, popupMatchSelectWidth: C, popupMinWidth: w }) {
3751
+ let [T, E] = d(), [D, O] = d(!1), k = D || !!T, A = Ri(p, r), { options: j, loading: M, optionForValue: ee, reload: N } = Qi(t, e, n, r, i ? T : void 0, {
3670
3752
  lazy: u,
3671
3753
  active: k,
3672
3754
  selectedValues: p,
3673
3755
  selectedRecords: g,
3674
3756
  fetchSelected: f
3675
- }), N = l(() => A.map((e) => ({
3757
+ }), P = l(() => j.map((e) => ({
3676
3758
  label: e.label,
3677
3759
  value: e.value
3678
- })), [A]), P = (e) => {
3760
+ })), [j]), F = (e) => {
3679
3761
  let t = e[r];
3680
3762
  m(t), c?.(t, {
3681
- label: zi(e, n),
3763
+ label: Hi(e, n),
3682
3764
  value: t,
3683
3765
  record: e
3684
- }, { name: h }), M();
3685
- }, F = /* @__PURE__ */ q(R, {
3686
- ...Hi({
3766
+ }, { name: h }), N();
3767
+ }, I = /* @__PURE__ */ q(z, {
3768
+ ...Gi({
3687
3769
  popupMatchSelectWidth: C,
3688
3770
  popupMinWidth: w
3689
3771
  }),
3690
- value: ee,
3772
+ value: A,
3691
3773
  onChange: (e) => {
3692
- m(e), c?.(e, te(e), { name: h });
3774
+ m(e), c?.(e, ee(e), { name: h });
3693
3775
  },
3694
- options: N,
3695
- loading: j,
3696
- notFoundContent: Ui(j),
3776
+ options: P,
3777
+ loading: M,
3778
+ notFoundContent: Ki(M),
3697
3779
  showSearch: i,
3698
3780
  filterOption: i ? !1 : void 0,
3699
3781
  onSearch: i ? E : void 0,
@@ -3721,23 +3803,23 @@ function Zi({ reference: e, choices: t, optionLabel: n = "name", optionValue: r
3721
3803
  flex: 1,
3722
3804
  minWidth: 0
3723
3805
  },
3724
- children: F
3725
- }), /* @__PURE__ */ q(Xi, {
3806
+ children: I
3807
+ }), /* @__PURE__ */ q($i, {
3726
3808
  reference: e,
3727
3809
  referenceForm: _,
3728
3810
  referencePermissions: v,
3729
3811
  referenceTitle: y,
3730
3812
  referenceDefaultValues: b,
3731
3813
  referenceModalWidth: x,
3732
- selectedId: ee,
3814
+ selectedId: A,
3733
3815
  disabled: o,
3734
- onCreated: P,
3735
- onUpdated: () => void M()
3816
+ onCreated: F,
3817
+ onUpdated: () => void N()
3736
3818
  })]
3737
- }) : F;
3819
+ }) : I;
3738
3820
  }
3739
- function Qi({ source: e, name: t, label: n, reference: r, choices: i, optionLabel: a = "name", optionValue: o = "id", required: s, rules: c, search: l, allowClear: u, disabled: d, hideLabel: f, inputStyle: p, onValueChange: m, lazy: h = !0, recordSource: g, fetchSelected: _ = !0, referenceForm: v, referencePermissions: y, referenceTitle: b, referenceDefaultValues: x, referenceModalWidth: S, referenceActions: C = !0, popupMatchSelectWidth: w, popupMinWidth: T }) {
3740
- let E = Ne({
3821
+ function ta({ source: e, name: t, label: n, reference: r, choices: i, optionLabel: a = "name", optionValue: o = "id", required: s, rules: c, search: l, allowClear: u, disabled: d, hideLabel: f, inputStyle: p, onValueChange: m, lazy: h = !0, recordSource: g, fetchSelected: _ = !0, referenceForm: v, referencePermissions: y, referenceTitle: b, referenceDefaultValues: x, referenceModalWidth: S, referenceActions: C = !0, popupMatchSelectWidth: w, popupMinWidth: T }) {
3822
+ let E = Pe({
3741
3823
  name: g ?? "",
3742
3824
  disabled: !g
3743
3825
  });
@@ -3748,7 +3830,7 @@ function Qi({ source: e, name: t, label: n, reference: r, choices: i, optionLabe
3748
3830
  required: s,
3749
3831
  rules: c,
3750
3832
  hideLabel: f,
3751
- children: ({ value: e, onChange: t, disabled: n, name: s }) => /* @__PURE__ */ q(Zi, {
3833
+ children: ({ value: e, onChange: t, disabled: n, name: s }) => /* @__PURE__ */ q(ea, {
3752
3834
  reference: r,
3753
3835
  choices: i,
3754
3836
  optionLabel: a,
@@ -3777,27 +3859,27 @@ function Qi({ source: e, name: t, label: n, reference: r, choices: i, optionLabe
3777
3859
  }
3778
3860
  //#endregion
3779
3861
  //#region src/crud/fields/ReferenceManyField.tsx
3780
- function $i({ reference: e, choices: t, optionLabel: n = "name", optionValue: r = "id", search: i, allowClear: a = !0, lazy: o = !0, fetchSelected: s = !0, value: c, onChange: u, disabled: f, selectedRecords: p, referenceForm: m, referencePermissions: h, referenceTitle: g, referenceDefaultValues: _, referenceModalWidth: v, referenceActions: y = !0, popupMatchSelectWidth: b, popupMinWidth: x }) {
3781
- let [S, C] = d(), [w, T] = d(!1), E = w || !!S, D = Ii(c, r), { options: O, loading: k, reload: ee } = Yi(t, e, n, r, i ? S : void 0, {
3862
+ function na({ reference: e, choices: t, optionLabel: n = "name", optionValue: r = "id", search: i, allowClear: a = !0, lazy: o = !0, fetchSelected: s = !0, value: c, onChange: u, disabled: f, selectedRecords: p, referenceForm: m, referencePermissions: h, referenceTitle: g, referenceDefaultValues: _, referenceModalWidth: v, referenceActions: y = !0, popupMatchSelectWidth: b, popupMinWidth: x }) {
3863
+ let [S, C] = d(), [w, T] = d(!1), E = w || !!S, D = zi(c, r), { options: O, loading: k, reload: A } = Qi(t, e, n, r, i ? S : void 0, {
3782
3864
  lazy: o,
3783
3865
  active: E,
3784
3866
  selectedValues: c,
3785
3867
  selectedRecords: p,
3786
3868
  fetchSelected: s
3787
- }), A = l(() => O.map((e) => ({
3869
+ }), j = l(() => O.map((e) => ({
3788
3870
  label: e.label,
3789
3871
  value: e.value
3790
- })), [O]), j = /* @__PURE__ */ q(R, {
3791
- ...Hi({
3872
+ })), [O]), M = /* @__PURE__ */ q(z, {
3873
+ ...Gi({
3792
3874
  popupMatchSelectWidth: b,
3793
3875
  popupMinWidth: x
3794
3876
  }),
3795
3877
  mode: "multiple",
3796
3878
  value: D,
3797
3879
  onChange: u,
3798
- options: A,
3880
+ options: j,
3799
3881
  loading: k,
3800
- notFoundContent: Ui(k),
3882
+ notFoundContent: Ki(k),
3801
3883
  showSearch: i,
3802
3884
  filterOption: i ? !1 : void 0,
3803
3885
  onSearch: i ? C : void 0,
@@ -3821,8 +3903,8 @@ function $i({ reference: e, choices: t, optionLabel: n = "name", optionValue: r
3821
3903
  flex: 1,
3822
3904
  minWidth: 0
3823
3905
  },
3824
- children: j
3825
- }), /* @__PURE__ */ q(Xi, {
3906
+ children: M
3907
+ }), /* @__PURE__ */ q($i, {
3826
3908
  reference: e,
3827
3909
  referenceForm: m,
3828
3910
  referencePermissions: h,
@@ -3833,16 +3915,16 @@ function $i({ reference: e, choices: t, optionLabel: n = "name", optionValue: r
3833
3915
  onCreated: (e) => {
3834
3916
  let t = e[r], n = Array.isArray(D) ? D : [];
3835
3917
  if (n.some((e) => e === t)) {
3836
- ee();
3918
+ A();
3837
3919
  return;
3838
3920
  }
3839
- u([...n, t]), ee();
3921
+ u([...n, t]), A();
3840
3922
  }
3841
3923
  })]
3842
- }) : j;
3924
+ }) : M;
3843
3925
  }
3844
- function ea({ source: e, name: t, label: n, reference: r, choices: i, optionLabel: a = "name", optionValue: o = "id", required: s, rules: c, search: l, allowClear: u = !0, hideLabel: d, disabled: f, lazy: p = !0, recordSource: m, fetchSelected: h = !0, referenceForm: g, referencePermissions: _, referenceTitle: v, referenceDefaultValues: y, referenceModalWidth: b, referenceActions: x = !0, popupMatchSelectWidth: S, popupMinWidth: C }) {
3845
- let w = Ne({
3926
+ function ra({ source: e, name: t, label: n, reference: r, choices: i, optionLabel: a = "name", optionValue: o = "id", required: s, rules: c, search: l, allowClear: u = !0, hideLabel: d, disabled: f, lazy: p = !0, recordSource: m, fetchSelected: h = !0, referenceForm: g, referencePermissions: _, referenceTitle: v, referenceDefaultValues: y, referenceModalWidth: b, referenceActions: x = !0, popupMatchSelectWidth: S, popupMinWidth: C }) {
3927
+ let w = Pe({
3846
3928
  name: m ?? "",
3847
3929
  disabled: !m
3848
3930
  });
@@ -3853,7 +3935,7 @@ function ea({ source: e, name: t, label: n, reference: r, choices: i, optionLabe
3853
3935
  required: s,
3854
3936
  rules: c,
3855
3937
  hideLabel: d,
3856
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q($i, {
3938
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(na, {
3857
3939
  reference: r,
3858
3940
  choices: i,
3859
3941
  optionLabel: a,
@@ -3879,10 +3961,10 @@ function ea({ source: e, name: t, label: n, reference: r, choices: i, optionLabe
3879
3961
  }
3880
3962
  //#endregion
3881
3963
  //#region src/crud/fields/uploadFieldUtils.ts
3882
- function ta(e) {
3964
+ function ia(e) {
3883
3965
  return e instanceof File ? !0 : typeof e == "string" && e.length > 0;
3884
3966
  }
3885
- function na(e) {
3967
+ function aa(e) {
3886
3968
  if (e instanceof File) return e.name;
3887
3969
  if (typeof e == "string" && e.length > 0) try {
3888
3970
  return new URL(e, "http://local").pathname.split("/").filter(Boolean).pop() || e;
@@ -3892,7 +3974,7 @@ function na(e) {
3892
3974
  }
3893
3975
  //#endregion
3894
3976
  //#region src/crud/fields/useUploadPreviewUrl.ts
3895
- function ra(e) {
3977
+ function oa(e) {
3896
3978
  let [t, n] = d();
3897
3979
  if (s(() => {
3898
3980
  if (e instanceof File) {
@@ -3905,14 +3987,14 @@ function ra(e) {
3905
3987
  }
3906
3988
  //#endregion
3907
3989
  //#region src/crud/fields/ImageField.tsx
3908
- function ia({ value: e, onChange: t, disabled: n, clearable: r, accept: i = "image/*", previewWidth: a = 200 }) {
3909
- let o = u(null), s = ra(e), c = r && ta(e);
3910
- return /* @__PURE__ */ J(z, {
3990
+ function sa({ value: e, onChange: t, disabled: n, clearable: r, accept: i = "image/*", previewWidth: a = 200 }) {
3991
+ let o = u(null), s = oa(e), c = r && ia(e);
3992
+ return /* @__PURE__ */ J(B, {
3911
3993
  direction: "vertical",
3912
3994
  size: "middle",
3913
3995
  style: { width: "100%" },
3914
3996
  children: [
3915
- s ? /* @__PURE__ */ q(M, {
3997
+ s ? /* @__PURE__ */ q(N, {
3916
3998
  src: s,
3917
3999
  alt: "",
3918
4000
  style: {
@@ -3921,15 +4003,15 @@ function ia({ value: e, onChange: t, disabled: n, clearable: r, accept: i = "ima
3921
4003
  objectFit: "contain"
3922
4004
  }
3923
4005
  }) : null,
3924
- /* @__PURE__ */ J(z, {
4006
+ /* @__PURE__ */ J(B, {
3925
4007
  wrap: !0,
3926
4008
  children: [/* @__PURE__ */ q(w, {
3927
- icon: /* @__PURE__ */ q(Te, {}),
4009
+ icon: /* @__PURE__ */ q(Ee, {}),
3928
4010
  disabled: n,
3929
4011
  onClick: () => o.current?.click(),
3930
4012
  children: "Choose image"
3931
4013
  }), c ? /* @__PURE__ */ q(w, {
3932
- icon: /* @__PURE__ */ q(me, {}),
4014
+ icon: /* @__PURE__ */ q(he, {}),
3933
4015
  disabled: n,
3934
4016
  onClick: () => {
3935
4017
  t(null), o.current && (o.current.value = "");
@@ -3953,7 +4035,7 @@ function ia({ value: e, onChange: t, disabled: n, clearable: r, accept: i = "ima
3953
4035
  ]
3954
4036
  });
3955
4037
  }
3956
- function aa({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, clearable: o, accept: s, previewWidth: c }) {
4038
+ function ca({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, clearable: o, accept: s, previewWidth: c }) {
3957
4039
  return /* @__PURE__ */ q($, {
3958
4040
  source: e,
3959
4041
  name: t,
@@ -3961,7 +4043,7 @@ function aa({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
3961
4043
  required: r,
3962
4044
  rules: i,
3963
4045
  hideLabel: a,
3964
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(ia, {
4046
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(sa, {
3965
4047
  value: e,
3966
4048
  onChange: t,
3967
4049
  disabled: n,
@@ -3973,28 +4055,28 @@ function aa({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
3973
4055
  }
3974
4056
  //#endregion
3975
4057
  //#region src/crud/fields/FileField.tsx
3976
- function oa({ value: e, onChange: t, disabled: n, clearable: r, accept: i }) {
3977
- let a = u(null), o = na(e), s = typeof e == "string" && e.length > 0 ? e : void 0, c = r && ta(e);
3978
- return /* @__PURE__ */ J(z, {
4058
+ function la({ value: e, onChange: t, disabled: n, clearable: r, accept: i }) {
4059
+ let a = u(null), o = aa(e), s = typeof e == "string" && e.length > 0 ? e : void 0, c = r && ia(e);
4060
+ return /* @__PURE__ */ J(B, {
3979
4061
  direction: "vertical",
3980
4062
  size: "middle",
3981
4063
  style: { width: "100%" },
3982
4064
  children: [
3983
- o ? /* @__PURE__ */ J(z, { children: [/* @__PURE__ */ q(xe, {}), s ? /* @__PURE__ */ q(W.Link, {
4065
+ o ? /* @__PURE__ */ J(B, { children: [/* @__PURE__ */ q(Se, {}), s ? /* @__PURE__ */ q(W.Link, {
3984
4066
  href: s,
3985
4067
  target: "_blank",
3986
4068
  rel: "noopener noreferrer",
3987
4069
  children: o
3988
4070
  }) : /* @__PURE__ */ q(W.Text, { children: o })] }) : null,
3989
- /* @__PURE__ */ J(z, {
4071
+ /* @__PURE__ */ J(B, {
3990
4072
  wrap: !0,
3991
4073
  children: [/* @__PURE__ */ q(w, {
3992
- icon: /* @__PURE__ */ q(Te, {}),
4074
+ icon: /* @__PURE__ */ q(Ee, {}),
3993
4075
  disabled: n,
3994
4076
  onClick: () => a.current?.click(),
3995
4077
  children: "Choose file"
3996
4078
  }), c ? /* @__PURE__ */ q(w, {
3997
- icon: /* @__PURE__ */ q(me, {}),
4079
+ icon: /* @__PURE__ */ q(he, {}),
3998
4080
  disabled: n,
3999
4081
  onClick: () => {
4000
4082
  t(null), a.current && (a.current.value = "");
@@ -4018,7 +4100,7 @@ function oa({ value: e, onChange: t, disabled: n, clearable: r, accept: i }) {
4018
4100
  ]
4019
4101
  });
4020
4102
  }
4021
- function sa({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, clearable: o, accept: s }) {
4103
+ function ua({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, clearable: o, accept: s }) {
4022
4104
  return /* @__PURE__ */ q($, {
4023
4105
  source: e,
4024
4106
  name: t,
@@ -4026,7 +4108,7 @@ function sa({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
4026
4108
  required: r,
4027
4109
  rules: i,
4028
4110
  hideLabel: a,
4029
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(oa, {
4111
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(la, {
4030
4112
  value: e,
4031
4113
  onChange: t,
4032
4114
  disabled: n,
@@ -4037,8 +4119,8 @@ function sa({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
4037
4119
  }
4038
4120
  //#endregion
4039
4121
  //#region src/crud/columns/TextColumn.tsx
4040
- function ca({ source: e, label: t, sortable: n = !0 }) {
4041
- return Gn(l(() => ({
4122
+ function da({ source: e, label: t, sortable: n = !0 }) {
4123
+ return Jn(l(() => ({
4042
4124
  key: e,
4043
4125
  source: e,
4044
4126
  label: t,
@@ -4055,13 +4137,13 @@ function ca({ source: e, label: t, sortable: n = !0 }) {
4055
4137
  n
4056
4138
  ])), null;
4057
4139
  }
4058
- function la(e, t, n) {
4059
- return typeof n == "function" ? n(e) : n ? _r(e, n) : e[t];
4140
+ function fa(e, t, n) {
4141
+ return typeof n == "function" ? n(e) : n ? br(e, n) : e[t];
4060
4142
  }
4061
4143
  //#endregion
4062
4144
  //#region src/crud/columns/NumberColumn.tsx
4063
- function ua({ source: e, label: t, sortable: n = !0 }) {
4064
- return Gn(l(() => ({
4145
+ function pa({ source: e, label: t, sortable: n = !0 }) {
4146
+ return Jn(l(() => ({
4065
4147
  key: e,
4066
4148
  source: e,
4067
4149
  label: t,
@@ -4080,8 +4162,8 @@ function ua({ source: e, label: t, sortable: n = !0 }) {
4080
4162
  }
4081
4163
  //#endregion
4082
4164
  //#region src/crud/columns/BooleanColumn.tsx
4083
- function da({ source: e, label: t, sortable: n = !0 }) {
4084
- return Gn(l(() => ({
4165
+ function ma({ source: e, label: t, sortable: n = !0 }) {
4166
+ return Jn(l(() => ({
4085
4167
  key: e,
4086
4168
  source: e,
4087
4169
  label: t,
@@ -4101,8 +4183,8 @@ function da({ source: e, label: t, sortable: n = !0 }) {
4101
4183
  }
4102
4184
  //#endregion
4103
4185
  //#region src/crud/columns/DateColumn.tsx
4104
- function fa({ source: e, label: t, sortable: n = !0 }) {
4105
- return Gn(l(() => ({
4186
+ function ha({ source: e, label: t, sortable: n = !0 }) {
4187
+ return Jn(l(() => ({
4106
4188
  key: e,
4107
4189
  source: e,
4108
4190
  label: t,
@@ -4122,17 +4204,17 @@ function fa({ source: e, label: t, sortable: n = !0 }) {
4122
4204
  }
4123
4205
  //#endregion
4124
4206
  //#region src/crud/columns/ReferenceColumn.tsx
4125
- function pa({ record: e, source: t, display: n, reference: r, choices: i, optionLabel: a, optionValue: o }) {
4126
- let { labelForValue: s } = Yi(i, r, a, o), c = e[t];
4207
+ function ga({ record: e, source: t, display: n, reference: r, choices: i, optionLabel: a, optionValue: o }) {
4208
+ let { labelForValue: s } = Qi(i, r, a, o), c = e[t];
4127
4209
  if (typeof n == "function") return /* @__PURE__ */ q(K, { children: n(e) });
4128
4210
  if (n && n !== t) {
4129
- let r = la(e, t, n);
4211
+ let r = fa(e, t, n);
4130
4212
  return /* @__PURE__ */ q(K, { children: r == null ? "—" : String(r) });
4131
4213
  }
4132
4214
  return /* @__PURE__ */ q(K, { children: s(c) });
4133
4215
  }
4134
- function ma({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", display: o, sortable: s = !0 }) {
4135
- return Gn(l(() => ({
4216
+ function _a({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", display: o, sortable: s = !0 }) {
4217
+ return Jn(l(() => ({
4136
4218
  key: e,
4137
4219
  source: e,
4138
4220
  label: t,
@@ -4142,7 +4224,7 @@ function ma({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4142
4224
  dataIndex: e,
4143
4225
  key: e,
4144
4226
  sorter: s ? !0 : void 0,
4145
- render: (s, c) => /* @__PURE__ */ q(pa, {
4227
+ render: (s, c) => /* @__PURE__ */ q(ga, {
4146
4228
  record: c,
4147
4229
  source: e,
4148
4230
  label: t,
@@ -4166,12 +4248,12 @@ function ma({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4166
4248
  }
4167
4249
  //#endregion
4168
4250
  //#region src/crud/columns/ReferenceManyColumn.tsx
4169
- function ha({ record: e, source: t, reference: n, choices: r, optionLabel: i, optionValue: a }) {
4170
- let { labelsForValues: o } = Yi(r, n, i, a), s = e[t];
4251
+ function va({ record: e, source: t, reference: n, choices: r, optionLabel: i, optionValue: a }) {
4252
+ let { labelsForValues: o } = Qi(r, n, i, a), s = e[t];
4171
4253
  return /* @__PURE__ */ q(K, { children: o(Array.isArray(s) ? s : []) });
4172
4254
  }
4173
- function ga({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", sortable: o = !1 }) {
4174
- return Gn(l(() => ({
4255
+ function ya({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", sortable: o = !1 }) {
4256
+ return Jn(l(() => ({
4175
4257
  key: e,
4176
4258
  source: e,
4177
4259
  label: t,
@@ -4181,7 +4263,7 @@ function ga({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4181
4263
  dataIndex: e,
4182
4264
  key: e,
4183
4265
  sorter: o ? !0 : void 0,
4184
- render: (t, o) => /* @__PURE__ */ q(ha, {
4266
+ render: (t, o) => /* @__PURE__ */ q(va, {
4185
4267
  record: o,
4186
4268
  source: e,
4187
4269
  reference: n,
@@ -4202,8 +4284,8 @@ function ga({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4202
4284
  }
4203
4285
  //#endregion
4204
4286
  //#region src/crud/columns/ImageColumn.tsx
4205
- function _a({ source: e, label: t, sortable: n = !1, width: r = 40, height: i = 40, objectFit: a = "cover", borderRadius: o = 4, alt: s = "" }) {
4206
- return Gn(l(() => ({
4287
+ function ba({ source: e, label: t, sortable: n = !1, width: r = 40, height: i = 40, objectFit: a = "cover", borderRadius: o = 4, alt: s = "" }) {
4288
+ return Jn(l(() => ({
4207
4289
  key: e,
4208
4290
  source: e,
4209
4291
  label: t,
@@ -4237,8 +4319,8 @@ function _a({ source: e, label: t, sortable: n = !1, width: r = 40, height: i =
4237
4319
  }
4238
4320
  //#endregion
4239
4321
  //#region src/crud/columns/CustomColumn.tsx
4240
- function va({ source: e, label: t, sortable: n = !1, render: r }) {
4241
- return Gn(l(() => ({
4322
+ function xa({ source: e, label: t, sortable: n = !1, render: r }) {
4323
+ return Jn(l(() => ({
4242
4324
  key: e,
4243
4325
  source: e,
4244
4326
  label: t,
@@ -4257,12 +4339,12 @@ function va({ source: e, label: t, sortable: n = !1, render: r }) {
4257
4339
  }
4258
4340
  //#endregion
4259
4341
  //#region src/crud/filters/NumberFilter.tsx
4260
- function ya({ source: e, label: t }) {
4261
- return er(l(() => ({
4342
+ function Sa({ source: e, label: t }) {
4343
+ return rr(l(() => ({
4262
4344
  key: e,
4263
4345
  source: e,
4264
4346
  label: t,
4265
- render: ({ value: n, onChange: r }) => /* @__PURE__ */ q(P, {
4347
+ render: ({ value: n, onChange: r }) => /* @__PURE__ */ q(F, {
4266
4348
  placeholder: t ?? e,
4267
4349
  value: n,
4268
4350
  onChange: (e) => r(e ?? void 0),
@@ -4272,12 +4354,12 @@ function ya({ source: e, label: t }) {
4272
4354
  }
4273
4355
  //#endregion
4274
4356
  //#region src/crud/filters/BooleanFilter.tsx
4275
- function ba({ source: e, label: t }) {
4276
- return er(l(() => ({
4357
+ function Ca({ source: e, label: t }) {
4358
+ return rr(l(() => ({
4277
4359
  key: e,
4278
4360
  source: e,
4279
4361
  label: t,
4280
- render: ({ value: n, onChange: r }) => /* @__PURE__ */ q(R, {
4362
+ render: ({ value: n, onChange: r }) => /* @__PURE__ */ q(z, {
4281
4363
  allowClear: !0,
4282
4364
  placeholder: t ?? e,
4283
4365
  value: n,
@@ -4295,15 +4377,15 @@ function ba({ source: e, label: t }) {
4295
4377
  }
4296
4378
  //#endregion
4297
4379
  //#region src/crud/filters/DateFilter.tsx
4298
- function xa({ source: e, label: t }) {
4299
- return er(l(() => ({
4380
+ function wa({ source: e, label: t }) {
4381
+ return rr(l(() => ({
4300
4382
  key: e,
4301
4383
  source: e,
4302
4384
  label: t,
4303
4385
  render: ({ value: n, onChange: r }) => /* @__PURE__ */ q(O, {
4304
4386
  allowClear: !0,
4305
4387
  placeholder: t ?? e,
4306
- value: n ? Pe(String(n)) : null,
4388
+ value: n ? Fe(String(n)) : null,
4307
4389
  onChange: (e) => r(e ? e.format("YYYY-MM-DD") : void 0),
4308
4390
  style: { minWidth: 160 }
4309
4391
  })
@@ -4311,12 +4393,12 @@ function xa({ source: e, label: t }) {
4311
4393
  }
4312
4394
  //#endregion
4313
4395
  //#region src/crud/filters/SelectFilter.tsx
4314
- function Sa({ source: e, label: t, choices: n, multiple: r }) {
4315
- return er(l(() => ({
4396
+ function Ta({ source: e, label: t, choices: n, multiple: r }) {
4397
+ return rr(l(() => ({
4316
4398
  key: e,
4317
4399
  source: e,
4318
4400
  label: t,
4319
- render: ({ value: i, onChange: a }) => /* @__PURE__ */ q(R, {
4401
+ render: ({ value: i, onChange: a }) => /* @__PURE__ */ q(z, {
4320
4402
  allowClear: !0,
4321
4403
  mode: r ? "multiple" : void 0,
4322
4404
  placeholder: t ?? e,
@@ -4334,15 +4416,15 @@ function Sa({ source: e, label: t, choices: n, multiple: r }) {
4334
4416
  }
4335
4417
  //#endregion
4336
4418
  //#region src/crud/filters/ReferenceFilter.tsx
4337
- function Ca({ source: e, label: t, reference: n, choices: r, optionLabel: i, optionValue: a, multiple: o, search: s, lazy: c = !0, fetchSelected: l = !0, popupMatchSelectWidth: u, popupMinWidth: f, value: p, onChange: m }) {
4338
- let [h, g] = d(), [_, v] = d(!1), { options: y, loading: b } = Yi(r, n, i, a, s ? h : void 0, {
4419
+ function Ea({ source: e, label: t, reference: n, choices: r, optionLabel: i, optionValue: a, multiple: o, search: s, lazy: c = !0, fetchSelected: l = !0, popupMatchSelectWidth: u, popupMinWidth: f, value: p, onChange: m }) {
4420
+ let [h, g] = d(), [_, v] = d(!1), { options: y, loading: b } = Qi(r, n, i, a, s ? h : void 0, {
4339
4421
  lazy: c,
4340
4422
  active: _ || !!h,
4341
4423
  selectedValues: p,
4342
4424
  fetchSelected: l
4343
4425
  });
4344
- return /* @__PURE__ */ q(R, {
4345
- ...Hi({
4426
+ return /* @__PURE__ */ q(z, {
4427
+ ...Gi({
4346
4428
  popupMatchSelectWidth: u,
4347
4429
  popupMinWidth: f
4348
4430
  }),
@@ -4356,7 +4438,7 @@ function Ca({ source: e, label: t, reference: n, choices: r, optionLabel: i, opt
4356
4438
  value: e.value
4357
4439
  })),
4358
4440
  loading: b,
4359
- notFoundContent: Ui(b),
4441
+ notFoundContent: Ki(b),
4360
4442
  showSearch: s,
4361
4443
  filterOption: s ? !1 : void 0,
4362
4444
  onSearch: s ? g : void 0,
@@ -4367,12 +4449,12 @@ function Ca({ source: e, label: t, reference: n, choices: r, optionLabel: i, opt
4367
4449
  style: { minWidth: 180 }
4368
4450
  });
4369
4451
  }
4370
- function wa({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", multiple: o, search: s, lazy: c = !0, fetchSelected: u = !0, popupMatchSelectWidth: d, popupMinWidth: f }) {
4371
- return er(l(() => ({
4452
+ function Da({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", multiple: o, search: s, lazy: c = !0, fetchSelected: u = !0, popupMatchSelectWidth: d, popupMinWidth: f }) {
4453
+ return rr(l(() => ({
4372
4454
  key: e,
4373
4455
  source: e,
4374
4456
  label: t,
4375
- render: ({ value: l, onChange: p }) => /* @__PURE__ */ q(Ca, {
4457
+ render: ({ value: l, onChange: p }) => /* @__PURE__ */ q(Ea, {
4376
4458
  source: e,
4377
4459
  label: t,
4378
4460
  reference: n,
@@ -4403,11 +4485,11 @@ function wa({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4403
4485
  f
4404
4486
  ])), null;
4405
4487
  }
4406
- function Ta(e) {
4407
- return /* @__PURE__ */ q(wa, {
4488
+ function Oa(e) {
4489
+ return /* @__PURE__ */ q(Da, {
4408
4490
  ...e,
4409
4491
  multiple: !0
4410
4492
  });
4411
4493
  }
4412
4494
  //#endregion
4413
- export { Ut as AdminApp, jt as AdminLayout, Ln as AppHub, Rn as AppLauncherButton, Xe as AppThemeProvider, Nn as AuthAlternateLink, Pn as AuthPageLayout, ct as AuthProvider, da as BooleanColumn, bi as BooleanField, ba as BooleanFilter, va as CustomColumn, qn as DEFAULT_TEXT_FILTER_DEBOUNCE_MS, Gt as DataProvider, fa as DateColumn, Ei as DateField, xa as DateFilter, Di as DateTimeField, $e as DensitySwitch, Zt as EXPECTED_VALIDATION_BODY_HINT, $ as FieldWrapper, sa as FileField, ti as FilterBar, mi as FormStep, gi as FormSteps, di as FormTab, pi as FormTabs, Mt as Guard, Pt as GuestOnly, _a as ImageColumn, aa as ImageField, oi as InlineFormSet, si as InlineFormSetStacked, Fn as LoginPage, ua as NumberColumn, yi as NumberField, ya as NumberFilter, Ni as PasswordField, pt as PermissionsProvider, In as PlaceholderPage, Nt as Protected, ma as ReferenceColumn, Qi as ReferenceField, wa as ReferenceFilter, ga as ReferenceManyColumn, ea as ReferenceManyField, Ta as ReferenceManyFilter, Ft as RequirePermission, ni as ResourceForm, Br as ResourceFormModal, $r as ResourceList, ji as SelectField, Sa as SelectFilter, vi as TextAreaField, ca as TextColumn, _i as TextField, Xn as TextFilter, tt as ThemeSwitch, nt as ThemeToolbar, Ai as TimeField, En as applyInMemoryListParams, Q as asStringMessages, yr as buildFormPayload, br as buildInlineRowsPayload, Or as buildResourceFormSubmitBody, Yt as combineResourceHandlers, Ht as createAdminRouter, Dn as createMemoryResourceHandlers, mt as createPermissionsChecker, On as createRestResourceHandlers, dt as createSessionStorageAuthAdapter, Bt as deriveAuthPaths, rn as describeNonStandardValidationBody, xt as filterNavByPermission, wn as filterRows, fn as finalizeFormErrors, dn as flattenNestedArrayErrors, sn as getErrorBody, _r as getFormValue, It as getRouteAccess, xn as getRowById, xr as hasUploadValues, Xt as isAbortError, ri as nestedFieldPath, hn as parseDjangoDRFFormErrors, gn as parseDotNetFormErrors, _n as parseNodeFormErrors, Lt as partitionAdminRoutes, Dr as prepareFormSubmitBody, ln as resolveErrorBody, vr as setFormValue, An as toDjangoRestOrdering, Er as toFormData, Mn as toJsonApiSort, jn as toODataOrderBy, Ir as useAbortableEffect, lt as useAuth, ht as useCan, Yi as useChoices, Kt as useDataProvider, qr as useListQueryState, X as usePermissions, ur as useRegisterPayloadField, dr as useRegisterSectionField, Yr as useResourceListContext, Ze as useThemeMode };
4495
+ export { Kt as AdminApp, Pt as AdminLayout, Bn as AppHub, Vn as AppLauncherButton, Ze as AppThemeProvider, In as AuthAlternateLink, Ln as AuthPageLayout, lt as AuthProvider, ma as BooleanColumn, Ci as BooleanField, Ca as BooleanFilter, xa as CustomColumn, Xn as DEFAULT_TEXT_FILTER_DEBOUNCE_MS, Jt as DataProvider, ha as DateColumn, ki as DateField, wa as DateFilter, Ai as DateTimeField, et as DensitySwitch, en as EXPECTED_VALIDATION_BODY_HINT, $ as FieldWrapper, ua as FileField, ii as FilterBar, _i as FormStep, yi as FormSteps, mi as FormTab, gi as FormTabs, Ft as Guard, Lt as GuestOnly, ba as ImageColumn, ca as ImageField, li as InlineFormSet, ui as InlineFormSetStacked, Rn as LoginPage, pa as NumberColumn, Si as NumberField, Sa as NumberFilter, Ii as PasswordField, mt as PermissionsProvider, zn as PlaceholderPage, It as Protected, _a as ReferenceColumn, ta as ReferenceField, Da as ReferenceFilter, ya as ReferenceManyColumn, ra as ReferenceManyField, Oa as ReferenceManyFilter, Rt as RequirePermission, ai as ResourceForm, Ur as ResourceFormModal, ni as ResourceList, Pi as SelectField, Ta as SelectFilter, xi as TextAreaField, da as TextColumn, bi as TextField, $n as TextFilter, nt as ThemeSwitch, rt as ThemeToolbar, Ni as TimeField, kn as applyInMemoryListParams, Q as asStringMessages, Sr as buildFormPayload, Cr as buildInlineRowsPayload, jr as buildResourceFormSubmitBody, Qt as combineResourceHandlers, Gt as createAdminRouter, An as createMemoryResourceHandlers, ht as createPermissionsChecker, jn as createRestResourceHandlers, ft as createSessionStorageAuthAdapter, Ut as deriveAuthPaths, sn as describeNonStandardValidationBody, bt as filterFlatNavItems, wt as filterNavByPermission, vt as filterNavItems, Dn as filterRows, hn as finalizeFormErrors, yt as flattenNavLeaves, mn as flattenNestedArrayErrors, un as getErrorBody, br as getFormValue, _t as getNavItemLabel, zt as getRouteAccess, wn as getRowById, wr as hasUploadValues, $t as isAbortError, oi as nestedFieldPath, vn as parseDjangoDRFFormErrors, yn as parseDotNetFormErrors, bn as parseNodeFormErrors, Bt as partitionAdminRoutes, Ar as prepareFormSubmitBody, fn as resolveErrorBody, xr as setFormValue, Nn as toDjangoRestOrdering, kr as toFormData, Fn as toJsonApiSort, Pn as toODataOrderBy, zr as useAbortableEffect, ut as useAuth, gt as useCan, Qi as useChoices, Yt as useDataProvider, Xr as useListQueryState, X as usePermissions, pr as useRegisterPayloadField, mr as useRegisterSectionField, Qr as useResourceListContext, Qe as useThemeMode };