@billgangcom/theme-lib 1.20.0 → 1.20.1
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.cjs.js +3 -3
- package/dist/builder.es.js +440 -427
- package/dist/{root-Btcirg55.cjs → root-CRu5tUzl.cjs} +35 -35
- package/dist/{root-kSEgyxKJ.js → root-XM9PIbN1.js} +5041 -4990
- package/dist/shared/lib/api.d.ts +10 -2
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +310 -310
- package/package.json +4 -3
- package/dist/vite.svg +0 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { j as t, c as H, I as x, a as G, S as
|
|
2
|
-
import { k as Gn, l as Yn, h as Xn, E as Qn, L as Wn, P as Jn, R as Kn, g as Zn, i as tc } from "./root-
|
|
3
|
-
import
|
|
4
|
-
const gt = "
|
|
1
|
+
import { j as t, c as H, I as x, a as G, S as F, T as lt, C as ot, b as Y, D as rt, H as dt, B as X, v as tt, u as ut, d as _t, e as it, f as at, M as pt } from "./root-XM9PIbN1.js";
|
|
2
|
+
import { k as Gn, l as Yn, h as Xn, E as Qn, L as Wn, P as Jn, R as Kn, g as Zn, i as tc } from "./root-XM9PIbN1.js";
|
|
3
|
+
import f from "react";
|
|
4
|
+
const gt = "_accordion_9e4oa_1", xt = "_header_9e4oa_9", ft = "_icon_9e4oa_18", jt = "_open_9e4oa_21", bt = "_content_9e4oa_25", J = {
|
|
5
5
|
accordion: gt,
|
|
6
6
|
header: xt,
|
|
7
|
-
icon:
|
|
7
|
+
icon: ft,
|
|
8
8
|
open: jt,
|
|
9
|
-
content:
|
|
9
|
+
content: bt
|
|
10
10
|
}, Mn = ({ title: r, content: n }) => {
|
|
11
|
-
const [s, c] =
|
|
11
|
+
const [s, c] = f.useState(!1), [a, l] = f.useState(0), e = f.useRef(null), i = () => {
|
|
12
12
|
c(!s);
|
|
13
13
|
};
|
|
14
|
-
return
|
|
14
|
+
return f.useEffect(() => {
|
|
15
15
|
e.current && l(s ? e.current.scrollHeight : 0);
|
|
16
16
|
}, [s]), /* @__PURE__ */ t.jsxs("div", { className: J.accordion, children: [
|
|
17
17
|
/* @__PURE__ */ t.jsxs(
|
|
@@ -35,19 +35,19 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
35
35
|
}
|
|
36
36
|
)
|
|
37
37
|
] });
|
|
38
|
-
}, vt = "
|
|
38
|
+
}, vt = "_wrapper_9rr5j_2", kt = "_alignmentBlock_9rr5j_8", yt = "_title_9rr5j_15", $t = "_subtitle_9rr5j_22", Nt = "_alignmentContent_9rr5j_29", Ct = "_alignments_9rr5j_37", It = "_alignment_9rr5j_8", qt = "_circle_9rr5j_58", Pt = "_paddings_9rr5j_65", Bt = "_padding_9rr5j_65", wt = "_input_9rr5j_84", L = {
|
|
39
39
|
wrapper: vt,
|
|
40
|
-
alignmentBlock:
|
|
41
|
-
title:
|
|
40
|
+
alignmentBlock: kt,
|
|
41
|
+
title: yt,
|
|
42
42
|
subtitle: $t,
|
|
43
43
|
alignmentContent: Nt,
|
|
44
44
|
alignments: Ct,
|
|
45
|
-
alignment:
|
|
46
|
-
circle:
|
|
45
|
+
alignment: It,
|
|
46
|
+
circle: qt,
|
|
47
47
|
paddings: Pt,
|
|
48
48
|
padding: Bt,
|
|
49
|
-
input:
|
|
50
|
-
},
|
|
49
|
+
input: wt
|
|
50
|
+
}, Tt = [
|
|
51
51
|
"topLeft",
|
|
52
52
|
"top",
|
|
53
53
|
"topRight",
|
|
@@ -57,7 +57,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
57
57
|
"bottomLeft",
|
|
58
58
|
"bottom",
|
|
59
59
|
"bottomRight"
|
|
60
|
-
],
|
|
60
|
+
], At = ["left", "top", "right", "bottom"], Hn = (r) => {
|
|
61
61
|
const { alignment: n, padding: s, setPadding: c, setAlignment: a } = r;
|
|
62
62
|
function l() {
|
|
63
63
|
switch (n) {
|
|
@@ -94,7 +94,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
94
94
|
/* @__PURE__ */ t.jsxs("div", { className: L.alignmentBlock, children: [
|
|
95
95
|
/* @__PURE__ */ t.jsx("h5", { className: L.subtitle, children: "Alignment" }),
|
|
96
96
|
/* @__PURE__ */ t.jsxs("div", { className: L.alignmentContent, children: [
|
|
97
|
-
/* @__PURE__ */ t.jsx("div", { className: L.alignments, children:
|
|
97
|
+
/* @__PURE__ */ t.jsx("div", { className: L.alignments, children: Tt.map((i) => /* @__PURE__ */ t.jsxs(
|
|
98
98
|
"div",
|
|
99
99
|
{
|
|
100
100
|
onClick: () => {
|
|
@@ -116,7 +116,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
116
116
|
},
|
|
117
117
|
i
|
|
118
118
|
)) }),
|
|
119
|
-
/* @__PURE__ */ t.jsx("div", { className: L.paddings, children:
|
|
119
|
+
/* @__PURE__ */ t.jsx("div", { className: L.paddings, children: At.map((i) => /* @__PURE__ */ t.jsxs(
|
|
120
120
|
"label",
|
|
121
121
|
{
|
|
122
122
|
className: L.padding,
|
|
@@ -149,17 +149,17 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
149
149
|
] })
|
|
150
150
|
] })
|
|
151
151
|
] });
|
|
152
|
-
},
|
|
153
|
-
subtitle:
|
|
154
|
-
header:
|
|
155
|
-
text:
|
|
152
|
+
}, St = "_subtitle_1qrz9_1", Ot = "_header_1qrz9_8", Dt = "_text_1qrz9_9", Lt = "_top_1qrz9_17", Mt = "_itemsBlock_1qrz9_26", K = {
|
|
153
|
+
subtitle: St,
|
|
154
|
+
header: Ot,
|
|
155
|
+
text: Dt,
|
|
156
156
|
top: Lt,
|
|
157
157
|
itemsBlock: Mt
|
|
158
|
-
}, Ht = "
|
|
158
|
+
}, Ht = "_typeTexts_rcw8p_1", Rt = "_block_rcw8p_8", Et = "_active_rcw8p_21", nt = {
|
|
159
159
|
typeTexts: Ht,
|
|
160
160
|
block: Rt,
|
|
161
161
|
active: Et
|
|
162
|
-
}, Vt = ["bold", "italic", "underline", "strike-through", "code"],
|
|
162
|
+
}, Vt = ["bold", "italic", "underline", "strike-through", "code"], mt = (r) => {
|
|
163
163
|
const { typesText: n, setTypesText: s } = r;
|
|
164
164
|
function c(a) {
|
|
165
165
|
switch (a) {
|
|
@@ -201,7 +201,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
201
201
|
},
|
|
202
202
|
String(a)
|
|
203
203
|
)) });
|
|
204
|
-
},
|
|
204
|
+
}, Ft = (r) => {
|
|
205
205
|
const {
|
|
206
206
|
typesText: n,
|
|
207
207
|
isActiveText: s,
|
|
@@ -216,10 +216,10 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
216
216
|
(i || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: K.top, children: [
|
|
217
217
|
i && /* @__PURE__ */ t.jsx("h3", { className: K.title, children: i }),
|
|
218
218
|
s !== void 0 && c && /* @__PURE__ */ t.jsx(
|
|
219
|
-
|
|
219
|
+
F,
|
|
220
220
|
{
|
|
221
221
|
current: s,
|
|
222
|
-
onChange: (
|
|
222
|
+
onChange: (y) => c(y)
|
|
223
223
|
}
|
|
224
224
|
)
|
|
225
225
|
] }),
|
|
@@ -228,13 +228,13 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
228
228
|
/* @__PURE__ */ t.jsx(
|
|
229
229
|
lt,
|
|
230
230
|
{
|
|
231
|
-
onChange: (
|
|
231
|
+
onChange: (y) => l(y),
|
|
232
232
|
value: a,
|
|
233
233
|
maxLength: 150
|
|
234
234
|
}
|
|
235
235
|
),
|
|
236
236
|
/* @__PURE__ */ t.jsx(
|
|
237
|
-
|
|
237
|
+
mt,
|
|
238
238
|
{
|
|
239
239
|
typesText: n,
|
|
240
240
|
setTypesText: e
|
|
@@ -242,9 +242,9 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
242
242
|
)
|
|
243
243
|
] })
|
|
244
244
|
] });
|
|
245
|
-
},
|
|
246
|
-
subtitle:
|
|
247
|
-
header:
|
|
245
|
+
}, Ut = "_subtitle_cuny2_1", zt = "_header_cuny2_8", Gt = "_text_cuny2_9", Yt = "_productsBlock_cuny2_10", Xt = "_top_cuny2_22", Qt = "_itemsBlock_cuny2_31", Wt = "_typeTexts_cuny2_37", Jt = "_block_cuny2_44", Kt = "_active_cuny2_57", Zt = "_products_cuny2_10", te = "_product_cuny2_10", ee = "_button_cuny2_76", se = "_disabled_cuny2_87", ne = "_image_cuny2_91", ce = "_info_cuny2_98", oe = "_name_cuny2_110", ie = "_buttons_cuny2_114", ae = "_modal_cuny2_121", le = "_link_cuny2_141", re = "_modalOptions_cuny2_147", q = {
|
|
246
|
+
subtitle: Ut,
|
|
247
|
+
header: zt,
|
|
248
248
|
text: Gt,
|
|
249
249
|
productsBlock: Yt,
|
|
250
250
|
top: Xt,
|
|
@@ -268,7 +268,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
268
268
|
return /* @__PURE__ */ t.jsxs(
|
|
269
269
|
"div",
|
|
270
270
|
{
|
|
271
|
-
className:
|
|
271
|
+
className: q.modal,
|
|
272
272
|
onClick: (e) => {
|
|
273
273
|
e.stopPropagation();
|
|
274
274
|
},
|
|
@@ -277,7 +277,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
277
277
|
left: `${c.left}px`
|
|
278
278
|
},
|
|
279
279
|
children: [
|
|
280
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
280
|
+
/* @__PURE__ */ t.jsxs("div", { className: q.top, children: [
|
|
281
281
|
/* @__PURE__ */ t.jsx("h3", { children: n.name }),
|
|
282
282
|
/* @__PURE__ */ t.jsx(
|
|
283
283
|
x,
|
|
@@ -292,7 +292,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
292
292
|
}
|
|
293
293
|
)
|
|
294
294
|
] }),
|
|
295
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
295
|
+
/* @__PURE__ */ t.jsx("div", { className: q.modalOptions, children: a.map((e) => {
|
|
296
296
|
if (e.type === "image")
|
|
297
297
|
return /* @__PURE__ */ t.jsx(
|
|
298
298
|
ot,
|
|
@@ -310,7 +310,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
310
310
|
);
|
|
311
311
|
if (e.type === "text")
|
|
312
312
|
return /* @__PURE__ */ t.jsx(
|
|
313
|
-
|
|
313
|
+
Ft,
|
|
314
314
|
{
|
|
315
315
|
typesText: n[e.field.type],
|
|
316
316
|
setTypesText: (i) => {
|
|
@@ -348,7 +348,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
348
348
|
}
|
|
349
349
|
);
|
|
350
350
|
if (e.type === "inputSwitch")
|
|
351
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
351
|
+
return /* @__PURE__ */ t.jsxs("div", { className: q.link, children: [
|
|
352
352
|
/* @__PURE__ */ t.jsx(
|
|
353
353
|
G,
|
|
354
354
|
{
|
|
@@ -365,7 +365,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
365
365
|
}
|
|
366
366
|
),
|
|
367
367
|
/* @__PURE__ */ t.jsx(
|
|
368
|
-
|
|
368
|
+
F,
|
|
369
369
|
{
|
|
370
370
|
current: !!n[e.field.switch] || !1,
|
|
371
371
|
label: e.switchLabel,
|
|
@@ -381,7 +381,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
381
381
|
] });
|
|
382
382
|
if (e.type === "list")
|
|
383
383
|
return /* @__PURE__ */ t.jsx(
|
|
384
|
-
|
|
384
|
+
pe,
|
|
385
385
|
{
|
|
386
386
|
items: n[e.field] || [],
|
|
387
387
|
setItems: (i) => {
|
|
@@ -420,16 +420,16 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
420
420
|
]
|
|
421
421
|
}
|
|
422
422
|
);
|
|
423
|
-
}, ue = "
|
|
423
|
+
}, ue = "_other_g74jx_1", _e = "_subtitle_g74jx_7", me = "_items_g74jx_14", ct = {
|
|
424
424
|
other: ue,
|
|
425
425
|
subtitle: _e,
|
|
426
|
-
items:
|
|
426
|
+
items: me
|
|
427
427
|
}, ht = (r) => {
|
|
428
428
|
const { items: n, title: s = "Other" } = r;
|
|
429
429
|
return /* @__PURE__ */ t.jsxs("div", { className: ct.other, children: [
|
|
430
430
|
/* @__PURE__ */ t.jsx("h5", { className: ct.subtitle, children: s }),
|
|
431
431
|
/* @__PURE__ */ t.jsx("div", { className: ct.items, children: n.map((c, a) => /* @__PURE__ */ t.jsx(
|
|
432
|
-
|
|
432
|
+
F,
|
|
433
433
|
{
|
|
434
434
|
current: c.isItem,
|
|
435
435
|
onChange: (l) => c.setIsItem(l),
|
|
@@ -457,11 +457,11 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
457
457
|
"div",
|
|
458
458
|
{
|
|
459
459
|
ref: (i) => e(a(i)),
|
|
460
|
-
className: `${
|
|
460
|
+
className: `${q.product} ${l ? q.dragging : ""}`,
|
|
461
461
|
children: c
|
|
462
462
|
}
|
|
463
463
|
);
|
|
464
|
-
},
|
|
464
|
+
}, pe = (r) => {
|
|
465
465
|
const {
|
|
466
466
|
isActiveItems: n,
|
|
467
467
|
setIsActiveItems: s,
|
|
@@ -471,33 +471,33 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
471
471
|
title: e,
|
|
472
472
|
subtitle: i,
|
|
473
473
|
editable: u = !0,
|
|
474
|
-
draggable:
|
|
474
|
+
draggable: y = !1,
|
|
475
475
|
withImage: h = !1,
|
|
476
|
-
deletable:
|
|
476
|
+
deletable: k = !0,
|
|
477
477
|
addable: j = !0,
|
|
478
478
|
itemsType: o,
|
|
479
479
|
itemsPlaceholder: _ = "",
|
|
480
|
-
itemsOptions:
|
|
480
|
+
itemsOptions: p,
|
|
481
481
|
hasRangeSelector: P = !1,
|
|
482
|
-
rangeSelectorOptions:
|
|
482
|
+
rangeSelectorOptions: T,
|
|
483
483
|
modalOptions: N,
|
|
484
484
|
addableOptions: Q = {},
|
|
485
|
-
limit:
|
|
486
|
-
} = r, [R, E] =
|
|
485
|
+
limit: O
|
|
486
|
+
} = r, [R, E] = f.useState(null), [st, et] = f.useState({
|
|
487
487
|
top: 0,
|
|
488
488
|
left: 0
|
|
489
|
-
}), [
|
|
490
|
-
const
|
|
491
|
-
|
|
489
|
+
}), [m, v] = f.useState(!1), A = (d, B) => {
|
|
490
|
+
const S = [...c], [$] = S.splice(d, 1);
|
|
491
|
+
S.splice(B, 0, $), a(S);
|
|
492
492
|
};
|
|
493
|
-
|
|
493
|
+
f.useEffect(() => {
|
|
494
494
|
const d = () => {
|
|
495
495
|
E(null), v(!1);
|
|
496
496
|
};
|
|
497
497
|
return document.body.addEventListener("click", d), E(null), v(!1), () => {
|
|
498
498
|
E(null), v(!1), document.body.removeEventListener("click", d);
|
|
499
499
|
};
|
|
500
|
-
}, []),
|
|
500
|
+
}, []), f.useEffect(() => {
|
|
501
501
|
if (R) {
|
|
502
502
|
const d = [...c].map((B) => B.id === R.id ? R : B);
|
|
503
503
|
a(d);
|
|
@@ -505,14 +505,14 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
505
505
|
}, [R]);
|
|
506
506
|
const C = (d, B) => {
|
|
507
507
|
d.stopPropagation(), v(!0);
|
|
508
|
-
const
|
|
509
|
-
let M =
|
|
508
|
+
const S = d.target.getBoundingClientRect(), $ = 500, W = window.innerHeight;
|
|
509
|
+
let M = S.top + window.scrollY;
|
|
510
510
|
M + $ > W && (M = W - $ - 20), et({
|
|
511
511
|
top: M - 80,
|
|
512
|
-
left:
|
|
512
|
+
left: S.left - 30
|
|
513
513
|
}), E(B);
|
|
514
514
|
};
|
|
515
|
-
function
|
|
515
|
+
function U(d) {
|
|
516
516
|
if (h)
|
|
517
517
|
return d ? /* @__PURE__ */ t.jsx(
|
|
518
518
|
"img",
|
|
@@ -532,9 +532,9 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
532
532
|
}
|
|
533
533
|
);
|
|
534
534
|
}
|
|
535
|
-
const
|
|
536
|
-
const
|
|
537
|
-
|
|
535
|
+
const D = (d, B) => {
|
|
536
|
+
const S = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
537
|
+
y && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
538
538
|
x,
|
|
539
539
|
{
|
|
540
540
|
name: "DotsSixVertical",
|
|
@@ -557,8 +557,8 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
557
557
|
}), a([...M]);
|
|
558
558
|
},
|
|
559
559
|
value: d.name,
|
|
560
|
-
options:
|
|
561
|
-
leftAddon:
|
|
560
|
+
options: p,
|
|
561
|
+
leftAddon: U(d.images)
|
|
562
562
|
}
|
|
563
563
|
),
|
|
564
564
|
o === "input" && /* @__PURE__ */ t.jsx(
|
|
@@ -587,7 +587,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
589
|
),
|
|
590
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
590
|
+
/* @__PURE__ */ t.jsxs("div", { className: q.buttons, children: [
|
|
591
591
|
u && /* @__PURE__ */ t.jsx(
|
|
592
592
|
x,
|
|
593
593
|
{
|
|
@@ -598,7 +598,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
598
598
|
onClick: ($) => C($, d)
|
|
599
599
|
}
|
|
600
600
|
),
|
|
601
|
-
|
|
601
|
+
k && /* @__PURE__ */ t.jsx(
|
|
602
602
|
x,
|
|
603
603
|
{
|
|
604
604
|
name: "Trash",
|
|
@@ -611,36 +611,36 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
611
611
|
)
|
|
612
612
|
] })
|
|
613
613
|
] });
|
|
614
|
-
return
|
|
614
|
+
return y ? /* @__PURE__ */ t.jsx(
|
|
615
615
|
he,
|
|
616
616
|
{
|
|
617
617
|
product: d,
|
|
618
618
|
index: B,
|
|
619
|
-
moveProduct:
|
|
620
|
-
children:
|
|
619
|
+
moveProduct: A,
|
|
620
|
+
children: S
|
|
621
621
|
},
|
|
622
622
|
d.id
|
|
623
623
|
) : /* @__PURE__ */ t.jsx(
|
|
624
624
|
"div",
|
|
625
625
|
{
|
|
626
|
-
className:
|
|
627
|
-
children:
|
|
626
|
+
className: q.product,
|
|
627
|
+
children: S
|
|
628
628
|
},
|
|
629
629
|
d.id
|
|
630
630
|
);
|
|
631
631
|
};
|
|
632
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
633
|
-
(e || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
634
|
-
e && /* @__PURE__ */ t.jsx("h3", { className:
|
|
632
|
+
return /* @__PURE__ */ t.jsxs("div", { className: q.productsBlock, children: [
|
|
633
|
+
(e || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: q.top, children: [
|
|
634
|
+
e && /* @__PURE__ */ t.jsx("h3", { className: q.title, children: e }),
|
|
635
635
|
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
636
|
-
|
|
636
|
+
F,
|
|
637
637
|
{
|
|
638
638
|
current: n,
|
|
639
639
|
onChange: (d) => s == null ? void 0 : s(d)
|
|
640
640
|
}
|
|
641
641
|
)
|
|
642
642
|
] }),
|
|
643
|
-
R && u && N &&
|
|
643
|
+
R && u && N && m && /* @__PURE__ */ t.jsx(
|
|
644
644
|
de,
|
|
645
645
|
{
|
|
646
646
|
activeItem: R,
|
|
@@ -650,22 +650,22 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
650
650
|
setIsOpenModal: v
|
|
651
651
|
}
|
|
652
652
|
),
|
|
653
|
-
P &&
|
|
654
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
655
|
-
i && /* @__PURE__ */ t.jsx("h5", { className:
|
|
656
|
-
|
|
653
|
+
P && T && /* @__PURE__ */ t.jsx(fs, { ...T }),
|
|
654
|
+
/* @__PURE__ */ t.jsxs("div", { className: q.products, children: [
|
|
655
|
+
i && /* @__PURE__ */ t.jsx("h5", { className: q.subtitle, children: i }),
|
|
656
|
+
y ? /* @__PURE__ */ t.jsx(rt, { backend: dt, children: c.map((d, B) => D(d, B)) }) : c.map((d, B) => D(d, B)),
|
|
657
657
|
j && /* @__PURE__ */ t.jsxs(
|
|
658
658
|
X,
|
|
659
659
|
{
|
|
660
|
-
className: H(
|
|
661
|
-
[
|
|
660
|
+
className: H(q.button, {
|
|
661
|
+
[q.disabled]: !!(O && O <= c.length)
|
|
662
662
|
}),
|
|
663
663
|
size: "s",
|
|
664
|
-
disabled: !!(
|
|
664
|
+
disabled: !!(O && O <= c.length),
|
|
665
665
|
onClick: () => {
|
|
666
666
|
const d = [...c];
|
|
667
667
|
o === "select" ? d.push({
|
|
668
|
-
name:
|
|
668
|
+
name: p[0] || `Product ${c.length + 1}`,
|
|
669
669
|
id: tt(),
|
|
670
670
|
...Q
|
|
671
671
|
}) : o === "input" ? d.push({
|
|
@@ -694,30 +694,30 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
694
694
|
] }),
|
|
695
695
|
l !== void 0 && /* @__PURE__ */ t.jsx(ht, { items: l })
|
|
696
696
|
] });
|
|
697
|
-
}, ge = "
|
|
697
|
+
}, ge = "_subtitle_1fb9q_1", xe = "_header_1fb9q_8", fe = "_text_1fb9q_9", je = "_productsBlock_1fb9q_10", be = "_buttonsBlock_1fb9q_11", ve = "_top_1fb9q_22", ke = "_itemsBlock_1fb9q_31", ye = "_typeTexts_1fb9q_37", $e = "_block_1fb9q_44", Ne = "_active_1fb9q_56", Ce = "_products_1fb9q_10", Ie = "_product_1fb9q_10", qe = "_button_1fb9q_11", Pe = "_image_1fb9q_86", Be = "_info_1fb9q_93", we = "_name_1fb9q_105", Te = "_buttons_1fb9q_11", Ae = "_modal_1fb9q_116", Se = "_other_1fb9q_135", Oe = "_options_1fb9q_141", z = {
|
|
698
698
|
subtitle: ge,
|
|
699
699
|
header: xe,
|
|
700
|
-
text:
|
|
700
|
+
text: fe,
|
|
701
701
|
productsBlock: je,
|
|
702
|
-
buttonsBlock:
|
|
702
|
+
buttonsBlock: be,
|
|
703
703
|
top: ve,
|
|
704
|
-
itemsBlock:
|
|
705
|
-
typeTexts:
|
|
704
|
+
itemsBlock: ke,
|
|
705
|
+
typeTexts: ye,
|
|
706
706
|
block: $e,
|
|
707
707
|
active: Ne,
|
|
708
708
|
products: Ce,
|
|
709
|
-
product:
|
|
710
|
-
button:
|
|
709
|
+
product: Ie,
|
|
710
|
+
button: qe,
|
|
711
711
|
image: Pe,
|
|
712
712
|
info: Be,
|
|
713
|
-
name:
|
|
714
|
-
buttons:
|
|
715
|
-
modal:
|
|
716
|
-
other:
|
|
717
|
-
options:
|
|
718
|
-
},
|
|
719
|
-
const { activeButton: n, setActiveButton: s, popupPosition: c } = r, [a, l] =
|
|
720
|
-
return
|
|
713
|
+
name: we,
|
|
714
|
+
buttons: Te,
|
|
715
|
+
modal: Ae,
|
|
716
|
+
other: Se,
|
|
717
|
+
options: Oe
|
|
718
|
+
}, De = (r) => {
|
|
719
|
+
const { activeButton: n, setActiveButton: s, popupPosition: c } = r, [a, l] = f.useState(n.typesText), [e, i] = f.useState(n.destination), [u, y] = f.useState(n.link || ""), [h, k] = f.useState(n.text || "");
|
|
720
|
+
return f.useEffect(() => {
|
|
721
721
|
s({
|
|
722
722
|
...n,
|
|
723
723
|
...{
|
|
@@ -730,7 +730,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
730
730
|
}, [a, e, u, h]), /* @__PURE__ */ t.jsxs(
|
|
731
731
|
"div",
|
|
732
732
|
{
|
|
733
|
-
className:
|
|
733
|
+
className: z.modal,
|
|
734
734
|
onClick: (j) => {
|
|
735
735
|
j.stopPropagation();
|
|
736
736
|
},
|
|
@@ -739,7 +739,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
739
739
|
left: `${c.left}px`
|
|
740
740
|
},
|
|
741
741
|
children: [
|
|
742
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
742
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
743
743
|
/* @__PURE__ */ t.jsx("h3", { children: n.type }),
|
|
744
744
|
/* @__PURE__ */ t.jsx(
|
|
745
745
|
x,
|
|
@@ -752,7 +752,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
752
752
|
}
|
|
753
753
|
)
|
|
754
754
|
] }),
|
|
755
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
755
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.options, children: [
|
|
756
756
|
/* @__PURE__ */ t.jsx(
|
|
757
757
|
Y,
|
|
758
758
|
{
|
|
@@ -774,14 +774,14 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
774
774
|
) : /* @__PURE__ */ t.jsx(
|
|
775
775
|
G,
|
|
776
776
|
{
|
|
777
|
-
onChange: (j) =>
|
|
777
|
+
onChange: (j) => y(j),
|
|
778
778
|
value: u,
|
|
779
779
|
placeholder: "https://",
|
|
780
780
|
label: "Link"
|
|
781
781
|
}
|
|
782
782
|
),
|
|
783
783
|
/* @__PURE__ */ t.jsx(
|
|
784
|
-
|
|
784
|
+
F,
|
|
785
785
|
{
|
|
786
786
|
current: !1,
|
|
787
787
|
label: "Open in new tab"
|
|
@@ -790,14 +790,14 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
790
790
|
/* @__PURE__ */ t.jsx(
|
|
791
791
|
lt,
|
|
792
792
|
{
|
|
793
|
-
onChange: (j) =>
|
|
793
|
+
onChange: (j) => k(j),
|
|
794
794
|
value: h,
|
|
795
795
|
label: "Text",
|
|
796
796
|
maxLength: 150
|
|
797
797
|
}
|
|
798
798
|
),
|
|
799
799
|
/* @__PURE__ */ t.jsx(
|
|
800
|
-
|
|
800
|
+
mt,
|
|
801
801
|
{
|
|
802
802
|
typesText: a,
|
|
803
803
|
setTypesText: l
|
|
@@ -807,16 +807,16 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
807
807
|
]
|
|
808
808
|
}
|
|
809
809
|
);
|
|
810
|
-
}, Le = "
|
|
810
|
+
}, Le = "_subtitle_m8qel_1", Me = "_header_m8qel_8", He = "_text_m8qel_9", Re = "_productsBlock_m8qel_10", Ee = "_buttonsBlock_m8qel_11", Ve = "_top_m8qel_23", Fe = "_itemsBlock_m8qel_32", Ue = "_typeTexts_m8qel_38", ze = "_block_m8qel_45", Ge = "_active_m8qel_58", Ye = "_products_m8qel_10", Xe = "_product_m8qel_10", Qe = "_button_m8qel_11", We = "_image_m8qel_88", Je = "_info_m8qel_95", Ke = "_name_m8qel_107", Ze = "_buttons_m8qel_11", ts = "_modal_m8qel_118", es = "_other_m8qel_137", ss = "_options_m8qel_143", Z = {
|
|
811
811
|
subtitle: Le,
|
|
812
812
|
header: Me,
|
|
813
813
|
text: He,
|
|
814
814
|
productsBlock: Re,
|
|
815
815
|
buttonsBlock: Ee,
|
|
816
816
|
top: Ve,
|
|
817
|
-
itemsBlock:
|
|
818
|
-
typeTexts:
|
|
819
|
-
block:
|
|
817
|
+
itemsBlock: Fe,
|
|
818
|
+
typeTexts: Ue,
|
|
819
|
+
block: ze,
|
|
820
820
|
active: Ge,
|
|
821
821
|
products: Ye,
|
|
822
822
|
product: Xe,
|
|
@@ -829,31 +829,31 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
829
829
|
other: es,
|
|
830
830
|
options: ss
|
|
831
831
|
}, ns = (r) => {
|
|
832
|
-
const { buttons: n, setButtons: s, deletable: c = !0, addable: a = !0 } = r, [l, e] =
|
|
832
|
+
const { buttons: n, setButtons: s, deletable: c = !0, addable: a = !0 } = r, [l, e] = f.useState(null), [i, u] = f.useState({
|
|
833
833
|
top: 0,
|
|
834
834
|
left: 0
|
|
835
835
|
});
|
|
836
|
-
|
|
836
|
+
f.useEffect(() => {
|
|
837
837
|
const h = () => {
|
|
838
838
|
e(null);
|
|
839
839
|
};
|
|
840
840
|
return document.body.addEventListener("click", h), e(null), () => {
|
|
841
841
|
e(null), document.body.removeEventListener("click", h);
|
|
842
842
|
};
|
|
843
|
-
}, []),
|
|
843
|
+
}, []), f.useEffect(() => {
|
|
844
844
|
if (l) {
|
|
845
|
-
const h = [...n].map((
|
|
845
|
+
const h = [...n].map((k) => k.id === l.id ? l : k);
|
|
846
846
|
s(h);
|
|
847
847
|
}
|
|
848
848
|
}, [l]);
|
|
849
|
-
const
|
|
849
|
+
const y = (h, k) => {
|
|
850
850
|
h.stopPropagation();
|
|
851
851
|
const j = h.target.getBoundingClientRect(), o = 490, _ = window.innerHeight;
|
|
852
|
-
let
|
|
853
|
-
|
|
854
|
-
top:
|
|
852
|
+
let p = j.top + window.scrollY;
|
|
853
|
+
p + o > _ && (p = _ - o - 20), u({
|
|
854
|
+
top: p,
|
|
855
855
|
left: j.left - 30
|
|
856
|
-
}), e(
|
|
856
|
+
}), e(k);
|
|
857
857
|
};
|
|
858
858
|
return /* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
|
|
859
859
|
/* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: "Button Type" }),
|
|
@@ -865,10 +865,10 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
865
865
|
/* @__PURE__ */ t.jsx(
|
|
866
866
|
Y,
|
|
867
867
|
{
|
|
868
|
-
onChange: (
|
|
868
|
+
onChange: (k) => {
|
|
869
869
|
const o = [...n].map((_) => _.id === h.id ? {
|
|
870
870
|
...h,
|
|
871
|
-
type:
|
|
871
|
+
type: k
|
|
872
872
|
} : _);
|
|
873
873
|
s(o);
|
|
874
874
|
},
|
|
@@ -884,8 +884,8 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
884
884
|
hoverable: !0,
|
|
885
885
|
width: 20,
|
|
886
886
|
height: 20,
|
|
887
|
-
onClick: (
|
|
888
|
-
k
|
|
887
|
+
onClick: (k) => {
|
|
888
|
+
y(k, h);
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
891
|
),
|
|
@@ -895,8 +895,8 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
895
895
|
name: "Trash",
|
|
896
896
|
hoverable: !0,
|
|
897
897
|
onClick: () => {
|
|
898
|
-
const
|
|
899
|
-
s(
|
|
898
|
+
const k = n.filter((j) => j.id !== h.id);
|
|
899
|
+
s(k);
|
|
900
900
|
},
|
|
901
901
|
width: 20,
|
|
902
902
|
height: 20,
|
|
@@ -909,7 +909,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
909
909
|
h.id
|
|
910
910
|
)),
|
|
911
911
|
l && /* @__PURE__ */ t.jsx(
|
|
912
|
-
|
|
912
|
+
De,
|
|
913
913
|
{
|
|
914
914
|
activeButton: l,
|
|
915
915
|
setActiveButton: e,
|
|
@@ -947,11 +947,11 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
947
947
|
] });
|
|
948
948
|
}, Rn = (r) => {
|
|
949
949
|
const { isActiveButtons: n, setIsActiveButtons: s, buttons: c, setButtons: a } = r;
|
|
950
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
951
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
952
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
950
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: z.buttonsBlock, children: [
|
|
951
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
952
|
+
/* @__PURE__ */ t.jsx("h3", { className: z.title, children: "Buttons" }),
|
|
953
953
|
/* @__PURE__ */ t.jsx(
|
|
954
|
-
|
|
954
|
+
F,
|
|
955
955
|
{
|
|
956
956
|
current: n,
|
|
957
957
|
onChange: (l) => s(l)
|
|
@@ -966,7 +966,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
966
966
|
}
|
|
967
967
|
)
|
|
968
968
|
] }) });
|
|
969
|
-
}, cs = "
|
|
969
|
+
}, cs = "_wrapper_m18qi_1", os = "_subtitle_m18qi_7", is = "_content_m18qi_14", as = "_range_m18qi_22", ls = "_track_m18qi_27", rs = "_progress_m18qi_36", ds = "_dots_m18qi_46", us = "_dot_m18qi_46", _s = "_active_m18qi_65", ms = "_input_m18qi_77", hs = "_countBlock_m18qi_91", ps = "_count_m18qi_91", gs = "_controls_m18qi_107", xs = "_button_m18qi_113", I = {
|
|
970
970
|
wrapper: cs,
|
|
971
971
|
subtitle: os,
|
|
972
972
|
content: is,
|
|
@@ -976,46 +976,46 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
976
976
|
dots: ds,
|
|
977
977
|
dot: us,
|
|
978
978
|
active: _s,
|
|
979
|
-
input:
|
|
979
|
+
input: ms,
|
|
980
980
|
countBlock: hs,
|
|
981
|
-
count:
|
|
981
|
+
count: ps,
|
|
982
982
|
controls: gs,
|
|
983
983
|
button: xs
|
|
984
|
-
},
|
|
985
|
-
const { label: n, min: s = 1, max: c = 4, step: a = 1, count: l, setCount: e } = r, [i, u] =
|
|
984
|
+
}, fs = (r) => {
|
|
985
|
+
const { label: n, min: s = 1, max: c = 4, step: a = 1, count: l, setCount: e } = r, [i, u] = f.useState(!1), y = Array.from({ length: (c - s) / a + 1 }), h = (l - s) / (c - s) * 100, k = () => {
|
|
986
986
|
l < c && e(l + a);
|
|
987
987
|
}, j = () => {
|
|
988
988
|
l > s && e(l - a);
|
|
989
989
|
}, o = (_) => {
|
|
990
|
-
const
|
|
991
|
-
e(
|
|
990
|
+
const p = s + _ * a;
|
|
991
|
+
e(p);
|
|
992
992
|
};
|
|
993
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
994
|
-
n && /* @__PURE__ */ t.jsx("h5", { className:
|
|
995
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
996
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
997
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
993
|
+
return /* @__PURE__ */ t.jsxs("div", { className: I.wrapper, children: [
|
|
994
|
+
n && /* @__PURE__ */ t.jsx("h5", { className: I.subtitle, children: n }),
|
|
995
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.content, children: [
|
|
996
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.range, children: [
|
|
997
|
+
/* @__PURE__ */ t.jsx("div", { className: I.track }),
|
|
998
998
|
/* @__PURE__ */ t.jsx(
|
|
999
999
|
"div",
|
|
1000
1000
|
{
|
|
1001
|
-
className:
|
|
1001
|
+
className: I.progress,
|
|
1002
1002
|
style: { width: `${h}%` }
|
|
1003
1003
|
}
|
|
1004
1004
|
),
|
|
1005
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1006
|
-
const P =
|
|
1005
|
+
/* @__PURE__ */ t.jsx("div", { className: I.dots, children: y.map((_, p) => {
|
|
1006
|
+
const P = p <= (l - s) / a;
|
|
1007
1007
|
return /* @__PURE__ */ t.jsx(
|
|
1008
1008
|
"button",
|
|
1009
1009
|
{
|
|
1010
|
-
onClick: () => o(
|
|
1011
|
-
className: H(
|
|
1012
|
-
[
|
|
1013
|
-
[
|
|
1014
|
-
[
|
|
1010
|
+
onClick: () => o(p),
|
|
1011
|
+
className: H(I.dot, {
|
|
1012
|
+
[I.active]: P,
|
|
1013
|
+
[I.inactive]: !P,
|
|
1014
|
+
[I.dragging]: i
|
|
1015
1015
|
}),
|
|
1016
|
-
"aria-label": `Set value to ${s +
|
|
1016
|
+
"aria-label": `Set value to ${s + p * a}`
|
|
1017
1017
|
},
|
|
1018
|
-
|
|
1018
|
+
p
|
|
1019
1019
|
);
|
|
1020
1020
|
}) }),
|
|
1021
1021
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1031,11 +1031,11 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1031
1031
|
onMouseUp: () => u(!1),
|
|
1032
1032
|
onTouchStart: () => u(!0),
|
|
1033
1033
|
onTouchEnd: () => u(!1),
|
|
1034
|
-
className:
|
|
1034
|
+
className: I.input
|
|
1035
1035
|
}
|
|
1036
1036
|
)
|
|
1037
1037
|
] }),
|
|
1038
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1038
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.countBlock, children: [
|
|
1039
1039
|
/* @__PURE__ */ t.jsx(
|
|
1040
1040
|
G,
|
|
1041
1041
|
{
|
|
@@ -1044,19 +1044,19 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1044
1044
|
max: c,
|
|
1045
1045
|
paddingless: !0,
|
|
1046
1046
|
onChange: (_) => {
|
|
1047
|
-
const
|
|
1048
|
-
|
|
1047
|
+
const p = Number(_);
|
|
1048
|
+
p > c ? e(c) : p < s ? e(s) : e(p);
|
|
1049
1049
|
},
|
|
1050
1050
|
value: String(l)
|
|
1051
1051
|
}
|
|
1052
1052
|
),
|
|
1053
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1053
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.controls, children: [
|
|
1054
1054
|
/* @__PURE__ */ t.jsx(
|
|
1055
1055
|
"button",
|
|
1056
1056
|
{
|
|
1057
|
-
onClick:
|
|
1057
|
+
onClick: k,
|
|
1058
1058
|
disabled: l >= c,
|
|
1059
|
-
className:
|
|
1059
|
+
className: I.button,
|
|
1060
1060
|
"aria-label": "Increment count",
|
|
1061
1061
|
children: /* @__PURE__ */ t.jsx(
|
|
1062
1062
|
x,
|
|
@@ -1073,7 +1073,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1073
1073
|
{
|
|
1074
1074
|
onClick: j,
|
|
1075
1075
|
disabled: l <= s,
|
|
1076
|
-
className:
|
|
1076
|
+
className: I.button,
|
|
1077
1077
|
"aria-label": "Decrement count",
|
|
1078
1078
|
children: /* @__PURE__ */ t.jsx(
|
|
1079
1079
|
x,
|
|
@@ -1089,32 +1089,32 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1089
1089
|
] })
|
|
1090
1090
|
] })
|
|
1091
1091
|
] });
|
|
1092
|
-
}, js = "
|
|
1092
|
+
}, js = "_subtitle_16rdk_1", bs = "_header_16rdk_8", vs = "_text_16rdk_9", ks = "_productsBlock_16rdk_10", ys = "_top_16rdk_22", $s = "_itemsBlock_16rdk_31", Ns = "_typeTexts_16rdk_37", Cs = "_block_16rdk_44", Is = "_active_16rdk_57", qs = "_products_16rdk_10", Ps = "_product_16rdk_10", Bs = "_button_16rdk_76", ws = "_image_16rdk_87", Ts = "_info_16rdk_94", As = "_name_16rdk_106", Ss = "_buttons_16rdk_110", Os = "_modal_16rdk_117", Ds = "_link_16rdk_137", Ls = "_modalOptions_16rdk_143", w = {
|
|
1093
1093
|
subtitle: js,
|
|
1094
|
-
header:
|
|
1094
|
+
header: bs,
|
|
1095
1095
|
text: vs,
|
|
1096
|
-
productsBlock:
|
|
1097
|
-
top:
|
|
1096
|
+
productsBlock: ks,
|
|
1097
|
+
top: ys,
|
|
1098
1098
|
itemsBlock: $s,
|
|
1099
1099
|
typeTexts: Ns,
|
|
1100
1100
|
block: Cs,
|
|
1101
|
-
active:
|
|
1102
|
-
products:
|
|
1101
|
+
active: Is,
|
|
1102
|
+
products: qs,
|
|
1103
1103
|
product: Ps,
|
|
1104
1104
|
button: Bs,
|
|
1105
|
-
image:
|
|
1106
|
-
info:
|
|
1107
|
-
name:
|
|
1108
|
-
buttons:
|
|
1109
|
-
modal:
|
|
1110
|
-
link:
|
|
1105
|
+
image: ws,
|
|
1106
|
+
info: Ts,
|
|
1107
|
+
name: As,
|
|
1108
|
+
buttons: Ss,
|
|
1109
|
+
modal: Os,
|
|
1110
|
+
link: Ds,
|
|
1111
1111
|
modalOptions: Ls
|
|
1112
1112
|
}, Ms = (r) => {
|
|
1113
1113
|
const { activeItem: n, setActiveItem: s, popupPosition: c, setIsOpenModal: a } = r;
|
|
1114
1114
|
return /* @__PURE__ */ t.jsxs(
|
|
1115
1115
|
"div",
|
|
1116
1116
|
{
|
|
1117
|
-
className:
|
|
1117
|
+
className: w.modal,
|
|
1118
1118
|
onClick: (l) => {
|
|
1119
1119
|
l.stopPropagation();
|
|
1120
1120
|
},
|
|
@@ -1123,7 +1123,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1123
1123
|
left: `${c.left}px`
|
|
1124
1124
|
},
|
|
1125
1125
|
children: [
|
|
1126
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1126
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.top, children: [
|
|
1127
1127
|
/* @__PURE__ */ t.jsx("h3", { children: n.name }),
|
|
1128
1128
|
/* @__PURE__ */ t.jsx(
|
|
1129
1129
|
x,
|
|
@@ -1138,7 +1138,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1138
1138
|
}
|
|
1139
1139
|
)
|
|
1140
1140
|
] }),
|
|
1141
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1141
|
+
/* @__PURE__ */ t.jsx("div", { className: w.modalOptions, children: /* @__PURE__ */ t.jsx(
|
|
1142
1142
|
ot,
|
|
1143
1143
|
{
|
|
1144
1144
|
label: "Put up an attractive image",
|
|
@@ -1172,7 +1172,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1172
1172
|
"div",
|
|
1173
1173
|
{
|
|
1174
1174
|
ref: (i) => e(a(i)),
|
|
1175
|
-
className: `${
|
|
1175
|
+
className: `${w.product} ${l ? w.dragging : ""}`,
|
|
1176
1176
|
children: c
|
|
1177
1177
|
}
|
|
1178
1178
|
);
|
|
@@ -1186,47 +1186,47 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1186
1186
|
title: e,
|
|
1187
1187
|
subtitle: i,
|
|
1188
1188
|
editable: u = !0,
|
|
1189
|
-
draggable:
|
|
1189
|
+
draggable: y = !1,
|
|
1190
1190
|
withImage: h = !1,
|
|
1191
|
-
deletable:
|
|
1191
|
+
deletable: k = !0,
|
|
1192
1192
|
addable: j = !0,
|
|
1193
1193
|
itemsType: o,
|
|
1194
1194
|
itemsOptions: _
|
|
1195
|
-
} = r, [
|
|
1195
|
+
} = r, [p, P] = f.useState(null), [T, N] = f.useState({
|
|
1196
1196
|
top: 0,
|
|
1197
1197
|
left: 0
|
|
1198
|
-
}), [Q,
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1198
|
+
}), [Q, O] = f.useState(!1), R = (m, v) => {
|
|
1199
|
+
const A = [...c], [C] = A.splice(m, 1);
|
|
1200
|
+
A.splice(v, 0, C), a(A);
|
|
1201
1201
|
};
|
|
1202
|
-
|
|
1203
|
-
const
|
|
1204
|
-
P(null),
|
|
1202
|
+
f.useEffect(() => {
|
|
1203
|
+
const m = () => {
|
|
1204
|
+
P(null), O(!1);
|
|
1205
1205
|
};
|
|
1206
|
-
return document.body.addEventListener("click",
|
|
1207
|
-
P(null),
|
|
1206
|
+
return document.body.addEventListener("click", m), P(null), O(!1), () => {
|
|
1207
|
+
P(null), O(!1), document.body.removeEventListener("click", m);
|
|
1208
1208
|
};
|
|
1209
|
-
}, []),
|
|
1210
|
-
if (
|
|
1211
|
-
const
|
|
1212
|
-
a(
|
|
1209
|
+
}, []), f.useEffect(() => {
|
|
1210
|
+
if (p) {
|
|
1211
|
+
const m = [...c].map((v) => v.id === p.id ? p : v);
|
|
1212
|
+
a(m);
|
|
1213
1213
|
}
|
|
1214
|
-
}, [
|
|
1215
|
-
const E = (
|
|
1216
|
-
|
|
1217
|
-
const
|
|
1218
|
-
let
|
|
1219
|
-
|
|
1220
|
-
top:
|
|
1221
|
-
left:
|
|
1214
|
+
}, [p]);
|
|
1215
|
+
const E = (m, v) => {
|
|
1216
|
+
m.stopPropagation();
|
|
1217
|
+
const A = m.target.getBoundingClientRect(), C = 100, U = window.innerHeight;
|
|
1218
|
+
let D = A.top + window.scrollY;
|
|
1219
|
+
D + C > U && (D = U - C - 20), O(!0), N({
|
|
1220
|
+
top: D - 80,
|
|
1221
|
+
left: A.left - 30
|
|
1222
1222
|
}), P(v);
|
|
1223
1223
|
};
|
|
1224
|
-
function st(
|
|
1224
|
+
function st(m) {
|
|
1225
1225
|
if (h)
|
|
1226
|
-
return
|
|
1226
|
+
return m ? /* @__PURE__ */ t.jsx(
|
|
1227
1227
|
"img",
|
|
1228
1228
|
{
|
|
1229
|
-
src: `https://imagedelivery.net/${
|
|
1229
|
+
src: `https://imagedelivery.net/${m}/w=1000`,
|
|
1230
1230
|
alt: "image",
|
|
1231
1231
|
width: 16,
|
|
1232
1232
|
height: 16
|
|
@@ -1241,9 +1241,9 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1241
1241
|
}
|
|
1242
1242
|
);
|
|
1243
1243
|
}
|
|
1244
|
-
const et = (
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1244
|
+
const et = (m, v) => {
|
|
1245
|
+
const A = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1246
|
+
y && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1247
1247
|
x,
|
|
1248
1248
|
{
|
|
1249
1249
|
name: "DotsSixVertical",
|
|
@@ -1256,31 +1256,31 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1256
1256
|
Y,
|
|
1257
1257
|
{
|
|
1258
1258
|
onChange: (C) => {
|
|
1259
|
-
const
|
|
1259
|
+
const U = [...c], D = Number(C.split(" ")[1]), d = _.find(($) => $.id === D);
|
|
1260
1260
|
if (!d) return;
|
|
1261
1261
|
const B = {
|
|
1262
1262
|
...d.productData.stats,
|
|
1263
1263
|
newPrice: d.productData.minPrice.amount,
|
|
1264
1264
|
oldPrice: d.productData.compareAtPrice.amount
|
|
1265
|
-
},
|
|
1266
|
-
...
|
|
1265
|
+
}, S = U.map(($) => $.id === m.id ? {
|
|
1266
|
+
...m,
|
|
1267
1267
|
name: C,
|
|
1268
|
-
listingId:
|
|
1268
|
+
listingId: D,
|
|
1269
1269
|
stats: B
|
|
1270
1270
|
} : $);
|
|
1271
1271
|
P({
|
|
1272
|
-
...
|
|
1272
|
+
...m,
|
|
1273
1273
|
name: C,
|
|
1274
|
-
listingId:
|
|
1275
|
-
}), a([...
|
|
1274
|
+
listingId: D
|
|
1275
|
+
}), a([...S]);
|
|
1276
1276
|
},
|
|
1277
|
-
value:
|
|
1277
|
+
value: m.name,
|
|
1278
1278
|
options: [..._.map((C) => `Product ${C.id}`)],
|
|
1279
|
-
leftAddon: st(
|
|
1279
|
+
leftAddon: st(m.images[0])
|
|
1280
1280
|
},
|
|
1281
1281
|
v
|
|
1282
1282
|
),
|
|
1283
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1283
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
|
|
1284
1284
|
u && /* @__PURE__ */ t.jsx(
|
|
1285
1285
|
x,
|
|
1286
1286
|
{
|
|
@@ -1288,10 +1288,10 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1288
1288
|
hoverable: !0,
|
|
1289
1289
|
width: 20,
|
|
1290
1290
|
height: 20,
|
|
1291
|
-
onClick: (C) => E(C,
|
|
1291
|
+
onClick: (C) => E(C, m)
|
|
1292
1292
|
}
|
|
1293
1293
|
),
|
|
1294
|
-
|
|
1294
|
+
k && /* @__PURE__ */ t.jsx(
|
|
1295
1295
|
x,
|
|
1296
1296
|
{
|
|
1297
1297
|
name: "Trash",
|
|
@@ -1299,60 +1299,60 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1299
1299
|
width: 20,
|
|
1300
1300
|
height: 20,
|
|
1301
1301
|
fill: "#C12A2A",
|
|
1302
|
-
onClick: () => a(c.filter((C) => C.id !==
|
|
1302
|
+
onClick: () => a(c.filter((C) => C.id !== m.id))
|
|
1303
1303
|
}
|
|
1304
1304
|
)
|
|
1305
1305
|
] })
|
|
1306
1306
|
] });
|
|
1307
|
-
return
|
|
1307
|
+
return y ? /* @__PURE__ */ t.jsx(
|
|
1308
1308
|
Hs,
|
|
1309
1309
|
{
|
|
1310
|
-
product:
|
|
1310
|
+
product: m,
|
|
1311
1311
|
index: v,
|
|
1312
1312
|
moveProduct: R,
|
|
1313
|
-
children:
|
|
1313
|
+
children: A
|
|
1314
1314
|
},
|
|
1315
|
-
|
|
1315
|
+
m.id
|
|
1316
1316
|
) : /* @__PURE__ */ t.jsx(
|
|
1317
1317
|
"div",
|
|
1318
1318
|
{
|
|
1319
|
-
className:
|
|
1320
|
-
children:
|
|
1319
|
+
className: w.product,
|
|
1320
|
+
children: A
|
|
1321
1321
|
},
|
|
1322
|
-
|
|
1322
|
+
m.id
|
|
1323
1323
|
);
|
|
1324
1324
|
};
|
|
1325
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1326
|
-
(e || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
1327
|
-
e && /* @__PURE__ */ t.jsx("h3", { className:
|
|
1325
|
+
return /* @__PURE__ */ t.jsxs("div", { className: w.productsBlock, children: [
|
|
1326
|
+
(e || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: w.top, children: [
|
|
1327
|
+
e && /* @__PURE__ */ t.jsx("h3", { className: w.title, children: e }),
|
|
1328
1328
|
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1329
|
-
|
|
1329
|
+
F,
|
|
1330
1330
|
{
|
|
1331
1331
|
current: n,
|
|
1332
|
-
onChange: (
|
|
1332
|
+
onChange: (m) => s == null ? void 0 : s(m)
|
|
1333
1333
|
}
|
|
1334
1334
|
)
|
|
1335
1335
|
] }),
|
|
1336
|
-
Q &&
|
|
1336
|
+
Q && p && /* @__PURE__ */ t.jsx(
|
|
1337
1337
|
Ms,
|
|
1338
1338
|
{
|
|
1339
|
-
activeItem:
|
|
1339
|
+
activeItem: p,
|
|
1340
1340
|
setActiveItem: P,
|
|
1341
|
-
setIsOpenModal:
|
|
1342
|
-
popupPosition:
|
|
1341
|
+
setIsOpenModal: O,
|
|
1342
|
+
popupPosition: T
|
|
1343
1343
|
}
|
|
1344
1344
|
),
|
|
1345
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1346
|
-
i && /* @__PURE__ */ t.jsx("h5", { className:
|
|
1347
|
-
|
|
1345
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.products, children: [
|
|
1346
|
+
i && /* @__PURE__ */ t.jsx("h5", { className: w.subtitle, children: i }),
|
|
1347
|
+
y ? /* @__PURE__ */ t.jsx(rt, { backend: dt, children: c.map((m, v) => et(m, v)) }) : c.map((m, v) => et(m, v)),
|
|
1348
1348
|
j && /* @__PURE__ */ t.jsxs(
|
|
1349
1349
|
X,
|
|
1350
1350
|
{
|
|
1351
|
-
className:
|
|
1351
|
+
className: w.button,
|
|
1352
1352
|
size: "s",
|
|
1353
1353
|
onClick: () => {
|
|
1354
|
-
const
|
|
1355
|
-
|
|
1354
|
+
const m = [...c], v = _[0].id;
|
|
1355
|
+
m.push({
|
|
1356
1356
|
name: `Product ${v}`,
|
|
1357
1357
|
id: tt(),
|
|
1358
1358
|
listingId: v,
|
|
@@ -1363,7 +1363,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1363
1363
|
newPrice: _[0].productData.minPrice.amount,
|
|
1364
1364
|
oldPrice: _[0].productData.compareAtPrice.amount
|
|
1365
1365
|
}
|
|
1366
|
-
}), a(
|
|
1366
|
+
}), a(m);
|
|
1367
1367
|
},
|
|
1368
1368
|
children: [
|
|
1369
1369
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
@@ -1381,13 +1381,13 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1381
1381
|
] }),
|
|
1382
1382
|
l !== void 0 && /* @__PURE__ */ t.jsx(ht, { items: l })
|
|
1383
1383
|
] });
|
|
1384
|
-
}, Rs = "
|
|
1384
|
+
}, Rs = "_options_q6sjs_1", Es = "_price_q6sjs_12", Vs = "_oldPrice_q6sjs_19", Fs = "_newPrice_q6sjs_27", Us = "_meta_q6sjs_34", zs = "_info_q6sjs_40", Gs = "_infoRight_q6sjs_48", Ys = "_buttons_q6sjs_55", Xs = "_variants_q6sjs_62", Qs = "_variant_q6sjs_62", Ws = "_stock_q6sjs_79", Js = "_variantInfo_q6sjs_86", Ks = "_quantity_q6sjs_92", Zs = "_count_q6sjs_99", tn = "_button_q6sjs_55", en = "_activeVariant_q6sjs_120", sn = "_chargeTypes_q6sjs_124", nn = "_charge_q6sjs_124", cn = "_chargeActive_q6sjs_144", b = {
|
|
1385
1385
|
options: Rs,
|
|
1386
1386
|
price: Es,
|
|
1387
1387
|
oldPrice: Vs,
|
|
1388
|
-
newPrice:
|
|
1389
|
-
meta:
|
|
1390
|
-
info:
|
|
1388
|
+
newPrice: Fs,
|
|
1389
|
+
meta: Us,
|
|
1390
|
+
info: zs,
|
|
1391
1391
|
infoRight: Gs,
|
|
1392
1392
|
buttons: Ys,
|
|
1393
1393
|
variants: Xs,
|
|
@@ -1402,15 +1402,15 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1402
1402
|
charge: nn,
|
|
1403
1403
|
chargeActive: cn
|
|
1404
1404
|
}, Vn = (r) => {
|
|
1405
|
-
const { variants: n } = r, [s, c] =
|
|
1405
|
+
const { variants: n } = r, [s, c] = f.useState(n[0]), a = it(), [l, e] = f.useState(1), { reset: i, addProductToCart: u, getProducts: y } = at();
|
|
1406
1406
|
async function h() {
|
|
1407
|
-
await
|
|
1407
|
+
await y(), await u({
|
|
1408
1408
|
productId: r.id,
|
|
1409
1409
|
productVariantId: s.id,
|
|
1410
1410
|
quantity: l
|
|
1411
1411
|
});
|
|
1412
1412
|
}
|
|
1413
|
-
function
|
|
1413
|
+
function k() {
|
|
1414
1414
|
i(), h(), a("/checkout");
|
|
1415
1415
|
}
|
|
1416
1416
|
function j(o) {
|
|
@@ -1428,24 +1428,24 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1428
1428
|
return `${N} ${N === 1 ? "second" : "seconds"}`;
|
|
1429
1429
|
}
|
|
1430
1430
|
}
|
|
1431
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1432
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1433
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1431
|
+
return /* @__PURE__ */ t.jsxs("div", { className: b.options, children: [
|
|
1432
|
+
/* @__PURE__ */ t.jsx("div", { className: b.chargeTypes, children: s.chargeTypes ? s.chargeTypes.map((o) => /* @__PURE__ */ t.jsx("div", { children: o }, o)) : /* @__PURE__ */ t.jsx("div", { className: H(b.charge, b.chargeActive), children: "One-Time" }) }),
|
|
1433
|
+
/* @__PURE__ */ t.jsx("div", { className: b.variants, children: n.map((o) => /* @__PURE__ */ t.jsxs(
|
|
1434
1434
|
"div",
|
|
1435
1435
|
{
|
|
1436
|
-
className: H(
|
|
1437
|
-
[
|
|
1436
|
+
className: H(b.variant, {
|
|
1437
|
+
[b.activeVariant]: s.id === o.id
|
|
1438
1438
|
}),
|
|
1439
1439
|
onClick: () => c(o),
|
|
1440
1440
|
children: [
|
|
1441
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1442
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1441
|
+
/* @__PURE__ */ t.jsxs("div", { className: b.variantInfo, children: [
|
|
1442
|
+
/* @__PURE__ */ t.jsx("span", { className: b.title, children: o.name }),
|
|
1443
1443
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
1444
1444
|
"$",
|
|
1445
1445
|
o.price.amount
|
|
1446
1446
|
] })
|
|
1447
1447
|
] }),
|
|
1448
|
-
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsxs("span", { className:
|
|
1448
|
+
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsxs("span", { className: b.stock, children: [
|
|
1449
1449
|
o.quantity.restrictions.max || 0,
|
|
1450
1450
|
" in stock"
|
|
1451
1451
|
] }) })
|
|
@@ -1453,31 +1453,31 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1453
1453
|
},
|
|
1454
1454
|
o.id
|
|
1455
1455
|
)) }),
|
|
1456
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1456
|
+
/* @__PURE__ */ t.jsxs("div", { className: b.quantity, children: [
|
|
1457
1457
|
/* @__PURE__ */ t.jsx(
|
|
1458
1458
|
"div",
|
|
1459
1459
|
{
|
|
1460
1460
|
onClick: () => {
|
|
1461
1461
|
l > 1 ? e((o) => o - 1) : e(1);
|
|
1462
1462
|
},
|
|
1463
|
-
className:
|
|
1463
|
+
className: b.button,
|
|
1464
1464
|
children: /* @__PURE__ */ t.jsx(x, { name: "Minus" })
|
|
1465
1465
|
}
|
|
1466
1466
|
),
|
|
1467
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1467
|
+
/* @__PURE__ */ t.jsx("div", { className: b.count, children: l }),
|
|
1468
1468
|
/* @__PURE__ */ t.jsx(
|
|
1469
1469
|
"div",
|
|
1470
1470
|
{
|
|
1471
1471
|
onClick: () => e((o) => o + 1),
|
|
1472
|
-
className:
|
|
1472
|
+
className: b.button,
|
|
1473
1473
|
children: /* @__PURE__ */ t.jsx(x, { name: "Plus" })
|
|
1474
1474
|
}
|
|
1475
1475
|
)
|
|
1476
1476
|
] }),
|
|
1477
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1478
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1477
|
+
/* @__PURE__ */ t.jsxs("div", { className: b.meta, children: [
|
|
1478
|
+
/* @__PURE__ */ t.jsxs("div", { className: b.info, children: [
|
|
1479
1479
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
1480
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1480
|
+
/* @__PURE__ */ t.jsxs("div", { className: b.infoRight, children: [
|
|
1481
1481
|
/* @__PURE__ */ t.jsx(
|
|
1482
1482
|
x,
|
|
1483
1483
|
{
|
|
@@ -1490,29 +1490,29 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1490
1490
|
/* @__PURE__ */ t.jsx("span", { children: s.deliveryTime === 0 ? "Instant" : j(s.deliveryTime) })
|
|
1491
1491
|
] })
|
|
1492
1492
|
] }),
|
|
1493
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1493
|
+
/* @__PURE__ */ t.jsxs("div", { className: b.info, children: [
|
|
1494
1494
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
1495
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1496
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1495
|
+
/* @__PURE__ */ t.jsx("div", { className: b.infoRight, children: s.compareAtPrice && (s.compareAtPrice.amount || 0) - (s.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: b.price, children: [
|
|
1496
|
+
/* @__PURE__ */ t.jsxs("span", { className: b.newPrice, children: [
|
|
1497
1497
|
"$ ",
|
|
1498
1498
|
(s.price.amount || 0) * l
|
|
1499
1499
|
] }),
|
|
1500
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1500
|
+
/* @__PURE__ */ t.jsxs("span", { className: b.oldPrice, children: [
|
|
1501
1501
|
"$ ",
|
|
1502
1502
|
(s.compareAtPrice.amount || 0) * l
|
|
1503
1503
|
] })
|
|
1504
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
1504
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: b.newPrice, children: [
|
|
1505
1505
|
"$ ",
|
|
1506
1506
|
(s.price.amount || 0) * l
|
|
1507
1507
|
] }) })
|
|
1508
1508
|
] })
|
|
1509
1509
|
] }),
|
|
1510
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1510
|
+
/* @__PURE__ */ t.jsxs("div", { className: b.buttons, children: [
|
|
1511
1511
|
/* @__PURE__ */ t.jsx(
|
|
1512
1512
|
X,
|
|
1513
1513
|
{
|
|
1514
1514
|
type: "Primary",
|
|
1515
|
-
onClick: () =>
|
|
1515
|
+
onClick: () => k(),
|
|
1516
1516
|
children: "Buy Now"
|
|
1517
1517
|
}
|
|
1518
1518
|
),
|
|
@@ -1526,7 +1526,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1526
1526
|
)
|
|
1527
1527
|
] })
|
|
1528
1528
|
] });
|
|
1529
|
-
}, on = "
|
|
1529
|
+
}, on = "_button_14i4s_1", an = "_login_14i4s_14", ln = "_signUp_14i4s_18", rn = "_buttons_14i4s_23", dn = "_modal_14i4s_32", un = "_info_14i4s_48", _n = "_top_14i4s_55", mn = "_title_14i4s_66", hn = "_clear_14i4s_72", pn = "_activeClear_14i4s_79", gn = "_count_14i4s_83", xn = "_cart_14i4s_98", fn = "_empty_14i4s_106", jn = "_product_14i4s_132", bn = "_products_14i4s_141", vn = "_image_14i4s_149", kn = "_productInfo_14i4s_155", yn = "_content_14i4s_162", $n = "_name_14i4s_168", Nn = "_price_14i4s_174", Cn = "_productButtons_14i4s_180", In = "_productButton_14i4s_180", qn = "_productCount_14i4s_200", Pn = "_bottom_14i4s_216", Bn = "_subtotal_14i4s_224", wn = "_block_14i4s_232", Tn = "_shoppingCount_14i4s_239", g = {
|
|
1530
1530
|
button: on,
|
|
1531
1531
|
login: an,
|
|
1532
1532
|
signUp: ln,
|
|
@@ -1534,33 +1534,33 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1534
1534
|
modal: dn,
|
|
1535
1535
|
info: un,
|
|
1536
1536
|
top: _n,
|
|
1537
|
-
title:
|
|
1537
|
+
title: mn,
|
|
1538
1538
|
clear: hn,
|
|
1539
|
-
activeClear:
|
|
1539
|
+
activeClear: pn,
|
|
1540
1540
|
count: gn,
|
|
1541
1541
|
cart: xn,
|
|
1542
|
-
empty:
|
|
1542
|
+
empty: fn,
|
|
1543
1543
|
product: jn,
|
|
1544
|
-
products:
|
|
1544
|
+
products: bn,
|
|
1545
1545
|
image: vn,
|
|
1546
|
-
productInfo:
|
|
1547
|
-
content:
|
|
1546
|
+
productInfo: kn,
|
|
1547
|
+
content: yn,
|
|
1548
1548
|
name: $n,
|
|
1549
1549
|
price: Nn,
|
|
1550
1550
|
productButtons: Cn,
|
|
1551
|
-
productButton:
|
|
1552
|
-
productCount:
|
|
1551
|
+
productButton: In,
|
|
1552
|
+
productCount: qn,
|
|
1553
1553
|
bottom: Pn,
|
|
1554
1554
|
subtotal: Bn,
|
|
1555
|
-
block:
|
|
1556
|
-
shoppingCount:
|
|
1557
|
-
},
|
|
1555
|
+
block: wn,
|
|
1556
|
+
shoppingCount: Tn
|
|
1557
|
+
}, Fn = (r) => {
|
|
1558
1558
|
const { shopping: n, signUp: s } = r, c = it();
|
|
1559
1559
|
function a(l) {
|
|
1560
1560
|
c(l);
|
|
1561
1561
|
}
|
|
1562
1562
|
return /* @__PURE__ */ t.jsxs("div", { className: g.buttons, children: [
|
|
1563
|
-
n && /* @__PURE__ */ t.jsx(
|
|
1563
|
+
n && /* @__PURE__ */ t.jsx(An, {}),
|
|
1564
1564
|
/* @__PURE__ */ t.jsx(
|
|
1565
1565
|
"div",
|
|
1566
1566
|
{
|
|
@@ -1578,8 +1578,8 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1578
1578
|
}
|
|
1579
1579
|
)
|
|
1580
1580
|
] });
|
|
1581
|
-
},
|
|
1582
|
-
const [r, n] =
|
|
1581
|
+
}, An = () => {
|
|
1582
|
+
const [r, n] = f.useState(!1), { cart: s } = at();
|
|
1583
1583
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1584
1584
|
/* @__PURE__ */ t.jsxs(
|
|
1585
1585
|
"div",
|
|
@@ -1600,26 +1600,26 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1600
1600
|
]
|
|
1601
1601
|
}
|
|
1602
1602
|
),
|
|
1603
|
-
r && /* @__PURE__ */ t.jsx(
|
|
1603
|
+
r && /* @__PURE__ */ t.jsx(pt, { close: n, children: /* @__PURE__ */ t.jsx(Sn, {}) })
|
|
1604
1604
|
] });
|
|
1605
|
-
},
|
|
1606
|
-
const { cart: r, reset: n, getProducts: s, getTotalAndDiscount: c, updateQuantityOfProduct: a } = at(), [l, e] =
|
|
1605
|
+
}, Sn = () => {
|
|
1606
|
+
const { cart: r, reset: n, getProducts: s, getTotalAndDiscount: c, updateQuantityOfProduct: a } = at(), [l, e] = f.useState([]), i = it();
|
|
1607
1607
|
function u(o) {
|
|
1608
1608
|
for (let _ = 0; _ < r.parts.length; _++)
|
|
1609
|
-
for (let
|
|
1609
|
+
for (let p = 0; p < o.variants.length; p++)
|
|
1610
1610
|
if (r.parts[_].productVariantId === o.variants[_].id)
|
|
1611
1611
|
return r.parts[_].productVariantId;
|
|
1612
1612
|
}
|
|
1613
|
-
function
|
|
1613
|
+
function y(o) {
|
|
1614
1614
|
for (let _ = 0; _ < r.parts.length; _++)
|
|
1615
|
-
for (let
|
|
1615
|
+
for (let p = 0; p < o.variants.length; p++)
|
|
1616
1616
|
if (r.parts[_].productVariantId === o.variants[_].id)
|
|
1617
1617
|
return r.parts[_].quantity;
|
|
1618
1618
|
}
|
|
1619
1619
|
function h(o) {
|
|
1620
1620
|
i(o);
|
|
1621
1621
|
}
|
|
1622
|
-
function
|
|
1622
|
+
function k(o) {
|
|
1623
1623
|
a({
|
|
1624
1624
|
productId: o.id,
|
|
1625
1625
|
productVariantId: o.activeVariantId,
|
|
@@ -1633,12 +1633,12 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1633
1633
|
quantity: o.quantity - 1
|
|
1634
1634
|
});
|
|
1635
1635
|
}
|
|
1636
|
-
return
|
|
1636
|
+
return f.useEffect(() => {
|
|
1637
1637
|
(async () => {
|
|
1638
|
-
const _ = r.parts.map((
|
|
1639
|
-
...
|
|
1640
|
-
activeVariantId: u(
|
|
1641
|
-
quantity:
|
|
1638
|
+
const _ = r.parts.map((T) => String(T.productId)), P = (await s([..._])).map((T) => ({
|
|
1639
|
+
...T,
|
|
1640
|
+
activeVariantId: u(T),
|
|
1641
|
+
quantity: y(T)
|
|
1642
1642
|
}));
|
|
1643
1643
|
e(P);
|
|
1644
1644
|
})();
|
|
@@ -1713,7 +1713,7 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1713
1713
|
/* @__PURE__ */ t.jsx(
|
|
1714
1714
|
"div",
|
|
1715
1715
|
{
|
|
1716
|
-
onClick: () =>
|
|
1716
|
+
onClick: () => k(o),
|
|
1717
1717
|
className: g.productButton,
|
|
1718
1718
|
children: /* @__PURE__ */ t.jsx(
|
|
1719
1719
|
x,
|
|
@@ -1752,11 +1752,11 @@ const gt = "_accordion_2tiiw_1", xt = "_header_2tiiw_9", bt = "_icon_2tiiw_16",
|
|
|
1752
1752
|
] }),
|
|
1753
1753
|
/* @__PURE__ */ t.jsx(X, { onClick: () => h("/checkout"), children: "Checkout" })
|
|
1754
1754
|
] })
|
|
1755
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
1755
|
+
] }) : /* @__PURE__ */ t.jsx(On, {})
|
|
1756
1756
|
]
|
|
1757
1757
|
}
|
|
1758
1758
|
);
|
|
1759
|
-
},
|
|
1759
|
+
}, On = () => /* @__PURE__ */ t.jsxs("div", { className: g.empty, children: [
|
|
1760
1760
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(x, { name: "Handbag" }) }),
|
|
1761
1761
|
/* @__PURE__ */ t.jsx("span", { children: "Your cart is empty" }),
|
|
1762
1762
|
/* @__PURE__ */ t.jsx("span", { children: "Check out the store's products and add them here" })
|
|
@@ -1770,27 +1770,27 @@ export {
|
|
|
1770
1770
|
ot as ChooseImage,
|
|
1771
1771
|
Yn as ChooseImageModal,
|
|
1772
1772
|
Xn as ColorPicker,
|
|
1773
|
-
|
|
1773
|
+
On as EmptyCart,
|
|
1774
1774
|
Qn as ErrorableBlock,
|
|
1775
|
-
|
|
1775
|
+
Fn as HeaderButtons,
|
|
1776
1776
|
x as Icon,
|
|
1777
1777
|
G as Input,
|
|
1778
|
-
|
|
1778
|
+
pe as ItemsSettings,
|
|
1779
1779
|
Hn as LayoutSettings,
|
|
1780
1780
|
En as ListingSelector,
|
|
1781
1781
|
Wn as Loader,
|
|
1782
|
-
|
|
1782
|
+
pt as Modal,
|
|
1783
1783
|
Jn as Picker,
|
|
1784
1784
|
Vn as ProductOptions,
|
|
1785
1785
|
Kn as Radio,
|
|
1786
|
-
|
|
1786
|
+
fs as RangeSelector,
|
|
1787
1787
|
Y as Select,
|
|
1788
|
-
|
|
1789
|
-
|
|
1788
|
+
An as ShoppingButton,
|
|
1789
|
+
Sn as ShoppingModalCart,
|
|
1790
1790
|
Zn as Submodal,
|
|
1791
|
-
|
|
1792
|
-
|
|
1791
|
+
F as Switch,
|
|
1792
|
+
Ft as TextSettings,
|
|
1793
1793
|
lt as Textarea,
|
|
1794
1794
|
tc as Tip,
|
|
1795
|
-
|
|
1795
|
+
mt as TypesText
|
|
1796
1796
|
};
|