@sito/dashboard-app 0.0.51 → 0.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  var et = Object.defineProperty;
2
2
  var tt = (n, e, t) => e in n ? et(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var L = (n, e, t) => tt(n, typeof e != "symbol" ? e + "" : e, t);
3
+ var A = (n, e, t) => tt(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  import "./main.css";
5
- import { State as st, inputStateClassName as nt, labelStateClassName as rt, helperTextStateClassName as it, useTranslation as T, Button as U, Loading as ne, TextInput as ot, FileInput as at, IconButton as ct, Actions as lt, ActionsDropdown as ut, useTableOptions as dt, Badge as mt, Action as ht } from "@sito/dashboard";
5
+ import { State as st, inputStateClassName as nt, labelStateClassName as rt, helperTextStateClassName as it, useTranslation as T, Button as q, Loading as ne, TextInput as ot, FileInput as at, IconButton as ct, Actions as lt, ActionsDropdown as ut, useTableOptions as dt, Badge as mt, Action as ht } from "@sito/dashboard";
6
6
  export * from "@sito/dashboard";
7
7
  import { Action as ln, Actions as un, ActionsDropdown as dn, Button as mn } from "@sito/dashboard";
8
- import { jsxs as S, jsx as p, Fragment as ae } from "react/jsx-runtime";
9
- import { FontAwesomeIcon as P } from "@fortawesome/react-fontawesome";
10
- import { forwardRef as Ae, useState as _, useCallback as w, useEffect as O, useReducer as Le, useRef as K, useMemo as H, createContext as re, useContext as ie, useLayoutEffect as ft } from "react";
8
+ import { jsxs as k, jsx as f, Fragment as ae } from "react/jsx-runtime";
9
+ import { FontAwesomeIcon as K } from "@fortawesome/react-fontawesome";
10
+ import { forwardRef as Ae, useState as L, useCallback as w, useEffect as O, useReducer as Le, useRef as M, useMemo as V, createContext as re, useContext as ie, useLayoutEffect as ft } from "react";
11
11
  import { faEyeSlash as pt, faEye as gt, faClose as _e, faTrash as yt, faRotateLeft as Re, faPencil as bt, faCircleNotch as Ie, faCloudArrowDown as wt, faCloudUpload as St, faArrowUp as kt, faArrowLeft as vt, faAdd as Ne, faFilter as Ct, faBars as Tt, faSearch as Nt, faCircleCheck as Et, faWarning as $t } from "@fortawesome/free-solid-svg-icons";
12
12
  import { createPortal as Fe } from "react-dom";
13
13
  import { QueryClient as xt, QueryClientProvider as At, useMutation as Z, useQueryClient as J, useQuery as Oe } from "@tanstack/react-query";
@@ -25,48 +25,48 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
25
25
  disabled: u = !1,
26
26
  required: l = !1,
27
27
  containerClassName: d = "",
28
- inputClassName: h = "",
29
- labelClassName: m = "",
30
- helperText: f = "",
28
+ inputClassName: m = "",
29
+ labelClassName: p = "",
30
+ helperText: h = "",
31
31
  helperTextClassName: y = "",
32
32
  ...g
33
- } = n, b = t !== void 0, [k, E] = _(
33
+ } = n, b = t !== void 0, [S, E] = L(
34
34
  () => Ee(s)
35
- ), N = b ? Ee(t) : k, $ = (j) => {
36
- b || E(j.currentTarget.value.length > 0), r == null || r(j);
35
+ ), x = b ? Ee(t) : S, N = (U) => {
36
+ b || E(U.currentTarget.value.length > 0), r == null || r(U);
37
37
  };
38
- return /* @__PURE__ */ S("div", { className: `form-paragraph-container group ${d}`, children: [
39
- /* @__PURE__ */ p(
38
+ return /* @__PURE__ */ k("div", { className: `form-paragraph-container group ${d}`, children: [
39
+ /* @__PURE__ */ f(
40
40
  "textarea",
41
41
  {
42
42
  ref: e,
43
43
  name: o,
44
44
  id: c,
45
- className: `text-input text-area form-paragraph-textarea peer ${nt(i)} ${N ? "has-value" : ""} ${g.placeholder ? "has-placeholder" : ""} ${h}`,
45
+ className: `text-input text-area form-paragraph-textarea peer ${nt(i)} ${x ? "has-value" : ""} ${g.placeholder ? "has-placeholder" : ""} ${m}`,
46
46
  required: l,
47
47
  defaultValue: s,
48
48
  ...b ? { value: t } : {},
49
- onChange: $,
49
+ onChange: N,
50
50
  disabled: u,
51
51
  ...g
52
52
  }
53
53
  ),
54
- /* @__PURE__ */ S(
54
+ /* @__PURE__ */ k(
55
55
  "label",
56
56
  {
57
57
  htmlFor: c,
58
- className: `text-input-label ${rt(i)} ${m}`,
58
+ className: `text-input-label ${rt(i)} ${p}`,
59
59
  children: [
60
60
  a,
61
61
  l ? " *" : ""
62
62
  ]
63
63
  }
64
64
  ),
65
- !!f && /* @__PURE__ */ p(
65
+ !!h && /* @__PURE__ */ f(
66
66
  "p",
67
67
  {
68
68
  className: `text-input-helper-text ${it(i)} ${y}`,
69
- children: f
69
+ children: h
70
70
  }
71
71
  )
72
72
  ] });
@@ -79,11 +79,11 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
79
79
  buttonEnd: o = !0,
80
80
  reset: c
81
81
  } = n;
82
- return /* @__PURE__ */ S("form", { className: "form-container", onSubmit: s(r), children: [
82
+ return /* @__PURE__ */ k("form", { className: "form-container", onSubmit: s(r), children: [
83
83
  t,
84
- /* @__PURE__ */ S("div", { className: `form-actions ${o ? "end" : ""}`, children: [
85
- /* @__PURE__ */ S(
86
- U,
84
+ /* @__PURE__ */ k("div", { className: `form-actions ${o ? "end" : ""}`, children: [
85
+ /* @__PURE__ */ k(
86
+ q,
87
87
  {
88
88
  type: "submit",
89
89
  color: "primary",
@@ -92,7 +92,7 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
92
92
  name: e("_accessibility:buttons.submit"),
93
93
  "aria-label": e("_accessibility:ariaLabels.submit"),
94
94
  children: [
95
- i ? /* @__PURE__ */ p(
95
+ i ? /* @__PURE__ */ f(
96
96
  ne,
97
97
  {
98
98
  color: "stroke-base",
@@ -104,8 +104,8 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
104
104
  ]
105
105
  }
106
106
  ),
107
- /* @__PURE__ */ p(
108
- U,
107
+ /* @__PURE__ */ f(
108
+ q,
109
109
  {
110
110
  type: "button",
111
111
  variant: "outlined",
@@ -118,8 +118,8 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
118
118
  ] })
119
119
  ] });
120
120
  }, Ss = Ae(function(n, e) {
121
- const { t } = T(), [s, r] = _(!1);
122
- return /* @__PURE__ */ p(ot, { ...n, type: s ? "text" : "password", ref: e, children: /* @__PURE__ */ p(
121
+ const { t } = T(), [s, r] = L(!1);
122
+ return /* @__PURE__ */ f(ot, { ...n, type: s ? "text" : "password", ref: e, children: /* @__PURE__ */ f(
123
123
  G,
124
124
  {
125
125
  type: "button",
@@ -157,28 +157,28 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
157
157
  [r]
158
158
  );
159
159
  return O(() => {
160
- const d = (h) => {
161
- h ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
160
+ const d = (m) => {
161
+ m ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
162
162
  };
163
163
  return d(i), () => {
164
164
  d(!1);
165
165
  };
166
166
  }, [i]), Fe(
167
- /* @__PURE__ */ p(
167
+ /* @__PURE__ */ f(
168
168
  "div",
169
169
  {
170
170
  "aria-label": e("_accessibility:ariaLabels.closeDialog"),
171
171
  "aria-hidden": !i,
172
172
  onClick: l,
173
173
  className: `dialog-backdrop animated ${i ? `opened ${a}` : "closed"} ${o}`,
174
- children: /* @__PURE__ */ S(
174
+ children: /* @__PURE__ */ k(
175
175
  "div",
176
176
  {
177
177
  className: `dialog elevated animated ${i ? `opened ${a}` : "closed"} ${c}`,
178
178
  children: [
179
- /* @__PURE__ */ S("div", { className: "dialog-header", children: [
180
- /* @__PURE__ */ p("h3", { className: "dialog-title", children: t }),
181
- /* @__PURE__ */ p(
179
+ /* @__PURE__ */ k("div", { className: "dialog-header", children: [
180
+ /* @__PURE__ */ f("h3", { className: "dialog-title", children: t }),
181
+ /* @__PURE__ */ f(
182
182
  G,
183
183
  {
184
184
  icon: _e,
@@ -214,17 +214,18 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
214
214
  primaryClassName: u = "",
215
215
  alignEnd: l = !1,
216
216
  primaryName: d,
217
- primaryAriaLabel: h,
218
- cancelName: m,
219
- cancelAriaLabel: f
217
+ primaryAriaLabel: m,
218
+ cancelName: p,
219
+ cancelAriaLabel: h,
220
+ extraActions: y = []
220
221
  } = n;
221
- return /* @__PURE__ */ S(
222
+ return /* @__PURE__ */ k(
222
223
  "div",
223
224
  {
224
225
  className: `dialog-actions ${l ? "end" : ""} ${a}`,
225
226
  children: [
226
- /* @__PURE__ */ S(
227
- U,
227
+ /* @__PURE__ */ k(
228
+ q,
228
229
  {
229
230
  type: c,
230
231
  color: "primary",
@@ -233,9 +234,9 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
233
234
  disabled: o,
234
235
  onClick: s,
235
236
  name: d,
236
- "aria-label": h,
237
+ "aria-label": m,
237
238
  children: [
238
- i ? /* @__PURE__ */ p(
239
+ i ? /* @__PURE__ */ f(
239
240
  ne,
240
241
  {
241
242
  color: "stroke-base",
@@ -247,15 +248,16 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
247
248
  ]
248
249
  }
249
250
  ),
250
- /* @__PURE__ */ p(
251
- U,
251
+ y == null ? void 0 : y.map((g) => /* @__PURE__ */ f(q, { ...g }, g.id)),
252
+ /* @__PURE__ */ f(
253
+ q,
252
254
  {
253
255
  type: "button",
254
256
  variant: "outlined",
255
257
  disabled: o,
256
258
  onClick: r,
257
- name: m,
258
- "aria-label": f,
259
+ name: p,
260
+ "aria-label": h,
259
261
  children: t
260
262
  }
261
263
  )
@@ -270,11 +272,12 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
270
272
  handleClose: i,
271
273
  isLoading: o = !1,
272
274
  buttonEnd: c = !0,
273
- ...a
275
+ extraActions: a = [],
276
+ ...u
274
277
  } = n;
275
- return /* @__PURE__ */ p(ke, { ...a, handleClose: i, children: /* @__PURE__ */ S("form", { onSubmit: s(r), children: [
276
- /* @__PURE__ */ p("div", { className: "form-container", children: t }),
277
- /* @__PURE__ */ p(
278
+ return /* @__PURE__ */ f(ke, { ...u, handleClose: i, children: /* @__PURE__ */ k("form", { onSubmit: s(r), children: [
279
+ /* @__PURE__ */ f("div", { className: "form-container", children: t }),
280
+ /* @__PURE__ */ f(
278
281
  ve,
279
282
  {
280
283
  primaryType: "submit",
@@ -288,7 +291,8 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
288
291
  primaryName: e("_accessibility:buttons.submit"),
289
292
  primaryAriaLabel: e("_accessibility:ariaLabels.submit"),
290
293
  cancelName: e("_accessibility:buttons.cancel"),
291
- cancelAriaLabel: e("_accessibility:ariaLabels.cancel")
294
+ cancelAriaLabel: e("_accessibility:ariaLabels.cancel"),
295
+ extraActions: a
292
296
  }
293
297
  )
294
298
  ] }) });
@@ -298,11 +302,12 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
298
302
  handleSubmit: s,
299
303
  handleClose: r,
300
304
  isLoading: i = !1,
301
- ...o
305
+ extraActions: o = [],
306
+ ...c
302
307
  } = n;
303
- return /* @__PURE__ */ S(ke, { ...o, handleClose: r, children: [
308
+ return /* @__PURE__ */ k(ke, { ...c, handleClose: r, children: [
304
309
  t,
305
- /* @__PURE__ */ p(
310
+ /* @__PURE__ */ f(
306
311
  ve,
307
312
  {
308
313
  primaryText: e("_accessibility:buttons.ok"),
@@ -316,22 +321,23 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
316
321
  primaryName: e("_accessibility:buttons.ok"),
317
322
  primaryAriaLabel: e("_accessibility:ariaLabels.ok"),
318
323
  cancelName: e("_accessibility:buttons.cancel"),
319
- cancelAriaLabel: e("_accessibility:ariaLabels.cancel")
324
+ cancelAriaLabel: e("_accessibility:ariaLabels.cancel"),
325
+ extraActions: o
320
326
  }
321
327
  )
322
328
  ] });
323
329
  };
324
330
  function _t(n) {
325
331
  const { message: e, className: t = "" } = n, { t: s } = T();
326
- return /* @__PURE__ */ p("p", { className: `import-error-message ${t}`, children: e ?? s("_messages:errors.parseFile", {
332
+ return /* @__PURE__ */ f("p", { className: `import-error-message ${t}`, children: e ?? s("_messages:errors.parseFile", {
327
333
  defaultValue: "Failed to process file"
328
334
  }) });
329
335
  }
330
336
  function Rt(n) {
331
337
  const { message: e, className: t = "" } = n, { t: s } = T();
332
- return /* @__PURE__ */ S("div", { className: `import-loading ${t}`, children: [
333
- /* @__PURE__ */ p(ne, { loaderClass: "w-5 h-5", className: "!w-auto" }),
334
- /* @__PURE__ */ p("span", { children: e ?? s("_messages:loading.processingFile", {
338
+ return /* @__PURE__ */ k("div", { className: `import-loading ${t}`, children: [
339
+ /* @__PURE__ */ f(ne, { loaderClass: "w-5 h-5", className: "!w-auto" }),
340
+ /* @__PURE__ */ f("span", { children: e ?? s("_messages:loading.processingFile", {
335
341
  defaultValue: "Processing file..."
336
342
  }) })
337
343
  ] });
@@ -340,12 +346,12 @@ function It(n) {
340
346
  const { items: e, max: t = 5, className: s = "" } = n, { t: r } = T();
341
347
  if (!e || e.length === 0) return null;
342
348
  const i = e.slice(0, t);
343
- return /* @__PURE__ */ S("div", { className: `import-preview ${s}`, children: [
344
- /* @__PURE__ */ p("p", { className: "import-preview-count", children: r("_pages:common.actions.import.previewCount", {
349
+ return /* @__PURE__ */ k("div", { className: `import-preview ${s}`, children: [
350
+ /* @__PURE__ */ f("p", { className: "import-preview-count", children: r("_pages:common.actions.import.previewCount", {
345
351
  count: e.length,
346
352
  defaultValue: `Preview: ${e.length} items`
347
353
  }) }),
348
- /* @__PURE__ */ p("pre", { className: "import-preview-content", children: JSON.stringify(i, null, 2) })
354
+ /* @__PURE__ */ f("pre", { className: "import-preview-content", children: JSON.stringify(i, null, 2) })
349
355
  ] });
350
356
  }
351
357
  const De = () => ({
@@ -399,90 +405,91 @@ const Cs = (n) => {
399
405
  renderCustomPreview: a,
400
406
  onOverrideChange: u,
401
407
  open: l,
402
- ...d
403
- } = n, [h, m] = Le(
408
+ extraActions: d = [],
409
+ ...m
410
+ } = n, [p, h] = Le(
404
411
  Ft,
405
412
  De()
406
413
  ), {
407
- file: f,
408
- previewItems: y,
409
- parseError: g,
410
- processing: b,
411
- overrideExisting: k,
412
- inputKey: E
413
- } = h, N = K(c), $ = K(o);
414
+ file: y,
415
+ previewItems: g,
416
+ parseError: b,
417
+ processing: S,
418
+ overrideExisting: E,
419
+ inputKey: x
420
+ } = p, N = M(c), U = M(o);
414
421
  O(() => {
415
422
  N.current = c;
416
423
  }, [c]), O(() => {
417
- $.current = o;
424
+ U.current = o;
418
425
  }, [o]), O(() => {
419
- l || m({ type: "RESET" });
426
+ l || h({ type: "RESET" });
420
427
  }, [l]);
421
- const j = w(
422
- async (I, v) => {
423
- var A;
424
- if ($.current) {
425
- m({ type: "START_PROCESSING" });
428
+ const H = w(
429
+ async (v, $) => {
430
+ var _;
431
+ if (U.current) {
432
+ h({ type: "START_PROCESSING" });
426
433
  try {
427
- const x = await $.current(I, { override: v });
428
- m({ type: "SET_PREVIEW", items: x ?? [] }), (A = N.current) == null || A.call(N, x ?? []);
429
- } catch (x) {
430
- console.error(x);
431
- const q = x instanceof Error ? x.message : "Failed to parse file";
432
- m({ type: "SET_ERROR", message: q });
434
+ const R = await U.current(v, { override: $ });
435
+ h({ type: "SET_PREVIEW", items: R ?? [] }), (_ = N.current) == null || _.call(N, R ?? []);
436
+ } catch (R) {
437
+ console.error(R);
438
+ const j = R instanceof Error ? R.message : "Failed to parse file";
439
+ h({ type: "SET_ERROR", message: j });
433
440
  }
434
441
  }
435
442
  },
436
443
  []
437
444
  );
438
- return /* @__PURE__ */ S(ke, { ...d, open: l, handleClose: r, children: [
439
- /* @__PURE__ */ p(
445
+ return /* @__PURE__ */ k(ke, { ...m, open: l, handleClose: r, children: [
446
+ /* @__PURE__ */ f(
440
447
  at,
441
448
  {
442
449
  onClear: () => {
443
- var I;
444
- m({ type: "SET_FILE", file: null }), (I = N.current) == null || I.call(N, []);
450
+ var v;
451
+ h({ type: "SET_FILE", file: null }), (v = N.current) == null || v.call(N, []);
445
452
  },
446
- onChange: (I) => {
447
- var A, x;
448
- const v = (A = I.target.files) == null ? void 0 : A[0];
449
- if (!v) {
450
- m({ type: "SET_FILE", file: null }), (x = N.current) == null || x.call(N, []);
453
+ onChange: (v) => {
454
+ var _, R;
455
+ const $ = (_ = v.target.files) == null ? void 0 : _[0];
456
+ if (!$) {
457
+ h({ type: "SET_FILE", file: null }), (R = N.current) == null || R.call(N, []);
451
458
  return;
452
459
  }
453
- m({ type: "SET_FILE", file: v }), j(v, k);
460
+ h({ type: "SET_FILE", file: $ }), H($, E);
454
461
  },
455
462
  label: e("_accessibility:labels.file")
456
463
  },
457
- E
464
+ x
458
465
  ),
459
- /* @__PURE__ */ S("label", { className: "import-override-label", children: [
460
- /* @__PURE__ */ p(
466
+ /* @__PURE__ */ k("label", { className: "import-override-label", children: [
467
+ /* @__PURE__ */ f(
461
468
  "input",
462
469
  {
463
470
  type: "checkbox",
464
- checked: k,
465
- onChange: (I) => {
466
- const v = I.target.checked;
467
- m({ type: "SET_OVERRIDE", value: v }), u == null || u(v), f && j(f, v);
471
+ checked: E,
472
+ onChange: (v) => {
473
+ const $ = v.target.checked;
474
+ h({ type: "SET_OVERRIDE", value: $ }), u == null || u($), y && H(y, $);
468
475
  }
469
476
  }
470
477
  ),
471
- /* @__PURE__ */ p("span", { children: e("_pages:common.actions.import.override", {
478
+ /* @__PURE__ */ f("span", { children: e("_pages:common.actions.import.override", {
472
479
  defaultValue: "Override existing items"
473
480
  }) })
474
481
  ] }),
475
- /* @__PURE__ */ p(_t, { message: g }),
476
- b && /* @__PURE__ */ p(Rt, {}),
477
- a ? a(y) : !!y && y.length > 0 && /* @__PURE__ */ p(It, { items: y }),
482
+ /* @__PURE__ */ f(_t, { message: b }),
483
+ S && /* @__PURE__ */ f(Rt, {}),
484
+ a ? a(g) : !!g && g.length > 0 && /* @__PURE__ */ f(It, { items: g }),
478
485
  t,
479
- /* @__PURE__ */ p(
486
+ /* @__PURE__ */ f(
480
487
  ve,
481
488
  {
482
489
  primaryText: e("_accessibility:buttons.ok"),
483
490
  cancelText: e("_accessibility:buttons.cancel"),
484
491
  onPrimaryClick: () => {
485
- (!o || !!y && y.length > 0) && s();
492
+ (!o || !!g && g.length > 0) && s();
486
493
  },
487
494
  onCancel: r,
488
495
  isLoading: i,
@@ -491,12 +498,13 @@ const Cs = (n) => {
491
498
  primaryName: e("_accessibility:buttons.ok"),
492
499
  primaryAriaLabel: e("_accessibility:ariaLabels.ok"),
493
500
  cancelName: e("_accessibility:buttons.cancel"),
494
- cancelAriaLabel: e("_accessibility:ariaLabels.cancel")
501
+ cancelAriaLabel: e("_accessibility:ariaLabels.cancel"),
502
+ extraActions: d
495
503
  }
496
504
  )
497
505
  ] });
498
506
  };
499
- var R = /* @__PURE__ */ ((n) => (n[n.success = 0] = "success", n[n.error = 1] = "error", n[n.warning = 2] = "warning", n[n.info = 3] = "info", n))(R || {}), F = /* @__PURE__ */ ((n) => (n.GET = "GET", n.POST = "POST", n.PUT = "PUT", n.PATCH = "PATCH", n.DELETE = "DELETE", n))(F || {});
507
+ var I = /* @__PURE__ */ ((n) => (n[n.success = 0] = "success", n[n.error = 1] = "error", n[n.warning = 2] = "warning", n[n.info = 3] = "info", n))(I || {}), F = /* @__PURE__ */ ((n) => (n.GET = "GET", n.POST = "POST", n.PUT = "PUT", n.PATCH = "PATCH", n.DELETE = "DELETE", n))(F || {});
500
508
  const Ot = (n) => Array.isArray(n) || n instanceof Headers ? !1 : typeof n == "object" && n !== null && ("headers" in n || "credentials" in n), Mt = (n) => n ? Ot(n) ? n : { headers: n } : {}, Dt = (n) => n ? n instanceof Headers ? Object.fromEntries(n.entries()) : Array.isArray(n) ? Object.fromEntries(n) : n : {};
501
509
  async function be(n, e = "GET", t, s) {
502
510
  const r = Mt(s), i = {
@@ -581,15 +589,15 @@ const Pe = (n, e, t) => {
581
589
  * @param tokenAcquirer custom token acquirer
582
590
  */
583
591
  constructor(e, t = "user", s = !0, r, i = {}) {
584
- L(this, "baseUrl");
585
- L(this, "userKey");
586
- L(this, "rememberKey");
587
- L(this, "refreshTokenKey");
588
- L(this, "accessTokenExpiresAtKey");
589
- L(this, "refreshEndpoint");
590
- L(this, "refreshExpirySkewMs");
591
- L(this, "secured");
592
- L(this, "tokenAcquirer");
592
+ A(this, "baseUrl");
593
+ A(this, "userKey");
594
+ A(this, "rememberKey");
595
+ A(this, "refreshTokenKey");
596
+ A(this, "accessTokenExpiresAtKey");
597
+ A(this, "refreshEndpoint");
598
+ A(this, "refreshExpirySkewMs");
599
+ A(this, "secured");
600
+ A(this, "tokenAcquirer");
593
601
  this.baseUrl = e, this.secured = s, this.userKey = t, this.rememberKey = i.rememberKey ?? "remember", this.refreshTokenKey = i.refreshTokenKey ?? "refreshToken", this.accessTokenExpiresAtKey = i.accessTokenExpiresAtKey ?? "accessTokenExpiresAt", this.refreshEndpoint = i.refreshEndpoint ?? "auth/refresh", this.refreshExpirySkewMs = i.refreshExpirySkewMs ?? 5e3, this.tokenAcquirer = r ?? this.defaultTokenAcquirer;
594
602
  }
595
603
  defaultTokenAcquirer(e) {
@@ -624,12 +632,12 @@ const Pe = (n, e, t) => {
624
632
  return Number.isNaN(s) ? !1 : Date.now() >= s - this.refreshExpirySkewMs;
625
633
  }
626
634
  clearStoredSession() {
627
- D(this.userKey), D(this.rememberKey), D(this.refreshTokenKey), D(this.accessTokenExpiresAtKey);
635
+ P(this.userKey), P(this.rememberKey), P(this.refreshTokenKey), P(this.accessTokenExpiresAtKey);
628
636
  }
629
637
  storeSession(e, t) {
630
638
  W(this.userKey, e.token);
631
639
  const s = e.refreshToken === void 0 ? t : e.refreshToken;
632
- typeof s == "string" && s.length ? W(this.refreshTokenKey, s) : D(this.refreshTokenKey), typeof e.accessTokenExpiresAt == "string" && e.accessTokenExpiresAt.length ? W(this.accessTokenExpiresAtKey, e.accessTokenExpiresAt) : D(this.accessTokenExpiresAtKey);
640
+ typeof s == "string" && s.length ? W(this.refreshTokenKey, s) : P(this.refreshTokenKey), typeof e.accessTokenExpiresAt == "string" && e.accessTokenExpiresAt.length ? W(this.accessTokenExpiresAtKey, e.accessTokenExpiresAt) : P(this.accessTokenExpiresAtKey);
633
641
  }
634
642
  async refreshAccessTokenWithMutex() {
635
643
  const e = this.getRefreshToken();
@@ -805,11 +813,11 @@ const Pe = (n, e, t) => {
805
813
  return r;
806
814
  }
807
815
  };
808
- L(se, "refreshInFlight", /* @__PURE__ */ new Map());
816
+ A(se, "refreshInFlight", /* @__PURE__ */ new Map());
809
817
  let me = se;
810
818
  class Kt {
811
819
  constructor(e, t = "user", s = {}) {
812
- L(this, "api");
820
+ A(this, "api");
813
821
  this.api = new me(e, t, !1, void 0, s);
814
822
  }
815
823
  async login(e) {
@@ -856,7 +864,7 @@ class Kt {
856
864
  }
857
865
  class Ts {
858
866
  constructor(e, t, s = {}) {
859
- L(this, "auth");
867
+ A(this, "auth");
860
868
  this.auth = new Kt(e, t, s);
861
869
  }
862
870
  /**
@@ -873,9 +881,9 @@ class Ns {
873
881
  * @param secured to see if the api client requires jwt protection
874
882
  */
875
883
  constructor(e, t, s = "user", r = !0, i = {}) {
876
- L(this, "table");
877
- L(this, "secured");
878
- L(this, "api");
884
+ A(this, "table");
885
+ A(this, "secured");
886
+ A(this, "api");
879
887
  this.table = e, this.secured = r, this.api = new me(t, s, r, void 0, i);
880
888
  }
881
889
  /**
@@ -971,10 +979,10 @@ class Ns {
971
979
  }
972
980
  class Es {
973
981
  constructor(e, t, s = 1) {
974
- L(this, "table");
975
- L(this, "dbName");
976
- L(this, "version");
977
- L(this, "db", null);
982
+ A(this, "table");
983
+ A(this, "dbName");
984
+ A(this, "version");
985
+ A(this, "db", null);
978
986
  this.table = e, this.dbName = t, this.version = s;
979
987
  }
980
988
  close() {
@@ -1025,13 +1033,13 @@ class Es {
1025
1033
  return await this.request(i.put(r)), r;
1026
1034
  }
1027
1035
  async get(e, t) {
1028
- var m;
1029
- const s = await this.transaction("readonly"), r = await this.request(s.getAll()), i = this.applyFilter(r, t), o = (e == null ? void 0 : e.sortingBy) ?? "id", c = ((m = e == null ? void 0 : e.sortingOrder) == null ? void 0 : m.toLowerCase()) ?? "asc";
1030
- i.sort((f, y) => {
1031
- const g = f[o], b = y[o];
1036
+ var p;
1037
+ const s = await this.transaction("readonly"), r = await this.request(s.getAll()), i = this.applyFilter(r, t), o = (e == null ? void 0 : e.sortingBy) ?? "id", c = ((p = e == null ? void 0 : e.sortingOrder) == null ? void 0 : p.toLowerCase()) ?? "asc";
1038
+ i.sort((h, y) => {
1039
+ const g = h[o], b = y[o];
1032
1040
  return g < b ? c === "asc" ? -1 : 1 : g > b ? c === "asc" ? 1 : -1 : 0;
1033
1041
  });
1034
- const a = (e == null ? void 0 : e.pageSize) ?? 10, u = (e == null ? void 0 : e.currentPage) ?? 0, l = i.length, d = Math.ceil(l / a), h = i.slice(
1042
+ const a = (e == null ? void 0 : e.pageSize) ?? 10, u = (e == null ? void 0 : e.currentPage) ?? 0, l = i.length, d = Math.ceil(l / a), m = i.slice(
1035
1043
  u * a,
1036
1044
  u * a + a
1037
1045
  );
@@ -1042,7 +1050,7 @@ class Es {
1042
1050
  pageSize: a,
1043
1051
  totalElements: l,
1044
1052
  totalPages: d,
1045
- items: h
1053
+ items: m
1046
1054
  };
1047
1055
  }
1048
1056
  async export(e) {
@@ -1126,7 +1134,7 @@ const X = (n, e = "") => {
1126
1134
  }, W = (n, e) => localStorage.setItem(
1127
1135
  n,
1128
1136
  typeof e == "object" ? JSON.stringify(e) : e
1129
- ), D = (n) => localStorage.removeItem(n);
1137
+ ), P = (n) => localStorage.removeItem(n);
1130
1138
  function xs(n) {
1131
1139
  const e = n ? new Date(n) : /* @__PURE__ */ new Date(), t = {
1132
1140
  weekday: "long",
@@ -1181,38 +1189,38 @@ const Ke = re(
1181
1189
  void 0
1182
1190
  );
1183
1191
  function Rs(n) {
1184
- const { children: e } = n, t = K(0), [s, r] = Le(
1185
- (h, m) => {
1186
- const { type: f, items: y, id: g } = m;
1187
- switch (f) {
1192
+ const { children: e } = n, t = M(0), [s, r] = Le(
1193
+ (m, p) => {
1194
+ const { type: h, items: y, id: g } = p;
1195
+ switch (h) {
1188
1196
  case "set":
1189
1197
  return y ?? [];
1190
1198
  case "remove":
1191
- return g !== void 0 ? h.filter((b) => b.id !== g) : [];
1199
+ return g !== void 0 ? m.filter((b) => b.id !== g) : [];
1192
1200
  }
1193
- return h;
1201
+ return m;
1194
1202
  },
1195
1203
  [],
1196
1204
  () => []
1197
- ), i = (h) => h.map((m) => ({ ...m, id: t.current++ })), o = w(
1198
- (h) => r({
1205
+ ), i = (m) => m.map((p) => ({ ...p, id: t.current++ })), o = w(
1206
+ (m) => r({
1199
1207
  type: "set",
1200
- items: i([{ ...h, type: R.error }])
1208
+ items: i([{ ...m, type: I.error }])
1201
1209
  }),
1202
1210
  []
1203
1211
  ), c = w(
1204
- (h) => r({ type: "set", items: i([{ ...h }]) }),
1212
+ (m) => r({ type: "set", items: i([{ ...m }]) }),
1205
1213
  []
1206
1214
  ), a = w(
1207
- (h) => r({ type: "set", items: i(h) }),
1215
+ (m) => r({ type: "set", items: i(m) }),
1208
1216
  []
1209
1217
  ), u = w(
1210
- (h) => r({
1218
+ (m) => r({
1211
1219
  type: "set",
1212
- items: i([{ ...h, type: R.success }])
1220
+ items: i([{ ...m, type: I.success }])
1213
1221
  }),
1214
1222
  []
1215
- ), l = (h) => r({ type: "remove", id: h }), d = H(() => ({
1223
+ ), l = (m) => r({ type: "remove", id: m }), d = V(() => ({
1216
1224
  notification: s,
1217
1225
  removeNotification: l,
1218
1226
  showErrorNotification: o,
@@ -1226,7 +1234,7 @@ function Rs(n) {
1226
1234
  a,
1227
1235
  u
1228
1236
  ]);
1229
- return /* @__PURE__ */ p(Ke.Provider, { value: d, children: e });
1237
+ return /* @__PURE__ */ f(Ke.Provider, { value: d, children: e });
1230
1238
  }
1231
1239
  const ee = () => {
1232
1240
  const n = ie(Ke);
@@ -1248,8 +1256,8 @@ const ee = () => {
1248
1256
  }), Is = qe(), Ue = re(
1249
1257
  void 0
1250
1258
  ), Fs = (n) => {
1251
- const { children: e, manager: t, queryClient: s } = n, [r] = _(qe), i = s ?? r;
1252
- return /* @__PURE__ */ p(Ue.Provider, { value: { client: t }, children: /* @__PURE__ */ p(At, { client: i, children: e }) });
1259
+ const { children: e, manager: t, queryClient: s } = n, [r] = L(qe), i = s ?? r;
1260
+ return /* @__PURE__ */ f(Ue.Provider, { value: { client: t }, children: /* @__PURE__ */ f(At, { client: i, children: e }) });
1253
1261
  }, Ut = () => {
1254
1262
  const n = ie(Ue);
1255
1263
  if (!n)
@@ -1265,26 +1273,26 @@ const ee = () => {
1265
1273
  remember: r = "remember",
1266
1274
  refreshTokenKey: i = "refreshToken",
1267
1275
  accessTokenExpiresAtKey: o = "accessTokenExpiresAt"
1268
- } = n, c = Ut(), [a, u] = _({}), l = w(() => {
1269
- D(s), D(r), D(i), D(o);
1270
- }, [o, i, r, s]), d = w(() => !!X(t, "boolean") && a.token === void 0, [a.token, t]), h = w(
1276
+ } = n, c = Ut(), [a, u] = L({}), l = w(() => {
1277
+ P(s), P(r), P(i), P(o);
1278
+ }, [o, i, r, s]), d = w(() => !!X(t, "boolean") && a.token === void 0, [a.token, t]), m = w(
1271
1279
  (b) => {
1272
1280
  W(t, b);
1273
1281
  },
1274
1282
  [t]
1275
- ), m = w(
1276
- (b, k) => {
1283
+ ), p = w(
1284
+ (b, S) => {
1277
1285
  if (!b) return;
1278
- const E = X(r, "boolean"), N = k ?? (typeof E == "boolean" ? E : !1);
1279
- u(b), D(t), W(s, b.token), W(r, N), typeof b.refreshToken == "string" && b.refreshToken.length ? W(i, b.refreshToken) : D(i), typeof b.accessTokenExpiresAt == "string" && b.accessTokenExpiresAt.length ? W(o, b.accessTokenExpiresAt) : D(o);
1286
+ const E = X(r, "boolean"), x = S ?? (typeof E == "boolean" ? E : !1);
1287
+ u(b), P(t), W(s, b.token), W(r, x), typeof b.refreshToken == "string" && b.refreshToken.length ? W(i, b.refreshToken) : P(i), typeof b.accessTokenExpiresAt == "string" && b.accessTokenExpiresAt.length ? W(o, b.accessTokenExpiresAt) : P(o);
1280
1288
  },
1281
1289
  [o, t, i, r, s]
1282
- ), f = w(async () => {
1283
- const b = X(s) ?? a.token, k = X(i) ?? (typeof a.refreshToken == "string" ? a.refreshToken : void 0);
1290
+ ), h = w(async () => {
1291
+ const b = X(s) ?? a.token, S = X(i) ?? (typeof a.refreshToken == "string" ? a.refreshToken : void 0);
1284
1292
  try {
1285
1293
  await c.Auth.logout({
1286
1294
  accessToken: b,
1287
- refreshToken: k
1295
+ refreshToken: S
1288
1296
  });
1289
1297
  } catch (E) {
1290
1298
  console.error(E);
@@ -1300,41 +1308,41 @@ const ee = () => {
1300
1308
  ]), y = w(async () => {
1301
1309
  try {
1302
1310
  const b = await c.Auth.getSession();
1303
- m(b);
1311
+ p(b);
1304
1312
  } catch (b) {
1305
- console.error(b), f();
1313
+ console.error(b), h();
1306
1314
  }
1307
- }, [m, f, c.Auth]), g = H(() => ({
1315
+ }, [p, h, c.Auth]), g = V(() => ({
1308
1316
  account: a,
1309
- logUser: m,
1310
- logoutUser: f,
1317
+ logUser: p,
1318
+ logoutUser: h,
1311
1319
  logUserFromLocal: y,
1312
1320
  isInGuestMode: d,
1313
- setGuestMode: h
1321
+ setGuestMode: m
1314
1322
  }), [
1315
1323
  a,
1316
- m,
1317
- f,
1324
+ p,
1325
+ h,
1318
1326
  y,
1319
1327
  d,
1320
- h
1328
+ m
1321
1329
  ]);
1322
- return /* @__PURE__ */ p(je.Provider, { value: g, children: e });
1323
- }, Qe = () => {
1330
+ return /* @__PURE__ */ f(je.Provider, { value: g, children: e });
1331
+ }, He = () => {
1324
1332
  const n = ie(je);
1325
1333
  if (!n) throw new Error("authContext must be used within a Provider");
1326
1334
  return n;
1327
- }, He = re({}), Ms = (n) => {
1335
+ }, Qe = re({}), Ms = (n) => {
1328
1336
  const { children: e, location: t, navigate: s, linkComponent: r, searchComponent: i } = n;
1329
- return /* @__PURE__ */ p(
1330
- He.Provider,
1337
+ return /* @__PURE__ */ f(
1338
+ Qe.Provider,
1331
1339
  {
1332
1340
  value: { location: t, navigate: s, linkComponent: r, searchComponent: i },
1333
1341
  children: e
1334
1342
  }
1335
1343
  );
1336
1344
  }, ce = () => {
1337
- const n = ie(He);
1345
+ const n = ie(Qe);
1338
1346
  if (n === void 0 || Object.keys(n).length === 0)
1339
1347
  throw new Error(
1340
1348
  "Config provider has not been set. This step is required and cannot be skipped."
@@ -1351,7 +1359,7 @@ const ee = () => {
1351
1359
  }, Ve = re(
1352
1360
  jt
1353
1361
  ), Ds = (n) => {
1354
- const { children: e } = n, [t, s] = _({}), r = w(
1362
+ const { children: e } = n, [t, s] = L({}), r = w(
1355
1363
  (a, u) => s((l) => ({
1356
1364
  ...l,
1357
1365
  [a]: [...l[a] ?? [], u]
@@ -1360,7 +1368,7 @@ const ee = () => {
1360
1368
  ), i = w(
1361
1369
  (a, u) => s((l) => ({
1362
1370
  ...l,
1363
- [a]: (l[a] ?? []).filter((d, h) => h !== u)
1371
+ [a]: (l[a] ?? []).filter((d, m) => m !== u)
1364
1372
  })),
1365
1373
  []
1366
1374
  ), o = w((a) => {
@@ -1368,7 +1376,7 @@ const ee = () => {
1368
1376
  ...u,
1369
1377
  [a]: []
1370
1378
  }) : {});
1371
- }, []), c = H(
1379
+ }, []), c = V(
1372
1380
  () => ({
1373
1381
  dynamicItems: t,
1374
1382
  addChildItem: r,
@@ -1377,36 +1385,36 @@ const ee = () => {
1377
1385
  }),
1378
1386
  [t, o, i, r]
1379
1387
  );
1380
- return /* @__PURE__ */ p(
1388
+ return /* @__PURE__ */ f(
1381
1389
  Ve.Provider,
1382
1390
  {
1383
1391
  value: c,
1384
1392
  children: e
1385
1393
  }
1386
1394
  );
1387
- }, Qt = () => ie(Ve);
1395
+ }, Ht = () => ie(Ve);
1388
1396
  function Ps(n) {
1389
- const { t: e } = T(), { open: t, onClose: s, menuMap: r, logo: i } = n, { account: o } = Qe(), { dynamicItems: c } = Qt(), { linkComponent: a, location: u } = ce(), l = a, d = H(() => r.filter((g) => {
1390
- const b = g.auth, k = !!(o != null && o.email);
1391
- return b == null || b && k || !b && !k;
1392
- }), [o == null ? void 0 : o.email, r]), h = w(
1397
+ const { t: e } = T(), { open: t, onClose: s, menuMap: r, logo: i } = n, { account: o } = He(), { dynamicItems: c } = Ht(), { linkComponent: a, location: u } = ce(), l = a, d = V(() => r.filter((g) => {
1398
+ const b = g.auth, S = !!(o != null && o.email);
1399
+ return b == null || b && S || !b && !S;
1400
+ }), [o == null ? void 0 : o.email, r]), m = w(
1393
1401
  (g) => {
1394
1402
  g.key === "Escape" && t && s();
1395
1403
  },
1396
1404
  [s, t]
1397
1405
  );
1398
- O(() => (document.addEventListener("keydown", h), () => {
1399
- document.removeEventListener("keydown", h);
1400
- }), [h]);
1401
- const m = w(
1406
+ O(() => (document.addEventListener("keydown", m), () => {
1407
+ document.removeEventListener("keydown", m);
1408
+ }), [m]);
1409
+ const p = w(
1402
1410
  (g, b) => b ? g === `${u.pathname}${u.search}` : g === u.pathname,
1403
1411
  [u.pathname, u.search]
1404
- ), f = w(
1405
- (g) => /* @__PURE__ */ p(
1412
+ ), h = w(
1413
+ (g) => /* @__PURE__ */ f(
1406
1414
  "li",
1407
1415
  {
1408
- className: `drawer-list-item-child ${m(g.path, !0) ? "active" : ""} animated`,
1409
- children: g.path ? /* @__PURE__ */ p(
1416
+ className: `drawer-list-item-child ${p(g.path, !0) ? "active" : ""} animated`,
1417
+ children: g.path ? /* @__PURE__ */ f(
1410
1418
  l,
1411
1419
  {
1412
1420
  tabIndex: t ? 0 : -1,
@@ -1421,14 +1429,14 @@ function Ps(n) {
1421
1429
  },
1422
1430
  g.id
1423
1431
  ),
1424
- [l, t, e, m]
1425
- ), y = H(() => d.map((g, b) => {
1426
- const k = g.page ?? String(b), E = `drawer-list-item ${m(g.path) ? "active" : ""} animated`;
1432
+ [l, t, e, p]
1433
+ ), y = V(() => d.map((g, b) => {
1434
+ const S = g.page ?? String(b), E = `drawer-list-item ${p(g.path) ? "active" : ""} animated`;
1427
1435
  if (g.type === "divider")
1428
- return /* @__PURE__ */ p("li", { className: E, children: /* @__PURE__ */ p("hr", { className: "drawer-divider" }) }, k);
1429
- const N = g.children ?? (g.page && c ? c[g.page] : null);
1430
- return /* @__PURE__ */ S("li", { className: E, children: [
1431
- /* @__PURE__ */ S(
1436
+ return /* @__PURE__ */ f("li", { className: E, children: /* @__PURE__ */ f("hr", { className: "drawer-divider" }) }, S);
1437
+ const x = g.children ?? (g.page && c ? c[g.page] : null);
1438
+ return /* @__PURE__ */ k("li", { className: E, children: [
1439
+ /* @__PURE__ */ k(
1432
1440
  l,
1433
1441
  {
1434
1442
  tabIndex: t ? 0 : -1,
@@ -1443,29 +1451,29 @@ function Ps(n) {
1443
1451
  ]
1444
1452
  }
1445
1453
  ),
1446
- N && /* @__PURE__ */ p("ul", { className: "drawer-children-list", children: N.map(f) })
1447
- ] }, k);
1448
- }), [l, c, m, t, d, f, e]);
1449
- return /* @__PURE__ */ p(
1454
+ x && /* @__PURE__ */ f("ul", { className: "drawer-children-list", children: x.map(h) })
1455
+ ] }, S);
1456
+ }), [l, c, p, t, d, h, e]);
1457
+ return /* @__PURE__ */ f(
1450
1458
  "div",
1451
1459
  {
1452
1460
  "aria-label": e("_accessibility:ariaLabels.closeMenu"),
1453
1461
  "aria-disabled": !t,
1454
1462
  className: `${t ? "opened" : "closed"} drawer-backdrop`,
1455
1463
  onClick: () => s(),
1456
- children: /* @__PURE__ */ S("aside", { className: `${t ? "opened" : "closed"} drawer animated`, children: [
1457
- /* @__PURE__ */ S("div", { className: "drawer-header-container", children: [
1464
+ children: /* @__PURE__ */ k("aside", { className: `${t ? "opened" : "closed"} drawer animated`, children: [
1465
+ /* @__PURE__ */ k("div", { className: "drawer-header-container", children: [
1458
1466
  i,
1459
- /* @__PURE__ */ p("h2", { className: "drawer-header poppins", children: e("_pages:home.appName") })
1467
+ /* @__PURE__ */ f("h2", { className: "drawer-header poppins", children: e("_pages:home.appName") })
1460
1468
  ] }),
1461
- /* @__PURE__ */ p("ul", { className: "drawer-menu-list", children: y })
1469
+ /* @__PURE__ */ f("ul", { className: "drawer-menu-list", children: y })
1462
1470
  ] })
1463
1471
  }
1464
1472
  );
1465
1473
  }
1466
- const G = ({ icon: n, ...e }) => /* @__PURE__ */ p(ct, { icon: /* @__PURE__ */ p(P, { icon: n }), ...e });
1474
+ const G = ({ icon: n, ...e }) => /* @__PURE__ */ f(ct, { icon: /* @__PURE__ */ f(K, { icon: n }), ...e });
1467
1475
  var we, $e;
1468
- function Ht() {
1476
+ function Qt() {
1469
1477
  if ($e) return we;
1470
1478
  $e = 1;
1471
1479
  const n = (c, a = "local", u = void 0) => {
@@ -1478,8 +1486,8 @@ function Ht() {
1478
1486
  }, e = (c) => {
1479
1487
  const a = {};
1480
1488
  return c.substring(1).split("&").forEach((l) => {
1481
- const [d, h] = l.split("=");
1482
- a[d] = h;
1489
+ const [d, m] = l.split("=");
1490
+ a[d] = m;
1483
1491
  }), a;
1484
1492
  }, t = (c = "") => {
1485
1493
  if (i(c) && c.length) return i(c);
@@ -1494,18 +1502,18 @@ function Ht() {
1494
1502
  left: a,
1495
1503
  behavior: l
1496
1504
  }), r = (c, a, u, l = "/", d = "Lax") => {
1497
- var h = /* @__PURE__ */ new Date();
1498
- h.setTime(h.getTime() + a * 24 * 60 * 60 * 1e3);
1499
- const m = "; expires=" + h.toUTCString();
1500
- document.cookie = `${c}=${u || ""}${m};path=${l};SameSite=${d}`;
1505
+ var m = /* @__PURE__ */ new Date();
1506
+ m.setTime(m.getTime() + a * 24 * 60 * 60 * 1e3);
1507
+ const p = "; expires=" + m.toUTCString();
1508
+ document.cookie = `${c}=${u || ""}${p};path=${l};SameSite=${d}`;
1501
1509
  }, i = (c) => {
1502
1510
  const a = `${c}=`, l = decodeURIComponent(document.cookie).split(";");
1503
1511
  for (let d = 0; d < l.length; d += 1) {
1504
- let h = l[d];
1505
- for (; h.charAt(0) === " "; )
1506
- h = h.substring(1);
1507
- if (h.indexOf(a) === 0)
1508
- return h.substring(a.length, h.length);
1512
+ let m = l[d];
1513
+ for (; m.charAt(0) === " "; )
1514
+ m = m.substring(1);
1515
+ if (m.indexOf(a) === 0)
1516
+ return m.substring(a.length, m.length);
1509
1517
  }
1510
1518
  return "";
1511
1519
  };
@@ -1519,13 +1527,13 @@ function Ht() {
1519
1527
  validation: n
1520
1528
  }, we;
1521
1529
  }
1522
- var Vt = Ht();
1530
+ var Vt = Qt();
1523
1531
  function Ks() {
1524
1532
  const { t: n, language: e } = T();
1525
1533
  return { timeAge: w(
1526
1534
  (s) => {
1527
- const i = /* @__PURE__ */ new Date() - s, o = Math.floor(i / (1e3 * 60)), c = Math.floor(o / 60), a = e === "es", u = n("_accessibility:labels.ago"), l = n("_accessibility:labels.minute"), d = n("_accessibility:labels.minutes"), h = n("_accessibility:labels.hour"), m = n("_accessibility:labels.hours"), f = n("_accessibility:labels.yesterday"), y = n("_accessibility:labels.justNow");
1528
- return i < 1e3 * 60 ? y : o < 60 ? `${a ? u : ""} ${o} ${o === 1 ? l : d} ${a ? "" : u}` : c < 24 ? `${a ? u : ""} ${c} ${c === 1 ? h : m} ${a ? "" : u}` : c < 48 ? f : s.toLocaleDateString(navigator.language || "es-ES", {
1535
+ const i = /* @__PURE__ */ new Date() - s, o = Math.floor(i / (1e3 * 60)), c = Math.floor(o / 60), a = e === "es", u = n("_accessibility:labels.ago"), l = n("_accessibility:labels.minute"), d = n("_accessibility:labels.minutes"), m = n("_accessibility:labels.hour"), p = n("_accessibility:labels.hours"), h = n("_accessibility:labels.yesterday"), y = n("_accessibility:labels.justNow");
1536
+ return i < 1e3 * 60 ? y : o < 60 ? `${a ? u : ""} ${o} ${o === 1 ? l : d} ${a ? "" : u}` : c < 24 ? `${a ? u : ""} ${c} ${c === 1 ? m : p} ${a ? "" : u}` : c < 48 ? h : s.toLocaleDateString(navigator.language || "es-ES", {
1529
1537
  day: "2-digit",
1530
1538
  month: "2-digit",
1531
1539
  year: "numeric"
@@ -1535,24 +1543,24 @@ function Ks() {
1535
1543
  ) };
1536
1544
  }
1537
1545
  const Be = (n) => {
1538
- const { showSuccessNotification: e } = ee(), { mutationFn: t, onError: s, onSuccess: r, onSuccessMessage: i } = n, [o, c] = _([]), { open: a, handleClose: u, handleOpen: l } = We(), d = () => {
1546
+ const { showSuccessNotification: e } = ee(), { mutationFn: t, onError: s, onSuccess: r, onSuccessMessage: i } = n, [o, c] = L([]), { open: a, handleClose: u, handleOpen: l } = We(), d = () => {
1539
1547
  u(), c([]);
1540
- }, h = async (f) => {
1541
- c(f), l();
1542
- }, m = Z({
1548
+ }, m = async (h) => {
1549
+ c(h), l();
1550
+ }, p = Z({
1543
1551
  mutationFn: () => t(
1544
1552
  Array.isArray(o) ? o : [o]
1545
1553
  ),
1546
- onError: (f) => {
1547
- console.error(f), s && s(f), d();
1554
+ onError: (h) => {
1555
+ console.error(h), s && s(h), d();
1548
1556
  },
1549
- onSuccess: async (f) => {
1550
- r && r(f), e({
1557
+ onSuccess: async (h) => {
1558
+ r && r(h), e({
1551
1559
  message: i
1552
1560
  }), d();
1553
1561
  }
1554
1562
  });
1555
- return { open: a, onClick: h, close: d, dialogFn: m, isLoading: m.isPending };
1563
+ return { open: a, onClick: m, close: d, dialogFn: p, isLoading: p.isPending };
1556
1564
  }, qs = (n) => {
1557
1565
  const { t: e } = T(), {
1558
1566
  showStackNotifications: t,
@@ -1565,76 +1573,76 @@ const Be = (n) => {
1565
1573
  onError: u,
1566
1574
  onSuccess: l,
1567
1575
  queryKey: d,
1568
- onSuccessMessage: h
1569
- } = n, { control: m, handleSubmit: f, reset: y, setError: g, getValues: b, setValue: k } = Me({
1576
+ onSuccessMessage: m
1577
+ } = n, { control: p, handleSubmit: h, reset: y, setError: g, getValues: b, setValue: S } = Me({
1570
1578
  defaultValues: o
1571
- }), E = K(null), N = w(() => {
1579
+ }), E = M(null), x = w(() => {
1572
1580
  const v = document.activeElement;
1573
1581
  if (!(v instanceof HTMLElement)) {
1574
1582
  E.current = null;
1575
1583
  return;
1576
1584
  }
1577
1585
  E.current = v.closest("form");
1578
- }, []), $ = w(
1586
+ }, []), N = w(
1579
1587
  (v) => {
1580
- const A = v == null ? void 0 : v.errors, x = [], q = E.current;
1581
- if (!q) return x;
1582
- let V = !1;
1583
- return A && A.forEach(([le, ge]) => {
1584
- const B = q.querySelector(`[name="${le}"]`);
1585
- (B instanceof HTMLInputElement || B instanceof HTMLTextAreaElement || B instanceof HTMLSelectElement) && (V || (B.focus(), V = !0), B.classList.add("error"), x.push(e(`_entities:${d}.${le}.${ge}`)));
1586
- }), x;
1588
+ const $ = v == null ? void 0 : v.errors, _ = [], R = E.current;
1589
+ if (!R) return _;
1590
+ let j = !1;
1591
+ return $ && $.forEach(([le, ge]) => {
1592
+ const B = R.querySelector(`[name="${le}"]`);
1593
+ (B instanceof HTMLInputElement || B instanceof HTMLTextAreaElement || B instanceof HTMLSelectElement) && (j || (B.focus(), j = !0), B.classList.add("error"), _.push(e(`_entities:${d}.${le}.${ge}`)));
1594
+ }), _;
1587
1595
  },
1588
1596
  [e, d]
1589
- ), j = w(() => {
1597
+ ), U = w(() => {
1590
1598
  const v = E.current;
1591
1599
  if (!v) return;
1592
- v.querySelectorAll("input, textarea, select").forEach((x) => {
1593
- x.classList.remove("error");
1600
+ v.querySelectorAll("input, textarea, select").forEach((_) => {
1601
+ _.classList.remove("error");
1594
1602
  });
1595
- }, []), I = Z(
1603
+ }, []), H = Z(
1596
1604
  {
1597
1605
  mutationFn: c,
1598
1606
  onError: (v) => {
1599
1607
  console.error(v);
1600
- const A = v;
1608
+ const $ = v;
1601
1609
  if (u) u(v);
1602
- else if (he(A)) {
1603
- const x = $(A);
1610
+ else if (he($)) {
1611
+ const _ = N($);
1604
1612
  t(
1605
- x.map(
1606
- (q) => ({
1607
- message: q,
1608
- type: R.error
1613
+ _.map(
1614
+ (R) => ({
1615
+ message: R,
1616
+ type: I.error
1609
1617
  })
1610
1618
  )
1611
1619
  );
1612
- } else if (fe(A)) {
1613
- const x = A.message || e("_accessibility:errors.500"), q = e(`_accessibility:errors.${A.status}`);
1614
- r({ message: q || x });
1620
+ } else if (fe($)) {
1621
+ const _ = $.message || e("_accessibility:errors.500"), R = e(`_accessibility:errors.${$.status}`);
1622
+ r({ message: R || _ });
1615
1623
  } else
1616
1624
  r({ message: e("_accessibility:errors.500") });
1617
1625
  },
1618
1626
  onSuccess: async (v) => {
1619
- await i.invalidateQueries({ queryKey: d }), l && l(v), h && s({
1620
- message: h
1627
+ await i.invalidateQueries({ queryKey: d }), l && l(v), m && s({
1628
+ message: m
1621
1629
  });
1622
1630
  }
1623
1631
  }
1624
1632
  );
1625
1633
  return {
1626
- control: m,
1634
+ control: p,
1627
1635
  getValues: b,
1628
- setValue: k,
1629
- handleSubmit: f,
1636
+ setValue: S,
1637
+ handleSubmit: h,
1630
1638
  onSubmit: (v) => {
1631
- N(), j(), I.mutate(
1639
+ x(), U(), H.mutate(
1632
1640
  a ? a(v) : v
1633
1641
  );
1634
1642
  },
1635
1643
  reset: y,
1636
1644
  setError: g,
1637
- isLoading: I.isPending
1645
+ isLoading: H.isPending
1638
1646
  };
1639
1647
  }, Bt = (n) => {
1640
1648
  const { t: e } = T(), {
@@ -1657,8 +1665,8 @@ const Be = (n) => {
1657
1665
  onClick: () => t([d == null ? void 0 : d.id]),
1658
1666
  hidden: !!d.deletedAt || i,
1659
1667
  disabled: !!d.deletedAt || c,
1660
- icon: /* @__PURE__ */ p(P, { className: "text-bg-error", icon: s }),
1661
- onMultipleClick: (h) => t(h.map((m) => m.id))
1668
+ icon: /* @__PURE__ */ f(K, { className: "text-bg-error", icon: s }),
1669
+ onMultipleClick: (m) => t(m.map((p) => p.id))
1662
1670
  }),
1663
1671
  [c, i, s, a, o, t, r, u]
1664
1672
  )
@@ -1684,8 +1692,8 @@ const Be = (n) => {
1684
1692
  onClick: () => t([d == null ? void 0 : d.id]),
1685
1693
  hidden: !d.deletedAt || r,
1686
1694
  disabled: !d.deletedAt || i,
1687
- icon: /* @__PURE__ */ p(P, { className: "text-bg-error", icon: c }),
1688
- onMultipleClick: (h) => t(h.map((m) => m.id))
1695
+ icon: /* @__PURE__ */ f(K, { className: "text-bg-error", icon: c }),
1696
+ onMultipleClick: (m) => t(m.map((p) => p.id))
1689
1697
  }),
1690
1698
  [i, r, c, a, o, t, s, u]
1691
1699
  )
@@ -1709,7 +1717,7 @@ const Be = (n) => {
1709
1717
  onClick: () => t(l == null ? void 0 : l.id),
1710
1718
  hidden: !!l.deletedAt || s,
1711
1719
  disabled: !!l.deletedAt || i,
1712
- icon: /* @__PURE__ */ p(P, { className: "primary", icon: c })
1720
+ icon: /* @__PURE__ */ f(K, { className: "primary", icon: c })
1713
1721
  }),
1714
1722
  [i, s, c, o, t, r, a]
1715
1723
  )
@@ -1729,8 +1737,8 @@ const Gt = (n) => {
1729
1737
  id: z.Export,
1730
1738
  hidden: s,
1731
1739
  disabled: r,
1732
- icon: /* @__PURE__ */ p(
1733
- P,
1740
+ icon: /* @__PURE__ */ f(
1741
+ K,
1734
1742
  {
1735
1743
  className: `${i ? "rotate" : ""}`,
1736
1744
  icon: i ? Ie : wt
@@ -1755,8 +1763,8 @@ const Gt = (n) => {
1755
1763
  id: z.Import,
1756
1764
  hidden: s,
1757
1765
  disabled: r,
1758
- icon: /* @__PURE__ */ p(
1759
- P,
1766
+ icon: /* @__PURE__ */ f(
1767
+ K,
1760
1768
  {
1761
1769
  className: `${i ? "rotate" : ""}`,
1762
1770
  icon: i ? Ie : St
@@ -1771,32 +1779,32 @@ const Gt = (n) => {
1771
1779
  }, js = (n) => {
1772
1780
  const { queryKey: e, onSuccess: t, ...s } = n, r = J(), { showStackNotifications: i } = ee(), { t: o } = T(), { open: c, onClick: a, close: u, dialogFn: l, isLoading: d } = Be({
1773
1781
  onSuccessMessage: o("_pages:common.actions.delete.successMessage"),
1774
- onError: (m) => {
1775
- const f = m;
1776
- if (he(f))
1782
+ onError: (p) => {
1783
+ const h = p;
1784
+ if (he(h))
1777
1785
  i(
1778
- f.errors.map(
1786
+ h.errors.map(
1779
1787
  ([y, g]) => ({
1780
1788
  message: o(`_pages:${y}.errors.${g}`),
1781
- type: R.error
1789
+ type: I.error
1782
1790
  })
1783
1791
  )
1784
1792
  );
1785
- else if (fe(f)) {
1786
- const y = f.message || o("_accessibility:errors.500"), g = o(`_accessibility:errors.${f.status}`);
1793
+ else if (fe(h)) {
1794
+ const y = h.message || o("_accessibility:errors.500"), g = o(`_accessibility:errors.${h.status}`);
1787
1795
  i([
1788
1796
  {
1789
1797
  message: g || y,
1790
- type: R.error
1798
+ type: I.error
1791
1799
  }
1792
1800
  ]);
1793
1801
  }
1794
1802
  },
1795
- onSuccess: async (m) => {
1796
- await r.invalidateQueries({ queryKey: e }), t && t(m);
1803
+ onSuccess: async (p) => {
1804
+ await r.invalidateQueries({ queryKey: e }), t && t(p);
1797
1805
  },
1798
1806
  ...s
1799
- }), { action: h } = Bt({ onClick: a });
1807
+ }), { action: m } = Bt({ onClick: a });
1800
1808
  return {
1801
1809
  onClick: a,
1802
1810
  title: o("_pages:common.actions.delete.dialog.title"),
@@ -1804,60 +1812,60 @@ const Gt = (n) => {
1804
1812
  isLoading: d,
1805
1813
  handleSubmit: () => l.mutate(),
1806
1814
  handleClose: u,
1807
- action: h
1815
+ action: m
1808
1816
  };
1809
1817
  }, We = () => {
1810
- const [n, e] = _(!1);
1818
+ const [n, e] = L(!1);
1811
1819
  return { open: n, setOpen: e, handleClose: () => e(!1), handleOpen: () => e(!0) };
1812
1820
  }, Jt = (n) => "mutationFn" in n && "queryKey" in n, pe = (n) => {
1813
1821
  const e = Jt(n), t = e ? n : void 0, s = e ? void 0 : n, r = e ? "entity" : (s == null ? void 0 : s.mode) ?? "state", { t: i } = T(), o = J(), {
1814
1822
  showErrorNotification: c,
1815
1823
  showStackNotifications: a,
1816
1824
  showSuccessNotification: u
1817
- } = ee(), [l, d] = _(), [h, m] = _(!1), f = K(!1), y = K(), { open: g, handleClose: b, handleOpen: k } = We(), { control: E, handleSubmit: N, reset: $, setError: j, getValues: I, setValue: v } = Me({
1825
+ } = ee(), [l, d] = L(), [m, p] = L(!1), h = M(!1), y = M(), { open: g, handleClose: b, handleOpen: S } = We(), { control: E, handleSubmit: x, reset: N, setError: U, getValues: H, setValue: v } = Me({
1818
1826
  defaultValues: (t == null ? void 0 : t.defaultValues) || (s == null ? void 0 : s.defaultValues) || {}
1819
- }), A = K(null), x = w(() => {
1827
+ }), $ = M(null), _ = w(() => {
1820
1828
  const C = document.activeElement;
1821
1829
  if (!(C instanceof HTMLElement)) {
1822
- A.current = null;
1830
+ $.current = null;
1823
1831
  return;
1824
1832
  }
1825
- A.current = C.closest("form");
1826
- }, []), q = t ? [...t.queryKey, l ?? 0] : ["__legacy-form-dialog-disabled__", l ?? 0], { data: V, isLoading: le } = Oe({
1833
+ $.current = C.closest("form");
1834
+ }, []), R = t ? [...t.queryKey, l ?? 0] : ["__legacy-form-dialog-disabled__", l ?? 0], { data: j, isLoading: le } = Oe({
1827
1835
  queryFn: async () => {
1828
1836
  if (!(!(t != null && t.getFunction) || !l))
1829
1837
  return t.getFunction(l);
1830
1838
  },
1831
- queryKey: q,
1839
+ queryKey: R,
1832
1840
  enabled: !!(t != null && t.getFunction) && !!l
1833
1841
  });
1834
1842
  O(() => {
1835
- !t || !V || !t.dtoToForm || y.current !== V && ($({ ...t.dtoToForm(V) }), y.current = V);
1836
- }, [V, t, $]), O(() => {
1843
+ !t || !j || !t.dtoToForm || y.current !== j && (N({ ...t.dtoToForm(j) }), y.current = j);
1844
+ }, [j, t, N]), O(() => {
1837
1845
  if (s) {
1838
1846
  if (!g) {
1839
- f.current = !1;
1847
+ h.current = !1;
1840
1848
  return;
1841
1849
  }
1842
- if (!f.current) {
1843
- if (f.current = !0, s.reinitializeOnOpen && s.mapIn) {
1844
- $(s.mapIn());
1850
+ if (!h.current) {
1851
+ if (h.current = !0, s.reinitializeOnOpen && s.mapIn) {
1852
+ N(s.mapIn());
1845
1853
  return;
1846
1854
  }
1847
1855
  if (s.reinitializeOnOpen && s.defaultValues) {
1848
- $(s.defaultValues);
1856
+ N(s.defaultValues);
1849
1857
  return;
1850
1858
  }
1851
- s.resetOnOpen && $(s.defaultValues || {});
1859
+ s.resetOnOpen && N(s.defaultValues || {});
1852
1860
  }
1853
1861
  }
1854
- }, [s, g, $]);
1862
+ }, [s, g, N]);
1855
1863
  const ge = w(
1856
1864
  (C) => {
1857
- const M = C == null ? void 0 : C.errors, Q = [], te = A.current;
1865
+ const D = C == null ? void 0 : C.errors, Q = [], te = $.current;
1858
1866
  if (!te || !t) return Q;
1859
1867
  let Ce = !1;
1860
- return M && M.forEach(([Te, Ze]) => {
1868
+ return D && D.forEach(([Te, Ze]) => {
1861
1869
  const oe = te.querySelector(`[name="${Te}"]`);
1862
1870
  (oe instanceof HTMLInputElement || oe instanceof HTMLTextAreaElement || oe instanceof HTMLSelectElement) && (Ce || (oe.focus(), Ce = !0), oe.classList.add("error"), Q.push(
1863
1871
  i(`_entities:${t.queryKey}.${Te}.${Ze}`)
@@ -1866,18 +1874,18 @@ const Gt = (n) => {
1866
1874
  },
1867
1875
  [t, i]
1868
1876
  ), B = w(() => {
1869
- const C = A.current;
1877
+ const C = $.current;
1870
1878
  if (!C) return;
1871
1879
  C.querySelectorAll("input, textarea, select").forEach((Q) => {
1872
1880
  Q.classList.remove("error");
1873
1881
  });
1874
1882
  }, []), Y = w(() => {
1875
- B(), A.current = null, b(), $();
1876
- }, [b, B, $]), ze = w(
1883
+ B(), $.current = null, b(), N();
1884
+ }, [b, B, N]), ze = w(
1877
1885
  (C) => {
1878
- d(C), k();
1886
+ d(C), S();
1879
1887
  },
1880
- [k]
1888
+ [S]
1881
1889
  ), ye = Z({
1882
1890
  mutationFn: async (C) => {
1883
1891
  if (t)
@@ -1887,19 +1895,19 @@ const Gt = (n) => {
1887
1895
  if (t)
1888
1896
  if (t.onError) t.onError(C);
1889
1897
  else {
1890
- const M = C;
1891
- if (he(M)) {
1892
- const Q = ge(M);
1898
+ const D = C;
1899
+ if (he(D)) {
1900
+ const Q = ge(D);
1893
1901
  a(
1894
1902
  Q.map(
1895
1903
  (te) => ({
1896
1904
  message: te,
1897
- type: R.error
1905
+ type: I.error
1898
1906
  })
1899
1907
  )
1900
1908
  );
1901
- } else if (fe(M)) {
1902
- const Q = M.message || i("_accessibility:errors.500"), te = i(`_accessibility:errors.${M.status}`);
1909
+ } else if (fe(D)) {
1910
+ const Q = D.message || i("_accessibility:errors.500"), te = i(`_accessibility:errors.${D.status}`);
1903
1911
  c({ message: te || Q });
1904
1912
  } else
1905
1913
  c({ message: i("_accessibility:errors.500") });
@@ -1915,51 +1923,51 @@ const Gt = (n) => {
1915
1923
  [s, l, t]
1916
1924
  ), Je = w(async () => {
1917
1925
  if (!(s != null && s.onApply)) return;
1918
- const C = I(), M = ue(C);
1919
- m(!0);
1926
+ const C = H(), D = ue(C);
1927
+ p(!0);
1920
1928
  try {
1921
- await s.onApply(M, {
1929
+ await s.onApply(D, {
1922
1930
  close: Y,
1923
1931
  id: l,
1924
1932
  values: C
1925
1933
  });
1926
1934
  } finally {
1927
- m(!1);
1935
+ p(!1);
1928
1936
  }
1929
- }, [Y, s, I, l, ue]), Ye = w(async () => {
1937
+ }, [Y, s, H, l, ue]), Ye = w(async () => {
1930
1938
  if (s) {
1931
1939
  if (s.onClear) {
1932
- m(!0);
1940
+ p(!0);
1933
1941
  try {
1934
1942
  await s.onClear();
1935
1943
  } finally {
1936
- m(!1);
1944
+ p(!1);
1937
1945
  }
1938
1946
  }
1939
- $(s.defaultValues || {});
1947
+ N(s.defaultValues || {});
1940
1948
  }
1941
- }, [s, $]), Xe = w(
1949
+ }, [s, N]), Xe = w(
1942
1950
  async (C) => {
1943
1951
  if (t) {
1944
- x(), ye.mutate(
1952
+ _(), ye.mutate(
1945
1953
  t.formToDto ? t.formToDto(C) : C
1946
1954
  );
1947
1955
  return;
1948
1956
  }
1949
- const M = ue(C);
1950
- m(!0);
1957
+ const D = ue(C);
1958
+ p(!0);
1951
1959
  try {
1952
- s != null && s.onSubmit && await s.onSubmit(M, {
1960
+ s != null && s.onSubmit && await s.onSubmit(D, {
1953
1961
  close: Y,
1954
1962
  id: l,
1955
1963
  values: C
1956
1964
  }), ((s == null ? void 0 : s.closeOnSubmit) ?? !0) && Y();
1957
1965
  } finally {
1958
- m(!1);
1966
+ p(!1);
1959
1967
  }
1960
1968
  },
1961
1969
  [
1962
- x,
1970
+ _,
1963
1971
  Y,
1964
1972
  s,
1965
1973
  l,
@@ -1975,19 +1983,19 @@ const Gt = (n) => {
1975
1983
  openDialog: ze,
1976
1984
  handleClose: Y,
1977
1985
  control: E,
1978
- getValues: I,
1986
+ getValues: H,
1979
1987
  setValue: v,
1980
- handleSubmit: N,
1988
+ handleSubmit: x,
1981
1989
  onSubmit: Xe,
1982
- reset: $,
1983
- setError: j,
1990
+ reset: N,
1991
+ setError: U,
1984
1992
  title: n.title,
1985
- isSubmitting: h,
1993
+ isSubmitting: m,
1986
1994
  onApply: Je,
1987
1995
  onClear: Ye,
1988
- isLoading: le || ye.isPending || h
1996
+ isLoading: le || ye.isPending || m
1989
1997
  };
1990
- }, Qs = pe, Hs = (n) => pe(n), Vs = (n) => {
1998
+ }, Hs = pe, Qs = (n) => pe(n), Vs = (n) => {
1991
1999
  const e = J(), { mutationFn: t, queryKey: s, onSuccess: r, onError: i, mapOut: o, ...c } = n, a = Z({
1992
2000
  mutationFn: t
1993
2001
  });
@@ -2005,77 +2013,81 @@ const Gt = (n) => {
2005
2013
  }
2006
2014
  });
2007
2015
  }, Bs = (n) => {
2008
- const e = J(), t = K(), {
2009
- mutationFn: s,
2010
- queryKey: r,
2011
- onSuccess: i,
2012
- onError: o,
2013
- mapOut: c,
2014
- getFunction: a,
2015
- dtoToForm: u,
2016
- title: l,
2017
- ...d
2018
- } = n, h = Z({
2019
- mutationFn: s
2020
- }), m = pe({
2021
- ...d,
2016
+ const e = J(), t = M(), s = M(), {
2017
+ mutationFn: r,
2018
+ queryKey: i,
2019
+ onSuccess: o,
2020
+ onError: c,
2021
+ mapOut: a,
2022
+ getFunction: u,
2023
+ dtoToForm: l,
2024
+ title: d,
2025
+ ...m
2026
+ } = n, p = M(l);
2027
+ O(() => {
2028
+ p.current = l;
2029
+ }, [l]);
2030
+ const h = Z({
2031
+ mutationFn: r
2032
+ }), y = pe({
2033
+ ...m,
2022
2034
  mode: "entity",
2023
- title: l,
2024
- onSubmit: async (b) => {
2035
+ title: d,
2036
+ onSubmit: async (E) => {
2025
2037
  try {
2026
- const k = await h.mutateAsync(b);
2027
- r && await e.invalidateQueries({ queryKey: r }), i && await i(k);
2028
- } catch (k) {
2029
- throw o && o(k), k;
2038
+ const x = await h.mutateAsync(E);
2039
+ i && await e.invalidateQueries({ queryKey: i }), o && await o(x);
2040
+ } catch (x) {
2041
+ throw c && c(x), x;
2030
2042
  }
2031
2043
  },
2032
- mapOut: (b) => c ? c(b, t.current) : b
2033
- }), { reset: f } = m, g = Oe({
2034
- queryFn: () => a(m.id),
2035
- queryKey: [...r || ["put-dialog", l], m.id],
2036
- enabled: m.open && !!m.id
2044
+ mapOut: (E) => a ? a(E, t.current) : E
2045
+ }), { reset: g } = y, S = Oe({
2046
+ queryFn: () => u(y.id),
2047
+ queryKey: [...i || ["put-dialog", d], y.id],
2048
+ enabled: y.open && !!y.id
2037
2049
  });
2038
2050
  return O(() => {
2039
- if (g.data) {
2040
- if (t.current = g.data, u && f) {
2041
- f(u(g.data));
2051
+ if (S.data && s.current !== S.data) {
2052
+ if (t.current = S.data, s.current = S.data, p.current && g) {
2053
+ g(p.current(S.data));
2042
2054
  return;
2043
2055
  }
2044
- f == null || f(g.data);
2056
+ g == null || g(S.data);
2045
2057
  }
2046
- }, [u, g.data, f]), {
2047
- ...m,
2048
- isLoading: m.isLoading || h.isPending || g.isFetching || g.isLoading
2058
+ }, [S.data, g]), {
2059
+ ...y,
2060
+ isLoading: y.isLoading || h.isPending || S.isFetching || S.isLoading
2049
2061
  };
2050
2062
  }, Ws = (n) => {
2051
2063
  const { queryKey: e, onSuccess: t, ...s } = n, r = J(), { showStackNotifications: i } = ee(), { t: o } = T(), { open: c, onClick: a, close: u, dialogFn: l, isLoading: d } = Be({
2052
2064
  onSuccessMessage: o("_pages:common.actions.restore.successMessage"),
2053
- onError: (m) => {
2054
- const f = m;
2055
- if (he(f))
2065
+ onError: (p) => {
2066
+ const h = p;
2067
+ if (he(h))
2056
2068
  i(
2057
- f.errors.map(
2069
+ h.errors.map(
2058
2070
  ([y, g]) => ({
2059
2071
  message: o(`_pages:${y}.errors.${g}`),
2060
- type: R.error
2072
+ type: I.error
2061
2073
  })
2062
2074
  )
2063
2075
  );
2064
- else if (fe(f)) {
2065
- const y = f.message || o("_accessibility:errors.500"), g = o(`_accessibility:errors.${f.status}`);
2076
+ else if (fe(h)) {
2077
+ const y = h.message || o("_accessibility:errors.500"), g = o(`_accessibility:errors.${h.status}`);
2066
2078
  i([
2067
2079
  {
2068
2080
  message: g || y,
2069
- type: R.error
2081
+ type: I.error
2070
2082
  }
2071
2083
  ]);
2072
2084
  }
2073
2085
  },
2074
- onSuccess: async (m) => {
2075
- await r.invalidateQueries({ queryKey: e }), t && t(m);
2086
+ onSuccess: async (p) => {
2087
+ await r.invalidateQueries({ queryKey: e }), t && t(p);
2076
2088
  },
2077
2089
  ...s
2078
- }), { action: h } = Wt({ onClick: a });
2090
+ }), { action: m } = Wt({ onClick: a });
2079
2091
  return {
2080
2092
  onClick: a,
2081
2093
  title: o("_pages:common.actions.restore.dialog.title"),
@@ -2083,7 +2095,7 @@ const Gt = (n) => {
2083
2095
  isLoading: d,
2084
2096
  handleSubmit: () => l.mutate(),
2085
2097
  handleClose: u,
2086
- action: h
2098
+ action: m
2087
2099
  };
2088
2100
  };
2089
2101
  function Gs(n) {
@@ -2094,7 +2106,7 @@ function Gs(n) {
2094
2106
  fileProcessor: o,
2095
2107
  renderCustomPreview: c,
2096
2108
  onError: a
2097
- } = n, [u, l] = _(!1), [d, h] = _(null), [m, f] = _(!1), y = Z({
2109
+ } = n, [u, l] = L(!1), [d, m] = L(null), [p, h] = L(!1), y = Z({
2098
2110
  mutationFn: r,
2099
2111
  onError: (b) => {
2100
2112
  console.error(b), a == null || a(b);
@@ -2111,23 +2123,23 @@ function Gs(n) {
2111
2123
  try {
2112
2124
  await y.mutateAsync({
2113
2125
  items: d,
2114
- override: m
2115
- }), l(!1), h(null), f(!1);
2126
+ override: p
2127
+ }), l(!1), m(null), h(!1);
2116
2128
  } catch (b) {
2117
2129
  console.error(b);
2118
2130
  }
2119
2131
  },
2120
2132
  isLoading: y.isPending,
2121
2133
  fileProcessor: o,
2122
- onFileProcessed: (b) => h(b),
2134
+ onFileProcessed: (b) => m(b),
2123
2135
  renderCustomPreview: c,
2124
- onOverrideChange: (b) => f(b),
2136
+ onOverrideChange: (b) => h(b),
2125
2137
  open: u,
2126
2138
  title: e("_pages:common.actions.import.dialog.title", {
2127
2139
  entity: e(`_pages:${i}.title`)
2128
2140
  }),
2129
2141
  handleClose: () => {
2130
- l(!1), h(null), f(!1);
2142
+ l(!1), m(null), h(!1);
2131
2143
  },
2132
2144
  action: g
2133
2145
  };
@@ -2145,8 +2157,8 @@ const zs = (n) => {
2145
2157
  console.error(d), i && i(d);
2146
2158
  },
2147
2159
  onSuccess: async (d) => {
2148
- const h = JSON.stringify(d, null, 2), m = new Blob([h], { type: "application/json" }), f = URL.createObjectURL(m), y = document.createElement("a");
2149
- y.href = f, y.download = `${s}.json`, y.click(), URL.revokeObjectURL(f), o && o(d), e({
2160
+ const m = JSON.stringify(d, null, 2), p = new Blob([m], { type: "application/json" }), h = URL.createObjectURL(p), y = document.createElement("a");
2161
+ y.href = h, y.download = `${s}.json`, y.click(), URL.revokeObjectURL(h), o && o(d), e({
2150
2162
  message: c
2151
2163
  });
2152
2164
  }
@@ -2161,7 +2173,7 @@ const zs = (n) => {
2161
2173
  };
2162
2174
  }, xe = () => typeof window < "u" ? window.scrollY : 0;
2163
2175
  function Yt(n) {
2164
- const [e, t] = _(xe), s = w(() => {
2176
+ const [e, t] = L(xe), s = w(() => {
2165
2177
  t(xe());
2166
2178
  }, []);
2167
2179
  return O(() => (window.addEventListener("scroll", s), () => {
@@ -2180,9 +2192,9 @@ const Js = (n) => {
2180
2192
  className: u = "",
2181
2193
  variant: l = "submit",
2182
2194
  color: d = "primary",
2183
- ...h
2184
- } = n, m = Yt(s);
2185
- return /* @__PURE__ */ p(
2195
+ ...m
2196
+ } = n, p = Yt(s);
2197
+ return /* @__PURE__ */ f(
2186
2198
  G,
2187
2199
  {
2188
2200
  variant: l,
@@ -2192,17 +2204,17 @@ const Js = (n) => {
2192
2204
  onClick: () => {
2193
2205
  a == null || a(), c && Vt.scrollTo(i, r);
2194
2206
  },
2195
- className: `to-top ${m ? "show" : "hide"} ${u}`.trim(),
2207
+ className: `to-top ${p ? "show" : "hide"} ${u}`.trim(),
2196
2208
  "data-tooltip-content": o,
2197
- ...h
2209
+ ...m
2198
2210
  }
2199
2211
  );
2200
2212
  };
2201
2213
  function Ys(n) {
2202
2214
  const { t: e } = T();
2203
2215
  if ("children" in n) {
2204
- const { children: N, className: $ } = n;
2205
- return /* @__PURE__ */ p("div", { className: `error-container${$ ? ` ${$}` : ""}`, children: N });
2216
+ const { children: x, className: N } = n;
2217
+ return /* @__PURE__ */ f("div", { className: `error-container${N ? ` ${N}` : ""}`, children: x });
2206
2218
  }
2207
2219
  const {
2208
2220
  error: s,
@@ -2214,50 +2226,50 @@ function Ys(n) {
2214
2226
  messageProps: u,
2215
2227
  className: l,
2216
2228
  resetErrorBoundary: d
2217
- } = n, h = o ?? d, {
2218
- className: m,
2219
- children: f,
2229
+ } = n, m = o ?? d, {
2230
+ className: p,
2231
+ children: h,
2220
2232
  onClick: y,
2221
2233
  ...g
2222
- } = a ?? {}, { className: b, ...k } = u ?? {}, E = i !== null;
2223
- return /* @__PURE__ */ S("div", { className: `error-container${l ? ` ${l}` : ""}`, children: [
2224
- E && /* @__PURE__ */ p(
2225
- P,
2234
+ } = a ?? {}, { className: b, ...S } = u ?? {}, E = i !== null;
2235
+ return /* @__PURE__ */ k("div", { className: `error-container${l ? ` ${l}` : ""}`, children: [
2236
+ E && /* @__PURE__ */ f(
2237
+ K,
2226
2238
  {
2227
2239
  ...i,
2228
2240
  icon: (i == null ? void 0 : i.icon) ?? Lt,
2229
2241
  className: `error-icon${i != null && i.className ? ` ${i.className}` : ""}`
2230
2242
  }
2231
2243
  ),
2232
- /* @__PURE__ */ p(
2244
+ /* @__PURE__ */ f(
2233
2245
  "p",
2234
2246
  {
2235
- ...k,
2247
+ ...S,
2236
2248
  className: `error-message${b ? ` ${b}` : ""}`,
2237
2249
  children: r ?? (s == null ? void 0 : s.message) ?? e("_accessibility:errors.unknownError")
2238
2250
  }
2239
2251
  ),
2240
- h && /* @__PURE__ */ p(
2241
- U,
2252
+ m && /* @__PURE__ */ f(
2253
+ q,
2242
2254
  {
2243
2255
  type: "button",
2244
2256
  variant: "submit",
2245
2257
  color: "primary",
2246
2258
  ...g,
2247
- className: `error-retry ${m ? ` ${m}` : ""}`,
2248
- onClick: (N) => {
2249
- y == null || y(N), N.defaultPrevented || h();
2259
+ className: `error-retry ${p ? ` ${p}` : ""}`,
2260
+ onClick: (x) => {
2261
+ y == null || y(x), x.defaultPrevented || m();
2250
2262
  },
2251
- children: f ?? c ?? e("_accessibility:actions.retry", { defaultValue: "Retry" })
2263
+ children: h ?? c ?? e("_accessibility:actions.retry", { defaultValue: "Retry" })
2252
2264
  }
2253
2265
  )
2254
2266
  ] });
2255
2267
  }
2256
2268
  const Xt = (n) => {
2257
2269
  const { showBackButton: e, title: t, actions: s } = n, { t: r } = T(), { navigate: i } = ce();
2258
- return /* @__PURE__ */ S("div", { className: "page-header", children: [
2259
- /* @__PURE__ */ S("div", { className: "page-header-left", children: [
2260
- e && /* @__PURE__ */ p(
2270
+ return /* @__PURE__ */ k("div", { className: "page-header", children: [
2271
+ /* @__PURE__ */ k("div", { className: "page-header-left", children: [
2272
+ e && /* @__PURE__ */ f(
2261
2273
  G,
2262
2274
  {
2263
2275
  icon: vt,
@@ -2268,17 +2280,17 @@ const Xt = (n) => {
2268
2280
  "data-tooltip-content": r("_accessibility:buttons.back")
2269
2281
  }
2270
2282
  ),
2271
- /* @__PURE__ */ p("h2", { className: "page-header-title", children: t })
2283
+ /* @__PURE__ */ f("h2", { className: "page-header-title", children: t })
2272
2284
  ] }),
2273
- /* @__PURE__ */ S("div", { children: [
2274
- /* @__PURE__ */ p(
2285
+ /* @__PURE__ */ k("div", { children: [
2286
+ /* @__PURE__ */ f(
2275
2287
  lt,
2276
2288
  {
2277
2289
  className: "page-header-actions-desktop",
2278
2290
  actions: s ?? []
2279
2291
  }
2280
2292
  ),
2281
- /* @__PURE__ */ p(
2293
+ /* @__PURE__ */ f(
2282
2294
  ut,
2283
2295
  {
2284
2296
  className: "page-header-actions-mobile",
@@ -2298,69 +2310,69 @@ const Xt = (n) => {
2298
2310
  isLoading: c = !1,
2299
2311
  isAnimated: a = !0,
2300
2312
  showBackButton: u = !1
2301
- } = n, { t: l } = T(), d = J(), { countOfFilters: h } = dt(), m = H(() => {
2302
- const f = Array.isArray(i) ? [...i] : [];
2313
+ } = n, { t: l } = T(), d = J(), { countOfFilters: m } = dt(), p = V(() => {
2314
+ const h = Array.isArray(i) ? [...i] : [];
2303
2315
  if (o) {
2304
2316
  const y = {
2305
2317
  id: z.Refresh,
2306
2318
  onClick: () => d.invalidateQueries({ queryKey: o }),
2307
- icon: /* @__PURE__ */ p(P, { icon: Re }),
2319
+ icon: /* @__PURE__ */ f(K, { icon: Re }),
2308
2320
  tooltip: l("_pages:common.actions.refresh.text")
2309
2321
  };
2310
- f.unshift(y);
2322
+ h.unshift(y);
2311
2323
  }
2312
2324
  if (s) {
2313
2325
  const y = {
2314
2326
  ...s,
2315
2327
  id: z.Add,
2316
- icon: /* @__PURE__ */ p(P, { icon: Ne })
2328
+ icon: /* @__PURE__ */ f(K, { icon: Ne })
2317
2329
  };
2318
- f.unshift(y);
2330
+ h.unshift(y);
2319
2331
  }
2320
2332
  if (r) {
2321
2333
  const y = {
2322
2334
  ...r,
2323
2335
  id: "filter",
2324
- icon: /* @__PURE__ */ p(P, { icon: Ct }),
2325
- children: /* @__PURE__ */ p(
2336
+ icon: /* @__PURE__ */ f(K, { icon: Ct }),
2337
+ children: /* @__PURE__ */ f(
2326
2338
  mt,
2327
2339
  {
2328
- className: `${h > 0 ? "show" : "hide"} `,
2329
- count: h
2340
+ className: `${m > 0 ? "show" : "hide"} `,
2341
+ count: m
2330
2342
  }
2331
2343
  )
2332
2344
  };
2333
- f.push(y);
2345
+ h.push(y);
2334
2346
  }
2335
- return f;
2347
+ return h;
2336
2348
  }, [
2337
2349
  i,
2338
2350
  s,
2339
- h,
2351
+ m,
2340
2352
  r,
2341
2353
  d,
2342
2354
  o,
2343
2355
  l
2344
2356
  ]);
2345
- return /* @__PURE__ */ S("main", { className: "page-main", children: [
2346
- /* @__PURE__ */ p(
2357
+ return /* @__PURE__ */ k("main", { className: "page-main", children: [
2358
+ /* @__PURE__ */ f(
2347
2359
  Xt,
2348
2360
  {
2349
2361
  showBackButton: u,
2350
- actions: m,
2362
+ actions: p,
2351
2363
  title: e
2352
2364
  }
2353
2365
  ),
2354
- /* @__PURE__ */ p("div", { className: `page-main-content ${a ? "appear" : ""}`, children: c ? /* @__PURE__ */ p(ne, { className: "page-loading" }) : t }),
2355
- s && /* @__PURE__ */ p(
2366
+ /* @__PURE__ */ f("div", { className: `page-main-content ${a ? "appear" : ""}`, children: c ? /* @__PURE__ */ f(ne, { className: "page-loading" }) : t }),
2367
+ s && /* @__PURE__ */ f(
2356
2368
  G,
2357
2369
  {
2358
2370
  icon: s.icon ?? Ne,
2359
2371
  color: s.color ?? "primary",
2360
2372
  variant: s.variant ?? "submit",
2361
2373
  onClick: () => {
2362
- var f;
2363
- return (f = s.onClick) == null ? void 0 : f.call(s);
2374
+ var h;
2375
+ return (h = s.onClick) == null ? void 0 : h.call(s);
2364
2376
  },
2365
2377
  className: `button page-fab ${s.className ?? ""}`
2366
2378
  }
@@ -2378,10 +2390,10 @@ const Xt = (n) => {
2378
2390
  hasMore: u = !1,
2379
2391
  loadingMore: l = !1,
2380
2392
  onLoadMore: d,
2381
- loadMoreComponent: h = null,
2382
- observerRootMargin: m = "0px 0px 200px 0px",
2383
- observerThreshold: f = 0
2384
- } = n, y = K(!1), g = K(null), b = w(async () => {
2393
+ loadMoreComponent: m = null,
2394
+ observerRootMargin: p = "0px 0px 200px 0px",
2395
+ observerThreshold: h = 0
2396
+ } = n, y = M(!1), g = M(null), b = w(async () => {
2385
2397
  if (!(!u || !d) && !(l || y.current)) {
2386
2398
  y.current = !0;
2387
2399
  try {
@@ -2393,26 +2405,26 @@ const Xt = (n) => {
2393
2405
  }, [u, l, d]);
2394
2406
  return O(() => {
2395
2407
  if (!u || !d || !g.current || typeof IntersectionObserver > "u") return;
2396
- const k = new IntersectionObserver(
2408
+ const S = new IntersectionObserver(
2397
2409
  (E) => {
2398
- E.some((N) => N.isIntersecting) && b();
2410
+ E.some((x) => x.isIntersecting) && b();
2399
2411
  },
2400
2412
  {
2401
- rootMargin: m,
2402
- threshold: f
2413
+ rootMargin: p,
2414
+ threshold: h
2403
2415
  }
2404
2416
  );
2405
- return k.observe(g.current), () => k.disconnect();
2417
+ return S.observe(g.current), () => S.disconnect();
2406
2418
  }, [
2407
2419
  u,
2408
2420
  d,
2409
- m,
2410
- f,
2421
+ p,
2422
+ h,
2411
2423
  b
2412
- ]), r ? /* @__PURE__ */ p(ne, {}) : /* @__PURE__ */ p(ae, { children: a != null && a.length ? /* @__PURE__ */ S("ul", { className: `pretty-grid-main ${t}`, children: [
2413
- a == null ? void 0 : a.map((k) => /* @__PURE__ */ p("li", { className: `pretty-grid-item ${s}`, children: c(k) }, k.id)),
2414
- u && d && /* @__PURE__ */ p("li", { className: "pretty-grid-load-more", ref: g, children: h })
2415
- ] }) : /* @__PURE__ */ p(ae, { children: i || /* @__PURE__ */ p(os, { message: o }) }) });
2424
+ ]), r ? /* @__PURE__ */ f(ne, {}) : /* @__PURE__ */ f(ae, { children: a != null && a.length ? /* @__PURE__ */ k("ul", { className: `pretty-grid-main ${t}`, children: [
2425
+ a == null ? void 0 : a.map((S) => /* @__PURE__ */ f("li", { className: `pretty-grid-item ${s}`, children: c(S) }, S.id)),
2426
+ u && d && /* @__PURE__ */ f("li", { className: "pretty-grid-load-more", ref: g, children: m })
2427
+ ] }) : /* @__PURE__ */ f(ae, { children: i || /* @__PURE__ */ f(os, { message: o }) }) });
2416
2428
  }, Ge = re({
2417
2429
  title: "",
2418
2430
  setTitle: () => {
@@ -2421,11 +2433,11 @@ const Xt = (n) => {
2421
2433
  setRightContent: () => {
2422
2434
  }
2423
2435
  }), en = (n) => {
2424
- const { children: e } = n, [t, s] = _(""), [r, i] = _(null), o = w((u) => {
2436
+ const { children: e } = n, [t, s] = L(""), [r, i] = L(null), o = w((u) => {
2425
2437
  s(u);
2426
2438
  }, []), c = w((u) => {
2427
2439
  i(u);
2428
- }, []), a = H(
2440
+ }, []), a = V(
2429
2441
  () => ({
2430
2442
  title: t,
2431
2443
  setTitle: o,
@@ -2434,40 +2446,40 @@ const Xt = (n) => {
2434
2446
  }),
2435
2447
  [t, o, r, c]
2436
2448
  );
2437
- return /* @__PURE__ */ p(Ge.Provider, { value: a, children: e });
2449
+ return /* @__PURE__ */ f(Ge.Provider, { value: a, children: e });
2438
2450
  }, Zt = () => ie(Ge);
2439
2451
  function tn(n) {
2440
- const { t: e } = T(), { openDrawer: t, showSearch: s = !0, menuButtonProps: r } = n, { searchComponent: i, location: o } = ce(), { title: c, rightContent: a } = Zt(), [u, l] = _(!1), d = w((f) => {
2441
- (qt() ? f.metaKey : f.ctrlKey) && f.shiftKey && f.key.toLowerCase() === "f" && (l(!0), f.preventDefault());
2452
+ const { t: e } = T(), { openDrawer: t, showSearch: s = !0, menuButtonProps: r } = n, { searchComponent: i, location: o } = ce(), { title: c, rightContent: a } = Zt(), [u, l] = L(!1), d = w((h) => {
2453
+ (qt() ? h.metaKey : h.ctrlKey) && h.shiftKey && h.key.toLowerCase() === "f" && (l(!0), h.preventDefault());
2442
2454
  }, []);
2443
2455
  O(() => (window.addEventListener("keydown", d), () => {
2444
2456
  window.removeEventListener("keydown", d);
2445
2457
  }), [d]);
2446
- const h = i, m = s && !!h;
2447
- return /* @__PURE__ */ S(ae, { children: [
2448
- o.pathname !== "/" && !!h && /* @__PURE__ */ p(h, { open: u, onClose: () => l(!1) }),
2449
- /* @__PURE__ */ S("header", { id: "header", className: "header", children: [
2450
- /* @__PURE__ */ S("div", { className: "navbar-left", children: [
2451
- /* @__PURE__ */ p(
2458
+ const m = i, p = s && !!m;
2459
+ return /* @__PURE__ */ k(ae, { children: [
2460
+ o.pathname !== "/" && !!m && /* @__PURE__ */ f(m, { open: u, onClose: () => l(!1) }),
2461
+ /* @__PURE__ */ k("header", { id: "header", className: "header", children: [
2462
+ /* @__PURE__ */ k("div", { className: "navbar-left", children: [
2463
+ /* @__PURE__ */ f(
2452
2464
  G,
2453
2465
  {
2454
2466
  ...r,
2455
2467
  type: (r == null ? void 0 : r.type) ?? "button",
2456
2468
  icon: (r == null ? void 0 : r.icon) ?? Tt,
2457
- onClick: (f) => {
2469
+ onClick: (h) => {
2458
2470
  var y;
2459
- (y = r == null ? void 0 : r.onClick) == null || y.call(r, f), t();
2471
+ (y = r == null ? void 0 : r.onClick) == null || y.call(r, h), t();
2460
2472
  },
2461
2473
  name: (r == null ? void 0 : r.name) ?? e("_accessibility:buttons.openMenu"),
2462
2474
  "aria-label": (r == null ? void 0 : r["aria-label"]) ?? e("_accessibility:ariaLabels.openMenu"),
2463
2475
  className: `navbar-menu animated ${(r == null ? void 0 : r.className) ?? ""}`
2464
2476
  }
2465
2477
  ),
2466
- /* @__PURE__ */ p("h1", { className: "poppins navbar-title", children: c || e("_pages:home.appName") })
2478
+ /* @__PURE__ */ f("h1", { className: "poppins navbar-title", children: c || e("_pages:home.appName") })
2467
2479
  ] }),
2468
- /* @__PURE__ */ S("div", { className: "navbar-right", children: [
2480
+ /* @__PURE__ */ k("div", { className: "navbar-right", children: [
2469
2481
  a,
2470
- m && /* @__PURE__ */ p(
2482
+ p && /* @__PURE__ */ f(
2471
2483
  G,
2472
2484
  {
2473
2485
  icon: Nt,
@@ -2479,42 +2491,42 @@ function tn(n) {
2479
2491
  ] })
2480
2492
  ] });
2481
2493
  }
2482
- const de = 300, es = (n) => n ?? R.error, ts = (n) => {
2494
+ const de = 300, es = (n) => n ?? I.error, ts = (n) => {
2483
2495
  switch (n) {
2484
- case R.error:
2496
+ case I.error:
2485
2497
  return $t;
2486
2498
  default:
2487
2499
  return Et;
2488
2500
  }
2489
2501
  }, Se = (n) => {
2490
2502
  switch (n) {
2491
- case R.success:
2503
+ case I.success:
2492
2504
  return "!text-success";
2493
- case R.error:
2505
+ case I.error:
2494
2506
  return "!text-error";
2495
- case R.warning:
2507
+ case I.warning:
2496
2508
  return "!text-warning";
2497
2509
  default:
2498
2510
  return "!text-info";
2499
2511
  }
2500
2512
  }, ss = (n) => {
2501
2513
  switch (n) {
2502
- case R.success:
2514
+ case I.success:
2503
2515
  return "bg-bg-success";
2504
- case R.error:
2516
+ case I.error:
2505
2517
  return "bg-bg-error";
2506
- case R.warning:
2518
+ case I.warning:
2507
2519
  return "bg-bg-warning";
2508
2520
  default:
2509
2521
  return "bg-bg-info";
2510
2522
  }
2511
2523
  };
2512
2524
  function sn() {
2513
- const { t: n } = T(), { notification: e, removeNotification: t } = ee(), [s, r] = _([]), i = K(s);
2525
+ const { t: n } = T(), { notification: e, removeNotification: t } = ee(), [s, r] = L([]), i = M(s);
2514
2526
  ft(() => {
2515
2527
  i.current = s;
2516
2528
  });
2517
- const o = K(null), c = w(
2529
+ const o = M(null), c = w(
2518
2530
  (a) => {
2519
2531
  r(
2520
2532
  (u) => a !== void 0 ? u.map((l) => l.id === a ? { ...l, closing: !0 } : l) : u.map((l) => ({ ...l, closing: !0 }))
@@ -2533,30 +2545,30 @@ function sn() {
2533
2545
  };
2534
2546
  if (e.length === 0)
2535
2547
  return i.current.length === 0 ? void 0 : (o.current && clearTimeout(o.current), a = setTimeout(() => {
2536
- r((m) => m.map((f) => ({ ...f, closing: !0 }))), a = null;
2548
+ r((p) => p.map((h) => ({ ...h, closing: !0 }))), a = null;
2537
2549
  }, 0), o.current = setTimeout(() => {
2538
2550
  r([]), o.current = null;
2539
2551
  }, de), u);
2540
- const l = new Set(i.current.map((m) => m.id));
2552
+ const l = new Set(i.current.map((p) => p.id));
2541
2553
  if (!e.some(
2542
- (m) => m.id !== void 0 && !l.has(m.id)
2554
+ (p) => p.id !== void 0 && !l.has(p.id)
2543
2555
  )) return;
2544
2556
  if (i.current.length === 0) {
2545
- const m = [...e];
2557
+ const p = [...e];
2546
2558
  return a = setTimeout(() => {
2547
- r(m.map((f) => ({ ...f, closing: !1 }))), a = null;
2559
+ r(p.map((h) => ({ ...h, closing: !1 }))), a = null;
2548
2560
  }, 0), () => {
2549
2561
  a && clearTimeout(a);
2550
2562
  };
2551
2563
  }
2552
2564
  o.current && clearTimeout(o.current), a = setTimeout(() => {
2553
2565
  r(
2554
- (m) => m.every((f) => f.closing) ? m : m.map((f) => ({ ...f, closing: !0 }))
2566
+ (p) => p.every((h) => h.closing) ? p : p.map((h) => ({ ...h, closing: !0 }))
2555
2567
  ), a = null;
2556
2568
  }, 0);
2557
- const h = [...e];
2569
+ const m = [...e];
2558
2570
  return o.current = setTimeout(() => {
2559
- r(h.map((m) => ({ ...m, closing: !1 }))), o.current = null;
2571
+ r(m.map((p) => ({ ...p, closing: !1 }))), o.current = null;
2560
2572
  }, de), u;
2561
2573
  }, [e]), O(() => {
2562
2574
  if (!s.length) return;
@@ -2570,35 +2582,35 @@ function sn() {
2570
2582
  window.clearTimeout(u), a && window.removeEventListener("click", a), window.removeEventListener("keydown", l);
2571
2583
  };
2572
2584
  }, [s.length, c]), Fe(
2573
- /* @__PURE__ */ p("div", { className: `notification-portal ${s.length ? "active" : ""}`, children: s.map(({ id: a, type: u, message: l, closing: d }) => {
2574
- const h = es(u);
2575
- return /* @__PURE__ */ S(
2585
+ /* @__PURE__ */ f("div", { className: `notification-portal ${s.length ? "active" : ""}`, children: s.map(({ id: a, type: u, message: l, closing: d }) => {
2586
+ const m = es(u);
2587
+ return /* @__PURE__ */ k(
2576
2588
  "div",
2577
2589
  {
2578
- className: `notification ${d ? "closing" : ""} ${ss(h)}`,
2579
- onClick: (m) => m.stopPropagation(),
2590
+ className: `notification ${d ? "closing" : ""} ${ss(m)}`,
2591
+ onClick: (p) => p.stopPropagation(),
2580
2592
  children: [
2581
- /* @__PURE__ */ S("div", { className: "notification-body", children: [
2582
- /* @__PURE__ */ p(
2583
- P,
2593
+ /* @__PURE__ */ k("div", { className: "notification-body", children: [
2594
+ /* @__PURE__ */ f(
2595
+ K,
2584
2596
  {
2585
- icon: ts(h),
2586
- className: `notification-icon ${Se(h)}`
2597
+ icon: ts(m),
2598
+ className: `notification-icon ${Se(m)}`
2587
2599
  }
2588
2600
  ),
2589
- /* @__PURE__ */ p("p", { className: `notification-text ${Se(h)}`, children: l })
2601
+ /* @__PURE__ */ f("p", { className: `notification-text ${Se(m)}`, children: l })
2590
2602
  ] }),
2591
- /* @__PURE__ */ p(
2603
+ /* @__PURE__ */ f(
2592
2604
  G,
2593
2605
  {
2594
2606
  type: "button",
2595
2607
  icon: _e,
2596
2608
  color: "error",
2597
2609
  className: "notification-close group",
2598
- onClick: (m) => {
2599
- m.stopPropagation(), a !== void 0 && c(a);
2610
+ onClick: (p) => {
2611
+ p.stopPropagation(), a !== void 0 && c(a);
2600
2612
  },
2601
- iconClassName: `${Se(h)} notification-close-icon`,
2613
+ iconClassName: `${Se(m)} notification-close-icon`,
2602
2614
  name: n("_accessibility:buttons.closeNotification"),
2603
2615
  "aria-label": n("_accessibility:ariaLabels.closeNotification")
2604
2616
  }
@@ -2613,7 +2625,7 @@ function sn() {
2613
2625
  }
2614
2626
  function nn(n) {
2615
2627
  const { className: e, ...t } = n;
2616
- return /* @__PURE__ */ p("div", { className: "splash-screen", children: /* @__PURE__ */ p(
2628
+ return /* @__PURE__ */ f("div", { className: "splash-screen", children: /* @__PURE__ */ f(
2617
2629
  ne,
2618
2630
  {
2619
2631
  className: `blur-appear ${e ? ` ${e}` : ""}`,
@@ -2634,25 +2646,25 @@ const ns = (n) => {
2634
2646
  if (!o) {
2635
2647
  const {
2636
2648
  className: d = "",
2637
- variant: h = t ? "submit" : "outlined",
2638
- color: m = t ? "primary" : "default",
2639
- ...f
2649
+ variant: m = t ? "submit" : "outlined",
2650
+ color: p = t ? "primary" : "default",
2651
+ ...h
2640
2652
  } = c ?? {};
2641
- return /* @__PURE__ */ p(
2642
- U,
2653
+ return /* @__PURE__ */ f(
2654
+ q,
2643
2655
  {
2644
2656
  type: "button",
2645
- variant: h,
2646
- color: m,
2657
+ variant: m,
2658
+ color: p,
2647
2659
  className: `tab ${d}`,
2648
2660
  onClick: s,
2649
- ...f,
2661
+ ...h,
2650
2662
  children: r
2651
2663
  }
2652
2664
  );
2653
2665
  }
2654
2666
  const l = `button submit tab ${t ? "primary" : "outlined"} ${(c == null ? void 0 : c.className) ?? ""}`.trim();
2655
- return /* @__PURE__ */ p(
2667
+ return /* @__PURE__ */ f(
2656
2668
  u,
2657
2669
  {
2658
2670
  to: i ?? `#${e}`,
@@ -2662,7 +2674,7 @@ const ns = (n) => {
2662
2674
  }
2663
2675
  );
2664
2676
  }, rs = (n) => {
2665
- var m;
2677
+ var p;
2666
2678
  const {
2667
2679
  tabs: e = [],
2668
2680
  defaultTab: t,
@@ -2672,30 +2684,30 @@ const ns = (n) => {
2672
2684
  tabsContainerClassName: o = "",
2673
2685
  useLinks: c = !0,
2674
2686
  tabButtonProps: a
2675
- } = n, [u, l] = _(t ?? ((m = e[0]) == null ? void 0 : m.id)), d = s ?? u, h = H(() => e.find((f) => f.id === d), [e, d]);
2676
- return /* @__PURE__ */ S("div", { className: `tabs-layout-main ${i}`, children: [
2677
- /* @__PURE__ */ p(
2687
+ } = n, [u, l] = L(t ?? ((p = e[0]) == null ? void 0 : p.id)), d = s ?? u, m = V(() => e.find((h) => h.id === d), [e, d]);
2688
+ return /* @__PURE__ */ k("div", { className: `tabs-layout-main ${i}`, children: [
2689
+ /* @__PURE__ */ f(
2678
2690
  "ul",
2679
2691
  {
2680
2692
  className: `horizontal tabs tabs-container ${o}`,
2681
- children: e.map(({ id: f, to: y, label: g }) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ p(
2693
+ children: e.map(({ id: h, to: y, label: g }) => /* @__PURE__ */ f("li", { children: /* @__PURE__ */ f(
2682
2694
  ns,
2683
2695
  {
2684
2696
  onClick: () => {
2685
- s === void 0 && l(f), r == null || r(f);
2697
+ s === void 0 && l(h), r == null || r(h);
2686
2698
  },
2687
- id: f,
2699
+ id: h,
2688
2700
  to: y,
2689
2701
  siblings: e.length > 1,
2690
- active: d === f,
2702
+ active: d === h,
2691
2703
  useLinks: c,
2692
2704
  tabButtonProps: a,
2693
2705
  children: g
2694
2706
  }
2695
- ) }, f))
2707
+ ) }, h))
2696
2708
  }
2697
2709
  ),
2698
- h == null ? void 0 : h.content
2710
+ m == null ? void 0 : m.content
2699
2711
  ] });
2700
2712
  }, is = (n) => {
2701
2713
  const {
@@ -2710,14 +2722,14 @@ const ns = (n) => {
2710
2722
  alt: u = "",
2711
2723
  final: l = !1
2712
2724
  } = n, { t: d } = T();
2713
- return /* @__PURE__ */ S("div", { className: "big-appear step-container", children: [
2714
- a && /* @__PURE__ */ p("img", { src: a, alt: u }),
2715
- e != null && /* @__PURE__ */ p("h2", { className: "step-title", children: e }),
2716
- t != null && /* @__PURE__ */ p("div", { className: "step-body", children: t }),
2717
- s != null && /* @__PURE__ */ p("div", { className: "step-content", children: s }),
2718
- /* @__PURE__ */ p("div", { className: "step-actions", children: l ? /* @__PURE__ */ S(ae, { children: [
2719
- /* @__PURE__ */ p(
2720
- U,
2725
+ return /* @__PURE__ */ k("div", { className: "big-appear step-container", children: [
2726
+ a && /* @__PURE__ */ f("img", { src: a, alt: u }),
2727
+ e != null && /* @__PURE__ */ f("h2", { className: "step-title", children: e }),
2728
+ t != null && /* @__PURE__ */ f("div", { className: "step-body", children: t }),
2729
+ s != null && /* @__PURE__ */ f("div", { className: "step-content", children: s }),
2730
+ /* @__PURE__ */ f("div", { className: "step-actions", children: l ? /* @__PURE__ */ k(ae, { children: [
2731
+ /* @__PURE__ */ f(
2732
+ q,
2721
2733
  {
2722
2734
  color: "primary",
2723
2735
  className: "step-button",
@@ -2727,8 +2739,8 @@ const ns = (n) => {
2727
2739
  children: d("_accessibility:buttons.startAsGuest")
2728
2740
  }
2729
2741
  ),
2730
- /* @__PURE__ */ p(
2731
- U,
2742
+ /* @__PURE__ */ f(
2743
+ q,
2732
2744
  {
2733
2745
  color: "primary",
2734
2746
  variant: "submit",
@@ -2738,9 +2750,9 @@ const ns = (n) => {
2738
2750
  children: d("_accessibility:buttons.signIn")
2739
2751
  }
2740
2752
  )
2741
- ] }) : /* @__PURE__ */ S(ae, { children: [
2742
- /* @__PURE__ */ p(
2743
- U,
2753
+ ] }) : /* @__PURE__ */ k(ae, { children: [
2754
+ /* @__PURE__ */ f(
2755
+ q,
2744
2756
  {
2745
2757
  color: "primary",
2746
2758
  className: "step-button",
@@ -2750,8 +2762,8 @@ const ns = (n) => {
2750
2762
  children: d("_accessibility:buttons.skip")
2751
2763
  }
2752
2764
  ),
2753
- /* @__PURE__ */ p(
2754
- U,
2765
+ /* @__PURE__ */ f(
2766
+ q,
2755
2767
  {
2756
2768
  color: "primary",
2757
2769
  className: "step-button",
@@ -2771,45 +2783,45 @@ const ns = (n) => {
2771
2783
  onSkip: r,
2772
2784
  onSignIn: i,
2773
2785
  onStartAsGuest: o
2774
- } = n, { setGuestMode: c } = Qe(), { navigate: a } = ce(), [u, l] = _(1), d = w(() => {
2786
+ } = n, { setGuestMode: c } = He(), { navigate: a } = ce(), [u, l] = L(1), d = w(() => {
2775
2787
  if (r) {
2776
2788
  r();
2777
2789
  return;
2778
2790
  }
2779
2791
  a(t);
2780
- }, [a, r, t]), h = w(() => {
2792
+ }, [a, r, t]), m = w(() => {
2781
2793
  if (i) {
2782
2794
  i();
2783
2795
  return;
2784
2796
  }
2785
2797
  a(t);
2786
- }, [a, i, t]), m = w(() => {
2798
+ }, [a, i, t]), p = w(() => {
2787
2799
  if (o) {
2788
2800
  o();
2789
2801
  return;
2790
2802
  }
2791
2803
  c(!0), a(s);
2792
- }, [s, a, o, c]), f = H(() => e.map((y, g) => ({
2804
+ }, [s, a, o, c]), h = V(() => e.map((y, g) => ({
2793
2805
  id: g + 1,
2794
2806
  label: "",
2795
- content: /* @__PURE__ */ p(
2807
+ content: /* @__PURE__ */ f(
2796
2808
  is,
2797
2809
  {
2798
2810
  ...y,
2799
2811
  final: g === e.length - 1,
2800
2812
  onClickNext: () => l((b) => b + 1),
2801
2813
  onSkip: d,
2802
- onStartAsGuest: m,
2803
- onSignIn: h
2814
+ onStartAsGuest: p,
2815
+ onSignIn: m
2804
2816
  }
2805
2817
  )
2806
- })), [h, d, m, e]);
2807
- return /* @__PURE__ */ p("div", { className: "onboarding-main", children: /* @__PURE__ */ p(
2818
+ })), [m, d, p, e]);
2819
+ return /* @__PURE__ */ f("div", { className: "onboarding-main", children: /* @__PURE__ */ f(
2808
2820
  rs,
2809
2821
  {
2810
2822
  currentTab: u,
2811
2823
  onTabChange: (y) => l(Number(y)),
2812
- tabs: f,
2824
+ tabs: h,
2813
2825
  useLinks: !1
2814
2826
  }
2815
2827
  ) });
@@ -2820,10 +2832,10 @@ const ns = (n) => {
2820
2832
  action: s,
2821
2833
  iconProps: r
2822
2834
  } = n;
2823
- return /* @__PURE__ */ S("div", { className: "empty-container", children: [
2824
- r && /* @__PURE__ */ p(P, { ...r }),
2825
- /* @__PURE__ */ p("p", { ...t, children: e }),
2826
- s && /* @__PURE__ */ p(ht, { showTooltips: !1, showText: !0, ...s })
2835
+ return /* @__PURE__ */ k("div", { className: "empty-container", children: [
2836
+ r && /* @__PURE__ */ f(K, { ...r }),
2837
+ /* @__PURE__ */ f("p", { ...t, children: e }),
2838
+ s && /* @__PURE__ */ f(ht, { showTooltips: !1, showText: !0, ...s })
2827
2839
  ] });
2828
2840
  };
2829
2841
  export {
@@ -2858,7 +2870,7 @@ export {
2858
2870
  Ge as NavbarContext,
2859
2871
  en as NavbarProvider,
2860
2872
  sn as Notification,
2861
- R as NotificationEnumType,
2873
+ I as NotificationEnumType,
2862
2874
  Rs as NotificationProvider,
2863
2875
  rn as Onboarding,
2864
2876
  Xs as Page,
@@ -2884,21 +2896,21 @@ export {
2884
2896
  _s as mapValidationErrors,
2885
2897
  Pe as parseQueries,
2886
2898
  Is as queryClient,
2887
- D as removeFromLocal,
2899
+ P as removeFromLocal,
2888
2900
  W as toLocal,
2889
- Qe as useAuth,
2901
+ He as useAuth,
2890
2902
  ce as useConfig,
2891
2903
  Be as useConfirmationForm,
2892
2904
  Bt as useDeleteAction,
2893
2905
  js as useDeleteDialog,
2894
2906
  We as useDialog,
2895
- Qt as useDrawerMenu,
2907
+ Ht as useDrawerMenu,
2896
2908
  Us as useEditAction,
2897
- Hs as useEntityFormDialog,
2909
+ Qs as useEntityFormDialog,
2898
2910
  Gt as useExportAction,
2899
2911
  zs as useExportActionMutate,
2900
2912
  pe as useFormDialog,
2901
- Qs as useFormDialogLegacy,
2913
+ Hs as useFormDialogLegacy,
2902
2914
  zt as useImportAction,
2903
2915
  Gs as useImportDialog,
2904
2916
  Ut as useManager,