@billgangcom/theme-lib 1.70.2 → 1.70.5
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 +8 -8
- package/dist/builder.es.js +1699 -1679
- package/dist/index-Bua5YW4M.cjs +141 -0
- package/dist/{index-DfTsF_tD.js → index-CFTzPE7U.js} +3798 -3720
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/storefront/models/checkout.d.ts +1 -0
- package/dist/storefront/models/order.d.ts +2 -0
- package/dist/ui/GroupCardModal/index.d.ts +1 -0
- package/dist/ui/HeaderButtons/index.d.ts +11 -2
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1137 -1097
- package/package.json +1 -1
- package/dist/index-DNdhMgyN.cjs +0 -141
package/dist/ui.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { j as t, I as b, c as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { j as t, I as b, c as H, d as Nt, e as pt, g as mt, P as gt, S as lt, h as St, D as ft, i as xt, v as _t, B as dt, k as it, a as wt, l as Pt, O as ht, m as Q, n as jt, C as vt, o as F, p as qt, q as At, r as yt, t as Et, w as bt, x as W, L as Dt, y as kt, z as Ct, A as ot, s as at, f as Z, E as Rt, F as D, G as Lt, M as ut, H as Ut, J as ct, K as Tt, N as zt, Q as Mt, T as Ht, U as Bt, V as Ft } from "./index-CFTzPE7U.js";
|
|
2
|
+
import { a3 as Qn, $ as Jn, Z as Kn, a2 as Zn, Y as ti, _ as ei, W as si, X as ni, a0 as ii, a1 as ai } from "./index-CFTzPE7U.js";
|
|
3
|
+
import f from "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
const Vt = "_block_kh9z8_8",
|
|
5
|
+
const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23", Wt = "_alignmentContent_kh9z8_30", Xt = "_alignments_kh9z8_39", Qt = "_alignment_kh9z8_30", Jt = "_circle_kh9z8_64", Kt = "_paddings_kh9z8_71", Zt = "_padding_kh9z8_71", te = "_active_kh9z8_97", Y = {
|
|
6
6
|
block: Vt,
|
|
7
|
-
title:
|
|
8
|
-
subtitle:
|
|
9
|
-
alignmentContent:
|
|
10
|
-
alignments:
|
|
11
|
-
alignment:
|
|
12
|
-
circle:
|
|
13
|
-
paddings:
|
|
14
|
-
padding:
|
|
15
|
-
active:
|
|
16
|
-
},
|
|
7
|
+
title: Yt,
|
|
8
|
+
subtitle: Gt,
|
|
9
|
+
alignmentContent: Wt,
|
|
10
|
+
alignments: Xt,
|
|
11
|
+
alignment: Qt,
|
|
12
|
+
circle: Jt,
|
|
13
|
+
paddings: Kt,
|
|
14
|
+
padding: Zt,
|
|
15
|
+
active: te
|
|
16
|
+
}, ee = [
|
|
17
17
|
"topLeft",
|
|
18
18
|
"top",
|
|
19
19
|
"topRight",
|
|
@@ -23,17 +23,17 @@ const Vt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
|
|
|
23
23
|
"bottomLeft",
|
|
24
24
|
"bottom",
|
|
25
25
|
"bottomRight"
|
|
26
|
-
],
|
|
26
|
+
], se = ["left", "top", "right", "bottom"], On = (u) => {
|
|
27
27
|
const {
|
|
28
|
-
alignment:
|
|
28
|
+
alignment: i,
|
|
29
29
|
padding: a,
|
|
30
30
|
setPadding: s,
|
|
31
31
|
setAlignment: e,
|
|
32
32
|
isAlignment: l = !0,
|
|
33
33
|
isPadding: r = !0
|
|
34
|
-
} =
|
|
35
|
-
function
|
|
36
|
-
switch (
|
|
34
|
+
} = u;
|
|
35
|
+
function g(v) {
|
|
36
|
+
switch (v) {
|
|
37
37
|
case "left":
|
|
38
38
|
case "topLeft":
|
|
39
39
|
case "bottomLeft":
|
|
@@ -50,8 +50,8 @@ const Vt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
|
|
|
50
50
|
return "TextAlignCenter";
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
switch (
|
|
53
|
+
function _(v) {
|
|
54
|
+
switch (v) {
|
|
55
55
|
case "left":
|
|
56
56
|
return "AlignLeft";
|
|
57
57
|
case "right":
|
|
@@ -62,40 +62,40 @@ const Vt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
|
|
|
62
62
|
return "AlignBottom";
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
const [
|
|
65
|
+
const [j, T] = f.useState(null), [x, p] = f.useState(null);
|
|
66
66
|
return /* @__PURE__ */ t.jsxs("div", { className: Y.layout, children: [
|
|
67
67
|
/* @__PURE__ */ t.jsx("h3", { className: Y.title, children: "Layout (for Desktop version)" }),
|
|
68
68
|
/* @__PURE__ */ t.jsxs("div", { className: Y.alignmentContent, children: [
|
|
69
69
|
l && /* @__PURE__ */ t.jsxs("div", { className: Y.block, children: [
|
|
70
70
|
/* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: "Alignment" }),
|
|
71
|
-
/* @__PURE__ */ t.jsx("div", { className: Y.alignments, children:
|
|
71
|
+
/* @__PURE__ */ t.jsx("div", { className: Y.alignments, children: ee.map((v) => /* @__PURE__ */ t.jsxs(
|
|
72
72
|
"div",
|
|
73
73
|
{
|
|
74
74
|
onClick: () => {
|
|
75
|
-
e(
|
|
75
|
+
e(v);
|
|
76
76
|
},
|
|
77
77
|
className: Y.alignment,
|
|
78
78
|
onMouseEnter: () => {
|
|
79
|
-
|
|
79
|
+
T(v);
|
|
80
80
|
},
|
|
81
81
|
onMouseLeave: () => {
|
|
82
|
-
|
|
82
|
+
T(null);
|
|
83
83
|
},
|
|
84
84
|
children: [
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
v !== i && j !== v && /* @__PURE__ */ t.jsx("div", { className: Y.circle }),
|
|
86
|
+
v !== i && j === v && /* @__PURE__ */ t.jsx(
|
|
87
87
|
b,
|
|
88
88
|
{
|
|
89
|
-
name:
|
|
89
|
+
name: g(j),
|
|
90
90
|
fill: "#c2c2c2",
|
|
91
91
|
width: 22,
|
|
92
92
|
height: 22
|
|
93
93
|
}
|
|
94
94
|
),
|
|
95
|
-
|
|
95
|
+
v === i && /* @__PURE__ */ t.jsx(
|
|
96
96
|
b,
|
|
97
97
|
{
|
|
98
|
-
name:
|
|
98
|
+
name: g(i),
|
|
99
99
|
fill: "#FF3F19",
|
|
100
100
|
width: 22,
|
|
101
101
|
height: 22
|
|
@@ -103,40 +103,40 @@ const Vt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
|
|
|
103
103
|
)
|
|
104
104
|
]
|
|
105
105
|
},
|
|
106
|
-
|
|
106
|
+
v
|
|
107
107
|
)) })
|
|
108
108
|
] }),
|
|
109
109
|
r && /* @__PURE__ */ t.jsxs("div", { className: Y.block, children: [
|
|
110
110
|
/* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: "Paddings" }),
|
|
111
|
-
/* @__PURE__ */ t.jsx("div", { className: Y.paddings, children:
|
|
111
|
+
/* @__PURE__ */ t.jsx("div", { className: Y.paddings, children: se.map((v) => /* @__PURE__ */ t.jsxs(
|
|
112
112
|
"label",
|
|
113
113
|
{
|
|
114
|
-
className:
|
|
115
|
-
[Y.active]: x ===
|
|
114
|
+
className: H(Y.padding, {
|
|
115
|
+
[Y.active]: x === v
|
|
116
116
|
}),
|
|
117
117
|
onFocus: () => {
|
|
118
|
-
|
|
118
|
+
p(v);
|
|
119
119
|
},
|
|
120
120
|
onBlur: () => {
|
|
121
|
-
|
|
121
|
+
p(null);
|
|
122
122
|
},
|
|
123
123
|
children: [
|
|
124
124
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
125
125
|
b,
|
|
126
126
|
{
|
|
127
|
-
name:
|
|
127
|
+
name: _(v),
|
|
128
128
|
width: 20,
|
|
129
129
|
height: 20
|
|
130
130
|
}
|
|
131
131
|
) }),
|
|
132
132
|
/* @__PURE__ */ t.jsx(
|
|
133
|
-
|
|
133
|
+
Nt,
|
|
134
134
|
{
|
|
135
135
|
type: "number",
|
|
136
|
-
value: String(a[
|
|
137
|
-
onChange: (
|
|
136
|
+
value: String(a[v]),
|
|
137
|
+
onChange: (c) => s({
|
|
138
138
|
...a,
|
|
139
|
-
[
|
|
139
|
+
[v]: Math.min(Number(c), 999)
|
|
140
140
|
}),
|
|
141
141
|
max: 999,
|
|
142
142
|
paddingless: !0,
|
|
@@ -145,35 +145,35 @@ const Vt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
|
|
|
145
145
|
)
|
|
146
146
|
]
|
|
147
147
|
},
|
|
148
|
-
|
|
148
|
+
v
|
|
149
149
|
)) })
|
|
150
150
|
] })
|
|
151
151
|
] })
|
|
152
152
|
] });
|
|
153
|
-
},
|
|
154
|
-
title:
|
|
155
|
-
subtitle:
|
|
156
|
-
productsBlock:
|
|
157
|
-
top:
|
|
158
|
-
products:
|
|
159
|
-
product:
|
|
160
|
-
button:
|
|
161
|
-
disabled:
|
|
162
|
-
buttons:
|
|
163
|
-
addButton:
|
|
164
|
-
deleteButton:
|
|
153
|
+
}, ne = "_title_82zux_1", ie = "_subtitle_82zux_5", ae = "_productsBlock_82zux_14", oe = "_top_82zux_26", ce = "_products_82zux_14", re = "_product_82zux_14", le = "_button_82zux_80", de = "_disabled_82zux_91", ue = "_buttons_82zux_118", he = "_addButton_82zux_157", pe = "_deleteButton_82zux_179", X = {
|
|
154
|
+
title: ne,
|
|
155
|
+
subtitle: ie,
|
|
156
|
+
productsBlock: ae,
|
|
157
|
+
top: oe,
|
|
158
|
+
products: ce,
|
|
159
|
+
product: re,
|
|
160
|
+
button: le,
|
|
161
|
+
disabled: de,
|
|
162
|
+
buttons: ue,
|
|
163
|
+
addButton: he,
|
|
164
|
+
deleteButton: pe
|
|
165
165
|
};
|
|
166
|
-
function
|
|
166
|
+
function me({ id: u, children: i }) {
|
|
167
167
|
const {
|
|
168
168
|
attributes: a,
|
|
169
169
|
listeners: s,
|
|
170
170
|
setNodeRef: e,
|
|
171
171
|
transform: l,
|
|
172
172
|
transition: r,
|
|
173
|
-
isDragging:
|
|
173
|
+
isDragging: g
|
|
174
174
|
} = jt({
|
|
175
|
-
id:
|
|
176
|
-
}),
|
|
175
|
+
id: u
|
|
176
|
+
}), _ = {
|
|
177
177
|
transform: vt.Transform.toString(l),
|
|
178
178
|
transition: r
|
|
179
179
|
};
|
|
@@ -181,57 +181,57 @@ function he({ id: d, children: n }) {
|
|
|
181
181
|
"div",
|
|
182
182
|
{
|
|
183
183
|
ref: e,
|
|
184
|
-
style:
|
|
185
|
-
className: `${X.product} ${
|
|
184
|
+
style: _,
|
|
185
|
+
className: `${X.product} ${g ? X.dragging : ""}`,
|
|
186
186
|
...a,
|
|
187
187
|
...s,
|
|
188
|
-
children:
|
|
188
|
+
children: i
|
|
189
189
|
}
|
|
190
190
|
);
|
|
191
191
|
}
|
|
192
|
-
const
|
|
192
|
+
const qn = (u) => {
|
|
193
193
|
const {
|
|
194
|
-
isActiveItems:
|
|
194
|
+
isActiveItems: i,
|
|
195
195
|
setIsActiveItems: a,
|
|
196
196
|
items: s,
|
|
197
197
|
setItems: e,
|
|
198
198
|
other: l,
|
|
199
199
|
tags: r,
|
|
200
|
-
title:
|
|
201
|
-
subtitle:
|
|
202
|
-
draggable:
|
|
203
|
-
withImage:
|
|
200
|
+
title: g,
|
|
201
|
+
subtitle: _,
|
|
202
|
+
draggable: j = !1,
|
|
203
|
+
withImage: T = !1,
|
|
204
204
|
addable: x = !0,
|
|
205
|
-
itemsOptions:
|
|
206
|
-
hasRangeSelector:
|
|
207
|
-
rangeSelectorOptions:
|
|
208
|
-
limit:
|
|
209
|
-
autoScrollInterval:
|
|
210
|
-
deletable:
|
|
211
|
-
aspectRatio:
|
|
212
|
-
setAspectRatio:
|
|
213
|
-
} =
|
|
205
|
+
itemsOptions: p,
|
|
206
|
+
hasRangeSelector: v = !1,
|
|
207
|
+
rangeSelectorOptions: c,
|
|
208
|
+
limit: n,
|
|
209
|
+
autoScrollInterval: o,
|
|
210
|
+
deletable: k,
|
|
211
|
+
aspectRatio: y,
|
|
212
|
+
setAspectRatio: M
|
|
213
|
+
} = u, U = pt(
|
|
214
214
|
mt(gt, {
|
|
215
215
|
activationConstraint: {
|
|
216
216
|
distance: 5
|
|
217
217
|
}
|
|
218
218
|
})
|
|
219
|
-
),
|
|
220
|
-
const { active: C, over:
|
|
221
|
-
if (
|
|
222
|
-
const
|
|
223
|
-
if (
|
|
224
|
-
const
|
|
225
|
-
|
|
219
|
+
), R = (h) => {
|
|
220
|
+
const { active: C, over: P } = h;
|
|
221
|
+
if (P && C.id !== P.id) {
|
|
222
|
+
const O = s.findIndex((q) => q === C.id), N = s.findIndex((q) => q === P.id);
|
|
223
|
+
if (O !== -1 && N !== -1) {
|
|
224
|
+
const q = [...s], [I] = q.splice(O, 1);
|
|
225
|
+
q.splice(N, 0, I), e(q);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
|
-
function
|
|
230
|
-
if (
|
|
231
|
-
return
|
|
229
|
+
function J(h) {
|
|
230
|
+
if (T)
|
|
231
|
+
return h ? /* @__PURE__ */ t.jsx(
|
|
232
232
|
"img",
|
|
233
233
|
{
|
|
234
|
-
src: `https://imagedelivery.net/${
|
|
234
|
+
src: `https://imagedelivery.net/${h[0]}/w=1000`,
|
|
235
235
|
alt: "image",
|
|
236
236
|
width: 16,
|
|
237
237
|
height: 16
|
|
@@ -246,11 +246,11 @@ const $n = (d) => {
|
|
|
246
246
|
}
|
|
247
247
|
);
|
|
248
248
|
}
|
|
249
|
-
const m = (
|
|
250
|
-
const
|
|
251
|
-
if (!
|
|
252
|
-
const
|
|
253
|
-
|
|
249
|
+
const m = (h, C = !1) => {
|
|
250
|
+
const P = p.find((N) => N.id === h);
|
|
251
|
+
if (!P) return;
|
|
252
|
+
const O = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
253
|
+
j && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
254
254
|
b,
|
|
255
255
|
{
|
|
256
256
|
name: "DotsSixVertical",
|
|
@@ -262,17 +262,17 @@ const $n = (d) => {
|
|
|
262
262
|
/* @__PURE__ */ t.jsx(
|
|
263
263
|
it,
|
|
264
264
|
{
|
|
265
|
-
onChange: (
|
|
266
|
-
const
|
|
267
|
-
if (!
|
|
268
|
-
const A =
|
|
265
|
+
onChange: (N) => {
|
|
266
|
+
const q = [...s], I = p.find((d) => d.name === N);
|
|
267
|
+
if (!I) return;
|
|
268
|
+
const A = I.id, z = q.map((d) => d === h ? A : d);
|
|
269
269
|
e([...z]);
|
|
270
270
|
},
|
|
271
|
-
value:
|
|
272
|
-
options:
|
|
273
|
-
leftAddonOptions:
|
|
274
|
-
value:
|
|
275
|
-
addon:
|
|
271
|
+
value: P.name,
|
|
272
|
+
options: p.filter((N) => !s.find((q) => q === N.id)).map((N) => N.name),
|
|
273
|
+
leftAddonOptions: p.map((N) => ({
|
|
274
|
+
value: N.name,
|
|
275
|
+
addon: J(N.images)
|
|
276
276
|
}))
|
|
277
277
|
}
|
|
278
278
|
),
|
|
@@ -284,55 +284,55 @@ const $n = (d) => {
|
|
|
284
284
|
width: 20,
|
|
285
285
|
height: 20,
|
|
286
286
|
fill: "#C12A2A",
|
|
287
|
-
onClick: () => e(s.filter((
|
|
287
|
+
onClick: () => e(s.filter((N) => N !== h))
|
|
288
288
|
}
|
|
289
289
|
) }) })
|
|
290
290
|
] });
|
|
291
|
-
return
|
|
292
|
-
|
|
291
|
+
return j ? /* @__PURE__ */ t.jsx(
|
|
292
|
+
me,
|
|
293
293
|
{
|
|
294
|
-
id:
|
|
295
|
-
children:
|
|
294
|
+
id: h,
|
|
295
|
+
children: O
|
|
296
296
|
},
|
|
297
|
-
|
|
297
|
+
Q()
|
|
298
298
|
) : /* @__PURE__ */ t.jsx(
|
|
299
299
|
"div",
|
|
300
300
|
{
|
|
301
301
|
className: X.product,
|
|
302
|
-
children:
|
|
302
|
+
children: O
|
|
303
303
|
},
|
|
304
|
-
|
|
304
|
+
Q()
|
|
305
305
|
);
|
|
306
306
|
};
|
|
307
307
|
return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
|
|
308
|
-
(
|
|
309
|
-
|
|
310
|
-
|
|
308
|
+
(g || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
|
|
309
|
+
g && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: g }),
|
|
310
|
+
i !== void 0 && /* @__PURE__ */ t.jsx(
|
|
311
311
|
lt,
|
|
312
312
|
{
|
|
313
|
-
current:
|
|
314
|
-
onChange: (
|
|
313
|
+
current: i,
|
|
314
|
+
onChange: (h) => a == null ? void 0 : a(h)
|
|
315
315
|
}
|
|
316
316
|
)
|
|
317
317
|
] }),
|
|
318
|
-
|
|
318
|
+
v && c && /* @__PURE__ */ t.jsx(St, { ...c }),
|
|
319
319
|
/* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
|
|
320
|
-
|
|
321
|
-
|
|
320
|
+
_ && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: _ }),
|
|
321
|
+
j ? /* @__PURE__ */ t.jsx(
|
|
322
322
|
ft,
|
|
323
323
|
{
|
|
324
|
-
sensors:
|
|
325
|
-
onDragEnd:
|
|
324
|
+
sensors: U,
|
|
325
|
+
onDragEnd: R,
|
|
326
326
|
children: /* @__PURE__ */ t.jsx(
|
|
327
327
|
xt,
|
|
328
328
|
{
|
|
329
329
|
items: s,
|
|
330
330
|
strategy: _t,
|
|
331
|
-
children: s.map((
|
|
331
|
+
children: s.map((h) => m(h, k))
|
|
332
332
|
}
|
|
333
333
|
)
|
|
334
334
|
}
|
|
335
|
-
) : s.map((
|
|
335
|
+
) : s.map((h) => m(h, k)),
|
|
336
336
|
x && /* @__PURE__ */ t.jsx(
|
|
337
337
|
"div",
|
|
338
338
|
{
|
|
@@ -346,22 +346,22 @@ const $n = (d) => {
|
|
|
346
346
|
dt,
|
|
347
347
|
{
|
|
348
348
|
withoutHover: !0,
|
|
349
|
-
className:
|
|
350
|
-
[X.disabled]: !!(
|
|
349
|
+
className: H(X.button, {
|
|
350
|
+
[X.disabled]: !!(n && n <= s.length || s.length === p.length)
|
|
351
351
|
}),
|
|
352
352
|
size: "s",
|
|
353
|
-
disabled: !!(
|
|
353
|
+
disabled: !!(n && n <= s.length || s.length === p.length),
|
|
354
354
|
onClick: () => {
|
|
355
|
-
const
|
|
355
|
+
const h = [...s];
|
|
356
356
|
let C = null;
|
|
357
|
-
if (
|
|
358
|
-
for (let
|
|
359
|
-
if (!s.find((
|
|
360
|
-
C =
|
|
357
|
+
if (p) {
|
|
358
|
+
for (let P = 0; P < p.length; P++)
|
|
359
|
+
if (!s.find((O) => O === p[P].id)) {
|
|
360
|
+
C = p[P];
|
|
361
361
|
break;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
|
|
364
|
+
h.push((C == null ? void 0 : C.id) || p[0].id), e(h);
|
|
365
365
|
},
|
|
366
366
|
style: {
|
|
367
367
|
width: "fit-content"
|
|
@@ -382,14 +382,14 @@ const $n = (d) => {
|
|
|
382
382
|
}
|
|
383
383
|
)
|
|
384
384
|
] }),
|
|
385
|
-
|
|
385
|
+
y && M && /* @__PURE__ */ t.jsx(
|
|
386
386
|
it,
|
|
387
387
|
{
|
|
388
|
-
value:
|
|
388
|
+
value: y,
|
|
389
389
|
label: "Aspect Ratio",
|
|
390
|
-
options: Object.keys(
|
|
391
|
-
onChange: (
|
|
392
|
-
leftAddonOptions:
|
|
390
|
+
options: Object.keys(Pt),
|
|
391
|
+
onChange: (h) => M(h),
|
|
392
|
+
leftAddonOptions: wt
|
|
393
393
|
}
|
|
394
394
|
),
|
|
395
395
|
r !== void 0 && /* @__PURE__ */ t.jsx(
|
|
@@ -406,13 +406,13 @@ const $n = (d) => {
|
|
|
406
406
|
items: l
|
|
407
407
|
}
|
|
408
408
|
),
|
|
409
|
-
|
|
410
|
-
|
|
409
|
+
o !== void 0 && /* @__PURE__ */ t.jsx(
|
|
410
|
+
Nt,
|
|
411
411
|
{
|
|
412
412
|
label: "Auto scroll interval",
|
|
413
413
|
type: "number",
|
|
414
|
-
value: String(
|
|
415
|
-
onChange: (
|
|
414
|
+
value: String(o.scrollInterval),
|
|
415
|
+
onChange: (h) => o.setScrollInterval(Number(h)),
|
|
416
416
|
min: 0.1,
|
|
417
417
|
max: 100,
|
|
418
418
|
style: {
|
|
@@ -422,30 +422,30 @@ const $n = (d) => {
|
|
|
422
422
|
}
|
|
423
423
|
)
|
|
424
424
|
] });
|
|
425
|
-
},
|
|
426
|
-
title:
|
|
427
|
-
subtitle:
|
|
428
|
-
productsBlock:
|
|
429
|
-
top:
|
|
430
|
-
products:
|
|
431
|
-
product:
|
|
432
|
-
button:
|
|
433
|
-
disabled:
|
|
434
|
-
buttons:
|
|
435
|
-
addButton:
|
|
436
|
-
deleteButton:
|
|
425
|
+
}, ge = "_title_roi3a_1", fe = "_subtitle_roi3a_5", xe = "_productsBlock_roi3a_14", _e = "_top_roi3a_26", je = "_products_roi3a_14", ve = "_product_roi3a_14", ye = "_button_roi3a_80", be = "_disabled_roi3a_91", Ie = "_buttons_roi3a_118", Ne = "_addButton_roi3a_164", ke = "_deleteButton_roi3a_179", V = {
|
|
426
|
+
title: ge,
|
|
427
|
+
subtitle: fe,
|
|
428
|
+
productsBlock: xe,
|
|
429
|
+
top: _e,
|
|
430
|
+
products: je,
|
|
431
|
+
product: ve,
|
|
432
|
+
button: ye,
|
|
433
|
+
disabled: be,
|
|
434
|
+
buttons: Ie,
|
|
435
|
+
addButton: Ne,
|
|
436
|
+
deleteButton: ke
|
|
437
437
|
};
|
|
438
|
-
function
|
|
438
|
+
function Ce({ product: u, children: i }) {
|
|
439
439
|
const {
|
|
440
440
|
attributes: a,
|
|
441
441
|
listeners: s,
|
|
442
442
|
setNodeRef: e,
|
|
443
443
|
transform: l,
|
|
444
444
|
transition: r,
|
|
445
|
-
isDragging:
|
|
445
|
+
isDragging: g
|
|
446
446
|
} = jt({
|
|
447
|
-
id:
|
|
448
|
-
}),
|
|
447
|
+
id: u.id
|
|
448
|
+
}), _ = {
|
|
449
449
|
transform: vt.Transform.toString(l),
|
|
450
450
|
transition: r
|
|
451
451
|
};
|
|
@@ -453,64 +453,64 @@ function Ne({ product: d, children: n }) {
|
|
|
453
453
|
"div",
|
|
454
454
|
{
|
|
455
455
|
ref: e,
|
|
456
|
-
style:
|
|
457
|
-
className: `${
|
|
456
|
+
style: _,
|
|
457
|
+
className: `${V.product} ${g ? V.dragging : ""}`,
|
|
458
458
|
...a,
|
|
459
459
|
...s,
|
|
460
|
-
children:
|
|
460
|
+
children: i
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
|
-
const
|
|
464
|
+
const An = (u) => {
|
|
465
465
|
const {
|
|
466
|
-
isActiveItems:
|
|
466
|
+
isActiveItems: i,
|
|
467
467
|
setIsActiveItems: a,
|
|
468
468
|
items: s,
|
|
469
469
|
setItems: e,
|
|
470
470
|
title: l,
|
|
471
471
|
subtitle: r,
|
|
472
|
-
editable:
|
|
473
|
-
draggable:
|
|
474
|
-
deletable:
|
|
475
|
-
addable:
|
|
472
|
+
editable: g = !0,
|
|
473
|
+
draggable: _ = !1,
|
|
474
|
+
deletable: j = !0,
|
|
475
|
+
addable: T = !0,
|
|
476
476
|
itemsType: x,
|
|
477
|
-
itemsOptions:
|
|
478
|
-
addableOptions:
|
|
479
|
-
limit:
|
|
480
|
-
} =
|
|
477
|
+
itemsOptions: p,
|
|
478
|
+
addableOptions: v = {},
|
|
479
|
+
limit: c
|
|
480
|
+
} = u, [n, o] = f.useState(null), [k, y] = f.useState(null), M = f.useRef(null), U = pt(
|
|
481
481
|
mt(gt, {
|
|
482
482
|
activationConstraint: {
|
|
483
483
|
distance: 5
|
|
484
484
|
}
|
|
485
485
|
})
|
|
486
486
|
);
|
|
487
|
-
|
|
488
|
-
if (
|
|
489
|
-
const
|
|
490
|
-
e(
|
|
487
|
+
f.useEffect(() => {
|
|
488
|
+
if (n) {
|
|
489
|
+
const h = [...s].map((C) => C.id === n.id ? n : C);
|
|
490
|
+
e(h);
|
|
491
491
|
}
|
|
492
|
-
}, [
|
|
493
|
-
|
|
494
|
-
}, [
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
const
|
|
498
|
-
|
|
499
|
-
top:
|
|
500
|
-
left:
|
|
501
|
-
}),
|
|
502
|
-
},
|
|
503
|
-
const { active: C, over:
|
|
504
|
-
if (
|
|
505
|
-
const
|
|
506
|
-
if (
|
|
507
|
-
const
|
|
508
|
-
|
|
492
|
+
}, [n]), f.useEffect(() => {
|
|
493
|
+
M.current && k && (M.current.getBoundingClientRect().height, k.top);
|
|
494
|
+
}, [M.current, k]);
|
|
495
|
+
const R = (h, C) => {
|
|
496
|
+
h.stopPropagation();
|
|
497
|
+
const P = h.target.getBoundingClientRect();
|
|
498
|
+
y({
|
|
499
|
+
top: P.top + window.scrollY,
|
|
500
|
+
left: P.left - 30
|
|
501
|
+
}), o(C);
|
|
502
|
+
}, J = (h) => {
|
|
503
|
+
const { active: C, over: P } = h;
|
|
504
|
+
if (P && C.id !== P.id) {
|
|
505
|
+
const O = s.findIndex((q) => q.id === C.id), N = s.findIndex((q) => q.id === P.id);
|
|
506
|
+
if (O !== -1 && N !== -1) {
|
|
507
|
+
const q = [...s], [I] = q.splice(O, 1);
|
|
508
|
+
q.splice(N, 0, I), e(q);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
}, m = (
|
|
512
|
-
const
|
|
513
|
-
|
|
511
|
+
}, m = (h, C) => {
|
|
512
|
+
const P = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
513
|
+
_ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
514
514
|
b,
|
|
515
515
|
{
|
|
516
516
|
name: "DotsSixVertical",
|
|
@@ -519,41 +519,41 @@ const On = (d) => {
|
|
|
519
519
|
height: 20
|
|
520
520
|
}
|
|
521
521
|
) }),
|
|
522
|
-
x === "select" &&
|
|
522
|
+
x === "select" && p && /* @__PURE__ */ t.jsx(
|
|
523
523
|
it,
|
|
524
524
|
{
|
|
525
|
-
onChange: (
|
|
526
|
-
const
|
|
527
|
-
if (!
|
|
528
|
-
const
|
|
529
|
-
...
|
|
525
|
+
onChange: (O) => {
|
|
526
|
+
const N = [...s], q = p.find((A) => A.name === O);
|
|
527
|
+
if (!q) return;
|
|
528
|
+
const I = N.map((A) => A.id === h.id ? {
|
|
529
|
+
...q,
|
|
530
530
|
name: {
|
|
531
|
-
"en-US":
|
|
531
|
+
"en-US": O
|
|
532
532
|
}
|
|
533
533
|
} : A);
|
|
534
|
-
|
|
535
|
-
...
|
|
534
|
+
o({
|
|
535
|
+
...h,
|
|
536
536
|
name: {
|
|
537
|
-
"en-US":
|
|
537
|
+
"en-US": O
|
|
538
538
|
}
|
|
539
|
-
}), e([...
|
|
539
|
+
}), e([...I]);
|
|
540
540
|
},
|
|
541
|
-
value:
|
|
542
|
-
options:
|
|
541
|
+
value: h.name,
|
|
542
|
+
options: p.filter((O) => !s.find((N) => N.name === O.name)).map((O) => O.name)
|
|
543
543
|
}
|
|
544
544
|
),
|
|
545
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
546
|
-
|
|
545
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
|
|
546
|
+
g && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
547
547
|
b,
|
|
548
548
|
{
|
|
549
549
|
name: "Sliders",
|
|
550
550
|
hoverable: !0,
|
|
551
551
|
width: 20,
|
|
552
552
|
height: 20,
|
|
553
|
-
onClick: (
|
|
553
|
+
onClick: (O) => R(O, h)
|
|
554
554
|
}
|
|
555
555
|
) }),
|
|
556
|
-
|
|
556
|
+
j && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
557
557
|
b,
|
|
558
558
|
{
|
|
559
559
|
name: "Trash",
|
|
@@ -561,57 +561,57 @@ const On = (d) => {
|
|
|
561
561
|
width: 20,
|
|
562
562
|
height: 20,
|
|
563
563
|
fill: "#C12A2A",
|
|
564
|
-
onClick: () => e(s.filter((
|
|
564
|
+
onClick: () => e(s.filter((O) => O.id !== h.id))
|
|
565
565
|
}
|
|
566
566
|
) })
|
|
567
567
|
] })
|
|
568
568
|
] });
|
|
569
|
-
return
|
|
570
|
-
|
|
569
|
+
return _ ? /* @__PURE__ */ t.jsx(
|
|
570
|
+
Ce,
|
|
571
571
|
{
|
|
572
|
-
product:
|
|
572
|
+
product: h,
|
|
573
573
|
index: C,
|
|
574
|
-
children:
|
|
574
|
+
children: P
|
|
575
575
|
},
|
|
576
|
-
|
|
576
|
+
h.id
|
|
577
577
|
) : /* @__PURE__ */ t.jsx(
|
|
578
578
|
"div",
|
|
579
579
|
{
|
|
580
|
-
className:
|
|
581
|
-
children:
|
|
580
|
+
className: V.product,
|
|
581
|
+
children: P
|
|
582
582
|
},
|
|
583
|
-
|
|
583
|
+
h.id
|
|
584
584
|
);
|
|
585
585
|
};
|
|
586
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
587
|
-
(l ||
|
|
588
|
-
l && /* @__PURE__ */ t.jsx("h3", { className:
|
|
589
|
-
|
|
586
|
+
return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
|
|
587
|
+
(l || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
588
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: l }),
|
|
589
|
+
i !== void 0 && /* @__PURE__ */ t.jsx(
|
|
590
590
|
lt,
|
|
591
591
|
{
|
|
592
|
-
current:
|
|
593
|
-
onChange: (
|
|
592
|
+
current: i,
|
|
593
|
+
onChange: (h) => a == null ? void 0 : a(h)
|
|
594
594
|
}
|
|
595
595
|
)
|
|
596
596
|
] }),
|
|
597
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
598
|
-
r && /* @__PURE__ */ t.jsx("h5", { className:
|
|
599
|
-
|
|
597
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
|
|
598
|
+
r && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: r }),
|
|
599
|
+
_ ? /* @__PURE__ */ t.jsx(
|
|
600
600
|
ft,
|
|
601
601
|
{
|
|
602
|
-
sensors:
|
|
603
|
-
onDragEnd:
|
|
602
|
+
sensors: U,
|
|
603
|
+
onDragEnd: J,
|
|
604
604
|
children: /* @__PURE__ */ t.jsx(
|
|
605
605
|
xt,
|
|
606
606
|
{
|
|
607
|
-
items: s.map((
|
|
607
|
+
items: s.map((h) => h.id),
|
|
608
608
|
strategy: _t,
|
|
609
|
-
children: s.map((
|
|
609
|
+
children: s.map((h, C) => m(h, C))
|
|
610
610
|
}
|
|
611
611
|
)
|
|
612
612
|
}
|
|
613
|
-
) : s.map((
|
|
614
|
-
|
|
613
|
+
) : s.map((h, C) => m(h, C)),
|
|
614
|
+
T && /* @__PURE__ */ t.jsx(
|
|
615
615
|
"div",
|
|
616
616
|
{
|
|
617
617
|
style: {
|
|
@@ -623,31 +623,31 @@ const On = (d) => {
|
|
|
623
623
|
dt,
|
|
624
624
|
{
|
|
625
625
|
withoutHover: !0,
|
|
626
|
-
className: V
|
|
627
|
-
[
|
|
626
|
+
className: H(V.button, {
|
|
627
|
+
[V.disabled]: !!(c && c <= s.length || s.length === (p == null ? void 0 : p.length))
|
|
628
628
|
}),
|
|
629
629
|
size: "s",
|
|
630
|
-
disabled: !!(
|
|
630
|
+
disabled: !!(c && c <= s.length || s.length === (p == null ? void 0 : p.length)),
|
|
631
631
|
onClick: () => {
|
|
632
|
-
const
|
|
632
|
+
const h = [...s];
|
|
633
633
|
let C = null;
|
|
634
|
-
if (
|
|
635
|
-
for (let
|
|
636
|
-
if (!s.find((
|
|
637
|
-
C =
|
|
634
|
+
if (p) {
|
|
635
|
+
for (let P = 0; P < p.length; P++)
|
|
636
|
+
if (!s.find((O) => O.id === p[P].id)) {
|
|
637
|
+
C = p[P];
|
|
638
638
|
break;
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
|
-
x === "select" &&
|
|
642
|
-
name: C ? C.name :
|
|
643
|
-
id: (C == null ? void 0 : C.id) ||
|
|
644
|
-
...
|
|
645
|
-
}), e(
|
|
641
|
+
x === "select" && p && h.push({
|
|
642
|
+
name: C ? C.name : p[0].name,
|
|
643
|
+
id: (C == null ? void 0 : C.id) || p[0].id,
|
|
644
|
+
...v
|
|
645
|
+
}), e(h);
|
|
646
646
|
},
|
|
647
647
|
style: {
|
|
648
648
|
width: "fit-content"
|
|
649
649
|
},
|
|
650
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
650
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
|
|
651
651
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
652
652
|
/* @__PURE__ */ t.jsx(
|
|
653
653
|
b,
|
|
@@ -665,98 +665,98 @@ const On = (d) => {
|
|
|
665
665
|
] })
|
|
666
666
|
] });
|
|
667
667
|
};
|
|
668
|
-
function
|
|
669
|
-
const { product:
|
|
670
|
-
id:
|
|
671
|
-
}),
|
|
668
|
+
function Se(u) {
|
|
669
|
+
const { product: i, children: a } = u, { attributes: s, listeners: e, setNodeRef: l, transform: r, transition: g, isDragging: _ } = jt({
|
|
670
|
+
id: i.id
|
|
671
|
+
}), j = {
|
|
672
672
|
transform: vt.Transform.toString(r),
|
|
673
|
-
transition:
|
|
673
|
+
transition: g
|
|
674
674
|
};
|
|
675
675
|
return /* @__PURE__ */ t.jsx(
|
|
676
676
|
"div",
|
|
677
677
|
{
|
|
678
678
|
ref: l,
|
|
679
|
-
style:
|
|
680
|
-
className: `${
|
|
679
|
+
style: j,
|
|
680
|
+
className: `${F.product} ${_ ? F.dragging : ""}`,
|
|
681
681
|
...s,
|
|
682
682
|
...e,
|
|
683
683
|
children: a
|
|
684
684
|
}
|
|
685
685
|
);
|
|
686
686
|
}
|
|
687
|
-
const
|
|
687
|
+
const En = (u) => {
|
|
688
688
|
const {
|
|
689
|
-
isActiveItems:
|
|
689
|
+
isActiveItems: i,
|
|
690
690
|
setIsActiveItems: a,
|
|
691
691
|
items: s,
|
|
692
692
|
setItems: e,
|
|
693
693
|
other: l,
|
|
694
694
|
title: r,
|
|
695
|
-
subtitle:
|
|
696
|
-
editable:
|
|
697
|
-
draggable:
|
|
698
|
-
deletable:
|
|
695
|
+
subtitle: g,
|
|
696
|
+
editable: _ = !0,
|
|
697
|
+
draggable: j = !1,
|
|
698
|
+
deletable: T = !0,
|
|
699
699
|
addable: x = !0,
|
|
700
|
-
itemsType:
|
|
701
|
-
itemsPlaceholder:
|
|
702
|
-
itemsOptions:
|
|
703
|
-
hasRangeSelector:
|
|
704
|
-
rangeSelectorOptions:
|
|
705
|
-
modalOptions:
|
|
706
|
-
addableOptions:
|
|
707
|
-
limit:
|
|
708
|
-
} =
|
|
700
|
+
itemsType: p,
|
|
701
|
+
itemsPlaceholder: v = "",
|
|
702
|
+
itemsOptions: c,
|
|
703
|
+
hasRangeSelector: n = !1,
|
|
704
|
+
rangeSelectorOptions: o,
|
|
705
|
+
modalOptions: k,
|
|
706
|
+
addableOptions: y = {},
|
|
707
|
+
limit: M
|
|
708
|
+
} = u, [U, R] = f.useState(null), [J, m] = f.useState({
|
|
709
709
|
top: 0,
|
|
710
710
|
left: 0
|
|
711
|
-
}), [
|
|
711
|
+
}), [h, C] = f.useState(null), P = f.useRef(null), [O, N] = f.useState(!1), q = pt(
|
|
712
712
|
mt(gt, {
|
|
713
713
|
activationConstraint: {
|
|
714
714
|
distance: 5
|
|
715
715
|
}
|
|
716
716
|
})
|
|
717
717
|
);
|
|
718
|
-
|
|
719
|
-
const
|
|
720
|
-
|
|
718
|
+
f.useEffect(() => {
|
|
719
|
+
const d = () => {
|
|
720
|
+
R(null), N(!1);
|
|
721
721
|
};
|
|
722
|
-
return document.body.addEventListener("click",
|
|
723
|
-
|
|
722
|
+
return document.body.addEventListener("click", d), R(null), N(!1), () => {
|
|
723
|
+
R(null), N(!1), document.body.removeEventListener("click", d);
|
|
724
724
|
};
|
|
725
|
-
}, []),
|
|
726
|
-
if (
|
|
727
|
-
const
|
|
728
|
-
e(
|
|
725
|
+
}, []), f.useEffect(() => {
|
|
726
|
+
if (U) {
|
|
727
|
+
const d = [...s].map(($) => $.id === U.id ? U : $);
|
|
728
|
+
e(d);
|
|
729
729
|
}
|
|
730
|
-
}, [
|
|
731
|
-
if (
|
|
732
|
-
const
|
|
733
|
-
let S =
|
|
734
|
-
S +
|
|
730
|
+
}, [U]), f.useEffect(() => {
|
|
731
|
+
if (P.current && h) {
|
|
732
|
+
const d = P.current.getBoundingClientRect().height, $ = window.innerHeight;
|
|
733
|
+
let S = h.top;
|
|
734
|
+
S + d > $ + window.scrollY - 200 && (S = $ + window.scrollY - d - 200), S < 0 && (S = 10), m({
|
|
735
735
|
top: S,
|
|
736
|
-
left:
|
|
736
|
+
left: h.left
|
|
737
737
|
});
|
|
738
738
|
}
|
|
739
|
-
}, [
|
|
740
|
-
const
|
|
741
|
-
|
|
742
|
-
const S =
|
|
739
|
+
}, [P.current, h]);
|
|
740
|
+
const I = (d, $) => {
|
|
741
|
+
d.stopPropagation();
|
|
742
|
+
const S = d.target.getBoundingClientRect();
|
|
743
743
|
C({
|
|
744
744
|
top: S.top + window.scrollY,
|
|
745
745
|
left: S.left - 30
|
|
746
|
-
}),
|
|
747
|
-
}, A = (
|
|
748
|
-
const { active:
|
|
749
|
-
if (S &&
|
|
750
|
-
const E = s.findIndex((
|
|
746
|
+
}), R($), N(!0);
|
|
747
|
+
}, A = (d) => {
|
|
748
|
+
const { active: $, over: S } = d;
|
|
749
|
+
if (S && $.id !== S.id) {
|
|
750
|
+
const E = s.findIndex((L) => L.id === $.id), et = s.findIndex((L) => L.id === S.id);
|
|
751
751
|
if (E !== -1 && et !== -1) {
|
|
752
|
-
const
|
|
753
|
-
|
|
752
|
+
const L = [...s], [K] = L.splice(E, 1);
|
|
753
|
+
L.splice(et, 0, K), e(L);
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
|
-
}, z = (
|
|
756
|
+
}, z = (d) => {
|
|
757
757
|
var S;
|
|
758
|
-
const
|
|
759
|
-
|
|
758
|
+
const $ = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
759
|
+
j && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
760
760
|
b,
|
|
761
761
|
{
|
|
762
762
|
name: "DotsSixVertical",
|
|
@@ -765,70 +765,70 @@ const An = (d) => {
|
|
|
765
765
|
height: 20
|
|
766
766
|
}
|
|
767
767
|
) }),
|
|
768
|
-
|
|
768
|
+
p === "select" && c && /* @__PURE__ */ t.jsx(
|
|
769
769
|
it,
|
|
770
770
|
{
|
|
771
771
|
onChange: (E) => {
|
|
772
|
-
const
|
|
773
|
-
...
|
|
772
|
+
const L = [...s].map((K) => K.id === d.id ? {
|
|
773
|
+
...d,
|
|
774
774
|
name: {
|
|
775
775
|
"en-US": E
|
|
776
776
|
}
|
|
777
|
-
} :
|
|
778
|
-
|
|
779
|
-
...
|
|
777
|
+
} : K);
|
|
778
|
+
R({
|
|
779
|
+
...d,
|
|
780
780
|
name: {
|
|
781
781
|
"en-US": E
|
|
782
782
|
}
|
|
783
|
-
}), e([...
|
|
783
|
+
}), e([...L]);
|
|
784
784
|
},
|
|
785
|
-
value:
|
|
786
|
-
options:
|
|
785
|
+
value: d.name["en-US"],
|
|
786
|
+
options: c.filter(
|
|
787
787
|
(E) => !s.find((et) => et.name["en-US"] === E)
|
|
788
788
|
)
|
|
789
789
|
}
|
|
790
790
|
),
|
|
791
|
-
|
|
792
|
-
|
|
791
|
+
p === "input" && /* @__PURE__ */ t.jsx(
|
|
792
|
+
Nt,
|
|
793
793
|
{
|
|
794
794
|
onChange: (E) => {
|
|
795
|
-
const
|
|
796
|
-
...
|
|
795
|
+
const L = [...s].map((K) => K.id === d.id ? {
|
|
796
|
+
...d,
|
|
797
797
|
name: {
|
|
798
798
|
"en-US": E
|
|
799
799
|
}
|
|
800
|
-
} :
|
|
801
|
-
e([...
|
|
800
|
+
} : K);
|
|
801
|
+
e([...L]);
|
|
802
802
|
},
|
|
803
|
-
value:
|
|
804
|
-
placeholder:
|
|
803
|
+
value: d.name["en-US"],
|
|
804
|
+
placeholder: v
|
|
805
805
|
}
|
|
806
806
|
),
|
|
807
|
-
|
|
808
|
-
|
|
807
|
+
p === "image" && /* @__PURE__ */ t.jsx(
|
|
808
|
+
At,
|
|
809
809
|
{
|
|
810
810
|
onChange: (E) => {
|
|
811
|
-
const
|
|
812
|
-
...
|
|
811
|
+
const L = [...s].map((K) => K.id === d.id ? {
|
|
812
|
+
...d,
|
|
813
813
|
images: E
|
|
814
|
-
} :
|
|
815
|
-
e([...
|
|
814
|
+
} : K);
|
|
815
|
+
e([...L]);
|
|
816
816
|
},
|
|
817
|
-
activeImage: (S = s.find((E) => E.id ===
|
|
817
|
+
activeImage: (S = s.find((E) => E.id === d.id)) == null ? void 0 : S.images[0]
|
|
818
818
|
}
|
|
819
819
|
),
|
|
820
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
821
|
-
|
|
820
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
|
|
821
|
+
_ && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
822
822
|
b,
|
|
823
823
|
{
|
|
824
824
|
name: "Sliders",
|
|
825
825
|
hoverable: !0,
|
|
826
826
|
width: 20,
|
|
827
827
|
height: 20,
|
|
828
|
-
onClick: (E) =>
|
|
828
|
+
onClick: (E) => I(E, d)
|
|
829
829
|
}
|
|
830
830
|
) }),
|
|
831
|
-
|
|
831
|
+
T && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
832
832
|
b,
|
|
833
833
|
{
|
|
834
834
|
name: "Trash",
|
|
@@ -836,67 +836,67 @@ const An = (d) => {
|
|
|
836
836
|
width: 20,
|
|
837
837
|
height: 20,
|
|
838
838
|
fill: "#C12A2A",
|
|
839
|
-
onClick: () => e(s.filter((E) => E.id !==
|
|
839
|
+
onClick: () => e(s.filter((E) => E.id !== d.id))
|
|
840
840
|
}
|
|
841
841
|
) })
|
|
842
842
|
] })
|
|
843
843
|
] });
|
|
844
|
-
return
|
|
845
|
-
|
|
844
|
+
return j ? /* @__PURE__ */ t.jsx(
|
|
845
|
+
Se,
|
|
846
846
|
{
|
|
847
|
-
product:
|
|
848
|
-
children:
|
|
847
|
+
product: d,
|
|
848
|
+
children: $
|
|
849
849
|
},
|
|
850
|
-
|
|
850
|
+
d.id
|
|
851
851
|
) : /* @__PURE__ */ t.jsx(
|
|
852
852
|
"div",
|
|
853
853
|
{
|
|
854
|
-
className:
|
|
855
|
-
children:
|
|
854
|
+
className: F.product,
|
|
855
|
+
children: $
|
|
856
856
|
},
|
|
857
|
-
|
|
857
|
+
d.id
|
|
858
858
|
);
|
|
859
859
|
};
|
|
860
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
861
|
-
(r ||
|
|
862
|
-
r && /* @__PURE__ */ t.jsx("h3", { className:
|
|
863
|
-
|
|
860
|
+
return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
|
|
861
|
+
(r || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
|
|
862
|
+
r && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: r }),
|
|
863
|
+
i !== void 0 && /* @__PURE__ */ t.jsx(
|
|
864
864
|
lt,
|
|
865
865
|
{
|
|
866
|
-
current:
|
|
867
|
-
onChange: (
|
|
866
|
+
current: i,
|
|
867
|
+
onChange: (d) => a == null ? void 0 : a(d)
|
|
868
868
|
}
|
|
869
869
|
)
|
|
870
870
|
] }),
|
|
871
|
-
|
|
872
|
-
|
|
871
|
+
U && _ && k && O && /* @__PURE__ */ t.jsx(
|
|
872
|
+
qt,
|
|
873
873
|
{
|
|
874
|
-
ref:
|
|
875
|
-
activeItem:
|
|
876
|
-
setActiveItem:
|
|
877
|
-
popupPosition:
|
|
878
|
-
modalOptions:
|
|
879
|
-
setIsOpenModal:
|
|
874
|
+
ref: P,
|
|
875
|
+
activeItem: U,
|
|
876
|
+
setActiveItem: R,
|
|
877
|
+
popupPosition: J,
|
|
878
|
+
modalOptions: k,
|
|
879
|
+
setIsOpenModal: N
|
|
880
880
|
}
|
|
881
881
|
),
|
|
882
|
-
|
|
883
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
884
|
-
|
|
885
|
-
|
|
882
|
+
n && o && /* @__PURE__ */ t.jsx(St, { ...o }),
|
|
883
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
|
|
884
|
+
g && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: g }),
|
|
885
|
+
j ? /* @__PURE__ */ t.jsx(
|
|
886
886
|
ft,
|
|
887
887
|
{
|
|
888
|
-
sensors:
|
|
888
|
+
sensors: q,
|
|
889
889
|
onDragEnd: A,
|
|
890
890
|
children: /* @__PURE__ */ t.jsx(
|
|
891
891
|
xt,
|
|
892
892
|
{
|
|
893
|
-
items: s.map((
|
|
893
|
+
items: s.map((d) => d.id),
|
|
894
894
|
strategy: _t,
|
|
895
|
-
children: s.map((
|
|
895
|
+
children: s.map((d) => z(d))
|
|
896
896
|
}
|
|
897
897
|
)
|
|
898
898
|
}
|
|
899
|
-
) : s.map((
|
|
899
|
+
) : s.map((d) => z(d)),
|
|
900
900
|
x && /* @__PURE__ */ t.jsx(
|
|
901
901
|
"div",
|
|
902
902
|
{
|
|
@@ -909,49 +909,49 @@ const An = (d) => {
|
|
|
909
909
|
dt,
|
|
910
910
|
{
|
|
911
911
|
withoutHover: !0,
|
|
912
|
-
className:
|
|
913
|
-
[
|
|
912
|
+
className: H(F.button, {
|
|
913
|
+
[F.disabled]: !!(M && M <= s.length)
|
|
914
914
|
}),
|
|
915
915
|
size: "s",
|
|
916
|
-
disabled: !!(
|
|
916
|
+
disabled: !!(M && M <= s.length),
|
|
917
917
|
onClick: () => {
|
|
918
|
-
const
|
|
919
|
-
let
|
|
920
|
-
if (
|
|
921
|
-
for (let S = 0; S <
|
|
922
|
-
if (!s.find((E) => E.name["en-US"] ===
|
|
923
|
-
|
|
918
|
+
const d = [...s];
|
|
919
|
+
let $ = null;
|
|
920
|
+
if (c) {
|
|
921
|
+
for (let S = 0; S < c.length; S++)
|
|
922
|
+
if (!s.find((E) => E.name["en-US"] === c[S])) {
|
|
923
|
+
$ = c[S];
|
|
924
924
|
break;
|
|
925
925
|
}
|
|
926
926
|
}
|
|
927
|
-
|
|
927
|
+
p === "select" && c ? d.push({
|
|
928
928
|
name: {
|
|
929
|
-
"en-US":
|
|
929
|
+
"en-US": $ || c[0]
|
|
930
930
|
},
|
|
931
|
-
id:
|
|
932
|
-
...
|
|
931
|
+
id: Q(),
|
|
932
|
+
...y,
|
|
933
933
|
maxSymbols: 100
|
|
934
934
|
// пример значения
|
|
935
|
-
}) :
|
|
935
|
+
}) : p === "input" ? d.push({
|
|
936
936
|
name: {
|
|
937
937
|
"en-US": ""
|
|
938
938
|
},
|
|
939
|
-
id:
|
|
940
|
-
...
|
|
939
|
+
id: Q(),
|
|
940
|
+
...y,
|
|
941
941
|
maxSymbols: 100
|
|
942
|
-
}) :
|
|
942
|
+
}) : d.push({
|
|
943
943
|
name: {
|
|
944
944
|
"en-US": `Image ${s.length + 1}`
|
|
945
945
|
},
|
|
946
|
-
id:
|
|
947
|
-
...
|
|
946
|
+
id: Q(),
|
|
947
|
+
...y,
|
|
948
948
|
maxSymbols: 100
|
|
949
|
-
}), e(
|
|
949
|
+
}), e(d);
|
|
950
950
|
},
|
|
951
951
|
style: {
|
|
952
952
|
width: "fit-content"
|
|
953
953
|
},
|
|
954
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
954
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
|
|
955
955
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
956
956
|
/* @__PURE__ */ t.jsx(
|
|
957
957
|
b,
|
|
@@ -975,52 +975,52 @@ const An = (d) => {
|
|
|
975
975
|
}
|
|
976
976
|
)
|
|
977
977
|
] });
|
|
978
|
-
},
|
|
979
|
-
subtitle:
|
|
980
|
-
products:
|
|
981
|
-
product:
|
|
982
|
-
button:
|
|
983
|
-
buttons:
|
|
984
|
-
addButton:
|
|
985
|
-
deleteButton:
|
|
986
|
-
}, qe = (
|
|
987
|
-
const { buttons:
|
|
978
|
+
}, we = "_subtitle_jql1y_1", Pe = "_products_jql1y_10", Te = "_product_jql1y_10", Me = "_button_jql1y_11", Be = "_buttons_jql1y_11", $e = "_addButton_jql1y_150", Oe = "_deleteButton_jql1y_165", st = {
|
|
979
|
+
subtitle: we,
|
|
980
|
+
products: Pe,
|
|
981
|
+
product: Te,
|
|
982
|
+
button: Me,
|
|
983
|
+
buttons: Be,
|
|
984
|
+
addButton: $e,
|
|
985
|
+
deleteButton: Oe
|
|
986
|
+
}, qe = (u) => {
|
|
987
|
+
const { buttons: i, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: l = !0 } = u, { pages: r } = yt(), [g, _] = f.useState(null), [j, T] = f.useState({
|
|
988
988
|
top: 0,
|
|
989
989
|
left: 0
|
|
990
|
-
}), [x,
|
|
991
|
-
|
|
992
|
-
if (
|
|
993
|
-
const
|
|
994
|
-
a(
|
|
990
|
+
}), [x, p] = f.useState(null), v = f.useRef(null);
|
|
991
|
+
f.useEffect(() => {
|
|
992
|
+
if (g) {
|
|
993
|
+
const o = [...i].map((k) => k.id === g.id ? g : k);
|
|
994
|
+
a(o);
|
|
995
995
|
}
|
|
996
|
-
}, [
|
|
997
|
-
if (
|
|
998
|
-
const
|
|
999
|
-
let
|
|
1000
|
-
|
|
1001
|
-
top:
|
|
996
|
+
}, [g]), f.useEffect(() => {
|
|
997
|
+
if (v.current && x) {
|
|
998
|
+
const o = v.current.getBoundingClientRect().height, k = window.innerHeight;
|
|
999
|
+
let y = x.top;
|
|
1000
|
+
y + o > k + window.scrollY - 200 && (y = k + window.scrollY - o - 200), y < 0 && (y = 10), T({
|
|
1001
|
+
top: y,
|
|
1002
1002
|
left: x.left
|
|
1003
1003
|
});
|
|
1004
1004
|
}
|
|
1005
|
-
}, [
|
|
1006
|
-
const
|
|
1007
|
-
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1010
|
-
top:
|
|
1011
|
-
left:
|
|
1012
|
-
}),
|
|
1013
|
-
},
|
|
1014
|
-
const
|
|
1015
|
-
...
|
|
1005
|
+
}, [v.current, x]);
|
|
1006
|
+
const c = (o, k) => {
|
|
1007
|
+
o.stopPropagation();
|
|
1008
|
+
const y = o.target.getBoundingClientRect();
|
|
1009
|
+
p({
|
|
1010
|
+
top: y.top + window.scrollY - 70,
|
|
1011
|
+
left: y.left - (e ? 30 : 65)
|
|
1012
|
+
}), _(k);
|
|
1013
|
+
}, n = (o, k) => {
|
|
1014
|
+
const y = [...i], M = {
|
|
1015
|
+
...o,
|
|
1016
1016
|
id: Math.random().toString(36).substr(2, 9)
|
|
1017
1017
|
// Генерируем новый уникальный ID
|
|
1018
1018
|
};
|
|
1019
|
-
|
|
1019
|
+
y.splice(k + 1, 0, M), a(y);
|
|
1020
1020
|
};
|
|
1021
1021
|
return /* @__PURE__ */ t.jsxs("div", { className: st.products, children: [
|
|
1022
1022
|
/* @__PURE__ */ t.jsx("h5", { className: st.subtitle, children: "Button Type" }),
|
|
1023
|
-
|
|
1023
|
+
i.map((o, k) => /* @__PURE__ */ t.jsxs(
|
|
1024
1024
|
"div",
|
|
1025
1025
|
{
|
|
1026
1026
|
className: st.product,
|
|
@@ -1028,14 +1028,14 @@ const An = (d) => {
|
|
|
1028
1028
|
/* @__PURE__ */ t.jsx(
|
|
1029
1029
|
it,
|
|
1030
1030
|
{
|
|
1031
|
-
onChange: (
|
|
1032
|
-
const
|
|
1033
|
-
...
|
|
1034
|
-
type:
|
|
1035
|
-
} :
|
|
1036
|
-
a(
|
|
1031
|
+
onChange: (y) => {
|
|
1032
|
+
const U = [...i].map((R) => R.id === o.id ? {
|
|
1033
|
+
...o,
|
|
1034
|
+
type: y
|
|
1035
|
+
} : R);
|
|
1036
|
+
a(U);
|
|
1037
1037
|
},
|
|
1038
|
-
value:
|
|
1038
|
+
value: o.type,
|
|
1039
1039
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
1040
1040
|
}
|
|
1041
1041
|
),
|
|
@@ -1048,7 +1048,7 @@ const An = (d) => {
|
|
|
1048
1048
|
width: 20,
|
|
1049
1049
|
height: 20,
|
|
1050
1050
|
onClick: () => {
|
|
1051
|
-
|
|
1051
|
+
n(o, k);
|
|
1052
1052
|
}
|
|
1053
1053
|
}
|
|
1054
1054
|
) }),
|
|
@@ -1059,8 +1059,8 @@ const An = (d) => {
|
|
|
1059
1059
|
hoverable: !0,
|
|
1060
1060
|
width: 20,
|
|
1061
1061
|
height: 20,
|
|
1062
|
-
onClick: (
|
|
1063
|
-
|
|
1062
|
+
onClick: (y) => {
|
|
1063
|
+
c(y, o);
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
1066
|
) }),
|
|
@@ -1070,8 +1070,8 @@ const An = (d) => {
|
|
|
1070
1070
|
name: "Trash",
|
|
1071
1071
|
hoverable: !0,
|
|
1072
1072
|
onClick: () => {
|
|
1073
|
-
const
|
|
1074
|
-
a(
|
|
1073
|
+
const y = i.filter((M) => M.id !== o.id);
|
|
1074
|
+
a(y);
|
|
1075
1075
|
},
|
|
1076
1076
|
width: 20,
|
|
1077
1077
|
height: 20,
|
|
@@ -1081,15 +1081,15 @@ const An = (d) => {
|
|
|
1081
1081
|
] })
|
|
1082
1082
|
]
|
|
1083
1083
|
},
|
|
1084
|
-
|
|
1084
|
+
o.id
|
|
1085
1085
|
)),
|
|
1086
|
-
|
|
1087
|
-
|
|
1086
|
+
g && /* @__PURE__ */ t.jsx(
|
|
1087
|
+
Et,
|
|
1088
1088
|
{
|
|
1089
|
-
ref:
|
|
1090
|
-
activeButton:
|
|
1091
|
-
setActiveButton:
|
|
1092
|
-
popupPosition:
|
|
1089
|
+
ref: v,
|
|
1090
|
+
activeButton: g,
|
|
1091
|
+
setActiveButton: _,
|
|
1092
|
+
popupPosition: j,
|
|
1093
1093
|
editableLink: l
|
|
1094
1094
|
}
|
|
1095
1095
|
),
|
|
@@ -1108,10 +1108,10 @@ const An = (d) => {
|
|
|
1108
1108
|
className: st.button,
|
|
1109
1109
|
size: "s",
|
|
1110
1110
|
onClick: () => {
|
|
1111
|
-
const
|
|
1112
|
-
l ?
|
|
1111
|
+
const o = [...i];
|
|
1112
|
+
l ? o.push({
|
|
1113
1113
|
type: "Primary",
|
|
1114
|
-
id:
|
|
1114
|
+
id: Q(),
|
|
1115
1115
|
typesText: [],
|
|
1116
1116
|
text: {
|
|
1117
1117
|
"en-US": "Button Name"
|
|
@@ -1119,9 +1119,9 @@ const An = (d) => {
|
|
|
1119
1119
|
destination: "Go to Page",
|
|
1120
1120
|
page: r ? Object.values(r)[0].path : "/",
|
|
1121
1121
|
openInNewTab: !1
|
|
1122
|
-
}) :
|
|
1122
|
+
}) : o.push({
|
|
1123
1123
|
type: "Primary",
|
|
1124
|
-
id:
|
|
1124
|
+
id: Q(),
|
|
1125
1125
|
typesText: [],
|
|
1126
1126
|
text: {
|
|
1127
1127
|
"en-US": "Create Ticket"
|
|
@@ -1129,7 +1129,7 @@ const An = (d) => {
|
|
|
1129
1129
|
destination: "Go to Page",
|
|
1130
1130
|
page: r ? Object.values(r)[0].path : "/",
|
|
1131
1131
|
openInNewTab: !1
|
|
1132
|
-
}), a(
|
|
1132
|
+
}), a(o);
|
|
1133
1133
|
},
|
|
1134
1134
|
style: {
|
|
1135
1135
|
width: "fit-content"
|
|
@@ -1150,117 +1150,117 @@ const An = (d) => {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
)
|
|
1152
1152
|
] });
|
|
1153
|
-
},
|
|
1153
|
+
}, Dn = (u) => {
|
|
1154
1154
|
const {
|
|
1155
|
-
isActiveButtons:
|
|
1155
|
+
isActiveButtons: i,
|
|
1156
1156
|
setIsActiveButtons: a,
|
|
1157
1157
|
buttons: s,
|
|
1158
1158
|
setButtons: e,
|
|
1159
1159
|
editableLink: l = !0,
|
|
1160
1160
|
addable: r = !0,
|
|
1161
|
-
deletable:
|
|
1162
|
-
} =
|
|
1163
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1164
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1165
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1161
|
+
deletable: g = !0
|
|
1162
|
+
} = u;
|
|
1163
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: bt.buttonsBlock, children: [
|
|
1164
|
+
/* @__PURE__ */ t.jsxs("div", { className: bt.top, children: [
|
|
1165
|
+
/* @__PURE__ */ t.jsx("h3", { className: bt.title, children: "Buttons" }),
|
|
1166
1166
|
/* @__PURE__ */ t.jsx(
|
|
1167
1167
|
lt,
|
|
1168
1168
|
{
|
|
1169
|
-
current:
|
|
1170
|
-
onChange: (
|
|
1169
|
+
current: i,
|
|
1170
|
+
onChange: (_) => a(_)
|
|
1171
1171
|
}
|
|
1172
1172
|
)
|
|
1173
1173
|
] }),
|
|
1174
|
-
|
|
1174
|
+
i && /* @__PURE__ */ t.jsx(
|
|
1175
1175
|
qe,
|
|
1176
1176
|
{
|
|
1177
1177
|
buttons: s,
|
|
1178
1178
|
setButtons: e,
|
|
1179
1179
|
editableLink: l,
|
|
1180
1180
|
addable: r,
|
|
1181
|
-
deletable:
|
|
1181
|
+
deletable: g
|
|
1182
1182
|
}
|
|
1183
1183
|
)
|
|
1184
1184
|
] }) });
|
|
1185
1185
|
};
|
|
1186
|
-
function
|
|
1187
|
-
const { product:
|
|
1188
|
-
id: String(
|
|
1189
|
-
}),
|
|
1186
|
+
function Ae(u) {
|
|
1187
|
+
const { product: i, children: a } = u, { attributes: s, listeners: e, setNodeRef: l, transform: r, transition: g, isDragging: _ } = jt({
|
|
1188
|
+
id: String(i.listingId)
|
|
1189
|
+
}), j = {
|
|
1190
1190
|
transform: vt.Transform.toString(r),
|
|
1191
|
-
transition:
|
|
1191
|
+
transition: g
|
|
1192
1192
|
};
|
|
1193
1193
|
return /* @__PURE__ */ t.jsx(
|
|
1194
1194
|
"div",
|
|
1195
1195
|
{
|
|
1196
1196
|
ref: l,
|
|
1197
|
-
style:
|
|
1198
|
-
className: `${
|
|
1197
|
+
style: j,
|
|
1198
|
+
className: `${W.product} ${_ ? W.dragging : ""}`,
|
|
1199
1199
|
...s,
|
|
1200
1200
|
...e,
|
|
1201
1201
|
children: a
|
|
1202
1202
|
}
|
|
1203
1203
|
);
|
|
1204
1204
|
}
|
|
1205
|
-
const
|
|
1205
|
+
const Rn = (u) => {
|
|
1206
1206
|
const {
|
|
1207
|
-
isActiveItems:
|
|
1207
|
+
isActiveItems: i,
|
|
1208
1208
|
setIsActiveItems: a,
|
|
1209
1209
|
items: s,
|
|
1210
1210
|
setItems: e,
|
|
1211
1211
|
other: l,
|
|
1212
1212
|
title: r,
|
|
1213
|
-
subtitle:
|
|
1214
|
-
editable:
|
|
1215
|
-
draggable:
|
|
1216
|
-
withImage:
|
|
1213
|
+
subtitle: g,
|
|
1214
|
+
editable: _ = !0,
|
|
1215
|
+
draggable: j = !1,
|
|
1216
|
+
withImage: T = !1,
|
|
1217
1217
|
deletable: x = !0,
|
|
1218
|
-
addable:
|
|
1219
|
-
itemsType:
|
|
1220
|
-
itemsOptions:
|
|
1221
|
-
limit:
|
|
1222
|
-
aspectRatio:
|
|
1223
|
-
setAspectRatio:
|
|
1224
|
-
} =
|
|
1218
|
+
addable: p = !0,
|
|
1219
|
+
itemsType: v,
|
|
1220
|
+
itemsOptions: c,
|
|
1221
|
+
limit: n,
|
|
1222
|
+
aspectRatio: o,
|
|
1223
|
+
setAspectRatio: k
|
|
1224
|
+
} = u, [y, M] = f.useState(
|
|
1225
1225
|
null
|
|
1226
|
-
), [
|
|
1226
|
+
), [U, R] = f.useState({
|
|
1227
1227
|
top: 0,
|
|
1228
1228
|
left: 0
|
|
1229
|
-
}), [
|
|
1229
|
+
}), [J, m] = f.useState(!1), h = pt(
|
|
1230
1230
|
mt(gt, {
|
|
1231
1231
|
activationConstraint: {
|
|
1232
1232
|
distance: 5
|
|
1233
1233
|
}
|
|
1234
1234
|
})
|
|
1235
1235
|
);
|
|
1236
|
-
|
|
1237
|
-
const
|
|
1238
|
-
|
|
1236
|
+
f.useEffect(() => {
|
|
1237
|
+
const I = () => {
|
|
1238
|
+
M(null), m(!1);
|
|
1239
1239
|
};
|
|
1240
|
-
return document.body.addEventListener("click",
|
|
1241
|
-
|
|
1240
|
+
return document.body.addEventListener("click", I), M(null), m(!1), () => {
|
|
1241
|
+
M(null), m(!1), document.body.removeEventListener("click", I);
|
|
1242
1242
|
};
|
|
1243
|
-
}, []),
|
|
1244
|
-
if (
|
|
1245
|
-
const
|
|
1246
|
-
e(
|
|
1243
|
+
}, []), f.useEffect(() => {
|
|
1244
|
+
if (y) {
|
|
1245
|
+
const I = [...s].map((A) => A.listingId === y.listingId ? y : A);
|
|
1246
|
+
e(I);
|
|
1247
1247
|
}
|
|
1248
|
-
}, [
|
|
1249
|
-
const C = (
|
|
1250
|
-
|
|
1251
|
-
const z =
|
|
1248
|
+
}, [y]);
|
|
1249
|
+
const C = (I, A) => {
|
|
1250
|
+
I.stopPropagation();
|
|
1251
|
+
const z = I.target.getBoundingClientRect(), d = 100, $ = window.innerHeight;
|
|
1252
1252
|
let S = z.top + window.scrollY;
|
|
1253
|
-
S +
|
|
1253
|
+
S + d > $ && (S = $ - d - 20), m(!0), R({
|
|
1254
1254
|
top: S - 80,
|
|
1255
1255
|
left: z.left - 30
|
|
1256
|
-
}),
|
|
1256
|
+
}), M(A);
|
|
1257
1257
|
};
|
|
1258
|
-
function
|
|
1259
|
-
if (
|
|
1260
|
-
return
|
|
1258
|
+
function P(I) {
|
|
1259
|
+
if (T)
|
|
1260
|
+
return I ? /* @__PURE__ */ t.jsx(
|
|
1261
1261
|
"img",
|
|
1262
1262
|
{
|
|
1263
|
-
src: `https://imagedelivery.net/${
|
|
1263
|
+
src: `https://imagedelivery.net/${I}/w=1000`,
|
|
1264
1264
|
alt: "image",
|
|
1265
1265
|
width: 16,
|
|
1266
1266
|
height: 16
|
|
@@ -1275,20 +1275,20 @@ const Dn = (d) => {
|
|
|
1275
1275
|
}
|
|
1276
1276
|
);
|
|
1277
1277
|
}
|
|
1278
|
-
const
|
|
1279
|
-
const { active: A, over: z } =
|
|
1278
|
+
const O = (I) => {
|
|
1279
|
+
const { active: A, over: z } = I;
|
|
1280
1280
|
if (z && A.id !== z.id) {
|
|
1281
|
-
const
|
|
1282
|
-
if (
|
|
1283
|
-
const S = [...s], [E] = S.splice(
|
|
1284
|
-
S.splice(
|
|
1281
|
+
const d = s.findIndex((S) => String(S.listingId) === A.id), $ = s.findIndex((S) => String(S.listingId) === z.id);
|
|
1282
|
+
if (d !== -1 && $ !== -1) {
|
|
1283
|
+
const S = [...s], [E] = S.splice(d, 1);
|
|
1284
|
+
S.splice($, 0, E), e(S);
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
1287
|
-
},
|
|
1288
|
-
const A =
|
|
1287
|
+
}, N = (I) => {
|
|
1288
|
+
const A = c.find((d) => I.listingId === d.id);
|
|
1289
1289
|
if (!A) return null;
|
|
1290
1290
|
const z = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1291
|
-
|
|
1291
|
+
j && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1292
1292
|
b,
|
|
1293
1293
|
{
|
|
1294
1294
|
name: "DotsSixVertical",
|
|
@@ -1297,43 +1297,43 @@ const Dn = (d) => {
|
|
|
1297
1297
|
height: 20
|
|
1298
1298
|
}
|
|
1299
1299
|
) }),
|
|
1300
|
-
|
|
1300
|
+
v === "select" && /* @__PURE__ */ t.jsx(
|
|
1301
1301
|
it,
|
|
1302
1302
|
{
|
|
1303
|
-
onChange: (
|
|
1304
|
-
const
|
|
1303
|
+
onChange: (d) => {
|
|
1304
|
+
const $ = [...s], S = c.find((L) => L.productData.name === d);
|
|
1305
1305
|
if (!S) return;
|
|
1306
1306
|
const E = {
|
|
1307
1307
|
listingId: S.id,
|
|
1308
1308
|
image: S.productData.images.length > 0 ? S.productData.images[0].cfId : ""
|
|
1309
|
-
}, et =
|
|
1310
|
-
|
|
1309
|
+
}, et = $.map((L) => L.listingId === I.listingId ? E : L);
|
|
1310
|
+
M(E), e([...et]);
|
|
1311
1311
|
},
|
|
1312
1312
|
value: A.productData.name,
|
|
1313
1313
|
options: [
|
|
1314
|
-
...
|
|
1314
|
+
...c.filter((d) => !s.find(($) => $.listingId === d.id)).map((d) => d.productData.name)
|
|
1315
1315
|
],
|
|
1316
|
-
leftAddonOptions:
|
|
1317
|
-
var
|
|
1316
|
+
leftAddonOptions: c.map((d) => {
|
|
1317
|
+
var $;
|
|
1318
1318
|
return {
|
|
1319
|
-
value:
|
|
1320
|
-
addon:
|
|
1319
|
+
value: d.productData.name,
|
|
1320
|
+
addon: P((($ = d.productData.images[0]) == null ? void 0 : $.cfId) || "")
|
|
1321
1321
|
};
|
|
1322
1322
|
})
|
|
1323
1323
|
}
|
|
1324
1324
|
),
|
|
1325
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1326
|
-
|
|
1325
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.buttons, children: [
|
|
1326
|
+
_ && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1327
1327
|
b,
|
|
1328
1328
|
{
|
|
1329
1329
|
name: "Sliders",
|
|
1330
1330
|
hoverable: !0,
|
|
1331
1331
|
width: 20,
|
|
1332
1332
|
height: 20,
|
|
1333
|
-
onClick: (
|
|
1333
|
+
onClick: (d) => C(d, I)
|
|
1334
1334
|
}
|
|
1335
1335
|
) }),
|
|
1336
|
-
x && /* @__PURE__ */ t.jsx("div", { className:
|
|
1336
|
+
x && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1337
1337
|
b,
|
|
1338
1338
|
{
|
|
1339
1339
|
name: "Trash",
|
|
@@ -1341,67 +1341,67 @@ const Dn = (d) => {
|
|
|
1341
1341
|
width: 20,
|
|
1342
1342
|
height: 20,
|
|
1343
1343
|
fill: "#C12A2A",
|
|
1344
|
-
onClick: () => e(s.filter((
|
|
1344
|
+
onClick: () => e(s.filter((d) => d !== I))
|
|
1345
1345
|
}
|
|
1346
1346
|
) })
|
|
1347
1347
|
] })
|
|
1348
1348
|
] });
|
|
1349
|
-
return
|
|
1350
|
-
|
|
1349
|
+
return j ? /* @__PURE__ */ t.jsx(
|
|
1350
|
+
Ae,
|
|
1351
1351
|
{
|
|
1352
|
-
product:
|
|
1352
|
+
product: I,
|
|
1353
1353
|
children: z
|
|
1354
1354
|
},
|
|
1355
|
-
|
|
1355
|
+
I.listingId
|
|
1356
1356
|
) : /* @__PURE__ */ t.jsx(
|
|
1357
1357
|
"div",
|
|
1358
1358
|
{
|
|
1359
|
-
className:
|
|
1359
|
+
className: W.product,
|
|
1360
1360
|
children: z
|
|
1361
1361
|
},
|
|
1362
|
-
|
|
1362
|
+
I.listingId
|
|
1363
1363
|
);
|
|
1364
|
-
},
|
|
1365
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1366
|
-
(r ||
|
|
1367
|
-
r && /* @__PURE__ */ t.jsx("h3", { className:
|
|
1368
|
-
|
|
1364
|
+
}, q = f.useRef(null);
|
|
1365
|
+
return /* @__PURE__ */ t.jsxs("div", { className: W.productsBlock, children: [
|
|
1366
|
+
(r || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: W.top, children: [
|
|
1367
|
+
r && /* @__PURE__ */ t.jsx("h3", { className: W.title, children: r }),
|
|
1368
|
+
i !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1369
1369
|
lt,
|
|
1370
1370
|
{
|
|
1371
|
-
current:
|
|
1372
|
-
onChange: (
|
|
1371
|
+
current: i,
|
|
1372
|
+
onChange: (I) => a == null ? void 0 : a(I)
|
|
1373
1373
|
}
|
|
1374
1374
|
)
|
|
1375
1375
|
] }),
|
|
1376
|
-
|
|
1377
|
-
|
|
1376
|
+
J && y && /* @__PURE__ */ t.jsx(
|
|
1377
|
+
Dt,
|
|
1378
1378
|
{
|
|
1379
|
-
ref:
|
|
1380
|
-
activeItem:
|
|
1381
|
-
setActiveItem:
|
|
1379
|
+
ref: q,
|
|
1380
|
+
activeItem: y,
|
|
1381
|
+
setActiveItem: M,
|
|
1382
1382
|
setIsOpenModal: m,
|
|
1383
|
-
popupPosition:
|
|
1384
|
-
itemsOptions:
|
|
1383
|
+
popupPosition: U,
|
|
1384
|
+
itemsOptions: c
|
|
1385
1385
|
}
|
|
1386
1386
|
),
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1387
|
+
i && /* @__PURE__ */ t.jsxs("div", { className: W.products, children: [
|
|
1388
|
+
g && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: g }),
|
|
1389
|
+
j ? /* @__PURE__ */ t.jsx(
|
|
1390
1390
|
ft,
|
|
1391
1391
|
{
|
|
1392
|
-
sensors:
|
|
1393
|
-
onDragEnd:
|
|
1392
|
+
sensors: h,
|
|
1393
|
+
onDragEnd: O,
|
|
1394
1394
|
children: /* @__PURE__ */ t.jsx(
|
|
1395
1395
|
xt,
|
|
1396
1396
|
{
|
|
1397
|
-
items: s.map((
|
|
1397
|
+
items: s.map((I) => String(I.listingId)),
|
|
1398
1398
|
strategy: _t,
|
|
1399
|
-
children: s.map((
|
|
1399
|
+
children: s.map((I) => N(I))
|
|
1400
1400
|
}
|
|
1401
1401
|
)
|
|
1402
1402
|
}
|
|
1403
|
-
) : s.map((
|
|
1404
|
-
|
|
1403
|
+
) : s.map((I) => N(I)),
|
|
1404
|
+
p && /* @__PURE__ */ t.jsx(
|
|
1405
1405
|
"div",
|
|
1406
1406
|
{
|
|
1407
1407
|
style: {
|
|
@@ -1413,25 +1413,25 @@ const Dn = (d) => {
|
|
|
1413
1413
|
dt,
|
|
1414
1414
|
{
|
|
1415
1415
|
withoutHover: !0,
|
|
1416
|
-
className:
|
|
1416
|
+
className: W.button,
|
|
1417
1417
|
size: "s",
|
|
1418
1418
|
onClick: () => {
|
|
1419
|
-
const
|
|
1420
|
-
for (let A = 0; A <
|
|
1421
|
-
if (!s.find((z) => z.listingId ===
|
|
1422
|
-
|
|
1423
|
-
listingId:
|
|
1424
|
-
image:
|
|
1419
|
+
const I = [...s];
|
|
1420
|
+
for (let A = 0; A < c.length; A++)
|
|
1421
|
+
if (!s.find((z) => z.listingId === c[A].id)) {
|
|
1422
|
+
I.push({
|
|
1423
|
+
listingId: c[A].id,
|
|
1424
|
+
image: c[A].productData.images.length > 0 ? c[A].productData.images[0].cfId : ""
|
|
1425
1425
|
});
|
|
1426
1426
|
break;
|
|
1427
1427
|
}
|
|
1428
|
-
e(
|
|
1428
|
+
e(I);
|
|
1429
1429
|
},
|
|
1430
|
-
disabled: s.length === (
|
|
1430
|
+
disabled: s.length === (n || c.length),
|
|
1431
1431
|
style: {
|
|
1432
1432
|
width: "fit-content"
|
|
1433
1433
|
},
|
|
1434
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1434
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: W.addButton, children: [
|
|
1435
1435
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1436
1436
|
/* @__PURE__ */ t.jsx(
|
|
1437
1437
|
b,
|
|
@@ -1447,16 +1447,16 @@ const Dn = (d) => {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
)
|
|
1449
1449
|
] }),
|
|
1450
|
-
|
|
1450
|
+
o && k && /* @__PURE__ */ t.jsx(
|
|
1451
1451
|
it,
|
|
1452
1452
|
{
|
|
1453
|
-
value:
|
|
1454
|
-
options: Object.keys(
|
|
1455
|
-
onChange: (
|
|
1456
|
-
leftAddonOptions:
|
|
1453
|
+
value: o,
|
|
1454
|
+
options: Object.keys(Pt),
|
|
1455
|
+
onChange: (I) => k(I),
|
|
1456
|
+
leftAddonOptions: wt
|
|
1457
1457
|
}
|
|
1458
1458
|
),
|
|
1459
|
-
|
|
1459
|
+
i && l !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1460
1460
|
ht,
|
|
1461
1461
|
{
|
|
1462
1462
|
otherTitle: "Other",
|
|
@@ -1464,58 +1464,59 @@ const Dn = (d) => {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
)
|
|
1466
1466
|
] });
|
|
1467
|
-
},
|
|
1468
|
-
options:
|
|
1469
|
-
price:
|
|
1470
|
-
oldPrice:
|
|
1471
|
-
newPrice:
|
|
1472
|
-
animate:
|
|
1473
|
-
meta:
|
|
1474
|
-
info:
|
|
1475
|
-
infoRight:
|
|
1467
|
+
}, Ee = "_options_167h8_1", De = "_price_167h8_18", Re = "_oldPrice_167h8_25", Le = "_newPrice_167h8_33", Ue = "_animate_167h8_40", ze = "_meta_167h8_58", He = "_info_167h8_64", Fe = "_infoRight_167h8_73", Ve = "_buttons_167h8_80", Ye = "_variants_167h8_87", Ge = "_variant_167h8_87", We = "_stock_167h8_105", Xe = "_variantInfo_167h8_112", Qe = "_quantity_167h8_119", Je = "_button_167h8_80", Ke = "_activeVariant_167h8_165", Ze = "_chargeTypes_167h8_169", ts = "_charge_167h8_169", es = "_chargeActive_167h8_194", ss = "_title_167h8_202", B = {
|
|
1468
|
+
options: Ee,
|
|
1469
|
+
price: De,
|
|
1470
|
+
oldPrice: Re,
|
|
1471
|
+
newPrice: Le,
|
|
1472
|
+
animate: Ue,
|
|
1473
|
+
meta: ze,
|
|
1474
|
+
info: He,
|
|
1475
|
+
infoRight: Fe,
|
|
1476
1476
|
buttons: Ve,
|
|
1477
|
-
variants:
|
|
1478
|
-
variant:
|
|
1479
|
-
stock:
|
|
1480
|
-
variantInfo:
|
|
1481
|
-
quantity:
|
|
1482
|
-
button:
|
|
1483
|
-
activeVariant:
|
|
1484
|
-
chargeTypes:
|
|
1485
|
-
charge:
|
|
1486
|
-
chargeActive:
|
|
1487
|
-
title:
|
|
1477
|
+
variants: Ye,
|
|
1478
|
+
variant: Ge,
|
|
1479
|
+
stock: We,
|
|
1480
|
+
variantInfo: Xe,
|
|
1481
|
+
quantity: Qe,
|
|
1482
|
+
button: Je,
|
|
1483
|
+
activeVariant: Ke,
|
|
1484
|
+
chargeTypes: Ze,
|
|
1485
|
+
charge: ts,
|
|
1486
|
+
chargeActive: es,
|
|
1487
|
+
title: ss
|
|
1488
1488
|
};
|
|
1489
|
-
var
|
|
1490
|
-
const
|
|
1491
|
-
var
|
|
1492
|
-
const { product:
|
|
1489
|
+
var $t = /* @__PURE__ */ ((u) => (u.ONE_TIME = "One-Time", u.RECURRING = "Subscribe & Save", u))($t || {});
|
|
1490
|
+
const ns = (u) => {
|
|
1491
|
+
var R, J;
|
|
1492
|
+
const { product: i, setIsOpen: a } = u, { variants: s } = i, [e, l] = f.useState(s[0]), [r, g] = f.useState(
|
|
1493
1493
|
e.chargeTypes ? e.chargeTypes[0] : "ONE_TIME"
|
|
1494
|
-
), { notifications:
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
const m = setTimeout(() =>
|
|
1494
|
+
), { notifications: _, setNotifications: j } = kt(), T = Ct(), [x, p] = f.useState(1), { cart: v, reset: c, addProductToCart: n } = ot(), [o, k] = f.useState(!1);
|
|
1495
|
+
f.useEffect(() => {
|
|
1496
|
+
k(!0);
|
|
1497
|
+
const m = setTimeout(() => k(!1), 600);
|
|
1498
1498
|
return () => clearTimeout(m);
|
|
1499
1499
|
}, [x]);
|
|
1500
|
-
async function
|
|
1500
|
+
async function y() {
|
|
1501
1501
|
try {
|
|
1502
|
-
|
|
1503
|
-
productId:
|
|
1502
|
+
n({
|
|
1503
|
+
productId: i.id,
|
|
1504
1504
|
productVariantId: e.id,
|
|
1505
|
+
chargeType: r,
|
|
1505
1506
|
quantity: x
|
|
1506
|
-
}),
|
|
1507
|
-
...
|
|
1507
|
+
}), j([
|
|
1508
|
+
..._,
|
|
1508
1509
|
{
|
|
1509
|
-
id:
|
|
1510
|
+
id: Q(),
|
|
1510
1511
|
message: "Product added to cart",
|
|
1511
1512
|
status: "success"
|
|
1512
1513
|
}
|
|
1513
1514
|
]);
|
|
1514
1515
|
} catch (m) {
|
|
1515
|
-
|
|
1516
|
-
...
|
|
1516
|
+
j([
|
|
1517
|
+
..._,
|
|
1517
1518
|
{
|
|
1518
|
-
id:
|
|
1519
|
+
id: Q(),
|
|
1519
1520
|
message: `Product failed to add to cart: ${m}`,
|
|
1520
1521
|
status: "error"
|
|
1521
1522
|
}
|
|
@@ -1523,57 +1524,68 @@ const es = (d) => {
|
|
|
1523
1524
|
}
|
|
1524
1525
|
a == null || a(!1);
|
|
1525
1526
|
}
|
|
1526
|
-
function
|
|
1527
|
-
|
|
1527
|
+
function M() {
|
|
1528
|
+
c(), y(), T("/checkout");
|
|
1528
1529
|
}
|
|
1529
|
-
function
|
|
1530
|
+
function U(m) {
|
|
1530
1531
|
if (m >= 864e5) {
|
|
1531
|
-
const
|
|
1532
|
-
return `${
|
|
1532
|
+
const N = Math.floor(m / 864e5);
|
|
1533
|
+
return `${N} ${N === 1 ? "day" : "days"}`;
|
|
1533
1534
|
} else if (m >= 36e5) {
|
|
1534
|
-
const
|
|
1535
|
-
return `${
|
|
1535
|
+
const N = Math.floor(m / 36e5);
|
|
1536
|
+
return `${N} ${N === 1 ? "hour" : "hours"}`;
|
|
1536
1537
|
} else if (m >= 6e4) {
|
|
1537
|
-
const
|
|
1538
|
-
return `${
|
|
1538
|
+
const N = Math.floor(m / 6e4);
|
|
1539
|
+
return `${N} ${N === 1 ? "minute" : "minutes"}`;
|
|
1539
1540
|
} else {
|
|
1540
|
-
const
|
|
1541
|
-
return `${
|
|
1541
|
+
const N = Math.floor(m / 1e3);
|
|
1542
|
+
return `${N} ${N === 1 ? "second" : "seconds"}`;
|
|
1542
1543
|
}
|
|
1543
1544
|
}
|
|
1544
|
-
return
|
|
1545
|
-
e.quantity && e.quantity.available === 0 ?
|
|
1546
|
-
}, [e.quantity.available]),
|
|
1545
|
+
return f.useEffect(() => {
|
|
1546
|
+
e.quantity && e.quantity.available === 0 ? p(0) : p(1);
|
|
1547
|
+
}, [e.quantity.available]), f.useEffect(() => {
|
|
1548
|
+
e.chargeTypes && g(
|
|
1549
|
+
e.chargeTypes.includes(r) ? r : e.chargeTypes[0]
|
|
1550
|
+
);
|
|
1551
|
+
}, [e.chargeTypes]), /* @__PURE__ */ t.jsxs("div", { className: B.options, children: [
|
|
1547
1552
|
e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: B.chargeTypes, children: e.chargeTypes.map((m) => /* @__PURE__ */ t.jsx(
|
|
1548
1553
|
"div",
|
|
1549
1554
|
{
|
|
1550
|
-
className:
|
|
1555
|
+
className: H(B.charge, {
|
|
1551
1556
|
[B.chargeActive]: r === m
|
|
1552
1557
|
}),
|
|
1553
|
-
onClick: () =>
|
|
1554
|
-
children:
|
|
1558
|
+
onClick: () => g(m),
|
|
1559
|
+
children: $t[m]
|
|
1555
1560
|
},
|
|
1556
1561
|
m
|
|
1557
1562
|
)) }),
|
|
1558
|
-
/* @__PURE__ */ t.jsx("div", { className: B.variants, children: s.
|
|
1559
|
-
var
|
|
1563
|
+
/* @__PURE__ */ t.jsx("div", { className: B.variants, children: s.filter((m) => {
|
|
1564
|
+
var h;
|
|
1565
|
+
return (h = m.chargeTypes) == null ? void 0 : h.includes(r);
|
|
1566
|
+
}).map((m) => {
|
|
1567
|
+
var h, C;
|
|
1560
1568
|
return /* @__PURE__ */ t.jsxs(
|
|
1561
1569
|
"div",
|
|
1562
1570
|
{
|
|
1563
|
-
className:
|
|
1571
|
+
className: H(B.variant, {
|
|
1564
1572
|
[B.activeVariant]: e.id === m.id
|
|
1565
1573
|
}),
|
|
1566
1574
|
onClick: () => l(m),
|
|
1567
1575
|
children: [
|
|
1568
1576
|
/* @__PURE__ */ t.jsxs("div", { className: B.variantInfo, children: [
|
|
1569
1577
|
/* @__PURE__ */ t.jsx("span", { className: B.title, children: at(m.name) }),
|
|
1570
|
-
/* @__PURE__ */ t.
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1578
|
+
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
1579
|
+
Z({
|
|
1580
|
+
amount: r === "ONE_TIME" ? m.price.amount : m.subscriptionSettings ? m.subscriptionSettings.price.amount : 0,
|
|
1581
|
+
currency: r === "ONE_TIME" ? m.price.currency : m.subscriptionSettings ? m.subscriptionSettings.price.currency : "USD"
|
|
1582
|
+
}),
|
|
1583
|
+
" ",
|
|
1584
|
+
r === "RECURRING" && m.subscriptionSettings && ` / ${Rt(m.subscriptionSettings.recurringIntervalDays || 0)}`
|
|
1585
|
+
] })
|
|
1574
1586
|
] }),
|
|
1575
1587
|
/* @__PURE__ */ t.jsx("div", { children: r === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: B.stock, children: [
|
|
1576
|
-
(
|
|
1588
|
+
(h = m.quantity.restrictions) != null && h.max || m.quantity.available !== void 0 ? ((C = m.quantity.restrictions) == null ? void 0 : C.max) || m.quantity.available : "∞",
|
|
1577
1589
|
" ",
|
|
1578
1590
|
"in stock"
|
|
1579
1591
|
] }) })
|
|
@@ -1584,11 +1596,11 @@ const es = (d) => {
|
|
|
1584
1596
|
}) }),
|
|
1585
1597
|
r === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: B.quantity, children: [
|
|
1586
1598
|
/* @__PURE__ */ t.jsx(
|
|
1587
|
-
|
|
1599
|
+
D,
|
|
1588
1600
|
{
|
|
1589
1601
|
type: "Secondary",
|
|
1590
1602
|
onClick: () => {
|
|
1591
|
-
x > 1 ?
|
|
1603
|
+
x > 1 ? p((m) => m - 1) : p(1);
|
|
1592
1604
|
},
|
|
1593
1605
|
className: B.button,
|
|
1594
1606
|
disabled: e.quantity.available && e.quantity.restrictions && x <= e.quantity.restrictions.min || e.quantity.available === 0,
|
|
@@ -1596,25 +1608,25 @@ const es = (d) => {
|
|
|
1596
1608
|
}
|
|
1597
1609
|
),
|
|
1598
1610
|
/* @__PURE__ */ t.jsx(
|
|
1599
|
-
|
|
1611
|
+
Lt,
|
|
1600
1612
|
{
|
|
1601
1613
|
type: "number",
|
|
1602
1614
|
value: String(x),
|
|
1603
1615
|
onChange: (m) => {
|
|
1604
|
-
e.quantity.available && Number(m) > e.quantity.available ?
|
|
1616
|
+
e.quantity.available && Number(m) > e.quantity.available ? p(e.quantity.available) : p(Number(m));
|
|
1605
1617
|
},
|
|
1606
|
-
max: ((
|
|
1607
|
-
min: ((
|
|
1618
|
+
max: ((R = e.quantity.restrictions) == null ? void 0 : R.max) || e.quantity.available || Number.POSITIVE_INFINITY,
|
|
1619
|
+
min: ((J = e.quantity.restrictions) == null ? void 0 : J.min) || 0,
|
|
1608
1620
|
centered: !0,
|
|
1609
1621
|
disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && x >= e.quantity.restrictions.max
|
|
1610
1622
|
}
|
|
1611
1623
|
),
|
|
1612
1624
|
/* @__PURE__ */ t.jsx(
|
|
1613
|
-
|
|
1625
|
+
D,
|
|
1614
1626
|
{
|
|
1615
1627
|
type: "Secondary",
|
|
1616
1628
|
onClick: () => {
|
|
1617
|
-
|
|
1629
|
+
p((m) => m + 1);
|
|
1618
1630
|
},
|
|
1619
1631
|
className: B.button,
|
|
1620
1632
|
disabled: !!(e.quantity.available && e.quantity.restrictions && x >= e.quantity.restrictions.max || e.quantity.available === 0 || e.quantity.available && x >= e.quantity.available),
|
|
@@ -1635,33 +1647,33 @@ const es = (d) => {
|
|
|
1635
1647
|
height: 20
|
|
1636
1648
|
}
|
|
1637
1649
|
),
|
|
1638
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
1650
|
+
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : U(e.deliveryTime) })
|
|
1639
1651
|
] })
|
|
1640
1652
|
] }),
|
|
1641
1653
|
/* @__PURE__ */ t.jsxs("div", { className: B.info, children: [
|
|
1642
1654
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
1643
1655
|
/* @__PURE__ */ t.jsx("div", { className: B.infoRight, children: r === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: B.price, children: [
|
|
1644
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1656
|
+
/* @__PURE__ */ t.jsx("span", { className: H(B.newPrice, { [B.animate]: o }), children: Z({
|
|
1645
1657
|
amount: e.price.amount * x,
|
|
1646
1658
|
currency: e.price.currency
|
|
1647
1659
|
}) }),
|
|
1648
|
-
/* @__PURE__ */ t.jsx("span", { className: B.oldPrice, children:
|
|
1660
|
+
/* @__PURE__ */ t.jsx("span", { className: B.oldPrice, children: Z({
|
|
1649
1661
|
amount: e.compareAtPrice.amount * x,
|
|
1650
1662
|
currency: e.compareAtPrice.currency
|
|
1651
1663
|
}) })
|
|
1652
|
-
] }) : /* @__PURE__ */ t.jsx("span", { className:
|
|
1664
|
+
] }) : /* @__PURE__ */ t.jsx("span", { className: H(B.newPrice, { [B.animate]: o }), children: Z({
|
|
1653
1665
|
amount: e.price.amount * x,
|
|
1654
1666
|
currency: e.price.currency
|
|
1655
1667
|
}) }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: B.price, children: [
|
|
1656
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1668
|
+
/* @__PURE__ */ t.jsx("span", { className: H(B.newPrice, { [B.animate]: o }), children: Z({
|
|
1657
1669
|
amount: e.subscriptionSettings.price.amount * x,
|
|
1658
1670
|
currency: e.subscriptionSettings.price.currency
|
|
1659
1671
|
}) }),
|
|
1660
|
-
/* @__PURE__ */ t.jsx("span", { className: B.oldPrice, children:
|
|
1672
|
+
/* @__PURE__ */ t.jsx("span", { className: B.oldPrice, children: Z({
|
|
1661
1673
|
amount: e.subscriptionSettings.compareAtPrice.amount * x,
|
|
1662
1674
|
currency: e.subscriptionSettings.compareAtPrice.currency
|
|
1663
1675
|
}) })
|
|
1664
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsx("span", { className:
|
|
1676
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsx("span", { className: H(B.newPrice, { [B.animate]: o }), children: Z({
|
|
1665
1677
|
amount: e.subscriptionSettings.price.amount * x,
|
|
1666
1678
|
currency: e.subscriptionSettings.price.currency
|
|
1667
1679
|
}) }) })
|
|
@@ -1669,101 +1681,115 @@ const es = (d) => {
|
|
|
1669
1681
|
] }),
|
|
1670
1682
|
/* @__PURE__ */ t.jsxs("div", { className: B.buttons, children: [
|
|
1671
1683
|
/* @__PURE__ */ t.jsx(
|
|
1672
|
-
|
|
1684
|
+
D,
|
|
1673
1685
|
{
|
|
1674
1686
|
type: "Primary",
|
|
1675
|
-
onClick: () =>
|
|
1687
|
+
onClick: () => M(),
|
|
1676
1688
|
disabled: e.quantity && e.quantity.available === 0,
|
|
1677
1689
|
children: r === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
|
|
1678
1690
|
}
|
|
1679
1691
|
),
|
|
1680
1692
|
r === "ONE_TIME" && /* @__PURE__ */ t.jsx(
|
|
1681
|
-
|
|
1693
|
+
D,
|
|
1682
1694
|
{
|
|
1683
1695
|
type: "Secondary",
|
|
1684
|
-
onClick: () =>
|
|
1696
|
+
onClick: () => y(),
|
|
1685
1697
|
disabled: e.quantity && e.quantity.available === 0,
|
|
1686
|
-
children:
|
|
1687
|
-
(m) => m.productId ===
|
|
1698
|
+
children: v.parts.some(
|
|
1699
|
+
(m) => m.productId === i.id && m.productVariantId === e.id
|
|
1688
1700
|
) ? "Add More" : "Add to Cart"
|
|
1689
1701
|
}
|
|
1690
1702
|
)
|
|
1691
1703
|
] })
|
|
1692
1704
|
] });
|
|
1693
|
-
},
|
|
1694
|
-
buttons:
|
|
1695
|
-
modal:
|
|
1696
|
-
closing:
|
|
1697
|
-
info:
|
|
1698
|
-
top:
|
|
1699
|
-
title:
|
|
1700
|
-
clear:
|
|
1701
|
-
activeClear:
|
|
1702
|
-
count:
|
|
1703
|
-
cart:
|
|
1704
|
-
empty:
|
|
1705
|
-
product:
|
|
1706
|
-
products:
|
|
1707
|
-
image:
|
|
1708
|
-
productInfo:
|
|
1709
|
-
content:
|
|
1710
|
-
name:
|
|
1711
|
-
price:
|
|
1712
|
-
productButtons:
|
|
1713
|
-
productButton:
|
|
1714
|
-
productCount:
|
|
1715
|
-
bottom:
|
|
1716
|
-
subtotal:
|
|
1717
|
-
block:
|
|
1718
|
-
shoppingCount:
|
|
1719
|
-
total:
|
|
1720
|
-
link:
|
|
1721
|
-
userInfo:
|
|
1722
|
-
pagesMobileModal:
|
|
1723
|
-
pagesMobileModalContent:
|
|
1724
|
-
pagesMobileModalHeader:
|
|
1725
|
-
pagesMobileModalFooter: qs
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1705
|
+
}, is = "_buttons_r2kti_23", as = "_modal_r2kti_32", os = "_closing_r2kti_65", cs = "_info_r2kti_114", rs = "_top_r2kti_121", ls = "_title_r2kti_132", ds = "_clear_r2kti_139", us = "_activeClear_r2kti_146", hs = "_count_r2kti_150", ps = "_cart_r2kti_165", ms = "_empty_r2kti_173", gs = "_product_r2kti_199", fs = "_products_r2kti_208", xs = "_image_r2kti_216", _s = "_productInfo_r2kti_232", js = "_content_r2kti_239", vs = "_name_r2kti_245", ys = "_price_r2kti_251", bs = "_productButtons_r2kti_257", Is = "_productButton_r2kti_257", Ns = "_productCount_r2kti_274", ks = "_bottom_r2kti_291", Cs = "_subtotal_r2kti_299", Ss = "_block_r2kti_307", ws = "_shoppingCount_r2kti_314", Ps = "_total_r2kti_334", Ts = "_link_r2kti_340", Ms = "_userInfo_r2kti_347", Bs = "_pagesMobileModal_r2kti_359", $s = "_pagesMobileModalContent_r2kti_373", Os = "_pagesMobileModalHeader_r2kti_379", qs = "_pagesMobileModalFooter_r2kti_389", As = "_pageLink_r2kti_396", Es = "_rightButtons_r2kti_405", w = {
|
|
1706
|
+
buttons: is,
|
|
1707
|
+
modal: as,
|
|
1708
|
+
closing: os,
|
|
1709
|
+
info: cs,
|
|
1710
|
+
top: rs,
|
|
1711
|
+
title: ls,
|
|
1712
|
+
clear: ds,
|
|
1713
|
+
activeClear: us,
|
|
1714
|
+
count: hs,
|
|
1715
|
+
cart: ps,
|
|
1716
|
+
empty: ms,
|
|
1717
|
+
product: gs,
|
|
1718
|
+
products: fs,
|
|
1719
|
+
image: xs,
|
|
1720
|
+
productInfo: _s,
|
|
1721
|
+
content: js,
|
|
1722
|
+
name: vs,
|
|
1723
|
+
price: ys,
|
|
1724
|
+
productButtons: bs,
|
|
1725
|
+
productButton: Is,
|
|
1726
|
+
productCount: Ns,
|
|
1727
|
+
bottom: ks,
|
|
1728
|
+
subtotal: Cs,
|
|
1729
|
+
block: Ss,
|
|
1730
|
+
shoppingCount: ws,
|
|
1731
|
+
total: Ps,
|
|
1732
|
+
link: Ts,
|
|
1733
|
+
userInfo: Ms,
|
|
1734
|
+
pagesMobileModal: Bs,
|
|
1735
|
+
pagesMobileModalContent: $s,
|
|
1736
|
+
pagesMobileModalHeader: Os,
|
|
1737
|
+
pagesMobileModalFooter: qs,
|
|
1738
|
+
pageLink: As,
|
|
1739
|
+
rightButtons: Es
|
|
1740
|
+
}, Ln = (u) => {
|
|
1741
|
+
const { shopping: i, signUp: a, isShowUserInfo: s = !0 } = u;
|
|
1742
|
+
return /* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
|
|
1743
|
+
i && /* @__PURE__ */ t.jsx(Ds, {}),
|
|
1744
|
+
s && /* @__PURE__ */ t.jsx(Ot, { signUp: a })
|
|
1731
1745
|
] });
|
|
1732
|
-
},
|
|
1733
|
-
const [
|
|
1734
|
-
function
|
|
1746
|
+
}, Ds = () => {
|
|
1747
|
+
const [u, i] = f.useState(!1), [a, s] = f.useState([]), [e, l] = f.useState(!1), { cart: r, products: g } = ot();
|
|
1748
|
+
function _(c) {
|
|
1735
1749
|
if (c.variants.length > 0) {
|
|
1736
|
-
for (let
|
|
1737
|
-
for (let
|
|
1738
|
-
if (c.variants[
|
|
1739
|
-
return r.parts[
|
|
1750
|
+
for (let n = 0; n < r.parts.length; n++)
|
|
1751
|
+
for (let o = 0; o < c.variants.length; o++)
|
|
1752
|
+
if (c.variants[o] && r.parts[n].productVariantId === c.variants[o].id)
|
|
1753
|
+
return r.parts[n].productVariantId;
|
|
1740
1754
|
}
|
|
1741
1755
|
return c.variants[0].id;
|
|
1742
1756
|
}
|
|
1743
|
-
function
|
|
1744
|
-
for (let
|
|
1745
|
-
for (let
|
|
1746
|
-
if (c.variants[
|
|
1747
|
-
return r.parts[
|
|
1757
|
+
function j(c) {
|
|
1758
|
+
for (let n = 0; n < r.parts.length; n++)
|
|
1759
|
+
for (let o = 0; o < c.variants.length; o++)
|
|
1760
|
+
if (c.variants[o] && r.parts[n].productVariantId === c.variants[o].id)
|
|
1761
|
+
return r.parts[n].quantity;
|
|
1748
1762
|
}
|
|
1749
|
-
|
|
1763
|
+
const T = (c) => {
|
|
1764
|
+
for (let n = 0; n < r.parts.length; n++)
|
|
1765
|
+
for (let o = 0; o < c.variants.length; o++)
|
|
1766
|
+
if (c.variants[o] && r.parts[n].productVariantId === c.variants[o].id)
|
|
1767
|
+
return r.parts[n].chargeType;
|
|
1768
|
+
return "ONE_TIME";
|
|
1769
|
+
};
|
|
1770
|
+
f.useEffect(() => {
|
|
1750
1771
|
(async () => {
|
|
1751
|
-
const
|
|
1752
|
-
...
|
|
1753
|
-
activeVariantId:
|
|
1754
|
-
quantity:
|
|
1772
|
+
const n = r.parts.map((y) => String(y.productId)), k = (g.filter((y) => n.includes(String(y.id))) || []).map((y) => ({
|
|
1773
|
+
...y,
|
|
1774
|
+
activeVariantId: _(y),
|
|
1775
|
+
quantity: j(y),
|
|
1776
|
+
chargeType: T(y)
|
|
1755
1777
|
}));
|
|
1756
|
-
s(
|
|
1778
|
+
s(k);
|
|
1757
1779
|
})();
|
|
1758
1780
|
}, [r.parts]);
|
|
1759
|
-
function
|
|
1760
|
-
|
|
1761
|
-
|
|
1781
|
+
function x(c) {
|
|
1782
|
+
return !c || !(c != null && c.variants) ? !1 : c.chargeType === "RECURRING";
|
|
1783
|
+
}
|
|
1784
|
+
const p = r.parts.length > 0 && a.length > 0 && !x(a[0]);
|
|
1785
|
+
function v() {
|
|
1786
|
+
l(!1), setTimeout(() => {
|
|
1787
|
+
i(!1);
|
|
1788
|
+
}, 300);
|
|
1762
1789
|
}
|
|
1763
|
-
const x = r.parts.length > 0 && a.length > 0 && !M(a[0]);
|
|
1764
1790
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1765
1791
|
/* @__PURE__ */ t.jsxs(
|
|
1766
|
-
|
|
1792
|
+
D,
|
|
1767
1793
|
{
|
|
1768
1794
|
type: "Secondary",
|
|
1769
1795
|
style: {
|
|
@@ -1771,7 +1797,7 @@ const es = (d) => {
|
|
|
1771
1797
|
position: "relative"
|
|
1772
1798
|
},
|
|
1773
1799
|
onClick: (c) => {
|
|
1774
|
-
c.stopPropagation(), window.location.pathname.includes("/admin/builder") || (
|
|
1800
|
+
c.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), l(!0));
|
|
1775
1801
|
},
|
|
1776
1802
|
children: [
|
|
1777
1803
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1780,120 +1806,132 @@ const es = (d) => {
|
|
|
1780
1806
|
name: "Handbag"
|
|
1781
1807
|
}
|
|
1782
1808
|
),
|
|
1783
|
-
|
|
1809
|
+
p && /* @__PURE__ */ t.jsx("div", { className: w.shoppingCount, children: r.parts.length })
|
|
1784
1810
|
]
|
|
1785
1811
|
}
|
|
1786
1812
|
),
|
|
1787
|
-
|
|
1813
|
+
u && /* @__PURE__ */ t.jsx(
|
|
1788
1814
|
ut,
|
|
1789
1815
|
{
|
|
1790
|
-
close:
|
|
1791
|
-
l(!1), setTimeout(() => {
|
|
1792
|
-
n(!1);
|
|
1793
|
-
}, 300);
|
|
1794
|
-
},
|
|
1816
|
+
close: v,
|
|
1795
1817
|
withAnimation: !1,
|
|
1796
1818
|
children: /* @__PURE__ */ t.jsx(
|
|
1797
|
-
|
|
1819
|
+
Rs,
|
|
1798
1820
|
{
|
|
1799
1821
|
activeProducts: a,
|
|
1800
|
-
isCartNotEmpty:
|
|
1801
|
-
isOpen: e
|
|
1822
|
+
isCartNotEmpty: p,
|
|
1823
|
+
isOpen: e,
|
|
1824
|
+
close: v
|
|
1802
1825
|
}
|
|
1803
1826
|
)
|
|
1804
1827
|
}
|
|
1805
1828
|
)
|
|
1806
1829
|
] });
|
|
1807
|
-
},
|
|
1808
|
-
var
|
|
1809
|
-
const { activeProducts:
|
|
1810
|
-
function
|
|
1811
|
-
|
|
1830
|
+
}, Rs = (u) => {
|
|
1831
|
+
var v, c;
|
|
1832
|
+
const { activeProducts: i, isCartNotEmpty: a, isOpen: s, close: e } = u, { cart: l, reset: r, getTotalAndDiscount: g, updateQuantityOfProduct: _ } = ot(), j = Ct();
|
|
1833
|
+
function T(n, o) {
|
|
1834
|
+
j(n, { replace: o });
|
|
1812
1835
|
}
|
|
1813
|
-
function
|
|
1814
|
-
|
|
1815
|
-
productId:
|
|
1816
|
-
productVariantId:
|
|
1817
|
-
quantity:
|
|
1836
|
+
function x(n) {
|
|
1837
|
+
n.quantity && _({
|
|
1838
|
+
productId: n.id,
|
|
1839
|
+
productVariantId: n.activeVariantId,
|
|
1840
|
+
quantity: n.quantity + 1,
|
|
1841
|
+
chargeType: n.chargeType
|
|
1818
1842
|
});
|
|
1819
1843
|
}
|
|
1820
|
-
function
|
|
1821
|
-
|
|
1822
|
-
productId:
|
|
1823
|
-
productVariantId:
|
|
1824
|
-
quantity:
|
|
1844
|
+
function p(n) {
|
|
1845
|
+
n.quantity && _({
|
|
1846
|
+
productId: n.id,
|
|
1847
|
+
productVariantId: n.activeVariantId,
|
|
1848
|
+
quantity: n.quantity - 1,
|
|
1849
|
+
chargeType: n.chargeType
|
|
1825
1850
|
});
|
|
1826
1851
|
}
|
|
1827
1852
|
return /* @__PURE__ */ t.jsxs(
|
|
1828
1853
|
"div",
|
|
1829
1854
|
{
|
|
1830
|
-
className:
|
|
1831
|
-
[
|
|
1855
|
+
className: H(w.modal, {
|
|
1856
|
+
[w.closing]: !s
|
|
1832
1857
|
}),
|
|
1833
|
-
onClick: (
|
|
1858
|
+
onClick: (n) => n.stopPropagation(),
|
|
1834
1859
|
children: [
|
|
1835
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1836
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1837
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1838
|
-
a && /* @__PURE__ */ t.jsx("div", { className:
|
|
1860
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.top, children: [
|
|
1861
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.info, children: [
|
|
1862
|
+
/* @__PURE__ */ t.jsx("span", { className: w.title, children: "Cart" }),
|
|
1863
|
+
a && /* @__PURE__ */ t.jsx("div", { className: w.count, children: l.parts.length })
|
|
1839
1864
|
] }),
|
|
1840
|
-
/* @__PURE__ */ t.
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1865
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.rightButtons, children: [
|
|
1866
|
+
a && /* @__PURE__ */ t.jsx(
|
|
1867
|
+
"button",
|
|
1868
|
+
{
|
|
1869
|
+
className: H(w.clear, {
|
|
1870
|
+
[w.activeClear]: a
|
|
1871
|
+
}),
|
|
1872
|
+
disabled: !a,
|
|
1873
|
+
onClick: r,
|
|
1874
|
+
children: "Clear all"
|
|
1875
|
+
}
|
|
1876
|
+
),
|
|
1877
|
+
/* @__PURE__ */ t.jsx(
|
|
1878
|
+
b,
|
|
1879
|
+
{
|
|
1880
|
+
name: "X",
|
|
1881
|
+
onClick: e,
|
|
1882
|
+
hoverable: !0,
|
|
1883
|
+
width: 24,
|
|
1884
|
+
height: 24,
|
|
1885
|
+
fill: "var(--text-primary)"
|
|
1886
|
+
}
|
|
1887
|
+
)
|
|
1888
|
+
] })
|
|
1851
1889
|
] }),
|
|
1852
|
-
a ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
1853
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1890
|
+
a ? /* @__PURE__ */ t.jsxs("div", { className: w.cart, children: [
|
|
1891
|
+
/* @__PURE__ */ t.jsx("div", { className: w.products, children: [...new Map(i.map((n) => [n.id, n])).values()].map((n) => /* @__PURE__ */ t.jsxs(
|
|
1854
1892
|
"div",
|
|
1855
1893
|
{
|
|
1856
|
-
className:
|
|
1894
|
+
className: w.product,
|
|
1857
1895
|
children: [
|
|
1858
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1859
|
-
|
|
1896
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.productInfo, children: [
|
|
1897
|
+
n.images.length > 0 ? /* @__PURE__ */ t.jsx(
|
|
1860
1898
|
"img",
|
|
1861
1899
|
{
|
|
1862
|
-
src: `https://imagedelivery.net/${
|
|
1900
|
+
src: `https://imagedelivery.net/${n.images[0].cfId}/w=500`,
|
|
1863
1901
|
alt: "image",
|
|
1864
1902
|
width: "100%",
|
|
1865
1903
|
height: "100%",
|
|
1866
|
-
className:
|
|
1904
|
+
className: w.image
|
|
1867
1905
|
}
|
|
1868
|
-
) : /* @__PURE__ */ t.jsx("div", { className:
|
|
1906
|
+
) : /* @__PURE__ */ t.jsx("div", { className: w.image, children: /* @__PURE__ */ t.jsx(
|
|
1869
1907
|
b,
|
|
1870
1908
|
{
|
|
1871
1909
|
name: "Image",
|
|
1872
1910
|
fill: "var(--text-secondary)"
|
|
1873
1911
|
}
|
|
1874
1912
|
) }),
|
|
1875
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1876
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1877
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1878
|
-
amount:
|
|
1879
|
-
(
|
|
1880
|
-
).price.amount * ((
|
|
1881
|
-
currency:
|
|
1882
|
-
(
|
|
1913
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.content, children: [
|
|
1914
|
+
/* @__PURE__ */ t.jsx("div", { className: w.name, children: at(n.name) }),
|
|
1915
|
+
/* @__PURE__ */ t.jsx("div", { className: w.price, children: Z({
|
|
1916
|
+
amount: n.variants.find(
|
|
1917
|
+
(o) => o.id === n.activeVariantId
|
|
1918
|
+
).price.amount * ((n == null ? void 0 : n.quantity) || 1),
|
|
1919
|
+
currency: n.variants.find(
|
|
1920
|
+
(o) => o.id === n.activeVariantId
|
|
1883
1921
|
).price.currency
|
|
1884
1922
|
}) })
|
|
1885
1923
|
] })
|
|
1886
1924
|
] }),
|
|
1887
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1925
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.productButtons, children: [
|
|
1888
1926
|
/* @__PURE__ */ t.jsx(
|
|
1889
|
-
|
|
1927
|
+
D,
|
|
1890
1928
|
{
|
|
1891
1929
|
type: "Secondary",
|
|
1892
1930
|
onClick: () => {
|
|
1893
|
-
|
|
1931
|
+
n.quantity !== 1 && p(n);
|
|
1894
1932
|
},
|
|
1895
|
-
className:
|
|
1896
|
-
disabled:
|
|
1933
|
+
className: w.productButton,
|
|
1934
|
+
disabled: n.quantity === 1,
|
|
1897
1935
|
children: /* @__PURE__ */ t.jsx(
|
|
1898
1936
|
b,
|
|
1899
1937
|
{
|
|
@@ -1905,14 +1943,14 @@ const es = (d) => {
|
|
|
1905
1943
|
)
|
|
1906
1944
|
}
|
|
1907
1945
|
),
|
|
1908
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1946
|
+
/* @__PURE__ */ t.jsx("div", { className: w.productCount, children: n.quantity }),
|
|
1909
1947
|
/* @__PURE__ */ t.jsx(
|
|
1910
|
-
|
|
1948
|
+
D,
|
|
1911
1949
|
{
|
|
1912
1950
|
type: "Secondary",
|
|
1913
|
-
onClick: () =>
|
|
1914
|
-
className:
|
|
1915
|
-
disabled:
|
|
1951
|
+
onClick: () => x(n),
|
|
1952
|
+
className: w.productButton,
|
|
1953
|
+
disabled: n.quantity === n.variants.find((o) => o.id === n.activeVariantId).quantity.available,
|
|
1916
1954
|
children: /* @__PURE__ */ t.jsx(
|
|
1917
1955
|
b,
|
|
1918
1956
|
{
|
|
@@ -1927,11 +1965,11 @@ const es = (d) => {
|
|
|
1927
1965
|
] })
|
|
1928
1966
|
]
|
|
1929
1967
|
},
|
|
1930
|
-
|
|
1968
|
+
n.id
|
|
1931
1969
|
)) }),
|
|
1932
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1933
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1934
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1970
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.bottom, children: [
|
|
1971
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.subtotal, children: [
|
|
1972
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.block, children: [
|
|
1935
1973
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
1936
1974
|
/* @__PURE__ */ t.jsx(
|
|
1937
1975
|
b,
|
|
@@ -1943,18 +1981,18 @@ const es = (d) => {
|
|
|
1943
1981
|
}
|
|
1944
1982
|
)
|
|
1945
1983
|
] }),
|
|
1946
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1947
|
-
amount:
|
|
1948
|
-
currency:
|
|
1984
|
+
/* @__PURE__ */ t.jsx("div", { className: w.total, children: Z({
|
|
1985
|
+
amount: g().total,
|
|
1986
|
+
currency: l.parts.length > 0 && ((c = (v = i.find((n) => n.id === l.parts[0].productId)) == null ? void 0 : v.variants.find((n) => n.id === l.parts[0].productVariantId)) == null ? void 0 : c.price.currency) || "USD"
|
|
1949
1987
|
}) })
|
|
1950
1988
|
] }),
|
|
1951
|
-
/* @__PURE__ */ t.jsx(
|
|
1989
|
+
/* @__PURE__ */ t.jsx(D, { onClick: () => T("/checkout", !1), children: "Checkout" })
|
|
1952
1990
|
] })
|
|
1953
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
1991
|
+
] }) : /* @__PURE__ */ t.jsx(Ls, {})
|
|
1954
1992
|
]
|
|
1955
1993
|
}
|
|
1956
1994
|
);
|
|
1957
|
-
},
|
|
1995
|
+
}, Ls = () => /* @__PURE__ */ t.jsxs("div", { className: w.empty, children: [
|
|
1958
1996
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1959
1997
|
b,
|
|
1960
1998
|
{
|
|
@@ -1970,38 +2008,39 @@ const es = (d) => {
|
|
|
1970
2008
|
"a",
|
|
1971
2009
|
{
|
|
1972
2010
|
href: "/products",
|
|
1973
|
-
className:
|
|
2011
|
+
className: w.link,
|
|
1974
2012
|
children: "view products"
|
|
1975
2013
|
}
|
|
1976
2014
|
)
|
|
1977
2015
|
] })
|
|
1978
|
-
] }),
|
|
1979
|
-
const { token: a } =
|
|
1980
|
-
|
|
2016
|
+
] }), Ot = ({ signUp: u, close: i }) => {
|
|
2017
|
+
const { token: a } = Ut(), s = Ct(), [e, l] = f.useState("test-email@gmail.com");
|
|
2018
|
+
f.useEffect(() => {
|
|
1981
2019
|
a && (async () => {
|
|
1982
2020
|
if (!a) return;
|
|
1983
|
-
const
|
|
1984
|
-
l(
|
|
2021
|
+
const _ = zt(a);
|
|
2022
|
+
l(_.email);
|
|
1985
2023
|
})();
|
|
1986
2024
|
}, [a]);
|
|
1987
|
-
function r(
|
|
1988
|
-
window.location.pathname.includes("/admin/builder") || s(
|
|
2025
|
+
function r(g) {
|
|
2026
|
+
window.location.pathname.includes("/admin/builder") || s(g);
|
|
1989
2027
|
}
|
|
1990
2028
|
return a ? /* @__PURE__ */ t.jsx(
|
|
1991
|
-
|
|
2029
|
+
D,
|
|
1992
2030
|
{
|
|
1993
|
-
|
|
2031
|
+
type: "Secondary",
|
|
2032
|
+
className: w.userInfo,
|
|
1994
2033
|
onClick: () => {
|
|
1995
|
-
r("/customer-dash"),
|
|
2034
|
+
r("/customer-dash"), i == null || i();
|
|
1996
2035
|
},
|
|
1997
2036
|
children: /* @__PURE__ */ t.jsx("div", { children: e || "test-email@gmail.com" })
|
|
1998
2037
|
}
|
|
1999
2038
|
) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2000
2039
|
/* @__PURE__ */ t.jsx(
|
|
2001
|
-
|
|
2040
|
+
D,
|
|
2002
2041
|
{
|
|
2003
2042
|
onClick: () => {
|
|
2004
|
-
r("/customer-dash"),
|
|
2043
|
+
r("/customer-dash"), i == null || i();
|
|
2005
2044
|
},
|
|
2006
2045
|
type: "Secondary",
|
|
2007
2046
|
style: {
|
|
@@ -2010,11 +2049,11 @@ const es = (d) => {
|
|
|
2010
2049
|
children: "Login"
|
|
2011
2050
|
}
|
|
2012
2051
|
),
|
|
2013
|
-
|
|
2014
|
-
|
|
2052
|
+
u && /* @__PURE__ */ t.jsx(
|
|
2053
|
+
D,
|
|
2015
2054
|
{
|
|
2016
2055
|
onClick: () => {
|
|
2017
|
-
r("/customer-dash"),
|
|
2056
|
+
r("/customer-dash"), i == null || i();
|
|
2018
2057
|
},
|
|
2019
2058
|
type: "Primary",
|
|
2020
2059
|
style: {
|
|
@@ -2025,27 +2064,27 @@ const es = (d) => {
|
|
|
2025
2064
|
}
|
|
2026
2065
|
)
|
|
2027
2066
|
] });
|
|
2028
|
-
},
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2067
|
+
}, Us = ({
|
|
2068
|
+
logo: u,
|
|
2069
|
+
setIsOpen: i,
|
|
2070
|
+
signUp: a,
|
|
2071
|
+
pages: s
|
|
2033
2072
|
}) => {
|
|
2034
2073
|
const { setIsOpen: e } = ct(), l = () => {
|
|
2035
2074
|
e(!1), setTimeout(() => {
|
|
2036
|
-
|
|
2075
|
+
i(!1), e(!0);
|
|
2037
2076
|
}, 300);
|
|
2038
2077
|
};
|
|
2039
2078
|
return /* @__PURE__ */ t.jsxs(
|
|
2040
2079
|
"div",
|
|
2041
2080
|
{
|
|
2042
|
-
className:
|
|
2081
|
+
className: w.pagesMobileModal,
|
|
2043
2082
|
onClick: (r) => r.stopPropagation(),
|
|
2044
2083
|
children: [
|
|
2045
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2046
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
2084
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.pagesMobileModalHeader, children: [
|
|
2085
|
+
/* @__PURE__ */ t.jsx("div", { children: u }),
|
|
2047
2086
|
/* @__PURE__ */ t.jsx(
|
|
2048
|
-
|
|
2087
|
+
D,
|
|
2049
2088
|
{
|
|
2050
2089
|
type: "Secondary",
|
|
2051
2090
|
onClick: l,
|
|
@@ -2053,74 +2092,84 @@ const es = (d) => {
|
|
|
2053
2092
|
}
|
|
2054
2093
|
)
|
|
2055
2094
|
] }),
|
|
2056
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2057
|
-
|
|
2058
|
-
qt,
|
|
2095
|
+
/* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalContent, children: s.length > 0 && s.map((r) => /* @__PURE__ */ t.jsx(
|
|
2096
|
+
"div",
|
|
2059
2097
|
{
|
|
2060
|
-
|
|
2098
|
+
className: w.pageLink,
|
|
2099
|
+
onClick: l,
|
|
2100
|
+
children: /* @__PURE__ */ t.jsx(
|
|
2101
|
+
Tt,
|
|
2102
|
+
{
|
|
2103
|
+
path: r.path,
|
|
2104
|
+
children: r.name["en-US"]
|
|
2105
|
+
},
|
|
2106
|
+
r.id
|
|
2107
|
+
)
|
|
2108
|
+
}
|
|
2109
|
+
)) }),
|
|
2110
|
+
/* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
|
|
2111
|
+
Ot,
|
|
2112
|
+
{
|
|
2113
|
+
signUp: a,
|
|
2061
2114
|
close: l
|
|
2062
2115
|
}
|
|
2063
2116
|
) })
|
|
2064
2117
|
]
|
|
2065
2118
|
}
|
|
2066
2119
|
);
|
|
2067
|
-
},
|
|
2068
|
-
|
|
2069
|
-
logo: n,
|
|
2070
|
-
signUp: a
|
|
2071
|
-
}) => {
|
|
2072
|
-
const [s, e] = g.useState(!1);
|
|
2120
|
+
}, Un = ({ logo: u, signUp: i, pages: a }) => {
|
|
2121
|
+
const [s, e] = f.useState(!1);
|
|
2073
2122
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2074
|
-
/* @__PURE__ */ t.jsx(
|
|
2123
|
+
/* @__PURE__ */ t.jsx(zs, { setIsOpenModal: e }),
|
|
2075
2124
|
s && /* @__PURE__ */ t.jsx(
|
|
2076
2125
|
ut,
|
|
2077
2126
|
{
|
|
2078
2127
|
close: () => e(!1),
|
|
2079
2128
|
hasPadding: !1,
|
|
2080
2129
|
children: /* @__PURE__ */ t.jsx(
|
|
2081
|
-
|
|
2130
|
+
Us,
|
|
2082
2131
|
{
|
|
2083
|
-
logo:
|
|
2132
|
+
logo: u,
|
|
2084
2133
|
setIsOpen: e,
|
|
2085
|
-
signUp:
|
|
2086
|
-
|
|
2134
|
+
signUp: i,
|
|
2135
|
+
pages: a
|
|
2087
2136
|
}
|
|
2088
2137
|
)
|
|
2089
2138
|
}
|
|
2090
2139
|
)
|
|
2091
2140
|
] });
|
|
2092
|
-
},
|
|
2093
|
-
const { setIsOpenModal:
|
|
2141
|
+
}, zs = (u) => {
|
|
2142
|
+
const { setIsOpenModal: i } = u;
|
|
2094
2143
|
return /* @__PURE__ */ t.jsx(
|
|
2095
|
-
|
|
2144
|
+
D,
|
|
2096
2145
|
{
|
|
2097
2146
|
type: "Secondary",
|
|
2098
2147
|
style: {
|
|
2099
2148
|
padding: 10
|
|
2100
2149
|
},
|
|
2101
2150
|
onClick: (a) => {
|
|
2102
|
-
a.stopPropagation(), window.location.pathname.includes("/admin/builder") ||
|
|
2151
|
+
a.stopPropagation(), window.location.pathname.includes("/admin/builder") || i(!0);
|
|
2103
2152
|
},
|
|
2104
2153
|
children: /* @__PURE__ */ t.jsx(b, { name: "List" })
|
|
2105
2154
|
}
|
|
2106
2155
|
);
|
|
2107
|
-
},
|
|
2108
|
-
share:
|
|
2109
|
-
modal:
|
|
2110
|
-
header:
|
|
2111
|
-
title:
|
|
2112
|
-
copyWrapper:
|
|
2113
|
-
copyText:
|
|
2114
|
-
copyTextMobile:
|
|
2115
|
-
copyTextMiniMobile:
|
|
2116
|
-
},
|
|
2117
|
-
const { isOpenModal:
|
|
2156
|
+
}, Hs = "_share_rlgln_1", Fs = "_modal_rlgln_8", Vs = "_header_rlgln_20", Ys = "_title_rlgln_46", Gs = "_copyWrapper_rlgln_52", Ws = "_copyText_rlgln_61", Xs = "_copyTextMobile_rlgln_74", Qs = "_copyTextMiniMobile_rlgln_93", nt = {
|
|
2157
|
+
share: Hs,
|
|
2158
|
+
modal: Fs,
|
|
2159
|
+
header: Vs,
|
|
2160
|
+
title: Ys,
|
|
2161
|
+
copyWrapper: Gs,
|
|
2162
|
+
copyText: Ws,
|
|
2163
|
+
copyTextMobile: Xs,
|
|
2164
|
+
copyTextMiniMobile: Qs
|
|
2165
|
+
}, zn = ({ title: u = "Copy Product Link" }) => {
|
|
2166
|
+
const { isOpenModal: i, setIsOpenModal: a } = Mt();
|
|
2118
2167
|
function s() {
|
|
2119
2168
|
a(!0);
|
|
2120
2169
|
}
|
|
2121
2170
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2122
2171
|
/* @__PURE__ */ t.jsx(
|
|
2123
|
-
|
|
2172
|
+
D,
|
|
2124
2173
|
{
|
|
2125
2174
|
className: nt.share,
|
|
2126
2175
|
onClick: (e) => {
|
|
@@ -2137,49 +2186,49 @@ const es = (d) => {
|
|
|
2137
2186
|
)
|
|
2138
2187
|
}
|
|
2139
2188
|
),
|
|
2140
|
-
|
|
2189
|
+
i && /* @__PURE__ */ t.jsx(ut, { close: a, children: /* @__PURE__ */ t.jsx(Js, { title: u }) })
|
|
2141
2190
|
] });
|
|
2142
|
-
},
|
|
2143
|
-
const { setIsOpenModal:
|
|
2191
|
+
}, Js = ({ title: u = "Copy Product Link" }) => {
|
|
2192
|
+
const { setIsOpenModal: i } = Mt(), { notifications: a, setNotifications: s } = kt(), { setIsOpen: e } = ct(), l = window.location.href;
|
|
2144
2193
|
function r() {
|
|
2145
2194
|
navigator.clipboard.writeText(l), s([
|
|
2146
2195
|
...a,
|
|
2147
2196
|
{
|
|
2148
|
-
id:
|
|
2197
|
+
id: Q(),
|
|
2149
2198
|
message: "Link copied to clipboard",
|
|
2150
2199
|
status: "success"
|
|
2151
2200
|
}
|
|
2152
2201
|
]);
|
|
2153
2202
|
}
|
|
2154
|
-
function
|
|
2203
|
+
function g() {
|
|
2155
2204
|
e(!1), setTimeout(() => {
|
|
2156
|
-
|
|
2205
|
+
i(!1), e(!0);
|
|
2157
2206
|
}, 300);
|
|
2158
2207
|
}
|
|
2159
|
-
function
|
|
2160
|
-
return
|
|
2208
|
+
function _(j, T) {
|
|
2209
|
+
return j.length > T ? j.slice(0, T) + "..." : j;
|
|
2161
2210
|
}
|
|
2162
2211
|
return /* @__PURE__ */ t.jsxs(
|
|
2163
2212
|
"div",
|
|
2164
2213
|
{
|
|
2165
2214
|
className: nt.modal,
|
|
2166
|
-
onClick: (
|
|
2215
|
+
onClick: (j) => j.stopPropagation(),
|
|
2167
2216
|
children: [
|
|
2168
2217
|
/* @__PURE__ */ t.jsxs("div", { className: nt.header, children: [
|
|
2169
|
-
/* @__PURE__ */ t.jsx("div", { className: nt.title, children:
|
|
2218
|
+
/* @__PURE__ */ t.jsx("div", { className: nt.title, children: u }),
|
|
2170
2219
|
/* @__PURE__ */ t.jsx(
|
|
2171
2220
|
b,
|
|
2172
2221
|
{
|
|
2173
2222
|
name: "X",
|
|
2174
2223
|
fill: "#757575",
|
|
2175
|
-
onClick:
|
|
2224
|
+
onClick: g,
|
|
2176
2225
|
hoverable: !0
|
|
2177
2226
|
}
|
|
2178
2227
|
)
|
|
2179
2228
|
] }),
|
|
2180
2229
|
/* @__PURE__ */ t.jsxs("div", { className: nt.copyWrapper, children: [
|
|
2181
2230
|
/* @__PURE__ */ t.jsxs(
|
|
2182
|
-
|
|
2231
|
+
D,
|
|
2183
2232
|
{
|
|
2184
2233
|
type: "Secondary",
|
|
2185
2234
|
onClick: r,
|
|
@@ -2187,19 +2236,19 @@ const es = (d) => {
|
|
|
2187
2236
|
flex: 1
|
|
2188
2237
|
},
|
|
2189
2238
|
children: [
|
|
2190
|
-
/* @__PURE__ */ t.jsx("div", { className: nt.copyText, children:
|
|
2191
|
-
/* @__PURE__ */ t.jsx("div", { className: nt.copyTextMobile, children:
|
|
2192
|
-
/* @__PURE__ */ t.jsx("div", { className: nt.copyTextMiniMobile, children:
|
|
2239
|
+
/* @__PURE__ */ t.jsx("div", { className: nt.copyText, children: _(l, 100) }),
|
|
2240
|
+
/* @__PURE__ */ t.jsx("div", { className: nt.copyTextMobile, children: _(l, 40) }),
|
|
2241
|
+
/* @__PURE__ */ t.jsx("div", { className: nt.copyTextMiniMobile, children: _(l, 20) })
|
|
2193
2242
|
]
|
|
2194
2243
|
}
|
|
2195
2244
|
),
|
|
2196
2245
|
/* @__PURE__ */ t.jsx(
|
|
2197
|
-
|
|
2246
|
+
D,
|
|
2198
2247
|
{
|
|
2199
2248
|
type: "Secondary",
|
|
2200
2249
|
onClick: r,
|
|
2201
2250
|
children: a.find(
|
|
2202
|
-
(
|
|
2251
|
+
(j) => j.message === "Link copied to clipboard"
|
|
2203
2252
|
) ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
|
|
2204
2253
|
}
|
|
2205
2254
|
)
|
|
@@ -2207,104 +2256,78 @@ const es = (d) => {
|
|
|
2207
2256
|
]
|
|
2208
2257
|
}
|
|
2209
2258
|
);
|
|
2210
|
-
},
|
|
2211
|
-
accordion:
|
|
2212
|
-
header:
|
|
2213
|
-
icon:
|
|
2214
|
-
open:
|
|
2215
|
-
content:
|
|
2216
|
-
},
|
|
2217
|
-
const [s, e] =
|
|
2259
|
+
}, Ks = "_accordion_1to77_1", Zs = "_header_1to77_9", tn = "_icon_1to77_18", en = "_open_1to77_21", sn = "_content_1to77_25", rt = {
|
|
2260
|
+
accordion: Ks,
|
|
2261
|
+
header: Zs,
|
|
2262
|
+
icon: tn,
|
|
2263
|
+
open: en,
|
|
2264
|
+
content: sn
|
|
2265
|
+
}, Hn = ({ title: u, content: i, defaultOpen: a = !1 }) => {
|
|
2266
|
+
const [s, e] = f.useState(a), [l, r] = f.useState(0), g = f.useRef(null), _ = () => {
|
|
2218
2267
|
e(!s);
|
|
2219
2268
|
};
|
|
2220
|
-
return
|
|
2221
|
-
|
|
2269
|
+
return f.useEffect(() => {
|
|
2270
|
+
g.current && r(s ? g.current.scrollHeight : 0);
|
|
2222
2271
|
}, [s]), /* @__PURE__ */ t.jsxs("div", { className: rt.accordion, children: [
|
|
2223
2272
|
/* @__PURE__ */ t.jsxs(
|
|
2224
2273
|
"div",
|
|
2225
2274
|
{
|
|
2226
2275
|
className: rt.header,
|
|
2227
|
-
onClick:
|
|
2276
|
+
onClick: _,
|
|
2228
2277
|
children: [
|
|
2229
|
-
/* @__PURE__ */ t.jsx("h5", { id: "h5", children:
|
|
2230
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2278
|
+
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: u }),
|
|
2279
|
+
/* @__PURE__ */ t.jsx("div", { className: H(rt.icon, { [rt.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
|
|
2231
2280
|
]
|
|
2232
2281
|
}
|
|
2233
2282
|
),
|
|
2234
2283
|
/* @__PURE__ */ t.jsx(
|
|
2235
2284
|
"div",
|
|
2236
2285
|
{
|
|
2237
|
-
ref:
|
|
2286
|
+
ref: g,
|
|
2238
2287
|
className: rt.content,
|
|
2239
2288
|
style: { height: `${l}px` },
|
|
2240
|
-
children: /* @__PURE__ */ t.jsx("p", { id: "p", children:
|
|
2289
|
+
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: i })
|
|
2241
2290
|
}
|
|
2242
2291
|
)
|
|
2243
2292
|
] });
|
|
2244
|
-
},
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
className: a,
|
|
2250
|
-
role: "link",
|
|
2251
|
-
style: { cursor: "pointer" },
|
|
2252
|
-
id: e,
|
|
2253
|
-
children: d
|
|
2254
|
-
}
|
|
2255
|
-
);
|
|
2256
|
-
const l = yt(), r = /^https?:\/\//.test(n), h = (f) => {
|
|
2257
|
-
r || s === "_blank" ? s === "_blank" ? window.open(n, "_blank") : window.open(n, "_self") : (f.preventDefault(), l(n, { replace: !1 }));
|
|
2258
|
-
};
|
|
2259
|
-
return /* @__PURE__ */ t.jsx(
|
|
2260
|
-
"div",
|
|
2261
|
-
{
|
|
2262
|
-
onClick: h,
|
|
2263
|
-
className: a,
|
|
2264
|
-
role: "link",
|
|
2265
|
-
style: { cursor: "pointer" },
|
|
2266
|
-
id: e,
|
|
2267
|
-
children: d
|
|
2268
|
-
}
|
|
2269
|
-
);
|
|
2270
|
-
}, tn = "_buttonsBlock_1b2rb_1", en = {
|
|
2271
|
-
buttonsBlock: tn
|
|
2272
|
-
}, Vn = (d) => {
|
|
2273
|
-
var v, M;
|
|
2274
|
-
const { setIsOpen: n, setModalType: a, productId: s } = d, { cart: e } = ot(), { pageContext: l } = bt(), r = (v = l == null ? void 0 : l.listings) == null ? void 0 : v.find((x) => x.id === s);
|
|
2293
|
+
}, nn = "_buttonsBlock_1b2rb_1", an = {
|
|
2294
|
+
buttonsBlock: nn
|
|
2295
|
+
}, Fn = (u) => {
|
|
2296
|
+
var j, T;
|
|
2297
|
+
const { setIsOpen: i, setModalType: a, productId: s } = u, { cart: e } = ot(), { pageContext: l } = yt(), r = (j = l == null ? void 0 : l.listings) == null ? void 0 : j.find((x) => x.id === s);
|
|
2275
2298
|
if (!r)
|
|
2276
2299
|
return null;
|
|
2277
|
-
const
|
|
2300
|
+
const g = (T = l == null ? void 0 : l.products) == null ? void 0 : T.find(
|
|
2278
2301
|
(x) => x.uniquePath === r.productData.uniquePath
|
|
2279
2302
|
);
|
|
2280
|
-
if (!
|
|
2303
|
+
if (!g)
|
|
2281
2304
|
return null;
|
|
2282
|
-
const
|
|
2305
|
+
const _ = e.parts.find((x) => x.productId === g.id);
|
|
2283
2306
|
return /* @__PURE__ */ t.jsxs(
|
|
2284
2307
|
"div",
|
|
2285
2308
|
{
|
|
2286
|
-
className:
|
|
2309
|
+
className: an.buttonsBlock,
|
|
2287
2310
|
onClick: (x) => x.stopPropagation(),
|
|
2288
2311
|
children: [
|
|
2289
2312
|
/* @__PURE__ */ t.jsx(
|
|
2290
|
-
|
|
2313
|
+
D,
|
|
2291
2314
|
{
|
|
2292
2315
|
type: "Secondary",
|
|
2293
2316
|
style: {
|
|
2294
2317
|
width: "100%"
|
|
2295
2318
|
},
|
|
2296
2319
|
onClick: () => {
|
|
2297
|
-
a("Add To Cart"),
|
|
2320
|
+
a("Add To Cart"), i(!0);
|
|
2298
2321
|
},
|
|
2299
|
-
children:
|
|
2322
|
+
children: _ ? "Add More" : "Add To Cart"
|
|
2300
2323
|
}
|
|
2301
2324
|
),
|
|
2302
2325
|
/* @__PURE__ */ t.jsx(
|
|
2303
|
-
|
|
2326
|
+
D,
|
|
2304
2327
|
{
|
|
2305
2328
|
type: "Primary",
|
|
2306
2329
|
onClick: () => {
|
|
2307
|
-
a("Buy Now"),
|
|
2330
|
+
a("Buy Now"), i(!0);
|
|
2308
2331
|
},
|
|
2309
2332
|
children: "Buy"
|
|
2310
2333
|
}
|
|
@@ -2312,13 +2335,13 @@ const es = (d) => {
|
|
|
2312
2335
|
]
|
|
2313
2336
|
}
|
|
2314
2337
|
);
|
|
2315
|
-
},
|
|
2316
|
-
wrapper:
|
|
2317
|
-
logo:
|
|
2318
|
-
info:
|
|
2319
|
-
},
|
|
2320
|
-
const { general:
|
|
2321
|
-
if (!
|
|
2338
|
+
}, on = "_wrapper_27wzz_1", cn = "_logo_27wzz_8", rn = "_info_27wzz_12", It = {
|
|
2339
|
+
wrapper: on,
|
|
2340
|
+
logo: cn,
|
|
2341
|
+
info: rn
|
|
2342
|
+
}, Vn = ({ date: u }) => {
|
|
2343
|
+
const { general: i } = Ht();
|
|
2344
|
+
if (!i) return /* @__PURE__ */ t.jsx(t.Fragment, {});
|
|
2322
2345
|
function a(s) {
|
|
2323
2346
|
const e = new Date(s), l = {
|
|
2324
2347
|
month: "short",
|
|
@@ -2330,11 +2353,11 @@ const es = (d) => {
|
|
|
2330
2353
|
};
|
|
2331
2354
|
return e.toLocaleDateString("en-US", l);
|
|
2332
2355
|
}
|
|
2333
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2334
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2356
|
+
return /* @__PURE__ */ t.jsxs("div", { className: It.wrapper, children: [
|
|
2357
|
+
/* @__PURE__ */ t.jsx("div", { className: It.logo, children: i.info.logo ? /* @__PURE__ */ t.jsx(
|
|
2335
2358
|
"img",
|
|
2336
2359
|
{
|
|
2337
|
-
src: `https://imagedelivery.net/${
|
|
2360
|
+
src: `https://imagedelivery.net/${i.info.logo.cfId}/w=500,h=500`,
|
|
2338
2361
|
alt: "image",
|
|
2339
2362
|
style: { objectFit: "contain", width: "48px", height: "48px" }
|
|
2340
2363
|
}
|
|
@@ -2346,106 +2369,112 @@ const es = (d) => {
|
|
|
2346
2369
|
height: 48
|
|
2347
2370
|
}
|
|
2348
2371
|
) }),
|
|
2349
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2350
|
-
/* @__PURE__ */ t.jsx("h3", { id: "h4", children:
|
|
2351
|
-
/* @__PURE__ */ t.jsx("p", { id: "p", children: a(
|
|
2372
|
+
/* @__PURE__ */ t.jsxs("div", { className: It.info, children: [
|
|
2373
|
+
/* @__PURE__ */ t.jsx("h3", { id: "h4", children: i.info.name }),
|
|
2374
|
+
/* @__PURE__ */ t.jsx("p", { id: "p", children: a(u) })
|
|
2352
2375
|
] })
|
|
2353
2376
|
] });
|
|
2354
|
-
},
|
|
2355
|
-
variants:
|
|
2356
|
-
variant:
|
|
2357
|
-
stock:
|
|
2358
|
-
variantInfo:
|
|
2359
|
-
chargeTypes: dn,
|
|
2360
|
-
charge: un,
|
|
2361
|
-
chargeActive: hn,
|
|
2377
|
+
}, ln = "_variants_hphv8_80", dn = "_variant_hphv8_80", un = "_stock_hphv8_98", hn = "_variantInfo_hphv8_105", pn = "_title_hphv8_199", mn = "_modal_hphv8_205", gn = "_header_hphv8_225", fn = "_productOptions_hphv8_233", xn = "_loading_hphv8_237", tt = {
|
|
2378
|
+
variants: ln,
|
|
2379
|
+
variant: dn,
|
|
2380
|
+
stock: un,
|
|
2381
|
+
variantInfo: hn,
|
|
2362
2382
|
title: pn,
|
|
2363
2383
|
modal: mn,
|
|
2364
2384
|
header: gn,
|
|
2365
2385
|
productOptions: fn,
|
|
2366
2386
|
loading: xn
|
|
2367
|
-
},
|
|
2368
|
-
var
|
|
2369
|
-
const { pageContext:
|
|
2370
|
-
|
|
2371
|
-
), { addProducts:
|
|
2372
|
-
return
|
|
2387
|
+
}, Yn = (u) => {
|
|
2388
|
+
var p;
|
|
2389
|
+
const { pageContext: i } = yt(), a = (p = i == null ? void 0 : i.listings) == null ? void 0 : p.find((v) => v.id === u.productId), [s, e] = f.useState(!0), [l, r] = f.useState(null), g = (l == null ? void 0 : l.variants[0]) || null, [_, j] = f.useState(
|
|
2390
|
+
"ONE_TIME"
|
|
2391
|
+
), { addProducts: T } = ot(), { setIsOpen: x } = ct();
|
|
2392
|
+
return f.useEffect(() => {
|
|
2373
2393
|
(async () => {
|
|
2374
2394
|
e(!0);
|
|
2375
|
-
const
|
|
2395
|
+
const c = await Ft(
|
|
2376
2396
|
encodeURIComponent(
|
|
2377
2397
|
`/product/${a.productData.uniquePath}`
|
|
2378
2398
|
)
|
|
2379
2399
|
);
|
|
2380
|
-
|
|
2400
|
+
T(c == null ? void 0 : c.data.products), r(c == null ? void 0 : c.data.products[0]), e(!1);
|
|
2381
2401
|
})();
|
|
2382
|
-
}, []),
|
|
2402
|
+
}, []), f.useEffect(() => {
|
|
2383
2403
|
x(!0);
|
|
2384
|
-
}, []), /* @__PURE__ */ t.jsx(ut, { close:
|
|
2404
|
+
}, []), /* @__PURE__ */ t.jsx(ut, { close: u.setIsOpen, children: /* @__PURE__ */ t.jsxs(
|
|
2385
2405
|
"div",
|
|
2386
2406
|
{
|
|
2387
|
-
className:
|
|
2388
|
-
onClick: (
|
|
2407
|
+
className: tt.modal,
|
|
2408
|
+
onClick: (v) => v.stopPropagation(),
|
|
2389
2409
|
children: [
|
|
2390
|
-
s && /* @__PURE__ */ t.jsx("div", { className:
|
|
2391
|
-
|
|
2410
|
+
s && /* @__PURE__ */ t.jsx("div", { className: tt.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) }),
|
|
2411
|
+
u.type === "Add To Cart" && l && g && !s && /* @__PURE__ */ t.jsx(
|
|
2392
2412
|
_n,
|
|
2393
2413
|
{
|
|
2394
2414
|
variants: l.variants,
|
|
2395
|
-
activeVariant:
|
|
2396
|
-
activeChargeType:
|
|
2397
|
-
setActiveChargeType:
|
|
2415
|
+
activeVariant: g,
|
|
2416
|
+
activeChargeType: _,
|
|
2417
|
+
setActiveChargeType: j,
|
|
2398
2418
|
productId: l.id,
|
|
2399
|
-
setIsOpen:
|
|
2419
|
+
setIsOpen: u.setIsOpen
|
|
2400
2420
|
}
|
|
2401
2421
|
),
|
|
2402
|
-
|
|
2422
|
+
u.type === "Buy Now" && l && !s && /* @__PURE__ */ t.jsx(
|
|
2403
2423
|
jn,
|
|
2404
2424
|
{
|
|
2405
2425
|
product: l,
|
|
2406
|
-
setIsOpen:
|
|
2426
|
+
setIsOpen: u.setIsOpen
|
|
2407
2427
|
}
|
|
2408
2428
|
)
|
|
2409
2429
|
]
|
|
2410
2430
|
}
|
|
2411
2431
|
) });
|
|
2412
|
-
}, _n = (
|
|
2413
|
-
const { variants:
|
|
2414
|
-
|
|
2415
|
-
|
|
2432
|
+
}, _n = (u) => {
|
|
2433
|
+
const { variants: i, activeChargeType: a, productId: s, setIsOpen: e } = u, { cart: l, addProductToCart: r, addProducts: g, updateQuantityOfProduct: _ } = ot(), { notifications: j, setNotifications: T } = kt(), { pageContext: x } = yt(), { setIsOpen: p } = ct(), v = () => {
|
|
2434
|
+
p(!1), setTimeout(() => {
|
|
2435
|
+
e(!1);
|
|
2416
2436
|
}, 300);
|
|
2417
2437
|
};
|
|
2418
|
-
async function
|
|
2419
|
-
const
|
|
2420
|
-
(
|
|
2438
|
+
async function c(n) {
|
|
2439
|
+
const o = i.find((M) => M.id === n), k = l.parts.find(
|
|
2440
|
+
(M) => M.productId === u.productId && M.productVariantId === n
|
|
2421
2441
|
);
|
|
2422
|
-
if (
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2442
|
+
if ((o == null ? void 0 : o.quantity.available) && (o == null ? void 0 : o.quantity.restrictions) && ((k == null ? void 0 : k.quantity) || 0) + 1 > (o == null ? void 0 : o.quantity.restrictions.max) || (o == null ? void 0 : o.quantity.available) === 0 || (o == null ? void 0 : o.quantity.available) && ((k == null ? void 0 : k.quantity) || 0) + 1 > (o == null ? void 0 : o.quantity.available)) {
|
|
2443
|
+
T([
|
|
2444
|
+
...j,
|
|
2445
|
+
{ id: Q(), message: "Product is out of stock", status: "error" }
|
|
2446
|
+
]);
|
|
2447
|
+
return;
|
|
2448
|
+
}
|
|
2449
|
+
if (k)
|
|
2450
|
+
_({
|
|
2451
|
+
productId: s,
|
|
2452
|
+
productVariantId: n,
|
|
2453
|
+
quantity: k.quantity + 1,
|
|
2454
|
+
chargeType: a
|
|
2427
2455
|
});
|
|
2428
2456
|
else {
|
|
2429
|
-
|
|
2457
|
+
x != null && x.products && g(x.products);
|
|
2430
2458
|
try {
|
|
2431
|
-
|
|
2432
|
-
productId:
|
|
2433
|
-
productVariantId:
|
|
2434
|
-
quantity: 1
|
|
2435
|
-
|
|
2436
|
-
|
|
2459
|
+
r({
|
|
2460
|
+
productId: s,
|
|
2461
|
+
productVariantId: n,
|
|
2462
|
+
quantity: 1,
|
|
2463
|
+
chargeType: a
|
|
2464
|
+
}), T([
|
|
2465
|
+
...j,
|
|
2437
2466
|
{
|
|
2438
|
-
id:
|
|
2467
|
+
id: Q(),
|
|
2439
2468
|
message: "Product added to cart",
|
|
2440
2469
|
status: "success"
|
|
2441
2470
|
}
|
|
2442
2471
|
]);
|
|
2443
|
-
} catch (
|
|
2444
|
-
|
|
2445
|
-
...
|
|
2472
|
+
} catch (M) {
|
|
2473
|
+
T([
|
|
2474
|
+
...j,
|
|
2446
2475
|
{
|
|
2447
|
-
id:
|
|
2448
|
-
message: `Product failed to add to cart: ${
|
|
2476
|
+
id: Q(),
|
|
2477
|
+
message: `Product failed to add to cart: ${M}`,
|
|
2449
2478
|
status: "error"
|
|
2450
2479
|
}
|
|
2451
2480
|
]);
|
|
@@ -2453,7 +2482,7 @@ const es = (d) => {
|
|
|
2453
2482
|
}
|
|
2454
2483
|
}
|
|
2455
2484
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2456
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2485
|
+
/* @__PURE__ */ t.jsxs("div", { className: tt.header, children: [
|
|
2457
2486
|
/* @__PURE__ */ t.jsx("div", { id: "h3", children: "Choose a Variant" }),
|
|
2458
2487
|
/* @__PURE__ */ t.jsx(
|
|
2459
2488
|
b,
|
|
@@ -2463,60 +2492,52 @@ const es = (d) => {
|
|
|
2463
2492
|
height: 24,
|
|
2464
2493
|
fill: "var(--text-secondary)",
|
|
2465
2494
|
hoverable: !0,
|
|
2466
|
-
onClick:
|
|
2495
|
+
onClick: v
|
|
2467
2496
|
}
|
|
2468
2497
|
)
|
|
2469
2498
|
] }),
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
}),
|
|
2476
|
-
onClick: () => s(j),
|
|
2477
|
-
children: kt[j]
|
|
2478
|
-
},
|
|
2479
|
-
j
|
|
2480
|
-
)) }),
|
|
2481
|
-
/* @__PURE__ */ t.jsx("div", { className: Q.variants, children: n.map((j) => {
|
|
2482
|
-
var N, k, D;
|
|
2499
|
+
/* @__PURE__ */ t.jsx("div", { className: tt.variants, children: i.filter((n) => {
|
|
2500
|
+
var o;
|
|
2501
|
+
return (o = n.chargeTypes) == null ? void 0 : o.includes(a);
|
|
2502
|
+
}).map((n) => {
|
|
2503
|
+
var o, k, y;
|
|
2483
2504
|
return /* @__PURE__ */ t.jsxs(
|
|
2484
2505
|
"div",
|
|
2485
2506
|
{
|
|
2486
|
-
className:
|
|
2507
|
+
className: H(tt.variant),
|
|
2487
2508
|
onClick: () => {
|
|
2488
|
-
|
|
2509
|
+
c(n.id), e(!1);
|
|
2489
2510
|
},
|
|
2490
2511
|
children: [
|
|
2491
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2492
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2493
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
2494
|
-
amount: a === "ONE_TIME" ?
|
|
2495
|
-
currency: a === "ONE_TIME" ?
|
|
2512
|
+
/* @__PURE__ */ t.jsxs("div", { className: tt.variantInfo, children: [
|
|
2513
|
+
/* @__PURE__ */ t.jsx("span", { className: tt.title, children: n.name }),
|
|
2514
|
+
/* @__PURE__ */ t.jsx("span", { children: Z({
|
|
2515
|
+
amount: a === "ONE_TIME" ? n.price.amount : n.subscriptionSettings ? n.subscriptionSettings.price.amount : 0,
|
|
2516
|
+
currency: a === "ONE_TIME" ? n.price.currency : ((o = n.subscriptionSettings) == null ? void 0 : o.price.currency) || "USD"
|
|
2496
2517
|
}) })
|
|
2497
2518
|
] }),
|
|
2498
|
-
/* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2499
|
-
(k =
|
|
2519
|
+
/* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: tt.stock, children: [
|
|
2520
|
+
(k = n.quantity.restrictions) != null && k.max || n.quantity.available !== void 0 ? ((y = n.quantity.restrictions) == null ? void 0 : y.max) || n.quantity.available : "∞",
|
|
2500
2521
|
" ",
|
|
2501
2522
|
"in stock"
|
|
2502
2523
|
] }) })
|
|
2503
2524
|
]
|
|
2504
2525
|
},
|
|
2505
|
-
|
|
2526
|
+
n.id
|
|
2506
2527
|
);
|
|
2507
2528
|
}) })
|
|
2508
2529
|
] });
|
|
2509
|
-
}, jn = (
|
|
2510
|
-
const { product:
|
|
2530
|
+
}, jn = (u) => {
|
|
2531
|
+
const { product: i, setIsOpen: a } = u, { setIsOpen: s } = ct(), e = () => {
|
|
2511
2532
|
s(!1), setTimeout(() => {
|
|
2512
2533
|
a(!1);
|
|
2513
2534
|
}, 300);
|
|
2514
2535
|
};
|
|
2515
2536
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2516
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2537
|
+
/* @__PURE__ */ t.jsxs("div", { className: tt.header, children: [
|
|
2517
2538
|
/* @__PURE__ */ t.jsxs("div", { id: "h3", children: [
|
|
2518
2539
|
"Buy ",
|
|
2519
|
-
at(
|
|
2540
|
+
at(i.name)
|
|
2520
2541
|
] }),
|
|
2521
2542
|
/* @__PURE__ */ t.jsx(
|
|
2522
2543
|
b,
|
|
@@ -2534,56 +2555,64 @@ const es = (d) => {
|
|
|
2534
2555
|
}
|
|
2535
2556
|
)
|
|
2536
2557
|
] }),
|
|
2537
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2538
|
-
|
|
2558
|
+
/* @__PURE__ */ t.jsx("div", { className: tt.productOptions, children: /* @__PURE__ */ t.jsx(
|
|
2559
|
+
ns,
|
|
2539
2560
|
{
|
|
2540
|
-
product:
|
|
2561
|
+
product: i,
|
|
2541
2562
|
setIsOpen: a
|
|
2542
2563
|
}
|
|
2543
2564
|
) })
|
|
2544
2565
|
] });
|
|
2545
|
-
}, vn = "
|
|
2566
|
+
}, vn = "_contentModal_1bixq_1", yn = "_modalTop_1bixq_13", bn = "_loading_1bixq_19", In = "_modalCards_1bixq_27", Nn = "_modalImage_1bixq_32", kn = "_card_1bixq_37", Cn = "_cardInfo_1bixq_49", Sn = "_cardButtons_1bixq_56", wn = "_title_1bixq_62", Pn = "_blockImage_1bixq_69", Tn = "_short_1bixq_78", G = {
|
|
2546
2567
|
contentModal: vn,
|
|
2547
|
-
modalTop:
|
|
2548
|
-
loading:
|
|
2568
|
+
modalTop: yn,
|
|
2569
|
+
loading: bn,
|
|
2549
2570
|
modalCards: In,
|
|
2550
2571
|
modalImage: Nn,
|
|
2551
|
-
card:
|
|
2552
|
-
cardInfo:
|
|
2553
|
-
cardButtons:
|
|
2572
|
+
card: kn,
|
|
2573
|
+
cardInfo: Cn,
|
|
2574
|
+
cardButtons: Sn,
|
|
2554
2575
|
title: wn,
|
|
2555
|
-
blockImage: Pn
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2576
|
+
blockImage: Pn,
|
|
2577
|
+
short: Tn
|
|
2578
|
+
}, Gn = (u) => {
|
|
2579
|
+
const {
|
|
2580
|
+
setIsOpen: i,
|
|
2581
|
+
pageContext: a,
|
|
2582
|
+
groupData: s,
|
|
2583
|
+
setProductId: e,
|
|
2584
|
+
setIsProductModalOpen: l,
|
|
2585
|
+
setShowDropdown: r
|
|
2586
|
+
} = u, [g, _] = f.useState(null), [j, T] = f.useState(!0), { setIsOpen: x } = ct();
|
|
2587
|
+
f.useEffect(() => {
|
|
2588
|
+
var n;
|
|
2589
|
+
T(!0);
|
|
2590
|
+
const c = (n = a.listings) == null ? void 0 : n.filter(
|
|
2591
|
+
(o) => s.listingIdList.includes(o.id)
|
|
2563
2592
|
);
|
|
2564
|
-
|
|
2565
|
-
}, [a]),
|
|
2566
|
-
|
|
2593
|
+
c && _([...c]), T(!1);
|
|
2594
|
+
}, [a]), f.useEffect(() => {
|
|
2595
|
+
x(!0);
|
|
2567
2596
|
}, []);
|
|
2568
|
-
const
|
|
2569
|
-
|
|
2570
|
-
|
|
2597
|
+
const p = () => {
|
|
2598
|
+
x(!1), setTimeout(() => {
|
|
2599
|
+
i(!1);
|
|
2571
2600
|
}, 300);
|
|
2572
2601
|
};
|
|
2573
|
-
function c
|
|
2574
|
-
return
|
|
2602
|
+
function v(c) {
|
|
2603
|
+
return c.productData.compareAtPrice ? c.productData.compareAtPrice.amount : 0;
|
|
2575
2604
|
}
|
|
2576
|
-
return /* @__PURE__ */ t.jsx(ut, { close: () =>
|
|
2605
|
+
return /* @__PURE__ */ t.jsx(ut, { close: () => i(!1), children: /* @__PURE__ */ t.jsxs(
|
|
2577
2606
|
"div",
|
|
2578
2607
|
{
|
|
2579
|
-
className:
|
|
2580
|
-
onClick: (
|
|
2608
|
+
className: G.contentModal,
|
|
2609
|
+
onClick: (c) => c.stopPropagation(),
|
|
2581
2610
|
children: [
|
|
2582
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2611
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.modalTop, children: [
|
|
2583
2612
|
/* @__PURE__ */ t.jsx(
|
|
2584
2613
|
"span",
|
|
2585
2614
|
{
|
|
2586
|
-
className:
|
|
2615
|
+
className: G.title,
|
|
2587
2616
|
id: "h4",
|
|
2588
2617
|
children: at(s.name)
|
|
2589
2618
|
}
|
|
@@ -2593,116 +2622,127 @@ const es = (d) => {
|
|
|
2593
2622
|
{
|
|
2594
2623
|
name: "X",
|
|
2595
2624
|
hoverable: !0,
|
|
2596
|
-
onClick:
|
|
2625
|
+
onClick: p,
|
|
2626
|
+
fill: "var(--text-primary)"
|
|
2597
2627
|
}
|
|
2598
2628
|
)
|
|
2599
2629
|
] }),
|
|
2600
|
-
!
|
|
2630
|
+
!j && g && /* @__PURE__ */ t.jsx("div", { className: G.modalCards, children: g.map((c) => /* @__PURE__ */ t.jsxs(
|
|
2601
2631
|
"div",
|
|
2602
2632
|
{
|
|
2603
|
-
className:
|
|
2633
|
+
className: G.card,
|
|
2604
2634
|
children: [
|
|
2605
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
2635
|
+
/* @__PURE__ */ t.jsx("div", { children: c.productData.images[0] ? /* @__PURE__ */ t.jsx(
|
|
2606
2636
|
"img",
|
|
2607
2637
|
{
|
|
2608
|
-
src: `https://imagedelivery.net/${
|
|
2638
|
+
src: `https://imagedelivery.net/${c.productData.images[0].cfId}/w=500`,
|
|
2609
2639
|
alt: "",
|
|
2610
2640
|
width: 64,
|
|
2611
2641
|
height: 64,
|
|
2612
|
-
className:
|
|
2642
|
+
className: G.modalImage
|
|
2613
2643
|
}
|
|
2614
|
-
) : /* @__PURE__ */ t.jsx("div", { className:
|
|
2615
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2644
|
+
) : /* @__PURE__ */ t.jsx("div", { className: H(G.blockImage, G.modalImage), children: /* @__PURE__ */ t.jsx(b, { name: "Image" }) }) }),
|
|
2645
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.cardInfo, children: [
|
|
2616
2646
|
/* @__PURE__ */ t.jsxs(
|
|
2617
2647
|
"span",
|
|
2618
2648
|
{
|
|
2619
|
-
className:
|
|
2649
|
+
className: G.name,
|
|
2620
2650
|
id: "h5",
|
|
2621
2651
|
children: [
|
|
2622
|
-
at(
|
|
2652
|
+
at(c.productData.name),
|
|
2623
2653
|
" $",
|
|
2624
|
-
|
|
2654
|
+
c.productData.minPrice.amount,
|
|
2625
2655
|
" ",
|
|
2626
2656
|
"- $",
|
|
2627
|
-
c
|
|
2657
|
+
v(c)
|
|
2628
2658
|
]
|
|
2629
2659
|
}
|
|
2630
2660
|
),
|
|
2631
|
-
|
|
2661
|
+
c.productData.shortDescription && /* @__PURE__ */ t.jsx(
|
|
2632
2662
|
"span",
|
|
2633
2663
|
{
|
|
2634
|
-
className:
|
|
2664
|
+
className: G.short,
|
|
2635
2665
|
id: "md",
|
|
2636
|
-
children: at(
|
|
2666
|
+
children: at(c.productData.shortDescription)
|
|
2637
2667
|
}
|
|
2638
2668
|
),
|
|
2639
2669
|
/* @__PURE__ */ t.jsx("span", {})
|
|
2640
2670
|
] }),
|
|
2641
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2671
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.cardButtons, children: [
|
|
2642
2672
|
/* @__PURE__ */ t.jsx(
|
|
2643
|
-
|
|
2673
|
+
D,
|
|
2644
2674
|
{
|
|
2645
2675
|
type: "Secondary",
|
|
2646
2676
|
onClick: () => {
|
|
2647
|
-
e(
|
|
2677
|
+
e(c.id), i(!1), l(!0);
|
|
2648
2678
|
},
|
|
2649
2679
|
children: "Buy"
|
|
2650
2680
|
}
|
|
2651
2681
|
),
|
|
2652
|
-
/* @__PURE__ */ t.jsx(
|
|
2682
|
+
/* @__PURE__ */ t.jsx(Tt, { path: `/product/${c.productData.uniquePath}`, children: /* @__PURE__ */ t.jsx(
|
|
2683
|
+
D,
|
|
2684
|
+
{
|
|
2685
|
+
type: "Primary",
|
|
2686
|
+
style: { whiteSpace: "nowrap" },
|
|
2687
|
+
onClick: () => {
|
|
2688
|
+
r(!1), p();
|
|
2689
|
+
},
|
|
2690
|
+
children: "View Details"
|
|
2691
|
+
}
|
|
2692
|
+
) })
|
|
2653
2693
|
] })
|
|
2654
2694
|
]
|
|
2655
2695
|
},
|
|
2656
|
-
|
|
2696
|
+
c.id
|
|
2657
2697
|
)) }),
|
|
2658
|
-
|
|
2698
|
+
j && /* @__PURE__ */ t.jsx("div", { className: G.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) })
|
|
2659
2699
|
]
|
|
2660
2700
|
}
|
|
2661
2701
|
) });
|
|
2662
2702
|
};
|
|
2663
2703
|
export {
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2704
|
+
Hn as Accordion,
|
|
2705
|
+
zs as BurgerMenuButton,
|
|
2706
|
+
D as Button,
|
|
2667
2707
|
qe as ButtonTypeSettings,
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2708
|
+
Dn as ButtonsSettings,
|
|
2709
|
+
qn as CategorySettings,
|
|
2710
|
+
$t as ChargeTypes,
|
|
2711
|
+
At as ChooseImage,
|
|
2712
|
+
Qn as ChooseImageModal,
|
|
2713
|
+
Ls as EmptyCart,
|
|
2714
|
+
En as FormSettings,
|
|
2715
|
+
Gn as GroupCardModal,
|
|
2716
|
+
Ln as HeaderButtons,
|
|
2677
2717
|
b as Icon,
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2718
|
+
Nt as InputSettings,
|
|
2719
|
+
Lt as InputUI,
|
|
2720
|
+
Jn as ItemsSettings,
|
|
2721
|
+
On as LayoutSettings,
|
|
2722
|
+
Tt as Link,
|
|
2723
|
+
Rn as ListingSelector,
|
|
2684
2724
|
Bt as Loader,
|
|
2685
|
-
|
|
2725
|
+
Vn as MetaInfoPost,
|
|
2686
2726
|
ut as Modal,
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2727
|
+
Un as PagesMobileMenu,
|
|
2728
|
+
Us as PagesMobileModal,
|
|
2729
|
+
An as PagesSettings,
|
|
2730
|
+
Fn as ProductCardButtons,
|
|
2731
|
+
Yn as ProductCardModal,
|
|
2732
|
+
ns as ProductOptions,
|
|
2733
|
+
Kn as RadioUI,
|
|
2734
|
+
St as RangeSelector,
|
|
2695
2735
|
it as Select,
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2736
|
+
Zn as SelectInfiniteList,
|
|
2737
|
+
ti as SelectUI,
|
|
2738
|
+
zn as ShareLink,
|
|
2739
|
+
Ds as ShoppingButton,
|
|
2740
|
+
Rs as ShoppingModalCart,
|
|
2701
2741
|
lt as Switch,
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2742
|
+
ei as TextSettings,
|
|
2743
|
+
si as TextareaSettings,
|
|
2744
|
+
ni as TextareaUI,
|
|
2745
|
+
ii as TypesText,
|
|
2746
|
+
Ot as UserInfo,
|
|
2747
|
+
ai as Wrapper
|
|
2708
2748
|
};
|