sera-components 1.1.10 → 1.1.11

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,15 +1,16 @@
1
- var gt = Object.defineProperty;
2
- var ht = (e, s, n) => s in e ? gt(e, s, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[s] = n;
3
- var q = (e, s, n) => ht(e, typeof s != "symbol" ? s + "" : s, n);
4
- import ft, { createContext as mt, useContext as le, useMemo as S, useState as _, useEffect as ce } from "react";
5
- import { Paper as U, Image as xt, Text as p, Menu as G, Button as D, Container as jt, Alert as be, Stack as ee, Flex as z, Loader as ae, NavLink as Ee, Checkbox as Q, Group as A, Input as M, useCombobox as Be, Combobox as E, Grid as I, InputBase as vt, PasswordInput as bt, CloseButton as yt, Divider as pt, Tooltip as Ue, Fieldset as St, Table as Ve, rem as J, Pagination as wt, MenuTarget as Ct, MenuDropdown as Rt, MenuItem as Tt, Tabs as re } from "@mantine/core";
6
- import { IconCheck as kt, IconInfoCircle as ye, IconChevronRight as Nt, IconSearch as Ge, IconHelpOctagonFilled as Ye, IconPlus as Et, IconPencil as It, IconReload as _t, IconDatabaseImport as Ft, IconDownload as At, IconSelector as Ot } from "@tabler/icons-react";
7
- import { observer as B } from "mobx-react-lite";
8
- import { useNavigate as We, useLocation as Pt, InternalLink as He } from "sera-route";
9
- import { isObjectProperty as W, isDraftRecord as Je } from "sera-db";
10
- import { IMaskInput as Lt } from "react-imask";
11
- import { flexRender as Ie, useReactTable as Ze, getCoreRowModel as Xe, getPaginationRowModel as zt } from "@tanstack/react-table";
12
- var oe = { exports: {} }, Z = {};
1
+ var on = Object.defineProperty;
2
+ var ln = (e, n, t) => n in e ? on(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
+ var X = (e, n, t) => ln(e, typeof n != "symbol" ? n + "" : n, t);
4
+ import * as f from "react";
5
+ import sn, { createContext as un, useContext as ke, useMemo as k, useState as _, useEffect as Te } from "react";
6
+ import { Paper as re, Image as cn, Text as E, Menu as ie, Button as q, Container as dn, Alert as qe, Stack as ge, Flex as B, Loader as Re, NavLink as it, Checkbox as me, Group as D, Input as W, useCombobox as St, Combobox as F, Grid as A, InputBase as fn, PasswordInput as hn, CloseButton as mn, Divider as gn, Tooltip as Ct, Fieldset as pn, Table as Rt, rem as ce, Pagination as xn, MenuTarget as vn, MenuDropdown as yn, MenuItem as bn, Tabs as ve } from "@mantine/core";
7
+ import { IconCheck as wn, IconInfoCircle as We, IconChevronRight as jn, IconSearch as Et, IconHelpOctagonFilled as kt, IconPlus as Sn, IconPencil as Cn, IconReload as Rn, IconDatabaseImport as En, IconDownload as kn, IconSelector as Tn } from "@tabler/icons-react";
8
+ import { observer as ee } from "mobx-react-lite";
9
+ import { isObjectProperty as se, isDraftRecord as Tt } from "sera-db";
10
+ import { InternalLink as Nt } from "sera-route";
11
+ import { IMaskInput as Nn } from "react-imask";
12
+ import { flexRender as lt, useReactTable as Pt, getCoreRowModel as It, getPaginationRowModel as Pn } from "@tanstack/react-table";
13
+ var ye = { exports: {} }, de = {};
13
14
  /**
14
15
  * @license React
15
16
  * react-jsx-runtime.production.js
@@ -19,29 +20,29 @@ var oe = { exports: {} }, Z = {};
19
20
  * This source code is licensed under the MIT license found in the
20
21
  * LICENSE file in the root directory of this source tree.
21
22
  */
22
- var _e;
23
- function Dt() {
24
- if (_e) return Z;
25
- _e = 1;
26
- var e = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
27
- function n(o, r, i) {
28
- var a = null;
29
- if (i !== void 0 && (a = "" + i), r.key !== void 0 && (a = "" + r.key), "key" in r) {
30
- i = {};
31
- for (var c in r)
32
- c !== "key" && (i[c] = r[c]);
33
- } else i = r;
34
- return r = i.ref, {
23
+ var st;
24
+ function In() {
25
+ if (st) return de;
26
+ st = 1;
27
+ var e = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
28
+ function t(a, r, o) {
29
+ var l = null;
30
+ if (o !== void 0 && (l = "" + o), r.key !== void 0 && (l = "" + r.key), "key" in r) {
31
+ o = {};
32
+ for (var s in r)
33
+ s !== "key" && (o[s] = r[s]);
34
+ } else o = r;
35
+ return r = o.ref, {
35
36
  $$typeof: e,
36
- type: o,
37
- key: a,
37
+ type: a,
38
+ key: l,
38
39
  ref: r !== void 0 ? r : null,
39
- props: i
40
+ props: o
40
41
  };
41
42
  }
42
- return Z.Fragment = s, Z.jsx = n, Z.jsxs = n, Z;
43
+ return de.Fragment = n, de.jsx = t, de.jsxs = t, de;
43
44
  }
44
- var X = {};
45
+ var fe = {};
45
46
  /**
46
47
  * @license React
47
48
  * react-jsx-runtime.development.js
@@ -51,245 +52,245 @@ var X = {};
51
52
  * This source code is licensed under the MIT license found in the
52
53
  * LICENSE file in the root directory of this source tree.
53
54
  */
54
- var Fe;
55
- function Mt() {
56
- return Fe || (Fe = 1, process.env.NODE_ENV !== "production" && function() {
57
- function e(l) {
58
- if (l == null) return null;
59
- if (typeof l == "function")
60
- return l.$$typeof === ct ? null : l.displayName || l.name || null;
61
- if (typeof l == "string") return l;
62
- switch (l) {
63
- case u:
55
+ var ut;
56
+ function Ln() {
57
+ return ut || (ut = 1, process.env.NODE_ENV !== "production" && function() {
58
+ function e(m) {
59
+ if (m == null) return null;
60
+ if (typeof m == "function")
61
+ return m.$$typeof === G ? null : m.displayName || m.name || null;
62
+ if (typeof m == "string") return m;
63
+ switch (m) {
64
+ case h:
64
65
  return "Fragment";
65
- case O:
66
+ case b:
66
67
  return "Profiler";
67
- case C:
68
+ case j:
68
69
  return "StrictMode";
69
70
  case R:
70
71
  return "Suspense";
71
- case ne:
72
+ case U:
72
73
  return "SuspenseList";
73
- case lt:
74
+ case $:
74
75
  return "Activity";
75
76
  }
76
- if (typeof l == "object")
77
- switch (typeof l.tag == "number" && console.error(
77
+ if (typeof m == "object")
78
+ switch (typeof m.tag == "number" && console.error(
78
79
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
79
- ), l.$$typeof) {
80
+ ), m.$$typeof) {
80
81
  case v:
81
82
  return "Portal";
82
- case f:
83
- return (l.displayName || "Context") + ".Provider";
84
- case P:
85
- return (l._context.displayName || "Context") + ".Consumer";
86
- case b:
87
- var j = l.render;
88
- return l = l.displayName, l || (l = j.displayName || j.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
89
- case H:
90
- return j = l.displayName || null, j !== null ? j : e(l.type) || "Memo";
91
- case Se:
92
- j = l._payload, l = l._init;
83
+ case y:
84
+ return (m.displayName || "Context") + ".Provider";
85
+ case C:
86
+ return (m._context.displayName || "Context") + ".Consumer";
87
+ case w:
88
+ var S = m.render;
89
+ return m = m.displayName, m || (m = S.displayName || S.name || "", m = m !== "" ? "ForwardRef(" + m + ")" : "ForwardRef"), m;
90
+ case M:
91
+ return S = m.displayName || null, S !== null ? S : e(m.type) || "Memo";
92
+ case ne:
93
+ S = m._payload, m = m._init;
93
94
  try {
94
- return e(l(j));
95
+ return e(m(S));
95
96
  } catch {
96
97
  }
97
98
  }
98
99
  return null;
99
100
  }
100
- function s(l) {
101
- return "" + l;
101
+ function n(m) {
102
+ return "" + m;
102
103
  }
103
- function n(l) {
104
+ function t(m) {
104
105
  try {
105
- s(l);
106
- var j = !1;
106
+ n(m);
107
+ var S = !1;
107
108
  } catch {
108
- j = !0;
109
+ S = !0;
109
110
  }
110
- if (j) {
111
- j = console;
112
- var w = j.error, k = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
113
- return w.call(
114
- j,
111
+ if (S) {
112
+ S = console;
113
+ var T = S.error, I = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
114
+ return T.call(
115
+ S,
115
116
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
116
- k
117
- ), s(l);
117
+ I
118
+ ), n(m);
118
119
  }
119
120
  }
120
- function o(l) {
121
- if (l === u) return "<>";
122
- if (typeof l == "object" && l !== null && l.$$typeof === Se)
121
+ function a(m) {
122
+ if (m === h) return "<>";
123
+ if (typeof m == "object" && m !== null && m.$$typeof === ne)
123
124
  return "<...>";
124
125
  try {
125
- var j = e(l);
126
- return j ? "<" + j + ">" : "<...>";
126
+ var S = e(m);
127
+ return S ? "<" + S + ">" : "<...>";
127
128
  } catch {
128
129
  return "<...>";
129
130
  }
130
131
  }
131
132
  function r() {
132
- var l = ge.A;
133
- return l === null ? null : l.getOwner();
133
+ var m = ae.A;
134
+ return m === null ? null : m.getOwner();
134
135
  }
135
- function i() {
136
+ function o() {
136
137
  return Error("react-stack-top-frame");
137
138
  }
138
- function a(l) {
139
- if (we.call(l, "key")) {
140
- var j = Object.getOwnPropertyDescriptor(l, "key").get;
141
- if (j && j.isReactWarning) return !1;
139
+ function l(m) {
140
+ if (et.call(m, "key")) {
141
+ var S = Object.getOwnPropertyDescriptor(m, "key").get;
142
+ if (S && S.isReactWarning) return !1;
142
143
  }
143
- return l.key !== void 0;
144
+ return m.key !== void 0;
144
145
  }
145
- function c(l, j) {
146
- function w() {
147
- Ce || (Ce = !0, console.error(
146
+ function s(m, S) {
147
+ function T() {
148
+ tt || (tt = !0, console.error(
148
149
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
149
- j
150
+ S
150
151
  ));
151
152
  }
152
- w.isReactWarning = !0, Object.defineProperty(l, "key", {
153
- get: w,
153
+ T.isReactWarning = !0, Object.defineProperty(m, "key", {
154
+ get: T,
154
155
  configurable: !0
155
156
  });
156
157
  }
157
- function d() {
158
- var l = e(this.type);
159
- return Re[l] || (Re[l] = !0, console.error(
158
+ function u() {
159
+ var m = e(this.type);
160
+ return nt[m] || (nt[m] = !0, console.error(
160
161
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
161
- )), l = this.props.ref, l !== void 0 ? l : null;
162
+ )), m = this.props.ref, m !== void 0 ? m : null;
162
163
  }
163
- function h(l, j, w, k, $, L, fe, me) {
164
- return w = L.ref, l = {
165
- $$typeof: g,
166
- type: l,
167
- key: j,
168
- props: L,
169
- _owner: $
170
- }, (w !== void 0 ? w : null) !== null ? Object.defineProperty(l, "ref", {
164
+ function c(m, S, T, I, J, z, _e, $e) {
165
+ return T = z.ref, m = {
166
+ $$typeof: p,
167
+ type: m,
168
+ key: S,
169
+ props: z,
170
+ _owner: J
171
+ }, (T !== void 0 ? T : null) !== null ? Object.defineProperty(m, "ref", {
171
172
  enumerable: !1,
172
- get: d
173
- }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
173
+ get: u
174
+ }) : Object.defineProperty(m, "ref", { enumerable: !1, value: null }), m._store = {}, Object.defineProperty(m._store, "validated", {
174
175
  configurable: !1,
175
176
  enumerable: !1,
176
177
  writable: !0,
177
178
  value: 0
178
- }), Object.defineProperty(l, "_debugInfo", {
179
+ }), Object.defineProperty(m, "_debugInfo", {
179
180
  configurable: !1,
180
181
  enumerable: !1,
181
182
  writable: !0,
182
183
  value: null
183
- }), Object.defineProperty(l, "_debugStack", {
184
+ }), Object.defineProperty(m, "_debugStack", {
184
185
  configurable: !1,
185
186
  enumerable: !1,
186
187
  writable: !0,
187
- value: fe
188
- }), Object.defineProperty(l, "_debugTask", {
188
+ value: _e
189
+ }), Object.defineProperty(m, "_debugTask", {
189
190
  configurable: !1,
190
191
  enumerable: !1,
191
192
  writable: !0,
192
- value: me
193
- }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
193
+ value: $e
194
+ }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
194
195
  }
195
- function m(l, j, w, k, $, L, fe, me) {
196
- var N = j.children;
197
- if (N !== void 0)
198
- if (k)
199
- if (dt(N)) {
200
- for (k = 0; k < N.length; k++)
201
- y(N[k]);
202
- Object.freeze && Object.freeze(N);
196
+ function d(m, S, T, I, J, z, _e, $e) {
197
+ var L = S.children;
198
+ if (L !== void 0)
199
+ if (I)
200
+ if (rn(L)) {
201
+ for (I = 0; I < L.length; I++)
202
+ x(L[I]);
203
+ Object.freeze && Object.freeze(L);
203
204
  } else
204
205
  console.error(
205
206
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
206
207
  );
207
- else y(N);
208
- if (we.call(j, "key")) {
209
- N = e(l);
210
- var V = Object.keys(j).filter(function(ut) {
211
- return ut !== "key";
208
+ else x(L);
209
+ if (et.call(S, "key")) {
210
+ L = e(m);
211
+ var oe = Object.keys(S).filter(function(an) {
212
+ return an !== "key";
212
213
  });
213
- k = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", Ne[N + k] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
214
+ I = 0 < oe.length ? "{key: someKey, " + oe.join(": ..., ") + ": ...}" : "{key: someKey}", ot[L + I] || (oe = 0 < oe.length ? "{" + oe.join(": ..., ") + ": ...}" : "{}", console.error(
214
215
  `A props object containing a "key" prop is being spread into JSX:
215
216
  let props = %s;
216
217
  <%s {...props} />
217
218
  React keys must be passed directly to JSX without using spread:
218
219
  let props = %s;
219
220
  <%s key={someKey} {...props} />`,
220
- k,
221
- N,
222
- V,
223
- N
224
- ), Ne[N + k] = !0);
221
+ I,
222
+ L,
223
+ oe,
224
+ L
225
+ ), ot[L + I] = !0);
225
226
  }
226
- if (N = null, w !== void 0 && (n(w), N = "" + w), a(j) && (n(j.key), N = "" + j.key), "key" in j) {
227
- w = {};
228
- for (var xe in j)
229
- xe !== "key" && (w[xe] = j[xe]);
230
- } else w = j;
231
- return N && c(
232
- w,
233
- typeof l == "function" ? l.displayName || l.name || "Unknown" : l
234
- ), h(
235
- l,
236
- N,
227
+ if (L = null, T !== void 0 && (t(T), L = "" + T), l(S) && (t(S.key), L = "" + S.key), "key" in S) {
228
+ T = {};
229
+ for (var Oe in S)
230
+ Oe !== "key" && (T[Oe] = S[Oe]);
231
+ } else T = S;
232
+ return L && s(
233
+ T,
234
+ typeof m == "function" ? m.displayName || m.name || "Unknown" : m
235
+ ), c(
236
+ m,
237
237
  L,
238
- $,
238
+ z,
239
+ J,
239
240
  r(),
240
- w,
241
- fe,
242
- me
241
+ T,
242
+ _e,
243
+ $e
243
244
  );
244
245
  }
245
- function y(l) {
246
- typeof l == "object" && l !== null && l.$$typeof === g && l._store && (l._store.validated = 1);
246
+ function x(m) {
247
+ typeof m == "object" && m !== null && m.$$typeof === p && m._store && (m._store.validated = 1);
247
248
  }
248
- var x = ft, g = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), O = Symbol.for("react.profiler"), P = Symbol.for("react.consumer"), f = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), ne = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), Se = Symbol.for("react.lazy"), lt = Symbol.for("react.activity"), ct = Symbol.for("react.client.reference"), ge = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, we = Object.prototype.hasOwnProperty, dt = Array.isArray, he = console.createTask ? console.createTask : function() {
249
+ var g = sn, p = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), j = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), C = Symbol.for("react.consumer"), y = Symbol.for("react.context"), w = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), U = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), ne = Symbol.for("react.lazy"), $ = Symbol.for("react.activity"), G = Symbol.for("react.client.reference"), ae = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, et = Object.prototype.hasOwnProperty, rn = Array.isArray, Ae = console.createTask ? console.createTask : function() {
249
250
  return null;
250
251
  };
251
- x = {
252
- react_stack_bottom_frame: function(l) {
253
- return l();
252
+ g = {
253
+ react_stack_bottom_frame: function(m) {
254
+ return m();
254
255
  }
255
256
  };
256
- var Ce, Re = {}, Te = x.react_stack_bottom_frame.bind(
257
- x,
258
- i
259
- )(), ke = he(o(i)), Ne = {};
260
- X.Fragment = u, X.jsx = function(l, j, w, k, $) {
261
- var L = 1e4 > ge.recentlyCreatedOwnerStacks++;
262
- return m(
263
- l,
264
- j,
265
- w,
257
+ var tt, nt = {}, rt = g.react_stack_bottom_frame.bind(
258
+ g,
259
+ o
260
+ )(), at = Ae(a(o)), ot = {};
261
+ fe.Fragment = h, fe.jsx = function(m, S, T, I, J) {
262
+ var z = 1e4 > ae.recentlyCreatedOwnerStacks++;
263
+ return d(
264
+ m,
265
+ S,
266
+ T,
266
267
  !1,
267
- k,
268
- $,
269
- L ? Error("react-stack-top-frame") : Te,
270
- L ? he(o(l)) : ke
268
+ I,
269
+ J,
270
+ z ? Error("react-stack-top-frame") : rt,
271
+ z ? Ae(a(m)) : at
271
272
  );
272
- }, X.jsxs = function(l, j, w, k, $) {
273
- var L = 1e4 > ge.recentlyCreatedOwnerStacks++;
274
- return m(
275
- l,
276
- j,
277
- w,
273
+ }, fe.jsxs = function(m, S, T, I, J) {
274
+ var z = 1e4 > ae.recentlyCreatedOwnerStacks++;
275
+ return d(
276
+ m,
277
+ S,
278
+ T,
278
279
  !0,
279
- k,
280
- $,
281
- L ? Error("react-stack-top-frame") : Te,
282
- L ? he(o(l)) : ke
280
+ I,
281
+ J,
282
+ z ? Error("react-stack-top-frame") : rt,
283
+ z ? Ae(a(m)) : at
283
284
  );
284
285
  };
285
- }()), X;
286
+ }()), fe;
286
287
  }
287
- var Ae;
288
- function $t() {
289
- return Ae || (Ae = 1, process.env.NODE_ENV === "production" ? oe.exports = Dt() : oe.exports = Mt()), oe.exports;
288
+ var ct;
289
+ function Fn() {
290
+ return ct || (ct = 1, process.env.NODE_ENV === "production" ? ye.exports = In() : ye.exports = Ln()), ye.exports;
290
291
  }
291
- var t = $t();
292
- const T = {
292
+ var i = Fn();
293
+ const N = {
293
294
  UK: {
294
295
  svgFlag: "https://flagcdn.com/gb.svg",
295
296
  emojiFlag: "🇬🇧"
@@ -350,72 +351,1339 @@ const T = {
350
351
  svgFlag: "https://flagcdn.com/in.svg",
351
352
  emojiFlag: "🇮🇳"
352
353
  }
353
- }, qt = ({ flag: e }) => /* @__PURE__ */ t.jsx(U, { shadow: "xs", w: 20, h: 14, children: /* @__PURE__ */ t.jsx(xt, { src: e.svgFlag, w: 20, h: 14, fit: "cover" }) }), Kt = ({ flag: e }) => /* @__PURE__ */ t.jsx(
354
- p,
354
+ }, An = ({ flag: e }) => /* @__PURE__ */ i.jsx(re, { shadow: "xs", w: 20, h: 14, children: /* @__PURE__ */ i.jsx(cn, { src: e.svgFlag, w: 20, h: 14, fit: "cover" }) }), _n = ({ flag: e }) => /* @__PURE__ */ i.jsx(
355
+ E,
355
356
  {
356
357
  component: "span",
357
- style: (s) => ({ textShadow: s.shadows.xs }),
358
+ style: (n) => ({ textShadow: n.shadows.xs }),
358
359
  children: e.emojiFlag
359
360
  }
360
- ), ve = navigator.userAgent.includes("Windows") ? qt : Kt, te = mt(new Intl.Locale("en-US")), Un = B(
361
+ ), Be = navigator.userAgent.includes("Windows") ? An : _n, pe = un(new Intl.Locale("en-US")), Xa = ee(
361
362
  ({
362
363
  value: e,
363
- children: s
364
- }) => /* @__PURE__ */ t.jsx(te.Provider, { value: e.locale, children: s })
365
- ), Bt = {
364
+ children: n
365
+ }) => /* @__PURE__ */ i.jsx(pe.Provider, { value: e.locale, children: n })
366
+ ), $n = {
366
367
  lang2value: {
367
368
  en: "Choose Language",
368
369
  vi: "Chọn ngôn ngữ"
369
370
  }
370
- }, se = {
371
+ }, be = {
371
372
  en: {
372
373
  name: "English",
373
- flag: T.US,
374
+ flag: N.US,
374
375
  locale: new Intl.Locale("en-US")
375
376
  },
376
377
  vi: {
377
378
  name: "Tiếng Việt",
378
- flag: T.VN,
379
+ flag: N.VN,
379
380
  locale: new Intl.Locale("vi-VN")
380
381
  }
381
- }, Vn = ({
382
+ }, Za = ({
382
383
  locale: e,
383
- setLocale: s
384
+ setLocale: n
384
385
  }) => {
385
- const n = S(() => Object.entries(se).map(
386
- ([o, { flag: r, name: i, locale: a }]) => /* @__PURE__ */ t.jsx(
387
- G.Item,
386
+ const t = k(() => Object.entries(be).map(
387
+ ([a, { flag: r, name: o, locale: l }]) => /* @__PURE__ */ i.jsx(
388
+ ie.Item,
388
389
  {
389
- onClick: () => s(a),
390
- leftSection: /* @__PURE__ */ t.jsx(ve, { flag: r }),
391
- rightSection: e.language === o && /* @__PURE__ */ t.jsx(kt, { size: "15", color: "#2986cc", stroke: 2 }),
392
- children: /* @__PURE__ */ t.jsx(p, { size: "sm", children: i })
390
+ onClick: () => n(l),
391
+ leftSection: /* @__PURE__ */ i.jsx(Be, { flag: r }),
392
+ rightSection: e.language === a && /* @__PURE__ */ i.jsx(wn, { size: "15", color: "#2986cc", stroke: 2 }),
393
+ children: /* @__PURE__ */ i.jsx(E, { size: "sm", children: o })
393
394
  },
394
- o
395
+ a
395
396
  )
396
- ), [se, e]);
397
- return /* @__PURE__ */ t.jsxs(G, { width: 170, children: [
398
- /* @__PURE__ */ t.jsx(G.Target, { children: /* @__PURE__ */ t.jsx(
399
- D,
397
+ ), [be, e]);
398
+ return /* @__PURE__ */ i.jsxs(ie, { width: 170, children: [
399
+ /* @__PURE__ */ i.jsx(ie.Target, { children: /* @__PURE__ */ i.jsx(
400
+ q,
400
401
  {
401
402
  variant: "subtle",
402
403
  size: "sm",
403
- leftSection: /* @__PURE__ */ t.jsx(ve, { flag: se[e.language].flag }),
404
- children: /* @__PURE__ */ t.jsx(p, { size: "sm", children: se[e.language].name })
404
+ leftSection: /* @__PURE__ */ i.jsx(Be, { flag: be[e.language].flag }),
405
+ children: /* @__PURE__ */ i.jsx(E, { size: "sm", children: be[e.language].name })
405
406
  }
406
407
  ) }),
407
- /* @__PURE__ */ t.jsxs(G.Dropdown, { children: [
408
- /* @__PURE__ */ t.jsx(G.Label, { children: /* @__PURE__ */ t.jsx(p, { size: "sm", children: Bt.lang2value[e.language] }) }),
409
- n
408
+ /* @__PURE__ */ i.jsxs(ie.Dropdown, { children: [
409
+ /* @__PURE__ */ i.jsx(ie.Label, { children: /* @__PURE__ */ i.jsx(E, { size: "sm", children: $n.lang2value[e.language] }) }),
410
+ t
410
411
  ] })
411
412
  ] });
412
- }, F = ({ value: e }) => {
413
- const s = le(te);
414
- return e.lang2value[s.language] || e.lang2value[e.lang];
415
- }, Gn = ({ message: e }) => {
416
- const s = We();
417
- return /* @__PURE__ */ t.jsx(
418
- jt,
413
+ }, O = ({ value: e }) => {
414
+ const n = ke(pe);
415
+ return e.lang2value[n.language] || e.lang2value[e.lang];
416
+ };
417
+ /**
418
+ * react-router v7.7.1
419
+ *
420
+ * Copyright (c) Remix Software Inc.
421
+ *
422
+ * This source code is licensed under the MIT license found in the
423
+ * LICENSE.md file in the root directory of this source tree.
424
+ *
425
+ * @license MIT
426
+ */
427
+ function P(e, n) {
428
+ if (e === !1 || e === null || typeof e > "u")
429
+ throw new Error(n);
430
+ }
431
+ function V(e, n) {
432
+ if (!e) {
433
+ typeof console < "u" && console.warn(n);
434
+ try {
435
+ throw new Error(n);
436
+ } catch {
437
+ }
438
+ }
439
+ }
440
+ function Ue({
441
+ pathname: e = "/",
442
+ search: n = "",
443
+ hash: t = ""
444
+ }) {
445
+ return n && n !== "?" && (e += n.charAt(0) === "?" ? n : "?" + n), t && t !== "#" && (e += t.charAt(0) === "#" ? t : "#" + t), e;
446
+ }
447
+ function Ke(e) {
448
+ let n = {};
449
+ if (e) {
450
+ let t = e.indexOf("#");
451
+ t >= 0 && (n.hash = e.substring(t), e = e.substring(0, t));
452
+ let a = e.indexOf("?");
453
+ a >= 0 && (n.search = e.substring(a), e = e.substring(0, a)), e && (n.pathname = e);
454
+ }
455
+ return n;
456
+ }
457
+ function Lt(e, n, t = "/") {
458
+ return On(e, n, t, !1);
459
+ }
460
+ function On(e, n, t, a) {
461
+ let r = typeof n == "string" ? Ke(n) : n, o = Z(r.pathname || "/", t);
462
+ if (o == null)
463
+ return null;
464
+ let l = Ft(e);
465
+ Dn(l);
466
+ let s = null;
467
+ for (let u = 0; s == null && u < l.length; ++u) {
468
+ let c = Gn(o);
469
+ s = Hn(
470
+ l[u],
471
+ c,
472
+ a
473
+ );
474
+ }
475
+ return s;
476
+ }
477
+ function Ft(e, n = [], t = [], a = "") {
478
+ let r = (o, l, s) => {
479
+ let u = {
480
+ relativePath: s === void 0 ? o.path || "" : s,
481
+ caseSensitive: o.caseSensitive === !0,
482
+ childrenIndex: l,
483
+ route: o
484
+ };
485
+ u.relativePath.startsWith("/") && (P(
486
+ u.relativePath.startsWith(a),
487
+ `Absolute route path "${u.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
488
+ ), u.relativePath = u.relativePath.slice(a.length));
489
+ let c = K([a, u.relativePath]), d = t.concat(u);
490
+ o.children && o.children.length > 0 && (P(
491
+ // Our types know better, but runtime JS may not!
492
+ // @ts-expect-error
493
+ o.index !== !0,
494
+ `Index routes must not have child routes. Please remove all child routes from route path "${c}".`
495
+ ), Ft(o.children, n, d, c)), !(o.path == null && !o.index) && n.push({
496
+ path: c,
497
+ score: Kn(c, o.index),
498
+ routesMeta: d
499
+ });
500
+ };
501
+ return e.forEach((o, l) => {
502
+ var s;
503
+ if (o.path === "" || !((s = o.path) != null && s.includes("?")))
504
+ r(o, l);
505
+ else
506
+ for (let u of At(o.path))
507
+ r(o, l, u);
508
+ }), n;
509
+ }
510
+ function At(e) {
511
+ let n = e.split("/");
512
+ if (n.length === 0) return [];
513
+ let [t, ...a] = n, r = t.endsWith("?"), o = t.replace(/\?$/, "");
514
+ if (a.length === 0)
515
+ return r ? [o, ""] : [o];
516
+ let l = At(a.join("/")), s = [];
517
+ return s.push(
518
+ ...l.map(
519
+ (u) => u === "" ? o : [o, u].join("/")
520
+ )
521
+ ), r && s.push(...l), s.map(
522
+ (u) => e.startsWith("/") && u === "" ? "/" : u
523
+ );
524
+ }
525
+ function Dn(e) {
526
+ e.sort(
527
+ (n, t) => n.score !== t.score ? t.score - n.score : Vn(
528
+ n.routesMeta.map((a) => a.childrenIndex),
529
+ t.routesMeta.map((a) => a.childrenIndex)
530
+ )
531
+ );
532
+ }
533
+ var Mn = /^:[\w-]+$/, zn = 3, Bn = 2, Un = 1, qn = 10, Wn = -2, dt = (e) => e === "*";
534
+ function Kn(e, n) {
535
+ let t = e.split("/"), a = t.length;
536
+ return t.some(dt) && (a += Wn), n && (a += Bn), t.filter((r) => !dt(r)).reduce(
537
+ (r, o) => r + (Mn.test(o) ? zn : o === "" ? Un : qn),
538
+ a
539
+ );
540
+ }
541
+ function Vn(e, n) {
542
+ return e.length === n.length && e.slice(0, -1).every((a, r) => a === n[r]) ? (
543
+ // If two routes are siblings, we should try to match the earlier sibling
544
+ // first. This allows people to have fine-grained control over the matching
545
+ // behavior by simply putting routes with identical paths in the order they
546
+ // want them tried.
547
+ e[e.length - 1] - n[n.length - 1]
548
+ ) : (
549
+ // Otherwise, it doesn't really make sense to rank non-siblings by index,
550
+ // so they sort equally.
551
+ 0
552
+ );
553
+ }
554
+ function Hn(e, n, t = !1) {
555
+ let { routesMeta: a } = e, r = {}, o = "/", l = [];
556
+ for (let s = 0; s < a.length; ++s) {
557
+ let u = a[s], c = s === a.length - 1, d = o === "/" ? n : n.slice(o.length) || "/", x = Ee(
558
+ { path: u.relativePath, caseSensitive: u.caseSensitive, end: c },
559
+ d
560
+ ), g = u.route;
561
+ if (!x && c && t && !a[a.length - 1].route.index && (x = Ee(
562
+ {
563
+ path: u.relativePath,
564
+ caseSensitive: u.caseSensitive,
565
+ end: !1
566
+ },
567
+ d
568
+ )), !x)
569
+ return null;
570
+ Object.assign(r, x.params), l.push({
571
+ // TODO: Can this as be avoided?
572
+ params: r,
573
+ pathname: K([o, x.pathname]),
574
+ pathnameBase: Qn(
575
+ K([o, x.pathnameBase])
576
+ ),
577
+ route: g
578
+ }), x.pathnameBase !== "/" && (o = K([o, x.pathnameBase]));
579
+ }
580
+ return l;
581
+ }
582
+ function Ee(e, n) {
583
+ typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
584
+ let [t, a] = Yn(
585
+ e.path,
586
+ e.caseSensitive,
587
+ e.end
588
+ ), r = n.match(t);
589
+ if (!r) return null;
590
+ let o = r[0], l = o.replace(/(.)\/+$/, "$1"), s = r.slice(1);
591
+ return {
592
+ params: a.reduce(
593
+ (c, { paramName: d, isOptional: x }, g) => {
594
+ if (d === "*") {
595
+ let v = s[g] || "";
596
+ l = o.slice(0, o.length - v.length).replace(/(.)\/+$/, "$1");
597
+ }
598
+ const p = s[g];
599
+ return x && !p ? c[d] = void 0 : c[d] = (p || "").replace(/%2F/g, "/"), c;
600
+ },
601
+ {}
602
+ ),
603
+ pathname: o,
604
+ pathnameBase: l,
605
+ pattern: e
606
+ };
607
+ }
608
+ function Yn(e, n = !1, t = !0) {
609
+ V(
610
+ e === "*" || !e.endsWith("*") || e.endsWith("/*"),
611
+ `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`
612
+ );
613
+ let a = [], r = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
614
+ /\/:([\w-]+)(\?)?/g,
615
+ (l, s, u) => (a.push({ paramName: s, isOptional: u != null }), u ? "/?([^\\/]+)?" : "/([^\\/]+)")
616
+ );
617
+ return e.endsWith("*") ? (a.push({ paramName: "*" }), r += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : t ? r += "\\/*$" : e !== "" && e !== "/" && (r += "(?:(?=\\/|$))"), [new RegExp(r, n ? void 0 : "i"), a];
618
+ }
619
+ function Gn(e) {
620
+ try {
621
+ return e.split("/").map((n) => decodeURIComponent(n).replace(/\//g, "%2F")).join("/");
622
+ } catch (n) {
623
+ return V(
624
+ !1,
625
+ `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`
626
+ ), e;
627
+ }
628
+ }
629
+ function Z(e, n) {
630
+ if (n === "/") return e;
631
+ if (!e.toLowerCase().startsWith(n.toLowerCase()))
632
+ return null;
633
+ let t = n.endsWith("/") ? n.length - 1 : n.length, a = e.charAt(t);
634
+ return a && a !== "/" ? null : e.slice(t) || "/";
635
+ }
636
+ function Jn(e, n = "/") {
637
+ let {
638
+ pathname: t,
639
+ search: a = "",
640
+ hash: r = ""
641
+ } = typeof e == "string" ? Ke(e) : e;
642
+ return {
643
+ pathname: t ? t.startsWith("/") ? t : Xn(t, n) : n,
644
+ search: er(a),
645
+ hash: tr(r)
646
+ };
647
+ }
648
+ function Xn(e, n) {
649
+ let t = n.replace(/\/+$/, "").split("/");
650
+ return e.split("/").forEach((r) => {
651
+ r === ".." ? t.length > 1 && t.pop() : r !== "." && t.push(r);
652
+ }), t.length > 1 ? t.join("/") : "/";
653
+ }
654
+ function De(e, n, t, a) {
655
+ return `Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(
656
+ a
657
+ )}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
658
+ }
659
+ function Zn(e) {
660
+ return e.filter(
661
+ (n, t) => t === 0 || n.route.path && n.route.path.length > 0
662
+ );
663
+ }
664
+ function _t(e) {
665
+ let n = Zn(e);
666
+ return n.map(
667
+ (t, a) => a === n.length - 1 ? t.pathname : t.pathnameBase
668
+ );
669
+ }
670
+ function $t(e, n, t, a = !1) {
671
+ let r;
672
+ typeof e == "string" ? r = Ke(e) : (r = { ...e }, P(
673
+ !r.pathname || !r.pathname.includes("?"),
674
+ De("?", "pathname", "search", r)
675
+ ), P(
676
+ !r.pathname || !r.pathname.includes("#"),
677
+ De("#", "pathname", "hash", r)
678
+ ), P(
679
+ !r.search || !r.search.includes("#"),
680
+ De("#", "search", "hash", r)
681
+ ));
682
+ let o = e === "" || r.pathname === "", l = o ? "/" : r.pathname, s;
683
+ if (l == null)
684
+ s = t;
685
+ else {
686
+ let x = n.length - 1;
687
+ if (!a && l.startsWith("..")) {
688
+ let g = l.split("/");
689
+ for (; g[0] === ".."; )
690
+ g.shift(), x -= 1;
691
+ r.pathname = g.join("/");
692
+ }
693
+ s = x >= 0 ? n[x] : "/";
694
+ }
695
+ let u = Jn(r, s), c = l && l !== "/" && l.endsWith("/"), d = (o || l === ".") && t.endsWith("/");
696
+ return !u.pathname.endsWith("/") && (c || d) && (u.pathname += "/"), u;
697
+ }
698
+ var K = (e) => e.join("/").replace(/\/\/+/g, "/"), Qn = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), er = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, tr = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
699
+ function nr(e) {
700
+ return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
701
+ }
702
+ var Ot = [
703
+ "POST",
704
+ "PUT",
705
+ "PATCH",
706
+ "DELETE"
707
+ ];
708
+ new Set(
709
+ Ot
710
+ );
711
+ var rr = [
712
+ "GET",
713
+ ...Ot
714
+ ];
715
+ new Set(rr);
716
+ var ue = f.createContext(null);
717
+ ue.displayName = "DataRouter";
718
+ var Ne = f.createContext(null);
719
+ Ne.displayName = "DataRouterState";
720
+ f.createContext(!1);
721
+ var Dt = f.createContext({
722
+ isTransitioning: !1
723
+ });
724
+ Dt.displayName = "ViewTransition";
725
+ var ar = f.createContext(
726
+ /* @__PURE__ */ new Map()
727
+ );
728
+ ar.displayName = "Fetchers";
729
+ var or = f.createContext(null);
730
+ or.displayName = "Await";
731
+ var H = f.createContext(
732
+ null
733
+ );
734
+ H.displayName = "Navigation";
735
+ var Ve = f.createContext(
736
+ null
737
+ );
738
+ Ve.displayName = "Location";
739
+ var Y = f.createContext({
740
+ outlet: null,
741
+ matches: [],
742
+ isDataRoute: !1
743
+ });
744
+ Y.displayName = "Route";
745
+ var He = f.createContext(null);
746
+ He.displayName = "RouteError";
747
+ function ir(e, { relative: n } = {}) {
748
+ P(
749
+ Pe(),
750
+ // TODO: This error is probably because they somehow have 2 versions of the
751
+ // router loaded. We can help them understand how to avoid that.
752
+ "useHref() may be used only in the context of a <Router> component."
753
+ );
754
+ let { basename: t, navigator: a } = f.useContext(H), { hash: r, pathname: o, search: l } = xe(e, { relative: n }), s = o;
755
+ return t !== "/" && (s = o === "/" ? t : K([t, o])), a.createHref({ pathname: s, search: l, hash: r });
756
+ }
757
+ function Pe() {
758
+ return f.useContext(Ve) != null;
759
+ }
760
+ function te() {
761
+ return P(
762
+ Pe(),
763
+ // TODO: This error is probably because they somehow have 2 versions of the
764
+ // router loaded. We can help them understand how to avoid that.
765
+ "useLocation() may be used only in the context of a <Router> component."
766
+ ), f.useContext(Ve).location;
767
+ }
768
+ var Mt = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
769
+ function zt(e) {
770
+ f.useContext(H).static || f.useLayoutEffect(e);
771
+ }
772
+ function Ye() {
773
+ let { isDataRoute: e } = f.useContext(Y);
774
+ return e ? yr() : lr();
775
+ }
776
+ function lr() {
777
+ P(
778
+ Pe(),
779
+ // TODO: This error is probably because they somehow have 2 versions of the
780
+ // router loaded. We can help them understand how to avoid that.
781
+ "useNavigate() may be used only in the context of a <Router> component."
782
+ );
783
+ let e = f.useContext(ue), { basename: n, navigator: t } = f.useContext(H), { matches: a } = f.useContext(Y), { pathname: r } = te(), o = JSON.stringify(_t(a)), l = f.useRef(!1);
784
+ return zt(() => {
785
+ l.current = !0;
786
+ }), f.useCallback(
787
+ (u, c = {}) => {
788
+ if (V(l.current, Mt), !l.current) return;
789
+ if (typeof u == "number") {
790
+ t.go(u);
791
+ return;
792
+ }
793
+ let d = $t(
794
+ u,
795
+ JSON.parse(o),
796
+ r,
797
+ c.relative === "path"
798
+ );
799
+ e == null && n !== "/" && (d.pathname = d.pathname === "/" ? n : K([n, d.pathname])), (c.replace ? t.replace : t.push)(
800
+ d,
801
+ c.state,
802
+ c
803
+ );
804
+ },
805
+ [
806
+ n,
807
+ t,
808
+ o,
809
+ r,
810
+ e
811
+ ]
812
+ );
813
+ }
814
+ f.createContext(null);
815
+ function xe(e, { relative: n } = {}) {
816
+ let { matches: t } = f.useContext(Y), { pathname: a } = te(), r = JSON.stringify(_t(t));
817
+ return f.useMemo(
818
+ () => $t(
819
+ e,
820
+ JSON.parse(r),
821
+ a,
822
+ n === "path"
823
+ ),
824
+ [e, r, a, n]
825
+ );
826
+ }
827
+ function sr(e, n, t, a) {
828
+ P(
829
+ Pe(),
830
+ // TODO: This error is probably because they somehow have 2 versions of the
831
+ // router loaded. We can help them understand how to avoid that.
832
+ "useRoutes() may be used only in the context of a <Router> component."
833
+ );
834
+ let { navigator: r } = f.useContext(H), { matches: o } = f.useContext(Y), l = o[o.length - 1], s = l ? l.params : {}, u = l ? l.pathname : "/", c = l ? l.pathnameBase : "/", d = l && l.route;
835
+ {
836
+ let b = d && d.path || "";
837
+ Bt(
838
+ u,
839
+ !d || b.endsWith("*") || b.endsWith("*?"),
840
+ `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
841
+
842
+ Please change the parent <Route path="${b}"> to <Route path="${b === "/" ? "*" : `${b}/*`}">.`
843
+ );
844
+ }
845
+ let x = te(), g;
846
+ g = x;
847
+ let p = g.pathname || "/", v = p;
848
+ if (c !== "/") {
849
+ let b = c.replace(/^\//, "").split("/");
850
+ v = "/" + p.replace(/^\//, "").split("/").slice(b.length).join("/");
851
+ }
852
+ let h = Lt(e, { pathname: v });
853
+ return V(
854
+ d || h != null,
855
+ `No routes matched location "${g.pathname}${g.search}${g.hash}" `
856
+ ), V(
857
+ h == null || h[h.length - 1].route.element !== void 0 || h[h.length - 1].route.Component !== void 0 || h[h.length - 1].route.lazy !== void 0,
858
+ `Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
859
+ ), hr(
860
+ h && h.map(
861
+ (b) => Object.assign({}, b, {
862
+ params: Object.assign({}, s, b.params),
863
+ pathname: K([
864
+ c,
865
+ // Re-encode pathnames that were decoded inside matchRoutes
866
+ r.encodeLocation ? r.encodeLocation(b.pathname).pathname : b.pathname
867
+ ]),
868
+ pathnameBase: b.pathnameBase === "/" ? c : K([
869
+ c,
870
+ // Re-encode pathnames that were decoded inside matchRoutes
871
+ r.encodeLocation ? r.encodeLocation(b.pathnameBase).pathname : b.pathnameBase
872
+ ])
873
+ })
874
+ ),
875
+ o,
876
+ t,
877
+ a
878
+ );
879
+ }
880
+ function ur() {
881
+ let e = vr(), n = nr(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), t = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", r = { padding: "0.5rem", backgroundColor: a }, o = { padding: "2px 4px", backgroundColor: a }, l = null;
882
+ return console.error(
883
+ "Error handled by React Router default ErrorBoundary:",
884
+ e
885
+ ), l = /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ f.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ f.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ f.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ f.createElement("h3", { style: { fontStyle: "italic" } }, n), t ? /* @__PURE__ */ f.createElement("pre", { style: r }, t) : null, l);
886
+ }
887
+ var cr = /* @__PURE__ */ f.createElement(ur, null), dr = class extends f.Component {
888
+ constructor(e) {
889
+ super(e), this.state = {
890
+ location: e.location,
891
+ revalidation: e.revalidation,
892
+ error: e.error
893
+ };
894
+ }
895
+ static getDerivedStateFromError(e) {
896
+ return { error: e };
897
+ }
898
+ static getDerivedStateFromProps(e, n) {
899
+ return n.location !== e.location || n.revalidation !== "idle" && e.revalidation === "idle" ? {
900
+ error: e.error,
901
+ location: e.location,
902
+ revalidation: e.revalidation
903
+ } : {
904
+ error: e.error !== void 0 ? e.error : n.error,
905
+ location: n.location,
906
+ revalidation: e.revalidation || n.revalidation
907
+ };
908
+ }
909
+ componentDidCatch(e, n) {
910
+ console.error(
911
+ "React Router caught the following error during render",
912
+ e,
913
+ n
914
+ );
915
+ }
916
+ render() {
917
+ return this.state.error !== void 0 ? /* @__PURE__ */ f.createElement(Y.Provider, { value: this.props.routeContext }, /* @__PURE__ */ f.createElement(
918
+ He.Provider,
919
+ {
920
+ value: this.state.error,
921
+ children: this.props.component
922
+ }
923
+ )) : this.props.children;
924
+ }
925
+ };
926
+ function fr({ routeContext: e, match: n, children: t }) {
927
+ let a = f.useContext(ue);
928
+ return a && a.static && a.staticContext && (n.route.errorElement || n.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = n.route.id), /* @__PURE__ */ f.createElement(Y.Provider, { value: e }, t);
929
+ }
930
+ function hr(e, n = [], t = null, a = null) {
931
+ if (e == null) {
932
+ if (!t)
933
+ return null;
934
+ if (t.errors)
935
+ e = t.matches;
936
+ else if (n.length === 0 && !t.initialized && t.matches.length > 0)
937
+ e = t.matches;
938
+ else
939
+ return null;
940
+ }
941
+ let r = e, o = t == null ? void 0 : t.errors;
942
+ if (o != null) {
943
+ let u = r.findIndex(
944
+ (c) => c.route.id && (o == null ? void 0 : o[c.route.id]) !== void 0
945
+ );
946
+ P(
947
+ u >= 0,
948
+ `Could not find a matching route for errors on route IDs: ${Object.keys(
949
+ o
950
+ ).join(",")}`
951
+ ), r = r.slice(
952
+ 0,
953
+ Math.min(r.length, u + 1)
954
+ );
955
+ }
956
+ let l = !1, s = -1;
957
+ if (t)
958
+ for (let u = 0; u < r.length; u++) {
959
+ let c = r[u];
960
+ if ((c.route.HydrateFallback || c.route.hydrateFallbackElement) && (s = u), c.route.id) {
961
+ let { loaderData: d, errors: x } = t, g = c.route.loader && !d.hasOwnProperty(c.route.id) && (!x || x[c.route.id] === void 0);
962
+ if (c.route.lazy || g) {
963
+ l = !0, s >= 0 ? r = r.slice(0, s + 1) : r = [r[0]];
964
+ break;
965
+ }
966
+ }
967
+ }
968
+ return r.reduceRight(
969
+ (u, c, d) => {
970
+ let x, g = !1, p = null, v = null;
971
+ t && (x = o && c.route.id ? o[c.route.id] : void 0, p = c.route.errorElement || cr, l && (s < 0 && d === 0 ? (Bt(
972
+ "route-fallback",
973
+ !1,
974
+ "No `HydrateFallback` element provided to render during initial hydration"
975
+ ), g = !0, v = null) : s === d && (g = !0, v = c.route.hydrateFallbackElement || null)));
976
+ let h = n.concat(r.slice(0, d + 1)), j = () => {
977
+ let b;
978
+ return x ? b = p : g ? b = v : c.route.Component ? b = /* @__PURE__ */ f.createElement(c.route.Component, null) : c.route.element ? b = c.route.element : b = u, /* @__PURE__ */ f.createElement(
979
+ fr,
980
+ {
981
+ match: c,
982
+ routeContext: {
983
+ outlet: u,
984
+ matches: h,
985
+ isDataRoute: t != null
986
+ },
987
+ children: b
988
+ }
989
+ );
990
+ };
991
+ return t && (c.route.ErrorBoundary || c.route.errorElement || d === 0) ? /* @__PURE__ */ f.createElement(
992
+ dr,
993
+ {
994
+ location: t.location,
995
+ revalidation: t.revalidation,
996
+ component: p,
997
+ error: x,
998
+ children: j(),
999
+ routeContext: { outlet: null, matches: h, isDataRoute: !0 }
1000
+ }
1001
+ ) : j();
1002
+ },
1003
+ null
1004
+ );
1005
+ }
1006
+ function Ge(e) {
1007
+ return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1008
+ }
1009
+ function mr(e) {
1010
+ let n = f.useContext(ue);
1011
+ return P(n, Ge(e)), n;
1012
+ }
1013
+ function gr(e) {
1014
+ let n = f.useContext(Ne);
1015
+ return P(n, Ge(e)), n;
1016
+ }
1017
+ function pr(e) {
1018
+ let n = f.useContext(Y);
1019
+ return P(n, Ge(e)), n;
1020
+ }
1021
+ function Je(e) {
1022
+ let n = pr(e), t = n.matches[n.matches.length - 1];
1023
+ return P(
1024
+ t.route.id,
1025
+ `${e} can only be used on routes that contain a unique "id"`
1026
+ ), t.route.id;
1027
+ }
1028
+ function xr() {
1029
+ return Je(
1030
+ "useRouteId"
1031
+ /* UseRouteId */
1032
+ );
1033
+ }
1034
+ function vr() {
1035
+ var a;
1036
+ let e = f.useContext(He), n = gr(
1037
+ "useRouteError"
1038
+ /* UseRouteError */
1039
+ ), t = Je(
1040
+ "useRouteError"
1041
+ /* UseRouteError */
1042
+ );
1043
+ return e !== void 0 ? e : (a = n.errors) == null ? void 0 : a[t];
1044
+ }
1045
+ function yr() {
1046
+ let { router: e } = mr(
1047
+ "useNavigate"
1048
+ /* UseNavigateStable */
1049
+ ), n = Je(
1050
+ "useNavigate"
1051
+ /* UseNavigateStable */
1052
+ ), t = f.useRef(!1);
1053
+ return zt(() => {
1054
+ t.current = !0;
1055
+ }), f.useCallback(
1056
+ async (r, o = {}) => {
1057
+ V(t.current, Mt), t.current && (typeof r == "number" ? e.navigate(r) : await e.navigate(r, { fromRouteId: n, ...o }));
1058
+ },
1059
+ [e, n]
1060
+ );
1061
+ }
1062
+ var ft = {};
1063
+ function Bt(e, n, t) {
1064
+ !n && !ft[e] && (ft[e] = !0, V(!1, t));
1065
+ }
1066
+ f.memo(br);
1067
+ function br({
1068
+ routes: e,
1069
+ future: n,
1070
+ state: t
1071
+ }) {
1072
+ return sr(e, void 0, t, n);
1073
+ }
1074
+ var Se = "get", Ce = "application/x-www-form-urlencoded";
1075
+ function Ie(e) {
1076
+ return e != null && typeof e.tagName == "string";
1077
+ }
1078
+ function wr(e) {
1079
+ return Ie(e) && e.tagName.toLowerCase() === "button";
1080
+ }
1081
+ function jr(e) {
1082
+ return Ie(e) && e.tagName.toLowerCase() === "form";
1083
+ }
1084
+ function Sr(e) {
1085
+ return Ie(e) && e.tagName.toLowerCase() === "input";
1086
+ }
1087
+ function Cr(e) {
1088
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
1089
+ }
1090
+ function Rr(e, n) {
1091
+ return e.button === 0 && // Ignore everything but left clicks
1092
+ (!n || n === "_self") && // Let browser handle "target=_blank" etc.
1093
+ !Cr(e);
1094
+ }
1095
+ var we = null;
1096
+ function Er() {
1097
+ if (we === null)
1098
+ try {
1099
+ new FormData(
1100
+ document.createElement("form"),
1101
+ // @ts-expect-error if FormData supports the submitter parameter, this will throw
1102
+ 0
1103
+ ), we = !1;
1104
+ } catch {
1105
+ we = !0;
1106
+ }
1107
+ return we;
1108
+ }
1109
+ var kr = /* @__PURE__ */ new Set([
1110
+ "application/x-www-form-urlencoded",
1111
+ "multipart/form-data",
1112
+ "text/plain"
1113
+ ]);
1114
+ function Me(e) {
1115
+ return e != null && !kr.has(e) ? (V(
1116
+ !1,
1117
+ `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ce}"`
1118
+ ), null) : e;
1119
+ }
1120
+ function Tr(e, n) {
1121
+ let t, a, r, o, l;
1122
+ if (jr(e)) {
1123
+ let s = e.getAttribute("action");
1124
+ a = s ? Z(s, n) : null, t = e.getAttribute("method") || Se, r = Me(e.getAttribute("enctype")) || Ce, o = new FormData(e);
1125
+ } else if (wr(e) || Sr(e) && (e.type === "submit" || e.type === "image")) {
1126
+ let s = e.form;
1127
+ if (s == null)
1128
+ throw new Error(
1129
+ 'Cannot submit a <button> or <input type="submit"> without a <form>'
1130
+ );
1131
+ let u = e.getAttribute("formaction") || s.getAttribute("action");
1132
+ if (a = u ? Z(u, n) : null, t = e.getAttribute("formmethod") || s.getAttribute("method") || Se, r = Me(e.getAttribute("formenctype")) || Me(s.getAttribute("enctype")) || Ce, o = new FormData(s, e), !Er()) {
1133
+ let { name: c, type: d, value: x } = e;
1134
+ if (d === "image") {
1135
+ let g = c ? `${c}.` : "";
1136
+ o.append(`${g}x`, "0"), o.append(`${g}y`, "0");
1137
+ } else c && o.append(c, x);
1138
+ }
1139
+ } else {
1140
+ if (Ie(e))
1141
+ throw new Error(
1142
+ 'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
1143
+ );
1144
+ t = Se, a = null, r = Ce, l = e;
1145
+ }
1146
+ return o && r === "text/plain" && (l = o, o = void 0), { action: a, method: t.toLowerCase(), encType: r, formData: o, body: l };
1147
+ }
1148
+ Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
1149
+ function Xe(e, n) {
1150
+ if (e === !1 || e === null || typeof e > "u")
1151
+ throw new Error(n);
1152
+ }
1153
+ function Nr(e, n, t) {
1154
+ let a = typeof e == "string" ? new URL(
1155
+ e,
1156
+ // This can be called during the SSR flow via PrefetchPageLinksImpl so
1157
+ // don't assume window is available
1158
+ typeof window > "u" ? "server://singlefetch/" : window.location.origin
1159
+ ) : e;
1160
+ return a.pathname === "/" ? a.pathname = `_root.${t}` : n && Z(a.pathname, n) === "/" ? a.pathname = `${n.replace(/\/$/, "")}/_root.${t}` : a.pathname = `${a.pathname.replace(/\/$/, "")}.${t}`, a;
1161
+ }
1162
+ async function Pr(e, n) {
1163
+ if (e.id in n)
1164
+ return n[e.id];
1165
+ try {
1166
+ let t = await import(
1167
+ /* @vite-ignore */
1168
+ /* webpackIgnore: true */
1169
+ e.module
1170
+ );
1171
+ return n[e.id] = t, t;
1172
+ } catch (t) {
1173
+ return console.error(
1174
+ `Error loading route module \`${e.module}\`, reloading page...`
1175
+ ), console.error(t), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
1176
+ });
1177
+ }
1178
+ }
1179
+ function Ir(e) {
1180
+ return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
1181
+ }
1182
+ async function Lr(e, n, t) {
1183
+ let a = await Promise.all(
1184
+ e.map(async (r) => {
1185
+ let o = n.routes[r.route.id];
1186
+ if (o) {
1187
+ let l = await Pr(o, t);
1188
+ return l.links ? l.links() : [];
1189
+ }
1190
+ return [];
1191
+ })
1192
+ );
1193
+ return $r(
1194
+ a.flat(1).filter(Ir).filter((r) => r.rel === "stylesheet" || r.rel === "preload").map(
1195
+ (r) => r.rel === "stylesheet" ? { ...r, rel: "prefetch", as: "style" } : { ...r, rel: "prefetch" }
1196
+ )
1197
+ );
1198
+ }
1199
+ function ht(e, n, t, a, r, o) {
1200
+ let l = (u, c) => t[c] ? u.route.id !== t[c].route.id : !0, s = (u, c) => {
1201
+ var d;
1202
+ return (
1203
+ // param change, /users/123 -> /users/456
1204
+ t[c].pathname !== u.pathname || // splat param changed, which is not present in match.path
1205
+ // e.g. /files/images/avatar.jpg -> files/finances.xls
1206
+ ((d = t[c].route.path) == null ? void 0 : d.endsWith("*")) && t[c].params["*"] !== u.params["*"]
1207
+ );
1208
+ };
1209
+ return o === "assets" ? n.filter(
1210
+ (u, c) => l(u, c) || s(u, c)
1211
+ ) : o === "data" ? n.filter((u, c) => {
1212
+ var x;
1213
+ let d = a.routes[u.route.id];
1214
+ if (!d || !d.hasLoader)
1215
+ return !1;
1216
+ if (l(u, c) || s(u, c))
1217
+ return !0;
1218
+ if (u.route.shouldRevalidate) {
1219
+ let g = u.route.shouldRevalidate({
1220
+ currentUrl: new URL(
1221
+ r.pathname + r.search + r.hash,
1222
+ window.origin
1223
+ ),
1224
+ currentParams: ((x = t[0]) == null ? void 0 : x.params) || {},
1225
+ nextUrl: new URL(e, window.origin),
1226
+ nextParams: u.params,
1227
+ defaultShouldRevalidate: !0
1228
+ });
1229
+ if (typeof g == "boolean")
1230
+ return g;
1231
+ }
1232
+ return !0;
1233
+ }) : [];
1234
+ }
1235
+ function Fr(e, n, { includeHydrateFallback: t } = {}) {
1236
+ return Ar(
1237
+ e.map((a) => {
1238
+ let r = n.routes[a.route.id];
1239
+ if (!r) return [];
1240
+ let o = [r.module];
1241
+ return r.clientActionModule && (o = o.concat(r.clientActionModule)), r.clientLoaderModule && (o = o.concat(r.clientLoaderModule)), t && r.hydrateFallbackModule && (o = o.concat(r.hydrateFallbackModule)), r.imports && (o = o.concat(r.imports)), o;
1242
+ }).flat(1)
1243
+ );
1244
+ }
1245
+ function Ar(e) {
1246
+ return [...new Set(e)];
1247
+ }
1248
+ function _r(e) {
1249
+ let n = {}, t = Object.keys(e).sort();
1250
+ for (let a of t)
1251
+ n[a] = e[a];
1252
+ return n;
1253
+ }
1254
+ function $r(e, n) {
1255
+ let t = /* @__PURE__ */ new Set();
1256
+ return new Set(n), e.reduce((a, r) => {
1257
+ let o = JSON.stringify(_r(r));
1258
+ return t.has(o) || (t.add(o), a.push({ key: o, link: r })), a;
1259
+ }, []);
1260
+ }
1261
+ function Ut() {
1262
+ let e = f.useContext(ue);
1263
+ return Xe(
1264
+ e,
1265
+ "You must render this element inside a <DataRouterContext.Provider> element"
1266
+ ), e;
1267
+ }
1268
+ function Or() {
1269
+ let e = f.useContext(Ne);
1270
+ return Xe(
1271
+ e,
1272
+ "You must render this element inside a <DataRouterStateContext.Provider> element"
1273
+ ), e;
1274
+ }
1275
+ var Ze = f.createContext(void 0);
1276
+ Ze.displayName = "FrameworkContext";
1277
+ function qt() {
1278
+ let e = f.useContext(Ze);
1279
+ return Xe(
1280
+ e,
1281
+ "You must render this element inside a <HydratedRouter> element"
1282
+ ), e;
1283
+ }
1284
+ function Dr(e, n) {
1285
+ let t = f.useContext(Ze), [a, r] = f.useState(!1), [o, l] = f.useState(!1), { onFocus: s, onBlur: u, onMouseEnter: c, onMouseLeave: d, onTouchStart: x } = n, g = f.useRef(null);
1286
+ f.useEffect(() => {
1287
+ if (e === "render" && l(!0), e === "viewport") {
1288
+ let h = (b) => {
1289
+ b.forEach((C) => {
1290
+ l(C.isIntersecting);
1291
+ });
1292
+ }, j = new IntersectionObserver(h, { threshold: 0.5 });
1293
+ return g.current && j.observe(g.current), () => {
1294
+ j.disconnect();
1295
+ };
1296
+ }
1297
+ }, [e]), f.useEffect(() => {
1298
+ if (a) {
1299
+ let h = setTimeout(() => {
1300
+ l(!0);
1301
+ }, 100);
1302
+ return () => {
1303
+ clearTimeout(h);
1304
+ };
1305
+ }
1306
+ }, [a]);
1307
+ let p = () => {
1308
+ r(!0);
1309
+ }, v = () => {
1310
+ r(!1), l(!1);
1311
+ };
1312
+ return t ? e !== "intent" ? [o, g, {}] : [
1313
+ o,
1314
+ g,
1315
+ {
1316
+ onFocus: he(s, p),
1317
+ onBlur: he(u, v),
1318
+ onMouseEnter: he(c, p),
1319
+ onMouseLeave: he(d, v),
1320
+ onTouchStart: he(x, p)
1321
+ }
1322
+ ] : [!1, g, {}];
1323
+ }
1324
+ function he(e, n) {
1325
+ return (t) => {
1326
+ e && e(t), t.defaultPrevented || n(t);
1327
+ };
1328
+ }
1329
+ function Mr({ page: e, ...n }) {
1330
+ let { router: t } = Ut(), a = f.useMemo(
1331
+ () => Lt(t.routes, e, t.basename),
1332
+ [t.routes, e, t.basename]
1333
+ );
1334
+ return a ? /* @__PURE__ */ f.createElement(Br, { page: e, matches: a, ...n }) : null;
1335
+ }
1336
+ function zr(e) {
1337
+ let { manifest: n, routeModules: t } = qt(), [a, r] = f.useState([]);
1338
+ return f.useEffect(() => {
1339
+ let o = !1;
1340
+ return Lr(e, n, t).then(
1341
+ (l) => {
1342
+ o || r(l);
1343
+ }
1344
+ ), () => {
1345
+ o = !0;
1346
+ };
1347
+ }, [e, n, t]), a;
1348
+ }
1349
+ function Br({
1350
+ page: e,
1351
+ matches: n,
1352
+ ...t
1353
+ }) {
1354
+ let a = te(), { manifest: r, routeModules: o } = qt(), { basename: l } = Ut(), { loaderData: s, matches: u } = Or(), c = f.useMemo(
1355
+ () => ht(
1356
+ e,
1357
+ n,
1358
+ u,
1359
+ r,
1360
+ a,
1361
+ "data"
1362
+ ),
1363
+ [e, n, u, r, a]
1364
+ ), d = f.useMemo(
1365
+ () => ht(
1366
+ e,
1367
+ n,
1368
+ u,
1369
+ r,
1370
+ a,
1371
+ "assets"
1372
+ ),
1373
+ [e, n, u, r, a]
1374
+ ), x = f.useMemo(() => {
1375
+ if (e === a.pathname + a.search + a.hash)
1376
+ return [];
1377
+ let v = /* @__PURE__ */ new Set(), h = !1;
1378
+ if (n.forEach((b) => {
1379
+ var y;
1380
+ let C = r.routes[b.route.id];
1381
+ !C || !C.hasLoader || (!c.some((w) => w.route.id === b.route.id) && b.route.id in s && ((y = o[b.route.id]) != null && y.shouldRevalidate) || C.hasClientLoader ? h = !0 : v.add(b.route.id));
1382
+ }), v.size === 0)
1383
+ return [];
1384
+ let j = Nr(e, l, "data");
1385
+ return h && v.size > 0 && j.searchParams.set(
1386
+ "_routes",
1387
+ n.filter((b) => v.has(b.route.id)).map((b) => b.route.id).join(",")
1388
+ ), [j.pathname + j.search];
1389
+ }, [
1390
+ l,
1391
+ s,
1392
+ a,
1393
+ r,
1394
+ c,
1395
+ n,
1396
+ e,
1397
+ o
1398
+ ]), g = f.useMemo(
1399
+ () => Fr(d, r),
1400
+ [d, r]
1401
+ ), p = zr(d);
1402
+ return /* @__PURE__ */ f.createElement(f.Fragment, null, x.map((v) => /* @__PURE__ */ f.createElement("link", { key: v, rel: "prefetch", as: "fetch", href: v, ...t })), g.map((v) => /* @__PURE__ */ f.createElement("link", { key: v, rel: "modulepreload", href: v, ...t })), p.map(({ key: v, link: h }) => (
1403
+ // these don't spread `linkProps` because they are full link descriptors
1404
+ // already with their own props
1405
+ /* @__PURE__ */ f.createElement("link", { key: v, ...h })
1406
+ )));
1407
+ }
1408
+ function Ur(...e) {
1409
+ return (n) => {
1410
+ e.forEach((t) => {
1411
+ typeof t == "function" ? t(n) : t != null && (t.current = n);
1412
+ });
1413
+ };
1414
+ }
1415
+ var Wt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
1416
+ try {
1417
+ Wt && (window.__reactRouterVersion = // @ts-expect-error
1418
+ "7.7.1");
1419
+ } catch {
1420
+ }
1421
+ var Kt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Vt = f.forwardRef(
1422
+ function({
1423
+ onClick: n,
1424
+ discover: t = "render",
1425
+ prefetch: a = "none",
1426
+ relative: r,
1427
+ reloadDocument: o,
1428
+ replace: l,
1429
+ state: s,
1430
+ target: u,
1431
+ to: c,
1432
+ preventScrollReset: d,
1433
+ viewTransition: x,
1434
+ ...g
1435
+ }, p) {
1436
+ let { basename: v } = f.useContext(H), h = typeof c == "string" && Kt.test(c), j, b = !1;
1437
+ if (typeof c == "string" && h && (j = c, Wt))
1438
+ try {
1439
+ let $ = new URL(window.location.href), G = c.startsWith("//") ? new URL($.protocol + c) : new URL(c), ae = Z(G.pathname, v);
1440
+ G.origin === $.origin && ae != null ? c = ae + G.search + G.hash : b = !0;
1441
+ } catch {
1442
+ V(
1443
+ !1,
1444
+ `<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
1445
+ );
1446
+ }
1447
+ let C = ir(c, { relative: r }), [y, w, R] = Dr(
1448
+ a,
1449
+ g
1450
+ ), U = Vr(c, {
1451
+ replace: l,
1452
+ state: s,
1453
+ target: u,
1454
+ preventScrollReset: d,
1455
+ relative: r,
1456
+ viewTransition: x
1457
+ });
1458
+ function M($) {
1459
+ n && n($), $.defaultPrevented || U($);
1460
+ }
1461
+ let ne = (
1462
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
1463
+ /* @__PURE__ */ f.createElement(
1464
+ "a",
1465
+ {
1466
+ ...g,
1467
+ ...R,
1468
+ href: j || C,
1469
+ onClick: b || o ? n : M,
1470
+ ref: Ur(p, w),
1471
+ target: u,
1472
+ "data-discover": !h && t === "render" ? "true" : void 0
1473
+ }
1474
+ )
1475
+ );
1476
+ return y && !h ? /* @__PURE__ */ f.createElement(f.Fragment, null, ne, /* @__PURE__ */ f.createElement(Mr, { page: C })) : ne;
1477
+ }
1478
+ );
1479
+ Vt.displayName = "Link";
1480
+ var qr = f.forwardRef(
1481
+ function({
1482
+ "aria-current": n = "page",
1483
+ caseSensitive: t = !1,
1484
+ className: a = "",
1485
+ end: r = !1,
1486
+ style: o,
1487
+ to: l,
1488
+ viewTransition: s,
1489
+ children: u,
1490
+ ...c
1491
+ }, d) {
1492
+ let x = xe(l, { relative: c.relative }), g = te(), p = f.useContext(Ne), { navigator: v, basename: h } = f.useContext(H), j = p != null && // Conditional usage is OK here because the usage of a data router is static
1493
+ // eslint-disable-next-line react-hooks/rules-of-hooks
1494
+ Xr(x) && s === !0, b = v.encodeLocation ? v.encodeLocation(x).pathname : x.pathname, C = g.pathname, y = p && p.navigation && p.navigation.location ? p.navigation.location.pathname : null;
1495
+ t || (C = C.toLowerCase(), y = y ? y.toLowerCase() : null, b = b.toLowerCase()), y && h && (y = Z(y, h) || y);
1496
+ const w = b !== "/" && b.endsWith("/") ? b.length - 1 : b.length;
1497
+ let R = C === b || !r && C.startsWith(b) && C.charAt(w) === "/", U = y != null && (y === b || !r && y.startsWith(b) && y.charAt(b.length) === "/"), M = {
1498
+ isActive: R,
1499
+ isPending: U,
1500
+ isTransitioning: j
1501
+ }, ne = R ? n : void 0, $;
1502
+ typeof a == "function" ? $ = a(M) : $ = [
1503
+ a,
1504
+ R ? "active" : null,
1505
+ U ? "pending" : null,
1506
+ j ? "transitioning" : null
1507
+ ].filter(Boolean).join(" ");
1508
+ let G = typeof o == "function" ? o(M) : o;
1509
+ return /* @__PURE__ */ f.createElement(
1510
+ Vt,
1511
+ {
1512
+ ...c,
1513
+ "aria-current": ne,
1514
+ className: $,
1515
+ ref: d,
1516
+ style: G,
1517
+ to: l,
1518
+ viewTransition: s
1519
+ },
1520
+ typeof u == "function" ? u(M) : u
1521
+ );
1522
+ }
1523
+ );
1524
+ qr.displayName = "NavLink";
1525
+ var Wr = f.forwardRef(
1526
+ ({
1527
+ discover: e = "render",
1528
+ fetcherKey: n,
1529
+ navigate: t,
1530
+ reloadDocument: a,
1531
+ replace: r,
1532
+ state: o,
1533
+ method: l = Se,
1534
+ action: s,
1535
+ onSubmit: u,
1536
+ relative: c,
1537
+ preventScrollReset: d,
1538
+ viewTransition: x,
1539
+ ...g
1540
+ }, p) => {
1541
+ let v = Gr(), h = Jr(s, { relative: c }), j = l.toLowerCase() === "get" ? "get" : "post", b = typeof s == "string" && Kt.test(s), C = (y) => {
1542
+ if (u && u(y), y.defaultPrevented) return;
1543
+ y.preventDefault();
1544
+ let w = y.nativeEvent.submitter, R = (w == null ? void 0 : w.getAttribute("formmethod")) || l;
1545
+ v(w || y.currentTarget, {
1546
+ fetcherKey: n,
1547
+ method: R,
1548
+ navigate: t,
1549
+ replace: r,
1550
+ state: o,
1551
+ relative: c,
1552
+ preventScrollReset: d,
1553
+ viewTransition: x
1554
+ });
1555
+ };
1556
+ return /* @__PURE__ */ f.createElement(
1557
+ "form",
1558
+ {
1559
+ ref: p,
1560
+ method: j,
1561
+ action: h,
1562
+ onSubmit: a ? u : C,
1563
+ ...g,
1564
+ "data-discover": !b && e === "render" ? "true" : void 0
1565
+ }
1566
+ );
1567
+ }
1568
+ );
1569
+ Wr.displayName = "Form";
1570
+ function Kr(e) {
1571
+ return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1572
+ }
1573
+ function Ht(e) {
1574
+ let n = f.useContext(ue);
1575
+ return P(n, Kr(e)), n;
1576
+ }
1577
+ function Vr(e, {
1578
+ target: n,
1579
+ replace: t,
1580
+ state: a,
1581
+ preventScrollReset: r,
1582
+ relative: o,
1583
+ viewTransition: l
1584
+ } = {}) {
1585
+ let s = Ye(), u = te(), c = xe(e, { relative: o });
1586
+ return f.useCallback(
1587
+ (d) => {
1588
+ if (Rr(d, n)) {
1589
+ d.preventDefault();
1590
+ let x = t !== void 0 ? t : Ue(u) === Ue(c);
1591
+ s(e, {
1592
+ replace: x,
1593
+ state: a,
1594
+ preventScrollReset: r,
1595
+ relative: o,
1596
+ viewTransition: l
1597
+ });
1598
+ }
1599
+ },
1600
+ [
1601
+ u,
1602
+ s,
1603
+ c,
1604
+ t,
1605
+ a,
1606
+ n,
1607
+ e,
1608
+ r,
1609
+ o,
1610
+ l
1611
+ ]
1612
+ );
1613
+ }
1614
+ var Hr = 0, Yr = () => `__${String(++Hr)}__`;
1615
+ function Gr() {
1616
+ let { router: e } = Ht(
1617
+ "useSubmit"
1618
+ /* UseSubmit */
1619
+ ), { basename: n } = f.useContext(H), t = xr();
1620
+ return f.useCallback(
1621
+ async (a, r = {}) => {
1622
+ let { action: o, method: l, encType: s, formData: u, body: c } = Tr(
1623
+ a,
1624
+ n
1625
+ );
1626
+ if (r.navigate === !1) {
1627
+ let d = r.fetcherKey || Yr();
1628
+ await e.fetch(d, t, r.action || o, {
1629
+ preventScrollReset: r.preventScrollReset,
1630
+ formData: u,
1631
+ body: c,
1632
+ formMethod: r.method || l,
1633
+ formEncType: r.encType || s,
1634
+ flushSync: r.flushSync
1635
+ });
1636
+ } else
1637
+ await e.navigate(r.action || o, {
1638
+ preventScrollReset: r.preventScrollReset,
1639
+ formData: u,
1640
+ body: c,
1641
+ formMethod: r.method || l,
1642
+ formEncType: r.encType || s,
1643
+ replace: r.replace,
1644
+ state: r.state,
1645
+ fromRouteId: t,
1646
+ flushSync: r.flushSync,
1647
+ viewTransition: r.viewTransition
1648
+ });
1649
+ },
1650
+ [e, n, t]
1651
+ );
1652
+ }
1653
+ function Jr(e, { relative: n } = {}) {
1654
+ let { basename: t } = f.useContext(H), a = f.useContext(Y);
1655
+ P(a, "useFormAction must be used inside a RouteContext");
1656
+ let [r] = a.matches.slice(-1), o = { ...xe(e || ".", { relative: n }) }, l = te();
1657
+ if (e == null) {
1658
+ o.search = l.search;
1659
+ let s = new URLSearchParams(o.search), u = s.getAll("index");
1660
+ if (u.some((d) => d === "")) {
1661
+ s.delete("index"), u.filter((x) => x).forEach((x) => s.append("index", x));
1662
+ let d = s.toString();
1663
+ o.search = d ? `?${d}` : "";
1664
+ }
1665
+ }
1666
+ return (!e || e === ".") && r.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), t !== "/" && (o.pathname = o.pathname === "/" ? t : K([t, o.pathname])), Ue(o);
1667
+ }
1668
+ function Xr(e, { relative: n } = {}) {
1669
+ let t = f.useContext(Dt);
1670
+ P(
1671
+ t != null,
1672
+ "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
1673
+ );
1674
+ let { basename: a } = Ht(
1675
+ "useViewTransitionState"
1676
+ /* useViewTransitionState */
1677
+ ), r = xe(e, { relative: n });
1678
+ if (!t.isTransitioning)
1679
+ return !1;
1680
+ let o = Z(t.currentLocation.pathname, a) || t.currentLocation.pathname, l = Z(t.nextLocation.pathname, a) || t.nextLocation.pathname;
1681
+ return Ee(r.pathname, l) != null || Ee(r.pathname, o) != null;
1682
+ }
1683
+ const Qa = ({ message: e }) => {
1684
+ const n = Ye();
1685
+ return /* @__PURE__ */ i.jsx(
1686
+ dn,
419
1687
  {
420
1688
  size: "xs",
421
1689
  style: {
@@ -424,32 +1692,32 @@ const T = {
424
1692
  alignItems: "center",
425
1693
  justifyContent: "center"
426
1694
  },
427
- children: /* @__PURE__ */ t.jsx(
428
- be,
1695
+ children: /* @__PURE__ */ i.jsx(
1696
+ qe,
429
1697
  {
430
1698
  color: "red",
431
1699
  title: "Not Found",
432
1700
  variant: "404 - Not Found",
433
- icon: /* @__PURE__ */ t.jsx(ye, { size: 12, stroke: 1.5 }),
434
- children: /* @__PURE__ */ t.jsxs(ee, { align: "flex-start", children: [
1701
+ icon: /* @__PURE__ */ i.jsx(We, { size: 12, stroke: 1.5 }),
1702
+ children: /* @__PURE__ */ i.jsxs(ge, { align: "flex-start", children: [
435
1703
  e || "Sorry, the page you are looking for does not exist.",
436
- /* @__PURE__ */ t.jsx(D, { variant: "filled", onClick: () => s("/"), size: "xs", children: "Back Home" })
1704
+ /* @__PURE__ */ i.jsx(q, { variant: "filled", onClick: () => n("/"), size: "xs", children: "Back Home" })
437
1705
  ] })
438
1706
  }
439
1707
  )
440
1708
  }
441
1709
  );
442
- }, Yn = ({ message: e }) => /* @__PURE__ */ t.jsx(
443
- be,
1710
+ }, eo = ({ message: e }) => /* @__PURE__ */ i.jsx(
1711
+ qe,
444
1712
  {
445
1713
  color: "red",
446
1714
  title: "Not Found",
447
1715
  variant: "404 - Not Found",
448
- icon: /* @__PURE__ */ t.jsx(ye, { size: 12, stroke: 1.5 }),
1716
+ icon: /* @__PURE__ */ i.jsx(We, { size: 12, stroke: 1.5 }),
449
1717
  children: e || "Sorry, the page you are looking for does not exist."
450
1718
  }
451
- ), Qe = ({ message: e }) => /* @__PURE__ */ t.jsx(p, { c: "red", size: "sm", children: e || "Not Found" }), Wn = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ t.jsx(z, { justify: "center", align: "center", children: /* @__PURE__ */ t.jsx(ae, { color: "blue", size: "md" }) }) : /* @__PURE__ */ t.jsxs(
452
- z,
1719
+ ), Yt = ({ message: e }) => /* @__PURE__ */ i.jsx(E, { c: "red", size: "sm", children: e || "Not Found" }), to = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ i.jsx(B, { justify: "center", align: "center", children: /* @__PURE__ */ i.jsx(Re, { color: "blue", size: "md" }) }) : /* @__PURE__ */ i.jsxs(
1720
+ B,
453
1721
  {
454
1722
  gap: "md",
455
1723
  direction: "column",
@@ -457,67 +1725,67 @@ const T = {
457
1725
  align: "center",
458
1726
  style: { height: "100%" },
459
1727
  children: [
460
- /* @__PURE__ */ t.jsx(ae, { color: "blue", size: "md" }),
1728
+ /* @__PURE__ */ i.jsx(Re, { color: "blue", size: "md" }),
461
1729
  e
462
1730
  ]
463
1731
  }
464
- ), Hn = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ t.jsx(ae, { color: "blue", size: "xs" }) : /* @__PURE__ */ t.jsxs(z, { gap: "md", direction: "column", justify: "center", align: "center", children: [
465
- /* @__PURE__ */ t.jsx(ae, { color: "blue", size: "xs" }),
1732
+ ), no = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ i.jsx(Re, { color: "blue", size: "xs" }) : /* @__PURE__ */ i.jsxs(B, { gap: "md", direction: "column", justify: "center", align: "center", children: [
1733
+ /* @__PURE__ */ i.jsx(Re, { color: "blue", size: "xs" }),
466
1734
  e
467
- ] }), Jn = ({ message: e }) => /* @__PURE__ */ t.jsx(
468
- be,
1735
+ ] }), ro = ({ message: e }) => /* @__PURE__ */ i.jsx(
1736
+ qe,
469
1737
  {
470
1738
  color: "red",
471
1739
  title: "Not Found",
472
1740
  variant: "403 - Not Authorized",
473
- icon: /* @__PURE__ */ t.jsx(ye, { size: 12, stroke: 1.5 }),
1741
+ icon: /* @__PURE__ */ i.jsx(We, { size: 12, stroke: 1.5 }),
474
1742
  children: e || "Sorry, you are not authorized to access this page."
475
1743
  }
476
1744
  );
477
- function Zn(e, s) {
478
- return e.reduce((n, o) => {
479
- const r = s(o);
480
- return n[r] || (n[r] = []), n[r].push(o), n;
1745
+ function ao(e, n) {
1746
+ return e.reduce((t, a) => {
1747
+ const r = n(a);
1748
+ return t[r] || (t[r] = []), t[r].push(a), t;
481
1749
  }, {});
482
1750
  }
483
- function Xn(e, s) {
484
- const n = [];
485
- let o;
486
- return e.reduce((r, i) => {
487
- const a = s(i);
488
- return a === void 0 ? (o === void 0 && (o = n.length, n.push([])), n[o].push(i)) : (r[a] === void 0 && (r[a] = n.length, n.push([])), n[r[a]].push(i)), r;
489
- }, {}), n;
490
- }
491
- function Qn(e, s) {
492
- const n = /* @__PURE__ */ new Set();
493
- return e.filter((o) => {
494
- const r = s(o);
495
- return n.has(r) ? !1 : (n.add(r), !0);
1751
+ function oo(e, n) {
1752
+ const t = [];
1753
+ let a;
1754
+ return e.reduce((r, o) => {
1755
+ const l = n(o);
1756
+ return l === void 0 ? (a === void 0 && (a = t.length, t.push([])), t[a].push(o)) : (r[l] === void 0 && (r[l] = t.length, t.push([])), t[r[l]].push(o)), r;
1757
+ }, {}), t;
1758
+ }
1759
+ function io(e, n) {
1760
+ const t = /* @__PURE__ */ new Set();
1761
+ return e.filter((a) => {
1762
+ const r = n(a);
1763
+ return t.has(r) ? !1 : (t.add(r), !0);
496
1764
  });
497
1765
  }
498
- class er {
1766
+ class lo {
499
1767
  constructor() {
500
- q(this, "items", []);
501
- q(this, "seen", /* @__PURE__ */ new Set());
1768
+ X(this, "items", []);
1769
+ X(this, "seen", /* @__PURE__ */ new Set());
502
1770
  }
503
- add(s, n) {
504
- const o = n(s);
505
- this.seen.has(o) || (this.items.push(s), this.seen.add(o));
1771
+ add(n, t) {
1772
+ const a = t(n);
1773
+ this.seen.has(a) || (this.items.push(n), this.seen.add(a));
506
1774
  }
507
1775
  toArray() {
508
1776
  return this.items;
509
1777
  }
510
1778
  }
511
- class Oe {
1779
+ class mt {
512
1780
  constructor() {
513
- q(this, "children", /* @__PURE__ */ new Map());
514
- q(this, "isEndOfWord", !1);
515
- q(this, "value", "");
1781
+ X(this, "children", /* @__PURE__ */ new Map());
1782
+ X(this, "isEndOfWord", !1);
1783
+ X(this, "value", "");
516
1784
  }
517
1785
  }
518
- class et {
1786
+ class Gt {
519
1787
  constructor() {
520
- q(this, "root", new Oe());
1788
+ X(this, "root", new mt());
521
1789
  }
522
1790
  /**
523
1791
  * Inserts a word into the trie structure.
@@ -525,13 +1793,13 @@ class et {
525
1793
  *
526
1794
  * @param word - The string to insert into the trie
527
1795
  */
528
- insert(s) {
529
- let n = this.root;
530
- for (const o of s) {
531
- let r = n.children.get(o);
532
- r === void 0 && (r = new Oe(), n.children.set(o, r)), n = r;
1796
+ insert(n) {
1797
+ let t = this.root;
1798
+ for (const a of n) {
1799
+ let r = t.children.get(a);
1800
+ r === void 0 && (r = new mt(), t.children.set(a, r)), t = r;
533
1801
  }
534
- n.isEndOfWord = !0, n.value = s;
1802
+ t.isEndOfWord = !0, t.value = n;
535
1803
  }
536
1804
  /**
537
1805
  * Finds the longest prefix match for the given text.
@@ -540,25 +1808,25 @@ class et {
540
1808
  * @param text - The input string to find prefix matches for
541
1809
  * @returns Object containing the longest matching prefix and remaining text
542
1810
  */
543
- findLongestPrefix(s) {
544
- let n = this.root, o = { match: "", remaining: s };
545
- for (let r = 0; r < s.length; r++) {
546
- const i = s[r];
547
- if (!n.children.has(i))
1811
+ findLongestPrefix(n) {
1812
+ let t = this.root, a = { match: "", remaining: n };
1813
+ for (let r = 0; r < n.length; r++) {
1814
+ const o = n[r];
1815
+ if (!t.children.has(o))
548
1816
  break;
549
- n = n.children.get(i), n.isEndOfWord && (o = {
550
- match: n.value,
551
- remaining: s.slice(r + 1)
1817
+ t = t.children.get(o), t.isEndOfWord && (a = {
1818
+ match: t.value,
1819
+ remaining: n.slice(r + 1)
552
1820
  });
553
1821
  }
554
- return o;
1822
+ return a;
555
1823
  }
556
1824
  }
557
- var Ut = /* @__PURE__ */ ((e) => (e[e.Allow = 0] = "Allow", e[e.Denied = 1] = "Denied", e[e.Pending = 2] = "Pending", e))(Ut || {});
558
- class Vt extends et {
1825
+ var Zr = /* @__PURE__ */ ((e) => (e[e.Allow = 0] = "Allow", e[e.Denied = 1] = "Denied", e[e.Pending = 2] = "Pending", e))(Zr || {});
1826
+ class Qr extends Gt {
559
1827
  constructor() {
560
1828
  super(...arguments);
561
- q(this, "pathToKey", /* @__PURE__ */ new Map());
1829
+ X(this, "pathToKey", /* @__PURE__ */ new Map());
562
1830
  }
563
1831
  /**
564
1832
  * Normalizes a URL path by removing trailing slashes
@@ -566,8 +1834,8 @@ class Vt extends et {
566
1834
  * @param path - The path which is an URL string to normalize
567
1835
  * @returns The normalized path without trailing slash, except for root "/"
568
1836
  */
569
- normalizePath(n) {
570
- return n === "/" ? "/" : n.replace(/\/$/, "");
1837
+ normalizePath(t) {
1838
+ return t === "/" ? "/" : t.replace(/\/$/, "");
571
1839
  }
572
1840
  /**
573
1841
  * Inserts an url path into the trie and associates it with a menu key.
@@ -575,9 +1843,9 @@ class Vt extends et {
575
1843
  * @param path - The URL path to store (e.g., "/admin/users")
576
1844
  * @param menuKey - The menu key to associate with this path
577
1845
  */
578
- insertRoute(n, o) {
579
- const r = this.normalizePath(n);
580
- this.insert(r), this.pathToKey.set(r, o);
1846
+ insertRoute(t, a) {
1847
+ const r = this.normalizePath(t);
1848
+ this.insert(r), this.pathToKey.set(r, a);
581
1849
  }
582
1850
  /**
583
1851
  * Finds the menu key associated with the longest matching route prefix
@@ -585,156 +1853,156 @@ class Vt extends et {
585
1853
  * @param route - The URL to match against stored menu url paths
586
1854
  * @returns The menu key if a valid prefix match is found, undefined otherwise
587
1855
  */
588
- findMatchingKey(n) {
589
- const o = this.normalizePath(n), r = this.findLongestPrefix(o);
590
- if (r.match && this.pathToKey.has(r.match) && (o === r.match || r.remaining.startsWith("/") || r.remaining === ""))
1856
+ findMatchingKey(t) {
1857
+ const a = this.normalizePath(t), r = this.findLongestPrefix(a);
1858
+ if (r.match && this.pathToKey.has(r.match) && (a === r.match || r.remaining.startsWith("/") || r.remaining === ""))
591
1859
  return this.pathToKey.get(r.match);
592
1860
  }
593
1861
  }
594
- function Gt(e) {
595
- const s = {}, n = {}, o = {}, r = (i, a = []) => {
596
- i.forEach((c) => {
597
- const d = [...a, c.key];
598
- s[c.key] = c, n[c.key] = d, c.route !== void 0 && (o[c.key] = c.route), c.children !== void 0 && c.children.length > 0 && r(c.children, d);
1862
+ function ea(e) {
1863
+ const n = {}, t = {}, a = {}, r = (o, l = []) => {
1864
+ o.forEach((s) => {
1865
+ const u = [...l, s.key];
1866
+ n[s.key] = s, t[s.key] = u, s.route !== void 0 && (a[s.key] = s.route), s.children !== void 0 && s.children.length > 0 && r(s.children, u);
599
1867
  });
600
1868
  };
601
- return r(e), { key2item: s, key2fullpath: n, key2route: o };
1869
+ return r(e), { key2item: n, key2fullpath: t, key2route: a };
602
1870
  }
603
- function Yt(e) {
604
- const s = new Vt(), n = (o) => {
605
- o.forEach((r) => {
1871
+ function ta(e) {
1872
+ const n = new Qr(), t = (a) => {
1873
+ a.forEach((r) => {
606
1874
  if (r.route !== void 0) {
607
- const i = r.route.path.getURL();
608
- s.insertRoute(i, r.key);
1875
+ const o = r.route.path.getURL();
1876
+ n.insertRoute(o, r.key);
609
1877
  }
610
- r.children !== void 0 && r.children.length > 0 && n(r.children);
1878
+ r.children !== void 0 && r.children.length > 0 && t(r.children);
611
1879
  });
612
1880
  };
613
- return n(e), s;
614
- }
615
- function Wt(e, s) {
616
- return e.map((n) => {
617
- if (n.route !== void 0)
618
- return s(n.route.role) === 0 ? n : null;
619
- if (n.children !== void 0) {
620
- const o = n.children.filter((r) => r.route !== void 0 ? s(r.route.role) === 0 : !0);
621
- return o.length > 0 ? { ...n, children: o } : null;
1881
+ return t(e), n;
1882
+ }
1883
+ function na(e, n) {
1884
+ return e.map((t) => {
1885
+ if (t.route !== void 0)
1886
+ return n(t.route.role) === 0 ? t : null;
1887
+ if (t.children !== void 0) {
1888
+ const a = t.children.filter((r) => r.route !== void 0 ? n(r.route.role) === 0 : !0);
1889
+ return a.length > 0 ? { ...t, children: a } : null;
622
1890
  }
623
- return n;
624
- }).filter((n) => n !== null);
1891
+ return t;
1892
+ }).filter((t) => t !== null);
625
1893
  }
626
- const tr = (e) => {
627
- const s = We(), n = Pt(), [o, r] = _(/* @__PURE__ */ new Set()), [i, a] = _(/* @__PURE__ */ new Set()), [c, d] = _(), h = S(() => Wt(e.items, e.checkPermission), [e.items, e.checkPermission]), m = S(() => Yt(e.items), [e.items]), { key2fullpath: y, key2route: x } = S(
628
- () => Gt(h),
629
- [h]
1894
+ const so = (e) => {
1895
+ const n = Ye(), t = te(), [a, r] = _(/* @__PURE__ */ new Set()), [o, l] = _(/* @__PURE__ */ new Set()), [s, u] = _(), c = k(() => na(e.items, e.checkPermission), [e.items, e.checkPermission]), d = k(() => ta(e.items), [e.items]), { key2fullpath: x, key2route: g } = k(
1896
+ () => ea(c),
1897
+ [c]
630
1898
  );
631
- ce(() => {
632
- const v = n.pathname, u = m.findMatchingKey(v);
633
- u !== void 0 && (a(new Set(y[u])), d(u));
634
- }, [n, x]);
635
- const g = S(() => {
636
- function v(u, C) {
637
- var P, f;
638
- const O = u.children !== void 0 && u.children.length > 0;
639
- return O ? /* @__PURE__ */ t.jsxs(
1899
+ Te(() => {
1900
+ const v = t.pathname, h = d.findMatchingKey(v);
1901
+ h !== void 0 && (l(new Set(x[h])), u(h));
1902
+ }, [t, g]);
1903
+ const p = k(() => {
1904
+ function v(h, j) {
1905
+ var C, y;
1906
+ const b = h.children !== void 0 && h.children.length > 0;
1907
+ return b ? /* @__PURE__ */ i.jsxs(
640
1908
  "div",
641
1909
  {
642
1910
  onMouseEnter: () => {
643
- i.has(u.key) || r((b) => {
644
- const R = new Set(b);
645
- return R.add(u.key), R;
1911
+ o.has(h.key) || r((w) => {
1912
+ const R = new Set(w);
1913
+ return R.add(h.key), R;
646
1914
  });
647
1915
  },
648
1916
  onMouseLeave: () => {
649
- i.has(u.key) || r((b) => {
650
- const R = new Set(b);
651
- return R.delete(u.key), R;
1917
+ o.has(h.key) || r((w) => {
1918
+ const R = new Set(w);
1919
+ return R.delete(h.key), R;
652
1920
  });
653
1921
  },
654
1922
  children: [
655
- /* @__PURE__ */ t.jsx(
656
- Ee,
1923
+ /* @__PURE__ */ i.jsx(
1924
+ it,
657
1925
  {
658
- active: c === u.key,
659
- href: (P = u.route) == null ? void 0 : P.path.getURL(),
660
- label: u.label,
661
- leftSection: u.icon,
1926
+ active: s === h.key,
1927
+ href: (C = h.route) == null ? void 0 : C.path.getURL(),
1928
+ label: h.label,
1929
+ leftSection: h.icon,
662
1930
  styles: {
663
1931
  label: { fontSize: "md" },
664
1932
  root: {
665
1933
  borderRadius: "var(--mantine-radius-sm)"
666
1934
  }
667
1935
  },
668
- ml: C === 0 ? void 0 : C === 1 ? "md" : `calc(var(--mantine-spacing-md) * ${C})`,
1936
+ ml: j === 0 ? void 0 : j === 1 ? "md" : `calc(var(--mantine-spacing-md) * ${j})`,
669
1937
  w: "unset",
670
- rightSection: O ? /* @__PURE__ */ t.jsx(
671
- Nt,
1938
+ rightSection: b ? /* @__PURE__ */ i.jsx(
1939
+ jn,
672
1940
  {
673
1941
  size: 12,
674
1942
  stroke: 1.5,
675
1943
  className: "mantine-rotate-rtl"
676
1944
  }
677
1945
  ) : void 0,
678
- opened: o.has(u.key) || i.has(u.key),
679
- onClick: (b) => {
680
- b.ctrlKey || b.metaKey || (b.preventDefault(), a((ne) => {
681
- const H = new Set(ne);
682
- return ne.has(u.key) ? H.delete(u.key) : H.add(u.key), H;
1946
+ opened: a.has(h.key) || o.has(h.key),
1947
+ onClick: (w) => {
1948
+ w.ctrlKey || w.metaKey || (w.preventDefault(), l((U) => {
1949
+ const M = new Set(U);
1950
+ return U.has(h.key) ? M.delete(h.key) : M.add(h.key), M;
683
1951
  }));
684
1952
  }
685
1953
  },
686
- u.key
1954
+ h.key
687
1955
  ),
688
- (i.has(u.key) || o.has(u.key)) && u.children.map((b) => v(b, C + 1))
1956
+ (o.has(h.key) || a.has(h.key)) && h.children.map((w) => v(w, j + 1))
689
1957
  ]
690
1958
  },
691
- `container-${u.key}`
692
- ) : /* @__PURE__ */ t.jsx(
693
- Ee,
1959
+ `container-${h.key}`
1960
+ ) : /* @__PURE__ */ i.jsx(
1961
+ it,
694
1962
  {
695
- active: c === u.key,
696
- href: (f = u.route) == null ? void 0 : f.path.getURL(),
697
- label: u.label,
698
- leftSection: u.icon,
1963
+ active: s === h.key,
1964
+ href: (y = h.route) == null ? void 0 : y.path.getURL(),
1965
+ label: h.label,
1966
+ leftSection: h.icon,
699
1967
  styles: {
700
1968
  label: { fontSize: "md" },
701
1969
  root: {
702
1970
  borderRadius: "var(--mantine-radius-sm)"
703
1971
  }
704
1972
  },
705
- ml: C === 0 ? void 0 : C === 1 ? "md" : `calc(var(--mantine-spacing-md) * ${C})`,
1973
+ ml: j === 0 ? void 0 : j === 1 ? "md" : `calc(var(--mantine-spacing-md) * ${j})`,
706
1974
  w: "unset",
707
- onClick: (b) => {
708
- b.ctrlKey || b.metaKey || (b.preventDefault(), u.route != null && u.route.path.path().open(s));
1975
+ onClick: (w) => {
1976
+ w.ctrlKey || w.metaKey || (w.preventDefault(), h.route != null && h.route.path.path().open(n));
709
1977
  }
710
1978
  },
711
- u.key
1979
+ h.key
712
1980
  );
713
1981
  }
714
- return h.map((u) => v(u, 0));
715
- }, [h, c, i, o, s]);
716
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: g });
717
- }, ie = ({ value: e }) => /* @__PURE__ */ t.jsx(p, { size: "sm", children: e });
718
- function pe(e, s) {
719
- const n = s.getDate().toString().padStart(2, "0"), o = (s.getMonth() + 1).toString().padStart(2, "0"), r = s.getFullYear();
720
- return e.baseName === "en-US" ? `${o}/${n}/${r}` : e.baseName === "vi-VN" ? `${n}/${o}/${r}` : `${o}/${n}/${r}`;
721
- }
722
- const Ht = ({ value: e }) => {
723
- const s = le(te), n = S(() => {
724
- const o = e.getHours().toString().padStart(2, "0"), r = e.getMinutes().toString().padStart(2, "0"), i = e.getSeconds().toString().padStart(2, "0");
725
- return pe(s, e) + `${o}:${r}:${i}`;
726
- }, [s, e]);
727
- return /* @__PURE__ */ t.jsx(p, { size: "sm", children: n });
728
- }, Jt = ({ value: e }) => {
729
- const s = le(te), n = S(() => pe(s, e), [s, e]);
730
- return /* @__PURE__ */ t.jsx(p, { size: "sm", children: n });
731
- }, nr = ({ value: e }) => {
732
- const s = le(te), [n, o] = S(() => {
733
- const r = pe(s, e), i = e.getHours().toString().padStart(2, "0"), a = e.getMinutes().toString().padStart(2, "0"), c = e.getSeconds().toString().padStart(2, "0");
734
- return [r, `${i}:${a}:${c}`];
735
- }, [s, e]);
736
- return /* @__PURE__ */ t.jsx(p, { size: "sm", title: o, children: n });
737
- }, Zt = {
1982
+ return c.map((h) => v(h, 0));
1983
+ }, [c, s, o, a, n]);
1984
+ return /* @__PURE__ */ i.jsx(i.Fragment, { children: p });
1985
+ }, je = ({ value: e }) => /* @__PURE__ */ i.jsx(E, { size: "sm", children: e });
1986
+ function Qe(e, n) {
1987
+ const t = n.getDate().toString().padStart(2, "0"), a = (n.getMonth() + 1).toString().padStart(2, "0"), r = n.getFullYear();
1988
+ return e.baseName === "en-US" ? `${a}/${t}/${r}` : e.baseName === "vi-VN" ? `${t}/${a}/${r}` : `${a}/${t}/${r}`;
1989
+ }
1990
+ const ra = ({ value: e }) => {
1991
+ const n = ke(pe), t = k(() => {
1992
+ const a = e.getHours().toString().padStart(2, "0"), r = e.getMinutes().toString().padStart(2, "0"), o = e.getSeconds().toString().padStart(2, "0");
1993
+ return Qe(n, e) + `${a}:${r}:${o}`;
1994
+ }, [n, e]);
1995
+ return /* @__PURE__ */ i.jsx(E, { size: "sm", children: t });
1996
+ }, aa = ({ value: e }) => {
1997
+ const n = ke(pe), t = k(() => Qe(n, e), [n, e]);
1998
+ return /* @__PURE__ */ i.jsx(E, { size: "sm", children: t });
1999
+ }, uo = ({ value: e }) => {
2000
+ const n = ke(pe), [t, a] = k(() => {
2001
+ const r = Qe(n, e), o = e.getHours().toString().padStart(2, "0"), l = e.getMinutes().toString().padStart(2, "0"), s = e.getSeconds().toString().padStart(2, "0");
2002
+ return [r, `${o}:${l}:${s}`];
2003
+ }, [n, e]);
2004
+ return /* @__PURE__ */ i.jsx(E, { size: "sm", title: a, children: t });
2005
+ }, oa = {
738
2006
  yes: {
739
2007
  lang2value: {
740
2008
  en: "Yes",
@@ -749,482 +2017,482 @@ const Ht = ({ value: e }) => {
749
2017
  },
750
2018
  lang: "en"
751
2019
  }
752
- }, Xt = ({ value: e }) => /* @__PURE__ */ t.jsx(
753
- Q,
2020
+ }, ia = ({ value: e }) => /* @__PURE__ */ i.jsx(
2021
+ me,
754
2022
  {
755
2023
  checked: e,
756
- label: /* @__PURE__ */ t.jsx(F, { value: Zt[e ? "yes" : "no"] }),
2024
+ label: /* @__PURE__ */ i.jsx(O, { value: oa[e ? "yes" : "no"] }),
757
2025
  readOnly: !0
758
2026
  }
759
- ), Qt = ({
2027
+ ), la = ({
760
2028
  nestedProperty: e,
761
- property: s,
762
- value: n
2029
+ property: n,
2030
+ value: t
763
2031
  }) => {
764
- const o = e || s;
765
- if (W(o) || o.enumType === void 0)
2032
+ const a = e || n;
2033
+ if (se(a) || a.enumType === void 0)
766
2034
  throw new Error(
767
2035
  "Invalid usage of EnumDisplay. Expect a property of type enum"
768
2036
  );
769
- return /* @__PURE__ */ t.jsx(p, { size: "sm", children: /* @__PURE__ */ t.jsx(F, { value: o.enumType.label[n] }) });
2037
+ return /* @__PURE__ */ i.jsx(E, { size: "sm", children: /* @__PURE__ */ i.jsx(O, { value: a.enumType.label[t] }) });
770
2038
  };
771
- function tt(e, s, n, o) {
772
- const r = e.getByName(s.targetClass), i = o[s.targetClass];
773
- ce(() => {
774
- r.fetchByIds(n);
775
- }, [n]);
776
- const a = {};
777
- for (const c of n)
778
- a[c] = r.get(c);
779
- return [a, i];
780
- }
781
- const de = B(
2039
+ function Jt(e, n, t, a) {
2040
+ const r = e.getByName(n.targetClass), o = a[n.targetClass];
2041
+ Te(() => {
2042
+ r.fetchByIds(t);
2043
+ }, [t]);
2044
+ const l = {};
2045
+ for (const s of t)
2046
+ l[s] = r.get(s);
2047
+ return [l, o];
2048
+ }
2049
+ const Le = ee(
782
2050
  ({
783
2051
  db: e,
784
- property: s,
785
- value: n,
786
- entityRoutes: o
2052
+ property: n,
2053
+ value: t,
2054
+ entityRoutes: a
787
2055
  }) => {
788
- const r = S(() => [n], [n]), [i, a] = tt(
2056
+ const r = k(() => [t], [t]), [o, l] = Jt(
789
2057
  e,
790
- s,
2058
+ n,
791
2059
  r,
792
- o
793
- ), c = i[n];
794
- return c === void 0 ? /* @__PURE__ */ t.jsx(p, { size: "sm", children: n }) : c === null ? /* @__PURE__ */ t.jsx(Qe, {}) : a === void 0 ? /* @__PURE__ */ t.jsx(p, { size: "sm", children: c.name }) : /* @__PURE__ */ t.jsx(
795
- He,
2060
+ a
2061
+ ), s = o[t];
2062
+ return s === void 0 ? /* @__PURE__ */ i.jsx(E, { size: "sm", children: t }) : s === null ? /* @__PURE__ */ i.jsx(Yt, {}) : l === void 0 ? /* @__PURE__ */ i.jsx(E, { size: "sm", children: s.name }) : /* @__PURE__ */ i.jsx(
2063
+ Nt,
796
2064
  {
797
- path: a,
2065
+ path: l,
798
2066
  openInNewPage: !1,
799
- urlArgs: { id: c.id },
2067
+ urlArgs: { id: s.id },
800
2068
  queryArgs: {},
801
- children: c.name
2069
+ children: s.name
802
2070
  }
803
2071
  );
804
2072
  }
805
- ), ue = B(
2073
+ ), Fe = ee(
806
2074
  ({
807
2075
  db: e,
808
- property: s,
809
- value: n,
810
- entityRoutes: o
2076
+ property: n,
2077
+ value: t,
2078
+ entityRoutes: a
811
2079
  }) => {
812
- const [r, i] = tt(
2080
+ const [r, o] = Jt(
813
2081
  e,
814
- s,
815
2082
  n,
816
- o
2083
+ t,
2084
+ a
817
2085
  );
818
- return /* @__PURE__ */ t.jsx(A, { gap: "xs", children: n.map((a, c) => {
819
- const d = r[a];
820
- return d === void 0 ? /* @__PURE__ */ t.jsx(p, { size: "sm", children: n }, a) : d === null ? /* @__PURE__ */ t.jsx(Qe, {}, a) : i === void 0 ? /* @__PURE__ */ t.jsx(p, { size: "sm", children: d.name }, c) : /* @__PURE__ */ t.jsx(
821
- He,
2086
+ return /* @__PURE__ */ i.jsx(D, { gap: "xs", children: t.map((l, s) => {
2087
+ const u = r[l];
2088
+ return u === void 0 ? /* @__PURE__ */ i.jsx(E, { size: "sm", children: t }, l) : u === null ? /* @__PURE__ */ i.jsx(Yt, {}, l) : o === void 0 ? /* @__PURE__ */ i.jsx(E, { size: "sm", children: u.name }, s) : /* @__PURE__ */ i.jsx(
2089
+ Nt,
822
2090
  {
823
- path: i,
2091
+ path: o,
824
2092
  openInNewPage: !1,
825
- urlArgs: { id: d.id },
2093
+ urlArgs: { id: u.id },
826
2094
  queryArgs: {},
827
- children: d.name
2095
+ children: u.name
828
2096
  },
829
- c
2097
+ s
830
2098
  );
831
2099
  }) });
832
2100
  }
833
- ), K = {
834
- string: ie,
835
- integer: ie,
836
- float: ie,
837
- boolean: Xt,
838
- "string[]": ie,
839
- enum: Qt,
840
- datetime: Ht,
841
- date: Jt
842
- }, en = ({ property: e, value: s, onChange: n }) => /* @__PURE__ */ t.jsx(
843
- M,
2101
+ ), Q = {
2102
+ string: je,
2103
+ integer: je,
2104
+ float: je,
2105
+ boolean: ia,
2106
+ "string[]": je,
2107
+ enum: la,
2108
+ datetime: ra,
2109
+ date: aa
2110
+ }, sa = ({ property: e, value: n, onChange: t }) => /* @__PURE__ */ i.jsx(
2111
+ W,
844
2112
  {
845
2113
  id: e.name,
846
2114
  type: "checkbox",
847
- checked: s,
848
- onChange: (o) => {
849
- const r = o.target.checked;
850
- n(r);
2115
+ checked: n,
2116
+ onChange: (a) => {
2117
+ const r = a.target.checked;
2118
+ t(r);
851
2119
  }
852
2120
  }
853
- ), Pe = ({
2121
+ ), gt = ({
854
2122
  property: e,
855
- value: s,
856
- onChange: n
857
- }) => /* @__PURE__ */ t.jsx(
858
- M,
2123
+ value: n,
2124
+ onChange: t
2125
+ }) => /* @__PURE__ */ i.jsx(
2126
+ W,
859
2127
  {
860
2128
  id: e.name,
861
2129
  type: "number",
862
- value: s,
863
- onChange: (o) => {
864
- const r = o.target.value;
865
- n(r === "" ? void 0 : Number(r));
2130
+ value: n,
2131
+ onChange: (a) => {
2132
+ const r = a.target.value;
2133
+ t(r === "" ? void 0 : Number(r));
866
2134
  }
867
2135
  }
868
- ), tn = {
2136
+ ), ua = {
869
2137
  lang2value: {
870
2138
  en: "The leading zero is not necessary in international phone number format. For example, if your phone number is 0123456789, you should enter it as 123-456-789.",
871
2139
  vi: "Số 0 đầu tiên không cần thiết trong định dạng điện thoại quốc tế. Ví dụ, nếu số điện thoại của bạn là 0123456789, bạn nên nhập nó là 123-456-789."
872
2140
  },
873
2141
  lang: "en"
874
- }, nn = {
2142
+ }, ca = {
875
2143
  lang2value: {
876
2144
  en: "No valid country code found.",
877
2145
  vi: "Không tìm thấy mã quốc gia hợp lệ. "
878
2146
  },
879
2147
  lang: "en"
880
- }, Y = {
2148
+ }, le = {
881
2149
  84: {
882
2150
  name: "Vietnam",
883
- flags: [T.VN]
2151
+ flags: [N.VN]
884
2152
  },
885
2153
  1: {
886
2154
  name: "US, Canada",
887
- flags: [T.US, T.CA]
2155
+ flags: [N.US, N.CA]
888
2156
  },
889
2157
  61: {
890
2158
  name: "Australia",
891
- flags: [T.AU]
2159
+ flags: [N.AU]
892
2160
  },
893
2161
  81: {
894
2162
  name: "Japan",
895
- flags: [T.JP]
2163
+ flags: [N.JP]
896
2164
  },
897
2165
  44: {
898
2166
  name: "UK",
899
- flags: [T.UK]
2167
+ flags: [N.UK]
900
2168
  },
901
2169
  33: {
902
2170
  name: "France",
903
- flags: [T.FR]
2171
+ flags: [N.FR]
904
2172
  },
905
2173
  49: {
906
2174
  name: "Germany",
907
- flags: [T.DE]
2175
+ flags: [N.DE]
908
2176
  },
909
2177
  91: {
910
2178
  name: "India",
911
- flags: [T.IN]
2179
+ flags: [N.IN]
912
2180
  },
913
2181
  55: {
914
2182
  name: "Brazil",
915
- flags: [T.BR]
2183
+ flags: [N.BR]
916
2184
  },
917
2185
  34: {
918
2186
  name: "Spain",
919
- flags: [T.ES]
2187
+ flags: [N.ES]
920
2188
  },
921
2189
  39: {
922
2190
  name: "Italy",
923
- flags: [T.IT]
2191
+ flags: [N.IT]
924
2192
  },
925
2193
  64: {
926
2194
  name: "New Zealand",
927
- flags: [T.NZ]
2195
+ flags: [N.NZ]
928
2196
  },
929
2197
  52: {
930
2198
  name: "Mexico",
931
- flags: [T.MX]
2199
+ flags: [N.MX]
932
2200
  },
933
2201
  86: {
934
2202
  name: "China",
935
- flags: [T.CN]
2203
+ flags: [N.CN]
936
2204
  }
937
- }, rn = (e, s) => {
2205
+ }, da = (e, n) => {
938
2206
  if (e === "")
939
2207
  return { match: "84", remaining: "" };
940
- const n = e.replace(/[^\d]/g, ""), o = s.findLongestPrefix(n);
941
- if (o.match === "")
2208
+ const t = e.replace(/[^\d]/g, ""), a = n.findLongestPrefix(t);
2209
+ if (a.match === "")
942
2210
  throw new Error(`No valid country code found for phone number: ${e}`);
943
- return o;
944
- }, Le = ({ value: e }) => {
945
- const s = Y[e];
946
- if (s !== void 0)
947
- return /* @__PURE__ */ t.jsxs(A, { gap: "sm", wrap: "nowrap", align: "center", children: [
948
- /* @__PURE__ */ t.jsxs(p, { size: "sm", children: [
2211
+ return a;
2212
+ }, pt = ({ value: e }) => {
2213
+ const n = le[e];
2214
+ if (n !== void 0)
2215
+ return /* @__PURE__ */ i.jsxs(D, { gap: "sm", wrap: "nowrap", align: "center", children: [
2216
+ /* @__PURE__ */ i.jsxs(E, { size: "sm", children: [
949
2217
  "+",
950
2218
  e
951
2219
  ] }),
952
- /* @__PURE__ */ t.jsx(A, { gap: 4, wrap: "nowrap", children: s.flags.map((n, o) => /* @__PURE__ */ t.jsx(ve, { flag: n }, o)) })
2220
+ /* @__PURE__ */ i.jsx(D, { gap: 4, wrap: "nowrap", children: n.flags.map((t, a) => /* @__PURE__ */ i.jsx(Be, { flag: t }, a)) })
953
2221
  ] });
954
- }, on = ({
2222
+ }, fa = ({
955
2223
  value: e,
956
- onChange: s,
957
- error: n,
958
- id: o
2224
+ onChange: n,
2225
+ error: t,
2226
+ id: a
959
2227
  }) => {
960
- const [r, i] = _(""), [a, c] = _(!1), [d, h] = _(""), [m, y] = _(!1), x = S(() => {
961
- const f = new et();
962
- return Object.keys(Y).forEach((b) => {
963
- f.insert(b);
964
- }), f;
965
- }, [Y]), { rawInput: g } = S(() => {
2228
+ const [r, o] = _(""), [l, s] = _(!1), [u, c] = _(""), [d, x] = _(!1), g = k(() => {
2229
+ const y = new Gt();
2230
+ return Object.keys(le).forEach((w) => {
2231
+ y.insert(w);
2232
+ }), y;
2233
+ }, [le]), { rawInput: p } = k(() => {
966
2234
  try {
967
- const { match: f, remaining: b } = rn(
2235
+ const { match: y, remaining: w } = da(
968
2236
  e,
969
- x
2237
+ g
970
2238
  );
971
- return h(f), y(!1), {
972
- rawInput: b
2239
+ return c(y), x(!1), {
2240
+ rawInput: w
973
2241
  };
974
2242
  } catch {
975
- return y(!0), h(""), {
2243
+ return x(!0), c(""), {
976
2244
  rawInput: e
977
2245
  };
978
2246
  }
979
- }, [e]), v = Be({
2247
+ }, [e]), v = St({
980
2248
  onDropdownClose: () => {
981
- v.resetSelectedOption(), i("");
2249
+ v.resetSelectedOption(), o("");
982
2250
  },
983
2251
  onDropdownOpen: () => {
984
2252
  v.updateSelectedOptionIndex("active");
985
2253
  }
986
- }), u = S(() => Object.keys(Y), [Y]), C = (f, b) => {
987
- const R = f.replace(/[^\d]/g, "");
988
- return R.length === 0 ? `+${b}` : R.startsWith("0") ? (c(!0), `+${b}${R}`) : (c(!1), `+${b}${R}`);
989
- }, O = S(() => u.filter((f) => Y[f].name.toLowerCase().includes(r.toLowerCase()) || f.includes(r)), [r, u]), P = S(() => O.map((f, b) => /* @__PURE__ */ t.jsx(E.Option, { value: f, children: /* @__PURE__ */ t.jsx(Le, { value: f }) }, b)), [O]);
990
- return /* @__PURE__ */ t.jsxs("div", { children: [
991
- /* @__PURE__ */ t.jsx(I, { gutter: "xs", children: /* @__PURE__ */ t.jsx(I.Col, { children: /* @__PURE__ */ t.jsxs(A, { gap: 5, children: [
992
- /* @__PURE__ */ t.jsxs(
993
- E,
2254
+ }), h = k(() => Object.keys(le), [le]), j = (y, w) => {
2255
+ const R = y.replace(/[^\d]/g, "");
2256
+ return R.length === 0 ? `+${w}` : R.startsWith("0") ? (s(!0), `+${w}${R}`) : (s(!1), `+${w}${R}`);
2257
+ }, b = k(() => h.filter((y) => le[y].name.toLowerCase().includes(r.toLowerCase()) || y.includes(r)), [r, h]), C = k(() => b.map((y, w) => /* @__PURE__ */ i.jsx(F.Option, { value: y, children: /* @__PURE__ */ i.jsx(pt, { value: y }) }, w)), [b]);
2258
+ return /* @__PURE__ */ i.jsxs("div", { children: [
2259
+ /* @__PURE__ */ i.jsx(A, { gutter: "xs", children: /* @__PURE__ */ i.jsx(A.Col, { children: /* @__PURE__ */ i.jsxs(D, { gap: 5, children: [
2260
+ /* @__PURE__ */ i.jsxs(
2261
+ F,
994
2262
  {
995
2263
  store: v,
996
2264
  position: "top-start",
997
- onOptionSubmit: (f) => {
998
- i(""), v.closeDropdown(), s({
999
- target: { value: C(g, f) }
2265
+ onOptionSubmit: (y) => {
2266
+ o(""), v.closeDropdown(), n({
2267
+ target: { value: j(p, y) }
1000
2268
  });
1001
2269
  },
1002
2270
  children: [
1003
- /* @__PURE__ */ t.jsx(E.Target, { children: /* @__PURE__ */ t.jsx(
1004
- vt,
2271
+ /* @__PURE__ */ i.jsx(F.Target, { children: /* @__PURE__ */ i.jsx(
2272
+ fn,
1005
2273
  {
1006
2274
  component: "button",
1007
2275
  type: "button",
1008
2276
  pointer: !0,
1009
- rightSection: /* @__PURE__ */ t.jsx(E.Chevron, {}),
2277
+ rightSection: /* @__PURE__ */ i.jsx(F.Chevron, {}),
1010
2278
  onClick: () => v.toggleDropdown(),
1011
2279
  rightSectionPointerEvents: "none",
1012
2280
  w: 110,
1013
- children: /* @__PURE__ */ t.jsx(Le, { value: d })
2281
+ children: /* @__PURE__ */ i.jsx(pt, { value: u })
1014
2282
  }
1015
2283
  ) }),
1016
- /* @__PURE__ */ t.jsxs(E.Dropdown, { children: [
1017
- /* @__PURE__ */ t.jsx(
1018
- E.Search,
2284
+ /* @__PURE__ */ i.jsxs(F.Dropdown, { children: [
2285
+ /* @__PURE__ */ i.jsx(
2286
+ F.Search,
1019
2287
  {
1020
- leftSection: /* @__PURE__ */ t.jsx(Ge, { size: 14, stroke: 1.5 }),
2288
+ leftSection: /* @__PURE__ */ i.jsx(Et, { size: 14, stroke: 1.5 }),
1021
2289
  placeholder: ".....",
1022
2290
  value: r,
1023
- onChange: (f) => i(f.currentTarget.value)
2291
+ onChange: (y) => o(y.currentTarget.value)
1024
2292
  }
1025
2293
  ),
1026
- /* @__PURE__ */ t.jsx(E.Options, { children: P.length > 0 ? P : /* @__PURE__ */ t.jsx(E.Empty, { children: /* @__PURE__ */ t.jsx(p, { size: "sm", children: "Nothing found" }) }) })
2294
+ /* @__PURE__ */ i.jsx(F.Options, { children: C.length > 0 ? C : /* @__PURE__ */ i.jsx(F.Empty, { children: /* @__PURE__ */ i.jsx(E, { size: "sm", children: "Nothing found" }) }) })
1027
2295
  ] })
1028
2296
  ]
1029
2297
  }
1030
2298
  ),
1031
- d === "" ? /* @__PURE__ */ t.jsx(
1032
- M,
2299
+ u === "" ? /* @__PURE__ */ i.jsx(
2300
+ W,
1033
2301
  {
1034
- id: o,
1035
- value: g,
2302
+ id: a,
2303
+ value: p,
1036
2304
  type: "phone_number",
1037
- onChange: (f) => {
1038
- s({ target: { value: f.target.value } });
2305
+ onChange: (y) => {
2306
+ n({ target: { value: y.target.value } });
1039
2307
  },
1040
- error: n,
2308
+ error: t,
1041
2309
  flex: 1
1042
2310
  }
1043
- ) : /* @__PURE__ */ t.jsx(
1044
- M,
2311
+ ) : /* @__PURE__ */ i.jsx(
2312
+ W,
1045
2313
  {
1046
- id: o,
1047
- value: g,
2314
+ id: a,
2315
+ value: p,
1048
2316
  type: "phone_number",
1049
- onAccept: (f) => {
1050
- const b = f.replace(/[^\d]/g, "");
1051
- s({
1052
- target: { value: C(b, d) }
2317
+ onAccept: (y) => {
2318
+ const w = y.replace(/[^\d]/g, "");
2319
+ n({
2320
+ target: { value: j(w, u) }
1053
2321
  });
1054
2322
  },
1055
- component: Lt,
2323
+ component: Nn,
1056
2324
  mask: "000-000-0000",
1057
- error: n,
2325
+ error: t,
1058
2326
  flex: 1
1059
2327
  }
1060
2328
  )
1061
2329
  ] }) }) }),
1062
- (a || m || n && typeof n == "string") && /* @__PURE__ */ t.jsx(I, { gutter: "xs", children: /* @__PURE__ */ t.jsx(I.Col, { children: /* @__PURE__ */ t.jsx(M.Error, { children: a ? /* @__PURE__ */ t.jsx(F, { value: tn }) : m ? /* @__PURE__ */ t.jsx(F, { value: nn }) : n }) }) })
2330
+ (l || d || t && typeof t == "string") && /* @__PURE__ */ i.jsx(A, { gutter: "xs", children: /* @__PURE__ */ i.jsx(A.Col, { children: /* @__PURE__ */ i.jsx(W.Error, { children: l ? /* @__PURE__ */ i.jsx(O, { value: ua }) : d ? /* @__PURE__ */ i.jsx(O, { value: ca }) : t }) }) })
1063
2331
  ] });
1064
- }, je = ({
2332
+ }, ze = ({
1065
2333
  property: e,
1066
- error: s,
1067
- value: n,
1068
- onChange: o
2334
+ error: n,
2335
+ value: t,
2336
+ onChange: a
1069
2337
  }) => {
1070
- const [r, i] = S(() => e.constraints.includes("password") ? ["password", bt] : e.constraints.includes("phone_number") ? ["phone_number", on] : [e.constraints.includes("email") ? "email" : e.constraints.includes("url") ? "url" : "text", M], [e.constraints]);
1071
- return /* @__PURE__ */ t.jsx(
1072
- i,
2338
+ const [r, o] = k(() => e.constraints.includes("password") ? ["password", hn] : e.constraints.includes("phone_number") ? ["phone_number", fa] : [e.constraints.includes("email") ? "email" : e.constraints.includes("url") ? "url" : "text", W], [e.constraints]);
2339
+ return /* @__PURE__ */ i.jsx(
2340
+ o,
1073
2341
  {
1074
2342
  id: e.name,
1075
- value: n,
2343
+ value: t,
1076
2344
  type: r,
1077
- onChange: (a) => o(a.target.value),
1078
- error: s
2345
+ onChange: (l) => a(l.target.value),
2346
+ error: n
1079
2347
  }
1080
2348
  );
1081
- }, ze = {
1082
- integer: Pe,
1083
- float: Pe,
1084
- string: je,
1085
- boolean: en,
1086
- "string[]": je,
1087
- enum: je
2349
+ }, xt = {
2350
+ integer: gt,
2351
+ float: gt,
2352
+ string: ze,
2353
+ boolean: sa,
2354
+ "string[]": ze,
2355
+ enum: ze
1088
2356
  };
1089
- function sn(e, s) {
1090
- const [n, o] = _(""), [r, i] = _([]);
1091
- return ce(() => {
1092
- e.getByName(s.targetClass).fetch({ limit: 100, offset: 0 }).then((c) => i(c.records));
1093
- }, [s.name]), {
2357
+ function ha(e, n) {
2358
+ const [t, a] = _(""), [r, o] = _([]);
2359
+ return Te(() => {
2360
+ e.getByName(n.targetClass).fetch({ limit: 100, offset: 0 }).then((s) => o(s.records));
2361
+ }, [n.name]), {
1094
2362
  data: r,
1095
- query: n,
1096
- setQuery: (c) => {
1097
- o(c);
1098
- const d = e.getByName(s.targetClass);
1099
- i(
1100
- d.filter(
1101
- (h) => h.name.toLowerCase().includes(c.toLowerCase())
2363
+ query: t,
2364
+ setQuery: (s) => {
2365
+ a(s);
2366
+ const u = e.getByName(n.targetClass);
2367
+ o(
2368
+ u.filter(
2369
+ (c) => c.name.toLowerCase().includes(s.toLowerCase())
1102
2370
  )
1103
2371
  );
1104
2372
  },
1105
- table: e.getByName(s.targetClass)
2373
+ table: e.getByName(n.targetClass)
1106
2374
  };
1107
2375
  }
1108
- const an = (e) => e.name, ln = (e) => /* @__PURE__ */ t.jsx(p, { size: "sm", children: e.name }), cn = B(
1109
- (e) => /* @__PURE__ */ t.jsx("h1", { children: "SingleForeignKey" })
1110
- ), dn = B(
2376
+ const ma = (e) => e.name, ga = (e) => /* @__PURE__ */ i.jsx(E, { size: "sm", children: e.name }), pa = ee(
2377
+ (e) => /* @__PURE__ */ i.jsx("h1", { children: "SingleForeignKey" })
2378
+ ), xa = ee(
1111
2379
  ({
1112
2380
  db: e,
1113
- property: s,
1114
- value: n,
1115
- onChange: o
2381
+ property: n,
2382
+ value: t,
2383
+ onChange: a
1116
2384
  }) => {
1117
- const { table: r, data: i, query: a, setQuery: c } = sn(
2385
+ const { table: r, data: o, query: l, setQuery: s } = ha(
1118
2386
  e,
1119
- s
2387
+ n
1120
2388
  );
1121
- return /* @__PURE__ */ t.jsxs(ee, { gap: "sm", children: [
1122
- /* @__PURE__ */ t.jsx(
1123
- un,
2389
+ return /* @__PURE__ */ i.jsxs(ge, { gap: "sm", children: [
2390
+ /* @__PURE__ */ i.jsx(
2391
+ va,
1124
2392
  {
1125
- name: s.name,
1126
- query: a,
1127
- setQuery: c,
1128
- data: i,
1129
- onSelect: (d) => {
1130
- n.includes(d) || o([...n, d]);
2393
+ name: n.name,
2394
+ query: l,
2395
+ setQuery: s,
2396
+ data: o,
2397
+ onSelect: (u) => {
2398
+ t.includes(u) || a([...t, u]);
1131
2399
  },
1132
- renderOption: an,
1133
- isIdInteger: s.datatype === "integer"
2400
+ renderOption: ma,
2401
+ isIdInteger: n.datatype === "integer"
1134
2402
  }
1135
2403
  ),
1136
- /* @__PURE__ */ t.jsx(
1137
- gn,
2404
+ /* @__PURE__ */ i.jsx(
2405
+ ya,
1138
2406
  {
1139
- items: n.map((d) => r.get(d)),
1140
- onDelete: (d) => {
1141
- o(n.filter((h) => h !== d.id));
2407
+ items: t.map((u) => r.get(u)),
2408
+ onDelete: (u) => {
2409
+ a(t.filter((c) => c !== u.id));
1142
2410
  },
1143
- render: ln
2411
+ render: ga
1144
2412
  }
1145
2413
  )
1146
2414
  ] });
1147
2415
  }
1148
- ), un = ({
2416
+ ), va = ({
1149
2417
  name: e,
1150
- data: s,
1151
- onSelect: n,
1152
- renderOption: o,
2418
+ data: n,
2419
+ onSelect: t,
2420
+ renderOption: a,
1153
2421
  isIdInteger: r,
1154
- query: i,
1155
- setQuery: a
2422
+ query: o,
2423
+ setQuery: l
1156
2424
  }) => {
1157
- const c = Be({
1158
- onDropdownClose: () => c.resetSelectedOption()
1159
- }), d = S(() => s.map((h) => (
2425
+ const s = St({
2426
+ onDropdownClose: () => s.resetSelectedOption()
2427
+ }), u = k(() => n.map((c) => (
1160
2428
  // value has to be a string
1161
- /* @__PURE__ */ t.jsx(E.Option, { value: h.id.toString(), children: o(h) }, h.id)
1162
- )), [s]);
1163
- return /* @__PURE__ */ t.jsxs(
1164
- E,
2429
+ /* @__PURE__ */ i.jsx(F.Option, { value: c.id.toString(), children: a(c) }, c.id)
2430
+ )), [n]);
2431
+ return /* @__PURE__ */ i.jsxs(
2432
+ F,
1165
2433
  {
1166
- store: c,
1167
- onOptionSubmit: (h) => {
1168
- n(r ? parseInt(h) : h), a(""), c.closeDropdown();
2434
+ store: s,
2435
+ onOptionSubmit: (c) => {
2436
+ t(r ? parseInt(c) : c), l(""), s.closeDropdown();
1169
2437
  },
1170
2438
  offset: 0,
1171
2439
  shadow: "sm",
1172
2440
  children: [
1173
- /* @__PURE__ */ t.jsx(E.Target, { children: /* @__PURE__ */ t.jsx(
1174
- M,
2441
+ /* @__PURE__ */ i.jsx(F.Target, { children: /* @__PURE__ */ i.jsx(
2442
+ W,
1175
2443
  {
1176
2444
  id: e,
1177
2445
  pointer: !0,
1178
- rightSection: /* @__PURE__ */ t.jsx(Ge, { size: 16, stroke: 1.5 }),
2446
+ rightSection: /* @__PURE__ */ i.jsx(Et, { size: 16, stroke: 1.5 }),
1179
2447
  rightSectionPointerEvents: "none",
1180
- onClick: () => c.toggleDropdown(),
2448
+ onClick: () => s.toggleDropdown(),
1181
2449
  placeholder: "Type to search...",
1182
- value: i,
1183
- onChange: (h) => {
1184
- a(h.currentTarget.value);
2450
+ value: o,
2451
+ onChange: (c) => {
2452
+ l(c.currentTarget.value);
1185
2453
  }
1186
2454
  }
1187
2455
  ) }),
1188
- /* @__PURE__ */ t.jsx(E.Dropdown, { children: /* @__PURE__ */ t.jsx(E.Options, { children: d.length === 0 ? /* @__PURE__ */ t.jsx(E.Empty, { children: "Nothing found" }) : d }) })
2456
+ /* @__PURE__ */ i.jsx(F.Dropdown, { children: /* @__PURE__ */ i.jsx(F.Options, { children: u.length === 0 ? /* @__PURE__ */ i.jsx(F.Empty, { children: "Nothing found" }) : u }) })
1189
2457
  ]
1190
2458
  }
1191
2459
  );
1192
- }, gn = ({
2460
+ }, ya = ({
1193
2461
  items: e,
1194
- onDelete: s,
1195
- render: n
2462
+ onDelete: n,
2463
+ render: t
1196
2464
  }) => {
1197
- const o = S(() => {
2465
+ const a = k(() => {
1198
2466
  const r = [];
1199
- for (let i = 0; i < e.length; i++) {
1200
- const a = e[i];
2467
+ for (let o = 0; o < e.length; o++) {
2468
+ const l = e[o];
1201
2469
  r.push(
1202
- /* @__PURE__ */ t.jsxs(A, { justify: "space-between", p: "sm", children: [
1203
- n(a),
1204
- /* @__PURE__ */ t.jsx(yt, { size: "sm", onClick: () => s(a) })
1205
- ] }, i)
1206
- ), i < e.length - 1 && r.push(/* @__PURE__ */ t.jsx(pt, {}, `divider-${i}`));
2470
+ /* @__PURE__ */ i.jsxs(D, { justify: "space-between", p: "sm", children: [
2471
+ t(l),
2472
+ /* @__PURE__ */ i.jsx(mn, { size: "sm", onClick: () => n(l) })
2473
+ ] }, o)
2474
+ ), o < e.length - 1 && r.push(/* @__PURE__ */ i.jsx(gn, {}, `divider-${o}`));
1207
2475
  }
1208
2476
  return r;
1209
2477
  }, [e]);
1210
- if (o.length !== 0)
1211
- return /* @__PURE__ */ t.jsx(U, { bd: "1px solid #ddd", children: o });
1212
- }, hn = "_requiredLabelLeft_l5p83_1", fn = "_requiredLabelRight_l5p83_11", De = {
1213
- requiredLabelLeft: hn,
1214
- requiredLabelRight: fn
1215
- }, mn = ({
2478
+ if (a.length !== 0)
2479
+ return /* @__PURE__ */ i.jsx(re, { bd: "1px solid #ddd", children: a });
2480
+ }, ba = "_requiredLabelLeft_l5p83_1", wa = "_requiredLabelRight_l5p83_11", vt = {
2481
+ requiredLabelLeft: ba,
2482
+ requiredLabelRight: wa
2483
+ }, ja = ({
1216
2484
  label: e,
1217
- name: s,
1218
- required: n = !1,
1219
- tooltip: o,
2485
+ name: n,
2486
+ required: t = !1,
2487
+ tooltip: a,
1220
2488
  style: r,
1221
- align: i = "left"
2489
+ align: o = "left"
1222
2490
  }) => {
1223
- const a = n ? i === "left" ? De.requiredLabelRight : De.requiredLabelLeft : "";
1224
- return /* @__PURE__ */ t.jsx(z, { align: "center", h: 36, children: /* @__PURE__ */ t.jsx("label", { htmlFor: s, style: r, children: /* @__PURE__ */ t.jsxs(A, { gap: 4, children: [
1225
- /* @__PURE__ */ t.jsx(p, { size: "sm", className: a, children: e }),
1226
- o !== void 0 && /* @__PURE__ */ t.jsx(Ue, { label: o, withArrow: !0, children: /* @__PURE__ */ t.jsx(
1227
- Ye,
2491
+ const l = t ? o === "left" ? vt.requiredLabelRight : vt.requiredLabelLeft : "";
2492
+ return /* @__PURE__ */ i.jsx(B, { align: "center", h: 36, children: /* @__PURE__ */ i.jsx("label", { htmlFor: n, style: r, children: /* @__PURE__ */ i.jsxs(D, { gap: 4, children: [
2493
+ /* @__PURE__ */ i.jsx(E, { size: "sm", className: l, children: e }),
2494
+ a !== void 0 && /* @__PURE__ */ i.jsx(Ct, { label: a, withArrow: !0, children: /* @__PURE__ */ i.jsx(
2495
+ kt,
1228
2496
  {
1229
2497
  size: 16,
1230
2498
  stroke: 1.5,
@@ -1232,80 +2500,80 @@ const an = (e) => e.name, ln = (e) => /* @__PURE__ */ t.jsx(p, { size: "sm", chi
1232
2500
  }
1233
2501
  ) })
1234
2502
  ] }) }) });
1235
- }, xn = {
2503
+ }, Sa = {
1236
2504
  type: "vertical",
1237
2505
  helpAlwaysVisible: !1
1238
- }, jn = B(
2506
+ }, Ca = ee(
1239
2507
  ({
1240
2508
  store: e,
1241
- record: s,
1242
- property: n,
1243
- layout: o = xn,
2509
+ record: n,
2510
+ property: t,
2511
+ layout: a = Sa,
1244
2512
  InputComponent: r,
1245
- validator: i
2513
+ validator: o
1246
2514
  }) => {
1247
- const [a, c] = _(void 0), d = s[n.tsName], h = (y) => {
1248
- var g;
1249
- if (Je(s))
1250
- s[n.updateFuncName](y);
2515
+ const [l, s] = _(void 0), u = n[t.tsName], c = (x) => {
2516
+ var p;
2517
+ if (Tt(n))
2518
+ n[t.updateFuncName](x);
1251
2519
  else {
1252
- const v = s.toDraft();
1253
- v[n.updateFuncName](y), e.setDraft(v);
2520
+ const v = n.toDraft();
2521
+ v[t.updateFuncName](x), e.setDraft(v);
1254
2522
  }
1255
- const x = i(y);
1256
- x.isValid ? c(void 0) : c(
1257
- (g = x.errorMessage) == null ? void 0 : g.t({ args: { name: n.label } })
2523
+ const g = o(x);
2524
+ g.isValid ? s(void 0) : s(
2525
+ (p = g.errorMessage) == null ? void 0 : p.t({ args: { name: t.label } })
1258
2526
  );
1259
2527
  };
1260
- if (vn(o))
1261
- return /* @__PURE__ */ t.jsxs(ee, { gap: 5, children: [
1262
- /* @__PURE__ */ t.jsxs(I, { gutter: "sm", children: [
1263
- /* @__PURE__ */ t.jsx(
1264
- I.Col,
2528
+ if (Ra(a))
2529
+ return /* @__PURE__ */ i.jsxs(ge, { gap: 5, children: [
2530
+ /* @__PURE__ */ i.jsxs(A, { gutter: "sm", children: [
2531
+ /* @__PURE__ */ i.jsx(
2532
+ A.Col,
1265
2533
  {
1266
- span: o.labelCol,
2534
+ span: a.labelCol,
1267
2535
  style: {
1268
2536
  display: "flex",
1269
- justifyContent: o.align || "left"
2537
+ justifyContent: a.align || "left"
1270
2538
  },
1271
- children: /* @__PURE__ */ t.jsx(
1272
- mn,
2539
+ children: /* @__PURE__ */ i.jsx(
2540
+ ja,
1273
2541
  {
1274
- label: /* @__PURE__ */ t.jsx(F, { value: n.label }),
1275
- name: n.name,
1276
- required: n.isRequired,
1277
- tooltip: n.description !== void 0 ? /* @__PURE__ */ t.jsx(F, { value: n.description }) : void 0,
1278
- align: o.align
2542
+ label: /* @__PURE__ */ i.jsx(O, { value: t.label }),
2543
+ name: t.name,
2544
+ required: t.isRequired,
2545
+ tooltip: t.description !== void 0 ? /* @__PURE__ */ i.jsx(O, { value: t.description }) : void 0,
2546
+ align: a.align
1279
2547
  }
1280
2548
  )
1281
2549
  }
1282
2550
  ),
1283
- /* @__PURE__ */ t.jsx(I.Col, { span: o.itemCol, children: /* @__PURE__ */ t.jsx(
2551
+ /* @__PURE__ */ i.jsx(A.Col, { span: a.itemCol, children: /* @__PURE__ */ i.jsx(
1284
2552
  r,
1285
2553
  {
1286
2554
  db: e.db,
1287
- property: n,
1288
- value: d,
1289
- error: a !== void 0,
1290
- onChange: h
2555
+ property: t,
2556
+ value: u,
2557
+ error: l !== void 0,
2558
+ onChange: c
1291
2559
  }
1292
2560
  ) })
1293
2561
  ] }),
1294
- a !== void 0 && /* @__PURE__ */ t.jsxs(I, { gutter: "sm", children: [
1295
- /* @__PURE__ */ t.jsx(I.Col, { span: o.labelCol }),
1296
- /* @__PURE__ */ t.jsx(I.Col, { span: o.itemCol, children: /* @__PURE__ */ t.jsx(M.Error, { children: a }) })
2562
+ l !== void 0 && /* @__PURE__ */ i.jsxs(A, { gutter: "sm", children: [
2563
+ /* @__PURE__ */ i.jsx(A.Col, { span: a.labelCol }),
2564
+ /* @__PURE__ */ i.jsx(A.Col, { span: a.itemCol, children: /* @__PURE__ */ i.jsx(W.Error, { children: l }) })
1297
2565
  ] })
1298
2566
  ] });
1299
- let m = /* @__PURE__ */ t.jsx(F, { value: n.label });
1300
- return !o.helpAlwaysVisible && n.description !== void 0 && (m = /* @__PURE__ */ t.jsxs(A, { gap: 4, style: { display: "inline-flex" }, children: [
1301
- m,
1302
- /* @__PURE__ */ t.jsx(
1303
- Ue,
2567
+ let d = /* @__PURE__ */ i.jsx(O, { value: t.label });
2568
+ return !a.helpAlwaysVisible && t.description !== void 0 && (d = /* @__PURE__ */ i.jsxs(D, { gap: 4, style: { display: "inline-flex" }, children: [
2569
+ d,
2570
+ /* @__PURE__ */ i.jsx(
2571
+ Ct,
1304
2572
  {
1305
- label: /* @__PURE__ */ t.jsx(F, { value: n.description }),
2573
+ label: /* @__PURE__ */ i.jsx(O, { value: t.description }),
1306
2574
  withArrow: !0,
1307
- children: /* @__PURE__ */ t.jsx(
1308
- Ye,
2575
+ children: /* @__PURE__ */ i.jsx(
2576
+ kt,
1309
2577
  {
1310
2578
  size: 16,
1311
2579
  stroke: 1.5,
@@ -1314,61 +2582,61 @@ const an = (e) => e.name, ln = (e) => /* @__PURE__ */ t.jsx(p, { size: "sm", chi
1314
2582
  )
1315
2583
  }
1316
2584
  )
1317
- ] })), /* @__PURE__ */ t.jsx(
1318
- M.Wrapper,
2585
+ ] })), /* @__PURE__ */ i.jsx(
2586
+ W.Wrapper,
1319
2587
  {
1320
- label: m,
1321
- description: o.helpAlwaysVisible && n.description !== void 0 ? /* @__PURE__ */ t.jsx(F, { value: n.description }) : void 0,
1322
- required: n.isRequired,
1323
- children: /* @__PURE__ */ t.jsx(
2588
+ label: d,
2589
+ description: a.helpAlwaysVisible && t.description !== void 0 ? /* @__PURE__ */ i.jsx(O, { value: t.description }) : void 0,
2590
+ required: t.isRequired,
2591
+ children: /* @__PURE__ */ i.jsx(
1324
2592
  r,
1325
2593
  {
1326
2594
  db: e.db,
1327
- property: n,
1328
- value: d,
1329
- error: a,
1330
- onChange: h
2595
+ property: t,
2596
+ value: u,
2597
+ error: l,
2598
+ onChange: c
1331
2599
  }
1332
2600
  )
1333
2601
  }
1334
2602
  );
1335
2603
  }
1336
2604
  );
1337
- function vn(e) {
2605
+ function Ra(e) {
1338
2606
  return e.type === "horizontal";
1339
2607
  }
1340
- const Me = 12, rr = (e) => {
1341
- const s = e.schema, n = S(() => {
1342
- const o = Math.max(
1343
- ...e.fieldGroups.map((r) => Math.max(...r.fields.map((i) => i.length)))
2608
+ const yt = 12, co = (e) => {
2609
+ const n = e.schema, t = k(() => {
2610
+ const a = Math.max(
2611
+ ...e.fieldGroups.map((r) => Math.max(...r.fields.map((o) => o.length)))
1344
2612
  );
1345
- return e.fieldGroups.map((r, i) => bn(
1346
- s,
2613
+ return e.fieldGroups.map((r, o) => Ea(
2614
+ n,
1347
2615
  e.store,
1348
2616
  e.record,
1349
- i,
1350
- r,
1351
2617
  o,
2618
+ r,
2619
+ a,
1352
2620
  e.layout
1353
2621
  ));
1354
- }, [s, e.store, e.record, e.fieldGroups, e.layout]);
1355
- return /* @__PURE__ */ t.jsx(
2622
+ }, [n, e.store, e.record, e.fieldGroups, e.layout]);
2623
+ return /* @__PURE__ */ i.jsx(
1356
2624
  "form",
1357
2625
  {
1358
- onSubmit: e.onSubmit === void 0 ? void 0 : (o) => {
1359
- o.preventDefault(), e.onSubmit !== void 0 && Je(e.record) && e.onSubmit(e.record);
2626
+ onSubmit: e.onSubmit === void 0 ? void 0 : (a) => {
2627
+ a.preventDefault(), e.onSubmit !== void 0 && Tt(e.record) && e.onSubmit(e.record);
1360
2628
  },
1361
- children: /* @__PURE__ */ t.jsxs(ee, { gap: "sm", className: e.className, style: e.styles, children: [
1362
- n,
1363
- /* @__PURE__ */ t.jsx(A, { gap: "sm", children: e.actions.map((o, r) => /* @__PURE__ */ t.jsx(
1364
- D,
2629
+ children: /* @__PURE__ */ i.jsxs(ge, { gap: "sm", className: e.className, style: e.styles, children: [
2630
+ t,
2631
+ /* @__PURE__ */ i.jsx(D, { gap: "sm", children: e.actions.map((a, r) => /* @__PURE__ */ i.jsx(
2632
+ q,
1365
2633
  {
1366
- variant: o.variant,
2634
+ variant: a.variant,
1367
2635
  onClick: () => {
1368
- o.onClick !== void 0 && o.onClick();
2636
+ a.onClick !== void 0 && a.onClick();
1369
2637
  },
1370
- disabled: o.disabled,
1371
- children: o.label
2638
+ disabled: a.disabled,
2639
+ children: a.label
1372
2640
  },
1373
2641
  r
1374
2642
  )) })
@@ -1376,203 +2644,203 @@ const Me = 12, rr = (e) => {
1376
2644
  }
1377
2645
  );
1378
2646
  };
1379
- function bn(e, s, n, o, r, i, a) {
1380
- const c = r.fields, d = [];
1381
- for (let m = 0; m < c.length; m++) {
1382
- const y = Me / c[m].length;
1383
- if (!Number.isInteger(y))
1384
- throw new Error(`Span must be an integer, but got ${y} for row ${m}`);
1385
- let x;
1386
- a !== void 0 && typeof a == "object" && a.type === "horizontal" ? x = {
1387
- ...a,
2647
+ function Ea(e, n, t, a, r, o, l) {
2648
+ const s = r.fields, u = [];
2649
+ for (let d = 0; d < s.length; d++) {
2650
+ const x = yt / s[d].length;
2651
+ if (!Number.isInteger(x))
2652
+ throw new Error(`Span must be an integer, but got ${x} for row ${d}`);
2653
+ let g;
2654
+ l !== void 0 && typeof l == "object" && l.type === "horizontal" ? g = {
2655
+ ...l,
1388
2656
  // the size of labelCol must match the minimum size of labelCol across different groups
1389
2657
  // and rows -- if the result isn't a whole number, we may see unaligned labels
1390
2658
  // but this is okay as users will need to adjust the layout anyway.
1391
2659
  labelCol: Math.floor(
1392
- a.labelCol * c[m].length / i
2660
+ l.labelCol * s[d].length / o
1393
2661
  ),
1394
- itemCol: Me - Math.floor(a.labelCol * c[m].length / i)
1395
- } : x = a;
1396
- for (let g = 0; g < c[m].length; g++) {
1397
- const v = c[m][g], u = e.allProperties[v];
1398
- let C;
1399
- if (W(u))
1400
- C = u.cardinality === "N:N" || u.cardinality === "1:N" ? dn : cn;
2662
+ itemCol: yt - Math.floor(l.labelCol * s[d].length / o)
2663
+ } : g = l;
2664
+ for (let p = 0; p < s[d].length; p++) {
2665
+ const v = s[d][p], h = e.allProperties[v];
2666
+ let j;
2667
+ if (se(h))
2668
+ j = h.cardinality === "N:N" || h.cardinality === "1:N" ? xa : pa;
1401
2669
  else {
1402
- if (ze[u.datatype] === void 0)
2670
+ if (xt[h.datatype] === void 0)
1403
2671
  throw new Error(
1404
- `No input component found for datatype ${u.datatype}`
2672
+ `No input component found for datatype ${h.datatype}`
1405
2673
  );
1406
- C = ze[u.datatype];
2674
+ j = xt[h.datatype];
1407
2675
  }
1408
- d.push(
1409
- /* @__PURE__ */ t.jsx(I.Col, { span: y, children: /* @__PURE__ */ t.jsx(
1410
- jn,
2676
+ u.push(
2677
+ /* @__PURE__ */ i.jsx(A.Col, { span: x, children: /* @__PURE__ */ i.jsx(
2678
+ Ca,
1411
2679
  {
1412
- store: s,
1413
- record: n,
1414
- property: u,
1415
- layout: x,
1416
- InputComponent: C,
2680
+ store: n,
2681
+ record: t,
2682
+ property: h,
2683
+ layout: g,
2684
+ InputComponent: j,
1417
2685
  validator: e.validators[v]
1418
2686
  }
1419
- ) }, `${m}-${g}`)
2687
+ ) }, `${d}-${p}`)
1420
2688
  );
1421
2689
  }
1422
2690
  }
1423
- const h = /* @__PURE__ */ t.jsx(I, { gutter: "sm", children: d }, o);
1424
- return r.name !== void 0 ? /* @__PURE__ */ t.jsx(St, { legend: r.name, children: h }, o) : h;
2691
+ const c = /* @__PURE__ */ i.jsx(A, { gutter: "sm", children: u }, a);
2692
+ return r.name !== void 0 ? /* @__PURE__ */ i.jsx(pn, { legend: r.name, children: c }, a) : c;
1425
2693
  }
1426
- const nt = ({
2694
+ const Xt = ({
1427
2695
  actions: e,
1428
- reloadData: s,
1429
- selectedRowKeys: n,
1430
- size: o = "xs"
1431
- }) => /* @__PURE__ */ t.jsxs(A, { gap: o, children: [
1432
- (e == null ? void 0 : e.add) && /* @__PURE__ */ t.jsx(
1433
- D,
2696
+ reloadData: n,
2697
+ selectedRowKeys: t,
2698
+ size: a = "xs"
2699
+ }) => /* @__PURE__ */ i.jsxs(D, { gap: a, children: [
2700
+ (e == null ? void 0 : e.add) && /* @__PURE__ */ i.jsx(
2701
+ q,
1434
2702
  {
1435
2703
  variant: "light",
1436
- leftSection: /* @__PURE__ */ t.jsx(Et, { size: 16, stroke: 1.5 }),
1437
- size: o,
2704
+ leftSection: /* @__PURE__ */ i.jsx(Sn, { size: 16, stroke: 1.5 }),
2705
+ size: a,
1438
2706
  onClick: e.add,
1439
2707
  children: "Add"
1440
2708
  }
1441
2709
  ),
1442
- (e == null ? void 0 : e.edit) && /* @__PURE__ */ t.jsx(
1443
- D,
2710
+ (e == null ? void 0 : e.edit) && /* @__PURE__ */ i.jsx(
2711
+ q,
1444
2712
  {
1445
- leftSection: /* @__PURE__ */ t.jsx(It, { size: 16, stroke: 1.5 }),
1446
- size: o,
2713
+ leftSection: /* @__PURE__ */ i.jsx(Cn, { size: 16, stroke: 1.5 }),
2714
+ size: a,
1447
2715
  variant: "light",
1448
- onClick: () => e.edit !== void 0 && e.edit(n[0]),
1449
- disabled: n.length !== 1,
2716
+ onClick: () => e.edit !== void 0 && e.edit(t[0]),
2717
+ disabled: t.length !== 1,
1450
2718
  children: "Edit"
1451
2719
  }
1452
2720
  ),
1453
- (e == null ? void 0 : e.reload) && /* @__PURE__ */ t.jsx(
1454
- D,
2721
+ (e == null ? void 0 : e.reload) && /* @__PURE__ */ i.jsx(
2722
+ q,
1455
2723
  {
1456
- leftSection: /* @__PURE__ */ t.jsx(_t, { size: 16, stroke: 1.5 }),
1457
- size: o,
1458
- onClick: s,
2724
+ leftSection: /* @__PURE__ */ i.jsx(Rn, { size: 16, stroke: 1.5 }),
2725
+ size: a,
2726
+ onClick: n,
1459
2727
  variant: "light",
1460
2728
  children: "Reload"
1461
2729
  }
1462
2730
  ),
1463
- (e == null ? void 0 : e.import) && /* @__PURE__ */ t.jsx(
1464
- D,
2731
+ (e == null ? void 0 : e.import) && /* @__PURE__ */ i.jsx(
2732
+ q,
1465
2733
  {
1466
- leftSection: /* @__PURE__ */ t.jsx(Ft, { size: 16, stroke: 1.5 }),
1467
- size: o,
2734
+ leftSection: /* @__PURE__ */ i.jsx(En, { size: 16, stroke: 1.5 }),
2735
+ size: a,
1468
2736
  variant: "light",
1469
2737
  onClick: e.import,
1470
2738
  children: "Import"
1471
2739
  }
1472
2740
  ),
1473
- (e == null ? void 0 : e.export) && /* @__PURE__ */ t.jsx(
1474
- D,
2741
+ (e == null ? void 0 : e.export) && /* @__PURE__ */ i.jsx(
2742
+ q,
1475
2743
  {
1476
- leftSection: /* @__PURE__ */ t.jsx(At, { size: 16, stroke: 1.5 }),
1477
- size: o,
2744
+ leftSection: /* @__PURE__ */ i.jsx(kn, { size: 16, stroke: 1.5 }),
2745
+ size: a,
1478
2746
  variant: "light",
1479
2747
  onClick: e.export,
1480
2748
  children: "Export"
1481
2749
  }
1482
2750
  )
1483
- ] }), rt = (e) => e !== void 0 && (e.add !== void 0 || e.edit !== void 0 || e.delete !== void 0 || e.export !== void 0 || e.reload === !0 || e.import !== void 0), yn = "__selectcol__", { Thead: pn, Tr: $e, Th: Sn, Tbody: wn, Td: Cn } = Ve, ot = (e) => {
1484
- const s = /* @__PURE__ */ t.jsxs(
1485
- Ve,
2751
+ ] }), Zt = (e) => e !== void 0 && (e.add !== void 0 || e.edit !== void 0 || e.delete !== void 0 || e.export !== void 0 || e.reload === !0 || e.import !== void 0), ka = "__selectcol__", { Thead: Ta, Tr: bt, Th: Na, Tbody: Pa, Td: Ia } = Rt, Qt = (e) => {
2752
+ const n = /* @__PURE__ */ i.jsxs(
2753
+ Rt,
1486
2754
  {
1487
2755
  striped: !0,
1488
2756
  highlightOnHover: !0,
1489
2757
  verticalSpacing: "xs",
1490
2758
  tabularNums: !0,
1491
2759
  children: [
1492
- /* @__PURE__ */ t.jsx(pn, { children: e.table.getHeaderGroups().map((o) => /* @__PURE__ */ t.jsx($e, { children: o.headers.map((r) => /* @__PURE__ */ t.jsx(
1493
- Sn,
2760
+ /* @__PURE__ */ i.jsx(Ta, { children: e.table.getHeaderGroups().map((a) => /* @__PURE__ */ i.jsx(bt, { children: a.headers.map((r) => /* @__PURE__ */ i.jsx(
2761
+ Na,
1494
2762
  {
1495
- w: r.id === yn ? "1%" : void 0,
1496
- children: r.isPlaceholder ? null : Ie(
2763
+ w: r.id === ka ? "1%" : void 0,
2764
+ children: r.isPlaceholder ? null : lt(
1497
2765
  r.column.columnDef.header,
1498
2766
  r.getContext()
1499
2767
  )
1500
2768
  },
1501
2769
  r.id
1502
- )) }, o.id)) }),
1503
- /* @__PURE__ */ t.jsx(wn, { pos: "relative", children: e.table.getRowModel().rows.map((o) => /* @__PURE__ */ t.jsx(
1504
- $e,
2770
+ )) }, a.id)) }),
2771
+ /* @__PURE__ */ i.jsx(Pa, { pos: "relative", children: e.table.getRowModel().rows.map((a) => /* @__PURE__ */ i.jsx(
2772
+ bt,
1505
2773
  {
1506
- bg: e.selectedRowKeys[o.id] ? "var(--mantine-color-blue-light)" : void 0,
1507
- children: o.getVisibleCells().map((r) => /* @__PURE__ */ t.jsx(Cn, { children: Ie(r.column.columnDef.cell, r.getContext()) }, r.id))
2774
+ bg: e.selectedRowKeys[a.id] ? "var(--mantine-color-blue-light)" : void 0,
2775
+ children: a.getVisibleCells().map((r) => /* @__PURE__ */ i.jsx(Ia, { children: lt(r.column.columnDef.cell, r.getContext()) }, r.id))
1508
2776
  },
1509
- o.id
2777
+ a.id
1510
2778
  )) })
1511
2779
  ]
1512
2780
  }
1513
2781
  );
1514
- if (!e.bordered) return s;
1515
- const n = {};
1516
- return e.hasTopSection && (n.borderTopLeftRadius = 0, n.borderTopRightRadius = 0), e.hasBottomSection && (n.borderBottomLeftRadius = 0, n.borderBottomRightRadius = 0), /* @__PURE__ */ t.jsx(U, { withBorder: !0, p: 0, style: n, children: s });
1517
- }, Rn = "_pageSizeSelectorActive_1wv6j_1", Tn = {
1518
- pageSizeSelectorActive: Rn
1519
- }, st = ({
2782
+ if (!e.bordered) return n;
2783
+ const t = {};
2784
+ return e.hasTopSection && (t.borderTopLeftRadius = 0, t.borderTopRightRadius = 0), e.hasBottomSection && (t.borderBottomLeftRadius = 0, t.borderBottomRightRadius = 0), /* @__PURE__ */ i.jsx(re, { withBorder: !0, p: 0, style: t, children: n });
2785
+ }, La = "_pageSizeSelectorActive_1wv6j_1", Fa = {
2786
+ pageSizeSelectorActive: La
2787
+ }, en = ({
1520
2788
  total: e,
1521
- pageIndex: s,
1522
- pageSize: n,
1523
- allowPageSizeChange: o = !0,
2789
+ pageIndex: n,
2790
+ pageSize: t,
2791
+ allowPageSizeChange: a = !0,
1524
2792
  onUpdatePagination: r
1525
2793
  }) => {
1526
- const i = /* @__PURE__ */ t.jsx(
1527
- wt,
2794
+ const o = /* @__PURE__ */ i.jsx(
2795
+ xn,
1528
2796
  {
1529
2797
  size: "sm",
1530
2798
  total: e,
1531
- value: s + 1,
1532
- onChange: (a) => r(a - 1, n)
2799
+ value: n + 1,
2800
+ onChange: (l) => r(l - 1, t)
1533
2801
  }
1534
2802
  );
1535
- return o ? /* @__PURE__ */ t.jsxs(A, { gap: "sm", children: [
1536
- /* @__PURE__ */ t.jsxs("div", { children: [
1537
- /* @__PURE__ */ t.jsx(p, { size: "sm", component: "span", pr: "xs", c: "dimmed", children: "Records per page" }),
1538
- /* @__PURE__ */ t.jsx(
1539
- kn,
2803
+ return a ? /* @__PURE__ */ i.jsxs(D, { gap: "sm", children: [
2804
+ /* @__PURE__ */ i.jsxs("div", { children: [
2805
+ /* @__PURE__ */ i.jsx(E, { size: "sm", component: "span", pr: "xs", c: "dimmed", children: "Records per page" }),
2806
+ /* @__PURE__ */ i.jsx(
2807
+ Aa,
1540
2808
  {
1541
2809
  size: "sm",
1542
2810
  values: ["10", "20", "50", "100"],
1543
- value: n.toString(),
1544
- onChange: (a) => {
1545
- r(0, parseInt(a, 10));
2811
+ value: t.toString(),
2812
+ onChange: (l) => {
2813
+ r(0, parseInt(l, 10));
1546
2814
  }
1547
2815
  }
1548
2816
  )
1549
2817
  ] }),
1550
- i
1551
- ] }) : i;
1552
- }, qe = {
1553
- xs: J(22),
1554
- sm: J(26),
1555
- md: J(32),
1556
- lg: J(38),
1557
- xl: J(44)
2818
+ o
2819
+ ] }) : o;
2820
+ }, wt = {
2821
+ xs: ce(22),
2822
+ sm: ce(26),
2823
+ md: ce(32),
2824
+ lg: ce(38),
2825
+ xl: ce(44)
1558
2826
  };
1559
- function kn({
2827
+ function Aa({
1560
2828
  size: e,
1561
- values: s,
1562
- value: n,
1563
- onChange: o
2829
+ values: n,
2830
+ value: t,
2831
+ onChange: a
1564
2832
  }) {
1565
- return /* @__PURE__ */ t.jsxs(G, { withinPortal: !0, withArrow: !0, offset: 2, children: [
1566
- /* @__PURE__ */ t.jsx(Ct, { children: /* @__PURE__ */ t.jsx(
1567
- D,
2833
+ return /* @__PURE__ */ i.jsxs(ie, { withinPortal: !0, withArrow: !0, offset: 2, children: [
2834
+ /* @__PURE__ */ i.jsx(vn, { children: /* @__PURE__ */ i.jsx(
2835
+ q,
1568
2836
  {
1569
2837
  size: e,
1570
2838
  variant: "default",
1571
- rightSection: /* @__PURE__ */ t.jsx(Ot, { size: 16, stroke: 1.5 }),
2839
+ rightSection: /* @__PURE__ */ i.jsx(Tn, { size: 16, stroke: 1.5 }),
1572
2840
  style: [
1573
2841
  { fontWeight: "normal" },
1574
2842
  (r) => ({
1575
- height: qe[e],
2843
+ height: wt[e],
1576
2844
  paddingLeft: r.spacing[e],
1577
2845
  paddingRight: r.spacing[e]
1578
2846
  })
@@ -1582,17 +2850,17 @@ function kn({
1582
2850
  marginInlineStart: 2
1583
2851
  }
1584
2852
  },
1585
- children: n
2853
+ children: t
1586
2854
  }
1587
2855
  ) }),
1588
- /* @__PURE__ */ t.jsx(Rt, { children: s.map((r) => {
1589
- const i = r === n;
1590
- return /* @__PURE__ */ t.jsx(
1591
- Tt,
2856
+ /* @__PURE__ */ i.jsx(yn, { children: n.map((r) => {
2857
+ const o = r === t;
2858
+ return /* @__PURE__ */ i.jsx(
2859
+ bn,
1592
2860
  {
1593
- className: i ? Tn.pageSizeSelectorActive : void 0,
2861
+ className: o ? Fa.pageSizeSelectorActive : void 0,
1594
2862
  style: [
1595
- { height: qe[e] }
2863
+ { height: wt[e] }
1596
2864
  // isCurrent
1597
2865
  // ? {
1598
2866
  // color: "var(--mantine-color-text)",
@@ -1601,118 +2869,118 @@ function kn({
1601
2869
  // }
1602
2870
  // : undefined,
1603
2871
  ],
1604
- disabled: i,
1605
- onClick: () => o(r),
1606
- children: /* @__PURE__ */ t.jsx(p, { component: "div", size: e, children: r })
2872
+ disabled: o,
2873
+ onClick: () => a(r),
2874
+ children: /* @__PURE__ */ i.jsx(E, { component: "div", size: e, children: r })
1607
2875
  },
1608
2876
  r
1609
2877
  );
1610
2878
  }) })
1611
2879
  ] });
1612
2880
  }
1613
- const Nn = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), or = (e) => {
1614
- var O, P;
1615
- const [s, n] = _({
2881
+ const _a = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), fo = (e) => {
2882
+ var b, C;
2883
+ const [n, t] = _({
1616
2884
  records: [],
1617
2885
  total: 0
1618
- }), [o, r] = _(!1), [i, a] = _(
2886
+ }), [a, r] = _(!1), [o, l] = _(
1619
2887
  {}
1620
- ), c = (f) => {
1621
- r(!0), e.getData(f).then((b) => {
1622
- n(b), r(!1);
2888
+ ), s = (y) => {
2889
+ r(!0), e.getData(y).then((w) => {
2890
+ t(w), r(!1);
1623
2891
  });
1624
- }, d = (f, b) => {
2892
+ }, u = (y, w) => {
1625
2893
  const R = {
1626
2894
  ...e.query.query,
1627
- limit: b,
1628
- offset: f * b
2895
+ limit: w,
2896
+ offset: y * w
1629
2897
  };
1630
2898
  e.query.update(R);
1631
- }, [h, m, y] = S(() => {
1632
- const f = e.query.query.limit, b = Math.floor(
2899
+ }, [c, d, x] = k(() => {
2900
+ const y = e.query.query.limit, w = Math.floor(
1633
2901
  (e.query.query.offset || 0) / e.query.query.limit
1634
- ), R = Math.ceil(s.total / e.query.query.limit);
1635
- return [f, b, R];
1636
- }, [e.query.query.limit, e.query.query.offset, s.total]);
1637
- ce(() => (s.total == 0 && c(e.query.query), e.query.subscribe(c)), [e.query]);
1638
- const x = S(() => Object.keys(i).filter((f) => i[f]).map((f) => e.normalizeRowId(f)), [i]);
1639
- let g, v;
1640
- rt(e.actions) && (g = /* @__PURE__ */ t.jsx(
1641
- nt,
2902
+ ), R = Math.ceil(n.total / e.query.query.limit);
2903
+ return [y, w, R];
2904
+ }, [e.query.query.limit, e.query.query.offset, n.total]);
2905
+ Te(() => (n.total == 0 && s(e.query.query), e.query.subscribe(s)), [e.query]);
2906
+ const g = k(() => Object.keys(o).filter((y) => o[y]).map((y) => e.normalizeRowId(y)), [o]);
2907
+ let p, v;
2908
+ Zt(e.actions) && (p = /* @__PURE__ */ i.jsx(
2909
+ Xt,
1642
2910
  {
1643
2911
  actions: e.actions,
1644
- reloadData: () => c(e.query.query),
1645
- selectedRowKeys: x
2912
+ reloadData: () => s(e.query.query),
2913
+ selectedRowKeys: g
1646
2914
  }
1647
2915
  ));
1648
- const u = ((O = e.pagination) == null ? void 0 : O.positions) || Nn;
1649
- if (u.size > 0) {
1650
- const f = /* @__PURE__ */ t.jsx(
1651
- st,
2916
+ const h = ((b = e.pagination) == null ? void 0 : b.positions) || _a;
2917
+ if (h.size > 0) {
2918
+ const y = /* @__PURE__ */ i.jsx(
2919
+ en,
1652
2920
  {
1653
- total: y,
1654
- pageIndex: m,
1655
- pageSize: h,
1656
- onUpdatePagination: d,
1657
- allowPageSizeChange: (P = e.pagination) == null ? void 0 : P.showSizeChanger
2921
+ total: x,
2922
+ pageIndex: d,
2923
+ pageSize: c,
2924
+ onUpdatePagination: u,
2925
+ allowPageSizeChange: (C = e.pagination) == null ? void 0 : C.showSizeChanger
1658
2926
  }
1659
2927
  );
1660
- u.has("topRight") && (g !== void 0 ? g = /* @__PURE__ */ t.jsxs(A, { justify: "space-between", gap: "sm", children: [
1661
- g,
1662
- f
1663
- ] }) : g = /* @__PURE__ */ t.jsx(z, { justify: "flex-end", children: f })), (u.has("bottomRight") || u.has("bottomLeft") || u.has("bottomCenter")) && (u.has("bottomLeft") ? v = /* @__PURE__ */ t.jsxs(z, { justify: "space-between", align: "center", children: [
1664
- f,
1665
- /* @__PURE__ */ t.jsxs(p, { size: "sm", c: "dimmed", children: [
2928
+ h.has("topRight") && (p !== void 0 ? p = /* @__PURE__ */ i.jsxs(D, { justify: "space-between", gap: "sm", children: [
2929
+ p,
2930
+ y
2931
+ ] }) : p = /* @__PURE__ */ i.jsx(B, { justify: "flex-end", children: y })), (h.has("bottomRight") || h.has("bottomLeft") || h.has("bottomCenter")) && (h.has("bottomLeft") ? v = /* @__PURE__ */ i.jsxs(B, { justify: "space-between", align: "center", children: [
2932
+ y,
2933
+ /* @__PURE__ */ i.jsxs(E, { size: "sm", c: "dimmed", children: [
1666
2934
  "Showing ",
1667
- m * h + 1,
2935
+ d * c + 1,
1668
2936
  " to",
1669
2937
  " ",
1670
- Math.min((m + 1) * h, s.total),
2938
+ Math.min((d + 1) * c, n.total),
1671
2939
  " of ",
1672
- s.total,
2940
+ n.total,
1673
2941
  " ",
1674
2942
  "records"
1675
2943
  ] })
1676
- ] }) : v = /* @__PURE__ */ t.jsxs(z, { justify: "space-between", align: "center", children: [
1677
- /* @__PURE__ */ t.jsxs(p, { size: "sm", c: "dimmed", children: [
2944
+ ] }) : v = /* @__PURE__ */ i.jsxs(B, { justify: "space-between", align: "center", children: [
2945
+ /* @__PURE__ */ i.jsxs(E, { size: "sm", c: "dimmed", children: [
1678
2946
  "Showing ",
1679
- m * h + 1,
2947
+ d * c + 1,
1680
2948
  " to",
1681
2949
  " ",
1682
- Math.min((m + 1) * h, s.total),
2950
+ Math.min((d + 1) * c, n.total),
1683
2951
  " of ",
1684
- s.total,
2952
+ n.total,
1685
2953
  " ",
1686
2954
  "records"
1687
2955
  ] }),
1688
- f
2956
+ y
1689
2957
  ] }));
1690
2958
  }
1691
- const C = S(() => /* @__PURE__ */ t.jsx(
1692
- En,
2959
+ const j = k(() => /* @__PURE__ */ i.jsx(
2960
+ $a,
1693
2961
  {
1694
- data: s,
1695
- loading: o,
2962
+ data: n,
2963
+ loading: a,
1696
2964
  columns: e.columns,
1697
2965
  getRowId: e.getRowId,
1698
- selectedRowKeys: i,
1699
- setSelectedRowKeys: a,
1700
- hasTopSection: g !== void 0,
2966
+ selectedRowKeys: o,
2967
+ setSelectedRowKeys: l,
2968
+ hasTopSection: p !== void 0,
1701
2969
  hasBottomSection: v !== void 0
1702
2970
  }
1703
2971
  ), [
1704
- s,
1705
- o,
2972
+ n,
2973
+ a,
1706
2974
  e.columns,
1707
2975
  e.getRowId,
1708
- i,
1709
- a,
1710
- g !== void 0,
2976
+ o,
2977
+ l,
2978
+ p !== void 0,
1711
2979
  v !== void 0
1712
2980
  ]);
1713
- return g === void 0 || v === void 0 ? C : /* @__PURE__ */ t.jsxs("div", { children: [
1714
- g !== void 0 && /* @__PURE__ */ t.jsx(
1715
- U,
2981
+ return p === void 0 || v === void 0 ? j : /* @__PURE__ */ i.jsxs("div", { children: [
2982
+ p !== void 0 && /* @__PURE__ */ i.jsx(
2983
+ re,
1716
2984
  {
1717
2985
  withBorder: !0,
1718
2986
  p: "xs",
@@ -1721,12 +2989,12 @@ const Nn = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), or = (e) => {
1721
2989
  borderBottomRightRadius: 0,
1722
2990
  borderBottom: "none"
1723
2991
  },
1724
- children: g
2992
+ children: p
1725
2993
  }
1726
2994
  ),
1727
- C,
1728
- v !== void 0 && /* @__PURE__ */ t.jsx(
1729
- U,
2995
+ j,
2996
+ v !== void 0 && /* @__PURE__ */ i.jsx(
2997
+ re,
1730
2998
  {
1731
2999
  withBorder: !0,
1732
3000
  p: "xs",
@@ -1739,21 +3007,21 @@ const Nn = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), or = (e) => {
1739
3007
  }
1740
3008
  )
1741
3009
  ] });
1742
- }, En = (e) => {
1743
- const s = S(() => {
1744
- const o = [
3010
+ }, $a = (e) => {
3011
+ const n = k(() => {
3012
+ const a = [
1745
3013
  {
1746
3014
  id: "selection",
1747
- header: ({ table: r }) => /* @__PURE__ */ t.jsx(
1748
- Q,
3015
+ header: ({ table: r }) => /* @__PURE__ */ i.jsx(
3016
+ me,
1749
3017
  {
1750
3018
  checked: r.getIsAllRowsSelected(),
1751
3019
  indeterminate: r.getIsSomeRowsSelected(),
1752
3020
  onChange: r.getToggleAllRowsSelectedHandler()
1753
3021
  }
1754
3022
  ),
1755
- cell: ({ row: r }) => /* @__PURE__ */ t.jsx(
1756
- Q,
3023
+ cell: ({ row: r }) => /* @__PURE__ */ i.jsx(
3024
+ me,
1757
3025
  {
1758
3026
  checked: r.getIsSelected(),
1759
3027
  disabled: !r.getCanSelect(),
@@ -1763,29 +3031,29 @@ const Nn = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), or = (e) => {
1763
3031
  }
1764
3032
  ];
1765
3033
  return e.columns.forEach((r) => {
1766
- o.push({
3034
+ a.push({
1767
3035
  id: r.key,
1768
3036
  header: r.title,
1769
3037
  accessorFn: r.render,
1770
- cell: ({ row: i }) => r.render(i.original)
3038
+ cell: ({ row: o }) => r.render(o.original)
1771
3039
  });
1772
- }), o;
1773
- }, [e.columns]), n = Ze({
3040
+ }), a;
3041
+ }, [e.columns]), t = Pt({
1774
3042
  data: e.data.records,
1775
- columns: s,
1776
- getCoreRowModel: Xe(),
3043
+ columns: n,
3044
+ getCoreRowModel: It(),
1777
3045
  // convert to string, but we actually can get away with number
1778
- getRowId: (o) => e.getRowId(o).toString(),
3046
+ getRowId: (a) => e.getRowId(a).toString(),
1779
3047
  state: {
1780
3048
  rowSelection: e.selectedRowKeys
1781
3049
  },
1782
3050
  onRowSelectionChange: e.setSelectedRowKeys,
1783
3051
  manualPagination: !0
1784
3052
  });
1785
- return /* @__PURE__ */ t.jsx(
1786
- ot,
3053
+ return /* @__PURE__ */ i.jsx(
3054
+ Qt,
1787
3055
  {
1788
- table: n,
3056
+ table: t,
1789
3057
  selectedRowKeys: e.selectedRowKeys,
1790
3058
  bordered: !0,
1791
3059
  hasTopSection: e.hasTopSection,
@@ -1793,195 +3061,195 @@ const Nn = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), or = (e) => {
1793
3061
  }
1794
3062
  );
1795
3063
  };
1796
- function it(e, s, n, {
1797
- title: o,
3064
+ function tn(e, n, t, {
3065
+ title: a,
1798
3066
  nestedKey: r,
1799
- component: i
3067
+ component: o
1800
3068
  } = {}) {
1801
- let a;
1802
- if (i !== void 0)
1803
- a = i;
1804
- else if (W(n))
1805
- n.cardinality === "1:N" || n.cardinality === "N:N" ? a = ue : a = de;
3069
+ let l;
3070
+ if (o !== void 0)
3071
+ l = o;
3072
+ else if (se(t))
3073
+ t.cardinality === "1:N" || t.cardinality === "N:N" ? l = Fe : l = Le;
1806
3074
  else {
1807
- if (K[n.datatype] === void 0)
3075
+ if (Q[t.datatype] === void 0)
1808
3076
  throw new Error(
1809
- `No display component found for datatype ${n.datatype}`
3077
+ `No display component found for datatype ${t.datatype}`
1810
3078
  );
1811
- a = K[n.datatype];
3079
+ l = Q[t.datatype];
1812
3080
  }
1813
- const c = {
1814
- key: n.name,
1815
- title: o || /* @__PURE__ */ t.jsx(F, { value: n.label }),
1816
- accessorFn: (d) => d[n.tsName],
1817
- render: (d) => {
1818
- const h = d[n.tsName];
1819
- return /* @__PURE__ */ t.jsx(
1820
- a,
3081
+ const s = {
3082
+ key: t.name,
3083
+ title: a || /* @__PURE__ */ i.jsx(O, { value: t.label }),
3084
+ accessorFn: (u) => u[t.tsName],
3085
+ render: (u) => {
3086
+ const c = u[t.tsName];
3087
+ return /* @__PURE__ */ i.jsx(
3088
+ l,
1821
3089
  {
1822
3090
  db: e,
1823
- property: n,
1824
- value: h,
1825
- entityRoutes: s
3091
+ property: t,
3092
+ value: c,
3093
+ entityRoutes: n
1826
3094
  }
1827
3095
  );
1828
3096
  }
1829
3097
  };
1830
- return r !== void 0 && (c.accessorFn = (d) => d[r][n.tsName], c.render = (d) => {
1831
- const h = d[r][n.tsName];
1832
- return /* @__PURE__ */ t.jsx(
1833
- a,
3098
+ return r !== void 0 && (s.accessorFn = (u) => u[r][t.tsName], s.render = (u) => {
3099
+ const c = u[r][t.tsName];
3100
+ return /* @__PURE__ */ i.jsx(
3101
+ l,
1834
3102
  {
1835
3103
  db: e,
1836
- property: n,
1837
- value: h,
1838
- entityRoutes: s
3104
+ property: t,
3105
+ value: c,
3106
+ entityRoutes: n
1839
3107
  }
1840
3108
  );
1841
- }), c;
3109
+ }), s;
1842
3110
  }
1843
- function sr(e, s, n, o, {
3111
+ function ho(e, n, t, a, {
1844
3112
  title: r,
1845
- nestedKey: i,
1846
- component: a
3113
+ nestedKey: o,
3114
+ component: l
1847
3115
  } = {}) {
1848
- let c;
1849
- if (a !== void 0)
1850
- c = a;
1851
- else if (W(o))
1852
- o.cardinality === "1:N" || o.cardinality === "N:N" ? c = ue : c = de;
3116
+ let s;
3117
+ if (l !== void 0)
3118
+ s = l;
3119
+ else if (se(a))
3120
+ a.cardinality === "1:N" || a.cardinality === "N:N" ? s = Fe : s = Le;
1853
3121
  else {
1854
- if (K[o.datatype] === void 0)
3122
+ if (Q[a.datatype] === void 0)
1855
3123
  throw new Error(
1856
- `No display component found for datatype ${o.datatype}`
3124
+ `No display component found for datatype ${a.datatype}`
1857
3125
  );
1858
- c = K[o.datatype];
3126
+ s = Q[a.datatype];
1859
3127
  }
1860
- const d = {
1861
- key: n + "." + o.name,
1862
- title: r || /* @__PURE__ */ t.jsx(F, { value: o.label }),
1863
- accessorFn: (h) => h[n.tsName][o.tsName],
1864
- render: (h) => {
1865
- const m = h[n.tsName][o.tsName];
1866
- return /* @__PURE__ */ t.jsx(
1867
- c,
3128
+ const u = {
3129
+ key: t + "." + a.name,
3130
+ title: r || /* @__PURE__ */ i.jsx(O, { value: a.label }),
3131
+ accessorFn: (c) => c[t.tsName][a.tsName],
3132
+ render: (c) => {
3133
+ const d = c[t.tsName][a.tsName];
3134
+ return /* @__PURE__ */ i.jsx(
3135
+ s,
1868
3136
  {
1869
3137
  db: e,
1870
- property: o,
1871
- value: m,
1872
- entityRoutes: s
3138
+ property: a,
3139
+ value: d,
3140
+ entityRoutes: n
1873
3141
  }
1874
3142
  );
1875
3143
  }
1876
3144
  };
1877
- return i !== void 0 && (d.accessorFn = (h) => h[i][n.tsName][o.tsName], d.render = (h) => {
1878
- const m = h[i][n.tsName][o.tsName];
1879
- return /* @__PURE__ */ t.jsx(
1880
- c,
3145
+ return o !== void 0 && (u.accessorFn = (c) => c[o][t.tsName][a.tsName], u.render = (c) => {
3146
+ const d = c[o][t.tsName][a.tsName];
3147
+ return /* @__PURE__ */ i.jsx(
3148
+ s,
1881
3149
  {
1882
3150
  db: e,
1883
- property: o,
1884
- value: m,
1885
- entityRoutes: s
3151
+ property: a,
3152
+ value: d,
3153
+ entityRoutes: n
1886
3154
  }
1887
3155
  );
1888
- }), d;
3156
+ }), u;
1889
3157
  }
1890
- function ir(e, s, n, o, r = {}) {
1891
- return o.map((i) => at(i) ? i : it(
3158
+ function mo(e, n, t, a, r = {}) {
3159
+ return a.map((o) => nn(o) ? o : tn(
1892
3160
  e,
1893
- n,
1894
- s.publicProperties[i],
3161
+ t,
3162
+ n.publicProperties[o],
1895
3163
  r
1896
3164
  ));
1897
3165
  }
1898
- function ar(e, s, n, o = [], r = {}) {
1899
- return o.map((i) => at(i) ? i : it(
3166
+ function go(e, n, t, a = [], r = {}) {
3167
+ return a.map((o) => nn(o) ? o : tn(
1900
3168
  e,
1901
- n,
1902
- s.publicProperties[i],
3169
+ t,
3170
+ n.publicProperties[o],
1903
3171
  r
1904
3172
  ));
1905
3173
  }
1906
- function at(e) {
3174
+ function nn(e) {
1907
3175
  return typeof e == "object" && "key" in e && "title" in e;
1908
3176
  }
1909
- const In = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), lr = (e) => {
1910
- var m, y;
1911
- const [s, n] = _(
3177
+ const Oa = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), po = (e) => {
3178
+ var d, x;
3179
+ const [n, t] = _(
1912
3180
  {}
1913
- ), o = S(() => {
1914
- const x = [
3181
+ ), a = k(() => {
3182
+ const g = [
1915
3183
  {
1916
3184
  id: "selection",
1917
- header: ({ table: g }) => /* @__PURE__ */ t.jsx(
1918
- Q,
3185
+ header: ({ table: p }) => /* @__PURE__ */ i.jsx(
3186
+ me,
1919
3187
  {
1920
- checked: g.getIsAllRowsSelected(),
1921
- indeterminate: g.getIsSomeRowsSelected(),
1922
- onChange: g.getToggleAllRowsSelectedHandler()
3188
+ checked: p.getIsAllRowsSelected(),
3189
+ indeterminate: p.getIsSomeRowsSelected(),
3190
+ onChange: p.getToggleAllRowsSelectedHandler()
1923
3191
  }
1924
3192
  ),
1925
- cell: ({ row: g }) => /* @__PURE__ */ t.jsx(
1926
- Q,
3193
+ cell: ({ row: p }) => /* @__PURE__ */ i.jsx(
3194
+ me,
1927
3195
  {
1928
- checked: g.getIsSelected(),
1929
- disabled: !g.getCanSelect(),
1930
- onChange: g.getToggleSelectedHandler()
3196
+ checked: p.getIsSelected(),
3197
+ disabled: !p.getCanSelect(),
3198
+ onChange: p.getToggleSelectedHandler()
1931
3199
  }
1932
3200
  )
1933
3201
  }
1934
3202
  ];
1935
- return e.columns.forEach((g) => {
1936
- x.push({
1937
- id: g.key,
1938
- header: g.title,
1939
- accessorFn: g.render,
1940
- cell: ({ row: v }) => g.render(v.original)
3203
+ return e.columns.forEach((p) => {
3204
+ g.push({
3205
+ id: p.key,
3206
+ header: p.title,
3207
+ accessorFn: p.render,
3208
+ cell: ({ row: v }) => p.render(v.original)
1941
3209
  });
1942
- }), x;
1943
- }, [e.columns]), r = Ze({
3210
+ }), g;
3211
+ }, [e.columns]), r = Pt({
1944
3212
  data: e.data,
1945
- columns: o,
1946
- getCoreRowModel: Xe(),
1947
- getPaginationRowModel: zt(),
3213
+ columns: a,
3214
+ getCoreRowModel: It(),
3215
+ getPaginationRowModel: Pn(),
1948
3216
  state: {
1949
- rowSelection: s
3217
+ rowSelection: n
1950
3218
  },
1951
- onRowSelectionChange: n
1952
- }), i = S(() => Object.keys(s).filter((x) => s[x]).map(Number), [s]);
1953
- let a, c;
1954
- rt(e.actions) && (a = /* @__PURE__ */ t.jsx(
1955
- nt,
3219
+ onRowSelectionChange: t
3220
+ }), o = k(() => Object.keys(n).filter((g) => n[g]).map(Number), [n]);
3221
+ let l, s;
3222
+ Zt(e.actions) && (l = /* @__PURE__ */ i.jsx(
3223
+ Xt,
1956
3224
  {
1957
3225
  actions: e.actions,
1958
- selectedRowKeys: i
3226
+ selectedRowKeys: o
1959
3227
  }
1960
3228
  ));
1961
- const d = ((m = e.pagination) == null ? void 0 : m.positions) || In;
1962
- if (d.size > 0) {
1963
- const x = r.getState().pagination, g = /* @__PURE__ */ t.jsx(
1964
- st,
3229
+ const u = ((d = e.pagination) == null ? void 0 : d.positions) || Oa;
3230
+ if (u.size > 0) {
3231
+ const g = r.getState().pagination, p = /* @__PURE__ */ i.jsx(
3232
+ en,
1965
3233
  {
1966
3234
  total: r.getPageCount(),
1967
- pageIndex: x.pageIndex,
1968
- pageSize: x.pageSize,
1969
- onUpdatePagination: (v, u) => r.setPagination({ pageIndex: v, pageSize: u }),
1970
- allowPageSizeChange: (y = e.pagination) == null ? void 0 : y.showSizeChanger
3235
+ pageIndex: g.pageIndex,
3236
+ pageSize: g.pageSize,
3237
+ onUpdatePagination: (v, h) => r.setPagination({ pageIndex: v, pageSize: h }),
3238
+ allowPageSizeChange: (x = e.pagination) == null ? void 0 : x.showSizeChanger
1971
3239
  }
1972
3240
  );
1973
- d.has("topRight") && (a !== void 0 ? a = /* @__PURE__ */ t.jsxs(A, { justify: "space-between", gap: "sm", children: [
1974
- a,
1975
- g
1976
- ] }) : a = /* @__PURE__ */ t.jsx(z, { justify: "flex-end", children: g })), (d.has("bottomRight") || d.has("bottomLeft") || d.has("bottomCenter")) && (d.has("bottomLeft") ? c = /* @__PURE__ */ t.jsxs(z, { justify: "space-between", align: "center", children: [
1977
- g,
1978
- /* @__PURE__ */ t.jsxs(p, { size: "sm", c: "dimmed", children: [
3241
+ u.has("topRight") && (l !== void 0 ? l = /* @__PURE__ */ i.jsxs(D, { justify: "space-between", gap: "sm", children: [
3242
+ l,
3243
+ p
3244
+ ] }) : l = /* @__PURE__ */ i.jsx(B, { justify: "flex-end", children: p })), (u.has("bottomRight") || u.has("bottomLeft") || u.has("bottomCenter")) && (u.has("bottomLeft") ? s = /* @__PURE__ */ i.jsxs(B, { justify: "space-between", align: "center", children: [
3245
+ p,
3246
+ /* @__PURE__ */ i.jsxs(E, { size: "sm", c: "dimmed", children: [
1979
3247
  "Showing ",
1980
- x.pageIndex * x.pageSize + 1,
3248
+ g.pageIndex * g.pageSize + 1,
1981
3249
  " to",
1982
3250
  " ",
1983
3251
  Math.min(
1984
- (x.pageIndex + 1) * x.pageSize,
3252
+ (g.pageIndex + 1) * g.pageSize,
1985
3253
  e.data.length
1986
3254
  ),
1987
3255
  " ",
@@ -1989,14 +3257,14 @@ const In = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), lr = (e) => {
1989
3257
  e.data.length,
1990
3258
  " records"
1991
3259
  ] })
1992
- ] }) : c = /* @__PURE__ */ t.jsxs(z, { justify: "space-between", align: "center", children: [
1993
- /* @__PURE__ */ t.jsxs(p, { size: "sm", c: "dimmed", children: [
3260
+ ] }) : s = /* @__PURE__ */ i.jsxs(B, { justify: "space-between", align: "center", children: [
3261
+ /* @__PURE__ */ i.jsxs(E, { size: "sm", c: "dimmed", children: [
1994
3262
  "Showing ",
1995
- x.pageIndex * x.pageSize + 1,
3263
+ g.pageIndex * g.pageSize + 1,
1996
3264
  " to",
1997
3265
  " ",
1998
3266
  Math.min(
1999
- (x.pageIndex + 1) * x.pageSize,
3267
+ (g.pageIndex + 1) * g.pageSize,
2000
3268
  e.data.length
2001
3269
  ),
2002
3270
  " ",
@@ -2004,22 +3272,22 @@ const In = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), lr = (e) => {
2004
3272
  e.data.length,
2005
3273
  " records"
2006
3274
  ] }),
2007
- g
3275
+ p
2008
3276
  ] }));
2009
3277
  }
2010
- const h = /* @__PURE__ */ t.jsx(
2011
- ot,
3278
+ const c = /* @__PURE__ */ i.jsx(
3279
+ Qt,
2012
3280
  {
2013
- selectedRowKeys: s,
3281
+ selectedRowKeys: n,
2014
3282
  table: r,
2015
3283
  bordered: !0,
2016
- hasTopSection: a !== void 0,
2017
- hasBottomSection: c !== void 0
3284
+ hasTopSection: l !== void 0,
3285
+ hasBottomSection: s !== void 0
2018
3286
  }
2019
3287
  );
2020
- return a === void 0 && c === void 0 ? h : /* @__PURE__ */ t.jsxs("div", { children: [
2021
- a !== void 0 && /* @__PURE__ */ t.jsx(
2022
- U,
3288
+ return l === void 0 && s === void 0 ? c : /* @__PURE__ */ i.jsxs("div", { children: [
3289
+ l !== void 0 && /* @__PURE__ */ i.jsx(
3290
+ re,
2023
3291
  {
2024
3292
  withBorder: !0,
2025
3293
  p: "xs",
@@ -2028,12 +3296,12 @@ const In = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), lr = (e) => {
2028
3296
  borderBottomRightRadius: 0,
2029
3297
  borderBottom: "none"
2030
3298
  },
2031
- children: a
3299
+ children: l
2032
3300
  }
2033
3301
  ),
2034
- h,
2035
- c !== void 0 && /* @__PURE__ */ t.jsx(
2036
- U,
3302
+ c,
3303
+ s !== void 0 && /* @__PURE__ */ i.jsx(
3304
+ re,
2037
3305
  {
2038
3306
  withBorder: !0,
2039
3307
  p: "xs",
@@ -2042,206 +3310,206 @@ const In = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), lr = (e) => {
2042
3310
  borderTopRightRadius: 0,
2043
3311
  borderTop: "none"
2044
3312
  },
2045
- children: c
3313
+ children: s
2046
3314
  }
2047
3315
  )
2048
3316
  ] });
2049
- }, Ke = B(
3317
+ }, jt = ee(
2050
3318
  ({
2051
3319
  store: e,
2052
- record: s,
2053
- property: n,
2054
- DisplayComponent: o,
3320
+ record: n,
3321
+ property: t,
3322
+ DisplayComponent: a,
2055
3323
  entityRoutes: r
2056
3324
  }) => {
2057
- const i = s[n.tsName];
2058
- return /* @__PURE__ */ t.jsxs("div", { children: [
2059
- /* @__PURE__ */ t.jsx(p, { size: "sm", fw: 550, children: /* @__PURE__ */ t.jsx(F, { value: n.label }) }),
2060
- /* @__PURE__ */ t.jsx(
2061
- o,
3325
+ const o = n[t.tsName];
3326
+ return /* @__PURE__ */ i.jsxs("div", { children: [
3327
+ /* @__PURE__ */ i.jsx(E, { size: "sm", fw: 550, children: /* @__PURE__ */ i.jsx(O, { value: t.label }) }),
3328
+ /* @__PURE__ */ i.jsx(
3329
+ a,
2062
3330
  {
2063
3331
  db: e.db,
2064
3332
  entityRoutes: r,
2065
- property: n,
2066
- value: i
3333
+ property: t,
3334
+ value: o
2067
3335
  }
2068
3336
  )
2069
3337
  ] });
2070
3338
  }
2071
- ), _n = B(
3339
+ ), Da = ee(
2072
3340
  ({
2073
3341
  store: e,
2074
- record: s,
2075
- properties: n,
2076
- DisplayComponent: o,
3342
+ record: n,
3343
+ properties: t,
3344
+ DisplayComponent: a,
2077
3345
  entityRoutes: r
2078
3346
  }) => {
2079
- const i = n[n.length - 1], a = n.reduce((c, d) => {
2080
- if (c != null)
2081
- return c[d.tsName];
2082
- }, s);
2083
- return /* @__PURE__ */ t.jsxs("div", { children: [
2084
- /* @__PURE__ */ t.jsx(p, { size: "sm", fw: 550, children: /* @__PURE__ */ t.jsx(F, { value: i.label }) }),
2085
- a !== void 0 && /* @__PURE__ */ t.jsx(
2086
- o,
3347
+ const o = t[t.length - 1], l = t.reduce((s, u) => {
3348
+ if (s != null)
3349
+ return s[u.tsName];
3350
+ }, n);
3351
+ return /* @__PURE__ */ i.jsxs("div", { children: [
3352
+ /* @__PURE__ */ i.jsx(E, { size: "sm", fw: 550, children: /* @__PURE__ */ i.jsx(O, { value: o.label }) }),
3353
+ l !== void 0 && /* @__PURE__ */ i.jsx(
3354
+ a,
2087
3355
  {
2088
3356
  db: e.db,
2089
- property: i,
2090
- value: a,
3357
+ property: o,
3358
+ value: l,
2091
3359
  entityRoutes: r
2092
3360
  }
2093
3361
  )
2094
3362
  ] });
2095
3363
  }
2096
- ), Fn = 12, An = (e) => {
2097
- const s = e.schema, n = S(() => e.fieldGroups.map((o, r) => On(
2098
- s,
3364
+ ), Ma = 12, za = (e) => {
3365
+ const n = e.schema, t = k(() => e.fieldGroups.map((a, r) => Ba(
3366
+ n,
2099
3367
  e.store,
2100
3368
  e.record,
2101
3369
  r,
2102
- o,
3370
+ a,
2103
3371
  e.entityRoutes
2104
- )), [s, e.store, e.record, e.fieldGroups]);
2105
- return /* @__PURE__ */ t.jsx(ee, { gap: "sm", className: e.className, style: e.styles, children: n });
3372
+ )), [n, e.store, e.record, e.fieldGroups]);
3373
+ return /* @__PURE__ */ i.jsx(ge, { gap: "sm", className: e.className, style: e.styles, children: t });
2106
3374
  };
2107
- function On(e, s, n, o, r, i) {
2108
- const a = r.fields, c = [];
2109
- for (let d = 0; d < a.length; d++) {
2110
- const h = Fn / a[d].length;
2111
- if (!Number.isInteger(h))
2112
- throw new Error(`Span must be an integer, but got ${h} for row ${d}`);
2113
- for (let m = 0; m < a[d].length; m++) {
2114
- const y = a[d][m];
2115
- let x;
2116
- if (typeof y == "function")
2117
- x = y(s, n);
2118
- else if (typeof y == "object" && "prop" in y) {
2119
- const g = e.allProperties[y.prop], v = y.display;
2120
- x = /* @__PURE__ */ t.jsx(
2121
- Ke,
3375
+ function Ba(e, n, t, a, r, o) {
3376
+ const l = r.fields, s = [];
3377
+ for (let u = 0; u < l.length; u++) {
3378
+ const c = Ma / l[u].length;
3379
+ if (!Number.isInteger(c))
3380
+ throw new Error(`Span must be an integer, but got ${c} for row ${u}`);
3381
+ for (let d = 0; d < l[u].length; d++) {
3382
+ const x = l[u][d];
3383
+ let g;
3384
+ if (typeof x == "function")
3385
+ g = x(n, t);
3386
+ else if (typeof x == "object" && "prop" in x) {
3387
+ const p = e.allProperties[x.prop], v = x.display;
3388
+ g = /* @__PURE__ */ i.jsx(
3389
+ jt,
2122
3390
  {
2123
- store: s,
2124
- record: n,
2125
- property: g,
3391
+ store: n,
3392
+ record: t,
3393
+ property: p,
2126
3394
  DisplayComponent: v,
2127
- entityRoutes: i
3395
+ entityRoutes: o
2128
3396
  }
2129
3397
  );
2130
3398
  } else {
2131
- const g = e.allProperties[y];
3399
+ const p = e.allProperties[x];
2132
3400
  let v;
2133
- if (W(g))
2134
- v = g.cardinality === "N:N" || g.cardinality === "1:N" ? ue : de;
3401
+ if (se(p))
3402
+ v = p.cardinality === "N:N" || p.cardinality === "1:N" ? Fe : Le;
2135
3403
  else {
2136
- if (K[g.datatype] === void 0)
3404
+ if (Q[p.datatype] === void 0)
2137
3405
  throw new Error(
2138
- `No display component found for datatype ${g.datatype}`
3406
+ `No display component found for datatype ${p.datatype}`
2139
3407
  );
2140
- v = K[g.datatype];
3408
+ v = Q[p.datatype];
2141
3409
  }
2142
- x = /* @__PURE__ */ t.jsx(
2143
- Ke,
3410
+ g = /* @__PURE__ */ i.jsx(
3411
+ jt,
2144
3412
  {
2145
- store: s,
2146
- record: n,
2147
- property: g,
3413
+ store: n,
3414
+ record: t,
3415
+ property: p,
2148
3416
  DisplayComponent: v,
2149
- entityRoutes: i
3417
+ entityRoutes: o
2150
3418
  }
2151
3419
  );
2152
3420
  }
2153
- c.push(
2154
- /* @__PURE__ */ t.jsx(I.Col, { span: h, children: x }, `${d}-${m}`)
3421
+ s.push(
3422
+ /* @__PURE__ */ i.jsx(A.Col, { span: c, children: g }, `${u}-${d}`)
2155
3423
  );
2156
3424
  }
2157
3425
  }
2158
- return /* @__PURE__ */ t.jsx(I, { gutter: "sm", children: c }, o);
3426
+ return /* @__PURE__ */ i.jsx(A, { gutter: "sm", children: s }, a);
2159
3427
  }
2160
- function cr(e, s, n) {
2161
- const o = e[e.length - 1];
3428
+ function xo(e, n, t) {
3429
+ const a = e[e.length - 1];
2162
3430
  let r;
2163
- if (n !== void 0)
2164
- r = n;
2165
- else if (W(o))
2166
- r = o.cardinality === "N:N" || o.cardinality === "1:N" ? ue : de;
3431
+ if (t !== void 0)
3432
+ r = t;
3433
+ else if (se(a))
3434
+ r = a.cardinality === "N:N" || a.cardinality === "1:N" ? Fe : Le;
2167
3435
  else {
2168
- if (K[o.datatype] === void 0)
3436
+ if (Q[a.datatype] === void 0)
2169
3437
  throw new Error(
2170
- `No display component found for datatype ${o.datatype}`
3438
+ `No display component found for datatype ${a.datatype}`
2171
3439
  );
2172
- r = K[o.datatype];
3440
+ r = Q[a.datatype];
2173
3441
  }
2174
- return (i, a) => /* @__PURE__ */ t.jsx(
2175
- _n,
3442
+ return (o, l) => /* @__PURE__ */ i.jsx(
3443
+ Da,
2176
3444
  {
2177
- store: i,
2178
- record: a,
3445
+ store: o,
3446
+ record: l,
2179
3447
  properties: e,
2180
3448
  DisplayComponent: r,
2181
- entityRoutes: s
3449
+ entityRoutes: n
2182
3450
  }
2183
3451
  );
2184
3452
  }
2185
- const dr = (e) => /* @__PURE__ */ t.jsxs(re, { defaultValue: e.fieldTabs[0].tabName, children: [
2186
- /* @__PURE__ */ t.jsx(re.List, { children: e.fieldTabs.map((s, n) => /* @__PURE__ */ t.jsx(re.Tab, { value: s.tabName, children: s.tabName }, n)) }),
2187
- e.fieldTabs.map((s, n) => /* @__PURE__ */ t.jsx(re.Panel, { value: s.tabName, pt: "sm", children: /* @__PURE__ */ t.jsx(
2188
- An,
3453
+ const vo = (e) => /* @__PURE__ */ i.jsxs(ve, { defaultValue: e.fieldTabs[0].tabName, children: [
3454
+ /* @__PURE__ */ i.jsx(ve.List, { children: e.fieldTabs.map((n, t) => /* @__PURE__ */ i.jsx(ve.Tab, { value: n.tabName, children: n.tabName }, t)) }),
3455
+ e.fieldTabs.map((n, t) => /* @__PURE__ */ i.jsx(ve.Panel, { value: n.tabName, pt: "sm", children: /* @__PURE__ */ i.jsx(
3456
+ za,
2189
3457
  {
2190
3458
  schema: e.schema,
2191
3459
  store: e.store,
2192
3460
  record: e.record,
2193
- fieldGroups: s.fieldGroups,
3461
+ fieldGroups: n.fieldGroups,
2194
3462
  styles: e.tabStyles,
2195
3463
  className: e.tabClassName,
2196
3464
  entityRoutes: e.entityRoutes
2197
3465
  }
2198
- ) }, n))
3466
+ ) }, t))
2199
3467
  ] });
2200
3468
  export {
2201
- ve as CountryFlagComponent,
2202
- Nn as DEFAULT_PAGINATION_POSITIONS,
2203
- ze as DataType2Component,
2204
- K as DataType2DisplayComponent,
2205
- Jt as DateDisplay,
2206
- Ht as DateTimeDisplay,
2207
- nr as DateTimeHideTimeDisplay,
2208
- Kt as EmojiCountryFlag,
2209
- jn as FormItem,
2210
- mn as FormItemLabel,
2211
- Vn as LanguageSelector,
2212
- Wn as Loading,
2213
- Hn as LoadingInline,
2214
- te as LocaleContext,
2215
- Un as LocaleProvider,
2216
- Vt as MenuTrie,
2217
- ue as MultiForeignKeyDisplay,
2218
- F as MultiLingualString,
2219
- Jn as NotAuthorized,
2220
- Gn as NotFound,
2221
- Qe as NotFoundInline,
2222
- Yn as NotFoundSubPage,
2223
- er as OrderedUniqueList,
2224
- Ut as Permission,
2225
- qt as SVGCountryFlag,
2226
- lr as SeraEmbeddedTable,
2227
- rr as SeraForm,
2228
- or as SeraTable,
2229
- tr as SeraVerticalMenu,
2230
- An as SeraView,
2231
- dr as SeraViewTab,
2232
- de as SingleForeignKeyDisplay,
2233
- et as Trie,
2234
- Oe as TrieNode,
2235
- Gt as buildMenuItemIndex,
2236
- T as countryFlags,
2237
- Wt as filterAllowedItems,
2238
- Zn as groupBy,
2239
- Xn as groupByAsList,
2240
- at as isSeraColumn,
2241
- ar as makeEmbeddedTableColumns,
2242
- cr as makeFieldDisplay,
2243
- it as makeTableColumn,
2244
- sr as makeTableColumnFromNestedProperty,
2245
- ir as makeTableColumns,
2246
- Qn as uniqueList
3469
+ Be as CountryFlagComponent,
3470
+ _a as DEFAULT_PAGINATION_POSITIONS,
3471
+ xt as DataType2Component,
3472
+ Q as DataType2DisplayComponent,
3473
+ aa as DateDisplay,
3474
+ ra as DateTimeDisplay,
3475
+ uo as DateTimeHideTimeDisplay,
3476
+ _n as EmojiCountryFlag,
3477
+ Ca as FormItem,
3478
+ ja as FormItemLabel,
3479
+ Za as LanguageSelector,
3480
+ to as Loading,
3481
+ no as LoadingInline,
3482
+ pe as LocaleContext,
3483
+ Xa as LocaleProvider,
3484
+ Qr as MenuTrie,
3485
+ Fe as MultiForeignKeyDisplay,
3486
+ O as MultiLingualString,
3487
+ ro as NotAuthorized,
3488
+ Qa as NotFound,
3489
+ Yt as NotFoundInline,
3490
+ eo as NotFoundSubPage,
3491
+ lo as OrderedUniqueList,
3492
+ Zr as Permission,
3493
+ An as SVGCountryFlag,
3494
+ po as SeraEmbeddedTable,
3495
+ co as SeraForm,
3496
+ fo as SeraTable,
3497
+ so as SeraVerticalMenu,
3498
+ za as SeraView,
3499
+ vo as SeraViewTab,
3500
+ Le as SingleForeignKeyDisplay,
3501
+ Gt as Trie,
3502
+ mt as TrieNode,
3503
+ ea as buildMenuItemIndex,
3504
+ N as countryFlags,
3505
+ na as filterAllowedItems,
3506
+ ao as groupBy,
3507
+ oo as groupByAsList,
3508
+ nn as isSeraColumn,
3509
+ go as makeEmbeddedTableColumns,
3510
+ xo as makeFieldDisplay,
3511
+ tn as makeTableColumn,
3512
+ ho as makeTableColumnFromNestedProperty,
3513
+ mo as makeTableColumns,
3514
+ io as uniqueList
2247
3515
  };