@sito/dashboard-app 0.0.38 → 0.0.39

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