@levo-so/studio 0.3.15 → 0.3.17
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/{BillingStep-Cskl5Sbc.js → BillingStep-CG2IunE8.js} +1 -1
- package/{Button-D6OAkNtW.js → Button-D7XP602F.js} +1 -1
- package/{EntryCard-NCSYl-4A.js → EntryCard-DNTcImS3.js} +1 -1
- package/{LoginCard-BC05UxFH.js → LoginCard-BU32SHk6.js} +1 -1
- package/{PendingApprovalCard-B7sm8CZ_.js → PendingApprovalCard-ms57AZba.js} +1 -1
- package/{PhoneWidget-BkzFjfKW.js → PhoneWidget-BtMMfGLu.js} +5 -5
- package/{PopupBody-BI-MJqmd-C9i44N2h.js → PopupBody-BI-MJqmd-Ctaw71BK.js} +1 -1
- package/{PopupRenderer-D66Gx63H-dYKKhHdA.js → PopupRenderer-D66Gx63H-DDb2kf_-.js} +1 -1
- package/{ProfileCard-DM1Jspj_.js → ProfileCard-BZvtFlIF.js} +1 -1
- package/{bookingCard-CY0SAnVm.js → bookingCard-B2xt1njL.js} +2 -2
- package/collection.js +1 -1
- package/{dist-Dq-z9c3T.js → dist-E86OopnH.js} +987 -911
- package/index.js +5 -5
- package/package.json +4 -4
|
@@ -11,40 +11,40 @@ import { n as w, t as T } from "./inlineCollectionTheme-uhBXoF1F.js";
|
|
|
11
11
|
import { c as E } from "react/compiler-runtime";
|
|
12
12
|
import { errorHandler as D, errorToast as O, successToast as k, useLevo as A } from "@levo-so/react";
|
|
13
13
|
import * as j from "react";
|
|
14
|
-
import M, { Suspense as N, createContext as P, lazy as F, useCallback as I,
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import { FieldInterfaces as
|
|
14
|
+
import M, { Suspense as N, createContext as P, lazy as F, useCallback as I, useDeferredValue as L, useEffect as R, useMemo as z, useRef as B, useState as V } from "react";
|
|
15
|
+
import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
16
|
+
import { FieldInterfaces as G, LevoError as K, MediaKindList as q, defaultByKinds as J, getLevoError as Y, mediaMimetypeByKind as X, operatorsByKind as ee } from "@levo-so/core";
|
|
17
17
|
import Z from "clsx";
|
|
18
|
-
import
|
|
19
|
-
import { createRuntimeFn as
|
|
18
|
+
import te from "dayjs";
|
|
19
|
+
import { createRuntimeFn as ne } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
20
|
+
import { FormProvider as re, get as ie, useController as Q, useFieldArray as ae, useForm as oe, useFormContext as se, useWatch as ce } from "react-hook-form";
|
|
20
21
|
import "@theinternetfolks/snowflake";
|
|
21
22
|
import "react-phone-number-input";
|
|
22
23
|
import "yup";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { useDebouncedCallback as je } from "use-debounce";
|
|
24
|
+
import { Tabs as le } from "@base-ui/react/tabs";
|
|
25
|
+
import { IconArrowLeft as ue, IconCheck as de, IconChevronLeft as fe, IconChevronRight as pe, IconChevronsLeft as me, IconChevronsRight as he, IconFile as ge, IconHash as _e, IconMail as ve, IconPencil as ye, IconPlus as be, IconTrash as xe, IconUpload as Se, IconX as Ce } from "@tabler/icons-react";
|
|
26
|
+
import { Checkbox as we } from "@base-ui/react/checkbox";
|
|
27
|
+
import { NumericFormat as Te } from "react-number-format";
|
|
28
|
+
import Ee from "react-select";
|
|
29
|
+
import De from "react-select/async";
|
|
30
|
+
import { Radio as Oe } from "@base-ui/react/radio";
|
|
31
|
+
import { RadioGroup as ke } from "@base-ui/react/radio-group";
|
|
32
|
+
import { Switch as Ae } from "@base-ui/react/switch";
|
|
33
|
+
import { useDropzone as je } from "react-dropzone";
|
|
34
|
+
import { useDebouncedCallback as Me } from "use-debounce";
|
|
35
35
|
//#region \0rolldown/runtime.js
|
|
36
|
-
var
|
|
36
|
+
var Ne = Object.defineProperty, Pe = (e, t) => {
|
|
37
37
|
let n = {};
|
|
38
|
-
for (var r in e)
|
|
38
|
+
for (var r in e) Ne(n, r, {
|
|
39
39
|
get: e[r],
|
|
40
40
|
enumerable: !0
|
|
41
41
|
});
|
|
42
|
-
return t ||
|
|
43
|
-
},
|
|
42
|
+
return t || Ne(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
43
|
+
}, Fe = (e) => e.combinator !== void 0, Ie = (e) => e == null ? !0 : typeof e == "string" ? e === "" : Array.isArray(e) ? e.length === 0 : !1, Le = (e, t) => {
|
|
44
44
|
if (t == null) return t;
|
|
45
45
|
if (e === "date") {
|
|
46
46
|
if (t instanceof Date || typeof t == "string" || typeof t == "number") {
|
|
47
|
-
let e =
|
|
47
|
+
let e = te(t);
|
|
48
48
|
if (e.isValid()) return e.valueOf();
|
|
49
49
|
}
|
|
50
50
|
return NaN;
|
|
@@ -58,42 +58,42 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
58
58
|
return NaN;
|
|
59
59
|
}
|
|
60
60
|
return t;
|
|
61
|
-
},
|
|
62
|
-
if (
|
|
61
|
+
}, Re = (e, t) => e === "collection" && t && typeof t == "object" && !Array.isArray(t) && "_id" in t ? t._id : t, ze = (e, t, n) => Le(e, Re(e, t)) === Le(e, Re(e, n)), Be = (e, t) => e ? ee[e]?.includes(t) ?? !1 : !1, Ve = (e, t) => {
|
|
62
|
+
if (Fe(e)) {
|
|
63
63
|
e.conditions.forEach((e) => {
|
|
64
|
-
|
|
64
|
+
Ve(e, t);
|
|
65
65
|
});
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
t.add(e.source);
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
let
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
}, He = (e, t) => {
|
|
70
|
+
let { fieldByKey: n } = Xe(e), r = {};
|
|
71
|
+
for (let e of Ze(t)) {
|
|
72
|
+
let t = n.get(e);
|
|
73
|
+
t && (r[e] = t.kind);
|
|
74
|
+
}
|
|
75
75
|
return r;
|
|
76
|
-
},
|
|
77
|
-
if (
|
|
76
|
+
}, Ue = (e, t) => Fe(e) ? e.conditions.some((e) => Ue(e, t)) : t[e.source] === void 0, We = (e, t) => {
|
|
77
|
+
if (Fe(e)) {
|
|
78
78
|
for (let n of e.conditions) {
|
|
79
|
-
let e =
|
|
79
|
+
let e = We(n, t);
|
|
80
80
|
if (e) return e;
|
|
81
81
|
}
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
|
-
return
|
|
85
|
-
},
|
|
84
|
+
return Be(t[e.source], e.operator) ? null : e;
|
|
85
|
+
}, Ge = (e, t, n) => {
|
|
86
86
|
let r = n[e.source], i = t[e.source];
|
|
87
87
|
switch (e.operator) {
|
|
88
|
-
case "is_empty": return
|
|
89
|
-
case "is_not_empty": return !
|
|
90
|
-
case "equals": return
|
|
91
|
-
case "not": return !
|
|
88
|
+
case "is_empty": return Ie(i);
|
|
89
|
+
case "is_not_empty": return !Ie(i);
|
|
90
|
+
case "equals": return ze(r, i, e.value);
|
|
91
|
+
case "not": return !ze(r, i, e.value);
|
|
92
92
|
case "gt":
|
|
93
93
|
case "gte":
|
|
94
94
|
case "lt":
|
|
95
95
|
case "lte": {
|
|
96
|
-
let t =
|
|
96
|
+
let t = Le(r, i), n = Le(r, e.value);
|
|
97
97
|
if (typeof t != "number" || typeof n != "number" || Number.isNaN(t) || Number.isNaN(n)) return !1;
|
|
98
98
|
switch (e.operator) {
|
|
99
99
|
case "gt": return t > n;
|
|
@@ -107,7 +107,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
107
107
|
case "not_contains":
|
|
108
108
|
if (r === "array-string" || r === "array-number" || r === "collection") {
|
|
109
109
|
if (!Array.isArray(i)) return e.operator === "not_contains";
|
|
110
|
-
let t = i.some((t) =>
|
|
110
|
+
let t = i.some((t) => ze(r, t, e.value));
|
|
111
111
|
return e.operator === "contains" ? t : !t;
|
|
112
112
|
}
|
|
113
113
|
if (typeof i == "string" && typeof e.value == "string") {
|
|
@@ -128,29 +128,126 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
128
128
|
default: return !1;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
},
|
|
131
|
+
}, Ke = (e, t, n) => Fe(e) ? e.conditions.length === 0 ? !1 : e.combinator === "AND" ? e.conditions.every((e) => Ke(e, t, n)) : e.conditions.some((e) => Ke(e, t, n)) : Ge(e, t, n), qe = ({ logic: e, formValues: t, sourceKinds: n }) => {
|
|
132
132
|
if (!e?.length) return { visible: !0 };
|
|
133
133
|
let r = !e.some((e) => e.action === "show");
|
|
134
|
-
for (let { action: r, when: i } of e) if (r && !
|
|
134
|
+
for (let { action: r, when: i } of e) if (r && !Ue(i, n) && !We(i, n) && Ke(i, t, n)) return { visible: r === "show" };
|
|
135
135
|
return { visible: r };
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
136
|
+
}, Je = () => ({
|
|
137
|
+
active: /* @__PURE__ */ new Set(),
|
|
138
|
+
memo: /* @__PURE__ */ new Map(),
|
|
139
|
+
hitCycle: !1
|
|
140
|
+
}), Ye = /* @__PURE__ */ new WeakMap(), Xe = (e) => {
|
|
141
|
+
let t = Ye.get(e);
|
|
142
|
+
if (t) return t;
|
|
143
|
+
let n = {
|
|
144
|
+
fieldByKey: /* @__PURE__ */ new Map(),
|
|
145
|
+
sectionOfField: /* @__PURE__ */ new Map()
|
|
146
|
+
};
|
|
147
|
+
for (let t of e.sections ?? []) for (let e of t.fields ?? []) n.fieldByKey.set(e.key, e), n.sectionOfField.set(e.key, t);
|
|
148
|
+
return Ye.set(e, n), n;
|
|
149
|
+
}, Ze = (e) => {
|
|
150
|
+
let t = /* @__PURE__ */ new Set();
|
|
151
|
+
for (let n of e ?? []) Ve(n.when, t);
|
|
152
|
+
return t;
|
|
153
|
+
}, Qe = (e, t, n, r) => {
|
|
154
|
+
let { fieldByKey: i } = Xe(e), a = { ...n };
|
|
155
|
+
for (let o of Ze(t)) {
|
|
156
|
+
let t = i.get(o);
|
|
157
|
+
!t || t.hidden || tt(e, t, n, r) && (a[o] = void 0);
|
|
158
|
+
}
|
|
159
|
+
return a;
|
|
160
|
+
}, $e = (e, t, n, r) => {
|
|
161
|
+
let i = e.memo.get(t);
|
|
162
|
+
if (i !== void 0) return i;
|
|
163
|
+
if (e.active.has(t)) return e.hitCycle = !0, n;
|
|
164
|
+
let a = e.hitCycle;
|
|
165
|
+
e.hitCycle = !1, e.active.add(t);
|
|
166
|
+
try {
|
|
167
|
+
let n = r();
|
|
168
|
+
return e.hitCycle || e.memo.set(t, n), n;
|
|
169
|
+
} finally {
|
|
170
|
+
e.active.delete(t), e.hitCycle = e.hitCycle || a;
|
|
171
|
+
}
|
|
172
|
+
}, et = (e, t, n, r) => ot(e, t) || !t.logic?.length ? !0 : $e(r, `section:${t.id}`, !0, () => {
|
|
173
|
+
let i = He(e, t.logic), a = Qe(e, t.logic, n, r);
|
|
174
|
+
return qe({
|
|
141
175
|
logic: t.logic,
|
|
142
|
-
formValues:
|
|
143
|
-
sourceKinds:
|
|
176
|
+
formValues: a,
|
|
177
|
+
sourceKinds: i
|
|
144
178
|
}).visible;
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
return
|
|
179
|
+
}), tt = (e, t, n, r) => t.hidden ? !0 : $e(r, t.key, !1, () => {
|
|
180
|
+
let i = Xe(e).sectionOfField.get(t.key);
|
|
181
|
+
if (i && !et(e, i, n, r)) return !0;
|
|
182
|
+
if (!t.logic?.length) return !1;
|
|
183
|
+
let a = He(e, t.logic), o = Qe(e, t.logic, n, r);
|
|
184
|
+
return !qe({
|
|
149
185
|
logic: t.logic,
|
|
150
|
-
formValues:
|
|
151
|
-
sourceKinds:
|
|
186
|
+
formValues: o,
|
|
187
|
+
sourceKinds: a
|
|
152
188
|
}).visible;
|
|
153
|
-
},
|
|
189
|
+
}), nt = (e, t, n) => t.hidden ? !0 : e ? tt(e, t, n, Je()) : !1, rt = (e, t) => {
|
|
190
|
+
let { fieldByKey: n, sectionOfField: r } = Xe(e), i = /* @__PURE__ */ new Set(), a = (t) => {
|
|
191
|
+
for (let o of Ze(t)) {
|
|
192
|
+
if (i.has(o)) continue;
|
|
193
|
+
i.add(o);
|
|
194
|
+
let t = n.get(o);
|
|
195
|
+
if (!t) continue;
|
|
196
|
+
a(t.logic);
|
|
197
|
+
let s = r.get(o);
|
|
198
|
+
s && !ot(e, s) && a(s.logic);
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
return a(t), [...i];
|
|
202
|
+
}, it = (e, t) => {
|
|
203
|
+
let n = Xe(e).sectionOfField.get(t.key);
|
|
204
|
+
return [...new Set([...rt(e, t.logic), ...n ? at(e, n) : []])];
|
|
205
|
+
}, at = (e, t) => ot(e, t) ? [] : rt(e, t.logic), ot = (e, t) => e?.sections?.[0]?.id === t.id, st = (e, t, n) => {
|
|
206
|
+
let r = Je();
|
|
207
|
+
return t.some((t) => !!t.field_interface && !!t.key && !(e ? tt(e, t, n, r) : t.hidden));
|
|
208
|
+
}, ct = (e, t) => {
|
|
209
|
+
let n = E(6), r;
|
|
210
|
+
n[0] !== t || n[1] !== e ? (r = (n) => {
|
|
211
|
+
let r = n ?? [], i = {};
|
|
212
|
+
return e.forEach((e, t) => {
|
|
213
|
+
i[e] = r[t];
|
|
214
|
+
}), t(i);
|
|
215
|
+
}, n[0] = t, n[1] = e, n[2] = r) : r = n[2];
|
|
216
|
+
let i;
|
|
217
|
+
return n[3] !== e || n[4] !== r ? (i = {
|
|
218
|
+
name: e,
|
|
219
|
+
exact: !0,
|
|
220
|
+
compute: r
|
|
221
|
+
}, n[3] = e, n[4] = r, n[5] = i) : i = n[5], ce(i);
|
|
222
|
+
}, lt = (e, t) => {
|
|
223
|
+
let n = E(9), r;
|
|
224
|
+
n[0] !== t || n[1] !== e ? (r = e ? it(e, t) : [], n[0] = t, n[1] = e, n[2] = r) : r = n[2];
|
|
225
|
+
let i = r, a;
|
|
226
|
+
n[3] !== t || n[4] !== e ? (a = (n) => nt(e, t, n), n[3] = t, n[4] = e, n[5] = a) : a = n[5];
|
|
227
|
+
let o = L(ct(i, a)), s;
|
|
228
|
+
return n[6] !== o || n[7] !== t ? (s = {
|
|
229
|
+
...t,
|
|
230
|
+
hidden: o
|
|
231
|
+
}, n[6] = o, n[7] = t, n[8] = s) : s = n[8], s;
|
|
232
|
+
}, ut = (e, t) => {
|
|
233
|
+
let n = E(11), r;
|
|
234
|
+
bb0: {
|
|
235
|
+
if (!e) {
|
|
236
|
+
let e;
|
|
237
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = [], n[0] = e) : e = n[0], r = e;
|
|
238
|
+
break bb0;
|
|
239
|
+
}
|
|
240
|
+
let i;
|
|
241
|
+
if (n[1] !== e || n[2] !== t.fields) {
|
|
242
|
+
let r;
|
|
243
|
+
n[4] === e ? r = n[5] : (r = (t) => it(e, t), n[4] = e, n[5] = r), i = new Set((t.fields ?? []).flatMap(r)), n[1] = e, n[2] = t.fields, n[3] = i;
|
|
244
|
+
} else i = n[3];
|
|
245
|
+
let a;
|
|
246
|
+
n[6] === i ? a = n[7] : (a = [...i], n[6] = i, n[7] = a), r = a;
|
|
247
|
+
}
|
|
248
|
+
let i = r, a;
|
|
249
|
+
return n[8] !== e || n[9] !== t.fields ? (a = (n) => st(e, t.fields ?? [], n), n[8] = e, n[9] = t.fields, n[10] = a) : a = n[10], L(ct(i, a));
|
|
250
|
+
}, dt = (e) => Array.isArray(e) ? e.map((e) => {
|
|
154
251
|
if (e && typeof e == "object") {
|
|
155
252
|
let t = e.value ?? e.label ?? "";
|
|
156
253
|
return {
|
|
@@ -162,78 +259,41 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
162
259
|
value: String(e),
|
|
163
260
|
label: String(e)
|
|
164
261
|
};
|
|
165
|
-
}) : [],
|
|
262
|
+
}) : [], ft = (e) => dt(e).map((e) => e.value), pt = (e) => {
|
|
166
263
|
let t = {};
|
|
167
264
|
for (let n of e) {
|
|
168
265
|
if (n.kind === "collection") {
|
|
169
266
|
let e = n.options?.current_have_many_connected, r = n.options?.connected_have_many_current;
|
|
170
|
-
e && r ? t[n.key] =
|
|
171
|
-
} else t[n.key] =
|
|
172
|
-
n?.field_interface ===
|
|
267
|
+
e && r ? t[n.key] = J.collection.m2m : t[n.key] = J.collection.m2o;
|
|
268
|
+
} else t[n.key] = J?.[n?.kind];
|
|
269
|
+
n?.field_interface === G.RecordWidget && n?.fields?.length && (t[n.key] = pt(n.fields));
|
|
173
270
|
}
|
|
174
271
|
return t;
|
|
175
|
-
},
|
|
272
|
+
}, mt = (e) => e === void 0 ? null : e, ht = (e) => {
|
|
176
273
|
if (!e?.sections) return {};
|
|
177
274
|
let t = {};
|
|
178
275
|
for (let n of e.sections) {
|
|
179
|
-
let e =
|
|
276
|
+
let e = pt(n.fields ?? []);
|
|
180
277
|
for (let r of n.fields ?? []) {
|
|
181
|
-
let n =
|
|
182
|
-
if (n != null &&
|
|
183
|
-
let e =
|
|
278
|
+
let n = mt(r?.default_value);
|
|
279
|
+
if (n != null && gt(r)) {
|
|
280
|
+
let e = ft(r?.values);
|
|
184
281
|
Array.isArray(n) ? n = n.filter((t) => e.includes(t)) : typeof n == "string" && !e.includes(n) && (n = null);
|
|
185
282
|
}
|
|
186
283
|
t[r.key] = n ?? e[r.key];
|
|
187
284
|
}
|
|
188
285
|
}
|
|
189
286
|
return t;
|
|
190
|
-
},
|
|
287
|
+
}, gt = (e) => Array.isArray(e?.values) && e?.values?.length > 0 && !e?.options?.custom_input, _t = (e, t, n) => {
|
|
191
288
|
let r = n !== void 0;
|
|
192
289
|
if (!t) return {};
|
|
193
|
-
let i = (t?.sections ?? []).flatMap((
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
sectionHidden: i
|
|
198
|
-
}));
|
|
199
|
-
}), a = {};
|
|
200
|
-
for (let { field: o, sectionHidden: s } of i) {
|
|
201
|
-
let i = r && (s || qe(t, o, e)) ? n[o.key] : e?.[o.key];
|
|
202
|
-
o.field_interface === "CollectionWidget" ? i && typeof i == "object" ? a[o.key] = Array.isArray(i) ? i.map((e) => e && typeof e == "object" ? e._id : e).filter(Boolean) : i._id : typeof i == "string" && i ? a[o.key] = i : a[o.key] = Qe([o])[o.key] : a[o.key] = i;
|
|
290
|
+
let i = (t?.sections ?? []).flatMap((e) => e?.fields ?? []), a = {};
|
|
291
|
+
for (let o of i) {
|
|
292
|
+
let i = r && nt(t, o, e) ? n[o.key] : e?.[o.key];
|
|
293
|
+
o.field_interface === "CollectionWidget" ? i && typeof i == "object" ? a[o.key] = Array.isArray(i) ? i.map((e) => e && typeof e == "object" ? e._id : e).filter(Boolean) : i._id : typeof i == "string" && i ? a[o.key] = i : a[o.key] = pt([o])[o.key] : a[o.key] = i;
|
|
203
294
|
}
|
|
204
295
|
return a;
|
|
205
|
-
},
|
|
206
|
-
let { field_interface: t = "", key: n = "", hidden: r } = e;
|
|
207
|
-
return !t || !n || r;
|
|
208
|
-
}), it = (e, t) => {
|
|
209
|
-
let n = E(12), r;
|
|
210
|
-
n[0] !== t || n[1] !== e ? (r = e ? Ve(e, t) : {}, n[0] = t, n[1] = e, n[2] = r) : r = n[2];
|
|
211
|
-
let i = r, a;
|
|
212
|
-
n[3] === i ? a = n[4] : (a = Object.keys(i), n[3] = i, n[4] = a);
|
|
213
|
-
let o = a, s;
|
|
214
|
-
n[5] !== t || n[6] !== i || n[7] !== o ? (s = (e) => {
|
|
215
|
-
let n = e ?? [], r = {};
|
|
216
|
-
return o.forEach((e, t) => {
|
|
217
|
-
r[e] = n[t];
|
|
218
|
-
}), Ke({
|
|
219
|
-
logic: t,
|
|
220
|
-
formValues: r,
|
|
221
|
-
sourceKinds: i
|
|
222
|
-
});
|
|
223
|
-
}, n[5] = t, n[6] = i, n[7] = o, n[8] = s) : s = n[8];
|
|
224
|
-
let c;
|
|
225
|
-
return n[9] !== o || n[10] !== s ? (c = {
|
|
226
|
-
name: o,
|
|
227
|
-
exact: !0,
|
|
228
|
-
compute: s
|
|
229
|
-
}, n[9] = o, n[10] = s, n[11] = c) : c = n[11], se(c);
|
|
230
|
-
}, at = (e, t) => {
|
|
231
|
-
let n = E(3), { visible: r } = it(e, t.logic), i = t.hidden || !r, a;
|
|
232
|
-
return n[0] !== t || n[1] !== i ? (a = {
|
|
233
|
-
...t,
|
|
234
|
-
hidden: i
|
|
235
|
-
}, n[0] = t, n[1] = i, n[2] = a) : a = n[2], a;
|
|
236
|
-
}, ot = (e, t) => it(e, e?.sections?.[0]?.id === t.id ? void 0 : t.logic), st = "_1kzhxrs0", ct = "_1kzhxrs1", lt = "_1kzhxrs2", ut = "_1kzhxrs3", dt = "_1kzhxrs4", ft = "_1kzhxrs5", pt = "_1kzhxrs6", mt = "_1kzhxrs7", ht = "_1kzhxrs8", gt = "_1kzhxrs9", _t = "_1kzhxrsa", vt = "_1kzhxrsb", yt = "ktjhuv0", bt = te({
|
|
296
|
+
}, vt = "_1kzhxrs0", yt = "_1kzhxrs1", bt = "_1kzhxrs2", xt = "_1kzhxrs3", St = "_1kzhxrs4", Ct = "_1kzhxrs5", wt = "_1kzhxrs6", Tt = "_1kzhxrs7", Et = "_1kzhxrs8", Dt = "_1kzhxrs9", Ot = "_1kzhxrsa", kt = "_1kzhxrsb", At = "ktjhuv0", jt = ne({
|
|
237
297
|
defaultClassName: "ktjhuv1",
|
|
238
298
|
variantClassNames: { variant: {
|
|
239
299
|
default: "ktjhuv2",
|
|
@@ -241,105 +301,105 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
241
301
|
} },
|
|
242
302
|
defaultVariants: { variant: "default" },
|
|
243
303
|
compoundVariants: []
|
|
244
|
-
}),
|
|
304
|
+
}), Mt = "ktjhuv4", Nt = "ktjhuv5", Pt = "ktjhuv6", Ft = (e) => {
|
|
245
305
|
let t = E(10), n, r, i;
|
|
246
306
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: n, orientation: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
247
307
|
let a = i === void 0 ? "horizontal" : i, o;
|
|
248
|
-
t[4] === n ? o = t[5] : (o = Z(
|
|
308
|
+
t[4] === n ? o = t[5] : (o = Z(At, n), t[4] = n, t[5] = o);
|
|
249
309
|
let s;
|
|
250
|
-
return t[6] !== a || t[7] !== r || t[8] !== o ? (s = /* @__PURE__ */
|
|
310
|
+
return t[6] !== a || t[7] !== r || t[8] !== o ? (s = /* @__PURE__ */ U(le.Root, {
|
|
251
311
|
"data-slot": "tabs",
|
|
252
312
|
"data-orientation": a,
|
|
253
313
|
className: o,
|
|
254
314
|
...r
|
|
255
315
|
}), t[6] = a, t[7] = r, t[8] = o, t[9] = s) : s = t[9], s;
|
|
256
|
-
},
|
|
316
|
+
}, It = (e) => {
|
|
257
317
|
let t = E(11), n, r, i;
|
|
258
318
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: n, variant: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
259
319
|
let a = i === void 0 ? "default" : i, o;
|
|
260
|
-
t[4] !== n || t[5] !== a ? (o = Z(
|
|
320
|
+
t[4] !== n || t[5] !== a ? (o = Z(jt({ variant: a }), n), t[4] = n, t[5] = a, t[6] = o) : o = t[6];
|
|
261
321
|
let s;
|
|
262
|
-
return t[7] !== r || t[8] !== o || t[9] !== a ? (s = /* @__PURE__ */
|
|
322
|
+
return t[7] !== r || t[8] !== o || t[9] !== a ? (s = /* @__PURE__ */ U(le.List, {
|
|
263
323
|
"data-slot": "tabs-list",
|
|
264
324
|
"data-variant": a,
|
|
265
325
|
className: o,
|
|
266
326
|
...r
|
|
267
327
|
}), t[7] = r, t[8] = o, t[9] = a, t[10] = s) : s = t[10], s;
|
|
268
|
-
},
|
|
328
|
+
}, Lt = (e) => {
|
|
269
329
|
let t = E(8), n, r;
|
|
270
330
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
271
331
|
let i;
|
|
272
|
-
t[3] === n ? i = t[4] : (i = Z(
|
|
332
|
+
t[3] === n ? i = t[4] : (i = Z(Mt, Nt, n), t[3] = n, t[4] = i);
|
|
273
333
|
let a;
|
|
274
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */
|
|
334
|
+
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ U(le.Tab, {
|
|
275
335
|
"data-slot": "tabs-trigger",
|
|
276
336
|
className: i,
|
|
277
337
|
...r
|
|
278
338
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
279
|
-
},
|
|
339
|
+
}, Rt = (e) => {
|
|
280
340
|
let t = E(8), n, r;
|
|
281
341
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
282
342
|
let i;
|
|
283
|
-
t[3] === n ? i = t[4] : (i = Z(
|
|
343
|
+
t[3] === n ? i = t[4] : (i = Z(Pt, n), t[3] = n, t[4] = i);
|
|
284
344
|
let a;
|
|
285
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */
|
|
345
|
+
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ U(le.Panel, {
|
|
286
346
|
"data-slot": "tabs-content",
|
|
287
347
|
className: i,
|
|
288
348
|
...r
|
|
289
349
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
290
|
-
},
|
|
350
|
+
}, zt = (e) => {
|
|
291
351
|
let n = E(36), r, i, a;
|
|
292
352
|
n[0] === e ? (r = n[1], i = n[2], a = n[3]) : ({field: r, schema: a, ...i} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = a);
|
|
293
353
|
let { key: o, label: l, field_interface: u, fields: d } = r, f = o === void 0 ? "" : o, p = l === void 0 ? "" : l, m = u === void 0 ? "" : u, h;
|
|
294
354
|
n[4] === d ? h = n[5] : (h = d === void 0 ? [] : d, n[4] = d, n[5] = h);
|
|
295
|
-
let g = h, [_, v] =
|
|
355
|
+
let g = h, [_, v] = V("0"), { formState: y } = se(), b;
|
|
296
356
|
n[6] === r ? b = n[7] : (b = c(r), n[6] = r, n[7] = b);
|
|
297
357
|
let x;
|
|
298
358
|
n[8] !== f || n[9] !== b ? (x = {
|
|
299
359
|
name: f,
|
|
300
360
|
rules: b
|
|
301
361
|
}, n[8] = f, n[9] = b, n[10] = x) : x = n[10];
|
|
302
|
-
let S =
|
|
362
|
+
let S = ae(x), C, w;
|
|
303
363
|
n[11] === S ? (C = n[12], w = n[13]) : ({fields: w, ...C} = S, n[11] = S, n[12] = C, n[13] = w);
|
|
304
364
|
let T;
|
|
305
|
-
n[14] !== y.errors || n[15] !== f ? (T =
|
|
365
|
+
n[14] !== y.errors || n[15] !== f ? (T = ie(y.errors, f)?.root?.message, n[14] = y.errors, n[15] = f, n[16] = T) : T = n[16];
|
|
306
366
|
let D = T;
|
|
307
367
|
if (!m || !f) return null;
|
|
308
368
|
let O = r?.required, k;
|
|
309
|
-
n[17] !== p || n[18] !== O ? (k = /* @__PURE__ */
|
|
369
|
+
n[17] !== p || n[18] !== O ? (k = /* @__PURE__ */ U(s, {
|
|
310
370
|
label: p,
|
|
311
371
|
isRequired: O
|
|
312
372
|
}), n[17] = p, n[18] = O, n[19] = k) : k = n[19];
|
|
313
373
|
let A;
|
|
314
|
-
n[20] !== C || n[21] !== r.id || n[22] !== r.key || n[23] !== w || n[24] !== g || n[25] !== f || n[26] !== i || n[27] !== a || n[28] !== _ ? (A = w && Array.isArray(w) ? /* @__PURE__ */
|
|
374
|
+
n[20] !== C || n[21] !== r.id || n[22] !== r.key || n[23] !== w || n[24] !== g || n[25] !== f || n[26] !== i || n[27] !== a || n[28] !== _ ? (A = w && Array.isArray(w) ? /* @__PURE__ */ W(Ft, {
|
|
315
375
|
value: _,
|
|
316
376
|
onValueChange: v,
|
|
317
|
-
className:
|
|
318
|
-
children: [/* @__PURE__ */
|
|
319
|
-
className:
|
|
320
|
-
children: [w.length ? /* @__PURE__ */
|
|
321
|
-
className:
|
|
322
|
-
children: w?.map((e, t) => /* @__PURE__ */
|
|
377
|
+
className: yt,
|
|
378
|
+
children: [/* @__PURE__ */ W("div", {
|
|
379
|
+
className: bt,
|
|
380
|
+
children: [w.length ? /* @__PURE__ */ U(It, {
|
|
381
|
+
className: xt,
|
|
382
|
+
children: w?.map((e, t) => /* @__PURE__ */ U(Lt, {
|
|
323
383
|
id: `${r?.key}-${t}`,
|
|
324
384
|
value: t.toString(),
|
|
325
|
-
className:
|
|
385
|
+
className: St,
|
|
326
386
|
children: t + 1
|
|
327
387
|
}, `array-widget-tab-${r?.id}-${t}`))
|
|
328
|
-
}) : null, /* @__PURE__ */
|
|
388
|
+
}) : null, /* @__PURE__ */ W(t, {
|
|
329
389
|
variant: "ghost",
|
|
330
390
|
size: "xs",
|
|
331
|
-
className:
|
|
391
|
+
className: Ct,
|
|
332
392
|
onClick: () => {
|
|
333
|
-
C.append(
|
|
393
|
+
C.append(pt(g)), v((w?.length ?? 0).toString());
|
|
334
394
|
},
|
|
335
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ U(be, { size: 14 }), "Add"]
|
|
336
396
|
})]
|
|
337
|
-
}), w?.map((e, n) => /* @__PURE__ */
|
|
338
|
-
className:
|
|
397
|
+
}), w?.map((e, n) => /* @__PURE__ */ W(Rt, {
|
|
398
|
+
className: wt,
|
|
339
399
|
value: n.toString(),
|
|
340
|
-
children: [/* @__PURE__ */
|
|
341
|
-
className:
|
|
342
|
-
children: g.map((e) => /* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ U("div", {
|
|
401
|
+
className: Tt,
|
|
402
|
+
children: g.map((e) => /* @__PURE__ */ U(Jr, {
|
|
343
403
|
field: {
|
|
344
404
|
...e,
|
|
345
405
|
key: `${f}.${n}.${e?.key}`
|
|
@@ -347,104 +407,104 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
347
407
|
schema: a ?? null,
|
|
348
408
|
...i
|
|
349
409
|
}, `common-fields-${e?.id}`))
|
|
350
|
-
}), /* @__PURE__ */
|
|
351
|
-
className:
|
|
410
|
+
}), /* @__PURE__ */ W("div", {
|
|
411
|
+
className: Et,
|
|
352
412
|
children: [
|
|
353
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ U(t, {
|
|
354
414
|
onClick: () => {
|
|
355
415
|
v((n - 1).toString()), C.move(n, n - 1);
|
|
356
416
|
},
|
|
357
417
|
disabled: n === 0,
|
|
358
418
|
size: "icon",
|
|
359
|
-
className:
|
|
360
|
-
children: /* @__PURE__ */
|
|
419
|
+
className: Dt,
|
|
420
|
+
children: /* @__PURE__ */ U(fe, { size: 20 })
|
|
361
421
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
className:
|
|
422
|
+
/* @__PURE__ */ U(t, {
|
|
423
|
+
className: Ot,
|
|
364
424
|
variant: "link",
|
|
365
425
|
onClick: () => {
|
|
366
426
|
v(Math.max(0, n - 1).toString()), C.remove(n);
|
|
367
427
|
},
|
|
368
428
|
children: "Remove Item"
|
|
369
429
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
-
className:
|
|
430
|
+
/* @__PURE__ */ U(t, {
|
|
431
|
+
className: Dt,
|
|
372
432
|
onClick: () => {
|
|
373
433
|
v((n + 1).toString()), C.move(n, n + 1);
|
|
374
434
|
},
|
|
375
435
|
disabled: n >= w.length - 1,
|
|
376
436
|
size: "icon",
|
|
377
|
-
children: /* @__PURE__ */
|
|
437
|
+
children: /* @__PURE__ */ U(pe, { size: 20 })
|
|
378
438
|
})
|
|
379
439
|
]
|
|
380
440
|
})]
|
|
381
441
|
}, `array-widget-tab-content-${r?.id}-${n}`))]
|
|
382
|
-
}) : /* @__PURE__ */
|
|
442
|
+
}) : /* @__PURE__ */ W(t, {
|
|
383
443
|
variant: "ghost",
|
|
384
444
|
size: "xs",
|
|
385
445
|
onClick: () => {
|
|
386
|
-
C.append(
|
|
446
|
+
C.append(pt(g)), v("0");
|
|
387
447
|
},
|
|
388
|
-
children: [/* @__PURE__ */
|
|
448
|
+
children: [/* @__PURE__ */ U(be, { size: 14 }), "Add"]
|
|
389
449
|
}), n[20] = C, n[21] = r.id, n[22] = r.key, n[23] = w, n[24] = g, n[25] = f, n[26] = i, n[27] = a, n[28] = _, n[29] = A) : A = n[29];
|
|
390
450
|
let j;
|
|
391
|
-
n[30] === D ? j = n[31] : (j = !!D && /* @__PURE__ */
|
|
451
|
+
n[30] === D ? j = n[31] : (j = !!D && /* @__PURE__ */ U("div", {
|
|
392
452
|
className: "_1kzhxrsc",
|
|
393
|
-
children: /* @__PURE__ */
|
|
453
|
+
children: /* @__PURE__ */ U("p", {
|
|
394
454
|
className: "_1ompjs13",
|
|
395
455
|
children: D
|
|
396
456
|
})
|
|
397
457
|
}), n[30] = D, n[31] = j);
|
|
398
458
|
let M;
|
|
399
|
-
return n[32] !== k || n[33] !== A || n[34] !== j ? (M = /* @__PURE__ */
|
|
400
|
-
className:
|
|
459
|
+
return n[32] !== k || n[33] !== A || n[34] !== j ? (M = /* @__PURE__ */ W("div", {
|
|
460
|
+
className: vt,
|
|
401
461
|
children: [
|
|
402
462
|
k,
|
|
403
463
|
A,
|
|
404
464
|
j
|
|
405
465
|
]
|
|
406
466
|
}), n[32] = k, n[33] = A, n[34] = j, n[35] = M) : M = n[35], M;
|
|
407
|
-
},
|
|
408
|
-
container: () =>
|
|
409
|
-
control: ({ isFocused: e, isMulti: t, isDisabled: n }) => Z(
|
|
467
|
+
}, Bt = "_8vx4f60 _1oiks600 _1ri7vba0", Vt = "_8vx4f61", Ht = "_8vx4f62", Ut = "_8vx4f63", Wt = "_8vx4f66", Gt = "_8vx4f67", Kt = "_8vx4f68", qt = "_8vx4f69", Jt = "_8vx4f6a", Yt = "_8vx4f6b", Xt = "_8vx4f6c", Zt = "_8vx4f6d _6o7s4x0", Qt = "_8vx4f6e", $t = "_8vx4f6f", en = "_8vx4f6g", tn = "_8vx4f6h", nn = "_8vx4f6k", rn = {
|
|
468
|
+
container: () => Vt,
|
|
469
|
+
control: ({ isFocused: e, isMulti: t, isDisabled: n }) => Z(Bt, t ? Ut : Ht, e && "_8vx4f64", n && "_8vx4f65"),
|
|
410
470
|
input: () => "",
|
|
411
|
-
valueContainer: () =>
|
|
412
|
-
loadingMessage: () =>
|
|
471
|
+
valueContainer: () => Wt,
|
|
472
|
+
loadingMessage: () => Kt,
|
|
413
473
|
singleValue: () => "",
|
|
414
|
-
multiValue: () =>
|
|
415
|
-
multiValueRemove: () =>
|
|
416
|
-
indicatorsContainer: () =>
|
|
417
|
-
clearIndicator: () =>
|
|
474
|
+
multiValue: () => qt,
|
|
475
|
+
multiValueRemove: () => Jt,
|
|
476
|
+
indicatorsContainer: () => Gt,
|
|
477
|
+
clearIndicator: () => Yt,
|
|
418
478
|
indicatorSeparator: () => "",
|
|
419
|
-
dropdownIndicator: () =>
|
|
420
|
-
menu: () =>
|
|
421
|
-
groupHeading: () =>
|
|
422
|
-
placeholder: () =>
|
|
423
|
-
option: ({ isSelected: e, isFocused: t }) => Z(
|
|
424
|
-
noOptionsMessage: () =>
|
|
425
|
-
menuPortal: () =>
|
|
426
|
-
},
|
|
479
|
+
dropdownIndicator: () => Xt,
|
|
480
|
+
menu: () => Zt,
|
|
481
|
+
groupHeading: () => $t,
|
|
482
|
+
placeholder: () => en,
|
|
483
|
+
option: ({ isSelected: e, isFocused: t }) => Z(tn, t && "_8vx4f6i", e && "_8vx4f6j"),
|
|
484
|
+
noOptionsMessage: () => nn,
|
|
485
|
+
menuPortal: () => Qt
|
|
486
|
+
}, an = M.lazy(() => import("react-select-async-paginate").then((e) => ({ default: e.AsyncPaginate }))), on = (e) => {
|
|
427
487
|
let { portalRef: t } = n();
|
|
428
|
-
return /* @__PURE__ */
|
|
488
|
+
return /* @__PURE__ */ U(an, {
|
|
429
489
|
isClearable: !0,
|
|
430
490
|
menuPlacement: "auto",
|
|
431
491
|
isSearchable: !0,
|
|
432
492
|
unstyled: !0,
|
|
433
|
-
classNames:
|
|
493
|
+
classNames: rn,
|
|
434
494
|
styles: { menuPortal: (e) => ({
|
|
435
495
|
...e,
|
|
436
496
|
zIndex: 99999999
|
|
437
497
|
}) },
|
|
438
498
|
menuPosition: "fixed",
|
|
439
499
|
menuPortalTarget: t?.current,
|
|
440
|
-
loadingMessage: () => /* @__PURE__ */
|
|
500
|
+
loadingMessage: () => /* @__PURE__ */ U(d, { size: 16 }),
|
|
441
501
|
...e
|
|
442
502
|
});
|
|
443
|
-
},
|
|
444
|
-
let { collection: n } = A(), [r, i] =
|
|
503
|
+
}, sn = { OR: [{ _original: "" }, { _original: null }] }, cn = (e) => e ? e.replace(/[-_]/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()) : "", ln = "_1k5k6yj0", un = ({ field: e }) => {
|
|
504
|
+
let { collection: n } = A(), [r, i] = V(!1), [a, o] = V(!1), [s, u] = V([]), [f, g] = V(1), [_, v] = V(5), [y, b] = V(0), [x, S] = V(0), { key: C = "", label: w = "", helper_text: T = "", readonly: E = !1 } = e, O = C, k = e?.options?.collection_key || "", j = e?.options?.label_field_key || "", { field: { value: M, onChange: N, ref: P }, fieldState: F } = Q({
|
|
445
505
|
name: O,
|
|
446
506
|
rules: c(e)
|
|
447
|
-
}), I = !!e?.required,
|
|
507
|
+
}), I = !!e?.required, L = F?.error?.message, z = async () => {
|
|
448
508
|
i(!0);
|
|
449
509
|
try {
|
|
450
510
|
let e = await n?.getCollectionContentList({
|
|
@@ -460,23 +520,23 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
460
520
|
i(!1);
|
|
461
521
|
}
|
|
462
522
|
};
|
|
463
|
-
return
|
|
523
|
+
return R(() => {
|
|
464
524
|
M?.length > 0 && z();
|
|
465
525
|
}, [
|
|
466
526
|
M,
|
|
467
527
|
f,
|
|
468
528
|
_
|
|
469
|
-
]), /* @__PURE__ */
|
|
470
|
-
className:
|
|
471
|
-
children: [/* @__PURE__ */
|
|
529
|
+
]), /* @__PURE__ */ W("div", {
|
|
530
|
+
className: ln,
|
|
531
|
+
children: [/* @__PURE__ */ U(l, {
|
|
472
532
|
ref: P,
|
|
473
|
-
error:
|
|
533
|
+
error: L,
|
|
474
534
|
helperText: T,
|
|
475
535
|
readOnly: E,
|
|
476
536
|
label: w,
|
|
477
537
|
htmlFor: O,
|
|
478
538
|
isRequired: I,
|
|
479
|
-
children: /* @__PURE__ */
|
|
539
|
+
children: /* @__PURE__ */ U(on, {
|
|
480
540
|
id: O,
|
|
481
541
|
value: [],
|
|
482
542
|
onChange: (e) => {
|
|
@@ -487,7 +547,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
487
547
|
loadOptions: async (e, t, { page: r = 1 }) => {
|
|
488
548
|
o(!0);
|
|
489
549
|
try {
|
|
490
|
-
let t = Array.isArray(M) && M.length > 0 ? { AND: [{ _id: { not_in: M } },
|
|
550
|
+
let t = Array.isArray(M) && M.length > 0 ? { AND: [{ _id: { not_in: M } }, sn] } : sn, i = (await n?.getCollectionContentList({
|
|
491
551
|
collection_key: k,
|
|
492
552
|
page: r,
|
|
493
553
|
search: e,
|
|
@@ -499,7 +559,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
499
559
|
slug: e?.slug,
|
|
500
560
|
[j]: e?.[j]
|
|
501
561
|
},
|
|
502
|
-
label: e?.[j] ? e?.[j] :
|
|
562
|
+
label: e?.[j] ? e?.[j] : cn(e?.slug ?? "")
|
|
503
563
|
}));
|
|
504
564
|
return {
|
|
505
565
|
options: Array.isArray(a) ? a : [],
|
|
@@ -524,44 +584,44 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
524
584
|
cacheUniqs: [k, M],
|
|
525
585
|
minMenuHeight: 250
|
|
526
586
|
})
|
|
527
|
-
}), Array.isArray(M) && M?.length > 0 && /* @__PURE__ */
|
|
587
|
+
}), Array.isArray(M) && M?.length > 0 && /* @__PURE__ */ W("div", {
|
|
528
588
|
className: "_1k5k6yj1",
|
|
529
589
|
children: [
|
|
530
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ W("h4", {
|
|
531
591
|
className: "_1k5k6yj2",
|
|
532
|
-
children: [/* @__PURE__ */
|
|
592
|
+
children: [/* @__PURE__ */ U("span", { children: "Selected" }), r && s?.length > 0 && /* @__PURE__ */ U(d, { size: 16 })]
|
|
533
593
|
}),
|
|
534
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ U("div", {
|
|
535
595
|
className: "_1k5k6yj4",
|
|
536
|
-
children: s.map((e) => /* @__PURE__ */
|
|
596
|
+
children: s.map((e) => /* @__PURE__ */ W("div", {
|
|
537
597
|
className: "_1k5k6yj5",
|
|
538
|
-
children: [/* @__PURE__ */
|
|
598
|
+
children: [/* @__PURE__ */ U("div", {
|
|
539
599
|
className: "_1k5k6yj6",
|
|
540
|
-
children: e?.[j] ||
|
|
541
|
-
}), /* @__PURE__ */
|
|
600
|
+
children: e?.[j] || cn(e?.slug ?? "")
|
|
601
|
+
}), /* @__PURE__ */ U(t, {
|
|
542
602
|
disabled: r,
|
|
543
603
|
size: "icon-sm",
|
|
544
604
|
variant: "ghost",
|
|
545
605
|
onClick: () => {
|
|
546
606
|
N(M?.filter((t) => t !== e?._id));
|
|
547
607
|
},
|
|
548
|
-
children: /* @__PURE__ */
|
|
608
|
+
children: /* @__PURE__ */ U(Ce, { size: 16 })
|
|
549
609
|
})]
|
|
550
610
|
}, e?._id))
|
|
551
611
|
}),
|
|
552
|
-
r && s?.length === 0 && /* @__PURE__ */
|
|
612
|
+
r && s?.length === 0 && /* @__PURE__ */ U("div", {
|
|
553
613
|
className: "_1k5k6yj3",
|
|
554
|
-
children: /* @__PURE__ */
|
|
614
|
+
children: /* @__PURE__ */ U(d, { size: 24 })
|
|
555
615
|
}),
|
|
556
|
-
M?.length > 5 && /* @__PURE__ */
|
|
616
|
+
M?.length > 5 && /* @__PURE__ */ W("div", {
|
|
557
617
|
className: "_1k5k6yj7",
|
|
558
618
|
children: [
|
|
559
|
-
/* @__PURE__ */
|
|
619
|
+
/* @__PURE__ */ W("div", {
|
|
560
620
|
className: "_1k5k6yj8",
|
|
561
621
|
children: [
|
|
562
622
|
"Showing",
|
|
563
623
|
" ",
|
|
564
|
-
y ? /* @__PURE__ */
|
|
624
|
+
y ? /* @__PURE__ */ W(H, { children: [
|
|
565
625
|
_ * (f - 1) + 1,
|
|
566
626
|
"-",
|
|
567
627
|
Math.min(_ * f, y),
|
|
@@ -572,64 +632,64 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
572
632
|
" items"
|
|
573
633
|
]
|
|
574
634
|
}),
|
|
575
|
-
/* @__PURE__ */
|
|
635
|
+
/* @__PURE__ */ W("select", {
|
|
576
636
|
className: "_1k5k6yjb",
|
|
577
637
|
value: _,
|
|
578
638
|
onChange: (e) => {
|
|
579
639
|
g(1), v(Number(e.target.value));
|
|
580
640
|
},
|
|
581
641
|
children: [
|
|
582
|
-
/* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ U("option", {
|
|
583
643
|
value: 5,
|
|
584
644
|
children: "5"
|
|
585
645
|
}),
|
|
586
|
-
/* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ U("option", {
|
|
587
647
|
value: 10,
|
|
588
648
|
children: "10"
|
|
589
649
|
}),
|
|
590
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ U("option", {
|
|
591
651
|
value: 25,
|
|
592
652
|
children: "25"
|
|
593
653
|
}),
|
|
594
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ U("option", {
|
|
595
655
|
value: 50,
|
|
596
656
|
children: "50"
|
|
597
657
|
})
|
|
598
658
|
]
|
|
599
659
|
}),
|
|
600
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ U("div", {
|
|
601
661
|
className: "_1k5k6yj9",
|
|
602
|
-
children: /* @__PURE__ */
|
|
662
|
+
children: /* @__PURE__ */ W("div", {
|
|
603
663
|
className: "_1k5k6yja",
|
|
604
664
|
children: [
|
|
605
|
-
/* @__PURE__ */
|
|
665
|
+
/* @__PURE__ */ W(h, { children: [/* @__PURE__ */ U(p, {
|
|
606
666
|
variant: "ghost",
|
|
607
667
|
size: "icon-xs",
|
|
608
668
|
onClick: () => g(1),
|
|
609
669
|
disabled: f === 1,
|
|
610
|
-
children: /* @__PURE__ */
|
|
611
|
-
}), /* @__PURE__ */
|
|
612
|
-
/* @__PURE__ */
|
|
670
|
+
children: /* @__PURE__ */ U(me, { size: 14 })
|
|
671
|
+
}), /* @__PURE__ */ U(m, { children: "First page" })] }),
|
|
672
|
+
/* @__PURE__ */ W(h, { children: [/* @__PURE__ */ U(p, {
|
|
613
673
|
variant: "ghost",
|
|
614
674
|
size: "icon-xs",
|
|
615
675
|
disabled: f === 1,
|
|
616
676
|
onClick: () => g(f - 1),
|
|
617
|
-
children: /* @__PURE__ */
|
|
618
|
-
}), /* @__PURE__ */
|
|
619
|
-
/* @__PURE__ */
|
|
677
|
+
children: /* @__PURE__ */ U(fe, { size: 14 })
|
|
678
|
+
}), /* @__PURE__ */ U(m, { children: "Previous page" })] }),
|
|
679
|
+
/* @__PURE__ */ W(h, { children: [/* @__PURE__ */ U(p, {
|
|
620
680
|
variant: "ghost",
|
|
621
681
|
size: "icon-xs",
|
|
622
682
|
onClick: () => g(f + 1),
|
|
623
683
|
disabled: f === x,
|
|
624
|
-
children: /* @__PURE__ */
|
|
625
|
-
}), /* @__PURE__ */
|
|
626
|
-
/* @__PURE__ */
|
|
684
|
+
children: /* @__PURE__ */ U(pe, { size: 14 })
|
|
685
|
+
}), /* @__PURE__ */ U(m, { children: "Next page" })] }),
|
|
686
|
+
/* @__PURE__ */ W(h, { children: [/* @__PURE__ */ U(p, {
|
|
627
687
|
variant: "ghost",
|
|
628
688
|
size: "icon-xs",
|
|
629
689
|
onClick: () => g(x),
|
|
630
690
|
disabled: f === x,
|
|
631
|
-
children: /* @__PURE__ */
|
|
632
|
-
}), /* @__PURE__ */
|
|
691
|
+
children: /* @__PURE__ */ U(he, { size: 14 })
|
|
692
|
+
}), /* @__PURE__ */ U(m, { children: "Last page" })] })
|
|
633
693
|
]
|
|
634
694
|
})
|
|
635
695
|
})
|
|
@@ -638,12 +698,12 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
638
698
|
]
|
|
639
699
|
})]
|
|
640
700
|
});
|
|
641
|
-
},
|
|
642
|
-
let { collection: t, logger: n } = A(), [r, i] =
|
|
701
|
+
}, dn = ({ field: e }) => {
|
|
702
|
+
let { collection: t, logger: n } = A(), [r, i] = V(!1), { key: a = "", label: o = "", helper_text: s = "", readonly: u = !1 } = e, d = a, f = e?.options?.collection_key || "", p = e?.options?.label_field_key || "", { field: { value: m, onBlur: h, onChange: g, ref: _, disabled: v, ...y }, fieldState: b } = Q({
|
|
643
703
|
name: d,
|
|
644
704
|
rules: c(e)
|
|
645
|
-
}), { setValue: x } =
|
|
646
|
-
|
|
705
|
+
}), { setValue: x } = se(), S = !!e?.required, C = b?.error?.message, w = B(null);
|
|
706
|
+
R(() => {
|
|
647
707
|
typeof m != "string" || !m || w.current !== m && (w.current = m, i(!0), t?.getCollectionContentList({
|
|
648
708
|
collection_key: f,
|
|
649
709
|
where: { _id: m },
|
|
@@ -675,9 +735,9 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
675
735
|
page: r,
|
|
676
736
|
search: e,
|
|
677
737
|
limit: 10,
|
|
678
|
-
where:
|
|
738
|
+
where: sn
|
|
679
739
|
}))?.content?.data, i = (n || []).map((e) => {
|
|
680
|
-
let t = e?.[p] ? e?.[p] :
|
|
740
|
+
let t = e?.[p] ? e?.[p] : cn(e?.slug || "");
|
|
681
741
|
return {
|
|
682
742
|
value: {
|
|
683
743
|
_id: e?._id,
|
|
@@ -702,7 +762,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
702
762
|
i(!1);
|
|
703
763
|
}
|
|
704
764
|
};
|
|
705
|
-
return /* @__PURE__ */
|
|
765
|
+
return /* @__PURE__ */ U(l, {
|
|
706
766
|
ref: _,
|
|
707
767
|
error: C,
|
|
708
768
|
helperText: s,
|
|
@@ -710,10 +770,10 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
710
770
|
label: o,
|
|
711
771
|
htmlFor: d,
|
|
712
772
|
isRequired: S,
|
|
713
|
-
children: /* @__PURE__ */
|
|
773
|
+
children: /* @__PURE__ */ U(on, {
|
|
714
774
|
id: d,
|
|
715
775
|
value: m && typeof m == "object" ? {
|
|
716
|
-
label: m?.[p] ? m?.[p] : m?.slug ?
|
|
776
|
+
label: m?.[p] ? m?.[p] : m?.slug ? cn(m?.slug || "") : "",
|
|
717
777
|
value: {
|
|
718
778
|
_id: m?._id,
|
|
719
779
|
slug: m?.slug,
|
|
@@ -736,50 +796,50 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
736
796
|
...y
|
|
737
797
|
})
|
|
738
798
|
});
|
|
739
|
-
},
|
|
799
|
+
}, fn = (e) => {
|
|
740
800
|
let t = E(4), { field: n } = e, { field_interface: r, key: i, options: a } = n, o = a === void 0 ? {} : a;
|
|
741
801
|
if (!r || !i) return null;
|
|
742
802
|
if (!o?.collection_key || !o?.label_field_key) return console.error("[LevoCollection]: Error while rendering collection widget. Collection key of label field key is required."), null;
|
|
743
803
|
if (o?.current_have_many_connected && !o?.connected_have_many_current) return console.error("[LevoCollection]: O2M is not supported"), null;
|
|
744
804
|
if (o?.current_have_many_connected && o?.connected_have_many_current) {
|
|
745
805
|
let n;
|
|
746
|
-
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */
|
|
806
|
+
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ U(un, {
|
|
747
807
|
...e,
|
|
748
808
|
schema: null
|
|
749
809
|
}), t[0] = e, t[1] = n), n;
|
|
750
810
|
}
|
|
751
811
|
let s;
|
|
752
|
-
return t[2] === e ? s = t[3] : (s = /* @__PURE__ */
|
|
812
|
+
return t[2] === e ? s = t[3] : (s = /* @__PURE__ */ U(dn, {
|
|
753
813
|
...e,
|
|
754
814
|
schema: null
|
|
755
815
|
}), t[2] = e, t[3] = s), s;
|
|
756
|
-
}, $ = (e) => M.memo(e),
|
|
816
|
+
}, $ = (e) => M.memo(e), pn = "_1vaa8ub0", mn = "_1vaa8ub2", hn = "_1vaa8ub3", gn = "_13kepqq0", _n = "_13kepqq1", vn = (e) => {
|
|
757
817
|
let t = E(9), n, r;
|
|
758
818
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
759
819
|
let i;
|
|
760
|
-
t[3] === n ? i = t[4] : (i = Z(
|
|
820
|
+
t[3] === n ? i = t[4] : (i = Z(gn, n), t[3] = n, t[4] = i);
|
|
761
821
|
let a;
|
|
762
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */
|
|
822
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ U(we.Indicator, {
|
|
763
823
|
"data-slot": "checkbox-indicator",
|
|
764
|
-
className:
|
|
765
|
-
children: /* @__PURE__ */
|
|
824
|
+
className: _n,
|
|
825
|
+
children: /* @__PURE__ */ U(de, {})
|
|
766
826
|
}), t[5] = a) : a = t[5];
|
|
767
827
|
let o;
|
|
768
|
-
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */
|
|
828
|
+
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */ U(we.Root, {
|
|
769
829
|
"data-slot": "checkbox",
|
|
770
830
|
className: i,
|
|
771
831
|
...r,
|
|
772
832
|
children: a
|
|
773
833
|
}), t[6] = r, t[7] = i, t[8] = o) : o = t[8], o;
|
|
774
|
-
},
|
|
775
|
-
let [t, n] =
|
|
834
|
+
}, yn = ({ field: e }) => {
|
|
835
|
+
let [t, n] = V(""), [r, i] = V(!1), { key: a = "", label: s = "", helper_text: u = "", readonly: d = !1, values: f = [], options: p = {} } = e, { field: { name: m, onBlur: h, onChange: g, value: _, ref: v, disabled: b }, fieldState: { error: x } } = Q({
|
|
776
836
|
name: a,
|
|
777
837
|
rules: c(e)
|
|
778
838
|
}), S = (e) => {
|
|
779
839
|
let t = Array.isArray(_ || null) ? [..._] : [];
|
|
780
840
|
t.includes(e) ? t = t?.filter((t) => t !== e) : t.push(e), g(t);
|
|
781
|
-
}, C = !!p?.custom_input, w =
|
|
782
|
-
return
|
|
841
|
+
}, C = !!p?.custom_input, w = z(() => dt(f), [f]), T = z(() => w.map((e) => e.value), [w]);
|
|
842
|
+
return R(() => {
|
|
783
843
|
if (C) {
|
|
784
844
|
let e = !1;
|
|
785
845
|
(_ ?? []).forEach((t) => {
|
|
@@ -790,36 +850,36 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
790
850
|
_,
|
|
791
851
|
T,
|
|
792
852
|
C
|
|
793
|
-
]), /* @__PURE__ */
|
|
853
|
+
]), /* @__PURE__ */ W(l, {
|
|
794
854
|
error: x?.message,
|
|
795
855
|
helperText: u,
|
|
796
856
|
readOnly: d,
|
|
797
857
|
label: s,
|
|
798
858
|
htmlFor: m,
|
|
799
859
|
isRequired: e?.required,
|
|
800
|
-
children: [/* @__PURE__ */
|
|
860
|
+
children: [/* @__PURE__ */ U("div", {
|
|
801
861
|
ref: v,
|
|
802
|
-
className: Z(
|
|
803
|
-
children: w.map((e, t) => /* @__PURE__ */
|
|
804
|
-
className:
|
|
805
|
-
children: [/* @__PURE__ */
|
|
862
|
+
className: Z(pn, d && "_1vaa8ub1"),
|
|
863
|
+
children: w.map((e, t) => /* @__PURE__ */ W("div", {
|
|
864
|
+
className: mn,
|
|
865
|
+
children: [/* @__PURE__ */ U(vn, {
|
|
806
866
|
id: `${m}-${e.value}-${t}`,
|
|
807
867
|
name: m,
|
|
808
868
|
checked: _ ? _?.includes(e.value) : !1,
|
|
809
869
|
onCheckedChange: () => S(e.value),
|
|
810
870
|
onBlur: () => h(),
|
|
811
871
|
disabled: b
|
|
812
|
-
}), /* @__PURE__ */
|
|
872
|
+
}), /* @__PURE__ */ U(o, {
|
|
813
873
|
htmlFor: `${m}-${e.value}-${t}`,
|
|
814
|
-
className:
|
|
874
|
+
className: hn,
|
|
815
875
|
children: e.label
|
|
816
876
|
})]
|
|
817
877
|
}, `${e.value}-${t}`))
|
|
818
|
-
}), C && /* @__PURE__ */
|
|
878
|
+
}), C && /* @__PURE__ */ W("div", {
|
|
819
879
|
className: "_1vaa8ub4",
|
|
820
|
-
children: [/* @__PURE__ */
|
|
880
|
+
children: [/* @__PURE__ */ W("div", {
|
|
821
881
|
className: "_1vaa8ub5",
|
|
822
|
-
children: [/* @__PURE__ */
|
|
882
|
+
children: [/* @__PURE__ */ U(vn, {
|
|
823
883
|
name: `${m}-other`,
|
|
824
884
|
id: `${m}-other`,
|
|
825
885
|
disabled: b,
|
|
@@ -828,12 +888,12 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
828
888
|
i(!!e), e ? Array.isArray(_) ? g?.([..._, t]) : g?.([t]) : g?.((_ ?? [])?.filter((e) => e !== t));
|
|
829
889
|
},
|
|
830
890
|
onBlur: () => h()
|
|
831
|
-
}), /* @__PURE__ */
|
|
891
|
+
}), /* @__PURE__ */ W(o, {
|
|
832
892
|
htmlFor: `${m}-other`,
|
|
833
893
|
className: "_1vaa8ub3",
|
|
834
894
|
children: ["Other:", " "]
|
|
835
895
|
})]
|
|
836
|
-
}), /* @__PURE__ */
|
|
896
|
+
}), /* @__PURE__ */ U(y, {
|
|
837
897
|
name: `other-checkbox-${m}`,
|
|
838
898
|
className: "_1vaa8ub6",
|
|
839
899
|
value: t,
|
|
@@ -846,7 +906,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
846
906
|
})]
|
|
847
907
|
})]
|
|
848
908
|
});
|
|
849
|
-
},
|
|
909
|
+
}, bn = (e) => {
|
|
850
910
|
let t = E(39), n, r;
|
|
851
911
|
t[0] === e ? (n = t[1], r = t[2]) : ({field: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
852
912
|
let { key: i, label: a, helper_text: o, readonly: s } = n, u = i === void 0 ? "" : i, d = a === void 0 ? "" : a, f = o === void 0 ? "" : o, p = s === void 0 ? !1 : s, m = u, h;
|
|
@@ -871,7 +931,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
871
931
|
let F;
|
|
872
932
|
t[18] === Symbol.for("react.memo_cache_sentinel") ? (F = Z(v, g), t[18] = F) : F = t[18];
|
|
873
933
|
let I;
|
|
874
|
-
t[19] !== m || t[20] !== r || t[21] !== p || t[22] !== C || t[23] !== w || t[24] !== M || t[25] !== N || t[26] !== P || t[27] !== A || t[28] !== j || t[29] !== T ? (I = /* @__PURE__ */
|
|
934
|
+
t[19] !== m || t[20] !== r || t[21] !== p || t[22] !== C || t[23] !== w || t[24] !== M || t[25] !== N || t[26] !== P || t[27] !== A || t[28] !== j || t[29] !== T ? (I = /* @__PURE__ */ U(Te, {
|
|
875
935
|
thousandSeparator: !0,
|
|
876
936
|
prefix: A,
|
|
877
937
|
placeholder: j,
|
|
@@ -889,7 +949,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
889
949
|
...r
|
|
890
950
|
}), t[19] = m, t[20] = r, t[21] = p, t[22] = C, t[23] = w, t[24] = M, t[25] = N, t[26] = P, t[27] = A, t[28] = j, t[29] = T, t[30] = I) : I = t[30];
|
|
891
951
|
let L;
|
|
892
|
-
return t[31] !== O || t[32] !== f || t[33] !== D || t[34] !== d || t[35] !== m || t[36] !== p || t[37] !== I ? (L = /* @__PURE__ */
|
|
952
|
+
return t[31] !== O || t[32] !== f || t[33] !== D || t[34] !== d || t[35] !== m || t[36] !== p || t[37] !== I ? (L = /* @__PURE__ */ U(l, {
|
|
893
953
|
error: O,
|
|
894
954
|
helperText: f,
|
|
895
955
|
readOnly: p,
|
|
@@ -898,37 +958,37 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
898
958
|
label: d,
|
|
899
959
|
children: I
|
|
900
960
|
}), t[31] = O, t[32] = f, t[33] = D, t[34] = d, t[35] = m, t[36] = p, t[37] = I, t[38] = L) : L = t[38], L;
|
|
901
|
-
},
|
|
961
|
+
}, xn = {
|
|
902
962
|
label: "Other",
|
|
903
963
|
value: "other_internal"
|
|
904
|
-
},
|
|
905
|
-
let { portalRef: r } = n(), [i, a] =
|
|
964
|
+
}, Sn = ({ field: e, ...t }) => {
|
|
965
|
+
let { portalRef: r } = n(), [i, a] = V([]), { key: o = "", label: s = "", helper_text: u = "", readonly: d = !1, values: f = [], options: p = {} } = e, m = o, { field: { value: h, onBlur: g, onChange: _, disabled: v, ...b }, fieldState: x } = Q({
|
|
906
966
|
name: m,
|
|
907
967
|
rules: c(e)
|
|
908
|
-
}), [S, C] =
|
|
909
|
-
return
|
|
968
|
+
}), [S, C] = V(""), [w, T] = V(!1), E = !!e?.required, D = x?.error?.message, O = !!p?.custom_input;
|
|
969
|
+
return R(() => {
|
|
910
970
|
if (f?.length) {
|
|
911
|
-
let e = [...
|
|
912
|
-
O && e.push(
|
|
971
|
+
let e = [...dt(f)];
|
|
972
|
+
O && e.push(xn), a(e);
|
|
913
973
|
}
|
|
914
|
-
}, [f, O]),
|
|
915
|
-
!t?.isMulti && O && typeof h == "string" && h && (i.some((e) => e.value !==
|
|
974
|
+
}, [f, O]), R(() => {
|
|
975
|
+
!t?.isMulti && O && typeof h == "string" && h && (i.some((e) => e.value !== xn.value && e.value === h) ? T(!1) : (T(!0), C(h)));
|
|
916
976
|
}, [
|
|
917
977
|
h,
|
|
918
978
|
i,
|
|
919
979
|
O
|
|
920
|
-
]), /* @__PURE__ */
|
|
980
|
+
]), /* @__PURE__ */ W(l, {
|
|
921
981
|
error: D,
|
|
922
982
|
helperText: u,
|
|
923
983
|
readOnly: d,
|
|
924
984
|
label: s,
|
|
925
985
|
htmlFor: m,
|
|
926
986
|
isRequired: E,
|
|
927
|
-
children: [/* @__PURE__ */
|
|
987
|
+
children: [/* @__PURE__ */ U(Ee, {
|
|
928
988
|
id: m,
|
|
929
|
-
value: w ?
|
|
989
|
+
value: w ? xn : h ? t?.isMulti ? i?.filter((e) => h?.includes(e?.value)) : i?.find((e) => e?.value === h) : null,
|
|
930
990
|
onChange: (e) => {
|
|
931
|
-
O && e?.value ===
|
|
991
|
+
O && e?.value === xn.value && e?.label === xn.label ? (T(!0), C(""), _("")) : (T(!1), t?.isMulti ? _(e?.map((e) => e?.value)) : _(e?.value));
|
|
932
992
|
},
|
|
933
993
|
onBlur: () => g(),
|
|
934
994
|
options: i,
|
|
@@ -938,16 +998,16 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
938
998
|
...b,
|
|
939
999
|
...t,
|
|
940
1000
|
unstyled: !0,
|
|
941
|
-
classNames:
|
|
1001
|
+
classNames: rn,
|
|
942
1002
|
styles: { menuPortal: (e) => ({
|
|
943
1003
|
...e,
|
|
944
1004
|
zIndex: 99999999
|
|
945
1005
|
}) },
|
|
946
1006
|
menuPosition: "fixed",
|
|
947
1007
|
menuPortalTarget: r?.current
|
|
948
|
-
}), w && /* @__PURE__ */
|
|
1008
|
+
}), w && /* @__PURE__ */ U("div", {
|
|
949
1009
|
className: "ldp9z20",
|
|
950
|
-
children: /* @__PURE__ */
|
|
1010
|
+
children: /* @__PURE__ */ U(y, {
|
|
951
1011
|
name: `select-other-${m}`,
|
|
952
1012
|
value: S,
|
|
953
1013
|
onChange: (e) => {
|
|
@@ -957,10 +1017,10 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
957
1017
|
})
|
|
958
1018
|
})]
|
|
959
1019
|
});
|
|
960
|
-
},
|
|
1020
|
+
}, Cn = "eviv4t0", wn = "eviv4t1", Tn = "eviv4t3", En = (e) => {
|
|
961
1021
|
let t = E(50), n, r, i;
|
|
962
1022
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({field: n, settings: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
963
|
-
let { key: a, label: o, helper_text: s, readonly: u } = n, d = a === void 0 ? "" : a, p = o === void 0 ? "" : o, m = s === void 0 ? "" : s, h = u === void 0 ? !1 : u, g = d, _ = !!n.options?.verification && !!i?.enableVerification, [v, b] =
|
|
1023
|
+
let { key: a, label: o, helper_text: s, readonly: u } = n, d = a === void 0 ? "" : a, p = o === void 0 ? "" : o, m = s === void 0 ? "" : s, h = u === void 0 ? !1 : u, g = d, _ = !!n.options?.verification && !!i?.enableVerification, [v, b] = V(null), [x, S] = V(!1), C;
|
|
964
1024
|
t[4] !== x || t[5] !== _ || t[6] !== v ? (C = (e) => x ? !0 : _ && (!v || v !== e) ? "Email verification required" : !0, t[4] = x, t[5] = _, t[6] = v, t[7] = C) : C = t[7];
|
|
965
1025
|
let w;
|
|
966
1026
|
t[8] !== n || t[9] !== C ? (w = c(n, C), t[8] = n, t[9] = C, t[10] = w) : w = t[10];
|
|
@@ -976,35 +1036,35 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
976
1036
|
b(e), M(e);
|
|
977
1037
|
}, t[19] = M, t[20] = L);
|
|
978
1038
|
let R = L, z;
|
|
979
|
-
t[21] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */
|
|
980
|
-
let
|
|
981
|
-
t[22] === I ?
|
|
1039
|
+
t[21] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ U(ve, { size: 20 }), t[21] = z) : z = t[21];
|
|
1040
|
+
let B;
|
|
1041
|
+
t[22] === I ? B = t[23] : (B = I ? /* @__PURE__ */ U("button", {
|
|
982
1042
|
type: "button",
|
|
983
1043
|
onClick: () => b(null),
|
|
984
|
-
className:
|
|
1044
|
+
className: Tn,
|
|
985
1045
|
title: "Change email",
|
|
986
|
-
children: /* @__PURE__ */
|
|
987
|
-
}) : null, t[22] = I, t[23] =
|
|
988
|
-
let
|
|
1046
|
+
children: /* @__PURE__ */ U(ye, { size: 14 })
|
|
1047
|
+
}) : null, t[22] = I, t[23] = B);
|
|
1048
|
+
let H = N || "", G;
|
|
989
1049
|
t[24] === M ? G = t[25] : (G = (e) => M(e?.target?.value?.trim()?.toLocaleLowerCase()), t[24] = M, t[25] = G);
|
|
990
1050
|
let K = h || I, q;
|
|
991
|
-
t[26] !== A || t[27] !== g || t[28] !== j || t[29] !== r || t[30] !==
|
|
992
|
-
className:
|
|
1051
|
+
t[26] !== A || t[27] !== g || t[28] !== j || t[29] !== r || t[30] !== B || t[31] !== H || t[32] !== G || t[33] !== K ? (q = /* @__PURE__ */ U(y, {
|
|
1052
|
+
className: wn,
|
|
993
1053
|
id: g,
|
|
994
1054
|
type: "email",
|
|
995
1055
|
leftIcon: z,
|
|
996
|
-
rightIcon:
|
|
997
|
-
value:
|
|
1056
|
+
rightIcon: B,
|
|
1057
|
+
value: H,
|
|
998
1058
|
onChange: G,
|
|
999
1059
|
onBlur: j,
|
|
1000
1060
|
readOnly: K,
|
|
1001
1061
|
...A,
|
|
1002
1062
|
...r
|
|
1003
|
-
}), t[26] = A, t[27] = g, t[28] = j, t[29] = r, t[30] =
|
|
1063
|
+
}), t[26] = A, t[27] = g, t[28] = j, t[29] = r, t[30] = B, t[31] = H, t[32] = G, t[33] = K, t[34] = q) : q = t[34];
|
|
1004
1064
|
let J;
|
|
1005
|
-
t[35] !== R || t[36] !== I || t[37] !== _ || t[38] !== N ? (J = _ && /* @__PURE__ */
|
|
1065
|
+
t[35] !== R || t[36] !== I || t[37] !== _ || t[38] !== N ? (J = _ && /* @__PURE__ */ U("div", {
|
|
1006
1066
|
className: "eviv4t2",
|
|
1007
|
-
children: /* @__PURE__ */
|
|
1067
|
+
children: /* @__PURE__ */ U(f, {
|
|
1008
1068
|
value: N,
|
|
1009
1069
|
type: "email",
|
|
1010
1070
|
isVerified: I,
|
|
@@ -1013,12 +1073,12 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1013
1073
|
})
|
|
1014
1074
|
}), t[35] = R, t[36] = I, t[37] = _, t[38] = N, t[39] = J) : J = t[39];
|
|
1015
1075
|
let Y;
|
|
1016
|
-
t[40] !== q || t[41] !== J ? (Y = /* @__PURE__ */
|
|
1017
|
-
className:
|
|
1076
|
+
t[40] !== q || t[41] !== J ? (Y = /* @__PURE__ */ W("div", {
|
|
1077
|
+
className: Cn,
|
|
1018
1078
|
children: [q, J]
|
|
1019
1079
|
}), t[40] = q, t[41] = J, t[42] = Y) : Y = t[42];
|
|
1020
1080
|
let X;
|
|
1021
|
-
return t[43] !== F || t[44] !== m || t[45] !== P || t[46] !== p || t[47] !== g || t[48] !== Y ? (X = /* @__PURE__ */
|
|
1081
|
+
return t[43] !== F || t[44] !== m || t[45] !== P || t[46] !== p || t[47] !== g || t[48] !== Y ? (X = /* @__PURE__ */ U(l, {
|
|
1022
1082
|
error: F,
|
|
1023
1083
|
helperText: m,
|
|
1024
1084
|
label: p,
|
|
@@ -1026,18 +1086,18 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1026
1086
|
isRequired: P,
|
|
1027
1087
|
children: Y
|
|
1028
1088
|
}), t[43] = F, t[44] = m, t[45] = P, t[46] = p, t[47] = g, t[48] = Y, t[49] = X) : X = t[49], X;
|
|
1029
|
-
},
|
|
1089
|
+
}, Dn = (e) => e ? {
|
|
1030
1090
|
value: e,
|
|
1031
1091
|
label: e?.place_name || e?.formatted_address || e?.name
|
|
1032
|
-
} : null,
|
|
1033
|
-
let { portalRef: t } = n(), [r, i] =
|
|
1092
|
+
} : null, On = ({ field: e }) => {
|
|
1093
|
+
let { portalRef: t } = n(), [r, i] = V(!1), [a, o] = V(!1), s = A(), { key: u = "", label: d = "", helper_text: f = "", readonly: p = !1 } = e, { field: { value: m, onBlur: h, onChange: g, disabled: _, ...v }, fieldState: y } = Q({
|
|
1034
1094
|
name: u,
|
|
1035
1095
|
rules: c(e)
|
|
1036
1096
|
}), b = !!e?.required, x = y?.error?.message, S = (e) => {
|
|
1037
1097
|
e && e?.place_id !== m?.place_id ? (o(!0), s?.fetch.url(`/v1/bevy/content/location/${e?.place_id}/get-location-details`).get().json().then((e) => {
|
|
1038
1098
|
g && g(e?.content?.data);
|
|
1039
1099
|
}).catch((e) => {
|
|
1040
|
-
console.log("Could not fetch location details:",
|
|
1100
|
+
console.log("Could not fetch location details:", Y(e).message);
|
|
1041
1101
|
}).finally(() => o(!1))) : g(null);
|
|
1042
1102
|
}, C = (t, n) => {
|
|
1043
1103
|
i(!0);
|
|
@@ -1054,17 +1114,17 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1054
1114
|
n([]);
|
|
1055
1115
|
}).finally(() => i(!1));
|
|
1056
1116
|
};
|
|
1057
|
-
return /* @__PURE__ */
|
|
1117
|
+
return /* @__PURE__ */ U(l, {
|
|
1058
1118
|
error: x,
|
|
1059
1119
|
helperText: f,
|
|
1060
1120
|
readOnly: p,
|
|
1061
1121
|
label: d,
|
|
1062
1122
|
htmlFor: u,
|
|
1063
1123
|
isRequired: b,
|
|
1064
|
-
children: /* @__PURE__ */
|
|
1124
|
+
children: /* @__PURE__ */ U(De, {
|
|
1065
1125
|
id: u,
|
|
1066
|
-
value:
|
|
1067
|
-
defaultOptions: m ? [
|
|
1126
|
+
value: Dn(m),
|
|
1127
|
+
defaultOptions: m ? [Dn(m)] : void 0,
|
|
1068
1128
|
onChange: (e) => {
|
|
1069
1129
|
S(e?.value);
|
|
1070
1130
|
},
|
|
@@ -1073,7 +1133,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1073
1133
|
menuPlacement: "auto",
|
|
1074
1134
|
...v,
|
|
1075
1135
|
unstyled: !0,
|
|
1076
|
-
classNames:
|
|
1136
|
+
classNames: rn,
|
|
1077
1137
|
styles: { menuPortal: (e) => ({
|
|
1078
1138
|
...e,
|
|
1079
1139
|
zIndex: 99999999
|
|
@@ -1086,32 +1146,32 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1086
1146
|
noOptionsMessage: ({ inputValue: e }) => e ? "No results found. Try searching something else" : "Start typing to search"
|
|
1087
1147
|
})
|
|
1088
1148
|
});
|
|
1089
|
-
},
|
|
1149
|
+
}, kn = "xgv9uh0", An = "xgv9uh1", jn = "xgv9uh2", Mn = "xgv9uh3", Nn = "xgv9uh4", Pn = "xgv9uh5", Fn = (e) => {
|
|
1090
1150
|
let n = E(29), { field: r } = e, { key: i, label: a } = r, s = i === void 0 ? "" : i, c = a === void 0 ? "" : a, l;
|
|
1091
1151
|
n[0] === s ? l = n[1] : (l = { name: s }, n[0] = s, n[1] = l);
|
|
1092
|
-
let u =
|
|
1152
|
+
let u = ae(l), d, f, p, m, h, g;
|
|
1093
1153
|
if (n[2] !== r || n[3] !== s || n[4] !== c || n[5] !== u) {
|
|
1094
1154
|
let { fields: e, ...i } = u;
|
|
1095
|
-
d = i, m =
|
|
1155
|
+
d = i, m = kn, h = s, n[12] !== s || n[13] !== c ? (g = c && /* @__PURE__ */ U(o, {
|
|
1096
1156
|
htmlFor: s,
|
|
1097
1157
|
className: "_1ompjs11",
|
|
1098
1158
|
children: c
|
|
1099
|
-
}), n[12] = s, n[13] = c, n[14] = g) : g = n[14], f =
|
|
1100
|
-
className:
|
|
1101
|
-
children: [/* @__PURE__ */
|
|
1102
|
-
className:
|
|
1103
|
-
children: /* @__PURE__ */
|
|
1159
|
+
}), n[12] = s, n[13] = c, n[14] = g) : g = n[14], f = An, p = e?.map((e, n) => /* @__PURE__ */ W("div", {
|
|
1160
|
+
className: Mn,
|
|
1161
|
+
children: [/* @__PURE__ */ U("div", {
|
|
1162
|
+
className: Nn,
|
|
1163
|
+
children: /* @__PURE__ */ U(On, { field: {
|
|
1104
1164
|
...r,
|
|
1105
1165
|
key: `${s}.${n}`,
|
|
1106
1166
|
label: ""
|
|
1107
1167
|
} })
|
|
1108
|
-
}), /* @__PURE__ */
|
|
1168
|
+
}), /* @__PURE__ */ U(t, {
|
|
1109
1169
|
variant: "ghost",
|
|
1110
1170
|
size: "icon-sm",
|
|
1111
|
-
className:
|
|
1171
|
+
className: Pn,
|
|
1112
1172
|
onClick: () => d.remove(n),
|
|
1113
1173
|
"aria-label": `Remove location ${n + 1}`,
|
|
1114
|
-
children: /* @__PURE__ */
|
|
1174
|
+
children: /* @__PURE__ */ U(xe, { size: 14 })
|
|
1115
1175
|
})]
|
|
1116
1176
|
}, e.id)), n[2] = r, n[3] = s, n[4] = c, n[5] = u, n[6] = d, n[7] = f, n[8] = p, n[9] = m, n[10] = h, n[11] = g;
|
|
1117
1177
|
} else d = n[6], f = n[7], p = n[8], m = n[9], h = n[10], g = n[11];
|
|
@@ -1120,36 +1180,36 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1120
1180
|
d.append(null);
|
|
1121
1181
|
}, n[15] = d, n[16] = _);
|
|
1122
1182
|
let v;
|
|
1123
|
-
n[17] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */
|
|
1183
|
+
n[17] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ U(be, { size: 14 }), n[17] = v) : v = n[17];
|
|
1124
1184
|
let y;
|
|
1125
|
-
n[18] === _ ? y = n[19] : (y = /* @__PURE__ */
|
|
1185
|
+
n[18] === _ ? y = n[19] : (y = /* @__PURE__ */ W(t, {
|
|
1126
1186
|
variant: "ghost",
|
|
1127
1187
|
size: "xs",
|
|
1128
|
-
className:
|
|
1188
|
+
className: jn,
|
|
1129
1189
|
onClick: _,
|
|
1130
1190
|
children: [v, "Add"]
|
|
1131
1191
|
}), n[18] = _, n[19] = y);
|
|
1132
1192
|
let b;
|
|
1133
|
-
n[20] !== y || n[21] !== f || n[22] !== p ? (b = /* @__PURE__ */
|
|
1193
|
+
n[20] !== y || n[21] !== f || n[22] !== p ? (b = /* @__PURE__ */ W("div", {
|
|
1134
1194
|
className: f,
|
|
1135
1195
|
children: [p, y]
|
|
1136
1196
|
}), n[20] = y, n[21] = f, n[22] = p, n[23] = b) : b = n[23];
|
|
1137
1197
|
let x;
|
|
1138
|
-
return n[24] !== b || n[25] !== m || n[26] !== h || n[27] !== g ? (x = /* @__PURE__ */
|
|
1198
|
+
return n[24] !== b || n[25] !== m || n[26] !== h || n[27] !== g ? (x = /* @__PURE__ */ W("div", {
|
|
1139
1199
|
className: m,
|
|
1140
1200
|
children: [g, b]
|
|
1141
1201
|
}, h), n[24] = b, n[25] = m, n[26] = h, n[27] = g, n[28] = x) : x = n[28], x;
|
|
1142
|
-
},
|
|
1202
|
+
}, In = "a22xph0", Ln = "a22xph2", Rn = "a22xph3", zn = "a22xph5", Bn = /[\n\t,]+/, Vn = ({ field: e }) => {
|
|
1143
1203
|
let { key: t = "", label: n = "", helper_text: r = "", readonly: i = !1 } = e, a = t, { field: { value: o, onChange: s, onBlur: u, ref: d }, fieldState: f } = Q({
|
|
1144
1204
|
name: a,
|
|
1145
1205
|
rules: c(e)
|
|
1146
|
-
}), p = !!e?.required, m = f?.error?.message, h = Array.isArray(o) ? o : [], [g, _] =
|
|
1206
|
+
}), p = !!e?.required, m = f?.error?.message, h = Array.isArray(o) ? o : [], [g, _] = V(""), [v, y] = V(-1), b = B(null), x = I((e) => {
|
|
1147
1207
|
b.current = e, typeof d == "function" && d(e);
|
|
1148
1208
|
}, [d]), S = I((e) => {
|
|
1149
1209
|
s(h.filter((t, n) => n !== e));
|
|
1150
1210
|
}, [h, s]), C = I(() => {
|
|
1151
1211
|
if (!g.trim()) return;
|
|
1152
|
-
let e = g.split(
|
|
1212
|
+
let e = g.split(Bn), t = [...h];
|
|
1153
1213
|
for (let n of e) {
|
|
1154
1214
|
let e = n.trim();
|
|
1155
1215
|
e && !t.includes(e) && t.push(e);
|
|
@@ -1192,9 +1252,9 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1192
1252
|
S
|
|
1193
1253
|
]), T = I((e) => {
|
|
1194
1254
|
let t = e.clipboardData.getData("text");
|
|
1195
|
-
if (
|
|
1255
|
+
if (Bn.test(t)) {
|
|
1196
1256
|
e.preventDefault();
|
|
1197
|
-
let n = t.split(
|
|
1257
|
+
let n = t.split(Bn), r = [...h];
|
|
1198
1258
|
for (let e of n) {
|
|
1199
1259
|
let t = e.trim();
|
|
1200
1260
|
t && !r.includes(t) && r.push(t);
|
|
@@ -1206,23 +1266,23 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1206
1266
|
}, []), D = I(() => {
|
|
1207
1267
|
C(), y(-1), u();
|
|
1208
1268
|
}, [C, u]);
|
|
1209
|
-
return /* @__PURE__ */
|
|
1269
|
+
return /* @__PURE__ */ U(l, {
|
|
1210
1270
|
error: m,
|
|
1211
1271
|
helperText: r,
|
|
1212
1272
|
label: n,
|
|
1213
1273
|
htmlFor: a,
|
|
1214
1274
|
isRequired: p,
|
|
1215
|
-
children: /* @__PURE__ */
|
|
1216
|
-
className:
|
|
1275
|
+
children: /* @__PURE__ */ W("div", {
|
|
1276
|
+
className: In,
|
|
1217
1277
|
"data-readonly": i,
|
|
1218
1278
|
onClick: E,
|
|
1219
|
-
children: [h.map((e, t) => /* @__PURE__ */
|
|
1220
|
-
className:
|
|
1279
|
+
children: [h.map((e, t) => /* @__PURE__ */ W("span", {
|
|
1280
|
+
className: Ln,
|
|
1221
1281
|
"data-active": v === t,
|
|
1222
|
-
children: [/* @__PURE__ */
|
|
1223
|
-
className:
|
|
1282
|
+
children: [/* @__PURE__ */ U("span", {
|
|
1283
|
+
className: Rn,
|
|
1224
1284
|
children: e
|
|
1225
|
-
}), !i && /* @__PURE__ */
|
|
1285
|
+
}), !i && /* @__PURE__ */ U("button", {
|
|
1226
1286
|
type: "button",
|
|
1227
1287
|
className: "a22xph4",
|
|
1228
1288
|
onClick: (e) => {
|
|
@@ -1230,12 +1290,12 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1230
1290
|
},
|
|
1231
1291
|
"aria-label": `Remove ${e}`,
|
|
1232
1292
|
tabIndex: -1,
|
|
1233
|
-
children: /* @__PURE__ */
|
|
1293
|
+
children: /* @__PURE__ */ U(Ce, { size: 12 })
|
|
1234
1294
|
})]
|
|
1235
|
-
}, `${e}-${t}`)), /* @__PURE__ */
|
|
1295
|
+
}, `${e}-${t}`)), /* @__PURE__ */ U("input", {
|
|
1236
1296
|
ref: x,
|
|
1237
1297
|
id: a,
|
|
1238
|
-
className:
|
|
1298
|
+
className: zn,
|
|
1239
1299
|
type: "text",
|
|
1240
1300
|
value: g,
|
|
1241
1301
|
onChange: (e) => _(e.target.value),
|
|
@@ -1249,36 +1309,36 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1249
1309
|
})]
|
|
1250
1310
|
})
|
|
1251
1311
|
});
|
|
1252
|
-
},
|
|
1312
|
+
}, Hn = "jqes4z0", Un = "jqes4z2", Wn = "jqes4z3", Gn = "_1mrsmih0", Kn = "_1mrsmih1", qn = "_1mrsmih2", Jn = "_1mrsmih3", Yn = (e) => {
|
|
1253
1313
|
let t = E(8), n, r;
|
|
1254
1314
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1255
1315
|
let i;
|
|
1256
|
-
t[3] === n ? i = t[4] : (i = Z(
|
|
1316
|
+
t[3] === n ? i = t[4] : (i = Z(Gn, n), t[3] = n, t[4] = i);
|
|
1257
1317
|
let a;
|
|
1258
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */
|
|
1318
|
+
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ U(ke, {
|
|
1259
1319
|
"data-slot": "radio-group",
|
|
1260
1320
|
className: i,
|
|
1261
1321
|
...r
|
|
1262
1322
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
1263
|
-
},
|
|
1323
|
+
}, Xn = (e) => {
|
|
1264
1324
|
let t = E(9), n, r;
|
|
1265
1325
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1266
1326
|
let i;
|
|
1267
|
-
t[3] === n ? i = t[4] : (i = Z(
|
|
1327
|
+
t[3] === n ? i = t[4] : (i = Z(Kn, n), t[3] = n, t[4] = i);
|
|
1268
1328
|
let a;
|
|
1269
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */
|
|
1329
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ U(Oe.Indicator, {
|
|
1270
1330
|
"data-slot": "radio-group-indicator",
|
|
1271
|
-
className:
|
|
1272
|
-
children: /* @__PURE__ */
|
|
1331
|
+
className: qn,
|
|
1332
|
+
children: /* @__PURE__ */ U("span", { className: Jn })
|
|
1273
1333
|
}), t[5] = a) : a = t[5];
|
|
1274
1334
|
let o;
|
|
1275
|
-
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */
|
|
1335
|
+
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */ U(Oe.Root, {
|
|
1276
1336
|
"data-slot": "radio-group-item",
|
|
1277
1337
|
className: i,
|
|
1278
1338
|
...r,
|
|
1279
1339
|
children: a
|
|
1280
1340
|
}), t[6] = r, t[7] = i, t[8] = o) : o = t[8], o;
|
|
1281
|
-
},
|
|
1341
|
+
}, Zn = (e) => {
|
|
1282
1342
|
let t = E(56), { field: n } = e, [r, i] = j.useState(""), [a, s] = j.useState(!1), { key: u, label: d, helper_text: f, readonly: p, values: m, options: h } = n, g = u === void 0 ? "" : u, _ = d === void 0 ? "" : d, v = f === void 0 ? "" : f, b = p === void 0 ? !1 : p, x;
|
|
1283
1343
|
t[0] === m ? x = t[1] : (x = m === void 0 ? [] : m, t[0] = m, t[1] = x);
|
|
1284
1344
|
let S = x, C;
|
|
@@ -1293,7 +1353,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1293
1353
|
let { field: k, fieldState: A } = Q(O), M, N, P, F;
|
|
1294
1354
|
t[9] === k ? (M = t[10], N = t[11], P = t[12], F = t[13]) : ({value: F, onBlur: M, onChange: N, ...P} = k, t[9] = k, t[10] = M, t[11] = N, t[12] = P, t[13] = F);
|
|
1295
1355
|
let I = !!n?.required, L = A?.error?.message, R;
|
|
1296
|
-
t[14] === S ? R = t[15] : (R =
|
|
1356
|
+
t[14] === S ? R = t[15] : (R = dt(S), t[14] = S, t[15] = R);
|
|
1297
1357
|
let z = R, B, V;
|
|
1298
1358
|
t[16] !== z || t[17] !== a || t[18] !== F ? (B = () => {
|
|
1299
1359
|
a || F && z.findIndex((e) => e.value === F) === -1 && (s(!0), i(F));
|
|
@@ -1302,8 +1362,8 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1302
1362
|
z,
|
|
1303
1363
|
a
|
|
1304
1364
|
], t[16] = z, t[17] = a, t[18] = F, t[19] = B, t[20] = V) : (B = t[19], V = t[20]), j.useEffect(B, V);
|
|
1305
|
-
let
|
|
1306
|
-
t[21] ===
|
|
1365
|
+
let H = b && "jqes4z1", G;
|
|
1366
|
+
t[21] === H ? G = t[22] : (G = Z(Hn, H), t[21] = H, t[22] = G);
|
|
1307
1367
|
let K;
|
|
1308
1368
|
t[23] !== N || t[24] !== r ? (K = (e) => {
|
|
1309
1369
|
N && (e === "Other" ? (s(!0), N(r)) : (s(!1), N(e)));
|
|
@@ -1313,34 +1373,34 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1313
1373
|
let J = a ? "Other" : F ?? "", Y;
|
|
1314
1374
|
if (t[28] !== z || t[29] !== T) {
|
|
1315
1375
|
let e;
|
|
1316
|
-
t[31] === T ? e = t[32] : (e = (e, t) => /* @__PURE__ */
|
|
1317
|
-
className:
|
|
1318
|
-
children: [/* @__PURE__ */
|
|
1376
|
+
t[31] === T ? e = t[32] : (e = (e, t) => /* @__PURE__ */ W("div", {
|
|
1377
|
+
className: Un,
|
|
1378
|
+
children: [/* @__PURE__ */ U(Xn, {
|
|
1319
1379
|
id: `${T}-${e.value}-${t}`,
|
|
1320
1380
|
value: e.value
|
|
1321
|
-
}), /* @__PURE__ */
|
|
1381
|
+
}), /* @__PURE__ */ U(o, {
|
|
1322
1382
|
htmlFor: `${T}-${e.value}-${t}`,
|
|
1323
|
-
className:
|
|
1383
|
+
className: Wn,
|
|
1324
1384
|
children: e.label
|
|
1325
1385
|
})]
|
|
1326
1386
|
}, `${e.value}-${t}`), t[31] = T, t[32] = e), Y = z.map(e), t[28] = z, t[29] = T, t[30] = Y;
|
|
1327
1387
|
} else Y = t[30];
|
|
1328
1388
|
let X;
|
|
1329
|
-
t[33] !== w || t[34] !== T || t[35] !== N || t[36] !== a || t[37] !== r ? (X = !!w && /* @__PURE__ */
|
|
1389
|
+
t[33] !== w || t[34] !== T || t[35] !== N || t[36] !== a || t[37] !== r ? (X = !!w && /* @__PURE__ */ W("div", {
|
|
1330
1390
|
className: "jqes4z4",
|
|
1331
1391
|
children: [
|
|
1332
|
-
/* @__PURE__ */
|
|
1392
|
+
/* @__PURE__ */ U(Xn, {
|
|
1333
1393
|
id: `${T}-other`,
|
|
1334
1394
|
value: "Other"
|
|
1335
1395
|
}),
|
|
1336
|
-
/* @__PURE__ */
|
|
1396
|
+
/* @__PURE__ */ U(o, {
|
|
1337
1397
|
className: "jqes4z3",
|
|
1338
1398
|
htmlFor: `${T}-other`,
|
|
1339
1399
|
children: "Other:"
|
|
1340
1400
|
}),
|
|
1341
|
-
/* @__PURE__ */
|
|
1401
|
+
/* @__PURE__ */ U("div", {
|
|
1342
1402
|
className: "jqes4z6",
|
|
1343
|
-
children: /* @__PURE__ */
|
|
1403
|
+
children: /* @__PURE__ */ U(y, {
|
|
1344
1404
|
className: "jqes4z5",
|
|
1345
1405
|
name: `radio-other-${T}`,
|
|
1346
1406
|
value: r,
|
|
@@ -1354,7 +1414,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1354
1414
|
]
|
|
1355
1415
|
}), t[33] = w, t[34] = T, t[35] = N, t[36] = a, t[37] = r, t[38] = X) : X = t[38];
|
|
1356
1416
|
let ee;
|
|
1357
|
-
t[39] !== T || t[40] !== P || t[41] !== G || t[42] !== K || t[43] !== q || t[44] !== J || t[45] !== Y || t[46] !== X ? (ee = /* @__PURE__ */
|
|
1417
|
+
t[39] !== T || t[40] !== P || t[41] !== G || t[42] !== K || t[43] !== q || t[44] !== J || t[45] !== Y || t[46] !== X ? (ee = /* @__PURE__ */ W(Yn, {
|
|
1358
1418
|
id: T,
|
|
1359
1419
|
className: G,
|
|
1360
1420
|
onValueChange: K,
|
|
@@ -1364,7 +1424,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1364
1424
|
children: [Y, X]
|
|
1365
1425
|
}), t[39] = T, t[40] = P, t[41] = G, t[42] = K, t[43] = q, t[44] = J, t[45] = Y, t[46] = X, t[47] = ee) : ee = t[47];
|
|
1366
1426
|
let te;
|
|
1367
|
-
return t[48] !== L || t[49] !== v || t[50] !== I || t[51] !== _ || t[52] !== T || t[53] !== b || t[54] !== ee ? (te = /* @__PURE__ */
|
|
1427
|
+
return t[48] !== L || t[49] !== v || t[50] !== I || t[51] !== _ || t[52] !== T || t[53] !== b || t[54] !== ee ? (te = /* @__PURE__ */ U(l, {
|
|
1368
1428
|
error: L,
|
|
1369
1429
|
helperText: v,
|
|
1370
1430
|
readOnly: b,
|
|
@@ -1373,7 +1433,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1373
1433
|
isRequired: I,
|
|
1374
1434
|
children: ee
|
|
1375
1435
|
}), t[48] = L, t[49] = v, t[50] = I, t[51] = _, t[52] = T, t[53] = b, t[54] = ee, t[55] = te) : te = t[55], te;
|
|
1376
|
-
},
|
|
1436
|
+
}, Qn = "i9l98i0", $n = ne({
|
|
1377
1437
|
defaultClassName: "_193nrs70",
|
|
1378
1438
|
variantClassNames: { size: {
|
|
1379
1439
|
default: "_193nrs71",
|
|
@@ -1381,26 +1441,26 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1381
1441
|
} },
|
|
1382
1442
|
defaultVariants: { size: "default" },
|
|
1383
1443
|
compoundVariants: []
|
|
1384
|
-
}),
|
|
1444
|
+
}), er = "_193nrs73", tr = "_193nrs74", nr = "_193nrs75", rr = (e) => {
|
|
1385
1445
|
let t = E(15), n, r, i;
|
|
1386
1446
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: n, size: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1387
1447
|
let a = i === void 0 ? "default" : i, o;
|
|
1388
|
-
t[4] !== n || t[5] !== a ? (o = Z(
|
|
1389
|
-
let s = a === "sm" ?
|
|
1390
|
-
t[7] === s ? c = t[8] : (c = Z(
|
|
1448
|
+
t[4] !== n || t[5] !== a ? (o = Z($n({ size: a }), n), t[4] = n, t[5] = a, t[6] = o) : o = t[6];
|
|
1449
|
+
let s = a === "sm" ? nr : tr, c;
|
|
1450
|
+
t[7] === s ? c = t[8] : (c = Z(er, s), t[7] = s, t[8] = c);
|
|
1391
1451
|
let l;
|
|
1392
|
-
t[9] === c ? l = t[10] : (l = /* @__PURE__ */
|
|
1452
|
+
t[9] === c ? l = t[10] : (l = /* @__PURE__ */ U(Ae.Thumb, {
|
|
1393
1453
|
"data-slot": "switch-thumb",
|
|
1394
1454
|
className: c
|
|
1395
1455
|
}), t[9] = c, t[10] = l);
|
|
1396
1456
|
let u;
|
|
1397
|
-
return t[11] !== r || t[12] !== o || t[13] !== l ? (u = /* @__PURE__ */
|
|
1457
|
+
return t[11] !== r || t[12] !== o || t[13] !== l ? (u = /* @__PURE__ */ U(Ae.Root, {
|
|
1398
1458
|
"data-slot": "switch",
|
|
1399
1459
|
className: o,
|
|
1400
1460
|
...r,
|
|
1401
1461
|
children: l
|
|
1402
1462
|
}), t[11] = r, t[12] = o, t[13] = l, t[14] = u) : u = t[14], u;
|
|
1403
|
-
},
|
|
1463
|
+
}, ir = (e) => {
|
|
1404
1464
|
let t = E(32), { field: n } = e, { key: r, label: i, helper_text: a, readonly: o } = n, u = r === void 0 ? "" : r, d = i === void 0 ? "" : i, f = a === void 0 ? "" : a, p = o === void 0 ? !1 : o, m = u, h;
|
|
1405
1465
|
t[0] === n ? h = t[1] : (h = c(n), t[0] = n, t[1] = h);
|
|
1406
1466
|
let g;
|
|
@@ -1415,7 +1475,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1415
1475
|
let O;
|
|
1416
1476
|
t[12] === y ? O = t[13] : (O = () => y?.(), t[12] = y, t[13] = O);
|
|
1417
1477
|
let k;
|
|
1418
|
-
t[14] !== m || t[15] !== x || t[16] !== O || t[17] !== T || t[18] !== D ? (k = /* @__PURE__ */
|
|
1478
|
+
t[14] !== m || t[15] !== x || t[16] !== O || t[17] !== T || t[18] !== D ? (k = /* @__PURE__ */ U(rr, {
|
|
1419
1479
|
id: m,
|
|
1420
1480
|
checked: T,
|
|
1421
1481
|
onCheckedChange: D,
|
|
@@ -1423,24 +1483,24 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1423
1483
|
...x
|
|
1424
1484
|
}), t[14] = m, t[15] = x, t[16] = O, t[17] = T, t[18] = D, t[19] = k) : k = t[19];
|
|
1425
1485
|
let A;
|
|
1426
|
-
t[20] !== C || t[21] !== d || t[22] !== m ? (A = /* @__PURE__ */
|
|
1486
|
+
t[20] !== C || t[21] !== d || t[22] !== m ? (A = /* @__PURE__ */ U(s, {
|
|
1427
1487
|
label: d,
|
|
1428
1488
|
isRequired: C,
|
|
1429
1489
|
htmlFor: m
|
|
1430
1490
|
}), t[20] = C, t[21] = d, t[22] = m, t[23] = A) : A = t[23];
|
|
1431
1491
|
let j;
|
|
1432
|
-
t[24] !== k || t[25] !== A ? (j = /* @__PURE__ */
|
|
1433
|
-
className:
|
|
1492
|
+
t[24] !== k || t[25] !== A ? (j = /* @__PURE__ */ W("div", {
|
|
1493
|
+
className: Qn,
|
|
1434
1494
|
children: [k, A]
|
|
1435
1495
|
}), t[24] = k, t[25] = A, t[26] = j) : j = t[26];
|
|
1436
1496
|
let M;
|
|
1437
|
-
return t[27] !== w || t[28] !== f || t[29] !== p || t[30] !== j ? (M = /* @__PURE__ */
|
|
1497
|
+
return t[27] !== w || t[28] !== f || t[29] !== p || t[30] !== j ? (M = /* @__PURE__ */ U(l, {
|
|
1438
1498
|
error: w,
|
|
1439
1499
|
helperText: f,
|
|
1440
1500
|
readOnly: p,
|
|
1441
1501
|
children: j
|
|
1442
1502
|
}), t[27] = w, t[28] = f, t[29] = p, t[30] = j, t[31] = M) : M = t[31], M;
|
|
1443
|
-
},
|
|
1503
|
+
}, ar = "gaaqp00", or = (e) => {
|
|
1444
1504
|
let t = E(29), { field: n } = e, { key: r, label: i, helper_text: a, readonly: o } = n, s = r === void 0 ? "" : r, u = i === void 0 ? "" : i, d = a === void 0 ? "" : a, f = o === void 0 ? !1 : o, p = s, m = !!n?.required, h;
|
|
1445
1505
|
t[0] === n ? h = t[1] : (h = c(n), t[0] = n, t[1] = h);
|
|
1446
1506
|
let g;
|
|
@@ -1451,9 +1511,9 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1451
1511
|
let { field: v, fieldState: y } = Q(g), b, x, S, C, w, T;
|
|
1452
1512
|
t[5] === v ? (b = t[6], x = t[7], S = t[8], C = t[9], w = t[10], T = t[11]) : ({value: T, onBlur: x, onChange: S, ref: C, disabled: b, ...w} = v, t[5] = v, t[6] = b, t[7] = x, t[8] = S, t[9] = C, t[10] = w, t[11] = T);
|
|
1453
1513
|
let D = y?.error?.message, O;
|
|
1454
|
-
t[12] === Symbol.for("react.memo_cache_sentinel") ? (O = Z(
|
|
1514
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (O = Z(ar), t[12] = O) : O = t[12];
|
|
1455
1515
|
let k = T || "", A;
|
|
1456
|
-
t[13] !== b || t[14] !== p || t[15] !== x || t[16] !== S || t[17] !== f || t[18] !== C || t[19] !== w || t[20] !== k ? (A = /* @__PURE__ */
|
|
1516
|
+
t[13] !== b || t[14] !== p || t[15] !== x || t[16] !== S || t[17] !== f || t[18] !== C || t[19] !== w || t[20] !== k ? (A = /* @__PURE__ */ U(_, {
|
|
1457
1517
|
id: p,
|
|
1458
1518
|
className: O,
|
|
1459
1519
|
readOnly: f,
|
|
@@ -1465,7 +1525,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1465
1525
|
...w
|
|
1466
1526
|
}), t[13] = b, t[14] = p, t[15] = x, t[16] = S, t[17] = f, t[18] = C, t[19] = w, t[20] = k, t[21] = A) : A = t[21];
|
|
1467
1527
|
let j;
|
|
1468
|
-
return t[22] !== D || t[23] !== d || t[24] !== m || t[25] !== u || t[26] !== p || t[27] !== A ? (j = /* @__PURE__ */
|
|
1528
|
+
return t[22] !== D || t[23] !== d || t[24] !== m || t[25] !== u || t[26] !== p || t[27] !== A ? (j = /* @__PURE__ */ U(l, {
|
|
1469
1529
|
error: D,
|
|
1470
1530
|
helperText: d,
|
|
1471
1531
|
label: u,
|
|
@@ -1473,7 +1533,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1473
1533
|
isRequired: m,
|
|
1474
1534
|
children: A
|
|
1475
1535
|
}), t[22] = D, t[23] = d, t[24] = m, t[25] = u, t[26] = p, t[27] = A, t[28] = j) : j = t[28], j;
|
|
1476
|
-
},
|
|
1536
|
+
}, sr = (e) => {
|
|
1477
1537
|
let t = E(36), n, r, i;
|
|
1478
1538
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({field: n, inputStyles: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1479
1539
|
let { key: a, label: o, helper_text: s, readonly: u } = n, d = a === void 0 ? "" : a, f = o === void 0 ? "" : o, p = s === void 0 ? "" : s, m = u === void 0 ? !1 : u, h = d, g = !!n?.required, _;
|
|
@@ -1488,7 +1548,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1488
1548
|
let k = x?.error?.message, A;
|
|
1489
1549
|
t[16] === i ? A = t[17] : (A = Z(i), t[16] = i, t[17] = A);
|
|
1490
1550
|
let j = O || "", M;
|
|
1491
|
-
t[18] !== S || t[19] !== r || t[20] !== h || t[21] !== C || t[22] !== w || t[23] !== m || t[24] !== T || t[25] !== D || t[26] !== A || t[27] !== j ? (M = /* @__PURE__ */
|
|
1551
|
+
t[18] !== S || t[19] !== r || t[20] !== h || t[21] !== C || t[22] !== w || t[23] !== m || t[24] !== T || t[25] !== D || t[26] !== A || t[27] !== j ? (M = /* @__PURE__ */ U(y, {
|
|
1492
1552
|
id: h,
|
|
1493
1553
|
className: A,
|
|
1494
1554
|
readOnly: m,
|
|
@@ -1501,7 +1561,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1501
1561
|
...r
|
|
1502
1562
|
}), t[18] = S, t[19] = r, t[20] = h, t[21] = C, t[22] = w, t[23] = m, t[24] = T, t[25] = D, t[26] = A, t[27] = j, t[28] = M) : M = t[28];
|
|
1503
1563
|
let N;
|
|
1504
|
-
return t[29] !== k || t[30] !== p || t[31] !== g || t[32] !== f || t[33] !== h || t[34] !== M ? (N = /* @__PURE__ */
|
|
1564
|
+
return t[29] !== k || t[30] !== p || t[31] !== g || t[32] !== f || t[33] !== h || t[34] !== M ? (N = /* @__PURE__ */ U(l, {
|
|
1505
1565
|
error: k,
|
|
1506
1566
|
helperText: p,
|
|
1507
1567
|
label: f,
|
|
@@ -1509,7 +1569,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1509
1569
|
isRequired: g,
|
|
1510
1570
|
children: M
|
|
1511
1571
|
}), t[29] = k, t[30] = p, t[31] = g, t[32] = f, t[33] = h, t[34] = M, t[35] = N) : N = t[35], N;
|
|
1512
|
-
},
|
|
1572
|
+
}, cr = (e) => {
|
|
1513
1573
|
let t = E(27), { field: n } = e, { key: r, label: i, helper_text: a, readonly: o } = n, s = r === void 0 ? "" : r, u = i === void 0 ? "" : i, d = a === void 0 ? "" : a, f = o === void 0 ? !1 : o, p = s, m;
|
|
1514
1574
|
t[0] === n ? m = t[1] : (m = c(n), t[0] = n, t[1] = m);
|
|
1515
1575
|
let h;
|
|
@@ -1520,7 +1580,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1520
1580
|
let { field: g, fieldState: _ } = Q(h), { value: v, onBlur: b, onChange: x, ref: S } = g, C = !!n?.required, w = _?.error?.message, T = v || "", D;
|
|
1521
1581
|
t[5] === x ? D = t[6] : (D = (e) => x(e.target.value || null), t[5] = x, t[6] = D);
|
|
1522
1582
|
let O;
|
|
1523
|
-
t[7] !== x || t[8] !== f || t[9] !== v ? (O = v && !f ? /* @__PURE__ */
|
|
1583
|
+
t[7] !== x || t[8] !== f || t[9] !== v ? (O = v && !f ? /* @__PURE__ */ U("button", {
|
|
1524
1584
|
type: "button",
|
|
1525
1585
|
onClick: (e) => {
|
|
1526
1586
|
e.preventDefault(), e.stopPropagation(), x(null);
|
|
@@ -1533,10 +1593,10 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1533
1593
|
padding: 0
|
|
1534
1594
|
},
|
|
1535
1595
|
"aria-label": "Clear time",
|
|
1536
|
-
children: /* @__PURE__ */
|
|
1596
|
+
children: /* @__PURE__ */ U(Ce, { size: 16 })
|
|
1537
1597
|
}) : void 0, t[7] = x, t[8] = f, t[9] = v, t[10] = O) : O = t[10];
|
|
1538
1598
|
let k;
|
|
1539
|
-
t[11] !== p || t[12] !== b || t[13] !== f || t[14] !== S || t[15] !== O || t[16] !== T || t[17] !== D ? (k = /* @__PURE__ */
|
|
1599
|
+
t[11] !== p || t[12] !== b || t[13] !== f || t[14] !== S || t[15] !== O || t[16] !== T || t[17] !== D ? (k = /* @__PURE__ */ U(y, {
|
|
1540
1600
|
id: p,
|
|
1541
1601
|
ref: S,
|
|
1542
1602
|
type: "time",
|
|
@@ -1547,7 +1607,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1547
1607
|
rightIcon: O
|
|
1548
1608
|
}), t[11] = p, t[12] = b, t[13] = f, t[14] = S, t[15] = O, t[16] = T, t[17] = D, t[18] = k) : k = t[18];
|
|
1549
1609
|
let A;
|
|
1550
|
-
return t[19] !== w || t[20] !== d || t[21] !== C || t[22] !== u || t[23] !== p || t[24] !== f || t[25] !== k ? (A = /* @__PURE__ */
|
|
1610
|
+
return t[19] !== w || t[20] !== d || t[21] !== C || t[22] !== u || t[23] !== p || t[24] !== f || t[25] !== k ? (A = /* @__PURE__ */ U(l, {
|
|
1551
1611
|
helperText: d,
|
|
1552
1612
|
readOnly: f,
|
|
1553
1613
|
error: w,
|
|
@@ -1556,7 +1616,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1556
1616
|
label: u,
|
|
1557
1617
|
children: k
|
|
1558
1618
|
}), t[19] = w, t[20] = d, t[21] = C, t[22] = u, t[23] = p, t[24] = f, t[25] = k, t[26] = A) : A = t[26], A;
|
|
1559
|
-
},
|
|
1619
|
+
}, lr = "_3j2y9l0", ur = (e) => {
|
|
1560
1620
|
let t = E(28), { field: n } = e, { key: r, label: i, helper_text: a, readonly: s } = n, u = r === void 0 ? "" : r, d = i === void 0 ? "" : i, f = a === void 0 ? "" : a, p = s === void 0 ? !1 : s, m;
|
|
1561
1621
|
t[0] === n ? m = t[1] : (m = c(n), t[0] = n, t[1] = m);
|
|
1562
1622
|
let h;
|
|
@@ -1569,7 +1629,7 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1569
1629
|
let k;
|
|
1570
1630
|
t[7] === y ? k = t[8] : (k = () => y(), t[7] = y, t[8] = k);
|
|
1571
1631
|
let A;
|
|
1572
|
-
t[9] !== C || t[10] !== v || t[11] !== D || t[12] !== O || t[13] !== k ? (A = /* @__PURE__ */
|
|
1632
|
+
t[9] !== C || t[10] !== v || t[11] !== D || t[12] !== O || t[13] !== k ? (A = /* @__PURE__ */ U(vn, {
|
|
1573
1633
|
id: v,
|
|
1574
1634
|
name: v,
|
|
1575
1635
|
checked: D,
|
|
@@ -1578,35 +1638,35 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1578
1638
|
disabled: C
|
|
1579
1639
|
}), t[9] = C, t[10] = v, t[11] = D, t[12] = O, t[13] = k, t[14] = A) : A = t[14];
|
|
1580
1640
|
let j;
|
|
1581
|
-
t[15] !== n.required || t[16] !== d || t[17] !== v ? (j = d && /* @__PURE__ */
|
|
1641
|
+
t[15] !== n.required || t[16] !== d || t[17] !== v ? (j = d && /* @__PURE__ */ W(o, {
|
|
1582
1642
|
htmlFor: v,
|
|
1583
1643
|
className: "_3j2y9l1",
|
|
1584
|
-
children: [d, n?.required && /* @__PURE__ */
|
|
1644
|
+
children: [d, n?.required && /* @__PURE__ */ U("span", {
|
|
1585
1645
|
className: "_1ompjs10",
|
|
1586
1646
|
children: "*"
|
|
1587
1647
|
})]
|
|
1588
1648
|
}), t[15] = n.required, t[16] = d, t[17] = v, t[18] = j) : j = t[18];
|
|
1589
1649
|
let M;
|
|
1590
|
-
t[19] !== x || t[20] !== A || t[21] !== j ? (M = /* @__PURE__ */
|
|
1591
|
-
className:
|
|
1650
|
+
t[19] !== x || t[20] !== A || t[21] !== j ? (M = /* @__PURE__ */ W("div", {
|
|
1651
|
+
className: lr,
|
|
1592
1652
|
ref: x,
|
|
1593
1653
|
children: [A, j]
|
|
1594
1654
|
}), t[19] = x, t[20] = A, t[21] = j, t[22] = M) : M = t[22];
|
|
1595
1655
|
let N;
|
|
1596
|
-
return t[23] !== f || t[24] !== p || t[25] !== M || t[26] !== T ? (N = /* @__PURE__ */
|
|
1656
|
+
return t[23] !== f || t[24] !== p || t[25] !== M || t[26] !== T ? (N = /* @__PURE__ */ U(l, {
|
|
1597
1657
|
error: T,
|
|
1598
1658
|
helperText: f,
|
|
1599
1659
|
readOnly: p,
|
|
1600
1660
|
children: M
|
|
1601
1661
|
}), t[23] = f, t[24] = p, t[25] = M, t[26] = T, t[27] = N) : N = t[27], N;
|
|
1602
|
-
},
|
|
1662
|
+
}, dr = [
|
|
1603
1663
|
"pdf",
|
|
1604
1664
|
"xls",
|
|
1605
1665
|
"xlsx",
|
|
1606
1666
|
"doc",
|
|
1607
1667
|
"docx",
|
|
1608
1668
|
"csv"
|
|
1609
|
-
],
|
|
1669
|
+
], fr = [
|
|
1610
1670
|
"svg",
|
|
1611
1671
|
"png",
|
|
1612
1672
|
"jpg",
|
|
@@ -1614,11 +1674,11 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1614
1674
|
"webp",
|
|
1615
1675
|
"gif",
|
|
1616
1676
|
"avif"
|
|
1617
|
-
],
|
|
1677
|
+
], pr = ["mpeg", "mp4"], mr = [
|
|
1618
1678
|
"mp3",
|
|
1619
1679
|
"ogg",
|
|
1620
1680
|
"oga"
|
|
1621
|
-
],
|
|
1681
|
+
], hr = {
|
|
1622
1682
|
audio: {
|
|
1623
1683
|
"audio/mpeg": [".mp3"],
|
|
1624
1684
|
"audio/ogg": [".oga"]
|
|
@@ -1643,26 +1703,26 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
1643
1703
|
"video/mp4": [".mp4"],
|
|
1644
1704
|
"video/mpeg": [".mpeg"]
|
|
1645
1705
|
}
|
|
1646
|
-
},
|
|
1647
|
-
audio:
|
|
1648
|
-
document:
|
|
1649
|
-
image:
|
|
1650
|
-
video:
|
|
1706
|
+
}, gr = {
|
|
1707
|
+
audio: mr,
|
|
1708
|
+
document: dr,
|
|
1709
|
+
image: fr,
|
|
1710
|
+
video: pr
|
|
1651
1711
|
};
|
|
1652
1712
|
[
|
|
1653
|
-
...
|
|
1654
|
-
...
|
|
1655
|
-
...
|
|
1656
|
-
...
|
|
1713
|
+
...gr.audio,
|
|
1714
|
+
...gr.document,
|
|
1715
|
+
...gr.image,
|
|
1716
|
+
...gr.video
|
|
1657
1717
|
], {
|
|
1658
|
-
...
|
|
1659
|
-
...
|
|
1660
|
-
...
|
|
1661
|
-
...
|
|
1718
|
+
...hr.audio,
|
|
1719
|
+
...hr.document,
|
|
1720
|
+
...hr.image,
|
|
1721
|
+
...hr.video
|
|
1662
1722
|
};
|
|
1663
1723
|
//#endregion
|
|
1664
1724
|
//#region ../../libraries/react-collection/dist/widgets/uploadWidget/MediaCard.cssm.js
|
|
1665
|
-
var
|
|
1725
|
+
var _r = "_11lzwkh0", vr = "_11lzwkh2", yr = "_11lzwkh3", br = "_11lzwkh4", xr = "_11lzwkh5", Sr = "_11lzwkh9", Cr = "_11lzwkha", wr = (e) => {
|
|
1666
1726
|
let n = E(31), { file: r, onDelete: i, onClick: a, showCheckbox: o, isSelected: s, showDelete: c } = e, l = o === void 0 ? !1 : o, u = s === void 0 ? !1 : s, d = c === void 0 ? !0 : c, f;
|
|
1667
1727
|
n[0] !== r || n[1] !== i ? (f = (e) => {
|
|
1668
1728
|
e.stopPropagation(), e.preventDefault(), i?.(r.id);
|
|
@@ -1678,45 +1738,45 @@ var or = "_11lzwkh0", sr = "_11lzwkh2", cr = "_11lzwkh3", lr = "_11lzwkh4", ur =
|
|
|
1678
1738
|
let h = m, g;
|
|
1679
1739
|
n[6] !== r?.filename || n[7] !== r?.location ? (g = r?.filename || r?.location?.split("/")?.[r?.location?.split("/").length - 1], n[6] = r?.filename, n[7] = r?.location, n[8] = g) : g = n[8];
|
|
1680
1740
|
let _ = g, v = r?.location || void 0, y = u && "_11lzwkh1", b;
|
|
1681
|
-
n[9] === y ? b = n[10] : (b = Z(
|
|
1741
|
+
n[9] === y ? b = n[10] : (b = Z(_r, y), n[9] = y, n[10] = b);
|
|
1682
1742
|
let x;
|
|
1683
|
-
n[11] !== r?.kind || n[12] !== r?.location ? (x = r?.kind === "image" ? /* @__PURE__ */
|
|
1743
|
+
n[11] !== r?.kind || n[12] !== r?.location ? (x = r?.kind === "image" ? /* @__PURE__ */ U("img", {
|
|
1684
1744
|
alt: "uploaded-file-icon",
|
|
1685
|
-
className:
|
|
1745
|
+
className: br,
|
|
1686
1746
|
src: r?.location
|
|
1687
|
-
}) : /* @__PURE__ */
|
|
1688
|
-
className:
|
|
1689
|
-
children: /* @__PURE__ */
|
|
1747
|
+
}) : /* @__PURE__ */ U("div", {
|
|
1748
|
+
className: vr,
|
|
1749
|
+
children: /* @__PURE__ */ U(ge, {
|
|
1690
1750
|
size: 60,
|
|
1691
|
-
className:
|
|
1751
|
+
className: yr
|
|
1692
1752
|
})
|
|
1693
1753
|
}), n[11] = r?.kind, n[12] = r?.location, n[13] = x) : x = n[13];
|
|
1694
1754
|
let S;
|
|
1695
|
-
n[14] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */
|
|
1755
|
+
n[14] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ U("div", { className: xr }), n[14] = S) : S = n[14];
|
|
1696
1756
|
let C;
|
|
1697
|
-
n[15] !== u || n[16] !== l ? (C = l && /* @__PURE__ */
|
|
1757
|
+
n[15] !== u || n[16] !== l ? (C = l && /* @__PURE__ */ U("div", {
|
|
1698
1758
|
className: "_11lzwkh8",
|
|
1699
|
-
onClick:
|
|
1700
|
-
children: /* @__PURE__ */
|
|
1759
|
+
onClick: Tr,
|
|
1760
|
+
children: /* @__PURE__ */ U(vn, { checked: u })
|
|
1701
1761
|
}), n[15] = u, n[16] = l, n[17] = C) : C = n[17];
|
|
1702
1762
|
let w;
|
|
1703
|
-
n[18] !== p || n[19] !== d ? (w = d && /* @__PURE__ */
|
|
1763
|
+
n[18] !== p || n[19] !== d ? (w = d && /* @__PURE__ */ U(t, {
|
|
1704
1764
|
className: "_11lzwkh6",
|
|
1705
1765
|
size: "sm",
|
|
1706
1766
|
variant: "secondary",
|
|
1707
1767
|
onClick: p,
|
|
1708
|
-
children: /* @__PURE__ */
|
|
1768
|
+
children: /* @__PURE__ */ U(Ce, { className: "_11lzwkh7" })
|
|
1709
1769
|
}), n[18] = p, n[19] = d, n[20] = w) : w = n[20];
|
|
1710
1770
|
let T;
|
|
1711
|
-
n[21] === _ ? T = n[22] : (T = /* @__PURE__ */
|
|
1712
|
-
className:
|
|
1713
|
-
children: /* @__PURE__ */
|
|
1714
|
-
className:
|
|
1771
|
+
n[21] === _ ? T = n[22] : (T = /* @__PURE__ */ U("div", {
|
|
1772
|
+
className: Sr,
|
|
1773
|
+
children: /* @__PURE__ */ U("p", {
|
|
1774
|
+
className: Cr,
|
|
1715
1775
|
children: _
|
|
1716
1776
|
})
|
|
1717
1777
|
}), n[21] = _, n[22] = T);
|
|
1718
1778
|
let D;
|
|
1719
|
-
return n[23] !== h || n[24] !== x || n[25] !== C || n[26] !== w || n[27] !== T || n[28] !== v || n[29] !== b ? (D = /* @__PURE__ */
|
|
1779
|
+
return n[23] !== h || n[24] !== x || n[25] !== C || n[26] !== w || n[27] !== T || n[28] !== v || n[29] !== b ? (D = /* @__PURE__ */ W("a", {
|
|
1720
1780
|
href: v,
|
|
1721
1781
|
target: "_blank",
|
|
1722
1782
|
rel: "noopener noreferrer",
|
|
@@ -1731,24 +1791,24 @@ var or = "_11lzwkh0", sr = "_11lzwkh2", cr = "_11lzwkh3", lr = "_11lzwkh4", ur =
|
|
|
1731
1791
|
]
|
|
1732
1792
|
}), n[23] = h, n[24] = x, n[25] = C, n[26] = w, n[27] = T, n[28] = v, n[29] = b, n[30] = D) : D = n[30], D;
|
|
1733
1793
|
};
|
|
1734
|
-
function
|
|
1794
|
+
function Tr(e) {
|
|
1735
1795
|
e.preventDefault(), e.stopPropagation();
|
|
1736
1796
|
}
|
|
1737
1797
|
//#endregion
|
|
1738
1798
|
//#region ../../libraries/react-collection/dist/widgets/uploadWidget/modal/FileUploadModal.cssm.js
|
|
1739
|
-
var
|
|
1799
|
+
var Er = "vwpjhx0", Dr = "vwpjhx1", Or = "vwpjhx2", kr = "vwpjhx5", Ar = "vwpjhx6", jr = "vwpjhxb", Mr = (e) => {
|
|
1740
1800
|
let n = E(57), { isOpen: r, setIsOpen: i, files: a, kind: o, allowedExtensions: s, isMultiple: c, isLoading: l, handleUploadFiles: f, handleChange: p } = e, m;
|
|
1741
1801
|
n[0] === i ? m = n[1] : (m = () => i(!1), n[0] = i, n[1] = m);
|
|
1742
1802
|
let h = m, g = a.length, _;
|
|
1743
1803
|
bb0: {
|
|
1744
1804
|
let e;
|
|
1745
1805
|
if (n[2] !== s || n[3] !== o) {
|
|
1746
|
-
let t = o.reduce(
|
|
1806
|
+
let t = o.reduce(Nr, {});
|
|
1747
1807
|
if (!s || s.length === 0) {
|
|
1748
1808
|
_ = t;
|
|
1749
1809
|
break bb0;
|
|
1750
1810
|
}
|
|
1751
|
-
let r = s.map(
|
|
1811
|
+
let r = s.map(Pr);
|
|
1752
1812
|
e = {};
|
|
1753
1813
|
for (let [n, i] of Object.entries(t)) {
|
|
1754
1814
|
let t = i.filter((e) => r.includes(e));
|
|
@@ -1773,36 +1833,36 @@ var hr = "vwpjhx0", gr = "vwpjhx1", _r = "vwpjhx2", vr = "vwpjhx5", yr = "vwpjhx
|
|
|
1773
1833
|
multiple: c,
|
|
1774
1834
|
maxSize: 26214400,
|
|
1775
1835
|
disabled: l,
|
|
1776
|
-
onDropRejected:
|
|
1836
|
+
onDropRejected: Ir
|
|
1777
1837
|
}, n[8] = v, n[9] = l, n[10] = c, n[11] = w, n[12] = T) : T = n[12];
|
|
1778
|
-
let { getRootProps: D, getInputProps: k, isDragActive: A } =
|
|
1779
|
-
n[13] === Symbol.for("react.memo_cache_sentinel") ? (j = Z(
|
|
1838
|
+
let { getRootProps: D, getInputProps: k, isDragActive: A } = je(T), j;
|
|
1839
|
+
n[13] === Symbol.for("react.memo_cache_sentinel") ? (j = Z(Er, u), n[13] = j) : j = n[13];
|
|
1780
1840
|
let M = o?.length > 1 ? "Upload file" : `Upload ${o?.[0]}`, N;
|
|
1781
|
-
n[14] === M ? N = n[15] : (N = /* @__PURE__ */
|
|
1841
|
+
n[14] === M ? N = n[15] : (N = /* @__PURE__ */ U(C, { children: /* @__PURE__ */ U(b, { children: M }) }), n[14] = M, n[15] = N);
|
|
1782
1842
|
let P = l && "vwpjhx3", F;
|
|
1783
|
-
n[16] === P ? F = n[17] : (F = Z(
|
|
1843
|
+
n[16] === P ? F = n[17] : (F = Z(Or, P), n[16] = P, n[17] = F);
|
|
1784
1844
|
let I;
|
|
1785
1845
|
n[18] === D ? I = n[19] : (I = D(), n[18] = D, n[19] = I);
|
|
1786
1846
|
let L;
|
|
1787
|
-
n[20] === l ? L = n[21] : (L = l && /* @__PURE__ */
|
|
1847
|
+
n[20] === l ? L = n[21] : (L = l && /* @__PURE__ */ U("div", {
|
|
1788
1848
|
className: "vwpjhx4",
|
|
1789
|
-
children: /* @__PURE__ */
|
|
1849
|
+
children: /* @__PURE__ */ U(d, {})
|
|
1790
1850
|
}), n[20] = l, n[21] = L);
|
|
1791
1851
|
let R = A ? "Drop your files here..." : c && a.length > 0 ? "Drag & Drop here to upload more!" : a?.length > 0 ? "Drag & Drop here to upload another file!" : "Drag & Drop here to upload file!", z;
|
|
1792
|
-
n[22] === R ? z = n[23] : (z = /* @__PURE__ */
|
|
1793
|
-
className:
|
|
1852
|
+
n[22] === R ? z = n[23] : (z = /* @__PURE__ */ U("p", {
|
|
1853
|
+
className: kr,
|
|
1794
1854
|
children: R
|
|
1795
1855
|
}), n[22] = R, n[23] = z);
|
|
1796
1856
|
let B = l && "vwpjhx7", V;
|
|
1797
|
-
n[24] === B ? V = n[25] : (V = Z(
|
|
1798
|
-
let
|
|
1799
|
-
n[26] === k ?
|
|
1857
|
+
n[24] === B ? V = n[25] : (V = Z(Ar, B), n[24] = B, n[25] = V);
|
|
1858
|
+
let H;
|
|
1859
|
+
n[26] === k ? H = n[27] : (H = k(), n[26] = k, n[27] = H);
|
|
1800
1860
|
let G;
|
|
1801
|
-
n[28] ===
|
|
1861
|
+
n[28] === H ? G = n[29] : (G = /* @__PURE__ */ U("input", { ...H }), n[28] = H, n[29] = G);
|
|
1802
1862
|
let K;
|
|
1803
|
-
n[30] === Symbol.for("react.memo_cache_sentinel") ? (K = /* @__PURE__ */
|
|
1863
|
+
n[30] === Symbol.for("react.memo_cache_sentinel") ? (K = /* @__PURE__ */ U(Se, { size: 14 }), n[30] = K) : K = n[30];
|
|
1804
1864
|
let q;
|
|
1805
|
-
n[31] === G ? q = n[32] : (q = /* @__PURE__ */
|
|
1865
|
+
n[31] === G ? q = n[32] : (q = /* @__PURE__ */ W(t, {
|
|
1806
1866
|
variant: "ghost",
|
|
1807
1867
|
size: "sm",
|
|
1808
1868
|
children: [
|
|
@@ -1812,14 +1872,14 @@ var hr = "vwpjhx0", gr = "vwpjhx1", _r = "vwpjhx2", vr = "vwpjhx5", yr = "vwpjhx
|
|
|
1812
1872
|
]
|
|
1813
1873
|
}), n[31] = G, n[32] = q);
|
|
1814
1874
|
let J;
|
|
1815
|
-
n[33] !== V || n[34] !== q ? (J = /* @__PURE__ */
|
|
1875
|
+
n[33] !== V || n[34] !== q ? (J = /* @__PURE__ */ U("div", {
|
|
1816
1876
|
className: V,
|
|
1817
1877
|
children: q
|
|
1818
1878
|
}), n[33] = V, n[34] = q, n[35] = J) : J = n[35];
|
|
1819
1879
|
let Y;
|
|
1820
|
-
n[36] !== I || n[37] !== L || n[38] !== z || n[39] !== J || n[40] !== F ? (Y = /* @__PURE__ */
|
|
1821
|
-
className:
|
|
1822
|
-
children: /* @__PURE__ */
|
|
1880
|
+
n[36] !== I || n[37] !== L || n[38] !== z || n[39] !== J || n[40] !== F ? (Y = /* @__PURE__ */ U("div", {
|
|
1881
|
+
className: Dr,
|
|
1882
|
+
children: /* @__PURE__ */ W("div", {
|
|
1823
1883
|
className: F,
|
|
1824
1884
|
...I,
|
|
1825
1885
|
children: [
|
|
@@ -1830,14 +1890,14 @@ var hr = "vwpjhx0", gr = "vwpjhx1", _r = "vwpjhx2", vr = "vwpjhx5", yr = "vwpjhx
|
|
|
1830
1890
|
})
|
|
1831
1891
|
}), n[36] = I, n[37] = L, n[38] = z, n[39] = J, n[40] = F, n[41] = Y) : Y = n[41];
|
|
1832
1892
|
let X;
|
|
1833
|
-
n[42] !== a || n[43] !== p ? (X = a.length > 0 && /* @__PURE__ */
|
|
1893
|
+
n[42] !== a || n[43] !== p ? (X = a.length > 0 && /* @__PURE__ */ W("div", {
|
|
1834
1894
|
className: "vwpjhx8",
|
|
1835
|
-
children: [/* @__PURE__ */
|
|
1895
|
+
children: [/* @__PURE__ */ U("h3", {
|
|
1836
1896
|
className: "vwpjhx9",
|
|
1837
1897
|
children: "Selected Files"
|
|
1838
|
-
}), /* @__PURE__ */
|
|
1898
|
+
}), /* @__PURE__ */ U("div", {
|
|
1839
1899
|
className: "vwpjhxa",
|
|
1840
|
-
children: a.map((e) => /* @__PURE__ */
|
|
1900
|
+
children: a.map((e) => /* @__PURE__ */ U(wr, {
|
|
1841
1901
|
file: e,
|
|
1842
1902
|
onDelete: (e) => {
|
|
1843
1903
|
p(a.filter((t) => t.id !== e));
|
|
@@ -1846,16 +1906,16 @@ var hr = "vwpjhx0", gr = "vwpjhx1", _r = "vwpjhx2", vr = "vwpjhx5", yr = "vwpjhx
|
|
|
1846
1906
|
})]
|
|
1847
1907
|
}), n[42] = a, n[43] = p, n[44] = X) : X = n[44];
|
|
1848
1908
|
let ee = g === 1 ? `${g} file` : `${g} files`, te;
|
|
1849
|
-
n[45] !== h || n[46] !== ee ? (te = /* @__PURE__ */
|
|
1850
|
-
className:
|
|
1851
|
-
children: /* @__PURE__ */
|
|
1909
|
+
n[45] !== h || n[46] !== ee ? (te = /* @__PURE__ */ U("div", {
|
|
1910
|
+
className: jr,
|
|
1911
|
+
children: /* @__PURE__ */ W(t, {
|
|
1852
1912
|
variant: "default",
|
|
1853
1913
|
onClick: h,
|
|
1854
1914
|
children: ["Save\xA0", ee]
|
|
1855
1915
|
})
|
|
1856
1916
|
}), n[45] = h, n[46] = ee, n[47] = te) : te = n[47];
|
|
1857
1917
|
let ne;
|
|
1858
|
-
n[48] !== Y || n[49] !== X || n[50] !== te || n[51] !== N ? (ne = /* @__PURE__ */
|
|
1918
|
+
n[48] !== Y || n[49] !== X || n[50] !== te || n[51] !== N ? (ne = /* @__PURE__ */ W(x, {
|
|
1859
1919
|
className: j,
|
|
1860
1920
|
children: [
|
|
1861
1921
|
N,
|
|
@@ -1865,37 +1925,37 @@ var hr = "vwpjhx0", gr = "vwpjhx1", _r = "vwpjhx2", vr = "vwpjhx5", yr = "vwpjhx
|
|
|
1865
1925
|
]
|
|
1866
1926
|
}), n[48] = Y, n[49] = X, n[50] = te, n[51] = N, n[52] = ne) : ne = n[52];
|
|
1867
1927
|
let re;
|
|
1868
|
-
return n[53] !== r || n[54] !== i || n[55] !== ne ? (re = /* @__PURE__ */
|
|
1928
|
+
return n[53] !== r || n[54] !== i || n[55] !== ne ? (re = /* @__PURE__ */ U(S, {
|
|
1869
1929
|
open: r,
|
|
1870
1930
|
onOpenChange: i,
|
|
1871
1931
|
children: ne
|
|
1872
1932
|
}), n[53] = r, n[54] = i, n[55] = ne, n[56] = re) : re = n[56], re;
|
|
1873
1933
|
};
|
|
1874
|
-
function
|
|
1934
|
+
function Nr(e, t) {
|
|
1875
1935
|
return {
|
|
1876
1936
|
...e,
|
|
1877
|
-
...
|
|
1937
|
+
...X[t]
|
|
1878
1938
|
};
|
|
1879
1939
|
}
|
|
1880
|
-
function
|
|
1940
|
+
function Pr(e) {
|
|
1881
1941
|
return `.${e}`;
|
|
1882
1942
|
}
|
|
1883
|
-
function
|
|
1943
|
+
function Fr(e) {
|
|
1884
1944
|
e.errors.forEach((t) => {
|
|
1885
1945
|
t.code === "file-too-large" && O(`${e.file.name} is bigger than 25MB`);
|
|
1886
1946
|
});
|
|
1887
1947
|
}
|
|
1888
|
-
function
|
|
1889
|
-
e.forEach(
|
|
1948
|
+
function Ir(e) {
|
|
1949
|
+
e.forEach(Fr);
|
|
1890
1950
|
}
|
|
1891
1951
|
//#endregion
|
|
1892
1952
|
//#region ../../libraries/react-collection/dist/widgets/uploadWidget/UploadWidget.cssm.js
|
|
1893
|
-
var
|
|
1894
|
-
let o = e.options?.allowed_upload_types, s = o && o.length > 0 ? r.filter((e) => o.includes(e)) : null, u = s && s.length > 0 ? s : r, [f, p] =
|
|
1953
|
+
var Lr = "_156u72w0", Rr = "_156u72w1", zr = (e) => Array.isArray(e) && e.every((e) => typeof e == "object" && !!e && "location" in e), Br = ({ field: e, schema: n, kind: r = q, isMultiple: i, uploadContext: a }) => {
|
|
1954
|
+
let o = e.options?.allowed_upload_types, s = o && o.length > 0 ? r.filter((e) => o.includes(e)) : null, u = s && s.length > 0 ? s : r, [f, p] = V(!1), [m, h] = V(!1), { media: g } = A(), { field: { onChange: _, value: v, onBlur: b, disabled: x, ref: S }, fieldState: C } = Q({
|
|
1895
1955
|
name: e?.key || "",
|
|
1896
1956
|
rules: c(e)
|
|
1897
|
-
}), w = e.options?.allowed_extensions, T =
|
|
1898
|
-
let e = u.flatMap((e) =>
|
|
1957
|
+
}), w = e.options?.allowed_extensions, T = z(() => {
|
|
1958
|
+
let e = u.flatMap((e) => gr[e]);
|
|
1899
1959
|
return w && w.length > 0 ? e.filter((e) => w.includes(e)) : e;
|
|
1900
1960
|
}, [u, w]), E = Array.isArray(v) ? v : v ? [v] : [], O = a ?? (n?.key ? {
|
|
1901
1961
|
module: "collection",
|
|
@@ -1915,7 +1975,7 @@ var Er = "_156u72w0", Dr = "_156u72w1", Or = (e) => Array.isArray(e) && e.every(
|
|
|
1915
1975
|
}), h(!0);
|
|
1916
1976
|
try {
|
|
1917
1977
|
let e = await g?.mediaBulkUpload(t, {}, k);
|
|
1918
|
-
if (e?.content?.data &&
|
|
1978
|
+
if (e?.content?.data && zr(e.content.data)) {
|
|
1919
1979
|
let t = e.content.data;
|
|
1920
1980
|
j(i ? [...E, ...t] : t);
|
|
1921
1981
|
}
|
|
@@ -1926,24 +1986,24 @@ var Er = "_156u72w0", Dr = "_156u72w1", Or = (e) => Array.isArray(e) && e.every(
|
|
|
1926
1986
|
}
|
|
1927
1987
|
}
|
|
1928
1988
|
}, { label: N = "", helper_text: P = "", readonly: F = !1 } = e;
|
|
1929
|
-
return /* @__PURE__ */
|
|
1989
|
+
return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ W(l, {
|
|
1930
1990
|
error: C?.error?.message,
|
|
1931
1991
|
helperText: P,
|
|
1932
1992
|
readOnly: F,
|
|
1933
1993
|
htmlFor: e.key,
|
|
1934
1994
|
isRequired: e?.required,
|
|
1935
1995
|
label: N,
|
|
1936
|
-
children: [/* @__PURE__ */
|
|
1937
|
-
className:
|
|
1996
|
+
children: [/* @__PURE__ */ W("div", {
|
|
1997
|
+
className: Lr,
|
|
1938
1998
|
ref: S,
|
|
1939
|
-
children: [/* @__PURE__ */
|
|
1999
|
+
children: [/* @__PURE__ */ U(t, {
|
|
1940
2000
|
size: "icon",
|
|
1941
2001
|
variant: "outline",
|
|
1942
2002
|
disabled: x || F,
|
|
1943
2003
|
onClick: () => p(!0),
|
|
1944
|
-
className:
|
|
1945
|
-
children: /* @__PURE__ */
|
|
1946
|
-
}), /* @__PURE__ */
|
|
2004
|
+
className: Rr,
|
|
2005
|
+
children: /* @__PURE__ */ U(Se, { size: 15 })
|
|
2006
|
+
}), /* @__PURE__ */ U(y, {
|
|
1947
2007
|
name: "pasteUrl",
|
|
1948
2008
|
placeholder: "Paste your files here...",
|
|
1949
2009
|
onBlur: () => b(),
|
|
@@ -1958,13 +2018,13 @@ var Er = "_156u72w0", Dr = "_156u72w1", Or = (e) => Array.isArray(e) && e.every(
|
|
|
1958
2018
|
},
|
|
1959
2019
|
disabled: x,
|
|
1960
2020
|
readOnly: F,
|
|
1961
|
-
rightIcon: m ? /* @__PURE__ */
|
|
2021
|
+
rightIcon: m ? /* @__PURE__ */ U(d, { size: 16 }) : void 0
|
|
1962
2022
|
})]
|
|
1963
|
-
}), E.length > 0 && /* @__PURE__ */
|
|
2023
|
+
}), E.length > 0 && /* @__PURE__ */ U("div", {
|
|
1964
2024
|
className: "_156u72w2",
|
|
1965
|
-
children: /* @__PURE__ */
|
|
2025
|
+
children: /* @__PURE__ */ U("div", {
|
|
1966
2026
|
className: "_156u72w3",
|
|
1967
|
-
children: E.map((e) => /* @__PURE__ */
|
|
2027
|
+
children: E.map((e) => /* @__PURE__ */ U(wr, {
|
|
1968
2028
|
file: e,
|
|
1969
2029
|
onDelete: (e) => {
|
|
1970
2030
|
j(E.filter((t) => t.id !== e));
|
|
@@ -1972,7 +2032,7 @@ var Er = "_156u72w0", Dr = "_156u72w1", Or = (e) => Array.isArray(e) && e.every(
|
|
|
1972
2032
|
}, e.id))
|
|
1973
2033
|
})
|
|
1974
2034
|
})]
|
|
1975
|
-
}), /* @__PURE__ */
|
|
2035
|
+
}), /* @__PURE__ */ U(Mr, {
|
|
1976
2036
|
isOpen: f,
|
|
1977
2037
|
setIsOpen: p,
|
|
1978
2038
|
files: E,
|
|
@@ -1983,56 +2043,56 @@ var Er = "_156u72w0", Dr = "_156u72w1", Or = (e) => Array.isArray(e) && e.every(
|
|
|
1983
2043
|
handleUploadFiles: M,
|
|
1984
2044
|
handleChange: j
|
|
1985
2045
|
})] });
|
|
1986
|
-
},
|
|
2046
|
+
}, Vr = (e) => {
|
|
1987
2047
|
let t = E(3), n;
|
|
1988
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */
|
|
2048
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ U(_e, { size: 20 }), t[0] = n) : n = t[0];
|
|
1989
2049
|
let r;
|
|
1990
|
-
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */
|
|
2050
|
+
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */ U(sr, {
|
|
1991
2051
|
leftIcon: n,
|
|
1992
2052
|
...e
|
|
1993
2053
|
}), t[1] = e, t[2] = r), r;
|
|
1994
|
-
},
|
|
1995
|
-
TextWidget: $((e) => /* @__PURE__ */
|
|
1996
|
-
NumberWidget: $((e) => /* @__PURE__ */
|
|
2054
|
+
}, Hr = F(() => import("./DateTimeWidget-Bt1UcCnx.js")), Ur = F(() => import("./PhoneWidget-BtMMfGLu.js")), Wr = F(() => import("./RichTextWidget-C3Y-0pNy.js")), Gr = {
|
|
2055
|
+
TextWidget: $((e) => /* @__PURE__ */ U(sr, { ...e })),
|
|
2056
|
+
NumberWidget: $((e) => /* @__PURE__ */ U(sr, {
|
|
1997
2057
|
type: "number",
|
|
1998
2058
|
step: "any",
|
|
1999
2059
|
...e
|
|
2000
2060
|
})),
|
|
2001
|
-
CurrencyWidget: $((e) => /* @__PURE__ */
|
|
2002
|
-
MultiTextWidget: $((e) => /* @__PURE__ */
|
|
2003
|
-
TextareaWidget: $((e) => /* @__PURE__ */
|
|
2004
|
-
RichTextWidget: $((e) => /* @__PURE__ */
|
|
2005
|
-
EmailWidget: $((e) => /* @__PURE__ */
|
|
2006
|
-
PhoneWidget: $((e) => /* @__PURE__ */
|
|
2007
|
-
URLWidget: $((e) => /* @__PURE__ */
|
|
2008
|
-
DropdownWidget: $((e) => /* @__PURE__ */
|
|
2061
|
+
CurrencyWidget: $((e) => /* @__PURE__ */ U(bn, { ...e })),
|
|
2062
|
+
MultiTextWidget: $((e) => /* @__PURE__ */ U(Vn, { ...e })),
|
|
2063
|
+
TextareaWidget: $((e) => /* @__PURE__ */ U(or, { ...e })),
|
|
2064
|
+
RichTextWidget: $((e) => /* @__PURE__ */ U(Wr, { ...e })),
|
|
2065
|
+
EmailWidget: $((e) => /* @__PURE__ */ U(En, { ...e })),
|
|
2066
|
+
PhoneWidget: $((e) => /* @__PURE__ */ U(Ur, { ...e })),
|
|
2067
|
+
URLWidget: $((e) => /* @__PURE__ */ U(Vr, { ...e })),
|
|
2068
|
+
DropdownWidget: $((e) => /* @__PURE__ */ U(Sn, {
|
|
2009
2069
|
isMulti: !1,
|
|
2010
2070
|
...e
|
|
2011
2071
|
})),
|
|
2012
|
-
MultiDropdownWidget: $((e) => /* @__PURE__ */
|
|
2072
|
+
MultiDropdownWidget: $((e) => /* @__PURE__ */ U(Sn, {
|
|
2013
2073
|
isMulti: !0,
|
|
2014
2074
|
...e
|
|
2015
2075
|
})),
|
|
2016
|
-
RadioWidget: $((e) => /* @__PURE__ */
|
|
2017
|
-
CheckboxWidget: $((e) => /* @__PURE__ */
|
|
2018
|
-
ToggleCheckboxWidget: $((e) => /* @__PURE__ */
|
|
2019
|
-
SwitchWidget: $((e) => /* @__PURE__ */
|
|
2020
|
-
DateTimeWidget: $((e) => /* @__PURE__ */
|
|
2021
|
-
DateWidget: $((e) => /* @__PURE__ */
|
|
2022
|
-
TimeWidget: $((e) => /* @__PURE__ */
|
|
2023
|
-
GeocoderWidget: $((e) => /* @__PURE__ */
|
|
2024
|
-
MultiGeocoderWidget: $((e) => /* @__PURE__ */
|
|
2025
|
-
ImageUploadWidget: $((e) => /* @__PURE__ */
|
|
2076
|
+
RadioWidget: $((e) => /* @__PURE__ */ U(Zn, { ...e })),
|
|
2077
|
+
CheckboxWidget: $((e) => /* @__PURE__ */ U(yn, { ...e })),
|
|
2078
|
+
ToggleCheckboxWidget: $((e) => /* @__PURE__ */ U(ur, { ...e })),
|
|
2079
|
+
SwitchWidget: $((e) => /* @__PURE__ */ U(ir, { ...e })),
|
|
2080
|
+
DateTimeWidget: $((e) => /* @__PURE__ */ U(Hr, { ...e })),
|
|
2081
|
+
DateWidget: $((e) => /* @__PURE__ */ U(Hr, { ...e })),
|
|
2082
|
+
TimeWidget: $((e) => /* @__PURE__ */ U(cr, { ...e })),
|
|
2083
|
+
GeocoderWidget: $((e) => /* @__PURE__ */ U(On, { ...e })),
|
|
2084
|
+
MultiGeocoderWidget: $((e) => /* @__PURE__ */ U(Fn, { ...e })),
|
|
2085
|
+
ImageUploadWidget: $((e) => /* @__PURE__ */ U(Br, {
|
|
2026
2086
|
kind: ["image"],
|
|
2027
2087
|
isMultiple: !1,
|
|
2028
2088
|
...e
|
|
2029
2089
|
})),
|
|
2030
|
-
MultiImageUploadWidget: $((e) => /* @__PURE__ */
|
|
2090
|
+
MultiImageUploadWidget: $((e) => /* @__PURE__ */ U(Br, {
|
|
2031
2091
|
kind: ["image"],
|
|
2032
2092
|
isMultiple: !0,
|
|
2033
2093
|
...e
|
|
2034
2094
|
})),
|
|
2035
|
-
FileUploadWidget: $((e) => /* @__PURE__ */
|
|
2095
|
+
FileUploadWidget: $((e) => /* @__PURE__ */ U(Br, {
|
|
2036
2096
|
kind: [
|
|
2037
2097
|
"audio",
|
|
2038
2098
|
"video",
|
|
@@ -2042,7 +2102,7 @@ var Er = "_156u72w0", Dr = "_156u72w1", Or = (e) => Array.isArray(e) && e.every(
|
|
|
2042
2102
|
isMultiple: !1,
|
|
2043
2103
|
...e
|
|
2044
2104
|
})),
|
|
2045
|
-
MultiFileUploadWidget: $((e) => /* @__PURE__ */
|
|
2105
|
+
MultiFileUploadWidget: $((e) => /* @__PURE__ */ U(Br, {
|
|
2046
2106
|
kind: [
|
|
2047
2107
|
"audio",
|
|
2048
2108
|
"video",
|
|
@@ -2052,7 +2112,7 @@ var Er = "_156u72w0", Dr = "_156u72w1", Or = (e) => Array.isArray(e) && e.every(
|
|
|
2052
2112
|
isMultiple: !0,
|
|
2053
2113
|
...e
|
|
2054
2114
|
}))
|
|
2055
|
-
},
|
|
2115
|
+
}, Kr = (e) => {
|
|
2056
2116
|
let t = E(9), n, r;
|
|
2057
2117
|
t[0] === e ? (n = t[1], r = t[2]) : ({widgets: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
2058
2118
|
let { field: i } = n, { field_interface: a, key: o } = i;
|
|
@@ -2061,16 +2121,16 @@ var Er = "_156u72w0", Dr = "_156u72w1", Or = (e) => Array.isArray(e) && e.every(
|
|
|
2061
2121
|
let e = r[a];
|
|
2062
2122
|
if (e) {
|
|
2063
2123
|
let r;
|
|
2064
|
-
return t[3] !== e || t[4] !== n ? (r = /* @__PURE__ */
|
|
2124
|
+
return t[3] !== e || t[4] !== n ? (r = /* @__PURE__ */ U(e, { ...n }), t[3] = e, t[4] = n, t[5] = r) : r = t[5], r;
|
|
2065
2125
|
}
|
|
2066
2126
|
}
|
|
2067
|
-
let s =
|
|
2127
|
+
let s = Gr[a];
|
|
2068
2128
|
if (s) {
|
|
2069
2129
|
let e;
|
|
2070
|
-
return t[6] !== s || t[7] !== n ? (e = /* @__PURE__ */
|
|
2130
|
+
return t[6] !== s || t[7] !== n ? (e = /* @__PURE__ */ U(s, { ...n }), t[6] = s, t[7] = n, t[8] = e) : e = t[8], e;
|
|
2071
2131
|
}
|
|
2072
2132
|
return null;
|
|
2073
|
-
},
|
|
2133
|
+
}, qr = (e) => {
|
|
2074
2134
|
let t = E(25), n, r, i;
|
|
2075
2135
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({field: n, schema: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
2076
2136
|
let { key: a, label: o, field_interface: c, fields: l } = n, u = a === void 0 ? "" : a, d = o === void 0 ? "" : o, f = c === void 0 ? "" : c, p;
|
|
@@ -2078,14 +2138,14 @@ var Er = "_156u72w0", Dr = "_156u72w1", Or = (e) => Array.isArray(e) && e.every(
|
|
|
2078
2138
|
let m = p;
|
|
2079
2139
|
if (!f || !u) return null;
|
|
2080
2140
|
let h = n?.required, g;
|
|
2081
|
-
t[6] !== d || t[7] !== h ? (g = /* @__PURE__ */
|
|
2141
|
+
t[6] !== d || t[7] !== h ? (g = /* @__PURE__ */ U(s, {
|
|
2082
2142
|
label: d,
|
|
2083
2143
|
isRequired: h
|
|
2084
2144
|
}), t[6] = d, t[7] = h, t[8] = g) : g = t[8];
|
|
2085
2145
|
let _;
|
|
2086
2146
|
if (t[9] !== n.id || t[10] !== m || t[11] !== u || t[12] !== r || t[13] !== i) {
|
|
2087
2147
|
let e;
|
|
2088
|
-
t[15] !== n.id || t[16] !== u || t[17] !== r || t[18] !== i ? (e = (e) => /* @__PURE__ */
|
|
2148
|
+
t[15] !== n.id || t[16] !== u || t[17] !== r || t[18] !== i ? (e = (e) => /* @__PURE__ */ U(Jr, {
|
|
2089
2149
|
field: {
|
|
2090
2150
|
...e,
|
|
2091
2151
|
key: `${u}.${e?.key}`
|
|
@@ -2095,45 +2155,45 @@ var Er = "_156u72w0", Dr = "_156u72w1", Or = (e) => Array.isArray(e) && e.every(
|
|
|
2095
2155
|
}, `common-fields-${n?.id}-${e?.id}`), t[15] = n.id, t[16] = u, t[17] = r, t[18] = i, t[19] = e) : e = t[19], _ = m.map(e), t[9] = n.id, t[10] = m, t[11] = u, t[12] = r, t[13] = i, t[14] = _;
|
|
2096
2156
|
} else _ = t[14];
|
|
2097
2157
|
let v;
|
|
2098
|
-
t[20] === _ ? v = t[21] : (v = /* @__PURE__ */
|
|
2099
|
-
className:
|
|
2158
|
+
t[20] === _ ? v = t[21] : (v = /* @__PURE__ */ U("div", {
|
|
2159
|
+
className: kt,
|
|
2100
2160
|
children: _
|
|
2101
2161
|
}), t[20] = _, t[21] = v);
|
|
2102
2162
|
let y;
|
|
2103
|
-
return t[22] !== g || t[23] !== v ? (y = /* @__PURE__ */
|
|
2104
|
-
className:
|
|
2163
|
+
return t[22] !== g || t[23] !== v ? (y = /* @__PURE__ */ W("div", {
|
|
2164
|
+
className: vt,
|
|
2105
2165
|
children: [g, v]
|
|
2106
2166
|
}), t[22] = g, t[23] = v, t[24] = y) : y = t[24], y;
|
|
2107
|
-
},
|
|
2167
|
+
}, Jr = (e) => {
|
|
2108
2168
|
let t = E(16), n, r;
|
|
2109
2169
|
t[0] === e ? (n = t[1], r = t[2]) : ({widgets: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
2110
|
-
let i =
|
|
2170
|
+
let i = lt(n.schema, n.field), { field_interface: a, key: o, hidden: s } = i, c = a === void 0 ? "" : a;
|
|
2111
2171
|
if (!c || !(o !== void 0 && o) || s) return null;
|
|
2112
2172
|
switch (c) {
|
|
2113
|
-
case
|
|
2173
|
+
case G.ArrayWidget: {
|
|
2114
2174
|
let e;
|
|
2115
|
-
return t[3] !== i || t[4] !== n ? (e = /* @__PURE__ */
|
|
2175
|
+
return t[3] !== i || t[4] !== n ? (e = /* @__PURE__ */ U(zt, {
|
|
2116
2176
|
...n,
|
|
2117
2177
|
field: i
|
|
2118
2178
|
}), t[3] = i, t[4] = n, t[5] = e) : e = t[5], e;
|
|
2119
2179
|
}
|
|
2120
|
-
case
|
|
2180
|
+
case G.RecordWidget: {
|
|
2121
2181
|
let e;
|
|
2122
|
-
return t[6] !== i || t[7] !== n ? (e = /* @__PURE__ */
|
|
2182
|
+
return t[6] !== i || t[7] !== n ? (e = /* @__PURE__ */ U(qr, {
|
|
2123
2183
|
...n,
|
|
2124
2184
|
field: i
|
|
2125
2185
|
}), t[6] = i, t[7] = n, t[8] = e) : e = t[8], e;
|
|
2126
2186
|
}
|
|
2127
|
-
case
|
|
2187
|
+
case G.CollectionWidget: {
|
|
2128
2188
|
let e;
|
|
2129
|
-
return t[9] !== i || t[10] !== n ? (e = /* @__PURE__ */
|
|
2189
|
+
return t[9] !== i || t[10] !== n ? (e = /* @__PURE__ */ U(fn, {
|
|
2130
2190
|
...n,
|
|
2131
2191
|
field: i
|
|
2132
2192
|
}), t[9] = i, t[10] = n, t[11] = e) : e = t[11], e;
|
|
2133
2193
|
}
|
|
2134
2194
|
default: {
|
|
2135
2195
|
let e;
|
|
2136
|
-
return t[12] !== i || t[13] !== n || t[14] !== r ? (e = /* @__PURE__ */
|
|
2196
|
+
return t[12] !== i || t[13] !== n || t[14] !== r ? (e = /* @__PURE__ */ U(Kr, {
|
|
2137
2197
|
widgets: r,
|
|
2138
2198
|
...n,
|
|
2139
2199
|
field: i
|
|
@@ -2144,20 +2204,20 @@ var Er = "_156u72w0", Dr = "_156u72w1", Or = (e) => Array.isArray(e) && e.every(
|
|
|
2144
2204
|
i(r.radius);
|
|
2145
2205
|
//#endregion
|
|
2146
2206
|
//#region ../../libraries/levocn/dist/utils/deep-merge.js
|
|
2147
|
-
function
|
|
2207
|
+
function Yr(e) {
|
|
2148
2208
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
2149
2209
|
}
|
|
2150
|
-
function
|
|
2151
|
-
if (!
|
|
2210
|
+
function Xr(e, t) {
|
|
2211
|
+
if (!Yr(e) || !Yr(t)) return t;
|
|
2152
2212
|
let n = { ...e };
|
|
2153
2213
|
return Object.keys(t).forEach((r) => {
|
|
2154
2214
|
let i = r, a = e[i], o = t[i];
|
|
2155
|
-
|
|
2215
|
+
Yr(a) && Yr(o) ? n[i] = Xr(a, o) : n[i] = o;
|
|
2156
2216
|
}), n;
|
|
2157
2217
|
}
|
|
2158
2218
|
//#endregion
|
|
2159
2219
|
//#region ../../libraries/levocn/dist/theme/utils/defineTheme.js
|
|
2160
|
-
var
|
|
2220
|
+
var Zr = ((e) => (t) => t ? Xr(e, t) : e)({
|
|
2161
2221
|
form: {
|
|
2162
2222
|
maxWidth: "100%",
|
|
2163
2223
|
gap: "1.5rem",
|
|
@@ -2171,7 +2231,7 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2171
2231
|
borderRadius: "6px"
|
|
2172
2232
|
},
|
|
2173
2233
|
checkbox: { labelFontSize: "0.875rem" }
|
|
2174
|
-
}),
|
|
2234
|
+
}), Qr = "_1g8bxz40", $r = "r6cfdr0", ei = P({ themeClass: "" }), ti = T(Zr({
|
|
2175
2235
|
form: {
|
|
2176
2236
|
maxWidth: "800px",
|
|
2177
2237
|
labelFontSize: "1.5rem",
|
|
@@ -2184,14 +2244,14 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2184
2244
|
borderRadius: "4px"
|
|
2185
2245
|
},
|
|
2186
2246
|
checkbox: { labelFontSize: "1.125rem" }
|
|
2187
|
-
})),
|
|
2247
|
+
})), ni = (t) => {
|
|
2188
2248
|
let n = E(30), r, i, o, s, c, l, u;
|
|
2189
2249
|
n[0] === t ? (r = n[1], i = n[2], o = n[3], s = n[4], c = n[5], l = n[6], u = n[7]) : ({children: r, className: i, style: l, cssReset: o, variant: u, portalToThemeRoot: s, ...c} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = o, n[4] = s, n[5] = c, n[6] = l, n[7] = u);
|
|
2190
2250
|
let d = u === "single-field" || u === "steps-2", f;
|
|
2191
|
-
n[8] === i ? f = n[9] : (f = Z(a,
|
|
2251
|
+
n[8] === i ? f = n[9] : (f = Z(a, Qr, i), n[8] = i, n[9] = f);
|
|
2192
2252
|
let p = f, m;
|
|
2193
2253
|
n[10] !== d || n[11] !== l ? (m = d ? {
|
|
2194
|
-
...
|
|
2254
|
+
...ti,
|
|
2195
2255
|
...l
|
|
2196
2256
|
} : l, n[10] = d, n[11] = l, n[12] = m) : m = n[12];
|
|
2197
2257
|
let h = m, g;
|
|
@@ -2201,17 +2261,17 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2201
2261
|
cssReset: o
|
|
2202
2262
|
}, n[13] = p, n[14] = h, n[15] = o, n[16] = g) : g = n[16];
|
|
2203
2263
|
let _;
|
|
2204
|
-
n[17] !== r || n[18] !== d ? (_ = d ? /* @__PURE__ */
|
|
2205
|
-
className:
|
|
2264
|
+
n[17] !== r || n[18] !== d ? (_ = d ? /* @__PURE__ */ U("div", {
|
|
2265
|
+
className: $r,
|
|
2206
2266
|
children: r
|
|
2207
2267
|
}) : r, n[17] = r, n[18] = d, n[19] = _) : _ = n[19];
|
|
2208
2268
|
let v;
|
|
2209
|
-
n[20] !== g || n[21] !== _ ? (v = /* @__PURE__ */
|
|
2269
|
+
n[20] !== g || n[21] !== _ ? (v = /* @__PURE__ */ U(ei.Provider, {
|
|
2210
2270
|
value: g,
|
|
2211
2271
|
children: _
|
|
2212
2272
|
}), n[20] = g, n[21] = _, n[22] = v) : v = n[22];
|
|
2213
2273
|
let y;
|
|
2214
|
-
return n[23] !== p || n[24] !== h || n[25] !== o || n[26] !== s || n[27] !== c || n[28] !== v ? (y = /* @__PURE__ */
|
|
2274
|
+
return n[23] !== p || n[24] !== h || n[25] !== o || n[26] !== s || n[27] !== c || n[28] !== v ? (y = /* @__PURE__ */ U(e, {
|
|
2215
2275
|
...c,
|
|
2216
2276
|
className: p,
|
|
2217
2277
|
cssReset: o,
|
|
@@ -2219,14 +2279,14 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2219
2279
|
portalToThemeRoot: s,
|
|
2220
2280
|
children: v
|
|
2221
2281
|
}), n[23] = p, n[24] = h, n[25] = o, n[26] = s, n[27] = c, n[28] = v, n[29] = y) : y = n[29], y;
|
|
2222
|
-
},
|
|
2223
|
-
let f =
|
|
2282
|
+
}, ri = "_1dzarb20", ii = "_1dzarb21", ai = "_1dzarb23", oi = "_1dzarb24", si = "_1dzarb25", ci = "_1dzarb26", li = ({ hiddenFields: e, isLoading: n, initialValues: r, onSubmit: i, schema: a, uiConfig: o, submitButtonConfig: s, containerStyles: c, isDisabled: l, theme: u, enableVerification: d = !0 }) => {
|
|
2283
|
+
let f = z(() => {
|
|
2224
2284
|
if (a) {
|
|
2225
2285
|
let t = { ...a };
|
|
2226
2286
|
return t.sections = t?.sections?.map((t) => (t.fields = t?.fields?.map((t) => ((e?.includes(t?.key) || e?.includes(t?.id)) && (t.hidden = !0), t)), t)), t;
|
|
2227
2287
|
}
|
|
2228
2288
|
return null;
|
|
2229
|
-
}, [a]), p =
|
|
2289
|
+
}, [a]), p = oe({
|
|
2230
2290
|
mode: "onTouched",
|
|
2231
2291
|
disabled: l,
|
|
2232
2292
|
defaultValues: {},
|
|
@@ -2234,47 +2294,39 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2234
2294
|
}), { formState: { isSubmitting: m } } = p, h = (e) => {
|
|
2235
2295
|
i && i(e);
|
|
2236
2296
|
};
|
|
2237
|
-
|
|
2297
|
+
R(() => {
|
|
2238
2298
|
if (f) {
|
|
2239
2299
|
let e = {
|
|
2240
|
-
...a ?
|
|
2300
|
+
...a ? ht(a) : {},
|
|
2241
2301
|
...r
|
|
2242
2302
|
};
|
|
2243
2303
|
p.reset(e);
|
|
2244
2304
|
}
|
|
2245
2305
|
}, [f]);
|
|
2246
2306
|
let g = n || m;
|
|
2247
|
-
return f ? /* @__PURE__ */
|
|
2307
|
+
return f ? /* @__PURE__ */ U(re, {
|
|
2248
2308
|
...p,
|
|
2249
|
-
children: /* @__PURE__ */
|
|
2309
|
+
children: /* @__PURE__ */ U(ni, {
|
|
2250
2310
|
...u || {},
|
|
2251
|
-
children: /* @__PURE__ */
|
|
2252
|
-
className:
|
|
2253
|
-
children: [o?.hideFormHeading ? null : /* @__PURE__ */
|
|
2254
|
-
className: Z(
|
|
2311
|
+
children: /* @__PURE__ */ W("div", {
|
|
2312
|
+
className: ri,
|
|
2313
|
+
children: [o?.hideFormHeading ? null : /* @__PURE__ */ U("h1", {
|
|
2314
|
+
className: Z(ii),
|
|
2255
2315
|
children: "Create new"
|
|
2256
|
-
}), /* @__PURE__ */
|
|
2257
|
-
className: Z(
|
|
2258
|
-
children: /* @__PURE__ */
|
|
2259
|
-
className: Z(
|
|
2316
|
+
}), /* @__PURE__ */ U("div", {
|
|
2317
|
+
className: Z(ai, c),
|
|
2318
|
+
children: /* @__PURE__ */ W("form", {
|
|
2319
|
+
className: Z(oi, n && "_1dzarb27"),
|
|
2260
2320
|
id: "collection-form",
|
|
2261
2321
|
onSubmit: p.handleSubmit(h),
|
|
2262
|
-
children: [a?.sections?.map((e) =>
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
className: Zr,
|
|
2269
|
-
children: e?.fields?.map((e) => /* @__PURE__ */ H(Lr, {
|
|
2270
|
-
field: e,
|
|
2271
|
-
schema: a,
|
|
2272
|
-
settings: { enableVerification: d }
|
|
2273
|
-
}, e?.key))
|
|
2274
|
-
})]
|
|
2275
|
-
}, e.id)), s?.show && /* @__PURE__ */ H("div", {
|
|
2322
|
+
children: [a?.sections?.map((e) => /* @__PURE__ */ U(ui, {
|
|
2323
|
+
schema: a,
|
|
2324
|
+
section: e,
|
|
2325
|
+
hideHeading: !!o?.hideSectionHeadings,
|
|
2326
|
+
enableVerification: d
|
|
2327
|
+
}, e.id)), s?.show && /* @__PURE__ */ U("div", {
|
|
2276
2328
|
className: "_1dzarb29",
|
|
2277
|
-
children: /* @__PURE__ */
|
|
2329
|
+
children: /* @__PURE__ */ U(t, {
|
|
2278
2330
|
className: s?.styles,
|
|
2279
2331
|
disabled: l || g,
|
|
2280
2332
|
type: "submit",
|
|
@@ -2286,26 +2338,50 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2286
2338
|
})
|
|
2287
2339
|
})
|
|
2288
2340
|
}) : null;
|
|
2289
|
-
},
|
|
2341
|
+
}, ui = (e) => {
|
|
2342
|
+
let t = E(12), { schema: n, section: r, hideHeading: i, enableVerification: a } = e;
|
|
2343
|
+
if (!ut(n, r)) return null;
|
|
2344
|
+
let o;
|
|
2345
|
+
t[0] !== i || t[1] !== r?.label ? (o = !i && /* @__PURE__ */ U("p", {
|
|
2346
|
+
className: "_1dzarb28",
|
|
2347
|
+
children: r?.label
|
|
2348
|
+
}), t[0] = i, t[1] = r?.label, t[2] = o) : o = t[2];
|
|
2349
|
+
let s;
|
|
2350
|
+
t[3] !== a || t[4] !== n || t[5] !== r?.fields ? (s = r?.fields?.map((e) => /* @__PURE__ */ U(Jr, {
|
|
2351
|
+
field: e,
|
|
2352
|
+
schema: n,
|
|
2353
|
+
settings: { enableVerification: a }
|
|
2354
|
+
}, e?.key)), t[3] = a, t[4] = n, t[5] = r?.fields, t[6] = s) : s = t[6];
|
|
2355
|
+
let c;
|
|
2356
|
+
t[7] === s ? c = t[8] : (c = /* @__PURE__ */ U("div", {
|
|
2357
|
+
className: ci,
|
|
2358
|
+
children: s
|
|
2359
|
+
}), t[7] = s, t[8] = c);
|
|
2360
|
+
let l;
|
|
2361
|
+
return t[9] !== o || t[10] !== c ? (l = /* @__PURE__ */ W("div", {
|
|
2362
|
+
className: si,
|
|
2363
|
+
children: [o, c]
|
|
2364
|
+
}), t[9] = o, t[10] = c, t[11] = l) : l = t[11], l;
|
|
2365
|
+
}, di = M.createContext({
|
|
2290
2366
|
schema: null,
|
|
2291
2367
|
submitButtonConfig: { show: !0 }
|
|
2292
|
-
}),
|
|
2368
|
+
}), fi = (e) => {
|
|
2293
2369
|
let t = E(14), n, r, i, a;
|
|
2294
2370
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4]) : ({children: n, theme: i, variant: a, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a);
|
|
2295
2371
|
let o;
|
|
2296
2372
|
t[5] === r ? o = t[6] : (o = { ...r }, t[5] = r, t[6] = o);
|
|
2297
2373
|
let s;
|
|
2298
|
-
t[7] !== n || t[8] !== i || t[9] !== a ? (s = /* @__PURE__ */
|
|
2374
|
+
t[7] !== n || t[8] !== i || t[9] !== a ? (s = /* @__PURE__ */ U(ni, {
|
|
2299
2375
|
...i,
|
|
2300
2376
|
variant: a,
|
|
2301
2377
|
children: n
|
|
2302
2378
|
}), t[7] = n, t[8] = i, t[9] = a, t[10] = s) : s = t[10];
|
|
2303
2379
|
let c;
|
|
2304
|
-
return t[11] !== o || t[12] !== s ? (c = /* @__PURE__ */
|
|
2380
|
+
return t[11] !== o || t[12] !== s ? (c = /* @__PURE__ */ U(di.Provider, {
|
|
2305
2381
|
value: o,
|
|
2306
2382
|
children: s
|
|
2307
2383
|
}), t[11] = o, t[12] = s, t[13] = c) : c = t[13], c;
|
|
2308
|
-
},
|
|
2384
|
+
}, pi = () => M.useContext(di), mi = (e, t) => {
|
|
2309
2385
|
if (Array.isArray(e) && e.length > 0) {
|
|
2310
2386
|
let n = 0;
|
|
2311
2387
|
for (let r of e) n += 1, r?.param && t && t(r?.param, {
|
|
@@ -2313,21 +2389,21 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2313
2389
|
message: r?.message
|
|
2314
2390
|
}, { shouldFocus: n === 0 });
|
|
2315
2391
|
}
|
|
2316
|
-
},
|
|
2392
|
+
}, hi = {
|
|
2317
2393
|
FORM_DIRTY: "form-dirty",
|
|
2318
2394
|
FORM_VALUES: "form-values"
|
|
2319
|
-
},
|
|
2320
|
-
let t = localStorage.getItem(`${e}-${
|
|
2395
|
+
}, gi = (e) => {
|
|
2396
|
+
let t = localStorage.getItem(`${e}-${hi.FORM_VALUES}`);
|
|
2321
2397
|
return t ? JSON.parse(t) : {};
|
|
2322
|
-
},
|
|
2323
|
-
localStorage.setItem(`${e}-${
|
|
2324
|
-
},
|
|
2325
|
-
localStorage.removeItem(`${e}-${
|
|
2326
|
-
},
|
|
2327
|
-
let o =
|
|
2398
|
+
}, _i = (e, t) => {
|
|
2399
|
+
localStorage.setItem(`${e}-${hi.FORM_VALUES}`, JSON.stringify(t));
|
|
2400
|
+
}, vi = (e) => {
|
|
2401
|
+
localStorage.removeItem(`${e}-${hi.FORM_VALUES}`);
|
|
2402
|
+
}, yi = ({ schema: e, originalSchema: t, onSubmitSuccess: n, onSubmitError: r, onInit: i, setFormErrorAfterSubmit: a = !0 }) => {
|
|
2403
|
+
let o = z(() => e, [e]), s = z(() => t || o, [t, o]), c = A(), { toastConfig: l, onSuccess: u, onError: d, isLoggedIn: f, isDisabled: p, externalInitialValues: m = {}, account: h, preview: g, uiConfig: _ } = pi(), [v, y] = V({
|
|
2328
2404
|
contentId: null,
|
|
2329
2405
|
publishedId: null
|
|
2330
|
-
}), [b, x] =
|
|
2406
|
+
}), [b, x] = V(!1), [S, C] = V(!1), [w, T] = V(!1), E = B({}), O = B({}), j = (e) => {
|
|
2331
2407
|
if (!o?.sections) return null;
|
|
2332
2408
|
for (let t of o.sections) for (let n of t?.fields ?? []) if (n?.key === e) return n?.kind ?? null;
|
|
2333
2409
|
return null;
|
|
@@ -2347,7 +2423,7 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2347
2423
|
}
|
|
2348
2424
|
}
|
|
2349
2425
|
} catch {}
|
|
2350
|
-
let t = o ?
|
|
2426
|
+
let t = o ? ht(o) : {}, n = {};
|
|
2351
2427
|
h && o && (o.email_field && h.email && (n[o.email_field] = h.email), o.mobile_field && h.mobile && (n[o.mobile_field] = h.mobile));
|
|
2352
2428
|
let r = {
|
|
2353
2429
|
...m || {},
|
|
@@ -2359,7 +2435,7 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2359
2435
|
...r,
|
|
2360
2436
|
...E.current
|
|
2361
2437
|
};
|
|
2362
|
-
}, N =
|
|
2438
|
+
}, N = oe({
|
|
2363
2439
|
mode: "onTouched",
|
|
2364
2440
|
disabled: p
|
|
2365
2441
|
}), { formState: P } = N, F = (e) => {
|
|
@@ -2368,7 +2444,7 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2368
2444
|
...e
|
|
2369
2445
|
};
|
|
2370
2446
|
};
|
|
2371
|
-
return
|
|
2447
|
+
return R(() => {
|
|
2372
2448
|
if (o && c?.collection) {
|
|
2373
2449
|
if (M(), !v.contentId && !v.publishedId && !g) {
|
|
2374
2450
|
let e = o?.allow_multiple === !1;
|
|
@@ -2404,7 +2480,7 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2404
2480
|
});
|
|
2405
2481
|
return;
|
|
2406
2482
|
}
|
|
2407
|
-
let t =
|
|
2483
|
+
let t = gi(o?.key);
|
|
2408
2484
|
t && (E.current = {
|
|
2409
2485
|
...E.current || {},
|
|
2410
2486
|
...t
|
|
@@ -2413,14 +2489,14 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2413
2489
|
}
|
|
2414
2490
|
O.current = { ...E.current }, N.reset({ ...E?.current }), i?.(E.current);
|
|
2415
2491
|
}
|
|
2416
|
-
}, [o, f]),
|
|
2492
|
+
}, [o, f]), R(() => {
|
|
2417
2493
|
let { isSubmitSuccessful: e, isValid: t } = P;
|
|
2418
2494
|
e && t && (O.current = { ...E.current }, N.reset({
|
|
2419
2495
|
...E?.current,
|
|
2420
2496
|
__captcha: "verified"
|
|
2421
2497
|
}), i?.(E.current));
|
|
2422
|
-
}, [P]),
|
|
2423
|
-
o && (v.contentId || v.publishedId) &&
|
|
2498
|
+
}, [P]), R(() => {
|
|
2499
|
+
o && (v.contentId || v.publishedId) && vi(o?.key);
|
|
2424
2500
|
}, [v]), {
|
|
2425
2501
|
methods: N,
|
|
2426
2502
|
isLoading: b,
|
|
@@ -2437,13 +2513,13 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2437
2513
|
appendFormValues: F,
|
|
2438
2514
|
submitToRemote: async (e) => {
|
|
2439
2515
|
if (F(e), !(g || !c?.collection || !s)) try {
|
|
2440
|
-
let e =
|
|
2516
|
+
let e = _t(E?.current, s, O.current), t = null;
|
|
2441
2517
|
if (t = v.publishedId ? await c?.collection?.editDraftEntry(s?.key, v.publishedId, e) : v.contentId ? await c?.collection?.submitDraftEntry(s?.key, e) : await c?.collection?.saveCollectionData({
|
|
2442
2518
|
collection_id: s?.id,
|
|
2443
2519
|
data: e
|
|
2444
2520
|
}), t?.content?.data) {
|
|
2445
2521
|
let e = t?.content?.meta?.booking_config?.enabled;
|
|
2446
|
-
l?.showSuccessToast && !(l?.suppressOnBooking && e) && k(l.successToastText || "Form submitted successfully."), E.current = {}, M(),
|
|
2522
|
+
l?.showSuccessToast && !(l?.suppressOnBooking && e) && k(l.successToastText || "Form submitted successfully."), E.current = {}, M(), vi(s?.key), y({
|
|
2447
2523
|
contentId: null,
|
|
2448
2524
|
publishedId: null
|
|
2449
2525
|
}), _?.hideSuccessScreen || T(!0);
|
|
@@ -2454,33 +2530,33 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2454
2530
|
meta: t?.content?.meta
|
|
2455
2531
|
}), n && n();
|
|
2456
2532
|
} catch (e) {
|
|
2457
|
-
c?.logger?.error("Form success callback threw after a saved entry", { exception:
|
|
2533
|
+
c?.logger?.error("Form success callback threw after a saved entry", { exception: Y(e) });
|
|
2458
2534
|
}
|
|
2459
2535
|
return;
|
|
2460
2536
|
}
|
|
2461
2537
|
throw Error("Failed to save form details, API response invalid");
|
|
2462
2538
|
} catch (e) {
|
|
2463
|
-
D(e), e instanceof
|
|
2539
|
+
D(e), e instanceof K ? (e?.hasFieldErrors && a && mi(e?.fieldErrors, N.setError), r && r(e.fieldErrors || []), d && d(e)) : d && d(e?.response?.data || e);
|
|
2464
2540
|
}
|
|
2465
2541
|
},
|
|
2466
2542
|
showSuccessOverlay: w,
|
|
2467
2543
|
dismissSuccessOverlay: () => T(!1)
|
|
2468
2544
|
};
|
|
2469
|
-
},
|
|
2545
|
+
}, bi = "_1jed92w2", xi = "_1jed92w3 _1jed92w1", Si = "_1jed92w4 _1jed92w1", Ci = "_1jed92w5 _1jed92w1", wi = "_1jed92w6 _1jed92w1", Ti = () => {
|
|
2470
2546
|
let e = E(1), t;
|
|
2471
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
2472
|
-
className:
|
|
2547
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ W("div", {
|
|
2548
|
+
className: bi,
|
|
2473
2549
|
children: [
|
|
2474
|
-
/* @__PURE__ */
|
|
2475
|
-
/* @__PURE__ */
|
|
2476
|
-
/* @__PURE__ */
|
|
2550
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("div", { className: xi }), /* @__PURE__ */ U("div", { className: Ci })] }),
|
|
2551
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("div", { className: Si }), /* @__PURE__ */ U("div", { className: Ci })] }),
|
|
2552
|
+
/* @__PURE__ */ U("div", { className: wi })
|
|
2477
2553
|
]
|
|
2478
2554
|
}), e[0] = t) : t = e[0], t;
|
|
2479
|
-
},
|
|
2480
|
-
return
|
|
2555
|
+
}, Ei = "a2n8870", Di = "a2n8871", Oi = "a2n8872", ki = "a2n8873", Ai = "a2n8874", ji = "a2n8875", Mi = "a2n8876", Ni = "https://static.levocdn.com/WLZ1TXTD/Levo-Logo-moxa93IxlVi0W.webp", Pi = F(() => import("altcha").then(() => ({ default: function({ widgetRef: e, client: t, onStateChange: n }) {
|
|
2556
|
+
return R(() => {
|
|
2481
2557
|
let { current: t } = e;
|
|
2482
2558
|
if (t) return t.addEventListener("statechange", n), () => t.removeEventListener("statechange", n);
|
|
2483
|
-
}, [n]), /* @__PURE__ */
|
|
2559
|
+
}, [n]), /* @__PURE__ */ U("altcha-widget", {
|
|
2484
2560
|
ref: e,
|
|
2485
2561
|
style: {
|
|
2486
2562
|
"--altcha-max-width": "100%",
|
|
@@ -2497,32 +2573,32 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2497
2573
|
challengeurl: `${t.apiUrl}/v1/identity/captcha/create-challenge`,
|
|
2498
2574
|
verifyurl: `${t.apiUrl}/v1/identity/captcha/verify-challenge`
|
|
2499
2575
|
});
|
|
2500
|
-
} }))),
|
|
2576
|
+
} }))), Fi = () => {
|
|
2501
2577
|
let e = E(1), t;
|
|
2502
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
2503
|
-
className:
|
|
2504
|
-
children: [/* @__PURE__ */
|
|
2578
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ W("div", {
|
|
2579
|
+
className: Oi,
|
|
2580
|
+
children: [/* @__PURE__ */ U("img", {
|
|
2505
2581
|
alt: "Levo",
|
|
2506
|
-
src:
|
|
2582
|
+
src: Ni,
|
|
2507
2583
|
width: 16,
|
|
2508
2584
|
height: 16,
|
|
2509
|
-
className:
|
|
2510
|
-
}), /* @__PURE__ */
|
|
2511
|
-
className:
|
|
2585
|
+
className: ki
|
|
2586
|
+
}), /* @__PURE__ */ U("span", {
|
|
2587
|
+
className: Ai,
|
|
2512
2588
|
children: "Levo CAPTCHA"
|
|
2513
2589
|
})]
|
|
2514
2590
|
}), e[0] = t) : t = e[0], t;
|
|
2515
|
-
},
|
|
2591
|
+
}, Ii = () => {
|
|
2516
2592
|
let e = E(1), t;
|
|
2517
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
2518
|
-
className:
|
|
2519
|
-
children: /* @__PURE__ */
|
|
2520
|
-
className:
|
|
2593
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ U("div", {
|
|
2594
|
+
className: ji,
|
|
2595
|
+
children: /* @__PURE__ */ U("span", {
|
|
2596
|
+
className: Mi,
|
|
2521
2597
|
children: "Loading verification..."
|
|
2522
2598
|
})
|
|
2523
2599
|
}), e[0] = t) : t = e[0], t;
|
|
2524
|
-
},
|
|
2525
|
-
let e = E(19), { disableCaptcha: t } =
|
|
2600
|
+
}, Li = () => {
|
|
2601
|
+
let e = E(19), { disableCaptcha: t } = pi(), n = A(), [r, i] = V(!1), a = B(null), o = t ? !1 : "Verification is required", s;
|
|
2526
2602
|
e[0] === o ? s = e[1] : (s = {
|
|
2527
2603
|
name: "__captcha",
|
|
2528
2604
|
rules: { required: o }
|
|
@@ -2530,7 +2606,7 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2530
2606
|
let { field: c, fieldState: u } = Q(s), { onChange: d } = c, { error: f } = u, p, m;
|
|
2531
2607
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (p = () => {
|
|
2532
2608
|
i(!0);
|
|
2533
|
-
}, m = [], e[2] = p, e[3] = m) : (p = e[2], m = e[3]),
|
|
2609
|
+
}, m = [], e[2] = p, e[3] = m) : (p = e[2], m = e[3]), R(p, m);
|
|
2534
2610
|
let h;
|
|
2535
2611
|
e[4] === d ? h = e[5] : (h = (e) => {
|
|
2536
2612
|
"detail" in e && d(e.detail.state || null);
|
|
@@ -2538,50 +2614,50 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2538
2614
|
let g = h;
|
|
2539
2615
|
if (!r) {
|
|
2540
2616
|
let t = f?.message, n;
|
|
2541
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */
|
|
2542
|
-
className:
|
|
2543
|
-
children: [/* @__PURE__ */
|
|
2617
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ W("div", {
|
|
2618
|
+
className: Di,
|
|
2619
|
+
children: [/* @__PURE__ */ U(Ii, {}), /* @__PURE__ */ U(Fi, {})]
|
|
2544
2620
|
}), e[6] = n) : n = e[6];
|
|
2545
2621
|
let r;
|
|
2546
|
-
return e[7] === t ? r = e[8] : (r = /* @__PURE__ */
|
|
2622
|
+
return e[7] === t ? r = e[8] : (r = /* @__PURE__ */ U(l, {
|
|
2547
2623
|
error: t,
|
|
2548
|
-
className:
|
|
2624
|
+
className: Ei,
|
|
2549
2625
|
children: n
|
|
2550
2626
|
}), e[7] = t, e[8] = r), r;
|
|
2551
2627
|
}
|
|
2552
2628
|
let _ = f?.message, v;
|
|
2553
|
-
e[9] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */
|
|
2629
|
+
e[9] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ U(Ii, {}), e[9] = v) : v = e[9];
|
|
2554
2630
|
let y;
|
|
2555
|
-
e[10] !== n || e[11] !== g ? (y = /* @__PURE__ */
|
|
2631
|
+
e[10] !== n || e[11] !== g ? (y = /* @__PURE__ */ U(N, {
|
|
2556
2632
|
fallback: v,
|
|
2557
|
-
children: /* @__PURE__ */
|
|
2633
|
+
children: /* @__PURE__ */ U(Pi, {
|
|
2558
2634
|
widgetRef: a,
|
|
2559
2635
|
client: n,
|
|
2560
2636
|
onStateChange: g
|
|
2561
2637
|
})
|
|
2562
2638
|
}), e[10] = n, e[11] = g, e[12] = y) : y = e[12];
|
|
2563
2639
|
let b;
|
|
2564
|
-
e[13] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */
|
|
2640
|
+
e[13] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ U(Fi, {}), e[13] = b) : b = e[13];
|
|
2565
2641
|
let x;
|
|
2566
|
-
e[14] === y ? x = e[15] : (x = /* @__PURE__ */
|
|
2567
|
-
className:
|
|
2642
|
+
e[14] === y ? x = e[15] : (x = /* @__PURE__ */ W("div", {
|
|
2643
|
+
className: Di,
|
|
2568
2644
|
children: [y, b]
|
|
2569
2645
|
}), e[14] = y, e[15] = x);
|
|
2570
2646
|
let S;
|
|
2571
|
-
return e[16] !== x || e[17] !== _ ? (S = /* @__PURE__ */
|
|
2647
|
+
return e[16] !== x || e[17] !== _ ? (S = /* @__PURE__ */ U(l, {
|
|
2572
2648
|
error: _,
|
|
2573
|
-
className:
|
|
2649
|
+
className: Ei,
|
|
2574
2650
|
children: x
|
|
2575
2651
|
}), e[16] = x, e[17] = _, e[18] = S) : S = e[18], S;
|
|
2576
|
-
},
|
|
2652
|
+
}, Ri = {
|
|
2577
2653
|
errors: {},
|
|
2578
2654
|
isValid: !0,
|
|
2579
2655
|
isDirty: !1,
|
|
2580
2656
|
isSubmitted: !1,
|
|
2581
2657
|
submitCount: 0,
|
|
2582
2658
|
dirtyFields: {}
|
|
2583
|
-
},
|
|
2584
|
-
let e = E(22), t =
|
|
2659
|
+
}, zi = () => {
|
|
2660
|
+
let e = E(22), t = ce(), n = se(), [r, i] = V(Ri), a, o;
|
|
2585
2661
|
e[0] === n ? (a = e[1], o = e[2]) : (a = () => {
|
|
2586
2662
|
if (n?.subscribe) return n.subscribe({
|
|
2587
2663
|
formState: {
|
|
@@ -2602,9 +2678,9 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2602
2678
|
});
|
|
2603
2679
|
}
|
|
2604
2680
|
});
|
|
2605
|
-
}, o = [n], e[0] = n, e[1] = a, e[2] = o),
|
|
2606
|
-
let { errors: s, isValid: c, isDirty: l, isSubmitted: u, submitCount: d, dirtyFields: f } = r, [p, m] =
|
|
2607
|
-
e[3] === s ? h = e[4] : (h = Object.entries(s).map(
|
|
2681
|
+
}, o = [n], e[0] = n, e[1] = a, e[2] = o), R(a, o);
|
|
2682
|
+
let { errors: s, isValid: c, isDirty: l, isSubmitted: u, submitCount: d, dirtyFields: f } = r, [p, m] = V(!0), h;
|
|
2683
|
+
e[3] === s ? h = e[4] : (h = Object.entries(s).map(Hi), e[3] = s, e[4] = h);
|
|
2608
2684
|
let g = h, _;
|
|
2609
2685
|
e[5] === Symbol.for("react.memo_cache_sentinel") ? (_ = {
|
|
2610
2686
|
position: "fixed",
|
|
@@ -2626,7 +2702,7 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2626
2702
|
}, e[5] = _) : _ = e[5];
|
|
2627
2703
|
let v, y;
|
|
2628
2704
|
e[6] === Symbol.for("react.memo_cache_sentinel") ? (v = () => {
|
|
2629
|
-
m(
|
|
2705
|
+
m(Ui);
|
|
2630
2706
|
}, y = {
|
|
2631
2707
|
padding: "8px 12px",
|
|
2632
2708
|
background: "#141b33",
|
|
@@ -2641,7 +2717,7 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2641
2717
|
textTransform: "uppercase"
|
|
2642
2718
|
}, e[6] = v, e[7] = y) : (v = e[6], y = e[7]);
|
|
2643
2719
|
let b = p ? "▾" : "▸", x = String(c), S = String(l), C = String(u), w;
|
|
2644
|
-
e[8] !== d || e[9] !== b || e[10] !== x || e[11] !== S || e[12] !== C ? (w = /* @__PURE__ */
|
|
2720
|
+
e[8] !== d || e[9] !== b || e[10] !== x || e[11] !== S || e[12] !== C ? (w = /* @__PURE__ */ W("button", {
|
|
2645
2721
|
type: "button",
|
|
2646
2722
|
onClick: v,
|
|
2647
2723
|
style: y,
|
|
@@ -2659,7 +2735,7 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2659
2735
|
]
|
|
2660
2736
|
}), e[8] = d, e[9] = b, e[10] = x, e[11] = S, e[12] = C, e[13] = w) : w = e[13];
|
|
2661
2737
|
let T;
|
|
2662
|
-
e[14] !== f || e[15] !== g || e[16] !== p || e[17] !== t ? (T = p && /* @__PURE__ */
|
|
2738
|
+
e[14] !== f || e[15] !== g || e[16] !== p || e[17] !== t ? (T = p && /* @__PURE__ */ W("div", {
|
|
2663
2739
|
style: {
|
|
2664
2740
|
overflow: "auto",
|
|
2665
2741
|
padding: 10,
|
|
@@ -2667,45 +2743,45 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2667
2743
|
gap: 10
|
|
2668
2744
|
},
|
|
2669
2745
|
children: [
|
|
2670
|
-
/* @__PURE__ */
|
|
2746
|
+
/* @__PURE__ */ U(Vi, {
|
|
2671
2747
|
title: `Errors (${g.length})`,
|
|
2672
2748
|
accent: "#ff6b6b",
|
|
2673
|
-
children: g.length === 0 ? /* @__PURE__ */
|
|
2749
|
+
children: g.length === 0 ? /* @__PURE__ */ U("div", {
|
|
2674
2750
|
style: { opacity: .6 },
|
|
2675
2751
|
children: "none"
|
|
2676
|
-
}) : g.map(
|
|
2752
|
+
}) : g.map(Wi)
|
|
2677
2753
|
}),
|
|
2678
|
-
/* @__PURE__ */
|
|
2754
|
+
/* @__PURE__ */ U(Vi, {
|
|
2679
2755
|
title: "Values",
|
|
2680
2756
|
accent: "#7ce5b1",
|
|
2681
|
-
children: /* @__PURE__ */
|
|
2682
|
-
style:
|
|
2757
|
+
children: /* @__PURE__ */ U("pre", {
|
|
2758
|
+
style: Bi,
|
|
2683
2759
|
children: JSON.stringify(t ?? {}, null, 2)
|
|
2684
2760
|
})
|
|
2685
2761
|
}),
|
|
2686
|
-
/* @__PURE__ */
|
|
2762
|
+
/* @__PURE__ */ U(Vi, {
|
|
2687
2763
|
title: "Dirty fields",
|
|
2688
2764
|
accent: "#7cb1e5",
|
|
2689
|
-
children: /* @__PURE__ */
|
|
2690
|
-
style:
|
|
2765
|
+
children: /* @__PURE__ */ U("pre", {
|
|
2766
|
+
style: Bi,
|
|
2691
2767
|
children: JSON.stringify(f ?? {}, null, 2)
|
|
2692
2768
|
})
|
|
2693
2769
|
})
|
|
2694
2770
|
]
|
|
2695
2771
|
}), e[14] = f, e[15] = g, e[16] = p, e[17] = t, e[18] = T) : T = e[18];
|
|
2696
2772
|
let D;
|
|
2697
|
-
return e[19] !== w || e[20] !== T ? (D = /* @__PURE__ */
|
|
2773
|
+
return e[19] !== w || e[20] !== T ? (D = /* @__PURE__ */ W("div", {
|
|
2698
2774
|
style: _,
|
|
2699
2775
|
children: [w, T]
|
|
2700
2776
|
}), e[19] = w, e[20] = T, e[21] = D) : D = e[21], D;
|
|
2701
|
-
},
|
|
2777
|
+
}, Bi = {
|
|
2702
2778
|
margin: 0,
|
|
2703
2779
|
whiteSpace: "pre-wrap",
|
|
2704
2780
|
wordBreak: "break-word",
|
|
2705
2781
|
fontFamily: "inherit",
|
|
2706
2782
|
fontSize: 11,
|
|
2707
2783
|
lineHeight: 1.45
|
|
2708
|
-
},
|
|
2784
|
+
}, Vi = (e) => {
|
|
2709
2785
|
let t = E(11), { title: n, accent: r, children: i } = e, a;
|
|
2710
2786
|
t[0] === r ? a = t[1] : (a = {
|
|
2711
2787
|
fontSize: 10,
|
|
@@ -2716,7 +2792,7 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2716
2792
|
fontWeight: 700
|
|
2717
2793
|
}, t[0] = r, t[1] = a);
|
|
2718
2794
|
let o;
|
|
2719
|
-
t[2] !== a || t[3] !== n ? (o = /* @__PURE__ */
|
|
2795
|
+
t[2] !== a || t[3] !== n ? (o = /* @__PURE__ */ U("div", {
|
|
2720
2796
|
style: a,
|
|
2721
2797
|
children: n
|
|
2722
2798
|
}), t[2] = a, t[3] = n, t[4] = o) : o = t[4];
|
|
@@ -2728,14 +2804,14 @@ var Br = ((e) => (t) => t ? zr(e, t) : e)({
|
|
|
2728
2804
|
padding: 8
|
|
2729
2805
|
}, t[5] = s) : s = t[5];
|
|
2730
2806
|
let c;
|
|
2731
|
-
t[6] === i ? c = t[7] : (c = /* @__PURE__ */
|
|
2807
|
+
t[6] === i ? c = t[7] : (c = /* @__PURE__ */ U("div", {
|
|
2732
2808
|
style: s,
|
|
2733
2809
|
children: i
|
|
2734
2810
|
}), t[6] = i, t[7] = c);
|
|
2735
2811
|
let l;
|
|
2736
|
-
return t[8] !== o || t[9] !== c ? (l = /* @__PURE__ */
|
|
2812
|
+
return t[8] !== o || t[9] !== c ? (l = /* @__PURE__ */ W("div", { children: [o, c] }), t[8] = o, t[9] = c, t[10] = l) : l = t[10], l;
|
|
2737
2813
|
};
|
|
2738
|
-
function
|
|
2814
|
+
function Hi(e) {
|
|
2739
2815
|
let [t, n] = e;
|
|
2740
2816
|
return {
|
|
2741
2817
|
key: t,
|
|
@@ -2743,19 +2819,19 @@ function Ai(e) {
|
|
|
2743
2819
|
type: n?.type ?? "—"
|
|
2744
2820
|
};
|
|
2745
2821
|
}
|
|
2746
|
-
function
|
|
2822
|
+
function Ui(e) {
|
|
2747
2823
|
return !e;
|
|
2748
2824
|
}
|
|
2749
|
-
function
|
|
2750
|
-
return /* @__PURE__ */
|
|
2825
|
+
function Wi(e) {
|
|
2826
|
+
return /* @__PURE__ */ W("div", {
|
|
2751
2827
|
style: { marginBottom: 4 },
|
|
2752
2828
|
children: [
|
|
2753
|
-
/* @__PURE__ */
|
|
2829
|
+
/* @__PURE__ */ U("span", {
|
|
2754
2830
|
style: { color: "#ffb86b" },
|
|
2755
2831
|
children: e.key
|
|
2756
2832
|
}),
|
|
2757
2833
|
" ",
|
|
2758
|
-
/* @__PURE__ */
|
|
2834
|
+
/* @__PURE__ */ W("span", {
|
|
2759
2835
|
style: { opacity: .7 },
|
|
2760
2836
|
children: [
|
|
2761
2837
|
"[",
|
|
@@ -2763,7 +2839,7 @@ function Mi(e) {
|
|
|
2763
2839
|
"]"
|
|
2764
2840
|
]
|
|
2765
2841
|
}),
|
|
2766
|
-
/* @__PURE__ */
|
|
2842
|
+
/* @__PURE__ */ U("div", {
|
|
2767
2843
|
style: {
|
|
2768
2844
|
paddingLeft: 8,
|
|
2769
2845
|
opacity: .85
|
|
@@ -2775,29 +2851,29 @@ function Mi(e) {
|
|
|
2775
2851
|
}
|
|
2776
2852
|
//#endregion
|
|
2777
2853
|
//#region ../../libraries/react-collection/dist/lib/components/FormHeader/FormHeader.cssm.js
|
|
2778
|
-
var
|
|
2779
|
-
let t = E(4), { className: n } = e, { uiConfig: r } =
|
|
2854
|
+
var Gi = "_1vist8m0", Ki = (e) => {
|
|
2855
|
+
let t = E(4), { className: n } = e, { uiConfig: r } = pi();
|
|
2780
2856
|
if (r?.hideFormHeading) return null;
|
|
2781
2857
|
let i;
|
|
2782
|
-
t[0] === n ? i = t[1] : (i = Z(
|
|
2858
|
+
t[0] === n ? i = t[1] : (i = Z(Gi, n), t[0] = n, t[1] = i);
|
|
2783
2859
|
let a;
|
|
2784
|
-
return t[2] === i ? a = t[3] : (a = /* @__PURE__ */
|
|
2860
|
+
return t[2] === i ? a = t[3] : (a = /* @__PURE__ */ U("h1", {
|
|
2785
2861
|
className: i,
|
|
2786
2862
|
children: "Create new"
|
|
2787
2863
|
}), t[2] = i, t[3] = a), a;
|
|
2788
|
-
},
|
|
2789
|
-
let t = E(5), { children: n, className: r } = e, { uiConfig: i } =
|
|
2864
|
+
}, qi = "zx38wb0", Ji = (e) => {
|
|
2865
|
+
let t = E(5), { children: n, className: r } = e, { uiConfig: i } = pi();
|
|
2790
2866
|
if (i?.hideSectionHeadings) return null;
|
|
2791
2867
|
let a;
|
|
2792
|
-
t[0] === r ? a = t[1] : (a = Z(
|
|
2868
|
+
t[0] === r ? a = t[1] : (a = Z(qi, r), t[0] = r, t[1] = a);
|
|
2793
2869
|
let o;
|
|
2794
|
-
return t[2] !== n || t[3] !== a ? (o = /* @__PURE__ */
|
|
2870
|
+
return t[2] !== n || t[3] !== a ? (o = /* @__PURE__ */ U("h3", {
|
|
2795
2871
|
className: a,
|
|
2796
2872
|
children: n
|
|
2797
2873
|
}), t[2] = n, t[3] = a, t[4] = o) : o = t[4], o;
|
|
2798
|
-
},
|
|
2874
|
+
}, Yi = "q22d794", Xi = "q22d795", Zi = "q22d796", Qi = "q22d797", $i = "q22d798", ea = 5, ta = "Thank you!", na = "Your response has been submitted successfully.", ra = () => {
|
|
2799
2875
|
let e = E(1), t;
|
|
2800
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
2876
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ W("svg", {
|
|
2801
2877
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2802
2878
|
viewBox: "0 0 24 24",
|
|
2803
2879
|
fill: "none",
|
|
@@ -2805,10 +2881,10 @@ var Ni = "_1vist8m0", Pi = (e) => {
|
|
|
2805
2881
|
strokeWidth: "2.5",
|
|
2806
2882
|
strokeLinecap: "round",
|
|
2807
2883
|
strokeLinejoin: "round",
|
|
2808
|
-
children: [/* @__PURE__ */
|
|
2884
|
+
children: [/* @__PURE__ */ U("title", { children: "Check Icon" }), /* @__PURE__ */ U("path", { d: "M20 6 9 17l-5-5" })]
|
|
2809
2885
|
}), e[0] = t) : t = e[0], t;
|
|
2810
|
-
},
|
|
2811
|
-
let { successConfig: n, schema: r } =
|
|
2886
|
+
}, ia = ({ onDismiss: e }) => {
|
|
2887
|
+
let { successConfig: n, schema: r } = pi(), i = r?.settings?.success_message, [a, o] = V(ea), s = (e) => !e || e.replace(/<[^>]*>/g, "").trim() === "", c = n?.title || i?.title || ta, l = n?.message || i?.message, u = s(l) ? na : l, d = n?.action || i?.action, f = d?.type ?? "none", p = f === "redirect" ? d?.value : void 0, m = (() => {
|
|
2812
2888
|
let e = p?.trim();
|
|
2813
2889
|
if (e && !e.startsWith("//")) {
|
|
2814
2890
|
if (e.startsWith("/")) return e;
|
|
@@ -2818,7 +2894,7 @@ var Ni = "_1vist8m0", Pi = (e) => {
|
|
|
2818
2894
|
} catch {}
|
|
2819
2895
|
}
|
|
2820
2896
|
})();
|
|
2821
|
-
|
|
2897
|
+
R(() => {
|
|
2822
2898
|
if (!m) return;
|
|
2823
2899
|
let e = setInterval(() => {
|
|
2824
2900
|
o((t) => t <= 1 ? (clearInterval(e), window.location.href = m, 0) : t - 1);
|
|
@@ -2828,40 +2904,40 @@ var Ni = "_1vist8m0", Pi = (e) => {
|
|
|
2828
2904
|
let h = I(() => {
|
|
2829
2905
|
m && (window.location.href = m);
|
|
2830
2906
|
}, [m]);
|
|
2831
|
-
return /* @__PURE__ */
|
|
2832
|
-
className:
|
|
2833
|
-
children: /* @__PURE__ */
|
|
2834
|
-
className:
|
|
2907
|
+
return /* @__PURE__ */ U("div", {
|
|
2908
|
+
className: Yi,
|
|
2909
|
+
children: /* @__PURE__ */ W("div", {
|
|
2910
|
+
className: Xi,
|
|
2835
2911
|
children: [
|
|
2836
|
-
/* @__PURE__ */
|
|
2837
|
-
className:
|
|
2838
|
-
children: /* @__PURE__ */
|
|
2912
|
+
/* @__PURE__ */ U("div", {
|
|
2913
|
+
className: Zi,
|
|
2914
|
+
children: /* @__PURE__ */ U(ra, {})
|
|
2839
2915
|
}),
|
|
2840
|
-
/* @__PURE__ */
|
|
2841
|
-
className:
|
|
2916
|
+
/* @__PURE__ */ U("h2", {
|
|
2917
|
+
className: Qi,
|
|
2842
2918
|
children: c
|
|
2843
2919
|
}),
|
|
2844
|
-
/* @__PURE__ */
|
|
2845
|
-
className:
|
|
2920
|
+
/* @__PURE__ */ U("div", {
|
|
2921
|
+
className: $i,
|
|
2846
2922
|
dangerouslySetInnerHTML: { __html: u }
|
|
2847
2923
|
}),
|
|
2848
|
-
f === "submit_another" && /* @__PURE__ */
|
|
2924
|
+
f === "submit_another" && /* @__PURE__ */ U("div", {
|
|
2849
2925
|
className: "q22d799",
|
|
2850
|
-
children: /* @__PURE__ */
|
|
2926
|
+
children: /* @__PURE__ */ U(t, {
|
|
2851
2927
|
variant: "default",
|
|
2852
2928
|
size: "sm",
|
|
2853
2929
|
onClick: e,
|
|
2854
2930
|
children: "Submit Another"
|
|
2855
2931
|
})
|
|
2856
2932
|
}),
|
|
2857
|
-
f === "redirect" && m && /* @__PURE__ */
|
|
2933
|
+
f === "redirect" && m && /* @__PURE__ */ W("div", {
|
|
2858
2934
|
className: "q22d799",
|
|
2859
|
-
children: [/* @__PURE__ */
|
|
2935
|
+
children: [/* @__PURE__ */ U(t, {
|
|
2860
2936
|
variant: "default",
|
|
2861
2937
|
size: "sm",
|
|
2862
2938
|
onClick: h,
|
|
2863
2939
|
children: "Continue"
|
|
2864
|
-
}), /* @__PURE__ */
|
|
2940
|
+
}), /* @__PURE__ */ W("span", {
|
|
2865
2941
|
className: "q22d79a",
|
|
2866
2942
|
children: [
|
|
2867
2943
|
"Redirecting in ",
|
|
@@ -2873,16 +2949,16 @@ var Ni = "_1vist8m0", Pi = (e) => {
|
|
|
2873
2949
|
]
|
|
2874
2950
|
})
|
|
2875
2951
|
});
|
|
2876
|
-
},
|
|
2877
|
-
let t = E(29), { isError: n, contentId: r, publishedId: i, getContentId: a, allFormValues: o } = e, { collection: s } = A(), { schema: c, isLoggedIn: l, preview: u } =
|
|
2952
|
+
}, aa = (e) => {
|
|
2953
|
+
let t = E(29), { isError: n, contentId: r, publishedId: i, getContentId: a, allFormValues: o } = e, { collection: s } = A(), { schema: c, isLoggedIn: l, preview: u } = pi(), { formState: d } = se(), f = ce(), p;
|
|
2878
2954
|
t[0] !== s || t[1] !== r || t[2] !== a || t[3] !== n || t[4] !== l || t[5] !== u || t[6] !== i || t[7] !== c?.allow_draft || t[8] !== c?.key ? (p = (e) => {
|
|
2879
2955
|
u || i || c?.key && !n && c?.allow_draft && (l ? r ? s.editDraftEntry(c?.key, r, e).then((e) => {
|
|
2880
2956
|
e?.content?.data?._id && a(e?.content?.data?._id);
|
|
2881
|
-
}).catch(
|
|
2957
|
+
}).catch(oa) : s.saveDraftEntry(c?.key, e).then((e) => {
|
|
2882
2958
|
e?.content?.data?._id && a(e?.content?.data?._id);
|
|
2883
|
-
}).catch(
|
|
2959
|
+
}).catch(sa) : _i(c?.key, e));
|
|
2884
2960
|
}, t[0] = s, t[1] = r, t[2] = a, t[3] = n, t[4] = l, t[5] = u, t[6] = i, t[7] = c?.allow_draft, t[8] = c?.key, t[9] = p) : p = t[9];
|
|
2885
|
-
let m =
|
|
2961
|
+
let m = Me(p, 100), { isDirty: h, isSubmitting: g, isSubmitSuccessful: _ } = d, v;
|
|
2886
2962
|
t[10] !== o || t[11] !== m || t[12] !== f || t[13] !== h || t[14] !== n || t[15] !== _ || t[16] !== g || t[17] !== u ? (v = () => {
|
|
2887
2963
|
if (!u) {
|
|
2888
2964
|
if (g || _) {
|
|
@@ -2906,20 +2982,20 @@ var Ni = "_1vist8m0", Pi = (e) => {
|
|
|
2906
2982
|
g,
|
|
2907
2983
|
_,
|
|
2908
2984
|
u
|
|
2909
|
-
], t[19] = r, t[20] = f, t[21] = h, t[22] = n, t[23] = l, t[24] = _, t[25] = g, t[26] = u, t[27] = i, t[28] = y) : y = t[28],
|
|
2985
|
+
], t[19] = r, t[20] = f, t[21] = h, t[22] = n, t[23] = l, t[24] = _, t[25] = g, t[26] = u, t[27] = i, t[28] = y) : y = t[28], R(v, y), null;
|
|
2910
2986
|
};
|
|
2911
|
-
function
|
|
2987
|
+
function oa() {
|
|
2912
2988
|
console.error("saving entry failed");
|
|
2913
2989
|
}
|
|
2914
|
-
function
|
|
2990
|
+
function sa() {
|
|
2915
2991
|
console.error("saving entry failed");
|
|
2916
2992
|
}
|
|
2917
2993
|
//#endregion
|
|
2918
2994
|
//#region ../../libraries/react-collection/dist/lib/variants/DefaultFormVariant/DefaultFormVariant.cssm.js
|
|
2919
|
-
var
|
|
2920
|
-
let e = E(51), { schema: n, containerStyles: r, submitButtonConfig: i, isDisabled: a, widgets: o, disableCaptcha: s, debug: c, enableVerification: l } =
|
|
2995
|
+
var ca = "fil1ri0", la = "fil1ri1", ua = "fil1ri2", da = "fil1ri5", fa = () => {
|
|
2996
|
+
let e = E(51), { schema: n, containerStyles: r, submitButtonConfig: i, isDisabled: a, widgets: o, disableCaptcha: s, debug: c, enableVerification: l } = pi(), u;
|
|
2921
2997
|
e[0] === n ? u = e[1] : (u = { schema: n }, e[0] = n, e[1] = u);
|
|
2922
|
-
let { methods: d, isError: f, isLoading: p, contentId: m, publishedId: h, handleContentId: g, submitToRemote: _, allFormValues: v, showSuccessOverlay: y, dismissSuccessOverlay: b } =
|
|
2998
|
+
let { methods: d, isError: f, isLoading: p, contentId: m, publishedId: h, handleContentId: g, submitToRemote: _, allFormValues: v, showSuccessOverlay: y, dismissSuccessOverlay: b } = yi(u), { handleSubmit: x, watch: S, formState: C } = d, { isSubmitting: w } = C, T;
|
|
2923
2999
|
e[2] === S ? T = e[3] : (T = S("__captcha"), e[2] = S, e[3] = T);
|
|
2924
3000
|
let D = T, O;
|
|
2925
3001
|
e[4] === _ ? O = e[5] : (O = async (e) => {
|
|
@@ -2930,12 +3006,12 @@ var Xi = "fil1ri0", Zi = "fil1ri1", Qi = "fil1ri2", $i = "fil1ri5", ea = () => {
|
|
|
2930
3006
|
let A = k;
|
|
2931
3007
|
if (y) {
|
|
2932
3008
|
let t;
|
|
2933
|
-
return e[9] === b ? t = e[10] : (t = /* @__PURE__ */
|
|
3009
|
+
return e[9] === b ? t = e[10] : (t = /* @__PURE__ */ U(ia, { onDismiss: b }), e[9] = b, e[10] = t), t;
|
|
2934
3010
|
}
|
|
2935
3011
|
let j;
|
|
2936
|
-
e[11] === c ? j = e[12] : (j = c && /* @__PURE__ */
|
|
3012
|
+
e[11] === c ? j = e[12] : (j = c && /* @__PURE__ */ U(zi, {}), e[11] = c, e[12] = j);
|
|
2937
3013
|
let M = m || "", N = h || "", P;
|
|
2938
|
-
e[13] !== v || e[14] !== g || e[15] !== f || e[16] !== M || e[17] !== N ? (P = /* @__PURE__ */
|
|
3014
|
+
e[13] !== v || e[14] !== g || e[15] !== f || e[16] !== M || e[17] !== N ? (P = /* @__PURE__ */ U(aa, {
|
|
2939
3015
|
getContentId: g,
|
|
2940
3016
|
isError: f,
|
|
2941
3017
|
contentId: M,
|
|
@@ -2943,32 +3019,32 @@ var Xi = "fil1ri0", Zi = "fil1ri1", Qi = "fil1ri2", $i = "fil1ri5", ea = () => {
|
|
|
2943
3019
|
allFormValues: v
|
|
2944
3020
|
}), e[13] = v, e[14] = g, e[15] = f, e[16] = M, e[17] = N, e[18] = P) : P = e[18];
|
|
2945
3021
|
let F;
|
|
2946
|
-
e[19] === r ? F = e[20] : (F = Z(
|
|
3022
|
+
e[19] === r ? F = e[20] : (F = Z(ca, r), e[19] = r, e[20] = F);
|
|
2947
3023
|
let I;
|
|
2948
|
-
e[21] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */
|
|
3024
|
+
e[21] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ U(Ki, {}), e[21] = I) : I = e[21];
|
|
2949
3025
|
let L = p && "fil1ri3", R;
|
|
2950
|
-
e[22] === L ? R = e[23] : (R = Z(
|
|
3026
|
+
e[22] === L ? R = e[23] : (R = Z(la, L), e[22] = L, e[23] = R);
|
|
2951
3027
|
let z;
|
|
2952
|
-
e[24] !== l || e[25] !== n || e[26] !== o ? (z = n?.sections?.map((e) => /* @__PURE__ */
|
|
3028
|
+
e[24] !== l || e[25] !== n || e[26] !== o ? (z = n?.sections?.map((e) => /* @__PURE__ */ U(pa, {
|
|
2953
3029
|
schema: n,
|
|
2954
3030
|
section: e,
|
|
2955
3031
|
widgets: o,
|
|
2956
3032
|
enableVerification: l
|
|
2957
3033
|
}, e.id)), e[24] = l, e[25] = n, e[26] = o, e[27] = z) : z = e[27];
|
|
2958
3034
|
let B;
|
|
2959
|
-
e[28] === s ? B = e[29] : (B = !s && /* @__PURE__ */
|
|
3035
|
+
e[28] === s ? B = e[29] : (B = !s && /* @__PURE__ */ U(Li, {}), e[28] = s, e[29] = B);
|
|
2960
3036
|
let V;
|
|
2961
|
-
e[30] !== D || e[31] !== a || e[32] !== w || e[33] !== i?.show || e[34] !== i?.styles || e[35] !== i?.text ? (V = i?.show && /* @__PURE__ */
|
|
3037
|
+
e[30] !== D || e[31] !== a || e[32] !== w || e[33] !== i?.show || e[34] !== i?.styles || e[35] !== i?.text ? (V = i?.show && /* @__PURE__ */ U("div", {
|
|
2962
3038
|
className: "fil1ri4",
|
|
2963
|
-
children: /* @__PURE__ */
|
|
3039
|
+
children: /* @__PURE__ */ U(t, {
|
|
2964
3040
|
className: i?.styles,
|
|
2965
3041
|
disabled: a || w,
|
|
2966
3042
|
type: "submit",
|
|
2967
3043
|
children: w ? "Saving..." : D === "verifying" ? "Verifying..." : i?.text || "Save"
|
|
2968
3044
|
})
|
|
2969
3045
|
}), e[30] = D, e[31] = a, e[32] = w, e[33] = i?.show, e[34] = i?.styles, e[35] = i?.text, e[36] = V) : V = e[36];
|
|
2970
|
-
let
|
|
2971
|
-
e[37] !== A || e[38] !== R || e[39] !== z || e[40] !== B || e[41] !== V ? (
|
|
3046
|
+
let H;
|
|
3047
|
+
e[37] !== A || e[38] !== R || e[39] !== z || e[40] !== B || e[41] !== V ? (H = /* @__PURE__ */ W("form", {
|
|
2972
3048
|
className: R,
|
|
2973
3049
|
id: "collection-form",
|
|
2974
3050
|
onSubmit: A,
|
|
@@ -2977,14 +3053,14 @@ var Xi = "fil1ri0", Zi = "fil1ri1", Qi = "fil1ri2", $i = "fil1ri5", ea = () => {
|
|
|
2977
3053
|
B,
|
|
2978
3054
|
V
|
|
2979
3055
|
]
|
|
2980
|
-
}), e[37] = A, e[38] = R, e[39] = z, e[40] = B, e[41] = V, e[42] =
|
|
3056
|
+
}), e[37] = A, e[38] = R, e[39] = z, e[40] = B, e[41] = V, e[42] = H) : H = e[42];
|
|
2981
3057
|
let G;
|
|
2982
|
-
e[43] !==
|
|
3058
|
+
e[43] !== H || e[44] !== F ? (G = /* @__PURE__ */ W("div", {
|
|
2983
3059
|
className: F,
|
|
2984
|
-
children: [I,
|
|
2985
|
-
}), e[43] =
|
|
3060
|
+
children: [I, H]
|
|
3061
|
+
}), e[43] = H, e[44] = F, e[45] = G) : G = e[45];
|
|
2986
3062
|
let K;
|
|
2987
|
-
return e[46] !== d || e[47] !== G || e[48] !== j || e[49] !== P ? (K = /* @__PURE__ */
|
|
3063
|
+
return e[46] !== d || e[47] !== G || e[48] !== j || e[49] !== P ? (K = /* @__PURE__ */ W(re, {
|
|
2988
3064
|
...d,
|
|
2989
3065
|
children: [
|
|
2990
3066
|
j,
|
|
@@ -2992,65 +3068,65 @@ var Xi = "fil1ri0", Zi = "fil1ri1", Qi = "fil1ri2", $i = "fil1ri5", ea = () => {
|
|
|
2992
3068
|
G
|
|
2993
3069
|
]
|
|
2994
3070
|
}), e[46] = d, e[47] = G, e[48] = j, e[49] = P, e[50] = K) : K = e[50], K;
|
|
2995
|
-
},
|
|
2996
|
-
let t = E(12), { schema: n, section: r, widgets: i, enableVerification: a } = e
|
|
2997
|
-
if (!
|
|
3071
|
+
}, pa = (e) => {
|
|
3072
|
+
let t = E(12), { schema: n, section: r, widgets: i, enableVerification: a } = e;
|
|
3073
|
+
if (!ut(n, r)) return null;
|
|
3074
|
+
let o;
|
|
3075
|
+
t[0] === r ? o = t[1] : (o = r?.label && /* @__PURE__ */ U(Ji, { children: r.label }), t[0] = r, t[1] = o);
|
|
2998
3076
|
let s;
|
|
2999
|
-
t[
|
|
3000
|
-
let c;
|
|
3001
|
-
t[2] !== a || t[3] !== n || t[4] !== r?.fields || t[5] !== i ? (c = r?.fields?.map((e) => /* @__PURE__ */ H(Lr, {
|
|
3077
|
+
t[2] !== a || t[3] !== n || t[4] !== r?.fields || t[5] !== i ? (s = r?.fields?.map((e) => /* @__PURE__ */ U(Jr, {
|
|
3002
3078
|
field: e,
|
|
3003
3079
|
widgets: i,
|
|
3004
3080
|
schema: n,
|
|
3005
3081
|
settings: { enableVerification: a }
|
|
3006
|
-
}, e?.key)), t[2] = a, t[3] = n, t[4] = r?.fields, t[5] = i, t[6] =
|
|
3082
|
+
}, e?.key)), t[2] = a, t[3] = n, t[4] = r?.fields, t[5] = i, t[6] = s) : s = t[6];
|
|
3083
|
+
let c;
|
|
3084
|
+
t[7] === s ? c = t[8] : (c = /* @__PURE__ */ U("div", {
|
|
3085
|
+
className: da,
|
|
3086
|
+
children: s
|
|
3087
|
+
}), t[7] = s, t[8] = c);
|
|
3007
3088
|
let l;
|
|
3008
|
-
t[
|
|
3009
|
-
className:
|
|
3010
|
-
children: c
|
|
3011
|
-
}), t[
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
children: [s, l]
|
|
3016
|
-
}), t[9] = s, t[10] = l, t[11] = u) : u = t[11], u;
|
|
3017
|
-
}, na = "_1kah2gz0", ra = "_1kah2gz1", ia = "_1kah2gz3", aa = (e) => {
|
|
3018
|
-
let t = E(12), { totalSteps: n, currentStepIndex: r, hasLevoErrors: i } = e, { formState: a } = oe(), { errors: o } = a, s = Object.keys(o || {}).length > 0 || i, c = Math.floor((r + 1) * 100 / n), l = s && "_1kah2gz2", u;
|
|
3019
|
-
t[0] === l ? u = t[1] : (u = Z(ra, l), t[0] = l, t[1] = u);
|
|
3089
|
+
return t[9] !== o || t[10] !== c ? (l = /* @__PURE__ */ W("div", {
|
|
3090
|
+
className: ua,
|
|
3091
|
+
children: [o, c]
|
|
3092
|
+
}), t[9] = o, t[10] = c, t[11] = l) : l = t[11], l;
|
|
3093
|
+
}, ma = "_1kah2gz0", ha = "_1kah2gz1", ga = "_1kah2gz3", _a = (e) => {
|
|
3094
|
+
let t = E(12), { totalSteps: n, currentStepIndex: r, hasLevoErrors: i } = e, { formState: a } = se(), { errors: o } = a, s = Object.keys(o || {}).length > 0 || i, c = Math.floor((r + 1) * 100 / n), l = s && "_1kah2gz2", u;
|
|
3095
|
+
t[0] === l ? u = t[1] : (u = Z(ha, l), t[0] = l, t[1] = u);
|
|
3020
3096
|
let d = s && "_1kah2gz4", f;
|
|
3021
|
-
t[2] === d ? f = t[3] : (f = Z(
|
|
3097
|
+
t[2] === d ? f = t[3] : (f = Z(ga, d), t[2] = d, t[3] = f);
|
|
3022
3098
|
let p = `${c}%`, m;
|
|
3023
3099
|
t[4] === p ? m = t[5] : (m = { width: p }, t[4] = p, t[5] = m);
|
|
3024
3100
|
let h;
|
|
3025
|
-
t[6] !== f || t[7] !== m ? (h = /* @__PURE__ */
|
|
3101
|
+
t[6] !== f || t[7] !== m ? (h = /* @__PURE__ */ U("div", {
|
|
3026
3102
|
className: f,
|
|
3027
3103
|
style: m
|
|
3028
3104
|
}), t[6] = f, t[7] = m, t[8] = h) : h = t[8];
|
|
3029
3105
|
let g;
|
|
3030
|
-
return t[9] !== u || t[10] !== h ? (g = /* @__PURE__ */
|
|
3031
|
-
className:
|
|
3032
|
-
children: /* @__PURE__ */
|
|
3106
|
+
return t[9] !== u || t[10] !== h ? (g = /* @__PURE__ */ U("div", {
|
|
3107
|
+
className: ma,
|
|
3108
|
+
children: /* @__PURE__ */ U("div", {
|
|
3033
3109
|
className: u,
|
|
3034
3110
|
children: h
|
|
3035
3111
|
})
|
|
3036
3112
|
}), t[9] = u, t[10] = h, t[11] = g) : g = t[11], g;
|
|
3037
|
-
},
|
|
3113
|
+
}, va = "_1ypxmcv0", ya = "_1ypxmcv1", ba = "_1ypxmcvb", xa = "_1ypxmcvc", Sa = (e, t) => e?.sections?.flatMap((n) => (n.fields || []).filter((n) => !nt(e, n, t)).map((e) => ({
|
|
3038
3114
|
id: e.key,
|
|
3039
3115
|
content: e,
|
|
3040
3116
|
sectionId: n.id || "",
|
|
3041
3117
|
sectionLabel: n.label
|
|
3042
|
-
}))
|
|
3043
|
-
let e = E(82), { disableCaptcha: n, schema: r, widgets: i, submitButtonConfig: a, containerStyles: o, enableVerification: s } =
|
|
3044
|
-
e[0] === r ? c = e[1] : (c = () =>
|
|
3045
|
-
let [l, u] =
|
|
3118
|
+
}))) ?? [], Ca = () => {
|
|
3119
|
+
let e = E(82), { disableCaptcha: n, schema: r, widgets: i, submitButtonConfig: a, containerStyles: o, enableVerification: s } = pi(), c;
|
|
3120
|
+
e[0] === r ? c = e[1] : (c = () => Sa(r, {}), e[0] = r, e[1] = c);
|
|
3121
|
+
let [l, u] = V(c), [d, f] = V(0), [p, m] = V(0), h;
|
|
3046
3122
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
3047
3123
|
state: "entered",
|
|
3048
3124
|
direction: "next"
|
|
3049
3125
|
}, e[2] = h) : h = e[2];
|
|
3050
|
-
let [g, _] =
|
|
3126
|
+
let [g, _] = V(h), v;
|
|
3051
3127
|
e[3] === Symbol.for("react.memo_cache_sentinel") ? (v = [], e[3] = v) : v = e[3];
|
|
3052
|
-
let [y, b] =
|
|
3053
|
-
e[4] === r ? w = e[5] : (w = (e) => u(
|
|
3128
|
+
let [y, b] = V(v), x = g.state === "exiting" ? d : p, S = p === l.length - 1, C = l[x], w;
|
|
3129
|
+
e[4] === r ? w = e[5] : (w = (e) => u(Sa(r, e)), e[4] = r, e[5] = w);
|
|
3054
3130
|
let T;
|
|
3055
3131
|
e[6] === Symbol.for("react.memo_cache_sentinel") ? (T = () => {
|
|
3056
3132
|
b([]), m(0), _({
|
|
@@ -3075,26 +3151,26 @@ var Xi = "fil1ri0", Zi = "fil1ri1", Qi = "fil1ri2", $i = "fil1ri5", ea = () => {
|
|
|
3075
3151
|
onSubmitSuccess: T,
|
|
3076
3152
|
onSubmitError: D
|
|
3077
3153
|
}, e[10] = r, e[11] = w, e[12] = D, e[13] = O) : O = e[13];
|
|
3078
|
-
let { methods: k, submitToRemote: A, appendFormValues: j, handleContentId: M, isError: N, allFormValues: P, contentId: F, publishedId: I, isLoading:
|
|
3154
|
+
let { methods: k, submitToRemote: A, appendFormValues: j, handleContentId: M, isError: N, allFormValues: P, contentId: F, publishedId: I, isLoading: L, showSuccessOverlay: z, dismissSuccessOverlay: B } = yi(O), { handleSubmit: H, setFocus: G, setError: K, formState: q } = k, { isSubmitting: J } = q, Y;
|
|
3079
3155
|
e[14] !== j || e[15] !== C?.content?.key || e[16] !== C?.id || e[17] !== r || e[18] !== A ? (Y = async (e) => {
|
|
3080
3156
|
b((e) => e.filter((e) => e?.param !== C?.content?.key));
|
|
3081
|
-
let t =
|
|
3157
|
+
let t = Sa(r, e), n = t.findIndex((e) => e.id === C?.id);
|
|
3082
3158
|
n !== -1 && n + 1 < t.length ? (u(t), j(e), m(n + 1), _({
|
|
3083
3159
|
state: "exiting",
|
|
3084
3160
|
direction: "next"
|
|
3085
3161
|
})) : await A(e);
|
|
3086
3162
|
}, e[14] = j, e[15] = C?.content?.key, e[16] = C?.id, e[17] = r, e[18] = A, e[19] = Y) : Y = e[19];
|
|
3087
3163
|
let X;
|
|
3088
|
-
e[20] !==
|
|
3164
|
+
e[20] !== H || e[21] !== Y ? (X = H(Y), e[20] = H, e[21] = Y, e[22] = X) : X = e[22];
|
|
3089
3165
|
let ee = X, te;
|
|
3090
3166
|
e[23] !== g.state || e[24] !== p ? (te = () => {
|
|
3091
|
-
g.state === "entered" && (p <= 0 || (m(
|
|
3167
|
+
g.state === "entered" && (p <= 0 || (m(wa), _({
|
|
3092
3168
|
state: "exiting",
|
|
3093
3169
|
direction: "prev"
|
|
3094
3170
|
})));
|
|
3095
3171
|
}, e[23] = g.state, e[24] = p, e[25] = te) : te = e[25];
|
|
3096
|
-
let
|
|
3097
|
-
e[26] !== g.direction || e[27] !== g.state || e[28] !== C || e[29] !== p || e[30] !== G ? (
|
|
3172
|
+
let ne = te, ie;
|
|
3173
|
+
e[26] !== g.direction || e[27] !== g.state || e[28] !== C || e[29] !== p || e[30] !== G ? (ie = () => {
|
|
3098
3174
|
g.state === "exiting" ? (f(p), _({
|
|
3099
3175
|
state: "entering",
|
|
3100
3176
|
direction: g.direction
|
|
@@ -3102,8 +3178,8 @@ var Xi = "fil1ri0", Zi = "fil1ri1", Qi = "fil1ri2", $i = "fil1ri5", ea = () => {
|
|
|
3102
3178
|
state: "entered",
|
|
3103
3179
|
direction: g.direction
|
|
3104
3180
|
}), C?.content?.key && G(C.content.key));
|
|
3105
|
-
}, e[26] = g.direction, e[27] = g.state, e[28] = C, e[29] = p, e[30] = G, e[31] =
|
|
3106
|
-
let
|
|
3181
|
+
}, e[26] = g.direction, e[27] = g.state, e[28] = C, e[29] = p, e[30] = G, e[31] = ie) : ie = e[31];
|
|
3182
|
+
let Q = ie, ae, oe;
|
|
3107
3183
|
if (e[32] !== C || e[33] !== y || e[34] !== K ? (ae = () => {
|
|
3108
3184
|
if (C && y?.length > 0) {
|
|
3109
3185
|
let e = y?.find((e) => e?.param === C?.content?.key);
|
|
@@ -3116,35 +3192,35 @@ var Xi = "fil1ri0", Zi = "fil1ri1", Qi = "fil1ri2", $i = "fil1ri5", ea = () => {
|
|
|
3116
3192
|
C,
|
|
3117
3193
|
y,
|
|
3118
3194
|
K
|
|
3119
|
-
], e[32] = C, e[33] = y, e[34] = K, e[35] = ae, e[36] = oe) : (ae = e[35], oe = e[36]),
|
|
3195
|
+
], e[32] = C, e[33] = y, e[34] = K, e[35] = ae, e[36] = oe) : (ae = e[35], oe = e[36]), R(ae, oe), !r || l.length === 0) return null;
|
|
3120
3196
|
if (z) {
|
|
3121
3197
|
let t;
|
|
3122
|
-
return e[37] ===
|
|
3198
|
+
return e[37] === B ? t = e[38] : (t = /* @__PURE__ */ U(ia, { onDismiss: B }), e[37] = B, e[38] = t), t;
|
|
3123
3199
|
}
|
|
3124
|
-
let se = J ||
|
|
3125
|
-
e[39] !== P || e[40] !== M || e[41] !== N || e[42] !== ce || e[43] !==
|
|
3200
|
+
let se = J || L, ce = F || "", le = I || "", de;
|
|
3201
|
+
e[39] !== P || e[40] !== M || e[41] !== N || e[42] !== ce || e[43] !== le ? (de = /* @__PURE__ */ U(aa, {
|
|
3126
3202
|
getContentId: M,
|
|
3127
3203
|
isError: N,
|
|
3128
3204
|
contentId: ce,
|
|
3129
|
-
publishedId:
|
|
3205
|
+
publishedId: le,
|
|
3130
3206
|
allFormValues: P
|
|
3131
|
-
}), e[39] = P, e[40] = M, e[41] = N, e[42] = ce, e[43] =
|
|
3207
|
+
}), e[39] = P, e[40] = M, e[41] = N, e[42] = ce, e[43] = le, e[44] = de) : de = e[44];
|
|
3132
3208
|
let fe;
|
|
3133
|
-
e[45] === Symbol.for("react.memo_cache_sentinel") ? (fe = /* @__PURE__ */
|
|
3209
|
+
e[45] === Symbol.for("react.memo_cache_sentinel") ? (fe = /* @__PURE__ */ U(Ki, { className: xa }), e[45] = fe) : fe = e[45];
|
|
3134
3210
|
let pe = C?.sectionLabel, me;
|
|
3135
|
-
e[46] === pe ? me = e[47] : (me = /* @__PURE__ */
|
|
3136
|
-
className:
|
|
3211
|
+
e[46] === pe ? me = e[47] : (me = /* @__PURE__ */ U(Ji, {
|
|
3212
|
+
className: ba,
|
|
3137
3213
|
children: pe
|
|
3138
3214
|
}), e[46] = pe, e[47] = me);
|
|
3139
3215
|
let he = l?.length || 1, ge = Array.isArray(y) && y?.length > 0, _e;
|
|
3140
|
-
e[48] !== p || e[49] !== he || e[50] !== ge ? (_e = /* @__PURE__ */
|
|
3216
|
+
e[48] !== p || e[49] !== he || e[50] !== ge ? (_e = /* @__PURE__ */ U(_a, {
|
|
3141
3217
|
currentStepIndex: p,
|
|
3142
3218
|
totalSteps: he,
|
|
3143
3219
|
hasLevoErrors: ge
|
|
3144
3220
|
}), e[48] = p, e[49] = he, e[50] = ge, e[51] = _e) : _e = e[51];
|
|
3145
3221
|
let ve;
|
|
3146
|
-
e[52] !== me || e[53] !== _e ? (ve = /* @__PURE__ */
|
|
3147
|
-
className:
|
|
3222
|
+
e[52] !== me || e[53] !== _e ? (ve = /* @__PURE__ */ W("div", {
|
|
3223
|
+
className: va,
|
|
3148
3224
|
children: [
|
|
3149
3225
|
fe,
|
|
3150
3226
|
me,
|
|
@@ -3152,39 +3228,39 @@ var Xi = "fil1ri0", Zi = "fil1ri1", Qi = "fil1ri2", $i = "fil1ri5", ea = () => {
|
|
|
3152
3228
|
]
|
|
3153
3229
|
}), e[52] = me, e[53] = _e, e[54] = ve) : ve = e[54];
|
|
3154
3230
|
let ye;
|
|
3155
|
-
e[55] === o ? ye = e[56] : (ye = Z(
|
|
3231
|
+
e[55] === o ? ye = e[56] : (ye = Z(ya, o), e[55] = o, e[56] = ye);
|
|
3156
3232
|
let be;
|
|
3157
|
-
e[57] !== g.direction || e[58] !== g.state || e[59] !== C || e[60] !== n || e[61] !== s || e[62] !==
|
|
3233
|
+
e[57] !== g.direction || e[58] !== g.state || e[59] !== C || e[60] !== n || e[61] !== s || e[62] !== Q || e[63] !== ne || e[64] !== se || e[65] !== S || e[66] !== p || e[67] !== ee || e[68] !== r || e[69] !== a?.show || e[70] !== a?.styles || e[71] !== a?.text || e[72] !== i ? (be = C && /* @__PURE__ */ U("div", {
|
|
3158
3234
|
className: "_1ypxmcv6",
|
|
3159
3235
|
"data-state": g.state,
|
|
3160
3236
|
"data-direction": g.direction,
|
|
3161
|
-
onAnimationEnd:
|
|
3162
|
-
children: /* @__PURE__ */
|
|
3237
|
+
onAnimationEnd: Q,
|
|
3238
|
+
children: /* @__PURE__ */ W("form", {
|
|
3163
3239
|
onSubmit: ee,
|
|
3164
3240
|
className: "_1ypxmcv7",
|
|
3165
3241
|
children: [
|
|
3166
|
-
/* @__PURE__ */
|
|
3242
|
+
/* @__PURE__ */ U(Jr, {
|
|
3167
3243
|
field: C.content,
|
|
3168
3244
|
schema: r,
|
|
3169
3245
|
widgets: i,
|
|
3170
3246
|
settings: { enableVerification: s }
|
|
3171
3247
|
}),
|
|
3172
|
-
!n && S && /* @__PURE__ */
|
|
3173
|
-
/* @__PURE__ */
|
|
3248
|
+
!n && S && /* @__PURE__ */ U(Li, {}),
|
|
3249
|
+
/* @__PURE__ */ W("div", {
|
|
3174
3250
|
className: "_1ypxmcv8",
|
|
3175
|
-
children: [/* @__PURE__ */
|
|
3251
|
+
children: [/* @__PURE__ */ U("div", { className: "_1ypxmcv9" }), /* @__PURE__ */ W("div", {
|
|
3176
3252
|
className: "_1ypxmcva",
|
|
3177
|
-
children: [/* @__PURE__ */
|
|
3253
|
+
children: [/* @__PURE__ */ W(t, {
|
|
3178
3254
|
type: "button",
|
|
3179
|
-
onClick:
|
|
3255
|
+
onClick: ne,
|
|
3180
3256
|
size: "lg",
|
|
3181
3257
|
disabled: p === 0 || se || g.state !== "entered",
|
|
3182
3258
|
variant: "ghost",
|
|
3183
|
-
children: [/* @__PURE__ */
|
|
3259
|
+
children: [/* @__PURE__ */ U(ue, {
|
|
3184
3260
|
size: 18,
|
|
3185
3261
|
className: "mr-2"
|
|
3186
3262
|
}), "Prev"]
|
|
3187
|
-
}), (!S || a?.show !== !1) && /* @__PURE__ */
|
|
3263
|
+
}), (!S || a?.show !== !1) && /* @__PURE__ */ U(t, {
|
|
3188
3264
|
type: "submit",
|
|
3189
3265
|
size: "lg",
|
|
3190
3266
|
className: a?.styles,
|
|
@@ -3195,14 +3271,14 @@ var Xi = "fil1ri0", Zi = "fil1ri1", Qi = "fil1ri2", $i = "fil1ri5", ea = () => {
|
|
|
3195
3271
|
})
|
|
3196
3272
|
]
|
|
3197
3273
|
})
|
|
3198
|
-
}, C.id), e[57] = g.direction, e[58] = g.state, e[59] = C, e[60] = n, e[61] = s, e[62] =
|
|
3274
|
+
}, C.id), e[57] = g.direction, e[58] = g.state, e[59] = C, e[60] = n, e[61] = s, e[62] = Q, e[63] = ne, e[64] = se, e[65] = S, e[66] = p, e[67] = ee, e[68] = r, e[69] = a?.show, e[70] = a?.styles, e[71] = a?.text, e[72] = i, e[73] = be) : be = e[73];
|
|
3199
3275
|
let xe;
|
|
3200
|
-
e[74] !== ye || e[75] !== be ? (xe = /* @__PURE__ */
|
|
3276
|
+
e[74] !== ye || e[75] !== be ? (xe = /* @__PURE__ */ U("div", {
|
|
3201
3277
|
className: ye,
|
|
3202
3278
|
children: be
|
|
3203
3279
|
}), e[74] = ye, e[75] = be, e[76] = xe) : xe = e[76];
|
|
3204
3280
|
let Se;
|
|
3205
|
-
return e[77] !== k || e[78] !== de || e[79] !== ve || e[80] !== xe ? (Se = /* @__PURE__ */
|
|
3281
|
+
return e[77] !== k || e[78] !== de || e[79] !== ve || e[80] !== xe ? (Se = /* @__PURE__ */ W(re, {
|
|
3206
3282
|
...k,
|
|
3207
3283
|
children: [
|
|
3208
3284
|
de,
|
|
@@ -3211,22 +3287,22 @@ var Xi = "fil1ri0", Zi = "fil1ri1", Qi = "fil1ri2", $i = "fil1ri5", ea = () => {
|
|
|
3211
3287
|
]
|
|
3212
3288
|
}), e[77] = k, e[78] = de, e[79] = ve, e[80] = xe, e[81] = Se) : Se = e[81], Se;
|
|
3213
3289
|
};
|
|
3214
|
-
function
|
|
3290
|
+
function wa(e) {
|
|
3215
3291
|
return Math.max(e - 1, 0);
|
|
3216
3292
|
}
|
|
3217
3293
|
//#endregion
|
|
3218
3294
|
//#region ../../libraries/react-collection/dist/lib/variants/StepFormVariant2/StepFormVariant2.cssm.js
|
|
3219
|
-
var
|
|
3220
|
-
let e = E(99), { disableCaptcha: n, schema: r, widgets: i, submitButtonConfig: a, containerStyles: o, enableVerification: s } =
|
|
3221
|
-
e[0] === r ? c = e[1] : (c = () =>
|
|
3222
|
-
let [l, u] =
|
|
3295
|
+
var Ta = "zlgzzn0", Ea = "zlgzzn1", Da = "zlgzznb", Oa = "zlgzznc", ka = (e, t) => e?.sections ? e.sections.filter((n) => st(e, n.fields || [], t)) : [], Aa = () => {
|
|
3296
|
+
let e = E(99), { disableCaptcha: n, schema: r, widgets: i, submitButtonConfig: a, containerStyles: o, enableVerification: s } = pi(), c;
|
|
3297
|
+
e[0] === r ? c = e[1] : (c = () => ka(r, {}), e[0] = r, e[1] = c);
|
|
3298
|
+
let [l, u] = V(c), [d, f] = V(0), [p, m] = V(0), h;
|
|
3223
3299
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
3224
3300
|
state: "entered",
|
|
3225
3301
|
direction: "next"
|
|
3226
3302
|
}, e[2] = h) : h = e[2];
|
|
3227
|
-
let [g, _] =
|
|
3303
|
+
let [g, _] = V(h), v;
|
|
3228
3304
|
e[3] === Symbol.for("react.memo_cache_sentinel") ? (v = [], e[3] = v) : v = e[3];
|
|
3229
|
-
let [y, b] =
|
|
3305
|
+
let [y, b] = V(v), x = g.state === "exiting" ? d : p, S = l[x], C = p === l.length - 1, w;
|
|
3230
3306
|
bb0: {
|
|
3231
3307
|
if (r) {
|
|
3232
3308
|
let t;
|
|
@@ -3243,7 +3319,7 @@ var pa = "zlgzzn0", ma = "zlgzzn1", ha = "zlgzznb", ga = "zlgzznc", _a = (e, t)
|
|
|
3243
3319
|
w = null;
|
|
3244
3320
|
}
|
|
3245
3321
|
let T = w, D;
|
|
3246
|
-
e[9] === r ? D = e[10] : (D = (e) => u(
|
|
3322
|
+
e[9] === r ? D = e[10] : (D = (e) => u(ka(r, e)), e[9] = r, e[10] = D);
|
|
3247
3323
|
let O;
|
|
3248
3324
|
e[11] === Symbol.for("react.memo_cache_sentinel") ? (O = () => {
|
|
3249
3325
|
b([]), m(0), _({
|
|
@@ -3270,15 +3346,15 @@ var pa = "zlgzzn0", ma = "zlgzzn1", ha = "zlgzznb", ga = "zlgzznc", _a = (e, t)
|
|
|
3270
3346
|
onSubmitSuccess: O,
|
|
3271
3347
|
onSubmitError: k
|
|
3272
3348
|
}, e[15] = r, e[16] = T, e[17] = D, e[18] = k, e[19] = A) : A = e[19];
|
|
3273
|
-
let { methods: j, submitToRemote: M, appendFormValues: N, handleContentId: P, isError: F, allFormValues: I, contentId:
|
|
3349
|
+
let { methods: j, submitToRemote: M, appendFormValues: N, handleContentId: P, isError: F, allFormValues: I, contentId: L, publishedId: z, isLoading: B, showSuccessOverlay: H, dismissSuccessOverlay: G } = yi(A), { handleSubmit: K, setFocus: q, setError: J, watch: Y, formState: X } = j, { isSubmitting: ee } = X, te;
|
|
3274
3350
|
e[20] === Y ? te = e[21] : (te = Y("__captcha"), e[20] = Y, e[21] = te);
|
|
3275
|
-
let
|
|
3276
|
-
e[22] !== I || e[23] !== g.state || e[24] !== N || e[25] !== S?.fields || e[26] !== p || e[27] !== r || e[28] !== M ? (
|
|
3351
|
+
let ne = te, ie;
|
|
3352
|
+
e[22] !== I || e[23] !== g.state || e[24] !== N || e[25] !== S?.fields || e[26] !== p || e[27] !== r || e[28] !== M ? (ie = async (e) => {
|
|
3277
3353
|
b((e) => {
|
|
3278
|
-
let t = S?.fields?.map(
|
|
3354
|
+
let t = S?.fields?.map(ja) || [];
|
|
3279
3355
|
return e.filter((e) => !t.includes(e.param));
|
|
3280
3356
|
});
|
|
3281
|
-
let t =
|
|
3357
|
+
let t = ka(r, {
|
|
3282
3358
|
...I || {},
|
|
3283
3359
|
...e
|
|
3284
3360
|
});
|
|
@@ -3286,12 +3362,12 @@ var pa = "zlgzzn0", ma = "zlgzzn1", ha = "zlgzznb", ga = "zlgzznc", _a = (e, t)
|
|
|
3286
3362
|
state: "exiting",
|
|
3287
3363
|
direction: "next"
|
|
3288
3364
|
})));
|
|
3289
|
-
}, e[22] = I, e[23] = g.state, e[24] = N, e[25] = S?.fields, e[26] = p, e[27] = r, e[28] = M, e[29] =
|
|
3290
|
-
let
|
|
3291
|
-
e[30] !== K || e[31] !==
|
|
3292
|
-
let ae =
|
|
3365
|
+
}, e[22] = I, e[23] = g.state, e[24] = N, e[25] = S?.fields, e[26] = p, e[27] = r, e[28] = M, e[29] = ie) : ie = e[29];
|
|
3366
|
+
let Q;
|
|
3367
|
+
e[30] !== K || e[31] !== ie ? (Q = K(ie), e[30] = K, e[31] = ie, e[32] = Q) : Q = e[32];
|
|
3368
|
+
let ae = Q, oe;
|
|
3293
3369
|
e[33] !== g.state || e[34] !== p ? (oe = () => {
|
|
3294
|
-
g.state === "entered" && (p <= 0 || (m(
|
|
3370
|
+
g.state === "entered" && (p <= 0 || (m(Ma), _({
|
|
3295
3371
|
state: "exiting",
|
|
3296
3372
|
direction: "prev"
|
|
3297
3373
|
})));
|
|
@@ -3306,7 +3382,7 @@ var pa = "zlgzzn0", ma = "zlgzzn1", ha = "zlgzznb", ga = "zlgzznc", _a = (e, t)
|
|
|
3306
3382
|
direction: g.direction
|
|
3307
3383
|
}), S?.fields?.[0]?.key && q(S.fields[0].key));
|
|
3308
3384
|
}, e[36] = g.direction, e[37] = g.state, e[38] = S, e[39] = p, e[40] = q, e[41] = ce) : ce = e[41];
|
|
3309
|
-
let
|
|
3385
|
+
let le = ce, de;
|
|
3310
3386
|
e[42] !== g.state || e[43] !== S || e[44] !== y || e[45] !== J ? (de = () => {
|
|
3311
3387
|
y?.length > 0 && S?.fields && g?.state === "entered" && y.forEach((e) => {
|
|
3312
3388
|
S.fields?.some((t) => t.key === e.param) && J(e?.param, {
|
|
@@ -3321,13 +3397,13 @@ var pa = "zlgzzn0", ma = "zlgzzn1", ha = "zlgzznb", ga = "zlgzznc", _a = (e, t)
|
|
|
3321
3397
|
J,
|
|
3322
3398
|
S,
|
|
3323
3399
|
g
|
|
3324
|
-
], e[47] = g, e[48] = S, e[49] = y, e[50] = J, e[51] = fe) : fe = e[51],
|
|
3325
|
-
if (
|
|
3400
|
+
], e[47] = g, e[48] = S, e[49] = y, e[50] = J, e[51] = fe) : fe = e[51], R(de, fe), !r || l.length === 0) return null;
|
|
3401
|
+
if (H) {
|
|
3326
3402
|
let t;
|
|
3327
|
-
return e[52] === G ? t = e[53] : (t = /* @__PURE__ */
|
|
3403
|
+
return e[52] === G ? t = e[53] : (t = /* @__PURE__ */ U(ia, { onDismiss: G }), e[52] = G, e[53] = t), t;
|
|
3328
3404
|
}
|
|
3329
|
-
let pe = ee ||
|
|
3330
|
-
e[54] !== I || e[55] !== P || e[56] !== F || e[57] !== me || e[58] !== he ? (ge = /* @__PURE__ */
|
|
3405
|
+
let pe = ee || B || ne === "verifying" && C, me = L || "", he = z || "", ge;
|
|
3406
|
+
e[54] !== I || e[55] !== P || e[56] !== F || e[57] !== me || e[58] !== he ? (ge = /* @__PURE__ */ U(aa, {
|
|
3331
3407
|
getContentId: P,
|
|
3332
3408
|
isError: F,
|
|
3333
3409
|
contentId: me,
|
|
@@ -3335,21 +3411,21 @@ var pa = "zlgzzn0", ma = "zlgzzn1", ha = "zlgzznb", ga = "zlgzznc", _a = (e, t)
|
|
|
3335
3411
|
allFormValues: I
|
|
3336
3412
|
}), e[54] = I, e[55] = P, e[56] = F, e[57] = me, e[58] = he, e[59] = ge) : ge = e[59];
|
|
3337
3413
|
let _e;
|
|
3338
|
-
e[60] === Symbol.for("react.memo_cache_sentinel") ? (_e = /* @__PURE__ */
|
|
3414
|
+
e[60] === Symbol.for("react.memo_cache_sentinel") ? (_e = /* @__PURE__ */ U(Ki, { className: Oa }), e[60] = _e) : _e = e[60];
|
|
3339
3415
|
let ve = S?.label, ye;
|
|
3340
|
-
e[61] === ve ? ye = e[62] : (ye = /* @__PURE__ */
|
|
3341
|
-
className:
|
|
3416
|
+
e[61] === ve ? ye = e[62] : (ye = /* @__PURE__ */ U(Ji, {
|
|
3417
|
+
className: Da,
|
|
3342
3418
|
children: ve
|
|
3343
3419
|
}), e[61] = ve, e[62] = ye);
|
|
3344
3420
|
let be = l?.length || 1, xe = Array.isArray(y) && y?.length > 0, Se;
|
|
3345
|
-
e[63] !== p || e[64] !== be || e[65] !== xe ? (Se = /* @__PURE__ */
|
|
3421
|
+
e[63] !== p || e[64] !== be || e[65] !== xe ? (Se = /* @__PURE__ */ U(_a, {
|
|
3346
3422
|
currentStepIndex: p,
|
|
3347
3423
|
totalSteps: be,
|
|
3348
3424
|
hasLevoErrors: xe
|
|
3349
3425
|
}), e[63] = p, e[64] = be, e[65] = xe, e[66] = Se) : Se = e[66];
|
|
3350
3426
|
let Ce;
|
|
3351
|
-
e[67] !== ye || e[68] !== Se ? (Ce = /* @__PURE__ */
|
|
3352
|
-
className:
|
|
3427
|
+
e[67] !== ye || e[68] !== Se ? (Ce = /* @__PURE__ */ W("div", {
|
|
3428
|
+
className: Ta,
|
|
3353
3429
|
children: [
|
|
3354
3430
|
_e,
|
|
3355
3431
|
ye,
|
|
@@ -3357,57 +3433,57 @@ var pa = "zlgzzn0", ma = "zlgzzn1", ha = "zlgzznb", ga = "zlgzznc", _a = (e, t)
|
|
|
3357
3433
|
]
|
|
3358
3434
|
}), e[67] = ye, e[68] = Se, e[69] = Ce) : Ce = e[69];
|
|
3359
3435
|
let we;
|
|
3360
|
-
e[70] === o ? we = e[71] : (we = Z(
|
|
3436
|
+
e[70] === o ? we = e[71] : (we = Z(Ea, o), e[70] = o, e[71] = we);
|
|
3361
3437
|
let Te;
|
|
3362
|
-
e[72] !== g.direction || e[73] !== g.state || e[74] !==
|
|
3438
|
+
e[72] !== g.direction || e[73] !== g.state || e[74] !== ne || e[75] !== S || e[76] !== n || e[77] !== x || e[78] !== s || e[79] !== le || e[80] !== se || e[81] !== pe || e[82] !== C || e[83] !== p || e[84] !== ae || e[85] !== r || e[86] !== a?.show || e[87] !== a?.styles || e[88] !== a?.text || e[89] !== i ? (Te = S && /* @__PURE__ */ U("div", {
|
|
3363
3439
|
className: "zlgzzn6",
|
|
3364
3440
|
"data-state": g.state,
|
|
3365
3441
|
"data-direction": g.direction,
|
|
3366
|
-
onAnimationEnd:
|
|
3367
|
-
children: /* @__PURE__ */
|
|
3442
|
+
onAnimationEnd: le,
|
|
3443
|
+
children: /* @__PURE__ */ W("form", {
|
|
3368
3444
|
onSubmit: ae,
|
|
3369
3445
|
className: "zlgzzn7",
|
|
3370
3446
|
children: [
|
|
3371
|
-
S.fields?.map((e) => e.hidden ? null : /* @__PURE__ */
|
|
3447
|
+
S.fields?.map((e) => e.hidden ? null : /* @__PURE__ */ U(Jr, {
|
|
3372
3448
|
field: e,
|
|
3373
3449
|
schema: r,
|
|
3374
3450
|
widgets: i,
|
|
3375
3451
|
settings: { enableVerification: s }
|
|
3376
3452
|
}, e.key)),
|
|
3377
|
-
!n && C && /* @__PURE__ */
|
|
3378
|
-
/* @__PURE__ */
|
|
3453
|
+
!n && C && /* @__PURE__ */ U(Li, {}),
|
|
3454
|
+
/* @__PURE__ */ W("div", {
|
|
3379
3455
|
className: "zlgzzn8",
|
|
3380
|
-
children: [/* @__PURE__ */
|
|
3456
|
+
children: [/* @__PURE__ */ U("div", { className: "zlgzzn9" }), /* @__PURE__ */ W("div", {
|
|
3381
3457
|
className: "zlgzzna",
|
|
3382
|
-
children: [/* @__PURE__ */
|
|
3458
|
+
children: [/* @__PURE__ */ W(t, {
|
|
3383
3459
|
type: "button",
|
|
3384
3460
|
onClick: se,
|
|
3385
3461
|
size: "lg",
|
|
3386
3462
|
disabled: p === 0 || pe || g.state !== "entered",
|
|
3387
3463
|
variant: "ghost",
|
|
3388
|
-
children: [/* @__PURE__ */
|
|
3464
|
+
children: [/* @__PURE__ */ U(ue, {
|
|
3389
3465
|
size: 18,
|
|
3390
3466
|
className: "mr-2"
|
|
3391
3467
|
}), "Prev"]
|
|
3392
|
-
}), (!C || a?.show !== !1) && /* @__PURE__ */
|
|
3468
|
+
}), (!C || a?.show !== !1) && /* @__PURE__ */ U(t, {
|
|
3393
3469
|
type: "submit",
|
|
3394
3470
|
size: "lg",
|
|
3395
3471
|
className: a?.styles,
|
|
3396
3472
|
disabled: pe || g.state !== "entered",
|
|
3397
|
-
children: pe ?
|
|
3473
|
+
children: pe ? ne === "verifying" ? "Verifying..." : "Saving..." : C ? a?.text || "Save" : "Next"
|
|
3398
3474
|
})]
|
|
3399
3475
|
})]
|
|
3400
3476
|
})
|
|
3401
3477
|
]
|
|
3402
3478
|
})
|
|
3403
|
-
}, S.id || x), e[72] = g.direction, e[73] = g.state, e[74] =
|
|
3479
|
+
}, S.id || x), e[72] = g.direction, e[73] = g.state, e[74] = ne, e[75] = S, e[76] = n, e[77] = x, e[78] = s, e[79] = le, e[80] = se, e[81] = pe, e[82] = C, e[83] = p, e[84] = ae, e[85] = r, e[86] = a?.show, e[87] = a?.styles, e[88] = a?.text, e[89] = i, e[90] = Te) : Te = e[90];
|
|
3404
3480
|
let Ee;
|
|
3405
|
-
e[91] !== we || e[92] !== Te ? (Ee = /* @__PURE__ */
|
|
3481
|
+
e[91] !== we || e[92] !== Te ? (Ee = /* @__PURE__ */ U("div", {
|
|
3406
3482
|
className: we,
|
|
3407
3483
|
children: Te
|
|
3408
3484
|
}), e[91] = we, e[92] = Te, e[93] = Ee) : Ee = e[93];
|
|
3409
3485
|
let De;
|
|
3410
|
-
return e[94] !== j || e[95] !== ge || e[96] !== Ce || e[97] !== Ee ? (De = /* @__PURE__ */
|
|
3486
|
+
return e[94] !== j || e[95] !== ge || e[96] !== Ce || e[97] !== Ee ? (De = /* @__PURE__ */ W(re, {
|
|
3411
3487
|
...j,
|
|
3412
3488
|
children: [
|
|
3413
3489
|
ge,
|
|
@@ -3416,24 +3492,24 @@ var pa = "zlgzzn0", ma = "zlgzzn1", ha = "zlgzznb", ga = "zlgzznc", _a = (e, t)
|
|
|
3416
3492
|
]
|
|
3417
3493
|
}), e[94] = j, e[95] = ge, e[96] = Ce, e[97] = Ee, e[98] = De) : De = e[98], De;
|
|
3418
3494
|
};
|
|
3419
|
-
function
|
|
3495
|
+
function ja(e) {
|
|
3420
3496
|
return e.key;
|
|
3421
3497
|
}
|
|
3422
|
-
function
|
|
3498
|
+
function Ma(e) {
|
|
3423
3499
|
return Math.max(e - 1, 0);
|
|
3424
3500
|
}
|
|
3425
3501
|
//#endregion
|
|
3426
3502
|
//#region ../../libraries/react-collection/dist/lib/variants/StepsFormVariant/StepsFormVariant.cssm.js
|
|
3427
|
-
var
|
|
3428
|
-
let e = E(15), { schema: t, containerStyles: n } =
|
|
3429
|
-
e[0] === t ? r = e[1] : (r = () =>
|
|
3430
|
-
let [i, a] =
|
|
3503
|
+
var Na = "_1f3ynb50", Pa = "_1f3ynb54", Fa = "_1f3ynb55", Ia = (e, t) => e?.sections ? e.sections.filter((n) => st(e, n.fields || [], t)) : [], La = () => {
|
|
3504
|
+
let e = E(15), { schema: t, containerStyles: n } = pi(), r;
|
|
3505
|
+
e[0] === t ? r = e[1] : (r = () => Ia(t, {}), e[0] = t, e[1] = r);
|
|
3506
|
+
let [i, a] = V(r), [o, s] = V(0), c;
|
|
3431
3507
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (c = () => {
|
|
3432
|
-
s(
|
|
3508
|
+
s(za);
|
|
3433
3509
|
}, e[2] = c) : c = e[2];
|
|
3434
3510
|
let l = c, u;
|
|
3435
3511
|
e[3] === Symbol.for("react.memo_cache_sentinel") ? (u = () => {
|
|
3436
|
-
s(
|
|
3512
|
+
s(Ba);
|
|
3437
3513
|
}, e[3] = u) : u = e[3];
|
|
3438
3514
|
let d = u, f;
|
|
3439
3515
|
e[4] === Symbol.for("react.memo_cache_sentinel") ? (f = (e) => {
|
|
@@ -3441,14 +3517,14 @@ var xa = "_1f3ynb50", Sa = "_1f3ynb54", Ca = "_1f3ynb55", wa = (e, t) => e?.sect
|
|
|
3441
3517
|
}, e[4] = f) : f = e[4];
|
|
3442
3518
|
let p = f, m;
|
|
3443
3519
|
e[5] === t ? m = e[6] : (m = (e) => {
|
|
3444
|
-
a(
|
|
3520
|
+
a(Ia(t, e)), d();
|
|
3445
3521
|
}, e[5] = t, e[6] = m);
|
|
3446
3522
|
let h;
|
|
3447
3523
|
e[7] === t ? h = e[8] : (h = (e) => {
|
|
3448
|
-
a(
|
|
3524
|
+
a(Ia(t, e));
|
|
3449
3525
|
}, e[7] = t, e[8] = h);
|
|
3450
3526
|
let g;
|
|
3451
|
-
return e[9] !== n || e[10] !== o || e[11] !== m || e[12] !== h || e[13] !== i ? (g = /* @__PURE__ */
|
|
3527
|
+
return e[9] !== n || e[10] !== o || e[11] !== m || e[12] !== h || e[13] !== i ? (g = /* @__PURE__ */ U(Ra, {
|
|
3452
3528
|
currentSectionIndex: o,
|
|
3453
3529
|
visibleSections: i,
|
|
3454
3530
|
onAdvanceWithValues: m,
|
|
@@ -3457,10 +3533,10 @@ var xa = "_1f3ynb50", Sa = "_1f3ynb54", Ca = "_1f3ynb55", wa = (e, t) => e?.sect
|
|
|
3457
3533
|
onInit: h,
|
|
3458
3534
|
containerStyles: n
|
|
3459
3535
|
}), e[9] = n, e[10] = o, e[11] = m, e[12] = h, e[13] = i, e[14] = g) : g = e[14], g;
|
|
3460
|
-
},
|
|
3461
|
-
let n = E(82), { containerStyles: r, currentSectionIndex: i, visibleSections: a, onAdvanceWithValues: o, handlePrev: s, goToIndex: c, onInit: l } = e, { schema: u, disableCaptcha: d, isDisabled: f, submitButtonConfig: p, widgets: m, enableVerification: h } =
|
|
3536
|
+
}, Ra = (e) => {
|
|
3537
|
+
let n = E(82), { containerStyles: r, currentSectionIndex: i, visibleSections: a, onAdvanceWithValues: o, handlePrev: s, goToIndex: c, onInit: l } = e, { schema: u, disableCaptcha: d, isDisabled: f, submitButtonConfig: p, widgets: m, enableVerification: h } = pi(), g;
|
|
3462
3538
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (g = [], n[0] = g) : g = n[0];
|
|
3463
|
-
let [_, v] =
|
|
3539
|
+
let [_, v] = V(g), y = a?.[i], b;
|
|
3464
3540
|
bb0: {
|
|
3465
3541
|
if (u) {
|
|
3466
3542
|
let e;
|
|
@@ -3496,63 +3572,63 @@ var xa = "_1f3ynb50", Sa = "_1f3ynb54", Ca = "_1f3ynb55", wa = (e, t) => e?.sect
|
|
|
3496
3572
|
onSubmitSuccess: C,
|
|
3497
3573
|
onSubmitError: w
|
|
3498
3574
|
}, n[11] = l, n[12] = u, n[13] = x, n[14] = C, n[15] = w, n[16] = T) : T = n[16];
|
|
3499
|
-
let { methods: D, submitToRemote: O, appendFormValues: k, isLoading: A, handleContentId: j, isError: M, contentId: N, publishedId: P, allFormValues: F, showSuccessOverlay: I, dismissSuccessOverlay:
|
|
3500
|
-
n[17] ===
|
|
3575
|
+
let { methods: D, submitToRemote: O, appendFormValues: k, isLoading: A, handleContentId: j, isError: M, contentId: N, publishedId: P, allFormValues: F, showSuccessOverlay: I, dismissSuccessOverlay: L } = yi(T), { handleSubmit: z, setError: B, watch: H, formState: G } = D, { isSubmitting: K } = G, q;
|
|
3576
|
+
n[17] === H ? q = n[18] : (q = H("__captcha"), n[17] = H, n[18] = q);
|
|
3501
3577
|
let J = q, Y;
|
|
3502
3578
|
n[19] !== F || n[20] !== k || n[21] !== y?.fields || n[22] !== i || n[23] !== o || n[24] !== u || n[25] !== O ? (Y = async (e) => {
|
|
3503
3579
|
v((e) => {
|
|
3504
|
-
let t = y?.fields?.map(
|
|
3580
|
+
let t = y?.fields?.map(Va) || [];
|
|
3505
3581
|
return e.filter((e) => !t.includes(e.param));
|
|
3506
3582
|
});
|
|
3507
3583
|
let t = {
|
|
3508
3584
|
...F || {},
|
|
3509
3585
|
...e
|
|
3510
3586
|
};
|
|
3511
|
-
i >=
|
|
3587
|
+
i >= Ia(u, t).length - 1 ? await O(e) : (k(e), o(t));
|
|
3512
3588
|
}, n[19] = F, n[20] = k, n[21] = y?.fields, n[22] = i, n[23] = o, n[24] = u, n[25] = O, n[26] = Y) : Y = n[26];
|
|
3513
3589
|
let X;
|
|
3514
3590
|
n[27] !== z || n[28] !== Y ? (X = z(Y), n[27] = z, n[28] = Y, n[29] = X) : X = n[29];
|
|
3515
|
-
let ee = X, te,
|
|
3516
|
-
if (n[30] !== y || n[31] !== _ || n[32] !==
|
|
3591
|
+
let ee = X, te, ne;
|
|
3592
|
+
if (n[30] !== y || n[31] !== _ || n[32] !== B ? (ne = () => {
|
|
3517
3593
|
_?.length > 0 && y?.fields && _.forEach((e) => {
|
|
3518
|
-
y.fields?.some((t) => t.key === e.param) &&
|
|
3594
|
+
y.fields?.some((t) => t.key === e.param) && B(e?.param, {
|
|
3519
3595
|
type: "server_error",
|
|
3520
3596
|
message: e?.message
|
|
3521
3597
|
});
|
|
3522
3598
|
});
|
|
3523
3599
|
}, te = [
|
|
3524
3600
|
_,
|
|
3525
|
-
|
|
3601
|
+
B,
|
|
3526
3602
|
y
|
|
3527
|
-
], n[30] = y, n[31] = _, n[32] =
|
|
3603
|
+
], n[30] = y, n[31] = _, n[32] = B, n[33] = te, n[34] = ne) : (te = n[33], ne = n[34]), R(ne, te), I) {
|
|
3528
3604
|
let e;
|
|
3529
|
-
return n[35] ===
|
|
3605
|
+
return n[35] === L ? e = n[36] : (e = /* @__PURE__ */ U(ia, { onDismiss: L }), n[35] = L, n[36] = e), e;
|
|
3530
3606
|
}
|
|
3531
|
-
let
|
|
3532
|
-
n[37] !== F || n[38] !== j || n[39] !== M || n[40] !==
|
|
3607
|
+
let ie = K || J === "verifying" && S, Q = N || "", ae = P || "", oe;
|
|
3608
|
+
n[37] !== F || n[38] !== j || n[39] !== M || n[40] !== Q || n[41] !== ae ? (oe = /* @__PURE__ */ U(aa, {
|
|
3533
3609
|
getContentId: j,
|
|
3534
3610
|
isError: M,
|
|
3535
|
-
contentId:
|
|
3611
|
+
contentId: Q,
|
|
3536
3612
|
publishedId: ae,
|
|
3537
3613
|
allFormValues: F
|
|
3538
|
-
}), n[37] = F, n[38] = j, n[39] = M, n[40] =
|
|
3614
|
+
}), n[37] = F, n[38] = j, n[39] = M, n[40] = Q, n[41] = ae, n[42] = oe) : oe = n[42];
|
|
3539
3615
|
let se = A && "_1f3ynb51", ce;
|
|
3540
|
-
n[43] !== r || n[44] !== se ? (ce = Z(
|
|
3616
|
+
n[43] !== r || n[44] !== se ? (ce = Z(Na, r, se), n[43] = r, n[44] = se, n[45] = ce) : ce = n[45];
|
|
3541
3617
|
let le;
|
|
3542
|
-
n[46] === Symbol.for("react.memo_cache_sentinel") ? (le = /* @__PURE__ */
|
|
3618
|
+
n[46] === Symbol.for("react.memo_cache_sentinel") ? (le = /* @__PURE__ */ U(Ki, {}), n[46] = le) : le = n[46];
|
|
3543
3619
|
let ue = y?.label || "Details", de;
|
|
3544
|
-
n[47] === ue ? de = n[48] : (de = /* @__PURE__ */
|
|
3620
|
+
n[47] === ue ? de = n[48] : (de = /* @__PURE__ */ U(Ji, { children: /* @__PURE__ */ U("span", { children: ue }) }), n[47] = ue, n[48] = de);
|
|
3545
3621
|
let fe;
|
|
3546
|
-
n[49] !== y?.fields || n[50] !== h || n[51] !== u || n[52] !== m ? (fe = y?.fields?.map((e) => e && !e.hidden ? /* @__PURE__ */
|
|
3622
|
+
n[49] !== y?.fields || n[50] !== h || n[51] !== u || n[52] !== m ? (fe = y?.fields?.map((e) => e && !e.hidden ? /* @__PURE__ */ U(Jr, {
|
|
3547
3623
|
field: e,
|
|
3548
3624
|
widgets: m,
|
|
3549
3625
|
schema: u,
|
|
3550
3626
|
settings: { enableVerification: h }
|
|
3551
3627
|
}, e?.key) : null), n[49] = y?.fields, n[50] = h, n[51] = u, n[52] = m, n[53] = fe) : fe = n[53];
|
|
3552
3628
|
let pe;
|
|
3553
|
-
n[54] !== d || n[55] !== S ? (pe = !d && S && /* @__PURE__ */
|
|
3629
|
+
n[54] !== d || n[55] !== S ? (pe = !d && S && /* @__PURE__ */ U(Li, {}), n[54] = d, n[55] = S, n[56] = pe) : pe = n[56];
|
|
3554
3630
|
let me;
|
|
3555
|
-
n[57] !== J || n[58] !== i || n[59] !== s || n[60] !== S ? (me = i === 0 ? /* @__PURE__ */
|
|
3631
|
+
n[57] !== J || n[58] !== i || n[59] !== s || n[60] !== S ? (me = i === 0 ? /* @__PURE__ */ U("div", {}) : /* @__PURE__ */ U(t, {
|
|
3556
3632
|
type: "button",
|
|
3557
3633
|
size: "sm",
|
|
3558
3634
|
variant: "secondary",
|
|
@@ -3562,8 +3638,8 @@ var xa = "_1f3ynb50", Sa = "_1f3ynb54", Ca = "_1f3ynb55", wa = (e, t) => e?.sect
|
|
|
3562
3638
|
},
|
|
3563
3639
|
children: "Prev"
|
|
3564
3640
|
}), n[57] = J, n[58] = i, n[59] = s, n[60] = S, n[61] = me) : me = n[61];
|
|
3565
|
-
let he = f ||
|
|
3566
|
-
n[62] !== he || n[63] !== ge || n[64] !== _e ? (ve = /* @__PURE__ */
|
|
3641
|
+
let he = f || ie, ge = p?.styles, _e = ie ? J === "verifying" ? "Verifying..." : "Saving..." : S ? p?.text || "Save" : "Next", ve;
|
|
3642
|
+
n[62] !== he || n[63] !== ge || n[64] !== _e ? (ve = /* @__PURE__ */ U(t, {
|
|
3567
3643
|
type: "submit",
|
|
3568
3644
|
size: "sm",
|
|
3569
3645
|
disabled: he,
|
|
@@ -3571,13 +3647,13 @@ var xa = "_1f3ynb50", Sa = "_1f3ynb54", Ca = "_1f3ynb55", wa = (e, t) => e?.sect
|
|
|
3571
3647
|
children: _e
|
|
3572
3648
|
}), n[62] = he, n[63] = ge, n[64] = _e, n[65] = ve) : ve = n[65];
|
|
3573
3649
|
let ye;
|
|
3574
|
-
n[66] !== me || n[67] !== ve ? (ye = /* @__PURE__ */
|
|
3575
|
-
className:
|
|
3650
|
+
n[66] !== me || n[67] !== ve ? (ye = /* @__PURE__ */ W("div", {
|
|
3651
|
+
className: Pa,
|
|
3576
3652
|
children: [me, ve]
|
|
3577
3653
|
}), n[66] = me, n[67] = ve, n[68] = ye) : ye = n[68];
|
|
3578
3654
|
let be;
|
|
3579
|
-
n[69] !== fe || n[70] !== pe || n[71] !== ye ? (be = /* @__PURE__ */
|
|
3580
|
-
className:
|
|
3655
|
+
n[69] !== fe || n[70] !== pe || n[71] !== ye ? (be = /* @__PURE__ */ W("div", {
|
|
3656
|
+
className: Fa,
|
|
3581
3657
|
children: [
|
|
3582
3658
|
fe,
|
|
3583
3659
|
pe,
|
|
@@ -3585,7 +3661,7 @@ var xa = "_1f3ynb50", Sa = "_1f3ynb54", Ca = "_1f3ynb55", wa = (e, t) => e?.sect
|
|
|
3585
3661
|
]
|
|
3586
3662
|
}), n[69] = fe, n[70] = pe, n[71] = ye, n[72] = be) : be = n[72];
|
|
3587
3663
|
let xe;
|
|
3588
|
-
n[73] !== ee || n[74] !== ce || n[75] !== de || n[76] !== be ? (xe = /* @__PURE__ */
|
|
3664
|
+
n[73] !== ee || n[74] !== ce || n[75] !== de || n[76] !== be ? (xe = /* @__PURE__ */ W("form", {
|
|
3589
3665
|
className: ce,
|
|
3590
3666
|
id: "collection-form",
|
|
3591
3667
|
onSubmit: ee,
|
|
@@ -3596,84 +3672,84 @@ var xa = "_1f3ynb50", Sa = "_1f3ynb54", Ca = "_1f3ynb55", wa = (e, t) => e?.sect
|
|
|
3596
3672
|
]
|
|
3597
3673
|
}), n[73] = ee, n[74] = ce, n[75] = de, n[76] = be, n[77] = xe) : xe = n[77];
|
|
3598
3674
|
let Se;
|
|
3599
|
-
return n[78] !== D || n[79] !== oe || n[80] !== xe ? (Se = /* @__PURE__ */
|
|
3675
|
+
return n[78] !== D || n[79] !== oe || n[80] !== xe ? (Se = /* @__PURE__ */ W(re, {
|
|
3600
3676
|
...D,
|
|
3601
3677
|
children: [oe, xe]
|
|
3602
3678
|
}), n[78] = D, n[79] = oe, n[80] = xe, n[81] = Se) : Se = n[81], Se;
|
|
3603
3679
|
};
|
|
3604
|
-
function
|
|
3680
|
+
function za(e) {
|
|
3605
3681
|
return Math.max(e - 1, 0);
|
|
3606
3682
|
}
|
|
3607
|
-
function
|
|
3683
|
+
function Ba(e) {
|
|
3608
3684
|
return e + 1;
|
|
3609
3685
|
}
|
|
3610
|
-
function
|
|
3686
|
+
function Va(e) {
|
|
3611
3687
|
return e.key;
|
|
3612
3688
|
}
|
|
3613
3689
|
//#endregion
|
|
3614
3690
|
//#region ../../libraries/react-collection/dist/lib/FormBuilder/index.js
|
|
3615
|
-
var
|
|
3691
|
+
var Ha = (e) => {
|
|
3616
3692
|
let t = E(12), n, r, i;
|
|
3617
3693
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({formVariant: n, enableVerification: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
3618
3694
|
let a = i === void 0 ? !0 : i, o;
|
|
3619
|
-
t[4] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */
|
|
3695
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ U(Ti, {}), t[4] = o) : o = t[4];
|
|
3620
3696
|
let s;
|
|
3621
|
-
t[5] === n ? s = t[6] : (s = /* @__PURE__ */
|
|
3697
|
+
t[5] === n ? s = t[6] : (s = /* @__PURE__ */ U(N, {
|
|
3622
3698
|
fallback: o,
|
|
3623
|
-
children:
|
|
3699
|
+
children: U(n === "single-field" ? Ca : n === "steps" ? La : n === "steps-2" ? Aa : fa, {})
|
|
3624
3700
|
}), t[5] = n, t[6] = s);
|
|
3625
3701
|
let c;
|
|
3626
|
-
return t[7] !== a || t[8] !== n || t[9] !== r || t[10] !== s ? (c = /* @__PURE__ */
|
|
3702
|
+
return t[7] !== a || t[8] !== n || t[9] !== r || t[10] !== s ? (c = /* @__PURE__ */ U(fi, {
|
|
3627
3703
|
...r,
|
|
3628
3704
|
enableVerification: a,
|
|
3629
3705
|
variant: n,
|
|
3630
3706
|
children: s
|
|
3631
3707
|
}), t[7] = a, t[8] = n, t[9] = r, t[10] = s, t[11] = c) : c = t[11], c;
|
|
3632
|
-
},
|
|
3708
|
+
}, Ua = (e) => {
|
|
3633
3709
|
let t = E(17), n, r, i, a;
|
|
3634
3710
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4]) : ({collection_id: n, hiddenFields: r, enableVerification: a, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a);
|
|
3635
|
-
let o = a === void 0 ? !0 : a, { collection: s } = A(), [c, l] =
|
|
3711
|
+
let o = a === void 0 ? !0 : a, { collection: s } = A(), [c, l] = V(!0), [u, d] = V(null), f;
|
|
3636
3712
|
t[5] !== s || t[6] !== n || t[7] !== r || t[8] !== i ? (f = () => {
|
|
3637
3713
|
n ? s?.getCollectionByIDExpanded(n, { headers: { "Levo-Workspace": i.workspace_id } }).then((e) => {
|
|
3638
3714
|
let t = e?.content?.data;
|
|
3639
3715
|
if (t) t.sections = t?.sections?.map((e) => (e.fields = e?.fields?.map((e) => (r?.includes(e?.key) && (e.hidden = !0), e)), e)), d(t);
|
|
3640
3716
|
else throw Error(`API response invalid: ${t}`);
|
|
3641
|
-
}).catch(
|
|
3717
|
+
}).catch(Wa).finally(() => {
|
|
3642
3718
|
l(!1);
|
|
3643
3719
|
}) : (console.error("[CollectionFormBuilder] Collection ID or Workspace ID is missing."), l(!1));
|
|
3644
3720
|
}, t[5] = s, t[6] = n, t[7] = r, t[8] = i, t[9] = f) : f = t[9];
|
|
3645
3721
|
let p;
|
|
3646
|
-
t[10] === n ? p = t[11] : (p = [n], t[10] = n, t[11] = p),
|
|
3722
|
+
t[10] === n ? p = t[11] : (p = [n], t[10] = n, t[11] = p), R(f, p);
|
|
3647
3723
|
let m;
|
|
3648
|
-
return t[12] !== o || t[13] !== c || t[14] !== i || t[15] !== u ? (m = c ? /* @__PURE__ */
|
|
3724
|
+
return t[12] !== o || t[13] !== c || t[14] !== i || t[15] !== u ? (m = c ? /* @__PURE__ */ U(Ti, {}) : u ? /* @__PURE__ */ U(Ha, {
|
|
3649
3725
|
schema: u,
|
|
3650
3726
|
enableVerification: o,
|
|
3651
3727
|
...i
|
|
3652
3728
|
}) : null, t[12] = o, t[13] = c, t[14] = i, t[15] = u, t[16] = m) : m = t[16], m;
|
|
3653
3729
|
};
|
|
3654
|
-
function
|
|
3730
|
+
function Wa(e) {
|
|
3655
3731
|
console.error("Error fetching schema", e);
|
|
3656
3732
|
}
|
|
3657
3733
|
//#endregion
|
|
3658
3734
|
//#region ../../libraries/react-collection/dist/lib/CollectionFormRenderer/index.js
|
|
3659
|
-
var
|
|
3660
|
-
let a =
|
|
3735
|
+
var Ga = ({ hiddenFields: e, fetchedSchema: t, isLoading: n, enableVerification: r = !0, ...i }) => {
|
|
3736
|
+
let a = z(() => {
|
|
3661
3737
|
let n = { ...t }, r = (t) => t?.map((t) => ((e?.includes(t.key) || e?.includes(t.id)) && (t.hidden = !0), t.fields = r(t.fields), t));
|
|
3662
3738
|
return n.sections = n?.sections?.map((e) => (e.fields = r(e?.fields), e)), n;
|
|
3663
3739
|
}, [t]);
|
|
3664
|
-
return n ? /* @__PURE__ */
|
|
3740
|
+
return n ? /* @__PURE__ */ U(Ti, {}) : a ? /* @__PURE__ */ U(Ha, {
|
|
3665
3741
|
schema: a,
|
|
3666
3742
|
enableVerification: r,
|
|
3667
3743
|
...i
|
|
3668
3744
|
}) : null;
|
|
3669
|
-
},
|
|
3670
|
-
CollectionForm: () =>
|
|
3671
|
-
CollectionFormBuilder: () =>
|
|
3672
|
-
CollectionFormRenderer: () =>
|
|
3673
|
-
FormBuilder: () =>
|
|
3674
|
-
LevoFormProvider: () =>
|
|
3675
|
-
useLevoForm: () =>
|
|
3676
|
-
useLevoFormContext: () =>
|
|
3745
|
+
}, Ka = /* @__PURE__ */ Pe({
|
|
3746
|
+
CollectionForm: () => li,
|
|
3747
|
+
CollectionFormBuilder: () => Ua,
|
|
3748
|
+
CollectionFormRenderer: () => Ga,
|
|
3749
|
+
FormBuilder: () => Ha,
|
|
3750
|
+
LevoFormProvider: () => fi,
|
|
3751
|
+
useLevoForm: () => yi,
|
|
3752
|
+
useLevoFormContext: () => pi
|
|
3677
3753
|
});
|
|
3678
3754
|
//#endregion
|
|
3679
|
-
export {
|
|
3755
|
+
export { yi as a, li as c, Ha as i, ht as l, Ga as n, fi as o, Ua as r, pi as s, Ka as t };
|