@sito/dashboard-app 0.0.21 → 0.0.23

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