@levo-so/studio 0.1.101 → 0.1.102
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/Beams-DkcjMVZl.js +102 -0
- package/{BillingStep-Brc1Mzo3.js → BillingStep-BTRobf00.js} +1 -1
- package/{Button-XTKnNIl9.js → Button-DTrN8kki.js} +32 -18
- package/{Input-Btdc1Dee.js → CollectionField-7uXvhxYK.js} +57 -76
- package/CollectionInput-lHOvWWav.js +147 -0
- package/{DateTimeWidget-B5lBr0_R.js → DateTimeWidget-BHCP5osb.js} +9 -9
- package/Dots-BrEPvoj3.js +100 -0
- package/{EntryCard-DTcx6wfA.js → EntryCard-CqZlbw1Z.js} +6 -6
- package/Grid-B4XWU9eL.js +99 -0
- package/{LoginCard-CnHmCKUF.js → LoginCard-DWLnYJJU.js} +3 -3
- package/{LoginForm-Ck-xFaDg.js → LoginForm-CEUbBeE3.js} +23 -22
- package/{LoginModal-BdYM8INu.js → LoginModal-AWNLO49X.js} +3 -3
- package/{MessageCard-ChDBqLVG.js → MessageCard-C5ULcfuw.js} +2 -2
- package/{MessageFooter-AzAtJWMo.js → MessageFooter-CATwNJJU.js} +1 -1
- package/{ModalManager-SggxCIno.js → ModalManager-DQXhkmyC.js} +1 -1
- package/{PendingApprovalCard-C6ORDqrY.js → PendingApprovalCard-BowwZMBu.js} +3 -3
- package/{PhoneWidget-BRIAve47.js → PhoneWidget-C6uZmrk8.js} +3 -3
- package/{Popover-BdKCElnb.js → Popover-Du4iigVw.js} +1 -1
- package/RichTextWidget-iYdVRBGB.js +112 -0
- package/Toolbar-BHi_B-nE.js +737 -0
- package/{Tooltip-BOq5vSOW.js → Tooltip-K_gFzjOa.js} +1 -1
- package/{VerifyButton-Bl2QqMpB.js → VerifyButton-D21AOIX3.js} +2 -2
- package/authentication-fXmNYss1.js +36 -0
- package/{bookingCard-D3ZSjq-P.js → bookingCard--NlgtcJs.js} +3 -3
- package/collection.d.ts +83 -0
- package/collection.js +9 -8
- package/{dist-DuTd566a.js → dist-x5VFEnQl.js} +1132 -1059
- package/index.d.ts +43 -7
- package/index.js +1517 -1441
- package/inlineRteTheme-Cn_Vqgsm.js +23 -0
- package/{nodeAlignment-BZbdafVA.js → nodeAlignment-DoVbjk29.js} +39 -60
- package/package.json +2 -2
- package/studio.css +1 -1
- package/useLogin-D2VCOHYI.js +127 -0
- package/{utils-kDaDLLGt.js → utils-Bh9uGjo1.js} +1 -1
- package/{widgets-CWDiqXm9.js → widgets-CG5Z_dk7.js} +48 -48
- package/Beams-B0O3uyYF.js +0 -118
- package/CollectionInput-cmJ0RXzG.js +0 -132
- package/Dots-DjezbpLp.js +0 -137
- package/Grid-C9aUfXM-.js +0 -145
- package/RichTextWidget-CjEoGecM.js +0 -1136
- /package/{Gradient-B1K9Yi04.js → Gradient-B4Er9hym.js} +0 -0
- /package/{StripePaymentModal-BHIBBvRj.js → StripePaymentModal-DC-ySB_o.js} +0 -0
- /package/{Waves-BkaAfGqA.js → Waves-kW-EBDdJ.js} +0 -0
- /package/{card-BQr9258p.js → card-BwNr7kQS.js} +0 -0
- /package/{dialog-Dw6n_36P.js → dialog-CCWrvmHd.js} +0 -0
|
@@ -1,57 +1,49 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as m } from "./
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { n as
|
|
8
|
-
import { n as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
2
|
+
import { a as e } from "./Toolbar-BHi_B-nE.js";
|
|
3
|
+
import { n as t, r as n, t as r } from "./getFieldValidations-DZnDgNI0.js";
|
|
4
|
+
import { _ as i, d as a, f as o, g as s, h as c, n as l, o as u, p as d, r as f, t as p, v as m } from "./widgets-CG5Z_dk7.js";
|
|
5
|
+
import { t as h } from "./theme.cssm-2YTdd8Yh.js";
|
|
6
|
+
import { f as g, p as _, t as v, u as y } from "./CollectionField-7uXvhxYK.js";
|
|
7
|
+
import { a as b, i as x, n as S, o as C, r as w, s as T, t as E } from "./VerifyButton-D21AOIX3.js";
|
|
8
|
+
import { n as D, r as O, t as k } from "./Tooltip-K_gFzjOa.js";
|
|
9
|
+
import { i as A, n as j, r as M, t as N } from "./CollectionInput-lHOvWWav.js";
|
|
10
|
+
import * as P from "react";
|
|
11
|
+
import F, { Suspense as I, createContext as L, lazy as R, useCallback as z, useContext as B, useEffect as V, useMemo as H, useRef as U, useState as W } from "react";
|
|
12
|
+
import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
13
|
+
import { FieldInterfaces as J, LevoError as Y, MediaKindList as X, getLevoError as ee } from "@levo-so/core";
|
|
14
|
+
import { errorHandler as te, errorToast as ne, mediaMimetypeByKind as re, successToast as ie, useLevo as ae } from "@levo-so/react";
|
|
14
15
|
import { c as Z } from "react/compiler-runtime";
|
|
15
16
|
import Q from "clsx";
|
|
16
|
-
import { createRuntimeFn as
|
|
17
|
-
import { useDebouncedCallback as
|
|
18
|
-
import
|
|
19
|
-
import { FormProvider as
|
|
20
|
-
import { Tabs as
|
|
21
|
-
import { IconArrowLeft as
|
|
22
|
-
import { Checkbox as
|
|
23
|
-
import { NumericFormat as
|
|
24
|
-
import
|
|
25
|
-
import { Radio as
|
|
26
|
-
import { RadioGroup as
|
|
27
|
-
import { Switch as
|
|
28
|
-
import { useDropzone as
|
|
29
|
-
|
|
30
|
-
var Ie = Object.defineProperty, Le = (e, t) => {
|
|
31
|
-
let n = {};
|
|
32
|
-
for (var r in e) Ie(n, r, {
|
|
33
|
-
get: e[r],
|
|
34
|
-
enumerable: !0
|
|
35
|
-
});
|
|
36
|
-
return t || Ie(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
37
|
-
};
|
|
38
|
-
r(p.radius);
|
|
17
|
+
import { createRuntimeFn as oe } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
18
|
+
import { useDebouncedCallback as se } from "use-debounce";
|
|
19
|
+
import ce from "react-select";
|
|
20
|
+
import { FormProvider as le, get as ue, useController as $, useFieldArray as de, useForm as fe, useFormContext as pe, useWatch as me } from "react-hook-form";
|
|
21
|
+
import { Tabs as he } from "@base-ui/react/tabs";
|
|
22
|
+
import { IconArrowLeft as ge, IconCheck as _e, IconChevronLeft as ve, IconChevronRight as ye, IconChevronsLeft as be, IconChevronsRight as xe, IconFile as Se, IconHash as Ce, IconMail as we, IconPencil as Te, IconPlus as Ee, IconTrash as De, IconUpload as Oe, IconX as ke } from "@tabler/icons-react";
|
|
23
|
+
import { Checkbox as Ae } from "@base-ui/react/checkbox";
|
|
24
|
+
import { NumericFormat as je } from "react-number-format";
|
|
25
|
+
import Me from "react-select/async";
|
|
26
|
+
import { Radio as Ne } from "@base-ui/react/radio";
|
|
27
|
+
import { RadioGroup as Pe } from "@base-ui/react/radio-group";
|
|
28
|
+
import { Switch as Fe } from "@base-ui/react/switch";
|
|
29
|
+
import { useDropzone as Ie } from "react-dropzone";
|
|
30
|
+
i(m.radius);
|
|
39
31
|
//#endregion
|
|
40
32
|
//#region ../../libraries/levocn/dist/utils/deep-merge.js
|
|
41
|
-
function
|
|
33
|
+
function Le(e) {
|
|
42
34
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
43
35
|
}
|
|
44
|
-
function
|
|
45
|
-
if (!
|
|
36
|
+
function Re(e, t) {
|
|
37
|
+
if (!Le(e) || !Le(t)) return t;
|
|
46
38
|
let n = { ...e };
|
|
47
39
|
return Object.keys(t).forEach((r) => {
|
|
48
40
|
let i = r, a = e[i], o = t[i];
|
|
49
|
-
|
|
41
|
+
Le(a) && Le(o) ? n[i] = Re(a, o) : n[i] = o;
|
|
50
42
|
}), n;
|
|
51
43
|
}
|
|
52
44
|
//#endregion
|
|
53
45
|
//#region ../../libraries/levocn/dist/theme/utils/defineTheme.js
|
|
54
|
-
var
|
|
46
|
+
var ze = ((e) => (t) => t ? Re(e, t) : e)({
|
|
55
47
|
form: {
|
|
56
48
|
maxWidth: "100%",
|
|
57
49
|
gap: "1.5rem",
|
|
@@ -65,7 +57,7 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
65
57
|
borderRadius: "6px"
|
|
66
58
|
},
|
|
67
59
|
checkbox: { labelFontSize: "0.875rem" }
|
|
68
|
-
}),
|
|
60
|
+
}), Be = "_1g8bxz40", Ve = "_1kzhxrs0", He = "_1kzhxrs1", Ue = "_1kzhxrs2", We = "_1kzhxrs3", Ge = "_1kzhxrs4", Ke = "_1kzhxrs5", qe = "_1kzhxrs6", Je = "_1kzhxrs7", Ye = "_1kzhxrs8", Xe = "_1kzhxrs9", Ze = "_1kzhxrsa", Qe = "_1kzhxrsb", $e = "ktjhuv0", et = oe({
|
|
69
61
|
defaultClassName: "ktjhuv1",
|
|
70
62
|
variantClassNames: { variant: {
|
|
71
63
|
default: "ktjhuv2",
|
|
@@ -73,105 +65,105 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
73
65
|
} },
|
|
74
66
|
defaultVariants: { variant: "default" },
|
|
75
67
|
compoundVariants: []
|
|
76
|
-
}),
|
|
68
|
+
}), tt = "ktjhuv4", nt = "ktjhuv5", rt = "ktjhuv6", it = (e) => {
|
|
77
69
|
let t = Z(10), n, r, i;
|
|
78
70
|
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);
|
|
79
71
|
let a = i === void 0 ? "horizontal" : i, o;
|
|
80
|
-
t[4] === n ? o = t[5] : (o = Q(
|
|
72
|
+
t[4] === n ? o = t[5] : (o = Q($e, n), t[4] = n, t[5] = o);
|
|
81
73
|
let s;
|
|
82
|
-
return t[6] !== a || t[7] !== r || t[8] !== o ? (s = /* @__PURE__ */
|
|
74
|
+
return t[6] !== a || t[7] !== r || t[8] !== o ? (s = /* @__PURE__ */ K(he.Root, {
|
|
83
75
|
"data-slot": "tabs",
|
|
84
76
|
"data-orientation": a,
|
|
85
77
|
className: o,
|
|
86
78
|
...r
|
|
87
79
|
}), t[6] = a, t[7] = r, t[8] = o, t[9] = s) : s = t[9], s;
|
|
88
|
-
},
|
|
80
|
+
}, at = (e) => {
|
|
89
81
|
let t = Z(11), n, r, i;
|
|
90
82
|
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);
|
|
91
83
|
let a = i === void 0 ? "default" : i, o;
|
|
92
|
-
t[4] !== n || t[5] !== a ? (o = Q(
|
|
84
|
+
t[4] !== n || t[5] !== a ? (o = Q(et({ variant: a }), n), t[4] = n, t[5] = a, t[6] = o) : o = t[6];
|
|
93
85
|
let s;
|
|
94
|
-
return t[7] !== r || t[8] !== o || t[9] !== a ? (s = /* @__PURE__ */
|
|
86
|
+
return t[7] !== r || t[8] !== o || t[9] !== a ? (s = /* @__PURE__ */ K(he.List, {
|
|
95
87
|
"data-slot": "tabs-list",
|
|
96
88
|
"data-variant": a,
|
|
97
89
|
className: o,
|
|
98
90
|
...r
|
|
99
91
|
}), t[7] = r, t[8] = o, t[9] = a, t[10] = s) : s = t[10], s;
|
|
100
|
-
},
|
|
92
|
+
}, ot = (e) => {
|
|
101
93
|
let t = Z(8), n, r;
|
|
102
94
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
103
95
|
let i;
|
|
104
|
-
t[3] === n ? i = t[4] : (i = Q(
|
|
96
|
+
t[3] === n ? i = t[4] : (i = Q(tt, nt, n), t[3] = n, t[4] = i);
|
|
105
97
|
let a;
|
|
106
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */
|
|
98
|
+
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ K(he.Tab, {
|
|
107
99
|
"data-slot": "tabs-trigger",
|
|
108
100
|
className: i,
|
|
109
101
|
...r
|
|
110
102
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
111
|
-
},
|
|
103
|
+
}, st = (e) => {
|
|
112
104
|
let t = Z(8), n, r;
|
|
113
105
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
114
106
|
let i;
|
|
115
|
-
t[3] === n ? i = t[4] : (i = Q(
|
|
107
|
+
t[3] === n ? i = t[4] : (i = Q(rt, n), t[3] = n, t[4] = i);
|
|
116
108
|
let a;
|
|
117
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */
|
|
109
|
+
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ K(he.Panel, {
|
|
118
110
|
"data-slot": "tabs-content",
|
|
119
111
|
className: i,
|
|
120
112
|
...r
|
|
121
113
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
122
|
-
},
|
|
123
|
-
let t = Z(36),
|
|
124
|
-
t[0] === e ? (
|
|
125
|
-
let { key: o, label: s, field_interface: c, fields:
|
|
126
|
-
t[4] ===
|
|
127
|
-
let
|
|
128
|
-
t[6] ===
|
|
114
|
+
}, ct = (e) => {
|
|
115
|
+
let t = Z(36), n, i, a;
|
|
116
|
+
t[0] === e ? (n = t[1], i = t[2], a = t[3]) : ({field: n, schema: a, ...i} = e, t[0] = e, t[1] = n, t[2] = i, t[3] = a);
|
|
117
|
+
let { key: o, label: s, field_interface: c, fields: l } = n, d = o === void 0 ? "" : o, f = s === void 0 ? "" : s, p = c === void 0 ? "" : c, m;
|
|
118
|
+
t[4] === l ? m = t[5] : (m = l === void 0 ? [] : l, t[4] = l, t[5] = m);
|
|
119
|
+
let h = m, [_, v] = W("0"), { formState: b } = pe(), x;
|
|
120
|
+
t[6] === n ? x = t[7] : (x = r(n), t[6] = n, t[7] = x);
|
|
129
121
|
let S;
|
|
130
122
|
t[8] !== d || t[9] !== x ? (S = {
|
|
131
123
|
name: d,
|
|
132
124
|
rules: x
|
|
133
125
|
}, t[8] = d, t[9] = x, t[10] = S) : S = t[10];
|
|
134
|
-
let C =
|
|
126
|
+
let C = de(S), w, T;
|
|
135
127
|
t[11] === C ? (w = t[12], T = t[13]) : ({fields: T, ...w} = C, t[11] = C, t[12] = w, t[13] = T);
|
|
136
128
|
let E;
|
|
137
|
-
t[14] !== b.errors || t[15] !== d ? (E =
|
|
129
|
+
t[14] !== b.errors || t[15] !== d ? (E = ue(b.errors, d)?.root?.message, t[14] = b.errors, t[15] = d, t[16] = E) : E = t[16];
|
|
138
130
|
let D = E;
|
|
139
131
|
if (!p || !d) return null;
|
|
140
|
-
let O =
|
|
141
|
-
t[17] !== f || t[18] !== O ? (k = /* @__PURE__ */
|
|
132
|
+
let O = n?.required, k;
|
|
133
|
+
t[17] !== f || t[18] !== O ? (k = /* @__PURE__ */ K(g, {
|
|
142
134
|
label: f,
|
|
143
135
|
isRequired: O
|
|
144
136
|
}), t[17] = f, t[18] = O, t[19] = k) : k = t[19];
|
|
145
137
|
let A;
|
|
146
|
-
t[20] !== w || t[21] !==
|
|
147
|
-
value:
|
|
148
|
-
onValueChange:
|
|
149
|
-
className:
|
|
150
|
-
children: [/* @__PURE__ */
|
|
151
|
-
className:
|
|
152
|
-
children: [T.length ? /* @__PURE__ */
|
|
153
|
-
className:
|
|
154
|
-
children: T?.map((e, t) => /* @__PURE__ */
|
|
155
|
-
id: `${
|
|
138
|
+
t[20] !== w || t[21] !== n.id || t[22] !== n.key || t[23] !== T || t[24] !== h || t[25] !== d || t[26] !== i || t[27] !== a || t[28] !== _ ? (A = T && Array.isArray(T) ? /* @__PURE__ */ q(it, {
|
|
139
|
+
value: _,
|
|
140
|
+
onValueChange: v,
|
|
141
|
+
className: He,
|
|
142
|
+
children: [/* @__PURE__ */ q("div", {
|
|
143
|
+
className: Ue,
|
|
144
|
+
children: [T.length ? /* @__PURE__ */ K(at, {
|
|
145
|
+
className: We,
|
|
146
|
+
children: T?.map((e, t) => /* @__PURE__ */ K(ot, {
|
|
147
|
+
id: `${n?.key}-${t}`,
|
|
156
148
|
value: t.toString(),
|
|
157
|
-
className:
|
|
149
|
+
className: Ge,
|
|
158
150
|
children: t + 1
|
|
159
|
-
}, `array-widget-tab-${
|
|
160
|
-
}) : null, /* @__PURE__ */
|
|
151
|
+
}, `array-widget-tab-${n?.id}-${t}`))
|
|
152
|
+
}) : null, /* @__PURE__ */ q(y, {
|
|
161
153
|
variant: "ghost",
|
|
162
154
|
size: "xs",
|
|
163
|
-
className:
|
|
155
|
+
className: Ke,
|
|
164
156
|
onClick: () => {
|
|
165
|
-
w.append(
|
|
157
|
+
w.append(u(h)), v((T?.length ?? 0).toString());
|
|
166
158
|
},
|
|
167
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ K(Ee, { size: 14 }), "Add"]
|
|
168
160
|
})]
|
|
169
|
-
}), T?.map((e, t) => /* @__PURE__ */
|
|
170
|
-
className:
|
|
161
|
+
}), T?.map((e, t) => /* @__PURE__ */ q(st, {
|
|
162
|
+
className: qe,
|
|
171
163
|
value: t.toString(),
|
|
172
|
-
children: [/* @__PURE__ */
|
|
173
|
-
className:
|
|
174
|
-
children:
|
|
164
|
+
children: [/* @__PURE__ */ K("div", {
|
|
165
|
+
className: Je,
|
|
166
|
+
children: h.map((e) => /* @__PURE__ */ K(fr, {
|
|
175
167
|
field: {
|
|
176
168
|
...e,
|
|
177
169
|
key: `${d}.${t}.${e?.key}`
|
|
@@ -179,103 +171,103 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
179
171
|
schema: a ?? null,
|
|
180
172
|
...i
|
|
181
173
|
}, `common-fields-${e?.id}`))
|
|
182
|
-
}), /* @__PURE__ */
|
|
183
|
-
className:
|
|
174
|
+
}), /* @__PURE__ */ q("div", {
|
|
175
|
+
className: Ye,
|
|
184
176
|
children: [
|
|
185
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ K(y, {
|
|
186
178
|
onClick: () => {
|
|
187
|
-
|
|
179
|
+
v((t - 1).toString()), w.move(t, t - 1);
|
|
188
180
|
},
|
|
189
181
|
disabled: t === 0,
|
|
190
182
|
size: "icon",
|
|
191
|
-
className:
|
|
192
|
-
children: /* @__PURE__ */
|
|
183
|
+
className: Xe,
|
|
184
|
+
children: /* @__PURE__ */ K(ve, { size: 20 })
|
|
193
185
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
className:
|
|
186
|
+
/* @__PURE__ */ K(y, {
|
|
187
|
+
className: Ze,
|
|
196
188
|
variant: "link",
|
|
197
189
|
onClick: () => {
|
|
198
|
-
|
|
190
|
+
v(Math.max(0, t - 1).toString()), w.remove(t);
|
|
199
191
|
},
|
|
200
192
|
children: "Remove Item"
|
|
201
193
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
className:
|
|
194
|
+
/* @__PURE__ */ K(y, {
|
|
195
|
+
className: Xe,
|
|
204
196
|
onClick: () => {
|
|
205
|
-
|
|
197
|
+
v((t + 1).toString()), w.move(t, t + 1);
|
|
206
198
|
},
|
|
207
199
|
disabled: t >= T.length - 1,
|
|
208
200
|
size: "icon",
|
|
209
|
-
children: /* @__PURE__ */
|
|
201
|
+
children: /* @__PURE__ */ K(ye, { size: 20 })
|
|
210
202
|
})
|
|
211
203
|
]
|
|
212
204
|
})]
|
|
213
|
-
}, `array-widget-tab-content-${
|
|
214
|
-
}) : /* @__PURE__ */
|
|
205
|
+
}, `array-widget-tab-content-${n?.id}-${t}`))]
|
|
206
|
+
}) : /* @__PURE__ */ q(y, {
|
|
215
207
|
variant: "ghost",
|
|
216
208
|
size: "xs",
|
|
217
209
|
onClick: () => {
|
|
218
|
-
w.append(
|
|
210
|
+
w.append(u(h)), v("0");
|
|
219
211
|
},
|
|
220
|
-
children: [/* @__PURE__ */
|
|
221
|
-
}), t[20] = w, t[21] =
|
|
212
|
+
children: [/* @__PURE__ */ K(Ee, { size: 14 }), "Add"]
|
|
213
|
+
}), t[20] = w, t[21] = n.id, t[22] = n.key, t[23] = T, t[24] = h, t[25] = d, t[26] = i, t[27] = a, t[28] = _, t[29] = A) : A = t[29];
|
|
222
214
|
let j;
|
|
223
|
-
t[30] === D ? j = t[31] : (j = !!D && /* @__PURE__ */
|
|
215
|
+
t[30] === D ? j = t[31] : (j = !!D && /* @__PURE__ */ K("div", {
|
|
224
216
|
className: "_1kzhxrsc",
|
|
225
|
-
children: /* @__PURE__ */
|
|
217
|
+
children: /* @__PURE__ */ K("p", {
|
|
226
218
|
className: "_1ompjs13",
|
|
227
219
|
children: D
|
|
228
220
|
})
|
|
229
221
|
}), t[30] = D, t[31] = j);
|
|
230
222
|
let M;
|
|
231
|
-
return t[32] !== k || t[33] !== A || t[34] !== j ? (M = /* @__PURE__ */
|
|
232
|
-
className:
|
|
223
|
+
return t[32] !== k || t[33] !== A || t[34] !== j ? (M = /* @__PURE__ */ q("div", {
|
|
224
|
+
className: Ve,
|
|
233
225
|
children: [
|
|
234
226
|
k,
|
|
235
227
|
A,
|
|
236
228
|
j
|
|
237
229
|
]
|
|
238
230
|
}), t[32] = k, t[33] = A, t[34] = j, t[35] = M) : M = t[35], M;
|
|
239
|
-
},
|
|
240
|
-
container: () =>
|
|
241
|
-
control: ({ isFocused: e, isMulti: t, isDisabled: n }) => Q(
|
|
231
|
+
}, lt = "_8vx4f60 _1oiks600 _1ri7vba0", ut = "_8vx4f61", dt = "_8vx4f62", ft = "_8vx4f63", pt = "_8vx4f66", mt = "_8vx4f67", ht = "_8vx4f68", gt = "_8vx4f69", _t = "_8vx4f6a", vt = "_8vx4f6b", yt = "_8vx4f6c", bt = "_8vx4f6d _6o7s4x0", xt = "_8vx4f6e", St = "_8vx4f6f", Ct = "_8vx4f6g", wt = "_8vx4f6h", Tt = "_8vx4f6k", Et = {
|
|
232
|
+
container: () => ut,
|
|
233
|
+
control: ({ isFocused: e, isMulti: t, isDisabled: n }) => Q(lt, t ? ft : dt, e && "_8vx4f64", n && "_8vx4f65"),
|
|
242
234
|
input: () => "",
|
|
243
|
-
valueContainer: () =>
|
|
244
|
-
loadingMessage: () =>
|
|
235
|
+
valueContainer: () => pt,
|
|
236
|
+
loadingMessage: () => ht,
|
|
245
237
|
singleValue: () => "",
|
|
246
|
-
multiValue: () =>
|
|
247
|
-
multiValueRemove: () =>
|
|
248
|
-
indicatorsContainer: () =>
|
|
249
|
-
clearIndicator: () =>
|
|
238
|
+
multiValue: () => gt,
|
|
239
|
+
multiValueRemove: () => _t,
|
|
240
|
+
indicatorsContainer: () => mt,
|
|
241
|
+
clearIndicator: () => vt,
|
|
250
242
|
indicatorSeparator: () => "",
|
|
251
|
-
dropdownIndicator: () =>
|
|
252
|
-
menu: () =>
|
|
253
|
-
groupHeading: () =>
|
|
254
|
-
placeholder: () =>
|
|
255
|
-
option: ({ isSelected: e, isFocused: t }) => Q(
|
|
256
|
-
noOptionsMessage: () =>
|
|
257
|
-
menuPortal: () =>
|
|
258
|
-
},
|
|
259
|
-
let { portalRef: n } =
|
|
260
|
-
return /* @__PURE__ */
|
|
243
|
+
dropdownIndicator: () => yt,
|
|
244
|
+
menu: () => bt,
|
|
245
|
+
groupHeading: () => St,
|
|
246
|
+
placeholder: () => Ct,
|
|
247
|
+
option: ({ isSelected: e, isFocused: t }) => Q(wt, t && "_8vx4f6i", e && "_8vx4f6j"),
|
|
248
|
+
noOptionsMessage: () => Tt,
|
|
249
|
+
menuPortal: () => xt
|
|
250
|
+
}, Dt = F.lazy(() => import("react-select-async-paginate").then((e) => ({ default: e.AsyncPaginate }))), Ot = (e) => {
|
|
251
|
+
let { portalRef: n } = t();
|
|
252
|
+
return /* @__PURE__ */ K(Dt, {
|
|
261
253
|
isClearable: !0,
|
|
262
254
|
menuPlacement: "auto",
|
|
263
255
|
isSearchable: !0,
|
|
264
256
|
unstyled: !0,
|
|
265
|
-
classNames:
|
|
257
|
+
classNames: Et,
|
|
266
258
|
styles: { menuPortal: (e) => ({
|
|
267
259
|
...e,
|
|
268
260
|
zIndex: 99999999
|
|
269
261
|
}) },
|
|
270
262
|
menuPosition: "fixed",
|
|
271
263
|
menuPortalTarget: n?.current,
|
|
272
|
-
loadingMessage: () => /* @__PURE__ */
|
|
273
|
-
...
|
|
264
|
+
loadingMessage: () => /* @__PURE__ */ K(T, { size: 16 }),
|
|
265
|
+
...e
|
|
274
266
|
});
|
|
275
|
-
},
|
|
276
|
-
let { collection: t } =
|
|
267
|
+
}, kt = (e) => e ? e.replace(/[-_]/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()) : "", At = "_1k5k6yj0", jt = ({ field: e }) => {
|
|
268
|
+
let { collection: t } = ae(), [n, i] = W(!1), [a, o] = W(!1), [s, c] = W([]), [l, u] = W(1), [d, f] = W(5), [p, m] = W(0), [h, g] = W(0), { key: _ = "", label: b = "", helper_text: x = "", readonly: S = !1 } = e, C = _, w = e?.options?.collection_key || "", E = e?.options?.label_field_key || "", { field: { value: A, onChange: j, ref: M }, fieldState: N } = $({
|
|
277
269
|
name: C,
|
|
278
|
-
rules:
|
|
270
|
+
rules: r(e)
|
|
279
271
|
}), P = !!e?.required, F = N?.error?.message, I = async () => {
|
|
280
272
|
i(!0);
|
|
281
273
|
try {
|
|
@@ -285,22 +277,22 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
285
277
|
limit: d,
|
|
286
278
|
where: { _id: { in: A } }
|
|
287
279
|
}), n = e?.content?.data ?? [], r = e?.content?.meta?.pages ?? 0;
|
|
288
|
-
m(e?.content?.meta?.total ?? 0),
|
|
280
|
+
m(e?.content?.meta?.total ?? 0), g(r), l > r && u(r), c(n);
|
|
289
281
|
} catch (e) {
|
|
290
|
-
|
|
282
|
+
te(e);
|
|
291
283
|
} finally {
|
|
292
284
|
i(!1);
|
|
293
285
|
}
|
|
294
286
|
};
|
|
295
|
-
return
|
|
287
|
+
return V(() => {
|
|
296
288
|
A?.length > 0 && I();
|
|
297
289
|
}, [
|
|
298
290
|
A,
|
|
299
291
|
l,
|
|
300
292
|
d
|
|
301
|
-
]), /* @__PURE__ */
|
|
302
|
-
className:
|
|
303
|
-
children: [/* @__PURE__ */
|
|
293
|
+
]), /* @__PURE__ */ q("div", {
|
|
294
|
+
className: At,
|
|
295
|
+
children: [/* @__PURE__ */ K(v, {
|
|
304
296
|
ref: M,
|
|
305
297
|
error: F,
|
|
306
298
|
helperText: x,
|
|
@@ -308,7 +300,7 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
308
300
|
label: b,
|
|
309
301
|
htmlFor: C,
|
|
310
302
|
isRequired: P,
|
|
311
|
-
children: /* @__PURE__ */
|
|
303
|
+
children: /* @__PURE__ */ K(Ot, {
|
|
312
304
|
id: C,
|
|
313
305
|
value: [],
|
|
314
306
|
onChange: (e) => {
|
|
@@ -331,7 +323,7 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
331
323
|
slug: e?.slug,
|
|
332
324
|
[E]: e?.[E]
|
|
333
325
|
},
|
|
334
|
-
label: e?.[E] ? e?.[E] :
|
|
326
|
+
label: e?.[E] ? e?.[E] : kt(e?.slug ?? "")
|
|
335
327
|
}));
|
|
336
328
|
return {
|
|
337
329
|
options: Array.isArray(a) ? a : [],
|
|
@@ -356,44 +348,44 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
356
348
|
cacheUniqs: [w],
|
|
357
349
|
minMenuHeight: 250
|
|
358
350
|
})
|
|
359
|
-
}), Array.isArray(A) && A?.length > 0 && /* @__PURE__ */
|
|
351
|
+
}), Array.isArray(A) && A?.length > 0 && /* @__PURE__ */ q("div", {
|
|
360
352
|
className: "_1k5k6yj1",
|
|
361
353
|
children: [
|
|
362
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ q("h4", {
|
|
363
355
|
className: "_1k5k6yj2",
|
|
364
|
-
children: [/* @__PURE__ */
|
|
356
|
+
children: [/* @__PURE__ */ K("span", { children: "Selected" }), n && s?.length > 0 && /* @__PURE__ */ K(T, { size: 16 })]
|
|
365
357
|
}),
|
|
366
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ K("div", {
|
|
367
359
|
className: "_1k5k6yj4",
|
|
368
|
-
children: s.map((e) => /* @__PURE__ */
|
|
360
|
+
children: s.map((e) => /* @__PURE__ */ q("div", {
|
|
369
361
|
className: "_1k5k6yj5",
|
|
370
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ K("div", {
|
|
371
363
|
className: "_1k5k6yj6",
|
|
372
|
-
children: e?.[E] ||
|
|
373
|
-
}), /* @__PURE__ */
|
|
374
|
-
disabled:
|
|
364
|
+
children: e?.[E] || kt(e?.slug ?? "")
|
|
365
|
+
}), /* @__PURE__ */ K(y, {
|
|
366
|
+
disabled: n,
|
|
375
367
|
size: "icon-sm",
|
|
376
368
|
variant: "ghost",
|
|
377
369
|
onClick: () => {
|
|
378
370
|
j(A?.filter((t) => t !== e?._id));
|
|
379
371
|
},
|
|
380
|
-
children: /* @__PURE__ */
|
|
372
|
+
children: /* @__PURE__ */ K(ke, { size: 16 })
|
|
381
373
|
})]
|
|
382
374
|
}, e?._id))
|
|
383
375
|
}),
|
|
384
|
-
|
|
376
|
+
n && s?.length === 0 && /* @__PURE__ */ K("div", {
|
|
385
377
|
className: "_1k5k6yj3",
|
|
386
|
-
children: /* @__PURE__ */
|
|
378
|
+
children: /* @__PURE__ */ K(T, { size: 24 })
|
|
387
379
|
}),
|
|
388
|
-
A?.length > 5 && /* @__PURE__ */
|
|
380
|
+
A?.length > 5 && /* @__PURE__ */ q("div", {
|
|
389
381
|
className: "_1k5k6yj7",
|
|
390
382
|
children: [
|
|
391
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ q("div", {
|
|
392
384
|
className: "_1k5k6yj8",
|
|
393
385
|
children: [
|
|
394
386
|
"Showing",
|
|
395
387
|
" ",
|
|
396
|
-
p ? /* @__PURE__ */
|
|
388
|
+
p ? /* @__PURE__ */ q(G, { children: [
|
|
397
389
|
d * (l - 1) + 1,
|
|
398
390
|
"-",
|
|
399
391
|
Math.min(d * l, p),
|
|
@@ -404,64 +396,64 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
404
396
|
" items"
|
|
405
397
|
]
|
|
406
398
|
}),
|
|
407
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ q("select", {
|
|
408
400
|
className: "_1k5k6yjb",
|
|
409
401
|
value: d,
|
|
410
402
|
onChange: (e) => {
|
|
411
403
|
u(1), f(Number(e.target.value));
|
|
412
404
|
},
|
|
413
405
|
children: [
|
|
414
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ K("option", {
|
|
415
407
|
value: 5,
|
|
416
408
|
children: "5"
|
|
417
409
|
}),
|
|
418
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ K("option", {
|
|
419
411
|
value: 10,
|
|
420
412
|
children: "10"
|
|
421
413
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ K("option", {
|
|
423
415
|
value: 25,
|
|
424
416
|
children: "25"
|
|
425
417
|
}),
|
|
426
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ K("option", {
|
|
427
419
|
value: 50,
|
|
428
420
|
children: "50"
|
|
429
421
|
})
|
|
430
422
|
]
|
|
431
423
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ K("div", {
|
|
433
425
|
className: "_1k5k6yj9",
|
|
434
|
-
children: /* @__PURE__ */
|
|
426
|
+
children: /* @__PURE__ */ q("div", {
|
|
435
427
|
className: "_1k5k6yja",
|
|
436
428
|
children: [
|
|
437
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ q(k, { children: [/* @__PURE__ */ K(D, {
|
|
438
430
|
variant: "ghost",
|
|
439
431
|
size: "icon-xs",
|
|
440
432
|
onClick: () => u(1),
|
|
441
433
|
disabled: l === 1,
|
|
442
|
-
children: /* @__PURE__ */
|
|
443
|
-
}), /* @__PURE__ */
|
|
444
|
-
/* @__PURE__ */
|
|
434
|
+
children: /* @__PURE__ */ K(be, { size: 14 })
|
|
435
|
+
}), /* @__PURE__ */ K(O, { children: "First page" })] }),
|
|
436
|
+
/* @__PURE__ */ q(k, { children: [/* @__PURE__ */ K(D, {
|
|
445
437
|
variant: "ghost",
|
|
446
438
|
size: "icon-xs",
|
|
447
439
|
disabled: l === 1,
|
|
448
440
|
onClick: () => u(l - 1),
|
|
449
|
-
children: /* @__PURE__ */
|
|
450
|
-
}), /* @__PURE__ */
|
|
451
|
-
/* @__PURE__ */
|
|
441
|
+
children: /* @__PURE__ */ K(ve, { size: 14 })
|
|
442
|
+
}), /* @__PURE__ */ K(O, { children: "Previous page" })] }),
|
|
443
|
+
/* @__PURE__ */ q(k, { children: [/* @__PURE__ */ K(D, {
|
|
452
444
|
variant: "ghost",
|
|
453
445
|
size: "icon-xs",
|
|
454
446
|
onClick: () => u(l + 1),
|
|
455
|
-
disabled: l ===
|
|
456
|
-
children: /* @__PURE__ */
|
|
457
|
-
}), /* @__PURE__ */
|
|
458
|
-
/* @__PURE__ */
|
|
447
|
+
disabled: l === h,
|
|
448
|
+
children: /* @__PURE__ */ K(ye, { size: 14 })
|
|
449
|
+
}), /* @__PURE__ */ K(O, { children: "Next page" })] }),
|
|
450
|
+
/* @__PURE__ */ q(k, { children: [/* @__PURE__ */ K(D, {
|
|
459
451
|
variant: "ghost",
|
|
460
452
|
size: "icon-xs",
|
|
461
|
-
onClick: () => u(
|
|
462
|
-
disabled: l ===
|
|
463
|
-
children: /* @__PURE__ */
|
|
464
|
-
}), /* @__PURE__ */
|
|
453
|
+
onClick: () => u(h),
|
|
454
|
+
disabled: l === h,
|
|
455
|
+
children: /* @__PURE__ */ K(xe, { size: 14 })
|
|
456
|
+
}), /* @__PURE__ */ K(O, { children: "Last page" })] })
|
|
465
457
|
]
|
|
466
458
|
})
|
|
467
459
|
})
|
|
@@ -470,11 +462,11 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
470
462
|
]
|
|
471
463
|
})]
|
|
472
464
|
});
|
|
473
|
-
},
|
|
474
|
-
let { collection: t } =
|
|
465
|
+
}, Mt = ({ field: e }) => {
|
|
466
|
+
let { collection: t } = ae(), [n, i] = W(!1), { key: a = "", label: o = "", helper_text: s = "", readonly: c = !1 } = e, l = a, u = e?.options?.collection_key || "", d = e?.options?.label_field_key || "", { field: { value: f, onBlur: p, onChange: m, ref: h, disabled: g, ..._ }, fieldState: y } = $({
|
|
475
467
|
name: l,
|
|
476
|
-
rules:
|
|
477
|
-
}), b = !!e?.required, x =
|
|
468
|
+
rules: r(e)
|
|
469
|
+
}), b = !!e?.required, x = y?.error?.message, S = async (e, n, { page: r = 1 }) => {
|
|
478
470
|
i(!0);
|
|
479
471
|
try {
|
|
480
472
|
let n = (await t?.getCollectionContentList({
|
|
@@ -483,7 +475,7 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
483
475
|
search: e,
|
|
484
476
|
limit: 10
|
|
485
477
|
}))?.content?.data, i = (n || []).map((e) => {
|
|
486
|
-
let t = e?.[d] ? e?.[d] :
|
|
478
|
+
let t = e?.[d] ? e?.[d] : kt(e?.slug || "");
|
|
487
479
|
return {
|
|
488
480
|
value: {
|
|
489
481
|
_id: e?._id,
|
|
@@ -508,7 +500,7 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
508
500
|
i(!1);
|
|
509
501
|
}
|
|
510
502
|
};
|
|
511
|
-
return /* @__PURE__ */
|
|
503
|
+
return /* @__PURE__ */ K(v, {
|
|
512
504
|
ref: h,
|
|
513
505
|
error: x,
|
|
514
506
|
helperText: s,
|
|
@@ -516,10 +508,10 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
516
508
|
label: o,
|
|
517
509
|
htmlFor: l,
|
|
518
510
|
isRequired: b,
|
|
519
|
-
children: /* @__PURE__ */
|
|
511
|
+
children: /* @__PURE__ */ K(Ot, {
|
|
520
512
|
id: l,
|
|
521
513
|
value: f ? {
|
|
522
|
-
label: f?.[d] ? f?.[d] : f?.slug ?
|
|
514
|
+
label: f?.[d] ? f?.[d] : f?.slug ? kt(f?.slug || "") : "",
|
|
523
515
|
value: {
|
|
524
516
|
_id: f?._id,
|
|
525
517
|
slug: f?.slug,
|
|
@@ -534,7 +526,7 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
534
526
|
debounceTimeout: 500,
|
|
535
527
|
getOptionLabel: (e) => e?.label,
|
|
536
528
|
getOptionValue: (e) => e?.value?._id || e?.value?.slug,
|
|
537
|
-
isLoading:
|
|
529
|
+
isLoading: n,
|
|
538
530
|
additional: { page: 1 },
|
|
539
531
|
cacheUniqs: [u],
|
|
540
532
|
minMenuHeight: 250,
|
|
@@ -542,52 +534,52 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
542
534
|
..._
|
|
543
535
|
})
|
|
544
536
|
});
|
|
545
|
-
},
|
|
537
|
+
}, Nt = (e) => {
|
|
546
538
|
let t = Z(4), { field: n } = e, { field_interface: r, key: i, options: a } = n, o = a === void 0 ? {} : a;
|
|
547
539
|
if (!r || !i) return null;
|
|
548
540
|
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;
|
|
549
541
|
if (o?.current_have_many_connected && !o?.connected_have_many_current) return console.error("[LevoCollection]: O2M is not supported"), null;
|
|
550
542
|
if (o?.current_have_many_connected && o?.connected_have_many_current) {
|
|
551
543
|
let n;
|
|
552
|
-
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */
|
|
544
|
+
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ K(jt, {
|
|
553
545
|
...e,
|
|
554
546
|
schema: null
|
|
555
547
|
}), t[0] = e, t[1] = n), n;
|
|
556
548
|
}
|
|
557
549
|
let s;
|
|
558
|
-
return t[2] === e ? s = t[3] : (s = /* @__PURE__ */
|
|
550
|
+
return t[2] === e ? s = t[3] : (s = /* @__PURE__ */ K(Mt, {
|
|
559
551
|
...e,
|
|
560
552
|
schema: null
|
|
561
553
|
}), t[2] = e, t[3] = s), s;
|
|
562
|
-
},
|
|
554
|
+
}, Pt = "_1vaa8ub0", Ft = "_1vaa8ub2", It = "_1vaa8ub3", Lt = "_13kepqq0", Rt = "_13kepqq1", zt = (e) => {
|
|
563
555
|
let t = Z(9), n, r;
|
|
564
556
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
565
557
|
let i;
|
|
566
|
-
t[3] === n ? i = t[4] : (i = Q(
|
|
558
|
+
t[3] === n ? i = t[4] : (i = Q(Lt, n), t[3] = n, t[4] = i);
|
|
567
559
|
let a;
|
|
568
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */
|
|
560
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ K(Ae.Indicator, {
|
|
569
561
|
"data-slot": "checkbox-indicator",
|
|
570
|
-
className:
|
|
571
|
-
children: /* @__PURE__ */
|
|
562
|
+
className: Rt,
|
|
563
|
+
children: /* @__PURE__ */ K(_e, {})
|
|
572
564
|
}), t[5] = a) : a = t[5];
|
|
573
565
|
let o;
|
|
574
|
-
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */
|
|
566
|
+
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */ K(Ae.Root, {
|
|
575
567
|
"data-slot": "checkbox",
|
|
576
568
|
className: i,
|
|
577
569
|
...r,
|
|
578
570
|
children: a
|
|
579
571
|
}), t[6] = r, t[7] = i, t[8] = o) : o = t[8], o;
|
|
580
|
-
},
|
|
581
|
-
let t = Z(48), { field:
|
|
572
|
+
}, Bt = (e) => {
|
|
573
|
+
let t = Z(48), { field: n } = e, [i, a] = W(""), [o, s] = W(!1), { key: c, label: l, helper_text: u, readonly: d, values: f, options: p } = n, m = c === void 0 ? "" : c, h = l === void 0 ? "" : l, g = u === void 0 ? "" : u, y = d === void 0 ? !1 : d, b;
|
|
582
574
|
t[0] === f ? b = t[1] : (b = f === void 0 ? [] : f, t[0] = f, t[1] = b);
|
|
583
575
|
let x = b, S = p === void 0 ? {} : p, C;
|
|
584
|
-
t[2] ===
|
|
576
|
+
t[2] === n ? C = t[3] : (C = r(n), t[2] = n, t[3] = C);
|
|
585
577
|
let w;
|
|
586
578
|
t[4] !== m || t[5] !== C ? (w = {
|
|
587
579
|
name: m,
|
|
588
580
|
rules: C
|
|
589
581
|
}, t[4] = m, t[5] = C, t[6] = w) : w = t[6];
|
|
590
|
-
let { field: T, fieldState: E } = $(w), { name: D, onBlur: O, onChange: k, value: A, ref: j, disabled:
|
|
582
|
+
let { field: T, fieldState: E } = $(w), { name: D, onBlur: O, onChange: k, value: A, ref: j, disabled: M } = T, { error: P } = E, F;
|
|
591
583
|
t[7] !== k || t[8] !== A ? (F = (e) => {
|
|
592
584
|
let t = Array.isArray(A || null) ? [...A] : [];
|
|
593
585
|
t.includes(e) ? t = t?.filter((t) => t !== e) : t.push(e), k(t);
|
|
@@ -602,51 +594,51 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
602
594
|
}
|
|
603
595
|
}, t[10] = L, t[11] = A, t[12] = x, t[13] = R) : R = t[13];
|
|
604
596
|
let z;
|
|
605
|
-
t[14] !== A || t[15] !== x ? (z = [A, x], t[14] = A, t[15] = x, t[16] = z) : z = t[16],
|
|
606
|
-
let
|
|
607
|
-
t[17] ===
|
|
597
|
+
t[14] !== A || t[15] !== x ? (z = [A, x], t[14] = A, t[15] = x, t[16] = z) : z = t[16], V(R, z);
|
|
598
|
+
let B = P?.message, H = n?.required, U = y && "_1vaa8ub1", G;
|
|
599
|
+
t[17] === U ? G = t[18] : (G = Q(Pt, U), t[17] = U, t[18] = G);
|
|
608
600
|
let J;
|
|
609
|
-
t[19] !==
|
|
610
|
-
className:
|
|
611
|
-
children: [/* @__PURE__ */
|
|
601
|
+
t[19] !== M || t[20] !== I || t[21] !== D || t[22] !== O || t[23] !== A || t[24] !== x ? (J = x?.map((e, t) => /* @__PURE__ */ q("div", {
|
|
602
|
+
className: Ft,
|
|
603
|
+
children: [/* @__PURE__ */ K(zt, {
|
|
612
604
|
id: `${D}-${e}-${t}`,
|
|
613
605
|
name: D,
|
|
614
606
|
checked: A ? A?.includes(e) : !1,
|
|
615
607
|
onCheckedChange: () => I(e),
|
|
616
608
|
onBlur: () => O(),
|
|
617
|
-
disabled:
|
|
618
|
-
}), /* @__PURE__ */
|
|
609
|
+
disabled: M
|
|
610
|
+
}), /* @__PURE__ */ K(_, {
|
|
619
611
|
htmlFor: `${D}-${e}-${t}`,
|
|
620
|
-
className:
|
|
612
|
+
className: It,
|
|
621
613
|
children: e
|
|
622
614
|
})]
|
|
623
|
-
}, `${e}-${t}`)), t[19] =
|
|
615
|
+
}, `${e}-${t}`)), t[19] = M, t[20] = I, t[21] = D, t[22] = O, t[23] = A, t[24] = x, t[25] = J) : J = t[25];
|
|
624
616
|
let Y;
|
|
625
|
-
t[26] !== j || t[27] !==
|
|
617
|
+
t[26] !== j || t[27] !== G || t[28] !== J ? (Y = /* @__PURE__ */ K("div", {
|
|
626
618
|
ref: j,
|
|
627
|
-
className:
|
|
619
|
+
className: G,
|
|
628
620
|
children: J
|
|
629
|
-
}), t[26] = j, t[27] =
|
|
621
|
+
}), t[26] = j, t[27] = G, t[28] = J, t[29] = Y) : Y = t[29];
|
|
630
622
|
let X;
|
|
631
|
-
t[30] !==
|
|
623
|
+
t[30] !== M || t[31] !== L || t[32] !== D || t[33] !== O || t[34] !== k || t[35] !== o || t[36] !== i || t[37] !== A ? (X = L && /* @__PURE__ */ q("div", {
|
|
632
624
|
className: "_1vaa8ub4",
|
|
633
|
-
children: [/* @__PURE__ */
|
|
625
|
+
children: [/* @__PURE__ */ q("div", {
|
|
634
626
|
className: "_1vaa8ub5",
|
|
635
|
-
children: [/* @__PURE__ */
|
|
627
|
+
children: [/* @__PURE__ */ K(zt, {
|
|
636
628
|
name: `${D}-other`,
|
|
637
629
|
id: `${D}-other`,
|
|
638
|
-
disabled:
|
|
630
|
+
disabled: M,
|
|
639
631
|
checked: o,
|
|
640
632
|
onCheckedChange: (e) => {
|
|
641
633
|
s(!!e), e ? Array.isArray(A) ? k?.([...A, i]) : k?.([i]) : k?.((A ?? [])?.filter((e) => e !== i));
|
|
642
634
|
},
|
|
643
635
|
onBlur: () => O()
|
|
644
|
-
}), /* @__PURE__ */
|
|
636
|
+
}), /* @__PURE__ */ q(_, {
|
|
645
637
|
htmlFor: `${D}-other`,
|
|
646
638
|
className: "_1vaa8ub3",
|
|
647
639
|
children: ["Other:", " "]
|
|
648
640
|
})]
|
|
649
|
-
}), /* @__PURE__ */
|
|
641
|
+
}), /* @__PURE__ */ K(N, {
|
|
650
642
|
name: `other-checkbox-${D}`,
|
|
651
643
|
className: "_1vaa8ub6",
|
|
652
644
|
value: i,
|
|
@@ -654,123 +646,205 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
654
646
|
let t = 0;
|
|
655
647
|
k?.(A?.map((n) => n === i && !t ? (t = 1, e.target.value) : n)), a(e.target.value);
|
|
656
648
|
},
|
|
657
|
-
disabled: !o ||
|
|
649
|
+
disabled: !o || M,
|
|
658
650
|
placeholder: "Please specify"
|
|
659
651
|
})]
|
|
660
|
-
}), t[30] =
|
|
652
|
+
}), t[30] = M, t[31] = L, t[32] = D, t[33] = O, t[34] = k, t[35] = o, t[36] = i, t[37] = A, t[38] = X) : X = t[38];
|
|
661
653
|
let ee;
|
|
662
|
-
return t[39] !==
|
|
663
|
-
error:
|
|
664
|
-
helperText:
|
|
665
|
-
readOnly:
|
|
654
|
+
return t[39] !== g || t[40] !== h || t[41] !== D || t[42] !== y || t[43] !== B || t[44] !== H || t[45] !== Y || t[46] !== X ? (ee = /* @__PURE__ */ q(v, {
|
|
655
|
+
error: B,
|
|
656
|
+
helperText: g,
|
|
657
|
+
readOnly: y,
|
|
666
658
|
label: h,
|
|
667
659
|
htmlFor: D,
|
|
668
660
|
isRequired: H,
|
|
669
661
|
children: [Y, X]
|
|
670
|
-
}), t[39] =
|
|
671
|
-
},
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
662
|
+
}), t[39] = g, t[40] = h, t[41] = D, t[42] = y, t[43] = B, t[44] = H, t[45] = Y, t[46] = X, t[47] = ee) : ee = t[47], ee;
|
|
663
|
+
}, Vt = "₹", Ht = [
|
|
664
|
+
{
|
|
665
|
+
label: "INR — Indian Rupee (₹)",
|
|
666
|
+
value: "₹",
|
|
667
|
+
code: "INR"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
label: "USD — US Dollar ($)",
|
|
671
|
+
value: "$",
|
|
672
|
+
code: "USD"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
label: "EUR — Euro (€)",
|
|
676
|
+
value: "€",
|
|
677
|
+
code: "EUR"
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
label: "GBP — British Pound (£)",
|
|
681
|
+
value: "£",
|
|
682
|
+
code: "GBP"
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
label: "JPY — Japanese Yen (¥)",
|
|
686
|
+
value: "¥",
|
|
687
|
+
code: "JPY"
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
label: "AUD — Australian Dollar (A$)",
|
|
691
|
+
value: "A$",
|
|
692
|
+
code: "AUD"
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
label: "CAD — Canadian Dollar (C$)",
|
|
696
|
+
value: "C$",
|
|
697
|
+
code: "CAD"
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
label: "SGD — Singapore Dollar (S$)",
|
|
701
|
+
value: "S$",
|
|
702
|
+
code: "SGD"
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
label: "HKD — Hong Kong Dollar (HK$)",
|
|
706
|
+
value: "HK$",
|
|
707
|
+
code: "HKD"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
label: "BRL — Brazilian Real (R$)",
|
|
711
|
+
value: "R$",
|
|
712
|
+
code: "BRL"
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
label: "RUB — Russian Ruble (₽)",
|
|
716
|
+
value: "₽",
|
|
717
|
+
code: "RUB"
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
label: "KRW — South Korean Won (₩)",
|
|
721
|
+
value: "₩",
|
|
722
|
+
code: "KRW"
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
label: "TRY — Turkish Lira (₺)",
|
|
726
|
+
value: "₺",
|
|
727
|
+
code: "TRY"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
label: "CHF — Swiss Franc",
|
|
731
|
+
value: "CHF",
|
|
732
|
+
code: "CHF"
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
label: "SAR — Saudi Riyal (﷼)",
|
|
736
|
+
value: "﷼",
|
|
737
|
+
code: "SAR"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
label: "AED — UAE Dirham (د.إ)",
|
|
741
|
+
value: "د.إ",
|
|
742
|
+
code: "AED"
|
|
743
|
+
}
|
|
744
|
+
], Ut = (e) => {
|
|
745
|
+
let t = Z(39), n, i;
|
|
746
|
+
t[0] === e ? (n = t[1], i = t[2]) : ({field: n, ...i} = e, t[0] = e, t[1] = n, t[2] = i);
|
|
747
|
+
let { key: a, label: o, helper_text: s, readonly: c } = n, l = a === void 0 ? "" : a, u = o === void 0 ? "" : o, d = s === void 0 ? "" : s, f = c === void 0 ? !1 : c, p = l, m;
|
|
748
|
+
t[3] === n ? m = t[4] : (m = r(n), t[3] = n, t[4] = m);
|
|
676
749
|
let h;
|
|
677
750
|
t[5] !== p || t[6] !== m ? (h = {
|
|
678
751
|
name: p,
|
|
679
752
|
rules: m
|
|
680
753
|
}, t[5] = p, t[6] = m, t[7] = h) : h = t[7];
|
|
681
|
-
let { field: g, fieldState: _ } = $(h), b, x, S, C
|
|
682
|
-
t[8] === g ? (
|
|
683
|
-
let
|
|
684
|
-
t[14] ===
|
|
754
|
+
let { field: g, fieldState: _ } = $(h), y, b, x, S, C;
|
|
755
|
+
t[8] === g ? (y = t[9], b = t[10], x = t[11], S = t[12], C = t[13]) : ({value: C, onBlur: y, onChange: b, ref: x, ...S} = g, t[8] = g, t[9] = y, t[10] = b, t[11] = x, t[12] = S, t[13] = C);
|
|
756
|
+
let w = !!n?.required, T = _?.error?.message, E = n?.options?.currency_code, D = `${E || "$"} `, O = `${E || "$"} 0`, k = E === "₹" ? "lakh" : "thousand", j;
|
|
757
|
+
t[14] === b ? j = t[15] : (j = (e) => {
|
|
685
758
|
let { value: t } = e;
|
|
686
|
-
|
|
687
|
-
}, t[14] =
|
|
688
|
-
let M;
|
|
689
|
-
t[16] === b ? M = t[17] : (M = () => {
|
|
690
|
-
b && b();
|
|
691
|
-
}, t[16] = b, t[17] = M);
|
|
759
|
+
b && b(t);
|
|
760
|
+
}, t[14] = b, t[15] = j);
|
|
692
761
|
let N;
|
|
693
|
-
t[
|
|
762
|
+
t[16] === y ? N = t[17] : (N = () => {
|
|
763
|
+
y && y();
|
|
764
|
+
}, t[16] = y, t[17] = N);
|
|
694
765
|
let P;
|
|
695
|
-
t[
|
|
766
|
+
t[18] === Symbol.for("react.memo_cache_sentinel") ? (P = Q(M, A), t[18] = P) : P = t[18];
|
|
767
|
+
let F;
|
|
768
|
+
t[19] !== p || t[20] !== i || t[21] !== f || t[22] !== x || t[23] !== S || t[24] !== k || t[25] !== j || t[26] !== N || t[27] !== D || t[28] !== O || t[29] !== C ? (F = /* @__PURE__ */ K(je, {
|
|
696
769
|
thousandSeparator: !0,
|
|
697
|
-
prefix:
|
|
770
|
+
prefix: D,
|
|
771
|
+
placeholder: O,
|
|
698
772
|
thousandsGroupStyle: k,
|
|
699
773
|
suffix: "",
|
|
700
774
|
allowNegative: !1,
|
|
701
775
|
id: p,
|
|
702
|
-
getInputRef:
|
|
703
|
-
onValueChange:
|
|
704
|
-
onBlur:
|
|
705
|
-
value:
|
|
776
|
+
getInputRef: x,
|
|
777
|
+
onValueChange: j,
|
|
778
|
+
onBlur: N,
|
|
779
|
+
value: C,
|
|
706
780
|
readOnly: f,
|
|
707
|
-
className:
|
|
708
|
-
...
|
|
781
|
+
className: P,
|
|
782
|
+
...S,
|
|
709
783
|
...i
|
|
710
|
-
}), t[19] = p, t[20] = i, t[21] = f, t[22] =
|
|
711
|
-
let
|
|
712
|
-
return t[
|
|
713
|
-
error:
|
|
784
|
+
}), t[19] = p, t[20] = i, t[21] = f, t[22] = x, t[23] = S, t[24] = k, t[25] = j, t[26] = N, t[27] = D, t[28] = O, t[29] = C, t[30] = F) : F = t[30];
|
|
785
|
+
let I;
|
|
786
|
+
return t[31] !== T || t[32] !== d || t[33] !== w || t[34] !== u || t[35] !== p || t[36] !== f || t[37] !== F ? (I = /* @__PURE__ */ K(v, {
|
|
787
|
+
error: T,
|
|
714
788
|
helperText: d,
|
|
715
789
|
readOnly: f,
|
|
716
790
|
htmlFor: p,
|
|
717
|
-
isRequired:
|
|
791
|
+
isRequired: w,
|
|
718
792
|
label: u,
|
|
719
|
-
children:
|
|
720
|
-
}), t[
|
|
721
|
-
},
|
|
793
|
+
children: F
|
|
794
|
+
}), t[31] = T, t[32] = d, t[33] = w, t[34] = u, t[35] = p, t[36] = f, t[37] = F, t[38] = I) : I = t[38], I;
|
|
795
|
+
}, Wt = {
|
|
722
796
|
label: "Other",
|
|
723
797
|
value: "other_internal"
|
|
724
|
-
},
|
|
725
|
-
let { portalRef: i } =
|
|
798
|
+
}, Gt = ({ field: e, ...n }) => {
|
|
799
|
+
let { portalRef: i } = t(), [a, o] = W([]), { key: s = "", label: c = "", helper_text: l = "", readonly: u = !1, values: d = [], options: f = {} } = e, p = s, { field: { value: m, onBlur: h, onChange: g, disabled: _, ...y }, fieldState: b } = $({
|
|
726
800
|
name: p,
|
|
727
|
-
rules:
|
|
728
|
-
}), [x, S] =
|
|
729
|
-
return
|
|
801
|
+
rules: r(e)
|
|
802
|
+
}), [x, S] = W(""), [C, w] = W(!1), T = !!e?.required, E = b?.error?.message, D = !!f?.custom_input;
|
|
803
|
+
return V(() => {
|
|
730
804
|
if (d?.length) {
|
|
731
805
|
let e = [...d?.map((e) => ({
|
|
732
806
|
label: e,
|
|
733
807
|
value: e
|
|
734
808
|
}))];
|
|
735
|
-
D && e.push(
|
|
809
|
+
D && e.push(Wt), o(e);
|
|
736
810
|
}
|
|
737
|
-
}, [d, D]),
|
|
738
|
-
!
|
|
811
|
+
}, [d, D]), V(() => {
|
|
812
|
+
!n?.isMulti && D && typeof m == "string" && m && (a.some((e) => e.value !== Wt.value && e.value === m) ? w(!1) : (w(!0), S(m)));
|
|
739
813
|
}, [
|
|
740
814
|
m,
|
|
741
815
|
a,
|
|
742
816
|
D
|
|
743
|
-
]), /* @__PURE__ */
|
|
817
|
+
]), /* @__PURE__ */ q(v, {
|
|
744
818
|
error: E,
|
|
745
819
|
helperText: l,
|
|
746
820
|
readOnly: u,
|
|
747
821
|
label: c,
|
|
748
822
|
htmlFor: p,
|
|
749
823
|
isRequired: T,
|
|
750
|
-
children: [/* @__PURE__ */
|
|
824
|
+
children: [/* @__PURE__ */ K(ce, {
|
|
751
825
|
id: p,
|
|
752
|
-
value: C ?
|
|
826
|
+
value: C ? Wt : m ? n?.isMulti ? a?.filter((e) => m?.includes(e?.value)) : a?.find((e) => e?.value === m) : null,
|
|
753
827
|
onChange: (e) => {
|
|
754
|
-
D && e?.value ===
|
|
828
|
+
D && e?.value === Wt.value && e?.label === Wt.label ? (w(!0), S(""), g("")) : (w(!1), n?.isMulti ? g(e?.map((e) => e?.value)) : g(e?.value));
|
|
755
829
|
},
|
|
756
830
|
onBlur: () => h(),
|
|
757
831
|
options: a,
|
|
758
832
|
isDisabled: _,
|
|
759
833
|
menuPlacement: "auto",
|
|
760
834
|
isClearable: !0,
|
|
761
|
-
...
|
|
762
|
-
...
|
|
835
|
+
...y,
|
|
836
|
+
...n,
|
|
763
837
|
unstyled: !0,
|
|
764
|
-
classNames:
|
|
838
|
+
classNames: Et,
|
|
765
839
|
styles: { menuPortal: (e) => ({
|
|
766
840
|
...e,
|
|
767
841
|
zIndex: 99999999
|
|
768
842
|
}) },
|
|
769
843
|
menuPosition: "fixed",
|
|
770
844
|
menuPortalTarget: i?.current
|
|
771
|
-
}), C && /* @__PURE__ */
|
|
845
|
+
}), C && /* @__PURE__ */ K("div", {
|
|
772
846
|
className: "ldp9z20",
|
|
773
|
-
children: /* @__PURE__ */
|
|
847
|
+
children: /* @__PURE__ */ K(N, {
|
|
774
848
|
name: `select-other-${p}`,
|
|
775
849
|
value: x,
|
|
776
850
|
onChange: (e) => {
|
|
@@ -780,13 +854,13 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
780
854
|
})
|
|
781
855
|
})]
|
|
782
856
|
});
|
|
783
|
-
},
|
|
784
|
-
let t = Z(50),
|
|
785
|
-
t[0] === e ? (
|
|
786
|
-
let { key: o, label: s, helper_text: c, readonly: l } =
|
|
787
|
-
t[4] !==
|
|
857
|
+
}, Kt = "eviv4t0", qt = "eviv4t1", Jt = "eviv4t3", Yt = (e) => {
|
|
858
|
+
let t = Z(50), n, i, a;
|
|
859
|
+
t[0] === e ? (n = t[1], i = t[2], a = t[3]) : ({field: n, settings: a, ...i} = e, t[0] = e, t[1] = n, t[2] = i, t[3] = a);
|
|
860
|
+
let { key: o, label: s, helper_text: c, readonly: l } = n, u = o === void 0 ? "" : o, d = s === void 0 ? "" : s, f = c === void 0 ? "" : c, p = l === void 0 ? !1 : l, m = u, h = !!n.options?.verification && !!a?.enableVerification, [g, _] = W(null), [y, b] = W(!1), x;
|
|
861
|
+
t[4] !== y || t[5] !== h || t[6] !== g ? (x = (e) => y ? !0 : h && (!g || g !== e) ? "Email verification required" : !0, t[4] = y, t[5] = h, t[6] = g, t[7] = x) : x = t[7];
|
|
788
862
|
let S;
|
|
789
|
-
t[8] !==
|
|
863
|
+
t[8] !== n || t[9] !== x ? (S = r(n, x), t[8] = n, t[9] = x, t[10] = S) : S = t[10];
|
|
790
864
|
let C = S, w;
|
|
791
865
|
t[11] !== m || t[12] !== C ? (w = {
|
|
792
866
|
name: m,
|
|
@@ -794,25 +868,25 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
794
868
|
}, t[11] = m, t[12] = C, t[13] = w) : w = t[13];
|
|
795
869
|
let { field: T, fieldState: D } = $(w), O, k, A, j;
|
|
796
870
|
t[14] === T ? (O = t[15], k = t[16], A = t[17], j = t[18]) : ({value: j, onBlur: k, onChange: A, ...O} = T, t[14] = T, t[15] = O, t[16] = k, t[17] = A, t[18] = j);
|
|
797
|
-
let
|
|
871
|
+
let M = !!n?.required, P = D?.error?.message, F = !!g && !!j && g === j?.trim()?.toLowerCase(), I;
|
|
798
872
|
t[19] === A ? I = t[20] : (I = (e) => {
|
|
799
873
|
_(e), A(e);
|
|
800
874
|
}, t[19] = A, t[20] = I);
|
|
801
875
|
let L = I, R;
|
|
802
|
-
t[21] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */
|
|
876
|
+
t[21] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ K(we, { size: 20 }), t[21] = R) : R = t[21];
|
|
803
877
|
let z;
|
|
804
|
-
t[22] === F ? z = t[23] : (z = F ? /* @__PURE__ */
|
|
878
|
+
t[22] === F ? z = t[23] : (z = F ? /* @__PURE__ */ K("button", {
|
|
805
879
|
type: "button",
|
|
806
880
|
onClick: () => _(null),
|
|
807
|
-
className:
|
|
881
|
+
className: Jt,
|
|
808
882
|
title: "Change email",
|
|
809
|
-
children: /* @__PURE__ */
|
|
883
|
+
children: /* @__PURE__ */ K(Te, { size: 14 })
|
|
810
884
|
}) : null, t[22] = F, t[23] = z);
|
|
811
885
|
let B = j || "", V;
|
|
812
886
|
t[24] === A ? V = t[25] : (V = (e) => A(e?.target?.value?.trim()?.toLocaleLowerCase()), t[24] = A, t[25] = V);
|
|
813
|
-
let H = p || F,
|
|
814
|
-
t[26] !== O || t[27] !== m || t[28] !== k || t[29] !== i || t[30] !== z || t[31] !== B || t[32] !== V || t[33] !== H ? (
|
|
815
|
-
className:
|
|
887
|
+
let H = p || F, U;
|
|
888
|
+
t[26] !== O || t[27] !== m || t[28] !== k || t[29] !== i || t[30] !== z || t[31] !== B || t[32] !== V || t[33] !== H ? (U = /* @__PURE__ */ K(N, {
|
|
889
|
+
className: qt,
|
|
816
890
|
id: m,
|
|
817
891
|
type: "email",
|
|
818
892
|
leftIcon: R,
|
|
@@ -823,50 +897,50 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
823
897
|
readOnly: H,
|
|
824
898
|
...O,
|
|
825
899
|
...i
|
|
826
|
-
}), t[26] = O, t[27] = m, t[28] = k, t[29] = i, t[30] = z, t[31] = B, t[32] = V, t[33] = H, t[34] =
|
|
827
|
-
let
|
|
828
|
-
t[35] !== L || t[36] !== F || t[37] !== h || t[38] !== j ? (
|
|
900
|
+
}), t[26] = O, t[27] = m, t[28] = k, t[29] = i, t[30] = z, t[31] = B, t[32] = V, t[33] = H, t[34] = U) : U = t[34];
|
|
901
|
+
let G;
|
|
902
|
+
t[35] !== L || t[36] !== F || t[37] !== h || t[38] !== j ? (G = h && /* @__PURE__ */ K("div", {
|
|
829
903
|
className: "eviv4t2",
|
|
830
|
-
children: /* @__PURE__ */
|
|
904
|
+
children: /* @__PURE__ */ K(E, {
|
|
831
905
|
value: j,
|
|
832
906
|
type: "email",
|
|
833
907
|
isVerified: F,
|
|
834
908
|
onVerifySuccess: L,
|
|
835
909
|
onStateChange: b
|
|
836
910
|
})
|
|
837
|
-
}), t[35] = L, t[36] = F, t[37] = h, t[38] = j, t[39] =
|
|
911
|
+
}), t[35] = L, t[36] = F, t[37] = h, t[38] = j, t[39] = G) : G = t[39];
|
|
838
912
|
let J;
|
|
839
|
-
t[40] !==
|
|
840
|
-
className:
|
|
841
|
-
children: [
|
|
842
|
-
}), t[40] =
|
|
913
|
+
t[40] !== U || t[41] !== G ? (J = /* @__PURE__ */ q("div", {
|
|
914
|
+
className: Kt,
|
|
915
|
+
children: [U, G]
|
|
916
|
+
}), t[40] = U, t[41] = G, t[42] = J) : J = t[42];
|
|
843
917
|
let Y;
|
|
844
|
-
return t[43] !== P || t[44] !== f || t[45] !==
|
|
918
|
+
return t[43] !== P || t[44] !== f || t[45] !== M || t[46] !== d || t[47] !== m || t[48] !== J ? (Y = /* @__PURE__ */ K(v, {
|
|
845
919
|
error: P,
|
|
846
920
|
helperText: f,
|
|
847
921
|
label: d,
|
|
848
922
|
htmlFor: m,
|
|
849
|
-
isRequired:
|
|
923
|
+
isRequired: M,
|
|
850
924
|
children: J
|
|
851
|
-
}), t[43] = P, t[44] = f, t[45] =
|
|
852
|
-
},
|
|
925
|
+
}), t[43] = P, t[44] = f, t[45] = M, t[46] = d, t[47] = m, t[48] = J, t[49] = Y) : Y = t[49], Y;
|
|
926
|
+
}, Xt = (e) => e ? {
|
|
853
927
|
value: e,
|
|
854
928
|
label: e?.place_name || e?.formatted_address || e?.name
|
|
855
|
-
} : null,
|
|
856
|
-
let { portalRef:
|
|
929
|
+
} : null, Zt = ({ field: e }) => {
|
|
930
|
+
let { portalRef: n } = t(), [i, a] = W(!1), [o, s] = W(!1), c = ae(), { key: l = "", label: u = "", helper_text: d = "", readonly: f = !1 } = e, { field: { value: p, onBlur: m, onChange: h, disabled: g, ..._ }, fieldState: y } = $({
|
|
857
931
|
name: l,
|
|
858
|
-
rules:
|
|
859
|
-
}), b = !!
|
|
932
|
+
rules: r(e)
|
|
933
|
+
}), b = !!e?.required, x = y?.error?.message, S = (e) => {
|
|
860
934
|
e && e?.place_id !== p?.place_id ? (s(!0), c?.fetch.url(`/v1/bevy/content/location/${e?.place_id}/get-location-details`).get().json().then((e) => {
|
|
861
935
|
h && h(e?.content?.data);
|
|
862
936
|
}).catch((e) => {
|
|
863
|
-
console.log("Could not fetch location details:",
|
|
937
|
+
console.log("Could not fetch location details:", ee(e).message);
|
|
864
938
|
}).finally(() => s(!1))) : h(null);
|
|
865
|
-
}, C = (
|
|
939
|
+
}, C = (t, n) => {
|
|
866
940
|
a(!0);
|
|
867
941
|
let r = {};
|
|
868
|
-
|
|
869
|
-
search:
|
|
942
|
+
e?.options?.location_type && (r.location_type = e?.options?.location_type), e?.options?.country && (r.country = e?.options?.country), c?.fetch.url("/v1/bevy/content/location/search-location").post({
|
|
943
|
+
search: t,
|
|
870
944
|
where: r
|
|
871
945
|
}).json().then((e) => {
|
|
872
946
|
n(e?.content?.data?.map((e) => ({
|
|
@@ -877,17 +951,17 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
877
951
|
n([]);
|
|
878
952
|
}).finally(() => a(!1));
|
|
879
953
|
};
|
|
880
|
-
return /* @__PURE__ */
|
|
954
|
+
return /* @__PURE__ */ K(v, {
|
|
881
955
|
error: x,
|
|
882
956
|
helperText: d,
|
|
883
957
|
readOnly: f,
|
|
884
958
|
label: u,
|
|
885
959
|
htmlFor: l,
|
|
886
960
|
isRequired: b,
|
|
887
|
-
children: /* @__PURE__ */
|
|
961
|
+
children: /* @__PURE__ */ K(Me, {
|
|
888
962
|
id: l,
|
|
889
|
-
value:
|
|
890
|
-
defaultOptions: p ? [
|
|
963
|
+
value: Xt(p),
|
|
964
|
+
defaultOptions: p ? [Xt(p)] : void 0,
|
|
891
965
|
onChange: (e) => {
|
|
892
966
|
S(e?.value);
|
|
893
967
|
},
|
|
@@ -896,83 +970,83 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
896
970
|
menuPlacement: "auto",
|
|
897
971
|
..._,
|
|
898
972
|
unstyled: !0,
|
|
899
|
-
classNames:
|
|
973
|
+
classNames: Et,
|
|
900
974
|
styles: { menuPortal: (e) => ({
|
|
901
975
|
...e,
|
|
902
976
|
zIndex: 99999999
|
|
903
977
|
}) },
|
|
904
978
|
menuPosition: "fixed",
|
|
905
|
-
menuPortalTarget:
|
|
979
|
+
menuPortalTarget: n?.current,
|
|
906
980
|
loadOptions: C,
|
|
907
981
|
isLoading: i || o,
|
|
908
982
|
isClearable: !0,
|
|
909
983
|
noOptionsMessage: ({ inputValue: e }) => e ? "No results found. Try searching something else" : "Start typing to search"
|
|
910
984
|
})
|
|
911
985
|
});
|
|
912
|
-
},
|
|
986
|
+
}, Qt = "xgv9uh0", $t = "xgv9uh1", en = "xgv9uh2", tn = "xgv9uh3", nn = "xgv9uh4", rn = "xgv9uh5", an = (e) => {
|
|
913
987
|
let t = Z(29), { field: n } = e, { key: r, label: i } = n, a = r === void 0 ? "" : r, o = i === void 0 ? "" : i, s;
|
|
914
988
|
t[0] === a ? s = t[1] : (s = { name: a }, t[0] = a, t[1] = s);
|
|
915
|
-
let c =
|
|
989
|
+
let c = de(s), l, u, d, f, p, m;
|
|
916
990
|
if (t[2] !== n || t[3] !== a || t[4] !== o || t[5] !== c) {
|
|
917
991
|
let { fields: e, ...r } = c;
|
|
918
|
-
l = r, f =
|
|
992
|
+
l = r, f = Qt, p = a, t[12] !== a || t[13] !== o ? (m = o && /* @__PURE__ */ K(_, {
|
|
919
993
|
htmlFor: a,
|
|
920
994
|
className: "_1ompjs11",
|
|
921
995
|
children: o
|
|
922
|
-
}), t[12] = a, t[13] = o, t[14] = m) : m = t[14], u =
|
|
923
|
-
className:
|
|
924
|
-
children: [/* @__PURE__ */
|
|
925
|
-
className:
|
|
926
|
-
children: /* @__PURE__ */
|
|
996
|
+
}), t[12] = a, t[13] = o, t[14] = m) : m = t[14], u = $t, d = e?.map((e, t) => /* @__PURE__ */ q("div", {
|
|
997
|
+
className: tn,
|
|
998
|
+
children: [/* @__PURE__ */ K("div", {
|
|
999
|
+
className: nn,
|
|
1000
|
+
children: /* @__PURE__ */ K(Zt, { field: {
|
|
927
1001
|
...n,
|
|
928
1002
|
key: `${a}.${t}`,
|
|
929
1003
|
label: ""
|
|
930
1004
|
} })
|
|
931
|
-
}), /* @__PURE__ */
|
|
1005
|
+
}), /* @__PURE__ */ K(y, {
|
|
932
1006
|
variant: "ghost",
|
|
933
1007
|
size: "icon-sm",
|
|
934
|
-
className:
|
|
1008
|
+
className: rn,
|
|
935
1009
|
onClick: () => l.remove(t),
|
|
936
1010
|
"aria-label": `Remove location ${t + 1}`,
|
|
937
|
-
children: /* @__PURE__ */
|
|
1011
|
+
children: /* @__PURE__ */ K(De, { size: 14 })
|
|
938
1012
|
})]
|
|
939
1013
|
}, e.id)), t[2] = n, t[3] = a, t[4] = o, t[5] = c, t[6] = l, t[7] = u, t[8] = d, t[9] = f, t[10] = p, t[11] = m;
|
|
940
1014
|
} else l = t[6], u = t[7], d = t[8], f = t[9], p = t[10], m = t[11];
|
|
941
|
-
let
|
|
942
|
-
t[15] === l ?
|
|
1015
|
+
let h;
|
|
1016
|
+
t[15] === l ? h = t[16] : (h = () => {
|
|
943
1017
|
l.append(null);
|
|
944
|
-
}, t[15] = l, t[16] =
|
|
1018
|
+
}, t[15] = l, t[16] = h);
|
|
1019
|
+
let g;
|
|
1020
|
+
t[17] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ K(Ee, { size: 14 }), t[17] = g) : g = t[17];
|
|
945
1021
|
let v;
|
|
946
|
-
t[
|
|
947
|
-
let y;
|
|
948
|
-
t[18] === _ ? y = t[19] : (y = /* @__PURE__ */ K(h, {
|
|
1022
|
+
t[18] === h ? v = t[19] : (v = /* @__PURE__ */ q(y, {
|
|
949
1023
|
variant: "ghost",
|
|
950
1024
|
size: "xs",
|
|
951
|
-
className:
|
|
952
|
-
onClick:
|
|
953
|
-
children: [
|
|
954
|
-
}), t[18] =
|
|
1025
|
+
className: en,
|
|
1026
|
+
onClick: h,
|
|
1027
|
+
children: [g, "Add"]
|
|
1028
|
+
}), t[18] = h, t[19] = v);
|
|
955
1029
|
let b;
|
|
956
|
-
t[20] !==
|
|
1030
|
+
t[20] !== v || t[21] !== u || t[22] !== d ? (b = /* @__PURE__ */ q("div", {
|
|
957
1031
|
className: u,
|
|
958
|
-
children: [d,
|
|
959
|
-
}), t[20] =
|
|
1032
|
+
children: [d, v]
|
|
1033
|
+
}), t[20] = v, t[21] = u, t[22] = d, t[23] = b) : b = t[23];
|
|
960
1034
|
let x;
|
|
961
|
-
return t[24] !== b || t[25] !== f || t[26] !== p || t[27] !== m ? (x = /* @__PURE__ */
|
|
1035
|
+
return t[24] !== b || t[25] !== f || t[26] !== p || t[27] !== m ? (x = /* @__PURE__ */ q("div", {
|
|
962
1036
|
className: f,
|
|
963
1037
|
children: [m, b]
|
|
964
1038
|
}, p), t[24] = b, t[25] = f, t[26] = p, t[27] = m, t[28] = x) : x = t[28], x;
|
|
965
|
-
},
|
|
966
|
-
let { key: t = "", label:
|
|
1039
|
+
}, on = "a22xph0", sn = "a22xph2", cn = "a22xph3", ln = "a22xph5", un = /[\n\t,]+/, dn = ({ field: e }) => {
|
|
1040
|
+
let { key: t = "", label: n = "", helper_text: i = "", readonly: a = !1 } = e, o = t, { field: { value: s, onChange: c, onBlur: l, ref: u }, fieldState: d } = $({
|
|
967
1041
|
name: o,
|
|
968
|
-
rules:
|
|
969
|
-
}), f = !!e?.required, p = d?.error?.message, m = Array.isArray(s) ? s : [], [h, g] =
|
|
1042
|
+
rules: r(e)
|
|
1043
|
+
}), f = !!e?.required, p = d?.error?.message, m = Array.isArray(s) ? s : [], [h, g] = W(""), [_, y] = W(-1), b = U(null), x = z((e) => {
|
|
970
1044
|
b.current = e, typeof u == "function" && u(e);
|
|
971
|
-
}, [u]), S =
|
|
1045
|
+
}, [u]), S = z((e) => {
|
|
972
1046
|
c(m.filter((t, n) => n !== e));
|
|
973
|
-
}, [m, c]), C =
|
|
1047
|
+
}, [m, c]), C = z(() => {
|
|
974
1048
|
if (!h.trim()) return;
|
|
975
|
-
let e = h.split(
|
|
1049
|
+
let e = h.split(un), t = [...m];
|
|
976
1050
|
for (let n of e) {
|
|
977
1051
|
let e = n.trim();
|
|
978
1052
|
e && !t.includes(e) && t.push(e);
|
|
@@ -982,29 +1056,29 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
982
1056
|
h,
|
|
983
1057
|
m,
|
|
984
1058
|
c
|
|
985
|
-
]), w =
|
|
1059
|
+
]), w = z((e) => {
|
|
986
1060
|
let t = e.currentTarget;
|
|
987
1061
|
switch (e.key) {
|
|
988
1062
|
case "Enter":
|
|
989
1063
|
h.trim() && (e.preventDefault(), C());
|
|
990
1064
|
break;
|
|
991
1065
|
case "Backspace":
|
|
992
|
-
t.selectionStart === 0 && t.selectionEnd === 0 && m.length > 0 && (_ >= 0 ? (S(_),
|
|
1066
|
+
t.selectionStart === 0 && t.selectionEnd === 0 && m.length > 0 && (_ >= 0 ? (S(_), y(_ > 0 ? _ - 1 : -1)) : y(m.length - 1));
|
|
993
1067
|
break;
|
|
994
1068
|
case "Delete":
|
|
995
|
-
_ >= 0 && _ < m.length && (S(_),
|
|
1069
|
+
_ >= 0 && _ < m.length && (S(_), y(_ < m.length - 1 ? _ : -1));
|
|
996
1070
|
break;
|
|
997
1071
|
case "ArrowLeft":
|
|
998
|
-
t.selectionStart === 0 && m.length > 0 && (e.preventDefault(),
|
|
1072
|
+
t.selectionStart === 0 && m.length > 0 && (e.preventDefault(), y(_ > 0 ? _ - 1 : _ === -1 ? m.length - 1 : 0));
|
|
999
1073
|
break;
|
|
1000
1074
|
case "ArrowRight":
|
|
1001
|
-
_ >= 0 && (e.preventDefault(), _ < m.length - 1 ?
|
|
1075
|
+
_ >= 0 && (e.preventDefault(), _ < m.length - 1 ? y(_ + 1) : y(-1));
|
|
1002
1076
|
break;
|
|
1003
1077
|
case "Escape":
|
|
1004
|
-
|
|
1078
|
+
y(-1);
|
|
1005
1079
|
break;
|
|
1006
1080
|
default:
|
|
1007
|
-
_ >= 0 &&
|
|
1081
|
+
_ >= 0 && y(-1);
|
|
1008
1082
|
break;
|
|
1009
1083
|
}
|
|
1010
1084
|
}, [
|
|
@@ -1013,39 +1087,39 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1013
1087
|
_,
|
|
1014
1088
|
C,
|
|
1015
1089
|
S
|
|
1016
|
-
]), T =
|
|
1090
|
+
]), T = z((e) => {
|
|
1017
1091
|
let t = e.clipboardData.getData("text");
|
|
1018
|
-
if (
|
|
1092
|
+
if (un.test(t)) {
|
|
1019
1093
|
e.preventDefault();
|
|
1020
|
-
let n = t.split(
|
|
1094
|
+
let n = t.split(un), r = [...m];
|
|
1021
1095
|
for (let e of n) {
|
|
1022
1096
|
let t = e.trim();
|
|
1023
1097
|
t && !r.includes(t) && r.push(t);
|
|
1024
1098
|
}
|
|
1025
1099
|
c(r), g("");
|
|
1026
1100
|
}
|
|
1027
|
-
}, [m, c]), E =
|
|
1028
|
-
b.current?.focus(),
|
|
1029
|
-
}, []), D =
|
|
1030
|
-
C(),
|
|
1101
|
+
}, [m, c]), E = z(() => {
|
|
1102
|
+
b.current?.focus(), y(-1);
|
|
1103
|
+
}, []), D = z(() => {
|
|
1104
|
+
C(), y(-1), l();
|
|
1031
1105
|
}, [C, l]);
|
|
1032
|
-
return /* @__PURE__ */
|
|
1106
|
+
return /* @__PURE__ */ K(v, {
|
|
1033
1107
|
error: p,
|
|
1034
1108
|
helperText: i,
|
|
1035
|
-
label:
|
|
1109
|
+
label: n,
|
|
1036
1110
|
htmlFor: o,
|
|
1037
1111
|
isRequired: f,
|
|
1038
|
-
children: /* @__PURE__ */
|
|
1039
|
-
className:
|
|
1112
|
+
children: /* @__PURE__ */ q("div", {
|
|
1113
|
+
className: on,
|
|
1040
1114
|
"data-readonly": a,
|
|
1041
1115
|
onClick: E,
|
|
1042
|
-
children: [m.map((e, t) => /* @__PURE__ */
|
|
1043
|
-
className:
|
|
1116
|
+
children: [m.map((e, t) => /* @__PURE__ */ q("span", {
|
|
1117
|
+
className: sn,
|
|
1044
1118
|
"data-active": _ === t,
|
|
1045
|
-
children: [/* @__PURE__ */
|
|
1046
|
-
className:
|
|
1119
|
+
children: [/* @__PURE__ */ K("span", {
|
|
1120
|
+
className: cn,
|
|
1047
1121
|
children: e
|
|
1048
|
-
}), !a && /* @__PURE__ */
|
|
1122
|
+
}), !a && /* @__PURE__ */ K("button", {
|
|
1049
1123
|
type: "button",
|
|
1050
1124
|
className: "a22xph4",
|
|
1051
1125
|
onClick: (e) => {
|
|
@@ -1053,12 +1127,12 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1053
1127
|
},
|
|
1054
1128
|
"aria-label": `Remove ${e}`,
|
|
1055
1129
|
tabIndex: -1,
|
|
1056
|
-
children: /* @__PURE__ */
|
|
1130
|
+
children: /* @__PURE__ */ K(ke, { size: 12 })
|
|
1057
1131
|
})]
|
|
1058
|
-
}, `${e}-${t}`)), /* @__PURE__ */
|
|
1132
|
+
}, `${e}-${t}`)), /* @__PURE__ */ K("input", {
|
|
1059
1133
|
ref: x,
|
|
1060
1134
|
id: o,
|
|
1061
|
-
className:
|
|
1135
|
+
className: ln,
|
|
1062
1136
|
type: "text",
|
|
1063
1137
|
value: h,
|
|
1064
1138
|
onChange: (e) => g(e.target.value),
|
|
@@ -1072,91 +1146,91 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1072
1146
|
})]
|
|
1073
1147
|
})
|
|
1074
1148
|
});
|
|
1075
|
-
},
|
|
1149
|
+
}, fn = "jqes4z0", pn = "jqes4z2", mn = "jqes4z3", hn = "_1mrsmih0", gn = "_1mrsmih1", _n = "_1mrsmih2", vn = "_1mrsmih3", yn = (e) => {
|
|
1076
1150
|
let t = Z(8), n, r;
|
|
1077
1151
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1078
1152
|
let i;
|
|
1079
|
-
t[3] === n ? i = t[4] : (i = Q(
|
|
1153
|
+
t[3] === n ? i = t[4] : (i = Q(hn, n), t[3] = n, t[4] = i);
|
|
1080
1154
|
let a;
|
|
1081
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */
|
|
1155
|
+
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ K(Pe, {
|
|
1082
1156
|
"data-slot": "radio-group",
|
|
1083
1157
|
className: i,
|
|
1084
1158
|
...r
|
|
1085
1159
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
1086
|
-
},
|
|
1160
|
+
}, bn = (e) => {
|
|
1087
1161
|
let t = Z(9), n, r;
|
|
1088
1162
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1089
1163
|
let i;
|
|
1090
|
-
t[3] === n ? i = t[4] : (i = Q(
|
|
1164
|
+
t[3] === n ? i = t[4] : (i = Q(gn, n), t[3] = n, t[4] = i);
|
|
1091
1165
|
let a;
|
|
1092
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */
|
|
1166
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ K(Ne.Indicator, {
|
|
1093
1167
|
"data-slot": "radio-group-indicator",
|
|
1094
|
-
className:
|
|
1095
|
-
children: /* @__PURE__ */
|
|
1168
|
+
className: _n,
|
|
1169
|
+
children: /* @__PURE__ */ K("span", { className: vn })
|
|
1096
1170
|
}), t[5] = a) : a = t[5];
|
|
1097
1171
|
let o;
|
|
1098
|
-
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */
|
|
1172
|
+
return t[6] !== r || t[7] !== i ? (o = /* @__PURE__ */ K(Ne.Root, {
|
|
1099
1173
|
"data-slot": "radio-group-item",
|
|
1100
1174
|
className: i,
|
|
1101
1175
|
...r,
|
|
1102
1176
|
children: a
|
|
1103
1177
|
}), t[6] = r, t[7] = i, t[8] = o) : o = t[8], o;
|
|
1104
|
-
},
|
|
1105
|
-
let t = Z(53), { field:
|
|
1178
|
+
}, xn = (e) => {
|
|
1179
|
+
let t = Z(53), { field: n } = e, [i, a] = P.useState(""), [o, s] = P.useState(!1), { key: c, label: l, helper_text: u, readonly: d, values: f, options: p } = n, m = c === void 0 ? "" : c, h = l === void 0 ? "" : l, g = u === void 0 ? "" : u, y = d === void 0 ? !1 : d, b;
|
|
1106
1180
|
t[0] === f ? b = t[1] : (b = f === void 0 ? [] : f, t[0] = f, t[1] = b);
|
|
1107
1181
|
let x = b, S;
|
|
1108
1182
|
t[2] === p ? S = t[3] : (S = p === void 0 ? {} : p, t[2] = p, t[3] = S);
|
|
1109
1183
|
let { custom_input: C } = S, w = m, T;
|
|
1110
|
-
t[4] ===
|
|
1184
|
+
t[4] === n ? T = t[5] : (T = r(n), t[4] = n, t[5] = T);
|
|
1111
1185
|
let E;
|
|
1112
1186
|
t[6] !== w || t[7] !== T ? (E = {
|
|
1113
1187
|
name: w,
|
|
1114
1188
|
rules: T
|
|
1115
1189
|
}, t[6] = w, t[7] = T, t[8] = E) : E = t[8];
|
|
1116
|
-
let { field: D, fieldState: O } = $(E), k, A, j,
|
|
1117
|
-
t[9] === D ? (k = t[10], A = t[11], j = t[12],
|
|
1118
|
-
let F = !!
|
|
1119
|
-
t[14] !== o || t[15] !==
|
|
1120
|
-
o ||
|
|
1121
|
-
}, t[14] = o, t[15] =
|
|
1190
|
+
let { field: D, fieldState: O } = $(E), k, A, j, M;
|
|
1191
|
+
t[9] === D ? (k = t[10], A = t[11], j = t[12], M = t[13]) : ({value: M, onBlur: k, onChange: A, ...j} = D, t[9] = D, t[10] = k, t[11] = A, t[12] = j, t[13] = M);
|
|
1192
|
+
let F = !!n?.required, I = O?.error?.message, L;
|
|
1193
|
+
t[14] !== o || t[15] !== M || t[16] !== x ? (L = () => {
|
|
1194
|
+
o || M && x?.findIndex((e) => e === M) === -1 && (s(!0), a(M));
|
|
1195
|
+
}, t[14] = o, t[15] = M, t[16] = x, t[17] = L) : L = t[17];
|
|
1122
1196
|
let R;
|
|
1123
|
-
t[18] ===
|
|
1124
|
-
let z =
|
|
1125
|
-
t[20] === z ? B = t[21] : (B = Q(
|
|
1197
|
+
t[18] === M ? R = t[19] : (R = [M], t[18] = M, t[19] = R), P.useEffect(L, R);
|
|
1198
|
+
let z = y && "jqes4z1", B;
|
|
1199
|
+
t[20] === z ? B = t[21] : (B = Q(fn, z), t[20] = z, t[21] = B);
|
|
1126
1200
|
let V;
|
|
1127
1201
|
t[22] !== A || t[23] !== i ? (V = (e) => {
|
|
1128
1202
|
A && (e === "Other" ? (s(!0), A(i)) : (s(!1), A(e)));
|
|
1129
1203
|
}, t[22] = A, t[23] = i, t[24] = V) : V = t[24];
|
|
1130
1204
|
let H;
|
|
1131
1205
|
t[25] === k ? H = t[26] : (H = () => k(), t[25] = k, t[26] = H);
|
|
1132
|
-
let U = o ? "Other" :
|
|
1133
|
-
t[27] !== w || t[28] !== x ? (W = x?.map((e, t) => /* @__PURE__ */
|
|
1134
|
-
className:
|
|
1135
|
-
children: [/* @__PURE__ */
|
|
1206
|
+
let U = o ? "Other" : M ?? "", W;
|
|
1207
|
+
t[27] !== w || t[28] !== x ? (W = x?.map((e, t) => /* @__PURE__ */ q("div", {
|
|
1208
|
+
className: pn,
|
|
1209
|
+
children: [/* @__PURE__ */ K(bn, {
|
|
1136
1210
|
id: `${w}-${e}-${t}`,
|
|
1137
1211
|
value: e
|
|
1138
|
-
}), /* @__PURE__ */
|
|
1212
|
+
}), /* @__PURE__ */ K(_, {
|
|
1139
1213
|
htmlFor: `${w}-${e}-${t}`,
|
|
1140
|
-
className:
|
|
1214
|
+
className: mn,
|
|
1141
1215
|
children: e
|
|
1142
1216
|
})]
|
|
1143
1217
|
}, `${e}-${t}`)), t[27] = w, t[28] = x, t[29] = W) : W = t[29];
|
|
1144
|
-
let
|
|
1145
|
-
t[30] !== C || t[31] !== w || t[32] !== A || t[33] !== o || t[34] !== i ? (
|
|
1218
|
+
let G;
|
|
1219
|
+
t[30] !== C || t[31] !== w || t[32] !== A || t[33] !== o || t[34] !== i ? (G = !!C && /* @__PURE__ */ q("div", {
|
|
1146
1220
|
className: "jqes4z4",
|
|
1147
1221
|
children: [
|
|
1148
|
-
/* @__PURE__ */
|
|
1222
|
+
/* @__PURE__ */ K(bn, {
|
|
1149
1223
|
id: `${w}-other`,
|
|
1150
1224
|
value: "Other"
|
|
1151
1225
|
}),
|
|
1152
|
-
/* @__PURE__ */
|
|
1226
|
+
/* @__PURE__ */ K(_, {
|
|
1153
1227
|
className: "jqes4z3",
|
|
1154
1228
|
htmlFor: `${w}-other`,
|
|
1155
1229
|
children: "Other:"
|
|
1156
1230
|
}),
|
|
1157
|
-
/* @__PURE__ */
|
|
1231
|
+
/* @__PURE__ */ K("div", {
|
|
1158
1232
|
className: "jqes4z6",
|
|
1159
|
-
children: /* @__PURE__ */
|
|
1233
|
+
children: /* @__PURE__ */ K(N, {
|
|
1160
1234
|
className: "jqes4z5",
|
|
1161
1235
|
name: `radio-other-${w}`,
|
|
1162
1236
|
value: i,
|
|
@@ -1168,28 +1242,28 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1168
1242
|
})
|
|
1169
1243
|
})
|
|
1170
1244
|
]
|
|
1171
|
-
}), t[30] = C, t[31] = w, t[32] = A, t[33] = o, t[34] = i, t[35] =
|
|
1245
|
+
}), t[30] = C, t[31] = w, t[32] = A, t[33] = o, t[34] = i, t[35] = G) : G = t[35];
|
|
1172
1246
|
let J;
|
|
1173
|
-
t[36] !== w || t[37] !== j || t[38] !== B || t[39] !== V || t[40] !== H || t[41] !== U || t[42] !== W || t[43] !==
|
|
1247
|
+
t[36] !== w || t[37] !== j || t[38] !== B || t[39] !== V || t[40] !== H || t[41] !== U || t[42] !== W || t[43] !== G ? (J = /* @__PURE__ */ q(yn, {
|
|
1174
1248
|
id: w,
|
|
1175
1249
|
className: B,
|
|
1176
1250
|
onValueChange: V,
|
|
1177
1251
|
onBlur: H,
|
|
1178
1252
|
value: U,
|
|
1179
1253
|
...j,
|
|
1180
|
-
children: [W,
|
|
1181
|
-
}), t[36] = w, t[37] = j, t[38] = B, t[39] = V, t[40] = H, t[41] = U, t[42] = W, t[43] =
|
|
1254
|
+
children: [W, G]
|
|
1255
|
+
}), t[36] = w, t[37] = j, t[38] = B, t[39] = V, t[40] = H, t[41] = U, t[42] = W, t[43] = G, t[44] = J) : J = t[44];
|
|
1182
1256
|
let Y;
|
|
1183
|
-
return t[45] !== I || t[46] !==
|
|
1257
|
+
return t[45] !== I || t[46] !== g || t[47] !== F || t[48] !== h || t[49] !== w || t[50] !== y || t[51] !== J ? (Y = /* @__PURE__ */ K(v, {
|
|
1184
1258
|
error: I,
|
|
1185
|
-
helperText:
|
|
1186
|
-
readOnly:
|
|
1259
|
+
helperText: g,
|
|
1260
|
+
readOnly: y,
|
|
1187
1261
|
label: h,
|
|
1188
1262
|
htmlFor: w,
|
|
1189
1263
|
isRequired: F,
|
|
1190
1264
|
children: J
|
|
1191
|
-
}), t[45] = I, t[46] =
|
|
1192
|
-
},
|
|
1265
|
+
}), t[45] = I, t[46] = g, t[47] = F, t[48] = h, t[49] = w, t[50] = y, t[51] = J, t[52] = Y) : Y = t[52], Y;
|
|
1266
|
+
}, Sn = "i9l98i0", Cn = oe({
|
|
1193
1267
|
defaultClassName: "_193nrs70",
|
|
1194
1268
|
variantClassNames: { size: {
|
|
1195
1269
|
default: "_193nrs71",
|
|
@@ -1197,41 +1271,41 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1197
1271
|
} },
|
|
1198
1272
|
defaultVariants: { size: "default" },
|
|
1199
1273
|
compoundVariants: []
|
|
1200
|
-
}),
|
|
1274
|
+
}), wn = "_193nrs73", Tn = "_193nrs74", En = "_193nrs75", Dn = (e) => {
|
|
1201
1275
|
let t = Z(15), n, r, i;
|
|
1202
1276
|
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);
|
|
1203
1277
|
let a = i === void 0 ? "default" : i, o;
|
|
1204
|
-
t[4] !== n || t[5] !== a ? (o = Q(
|
|
1205
|
-
let s = a === "sm" ?
|
|
1206
|
-
t[7] === s ? c = t[8] : (c = Q(
|
|
1278
|
+
t[4] !== n || t[5] !== a ? (o = Q(Cn({ size: a }), n), t[4] = n, t[5] = a, t[6] = o) : o = t[6];
|
|
1279
|
+
let s = a === "sm" ? En : Tn, c;
|
|
1280
|
+
t[7] === s ? c = t[8] : (c = Q(wn, s), t[7] = s, t[8] = c);
|
|
1207
1281
|
let l;
|
|
1208
|
-
t[9] === c ? l = t[10] : (l = /* @__PURE__ */
|
|
1282
|
+
t[9] === c ? l = t[10] : (l = /* @__PURE__ */ K(Fe.Thumb, {
|
|
1209
1283
|
"data-slot": "switch-thumb",
|
|
1210
1284
|
className: c
|
|
1211
1285
|
}), t[9] = c, t[10] = l);
|
|
1212
1286
|
let u;
|
|
1213
|
-
return t[11] !== r || t[12] !== o || t[13] !== l ? (u = /* @__PURE__ */
|
|
1287
|
+
return t[11] !== r || t[12] !== o || t[13] !== l ? (u = /* @__PURE__ */ K(Fe.Root, {
|
|
1214
1288
|
"data-slot": "switch",
|
|
1215
1289
|
className: o,
|
|
1216
1290
|
...r,
|
|
1217
1291
|
children: l
|
|
1218
1292
|
}), t[11] = r, t[12] = o, t[13] = l, t[14] = u) : u = t[14], u;
|
|
1219
|
-
},
|
|
1220
|
-
let t = Z(32), { field:
|
|
1221
|
-
t[0] ===
|
|
1293
|
+
}, On = (e) => {
|
|
1294
|
+
let t = Z(32), { field: n } = e, { key: i, label: a, helper_text: o, readonly: s } = n, c = i === void 0 ? "" : i, l = a === void 0 ? "" : a, u = o === void 0 ? "" : o, d = s === void 0 ? !1 : s, f = c, p;
|
|
1295
|
+
t[0] === n ? p = t[1] : (p = r(n), t[0] = n, t[1] = p);
|
|
1222
1296
|
let m;
|
|
1223
1297
|
t[2] !== f || t[3] !== p ? (m = {
|
|
1224
1298
|
name: f,
|
|
1225
1299
|
rules: p
|
|
1226
1300
|
}, t[2] = f, t[3] = p, t[4] = m) : m = t[4];
|
|
1227
|
-
let { field: h, fieldState:
|
|
1228
|
-
t[5] === h ? (
|
|
1229
|
-
let C = !!
|
|
1301
|
+
let { field: h, fieldState: _ } = $(m), y, b, x, S;
|
|
1302
|
+
t[5] === h ? (y = t[6], b = t[7], x = t[8], S = t[9]) : ({value: S, onBlur: y, onChange: b, ...x} = h, t[5] = h, t[6] = y, t[7] = b, t[8] = x, t[9] = S);
|
|
1303
|
+
let C = !!n?.required, w = _?.error?.message, T = !!S, E;
|
|
1230
1304
|
t[10] === b ? E = t[11] : (E = (e) => b?.(e), t[10] = b, t[11] = E);
|
|
1231
1305
|
let D;
|
|
1232
|
-
t[12] ===
|
|
1306
|
+
t[12] === y ? D = t[13] : (D = () => y?.(), t[12] = y, t[13] = D);
|
|
1233
1307
|
let O;
|
|
1234
|
-
t[14] !== f || t[15] !== x || t[16] !== D || t[17] !== T || t[18] !== E ? (O = /* @__PURE__ */
|
|
1308
|
+
t[14] !== f || t[15] !== x || t[16] !== D || t[17] !== T || t[18] !== E ? (O = /* @__PURE__ */ K(Dn, {
|
|
1235
1309
|
id: f,
|
|
1236
1310
|
checked: T,
|
|
1237
1311
|
onCheckedChange: E,
|
|
@@ -1239,37 +1313,37 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1239
1313
|
...x
|
|
1240
1314
|
}), t[14] = f, t[15] = x, t[16] = D, t[17] = T, t[18] = E, t[19] = O) : O = t[19];
|
|
1241
1315
|
let k;
|
|
1242
|
-
t[20] !== C || t[21] !== l || t[22] !== f ? (k = /* @__PURE__ */
|
|
1316
|
+
t[20] !== C || t[21] !== l || t[22] !== f ? (k = /* @__PURE__ */ K(g, {
|
|
1243
1317
|
label: l,
|
|
1244
1318
|
isRequired: C,
|
|
1245
1319
|
htmlFor: f
|
|
1246
1320
|
}), t[20] = C, t[21] = l, t[22] = f, t[23] = k) : k = t[23];
|
|
1247
1321
|
let A;
|
|
1248
|
-
t[24] !== O || t[25] !== k ? (A = /* @__PURE__ */
|
|
1249
|
-
className:
|
|
1322
|
+
t[24] !== O || t[25] !== k ? (A = /* @__PURE__ */ q("div", {
|
|
1323
|
+
className: Sn,
|
|
1250
1324
|
children: [O, k]
|
|
1251
1325
|
}), t[24] = O, t[25] = k, t[26] = A) : A = t[26];
|
|
1252
1326
|
let j;
|
|
1253
|
-
return t[27] !== w || t[28] !== u || t[29] !== d || t[30] !== A ? (j = /* @__PURE__ */
|
|
1327
|
+
return t[27] !== w || t[28] !== u || t[29] !== d || t[30] !== A ? (j = /* @__PURE__ */ K(v, {
|
|
1254
1328
|
error: w,
|
|
1255
1329
|
helperText: u,
|
|
1256
1330
|
readOnly: d,
|
|
1257
1331
|
children: A
|
|
1258
1332
|
}), t[27] = w, t[28] = u, t[29] = d, t[30] = A, t[31] = j) : j = t[31], j;
|
|
1259
|
-
},
|
|
1260
|
-
let t = Z(29), { field:
|
|
1261
|
-
t[0] ===
|
|
1333
|
+
}, kn = "gaaqp00", An = (e) => {
|
|
1334
|
+
let t = Z(29), { field: n } = e, { key: i, label: a, helper_text: o, readonly: s } = n, c = i === void 0 ? "" : i, l = a === void 0 ? "" : a, u = o === void 0 ? "" : o, d = s === void 0 ? !1 : s, f = c, p = !!n?.required, m;
|
|
1335
|
+
t[0] === n ? m = t[1] : (m = r(n), t[0] = n, t[1] = m);
|
|
1262
1336
|
let h;
|
|
1263
1337
|
t[2] !== f || t[3] !== m ? (h = {
|
|
1264
1338
|
name: f,
|
|
1265
1339
|
rules: m
|
|
1266
1340
|
}, t[2] = f, t[3] = m, t[4] = h) : h = t[4];
|
|
1267
|
-
let { field: g, fieldState: _ } = $(h),
|
|
1268
|
-
t[5] === g ? (
|
|
1341
|
+
let { field: g, fieldState: _ } = $(h), y, b, x, S, C, w;
|
|
1342
|
+
t[5] === g ? (y = t[6], b = t[7], x = t[8], S = t[9], C = t[10], w = t[11]) : ({value: w, onBlur: b, onChange: x, ref: S, disabled: y, ...C} = g, t[5] = g, t[6] = y, t[7] = b, t[8] = x, t[9] = S, t[10] = C, t[11] = w);
|
|
1269
1343
|
let T = _?.error?.message, E;
|
|
1270
|
-
t[12] === Symbol.for("react.memo_cache_sentinel") ? (E = Q(
|
|
1344
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (E = Q(kn), t[12] = E) : E = t[12];
|
|
1271
1345
|
let D = w || "", O;
|
|
1272
|
-
t[13] !==
|
|
1346
|
+
t[13] !== y || t[14] !== f || t[15] !== b || t[16] !== x || t[17] !== d || t[18] !== S || t[19] !== C || t[20] !== D ? (O = /* @__PURE__ */ K(j, {
|
|
1273
1347
|
id: f,
|
|
1274
1348
|
className: E,
|
|
1275
1349
|
readOnly: d,
|
|
@@ -1277,11 +1351,11 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1277
1351
|
onChange: x,
|
|
1278
1352
|
onBlur: b,
|
|
1279
1353
|
ref: S,
|
|
1280
|
-
disabled:
|
|
1354
|
+
disabled: y,
|
|
1281
1355
|
...C
|
|
1282
|
-
}), t[13] =
|
|
1356
|
+
}), t[13] = y, t[14] = f, t[15] = b, t[16] = x, t[17] = d, t[18] = S, t[19] = C, t[20] = D, t[21] = O) : O = t[21];
|
|
1283
1357
|
let k;
|
|
1284
|
-
return t[22] !== T || t[23] !== u || t[24] !== p || t[25] !== l || t[26] !== f || t[27] !== O ? (k = /* @__PURE__ */
|
|
1358
|
+
return t[22] !== T || t[23] !== u || t[24] !== p || t[25] !== l || t[26] !== f || t[27] !== O ? (k = /* @__PURE__ */ K(v, {
|
|
1285
1359
|
error: T,
|
|
1286
1360
|
helperText: u,
|
|
1287
1361
|
label: l,
|
|
@@ -1289,22 +1363,22 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1289
1363
|
isRequired: p,
|
|
1290
1364
|
children: O
|
|
1291
1365
|
}), t[22] = T, t[23] = u, t[24] = p, t[25] = l, t[26] = f, t[27] = O, t[28] = k) : k = t[28], k;
|
|
1292
|
-
},
|
|
1293
|
-
let t = Z(36),
|
|
1294
|
-
t[0] === e ? (
|
|
1295
|
-
let { key: o, label: s, helper_text: c, readonly: l } =
|
|
1296
|
-
t[4] ===
|
|
1366
|
+
}, jn = (e) => {
|
|
1367
|
+
let t = Z(36), n, i, a;
|
|
1368
|
+
t[0] === e ? (n = t[1], i = t[2], a = t[3]) : ({field: n, inputStyles: a, ...i} = e, t[0] = e, t[1] = n, t[2] = i, t[3] = a);
|
|
1369
|
+
let { key: o, label: s, helper_text: c, readonly: l } = n, u = o === void 0 ? "" : o, d = s === void 0 ? "" : s, f = c === void 0 ? "" : c, p = l === void 0 ? !1 : l, m = u, h = !!n?.required, g;
|
|
1370
|
+
t[4] === n ? g = t[5] : (g = r(n), t[4] = n, t[5] = g);
|
|
1297
1371
|
let _;
|
|
1298
1372
|
t[6] !== m || t[7] !== g ? (_ = {
|
|
1299
1373
|
name: m,
|
|
1300
1374
|
rules: g
|
|
1301
1375
|
}, t[6] = m, t[7] = g, t[8] = _) : _ = t[8];
|
|
1302
|
-
let { field:
|
|
1303
|
-
t[9] ===
|
|
1376
|
+
let { field: y, fieldState: b } = $(_), x, S, C, w, T, E;
|
|
1377
|
+
t[9] === y ? (x = t[10], S = t[11], C = t[12], w = t[13], T = t[14], E = t[15]) : ({value: E, onBlur: S, onChange: C, ref: w, disabled: x, ...T} = y, t[9] = y, t[10] = x, t[11] = S, t[12] = C, t[13] = w, t[14] = T, t[15] = E);
|
|
1304
1378
|
let D = b?.error?.message, O;
|
|
1305
1379
|
t[16] === a ? O = t[17] : (O = Q(a), t[16] = a, t[17] = O);
|
|
1306
1380
|
let k = E || "", A;
|
|
1307
|
-
t[18] !== x || t[19] !== i || t[20] !== m || t[21] !== S || t[22] !== C || t[23] !== p || t[24] !== w || t[25] !== T || t[26] !== O || t[27] !== k ? (A = /* @__PURE__ */
|
|
1381
|
+
t[18] !== x || t[19] !== i || t[20] !== m || t[21] !== S || t[22] !== C || t[23] !== p || t[24] !== w || t[25] !== T || t[26] !== O || t[27] !== k ? (A = /* @__PURE__ */ K(N, {
|
|
1308
1382
|
id: m,
|
|
1309
1383
|
className: O,
|
|
1310
1384
|
readOnly: p,
|
|
@@ -1317,7 +1391,7 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1317
1391
|
...i
|
|
1318
1392
|
}), t[18] = x, t[19] = i, t[20] = m, t[21] = S, t[22] = C, t[23] = p, t[24] = w, t[25] = T, t[26] = O, t[27] = k, t[28] = A) : A = t[28];
|
|
1319
1393
|
let j;
|
|
1320
|
-
return t[29] !== D || t[30] !== f || t[31] !== h || t[32] !== d || t[33] !== m || t[34] !== A ? (j = /* @__PURE__ */
|
|
1394
|
+
return t[29] !== D || t[30] !== f || t[31] !== h || t[32] !== d || t[33] !== m || t[34] !== A ? (j = /* @__PURE__ */ K(v, {
|
|
1321
1395
|
error: D,
|
|
1322
1396
|
helperText: f,
|
|
1323
1397
|
label: d,
|
|
@@ -1325,18 +1399,18 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1325
1399
|
isRequired: h,
|
|
1326
1400
|
children: A
|
|
1327
1401
|
}), t[29] = D, t[30] = f, t[31] = h, t[32] = d, t[33] = m, t[34] = A, t[35] = j) : j = t[35], j;
|
|
1328
|
-
},
|
|
1329
|
-
let t = Z(27), { field:
|
|
1330
|
-
t[0] ===
|
|
1402
|
+
}, Mn = (e) => {
|
|
1403
|
+
let t = Z(27), { field: n } = e, { key: i, label: a, helper_text: o, readonly: s } = n, c = i === void 0 ? "" : i, l = a === void 0 ? "" : a, u = o === void 0 ? "" : o, d = s === void 0 ? !1 : s, f = c, p;
|
|
1404
|
+
t[0] === n ? p = t[1] : (p = r(n), t[0] = n, t[1] = p);
|
|
1331
1405
|
let m;
|
|
1332
1406
|
t[2] !== f || t[3] !== p ? (m = {
|
|
1333
1407
|
name: f,
|
|
1334
1408
|
rules: p
|
|
1335
1409
|
}, t[2] = f, t[3] = p, t[4] = m) : m = t[4];
|
|
1336
|
-
let { field: h, fieldState: g } = $(m), { value: _, onBlur:
|
|
1410
|
+
let { field: h, fieldState: g } = $(m), { value: _, onBlur: y, onChange: b, ref: x } = h, S = !!n?.required, C = g?.error?.message, w = _ || "", T;
|
|
1337
1411
|
t[5] === b ? T = t[6] : (T = (e) => b(e.target.value || null), t[5] = b, t[6] = T);
|
|
1338
1412
|
let E;
|
|
1339
|
-
t[7] !== b || t[8] !== d || t[9] !== _ ? (E = _ && !d ? /* @__PURE__ */
|
|
1413
|
+
t[7] !== b || t[8] !== d || t[9] !== _ ? (E = _ && !d ? /* @__PURE__ */ K("button", {
|
|
1340
1414
|
type: "button",
|
|
1341
1415
|
onClick: (e) => {
|
|
1342
1416
|
e.preventDefault(), e.stopPropagation(), b(null);
|
|
@@ -1349,21 +1423,21 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1349
1423
|
padding: 0
|
|
1350
1424
|
},
|
|
1351
1425
|
"aria-label": "Clear time",
|
|
1352
|
-
children: /* @__PURE__ */
|
|
1426
|
+
children: /* @__PURE__ */ K(ke, { size: 16 })
|
|
1353
1427
|
}) : void 0, t[7] = b, t[8] = d, t[9] = _, t[10] = E) : E = t[10];
|
|
1354
1428
|
let D;
|
|
1355
|
-
t[11] !== f || t[12] !==
|
|
1429
|
+
t[11] !== f || t[12] !== y || t[13] !== d || t[14] !== x || t[15] !== E || t[16] !== w || t[17] !== T ? (D = /* @__PURE__ */ K(N, {
|
|
1356
1430
|
id: f,
|
|
1357
1431
|
ref: x,
|
|
1358
1432
|
type: "time",
|
|
1359
1433
|
value: w,
|
|
1360
1434
|
onChange: T,
|
|
1361
|
-
onBlur:
|
|
1435
|
+
onBlur: y,
|
|
1362
1436
|
readOnly: d,
|
|
1363
1437
|
rightIcon: E
|
|
1364
|
-
}), t[11] = f, t[12] =
|
|
1438
|
+
}), t[11] = f, t[12] = y, t[13] = d, t[14] = x, t[15] = E, t[16] = w, t[17] = T, t[18] = D) : D = t[18];
|
|
1365
1439
|
let O;
|
|
1366
|
-
return t[19] !== C || t[20] !== u || t[21] !== S || t[22] !== l || t[23] !== f || t[24] !== d || t[25] !== D ? (O = /* @__PURE__ */
|
|
1440
|
+
return t[19] !== C || t[20] !== u || t[21] !== S || t[22] !== l || t[23] !== f || t[24] !== d || t[25] !== D ? (O = /* @__PURE__ */ K(v, {
|
|
1367
1441
|
helperText: u,
|
|
1368
1442
|
readOnly: d,
|
|
1369
1443
|
error: C,
|
|
@@ -1372,50 +1446,50 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1372
1446
|
label: l,
|
|
1373
1447
|
children: D
|
|
1374
1448
|
}), t[19] = C, t[20] = u, t[21] = S, t[22] = l, t[23] = f, t[24] = d, t[25] = D, t[26] = O) : O = t[26], O;
|
|
1375
|
-
},
|
|
1376
|
-
let t = Z(28), { field:
|
|
1377
|
-
t[0] ===
|
|
1449
|
+
}, Nn = "_3j2y9l0", Pn = (e) => {
|
|
1450
|
+
let t = Z(28), { field: n } = e, { key: i, label: a, helper_text: o, readonly: s } = n, c = i === void 0 ? "" : i, l = a === void 0 ? "" : a, u = o === void 0 ? "" : o, d = s === void 0 ? !1 : s, f;
|
|
1451
|
+
t[0] === n ? f = t[1] : (f = r(n), t[0] = n, t[1] = f);
|
|
1378
1452
|
let p;
|
|
1379
1453
|
t[2] !== c || t[3] !== f ? (p = {
|
|
1380
1454
|
name: c,
|
|
1381
1455
|
rules: f
|
|
1382
1456
|
}, t[2] = c, t[3] = f, t[4] = p) : p = t[4];
|
|
1383
|
-
let { field: m, fieldState: h } = $(p), { name:
|
|
1457
|
+
let { field: m, fieldState: h } = $(p), { name: g, onBlur: y, onChange: b, ref: x, value: S, disabled: C } = m, { error: w } = h, T = w?.message, E = !!S, D;
|
|
1384
1458
|
t[5] === b ? D = t[6] : (D = (e) => b(e), t[5] = b, t[6] = D);
|
|
1385
1459
|
let O;
|
|
1386
|
-
t[7] ===
|
|
1460
|
+
t[7] === y ? O = t[8] : (O = () => y(), t[7] = y, t[8] = O);
|
|
1387
1461
|
let k;
|
|
1388
|
-
t[9] !== C || t[10] !==
|
|
1389
|
-
id:
|
|
1390
|
-
name:
|
|
1462
|
+
t[9] !== C || t[10] !== g || t[11] !== E || t[12] !== D || t[13] !== O ? (k = /* @__PURE__ */ K(zt, {
|
|
1463
|
+
id: g,
|
|
1464
|
+
name: g,
|
|
1391
1465
|
checked: E,
|
|
1392
1466
|
onCheckedChange: D,
|
|
1393
1467
|
onBlur: O,
|
|
1394
1468
|
disabled: C
|
|
1395
|
-
}), t[9] = C, t[10] =
|
|
1469
|
+
}), t[9] = C, t[10] = g, t[11] = E, t[12] = D, t[13] = O, t[14] = k) : k = t[14];
|
|
1396
1470
|
let A;
|
|
1397
|
-
t[15] !==
|
|
1398
|
-
htmlFor:
|
|
1471
|
+
t[15] !== n.required || t[16] !== l || t[17] !== g ? (A = l && /* @__PURE__ */ q(_, {
|
|
1472
|
+
htmlFor: g,
|
|
1399
1473
|
className: "_3j2y9l1",
|
|
1400
|
-
children: [l,
|
|
1474
|
+
children: [l, n?.required && /* @__PURE__ */ K("span", {
|
|
1401
1475
|
className: "_1ompjs10",
|
|
1402
1476
|
children: "*"
|
|
1403
1477
|
})]
|
|
1404
|
-
}), t[15] =
|
|
1478
|
+
}), t[15] = n.required, t[16] = l, t[17] = g, t[18] = A) : A = t[18];
|
|
1405
1479
|
let j;
|
|
1406
|
-
t[19] !== x || t[20] !== k || t[21] !== A ? (j = /* @__PURE__ */
|
|
1407
|
-
className:
|
|
1480
|
+
t[19] !== x || t[20] !== k || t[21] !== A ? (j = /* @__PURE__ */ q("div", {
|
|
1481
|
+
className: Nn,
|
|
1408
1482
|
ref: x,
|
|
1409
1483
|
children: [k, A]
|
|
1410
1484
|
}), t[19] = x, t[20] = k, t[21] = A, t[22] = j) : j = t[22];
|
|
1411
1485
|
let M;
|
|
1412
|
-
return t[23] !== u || t[24] !== d || t[25] !== j || t[26] !== T ? (M = /* @__PURE__ */
|
|
1486
|
+
return t[23] !== u || t[24] !== d || t[25] !== j || t[26] !== T ? (M = /* @__PURE__ */ K(v, {
|
|
1413
1487
|
error: T,
|
|
1414
1488
|
helperText: u,
|
|
1415
1489
|
readOnly: d,
|
|
1416
1490
|
children: j
|
|
1417
1491
|
}), t[23] = u, t[24] = d, t[25] = j, t[26] = T, t[27] = M) : M = t[27], M;
|
|
1418
|
-
},
|
|
1492
|
+
}, Fn = "_11lzwkh0", In = "_11lzwkh2", Ln = "_11lzwkh3", Rn = "_11lzwkh4", zn = "_11lzwkh5", Bn = "_11lzwkh9", Vn = "_11lzwkha", Hn = (e) => {
|
|
1419
1493
|
let t = Z(31), { file: n, onDelete: r, onClick: i, showCheckbox: a, isSelected: o, showDelete: s } = e, c = a === void 0 ? !1 : a, l = o === void 0 ? !1 : o, u = s === void 0 ? !0 : s, d;
|
|
1420
1494
|
t[0] !== n || t[1] !== r ? (d = (e) => {
|
|
1421
1495
|
e.stopPropagation(), e.preventDefault(), r?.(n.id);
|
|
@@ -1428,49 +1502,49 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1428
1502
|
}
|
|
1429
1503
|
n?.location || e.preventDefault();
|
|
1430
1504
|
}, t[3] = n, t[4] = i, t[5] = p) : p = t[5];
|
|
1431
|
-
let m = p,
|
|
1432
|
-
t[6] !== n?.filename || t[7] !== n?.location ? (
|
|
1433
|
-
let
|
|
1434
|
-
t[9] ===
|
|
1505
|
+
let m = p, h;
|
|
1506
|
+
t[6] !== n?.filename || t[7] !== n?.location ? (h = n?.filename || n?.location?.split("/")?.[n?.location?.split("/").length - 1], t[6] = n?.filename, t[7] = n?.location, t[8] = h) : h = t[8];
|
|
1507
|
+
let g = h, _ = n?.location || void 0, v = l && "_11lzwkh1", b;
|
|
1508
|
+
t[9] === v ? b = t[10] : (b = Q(Fn, v), t[9] = v, t[10] = b);
|
|
1435
1509
|
let x;
|
|
1436
|
-
t[11] !== n?.kind || t[12] !== n?.location ? (x = n?.kind === "image" ? /* @__PURE__ */
|
|
1510
|
+
t[11] !== n?.kind || t[12] !== n?.location ? (x = n?.kind === "image" ? /* @__PURE__ */ K("img", {
|
|
1437
1511
|
alt: "uploaded-file-icon",
|
|
1438
|
-
className:
|
|
1512
|
+
className: Rn,
|
|
1439
1513
|
src: n?.location
|
|
1440
|
-
}) : /* @__PURE__ */
|
|
1441
|
-
className:
|
|
1442
|
-
children: /* @__PURE__ */
|
|
1514
|
+
}) : /* @__PURE__ */ K("div", {
|
|
1515
|
+
className: In,
|
|
1516
|
+
children: /* @__PURE__ */ K(Se, {
|
|
1443
1517
|
size: 60,
|
|
1444
|
-
className:
|
|
1518
|
+
className: Ln
|
|
1445
1519
|
})
|
|
1446
1520
|
}), t[11] = n?.kind, t[12] = n?.location, t[13] = x) : x = t[13];
|
|
1447
1521
|
let S;
|
|
1448
|
-
t[14] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */
|
|
1522
|
+
t[14] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ K("div", { className: zn }), t[14] = S) : S = t[14];
|
|
1449
1523
|
let C;
|
|
1450
|
-
t[15] !== l || t[16] !== c ? (C = c && /* @__PURE__ */
|
|
1524
|
+
t[15] !== l || t[16] !== c ? (C = c && /* @__PURE__ */ K("div", {
|
|
1451
1525
|
className: "_11lzwkh8",
|
|
1452
|
-
onClick:
|
|
1453
|
-
children: /* @__PURE__ */
|
|
1526
|
+
onClick: Un,
|
|
1527
|
+
children: /* @__PURE__ */ K(zt, { checked: l })
|
|
1454
1528
|
}), t[15] = l, t[16] = c, t[17] = C) : C = t[17];
|
|
1455
1529
|
let w;
|
|
1456
|
-
t[18] !== f || t[19] !== u ? (w = u && /* @__PURE__ */
|
|
1530
|
+
t[18] !== f || t[19] !== u ? (w = u && /* @__PURE__ */ K(y, {
|
|
1457
1531
|
className: "_11lzwkh6",
|
|
1458
1532
|
size: "sm",
|
|
1459
1533
|
variant: "secondary",
|
|
1460
1534
|
onClick: f,
|
|
1461
|
-
children: /* @__PURE__ */
|
|
1535
|
+
children: /* @__PURE__ */ K(ke, { className: "_11lzwkh7" })
|
|
1462
1536
|
}), t[18] = f, t[19] = u, t[20] = w) : w = t[20];
|
|
1463
1537
|
let T;
|
|
1464
|
-
t[21] ===
|
|
1465
|
-
className:
|
|
1466
|
-
children: /* @__PURE__ */
|
|
1467
|
-
className:
|
|
1468
|
-
children:
|
|
1538
|
+
t[21] === g ? T = t[22] : (T = /* @__PURE__ */ K("div", {
|
|
1539
|
+
className: Bn,
|
|
1540
|
+
children: /* @__PURE__ */ K("p", {
|
|
1541
|
+
className: Vn,
|
|
1542
|
+
children: g
|
|
1469
1543
|
})
|
|
1470
|
-
}), t[21] =
|
|
1544
|
+
}), t[21] = g, t[22] = T);
|
|
1471
1545
|
let E;
|
|
1472
|
-
return t[23] !== m || t[24] !== x || t[25] !== C || t[26] !== w || t[27] !== T || t[28] !==
|
|
1473
|
-
href:
|
|
1546
|
+
return t[23] !== m || t[24] !== x || t[25] !== C || t[26] !== w || t[27] !== T || t[28] !== _ || t[29] !== b ? (E = /* @__PURE__ */ q("a", {
|
|
1547
|
+
href: _,
|
|
1474
1548
|
target: "_blank",
|
|
1475
1549
|
rel: "noopener noreferrer",
|
|
1476
1550
|
className: b,
|
|
@@ -1482,26 +1556,26 @@ var Be = ((e) => (t) => t ? ze(e, t) : e)({
|
|
|
1482
1556
|
w,
|
|
1483
1557
|
T
|
|
1484
1558
|
]
|
|
1485
|
-
}), t[23] = m, t[24] = x, t[25] = C, t[26] = w, t[27] = T, t[28] =
|
|
1559
|
+
}), t[23] = m, t[24] = x, t[25] = C, t[26] = w, t[27] = T, t[28] = _, t[29] = b, t[30] = E) : E = t[30], E;
|
|
1486
1560
|
};
|
|
1487
|
-
function
|
|
1561
|
+
function Un(e) {
|
|
1488
1562
|
e.preventDefault(), e.stopPropagation();
|
|
1489
1563
|
}
|
|
1490
1564
|
//#endregion
|
|
1491
1565
|
//#region ../../libraries/react-collection/dist/widgets/uploadWidget/modal/FileUploadModal.cssm.js
|
|
1492
|
-
var
|
|
1566
|
+
var Wn = "vwpjhx0", Gn = "vwpjhx1", Kn = "vwpjhx2", qn = "vwpjhx5", Jn = "vwpjhx6", Yn = "vwpjhxb", Xn = (e) => {
|
|
1493
1567
|
let t = Z(57), { isOpen: n, setIsOpen: r, files: i, kind: a, allowedExtensions: o, isMultiple: s, isLoading: c, handleUploadFiles: l, handleChange: u } = e, d;
|
|
1494
1568
|
t[0] === r ? d = t[1] : (d = () => r(!1), t[0] = r, t[1] = d);
|
|
1495
1569
|
let f = d, p = i.length, m;
|
|
1496
1570
|
bb0: {
|
|
1497
1571
|
let e;
|
|
1498
1572
|
if (t[2] !== o || t[3] !== a) {
|
|
1499
|
-
let n = a.reduce(
|
|
1573
|
+
let n = a.reduce(Zn, {});
|
|
1500
1574
|
if (!o || o.length === 0) {
|
|
1501
1575
|
m = n;
|
|
1502
1576
|
break bb0;
|
|
1503
1577
|
}
|
|
1504
|
-
let r = o.map(
|
|
1578
|
+
let r = o.map(Qn);
|
|
1505
1579
|
e = {};
|
|
1506
1580
|
for (let [t, i] of Object.entries(n)) {
|
|
1507
1581
|
let n = i.filter((e) => r.includes(e));
|
|
@@ -1511,51 +1585,51 @@ var Un = "vwpjhx0", Wn = "vwpjhx1", Gn = "vwpjhx2", Kn = "vwpjhx5", qn = "vwpjhx
|
|
|
1511
1585
|
} else e = t[4], m = t[5];
|
|
1512
1586
|
m = e;
|
|
1513
1587
|
}
|
|
1514
|
-
let
|
|
1515
|
-
t[6] === l ?
|
|
1588
|
+
let h = m, g;
|
|
1589
|
+
t[6] === l ? g = t[7] : (g = (e) => {
|
|
1516
1590
|
if (e.length === 0) {
|
|
1517
|
-
|
|
1591
|
+
ne("No file selected. Please select one file.");
|
|
1518
1592
|
return;
|
|
1519
1593
|
}
|
|
1520
1594
|
l(e);
|
|
1521
|
-
}, t[6] = l, t[7] =
|
|
1522
|
-
let
|
|
1523
|
-
t[8] !==
|
|
1524
|
-
onDrop:
|
|
1525
|
-
accept:
|
|
1595
|
+
}, t[6] = l, t[7] = g);
|
|
1596
|
+
let _ = g, v;
|
|
1597
|
+
t[8] !== h || t[9] !== c || t[10] !== s || t[11] !== _ ? (v = {
|
|
1598
|
+
onDrop: _,
|
|
1599
|
+
accept: h,
|
|
1526
1600
|
multiple: s,
|
|
1527
1601
|
maxSize: 26214400,
|
|
1528
1602
|
disabled: c,
|
|
1529
|
-
onDropRejected:
|
|
1530
|
-
}, t[8] =
|
|
1531
|
-
let { getRootProps: E, getInputProps: D, isDragActive: O } =
|
|
1532
|
-
t[13] === Symbol.for("react.memo_cache_sentinel") ? (k = Q(
|
|
1603
|
+
onDropRejected: er
|
|
1604
|
+
}, t[8] = h, t[9] = c, t[10] = s, t[11] = _, t[12] = v) : v = t[12];
|
|
1605
|
+
let { getRootProps: E, getInputProps: D, isDragActive: O } = Ie(v), k;
|
|
1606
|
+
t[13] === Symbol.for("react.memo_cache_sentinel") ? (k = Q(Wn, C), t[13] = k) : k = t[13];
|
|
1533
1607
|
let A = a?.length > 1 ? "Upload file" : `Upload ${a?.[0]}`, j;
|
|
1534
|
-
t[14] === A ? j = t[15] : (j = /* @__PURE__ */
|
|
1608
|
+
t[14] === A ? j = t[15] : (j = /* @__PURE__ */ K(S, { children: /* @__PURE__ */ K(x, { children: A }) }), t[14] = A, t[15] = j);
|
|
1535
1609
|
let M = c && "vwpjhx3", N;
|
|
1536
|
-
t[16] === M ? N = t[17] : (N = Q(
|
|
1610
|
+
t[16] === M ? N = t[17] : (N = Q(Kn, M), t[16] = M, t[17] = N);
|
|
1537
1611
|
let P;
|
|
1538
1612
|
t[18] === E ? P = t[19] : (P = E(), t[18] = E, t[19] = P);
|
|
1539
1613
|
let F;
|
|
1540
|
-
t[20] === c ? F = t[21] : (F = c && /* @__PURE__ */
|
|
1614
|
+
t[20] === c ? F = t[21] : (F = c && /* @__PURE__ */ K("div", {
|
|
1541
1615
|
className: "vwpjhx4",
|
|
1542
|
-
children: /* @__PURE__ */
|
|
1616
|
+
children: /* @__PURE__ */ K(T, {})
|
|
1543
1617
|
}), t[20] = c, t[21] = F);
|
|
1544
1618
|
let I = O ? "Drop your files here..." : s && i.length > 0 ? "Drag & Drop here to upload more!" : i?.length > 0 ? "Drag & Drop here to upload another file!" : "Drag & Drop here to upload file!", L;
|
|
1545
|
-
t[22] === I ? L = t[23] : (L = /* @__PURE__ */
|
|
1546
|
-
className:
|
|
1619
|
+
t[22] === I ? L = t[23] : (L = /* @__PURE__ */ K("p", {
|
|
1620
|
+
className: qn,
|
|
1547
1621
|
children: I
|
|
1548
1622
|
}), t[22] = I, t[23] = L);
|
|
1549
1623
|
let R = c && "vwpjhx7", z;
|
|
1550
|
-
t[24] === R ? z = t[25] : (z = Q(
|
|
1624
|
+
t[24] === R ? z = t[25] : (z = Q(Jn, R), t[24] = R, t[25] = z);
|
|
1551
1625
|
let B;
|
|
1552
1626
|
t[26] === D ? B = t[27] : (B = D(), t[26] = D, t[27] = B);
|
|
1553
1627
|
let V;
|
|
1554
|
-
t[28] === B ? V = t[29] : (V = /* @__PURE__ */
|
|
1628
|
+
t[28] === B ? V = t[29] : (V = /* @__PURE__ */ K("input", { ...B }), t[28] = B, t[29] = V);
|
|
1555
1629
|
let H;
|
|
1556
|
-
t[30] === Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */
|
|
1630
|
+
t[30] === Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ K(Oe, { size: 14 }), t[30] = H) : H = t[30];
|
|
1557
1631
|
let U;
|
|
1558
|
-
t[31] === V ? U = t[32] : (U = /* @__PURE__ */
|
|
1632
|
+
t[31] === V ? U = t[32] : (U = /* @__PURE__ */ q(y, {
|
|
1559
1633
|
variant: "ghost",
|
|
1560
1634
|
size: "sm",
|
|
1561
1635
|
children: [
|
|
@@ -1565,14 +1639,14 @@ var Un = "vwpjhx0", Wn = "vwpjhx1", Gn = "vwpjhx2", Kn = "vwpjhx5", qn = "vwpjhx
|
|
|
1565
1639
|
]
|
|
1566
1640
|
}), t[31] = V, t[32] = U);
|
|
1567
1641
|
let W;
|
|
1568
|
-
t[33] !== z || t[34] !== U ? (W = /* @__PURE__ */
|
|
1642
|
+
t[33] !== z || t[34] !== U ? (W = /* @__PURE__ */ K("div", {
|
|
1569
1643
|
className: z,
|
|
1570
1644
|
children: U
|
|
1571
1645
|
}), t[33] = z, t[34] = U, t[35] = W) : W = t[35];
|
|
1572
|
-
let
|
|
1573
|
-
t[36] !== P || t[37] !== F || t[38] !== L || t[39] !== W || t[40] !== N ? (
|
|
1574
|
-
className:
|
|
1575
|
-
children: /* @__PURE__ */
|
|
1646
|
+
let G;
|
|
1647
|
+
t[36] !== P || t[37] !== F || t[38] !== L || t[39] !== W || t[40] !== N ? (G = /* @__PURE__ */ K("div", {
|
|
1648
|
+
className: Gn,
|
|
1649
|
+
children: /* @__PURE__ */ q("div", {
|
|
1576
1650
|
className: N,
|
|
1577
1651
|
...P,
|
|
1578
1652
|
children: [
|
|
@@ -1581,16 +1655,16 @@ var Un = "vwpjhx0", Wn = "vwpjhx1", Gn = "vwpjhx2", Kn = "vwpjhx5", qn = "vwpjhx
|
|
|
1581
1655
|
W
|
|
1582
1656
|
]
|
|
1583
1657
|
})
|
|
1584
|
-
}), t[36] = P, t[37] = F, t[38] = L, t[39] = W, t[40] = N, t[41] =
|
|
1658
|
+
}), t[36] = P, t[37] = F, t[38] = L, t[39] = W, t[40] = N, t[41] = G) : G = t[41];
|
|
1585
1659
|
let J;
|
|
1586
|
-
t[42] !== i || t[43] !== u ? (J = i.length > 0 && /* @__PURE__ */
|
|
1660
|
+
t[42] !== i || t[43] !== u ? (J = i.length > 0 && /* @__PURE__ */ q("div", {
|
|
1587
1661
|
className: "vwpjhx8",
|
|
1588
|
-
children: [/* @__PURE__ */
|
|
1662
|
+
children: [/* @__PURE__ */ K("h3", {
|
|
1589
1663
|
className: "vwpjhx9",
|
|
1590
1664
|
children: "Selected Files"
|
|
1591
|
-
}), /* @__PURE__ */
|
|
1665
|
+
}), /* @__PURE__ */ K("div", {
|
|
1592
1666
|
className: "vwpjhxa",
|
|
1593
|
-
children: i.map((e) => /* @__PURE__ */
|
|
1667
|
+
children: i.map((e) => /* @__PURE__ */ K(Hn, {
|
|
1594
1668
|
file: e,
|
|
1595
1669
|
onDelete: (e) => {
|
|
1596
1670
|
u(i.filter((t) => t.id !== e));
|
|
@@ -1599,58 +1673,58 @@ var Un = "vwpjhx0", Wn = "vwpjhx1", Gn = "vwpjhx2", Kn = "vwpjhx5", qn = "vwpjhx
|
|
|
1599
1673
|
})]
|
|
1600
1674
|
}), t[42] = i, t[43] = u, t[44] = J) : J = t[44];
|
|
1601
1675
|
let Y = p === 1 ? `${p} file` : `${p} files`, X;
|
|
1602
|
-
t[45] !== f || t[46] !== Y ? (X = /* @__PURE__ */
|
|
1603
|
-
className:
|
|
1604
|
-
children: /* @__PURE__ */
|
|
1676
|
+
t[45] !== f || t[46] !== Y ? (X = /* @__PURE__ */ K("div", {
|
|
1677
|
+
className: Yn,
|
|
1678
|
+
children: /* @__PURE__ */ q(y, {
|
|
1605
1679
|
variant: "default",
|
|
1606
1680
|
onClick: f,
|
|
1607
1681
|
children: ["Save\xA0", Y]
|
|
1608
1682
|
})
|
|
1609
1683
|
}), t[45] = f, t[46] = Y, t[47] = X) : X = t[47];
|
|
1610
1684
|
let ee;
|
|
1611
|
-
t[48] !==
|
|
1685
|
+
t[48] !== G || t[49] !== J || t[50] !== X || t[51] !== j ? (ee = /* @__PURE__ */ q(w, {
|
|
1612
1686
|
className: k,
|
|
1613
1687
|
children: [
|
|
1614
1688
|
j,
|
|
1615
|
-
|
|
1689
|
+
G,
|
|
1616
1690
|
J,
|
|
1617
1691
|
X
|
|
1618
1692
|
]
|
|
1619
|
-
}), t[48] =
|
|
1620
|
-
let
|
|
1621
|
-
return t[53] !== n || t[54] !== r || t[55] !== ee ? (
|
|
1693
|
+
}), t[48] = G, t[49] = J, t[50] = X, t[51] = j, t[52] = ee) : ee = t[52];
|
|
1694
|
+
let te;
|
|
1695
|
+
return t[53] !== n || t[54] !== r || t[55] !== ee ? (te = /* @__PURE__ */ K(b, {
|
|
1622
1696
|
open: n,
|
|
1623
1697
|
onOpenChange: r,
|
|
1624
1698
|
children: ee
|
|
1625
|
-
}), t[53] = n, t[54] = r, t[55] = ee, t[56] =
|
|
1699
|
+
}), t[53] = n, t[54] = r, t[55] = ee, t[56] = te) : te = t[56], te;
|
|
1626
1700
|
};
|
|
1627
|
-
function
|
|
1701
|
+
function Zn(e, t) {
|
|
1628
1702
|
return {
|
|
1629
1703
|
...e,
|
|
1630
|
-
...
|
|
1704
|
+
...re[t]
|
|
1631
1705
|
};
|
|
1632
1706
|
}
|
|
1633
|
-
function
|
|
1707
|
+
function Qn(e) {
|
|
1634
1708
|
return `.${e}`;
|
|
1635
1709
|
}
|
|
1636
|
-
function
|
|
1710
|
+
function $n(e) {
|
|
1637
1711
|
e.errors.forEach((t) => {
|
|
1638
|
-
t.code === "file-too-large" &&
|
|
1712
|
+
t.code === "file-too-large" && ne(`${e.file.name} is bigger than 25MB`);
|
|
1639
1713
|
});
|
|
1640
1714
|
}
|
|
1641
|
-
function
|
|
1642
|
-
e.forEach(
|
|
1715
|
+
function er(e) {
|
|
1716
|
+
e.forEach($n);
|
|
1643
1717
|
}
|
|
1644
1718
|
//#endregion
|
|
1645
1719
|
//#region ../../libraries/react-collection/dist/widgets/uploadWidget/UploadWidget.cssm.js
|
|
1646
|
-
var
|
|
1647
|
-
let o = e.options?.allowed_upload_types, s = o && o.length > 0 ?
|
|
1720
|
+
var tr = "_156u72w0", nr = "_156u72w1", rr = (e) => Array.isArray(e) && e.every((e) => typeof e == "object" && !!e && "location" in e), ir = ({ field: e, schema: t, kind: n = X, isMultiple: i, uploadContext: a }) => {
|
|
1721
|
+
let o = e.options?.allowed_upload_types, s = o && o.length > 0 ? n.filter((e) => o.includes(e)) : null, c = s && s.length > 0 ? s : n, [l, u] = W(!1), [f, p] = W(!1), { media: m } = ae(), { field: { onChange: h, value: g, onBlur: _, disabled: b, ref: x }, fieldState: S } = $({
|
|
1648
1722
|
name: e?.key || "",
|
|
1649
|
-
rules:
|
|
1650
|
-
}), C = e.options?.allowed_extensions, w =
|
|
1651
|
-
let e = c.flatMap((e) =>
|
|
1723
|
+
rules: r(e)
|
|
1724
|
+
}), C = e.options?.allowed_extensions, w = H(() => {
|
|
1725
|
+
let e = c.flatMap((e) => d[e]);
|
|
1652
1726
|
return C && C.length > 0 ? e.filter((e) => C.includes(e)) : e;
|
|
1653
|
-
}, [c, C]), E = Array.isArray(
|
|
1727
|
+
}, [c, C]), E = Array.isArray(g) ? g : g ? [g] : [], D = a ?? (t?.key ? {
|
|
1654
1728
|
module: "collection",
|
|
1655
1729
|
identifier: t.key
|
|
1656
1730
|
} : void 0), O = D ? {
|
|
@@ -1658,7 +1732,7 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1658
1732
|
field_key: e.key || void 0,
|
|
1659
1733
|
field_label: e.label || void 0
|
|
1660
1734
|
} : void 0, k = (e) => {
|
|
1661
|
-
|
|
1735
|
+
h(i ? e : e?.[0]);
|
|
1662
1736
|
}, A = async (e) => {
|
|
1663
1737
|
let t = new FormData(), n = i ? e : e.slice(0, 1);
|
|
1664
1738
|
if (n.length !== 0) {
|
|
@@ -1668,38 +1742,38 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1668
1742
|
}), p(!0);
|
|
1669
1743
|
try {
|
|
1670
1744
|
let e = await m?.mediaBulkUpload(t, {}, O);
|
|
1671
|
-
if (e?.content?.data &&
|
|
1745
|
+
if (e?.content?.data && rr(e.content.data)) {
|
|
1672
1746
|
let t = e.content.data;
|
|
1673
1747
|
k(i ? [...E, ...t] : t);
|
|
1674
1748
|
}
|
|
1675
1749
|
} catch (e) {
|
|
1676
|
-
|
|
1750
|
+
te(e);
|
|
1677
1751
|
} finally {
|
|
1678
1752
|
p(!1);
|
|
1679
1753
|
}
|
|
1680
1754
|
}
|
|
1681
|
-
}, { label: j = "", helper_text:
|
|
1682
|
-
return /* @__PURE__ */
|
|
1755
|
+
}, { label: j = "", helper_text: M = "", readonly: P = !1 } = e;
|
|
1756
|
+
return /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ q(v, {
|
|
1683
1757
|
error: S?.error?.message,
|
|
1684
|
-
helperText:
|
|
1758
|
+
helperText: M,
|
|
1685
1759
|
readOnly: P,
|
|
1686
1760
|
htmlFor: e.key,
|
|
1687
1761
|
isRequired: e?.required,
|
|
1688
1762
|
label: j,
|
|
1689
|
-
children: [/* @__PURE__ */
|
|
1690
|
-
className:
|
|
1763
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1764
|
+
className: tr,
|
|
1691
1765
|
ref: x,
|
|
1692
|
-
children: [/* @__PURE__ */
|
|
1766
|
+
children: [/* @__PURE__ */ K(y, {
|
|
1693
1767
|
size: "icon",
|
|
1694
1768
|
variant: "outline",
|
|
1695
1769
|
disabled: b || P,
|
|
1696
|
-
onClick: () =>
|
|
1697
|
-
className:
|
|
1698
|
-
children: /* @__PURE__ */
|
|
1699
|
-
}), /* @__PURE__ */
|
|
1770
|
+
onClick: () => u(!0),
|
|
1771
|
+
className: nr,
|
|
1772
|
+
children: /* @__PURE__ */ K(Oe, { size: 15 })
|
|
1773
|
+
}), /* @__PURE__ */ K(N, {
|
|
1700
1774
|
name: "pasteUrl",
|
|
1701
1775
|
placeholder: "Paste your files here...",
|
|
1702
|
-
onBlur: () =>
|
|
1776
|
+
onBlur: () => _(),
|
|
1703
1777
|
onPaste: (e) => {
|
|
1704
1778
|
let t = [];
|
|
1705
1779
|
Array.from(e.clipboardData.items).forEach((e) => {
|
|
@@ -1711,13 +1785,13 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1711
1785
|
},
|
|
1712
1786
|
disabled: b,
|
|
1713
1787
|
readOnly: P,
|
|
1714
|
-
rightIcon: f ? /* @__PURE__ */
|
|
1788
|
+
rightIcon: f ? /* @__PURE__ */ K(T, { size: 16 }) : void 0
|
|
1715
1789
|
})]
|
|
1716
|
-
}), E.length > 0 && /* @__PURE__ */
|
|
1790
|
+
}), E.length > 0 && /* @__PURE__ */ K("div", {
|
|
1717
1791
|
className: "_156u72w2",
|
|
1718
|
-
children: /* @__PURE__ */
|
|
1792
|
+
children: /* @__PURE__ */ K("div", {
|
|
1719
1793
|
className: "_156u72w3",
|
|
1720
|
-
children: E.map((e) => /* @__PURE__ */
|
|
1794
|
+
children: E.map((e) => /* @__PURE__ */ K(Hn, {
|
|
1721
1795
|
file: e,
|
|
1722
1796
|
onDelete: (e) => {
|
|
1723
1797
|
k(E.filter((t) => t.id !== e));
|
|
@@ -1725,9 +1799,9 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1725
1799
|
}, e.id))
|
|
1726
1800
|
})
|
|
1727
1801
|
})]
|
|
1728
|
-
}), /* @__PURE__ */
|
|
1802
|
+
}), /* @__PURE__ */ K(Xn, {
|
|
1729
1803
|
isOpen: l,
|
|
1730
|
-
setIsOpen:
|
|
1804
|
+
setIsOpen: u,
|
|
1731
1805
|
files: E,
|
|
1732
1806
|
kind: c,
|
|
1733
1807
|
allowedExtensions: C,
|
|
@@ -1736,56 +1810,56 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1736
1810
|
handleUploadFiles: A,
|
|
1737
1811
|
handleChange: k
|
|
1738
1812
|
})] });
|
|
1739
|
-
},
|
|
1813
|
+
}, ar = (e) => {
|
|
1740
1814
|
let t = Z(3), n;
|
|
1741
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */
|
|
1815
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ K(Ce, { size: 20 }), t[0] = n) : n = t[0];
|
|
1742
1816
|
let r;
|
|
1743
|
-
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */
|
|
1817
|
+
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */ K(jn, {
|
|
1744
1818
|
leftIcon: n,
|
|
1745
1819
|
...e
|
|
1746
1820
|
}), t[1] = e, t[2] = r), r;
|
|
1747
|
-
},
|
|
1748
|
-
TextWidget:
|
|
1749
|
-
NumberWidget:
|
|
1821
|
+
}, or = R(() => import("./DateTimeWidget-BHCP5osb.js")), sr = R(() => import("./PhoneWidget-C6uZmrk8.js")), cr = R(() => import("./RichTextWidget-iYdVRBGB.js")), lr = {
|
|
1822
|
+
TextWidget: p((e) => /* @__PURE__ */ K(jn, { ...e })),
|
|
1823
|
+
NumberWidget: p((e) => /* @__PURE__ */ K(jn, {
|
|
1750
1824
|
type: "number",
|
|
1751
1825
|
step: "any",
|
|
1752
1826
|
...e
|
|
1753
1827
|
})),
|
|
1754
|
-
CurrencyWidget:
|
|
1755
|
-
MultiTextWidget:
|
|
1756
|
-
TextareaWidget:
|
|
1757
|
-
RichTextWidget:
|
|
1758
|
-
EmailWidget:
|
|
1759
|
-
PhoneWidget:
|
|
1760
|
-
URLWidget:
|
|
1761
|
-
DropdownWidget:
|
|
1828
|
+
CurrencyWidget: p((e) => /* @__PURE__ */ K(Ut, { ...e })),
|
|
1829
|
+
MultiTextWidget: p((e) => /* @__PURE__ */ K(dn, { ...e })),
|
|
1830
|
+
TextareaWidget: p((e) => /* @__PURE__ */ K(An, { ...e })),
|
|
1831
|
+
RichTextWidget: p((e) => /* @__PURE__ */ K(cr, { ...e })),
|
|
1832
|
+
EmailWidget: p((e) => /* @__PURE__ */ K(Yt, { ...e })),
|
|
1833
|
+
PhoneWidget: p((e) => /* @__PURE__ */ K(sr, { ...e })),
|
|
1834
|
+
URLWidget: p((e) => /* @__PURE__ */ K(ar, { ...e })),
|
|
1835
|
+
DropdownWidget: p((e) => /* @__PURE__ */ K(Gt, {
|
|
1762
1836
|
isMulti: !1,
|
|
1763
1837
|
...e
|
|
1764
1838
|
})),
|
|
1765
|
-
MultiDropdownWidget:
|
|
1839
|
+
MultiDropdownWidget: p((e) => /* @__PURE__ */ K(Gt, {
|
|
1766
1840
|
isMulti: !0,
|
|
1767
1841
|
...e
|
|
1768
1842
|
})),
|
|
1769
|
-
RadioWidget:
|
|
1770
|
-
CheckboxWidget:
|
|
1771
|
-
ToggleCheckboxWidget:
|
|
1772
|
-
SwitchWidget:
|
|
1773
|
-
DateTimeWidget:
|
|
1774
|
-
DateWidget:
|
|
1775
|
-
TimeWidget:
|
|
1776
|
-
GeocoderWidget:
|
|
1777
|
-
MultiGeocoderWidget:
|
|
1778
|
-
ImageUploadWidget:
|
|
1843
|
+
RadioWidget: p((e) => /* @__PURE__ */ K(xn, { ...e })),
|
|
1844
|
+
CheckboxWidget: p((e) => /* @__PURE__ */ K(Bt, { ...e })),
|
|
1845
|
+
ToggleCheckboxWidget: p((e) => /* @__PURE__ */ K(Pn, { ...e })),
|
|
1846
|
+
SwitchWidget: p((e) => /* @__PURE__ */ K(On, { ...e })),
|
|
1847
|
+
DateTimeWidget: p((e) => /* @__PURE__ */ K(or, { ...e })),
|
|
1848
|
+
DateWidget: p((e) => /* @__PURE__ */ K(or, { ...e })),
|
|
1849
|
+
TimeWidget: p((e) => /* @__PURE__ */ K(Mn, { ...e })),
|
|
1850
|
+
GeocoderWidget: p((e) => /* @__PURE__ */ K(Zt, { ...e })),
|
|
1851
|
+
MultiGeocoderWidget: p((e) => /* @__PURE__ */ K(an, { ...e })),
|
|
1852
|
+
ImageUploadWidget: p((e) => /* @__PURE__ */ K(ir, {
|
|
1779
1853
|
kind: ["image"],
|
|
1780
1854
|
isMultiple: !1,
|
|
1781
1855
|
...e
|
|
1782
1856
|
})),
|
|
1783
|
-
MultiImageUploadWidget:
|
|
1857
|
+
MultiImageUploadWidget: p((e) => /* @__PURE__ */ K(ir, {
|
|
1784
1858
|
kind: ["image"],
|
|
1785
1859
|
isMultiple: !0,
|
|
1786
1860
|
...e
|
|
1787
1861
|
})),
|
|
1788
|
-
FileUploadWidget:
|
|
1862
|
+
FileUploadWidget: p((e) => /* @__PURE__ */ K(ir, {
|
|
1789
1863
|
kind: [
|
|
1790
1864
|
"audio",
|
|
1791
1865
|
"video",
|
|
@@ -1795,7 +1869,7 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1795
1869
|
isMultiple: !1,
|
|
1796
1870
|
...e
|
|
1797
1871
|
})),
|
|
1798
|
-
MultiFileUploadWidget:
|
|
1872
|
+
MultiFileUploadWidget: p((e) => /* @__PURE__ */ K(ir, {
|
|
1799
1873
|
kind: [
|
|
1800
1874
|
"audio",
|
|
1801
1875
|
"video",
|
|
@@ -1805,7 +1879,7 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1805
1879
|
isMultiple: !0,
|
|
1806
1880
|
...e
|
|
1807
1881
|
}))
|
|
1808
|
-
},
|
|
1882
|
+
}, ur = (e) => {
|
|
1809
1883
|
let t = Z(9), n, r;
|
|
1810
1884
|
t[0] === e ? (n = t[1], r = t[2]) : ({widgets: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1811
1885
|
let { field: i } = n, { field_interface: a, key: o } = i;
|
|
@@ -1814,16 +1888,16 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1814
1888
|
let e = r[a];
|
|
1815
1889
|
if (e) {
|
|
1816
1890
|
let r;
|
|
1817
|
-
return t[3] !== e || t[4] !== n ? (r = /* @__PURE__ */
|
|
1891
|
+
return t[3] !== e || t[4] !== n ? (r = /* @__PURE__ */ K(e, { ...n }), t[3] = e, t[4] = n, t[5] = r) : r = t[5], r;
|
|
1818
1892
|
}
|
|
1819
1893
|
}
|
|
1820
|
-
let s =
|
|
1894
|
+
let s = lr[a];
|
|
1821
1895
|
if (s) {
|
|
1822
1896
|
let e;
|
|
1823
|
-
return t[6] !== s || t[7] !== n ? (e = /* @__PURE__ */
|
|
1897
|
+
return t[6] !== s || t[7] !== n ? (e = /* @__PURE__ */ K(s, { ...n }), t[6] = s, t[7] = n, t[8] = e) : e = t[8], e;
|
|
1824
1898
|
}
|
|
1825
1899
|
return null;
|
|
1826
|
-
},
|
|
1900
|
+
}, dr = (e) => {
|
|
1827
1901
|
let t = Z(25), n, r, i;
|
|
1828
1902
|
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);
|
|
1829
1903
|
let { key: a, label: o, field_interface: s, fields: c } = n, l = a === void 0 ? "" : a, u = o === void 0 ? "" : o, d = s === void 0 ? "" : s, f;
|
|
@@ -1831,59 +1905,59 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1831
1905
|
let p = f;
|
|
1832
1906
|
if (!d || !l) return null;
|
|
1833
1907
|
let m = n?.required, h;
|
|
1834
|
-
t[6] !== u || t[7] !== m ? (h = /* @__PURE__ */
|
|
1908
|
+
t[6] !== u || t[7] !== m ? (h = /* @__PURE__ */ K(g, {
|
|
1835
1909
|
label: u,
|
|
1836
1910
|
isRequired: m
|
|
1837
1911
|
}), t[6] = u, t[7] = m, t[8] = h) : h = t[8];
|
|
1838
|
-
let
|
|
1912
|
+
let _;
|
|
1839
1913
|
if (t[9] !== n.id || t[10] !== p || t[11] !== l || t[12] !== r || t[13] !== i) {
|
|
1840
1914
|
let e;
|
|
1841
|
-
t[15] !== n.id || t[16] !== l || t[17] !== r || t[18] !== i ? (e = (e) => /* @__PURE__ */
|
|
1915
|
+
t[15] !== n.id || t[16] !== l || t[17] !== r || t[18] !== i ? (e = (e) => /* @__PURE__ */ K(fr, {
|
|
1842
1916
|
field: {
|
|
1843
1917
|
...e,
|
|
1844
1918
|
key: `${l}.${e?.key}`
|
|
1845
1919
|
},
|
|
1846
1920
|
schema: i,
|
|
1847
1921
|
...r
|
|
1848
|
-
}, `common-fields-${n?.id}-${e?.id}`), t[15] = n.id, t[16] = l, t[17] = r, t[18] = i, t[19] = e) : e = t[19],
|
|
1849
|
-
} else
|
|
1922
|
+
}, `common-fields-${n?.id}-${e?.id}`), t[15] = n.id, t[16] = l, t[17] = r, t[18] = i, t[19] = e) : e = t[19], _ = p.map(e), t[9] = n.id, t[10] = p, t[11] = l, t[12] = r, t[13] = i, t[14] = _;
|
|
1923
|
+
} else _ = t[14];
|
|
1850
1924
|
let v;
|
|
1851
|
-
t[20] ===
|
|
1852
|
-
className:
|
|
1853
|
-
children:
|
|
1854
|
-
}), t[20] =
|
|
1925
|
+
t[20] === _ ? v = t[21] : (v = /* @__PURE__ */ K("div", {
|
|
1926
|
+
className: Qe,
|
|
1927
|
+
children: _
|
|
1928
|
+
}), t[20] = _, t[21] = v);
|
|
1855
1929
|
let y;
|
|
1856
|
-
return t[22] !== h || t[23] !== v ? (y = /* @__PURE__ */
|
|
1857
|
-
className:
|
|
1930
|
+
return t[22] !== h || t[23] !== v ? (y = /* @__PURE__ */ q("div", {
|
|
1931
|
+
className: Ve,
|
|
1858
1932
|
children: [h, v]
|
|
1859
1933
|
}), t[22] = h, t[23] = v, t[24] = y) : y = t[24], y;
|
|
1860
|
-
},
|
|
1934
|
+
}, fr = (e) => {
|
|
1861
1935
|
let t = Z(12), n, r;
|
|
1862
1936
|
t[0] === e ? (n = t[1], r = t[2]) : ({widgets: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1863
1937
|
let { field_interface: i, key: a, hidden: o } = n.field, s = i === void 0 ? "" : i;
|
|
1864
1938
|
if (!s || !(a !== void 0 && a) || o) return null;
|
|
1865
1939
|
switch (s) {
|
|
1866
|
-
case
|
|
1940
|
+
case J.ArrayWidget: {
|
|
1867
1941
|
let e;
|
|
1868
|
-
return t[3] === n ? e = t[4] : (e = /* @__PURE__ */
|
|
1942
|
+
return t[3] === n ? e = t[4] : (e = /* @__PURE__ */ K(ct, { ...n }), t[3] = n, t[4] = e), e;
|
|
1869
1943
|
}
|
|
1870
|
-
case
|
|
1944
|
+
case J.RecordWidget: {
|
|
1871
1945
|
let e;
|
|
1872
|
-
return t[5] === n ? e = t[6] : (e = /* @__PURE__ */
|
|
1946
|
+
return t[5] === n ? e = t[6] : (e = /* @__PURE__ */ K(dr, { ...n }), t[5] = n, t[6] = e), e;
|
|
1873
1947
|
}
|
|
1874
|
-
case
|
|
1948
|
+
case J.CollectionWidget: {
|
|
1875
1949
|
let e;
|
|
1876
|
-
return t[7] === n ? e = t[8] : (e = /* @__PURE__ */
|
|
1950
|
+
return t[7] === n ? e = t[8] : (e = /* @__PURE__ */ K(Nt, { ...n }), t[7] = n, t[8] = e), e;
|
|
1877
1951
|
}
|
|
1878
1952
|
default: {
|
|
1879
1953
|
let e;
|
|
1880
|
-
return t[9] !== n || t[10] !== r ? (e = /* @__PURE__ */
|
|
1954
|
+
return t[9] !== n || t[10] !== r ? (e = /* @__PURE__ */ K(ur, {
|
|
1881
1955
|
widgets: r,
|
|
1882
1956
|
...n
|
|
1883
1957
|
}), t[9] = n, t[10] = r, t[11] = e) : e = t[11], e;
|
|
1884
1958
|
}
|
|
1885
1959
|
}
|
|
1886
|
-
},
|
|
1960
|
+
}, pr = "r6cfdr0", mr = L({ themeClass: "" }), hr = c(ze({
|
|
1887
1961
|
form: {
|
|
1888
1962
|
maxWidth: "800px",
|
|
1889
1963
|
labelFontSize: "1.5rem",
|
|
@@ -1895,109 +1969,108 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
1895
1969
|
height: "3.5rem",
|
|
1896
1970
|
borderRadius: "4px"
|
|
1897
1971
|
},
|
|
1898
|
-
checkbox: { labelFontSize: "1.125rem" }
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
n[0] === e ? (r = n[1], i = n[2], a = n[3], o = n[4], s = n[5], c = n[6], l = n[7]) : ({children: r, className: i, style: c, cssReset: a, variant: l, portalToThemeRoot: o, ...s} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = a, n[4] = o, n[5] = s, n[6] = c, n[7] = l);
|
|
1972
|
+
checkbox: { labelFontSize: "1.125rem" }
|
|
1973
|
+
})), gr = (e) => {
|
|
1974
|
+
let t = Z(30), r, i, a, o, s, c, l;
|
|
1975
|
+
t[0] === e ? (r = t[1], i = t[2], a = t[3], o = t[4], s = t[5], c = t[6], l = t[7]) : ({children: r, className: i, style: c, cssReset: a, variant: l, portalToThemeRoot: o, ...s} = e, t[0] = e, t[1] = r, t[2] = i, t[3] = a, t[4] = o, t[5] = s, t[6] = c, t[7] = l);
|
|
1903
1976
|
let u = l === "single-field" || l === "steps-2", d;
|
|
1904
|
-
|
|
1977
|
+
t[8] === i ? d = t[9] : (d = Q(h, Be, i), t[8] = i, t[9] = d);
|
|
1905
1978
|
let f = d, p;
|
|
1906
|
-
|
|
1907
|
-
...
|
|
1979
|
+
t[10] !== u || t[11] !== c ? (p = u ? {
|
|
1980
|
+
...hr,
|
|
1908
1981
|
...c
|
|
1909
|
-
} : c,
|
|
1910
|
-
let
|
|
1911
|
-
|
|
1982
|
+
} : c, t[10] = u, t[11] = c, t[12] = p) : p = t[12];
|
|
1983
|
+
let m = p, g;
|
|
1984
|
+
t[13] !== f || t[14] !== m || t[15] !== a ? (g = {
|
|
1912
1985
|
themeClass: f,
|
|
1913
|
-
style:
|
|
1986
|
+
style: m,
|
|
1914
1987
|
cssReset: a
|
|
1915
|
-
},
|
|
1988
|
+
}, t[13] = f, t[14] = m, t[15] = a, t[16] = g) : g = t[16];
|
|
1916
1989
|
let _;
|
|
1917
|
-
|
|
1918
|
-
className:
|
|
1990
|
+
t[17] !== r || t[18] !== u ? (_ = u ? /* @__PURE__ */ K("div", {
|
|
1991
|
+
className: pr,
|
|
1919
1992
|
children: r
|
|
1920
|
-
}) : r,
|
|
1993
|
+
}) : r, t[17] = r, t[18] = u, t[19] = _) : _ = t[19];
|
|
1921
1994
|
let v;
|
|
1922
|
-
|
|
1995
|
+
t[20] !== g || t[21] !== _ ? (v = /* @__PURE__ */ K(mr.Provider, {
|
|
1923
1996
|
value: g,
|
|
1924
1997
|
children: _
|
|
1925
|
-
}),
|
|
1998
|
+
}), t[20] = g, t[21] = _, t[22] = v) : v = t[22];
|
|
1926
1999
|
let y;
|
|
1927
|
-
return
|
|
2000
|
+
return t[23] !== f || t[24] !== m || t[25] !== a || t[26] !== o || t[27] !== s || t[28] !== v ? (y = /* @__PURE__ */ K(n, {
|
|
1928
2001
|
...s,
|
|
1929
2002
|
className: f,
|
|
1930
2003
|
cssReset: a,
|
|
1931
|
-
style:
|
|
2004
|
+
style: m,
|
|
1932
2005
|
portalToThemeRoot: o,
|
|
1933
2006
|
children: v
|
|
1934
|
-
}),
|
|
1935
|
-
},
|
|
2007
|
+
}), t[23] = f, t[24] = m, t[25] = a, t[26] = o, t[27] = s, t[28] = v, t[29] = y) : y = t[29], y;
|
|
2008
|
+
}, _r = () => {
|
|
1936
2009
|
try {
|
|
1937
|
-
return
|
|
2010
|
+
return B(mr);
|
|
1938
2011
|
} catch {
|
|
1939
2012
|
return null;
|
|
1940
2013
|
}
|
|
1941
|
-
},
|
|
1942
|
-
let p =
|
|
1943
|
-
if (
|
|
1944
|
-
let t = { ...
|
|
2014
|
+
}, vr = "_1dzarb20", yr = "_1dzarb21", br = "_1dzarb23", xr = "_1dzarb24", Sr = "_1dzarb25", Cr = "_1dzarb26", wr = ({ hiddenFields: e, isLoading: t, initialValues: n, onSubmit: r, schema: i, uiConfig: s, submitButtonConfig: c, containerStyles: l, isDisabled: u, theme: d, enableVerification: f = !0 }) => {
|
|
2015
|
+
let p = H(() => {
|
|
2016
|
+
if (i) {
|
|
2017
|
+
let t = { ...i };
|
|
1945
2018
|
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;
|
|
1946
2019
|
}
|
|
1947
2020
|
return null;
|
|
1948
|
-
}, [
|
|
2021
|
+
}, [i]), m = fe({
|
|
1949
2022
|
mode: "onTouched",
|
|
1950
2023
|
disabled: u,
|
|
1951
2024
|
defaultValues: {},
|
|
1952
2025
|
resetOptions: { keepErrors: !0 }
|
|
1953
|
-
}), { formState: { isSubmitting:
|
|
2026
|
+
}), { formState: { isSubmitting: h } } = m, g = (e) => {
|
|
1954
2027
|
r && r(e);
|
|
1955
2028
|
};
|
|
1956
|
-
|
|
2029
|
+
V(() => {
|
|
1957
2030
|
if (p) {
|
|
1958
2031
|
let e = {
|
|
1959
|
-
...i
|
|
2032
|
+
...a(i),
|
|
1960
2033
|
...n
|
|
1961
2034
|
};
|
|
1962
2035
|
m.reset(e);
|
|
1963
2036
|
}
|
|
1964
2037
|
}, [p]);
|
|
1965
|
-
let
|
|
1966
|
-
return p ? /* @__PURE__ */
|
|
2038
|
+
let _ = t || h;
|
|
2039
|
+
return p ? /* @__PURE__ */ K(le, {
|
|
1967
2040
|
...m,
|
|
1968
|
-
children: /* @__PURE__ */
|
|
2041
|
+
children: /* @__PURE__ */ K(gr, {
|
|
1969
2042
|
...d || {},
|
|
1970
|
-
children: /* @__PURE__ */
|
|
1971
|
-
className:
|
|
1972
|
-
children: [s?.hideFormHeading ? null : /* @__PURE__ */
|
|
1973
|
-
className: Q(
|
|
2043
|
+
children: /* @__PURE__ */ q("div", {
|
|
2044
|
+
className: vr,
|
|
2045
|
+
children: [s?.hideFormHeading ? null : /* @__PURE__ */ K("h1", {
|
|
2046
|
+
className: Q(yr),
|
|
1974
2047
|
children: "Create new"
|
|
1975
|
-
}), /* @__PURE__ */
|
|
1976
|
-
className: Q(
|
|
1977
|
-
children: /* @__PURE__ */
|
|
1978
|
-
className: Q(
|
|
2048
|
+
}), /* @__PURE__ */ K("div", {
|
|
2049
|
+
className: Q(br, l),
|
|
2050
|
+
children: /* @__PURE__ */ q("form", {
|
|
2051
|
+
className: Q(xr, t && "_1dzarb27"),
|
|
1979
2052
|
id: "collection-form",
|
|
1980
|
-
onSubmit: m.handleSubmit(
|
|
1981
|
-
children: [
|
|
1982
|
-
className:
|
|
1983
|
-
children: [!s?.hideSectionHeadings && /* @__PURE__ */
|
|
2053
|
+
onSubmit: m.handleSubmit(g),
|
|
2054
|
+
children: [i?.sections?.map((e) => o(e?.fields || []) ? null : /* @__PURE__ */ q("div", {
|
|
2055
|
+
className: Sr,
|
|
2056
|
+
children: [!s?.hideSectionHeadings && /* @__PURE__ */ K("p", {
|
|
1984
2057
|
className: "_1dzarb28",
|
|
1985
2058
|
children: e?.label
|
|
1986
|
-
}), /* @__PURE__ */
|
|
1987
|
-
className:
|
|
1988
|
-
children: e?.fields?.map((e) => /* @__PURE__ */
|
|
2059
|
+
}), /* @__PURE__ */ K("div", {
|
|
2060
|
+
className: Cr,
|
|
2061
|
+
children: e?.fields?.map((e) => /* @__PURE__ */ K(fr, {
|
|
1989
2062
|
field: e,
|
|
1990
|
-
schema:
|
|
2063
|
+
schema: i,
|
|
1991
2064
|
settings: { enableVerification: f }
|
|
1992
2065
|
}, e?.key))
|
|
1993
2066
|
})]
|
|
1994
|
-
}, e.id)), c?.show && /* @__PURE__ */
|
|
2067
|
+
}, e.id)), c?.show && /* @__PURE__ */ K("div", {
|
|
1995
2068
|
className: "_1dzarb29",
|
|
1996
|
-
children: /* @__PURE__ */
|
|
2069
|
+
children: /* @__PURE__ */ K(y, {
|
|
1997
2070
|
className: c?.styles,
|
|
1998
|
-
disabled: u ||
|
|
2071
|
+
disabled: u || _,
|
|
1999
2072
|
type: "submit",
|
|
2000
|
-
children:
|
|
2073
|
+
children: _ ? "Saving" : c?.text || "Save"
|
|
2001
2074
|
})
|
|
2002
2075
|
})]
|
|
2003
2076
|
})
|
|
@@ -2005,39 +2078,39 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2005
2078
|
})
|
|
2006
2079
|
})
|
|
2007
2080
|
}) : null;
|
|
2008
|
-
},
|
|
2081
|
+
}, Tr = F.createContext({
|
|
2009
2082
|
schema: null,
|
|
2010
2083
|
submitButtonConfig: { show: !0 }
|
|
2011
|
-
}),
|
|
2084
|
+
}), Er = (e) => {
|
|
2012
2085
|
let t = Z(14), n, r, i, a;
|
|
2013
2086
|
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);
|
|
2014
2087
|
let o;
|
|
2015
2088
|
t[5] === r ? o = t[6] : (o = { ...r }, t[5] = r, t[6] = o);
|
|
2016
2089
|
let s;
|
|
2017
|
-
t[7] !== n || t[8] !== i || t[9] !== a ? (s = /* @__PURE__ */
|
|
2090
|
+
t[7] !== n || t[8] !== i || t[9] !== a ? (s = /* @__PURE__ */ K(gr, {
|
|
2018
2091
|
...i,
|
|
2019
2092
|
variant: a,
|
|
2020
2093
|
children: n
|
|
2021
2094
|
}), t[7] = n, t[8] = i, t[9] = a, t[10] = s) : s = t[10];
|
|
2022
2095
|
let c;
|
|
2023
|
-
return t[11] !== o || t[12] !== s ? (c = /* @__PURE__ */
|
|
2096
|
+
return t[11] !== o || t[12] !== s ? (c = /* @__PURE__ */ K(Tr.Provider, {
|
|
2024
2097
|
value: o,
|
|
2025
2098
|
children: s
|
|
2026
2099
|
}), t[11] = o, t[12] = s, t[13] = c) : c = t[13], c;
|
|
2027
|
-
},
|
|
2100
|
+
}, Dr = () => F.useContext(Tr), Or = {
|
|
2028
2101
|
FORM_DIRTY: "form-dirty",
|
|
2029
2102
|
FORM_VALUES: "form-values"
|
|
2030
|
-
},
|
|
2031
|
-
let t = localStorage.getItem(`${e}-${
|
|
2103
|
+
}, kr = (e) => {
|
|
2104
|
+
let t = localStorage.getItem(`${e}-${Or.FORM_VALUES}`);
|
|
2032
2105
|
return t ? JSON.parse(t) : {};
|
|
2033
|
-
},
|
|
2034
|
-
localStorage.setItem(`${e}-${
|
|
2035
|
-
},
|
|
2036
|
-
localStorage.removeItem(`${e}-${
|
|
2037
|
-
},
|
|
2038
|
-
let
|
|
2039
|
-
if (!
|
|
2040
|
-
for (let t of
|
|
2106
|
+
}, Ar = (e, t) => {
|
|
2107
|
+
localStorage.setItem(`${e}-${Or.FORM_VALUES}`, JSON.stringify(t));
|
|
2108
|
+
}, jr = (e) => {
|
|
2109
|
+
localStorage.removeItem(`${e}-${Or.FORM_VALUES}`);
|
|
2110
|
+
}, Mr = ({ schema: e, originalSchema: t, saveToRemote: n, onSubmit: r, onSubmitSuccess: i, onSubmitError: o, setFormErrorAfterSubmit: s = !0 }) => {
|
|
2111
|
+
let c = H(() => e, [e]), u = H(() => t || c, [t]), d = ae(), { toastConfig: p, onSuccess: m, onError: h, isLoggedIn: g, isDisabled: _, externalInitialValues: v = {}, account: y, preview: b } = Dr(), [x, S] = W(null), [C, w] = W(!1), [T, E] = W(!1), [D, O] = W(!1), k = U({}), A = (e) => {
|
|
2112
|
+
if (!c?.sections) return null;
|
|
2113
|
+
for (let t of c.sections) for (let n of t?.fields ?? []) if (n?.key === e) return n?.kind ?? null;
|
|
2041
2114
|
return null;
|
|
2042
2115
|
}, j = () => {
|
|
2043
2116
|
let e = {};
|
|
@@ -2055,49 +2128,49 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2055
2128
|
}
|
|
2056
2129
|
}
|
|
2057
2130
|
} catch {}
|
|
2058
|
-
let t =
|
|
2059
|
-
y &&
|
|
2131
|
+
let t = a(c), n = {};
|
|
2132
|
+
y && c && (c.email_field && y.email && (n[c.email_field] = y.email), c.mobile_field && y.mobile && (n[c.mobile_field] = y.mobile)), k.current = {
|
|
2060
2133
|
...t,
|
|
2061
2134
|
...v || {},
|
|
2062
2135
|
...n,
|
|
2063
2136
|
...e,
|
|
2064
2137
|
...k.current
|
|
2065
2138
|
};
|
|
2066
|
-
}, M =
|
|
2139
|
+
}, M = fe({
|
|
2067
2140
|
mode: "onTouched",
|
|
2068
2141
|
disabled: _
|
|
2069
2142
|
}), { formState: N } = M, P = M.handleSubmit(async (e) => {
|
|
2070
2143
|
if (k.current = {
|
|
2071
2144
|
...k.current || {},
|
|
2072
2145
|
...e
|
|
2073
|
-
}, n && !b &&
|
|
2146
|
+
}, n && !b && d?.collection) {
|
|
2074
2147
|
if (u) try {
|
|
2075
|
-
let e =
|
|
2076
|
-
if (t = x ? await
|
|
2148
|
+
let e = f(k?.current, u), t = null;
|
|
2149
|
+
if (t = x ? await d?.collection?.submitDraftEntry(u?.key, e) : await d?.collection?.saveCollectionData({
|
|
2077
2150
|
collection_id: u?.id,
|
|
2078
2151
|
data: e
|
|
2079
2152
|
}), t?.content?.data) {
|
|
2080
2153
|
let e = t?.content?.meta?.booking_config?.enabled;
|
|
2081
|
-
p?.showSuccessToast && !(p?.suppressOnBooking && e) &&
|
|
2154
|
+
p?.showSuccessToast && !(p?.suppressOnBooking && e) && ie(p.successToastText || "Form submitted successfully."), k.current = {}, j(), jr(u?.key), S(null), O(!0), m && m({
|
|
2082
2155
|
schemaId: u?.id,
|
|
2083
2156
|
response: t?.content?.data,
|
|
2084
2157
|
meta: t?.content?.meta
|
|
2085
|
-
}),
|
|
2158
|
+
}), i && i();
|
|
2086
2159
|
return;
|
|
2087
2160
|
}
|
|
2088
2161
|
throw Error("Failed to save form details, API response invalid");
|
|
2089
2162
|
} catch (e) {
|
|
2090
|
-
|
|
2163
|
+
te(e), e instanceof Y ? (e?.hasFieldErrors && s && l(e?.fieldErrors, M.setError), o && o(e.fieldErrors || []), h && h(e)) : h && h(e?.response?.data || e);
|
|
2091
2164
|
}
|
|
2092
2165
|
return;
|
|
2093
2166
|
}
|
|
2094
2167
|
e && r && r(e);
|
|
2095
2168
|
});
|
|
2096
|
-
return
|
|
2097
|
-
if (
|
|
2098
|
-
if (j(), !x && !b &&
|
|
2169
|
+
return V(() => {
|
|
2170
|
+
if (c && d?.collection) {
|
|
2171
|
+
if (j(), !x && !b && c?.allow_draft) {
|
|
2099
2172
|
if (g) {
|
|
2100
|
-
w(!0),
|
|
2173
|
+
w(!0), d?.collection?.getDraftEntry(c?.key).then((e) => {
|
|
2101
2174
|
let t = e?.content?.data;
|
|
2102
2175
|
if (t === null) {
|
|
2103
2176
|
E(!0);
|
|
@@ -2112,12 +2185,12 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2112
2185
|
...e
|
|
2113
2186
|
}, S(e?._id));
|
|
2114
2187
|
}
|
|
2115
|
-
}).catch((e) => (
|
|
2188
|
+
}).catch((e) => (d?.logger?.error("Failed to get draft entry", { exception: e }), null)).finally(() => {
|
|
2116
2189
|
M.reset({ ...k?.current }), w(!1);
|
|
2117
2190
|
});
|
|
2118
2191
|
return;
|
|
2119
2192
|
}
|
|
2120
|
-
let e =
|
|
2193
|
+
let e = kr(c?.key);
|
|
2121
2194
|
e && (k.current = {
|
|
2122
2195
|
...k.current || {},
|
|
2123
2196
|
...e
|
|
@@ -2125,14 +2198,14 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2125
2198
|
}
|
|
2126
2199
|
M.reset({ ...k?.current });
|
|
2127
2200
|
}
|
|
2128
|
-
}, [
|
|
2201
|
+
}, [c]), V(() => {
|
|
2129
2202
|
let { isSubmitSuccessful: e, isValid: t } = N;
|
|
2130
2203
|
e && t && M.reset({
|
|
2131
2204
|
...k?.current,
|
|
2132
2205
|
__captcha: "verified"
|
|
2133
2206
|
});
|
|
2134
|
-
}, [N]),
|
|
2135
|
-
|
|
2207
|
+
}, [N]), V(() => {
|
|
2208
|
+
c && x && jr(c?.key);
|
|
2136
2209
|
}, [x]), {
|
|
2137
2210
|
methods: M,
|
|
2138
2211
|
isLoading: C,
|
|
@@ -2146,20 +2219,20 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2146
2219
|
showSuccessOverlay: D,
|
|
2147
2220
|
dismissSuccessOverlay: () => O(!1)
|
|
2148
2221
|
};
|
|
2149
|
-
},
|
|
2150
|
-
return
|
|
2222
|
+
}, Nr = "a2n8870", Pr = "a2n8871", Fr = "a2n8872", Ir = R(() => import("altcha").then(() => ({ default: function({ widgetRef: e, client: t, onStateChange: n }) {
|
|
2223
|
+
return V(() => {
|
|
2151
2224
|
let { current: t } = e;
|
|
2152
2225
|
if (t) return t.addEventListener("statechange", n), () => t.removeEventListener("statechange", n);
|
|
2153
|
-
}, [n]), /* @__PURE__ */
|
|
2226
|
+
}, [n]), /* @__PURE__ */ K("altcha-widget", {
|
|
2154
2227
|
ref: e,
|
|
2155
2228
|
style: {
|
|
2156
2229
|
"--altcha-max-width": "100%",
|
|
2157
2230
|
"--altcha-border-width": "1px",
|
|
2158
|
-
"--altcha-border-radius":
|
|
2159
|
-
"--altcha-color-base":
|
|
2160
|
-
"--altcha-color-border":
|
|
2161
|
-
"--altcha-color-border-focus":
|
|
2162
|
-
"--altcha-color-text":
|
|
2231
|
+
"--altcha-border-radius": s.input.borderRadius,
|
|
2232
|
+
"--altcha-color-base": m.colors.input,
|
|
2233
|
+
"--altcha-color-border": m.colors.border,
|
|
2234
|
+
"--altcha-color-border-focus": m.colors.ring,
|
|
2235
|
+
"--altcha-color-text": m.colors.inputForeground
|
|
2163
2236
|
},
|
|
2164
2237
|
hidelogo: !0,
|
|
2165
2238
|
auto: "onfocus",
|
|
@@ -2167,17 +2240,17 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2167
2240
|
challengeurl: `${t.apiUrl}/v1/identity/captcha/create-challenge`,
|
|
2168
2241
|
verifyurl: `${t.apiUrl}/v1/identity/captcha/verify-challenge`
|
|
2169
2242
|
});
|
|
2170
|
-
} }))),
|
|
2243
|
+
} }))), Lr = () => {
|
|
2171
2244
|
let e = Z(1), t;
|
|
2172
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
2173
|
-
className:
|
|
2174
|
-
children: /* @__PURE__ */
|
|
2175
|
-
className:
|
|
2245
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ K("div", {
|
|
2246
|
+
className: Pr,
|
|
2247
|
+
children: /* @__PURE__ */ K("span", {
|
|
2248
|
+
className: Fr,
|
|
2176
2249
|
children: "Loading verification..."
|
|
2177
2250
|
})
|
|
2178
2251
|
}), e[0] = t) : t = e[0], t;
|
|
2179
|
-
},
|
|
2180
|
-
let e = Z(16), { disableCaptcha: t } =
|
|
2252
|
+
}, Rr = () => {
|
|
2253
|
+
let e = Z(16), { disableCaptcha: t } = Dr(), n = ae(), [r, i] = W(!1), a = U(null), o = t ? !1 : "Verification is required", s;
|
|
2181
2254
|
e[0] === o ? s = e[1] : (s = {
|
|
2182
2255
|
name: "__captcha",
|
|
2183
2256
|
rules: { required: o }
|
|
@@ -2185,7 +2258,7 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2185
2258
|
let { field: c, fieldState: l } = $(s), { onChange: u } = c, { error: d } = l, f, p;
|
|
2186
2259
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (f = () => {
|
|
2187
2260
|
i(!0);
|
|
2188
|
-
}, p = [], e[2] = f, e[3] = p) : (f = e[2], p = e[3]),
|
|
2261
|
+
}, p = [], e[2] = f, e[3] = p) : (f = e[2], p = e[3]), V(f, p);
|
|
2189
2262
|
let m;
|
|
2190
2263
|
e[4] === u ? m = e[5] : (m = (e) => {
|
|
2191
2264
|
"detail" in e && u(e.detail.state || null);
|
|
@@ -2193,62 +2266,62 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2193
2266
|
let h = m;
|
|
2194
2267
|
if (!r) {
|
|
2195
2268
|
let t = d?.message, n;
|
|
2196
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */
|
|
2269
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ K(Lr, {}), e[6] = n) : n = e[6];
|
|
2197
2270
|
let r;
|
|
2198
|
-
return e[7] === t ? r = e[8] : (r = /* @__PURE__ */
|
|
2271
|
+
return e[7] === t ? r = e[8] : (r = /* @__PURE__ */ K(v, {
|
|
2199
2272
|
error: t,
|
|
2200
|
-
className:
|
|
2273
|
+
className: Nr,
|
|
2201
2274
|
children: n
|
|
2202
2275
|
}), e[7] = t, e[8] = r), r;
|
|
2203
2276
|
}
|
|
2204
2277
|
let g = d?.message, _;
|
|
2205
|
-
e[9] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */
|
|
2206
|
-
let
|
|
2207
|
-
e[10] !== n || e[11] !== h ? (
|
|
2278
|
+
e[9] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ K(Lr, {}), e[9] = _) : _ = e[9];
|
|
2279
|
+
let y;
|
|
2280
|
+
e[10] !== n || e[11] !== h ? (y = /* @__PURE__ */ K(I, {
|
|
2208
2281
|
fallback: _,
|
|
2209
|
-
children: /* @__PURE__ */
|
|
2282
|
+
children: /* @__PURE__ */ K(Ir, {
|
|
2210
2283
|
widgetRef: a,
|
|
2211
2284
|
client: n,
|
|
2212
2285
|
onStateChange: h
|
|
2213
2286
|
})
|
|
2214
|
-
}), e[10] = n, e[11] = h, e[12] =
|
|
2287
|
+
}), e[10] = n, e[11] = h, e[12] = y) : y = e[12];
|
|
2215
2288
|
let b;
|
|
2216
|
-
return e[13] !== g || e[14] !==
|
|
2289
|
+
return e[13] !== g || e[14] !== y ? (b = /* @__PURE__ */ K(v, {
|
|
2217
2290
|
error: g,
|
|
2218
|
-
className:
|
|
2219
|
-
children:
|
|
2220
|
-
}), e[13] = g, e[14] =
|
|
2221
|
-
},
|
|
2222
|
-
let e = Z(4), t =
|
|
2291
|
+
className: Nr,
|
|
2292
|
+
children: y
|
|
2293
|
+
}), e[13] = g, e[14] = y, e[15] = b) : b = e[15], b;
|
|
2294
|
+
}, zr = () => {
|
|
2295
|
+
let e = Z(4), t = me(), { formState: n } = pe(), r, i;
|
|
2223
2296
|
return e[0] !== n || e[1] !== t ? (r = () => {
|
|
2224
2297
|
console.log({
|
|
2225
2298
|
values: t,
|
|
2226
2299
|
formState: n
|
|
2227
2300
|
});
|
|
2228
|
-
}, i = [t, n], e[0] = n, e[1] = t, e[2] = r, e[3] = i) : (r = e[2], i = e[3]),
|
|
2229
|
-
},
|
|
2230
|
-
let t = Z(4), { className: n } = e, { uiConfig: r } =
|
|
2301
|
+
}, i = [t, n], e[0] = n, e[1] = t, e[2] = r, e[3] = i) : (r = e[2], i = e[3]), V(r, i), null;
|
|
2302
|
+
}, Br = "_1vist8m0", Vr = (e) => {
|
|
2303
|
+
let t = Z(4), { className: n } = e, { uiConfig: r } = Dr();
|
|
2231
2304
|
if (r?.hideFormHeading) return null;
|
|
2232
2305
|
let i;
|
|
2233
|
-
t[0] === n ? i = t[1] : (i = Q(
|
|
2306
|
+
t[0] === n ? i = t[1] : (i = Q(Br, n), t[0] = n, t[1] = i);
|
|
2234
2307
|
let a;
|
|
2235
|
-
return t[2] === i ? a = t[3] : (a = /* @__PURE__ */
|
|
2308
|
+
return t[2] === i ? a = t[3] : (a = /* @__PURE__ */ K("h1", {
|
|
2236
2309
|
className: i,
|
|
2237
2310
|
children: "Create new"
|
|
2238
2311
|
}), t[2] = i, t[3] = a), a;
|
|
2239
|
-
},
|
|
2240
|
-
let t = Z(5), { children: n, className: r } = e, { uiConfig: i } =
|
|
2312
|
+
}, Hr = "zx38wb0", Ur = (e) => {
|
|
2313
|
+
let t = Z(5), { children: n, className: r } = e, { uiConfig: i } = Dr();
|
|
2241
2314
|
if (i?.hideSectionHeadings) return null;
|
|
2242
2315
|
let a;
|
|
2243
|
-
t[0] === r ? a = t[1] : (a = Q(
|
|
2316
|
+
t[0] === r ? a = t[1] : (a = Q(Hr, r), t[0] = r, t[1] = a);
|
|
2244
2317
|
let o;
|
|
2245
|
-
return t[2] !== n || t[3] !== a ? (o = /* @__PURE__ */
|
|
2318
|
+
return t[2] !== n || t[3] !== a ? (o = /* @__PURE__ */ K("h3", {
|
|
2246
2319
|
className: a,
|
|
2247
2320
|
children: n
|
|
2248
2321
|
}), t[2] = n, t[3] = a, t[4] = o) : o = t[4], o;
|
|
2249
|
-
},
|
|
2322
|
+
}, Wr = "q22d794", Gr = "q22d795", Kr = "q22d796", qr = "q22d797", Jr = "q22d798", Yr = 5, Xr = "Thank you!", Zr = "Your response has been submitted successfully.", Qr = () => {
|
|
2250
2323
|
let e = Z(1), t;
|
|
2251
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
2324
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ q("svg", {
|
|
2252
2325
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2253
2326
|
viewBox: "0 0 24 24",
|
|
2254
2327
|
fill: "none",
|
|
@@ -2256,10 +2329,10 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2256
2329
|
strokeWidth: "2.5",
|
|
2257
2330
|
strokeLinecap: "round",
|
|
2258
2331
|
strokeLinejoin: "round",
|
|
2259
|
-
children: [/* @__PURE__ */
|
|
2332
|
+
children: [/* @__PURE__ */ K("title", { children: "Check Icon" }), /* @__PURE__ */ K("path", { d: "M20 6 9 17l-5-5" })]
|
|
2260
2333
|
}), e[0] = t) : t = e[0], t;
|
|
2261
|
-
},
|
|
2262
|
-
let { successConfig: t, schema: n } =
|
|
2334
|
+
}, $r = ({ onDismiss: e }) => {
|
|
2335
|
+
let { successConfig: t, schema: n } = Dr(), r = n?.settings?.success_message, [i, a] = W(Yr), o = (e) => !e || e.replace(/<[^>]*>/g, "").trim() === "", s = t?.title || r?.title || Xr, c = t?.message || r?.message, l = o(c) ? Zr : c, u = t?.action || r?.action, d = u?.type ?? "none", f = d === "redirect" ? u?.value : void 0, p = (() => {
|
|
2263
2336
|
if (f) {
|
|
2264
2337
|
if (f.startsWith("/")) return f;
|
|
2265
2338
|
try {
|
|
@@ -2268,50 +2341,50 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2268
2341
|
} catch {}
|
|
2269
2342
|
}
|
|
2270
2343
|
})();
|
|
2271
|
-
|
|
2344
|
+
V(() => {
|
|
2272
2345
|
if (!p) return;
|
|
2273
2346
|
let e = setInterval(() => {
|
|
2274
2347
|
a((t) => t <= 1 ? (clearInterval(e), window.location.href = p, 0) : t - 1);
|
|
2275
2348
|
}, 1e3);
|
|
2276
2349
|
return () => clearInterval(e);
|
|
2277
2350
|
}, [p]);
|
|
2278
|
-
let m =
|
|
2351
|
+
let m = z(() => {
|
|
2279
2352
|
p && (window.location.href = p);
|
|
2280
2353
|
}, [p]);
|
|
2281
|
-
return /* @__PURE__ */
|
|
2282
|
-
className:
|
|
2283
|
-
children: /* @__PURE__ */
|
|
2284
|
-
className:
|
|
2354
|
+
return /* @__PURE__ */ K("div", {
|
|
2355
|
+
className: Wr,
|
|
2356
|
+
children: /* @__PURE__ */ q("div", {
|
|
2357
|
+
className: Gr,
|
|
2285
2358
|
children: [
|
|
2286
|
-
/* @__PURE__ */
|
|
2287
|
-
className: Gr,
|
|
2288
|
-
children: /* @__PURE__ */ G(Zr, {})
|
|
2289
|
-
}),
|
|
2290
|
-
/* @__PURE__ */ G("h2", {
|
|
2359
|
+
/* @__PURE__ */ K("div", {
|
|
2291
2360
|
className: Kr,
|
|
2292
|
-
children:
|
|
2361
|
+
children: /* @__PURE__ */ K(Qr, {})
|
|
2293
2362
|
}),
|
|
2294
|
-
/* @__PURE__ */
|
|
2363
|
+
/* @__PURE__ */ K("h2", {
|
|
2295
2364
|
className: qr,
|
|
2365
|
+
children: s
|
|
2366
|
+
}),
|
|
2367
|
+
/* @__PURE__ */ K("div", {
|
|
2368
|
+
className: Jr,
|
|
2296
2369
|
dangerouslySetInnerHTML: { __html: l }
|
|
2297
2370
|
}),
|
|
2298
|
-
d === "submit_another" && /* @__PURE__ */
|
|
2371
|
+
d === "submit_another" && /* @__PURE__ */ K("div", {
|
|
2299
2372
|
className: "q22d799",
|
|
2300
|
-
children: /* @__PURE__ */
|
|
2373
|
+
children: /* @__PURE__ */ K(y, {
|
|
2301
2374
|
variant: "default",
|
|
2302
2375
|
size: "sm",
|
|
2303
2376
|
onClick: e,
|
|
2304
2377
|
children: "Submit Another"
|
|
2305
2378
|
})
|
|
2306
2379
|
}),
|
|
2307
|
-
d === "redirect" && p && /* @__PURE__ */
|
|
2380
|
+
d === "redirect" && p && /* @__PURE__ */ q("div", {
|
|
2308
2381
|
className: "q22d799",
|
|
2309
|
-
children: [/* @__PURE__ */
|
|
2382
|
+
children: [/* @__PURE__ */ K(y, {
|
|
2310
2383
|
variant: "default",
|
|
2311
2384
|
size: "sm",
|
|
2312
2385
|
onClick: m,
|
|
2313
2386
|
children: "Continue"
|
|
2314
|
-
}), /* @__PURE__ */
|
|
2387
|
+
}), /* @__PURE__ */ q("span", {
|
|
2315
2388
|
className: "q22d79a",
|
|
2316
2389
|
children: [
|
|
2317
2390
|
"Redirecting in ",
|
|
@@ -2323,16 +2396,16 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2323
2396
|
]
|
|
2324
2397
|
})
|
|
2325
2398
|
});
|
|
2326
|
-
},
|
|
2327
|
-
let t = Z(27), { isError: n, contentId: r, getContentId: i, allFormValues: a } = e, { collection: o } =
|
|
2399
|
+
}, ei = (e) => {
|
|
2400
|
+
let t = Z(27), { isError: n, contentId: r, getContentId: i, allFormValues: a } = e, { collection: o } = ae(), { schema: s, isLoggedIn: c, preview: l } = Dr(), { formState: u } = pe(), d = me(), f;
|
|
2328
2401
|
t[0] !== o || t[1] !== r || t[2] !== i || t[3] !== n || t[4] !== c || t[5] !== l || t[6] !== s?.allow_draft || t[7] !== s?.key ? (f = (e) => {
|
|
2329
2402
|
l || s?.key && !n && s?.allow_draft && (c ? r ? o.editDraftEntry(s?.key, r, e).then((e) => {
|
|
2330
2403
|
e?.content?.data?._id && i(e?.content?.data?._id);
|
|
2331
|
-
}).catch(
|
|
2404
|
+
}).catch(ti) : o.saveDraftEntry(s?.key, e).then((e) => {
|
|
2332
2405
|
e?.content?.data?._id && i(e?.content?.data?._id);
|
|
2333
|
-
}).catch(
|
|
2406
|
+
}).catch(ni) : Ar(s?.key, e));
|
|
2334
2407
|
}, t[0] = o, t[1] = r, t[2] = i, t[3] = n, t[4] = c, t[5] = l, t[6] = s?.allow_draft, t[7] = s?.key, t[8] = f) : f = t[8];
|
|
2335
|
-
let p =
|
|
2408
|
+
let p = se(f, 100), { isDirty: m, isSubmitting: h, isSubmitSuccessful: g } = u, _;
|
|
2336
2409
|
t[9] !== a || t[10] !== p || t[11] !== d || t[12] !== m || t[13] !== n || t[14] !== g || t[15] !== h || t[16] !== l ? (_ = () => {
|
|
2337
2410
|
if (!l) {
|
|
2338
2411
|
if (h || g) {
|
|
@@ -2355,63 +2428,63 @@ var er = "_156u72w0", tr = "_156u72w1", nr = (e) => Array.isArray(e) && e.every(
|
|
|
2355
2428
|
h,
|
|
2356
2429
|
g,
|
|
2357
2430
|
l
|
|
2358
|
-
], t[18] = r, t[19] = d, t[20] = m, t[21] = n, t[22] = c, t[23] = g, t[24] = h, t[25] = l, t[26] = v) : v = t[26],
|
|
2431
|
+
], t[18] = r, t[19] = d, t[20] = m, t[21] = n, t[22] = c, t[23] = g, t[24] = h, t[25] = l, t[26] = v) : v = t[26], V(_, v), null;
|
|
2359
2432
|
};
|
|
2360
|
-
function
|
|
2433
|
+
function ti() {
|
|
2361
2434
|
console.error("saving entry failed");
|
|
2362
2435
|
}
|
|
2363
|
-
function
|
|
2436
|
+
function ni() {
|
|
2364
2437
|
console.error("saving entry failed");
|
|
2365
2438
|
}
|
|
2366
2439
|
//#endregion
|
|
2367
2440
|
//#region ../../libraries/react-collection/dist/lib/variants/DefaultFormVariant/DefaultFormVariant.cssm.js
|
|
2368
|
-
var
|
|
2369
|
-
let e = Z(46), { schema: t, containerStyles: n, submitButtonConfig: r, isDisabled: i, widgets:
|
|
2441
|
+
var ri = "fil1ri0", ii = "fil1ri1", ai = "fil1ri2", oi = "fil1ri5", si = () => {
|
|
2442
|
+
let e = Z(46), { schema: t, containerStyles: n, submitButtonConfig: r, isDisabled: i, widgets: a, disableCaptcha: s, debug: c, enableVerification: l, preview: u } = Dr(), d;
|
|
2370
2443
|
e[0] === t ? d = e[1] : (d = {
|
|
2371
2444
|
schema: t,
|
|
2372
2445
|
saveToRemote: !0
|
|
2373
2446
|
}, e[0] = t, e[1] = d);
|
|
2374
|
-
let { methods: f, isError: p, isLoading: m, contentId:
|
|
2447
|
+
let { methods: f, isError: p, isLoading: m, contentId: h, handleContentId: g, handleSubmit: _, allFormValues: v, showSuccessOverlay: b, dismissSuccessOverlay: x } = Mr(d), { formState: S } = f, { isSubmitting: C } = S, w;
|
|
2375
2448
|
e[2] === f ? w = e[3] : (w = f.watch("__captcha"), e[2] = f, e[3] = w);
|
|
2376
2449
|
let T = w;
|
|
2377
2450
|
if (b) {
|
|
2378
2451
|
let t;
|
|
2379
|
-
return e[4] === x ? t = e[5] : (t = /* @__PURE__ */
|
|
2452
|
+
return e[4] === x ? t = e[5] : (t = /* @__PURE__ */ K($r, { onDismiss: x }), e[4] = x, e[5] = t), t;
|
|
2380
2453
|
}
|
|
2381
2454
|
let E;
|
|
2382
|
-
e[6] === c ? E = e[7] : (E = c && /* @__PURE__ */
|
|
2383
|
-
let D =
|
|
2384
|
-
e[8] !==
|
|
2385
|
-
getContentId:
|
|
2455
|
+
e[6] === c ? E = e[7] : (E = c && /* @__PURE__ */ K(zr, {}), e[6] = c, e[7] = E);
|
|
2456
|
+
let D = h || "", O;
|
|
2457
|
+
e[8] !== v || e[9] !== g || e[10] !== p || e[11] !== D ? (O = /* @__PURE__ */ K(ei, {
|
|
2458
|
+
getContentId: g,
|
|
2386
2459
|
isError: p,
|
|
2387
2460
|
contentId: D,
|
|
2388
|
-
allFormValues:
|
|
2389
|
-
}), e[8] =
|
|
2461
|
+
allFormValues: v
|
|
2462
|
+
}), e[8] = v, e[9] = g, e[10] = p, e[11] = D, e[12] = O) : O = e[12];
|
|
2390
2463
|
let k;
|
|
2391
|
-
e[13] === n ? k = e[14] : (k = Q(
|
|
2464
|
+
e[13] === n ? k = e[14] : (k = Q(ri, n), e[13] = n, e[14] = k);
|
|
2392
2465
|
let A;
|
|
2393
|
-
e[15] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */
|
|
2466
|
+
e[15] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ K(Vr, {}), e[15] = A) : A = e[15];
|
|
2394
2467
|
let j = m && "fil1ri3", M;
|
|
2395
|
-
e[16] === j ? M = e[17] : (M = Q(
|
|
2468
|
+
e[16] === j ? M = e[17] : (M = Q(ii, j), e[16] = j, e[17] = M);
|
|
2396
2469
|
let N;
|
|
2397
|
-
e[18] !== l || e[19] !== t || e[20] !==
|
|
2398
|
-
className:
|
|
2399
|
-
children: [e?.label && /* @__PURE__ */
|
|
2400
|
-
className:
|
|
2401
|
-
children: e?.fields?.map((e) => /* @__PURE__ */
|
|
2470
|
+
e[18] !== l || e[19] !== t || e[20] !== a ? (N = t?.sections?.map((e) => o(e?.fields || []) ? null : /* @__PURE__ */ q("div", {
|
|
2471
|
+
className: ai,
|
|
2472
|
+
children: [e?.label && /* @__PURE__ */ K(Ur, { children: e.label }), /* @__PURE__ */ K("div", {
|
|
2473
|
+
className: oi,
|
|
2474
|
+
children: e?.fields?.map((e) => /* @__PURE__ */ K(fr, {
|
|
2402
2475
|
field: e,
|
|
2403
|
-
widgets:
|
|
2476
|
+
widgets: a,
|
|
2404
2477
|
schema: t,
|
|
2405
2478
|
settings: { enableVerification: l }
|
|
2406
2479
|
}, e?.key))
|
|
2407
2480
|
})]
|
|
2408
|
-
}, e.id)), e[18] = l, e[19] = t, e[20] =
|
|
2481
|
+
}, e.id)), e[18] = l, e[19] = t, e[20] = a, e[21] = N) : N = e[21];
|
|
2409
2482
|
let P;
|
|
2410
|
-
e[22] !== s || e[23] !== u ? (P = !s && !u && /* @__PURE__ */
|
|
2483
|
+
e[22] !== s || e[23] !== u ? (P = !s && !u && /* @__PURE__ */ K(Rr, {}), e[22] = s, e[23] = u, e[24] = P) : P = e[24];
|
|
2411
2484
|
let F;
|
|
2412
|
-
e[25] !== T || e[26] !== i || e[27] !== C || e[28] !== r?.show || e[29] !== r?.styles || e[30] !== r?.text ? (F = r?.show && /* @__PURE__ */
|
|
2485
|
+
e[25] !== T || e[26] !== i || e[27] !== C || e[28] !== r?.show || e[29] !== r?.styles || e[30] !== r?.text ? (F = r?.show && /* @__PURE__ */ K("div", {
|
|
2413
2486
|
className: "fil1ri4",
|
|
2414
|
-
children: /* @__PURE__ */
|
|
2487
|
+
children: /* @__PURE__ */ K(y, {
|
|
2415
2488
|
className: r?.styles,
|
|
2416
2489
|
disabled: i || C,
|
|
2417
2490
|
type: "submit",
|
|
@@ -2419,23 +2492,23 @@ var ni = "fil1ri0", ri = "fil1ri1", ii = "fil1ri2", ai = "fil1ri5", oi = () => {
|
|
|
2419
2492
|
})
|
|
2420
2493
|
}), e[25] = T, e[26] = i, e[27] = C, e[28] = r?.show, e[29] = r?.styles, e[30] = r?.text, e[31] = F) : F = e[31];
|
|
2421
2494
|
let I;
|
|
2422
|
-
e[32] !==
|
|
2495
|
+
e[32] !== _ || e[33] !== N || e[34] !== P || e[35] !== F || e[36] !== M ? (I = /* @__PURE__ */ q("form", {
|
|
2423
2496
|
className: M,
|
|
2424
2497
|
id: "collection-form",
|
|
2425
|
-
onSubmit:
|
|
2498
|
+
onSubmit: _,
|
|
2426
2499
|
children: [
|
|
2427
2500
|
N,
|
|
2428
2501
|
P,
|
|
2429
2502
|
F
|
|
2430
2503
|
]
|
|
2431
|
-
}), e[32] =
|
|
2504
|
+
}), e[32] = _, e[33] = N, e[34] = P, e[35] = F, e[36] = M, e[37] = I) : I = e[37];
|
|
2432
2505
|
let L;
|
|
2433
|
-
e[38] !== I || e[39] !== k ? (L = /* @__PURE__ */
|
|
2506
|
+
e[38] !== I || e[39] !== k ? (L = /* @__PURE__ */ q("div", {
|
|
2434
2507
|
className: k,
|
|
2435
2508
|
children: [A, I]
|
|
2436
2509
|
}), e[38] = I, e[39] = k, e[40] = L) : L = e[40];
|
|
2437
2510
|
let R;
|
|
2438
|
-
return e[41] !== f || e[42] !== L || e[43] !== E || e[44] !== O ? (R = /* @__PURE__ */
|
|
2511
|
+
return e[41] !== f || e[42] !== L || e[43] !== E || e[44] !== O ? (R = /* @__PURE__ */ q(le, {
|
|
2439
2512
|
...f,
|
|
2440
2513
|
children: [
|
|
2441
2514
|
E,
|
|
@@ -2443,28 +2516,28 @@ var ni = "fil1ri0", ri = "fil1ri1", ii = "fil1ri2", ai = "fil1ri5", oi = () => {
|
|
|
2443
2516
|
L
|
|
2444
2517
|
]
|
|
2445
2518
|
}), e[41] = f, e[42] = L, e[43] = E, e[44] = O, e[45] = R) : R = e[45], R;
|
|
2446
|
-
},
|
|
2447
|
-
let t = Z(12), { totalSteps: n, currentStepIndex: r, hasLevoErrors: i } = e, { formState: a } =
|
|
2448
|
-
t[0] === l ? u = t[1] : (u = Q(
|
|
2519
|
+
}, ci = "_1kah2gz0", li = "_1kah2gz1", ui = "_1kah2gz3", di = (e) => {
|
|
2520
|
+
let t = Z(12), { totalSteps: n, currentStepIndex: r, hasLevoErrors: i } = e, { formState: a } = pe(), { errors: o } = a, s = Object.keys(o || {}).length > 0 || i, c = Math.floor((r + 1) * 100 / n), l = s && "_1kah2gz2", u;
|
|
2521
|
+
t[0] === l ? u = t[1] : (u = Q(li, l), t[0] = l, t[1] = u);
|
|
2449
2522
|
let d = s && "_1kah2gz4", f;
|
|
2450
|
-
t[2] === d ? f = t[3] : (f = Q(
|
|
2523
|
+
t[2] === d ? f = t[3] : (f = Q(ui, d), t[2] = d, t[3] = f);
|
|
2451
2524
|
let p = `${c}%`, m;
|
|
2452
2525
|
t[4] === p ? m = t[5] : (m = { width: p }, t[4] = p, t[5] = m);
|
|
2453
2526
|
let h;
|
|
2454
|
-
t[6] !== f || t[7] !== m ? (h = /* @__PURE__ */
|
|
2527
|
+
t[6] !== f || t[7] !== m ? (h = /* @__PURE__ */ K("div", {
|
|
2455
2528
|
className: f,
|
|
2456
2529
|
style: m
|
|
2457
2530
|
}), t[6] = f, t[7] = m, t[8] = h) : h = t[8];
|
|
2458
2531
|
let g;
|
|
2459
|
-
return t[9] !== u || t[10] !== h ? (g = /* @__PURE__ */
|
|
2460
|
-
className:
|
|
2461
|
-
children: /* @__PURE__ */
|
|
2532
|
+
return t[9] !== u || t[10] !== h ? (g = /* @__PURE__ */ K("div", {
|
|
2533
|
+
className: ci,
|
|
2534
|
+
children: /* @__PURE__ */ K("div", {
|
|
2462
2535
|
className: u,
|
|
2463
2536
|
children: h
|
|
2464
2537
|
})
|
|
2465
2538
|
}), t[9] = u, t[10] = h, t[11] = g) : g = t[11], g;
|
|
2466
|
-
},
|
|
2467
|
-
let e = Z(74), { disableCaptcha: t, schema: n, widgets: r, submitButtonConfig: i, containerStyles: a, enableVerification: o, preview: s } =
|
|
2539
|
+
}, fi = "_1ypxmcv0", pi = "_1ypxmcv1", mi = "_1ypxmcvb", hi = "_1ypxmcvc", gi = () => {
|
|
2540
|
+
let e = Z(74), { disableCaptcha: t, schema: n, widgets: r, submitButtonConfig: i, containerStyles: a, enableVerification: o, preview: s } = Dr(), c;
|
|
2468
2541
|
bb0: {
|
|
2469
2542
|
if (!n?.sections) {
|
|
2470
2543
|
let t;
|
|
@@ -2472,18 +2545,18 @@ var ni = "fil1ri0", ri = "fil1ri1", ii = "fil1ri2", ai = "fil1ri5", oi = () => {
|
|
|
2472
2545
|
break bb0;
|
|
2473
2546
|
}
|
|
2474
2547
|
let t;
|
|
2475
|
-
e[1] === n.sections ? t = e[2] : (t = n.sections.flatMap(
|
|
2548
|
+
e[1] === n.sections ? t = e[2] : (t = n.sections.flatMap(vi), e[1] = n.sections, e[2] = t), c = t;
|
|
2476
2549
|
}
|
|
2477
|
-
let l = c, [u, d] =
|
|
2550
|
+
let l = c, [u, d] = W(0), [f, p] = W(0), m;
|
|
2478
2551
|
e[3] === Symbol.for("react.memo_cache_sentinel") ? (m = {
|
|
2479
2552
|
state: "entered",
|
|
2480
2553
|
direction: "next"
|
|
2481
2554
|
}, e[3] = m) : m = e[3];
|
|
2482
|
-
let [
|
|
2483
|
-
e[4] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2484
|
-
let [
|
|
2555
|
+
let [h, g] = W(m), _;
|
|
2556
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (_ = [], e[4] = _) : _ = e[4];
|
|
2557
|
+
let [v, b] = W(_), x = h.state === "exiting" ? u : f, S = f === l.length - 1, C = l[x], w;
|
|
2485
2558
|
e[5] === Symbol.for("react.memo_cache_sentinel") ? (w = () => {
|
|
2486
|
-
b([]), p(0),
|
|
2559
|
+
b([]), p(0), g({
|
|
2487
2560
|
state: "exiting",
|
|
2488
2561
|
direction: "next"
|
|
2489
2562
|
});
|
|
@@ -2492,178 +2565,178 @@ var ni = "fil1ri0", ri = "fil1ri1", ii = "fil1ri2", ai = "fil1ri5", oi = () => {
|
|
|
2492
2565
|
e[6] !== f || e[7] !== l ? (T = (e) => {
|
|
2493
2566
|
b(e);
|
|
2494
2567
|
let t = l.findIndex((t) => e.some((e) => e.param === t.content.key));
|
|
2495
|
-
t !== -1 && t !== f && (p(t),
|
|
2568
|
+
t !== -1 && t !== f && (p(t), g({
|
|
2496
2569
|
state: "exiting",
|
|
2497
2570
|
direction: "next"
|
|
2498
2571
|
}));
|
|
2499
2572
|
}, e[6] = f, e[7] = l, e[8] = T) : T = e[8];
|
|
2500
|
-
let { methods: E, handleContentId: D, isError: O, allFormValues: k, contentId: A, isLoading: j, handleSubmit: M, showSuccessOverlay: N, dismissSuccessOverlay: P } =
|
|
2573
|
+
let { methods: E, handleContentId: D, isError: O, allFormValues: k, contentId: A, isLoading: j, handleSubmit: M, showSuccessOverlay: N, dismissSuccessOverlay: P } = Mr({
|
|
2501
2574
|
schema: n,
|
|
2502
2575
|
saveToRemote: S,
|
|
2503
2576
|
setFormErrorAfterSubmit: !1,
|
|
2504
2577
|
onSubmitSuccess: w,
|
|
2505
2578
|
onSubmit: () => {
|
|
2506
|
-
b((e) => e.filter((e) => e?.param !== C?.content?.key)),
|
|
2579
|
+
b((e) => e.filter((e) => e?.param !== C?.content?.key)), B();
|
|
2507
2580
|
},
|
|
2508
2581
|
onSubmitError: T
|
|
2509
2582
|
}), { setFocus: F, setError: I, formState: L } = E, { isSubmitting: R } = L, z;
|
|
2510
|
-
e[9] !==
|
|
2511
|
-
|
|
2583
|
+
e[9] !== h.state || e[10] !== S || e[11] !== l.length ? (z = () => {
|
|
2584
|
+
h.state === "entered" && (S || (p((e) => Math.min(e + 1, l.length - 1)), g({
|
|
2512
2585
|
state: "exiting",
|
|
2513
2586
|
direction: "next"
|
|
2514
2587
|
})));
|
|
2515
|
-
}, e[9] =
|
|
2516
|
-
let
|
|
2517
|
-
e[13] !==
|
|
2518
|
-
|
|
2588
|
+
}, e[9] = h.state, e[10] = S, e[11] = l.length, e[12] = z) : z = e[12];
|
|
2589
|
+
let B = z, H;
|
|
2590
|
+
e[13] !== h.state || e[14] !== f ? (H = () => {
|
|
2591
|
+
h.state === "entered" && (f <= 0 || (p(yi), g({
|
|
2519
2592
|
state: "exiting",
|
|
2520
2593
|
direction: "prev"
|
|
2521
2594
|
})));
|
|
2522
|
-
}, e[13] =
|
|
2523
|
-
let
|
|
2524
|
-
e[16] !==
|
|
2525
|
-
|
|
2595
|
+
}, e[13] = h.state, e[14] = f, e[15] = H) : H = e[15];
|
|
2596
|
+
let U = H, G;
|
|
2597
|
+
e[16] !== h.direction || e[17] !== h.state || e[18] !== C || e[19] !== f || e[20] !== F ? (G = () => {
|
|
2598
|
+
h.state === "exiting" ? (d(f), g({
|
|
2526
2599
|
state: "entering",
|
|
2527
|
-
direction:
|
|
2528
|
-
})) :
|
|
2600
|
+
direction: h.direction
|
|
2601
|
+
})) : h.state === "entering" && (g({
|
|
2529
2602
|
state: "entered",
|
|
2530
|
-
direction:
|
|
2603
|
+
direction: h.direction
|
|
2531
2604
|
}), C?.content?.key && F(C.content.key));
|
|
2532
|
-
}, e[16] =
|
|
2533
|
-
let J =
|
|
2534
|
-
e[22] !== C || e[23] !==
|
|
2535
|
-
if (C &&
|
|
2536
|
-
let e =
|
|
2605
|
+
}, e[16] = h.direction, e[17] = h.state, e[18] = C, e[19] = f, e[20] = F, e[21] = G) : G = e[21];
|
|
2606
|
+
let J = G, Y;
|
|
2607
|
+
e[22] !== C || e[23] !== v || e[24] !== I ? (Y = () => {
|
|
2608
|
+
if (C && v?.length > 0) {
|
|
2609
|
+
let e = v?.find((e) => e?.param === C?.content?.key);
|
|
2537
2610
|
e && I(e?.param, {
|
|
2538
2611
|
type: "server_error",
|
|
2539
2612
|
message: e?.message
|
|
2540
2613
|
});
|
|
2541
2614
|
}
|
|
2542
|
-
}, e[22] = C, e[23] =
|
|
2615
|
+
}, e[22] = C, e[23] = v, e[24] = I, e[25] = Y) : Y = e[25];
|
|
2543
2616
|
let X;
|
|
2544
|
-
if (e[26] !== C || e[27] !==
|
|
2617
|
+
if (e[26] !== C || e[27] !== v ? (X = [C, v], e[26] = C, e[27] = v, e[28] = X) : X = e[28], V(Y, X), !n || l.length === 0) return null;
|
|
2545
2618
|
if (N) {
|
|
2546
2619
|
let t;
|
|
2547
|
-
return e[29] === P ? t = e[30] : (t = /* @__PURE__ */
|
|
2620
|
+
return e[29] === P ? t = e[30] : (t = /* @__PURE__ */ K($r, { onDismiss: P }), e[29] = P, e[30] = t), t;
|
|
2548
2621
|
}
|
|
2549
2622
|
let ee = R || j, te = A || "", ne;
|
|
2550
|
-
e[31] !== k || e[32] !== D || e[33] !== O || e[34] !== te ? (ne = /* @__PURE__ */
|
|
2623
|
+
e[31] !== k || e[32] !== D || e[33] !== O || e[34] !== te ? (ne = /* @__PURE__ */ K(ei, {
|
|
2551
2624
|
getContentId: D,
|
|
2552
2625
|
isError: O,
|
|
2553
2626
|
contentId: te,
|
|
2554
2627
|
allFormValues: k
|
|
2555
2628
|
}), e[31] = k, e[32] = D, e[33] = O, e[34] = te, e[35] = ne) : ne = e[35];
|
|
2556
2629
|
let re;
|
|
2557
|
-
e[36] === Symbol.for("react.memo_cache_sentinel") ? (re = /* @__PURE__ */
|
|
2630
|
+
e[36] === Symbol.for("react.memo_cache_sentinel") ? (re = /* @__PURE__ */ K(Vr, { className: hi }), e[36] = re) : re = e[36];
|
|
2558
2631
|
let ie = C?.sectionLabel, ae;
|
|
2559
|
-
e[37] === ie ? ae = e[38] : (ae = /* @__PURE__ */
|
|
2560
|
-
className:
|
|
2632
|
+
e[37] === ie ? ae = e[38] : (ae = /* @__PURE__ */ K(Ur, {
|
|
2633
|
+
className: mi,
|
|
2561
2634
|
children: ie
|
|
2562
2635
|
}), e[37] = ie, e[38] = ae);
|
|
2563
|
-
let oe = l?.length || 1, se = Array.isArray(
|
|
2564
|
-
e[39] !== f || e[40] !== oe || e[41] !== se ? (
|
|
2636
|
+
let oe = l?.length || 1, se = Array.isArray(v) && v?.length > 0, ce;
|
|
2637
|
+
e[39] !== f || e[40] !== oe || e[41] !== se ? (ce = /* @__PURE__ */ K(di, {
|
|
2565
2638
|
currentStepIndex: f,
|
|
2566
2639
|
totalSteps: oe,
|
|
2567
2640
|
hasLevoErrors: se
|
|
2568
|
-
}), e[39] = f, e[40] = oe, e[41] = se, e[42] =
|
|
2569
|
-
let
|
|
2570
|
-
e[43] !== ae || e[44] !==
|
|
2571
|
-
className:
|
|
2641
|
+
}), e[39] = f, e[40] = oe, e[41] = se, e[42] = ce) : ce = e[42];
|
|
2642
|
+
let ue;
|
|
2643
|
+
e[43] !== ae || e[44] !== ce ? (ue = /* @__PURE__ */ q("div", {
|
|
2644
|
+
className: fi,
|
|
2572
2645
|
children: [
|
|
2573
2646
|
re,
|
|
2574
2647
|
ae,
|
|
2575
|
-
|
|
2648
|
+
ce
|
|
2576
2649
|
]
|
|
2577
|
-
}), e[43] = ae, e[44] =
|
|
2578
|
-
let
|
|
2579
|
-
e[46] === a ?
|
|
2650
|
+
}), e[43] = ae, e[44] = ce, e[45] = ue) : ue = e[45];
|
|
2651
|
+
let $;
|
|
2652
|
+
e[46] === a ? $ = e[47] : ($ = Q(pi, a), e[46] = a, e[47] = $);
|
|
2580
2653
|
let de;
|
|
2581
|
-
e[48] !==
|
|
2654
|
+
e[48] !== h.direction || e[49] !== h.state || e[50] !== C || e[51] !== t || e[52] !== o || e[53] !== J || e[54] !== U || e[55] !== M || e[56] !== ee || e[57] !== S || e[58] !== f || e[59] !== s || e[60] !== n || e[61] !== i?.show || e[62] !== i?.styles || e[63] !== i?.text || e[64] !== r ? (de = C && /* @__PURE__ */ K("div", {
|
|
2582
2655
|
className: "_1ypxmcv6",
|
|
2583
|
-
"data-state":
|
|
2584
|
-
"data-direction":
|
|
2656
|
+
"data-state": h.state,
|
|
2657
|
+
"data-direction": h.direction,
|
|
2585
2658
|
onAnimationEnd: J,
|
|
2586
|
-
children: /* @__PURE__ */
|
|
2659
|
+
children: /* @__PURE__ */ q("form", {
|
|
2587
2660
|
onSubmit: M,
|
|
2588
2661
|
className: "_1ypxmcv7",
|
|
2589
2662
|
children: [
|
|
2590
|
-
/* @__PURE__ */
|
|
2663
|
+
/* @__PURE__ */ K(fr, {
|
|
2591
2664
|
field: C.content,
|
|
2592
2665
|
schema: n,
|
|
2593
2666
|
widgets: r,
|
|
2594
2667
|
settings: { enableVerification: o }
|
|
2595
2668
|
}),
|
|
2596
|
-
!t && !s && S && /* @__PURE__ */
|
|
2597
|
-
/* @__PURE__ */
|
|
2669
|
+
!t && !s && S && /* @__PURE__ */ K(Rr, {}),
|
|
2670
|
+
/* @__PURE__ */ q("div", {
|
|
2598
2671
|
className: "_1ypxmcv8",
|
|
2599
|
-
children: [/* @__PURE__ */
|
|
2672
|
+
children: [/* @__PURE__ */ K("div", { className: "_1ypxmcv9" }), /* @__PURE__ */ q("div", {
|
|
2600
2673
|
className: "_1ypxmcva",
|
|
2601
|
-
children: [/* @__PURE__ */
|
|
2674
|
+
children: [/* @__PURE__ */ q(y, {
|
|
2602
2675
|
type: "button",
|
|
2603
|
-
onClick:
|
|
2676
|
+
onClick: U,
|
|
2604
2677
|
size: "lg",
|
|
2605
|
-
disabled: f === 0 || ee ||
|
|
2678
|
+
disabled: f === 0 || ee || h.state !== "entered",
|
|
2606
2679
|
variant: "ghost",
|
|
2607
|
-
children: [/* @__PURE__ */
|
|
2680
|
+
children: [/* @__PURE__ */ K(ge, {
|
|
2608
2681
|
size: 18,
|
|
2609
2682
|
className: "mr-2"
|
|
2610
2683
|
}), "Prev"]
|
|
2611
|
-
}), (!S || i?.show !== !1) && /* @__PURE__ */
|
|
2684
|
+
}), (!S || i?.show !== !1) && /* @__PURE__ */ K(y, {
|
|
2612
2685
|
type: "submit",
|
|
2613
2686
|
size: "lg",
|
|
2614
2687
|
className: i?.styles,
|
|
2615
|
-
disabled: ee ||
|
|
2688
|
+
disabled: ee || h.state !== "entered",
|
|
2616
2689
|
children: ee ? "Saving..." : S ? i?.text || "Submit" : "Next"
|
|
2617
2690
|
})]
|
|
2618
2691
|
})]
|
|
2619
2692
|
})
|
|
2620
2693
|
]
|
|
2621
2694
|
})
|
|
2622
|
-
}, C.id), e[48] =
|
|
2695
|
+
}, C.id), e[48] = h.direction, e[49] = h.state, e[50] = C, e[51] = t, e[52] = o, e[53] = J, e[54] = U, e[55] = M, e[56] = ee, e[57] = S, e[58] = f, e[59] = s, e[60] = n, e[61] = i?.show, e[62] = i?.styles, e[63] = i?.text, e[64] = r, e[65] = de) : de = e[65];
|
|
2623
2696
|
let fe;
|
|
2624
|
-
e[66] !==
|
|
2625
|
-
className:
|
|
2697
|
+
e[66] !== $ || e[67] !== de ? (fe = /* @__PURE__ */ K("div", {
|
|
2698
|
+
className: $,
|
|
2626
2699
|
children: de
|
|
2627
|
-
}), e[66] =
|
|
2700
|
+
}), e[66] = $, e[67] = de, e[68] = fe) : fe = e[68];
|
|
2628
2701
|
let pe;
|
|
2629
|
-
return e[69] !== E || e[70] !== ne || e[71] !==
|
|
2702
|
+
return e[69] !== E || e[70] !== ne || e[71] !== ue || e[72] !== fe ? (pe = /* @__PURE__ */ q(le, {
|
|
2630
2703
|
...E,
|
|
2631
2704
|
children: [
|
|
2632
2705
|
ne,
|
|
2633
|
-
|
|
2706
|
+
ue,
|
|
2634
2707
|
fe
|
|
2635
2708
|
]
|
|
2636
|
-
}), e[69] = E, e[70] = ne, e[71] =
|
|
2709
|
+
}), e[69] = E, e[70] = ne, e[71] = ue, e[72] = fe, e[73] = pe) : pe = e[73], pe;
|
|
2637
2710
|
};
|
|
2638
|
-
function
|
|
2711
|
+
function _i(e) {
|
|
2639
2712
|
return !e.hidden;
|
|
2640
2713
|
}
|
|
2641
|
-
function
|
|
2642
|
-
return (e.fields?.filter(
|
|
2714
|
+
function vi(e) {
|
|
2715
|
+
return (e.fields?.filter(_i) || []).map((t) => ({
|
|
2643
2716
|
id: t.key,
|
|
2644
2717
|
content: t,
|
|
2645
2718
|
sectionId: e.id || "",
|
|
2646
2719
|
sectionLabel: e.label
|
|
2647
2720
|
}));
|
|
2648
2721
|
}
|
|
2649
|
-
function
|
|
2722
|
+
function yi(e) {
|
|
2650
2723
|
return Math.max(e - 1, 0);
|
|
2651
2724
|
}
|
|
2652
2725
|
//#endregion
|
|
2653
2726
|
//#region ../../libraries/react-collection/dist/lib/variants/StepFormVariant2/StepFormVariant2.cssm.js
|
|
2654
|
-
var
|
|
2655
|
-
let e = Z(85), { disableCaptcha: t, schema: n, widgets: r, submitButtonConfig: i, containerStyles: a, enableVerification: o, preview: s } =
|
|
2727
|
+
var bi = "zlgzzn0", xi = "zlgzzn1", Si = "zlgzznb", Ci = "zlgzznc", wi = () => {
|
|
2728
|
+
let e = Z(85), { disableCaptcha: t, schema: n, widgets: r, submitButtonConfig: i, containerStyles: a, enableVerification: o, preview: s } = Dr();
|
|
2656
2729
|
n?.sections;
|
|
2657
2730
|
let c;
|
|
2658
|
-
e[0] === n?.sections ? c = e[1] : (c = n?.sections?.filter(
|
|
2659
|
-
let l = c, [u, d] =
|
|
2731
|
+
e[0] === n?.sections ? c = e[1] : (c = n?.sections?.filter(Ti) || [], e[0] = n?.sections, e[1] = c);
|
|
2732
|
+
let l = c, [u, d] = W(0), [f, p] = W(0), m;
|
|
2660
2733
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (m = {
|
|
2661
2734
|
state: "entered",
|
|
2662
2735
|
direction: "next"
|
|
2663
2736
|
}, e[2] = m) : m = e[2];
|
|
2664
|
-
let [
|
|
2665
|
-
e[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2666
|
-
let [
|
|
2737
|
+
let [h, g] = W(m), _;
|
|
2738
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (_ = [], e[3] = _) : _ = e[3];
|
|
2739
|
+
let [v, b] = W(_), x = h.state === "exiting" ? u : f, S = l[x], C = f === l.length - 1, w;
|
|
2667
2740
|
bb0: {
|
|
2668
2741
|
if (n) {
|
|
2669
2742
|
let t;
|
|
@@ -2681,7 +2754,7 @@ var yi = "zlgzzn0", bi = "zlgzzn1", xi = "zlgzznb", Si = "zlgzznc", Ci = () => {
|
|
|
2681
2754
|
}
|
|
2682
2755
|
let T = w, E;
|
|
2683
2756
|
e[9] === Symbol.for("react.memo_cache_sentinel") ? (E = () => {
|
|
2684
|
-
b([]), p(0),
|
|
2757
|
+
b([]), p(0), g({
|
|
2685
2758
|
state: "exiting",
|
|
2686
2759
|
direction: "next"
|
|
2687
2760
|
});
|
|
@@ -2690,13 +2763,13 @@ var yi = "zlgzzn0", bi = "zlgzzn1", xi = "zlgzznb", Si = "zlgzznc", Ci = () => {
|
|
|
2690
2763
|
e[10] !== f || e[11] !== l ? (D = (e) => {
|
|
2691
2764
|
if (b(e), Array.isArray(e) && e.length > 0) {
|
|
2692
2765
|
let t = l.findIndex((t) => t.fields?.some((t) => e.some((e) => e.param === t.key)));
|
|
2693
|
-
t !== -1 && t !== f && (p(t),
|
|
2766
|
+
t !== -1 && t !== f && (p(t), g({
|
|
2694
2767
|
state: "exiting",
|
|
2695
2768
|
direction: "next"
|
|
2696
2769
|
}));
|
|
2697
2770
|
}
|
|
2698
2771
|
}, e[10] = f, e[11] = l, e[12] = D) : D = e[12];
|
|
2699
|
-
let { methods: O, handleContentId: k, isError: A, allFormValues: j, contentId: M, isLoading: N, handleSubmit: P, showSuccessOverlay: F, dismissSuccessOverlay: I } =
|
|
2772
|
+
let { methods: O, handleContentId: k, isError: A, allFormValues: j, contentId: M, isLoading: N, handleSubmit: P, showSuccessOverlay: F, dismissSuccessOverlay: I } = Mr({
|
|
2700
2773
|
schema: T,
|
|
2701
2774
|
originalSchema: n,
|
|
2702
2775
|
saveToRemote: C,
|
|
@@ -2704,138 +2777,138 @@ var yi = "zlgzzn0", bi = "zlgzzn1", xi = "zlgzznb", Si = "zlgzznc", Ci = () => {
|
|
|
2704
2777
|
onSubmitSuccess: E,
|
|
2705
2778
|
onSubmit: () => {
|
|
2706
2779
|
b((e) => {
|
|
2707
|
-
let t = S?.fields?.map(
|
|
2780
|
+
let t = S?.fields?.map(Ei) || [];
|
|
2708
2781
|
return e.filter((e) => !t.includes(e.param));
|
|
2709
2782
|
}), J();
|
|
2710
2783
|
},
|
|
2711
2784
|
onSubmitError: D
|
|
2712
|
-
}), { setFocus: L, setError: R, formState: z } = O, { isSubmitting:
|
|
2785
|
+
}), { setFocus: L, setError: R, formState: z } = O, { isSubmitting: B } = z, H;
|
|
2713
2786
|
e[13] === O ? H = e[14] : (H = O.watch("__captcha"), e[13] = O, e[14] = H);
|
|
2714
|
-
let
|
|
2715
|
-
e[15] !==
|
|
2716
|
-
|
|
2787
|
+
let U = H, G;
|
|
2788
|
+
e[15] !== h.state || e[16] !== C || e[17] !== l.length ? (G = () => {
|
|
2789
|
+
h.state === "entered" && (C || (p((e) => Math.min(e + 1, l.length - 1)), g({
|
|
2717
2790
|
state: "exiting",
|
|
2718
2791
|
direction: "next"
|
|
2719
2792
|
})));
|
|
2720
|
-
}, e[15] =
|
|
2721
|
-
let J =
|
|
2722
|
-
e[19] !==
|
|
2723
|
-
|
|
2793
|
+
}, e[15] = h.state, e[16] = C, e[17] = l.length, e[18] = G) : G = e[18];
|
|
2794
|
+
let J = G, Y;
|
|
2795
|
+
e[19] !== h.state || e[20] !== f ? (Y = () => {
|
|
2796
|
+
h.state === "entered" && (f <= 0 || (p(Di), g({
|
|
2724
2797
|
state: "exiting",
|
|
2725
2798
|
direction: "prev"
|
|
2726
2799
|
})));
|
|
2727
|
-
}, e[19] =
|
|
2800
|
+
}, e[19] = h.state, e[20] = f, e[21] = Y) : Y = e[21];
|
|
2728
2801
|
let X = Y, ee;
|
|
2729
|
-
e[22] !==
|
|
2730
|
-
|
|
2802
|
+
e[22] !== h.direction || e[23] !== h.state || e[24] !== S || e[25] !== f || e[26] !== L ? (ee = () => {
|
|
2803
|
+
h.state === "exiting" ? (d(f), g({
|
|
2731
2804
|
state: "entering",
|
|
2732
|
-
direction:
|
|
2733
|
-
})) :
|
|
2805
|
+
direction: h.direction
|
|
2806
|
+
})) : h.state === "entering" && (g({
|
|
2734
2807
|
state: "entered",
|
|
2735
|
-
direction:
|
|
2808
|
+
direction: h.direction
|
|
2736
2809
|
}), S?.fields?.[0]?.key && L(S.fields[0].key));
|
|
2737
|
-
}, e[22] =
|
|
2810
|
+
}, e[22] = h.direction, e[23] = h.state, e[24] = S, e[25] = f, e[26] = L, e[27] = ee) : ee = e[27];
|
|
2738
2811
|
let te = ee, ne;
|
|
2739
|
-
e[28] !==
|
|
2740
|
-
|
|
2812
|
+
e[28] !== h.state || e[29] !== S || e[30] !== v || e[31] !== R ? (ne = () => {
|
|
2813
|
+
v?.length > 0 && S?.fields && h?.state === "entered" && v.forEach((e) => {
|
|
2741
2814
|
S.fields?.some((t) => t.key === e.param) && R(e?.param, {
|
|
2742
2815
|
type: "server_error",
|
|
2743
2816
|
message: e?.message
|
|
2744
2817
|
});
|
|
2745
2818
|
});
|
|
2746
|
-
}, e[28] =
|
|
2819
|
+
}, e[28] = h.state, e[29] = S, e[30] = v, e[31] = R, e[32] = ne) : ne = e[32];
|
|
2747
2820
|
let re;
|
|
2748
|
-
if (e[33] !==
|
|
2749
|
-
|
|
2821
|
+
if (e[33] !== h || e[34] !== S || e[35] !== v || e[36] !== R ? (re = [
|
|
2822
|
+
v,
|
|
2750
2823
|
R,
|
|
2751
2824
|
S,
|
|
2752
|
-
|
|
2753
|
-
], e[33] =
|
|
2825
|
+
h
|
|
2826
|
+
], e[33] = h, e[34] = S, e[35] = v, e[36] = R, e[37] = re) : re = e[37], V(ne, re), !n || l.length === 0) return null;
|
|
2754
2827
|
if (F) {
|
|
2755
2828
|
let t;
|
|
2756
|
-
return e[38] === I ? t = e[39] : (t = /* @__PURE__ */
|
|
2829
|
+
return e[38] === I ? t = e[39] : (t = /* @__PURE__ */ K($r, { onDismiss: I }), e[38] = I, e[39] = t), t;
|
|
2757
2830
|
}
|
|
2758
|
-
let ie =
|
|
2759
|
-
e[40] !== j || e[41] !== k || e[42] !== A || e[43] !== ae ? (oe = /* @__PURE__ */
|
|
2831
|
+
let ie = B || N || U === "verifying" && C, ae = M || "", oe;
|
|
2832
|
+
e[40] !== j || e[41] !== k || e[42] !== A || e[43] !== ae ? (oe = /* @__PURE__ */ K(ei, {
|
|
2760
2833
|
getContentId: k,
|
|
2761
2834
|
isError: A,
|
|
2762
2835
|
contentId: ae,
|
|
2763
2836
|
allFormValues: j
|
|
2764
2837
|
}), e[40] = j, e[41] = k, e[42] = A, e[43] = ae, e[44] = oe) : oe = e[44];
|
|
2765
2838
|
let se;
|
|
2766
|
-
e[45] === Symbol.for("react.memo_cache_sentinel") ? (se = /* @__PURE__ */
|
|
2767
|
-
let
|
|
2768
|
-
e[46] ===
|
|
2769
|
-
className:
|
|
2770
|
-
children:
|
|
2771
|
-
}), e[46] =
|
|
2772
|
-
let
|
|
2773
|
-
e[48] !== f || e[49] !==
|
|
2839
|
+
e[45] === Symbol.for("react.memo_cache_sentinel") ? (se = /* @__PURE__ */ K(Vr, { className: Ci }), e[45] = se) : se = e[45];
|
|
2840
|
+
let ce = S?.label, ue;
|
|
2841
|
+
e[46] === ce ? ue = e[47] : (ue = /* @__PURE__ */ K(Ur, {
|
|
2842
|
+
className: Si,
|
|
2843
|
+
children: ce
|
|
2844
|
+
}), e[46] = ce, e[47] = ue);
|
|
2845
|
+
let $ = l?.length || 1, de = Array.isArray(v) && v?.length > 0, fe;
|
|
2846
|
+
e[48] !== f || e[49] !== $ || e[50] !== de ? (fe = /* @__PURE__ */ K(di, {
|
|
2774
2847
|
currentStepIndex: f,
|
|
2775
|
-
totalSteps:
|
|
2848
|
+
totalSteps: $,
|
|
2776
2849
|
hasLevoErrors: de
|
|
2777
|
-
}), e[48] = f, e[49] =
|
|
2850
|
+
}), e[48] = f, e[49] = $, e[50] = de, e[51] = fe) : fe = e[51];
|
|
2778
2851
|
let pe;
|
|
2779
|
-
e[52] !==
|
|
2780
|
-
className:
|
|
2852
|
+
e[52] !== ue || e[53] !== fe ? (pe = /* @__PURE__ */ q("div", {
|
|
2853
|
+
className: bi,
|
|
2781
2854
|
children: [
|
|
2782
2855
|
se,
|
|
2783
|
-
|
|
2856
|
+
ue,
|
|
2784
2857
|
fe
|
|
2785
2858
|
]
|
|
2786
|
-
}), e[52] =
|
|
2859
|
+
}), e[52] = ue, e[53] = fe, e[54] = pe) : pe = e[54];
|
|
2787
2860
|
let me;
|
|
2788
|
-
e[55] === a ? me = e[56] : (me = Q(
|
|
2789
|
-
let
|
|
2790
|
-
e[57] !==
|
|
2861
|
+
e[55] === a ? me = e[56] : (me = Q(xi, a), e[55] = a, e[56] = me);
|
|
2862
|
+
let he;
|
|
2863
|
+
e[57] !== h.direction || e[58] !== h.state || e[59] !== U || e[60] !== S || e[61] !== t || e[62] !== x || e[63] !== o || e[64] !== te || e[65] !== X || e[66] !== P || e[67] !== ie || e[68] !== C || e[69] !== f || e[70] !== s || e[71] !== n || e[72] !== i?.show || e[73] !== i?.styles || e[74] !== i?.text || e[75] !== r ? (he = S && /* @__PURE__ */ K("div", {
|
|
2791
2864
|
className: "zlgzzn6",
|
|
2792
|
-
"data-state":
|
|
2793
|
-
"data-direction":
|
|
2865
|
+
"data-state": h.state,
|
|
2866
|
+
"data-direction": h.direction,
|
|
2794
2867
|
onAnimationEnd: te,
|
|
2795
|
-
children: /* @__PURE__ */
|
|
2868
|
+
children: /* @__PURE__ */ q("form", {
|
|
2796
2869
|
onSubmit: P,
|
|
2797
2870
|
className: "zlgzzn7",
|
|
2798
2871
|
children: [
|
|
2799
|
-
S.fields?.map((e) => e.hidden ? null : /* @__PURE__ */
|
|
2872
|
+
S.fields?.map((e) => e.hidden ? null : /* @__PURE__ */ K(fr, {
|
|
2800
2873
|
field: e,
|
|
2801
2874
|
schema: n,
|
|
2802
2875
|
widgets: r,
|
|
2803
2876
|
settings: { enableVerification: o }
|
|
2804
2877
|
}, e.key)),
|
|
2805
|
-
!t && !s && C && /* @__PURE__ */
|
|
2806
|
-
/* @__PURE__ */
|
|
2878
|
+
!t && !s && C && /* @__PURE__ */ K(Rr, {}),
|
|
2879
|
+
/* @__PURE__ */ q("div", {
|
|
2807
2880
|
className: "zlgzzn8",
|
|
2808
|
-
children: [/* @__PURE__ */
|
|
2881
|
+
children: [/* @__PURE__ */ K("div", { className: "zlgzzn9" }), /* @__PURE__ */ q("div", {
|
|
2809
2882
|
className: "zlgzzna",
|
|
2810
|
-
children: [/* @__PURE__ */
|
|
2883
|
+
children: [/* @__PURE__ */ q(y, {
|
|
2811
2884
|
type: "button",
|
|
2812
2885
|
onClick: X,
|
|
2813
2886
|
size: "lg",
|
|
2814
|
-
disabled: f === 0 || ie ||
|
|
2887
|
+
disabled: f === 0 || ie || h.state !== "entered",
|
|
2815
2888
|
variant: "ghost",
|
|
2816
|
-
children: [/* @__PURE__ */
|
|
2889
|
+
children: [/* @__PURE__ */ K(ge, {
|
|
2817
2890
|
size: 18,
|
|
2818
2891
|
className: "mr-2"
|
|
2819
2892
|
}), "Prev"]
|
|
2820
|
-
}), (!C || i?.show !== !1) && /* @__PURE__ */
|
|
2893
|
+
}), (!C || i?.show !== !1) && /* @__PURE__ */ K(y, {
|
|
2821
2894
|
type: "submit",
|
|
2822
2895
|
size: "lg",
|
|
2823
2896
|
className: i?.styles,
|
|
2824
|
-
disabled: ie ||
|
|
2825
|
-
children: ie ?
|
|
2897
|
+
disabled: ie || h.state !== "entered",
|
|
2898
|
+
children: ie ? U === "verifying" ? "Verifying..." : "Saving..." : C ? i?.text || "Save" : "Next"
|
|
2826
2899
|
})]
|
|
2827
2900
|
})]
|
|
2828
2901
|
})
|
|
2829
2902
|
]
|
|
2830
2903
|
})
|
|
2831
|
-
}, S.id || x), e[57] =
|
|
2904
|
+
}, S.id || x), e[57] = h.direction, e[58] = h.state, e[59] = U, e[60] = S, e[61] = t, e[62] = x, e[63] = o, e[64] = te, e[65] = X, e[66] = P, e[67] = ie, e[68] = C, e[69] = f, e[70] = s, e[71] = n, e[72] = i?.show, e[73] = i?.styles, e[74] = i?.text, e[75] = r, e[76] = he) : he = e[76];
|
|
2832
2905
|
let _e;
|
|
2833
|
-
e[77] !== me || e[78] !==
|
|
2906
|
+
e[77] !== me || e[78] !== he ? (_e = /* @__PURE__ */ K("div", {
|
|
2834
2907
|
className: me,
|
|
2835
|
-
children:
|
|
2836
|
-
}), e[77] = me, e[78] =
|
|
2908
|
+
children: he
|
|
2909
|
+
}), e[77] = me, e[78] = he, e[79] = _e) : _e = e[79];
|
|
2837
2910
|
let ve;
|
|
2838
|
-
return e[80] !== O || e[81] !== oe || e[82] !== pe || e[83] !== _e ? (ve = /* @__PURE__ */
|
|
2911
|
+
return e[80] !== O || e[81] !== oe || e[82] !== pe || e[83] !== _e ? (ve = /* @__PURE__ */ q(le, {
|
|
2839
2912
|
...O,
|
|
2840
2913
|
children: [
|
|
2841
2914
|
oe,
|
|
@@ -2844,46 +2917,46 @@ var yi = "zlgzzn0", bi = "zlgzzn1", xi = "zlgzznb", Si = "zlgzznc", Ci = () => {
|
|
|
2844
2917
|
]
|
|
2845
2918
|
}), e[80] = O, e[81] = oe, e[82] = pe, e[83] = _e, e[84] = ve) : ve = e[84], ve;
|
|
2846
2919
|
};
|
|
2847
|
-
function wi(e) {
|
|
2848
|
-
return !a(e?.fields || []);
|
|
2849
|
-
}
|
|
2850
2920
|
function Ti(e) {
|
|
2851
|
-
return e
|
|
2921
|
+
return !o(e?.fields || []);
|
|
2852
2922
|
}
|
|
2853
2923
|
function Ei(e) {
|
|
2924
|
+
return e.key;
|
|
2925
|
+
}
|
|
2926
|
+
function Di(e) {
|
|
2854
2927
|
return Math.max(e - 1, 0);
|
|
2855
2928
|
}
|
|
2856
2929
|
//#endregion
|
|
2857
2930
|
//#region ../../libraries/react-collection/dist/lib/variants/StepsFormVariant/StepsFormVariant.cssm.js
|
|
2858
|
-
var
|
|
2859
|
-
let e = Z(6), [t, n] =
|
|
2931
|
+
var Oi = "_1f3ynb50", ki = "_1f3ynb54", Ai = "_1f3ynb55", ji = () => {
|
|
2932
|
+
let e = Z(6), [t, n] = W(0), { containerStyles: r } = Dr(), i;
|
|
2860
2933
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
|
|
2861
|
-
n(
|
|
2934
|
+
n(Ni);
|
|
2862
2935
|
}, e[0] = i) : i = e[0];
|
|
2863
2936
|
let a = i, o;
|
|
2864
2937
|
e[1] === Symbol.for("react.memo_cache_sentinel") ? (o = () => {
|
|
2865
|
-
n(
|
|
2938
|
+
n(Pi);
|
|
2866
2939
|
}, e[1] = o) : o = e[1];
|
|
2867
2940
|
let s = o, c;
|
|
2868
2941
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (c = (e) => {
|
|
2869
2942
|
n(e);
|
|
2870
2943
|
}, e[2] = c) : c = e[2];
|
|
2871
2944
|
let l = c, u;
|
|
2872
|
-
return e[3] !== r || e[4] !== t ? (u = /* @__PURE__ */
|
|
2945
|
+
return e[3] !== r || e[4] !== t ? (u = /* @__PURE__ */ K(Mi, {
|
|
2873
2946
|
currentSectionIndex: t,
|
|
2874
2947
|
handleNext: s,
|
|
2875
2948
|
handlePrev: a,
|
|
2876
2949
|
goToIndex: l,
|
|
2877
2950
|
containerStyles: r
|
|
2878
2951
|
}), e[3] = r, e[4] = t, e[5] = u) : u = e[5], u;
|
|
2879
|
-
},
|
|
2880
|
-
let t = Z(83), { containerStyles: n, currentSectionIndex: r, handleNext: i, handlePrev: a, goToIndex: o } = e, { schema: s, disableCaptcha: c, isDisabled: l, submitButtonConfig: u, widgets: d, enableVerification: f, preview: p } =
|
|
2952
|
+
}, Mi = (e) => {
|
|
2953
|
+
let t = Z(83), { containerStyles: n, currentSectionIndex: r, handleNext: i, handlePrev: a, goToIndex: o } = e, { schema: s, disableCaptcha: c, isDisabled: l, submitButtonConfig: u, widgets: d, enableVerification: f, preview: p } = Dr(), m;
|
|
2881
2954
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (m = [], t[0] = m) : m = t[0];
|
|
2882
|
-
let [
|
|
2955
|
+
let [h, g] = W(m);
|
|
2883
2956
|
s?.sections;
|
|
2884
|
-
let
|
|
2885
|
-
t[1] === s?.sections ?
|
|
2886
|
-
let
|
|
2957
|
+
let _;
|
|
2958
|
+
t[1] === s?.sections ? _ = t[2] : (_ = s?.sections?.filter(Fi) || [], t[1] = s?.sections, t[2] = _);
|
|
2959
|
+
let v = _, b = v?.[r], x;
|
|
2887
2960
|
bb0: {
|
|
2888
2961
|
if (s) {
|
|
2889
2962
|
let e;
|
|
@@ -2899,24 +2972,24 @@ var Di = "_1f3ynb50", Oi = "_1f3ynb54", ki = "_1f3ynb55", Ai = () => {
|
|
|
2899
2972
|
}
|
|
2900
2973
|
x = null;
|
|
2901
2974
|
}
|
|
2902
|
-
let S = x, C = r === Number(
|
|
2975
|
+
let S = x, C = r === Number(v?.length) - 1, w;
|
|
2903
2976
|
t[8] !== b?.fields || t[9] !== i ? (w = () => {
|
|
2904
|
-
|
|
2905
|
-
let t = b?.fields?.map(
|
|
2977
|
+
g((e) => {
|
|
2978
|
+
let t = b?.fields?.map(Ii) || [];
|
|
2906
2979
|
return e.filter((e) => !t.includes(e.param));
|
|
2907
2980
|
}), i();
|
|
2908
2981
|
}, t[8] = b?.fields, t[9] = i, t[10] = w) : w = t[10];
|
|
2909
2982
|
let T;
|
|
2910
2983
|
t[11] === o ? T = t[12] : (T = () => {
|
|
2911
|
-
|
|
2984
|
+
g([]), o(0);
|
|
2912
2985
|
}, t[11] = o, t[12] = T);
|
|
2913
2986
|
let E;
|
|
2914
|
-
t[13] !== o || t[14] !==
|
|
2915
|
-
if (
|
|
2916
|
-
let t =
|
|
2987
|
+
t[13] !== o || t[14] !== v ? (E = (e) => {
|
|
2988
|
+
if (g(e), Array.isArray(e) && e.length > 0) {
|
|
2989
|
+
let t = v.findIndex((t) => t.fields?.some((t) => e.some((e) => e.param === t.key)));
|
|
2917
2990
|
t !== -1 && o(t);
|
|
2918
2991
|
}
|
|
2919
|
-
}, t[13] = o, t[14] =
|
|
2992
|
+
}, t[13] = o, t[14] = v, t[15] = E) : E = t[15];
|
|
2920
2993
|
let D;
|
|
2921
2994
|
t[16] !== C || t[17] !== s || t[18] !== S || t[19] !== w || t[20] !== T || t[21] !== E ? (D = {
|
|
2922
2995
|
schema: S,
|
|
@@ -2927,57 +3000,57 @@ var Di = "_1f3ynb50", Oi = "_1f3ynb54", ki = "_1f3ynb55", Ai = () => {
|
|
|
2927
3000
|
onSubmitSuccess: T,
|
|
2928
3001
|
onSubmitError: E
|
|
2929
3002
|
}, t[16] = C, t[17] = s, t[18] = S, t[19] = w, t[20] = T, t[21] = E, t[22] = D) : D = t[22];
|
|
2930
|
-
let { methods: O, handleSubmit: k, isLoading: A, handleContentId: j, isError: M, contentId: N, allFormValues: P, showSuccessOverlay: F, dismissSuccessOverlay: I } =
|
|
2931
|
-
t[23] === O ?
|
|
2932
|
-
let H =
|
|
2933
|
-
if (t[25] !== b || t[26] !==
|
|
2934
|
-
|
|
3003
|
+
let { methods: O, handleSubmit: k, isLoading: A, handleContentId: j, isError: M, contentId: N, allFormValues: P, showSuccessOverlay: F, dismissSuccessOverlay: I } = Mr(D), { setError: L, formState: R } = O, { isSubmitting: z } = R, B;
|
|
3004
|
+
t[23] === O ? B = t[24] : (B = O.watch("__captcha"), t[23] = O, t[24] = B);
|
|
3005
|
+
let H = B, U, G;
|
|
3006
|
+
if (t[25] !== b || t[26] !== h || t[27] !== L ? (U = () => {
|
|
3007
|
+
h?.length > 0 && b?.fields && h.forEach((e) => {
|
|
2935
3008
|
b.fields?.some((t) => t.key === e.param) && L(e?.param, {
|
|
2936
3009
|
type: "server_error",
|
|
2937
3010
|
message: e?.message
|
|
2938
3011
|
});
|
|
2939
3012
|
});
|
|
2940
|
-
},
|
|
2941
|
-
|
|
3013
|
+
}, G = [
|
|
3014
|
+
h,
|
|
2942
3015
|
L,
|
|
2943
3016
|
b
|
|
2944
|
-
], t[25] = b, t[26] =
|
|
3017
|
+
], t[25] = b, t[26] = h, t[27] = L, t[28] = U, t[29] = G) : (U = t[28], G = t[29]), V(U, G), F) {
|
|
2945
3018
|
let e;
|
|
2946
|
-
return t[30] === I ? e = t[31] : (e = /* @__PURE__ */
|
|
3019
|
+
return t[30] === I ? e = t[31] : (e = /* @__PURE__ */ K($r, { onDismiss: I }), t[30] = I, t[31] = e), e;
|
|
2947
3020
|
}
|
|
2948
3021
|
let J = z || H === "verifying" && C, Y = N || "", X;
|
|
2949
|
-
t[32] !== P || t[33] !== j || t[34] !== M || t[35] !== Y ? (X = /* @__PURE__ */
|
|
3022
|
+
t[32] !== P || t[33] !== j || t[34] !== M || t[35] !== Y ? (X = /* @__PURE__ */ K(ei, {
|
|
2950
3023
|
getContentId: j,
|
|
2951
3024
|
isError: M,
|
|
2952
3025
|
contentId: Y,
|
|
2953
3026
|
allFormValues: P
|
|
2954
3027
|
}), t[32] = P, t[33] = j, t[34] = M, t[35] = Y, t[36] = X) : X = t[36];
|
|
2955
3028
|
let ee = A && "_1f3ynb51", te;
|
|
2956
|
-
t[37] !== n || t[38] !== ee ? (te = Q(
|
|
3029
|
+
t[37] !== n || t[38] !== ee ? (te = Q(Oi, n, ee), t[37] = n, t[38] = ee, t[39] = te) : te = t[39];
|
|
2957
3030
|
let ne;
|
|
2958
|
-
t[40] === Symbol.for("react.memo_cache_sentinel") ? (ne = /* @__PURE__ */
|
|
3031
|
+
t[40] === Symbol.for("react.memo_cache_sentinel") ? (ne = /* @__PURE__ */ K(Vr, {}), t[40] = ne) : ne = t[40];
|
|
2959
3032
|
let re = b?.label || "Details", ie;
|
|
2960
|
-
t[41] === re ? ie = t[42] : (ie = /* @__PURE__ */
|
|
2961
|
-
let ae = r + 1, oe =
|
|
2962
|
-
t[43] !== ae || t[44] !== oe ? (se = /* @__PURE__ */
|
|
3033
|
+
t[41] === re ? ie = t[42] : (ie = /* @__PURE__ */ K("span", { children: re }), t[41] = re, t[42] = ie);
|
|
3034
|
+
let ae = r + 1, oe = v?.length || 1, se;
|
|
3035
|
+
t[43] !== ae || t[44] !== oe ? (se = /* @__PURE__ */ q("span", { children: [
|
|
2963
3036
|
"Step ",
|
|
2964
3037
|
ae,
|
|
2965
3038
|
"/",
|
|
2966
3039
|
oe
|
|
2967
3040
|
] }), t[43] = ae, t[44] = oe, t[45] = se) : se = t[45];
|
|
2968
|
-
let
|
|
2969
|
-
t[46] !== ie || t[47] !== se ? (
|
|
2970
|
-
let
|
|
2971
|
-
t[49] !== b?.fields || t[50] !== f || t[51] !== s || t[52] !== d ? (
|
|
3041
|
+
let ce;
|
|
3042
|
+
t[46] !== ie || t[47] !== se ? (ce = /* @__PURE__ */ q(Ur, { children: [ie, se] }), t[46] = ie, t[47] = se, t[48] = ce) : ce = t[48];
|
|
3043
|
+
let ue;
|
|
3044
|
+
t[49] !== b?.fields || t[50] !== f || t[51] !== s || t[52] !== d ? (ue = b?.fields?.map((e) => e && !e.hidden ? /* @__PURE__ */ K(fr, {
|
|
2972
3045
|
field: e,
|
|
2973
3046
|
widgets: d,
|
|
2974
3047
|
schema: s,
|
|
2975
3048
|
settings: { enableVerification: f }
|
|
2976
|
-
}, e?.key) : null), t[49] = b?.fields, t[50] = f, t[51] = s, t[52] = d, t[53] =
|
|
2977
|
-
let
|
|
2978
|
-
t[54] !== c || t[55] !== C || t[56] !== p ? (
|
|
3049
|
+
}, e?.key) : null), t[49] = b?.fields, t[50] = f, t[51] = s, t[52] = d, t[53] = ue) : ue = t[53];
|
|
3050
|
+
let $;
|
|
3051
|
+
t[54] !== c || t[55] !== C || t[56] !== p ? ($ = !c && !p && C && /* @__PURE__ */ K(Rr, {}), t[54] = c, t[55] = C, t[56] = p, t[57] = $) : $ = t[57];
|
|
2979
3052
|
let de;
|
|
2980
|
-
t[58] !== H || t[59] !== r || t[60] !== a || t[61] !== C ? (de = r === 0 ? /* @__PURE__ */
|
|
3053
|
+
t[58] !== H || t[59] !== r || t[60] !== a || t[61] !== C ? (de = r === 0 ? /* @__PURE__ */ K("div", {}) : /* @__PURE__ */ K(y, {
|
|
2981
3054
|
type: "button",
|
|
2982
3055
|
size: "sm",
|
|
2983
3056
|
variant: "secondary",
|
|
@@ -2988,7 +3061,7 @@ var Di = "_1f3ynb50", Oi = "_1f3ynb54", ki = "_1f3ynb55", Ai = () => {
|
|
|
2988
3061
|
children: "Prev"
|
|
2989
3062
|
}), t[58] = H, t[59] = r, t[60] = a, t[61] = C, t[62] = de) : de = t[62];
|
|
2990
3063
|
let fe = l || J, pe = u?.styles, me = J ? H === "verifying" ? "Verifying..." : "Saving..." : C ? u?.text || "Save" : "Next", he;
|
|
2991
|
-
t[63] !== fe || t[64] !== pe || t[65] !== me ? (he = /* @__PURE__ */
|
|
3064
|
+
t[63] !== fe || t[64] !== pe || t[65] !== me ? (he = /* @__PURE__ */ K(y, {
|
|
2992
3065
|
type: "submit",
|
|
2993
3066
|
size: "sm",
|
|
2994
3067
|
disabled: fe,
|
|
@@ -2996,117 +3069,117 @@ var Di = "_1f3ynb50", Oi = "_1f3ynb54", ki = "_1f3ynb55", Ai = () => {
|
|
|
2996
3069
|
children: me
|
|
2997
3070
|
}), t[63] = fe, t[64] = pe, t[65] = me, t[66] = he) : he = t[66];
|
|
2998
3071
|
let ge;
|
|
2999
|
-
t[67] !== de || t[68] !== he ? (ge = /* @__PURE__ */
|
|
3000
|
-
className:
|
|
3072
|
+
t[67] !== de || t[68] !== he ? (ge = /* @__PURE__ */ q("div", {
|
|
3073
|
+
className: ki,
|
|
3001
3074
|
children: [de, he]
|
|
3002
3075
|
}), t[67] = de, t[68] = he, t[69] = ge) : ge = t[69];
|
|
3003
3076
|
let _e;
|
|
3004
|
-
t[70] !==
|
|
3005
|
-
className:
|
|
3077
|
+
t[70] !== ue || t[71] !== $ || t[72] !== ge ? (_e = /* @__PURE__ */ q("div", {
|
|
3078
|
+
className: Ai,
|
|
3006
3079
|
children: [
|
|
3007
|
-
$,
|
|
3008
3080
|
ue,
|
|
3081
|
+
$,
|
|
3009
3082
|
ge
|
|
3010
3083
|
]
|
|
3011
|
-
}), t[70] =
|
|
3084
|
+
}), t[70] = ue, t[71] = $, t[72] = ge, t[73] = _e) : _e = t[73];
|
|
3012
3085
|
let ve;
|
|
3013
|
-
t[74] !== k || t[75] !== te || t[76] !==
|
|
3086
|
+
t[74] !== k || t[75] !== te || t[76] !== ce || t[77] !== _e ? (ve = /* @__PURE__ */ q("form", {
|
|
3014
3087
|
className: te,
|
|
3015
3088
|
id: "collection-form",
|
|
3016
3089
|
onSubmit: k,
|
|
3017
3090
|
children: [
|
|
3018
3091
|
ne,
|
|
3019
|
-
|
|
3092
|
+
ce,
|
|
3020
3093
|
_e
|
|
3021
3094
|
]
|
|
3022
|
-
}), t[74] = k, t[75] = te, t[76] =
|
|
3095
|
+
}), t[74] = k, t[75] = te, t[76] = ce, t[77] = _e, t[78] = ve) : ve = t[78];
|
|
3023
3096
|
let ye;
|
|
3024
|
-
return t[79] !== O || t[80] !== X || t[81] !== ve ? (ye = /* @__PURE__ */
|
|
3097
|
+
return t[79] !== O || t[80] !== X || t[81] !== ve ? (ye = /* @__PURE__ */ q(le, {
|
|
3025
3098
|
...O,
|
|
3026
3099
|
children: [X, ve]
|
|
3027
3100
|
}), t[79] = O, t[80] = X, t[81] = ve, t[82] = ye) : ye = t[82], ye;
|
|
3028
3101
|
};
|
|
3029
|
-
function Mi(e) {
|
|
3030
|
-
return e - 1;
|
|
3031
|
-
}
|
|
3032
3102
|
function Ni(e) {
|
|
3033
|
-
return e
|
|
3103
|
+
return e - 1;
|
|
3034
3104
|
}
|
|
3035
3105
|
function Pi(e) {
|
|
3036
|
-
return
|
|
3106
|
+
return e + 1;
|
|
3037
3107
|
}
|
|
3038
3108
|
function Fi(e) {
|
|
3109
|
+
return !o(e?.fields || []);
|
|
3110
|
+
}
|
|
3111
|
+
function Ii(e) {
|
|
3039
3112
|
return e.key;
|
|
3040
3113
|
}
|
|
3041
3114
|
//#endregion
|
|
3042
3115
|
//#region ../../libraries/react-collection/dist/lib/FormBuilder/index.js
|
|
3043
|
-
var
|
|
3116
|
+
var Li = (e) => {
|
|
3044
3117
|
let t = Z(11), n, r, i;
|
|
3045
3118
|
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);
|
|
3046
3119
|
let a = i === void 0 ? !0 : i, o;
|
|
3047
|
-
t[4] === n ? o = t[5] : (o =
|
|
3120
|
+
t[4] === n ? o = t[5] : (o = K(n === "single-field" ? gi : n === "steps" ? ji : n === "steps-2" ? wi : si, {}), t[4] = n, t[5] = o);
|
|
3048
3121
|
let s;
|
|
3049
|
-
return t[6] !== a || t[7] !== n || t[8] !== r || t[9] !== o ? (s = /* @__PURE__ */
|
|
3122
|
+
return t[6] !== a || t[7] !== n || t[8] !== r || t[9] !== o ? (s = /* @__PURE__ */ K(Er, {
|
|
3050
3123
|
...r,
|
|
3051
3124
|
enableVerification: a,
|
|
3052
3125
|
variant: n,
|
|
3053
3126
|
children: o
|
|
3054
3127
|
}), t[6] = a, t[7] = n, t[8] = r, t[9] = o, t[10] = s) : s = t[10], s;
|
|
3055
|
-
},
|
|
3128
|
+
}, Ri = "_1jed92w2", zi = "_1jed92w3 _1jed92w1", Bi = "_1jed92w4 _1jed92w1", Vi = "_1jed92w5 _1jed92w1", Hi = "_1jed92w6 _1jed92w1", Ui = () => {
|
|
3056
3129
|
let e = Z(1), t;
|
|
3057
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
3058
|
-
className:
|
|
3130
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ q("div", {
|
|
3131
|
+
className: Ri,
|
|
3059
3132
|
children: [
|
|
3060
|
-
/* @__PURE__ */
|
|
3061
|
-
/* @__PURE__ */
|
|
3062
|
-
/* @__PURE__ */
|
|
3133
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("div", { className: zi }), /* @__PURE__ */ K("div", { className: Vi })] }),
|
|
3134
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("div", { className: Bi }), /* @__PURE__ */ K("div", { className: Vi })] }),
|
|
3135
|
+
/* @__PURE__ */ K("div", { className: Hi })
|
|
3063
3136
|
]
|
|
3064
3137
|
}), e[0] = t) : t = e[0], t;
|
|
3065
|
-
},
|
|
3138
|
+
}, Wi = (e) => {
|
|
3066
3139
|
let t = Z(17), n, r, i, a;
|
|
3067
3140
|
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);
|
|
3068
|
-
let o = a === void 0 ? !0 : a, { collection: s } =
|
|
3141
|
+
let o = a === void 0 ? !0 : a, { collection: s } = ae(), [c, l] = W(!0), [u, d] = W(null), f;
|
|
3069
3142
|
t[5] !== s || t[6] !== n || t[7] !== r || t[8] !== i?.workspace_id ? (f = () => {
|
|
3070
3143
|
n ? s?.getCollectionByIDExpanded(n, { headers: { "Levo-Workspace": i?.workspace_id } }).then((e) => {
|
|
3071
3144
|
let t = e?.content?.data;
|
|
3072
3145
|
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);
|
|
3073
3146
|
else throw Error(`API response invalid: ${t}`);
|
|
3074
|
-
}).catch(
|
|
3147
|
+
}).catch(Gi).finally(() => {
|
|
3075
3148
|
l(!1);
|
|
3076
3149
|
}) : (console.error("[CollectionFormBuilder] Collection ID or Workspace ID is missing."), l(!1));
|
|
3077
3150
|
}, t[5] = s, t[6] = n, t[7] = r, t[8] = i?.workspace_id, t[9] = f) : f = t[9];
|
|
3078
3151
|
let p;
|
|
3079
|
-
t[10] === n ? p = t[11] : (p = [n], t[10] = n, t[11] = p),
|
|
3152
|
+
t[10] === n ? p = t[11] : (p = [n], t[10] = n, t[11] = p), V(f, p);
|
|
3080
3153
|
let m;
|
|
3081
|
-
return t[12] !== o || t[13] !== c || t[14] !== i || t[15] !== u ? (m = c ? /* @__PURE__ */
|
|
3154
|
+
return t[12] !== o || t[13] !== c || t[14] !== i || t[15] !== u ? (m = c ? /* @__PURE__ */ K(Ui, {}) : u ? /* @__PURE__ */ K(Li, {
|
|
3082
3155
|
schema: u,
|
|
3083
3156
|
enableVerification: o,
|
|
3084
3157
|
...i
|
|
3085
3158
|
}) : null, t[12] = o, t[13] = c, t[14] = i, t[15] = u, t[16] = m) : m = t[16], m;
|
|
3086
3159
|
};
|
|
3087
|
-
function
|
|
3160
|
+
function Gi(e) {
|
|
3088
3161
|
console.error("Error fetching schema", e);
|
|
3089
3162
|
}
|
|
3090
3163
|
//#endregion
|
|
3091
3164
|
//#region ../../libraries/react-collection/dist/lib/CollectionFormRenderer/index.js
|
|
3092
|
-
var
|
|
3093
|
-
let a =
|
|
3165
|
+
var Ki = ({ hiddenFields: e, fetchedSchema: t, isLoading: n, enableVerification: r = !0, ...i }) => {
|
|
3166
|
+
let a = H(() => {
|
|
3094
3167
|
let n = { ...t };
|
|
3095
3168
|
return n.sections = n?.sections?.map((t) => (t.fields = t?.fields?.map((t) => ((e?.includes(t?.key) || e?.includes(t?.id)) && (t.hidden = !0), t)), t)), n;
|
|
3096
3169
|
}, [t]);
|
|
3097
|
-
return n ? /* @__PURE__ */
|
|
3170
|
+
return n ? /* @__PURE__ */ K(Ui, {}) : a ? /* @__PURE__ */ K(Li, {
|
|
3098
3171
|
schema: a,
|
|
3099
3172
|
enableVerification: r,
|
|
3100
3173
|
...i
|
|
3101
3174
|
}) : null;
|
|
3102
|
-
},
|
|
3103
|
-
CollectionForm: () =>
|
|
3104
|
-
CollectionFormBuilder: () =>
|
|
3105
|
-
CollectionFormRenderer: () =>
|
|
3106
|
-
FormBuilder: () =>
|
|
3107
|
-
LevoFormProvider: () =>
|
|
3108
|
-
useLevoForm: () =>
|
|
3109
|
-
useLevoFormContext: () =>
|
|
3175
|
+
}, qi = /* @__PURE__ */ e({
|
|
3176
|
+
CollectionForm: () => wr,
|
|
3177
|
+
CollectionFormBuilder: () => Wi,
|
|
3178
|
+
CollectionFormRenderer: () => Ki,
|
|
3179
|
+
FormBuilder: () => Li,
|
|
3180
|
+
LevoFormProvider: () => Er,
|
|
3181
|
+
useLevoForm: () => Mr,
|
|
3182
|
+
useLevoFormContext: () => Dr
|
|
3110
3183
|
});
|
|
3111
3184
|
//#endregion
|
|
3112
|
-
export {
|
|
3185
|
+
export { Mr as a, wr as c, fr as d, lr as f, Ot as h, Li as i, _r as l, Ht as m, Ki as n, Er as o, Vt as p, Wi as r, Dr as s, qi as t, gr as u };
|