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