@billgangcom/theme-lib 1.59.0 → 1.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abstractions/PageContext.d.ts +2 -1
- package/dist/builder/constants/general.d.ts +1 -1
- package/dist/builder.cjs.js +12 -12
- package/dist/builder.es.js +1517 -1526
- package/dist/{index-BV-uzi53.cjs → index-B_WMDkcu.cjs} +3 -3
- package/dist/{index-Cs6Fcjy6.js → index-VdHBtEiJ.js} +19 -19
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/pages/dynamic-error-page/index.d.ts +1 -0
- package/dist/ui/ListingSelector/index.d.ts +1 -0
- package/dist/ui/MetaInfoPost/index.d.ts +6 -0
- package/dist/ui/ShareLink/index.d.ts +5 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1001 -960
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import {
|
|
1
|
+
import { j as t, I as f, c as W, a as ut, S as it, R as Nt, B as ot, O as mt, d as at, u as ht, e as pt, P as _t, D as gt, f as ft, v as xt, g as jt, C as bt, h as F, i as wt, k as st, l as $t, m as Bt, n as Pt, o as rt, p as G, L as Mt, q as lt, r as vt, t as H, w as Tt, M as yt, x as kt, y as qt, z as It, A as At, E as Ot } from "./index-VdHBtEiJ.js";
|
|
2
|
+
import { K as ji, G as bi, J as vi, F as yi, T as Ni, H as ki } from "./index-VdHBtEiJ.js";
|
|
3
3
|
import _ from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
|
-
const
|
|
6
|
-
wrapper:
|
|
7
|
-
alignmentBlock:
|
|
8
|
-
title:
|
|
9
|
-
subtitle:
|
|
10
|
-
alignmentContent:
|
|
11
|
-
alignments:
|
|
5
|
+
const Et = "_wrapper_1vmyb_2", Rt = "_alignmentBlock_1vmyb_8", Dt = "_title_1vmyb_15", Lt = "_subtitle_1vmyb_22", zt = "_alignmentContent_1vmyb_29", Ut = "_alignments_1vmyb_37", Ht = "_alignment_1vmyb_8", Ft = "_circle_1vmyb_60", Vt = "_paddings_1vmyb_67", Yt = "_padding_1vmyb_67", Gt = "_active_1vmyb_91", Wt = "_input_1vmyb_98", J = {
|
|
6
|
+
wrapper: Et,
|
|
7
|
+
alignmentBlock: Rt,
|
|
8
|
+
title: Dt,
|
|
9
|
+
subtitle: Lt,
|
|
10
|
+
alignmentContent: zt,
|
|
11
|
+
alignments: Ut,
|
|
12
12
|
alignment: Ht,
|
|
13
|
-
circle:
|
|
14
|
-
paddings:
|
|
15
|
-
padding:
|
|
16
|
-
active:
|
|
17
|
-
input:
|
|
18
|
-
},
|
|
13
|
+
circle: Ft,
|
|
14
|
+
paddings: Vt,
|
|
15
|
+
padding: Yt,
|
|
16
|
+
active: Gt,
|
|
17
|
+
input: Wt
|
|
18
|
+
}, Jt = [
|
|
19
19
|
"topLeft",
|
|
20
20
|
"top",
|
|
21
21
|
"topRight",
|
|
@@ -25,10 +25,10 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
25
25
|
"bottomLeft",
|
|
26
26
|
"bottom",
|
|
27
27
|
"bottomRight"
|
|
28
|
-
],
|
|
29
|
-
const { alignment:
|
|
30
|
-
function
|
|
31
|
-
switch (
|
|
28
|
+
], Xt = ["left", "top", "right", "bottom"], ni = (r) => {
|
|
29
|
+
const { alignment: s, padding: e, setPadding: n, setAlignment: i } = r;
|
|
30
|
+
function d(c) {
|
|
31
|
+
switch (c) {
|
|
32
32
|
case "left":
|
|
33
33
|
case "topLeft":
|
|
34
34
|
case "bottomLeft":
|
|
@@ -45,8 +45,8 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
45
45
|
return "TextAlignCenter";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
switch (
|
|
48
|
+
function u(c) {
|
|
49
|
+
switch (c) {
|
|
50
50
|
case "left":
|
|
51
51
|
return "AlignLeft";
|
|
52
52
|
case "right":
|
|
@@ -57,40 +57,40 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
57
57
|
return "AlignBottom";
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
const [o,
|
|
61
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
62
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
63
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
64
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
65
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
66
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
60
|
+
const [o, m] = _.useState(null), [g, S] = _.useState(null);
|
|
61
|
+
return /* @__PURE__ */ t.jsxs("div", { className: J.layout, children: [
|
|
62
|
+
/* @__PURE__ */ t.jsx("h3", { className: J.title, children: "Layout" }),
|
|
63
|
+
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentBlock, children: [
|
|
64
|
+
/* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: "Alignment" }),
|
|
65
|
+
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentContent, children: [
|
|
66
|
+
/* @__PURE__ */ t.jsx("div", { className: J.alignments, children: Jt.map((c) => /* @__PURE__ */ t.jsxs(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
onClick: () => {
|
|
70
|
-
i(
|
|
70
|
+
i(c);
|
|
71
71
|
},
|
|
72
|
-
className:
|
|
72
|
+
className: J.alignment,
|
|
73
73
|
onMouseEnter: () => {
|
|
74
|
-
|
|
74
|
+
m(c);
|
|
75
75
|
},
|
|
76
76
|
onMouseLeave: () => {
|
|
77
|
-
|
|
77
|
+
m(null);
|
|
78
78
|
},
|
|
79
79
|
children: [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
c !== s && o !== c && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
|
|
81
|
+
c !== s && o === c && /* @__PURE__ */ t.jsx(
|
|
82
|
+
f,
|
|
83
83
|
{
|
|
84
|
-
name:
|
|
84
|
+
name: d(o),
|
|
85
85
|
fill: "#c2c2c2",
|
|
86
86
|
width: 22,
|
|
87
87
|
height: 22
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
c === s && /* @__PURE__ */ t.jsx(
|
|
91
|
+
f,
|
|
92
92
|
{
|
|
93
|
-
name:
|
|
93
|
+
name: d(s),
|
|
94
94
|
fill: "#FF3F19",
|
|
95
95
|
width: 22,
|
|
96
96
|
height: 22
|
|
@@ -98,37 +98,37 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
98
98
|
)
|
|
99
99
|
]
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
c
|
|
102
102
|
)) }),
|
|
103
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
103
|
+
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children: Xt.map((c) => /* @__PURE__ */ t.jsxs(
|
|
104
104
|
"label",
|
|
105
105
|
{
|
|
106
|
-
className:
|
|
107
|
-
[
|
|
106
|
+
className: W(J.padding, {
|
|
107
|
+
[J.active]: g === c
|
|
108
108
|
}),
|
|
109
109
|
onFocus: () => {
|
|
110
|
-
|
|
110
|
+
S(c);
|
|
111
111
|
},
|
|
112
112
|
onBlur: () => {
|
|
113
|
-
|
|
113
|
+
S(null);
|
|
114
114
|
},
|
|
115
115
|
children: [
|
|
116
116
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
117
|
-
|
|
117
|
+
f,
|
|
118
118
|
{
|
|
119
|
-
name:
|
|
119
|
+
name: u(c),
|
|
120
120
|
width: 20,
|
|
121
121
|
height: 20
|
|
122
122
|
}
|
|
123
123
|
) }),
|
|
124
124
|
/* @__PURE__ */ t.jsx(
|
|
125
|
-
|
|
125
|
+
ut,
|
|
126
126
|
{
|
|
127
127
|
type: "number",
|
|
128
|
-
value: String(e[
|
|
129
|
-
onChange: (
|
|
128
|
+
value: String(e[c]),
|
|
129
|
+
onChange: (l) => n({
|
|
130
130
|
...e,
|
|
131
|
-
[
|
|
131
|
+
[c]: Math.min(Number(l), 999)
|
|
132
132
|
}),
|
|
133
133
|
max: 999,
|
|
134
134
|
paddingless: !0,
|
|
@@ -137,56 +137,56 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
137
137
|
)
|
|
138
138
|
]
|
|
139
139
|
},
|
|
140
|
-
|
|
140
|
+
c
|
|
141
141
|
)) })
|
|
142
142
|
] })
|
|
143
143
|
] })
|
|
144
144
|
] });
|
|
145
|
-
},
|
|
146
|
-
title:
|
|
147
|
-
subtitle:
|
|
148
|
-
header:
|
|
149
|
-
text:
|
|
150
|
-
productsBlock:
|
|
151
|
-
top:
|
|
152
|
-
itemsBlock:
|
|
153
|
-
typeTexts:
|
|
154
|
-
block:
|
|
155
|
-
active:
|
|
156
|
-
products:
|
|
157
|
-
product:
|
|
158
|
-
button:
|
|
159
|
-
disabled:
|
|
160
|
-
image:
|
|
161
|
-
info:
|
|
162
|
-
name:
|
|
163
|
-
buttons:
|
|
164
|
-
modal:
|
|
165
|
-
link:
|
|
166
|
-
modalOptions:
|
|
167
|
-
addButton:
|
|
168
|
-
deleteButton:
|
|
169
|
-
},
|
|
145
|
+
}, Kt = "_title_82zux_1", Qt = "_subtitle_82zux_5", Zt = "_header_82zux_12", te = "_text_82zux_13", ee = "_productsBlock_82zux_14", ne = "_top_82zux_26", se = "_itemsBlock_82zux_35", ie = "_typeTexts_82zux_41", oe = "_block_82zux_48", ae = "_active_82zux_61", ce = "_products_82zux_14", le = "_product_82zux_14", re = "_button_82zux_80", de = "_disabled_82zux_91", ue = "_image_82zux_95", me = "_info_82zux_102", he = "_name_82zux_114", pe = "_buttons_82zux_118", _e = "_modal_82zux_125", ge = "_link_82zux_145", fe = "_modalOptions_82zux_151", xe = "_addButton_82zux_157", je = "_deleteButton_82zux_179", X = {
|
|
146
|
+
title: Kt,
|
|
147
|
+
subtitle: Qt,
|
|
148
|
+
header: Zt,
|
|
149
|
+
text: te,
|
|
150
|
+
productsBlock: ee,
|
|
151
|
+
top: ne,
|
|
152
|
+
itemsBlock: se,
|
|
153
|
+
typeTexts: ie,
|
|
154
|
+
block: oe,
|
|
155
|
+
active: ae,
|
|
156
|
+
products: ce,
|
|
157
|
+
product: le,
|
|
158
|
+
button: re,
|
|
159
|
+
disabled: de,
|
|
160
|
+
image: ue,
|
|
161
|
+
info: me,
|
|
162
|
+
name: he,
|
|
163
|
+
buttons: pe,
|
|
164
|
+
modal: _e,
|
|
165
|
+
link: ge,
|
|
166
|
+
modalOptions: fe,
|
|
167
|
+
addButton: xe,
|
|
168
|
+
deleteButton: je
|
|
169
|
+
}, si = (r) => {
|
|
170
170
|
const {
|
|
171
|
-
isActiveItems:
|
|
171
|
+
isActiveItems: s,
|
|
172
172
|
setIsActiveItems: e,
|
|
173
|
-
items:
|
|
173
|
+
items: n,
|
|
174
174
|
setItems: i,
|
|
175
|
-
other:
|
|
176
|
-
title:
|
|
175
|
+
other: d,
|
|
176
|
+
title: u,
|
|
177
177
|
subtitle: o,
|
|
178
|
-
draggable:
|
|
179
|
-
withImage:
|
|
180
|
-
addable:
|
|
181
|
-
itemsOptions:
|
|
182
|
-
hasRangeSelector:
|
|
178
|
+
draggable: m = !1,
|
|
179
|
+
withImage: g = !1,
|
|
180
|
+
addable: S = !0,
|
|
181
|
+
itemsOptions: c,
|
|
182
|
+
hasRangeSelector: l = !1,
|
|
183
183
|
rangeSelectorOptions: T,
|
|
184
|
-
limit:
|
|
185
|
-
autoScrollInterval:
|
|
184
|
+
limit: $,
|
|
185
|
+
autoScrollInterval: M,
|
|
186
186
|
deletable: x
|
|
187
|
-
} =
|
|
188
|
-
function
|
|
189
|
-
if (
|
|
187
|
+
} = r;
|
|
188
|
+
function k(b) {
|
|
189
|
+
if (g)
|
|
190
190
|
return b ? /* @__PURE__ */ t.jsx(
|
|
191
191
|
"img",
|
|
192
192
|
{
|
|
@@ -196,7 +196,7 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
196
196
|
height: 16
|
|
197
197
|
}
|
|
198
198
|
) : /* @__PURE__ */ t.jsx(
|
|
199
|
-
|
|
199
|
+
f,
|
|
200
200
|
{
|
|
201
201
|
name: "Image",
|
|
202
202
|
width: 16,
|
|
@@ -205,12 +205,12 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
205
205
|
}
|
|
206
206
|
);
|
|
207
207
|
}
|
|
208
|
-
const a = (b,
|
|
209
|
-
const
|
|
210
|
-
if (!
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
208
|
+
const a = (b, D = !1) => {
|
|
209
|
+
const w = c.find((C) => C.id === b);
|
|
210
|
+
if (!w) return;
|
|
211
|
+
const z = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
212
|
+
m && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
213
|
+
f,
|
|
214
214
|
{
|
|
215
215
|
name: "DotsSixVertical",
|
|
216
216
|
hoverable: !0,
|
|
@@ -221,54 +221,54 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
221
221
|
/* @__PURE__ */ t.jsx(
|
|
222
222
|
at,
|
|
223
223
|
{
|
|
224
|
-
onChange: (
|
|
225
|
-
const
|
|
226
|
-
if (!
|
|
227
|
-
const
|
|
228
|
-
i([...
|
|
224
|
+
onChange: (C) => {
|
|
225
|
+
const v = [...n], I = c.find((p) => p.name === C);
|
|
226
|
+
if (!I) return;
|
|
227
|
+
const q = I.id, B = v.map((p) => p === b ? q : p);
|
|
228
|
+
i([...B]);
|
|
229
229
|
},
|
|
230
|
-
value:
|
|
231
|
-
options:
|
|
232
|
-
leftAddon:
|
|
230
|
+
value: w.name,
|
|
231
|
+
options: c.filter((C) => !n.find((v) => v === C.id)).map((C) => C.name),
|
|
232
|
+
leftAddon: k(w.images)
|
|
233
233
|
}
|
|
234
234
|
),
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
D && /* @__PURE__ */ t.jsx("div", { className: X.buttons, children: /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
236
|
+
f,
|
|
237
237
|
{
|
|
238
238
|
name: "Trash",
|
|
239
239
|
hoverable: !0,
|
|
240
240
|
width: 20,
|
|
241
241
|
height: 20,
|
|
242
242
|
fill: "#C12A2A",
|
|
243
|
-
onClick: () => i(
|
|
243
|
+
onClick: () => i(n.filter((C) => C !== b))
|
|
244
244
|
}
|
|
245
245
|
) }) })
|
|
246
246
|
] });
|
|
247
247
|
return /* @__PURE__ */ t.jsx(
|
|
248
248
|
"div",
|
|
249
249
|
{
|
|
250
|
-
className:
|
|
251
|
-
children:
|
|
250
|
+
className: X.product,
|
|
251
|
+
children: z
|
|
252
252
|
},
|
|
253
253
|
b
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
257
|
-
(
|
|
258
|
-
|
|
259
|
-
|
|
256
|
+
return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
|
|
257
|
+
(u || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
|
|
258
|
+
u && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: u }),
|
|
259
|
+
s !== void 0 && /* @__PURE__ */ t.jsx(
|
|
260
260
|
it,
|
|
261
261
|
{
|
|
262
|
-
current:
|
|
262
|
+
current: s,
|
|
263
263
|
onChange: (b) => e == null ? void 0 : e(b)
|
|
264
264
|
}
|
|
265
265
|
)
|
|
266
266
|
] }),
|
|
267
|
-
|
|
268
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
269
|
-
o && /* @__PURE__ */ t.jsx("h5", { className:
|
|
270
|
-
|
|
271
|
-
|
|
267
|
+
l && T && /* @__PURE__ */ t.jsx(Nt, { ...T }),
|
|
268
|
+
/* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
|
|
269
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: o }),
|
|
270
|
+
n.map((b) => a(b, x)),
|
|
271
|
+
S && /* @__PURE__ */ t.jsx(
|
|
272
272
|
"div",
|
|
273
273
|
{
|
|
274
274
|
style: {
|
|
@@ -281,30 +281,30 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
281
281
|
ot,
|
|
282
282
|
{
|
|
283
283
|
withoutHover: !0,
|
|
284
|
-
className:
|
|
285
|
-
[
|
|
284
|
+
className: W(X.button, {
|
|
285
|
+
[X.disabled]: !!($ && $ <= n.length || n.length === c.length)
|
|
286
286
|
}),
|
|
287
287
|
size: "s",
|
|
288
|
-
disabled: !!(
|
|
288
|
+
disabled: !!($ && $ <= n.length || n.length === c.length),
|
|
289
289
|
onClick: () => {
|
|
290
|
-
const b = [...
|
|
291
|
-
let
|
|
292
|
-
if (
|
|
293
|
-
for (let
|
|
294
|
-
if (!
|
|
295
|
-
|
|
290
|
+
const b = [...n];
|
|
291
|
+
let D = null;
|
|
292
|
+
if (c) {
|
|
293
|
+
for (let w = 0; w < c.length; w++)
|
|
294
|
+
if (!n.find((z) => z === c[w].id)) {
|
|
295
|
+
D = c[w];
|
|
296
296
|
break;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
b.push((
|
|
299
|
+
b.push((D == null ? void 0 : D.id) || c[0].id), i(b);
|
|
300
300
|
},
|
|
301
301
|
style: {
|
|
302
302
|
width: "fit-content"
|
|
303
303
|
},
|
|
304
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
304
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: X.addButton, children: [
|
|
305
305
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
306
306
|
/* @__PURE__ */ t.jsx(
|
|
307
|
-
|
|
307
|
+
f,
|
|
308
308
|
{
|
|
309
309
|
name: "Plus",
|
|
310
310
|
width: 16,
|
|
@@ -317,14 +317,14 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
317
317
|
}
|
|
318
318
|
)
|
|
319
319
|
] }),
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
320
|
+
d !== void 0 && /* @__PURE__ */ t.jsx(mt, { items: d }),
|
|
321
|
+
M !== void 0 && /* @__PURE__ */ t.jsx(
|
|
322
|
+
ut,
|
|
323
323
|
{
|
|
324
324
|
label: "Auto scroll interval",
|
|
325
325
|
type: "number",
|
|
326
|
-
value: String(
|
|
327
|
-
onChange: (b) =>
|
|
326
|
+
value: String(M.scrollInterval),
|
|
327
|
+
onChange: (b) => M.setScrollInterval(Number(b)),
|
|
328
328
|
min: 0.1,
|
|
329
329
|
max: 100,
|
|
330
330
|
style: {
|
|
@@ -334,109 +334,109 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
334
334
|
}
|
|
335
335
|
)
|
|
336
336
|
] });
|
|
337
|
-
},
|
|
338
|
-
title:
|
|
339
|
-
subtitle:
|
|
340
|
-
header:
|
|
341
|
-
text:
|
|
342
|
-
productsBlock:
|
|
343
|
-
top:
|
|
344
|
-
itemsBlock:
|
|
345
|
-
typeTexts:
|
|
346
|
-
block:
|
|
347
|
-
active:
|
|
348
|
-
products:
|
|
349
|
-
product:
|
|
350
|
-
button:
|
|
351
|
-
disabled:
|
|
352
|
-
image:
|
|
353
|
-
info:
|
|
354
|
-
name:
|
|
355
|
-
buttons:
|
|
356
|
-
modal:
|
|
357
|
-
link:
|
|
358
|
-
modalOptions:
|
|
359
|
-
addButton:
|
|
360
|
-
deleteButton:
|
|
337
|
+
}, be = "_title_roi3a_1", ve = "_subtitle_roi3a_5", ye = "_header_roi3a_12", Ne = "_text_roi3a_13", ke = "_productsBlock_roi3a_14", Ie = "_top_roi3a_26", Ce = "_itemsBlock_roi3a_35", Se = "_typeTexts_roi3a_41", we = "_block_roi3a_48", $e = "_active_roi3a_61", Be = "_products_roi3a_14", Pe = "_product_roi3a_14", Me = "_button_roi3a_80", Te = "_disabled_roi3a_91", qe = "_image_roi3a_95", Ae = "_info_roi3a_102", Oe = "_name_roi3a_114", Ee = "_buttons_roi3a_118", Re = "_modal_roi3a_125", De = "_link_roi3a_145", Le = "_modalOptions_roi3a_151", ze = "_addButton_roi3a_164", Ue = "_deleteButton_roi3a_179", He = "_closeIcon_roi3a_191", V = {
|
|
338
|
+
title: be,
|
|
339
|
+
subtitle: ve,
|
|
340
|
+
header: ye,
|
|
341
|
+
text: Ne,
|
|
342
|
+
productsBlock: ke,
|
|
343
|
+
top: Ie,
|
|
344
|
+
itemsBlock: Ce,
|
|
345
|
+
typeTexts: Se,
|
|
346
|
+
block: we,
|
|
347
|
+
active: $e,
|
|
348
|
+
products: Be,
|
|
349
|
+
product: Pe,
|
|
350
|
+
button: Me,
|
|
351
|
+
disabled: Te,
|
|
352
|
+
image: qe,
|
|
353
|
+
info: Ae,
|
|
354
|
+
name: Oe,
|
|
355
|
+
buttons: Ee,
|
|
356
|
+
modal: Re,
|
|
357
|
+
link: De,
|
|
358
|
+
modalOptions: Le,
|
|
359
|
+
addButton: ze,
|
|
360
|
+
deleteButton: Ue,
|
|
361
361
|
closeIcon: He
|
|
362
362
|
};
|
|
363
|
-
function
|
|
363
|
+
function Fe({ product: r, children: s }) {
|
|
364
364
|
const {
|
|
365
365
|
attributes: e,
|
|
366
|
-
listeners:
|
|
366
|
+
listeners: n,
|
|
367
367
|
setNodeRef: i,
|
|
368
|
-
transform:
|
|
369
|
-
transition:
|
|
368
|
+
transform: d,
|
|
369
|
+
transition: u,
|
|
370
370
|
isDragging: o
|
|
371
|
-
} =
|
|
372
|
-
id:
|
|
373
|
-
}),
|
|
374
|
-
transform: bt.Transform.toString(
|
|
375
|
-
transition:
|
|
371
|
+
} = jt({
|
|
372
|
+
id: r.id
|
|
373
|
+
}), m = {
|
|
374
|
+
transform: bt.Transform.toString(d),
|
|
375
|
+
transition: u
|
|
376
376
|
};
|
|
377
377
|
return /* @__PURE__ */ t.jsx(
|
|
378
378
|
"div",
|
|
379
379
|
{
|
|
380
380
|
ref: i,
|
|
381
|
-
style:
|
|
382
|
-
className: `${
|
|
381
|
+
style: m,
|
|
382
|
+
className: `${V.product} ${o ? V.dragging : ""}`,
|
|
383
383
|
...e,
|
|
384
|
-
...
|
|
385
|
-
children:
|
|
384
|
+
...n,
|
|
385
|
+
children: s
|
|
386
386
|
}
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
|
-
const
|
|
389
|
+
const ii = (r) => {
|
|
390
390
|
const {
|
|
391
|
-
isActiveItems:
|
|
391
|
+
isActiveItems: s,
|
|
392
392
|
setIsActiveItems: e,
|
|
393
|
-
items:
|
|
393
|
+
items: n,
|
|
394
394
|
setItems: i,
|
|
395
|
-
title:
|
|
396
|
-
subtitle:
|
|
395
|
+
title: d,
|
|
396
|
+
subtitle: u,
|
|
397
397
|
editable: o = !0,
|
|
398
|
-
draggable:
|
|
399
|
-
deletable:
|
|
400
|
-
addable:
|
|
401
|
-
itemsType:
|
|
402
|
-
itemsOptions:
|
|
398
|
+
draggable: m = !1,
|
|
399
|
+
deletable: g = !0,
|
|
400
|
+
addable: S = !0,
|
|
401
|
+
itemsType: c,
|
|
402
|
+
itemsOptions: l,
|
|
403
403
|
addableOptions: T = {},
|
|
404
|
-
limit:
|
|
405
|
-
} =
|
|
406
|
-
|
|
404
|
+
limit: $
|
|
405
|
+
} = r, [M, x] = _.useState(null), [k, a] = _.useState(null), b = _.useRef(null), D = ht(
|
|
406
|
+
pt(_t, {
|
|
407
407
|
activationConstraint: {
|
|
408
408
|
distance: 5
|
|
409
409
|
}
|
|
410
410
|
})
|
|
411
411
|
);
|
|
412
412
|
_.useEffect(() => {
|
|
413
|
-
if (
|
|
414
|
-
const
|
|
415
|
-
i(
|
|
413
|
+
if (M) {
|
|
414
|
+
const v = [...n].map((I) => I.id === M.id ? M : I);
|
|
415
|
+
i(v);
|
|
416
416
|
}
|
|
417
|
-
}, [
|
|
418
|
-
b.current &&
|
|
419
|
-
}, [b.current,
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
const
|
|
417
|
+
}, [M]), _.useEffect(() => {
|
|
418
|
+
b.current && k && (b.current.getBoundingClientRect().height, k.top);
|
|
419
|
+
}, [b.current, k]);
|
|
420
|
+
const w = (v, I) => {
|
|
421
|
+
v.stopPropagation();
|
|
422
|
+
const q = v.target.getBoundingClientRect();
|
|
423
423
|
a({
|
|
424
|
-
top:
|
|
425
|
-
left:
|
|
426
|
-
}), x(
|
|
427
|
-
},
|
|
428
|
-
const { active:
|
|
429
|
-
if (
|
|
430
|
-
const
|
|
431
|
-
if (
|
|
432
|
-
const
|
|
433
|
-
|
|
424
|
+
top: q.top + window.scrollY,
|
|
425
|
+
left: q.left - 30
|
|
426
|
+
}), x(I);
|
|
427
|
+
}, z = (v) => {
|
|
428
|
+
const { active: I, over: q } = v;
|
|
429
|
+
if (q && I.id !== q.id) {
|
|
430
|
+
const B = n.findIndex((j) => j.id === I.id), p = n.findIndex((j) => j.id === q.id);
|
|
431
|
+
if (B !== -1 && p !== -1) {
|
|
432
|
+
const j = [...n], [A] = j.splice(B, 1);
|
|
433
|
+
j.splice(p, 0, A), i(j);
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
},
|
|
437
|
-
const
|
|
438
|
-
|
|
439
|
-
|
|
436
|
+
}, C = (v, I) => {
|
|
437
|
+
const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
438
|
+
m && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
439
|
+
f,
|
|
440
440
|
{
|
|
441
441
|
name: "DotsSixVertical",
|
|
442
442
|
hoverable: !0,
|
|
@@ -444,99 +444,99 @@ const Zn = (d) => {
|
|
|
444
444
|
height: 20
|
|
445
445
|
}
|
|
446
446
|
) }),
|
|
447
|
-
|
|
447
|
+
c === "select" && l && /* @__PURE__ */ t.jsx(
|
|
448
448
|
at,
|
|
449
449
|
{
|
|
450
|
-
onChange: (
|
|
451
|
-
const
|
|
452
|
-
if (!
|
|
453
|
-
const
|
|
454
|
-
...
|
|
450
|
+
onChange: (B) => {
|
|
451
|
+
const p = [...n], j = l.find((U) => U.name === B);
|
|
452
|
+
if (!j) return;
|
|
453
|
+
const A = p.map((U) => U.id === v.id ? {
|
|
454
|
+
...j,
|
|
455
455
|
name: {
|
|
456
|
-
"en-US":
|
|
456
|
+
"en-US": B
|
|
457
457
|
}
|
|
458
|
-
} :
|
|
458
|
+
} : U);
|
|
459
459
|
x({
|
|
460
|
-
...
|
|
460
|
+
...v,
|
|
461
461
|
name: {
|
|
462
|
-
"en-US":
|
|
462
|
+
"en-US": B
|
|
463
463
|
}
|
|
464
|
-
}), i([...
|
|
464
|
+
}), i([...A]);
|
|
465
465
|
},
|
|
466
|
-
value:
|
|
467
|
-
options:
|
|
466
|
+
value: v.name,
|
|
467
|
+
options: l.filter((B) => !n.find((p) => p.name === B.name)).map((B) => B.name)
|
|
468
468
|
}
|
|
469
469
|
),
|
|
470
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
471
|
-
o && /* @__PURE__ */ t.jsx("div", { className:
|
|
472
|
-
|
|
470
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
|
|
471
|
+
o && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
472
|
+
f,
|
|
473
473
|
{
|
|
474
474
|
name: "Sliders",
|
|
475
475
|
hoverable: !0,
|
|
476
476
|
width: 20,
|
|
477
477
|
height: 20,
|
|
478
|
-
onClick: (
|
|
478
|
+
onClick: (B) => w(B, v)
|
|
479
479
|
}
|
|
480
480
|
) }),
|
|
481
|
-
|
|
482
|
-
|
|
481
|
+
g && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
482
|
+
f,
|
|
483
483
|
{
|
|
484
484
|
name: "Trash",
|
|
485
485
|
hoverable: !0,
|
|
486
486
|
width: 20,
|
|
487
487
|
height: 20,
|
|
488
488
|
fill: "#C12A2A",
|
|
489
|
-
onClick: () => i(
|
|
489
|
+
onClick: () => i(n.filter((B) => B.id !== v.id))
|
|
490
490
|
}
|
|
491
491
|
) })
|
|
492
492
|
] })
|
|
493
493
|
] });
|
|
494
|
-
return
|
|
495
|
-
|
|
494
|
+
return m ? /* @__PURE__ */ t.jsx(
|
|
495
|
+
Fe,
|
|
496
496
|
{
|
|
497
|
-
product:
|
|
498
|
-
index:
|
|
499
|
-
children:
|
|
497
|
+
product: v,
|
|
498
|
+
index: I,
|
|
499
|
+
children: q
|
|
500
500
|
},
|
|
501
|
-
|
|
501
|
+
v.id
|
|
502
502
|
) : /* @__PURE__ */ t.jsx(
|
|
503
503
|
"div",
|
|
504
504
|
{
|
|
505
|
-
className:
|
|
506
|
-
children:
|
|
505
|
+
className: V.product,
|
|
506
|
+
children: q
|
|
507
507
|
},
|
|
508
|
-
|
|
508
|
+
v.id
|
|
509
509
|
);
|
|
510
510
|
};
|
|
511
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
512
|
-
(
|
|
513
|
-
|
|
514
|
-
|
|
511
|
+
return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
|
|
512
|
+
(d || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
513
|
+
d && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: d }),
|
|
514
|
+
s !== void 0 && /* @__PURE__ */ t.jsx(
|
|
515
515
|
it,
|
|
516
516
|
{
|
|
517
|
-
current:
|
|
518
|
-
onChange: (
|
|
517
|
+
current: s,
|
|
518
|
+
onChange: (v) => e == null ? void 0 : e(v)
|
|
519
519
|
}
|
|
520
520
|
)
|
|
521
521
|
] }),
|
|
522
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
522
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
|
|
523
|
+
u && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: u }),
|
|
524
|
+
m ? /* @__PURE__ */ t.jsx(
|
|
525
|
+
gt,
|
|
526
526
|
{
|
|
527
|
-
sensors:
|
|
528
|
-
onDragEnd:
|
|
527
|
+
sensors: D,
|
|
528
|
+
onDragEnd: z,
|
|
529
529
|
children: /* @__PURE__ */ t.jsx(
|
|
530
|
-
|
|
530
|
+
ft,
|
|
531
531
|
{
|
|
532
|
-
items:
|
|
533
|
-
strategy:
|
|
534
|
-
children:
|
|
532
|
+
items: n.map((v) => v.id),
|
|
533
|
+
strategy: xt,
|
|
534
|
+
children: n.map((v, I) => C(v, I))
|
|
535
535
|
}
|
|
536
536
|
)
|
|
537
537
|
}
|
|
538
|
-
) :
|
|
539
|
-
|
|
538
|
+
) : n.map((v, I) => C(v, I)),
|
|
539
|
+
S && /* @__PURE__ */ t.jsx(
|
|
540
540
|
"div",
|
|
541
541
|
{
|
|
542
542
|
style: {
|
|
@@ -548,34 +548,34 @@ const Zn = (d) => {
|
|
|
548
548
|
ot,
|
|
549
549
|
{
|
|
550
550
|
withoutHover: !0,
|
|
551
|
-
className:
|
|
552
|
-
[
|
|
551
|
+
className: W(V.button, {
|
|
552
|
+
[V.disabled]: !!($ && $ <= n.length || n.length === (l == null ? void 0 : l.length))
|
|
553
553
|
}),
|
|
554
554
|
size: "s",
|
|
555
|
-
disabled: !!(
|
|
555
|
+
disabled: !!($ && $ <= n.length || n.length === (l == null ? void 0 : l.length)),
|
|
556
556
|
onClick: () => {
|
|
557
|
-
const
|
|
558
|
-
let
|
|
559
|
-
if (
|
|
560
|
-
for (let
|
|
561
|
-
if (!
|
|
562
|
-
|
|
557
|
+
const v = [...n];
|
|
558
|
+
let I = null;
|
|
559
|
+
if (l) {
|
|
560
|
+
for (let q = 0; q < l.length; q++)
|
|
561
|
+
if (!n.find((B) => B.id === l[q].id)) {
|
|
562
|
+
I = l[q];
|
|
563
563
|
break;
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
|
-
|
|
567
|
-
name:
|
|
568
|
-
id: (
|
|
566
|
+
c === "select" && l && v.push({
|
|
567
|
+
name: I ? I.name : l[0].name,
|
|
568
|
+
id: (I == null ? void 0 : I.id) || l[0].id,
|
|
569
569
|
...T
|
|
570
|
-
}), i(
|
|
570
|
+
}), i(v);
|
|
571
571
|
},
|
|
572
572
|
style: {
|
|
573
573
|
width: "fit-content"
|
|
574
574
|
},
|
|
575
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
575
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
|
|
576
576
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
577
577
|
/* @__PURE__ */ t.jsx(
|
|
578
|
-
|
|
578
|
+
f,
|
|
579
579
|
{
|
|
580
580
|
name: "Plus",
|
|
581
581
|
width: 16,
|
|
@@ -590,99 +590,99 @@ const Zn = (d) => {
|
|
|
590
590
|
] })
|
|
591
591
|
] });
|
|
592
592
|
};
|
|
593
|
-
function
|
|
594
|
-
const { product:
|
|
595
|
-
id:
|
|
596
|
-
}),
|
|
597
|
-
transform: bt.Transform.toString(
|
|
593
|
+
function Ve(r) {
|
|
594
|
+
const { product: s, children: e } = r, { attributes: n, listeners: i, setNodeRef: d, transform: u, transition: o, isDragging: m } = jt({
|
|
595
|
+
id: s.id
|
|
596
|
+
}), g = {
|
|
597
|
+
transform: bt.Transform.toString(u),
|
|
598
598
|
transition: o
|
|
599
599
|
};
|
|
600
600
|
return /* @__PURE__ */ t.jsx(
|
|
601
601
|
"div",
|
|
602
602
|
{
|
|
603
|
-
ref:
|
|
604
|
-
style:
|
|
605
|
-
className: `${
|
|
606
|
-
...
|
|
603
|
+
ref: d,
|
|
604
|
+
style: g,
|
|
605
|
+
className: `${F.product} ${m ? F.dragging : ""}`,
|
|
606
|
+
...n,
|
|
607
607
|
...i,
|
|
608
608
|
children: e
|
|
609
609
|
}
|
|
610
610
|
);
|
|
611
611
|
}
|
|
612
|
-
const
|
|
612
|
+
const oi = (r) => {
|
|
613
613
|
const {
|
|
614
|
-
isActiveItems:
|
|
614
|
+
isActiveItems: s,
|
|
615
615
|
setIsActiveItems: e,
|
|
616
|
-
items:
|
|
616
|
+
items: n,
|
|
617
617
|
setItems: i,
|
|
618
|
-
other:
|
|
619
|
-
title:
|
|
618
|
+
other: d,
|
|
619
|
+
title: u,
|
|
620
620
|
subtitle: o,
|
|
621
|
-
editable:
|
|
622
|
-
draggable:
|
|
623
|
-
withImage:
|
|
624
|
-
deletable:
|
|
625
|
-
addable:
|
|
621
|
+
editable: m = !0,
|
|
622
|
+
draggable: g = !1,
|
|
623
|
+
withImage: S = !1,
|
|
624
|
+
deletable: c = !0,
|
|
625
|
+
addable: l = !0,
|
|
626
626
|
itemsType: T,
|
|
627
|
-
itemsPlaceholder:
|
|
628
|
-
itemsOptions:
|
|
627
|
+
itemsPlaceholder: $ = "",
|
|
628
|
+
itemsOptions: M,
|
|
629
629
|
hasRangeSelector: x = !1,
|
|
630
|
-
rangeSelectorOptions:
|
|
630
|
+
rangeSelectorOptions: k,
|
|
631
631
|
modalOptions: a,
|
|
632
632
|
addableOptions: b = {},
|
|
633
|
-
limit:
|
|
634
|
-
} =
|
|
633
|
+
limit: D
|
|
634
|
+
} = r, [w, z] = _.useState(null), [C, v] = _.useState({
|
|
635
635
|
top: 0,
|
|
636
636
|
left: 0
|
|
637
|
-
}), [
|
|
638
|
-
|
|
637
|
+
}), [I, q] = _.useState(null), B = _.useRef(null), [p, j] = _.useState(!1), A = ht(
|
|
638
|
+
pt(_t, {
|
|
639
639
|
activationConstraint: {
|
|
640
640
|
distance: 5
|
|
641
641
|
}
|
|
642
642
|
})
|
|
643
643
|
);
|
|
644
644
|
_.useEffect(() => {
|
|
645
|
-
const
|
|
646
|
-
|
|
645
|
+
const h = () => {
|
|
646
|
+
z(null), j(!1);
|
|
647
647
|
};
|
|
648
|
-
return document.body.addEventListener("click",
|
|
649
|
-
|
|
648
|
+
return document.body.addEventListener("click", h), z(null), j(!1), () => {
|
|
649
|
+
z(null), j(!1), document.body.removeEventListener("click", h);
|
|
650
650
|
};
|
|
651
651
|
}, []), _.useEffect(() => {
|
|
652
|
-
if (
|
|
653
|
-
const
|
|
654
|
-
i(
|
|
652
|
+
if (w) {
|
|
653
|
+
const h = [...n].map((E) => E.id === w.id ? w : E);
|
|
654
|
+
i(h);
|
|
655
655
|
}
|
|
656
|
-
}, [
|
|
657
|
-
if (
|
|
658
|
-
const
|
|
659
|
-
let
|
|
660
|
-
|
|
661
|
-
top:
|
|
662
|
-
left:
|
|
656
|
+
}, [w]), _.useEffect(() => {
|
|
657
|
+
if (B.current && I) {
|
|
658
|
+
const h = B.current.getBoundingClientRect().height, E = window.innerHeight;
|
|
659
|
+
let P = I.top;
|
|
660
|
+
P + h > E + window.scrollY - 200 && (P = E + window.scrollY - h - 200), P < 0 && (P = 10), v({
|
|
661
|
+
top: P,
|
|
662
|
+
left: I.left
|
|
663
663
|
});
|
|
664
664
|
}
|
|
665
|
-
}, [
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
-
const
|
|
669
|
-
|
|
670
|
-
top:
|
|
671
|
-
left:
|
|
672
|
-
}),
|
|
665
|
+
}, [B.current, I]);
|
|
666
|
+
const U = (h, E) => {
|
|
667
|
+
h.stopPropagation();
|
|
668
|
+
const P = h.target.getBoundingClientRect();
|
|
669
|
+
q({
|
|
670
|
+
top: P.top + window.scrollY,
|
|
671
|
+
left: P.left - 30
|
|
672
|
+
}), z(E), j(!0);
|
|
673
673
|
};
|
|
674
|
-
function
|
|
675
|
-
if (
|
|
676
|
-
return
|
|
674
|
+
function O(h) {
|
|
675
|
+
if (S)
|
|
676
|
+
return h ? /* @__PURE__ */ t.jsx(
|
|
677
677
|
"img",
|
|
678
678
|
{
|
|
679
|
-
src: `https://imagedelivery.net/${
|
|
679
|
+
src: `https://imagedelivery.net/${h[0]}/w=1000`,
|
|
680
680
|
alt: "image",
|
|
681
681
|
width: 16,
|
|
682
682
|
height: 16
|
|
683
683
|
}
|
|
684
684
|
) : /* @__PURE__ */ t.jsx(
|
|
685
|
-
|
|
685
|
+
f,
|
|
686
686
|
{
|
|
687
687
|
name: "Image",
|
|
688
688
|
width: 16,
|
|
@@ -691,20 +691,20 @@ const ti = (d) => {
|
|
|
691
691
|
}
|
|
692
692
|
);
|
|
693
693
|
}
|
|
694
|
-
const
|
|
695
|
-
const { active:
|
|
696
|
-
if (
|
|
697
|
-
const R =
|
|
698
|
-
if (R !== -1 &&
|
|
699
|
-
const
|
|
700
|
-
|
|
694
|
+
const L = (h) => {
|
|
695
|
+
const { active: E, over: P } = h;
|
|
696
|
+
if (P && E.id !== P.id) {
|
|
697
|
+
const R = n.findIndex((Y) => Y.id === E.id), et = n.findIndex((Y) => Y.id === P.id);
|
|
698
|
+
if (R !== -1 && et !== -1) {
|
|
699
|
+
const Y = [...n], [K] = Y.splice(R, 1);
|
|
700
|
+
Y.splice(et, 0, K), i(Y);
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
|
-
},
|
|
704
|
-
var
|
|
705
|
-
const
|
|
706
|
-
|
|
707
|
-
|
|
703
|
+
}, Q = (h) => {
|
|
704
|
+
var P;
|
|
705
|
+
const E = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
706
|
+
g && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
707
|
+
f,
|
|
708
708
|
{
|
|
709
709
|
name: "DotsSixVertical",
|
|
710
710
|
hoverable: !0,
|
|
@@ -712,140 +712,140 @@ const ti = (d) => {
|
|
|
712
712
|
height: 20
|
|
713
713
|
}
|
|
714
714
|
) }),
|
|
715
|
-
T === "select" &&
|
|
715
|
+
T === "select" && M && /* @__PURE__ */ t.jsx(
|
|
716
716
|
at,
|
|
717
717
|
{
|
|
718
718
|
onChange: (R) => {
|
|
719
|
-
const
|
|
720
|
-
...
|
|
719
|
+
const Y = [...n].map((K) => K.id === h.id ? {
|
|
720
|
+
...h,
|
|
721
721
|
name: {
|
|
722
722
|
"en-US": R
|
|
723
723
|
}
|
|
724
|
-
} :
|
|
725
|
-
|
|
726
|
-
...
|
|
724
|
+
} : K);
|
|
725
|
+
z({
|
|
726
|
+
...h,
|
|
727
727
|
name: {
|
|
728
728
|
"en-US": R
|
|
729
729
|
}
|
|
730
|
-
}), i([...
|
|
730
|
+
}), i([...Y]);
|
|
731
731
|
},
|
|
732
|
-
value:
|
|
733
|
-
options:
|
|
734
|
-
(R) => !
|
|
732
|
+
value: h.name["en-US"],
|
|
733
|
+
options: M.filter(
|
|
734
|
+
(R) => !n.find((et) => et.name["en-US"] === R)
|
|
735
735
|
),
|
|
736
|
-
leftAddon:
|
|
736
|
+
leftAddon: O(h.images)
|
|
737
737
|
}
|
|
738
738
|
),
|
|
739
739
|
T === "input" && /* @__PURE__ */ t.jsx(
|
|
740
|
-
|
|
740
|
+
ut,
|
|
741
741
|
{
|
|
742
742
|
onChange: (R) => {
|
|
743
|
-
const
|
|
744
|
-
...
|
|
743
|
+
const Y = [...n].map((K) => K.id === h.id ? {
|
|
744
|
+
...h,
|
|
745
745
|
name: {
|
|
746
746
|
"en-US": R
|
|
747
747
|
}
|
|
748
|
-
} :
|
|
749
|
-
i([...
|
|
748
|
+
} : K);
|
|
749
|
+
i([...Y]);
|
|
750
750
|
},
|
|
751
|
-
value:
|
|
752
|
-
placeholder:
|
|
751
|
+
value: h.name["en-US"],
|
|
752
|
+
placeholder: $
|
|
753
753
|
}
|
|
754
754
|
),
|
|
755
755
|
T === "image" && /* @__PURE__ */ t.jsx(
|
|
756
|
-
|
|
756
|
+
$t,
|
|
757
757
|
{
|
|
758
758
|
onChange: (R) => {
|
|
759
|
-
const
|
|
760
|
-
...
|
|
759
|
+
const Y = [...n].map((K) => K.id === h.id ? {
|
|
760
|
+
...h,
|
|
761
761
|
images: R
|
|
762
|
-
} :
|
|
763
|
-
i([...
|
|
762
|
+
} : K);
|
|
763
|
+
i([...Y]);
|
|
764
764
|
},
|
|
765
|
-
activeImage: (
|
|
765
|
+
activeImage: (P = n.find((R) => R.id === h.id)) == null ? void 0 : P.images[0]
|
|
766
766
|
}
|
|
767
767
|
),
|
|
768
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
769
|
-
|
|
770
|
-
|
|
768
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
|
|
769
|
+
m && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
770
|
+
f,
|
|
771
771
|
{
|
|
772
772
|
name: "Sliders",
|
|
773
773
|
hoverable: !0,
|
|
774
774
|
width: 20,
|
|
775
775
|
height: 20,
|
|
776
|
-
onClick: (R) =>
|
|
776
|
+
onClick: (R) => U(R, h)
|
|
777
777
|
}
|
|
778
778
|
) }),
|
|
779
|
-
|
|
780
|
-
|
|
779
|
+
c && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
780
|
+
f,
|
|
781
781
|
{
|
|
782
782
|
name: "Trash",
|
|
783
783
|
hoverable: !0,
|
|
784
784
|
width: 20,
|
|
785
785
|
height: 20,
|
|
786
786
|
fill: "#C12A2A",
|
|
787
|
-
onClick: () => i(
|
|
787
|
+
onClick: () => i(n.filter((R) => R.id !== h.id))
|
|
788
788
|
}
|
|
789
789
|
) })
|
|
790
790
|
] })
|
|
791
791
|
] });
|
|
792
|
-
return
|
|
793
|
-
|
|
792
|
+
return g ? /* @__PURE__ */ t.jsx(
|
|
793
|
+
Ve,
|
|
794
794
|
{
|
|
795
|
-
product:
|
|
796
|
-
children:
|
|
795
|
+
product: h,
|
|
796
|
+
children: E
|
|
797
797
|
},
|
|
798
|
-
|
|
798
|
+
h.id
|
|
799
799
|
) : /* @__PURE__ */ t.jsx(
|
|
800
800
|
"div",
|
|
801
801
|
{
|
|
802
|
-
className:
|
|
803
|
-
children:
|
|
802
|
+
className: F.product,
|
|
803
|
+
children: E
|
|
804
804
|
},
|
|
805
|
-
|
|
805
|
+
h.id
|
|
806
806
|
);
|
|
807
807
|
};
|
|
808
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
809
|
-
(
|
|
810
|
-
|
|
811
|
-
|
|
808
|
+
return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
|
|
809
|
+
(u || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
|
|
810
|
+
u && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: u }),
|
|
811
|
+
s !== void 0 && /* @__PURE__ */ t.jsx(
|
|
812
812
|
it,
|
|
813
813
|
{
|
|
814
|
-
current:
|
|
815
|
-
onChange: (
|
|
814
|
+
current: s,
|
|
815
|
+
onChange: (h) => e == null ? void 0 : e(h)
|
|
816
816
|
}
|
|
817
817
|
)
|
|
818
818
|
] }),
|
|
819
|
-
|
|
820
|
-
|
|
819
|
+
w && m && a && p && /* @__PURE__ */ t.jsx(
|
|
820
|
+
wt,
|
|
821
821
|
{
|
|
822
|
-
ref:
|
|
823
|
-
activeItem:
|
|
824
|
-
setActiveItem:
|
|
825
|
-
popupPosition:
|
|
822
|
+
ref: B,
|
|
823
|
+
activeItem: w,
|
|
824
|
+
setActiveItem: z,
|
|
825
|
+
popupPosition: C,
|
|
826
826
|
modalOptions: a,
|
|
827
|
-
setIsOpenModal:
|
|
827
|
+
setIsOpenModal: j
|
|
828
828
|
}
|
|
829
829
|
),
|
|
830
|
-
x &&
|
|
831
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
832
|
-
o && /* @__PURE__ */ t.jsx("h5", { className:
|
|
833
|
-
|
|
834
|
-
|
|
830
|
+
x && k && /* @__PURE__ */ t.jsx(Nt, { ...k }),
|
|
831
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
|
|
832
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: o }),
|
|
833
|
+
g ? /* @__PURE__ */ t.jsx(
|
|
834
|
+
gt,
|
|
835
835
|
{
|
|
836
|
-
sensors:
|
|
837
|
-
onDragEnd:
|
|
836
|
+
sensors: A,
|
|
837
|
+
onDragEnd: L,
|
|
838
838
|
children: /* @__PURE__ */ t.jsx(
|
|
839
|
-
|
|
839
|
+
ft,
|
|
840
840
|
{
|
|
841
|
-
items:
|
|
842
|
-
strategy:
|
|
843
|
-
children:
|
|
841
|
+
items: n.map((h) => h.id),
|
|
842
|
+
strategy: xt,
|
|
843
|
+
children: n.map((h) => Q(h))
|
|
844
844
|
}
|
|
845
845
|
)
|
|
846
846
|
}
|
|
847
|
-
) :
|
|
848
|
-
|
|
847
|
+
) : n.map((h) => Q(h)),
|
|
848
|
+
l && /* @__PURE__ */ t.jsx(
|
|
849
849
|
"div",
|
|
850
850
|
{
|
|
851
851
|
style: {
|
|
@@ -857,52 +857,52 @@ const ti = (d) => {
|
|
|
857
857
|
ot,
|
|
858
858
|
{
|
|
859
859
|
withoutHover: !0,
|
|
860
|
-
className:
|
|
861
|
-
[
|
|
860
|
+
className: W(F.button, {
|
|
861
|
+
[F.disabled]: !!(D && D <= n.length)
|
|
862
862
|
}),
|
|
863
863
|
size: "s",
|
|
864
|
-
disabled: !!(
|
|
864
|
+
disabled: !!(D && D <= n.length),
|
|
865
865
|
onClick: () => {
|
|
866
|
-
const
|
|
867
|
-
let
|
|
868
|
-
if (
|
|
869
|
-
for (let
|
|
870
|
-
if (!
|
|
871
|
-
|
|
866
|
+
const h = [...n];
|
|
867
|
+
let E = null;
|
|
868
|
+
if (M) {
|
|
869
|
+
for (let P = 0; P < M.length; P++)
|
|
870
|
+
if (!n.find((R) => R.name["en-US"] === M[P])) {
|
|
871
|
+
E = M[P];
|
|
872
872
|
break;
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
|
-
T === "select" &&
|
|
875
|
+
T === "select" && M ? h.push({
|
|
876
876
|
name: {
|
|
877
|
-
"en-US":
|
|
877
|
+
"en-US": E || M[0]
|
|
878
878
|
},
|
|
879
|
-
id:
|
|
879
|
+
id: st(),
|
|
880
880
|
...b,
|
|
881
881
|
maxSymbols: 100
|
|
882
882
|
// пример значения
|
|
883
|
-
}) : T === "input" ?
|
|
883
|
+
}) : T === "input" ? h.push({
|
|
884
884
|
name: {
|
|
885
885
|
"en-US": ""
|
|
886
886
|
},
|
|
887
|
-
id:
|
|
887
|
+
id: st(),
|
|
888
888
|
...b,
|
|
889
889
|
maxSymbols: 100
|
|
890
|
-
}) :
|
|
890
|
+
}) : h.push({
|
|
891
891
|
name: {
|
|
892
|
-
"en-US": `Image ${
|
|
892
|
+
"en-US": `Image ${n.length + 1}`
|
|
893
893
|
},
|
|
894
|
-
id:
|
|
894
|
+
id: st(),
|
|
895
895
|
...b,
|
|
896
896
|
maxSymbols: 100
|
|
897
|
-
}), i(
|
|
897
|
+
}), i(h);
|
|
898
898
|
},
|
|
899
899
|
style: {
|
|
900
900
|
width: "fit-content"
|
|
901
901
|
},
|
|
902
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
902
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
|
|
903
903
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
904
904
|
/* @__PURE__ */ t.jsx(
|
|
905
|
-
|
|
905
|
+
f,
|
|
906
906
|
{
|
|
907
907
|
name: "Plus",
|
|
908
908
|
width: 16,
|
|
@@ -915,119 +915,119 @@ const ti = (d) => {
|
|
|
915
915
|
}
|
|
916
916
|
)
|
|
917
917
|
] }),
|
|
918
|
-
|
|
918
|
+
d !== void 0 && /* @__PURE__ */ t.jsx(mt, { items: d })
|
|
919
919
|
] });
|
|
920
|
-
},
|
|
921
|
-
subtitle:
|
|
922
|
-
header:
|
|
923
|
-
text:
|
|
924
|
-
productsBlock:
|
|
925
|
-
buttonsBlock:
|
|
926
|
-
top:
|
|
927
|
-
itemsBlock:
|
|
928
|
-
typeTexts:
|
|
929
|
-
block:
|
|
930
|
-
active:
|
|
931
|
-
products:
|
|
932
|
-
product:
|
|
933
|
-
button:
|
|
934
|
-
image:
|
|
935
|
-
info:
|
|
936
|
-
name:
|
|
937
|
-
buttons:
|
|
938
|
-
modal:
|
|
939
|
-
other:
|
|
940
|
-
options:
|
|
941
|
-
addButton:
|
|
942
|
-
deleteButton:
|
|
943
|
-
},
|
|
944
|
-
const { buttons:
|
|
920
|
+
}, Ye = "_subtitle_jql1y_1", Ge = "_header_jql1y_8", We = "_text_jql1y_9", Je = "_productsBlock_jql1y_10", Xe = "_buttonsBlock_jql1y_11", Ke = "_top_jql1y_23", Qe = "_itemsBlock_jql1y_32", Ze = "_typeTexts_jql1y_38", tn = "_block_jql1y_45", en = "_active_jql1y_58", nn = "_products_jql1y_10", sn = "_product_jql1y_10", on = "_button_jql1y_11", an = "_image_jql1y_88", cn = "_info_jql1y_95", ln = "_name_jql1y_107", rn = "_buttons_jql1y_11", dn = "_modal_jql1y_118", un = "_other_jql1y_138", mn = "_options_jql1y_144", hn = "_addButton_jql1y_150", pn = "_deleteButton_jql1y_165", Z = {
|
|
921
|
+
subtitle: Ye,
|
|
922
|
+
header: Ge,
|
|
923
|
+
text: We,
|
|
924
|
+
productsBlock: Je,
|
|
925
|
+
buttonsBlock: Xe,
|
|
926
|
+
top: Ke,
|
|
927
|
+
itemsBlock: Qe,
|
|
928
|
+
typeTexts: Ze,
|
|
929
|
+
block: tn,
|
|
930
|
+
active: en,
|
|
931
|
+
products: nn,
|
|
932
|
+
product: sn,
|
|
933
|
+
button: on,
|
|
934
|
+
image: an,
|
|
935
|
+
info: cn,
|
|
936
|
+
name: ln,
|
|
937
|
+
buttons: rn,
|
|
938
|
+
modal: dn,
|
|
939
|
+
other: un,
|
|
940
|
+
options: mn,
|
|
941
|
+
addButton: hn,
|
|
942
|
+
deleteButton: pn
|
|
943
|
+
}, _n = (r) => {
|
|
944
|
+
const { buttons: s, setButtons: e, deletable: n = !0, addable: i = !0, editableLink: d = !0 } = r, { pages: u } = Bt(), [o, m] = _.useState(null), [g, S] = _.useState({
|
|
945
945
|
top: 0,
|
|
946
946
|
left: 0
|
|
947
|
-
}), [
|
|
947
|
+
}), [c, l] = _.useState(null), T = _.useRef(null);
|
|
948
948
|
_.useEffect(() => {
|
|
949
949
|
if (o) {
|
|
950
|
-
const x = [...
|
|
950
|
+
const x = [...s].map((k) => k.id === o.id ? o : k);
|
|
951
951
|
e(x);
|
|
952
952
|
}
|
|
953
953
|
}, [o]), _.useEffect(() => {
|
|
954
|
-
if (T.current &&
|
|
955
|
-
const x = T.current.getBoundingClientRect().height,
|
|
956
|
-
let a =
|
|
957
|
-
a + x >
|
|
954
|
+
if (T.current && c) {
|
|
955
|
+
const x = T.current.getBoundingClientRect().height, k = window.innerHeight;
|
|
956
|
+
let a = c.top;
|
|
957
|
+
a + x > k + window.scrollY - 200 && (a = k + window.scrollY - x - 200), a < 0 && (a = 10), S({
|
|
958
958
|
top: a,
|
|
959
|
-
left:
|
|
959
|
+
left: c.left
|
|
960
960
|
});
|
|
961
961
|
}
|
|
962
|
-
}, [T.current,
|
|
963
|
-
const
|
|
962
|
+
}, [T.current, c]);
|
|
963
|
+
const $ = (x, k) => {
|
|
964
964
|
x.stopPropagation();
|
|
965
965
|
const a = x.target.getBoundingClientRect();
|
|
966
|
-
|
|
966
|
+
l({
|
|
967
967
|
top: a.top + window.scrollY - 70,
|
|
968
968
|
left: a.left - (i ? 30 : 65)
|
|
969
|
-
}),
|
|
970
|
-
},
|
|
971
|
-
const a = [...
|
|
969
|
+
}), m(k);
|
|
970
|
+
}, M = (x, k) => {
|
|
971
|
+
const a = [...s], b = {
|
|
972
972
|
...x,
|
|
973
973
|
id: Math.random().toString(36).substr(2, 9)
|
|
974
974
|
// Генерируем новый уникальный ID
|
|
975
975
|
};
|
|
976
|
-
a.splice(
|
|
976
|
+
a.splice(k + 1, 0, b), e(a);
|
|
977
977
|
};
|
|
978
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
979
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
980
|
-
|
|
978
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
|
|
979
|
+
/* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: "Button Type" }),
|
|
980
|
+
s.map((x, k) => /* @__PURE__ */ t.jsxs(
|
|
981
981
|
"div",
|
|
982
982
|
{
|
|
983
|
-
className:
|
|
983
|
+
className: Z.product,
|
|
984
984
|
children: [
|
|
985
985
|
/* @__PURE__ */ t.jsx(
|
|
986
986
|
at,
|
|
987
987
|
{
|
|
988
988
|
onChange: (a) => {
|
|
989
|
-
const
|
|
989
|
+
const D = [...s].map((w) => w.id === x.id ? {
|
|
990
990
|
...x,
|
|
991
991
|
type: a
|
|
992
|
-
} :
|
|
993
|
-
e(
|
|
992
|
+
} : w);
|
|
993
|
+
e(D);
|
|
994
994
|
},
|
|
995
995
|
value: x.type,
|
|
996
996
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
997
997
|
}
|
|
998
998
|
),
|
|
999
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1000
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1001
|
-
|
|
999
|
+
/* @__PURE__ */ t.jsxs("div", { className: Z.buttons, children: [
|
|
1000
|
+
/* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1001
|
+
f,
|
|
1002
1002
|
{
|
|
1003
1003
|
name: "Copy",
|
|
1004
1004
|
hoverable: !0,
|
|
1005
1005
|
width: 20,
|
|
1006
1006
|
height: 20,
|
|
1007
1007
|
onClick: () => {
|
|
1008
|
-
|
|
1008
|
+
M(x, k);
|
|
1009
1009
|
}
|
|
1010
1010
|
}
|
|
1011
1011
|
) }),
|
|
1012
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1013
|
-
|
|
1012
|
+
/* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1013
|
+
f,
|
|
1014
1014
|
{
|
|
1015
1015
|
name: "Sliders",
|
|
1016
1016
|
hoverable: !0,
|
|
1017
1017
|
width: 20,
|
|
1018
1018
|
height: 20,
|
|
1019
1019
|
onClick: (a) => {
|
|
1020
|
-
|
|
1020
|
+
$(a, x);
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
1023
|
) }),
|
|
1024
|
-
|
|
1025
|
-
|
|
1024
|
+
n && /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1025
|
+
f,
|
|
1026
1026
|
{
|
|
1027
1027
|
name: "Trash",
|
|
1028
1028
|
hoverable: !0,
|
|
1029
1029
|
onClick: () => {
|
|
1030
|
-
const a =
|
|
1030
|
+
const a = s.filter((b) => b.id !== x.id);
|
|
1031
1031
|
e(a);
|
|
1032
1032
|
},
|
|
1033
1033
|
width: 20,
|
|
@@ -1041,13 +1041,13 @@ const ti = (d) => {
|
|
|
1041
1041
|
x.id
|
|
1042
1042
|
)),
|
|
1043
1043
|
o && /* @__PURE__ */ t.jsx(
|
|
1044
|
-
|
|
1044
|
+
Pt,
|
|
1045
1045
|
{
|
|
1046
1046
|
ref: T,
|
|
1047
1047
|
activeButton: o,
|
|
1048
|
-
setActiveButton:
|
|
1049
|
-
popupPosition:
|
|
1050
|
-
editableLink:
|
|
1048
|
+
setActiveButton: m,
|
|
1049
|
+
popupPosition: g,
|
|
1050
|
+
editableLink: d
|
|
1051
1051
|
}
|
|
1052
1052
|
),
|
|
1053
1053
|
i && /* @__PURE__ */ t.jsx(
|
|
@@ -1062,39 +1062,39 @@ const ti = (d) => {
|
|
|
1062
1062
|
ot,
|
|
1063
1063
|
{
|
|
1064
1064
|
withoutHover: !0,
|
|
1065
|
-
className:
|
|
1065
|
+
className: Z.button,
|
|
1066
1066
|
size: "s",
|
|
1067
1067
|
onClick: () => {
|
|
1068
|
-
const x = [...
|
|
1069
|
-
|
|
1068
|
+
const x = [...s];
|
|
1069
|
+
d ? x.push({
|
|
1070
1070
|
type: "Primary",
|
|
1071
|
-
id:
|
|
1071
|
+
id: st(),
|
|
1072
1072
|
typesText: [],
|
|
1073
1073
|
text: {
|
|
1074
1074
|
"en-US": "Button Name"
|
|
1075
1075
|
},
|
|
1076
1076
|
destination: "Go to Page",
|
|
1077
|
-
page:
|
|
1077
|
+
page: u ? Object.values(u)[0].name : "Home",
|
|
1078
1078
|
openInNewTab: !1
|
|
1079
1079
|
}) : x.push({
|
|
1080
1080
|
type: "Primary",
|
|
1081
|
-
id:
|
|
1081
|
+
id: st(),
|
|
1082
1082
|
typesText: [],
|
|
1083
1083
|
text: {
|
|
1084
1084
|
"en-US": "Create Ticket"
|
|
1085
1085
|
},
|
|
1086
1086
|
destination: "Go to Page",
|
|
1087
|
-
page:
|
|
1087
|
+
page: u ? Object.values(u)[0].name : "Home",
|
|
1088
1088
|
openInNewTab: !1
|
|
1089
1089
|
}), e(x);
|
|
1090
1090
|
},
|
|
1091
1091
|
style: {
|
|
1092
1092
|
width: "fit-content"
|
|
1093
1093
|
},
|
|
1094
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1094
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: Z.addButton, children: [
|
|
1095
1095
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1096
1096
|
/* @__PURE__ */ t.jsx(
|
|
1097
|
-
|
|
1097
|
+
f,
|
|
1098
1098
|
{
|
|
1099
1099
|
name: "Plus",
|
|
1100
1100
|
width: 16,
|
|
@@ -1107,120 +1107,121 @@ const ti = (d) => {
|
|
|
1107
1107
|
}
|
|
1108
1108
|
)
|
|
1109
1109
|
] });
|
|
1110
|
-
},
|
|
1110
|
+
}, ai = (r) => {
|
|
1111
1111
|
const {
|
|
1112
|
-
isActiveButtons:
|
|
1112
|
+
isActiveButtons: s,
|
|
1113
1113
|
setIsActiveButtons: e,
|
|
1114
|
-
buttons:
|
|
1114
|
+
buttons: n,
|
|
1115
1115
|
setButtons: i,
|
|
1116
|
-
editableLink:
|
|
1117
|
-
addable:
|
|
1116
|
+
editableLink: d = !0,
|
|
1117
|
+
addable: u = !0,
|
|
1118
1118
|
deletable: o = !0
|
|
1119
|
-
} =
|
|
1119
|
+
} = r;
|
|
1120
1120
|
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: rt.buttonsBlock, children: [
|
|
1121
1121
|
/* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
|
|
1122
1122
|
/* @__PURE__ */ t.jsx("h3", { className: rt.title, children: "Buttons" }),
|
|
1123
1123
|
/* @__PURE__ */ t.jsx(
|
|
1124
1124
|
it,
|
|
1125
1125
|
{
|
|
1126
|
-
current:
|
|
1127
|
-
onChange: (
|
|
1126
|
+
current: s,
|
|
1127
|
+
onChange: (m) => e(m)
|
|
1128
1128
|
}
|
|
1129
1129
|
)
|
|
1130
1130
|
] }),
|
|
1131
|
-
|
|
1132
|
-
|
|
1131
|
+
s && /* @__PURE__ */ t.jsx(
|
|
1132
|
+
_n,
|
|
1133
1133
|
{
|
|
1134
|
-
buttons:
|
|
1134
|
+
buttons: n,
|
|
1135
1135
|
setButtons: i,
|
|
1136
|
-
editableLink:
|
|
1137
|
-
addable:
|
|
1136
|
+
editableLink: d,
|
|
1137
|
+
addable: u,
|
|
1138
1138
|
deletable: o
|
|
1139
1139
|
}
|
|
1140
1140
|
)
|
|
1141
1141
|
] }) });
|
|
1142
1142
|
};
|
|
1143
|
-
function
|
|
1144
|
-
const { product:
|
|
1145
|
-
id: String(
|
|
1146
|
-
}),
|
|
1147
|
-
transform: bt.Transform.toString(
|
|
1143
|
+
function gn(r) {
|
|
1144
|
+
const { product: s, children: e } = r, { attributes: n, listeners: i, setNodeRef: d, transform: u, transition: o, isDragging: m } = jt({
|
|
1145
|
+
id: String(s.listingId)
|
|
1146
|
+
}), g = {
|
|
1147
|
+
transform: bt.Transform.toString(u),
|
|
1148
1148
|
transition: o
|
|
1149
1149
|
};
|
|
1150
1150
|
return /* @__PURE__ */ t.jsx(
|
|
1151
1151
|
"div",
|
|
1152
1152
|
{
|
|
1153
|
-
ref:
|
|
1154
|
-
style:
|
|
1155
|
-
className: `${
|
|
1156
|
-
...
|
|
1153
|
+
ref: d,
|
|
1154
|
+
style: g,
|
|
1155
|
+
className: `${G.product} ${m ? G.dragging : ""}`,
|
|
1156
|
+
...n,
|
|
1157
1157
|
...i,
|
|
1158
1158
|
children: e
|
|
1159
1159
|
}
|
|
1160
1160
|
);
|
|
1161
1161
|
}
|
|
1162
|
-
const
|
|
1162
|
+
const ci = (r) => {
|
|
1163
1163
|
const {
|
|
1164
|
-
isActiveItems:
|
|
1164
|
+
isActiveItems: s,
|
|
1165
1165
|
setIsActiveItems: e,
|
|
1166
|
-
items:
|
|
1166
|
+
items: n,
|
|
1167
1167
|
setItems: i,
|
|
1168
|
-
other:
|
|
1169
|
-
title:
|
|
1168
|
+
other: d,
|
|
1169
|
+
title: u,
|
|
1170
1170
|
subtitle: o,
|
|
1171
|
-
editable:
|
|
1172
|
-
draggable:
|
|
1173
|
-
withImage:
|
|
1174
|
-
deletable:
|
|
1175
|
-
addable:
|
|
1171
|
+
editable: m = !0,
|
|
1172
|
+
draggable: g = !1,
|
|
1173
|
+
withImage: S = !1,
|
|
1174
|
+
deletable: c = !0,
|
|
1175
|
+
addable: l = !0,
|
|
1176
1176
|
itemsType: T,
|
|
1177
|
-
itemsOptions:
|
|
1178
|
-
|
|
1177
|
+
itemsOptions: $,
|
|
1178
|
+
limit: M
|
|
1179
|
+
} = r, [x, k] = _.useState(
|
|
1179
1180
|
null
|
|
1180
|
-
), [
|
|
1181
|
+
), [a, b] = _.useState({
|
|
1181
1182
|
top: 0,
|
|
1182
1183
|
left: 0
|
|
1183
|
-
}), [
|
|
1184
|
-
|
|
1184
|
+
}), [D, w] = _.useState(!1), z = ht(
|
|
1185
|
+
pt(_t, {
|
|
1185
1186
|
activationConstraint: {
|
|
1186
1187
|
distance: 5
|
|
1187
1188
|
}
|
|
1188
1189
|
})
|
|
1189
1190
|
);
|
|
1190
1191
|
_.useEffect(() => {
|
|
1191
|
-
const
|
|
1192
|
-
|
|
1192
|
+
const p = () => {
|
|
1193
|
+
k(null), w(!1);
|
|
1193
1194
|
};
|
|
1194
|
-
return document.body.addEventListener("click",
|
|
1195
|
-
|
|
1195
|
+
return document.body.addEventListener("click", p), k(null), w(!1), () => {
|
|
1196
|
+
k(null), w(!1), document.body.removeEventListener("click", p);
|
|
1196
1197
|
};
|
|
1197
1198
|
}, []), _.useEffect(() => {
|
|
1198
|
-
if (
|
|
1199
|
-
const
|
|
1200
|
-
i(
|
|
1199
|
+
if (x) {
|
|
1200
|
+
const p = [...n].map((j) => j.listingId === x.listingId ? x : j);
|
|
1201
|
+
i(p);
|
|
1201
1202
|
}
|
|
1202
|
-
}, [
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1205
|
-
const
|
|
1206
|
-
let L =
|
|
1207
|
-
L + U >
|
|
1203
|
+
}, [x]);
|
|
1204
|
+
const C = (p, j) => {
|
|
1205
|
+
p.stopPropagation();
|
|
1206
|
+
const A = p.target.getBoundingClientRect(), U = 100, O = window.innerHeight;
|
|
1207
|
+
let L = A.top + window.scrollY;
|
|
1208
|
+
L + U > O && (L = O - U - 20), w(!0), b({
|
|
1208
1209
|
top: L - 80,
|
|
1209
|
-
left:
|
|
1210
|
-
}),
|
|
1210
|
+
left: A.left - 30
|
|
1211
|
+
}), k(j);
|
|
1211
1212
|
};
|
|
1212
|
-
function
|
|
1213
|
-
if (
|
|
1214
|
-
return
|
|
1213
|
+
function v(p) {
|
|
1214
|
+
if (S)
|
|
1215
|
+
return p ? /* @__PURE__ */ t.jsx(
|
|
1215
1216
|
"img",
|
|
1216
1217
|
{
|
|
1217
|
-
src: `https://imagedelivery.net/${
|
|
1218
|
+
src: `https://imagedelivery.net/${p}/w=1000`,
|
|
1218
1219
|
alt: "image",
|
|
1219
1220
|
width: 16,
|
|
1220
1221
|
height: 16
|
|
1221
1222
|
}
|
|
1222
1223
|
) : /* @__PURE__ */ t.jsx(
|
|
1223
|
-
|
|
1224
|
+
f,
|
|
1224
1225
|
{
|
|
1225
1226
|
name: "Image",
|
|
1226
1227
|
width: 16,
|
|
@@ -1229,21 +1230,21 @@ const si = (d) => {
|
|
|
1229
1230
|
}
|
|
1230
1231
|
);
|
|
1231
1232
|
}
|
|
1232
|
-
const
|
|
1233
|
-
const { active:
|
|
1234
|
-
if (
|
|
1235
|
-
const U =
|
|
1236
|
-
if (U !== -1 &&
|
|
1237
|
-
const L = [...
|
|
1238
|
-
L.splice(
|
|
1233
|
+
const I = (p) => {
|
|
1234
|
+
const { active: j, over: A } = p;
|
|
1235
|
+
if (A && j.id !== A.id) {
|
|
1236
|
+
const U = n.findIndex((L) => String(L.listingId) === j.id), O = n.findIndex((L) => String(L.listingId) === A.id);
|
|
1237
|
+
if (U !== -1 && O !== -1) {
|
|
1238
|
+
const L = [...n], [Q] = L.splice(U, 1);
|
|
1239
|
+
L.splice(O, 0, Q), i(L);
|
|
1239
1240
|
}
|
|
1240
1241
|
}
|
|
1241
|
-
},
|
|
1242
|
-
const
|
|
1243
|
-
if (!
|
|
1242
|
+
}, q = (p, j) => {
|
|
1243
|
+
const A = $.find((O) => p.listingId === O.id);
|
|
1244
|
+
if (!A) return null;
|
|
1244
1245
|
const U = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1245
|
-
|
|
1246
|
-
|
|
1246
|
+
g && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1247
|
+
f,
|
|
1247
1248
|
{
|
|
1248
1249
|
name: "DotsSixVertical",
|
|
1249
1250
|
hoverable: !0,
|
|
@@ -1254,105 +1255,105 @@ const si = (d) => {
|
|
|
1254
1255
|
T === "select" && /* @__PURE__ */ t.jsx(
|
|
1255
1256
|
at,
|
|
1256
1257
|
{
|
|
1257
|
-
onChange: (
|
|
1258
|
-
const L = [...
|
|
1259
|
-
if (!
|
|
1260
|
-
const
|
|
1261
|
-
listingId:
|
|
1262
|
-
image:
|
|
1263
|
-
},
|
|
1264
|
-
|
|
1258
|
+
onChange: (O) => {
|
|
1259
|
+
const L = [...n], Q = $.find((P) => P.productData.name === O);
|
|
1260
|
+
if (!Q) return;
|
|
1261
|
+
const h = {
|
|
1262
|
+
listingId: Q.id,
|
|
1263
|
+
image: Q.productData.images.length > 0 ? Q.productData.images[0].cfId : ""
|
|
1264
|
+
}, E = L.map((P) => P.listingId === p.listingId ? h : P);
|
|
1265
|
+
k(h), i([...E]);
|
|
1265
1266
|
},
|
|
1266
|
-
value:
|
|
1267
|
+
value: A.productData.name,
|
|
1267
1268
|
options: [
|
|
1268
|
-
|
|
1269
|
+
...$.filter((O) => !n.find((L) => L.listingId === O.id)).map((O) => O.productData.name)
|
|
1269
1270
|
],
|
|
1270
|
-
leftAddon:
|
|
1271
|
-
|
|
1271
|
+
leftAddon: v(
|
|
1272
|
+
p.image || A.productData.images.length > 0 && A.productData.images[0].cfId || ""
|
|
1272
1273
|
)
|
|
1273
1274
|
},
|
|
1274
|
-
|
|
1275
|
+
j
|
|
1275
1276
|
),
|
|
1276
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1277
|
-
|
|
1278
|
-
|
|
1277
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.buttons, children: [
|
|
1278
|
+
m && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1279
|
+
f,
|
|
1279
1280
|
{
|
|
1280
1281
|
name: "Sliders",
|
|
1281
1282
|
hoverable: !0,
|
|
1282
1283
|
width: 20,
|
|
1283
1284
|
height: 20,
|
|
1284
|
-
onClick: (
|
|
1285
|
+
onClick: (O) => C(O, p)
|
|
1285
1286
|
}
|
|
1286
1287
|
) }),
|
|
1287
|
-
|
|
1288
|
-
|
|
1288
|
+
c && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1289
|
+
f,
|
|
1289
1290
|
{
|
|
1290
1291
|
name: "Trash",
|
|
1291
1292
|
hoverable: !0,
|
|
1292
1293
|
width: 20,
|
|
1293
1294
|
height: 20,
|
|
1294
1295
|
fill: "#C12A2A",
|
|
1295
|
-
onClick: () => i(
|
|
1296
|
+
onClick: () => i(n.filter((O) => O !== p))
|
|
1296
1297
|
}
|
|
1297
1298
|
) })
|
|
1298
1299
|
] })
|
|
1299
1300
|
] });
|
|
1300
|
-
return
|
|
1301
|
-
|
|
1301
|
+
return g ? /* @__PURE__ */ t.jsx(
|
|
1302
|
+
gn,
|
|
1302
1303
|
{
|
|
1303
|
-
product:
|
|
1304
|
+
product: p,
|
|
1304
1305
|
children: U
|
|
1305
1306
|
},
|
|
1306
|
-
|
|
1307
|
+
p.listingId
|
|
1307
1308
|
) : /* @__PURE__ */ t.jsx(
|
|
1308
1309
|
"div",
|
|
1309
1310
|
{
|
|
1310
|
-
className:
|
|
1311
|
+
className: G.product,
|
|
1311
1312
|
children: U
|
|
1312
1313
|
},
|
|
1313
|
-
|
|
1314
|
+
p.listingId
|
|
1314
1315
|
);
|
|
1315
|
-
},
|
|
1316
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1317
|
-
(
|
|
1318
|
-
|
|
1319
|
-
|
|
1316
|
+
}, B = _.useRef(null);
|
|
1317
|
+
return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
|
|
1318
|
+
(u || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
|
|
1319
|
+
u && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: u }),
|
|
1320
|
+
s !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1320
1321
|
it,
|
|
1321
1322
|
{
|
|
1322
|
-
current:
|
|
1323
|
-
onChange: (
|
|
1323
|
+
current: s,
|
|
1324
|
+
onChange: (p) => e == null ? void 0 : e(p)
|
|
1324
1325
|
}
|
|
1325
1326
|
)
|
|
1326
1327
|
] }),
|
|
1327
|
-
|
|
1328
|
-
|
|
1328
|
+
D && x && /* @__PURE__ */ t.jsx(
|
|
1329
|
+
Mt,
|
|
1329
1330
|
{
|
|
1330
|
-
ref:
|
|
1331
|
-
activeItem:
|
|
1332
|
-
setActiveItem:
|
|
1333
|
-
setIsOpenModal:
|
|
1334
|
-
popupPosition:
|
|
1335
|
-
itemsOptions:
|
|
1331
|
+
ref: B,
|
|
1332
|
+
activeItem: x,
|
|
1333
|
+
setActiveItem: k,
|
|
1334
|
+
setIsOpenModal: w,
|
|
1335
|
+
popupPosition: a,
|
|
1336
|
+
itemsOptions: $
|
|
1336
1337
|
}
|
|
1337
1338
|
),
|
|
1338
|
-
|
|
1339
|
-
o && /* @__PURE__ */ t.jsx("h5", { className:
|
|
1340
|
-
|
|
1341
|
-
|
|
1339
|
+
s && /* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
|
|
1340
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: o }),
|
|
1341
|
+
g ? /* @__PURE__ */ t.jsx(
|
|
1342
|
+
gt,
|
|
1342
1343
|
{
|
|
1343
|
-
sensors:
|
|
1344
|
-
onDragEnd:
|
|
1344
|
+
sensors: z,
|
|
1345
|
+
onDragEnd: I,
|
|
1345
1346
|
children: /* @__PURE__ */ t.jsx(
|
|
1346
|
-
|
|
1347
|
+
ft,
|
|
1347
1348
|
{
|
|
1348
|
-
items:
|
|
1349
|
-
strategy:
|
|
1350
|
-
children:
|
|
1349
|
+
items: n.map((p) => String(p.listingId)),
|
|
1350
|
+
strategy: xt,
|
|
1351
|
+
children: n.map((p, j) => q(p, j))
|
|
1351
1352
|
}
|
|
1352
1353
|
)
|
|
1353
1354
|
}
|
|
1354
|
-
) :
|
|
1355
|
-
|
|
1355
|
+
) : n.map((p, j) => q(p, j)),
|
|
1356
|
+
l && /* @__PURE__ */ t.jsx(
|
|
1356
1357
|
"div",
|
|
1357
1358
|
{
|
|
1358
1359
|
style: {
|
|
@@ -1364,28 +1365,28 @@ const si = (d) => {
|
|
|
1364
1365
|
ot,
|
|
1365
1366
|
{
|
|
1366
1367
|
withoutHover: !0,
|
|
1367
|
-
className:
|
|
1368
|
+
className: G.button,
|
|
1368
1369
|
size: "s",
|
|
1369
1370
|
onClick: () => {
|
|
1370
|
-
const
|
|
1371
|
-
for (let
|
|
1372
|
-
if (!
|
|
1373
|
-
|
|
1374
|
-
listingId:
|
|
1375
|
-
image:
|
|
1371
|
+
const p = [...n];
|
|
1372
|
+
for (let j = 0; j < $.length; j++)
|
|
1373
|
+
if (!n.find((A) => A.listingId === $[j].id)) {
|
|
1374
|
+
p.push({
|
|
1375
|
+
listingId: $[j].id,
|
|
1376
|
+
image: $[j].productData.images.length > 0 ? $[j].productData.images[0].cfId : ""
|
|
1376
1377
|
});
|
|
1377
1378
|
break;
|
|
1378
1379
|
}
|
|
1379
|
-
i(
|
|
1380
|
+
i(p);
|
|
1380
1381
|
},
|
|
1381
|
-
disabled:
|
|
1382
|
+
disabled: n.length === (M || $.length),
|
|
1382
1383
|
style: {
|
|
1383
1384
|
width: "fit-content"
|
|
1384
1385
|
},
|
|
1385
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1386
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
|
|
1386
1387
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1387
1388
|
/* @__PURE__ */ t.jsx(
|
|
1388
|
-
|
|
1389
|
+
f,
|
|
1389
1390
|
{
|
|
1390
1391
|
name: "Plus",
|
|
1391
1392
|
width: 16,
|
|
@@ -1398,99 +1399,99 @@ const si = (d) => {
|
|
|
1398
1399
|
}
|
|
1399
1400
|
)
|
|
1400
1401
|
] }),
|
|
1401
|
-
|
|
1402
|
+
s && d !== void 0 && /* @__PURE__ */ t.jsx(mt, { items: d })
|
|
1402
1403
|
] });
|
|
1403
|
-
},
|
|
1404
|
-
options:
|
|
1405
|
-
price:
|
|
1406
|
-
oldPrice:
|
|
1407
|
-
newPrice:
|
|
1408
|
-
animate:
|
|
1409
|
-
appearAndBounce:
|
|
1410
|
-
meta:
|
|
1411
|
-
info:
|
|
1412
|
-
infoRight:
|
|
1413
|
-
buttons:
|
|
1414
|
-
variants:
|
|
1415
|
-
variant:
|
|
1416
|
-
stock:
|
|
1417
|
-
variantInfo:
|
|
1418
|
-
quantity:
|
|
1419
|
-
count:
|
|
1420
|
-
focused:
|
|
1421
|
-
button:
|
|
1422
|
-
activeVariant:
|
|
1423
|
-
chargeTypes:
|
|
1424
|
-
charge:
|
|
1425
|
-
chargeActive:
|
|
1426
|
-
title:
|
|
1404
|
+
}, fn = "_options_6cemk_1", xn = "_price_6cemk_12", jn = "_oldPrice_6cemk_19", bn = "_newPrice_6cemk_27", vn = "_animate_6cemk_34", yn = "_appearAndBounce_6cemk_1", Nn = "_meta_6cemk_52", kn = "_info_6cemk_58", In = "_infoRight_6cemk_66", Cn = "_buttons_6cemk_73", Sn = "_variants_6cemk_80", wn = "_variant_6cemk_80", $n = "_stock_6cemk_98", Bn = "_variantInfo_6cemk_105", Pn = "_quantity_6cemk_111", Mn = "_count_6cemk_118", Tn = "_focused_6cemk_135", qn = "_button_6cemk_73", An = "_activeVariant_6cemk_161", On = "_chargeTypes_6cemk_165", En = "_charge_6cemk_165", Rn = "_chargeActive_6cemk_190", Dn = "_title_6cemk_198", N = {
|
|
1405
|
+
options: fn,
|
|
1406
|
+
price: xn,
|
|
1407
|
+
oldPrice: jn,
|
|
1408
|
+
newPrice: bn,
|
|
1409
|
+
animate: vn,
|
|
1410
|
+
appearAndBounce: yn,
|
|
1411
|
+
meta: Nn,
|
|
1412
|
+
info: kn,
|
|
1413
|
+
infoRight: In,
|
|
1414
|
+
buttons: Cn,
|
|
1415
|
+
variants: Sn,
|
|
1416
|
+
variant: wn,
|
|
1417
|
+
stock: $n,
|
|
1418
|
+
variantInfo: Bn,
|
|
1419
|
+
quantity: Pn,
|
|
1420
|
+
count: Mn,
|
|
1421
|
+
focused: Tn,
|
|
1422
|
+
button: qn,
|
|
1423
|
+
activeVariant: An,
|
|
1424
|
+
chargeTypes: On,
|
|
1425
|
+
charge: En,
|
|
1426
|
+
chargeActive: Rn,
|
|
1427
|
+
title: Dn
|
|
1427
1428
|
};
|
|
1428
|
-
var
|
|
1429
|
-
const
|
|
1430
|
-
var x,
|
|
1431
|
-
const { variants:
|
|
1429
|
+
var Ct = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(Ct || {});
|
|
1430
|
+
const li = (r) => {
|
|
1431
|
+
var x, k;
|
|
1432
|
+
const { variants: s } = r, [e, n] = _.useState(s[0]), [i, d] = _.useState(e.chargeTypes[0]), u = lt(), [o, m] = _.useState(1), { reset: g, addProductToCart: S } = vt(), [c, l] = _.useState(!1);
|
|
1432
1433
|
_.useEffect(() => {
|
|
1433
|
-
|
|
1434
|
-
const a = setTimeout(() =>
|
|
1434
|
+
l(!0);
|
|
1435
|
+
const a = setTimeout(() => l(!1), 600);
|
|
1435
1436
|
return () => clearTimeout(a);
|
|
1436
1437
|
}, [o]);
|
|
1437
1438
|
async function T() {
|
|
1438
|
-
await
|
|
1439
|
-
productId:
|
|
1439
|
+
await S({
|
|
1440
|
+
productId: r.id,
|
|
1440
1441
|
productVariantId: e.id,
|
|
1441
1442
|
quantity: o
|
|
1442
1443
|
});
|
|
1443
1444
|
}
|
|
1444
|
-
function
|
|
1445
|
-
|
|
1445
|
+
function $() {
|
|
1446
|
+
g(), T(), u("/checkout");
|
|
1446
1447
|
}
|
|
1447
|
-
function
|
|
1448
|
+
function M(a) {
|
|
1448
1449
|
if (a >= 864e5) {
|
|
1449
|
-
const
|
|
1450
|
-
return `${
|
|
1450
|
+
const C = Math.floor(a / 864e5);
|
|
1451
|
+
return `${C} ${C === 1 ? "day" : "days"}`;
|
|
1451
1452
|
} else if (a >= 36e5) {
|
|
1452
|
-
const
|
|
1453
|
-
return `${
|
|
1453
|
+
const C = Math.floor(a / 36e5);
|
|
1454
|
+
return `${C} ${C === 1 ? "hour" : "hours"}`;
|
|
1454
1455
|
} else if (a >= 6e4) {
|
|
1455
|
-
const
|
|
1456
|
-
return `${
|
|
1456
|
+
const C = Math.floor(a / 6e4);
|
|
1457
|
+
return `${C} ${C === 1 ? "minute" : "minutes"}`;
|
|
1457
1458
|
} else {
|
|
1458
|
-
const
|
|
1459
|
-
return `${
|
|
1459
|
+
const C = Math.floor(a / 1e3);
|
|
1460
|
+
return `${C} ${C === 1 ? "second" : "seconds"}`;
|
|
1460
1461
|
}
|
|
1461
1462
|
}
|
|
1462
1463
|
return _.useEffect(() => {
|
|
1463
|
-
(e.quantity.available === 0 || !e.quantity.available) &&
|
|
1464
|
-
}, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
1465
|
-
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className:
|
|
1464
|
+
(e.quantity.available === 0 || !e.quantity.available) && m(0);
|
|
1465
|
+
}, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: N.options, children: [
|
|
1466
|
+
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: N.chargeTypes, children: e.chargeTypes.map((a) => /* @__PURE__ */ t.jsx(
|
|
1466
1467
|
"div",
|
|
1467
1468
|
{
|
|
1468
|
-
className:
|
|
1469
|
-
[
|
|
1469
|
+
className: W(N.charge, {
|
|
1470
|
+
[N.chargeActive]: i === a
|
|
1470
1471
|
}),
|
|
1471
|
-
onClick: () =>
|
|
1472
|
-
children:
|
|
1472
|
+
onClick: () => d(a),
|
|
1473
|
+
children: Ct[a]
|
|
1473
1474
|
},
|
|
1474
1475
|
a
|
|
1475
1476
|
)) }),
|
|
1476
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1477
|
+
/* @__PURE__ */ t.jsx("div", { className: N.variants, children: s.map((a) => {
|
|
1477
1478
|
var b;
|
|
1478
1479
|
return /* @__PURE__ */ t.jsxs(
|
|
1479
1480
|
"div",
|
|
1480
1481
|
{
|
|
1481
|
-
className:
|
|
1482
|
-
[
|
|
1482
|
+
className: W(N.variant, {
|
|
1483
|
+
[N.activeVariant]: e.id === a.id
|
|
1483
1484
|
}),
|
|
1484
|
-
onClick: () =>
|
|
1485
|
+
onClick: () => n(a),
|
|
1485
1486
|
children: [
|
|
1486
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1487
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1487
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.variantInfo, children: [
|
|
1488
|
+
/* @__PURE__ */ t.jsx("span", { className: N.title, children: a.name }),
|
|
1488
1489
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
1489
1490
|
"$",
|
|
1490
1491
|
i === "ONE_TIME" ? a.price.amount : a.subscriptionSettings ? a.subscriptionSettings.price.amount : "Price Not Found"
|
|
1491
1492
|
] })
|
|
1492
1493
|
] }),
|
|
1493
|
-
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className:
|
|
1494
|
+
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: N.stock, children: [
|
|
1494
1495
|
((b = a.quantity.restrictions) == null ? void 0 : b.max) || a.quantity.available || 0,
|
|
1495
1496
|
" in stock"
|
|
1496
1497
|
] }) })
|
|
@@ -1499,27 +1500,27 @@ const ni = (d) => {
|
|
|
1499
1500
|
a.id
|
|
1500
1501
|
);
|
|
1501
1502
|
}) }),
|
|
1502
|
-
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className:
|
|
1503
|
+
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: N.quantity, children: [
|
|
1503
1504
|
/* @__PURE__ */ t.jsx(
|
|
1504
1505
|
H,
|
|
1505
1506
|
{
|
|
1506
1507
|
type: "Secondary",
|
|
1507
1508
|
onClick: () => {
|
|
1508
|
-
o > 1 ?
|
|
1509
|
+
o > 1 ? m((a) => a - 1) : m(1);
|
|
1509
1510
|
},
|
|
1510
|
-
className:
|
|
1511
|
+
className: N.button,
|
|
1511
1512
|
disabled: e.quantity.available === 0 || e.quantity.restrictions && o <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
1512
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1513
|
+
children: /* @__PURE__ */ t.jsx(f, { name: "Minus" })
|
|
1513
1514
|
}
|
|
1514
1515
|
),
|
|
1515
1516
|
/* @__PURE__ */ t.jsx(
|
|
1516
|
-
|
|
1517
|
+
Tt,
|
|
1517
1518
|
{
|
|
1518
1519
|
type: "number",
|
|
1519
1520
|
value: String(o),
|
|
1520
|
-
onChange: (a) =>
|
|
1521
|
+
onChange: (a) => m(Number(a)),
|
|
1521
1522
|
max: ((x = e.quantity.restrictions) == null ? void 0 : x.max) || e.quantity.available || 1 / 0,
|
|
1522
|
-
min: ((
|
|
1523
|
+
min: ((k = e.quantity.restrictions) == null ? void 0 : k.min) || 0,
|
|
1523
1524
|
centered: !0,
|
|
1524
1525
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available
|
|
1525
1526
|
}
|
|
@@ -1529,20 +1530,20 @@ const ni = (d) => {
|
|
|
1529
1530
|
{
|
|
1530
1531
|
type: "Secondary",
|
|
1531
1532
|
onClick: () => {
|
|
1532
|
-
|
|
1533
|
+
m((a) => a + 1);
|
|
1533
1534
|
},
|
|
1534
|
-
className:
|
|
1535
|
+
className: N.button,
|
|
1535
1536
|
disabled: !!(e.quantity.restrictions && o >= e.quantity.restrictions.max || e.quantity.available !== void 0 && o >= e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available),
|
|
1536
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1537
|
+
children: /* @__PURE__ */ t.jsx(f, { name: "Plus" })
|
|
1537
1538
|
}
|
|
1538
1539
|
)
|
|
1539
1540
|
] }),
|
|
1540
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1541
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1541
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.meta, children: [
|
|
1542
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
|
|
1542
1543
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
1543
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1544
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.infoRight, children: [
|
|
1544
1545
|
/* @__PURE__ */ t.jsx(
|
|
1545
|
-
|
|
1546
|
+
f,
|
|
1546
1547
|
{
|
|
1547
1548
|
name: "Lightning",
|
|
1548
1549
|
fill: "#FF3F19",
|
|
@@ -1550,44 +1551,44 @@ const ni = (d) => {
|
|
|
1550
1551
|
height: 20
|
|
1551
1552
|
}
|
|
1552
1553
|
),
|
|
1553
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
1554
|
+
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : M(e.deliveryTime) })
|
|
1554
1555
|
] })
|
|
1555
1556
|
] }),
|
|
1556
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1557
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
|
|
1557
1558
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
1558
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1559
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1559
|
+
/* @__PURE__ */ t.jsx("div", { className: N.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
|
|
1560
|
+
/* @__PURE__ */ t.jsxs("span", { className: W(N.newPrice, { [N.animate]: c }), children: [
|
|
1560
1561
|
"$ ",
|
|
1561
1562
|
(e.price.amount || 0) * o
|
|
1562
1563
|
] }),
|
|
1563
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1564
|
+
/* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
|
|
1564
1565
|
"$ ",
|
|
1565
1566
|
(e.compareAtPrice.amount || 0) * o
|
|
1566
1567
|
] })
|
|
1567
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
1568
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: W(N.newPrice, { [N.animate]: c }), children: [
|
|
1568
1569
|
"$ ",
|
|
1569
1570
|
(e.price.amount || 0) * o
|
|
1570
|
-
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
1571
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1571
|
+
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
|
|
1572
|
+
/* @__PURE__ */ t.jsxs("span", { className: W(N.newPrice, { [N.animate]: c }), children: [
|
|
1572
1573
|
"$ ",
|
|
1573
1574
|
e.subscriptionSettings.price.amount || 0
|
|
1574
1575
|
] }),
|
|
1575
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1576
|
+
/* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
|
|
1576
1577
|
"$ ",
|
|
1577
1578
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
1578
1579
|
] })
|
|
1579
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
1580
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: W(N.newPrice, { [N.animate]: c }), children: [
|
|
1580
1581
|
"$ ",
|
|
1581
1582
|
e.subscriptionSettings.price.amount || 0
|
|
1582
1583
|
] }) })
|
|
1583
1584
|
] })
|
|
1584
1585
|
] }),
|
|
1585
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1586
|
+
/* @__PURE__ */ t.jsxs("div", { className: N.buttons, children: [
|
|
1586
1587
|
/* @__PURE__ */ t.jsx(
|
|
1587
1588
|
H,
|
|
1588
1589
|
{
|
|
1589
1590
|
type: "Primary",
|
|
1590
|
-
onClick: () =>
|
|
1591
|
+
onClick: () => $(),
|
|
1591
1592
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
1592
1593
|
children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
|
|
1593
1594
|
}
|
|
@@ -1603,59 +1604,59 @@ const ni = (d) => {
|
|
|
1603
1604
|
)
|
|
1604
1605
|
] })
|
|
1605
1606
|
] });
|
|
1606
|
-
},
|
|
1607
|
-
button:
|
|
1608
|
-
login:
|
|
1609
|
-
signUp:
|
|
1610
|
-
buttons:
|
|
1611
|
-
modal:
|
|
1607
|
+
}, Ln = "_button_1tdo3_1", zn = "_login_1tdo3_14", Un = "_signUp_1tdo3_18", Hn = "_buttons_1tdo3_23", Fn = "_modal_1tdo3_32", Vn = "_closing_1tdo3_64", Yn = "_info_1tdo3_113", Gn = "_top_1tdo3_120", Wn = "_title_1tdo3_131", Jn = "_clear_1tdo3_138", Xn = "_activeClear_1tdo3_145", Kn = "_count_1tdo3_149", Qn = "_cart_1tdo3_164", Zn = "_empty_1tdo3_172", ts = "_product_1tdo3_198", es = "_products_1tdo3_207", ns = "_image_1tdo3_215", ss = "_productInfo_1tdo3_221", is = "_content_1tdo3_228", os = "_name_1tdo3_234", as = "_price_1tdo3_240", cs = "_productButtons_1tdo3_246", ls = "_productButton_1tdo3_246", rs = "_productCount_1tdo3_266", ds = "_bottom_1tdo3_282", us = "_subtotal_1tdo3_290", ms = "_block_1tdo3_298", hs = "_shoppingCount_1tdo3_305", ps = "_total_1tdo3_325", _s = "_link_1tdo3_331", gs = "_userInfo_1tdo3_338", fs = "_pagesMobileModal_1tdo3_349", xs = "_pagesMobileModalContent_1tdo3_363", js = "_pagesMobileModalHeader_1tdo3_369", bs = "_pagesMobileModalFooter_1tdo3_379", y = {
|
|
1608
|
+
button: Ln,
|
|
1609
|
+
login: zn,
|
|
1610
|
+
signUp: Un,
|
|
1611
|
+
buttons: Hn,
|
|
1612
|
+
modal: Fn,
|
|
1612
1613
|
"slide-in-fade": "_slide-in-fade_1tdo3_1",
|
|
1613
1614
|
"mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
|
|
1614
|
-
closing:
|
|
1615
|
+
closing: Vn,
|
|
1615
1616
|
"mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
|
|
1616
1617
|
"slide-out-fade": "_slide-out-fade_1tdo3_1",
|
|
1617
|
-
info:
|
|
1618
|
-
top:
|
|
1619
|
-
title:
|
|
1620
|
-
clear:
|
|
1621
|
-
activeClear:
|
|
1622
|
-
count:
|
|
1623
|
-
cart:
|
|
1624
|
-
empty:
|
|
1625
|
-
product:
|
|
1626
|
-
products:
|
|
1627
|
-
image:
|
|
1628
|
-
productInfo:
|
|
1629
|
-
content:
|
|
1630
|
-
name:
|
|
1631
|
-
price:
|
|
1632
|
-
productButtons:
|
|
1633
|
-
productButton:
|
|
1634
|
-
productCount:
|
|
1635
|
-
bottom:
|
|
1636
|
-
subtotal:
|
|
1637
|
-
block:
|
|
1638
|
-
shoppingCount:
|
|
1639
|
-
total:
|
|
1640
|
-
link:
|
|
1641
|
-
userInfo:
|
|
1642
|
-
pagesMobileModal:
|
|
1643
|
-
pagesMobileModalContent:
|
|
1644
|
-
pagesMobileModalHeader:
|
|
1645
|
-
pagesMobileModalFooter:
|
|
1646
|
-
},
|
|
1647
|
-
const { shopping:
|
|
1618
|
+
info: Yn,
|
|
1619
|
+
top: Gn,
|
|
1620
|
+
title: Wn,
|
|
1621
|
+
clear: Jn,
|
|
1622
|
+
activeClear: Xn,
|
|
1623
|
+
count: Kn,
|
|
1624
|
+
cart: Qn,
|
|
1625
|
+
empty: Zn,
|
|
1626
|
+
product: ts,
|
|
1627
|
+
products: es,
|
|
1628
|
+
image: ns,
|
|
1629
|
+
productInfo: ss,
|
|
1630
|
+
content: is,
|
|
1631
|
+
name: os,
|
|
1632
|
+
price: as,
|
|
1633
|
+
productButtons: cs,
|
|
1634
|
+
productButton: ls,
|
|
1635
|
+
productCount: rs,
|
|
1636
|
+
bottom: ds,
|
|
1637
|
+
subtotal: us,
|
|
1638
|
+
block: ms,
|
|
1639
|
+
shoppingCount: hs,
|
|
1640
|
+
total: ps,
|
|
1641
|
+
link: _s,
|
|
1642
|
+
userInfo: gs,
|
|
1643
|
+
pagesMobileModal: fs,
|
|
1644
|
+
pagesMobileModalContent: xs,
|
|
1645
|
+
pagesMobileModalHeader: js,
|
|
1646
|
+
pagesMobileModalFooter: bs
|
|
1647
|
+
}, ri = (r) => {
|
|
1648
|
+
const { shopping: s, signUp: e, isShowUserInfo: n = !0 } = r;
|
|
1648
1649
|
return /* @__PURE__ */ t.jsxs("div", { className: y.buttons, children: [
|
|
1649
|
-
|
|
1650
|
-
|
|
1650
|
+
s && /* @__PURE__ */ t.jsx(vs, {}),
|
|
1651
|
+
n && /* @__PURE__ */ t.jsx(St, { signUp: e })
|
|
1651
1652
|
] });
|
|
1652
|
-
},
|
|
1653
|
-
const [
|
|
1654
|
-
function
|
|
1655
|
-
var
|
|
1656
|
-
return !
|
|
1653
|
+
}, vs = () => {
|
|
1654
|
+
const [r, s] = _.useState(!1), [e, n] = _.useState([]), { cart: i } = vt();
|
|
1655
|
+
function d(g) {
|
|
1656
|
+
var S;
|
|
1657
|
+
return !g || !(g != null && g.variants) ? !1 : (S = g.variants.find((c) => c.id === g.activeVariantId)) == null ? void 0 : S.subscriptionSettings;
|
|
1657
1658
|
}
|
|
1658
|
-
const
|
|
1659
|
+
const u = i.parts.length > 0 && e.length > 0 && !d(e[0]), [o, m] = _.useState(!1);
|
|
1659
1660
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1660
1661
|
/* @__PURE__ */ t.jsxs(
|
|
1661
1662
|
H,
|
|
@@ -1664,67 +1665,67 @@ const ni = (d) => {
|
|
|
1664
1665
|
style: {
|
|
1665
1666
|
padding: 10
|
|
1666
1667
|
},
|
|
1667
|
-
onClick: (
|
|
1668
|
-
|
|
1668
|
+
onClick: (g) => {
|
|
1669
|
+
g.stopPropagation(), window.location.pathname.includes("/admin/builder") || (s(!0), m(!0));
|
|
1669
1670
|
},
|
|
1670
1671
|
children: [
|
|
1671
1672
|
/* @__PURE__ */ t.jsx(
|
|
1672
|
-
|
|
1673
|
+
f,
|
|
1673
1674
|
{
|
|
1674
1675
|
name: "Handbag",
|
|
1675
1676
|
fill: "var(--icon-primary)"
|
|
1676
1677
|
}
|
|
1677
1678
|
),
|
|
1678
|
-
|
|
1679
|
+
u && /* @__PURE__ */ t.jsx("div", { className: y.shoppingCount, children: i.parts.length })
|
|
1679
1680
|
]
|
|
1680
1681
|
}
|
|
1681
1682
|
),
|
|
1682
|
-
|
|
1683
|
-
|
|
1683
|
+
r && /* @__PURE__ */ t.jsx(
|
|
1684
|
+
yt,
|
|
1684
1685
|
{
|
|
1685
1686
|
close: () => {
|
|
1686
|
-
|
|
1687
|
-
|
|
1687
|
+
m(!1), setTimeout(() => {
|
|
1688
|
+
s(!1);
|
|
1688
1689
|
}, 300);
|
|
1689
1690
|
},
|
|
1690
1691
|
withAnimation: !1,
|
|
1691
1692
|
children: /* @__PURE__ */ t.jsx(
|
|
1692
|
-
|
|
1693
|
+
ys,
|
|
1693
1694
|
{
|
|
1694
1695
|
activeProducts: e,
|
|
1695
|
-
isCartNotEmpty:
|
|
1696
|
+
isCartNotEmpty: u,
|
|
1696
1697
|
isOpen: o
|
|
1697
1698
|
}
|
|
1698
1699
|
)
|
|
1699
1700
|
}
|
|
1700
1701
|
)
|
|
1701
1702
|
] });
|
|
1702
|
-
},
|
|
1703
|
-
const { activeProducts:
|
|
1704
|
-
function
|
|
1705
|
-
|
|
1703
|
+
}, ys = (r) => {
|
|
1704
|
+
const { activeProducts: s, isCartNotEmpty: e, isOpen: n } = r, { cart: i, reset: d, getTotalAndDiscount: u, updateQuantityOfProduct: o } = vt(), m = lt();
|
|
1705
|
+
function g(l) {
|
|
1706
|
+
m(l);
|
|
1706
1707
|
}
|
|
1707
|
-
function
|
|
1708
|
+
function S(l) {
|
|
1708
1709
|
o({
|
|
1709
|
-
productId:
|
|
1710
|
-
productVariantId:
|
|
1711
|
-
quantity:
|
|
1710
|
+
productId: l.id,
|
|
1711
|
+
productVariantId: l.activeVariantId,
|
|
1712
|
+
quantity: l.quantity + 1
|
|
1712
1713
|
});
|
|
1713
1714
|
}
|
|
1714
|
-
function l
|
|
1715
|
+
function c(l) {
|
|
1715
1716
|
o({
|
|
1716
|
-
productId:
|
|
1717
|
-
productVariantId:
|
|
1718
|
-
quantity:
|
|
1717
|
+
productId: l.id,
|
|
1718
|
+
productVariantId: l.activeVariantId,
|
|
1719
|
+
quantity: l.quantity - 1
|
|
1719
1720
|
});
|
|
1720
1721
|
}
|
|
1721
1722
|
return /* @__PURE__ */ t.jsxs(
|
|
1722
1723
|
"div",
|
|
1723
1724
|
{
|
|
1724
|
-
className:
|
|
1725
|
-
[y.closing]: !
|
|
1725
|
+
className: W(y.modal, {
|
|
1726
|
+
[y.closing]: !n
|
|
1726
1727
|
}),
|
|
1727
|
-
onClick: (
|
|
1728
|
+
onClick: (l) => l.stopPropagation(),
|
|
1728
1729
|
children: [
|
|
1729
1730
|
/* @__PURE__ */ t.jsxs("div", { className: y.top, children: [
|
|
1730
1731
|
/* @__PURE__ */ t.jsxs("div", { className: y.info, children: [
|
|
@@ -1734,17 +1735,17 @@ const ni = (d) => {
|
|
|
1734
1735
|
/* @__PURE__ */ t.jsx(
|
|
1735
1736
|
"button",
|
|
1736
1737
|
{
|
|
1737
|
-
className:
|
|
1738
|
+
className: W(y.clear, {
|
|
1738
1739
|
[y.activeClear]: e
|
|
1739
1740
|
}),
|
|
1740
1741
|
disabled: !e,
|
|
1741
|
-
onClick:
|
|
1742
|
+
onClick: d,
|
|
1742
1743
|
children: "Clear all"
|
|
1743
1744
|
}
|
|
1744
1745
|
)
|
|
1745
1746
|
] }),
|
|
1746
1747
|
e ? /* @__PURE__ */ t.jsxs("div", { className: y.cart, children: [
|
|
1747
|
-
/* @__PURE__ */ t.jsx("div", { className: y.products, children:
|
|
1748
|
+
/* @__PURE__ */ t.jsx("div", { className: y.products, children: s.map((l) => /* @__PURE__ */ t.jsxs(
|
|
1748
1749
|
"div",
|
|
1749
1750
|
{
|
|
1750
1751
|
className: y.product,
|
|
@@ -1753,7 +1754,7 @@ const ni = (d) => {
|
|
|
1753
1754
|
/* @__PURE__ */ t.jsx(
|
|
1754
1755
|
"img",
|
|
1755
1756
|
{
|
|
1756
|
-
src: `https://imagedelivery.net/${
|
|
1757
|
+
src: `https://imagedelivery.net/${l.images[0].cfId}/w=500`,
|
|
1757
1758
|
alt: "image",
|
|
1758
1759
|
width: "100%",
|
|
1759
1760
|
height: "100%",
|
|
@@ -1761,10 +1762,10 @@ const ni = (d) => {
|
|
|
1761
1762
|
}
|
|
1762
1763
|
),
|
|
1763
1764
|
/* @__PURE__ */ t.jsxs("div", { className: y.content, children: [
|
|
1764
|
-
/* @__PURE__ */ t.jsx("div", { className: y.name, children:
|
|
1765
|
+
/* @__PURE__ */ t.jsx("div", { className: y.name, children: l.name }),
|
|
1765
1766
|
/* @__PURE__ */ t.jsxs("div", { className: y.price, children: [
|
|
1766
1767
|
"$",
|
|
1767
|
-
|
|
1768
|
+
l.variants.find((T) => T.id === l.activeVariantId).price.amount * ((l == null ? void 0 : l.quantity) || 1)
|
|
1768
1769
|
] })
|
|
1769
1770
|
] })
|
|
1770
1771
|
] }),
|
|
@@ -1773,11 +1774,11 @@ const ni = (d) => {
|
|
|
1773
1774
|
"div",
|
|
1774
1775
|
{
|
|
1775
1776
|
onClick: () => {
|
|
1776
|
-
|
|
1777
|
+
l.quantity !== 1 && c(l);
|
|
1777
1778
|
},
|
|
1778
1779
|
className: y.productButton,
|
|
1779
1780
|
children: /* @__PURE__ */ t.jsx(
|
|
1780
|
-
|
|
1781
|
+
f,
|
|
1781
1782
|
{
|
|
1782
1783
|
name: "Minus",
|
|
1783
1784
|
fill: "#757575",
|
|
@@ -1787,14 +1788,14 @@ const ni = (d) => {
|
|
|
1787
1788
|
)
|
|
1788
1789
|
}
|
|
1789
1790
|
),
|
|
1790
|
-
/* @__PURE__ */ t.jsx("div", { className: y.productCount, children:
|
|
1791
|
+
/* @__PURE__ */ t.jsx("div", { className: y.productCount, children: l.quantity }),
|
|
1791
1792
|
/* @__PURE__ */ t.jsx(
|
|
1792
1793
|
"div",
|
|
1793
1794
|
{
|
|
1794
|
-
onClick: () =>
|
|
1795
|
+
onClick: () => S(l),
|
|
1795
1796
|
className: y.productButton,
|
|
1796
1797
|
children: /* @__PURE__ */ t.jsx(
|
|
1797
|
-
|
|
1798
|
+
f,
|
|
1798
1799
|
{
|
|
1799
1800
|
name: "Plus",
|
|
1800
1801
|
fill: "#757575",
|
|
@@ -1807,14 +1808,14 @@ const ni = (d) => {
|
|
|
1807
1808
|
] })
|
|
1808
1809
|
]
|
|
1809
1810
|
},
|
|
1810
|
-
|
|
1811
|
+
l.id
|
|
1811
1812
|
)) }),
|
|
1812
1813
|
/* @__PURE__ */ t.jsxs("div", { className: y.bottom, children: [
|
|
1813
1814
|
/* @__PURE__ */ t.jsxs("div", { className: y.subtotal, children: [
|
|
1814
1815
|
/* @__PURE__ */ t.jsxs("div", { className: y.block, children: [
|
|
1815
1816
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
1816
1817
|
/* @__PURE__ */ t.jsx(
|
|
1817
|
-
|
|
1818
|
+
f,
|
|
1818
1819
|
{
|
|
1819
1820
|
name: "Info",
|
|
1820
1821
|
width: 20,
|
|
@@ -1825,18 +1826,18 @@ const ni = (d) => {
|
|
|
1825
1826
|
] }),
|
|
1826
1827
|
/* @__PURE__ */ t.jsxs("div", { className: y.total, children: [
|
|
1827
1828
|
"$",
|
|
1828
|
-
|
|
1829
|
+
u().total
|
|
1829
1830
|
] })
|
|
1830
1831
|
] }),
|
|
1831
|
-
/* @__PURE__ */ t.jsx(H, { onClick: () =>
|
|
1832
|
+
/* @__PURE__ */ t.jsx(H, { onClick: () => g("/checkout"), children: "Checkout" })
|
|
1832
1833
|
] })
|
|
1833
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
1834
|
+
] }) : /* @__PURE__ */ t.jsx(Ns, {})
|
|
1834
1835
|
]
|
|
1835
1836
|
}
|
|
1836
1837
|
);
|
|
1837
|
-
},
|
|
1838
|
+
}, Ns = () => /* @__PURE__ */ t.jsxs("div", { className: y.empty, children: [
|
|
1838
1839
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1839
|
-
|
|
1840
|
+
f,
|
|
1840
1841
|
{
|
|
1841
1842
|
name: "Handbag",
|
|
1842
1843
|
fill: "var(--icon-secondary)"
|
|
@@ -1855,18 +1856,18 @@ const ni = (d) => {
|
|
|
1855
1856
|
}
|
|
1856
1857
|
)
|
|
1857
1858
|
] })
|
|
1858
|
-
] }),
|
|
1859
|
-
const e = JSON.parse(localStorage.getItem("token") || "{}"), { data:
|
|
1860
|
-
function m
|
|
1861
|
-
window.location.pathname.includes("/admin/builder") || i(
|
|
1859
|
+
] }), St = ({ signUp: r, close: s }) => {
|
|
1860
|
+
const e = JSON.parse(localStorage.getItem("token") || "{}"), { data: n } = e, i = lt();
|
|
1861
|
+
function d(m) {
|
|
1862
|
+
window.location.pathname.includes("/admin/builder") || i(m);
|
|
1862
1863
|
}
|
|
1863
|
-
if (!
|
|
1864
|
+
if (!n)
|
|
1864
1865
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1865
1866
|
/* @__PURE__ */ t.jsx(
|
|
1866
1867
|
H,
|
|
1867
1868
|
{
|
|
1868
1869
|
onClick: () => {
|
|
1869
|
-
|
|
1870
|
+
d("/customer-dash"), s == null || s();
|
|
1870
1871
|
},
|
|
1871
1872
|
type: "Secondary",
|
|
1872
1873
|
style: {
|
|
@@ -1875,11 +1876,11 @@ const ni = (d) => {
|
|
|
1875
1876
|
children: "Login"
|
|
1876
1877
|
}
|
|
1877
1878
|
),
|
|
1878
|
-
|
|
1879
|
+
r && /* @__PURE__ */ t.jsx(
|
|
1879
1880
|
H,
|
|
1880
1881
|
{
|
|
1881
1882
|
onClick: () => {
|
|
1882
|
-
|
|
1883
|
+
d("/customer-dash"), s == null || s();
|
|
1883
1884
|
},
|
|
1884
1885
|
type: "Primary",
|
|
1885
1886
|
style: {
|
|
@@ -1890,29 +1891,29 @@ const ni = (d) => {
|
|
|
1890
1891
|
}
|
|
1891
1892
|
)
|
|
1892
1893
|
] });
|
|
1893
|
-
const [
|
|
1894
|
+
const [u, o] = _.useState("test-email@gmail.com");
|
|
1894
1895
|
return _.useEffect(() => {
|
|
1895
1896
|
(async () => {
|
|
1896
|
-
const
|
|
1897
|
-
o(
|
|
1897
|
+
const g = qt(n);
|
|
1898
|
+
o(g.email);
|
|
1898
1899
|
})();
|
|
1899
|
-
}, [
|
|
1900
|
+
}, [n]), /* @__PURE__ */ t.jsx(
|
|
1900
1901
|
"div",
|
|
1901
1902
|
{
|
|
1902
1903
|
className: y.userInfo,
|
|
1903
1904
|
onClick: () => {
|
|
1904
|
-
|
|
1905
|
+
d("/customer-dash"), s == null || s();
|
|
1905
1906
|
},
|
|
1906
|
-
children: /* @__PURE__ */ t.jsx("div", { children:
|
|
1907
|
+
children: /* @__PURE__ */ t.jsx("div", { children: u || "test-email@gmail.com" })
|
|
1907
1908
|
}
|
|
1908
1909
|
);
|
|
1909
|
-
},
|
|
1910
|
-
children:
|
|
1911
|
-
logo:
|
|
1910
|
+
}, ks = ({
|
|
1911
|
+
children: r,
|
|
1912
|
+
logo: s,
|
|
1912
1913
|
setIsOpen: e,
|
|
1913
|
-
signUp:
|
|
1914
|
+
signUp: n
|
|
1914
1915
|
}) => {
|
|
1915
|
-
const { setIsOpen: i } =
|
|
1916
|
+
const { setIsOpen: i } = kt(), d = () => {
|
|
1916
1917
|
i(!1), setTimeout(() => {
|
|
1917
1918
|
e(!1), i(!0);
|
|
1918
1919
|
}, 300);
|
|
@@ -1921,17 +1922,17 @@ const ni = (d) => {
|
|
|
1921
1922
|
"div",
|
|
1922
1923
|
{
|
|
1923
1924
|
className: y.pagesMobileModal,
|
|
1924
|
-
onClick: (
|
|
1925
|
+
onClick: (u) => u.stopPropagation(),
|
|
1925
1926
|
children: [
|
|
1926
1927
|
/* @__PURE__ */ t.jsxs("div", { className: y.pagesMobileModalHeader, children: [
|
|
1927
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
1928
|
+
/* @__PURE__ */ t.jsx("div", { children: s }),
|
|
1928
1929
|
/* @__PURE__ */ t.jsx(
|
|
1929
1930
|
H,
|
|
1930
1931
|
{
|
|
1931
1932
|
type: "Secondary",
|
|
1932
|
-
onClick:
|
|
1933
|
+
onClick: d,
|
|
1933
1934
|
children: /* @__PURE__ */ t.jsx(
|
|
1934
|
-
|
|
1935
|
+
f,
|
|
1935
1936
|
{
|
|
1936
1937
|
name: "X",
|
|
1937
1938
|
fill: "var(--icon-primary)"
|
|
@@ -1940,37 +1941,37 @@ const ni = (d) => {
|
|
|
1940
1941
|
}
|
|
1941
1942
|
)
|
|
1942
1943
|
] }),
|
|
1943
|
-
/* @__PURE__ */ t.jsx("div", { className: y.pagesMobileModalContent, children:
|
|
1944
|
+
/* @__PURE__ */ t.jsx("div", { className: y.pagesMobileModalContent, children: r }),
|
|
1944
1945
|
/* @__PURE__ */ t.jsx("div", { className: y.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
|
|
1945
|
-
|
|
1946
|
+
St,
|
|
1946
1947
|
{
|
|
1947
|
-
signUp:
|
|
1948
|
-
close:
|
|
1948
|
+
signUp: n,
|
|
1949
|
+
close: d
|
|
1949
1950
|
}
|
|
1950
1951
|
) })
|
|
1951
1952
|
]
|
|
1952
1953
|
}
|
|
1953
1954
|
);
|
|
1954
|
-
},
|
|
1955
|
-
children:
|
|
1956
|
-
logo:
|
|
1955
|
+
}, di = ({
|
|
1956
|
+
children: r,
|
|
1957
|
+
logo: s,
|
|
1957
1958
|
signUp: e
|
|
1958
1959
|
}) => {
|
|
1959
|
-
const [
|
|
1960
|
+
const [n, i] = _.useState(!1);
|
|
1960
1961
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1961
|
-
/* @__PURE__ */ t.jsx(
|
|
1962
|
-
|
|
1963
|
-
|
|
1962
|
+
/* @__PURE__ */ t.jsx(Is, { setIsOpenModal: i }),
|
|
1963
|
+
n && /* @__PURE__ */ t.jsx(yt, { close: () => i(!1), children: /* @__PURE__ */ t.jsx(
|
|
1964
|
+
ks,
|
|
1964
1965
|
{
|
|
1965
|
-
logo:
|
|
1966
|
+
logo: s,
|
|
1966
1967
|
setIsOpen: i,
|
|
1967
1968
|
signUp: e,
|
|
1968
|
-
children:
|
|
1969
|
+
children: r
|
|
1969
1970
|
}
|
|
1970
1971
|
) })
|
|
1971
1972
|
] });
|
|
1972
|
-
},
|
|
1973
|
-
const { setIsOpenModal:
|
|
1973
|
+
}, Is = (r) => {
|
|
1974
|
+
const { setIsOpenModal: s } = r;
|
|
1974
1975
|
return /* @__PURE__ */ t.jsx(
|
|
1975
1976
|
H,
|
|
1976
1977
|
{
|
|
@@ -1979,10 +1980,10 @@ const ni = (d) => {
|
|
|
1979
1980
|
padding: 10
|
|
1980
1981
|
},
|
|
1981
1982
|
onClick: (e) => {
|
|
1982
|
-
e.stopPropagation(),
|
|
1983
|
+
e.stopPropagation(), s(!0);
|
|
1983
1984
|
},
|
|
1984
1985
|
children: /* @__PURE__ */ t.jsx(
|
|
1985
|
-
|
|
1986
|
+
f,
|
|
1986
1987
|
{
|
|
1987
1988
|
name: "List",
|
|
1988
1989
|
fill: "var(--icon-primary)"
|
|
@@ -1990,34 +1991,34 @@ const ni = (d) => {
|
|
|
1990
1991
|
)
|
|
1991
1992
|
}
|
|
1992
1993
|
);
|
|
1993
|
-
},
|
|
1994
|
-
share:
|
|
1995
|
-
modal:
|
|
1996
|
-
header:
|
|
1997
|
-
socials:
|
|
1998
|
-
social:
|
|
1999
|
-
copy:
|
|
2000
|
-
title:
|
|
2001
|
-
copyWrapper:
|
|
2002
|
-
copyText:
|
|
2003
|
-
copyTextMobile:
|
|
2004
|
-
copyTextMiniMobile:
|
|
2005
|
-
},
|
|
2006
|
-
const { isOpenModal:
|
|
2007
|
-
function
|
|
2008
|
-
|
|
1994
|
+
}, Cs = "_share_10urc_1", Ss = "_modal_10urc_9", ws = "_header_10urc_21", $s = "_socials_10urc_31", Bs = "_social_10urc_31", Ps = "_copy_10urc_41", Ms = "_title_10urc_48", Ts = "_copyWrapper_10urc_54", qs = "_copyText_10urc_63", As = "_copyTextMobile_10urc_76", Os = "_copyTextMiniMobile_10urc_95", tt = {
|
|
1995
|
+
share: Cs,
|
|
1996
|
+
modal: Ss,
|
|
1997
|
+
header: ws,
|
|
1998
|
+
socials: $s,
|
|
1999
|
+
social: Bs,
|
|
2000
|
+
copy: Ps,
|
|
2001
|
+
title: Ms,
|
|
2002
|
+
copyWrapper: Ts,
|
|
2003
|
+
copyText: qs,
|
|
2004
|
+
copyTextMobile: As,
|
|
2005
|
+
copyTextMiniMobile: Os
|
|
2006
|
+
}, ui = ({ title: r = "Copy Product Link" }) => {
|
|
2007
|
+
const { isOpenModal: s, setIsOpenModal: e } = It();
|
|
2008
|
+
function n() {
|
|
2009
|
+
e(!0);
|
|
2009
2010
|
}
|
|
2010
2011
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2011
2012
|
/* @__PURE__ */ t.jsx(
|
|
2012
2013
|
H,
|
|
2013
2014
|
{
|
|
2014
|
-
className:
|
|
2015
|
-
onClick: (
|
|
2016
|
-
|
|
2015
|
+
className: tt.share,
|
|
2016
|
+
onClick: (i) => {
|
|
2017
|
+
i.stopPropagation(), n();
|
|
2017
2018
|
},
|
|
2018
2019
|
type: "Secondary",
|
|
2019
2020
|
children: /* @__PURE__ */ t.jsx(
|
|
2020
|
-
|
|
2021
|
+
f,
|
|
2021
2022
|
{
|
|
2022
2023
|
name: "Share",
|
|
2023
2024
|
fill: "#757575",
|
|
@@ -2026,55 +2027,55 @@ const ni = (d) => {
|
|
|
2026
2027
|
)
|
|
2027
2028
|
}
|
|
2028
2029
|
),
|
|
2029
|
-
|
|
2030
|
+
s && /* @__PURE__ */ t.jsx(yt, { close: e, children: /* @__PURE__ */ t.jsx(Es, { title: r }) })
|
|
2030
2031
|
] });
|
|
2031
|
-
},
|
|
2032
|
-
const { setIsOpenModal:
|
|
2033
|
-
function
|
|
2034
|
-
navigator.clipboard.writeText(
|
|
2032
|
+
}, Es = ({ title: r = "Copy Product Link" }) => {
|
|
2033
|
+
const { setIsOpenModal: s } = It(), { notification: e, setNotification: n } = At(), { setIsOpen: i } = kt(), d = window.location.href;
|
|
2034
|
+
function u() {
|
|
2035
|
+
navigator.clipboard.writeText(d), n({
|
|
2035
2036
|
message: "Link copied to clipboard",
|
|
2036
2037
|
status: "success"
|
|
2037
2038
|
});
|
|
2038
2039
|
}
|
|
2039
|
-
function
|
|
2040
|
-
|
|
2041
|
-
|
|
2040
|
+
function o() {
|
|
2041
|
+
i(!1), setTimeout(() => {
|
|
2042
|
+
s(!1), i(!0);
|
|
2042
2043
|
}, 300);
|
|
2043
2044
|
}
|
|
2044
|
-
function
|
|
2045
|
-
return
|
|
2045
|
+
function m(g, S) {
|
|
2046
|
+
return g.length > S ? g.slice(0, S) + "..." : g;
|
|
2046
2047
|
}
|
|
2047
2048
|
return /* @__PURE__ */ t.jsxs(
|
|
2048
2049
|
"div",
|
|
2049
2050
|
{
|
|
2050
|
-
className:
|
|
2051
|
-
onClick: (
|
|
2051
|
+
className: tt.modal,
|
|
2052
|
+
onClick: (g) => g.stopPropagation(),
|
|
2052
2053
|
children: [
|
|
2053
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2054
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2054
|
+
/* @__PURE__ */ t.jsxs("div", { className: tt.header, children: [
|
|
2055
|
+
/* @__PURE__ */ t.jsx("div", { className: tt.title, children: r }),
|
|
2055
2056
|
/* @__PURE__ */ t.jsx(
|
|
2056
|
-
|
|
2057
|
+
f,
|
|
2057
2058
|
{
|
|
2058
2059
|
name: "X",
|
|
2059
2060
|
fill: "#757575",
|
|
2060
|
-
onClick:
|
|
2061
|
+
onClick: o,
|
|
2061
2062
|
hoverable: !0
|
|
2062
2063
|
}
|
|
2063
2064
|
)
|
|
2064
2065
|
] }),
|
|
2065
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2066
|
+
/* @__PURE__ */ t.jsxs("div", { className: tt.copyWrapper, children: [
|
|
2066
2067
|
/* @__PURE__ */ t.jsxs(
|
|
2067
2068
|
H,
|
|
2068
2069
|
{
|
|
2069
2070
|
type: "Secondary",
|
|
2070
|
-
onClick:
|
|
2071
|
+
onClick: u,
|
|
2071
2072
|
style: {
|
|
2072
2073
|
flex: 1
|
|
2073
2074
|
},
|
|
2074
2075
|
children: [
|
|
2075
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2076
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2077
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2076
|
+
/* @__PURE__ */ t.jsx("div", { className: tt.copyText, children: m(d, 100) }),
|
|
2077
|
+
/* @__PURE__ */ t.jsx("div", { className: tt.copyTextMobile, children: m(d, 40) }),
|
|
2078
|
+
/* @__PURE__ */ t.jsx("div", { className: tt.copyTextMiniMobile, children: m(d, 20) })
|
|
2078
2079
|
]
|
|
2079
2080
|
}
|
|
2080
2081
|
),
|
|
@@ -2082,35 +2083,35 @@ const ni = (d) => {
|
|
|
2082
2083
|
H,
|
|
2083
2084
|
{
|
|
2084
2085
|
type: "Secondary",
|
|
2085
|
-
onClick:
|
|
2086
|
-
children:
|
|
2086
|
+
onClick: u,
|
|
2087
|
+
children: e ? /* @__PURE__ */ t.jsx(f, { name: "Check" }) : /* @__PURE__ */ t.jsx(f, { name: "Copy" })
|
|
2087
2088
|
}
|
|
2088
2089
|
)
|
|
2089
2090
|
] })
|
|
2090
2091
|
]
|
|
2091
2092
|
}
|
|
2092
2093
|
);
|
|
2093
|
-
},
|
|
2094
|
-
accordion:
|
|
2095
|
-
header:
|
|
2096
|
-
icon:
|
|
2097
|
-
open:
|
|
2098
|
-
content:
|
|
2099
|
-
},
|
|
2100
|
-
const [
|
|
2101
|
-
i(!
|
|
2094
|
+
}, Rs = "_accordion_1s1lq_1", Ds = "_header_1s1lq_9", Ls = "_icon_1s1lq_18", zs = "_open_1s1lq_21", Us = "_content_1s1lq_25", nt = {
|
|
2095
|
+
accordion: Rs,
|
|
2096
|
+
header: Ds,
|
|
2097
|
+
icon: Ls,
|
|
2098
|
+
open: zs,
|
|
2099
|
+
content: Us
|
|
2100
|
+
}, mi = ({ title: r, content: s, defaultOpen: e = !1 }) => {
|
|
2101
|
+
const [n, i] = _.useState(e), [d, u] = _.useState(0), o = _.useRef(null), m = () => {
|
|
2102
|
+
i(!n);
|
|
2102
2103
|
};
|
|
2103
2104
|
return _.useEffect(() => {
|
|
2104
|
-
o.current &&
|
|
2105
|
-
}, [
|
|
2105
|
+
o.current && u(n ? o.current.scrollHeight : 0);
|
|
2106
|
+
}, [n]), /* @__PURE__ */ t.jsxs("div", { className: nt.accordion, children: [
|
|
2106
2107
|
/* @__PURE__ */ t.jsxs(
|
|
2107
2108
|
"div",
|
|
2108
2109
|
{
|
|
2109
|
-
className:
|
|
2110
|
-
onClick:
|
|
2110
|
+
className: nt.header,
|
|
2111
|
+
onClick: m,
|
|
2111
2112
|
children: [
|
|
2112
|
-
/* @__PURE__ */ t.jsx("h5", { id: "h5", children:
|
|
2113
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2113
|
+
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
|
|
2114
|
+
/* @__PURE__ */ t.jsx("div", { className: W(nt.icon, { [nt.open]: n }), children: /* @__PURE__ */ t.jsx(f, { name: "CaretDown" }) })
|
|
2114
2115
|
]
|
|
2115
2116
|
}
|
|
2116
2117
|
),
|
|
@@ -2118,13 +2119,13 @@ const ni = (d) => {
|
|
|
2118
2119
|
"div",
|
|
2119
2120
|
{
|
|
2120
2121
|
ref: o,
|
|
2121
|
-
className:
|
|
2122
|
-
style: { height: `${
|
|
2123
|
-
children: /* @__PURE__ */ t.jsx("p", { id: "p", children:
|
|
2122
|
+
className: nt.content,
|
|
2123
|
+
style: { height: `${d}px` },
|
|
2124
|
+
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: s })
|
|
2124
2125
|
}
|
|
2125
2126
|
)
|
|
2126
2127
|
] });
|
|
2127
|
-
},
|
|
2128
|
+
}, hi = ({ children: r, path: s, className: e, target: n = "_self", id: i }) => {
|
|
2128
2129
|
if (window.location.pathname.includes("/admin/builder"))
|
|
2129
2130
|
return /* @__PURE__ */ t.jsx(
|
|
2130
2131
|
"div",
|
|
@@ -2133,11 +2134,11 @@ const ni = (d) => {
|
|
|
2133
2134
|
role: "link",
|
|
2134
2135
|
style: { cursor: "pointer" },
|
|
2135
2136
|
id: i,
|
|
2136
|
-
children:
|
|
2137
|
+
children: r
|
|
2137
2138
|
}
|
|
2138
2139
|
);
|
|
2139
|
-
const
|
|
2140
|
-
|
|
2140
|
+
const d = lt(), u = /^https?:\/\//.test(s), o = (m) => {
|
|
2141
|
+
u || n === "_blank" ? n === "_blank" ? window.open(s, "_blank") : window.location.href = s : (m.preventDefault(), d(s, { replace: !0 }));
|
|
2141
2142
|
};
|
|
2142
2143
|
return /* @__PURE__ */ t.jsx(
|
|
2143
2144
|
"div",
|
|
@@ -2147,13 +2148,13 @@ const ni = (d) => {
|
|
|
2147
2148
|
role: "link",
|
|
2148
2149
|
style: { cursor: "pointer" },
|
|
2149
2150
|
id: i,
|
|
2150
|
-
children:
|
|
2151
|
+
children: r
|
|
2151
2152
|
}
|
|
2152
2153
|
);
|
|
2153
|
-
},
|
|
2154
|
-
buttonsBlock:
|
|
2155
|
-
slideUp:
|
|
2156
|
-
},
|
|
2154
|
+
}, Hs = "_buttonsBlock_1b2rb_1", Fs = "_slideUp_1b2rb_1", Vs = {
|
|
2155
|
+
buttonsBlock: Hs,
|
|
2156
|
+
slideUp: Fs
|
|
2157
|
+
}, pi = () => /* @__PURE__ */ t.jsxs("div", { className: Vs.buttonsBlock, children: [
|
|
2157
2158
|
/* @__PURE__ */ t.jsx(
|
|
2158
2159
|
H,
|
|
2159
2160
|
{
|
|
@@ -2165,22 +2166,61 @@ const ni = (d) => {
|
|
|
2165
2166
|
}
|
|
2166
2167
|
),
|
|
2167
2168
|
/* @__PURE__ */ t.jsx(H, { type: "Secondary", children: "Buy" })
|
|
2168
|
-
] }),
|
|
2169
|
-
wrapper:
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
}
|
|
2169
|
+
] }), Ys = "_wrapper_27wzz_1", Gs = "_logo_27wzz_8", Ws = "_info_27wzz_12", dt = {
|
|
2170
|
+
wrapper: Ys,
|
|
2171
|
+
logo: Gs,
|
|
2172
|
+
info: Ws
|
|
2173
|
+
}, _i = ({ date: r }) => {
|
|
2174
|
+
const { general: s } = Ot();
|
|
2175
|
+
if (!s) return /* @__PURE__ */ t.jsx(t.Fragment, {});
|
|
2176
|
+
function e(n) {
|
|
2177
|
+
const i = new Date(n), d = {
|
|
2178
|
+
month: "short",
|
|
2179
|
+
day: "2-digit",
|
|
2180
|
+
year: "numeric",
|
|
2181
|
+
hour: "2-digit",
|
|
2182
|
+
minute: "2-digit",
|
|
2183
|
+
hour12: !1
|
|
2184
|
+
};
|
|
2185
|
+
return i.toLocaleDateString("en-US", d);
|
|
2186
|
+
}
|
|
2187
|
+
return /* @__PURE__ */ t.jsxs("div", { className: dt.wrapper, children: [
|
|
2188
|
+
/* @__PURE__ */ t.jsx("div", { className: dt.logo, children: s.info.logo ? /* @__PURE__ */ t.jsx(
|
|
2189
|
+
"img",
|
|
2190
|
+
{
|
|
2191
|
+
src: `https://imagedelivery.net/${s.info.logo.cfId}/w=500,h=500`,
|
|
2192
|
+
alt: "image",
|
|
2193
|
+
style: { objectFit: "contain", width: "48px", height: "48px" }
|
|
2194
|
+
}
|
|
2195
|
+
) : /* @__PURE__ */ t.jsx(
|
|
2196
|
+
f,
|
|
2197
|
+
{
|
|
2198
|
+
name: "Image",
|
|
2199
|
+
width: 48,
|
|
2200
|
+
height: 48
|
|
2201
|
+
}
|
|
2202
|
+
) }),
|
|
2203
|
+
/* @__PURE__ */ t.jsxs("div", { className: dt.info, children: [
|
|
2204
|
+
/* @__PURE__ */ t.jsx("h3", { id: "h4", children: s.info.name }),
|
|
2205
|
+
/* @__PURE__ */ t.jsx("p", { id: "p", children: e(r) })
|
|
2206
|
+
] })
|
|
2207
|
+
] });
|
|
2208
|
+
}, Js = "_wrapper_st58d_1", Xs = "_label_st58d_10", Ks = "_textarea_st58d_18", Qs = "_length_st58d_33", ct = {
|
|
2209
|
+
wrapper: Js,
|
|
2210
|
+
label: Xs,
|
|
2211
|
+
textarea: Ks,
|
|
2212
|
+
length: Qs
|
|
2213
|
+
}, gi = (r) => {
|
|
2174
2214
|
const {
|
|
2175
|
-
onChange:
|
|
2215
|
+
onChange: s,
|
|
2176
2216
|
label: e,
|
|
2177
|
-
value:
|
|
2217
|
+
value: n,
|
|
2178
2218
|
maxLength: i,
|
|
2179
|
-
placeholder:
|
|
2180
|
-
type:
|
|
2181
|
-
} =
|
|
2182
|
-
function
|
|
2183
|
-
return
|
|
2219
|
+
placeholder: d = "Type something...",
|
|
2220
|
+
type: u = "text"
|
|
2221
|
+
} = r, [o, m] = _.useState(n.length);
|
|
2222
|
+
function g(S) {
|
|
2223
|
+
return u === "number" ? S.replace(/[^\d\n]+/g, "") : S;
|
|
2184
2224
|
}
|
|
2185
2225
|
return /* @__PURE__ */ t.jsxs("div", { className: ct.wrapper, children: [
|
|
2186
2226
|
e && /* @__PURE__ */ t.jsx(
|
|
@@ -2195,12 +2235,12 @@ const ni = (d) => {
|
|
|
2195
2235
|
"textarea",
|
|
2196
2236
|
{
|
|
2197
2237
|
id: e,
|
|
2198
|
-
value:
|
|
2199
|
-
onChange: (
|
|
2200
|
-
const
|
|
2201
|
-
|
|
2238
|
+
value: n,
|
|
2239
|
+
onChange: (S) => {
|
|
2240
|
+
const c = g(S.target.value);
|
|
2241
|
+
m(c.length), s(c);
|
|
2202
2242
|
},
|
|
2203
|
-
placeholder:
|
|
2243
|
+
placeholder: d,
|
|
2204
2244
|
className: ct.textarea,
|
|
2205
2245
|
maxLength: i
|
|
2206
2246
|
}
|
|
@@ -2213,40 +2253,41 @@ const ni = (d) => {
|
|
|
2213
2253
|
] });
|
|
2214
2254
|
};
|
|
2215
2255
|
export {
|
|
2216
|
-
|
|
2217
|
-
|
|
2256
|
+
mi as Accordion,
|
|
2257
|
+
Is as BurgerMenuButton,
|
|
2218
2258
|
H as Button,
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2259
|
+
_n as ButtonTypeSettings,
|
|
2260
|
+
ai as ButtonsSettings,
|
|
2261
|
+
si as CategorySettings,
|
|
2262
|
+
$t as ChooseImage,
|
|
2263
|
+
ji as ChooseImageModal,
|
|
2264
|
+
Ns as EmptyCart,
|
|
2265
|
+
oi as FormSettings,
|
|
2266
|
+
ri as HeaderButtons,
|
|
2267
|
+
f as Icon,
|
|
2268
|
+
ut as InputSettings,
|
|
2269
|
+
Tt as InputUI,
|
|
2270
|
+
bi as ItemsSettings,
|
|
2271
|
+
ni as LayoutSettings,
|
|
2272
|
+
hi as Link,
|
|
2273
|
+
ci as ListingSelector,
|
|
2274
|
+
vi as Loader,
|
|
2275
|
+
_i as MetaInfoPost,
|
|
2276
|
+
yt as Modal,
|
|
2277
|
+
di as PagesMobileMenu,
|
|
2278
|
+
ks as PagesMobileModal,
|
|
2279
|
+
ii as PagesSettings,
|
|
2280
|
+
pi as ProductCardButtons,
|
|
2281
|
+
li as ProductOptions,
|
|
2282
|
+
Nt as RangeSelector,
|
|
2242
2283
|
at as Select,
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2284
|
+
ui as ShareLink,
|
|
2285
|
+
vs as ShoppingButton,
|
|
2286
|
+
ys as ShoppingModalCart,
|
|
2246
2287
|
it as Switch,
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2288
|
+
yi as TextSettings,
|
|
2289
|
+
Ni as TextareaSettings,
|
|
2290
|
+
gi as TextareaUI,
|
|
2291
|
+
ki as TypesText,
|
|
2292
|
+
St as UserInfo
|
|
2252
2293
|
};
|