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