@sito/dashboard-app 0.0.50 → 0.0.51

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,99 +1,99 @@
1
- var ze = Object.defineProperty;
2
- var Je = (n, e, t) => e in n ? ze(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var x = (n, e, t) => Je(n, typeof e != "symbol" ? e + "" : e, t);
1
+ var et = Object.defineProperty;
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);
4
4
  import "./main.css";
5
- import { State as Ye, inputStateClassName as Xe, labelStateClassName as Ze, helperTextStateClassName as et, useTranslation as v, Button as K, Loading as ee, TextInput as tt, FileInput as st, IconButton as nt, Actions as rt, ActionsDropdown as ot, useTableOptions as it, Badge as at, Action as ct } from "@sito/dashboard";
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";
6
6
  export * from "@sito/dashboard";
7
- import { Action as en, Actions as tn, ActionsDropdown as sn, Button as nn } from "@sito/dashboard";
8
- import { jsxs as k, jsx as h, Fragment as oe } from "react/jsx-runtime";
9
- import { FontAwesomeIcon as F } from "@fortawesome/react-fontawesome";
10
- import { forwardRef as xe, useState as A, useCallback as w, useEffect as O, useReducer as Ae, useRef as H, useMemo as Q, createContext as te, useContext as se, useLayoutEffect as lt } from "react";
11
- import { faEyeSlash as ut, faEye as dt, faClose as Le, faTrash as mt, faRotateLeft as _e, faPencil as ht, faCircleNotch as Re, faCloudArrowDown as ft, faCloudUpload as pt, faArrowUp as gt, faArrowLeft as yt, faAdd as Te, faFilter as bt, faBars as wt, faSearch as kt, faCircleCheck as St, faWarning as vt } from "@fortawesome/free-solid-svg-icons";
12
- import { createPortal as Ie } from "react-dom";
13
- import { QueryClient as Ct, QueryClientProvider as Tt, useMutation as ie, useQueryClient as ne, useQuery as Nt } from "@tanstack/react-query";
14
- import { faSadTear as Et } from "@fortawesome/free-regular-svg-icons";
15
- import { useForm as Pe } from "react-hook-form";
16
- const Ne = (n) => n == null ? !1 : `${n}`.length > 0, hs = xe(function(n, e) {
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";
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
+ import { createPortal as Fe } from "react-dom";
13
+ import { QueryClient as xt, QueryClientProvider as At, useMutation as Z, useQueryClient as J, useQuery as Oe } from "@tanstack/react-query";
14
+ import { faSadTear as Lt } from "@fortawesome/free-regular-svg-icons";
15
+ import { useForm as Me } from "react-hook-form";
16
+ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
17
17
  const {
18
18
  value: t,
19
19
  defaultValue: s,
20
20
  onChange: r,
21
- state: o = Ye.default,
22
- name: i = "",
21
+ state: i = st.default,
22
+ name: o = "",
23
23
  id: c = "",
24
24
  label: a = "",
25
- disabled: l = !1,
26
- required: d = !1,
27
- containerClassName: u = "",
28
- inputClassName: m = "",
29
- labelClassName: f = "",
30
- helperText: p = "",
25
+ disabled: u = !1,
26
+ required: l = !1,
27
+ containerClassName: d = "",
28
+ inputClassName: h = "",
29
+ labelClassName: m = "",
30
+ helperText: f = "",
31
31
  helperTextClassName: y = "",
32
32
  ...g
33
- } = n, b = t !== void 0, [T, N] = A(
34
- () => Ne(s)
35
- ), C = b ? Ne(t) : T, D = (q) => {
36
- b || N(q.currentTarget.value.length > 0), r == null || r(q);
33
+ } = n, b = t !== void 0, [k, E] = _(
34
+ () => Ee(s)
35
+ ), N = b ? Ee(t) : k, $ = (j) => {
36
+ b || E(j.currentTarget.value.length > 0), r == null || r(j);
37
37
  };
38
- return /* @__PURE__ */ k("div", { className: `form-paragraph-container group ${u}`, children: [
39
- /* @__PURE__ */ h(
38
+ return /* @__PURE__ */ S("div", { className: `form-paragraph-container group ${d}`, children: [
39
+ /* @__PURE__ */ p(
40
40
  "textarea",
41
41
  {
42
42
  ref: e,
43
- name: i,
43
+ name: o,
44
44
  id: c,
45
- className: `text-input text-area form-paragraph-textarea peer ${Xe(o)} ${C ? "has-value" : ""} ${g.placeholder ? "has-placeholder" : ""} ${m}`,
46
- required: d,
45
+ className: `text-input text-area form-paragraph-textarea peer ${nt(i)} ${N ? "has-value" : ""} ${g.placeholder ? "has-placeholder" : ""} ${h}`,
46
+ required: l,
47
47
  defaultValue: s,
48
48
  ...b ? { value: t } : {},
49
- onChange: D,
50
- disabled: l,
49
+ onChange: $,
50
+ disabled: u,
51
51
  ...g
52
52
  }
53
53
  ),
54
- /* @__PURE__ */ k(
54
+ /* @__PURE__ */ S(
55
55
  "label",
56
56
  {
57
57
  htmlFor: c,
58
- className: `text-input-label ${Ze(o)} ${f}`,
58
+ className: `text-input-label ${rt(i)} ${m}`,
59
59
  children: [
60
60
  a,
61
- d ? " *" : ""
61
+ l ? " *" : ""
62
62
  ]
63
63
  }
64
64
  ),
65
- !!p && /* @__PURE__ */ h(
65
+ !!f && /* @__PURE__ */ p(
66
66
  "p",
67
67
  {
68
- className: `text-input-helper-text ${et(o)} ${y}`,
69
- children: p
68
+ className: `text-input-helper-text ${it(i)} ${y}`,
69
+ children: f
70
70
  }
71
71
  )
72
72
  ] });
73
- }), fs = (n) => {
74
- const { t: e } = v(), {
73
+ }), ws = (n) => {
74
+ const { t: e } = T(), {
75
75
  children: t,
76
76
  handleSubmit: s,
77
77
  onSubmit: r,
78
- isLoading: o = !1,
79
- buttonEnd: i = !0,
78
+ isLoading: i = !1,
79
+ buttonEnd: o = !0,
80
80
  reset: c
81
81
  } = n;
82
- return /* @__PURE__ */ k("form", { className: "form-container", onSubmit: s(r), children: [
82
+ return /* @__PURE__ */ S("form", { className: "form-container", onSubmit: s(r), children: [
83
83
  t,
84
- /* @__PURE__ */ k("div", { className: `form-actions ${i ? "end" : ""}`, children: [
85
- /* @__PURE__ */ k(
86
- K,
84
+ /* @__PURE__ */ S("div", { className: `form-actions ${o ? "end" : ""}`, children: [
85
+ /* @__PURE__ */ S(
86
+ U,
87
87
  {
88
88
  type: "submit",
89
89
  color: "primary",
90
90
  variant: "submit",
91
- disabled: o,
91
+ disabled: i,
92
92
  name: e("_accessibility:buttons.submit"),
93
93
  "aria-label": e("_accessibility:ariaLabels.submit"),
94
94
  children: [
95
- o ? /* @__PURE__ */ h(
96
- ee,
95
+ i ? /* @__PURE__ */ p(
96
+ ne,
97
97
  {
98
98
  color: "stroke-base",
99
99
  loaderClass: "!w-6 mt-1",
@@ -104,8 +104,8 @@ const Ne = (n) => n == null ? !1 : `${n}`.length > 0, hs = xe(function(n, e) {
104
104
  ]
105
105
  }
106
106
  ),
107
- /* @__PURE__ */ h(
108
- K,
107
+ /* @__PURE__ */ p(
108
+ U,
109
109
  {
110
110
  type: "button",
111
111
  variant: "outlined",
@@ -117,10 +117,10 @@ const Ne = (n) => n == null ? !1 : `${n}`.length > 0, hs = xe(function(n, e) {
117
117
  )
118
118
  ] })
119
119
  ] });
120
- }, ps = xe(function(n, e) {
121
- const { t } = v(), [s, r] = A(!1);
122
- return /* @__PURE__ */ h(tt, { ...n, type: s ? "text" : "password", ref: e, children: /* @__PURE__ */ h(
123
- V,
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(
123
+ G,
124
124
  {
125
125
  type: "button",
126
126
  tabIndex: -1,
@@ -129,61 +129,61 @@ const Ne = (n) => n == null ? !1 : `${n}`.length > 0, hs = xe(function(n, e) {
129
129
  ),
130
130
  className: "password-icon",
131
131
  onClick: () => r(!s),
132
- icon: s ? ut : dt
132
+ icon: s ? pt : gt
133
133
  }
134
134
  ) });
135
- }), ye = (n) => {
136
- const { t: e } = v(), {
135
+ }), ke = (n) => {
136
+ const { t: e } = T(), {
137
137
  title: t,
138
138
  children: s,
139
139
  handleClose: r,
140
- open: o = !1,
141
- containerClassName: i = "",
140
+ open: i = !1,
141
+ containerClassName: o = "",
142
142
  className: c = "",
143
143
  animationClass: a = "appear"
144
- } = n, l = w(
145
- (u) => {
146
- u.key === "Escape" && o && r();
144
+ } = n, u = w(
145
+ (d) => {
146
+ d.key === "Escape" && i && r();
147
147
  },
148
- [o, r]
148
+ [i, r]
149
149
  );
150
- O(() => (window.addEventListener("keydown", l), () => {
151
- window.removeEventListener("keydown", l);
152
- }), [l]);
153
- const d = w(
154
- (u) => {
155
- u.target === u.currentTarget && r();
150
+ O(() => (window.addEventListener("keydown", u), () => {
151
+ window.removeEventListener("keydown", u);
152
+ }), [u]);
153
+ const l = w(
154
+ (d) => {
155
+ d.target === d.currentTarget && r();
156
156
  },
157
157
  [r]
158
158
  );
159
159
  return O(() => {
160
- const u = (m) => {
161
- m ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
160
+ const d = (h) => {
161
+ h ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
162
162
  };
163
- return u(o), () => {
164
- u(!1);
163
+ return d(i), () => {
164
+ d(!1);
165
165
  };
166
- }, [o]), Ie(
167
- /* @__PURE__ */ h(
166
+ }, [i]), Fe(
167
+ /* @__PURE__ */ p(
168
168
  "div",
169
169
  {
170
170
  "aria-label": e("_accessibility:ariaLabels.closeDialog"),
171
- "aria-hidden": !o,
172
- onClick: d,
173
- className: `dialog-backdrop animated ${o ? `opened ${a}` : "closed"} ${i}`,
174
- children: /* @__PURE__ */ k(
171
+ "aria-hidden": !i,
172
+ onClick: l,
173
+ className: `dialog-backdrop animated ${i ? `opened ${a}` : "closed"} ${o}`,
174
+ children: /* @__PURE__ */ S(
175
175
  "div",
176
176
  {
177
- className: `dialog elevated animated ${o ? `opened ${a}` : "closed"} ${c}`,
177
+ className: `dialog elevated animated ${i ? `opened ${a}` : "closed"} ${c}`,
178
178
  children: [
179
- /* @__PURE__ */ k("div", { className: "dialog-header", children: [
180
- /* @__PURE__ */ h("h3", { className: "dialog-title", children: t }),
181
- /* @__PURE__ */ h(
182
- V,
179
+ /* @__PURE__ */ S("div", { className: "dialog-header", children: [
180
+ /* @__PURE__ */ p("h3", { className: "dialog-title", children: t }),
181
+ /* @__PURE__ */ p(
182
+ G,
183
183
  {
184
- icon: Le,
185
- disabled: !o,
186
- "aria-disabled": !o,
184
+ icon: _e,
185
+ disabled: !i,
186
+ "aria-disabled": !i,
187
187
  onClick: r,
188
188
  variant: "text",
189
189
  color: "error",
@@ -201,42 +201,42 @@ const Ne = (n) => n == null ? !1 : `${n}`.length > 0, hs = xe(function(n, e) {
201
201
  ),
202
202
  document.body
203
203
  );
204
- }, be = (n) => {
204
+ }, ve = (n) => {
205
205
  const {
206
206
  primaryText: e,
207
207
  cancelText: t,
208
208
  onPrimaryClick: s,
209
209
  onCancel: r,
210
- isLoading: o = !1,
211
- disabled: i = !1,
210
+ isLoading: i = !1,
211
+ disabled: o = !1,
212
212
  primaryType: c = "submit",
213
213
  containerClassName: a = "",
214
- primaryClassName: l = "",
215
- alignEnd: d = !1,
216
- primaryName: u,
217
- primaryAriaLabel: m,
218
- cancelName: f,
219
- cancelAriaLabel: p
214
+ primaryClassName: u = "",
215
+ alignEnd: l = !1,
216
+ primaryName: d,
217
+ primaryAriaLabel: h,
218
+ cancelName: m,
219
+ cancelAriaLabel: f
220
220
  } = n;
221
- return /* @__PURE__ */ k(
221
+ return /* @__PURE__ */ S(
222
222
  "div",
223
223
  {
224
- className: `dialog-actions ${d ? "end" : ""} ${a}`,
224
+ className: `dialog-actions ${l ? "end" : ""} ${a}`,
225
225
  children: [
226
- /* @__PURE__ */ k(
227
- K,
226
+ /* @__PURE__ */ S(
227
+ U,
228
228
  {
229
229
  type: c,
230
230
  color: "primary",
231
231
  variant: "submit",
232
- className: l,
233
- disabled: i,
232
+ className: u,
233
+ disabled: o,
234
234
  onClick: s,
235
- name: u,
236
- "aria-label": m,
235
+ name: d,
236
+ "aria-label": h,
237
237
  children: [
238
- o ? /* @__PURE__ */ h(
239
- ee,
238
+ i ? /* @__PURE__ */ p(
239
+ ne,
240
240
  {
241
241
  color: "stroke-base",
242
242
  loaderClass: "!w-6 mt-1",
@@ -247,42 +247,42 @@ const Ne = (n) => n == null ? !1 : `${n}`.length > 0, hs = xe(function(n, e) {
247
247
  ]
248
248
  }
249
249
  ),
250
- /* @__PURE__ */ h(
251
- K,
250
+ /* @__PURE__ */ p(
251
+ U,
252
252
  {
253
253
  type: "button",
254
254
  variant: "outlined",
255
- disabled: i,
255
+ disabled: o,
256
256
  onClick: r,
257
- name: f,
258
- "aria-label": p,
257
+ name: m,
258
+ "aria-label": f,
259
259
  children: t
260
260
  }
261
261
  )
262
262
  ]
263
263
  }
264
264
  );
265
- }, gs = (n) => {
266
- const { t: e } = v(), {
265
+ }, ks = (n) => {
266
+ const { t: e } = T(), {
267
267
  children: t,
268
268
  handleSubmit: s,
269
269
  onSubmit: r,
270
- handleClose: o,
271
- isLoading: i = !1,
270
+ handleClose: i,
271
+ isLoading: o = !1,
272
272
  buttonEnd: c = !0,
273
273
  ...a
274
274
  } = n;
275
- return /* @__PURE__ */ h(ye, { ...a, handleClose: o, children: /* @__PURE__ */ k("form", { onSubmit: s(r), children: [
276
- /* @__PURE__ */ h("div", { className: "form-container", children: t }),
277
- /* @__PURE__ */ h(
278
- be,
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
+ ve,
279
279
  {
280
280
  primaryType: "submit",
281
281
  primaryText: e("_accessibility:buttons.submit"),
282
282
  cancelText: e("_accessibility:buttons.cancel"),
283
- onCancel: o,
284
- isLoading: i,
285
- disabled: i,
283
+ onCancel: i,
284
+ isLoading: o,
285
+ disabled: o,
286
286
  primaryClassName: "dialog-form-primary",
287
287
  alignEnd: c,
288
288
  primaryName: e("_accessibility:buttons.submit"),
@@ -292,25 +292,25 @@ const Ne = (n) => n == null ? !1 : `${n}`.length > 0, hs = xe(function(n, e) {
292
292
  }
293
293
  )
294
294
  ] }) });
295
- }, ys = (n) => {
296
- const { t: e } = v(), {
295
+ }, vs = (n) => {
296
+ const { t: e } = T(), {
297
297
  children: t,
298
298
  handleSubmit: s,
299
299
  handleClose: r,
300
- isLoading: o = !1,
301
- ...i
300
+ isLoading: i = !1,
301
+ ...o
302
302
  } = n;
303
- return /* @__PURE__ */ k(ye, { ...i, handleClose: r, children: [
303
+ return /* @__PURE__ */ S(ke, { ...o, handleClose: r, children: [
304
304
  t,
305
- /* @__PURE__ */ h(
306
- be,
305
+ /* @__PURE__ */ p(
306
+ ve,
307
307
  {
308
308
  primaryText: e("_accessibility:buttons.ok"),
309
309
  cancelText: e("_accessibility:buttons.cancel"),
310
310
  onPrimaryClick: s,
311
311
  onCancel: r,
312
- isLoading: o,
313
- disabled: o,
312
+ isLoading: i,
313
+ disabled: i,
314
314
  primaryType: "button",
315
315
  containerClassName: "mt-5",
316
316
  primaryName: e("_accessibility:buttons.ok"),
@@ -321,34 +321,34 @@ const Ne = (n) => n == null ? !1 : `${n}`.length > 0, hs = xe(function(n, e) {
321
321
  )
322
322
  ] });
323
323
  };
324
- function $t(n) {
325
- const { message: e, className: t = "" } = n, { t: s } = v();
326
- return /* @__PURE__ */ h("p", { className: `import-error-message ${t}`, children: e ?? s("_messages:errors.parseFile", {
324
+ function _t(n) {
325
+ 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", {
327
327
  defaultValue: "Failed to process file"
328
328
  }) });
329
329
  }
330
- function xt(n) {
331
- const { message: e, className: t = "" } = n, { t: s } = v();
332
- return /* @__PURE__ */ k("div", { className: `import-loading ${t}`, children: [
333
- /* @__PURE__ */ h(ee, { loaderClass: "w-5 h-5", className: "!w-auto" }),
334
- /* @__PURE__ */ h("span", { children: e ?? s("_messages:loading.processingFile", {
330
+ function Rt(n) {
331
+ 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", {
335
335
  defaultValue: "Processing file..."
336
336
  }) })
337
337
  ] });
338
338
  }
339
- function At(n) {
340
- const { items: e, max: t = 5, className: s = "" } = n, { t: r } = v();
339
+ function It(n) {
340
+ const { items: e, max: t = 5, className: s = "" } = n, { t: r } = T();
341
341
  if (!e || e.length === 0) return null;
342
- const o = e.slice(0, t);
343
- return /* @__PURE__ */ k("div", { className: `import-preview ${s}`, children: [
344
- /* @__PURE__ */ h("p", { className: "import-preview-count", children: r("_pages:common.actions.import.previewCount", {
342
+ 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", {
345
345
  count: e.length,
346
346
  defaultValue: `Preview: ${e.length} items`
347
347
  }) }),
348
- /* @__PURE__ */ h("pre", { className: "import-preview-content", children: JSON.stringify(o, null, 2) })
348
+ /* @__PURE__ */ p("pre", { className: "import-preview-content", children: JSON.stringify(i, null, 2) })
349
349
  ] });
350
350
  }
351
- const Me = () => ({
351
+ const De = () => ({
352
352
  file: null,
353
353
  previewItems: null,
354
354
  parseError: null,
@@ -356,7 +356,7 @@ const Me = () => ({
356
356
  overrideExisting: !1,
357
357
  inputKey: 0
358
358
  });
359
- function Lt(n, e) {
359
+ function Ft(n, e) {
360
360
  switch (e.type) {
361
361
  case "SET_FILE":
362
362
  return {
@@ -385,107 +385,107 @@ function Lt(n, e) {
385
385
  case "SET_OVERRIDE":
386
386
  return { ...n, overrideExisting: e.value };
387
387
  case "RESET":
388
- return { ...Me(), inputKey: n.inputKey + 1 };
388
+ return { ...De(), inputKey: n.inputKey + 1 };
389
389
  }
390
390
  }
391
- const bs = (n) => {
392
- const { t: e } = v(), {
391
+ const Cs = (n) => {
392
+ const { t: e } = T(), {
393
393
  children: t,
394
394
  handleSubmit: s,
395
395
  handleClose: r,
396
- isLoading: o = !1,
397
- fileProcessor: i,
396
+ isLoading: i = !1,
397
+ fileProcessor: o,
398
398
  onFileProcessed: c,
399
399
  renderCustomPreview: a,
400
- onOverrideChange: l,
401
- open: d,
402
- ...u
403
- } = n, [m, f] = Ae(
404
- Lt,
405
- Me()
400
+ onOverrideChange: u,
401
+ open: l,
402
+ ...d
403
+ } = n, [h, m] = Le(
404
+ Ft,
405
+ De()
406
406
  ), {
407
- file: p,
407
+ file: f,
408
408
  previewItems: y,
409
409
  parseError: g,
410
410
  processing: b,
411
- overrideExisting: T,
412
- inputKey: N
413
- } = m, C = H(c), D = H(i);
411
+ overrideExisting: k,
412
+ inputKey: E
413
+ } = h, N = K(c), $ = K(o);
414
414
  O(() => {
415
- C.current = c;
415
+ N.current = c;
416
416
  }, [c]), O(() => {
417
- D.current = i;
418
- }, [i]), O(() => {
419
- d || f({ type: "RESET" });
420
- }, [d]);
421
- const q = w(
422
- async (L, S) => {
423
- var _;
424
- if (D.current) {
425
- f({ type: "START_PROCESSING" });
417
+ $.current = o;
418
+ }, [o]), O(() => {
419
+ l || m({ type: "RESET" });
420
+ }, [l]);
421
+ const j = w(
422
+ async (I, v) => {
423
+ var A;
424
+ if ($.current) {
425
+ m({ type: "START_PROCESSING" });
426
426
  try {
427
- const E = await D.current(L, { override: S });
428
- f({ type: "SET_PREVIEW", items: E ?? [] }), (_ = C.current) == null || _.call(C, E ?? []);
429
- } catch (E) {
430
- console.error(E);
431
- const P = E instanceof Error ? E.message : "Failed to parse file";
432
- f({ type: "SET_ERROR", message: P });
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 });
433
433
  }
434
434
  }
435
435
  },
436
436
  []
437
437
  );
438
- return /* @__PURE__ */ k(ye, { ...u, open: d, handleClose: r, children: [
439
- /* @__PURE__ */ h(
440
- st,
438
+ return /* @__PURE__ */ S(ke, { ...d, open: l, handleClose: r, children: [
439
+ /* @__PURE__ */ p(
440
+ at,
441
441
  {
442
442
  onClear: () => {
443
- var L;
444
- f({ type: "SET_FILE", file: null }), (L = C.current) == null || L.call(C, []);
443
+ var I;
444
+ m({ type: "SET_FILE", file: null }), (I = N.current) == null || I.call(N, []);
445
445
  },
446
- onChange: (L) => {
447
- var _, E;
448
- const S = (_ = L.target.files) == null ? void 0 : _[0];
449
- if (!S) {
450
- f({ type: "SET_FILE", file: null }), (E = C.current) == null || E.call(C, []);
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, []);
451
451
  return;
452
452
  }
453
- f({ type: "SET_FILE", file: S }), q(S, T);
453
+ m({ type: "SET_FILE", file: v }), j(v, k);
454
454
  },
455
455
  label: e("_accessibility:labels.file")
456
456
  },
457
- N
457
+ E
458
458
  ),
459
- /* @__PURE__ */ k("label", { className: "import-override-label", children: [
460
- /* @__PURE__ */ h(
459
+ /* @__PURE__ */ S("label", { className: "import-override-label", children: [
460
+ /* @__PURE__ */ p(
461
461
  "input",
462
462
  {
463
463
  type: "checkbox",
464
- checked: T,
465
- onChange: (L) => {
466
- const S = L.target.checked;
467
- f({ type: "SET_OVERRIDE", value: S }), l == null || l(S), p && q(p, S);
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);
468
468
  }
469
469
  }
470
470
  ),
471
- /* @__PURE__ */ h("span", { children: e("_pages:common.actions.import.override", {
471
+ /* @__PURE__ */ p("span", { children: e("_pages:common.actions.import.override", {
472
472
  defaultValue: "Override existing items"
473
473
  }) })
474
474
  ] }),
475
- /* @__PURE__ */ h($t, { message: g }),
476
- b && /* @__PURE__ */ h(xt, {}),
477
- a ? a(y) : !!y && y.length > 0 && /* @__PURE__ */ h(At, { items: y }),
475
+ /* @__PURE__ */ p(_t, { message: g }),
476
+ b && /* @__PURE__ */ p(Rt, {}),
477
+ a ? a(y) : !!y && y.length > 0 && /* @__PURE__ */ p(It, { items: y }),
478
478
  t,
479
- /* @__PURE__ */ h(
480
- be,
479
+ /* @__PURE__ */ p(
480
+ ve,
481
481
  {
482
482
  primaryText: e("_accessibility:buttons.ok"),
483
483
  cancelText: e("_accessibility:buttons.cancel"),
484
484
  onPrimaryClick: () => {
485
- (!i || !!y && y.length > 0) && s();
485
+ (!o || !!y && y.length > 0) && s();
486
486
  },
487
487
  onCancel: r,
488
- isLoading: o,
488
+ isLoading: i,
489
489
  primaryType: "button",
490
490
  containerClassName: "import-dialog-actions",
491
491
  primaryName: e("_accessibility:buttons.ok"),
@@ -496,49 +496,49 @@ const bs = (n) => {
496
496
  )
497
497
  ] });
498
498
  };
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 || {}), I = /* @__PURE__ */ ((n) => (n.GET = "GET", n.POST = "POST", n.PUT = "PUT", n.PATCH = "PATCH", n.DELETE = "DELETE", n))(I || {});
500
- const _t = (n) => Array.isArray(n) || n instanceof Headers ? !1 : typeof n == "object" && n !== null && ("headers" in n || "credentials" in n), Rt = (n) => n ? _t(n) ? n : { headers: n } : {}, It = (n) => n ? n instanceof Headers ? Object.fromEntries(n.entries()) : Array.isArray(n) ? Object.fromEntries(n) : n : {};
501
- async function fe(n, e = "GET", t, s) {
502
- const r = Rt(s), o = {
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 || {});
500
+ 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
+ async function be(n, e = "GET", t, s) {
502
+ const r = Mt(s), i = {
503
503
  ...t !== void 0 ? { "Content-Type": "application/json" } : {},
504
- ...It(r.headers)
504
+ ...Dt(r.headers)
505
505
  };
506
506
  try {
507
- const i = await fetch(n, {
507
+ const o = await fetch(n, {
508
508
  method: e,
509
- headers: o,
509
+ headers: i,
510
510
  ...r.credentials ? { credentials: r.credentials } : {},
511
511
  ...t !== void 0 ? { body: JSON.stringify(t) } : {}
512
- }), c = await i.text();
512
+ }), c = await o.text();
513
513
  let a = null;
514
514
  try {
515
515
  a = c ? JSON.parse(c) : null;
516
516
  } catch {
517
517
  a = null;
518
518
  }
519
- if (!i.ok) {
520
- const l = typeof a == "object" && a !== null ? a.message ?? a.error ?? c : c || i.statusText;
519
+ if (!o.ok) {
520
+ const u = typeof a == "object" && a !== null ? a.message ?? a.error ?? c : c || o.statusText;
521
521
  return {
522
522
  data: null,
523
- status: i.status,
523
+ status: o.status,
524
524
  error: {
525
- status: i.status,
526
- message: l || "Unknown error occurred"
525
+ status: o.status,
526
+ message: u || "Unknown error occurred"
527
527
  }
528
528
  };
529
529
  }
530
530
  return {
531
- data: i.status !== 204 && a !== null ? a : null,
532
- status: i.status,
531
+ data: o.status !== 204 && a !== null ? a : null,
532
+ status: o.status,
533
533
  error: null
534
534
  };
535
- } catch (i) {
535
+ } catch (o) {
536
536
  return {
537
537
  data: null,
538
538
  status: 500,
539
539
  error: {
540
540
  status: 500,
541
- message: i instanceof Error ? i.message : "Unknown error occurred"
541
+ message: o instanceof Error ? o.message : "Unknown error occurred"
542
542
  }
543
543
  };
544
544
  }
@@ -552,49 +552,49 @@ function Pt(n, e) {
552
552
  }
553
553
  return n;
554
554
  }
555
- const De = (n, e, t) => {
555
+ const Pe = (n, e, t) => {
556
556
  const s = [];
557
557
  if (e) {
558
- const { sortingBy: r, sortingOrder: o, currentPage: i, pageSize: c } = e;
559
- r !== void 0 && s.push(`sort=${String(r)}`), o !== void 0 && s.push(`order=${o}`), i !== void 0 && s.push(`page=${i}`), c !== void 0 && s.push(`pageSize=${c}`);
558
+ const { sortingBy: r, sortingOrder: i, currentPage: o, pageSize: c } = e;
559
+ r !== void 0 && s.push(`sort=${String(r)}`), i !== void 0 && s.push(`order=${i}`), o !== void 0 && s.push(`page=${o}`), c !== void 0 && s.push(`pageSize=${c}`);
560
560
  }
561
561
  if (t) {
562
562
  const r = Object.entries(t).filter(
563
- ([, o]) => o != null && o !== ""
564
- ).flatMap(([o, i]) => {
565
- if (Array.isArray(i))
566
- return i.map((c) => `${o}==${encodeURIComponent((c == null ? void 0 : c.id) ?? c)}`);
567
- if (typeof i == "object" && i !== null && "start" in i && "end" in i) {
563
+ ([, i]) => i != null && i !== ""
564
+ ).flatMap(([i, o]) => {
565
+ if (Array.isArray(o))
566
+ return o.map((c) => `${i}==${encodeURIComponent((c == null ? void 0 : c.id) ?? c)}`);
567
+ if (typeof o == "object" && o !== null && "start" in o && "end" in o) {
568
568
  const c = [];
569
- return i.start != null && i.start !== "" && c.push(`${o}>=${encodeURIComponent(i.start)}`), i.end != null && i.end !== "" && c.push(`${o}<=${encodeURIComponent(i.end)}`), c;
569
+ return o.start != null && o.start !== "" && c.push(`${i}>=${encodeURIComponent(o.start)}`), o.end != null && o.end !== "" && c.push(`${i}<=${encodeURIComponent(o.end)}`), c;
570
570
  }
571
- return typeof i == "object" && i !== null ? `${o}==${encodeURIComponent(i.id ?? "")}` : `${o}==${encodeURIComponent(i)}`;
571
+ return typeof o == "object" && o !== null ? `${i}==${encodeURIComponent(o.id ?? "")}` : `${i}==${encodeURIComponent(o)}`;
572
572
  });
573
573
  r.length > 0 && s.push(`filters=${r.join(",")}`);
574
574
  }
575
575
  return s.length ? `${n}?${s.join("&")}` : n;
576
- }, Z = class Z {
576
+ }, se = class se {
577
577
  /**
578
578
  * @param baseUrl the base url of the server
579
579
  * @param userKey the local storage user key
580
580
  * @param secured if the api client requires token
581
581
  * @param tokenAcquirer custom token acquirer
582
582
  */
583
- constructor(e, t = "user", s = !0, r, o = {}) {
584
- x(this, "baseUrl");
585
- x(this, "userKey");
586
- x(this, "rememberKey");
587
- x(this, "refreshTokenKey");
588
- x(this, "accessTokenExpiresAtKey");
589
- x(this, "refreshEndpoint");
590
- x(this, "refreshExpirySkewMs");
591
- x(this, "secured");
592
- x(this, "tokenAcquirer");
593
- this.baseUrl = e, this.secured = s, this.userKey = t, this.rememberKey = o.rememberKey ?? "remember", this.refreshTokenKey = o.refreshTokenKey ?? "refreshToken", this.accessTokenExpiresAtKey = o.accessTokenExpiresAtKey ?? "accessTokenExpiresAt", this.refreshEndpoint = o.refreshEndpoint ?? "auth/refresh", this.refreshExpirySkewMs = o.refreshExpirySkewMs ?? 5e3, this.tokenAcquirer = r ?? this.defaultTokenAcquirer;
583
+ 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");
593
+ 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
594
  }
595
595
  defaultTokenAcquirer(e) {
596
596
  if (e) return { credentials: "include" };
597
- const t = z(this.userKey);
597
+ const t = X(this.userKey);
598
598
  if (t && t.length) return { Authorization: `Bearer ${t}` };
599
599
  }
600
600
  getRefreshLockKey() {
@@ -605,12 +605,12 @@ const De = (n, e, t) => {
605
605
  return `${t}${s}`;
606
606
  }
607
607
  getRefreshToken() {
608
- const e = z(this.refreshTokenKey);
608
+ const e = X(this.refreshTokenKey);
609
609
  if (typeof e == "string" && e.length)
610
610
  return e;
611
611
  }
612
612
  getAccessTokenExpiresAt() {
613
- const e = z(this.accessTokenExpiresAtKey);
613
+ const e = X(this.accessTokenExpiresAtKey);
614
614
  if (typeof e == "string" && e.length)
615
615
  return e;
616
616
  }
@@ -624,12 +624,12 @@ const De = (n, e, t) => {
624
624
  return Number.isNaN(s) ? !1 : Date.now() >= s - this.refreshExpirySkewMs;
625
625
  }
626
626
  clearStoredSession() {
627
- M(this.userKey), M(this.rememberKey), M(this.refreshTokenKey), M(this.accessTokenExpiresAtKey);
627
+ D(this.userKey), D(this.rememberKey), D(this.refreshTokenKey), D(this.accessTokenExpiresAtKey);
628
628
  }
629
629
  storeSession(e, t) {
630
- B(this.userKey, e.token);
630
+ W(this.userKey, e.token);
631
631
  const s = e.refreshToken === void 0 ? t : e.refreshToken;
632
- typeof s == "string" && s.length ? B(this.refreshTokenKey, s) : M(this.refreshTokenKey), typeof e.accessTokenExpiresAt == "string" && e.accessTokenExpiresAt.length ? B(this.accessTokenExpiresAtKey, e.accessTokenExpiresAt) : M(this.accessTokenExpiresAtKey);
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);
633
633
  }
634
634
  async refreshAccessTokenWithMutex() {
635
635
  const e = this.getRefreshToken();
@@ -638,29 +638,29 @@ const De = (n, e, t) => {
638
638
  status: 401,
639
639
  message: "Missing refresh token"
640
640
  };
641
- const t = this.getRefreshLockKey(), s = Z.refreshInFlight.get(t);
641
+ const t = this.getRefreshLockKey(), s = se.refreshInFlight.get(t);
642
642
  if (s) {
643
643
  await s;
644
644
  return;
645
645
  }
646
646
  const r = (async () => {
647
- const { data: o, status: i, error: c } = await fe(
647
+ const { data: i, status: o, error: c } = await be(
648
648
  this.buildUrl(this.refreshEndpoint),
649
- I.POST,
649
+ F.POST,
650
650
  { refreshToken: e }
651
651
  );
652
- if (c || !(o != null && o.token))
652
+ if (c || !(i != null && i.token))
653
653
  throw this.clearStoredSession(), c ?? {
654
- status: i,
654
+ status: o,
655
655
  message: "Unable to refresh session"
656
656
  };
657
- this.storeSession(o, e);
657
+ this.storeSession(i, e);
658
658
  })();
659
- Z.refreshInFlight.set(t, r);
659
+ se.refreshInFlight.set(t, r);
660
660
  try {
661
661
  await r;
662
662
  } finally {
663
- Z.refreshInFlight.delete(t);
663
+ se.refreshInFlight.delete(t);
664
664
  }
665
665
  }
666
666
  isRequestOptions(e) {
@@ -673,33 +673,33 @@ const De = (n, e, t) => {
673
673
  return e ? e instanceof Headers ? Object.fromEntries(e.entries()) : Array.isArray(e) ? Object.fromEntries(e) : e : {};
674
674
  }
675
675
  mergeRequestConfig(e) {
676
- const t = this.secured ? this.tokenAcquirer() : void 0, s = this.toRequestOptions(t), r = this.toRequestOptions(e), o = {
676
+ const t = this.secured ? this.tokenAcquirer() : void 0, s = this.toRequestOptions(t), r = this.toRequestOptions(e), i = {
677
677
  ...this.toHeaderRecord(s.headers),
678
678
  ...this.toHeaderRecord(r.headers)
679
- }, i = r.credentials ?? s.credentials, c = Object.keys(o).length > 0;
680
- if (i)
681
- return c ? { headers: o, credentials: i } : { credentials: i };
682
- if (c) return o;
679
+ }, o = r.credentials ?? s.credentials, c = Object.keys(i).length > 0;
680
+ if (o)
681
+ return c ? { headers: i, credentials: o } : { credentials: o };
682
+ if (c) return i;
683
683
  }
684
684
  async makeRequestWithRefresh(e, t, s, r) {
685
685
  this.secured && this.shouldRefreshBeforeRequest() && await this.refreshAccessTokenWithMutex();
686
- let o = await fe(
686
+ let i = await be(
687
687
  this.buildUrl(e),
688
688
  t,
689
689
  s,
690
690
  this.mergeRequestConfig(r)
691
691
  );
692
- return this.secured && o.status === 401 && this.canRefresh() && (await this.refreshAccessTokenWithMutex(), o = await fe(
692
+ return this.secured && i.status === 401 && this.canRefresh() && (await this.refreshAccessTokenWithMutex(), i = await be(
693
693
  this.buildUrl(e),
694
694
  t,
695
695
  s,
696
696
  this.mergeRequestConfig(r)
697
- )), o;
697
+ )), i;
698
698
  }
699
- async doQuery(e, t = I.GET, s, r) {
699
+ async doQuery(e, t = F.GET, s, r) {
700
700
  const {
701
- data: o,
702
- status: i,
701
+ data: i,
702
+ status: o,
703
703
  error: c
704
704
  } = await this.makeRequestWithRefresh(
705
705
  e,
@@ -707,12 +707,12 @@ const De = (n, e, t) => {
707
707
  s,
708
708
  r
709
709
  );
710
- if (c || i < 200 || i >= 300)
710
+ if (c || o < 200 || o >= 300)
711
711
  throw c ?? {
712
- status: i,
713
- message: String(i)
712
+ status: o,
713
+ message: String(o)
714
714
  };
715
- return o;
715
+ return i;
716
716
  }
717
717
  /**
718
718
  * @description Get all objects
@@ -721,20 +721,20 @@ const De = (n, e, t) => {
721
721
  * @returns Result list
722
722
  */
723
723
  async get(e, t, s) {
724
- const r = De(e, t, s), {
725
- data: o,
726
- error: i,
724
+ const r = Pe(e, t, s), {
725
+ data: i,
726
+ error: o,
727
727
  status: c
728
728
  } = await this.makeRequestWithRefresh(
729
729
  r,
730
- I.GET
730
+ F.GET
731
731
  );
732
- if (i || c < 200 || c >= 300 || !o)
733
- throw i ?? {
732
+ if (o || c < 200 || c >= 300 || !i)
733
+ throw o ?? {
734
734
  status: c,
735
735
  message: String(c)
736
736
  };
737
- return o;
737
+ return i;
738
738
  }
739
739
  /**
740
740
  * @description Get entity by id
@@ -746,15 +746,15 @@ const De = (n, e, t) => {
746
746
  const {
747
747
  error: s,
748
748
  data: r,
749
- status: o
749
+ status: i
750
750
  } = await this.makeRequestWithRefresh(
751
751
  e,
752
- I.PATCH,
752
+ F.PATCH,
753
753
  t
754
754
  );
755
755
  if (s || r === null || r === void 0)
756
756
  throw s ?? {
757
- status: o,
757
+ status: i,
758
758
  message: "Unknown error"
759
759
  };
760
760
  return r;
@@ -768,15 +768,15 @@ const De = (n, e, t) => {
768
768
  const {
769
769
  error: s,
770
770
  data: r,
771
- status: o
771
+ status: i
772
772
  } = await this.makeRequestWithRefresh(
773
773
  e,
774
- I.DELETE,
774
+ F.DELETE,
775
775
  t
776
776
  );
777
777
  if (s || r === null || r === void 0)
778
778
  throw s ?? {
779
- status: o,
779
+ status: i,
780
780
  message: "Unknown error"
781
781
  };
782
782
  return r;
@@ -791,39 +791,39 @@ const De = (n, e, t) => {
791
791
  const {
792
792
  error: s,
793
793
  data: r,
794
- status: o
794
+ status: i
795
795
  } = await this.makeRequestWithRefresh(
796
796
  e,
797
- I.POST,
797
+ F.POST,
798
798
  t
799
799
  );
800
800
  if (s || r === null || r === void 0)
801
801
  throw s ?? {
802
- status: o,
802
+ status: i,
803
803
  message: "Unknown error"
804
804
  };
805
805
  return r;
806
806
  }
807
807
  };
808
- x(Z, "refreshInFlight", /* @__PURE__ */ new Map());
809
- let ue = Z;
810
- class Mt {
808
+ L(se, "refreshInFlight", /* @__PURE__ */ new Map());
809
+ let me = se;
810
+ class Kt {
811
811
  constructor(e, t = "user", s = {}) {
812
- x(this, "api");
813
- this.api = new ue(e, t, !1, void 0, s);
812
+ L(this, "api");
813
+ this.api = new me(e, t, !1, void 0, s);
814
814
  }
815
815
  async login(e) {
816
816
  const t = "auth/sign-in", s = e;
817
817
  return await this.api.doQuery(
818
818
  t,
819
- I.POST,
819
+ F.POST,
820
820
  s
821
821
  );
822
822
  }
823
823
  async refresh(e) {
824
824
  return await this.api.doQuery(
825
825
  "auth/refresh",
826
- I.POST,
826
+ F.POST,
827
827
  e
828
828
  );
829
829
  }
@@ -833,7 +833,7 @@ class Mt {
833
833
  } : void 0, r = e != null && e.refreshToken ? { refreshToken: e.refreshToken } : void 0;
834
834
  return await this.api.doQuery(
835
835
  t,
836
- I.POST,
836
+ F.POST,
837
837
  r,
838
838
  s
839
839
  );
@@ -841,23 +841,23 @@ class Mt {
841
841
  async register(e) {
842
842
  return await this.api.doQuery(
843
843
  "auth/sign-up",
844
- I.POST,
844
+ F.POST,
845
845
  e
846
846
  );
847
847
  }
848
848
  async getSession() {
849
849
  return await this.api.doQuery(
850
850
  "auth/session",
851
- I.GET,
851
+ F.GET,
852
852
  void 0,
853
853
  this.api.defaultTokenAcquirer()
854
854
  );
855
855
  }
856
856
  }
857
- class ws {
857
+ class Ts {
858
858
  constructor(e, t, s = {}) {
859
- x(this, "auth");
860
- this.auth = new Mt(e, t, s);
859
+ L(this, "auth");
860
+ this.auth = new Kt(e, t, s);
861
861
  }
862
862
  /**
863
863
  * @returns auth
@@ -866,17 +866,17 @@ class ws {
866
866
  return this.auth;
867
867
  }
868
868
  }
869
- class ks {
869
+ class Ns {
870
870
  /**
871
871
  *
872
872
  * @param table
873
873
  * @param secured to see if the api client requires jwt protection
874
874
  */
875
- constructor(e, t, s = "user", r = !0, o = {}) {
876
- x(this, "table");
877
- x(this, "secured");
878
- x(this, "api");
879
- this.table = e, this.secured = r, this.api = new ue(t, s, r, void 0, o);
875
+ constructor(e, t, s = "user", r = !0, i = {}) {
876
+ L(this, "table");
877
+ L(this, "secured");
878
+ L(this, "api");
879
+ this.table = e, this.secured = r, this.api = new me(t, s, r, void 0, i);
880
880
  }
881
881
  /**
882
882
  *
@@ -894,7 +894,7 @@ class ks {
894
894
  async insertMany(e) {
895
895
  return await this.api.doQuery(
896
896
  `${this.table}/batch`,
897
- I.POST,
897
+ F.POST,
898
898
  e
899
899
  );
900
900
  }
@@ -924,12 +924,12 @@ class ks {
924
924
  * @returns - List of elements
925
925
  */
926
926
  async export(e) {
927
- const t = De(
927
+ const t = Pe(
928
928
  `${this.table}/export`,
929
929
  void 0,
930
930
  e
931
931
  );
932
- return await this.api.doQuery(t, I.GET, void 0);
932
+ return await this.api.doQuery(t, F.GET, void 0);
933
933
  }
934
934
  /**
935
935
  *
@@ -939,7 +939,7 @@ class ks {
939
939
  async import(e) {
940
940
  return await this.api.doQuery(
941
941
  `${this.table}/import`,
942
- I.POST,
942
+ F.POST,
943
943
  e
944
944
  );
945
945
  }
@@ -951,7 +951,7 @@ class ks {
951
951
  async commonGet(e) {
952
952
  return await this.api.doQuery(
953
953
  Pt(`${this.table}/common`, e),
954
- I.GET
954
+ F.GET
955
955
  );
956
956
  }
957
957
  /**
@@ -969,12 +969,12 @@ class ks {
969
969
  return await this.api.patch(`${this.table}/restore`, e);
970
970
  }
971
971
  }
972
- class Ss {
972
+ class Es {
973
973
  constructor(e, t, s = 1) {
974
- x(this, "table");
975
- x(this, "dbName");
976
- x(this, "version");
977
- x(this, "db", null);
974
+ L(this, "table");
975
+ L(this, "dbName");
976
+ L(this, "version");
977
+ L(this, "db", null);
978
978
  this.table = e, this.dbName = t, this.version = s;
979
979
  }
980
980
  close() {
@@ -984,8 +984,8 @@ class Ss {
984
984
  return this.db ? Promise.resolve(this.db) : new Promise((e, t) => {
985
985
  const s = indexedDB.open(this.dbName, this.version);
986
986
  s.onupgradeneeded = (r) => {
987
- const o = r.target.result;
988
- o.objectStoreNames.contains(this.table) || o.createObjectStore(this.table, {
987
+ const i = r.target.result;
988
+ i.objectStoreNames.contains(this.table) || i.createObjectStore(this.table, {
989
989
  keyPath: "id",
990
990
  autoIncrement: !0
991
991
  });
@@ -1021,28 +1021,28 @@ class Ss {
1021
1021
  const s = typeof e == "number" ? t : e;
1022
1022
  if (!s)
1023
1023
  throw new Error("IndexedDBClient.update requires a value payload");
1024
- const r = typeof e == "number" ? { ...s, id: s.id ?? e } : s, o = await this.transaction("readwrite");
1025
- return await this.request(o.put(r)), r;
1024
+ const r = typeof e == "number" ? { ...s, id: s.id ?? e } : s, i = await this.transaction("readwrite");
1025
+ return await this.request(i.put(r)), r;
1026
1026
  }
1027
1027
  async get(e, t) {
1028
- var f;
1029
- const s = await this.transaction("readonly"), r = await this.request(s.getAll()), o = this.applyFilter(r, t), i = (e == null ? void 0 : e.sortingBy) ?? "id", c = ((f = e == null ? void 0 : e.sortingOrder) == null ? void 0 : f.toLowerCase()) ?? "asc";
1030
- o.sort((p, y) => {
1031
- const g = p[i], b = y[i];
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];
1032
1032
  return g < b ? c === "asc" ? -1 : 1 : g > b ? c === "asc" ? 1 : -1 : 0;
1033
1033
  });
1034
- const a = (e == null ? void 0 : e.pageSize) ?? 10, l = (e == null ? void 0 : e.currentPage) ?? 0, d = o.length, u = Math.ceil(d / a), m = o.slice(
1035
- l * a,
1036
- l * a + a
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(
1035
+ u * a,
1036
+ u * a + a
1037
1037
  );
1038
1038
  return {
1039
- sort: i,
1039
+ sort: o,
1040
1040
  order: c,
1041
- currentPage: l,
1041
+ currentPage: u,
1042
1042
  pageSize: a,
1043
- totalElements: d,
1044
- totalPages: u,
1045
- items: m
1043
+ totalElements: l,
1044
+ totalPages: d,
1045
+ items: h
1046
1046
  };
1047
1047
  }
1048
1048
  async export(e) {
@@ -1069,8 +1069,8 @@ class Ss {
1069
1069
  const t = await this.transaction("readwrite");
1070
1070
  let s = 0;
1071
1071
  for (const r of e) {
1072
- const o = await this.request(t.get(r));
1073
- o && (await this.request(t.put({ ...o, deletedAt: /* @__PURE__ */ new Date() })), s++);
1072
+ const i = await this.request(t.get(r));
1073
+ i && (await this.request(t.put({ ...i, deletedAt: /* @__PURE__ */ new Date() })), s++);
1074
1074
  }
1075
1075
  return s;
1076
1076
  }
@@ -1078,17 +1078,17 @@ class Ss {
1078
1078
  const t = await this.transaction("readwrite");
1079
1079
  let s = 0;
1080
1080
  for (const r of e) {
1081
- const o = await this.request(t.get(r));
1082
- o && (await this.request(t.put({ ...o, deletedAt: null })), s++);
1081
+ const i = await this.request(t.get(r));
1082
+ i && (await this.request(t.put({ ...i, deletedAt: null })), s++);
1083
1083
  }
1084
1084
  return s;
1085
1085
  }
1086
1086
  applyFilter(e, t) {
1087
1087
  return t ? e.filter(
1088
1088
  (s) => Object.entries(t).every(
1089
- ([r, o]) => this.matchesFilterValue(
1089
+ ([r, i]) => this.matchesFilterValue(
1090
1090
  r,
1091
- o,
1091
+ i,
1092
1092
  s[r]
1093
1093
  )
1094
1094
  )
@@ -1103,13 +1103,13 @@ class Ss {
1103
1103
  return s === t;
1104
1104
  }
1105
1105
  }
1106
- function vs(n) {
1106
+ function $s(n) {
1107
1107
  return Object.keys(n).filter((e) => isNaN(Number(e))).map((e) => ({
1108
1108
  key: e,
1109
1109
  value: n[e]
1110
1110
  }));
1111
1111
  }
1112
- const z = (n, e = "") => {
1112
+ const X = (n, e = "") => {
1113
1113
  const t = localStorage.getItem(n) ?? void 0;
1114
1114
  if (t && e.length)
1115
1115
  switch (e) {
@@ -1123,11 +1123,11 @@ const z = (n, e = "") => {
1123
1123
  return t;
1124
1124
  }
1125
1125
  return t;
1126
- }, B = (n, e) => localStorage.setItem(
1126
+ }, W = (n, e) => localStorage.setItem(
1127
1127
  n,
1128
1128
  typeof e == "object" ? JSON.stringify(e) : e
1129
- ), M = (n) => localStorage.removeItem(n);
1130
- function Cs(n) {
1129
+ ), D = (n) => localStorage.removeItem(n);
1130
+ function xs(n) {
1131
1131
  const e = n ? new Date(n) : /* @__PURE__ */ new Date(), t = {
1132
1132
  weekday: "long",
1133
1133
  // martes
@@ -1149,91 +1149,91 @@ function Cs(n) {
1149
1149
  t
1150
1150
  );
1151
1151
  }
1152
- function Ts(n) {
1153
- const e = n ? new Date(n) : /* @__PURE__ */ new Date(), t = String(e.getDate()).padStart(2, "0"), s = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getFullYear()).slice(-2), o = String(e.getHours()).padStart(2, "0"), i = String(e.getMinutes()).padStart(2, "0");
1154
- return `${t}/${s}/${r} ${o}:${i}`;
1152
+ function As(n) {
1153
+ const e = n ? new Date(n) : /* @__PURE__ */ new Date(), t = String(e.getDate()).padStart(2, "0"), s = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getFullYear()).slice(-2), i = String(e.getHours()).padStart(2, "0"), o = String(e.getMinutes()).padStart(2, "0");
1154
+ return `${t}/${s}/${r} ${i}:${o}`;
1155
1155
  }
1156
- function Ns(n) {
1157
- const e = n ? new Date(n) : /* @__PURE__ */ new Date(), t = e.getFullYear(), s = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getDate()).padStart(2, "0"), o = String(e.getHours()).padStart(2, "0"), i = String(e.getMinutes()).padStart(2, "0");
1158
- return `${t}-${s}-${r}T${o}:${i}`;
1156
+ function Ls(n) {
1157
+ const e = n ? new Date(n) : /* @__PURE__ */ new Date(), t = e.getFullYear(), s = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getDate()).padStart(2, "0"), i = String(e.getHours()).padStart(2, "0"), o = String(e.getMinutes()).padStart(2, "0");
1158
+ return `${t}-${s}-${r}T${i}:${o}`;
1159
1159
  }
1160
- const Dt = () => {
1160
+ const qt = () => {
1161
1161
  var t;
1162
1162
  const n = navigator, e = ((t = n == null ? void 0 : n.userAgentData) == null ? void 0 : t.platform) || (n == null ? void 0 : n.platform) || "";
1163
1163
  return /Mac|iPhone|iPod|iPad/i.test(e);
1164
1164
  };
1165
- function de(n) {
1165
+ function he(n) {
1166
1166
  if (!n || typeof n != "object") return !1;
1167
1167
  const e = n;
1168
1168
  return Array.isArray(e.errors) && e.errors.every(
1169
1169
  (t) => Array.isArray(t) && t.length === 2 && typeof t[0] == "string"
1170
1170
  );
1171
1171
  }
1172
- function me(n) {
1172
+ function fe(n) {
1173
1173
  if (!n || typeof n != "object") return !1;
1174
1174
  const e = n;
1175
1175
  return typeof (e == null ? void 0 : e.status) == "number" && typeof (e == null ? void 0 : e.message) == "string";
1176
1176
  }
1177
- function Es(n, e) {
1177
+ function _s(n, e) {
1178
1178
  return n != null && n.errors ? n.errors.map(([t, s]) => e(t, s)) : [];
1179
1179
  }
1180
- const Fe = te(
1180
+ const Ke = re(
1181
1181
  void 0
1182
1182
  );
1183
- function $s(n) {
1184
- const { children: e } = n, t = H(0), [s, r] = Ae(
1185
- (m, f) => {
1186
- const { type: p, items: y, id: g } = f;
1187
- switch (p) {
1183
+ 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) {
1188
1188
  case "set":
1189
1189
  return y ?? [];
1190
1190
  case "remove":
1191
- return g !== void 0 ? m.filter((b) => b.id !== g) : [];
1191
+ return g !== void 0 ? h.filter((b) => b.id !== g) : [];
1192
1192
  }
1193
- return m;
1193
+ return h;
1194
1194
  },
1195
1195
  [],
1196
1196
  () => []
1197
- ), o = (m) => m.map((f) => ({ ...f, id: t.current++ })), i = w(
1198
- (m) => r({
1197
+ ), i = (h) => h.map((m) => ({ ...m, id: t.current++ })), o = w(
1198
+ (h) => r({
1199
1199
  type: "set",
1200
- items: o([{ ...m, type: R.error }])
1200
+ items: i([{ ...h, type: R.error }])
1201
1201
  }),
1202
1202
  []
1203
1203
  ), c = w(
1204
- (m) => r({ type: "set", items: o([{ ...m }]) }),
1204
+ (h) => r({ type: "set", items: i([{ ...h }]) }),
1205
1205
  []
1206
1206
  ), a = w(
1207
- (m) => r({ type: "set", items: o(m) }),
1207
+ (h) => r({ type: "set", items: i(h) }),
1208
1208
  []
1209
- ), l = w(
1210
- (m) => r({
1209
+ ), u = w(
1210
+ (h) => r({
1211
1211
  type: "set",
1212
- items: o([{ ...m, type: R.success }])
1212
+ items: i([{ ...h, type: R.success }])
1213
1213
  }),
1214
1214
  []
1215
- ), d = (m) => r({ type: "remove", id: m }), u = Q(() => ({
1215
+ ), l = (h) => r({ type: "remove", id: h }), d = H(() => ({
1216
1216
  notification: s,
1217
- removeNotification: d,
1218
- showErrorNotification: i,
1217
+ removeNotification: l,
1218
+ showErrorNotification: o,
1219
1219
  showNotification: c,
1220
- showSuccessNotification: l,
1220
+ showSuccessNotification: u,
1221
1221
  showStackNotifications: a
1222
1222
  }), [
1223
1223
  s,
1224
- i,
1224
+ o,
1225
1225
  c,
1226
1226
  a,
1227
- l
1227
+ u
1228
1228
  ]);
1229
- return /* @__PURE__ */ h(Fe.Provider, { value: u, children: e });
1229
+ return /* @__PURE__ */ p(Ke.Provider, { value: d, children: e });
1230
1230
  }
1231
- const J = () => {
1232
- const n = se(Fe);
1231
+ const ee = () => {
1232
+ const n = ie(Ke);
1233
1233
  if (!n)
1234
1234
  throw new Error("NotificationContext must be used within a Provider");
1235
1235
  return n;
1236
- }, Oe = () => new Ct({
1236
+ }, qe = () => new xt({
1237
1237
  defaultOptions: {
1238
1238
  queries: {
1239
1239
  refetchInterval: !1,
@@ -1245,102 +1245,102 @@ const J = () => {
1245
1245
  // default: true
1246
1246
  }
1247
1247
  }
1248
- }), xs = Oe(), Ke = te(
1248
+ }), Is = qe(), Ue = re(
1249
1249
  void 0
1250
- ), As = (n) => {
1251
- const { children: e, manager: t, queryClient: s } = n, [r] = A(Oe), o = s ?? r;
1252
- return /* @__PURE__ */ h(Ke.Provider, { value: { client: t }, children: /* @__PURE__ */ h(Tt, { client: o, children: e }) });
1253
- }, Ft = () => {
1254
- const n = se(Ke);
1250
+ ), 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 }) });
1253
+ }, Ut = () => {
1254
+ const n = ie(Ue);
1255
1255
  if (!n)
1256
1256
  throw new Error("managerContext must be used within a Provider");
1257
1257
  return n.client;
1258
- }, qe = te(
1258
+ }, je = re(
1259
1259
  void 0
1260
- ), Ls = (n) => {
1260
+ ), Os = (n) => {
1261
1261
  const {
1262
1262
  children: e,
1263
1263
  guestMode: t = "guest_mode",
1264
1264
  user: s = "user",
1265
1265
  remember: r = "remember",
1266
- refreshTokenKey: o = "refreshToken",
1267
- accessTokenExpiresAtKey: i = "accessTokenExpiresAt"
1268
- } = n, c = Ft(), [a, l] = A({}), d = w(() => {
1269
- M(s), M(r), M(o), M(i);
1270
- }, [i, o, r, s]), u = w(() => !!z(t, "boolean") && a.token === void 0, [a.token, t]), m = w(
1266
+ refreshTokenKey: i = "refreshToken",
1267
+ 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(
1271
1271
  (b) => {
1272
- B(t, b);
1272
+ W(t, b);
1273
1273
  },
1274
1274
  [t]
1275
- ), f = w(
1276
- (b, T) => {
1275
+ ), m = w(
1276
+ (b, k) => {
1277
1277
  if (!b) return;
1278
- const N = z(r, "boolean"), C = T ?? (typeof N == "boolean" ? N : !1);
1279
- l(b), M(t), B(s, b.token), B(r, C), typeof b.refreshToken == "string" && b.refreshToken.length ? B(o, b.refreshToken) : M(o), typeof b.accessTokenExpiresAt == "string" && b.accessTokenExpiresAt.length ? B(i, b.accessTokenExpiresAt) : M(i);
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);
1280
1280
  },
1281
- [i, t, o, r, s]
1282
- ), p = w(async () => {
1283
- const b = z(s) ?? a.token, T = z(o) ?? (typeof a.refreshToken == "string" ? a.refreshToken : void 0);
1281
+ [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);
1284
1284
  try {
1285
1285
  await c.Auth.logout({
1286
1286
  accessToken: b,
1287
- refreshToken: T
1287
+ refreshToken: k
1288
1288
  });
1289
- } catch (N) {
1290
- console.error(N);
1289
+ } catch (E) {
1290
+ console.error(E);
1291
1291
  }
1292
- l({}), d();
1292
+ u({}), l();
1293
1293
  }, [
1294
1294
  a.refreshToken,
1295
1295
  a.token,
1296
- d,
1296
+ l,
1297
1297
  c.Auth,
1298
- o,
1298
+ i,
1299
1299
  s
1300
1300
  ]), y = w(async () => {
1301
1301
  try {
1302
1302
  const b = await c.Auth.getSession();
1303
- f(b);
1303
+ m(b);
1304
1304
  } catch (b) {
1305
- console.error(b), p();
1305
+ console.error(b), f();
1306
1306
  }
1307
- }, [f, p, c.Auth]), g = Q(() => ({
1307
+ }, [m, f, c.Auth]), g = H(() => ({
1308
1308
  account: a,
1309
- logUser: f,
1310
- logoutUser: p,
1309
+ logUser: m,
1310
+ logoutUser: f,
1311
1311
  logUserFromLocal: y,
1312
- isInGuestMode: u,
1313
- setGuestMode: m
1312
+ isInGuestMode: d,
1313
+ setGuestMode: h
1314
1314
  }), [
1315
1315
  a,
1316
+ m,
1316
1317
  f,
1317
- p,
1318
1318
  y,
1319
- u,
1320
- m
1319
+ d,
1320
+ h
1321
1321
  ]);
1322
- return /* @__PURE__ */ h(qe.Provider, { value: g, children: e });
1323
- }, Ue = () => {
1324
- const n = se(qe);
1322
+ return /* @__PURE__ */ p(je.Provider, { value: g, children: e });
1323
+ }, Qe = () => {
1324
+ const n = ie(je);
1325
1325
  if (!n) throw new Error("authContext must be used within a Provider");
1326
1326
  return n;
1327
- }, je = te({}), _s = (n) => {
1328
- const { children: e, location: t, navigate: s, linkComponent: r, searchComponent: o } = n;
1329
- return /* @__PURE__ */ h(
1330
- je.Provider,
1327
+ }, He = re({}), Ms = (n) => {
1328
+ const { children: e, location: t, navigate: s, linkComponent: r, searchComponent: i } = n;
1329
+ return /* @__PURE__ */ p(
1330
+ He.Provider,
1331
1331
  {
1332
- value: { location: t, navigate: s, linkComponent: r, searchComponent: o },
1332
+ value: { location: t, navigate: s, linkComponent: r, searchComponent: i },
1333
1333
  children: e
1334
1334
  }
1335
1335
  );
1336
- }, ae = () => {
1337
- const n = se(je);
1336
+ }, ce = () => {
1337
+ const n = ie(He);
1338
1338
  if (n === void 0 || Object.keys(n).length === 0)
1339
1339
  throw new Error(
1340
1340
  "Config provider has not been set. This step is required and cannot be skipped."
1341
1341
  );
1342
1342
  return n;
1343
- }, Ot = {
1343
+ }, jt = {
1344
1344
  addChildItem: () => {
1345
1345
  },
1346
1346
  removeChildItem: () => {
@@ -1348,66 +1348,66 @@ const J = () => {
1348
1348
  clearDynamicItems: () => {
1349
1349
  },
1350
1350
  dynamicItems: {}
1351
- }, He = te(
1352
- Ot
1353
- ), Rs = (n) => {
1354
- const { children: e } = n, [t, s] = A({}), r = w(
1355
- (a, l) => s((d) => ({
1356
- ...d,
1357
- [a]: [...d[a] ?? [], l]
1351
+ }, Ve = re(
1352
+ jt
1353
+ ), Ds = (n) => {
1354
+ const { children: e } = n, [t, s] = _({}), r = w(
1355
+ (a, u) => s((l) => ({
1356
+ ...l,
1357
+ [a]: [...l[a] ?? [], u]
1358
1358
  })),
1359
1359
  []
1360
- ), o = w(
1361
- (a, l) => s((d) => ({
1362
- ...d,
1363
- [a]: (d[a] ?? []).filter((u, m) => m !== l)
1360
+ ), i = w(
1361
+ (a, u) => s((l) => ({
1362
+ ...l,
1363
+ [a]: (l[a] ?? []).filter((d, h) => h !== u)
1364
1364
  })),
1365
1365
  []
1366
- ), i = w((a) => {
1367
- s(a ? (l) => ({
1368
- ...l,
1366
+ ), o = w((a) => {
1367
+ s(a ? (u) => ({
1368
+ ...u,
1369
1369
  [a]: []
1370
1370
  }) : {});
1371
- }, []), c = Q(
1371
+ }, []), c = H(
1372
1372
  () => ({
1373
1373
  dynamicItems: t,
1374
1374
  addChildItem: r,
1375
- removeChildItem: o,
1376
- clearDynamicItems: i
1375
+ removeChildItem: i,
1376
+ clearDynamicItems: o
1377
1377
  }),
1378
- [t, i, o, r]
1378
+ [t, o, i, r]
1379
1379
  );
1380
- return /* @__PURE__ */ h(
1381
- He.Provider,
1380
+ return /* @__PURE__ */ p(
1381
+ Ve.Provider,
1382
1382
  {
1383
1383
  value: c,
1384
1384
  children: e
1385
1385
  }
1386
1386
  );
1387
- }, Kt = () => se(He);
1388
- function Is(n) {
1389
- const { t: e } = v(), { open: t, onClose: s, menuMap: r, logo: o } = n, { account: i } = Ue(), { dynamicItems: c } = Kt(), { linkComponent: a, location: l } = ae(), d = a, u = Q(() => r.filter((g) => {
1390
- const b = g.auth, T = !!(i != null && i.email);
1391
- return b == null || b && T || !b && !T;
1392
- }), [i == null ? void 0 : i.email, r]), m = w(
1387
+ }, Qt = () => ie(Ve);
1388
+ 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(
1393
1393
  (g) => {
1394
1394
  g.key === "Escape" && t && s();
1395
1395
  },
1396
1396
  [s, t]
1397
1397
  );
1398
- O(() => (document.addEventListener("keydown", m), () => {
1399
- document.removeEventListener("keydown", m);
1400
- }), [m]);
1401
- const f = w(
1402
- (g, b) => b ? g === `${l.pathname}${l.search}` : g === l.pathname,
1403
- [l.pathname, l.search]
1404
- ), p = w(
1405
- (g) => /* @__PURE__ */ h(
1398
+ O(() => (document.addEventListener("keydown", h), () => {
1399
+ document.removeEventListener("keydown", h);
1400
+ }), [h]);
1401
+ const m = w(
1402
+ (g, b) => b ? g === `${u.pathname}${u.search}` : g === u.pathname,
1403
+ [u.pathname, u.search]
1404
+ ), f = w(
1405
+ (g) => /* @__PURE__ */ p(
1406
1406
  "li",
1407
1407
  {
1408
- className: `drawer-list-item-child ${f(g.path, !0) ? "active" : ""} animated`,
1409
- children: g.path ? /* @__PURE__ */ h(
1410
- d,
1408
+ className: `drawer-list-item-child ${m(g.path, !0) ? "active" : ""} animated`,
1409
+ children: g.path ? /* @__PURE__ */ p(
1410
+ l,
1411
1411
  {
1412
1412
  tabIndex: t ? 0 : -1,
1413
1413
  to: g.path ?? "/",
@@ -1421,15 +1421,15 @@ function Is(n) {
1421
1421
  },
1422
1422
  g.id
1423
1423
  ),
1424
- [d, t, e, f]
1425
- ), y = Q(() => u.map((g, b) => {
1426
- const T = g.page ?? String(b), N = `drawer-list-item ${f(g.path) ? "active" : ""} animated`;
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`;
1427
1427
  if (g.type === "divider")
1428
- return /* @__PURE__ */ h("li", { className: N, children: /* @__PURE__ */ h("hr", { className: "drawer-divider" }) }, T);
1429
- const C = g.children ?? (g.page && c ? c[g.page] : null);
1430
- return /* @__PURE__ */ k("li", { className: N, children: [
1431
- /* @__PURE__ */ k(
1432
- d,
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(
1432
+ l,
1433
1433
  {
1434
1434
  tabIndex: t ? 0 : -1,
1435
1435
  to: g.path ?? "/",
@@ -1443,89 +1443,89 @@ function Is(n) {
1443
1443
  ]
1444
1444
  }
1445
1445
  ),
1446
- C && /* @__PURE__ */ h("ul", { className: "drawer-children-list", children: C.map(p) })
1447
- ] }, T);
1448
- }), [d, c, f, t, u, p, e]);
1449
- return /* @__PURE__ */ h(
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(
1450
1450
  "div",
1451
1451
  {
1452
1452
  "aria-label": e("_accessibility:ariaLabels.closeMenu"),
1453
1453
  "aria-disabled": !t,
1454
1454
  className: `${t ? "opened" : "closed"} drawer-backdrop`,
1455
1455
  onClick: () => s(),
1456
- children: /* @__PURE__ */ k("aside", { className: `${t ? "opened" : "closed"} drawer animated`, children: [
1457
- /* @__PURE__ */ k("div", { className: "drawer-header-container", children: [
1458
- o,
1459
- /* @__PURE__ */ h("h2", { className: "drawer-header poppins", children: e("_pages:home.appName") })
1456
+ children: /* @__PURE__ */ S("aside", { className: `${t ? "opened" : "closed"} drawer animated`, children: [
1457
+ /* @__PURE__ */ S("div", { className: "drawer-header-container", children: [
1458
+ i,
1459
+ /* @__PURE__ */ p("h2", { className: "drawer-header poppins", children: e("_pages:home.appName") })
1460
1460
  ] }),
1461
- /* @__PURE__ */ h("ul", { className: "drawer-menu-list", children: y })
1461
+ /* @__PURE__ */ p("ul", { className: "drawer-menu-list", children: y })
1462
1462
  ] })
1463
1463
  }
1464
1464
  );
1465
1465
  }
1466
- const V = ({ icon: n, ...e }) => /* @__PURE__ */ h(nt, { icon: /* @__PURE__ */ h(F, { icon: n }), ...e });
1467
- var pe, Ee;
1468
- function qt() {
1469
- if (Ee) return pe;
1470
- Ee = 1;
1471
- const n = (c, a = "local", l = void 0) => {
1466
+ const G = ({ icon: n, ...e }) => /* @__PURE__ */ p(ct, { icon: /* @__PURE__ */ p(P, { icon: n }), ...e });
1467
+ var we, $e;
1468
+ function Ht() {
1469
+ if ($e) return we;
1470
+ $e = 1;
1471
+ const n = (c, a = "local", u = void 0) => {
1472
1472
  if (a === "local") {
1473
1473
  if (localStorage.getItem(c) !== void 0 && localStorage.getItem(c) !== "undefined" && localStorage.getItem(c) !== null)
1474
- return l === void 0 || l !== void 0 && localStorage.getItem(c) === l;
1474
+ return u === void 0 || u !== void 0 && localStorage.getItem(c) === u;
1475
1475
  } else if (a === "session" && sessionStorage.getItem(c) !== void 0 && sessionStorage.getItem(c) !== "undefined" && sessionStorage.getItem(c) !== null)
1476
- return l === void 0 || l !== void 0 && sessionStorage.getItem(c) === l;
1476
+ return u === void 0 || u !== void 0 && sessionStorage.getItem(c) === u;
1477
1477
  return !1;
1478
1478
  }, e = (c) => {
1479
1479
  const a = {};
1480
- return c.substring(1).split("&").forEach((d) => {
1481
- const [u, m] = d.split("=");
1482
- a[u] = m;
1480
+ return c.substring(1).split("&").forEach((l) => {
1481
+ const [d, h] = l.split("=");
1482
+ a[d] = h;
1483
1483
  }), a;
1484
1484
  }, t = (c = "") => {
1485
- if (o(c) && c.length) return o(c);
1485
+ if (i(c) && c.length) return i(c);
1486
1486
  {
1487
1487
  let a = navigator.language || navigator.userLanguage;
1488
1488
  if (a.indexOf("en") < 0 && a.indexOf("es") < 0 && (a = "en-US"), a = a.split("-")[0], a)
1489
1489
  return c.length && r(c, 730, a), a;
1490
1490
  }
1491
1491
  return "en";
1492
- }, s = (c = 0, a = 0, l = window, d = "smooth") => l.scroll({
1492
+ }, s = (c = 0, a = 0, u = window, l = "smooth") => u.scroll({
1493
1493
  top: c,
1494
1494
  left: a,
1495
- behavior: d
1496
- }), r = (c, a, l, d = "/", u = "Lax") => {
1497
- var m = /* @__PURE__ */ new Date();
1498
- m.setTime(m.getTime() + a * 24 * 60 * 60 * 1e3);
1499
- const f = "; expires=" + m.toUTCString();
1500
- document.cookie = `${c}=${l || ""}${f};path=${d};SameSite=${u}`;
1501
- }, o = (c) => {
1502
- const a = `${c}=`, d = decodeURIComponent(document.cookie).split(";");
1503
- for (let u = 0; u < d.length; u += 1) {
1504
- let m = d[u];
1505
- for (; m.charAt(0) === " "; )
1506
- m = m.substring(1);
1507
- if (m.indexOf(a) === 0)
1508
- return m.substring(a.length, m.length);
1495
+ behavior: l
1496
+ }), 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}`;
1501
+ }, i = (c) => {
1502
+ const a = `${c}=`, l = decodeURIComponent(document.cookie).split(";");
1503
+ 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);
1509
1509
  }
1510
1510
  return "";
1511
1511
  };
1512
- return pe = {
1513
- getCookie: o,
1512
+ return we = {
1513
+ getCookie: i,
1514
1514
  createCookie: r,
1515
1515
  deleteCookie: (c) => document.cookie = `${c}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`,
1516
1516
  getUserLanguage: t,
1517
1517
  scrollTo: s,
1518
1518
  parseQueries: e,
1519
1519
  validation: n
1520
- }, pe;
1520
+ }, we;
1521
1521
  }
1522
- var Ut = qt();
1523
- function Ps() {
1524
- const { t: n, language: e } = v();
1522
+ var Vt = Ht();
1523
+ function Ks() {
1524
+ const { t: n, language: e } = T();
1525
1525
  return { timeAge: w(
1526
1526
  (s) => {
1527
- const o = /* @__PURE__ */ new Date() - s, i = Math.floor(o / (1e3 * 60)), c = Math.floor(i / 60), a = e === "es", l = n("_accessibility:labels.ago"), d = n("_accessibility:labels.minute"), u = n("_accessibility:labels.minutes"), m = n("_accessibility:labels.hour"), f = n("_accessibility:labels.hours"), p = n("_accessibility:labels.yesterday"), y = n("_accessibility:labels.justNow");
1528
- return o < 1e3 * 60 ? y : i < 60 ? `${a ? l : ""} ${i} ${i === 1 ? d : u} ${a ? "" : l}` : c < 24 ? `${a ? l : ""} ${c} ${c === 1 ? m : f} ${a ? "" : l}` : c < 48 ? p : s.toLocaleDateString(navigator.language || "es-ES", {
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", {
1529
1529
  day: "2-digit",
1530
1530
  month: "2-digit",
1531
1531
  year: "numeric"
@@ -1534,257 +1534,257 @@ function Ps() {
1534
1534
  [n, e]
1535
1535
  ) };
1536
1536
  }
1537
- const Qe = (n) => {
1538
- const { showSuccessNotification: e } = J(), { mutationFn: t, onError: s, onSuccess: r, onSuccessMessage: o } = n, [i, c] = A([]), { open: a, handleClose: l, handleOpen: d } = Be(), u = () => {
1539
- l(), c([]);
1540
- }, m = async (p) => {
1541
- c(p), d();
1542
- }, f = ie({
1537
+ 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 = () => {
1539
+ u(), c([]);
1540
+ }, h = async (f) => {
1541
+ c(f), l();
1542
+ }, m = Z({
1543
1543
  mutationFn: () => t(
1544
- Array.isArray(i) ? i : [i]
1544
+ Array.isArray(o) ? o : [o]
1545
1545
  ),
1546
- onError: (p) => {
1547
- console.error(p), s && s(p), u();
1546
+ onError: (f) => {
1547
+ console.error(f), s && s(f), d();
1548
1548
  },
1549
- onSuccess: async (p) => {
1550
- r && r(p), e({
1551
- message: o
1552
- }), u();
1549
+ onSuccess: async (f) => {
1550
+ r && r(f), e({
1551
+ message: i
1552
+ }), d();
1553
1553
  }
1554
1554
  });
1555
- return { open: a, onClick: m, close: u, dialogFn: f, isLoading: f.isPending };
1556
- }, Ms = (n) => {
1557
- const { t: e } = v(), {
1555
+ return { open: a, onClick: h, close: d, dialogFn: m, isLoading: m.isPending };
1556
+ }, qs = (n) => {
1557
+ const { t: e } = T(), {
1558
1558
  showStackNotifications: t,
1559
1559
  showSuccessNotification: s,
1560
1560
  showErrorNotification: r
1561
- } = J(), o = ne(), {
1562
- defaultValues: i,
1561
+ } = ee(), i = J(), {
1562
+ defaultValues: o,
1563
1563
  mutationFn: c,
1564
1564
  formToDto: a,
1565
- onError: l,
1566
- onSuccess: d,
1567
- queryKey: u,
1568
- onSuccessMessage: m
1569
- } = n, { control: f, handleSubmit: p, reset: y, setError: g, getValues: b, setValue: T } = Pe({
1570
- defaultValues: i
1571
- }), N = H(null), C = w(() => {
1572
- const S = document.activeElement;
1573
- if (!(S instanceof HTMLElement)) {
1574
- N.current = null;
1565
+ onError: u,
1566
+ onSuccess: l,
1567
+ queryKey: d,
1568
+ onSuccessMessage: h
1569
+ } = n, { control: m, handleSubmit: f, reset: y, setError: g, getValues: b, setValue: k } = Me({
1570
+ defaultValues: o
1571
+ }), E = K(null), N = w(() => {
1572
+ const v = document.activeElement;
1573
+ if (!(v instanceof HTMLElement)) {
1574
+ E.current = null;
1575
1575
  return;
1576
1576
  }
1577
- N.current = S.closest("form");
1578
- }, []), D = w(
1579
- (S) => {
1580
- const _ = S == null ? void 0 : S.errors, E = [], P = N.current;
1581
- if (!P) return E;
1582
- let ce = !1;
1583
- return _ && _.forEach(([Y, he]) => {
1584
- const G = P.querySelector(`[name="${Y}"]`);
1585
- (G instanceof HTMLInputElement || G instanceof HTMLTextAreaElement || G instanceof HTMLSelectElement) && (ce || (G.focus(), ce = !0), G.classList.add("error"), E.push(e(`_entities:${u}.${Y}.${he}`)));
1586
- }), E;
1577
+ E.current = v.closest("form");
1578
+ }, []), $ = w(
1579
+ (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;
1587
1587
  },
1588
- [e, u]
1589
- ), q = w(() => {
1590
- const S = N.current;
1591
- if (!S) return;
1592
- S.querySelectorAll("input, textarea, select").forEach((E) => {
1593
- E.classList.remove("error");
1588
+ [e, d]
1589
+ ), j = w(() => {
1590
+ const v = E.current;
1591
+ if (!v) return;
1592
+ v.querySelectorAll("input, textarea, select").forEach((x) => {
1593
+ x.classList.remove("error");
1594
1594
  });
1595
- }, []), L = ie(
1595
+ }, []), I = Z(
1596
1596
  {
1597
1597
  mutationFn: c,
1598
- onError: (S) => {
1599
- console.error(S);
1600
- const _ = S;
1601
- if (l) l(S);
1602
- else if (de(_)) {
1603
- const E = D(_);
1598
+ onError: (v) => {
1599
+ console.error(v);
1600
+ const A = v;
1601
+ if (u) u(v);
1602
+ else if (he(A)) {
1603
+ const x = $(A);
1604
1604
  t(
1605
- E.map(
1606
- (P) => ({
1607
- message: P,
1605
+ x.map(
1606
+ (q) => ({
1607
+ message: q,
1608
1608
  type: R.error
1609
1609
  })
1610
1610
  )
1611
1611
  );
1612
- } else if (me(_)) {
1613
- const E = _.message || e("_accessibility:errors.500"), P = e(`_accessibility:errors.${_.status}`);
1614
- r({ message: P || E });
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 });
1615
1615
  } else
1616
1616
  r({ message: e("_accessibility:errors.500") });
1617
1617
  },
1618
- onSuccess: async (S) => {
1619
- await o.invalidateQueries({ queryKey: u }), d && d(S), m && s({
1620
- message: m
1618
+ onSuccess: async (v) => {
1619
+ await i.invalidateQueries({ queryKey: d }), l && l(v), h && s({
1620
+ message: h
1621
1621
  });
1622
1622
  }
1623
1623
  }
1624
1624
  );
1625
1625
  return {
1626
- control: f,
1626
+ control: m,
1627
1627
  getValues: b,
1628
- setValue: T,
1629
- handleSubmit: p,
1630
- onSubmit: (S) => {
1631
- C(), q(), L.mutate(
1632
- a ? a(S) : S
1628
+ setValue: k,
1629
+ handleSubmit: f,
1630
+ onSubmit: (v) => {
1631
+ N(), j(), I.mutate(
1632
+ a ? a(v) : v
1633
1633
  );
1634
1634
  },
1635
1635
  reset: y,
1636
1636
  setError: g,
1637
- isLoading: L.isPending
1637
+ isLoading: I.isPending
1638
1638
  };
1639
- }, jt = (n) => {
1640
- const { t: e } = v(), {
1639
+ }, Bt = (n) => {
1640
+ const { t: e } = T(), {
1641
1641
  onClick: t,
1642
- icon: s = mt,
1642
+ icon: s = yt,
1643
1643
  sticky: r = !0,
1644
- hidden: o = !1,
1645
- multiple: i = !0,
1644
+ hidden: i = !1,
1645
+ multiple: o = !0,
1646
1646
  disabled: c = !1,
1647
- id: a = W.Delete,
1648
- tooltip: l = e("_pages:common.actions.delete.text")
1647
+ id: a = z.Delete,
1648
+ tooltip: u = e("_pages:common.actions.delete.text")
1649
1649
  } = n;
1650
1650
  return {
1651
1651
  action: w(
1652
- (u) => ({
1652
+ (d) => ({
1653
1653
  id: a,
1654
1654
  sticky: r,
1655
- tooltip: l,
1656
- multiple: i,
1657
- onClick: () => t([u == null ? void 0 : u.id]),
1658
- hidden: !!u.deletedAt || o,
1659
- disabled: !!u.deletedAt || c,
1660
- icon: /* @__PURE__ */ h(F, { className: "text-bg-error", icon: s }),
1661
- onMultipleClick: (m) => t(m.map((f) => f.id))
1655
+ tooltip: u,
1656
+ multiple: o,
1657
+ onClick: () => t([d == null ? void 0 : d.id]),
1658
+ hidden: !!d.deletedAt || i,
1659
+ disabled: !!d.deletedAt || c,
1660
+ icon: /* @__PURE__ */ p(P, { className: "text-bg-error", icon: s }),
1661
+ onMultipleClick: (h) => t(h.map((m) => m.id))
1662
1662
  }),
1663
- [c, o, s, a, i, t, r, l]
1663
+ [c, i, s, a, o, t, r, u]
1664
1664
  )
1665
1665
  };
1666
- }, Ht = (n) => {
1667
- const { t: e } = v(), {
1666
+ }, Wt = (n) => {
1667
+ const { t: e } = T(), {
1668
1668
  onClick: t,
1669
1669
  sticky: s = !0,
1670
1670
  hidden: r = !1,
1671
- disabled: o = !1,
1672
- multiple: i = !1,
1673
- icon: c = _e,
1674
- id: a = W.Restore,
1675
- tooltip: l = e("_pages:common.actions.restore.text")
1671
+ disabled: i = !1,
1672
+ multiple: o = !1,
1673
+ icon: c = Re,
1674
+ id: a = z.Restore,
1675
+ tooltip: u = e("_pages:common.actions.restore.text")
1676
1676
  } = n;
1677
1677
  return {
1678
1678
  action: w(
1679
- (u) => ({
1679
+ (d) => ({
1680
1680
  id: a,
1681
1681
  sticky: s,
1682
- tooltip: l,
1683
- multiple: i,
1684
- onClick: () => t([u == null ? void 0 : u.id]),
1685
- hidden: !u.deletedAt || r,
1686
- disabled: !u.deletedAt || o,
1687
- icon: /* @__PURE__ */ h(F, { className: "text-bg-error", icon: c }),
1688
- onMultipleClick: (m) => t(m.map((f) => f.id))
1682
+ tooltip: u,
1683
+ multiple: o,
1684
+ onClick: () => t([d == null ? void 0 : d.id]),
1685
+ hidden: !d.deletedAt || r,
1686
+ disabled: !d.deletedAt || i,
1687
+ icon: /* @__PURE__ */ p(P, { className: "text-bg-error", icon: c }),
1688
+ onMultipleClick: (h) => t(h.map((m) => m.id))
1689
1689
  }),
1690
- [o, r, c, a, i, t, s, l]
1690
+ [i, r, c, a, o, t, s, u]
1691
1691
  )
1692
1692
  };
1693
- }, Ds = (n) => {
1694
- const { t: e } = v(), {
1693
+ }, Us = (n) => {
1694
+ const { t: e } = T(), {
1695
1695
  onClick: t,
1696
1696
  hidden: s = !1,
1697
1697
  sticky: r = !0,
1698
- disabled: o = !1,
1699
- id: i = W.Edit,
1700
- icon: c = ht,
1698
+ disabled: i = !1,
1699
+ id: o = z.Edit,
1700
+ icon: c = bt,
1701
1701
  tooltip: a = e("_pages:common.actions.edit.text")
1702
1702
  } = n;
1703
1703
  return {
1704
1704
  action: w(
1705
- (d) => ({
1706
- id: i,
1705
+ (l) => ({
1706
+ id: o,
1707
1707
  sticky: r,
1708
1708
  tooltip: a,
1709
- onClick: () => t(d == null ? void 0 : d.id),
1710
- hidden: !!d.deletedAt || s,
1711
- disabled: !!d.deletedAt || o,
1712
- icon: /* @__PURE__ */ h(F, { className: "primary", icon: c })
1709
+ onClick: () => t(l == null ? void 0 : l.id),
1710
+ hidden: !!l.deletedAt || s,
1711
+ disabled: !!l.deletedAt || i,
1712
+ icon: /* @__PURE__ */ p(P, { className: "primary", icon: c })
1713
1713
  }),
1714
- [o, s, c, i, t, r, a]
1714
+ [i, s, c, o, t, r, a]
1715
1715
  )
1716
1716
  };
1717
1717
  };
1718
- var W = /* @__PURE__ */ ((n) => (n.Add = "add", n.Edit = "edit", n.Delete = "delete", n.Restore = "restore", n.Refresh = "refresh", n.Export = "export", n.Import = "import", n))(W || {});
1719
- const Qt = (n) => {
1720
- const { t: e } = v(), {
1718
+ var z = /* @__PURE__ */ ((n) => (n.Add = "add", n.Edit = "edit", n.Delete = "delete", n.Restore = "restore", n.Refresh = "refresh", n.Export = "export", n.Import = "import", n))(z || {});
1719
+ const Gt = (n) => {
1720
+ const { t: e } = T(), {
1721
1721
  onClick: t,
1722
1722
  hidden: s = !1,
1723
1723
  disabled: r = !1,
1724
- isLoading: o = !1
1724
+ isLoading: i = !1
1725
1725
  } = n;
1726
1726
  return {
1727
1727
  action: w(
1728
1728
  () => ({
1729
- id: W.Export,
1729
+ id: z.Export,
1730
1730
  hidden: s,
1731
1731
  disabled: r,
1732
- icon: /* @__PURE__ */ h(
1733
- F,
1732
+ icon: /* @__PURE__ */ p(
1733
+ P,
1734
1734
  {
1735
- className: `${o ? "rotate" : ""}`,
1736
- icon: o ? Re : ft
1735
+ className: `${i ? "rotate" : ""}`,
1736
+ icon: i ? Ie : wt
1737
1737
  }
1738
1738
  ),
1739
1739
  tooltip: e("_pages:common.actions.export.text"),
1740
1740
  onClick: t
1741
1741
  }),
1742
- [r, s, o, t, e]
1742
+ [r, s, i, t, e]
1743
1743
  )
1744
1744
  };
1745
- }, Bt = (n) => {
1746
- const { t: e } = v(), {
1745
+ }, zt = (n) => {
1746
+ const { t: e } = T(), {
1747
1747
  onClick: t,
1748
1748
  hidden: s = !1,
1749
1749
  disabled: r = !1,
1750
- isLoading: o = !1
1750
+ isLoading: i = !1
1751
1751
  } = n;
1752
1752
  return {
1753
1753
  action: w(
1754
1754
  () => ({
1755
- id: W.Import,
1755
+ id: z.Import,
1756
1756
  hidden: s,
1757
1757
  disabled: r,
1758
- icon: /* @__PURE__ */ h(
1759
- F,
1758
+ icon: /* @__PURE__ */ p(
1759
+ P,
1760
1760
  {
1761
- className: `${o ? "rotate" : ""}`,
1762
- icon: o ? Re : pt
1761
+ className: `${i ? "rotate" : ""}`,
1762
+ icon: i ? Ie : St
1763
1763
  }
1764
1764
  ),
1765
1765
  tooltip: e("_pages:common.actions.import.text"),
1766
1766
  onClick: t
1767
1767
  }),
1768
- [r, s, o, t, e]
1768
+ [r, s, i, t, e]
1769
1769
  )
1770
1770
  };
1771
- }, Fs = (n) => {
1772
- const { queryKey: e, onSuccess: t, ...s } = n, r = ne(), { showStackNotifications: o } = J(), { t: i } = v(), { open: c, onClick: a, close: l, dialogFn: d, isLoading: u } = Qe({
1773
- onSuccessMessage: i("_pages:common.actions.delete.successMessage"),
1774
- onError: (f) => {
1775
- const p = f;
1776
- if (de(p))
1777
- o(
1778
- p.errors.map(
1771
+ }, js = (n) => {
1772
+ 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
+ onSuccessMessage: o("_pages:common.actions.delete.successMessage"),
1774
+ onError: (m) => {
1775
+ const f = m;
1776
+ if (he(f))
1777
+ i(
1778
+ f.errors.map(
1779
1779
  ([y, g]) => ({
1780
- message: i(`_pages:${y}.errors.${g}`),
1780
+ message: o(`_pages:${y}.errors.${g}`),
1781
1781
  type: R.error
1782
1782
  })
1783
1783
  )
1784
1784
  );
1785
- else if (me(p)) {
1786
- const y = p.message || i("_accessibility:errors.500"), g = i(`_accessibility:errors.${p.status}`);
1787
- o([
1785
+ else if (fe(f)) {
1786
+ const y = f.message || o("_accessibility:errors.500"), g = o(`_accessibility:errors.${f.status}`);
1787
+ i([
1788
1788
  {
1789
1789
  message: g || y,
1790
1790
  type: R.error
@@ -1792,144 +1792,278 @@ const Qt = (n) => {
1792
1792
  ]);
1793
1793
  }
1794
1794
  },
1795
- onSuccess: async (f) => {
1796
- await r.invalidateQueries({ queryKey: e }), t && t(f);
1795
+ onSuccess: async (m) => {
1796
+ await r.invalidateQueries({ queryKey: e }), t && t(m);
1797
1797
  },
1798
1798
  ...s
1799
- }), { action: m } = jt({ onClick: a });
1799
+ }), { action: h } = Bt({ onClick: a });
1800
1800
  return {
1801
1801
  onClick: a,
1802
- title: i("_pages:common.actions.delete.dialog.title"),
1802
+ title: o("_pages:common.actions.delete.dialog.title"),
1803
1803
  open: c,
1804
- isLoading: u,
1805
- handleSubmit: () => d.mutate(),
1806
- handleClose: l,
1807
- action: m
1804
+ isLoading: d,
1805
+ handleSubmit: () => l.mutate(),
1806
+ handleClose: u,
1807
+ action: h
1808
1808
  };
1809
- }, Be = () => {
1810
- const [n, e] = A(!1);
1809
+ }, We = () => {
1810
+ const [n, e] = _(!1);
1811
1811
  return { open: n, setOpen: e, handleClose: () => e(!1), handleOpen: () => e(!0) };
1812
- }, Os = (n) => {
1813
- const { t: e } = v(), t = ne(), {
1814
- showErrorNotification: s,
1815
- showStackNotifications: r,
1816
- showSuccessNotification: o
1817
- } = J(), {
1818
- defaultValues: i,
1819
- getFunction: c,
1820
- mutationFn: a,
1821
- formToDto: l,
1822
- dtoToForm: d,
1823
- onError: u,
1824
- onSuccess: m,
1825
- queryKey: f,
1826
- onSuccessMessage: p,
1827
- title: y
1828
- } = n, [g, b] = A(0), { open: T, handleClose: N, handleOpen: C } = Be(), { control: D, handleSubmit: q, reset: L, setError: S, getValues: _, setValue: E } = Pe({
1829
- defaultValues: i
1830
- }), P = H(null), ce = w(() => {
1831
- const $ = document.activeElement;
1832
- if (!($ instanceof HTMLElement)) {
1833
- P.current = null;
1812
+ }, Jt = (n) => "mutationFn" in n && "queryKey" in n, pe = (n) => {
1813
+ 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
+ showErrorNotification: c,
1815
+ showStackNotifications: a,
1816
+ 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({
1818
+ defaultValues: (t == null ? void 0 : t.defaultValues) || (s == null ? void 0 : s.defaultValues) || {}
1819
+ }), A = K(null), x = w(() => {
1820
+ const C = document.activeElement;
1821
+ if (!(C instanceof HTMLElement)) {
1822
+ A.current = null;
1834
1823
  return;
1835
1824
  }
1836
- P.current = $.closest("form");
1837
- }, []), { data: Y, isLoading: he } = Nt({
1838
- queryFn: () => c == null ? void 0 : c(g),
1839
- queryKey: [...f, g],
1840
- enabled: !!c && !!f && !!g
1825
+ A.current = C.closest("form");
1826
+ }, []), q = t ? [...t.queryKey, l ?? 0] : ["__legacy-form-dialog-disabled__", l ?? 0], { data: V, isLoading: le } = Oe({
1827
+ queryFn: async () => {
1828
+ if (!(!(t != null && t.getFunction) || !l))
1829
+ return t.getFunction(l);
1830
+ },
1831
+ queryKey: q,
1832
+ enabled: !!(t != null && t.getFunction) && !!l
1841
1833
  });
1842
1834
  O(() => {
1843
- Y && d && L({ ...d(Y) });
1844
- }, [Y]);
1845
- const G = w(
1846
- ($) => {
1847
- const U = $ == null ? void 0 : $.errors, j = [], X = P.current;
1848
- if (!X) return j;
1849
- let ve = !1;
1850
- return U && U.forEach(([Ce, Ge]) => {
1851
- const re = X.querySelector(`[name="${Ce}"]`);
1852
- (re instanceof HTMLInputElement || re instanceof HTMLTextAreaElement || re instanceof HTMLSelectElement) && (ve || (re.focus(), ve = !0), re.classList.add("error"), j.push(e(`_entities:${f}.${Ce}.${Ge}`)));
1853
- }), j;
1835
+ !t || !V || !t.dtoToForm || y.current !== V && ($({ ...t.dtoToForm(V) }), y.current = V);
1836
+ }, [V, t, $]), O(() => {
1837
+ if (s) {
1838
+ if (!g) {
1839
+ f.current = !1;
1840
+ return;
1841
+ }
1842
+ if (!f.current) {
1843
+ if (f.current = !0, s.reinitializeOnOpen && s.mapIn) {
1844
+ $(s.mapIn());
1845
+ return;
1846
+ }
1847
+ if (s.reinitializeOnOpen && s.defaultValues) {
1848
+ $(s.defaultValues);
1849
+ return;
1850
+ }
1851
+ s.resetOnOpen && $(s.defaultValues || {});
1852
+ }
1853
+ }
1854
+ }, [s, g, $]);
1855
+ const ge = w(
1856
+ (C) => {
1857
+ const M = C == null ? void 0 : C.errors, Q = [], te = A.current;
1858
+ if (!te || !t) return Q;
1859
+ let Ce = !1;
1860
+ return M && M.forEach(([Te, Ze]) => {
1861
+ const oe = te.querySelector(`[name="${Te}"]`);
1862
+ (oe instanceof HTMLInputElement || oe instanceof HTMLTextAreaElement || oe instanceof HTMLSelectElement) && (Ce || (oe.focus(), Ce = !0), oe.classList.add("error"), Q.push(
1863
+ i(`_entities:${t.queryKey}.${Te}.${Ze}`)
1864
+ ));
1865
+ }), Q;
1854
1866
  },
1855
- [e, f]
1856
- ), we = w(() => {
1857
- const $ = P.current;
1858
- if (!$) return;
1859
- $.querySelectorAll("input, textarea, select").forEach((j) => {
1860
- j.classList.remove("error");
1867
+ [t, i]
1868
+ ), B = w(() => {
1869
+ const C = A.current;
1870
+ if (!C) return;
1871
+ C.querySelectorAll("input, textarea, select").forEach((Q) => {
1872
+ Q.classList.remove("error");
1861
1873
  });
1862
- }, []), We = w(
1863
- ($) => {
1864
- b($ ?? 0), C();
1874
+ }, []), Y = w(() => {
1875
+ B(), A.current = null, b(), $();
1876
+ }, [b, B, $]), ze = w(
1877
+ (C) => {
1878
+ d(C), k();
1865
1879
  },
1866
- [C]
1867
- ), ke = w(() => {
1868
- we(), P.current = null, N(), L();
1869
- }, [L, we, N]), Se = ie({
1870
- mutationFn: a,
1871
- onError: ($) => {
1872
- if (console.error($), u) u($);
1873
- else {
1874
- const U = $;
1875
- if (de(U)) {
1876
- const j = G(U);
1877
- r(
1878
- j.map(
1879
- (X) => ({
1880
- message: X,
1881
- type: R.error
1882
- })
1883
- )
1884
- );
1885
- } else if (me(U)) {
1886
- const j = U.message || e("_accessibility:errors.500"), X = e(`_accessibility:errors.${U.status}`);
1887
- s({ message: X || j });
1888
- } else
1889
- s({ message: e("_accessibility:errors.500") });
1880
+ [k]
1881
+ ), ye = Z({
1882
+ mutationFn: async (C) => {
1883
+ if (t)
1884
+ return t.mutationFn(C);
1885
+ },
1886
+ onError: (C) => {
1887
+ if (t)
1888
+ if (t.onError) t.onError(C);
1889
+ else {
1890
+ const M = C;
1891
+ if (he(M)) {
1892
+ const Q = ge(M);
1893
+ a(
1894
+ Q.map(
1895
+ (te) => ({
1896
+ message: te,
1897
+ type: R.error
1898
+ })
1899
+ )
1900
+ );
1901
+ } else if (fe(M)) {
1902
+ const Q = M.message || i("_accessibility:errors.500"), te = i(`_accessibility:errors.${M.status}`);
1903
+ c({ message: te || Q });
1904
+ } else
1905
+ c({ message: i("_accessibility:errors.500") });
1906
+ }
1907
+ },
1908
+ onSuccess: async (C) => {
1909
+ t && (await o.invalidateQueries({ queryKey: t.queryKey }), t.onSuccess && await t.onSuccess(C), u({
1910
+ message: t.onSuccessMessage
1911
+ }), Y());
1912
+ }
1913
+ }), ue = w(
1914
+ (C) => t ? C : s != null && s.mapOut ? s.mapOut(C, { id: l }) : C,
1915
+ [s, l, t]
1916
+ ), Je = w(async () => {
1917
+ if (!(s != null && s.onApply)) return;
1918
+ const C = I(), M = ue(C);
1919
+ m(!0);
1920
+ try {
1921
+ await s.onApply(M, {
1922
+ close: Y,
1923
+ id: l,
1924
+ values: C
1925
+ });
1926
+ } finally {
1927
+ m(!1);
1928
+ }
1929
+ }, [Y, s, I, l, ue]), Ye = w(async () => {
1930
+ if (s) {
1931
+ if (s.onClear) {
1932
+ m(!0);
1933
+ try {
1934
+ await s.onClear();
1935
+ } finally {
1936
+ m(!1);
1937
+ }
1938
+ }
1939
+ $(s.defaultValues || {});
1940
+ }
1941
+ }, [s, $]), Xe = w(
1942
+ async (C) => {
1943
+ if (t) {
1944
+ x(), ye.mutate(
1945
+ t.formToDto ? t.formToDto(C) : C
1946
+ );
1947
+ return;
1948
+ }
1949
+ const M = ue(C);
1950
+ m(!0);
1951
+ try {
1952
+ s != null && s.onSubmit && await s.onSubmit(M, {
1953
+ close: Y,
1954
+ id: l,
1955
+ values: C
1956
+ }), ((s == null ? void 0 : s.closeOnSubmit) ?? !0) && Y();
1957
+ } finally {
1958
+ m(!1);
1890
1959
  }
1891
1960
  },
1892
- onSuccess: async ($) => {
1893
- await t.invalidateQueries({ queryKey: f }), m && m($), o({
1894
- message: p
1895
- }), ke();
1961
+ [
1962
+ x,
1963
+ Y,
1964
+ s,
1965
+ l,
1966
+ ye,
1967
+ t,
1968
+ ue
1969
+ ]
1970
+ );
1971
+ return {
1972
+ open: g,
1973
+ mode: r,
1974
+ id: l,
1975
+ openDialog: ze,
1976
+ handleClose: Y,
1977
+ control: E,
1978
+ getValues: I,
1979
+ setValue: v,
1980
+ handleSubmit: N,
1981
+ onSubmit: Xe,
1982
+ reset: $,
1983
+ setError: j,
1984
+ title: n.title,
1985
+ isSubmitting: h,
1986
+ onApply: Je,
1987
+ onClear: Ye,
1988
+ isLoading: le || ye.isPending || h
1989
+ };
1990
+ }, Qs = pe, Hs = (n) => pe(n), Vs = (n) => {
1991
+ const e = J(), { mutationFn: t, queryKey: s, onSuccess: r, onError: i, mapOut: o, ...c } = n, a = Z({
1992
+ mutationFn: t
1993
+ });
1994
+ return pe({
1995
+ ...c,
1996
+ mode: "entity",
1997
+ mapOut: o,
1998
+ onSubmit: async (u) => {
1999
+ try {
2000
+ const l = await a.mutateAsync(u);
2001
+ s && await e.invalidateQueries({ queryKey: s }), r && await r(l);
2002
+ } catch (l) {
2003
+ throw i && i(l), l;
2004
+ }
1896
2005
  }
1897
2006
  });
1898
- return {
1899
- open: T,
1900
- openDialog: We,
1901
- handleClose: ke,
1902
- control: D,
1903
- getValues: _,
1904
- setValue: E,
1905
- handleSubmit: q,
1906
- onSubmit: ($) => {
1907
- ce(), Se.mutate(
1908
- l ? l($) : $
1909
- );
2007
+ }, 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,
2022
+ mode: "entity",
2023
+ title: l,
2024
+ onSubmit: async (b) => {
2025
+ 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;
2030
+ }
1910
2031
  },
1911
- reset: L,
1912
- setError: S,
1913
- title: y,
1914
- isLoading: he || Se.isPending
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
2037
+ });
2038
+ return O(() => {
2039
+ if (g.data) {
2040
+ if (t.current = g.data, u && f) {
2041
+ f(u(g.data));
2042
+ return;
2043
+ }
2044
+ f == null || f(g.data);
2045
+ }
2046
+ }, [u, g.data, f]), {
2047
+ ...m,
2048
+ isLoading: m.isLoading || h.isPending || g.isFetching || g.isLoading
1915
2049
  };
1916
- }, Ks = (n) => {
1917
- const { queryKey: e, onSuccess: t, ...s } = n, r = ne(), { showStackNotifications: o } = J(), { t: i } = v(), { open: c, onClick: a, close: l, dialogFn: d, isLoading: u } = Qe({
1918
- onSuccessMessage: i("_pages:common.actions.restore.successMessage"),
1919
- onError: (f) => {
1920
- const p = f;
1921
- if (de(p))
1922
- o(
1923
- p.errors.map(
2050
+ }, Ws = (n) => {
2051
+ 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
+ onSuccessMessage: o("_pages:common.actions.restore.successMessage"),
2053
+ onError: (m) => {
2054
+ const f = m;
2055
+ if (he(f))
2056
+ i(
2057
+ f.errors.map(
1924
2058
  ([y, g]) => ({
1925
- message: i(`_pages:${y}.errors.${g}`),
2059
+ message: o(`_pages:${y}.errors.${g}`),
1926
2060
  type: R.error
1927
2061
  })
1928
2062
  )
1929
2063
  );
1930
- else if (me(p)) {
1931
- const y = p.message || i("_accessibility:errors.500"), g = i(`_accessibility:errors.${p.status}`);
1932
- o([
2064
+ else if (fe(f)) {
2065
+ const y = f.message || o("_accessibility:errors.500"), g = o(`_accessibility:errors.${f.status}`);
2066
+ i([
1933
2067
  {
1934
2068
  message: g || y,
1935
2069
  type: R.error
@@ -1937,30 +2071,30 @@ const Qt = (n) => {
1937
2071
  ]);
1938
2072
  }
1939
2073
  },
1940
- onSuccess: async (f) => {
1941
- await r.invalidateQueries({ queryKey: e }), t && t(f);
2074
+ onSuccess: async (m) => {
2075
+ await r.invalidateQueries({ queryKey: e }), t && t(m);
1942
2076
  },
1943
2077
  ...s
1944
- }), { action: m } = Ht({ onClick: a });
2078
+ }), { action: h } = Wt({ onClick: a });
1945
2079
  return {
1946
2080
  onClick: a,
1947
- title: i("_pages:common.actions.restore.dialog.title"),
2081
+ title: o("_pages:common.actions.restore.dialog.title"),
1948
2082
  open: c,
1949
- isLoading: u,
1950
- handleSubmit: () => d.mutate(),
1951
- handleClose: l,
1952
- action: m
2083
+ isLoading: d,
2084
+ handleSubmit: () => l.mutate(),
2085
+ handleClose: u,
2086
+ action: h
1953
2087
  };
1954
2088
  };
1955
- function qs(n) {
1956
- const { t: e } = v(), t = ne(), {
2089
+ function Gs(n) {
2090
+ const { t: e } = T(), t = J(), {
1957
2091
  queryKey: s,
1958
2092
  mutationFn: r,
1959
- entity: o,
1960
- fileProcessor: i,
2093
+ entity: i,
2094
+ fileProcessor: o,
1961
2095
  renderCustomPreview: c,
1962
2096
  onError: a
1963
- } = n, [l, d] = A(!1), [u, m] = A(null), [f, p] = A(!1), y = ie({
2097
+ } = n, [u, l] = _(!1), [d, h] = _(null), [m, f] = _(!1), y = Z({
1964
2098
  mutationFn: r,
1965
2099
  onError: (b) => {
1966
2100
  console.error(b), a == null || a(b);
@@ -1968,184 +2102,184 @@ function qs(n) {
1968
2102
  onSuccess: async () => {
1969
2103
  await t.invalidateQueries({ queryKey: s });
1970
2104
  }
1971
- }), { action: g } = Bt({
1972
- onClick: () => d(!0)
2105
+ }), { action: g } = zt({
2106
+ onClick: () => l(!0)
1973
2107
  });
1974
2108
  return {
1975
2109
  handleSubmit: async () => {
1976
- if (!(!u || u.length === 0))
2110
+ if (!(!d || d.length === 0))
1977
2111
  try {
1978
2112
  await y.mutateAsync({
1979
- items: u,
1980
- override: f
1981
- }), d(!1), m(null), p(!1);
2113
+ items: d,
2114
+ override: m
2115
+ }), l(!1), h(null), f(!1);
1982
2116
  } catch (b) {
1983
2117
  console.error(b);
1984
2118
  }
1985
2119
  },
1986
2120
  isLoading: y.isPending,
1987
- fileProcessor: i,
1988
- onFileProcessed: (b) => m(b),
2121
+ fileProcessor: o,
2122
+ onFileProcessed: (b) => h(b),
1989
2123
  renderCustomPreview: c,
1990
- onOverrideChange: (b) => p(b),
1991
- open: l,
2124
+ onOverrideChange: (b) => f(b),
2125
+ open: u,
1992
2126
  title: e("_pages:common.actions.import.dialog.title", {
1993
- entity: e(`_pages:${o}.title`)
2127
+ entity: e(`_pages:${i}.title`)
1994
2128
  }),
1995
2129
  handleClose: () => {
1996
- d(!1), m(null), p(!1);
2130
+ l(!1), h(null), f(!1);
1997
2131
  },
1998
2132
  action: g
1999
2133
  };
2000
2134
  }
2001
- const Us = (n) => {
2002
- const { showSuccessNotification: e } = J(), { t } = v(), {
2135
+ const zs = (n) => {
2136
+ const { showSuccessNotification: e } = ee(), { t } = T(), {
2003
2137
  entity: s,
2004
2138
  mutationFn: r,
2005
- onError: o,
2006
- onSuccess: i,
2139
+ onError: i,
2140
+ onSuccess: o,
2007
2141
  onSuccessMessage: c = t("_pages:common.actions.export.successMessage")
2008
- } = n, a = ie({
2142
+ } = n, a = Z({
2009
2143
  mutationFn: () => r(),
2010
- onError: (u) => {
2011
- console.error(u), o && o(u);
2144
+ onError: (d) => {
2145
+ console.error(d), i && i(d);
2012
2146
  },
2013
- onSuccess: async (u) => {
2014
- const m = JSON.stringify(u, null, 2), f = new Blob([m], { type: "application/json" }), p = URL.createObjectURL(f), y = document.createElement("a");
2015
- y.href = p, y.download = `${s}.json`, y.click(), URL.revokeObjectURL(p), i && i(u), e({
2147
+ 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({
2016
2150
  message: c
2017
2151
  });
2018
2152
  }
2019
- }), l = w(() => {
2153
+ }), u = w(() => {
2020
2154
  a.mutate();
2021
- }, [a]), { action: d } = Qt({
2022
- onClick: l,
2155
+ }, [a]), { action: l } = Gt({
2156
+ onClick: u,
2023
2157
  isLoading: a.isPending
2024
2158
  });
2025
2159
  return {
2026
- action: d
2160
+ action: l
2027
2161
  };
2028
- }, $e = () => typeof window < "u" ? window.scrollY : 0;
2029
- function Vt(n) {
2030
- const [e, t] = A($e), s = w(() => {
2031
- t($e());
2162
+ }, xe = () => typeof window < "u" ? window.scrollY : 0;
2163
+ function Yt(n) {
2164
+ const [e, t] = _(xe), s = w(() => {
2165
+ t(xe());
2032
2166
  }, []);
2033
2167
  return O(() => (window.addEventListener("scroll", s), () => {
2034
2168
  window.removeEventListener("scroll", s);
2035
2169
  }), [s]), e > n;
2036
2170
  }
2037
- const js = (n) => {
2038
- const { t: e } = v(), {
2039
- icon: t = gt,
2171
+ const Js = (n) => {
2172
+ const { t: e } = T(), {
2173
+ icon: t = kt,
2040
2174
  threshold: s = 200,
2041
2175
  scrollTop: r = 0,
2042
- scrollLeft: o = 0,
2043
- tooltip: i = e("_accessibility:buttons.toTop"),
2176
+ scrollLeft: i = 0,
2177
+ tooltip: o = e("_accessibility:buttons.toTop"),
2044
2178
  scrollOnClick: c = !0,
2045
2179
  onClick: a,
2046
- className: l = "",
2047
- variant: d = "submit",
2048
- color: u = "primary",
2049
- ...m
2050
- } = n, f = Vt(s);
2051
- return /* @__PURE__ */ h(
2052
- V,
2180
+ className: u = "",
2181
+ variant: l = "submit",
2182
+ color: d = "primary",
2183
+ ...h
2184
+ } = n, m = Yt(s);
2185
+ return /* @__PURE__ */ p(
2186
+ G,
2053
2187
  {
2054
- variant: d,
2055
- color: u,
2188
+ variant: l,
2189
+ color: d,
2056
2190
  icon: t,
2057
2191
  "data-tooltip-id": "tooltip",
2058
2192
  onClick: () => {
2059
- a == null || a(), c && Ut.scrollTo(o, r);
2193
+ a == null || a(), c && Vt.scrollTo(i, r);
2060
2194
  },
2061
- className: `to-top ${f ? "show" : "hide"} ${l}`.trim(),
2062
- "data-tooltip-content": i,
2063
- ...m
2195
+ className: `to-top ${m ? "show" : "hide"} ${u}`.trim(),
2196
+ "data-tooltip-content": o,
2197
+ ...h
2064
2198
  }
2065
2199
  );
2066
2200
  };
2067
- function Hs(n) {
2068
- const { t: e } = v();
2201
+ function Ys(n) {
2202
+ const { t: e } = T();
2069
2203
  if ("children" in n) {
2070
- const { children: C, className: D } = n;
2071
- return /* @__PURE__ */ h("div", { className: `error-container${D ? ` ${D}` : ""}`, children: C });
2204
+ const { children: N, className: $ } = n;
2205
+ return /* @__PURE__ */ p("div", { className: `error-container${$ ? ` ${$}` : ""}`, children: N });
2072
2206
  }
2073
2207
  const {
2074
2208
  error: s,
2075
2209
  message: r,
2076
- iconProps: o,
2077
- onRetry: i,
2210
+ iconProps: i,
2211
+ onRetry: o,
2078
2212
  retryLabel: c,
2079
2213
  retryButtonProps: a,
2080
- messageProps: l,
2081
- className: d,
2082
- resetErrorBoundary: u
2083
- } = n, m = i ?? u, {
2084
- className: f,
2085
- children: p,
2214
+ messageProps: u,
2215
+ className: l,
2216
+ resetErrorBoundary: d
2217
+ } = n, h = o ?? d, {
2218
+ className: m,
2219
+ children: f,
2086
2220
  onClick: y,
2087
2221
  ...g
2088
- } = a ?? {}, { className: b, ...T } = l ?? {}, N = o !== null;
2089
- return /* @__PURE__ */ k("div", { className: `error-container${d ? ` ${d}` : ""}`, children: [
2090
- N && /* @__PURE__ */ h(
2091
- F,
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,
2092
2226
  {
2093
- ...o,
2094
- icon: (o == null ? void 0 : o.icon) ?? Et,
2095
- className: `error-icon${o != null && o.className ? ` ${o.className}` : ""}`
2227
+ ...i,
2228
+ icon: (i == null ? void 0 : i.icon) ?? Lt,
2229
+ className: `error-icon${i != null && i.className ? ` ${i.className}` : ""}`
2096
2230
  }
2097
2231
  ),
2098
- /* @__PURE__ */ h(
2232
+ /* @__PURE__ */ p(
2099
2233
  "p",
2100
2234
  {
2101
- ...T,
2235
+ ...k,
2102
2236
  className: `error-message${b ? ` ${b}` : ""}`,
2103
2237
  children: r ?? (s == null ? void 0 : s.message) ?? e("_accessibility:errors.unknownError")
2104
2238
  }
2105
2239
  ),
2106
- m && /* @__PURE__ */ h(
2107
- K,
2240
+ h && /* @__PURE__ */ p(
2241
+ U,
2108
2242
  {
2109
2243
  type: "button",
2110
2244
  variant: "submit",
2111
2245
  color: "primary",
2112
2246
  ...g,
2113
- className: `error-retry ${f ? ` ${f}` : ""}`,
2114
- onClick: (C) => {
2115
- y == null || y(C), C.defaultPrevented || m();
2247
+ className: `error-retry ${m ? ` ${m}` : ""}`,
2248
+ onClick: (N) => {
2249
+ y == null || y(N), N.defaultPrevented || h();
2116
2250
  },
2117
- children: p ?? c ?? e("_accessibility:actions.retry", { defaultValue: "Retry" })
2251
+ children: f ?? c ?? e("_accessibility:actions.retry", { defaultValue: "Retry" })
2118
2252
  }
2119
2253
  )
2120
2254
  ] });
2121
2255
  }
2122
- const Wt = (n) => {
2123
- const { showBackButton: e, title: t, actions: s } = n, { t: r } = v(), { navigate: o } = ae();
2124
- return /* @__PURE__ */ k("div", { className: "page-header", children: [
2125
- /* @__PURE__ */ k("div", { className: "page-header-left", children: [
2126
- e && /* @__PURE__ */ h(
2127
- V,
2256
+ const Xt = (n) => {
2257
+ 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(
2261
+ G,
2128
2262
  {
2129
- icon: yt,
2130
- onClick: () => o(-1),
2263
+ icon: vt,
2264
+ onClick: () => i(-1),
2131
2265
  className: "page-header-back",
2132
2266
  name: r("_accessibility:buttons.back"),
2133
2267
  "data-tooltip-id": "tooltip",
2134
2268
  "data-tooltip-content": r("_accessibility:buttons.back")
2135
2269
  }
2136
2270
  ),
2137
- /* @__PURE__ */ h("h2", { className: "page-header-title", children: t })
2271
+ /* @__PURE__ */ p("h2", { className: "page-header-title", children: t })
2138
2272
  ] }),
2139
- /* @__PURE__ */ k("div", { children: [
2140
- /* @__PURE__ */ h(
2141
- rt,
2273
+ /* @__PURE__ */ S("div", { children: [
2274
+ /* @__PURE__ */ p(
2275
+ lt,
2142
2276
  {
2143
2277
  className: "page-header-actions-desktop",
2144
2278
  actions: s ?? []
2145
2279
  }
2146
2280
  ),
2147
- /* @__PURE__ */ h(
2148
- ot,
2281
+ /* @__PURE__ */ p(
2282
+ ut,
2149
2283
  {
2150
2284
  className: "page-header-actions-mobile",
2151
2285
  actions: s ?? []
@@ -2153,206 +2287,206 @@ const Wt = (n) => {
2153
2287
  )
2154
2288
  ] })
2155
2289
  ] });
2156
- }, Qs = (n) => {
2290
+ }, Xs = (n) => {
2157
2291
  const {
2158
2292
  title: e,
2159
2293
  children: t,
2160
2294
  addOptions: s,
2161
2295
  filterOptions: r,
2162
- actions: o,
2163
- queryKey: i,
2296
+ actions: i,
2297
+ queryKey: o,
2164
2298
  isLoading: c = !1,
2165
2299
  isAnimated: a = !0,
2166
- showBackButton: l = !1
2167
- } = n, { t: d } = v(), u = ne(), { countOfFilters: m } = it(), f = Q(() => {
2168
- const p = Array.isArray(o) ? [...o] : [];
2169
- if (i) {
2300
+ showBackButton: u = !1
2301
+ } = n, { t: l } = T(), d = J(), { countOfFilters: h } = dt(), m = H(() => {
2302
+ const f = Array.isArray(i) ? [...i] : [];
2303
+ if (o) {
2170
2304
  const y = {
2171
- id: W.Refresh,
2172
- onClick: () => u.invalidateQueries({ queryKey: i }),
2173
- icon: /* @__PURE__ */ h(F, { icon: _e }),
2174
- tooltip: d("_pages:common.actions.refresh.text")
2305
+ id: z.Refresh,
2306
+ onClick: () => d.invalidateQueries({ queryKey: o }),
2307
+ icon: /* @__PURE__ */ p(P, { icon: Re }),
2308
+ tooltip: l("_pages:common.actions.refresh.text")
2175
2309
  };
2176
- p.unshift(y);
2310
+ f.unshift(y);
2177
2311
  }
2178
2312
  if (s) {
2179
2313
  const y = {
2180
2314
  ...s,
2181
- id: W.Add,
2182
- icon: /* @__PURE__ */ h(F, { icon: Te })
2315
+ id: z.Add,
2316
+ icon: /* @__PURE__ */ p(P, { icon: Ne })
2183
2317
  };
2184
- p.unshift(y);
2318
+ f.unshift(y);
2185
2319
  }
2186
2320
  if (r) {
2187
2321
  const y = {
2188
2322
  ...r,
2189
2323
  id: "filter",
2190
- icon: /* @__PURE__ */ h(F, { icon: bt }),
2191
- children: /* @__PURE__ */ h(
2192
- at,
2324
+ icon: /* @__PURE__ */ p(P, { icon: Ct }),
2325
+ children: /* @__PURE__ */ p(
2326
+ mt,
2193
2327
  {
2194
- className: `${m > 0 ? "show" : "hide"} `,
2195
- count: m
2328
+ className: `${h > 0 ? "show" : "hide"} `,
2329
+ count: h
2196
2330
  }
2197
2331
  )
2198
2332
  };
2199
- p.push(y);
2333
+ f.push(y);
2200
2334
  }
2201
- return p;
2335
+ return f;
2202
2336
  }, [
2203
- o,
2337
+ i,
2204
2338
  s,
2205
- m,
2339
+ h,
2206
2340
  r,
2207
- u,
2208
- i,
2209
- d
2341
+ d,
2342
+ o,
2343
+ l
2210
2344
  ]);
2211
- return /* @__PURE__ */ k("main", { className: "page-main", children: [
2212
- /* @__PURE__ */ h(
2213
- Wt,
2345
+ return /* @__PURE__ */ S("main", { className: "page-main", children: [
2346
+ /* @__PURE__ */ p(
2347
+ Xt,
2214
2348
  {
2215
- showBackButton: l,
2216
- actions: f,
2349
+ showBackButton: u,
2350
+ actions: m,
2217
2351
  title: e
2218
2352
  }
2219
2353
  ),
2220
- /* @__PURE__ */ h("div", { className: `page-main-content ${a ? "appear" : ""}`, children: c ? /* @__PURE__ */ h(ee, { className: "page-loading" }) : t }),
2221
- s && /* @__PURE__ */ h(
2222
- V,
2354
+ /* @__PURE__ */ p("div", { className: `page-main-content ${a ? "appear" : ""}`, children: c ? /* @__PURE__ */ p(ne, { className: "page-loading" }) : t }),
2355
+ s && /* @__PURE__ */ p(
2356
+ G,
2223
2357
  {
2224
- icon: s.icon ?? Te,
2358
+ icon: s.icon ?? Ne,
2225
2359
  color: s.color ?? "primary",
2226
2360
  variant: s.variant ?? "submit",
2227
2361
  onClick: () => {
2228
- var p;
2229
- return (p = s.onClick) == null ? void 0 : p.call(s);
2362
+ var f;
2363
+ return (f = s.onClick) == null ? void 0 : f.call(s);
2230
2364
  },
2231
- className: `button fab ${s.className ?? ""}`
2365
+ className: `button page-fab ${s.className ?? ""}`
2232
2366
  }
2233
2367
  )
2234
2368
  ] });
2235
- }, Bs = (n) => {
2236
- const { t: e } = v(), {
2369
+ }, Zs = (n) => {
2370
+ const { t: e } = T(), {
2237
2371
  className: t = "",
2238
2372
  itemClassName: s = "",
2239
2373
  loading: r = !1,
2240
- emptyComponent: o = null,
2241
- emptyMessage: i = e("_accessibility:messages.empty"),
2374
+ emptyComponent: i = null,
2375
+ emptyMessage: o = e("_accessibility:messages.empty"),
2242
2376
  renderComponent: c,
2243
2377
  data: a = [],
2244
- hasMore: l = !1,
2245
- loadingMore: d = !1,
2246
- onLoadMore: u,
2247
- loadMoreComponent: m = null,
2248
- observerRootMargin: f = "0px 0px 200px 0px",
2249
- observerThreshold: p = 0
2250
- } = n, y = H(!1), g = H(null), b = w(async () => {
2251
- if (!(!l || !u) && !(d || y.current)) {
2378
+ hasMore: u = !1,
2379
+ loadingMore: l = !1,
2380
+ 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 () => {
2385
+ if (!(!u || !d) && !(l || y.current)) {
2252
2386
  y.current = !0;
2253
2387
  try {
2254
- await u();
2388
+ await d();
2255
2389
  } finally {
2256
2390
  y.current = !1;
2257
2391
  }
2258
2392
  }
2259
- }, [l, d, u]);
2393
+ }, [u, l, d]);
2260
2394
  return O(() => {
2261
- if (!l || !u || !g.current || typeof IntersectionObserver > "u") return;
2262
- const T = new IntersectionObserver(
2263
- (N) => {
2264
- N.some((C) => C.isIntersecting) && b();
2395
+ if (!u || !d || !g.current || typeof IntersectionObserver > "u") return;
2396
+ const k = new IntersectionObserver(
2397
+ (E) => {
2398
+ E.some((N) => N.isIntersecting) && b();
2265
2399
  },
2266
2400
  {
2267
- rootMargin: f,
2268
- threshold: p
2401
+ rootMargin: m,
2402
+ threshold: f
2269
2403
  }
2270
2404
  );
2271
- return T.observe(g.current), () => T.disconnect();
2405
+ return k.observe(g.current), () => k.disconnect();
2272
2406
  }, [
2273
- l,
2274
2407
  u,
2408
+ d,
2409
+ m,
2275
2410
  f,
2276
- p,
2277
2411
  b
2278
- ]), r ? /* @__PURE__ */ h(ee, {}) : /* @__PURE__ */ h(oe, { children: a != null && a.length ? /* @__PURE__ */ k("ul", { className: `pretty-grid-main ${t}`, children: [
2279
- a == null ? void 0 : a.map((T) => /* @__PURE__ */ h("li", { className: `pretty-grid-item ${s}`, children: c(T) }, T.id)),
2280
- l && u && /* @__PURE__ */ h("li", { className: "pretty-grid-load-more", ref: g, children: m })
2281
- ] }) : /* @__PURE__ */ h(oe, { children: o || /* @__PURE__ */ h(ts, { message: i }) }) });
2282
- }, Ve = te({
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 }) }) });
2416
+ }, Ge = re({
2283
2417
  title: "",
2284
2418
  setTitle: () => {
2285
2419
  },
2286
2420
  rightContent: null,
2287
2421
  setRightContent: () => {
2288
2422
  }
2289
- }), Vs = (n) => {
2290
- const { children: e } = n, [t, s] = A(""), [r, o] = A(null), i = w((l) => {
2291
- s(l);
2292
- }, []), c = w((l) => {
2293
- o(l);
2294
- }, []), a = Q(
2423
+ }), en = (n) => {
2424
+ const { children: e } = n, [t, s] = _(""), [r, i] = _(null), o = w((u) => {
2425
+ s(u);
2426
+ }, []), c = w((u) => {
2427
+ i(u);
2428
+ }, []), a = H(
2295
2429
  () => ({
2296
2430
  title: t,
2297
- setTitle: i,
2431
+ setTitle: o,
2298
2432
  rightContent: r,
2299
2433
  setRightContent: c
2300
2434
  }),
2301
- [t, i, r, c]
2435
+ [t, o, r, c]
2302
2436
  );
2303
- return /* @__PURE__ */ h(Ve.Provider, { value: a, children: e });
2304
- }, Gt = () => se(Ve);
2305
- function Ws(n) {
2306
- const { t: e } = v(), { openDrawer: t, showSearch: s = !0, menuButtonProps: r } = n, { searchComponent: o, location: i } = ae(), { title: c, rightContent: a } = Gt(), [l, d] = A(!1), u = w((p) => {
2307
- (Dt() ? p.metaKey : p.ctrlKey) && p.shiftKey && p.key.toLowerCase() === "f" && (d(!0), p.preventDefault());
2437
+ return /* @__PURE__ */ p(Ge.Provider, { value: a, children: e });
2438
+ }, Zt = () => ie(Ge);
2439
+ 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());
2308
2442
  }, []);
2309
- O(() => (window.addEventListener("keydown", u), () => {
2310
- window.removeEventListener("keydown", u);
2311
- }), [u]);
2312
- const m = o, f = s && !!m;
2313
- return /* @__PURE__ */ k(oe, { children: [
2314
- i.pathname !== "/" && !!m && /* @__PURE__ */ h(m, { open: l, onClose: () => d(!1) }),
2315
- /* @__PURE__ */ k("header", { id: "header", className: "header", children: [
2316
- /* @__PURE__ */ k("div", { className: "navbar-left", children: [
2317
- /* @__PURE__ */ h(
2318
- V,
2443
+ O(() => (window.addEventListener("keydown", d), () => {
2444
+ window.removeEventListener("keydown", d);
2445
+ }), [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(
2452
+ G,
2319
2453
  {
2320
2454
  ...r,
2321
2455
  type: (r == null ? void 0 : r.type) ?? "button",
2322
- icon: (r == null ? void 0 : r.icon) ?? wt,
2323
- onClick: (p) => {
2456
+ icon: (r == null ? void 0 : r.icon) ?? Tt,
2457
+ onClick: (f) => {
2324
2458
  var y;
2325
- (y = r == null ? void 0 : r.onClick) == null || y.call(r, p), t();
2459
+ (y = r == null ? void 0 : r.onClick) == null || y.call(r, f), t();
2326
2460
  },
2327
2461
  name: (r == null ? void 0 : r.name) ?? e("_accessibility:buttons.openMenu"),
2328
2462
  "aria-label": (r == null ? void 0 : r["aria-label"]) ?? e("_accessibility:ariaLabels.openMenu"),
2329
2463
  className: `navbar-menu animated ${(r == null ? void 0 : r.className) ?? ""}`
2330
2464
  }
2331
2465
  ),
2332
- /* @__PURE__ */ h("h1", { className: "poppins navbar-title", children: c || e("_pages:home.appName") })
2466
+ /* @__PURE__ */ p("h1", { className: "poppins navbar-title", children: c || e("_pages:home.appName") })
2333
2467
  ] }),
2334
- /* @__PURE__ */ k("div", { className: "navbar-right", children: [
2468
+ /* @__PURE__ */ S("div", { className: "navbar-right", children: [
2335
2469
  a,
2336
- f && /* @__PURE__ */ h(
2337
- V,
2470
+ m && /* @__PURE__ */ p(
2471
+ G,
2338
2472
  {
2339
- icon: kt,
2473
+ icon: Nt,
2340
2474
  className: "navbar-search-btn",
2341
- onClick: () => d(!0)
2475
+ onClick: () => l(!0)
2342
2476
  }
2343
2477
  )
2344
2478
  ] })
2345
2479
  ] })
2346
2480
  ] });
2347
2481
  }
2348
- const le = 300, zt = (n) => n ?? R.error, Jt = (n) => {
2482
+ const de = 300, es = (n) => n ?? R.error, ts = (n) => {
2349
2483
  switch (n) {
2350
2484
  case R.error:
2351
- return vt;
2485
+ return $t;
2352
2486
  default:
2353
- return St;
2487
+ return Et;
2354
2488
  }
2355
- }, ge = (n) => {
2489
+ }, Se = (n) => {
2356
2490
  switch (n) {
2357
2491
  case R.success:
2358
2492
  return "!text-success";
@@ -2363,7 +2497,7 @@ const le = 300, zt = (n) => n ?? R.error, Jt = (n) => {
2363
2497
  default:
2364
2498
  return "!text-info";
2365
2499
  }
2366
- }, Yt = (n) => {
2500
+ }, ss = (n) => {
2367
2501
  switch (n) {
2368
2502
  case R.success:
2369
2503
  return "bg-bg-success";
@@ -2375,96 +2509,96 @@ const le = 300, zt = (n) => n ?? R.error, Jt = (n) => {
2375
2509
  return "bg-bg-info";
2376
2510
  }
2377
2511
  };
2378
- function Gs() {
2379
- const { t: n } = v(), { notification: e, removeNotification: t } = J(), [s, r] = A([]), o = H(s);
2380
- lt(() => {
2381
- o.current = s;
2512
+ function sn() {
2513
+ const { t: n } = T(), { notification: e, removeNotification: t } = ee(), [s, r] = _([]), i = K(s);
2514
+ ft(() => {
2515
+ i.current = s;
2382
2516
  });
2383
- const i = H(null), c = w(
2517
+ const o = K(null), c = w(
2384
2518
  (a) => {
2385
2519
  r(
2386
- (l) => a !== void 0 ? l.map((d) => d.id === a ? { ...d, closing: !0 } : d) : l.map((d) => ({ ...d, closing: !0 }))
2520
+ (u) => a !== void 0 ? u.map((l) => l.id === a ? { ...l, closing: !0 } : l) : u.map((l) => ({ ...l, closing: !0 }))
2387
2521
  ), a !== void 0 ? setTimeout(() => {
2388
- t(a), r((l) => l.filter((d) => d.id !== a));
2389
- }, le) : (i.current && clearTimeout(i.current), i.current = setTimeout(() => {
2390
- t(), r([]), i.current = null;
2391
- }, le));
2522
+ t(a), r((u) => u.filter((l) => l.id !== a));
2523
+ }, de) : (o.current && clearTimeout(o.current), o.current = setTimeout(() => {
2524
+ t(), r([]), o.current = null;
2525
+ }, de));
2392
2526
  },
2393
2527
  [t]
2394
2528
  );
2395
2529
  return O(() => {
2396
2530
  let a = null;
2397
- const l = () => {
2398
- a && clearTimeout(a), i.current && (clearTimeout(i.current), i.current = null);
2531
+ const u = () => {
2532
+ a && clearTimeout(a), o.current && (clearTimeout(o.current), o.current = null);
2399
2533
  };
2400
2534
  if (e.length === 0)
2401
- return o.current.length === 0 ? void 0 : (i.current && clearTimeout(i.current), a = setTimeout(() => {
2402
- r((f) => f.map((p) => ({ ...p, closing: !0 }))), a = null;
2403
- }, 0), i.current = setTimeout(() => {
2404
- r([]), i.current = null;
2405
- }, le), l);
2406
- const d = new Set(o.current.map((f) => f.id));
2535
+ 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;
2537
+ }, 0), o.current = setTimeout(() => {
2538
+ r([]), o.current = null;
2539
+ }, de), u);
2540
+ const l = new Set(i.current.map((m) => m.id));
2407
2541
  if (!e.some(
2408
- (f) => f.id !== void 0 && !d.has(f.id)
2542
+ (m) => m.id !== void 0 && !l.has(m.id)
2409
2543
  )) return;
2410
- if (o.current.length === 0) {
2411
- const f = [...e];
2544
+ if (i.current.length === 0) {
2545
+ const m = [...e];
2412
2546
  return a = setTimeout(() => {
2413
- r(f.map((p) => ({ ...p, closing: !1 }))), a = null;
2547
+ r(m.map((f) => ({ ...f, closing: !1 }))), a = null;
2414
2548
  }, 0), () => {
2415
2549
  a && clearTimeout(a);
2416
2550
  };
2417
2551
  }
2418
- i.current && clearTimeout(i.current), a = setTimeout(() => {
2552
+ o.current && clearTimeout(o.current), a = setTimeout(() => {
2419
2553
  r(
2420
- (f) => f.every((p) => p.closing) ? f : f.map((p) => ({ ...p, closing: !0 }))
2554
+ (m) => m.every((f) => f.closing) ? m : m.map((f) => ({ ...f, closing: !0 }))
2421
2555
  ), a = null;
2422
2556
  }, 0);
2423
- const m = [...e];
2424
- return i.current = setTimeout(() => {
2425
- r(m.map((f) => ({ ...f, closing: !1 }))), i.current = null;
2426
- }, le), l;
2557
+ const h = [...e];
2558
+ return o.current = setTimeout(() => {
2559
+ r(h.map((m) => ({ ...m, closing: !1 }))), o.current = null;
2560
+ }, de), u;
2427
2561
  }, [e]), O(() => {
2428
2562
  if (!s.length) return;
2429
2563
  let a;
2430
- const l = window.setTimeout(() => {
2564
+ const u = window.setTimeout(() => {
2431
2565
  a = () => c(), window.addEventListener("click", a);
2432
- }, 0), d = (u) => {
2433
- u.key === "Escape" && c();
2566
+ }, 0), l = (d) => {
2567
+ d.key === "Escape" && c();
2434
2568
  };
2435
- return window.addEventListener("keydown", d), () => {
2436
- window.clearTimeout(l), a && window.removeEventListener("click", a), window.removeEventListener("keydown", d);
2569
+ return window.addEventListener("keydown", l), () => {
2570
+ window.clearTimeout(u), a && window.removeEventListener("click", a), window.removeEventListener("keydown", l);
2437
2571
  };
2438
- }, [s.length, c]), Ie(
2439
- /* @__PURE__ */ h("div", { className: `notification-portal ${s.length ? "active" : ""}`, children: s.map(({ id: a, type: l, message: d, closing: u }) => {
2440
- const m = zt(l);
2441
- return /* @__PURE__ */ k(
2572
+ }, [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(
2442
2576
  "div",
2443
2577
  {
2444
- className: `notification ${u ? "closing" : ""} ${Yt(m)}`,
2445
- onClick: (f) => f.stopPropagation(),
2578
+ className: `notification ${d ? "closing" : ""} ${ss(h)}`,
2579
+ onClick: (m) => m.stopPropagation(),
2446
2580
  children: [
2447
- /* @__PURE__ */ k("div", { className: "notification-body", children: [
2448
- /* @__PURE__ */ h(
2449
- F,
2581
+ /* @__PURE__ */ S("div", { className: "notification-body", children: [
2582
+ /* @__PURE__ */ p(
2583
+ P,
2450
2584
  {
2451
- icon: Jt(m),
2452
- className: `notification-icon ${ge(m)}`
2585
+ icon: ts(h),
2586
+ className: `notification-icon ${Se(h)}`
2453
2587
  }
2454
2588
  ),
2455
- /* @__PURE__ */ h("p", { className: `notification-text ${ge(m)}`, children: d })
2589
+ /* @__PURE__ */ p("p", { className: `notification-text ${Se(h)}`, children: l })
2456
2590
  ] }),
2457
- /* @__PURE__ */ h(
2458
- V,
2591
+ /* @__PURE__ */ p(
2592
+ G,
2459
2593
  {
2460
2594
  type: "button",
2461
- icon: Le,
2595
+ icon: _e,
2462
2596
  color: "error",
2463
2597
  className: "notification-close group",
2464
- onClick: (f) => {
2465
- f.stopPropagation(), a !== void 0 && c(a);
2598
+ onClick: (m) => {
2599
+ m.stopPropagation(), a !== void 0 && c(a);
2466
2600
  },
2467
- iconClassName: `${ge(m)} notification-close-icon`,
2601
+ iconClassName: `${Se(h)} notification-close-icon`,
2468
2602
  name: n("_accessibility:buttons.closeNotification"),
2469
2603
  "aria-label": n("_accessibility:ariaLabels.closeNotification")
2470
2604
  }
@@ -2477,300 +2611,304 @@ function Gs() {
2477
2611
  document.body
2478
2612
  );
2479
2613
  }
2480
- function zs(n) {
2614
+ function nn(n) {
2481
2615
  const { className: e, ...t } = n;
2482
- return /* @__PURE__ */ h("div", { className: "splash-screen", children: /* @__PURE__ */ h(
2483
- ee,
2616
+ return /* @__PURE__ */ p("div", { className: "splash-screen", children: /* @__PURE__ */ p(
2617
+ ne,
2484
2618
  {
2485
2619
  className: `blur-appear ${e ? ` ${e}` : ""}`,
2486
2620
  ...t
2487
2621
  }
2488
2622
  ) });
2489
2623
  }
2490
- const Xt = (n) => {
2624
+ const ns = (n) => {
2491
2625
  const {
2492
2626
  id: e,
2493
2627
  active: t,
2494
2628
  onClick: s,
2495
2629
  children: r,
2496
- to: o,
2497
- useLinks: i = !0,
2630
+ to: i,
2631
+ useLinks: o = !0,
2498
2632
  tabButtonProps: c
2499
- } = n, { linkComponent: a } = ae(), l = a;
2500
- if (!i) {
2633
+ } = n, { linkComponent: a } = ce(), u = a;
2634
+ if (!o) {
2501
2635
  const {
2502
- className: u = "",
2503
- variant: m = t ? "submit" : "outlined",
2504
- color: f = t ? "primary" : "default",
2505
- ...p
2636
+ className: d = "",
2637
+ variant: h = t ? "submit" : "outlined",
2638
+ color: m = t ? "primary" : "default",
2639
+ ...f
2506
2640
  } = c ?? {};
2507
- return /* @__PURE__ */ h(
2508
- K,
2641
+ return /* @__PURE__ */ p(
2642
+ U,
2509
2643
  {
2510
2644
  type: "button",
2511
- variant: m,
2512
- color: f,
2513
- className: `tab ${u}`,
2645
+ variant: h,
2646
+ color: m,
2647
+ className: `tab ${d}`,
2514
2648
  onClick: s,
2515
- ...p,
2649
+ ...f,
2516
2650
  children: r
2517
2651
  }
2518
2652
  );
2519
2653
  }
2520
- const d = `button submit tab ${t ? "primary" : "outlined"} ${(c == null ? void 0 : c.className) ?? ""}`.trim();
2521
- return /* @__PURE__ */ h(
2522
- l,
2654
+ const l = `button submit tab ${t ? "primary" : "outlined"} ${(c == null ? void 0 : c.className) ?? ""}`.trim();
2655
+ return /* @__PURE__ */ p(
2656
+ u,
2523
2657
  {
2524
- to: o ?? `#${e}`,
2658
+ to: i ?? `#${e}`,
2525
2659
  onClick: () => s(),
2526
- className: d,
2660
+ className: l,
2527
2661
  children: r
2528
2662
  }
2529
2663
  );
2530
- }, Zt = (n) => {
2531
- var f;
2664
+ }, rs = (n) => {
2665
+ var m;
2532
2666
  const {
2533
2667
  tabs: e = [],
2534
2668
  defaultTab: t,
2535
2669
  currentTab: s,
2536
2670
  onTabChange: r,
2537
- className: o = "",
2538
- tabsContainerClassName: i = "",
2671
+ className: i = "",
2672
+ tabsContainerClassName: o = "",
2539
2673
  useLinks: c = !0,
2540
2674
  tabButtonProps: a
2541
- } = n, [l, d] = A(t ?? ((f = e[0]) == null ? void 0 : f.id)), u = s ?? l, m = Q(() => e.find((p) => p.id === u), [e, u]);
2542
- return /* @__PURE__ */ k("div", { className: `tabs-layout-main ${o}`, children: [
2543
- /* @__PURE__ */ h(
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(
2544
2678
  "ul",
2545
2679
  {
2546
- className: `horizontal tabs tabs-container ${i}`,
2547
- children: e.map(({ id: p, to: y, label: g }) => /* @__PURE__ */ h("li", { children: /* @__PURE__ */ h(
2548
- Xt,
2680
+ className: `horizontal tabs tabs-container ${o}`,
2681
+ children: e.map(({ id: f, to: y, label: g }) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ p(
2682
+ ns,
2549
2683
  {
2550
2684
  onClick: () => {
2551
- s === void 0 && d(p), r == null || r(p);
2685
+ s === void 0 && l(f), r == null || r(f);
2552
2686
  },
2553
- id: p,
2687
+ id: f,
2554
2688
  to: y,
2555
2689
  siblings: e.length > 1,
2556
- active: u === p,
2690
+ active: d === f,
2557
2691
  useLinks: c,
2558
2692
  tabButtonProps: a,
2559
2693
  children: g
2560
2694
  }
2561
- ) }, p))
2695
+ ) }, f))
2562
2696
  }
2563
2697
  ),
2564
- m == null ? void 0 : m.content
2698
+ h == null ? void 0 : h.content
2565
2699
  ] });
2566
- }, es = (n) => {
2700
+ }, is = (n) => {
2567
2701
  const {
2568
2702
  title: e,
2569
2703
  body: t,
2570
2704
  content: s,
2571
2705
  onClickNext: r,
2572
- onSkip: o,
2573
- onStartAsGuest: i,
2706
+ onSkip: i,
2707
+ onStartAsGuest: o,
2574
2708
  onSignIn: c,
2575
2709
  image: a = "",
2576
- alt: l = "",
2577
- final: d = !1
2578
- } = n, { t: u } = v();
2579
- return /* @__PURE__ */ k("div", { className: "big-appear step-container", children: [
2580
- a && /* @__PURE__ */ h("img", { src: a, alt: l }),
2581
- e != null && /* @__PURE__ */ h("h2", { className: "step-title", children: e }),
2582
- t != null && /* @__PURE__ */ h("div", { className: "step-body", children: t }),
2583
- s != null && /* @__PURE__ */ h("div", { className: "step-content", children: s }),
2584
- /* @__PURE__ */ h("div", { className: "step-actions", children: d ? /* @__PURE__ */ k(oe, { children: [
2585
- /* @__PURE__ */ h(
2586
- K,
2710
+ alt: u = "",
2711
+ final: l = !1
2712
+ } = 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,
2587
2721
  {
2588
2722
  color: "primary",
2589
2723
  className: "step-button",
2590
2724
  variant: "outlined",
2591
- onClick: i,
2592
- "aria-label": u("_accessibility:ariaLabels.start"),
2593
- children: u("_accessibility:buttons.startAsGuest")
2725
+ onClick: o,
2726
+ "aria-label": d("_accessibility:ariaLabels.start"),
2727
+ children: d("_accessibility:buttons.startAsGuest")
2594
2728
  }
2595
2729
  ),
2596
- /* @__PURE__ */ h(
2597
- K,
2730
+ /* @__PURE__ */ p(
2731
+ U,
2598
2732
  {
2599
2733
  color: "primary",
2600
2734
  variant: "submit",
2601
2735
  className: "step-button",
2602
- "aria-label": u("_accessibility:ariaLabels.start"),
2736
+ "aria-label": d("_accessibility:ariaLabels.start"),
2603
2737
  onClick: c,
2604
- children: u("_accessibility:buttons.signIn")
2738
+ children: d("_accessibility:buttons.signIn")
2605
2739
  }
2606
2740
  )
2607
- ] }) : /* @__PURE__ */ k(oe, { children: [
2608
- /* @__PURE__ */ h(
2609
- K,
2741
+ ] }) : /* @__PURE__ */ S(ae, { children: [
2742
+ /* @__PURE__ */ p(
2743
+ U,
2610
2744
  {
2611
2745
  color: "primary",
2612
2746
  className: "step-button",
2613
2747
  variant: "outlined",
2614
- onClick: o,
2615
- "aria-label": u("_accessibility:ariaLabels.skip"),
2616
- children: u("_accessibility:buttons.skip")
2748
+ onClick: i,
2749
+ "aria-label": d("_accessibility:ariaLabels.skip"),
2750
+ children: d("_accessibility:buttons.skip")
2617
2751
  }
2618
2752
  ),
2619
- /* @__PURE__ */ h(
2620
- K,
2753
+ /* @__PURE__ */ p(
2754
+ U,
2621
2755
  {
2622
2756
  color: "primary",
2623
2757
  className: "step-button",
2624
2758
  variant: "outlined",
2625
2759
  onClick: () => r(),
2626
- "aria-label": u("_accessibility:ariaLabels.next"),
2627
- children: u("_accessibility:buttons.next")
2760
+ "aria-label": d("_accessibility:ariaLabels.next"),
2761
+ children: d("_accessibility:buttons.next")
2628
2762
  }
2629
2763
  )
2630
2764
  ] }) })
2631
2765
  ] });
2632
- }, Js = (n) => {
2766
+ }, rn = (n) => {
2633
2767
  const {
2634
2768
  steps: e,
2635
2769
  signInPath: t = "/auth/sign-in",
2636
2770
  guestPath: s = "/",
2637
2771
  onSkip: r,
2638
- onSignIn: o,
2639
- onStartAsGuest: i
2640
- } = n, { setGuestMode: c } = Ue(), { navigate: a } = ae(), [l, d] = A(1), u = w(() => {
2772
+ onSignIn: i,
2773
+ onStartAsGuest: o
2774
+ } = n, { setGuestMode: c } = Qe(), { navigate: a } = ce(), [u, l] = _(1), d = w(() => {
2641
2775
  if (r) {
2642
2776
  r();
2643
2777
  return;
2644
2778
  }
2645
2779
  a(t);
2646
- }, [a, r, t]), m = w(() => {
2647
- if (o) {
2648
- o();
2780
+ }, [a, r, t]), h = w(() => {
2781
+ if (i) {
2782
+ i();
2649
2783
  return;
2650
2784
  }
2651
2785
  a(t);
2652
- }, [a, o, t]), f = w(() => {
2653
- if (i) {
2654
- i();
2786
+ }, [a, i, t]), m = w(() => {
2787
+ if (o) {
2788
+ o();
2655
2789
  return;
2656
2790
  }
2657
2791
  c(!0), a(s);
2658
- }, [s, a, i, c]), p = Q(() => e.map((y, g) => ({
2792
+ }, [s, a, o, c]), f = H(() => e.map((y, g) => ({
2659
2793
  id: g + 1,
2660
2794
  label: "",
2661
- content: /* @__PURE__ */ h(
2662
- es,
2795
+ content: /* @__PURE__ */ p(
2796
+ is,
2663
2797
  {
2664
2798
  ...y,
2665
2799
  final: g === e.length - 1,
2666
- onClickNext: () => d((b) => b + 1),
2667
- onSkip: u,
2668
- onStartAsGuest: f,
2669
- onSignIn: m
2800
+ onClickNext: () => l((b) => b + 1),
2801
+ onSkip: d,
2802
+ onStartAsGuest: m,
2803
+ onSignIn: h
2670
2804
  }
2671
2805
  )
2672
- })), [m, u, f, e]);
2673
- return /* @__PURE__ */ h("div", { className: "onboarding-main", children: /* @__PURE__ */ h(
2674
- Zt,
2806
+ })), [h, d, m, e]);
2807
+ return /* @__PURE__ */ p("div", { className: "onboarding-main", children: /* @__PURE__ */ p(
2808
+ rs,
2675
2809
  {
2676
- currentTab: l,
2677
- onTabChange: (y) => d(Number(y)),
2678
- tabs: p,
2810
+ currentTab: u,
2811
+ onTabChange: (y) => l(Number(y)),
2812
+ tabs: f,
2679
2813
  useLinks: !1
2680
2814
  }
2681
2815
  ) });
2682
- }, ts = (n) => {
2816
+ }, os = (n) => {
2683
2817
  const {
2684
2818
  message: e,
2685
2819
  messageProps: t = { className: "empty-message" },
2686
2820
  action: s,
2687
2821
  iconProps: r
2688
2822
  } = n;
2689
- return /* @__PURE__ */ k("div", { className: "empty-container", children: [
2690
- r && /* @__PURE__ */ h(F, { ...r }),
2691
- /* @__PURE__ */ h("p", { ...t, children: e }),
2692
- s && /* @__PURE__ */ h(ct, { showTooltips: !1, showText: !0, ...s })
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 })
2693
2827
  ] });
2694
2828
  };
2695
2829
  export {
2696
- ue as APIClient,
2697
- en as Action,
2698
- tn as Actions,
2699
- sn as ActionsDropdown,
2700
- V as AppIconButton,
2701
- Mt as AuthClient,
2702
- Ls as AuthProvider,
2703
- ks as BaseClient,
2704
- nn as Button,
2705
- _s as ConfigProvider,
2706
- ys as ConfirmationDialog,
2707
- ye as Dialog,
2708
- be as DialogActions,
2709
- Is as Drawer,
2710
- He as DrawerMenuContext,
2711
- Rs as DrawerMenuProvider,
2712
- ts as Empty,
2713
- Hs as Error,
2714
- fs as FormContainer,
2715
- gs as FormDialog,
2716
- W as GlobalActions,
2717
- ws as IManager,
2718
- V as IconButton,
2719
- bs as ImportDialog,
2720
- Ss as IndexedDBClient,
2721
- As as ManagerProvider,
2722
- I as Methods,
2723
- Ws as Navbar,
2724
- Ve as NavbarContext,
2725
- Vs as NavbarProvider,
2726
- Gs as Notification,
2830
+ me as APIClient,
2831
+ ln as Action,
2832
+ un as Actions,
2833
+ dn as ActionsDropdown,
2834
+ G as AppIconButton,
2835
+ Kt as AuthClient,
2836
+ Os as AuthProvider,
2837
+ Ns as BaseClient,
2838
+ mn as Button,
2839
+ Ms as ConfigProvider,
2840
+ vs as ConfirmationDialog,
2841
+ ke as Dialog,
2842
+ ve as DialogActions,
2843
+ Ps as Drawer,
2844
+ Ve as DrawerMenuContext,
2845
+ Ds as DrawerMenuProvider,
2846
+ os as Empty,
2847
+ Ys as Error,
2848
+ ws as FormContainer,
2849
+ ks as FormDialog,
2850
+ z as GlobalActions,
2851
+ Ts as IManager,
2852
+ G as IconButton,
2853
+ Cs as ImportDialog,
2854
+ Es as IndexedDBClient,
2855
+ Fs as ManagerProvider,
2856
+ F as Methods,
2857
+ tn as Navbar,
2858
+ Ge as NavbarContext,
2859
+ en as NavbarProvider,
2860
+ sn as Notification,
2727
2861
  R as NotificationEnumType,
2728
- $s as NotificationProvider,
2729
- Js as Onboarding,
2730
- Qs as Page,
2731
- hs as ParagraphInput,
2732
- ps as PasswordInput,
2733
- Bs as PrettyGrid,
2734
- zs as SplashScreen,
2735
- es as Step,
2736
- Xt as Tab,
2737
- Zt as TabsLayout,
2738
- js as ToTop,
2862
+ Rs as NotificationProvider,
2863
+ rn as Onboarding,
2864
+ Xs as Page,
2865
+ bs as ParagraphInput,
2866
+ Ss as PasswordInput,
2867
+ Zs as PrettyGrid,
2868
+ nn as SplashScreen,
2869
+ is as Step,
2870
+ ns as Tab,
2871
+ rs as TabsLayout,
2872
+ Js as ToTop,
2739
2873
  Pt as buildQueryUrl,
2740
- Oe as createQueryClient,
2741
- vs as enumToKeyValueArray,
2742
- Ns as formatForDatetimeLocal,
2743
- z as fromLocal,
2744
- Cs as getFormattedDateTime,
2745
- Ts as getShortFormattedDateTime,
2746
- me as isHttpError,
2747
- Dt as isMac,
2748
- de as isValidationError,
2749
- fe as makeRequest,
2750
- Es as mapValidationErrors,
2751
- De as parseQueries,
2752
- xs as queryClient,
2753
- M as removeFromLocal,
2754
- B as toLocal,
2755
- Ue as useAuth,
2756
- ae as useConfig,
2757
- Qe as useConfirmationForm,
2758
- jt as useDeleteAction,
2759
- Fs as useDeleteDialog,
2760
- Be as useDialog,
2761
- Kt as useDrawerMenu,
2762
- Ds as useEditAction,
2763
- Qt as useExportAction,
2764
- Us as useExportActionMutate,
2765
- Os as useFormDialog,
2766
- Bt as useImportAction,
2767
- qs as useImportDialog,
2768
- Ft as useManager,
2769
- Gt as useNavbar,
2770
- J as useNotification,
2771
- Ms as usePostForm,
2772
- Ht as useRestoreAction,
2773
- Ks as useRestoreDialog,
2774
- Vt as useScrollTrigger,
2775
- Ps as useTimeAge
2874
+ qe as createQueryClient,
2875
+ $s as enumToKeyValueArray,
2876
+ Ls as formatForDatetimeLocal,
2877
+ X as fromLocal,
2878
+ xs as getFormattedDateTime,
2879
+ As as getShortFormattedDateTime,
2880
+ fe as isHttpError,
2881
+ qt as isMac,
2882
+ he as isValidationError,
2883
+ be as makeRequest,
2884
+ _s as mapValidationErrors,
2885
+ Pe as parseQueries,
2886
+ Is as queryClient,
2887
+ D as removeFromLocal,
2888
+ W as toLocal,
2889
+ Qe as useAuth,
2890
+ ce as useConfig,
2891
+ Be as useConfirmationForm,
2892
+ Bt as useDeleteAction,
2893
+ js as useDeleteDialog,
2894
+ We as useDialog,
2895
+ Qt as useDrawerMenu,
2896
+ Us as useEditAction,
2897
+ Hs as useEntityFormDialog,
2898
+ Gt as useExportAction,
2899
+ zs as useExportActionMutate,
2900
+ pe as useFormDialog,
2901
+ Qs as useFormDialogLegacy,
2902
+ zt as useImportAction,
2903
+ Gs as useImportDialog,
2904
+ Ut as useManager,
2905
+ Zt as useNavbar,
2906
+ ee as useNotification,
2907
+ Vs as usePostDialog,
2908
+ qs as usePostForm,
2909
+ Bs as usePutDialog,
2910
+ Wt as useRestoreAction,
2911
+ Ws as useRestoreDialog,
2912
+ Yt as useScrollTrigger,
2913
+ Ks as useTimeAge
2776
2914
  };