@sito/dashboard-app 0.0.6 → 0.0.8
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 +968 -1023
- 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/main.css +1 -1
- package/dist/main.d.ts +1 -0
- package/package.json +16 -17
- package/dist/components/Chip/Chip.d.ts +0 -7
- package/dist/components/Chip/DeletableChip.d.ts +0 -2
- 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/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 Ns, faRotateLeft as Mt, faPencil as ks, 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
|
-
...o
|
|
23
|
-
} = e;
|
|
24
|
-
return /* @__PURE__ */ k("div", { className: `chip ${i} ${n}`, ...o, children: [
|
|
25
|
-
r ? /* @__PURE__ */ m(X, { icon: r, className: c }) : null,
|
|
26
|
-
t ?? s
|
|
27
|
-
] });
|
|
28
|
-
}, Wr = (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,
|
|
@@ -51,24 +20,24 @@ function Rt(e) {
|
|
|
51
20
|
onClick: i,
|
|
52
21
|
children: n,
|
|
53
22
|
hidden: c = !1,
|
|
54
|
-
disabled:
|
|
55
|
-
showText:
|
|
56
|
-
showTooltips:
|
|
23
|
+
disabled: a = !1,
|
|
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 ${
|
|
63
|
-
disabled:
|
|
31
|
+
className: `action ${m ? "text-action" : "icon-action"}`,
|
|
32
|
+
disabled: a,
|
|
64
33
|
onClick: () => i(),
|
|
65
|
-
"aria-disabled":
|
|
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,28 +60,28 @@ function qt(e) {
|
|
|
91
60
|
}
|
|
92
61
|
) }, n.id)) });
|
|
93
62
|
}
|
|
94
|
-
const
|
|
95
|
-
const { children: t, open: s, onClose: r } = e, i =
|
|
96
|
-
(
|
|
97
|
-
const
|
|
98
|
-
!s || !
|
|
63
|
+
const Hs = (e) => {
|
|
64
|
+
const { children: t, open: s, onClose: r } = e, i = Vt(null), n = $(
|
|
65
|
+
(a) => {
|
|
66
|
+
const m = i.current;
|
|
67
|
+
!s || !m || m.contains(a.target) || r();
|
|
99
68
|
},
|
|
100
69
|
[s, r]
|
|
101
70
|
), c = $(
|
|
102
|
-
(
|
|
103
|
-
s &&
|
|
71
|
+
(a) => {
|
|
72
|
+
s && a.key === "Escape" && r();
|
|
104
73
|
},
|
|
105
74
|
[s, r]
|
|
106
75
|
);
|
|
107
|
-
return
|
|
76
|
+
return te(() => {
|
|
108
77
|
if (s)
|
|
109
78
|
return setTimeout(() => {
|
|
110
|
-
var
|
|
111
|
-
return (
|
|
79
|
+
var a;
|
|
80
|
+
return (a = i.current) == null ? void 0 : a.focus();
|
|
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,
|
|
@@ -120,11 +89,11 @@ const Ws = (e) => {
|
|
|
120
89
|
"aria-hidden": !s,
|
|
121
90
|
tabIndex: -1,
|
|
122
91
|
className: `dropdown-main ${s ? "opened" : "closed"}`,
|
|
123
|
-
onClick: (
|
|
92
|
+
onClick: (a) => a.stopPropagation(),
|
|
124
93
|
children: t
|
|
125
94
|
}
|
|
126
95
|
);
|
|
127
|
-
},
|
|
96
|
+
}, he = (e) => {
|
|
128
97
|
const {
|
|
129
98
|
children: t,
|
|
130
99
|
icon: s,
|
|
@@ -132,17 +101,17 @@ const Ws = (e) => {
|
|
|
132
101
|
className: i = "",
|
|
133
102
|
variant: n = "text",
|
|
134
103
|
color: c = "default",
|
|
135
|
-
iconClassName:
|
|
136
|
-
...
|
|
104
|
+
iconClassName: a = "",
|
|
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,70 +125,70 @@ 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 = (
|
|
166
|
-
if (
|
|
167
|
-
if (localStorage.getItem(
|
|
168
|
-
return
|
|
169
|
-
} else if (
|
|
170
|
-
return
|
|
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") {
|
|
136
|
+
if (localStorage.getItem(a) !== void 0 && localStorage.getItem(a) !== "undefined" && localStorage.getItem(a) !== null)
|
|
137
|
+
return h === void 0 || h !== void 0 && localStorage.getItem(a) === h;
|
|
138
|
+
} else if (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
|
-
}, t = (
|
|
173
|
-
const
|
|
174
|
-
return
|
|
141
|
+
}, t = (a) => {
|
|
142
|
+
const m = {};
|
|
143
|
+
return a.substring(1).split("&").forEach((d) => {
|
|
175
144
|
const [g, f] = d.split("=");
|
|
176
|
-
|
|
177
|
-
}),
|
|
178
|
-
}, s = (
|
|
179
|
-
if (n(
|
|
145
|
+
m[g] = f;
|
|
146
|
+
}), m;
|
|
147
|
+
}, s = (a = "") => {
|
|
148
|
+
if (n(a) && a.length) return n(a);
|
|
180
149
|
{
|
|
181
|
-
let
|
|
182
|
-
if (
|
|
183
|
-
return
|
|
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 = (
|
|
187
|
-
top:
|
|
188
|
-
left:
|
|
155
|
+
}, r = (a = 0, m = 0, h = window, d = "smooth") => h.scroll({
|
|
156
|
+
top: a,
|
|
157
|
+
left: m,
|
|
189
158
|
behavior: d
|
|
190
|
-
}), i = (
|
|
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 = `${
|
|
195
|
-
}, n = (
|
|
196
|
-
const
|
|
163
|
+
document.cookie = `${a}=${h || ""}${x};path=${d};SameSite=${g}`;
|
|
164
|
+
}, n = (a) => {
|
|
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
|
-
deleteCookie: (
|
|
178
|
+
deleteCookie: (a) => document.cookie = `${a}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`,
|
|
210
179
|
getUserLanguage: s,
|
|
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 Hr() {
|
|
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)),
|
|
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 zr() {
|
|
|
229
198
|
) };
|
|
230
199
|
}
|
|
231
200
|
var j = /* @__PURE__ */ ((e) => (e[e.success = 0] = "success", e[e.error = 1] = "error", e[e.warning = 2] = "warning", e[e.info = 3] = "info", e))(j || {});
|
|
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,32 +211,32 @@ async function Ae(e, t = "GET", s, r) {
|
|
|
242
211
|
...s ? { body: JSON.stringify(s) } : {}
|
|
243
212
|
};
|
|
244
213
|
try {
|
|
245
|
-
const
|
|
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 (!
|
|
248
|
-
const g = await
|
|
216
|
+
if (!a.ok || Ws(a.status)) {
|
|
217
|
+
const g = await a.text();
|
|
249
218
|
g && (d = {
|
|
250
|
-
status:
|
|
219
|
+
status: a.status,
|
|
251
220
|
message: g
|
|
252
221
|
});
|
|
253
222
|
}
|
|
254
223
|
return {
|
|
255
|
-
data:
|
|
256
|
-
status:
|
|
224
|
+
data: a.ok && a.status !== 204 ? h : null,
|
|
225
|
+
status: a.status,
|
|
257
226
|
error: d
|
|
258
227
|
};
|
|
259
|
-
} catch (
|
|
228
|
+
} catch (a) {
|
|
260
229
|
return {
|
|
261
230
|
data: null,
|
|
262
231
|
status: 500,
|
|
263
232
|
error: {
|
|
264
233
|
status: 500,
|
|
265
|
-
message:
|
|
234
|
+
message: a.message || "Unknown error occurred"
|
|
266
235
|
}
|
|
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))}`
|
|
@@ -279,12 +248,12 @@ function Ys(e, t) {
|
|
|
279
248
|
const Bt = (e, t, s) => {
|
|
280
249
|
const r = [];
|
|
281
250
|
if (t) {
|
|
282
|
-
const { sortingBy: i, sortingOrder: n, currentPage: c, pageSize:
|
|
251
|
+
const { sortingBy: i, sortingOrder: n, currentPage: c, pageSize: a } = t;
|
|
283
252
|
r.push(
|
|
284
253
|
`sort=${String(i)}`,
|
|
285
254
|
`order=${n}`,
|
|
286
255
|
`page=${c}`,
|
|
287
|
-
`pageSize=${
|
|
256
|
+
`pageSize=${a}`
|
|
288
257
|
);
|
|
289
258
|
}
|
|
290
259
|
if (s) {
|
|
@@ -292,10 +261,10 @@ const Bt = (e, t, s) => {
|
|
|
292
261
|
([, n]) => n != null && n !== ""
|
|
293
262
|
).flatMap(([n, c]) => {
|
|
294
263
|
if (Array.isArray(c))
|
|
295
|
-
return c.map((
|
|
264
|
+
return c.map((a) => `${n}==${encodeURIComponent((a == null ? void 0 : a.id) ?? a)}`);
|
|
296
265
|
if (typeof c == "object" && c !== null && "start" in c && "end" in c) {
|
|
297
|
-
const
|
|
298
|
-
return c.start != null && c.start !== "" &&
|
|
266
|
+
const a = [];
|
|
267
|
+
return c.start != null && c.start !== "" && a.push(`${n}>=${encodeURIComponent(c.start)}`), c.end != null && c.end !== "" && a.push(`${n}<=${encodeURIComponent(c.end)}`), a;
|
|
299
268
|
}
|
|
300
269
|
return typeof c == "object" && c !== null ? `${n}==${encodeURIComponent(c.id ?? "")}` : `${n}==${encodeURIComponent(c)}`;
|
|
301
270
|
});
|
|
@@ -324,7 +293,7 @@ class jt {
|
|
|
324
293
|
return { Authorization: `Bearer ${s}` };
|
|
325
294
|
}
|
|
326
295
|
async doQuery(t, s = Y.GET, r, i) {
|
|
327
|
-
const n = this.secured ? this.defaultTokenAcquirer() : {}, { data: c, status:
|
|
296
|
+
const n = this.secured ? this.defaultTokenAcquirer() : {}, { data: c, status: a } = await Ae(
|
|
328
297
|
`${this.baseUrl}${t}`,
|
|
329
298
|
s,
|
|
330
299
|
r,
|
|
@@ -333,7 +302,7 @@ class jt {
|
|
|
333
302
|
...i ?? {}
|
|
334
303
|
}
|
|
335
304
|
);
|
|
336
|
-
if (
|
|
305
|
+
if (a !== 200 && a !== 204) throw new Error(String(a));
|
|
337
306
|
return c;
|
|
338
307
|
}
|
|
339
308
|
/**
|
|
@@ -343,13 +312,13 @@ class jt {
|
|
|
343
312
|
* @returns Result list
|
|
344
313
|
*/
|
|
345
314
|
async get(t, s, r) {
|
|
346
|
-
const i = Bt(t, s, r), n = this.secured ? this.defaultTokenAcquirer() : void 0, { data: c, error:
|
|
315
|
+
const i = Bt(t, s, r), n = this.secured ? this.defaultTokenAcquirer() : void 0, { data: c, error: a } = await Ae(
|
|
347
316
|
`${this.baseUrl}${i}`,
|
|
348
317
|
Y.GET,
|
|
349
318
|
null,
|
|
350
319
|
n
|
|
351
320
|
);
|
|
352
|
-
if (
|
|
321
|
+
if (a) throw new Error(`${a.status} ${a.message}`);
|
|
353
322
|
return c;
|
|
354
323
|
}
|
|
355
324
|
/**
|
|
@@ -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 Qr {
|
|
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 Gr {
|
|
|
442
411
|
return this.auth;
|
|
443
412
|
}
|
|
444
413
|
}
|
|
445
|
-
class
|
|
414
|
+
class Kr {
|
|
446
415
|
/**
|
|
447
416
|
*
|
|
448
417
|
* @param table
|
|
@@ -526,7 +495,7 @@ class Jr {
|
|
|
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 Jr {
|
|
|
545
514
|
return await this.api.patch(`${this.table}/restore`, t);
|
|
546
515
|
}
|
|
547
516
|
}
|
|
548
|
-
function
|
|
517
|
+
function Wr(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,63 +560,63 @@ function _t(e) {
|
|
|
591
560
|
s
|
|
592
561
|
);
|
|
593
562
|
}
|
|
594
|
-
function
|
|
563
|
+
function zr(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 Gr(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: j.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: j.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
|
-
showSuccessNotification:
|
|
607
|
+
showSuccessNotification: a,
|
|
639
608
|
showStackNotifications: c
|
|
640
609
|
},
|
|
641
610
|
children: t
|
|
642
611
|
}
|
|
643
612
|
);
|
|
644
613
|
}
|
|
645
|
-
const
|
|
646
|
-
const e =
|
|
614
|
+
const Ne = () => {
|
|
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({}), Jr = (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({}), Yr = (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
|
-
isInGuestMode:
|
|
695
|
-
setGuestMode:
|
|
663
|
+
isInGuestMode: a,
|
|
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({}), Xr = (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
|
-
|
|
724
|
-
}, x =
|
|
689
|
+
const { showSuccessNotification: t } = Ne(), { 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 Q(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 Q(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
|
-
const
|
|
770
|
-
let
|
|
738
|
+
const a = i[r];
|
|
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
|
-
if (
|
|
744
|
+
if (a === "__proto__" || a === "constructor" || a === "prototype")
|
|
776
745
|
return;
|
|
777
|
-
e[
|
|
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 or = (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)
|
|
@@ -827,20 +796,20 @@ function be(e, t, s = /* @__PURE__ */ new WeakSet()) {
|
|
|
827
796
|
if (!i.includes(n))
|
|
828
797
|
return !1;
|
|
829
798
|
if (n !== "ref") {
|
|
830
|
-
const
|
|
831
|
-
if (
|
|
799
|
+
const a = t[n];
|
|
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
|
+
}, Nt = { 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 === "" ? Nt : { value: e[0].value, isValid: !0 } : Nt
|
|
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 kt = {
|
|
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, kt) : kt;
|
|
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,53 +913,53 @@ 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) {
|
|
960
|
-
const { _f: c, ...
|
|
929
|
+
const { _f: c, ...a } = n;
|
|
961
930
|
if (c) {
|
|
962
931
|
if (c.refs && c.refs[0] && t(c.refs[0], i) && !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
|
|
979
948
|
};
|
|
980
949
|
const i = s.split(".");
|
|
981
950
|
for (; i.length; ) {
|
|
982
|
-
const n = i.join("."), c = v(t, n),
|
|
951
|
+
const n = i.join("."), c = v(t, n), a = v(e, n);
|
|
983
952
|
if (c && !Array.isArray(c) && s !== n)
|
|
984
953
|
return { name: s };
|
|
985
|
-
if (
|
|
954
|
+
if (a && a.type)
|
|
986
955
|
return {
|
|
987
956
|
name: n,
|
|
988
|
-
error:
|
|
957
|
+
error: a
|
|
989
958
|
};
|
|
990
|
-
if (
|
|
959
|
+
if (a && a.root && a.root.type)
|
|
991
960
|
return {
|
|
992
961
|
name: `${n}.root`,
|
|
993
|
-
error:
|
|
962
|
+
error: a.root
|
|
994
963
|
};
|
|
995
964
|
i.pop();
|
|
996
965
|
}
|
|
@@ -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 ke = (e) =>
|
|
986
|
+
var ke = (e) => I(e) && !Re(e) ? e : {
|
|
1018
987
|
value: e,
|
|
1019
988
|
message: ""
|
|
1020
|
-
},
|
|
1021
|
-
const { ref: c, refs:
|
|
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, N = v(s, S);
|
|
991
|
+
if (!ye || t.has(S))
|
|
1023
992
|
return {};
|
|
1024
|
-
const W =
|
|
1025
|
-
i && W.reportValidity && (W.setCustomValidity(de(
|
|
1026
|
-
},
|
|
1027
|
-
const V =
|
|
1028
|
-
|
|
1029
|
-
type:
|
|
993
|
+
const W = a ? a[0] : c, L = (k) => {
|
|
994
|
+
i && W.reportValidity && (W.setCustomValidity(de(k) ? "" : k || ""), W.reportValidity());
|
|
995
|
+
}, T = {}, G = it(c), Z = Ve(c), ve = G || Z, B = (q || nt(c)) && R(c.value) && R(N) || Ie(c) && c.value === "" || N === "" || Array.isArray(N) && !N.length, oe = or.bind(null, S, r, T), se = (k, E, O, H = me.maxLength, K = me.minLength) => {
|
|
996
|
+
const V = k ? E : O;
|
|
997
|
+
T[S] = {
|
|
998
|
+
type: k ? H : K,
|
|
1030
999
|
message: V,
|
|
1031
1000
|
ref: c,
|
|
1032
|
-
...oe(
|
|
1001
|
+
...oe(k ? H : K, V)
|
|
1033
1002
|
};
|
|
1034
1003
|
};
|
|
1035
|
-
if (n ? !Array.isArray(
|
|
1036
|
-
const { value:
|
|
1037
|
-
if (
|
|
1038
|
-
type:
|
|
1004
|
+
if (n ? !Array.isArray(N) || !N.length : m && (!ve && (B || z(N)) || de(N) && !N || Z && !ts(a).isValid || G && !rs(a).isValid)) {
|
|
1005
|
+
const { value: k, message: E } = Oe(m) ? { value: !!m, message: m } : ke(m);
|
|
1006
|
+
if (k && (T[S] = {
|
|
1007
|
+
type: me.required,
|
|
1039
1008
|
message: E,
|
|
1040
1009
|
ref: W,
|
|
1041
|
-
...oe(
|
|
1010
|
+
...oe(me.required, E)
|
|
1042
1011
|
}, !r))
|
|
1043
|
-
return
|
|
1012
|
+
return L(E), T;
|
|
1044
1013
|
}
|
|
1045
1014
|
if (!B && (!z(g) || !z(f))) {
|
|
1046
|
-
let
|
|
1047
|
-
const
|
|
1048
|
-
if (!z(
|
|
1049
|
-
const K = c.valueAsNumber ||
|
|
1050
|
-
z(
|
|
1015
|
+
let k, E;
|
|
1016
|
+
const O = ke(f), H = ke(g);
|
|
1017
|
+
if (!z(N) && !isNaN(N)) {
|
|
1018
|
+
const K = c.valueAsNumber || N && +N;
|
|
1019
|
+
z(O.value) || (k = K > O.value), z(H.value) || (E = K < H.value);
|
|
1051
1020
|
} else {
|
|
1052
|
-
const K = c.valueAsDate || new Date(
|
|
1053
|
-
fe(
|
|
1021
|
+
const K = c.valueAsDate || new Date(N), V = (xe) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + xe), re = c.type == "time", ae = c.type == "week";
|
|
1022
|
+
fe(O.value) && N && (k = re ? V(N) > V(O.value) : ae ? N > O.value : K > new Date(O.value)), fe(H.value) && N && (E = re ? V(N) < V(H.value) : ae ? N < H.value : K < new Date(H.value));
|
|
1054
1023
|
}
|
|
1055
|
-
if ((
|
|
1056
|
-
return
|
|
1024
|
+
if ((k || E) && (se(!!k, O.message, H.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) && !B && (fe(N) || n && Array.isArray(N))) {
|
|
1028
|
+
const k = ke(h), E = ke(d), O = !z(k.value) && N.length > +k.value, H = !z(E.value) && N.length < +E.value;
|
|
1029
|
+
if ((O || H) && (se(O, k.message, E.message), !r))
|
|
1030
|
+
return L(T[S].message), T;
|
|
1062
1031
|
}
|
|
1063
|
-
if (x && !B && fe(
|
|
1064
|
-
const { value:
|
|
1065
|
-
if (Re(
|
|
1066
|
-
type:
|
|
1032
|
+
if (x && !B && fe(N)) {
|
|
1033
|
+
const { value: k, message: E } = ke(x);
|
|
1034
|
+
if (Re(k) && !N.match(k) && (T[S] = {
|
|
1035
|
+
type: me.pattern,
|
|
1067
1036
|
message: E,
|
|
1068
1037
|
ref: c,
|
|
1069
|
-
...oe(
|
|
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 k = await C(N, s), E = Lt(k, W);
|
|
1045
|
+
if (E && (T[S] = {
|
|
1077
1046
|
...E,
|
|
1078
|
-
...oe(
|
|
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 k = {};
|
|
1052
|
+
for (const E in C) {
|
|
1053
|
+
if (!J(k) && !r)
|
|
1085
1054
|
break;
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1088
|
-
...
|
|
1089
|
-
...oe(E,
|
|
1090
|
-
},
|
|
1055
|
+
const O = Lt(await C[E](N, s), W, E);
|
|
1056
|
+
O && (k = {
|
|
1057
|
+
...O,
|
|
1058
|
+
...oe(E, O.message)
|
|
1059
|
+
}, L(O.message), r && (T[S] = k));
|
|
1091
1060
|
}
|
|
1092
|
-
if (!J(
|
|
1061
|
+
if (!J(k) && (T[S] = {
|
|
1093
1062
|
ref: W,
|
|
1094
|
-
...
|
|
1063
|
+
...k
|
|
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,17 +1091,17 @@ 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) ? Q(t.defaultValues || t.values) || {} : {}, n = t.shouldUnregister ? {} : Q(i), c = {
|
|
1126
1095
|
action: !1,
|
|
1127
1096
|
mount: !1,
|
|
1128
1097
|
watch: !1
|
|
1129
|
-
},
|
|
1098
|
+
}, a = {
|
|
1130
1099
|
mount: /* @__PURE__ */ new Set(),
|
|
1131
1100
|
disabled: /* @__PURE__ */ new Set(),
|
|
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,283 +1115,283 @@ 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
|
-
},
|
|
1154
|
-
if (!t.disabled && (d.isValid || g.isValid ||
|
|
1155
|
-
const l = t.resolver ? J((await
|
|
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) => {
|
|
1123
|
+
if (!t.disabled && (d.isValid || g.isValid || o)) {
|
|
1124
|
+
const l = t.resolver ? J((await Z()).errors) : await B(r, !0);
|
|
1156
1125
|
l !== s.isValid && f.state.next({
|
|
1157
1126
|
isValid: l
|
|
1158
1127
|
});
|
|
1159
1128
|
}
|
|
1160
|
-
}, q = (
|
|
1161
|
-
!t.disabled && (d.isValidating || d.validatingFields || g.isValidating || g.validatingFields) && ((
|
|
1129
|
+
}, q = (o, l) => {
|
|
1130
|
+
!t.disabled && (d.isValidating || d.validatingFields || g.isValidating || g.validatingFields) && ((o || Array.from(a.mount)).forEach((u) => {
|
|
1162
1131
|
u && (l ? M(s.validatingFields, u, l) : U(s.validatingFields, u));
|
|
1163
1132
|
}), f.state.next({
|
|
1164
1133
|
validatingFields: s.validatingFields,
|
|
1165
1134
|
isValidating: !J(s.validatingFields)
|
|
1166
1135
|
}));
|
|
1167
|
-
}, ye = (
|
|
1136
|
+
}, ye = (o, l = [], u, w, p = !0, b = !0) => {
|
|
1168
1137
|
if (w && u && !t.disabled) {
|
|
1169
|
-
if (c.action = !0, b && Array.isArray(v(r,
|
|
1170
|
-
const
|
|
1171
|
-
p && M(r,
|
|
1138
|
+
if (c.action = !0, b && Array.isArray(v(r, o))) {
|
|
1139
|
+
const _ = u(v(r, o), w.argA, w.argB);
|
|
1140
|
+
p && M(r, o, _);
|
|
1172
1141
|
}
|
|
1173
|
-
if (b && Array.isArray(v(s.errors,
|
|
1174
|
-
const
|
|
1175
|
-
p && M(s.errors,
|
|
1142
|
+
if (b && Array.isArray(v(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
|
-
if ((d.touchedFields || g.touchedFields) && b && Array.isArray(v(s.touchedFields,
|
|
1178
|
-
const
|
|
1179
|
-
p && M(s.touchedFields,
|
|
1146
|
+
if ((d.touchedFields || g.touchedFields) && b && Array.isArray(v(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
|
-
name:
|
|
1183
|
-
isDirty:
|
|
1151
|
+
name: o,
|
|
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
|
-
M(n,
|
|
1190
|
-
},
|
|
1191
|
-
M(s.errors,
|
|
1158
|
+
M(n, o, l);
|
|
1159
|
+
}, N = (o, l) => {
|
|
1160
|
+
M(s.errors, o, l), f.state.next({
|
|
1192
1161
|
errors: s.errors
|
|
1193
1162
|
});
|
|
1194
|
-
}, W = (
|
|
1195
|
-
s.errors =
|
|
1163
|
+
}, W = (o) => {
|
|
1164
|
+
s.errors = o, f.state.next({
|
|
1196
1165
|
errors: s.errors,
|
|
1197
1166
|
isValid: !1
|
|
1198
1167
|
});
|
|
1199
|
-
},
|
|
1200
|
-
const p = v(r,
|
|
1168
|
+
}, L = (o, l, u, w) => {
|
|
1169
|
+
const p = v(r, o);
|
|
1201
1170
|
if (p) {
|
|
1202
|
-
const b = v(n,
|
|
1203
|
-
R(b) || w && w.defaultChecked || l ? M(n,
|
|
1171
|
+
const b = v(n, o, R(u) ? v(i, o) : u);
|
|
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
|
-
name:
|
|
1177
|
+
name: o
|
|
1209
1178
|
};
|
|
1210
1179
|
if (!t.disabled) {
|
|
1211
1180
|
if (!u || w) {
|
|
1212
|
-
(d.isDirty || g.isDirty) && (
|
|
1213
|
-
const P = be(v(i,
|
|
1214
|
-
|
|
1181
|
+
(d.isDirty || g.isDirty) && (_ = s.isDirty, s.isDirty = F.isDirty = se(), b = _ !== F.isDirty);
|
|
1182
|
+
const P = be(v(i, o), l);
|
|
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
|
-
const P = v(s.touchedFields,
|
|
1218
|
-
P || (M(s.touchedFields,
|
|
1186
|
+
const P = v(s.touchedFields, o);
|
|
1187
|
+
P || (M(s.touchedFields, o, u), F.touchedFields = s.touchedFields, b = b || (d.touchedFields || g.touchedFields) && P !== u);
|
|
1219
1188
|
}
|
|
1220
1189
|
b && p && f.state.next(F);
|
|
1221
1190
|
}
|
|
1222
1191
|
return b ? F : {};
|
|
1223
|
-
}, G = (
|
|
1224
|
-
const p = v(s.errors,
|
|
1225
|
-
if (t.delayError && u ? (
|
|
1226
|
-
const
|
|
1192
|
+
}, G = (o, l, u, w) => {
|
|
1193
|
+
const p = v(s.errors, o), b = (d.isValid || g.isValid) && de(l) && s.isValid !== l;
|
|
1194
|
+
if (t.delayError && u ? (m = C(() => N(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,
|
|
1230
|
-
name:
|
|
1199
|
+
name: o
|
|
1231
1200
|
};
|
|
1232
1201
|
s = {
|
|
1233
1202
|
...s,
|
|
1234
|
-
...
|
|
1235
|
-
}, f.state.next(
|
|
1203
|
+
..._
|
|
1204
|
+
}, f.state.next(_);
|
|
1236
1205
|
}
|
|
1237
|
-
},
|
|
1238
|
-
q(
|
|
1239
|
-
const l = await t.resolver(n, t.context,
|
|
1240
|
-
return q(
|
|
1241
|
-
}, ve = async (
|
|
1242
|
-
const { errors: l } = await
|
|
1243
|
-
if (
|
|
1244
|
-
for (const u of
|
|
1206
|
+
}, Z = async (o) => {
|
|
1207
|
+
q(o, !0);
|
|
1208
|
+
const l = await t.resolver(n, t.context, ur(o || a.mount, r, t.criteriaMode, t.shouldUseNativeValidation));
|
|
1209
|
+
return q(o), l;
|
|
1210
|
+
}, ve = async (o) => {
|
|
1211
|
+
const { errors: l } = await Z(o);
|
|
1212
|
+
if (o)
|
|
1213
|
+
for (const u of o) {
|
|
1245
1214
|
const w = v(l, u);
|
|
1246
1215
|
w ? M(s.errors, u, w) : U(s.errors, u);
|
|
1247
1216
|
}
|
|
1248
1217
|
else
|
|
1249
1218
|
s.errors = l;
|
|
1250
1219
|
return l;
|
|
1251
|
-
}, B = async (
|
|
1220
|
+
}, B = async (o, l, u = {
|
|
1252
1221
|
valid: !0
|
|
1253
1222
|
}) => {
|
|
1254
|
-
for (const w in
|
|
1255
|
-
const p =
|
|
1223
|
+
for (const w in o) {
|
|
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 =
|
|
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 B(_, l, u);
|
|
1267
1236
|
}
|
|
1268
1237
|
}
|
|
1269
1238
|
return u.valid;
|
|
1270
1239
|
}, oe = () => {
|
|
1271
|
-
for (const
|
|
1272
|
-
const l = v(r,
|
|
1273
|
-
l && (l._f.refs ? l._f.refs.every((u) => !
|
|
1240
|
+
for (const o of a.unMount) {
|
|
1241
|
+
const l = v(r, o);
|
|
1242
|
+
l && (l._f.refs ? l._f.refs.every((u) => !Ze(u)) : !Ze(l._f.ref)) && We(o);
|
|
1274
1243
|
}
|
|
1275
|
-
|
|
1276
|
-
},
|
|
1277
|
-
...c.mount ? n : R(l) ? i : fe(
|
|
1278
|
-
}, u, l), E = (
|
|
1279
|
-
const w = v(r,
|
|
1244
|
+
a.unMount = /* @__PURE__ */ new Set();
|
|
1245
|
+
}, se = (o, l) => !t.disabled && (o && l && M(n, o, l), !be(xe(), i)), k = (o, l, u) => ir(o, a, {
|
|
1246
|
+
...c.mount ? n : R(l) ? i : fe(o) ? { [o]: l } : l
|
|
1247
|
+
}, u, l), E = (o) => st(v(c.mount ? n : i, o, t.shouldUnregister ? v(i, o, []) : [])), O = (o, l, u = {}) => {
|
|
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,
|
|
1284
|
-
(!
|
|
1285
|
-
}) : b.refs.forEach((
|
|
1286
|
-
name:
|
|
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({
|
|
1255
|
+
name: o,
|
|
1287
1256
|
values: Q(n)
|
|
1288
1257
|
})));
|
|
1289
1258
|
}
|
|
1290
|
-
(u.shouldDirty || u.shouldTouch) &&
|
|
1291
|
-
}, H = (
|
|
1259
|
+
(u.shouldDirty || u.shouldTouch) && T(o, p, u.shouldTouch, u.shouldDirty, !0), u.shouldValidate && ae(o);
|
|
1260
|
+
}, H = (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 =
|
|
1296
|
-
(
|
|
1264
|
+
const p = l[w], b = o + "." + w, _ = v(r, b);
|
|
1265
|
+
(a.array.has(o) || I(p) || _ && !_._f) && !Ce(p) ? H(b, p, u) : O(b, p, u);
|
|
1297
1266
|
}
|
|
1298
|
-
}, K = (
|
|
1299
|
-
const w = v(r,
|
|
1300
|
-
M(n,
|
|
1301
|
-
name:
|
|
1267
|
+
}, K = (o, l, u = {}) => {
|
|
1268
|
+
const w = v(r, o), p = a.array.has(o), b = Q(l);
|
|
1269
|
+
M(n, o, b), p ? (f.array.next({
|
|
1270
|
+
name: o,
|
|
1302
1271
|
values: Q(n)
|
|
1303
1272
|
}), (d.isDirty || d.dirtyFields || g.isDirty || g.dirtyFields) && u.shouldDirty && f.state.next({
|
|
1304
|
-
name:
|
|
1273
|
+
name: o,
|
|
1305
1274
|
dirtyFields: Ee(i, n),
|
|
1306
|
-
isDirty:
|
|
1307
|
-
})) : w && !w._f && !z(b) ? H(
|
|
1308
|
-
name: c.mount ?
|
|
1275
|
+
isDirty: se(o, b)
|
|
1276
|
+
})) : w && !w._f && !z(b) ? H(o, b, u) : O(o, b, u), Ft(o, a) && f.state.next({ ...s, name: o }), f.state.next({
|
|
1277
|
+
name: c.mount ? o : void 0,
|
|
1309
1278
|
values: Q(n)
|
|
1310
1279
|
});
|
|
1311
|
-
}, V = async (
|
|
1280
|
+
}, V = async (o) => {
|
|
1312
1281
|
c.mount = !0;
|
|
1313
|
-
const l =
|
|
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(
|
|
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
|
-
type:
|
|
1294
|
+
type: o.type,
|
|
1326
1295
|
values: Q(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 && ae(p._f.deps), G(u,
|
|
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 B(r, !0)));
|
|
1306
|
+
w && (p._f.deps && ae(p._f.deps), G(u, ne, P, Ye));
|
|
1338
1307
|
}
|
|
1339
|
-
},
|
|
1340
|
-
if (v(s.errors, l) &&
|
|
1341
|
-
return
|
|
1342
|
-
}, ae = async (
|
|
1308
|
+
}, re = (o, l) => {
|
|
1309
|
+
if (v(s.errors, l) && o.focus)
|
|
1310
|
+
return o.focus(), 1;
|
|
1311
|
+
}, ae = async (o, l = {}) => {
|
|
1343
1312
|
let u, w;
|
|
1344
|
-
const p = Fe(
|
|
1313
|
+
const p = Fe(o);
|
|
1345
1314
|
if (t.resolver) {
|
|
1346
|
-
const b = await ve(R(
|
|
1347
|
-
u = J(b), w =
|
|
1348
|
-
} else
|
|
1349
|
-
const
|
|
1350
|
-
return await B(
|
|
1351
|
-
}))).every(Boolean), !(!w && !s.isValid) &&
|
|
1315
|
+
const b = await ve(R(o) ? o : p);
|
|
1316
|
+
u = J(b), w = o ? !p.some((_) => v(b, _)) : u;
|
|
1317
|
+
} else o ? (w = (await Promise.all(p.map(async (b) => {
|
|
1318
|
+
const _ = v(r, b);
|
|
1319
|
+
return await B(_ && _._f ? { [b]: _ } : _);
|
|
1320
|
+
}))).every(Boolean), !(!w && !s.isValid) && S()) : w = u = await B(r);
|
|
1352
1321
|
return f.state.next({
|
|
1353
|
-
...!fe(
|
|
1354
|
-
...t.resolver || !
|
|
1322
|
+
...!fe(o) || (d.isValid || g.isValid) && u !== s.isValid ? {} : { name: o },
|
|
1323
|
+
...t.resolver || !o ? { isValid: u } : {},
|
|
1355
1324
|
errors: s.errors
|
|
1356
|
-
}), l.shouldFocus && !w &&
|
|
1357
|
-
}, xe = (
|
|
1325
|
+
}), l.shouldFocus && !w && Te(r, re, o ? p : a.mount), w;
|
|
1326
|
+
}, xe = (o) => {
|
|
1358
1327
|
const l = {
|
|
1359
1328
|
...c.mount ? n : i
|
|
1360
1329
|
};
|
|
1361
|
-
return R(
|
|
1362
|
-
}, Pe = (
|
|
1363
|
-
invalid: !!v((l || s).errors,
|
|
1364
|
-
isDirty: !!v((l || s).dirtyFields,
|
|
1365
|
-
error: v((l || s).errors,
|
|
1366
|
-
isValidating: !!v(s.validatingFields,
|
|
1367
|
-
isTouched: !!v((l || s).touchedFields,
|
|
1368
|
-
}),
|
|
1369
|
-
|
|
1370
|
-
errors:
|
|
1330
|
+
return R(o) ? l : fe(o) ? v(l, o) : o.map((u) => v(l, u));
|
|
1331
|
+
}, Pe = (o, l) => ({
|
|
1332
|
+
invalid: !!v((l || s).errors, o),
|
|
1333
|
+
isDirty: !!v((l || s).dirtyFields, o),
|
|
1334
|
+
error: v((l || s).errors, o),
|
|
1335
|
+
isValidating: !!v(s.validatingFields, o),
|
|
1336
|
+
isTouched: !!v((l || s).touchedFields, o)
|
|
1337
|
+
}), _e = (o) => {
|
|
1338
|
+
o && Fe(o).forEach((l) => U(s.errors, l)), f.state.next({
|
|
1339
|
+
errors: o ? s.errors : {}
|
|
1371
1340
|
});
|
|
1372
|
-
},
|
|
1373
|
-
const w = (v(r,
|
|
1374
|
-
M(s.errors,
|
|
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;
|
|
1343
|
+
M(s.errors, o, {
|
|
1375
1344
|
...P,
|
|
1376
1345
|
...l,
|
|
1377
1346
|
ref: w
|
|
1378
1347
|
}), f.state.next({
|
|
1379
|
-
name:
|
|
1348
|
+
name: o,
|
|
1380
1349
|
errors: s.errors,
|
|
1381
1350
|
isValid: !1
|
|
1382
1351
|
}), u && u.shouldFocus && w && w.focus && w.focus();
|
|
1383
|
-
}, os = (
|
|
1384
|
-
next: (u) => "values" in u &&
|
|
1385
|
-
}) :
|
|
1352
|
+
}, os = (o, l) => le(o) ? f.state.subscribe({
|
|
1353
|
+
next: (u) => "values" in u && o(k(void 0, l), u)
|
|
1354
|
+
}) : k(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, as = (
|
|
1363
|
+
}).unsubscribe, as = (o) => (c.mount = !0, g = {
|
|
1395
1364
|
...g,
|
|
1396
|
-
...
|
|
1397
|
-
},
|
|
1398
|
-
...
|
|
1365
|
+
...o.formState
|
|
1366
|
+
}, lt({
|
|
1367
|
+
...o,
|
|
1399
1368
|
formState: g
|
|
1400
|
-
})),
|
|
1401
|
-
for (const u of
|
|
1402
|
-
|
|
1369
|
+
})), We = (o, l = {}) => {
|
|
1370
|
+
for (const u of o ? Fe(o) : a.mount)
|
|
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: Q(n)
|
|
1405
1374
|
}), f.state.next({
|
|
1406
1375
|
...s,
|
|
1407
|
-
...l.keepDirty ? { isDirty:
|
|
1408
|
-
}), !l.keepIsValid &&
|
|
1409
|
-
},
|
|
1410
|
-
(de(
|
|
1411
|
-
},
|
|
1412
|
-
let u = v(r,
|
|
1376
|
+
...l.keepDirty ? { isDirty: se() } : {}
|
|
1377
|
+
}), !l.keepIsValid && S();
|
|
1378
|
+
}, ut = ({ disabled: o, name: l }) => {
|
|
1379
|
+
(de(o) && c.mount || o || a.disabled.has(l)) && (o ? a.disabled.add(l) : a.disabled.delete(l));
|
|
1380
|
+
}, ze = (o, l = {}) => {
|
|
1381
|
+
let u = v(r, o);
|
|
1413
1382
|
const w = de(l.disabled) || de(t.disabled);
|
|
1414
|
-
return M(r,
|
|
1383
|
+
return M(r, o, {
|
|
1415
1384
|
...u || {},
|
|
1416
1385
|
_f: {
|
|
1417
|
-
...u && u._f ? u._f : { ref: { name:
|
|
1418
|
-
name:
|
|
1386
|
+
...u && u._f ? u._f : { ref: { name: o } },
|
|
1387
|
+
name: o,
|
|
1419
1388
|
mount: !0,
|
|
1420
1389
|
...l
|
|
1421
1390
|
}
|
|
1422
|
-
}),
|
|
1391
|
+
}), a.mount.add(o), u ? ut({
|
|
1423
1392
|
disabled: de(l.disabled) ? l.disabled : t.disabled,
|
|
1424
|
-
name:
|
|
1425
|
-
}) :
|
|
1393
|
+
name: o
|
|
1394
|
+
}) : L(o, !0, l.value), {
|
|
1426
1395
|
...w ? { disabled: l.disabled || t.disabled } : {},
|
|
1427
1396
|
...t.progressive ? {
|
|
1428
1397
|
required: !!l.required,
|
|
@@ -1432,64 +1401,64 @@ function Cr(e = {}) {
|
|
|
1432
1401
|
maxLength: $e(l.maxLength),
|
|
1433
1402
|
pattern: $e(l.pattern)
|
|
1434
1403
|
} : {},
|
|
1435
|
-
name:
|
|
1404
|
+
name: o,
|
|
1436
1405
|
onChange: V,
|
|
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
|
-
M(r,
|
|
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
|
-
...Array.isArray(v(i,
|
|
1420
|
+
...Array.isArray(v(i, o)) ? [{}] : []
|
|
1452
1421
|
],
|
|
1453
|
-
ref: { type: b.type, name:
|
|
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,
|
|
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(
|
|
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
|
-
w && (l.disabled = w._f.disabled ||
|
|
1465
|
-
p.disabled = w._f.disabled ||
|
|
1433
|
+
w && (l.disabled = w._f.disabled || o, Array.isArray(w._f.refs) && w._f.refs.forEach((p) => {
|
|
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 = Q(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 = Q(
|
|
1444
|
+
const { errors: b, values: _ } = await Z();
|
|
1445
|
+
s.errors = b, p = Q(_);
|
|
1477
1446
|
} else
|
|
1478
1447
|
await B(r);
|
|
1479
|
-
if (
|
|
1480
|
-
for (const b of
|
|
1448
|
+
if (a.disabled.size)
|
|
1449
|
+
for (const b of a.disabled)
|
|
1481
1450
|
U(p, b);
|
|
1482
1451
|
if (U(s.errors, "root"), J(s.errors)) {
|
|
1483
1452
|
f.state.next({
|
|
1484
1453
|
errors: {}
|
|
1485
1454
|
});
|
|
1486
1455
|
try {
|
|
1487
|
-
await
|
|
1456
|
+
await o(p, u);
|
|
1488
1457
|
} catch (b) {
|
|
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,
|
|
@@ -1498,36 +1467,36 @@ function Cr(e = {}) {
|
|
|
1498
1467
|
errors: s.errors
|
|
1499
1468
|
}), w)
|
|
1500
1469
|
throw w;
|
|
1501
|
-
}, ls = (
|
|
1502
|
-
v(r,
|
|
1503
|
-
},
|
|
1504
|
-
const u =
|
|
1470
|
+
}, ls = (o, l = {}) => {
|
|
1471
|
+
v(r, o) && (R(l.defaultValue) ? K(o, Q(v(i, o))) : (K(o, l.defaultValue), M(i, o, Q(l.defaultValue))), l.keepTouched || U(s.touchedFields, o), l.keepDirty || (U(s.dirtyFields, o), s.isDirty = l.defaultValue ? se(o, Q(v(i, o))) : se()), l.keepError || (U(s.errors, o), d.isValid && S()), f.state.next({ ...s }));
|
|
1472
|
+
}, ft = (o, l = {}) => {
|
|
1473
|
+
const u = o ? Q(o) : i, w = Q(u), p = J(o), b = p ? i : w;
|
|
1505
1474
|
if (l.keepDefaultValues || (i = u), !l.keepValues) {
|
|
1506
1475
|
if (l.keepDirtyValues) {
|
|
1507
|
-
const
|
|
1508
|
-
...
|
|
1476
|
+
const _ = /* @__PURE__ */ new Set([
|
|
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
|
}
|
|
@@ -1537,8 +1506,8 @@ function Cr(e = {}) {
|
|
|
1537
1506
|
values: { ...b }
|
|
1538
1507
|
});
|
|
1539
1508
|
}
|
|
1540
|
-
|
|
1541
|
-
mount: l.keepDirtyValues ?
|
|
1509
|
+
a = {
|
|
1510
|
+
mount: l.keepDirtyValues ? a.mount : /* @__PURE__ */ new Set(),
|
|
1542
1511
|
unMount: /* @__PURE__ */ new Set(),
|
|
1543
1512
|
array: /* @__PURE__ */ new Set(),
|
|
1544
1513
|
disabled: /* @__PURE__ */ new Set(),
|
|
@@ -1547,45 +1516,45 @@ function Cr(e = {}) {
|
|
|
1547
1516
|
focus: ""
|
|
1548
1517
|
}, c.mount = !d.isValid || !!l.keepIsValid || !!l.keepDirtyValues, c.watch = !!t.shouldUnregister, f.state.next({
|
|
1549
1518
|
submitCount: l.keepSubmitCount ? s.submitCount : 0,
|
|
1550
|
-
isDirty: p ? !1 : l.keepDirty ? s.isDirty : !!(l.keepDefaultValues && !be(
|
|
1519
|
+
isDirty: p ? !1 : l.keepDirty ? s.isDirty : !!(l.keepDefaultValues && !be(o, i)),
|
|
1551
1520
|
isSubmitted: l.keepIsSubmitted ? s.isSubmitted : !1,
|
|
1552
|
-
dirtyFields: p ? {} : l.keepDirtyValues ? l.keepDefaultValues && n ? Ee(i, n) : s.dirtyFields : l.keepDefaultValues &&
|
|
1521
|
+
dirtyFields: p ? {} : l.keepDirtyValues ? l.keepDefaultValues && n ? Ee(i, n) : s.dirtyFields : l.keepDefaultValues && o ? Ee(i, o) : l.keepDirty ? s.dirtyFields : {},
|
|
1553
1522
|
touchedFields: l.keepTouched ? s.touchedFields : {},
|
|
1554
1523
|
errors: l.keepErrors ? s.errors : {},
|
|
1555
1524
|
isSubmitSuccessful: l.keepIsSubmitSuccessful ? s.isSubmitSuccessful : !1,
|
|
1556
1525
|
isSubmitting: !1
|
|
1557
1526
|
});
|
|
1558
|
-
},
|
|
1559
|
-
const u = v(r,
|
|
1527
|
+
}, mt = (o, l) => ft(le(o) ? o(n) : o, l), us = (o, l = {}) => {
|
|
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;
|
|
1562
1531
|
p.focus && (p.focus(), l.shouldSelect && le(p.select) && p.select());
|
|
1563
1532
|
}
|
|
1564
|
-
}, ds = (
|
|
1533
|
+
}, ds = (o) => {
|
|
1565
1534
|
s = {
|
|
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: k,
|
|
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:
|
|
1587
|
-
_resetDefaultValues: () => le(t.defaultValues) && t.defaultValues().then((
|
|
1588
|
-
|
|
1555
|
+
_reset: ft,
|
|
1556
|
+
_resetDefaultValues: () => le(t.defaultValues) && t.defaultValues().then((o) => {
|
|
1557
|
+
mt(o, t.resetOptions), f.state.next({
|
|
1589
1558
|
isLoading: !1
|
|
1590
1559
|
});
|
|
1591
1560
|
}),
|
|
@@ -1602,17 +1571,17 @@ function Cr(e = {}) {
|
|
|
1602
1571
|
get _state() {
|
|
1603
1572
|
return c;
|
|
1604
1573
|
},
|
|
1605
|
-
set _state(
|
|
1606
|
-
c =
|
|
1574
|
+
set _state(o) {
|
|
1575
|
+
c = o;
|
|
1607
1576
|
},
|
|
1608
1577
|
get _defaultValues() {
|
|
1609
1578
|
return i;
|
|
1610
1579
|
},
|
|
1611
1580
|
get _names() {
|
|
1612
|
-
return
|
|
1581
|
+
return a;
|
|
1613
1582
|
},
|
|
1614
|
-
set _names(
|
|
1615
|
-
|
|
1583
|
+
set _names(o) {
|
|
1584
|
+
a = o;
|
|
1616
1585
|
},
|
|
1617
1586
|
get _formState() {
|
|
1618
1587
|
return s;
|
|
@@ -1620,35 +1589,35 @@ function Cr(e = {}) {
|
|
|
1620
1589
|
get _options() {
|
|
1621
1590
|
return t;
|
|
1622
1591
|
},
|
|
1623
|
-
set _options(
|
|
1592
|
+
set _options(o) {
|
|
1624
1593
|
t = {
|
|
1625
1594
|
...t,
|
|
1626
|
-
...
|
|
1595
|
+
...o
|
|
1627
1596
|
};
|
|
1628
1597
|
}
|
|
1629
1598
|
},
|
|
1630
1599
|
subscribe: as,
|
|
1631
1600
|
trigger: ae,
|
|
1632
|
-
register:
|
|
1633
|
-
handleSubmit:
|
|
1601
|
+
register: ze,
|
|
1602
|
+
handleSubmit: dt,
|
|
1634
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,79 +1641,79 @@ 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, ...
|
|
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 }),
|
|
1686
1655
|
reRenderRoot: !0
|
|
1687
1656
|
});
|
|
1688
|
-
return i((
|
|
1689
|
-
...
|
|
1657
|
+
return i((a) => ({
|
|
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 } = Ne(), {
|
|
1718
1687
|
defaultValues: i,
|
|
1719
1688
|
mutationFn: n,
|
|
1720
1689
|
formToDto: c,
|
|
1721
|
-
onError:
|
|
1722
|
-
onSuccess:
|
|
1723
|
-
queryKey:
|
|
1690
|
+
onError: a,
|
|
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 B = document.querySelector(`[name="${
|
|
1732
|
-
(B instanceof HTMLInputElement || B instanceof HTMLTextAreaElement || B instanceof HTMLSelectElement) && (B.focus(), B.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 B = document.querySelector(`[name="${Z}"]`);
|
|
1701
|
+
(B instanceof HTMLInputElement || B instanceof HTMLTextAreaElement || B instanceof HTMLSelectElement) && (B.focus(), B.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
|
+
), N = $(() => {
|
|
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: j.error
|
|
@@ -1752,10 +1721,10 @@ const _r = (e) => {
|
|
|
1752
1721
|
)
|
|
1753
1722
|
);
|
|
1754
1723
|
}
|
|
1755
|
-
|
|
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: N,
|
|
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: Ns }),
|
|
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
|
+
}, Zr = (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: ks }),
|
|
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,89 +1843,89 @@ 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
|
+
}, en = (e) => {
|
|
1847
|
+
const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: i } = Ne(), { 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: j.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
|
-
onClick:
|
|
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
|
+
}, tn = (e) => {
|
|
1877
|
+
const { t } = D(), {
|
|
1909
1878
|
showErrorNotification: s,
|
|
1910
1879
|
showStackNotifications: r,
|
|
1911
1880
|
showSuccessNotification: i
|
|
1912
|
-
} =
|
|
1881
|
+
} = Ne(), {
|
|
1913
1882
|
defaultValues: n,
|
|
1914
1883
|
getFunction: c,
|
|
1915
|
-
mutationFn:
|
|
1916
|
-
formToDto:
|
|
1917
|
-
dtoToForm:
|
|
1884
|
+
mutationFn: a,
|
|
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: N, handleOpen: W } = is(), { control: L, handleSubmit: T, reset: G, setError: Z, getValues: ve, setValue: B } = ns({
|
|
1924
1893
|
defaultValues: n
|
|
1925
|
-
}), { data: oe, isLoading:
|
|
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
|
-
oe &&
|
|
1899
|
+
te(() => {
|
|
1900
|
+
oe && h && G({ ...h(oe) });
|
|
1932
1901
|
}, [oe]);
|
|
1933
|
-
const
|
|
1902
|
+
const k = $(
|
|
1934
1903
|
(V) => {
|
|
1935
|
-
const
|
|
1936
|
-
return
|
|
1937
|
-
const
|
|
1938
|
-
(
|
|
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}`)));
|
|
1939
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
|
), H = $(() => {
|
|
1952
|
-
E(),
|
|
1953
|
-
}, [G, E,
|
|
1954
|
-
mutationFn:
|
|
1921
|
+
E(), N(), G();
|
|
1922
|
+
}, [G, E, N]), K = He({
|
|
1923
|
+
mutationFn: a,
|
|
1955
1924
|
onError: (V) => {
|
|
1956
1925
|
if (console.error(V), V.errors) {
|
|
1957
|
-
const
|
|
1926
|
+
const re = k(V);
|
|
1958
1927
|
r(
|
|
1959
|
-
|
|
1928
|
+
re.map(
|
|
1960
1929
|
(ae) => ({
|
|
1961
1930
|
message: ae,
|
|
1962
1931
|
type: j.error
|
|
@@ -1966,135 +1935,135 @@ 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
|
}), H();
|
|
1972
1941
|
}
|
|
1973
1942
|
});
|
|
1974
1943
|
return {
|
|
1975
1944
|
open: ye,
|
|
1976
|
-
openDialog:
|
|
1945
|
+
openDialog: O,
|
|
1977
1946
|
handleClose: H,
|
|
1978
|
-
control:
|
|
1947
|
+
control: L,
|
|
1979
1948
|
getValues: ve,
|
|
1980
1949
|
setValue: B,
|
|
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: k,
|
|
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
|
+
}, sn = (e) => {
|
|
1960
|
+
const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: i } = Ne(), { 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: j.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
|
-
onClick:
|
|
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 rn(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 {
|
|
2027
|
-
...
|
|
1996
|
+
...a,
|
|
2028
1997
|
open: n,
|
|
2029
1998
|
title: t("_pages:common.actions.import.dialog.title", {
|
|
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 nn = (e) => {
|
|
2006
|
+
const { showSuccessNotification: t } = Ne(), { t: s } = D(), {
|
|
2038
2007
|
entity: r,
|
|
2039
2008
|
mutationFn: i,
|
|
2040
2009
|
onError: n,
|
|
2041
2010
|
onSuccess: c,
|
|
2042
|
-
onSuccessMessage:
|
|
2043
|
-
} = e,
|
|
2011
|
+
onSuccessMessage: a = s("_pages:common.actions.export.successMessage")
|
|
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
|
-
|
|
2051
|
-
message:
|
|
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({
|
|
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 Nr(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 on = () => {
|
|
2043
|
+
const { t: e } = D(), t = Nr(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
|
+
}, kr = (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,30 +2073,30 @@ const un = () => {
|
|
|
2104
2073
|
}
|
|
2105
2074
|
) })
|
|
2106
2075
|
] });
|
|
2107
|
-
},
|
|
2076
|
+
}, an = Pt(function(e, t) {
|
|
2108
2077
|
const {
|
|
2109
2078
|
value: s,
|
|
2110
2079
|
onChange: r,
|
|
2111
2080
|
state: i = bs.default,
|
|
2112
2081
|
name: n = "",
|
|
2113
2082
|
id: c = "",
|
|
2114
|
-
label:
|
|
2115
|
-
disabled:
|
|
2116
|
-
required:
|
|
2083
|
+
label: a = "",
|
|
2084
|
+
disabled: m = !1,
|
|
2085
|
+
required: h = !1,
|
|
2117
2086
|
placeholder: d = "",
|
|
2118
2087
|
containerClassName: g = "",
|
|
2119
2088
|
inputClassName: f = "",
|
|
2120
2089
|
labelClassName: x = "",
|
|
2121
|
-
helperText:
|
|
2122
|
-
helperTextClassName:
|
|
2090
|
+
helperText: C = "",
|
|
2091
|
+
helperTextClassName: S = "",
|
|
2123
2092
|
...q
|
|
2124
2093
|
} = e;
|
|
2125
|
-
return /* @__PURE__ */
|
|
2094
|
+
return /* @__PURE__ */ A(
|
|
2126
2095
|
"div",
|
|
2127
2096
|
{
|
|
2128
2097
|
className: `relative z-0 w-full mb-5 group ${g}`,
|
|
2129
2098
|
children: [
|
|
2130
|
-
/* @__PURE__ */
|
|
2099
|
+
/* @__PURE__ */ y(
|
|
2131
2100
|
"textarea",
|
|
2132
2101
|
{
|
|
2133
2102
|
ref: t,
|
|
@@ -2135,47 +2104,47 @@ const un = () => {
|
|
|
2135
2104
|
id: c,
|
|
2136
2105
|
className: `text-input text-area ${ps(i)} ${f} peer`,
|
|
2137
2106
|
placeholder: "",
|
|
2138
|
-
required:
|
|
2107
|
+
required: h,
|
|
2139
2108
|
value: s,
|
|
2140
2109
|
onChange: r,
|
|
2141
|
-
disabled:
|
|
2110
|
+
disabled: m,
|
|
2142
2111
|
...q
|
|
2143
2112
|
}
|
|
2144
2113
|
),
|
|
2145
|
-
/* @__PURE__ */
|
|
2114
|
+
/* @__PURE__ */ A(
|
|
2146
2115
|
"label",
|
|
2147
2116
|
{
|
|
2148
2117
|
htmlFor: n,
|
|
2149
2118
|
className: `text-input-label ${ws(i)} ${x}`,
|
|
2150
2119
|
children: [
|
|
2151
|
-
|
|
2152
|
-
|
|
2120
|
+
a,
|
|
2121
|
+
h ? " *" : ""
|
|
2153
2122
|
]
|
|
2154
2123
|
}
|
|
2155
2124
|
),
|
|
2156
|
-
/* @__PURE__ */
|
|
2125
|
+
/* @__PURE__ */ y(
|
|
2157
2126
|
"p",
|
|
2158
2127
|
{
|
|
2159
|
-
className: `text-input-helper-text ${vs(i)} ${
|
|
2160
|
-
children: i !== "error" && i !== "good" ? d :
|
|
2128
|
+
className: `text-input-helper-text ${vs(i)} ${S}`,
|
|
2129
|
+
children: i !== "error" && i !== "good" ? d : C
|
|
2161
2130
|
}
|
|
2162
2131
|
)
|
|
2163
2132
|
]
|
|
2164
2133
|
}
|
|
2165
2134
|
);
|
|
2166
|
-
}),
|
|
2167
|
-
const { t } =
|
|
2135
|
+
}), cn = (e) => {
|
|
2136
|
+
const { t } = D(), {
|
|
2168
2137
|
children: s,
|
|
2169
2138
|
handleSubmit: r,
|
|
2170
2139
|
onSubmit: i,
|
|
2171
2140
|
isLoading: n = !1,
|
|
2172
2141
|
buttonEnd: c = !0,
|
|
2173
|
-
reset:
|
|
2142
|
+
reset: a
|
|
2174
2143
|
} = e;
|
|
2175
|
-
return /* @__PURE__ */
|
|
2144
|
+
return /* @__PURE__ */ A("form", { className: "form-container", onSubmit: r(i), children: [
|
|
2176
2145
|
s,
|
|
2177
|
-
/* @__PURE__ */
|
|
2178
|
-
/* @__PURE__ */
|
|
2146
|
+
/* @__PURE__ */ A("div", { className: `flex gap-2 mt-5 ${c ? "justify-end" : ""}`, children: [
|
|
2147
|
+
/* @__PURE__ */ A(
|
|
2179
2148
|
pe,
|
|
2180
2149
|
{
|
|
2181
2150
|
type: "submit",
|
|
@@ -2185,17 +2154,17 @@ const un = () => {
|
|
|
2185
2154
|
name: t("_accessibility:buttons.submit"),
|
|
2186
2155
|
"aria-label": t("_accessibility:ariaLabels.submit"),
|
|
2187
2156
|
children: [
|
|
2188
|
-
n ? /* @__PURE__ */
|
|
2157
|
+
n ? /* @__PURE__ */ y(qe, { color: "text-dark", className: "mt-1" }) : null,
|
|
2189
2158
|
t("_accessibility:buttons.submit")
|
|
2190
2159
|
]
|
|
2191
2160
|
}
|
|
2192
2161
|
),
|
|
2193
|
-
/* @__PURE__ */
|
|
2162
|
+
/* @__PURE__ */ y(
|
|
2194
2163
|
pe,
|
|
2195
2164
|
{
|
|
2196
2165
|
type: "button",
|
|
2197
2166
|
variant: "outlined",
|
|
2198
|
-
onClick: () =>
|
|
2167
|
+
onClick: () => a == null ? void 0 : a(),
|
|
2199
2168
|
name: t("_accessibility:buttons.cancel"),
|
|
2200
2169
|
"aria-label": t("_accessibility:ariaLabels.cancel"),
|
|
2201
2170
|
children: t("_accessibility:buttons.cancel")
|
|
@@ -2203,75 +2172,75 @@ const un = () => {
|
|
|
2203
2172
|
)
|
|
2204
2173
|
] })
|
|
2205
2174
|
] });
|
|
2206
|
-
},
|
|
2207
|
-
const [s, r] =
|
|
2208
|
-
return /* @__PURE__ */
|
|
2209
|
-
|
|
2175
|
+
}, ln = Pt(function(e, t) {
|
|
2176
|
+
const [s, r] = X(!1);
|
|
2177
|
+
return /* @__PURE__ */ y(xs, { ...e, type: s ? "text" : "password", ref: t, children: /* @__PURE__ */ y(
|
|
2178
|
+
he,
|
|
2210
2179
|
{
|
|
2211
2180
|
type: "button",
|
|
2212
2181
|
tabIndex: -1,
|
|
2213
2182
|
className: "absolute right-2 password-icon",
|
|
2214
2183
|
onClick: () => r(!s),
|
|
2215
|
-
icon: s ? Ts :
|
|
2184
|
+
icon: s ? Ts : Ls
|
|
2216
2185
|
}
|
|
2217
2186
|
) });
|
|
2218
|
-
}),
|
|
2219
|
-
const { t } =
|
|
2187
|
+
}), ot = (e) => {
|
|
2188
|
+
const { t } = D(), {
|
|
2220
2189
|
title: s,
|
|
2221
2190
|
children: r,
|
|
2222
2191
|
handleClose: i,
|
|
2223
2192
|
open: n = !1,
|
|
2224
2193
|
containerClassName: c = "",
|
|
2225
|
-
className:
|
|
2226
|
-
animationClass:
|
|
2227
|
-
} = e, [
|
|
2228
|
-
(
|
|
2229
|
-
|
|
2194
|
+
className: a = "",
|
|
2195
|
+
animationClass: m = "appear"
|
|
2196
|
+
} = e, [h, d] = X(window.innerWidth), g = $(
|
|
2197
|
+
(S) => {
|
|
2198
|
+
S.key === "Escape" && n && i();
|
|
2230
2199
|
},
|
|
2231
2200
|
[n, i]
|
|
2232
2201
|
);
|
|
2233
|
-
|
|
2202
|
+
te(() => (window.addEventListener("keydown", g), () => {
|
|
2234
2203
|
window.removeEventListener("keydown", g);
|
|
2235
2204
|
}), [g]);
|
|
2236
2205
|
const f = $(() => {
|
|
2237
2206
|
d(window.innerWidth);
|
|
2238
2207
|
}, []);
|
|
2239
|
-
|
|
2208
|
+
te(() => (window.addEventListener("resize", f), () => {
|
|
2240
2209
|
window.removeEventListener("resize", f);
|
|
2241
2210
|
}), [f]);
|
|
2242
|
-
const x = De(() =>
|
|
2243
|
-
(
|
|
2211
|
+
const x = De(() => Us({ width: `${h}px` }), [h]), C = $(
|
|
2212
|
+
(S) => {
|
|
2244
2213
|
var q;
|
|
2245
|
-
((q =
|
|
2214
|
+
((q = S == null ? void 0 : S.currentTarget) == null ? void 0 : q.getAttribute("name")) === t("_accessibility:buttons.closeDialog") && i();
|
|
2246
2215
|
},
|
|
2247
2216
|
[t, i]
|
|
2248
2217
|
);
|
|
2249
|
-
return
|
|
2250
|
-
const
|
|
2218
|
+
return te(() => {
|
|
2219
|
+
const S = (q) => {
|
|
2251
2220
|
q ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
|
|
2252
2221
|
};
|
|
2253
|
-
return
|
|
2254
|
-
|
|
2222
|
+
return S(n), () => {
|
|
2223
|
+
S(n);
|
|
2255
2224
|
};
|
|
2256
2225
|
}, [n]), Ut(
|
|
2257
|
-
/* @__PURE__ */
|
|
2226
|
+
/* @__PURE__ */ y(
|
|
2258
2227
|
"div",
|
|
2259
2228
|
{
|
|
2260
2229
|
"aria-label": t("_accessibility:ariaLabels.closeDialog"),
|
|
2261
2230
|
"aria-disabled": !n,
|
|
2262
|
-
onClick:
|
|
2263
|
-
className: `dialog-backdrop animated ${n ? `opened ${
|
|
2264
|
-
children: /* @__PURE__ */
|
|
2231
|
+
onClick: C,
|
|
2232
|
+
className: `dialog-backdrop animated ${n ? `opened ${m}` : "closed"} ${x} h-screen ${n ? "bg-base/20 backdrop-blur-xl" : "pointer-events-none"} ${c}`,
|
|
2233
|
+
children: /* @__PURE__ */ A(
|
|
2265
2234
|
"div",
|
|
2266
2235
|
{
|
|
2267
|
-
className: `dialog elevated animated ${n ? `opened ${
|
|
2236
|
+
className: `dialog elevated animated ${n ? `opened ${m}` : "closed"} ${a}`,
|
|
2268
2237
|
children: [
|
|
2269
|
-
/* @__PURE__ */
|
|
2270
|
-
/* @__PURE__ */
|
|
2271
|
-
/* @__PURE__ */
|
|
2272
|
-
|
|
2238
|
+
/* @__PURE__ */ A("div", { className: "dialog-header", children: [
|
|
2239
|
+
/* @__PURE__ */ y("h3", { className: "text-text text-xl", children: s }),
|
|
2240
|
+
/* @__PURE__ */ y(
|
|
2241
|
+
he,
|
|
2273
2242
|
{
|
|
2274
|
-
icon:
|
|
2243
|
+
icon: It,
|
|
2275
2244
|
disabled: !n,
|
|
2276
2245
|
"aria-disabled": !n,
|
|
2277
2246
|
onClick: i,
|
|
@@ -2289,7 +2258,7 @@ const un = () => {
|
|
|
2289
2258
|
),
|
|
2290
2259
|
document.body
|
|
2291
2260
|
);
|
|
2292
|
-
},
|
|
2261
|
+
}, at = (e) => {
|
|
2293
2262
|
const {
|
|
2294
2263
|
primaryText: t,
|
|
2295
2264
|
cancelText: s,
|
|
@@ -2297,38 +2266,38 @@ const un = () => {
|
|
|
2297
2266
|
onCancel: i,
|
|
2298
2267
|
isLoading: n = !1,
|
|
2299
2268
|
disabled: c = !1,
|
|
2300
|
-
primaryType:
|
|
2301
|
-
containerClassName:
|
|
2302
|
-
primaryClassName:
|
|
2269
|
+
primaryType: a = "button",
|
|
2270
|
+
containerClassName: m = "",
|
|
2271
|
+
primaryClassName: h = "",
|
|
2303
2272
|
alignEnd: d = !1,
|
|
2304
2273
|
primaryName: g,
|
|
2305
2274
|
primaryAriaLabel: f,
|
|
2306
2275
|
cancelName: x,
|
|
2307
|
-
cancelAriaLabel:
|
|
2276
|
+
cancelAriaLabel: C
|
|
2308
2277
|
} = e;
|
|
2309
|
-
return /* @__PURE__ */
|
|
2278
|
+
return /* @__PURE__ */ A(
|
|
2310
2279
|
"div",
|
|
2311
2280
|
{
|
|
2312
|
-
className: `flex gap-2 mt-2 ${d ? "justify-end" : ""} ${
|
|
2281
|
+
className: `flex gap-2 mt-2 ${d ? "justify-end" : ""} ${m}`,
|
|
2313
2282
|
children: [
|
|
2314
|
-
/* @__PURE__ */
|
|
2283
|
+
/* @__PURE__ */ A(
|
|
2315
2284
|
pe,
|
|
2316
2285
|
{
|
|
2317
|
-
type:
|
|
2286
|
+
type: a,
|
|
2318
2287
|
color: "primary",
|
|
2319
2288
|
variant: "submit",
|
|
2320
|
-
className:
|
|
2289
|
+
className: h,
|
|
2321
2290
|
disabled: c,
|
|
2322
|
-
onClick:
|
|
2291
|
+
onClick: a === "button" ? r : void 0,
|
|
2323
2292
|
name: g,
|
|
2324
2293
|
"aria-label": f,
|
|
2325
2294
|
children: [
|
|
2326
|
-
n ? /* @__PURE__ */
|
|
2295
|
+
n ? /* @__PURE__ */ y(qe, { color: "text-dark", className: "mt-1" }) : null,
|
|
2327
2296
|
t
|
|
2328
2297
|
]
|
|
2329
2298
|
}
|
|
2330
2299
|
),
|
|
2331
|
-
/* @__PURE__ */
|
|
2300
|
+
/* @__PURE__ */ y(
|
|
2332
2301
|
pe,
|
|
2333
2302
|
{
|
|
2334
2303
|
type: "button",
|
|
@@ -2336,27 +2305,27 @@ const un = () => {
|
|
|
2336
2305
|
disabled: c,
|
|
2337
2306
|
onClick: i,
|
|
2338
2307
|
name: x,
|
|
2339
|
-
"aria-label":
|
|
2308
|
+
"aria-label": C,
|
|
2340
2309
|
children: s
|
|
2341
2310
|
}
|
|
2342
2311
|
)
|
|
2343
2312
|
]
|
|
2344
2313
|
}
|
|
2345
2314
|
);
|
|
2346
|
-
},
|
|
2347
|
-
const { t } =
|
|
2315
|
+
}, un = (e) => {
|
|
2316
|
+
const { t } = D(), {
|
|
2348
2317
|
children: s,
|
|
2349
2318
|
handleSubmit: r,
|
|
2350
2319
|
onSubmit: i,
|
|
2351
2320
|
handleClose: n,
|
|
2352
2321
|
isLoading: c = !1,
|
|
2353
|
-
buttonEnd:
|
|
2354
|
-
...
|
|
2322
|
+
buttonEnd: a = !0,
|
|
2323
|
+
...m
|
|
2355
2324
|
} = e;
|
|
2356
|
-
return /* @__PURE__ */
|
|
2357
|
-
/* @__PURE__ */
|
|
2358
|
-
/* @__PURE__ */
|
|
2359
|
-
|
|
2325
|
+
return /* @__PURE__ */ y(ot, { ...m, handleClose: n, children: /* @__PURE__ */ A("form", { onSubmit: r(i), children: [
|
|
2326
|
+
/* @__PURE__ */ y("div", { className: "form-container", children: s }),
|
|
2327
|
+
/* @__PURE__ */ y(
|
|
2328
|
+
at,
|
|
2360
2329
|
{
|
|
2361
2330
|
primaryType: "submit",
|
|
2362
2331
|
primaryText: t("_accessibility:buttons.submit"),
|
|
@@ -2365,7 +2334,7 @@ const un = () => {
|
|
|
2365
2334
|
isLoading: c,
|
|
2366
2335
|
disabled: c,
|
|
2367
2336
|
primaryClassName: "!px-6",
|
|
2368
|
-
alignEnd:
|
|
2337
|
+
alignEnd: a,
|
|
2369
2338
|
primaryName: t("_accessibility:buttons.submit"),
|
|
2370
2339
|
primaryAriaLabel: t("_accessibility:ariaLabels.submit"),
|
|
2371
2340
|
cancelName: t("_accessibility:buttons.cancel"),
|
|
@@ -2373,18 +2342,18 @@ const un = () => {
|
|
|
2373
2342
|
}
|
|
2374
2343
|
)
|
|
2375
2344
|
] }) });
|
|
2376
|
-
},
|
|
2377
|
-
const { t } =
|
|
2345
|
+
}, dn = (e) => {
|
|
2346
|
+
const { t } = D(), {
|
|
2378
2347
|
children: s,
|
|
2379
2348
|
handleSubmit: r,
|
|
2380
2349
|
handleClose: i,
|
|
2381
2350
|
isLoading: n = !1,
|
|
2382
2351
|
...c
|
|
2383
2352
|
} = e;
|
|
2384
|
-
return /* @__PURE__ */
|
|
2353
|
+
return /* @__PURE__ */ A(ot, { ...c, handleClose: i, children: [
|
|
2385
2354
|
s,
|
|
2386
|
-
/* @__PURE__ */
|
|
2387
|
-
|
|
2355
|
+
/* @__PURE__ */ y(
|
|
2356
|
+
at,
|
|
2388
2357
|
{
|
|
2389
2358
|
primaryText: t("_accessibility:buttons.ok"),
|
|
2390
2359
|
cancelText: t("_accessibility:buttons.cancel"),
|
|
@@ -2401,24 +2370,18 @@ const un = () => {
|
|
|
2401
2370
|
}
|
|
2402
2371
|
)
|
|
2403
2372
|
] });
|
|
2404
|
-
},
|
|
2405
|
-
const { t } =
|
|
2373
|
+
}, fn = (e) => {
|
|
2374
|
+
const { t } = D(), {
|
|
2406
2375
|
children: s,
|
|
2407
2376
|
handleSubmit: r,
|
|
2408
2377
|
handleClose: i,
|
|
2409
2378
|
isLoading: n = !1,
|
|
2410
2379
|
...c
|
|
2411
2380
|
} = e;
|
|
2412
|
-
return /* @__PURE__ */
|
|
2413
|
-
/* @__PURE__ */ m(
|
|
2414
|
-
Cs,
|
|
2415
|
-
{
|
|
2416
|
-
label: t("_pages:common.actions.import.form.inputs.file.label")
|
|
2417
|
-
}
|
|
2418
|
-
),
|
|
2381
|
+
return /* @__PURE__ */ A(ot, { ...c, handleClose: i, children: [
|
|
2419
2382
|
s,
|
|
2420
|
-
/* @__PURE__ */
|
|
2421
|
-
|
|
2383
|
+
/* @__PURE__ */ y(
|
|
2384
|
+
at,
|
|
2422
2385
|
{
|
|
2423
2386
|
primaryText: t("_accessibility:buttons.ok"),
|
|
2424
2387
|
cancelText: t("_accessibility:buttons.cancel"),
|
|
@@ -2436,37 +2399,37 @@ const un = () => {
|
|
|
2436
2399
|
)
|
|
2437
2400
|
] });
|
|
2438
2401
|
};
|
|
2439
|
-
function
|
|
2440
|
-
const { t } =
|
|
2402
|
+
function mn(e) {
|
|
2403
|
+
const { t } = D(), { open: s, onClose: r, menuMap: i } = e, { account: n } = zt(), { linkComponent: c } = Qe(), a = c, m = De(() => i.filter((d) => {
|
|
2441
2404
|
const g = d.auth, f = !!(n != null && n.email);
|
|
2442
2405
|
return g == null || g && f || !g && !f;
|
|
2443
|
-
}), [n]),
|
|
2406
|
+
}), [n]), h = $(
|
|
2444
2407
|
(d) => {
|
|
2445
2408
|
d.key === "Escape" && s && r();
|
|
2446
2409
|
},
|
|
2447
2410
|
[r, s]
|
|
2448
2411
|
);
|
|
2449
|
-
return
|
|
2450
|
-
document.removeEventListener("keydown",
|
|
2451
|
-
}), [
|
|
2412
|
+
return te(() => (document.addEventListener("keydown", h), () => {
|
|
2413
|
+
document.removeEventListener("keydown", h);
|
|
2414
|
+
}), [h]), /* @__PURE__ */ y(
|
|
2452
2415
|
"div",
|
|
2453
2416
|
{
|
|
2454
2417
|
"aria-label": t("_accessibility:ariaLabels.closeMenu"),
|
|
2455
2418
|
"aria-disabled": !s,
|
|
2456
2419
|
className: `${s ? "opened" : "closed"} drawer-backdrop`,
|
|
2457
2420
|
onClick: () => r(),
|
|
2458
|
-
children: /* @__PURE__ */
|
|
2421
|
+
children: /* @__PURE__ */ A(
|
|
2459
2422
|
"aside",
|
|
2460
2423
|
{
|
|
2461
2424
|
className: `${s ? "opened" : "closed"} bg-base drawer animated`,
|
|
2462
2425
|
children: [
|
|
2463
|
-
/* @__PURE__ */
|
|
2464
|
-
/* @__PURE__ */
|
|
2426
|
+
/* @__PURE__ */ y("h2", { className: "text-xl text-text px-5 pb-5 font-bold poppins", children: t("_pages:home.appName") }),
|
|
2427
|
+
/* @__PURE__ */ y("ul", { className: "flex flex-col", children: m.map((d, g) => /* @__PURE__ */ y(
|
|
2465
2428
|
"li",
|
|
2466
2429
|
{
|
|
2467
2430
|
className: `w-full flex hover:bg-base-light ${d.path === location.pathname ? "bg-base-light" : ""} animated`,
|
|
2468
|
-
children: d.type !== "divider" &&
|
|
2469
|
-
|
|
2431
|
+
children: d.type !== "divider" && a ? /* @__PURE__ */ A(
|
|
2432
|
+
a,
|
|
2470
2433
|
{
|
|
2471
2434
|
"aria-disabled": !s,
|
|
2472
2435
|
to: d.path ?? `/${d.path}`,
|
|
@@ -2477,7 +2440,7 @@ function bn(e) {
|
|
|
2477
2440
|
t(`_pages:${d.page}.title`)
|
|
2478
2441
|
]
|
|
2479
2442
|
}
|
|
2480
|
-
) : /* @__PURE__ */
|
|
2443
|
+
) : /* @__PURE__ */ y("hr", { className: "border-border border-spacing-x-0.5 w-full" })
|
|
2481
2444
|
},
|
|
2482
2445
|
`${d.page ?? g}`
|
|
2483
2446
|
)) })
|
|
@@ -2487,35 +2450,35 @@ function bn(e) {
|
|
|
2487
2450
|
}
|
|
2488
2451
|
);
|
|
2489
2452
|
}
|
|
2490
|
-
function
|
|
2491
|
-
const { error: t } = e, { t: s } =
|
|
2492
|
-
return /* @__PURE__ */
|
|
2493
|
-
/* @__PURE__ */
|
|
2494
|
-
/* @__PURE__ */
|
|
2453
|
+
function hn(e) {
|
|
2454
|
+
const { error: t } = e, { t: s } = D();
|
|
2455
|
+
return /* @__PURE__ */ A("div", { className: "flex flex-col items-center justify-center pt-10 gap-5", children: [
|
|
2456
|
+
/* @__PURE__ */ y(ie, { icon: js, className: "text-red-300 text-4xl" }),
|
|
2457
|
+
/* @__PURE__ */ y("p", { className: "text-text text-center", children: (t == null ? void 0 : t.message) ?? s("_accessibility:errors.unknownError") })
|
|
2495
2458
|
] });
|
|
2496
2459
|
}
|
|
2497
|
-
const
|
|
2498
|
-
const { showBackButton: t, title: s, actions: r } = e, { t: i } =
|
|
2499
|
-
return /* @__PURE__ */
|
|
2500
|
-
/* @__PURE__ */
|
|
2501
|
-
t && /* @__PURE__ */
|
|
2502
|
-
|
|
2460
|
+
const Ar = (e) => {
|
|
2461
|
+
const { showBackButton: t, title: s, actions: r } = e, { t: i } = D(), { navigate: n } = Qe();
|
|
2462
|
+
return /* @__PURE__ */ A("div", { className: "page-header", children: [
|
|
2463
|
+
/* @__PURE__ */ A("div", { className: "flex gap-2 items-center justify-start", children: [
|
|
2464
|
+
t && /* @__PURE__ */ y(
|
|
2465
|
+
he,
|
|
2503
2466
|
{
|
|
2504
|
-
icon:
|
|
2467
|
+
icon: Ds,
|
|
2505
2468
|
onClick: () => n(-1),
|
|
2506
2469
|
name: i("_accessibility:buttons.back"),
|
|
2507
2470
|
"data-tooltip-id": "tooltip",
|
|
2508
2471
|
"data-tooltip-content": i("_accessibility:buttons.back")
|
|
2509
2472
|
}
|
|
2510
2473
|
),
|
|
2511
|
-
/* @__PURE__ */
|
|
2474
|
+
/* @__PURE__ */ y("h2", { className: "text-3xl font-bold", children: s })
|
|
2512
2475
|
] }),
|
|
2513
|
-
/* @__PURE__ */
|
|
2514
|
-
/* @__PURE__ */
|
|
2515
|
-
/* @__PURE__ */
|
|
2476
|
+
/* @__PURE__ */ A("div", { children: [
|
|
2477
|
+
/* @__PURE__ */ y(qt, { className: "max-xs:!hidden", actions: r ?? [] }),
|
|
2478
|
+
/* @__PURE__ */ y(kr, { className: "min-xs:hidden", actions: r ?? [] })
|
|
2516
2479
|
] })
|
|
2517
2480
|
] });
|
|
2518
|
-
},
|
|
2481
|
+
}, yn = (e) => {
|
|
2519
2482
|
const {
|
|
2520
2483
|
title: t,
|
|
2521
2484
|
children: s,
|
|
@@ -2523,61 +2486,61 @@ const Fr = (e) => {
|
|
|
2523
2486
|
filterOptions: i,
|
|
2524
2487
|
actions: n,
|
|
2525
2488
|
queryKey: c,
|
|
2526
|
-
isLoading:
|
|
2527
|
-
isAnimated:
|
|
2528
|
-
showBackButton:
|
|
2529
|
-
} = e, { t: d } =
|
|
2489
|
+
isLoading: a = !1,
|
|
2490
|
+
isAnimated: m = !0,
|
|
2491
|
+
showBackButton: h = !1
|
|
2492
|
+
} = e, { t: d } = D(), { countOfFilters: g } = _s(), f = De(() => {
|
|
2530
2493
|
const x = Array.isArray(n) ? [...n] : [];
|
|
2531
2494
|
if (c) {
|
|
2532
|
-
const
|
|
2495
|
+
const C = {
|
|
2533
2496
|
id: we.Refresh,
|
|
2534
|
-
onClick: () =>
|
|
2535
|
-
icon: /* @__PURE__ */
|
|
2497
|
+
onClick: () => Se.invalidateQueries({ queryKey: c }),
|
|
2498
|
+
icon: /* @__PURE__ */ y(ie, { icon: Mt }),
|
|
2536
2499
|
tooltip: d("_pages:common.actions.refresh.text")
|
|
2537
2500
|
};
|
|
2538
|
-
x.unshift(
|
|
2501
|
+
x.unshift(C);
|
|
2539
2502
|
}
|
|
2540
2503
|
if (r) {
|
|
2541
|
-
const
|
|
2504
|
+
const C = {
|
|
2542
2505
|
...r,
|
|
2543
2506
|
id: we.Add,
|
|
2544
|
-
icon: /* @__PURE__ */
|
|
2507
|
+
icon: /* @__PURE__ */ y(ie, { icon: bt })
|
|
2545
2508
|
};
|
|
2546
|
-
x.unshift(
|
|
2509
|
+
x.unshift(C);
|
|
2547
2510
|
}
|
|
2548
2511
|
if (i) {
|
|
2549
|
-
const
|
|
2512
|
+
const C = {
|
|
2550
2513
|
...i,
|
|
2551
2514
|
id: "filter",
|
|
2552
|
-
icon: /* @__PURE__ */
|
|
2553
|
-
children: /* @__PURE__ */
|
|
2554
|
-
|
|
2515
|
+
icon: /* @__PURE__ */ y(ie, { icon: Vs }),
|
|
2516
|
+
children: /* @__PURE__ */ y(
|
|
2517
|
+
Cs,
|
|
2555
2518
|
{
|
|
2556
2519
|
className: `${g > 0 ? "show" : "hide"} `,
|
|
2557
2520
|
count: g
|
|
2558
2521
|
}
|
|
2559
2522
|
)
|
|
2560
2523
|
};
|
|
2561
|
-
x.push(
|
|
2524
|
+
x.push(C);
|
|
2562
2525
|
}
|
|
2563
2526
|
return x;
|
|
2564
2527
|
}, [n, r, g, i, c, d]);
|
|
2565
|
-
return /* @__PURE__ */
|
|
2566
|
-
/* @__PURE__ */
|
|
2567
|
-
/* @__PURE__ */
|
|
2568
|
-
|
|
2528
|
+
return /* @__PURE__ */ A("main", { className: "", children: [
|
|
2529
|
+
/* @__PURE__ */ A("div", { className: "flex flex-col", children: [
|
|
2530
|
+
/* @__PURE__ */ y(
|
|
2531
|
+
Ar,
|
|
2569
2532
|
{
|
|
2570
|
-
showBackButton:
|
|
2533
|
+
showBackButton: h,
|
|
2571
2534
|
actions: f,
|
|
2572
2535
|
title: t
|
|
2573
2536
|
}
|
|
2574
2537
|
),
|
|
2575
|
-
/* @__PURE__ */
|
|
2538
|
+
/* @__PURE__ */ y("div", { className: `px-5 py-3 h-useConfigfull ${m ? "appear" : ""}`, children: a ? /* @__PURE__ */ y(qe, { className: "flex justify-center items-center h-50" }) : s })
|
|
2576
2539
|
] }),
|
|
2577
|
-
/* @__PURE__ */
|
|
2578
|
-
|
|
2540
|
+
/* @__PURE__ */ y(
|
|
2541
|
+
he,
|
|
2579
2542
|
{
|
|
2580
|
-
icon:
|
|
2543
|
+
icon: bt,
|
|
2581
2544
|
color: "primary",
|
|
2582
2545
|
variant: "submit",
|
|
2583
2546
|
onClick: () => {
|
|
@@ -2588,71 +2551,71 @@ const Fr = (e) => {
|
|
|
2588
2551
|
}
|
|
2589
2552
|
)
|
|
2590
2553
|
] });
|
|
2591
|
-
},
|
|
2592
|
-
const { t } =
|
|
2554
|
+
}, gn = (e) => {
|
|
2555
|
+
const { t } = D(), {
|
|
2593
2556
|
loading: s = !1,
|
|
2594
2557
|
emptyComponent: r = null,
|
|
2595
2558
|
emptyMessage: i = t("_accessibility:messages.empty"),
|
|
2596
2559
|
renderComponent: n,
|
|
2597
2560
|
data: c = []
|
|
2598
2561
|
} = e;
|
|
2599
|
-
return /* @__PURE__ */
|
|
2600
|
-
},
|
|
2601
|
-
const [e, t] =
|
|
2602
|
-
return
|
|
2562
|
+
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("p", { className: "text-center mt-5", children: i }) }) });
|
|
2563
|
+
}, Er = () => {
|
|
2564
|
+
const [e, t] = X(xt());
|
|
2565
|
+
return te(() => {
|
|
2603
2566
|
const s = setInterval(() => {
|
|
2604
|
-
t(
|
|
2567
|
+
t(xt());
|
|
2605
2568
|
}, 1e3);
|
|
2606
2569
|
return () => clearInterval(s);
|
|
2607
|
-
}, []), /* @__PURE__ */
|
|
2570
|
+
}, []), /* @__PURE__ */ y("p", { className: "capitalize max-xs:hidden", children: e });
|
|
2608
2571
|
};
|
|
2609
|
-
function
|
|
2610
|
-
const { t } =
|
|
2611
|
-
(
|
|
2572
|
+
function bn(e) {
|
|
2573
|
+
const { t } = D(), { openDrawer: s } = e, { searchComponent: r } = Qe(), [i, n] = X(!1), c = $((m) => {
|
|
2574
|
+
(Js() ? m.metaKey : m.ctrlKey) && m.shiftKey && m.key.toLowerCase() === "f" && (n(!0), m.preventDefault());
|
|
2612
2575
|
}, []);
|
|
2613
|
-
|
|
2576
|
+
te(() => (window.addEventListener("keydown", c), () => {
|
|
2614
2577
|
window.removeEventListener("keydown", c);
|
|
2615
2578
|
}), [c]);
|
|
2616
|
-
const
|
|
2617
|
-
return /* @__PURE__ */
|
|
2618
|
-
location.pathname !== "/" && !!
|
|
2619
|
-
|
|
2579
|
+
const a = r;
|
|
2580
|
+
return /* @__PURE__ */ A(Le, { children: [
|
|
2581
|
+
location.pathname !== "/" && !!a && /* @__PURE__ */ y(
|
|
2582
|
+
a,
|
|
2620
2583
|
{
|
|
2621
2584
|
open: i,
|
|
2622
2585
|
onClose: () => n(!1)
|
|
2623
2586
|
}
|
|
2624
2587
|
),
|
|
2625
|
-
/* @__PURE__ */
|
|
2626
|
-
/* @__PURE__ */
|
|
2627
|
-
/* @__PURE__ */
|
|
2628
|
-
|
|
2588
|
+
/* @__PURE__ */ A("header", { id: "header", className: "header", children: [
|
|
2589
|
+
/* @__PURE__ */ A("div", { className: "flex gap-2 items-center", children: [
|
|
2590
|
+
/* @__PURE__ */ y(
|
|
2591
|
+
he,
|
|
2629
2592
|
{
|
|
2630
2593
|
type: "button",
|
|
2631
|
-
icon:
|
|
2594
|
+
icon: Ps,
|
|
2632
2595
|
onClick: s,
|
|
2633
2596
|
name: t("_accessibility:buttons.openMenu"),
|
|
2634
2597
|
"aria-label": t("_accessibility:ariaLabels.openMenu"),
|
|
2635
2598
|
className: "menu animated"
|
|
2636
2599
|
}
|
|
2637
2600
|
),
|
|
2638
|
-
/* @__PURE__ */
|
|
2601
|
+
/* @__PURE__ */ y("h1", { className: "text-lg text-text pointer-events-none poppins font-bold", children: t("_pages:home.appName") })
|
|
2639
2602
|
] }),
|
|
2640
|
-
/* @__PURE__ */
|
|
2641
|
-
/* @__PURE__ */
|
|
2642
|
-
|
|
2603
|
+
/* @__PURE__ */ A("div", { className: "flex items-center justify-end gap-2", children: [
|
|
2604
|
+
/* @__PURE__ */ y(
|
|
2605
|
+
he,
|
|
2643
2606
|
{
|
|
2644
|
-
icon:
|
|
2607
|
+
icon: Ms,
|
|
2645
2608
|
className: "min-xs:!hidden",
|
|
2646
2609
|
onClick: () => n(!0)
|
|
2647
2610
|
}
|
|
2648
2611
|
),
|
|
2649
|
-
/* @__PURE__ */
|
|
2612
|
+
/* @__PURE__ */ y(Er, {})
|
|
2650
2613
|
] })
|
|
2651
2614
|
] })
|
|
2652
2615
|
] });
|
|
2653
2616
|
}
|
|
2654
|
-
function
|
|
2655
|
-
const { t: e } =
|
|
2617
|
+
function pn() {
|
|
2618
|
+
const { t: e } = D(), { notification: t, removeNotification: s } = Ne(), [r, i] = X(/* @__PURE__ */ new Set()), n = $(
|
|
2656
2619
|
(d) => {
|
|
2657
2620
|
if (d === void 0) {
|
|
2658
2621
|
const g = new Set(t.map((f, x) => x));
|
|
@@ -2664,11 +2627,11 @@ function Cn() {
|
|
|
2664
2627
|
), c = $((d) => {
|
|
2665
2628
|
switch (d) {
|
|
2666
2629
|
case j.error:
|
|
2667
|
-
return
|
|
2630
|
+
return Is;
|
|
2668
2631
|
default:
|
|
2669
2632
|
return Os;
|
|
2670
2633
|
}
|
|
2671
|
-
}, []),
|
|
2634
|
+
}, []), a = $((d) => {
|
|
2672
2635
|
switch (d) {
|
|
2673
2636
|
case j.success:
|
|
2674
2637
|
return "!text-success";
|
|
@@ -2679,7 +2642,7 @@ function Cn() {
|
|
|
2679
2642
|
default:
|
|
2680
2643
|
return "!text-info";
|
|
2681
2644
|
}
|
|
2682
|
-
}, []),
|
|
2645
|
+
}, []), m = $((d) => {
|
|
2683
2646
|
switch (d) {
|
|
2684
2647
|
case j.success:
|
|
2685
2648
|
return "bg-bg-success";
|
|
@@ -2690,62 +2653,62 @@ function Cn() {
|
|
|
2690
2653
|
default:
|
|
2691
2654
|
return "bg-bg-info";
|
|
2692
2655
|
}
|
|
2693
|
-
}, []),
|
|
2694
|
-
return
|
|
2695
|
-
|
|
2696
|
-
}, [n]),
|
|
2656
|
+
}, []), h = Vt();
|
|
2657
|
+
return te(() => {
|
|
2658
|
+
h.current = () => n();
|
|
2659
|
+
}, [n]), te(() => {
|
|
2697
2660
|
if (!(t != null && t.length)) return;
|
|
2698
2661
|
const d = (g) => {
|
|
2699
2662
|
var f;
|
|
2700
|
-
return (f =
|
|
2663
|
+
return (f = h.current) == null ? void 0 : f.call(h, g);
|
|
2701
2664
|
};
|
|
2702
2665
|
return window.addEventListener("click", d), () => {
|
|
2703
2666
|
window.removeEventListener("click", d);
|
|
2704
2667
|
};
|
|
2705
|
-
}, [t == null ? void 0 : t.length]),
|
|
2668
|
+
}, [t == null ? void 0 : t.length]), te(() => {
|
|
2706
2669
|
i(/* @__PURE__ */ new Set());
|
|
2707
2670
|
}, [t]), Ut(
|
|
2708
|
-
/* @__PURE__ */
|
|
2671
|
+
/* @__PURE__ */ y(
|
|
2709
2672
|
"div",
|
|
2710
2673
|
{
|
|
2711
2674
|
className: `notification-portal ${t != null && t.length ? "w-screen h-screen" : ""}`,
|
|
2712
|
-
children: t != null && t.length ? t == null ? void 0 : t.map(({ id: d, type: g, message: f }, x) => /* @__PURE__ */
|
|
2675
|
+
children: t != null && t.length ? t == null ? void 0 : t.map(({ id: d, type: g, message: f }, x) => /* @__PURE__ */ A(
|
|
2713
2676
|
"div",
|
|
2714
2677
|
{
|
|
2715
|
-
className: `notification ${r.has(x) ? "closing" : ""} ${
|
|
2678
|
+
className: `notification ${r.has(x) ? "closing" : ""} ${m(
|
|
2716
2679
|
g ?? j.error
|
|
2717
2680
|
)}`,
|
|
2718
|
-
onClick: (
|
|
2681
|
+
onClick: (C) => C.stopPropagation(),
|
|
2719
2682
|
children: [
|
|
2720
|
-
/* @__PURE__ */
|
|
2721
|
-
/* @__PURE__ */
|
|
2722
|
-
|
|
2683
|
+
/* @__PURE__ */ A("div", { className: "flex gap-3 items-center", children: [
|
|
2684
|
+
/* @__PURE__ */ y(
|
|
2685
|
+
ie,
|
|
2723
2686
|
{
|
|
2724
2687
|
icon: c(g ?? j.error),
|
|
2725
|
-
className: `${
|
|
2688
|
+
className: `${a(g ?? j.error)}`
|
|
2726
2689
|
}
|
|
2727
2690
|
),
|
|
2728
|
-
/* @__PURE__ */
|
|
2691
|
+
/* @__PURE__ */ y(
|
|
2729
2692
|
"p",
|
|
2730
2693
|
{
|
|
2731
|
-
className: `whitespace-nowrap ${
|
|
2694
|
+
className: `whitespace-nowrap ${a(
|
|
2732
2695
|
g ?? j.error
|
|
2733
2696
|
)}`,
|
|
2734
2697
|
children: f
|
|
2735
2698
|
}
|
|
2736
2699
|
)
|
|
2737
2700
|
] }),
|
|
2738
|
-
/* @__PURE__ */
|
|
2739
|
-
|
|
2701
|
+
/* @__PURE__ */ y(
|
|
2702
|
+
he,
|
|
2740
2703
|
{
|
|
2741
2704
|
type: "button",
|
|
2742
|
-
icon:
|
|
2705
|
+
icon: It,
|
|
2743
2706
|
color: "error",
|
|
2744
2707
|
className: "group",
|
|
2745
|
-
onClick: (
|
|
2746
|
-
|
|
2708
|
+
onClick: (C) => {
|
|
2709
|
+
C.stopPropagation(), n(x);
|
|
2747
2710
|
},
|
|
2748
|
-
iconClassName: `${
|
|
2711
|
+
iconClassName: `${a(
|
|
2749
2712
|
g ?? j.error
|
|
2750
2713
|
)} group-hover:!text-red-400 cursor-pointer`,
|
|
2751
2714
|
name: e("_accessibility:buttons.closeNotification"),
|
|
@@ -2761,27 +2724,12 @@ function Cn() {
|
|
|
2761
2724
|
document.body
|
|
2762
2725
|
);
|
|
2763
2726
|
}
|
|
2764
|
-
function
|
|
2765
|
-
|
|
2766
|
-
color: t = "text-primary",
|
|
2767
|
-
size: s = "text-xl",
|
|
2768
|
-
className: r = "",
|
|
2769
|
-
containerClassName: i = ""
|
|
2770
|
-
} = e;
|
|
2771
|
-
return /* @__PURE__ */ m("div", { className: i, children: /* @__PURE__ */ m(
|
|
2772
|
-
X,
|
|
2773
|
-
{
|
|
2774
|
-
className: `rotate ${t} ${s} ${r}`,
|
|
2775
|
-
icon: tt
|
|
2776
|
-
}
|
|
2777
|
-
) });
|
|
2778
|
-
}
|
|
2779
|
-
function _n() {
|
|
2780
|
-
return /* @__PURE__ */ m("div", { className: "w-screen h-screen flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ m(Ss, { className: "blur-appear" }) });
|
|
2727
|
+
function wn() {
|
|
2728
|
+
return /* @__PURE__ */ y("div", { className: "w-screen h-screen flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ y(qe, { className: "blur-appear" }) });
|
|
2781
2729
|
}
|
|
2782
|
-
const
|
|
2783
|
-
const { id: t, active: s, onClick: r, children: i, to: n } = e, { linkComponent: c } =
|
|
2784
|
-
return /* @__PURE__ */
|
|
2730
|
+
const $r = (e) => {
|
|
2731
|
+
const { id: t, active: s, onClick: r, children: i, to: n } = e, { linkComponent: c } = Qe();
|
|
2732
|
+
return /* @__PURE__ */ y(
|
|
2785
2733
|
c,
|
|
2786
2734
|
{
|
|
2787
2735
|
to: n ?? `#${t}`,
|
|
@@ -2790,50 +2738,50 @@ const Tr = (e) => {
|
|
|
2790
2738
|
children: i
|
|
2791
2739
|
}
|
|
2792
2740
|
);
|
|
2793
|
-
},
|
|
2794
|
-
var
|
|
2741
|
+
}, Fr = (e) => {
|
|
2742
|
+
var m;
|
|
2795
2743
|
const {
|
|
2796
2744
|
tabs: t = [],
|
|
2797
2745
|
defaultTab: s,
|
|
2798
2746
|
className: r = "",
|
|
2799
2747
|
tabsContainerClassName: i = ""
|
|
2800
|
-
} = e, [n, c] =
|
|
2801
|
-
return
|
|
2748
|
+
} = e, [n, c] = X((m = t[0]) == null ? void 0 : m.id), a = De(() => t.find((h) => h.id === n), [t, n]);
|
|
2749
|
+
return te(() => {
|
|
2802
2750
|
s && c(s);
|
|
2803
|
-
}, [s]), /* @__PURE__ */
|
|
2804
|
-
/* @__PURE__ */
|
|
2751
|
+
}, [s]), /* @__PURE__ */ A("div", { className: `tabs-layout-main ${r}`, children: [
|
|
2752
|
+
/* @__PURE__ */ y(
|
|
2805
2753
|
"ul",
|
|
2806
2754
|
{
|
|
2807
2755
|
className: `horizontal tabs tabs-container ${i}`,
|
|
2808
|
-
children: t.map(({ id:
|
|
2809
|
-
|
|
2756
|
+
children: t.map(({ id: h, to: d, label: g }) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ y(
|
|
2757
|
+
$r,
|
|
2810
2758
|
{
|
|
2811
|
-
onClick: () => c(
|
|
2812
|
-
id:
|
|
2759
|
+
onClick: () => c(h),
|
|
2760
|
+
id: h,
|
|
2813
2761
|
to: d ?? "",
|
|
2814
2762
|
siblings: t.length > 1,
|
|
2815
|
-
active: n ===
|
|
2763
|
+
active: n === h,
|
|
2816
2764
|
children: g
|
|
2817
2765
|
}
|
|
2818
|
-
) },
|
|
2766
|
+
) }, h))
|
|
2819
2767
|
}
|
|
2820
2768
|
),
|
|
2821
|
-
|
|
2769
|
+
a == null ? void 0 : a.content
|
|
2822
2770
|
] });
|
|
2823
|
-
},
|
|
2771
|
+
}, Tr = (e) => {
|
|
2824
2772
|
const {
|
|
2825
2773
|
translation: t,
|
|
2826
2774
|
onClickNext: s,
|
|
2827
2775
|
image: r = "",
|
|
2828
2776
|
alt: i = "",
|
|
2829
2777
|
final: n = !1
|
|
2830
|
-
} = e, { setGuestMode: c } = zt(), { t:
|
|
2831
|
-
return /* @__PURE__ */
|
|
2832
|
-
/* @__PURE__ */
|
|
2833
|
-
/* @__PURE__ */
|
|
2834
|
-
/* @__PURE__ */
|
|
2835
|
-
/* @__PURE__ */
|
|
2836
|
-
/* @__PURE__ */
|
|
2778
|
+
} = e, { setGuestMode: c } = zt(), { t: a } = D();
|
|
2779
|
+
return /* @__PURE__ */ A("div", { className: "big-appear w-md flex flex-col gap-20", children: [
|
|
2780
|
+
/* @__PURE__ */ y("img", { src: r, alt: i }),
|
|
2781
|
+
/* @__PURE__ */ y("h2", { className: "text-5xl text-center leading-16", children: a(`_pages:onboarding.${t}.title`) }),
|
|
2782
|
+
/* @__PURE__ */ y("p", { className: "text-center !text-lg", children: a(`_pages:onboarding.${t}.body`) }),
|
|
2783
|
+
/* @__PURE__ */ y("div", { className: "flex gap-5 items-center justify-center", children: n ? /* @__PURE__ */ A(Le, { children: [
|
|
2784
|
+
/* @__PURE__ */ y(
|
|
2837
2785
|
pe,
|
|
2838
2786
|
{
|
|
2839
2787
|
color: "primary",
|
|
@@ -2842,52 +2790,52 @@ const Tr = (e) => {
|
|
|
2842
2790
|
onClick: () => {
|
|
2843
2791
|
c(!0), window.location.href = "/";
|
|
2844
2792
|
},
|
|
2845
|
-
"aria-label":
|
|
2846
|
-
children:
|
|
2793
|
+
"aria-label": a("_accessibility:ariaLabels.start"),
|
|
2794
|
+
children: a("_accessibility:buttons.startAsGuest")
|
|
2847
2795
|
}
|
|
2848
2796
|
),
|
|
2849
|
-
/* @__PURE__ */
|
|
2797
|
+
/* @__PURE__ */ y(
|
|
2850
2798
|
pe,
|
|
2851
2799
|
{
|
|
2852
2800
|
color: "primary",
|
|
2853
2801
|
variant: "submit",
|
|
2854
2802
|
className: "!px-8",
|
|
2855
|
-
"aria-label":
|
|
2803
|
+
"aria-label": a("_accessibility:ariaLabels.start"),
|
|
2856
2804
|
onClick: () => window.location.href = "/auth/sign-in",
|
|
2857
|
-
children:
|
|
2805
|
+
children: a("_accessibility:buttons.signIn")
|
|
2858
2806
|
}
|
|
2859
2807
|
)
|
|
2860
|
-
] }) : /* @__PURE__ */
|
|
2861
|
-
/* @__PURE__ */
|
|
2808
|
+
] }) : /* @__PURE__ */ A(Le, { children: [
|
|
2809
|
+
/* @__PURE__ */ y(
|
|
2862
2810
|
pe,
|
|
2863
2811
|
{
|
|
2864
2812
|
color: "primary",
|
|
2865
2813
|
className: "!px-8",
|
|
2866
2814
|
variant: "outlined",
|
|
2867
2815
|
onClick: () => window.location.href = "/auth/sign-in",
|
|
2868
|
-
"aria-label":
|
|
2869
|
-
children:
|
|
2816
|
+
"aria-label": a("_accessibility:ariaLabels.skip"),
|
|
2817
|
+
children: a("_accessibility:buttons.skip")
|
|
2870
2818
|
}
|
|
2871
2819
|
),
|
|
2872
|
-
/* @__PURE__ */
|
|
2820
|
+
/* @__PURE__ */ y(
|
|
2873
2821
|
pe,
|
|
2874
2822
|
{
|
|
2875
2823
|
color: "primary",
|
|
2876
2824
|
className: "!px-8",
|
|
2877
2825
|
variant: "outlined",
|
|
2878
2826
|
onClick: () => s(),
|
|
2879
|
-
"aria-label":
|
|
2880
|
-
children:
|
|
2827
|
+
"aria-label": a("_accessibility:ariaLabels.next"),
|
|
2828
|
+
children: a("_accessibility:buttons.next")
|
|
2881
2829
|
}
|
|
2882
2830
|
)
|
|
2883
2831
|
] }) })
|
|
2884
2832
|
] });
|
|
2885
|
-
},
|
|
2886
|
-
const { steps: t } = e, [s, r] =
|
|
2833
|
+
}, vn = (e) => {
|
|
2834
|
+
const { steps: t } = e, [s, r] = X(1), i = De(() => t.map((n, c) => ({
|
|
2887
2835
|
id: c + 1,
|
|
2888
2836
|
label: "",
|
|
2889
|
-
content: /* @__PURE__ */
|
|
2890
|
-
|
|
2837
|
+
content: /* @__PURE__ */ y(
|
|
2838
|
+
Tr,
|
|
2891
2839
|
{
|
|
2892
2840
|
translation: n,
|
|
2893
2841
|
final: c === t.length - 1,
|
|
@@ -2895,90 +2843,87 @@ const Tr = (e) => {
|
|
|
2895
2843
|
}
|
|
2896
2844
|
)
|
|
2897
2845
|
})), [s]);
|
|
2898
|
-
return /* @__PURE__ */
|
|
2899
|
-
},
|
|
2846
|
+
return /* @__PURE__ */ y("div", { className: "onboarding-main", children: /* @__PURE__ */ y(Fr, { defaultTab: s, tabs: i }) });
|
|
2847
|
+
}, xn = (e) => {
|
|
2900
2848
|
const {
|
|
2901
2849
|
message: t,
|
|
2902
2850
|
messageProps: s = { className: "text-gray-400 text-balance text-center" },
|
|
2903
2851
|
action: r,
|
|
2904
2852
|
iconProps: i
|
|
2905
2853
|
} = e;
|
|
2906
|
-
return /* @__PURE__ */
|
|
2907
|
-
i && /* @__PURE__ */
|
|
2908
|
-
/* @__PURE__ */
|
|
2909
|
-
r && /* @__PURE__ */
|
|
2854
|
+
return /* @__PURE__ */ A("div", { className: "flex flex-col items-center justify-center gap-5 pt-5", children: [
|
|
2855
|
+
i && /* @__PURE__ */ y(ie, { ...i ?? {} }),
|
|
2856
|
+
/* @__PURE__ */ y("p", { ...s ?? {}, children: t }),
|
|
2857
|
+
r && /* @__PURE__ */ y(Rt, { showTooltips: !1, showText: !0, ...r })
|
|
2910
2858
|
] });
|
|
2911
2859
|
};
|
|
2912
2860
|
export {
|
|
2913
2861
|
jt as APIClient,
|
|
2914
2862
|
Rt as Action,
|
|
2915
2863
|
qt as Actions,
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2864
|
+
kr as ActionsDropdown,
|
|
2865
|
+
Gs as AuthClient,
|
|
2866
|
+
Yr as AuthProvider,
|
|
2867
|
+
Kr as BaseClient,
|
|
2920
2868
|
pe as Button,
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
fn as FormContainer,
|
|
2932
|
-
hn as FormDialog,
|
|
2869
|
+
Xr as ConfigProvider,
|
|
2870
|
+
dn as ConfirmationDialog,
|
|
2871
|
+
ot as Dialog,
|
|
2872
|
+
at as DialogActions,
|
|
2873
|
+
mn as Drawer,
|
|
2874
|
+
Hs as Dropdown,
|
|
2875
|
+
xn as Empty,
|
|
2876
|
+
hn as Error,
|
|
2877
|
+
cn as FormContainer,
|
|
2878
|
+
un as FormDialog,
|
|
2933
2879
|
we as GlobalActions,
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
en as ManagerProvider,
|
|
2880
|
+
Qr as IManager,
|
|
2881
|
+
he as IconButton,
|
|
2882
|
+
fn as ImportDialog,
|
|
2883
|
+
Jr as ManagerProvider,
|
|
2939
2884
|
Y as Methods,
|
|
2940
|
-
|
|
2941
|
-
|
|
2885
|
+
bn as Navbar,
|
|
2886
|
+
pn as Notification,
|
|
2942
2887
|
j as NotificationEnumType,
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2888
|
+
Gr as NotificationProvider,
|
|
2889
|
+
vn as Onboarding,
|
|
2890
|
+
yn as Page,
|
|
2891
|
+
an as ParagraphInput,
|
|
2892
|
+
ln as PasswordInput,
|
|
2893
|
+
gn as PrettyGrid,
|
|
2894
|
+
wn as SplashScreen,
|
|
2895
|
+
Tr as Step,
|
|
2896
|
+
$r as Tab,
|
|
2897
|
+
Fr as TabsLayout,
|
|
2898
|
+
on as ToTop,
|
|
2899
|
+
zs as buildQueryUrl,
|
|
2900
|
+
Wr as enumToKeyValueArray,
|
|
2901
|
+
zr as formatForDatetimeLocal,
|
|
2957
2902
|
Ht as fromLocal,
|
|
2958
|
-
|
|
2959
|
-
|
|
2903
|
+
xt as getFormattedDateTime,
|
|
2904
|
+
Js as isMac,
|
|
2960
2905
|
Ae as makeRequest,
|
|
2961
2906
|
Bt as parseQueries,
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2907
|
+
Se as queryClient,
|
|
2908
|
+
vt as removeFromLocal,
|
|
2909
|
+
wt as toLocal,
|
|
2965
2910
|
zt as useAuth,
|
|
2966
|
-
|
|
2911
|
+
Qe as useConfig,
|
|
2967
2912
|
Jt as useConfirmationForm,
|
|
2968
|
-
|
|
2969
|
-
|
|
2913
|
+
xr as useDeleteAction,
|
|
2914
|
+
en as useDeleteDialog,
|
|
2970
2915
|
is as useDialog,
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2916
|
+
Zr as useEditAction,
|
|
2917
|
+
Cr as useExportAction,
|
|
2918
|
+
nn as useExportActionMutate,
|
|
2919
|
+
tn as useFormDialog,
|
|
2920
|
+
Sr as useImportAction,
|
|
2921
|
+
rn as useImportDialog,
|
|
2922
|
+
Ys as useManager,
|
|
2923
|
+
Ne as useNotification,
|
|
2924
|
+
vr as usePostForm,
|
|
2925
|
+
_r as useRestoreAction,
|
|
2926
|
+
sn as useRestoreDialog,
|
|
2927
|
+
Nr as useScrollTrigger,
|
|
2928
|
+
Hr as useTimeAge
|
|
2984
2929
|
};
|