@sito/dashboard-app 0.0.46 → 0.0.47

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,98 +1,98 @@
1
1
  var Ss = Object.defineProperty;
2
- var Es = (t, e, s) => e in t ? Ss(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
3
- var W = (t, e, s) => Es(t, typeof e != "symbol" ? e + "" : e, s);
2
+ var Ts = (e, t, s) => t in e ? Ss(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var W = (e, t, s) => Ts(e, typeof t != "symbol" ? t + "" : t, s);
4
4
  import "./main.css";
5
- import { State as Ts, inputStateClassName as _s, labelStateClassName as Cs, helperTextStateClassName as xs, useTranslation as R, Button as ge, Loading as Le, TextInput as As, FileInput as Ns, IconButton as $s, Actions as Fs, ActionsDropdown as Ls, useTableOptions as Ds, Badge as Vs, Action as Rs } from "@sito/dashboard";
5
+ import { State as Es, inputStateClassName as _s, labelStateClassName as Cs, helperTextStateClassName as Ns, useTranslation as R, Button as ge, Loading as Le, TextInput as xs, FileInput as As, IconButton as Fs, Actions as $s, ActionsDropdown as Ls, useTableOptions as Ds, Badge as Vs, Action as Rs } from "@sito/dashboard";
6
6
  export * from "@sito/dashboard";
7
7
  import { Action as jn, Actions as Qn, ActionsDropdown as Gn, Button as zn } from "@sito/dashboard";
8
- import { jsxs as F, jsx as g, Fragment as Oe } from "react/jsx-runtime";
8
+ import { jsxs as $, jsx as g, Fragment as Oe } from "react/jsx-runtime";
9
9
  import { FontAwesomeIcon as ue } from "@fortawesome/react-fontawesome";
10
- import ae, { forwardRef as Bt, useState as X, useCallback as D, useEffect as me, useReducer as qt, useRef as Ue, createContext as De, useContext as Ve, useMemo as Ae, useLayoutEffect as Is } from "react";
11
- import { faEyeSlash as Ps, faEye as Ms, faClose as Ht, faTrash as Os, faRotateLeft as Wt, faPencil as Us, faCircleNotch as jt, faCloudArrowDown as Ks, faCloudUpload as Bs, faArrowUp as qs, faArrowLeft as Hs, faAdd as xt, faFilter as Ws, faBars as js, faSearch as Qs, faCircleCheck as Gs, faWarning as zs } from "@fortawesome/free-solid-svg-icons";
10
+ import ae, { forwardRef as Bt, useState as X, useCallback as D, useEffect as me, useReducer as qt, useRef as Ue, createContext as De, useContext as Ve, useMemo as xe, useLayoutEffect as Is } from "react";
11
+ import { faEyeSlash as Ps, faEye as Ms, faClose as Ht, faTrash as Os, faRotateLeft as Wt, faPencil as Us, faCircleNotch as jt, faCloudArrowDown as Ks, faCloudUpload as Bs, faArrowUp as qs, faArrowLeft as Hs, faAdd as Nt, faFilter as Ws, faBars as js, faSearch as Qs, faCircleCheck as Gs, faWarning as zs } from "@fortawesome/free-solid-svg-icons";
12
12
  import { createPortal as Qt } from "react-dom";
13
13
  import { QueryClient as Js, QueryClientProvider as Ys, useMutation as Ke, useQuery as Xs } from "@tanstack/react-query";
14
14
  import { faSadTear as Zs } from "@fortawesome/free-regular-svg-icons";
15
- const At = (t) => t == null ? !1 : `${t}`.length > 0, an = Bt(function(t, e) {
15
+ const xt = (e) => e == null ? !1 : `${e}`.length > 0, an = Bt(function(e, t) {
16
16
  const {
17
17
  value: s,
18
18
  defaultValue: r,
19
19
  onChange: i,
20
- state: n = Ts.default,
20
+ state: n = Es.default,
21
21
  name: a = "",
22
22
  id: o = "",
23
23
  label: l = "",
24
- disabled: y = !1,
25
- required: h = !1,
26
- containerClassName: f = "",
24
+ disabled: m = !1,
25
+ required: f = !1,
26
+ containerClassName: h = "",
27
27
  inputClassName: d = "",
28
28
  labelClassName: p = "",
29
- helperText: w = "",
29
+ helperText: b = "",
30
30
  helperTextClassName: S = "",
31
- ...T
32
- } = t, x = s !== void 0, [C, $] = X(
33
- () => At(r)
34
- ), A = x ? At(s) : C, N = (I) => {
35
- x || $(I.currentTarget.value.length > 0), i == null || i(I);
31
+ ...E
32
+ } = e, N = s !== void 0, [C, F] = X(
33
+ () => xt(r)
34
+ ), x = N ? xt(s) : C, A = (I) => {
35
+ N || F(I.currentTarget.value.length > 0), i == null || i(I);
36
36
  };
37
- return /* @__PURE__ */ F("div", { className: `form-paragraph-container group ${f}`, children: [
37
+ return /* @__PURE__ */ $("div", { className: `form-paragraph-container group ${h}`, children: [
38
38
  /* @__PURE__ */ g(
39
39
  "textarea",
40
40
  {
41
- ref: e,
41
+ ref: t,
42
42
  name: a,
43
43
  id: o,
44
- className: `text-input text-area form-paragraph-textarea peer ${_s(n)} ${A ? "has-value" : ""} ${T.placeholder ? "has-placeholder" : ""} ${d}`,
45
- required: h,
44
+ className: `text-input text-area form-paragraph-textarea peer ${_s(n)} ${x ? "has-value" : ""} ${E.placeholder ? "has-placeholder" : ""} ${d}`,
45
+ required: f,
46
46
  defaultValue: r,
47
- ...x ? { value: s } : {},
48
- onChange: N,
49
- disabled: y,
50
- ...T
47
+ ...N ? { value: s } : {},
48
+ onChange: A,
49
+ disabled: m,
50
+ ...E
51
51
  }
52
52
  ),
53
- /* @__PURE__ */ F(
53
+ /* @__PURE__ */ $(
54
54
  "label",
55
55
  {
56
56
  htmlFor: o,
57
57
  className: `text-input-label ${Cs(n)} ${p}`,
58
58
  children: [
59
59
  l,
60
- h ? " *" : ""
60
+ f ? " *" : ""
61
61
  ]
62
62
  }
63
63
  ),
64
- !!w && /* @__PURE__ */ g(
64
+ !!b && /* @__PURE__ */ g(
65
65
  "p",
66
66
  {
67
- className: `text-input-helper-text ${xs(n)} ${S}`,
68
- children: w
67
+ className: `text-input-helper-text ${Ns(n)} ${S}`,
68
+ children: b
69
69
  }
70
70
  )
71
71
  ] });
72
- }), on = (t) => {
73
- const { t: e } = R(), {
72
+ }), on = (e) => {
73
+ const { t } = R(), {
74
74
  children: s,
75
75
  handleSubmit: r,
76
76
  onSubmit: i,
77
77
  isLoading: n = !1,
78
78
  buttonEnd: a = !0,
79
79
  reset: o
80
- } = t;
81
- return /* @__PURE__ */ F("form", { className: "form-container", onSubmit: r(i), children: [
80
+ } = e;
81
+ return /* @__PURE__ */ $("form", { className: "form-container", onSubmit: r(i), children: [
82
82
  s,
83
- /* @__PURE__ */ F("div", { className: `form-actions ${a ? "end" : ""}`, children: [
84
- /* @__PURE__ */ F(
83
+ /* @__PURE__ */ $("div", { className: `form-actions ${a ? "end" : ""}`, children: [
84
+ /* @__PURE__ */ $(
85
85
  ge,
86
86
  {
87
87
  type: "submit",
88
88
  color: "primary",
89
89
  variant: "submit",
90
90
  disabled: n,
91
- name: e("_accessibility:buttons.submit"),
92
- "aria-label": e("_accessibility:ariaLabels.submit"),
91
+ name: t("_accessibility:buttons.submit"),
92
+ "aria-label": t("_accessibility:ariaLabels.submit"),
93
93
  children: [
94
94
  n ? /* @__PURE__ */ g(Le, { color: "stroke-base", loaderClass: "!w-6 mt-1", strokeWidth: "6" }) : null,
95
- e("_accessibility:buttons.submit")
95
+ t("_accessibility:buttons.submit")
96
96
  ]
97
97
  }
98
98
  ),
@@ -102,17 +102,17 @@ const At = (t) => t == null ? !1 : `${t}`.length > 0, an = Bt(function(t, e) {
102
102
  type: "button",
103
103
  variant: "outlined",
104
104
  onClick: () => o == null ? void 0 : o(),
105
- name: e("_accessibility:buttons.cancel"),
106
- "aria-label": e("_accessibility:ariaLabels.cancel"),
107
- children: e("_accessibility:buttons.cancel")
105
+ name: t("_accessibility:buttons.cancel"),
106
+ "aria-label": t("_accessibility:ariaLabels.cancel"),
107
+ children: t("_accessibility:buttons.cancel")
108
108
  }
109
109
  )
110
110
  ] })
111
111
  ] });
112
- }, cn = Bt(function(t, e) {
112
+ }, cn = Bt(function(e, t) {
113
113
  const { t: s } = R(), [r, i] = X(!1);
114
- return /* @__PURE__ */ g(As, { ...t, type: r ? "text" : "password", ref: e, children: /* @__PURE__ */ g(
115
- Ee,
114
+ return /* @__PURE__ */ g(xs, { ...e, type: r ? "text" : "password", ref: t, children: /* @__PURE__ */ g(
115
+ Te,
116
116
  {
117
117
  type: "button",
118
118
  tabIndex: -1,
@@ -124,8 +124,8 @@ const At = (t) => t == null ? !1 : `${t}`.length > 0, an = Bt(function(t, e) {
124
124
  icon: r ? Ps : Ms
125
125
  }
126
126
  ) });
127
- }), dt = (t) => {
128
- const { t: e } = R(), {
127
+ }), dt = (e) => {
128
+ const { t } = R(), {
129
129
  title: s,
130
130
  children: r,
131
131
  handleClose: i,
@@ -133,53 +133,53 @@ const At = (t) => t == null ? !1 : `${t}`.length > 0, an = Bt(function(t, e) {
133
133
  containerClassName: a = "",
134
134
  className: o = "",
135
135
  animationClass: l = "appear"
136
- } = t, y = D(
137
- (f) => {
138
- f.key === "Escape" && n && i();
136
+ } = e, m = D(
137
+ (h) => {
138
+ h.key === "Escape" && n && i();
139
139
  },
140
140
  [n, i]
141
141
  );
142
- me(() => (window.addEventListener("keydown", y), () => {
143
- window.removeEventListener("keydown", y);
144
- }), [y]);
145
- const h = D(
146
- (f) => {
147
- f.target === f.currentTarget && i();
142
+ me(() => (window.addEventListener("keydown", m), () => {
143
+ window.removeEventListener("keydown", m);
144
+ }), [m]);
145
+ const f = D(
146
+ (h) => {
147
+ h.target === h.currentTarget && i();
148
148
  },
149
149
  [i]
150
150
  );
151
151
  return me(() => {
152
- const f = (d) => {
152
+ const h = (d) => {
153
153
  d ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
154
154
  };
155
- return f(n), () => {
156
- f(!1);
155
+ return h(n), () => {
156
+ h(!1);
157
157
  };
158
158
  }, [n]), Qt(
159
159
  /* @__PURE__ */ g(
160
160
  "div",
161
161
  {
162
- "aria-label": e("_accessibility:ariaLabels.closeDialog"),
162
+ "aria-label": t("_accessibility:ariaLabels.closeDialog"),
163
163
  "aria-hidden": !n,
164
- onClick: h,
164
+ onClick: f,
165
165
  className: `dialog-backdrop animated ${n ? `opened ${l}` : "closed"} ${a}`,
166
- children: /* @__PURE__ */ F(
166
+ children: /* @__PURE__ */ $(
167
167
  "div",
168
168
  {
169
169
  className: `dialog elevated animated ${n ? `opened ${l}` : "closed"} ${o}`,
170
170
  children: [
171
- /* @__PURE__ */ F("div", { className: "dialog-header", children: [
171
+ /* @__PURE__ */ $("div", { className: "dialog-header", children: [
172
172
  /* @__PURE__ */ g("h3", { className: "dialog-title", children: s }),
173
173
  /* @__PURE__ */ g(
174
- Ee,
174
+ Te,
175
175
  {
176
176
  icon: Ht,
177
177
  disabled: !n,
178
178
  "aria-disabled": !n,
179
179
  onClick: i,
180
180
  className: "icon-button dialog-close-btn",
181
- name: e("_accessibility:buttons.closeDialog"),
182
- "aria-label": e("_accessibility:ariaLabels.closeDialog")
181
+ name: t("_accessibility:buttons.closeDialog"),
182
+ "aria-label": t("_accessibility:ariaLabels.closeDialog")
183
183
  }
184
184
  )
185
185
  ] }),
@@ -191,9 +191,9 @@ const At = (t) => t == null ? !1 : `${t}`.length > 0, an = Bt(function(t, e) {
191
191
  ),
192
192
  document.body
193
193
  );
194
- }, ft = (t) => {
194
+ }, ft = (e) => {
195
195
  const {
196
- primaryText: e,
196
+ primaryText: t,
197
197
  cancelText: s,
198
198
  onPrimaryClick: r,
199
199
  onCancel: i,
@@ -201,32 +201,32 @@ const At = (t) => t == null ? !1 : `${t}`.length > 0, an = Bt(function(t, e) {
201
201
  disabled: a = !1,
202
202
  primaryType: o = "submit",
203
203
  containerClassName: l = "",
204
- primaryClassName: y = "",
205
- alignEnd: h = !1,
206
- primaryName: f,
204
+ primaryClassName: m = "",
205
+ alignEnd: f = !1,
206
+ primaryName: h,
207
207
  primaryAriaLabel: d,
208
208
  cancelName: p,
209
- cancelAriaLabel: w
210
- } = t;
211
- return /* @__PURE__ */ F(
209
+ cancelAriaLabel: b
210
+ } = e;
211
+ return /* @__PURE__ */ $(
212
212
  "div",
213
213
  {
214
- className: `dialog-actions ${h ? "end" : ""} ${l}`,
214
+ className: `dialog-actions ${f ? "end" : ""} ${l}`,
215
215
  children: [
216
- /* @__PURE__ */ F(
216
+ /* @__PURE__ */ $(
217
217
  ge,
218
218
  {
219
219
  type: o,
220
220
  color: "primary",
221
221
  variant: "submit",
222
- className: y,
222
+ className: m,
223
223
  disabled: a,
224
224
  onClick: r,
225
- name: f,
225
+ name: h,
226
226
  "aria-label": d,
227
227
  children: [
228
228
  n ? /* @__PURE__ */ g(Le, { color: "stroke-base", loaderClass: "!w-6 mt-1", strokeWidth: "6" }) : null,
229
- e
229
+ t
230
230
  ]
231
231
  }
232
232
  ),
@@ -238,15 +238,15 @@ const At = (t) => t == null ? !1 : `${t}`.length > 0, an = Bt(function(t, e) {
238
238
  disabled: a,
239
239
  onClick: i,
240
240
  name: p,
241
- "aria-label": w,
241
+ "aria-label": b,
242
242
  children: s
243
243
  }
244
244
  )
245
245
  ]
246
246
  }
247
247
  );
248
- }, ln = (t) => {
249
- const { t: e } = R(), {
248
+ }, ln = (e) => {
249
+ const { t } = R(), {
250
250
  children: s,
251
251
  handleSubmit: r,
252
252
  onSubmit: i,
@@ -254,79 +254,79 @@ const At = (t) => t == null ? !1 : `${t}`.length > 0, an = Bt(function(t, e) {
254
254
  isLoading: a = !1,
255
255
  buttonEnd: o = !0,
256
256
  ...l
257
- } = t;
258
- return /* @__PURE__ */ g(dt, { ...l, handleClose: n, children: /* @__PURE__ */ F("form", { onSubmit: r(i), children: [
257
+ } = e;
258
+ return /* @__PURE__ */ g(dt, { ...l, handleClose: n, children: /* @__PURE__ */ $("form", { onSubmit: r(i), children: [
259
259
  /* @__PURE__ */ g("div", { className: "form-container", children: s }),
260
260
  /* @__PURE__ */ g(
261
261
  ft,
262
262
  {
263
263
  primaryType: "submit",
264
- primaryText: e("_accessibility:buttons.submit"),
265
- cancelText: e("_accessibility:buttons.cancel"),
264
+ primaryText: t("_accessibility:buttons.submit"),
265
+ cancelText: t("_accessibility:buttons.cancel"),
266
266
  onCancel: n,
267
267
  isLoading: a,
268
268
  disabled: a,
269
269
  primaryClassName: "dialog-form-primary",
270
270
  alignEnd: o,
271
- primaryName: e("_accessibility:buttons.submit"),
272
- primaryAriaLabel: e("_accessibility:ariaLabels.submit"),
273
- cancelName: e("_accessibility:buttons.cancel"),
274
- cancelAriaLabel: e("_accessibility:ariaLabels.cancel")
271
+ primaryName: t("_accessibility:buttons.submit"),
272
+ primaryAriaLabel: t("_accessibility:ariaLabels.submit"),
273
+ cancelName: t("_accessibility:buttons.cancel"),
274
+ cancelAriaLabel: t("_accessibility:ariaLabels.cancel")
275
275
  }
276
276
  )
277
277
  ] }) });
278
- }, un = (t) => {
279
- const { t: e } = R(), {
278
+ }, un = (e) => {
279
+ const { t } = R(), {
280
280
  children: s,
281
281
  handleSubmit: r,
282
282
  handleClose: i,
283
283
  isLoading: n = !1,
284
284
  ...a
285
- } = t;
286
- return /* @__PURE__ */ F(dt, { ...a, handleClose: i, children: [
285
+ } = e;
286
+ return /* @__PURE__ */ $(dt, { ...a, handleClose: i, children: [
287
287
  s,
288
288
  /* @__PURE__ */ g(
289
289
  ft,
290
290
  {
291
- primaryText: e("_accessibility:buttons.ok"),
292
- cancelText: e("_accessibility:buttons.cancel"),
291
+ primaryText: t("_accessibility:buttons.ok"),
292
+ cancelText: t("_accessibility:buttons.cancel"),
293
293
  onPrimaryClick: r,
294
294
  onCancel: i,
295
295
  isLoading: n,
296
296
  disabled: n,
297
297
  primaryType: "button",
298
298
  containerClassName: "mt-5",
299
- primaryName: e("_accessibility:buttons.ok"),
300
- primaryAriaLabel: e("_accessibility:ariaLabels.ok"),
301
- cancelName: e("_accessibility:buttons.cancel"),
302
- cancelAriaLabel: e("_accessibility:ariaLabels.cancel")
299
+ primaryName: t("_accessibility:buttons.ok"),
300
+ primaryAriaLabel: t("_accessibility:ariaLabels.ok"),
301
+ cancelName: t("_accessibility:buttons.cancel"),
302
+ cancelAriaLabel: t("_accessibility:ariaLabels.cancel")
303
303
  }
304
304
  )
305
305
  ] });
306
306
  };
307
- function er(t) {
308
- const { message: e, className: s = "" } = t, { t: r } = R();
309
- return /* @__PURE__ */ g("p", { className: `import-error-message ${s}`, children: e ?? r("_messages:errors.parseFile", {
307
+ function er(e) {
308
+ const { message: t, className: s = "" } = e, { t: r } = R();
309
+ return /* @__PURE__ */ g("p", { className: `import-error-message ${s}`, children: t ?? r("_messages:errors.parseFile", {
310
310
  defaultValue: "Failed to process file"
311
311
  }) });
312
312
  }
313
- function tr(t) {
314
- const { message: e, className: s = "" } = t, { t: r } = R();
315
- return /* @__PURE__ */ F("div", { className: `import-loading ${s}`, children: [
313
+ function tr(e) {
314
+ const { message: t, className: s = "" } = e, { t: r } = R();
315
+ return /* @__PURE__ */ $("div", { className: `import-loading ${s}`, children: [
316
316
  /* @__PURE__ */ g(Le, { loaderClass: "w-5 h-5", className: "!w-auto" }),
317
- /* @__PURE__ */ g("span", { children: e ?? r("_messages:loading.processingFile", {
317
+ /* @__PURE__ */ g("span", { children: t ?? r("_messages:loading.processingFile", {
318
318
  defaultValue: "Processing file..."
319
319
  }) })
320
320
  ] });
321
321
  }
322
- function sr(t) {
323
- const { items: e, max: s = 5, className: r = "" } = t, { t: i } = R();
324
- if (!e || e.length === 0) return null;
325
- const n = e.slice(0, s);
326
- return /* @__PURE__ */ F("div", { className: `import-preview ${r}`, children: [
322
+ function sr(e) {
323
+ const { items: t, max: s = 5, className: r = "" } = e, { t: i } = R();
324
+ if (!t || t.length === 0) return null;
325
+ const n = t.slice(0, s);
326
+ return /* @__PURE__ */ $("div", { className: `import-preview ${r}`, children: [
327
327
  /* @__PURE__ */ g("p", { className: "import-preview-count", children: i("_pages:common.actions.import.previewCount", {
328
- count: e.length,
329
- defaultValue: `Preview: ${e.length} items`
328
+ count: t.length,
329
+ defaultValue: `Preview: ${t.length} items`
330
330
  }) }),
331
331
  /* @__PURE__ */ g("pre", { className: "import-preview-content", children: JSON.stringify(n, null, 2) })
332
332
  ] });
@@ -339,24 +339,24 @@ const Gt = () => ({
339
339
  overrideExisting: !1,
340
340
  inputKey: 0
341
341
  });
342
- function rr(t, e) {
343
- switch (e.type) {
342
+ function rr(e, t) {
343
+ switch (t.type) {
344
344
  case "SET_FILE":
345
- return { ...t, file: e.file, previewItems: null, parseError: null, processing: !1 };
345
+ return { ...e, file: t.file, previewItems: null, parseError: null, processing: !1 };
346
346
  case "START_PROCESSING":
347
- return { ...t, processing: !0 };
347
+ return { ...e, processing: !0 };
348
348
  case "SET_PREVIEW":
349
- return { ...t, previewItems: e.items, parseError: null, processing: !1 };
349
+ return { ...e, previewItems: t.items, parseError: null, processing: !1 };
350
350
  case "SET_ERROR":
351
- return { ...t, previewItems: null, parseError: e.message, processing: !1 };
351
+ return { ...e, previewItems: null, parseError: t.message, processing: !1 };
352
352
  case "SET_OVERRIDE":
353
- return { ...t, overrideExisting: e.value };
353
+ return { ...e, overrideExisting: t.value };
354
354
  case "RESET":
355
- return { ...Gt(), inputKey: t.inputKey + 1 };
355
+ return { ...Gt(), inputKey: e.inputKey + 1 };
356
356
  }
357
357
  }
358
- const dn = (t) => {
359
- const { t: e } = R(), {
358
+ const dn = (e) => {
359
+ const { t } = R(), {
360
360
  children: s,
361
361
  handleSubmit: r,
362
362
  handleClose: i,
@@ -364,23 +364,23 @@ const dn = (t) => {
364
364
  fileProcessor: a,
365
365
  onFileProcessed: o,
366
366
  onOverrideChange: l,
367
- open: y,
368
- ...h
369
- } = t, [f, d] = qt(rr, Gt()), { file: p, previewItems: w, parseError: S, processing: T, overrideExisting: x, inputKey: C } = f, $ = Ue(o), A = Ue(a);
367
+ open: m,
368
+ ...f
369
+ } = e, [h, d] = qt(rr, Gt()), { file: p, previewItems: b, parseError: S, processing: E, overrideExisting: N, inputKey: C } = h, F = Ue(o), x = Ue(a);
370
370
  me(() => {
371
- $.current = o;
371
+ F.current = o;
372
372
  }, [o]), me(() => {
373
- A.current = a;
373
+ x.current = a;
374
374
  }, [a]), me(() => {
375
- y || d({ type: "RESET" });
376
- }, [y]);
377
- const N = D(async (I, O) => {
375
+ m || d({ type: "RESET" });
376
+ }, [m]);
377
+ const A = D(async (I, O) => {
378
378
  var re;
379
- if (A.current) {
379
+ if (x.current) {
380
380
  d({ type: "START_PROCESSING" });
381
381
  try {
382
- const P = await A.current(I, { override: O });
383
- d({ type: "SET_PREVIEW", items: P ?? [] }), (re = $.current) == null || re.call($, P ?? []);
382
+ const P = await x.current(I, { override: O });
383
+ d({ type: "SET_PREVIEW", items: P ?? [] }), (re = F.current) == null || re.call(F, P ?? []);
384
384
  } catch (P) {
385
385
  console.error(P);
386
386
  const ne = P instanceof Error ? P.message : "Failed to parse file";
@@ -388,76 +388,76 @@ const dn = (t) => {
388
388
  }
389
389
  }
390
390
  }, []);
391
- return /* @__PURE__ */ F(dt, { ...h, open: y, handleClose: i, children: [
391
+ return /* @__PURE__ */ $(dt, { ...f, open: m, handleClose: i, children: [
392
392
  /* @__PURE__ */ g(
393
- Ns,
393
+ As,
394
394
  {
395
395
  onClear: () => {
396
396
  var I;
397
- d({ type: "SET_FILE", file: null }), (I = $.current) == null || I.call($, []);
397
+ d({ type: "SET_FILE", file: null }), (I = F.current) == null || I.call(F, []);
398
398
  },
399
399
  onChange: (I) => {
400
400
  var re, P;
401
401
  const O = (re = I.target.files) == null ? void 0 : re[0];
402
402
  if (!O) {
403
- d({ type: "SET_FILE", file: null }), (P = $.current) == null || P.call($, []);
403
+ d({ type: "SET_FILE", file: null }), (P = F.current) == null || P.call(F, []);
404
404
  return;
405
405
  }
406
- d({ type: "SET_FILE", file: O }), N(O, x);
406
+ d({ type: "SET_FILE", file: O }), A(O, N);
407
407
  },
408
- label: e("_accessibility:labels.file")
408
+ label: t("_accessibility:labels.file")
409
409
  },
410
410
  C
411
411
  ),
412
- /* @__PURE__ */ F("label", { className: "import-override-label", children: [
412
+ /* @__PURE__ */ $("label", { className: "import-override-label", children: [
413
413
  /* @__PURE__ */ g(
414
414
  "input",
415
415
  {
416
416
  type: "checkbox",
417
- checked: x,
417
+ checked: N,
418
418
  onChange: (I) => {
419
419
  const O = I.target.checked;
420
- d({ type: "SET_OVERRIDE", value: O }), l == null || l(O), p && N(p, O);
420
+ d({ type: "SET_OVERRIDE", value: O }), l == null || l(O), p && A(p, O);
421
421
  }
422
422
  }
423
423
  ),
424
- /* @__PURE__ */ g("span", { children: e("_pages:common.actions.import.override", {
424
+ /* @__PURE__ */ g("span", { children: t("_pages:common.actions.import.override", {
425
425
  defaultValue: "Override existing items"
426
426
  }) })
427
427
  ] }),
428
428
  /* @__PURE__ */ g(er, { message: S }),
429
- T && /* @__PURE__ */ g(tr, {}),
430
- !!w && w.length > 0 && /* @__PURE__ */ g(sr, { items: w }),
429
+ E && /* @__PURE__ */ g(tr, {}),
430
+ !!b && b.length > 0 && /* @__PURE__ */ g(sr, { items: b }),
431
431
  s,
432
432
  /* @__PURE__ */ g(
433
433
  ft,
434
434
  {
435
- primaryText: e("_accessibility:buttons.ok"),
436
- cancelText: e("_accessibility:buttons.cancel"),
435
+ primaryText: t("_accessibility:buttons.ok"),
436
+ cancelText: t("_accessibility:buttons.cancel"),
437
437
  onPrimaryClick: () => {
438
- (!a || !!w && w.length > 0) && r();
438
+ (!a || !!b && b.length > 0) && r();
439
439
  },
440
440
  onCancel: i,
441
441
  isLoading: n,
442
442
  primaryType: "button",
443
443
  containerClassName: "import-dialog-actions",
444
- primaryName: e("_accessibility:buttons.ok"),
445
- primaryAriaLabel: e("_accessibility:ariaLabels.ok"),
446
- cancelName: e("_accessibility:buttons.cancel"),
447
- cancelAriaLabel: e("_accessibility:ariaLabels.cancel")
444
+ primaryName: t("_accessibility:buttons.ok"),
445
+ primaryAriaLabel: t("_accessibility:ariaLabels.ok"),
446
+ cancelName: t("_accessibility:buttons.cancel"),
447
+ cancelAriaLabel: t("_accessibility:ariaLabels.cancel")
448
448
  }
449
449
  )
450
450
  ] });
451
451
  };
452
- var J = /* @__PURE__ */ ((t) => (t[t.success = 0] = "success", t[t.error = 1] = "error", t[t.warning = 2] = "warning", t[t.info = 3] = "info", t))(J || {}), ee = /* @__PURE__ */ ((t) => (t.GET = "GET", t.POST = "POST", t.PUT = "PUT", t.PATCH = "PATCH", t.DELETE = "DELETE", t))(ee || {});
453
- async function at(t, e = "GET", s, r) {
452
+ var J = /* @__PURE__ */ ((e) => (e[e.success = 0] = "success", e[e.error = 1] = "error", e[e.warning = 2] = "warning", e[e.info = 3] = "info", e))(J || {}), ee = /* @__PURE__ */ ((e) => (e.GET = "GET", e.POST = "POST", e.PUT = "PUT", e.PATCH = "PATCH", e.DELETE = "DELETE", e))(ee || {});
453
+ async function at(e, t = "GET", s, r) {
454
454
  const i = {
455
455
  ...s ? { "Content-Type": "application/json" } : {},
456
456
  ...r
457
457
  };
458
458
  try {
459
- const n = await fetch(t, {
460
- method: e,
459
+ const n = await fetch(e, {
460
+ method: t,
461
461
  headers: i,
462
462
  ...s ? { body: JSON.stringify(s) } : {}
463
463
  }), a = await n.text();
@@ -494,19 +494,19 @@ async function at(t, e = "GET", s, r) {
494
494
  };
495
495
  }
496
496
  }
497
- function nr(t, e) {
498
- if (e) {
499
- const s = Object.entries(e).filter(([, r]) => r != null).map(
497
+ function nr(e, t) {
498
+ if (t) {
499
+ const s = Object.entries(t).filter(([, r]) => r != null).map(
500
500
  ([r, i]) => `${encodeURIComponent(r)}=${encodeURIComponent(String(i))}`
501
501
  ).join("&");
502
- return s ? `${t}?${s}` : t;
502
+ return s ? `${e}?${s}` : e;
503
503
  }
504
- return t;
504
+ return e;
505
505
  }
506
- const zt = (t, e, s) => {
506
+ const zt = (e, t, s) => {
507
507
  const r = [];
508
- if (e) {
509
- const { sortingBy: i, sortingOrder: n, currentPage: a, pageSize: o } = e;
508
+ if (t) {
509
+ const { sortingBy: i, sortingOrder: n, currentPage: a, pageSize: o } = t;
510
510
  i !== void 0 && r.push(`sort=${String(i)}`), n !== void 0 && r.push(`order=${n}`), a !== void 0 && r.push(`page=${a}`), o !== void 0 && r.push(`pageSize=${o}`);
511
511
  }
512
512
  if (s) {
@@ -523,15 +523,15 @@ const zt = (t, e, s) => {
523
523
  });
524
524
  i.length > 0 && r.push(`filters=${i.join(",")}`);
525
525
  }
526
- return r.length ? `${t}?${r.join("&")}` : t;
527
- }, Fe = class Fe {
526
+ return r.length ? `${e}?${r.join("&")}` : e;
527
+ }, $e = class $e {
528
528
  /**
529
529
  * @param baseUrl the base url of the server
530
530
  * @param userKey the local storage user key
531
531
  * @param secured if the api client requires token
532
532
  * @param tokenAcquirer custom token acquirer
533
533
  */
534
- constructor(e, s = "user", r = !0, i, n = {}) {
534
+ constructor(t, s = "user", r = !0, i, n = {}) {
535
535
  W(this, "baseUrl");
536
536
  W(this, "userKey");
537
537
  W(this, "rememberKey");
@@ -541,10 +541,10 @@ const zt = (t, e, s) => {
541
541
  W(this, "refreshExpirySkewMs");
542
542
  W(this, "secured");
543
543
  W(this, "tokenAcquirer");
544
- this.baseUrl = e, this.secured = r, this.userKey = s, this.rememberKey = n.rememberKey ?? "remember", this.refreshTokenKey = n.refreshTokenKey ?? "refreshToken", this.accessTokenExpiresAtKey = n.accessTokenExpiresAtKey ?? "accessTokenExpiresAt", this.refreshEndpoint = n.refreshEndpoint ?? "auth/refresh", this.refreshExpirySkewMs = n.refreshExpirySkewMs ?? 5e3, this.tokenAcquirer = i ?? this.defaultTokenAcquirer;
544
+ this.baseUrl = t, this.secured = r, this.userKey = s, this.rememberKey = n.rememberKey ?? "remember", this.refreshTokenKey = n.refreshTokenKey ?? "refreshToken", this.accessTokenExpiresAtKey = n.accessTokenExpiresAtKey ?? "accessTokenExpiresAt", this.refreshEndpoint = n.refreshEndpoint ?? "auth/refresh", this.refreshExpirySkewMs = n.refreshExpirySkewMs ?? 5e3, this.tokenAcquirer = i ?? this.defaultTokenAcquirer;
545
545
  }
546
- defaultTokenAcquirer(e) {
547
- if (e) return { credentials: "include" };
546
+ defaultTokenAcquirer(t) {
547
+ if (t) return { credentials: "include" };
548
548
  const s = Ce(this.userKey);
549
549
  if (s && s.length)
550
550
  return { Authorization: `Bearer ${s}` };
@@ -552,43 +552,43 @@ const zt = (t, e, s) => {
552
552
  getRefreshLockKey() {
553
553
  return `${this.baseUrl}|${this.userKey}|${this.refreshTokenKey}|${this.accessTokenExpiresAtKey}`;
554
554
  }
555
- buildUrl(e) {
556
- const s = this.baseUrl.endsWith("/") ? this.baseUrl.slice(0, -1) : this.baseUrl, r = e.startsWith("/") ? e : `/${e}`;
555
+ buildUrl(t) {
556
+ const s = this.baseUrl.endsWith("/") ? this.baseUrl.slice(0, -1) : this.baseUrl, r = t.startsWith("/") ? t : `/${t}`;
557
557
  return `${s}${r}`;
558
558
  }
559
559
  getRefreshToken() {
560
- const e = Ce(this.refreshTokenKey);
561
- if (typeof e == "string" && e.length)
562
- return e;
560
+ const t = Ce(this.refreshTokenKey);
561
+ if (typeof t == "string" && t.length)
562
+ return t;
563
563
  }
564
564
  getAccessTokenExpiresAt() {
565
- const e = Ce(this.accessTokenExpiresAtKey);
566
- if (typeof e == "string" && e.length)
567
- return e;
565
+ const t = Ce(this.accessTokenExpiresAtKey);
566
+ if (typeof t == "string" && t.length)
567
+ return t;
568
568
  }
569
569
  canRefresh() {
570
570
  return !!this.getRefreshToken();
571
571
  }
572
572
  shouldRefreshBeforeRequest() {
573
- const e = this.getRefreshToken(), s = this.getAccessTokenExpiresAt();
574
- if (!e || !s) return !1;
573
+ const t = this.getRefreshToken(), s = this.getAccessTokenExpiresAt();
574
+ if (!t || !s) return !1;
575
575
  const r = Date.parse(s);
576
576
  return Number.isNaN(r) ? !1 : Date.now() >= r - this.refreshExpirySkewMs;
577
577
  }
578
578
  clearStoredSession() {
579
579
  oe(this.userKey), oe(this.rememberKey), oe(this.refreshTokenKey), oe(this.accessTokenExpiresAtKey);
580
580
  }
581
- storeSession(e) {
582
- ke(this.userKey, e.token), typeof e.refreshToken == "string" && e.refreshToken.length ? ke(this.refreshTokenKey, e.refreshToken) : oe(this.refreshTokenKey), typeof e.accessTokenExpiresAt == "string" && e.accessTokenExpiresAt.length ? ke(this.accessTokenExpiresAtKey, e.accessTokenExpiresAt) : oe(this.accessTokenExpiresAtKey);
581
+ storeSession(t) {
582
+ ke(this.userKey, t.token), typeof t.refreshToken == "string" && t.refreshToken.length ? ke(this.refreshTokenKey, t.refreshToken) : oe(this.refreshTokenKey), typeof t.accessTokenExpiresAt == "string" && t.accessTokenExpiresAt.length ? ke(this.accessTokenExpiresAtKey, t.accessTokenExpiresAt) : oe(this.accessTokenExpiresAtKey);
583
583
  }
584
584
  async refreshAccessTokenWithMutex() {
585
- const e = this.getRefreshToken();
586
- if (!e)
585
+ const t = this.getRefreshToken();
586
+ if (!t)
587
587
  throw {
588
588
  status: 401,
589
589
  message: "Missing refresh token"
590
590
  };
591
- const s = this.getRefreshLockKey(), r = Fe.refreshInFlight.get(s);
591
+ const s = this.getRefreshLockKey(), r = $e.refreshInFlight.get(s);
592
592
  if (r) {
593
593
  await r;
594
594
  return;
@@ -597,7 +597,7 @@ const zt = (t, e, s) => {
597
597
  const { data: n, status: a, error: o } = await at(
598
598
  this.buildUrl(this.refreshEndpoint),
599
599
  ee.POST,
600
- { refreshToken: e }
600
+ { refreshToken: t }
601
601
  );
602
602
  if (o || !(n != null && n.token) || typeof n.refreshToken != "string" || !n.refreshToken.length)
603
603
  throw this.clearStoredSession(), o ?? {
@@ -606,37 +606,37 @@ const zt = (t, e, s) => {
606
606
  };
607
607
  this.storeSession(n);
608
608
  })();
609
- Fe.refreshInFlight.set(s, i);
609
+ $e.refreshInFlight.set(s, i);
610
610
  try {
611
611
  await i;
612
612
  } finally {
613
- Fe.refreshInFlight.delete(s);
613
+ $e.refreshInFlight.delete(s);
614
614
  }
615
615
  }
616
- mergeHeaders(e) {
616
+ mergeHeaders(t) {
617
617
  return {
618
618
  ...(this.secured ? this.tokenAcquirer() : {}) ?? {},
619
- ...e ?? {}
619
+ ...t ?? {}
620
620
  };
621
621
  }
622
- async makeRequestWithRefresh(e, s, r, i) {
622
+ async makeRequestWithRefresh(t, s, r, i) {
623
623
  this.secured && this.shouldRefreshBeforeRequest() && await this.refreshAccessTokenWithMutex();
624
624
  let n = await at(
625
- this.buildUrl(e),
625
+ this.buildUrl(t),
626
626
  s,
627
627
  r,
628
628
  this.mergeHeaders(i)
629
629
  );
630
630
  return this.secured && n.status === 401 && this.canRefresh() && (await this.refreshAccessTokenWithMutex(), n = await at(
631
- this.buildUrl(e),
631
+ this.buildUrl(t),
632
632
  s,
633
633
  r,
634
634
  this.mergeHeaders(i)
635
635
  )), n;
636
636
  }
637
- async doQuery(e, s = ee.GET, r, i) {
637
+ async doQuery(t, s = ee.GET, r, i) {
638
638
  const { data: n, status: a, error: o } = await this.makeRequestWithRefresh(
639
- e,
639
+ t,
640
640
  s,
641
641
  r,
642
642
  i
@@ -654,8 +654,8 @@ const zt = (t, e, s) => {
654
654
  * @param query - query parameters
655
655
  * @returns Result list
656
656
  */
657
- async get(e, s, r) {
658
- const i = zt(e, s, r), { data: n, error: a } = await this.makeRequestWithRefresh(
657
+ async get(t, s, r) {
658
+ const i = zt(t, s, r), { data: n, error: a } = await this.makeRequestWithRefresh(
659
659
  i,
660
660
  ee.GET
661
661
  );
@@ -668,9 +668,9 @@ const zt = (t, e, s) => {
668
668
  * @param data - data to update
669
669
  * @returns updated entity
670
670
  */
671
- async patch(e, s) {
671
+ async patch(t, s) {
672
672
  const { error: r, data: i, status: n } = await this.makeRequestWithRefresh(
673
- e,
673
+ t,
674
674
  ee.PATCH,
675
675
  s
676
676
  );
@@ -686,9 +686,9 @@ const zt = (t, e, s) => {
686
686
  * @param data - value to insert
687
687
  * @returns delete result
688
688
  */
689
- async delete(e, s) {
689
+ async delete(t, s) {
690
690
  const { error: r, data: i, status: n } = await this.makeRequestWithRefresh(
691
- e,
691
+ t,
692
692
  ee.DELETE,
693
693
  s
694
694
  );
@@ -705,9 +705,9 @@ const zt = (t, e, s) => {
705
705
  * @param data - value to insert
706
706
  * @returns inserted item
707
707
  */
708
- async post(e, s) {
708
+ async post(t, s) {
709
709
  const { error: r, data: i, status: n } = await this.makeRequestWithRefresh(
710
- e,
710
+ t,
711
711
  ee.POST,
712
712
  s
713
713
  );
@@ -719,32 +719,32 @@ const zt = (t, e, s) => {
719
719
  return i;
720
720
  }
721
721
  };
722
- W(Fe, "refreshInFlight", /* @__PURE__ */ new Map());
723
- let Ge = Fe;
722
+ W($e, "refreshInFlight", /* @__PURE__ */ new Map());
723
+ let Ge = $e;
724
724
  class ir {
725
- constructor(e, s = "user", r = {}) {
725
+ constructor(t, s = "user", r = {}) {
726
726
  W(this, "api");
727
- this.api = new Ge(e, s, !1, void 0, r);
727
+ this.api = new Ge(t, s, !1, void 0, r);
728
728
  }
729
- async login(e) {
730
- const s = "auth/sign-in", r = e;
729
+ async login(t) {
730
+ const s = "auth/sign-in", r = t;
731
731
  return await this.api.doQuery(
732
732
  s,
733
733
  ee.POST,
734
734
  r
735
735
  );
736
736
  }
737
- async refresh(e) {
737
+ async refresh(t) {
738
738
  return await this.api.doQuery(
739
739
  "auth/refresh",
740
740
  ee.POST,
741
- e
741
+ t
742
742
  );
743
743
  }
744
- async logout(e) {
745
- const s = "auth/sign-out", r = e != null && e.accessToken ? {
746
- Authorization: `Bearer ${e.accessToken}`
747
- } : void 0, i = e != null && e.refreshToken ? { refreshToken: e.refreshToken } : void 0;
744
+ async logout(t) {
745
+ const s = "auth/sign-out", r = t != null && t.accessToken ? {
746
+ Authorization: `Bearer ${t.accessToken}`
747
+ } : void 0, i = t != null && t.refreshToken ? { refreshToken: t.refreshToken } : void 0;
748
748
  return await this.api.doQuery(
749
749
  s,
750
750
  ee.POST,
@@ -752,11 +752,11 @@ class ir {
752
752
  r
753
753
  );
754
754
  }
755
- async register(e) {
755
+ async register(t) {
756
756
  return await this.api.doQuery(
757
757
  "auth/sign-up",
758
758
  ee.POST,
759
- e
759
+ t
760
760
  );
761
761
  }
762
762
  async getSession() {
@@ -769,9 +769,9 @@ class ir {
769
769
  }
770
770
  }
771
771
  class fn {
772
- constructor(e, s, r = {}) {
772
+ constructor(t, s, r = {}) {
773
773
  W(this, "auth");
774
- this.auth = new ir(e, s, r);
774
+ this.auth = new ir(t, s, r);
775
775
  }
776
776
  /**
777
777
  * @returns auth
@@ -786,30 +786,30 @@ class hn {
786
786
  * @param table
787
787
  * @param secured to see if the api client requires jwt protection
788
788
  */
789
- constructor(e, s, r = "user", i = !0, n = {}) {
789
+ constructor(t, s, r = "user", i = !0, n = {}) {
790
790
  W(this, "table");
791
791
  W(this, "secured");
792
792
  W(this, "api");
793
- this.table = e, this.secured = i, this.api = new Ge(s, r, i, void 0, n);
793
+ this.table = t, this.secured = i, this.api = new Ge(s, r, i, void 0, n);
794
794
  }
795
795
  /**
796
796
  *
797
797
  * @param value
798
798
  * @returns inserted item
799
799
  */
800
- async insert(e) {
801
- return await this.api.post(`${this.table}`, e);
800
+ async insert(t) {
801
+ return await this.api.post(`${this.table}`, t);
802
802
  }
803
803
  /**
804
804
  *
805
805
  * @param data - values to insert
806
806
  * @returns - Query result
807
807
  */
808
- async insertMany(e) {
808
+ async insertMany(t) {
809
809
  return await this.api.doQuery(
810
810
  `${this.table}/batch`,
811
811
  ee.POST,
812
- e
812
+ t
813
813
  );
814
814
  }
815
815
  /**
@@ -817,10 +817,10 @@ class hn {
817
817
  * @param value
818
818
  * @returns updated item
819
819
  */
820
- async update(e) {
820
+ async update(t) {
821
821
  return await this.api.patch(
822
- `${this.table}/${e.id}`,
823
- e
822
+ `${this.table}/${t.id}`,
823
+ t
824
824
  );
825
825
  }
826
826
  /**
@@ -829,19 +829,19 @@ class hn {
829
829
  * @param filters - Filters to apply
830
830
  * @returns - Query result
831
831
  */
832
- async get(e, s) {
833
- return await this.api.get(`${this.table}`, e, s);
832
+ async get(t, s) {
833
+ return await this.api.get(`${this.table}`, t, s);
834
834
  }
835
835
  /**
836
836
  *
837
837
  * @param filters - Filters to apply
838
838
  * @returns - List of elements
839
839
  */
840
- async export(e) {
840
+ async export(t) {
841
841
  const s = zt(
842
842
  `${this.table}/export`,
843
843
  void 0,
844
- e
844
+ t
845
845
  );
846
846
  return await this.api.doQuery(s, ee.GET, void 0);
847
847
  }
@@ -850,11 +850,11 @@ class hn {
850
850
  * @param data - Import data
851
851
  * @returns - List of elements
852
852
  */
853
- async import(e) {
853
+ async import(t) {
854
854
  return await this.api.doQuery(
855
855
  `${this.table}/import`,
856
856
  ee.POST,
857
- e
857
+ t
858
858
  );
859
859
  }
860
860
  /**
@@ -862,9 +862,9 @@ class hn {
862
862
  * @param query - Where conditions (key-value)
863
863
  * @returns - Query result
864
864
  */
865
- async commonGet(e) {
865
+ async commonGet(t) {
866
866
  return await this.api.doQuery(
867
- nr(`${this.table}/common`, e),
867
+ nr(`${this.table}/common`, t),
868
868
  ee.GET
869
869
  );
870
870
  }
@@ -873,26 +873,26 @@ class hn {
873
873
  * @param id
874
874
  * @returns - Query result
875
875
  */
876
- async getById(e) {
877
- return await this.api.doQuery(`${this.table}/${e}`);
876
+ async getById(t) {
877
+ return await this.api.doQuery(`${this.table}/${t}`);
878
878
  }
879
- async softDelete(e) {
880
- return await this.api.delete(`${this.table}`, e);
879
+ async softDelete(t) {
880
+ return await this.api.delete(`${this.table}`, t);
881
881
  }
882
- async restore(e) {
883
- return await this.api.patch(`${this.table}/restore`, e);
882
+ async restore(t) {
883
+ return await this.api.patch(`${this.table}/restore`, t);
884
884
  }
885
885
  }
886
886
  class mn {
887
- constructor(e, s, r = 1) {
887
+ constructor(t, s, r = 1) {
888
888
  W(this, "table");
889
889
  W(this, "dbName");
890
890
  W(this, "version");
891
891
  W(this, "db", null);
892
- this.table = e, this.dbName = s, this.version = r;
892
+ this.table = t, this.dbName = s, this.version = r;
893
893
  }
894
894
  open() {
895
- return this.db ? Promise.resolve(this.db) : new Promise((e, s) => {
895
+ return this.db ? Promise.resolve(this.db) : new Promise((t, s) => {
896
896
  const r = indexedDB.open(this.dbName, this.version);
897
897
  r.onupgradeneeded = (i) => {
898
898
  const n = i.target.result;
@@ -901,112 +901,112 @@ class mn {
901
901
  autoIncrement: !0
902
902
  });
903
903
  }, r.onsuccess = (i) => {
904
- this.db = i.target.result, e(this.db);
904
+ this.db = i.target.result, t(this.db);
905
905
  }, r.onerror = (i) => {
906
906
  s(i.target.error);
907
907
  };
908
908
  });
909
909
  }
910
- async transaction(e) {
911
- return (await this.open()).transaction(this.table, e).objectStore(this.table);
910
+ async transaction(t) {
911
+ return (await this.open()).transaction(this.table, t).objectStore(this.table);
912
912
  }
913
- request(e) {
913
+ request(t) {
914
914
  return new Promise((s, r) => {
915
- e.onsuccess = () => s(e.result), e.onerror = () => r(e.error);
915
+ t.onsuccess = () => s(t.result), t.onerror = () => r(t.error);
916
916
  });
917
917
  }
918
- async insert(e) {
919
- const s = await this.transaction("readwrite"), r = await this.request(s.add(e));
920
- return { ...e, id: r };
918
+ async insert(t) {
919
+ const s = await this.transaction("readwrite"), r = await this.request(s.add(t));
920
+ return { ...t, id: r };
921
921
  }
922
- async insertMany(e) {
922
+ async insertMany(t) {
923
923
  const s = await this.transaction("readwrite");
924
924
  let r = 0;
925
- for (const i of e)
925
+ for (const i of t)
926
926
  r = await this.request(s.add(i));
927
- return { ...e[e.length - 1], id: r };
927
+ return { ...t[t.length - 1], id: r };
928
928
  }
929
- async update(e) {
930
- const s = await this.transaction("readwrite");
931
- return await this.request(s.put(e)), e;
929
+ async update(t, s) {
930
+ const r = await this.transaction("readwrite");
931
+ return await this.request(r.put(s)), s;
932
932
  }
933
- async get(e, s) {
933
+ async get(t, s) {
934
934
  var p;
935
- const r = await this.transaction("readonly"), i = await this.request(r.getAll()), n = this.applyFilter(i, s), a = (e == null ? void 0 : e.sortingBy) ?? "id", o = ((p = e == null ? void 0 : e.sortingOrder) == null ? void 0 : p.toLowerCase()) ?? "asc";
936
- n.sort((w, S) => {
937
- const T = w[a], x = S[a];
938
- return T < x ? o === "asc" ? -1 : 1 : T > x ? o === "asc" ? 1 : -1 : 0;
935
+ const r = await this.transaction("readonly"), i = await this.request(r.getAll()), n = this.applyFilter(i, s), a = (t == null ? void 0 : t.sortingBy) ?? "id", o = ((p = t == null ? void 0 : t.sortingOrder) == null ? void 0 : p.toLowerCase()) ?? "asc";
936
+ n.sort((b, S) => {
937
+ const E = b[a], N = S[a];
938
+ return E < N ? o === "asc" ? -1 : 1 : E > N ? o === "asc" ? 1 : -1 : 0;
939
939
  });
940
- const l = (e == null ? void 0 : e.pageSize) ?? 10, y = (e == null ? void 0 : e.currentPage) ?? 0, h = n.length, f = Math.ceil(h / l), d = n.slice(
941
- y * l,
942
- y * l + l
940
+ const l = (t == null ? void 0 : t.pageSize) ?? 10, m = (t == null ? void 0 : t.currentPage) ?? 0, f = n.length, h = Math.ceil(f / l), d = n.slice(
941
+ m * l,
942
+ m * l + l
943
943
  );
944
944
  return {
945
945
  sort: a,
946
946
  order: o,
947
- currentPage: y,
947
+ currentPage: m,
948
948
  pageSize: l,
949
- totalElements: h,
950
- totalPages: f,
949
+ totalElements: f,
950
+ totalPages: h,
951
951
  items: d
952
952
  };
953
953
  }
954
- async export(e) {
954
+ async export(t) {
955
955
  const s = await this.transaction("readonly"), r = await this.request(s.getAll());
956
- return this.applyFilter(r, e);
956
+ return this.applyFilter(r, t);
957
957
  }
958
- async import(e) {
958
+ async import(t) {
959
959
  const s = await this.transaction("readwrite");
960
960
  let r = 0;
961
- for (const i of e.items)
962
- e.override ? await this.request(s.put(i)) : await this.request(s.add(i)), r++;
961
+ for (const i of t.items)
962
+ t.override ? await this.request(s.put(i)) : await this.request(s.add(i)), r++;
963
963
  return r;
964
964
  }
965
- async commonGet(e) {
965
+ async commonGet(t) {
966
966
  const s = await this.transaction("readonly"), r = await this.request(s.getAll());
967
- return this.applyFilter(r, e);
967
+ return this.applyFilter(r, t);
968
968
  }
969
- async getById(e) {
970
- const s = await this.transaction("readonly"), r = await this.request(s.get(e));
971
- if (!r) throw new Error(`Record ${e} not found in ${this.table}`);
969
+ async getById(t) {
970
+ const s = await this.transaction("readonly"), r = await this.request(s.get(t));
971
+ if (!r) throw new Error(`Record ${t} not found in ${this.table}`);
972
972
  return r;
973
973
  }
974
- async softDelete(e) {
974
+ async softDelete(t) {
975
975
  const s = await this.transaction("readwrite");
976
976
  let r = 0;
977
- for (const i of e) {
977
+ for (const i of t) {
978
978
  const n = await this.request(s.get(i));
979
979
  n && (await this.request(s.put({ ...n, deletedAt: /* @__PURE__ */ new Date() })), r++);
980
980
  }
981
981
  return r;
982
982
  }
983
- async restore(e) {
983
+ async restore(t) {
984
984
  const s = await this.transaction("readwrite");
985
985
  let r = 0;
986
- for (const i of e) {
986
+ for (const i of t) {
987
987
  const n = await this.request(s.get(i));
988
988
  n && (await this.request(s.put({ ...n, deletedAt: null })), r++);
989
989
  }
990
990
  return r;
991
991
  }
992
- applyFilter(e, s) {
993
- return s ? e.filter(
992
+ applyFilter(t, s) {
993
+ return s ? t.filter(
994
994
  (r) => Object.keys(s).every(
995
995
  (i) => s[i] === void 0 || r[i] === s[i]
996
996
  )
997
- ) : e;
997
+ ) : t;
998
998
  }
999
999
  }
1000
- function yn(t) {
1001
- return Object.keys(t).filter((e) => isNaN(Number(e))).map((e) => ({
1002
- key: e,
1003
- value: t[e]
1000
+ function yn(e) {
1001
+ return Object.keys(e).filter((t) => isNaN(Number(t))).map((t) => ({
1002
+ key: t,
1003
+ value: e[t]
1004
1004
  }));
1005
1005
  }
1006
- const Ce = (t, e = "") => {
1007
- const s = localStorage.getItem(t) ?? void 0;
1008
- if (s && e.length)
1009
- switch (e) {
1006
+ const Ce = (e, t = "") => {
1007
+ const s = localStorage.getItem(e) ?? void 0;
1008
+ if (s && t.length)
1009
+ switch (t) {
1010
1010
  case "object":
1011
1011
  return JSON.parse(s);
1012
1012
  case "number":
@@ -1017,12 +1017,12 @@ const Ce = (t, e = "") => {
1017
1017
  return s;
1018
1018
  }
1019
1019
  return s;
1020
- }, ke = (t, e) => localStorage.setItem(
1021
- t,
1022
- typeof e == "object" ? JSON.stringify(e) : e
1023
- ), oe = (t) => localStorage.removeItem(t);
1024
- function gn(t) {
1025
- const e = t ? new Date(t) : /* @__PURE__ */ new Date(), s = {
1020
+ }, ke = (e, t) => localStorage.setItem(
1021
+ e,
1022
+ typeof t == "object" ? JSON.stringify(t) : t
1023
+ ), oe = (e) => localStorage.removeItem(e);
1024
+ function gn(e) {
1025
+ const t = e ? new Date(e) : /* @__PURE__ */ new Date(), s = {
1026
1026
  weekday: "long",
1027
1027
  // martes
1028
1028
  day: "numeric",
@@ -1038,83 +1038,83 @@ function gn(t) {
1038
1038
  hour12: !0
1039
1039
  // PM
1040
1040
  };
1041
- return e.toLocaleString(
1041
+ return t.toLocaleString(
1042
1042
  navigator.language || "es-ES",
1043
1043
  s
1044
1044
  );
1045
1045
  }
1046
- function pn(t) {
1047
- const e = t ? new Date(t) : /* @__PURE__ */ new Date(), s = String(e.getDate()).padStart(2, "0"), r = String(e.getMonth() + 1).padStart(2, "0"), i = String(e.getFullYear()).slice(-2), n = String(e.getHours()).padStart(2, "0"), a = String(e.getMinutes()).padStart(2, "0");
1046
+ function pn(e) {
1047
+ const t = e ? new Date(e) : /* @__PURE__ */ new Date(), s = String(t.getDate()).padStart(2, "0"), r = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getFullYear()).slice(-2), n = String(t.getHours()).padStart(2, "0"), a = String(t.getMinutes()).padStart(2, "0");
1048
1048
  return `${s}/${r}/${i} ${n}:${a}`;
1049
1049
  }
1050
- function bn(t) {
1051
- const e = t ? new Date(t) : /* @__PURE__ */ new Date(), s = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), i = String(e.getDate()).padStart(2, "0"), n = String(e.getHours()).padStart(2, "0"), a = String(e.getMinutes()).padStart(2, "0");
1050
+ function bn(e) {
1051
+ const t = e ? new Date(e) : /* @__PURE__ */ new Date(), s = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0"), n = String(t.getHours()).padStart(2, "0"), a = String(t.getMinutes()).padStart(2, "0");
1052
1052
  return `${s}-${r}-${i}T${n}:${a}`;
1053
1053
  }
1054
1054
  const ar = () => {
1055
1055
  var s;
1056
- const t = navigator, e = ((s = t == null ? void 0 : t.userAgentData) == null ? void 0 : s.platform) || (t == null ? void 0 : t.platform) || "";
1057
- return /Mac|iPhone|iPod|iPad/i.test(e);
1056
+ const e = navigator, t = ((s = e == null ? void 0 : e.userAgentData) == null ? void 0 : s.platform) || (e == null ? void 0 : e.platform) || "";
1057
+ return /Mac|iPhone|iPod|iPad/i.test(t);
1058
1058
  };
1059
- function Xe(t) {
1060
- if (!t || typeof t != "object") return !1;
1061
- const e = t;
1062
- return Array.isArray(e.errors) && e.errors.every(
1059
+ function Xe(e) {
1060
+ if (!e || typeof e != "object") return !1;
1061
+ const t = e;
1062
+ return Array.isArray(t.errors) && t.errors.every(
1063
1063
  (s) => Array.isArray(s) && s.length === 2 && typeof s[0] == "string"
1064
1064
  );
1065
1065
  }
1066
- function Ze(t) {
1067
- if (!t || typeof t != "object") return !1;
1068
- const e = t;
1069
- return typeof (e == null ? void 0 : e.status) == "number" && typeof (e == null ? void 0 : e.message) == "string";
1066
+ function Ze(e) {
1067
+ if (!e || typeof e != "object") return !1;
1068
+ const t = e;
1069
+ return typeof (t == null ? void 0 : t.status) == "number" && typeof (t == null ? void 0 : t.message) == "string";
1070
1070
  }
1071
- function wn(t, e) {
1072
- return t != null && t.errors ? t.errors.map(([s, r]) => e(s, r)) : [];
1071
+ function wn(e, t) {
1072
+ return e != null && e.errors ? e.errors.map(([s, r]) => t(s, r)) : [];
1073
1073
  }
1074
1074
  const Jt = De(
1075
1075
  void 0
1076
1076
  );
1077
- function vn(t) {
1078
- const { children: e } = t, s = Ue(0), [r, i] = qt(
1079
- (f, d) => {
1080
- const { type: p, items: w, id: S } = d;
1077
+ function vn(e) {
1078
+ const { children: t } = e, s = Ue(0), [r, i] = qt(
1079
+ (h, d) => {
1080
+ const { type: p, items: b, id: S } = d;
1081
1081
  switch (p) {
1082
1082
  case "set":
1083
- return w ?? [];
1083
+ return b ?? [];
1084
1084
  case "remove":
1085
- return S !== void 0 ? f.filter((T) => T.id !== S) : [];
1085
+ return S !== void 0 ? h.filter((E) => E.id !== S) : [];
1086
1086
  }
1087
- return f;
1087
+ return h;
1088
1088
  },
1089
1089
  [],
1090
1090
  () => []
1091
- ), n = (f) => f.map((d) => ({ ...d, id: s.current++ })), a = (f) => i({
1091
+ ), n = (h) => h.map((d) => ({ ...d, id: s.current++ })), a = (h) => i({
1092
1092
  type: "set",
1093
- items: n([{ ...f, type: J.error }])
1094
- }), o = (f) => i({ type: "set", items: n([{ ...f }]) }), l = (f) => i({ type: "set", items: n(f) }), y = (f) => i({
1093
+ items: n([{ ...h, type: J.error }])
1094
+ }), o = (h) => i({ type: "set", items: n([{ ...h }]) }), l = (h) => i({ type: "set", items: n(h) }), m = (h) => i({
1095
1095
  type: "set",
1096
- items: n([{ ...f, type: J.success }])
1097
- }), h = (f) => i({ type: "remove", id: f });
1096
+ items: n([{ ...h, type: J.success }])
1097
+ }), f = (h) => i({ type: "remove", id: h });
1098
1098
  return /* @__PURE__ */ g(
1099
1099
  Jt.Provider,
1100
1100
  {
1101
1101
  value: {
1102
1102
  notification: r,
1103
- removeNotification: h,
1103
+ removeNotification: f,
1104
1104
  showErrorNotification: a,
1105
1105
  showNotification: o,
1106
- showSuccessNotification: y,
1106
+ showSuccessNotification: m,
1107
1107
  showStackNotifications: l
1108
1108
  },
1109
- children: e
1109
+ children: t
1110
1110
  }
1111
1111
  );
1112
1112
  }
1113
- const Ne = () => {
1114
- const t = Ve(Jt);
1115
- if (!t)
1113
+ const Ae = () => {
1114
+ const e = Ve(Jt);
1115
+ if (!e)
1116
1116
  throw new Error("NotificationContext must be used within a Provider");
1117
- return t;
1117
+ return e;
1118
1118
  }, we = new Js({
1119
1119
  defaultOptions: {
1120
1120
  queries: {
@@ -1129,86 +1129,86 @@ const Ne = () => {
1129
1129
  }
1130
1130
  }), Yt = De(
1131
1131
  void 0
1132
- ), kn = (t) => {
1133
- const { children: e, manager: s } = t;
1134
- return /* @__PURE__ */ g(Yt.Provider, { value: { client: s }, children: /* @__PURE__ */ g(Ys, { client: we, children: e }) });
1132
+ ), kn = (e) => {
1133
+ const { children: t, manager: s } = e;
1134
+ return /* @__PURE__ */ g(Yt.Provider, { value: { client: s }, children: /* @__PURE__ */ g(Ys, { client: we, children: t }) });
1135
1135
  }, or = () => {
1136
- const t = Ve(Yt);
1137
- if (!t)
1136
+ const e = Ve(Yt);
1137
+ if (!e)
1138
1138
  throw new Error("managerContext must be used within a Provider");
1139
- return t.client;
1139
+ return e.client;
1140
1140
  }, Xt = De(
1141
1141
  void 0
1142
- ), Sn = (t) => {
1142
+ ), Sn = (e) => {
1143
1143
  const {
1144
- children: e,
1144
+ children: t,
1145
1145
  guestMode: s = "guest_mode",
1146
1146
  user: r = "user",
1147
1147
  remember: i = "remember",
1148
1148
  refreshTokenKey: n = "refreshToken",
1149
1149
  accessTokenExpiresAtKey: a = "accessTokenExpiresAt"
1150
- } = t, o = or(), [l, y] = X({}), h = D(() => {
1150
+ } = e, o = or(), [l, m] = X({}), f = D(() => {
1151
1151
  oe(r), oe(i), oe(n), oe(a);
1152
- }, [a, n, i, r]), f = D(() => !!Ce(s, "boolean") && l.token === void 0, [l.token, s]), d = D((x) => {
1153
- ke(s, x);
1154
- }, [s]), p = D((x, C) => {
1155
- if (!x) return;
1156
- const $ = Ce(i, "boolean"), A = C ?? (typeof $ == "boolean" ? $ : !1);
1157
- y(x), oe(s), ke(r, x.token), ke(i, A), typeof x.refreshToken == "string" && x.refreshToken.length ? ke(n, x.refreshToken) : oe(n), typeof x.accessTokenExpiresAt == "string" && x.accessTokenExpiresAt.length ? ke(a, x.accessTokenExpiresAt) : oe(a);
1152
+ }, [a, n, i, r]), h = D(() => !!Ce(s, "boolean") && l.token === void 0, [l.token, s]), d = D((N) => {
1153
+ ke(s, N);
1154
+ }, [s]), p = D((N, C) => {
1155
+ if (!N) return;
1156
+ const F = Ce(i, "boolean"), x = C ?? (typeof F == "boolean" ? F : !1);
1157
+ m(N), oe(s), ke(r, N.token), ke(i, x), typeof N.refreshToken == "string" && N.refreshToken.length ? ke(n, N.refreshToken) : oe(n), typeof N.accessTokenExpiresAt == "string" && N.accessTokenExpiresAt.length ? ke(a, N.accessTokenExpiresAt) : oe(a);
1158
1158
  }, [
1159
1159
  a,
1160
1160
  s,
1161
1161
  n,
1162
1162
  i,
1163
1163
  r
1164
- ]), w = D(async () => {
1165
- const x = Ce(r) ?? l.token, C = Ce(n) ?? (typeof l.refreshToken == "string" ? l.refreshToken : void 0);
1164
+ ]), b = D(async () => {
1165
+ const N = Ce(r) ?? l.token, C = Ce(n) ?? (typeof l.refreshToken == "string" ? l.refreshToken : void 0);
1166
1166
  try {
1167
1167
  await o.Auth.logout({
1168
- accessToken: x,
1168
+ accessToken: N,
1169
1169
  refreshToken: C
1170
1170
  });
1171
- } catch ($) {
1172
- console.error($);
1171
+ } catch (F) {
1172
+ console.error(F);
1173
1173
  }
1174
- y({}), h();
1175
- }, [l.refreshToken, l.token, h, o.Auth, n, r]), S = D(async () => {
1174
+ m({}), f();
1175
+ }, [l.refreshToken, l.token, f, o.Auth, n, r]), S = D(async () => {
1176
1176
  try {
1177
- const x = await o.Auth.getSession();
1178
- p(x);
1179
- } catch (x) {
1180
- console.error(x), w();
1177
+ const N = await o.Auth.getSession();
1178
+ p(N);
1179
+ } catch (N) {
1180
+ console.error(N), b();
1181
1181
  }
1182
- }, [p, w, o.Auth]), T = {
1182
+ }, [p, b, o.Auth]), E = {
1183
1183
  account: l,
1184
1184
  logUser: p,
1185
- logoutUser: w,
1185
+ logoutUser: b,
1186
1186
  logUserFromLocal: S,
1187
- isInGuestMode: f,
1187
+ isInGuestMode: h,
1188
1188
  setGuestMode: d
1189
1189
  };
1190
- return /* @__PURE__ */ g(Xt.Provider, { value: T, children: e });
1190
+ return /* @__PURE__ */ g(Xt.Provider, { value: E, children: t });
1191
1191
  }, Zt = () => {
1192
- const t = Ve(Xt);
1193
- if (!t)
1192
+ const e = Ve(Xt);
1193
+ if (!e)
1194
1194
  throw new Error("authContext must be used within a Provider");
1195
- return t;
1196
- }, es = De({}), En = (t) => {
1197
- const { children: e, location: s, navigate: r, linkComponent: i, searchComponent: n } = t;
1195
+ return e;
1196
+ }, es = De({}), Tn = (e) => {
1197
+ const { children: t, location: s, navigate: r, linkComponent: i, searchComponent: n } = e;
1198
1198
  return /* @__PURE__ */ g(
1199
1199
  es.Provider,
1200
1200
  {
1201
1201
  value: { location: s, navigate: r, linkComponent: i, searchComponent: n },
1202
- children: e
1202
+ children: t
1203
1203
  }
1204
1204
  );
1205
1205
  }, Be = () => {
1206
- const t = Ve(es);
1207
- if (t === void 0 || Object.keys(t).length === 0)
1206
+ const e = Ve(es);
1207
+ if (e === void 0 || Object.keys(e).length === 0)
1208
1208
  throw new Error(
1209
1209
  "Config provider has not been set. This step is required and cannot be skipped."
1210
1210
  );
1211
- return t;
1211
+ return e;
1212
1212
  }, cr = {
1213
1213
  addChildItem: () => {
1214
1214
  },
@@ -1219,25 +1219,25 @@ const Ne = () => {
1219
1219
  dynamicItems: {}
1220
1220
  }, ts = De(
1221
1221
  cr
1222
- ), Tn = (t) => {
1223
- const { children: e } = t, [s, r] = X({}), i = D(
1224
- (l, y) => r((h) => ({
1225
- ...h,
1226
- [l]: [...h[l] ?? [], y]
1222
+ ), En = (e) => {
1223
+ const { children: t } = e, [s, r] = X({}), i = D(
1224
+ (l, m) => r((f) => ({
1225
+ ...f,
1226
+ [l]: [...f[l] ?? [], m]
1227
1227
  })),
1228
1228
  []
1229
1229
  ), n = D(
1230
- (l, y) => r((h) => ({
1231
- ...h,
1232
- [l]: (h[l] ?? []).filter((f, d) => d !== y)
1230
+ (l, m) => r((f) => ({
1231
+ ...f,
1232
+ [l]: (f[l] ?? []).filter((h, d) => d !== m)
1233
1233
  })),
1234
1234
  []
1235
1235
  ), a = D((l) => {
1236
- r(l ? (y) => ({
1237
- ...y,
1236
+ r(l ? (m) => ({
1237
+ ...m,
1238
1238
  [l]: []
1239
1239
  }) : {});
1240
- }, []), o = Ae(
1240
+ }, []), o = xe(
1241
1241
  () => ({
1242
1242
  dynamicItems: s,
1243
1243
  addChildItem: i,
@@ -1250,17 +1250,17 @@ const Ne = () => {
1250
1250
  ts.Provider,
1251
1251
  {
1252
1252
  value: o,
1253
- children: e
1253
+ children: t
1254
1254
  }
1255
1255
  );
1256
1256
  }, lr = () => Ve(ts);
1257
- function _n(t) {
1258
- const { t: e } = R(), { open: s, onClose: r, menuMap: i, logo: n } = t, { account: a } = Zt(), { dynamicItems: o } = lr(), { linkComponent: l, location: y } = Be(), h = l, f = Ae(() => i.filter((T) => {
1259
- const x = T.auth, C = !!(a != null && a.email);
1260
- return x == null || x && C || !x && !C;
1257
+ function _n(e) {
1258
+ const { t } = R(), { open: s, onClose: r, menuMap: i, logo: n } = e, { account: a } = Zt(), { dynamicItems: o } = lr(), { linkComponent: l, location: m } = Be(), f = l, h = xe(() => i.filter((E) => {
1259
+ const N = E.auth, C = !!(a != null && a.email);
1260
+ return N == null || N && C || !N && !C;
1261
1261
  }), [a == null ? void 0 : a.email, i]), d = D(
1262
- (T) => {
1263
- T.key === "Escape" && s && r();
1262
+ (E) => {
1263
+ E.key === "Escape" && s && r();
1264
1264
  },
1265
1265
  [r, s]
1266
1266
  );
@@ -1268,87 +1268,87 @@ function _n(t) {
1268
1268
  document.removeEventListener("keydown", d);
1269
1269
  }), [d]);
1270
1270
  const p = D(
1271
- (T, x) => x ? T === `${y.pathname}${y.search}` : T === y.pathname,
1272
- [y.pathname, y.search]
1273
- ), w = D(
1274
- (T) => /* @__PURE__ */ g(
1271
+ (E, N) => N ? E === `${m.pathname}${m.search}` : E === m.pathname,
1272
+ [m.pathname, m.search]
1273
+ ), b = D(
1274
+ (E) => /* @__PURE__ */ g(
1275
1275
  "li",
1276
1276
  {
1277
- className: `drawer-list-item-child ${p(T.path, !0) ? "active" : ""} animated`,
1278
- children: T.path ? /* @__PURE__ */ g(
1279
- h,
1277
+ className: `drawer-list-item-child ${p(E.path, !0) ? "active" : ""} animated`,
1278
+ children: E.path ? /* @__PURE__ */ g(
1279
+ f,
1280
1280
  {
1281
1281
  tabIndex: s ? 0 : -1,
1282
- to: T.path ?? "/",
1283
- "aria-label": e(`_accessibility:ariaLabels.${T.id}`, {
1284
- defaultValue: T.label
1282
+ to: E.path ?? "/",
1283
+ "aria-label": t(`_accessibility:ariaLabels.${E.id}`, {
1284
+ defaultValue: E.label
1285
1285
  }),
1286
1286
  className: "drawer-link",
1287
- children: T.label
1287
+ children: E.label
1288
1288
  }
1289
- ) : T.label
1289
+ ) : E.label
1290
1290
  },
1291
- T.id
1291
+ E.id
1292
1292
  ),
1293
- [h, s, e, p]
1294
- ), S = Ae(() => f.map((T, x) => {
1295
- const C = T.page ?? String(x), $ = `drawer-list-item ${p(T.path) ? "active" : ""} animated`;
1296
- if (T.type === "divider")
1297
- return /* @__PURE__ */ g("li", { className: $, children: /* @__PURE__ */ g("hr", { className: "drawer-divider" }) }, C);
1298
- const A = T.children ?? (T.page && o ? o[T.page] : null);
1299
- return /* @__PURE__ */ F("li", { className: $, children: [
1300
- /* @__PURE__ */ F(
1301
- h,
1293
+ [f, s, t, p]
1294
+ ), S = xe(() => h.map((E, N) => {
1295
+ const C = E.page ?? String(N), F = `drawer-list-item ${p(E.path) ? "active" : ""} animated`;
1296
+ if (E.type === "divider")
1297
+ return /* @__PURE__ */ g("li", { className: F, children: /* @__PURE__ */ g("hr", { className: "drawer-divider" }) }, C);
1298
+ const x = E.children ?? (E.page && o ? o[E.page] : null);
1299
+ return /* @__PURE__ */ $("li", { className: F, children: [
1300
+ /* @__PURE__ */ $(
1301
+ f,
1302
1302
  {
1303
1303
  tabIndex: s ? 0 : -1,
1304
- to: T.path ?? "/",
1305
- "aria-label": e(`_accessibility:ariaLabels.${String(T.page)}`, {
1306
- defaultValue: e(`_pages:${String(T.page)}.title`)
1304
+ to: E.path ?? "/",
1305
+ "aria-label": t(`_accessibility:ariaLabels.${String(E.page)}`, {
1306
+ defaultValue: t(`_pages:${String(E.page)}.title`)
1307
1307
  }),
1308
1308
  className: "drawer-link",
1309
1309
  children: [
1310
- T.icon,
1311
- e(`_pages:${T.page}.title`)
1310
+ E.icon,
1311
+ t(`_pages:${E.page}.title`)
1312
1312
  ]
1313
1313
  }
1314
1314
  ),
1315
- A && /* @__PURE__ */ g("ul", { className: "drawer-children-list", children: A.map(w) })
1315
+ x && /* @__PURE__ */ g("ul", { className: "drawer-children-list", children: x.map(b) })
1316
1316
  ] }, C);
1317
- }), [h, o, p, s, f, w, e]);
1317
+ }), [f, o, p, s, h, b, t]);
1318
1318
  return /* @__PURE__ */ g(
1319
1319
  "div",
1320
1320
  {
1321
- "aria-label": e("_accessibility:ariaLabels.closeMenu"),
1321
+ "aria-label": t("_accessibility:ariaLabels.closeMenu"),
1322
1322
  "aria-disabled": !s,
1323
1323
  className: `${s ? "opened" : "closed"} drawer-backdrop`,
1324
1324
  onClick: () => r(),
1325
- children: /* @__PURE__ */ F("aside", { className: `${s ? "opened" : "closed"} drawer animated`, children: [
1326
- /* @__PURE__ */ F("div", { className: "drawer-header-container", children: [
1325
+ children: /* @__PURE__ */ $("aside", { className: `${s ? "opened" : "closed"} drawer animated`, children: [
1326
+ /* @__PURE__ */ $("div", { className: "drawer-header-container", children: [
1327
1327
  n,
1328
- /* @__PURE__ */ g("h2", { className: "drawer-header poppins", children: e("_pages:home.appName") })
1328
+ /* @__PURE__ */ g("h2", { className: "drawer-header poppins", children: t("_pages:home.appName") })
1329
1329
  ] }),
1330
1330
  /* @__PURE__ */ g("ul", { className: "drawer-menu-list", children: S })
1331
1331
  ] })
1332
1332
  }
1333
1333
  );
1334
1334
  }
1335
- const Ee = ({ icon: t, ...e }) => /* @__PURE__ */ g($s, { icon: /* @__PURE__ */ g(ue, { icon: t }), ...e });
1336
- var ot, Nt;
1335
+ const Te = ({ icon: e, ...t }) => /* @__PURE__ */ g(Fs, { icon: /* @__PURE__ */ g(ue, { icon: e }), ...t });
1336
+ var ot, At;
1337
1337
  function ur() {
1338
- if (Nt) return ot;
1339
- Nt = 1;
1340
- const t = (o, l = "local", y = void 0) => {
1338
+ if (At) return ot;
1339
+ At = 1;
1340
+ const e = (o, l = "local", m = void 0) => {
1341
1341
  if (l === "local") {
1342
1342
  if (localStorage.getItem(o) !== void 0 && localStorage.getItem(o) !== "undefined" && localStorage.getItem(o) !== null)
1343
- return y === void 0 || y !== void 0 && localStorage.getItem(o) === y;
1343
+ return m === void 0 || m !== void 0 && localStorage.getItem(o) === m;
1344
1344
  } else if (l === "session" && sessionStorage.getItem(o) !== void 0 && sessionStorage.getItem(o) !== "undefined" && sessionStorage.getItem(o) !== null)
1345
- return y === void 0 || y !== void 0 && sessionStorage.getItem(o) === y;
1345
+ return m === void 0 || m !== void 0 && sessionStorage.getItem(o) === m;
1346
1346
  return !1;
1347
- }, e = (o) => {
1347
+ }, t = (o) => {
1348
1348
  const l = {};
1349
- return o.substring(1).split("&").forEach((h) => {
1350
- const [f, d] = h.split("=");
1351
- l[f] = d;
1349
+ return o.substring(1).split("&").forEach((f) => {
1350
+ const [h, d] = f.split("=");
1351
+ l[h] = d;
1352
1352
  }), l;
1353
1353
  }, s = (o = "") => {
1354
1354
  if (n(o) && o.length) return n(o);
@@ -1358,19 +1358,19 @@ function ur() {
1358
1358
  return o.length && i(o, 730, l), l;
1359
1359
  }
1360
1360
  return "en";
1361
- }, r = (o = 0, l = 0, y = window, h = "smooth") => y.scroll({
1361
+ }, r = (o = 0, l = 0, m = window, f = "smooth") => m.scroll({
1362
1362
  top: o,
1363
1363
  left: l,
1364
- behavior: h
1365
- }), i = (o, l, y, h = "/", f = "Lax") => {
1364
+ behavior: f
1365
+ }), i = (o, l, m, f = "/", h = "Lax") => {
1366
1366
  var d = /* @__PURE__ */ new Date();
1367
1367
  d.setTime(d.getTime() + l * 24 * 60 * 60 * 1e3);
1368
1368
  const p = "; expires=" + d.toUTCString();
1369
- document.cookie = `${o}=${y || ""}${p};path=${h};SameSite=${f}`;
1369
+ document.cookie = `${o}=${m || ""}${p};path=${f};SameSite=${h}`;
1370
1370
  }, n = (o) => {
1371
- const l = `${o}=`, h = decodeURIComponent(document.cookie).split(";");
1372
- for (let f = 0; f < h.length; f += 1) {
1373
- let d = h[f];
1371
+ const l = `${o}=`, f = decodeURIComponent(document.cookie).split(";");
1372
+ for (let h = 0; h < f.length; h += 1) {
1373
+ let d = f[h];
1374
1374
  for (; d.charAt(0) === " "; )
1375
1375
  d = d.substring(1);
1376
1376
  if (d.indexOf(l) === 0)
@@ -1384,87 +1384,87 @@ function ur() {
1384
1384
  deleteCookie: (o) => document.cookie = `${o}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`,
1385
1385
  getUserLanguage: s,
1386
1386
  scrollTo: r,
1387
- parseQueries: e,
1388
- validation: t
1387
+ parseQueries: t,
1388
+ validation: e
1389
1389
  }, ot;
1390
1390
  }
1391
1391
  var dr = ur();
1392
1392
  function Cn() {
1393
- const { t, language: e } = R();
1393
+ const { t: e, language: t } = R();
1394
1394
  return { timeAge: D(
1395
1395
  (r) => {
1396
- const n = /* @__PURE__ */ new Date() - r, a = Math.floor(n / (1e3 * 60)), o = Math.floor(a / 60), l = e === "es", y = t("_accessibility:labels.ago"), h = t("_accessibility:labels.minute"), f = t("_accessibility:labels.minutes"), d = t("_accessibility:labels.hour"), p = t("_accessibility:labels.hours"), w = t("_accessibility:labels.yesterday"), S = t("_accessibility:labels.justNow");
1397
- return n < 1e3 * 60 ? S : a < 60 ? `${l ? y : ""} ${a} ${a === 1 ? h : f} ${l ? "" : y}` : o < 24 ? `${l ? y : ""} ${o} ${o === 1 ? d : p} ${l ? "" : y}` : o < 48 ? w : r.toLocaleDateString(navigator.language || "es-ES", {
1396
+ const n = /* @__PURE__ */ new Date() - r, a = Math.floor(n / (1e3 * 60)), o = Math.floor(a / 60), l = t === "es", m = e("_accessibility:labels.ago"), f = e("_accessibility:labels.minute"), h = e("_accessibility:labels.minutes"), d = e("_accessibility:labels.hour"), p = e("_accessibility:labels.hours"), b = e("_accessibility:labels.yesterday"), S = e("_accessibility:labels.justNow");
1397
+ return n < 1e3 * 60 ? S : a < 60 ? `${l ? m : ""} ${a} ${a === 1 ? f : h} ${l ? "" : m}` : o < 24 ? `${l ? m : ""} ${o} ${o === 1 ? d : p} ${l ? "" : m}` : o < 48 ? b : r.toLocaleDateString(navigator.language || "es-ES", {
1398
1398
  day: "2-digit",
1399
1399
  month: "2-digit",
1400
1400
  year: "numeric"
1401
1401
  });
1402
1402
  },
1403
- [t, e]
1403
+ [e, t]
1404
1404
  ) };
1405
1405
  }
1406
- const ss = (t) => {
1407
- const { showSuccessNotification: e } = Ne(), { mutationFn: s, onError: r, onSuccess: i, onSuccessMessage: n } = t, [a, o] = X([]), { open: l, handleClose: y, handleOpen: h } = ds(), f = () => {
1408
- y(), o([]);
1409
- }, d = async (w) => {
1410
- o(w), h();
1406
+ const ss = (e) => {
1407
+ const { showSuccessNotification: t } = Ae(), { mutationFn: s, onError: r, onSuccess: i, onSuccessMessage: n } = e, [a, o] = X([]), { open: l, handleClose: m, handleOpen: f } = ds(), h = () => {
1408
+ m(), o([]);
1409
+ }, d = async (b) => {
1410
+ o(b), f();
1411
1411
  }, p = Ke({
1412
1412
  mutationFn: () => s(
1413
1413
  Array.isArray(a) ? a : [a]
1414
1414
  ),
1415
- onError: (w) => {
1416
- console.error(w), r && r(w), f();
1415
+ onError: (b) => {
1416
+ console.error(b), r && r(b), h();
1417
1417
  },
1418
- onSuccess: async (w) => {
1419
- i && i(w), e({
1418
+ onSuccess: async (b) => {
1419
+ i && i(b), t({
1420
1420
  message: n
1421
- }), f();
1421
+ }), h();
1422
1422
  }
1423
1423
  });
1424
- return { open: l, onClick: d, close: f, dialogFn: p, isLoading: p.isPending };
1424
+ return { open: l, onClick: d, close: h, dialogFn: p, isLoading: p.isPending };
1425
1425
  };
1426
- var qe = (t) => t.type === "checkbox", xe = (t) => t instanceof Date, te = (t) => t == null;
1427
- const rs = (t) => typeof t == "object";
1428
- var H = (t) => !te(t) && !Array.isArray(t) && rs(t) && !xe(t), fr = (t) => H(t) && t.target ? qe(t.target) ? t.target.checked : t.target.value : t, hr = (t) => t.substring(0, t.search(/\.\d+(\.|$)/)) || t, mr = (t, e) => t.has(hr(e)), yr = (t) => {
1429
- const e = t.constructor && t.constructor.prototype;
1430
- return H(e) && e.hasOwnProperty("isPrototypeOf");
1426
+ var qe = (e) => e.type === "checkbox", Ne = (e) => e instanceof Date, te = (e) => e == null;
1427
+ const rs = (e) => typeof e == "object";
1428
+ var H = (e) => !te(e) && !Array.isArray(e) && rs(e) && !Ne(e), fr = (e) => H(e) && e.target ? qe(e.target) ? e.target.checked : e.target.value : e, hr = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, mr = (e, t) => e.has(hr(t)), yr = (e) => {
1429
+ const t = e.constructor && e.constructor.prototype;
1430
+ return H(t) && t.hasOwnProperty("isPrototypeOf");
1431
1431
  }, ht = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
1432
- function z(t) {
1433
- let e;
1434
- const s = Array.isArray(t), r = typeof FileList < "u" ? t instanceof FileList : !1;
1435
- if (t instanceof Date)
1436
- e = new Date(t);
1437
- else if (!(ht && (t instanceof Blob || r)) && (s || H(t)))
1438
- if (e = s ? [] : {}, !s && !yr(t))
1439
- e = t;
1432
+ function z(e) {
1433
+ let t;
1434
+ const s = Array.isArray(e), r = typeof FileList < "u" ? e instanceof FileList : !1;
1435
+ if (e instanceof Date)
1436
+ t = new Date(e);
1437
+ else if (!(ht && (e instanceof Blob || r)) && (s || H(e)))
1438
+ if (t = s ? [] : {}, !s && !yr(e))
1439
+ t = e;
1440
1440
  else
1441
- for (const i in t)
1442
- t.hasOwnProperty(i) && (e[i] = z(t[i]));
1441
+ for (const i in e)
1442
+ e.hasOwnProperty(i) && (t[i] = z(e[i]));
1443
1443
  else
1444
- return t;
1445
- return e;
1444
+ return e;
1445
+ return t;
1446
1446
  }
1447
- var et = (t) => /^\w*$/.test(t), Q = (t) => t === void 0, mt = (t) => Array.isArray(t) ? t.filter(Boolean) : [], yt = (t) => mt(t.replace(/["|']|\]/g, "").split(/\.|\[/)), E = (t, e, s) => {
1448
- if (!e || !H(t))
1447
+ var et = (e) => /^\w*$/.test(e), Q = (e) => e === void 0, mt = (e) => Array.isArray(e) ? e.filter(Boolean) : [], yt = (e) => mt(e.replace(/["|']|\]/g, "").split(/\.|\[/)), T = (e, t, s) => {
1448
+ if (!t || !H(e))
1449
1449
  return s;
1450
- const r = (et(e) ? [e] : yt(e)).reduce((i, n) => te(i) ? i : i[n], t);
1451
- return Q(r) || r === t ? Q(t[e]) ? s : t[e] : r;
1452
- }, ye = (t) => typeof t == "boolean", B = (t, e, s) => {
1450
+ const r = (et(t) ? [t] : yt(t)).reduce((i, n) => te(i) ? i : i[n], e);
1451
+ return Q(r) || r === e ? Q(e[t]) ? s : e[t] : r;
1452
+ }, ye = (e) => typeof e == "boolean", B = (e, t, s) => {
1453
1453
  let r = -1;
1454
- const i = et(e) ? [e] : yt(e), n = i.length, a = n - 1;
1454
+ const i = et(t) ? [t] : yt(t), n = i.length, a = n - 1;
1455
1455
  for (; ++r < n; ) {
1456
1456
  const o = i[r];
1457
1457
  let l = s;
1458
1458
  if (r !== a) {
1459
- const y = t[o];
1460
- l = H(y) || Array.isArray(y) ? y : isNaN(+i[r + 1]) ? {} : [];
1459
+ const m = e[o];
1460
+ l = H(m) || Array.isArray(m) ? m : isNaN(+i[r + 1]) ? {} : [];
1461
1461
  }
1462
1462
  if (o === "__proto__" || o === "constructor" || o === "prototype")
1463
1463
  return;
1464
- t[o] = l, t = t[o];
1464
+ e[o] = l, e = e[o];
1465
1465
  }
1466
1466
  };
1467
- const $t = {
1467
+ const Ft = {
1468
1468
  BLUR: "blur",
1469
1469
  FOCUS_OUT: "focusout"
1470
1470
  }, fe = {
@@ -1483,182 +1483,182 @@ const $t = {
1483
1483
  validate: "validate"
1484
1484
  }, gr = ae.createContext(null);
1485
1485
  gr.displayName = "HookFormContext";
1486
- var pr = (t, e, s, r = !0) => {
1486
+ var pr = (e, t, s, r = !0) => {
1487
1487
  const i = {
1488
- defaultValues: e._defaultValues
1488
+ defaultValues: t._defaultValues
1489
1489
  };
1490
- for (const n in t)
1490
+ for (const n in e)
1491
1491
  Object.defineProperty(i, n, {
1492
1492
  get: () => {
1493
1493
  const a = n;
1494
- return e._proxyFormState[a] !== fe.all && (e._proxyFormState[a] = !r || fe.all), t[a];
1494
+ return t._proxyFormState[a] !== fe.all && (t._proxyFormState[a] = !r || fe.all), e[a];
1495
1495
  }
1496
1496
  });
1497
1497
  return i;
1498
1498
  };
1499
1499
  const br = typeof window < "u" ? ae.useLayoutEffect : ae.useEffect;
1500
- var pe = (t) => typeof t == "string", wr = (t, e, s, r, i) => pe(t) ? (r && e.watch.add(t), E(s, t, i)) : Array.isArray(t) ? t.map((n) => (r && e.watch.add(n), E(s, n))) : (r && (e.watchAll = !0), s), ut = (t) => te(t) || !rs(t);
1501
- function Se(t, e, s = /* @__PURE__ */ new WeakSet()) {
1502
- if (ut(t) || ut(e))
1503
- return t === e;
1504
- if (xe(t) && xe(e))
1505
- return t.getTime() === e.getTime();
1506
- const r = Object.keys(t), i = Object.keys(e);
1500
+ var pe = (e) => typeof e == "string", wr = (e, t, s, r, i) => pe(e) ? (r && t.watch.add(e), T(s, e, i)) : Array.isArray(e) ? e.map((n) => (r && t.watch.add(n), T(s, n))) : (r && (t.watchAll = !0), s), ut = (e) => te(e) || !rs(e);
1501
+ function Se(e, t, s = /* @__PURE__ */ new WeakSet()) {
1502
+ if (ut(e) || ut(t))
1503
+ return e === t;
1504
+ if (Ne(e) && Ne(t))
1505
+ return e.getTime() === t.getTime();
1506
+ const r = Object.keys(e), i = Object.keys(t);
1507
1507
  if (r.length !== i.length)
1508
1508
  return !1;
1509
- if (s.has(t) || s.has(e))
1509
+ if (s.has(e) || s.has(t))
1510
1510
  return !0;
1511
- s.add(t), s.add(e);
1511
+ s.add(e), s.add(t);
1512
1512
  for (const n of r) {
1513
- const a = t[n];
1513
+ const a = e[n];
1514
1514
  if (!i.includes(n))
1515
1515
  return !1;
1516
1516
  if (n !== "ref") {
1517
- const o = e[n];
1518
- if (xe(a) && xe(o) || H(a) && H(o) || Array.isArray(a) && Array.isArray(o) ? !Se(a, o, s) : a !== o)
1517
+ const o = t[n];
1518
+ if (Ne(a) && Ne(o) || H(a) && H(o) || Array.isArray(a) && Array.isArray(o) ? !Se(a, o, s) : a !== o)
1519
1519
  return !1;
1520
1520
  }
1521
1521
  }
1522
1522
  return !0;
1523
1523
  }
1524
- var vr = (t, e, s, r, i) => e ? {
1525
- ...s[t],
1524
+ var vr = (e, t, s, r, i) => t ? {
1525
+ ...s[e],
1526
1526
  types: {
1527
- ...s[t] && s[t].types ? s[t].types : {},
1527
+ ...s[e] && s[e].types ? s[e].types : {},
1528
1528
  [r]: i || !0
1529
1529
  }
1530
- } : {}, Pe = (t) => Array.isArray(t) ? t : [t], Ft = () => {
1531
- let t = [];
1530
+ } : {}, Pe = (e) => Array.isArray(e) ? e : [e], $t = () => {
1531
+ let e = [];
1532
1532
  return {
1533
1533
  get observers() {
1534
- return t;
1534
+ return e;
1535
1535
  },
1536
1536
  next: (i) => {
1537
- for (const n of t)
1537
+ for (const n of e)
1538
1538
  n.next && n.next(i);
1539
1539
  },
1540
- subscribe: (i) => (t.push(i), {
1540
+ subscribe: (i) => (e.push(i), {
1541
1541
  unsubscribe: () => {
1542
- t = t.filter((n) => n !== i);
1542
+ e = e.filter((n) => n !== i);
1543
1543
  }
1544
1544
  }),
1545
1545
  unsubscribe: () => {
1546
- t = [];
1546
+ e = [];
1547
1547
  }
1548
1548
  };
1549
- }, se = (t) => H(t) && !Object.keys(t).length, gt = (t) => t.type === "file", he = (t) => typeof t == "function", ze = (t) => {
1549
+ }, se = (e) => H(e) && !Object.keys(e).length, gt = (e) => e.type === "file", he = (e) => typeof e == "function", ze = (e) => {
1550
1550
  if (!ht)
1551
1551
  return !1;
1552
- const e = t ? t.ownerDocument : 0;
1553
- return t instanceof (e && e.defaultView ? e.defaultView.HTMLElement : HTMLElement);
1554
- }, ns = (t) => t.type === "select-multiple", pt = (t) => t.type === "radio", kr = (t) => pt(t) || qe(t), ct = (t) => ze(t) && t.isConnected;
1555
- function Sr(t, e) {
1556
- const s = e.slice(0, -1).length;
1552
+ const t = e ? e.ownerDocument : 0;
1553
+ return e instanceof (t && t.defaultView ? t.defaultView.HTMLElement : HTMLElement);
1554
+ }, ns = (e) => e.type === "select-multiple", pt = (e) => e.type === "radio", kr = (e) => pt(e) || qe(e), ct = (e) => ze(e) && e.isConnected;
1555
+ function Sr(e, t) {
1556
+ const s = t.slice(0, -1).length;
1557
1557
  let r = 0;
1558
1558
  for (; r < s; )
1559
- t = Q(t) ? r++ : t[e[r++]];
1560
- return t;
1559
+ e = Q(e) ? r++ : e[t[r++]];
1560
+ return e;
1561
1561
  }
1562
- function Er(t) {
1563
- for (const e in t)
1564
- if (t.hasOwnProperty(e) && !Q(t[e]))
1562
+ function Tr(e) {
1563
+ for (const t in e)
1564
+ if (e.hasOwnProperty(t) && !Q(e[t]))
1565
1565
  return !1;
1566
1566
  return !0;
1567
1567
  }
1568
- function j(t, e) {
1569
- const s = Array.isArray(e) ? e : et(e) ? [e] : yt(e), r = s.length === 1 ? t : Sr(t, s), i = s.length - 1, n = s[i];
1570
- return r && delete r[n], i !== 0 && (H(r) && se(r) || Array.isArray(r) && Er(r)) && j(t, s.slice(0, -1)), t;
1568
+ function j(e, t) {
1569
+ const s = Array.isArray(t) ? t : et(t) ? [t] : yt(t), r = s.length === 1 ? e : Sr(e, s), i = s.length - 1, n = s[i];
1570
+ return r && delete r[n], i !== 0 && (H(r) && se(r) || Array.isArray(r) && Tr(r)) && j(e, s.slice(0, -1)), e;
1571
1571
  }
1572
- var is = (t) => {
1573
- for (const e in t)
1574
- if (he(t[e]))
1572
+ var is = (e) => {
1573
+ for (const t in e)
1574
+ if (he(e[t]))
1575
1575
  return !0;
1576
1576
  return !1;
1577
1577
  };
1578
- function Je(t, e = {}) {
1579
- const s = Array.isArray(t);
1580
- if (H(t) || s)
1581
- for (const r in t)
1582
- Array.isArray(t[r]) || H(t[r]) && !is(t[r]) ? (e[r] = Array.isArray(t[r]) ? [] : {}, Je(t[r], e[r])) : te(t[r]) || (e[r] = !0);
1583
- return e;
1578
+ function Je(e, t = {}) {
1579
+ const s = Array.isArray(e);
1580
+ if (H(e) || s)
1581
+ for (const r in e)
1582
+ Array.isArray(e[r]) || H(e[r]) && !is(e[r]) ? (t[r] = Array.isArray(e[r]) ? [] : {}, Je(e[r], t[r])) : te(e[r]) || (t[r] = !0);
1583
+ return t;
1584
1584
  }
1585
- function as(t, e, s) {
1586
- const r = Array.isArray(t);
1587
- if (H(t) || r)
1588
- for (const i in t)
1589
- Array.isArray(t[i]) || H(t[i]) && !is(t[i]) ? Q(e) || ut(s[i]) ? s[i] = Array.isArray(t[i]) ? Je(t[i], []) : { ...Je(t[i]) } : as(t[i], te(e) ? {} : e[i], s[i]) : s[i] = !Se(t[i], e[i]);
1585
+ function as(e, t, s) {
1586
+ const r = Array.isArray(e);
1587
+ if (H(e) || r)
1588
+ for (const i in e)
1589
+ Array.isArray(e[i]) || H(e[i]) && !is(e[i]) ? Q(t) || ut(s[i]) ? s[i] = Array.isArray(e[i]) ? Je(e[i], []) : { ...Je(e[i]) } : as(e[i], te(t) ? {} : t[i], s[i]) : s[i] = !Se(e[i], t[i]);
1590
1590
  return s;
1591
1591
  }
1592
- var Re = (t, e) => as(t, e, Je(e));
1592
+ var Re = (e, t) => as(e, t, Je(t));
1593
1593
  const Lt = {
1594
1594
  value: !1,
1595
1595
  isValid: !1
1596
1596
  }, Dt = { value: !0, isValid: !0 };
1597
- var os = (t) => {
1598
- if (Array.isArray(t)) {
1599
- if (t.length > 1) {
1600
- const e = t.filter((s) => s && s.checked && !s.disabled).map((s) => s.value);
1601
- return { value: e, isValid: !!e.length };
1597
+ var os = (e) => {
1598
+ if (Array.isArray(e)) {
1599
+ if (e.length > 1) {
1600
+ const t = e.filter((s) => s && s.checked && !s.disabled).map((s) => s.value);
1601
+ return { value: t, isValid: !!t.length };
1602
1602
  }
1603
- return t[0].checked && !t[0].disabled ? (
1603
+ return e[0].checked && !e[0].disabled ? (
1604
1604
  // @ts-expect-error expected to work in the browser
1605
- t[0].attributes && !Q(t[0].attributes.value) ? Q(t[0].value) || t[0].value === "" ? Dt : { value: t[0].value, isValid: !0 } : Dt
1605
+ e[0].attributes && !Q(e[0].attributes.value) ? Q(e[0].value) || e[0].value === "" ? Dt : { value: e[0].value, isValid: !0 } : Dt
1606
1606
  ) : Lt;
1607
1607
  }
1608
1608
  return Lt;
1609
- }, cs = (t, { valueAsNumber: e, valueAsDate: s, setValueAs: r }) => Q(t) ? t : e ? t === "" ? NaN : t && +t : s && pe(t) ? new Date(t) : r ? r(t) : t;
1609
+ }, cs = (e, { valueAsNumber: t, valueAsDate: s, setValueAs: r }) => Q(e) ? e : t ? e === "" ? NaN : e && +e : s && pe(e) ? new Date(e) : r ? r(e) : e;
1610
1610
  const Vt = {
1611
1611
  isValid: !1,
1612
1612
  value: null
1613
1613
  };
1614
- var ls = (t) => Array.isArray(t) ? t.reduce((e, s) => s && s.checked && !s.disabled ? {
1614
+ var ls = (e) => Array.isArray(e) ? e.reduce((t, s) => s && s.checked && !s.disabled ? {
1615
1615
  isValid: !0,
1616
1616
  value: s.value
1617
- } : e, Vt) : Vt;
1618
- function Rt(t) {
1619
- const e = t.ref;
1620
- return gt(e) ? e.files : pt(e) ? ls(t.refs).value : ns(e) ? [...e.selectedOptions].map(({ value: s }) => s) : qe(e) ? os(t.refs).value : cs(Q(e.value) ? t.ref.value : e.value, t);
1617
+ } : t, Vt) : Vt;
1618
+ function Rt(e) {
1619
+ const t = e.ref;
1620
+ return gt(t) ? t.files : pt(t) ? ls(e.refs).value : ns(t) ? [...t.selectedOptions].map(({ value: s }) => s) : qe(t) ? os(e.refs).value : cs(Q(t.value) ? e.ref.value : t.value, e);
1621
1621
  }
1622
- var Tr = (t, e, s, r) => {
1622
+ var Er = (e, t, s, r) => {
1623
1623
  const i = {};
1624
- for (const n of t) {
1625
- const a = E(e, n);
1624
+ for (const n of e) {
1625
+ const a = T(t, n);
1626
1626
  a && B(i, n, a._f);
1627
1627
  }
1628
1628
  return {
1629
1629
  criteriaMode: s,
1630
- names: [...t],
1630
+ names: [...e],
1631
1631
  fields: i,
1632
1632
  shouldUseNativeValidation: r
1633
1633
  };
1634
- }, Ye = (t) => t instanceof RegExp, Ie = (t) => Q(t) ? t : Ye(t) ? t.source : H(t) ? Ye(t.value) ? t.value.source : t.value : t, It = (t) => ({
1635
- isOnSubmit: !t || t === fe.onSubmit,
1636
- isOnBlur: t === fe.onBlur,
1637
- isOnChange: t === fe.onChange,
1638
- isOnAll: t === fe.all,
1639
- isOnTouch: t === fe.onTouched
1634
+ }, Ye = (e) => e instanceof RegExp, Ie = (e) => Q(e) ? e : Ye(e) ? e.source : H(e) ? Ye(e.value) ? e.value.source : e.value : e, It = (e) => ({
1635
+ isOnSubmit: !e || e === fe.onSubmit,
1636
+ isOnBlur: e === fe.onBlur,
1637
+ isOnChange: e === fe.onChange,
1638
+ isOnAll: e === fe.all,
1639
+ isOnTouch: e === fe.onTouched
1640
1640
  });
1641
1641
  const Pt = "AsyncFunction";
1642
- var _r = (t) => !!t && !!t.validate && !!(he(t.validate) && t.validate.constructor.name === Pt || H(t.validate) && Object.values(t.validate).find((e) => e.constructor.name === Pt)), Cr = (t) => t.mount && (t.required || t.min || t.max || t.maxLength || t.minLength || t.pattern || t.validate), Mt = (t, e, s) => !s && (e.watchAll || e.watch.has(t) || [...e.watch].some((r) => t.startsWith(r) && /^\.\w+/.test(t.slice(r.length))));
1643
- const Me = (t, e, s, r) => {
1644
- for (const i of s || Object.keys(t)) {
1645
- const n = E(t, i);
1642
+ var _r = (e) => !!e && !!e.validate && !!(he(e.validate) && e.validate.constructor.name === Pt || H(e.validate) && Object.values(e.validate).find((t) => t.constructor.name === Pt)), Cr = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Mt = (e, t, s) => !s && (t.watchAll || t.watch.has(e) || [...t.watch].some((r) => e.startsWith(r) && /^\.\w+/.test(e.slice(r.length))));
1643
+ const Me = (e, t, s, r) => {
1644
+ for (const i of s || Object.keys(e)) {
1645
+ const n = T(e, i);
1646
1646
  if (n) {
1647
1647
  const { _f: a, ...o } = n;
1648
1648
  if (a) {
1649
- if (a.refs && a.refs[0] && e(a.refs[0], i) && !r)
1649
+ if (a.refs && a.refs[0] && t(a.refs[0], i) && !r)
1650
1650
  return !0;
1651
- if (a.ref && e(a.ref, a.name) && !r)
1651
+ if (a.ref && t(a.ref, a.name) && !r)
1652
1652
  return !0;
1653
- if (Me(o, e))
1653
+ if (Me(o, t))
1654
1654
  break;
1655
- } else if (H(o) && Me(o, e))
1655
+ } else if (H(o) && Me(o, t))
1656
1656
  break;
1657
1657
  }
1658
1658
  }
1659
1659
  };
1660
- function Ot(t, e, s) {
1661
- const r = E(t, s);
1660
+ function Ot(e, t, s) {
1661
+ const r = T(e, s);
1662
1662
  if (r || et(s))
1663
1663
  return {
1664
1664
  error: r,
@@ -1666,7 +1666,7 @@ function Ot(t, e, s) {
1666
1666
  };
1667
1667
  const i = s.split(".");
1668
1668
  for (; i.length; ) {
1669
- const n = i.join("."), a = E(e, n), o = E(t, n);
1669
+ const n = i.join("."), a = T(t, n), o = T(e, n);
1670
1670
  if (a && !Array.isArray(a) && s !== n)
1671
1671
  return { name: s };
1672
1672
  if (o && o.type)
@@ -1685,34 +1685,34 @@ function Ot(t, e, s) {
1685
1685
  name: s
1686
1686
  };
1687
1687
  }
1688
- var xr = (t, e, s, r) => {
1689
- s(t);
1690
- const { name: i, ...n } = t;
1691
- return se(n) || Object.keys(n).length >= Object.keys(e).length || Object.keys(n).find((a) => e[a] === (!r || fe.all));
1692
- }, Ar = (t, e, s) => !t || !e || t === e || Pe(t).some((r) => r && (s ? r === e : r.startsWith(e) || e.startsWith(r))), Nr = (t, e, s, r, i) => i.isOnAll ? !1 : !s && i.isOnTouch ? !(e || t) : (s ? r.isOnBlur : i.isOnBlur) ? !t : (s ? r.isOnChange : i.isOnChange) ? t : !0, $r = (t, e) => !mt(E(t, e)).length && j(t, e), Fr = (t, e, s) => {
1693
- const r = Pe(E(t, s));
1694
- return B(r, "root", e[s]), B(t, s, r), t;
1695
- }, Qe = (t) => pe(t);
1696
- function Ut(t, e, s = "validate") {
1697
- if (Qe(t) || Array.isArray(t) && t.every(Qe) || ye(t) && !t)
1688
+ var Nr = (e, t, s, r) => {
1689
+ s(e);
1690
+ const { name: i, ...n } = e;
1691
+ return se(n) || Object.keys(n).length >= Object.keys(t).length || Object.keys(n).find((a) => t[a] === (!r || fe.all));
1692
+ }, xr = (e, t, s) => !e || !t || e === t || Pe(e).some((r) => r && (s ? r === t : r.startsWith(t) || t.startsWith(r))), Ar = (e, t, s, r, i) => i.isOnAll ? !1 : !s && i.isOnTouch ? !(t || e) : (s ? r.isOnBlur : i.isOnBlur) ? !e : (s ? r.isOnChange : i.isOnChange) ? e : !0, Fr = (e, t) => !mt(T(e, t)).length && j(e, t), $r = (e, t, s) => {
1693
+ const r = Pe(T(e, s));
1694
+ return B(r, "root", t[s]), B(e, s, r), e;
1695
+ }, Qe = (e) => pe(e);
1696
+ function Ut(e, t, s = "validate") {
1697
+ if (Qe(e) || Array.isArray(e) && e.every(Qe) || ye(e) && !e)
1698
1698
  return {
1699
1699
  type: s,
1700
- message: Qe(t) ? t : "",
1701
- ref: e
1700
+ message: Qe(e) ? e : "",
1701
+ ref: t
1702
1702
  };
1703
1703
  }
1704
- var $e = (t) => H(t) && !Ye(t) ? t : {
1705
- value: t,
1704
+ var Fe = (e) => H(e) && !Ye(e) ? e : {
1705
+ value: e,
1706
1706
  message: ""
1707
- }, Kt = async (t, e, s, r, i, n) => {
1708
- const { ref: a, refs: o, required: l, maxLength: y, minLength: h, min: f, max: d, pattern: p, validate: w, name: S, valueAsNumber: T, mount: x } = t._f, C = E(s, S);
1709
- if (!x || e.has(S))
1707
+ }, Kt = async (e, t, s, r, i, n) => {
1708
+ const { ref: a, refs: o, required: l, maxLength: m, minLength: f, min: h, max: d, pattern: p, validate: b, name: S, valueAsNumber: E, mount: N } = e._f, C = T(s, S);
1709
+ if (!N || t.has(S))
1710
1710
  return {};
1711
- const $ = o ? o[0] : a, A = (L) => {
1712
- i && $.reportValidity && ($.setCustomValidity(ye(L) ? "" : L || ""), $.reportValidity());
1713
- }, N = {}, I = pt(a), O = qe(a), re = I || O, P = (T || gt(a)) && Q(a.value) && Q(C) || ze(a) && a.value === "" || C === "" || Array.isArray(C) && !C.length, ne = vr.bind(null, S, r, N), ce = (L, V, q, G = be.maxLength, Y = be.minLength) => {
1711
+ const F = o ? o[0] : a, x = (L) => {
1712
+ i && F.reportValidity && (F.setCustomValidity(ye(L) ? "" : L || ""), F.reportValidity());
1713
+ }, A = {}, I = pt(a), O = qe(a), re = I || O, P = (E || gt(a)) && Q(a.value) && Q(C) || ze(a) && a.value === "" || C === "" || Array.isArray(C) && !C.length, ne = vr.bind(null, S, r, A), ce = (L, V, q, G = be.maxLength, Y = be.minLength) => {
1714
1714
  const U = L ? V : q;
1715
- N[S] = {
1715
+ A[S] = {
1716
1716
  type: L ? G : Y,
1717
1717
  message: U,
1718
1718
  ref: a,
@@ -1720,18 +1720,18 @@ var $e = (t) => H(t) && !Ye(t) ? t : {
1720
1720
  };
1721
1721
  };
1722
1722
  if (n ? !Array.isArray(C) || !C.length : l && (!re && (P || te(C)) || ye(C) && !C || O && !os(o).isValid || I && !ls(o).isValid)) {
1723
- const { value: L, message: V } = Qe(l) ? { value: !!l, message: l } : $e(l);
1724
- if (L && (N[S] = {
1723
+ const { value: L, message: V } = Qe(l) ? { value: !!l, message: l } : Fe(l);
1724
+ if (L && (A[S] = {
1725
1725
  type: be.required,
1726
1726
  message: V,
1727
- ref: $,
1727
+ ref: F,
1728
1728
  ...ne(be.required, V)
1729
1729
  }, !r))
1730
- return A(V), N;
1730
+ return x(V), A;
1731
1731
  }
1732
- if (!P && (!te(f) || !te(d))) {
1732
+ if (!P && (!te(h) || !te(d))) {
1733
1733
  let L, V;
1734
- const q = $e(d), G = $e(f);
1734
+ const q = Fe(d), G = Fe(h);
1735
1735
  if (!te(C) && !isNaN(C)) {
1736
1736
  const Y = a.valueAsNumber || C && +C;
1737
1737
  te(q.value) || (L = Y > q.value), te(G.value) || (V = Y < G.value);
@@ -1740,65 +1740,65 @@ var $e = (t) => H(t) && !Ye(t) ? t : {
1740
1740
  pe(q.value) && C && (L = Z ? U(C) > U(q.value) : ie ? C > q.value : Y > new Date(q.value)), pe(G.value) && C && (V = Z ? U(C) < U(G.value) : ie ? C < G.value : Y < new Date(G.value));
1741
1741
  }
1742
1742
  if ((L || V) && (ce(!!L, q.message, G.message, be.max, be.min), !r))
1743
- return A(N[S].message), N;
1743
+ return x(A[S].message), A;
1744
1744
  }
1745
- if ((y || h) && !P && (pe(C) || n && Array.isArray(C))) {
1746
- const L = $e(y), V = $e(h), q = !te(L.value) && C.length > +L.value, G = !te(V.value) && C.length < +V.value;
1745
+ if ((m || f) && !P && (pe(C) || n && Array.isArray(C))) {
1746
+ const L = Fe(m), V = Fe(f), q = !te(L.value) && C.length > +L.value, G = !te(V.value) && C.length < +V.value;
1747
1747
  if ((q || G) && (ce(q, L.message, V.message), !r))
1748
- return A(N[S].message), N;
1748
+ return x(A[S].message), A;
1749
1749
  }
1750
1750
  if (p && !P && pe(C)) {
1751
- const { value: L, message: V } = $e(p);
1752
- if (Ye(L) && !C.match(L) && (N[S] = {
1751
+ const { value: L, message: V } = Fe(p);
1752
+ if (Ye(L) && !C.match(L) && (A[S] = {
1753
1753
  type: be.pattern,
1754
1754
  message: V,
1755
1755
  ref: a,
1756
1756
  ...ne(be.pattern, V)
1757
1757
  }, !r))
1758
- return A(V), N;
1758
+ return x(V), A;
1759
1759
  }
1760
- if (w) {
1761
- if (he(w)) {
1762
- const L = await w(C, s), V = Ut(L, $);
1763
- if (V && (N[S] = {
1760
+ if (b) {
1761
+ if (he(b)) {
1762
+ const L = await b(C, s), V = Ut(L, F);
1763
+ if (V && (A[S] = {
1764
1764
  ...V,
1765
1765
  ...ne(be.validate, V.message)
1766
1766
  }, !r))
1767
- return A(V.message), N;
1768
- } else if (H(w)) {
1767
+ return x(V.message), A;
1768
+ } else if (H(b)) {
1769
1769
  let L = {};
1770
- for (const V in w) {
1770
+ for (const V in b) {
1771
1771
  if (!se(L) && !r)
1772
1772
  break;
1773
- const q = Ut(await w[V](C, s), $, V);
1773
+ const q = Ut(await b[V](C, s), F, V);
1774
1774
  q && (L = {
1775
1775
  ...q,
1776
1776
  ...ne(V, q.message)
1777
- }, A(q.message), r && (N[S] = L));
1777
+ }, x(q.message), r && (A[S] = L));
1778
1778
  }
1779
- if (!se(L) && (N[S] = {
1780
- ref: $,
1779
+ if (!se(L) && (A[S] = {
1780
+ ref: F,
1781
1781
  ...L
1782
1782
  }, !r))
1783
- return N;
1783
+ return A;
1784
1784
  }
1785
1785
  }
1786
- return A(!0), N;
1786
+ return x(!0), A;
1787
1787
  };
1788
1788
  const Lr = {
1789
1789
  mode: fe.onSubmit,
1790
1790
  reValidateMode: fe.onChange,
1791
1791
  shouldFocusError: !0
1792
1792
  };
1793
- function Dr(t = {}) {
1794
- let e = {
1793
+ function Dr(e = {}) {
1794
+ let t = {
1795
1795
  ...Lr,
1796
- ...t
1796
+ ...e
1797
1797
  }, s = {
1798
1798
  submitCount: 0,
1799
1799
  isDirty: !1,
1800
1800
  isReady: !1,
1801
- isLoading: he(e.defaultValues),
1801
+ isLoading: he(t.defaultValues),
1802
1802
  isValidating: !1,
1803
1803
  isSubmitted: !1,
1804
1804
  isSubmitting: !1,
@@ -1807,9 +1807,9 @@ function Dr(t = {}) {
1807
1807
  touchedFields: {},
1808
1808
  dirtyFields: {},
1809
1809
  validatingFields: {},
1810
- errors: e.errors || {},
1811
- disabled: e.disabled || !1
1812
- }, r = {}, i = H(e.defaultValues) || H(e.values) ? z(e.defaultValues || e.values) || {} : {}, n = e.shouldUnregister ? {} : z(i), a = {
1810
+ errors: t.errors || {},
1811
+ disabled: t.disabled || !1
1812
+ }, r = {}, i = H(t.defaultValues) || H(t.values) ? z(t.defaultValues || t.values) || {} : {}, n = t.shouldUnregister ? {} : z(i), a = {
1813
1813
  action: !1,
1814
1814
  mount: !1,
1815
1815
  watch: !1
@@ -1819,8 +1819,8 @@ function Dr(t = {}) {
1819
1819
  unMount: /* @__PURE__ */ new Set(),
1820
1820
  array: /* @__PURE__ */ new Set(),
1821
1821
  watch: /* @__PURE__ */ new Set()
1822
- }, l, y = 0;
1823
- const h = {
1822
+ }, l, m = 0;
1823
+ const f = {
1824
1824
  isDirty: !1,
1825
1825
  dirtyFields: !1,
1826
1826
  validatingFields: !1,
@@ -1829,43 +1829,43 @@ function Dr(t = {}) {
1829
1829
  isValid: !1,
1830
1830
  errors: !1
1831
1831
  };
1832
- let f = {
1833
- ...h
1832
+ let h = {
1833
+ ...f
1834
1834
  };
1835
1835
  const d = {
1836
- array: Ft(),
1837
- state: Ft()
1838
- }, p = e.criteriaMode === fe.all, w = (c) => (u) => {
1839
- clearTimeout(y), y = setTimeout(c, u);
1836
+ array: $t(),
1837
+ state: $t()
1838
+ }, p = t.criteriaMode === fe.all, b = (c) => (u) => {
1839
+ clearTimeout(m), m = setTimeout(c, u);
1840
1840
  }, S = async (c) => {
1841
- if (!e.disabled && (h.isValid || f.isValid || c)) {
1842
- const u = e.resolver ? se((await O()).errors) : await P(r, !0);
1841
+ if (!t.disabled && (f.isValid || h.isValid || c)) {
1842
+ const u = t.resolver ? se((await O()).errors) : await P(r, !0);
1843
1843
  u !== s.isValid && d.state.next({
1844
1844
  isValid: u
1845
1845
  });
1846
1846
  }
1847
- }, T = (c, u) => {
1848
- !e.disabled && (h.isValidating || h.validatingFields || f.isValidating || f.validatingFields) && ((c || Array.from(o.mount)).forEach((m) => {
1849
- m && (u ? B(s.validatingFields, m, u) : j(s.validatingFields, m));
1847
+ }, E = (c, u) => {
1848
+ !t.disabled && (f.isValidating || f.validatingFields || h.isValidating || h.validatingFields) && ((c || Array.from(o.mount)).forEach((y) => {
1849
+ y && (u ? B(s.validatingFields, y, u) : j(s.validatingFields, y));
1850
1850
  }), d.state.next({
1851
1851
  validatingFields: s.validatingFields,
1852
1852
  isValidating: !se(s.validatingFields)
1853
1853
  }));
1854
- }, x = (c, u = [], m, k, v = !0, b = !0) => {
1855
- if (k && m && !e.disabled) {
1856
- if (a.action = !0, b && Array.isArray(E(r, c))) {
1857
- const _ = m(E(r, c), k.argA, k.argB);
1854
+ }, N = (c, u = [], y, k, v = !0, w = !0) => {
1855
+ if (k && y && !t.disabled) {
1856
+ if (a.action = !0, w && Array.isArray(T(r, c))) {
1857
+ const _ = y(T(r, c), k.argA, k.argB);
1858
1858
  v && B(r, c, _);
1859
1859
  }
1860
- if (b && Array.isArray(E(s.errors, c))) {
1861
- const _ = m(E(s.errors, c), k.argA, k.argB);
1862
- v && B(s.errors, c, _), $r(s.errors, c);
1860
+ if (w && Array.isArray(T(s.errors, c))) {
1861
+ const _ = y(T(s.errors, c), k.argA, k.argB);
1862
+ v && B(s.errors, c, _), Fr(s.errors, c);
1863
1863
  }
1864
- if ((h.touchedFields || f.touchedFields) && b && Array.isArray(E(s.touchedFields, c))) {
1865
- const _ = m(E(s.touchedFields, c), k.argA, k.argB);
1864
+ if ((f.touchedFields || h.touchedFields) && w && Array.isArray(T(s.touchedFields, c))) {
1865
+ const _ = y(T(s.touchedFields, c), k.argA, k.argB);
1866
1866
  v && B(s.touchedFields, c, _);
1867
1867
  }
1868
- (h.dirtyFields || f.dirtyFields) && (s.dirtyFields = Re(i, n)), d.state.next({
1868
+ (f.dirtyFields || h.dirtyFields) && (s.dirtyFields = Re(i, n)), d.state.next({
1869
1869
  name: c,
1870
1870
  isDirty: ce(c, u),
1871
1871
  dirtyFields: s.dirtyFields,
@@ -1878,41 +1878,41 @@ function Dr(t = {}) {
1878
1878
  B(s.errors, c, u), d.state.next({
1879
1879
  errors: s.errors
1880
1880
  });
1881
- }, $ = (c) => {
1881
+ }, F = (c) => {
1882
1882
  s.errors = c, d.state.next({
1883
1883
  errors: s.errors,
1884
1884
  isValid: !1
1885
1885
  });
1886
- }, A = (c, u, m, k) => {
1887
- const v = E(r, c);
1886
+ }, x = (c, u, y, k) => {
1887
+ const v = T(r, c);
1888
1888
  if (v) {
1889
- const b = E(n, c, Q(m) ? E(i, c) : m);
1890
- Q(b) || k && k.defaultChecked || u ? B(n, c, u ? b : Rt(v._f)) : q(c, b), a.mount && S();
1889
+ const w = T(n, c, Q(y) ? T(i, c) : y);
1890
+ Q(w) || k && k.defaultChecked || u ? B(n, c, u ? w : Rt(v._f)) : q(c, w), a.mount && S();
1891
1891
  }
1892
- }, N = (c, u, m, k, v) => {
1893
- let b = !1, _ = !1;
1892
+ }, A = (c, u, y, k, v) => {
1893
+ let w = !1, _ = !1;
1894
1894
  const M = {
1895
1895
  name: c
1896
1896
  };
1897
- if (!e.disabled) {
1898
- if (!m || k) {
1899
- (h.isDirty || f.isDirty) && (_ = s.isDirty, s.isDirty = M.isDirty = ce(), b = _ !== M.isDirty);
1900
- const K = Se(E(i, c), u);
1901
- _ = !!E(s.dirtyFields, c), K ? j(s.dirtyFields, c) : B(s.dirtyFields, c, !0), M.dirtyFields = s.dirtyFields, b = b || (h.dirtyFields || f.dirtyFields) && _ !== !K;
1897
+ if (!t.disabled) {
1898
+ if (!y || k) {
1899
+ (f.isDirty || h.isDirty) && (_ = s.isDirty, s.isDirty = M.isDirty = ce(), w = _ !== M.isDirty);
1900
+ const K = Se(T(i, c), u);
1901
+ _ = !!T(s.dirtyFields, c), K ? j(s.dirtyFields, c) : B(s.dirtyFields, c, !0), M.dirtyFields = s.dirtyFields, w = w || (f.dirtyFields || h.dirtyFields) && _ !== !K;
1902
1902
  }
1903
- if (m) {
1904
- const K = E(s.touchedFields, c);
1905
- K || (B(s.touchedFields, c, m), M.touchedFields = s.touchedFields, b = b || (h.touchedFields || f.touchedFields) && K !== m);
1903
+ if (y) {
1904
+ const K = T(s.touchedFields, c);
1905
+ K || (B(s.touchedFields, c, y), M.touchedFields = s.touchedFields, w = w || (f.touchedFields || h.touchedFields) && K !== y);
1906
1906
  }
1907
- b && v && d.state.next(M);
1907
+ w && v && d.state.next(M);
1908
1908
  }
1909
- return b ? M : {};
1910
- }, I = (c, u, m, k) => {
1911
- const v = E(s.errors, c), b = (h.isValid || f.isValid) && ye(u) && s.isValid !== u;
1912
- if (e.delayError && m ? (l = w(() => C(c, m)), l(e.delayError)) : (clearTimeout(y), l = null, m ? B(s.errors, c, m) : j(s.errors, c)), (m ? !Se(v, m) : v) || !se(k) || b) {
1909
+ return w ? M : {};
1910
+ }, I = (c, u, y, k) => {
1911
+ const v = T(s.errors, c), w = (f.isValid || h.isValid) && ye(u) && s.isValid !== u;
1912
+ if (t.delayError && y ? (l = b(() => C(c, y)), l(t.delayError)) : (clearTimeout(m), l = null, y ? B(s.errors, c, y) : j(s.errors, c)), (y ? !Se(v, y) : v) || !se(k) || w) {
1913
1913
  const _ = {
1914
1914
  ...k,
1915
- ...b && ye(u) ? { isValid: u } : {},
1915
+ ...w && ye(u) ? { isValid: u } : {},
1916
1916
  errors: s.errors,
1917
1917
  name: c
1918
1918
  };
@@ -1922,142 +1922,142 @@ function Dr(t = {}) {
1922
1922
  }, d.state.next(_);
1923
1923
  }
1924
1924
  }, O = async (c) => {
1925
- T(c, !0);
1926
- const u = await e.resolver(n, e.context, Tr(c || o.mount, r, e.criteriaMode, e.shouldUseNativeValidation));
1927
- return T(c), u;
1925
+ E(c, !0);
1926
+ const u = await t.resolver(n, t.context, Er(c || o.mount, r, t.criteriaMode, t.shouldUseNativeValidation));
1927
+ return E(c), u;
1928
1928
  }, re = async (c) => {
1929
1929
  const { errors: u } = await O(c);
1930
1930
  if (c)
1931
- for (const m of c) {
1932
- const k = E(u, m);
1933
- k ? B(s.errors, m, k) : j(s.errors, m);
1931
+ for (const y of c) {
1932
+ const k = T(u, y);
1933
+ k ? B(s.errors, y, k) : j(s.errors, y);
1934
1934
  }
1935
1935
  else
1936
1936
  s.errors = u;
1937
1937
  return u;
1938
- }, P = async (c, u, m = {
1938
+ }, P = async (c, u, y = {
1939
1939
  valid: !0
1940
1940
  }) => {
1941
1941
  for (const k in c) {
1942
1942
  const v = c[k];
1943
1943
  if (v) {
1944
- const { _f: b, ..._ } = v;
1945
- if (b) {
1946
- const M = o.array.has(b.name), K = v._f && _r(v._f);
1947
- K && h.validatingFields && T([k], !0);
1948
- const le = await Kt(v, o.disabled, n, p, e.shouldUseNativeValidation && !u, M);
1949
- if (K && h.validatingFields && T([k]), le[b.name] && (m.valid = !1, u))
1944
+ const { _f: w, ..._ } = v;
1945
+ if (w) {
1946
+ const M = o.array.has(w.name), K = v._f && _r(v._f);
1947
+ K && f.validatingFields && E([k], !0);
1948
+ const le = await Kt(v, o.disabled, n, p, t.shouldUseNativeValidation && !u, M);
1949
+ if (K && f.validatingFields && E([k]), le[w.name] && (y.valid = !1, u))
1950
1950
  break;
1951
- !u && (E(le, b.name) ? M ? Fr(s.errors, le, b.name) : B(s.errors, b.name, le[b.name]) : j(s.errors, b.name));
1951
+ !u && (T(le, w.name) ? M ? $r(s.errors, le, w.name) : B(s.errors, w.name, le[w.name]) : j(s.errors, w.name));
1952
1952
  }
1953
- !se(_) && await P(_, u, m);
1953
+ !se(_) && await P(_, u, y);
1954
1954
  }
1955
1955
  }
1956
- return m.valid;
1956
+ return y.valid;
1957
1957
  }, ne = () => {
1958
1958
  for (const c of o.unMount) {
1959
- const u = E(r, c);
1960
- u && (u._f.refs ? u._f.refs.every((m) => !ct(m)) : !ct(u._f.ref)) && tt(c);
1959
+ const u = T(r, c);
1960
+ u && (u._f.refs ? u._f.refs.every((y) => !ct(y)) : !ct(u._f.ref)) && tt(c);
1961
1961
  }
1962
1962
  o.unMount = /* @__PURE__ */ new Set();
1963
- }, ce = (c, u) => !e.disabled && (c && u && B(n, c, u), !Se(de(), i)), L = (c, u, m) => wr(c, o, {
1963
+ }, ce = (c, u) => !t.disabled && (c && u && B(n, c, u), !Se(de(), i)), L = (c, u, y) => wr(c, o, {
1964
1964
  ...a.mount ? n : Q(u) ? i : pe(c) ? { [c]: u } : u
1965
- }, m, u), V = (c) => mt(E(a.mount ? n : i, c, e.shouldUnregister ? E(i, c, []) : [])), q = (c, u, m = {}) => {
1966
- const k = E(r, c);
1965
+ }, y, u), V = (c) => mt(T(a.mount ? n : i, c, t.shouldUnregister ? T(i, c, []) : [])), q = (c, u, y = {}) => {
1966
+ const k = T(r, c);
1967
1967
  let v = u;
1968
1968
  if (k) {
1969
- const b = k._f;
1970
- b && (!b.disabled && B(n, c, cs(u, b)), v = ze(b.ref) && te(u) ? "" : u, ns(b.ref) ? [...b.ref.options].forEach((_) => _.selected = v.includes(_.value)) : b.refs ? qe(b.ref) ? b.refs.forEach((_) => {
1969
+ const w = k._f;
1970
+ w && (!w.disabled && B(n, c, cs(u, w)), v = ze(w.ref) && te(u) ? "" : u, ns(w.ref) ? [...w.ref.options].forEach((_) => _.selected = v.includes(_.value)) : w.refs ? qe(w.ref) ? w.refs.forEach((_) => {
1971
1971
  (!_.defaultChecked || !_.disabled) && (Array.isArray(v) ? _.checked = !!v.find((M) => M === _.value) : _.checked = v === _.value || !!v);
1972
- }) : b.refs.forEach((_) => _.checked = _.value === v) : gt(b.ref) ? b.ref.value = "" : (b.ref.value = v, b.ref.type || d.state.next({
1972
+ }) : w.refs.forEach((_) => _.checked = _.value === v) : gt(w.ref) ? w.ref.value = "" : (w.ref.value = v, w.ref.type || d.state.next({
1973
1973
  name: c,
1974
1974
  values: z(n)
1975
1975
  })));
1976
1976
  }
1977
- (m.shouldDirty || m.shouldTouch) && N(c, v, m.shouldTouch, m.shouldDirty, !0), m.shouldValidate && ie(c);
1978
- }, G = (c, u, m) => {
1977
+ (y.shouldDirty || y.shouldTouch) && A(c, v, y.shouldTouch, y.shouldDirty, !0), y.shouldValidate && ie(c);
1978
+ }, G = (c, u, y) => {
1979
1979
  for (const k in u) {
1980
1980
  if (!u.hasOwnProperty(k))
1981
1981
  return;
1982
- const v = u[k], b = c + "." + k, _ = E(r, b);
1983
- (o.array.has(c) || H(v) || _ && !_._f) && !xe(v) ? G(b, v, m) : q(b, v, m);
1982
+ const v = u[k], w = c + "." + k, _ = T(r, w);
1983
+ (o.array.has(c) || H(v) || _ && !_._f) && !Ne(v) ? G(w, v, y) : q(w, v, y);
1984
1984
  }
1985
- }, Y = (c, u, m = {}) => {
1986
- const k = E(r, c), v = o.array.has(c), b = z(u);
1987
- B(n, c, b), v ? (d.array.next({
1985
+ }, Y = (c, u, y = {}) => {
1986
+ const k = T(r, c), v = o.array.has(c), w = z(u);
1987
+ B(n, c, w), v ? (d.array.next({
1988
1988
  name: c,
1989
1989
  values: z(n)
1990
- }), (h.isDirty || h.dirtyFields || f.isDirty || f.dirtyFields) && m.shouldDirty && d.state.next({
1990
+ }), (f.isDirty || f.dirtyFields || h.isDirty || h.dirtyFields) && y.shouldDirty && d.state.next({
1991
1991
  name: c,
1992
1992
  dirtyFields: Re(i, n),
1993
- isDirty: ce(c, b)
1994
- })) : k && !k._f && !te(b) ? G(c, b, m) : q(c, b, m), Mt(c, o) && d.state.next({ ...s, name: c }), d.state.next({
1993
+ isDirty: ce(c, w)
1994
+ })) : k && !k._f && !te(w) ? G(c, w, y) : q(c, w, y), Mt(c, o) && d.state.next({ ...s, name: c }), d.state.next({
1995
1995
  name: a.mount ? c : void 0,
1996
1996
  values: z(n)
1997
1997
  });
1998
1998
  }, U = async (c) => {
1999
1999
  a.mount = !0;
2000
2000
  const u = c.target;
2001
- let m = u.name, k = !0;
2002
- const v = E(r, m), b = (K) => {
2003
- k = Number.isNaN(K) || xe(K) && isNaN(K.getTime()) || Se(K, E(n, m, K));
2004
- }, _ = It(e.mode), M = It(e.reValidateMode);
2001
+ let y = u.name, k = !0;
2002
+ const v = T(r, y), w = (K) => {
2003
+ k = Number.isNaN(K) || Ne(K) && isNaN(K.getTime()) || Se(K, T(n, y, K));
2004
+ }, _ = It(t.mode), M = It(t.reValidateMode);
2005
2005
  if (v) {
2006
2006
  let K, le;
2007
- const We = u.type ? Rt(v._f) : fr(c), ve = c.type === $t.BLUR || c.type === $t.FOCUS_OUT, ws = !Cr(v._f) && !e.resolver && !E(s.errors, m) && !v._f.deps || Nr(ve, E(s.touchedFields, m), s.isSubmitted, M, _), nt = Mt(m, o, ve);
2008
- B(n, m, We), ve ? (v._f.onBlur && v._f.onBlur(c), l && l(0)) : v._f.onChange && v._f.onChange(c);
2009
- const it = N(m, We, ve), vs = !se(it) || nt;
2007
+ const We = u.type ? Rt(v._f) : fr(c), ve = c.type === Ft.BLUR || c.type === Ft.FOCUS_OUT, ws = !Cr(v._f) && !t.resolver && !T(s.errors, y) && !v._f.deps || Ar(ve, T(s.touchedFields, y), s.isSubmitted, M, _), nt = Mt(y, o, ve);
2008
+ B(n, y, We), ve ? (v._f.onBlur && v._f.onBlur(c), l && l(0)) : v._f.onChange && v._f.onChange(c);
2009
+ const it = A(y, We, ve), vs = !se(it) || nt;
2010
2010
  if (!ve && d.state.next({
2011
- name: m,
2011
+ name: y,
2012
2012
  type: c.type,
2013
2013
  values: z(n)
2014
2014
  }), ws)
2015
- return (h.isValid || f.isValid) && (e.mode === "onBlur" ? ve && S() : ve || S()), vs && d.state.next({ name: m, ...nt ? {} : it });
2016
- if (!ve && nt && d.state.next({ ...s }), e.resolver) {
2017
- const { errors: _t } = await O([m]);
2018
- if (b(We), k) {
2019
- const ks = Ot(s.errors, r, m), Ct = Ot(_t, r, ks.name || m);
2020
- K = Ct.error, m = Ct.name, le = se(_t);
2015
+ return (f.isValid || h.isValid) && (t.mode === "onBlur" ? ve && S() : ve || S()), vs && d.state.next({ name: y, ...nt ? {} : it });
2016
+ if (!ve && nt && d.state.next({ ...s }), t.resolver) {
2017
+ const { errors: _t } = await O([y]);
2018
+ if (w(We), k) {
2019
+ const ks = Ot(s.errors, r, y), Ct = Ot(_t, r, ks.name || y);
2020
+ K = Ct.error, y = Ct.name, le = se(_t);
2021
2021
  }
2022
2022
  } else
2023
- T([m], !0), K = (await Kt(v, o.disabled, n, p, e.shouldUseNativeValidation))[m], T([m]), b(We), k && (K ? le = !1 : (h.isValid || f.isValid) && (le = await P(r, !0)));
2024
- k && (v._f.deps && ie(v._f.deps), I(m, le, K, it));
2023
+ E([y], !0), K = (await Kt(v, o.disabled, n, p, t.shouldUseNativeValidation))[y], E([y]), w(We), k && (K ? le = !1 : (f.isValid || h.isValid) && (le = await P(r, !0)));
2024
+ k && (v._f.deps && ie(v._f.deps), I(y, le, K, it));
2025
2025
  }
2026
2026
  }, Z = (c, u) => {
2027
- if (E(s.errors, u) && c.focus)
2027
+ if (T(s.errors, u) && c.focus)
2028
2028
  return c.focus(), 1;
2029
2029
  }, ie = async (c, u = {}) => {
2030
- let m, k;
2030
+ let y, k;
2031
2031
  const v = Pe(c);
2032
- if (e.resolver) {
2033
- const b = await re(Q(c) ? c : v);
2034
- m = se(b), k = c ? !v.some((_) => E(b, _)) : m;
2035
- } else c ? (k = (await Promise.all(v.map(async (b) => {
2036
- const _ = E(r, b);
2037
- return await P(_ && _._f ? { [b]: _ } : _);
2038
- }))).every(Boolean), !(!k && !s.isValid) && S()) : k = m = await P(r);
2032
+ if (t.resolver) {
2033
+ const w = await re(Q(c) ? c : v);
2034
+ y = se(w), k = c ? !v.some((_) => T(w, _)) : y;
2035
+ } else c ? (k = (await Promise.all(v.map(async (w) => {
2036
+ const _ = T(r, w);
2037
+ return await P(_ && _._f ? { [w]: _ } : _);
2038
+ }))).every(Boolean), !(!k && !s.isValid) && S()) : k = y = await P(r);
2039
2039
  return d.state.next({
2040
- ...!pe(c) || (h.isValid || f.isValid) && m !== s.isValid ? {} : { name: c },
2041
- ...e.resolver || !c ? { isValid: m } : {},
2040
+ ...!pe(c) || (f.isValid || h.isValid) && y !== s.isValid ? {} : { name: c },
2041
+ ...t.resolver || !c ? { isValid: y } : {},
2042
2042
  errors: s.errors
2043
2043
  }), u.shouldFocus && !k && Me(r, Z, c ? v : o.mount), k;
2044
2044
  }, de = (c) => {
2045
2045
  const u = {
2046
2046
  ...a.mount ? n : i
2047
2047
  };
2048
- return Q(c) ? u : pe(c) ? E(u, c) : c.map((m) => E(u, m));
2048
+ return Q(c) ? u : pe(c) ? T(u, c) : c.map((y) => T(u, y));
2049
2049
  }, He = (c, u) => ({
2050
- invalid: !!E((u || s).errors, c),
2051
- isDirty: !!E((u || s).dirtyFields, c),
2052
- error: E((u || s).errors, c),
2053
- isValidating: !!E(s.validatingFields, c),
2054
- isTouched: !!E((u || s).touchedFields, c)
2050
+ invalid: !!T((u || s).errors, c),
2051
+ isDirty: !!T((u || s).dirtyFields, c),
2052
+ error: T((u || s).errors, c),
2053
+ isValidating: !!T(s.validatingFields, c),
2054
+ isTouched: !!T((u || s).touchedFields, c)
2055
2055
  }), _e = (c) => {
2056
2056
  c && Pe(c).forEach((u) => j(s.errors, u)), d.state.next({
2057
2057
  errors: c ? s.errors : {}
2058
2058
  });
2059
- }, bt = (c, u, m) => {
2060
- const k = (E(r, c, { _f: {} })._f || {}).ref, v = E(s.errors, c) || {}, { ref: b, message: _, type: M, ...K } = v;
2059
+ }, bt = (c, u, y) => {
2060
+ const k = (T(r, c, { _f: {} })._f || {}).ref, v = T(s.errors, c) || {}, { ref: w, message: _, type: M, ...K } = v;
2061
2061
  B(s.errors, c, {
2062
2062
  ...K,
2063
2063
  ...u,
@@ -2066,27 +2066,27 @@ function Dr(t = {}) {
2066
2066
  name: c,
2067
2067
  errors: s.errors,
2068
2068
  isValid: !1
2069
- }), m && m.shouldFocus && k && k.focus && k.focus();
2069
+ }), y && y.shouldFocus && k && k.focus && k.focus();
2070
2070
  }, hs = (c, u) => he(c) ? d.state.subscribe({
2071
- next: (m) => "values" in m && c(L(void 0, u), m)
2071
+ next: (y) => "values" in y && c(L(void 0, u), y)
2072
2072
  }) : L(c, u, !0), wt = (c) => d.state.subscribe({
2073
2073
  next: (u) => {
2074
- Ar(c.name, u.name, c.exact) && xr(u, c.formState || h, bs, c.reRenderRoot) && c.callback({
2074
+ xr(c.name, u.name, c.exact) && Nr(u, c.formState || f, bs, c.reRenderRoot) && c.callback({
2075
2075
  values: { ...n },
2076
2076
  ...s,
2077
2077
  ...u,
2078
2078
  defaultValues: i
2079
2079
  });
2080
2080
  }
2081
- }).unsubscribe, ms = (c) => (a.mount = !0, f = {
2082
- ...f,
2081
+ }).unsubscribe, ms = (c) => (a.mount = !0, h = {
2082
+ ...h,
2083
2083
  ...c.formState
2084
2084
  }, wt({
2085
2085
  ...c,
2086
- formState: f
2086
+ formState: h
2087
2087
  })), tt = (c, u = {}) => {
2088
- for (const m of c ? Pe(c) : o.mount)
2089
- o.mount.delete(m), o.array.delete(m), u.keepValue || (j(r, m), j(n, m)), !u.keepError && j(s.errors, m), !u.keepDirty && j(s.dirtyFields, m), !u.keepTouched && j(s.touchedFields, m), !u.keepIsValidating && j(s.validatingFields, m), !e.shouldUnregister && !u.keepDefaultValue && j(i, m);
2088
+ for (const y of c ? Pe(c) : o.mount)
2089
+ o.mount.delete(y), o.array.delete(y), u.keepValue || (j(r, y), j(n, y)), !u.keepError && j(s.errors, y), !u.keepDirty && j(s.dirtyFields, y), !u.keepTouched && j(s.touchedFields, y), !u.keepIsValidating && j(s.validatingFields, y), !t.shouldUnregister && !u.keepDefaultValue && j(i, y);
2090
2090
  d.state.next({
2091
2091
  values: z(n)
2092
2092
  }), d.state.next({
@@ -2096,22 +2096,22 @@ function Dr(t = {}) {
2096
2096
  }, vt = ({ disabled: c, name: u }) => {
2097
2097
  (ye(c) && a.mount || c || o.disabled.has(u)) && (c ? o.disabled.add(u) : o.disabled.delete(u));
2098
2098
  }, st = (c, u = {}) => {
2099
- let m = E(r, c);
2100
- const k = ye(u.disabled) || ye(e.disabled);
2099
+ let y = T(r, c);
2100
+ const k = ye(u.disabled) || ye(t.disabled);
2101
2101
  return B(r, c, {
2102
- ...m || {},
2102
+ ...y || {},
2103
2103
  _f: {
2104
- ...m && m._f ? m._f : { ref: { name: c } },
2104
+ ...y && y._f ? y._f : { ref: { name: c } },
2105
2105
  name: c,
2106
2106
  mount: !0,
2107
2107
  ...u
2108
2108
  }
2109
- }), o.mount.add(c), m ? vt({
2110
- disabled: ye(u.disabled) ? u.disabled : e.disabled,
2109
+ }), o.mount.add(c), y ? vt({
2110
+ disabled: ye(u.disabled) ? u.disabled : t.disabled,
2111
2111
  name: c
2112
- }) : A(c, !0, u.value), {
2113
- ...k ? { disabled: u.disabled || e.disabled } : {},
2114
- ...e.progressive ? {
2112
+ }) : x(c, !0, u.value), {
2113
+ ...k ? { disabled: u.disabled || t.disabled } : {},
2114
+ ...t.progressive ? {
2115
2115
  required: !!u.required,
2116
2116
  min: Ie(u.min),
2117
2117
  max: Ie(u.max),
@@ -2124,59 +2124,59 @@ function Dr(t = {}) {
2124
2124
  onBlur: U,
2125
2125
  ref: (v) => {
2126
2126
  if (v) {
2127
- st(c, u), m = E(r, c);
2128
- const b = Q(v.value) && v.querySelectorAll && v.querySelectorAll("input,select,textarea")[0] || v, _ = kr(b), M = m._f.refs || [];
2129
- if (_ ? M.find((K) => K === b) : b === m._f.ref)
2127
+ st(c, u), y = T(r, c);
2128
+ const w = Q(v.value) && v.querySelectorAll && v.querySelectorAll("input,select,textarea")[0] || v, _ = kr(w), M = y._f.refs || [];
2129
+ if (_ ? M.find((K) => K === w) : w === y._f.ref)
2130
2130
  return;
2131
2131
  B(r, c, {
2132
2132
  _f: {
2133
- ...m._f,
2133
+ ...y._f,
2134
2134
  ..._ ? {
2135
2135
  refs: [
2136
2136
  ...M.filter(ct),
2137
- b,
2138
- ...Array.isArray(E(i, c)) ? [{}] : []
2137
+ w,
2138
+ ...Array.isArray(T(i, c)) ? [{}] : []
2139
2139
  ],
2140
- ref: { type: b.type, name: c }
2141
- } : { ref: b }
2140
+ ref: { type: w.type, name: c }
2141
+ } : { ref: w }
2142
2142
  }
2143
- }), A(c, !1, void 0, b);
2143
+ }), x(c, !1, void 0, w);
2144
2144
  } else
2145
- m = E(r, c, {}), m._f && (m._f.mount = !1), (e.shouldUnregister || u.shouldUnregister) && !(mr(o.array, c) && a.action) && o.unMount.add(c);
2145
+ y = T(r, c, {}), y._f && (y._f.mount = !1), (t.shouldUnregister || u.shouldUnregister) && !(mr(o.array, c) && a.action) && o.unMount.add(c);
2146
2146
  }
2147
2147
  };
2148
- }, rt = () => e.shouldFocusError && Me(r, Z, o.mount), ys = (c) => {
2149
- ye(c) && (d.state.next({ disabled: c }), Me(r, (u, m) => {
2150
- const k = E(r, m);
2148
+ }, rt = () => t.shouldFocusError && Me(r, Z, o.mount), ys = (c) => {
2149
+ ye(c) && (d.state.next({ disabled: c }), Me(r, (u, y) => {
2150
+ const k = T(r, y);
2151
2151
  k && (u.disabled = k._f.disabled || c, Array.isArray(k._f.refs) && k._f.refs.forEach((v) => {
2152
2152
  v.disabled = k._f.disabled || c;
2153
2153
  }));
2154
2154
  }, 0, !1));
2155
- }, kt = (c, u) => async (m) => {
2155
+ }, kt = (c, u) => async (y) => {
2156
2156
  let k;
2157
- m && (m.preventDefault && m.preventDefault(), m.persist && m.persist());
2157
+ y && (y.preventDefault && y.preventDefault(), y.persist && y.persist());
2158
2158
  let v = z(n);
2159
2159
  if (d.state.next({
2160
2160
  isSubmitting: !0
2161
- }), e.resolver) {
2162
- const { errors: b, values: _ } = await O();
2163
- s.errors = b, v = z(_);
2161
+ }), t.resolver) {
2162
+ const { errors: w, values: _ } = await O();
2163
+ s.errors = w, v = z(_);
2164
2164
  } else
2165
2165
  await P(r);
2166
2166
  if (o.disabled.size)
2167
- for (const b of o.disabled)
2168
- j(v, b);
2167
+ for (const w of o.disabled)
2168
+ j(v, w);
2169
2169
  if (j(s.errors, "root"), se(s.errors)) {
2170
2170
  d.state.next({
2171
2171
  errors: {}
2172
2172
  });
2173
2173
  try {
2174
- await c(v, m);
2175
- } catch (b) {
2176
- k = b;
2174
+ await c(v, y);
2175
+ } catch (w) {
2176
+ k = w;
2177
2177
  }
2178
2178
  } else
2179
- u && await u({ ...s.errors }, m), rt(), setTimeout(rt);
2179
+ u && await u({ ...s.errors }, y), rt(), setTimeout(rt);
2180
2180
  if (d.state.next({
2181
2181
  isSubmitted: !0,
2182
2182
  isSubmitting: !1,
@@ -2186,21 +2186,21 @@ function Dr(t = {}) {
2186
2186
  }), k)
2187
2187
  throw k;
2188
2188
  }, gs = (c, u = {}) => {
2189
- E(r, c) && (Q(u.defaultValue) ? Y(c, z(E(i, c))) : (Y(c, u.defaultValue), B(i, c, z(u.defaultValue))), u.keepTouched || j(s.touchedFields, c), u.keepDirty || (j(s.dirtyFields, c), s.isDirty = u.defaultValue ? ce(c, z(E(i, c))) : ce()), u.keepError || (j(s.errors, c), h.isValid && S()), d.state.next({ ...s }));
2189
+ T(r, c) && (Q(u.defaultValue) ? Y(c, z(T(i, c))) : (Y(c, u.defaultValue), B(i, c, z(u.defaultValue))), u.keepTouched || j(s.touchedFields, c), u.keepDirty || (j(s.dirtyFields, c), s.isDirty = u.defaultValue ? ce(c, z(T(i, c))) : ce()), u.keepError || (j(s.errors, c), f.isValid && S()), d.state.next({ ...s }));
2190
2190
  }, St = (c, u = {}) => {
2191
- const m = c ? z(c) : i, k = z(m), v = se(c), b = v ? i : k;
2192
- if (u.keepDefaultValues || (i = m), !u.keepValues) {
2191
+ const y = c ? z(c) : i, k = z(y), v = se(c), w = v ? i : k;
2192
+ if (u.keepDefaultValues || (i = y), !u.keepValues) {
2193
2193
  if (u.keepDirtyValues) {
2194
2194
  const _ = /* @__PURE__ */ new Set([
2195
2195
  ...o.mount,
2196
2196
  ...Object.keys(Re(i, n))
2197
2197
  ]);
2198
2198
  for (const M of Array.from(_))
2199
- E(s.dirtyFields, M) ? B(b, M, E(n, M)) : Y(M, E(b, M));
2199
+ T(s.dirtyFields, M) ? B(w, M, T(n, M)) : Y(M, T(w, M));
2200
2200
  } else {
2201
2201
  if (ht && Q(c))
2202
2202
  for (const _ of o.mount) {
2203
- const M = E(r, _);
2203
+ const M = T(r, _);
2204
2204
  if (M && M._f) {
2205
2205
  const K = Array.isArray(M._f.refs) ? M._f.refs[0] : M._f.ref;
2206
2206
  if (ze(K)) {
@@ -2214,14 +2214,14 @@ function Dr(t = {}) {
2214
2214
  }
2215
2215
  if (u.keepFieldsRef)
2216
2216
  for (const _ of o.mount)
2217
- Y(_, E(b, _));
2217
+ Y(_, T(w, _));
2218
2218
  else
2219
2219
  r = {};
2220
2220
  }
2221
- n = e.shouldUnregister ? u.keepDefaultValues ? z(i) : {} : z(b), d.array.next({
2222
- values: { ...b }
2221
+ n = t.shouldUnregister ? u.keepDefaultValues ? z(i) : {} : z(w), d.array.next({
2222
+ values: { ...w }
2223
2223
  }), d.state.next({
2224
- values: { ...b }
2224
+ values: { ...w }
2225
2225
  });
2226
2226
  }
2227
2227
  o = {
@@ -2232,7 +2232,7 @@ function Dr(t = {}) {
2232
2232
  watch: /* @__PURE__ */ new Set(),
2233
2233
  watchAll: !1,
2234
2234
  focus: ""
2235
- }, a.mount = !h.isValid || !!u.keepIsValid || !!u.keepDirtyValues, a.watch = !!e.shouldUnregister, d.state.next({
2235
+ }, a.mount = !f.isValid || !!u.keepIsValid || !!u.keepDirtyValues, a.watch = !!t.shouldUnregister, d.state.next({
2236
2236
  submitCount: u.keepSubmitCount ? s.submitCount : 0,
2237
2237
  isDirty: v ? !1 : u.keepDirty ? s.isDirty : !!(u.keepDefaultValues && !Se(c, i)),
2238
2238
  isSubmitted: u.keepIsSubmitted ? s.isSubmitted : !1,
@@ -2242,8 +2242,8 @@ function Dr(t = {}) {
2242
2242
  isSubmitSuccessful: u.keepIsSubmitSuccessful ? s.isSubmitSuccessful : !1,
2243
2243
  isSubmitting: !1
2244
2244
  });
2245
- }, Et = (c, u) => St(he(c) ? c(n) : c, u), ps = (c, u = {}) => {
2246
- const m = E(r, c), k = m && m._f;
2245
+ }, Tt = (c, u) => St(he(c) ? c(n) : c, u), ps = (c, u = {}) => {
2246
+ const y = T(r, c), k = y && y._f;
2247
2247
  if (k) {
2248
2248
  const v = k.refs ? k.refs[0] : k.ref;
2249
2249
  v.focus && (v.focus(), u.shouldSelect && he(v.select) && v.select());
@@ -2253,7 +2253,7 @@ function Dr(t = {}) {
2253
2253
  ...s,
2254
2254
  ...c
2255
2255
  };
2256
- }, Tt = {
2256
+ }, Et = {
2257
2257
  control: {
2258
2258
  register: st,
2259
2259
  unregister: tt,
@@ -2266,20 +2266,20 @@ function Dr(t = {}) {
2266
2266
  _getWatch: L,
2267
2267
  _getDirty: ce,
2268
2268
  _setValid: S,
2269
- _setFieldArray: x,
2269
+ _setFieldArray: N,
2270
2270
  _setDisabledField: vt,
2271
- _setErrors: $,
2271
+ _setErrors: F,
2272
2272
  _getFieldArray: V,
2273
2273
  _reset: St,
2274
- _resetDefaultValues: () => he(e.defaultValues) && e.defaultValues().then((c) => {
2275
- Et(c, e.resetOptions), d.state.next({
2274
+ _resetDefaultValues: () => he(t.defaultValues) && t.defaultValues().then((c) => {
2275
+ Tt(c, t.resetOptions), d.state.next({
2276
2276
  isLoading: !1
2277
2277
  });
2278
2278
  }),
2279
2279
  _removeUnmounted: ne,
2280
2280
  _disableForm: ys,
2281
2281
  _subjects: d,
2282
- _proxyFormState: h,
2282
+ _proxyFormState: f,
2283
2283
  get _fields() {
2284
2284
  return r;
2285
2285
  },
@@ -2305,11 +2305,11 @@ function Dr(t = {}) {
2305
2305
  return s;
2306
2306
  },
2307
2307
  get _options() {
2308
- return e;
2308
+ return t;
2309
2309
  },
2310
2310
  set _options(c) {
2311
- e = {
2312
- ...e,
2311
+ t = {
2312
+ ...t,
2313
2313
  ...c
2314
2314
  };
2315
2315
  }
@@ -2321,7 +2321,7 @@ function Dr(t = {}) {
2321
2321
  watch: hs,
2322
2322
  setValue: Y,
2323
2323
  getValues: de,
2324
- reset: Et,
2324
+ reset: Tt,
2325
2325
  resetField: gs,
2326
2326
  clearErrors: _e,
2327
2327
  unregister: tt,
@@ -2330,15 +2330,15 @@ function Dr(t = {}) {
2330
2330
  getFieldState: He
2331
2331
  };
2332
2332
  return {
2333
- ...Tt,
2334
- formControl: Tt
2333
+ ...Et,
2334
+ formControl: Et
2335
2335
  };
2336
2336
  }
2337
- function us(t = {}) {
2338
- const e = ae.useRef(void 0), s = ae.useRef(void 0), [r, i] = ae.useState({
2337
+ function us(e = {}) {
2338
+ const t = ae.useRef(void 0), s = ae.useRef(void 0), [r, i] = ae.useState({
2339
2339
  isDirty: !1,
2340
2340
  isValidating: !1,
2341
- isLoading: he(t.defaultValues),
2341
+ isLoading: he(e.defaultValues),
2342
2342
  isSubmitted: !1,
2343
2343
  isSubmitting: !1,
2344
2344
  isSubmitSuccessful: !1,
@@ -2347,26 +2347,26 @@ function us(t = {}) {
2347
2347
  dirtyFields: {},
2348
2348
  touchedFields: {},
2349
2349
  validatingFields: {},
2350
- errors: t.errors || {},
2351
- disabled: t.disabled || !1,
2350
+ errors: e.errors || {},
2351
+ disabled: e.disabled || !1,
2352
2352
  isReady: !1,
2353
- defaultValues: he(t.defaultValues) ? void 0 : t.defaultValues
2353
+ defaultValues: he(e.defaultValues) ? void 0 : e.defaultValues
2354
2354
  });
2355
- if (!e.current)
2356
- if (t.formControl)
2357
- e.current = {
2358
- ...t.formControl,
2355
+ if (!t.current)
2356
+ if (e.formControl)
2357
+ t.current = {
2358
+ ...e.formControl,
2359
2359
  formState: r
2360
- }, t.defaultValues && !he(t.defaultValues) && t.formControl.reset(t.defaultValues, t.resetOptions);
2360
+ }, e.defaultValues && !he(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
2361
2361
  else {
2362
- const { formControl: a, ...o } = Dr(t);
2363
- e.current = {
2362
+ const { formControl: a, ...o } = Dr(e);
2363
+ t.current = {
2364
2364
  ...o,
2365
2365
  formState: r
2366
2366
  };
2367
2367
  }
2368
- const n = e.current.control;
2369
- return n._options = t, br(() => {
2368
+ const n = t.current.control;
2369
+ return n._options = e, br(() => {
2370
2370
  const a = n._subscribe({
2371
2371
  formState: n._proxyFormState,
2372
2372
  callback: () => i({ ...n._formState }),
@@ -2376,15 +2376,15 @@ function us(t = {}) {
2376
2376
  ...o,
2377
2377
  isReady: !0
2378
2378
  })), n._formState.isReady = !0, a;
2379
- }, [n]), ae.useEffect(() => n._disableForm(t.disabled), [n, t.disabled]), ae.useEffect(() => {
2380
- t.mode && (n._options.mode = t.mode), t.reValidateMode && (n._options.reValidateMode = t.reValidateMode);
2381
- }, [n, t.mode, t.reValidateMode]), ae.useEffect(() => {
2382
- t.errors && (n._setErrors(t.errors), n._focusError());
2383
- }, [n, t.errors]), ae.useEffect(() => {
2384
- t.shouldUnregister && n._subjects.state.next({
2379
+ }, [n]), ae.useEffect(() => n._disableForm(e.disabled), [n, e.disabled]), ae.useEffect(() => {
2380
+ e.mode && (n._options.mode = e.mode), e.reValidateMode && (n._options.reValidateMode = e.reValidateMode);
2381
+ }, [n, e.mode, e.reValidateMode]), ae.useEffect(() => {
2382
+ e.errors && (n._setErrors(e.errors), n._focusError());
2383
+ }, [n, e.errors]), ae.useEffect(() => {
2384
+ e.shouldUnregister && n._subjects.state.next({
2385
2385
  values: n._getWatch()
2386
2386
  });
2387
- }, [n, t.shouldUnregister]), ae.useEffect(() => {
2387
+ }, [n, e.shouldUnregister]), ae.useEffect(() => {
2388
2388
  if (n._proxyFormState.isDirty) {
2389
2389
  const a = n._getDirty();
2390
2390
  a !== r.isDirty && n._subjects.state.next({
@@ -2392,47 +2392,47 @@ function us(t = {}) {
2392
2392
  });
2393
2393
  }
2394
2394
  }, [n, r.isDirty]), ae.useEffect(() => {
2395
- t.values && !Se(t.values, s.current) ? (n._reset(t.values, {
2395
+ e.values && !Se(e.values, s.current) ? (n._reset(e.values, {
2396
2396
  keepFieldsRef: !0,
2397
2397
  ...n._options.resetOptions
2398
- }), s.current = t.values, i((a) => ({ ...a }))) : n._resetDefaultValues();
2399
- }, [n, t.values]), ae.useEffect(() => {
2398
+ }), s.current = e.values, i((a) => ({ ...a }))) : n._resetDefaultValues();
2399
+ }, [n, e.values]), ae.useEffect(() => {
2400
2400
  n._state.mount || (n._setValid(), n._state.mount = !0), n._state.watch && (n._state.watch = !1, n._subjects.state.next({ ...n._formState })), n._removeUnmounted();
2401
- }), e.current.formState = pr(r, n), e.current;
2401
+ }), t.current.formState = pr(r, n), t.current;
2402
2402
  }
2403
- const xn = (t) => {
2404
- const { t: e } = R(), { showStackNotifications: s, showSuccessNotification: r } = Ne(), {
2403
+ const Nn = (e) => {
2404
+ const { t } = R(), { showStackNotifications: s, showSuccessNotification: r } = Ae(), {
2405
2405
  defaultValues: i,
2406
2406
  mutationFn: n,
2407
2407
  formToDto: a,
2408
2408
  onError: o,
2409
2409
  onSuccess: l,
2410
- queryKey: y,
2411
- onSuccessMessage: h
2412
- } = t, { control: f, handleSubmit: d, reset: p, setError: w, getValues: S, setValue: T } = us({
2410
+ queryKey: m,
2411
+ onSuccessMessage: f
2412
+ } = e, { control: h, handleSubmit: d, reset: p, setError: b, getValues: S, setValue: E } = us({
2413
2413
  defaultValues: i
2414
- }), x = D(
2415
- (A) => {
2416
- const N = A == null ? void 0 : A.errors, I = [];
2417
- return N && N.forEach(([O, re]) => {
2414
+ }), N = D(
2415
+ (x) => {
2416
+ const A = x == null ? void 0 : x.errors, I = [];
2417
+ return A && A.forEach(([O, re]) => {
2418
2418
  const P = document.querySelector(`[name="${O}"]`);
2419
- (P instanceof HTMLInputElement || P instanceof HTMLTextAreaElement || P instanceof HTMLSelectElement) && (P.focus(), P.classList.add("error"), I.push(e(`_entities:${y}.${O}.${re}`)));
2419
+ (P instanceof HTMLInputElement || P instanceof HTMLTextAreaElement || P instanceof HTMLSelectElement) && (P.focus(), P.classList.add("error"), I.push(t(`_entities:${m}.${O}.${re}`)));
2420
2420
  }), I;
2421
2421
  },
2422
- [e, y]
2422
+ [t, m]
2423
2423
  ), C = D(() => {
2424
- document.querySelectorAll("input, textarea, select").forEach((N) => {
2425
- N.classList.remove("error");
2424
+ document.querySelectorAll("input, textarea, select").forEach((A) => {
2425
+ A.classList.remove("error");
2426
2426
  });
2427
- }, []), $ = Ke(
2427
+ }, []), F = Ke(
2428
2428
  {
2429
2429
  mutationFn: n,
2430
- onError: (A) => {
2431
- console.error(A);
2432
- const N = A;
2433
- if (o) o(A);
2434
- else if (Xe(N)) {
2435
- const I = x(N);
2430
+ onError: (x) => {
2431
+ console.error(x);
2432
+ const A = x;
2433
+ if (o) o(x);
2434
+ else if (Xe(A)) {
2435
+ const I = N(A);
2436
2436
  s(
2437
2437
  I.map(
2438
2438
  (O) => ({
@@ -2441,8 +2441,8 @@ const xn = (t) => {
2441
2441
  })
2442
2442
  )
2443
2443
  );
2444
- } else if (Ze(N)) {
2445
- const I = N.message || e("_accessibility:errors.500"), O = e(`_accessibility:errors.${N.status}`);
2444
+ } else if (Ze(A)) {
2445
+ const I = A.message || t("_accessibility:errors.500"), O = t(`_accessibility:errors.${A.status}`);
2446
2446
  s([
2447
2447
  {
2448
2448
  message: O || I,
@@ -2451,118 +2451,118 @@ const xn = (t) => {
2451
2451
  ]);
2452
2452
  }
2453
2453
  },
2454
- onSuccess: async (A) => {
2455
- we && await we.invalidateQueries({ queryKey: y }), l && l(A), h && r({
2456
- message: h
2454
+ onSuccess: async (x) => {
2455
+ we && await we.invalidateQueries({ queryKey: m }), l && l(x), f && r({
2456
+ message: f
2457
2457
  });
2458
2458
  }
2459
2459
  }
2460
2460
  );
2461
2461
  return {
2462
- control: f,
2462
+ control: h,
2463
2463
  getValues: S,
2464
- setValue: T,
2464
+ setValue: E,
2465
2465
  handleSubmit: d,
2466
- onSubmit: (A) => {
2467
- C(), $.mutate(
2468
- a ? a(A) : A
2466
+ onSubmit: (x) => {
2467
+ C(), F.mutate(
2468
+ a ? a(x) : x
2469
2469
  );
2470
2470
  },
2471
2471
  reset: p,
2472
- setError: w,
2473
- isLoading: $.isPending
2472
+ setError: b,
2473
+ isLoading: F.isPending
2474
2474
  };
2475
- }, Vr = (t) => {
2476
- const { t: e } = R(), {
2475
+ }, Vr = (e) => {
2476
+ const { t } = R(), {
2477
2477
  onClick: s,
2478
2478
  icon: r = Os,
2479
2479
  sticky: i = !0,
2480
2480
  hidden: n = !1,
2481
2481
  multiple: a = !0,
2482
2482
  disabled: o = !1,
2483
- id: l = Te.Delete,
2484
- tooltip: y = e("_pages:common.actions.delete.text")
2485
- } = t;
2483
+ id: l = Ee.Delete,
2484
+ tooltip: m = t("_pages:common.actions.delete.text")
2485
+ } = e;
2486
2486
  return {
2487
2487
  action: D(
2488
- (f) => ({
2488
+ (h) => ({
2489
2489
  id: l,
2490
2490
  sticky: i,
2491
- tooltip: y,
2491
+ tooltip: m,
2492
2492
  multiple: a,
2493
- onClick: () => s([f == null ? void 0 : f.id]),
2494
- hidden: !!f.deletedAt || n,
2495
- disabled: !!f.deletedAt || o,
2493
+ onClick: () => s([h == null ? void 0 : h.id]),
2494
+ hidden: !!h.deletedAt || n,
2495
+ disabled: !!h.deletedAt || o,
2496
2496
  icon: /* @__PURE__ */ g(ue, { className: "text-bg-error", icon: r }),
2497
2497
  onMultipleClick: (d) => s(d.map((p) => p.id))
2498
2498
  }),
2499
- [o, n, r, l, a, s, i, y]
2499
+ [o, n, r, l, a, s, i, m]
2500
2500
  )
2501
2501
  };
2502
- }, Rr = (t) => {
2503
- const { t: e } = R(), {
2502
+ }, Rr = (e) => {
2503
+ const { t } = R(), {
2504
2504
  onClick: s,
2505
2505
  sticky: r = !0,
2506
2506
  hidden: i = !1,
2507
2507
  disabled: n = !1,
2508
2508
  multiple: a = !1,
2509
2509
  icon: o = Wt,
2510
- id: l = Te.Restore,
2511
- tooltip: y = e("_pages:common.actions.restore.text")
2512
- } = t;
2510
+ id: l = Ee.Restore,
2511
+ tooltip: m = t("_pages:common.actions.restore.text")
2512
+ } = e;
2513
2513
  return {
2514
2514
  action: D(
2515
- (f) => ({
2515
+ (h) => ({
2516
2516
  id: l,
2517
2517
  sticky: r,
2518
- tooltip: y,
2518
+ tooltip: m,
2519
2519
  multiple: a,
2520
- onClick: () => s([f == null ? void 0 : f.id]),
2521
- hidden: !f.deletedAt || i,
2522
- disabled: !f.deletedAt || n,
2520
+ onClick: () => s([h == null ? void 0 : h.id]),
2521
+ hidden: !h.deletedAt || i,
2522
+ disabled: !h.deletedAt || n,
2523
2523
  icon: /* @__PURE__ */ g(ue, { className: "text-bg-error", icon: o }),
2524
2524
  onMultipleClick: (d) => s(d.map((p) => p.id))
2525
2525
  }),
2526
- [n, i, o, l, a, s, r, y]
2526
+ [n, i, o, l, a, s, r, m]
2527
2527
  )
2528
2528
  };
2529
- }, An = (t) => {
2530
- const { t: e } = R(), {
2529
+ }, xn = (e) => {
2530
+ const { t } = R(), {
2531
2531
  onClick: s,
2532
2532
  hidden: r = !1,
2533
2533
  sticky: i = !0,
2534
2534
  disabled: n = !1,
2535
- id: a = Te.Edit,
2535
+ id: a = Ee.Edit,
2536
2536
  icon: o = Us,
2537
- tooltip: l = e("_pages:common.actions.edit.text")
2538
- } = t;
2537
+ tooltip: l = t("_pages:common.actions.edit.text")
2538
+ } = e;
2539
2539
  return {
2540
2540
  action: D(
2541
- (h) => ({
2541
+ (f) => ({
2542
2542
  id: a,
2543
2543
  sticky: i,
2544
2544
  tooltip: l,
2545
- onClick: () => s(h == null ? void 0 : h.id),
2546
- hidden: !!h.deletedAt || r,
2547
- disabled: !!h.deletedAt || n,
2545
+ onClick: () => s(f == null ? void 0 : f.id),
2546
+ hidden: !!f.deletedAt || r,
2547
+ disabled: !!f.deletedAt || n,
2548
2548
  icon: /* @__PURE__ */ g(ue, { className: "primary", icon: o })
2549
2549
  }),
2550
2550
  [n, r, o, a, s, i, l]
2551
2551
  )
2552
2552
  };
2553
2553
  };
2554
- var Te = /* @__PURE__ */ ((t) => (t.Add = "add", t.Edit = "edit", t.Delete = "delete", t.Restore = "restore", t.Refresh = "refresh", t.Export = "export", t.Import = "import", t))(Te || {});
2555
- const Ir = (t) => {
2556
- const { t: e } = R(), {
2554
+ var Ee = /* @__PURE__ */ ((e) => (e.Add = "add", e.Edit = "edit", e.Delete = "delete", e.Restore = "restore", e.Refresh = "refresh", e.Export = "export", e.Import = "import", e))(Ee || {});
2555
+ const Ir = (e) => {
2556
+ const { t } = R(), {
2557
2557
  onClick: s,
2558
2558
  hidden: r = !1,
2559
2559
  disabled: i = !1,
2560
2560
  isLoading: n = !1
2561
- } = t;
2561
+ } = e;
2562
2562
  return {
2563
2563
  action: D(
2564
2564
  () => ({
2565
- id: Te.Export,
2565
+ id: Ee.Export,
2566
2566
  hidden: r,
2567
2567
  disabled: i,
2568
2568
  icon: /* @__PURE__ */ g(
@@ -2572,23 +2572,23 @@ const Ir = (t) => {
2572
2572
  icon: n ? jt : Ks
2573
2573
  }
2574
2574
  ),
2575
- tooltip: e("_pages:common.actions.export.text"),
2575
+ tooltip: t("_pages:common.actions.export.text"),
2576
2576
  onClick: s
2577
2577
  }),
2578
- [i, r, n, s, e]
2578
+ [i, r, n, s, t]
2579
2579
  )
2580
2580
  };
2581
- }, Pr = (t) => {
2582
- const { t: e } = R(), {
2581
+ }, Pr = (e) => {
2582
+ const { t } = R(), {
2583
2583
  onClick: s,
2584
2584
  hidden: r = !1,
2585
2585
  disabled: i = !1,
2586
2586
  isLoading: n = !1
2587
- } = t;
2587
+ } = e;
2588
2588
  return {
2589
2589
  action: D(
2590
2590
  () => ({
2591
- id: Te.Import,
2591
+ id: Ee.Import,
2592
2592
  hidden: r,
2593
2593
  disabled: i,
2594
2594
  icon: /* @__PURE__ */ g(
@@ -2598,70 +2598,70 @@ const Ir = (t) => {
2598
2598
  icon: n ? jt : Bs
2599
2599
  }
2600
2600
  ),
2601
- tooltip: e("_pages:common.actions.import.text"),
2601
+ tooltip: t("_pages:common.actions.import.text"),
2602
2602
  onClick: s
2603
2603
  }),
2604
- [i, r, n, s, e]
2604
+ [i, r, n, s, t]
2605
2605
  )
2606
2606
  };
2607
- }, Nn = (t) => {
2608
- const { queryKey: e, onSuccess: s, ...r } = t, { showStackNotifications: i } = Ne(), { t: n } = R(), { open: a, onClick: o, close: l, dialogFn: y, isLoading: h } = ss({
2607
+ }, An = (e) => {
2608
+ const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: i } = Ae(), { t: n } = R(), { open: a, onClick: o, close: l, dialogFn: m, isLoading: f } = ss({
2609
2609
  onSuccessMessage: n("_pages:common.actions.delete.successMessage"),
2610
2610
  onError: (d) => {
2611
2611
  const p = d;
2612
2612
  if (Xe(p))
2613
2613
  i(
2614
2614
  p.errors.map(
2615
- ([w, S]) => ({
2616
- message: n(`_pages:${w}.errors.${S}`),
2615
+ ([b, S]) => ({
2616
+ message: n(`_pages:${b}.errors.${S}`),
2617
2617
  type: J.error
2618
2618
  })
2619
2619
  )
2620
2620
  );
2621
2621
  else if (Ze(p)) {
2622
- const w = p.message || n("_accessibility:errors.500"), S = n(`_accessibility:errors.${p.status}`);
2622
+ const b = p.message || n("_accessibility:errors.500"), S = n(`_accessibility:errors.${p.status}`);
2623
2623
  i([
2624
2624
  {
2625
- message: S || w,
2625
+ message: S || b,
2626
2626
  type: J.error
2627
2627
  }
2628
2628
  ]);
2629
2629
  }
2630
2630
  },
2631
2631
  onSuccess: async (d) => {
2632
- await we.invalidateQueries({ queryKey: e }), s && s(d);
2632
+ await we.invalidateQueries({ queryKey: t }), s && s(d);
2633
2633
  },
2634
2634
  ...r
2635
- }), { action: f } = Vr({ onClick: o });
2635
+ }), { action: h } = Vr({ onClick: o });
2636
2636
  return {
2637
2637
  onClick: o,
2638
2638
  title: n("_pages:common.actions.delete.dialog.title"),
2639
2639
  open: a,
2640
- isLoading: h,
2641
- handleSubmit: () => y.mutate(),
2640
+ isLoading: f,
2641
+ handleSubmit: () => m.mutate(),
2642
2642
  handleClose: l,
2643
- action: f
2643
+ action: h
2644
2644
  };
2645
2645
  }, ds = () => {
2646
- const [t, e] = X(!1);
2647
- return { open: t, setOpen: e, handleClose: () => e(!1), handleOpen: () => e(!0) };
2648
- }, $n = (t) => {
2649
- const { t: e } = R(), {
2646
+ const [e, t] = X(!1);
2647
+ return { open: e, setOpen: t, handleClose: () => t(!1), handleOpen: () => t(!0) };
2648
+ }, Fn = (e) => {
2649
+ const { t } = R(), {
2650
2650
  showErrorNotification: s,
2651
2651
  showStackNotifications: r,
2652
2652
  showSuccessNotification: i
2653
- } = Ne(), {
2653
+ } = Ae(), {
2654
2654
  defaultValues: n,
2655
2655
  getFunction: a,
2656
2656
  mutationFn: o,
2657
2657
  formToDto: l,
2658
- dtoToForm: y,
2659
- onError: h,
2660
- onSuccess: f,
2658
+ dtoToForm: m,
2659
+ onError: f,
2660
+ onSuccess: h,
2661
2661
  queryKey: d,
2662
2662
  onSuccessMessage: p,
2663
- title: w
2664
- } = t, [S, T] = X(0), { open: x, handleClose: C, handleOpen: $ } = ds(), { control: A, handleSubmit: N, reset: I, setError: O, getValues: re, setValue: P } = us({
2663
+ title: b
2664
+ } = e, [S, E] = X(0), { open: N, handleClose: C, handleOpen: F } = ds(), { control: x, handleSubmit: A, reset: I, setError: O, getValues: re, setValue: P } = us({
2665
2665
  defaultValues: n
2666
2666
  }), { data: ne, isLoading: ce } = Xs({
2667
2667
  queryFn: () => a == null ? void 0 : a(S),
@@ -2669,32 +2669,32 @@ const Ir = (t) => {
2669
2669
  enabled: !!a && !!d && !!S
2670
2670
  });
2671
2671
  me(() => {
2672
- ne && y && I({ ...y(ne) });
2672
+ ne && m && I({ ...m(ne) });
2673
2673
  }, [ne]);
2674
2674
  const L = D(
2675
2675
  (U) => {
2676
2676
  const Z = U == null ? void 0 : U.errors, ie = [];
2677
2677
  return Z && Z.forEach(([de, He]) => {
2678
2678
  const _e = document.querySelector(`[name="${de}"]`);
2679
- (_e instanceof HTMLInputElement || _e instanceof HTMLTextAreaElement || _e instanceof HTMLSelectElement) && (_e.focus(), _e.classList.add("error"), ie.push(e(`_entities:${d}.${de}.${He}`)));
2679
+ (_e instanceof HTMLInputElement || _e instanceof HTMLTextAreaElement || _e instanceof HTMLSelectElement) && (_e.focus(), _e.classList.add("error"), ie.push(t(`_entities:${d}.${de}.${He}`)));
2680
2680
  }), ie;
2681
2681
  },
2682
- [e, d]
2682
+ [t, d]
2683
2683
  ), V = D(() => {
2684
2684
  document.querySelectorAll("input, textarea, select").forEach((Z) => {
2685
2685
  Z.classList.remove("error");
2686
2686
  });
2687
2687
  }, []), q = D(
2688
2688
  (U) => {
2689
- T(U ?? 0), $();
2689
+ E(U ?? 0), F();
2690
2690
  },
2691
- [$]
2691
+ [F]
2692
2692
  ), G = D(() => {
2693
2693
  V(), C(), I();
2694
2694
  }, [I, V, C]), Y = Ke({
2695
2695
  mutationFn: o,
2696
2696
  onError: (U) => {
2697
- if (console.error(U), h) h(U);
2697
+ if (console.error(U), f) f(U);
2698
2698
  else {
2699
2699
  const Z = U;
2700
2700
  if (Xe(Z)) {
@@ -2708,75 +2708,75 @@ const Ir = (t) => {
2708
2708
  )
2709
2709
  );
2710
2710
  } else if (Ze(Z)) {
2711
- const ie = Z.message || e("_accessibility:errors.500"), de = e(`_accessibility:errors.${Z.status}`);
2711
+ const ie = Z.message || t("_accessibility:errors.500"), de = t(`_accessibility:errors.${Z.status}`);
2712
2712
  s({ message: de || ie });
2713
2713
  } else
2714
- s({ message: e("_accessibility:errors.500") });
2714
+ s({ message: t("_accessibility:errors.500") });
2715
2715
  }
2716
2716
  },
2717
2717
  onSuccess: async (U) => {
2718
- await we.invalidateQueries({ queryKey: d }), f && f(U), i({
2718
+ await we.invalidateQueries({ queryKey: d }), h && h(U), i({
2719
2719
  message: p
2720
2720
  }), G();
2721
2721
  }
2722
2722
  });
2723
2723
  return {
2724
- open: x,
2724
+ open: N,
2725
2725
  openDialog: q,
2726
2726
  handleClose: G,
2727
- control: A,
2727
+ control: x,
2728
2728
  getValues: re,
2729
2729
  setValue: P,
2730
- handleSubmit: N,
2730
+ handleSubmit: A,
2731
2731
  onSubmit: (U) => Y.mutate(
2732
2732
  l ? l(U) : U
2733
2733
  ),
2734
2734
  reset: I,
2735
2735
  setError: O,
2736
- title: w,
2736
+ title: b,
2737
2737
  isLoading: ce || Y.isPending
2738
2738
  };
2739
- }, Fn = (t) => {
2740
- const { queryKey: e, onSuccess: s, ...r } = t, { showStackNotifications: i } = Ne(), { t: n } = R(), { open: a, onClick: o, close: l, dialogFn: y, isLoading: h } = ss({
2739
+ }, $n = (e) => {
2740
+ const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: i } = Ae(), { t: n } = R(), { open: a, onClick: o, close: l, dialogFn: m, isLoading: f } = ss({
2741
2741
  onSuccessMessage: n("_pages:common.actions.restore.successMessage"),
2742
2742
  onError: (d) => {
2743
2743
  const p = d;
2744
2744
  if (Xe(p))
2745
2745
  i(
2746
2746
  p.errors.map(
2747
- ([w, S]) => ({
2748
- message: n(`_pages:${w}.errors.${S}`),
2747
+ ([b, S]) => ({
2748
+ message: n(`_pages:${b}.errors.${S}`),
2749
2749
  type: J.error
2750
2750
  })
2751
2751
  )
2752
2752
  );
2753
2753
  else if (Ze(p)) {
2754
- const w = p.message || n("_accessibility:errors.500"), S = n(`_accessibility:errors.${p.status}`);
2754
+ const b = p.message || n("_accessibility:errors.500"), S = n(`_accessibility:errors.${p.status}`);
2755
2755
  i([
2756
2756
  {
2757
- message: S || w,
2757
+ message: S || b,
2758
2758
  type: J.error
2759
2759
  }
2760
2760
  ]);
2761
2761
  }
2762
2762
  },
2763
2763
  onSuccess: async (d) => {
2764
- await we.invalidateQueries({ queryKey: e }), s && s(d);
2764
+ await we.invalidateQueries({ queryKey: t }), s && s(d);
2765
2765
  },
2766
2766
  ...r
2767
- }), { action: f } = Rr({ onClick: o });
2767
+ }), { action: h } = Rr({ onClick: o });
2768
2768
  return {
2769
2769
  onClick: o,
2770
2770
  title: n("_pages:common.actions.restore.dialog.title"),
2771
2771
  open: a,
2772
- isLoading: h,
2773
- handleSubmit: () => y.mutate(),
2772
+ isLoading: f,
2773
+ handleSubmit: () => m.mutate(),
2774
2774
  handleClose: l,
2775
- action: f
2775
+ action: h
2776
2776
  };
2777
2777
  };
2778
- function Ln(t) {
2779
- const { t: e } = R(), { queryKey: s, mutationFn: r, entity: i, fileProcessor: n, onError: a } = t, [o, l] = X(!1), [y, h] = X(null), [f, d] = X(!1), p = Ke({
2778
+ function Ln(e) {
2779
+ const { t } = R(), { queryKey: s, mutationFn: r, entity: i, fileProcessor: n, onError: a } = e, [o, l] = X(!1), [m, f] = X(null), [h, d] = X(!1), p = Ke({
2780
2780
  mutationFn: r,
2781
2781
  onError: (S) => {
2782
2782
  console.error(S), a == null || a(S);
@@ -2784,92 +2784,92 @@ function Ln(t) {
2784
2784
  onSuccess: async () => {
2785
2785
  we && await we.invalidateQueries({ queryKey: s });
2786
2786
  }
2787
- }), { action: w } = Pr({
2787
+ }), { action: b } = Pr({
2788
2788
  onClick: () => l(!0)
2789
2789
  });
2790
2790
  return {
2791
2791
  handleSubmit: async () => {
2792
- if (!(!y || y.length === 0))
2792
+ if (!(!m || m.length === 0))
2793
2793
  try {
2794
2794
  await p.mutateAsync({
2795
- items: y,
2796
- override: f
2797
- }), l(!1), h(null), d(!1);
2795
+ items: m,
2796
+ override: h
2797
+ }), l(!1), f(null), d(!1);
2798
2798
  } catch (S) {
2799
2799
  console.error(S);
2800
2800
  }
2801
2801
  },
2802
2802
  isLoading: p.isPending,
2803
2803
  fileProcessor: n,
2804
- onFileProcessed: (S) => h(S),
2804
+ onFileProcessed: (S) => f(S),
2805
2805
  onOverrideChange: (S) => d(S),
2806
2806
  open: o,
2807
- title: e("_pages:common.actions.import.dialog.title", {
2808
- entity: e(`_pages:${i}.title`)
2807
+ title: t("_pages:common.actions.import.dialog.title", {
2808
+ entity: t(`_pages:${i}.title`)
2809
2809
  }),
2810
2810
  handleClose: () => {
2811
- l(!1), h(null);
2811
+ l(!1), f(null);
2812
2812
  },
2813
- action: w
2813
+ action: b
2814
2814
  };
2815
2815
  }
2816
- const Dn = (t) => {
2817
- const { showSuccessNotification: e } = Ne(), { t: s } = R(), {
2816
+ const Dn = (e) => {
2817
+ const { showSuccessNotification: t } = Ae(), { t: s } = R(), {
2818
2818
  entity: r,
2819
2819
  mutationFn: i,
2820
2820
  onError: n,
2821
2821
  onSuccess: a,
2822
2822
  onSuccessMessage: o = s("_pages:common.actions.export.successMessage")
2823
- } = t, l = Ke({
2823
+ } = e, l = Ke({
2824
2824
  mutationFn: () => i(),
2825
- onError: (f) => {
2826
- console.error(f), n && n(f);
2825
+ onError: (h) => {
2826
+ console.error(h), n && n(h);
2827
2827
  },
2828
- onSuccess: async (f) => {
2829
- const d = JSON.stringify(f, null, 2), p = new Blob([d], { type: "application/json" }), w = URL.createObjectURL(p), S = document.createElement("a");
2830
- S.href = w, S.download = `${r}.json`, S.click(), URL.revokeObjectURL(w), a && a(f), e({
2828
+ onSuccess: async (h) => {
2829
+ const d = JSON.stringify(h, null, 2), p = new Blob([d], { type: "application/json" }), b = URL.createObjectURL(p), S = document.createElement("a");
2830
+ S.href = b, S.download = `${r}.json`, S.click(), URL.revokeObjectURL(b), a && a(h), t({
2831
2831
  message: o
2832
2832
  });
2833
2833
  }
2834
- }), y = D(() => {
2834
+ }), m = D(() => {
2835
2835
  l.mutate();
2836
- }, [l]), { action: h } = Ir({
2837
- onClick: y,
2836
+ }, [l]), { action: f } = Ir({
2837
+ onClick: m,
2838
2838
  isLoading: l.isPending
2839
2839
  });
2840
2840
  return {
2841
- action: h
2841
+ action: f
2842
2842
  };
2843
2843
  };
2844
- function Mr(t) {
2845
- const [e, s] = X(!1), r = D(() => {
2846
- const i = window.scrollY > t;
2844
+ function Mr(e) {
2845
+ const [t, s] = X(!1), r = D(() => {
2846
+ const i = window.scrollY > e;
2847
2847
  s(i);
2848
- }, [t]);
2848
+ }, [e]);
2849
2849
  return me(() => (window.addEventListener("scroll", r), () => {
2850
2850
  window.removeEventListener("scroll", r);
2851
- }), [r]), e;
2851
+ }), [r]), t;
2852
2852
  }
2853
2853
  const Vn = () => {
2854
- const { t } = R(), e = Mr(200);
2854
+ const { t: e } = R(), t = Mr(200);
2855
2855
  return /* @__PURE__ */ g(
2856
- Ee,
2856
+ Te,
2857
2857
  {
2858
2858
  variant: "submit",
2859
2859
  color: "primary",
2860
2860
  icon: qs,
2861
2861
  "data-tooltip-id": "tooltip",
2862
2862
  onClick: () => dr.scrollTo(0, 0),
2863
- className: `to-top ${e ? "show" : "hide"}`,
2864
- "data-tooltip-content": t("_accessibility:buttons.toTop")
2863
+ className: `to-top ${t ? "show" : "hide"}`,
2864
+ "data-tooltip-content": e("_accessibility:buttons.toTop")
2865
2865
  }
2866
2866
  );
2867
2867
  };
2868
- function Rn(t) {
2869
- const { t: e } = R();
2870
- if ("children" in t) {
2871
- const { children: A, className: N } = t;
2872
- return /* @__PURE__ */ g("div", { className: `error-container${N ? ` ${N}` : ""}`, children: A });
2868
+ function Rn(e) {
2869
+ const { t } = R();
2870
+ if ("children" in e) {
2871
+ const { children: x, className: A } = e;
2872
+ return /* @__PURE__ */ g("div", { className: `error-container${A ? ` ${A}` : ""}`, children: x });
2873
2873
  }
2874
2874
  const {
2875
2875
  error: r,
@@ -2878,17 +2878,17 @@ function Rn(t) {
2878
2878
  onRetry: a,
2879
2879
  retryLabel: o,
2880
2880
  retryButtonProps: l,
2881
- messageProps: y,
2882
- className: h,
2883
- resetErrorBoundary: f
2884
- } = t, d = a ?? f, {
2881
+ messageProps: m,
2882
+ className: f,
2883
+ resetErrorBoundary: h
2884
+ } = e, d = a ?? h, {
2885
2885
  className: p,
2886
- children: w,
2886
+ children: b,
2887
2887
  onClick: S,
2888
- ...T
2889
- } = l ?? {}, { className: x, ...C } = y ?? {}, $ = n !== null;
2890
- return /* @__PURE__ */ F("div", { className: `error-container${h ? ` ${h}` : ""}`, children: [
2891
- $ && /* @__PURE__ */ g(
2888
+ ...E
2889
+ } = l ?? {}, { className: N, ...C } = m ?? {}, F = n !== null;
2890
+ return /* @__PURE__ */ $("div", { className: `error-container${f ? ` ${f}` : ""}`, children: [
2891
+ F && /* @__PURE__ */ g(
2892
2892
  ue,
2893
2893
  {
2894
2894
  ...n,
@@ -2900,8 +2900,8 @@ function Rn(t) {
2900
2900
  "p",
2901
2901
  {
2902
2902
  ...C,
2903
- className: `error-message${x ? ` ${x}` : ""}`,
2904
- children: i ?? (r == null ? void 0 : r.message) ?? e("_accessibility:errors.unknownError")
2903
+ className: `error-message${N ? ` ${N}` : ""}`,
2904
+ children: i ?? (r == null ? void 0 : r.message) ?? t("_accessibility:errors.unknownError")
2905
2905
  }
2906
2906
  ),
2907
2907
  d && /* @__PURE__ */ g(
@@ -2910,22 +2910,22 @@ function Rn(t) {
2910
2910
  type: "button",
2911
2911
  variant: "submit",
2912
2912
  color: "primary",
2913
- ...T,
2913
+ ...E,
2914
2914
  className: `error-retry ${p ? ` ${p}` : ""}`,
2915
- onClick: (A) => {
2916
- S == null || S(A), A.defaultPrevented || d();
2915
+ onClick: (x) => {
2916
+ S == null || S(x), x.defaultPrevented || d();
2917
2917
  },
2918
- children: w ?? o ?? e("_accessibility:actions.retry", { defaultValue: "Retry" })
2918
+ children: b ?? o ?? t("_accessibility:actions.retry", { defaultValue: "Retry" })
2919
2919
  }
2920
2920
  )
2921
2921
  ] });
2922
2922
  }
2923
- const Or = (t) => {
2924
- const { showBackButton: e, title: s, actions: r } = t, { t: i } = R(), { navigate: n } = Be();
2925
- return /* @__PURE__ */ F("div", { className: "page-header", children: [
2926
- /* @__PURE__ */ F("div", { className: "page-header-left", children: [
2927
- e && /* @__PURE__ */ g(
2928
- Ee,
2923
+ const Or = (e) => {
2924
+ const { showBackButton: t, title: s, actions: r } = e, { t: i } = R(), { navigate: n } = Be();
2925
+ return /* @__PURE__ */ $("div", { className: "page-header", children: [
2926
+ /* @__PURE__ */ $("div", { className: "page-header-left", children: [
2927
+ t && /* @__PURE__ */ g(
2928
+ Te,
2929
2929
  {
2930
2930
  icon: Hs,
2931
2931
  onClick: () => n(-1),
@@ -2936,14 +2936,14 @@ const Or = (t) => {
2936
2936
  ),
2937
2937
  /* @__PURE__ */ g("h2", { className: "page-header-title", children: s })
2938
2938
  ] }),
2939
- /* @__PURE__ */ F("div", { children: [
2940
- /* @__PURE__ */ g(Fs, { className: "page-header-actions-desktop", actions: r ?? [] }),
2939
+ /* @__PURE__ */ $("div", { children: [
2940
+ /* @__PURE__ */ g($s, { className: "page-header-actions-desktop", actions: r ?? [] }),
2941
2941
  /* @__PURE__ */ g(Ls, { className: "page-header-actions-mobile", actions: r ?? [] })
2942
2942
  ] })
2943
2943
  ] });
2944
- }, In = (t) => {
2944
+ }, In = (e) => {
2945
2945
  const {
2946
- title: e,
2946
+ title: t,
2947
2947
  children: s,
2948
2948
  addOptions: r,
2949
2949
  filterOptions: i,
@@ -2951,57 +2951,57 @@ const Or = (t) => {
2951
2951
  queryKey: a,
2952
2952
  isLoading: o = !1,
2953
2953
  isAnimated: l = !0,
2954
- showBackButton: y = !1
2955
- } = t, { t: h } = R(), { countOfFilters: f } = Ds(), d = Ae(() => {
2954
+ showBackButton: m = !1
2955
+ } = e, { t: f } = R(), { countOfFilters: h } = Ds(), d = xe(() => {
2956
2956
  const p = Array.isArray(n) ? [...n] : [];
2957
2957
  if (a) {
2958
- const w = {
2959
- id: Te.Refresh,
2958
+ const b = {
2959
+ id: Ee.Refresh,
2960
2960
  onClick: () => we.invalidateQueries({ queryKey: a }),
2961
2961
  icon: /* @__PURE__ */ g(ue, { icon: Wt }),
2962
- tooltip: h("_pages:common.actions.refresh.text")
2962
+ tooltip: f("_pages:common.actions.refresh.text")
2963
2963
  };
2964
- p.unshift(w);
2964
+ p.unshift(b);
2965
2965
  }
2966
2966
  if (r) {
2967
- const w = {
2967
+ const b = {
2968
2968
  ...r,
2969
- id: Te.Add,
2970
- icon: /* @__PURE__ */ g(ue, { icon: xt })
2969
+ id: Ee.Add,
2970
+ icon: /* @__PURE__ */ g(ue, { icon: Nt })
2971
2971
  };
2972
- p.unshift(w);
2972
+ p.unshift(b);
2973
2973
  }
2974
2974
  if (i) {
2975
- const w = {
2975
+ const b = {
2976
2976
  ...i,
2977
2977
  id: "filter",
2978
2978
  icon: /* @__PURE__ */ g(ue, { icon: Ws }),
2979
2979
  children: /* @__PURE__ */ g(
2980
2980
  Vs,
2981
2981
  {
2982
- className: `${f > 0 ? "show" : "hide"} `,
2983
- count: f
2982
+ className: `${h > 0 ? "show" : "hide"} `,
2983
+ count: h
2984
2984
  }
2985
2985
  )
2986
2986
  };
2987
- p.push(w);
2987
+ p.push(b);
2988
2988
  }
2989
2989
  return p;
2990
- }, [n, r, f, i, a, h]);
2991
- return /* @__PURE__ */ F("main", { className: "page-main", children: [
2990
+ }, [n, r, h, i, a, f]);
2991
+ return /* @__PURE__ */ $("main", { className: "page-main", children: [
2992
2992
  /* @__PURE__ */ g(
2993
2993
  Or,
2994
2994
  {
2995
- showBackButton: y,
2995
+ showBackButton: m,
2996
2996
  actions: d,
2997
- title: e
2997
+ title: t
2998
2998
  }
2999
2999
  ),
3000
3000
  /* @__PURE__ */ g("div", { className: `page-main-content ${l ? "appear" : ""}`, children: o ? /* @__PURE__ */ g(Le, { className: "page-loading" }) : s }),
3001
3001
  r && /* @__PURE__ */ g(
3002
- Ee,
3002
+ Te,
3003
3003
  {
3004
- icon: r.icon ?? xt,
3004
+ icon: r.icon ?? Nt,
3005
3005
  color: r.color ?? "primary",
3006
3006
  variant: r.variant ?? "submit",
3007
3007
  onClick: () => {
@@ -3012,17 +3012,17 @@ const Or = (t) => {
3012
3012
  }
3013
3013
  )
3014
3014
  ] });
3015
- }, Pn = (t) => {
3016
- const { t: e } = R(), {
3015
+ }, Pn = (e) => {
3016
+ const { t } = R(), {
3017
3017
  className: s = "",
3018
3018
  itemClassName: r = "",
3019
3019
  loading: i = !1,
3020
3020
  emptyComponent: n = null,
3021
- emptyMessage: a = e("_accessibility:messages.empty"),
3021
+ emptyMessage: a = t("_accessibility:messages.empty"),
3022
3022
  renderComponent: o,
3023
3023
  data: l = []
3024
- } = t;
3025
- return i ? /* @__PURE__ */ g(Le, {}) : /* @__PURE__ */ g(Oe, { children: l != null && l.length ? /* @__PURE__ */ g("ul", { className: `pretty-grid-main ${s}`, children: l == null ? void 0 : l.map((y) => /* @__PURE__ */ g("li", { className: `pretty-grid-item ${r}`, children: o(y) }, y.id)) }) : /* @__PURE__ */ g(Oe, { children: n || /* @__PURE__ */ g(Qr, { message: a }) }) });
3024
+ } = e;
3025
+ return i ? /* @__PURE__ */ g(Le, {}) : /* @__PURE__ */ g(Oe, { children: l != null && l.length ? /* @__PURE__ */ g("ul", { className: `pretty-grid-main ${s}`, children: l == null ? void 0 : l.map((m) => /* @__PURE__ */ g("li", { className: `pretty-grid-item ${r}`, children: o(m) }, m.id)) }) : /* @__PURE__ */ g(Oe, { children: n || /* @__PURE__ */ g(Qr, { message: a }) }) });
3026
3026
  }, fs = De({
3027
3027
  title: "",
3028
3028
  setTitle: () => {
@@ -3030,12 +3030,12 @@ const Or = (t) => {
3030
3030
  rightContent: null,
3031
3031
  setRightContent: () => {
3032
3032
  }
3033
- }), Mn = (t) => {
3034
- const { children: e } = t, [s, r] = X(""), [i, n] = X(null), a = D((y) => {
3035
- r(y);
3036
- }, []), o = D((y) => {
3037
- n(y);
3038
- }, []), l = Ae(
3033
+ }), Mn = (e) => {
3034
+ const { children: t } = e, [s, r] = X(""), [i, n] = X(null), a = D((m) => {
3035
+ r(m);
3036
+ }, []), o = D((m) => {
3037
+ n(m);
3038
+ }, []), l = xe(
3039
3039
  () => ({
3040
3040
  title: s,
3041
3041
  setTitle: a,
@@ -3044,60 +3044,60 @@ const Or = (t) => {
3044
3044
  }),
3045
3045
  [s, a, i, o]
3046
3046
  );
3047
- return /* @__PURE__ */ g(fs.Provider, { value: l, children: e });
3047
+ return /* @__PURE__ */ g(fs.Provider, { value: l, children: t });
3048
3048
  }, Ur = () => Ve(fs);
3049
- function On(t) {
3050
- const { t: e } = R(), { openDrawer: s, showSearch: r = !0, menuButtonProps: i } = t, { searchComponent: n, location: a } = Be(), { title: o, rightContent: l } = Ur(), [y, h] = X(!1), f = D((p) => {
3051
- (ar() ? p.metaKey : p.ctrlKey) && p.shiftKey && p.key.toLowerCase() === "f" && (h(!0), p.preventDefault());
3049
+ function On(e) {
3050
+ const { t } = R(), { openDrawer: s, showSearch: r = !0, menuButtonProps: i } = e, { searchComponent: n, location: a } = Be(), { title: o, rightContent: l } = Ur(), [m, f] = X(!1), h = D((p) => {
3051
+ (ar() ? p.metaKey : p.ctrlKey) && p.shiftKey && p.key.toLowerCase() === "f" && (f(!0), p.preventDefault());
3052
3052
  }, []);
3053
- me(() => (window.addEventListener("keydown", f), () => {
3054
- window.removeEventListener("keydown", f);
3055
- }), [f]);
3053
+ me(() => (window.addEventListener("keydown", h), () => {
3054
+ window.removeEventListener("keydown", h);
3055
+ }), [h]);
3056
3056
  const d = n;
3057
- return /* @__PURE__ */ F(Oe, { children: [
3058
- a.pathname !== "/" && !!d && /* @__PURE__ */ g(d, { open: y, onClose: () => h(!1) }),
3059
- /* @__PURE__ */ F("header", { id: "header", className: "header", children: [
3060
- /* @__PURE__ */ F("div", { className: "navbar-left", children: [
3057
+ return /* @__PURE__ */ $(Oe, { children: [
3058
+ a.pathname !== "/" && !!d && /* @__PURE__ */ g(d, { open: m, onClose: () => f(!1) }),
3059
+ /* @__PURE__ */ $("header", { id: "header", className: "header", children: [
3060
+ /* @__PURE__ */ $("div", { className: "navbar-left", children: [
3061
3061
  /* @__PURE__ */ g(
3062
- Ee,
3062
+ Te,
3063
3063
  {
3064
3064
  ...i,
3065
3065
  type: (i == null ? void 0 : i.type) ?? "button",
3066
3066
  icon: (i == null ? void 0 : i.icon) ?? js,
3067
3067
  onClick: (p) => {
3068
- var w;
3069
- (w = i == null ? void 0 : i.onClick) == null || w.call(i, p), s();
3068
+ var b;
3069
+ (b = i == null ? void 0 : i.onClick) == null || b.call(i, p), s();
3070
3070
  },
3071
- name: (i == null ? void 0 : i.name) ?? e("_accessibility:buttons.openMenu"),
3072
- "aria-label": (i == null ? void 0 : i["aria-label"]) ?? e("_accessibility:ariaLabels.openMenu"),
3071
+ name: (i == null ? void 0 : i.name) ?? t("_accessibility:buttons.openMenu"),
3072
+ "aria-label": (i == null ? void 0 : i["aria-label"]) ?? t("_accessibility:ariaLabels.openMenu"),
3073
3073
  className: `navbar-menu animated ${(i == null ? void 0 : i.className) ?? ""}`
3074
3074
  }
3075
3075
  ),
3076
- /* @__PURE__ */ g("h1", { className: "poppins navbar-title", children: o || e("_pages:home.appName") })
3076
+ /* @__PURE__ */ g("h1", { className: "poppins navbar-title", children: o || t("_pages:home.appName") })
3077
3077
  ] }),
3078
- /* @__PURE__ */ F("div", { className: "navbar-right", children: [
3078
+ /* @__PURE__ */ $("div", { className: "navbar-right", children: [
3079
3079
  l,
3080
3080
  r && /* @__PURE__ */ g(
3081
- Ee,
3081
+ Te,
3082
3082
  {
3083
3083
  icon: Qs,
3084
3084
  className: "navbar-search-btn",
3085
- onClick: () => h(!0)
3085
+ onClick: () => f(!0)
3086
3086
  }
3087
3087
  )
3088
3088
  ] })
3089
3089
  ] })
3090
3090
  ] });
3091
3091
  }
3092
- const je = 300, Kr = (t) => t ?? J.error, Br = (t) => {
3093
- switch (t) {
3092
+ const je = 300, Kr = (e) => e ?? J.error, Br = (e) => {
3093
+ switch (e) {
3094
3094
  case J.error:
3095
3095
  return zs;
3096
3096
  default:
3097
3097
  return Gs;
3098
3098
  }
3099
- }, lt = (t) => {
3100
- switch (t) {
3099
+ }, lt = (e) => {
3100
+ switch (e) {
3101
3101
  case J.success:
3102
3102
  return "!text-success";
3103
3103
  case J.error:
@@ -3107,8 +3107,8 @@ const je = 300, Kr = (t) => t ?? J.error, Br = (t) => {
3107
3107
  default:
3108
3108
  return "!text-info";
3109
3109
  }
3110
- }, qr = (t) => {
3111
- switch (t) {
3110
+ }, qr = (e) => {
3111
+ switch (e) {
3112
3112
  case J.success:
3113
3113
  return "bg-bg-success";
3114
3114
  case J.error:
@@ -3120,16 +3120,16 @@ const je = 300, Kr = (t) => t ?? J.error, Br = (t) => {
3120
3120
  }
3121
3121
  };
3122
3122
  function Un() {
3123
- const { t } = R(), { notification: e, removeNotification: s } = Ne(), [r, i] = X([]), n = Ue(r);
3123
+ const { t: e } = R(), { notification: t, removeNotification: s } = Ae(), [r, i] = X([]), n = Ue(r);
3124
3124
  Is(() => {
3125
3125
  n.current = r;
3126
3126
  });
3127
3127
  const a = Ue(null), o = D(
3128
3128
  (l) => {
3129
3129
  i(
3130
- (y) => l !== void 0 ? y.map((h) => h.id === l ? { ...h, closing: !0 } : h) : y.map((h) => ({ ...h, closing: !0 }))
3130
+ (m) => l !== void 0 ? m.map((f) => f.id === l ? { ...f, closing: !0 } : f) : m.map((f) => ({ ...f, closing: !0 }))
3131
3131
  ), l !== void 0 ? setTimeout(() => {
3132
- s(l), i((y) => y.filter((h) => h.id !== l));
3132
+ s(l), i((m) => m.filter((f) => f.id !== l));
3133
3133
  }, je) : (a.current && clearTimeout(a.current), a.current = setTimeout(() => {
3134
3134
  s(), i([]), a.current = null;
3135
3135
  }, je));
@@ -3138,57 +3138,57 @@ function Un() {
3138
3138
  );
3139
3139
  return me(() => {
3140
3140
  let l = null;
3141
- const y = () => {
3141
+ const m = () => {
3142
3142
  l && clearTimeout(l), a.current && (clearTimeout(a.current), a.current = null);
3143
3143
  };
3144
- if (e.length === 0)
3144
+ if (t.length === 0)
3145
3145
  return n.current.length === 0 ? void 0 : (a.current && clearTimeout(a.current), l = setTimeout(() => {
3146
- i((p) => p.map((w) => ({ ...w, closing: !0 }))), l = null;
3146
+ i((p) => p.map((b) => ({ ...b, closing: !0 }))), l = null;
3147
3147
  }, 0), a.current = setTimeout(() => {
3148
3148
  i([]), a.current = null;
3149
- }, je), y);
3150
- const h = new Set(n.current.map((p) => p.id));
3151
- if (!e.some(
3152
- (p) => p.id !== void 0 && !h.has(p.id)
3149
+ }, je), m);
3150
+ const f = new Set(n.current.map((p) => p.id));
3151
+ if (!t.some(
3152
+ (p) => p.id !== void 0 && !f.has(p.id)
3153
3153
  )) return;
3154
3154
  if (n.current.length === 0) {
3155
- const p = [...e];
3155
+ const p = [...t];
3156
3156
  return l = setTimeout(() => {
3157
- i(p.map((w) => ({ ...w, closing: !1 }))), l = null;
3157
+ i(p.map((b) => ({ ...b, closing: !1 }))), l = null;
3158
3158
  }, 0), () => {
3159
3159
  l && clearTimeout(l);
3160
3160
  };
3161
3161
  }
3162
3162
  a.current && clearTimeout(a.current), l = setTimeout(() => {
3163
3163
  i(
3164
- (p) => p.every((w) => w.closing) ? p : p.map((w) => ({ ...w, closing: !0 }))
3164
+ (p) => p.every((b) => b.closing) ? p : p.map((b) => ({ ...b, closing: !0 }))
3165
3165
  ), l = null;
3166
3166
  }, 0);
3167
- const d = [...e];
3167
+ const d = [...t];
3168
3168
  return a.current = setTimeout(() => {
3169
3169
  i(d.map((p) => ({ ...p, closing: !1 }))), a.current = null;
3170
- }, je), y;
3171
- }, [e]), me(() => {
3170
+ }, je), m;
3171
+ }, [t]), me(() => {
3172
3172
  if (!r.length) return;
3173
3173
  let l;
3174
- const y = window.setTimeout(() => {
3174
+ const m = window.setTimeout(() => {
3175
3175
  l = () => o(), window.addEventListener("click", l);
3176
- }, 0), h = (f) => {
3177
- f.key === "Escape" && o();
3176
+ }, 0), f = (h) => {
3177
+ h.key === "Escape" && o();
3178
3178
  };
3179
- return window.addEventListener("keydown", h), () => {
3180
- window.clearTimeout(y), l && window.removeEventListener("click", l), window.removeEventListener("keydown", h);
3179
+ return window.addEventListener("keydown", f), () => {
3180
+ window.clearTimeout(m), l && window.removeEventListener("click", l), window.removeEventListener("keydown", f);
3181
3181
  };
3182
3182
  }, [r.length, o]), Qt(
3183
- /* @__PURE__ */ g("div", { className: `notification-portal ${r.length ? "active" : ""}`, children: r.map(({ id: l, type: y, message: h, closing: f }) => {
3184
- const d = Kr(y);
3185
- return /* @__PURE__ */ F(
3183
+ /* @__PURE__ */ g("div", { className: `notification-portal ${r.length ? "active" : ""}`, children: r.map(({ id: l, type: m, message: f, closing: h }) => {
3184
+ const d = Kr(m);
3185
+ return /* @__PURE__ */ $(
3186
3186
  "div",
3187
3187
  {
3188
- className: `notification ${f ? "closing" : ""} ${qr(d)}`,
3188
+ className: `notification ${h ? "closing" : ""} ${qr(d)}`,
3189
3189
  onClick: (p) => p.stopPropagation(),
3190
3190
  children: [
3191
- /* @__PURE__ */ F("div", { className: "notification-body", children: [
3191
+ /* @__PURE__ */ $("div", { className: "notification-body", children: [
3192
3192
  /* @__PURE__ */ g(
3193
3193
  ue,
3194
3194
  {
@@ -3196,10 +3196,10 @@ function Un() {
3196
3196
  className: `notification-icon ${lt(d)}`
3197
3197
  }
3198
3198
  ),
3199
- /* @__PURE__ */ g("p", { className: `notification-text ${lt(d)}`, children: h })
3199
+ /* @__PURE__ */ g("p", { className: `notification-text ${lt(d)}`, children: f })
3200
3200
  ] }),
3201
3201
  /* @__PURE__ */ g(
3202
- Ee,
3202
+ Te,
3203
3203
  {
3204
3204
  type: "button",
3205
3205
  icon: Ht,
@@ -3209,8 +3209,8 @@ function Un() {
3209
3209
  p.stopPropagation(), l !== void 0 && o(l);
3210
3210
  },
3211
3211
  iconClassName: `${lt(d)} notification-close-icon`,
3212
- name: t("_accessibility:buttons.closeNotification"),
3213
- "aria-label": t("_accessibility:ariaLabels.closeNotification")
3212
+ name: e("_accessibility:buttons.closeNotification"),
3213
+ "aria-label": e("_accessibility:ariaLabels.closeNotification")
3214
3214
  }
3215
3215
  )
3216
3216
  ]
@@ -3221,18 +3221,18 @@ function Un() {
3221
3221
  document.body
3222
3222
  );
3223
3223
  }
3224
- function Kn(t) {
3225
- const { className: e, ...s } = t;
3226
- return /* @__PURE__ */ g("div", { className: "splash-screen", children: /* @__PURE__ */ g(Le, { className: `blur-appear ${e ? ` ${e}` : ""}`, ...s }) });
3224
+ function Kn(e) {
3225
+ const { className: t, ...s } = e;
3226
+ return /* @__PURE__ */ g("div", { className: "splash-screen", children: /* @__PURE__ */ g(Le, { className: `blur-appear ${t ? ` ${t}` : ""}`, ...s }) });
3227
3227
  }
3228
- const Hr = (t) => {
3229
- const { id: e, active: s, onClick: r, children: i, to: n, useLinks: a = !0, tabButtonProps: o } = t, { linkComponent: l } = Be(), y = l;
3228
+ const Hr = (e) => {
3229
+ const { id: t, active: s, onClick: r, children: i, to: n, useLinks: a = !0, tabButtonProps: o } = e, { linkComponent: l } = Be(), m = l;
3230
3230
  if (!a) {
3231
3231
  const {
3232
- className: f = "",
3232
+ className: h = "",
3233
3233
  variant: d = s ? "submit" : "outlined",
3234
3234
  color: p = s ? "primary" : "default",
3235
- ...w
3235
+ ...b
3236
3236
  } = o ?? {};
3237
3237
  return /* @__PURE__ */ g(
3238
3238
  ge,
@@ -3240,68 +3240,75 @@ const Hr = (t) => {
3240
3240
  type: "button",
3241
3241
  variant: d,
3242
3242
  color: p,
3243
- className: `tab ${f}`,
3243
+ className: `tab ${h}`,
3244
3244
  onClick: r,
3245
- ...w,
3245
+ ...b,
3246
3246
  children: i
3247
3247
  }
3248
3248
  );
3249
3249
  }
3250
- const h = `button submit tab ${s ? "primary" : "outlined"} ${(o == null ? void 0 : o.className) ?? ""}`.trim();
3250
+ const f = `button submit tab ${s ? "primary" : "outlined"} ${(o == null ? void 0 : o.className) ?? ""}`.trim();
3251
3251
  return /* @__PURE__ */ g(
3252
- y,
3252
+ m,
3253
3253
  {
3254
- to: n ?? `#${e}`,
3254
+ to: n ?? `#${t}`,
3255
3255
  onClick: () => r(),
3256
- className: h,
3256
+ className: f,
3257
3257
  children: i
3258
3258
  }
3259
3259
  );
3260
- }, Wr = (t) => {
3261
- var h;
3260
+ }, Wr = (e) => {
3261
+ var p;
3262
3262
  const {
3263
- tabs: e = [],
3263
+ tabs: t = [],
3264
3264
  defaultTab: s,
3265
- className: r = "",
3266
- tabsContainerClassName: i = "",
3267
- useLinks: n = !0,
3268
- tabButtonProps: a
3269
- } = t, [o, l] = X(s ?? ((h = e[0]) == null ? void 0 : h.id)), y = Ae(() => e.find((f) => f.id === o), [e, o]);
3270
- return /* @__PURE__ */ F("div", { className: `tabs-layout-main ${r}`, children: [
3265
+ currentTab: r,
3266
+ onTabChange: i,
3267
+ className: n = "",
3268
+ tabsContainerClassName: a = "",
3269
+ useLinks: o = !0,
3270
+ tabButtonProps: l
3271
+ } = e, [m, f] = X(s ?? ((p = t[0]) == null ? void 0 : p.id)), h = r ?? m, d = xe(() => t.find((b) => b.id === h), [t, h]);
3272
+ return /* @__PURE__ */ $("div", { className: `tabs-layout-main ${n}`, children: [
3271
3273
  /* @__PURE__ */ g(
3272
3274
  "ul",
3273
3275
  {
3274
- className: `horizontal tabs tabs-container ${i}`,
3275
- children: e.map(({ id: f, to: d, label: p }) => /* @__PURE__ */ g("li", { children: /* @__PURE__ */ g(
3276
+ className: `horizontal tabs tabs-container ${a}`,
3277
+ children: t.map(({ id: b, to: S, label: E }) => /* @__PURE__ */ g("li", { children: /* @__PURE__ */ g(
3276
3278
  Hr,
3277
3279
  {
3278
- onClick: () => l(f),
3279
- id: f,
3280
- to: d ?? "",
3281
- siblings: e.length > 1,
3282
- active: o === f,
3283
- useLinks: n,
3284
- tabButtonProps: a,
3285
- children: p
3280
+ onClick: () => {
3281
+ f(b), i == null || i(b);
3282
+ },
3283
+ id: b,
3284
+ to: S ?? "",
3285
+ siblings: t.length > 1,
3286
+ active: h === b,
3287
+ useLinks: o,
3288
+ tabButtonProps: l,
3289
+ children: E
3286
3290
  }
3287
- ) }, f))
3291
+ ) }, b))
3288
3292
  }
3289
3293
  ),
3290
- y == null ? void 0 : y.content
3294
+ d == null ? void 0 : d.content
3291
3295
  ] });
3292
- }, jr = (t) => {
3296
+ }, jr = (e) => {
3293
3297
  const {
3294
- translation: e,
3295
- onClickNext: s,
3296
- image: r = "",
3297
- alt: i = "",
3298
- final: n = !1
3299
- } = t, { setGuestMode: a } = Zt(), { navigate: o } = Be(), { t: l } = R();
3300
- return /* @__PURE__ */ F("div", { className: "big-appear step-container", children: [
3301
- r && /* @__PURE__ */ g("img", { src: r, alt: i }),
3302
- /* @__PURE__ */ g("h2", { className: "step-title", children: l(`_pages:onboarding.${e}.title`) }),
3303
- /* @__PURE__ */ g("p", { className: "step-body", children: l(`_pages:onboarding.${e}.body`) }),
3304
- /* @__PURE__ */ g("div", { className: "step-actions", children: n ? /* @__PURE__ */ F(Oe, { children: [
3298
+ title: t,
3299
+ body: s,
3300
+ content: r,
3301
+ onClickNext: i,
3302
+ image: n = "",
3303
+ alt: a = "",
3304
+ final: o = !1
3305
+ } = e, { setGuestMode: l } = Zt(), { navigate: m } = Be(), { t: f } = R();
3306
+ return /* @__PURE__ */ $("div", { className: "big-appear step-container", children: [
3307
+ n && /* @__PURE__ */ g("img", { src: n, alt: a }),
3308
+ t != null && /* @__PURE__ */ g("h2", { className: "step-title", children: t }),
3309
+ s != null && /* @__PURE__ */ g("div", { className: "step-body", children: s }),
3310
+ r != null && /* @__PURE__ */ g("div", { className: "step-content", children: r }),
3311
+ /* @__PURE__ */ g("div", { className: "step-actions", children: o ? /* @__PURE__ */ $(Oe, { children: [
3305
3312
  /* @__PURE__ */ g(
3306
3313
  ge,
3307
3314
  {
@@ -3309,10 +3316,10 @@ const Hr = (t) => {
3309
3316
  className: "step-button",
3310
3317
  variant: "outlined",
3311
3318
  onClick: () => {
3312
- a(!0), o("/");
3319
+ l(!0), m("/");
3313
3320
  },
3314
- "aria-label": l("_accessibility:ariaLabels.start"),
3315
- children: l("_accessibility:buttons.startAsGuest")
3321
+ "aria-label": f("_accessibility:ariaLabels.start"),
3322
+ children: f("_accessibility:buttons.startAsGuest")
3316
3323
  }
3317
3324
  ),
3318
3325
  /* @__PURE__ */ g(
@@ -3321,21 +3328,21 @@ const Hr = (t) => {
3321
3328
  color: "primary",
3322
3329
  variant: "submit",
3323
3330
  className: "step-button",
3324
- "aria-label": l("_accessibility:ariaLabels.start"),
3325
- onClick: () => o("/auth/sign-in"),
3326
- children: l("_accessibility:buttons.signIn")
3331
+ "aria-label": f("_accessibility:ariaLabels.start"),
3332
+ onClick: () => m("/auth/sign-in"),
3333
+ children: f("_accessibility:buttons.signIn")
3327
3334
  }
3328
3335
  )
3329
- ] }) : /* @__PURE__ */ F(Oe, { children: [
3336
+ ] }) : /* @__PURE__ */ $(Oe, { children: [
3330
3337
  /* @__PURE__ */ g(
3331
3338
  ge,
3332
3339
  {
3333
3340
  color: "primary",
3334
3341
  className: "step-button",
3335
3342
  variant: "outlined",
3336
- onClick: () => o("/auth/sign-in"),
3337
- "aria-label": l("_accessibility:ariaLabels.skip"),
3338
- children: l("_accessibility:buttons.skip")
3343
+ onClick: () => m("/auth/sign-in"),
3344
+ "aria-label": f("_accessibility:ariaLabels.skip"),
3345
+ children: f("_accessibility:buttons.skip")
3339
3346
  }
3340
3347
  ),
3341
3348
  /* @__PURE__ */ g(
@@ -3344,37 +3351,45 @@ const Hr = (t) => {
3344
3351
  color: "primary",
3345
3352
  className: "step-button",
3346
3353
  variant: "outlined",
3347
- onClick: () => s(),
3348
- "aria-label": l("_accessibility:ariaLabels.next"),
3349
- children: l("_accessibility:buttons.next")
3354
+ onClick: () => i(),
3355
+ "aria-label": f("_accessibility:ariaLabels.next"),
3356
+ children: f("_accessibility:buttons.next")
3350
3357
  }
3351
3358
  )
3352
3359
  ] }) })
3353
3360
  ] });
3354
- }, Bn = (t) => {
3355
- const { steps: e } = t, [s, r] = X(1), i = Ae(() => e.map((n, a) => ({
3361
+ }, Bn = (e) => {
3362
+ const { steps: t } = e, [s, r] = X(1), i = xe(() => t.map((n, a) => ({
3356
3363
  id: a + 1,
3357
3364
  label: "",
3358
3365
  content: /* @__PURE__ */ g(
3359
3366
  jr,
3360
3367
  {
3361
- translation: n,
3362
- final: a === e.length - 1,
3368
+ ...n,
3369
+ final: a === t.length - 1,
3363
3370
  onClickNext: () => r((o) => o + 1)
3364
3371
  }
3365
3372
  )
3366
- })), [e]);
3367
- return /* @__PURE__ */ g("div", { className: "onboarding-main", children: /* @__PURE__ */ g(Wr, { defaultTab: s, tabs: i }) });
3368
- }, Qr = (t) => {
3373
+ })), [t]);
3374
+ return /* @__PURE__ */ g("div", { className: "onboarding-main", children: /* @__PURE__ */ g(
3375
+ Wr,
3376
+ {
3377
+ currentTab: s,
3378
+ onTabChange: (n) => r(Number(n)),
3379
+ tabs: i,
3380
+ useLinks: !1
3381
+ }
3382
+ ) });
3383
+ }, Qr = (e) => {
3369
3384
  const {
3370
- message: e,
3385
+ message: t,
3371
3386
  messageProps: s = { className: "empty-message" },
3372
3387
  action: r,
3373
3388
  iconProps: i
3374
- } = t;
3375
- return /* @__PURE__ */ F("div", { className: "empty-container", children: [
3389
+ } = e;
3390
+ return /* @__PURE__ */ $("div", { className: "empty-container", children: [
3376
3391
  i && /* @__PURE__ */ g(ue, { ...i }),
3377
- /* @__PURE__ */ g("p", { ...s, children: e }),
3392
+ /* @__PURE__ */ g("p", { ...s, children: t }),
3378
3393
  r && /* @__PURE__ */ g(Rs, { showTooltips: !1, showText: !0, ...r })
3379
3394
  ] });
3380
3395
  };
@@ -3383,25 +3398,25 @@ export {
3383
3398
  jn as Action,
3384
3399
  Qn as Actions,
3385
3400
  Gn as ActionsDropdown,
3386
- Ee as AppIconButton,
3401
+ Te as AppIconButton,
3387
3402
  ir as AuthClient,
3388
3403
  Sn as AuthProvider,
3389
3404
  hn as BaseClient,
3390
3405
  zn as Button,
3391
- En as ConfigProvider,
3406
+ Tn as ConfigProvider,
3392
3407
  un as ConfirmationDialog,
3393
3408
  dt as Dialog,
3394
3409
  ft as DialogActions,
3395
3410
  _n as Drawer,
3396
3411
  ts as DrawerMenuContext,
3397
- Tn as DrawerMenuProvider,
3412
+ En as DrawerMenuProvider,
3398
3413
  Qr as Empty,
3399
3414
  Rn as Error,
3400
3415
  on as FormContainer,
3401
3416
  ln as FormDialog,
3402
- Te as GlobalActions,
3417
+ Ee as GlobalActions,
3403
3418
  fn as IManager,
3404
- Ee as IconButton,
3419
+ Te as IconButton,
3405
3420
  dn as ImportDialog,
3406
3421
  mn as IndexedDBClient,
3407
3422
  kn as ManagerProvider,
@@ -3441,21 +3456,21 @@ export {
3441
3456
  Be as useConfig,
3442
3457
  ss as useConfirmationForm,
3443
3458
  Vr as useDeleteAction,
3444
- Nn as useDeleteDialog,
3459
+ An as useDeleteDialog,
3445
3460
  ds as useDialog,
3446
3461
  lr as useDrawerMenu,
3447
- An as useEditAction,
3462
+ xn as useEditAction,
3448
3463
  Ir as useExportAction,
3449
3464
  Dn as useExportActionMutate,
3450
- $n as useFormDialog,
3465
+ Fn as useFormDialog,
3451
3466
  Pr as useImportAction,
3452
3467
  Ln as useImportDialog,
3453
3468
  or as useManager,
3454
3469
  Ur as useNavbar,
3455
- Ne as useNotification,
3456
- xn as usePostForm,
3470
+ Ae as useNotification,
3471
+ Nn as usePostForm,
3457
3472
  Rr as useRestoreAction,
3458
- Fn as useRestoreDialog,
3473
+ $n as useRestoreDialog,
3459
3474
  Mr as useScrollTrigger,
3460
3475
  Cn as useTimeAge
3461
3476
  };