@billgangcom/theme-lib 1.33.2 → 1.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder/components/Preview/PreviewHeader/index.d.ts +1 -0
- package/dist/builder/constants/block-icons.d.ts +15 -0
- package/dist/builder/constants/index.d.ts +1 -0
- package/dist/builder/store/index.d.ts +1 -0
- package/dist/builder/store/useSubmodalStore.d.ts +7 -5
- package/dist/builder/store/useTooltipStore.d.ts +6 -0
- package/dist/builder/ui/Submodal/index.d.ts +1 -0
- package/dist/builder/ui/Tooltip/index.d.ts +6 -0
- package/dist/builder.cjs.js +46 -46
- package/dist/builder.es.js +1639 -1444
- package/dist/{index-Dfo5ydyB.js → index-fMRXTmQw.js} +15212 -14635
- package/dist/index-miO7bKV5.cjs +149 -0
- package/dist/ui/HeaderButtons/index.d.ts +1 -0
- package/dist/ui/LayoutSettings/index.d.ts +1 -0
- package/dist/ui/ListingSelector/index.d.ts +31 -2
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1681 -1508
- package/package.json +5 -4
- package/dist/index-CLg_NJ6J.cjs +0 -146
package/dist/ui.es.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import {
|
|
1
|
+
import { j as t, I as v, c as V, a as X, S as tt, T as Ot, C as gt, b as et, u as $t, d as It, D as Nt, e as wt, v as Ct, B as at, f as mt, P as Bt, g as St, h as Tt, i as Ht, k as bt, l as Pt, m as qt, M as Et, n as Dt, o as zt } from "./index-fMRXTmQw.js";
|
|
2
|
+
import { p as fa, L as xa } from "./index-fMRXTmQw.js";
|
|
3
3
|
import g from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
|
-
const
|
|
6
|
-
wrapper:
|
|
7
|
-
alignmentBlock:
|
|
8
|
-
title:
|
|
9
|
-
subtitle:
|
|
10
|
-
alignmentContent:
|
|
11
|
-
alignments:
|
|
12
|
-
alignment:
|
|
13
|
-
circle:
|
|
14
|
-
paddings:
|
|
15
|
-
padding:
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibiw_15", Yt = "_subtitle_3ibiw_22", Gt = "_alignmentContent_3ibiw_29", Wt = "_alignments_3ibiw_37", Xt = "_alignment_3ibiw_8", Jt = "_circle_3ibiw_63", Qt = "_paddings_3ibiw_70", Kt = "_padding_3ibiw_70", Zt = "_active_3ibiw_94", te = "_input_3ibiw_101", J = {
|
|
6
|
+
wrapper: Ft,
|
|
7
|
+
alignmentBlock: Vt,
|
|
8
|
+
title: Ut,
|
|
9
|
+
subtitle: Yt,
|
|
10
|
+
alignmentContent: Gt,
|
|
11
|
+
alignments: Wt,
|
|
12
|
+
alignment: Xt,
|
|
13
|
+
circle: Jt,
|
|
14
|
+
paddings: Qt,
|
|
15
|
+
padding: Kt,
|
|
16
|
+
active: Zt,
|
|
17
|
+
input: te
|
|
18
|
+
}, ee = [
|
|
18
19
|
"topLeft",
|
|
19
20
|
"top",
|
|
20
21
|
"topRight",
|
|
@@ -24,10 +25,10 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
24
25
|
"bottomLeft",
|
|
25
26
|
"bottom",
|
|
26
27
|
"bottomRight"
|
|
27
|
-
],
|
|
28
|
-
const { alignment:
|
|
29
|
-
function
|
|
30
|
-
switch (
|
|
28
|
+
], se = ["left", "top", "right", "bottom"], ia = (r) => {
|
|
29
|
+
const { alignment: c, padding: e, setPadding: s, setAlignment: i } = r;
|
|
30
|
+
function a() {
|
|
31
|
+
switch (c) {
|
|
31
32
|
case "left":
|
|
32
33
|
case "topLeft":
|
|
33
34
|
case "bottomLeft":
|
|
@@ -56,12 +57,13 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
56
57
|
return "AlignBottom";
|
|
57
58
|
}
|
|
58
59
|
}
|
|
60
|
+
const [h, n] = g.useState(null);
|
|
59
61
|
return /* @__PURE__ */ t.jsxs("div", { className: J.layout, children: [
|
|
60
62
|
/* @__PURE__ */ t.jsx("h3", { className: J.title, children: "Layout" }),
|
|
61
63
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentBlock, children: [
|
|
62
64
|
/* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: "Alignment" }),
|
|
63
65
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentContent, children: [
|
|
64
|
-
/* @__PURE__ */ t.jsx("div", { className: J.alignments, children:
|
|
66
|
+
/* @__PURE__ */ t.jsx("div", { className: J.alignments, children: ee.map((o) => /* @__PURE__ */ t.jsxs(
|
|
65
67
|
"div",
|
|
66
68
|
{
|
|
67
69
|
onClick: () => {
|
|
@@ -69,11 +71,11 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
69
71
|
},
|
|
70
72
|
className: J.alignment,
|
|
71
73
|
children: [
|
|
72
|
-
o !==
|
|
73
|
-
o ===
|
|
74
|
-
|
|
74
|
+
o !== c && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
|
|
75
|
+
o === c && /* @__PURE__ */ t.jsx(
|
|
76
|
+
v,
|
|
75
77
|
{
|
|
76
|
-
name:
|
|
78
|
+
name: a(),
|
|
77
79
|
fill: "#FF3F19",
|
|
78
80
|
width: 22,
|
|
79
81
|
height: 22
|
|
@@ -83,13 +85,21 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
83
85
|
},
|
|
84
86
|
o
|
|
85
87
|
)) }),
|
|
86
|
-
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children:
|
|
88
|
+
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children: se.map((o) => /* @__PURE__ */ t.jsxs(
|
|
87
89
|
"label",
|
|
88
90
|
{
|
|
89
|
-
className: J.padding,
|
|
91
|
+
className: V(J.padding, {
|
|
92
|
+
[J.active]: h === o
|
|
93
|
+
}),
|
|
94
|
+
onFocus: () => {
|
|
95
|
+
n(o);
|
|
96
|
+
},
|
|
97
|
+
onBlur: () => {
|
|
98
|
+
n(null);
|
|
99
|
+
},
|
|
90
100
|
children: [
|
|
91
101
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
92
|
-
|
|
102
|
+
v,
|
|
93
103
|
{
|
|
94
104
|
name: l(o),
|
|
95
105
|
width: 20,
|
|
@@ -97,13 +107,13 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
97
107
|
}
|
|
98
108
|
) }),
|
|
99
109
|
/* @__PURE__ */ t.jsx(
|
|
100
|
-
|
|
110
|
+
X,
|
|
101
111
|
{
|
|
102
112
|
type: "number",
|
|
103
113
|
value: String(e[o]),
|
|
104
|
-
onChange: (
|
|
114
|
+
onChange: (f) => s({
|
|
105
115
|
...e,
|
|
106
|
-
[o]: Number(
|
|
116
|
+
[o]: Number(f)
|
|
107
117
|
}),
|
|
108
118
|
paddingless: !0,
|
|
109
119
|
borderless: !0
|
|
@@ -116,19 +126,19 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
116
126
|
] })
|
|
117
127
|
] })
|
|
118
128
|
] });
|
|
119
|
-
},
|
|
120
|
-
title:
|
|
121
|
-
subtitle:
|
|
122
|
-
header:
|
|
123
|
-
text:
|
|
124
|
-
top:
|
|
125
|
-
itemsBlock:
|
|
126
|
-
},
|
|
127
|
-
typeTexts:
|
|
128
|
-
block:
|
|
129
|
-
active:
|
|
130
|
-
},
|
|
131
|
-
const { typesText:
|
|
129
|
+
}, ne = "_title_1jkiw_1", ie = "_subtitle_1jkiw_5", oe = "_header_1jkiw_12", ae = "_text_1jkiw_13", ce = "_top_1jkiw_20", le = "_itemsBlock_1jkiw_29", ht = {
|
|
130
|
+
title: ne,
|
|
131
|
+
subtitle: ie,
|
|
132
|
+
header: oe,
|
|
133
|
+
text: ae,
|
|
134
|
+
top: ce,
|
|
135
|
+
itemsBlock: le
|
|
136
|
+
}, re = "_typeTexts_167ez_1", de = "_block_167ez_8", ue = "_active_167ez_25", vt = {
|
|
137
|
+
typeTexts: re,
|
|
138
|
+
block: de,
|
|
139
|
+
active: ue
|
|
140
|
+
}, me = ["bold", "italic", "underline", "strike-through", "code"], Lt = (r) => {
|
|
141
|
+
const { typesText: c, setTypesText: e } = r;
|
|
132
142
|
function s(i) {
|
|
133
143
|
switch (i) {
|
|
134
144
|
case "bold":
|
|
@@ -143,25 +153,25 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
143
153
|
return "TextUnderline";
|
|
144
154
|
}
|
|
145
155
|
}
|
|
146
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
156
|
+
return /* @__PURE__ */ t.jsx("div", { className: vt.typeTexts, children: me.map((i) => /* @__PURE__ */ t.jsx(
|
|
147
157
|
"div",
|
|
148
158
|
{
|
|
149
|
-
className:
|
|
150
|
-
[
|
|
159
|
+
className: V(vt.block, {
|
|
160
|
+
[vt.active]: c.includes(i)
|
|
151
161
|
}),
|
|
152
162
|
onClick: () => {
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
const l =
|
|
163
|
+
const a = [...c];
|
|
164
|
+
if (a.includes(i)) {
|
|
165
|
+
const l = a.filter((h) => h !== i);
|
|
156
166
|
e(l);
|
|
157
167
|
} else
|
|
158
|
-
|
|
168
|
+
a.push(i), e(a);
|
|
159
169
|
},
|
|
160
170
|
children: /* @__PURE__ */ t.jsx(
|
|
161
|
-
|
|
171
|
+
v,
|
|
162
172
|
{
|
|
163
173
|
name: s(i),
|
|
164
|
-
fill:
|
|
174
|
+
fill: c.includes(i) ? "#252525" : "#757575",
|
|
165
175
|
width: 20,
|
|
166
176
|
height: 20
|
|
167
177
|
}
|
|
@@ -169,81 +179,82 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
169
179
|
},
|
|
170
180
|
String(i)
|
|
171
181
|
)) });
|
|
172
|
-
},
|
|
182
|
+
}, Rt = (r) => {
|
|
173
183
|
const {
|
|
174
|
-
typesText:
|
|
184
|
+
typesText: c,
|
|
175
185
|
isActiveText: e,
|
|
176
186
|
setIsActiveText: s,
|
|
177
187
|
text: i,
|
|
178
|
-
setText:
|
|
188
|
+
setText: a,
|
|
179
189
|
setTypesText: l,
|
|
180
|
-
title:
|
|
190
|
+
title: h,
|
|
181
191
|
subtitle: n = "Items"
|
|
182
|
-
} =
|
|
183
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
184
|
-
(
|
|
185
|
-
|
|
192
|
+
} = r;
|
|
193
|
+
return /* @__PURE__ */ t.jsxs("div", { className: ht.text, children: [
|
|
194
|
+
(h || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ht.top, children: [
|
|
195
|
+
h && /* @__PURE__ */ t.jsx("h3", { className: ht.title, children: h }),
|
|
186
196
|
e !== void 0 && s && /* @__PURE__ */ t.jsx(
|
|
187
|
-
|
|
197
|
+
tt,
|
|
188
198
|
{
|
|
189
199
|
current: e,
|
|
190
|
-
onChange: (
|
|
200
|
+
onChange: (o) => s(o)
|
|
191
201
|
}
|
|
192
202
|
)
|
|
193
203
|
] }),
|
|
194
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
195
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
204
|
+
/* @__PURE__ */ t.jsxs("div", { className: ht.itemsBlock, children: [
|
|
205
|
+
/* @__PURE__ */ t.jsx("h5", { className: ht.subtitle, children: n }),
|
|
196
206
|
/* @__PURE__ */ t.jsx(
|
|
197
|
-
|
|
207
|
+
Ot,
|
|
198
208
|
{
|
|
199
|
-
onChange: (
|
|
209
|
+
onChange: (o) => a(o),
|
|
200
210
|
value: i,
|
|
201
211
|
maxLength: 150
|
|
202
212
|
}
|
|
203
213
|
),
|
|
204
214
|
/* @__PURE__ */ t.jsx(
|
|
205
|
-
|
|
215
|
+
Lt,
|
|
206
216
|
{
|
|
207
|
-
typesText:
|
|
217
|
+
typesText: c,
|
|
208
218
|
setTypesText: l
|
|
209
219
|
}
|
|
210
220
|
)
|
|
211
221
|
] })
|
|
212
222
|
] });
|
|
213
|
-
},
|
|
214
|
-
title:
|
|
215
|
-
subtitle:
|
|
216
|
-
header:
|
|
217
|
-
text:
|
|
218
|
-
productsBlock:
|
|
219
|
-
top:
|
|
220
|
-
itemsBlock:
|
|
221
|
-
typeTexts:
|
|
222
|
-
block:
|
|
223
|
-
active:
|
|
224
|
-
products:
|
|
225
|
-
product:
|
|
226
|
-
button:
|
|
227
|
-
disabled:
|
|
228
|
-
image:
|
|
229
|
-
info:
|
|
230
|
-
name:
|
|
231
|
-
buttons:
|
|
232
|
-
modal:
|
|
233
|
-
link:
|
|
234
|
-
modalOptions:
|
|
235
|
-
addButton:
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
223
|
+
}, he = "_title_157lh_1", _e = "_subtitle_157lh_5", pe = "_header_157lh_12", ge = "_text_157lh_13", fe = "_productsBlock_157lh_14", xe = "_top_157lh_26", be = "_itemsBlock_157lh_35", je = "_typeTexts_157lh_41", ve = "_block_157lh_48", ye = "_active_157lh_61", ke = "_products_157lh_14", $e = "_product_157lh_14", Ie = "_button_157lh_80", Ne = "_disabled_157lh_91", we = "_image_157lh_95", Ce = "_info_157lh_102", Be = "_name_157lh_114", Se = "_buttons_157lh_118", Te = "_modal_157lh_125", Pe = "_link_157lh_145", Ae = "_modalOptions_157lh_151", Oe = "_addButton_157lh_163", qe = "_deleteButton_157lh_178", z = {
|
|
224
|
+
title: he,
|
|
225
|
+
subtitle: _e,
|
|
226
|
+
header: pe,
|
|
227
|
+
text: ge,
|
|
228
|
+
productsBlock: fe,
|
|
229
|
+
top: xe,
|
|
230
|
+
itemsBlock: be,
|
|
231
|
+
typeTexts: je,
|
|
232
|
+
block: ve,
|
|
233
|
+
active: ye,
|
|
234
|
+
products: ke,
|
|
235
|
+
product: $e,
|
|
236
|
+
button: Ie,
|
|
237
|
+
disabled: Ne,
|
|
238
|
+
image: we,
|
|
239
|
+
info: Ce,
|
|
240
|
+
name: Be,
|
|
241
|
+
buttons: Se,
|
|
242
|
+
modal: Te,
|
|
243
|
+
link: Pe,
|
|
244
|
+
modalOptions: Ae,
|
|
245
|
+
addButton: Oe,
|
|
246
|
+
deleteButton: qe
|
|
247
|
+
}, Ee = g.forwardRef(
|
|
248
|
+
(r, c) => {
|
|
249
|
+
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = r;
|
|
250
|
+
function h(n, o) {
|
|
251
|
+
return n.length > o ? `${n.slice(0, o)}...` : n;
|
|
241
252
|
}
|
|
242
253
|
return /* @__PURE__ */ t.jsxs(
|
|
243
254
|
"div",
|
|
244
255
|
{
|
|
245
|
-
ref:
|
|
246
|
-
className:
|
|
256
|
+
ref: c,
|
|
257
|
+
className: z.modal,
|
|
247
258
|
onClick: (n) => {
|
|
248
259
|
n.stopPropagation();
|
|
249
260
|
},
|
|
@@ -252,10 +263,10 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
252
263
|
left: `${i.left}px`
|
|
253
264
|
},
|
|
254
265
|
children: [
|
|
255
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
256
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
266
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
267
|
+
/* @__PURE__ */ t.jsx("h3", { className: z.title, children: h(e.name, 20) }),
|
|
257
268
|
/* @__PURE__ */ t.jsx(
|
|
258
|
-
|
|
269
|
+
v,
|
|
259
270
|
{
|
|
260
271
|
name: "X",
|
|
261
272
|
height: 20,
|
|
@@ -267,56 +278,56 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
267
278
|
}
|
|
268
279
|
)
|
|
269
280
|
] }),
|
|
270
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
281
|
+
/* @__PURE__ */ t.jsx("div", { className: z.modalOptions, children: a.map((n) => {
|
|
271
282
|
if (n.type === "image")
|
|
272
283
|
return /* @__PURE__ */ t.jsx(
|
|
273
|
-
|
|
284
|
+
gt,
|
|
274
285
|
{
|
|
275
286
|
label: "Put up an attractive image",
|
|
276
287
|
activeImage: e[n.field],
|
|
277
|
-
onChange: (
|
|
278
|
-
const
|
|
288
|
+
onChange: (o) => {
|
|
289
|
+
const f = {
|
|
279
290
|
...e,
|
|
280
|
-
[n.field]:
|
|
291
|
+
[n.field]: o
|
|
281
292
|
};
|
|
282
|
-
s(
|
|
293
|
+
s(f);
|
|
283
294
|
}
|
|
284
295
|
},
|
|
285
296
|
String(n.field)
|
|
286
297
|
);
|
|
287
298
|
if (n.type === "text")
|
|
288
299
|
return /* @__PURE__ */ t.jsx(
|
|
289
|
-
|
|
300
|
+
Rt,
|
|
290
301
|
{
|
|
291
302
|
typesText: e[n.field.type],
|
|
292
|
-
setTypesText: (
|
|
293
|
-
const
|
|
303
|
+
setTypesText: (o) => {
|
|
304
|
+
const f = {
|
|
294
305
|
...e,
|
|
295
|
-
[n.field.type]:
|
|
306
|
+
[n.field.type]: o
|
|
296
307
|
};
|
|
297
|
-
s(
|
|
308
|
+
s(f);
|
|
298
309
|
},
|
|
299
310
|
text: e[n.field.text] || "",
|
|
300
|
-
setText: (
|
|
301
|
-
const
|
|
311
|
+
setText: (o) => {
|
|
312
|
+
const f = {
|
|
302
313
|
...e,
|
|
303
|
-
[n.field.text]:
|
|
314
|
+
[n.field.text]: o
|
|
304
315
|
};
|
|
305
|
-
s(
|
|
316
|
+
s(f);
|
|
306
317
|
},
|
|
307
318
|
subtitle: n.label
|
|
308
319
|
}
|
|
309
320
|
);
|
|
310
321
|
if (n.type === "input")
|
|
311
322
|
return /* @__PURE__ */ t.jsx(
|
|
312
|
-
|
|
323
|
+
X,
|
|
313
324
|
{
|
|
314
|
-
onChange: (
|
|
315
|
-
const
|
|
325
|
+
onChange: (o) => {
|
|
326
|
+
const f = {
|
|
316
327
|
...e,
|
|
317
|
-
[n.field]:
|
|
328
|
+
[n.field]: o
|
|
318
329
|
};
|
|
319
|
-
s(
|
|
330
|
+
s(f);
|
|
320
331
|
},
|
|
321
332
|
value: e[n.field] || "",
|
|
322
333
|
label: n.label,
|
|
@@ -324,16 +335,16 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
324
335
|
}
|
|
325
336
|
);
|
|
326
337
|
if (n.type === "inputSwitch")
|
|
327
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
338
|
+
return /* @__PURE__ */ t.jsxs("div", { className: z.link, children: [
|
|
328
339
|
/* @__PURE__ */ t.jsx(
|
|
329
|
-
|
|
340
|
+
X,
|
|
330
341
|
{
|
|
331
|
-
onChange: (
|
|
332
|
-
const
|
|
342
|
+
onChange: (o) => {
|
|
343
|
+
const f = {
|
|
333
344
|
...e,
|
|
334
|
-
[n.field.text]:
|
|
345
|
+
[n.field.text]: o
|
|
335
346
|
};
|
|
336
|
-
s(
|
|
347
|
+
s(f);
|
|
337
348
|
},
|
|
338
349
|
value: e[n.field.text] || "",
|
|
339
350
|
label: n.inputLabel,
|
|
@@ -341,31 +352,31 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
341
352
|
}
|
|
342
353
|
),
|
|
343
354
|
/* @__PURE__ */ t.jsx(
|
|
344
|
-
|
|
355
|
+
tt,
|
|
345
356
|
{
|
|
346
357
|
current: !!e[n.field.switch] || !1,
|
|
347
358
|
label: n.switchLabel,
|
|
348
|
-
onChange: (
|
|
349
|
-
const
|
|
359
|
+
onChange: (o) => {
|
|
360
|
+
const f = {
|
|
350
361
|
...e,
|
|
351
|
-
[n.field.switch]:
|
|
362
|
+
[n.field.switch]: o
|
|
352
363
|
};
|
|
353
|
-
s(
|
|
364
|
+
s(f);
|
|
354
365
|
}
|
|
355
366
|
}
|
|
356
367
|
)
|
|
357
368
|
] });
|
|
358
369
|
if (n.type === "list")
|
|
359
370
|
return /* @__PURE__ */ t.jsx(
|
|
360
|
-
|
|
371
|
+
He,
|
|
361
372
|
{
|
|
362
373
|
items: e[n.field] || [],
|
|
363
|
-
setItems: (
|
|
364
|
-
const
|
|
374
|
+
setItems: (o) => {
|
|
375
|
+
const f = {
|
|
365
376
|
...e,
|
|
366
|
-
[n.field]:
|
|
377
|
+
[n.field]: o
|
|
367
378
|
};
|
|
368
|
-
s(
|
|
379
|
+
s(f);
|
|
369
380
|
},
|
|
370
381
|
itemsType: "select",
|
|
371
382
|
draggable: n.draggable || !1,
|
|
@@ -378,19 +389,19 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
378
389
|
);
|
|
379
390
|
if (n.type === "select")
|
|
380
391
|
return /* @__PURE__ */ t.jsx(
|
|
381
|
-
|
|
392
|
+
et,
|
|
382
393
|
{
|
|
383
394
|
options: n.itemsOptions,
|
|
384
|
-
onChange: (
|
|
385
|
-
const
|
|
395
|
+
onChange: (o) => {
|
|
396
|
+
const f = {
|
|
386
397
|
...e,
|
|
387
|
-
[n.field]:
|
|
398
|
+
[n.field]: o
|
|
388
399
|
};
|
|
389
|
-
s(
|
|
400
|
+
s(f);
|
|
390
401
|
},
|
|
391
402
|
label: n.label,
|
|
392
403
|
value: e[n.field] || "String",
|
|
393
|
-
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(
|
|
404
|
+
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(v, { name: e[n.field] })
|
|
394
405
|
}
|
|
395
406
|
);
|
|
396
407
|
}) })
|
|
@@ -398,19 +409,19 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
398
409
|
}
|
|
399
410
|
);
|
|
400
411
|
}
|
|
401
|
-
),
|
|
402
|
-
other:
|
|
403
|
-
subtitle:
|
|
404
|
-
items:
|
|
405
|
-
},
|
|
406
|
-
const { items:
|
|
407
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
408
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
409
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
410
|
-
|
|
412
|
+
), De = "_other_g74jx_1", Le = "_subtitle_g74jx_7", Re = "_items_g74jx_14", yt = {
|
|
413
|
+
other: De,
|
|
414
|
+
subtitle: Le,
|
|
415
|
+
items: Re
|
|
416
|
+
}, jt = (r) => {
|
|
417
|
+
const { items: c, title: e = "Other" } = r;
|
|
418
|
+
return /* @__PURE__ */ t.jsxs("div", { className: yt.other, children: [
|
|
419
|
+
/* @__PURE__ */ t.jsx("h5", { className: yt.subtitle, children: e }),
|
|
420
|
+
/* @__PURE__ */ t.jsx("div", { className: yt.items, children: c.map((s, i) => /* @__PURE__ */ t.jsx(
|
|
421
|
+
tt,
|
|
411
422
|
{
|
|
412
423
|
current: s.isItem,
|
|
413
|
-
onChange: (
|
|
424
|
+
onChange: (a) => s.setIsItem(a),
|
|
414
425
|
label: s.label,
|
|
415
426
|
hasBackground: !0,
|
|
416
427
|
paddingless: !1
|
|
@@ -418,99 +429,108 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
418
429
|
i
|
|
419
430
|
)) })
|
|
420
431
|
] });
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
};
|
|
433
|
+
function Me({ product: r, children: c }) {
|
|
434
|
+
const {
|
|
435
|
+
attributes: e,
|
|
436
|
+
listeners: s,
|
|
437
|
+
setNodeRef: i,
|
|
438
|
+
transform: a,
|
|
439
|
+
transition: l,
|
|
440
|
+
isDragging: h
|
|
441
|
+
} = St({
|
|
442
|
+
id: r.id
|
|
443
|
+
}), n = {
|
|
444
|
+
transform: Tt.Transform.toString(a),
|
|
445
|
+
transition: l
|
|
446
|
+
};
|
|
434
447
|
return /* @__PURE__ */ t.jsx(
|
|
435
448
|
"div",
|
|
436
449
|
{
|
|
437
|
-
ref:
|
|
438
|
-
|
|
439
|
-
|
|
450
|
+
ref: i,
|
|
451
|
+
style: n,
|
|
452
|
+
className: `${z.product} ${h ? z.dragging : ""}`,
|
|
453
|
+
...e,
|
|
454
|
+
...s,
|
|
455
|
+
children: c
|
|
440
456
|
}
|
|
441
457
|
);
|
|
442
|
-
}
|
|
458
|
+
}
|
|
459
|
+
const He = (r) => {
|
|
443
460
|
const {
|
|
444
|
-
isActiveItems:
|
|
461
|
+
isActiveItems: c,
|
|
445
462
|
setIsActiveItems: e,
|
|
446
463
|
items: s,
|
|
447
464
|
setItems: i,
|
|
448
|
-
other:
|
|
465
|
+
other: a,
|
|
449
466
|
title: l,
|
|
450
|
-
subtitle:
|
|
467
|
+
subtitle: h,
|
|
451
468
|
editable: n = !0,
|
|
452
|
-
draggable:
|
|
453
|
-
withImage:
|
|
454
|
-
deletable:
|
|
455
|
-
addable:
|
|
456
|
-
itemsType:
|
|
457
|
-
itemsPlaceholder:
|
|
458
|
-
itemsOptions:
|
|
459
|
-
hasRangeSelector:
|
|
460
|
-
rangeSelectorOptions:
|
|
461
|
-
modalOptions:
|
|
462
|
-
addableOptions:
|
|
463
|
-
limit:
|
|
464
|
-
autoScrollInterval:
|
|
465
|
-
} =
|
|
469
|
+
draggable: o = !1,
|
|
470
|
+
withImage: f = !1,
|
|
471
|
+
deletable: I = !0,
|
|
472
|
+
addable: p = !0,
|
|
473
|
+
itemsType: _,
|
|
474
|
+
itemsPlaceholder: x = "",
|
|
475
|
+
itemsOptions: d,
|
|
476
|
+
hasRangeSelector: w = !1,
|
|
477
|
+
rangeSelectorOptions: E,
|
|
478
|
+
modalOptions: y,
|
|
479
|
+
addableOptions: L = {},
|
|
480
|
+
limit: B,
|
|
481
|
+
autoScrollInterval: S
|
|
482
|
+
} = r, [M, u] = g.useState(null), [D, K] = g.useState({
|
|
466
483
|
top: 0,
|
|
467
484
|
left: 0
|
|
468
|
-
}), [
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
485
|
+
}), [b, T] = g.useState(null), $ = g.useRef(null), [U, O] = g.useState(!1), H = $t(
|
|
486
|
+
It(Bt, {
|
|
487
|
+
activationConstraint: {
|
|
488
|
+
distance: 5
|
|
489
|
+
}
|
|
490
|
+
})
|
|
491
|
+
);
|
|
472
492
|
g.useEffect(() => {
|
|
473
|
-
const
|
|
474
|
-
|
|
493
|
+
const m = () => {
|
|
494
|
+
u(null), O(!1);
|
|
475
495
|
};
|
|
476
|
-
return document.body.addEventListener("click",
|
|
477
|
-
|
|
496
|
+
return document.body.addEventListener("click", m), u(null), O(!1), () => {
|
|
497
|
+
u(null), O(!1), document.body.removeEventListener("click", m);
|
|
478
498
|
};
|
|
479
499
|
}, []), g.useEffect(() => {
|
|
480
500
|
if (M) {
|
|
481
|
-
const
|
|
482
|
-
i(
|
|
501
|
+
const m = [...s].map((k) => k.id === M.id ? M : k);
|
|
502
|
+
i(m);
|
|
483
503
|
}
|
|
484
504
|
}, [M]), g.useEffect(() => {
|
|
485
|
-
if (
|
|
486
|
-
const
|
|
487
|
-
let
|
|
488
|
-
|
|
489
|
-
top:
|
|
490
|
-
left:
|
|
505
|
+
if ($.current && b) {
|
|
506
|
+
const m = $.current.getBoundingClientRect().height, k = window.innerHeight;
|
|
507
|
+
let P = b.top;
|
|
508
|
+
P + m > k + window.scrollY - 200 && (P = k + window.scrollY - m - 200), P < 0 && (P = 10), K({
|
|
509
|
+
top: P,
|
|
510
|
+
left: b.left
|
|
491
511
|
});
|
|
492
512
|
}
|
|
493
|
-
}, [
|
|
494
|
-
const
|
|
495
|
-
|
|
496
|
-
const
|
|
497
|
-
|
|
498
|
-
top:
|
|
499
|
-
left:
|
|
500
|
-
}),
|
|
513
|
+
}, [$.current, b]);
|
|
514
|
+
const Z = (m, k) => {
|
|
515
|
+
m.stopPropagation();
|
|
516
|
+
const P = m.target.getBoundingClientRect();
|
|
517
|
+
T({
|
|
518
|
+
top: P.top + window.scrollY,
|
|
519
|
+
left: P.left - 30
|
|
520
|
+
}), u(k), O(!0);
|
|
501
521
|
};
|
|
502
|
-
function
|
|
503
|
-
if (
|
|
504
|
-
return
|
|
522
|
+
function ct(m) {
|
|
523
|
+
if (f)
|
|
524
|
+
return m ? /* @__PURE__ */ t.jsx(
|
|
505
525
|
"img",
|
|
506
526
|
{
|
|
507
|
-
src: `https://imagedelivery.net/${
|
|
527
|
+
src: `https://imagedelivery.net/${m[0]}/w=1000`,
|
|
508
528
|
alt: "image",
|
|
509
529
|
width: 16,
|
|
510
530
|
height: 16
|
|
511
531
|
}
|
|
512
532
|
) : /* @__PURE__ */ t.jsx(
|
|
513
|
-
|
|
533
|
+
v,
|
|
514
534
|
{
|
|
515
535
|
name: "Image",
|
|
516
536
|
width: 16,
|
|
@@ -519,11 +539,20 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
519
539
|
}
|
|
520
540
|
);
|
|
521
541
|
}
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
542
|
+
const j = (m) => {
|
|
543
|
+
const { active: k, over: P } = m;
|
|
544
|
+
if (P && k.id !== P.id) {
|
|
545
|
+
const R = s.findIndex((A) => A.id === k.id), Y = s.findIndex((A) => A.id === P.id);
|
|
546
|
+
if (R !== -1 && Y !== -1) {
|
|
547
|
+
const A = [...s], [lt] = A.splice(R, 1);
|
|
548
|
+
A.splice(Y, 0, lt), i(A);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}, q = (m, k) => {
|
|
552
|
+
var R, Y;
|
|
553
|
+
const P = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
554
|
+
o && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
555
|
+
v,
|
|
527
556
|
{
|
|
528
557
|
name: "DotsSixVertical",
|
|
529
558
|
hoverable: !0,
|
|
@@ -531,179 +560,202 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
531
560
|
height: 20
|
|
532
561
|
}
|
|
533
562
|
) }),
|
|
534
|
-
|
|
535
|
-
|
|
563
|
+
_ === "select" && d && /* @__PURE__ */ t.jsx(
|
|
564
|
+
et,
|
|
536
565
|
{
|
|
537
|
-
onChange: (
|
|
538
|
-
const
|
|
539
|
-
if (!
|
|
540
|
-
const
|
|
541
|
-
...
|
|
542
|
-
name:
|
|
543
|
-
} :
|
|
544
|
-
|
|
545
|
-
...
|
|
546
|
-
name:
|
|
547
|
-
}), i([...
|
|
566
|
+
onChange: (A) => {
|
|
567
|
+
const lt = [...s], ut = d.find((ft) => ft.name === A);
|
|
568
|
+
if (!ut) return;
|
|
569
|
+
const rt = lt.map((ft) => ft.id === m.id ? {
|
|
570
|
+
...ut,
|
|
571
|
+
name: A
|
|
572
|
+
} : ft);
|
|
573
|
+
u({
|
|
574
|
+
...m,
|
|
575
|
+
name: A
|
|
576
|
+
}), i([...rt]);
|
|
548
577
|
},
|
|
549
|
-
value:
|
|
550
|
-
options:
|
|
551
|
-
leftAddon:
|
|
578
|
+
value: m.name,
|
|
579
|
+
options: d.filter((A) => !s.find((lt) => lt.name === A.name)).map((A) => A.name),
|
|
580
|
+
leftAddon: ct(m.images)
|
|
552
581
|
}
|
|
553
582
|
),
|
|
554
|
-
|
|
555
|
-
|
|
583
|
+
_ === "input" && /* @__PURE__ */ t.jsx(
|
|
584
|
+
X,
|
|
556
585
|
{
|
|
557
|
-
onChange: (
|
|
558
|
-
const
|
|
559
|
-
...
|
|
560
|
-
name:
|
|
561
|
-
} :
|
|
562
|
-
i([...
|
|
586
|
+
onChange: (A) => {
|
|
587
|
+
const ut = [...s].map((rt) => rt.id === m.id ? {
|
|
588
|
+
...m,
|
|
589
|
+
name: A
|
|
590
|
+
} : rt);
|
|
591
|
+
i([...ut]);
|
|
563
592
|
},
|
|
564
|
-
value:
|
|
565
|
-
placeholder:
|
|
593
|
+
value: m.name,
|
|
594
|
+
placeholder: x
|
|
566
595
|
}
|
|
567
596
|
),
|
|
568
|
-
|
|
569
|
-
|
|
597
|
+
_ === "image" && /* @__PURE__ */ t.jsx(
|
|
598
|
+
gt,
|
|
570
599
|
{
|
|
571
|
-
onChange: (
|
|
572
|
-
const
|
|
573
|
-
...
|
|
574
|
-
images:
|
|
575
|
-
} :
|
|
576
|
-
i([...
|
|
600
|
+
onChange: (A) => {
|
|
601
|
+
const ut = [...s].map((rt) => rt.id === m.id ? {
|
|
602
|
+
...m,
|
|
603
|
+
images: A
|
|
604
|
+
} : rt);
|
|
605
|
+
i([...ut]);
|
|
577
606
|
},
|
|
578
|
-
activeImage: (
|
|
607
|
+
activeImage: (R = s.find((A) => A.id === m.id)) != null && R.images ? (Y = s.find((A) => A.id === m.id)) == null ? void 0 : Y.images[0] : void 0
|
|
579
608
|
}
|
|
580
609
|
),
|
|
581
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
582
|
-
n && /* @__PURE__ */ t.jsx(
|
|
583
|
-
|
|
610
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.buttons, children: [
|
|
611
|
+
n && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
612
|
+
v,
|
|
584
613
|
{
|
|
585
614
|
name: "Sliders",
|
|
586
615
|
hoverable: !0,
|
|
587
616
|
width: 20,
|
|
588
617
|
height: 20,
|
|
589
|
-
onClick: (
|
|
618
|
+
onClick: (A) => Z(A, m)
|
|
590
619
|
}
|
|
591
|
-
),
|
|
592
|
-
|
|
593
|
-
|
|
620
|
+
) }),
|
|
621
|
+
I && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
622
|
+
v,
|
|
594
623
|
{
|
|
595
624
|
name: "Trash",
|
|
596
625
|
hoverable: !0,
|
|
597
626
|
width: 20,
|
|
598
627
|
height: 20,
|
|
599
628
|
fill: "#C12A2A",
|
|
600
|
-
onClick: () => i(s.filter((
|
|
629
|
+
onClick: () => i(s.filter((A) => A.id !== m.id))
|
|
601
630
|
}
|
|
602
|
-
)
|
|
631
|
+
) })
|
|
603
632
|
] })
|
|
604
633
|
] });
|
|
605
|
-
return
|
|
606
|
-
|
|
634
|
+
return o ? /* @__PURE__ */ t.jsx(
|
|
635
|
+
Me,
|
|
607
636
|
{
|
|
608
|
-
product:
|
|
609
|
-
index:
|
|
610
|
-
|
|
611
|
-
children: $
|
|
637
|
+
product: m,
|
|
638
|
+
index: k,
|
|
639
|
+
children: P
|
|
612
640
|
},
|
|
613
|
-
|
|
641
|
+
m.id
|
|
614
642
|
) : /* @__PURE__ */ t.jsx(
|
|
615
643
|
"div",
|
|
616
644
|
{
|
|
617
|
-
className:
|
|
618
|
-
children:
|
|
645
|
+
className: z.product,
|
|
646
|
+
children: P
|
|
619
647
|
},
|
|
620
|
-
|
|
648
|
+
m.id
|
|
621
649
|
);
|
|
622
650
|
};
|
|
623
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
624
|
-
(l ||
|
|
625
|
-
l && /* @__PURE__ */ t.jsx("h3", { className:
|
|
626
|
-
|
|
627
|
-
|
|
651
|
+
return /* @__PURE__ */ t.jsxs("div", { className: z.productsBlock, children: [
|
|
652
|
+
(l || c !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
653
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: z.title, children: l }),
|
|
654
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
655
|
+
tt,
|
|
628
656
|
{
|
|
629
|
-
current:
|
|
630
|
-
onChange: (
|
|
657
|
+
current: c,
|
|
658
|
+
onChange: (m) => e == null ? void 0 : e(m)
|
|
631
659
|
}
|
|
632
660
|
)
|
|
633
661
|
] }),
|
|
634
|
-
M && n &&
|
|
635
|
-
|
|
662
|
+
M && n && y && U && /* @__PURE__ */ t.jsx(
|
|
663
|
+
Ee,
|
|
636
664
|
{
|
|
637
|
-
ref:
|
|
665
|
+
ref: $,
|
|
638
666
|
activeItem: M,
|
|
639
|
-
setActiveItem:
|
|
640
|
-
popupPosition:
|
|
641
|
-
modalOptions:
|
|
642
|
-
setIsOpenModal:
|
|
667
|
+
setActiveItem: u,
|
|
668
|
+
popupPosition: D,
|
|
669
|
+
modalOptions: y,
|
|
670
|
+
setIsOpenModal: O
|
|
643
671
|
}
|
|
644
672
|
),
|
|
645
|
-
|
|
646
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
it,
|
|
673
|
+
w && E && /* @__PURE__ */ t.jsx(At, { ...E }),
|
|
674
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
|
|
675
|
+
h && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: h }),
|
|
676
|
+
o ? /* @__PURE__ */ t.jsx(
|
|
677
|
+
Nt,
|
|
651
678
|
{
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
let B = null;
|
|
661
|
-
if (h) {
|
|
662
|
-
for (let $ = 0; $ < h.length; $++)
|
|
663
|
-
if (!s.find((X) => X.id === h[$].id)) {
|
|
664
|
-
B = h[$];
|
|
665
|
-
break;
|
|
666
|
-
}
|
|
679
|
+
sensors: H,
|
|
680
|
+
onDragEnd: j,
|
|
681
|
+
children: /* @__PURE__ */ t.jsx(
|
|
682
|
+
wt,
|
|
683
|
+
{
|
|
684
|
+
items: s.map((m) => m.id),
|
|
685
|
+
strategy: Ct,
|
|
686
|
+
children: s.map((m, k) => q(m, k))
|
|
667
687
|
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
id: dt(),
|
|
675
|
-
...E
|
|
676
|
-
}) : p.push({
|
|
677
|
-
name: `Image ${s.length + 1}`,
|
|
678
|
-
id: dt(),
|
|
679
|
-
...E
|
|
680
|
-
}), i(p);
|
|
681
|
-
},
|
|
688
|
+
)
|
|
689
|
+
}
|
|
690
|
+
) : s.map((m, k) => q(m, k)),
|
|
691
|
+
p && /* @__PURE__ */ t.jsx(
|
|
692
|
+
"div",
|
|
693
|
+
{
|
|
682
694
|
style: {
|
|
683
|
-
width: "
|
|
695
|
+
width: "100%",
|
|
696
|
+
display: "flex",
|
|
697
|
+
justifyContent: "center"
|
|
684
698
|
},
|
|
685
|
-
children:
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
{
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
699
|
+
children: /* @__PURE__ */ t.jsx(
|
|
700
|
+
at,
|
|
701
|
+
{
|
|
702
|
+
withoutHover: !0,
|
|
703
|
+
className: V(z.button, {
|
|
704
|
+
[z.disabled]: !!(B && B <= s.length || s.length === (d == null ? void 0 : d.length))
|
|
705
|
+
}),
|
|
706
|
+
size: "s",
|
|
707
|
+
disabled: !!(B && B <= s.length || s.length === (d == null ? void 0 : d.length)),
|
|
708
|
+
onClick: () => {
|
|
709
|
+
const m = [...s];
|
|
710
|
+
let k = null;
|
|
711
|
+
if (d) {
|
|
712
|
+
for (let P = 0; P < d.length; P++)
|
|
713
|
+
if (!s.find((R) => R.id === d[P].id)) {
|
|
714
|
+
k = d[P];
|
|
715
|
+
break;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
_ === "select" && d ? m.push({
|
|
719
|
+
name: k ? k.name : d[0].name,
|
|
720
|
+
id: (k == null ? void 0 : k.id) || d[0].id,
|
|
721
|
+
...L
|
|
722
|
+
}) : _ === "input" ? m.push({
|
|
723
|
+
name: "",
|
|
724
|
+
id: mt(),
|
|
725
|
+
...L
|
|
726
|
+
}) : m.push({
|
|
727
|
+
name: `Image ${s.length + 1}`,
|
|
728
|
+
id: mt(),
|
|
729
|
+
...L
|
|
730
|
+
}), i(m);
|
|
731
|
+
},
|
|
732
|
+
style: {
|
|
733
|
+
width: "fit-content"
|
|
734
|
+
},
|
|
735
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: z.addButton, children: [
|
|
736
|
+
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
737
|
+
/* @__PURE__ */ t.jsx(
|
|
738
|
+
v,
|
|
739
|
+
{
|
|
740
|
+
name: "Plus",
|
|
741
|
+
width: 16,
|
|
742
|
+
height: 16
|
|
743
|
+
}
|
|
744
|
+
)
|
|
745
|
+
] })
|
|
746
|
+
}
|
|
747
|
+
)
|
|
696
748
|
}
|
|
697
|
-
)
|
|
749
|
+
)
|
|
698
750
|
] }),
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
751
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(jt, { items: a }),
|
|
752
|
+
S !== void 0 && /* @__PURE__ */ t.jsx(
|
|
753
|
+
X,
|
|
702
754
|
{
|
|
703
755
|
label: "Auto scroll interval",
|
|
704
756
|
type: "number",
|
|
705
|
-
value: String(
|
|
706
|
-
onChange: (
|
|
757
|
+
value: String(S.scrollInterval),
|
|
758
|
+
onChange: (m) => S.setScrollInterval(Number(m)),
|
|
707
759
|
min: 0.1,
|
|
708
760
|
max: 100,
|
|
709
761
|
style: {
|
|
@@ -713,59 +765,60 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
713
765
|
}
|
|
714
766
|
)
|
|
715
767
|
] });
|
|
716
|
-
},
|
|
717
|
-
title:
|
|
718
|
-
subtitle:
|
|
719
|
-
header:
|
|
720
|
-
text:
|
|
721
|
-
productsBlock:
|
|
722
|
-
top:
|
|
723
|
-
itemsBlock:
|
|
724
|
-
typeTexts:
|
|
725
|
-
block:
|
|
726
|
-
active:
|
|
727
|
-
products:
|
|
728
|
-
product:
|
|
729
|
-
button:
|
|
730
|
-
disabled:
|
|
731
|
-
image:
|
|
732
|
-
info:
|
|
733
|
-
name:
|
|
734
|
-
buttons:
|
|
735
|
-
modal:
|
|
736
|
-
link:
|
|
737
|
-
modalOptions:
|
|
738
|
-
addButton:
|
|
739
|
-
|
|
768
|
+
}, ze = "_title_82zux_1", Fe = "_subtitle_82zux_5", Ve = "_header_82zux_12", Ue = "_text_82zux_13", Ye = "_productsBlock_82zux_14", Ge = "_top_82zux_26", We = "_itemsBlock_82zux_35", Xe = "_typeTexts_82zux_41", Je = "_block_82zux_48", Qe = "_active_82zux_61", Ke = "_products_82zux_14", Ze = "_product_82zux_14", ts = "_button_82zux_80", es = "_disabled_82zux_91", ss = "_image_82zux_95", ns = "_info_82zux_102", is = "_name_82zux_114", os = "_buttons_82zux_118", as = "_modal_82zux_125", cs = "_link_82zux_145", ls = "_modalOptions_82zux_151", rs = "_addButton_82zux_157", ds = "_deleteButton_82zux_179", Q = {
|
|
769
|
+
title: ze,
|
|
770
|
+
subtitle: Fe,
|
|
771
|
+
header: Ve,
|
|
772
|
+
text: Ue,
|
|
773
|
+
productsBlock: Ye,
|
|
774
|
+
top: Ge,
|
|
775
|
+
itemsBlock: We,
|
|
776
|
+
typeTexts: Xe,
|
|
777
|
+
block: Je,
|
|
778
|
+
active: Qe,
|
|
779
|
+
products: Ke,
|
|
780
|
+
product: Ze,
|
|
781
|
+
button: ts,
|
|
782
|
+
disabled: es,
|
|
783
|
+
image: ss,
|
|
784
|
+
info: ns,
|
|
785
|
+
name: is,
|
|
786
|
+
buttons: os,
|
|
787
|
+
modal: as,
|
|
788
|
+
link: cs,
|
|
789
|
+
modalOptions: ls,
|
|
790
|
+
addButton: rs,
|
|
791
|
+
deleteButton: ds
|
|
792
|
+
}, oa = (r) => {
|
|
740
793
|
const {
|
|
741
|
-
isActiveItems:
|
|
794
|
+
isActiveItems: c,
|
|
742
795
|
setIsActiveItems: e,
|
|
743
796
|
items: s,
|
|
744
797
|
setItems: i,
|
|
745
|
-
other:
|
|
798
|
+
other: a,
|
|
746
799
|
title: l,
|
|
747
|
-
subtitle:
|
|
800
|
+
subtitle: h,
|
|
748
801
|
draggable: n = !1,
|
|
749
|
-
withImage:
|
|
750
|
-
addable:
|
|
751
|
-
itemsOptions:
|
|
752
|
-
hasRangeSelector:
|
|
753
|
-
rangeSelectorOptions:
|
|
754
|
-
limit:
|
|
755
|
-
autoScrollInterval:
|
|
756
|
-
} =
|
|
757
|
-
function
|
|
758
|
-
if (
|
|
759
|
-
return
|
|
802
|
+
withImage: o = !1,
|
|
803
|
+
addable: f = !0,
|
|
804
|
+
itemsOptions: I,
|
|
805
|
+
hasRangeSelector: p = !1,
|
|
806
|
+
rangeSelectorOptions: _,
|
|
807
|
+
limit: x,
|
|
808
|
+
autoScrollInterval: d
|
|
809
|
+
} = r;
|
|
810
|
+
function w(y) {
|
|
811
|
+
if (o)
|
|
812
|
+
return y ? /* @__PURE__ */ t.jsx(
|
|
760
813
|
"img",
|
|
761
814
|
{
|
|
762
|
-
src: `https://imagedelivery.net/${
|
|
815
|
+
src: `https://imagedelivery.net/${y[0]}/w=1000`,
|
|
763
816
|
alt: "image",
|
|
764
817
|
width: 16,
|
|
765
818
|
height: 16
|
|
766
819
|
}
|
|
767
820
|
) : /* @__PURE__ */ t.jsx(
|
|
768
|
-
|
|
821
|
+
v,
|
|
769
822
|
{
|
|
770
823
|
name: "Image",
|
|
771
824
|
width: 16,
|
|
@@ -774,12 +827,12 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
774
827
|
}
|
|
775
828
|
);
|
|
776
829
|
}
|
|
777
|
-
const
|
|
778
|
-
const
|
|
779
|
-
if (!
|
|
780
|
-
const
|
|
830
|
+
const E = (y) => {
|
|
831
|
+
const L = I.find((S) => S.id === y);
|
|
832
|
+
if (!L) return;
|
|
833
|
+
const B = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
781
834
|
n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
782
|
-
|
|
835
|
+
v,
|
|
783
836
|
{
|
|
784
837
|
name: "DotsSixVertical",
|
|
785
838
|
hoverable: !0,
|
|
@@ -788,101 +841,112 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
788
841
|
}
|
|
789
842
|
) }),
|
|
790
843
|
/* @__PURE__ */ t.jsx(
|
|
791
|
-
|
|
844
|
+
et,
|
|
792
845
|
{
|
|
793
|
-
onChange: (
|
|
794
|
-
const M = [...s],
|
|
795
|
-
if (!
|
|
796
|
-
const
|
|
797
|
-
i([...
|
|
846
|
+
onChange: (S) => {
|
|
847
|
+
const M = [...s], u = I.find((b) => b.name === S);
|
|
848
|
+
if (!u) return;
|
|
849
|
+
const D = u.id, K = M.map((b) => b === y ? D : b);
|
|
850
|
+
i([...K]);
|
|
798
851
|
},
|
|
799
|
-
value:
|
|
800
|
-
options:
|
|
801
|
-
leftAddon:
|
|
852
|
+
value: L.name,
|
|
853
|
+
options: I.filter((S) => !s.find((M) => M === S.id)).map((S) => S.name),
|
|
854
|
+
leftAddon: w(L.images)
|
|
802
855
|
}
|
|
803
856
|
),
|
|
804
|
-
/* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx(
|
|
805
|
-
|
|
857
|
+
/* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
858
|
+
v,
|
|
806
859
|
{
|
|
807
860
|
name: "Trash",
|
|
808
861
|
hoverable: !0,
|
|
809
862
|
width: 20,
|
|
810
863
|
height: 20,
|
|
811
864
|
fill: "#C12A2A",
|
|
812
|
-
onClick: () => i(s.filter((
|
|
865
|
+
onClick: () => i(s.filter((S) => S !== y))
|
|
813
866
|
}
|
|
814
|
-
) })
|
|
867
|
+
) }) })
|
|
815
868
|
] });
|
|
816
869
|
return /* @__PURE__ */ t.jsx(
|
|
817
870
|
"div",
|
|
818
871
|
{
|
|
819
872
|
className: Q.product,
|
|
820
|
-
children:
|
|
873
|
+
children: B
|
|
821
874
|
},
|
|
822
|
-
|
|
875
|
+
y
|
|
823
876
|
);
|
|
824
877
|
};
|
|
825
878
|
return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
|
|
826
|
-
(l ||
|
|
879
|
+
(l || c !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
|
|
827
880
|
l && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: l }),
|
|
828
|
-
|
|
829
|
-
|
|
881
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
882
|
+
tt,
|
|
830
883
|
{
|
|
831
|
-
current:
|
|
832
|
-
onChange: (
|
|
884
|
+
current: c,
|
|
885
|
+
onChange: (y) => e == null ? void 0 : e(y)
|
|
833
886
|
}
|
|
834
887
|
)
|
|
835
888
|
] }),
|
|
836
|
-
|
|
889
|
+
p && _ && /* @__PURE__ */ t.jsx(At, { ..._ }),
|
|
837
890
|
/* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
|
|
838
|
-
|
|
839
|
-
s.map((
|
|
840
|
-
|
|
841
|
-
|
|
891
|
+
h && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: h }),
|
|
892
|
+
s.map((y) => E(y)),
|
|
893
|
+
f && /* @__PURE__ */ t.jsx(
|
|
894
|
+
"div",
|
|
842
895
|
{
|
|
843
|
-
withoutHover: !0,
|
|
844
|
-
className: F(Q.button, {
|
|
845
|
-
[Q.disabled]: !!(f && f <= s.length || s.length === d.length)
|
|
846
|
-
}),
|
|
847
|
-
size: "s",
|
|
848
|
-
disabled: !!(f && f <= s.length || s.length === d.length),
|
|
849
|
-
onClick: () => {
|
|
850
|
-
const v = [...s];
|
|
851
|
-
let E = null;
|
|
852
|
-
if (d) {
|
|
853
|
-
for (let I = 0; I < d.length; I++)
|
|
854
|
-
if (!s.find((C) => C === d[I].id)) {
|
|
855
|
-
E = d[I];
|
|
856
|
-
break;
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
v.push((E == null ? void 0 : E.id) || d[0].id), i(v);
|
|
860
|
-
},
|
|
861
896
|
style: {
|
|
862
|
-
width: "
|
|
897
|
+
width: "100%",
|
|
898
|
+
display: "flex",
|
|
899
|
+
justifyContent: "center",
|
|
900
|
+
gap: 5
|
|
863
901
|
},
|
|
864
|
-
children:
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
{
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
902
|
+
children: /* @__PURE__ */ t.jsx(
|
|
903
|
+
at,
|
|
904
|
+
{
|
|
905
|
+
withoutHover: !0,
|
|
906
|
+
className: V(Q.button, {
|
|
907
|
+
[Q.disabled]: !!(x && x <= s.length || s.length === I.length)
|
|
908
|
+
}),
|
|
909
|
+
size: "s",
|
|
910
|
+
disabled: !!(x && x <= s.length || s.length === I.length),
|
|
911
|
+
onClick: () => {
|
|
912
|
+
const y = [...s];
|
|
913
|
+
let L = null;
|
|
914
|
+
if (I) {
|
|
915
|
+
for (let B = 0; B < I.length; B++)
|
|
916
|
+
if (!s.find((S) => S === I[B].id)) {
|
|
917
|
+
L = I[B];
|
|
918
|
+
break;
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
y.push((L == null ? void 0 : L.id) || I[0].id), i(y);
|
|
922
|
+
},
|
|
923
|
+
style: {
|
|
924
|
+
width: "fit-content"
|
|
925
|
+
},
|
|
926
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
|
|
927
|
+
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
928
|
+
/* @__PURE__ */ t.jsx(
|
|
929
|
+
v,
|
|
930
|
+
{
|
|
931
|
+
name: "Plus",
|
|
932
|
+
width: 16,
|
|
933
|
+
height: 16
|
|
934
|
+
}
|
|
935
|
+
)
|
|
936
|
+
] })
|
|
937
|
+
}
|
|
938
|
+
)
|
|
875
939
|
}
|
|
876
|
-
)
|
|
940
|
+
)
|
|
877
941
|
] }),
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
942
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(jt, { items: a }),
|
|
943
|
+
d !== void 0 && /* @__PURE__ */ t.jsx(
|
|
944
|
+
X,
|
|
881
945
|
{
|
|
882
946
|
label: "Auto scroll interval",
|
|
883
947
|
type: "number",
|
|
884
|
-
value: String(
|
|
885
|
-
onChange: (
|
|
948
|
+
value: String(d.scrollInterval),
|
|
949
|
+
onChange: (y) => d.setScrollInterval(Number(y)),
|
|
886
950
|
min: 0.1,
|
|
887
951
|
max: 100,
|
|
888
952
|
style: {
|
|
@@ -892,40 +956,41 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
892
956
|
}
|
|
893
957
|
)
|
|
894
958
|
] });
|
|
895
|
-
},
|
|
896
|
-
title:
|
|
897
|
-
subtitle:
|
|
898
|
-
header:
|
|
899
|
-
text:
|
|
900
|
-
productsBlock:
|
|
901
|
-
top:
|
|
902
|
-
itemsBlock:
|
|
903
|
-
typeTexts:
|
|
904
|
-
block:
|
|
905
|
-
active:
|
|
906
|
-
products:
|
|
907
|
-
product:
|
|
908
|
-
button:
|
|
909
|
-
disabled:
|
|
910
|
-
image:
|
|
911
|
-
info:
|
|
912
|
-
name:
|
|
913
|
-
buttons:
|
|
914
|
-
modal:
|
|
915
|
-
link:
|
|
916
|
-
modalOptions:
|
|
917
|
-
addButton:
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
959
|
+
}, us = "_title_1wm9m_1", ms = "_subtitle_1wm9m_5", hs = "_header_1wm9m_12", _s = "_text_1wm9m_13", ps = "_productsBlock_1wm9m_14", gs = "_top_1wm9m_26", fs = "_itemsBlock_1wm9m_35", xs = "_typeTexts_1wm9m_41", bs = "_block_1wm9m_48", js = "_active_1wm9m_61", vs = "_products_1wm9m_14", ys = "_product_1wm9m_14", ks = "_button_1wm9m_80", $s = "_disabled_1wm9m_91", Is = "_image_1wm9m_95", Ns = "_info_1wm9m_102", ws = "_name_1wm9m_114", Cs = "_buttons_1wm9m_118", Bs = "_modal_1wm9m_125", Ss = "_link_1wm9m_146", Ts = "_modalOptions_1wm9m_152", Ps = "_addButton_1wm9m_164", As = "_deleteButton_1wm9m_179", F = {
|
|
960
|
+
title: us,
|
|
961
|
+
subtitle: ms,
|
|
962
|
+
header: hs,
|
|
963
|
+
text: _s,
|
|
964
|
+
productsBlock: ps,
|
|
965
|
+
top: gs,
|
|
966
|
+
itemsBlock: fs,
|
|
967
|
+
typeTexts: xs,
|
|
968
|
+
block: bs,
|
|
969
|
+
active: js,
|
|
970
|
+
products: vs,
|
|
971
|
+
product: ys,
|
|
972
|
+
button: ks,
|
|
973
|
+
disabled: $s,
|
|
974
|
+
image: Is,
|
|
975
|
+
info: Ns,
|
|
976
|
+
name: ws,
|
|
977
|
+
buttons: Cs,
|
|
978
|
+
modal: Bs,
|
|
979
|
+
link: Ss,
|
|
980
|
+
modalOptions: Ts,
|
|
981
|
+
addButton: Ps,
|
|
982
|
+
deleteButton: As
|
|
983
|
+
}, Os = g.forwardRef(
|
|
984
|
+
(r, c) => {
|
|
985
|
+
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = r;
|
|
986
|
+
function h(n, o) {
|
|
987
|
+
return n.length > o ? `${n.slice(0, o)}...` : n;
|
|
923
988
|
}
|
|
924
989
|
return /* @__PURE__ */ t.jsxs(
|
|
925
990
|
"div",
|
|
926
991
|
{
|
|
927
|
-
ref:
|
|
928
|
-
className:
|
|
992
|
+
ref: c,
|
|
993
|
+
className: F.modal,
|
|
929
994
|
onClick: (n) => {
|
|
930
995
|
n.stopPropagation();
|
|
931
996
|
},
|
|
@@ -934,10 +999,10 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
934
999
|
left: `${i.left}px`
|
|
935
1000
|
},
|
|
936
1001
|
children: [
|
|
937
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
938
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1002
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
|
|
1003
|
+
/* @__PURE__ */ t.jsx("h3", { className: F.title, children: h(e.name, 20) }),
|
|
939
1004
|
/* @__PURE__ */ t.jsx(
|
|
940
|
-
|
|
1005
|
+
v,
|
|
941
1006
|
{
|
|
942
1007
|
name: "X",
|
|
943
1008
|
height: 20,
|
|
@@ -949,56 +1014,56 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
949
1014
|
}
|
|
950
1015
|
)
|
|
951
1016
|
] }),
|
|
952
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1017
|
+
/* @__PURE__ */ t.jsx("div", { className: F.modalOptions, children: a.map((n) => {
|
|
953
1018
|
if (n.type === "image")
|
|
954
1019
|
return /* @__PURE__ */ t.jsx(
|
|
955
|
-
|
|
1020
|
+
gt,
|
|
956
1021
|
{
|
|
957
1022
|
label: "Put up an attractive image",
|
|
958
1023
|
activeImage: e[n.field],
|
|
959
|
-
onChange: (
|
|
960
|
-
const
|
|
1024
|
+
onChange: (o) => {
|
|
1025
|
+
const f = {
|
|
961
1026
|
...e,
|
|
962
|
-
[n.field]:
|
|
1027
|
+
[n.field]: o
|
|
963
1028
|
};
|
|
964
|
-
s(
|
|
1029
|
+
s(f);
|
|
965
1030
|
}
|
|
966
1031
|
},
|
|
967
1032
|
String(n.field)
|
|
968
1033
|
);
|
|
969
1034
|
if (n.type === "text")
|
|
970
1035
|
return /* @__PURE__ */ t.jsx(
|
|
971
|
-
|
|
1036
|
+
Rt,
|
|
972
1037
|
{
|
|
973
1038
|
typesText: e[n.field.type],
|
|
974
|
-
setTypesText: (
|
|
975
|
-
const
|
|
1039
|
+
setTypesText: (o) => {
|
|
1040
|
+
const f = {
|
|
976
1041
|
...e,
|
|
977
|
-
[n.field.type]:
|
|
1042
|
+
[n.field.type]: o
|
|
978
1043
|
};
|
|
979
|
-
s(
|
|
1044
|
+
s(f);
|
|
980
1045
|
},
|
|
981
1046
|
text: e[n.field.text] || "",
|
|
982
|
-
setText: (
|
|
983
|
-
const
|
|
1047
|
+
setText: (o) => {
|
|
1048
|
+
const f = {
|
|
984
1049
|
...e,
|
|
985
|
-
[n.field.text]:
|
|
1050
|
+
[n.field.text]: o
|
|
986
1051
|
};
|
|
987
|
-
s(
|
|
1052
|
+
s(f);
|
|
988
1053
|
},
|
|
989
1054
|
subtitle: n.label
|
|
990
1055
|
}
|
|
991
1056
|
);
|
|
992
1057
|
if (n.type === "input")
|
|
993
1058
|
return /* @__PURE__ */ t.jsx(
|
|
994
|
-
|
|
1059
|
+
X,
|
|
995
1060
|
{
|
|
996
|
-
onChange: (
|
|
997
|
-
const
|
|
1061
|
+
onChange: (o) => {
|
|
1062
|
+
const f = {
|
|
998
1063
|
...e,
|
|
999
|
-
[n.field]:
|
|
1064
|
+
[n.field]: o
|
|
1000
1065
|
};
|
|
1001
|
-
s(
|
|
1066
|
+
s(f);
|
|
1002
1067
|
},
|
|
1003
1068
|
value: e[n.field] || "",
|
|
1004
1069
|
label: n.label,
|
|
@@ -1006,16 +1071,16 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1006
1071
|
}
|
|
1007
1072
|
);
|
|
1008
1073
|
if (n.type === "inputSwitch")
|
|
1009
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1074
|
+
return /* @__PURE__ */ t.jsxs("div", { className: F.link, children: [
|
|
1010
1075
|
/* @__PURE__ */ t.jsx(
|
|
1011
|
-
|
|
1076
|
+
X,
|
|
1012
1077
|
{
|
|
1013
|
-
onChange: (
|
|
1014
|
-
const
|
|
1078
|
+
onChange: (o) => {
|
|
1079
|
+
const f = {
|
|
1015
1080
|
...e,
|
|
1016
|
-
[n.field.text]:
|
|
1081
|
+
[n.field.text]: o
|
|
1017
1082
|
};
|
|
1018
|
-
s(
|
|
1083
|
+
s(f);
|
|
1019
1084
|
},
|
|
1020
1085
|
value: e[n.field.text] || "",
|
|
1021
1086
|
label: n.inputLabel,
|
|
@@ -1023,35 +1088,35 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1023
1088
|
}
|
|
1024
1089
|
),
|
|
1025
1090
|
/* @__PURE__ */ t.jsx(
|
|
1026
|
-
|
|
1091
|
+
tt,
|
|
1027
1092
|
{
|
|
1028
1093
|
current: !!e[n.field.switch] || !1,
|
|
1029
1094
|
label: n.switchLabel,
|
|
1030
|
-
onChange: (
|
|
1031
|
-
const
|
|
1095
|
+
onChange: (o) => {
|
|
1096
|
+
const f = {
|
|
1032
1097
|
...e,
|
|
1033
|
-
[n.field.switch]:
|
|
1098
|
+
[n.field.switch]: o
|
|
1034
1099
|
};
|
|
1035
|
-
s(
|
|
1100
|
+
s(f);
|
|
1036
1101
|
}
|
|
1037
1102
|
}
|
|
1038
1103
|
)
|
|
1039
1104
|
] });
|
|
1040
1105
|
if (n.type === "select")
|
|
1041
1106
|
return /* @__PURE__ */ t.jsx(
|
|
1042
|
-
|
|
1107
|
+
et,
|
|
1043
1108
|
{
|
|
1044
1109
|
options: n.itemsOptions,
|
|
1045
|
-
onChange: (
|
|
1046
|
-
const
|
|
1110
|
+
onChange: (o) => {
|
|
1111
|
+
const f = {
|
|
1047
1112
|
...e,
|
|
1048
|
-
[n.field]:
|
|
1113
|
+
[n.field]: o
|
|
1049
1114
|
};
|
|
1050
|
-
s(
|
|
1115
|
+
s(f);
|
|
1051
1116
|
},
|
|
1052
1117
|
label: n.label,
|
|
1053
1118
|
value: e[n.field] || "String",
|
|
1054
|
-
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(
|
|
1119
|
+
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(v, { name: e[n.field] })
|
|
1055
1120
|
}
|
|
1056
1121
|
);
|
|
1057
1122
|
}) })
|
|
@@ -1059,87 +1124,89 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1059
1124
|
}
|
|
1060
1125
|
);
|
|
1061
1126
|
}
|
|
1062
|
-
)
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
item: { index: a },
|
|
1071
|
-
collect: (o) => ({
|
|
1072
|
-
isDragging: o.isDragging()
|
|
1073
|
-
})
|
|
1074
|
-
});
|
|
1127
|
+
);
|
|
1128
|
+
function qs(r) {
|
|
1129
|
+
const { product: c, children: e } = r, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: h, isDragging: n } = St({
|
|
1130
|
+
id: c.id
|
|
1131
|
+
}), o = {
|
|
1132
|
+
transform: Tt.Transform.toString(l),
|
|
1133
|
+
transition: h
|
|
1134
|
+
};
|
|
1075
1135
|
return /* @__PURE__ */ t.jsx(
|
|
1076
1136
|
"div",
|
|
1077
1137
|
{
|
|
1078
|
-
ref:
|
|
1079
|
-
|
|
1080
|
-
|
|
1138
|
+
ref: a,
|
|
1139
|
+
style: o,
|
|
1140
|
+
className: `${F.product} ${n ? F.dragging : ""}`,
|
|
1141
|
+
...s,
|
|
1142
|
+
...i,
|
|
1143
|
+
children: e
|
|
1081
1144
|
}
|
|
1082
1145
|
);
|
|
1083
|
-
}
|
|
1146
|
+
}
|
|
1147
|
+
const aa = (r) => {
|
|
1084
1148
|
const {
|
|
1085
|
-
isActiveItems:
|
|
1149
|
+
isActiveItems: c,
|
|
1086
1150
|
setIsActiveItems: e,
|
|
1087
1151
|
items: s,
|
|
1088
1152
|
setItems: i,
|
|
1089
|
-
other:
|
|
1153
|
+
other: a,
|
|
1090
1154
|
title: l,
|
|
1091
|
-
subtitle:
|
|
1155
|
+
subtitle: h,
|
|
1092
1156
|
editable: n = !0,
|
|
1093
|
-
draggable:
|
|
1094
|
-
withImage:
|
|
1095
|
-
deletable:
|
|
1096
|
-
addable:
|
|
1097
|
-
itemsType:
|
|
1098
|
-
itemsPlaceholder:
|
|
1099
|
-
itemsOptions:
|
|
1100
|
-
hasRangeSelector:
|
|
1101
|
-
rangeSelectorOptions:
|
|
1102
|
-
modalOptions:
|
|
1103
|
-
addableOptions:
|
|
1104
|
-
} =
|
|
1157
|
+
draggable: o = !1,
|
|
1158
|
+
withImage: f = !1,
|
|
1159
|
+
deletable: I = !0,
|
|
1160
|
+
addable: p = !0,
|
|
1161
|
+
itemsType: _,
|
|
1162
|
+
itemsPlaceholder: x = "",
|
|
1163
|
+
itemsOptions: d,
|
|
1164
|
+
hasRangeSelector: w = !1,
|
|
1165
|
+
rangeSelectorOptions: E,
|
|
1166
|
+
modalOptions: y,
|
|
1167
|
+
addableOptions: L = {}
|
|
1168
|
+
} = r, [B, S] = g.useState(null), [M, u] = g.useState({
|
|
1105
1169
|
top: 0,
|
|
1106
1170
|
left: 0
|
|
1107
|
-
}), [
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1171
|
+
}), [D, K] = g.useState(null), b = g.useRef(null), [T, $] = g.useState(!1), U = $t(
|
|
1172
|
+
It(Bt, {
|
|
1173
|
+
activationConstraint: {
|
|
1174
|
+
distance: 5
|
|
1175
|
+
}
|
|
1176
|
+
})
|
|
1177
|
+
);
|
|
1111
1178
|
g.useEffect(() => {
|
|
1112
1179
|
const j = () => {
|
|
1113
|
-
|
|
1180
|
+
S(null), $(!1);
|
|
1114
1181
|
};
|
|
1115
|
-
return document.body.addEventListener("click", j),
|
|
1116
|
-
|
|
1182
|
+
return document.body.addEventListener("click", j), S(null), $(!1), () => {
|
|
1183
|
+
S(null), $(!1), document.body.removeEventListener("click", j);
|
|
1117
1184
|
};
|
|
1118
1185
|
}, []), g.useEffect(() => {
|
|
1119
|
-
if (
|
|
1120
|
-
const j = [...s].map((
|
|
1186
|
+
if (B) {
|
|
1187
|
+
const j = [...s].map((q) => q.id === B.id ? B : q);
|
|
1121
1188
|
i(j);
|
|
1122
1189
|
}
|
|
1123
|
-
}, [
|
|
1124
|
-
if (
|
|
1125
|
-
const j =
|
|
1126
|
-
let
|
|
1127
|
-
|
|
1128
|
-
top:
|
|
1129
|
-
left:
|
|
1190
|
+
}, [B]), g.useEffect(() => {
|
|
1191
|
+
if (b.current && D) {
|
|
1192
|
+
const j = b.current.getBoundingClientRect().height, q = window.innerHeight;
|
|
1193
|
+
let m = D.top;
|
|
1194
|
+
m + j > q + window.scrollY - 200 && (m = q + window.scrollY - j - 200), m < 0 && (m = 10), u({
|
|
1195
|
+
top: m,
|
|
1196
|
+
left: D.left
|
|
1130
1197
|
});
|
|
1131
1198
|
}
|
|
1132
|
-
}, [
|
|
1133
|
-
const
|
|
1199
|
+
}, [b.current, D]);
|
|
1200
|
+
const O = (j, q) => {
|
|
1134
1201
|
j.stopPropagation();
|
|
1135
|
-
const
|
|
1136
|
-
|
|
1137
|
-
top:
|
|
1138
|
-
left:
|
|
1139
|
-
}),
|
|
1202
|
+
const m = j.target.getBoundingClientRect();
|
|
1203
|
+
K({
|
|
1204
|
+
top: m.top + window.scrollY,
|
|
1205
|
+
left: m.left - 30
|
|
1206
|
+
}), S(q), $(!0);
|
|
1140
1207
|
};
|
|
1141
|
-
function
|
|
1142
|
-
if (
|
|
1208
|
+
function H(j) {
|
|
1209
|
+
if (f)
|
|
1143
1210
|
return j ? /* @__PURE__ */ t.jsx(
|
|
1144
1211
|
"img",
|
|
1145
1212
|
{
|
|
@@ -1149,7 +1216,7 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1149
1216
|
height: 16
|
|
1150
1217
|
}
|
|
1151
1218
|
) : /* @__PURE__ */ t.jsx(
|
|
1152
|
-
|
|
1219
|
+
v,
|
|
1153
1220
|
{
|
|
1154
1221
|
name: "Image",
|
|
1155
1222
|
width: 16,
|
|
@@ -1158,11 +1225,20 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1158
1225
|
}
|
|
1159
1226
|
);
|
|
1160
1227
|
}
|
|
1161
|
-
const
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1228
|
+
const Z = (j) => {
|
|
1229
|
+
const { active: q, over: m } = j;
|
|
1230
|
+
if (m && q.id !== m.id) {
|
|
1231
|
+
const k = s.findIndex((R) => R.id === q.id), P = s.findIndex((R) => R.id === m.id);
|
|
1232
|
+
if (k !== -1 && P !== -1) {
|
|
1233
|
+
const R = [...s], [Y] = R.splice(k, 1);
|
|
1234
|
+
R.splice(P, 0, Y), i(R);
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
}, ct = (j) => {
|
|
1238
|
+
var m;
|
|
1239
|
+
const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1240
|
+
o && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1241
|
+
v,
|
|
1166
1242
|
{
|
|
1167
1243
|
name: "DotsSixVertical",
|
|
1168
1244
|
hoverable: !0,
|
|
@@ -1170,221 +1246,247 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1170
1246
|
height: 20
|
|
1171
1247
|
}
|
|
1172
1248
|
) }),
|
|
1173
|
-
|
|
1174
|
-
|
|
1249
|
+
_ === "select" && d && /* @__PURE__ */ t.jsx(
|
|
1250
|
+
et,
|
|
1175
1251
|
{
|
|
1176
|
-
onChange: (
|
|
1177
|
-
const
|
|
1252
|
+
onChange: (k) => {
|
|
1253
|
+
const R = [...s].map((Y) => Y.id === j.id ? {
|
|
1178
1254
|
...j,
|
|
1179
|
-
name:
|
|
1255
|
+
name: k
|
|
1180
1256
|
} : Y);
|
|
1181
|
-
|
|
1257
|
+
S({
|
|
1182
1258
|
...j,
|
|
1183
|
-
name:
|
|
1184
|
-
}), i([...
|
|
1259
|
+
name: k
|
|
1260
|
+
}), i([...R]);
|
|
1185
1261
|
},
|
|
1186
1262
|
value: j.name,
|
|
1187
|
-
options:
|
|
1188
|
-
leftAddon:
|
|
1263
|
+
options: d.filter((k) => !s.find((P) => P.name === k)),
|
|
1264
|
+
leftAddon: H(j.images)
|
|
1189
1265
|
}
|
|
1190
1266
|
),
|
|
1191
|
-
|
|
1192
|
-
|
|
1267
|
+
_ === "input" && /* @__PURE__ */ t.jsx(
|
|
1268
|
+
X,
|
|
1193
1269
|
{
|
|
1194
|
-
onChange: (
|
|
1195
|
-
const
|
|
1270
|
+
onChange: (k) => {
|
|
1271
|
+
const R = [...s].map((Y) => Y.id === j.id ? {
|
|
1196
1272
|
...j,
|
|
1197
|
-
name:
|
|
1273
|
+
name: k
|
|
1198
1274
|
} : Y);
|
|
1199
|
-
i([...
|
|
1275
|
+
i([...R]);
|
|
1200
1276
|
},
|
|
1201
1277
|
value: j.name,
|
|
1202
|
-
placeholder:
|
|
1278
|
+
placeholder: x
|
|
1203
1279
|
}
|
|
1204
1280
|
),
|
|
1205
|
-
|
|
1206
|
-
|
|
1281
|
+
_ === "image" && /* @__PURE__ */ t.jsx(
|
|
1282
|
+
gt,
|
|
1207
1283
|
{
|
|
1208
|
-
onChange: (
|
|
1209
|
-
const
|
|
1284
|
+
onChange: (k) => {
|
|
1285
|
+
const R = [...s].map((Y) => Y.id === j.id ? {
|
|
1210
1286
|
...j,
|
|
1211
|
-
images:
|
|
1287
|
+
images: k
|
|
1212
1288
|
} : Y);
|
|
1213
|
-
i([...
|
|
1289
|
+
i([...R]);
|
|
1214
1290
|
},
|
|
1215
|
-
activeImage: (
|
|
1291
|
+
activeImage: (m = s.find((k) => k.id === j.id)) == null ? void 0 : m.images[0]
|
|
1216
1292
|
}
|
|
1217
1293
|
),
|
|
1218
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1219
|
-
n && /* @__PURE__ */ t.jsx(
|
|
1220
|
-
|
|
1294
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
|
|
1295
|
+
n && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1296
|
+
v,
|
|
1221
1297
|
{
|
|
1222
1298
|
name: "Sliders",
|
|
1223
1299
|
hoverable: !0,
|
|
1224
1300
|
width: 20,
|
|
1225
1301
|
height: 20,
|
|
1226
|
-
onClick: (
|
|
1302
|
+
onClick: (k) => O(k, j)
|
|
1227
1303
|
}
|
|
1228
|
-
),
|
|
1229
|
-
|
|
1230
|
-
|
|
1304
|
+
) }),
|
|
1305
|
+
I && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1306
|
+
v,
|
|
1231
1307
|
{
|
|
1232
1308
|
name: "Trash",
|
|
1233
1309
|
hoverable: !0,
|
|
1234
1310
|
width: 20,
|
|
1235
1311
|
height: 20,
|
|
1236
1312
|
fill: "#C12A2A",
|
|
1237
|
-
onClick: () => i(s.filter((
|
|
1313
|
+
onClick: () => i(s.filter((k) => k.id !== j.id))
|
|
1238
1314
|
}
|
|
1239
|
-
)
|
|
1315
|
+
) })
|
|
1240
1316
|
] })
|
|
1241
1317
|
] });
|
|
1242
|
-
return
|
|
1243
|
-
|
|
1318
|
+
return o ? /* @__PURE__ */ t.jsx(
|
|
1319
|
+
qs,
|
|
1244
1320
|
{
|
|
1245
1321
|
product: j,
|
|
1246
|
-
|
|
1247
|
-
moveProduct: R,
|
|
1248
|
-
children: p
|
|
1322
|
+
children: q
|
|
1249
1323
|
},
|
|
1250
1324
|
j.id
|
|
1251
1325
|
) : /* @__PURE__ */ t.jsx(
|
|
1252
1326
|
"div",
|
|
1253
1327
|
{
|
|
1254
|
-
className:
|
|
1255
|
-
children:
|
|
1328
|
+
className: F.product,
|
|
1329
|
+
children: q
|
|
1256
1330
|
},
|
|
1257
1331
|
j.id
|
|
1258
1332
|
);
|
|
1259
1333
|
};
|
|
1260
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1261
|
-
(l ||
|
|
1262
|
-
l && /* @__PURE__ */ t.jsx("h3", { className:
|
|
1263
|
-
|
|
1264
|
-
|
|
1334
|
+
return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
|
|
1335
|
+
(l || c !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
|
|
1336
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: l }),
|
|
1337
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1338
|
+
tt,
|
|
1265
1339
|
{
|
|
1266
|
-
current:
|
|
1340
|
+
current: c,
|
|
1267
1341
|
onChange: (j) => e == null ? void 0 : e(j)
|
|
1268
1342
|
}
|
|
1269
1343
|
)
|
|
1270
1344
|
] }),
|
|
1271
|
-
|
|
1272
|
-
|
|
1345
|
+
B && n && y && T && /* @__PURE__ */ t.jsx(
|
|
1346
|
+
Os,
|
|
1273
1347
|
{
|
|
1274
|
-
ref:
|
|
1275
|
-
activeItem:
|
|
1276
|
-
setActiveItem:
|
|
1348
|
+
ref: b,
|
|
1349
|
+
activeItem: B,
|
|
1350
|
+
setActiveItem: S,
|
|
1277
1351
|
popupPosition: M,
|
|
1278
|
-
modalOptions:
|
|
1279
|
-
setIsOpenModal:
|
|
1352
|
+
modalOptions: y,
|
|
1353
|
+
setIsOpenModal: $
|
|
1280
1354
|
}
|
|
1281
1355
|
),
|
|
1282
|
-
|
|
1283
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
it,
|
|
1356
|
+
w && E && /* @__PURE__ */ t.jsx(At, { ...E }),
|
|
1357
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
|
|
1358
|
+
h && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: h }),
|
|
1359
|
+
o ? /* @__PURE__ */ t.jsx(
|
|
1360
|
+
Nt,
|
|
1288
1361
|
{
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
if (!s.find((B) => B.name === h[p])) {
|
|
1298
|
-
T = h[p];
|
|
1299
|
-
break;
|
|
1300
|
-
}
|
|
1362
|
+
sensors: U,
|
|
1363
|
+
onDragEnd: Z,
|
|
1364
|
+
children: /* @__PURE__ */ t.jsx(
|
|
1365
|
+
wt,
|
|
1366
|
+
{
|
|
1367
|
+
items: s.map((j) => j.id),
|
|
1368
|
+
strategy: Ct,
|
|
1369
|
+
children: s.map((j) => ct(j))
|
|
1301
1370
|
}
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
id: dt(),
|
|
1309
|
-
...E
|
|
1310
|
-
}) : j.push({
|
|
1311
|
-
name: `Image ${s.length + 1}`,
|
|
1312
|
-
id: dt(),
|
|
1313
|
-
...E
|
|
1314
|
-
}), i(j);
|
|
1315
|
-
},
|
|
1371
|
+
)
|
|
1372
|
+
}
|
|
1373
|
+
) : s.map((j) => ct(j)),
|
|
1374
|
+
p && /* @__PURE__ */ t.jsx(
|
|
1375
|
+
"div",
|
|
1376
|
+
{
|
|
1316
1377
|
style: {
|
|
1317
|
-
width: "
|
|
1378
|
+
width: "100%",
|
|
1379
|
+
display: "flex",
|
|
1380
|
+
justifyContent: "center"
|
|
1318
1381
|
},
|
|
1319
|
-
children:
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1382
|
+
children: /* @__PURE__ */ t.jsx(
|
|
1383
|
+
at,
|
|
1384
|
+
{
|
|
1385
|
+
withoutHover: !0,
|
|
1386
|
+
className: F.button,
|
|
1387
|
+
size: "s",
|
|
1388
|
+
onClick: () => {
|
|
1389
|
+
const j = [...s];
|
|
1390
|
+
let q = null;
|
|
1391
|
+
if (d) {
|
|
1392
|
+
for (let m = 0; m < d.length; m++)
|
|
1393
|
+
if (!s.find((k) => k.name === d[m])) {
|
|
1394
|
+
q = d[m];
|
|
1395
|
+
break;
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
_ === "select" && d ? j.push({
|
|
1399
|
+
name: q || d[0],
|
|
1400
|
+
id: mt(),
|
|
1401
|
+
...L,
|
|
1402
|
+
maxSymbols: 100
|
|
1403
|
+
// пример значения
|
|
1404
|
+
}) : _ === "input" ? j.push({
|
|
1405
|
+
name: "",
|
|
1406
|
+
id: mt(),
|
|
1407
|
+
...L,
|
|
1408
|
+
maxSymbols: 100
|
|
1409
|
+
}) : j.push({
|
|
1410
|
+
name: `Image ${s.length + 1}`,
|
|
1411
|
+
id: mt(),
|
|
1412
|
+
...L,
|
|
1413
|
+
maxSymbols: 100
|
|
1414
|
+
}), i(j);
|
|
1415
|
+
},
|
|
1416
|
+
style: {
|
|
1417
|
+
width: "fit-content"
|
|
1418
|
+
},
|
|
1419
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
|
|
1420
|
+
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1421
|
+
/* @__PURE__ */ t.jsx(
|
|
1422
|
+
v,
|
|
1423
|
+
{
|
|
1424
|
+
name: "Plus",
|
|
1425
|
+
width: 16,
|
|
1426
|
+
height: 16
|
|
1427
|
+
}
|
|
1428
|
+
)
|
|
1429
|
+
] })
|
|
1430
|
+
}
|
|
1431
|
+
)
|
|
1330
1432
|
}
|
|
1331
|
-
)
|
|
1433
|
+
)
|
|
1332
1434
|
] }),
|
|
1333
|
-
|
|
1435
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(jt, { items: a })
|
|
1334
1436
|
] });
|
|
1335
|
-
},
|
|
1336
|
-
title:
|
|
1337
|
-
subtitle:
|
|
1338
|
-
header:
|
|
1339
|
-
text:
|
|
1340
|
-
productsBlock:
|
|
1341
|
-
buttonsBlock:
|
|
1342
|
-
top:
|
|
1343
|
-
itemsBlock:
|
|
1344
|
-
typeTexts:
|
|
1345
|
-
block:
|
|
1346
|
-
active:
|
|
1347
|
-
products:
|
|
1348
|
-
product:
|
|
1349
|
-
button:
|
|
1350
|
-
image:
|
|
1351
|
-
info:
|
|
1352
|
-
name:
|
|
1353
|
-
buttons:
|
|
1354
|
-
modal:
|
|
1355
|
-
other:
|
|
1356
|
-
options:
|
|
1357
|
-
},
|
|
1358
|
-
const { activeButton: e, setActiveButton: s, popupPosition: i } =
|
|
1437
|
+
}, Es = "_title_174ru_1", Ds = "_subtitle_174ru_5", Ls = "_header_174ru_12", Rs = "_text_174ru_13", Ms = "_productsBlock_174ru_14", Hs = "_buttonsBlock_174ru_15", zs = "_top_174ru_26", Fs = "_itemsBlock_174ru_35", Vs = "_typeTexts_174ru_41", Us = "_block_174ru_48", Ys = "_active_174ru_60", Gs = "_products_174ru_14", Ws = "_product_174ru_14", Xs = "_button_174ru_15", Js = "_image_174ru_90", Qs = "_info_174ru_97", Ks = "_name_174ru_109", Zs = "_buttons_174ru_15", tn = "_modal_174ru_120", en = "_other_174ru_139", sn = "_options_174ru_145", dt = {
|
|
1438
|
+
title: Es,
|
|
1439
|
+
subtitle: Ds,
|
|
1440
|
+
header: Ls,
|
|
1441
|
+
text: Rs,
|
|
1442
|
+
productsBlock: Ms,
|
|
1443
|
+
buttonsBlock: Hs,
|
|
1444
|
+
top: zs,
|
|
1445
|
+
itemsBlock: Fs,
|
|
1446
|
+
typeTexts: Vs,
|
|
1447
|
+
block: Us,
|
|
1448
|
+
active: Ys,
|
|
1449
|
+
products: Gs,
|
|
1450
|
+
product: Ws,
|
|
1451
|
+
button: Xs,
|
|
1452
|
+
image: Js,
|
|
1453
|
+
info: Qs,
|
|
1454
|
+
name: Ks,
|
|
1455
|
+
buttons: Zs,
|
|
1456
|
+
modal: tn,
|
|
1457
|
+
other: en,
|
|
1458
|
+
options: sn
|
|
1459
|
+
}, nn = g.forwardRef((r, c) => {
|
|
1460
|
+
const { activeButton: e, setActiveButton: s, popupPosition: i } = r, [a, l] = g.useState(e.typesText), [h, n] = g.useState(e.destination), [o, f] = g.useState(e.page), [I, p] = g.useState(e.link || ""), [_, x] = g.useState(e.text || ""), [d, w] = g.useState(e.openInNewTab), { pages: E } = Ht();
|
|
1359
1461
|
return g.useEffect(() => {
|
|
1360
1462
|
s({
|
|
1361
1463
|
...e,
|
|
1362
1464
|
...{
|
|
1363
|
-
text:
|
|
1364
|
-
link:
|
|
1365
|
-
destination:
|
|
1366
|
-
typesText:
|
|
1367
|
-
page:
|
|
1368
|
-
openInNewTab:
|
|
1465
|
+
text: _,
|
|
1466
|
+
link: I,
|
|
1467
|
+
destination: h,
|
|
1468
|
+
typesText: a,
|
|
1469
|
+
page: o,
|
|
1470
|
+
openInNewTab: d
|
|
1369
1471
|
}
|
|
1370
1472
|
});
|
|
1371
|
-
}, [
|
|
1473
|
+
}, [a, h, I, _, o, d]), /* @__PURE__ */ t.jsxs(
|
|
1372
1474
|
"div",
|
|
1373
1475
|
{
|
|
1374
|
-
className:
|
|
1375
|
-
onClick: (
|
|
1376
|
-
|
|
1476
|
+
className: dt.modal,
|
|
1477
|
+
onClick: (y) => {
|
|
1478
|
+
y.stopPropagation();
|
|
1377
1479
|
},
|
|
1378
1480
|
style: {
|
|
1379
1481
|
top: `${i.top}px`,
|
|
1380
1482
|
left: `${i.left}px`
|
|
1381
1483
|
},
|
|
1382
|
-
ref:
|
|
1484
|
+
ref: c,
|
|
1383
1485
|
children: [
|
|
1384
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1385
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1486
|
+
/* @__PURE__ */ t.jsxs("div", { className: dt.top, children: [
|
|
1487
|
+
/* @__PURE__ */ t.jsx("h3", { className: dt.title, children: e.type }),
|
|
1386
1488
|
/* @__PURE__ */ t.jsx(
|
|
1387
|
-
|
|
1489
|
+
v,
|
|
1388
1490
|
{
|
|
1389
1491
|
name: "X",
|
|
1390
1492
|
height: 20,
|
|
@@ -1394,54 +1496,54 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1394
1496
|
}
|
|
1395
1497
|
)
|
|
1396
1498
|
] }),
|
|
1397
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1499
|
+
/* @__PURE__ */ t.jsxs("div", { className: dt.options, children: [
|
|
1398
1500
|
/* @__PURE__ */ t.jsx(
|
|
1399
|
-
|
|
1501
|
+
et,
|
|
1400
1502
|
{
|
|
1401
1503
|
label: "Destination",
|
|
1402
|
-
onChange: (
|
|
1403
|
-
options: ["Go to Page", "Open Link"].filter((
|
|
1404
|
-
value:
|
|
1504
|
+
onChange: (y) => n(y),
|
|
1505
|
+
options: ["Go to Page", "Open Link"].filter((y) => y !== h),
|
|
1506
|
+
value: h
|
|
1405
1507
|
}
|
|
1406
1508
|
),
|
|
1407
|
-
|
|
1408
|
-
|
|
1509
|
+
h === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
1510
|
+
et,
|
|
1409
1511
|
{
|
|
1410
1512
|
label: "Go to",
|
|
1411
|
-
onChange: (
|
|
1412
|
-
options:
|
|
1413
|
-
value:
|
|
1513
|
+
onChange: (y) => f(y),
|
|
1514
|
+
options: E ? Object.values(E).filter((y) => y.name !== o).map((y) => y.name) : [],
|
|
1515
|
+
value: o
|
|
1414
1516
|
}
|
|
1415
1517
|
) : /* @__PURE__ */ t.jsx(
|
|
1416
|
-
|
|
1518
|
+
X,
|
|
1417
1519
|
{
|
|
1418
|
-
onChange: (
|
|
1419
|
-
value:
|
|
1520
|
+
onChange: (y) => p(y),
|
|
1521
|
+
value: I,
|
|
1420
1522
|
placeholder: "https://",
|
|
1421
1523
|
label: "Link"
|
|
1422
1524
|
}
|
|
1423
1525
|
),
|
|
1424
1526
|
/* @__PURE__ */ t.jsx(
|
|
1425
|
-
|
|
1527
|
+
tt,
|
|
1426
1528
|
{
|
|
1427
1529
|
current: e.openInNewTab,
|
|
1428
1530
|
label: "Open in new tab",
|
|
1429
|
-
onChange: (
|
|
1531
|
+
onChange: (y) => w(y)
|
|
1430
1532
|
}
|
|
1431
1533
|
),
|
|
1432
1534
|
/* @__PURE__ */ t.jsx(
|
|
1433
|
-
|
|
1535
|
+
Ot,
|
|
1434
1536
|
{
|
|
1435
|
-
onChange: (
|
|
1436
|
-
value:
|
|
1537
|
+
onChange: (y) => x(y),
|
|
1538
|
+
value: _,
|
|
1437
1539
|
label: "Text",
|
|
1438
1540
|
maxLength: 150
|
|
1439
1541
|
}
|
|
1440
1542
|
),
|
|
1441
1543
|
/* @__PURE__ */ t.jsx(
|
|
1442
|
-
|
|
1544
|
+
Lt,
|
|
1443
1545
|
{
|
|
1444
|
-
typesText:
|
|
1546
|
+
typesText: a,
|
|
1445
1547
|
setTypesText: l
|
|
1446
1548
|
}
|
|
1447
1549
|
)
|
|
@@ -1449,231 +1551,242 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1449
1551
|
]
|
|
1450
1552
|
}
|
|
1451
1553
|
);
|
|
1452
|
-
}),
|
|
1453
|
-
subtitle:
|
|
1454
|
-
header:
|
|
1455
|
-
text:
|
|
1456
|
-
productsBlock:
|
|
1457
|
-
buttonsBlock:
|
|
1458
|
-
top:
|
|
1459
|
-
itemsBlock:
|
|
1460
|
-
typeTexts:
|
|
1461
|
-
block:
|
|
1462
|
-
active:
|
|
1463
|
-
products:
|
|
1464
|
-
product:
|
|
1465
|
-
button:
|
|
1466
|
-
image:
|
|
1467
|
-
info:
|
|
1468
|
-
name:
|
|
1469
|
-
buttons:
|
|
1470
|
-
modal:
|
|
1471
|
-
other:
|
|
1472
|
-
options:
|
|
1473
|
-
addButton:
|
|
1474
|
-
|
|
1475
|
-
|
|
1554
|
+
}), on = "_subtitle_jql1y_1", an = "_header_jql1y_8", cn = "_text_jql1y_9", ln = "_productsBlock_jql1y_10", rn = "_buttonsBlock_jql1y_11", dn = "_top_jql1y_23", un = "_itemsBlock_jql1y_32", mn = "_typeTexts_jql1y_38", hn = "_block_jql1y_45", _n = "_active_jql1y_58", pn = "_products_jql1y_10", gn = "_product_jql1y_10", fn = "_button_jql1y_11", xn = "_image_jql1y_88", bn = "_info_jql1y_95", jn = "_name_jql1y_107", vn = "_buttons_jql1y_11", yn = "_modal_jql1y_118", kn = "_other_jql1y_138", $n = "_options_jql1y_144", In = "_addButton_jql1y_150", Nn = "_deleteButton_jql1y_165", st = {
|
|
1555
|
+
subtitle: on,
|
|
1556
|
+
header: an,
|
|
1557
|
+
text: cn,
|
|
1558
|
+
productsBlock: ln,
|
|
1559
|
+
buttonsBlock: rn,
|
|
1560
|
+
top: dn,
|
|
1561
|
+
itemsBlock: un,
|
|
1562
|
+
typeTexts: mn,
|
|
1563
|
+
block: hn,
|
|
1564
|
+
active: _n,
|
|
1565
|
+
products: pn,
|
|
1566
|
+
product: gn,
|
|
1567
|
+
button: fn,
|
|
1568
|
+
image: xn,
|
|
1569
|
+
info: bn,
|
|
1570
|
+
name: jn,
|
|
1571
|
+
buttons: vn,
|
|
1572
|
+
modal: yn,
|
|
1573
|
+
other: kn,
|
|
1574
|
+
options: $n,
|
|
1575
|
+
addButton: In,
|
|
1576
|
+
deleteButton: Nn
|
|
1577
|
+
}, wn = (r) => {
|
|
1578
|
+
const { buttons: c, setButtons: e, deletable: s = !0, addable: i = !0 } = r, [a, l] = g.useState(null), [h, n] = g.useState({
|
|
1476
1579
|
top: 0,
|
|
1477
1580
|
left: 0
|
|
1478
|
-
}), [
|
|
1581
|
+
}), [o, f] = g.useState(null), I = g.useRef(null);
|
|
1479
1582
|
g.useEffect(() => {
|
|
1480
|
-
const
|
|
1583
|
+
const _ = () => {
|
|
1481
1584
|
l(null);
|
|
1482
1585
|
};
|
|
1483
|
-
return document.body.addEventListener("click",
|
|
1484
|
-
l(null), document.body.removeEventListener("click",
|
|
1586
|
+
return document.body.addEventListener("click", _), l(null), () => {
|
|
1587
|
+
l(null), document.body.removeEventListener("click", _);
|
|
1485
1588
|
};
|
|
1486
1589
|
}, []), g.useEffect(() => {
|
|
1487
|
-
if (
|
|
1488
|
-
const
|
|
1489
|
-
e(
|
|
1590
|
+
if (a) {
|
|
1591
|
+
const _ = [...c].map((x) => x.id === a.id ? a : x);
|
|
1592
|
+
e(_);
|
|
1490
1593
|
}
|
|
1491
|
-
}, [
|
|
1492
|
-
if (
|
|
1493
|
-
const
|
|
1494
|
-
let
|
|
1495
|
-
|
|
1496
|
-
top:
|
|
1497
|
-
left:
|
|
1594
|
+
}, [a]), g.useEffect(() => {
|
|
1595
|
+
if (I.current && o) {
|
|
1596
|
+
const _ = I.current.getBoundingClientRect().height, x = window.innerHeight;
|
|
1597
|
+
let d = o.top;
|
|
1598
|
+
d + _ > x + window.scrollY - 200 && (d = x + window.scrollY - _ - 200), d < 0 && (d = 10), n({
|
|
1599
|
+
top: d,
|
|
1600
|
+
left: o.left
|
|
1498
1601
|
});
|
|
1499
1602
|
}
|
|
1500
|
-
}, [
|
|
1501
|
-
const
|
|
1502
|
-
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1505
|
-
top:
|
|
1506
|
-
left:
|
|
1507
|
-
}), l(
|
|
1603
|
+
}, [I.current, o]);
|
|
1604
|
+
const p = (_, x) => {
|
|
1605
|
+
_.stopPropagation();
|
|
1606
|
+
const d = _.target.getBoundingClientRect();
|
|
1607
|
+
f({
|
|
1608
|
+
top: d.top + window.scrollY,
|
|
1609
|
+
left: d.left - 30
|
|
1610
|
+
}), l(x);
|
|
1508
1611
|
};
|
|
1509
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1510
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
1511
|
-
|
|
1612
|
+
return /* @__PURE__ */ t.jsxs("div", { className: st.products, children: [
|
|
1613
|
+
/* @__PURE__ */ t.jsx("h5", { className: st.subtitle, children: "Button Type" }),
|
|
1614
|
+
c.map((_) => /* @__PURE__ */ t.jsxs(
|
|
1512
1615
|
"div",
|
|
1513
1616
|
{
|
|
1514
|
-
className:
|
|
1617
|
+
className: st.product,
|
|
1515
1618
|
children: [
|
|
1516
1619
|
/* @__PURE__ */ t.jsx(
|
|
1517
|
-
|
|
1620
|
+
et,
|
|
1518
1621
|
{
|
|
1519
|
-
onChange: (
|
|
1520
|
-
const
|
|
1521
|
-
...
|
|
1522
|
-
type:
|
|
1523
|
-
} :
|
|
1524
|
-
e(
|
|
1622
|
+
onChange: (x) => {
|
|
1623
|
+
const w = [...c].map((E) => E.id === _.id ? {
|
|
1624
|
+
..._,
|
|
1625
|
+
type: x
|
|
1626
|
+
} : E);
|
|
1627
|
+
e(w);
|
|
1525
1628
|
},
|
|
1526
|
-
value:
|
|
1629
|
+
value: _.type,
|
|
1527
1630
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
1528
1631
|
}
|
|
1529
1632
|
),
|
|
1530
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1531
|
-
/* @__PURE__ */ t.jsx(
|
|
1532
|
-
|
|
1633
|
+
/* @__PURE__ */ t.jsxs("div", { className: st.buttons, children: [
|
|
1634
|
+
/* @__PURE__ */ t.jsx("div", { className: st.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1635
|
+
v,
|
|
1533
1636
|
{
|
|
1534
1637
|
name: "Sliders",
|
|
1535
1638
|
hoverable: !0,
|
|
1536
1639
|
width: 20,
|
|
1537
1640
|
height: 20,
|
|
1538
|
-
onClick: (
|
|
1539
|
-
|
|
1641
|
+
onClick: (x) => {
|
|
1642
|
+
p(x, _);
|
|
1540
1643
|
}
|
|
1541
1644
|
}
|
|
1542
|
-
),
|
|
1543
|
-
s && /* @__PURE__ */ t.jsx(
|
|
1544
|
-
|
|
1645
|
+
) }),
|
|
1646
|
+
s && /* @__PURE__ */ t.jsx("div", { className: st.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1647
|
+
v,
|
|
1545
1648
|
{
|
|
1546
1649
|
name: "Trash",
|
|
1547
1650
|
hoverable: !0,
|
|
1548
1651
|
onClick: () => {
|
|
1549
|
-
const
|
|
1550
|
-
e(
|
|
1652
|
+
const x = c.filter((d) => d.id !== _.id);
|
|
1653
|
+
e(x);
|
|
1551
1654
|
},
|
|
1552
1655
|
width: 20,
|
|
1553
1656
|
height: 20,
|
|
1554
1657
|
fill: "#C12A2A"
|
|
1555
1658
|
}
|
|
1556
|
-
)
|
|
1659
|
+
) })
|
|
1557
1660
|
] })
|
|
1558
1661
|
]
|
|
1559
1662
|
},
|
|
1560
|
-
|
|
1663
|
+
_.id
|
|
1561
1664
|
)),
|
|
1562
|
-
|
|
1563
|
-
|
|
1665
|
+
a && /* @__PURE__ */ t.jsx(
|
|
1666
|
+
nn,
|
|
1564
1667
|
{
|
|
1565
|
-
ref:
|
|
1566
|
-
activeButton:
|
|
1668
|
+
ref: I,
|
|
1669
|
+
activeButton: a,
|
|
1567
1670
|
setActiveButton: l,
|
|
1568
|
-
popupPosition:
|
|
1671
|
+
popupPosition: h
|
|
1569
1672
|
}
|
|
1570
1673
|
),
|
|
1571
|
-
i && /* @__PURE__ */ t.jsx(
|
|
1572
|
-
|
|
1674
|
+
i && /* @__PURE__ */ t.jsx(
|
|
1675
|
+
"div",
|
|
1573
1676
|
{
|
|
1574
|
-
withoutHover: !0,
|
|
1575
|
-
className: rt.button,
|
|
1576
|
-
size: "s",
|
|
1577
|
-
onClick: () => {
|
|
1578
|
-
const x = [...a];
|
|
1579
|
-
x.push({
|
|
1580
|
-
type: "Primary",
|
|
1581
|
-
id: dt(),
|
|
1582
|
-
typesText: [],
|
|
1583
|
-
destination: "Go to Page",
|
|
1584
|
-
text: "Button Name",
|
|
1585
|
-
page: "home",
|
|
1586
|
-
openInNewTab: !0
|
|
1587
|
-
}), e(x);
|
|
1588
|
-
},
|
|
1589
1677
|
style: {
|
|
1590
|
-
width: "
|
|
1678
|
+
width: "100%",
|
|
1679
|
+
display: "flex",
|
|
1680
|
+
justifyContent: "center"
|
|
1591
1681
|
},
|
|
1592
|
-
children:
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1682
|
+
children: /* @__PURE__ */ t.jsx(
|
|
1683
|
+
at,
|
|
1684
|
+
{
|
|
1685
|
+
withoutHover: !0,
|
|
1686
|
+
className: st.button,
|
|
1687
|
+
size: "s",
|
|
1688
|
+
onClick: () => {
|
|
1689
|
+
const _ = [...c];
|
|
1690
|
+
_.push({
|
|
1691
|
+
type: "Primary",
|
|
1692
|
+
id: mt(),
|
|
1693
|
+
typesText: [],
|
|
1694
|
+
destination: "Go to Page",
|
|
1695
|
+
text: "Button Name",
|
|
1696
|
+
page: "home",
|
|
1697
|
+
openInNewTab: !0
|
|
1698
|
+
}), e(_);
|
|
1699
|
+
},
|
|
1700
|
+
style: {
|
|
1701
|
+
width: "fit-content"
|
|
1702
|
+
},
|
|
1703
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: st.addButton, children: [
|
|
1704
|
+
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1705
|
+
/* @__PURE__ */ t.jsx(
|
|
1706
|
+
v,
|
|
1707
|
+
{
|
|
1708
|
+
name: "Plus",
|
|
1709
|
+
width: 16,
|
|
1710
|
+
height: 16
|
|
1711
|
+
}
|
|
1712
|
+
)
|
|
1713
|
+
] })
|
|
1714
|
+
}
|
|
1715
|
+
)
|
|
1603
1716
|
}
|
|
1604
|
-
)
|
|
1717
|
+
)
|
|
1605
1718
|
] });
|
|
1606
|
-
},
|
|
1607
|
-
const { isActiveButtons:
|
|
1608
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1609
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1610
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1719
|
+
}, ca = (r) => {
|
|
1720
|
+
const { isActiveButtons: c, setIsActiveButtons: e, buttons: s, setButtons: i } = r;
|
|
1721
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: dt.buttonsBlock, children: [
|
|
1722
|
+
/* @__PURE__ */ t.jsxs("div", { className: dt.top, children: [
|
|
1723
|
+
/* @__PURE__ */ t.jsx("h3", { className: dt.title, children: "Buttons" }),
|
|
1611
1724
|
/* @__PURE__ */ t.jsx(
|
|
1612
|
-
|
|
1725
|
+
tt,
|
|
1613
1726
|
{
|
|
1614
|
-
current:
|
|
1615
|
-
onChange: (
|
|
1727
|
+
current: c,
|
|
1728
|
+
onChange: (a) => e(a)
|
|
1616
1729
|
}
|
|
1617
1730
|
)
|
|
1618
1731
|
] }),
|
|
1619
1732
|
/* @__PURE__ */ t.jsx(
|
|
1620
|
-
|
|
1733
|
+
wn,
|
|
1621
1734
|
{
|
|
1622
1735
|
buttons: s,
|
|
1623
1736
|
setButtons: i
|
|
1624
1737
|
}
|
|
1625
1738
|
)
|
|
1626
1739
|
] }) });
|
|
1627
|
-
},
|
|
1628
|
-
wrapper:
|
|
1629
|
-
subtitle:
|
|
1630
|
-
content:
|
|
1631
|
-
range:
|
|
1632
|
-
track:
|
|
1633
|
-
progress:
|
|
1634
|
-
dots:
|
|
1635
|
-
dot:
|
|
1636
|
-
active:
|
|
1637
|
-
input:
|
|
1638
|
-
countBlock:
|
|
1639
|
-
count:
|
|
1640
|
-
controls:
|
|
1641
|
-
button:
|
|
1642
|
-
},
|
|
1643
|
-
const { label:
|
|
1644
|
-
|
|
1645
|
-
},
|
|
1646
|
-
|
|
1647
|
-
},
|
|
1648
|
-
const
|
|
1649
|
-
l(
|
|
1740
|
+
}, Cn = "_wrapper_m18qi_1", Bn = "_subtitle_m18qi_7", Sn = "_content_m18qi_14", Tn = "_range_m18qi_22", Pn = "_track_m18qi_27", An = "_progress_m18qi_36", On = "_dots_m18qi_46", qn = "_dot_m18qi_46", En = "_active_m18qi_65", Dn = "_input_m18qi_77", Ln = "_countBlock_m18qi_91", Rn = "_count_m18qi_91", Mn = "_controls_m18qi_107", Hn = "_button_m18qi_113", G = {
|
|
1741
|
+
wrapper: Cn,
|
|
1742
|
+
subtitle: Bn,
|
|
1743
|
+
content: Sn,
|
|
1744
|
+
range: Tn,
|
|
1745
|
+
track: Pn,
|
|
1746
|
+
progress: An,
|
|
1747
|
+
dots: On,
|
|
1748
|
+
dot: qn,
|
|
1749
|
+
active: En,
|
|
1750
|
+
input: Dn,
|
|
1751
|
+
countBlock: Ln,
|
|
1752
|
+
count: Rn,
|
|
1753
|
+
controls: Mn,
|
|
1754
|
+
button: Hn
|
|
1755
|
+
}, At = (r) => {
|
|
1756
|
+
const { label: c, min: e = 1, max: s = 4, step: i = 1, count: a, setCount: l } = r, [h, n] = g.useState(!1), o = Array.from({ length: (s - e) / i + 1 }), f = (a - e) / (s - e) * 100, I = () => {
|
|
1757
|
+
a < s && l(a + i);
|
|
1758
|
+
}, p = () => {
|
|
1759
|
+
a > e && l(a - i);
|
|
1760
|
+
}, _ = (x) => {
|
|
1761
|
+
const d = e + x * i;
|
|
1762
|
+
l(d);
|
|
1650
1763
|
};
|
|
1651
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1652
|
-
|
|
1653
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1654
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1655
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1764
|
+
return /* @__PURE__ */ t.jsxs("div", { className: G.wrapper, children: [
|
|
1765
|
+
c && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: c }),
|
|
1766
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.content, children: [
|
|
1767
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.range, children: [
|
|
1768
|
+
/* @__PURE__ */ t.jsx("div", { className: G.track }),
|
|
1656
1769
|
/* @__PURE__ */ t.jsx(
|
|
1657
1770
|
"div",
|
|
1658
1771
|
{
|
|
1659
|
-
className:
|
|
1660
|
-
style: { width: `${
|
|
1772
|
+
className: G.progress,
|
|
1773
|
+
style: { width: `${f}%` }
|
|
1661
1774
|
}
|
|
1662
1775
|
),
|
|
1663
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1664
|
-
const
|
|
1776
|
+
/* @__PURE__ */ t.jsx("div", { className: G.dots, children: o.map((x, d) => {
|
|
1777
|
+
const w = d <= (a - e) / i;
|
|
1665
1778
|
return /* @__PURE__ */ t.jsx(
|
|
1666
1779
|
"button",
|
|
1667
1780
|
{
|
|
1668
|
-
onClick: () =>
|
|
1669
|
-
className:
|
|
1670
|
-
[
|
|
1671
|
-
[
|
|
1672
|
-
[
|
|
1781
|
+
onClick: () => _(d),
|
|
1782
|
+
className: V(G.dot, {
|
|
1783
|
+
[G.active]: w,
|
|
1784
|
+
[G.inactive]: !w,
|
|
1785
|
+
[G.dragging]: h
|
|
1673
1786
|
}),
|
|
1674
|
-
"aria-label": `Set value to ${e +
|
|
1787
|
+
"aria-label": `Set value to ${e + d * i}`
|
|
1675
1788
|
},
|
|
1676
|
-
|
|
1789
|
+
d
|
|
1677
1790
|
);
|
|
1678
1791
|
}) }),
|
|
1679
1792
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1683,41 +1796,41 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1683
1796
|
min: e,
|
|
1684
1797
|
max: s,
|
|
1685
1798
|
step: i,
|
|
1686
|
-
value:
|
|
1687
|
-
onChange: (
|
|
1799
|
+
value: a,
|
|
1800
|
+
onChange: (x) => l(Number(x.target.value)),
|
|
1688
1801
|
onMouseDown: () => n(!0),
|
|
1689
1802
|
onMouseUp: () => n(!1),
|
|
1690
1803
|
onTouchStart: () => n(!0),
|
|
1691
1804
|
onTouchEnd: () => n(!1),
|
|
1692
|
-
className:
|
|
1805
|
+
className: G.input
|
|
1693
1806
|
}
|
|
1694
1807
|
)
|
|
1695
1808
|
] }),
|
|
1696
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1809
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.countBlock, children: [
|
|
1697
1810
|
/* @__PURE__ */ t.jsx(
|
|
1698
|
-
|
|
1811
|
+
X,
|
|
1699
1812
|
{
|
|
1700
1813
|
type: "number",
|
|
1701
1814
|
min: e,
|
|
1702
1815
|
max: s,
|
|
1703
1816
|
paddingless: !0,
|
|
1704
|
-
onChange: (
|
|
1705
|
-
const
|
|
1706
|
-
|
|
1817
|
+
onChange: (x) => {
|
|
1818
|
+
const d = Number(x);
|
|
1819
|
+
d > s ? l(s) : d < e ? l(e) : l(d);
|
|
1707
1820
|
},
|
|
1708
|
-
value: String(
|
|
1821
|
+
value: String(a)
|
|
1709
1822
|
}
|
|
1710
1823
|
),
|
|
1711
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1824
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.controls, children: [
|
|
1712
1825
|
/* @__PURE__ */ t.jsx(
|
|
1713
1826
|
"button",
|
|
1714
1827
|
{
|
|
1715
|
-
onClick:
|
|
1716
|
-
disabled:
|
|
1717
|
-
className:
|
|
1828
|
+
onClick: I,
|
|
1829
|
+
disabled: a >= s,
|
|
1830
|
+
className: G.button,
|
|
1718
1831
|
"aria-label": "Increment count",
|
|
1719
1832
|
children: /* @__PURE__ */ t.jsx(
|
|
1720
|
-
|
|
1833
|
+
v,
|
|
1721
1834
|
{
|
|
1722
1835
|
name: "CaretUp",
|
|
1723
1836
|
width: 15,
|
|
@@ -1729,12 +1842,12 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1729
1842
|
/* @__PURE__ */ t.jsx(
|
|
1730
1843
|
"button",
|
|
1731
1844
|
{
|
|
1732
|
-
onClick:
|
|
1733
|
-
disabled:
|
|
1734
|
-
className:
|
|
1845
|
+
onClick: p,
|
|
1846
|
+
disabled: a <= e,
|
|
1847
|
+
className: G.button,
|
|
1735
1848
|
"aria-label": "Decrement count",
|
|
1736
1849
|
children: /* @__PURE__ */ t.jsx(
|
|
1737
|
-
|
|
1850
|
+
v,
|
|
1738
1851
|
{
|
|
1739
1852
|
name: "CaretDown",
|
|
1740
1853
|
width: 15,
|
|
@@ -1747,38 +1860,39 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1747
1860
|
] })
|
|
1748
1861
|
] })
|
|
1749
1862
|
] });
|
|
1750
|
-
},
|
|
1751
|
-
title:
|
|
1752
|
-
subtitle:
|
|
1753
|
-
header:
|
|
1754
|
-
text:
|
|
1755
|
-
productsBlock:
|
|
1756
|
-
top:
|
|
1757
|
-
itemsBlock:
|
|
1758
|
-
typeTexts:
|
|
1759
|
-
block:
|
|
1760
|
-
active:
|
|
1761
|
-
products:
|
|
1762
|
-
product:
|
|
1763
|
-
button:
|
|
1764
|
-
image:
|
|
1765
|
-
info:
|
|
1766
|
-
name:
|
|
1767
|
-
buttons:
|
|
1768
|
-
modal:
|
|
1769
|
-
link:
|
|
1770
|
-
modalOptions:
|
|
1771
|
-
addButton:
|
|
1772
|
-
|
|
1773
|
-
|
|
1863
|
+
}, zn = "_title_1lejm_1", Fn = "_subtitle_1lejm_5", Vn = "_header_1lejm_12", Un = "_text_1lejm_13", Yn = "_productsBlock_1lejm_14", Gn = "_top_1lejm_26", Wn = "_itemsBlock_1lejm_35", Xn = "_typeTexts_1lejm_41", Jn = "_block_1lejm_48", Qn = "_active_1lejm_61", Kn = "_products_1lejm_14", Zn = "_product_1lejm_14", ti = "_button_1lejm_80", ei = "_image_1lejm_91", si = "_info_1lejm_98", ni = "_name_1lejm_110", ii = "_buttons_1lejm_114", oi = "_modal_1lejm_121", ai = "_link_1lejm_141", ci = "_modalOptions_1lejm_147", li = "_addButton_1lejm_159", ri = "_deleteButton_1lejm_174", W = {
|
|
1864
|
+
title: zn,
|
|
1865
|
+
subtitle: Fn,
|
|
1866
|
+
header: Vn,
|
|
1867
|
+
text: Un,
|
|
1868
|
+
productsBlock: Yn,
|
|
1869
|
+
top: Gn,
|
|
1870
|
+
itemsBlock: Wn,
|
|
1871
|
+
typeTexts: Xn,
|
|
1872
|
+
block: Jn,
|
|
1873
|
+
active: Qn,
|
|
1874
|
+
products: Kn,
|
|
1875
|
+
product: Zn,
|
|
1876
|
+
button: ti,
|
|
1877
|
+
image: ei,
|
|
1878
|
+
info: si,
|
|
1879
|
+
name: ni,
|
|
1880
|
+
buttons: ii,
|
|
1881
|
+
modal: oi,
|
|
1882
|
+
link: ai,
|
|
1883
|
+
modalOptions: ci,
|
|
1884
|
+
addButton: li,
|
|
1885
|
+
deleteButton: ri
|
|
1886
|
+
}, di = (r) => {
|
|
1887
|
+
const { activeItem: c, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: a } = r, l = a.find((n) => n.id === c.listingId);
|
|
1774
1888
|
if (!l) return null;
|
|
1775
|
-
function
|
|
1776
|
-
return n.length >
|
|
1889
|
+
function h(n, o) {
|
|
1890
|
+
return n.length > o ? `${n.slice(0, o)}...` : n;
|
|
1777
1891
|
}
|
|
1778
1892
|
return /* @__PURE__ */ t.jsxs(
|
|
1779
1893
|
"div",
|
|
1780
1894
|
{
|
|
1781
|
-
className:
|
|
1895
|
+
className: W.modal,
|
|
1782
1896
|
onClick: (n) => {
|
|
1783
1897
|
n.stopPropagation();
|
|
1784
1898
|
},
|
|
@@ -1787,10 +1901,10 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1787
1901
|
left: `${s.left}px`
|
|
1788
1902
|
},
|
|
1789
1903
|
children: [
|
|
1790
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1791
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
1904
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.top, children: [
|
|
1905
|
+
/* @__PURE__ */ t.jsx("h3", { children: h(l.productData.name, 20) }),
|
|
1792
1906
|
/* @__PURE__ */ t.jsx(
|
|
1793
|
-
|
|
1907
|
+
v,
|
|
1794
1908
|
{
|
|
1795
1909
|
name: "X",
|
|
1796
1910
|
height: 20,
|
|
@@ -1802,101 +1916,105 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1802
1916
|
}
|
|
1803
1917
|
)
|
|
1804
1918
|
] }),
|
|
1805
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1806
|
-
|
|
1919
|
+
/* @__PURE__ */ t.jsx("div", { className: W.modalOptions, children: /* @__PURE__ */ t.jsx(
|
|
1920
|
+
gt,
|
|
1807
1921
|
{
|
|
1808
1922
|
label: "Put up an attractive image",
|
|
1809
1923
|
activeImage: l.productData.images.length > 0 ? l.productData.images[0].cfId : void 0,
|
|
1810
1924
|
onChange: (n) => {
|
|
1811
|
-
const
|
|
1812
|
-
...
|
|
1925
|
+
const o = {
|
|
1926
|
+
...c,
|
|
1813
1927
|
image: n[0]
|
|
1814
1928
|
};
|
|
1815
|
-
e(
|
|
1929
|
+
e(o);
|
|
1816
1930
|
}
|
|
1817
1931
|
}
|
|
1818
1932
|
) })
|
|
1819
1933
|
]
|
|
1820
1934
|
}
|
|
1821
1935
|
);
|
|
1822
|
-
}
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
item: { index: a },
|
|
1831
|
-
collect: (o) => ({
|
|
1832
|
-
isDragging: o.isDragging()
|
|
1833
|
-
})
|
|
1834
|
-
});
|
|
1936
|
+
};
|
|
1937
|
+
function ui(r) {
|
|
1938
|
+
const { product: c, children: e } = r, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: h, isDragging: n } = St({
|
|
1939
|
+
id: String(c.listingId)
|
|
1940
|
+
}), o = {
|
|
1941
|
+
transform: Tt.Transform.toString(l),
|
|
1942
|
+
transition: h
|
|
1943
|
+
};
|
|
1835
1944
|
return /* @__PURE__ */ t.jsx(
|
|
1836
1945
|
"div",
|
|
1837
1946
|
{
|
|
1838
|
-
ref:
|
|
1839
|
-
|
|
1840
|
-
|
|
1947
|
+
ref: a,
|
|
1948
|
+
style: o,
|
|
1949
|
+
className: `${W.product} ${n ? W.dragging : ""}`,
|
|
1950
|
+
...s,
|
|
1951
|
+
...i,
|
|
1952
|
+
children: e
|
|
1841
1953
|
}
|
|
1842
1954
|
);
|
|
1843
|
-
}
|
|
1955
|
+
}
|
|
1956
|
+
const la = (r) => {
|
|
1844
1957
|
const {
|
|
1845
|
-
isActiveItems:
|
|
1958
|
+
isActiveItems: c,
|
|
1846
1959
|
setIsActiveItems: e,
|
|
1847
1960
|
items: s,
|
|
1848
1961
|
setItems: i,
|
|
1849
|
-
other:
|
|
1962
|
+
other: a,
|
|
1850
1963
|
title: l,
|
|
1851
|
-
subtitle:
|
|
1964
|
+
subtitle: h,
|
|
1852
1965
|
editable: n = !0,
|
|
1853
|
-
draggable:
|
|
1854
|
-
withImage:
|
|
1855
|
-
deletable:
|
|
1856
|
-
addable:
|
|
1857
|
-
itemsType:
|
|
1858
|
-
itemsOptions:
|
|
1859
|
-
} =
|
|
1966
|
+
draggable: o = !1,
|
|
1967
|
+
withImage: f = !1,
|
|
1968
|
+
deletable: I = !0,
|
|
1969
|
+
addable: p = !0,
|
|
1970
|
+
itemsType: _,
|
|
1971
|
+
itemsOptions: x
|
|
1972
|
+
} = r, [d, w] = g.useState(
|
|
1973
|
+
null
|
|
1974
|
+
), [E, y] = g.useState({
|
|
1860
1975
|
top: 0,
|
|
1861
1976
|
left: 0
|
|
1862
|
-
}), [
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1977
|
+
}), [L, B] = g.useState(!1), S = $t(
|
|
1978
|
+
It(Bt, {
|
|
1979
|
+
activationConstraint: {
|
|
1980
|
+
distance: 5
|
|
1981
|
+
}
|
|
1982
|
+
})
|
|
1983
|
+
);
|
|
1866
1984
|
g.useEffect(() => {
|
|
1867
|
-
const
|
|
1868
|
-
|
|
1985
|
+
const b = () => {
|
|
1986
|
+
w(null), B(!1);
|
|
1869
1987
|
};
|
|
1870
|
-
return document.body.addEventListener("click",
|
|
1871
|
-
|
|
1988
|
+
return document.body.addEventListener("click", b), w(null), B(!1), () => {
|
|
1989
|
+
w(null), B(!1), document.body.removeEventListener("click", b);
|
|
1872
1990
|
};
|
|
1873
1991
|
}, []), g.useEffect(() => {
|
|
1874
|
-
if (
|
|
1875
|
-
const
|
|
1876
|
-
i(
|
|
1992
|
+
if (d) {
|
|
1993
|
+
const b = [...s].map((T) => T.listingId === d.listingId ? d : T);
|
|
1994
|
+
i(b);
|
|
1877
1995
|
}
|
|
1878
|
-
}, [
|
|
1879
|
-
const M = (
|
|
1880
|
-
|
|
1881
|
-
const
|
|
1882
|
-
let
|
|
1883
|
-
|
|
1884
|
-
top:
|
|
1885
|
-
left:
|
|
1886
|
-
}),
|
|
1996
|
+
}, [d]);
|
|
1997
|
+
const M = (b, T) => {
|
|
1998
|
+
b.stopPropagation();
|
|
1999
|
+
const $ = b.target.getBoundingClientRect(), U = 100, O = window.innerHeight;
|
|
2000
|
+
let H = $.top + window.scrollY;
|
|
2001
|
+
H + U > O && (H = O - U - 20), B(!0), y({
|
|
2002
|
+
top: H - 80,
|
|
2003
|
+
left: $.left - 30
|
|
2004
|
+
}), w(T);
|
|
1887
2005
|
};
|
|
1888
|
-
function
|
|
1889
|
-
if (
|
|
1890
|
-
return
|
|
2006
|
+
function u(b) {
|
|
2007
|
+
if (f)
|
|
2008
|
+
return b ? /* @__PURE__ */ t.jsx(
|
|
1891
2009
|
"img",
|
|
1892
2010
|
{
|
|
1893
|
-
src: `https://imagedelivery.net/${
|
|
2011
|
+
src: `https://imagedelivery.net/${b}/w=1000`,
|
|
1894
2012
|
alt: "image",
|
|
1895
2013
|
width: 16,
|
|
1896
2014
|
height: 16
|
|
1897
2015
|
}
|
|
1898
2016
|
) : /* @__PURE__ */ t.jsx(
|
|
1899
|
-
|
|
2017
|
+
v,
|
|
1900
2018
|
{
|
|
1901
2019
|
name: "Image",
|
|
1902
2020
|
width: 16,
|
|
@@ -1905,244 +2023,275 @@ const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5
|
|
|
1905
2023
|
}
|
|
1906
2024
|
);
|
|
1907
2025
|
}
|
|
1908
|
-
const
|
|
1909
|
-
const
|
|
1910
|
-
if (
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
2026
|
+
const D = (b) => {
|
|
2027
|
+
const { active: T, over: $ } = b;
|
|
2028
|
+
if ($ && T.id !== $.id) {
|
|
2029
|
+
const U = s.findIndex((H) => String(H.listingId) === T.id), O = s.findIndex((H) => String(H.listingId) === $.id);
|
|
2030
|
+
if (U !== -1 && O !== -1) {
|
|
2031
|
+
const H = [...s], [Z] = H.splice(U, 1);
|
|
2032
|
+
H.splice(O, 0, Z), i(H);
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
}, K = (b, T) => {
|
|
2036
|
+
const $ = x.find((O) => b.listingId === O.id);
|
|
2037
|
+
if (!$) return null;
|
|
2038
|
+
const U = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2039
|
+
o && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2040
|
+
v,
|
|
1914
2041
|
{
|
|
1915
2042
|
name: "DotsSixVertical",
|
|
1916
2043
|
hoverable: !0,
|
|
1917
2044
|
width: 20,
|
|
1918
2045
|
height: 20
|
|
1919
2046
|
}
|
|
1920
|
-
) }
|
|
1921
|
-
|
|
1922
|
-
|
|
2047
|
+
) }),
|
|
2048
|
+
_ === "select" && /* @__PURE__ */ t.jsx(
|
|
2049
|
+
et,
|
|
1923
2050
|
{
|
|
1924
|
-
onChange: (
|
|
1925
|
-
const
|
|
1926
|
-
if (!
|
|
1927
|
-
const
|
|
1928
|
-
listingId:
|
|
1929
|
-
image:
|
|
1930
|
-
}, j =
|
|
1931
|
-
|
|
2051
|
+
onChange: (O) => {
|
|
2052
|
+
const H = [...s], Z = x.find((q) => q.productData.name === O);
|
|
2053
|
+
if (!Z) return;
|
|
2054
|
+
const ct = {
|
|
2055
|
+
listingId: Z.id,
|
|
2056
|
+
image: Z.productData.images.length > 0 ? Z.productData.images[0].cfId : ""
|
|
2057
|
+
}, j = H.map((q) => q.listingId === b.listingId ? ct : q);
|
|
2058
|
+
w(ct), i([...j]);
|
|
1932
2059
|
},
|
|
1933
|
-
value:
|
|
2060
|
+
value: $.productData.name,
|
|
1934
2061
|
options: [
|
|
1935
|
-
...
|
|
2062
|
+
...x.filter((O) => !s.find((H) => H.listingId === O.id)).map((O) => O.productData.name)
|
|
1936
2063
|
],
|
|
1937
|
-
leftAddon:
|
|
1938
|
-
|
|
2064
|
+
leftAddon: u(
|
|
2065
|
+
b.image || $.productData.images.length > 0 && $.productData.images[0].cfId || ""
|
|
1939
2066
|
)
|
|
1940
2067
|
},
|
|
1941
|
-
|
|
2068
|
+
T
|
|
1942
2069
|
),
|
|
1943
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1944
|
-
n && /* @__PURE__ */ t.jsx(
|
|
1945
|
-
|
|
2070
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.buttons, children: [
|
|
2071
|
+
n && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2072
|
+
v,
|
|
1946
2073
|
{
|
|
1947
2074
|
name: "Sliders",
|
|
1948
2075
|
hoverable: !0,
|
|
1949
2076
|
width: 20,
|
|
1950
2077
|
height: 20,
|
|
1951
|
-
onClick: (
|
|
2078
|
+
onClick: (O) => M(O, b)
|
|
1952
2079
|
}
|
|
1953
|
-
),
|
|
1954
|
-
|
|
1955
|
-
|
|
2080
|
+
) }),
|
|
2081
|
+
I && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2082
|
+
v,
|
|
1956
2083
|
{
|
|
1957
2084
|
name: "Trash",
|
|
1958
2085
|
hoverable: !0,
|
|
1959
2086
|
width: 20,
|
|
1960
2087
|
height: 20,
|
|
1961
2088
|
fill: "#C12A2A",
|
|
1962
|
-
onClick: () => i(s.filter((
|
|
2089
|
+
onClick: () => i(s.filter((O) => O !== b))
|
|
1963
2090
|
}
|
|
1964
|
-
)
|
|
2091
|
+
) })
|
|
1965
2092
|
] })
|
|
1966
2093
|
] });
|
|
1967
|
-
return
|
|
1968
|
-
|
|
2094
|
+
return o ? /* @__PURE__ */ t.jsx(
|
|
2095
|
+
ui,
|
|
1969
2096
|
{
|
|
1970
|
-
product:
|
|
1971
|
-
|
|
1972
|
-
moveProduct: C,
|
|
1973
|
-
children: w
|
|
2097
|
+
product: b,
|
|
2098
|
+
children: U
|
|
1974
2099
|
},
|
|
1975
|
-
|
|
2100
|
+
b.listingId
|
|
1976
2101
|
) : /* @__PURE__ */ t.jsx(
|
|
1977
2102
|
"div",
|
|
1978
2103
|
{
|
|
1979
|
-
className:
|
|
1980
|
-
children:
|
|
2104
|
+
className: W.product,
|
|
2105
|
+
children: U
|
|
1981
2106
|
},
|
|
1982
|
-
|
|
2107
|
+
b.listingId
|
|
1983
2108
|
);
|
|
1984
2109
|
};
|
|
1985
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1986
|
-
(l ||
|
|
1987
|
-
l && /* @__PURE__ */ t.jsx("h3", { className:
|
|
1988
|
-
|
|
1989
|
-
|
|
2110
|
+
return /* @__PURE__ */ t.jsxs("div", { className: W.productsBlock, children: [
|
|
2111
|
+
(l || c !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: W.top, children: [
|
|
2112
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: W.title, children: l }),
|
|
2113
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
2114
|
+
tt,
|
|
1990
2115
|
{
|
|
1991
|
-
current:
|
|
1992
|
-
onChange: (
|
|
2116
|
+
current: c,
|
|
2117
|
+
onChange: (b) => e == null ? void 0 : e(b)
|
|
1993
2118
|
}
|
|
1994
2119
|
)
|
|
1995
2120
|
] }),
|
|
1996
|
-
|
|
1997
|
-
|
|
2121
|
+
L && d && /* @__PURE__ */ t.jsx(
|
|
2122
|
+
di,
|
|
1998
2123
|
{
|
|
1999
|
-
activeItem:
|
|
2000
|
-
setActiveItem:
|
|
2001
|
-
setIsOpenModal:
|
|
2002
|
-
popupPosition:
|
|
2003
|
-
itemsOptions:
|
|
2124
|
+
activeItem: d,
|
|
2125
|
+
setActiveItem: w,
|
|
2126
|
+
setIsOpenModal: B,
|
|
2127
|
+
popupPosition: E,
|
|
2128
|
+
itemsOptions: x
|
|
2004
2129
|
}
|
|
2005
2130
|
),
|
|
2006
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2131
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.products, children: [
|
|
2132
|
+
h && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: h }),
|
|
2133
|
+
o ? /* @__PURE__ */ t.jsx(
|
|
2134
|
+
Nt,
|
|
2135
|
+
{
|
|
2136
|
+
sensors: S,
|
|
2137
|
+
onDragEnd: D,
|
|
2138
|
+
children: /* @__PURE__ */ t.jsx(
|
|
2139
|
+
wt,
|
|
2140
|
+
{
|
|
2141
|
+
items: s.map((b) => String(b.listingId)),
|
|
2142
|
+
strategy: Ct,
|
|
2143
|
+
children: s.map((b, T) => K(b, T))
|
|
2144
|
+
}
|
|
2145
|
+
)
|
|
2146
|
+
}
|
|
2147
|
+
) : s.map((b, T) => K(b, T)),
|
|
2148
|
+
p && /* @__PURE__ */ t.jsx(
|
|
2149
|
+
"div",
|
|
2011
2150
|
{
|
|
2012
|
-
withoutHover: !0,
|
|
2013
|
-
className: G.button,
|
|
2014
|
-
size: "s",
|
|
2015
|
-
onClick: () => {
|
|
2016
|
-
const k = [...s];
|
|
2017
|
-
for (let y = 0; y < f.length; y++)
|
|
2018
|
-
if (!s.find((L) => L.listingId === f[y].id)) {
|
|
2019
|
-
k.push({
|
|
2020
|
-
listingId: f[y].id,
|
|
2021
|
-
image: f[y].productData.images.length > 0 ? f[y].productData.images[0].cfId : ""
|
|
2022
|
-
});
|
|
2023
|
-
break;
|
|
2024
|
-
}
|
|
2025
|
-
i(k);
|
|
2026
|
-
},
|
|
2027
|
-
disabled: s.length === f.length,
|
|
2028
2151
|
style: {
|
|
2029
|
-
width: "
|
|
2152
|
+
width: "100%",
|
|
2153
|
+
display: "flex",
|
|
2154
|
+
justifyContent: "center"
|
|
2030
2155
|
},
|
|
2031
|
-
children:
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2156
|
+
children: /* @__PURE__ */ t.jsx(
|
|
2157
|
+
at,
|
|
2158
|
+
{
|
|
2159
|
+
withoutHover: !0,
|
|
2160
|
+
className: W.button,
|
|
2161
|
+
size: "s",
|
|
2162
|
+
onClick: () => {
|
|
2163
|
+
const b = [...s];
|
|
2164
|
+
for (let T = 0; T < x.length; T++)
|
|
2165
|
+
if (!s.find(($) => $.listingId === x[T].id)) {
|
|
2166
|
+
b.push({
|
|
2167
|
+
listingId: x[T].id,
|
|
2168
|
+
image: x[T].productData.images.length > 0 ? x[T].productData.images[0].cfId : ""
|
|
2169
|
+
});
|
|
2170
|
+
break;
|
|
2171
|
+
}
|
|
2172
|
+
i(b);
|
|
2173
|
+
},
|
|
2174
|
+
disabled: s.length === x.length,
|
|
2175
|
+
style: {
|
|
2176
|
+
width: "fit-content"
|
|
2177
|
+
},
|
|
2178
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: W.addButton, children: [
|
|
2179
|
+
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
2180
|
+
/* @__PURE__ */ t.jsx(
|
|
2181
|
+
v,
|
|
2182
|
+
{
|
|
2183
|
+
name: "Plus",
|
|
2184
|
+
width: 16,
|
|
2185
|
+
height: 16
|
|
2186
|
+
}
|
|
2187
|
+
)
|
|
2188
|
+
] })
|
|
2189
|
+
}
|
|
2190
|
+
)
|
|
2042
2191
|
}
|
|
2043
|
-
)
|
|
2192
|
+
)
|
|
2044
2193
|
] }),
|
|
2045
|
-
|
|
2194
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(jt, { items: a })
|
|
2046
2195
|
] });
|
|
2047
|
-
},
|
|
2048
|
-
options:
|
|
2049
|
-
price:
|
|
2050
|
-
oldPrice:
|
|
2051
|
-
newPrice:
|
|
2052
|
-
animate:
|
|
2053
|
-
appearAndBounce:
|
|
2054
|
-
meta:
|
|
2055
|
-
info:
|
|
2056
|
-
infoRight:
|
|
2057
|
-
buttons:
|
|
2058
|
-
variants:
|
|
2059
|
-
variant:
|
|
2060
|
-
stock:
|
|
2061
|
-
variantInfo:
|
|
2062
|
-
quantity:
|
|
2063
|
-
count:
|
|
2064
|
-
focused:
|
|
2065
|
-
button:
|
|
2066
|
-
activeVariant:
|
|
2067
|
-
chargeTypes:
|
|
2068
|
-
charge:
|
|
2069
|
-
chargeActive:
|
|
2070
|
-
title:
|
|
2196
|
+
}, mi = "_options_d1lk6_1", hi = "_price_d1lk6_12", _i = "_oldPrice_d1lk6_19", pi = "_newPrice_d1lk6_27", gi = "_animate_d1lk6_34", fi = "_appearAndBounce_d1lk6_1", xi = "_meta_d1lk6_52", bi = "_info_d1lk6_58", ji = "_infoRight_d1lk6_66", vi = "_buttons_d1lk6_73", yi = "_variants_d1lk6_80", ki = "_variant_d1lk6_80", $i = "_stock_d1lk6_98", Ii = "_variantInfo_d1lk6_105", Ni = "_quantity_d1lk6_111", wi = "_count_d1lk6_118", Ci = "_focused_d1lk6_135", Bi = "_button_d1lk6_73", Si = "_activeVariant_d1lk6_161", Ti = "_chargeTypes_d1lk6_165", Pi = "_charge_d1lk6_165", Ai = "_chargeActive_d1lk6_190", Oi = "_title_d1lk6_198", N = {
|
|
2197
|
+
options: mi,
|
|
2198
|
+
price: hi,
|
|
2199
|
+
oldPrice: _i,
|
|
2200
|
+
newPrice: pi,
|
|
2201
|
+
animate: gi,
|
|
2202
|
+
appearAndBounce: fi,
|
|
2203
|
+
meta: xi,
|
|
2204
|
+
info: bi,
|
|
2205
|
+
infoRight: ji,
|
|
2206
|
+
buttons: vi,
|
|
2207
|
+
variants: yi,
|
|
2208
|
+
variant: ki,
|
|
2209
|
+
stock: $i,
|
|
2210
|
+
variantInfo: Ii,
|
|
2211
|
+
quantity: Ni,
|
|
2212
|
+
count: wi,
|
|
2213
|
+
focused: Ci,
|
|
2214
|
+
button: Bi,
|
|
2215
|
+
activeVariant: Si,
|
|
2216
|
+
chargeTypes: Ti,
|
|
2217
|
+
charge: Pi,
|
|
2218
|
+
chargeActive: Ai,
|
|
2219
|
+
title: Oi
|
|
2071
2220
|
};
|
|
2072
|
-
var
|
|
2073
|
-
const
|
|
2074
|
-
var
|
|
2075
|
-
const { variants:
|
|
2221
|
+
var Mt = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(Mt || {});
|
|
2222
|
+
const ra = (r) => {
|
|
2223
|
+
var S, M;
|
|
2224
|
+
const { variants: c } = r, [e, s] = g.useState(c[0]), [i, a] = g.useState(e.chargeTypes[0]), l = bt(), [h, n] = g.useState(1), [o, f] = g.useState(!1), { reset: I, addProductToCart: p, getProducts: _, cart: x } = Pt(), [d, w] = g.useState(!1);
|
|
2076
2225
|
g.useEffect(() => {
|
|
2077
|
-
|
|
2078
|
-
const
|
|
2079
|
-
return () => clearTimeout(
|
|
2080
|
-
}, [
|
|
2081
|
-
async function
|
|
2082
|
-
await
|
|
2083
|
-
productId:
|
|
2226
|
+
w(!0);
|
|
2227
|
+
const u = setTimeout(() => w(!1), 600);
|
|
2228
|
+
return () => clearTimeout(u);
|
|
2229
|
+
}, [h]);
|
|
2230
|
+
async function E() {
|
|
2231
|
+
await _(), await p({
|
|
2232
|
+
productId: r.id,
|
|
2084
2233
|
productVariantId: e.id,
|
|
2085
|
-
quantity:
|
|
2234
|
+
quantity: h
|
|
2086
2235
|
});
|
|
2087
2236
|
}
|
|
2088
|
-
function
|
|
2089
|
-
|
|
2237
|
+
function y() {
|
|
2238
|
+
I(), E(), l("/checkout");
|
|
2090
2239
|
}
|
|
2091
|
-
console.log(
|
|
2092
|
-
function
|
|
2093
|
-
if (
|
|
2094
|
-
const
|
|
2095
|
-
return `${
|
|
2096
|
-
} else if (
|
|
2097
|
-
const
|
|
2098
|
-
return `${
|
|
2099
|
-
} else if (
|
|
2100
|
-
const
|
|
2101
|
-
return `${
|
|
2240
|
+
console.log(x);
|
|
2241
|
+
function L(u) {
|
|
2242
|
+
if (u >= 864e5) {
|
|
2243
|
+
const $ = Math.floor(u / 864e5);
|
|
2244
|
+
return `${$} ${$ === 1 ? "day" : "days"}`;
|
|
2245
|
+
} else if (u >= 36e5) {
|
|
2246
|
+
const $ = Math.floor(u / 36e5);
|
|
2247
|
+
return `${$} ${$ === 1 ? "hour" : "hours"}`;
|
|
2248
|
+
} else if (u >= 6e4) {
|
|
2249
|
+
const $ = Math.floor(u / 6e4);
|
|
2250
|
+
return `${$} ${$ === 1 ? "minute" : "minutes"}`;
|
|
2102
2251
|
} else {
|
|
2103
|
-
const
|
|
2104
|
-
return `${
|
|
2252
|
+
const $ = Math.floor(u / 1e3);
|
|
2253
|
+
return `${$} ${$ === 1 ? "second" : "seconds"}`;
|
|
2105
2254
|
}
|
|
2106
2255
|
}
|
|
2107
|
-
function
|
|
2108
|
-
return
|
|
2256
|
+
function B(u, D) {
|
|
2257
|
+
return u.length > D ? u.slice(0, D) + "..." : u;
|
|
2109
2258
|
}
|
|
2110
2259
|
return /* @__PURE__ */ t.jsxs("div", { className: N.options, children: [
|
|
2111
|
-
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: N.chargeTypes, children: e.chargeTypes.map((
|
|
2260
|
+
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: N.chargeTypes, children: e.chargeTypes.map((u) => /* @__PURE__ */ t.jsx(
|
|
2112
2261
|
"div",
|
|
2113
2262
|
{
|
|
2114
|
-
className:
|
|
2115
|
-
[N.chargeActive]: i ===
|
|
2263
|
+
className: V(N.charge, {
|
|
2264
|
+
[N.chargeActive]: i === u
|
|
2116
2265
|
}),
|
|
2117
|
-
onClick: () =>
|
|
2118
|
-
children:
|
|
2266
|
+
onClick: () => a(u),
|
|
2267
|
+
children: Mt[u]
|
|
2119
2268
|
},
|
|
2120
|
-
|
|
2269
|
+
u
|
|
2121
2270
|
)) }),
|
|
2122
|
-
/* @__PURE__ */ t.jsx("div", { className: N.variants, children:
|
|
2123
|
-
var
|
|
2271
|
+
/* @__PURE__ */ t.jsx("div", { className: N.variants, children: c.map((u) => {
|
|
2272
|
+
var D;
|
|
2124
2273
|
return /* @__PURE__ */ t.jsxs(
|
|
2125
2274
|
"div",
|
|
2126
2275
|
{
|
|
2127
|
-
className:
|
|
2128
|
-
[N.activeVariant]: e.id ===
|
|
2276
|
+
className: V(N.variant, {
|
|
2277
|
+
[N.activeVariant]: e.id === u.id
|
|
2129
2278
|
}),
|
|
2130
|
-
onClick: () => s(
|
|
2279
|
+
onClick: () => s(u),
|
|
2131
2280
|
children: [
|
|
2132
2281
|
/* @__PURE__ */ t.jsxs("div", { className: N.variantInfo, children: [
|
|
2133
|
-
/* @__PURE__ */ t.jsx("span", { className: N.title, children:
|
|
2282
|
+
/* @__PURE__ */ t.jsx("span", { className: N.title, children: B(u.name, 15) }),
|
|
2134
2283
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2135
2284
|
"$",
|
|
2136
|
-
i === "ONE_TIME" ?
|
|
2285
|
+
i === "ONE_TIME" ? u.price.amount : u.subscriptionSettings ? u.subscriptionSettings.price.amount : "Price Not Found"
|
|
2137
2286
|
] })
|
|
2138
2287
|
] }),
|
|
2139
2288
|
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: N.stock, children: [
|
|
2140
|
-
((
|
|
2289
|
+
((D = u.quantity.restrictions) == null ? void 0 : D.max) || u.quantity.available || 0,
|
|
2141
2290
|
" in stock"
|
|
2142
2291
|
] }) })
|
|
2143
2292
|
]
|
|
2144
2293
|
},
|
|
2145
|
-
|
|
2294
|
+
u.id
|
|
2146
2295
|
);
|
|
2147
2296
|
}) }),
|
|
2148
2297
|
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: N.quantity, children: [
|
|
@@ -2150,28 +2299,28 @@ const Xa = (u) => {
|
|
|
2150
2299
|
"button",
|
|
2151
2300
|
{
|
|
2152
2301
|
onClick: () => {
|
|
2153
|
-
|
|
2302
|
+
h > 1 ? n((u) => u - 1) : n(1);
|
|
2154
2303
|
},
|
|
2155
2304
|
className: N.button,
|
|
2156
|
-
disabled: e.quantity.restrictions &&
|
|
2157
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2305
|
+
disabled: e.quantity.restrictions && h <= e.quantity.restrictions.min,
|
|
2306
|
+
children: /* @__PURE__ */ t.jsx(v, { name: "Minus" })
|
|
2158
2307
|
}
|
|
2159
2308
|
),
|
|
2160
2309
|
/* @__PURE__ */ t.jsx(
|
|
2161
2310
|
"label",
|
|
2162
2311
|
{
|
|
2163
|
-
className:
|
|
2164
|
-
[N.focused]:
|
|
2312
|
+
className: V(N.count, {
|
|
2313
|
+
[N.focused]: o
|
|
2165
2314
|
}),
|
|
2166
|
-
onFocus: () =>
|
|
2167
|
-
onBlur: () =>
|
|
2315
|
+
onFocus: () => f(!0),
|
|
2316
|
+
onBlur: () => f(!1),
|
|
2168
2317
|
children: /* @__PURE__ */ t.jsx(
|
|
2169
|
-
|
|
2318
|
+
X,
|
|
2170
2319
|
{
|
|
2171
2320
|
type: "number",
|
|
2172
|
-
value: String(
|
|
2173
|
-
onChange: (
|
|
2174
|
-
max: ((
|
|
2321
|
+
value: String(h),
|
|
2322
|
+
onChange: (u) => n(Number(u)),
|
|
2323
|
+
max: ((S = e.quantity.restrictions) == null ? void 0 : S.max) || e.quantity.available || 1 / 0,
|
|
2175
2324
|
min: ((M = e.quantity.restrictions) == null ? void 0 : M.min) || 0,
|
|
2176
2325
|
style: {
|
|
2177
2326
|
backgroundColor: "transparent",
|
|
@@ -2186,11 +2335,11 @@ const Xa = (u) => {
|
|
|
2186
2335
|
"button",
|
|
2187
2336
|
{
|
|
2188
2337
|
onClick: () => {
|
|
2189
|
-
n((
|
|
2338
|
+
n((u) => u + 1);
|
|
2190
2339
|
},
|
|
2191
2340
|
className: N.button,
|
|
2192
|
-
disabled: !!(e.quantity.restrictions &&
|
|
2193
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2341
|
+
disabled: !!(e.quantity.restrictions && h >= e.quantity.restrictions.max || e.quantity.available && h >= e.quantity.available),
|
|
2342
|
+
children: /* @__PURE__ */ t.jsx(v, { name: "Plus" })
|
|
2194
2343
|
}
|
|
2195
2344
|
)
|
|
2196
2345
|
] }),
|
|
@@ -2199,7 +2348,7 @@ const Xa = (u) => {
|
|
|
2199
2348
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
2200
2349
|
/* @__PURE__ */ t.jsxs("div", { className: N.infoRight, children: [
|
|
2201
2350
|
/* @__PURE__ */ t.jsx(
|
|
2202
|
-
|
|
2351
|
+
v,
|
|
2203
2352
|
{
|
|
2204
2353
|
name: "Lightning",
|
|
2205
2354
|
fill: "#FF3F19",
|
|
@@ -2207,25 +2356,25 @@ const Xa = (u) => {
|
|
|
2207
2356
|
height: 20
|
|
2208
2357
|
}
|
|
2209
2358
|
),
|
|
2210
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
2359
|
+
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : L(e.deliveryTime) })
|
|
2211
2360
|
] })
|
|
2212
2361
|
] }),
|
|
2213
2362
|
/* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
|
|
2214
2363
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
2215
2364
|
/* @__PURE__ */ t.jsx("div", { className: N.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
|
|
2216
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2365
|
+
/* @__PURE__ */ t.jsxs("span", { className: V(N.newPrice, { [N.animate]: d }), children: [
|
|
2217
2366
|
"$ ",
|
|
2218
|
-
(e.price.amount || 0) *
|
|
2367
|
+
(e.price.amount || 0) * h
|
|
2219
2368
|
] }),
|
|
2220
2369
|
/* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
|
|
2221
2370
|
"$ ",
|
|
2222
|
-
(e.compareAtPrice.amount || 0) *
|
|
2371
|
+
(e.compareAtPrice.amount || 0) * h
|
|
2223
2372
|
] })
|
|
2224
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
2373
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: V(N.newPrice, { [N.animate]: d }), children: [
|
|
2225
2374
|
"$ ",
|
|
2226
|
-
(e.price.amount || 0) *
|
|
2375
|
+
(e.price.amount || 0) * h
|
|
2227
2376
|
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
|
|
2228
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2377
|
+
/* @__PURE__ */ t.jsxs("span", { className: V(N.newPrice, { [N.animate]: d }), children: [
|
|
2229
2378
|
"$ ",
|
|
2230
2379
|
e.subscriptionSettings.price.amount || 0
|
|
2231
2380
|
] }),
|
|
@@ -2233,7 +2382,7 @@ const Xa = (u) => {
|
|
|
2233
2382
|
"$ ",
|
|
2234
2383
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
2235
2384
|
] })
|
|
2236
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2385
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: V(N.newPrice, { [N.animate]: d }), children: [
|
|
2237
2386
|
"$ ",
|
|
2238
2387
|
e.subscriptionSettings.price.amount || 0
|
|
2239
2388
|
] }) })
|
|
@@ -2241,84 +2390,87 @@ const Xa = (u) => {
|
|
|
2241
2390
|
] }),
|
|
2242
2391
|
/* @__PURE__ */ t.jsxs("div", { className: N.buttons, children: [
|
|
2243
2392
|
/* @__PURE__ */ t.jsx(
|
|
2244
|
-
|
|
2393
|
+
at,
|
|
2245
2394
|
{
|
|
2246
2395
|
type: "Primary",
|
|
2247
|
-
onClick: () =>
|
|
2396
|
+
onClick: () => y(),
|
|
2248
2397
|
children: /* @__PURE__ */ t.jsx("span", { children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now" })
|
|
2249
2398
|
}
|
|
2250
2399
|
),
|
|
2251
2400
|
i === "ONE_TIME" && /* @__PURE__ */ t.jsx(
|
|
2252
|
-
|
|
2401
|
+
at,
|
|
2253
2402
|
{
|
|
2254
2403
|
type: "Secondary",
|
|
2255
|
-
onClick: () =>
|
|
2404
|
+
onClick: () => E(),
|
|
2256
2405
|
children: "Add to Cart"
|
|
2257
2406
|
}
|
|
2258
2407
|
)
|
|
2259
2408
|
] })
|
|
2260
2409
|
] });
|
|
2261
|
-
},
|
|
2262
|
-
button:
|
|
2263
|
-
login:
|
|
2264
|
-
signUp:
|
|
2265
|
-
buttons:
|
|
2266
|
-
modal:
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2410
|
+
}, qi = "_button_oyh2y_1", Ei = "_login_oyh2y_14", Di = "_signUp_oyh2y_18", Li = "_buttons_oyh2y_23", Ri = "_modal_oyh2y_32", Mi = "_closing_oyh2y_61", Hi = "_info_oyh2y_85", zi = "_top_oyh2y_92", Fi = "_title_oyh2y_103", Vi = "_clear_oyh2y_110", Ui = "_activeClear_oyh2y_117", Yi = "_count_oyh2y_121", Gi = "_cart_oyh2y_136", Wi = "_empty_oyh2y_144", Xi = "_product_oyh2y_170", Ji = "_products_oyh2y_179", Qi = "_image_oyh2y_187", Ki = "_productInfo_oyh2y_193", Zi = "_content_oyh2y_200", to = "_name_oyh2y_206", eo = "_price_oyh2y_212", so = "_productButtons_oyh2y_218", no = "_productButton_oyh2y_218", io = "_productCount_oyh2y_238", oo = "_bottom_oyh2y_254", ao = "_subtotal_oyh2y_262", co = "_block_oyh2y_270", lo = "_shoppingCount_oyh2y_277", ro = "_total_oyh2y_297", uo = "_link_oyh2y_303", mo = "_userInfo_oyh2y_310", C = {
|
|
2411
|
+
button: qi,
|
|
2412
|
+
login: Ei,
|
|
2413
|
+
signUp: Di,
|
|
2414
|
+
buttons: Li,
|
|
2415
|
+
modal: Ri,
|
|
2416
|
+
"slide-in-fade": "_slide-in-fade_oyh2y_1",
|
|
2417
|
+
closing: Mi,
|
|
2418
|
+
"slide-out-fade": "_slide-out-fade_oyh2y_1",
|
|
2419
|
+
info: Hi,
|
|
2420
|
+
top: zi,
|
|
2421
|
+
title: Fi,
|
|
2422
|
+
clear: Vi,
|
|
2423
|
+
activeClear: Ui,
|
|
2424
|
+
count: Yi,
|
|
2425
|
+
cart: Gi,
|
|
2426
|
+
empty: Wi,
|
|
2427
|
+
product: Xi,
|
|
2428
|
+
products: Ji,
|
|
2429
|
+
image: Qi,
|
|
2430
|
+
productInfo: Ki,
|
|
2431
|
+
content: Zi,
|
|
2432
|
+
name: to,
|
|
2433
|
+
price: eo,
|
|
2434
|
+
productButtons: so,
|
|
2435
|
+
productButton: no,
|
|
2436
|
+
productCount: io,
|
|
2437
|
+
bottom: oo,
|
|
2438
|
+
subtotal: ao,
|
|
2439
|
+
block: co,
|
|
2440
|
+
shoppingCount: lo,
|
|
2441
|
+
total: ro,
|
|
2442
|
+
link: uo,
|
|
2443
|
+
userInfo: mo
|
|
2444
|
+
}, ho = "_button_85085_1", _o = "_primary_85085_20", po = "_primaryHovered_85085_30", go = "_secondary_85085_34", fo = "_secondaryHovered_85085_44", xo = "_tertiary_85085_48", bo = "_tertiaryHovered_85085_58", jo = "_content_85085_62", nt = {
|
|
2445
|
+
button: ho,
|
|
2446
|
+
primary: _o,
|
|
2447
|
+
primaryHovered: po,
|
|
2448
|
+
secondary: go,
|
|
2449
|
+
secondaryHovered: fo,
|
|
2450
|
+
tertiary: xo,
|
|
2451
|
+
tertiaryHovered: bo,
|
|
2452
|
+
content: jo
|
|
2453
|
+
}, kt = (r) => {
|
|
2454
|
+
const { children: c, onClick: e, style: s, className: i, disabled: a = !1, type: l = "Primary" } = r, { themeSettings: h } = qt();
|
|
2303
2455
|
return /* @__PURE__ */ t.jsx(
|
|
2304
2456
|
"button",
|
|
2305
2457
|
{
|
|
2306
|
-
className:
|
|
2307
|
-
[
|
|
2308
|
-
[
|
|
2309
|
-
[
|
|
2310
|
-
[
|
|
2311
|
-
[
|
|
2312
|
-
[
|
|
2458
|
+
className: V(nt.button, i, {
|
|
2459
|
+
[nt.primary]: l === "Primary",
|
|
2460
|
+
[nt.secondary]: l === "Secondary",
|
|
2461
|
+
[nt.tertiary]: l === "Tertiary",
|
|
2462
|
+
[nt.primaryHovered]: l === "Primary" && !a && h.buttons.primary.hover,
|
|
2463
|
+
[nt.secondaryHovered]: l === "Secondary" && !a && h.buttons.secondary.hover,
|
|
2464
|
+
[nt.tertiaryHovered]: l === "Tertiary" && !a && h.buttons.tertiary.hover
|
|
2313
2465
|
}),
|
|
2314
2466
|
onClick: e,
|
|
2315
2467
|
style: {
|
|
2316
2468
|
...s
|
|
2317
2469
|
},
|
|
2318
|
-
disabled:
|
|
2319
|
-
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2470
|
+
disabled: a,
|
|
2471
|
+
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: nt.content, children: [
|
|
2320
2472
|
/* @__PURE__ */ t.jsx(
|
|
2321
|
-
|
|
2473
|
+
v,
|
|
2322
2474
|
{
|
|
2323
2475
|
name: "ArrowRight",
|
|
2324
2476
|
fill: "#757575",
|
|
@@ -2326,69 +2478,69 @@ const Xa = (u) => {
|
|
|
2326
2478
|
height: 20
|
|
2327
2479
|
}
|
|
2328
2480
|
),
|
|
2329
|
-
|
|
2330
|
-
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children:
|
|
2481
|
+
c
|
|
2482
|
+
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: c })
|
|
2331
2483
|
}
|
|
2332
2484
|
);
|
|
2333
2485
|
};
|
|
2334
|
-
class
|
|
2486
|
+
class pt extends Error {
|
|
2335
2487
|
}
|
|
2336
|
-
|
|
2337
|
-
function
|
|
2338
|
-
return decodeURIComponent(atob(
|
|
2488
|
+
pt.prototype.name = "InvalidTokenError";
|
|
2489
|
+
function vo(r) {
|
|
2490
|
+
return decodeURIComponent(atob(r).replace(/(.)/g, (c, e) => {
|
|
2339
2491
|
let s = e.charCodeAt(0).toString(16).toUpperCase();
|
|
2340
2492
|
return s.length < 2 && (s = "0" + s), "%" + s;
|
|
2341
2493
|
}));
|
|
2342
2494
|
}
|
|
2343
|
-
function
|
|
2344
|
-
let
|
|
2345
|
-
switch (
|
|
2495
|
+
function yo(r) {
|
|
2496
|
+
let c = r.replace(/-/g, "+").replace(/_/g, "/");
|
|
2497
|
+
switch (c.length % 4) {
|
|
2346
2498
|
case 0:
|
|
2347
2499
|
break;
|
|
2348
2500
|
case 2:
|
|
2349
|
-
|
|
2501
|
+
c += "==";
|
|
2350
2502
|
break;
|
|
2351
2503
|
case 3:
|
|
2352
|
-
|
|
2504
|
+
c += "=";
|
|
2353
2505
|
break;
|
|
2354
2506
|
default:
|
|
2355
2507
|
throw new Error("base64 string is not of the correct length");
|
|
2356
2508
|
}
|
|
2357
2509
|
try {
|
|
2358
|
-
return
|
|
2510
|
+
return vo(c);
|
|
2359
2511
|
} catch {
|
|
2360
|
-
return atob(
|
|
2512
|
+
return atob(c);
|
|
2361
2513
|
}
|
|
2362
2514
|
}
|
|
2363
|
-
function
|
|
2364
|
-
if (typeof
|
|
2365
|
-
throw new
|
|
2366
|
-
|
|
2367
|
-
const e =
|
|
2515
|
+
function ko(r, c) {
|
|
2516
|
+
if (typeof r != "string")
|
|
2517
|
+
throw new pt("Invalid token specified: must be a string");
|
|
2518
|
+
c || (c = {});
|
|
2519
|
+
const e = c.header === !0 ? 0 : 1, s = r.split(".")[e];
|
|
2368
2520
|
if (typeof s != "string")
|
|
2369
|
-
throw new
|
|
2521
|
+
throw new pt(`Invalid token specified: missing part #${e + 1}`);
|
|
2370
2522
|
let i;
|
|
2371
2523
|
try {
|
|
2372
|
-
i =
|
|
2373
|
-
} catch (
|
|
2374
|
-
throw new
|
|
2524
|
+
i = yo(s);
|
|
2525
|
+
} catch (a) {
|
|
2526
|
+
throw new pt(`Invalid token specified: invalid base64 for part #${e + 1} (${a.message})`);
|
|
2375
2527
|
}
|
|
2376
2528
|
try {
|
|
2377
2529
|
return JSON.parse(i);
|
|
2378
|
-
} catch (
|
|
2379
|
-
throw new
|
|
2530
|
+
} catch (a) {
|
|
2531
|
+
throw new pt(`Invalid token specified: invalid json for part #${e + 1} (${a.message})`);
|
|
2380
2532
|
}
|
|
2381
2533
|
}
|
|
2382
|
-
const
|
|
2383
|
-
const { shopping:
|
|
2534
|
+
const da = (r) => {
|
|
2535
|
+
const { shopping: c, signUp: e } = r, s = bt();
|
|
2384
2536
|
function i(l) {
|
|
2385
2537
|
s(l);
|
|
2386
2538
|
}
|
|
2387
|
-
const
|
|
2388
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2389
|
-
|
|
2390
|
-
!
|
|
2391
|
-
|
|
2539
|
+
const a = JSON.parse(localStorage.getItem("token") || "{}");
|
|
2540
|
+
return /* @__PURE__ */ t.jsxs("div", { className: C.buttons, children: [
|
|
2541
|
+
c && /* @__PURE__ */ t.jsx($o, {}),
|
|
2542
|
+
!a.data && /* @__PURE__ */ t.jsx(
|
|
2543
|
+
kt,
|
|
2392
2544
|
{
|
|
2393
2545
|
onClick: () => i("/customer-dash"),
|
|
2394
2546
|
type: "Secondary",
|
|
@@ -2398,8 +2550,8 @@ const Ja = (u) => {
|
|
|
2398
2550
|
children: "Login"
|
|
2399
2551
|
}
|
|
2400
2552
|
),
|
|
2401
|
-
!
|
|
2402
|
-
|
|
2553
|
+
!a.data && e && /* @__PURE__ */ t.jsx(
|
|
2554
|
+
kt,
|
|
2403
2555
|
{
|
|
2404
2556
|
onClick: () => i("/customer-dash"),
|
|
2405
2557
|
type: "Primary",
|
|
@@ -2409,142 +2561,157 @@ const Ja = (u) => {
|
|
|
2409
2561
|
children: "Sign Up"
|
|
2410
2562
|
}
|
|
2411
2563
|
),
|
|
2412
|
-
|
|
2564
|
+
a.data && /* @__PURE__ */ t.jsx(wo, { token: a.data })
|
|
2413
2565
|
] });
|
|
2414
|
-
},
|
|
2415
|
-
const [
|
|
2416
|
-
function l(
|
|
2417
|
-
for (let
|
|
2418
|
-
for (let
|
|
2419
|
-
if (i.parts[
|
|
2420
|
-
return i.parts[
|
|
2566
|
+
}, $o = () => {
|
|
2567
|
+
const [r, c] = g.useState(!1), [e, s] = g.useState([]), { cart: i, getProducts: a } = Pt();
|
|
2568
|
+
function l(p) {
|
|
2569
|
+
for (let _ = 0; _ < i.parts.length; _++)
|
|
2570
|
+
for (let x = 0; x < p.variants.length; x++)
|
|
2571
|
+
if (i.parts[_].productVariantId === p.variants[_].id)
|
|
2572
|
+
return i.parts[_].productVariantId;
|
|
2421
2573
|
}
|
|
2422
|
-
function
|
|
2423
|
-
for (let
|
|
2424
|
-
for (let
|
|
2425
|
-
if (i.parts[
|
|
2426
|
-
return i.parts[
|
|
2574
|
+
function h(p) {
|
|
2575
|
+
for (let _ = 0; _ < i.parts.length; _++)
|
|
2576
|
+
for (let x = 0; x < p.variants.length; x++)
|
|
2577
|
+
if (i.parts[_].productVariantId === p.variants[_].id)
|
|
2578
|
+
return i.parts[_].quantity;
|
|
2427
2579
|
}
|
|
2428
2580
|
g.useEffect(() => {
|
|
2429
2581
|
(async () => {
|
|
2430
|
-
const
|
|
2431
|
-
...
|
|
2432
|
-
activeVariantId: l(
|
|
2433
|
-
quantity:
|
|
2582
|
+
const _ = i.parts.map((w) => String(w.productId)), d = (await a([..._])).map((w) => ({
|
|
2583
|
+
...w,
|
|
2584
|
+
activeVariantId: l(w),
|
|
2585
|
+
quantity: h(w)
|
|
2434
2586
|
}));
|
|
2435
|
-
s(
|
|
2587
|
+
s(d);
|
|
2436
2588
|
})();
|
|
2437
2589
|
}, [i.parts.length]);
|
|
2438
|
-
function n(
|
|
2439
|
-
var
|
|
2440
|
-
return !
|
|
2590
|
+
function n(p) {
|
|
2591
|
+
var _;
|
|
2592
|
+
return !p || !(p != null && p.variants) ? !1 : (_ = p.variants.find((x) => x.id === p.activeVariantId)) == null ? void 0 : _.subscriptionSettings;
|
|
2441
2593
|
}
|
|
2442
|
-
const
|
|
2443
|
-
|
|
2594
|
+
const o = i.parts.length > 0 && e.length > 0 && !n(e[0]);
|
|
2595
|
+
console.log(i.parts.length > 0, e.length > 0, !n(e[0]));
|
|
2596
|
+
const [f, I] = g.useState(!1);
|
|
2597
|
+
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2444
2598
|
/* @__PURE__ */ t.jsxs(
|
|
2445
2599
|
"div",
|
|
2446
2600
|
{
|
|
2447
|
-
className:
|
|
2448
|
-
onClick: (
|
|
2449
|
-
|
|
2601
|
+
className: C.button,
|
|
2602
|
+
onClick: (p) => {
|
|
2603
|
+
p.stopPropagation(), c(!0), I(!0);
|
|
2450
2604
|
},
|
|
2451
2605
|
children: [
|
|
2452
2606
|
/* @__PURE__ */ t.jsx(
|
|
2453
|
-
|
|
2607
|
+
v,
|
|
2454
2608
|
{
|
|
2455
2609
|
name: "Handbag",
|
|
2456
2610
|
fill: "var(--icon-primary)"
|
|
2457
2611
|
}
|
|
2458
2612
|
),
|
|
2459
|
-
|
|
2613
|
+
o && /* @__PURE__ */ t.jsx("div", { className: C.shoppingCount, children: i.parts.length })
|
|
2460
2614
|
]
|
|
2461
2615
|
}
|
|
2462
2616
|
),
|
|
2463
|
-
|
|
2464
|
-
|
|
2617
|
+
r && /* @__PURE__ */ t.jsx(
|
|
2618
|
+
Et,
|
|
2465
2619
|
{
|
|
2466
|
-
|
|
2467
|
-
|
|
2620
|
+
close: () => {
|
|
2621
|
+
I(!1), setTimeout(() => {
|
|
2622
|
+
c(!1);
|
|
2623
|
+
}, 300);
|
|
2624
|
+
},
|
|
2625
|
+
children: /* @__PURE__ */ t.jsx(
|
|
2626
|
+
Io,
|
|
2627
|
+
{
|
|
2628
|
+
activeProducts: e,
|
|
2629
|
+
isCartNotEmpty: o,
|
|
2630
|
+
isOpen: f
|
|
2631
|
+
}
|
|
2632
|
+
)
|
|
2468
2633
|
}
|
|
2469
|
-
)
|
|
2634
|
+
)
|
|
2470
2635
|
] });
|
|
2471
|
-
},
|
|
2472
|
-
const { activeProducts:
|
|
2473
|
-
function
|
|
2474
|
-
|
|
2636
|
+
}, Io = (r) => {
|
|
2637
|
+
const { activeProducts: c, isCartNotEmpty: e, isOpen: s } = r, { cart: i, reset: a, getTotalAndDiscount: l, updateQuantityOfProduct: h } = Pt(), n = bt();
|
|
2638
|
+
function o(p) {
|
|
2639
|
+
n(p);
|
|
2475
2640
|
}
|
|
2476
|
-
function
|
|
2477
|
-
|
|
2478
|
-
productId:
|
|
2479
|
-
productVariantId:
|
|
2480
|
-
quantity:
|
|
2641
|
+
function f(p) {
|
|
2642
|
+
h({
|
|
2643
|
+
productId: p.id,
|
|
2644
|
+
productVariantId: p.activeVariantId,
|
|
2645
|
+
quantity: p.quantity + 1
|
|
2481
2646
|
});
|
|
2482
2647
|
}
|
|
2483
|
-
function
|
|
2484
|
-
|
|
2485
|
-
productId:
|
|
2486
|
-
productVariantId:
|
|
2487
|
-
quantity:
|
|
2648
|
+
function I(p) {
|
|
2649
|
+
h({
|
|
2650
|
+
productId: p.id,
|
|
2651
|
+
productVariantId: p.activeVariantId,
|
|
2652
|
+
quantity: p.quantity - 1
|
|
2488
2653
|
});
|
|
2489
2654
|
}
|
|
2490
2655
|
return /* @__PURE__ */ t.jsxs(
|
|
2491
2656
|
"div",
|
|
2492
2657
|
{
|
|
2493
|
-
className:
|
|
2494
|
-
|
|
2658
|
+
className: V(C.modal, {
|
|
2659
|
+
[C.closing]: !s
|
|
2660
|
+
}),
|
|
2661
|
+
onClick: (p) => p.stopPropagation(),
|
|
2495
2662
|
children: [
|
|
2496
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2497
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2498
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2499
|
-
e && /* @__PURE__ */ t.jsx("div", { className:
|
|
2663
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
|
|
2664
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.info, children: [
|
|
2665
|
+
/* @__PURE__ */ t.jsx("span", { className: C.title, children: "Cart" }),
|
|
2666
|
+
e && /* @__PURE__ */ t.jsx("div", { className: C.count, children: i.parts.length })
|
|
2500
2667
|
] }),
|
|
2501
2668
|
/* @__PURE__ */ t.jsx(
|
|
2502
2669
|
"button",
|
|
2503
2670
|
{
|
|
2504
|
-
className:
|
|
2505
|
-
[
|
|
2671
|
+
className: V(C.clear, {
|
|
2672
|
+
[C.activeClear]: e
|
|
2506
2673
|
}),
|
|
2507
2674
|
disabled: !e,
|
|
2508
|
-
onClick:
|
|
2675
|
+
onClick: a,
|
|
2509
2676
|
children: "Clear all"
|
|
2510
2677
|
}
|
|
2511
2678
|
)
|
|
2512
2679
|
] }),
|
|
2513
|
-
e ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2514
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2680
|
+
e ? /* @__PURE__ */ t.jsxs("div", { className: C.cart, children: [
|
|
2681
|
+
/* @__PURE__ */ t.jsx("div", { className: C.products, children: c.map((p) => /* @__PURE__ */ t.jsxs(
|
|
2515
2682
|
"div",
|
|
2516
2683
|
{
|
|
2517
|
-
className:
|
|
2684
|
+
className: C.product,
|
|
2518
2685
|
children: [
|
|
2519
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2686
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.productInfo, children: [
|
|
2520
2687
|
/* @__PURE__ */ t.jsx(
|
|
2521
2688
|
"img",
|
|
2522
2689
|
{
|
|
2523
|
-
src: `https://imagedelivery.net/${
|
|
2690
|
+
src: `https://imagedelivery.net/${p.images[0].cfId}/w=500`,
|
|
2524
2691
|
alt: "image",
|
|
2525
2692
|
width: "100%",
|
|
2526
2693
|
height: "100%",
|
|
2527
|
-
className:
|
|
2694
|
+
className: C.image
|
|
2528
2695
|
}
|
|
2529
2696
|
),
|
|
2530
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2531
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2532
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2697
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.content, children: [
|
|
2698
|
+
/* @__PURE__ */ t.jsx("div", { className: C.name, children: p.name }),
|
|
2699
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.price, children: [
|
|
2533
2700
|
"$",
|
|
2534
|
-
|
|
2701
|
+
p.variants.find((_) => _.id === p.activeVariantId).price.amount * ((p == null ? void 0 : p.quantity) || 1)
|
|
2535
2702
|
] })
|
|
2536
2703
|
] })
|
|
2537
2704
|
] }),
|
|
2538
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2705
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.productButtons, children: [
|
|
2539
2706
|
/* @__PURE__ */ t.jsx(
|
|
2540
2707
|
"div",
|
|
2541
2708
|
{
|
|
2542
2709
|
onClick: () => {
|
|
2543
|
-
|
|
2710
|
+
p.quantity !== 1 && I(p);
|
|
2544
2711
|
},
|
|
2545
|
-
className:
|
|
2712
|
+
className: C.productButton,
|
|
2546
2713
|
children: /* @__PURE__ */ t.jsx(
|
|
2547
|
-
|
|
2714
|
+
v,
|
|
2548
2715
|
{
|
|
2549
2716
|
name: "Minus",
|
|
2550
2717
|
fill: "#757575",
|
|
@@ -2554,14 +2721,14 @@ const Ja = (u) => {
|
|
|
2554
2721
|
)
|
|
2555
2722
|
}
|
|
2556
2723
|
),
|
|
2557
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2724
|
+
/* @__PURE__ */ t.jsx("div", { className: C.productCount, children: p.quantity }),
|
|
2558
2725
|
/* @__PURE__ */ t.jsx(
|
|
2559
2726
|
"div",
|
|
2560
2727
|
{
|
|
2561
|
-
onClick: () =>
|
|
2562
|
-
className:
|
|
2728
|
+
onClick: () => f(p),
|
|
2729
|
+
className: C.productButton,
|
|
2563
2730
|
children: /* @__PURE__ */ t.jsx(
|
|
2564
|
-
|
|
2731
|
+
v,
|
|
2565
2732
|
{
|
|
2566
2733
|
name: "Plus",
|
|
2567
2734
|
fill: "#757575",
|
|
@@ -2574,14 +2741,14 @@ const Ja = (u) => {
|
|
|
2574
2741
|
] })
|
|
2575
2742
|
]
|
|
2576
2743
|
},
|
|
2577
|
-
|
|
2744
|
+
p.id
|
|
2578
2745
|
)) }),
|
|
2579
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2580
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2581
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2746
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.bottom, children: [
|
|
2747
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.subtotal, children: [
|
|
2748
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.block, children: [
|
|
2582
2749
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
2583
2750
|
/* @__PURE__ */ t.jsx(
|
|
2584
|
-
|
|
2751
|
+
v,
|
|
2585
2752
|
{
|
|
2586
2753
|
name: "Info",
|
|
2587
2754
|
width: 20,
|
|
@@ -2590,77 +2757,83 @@ const Ja = (u) => {
|
|
|
2590
2757
|
}
|
|
2591
2758
|
)
|
|
2592
2759
|
] }),
|
|
2593
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2760
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.total, children: [
|
|
2594
2761
|
"$",
|
|
2595
|
-
|
|
2762
|
+
l().total
|
|
2596
2763
|
] })
|
|
2597
2764
|
] }),
|
|
2598
|
-
/* @__PURE__ */ t.jsx(
|
|
2765
|
+
/* @__PURE__ */ t.jsx(kt, { onClick: () => o("/checkout"), children: "Checkout" })
|
|
2599
2766
|
] })
|
|
2600
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
2767
|
+
] }) : /* @__PURE__ */ t.jsx(No, {})
|
|
2601
2768
|
]
|
|
2602
2769
|
}
|
|
2603
2770
|
);
|
|
2604
|
-
},
|
|
2605
|
-
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2606
|
-
|
|
2771
|
+
}, No = () => /* @__PURE__ */ t.jsxs("div", { className: C.empty, children: [
|
|
2772
|
+
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2773
|
+
v,
|
|
2774
|
+
{
|
|
2775
|
+
name: "Handbag",
|
|
2776
|
+
fill: "var(--icon-secondary)"
|
|
2777
|
+
}
|
|
2778
|
+
) }),
|
|
2779
|
+
/* @__PURE__ */ t.jsx("span", { children: "Empty Cart" }),
|
|
2607
2780
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2608
|
-
"
|
|
2781
|
+
"You don’t have any items in your shopping cart yet,",
|
|
2609
2782
|
" ",
|
|
2610
2783
|
/* @__PURE__ */ t.jsx(
|
|
2611
2784
|
"a",
|
|
2612
2785
|
{
|
|
2613
2786
|
href: "/products",
|
|
2614
|
-
className:
|
|
2615
|
-
children: "
|
|
2787
|
+
className: C.link,
|
|
2788
|
+
children: "view products"
|
|
2616
2789
|
}
|
|
2617
2790
|
)
|
|
2618
2791
|
] })
|
|
2619
|
-
] }),
|
|
2620
|
-
const [
|
|
2792
|
+
] }), wo = ({ token: r }) => {
|
|
2793
|
+
const [c, e] = g.useState("test-email@gmail.com"), s = bt();
|
|
2621
2794
|
g.useEffect(() => {
|
|
2622
2795
|
(async () => {
|
|
2623
|
-
const l =
|
|
2796
|
+
const l = ko(r);
|
|
2624
2797
|
e(l.email);
|
|
2625
2798
|
})();
|
|
2626
|
-
}, [
|
|
2627
|
-
function i(
|
|
2628
|
-
s(
|
|
2799
|
+
}, [r]);
|
|
2800
|
+
function i(a) {
|
|
2801
|
+
s(a);
|
|
2629
2802
|
}
|
|
2630
2803
|
return /* @__PURE__ */ t.jsx(
|
|
2631
2804
|
"div",
|
|
2632
2805
|
{
|
|
2633
|
-
className:
|
|
2806
|
+
className: C.userInfo,
|
|
2634
2807
|
onClick: () => i("/customer-dash"),
|
|
2635
|
-
children: /* @__PURE__ */ t.jsx("div", { children:
|
|
2808
|
+
children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
|
|
2636
2809
|
}
|
|
2637
2810
|
);
|
|
2638
|
-
},
|
|
2639
|
-
share:
|
|
2640
|
-
modal:
|
|
2641
|
-
header:
|
|
2642
|
-
socials:
|
|
2643
|
-
social:
|
|
2644
|
-
copy:
|
|
2645
|
-
title:
|
|
2646
|
-
copyWrapper:
|
|
2647
|
-
copyText:
|
|
2648
|
-
},
|
|
2649
|
-
const { isOpenModal:
|
|
2811
|
+
}, Co = "_share_11u0d_1", Bo = "_modal_11u0d_8", So = "_header_11u0d_14", To = "_socials_11u0d_24", Po = "_social_11u0d_24", Ao = "_copy_11u0d_34", Oo = "_title_11u0d_41", qo = "_copyWrapper_11u0d_47", Eo = "_copyText_11u0d_56", ot = {
|
|
2812
|
+
share: Co,
|
|
2813
|
+
modal: Bo,
|
|
2814
|
+
header: So,
|
|
2815
|
+
socials: To,
|
|
2816
|
+
social: Po,
|
|
2817
|
+
copy: Ao,
|
|
2818
|
+
title: Oo,
|
|
2819
|
+
copyWrapper: qo,
|
|
2820
|
+
copyText: Eo
|
|
2821
|
+
}, ua = () => {
|
|
2822
|
+
const { isOpenModal: r, setIsOpenModal: c } = Dt();
|
|
2650
2823
|
function e() {
|
|
2651
|
-
|
|
2824
|
+
c(!0);
|
|
2652
2825
|
}
|
|
2653
2826
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2654
2827
|
/* @__PURE__ */ t.jsx(
|
|
2655
|
-
|
|
2828
|
+
at,
|
|
2656
2829
|
{
|
|
2657
|
-
className:
|
|
2830
|
+
className: ot.share,
|
|
2658
2831
|
onClick: (s) => {
|
|
2659
2832
|
s.stopPropagation(), e();
|
|
2660
2833
|
},
|
|
2661
2834
|
type: "Secondary",
|
|
2662
2835
|
children: /* @__PURE__ */ t.jsx(
|
|
2663
|
-
|
|
2836
|
+
v,
|
|
2664
2837
|
{
|
|
2665
2838
|
name: "Share",
|
|
2666
2839
|
fill: "#757575",
|
|
@@ -2669,10 +2842,10 @@ const Ja = (u) => {
|
|
|
2669
2842
|
)
|
|
2670
2843
|
}
|
|
2671
2844
|
),
|
|
2672
|
-
|
|
2845
|
+
r && /* @__PURE__ */ t.jsx(Et, { close: c, children: /* @__PURE__ */ t.jsx(Do, {}) })
|
|
2673
2846
|
] });
|
|
2674
|
-
},
|
|
2675
|
-
const { setIsOpenModal:
|
|
2847
|
+
}, Do = () => {
|
|
2848
|
+
const { setIsOpenModal: r } = Dt(), { notification: c, setNotification: e } = zt(), s = window.location.href;
|
|
2676
2849
|
function i() {
|
|
2677
2850
|
navigator.clipboard.writeText(s), e({
|
|
2678
2851
|
message: "Link copied to clipboard",
|
|
@@ -2682,26 +2855,26 @@ const Ja = (u) => {
|
|
|
2682
2855
|
return /* @__PURE__ */ t.jsxs(
|
|
2683
2856
|
"div",
|
|
2684
2857
|
{
|
|
2685
|
-
className:
|
|
2686
|
-
onClick: (
|
|
2858
|
+
className: ot.modal,
|
|
2859
|
+
onClick: (a) => a.stopPropagation(),
|
|
2687
2860
|
children: [
|
|
2688
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2689
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2861
|
+
/* @__PURE__ */ t.jsxs("div", { className: ot.header, children: [
|
|
2862
|
+
/* @__PURE__ */ t.jsx("div", { className: ot.title, children: "Copy Product Link" }),
|
|
2690
2863
|
/* @__PURE__ */ t.jsx(
|
|
2691
|
-
|
|
2864
|
+
v,
|
|
2692
2865
|
{
|
|
2693
2866
|
name: "X",
|
|
2694
2867
|
fill: "#757575",
|
|
2695
|
-
onClick: () =>
|
|
2868
|
+
onClick: () => r(!1),
|
|
2696
2869
|
hoverable: !0
|
|
2697
2870
|
}
|
|
2698
2871
|
)
|
|
2699
2872
|
] }),
|
|
2700
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2873
|
+
/* @__PURE__ */ t.jsxs("div", { className: ot.copyWrapper, children: [
|
|
2701
2874
|
/* @__PURE__ */ t.jsx(
|
|
2702
2875
|
"div",
|
|
2703
2876
|
{
|
|
2704
|
-
className:
|
|
2877
|
+
className: V(ot.copy, ot.copyText),
|
|
2705
2878
|
onClick: i,
|
|
2706
2879
|
children: s
|
|
2707
2880
|
}
|
|
@@ -2710,35 +2883,35 @@ const Ja = (u) => {
|
|
|
2710
2883
|
"div",
|
|
2711
2884
|
{
|
|
2712
2885
|
onClick: i,
|
|
2713
|
-
className:
|
|
2714
|
-
children:
|
|
2886
|
+
className: ot.copy,
|
|
2887
|
+
children: c ? /* @__PURE__ */ t.jsx(v, { name: "Check" }) : /* @__PURE__ */ t.jsx(v, { name: "Copy" })
|
|
2715
2888
|
}
|
|
2716
2889
|
)
|
|
2717
2890
|
] })
|
|
2718
2891
|
]
|
|
2719
2892
|
}
|
|
2720
2893
|
);
|
|
2721
|
-
},
|
|
2722
|
-
accordion:
|
|
2723
|
-
header:
|
|
2724
|
-
icon:
|
|
2725
|
-
open:
|
|
2726
|
-
content:
|
|
2727
|
-
},
|
|
2728
|
-
const [e, s] = g.useState(!1), [i,
|
|
2894
|
+
}, Lo = "_accordion_1s1lq_1", Ro = "_header_1s1lq_9", Mo = "_icon_1s1lq_18", Ho = "_open_1s1lq_21", zo = "_content_1s1lq_25", _t = {
|
|
2895
|
+
accordion: Lo,
|
|
2896
|
+
header: Ro,
|
|
2897
|
+
icon: Mo,
|
|
2898
|
+
open: Ho,
|
|
2899
|
+
content: zo
|
|
2900
|
+
}, ma = ({ title: r, content: c }) => {
|
|
2901
|
+
const [e, s] = g.useState(!1), [i, a] = g.useState(0), l = g.useRef(null), h = () => {
|
|
2729
2902
|
s(!e);
|
|
2730
2903
|
};
|
|
2731
2904
|
return g.useEffect(() => {
|
|
2732
|
-
l.current &&
|
|
2733
|
-
}, [e]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
2905
|
+
l.current && a(e ? l.current.scrollHeight : 0);
|
|
2906
|
+
}, [e]), /* @__PURE__ */ t.jsxs("div", { className: _t.accordion, children: [
|
|
2734
2907
|
/* @__PURE__ */ t.jsxs(
|
|
2735
2908
|
"div",
|
|
2736
2909
|
{
|
|
2737
|
-
className:
|
|
2738
|
-
onClick:
|
|
2910
|
+
className: _t.header,
|
|
2911
|
+
onClick: h,
|
|
2739
2912
|
children: [
|
|
2740
|
-
/* @__PURE__ */ t.jsx("h5", { id: "h5", children:
|
|
2741
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2913
|
+
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
|
|
2914
|
+
/* @__PURE__ */ t.jsx("div", { className: V(_t.icon, { [_t.open]: e }), children: /* @__PURE__ */ t.jsx(v, { name: "CaretDown" }) })
|
|
2742
2915
|
]
|
|
2743
2916
|
}
|
|
2744
2917
|
),
|
|
@@ -2746,65 +2919,65 @@ const Ja = (u) => {
|
|
|
2746
2919
|
"div",
|
|
2747
2920
|
{
|
|
2748
2921
|
ref: l,
|
|
2749
|
-
className:
|
|
2922
|
+
className: _t.content,
|
|
2750
2923
|
style: { height: `${i}px` },
|
|
2751
|
-
children: /* @__PURE__ */ t.jsx("p", { id: "p", children:
|
|
2924
|
+
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: c })
|
|
2752
2925
|
}
|
|
2753
2926
|
)
|
|
2754
2927
|
] });
|
|
2755
|
-
},
|
|
2756
|
-
wrapper:
|
|
2757
|
-
label:
|
|
2758
|
-
input:
|
|
2759
|
-
required:
|
|
2760
|
-
paddingless:
|
|
2761
|
-
content:
|
|
2762
|
-
borderless:
|
|
2763
|
-
rightIcon:
|
|
2764
|
-
},
|
|
2928
|
+
}, Fo = "_wrapper_1r14x_1", Vo = "_label_1r14x_9", Uo = "_input_1r14x_18", Yo = "_required_1r14x_35", Go = "_paddingless_1r14x_39", Wo = "_content_1r14x_43", Xo = "_borderless_1r14x_58", Jo = "_rightIcon_1r14x_63", it = {
|
|
2929
|
+
wrapper: Fo,
|
|
2930
|
+
label: Vo,
|
|
2931
|
+
input: Uo,
|
|
2932
|
+
required: Yo,
|
|
2933
|
+
paddingless: Go,
|
|
2934
|
+
content: Wo,
|
|
2935
|
+
borderless: Xo,
|
|
2936
|
+
rightIcon: Jo
|
|
2937
|
+
}, ha = (r) => {
|
|
2765
2938
|
const {
|
|
2766
|
-
onChange:
|
|
2939
|
+
onChange: c,
|
|
2767
2940
|
style: e,
|
|
2768
2941
|
label: s,
|
|
2769
2942
|
value: i,
|
|
2770
|
-
type:
|
|
2943
|
+
type: a,
|
|
2771
2944
|
min: l,
|
|
2772
|
-
max:
|
|
2945
|
+
max: h,
|
|
2773
2946
|
placeholder: n,
|
|
2774
|
-
disabled:
|
|
2775
|
-
required:
|
|
2776
|
-
regex:
|
|
2777
|
-
paddingless:
|
|
2778
|
-
borderless:
|
|
2779
|
-
editable:
|
|
2780
|
-
isSearch:
|
|
2781
|
-
} =
|
|
2782
|
-
function
|
|
2783
|
-
if (
|
|
2784
|
-
let
|
|
2785
|
-
return
|
|
2947
|
+
disabled: o = !1,
|
|
2948
|
+
required: f = !1,
|
|
2949
|
+
regex: I,
|
|
2950
|
+
paddingless: p = !1,
|
|
2951
|
+
borderless: _ = !1,
|
|
2952
|
+
editable: x = !1,
|
|
2953
|
+
isSearch: d = !1
|
|
2954
|
+
} = r, { themeSettings: w } = qt(), { inputs: E } = w, [y, L] = g.useState(!1);
|
|
2955
|
+
function B(u, D) {
|
|
2956
|
+
if (u.startsWith("#")) {
|
|
2957
|
+
let T, $, U;
|
|
2958
|
+
return u.length === 7 ? (T = parseInt(u.slice(1, 3), 16), $ = parseInt(u.slice(3, 5), 16), U = parseInt(u.slice(5, 7), 16)) : u.length === 4 && (T = parseInt(u[1] + u[1], 16), $ = parseInt(u[2] + u[2], 16), U = parseInt(u[3] + u[3], 16)), `rgba(${T}, ${$}, ${U}, ${D})`;
|
|
2786
2959
|
}
|
|
2787
|
-
const
|
|
2960
|
+
const b = {
|
|
2788
2961
|
black: "#000000",
|
|
2789
2962
|
white: "#ffffff",
|
|
2790
2963
|
red: "#ff0000",
|
|
2791
2964
|
green: "#00ff00",
|
|
2792
2965
|
blue: "#0000ff"
|
|
2793
2966
|
// Можно добавить больше цветов
|
|
2794
|
-
}[
|
|
2795
|
-
return
|
|
2967
|
+
}[u.toLowerCase()];
|
|
2968
|
+
return b ? B(b, D) : u;
|
|
2796
2969
|
}
|
|
2797
|
-
function
|
|
2798
|
-
return Number(
|
|
2970
|
+
function S(u) {
|
|
2971
|
+
return Number(u) < 0 ? String(l) : u;
|
|
2799
2972
|
}
|
|
2800
|
-
function M(
|
|
2801
|
-
return !
|
|
2973
|
+
function M(u) {
|
|
2974
|
+
return !f || !I ? !0 : new RegExp(I).test(u);
|
|
2802
2975
|
}
|
|
2803
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2976
|
+
return /* @__PURE__ */ t.jsxs("div", { className: it.wrapper, children: [
|
|
2804
2977
|
s && /* @__PURE__ */ t.jsx(
|
|
2805
2978
|
"label",
|
|
2806
2979
|
{
|
|
2807
|
-
className:
|
|
2980
|
+
className: it.label,
|
|
2808
2981
|
htmlFor: s,
|
|
2809
2982
|
children: s
|
|
2810
2983
|
}
|
|
@@ -2812,50 +2985,50 @@ const Ja = (u) => {
|
|
|
2812
2985
|
/* @__PURE__ */ t.jsxs(
|
|
2813
2986
|
"div",
|
|
2814
2987
|
{
|
|
2815
|
-
className:
|
|
2988
|
+
className: it.content,
|
|
2816
2989
|
style: {
|
|
2817
|
-
paddingRight:
|
|
2990
|
+
paddingRight: E.general.height + 15,
|
|
2818
2991
|
...e,
|
|
2819
|
-
backgroundColor:
|
|
2992
|
+
backgroundColor: B(E.field.color, E.field.opacity / 100)
|
|
2820
2993
|
},
|
|
2821
2994
|
children: [
|
|
2822
2995
|
/* @__PURE__ */ t.jsx(
|
|
2823
2996
|
"input",
|
|
2824
2997
|
{
|
|
2825
2998
|
id: s,
|
|
2826
|
-
type:
|
|
2827
|
-
onChange: (
|
|
2828
|
-
if (
|
|
2999
|
+
type: a || "text",
|
|
3000
|
+
onChange: (u) => {
|
|
3001
|
+
if (a === "text") c(u.target.value);
|
|
2829
3002
|
else {
|
|
2830
|
-
const
|
|
2831
|
-
|
|
3003
|
+
const D = S(u.target.value);
|
|
3004
|
+
c(D);
|
|
2832
3005
|
}
|
|
2833
3006
|
},
|
|
2834
3007
|
value: i,
|
|
2835
3008
|
autoComplete: "off",
|
|
2836
3009
|
placeholder: n || "Type something...",
|
|
2837
|
-
className:
|
|
2838
|
-
[
|
|
2839
|
-
[
|
|
2840
|
-
[
|
|
3010
|
+
className: V(it.input, {
|
|
3011
|
+
[it.required]: y && f && !M(i),
|
|
3012
|
+
[it.paddingless]: p,
|
|
3013
|
+
[it.borderless]: _
|
|
2841
3014
|
}),
|
|
2842
|
-
min:
|
|
2843
|
-
max:
|
|
2844
|
-
disabled:
|
|
2845
|
-
onFocus: () =>
|
|
3015
|
+
min: a === "number" ? l : void 0,
|
|
3016
|
+
max: a === "number" ? h : void 0,
|
|
3017
|
+
disabled: o,
|
|
3018
|
+
onFocus: () => L(!0)
|
|
2846
3019
|
}
|
|
2847
3020
|
),
|
|
2848
|
-
|
|
2849
|
-
|
|
3021
|
+
d && /* @__PURE__ */ t.jsx("div", { className: it.rightIcon, children: /* @__PURE__ */ t.jsx(
|
|
3022
|
+
v,
|
|
2850
3023
|
{
|
|
2851
3024
|
name: "MagnifyingGlass",
|
|
2852
3025
|
fill: "var(--icon-secondary)",
|
|
2853
|
-
width:
|
|
2854
|
-
height:
|
|
3026
|
+
width: E.general.height,
|
|
3027
|
+
height: E.general.height
|
|
2855
3028
|
}
|
|
2856
3029
|
) }),
|
|
2857
|
-
|
|
2858
|
-
|
|
3030
|
+
x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
3031
|
+
v,
|
|
2859
3032
|
{
|
|
2860
3033
|
name: "Sliders",
|
|
2861
3034
|
width: 20,
|
|
@@ -2867,18 +3040,18 @@ const Ja = (u) => {
|
|
|
2867
3040
|
}
|
|
2868
3041
|
)
|
|
2869
3042
|
] });
|
|
2870
|
-
},
|
|
2871
|
-
wrapper:
|
|
2872
|
-
label:
|
|
2873
|
-
textarea:
|
|
2874
|
-
length:
|
|
2875
|
-
},
|
|
2876
|
-
const { onChange:
|
|
2877
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
3043
|
+
}, Qo = "_wrapper_st58d_1", Ko = "_label_st58d_10", Zo = "_textarea_st58d_18", ta = "_length_st58d_33", xt = {
|
|
3044
|
+
wrapper: Qo,
|
|
3045
|
+
label: Ko,
|
|
3046
|
+
textarea: Zo,
|
|
3047
|
+
length: ta
|
|
3048
|
+
}, _a = (r) => {
|
|
3049
|
+
const { onChange: c, label: e, value: s, maxLength: i, placeholder: a = "Type something..." } = r, [l, h] = g.useState(s.length);
|
|
3050
|
+
return /* @__PURE__ */ t.jsxs("div", { className: xt.wrapper, children: [
|
|
2878
3051
|
e && /* @__PURE__ */ t.jsx(
|
|
2879
3052
|
"label",
|
|
2880
3053
|
{
|
|
2881
|
-
className:
|
|
3054
|
+
className: xt.label,
|
|
2882
3055
|
htmlFor: e,
|
|
2883
3056
|
children: e
|
|
2884
3057
|
}
|
|
@@ -2889,14 +3062,14 @@ const Ja = (u) => {
|
|
|
2889
3062
|
id: e,
|
|
2890
3063
|
defaultValue: s,
|
|
2891
3064
|
onChange: (n) => {
|
|
2892
|
-
|
|
3065
|
+
h(n.target.value.length), c(n.target.value);
|
|
2893
3066
|
},
|
|
2894
|
-
placeholder:
|
|
2895
|
-
className:
|
|
3067
|
+
placeholder: a,
|
|
3068
|
+
className: xt.textarea,
|
|
2896
3069
|
maxLength: i
|
|
2897
3070
|
}
|
|
2898
3071
|
),
|
|
2899
|
-
i && /* @__PURE__ */ t.jsxs("div", { className:
|
|
3072
|
+
i && /* @__PURE__ */ t.jsxs("div", { className: xt.length, children: [
|
|
2900
3073
|
l,
|
|
2901
3074
|
"/",
|
|
2902
3075
|
i
|
|
@@ -2904,34 +3077,34 @@ const Ja = (u) => {
|
|
|
2904
3077
|
] });
|
|
2905
3078
|
};
|
|
2906
3079
|
export {
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
3080
|
+
ma as Accordion,
|
|
3081
|
+
kt as Button,
|
|
3082
|
+
wn as ButtonTypeSettings,
|
|
3083
|
+
ca as ButtonsSettings,
|
|
3084
|
+
oa as CategorySettings,
|
|
3085
|
+
gt as ChooseImage,
|
|
3086
|
+
fa as ChooseImageModal,
|
|
3087
|
+
No as EmptyCart,
|
|
3088
|
+
aa as FormSettings,
|
|
3089
|
+
da as HeaderButtons,
|
|
3090
|
+
v as Icon,
|
|
3091
|
+
X as InputSettings,
|
|
3092
|
+
ha as InputUI,
|
|
3093
|
+
He as ItemsSettings,
|
|
3094
|
+
ia as LayoutSettings,
|
|
3095
|
+
la as ListingSelector,
|
|
3096
|
+
xa as Loader,
|
|
3097
|
+
Et as Modal,
|
|
3098
|
+
ra as ProductOptions,
|
|
3099
|
+
At as RangeSelector,
|
|
3100
|
+
et as Select,
|
|
3101
|
+
ua as ShareLink,
|
|
3102
|
+
$o as ShoppingButton,
|
|
3103
|
+
Io as ShoppingModalCart,
|
|
3104
|
+
tt as Switch,
|
|
3105
|
+
Rt as TextSettings,
|
|
3106
|
+
Ot as TextareaSettings,
|
|
3107
|
+
_a as TextareaUI,
|
|
3108
|
+
Lt as TypesText,
|
|
3109
|
+
wo as UserInfo
|
|
2937
3110
|
};
|